{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "blueprint-process-demo",
  "type": "registry:block",
  "title": "Blueprint: Studio Process",
  "description": "Wireframe Build Animation example, Studio Process: A case study that goes from an annotated blueprint to the finished design as you scroll, with `play=\"manual\"` following `useScroll`. `data-blueprint-order` groups the build into type, imagery and surfaces, and `onBlockChange` lights up the matching stage in the rail. Scroll back up and it comes apart. A take on the wireframe (skeleton) and scroll animation (on scroll). Fits features, hero and portfolio sections.",
  "author": "KeyframeUI <https://keyframeui.com>",
  "categories": [
    "features",
    "hero",
    "portfolio",
    "wireframe",
    "scroll-animation",
    "layout",
    "scroll",
    "motion"
  ],
  "docs": "Live preview, examples and props: https://keyframeui.com/components/blueprint#blueprint-process-demo",
  "registryDependencies": [
    "https://keyframeui.com/r/blueprint.json"
  ],
  "files": [
    {
      "path": "components/blueprint-process-demo.tsx",
      "type": "registry:component",
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport {\n  motion,\n  useReducedMotion,\n  useScroll,\n  useSpring,\n  useTransform,\n  type MotionValue,\n} from \"motion/react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Blueprint, type BlueprintState } from \"@/components/ui/blueprint\";\n\n// Each stage is a `data-blueprint-order` group: type first, then imagery, then surfaces.\nconst stages = [\n  { title: \"Wireframe\", note: \"Blocks measured from the page\" },\n  { title: \"Type\", note: \"Copy set on its lines\" },\n  { title: \"Imagery\", note: \"Photos develop in place\" },\n  { title: \"Final\", note: \"Surfaces and borders fill in\" },\n];\n\nconst photo = (id: string, w: number, h: number) =>\n  `https://images.unsplash.com/photo-${id}?auto=format&fit=crop&w=${w}&h=${h}&q=80`;\n\nexport function BlueprintProcessDemo() {\n  const scrollRef = React.useRef<HTMLDivElement>(null);\n  const trackRef = React.useRef<HTMLDivElement>(null);\n  const reduced = useReducedMotion();\n  const { scrollYProgress } = useScroll({\n    container: scrollRef,\n    target: trackRef,\n    offset: [\"start start\", \"end end\"],\n  });\n  const eased = useSpring(scrollYProgress, { stiffness: 300, damping: 50, restDelta: 0.0005 });\n  // A beat on the wireframe at the top and on the finished page at the bottom.\n  const progress = useTransform(reduced ? scrollYProgress : eased, [0.06, 0.94], [0, 1]);\n  const hint = useTransform(scrollYProgress, [0, 0.04], [1, 0]);\n\n  // The furthest stage any block has started in. Scrolling back drops blocks out again.\n  const [stage, setStage] = React.useState(0);\n  const started = React.useRef(new Map<HTMLElement, number>());\n  const onBlockChange = React.useCallback((element: HTMLElement, state: BlueprintState) => {\n    const map = started.current;\n    if (state === \"wireframe\") map.delete(element);\n    else map.set(element, Number(element.dataset.blueprintOrder ?? 0) + 1);\n    setStage(Math.max(0, ...map.values()));\n  }, []);\n\n  return (\n    <div className=\"relative w-full overflow-hidden rounded-xl border border-zinc-200 bg-white dark:border-zinc-800 dark:bg-zinc-950\">\n      <div ref={scrollRef} className=\"relative h-[var(--demo-height,36rem)] overflow-y-auto overscroll-contain\">\n        <div ref={trackRef} className=\"relative h-[320%]\">\n          <div className=\"sticky top-0 flex h-[var(--demo-height,36rem)] flex-col gap-4 p-4 sm:flex-row sm:gap-6 sm:p-6\">\n            <Rail stage={stage} progress={progress} hint={hint} />\n\n            <Blueprint\n              play=\"manual\"\n              progress={progress}\n              annotate\n              onBlockChange={onBlockChange}\n              skeletonClassName=\"text-white\"\n              className=\"min-h-0 flex-1 overflow-hidden rounded-xl bg-[#1f4f96] bg-[linear-gradient(to_right,rgb(255_255_255/0.07)_1px,transparent_1px),linear-gradient(to_bottom,rgb(255_255_255/0.07)_1px,transparent_1px)] bg-[size:24px_24px] p-4 sm:p-6\"\n            >\n              <CaseStudy />\n            </Blueprint>\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n}\n\nfunction Rail({\n  stage,\n  progress,\n  hint,\n}: {\n  stage: number;\n  progress: MotionValue<number>;\n  hint: MotionValue<number>;\n}) {\n  return (\n    <div className=\"flex shrink-0 flex-col justify-between sm:w-44\">\n      <div>\n        <p className=\"font-mono text-[11px] tracking-widest text-zinc-500 uppercase\">Case study 07</p>\n        <p className=\"mt-1 hidden text-sm font-medium tracking-tight text-zinc-900 sm:block dark:text-zinc-50\">\n          From wireframe to launch\n        </p>\n      </div>\n\n      <ol className=\"relative mt-3 flex gap-4 sm:mt-0 sm:flex-col sm:gap-6\">\n        <span className=\"absolute top-1.5 bottom-1.5 left-[3.5px] hidden w-px bg-zinc-200 sm:block dark:bg-zinc-800\" />\n        <motion.span\n          className=\"absolute top-1.5 bottom-1.5 left-[3.5px] hidden w-px origin-top bg-zinc-900 sm:block dark:bg-zinc-100\"\n          style={{ scaleY: progress }}\n        />\n        {stages.map((item, i) => (\n          <li key={item.title} className=\"relative flex items-start gap-2.5 sm:gap-3\">\n            <span\n              className={cn(\n                \"relative mt-1 size-2 shrink-0 rounded-full ring-4 transition-colors duration-300\",\n                i <= stage\n                  ? \"bg-zinc-900 ring-white dark:bg-zinc-100 dark:ring-zinc-950\"\n                  : \"bg-zinc-300 ring-white dark:bg-zinc-700 dark:ring-zinc-950\",\n              )}\n            />\n            <div>\n              <p\n                className={cn(\n                  \"text-xs font-medium transition-colors duration-300 sm:text-sm\",\n                  i === stage\n                    ? \"text-zinc-900 dark:text-zinc-50\"\n                    : i < stage\n                      ? \"text-zinc-500\"\n                      : \"text-zinc-400 dark:text-zinc-600\",\n                )}\n              >\n                {item.title}\n              </p>\n              <p\n                className={cn(\n                  \"mt-0.5 hidden text-xs leading-snug transition-colors duration-300 sm:block\",\n                  i === stage ? \"text-zinc-500\" : \"text-zinc-400 dark:text-zinc-600\",\n                )}\n              >\n                {item.note}\n              </p>\n            </div>\n          </li>\n        ))}\n      </ol>\n\n      <motion.p\n        style={{ opacity: hint }}\n        className=\"hidden items-center gap-1.5 text-xs text-zinc-500 sm:flex\"\n      >\n        Scroll to build\n        <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" className=\"size-3.5\" aria-hidden>\n          <path d=\"M8 3v10m0 0 4-4m-4 4-4-4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n        </svg>\n      </motion.p>\n    </div>\n  );\n}\n\nfunction CaseStudy() {\n  return (\n    <article\n      data-blueprint=\"box\"\n      data-blueprint-order=\"2\"\n      data-blueprint-label=\"Page\"\n      className=\"flex h-full flex-col overflow-hidden rounded-lg bg-[#17130f] p-5 text-[#f1e7da] sm:p-6\"\n    >\n      <header className=\"flex items-center justify-between gap-4\">\n        <span data-blueprint className=\"text-xs font-semibold tracking-[0.22em] uppercase\">\n          Ondas Coffee\n        </span>\n        <span data-blueprint className=\"font-mono text-[11px] text-[#f1e7da]/60\">\n          Brand · Web · 2026\n        </span>\n      </header>\n\n      <div className=\"mt-7 grid gap-5 md:grid-cols-[1.1fr_1fr]\">\n        <div>\n          <h2 data-blueprint className=\"text-2xl/tight font-semibold tracking-tight text-balance sm:text-3xl/tight\">\n            A roaster&apos;s site that smells like the shop\n          </h2>\n          <p data-blueprint className=\"mt-3 text-sm/6 text-pretty text-[#f1e7da]/70\">\n            We rebuilt Ondas around the Tuesday roast: one weekly drop, tasting notes from the roaster, and a\n            checkout that takes under a minute.\n          </p>\n          <div className=\"mt-5 grid grid-cols-2 gap-3\">\n            <div\n              data-blueprint=\"box\"\n              data-blueprint-order=\"2\"\n              className=\"rounded-lg border border-[#f1e7da]/15 bg-[#241d17] px-3 py-2.5\"\n            >\n              <p data-blueprint data-blueprint-count className=\"text-2xl font-semibold tracking-tight tabular-nums\">\n                +48%\n              </p>\n              <p data-blueprint data-blueprint-label=\"\" className=\"text-xs text-[#f1e7da]/60\">\n                online orders\n              </p>\n            </div>\n            <div\n              data-blueprint=\"box\"\n              data-blueprint-order=\"2\"\n              className=\"rounded-lg border border-[#f1e7da]/15 bg-[#241d17] px-3 py-2.5\"\n            >\n              <p data-blueprint data-blueprint-count className=\"text-2xl font-semibold tracking-tight tabular-nums\">\n                3.1×\n              </p>\n              <p data-blueprint data-blueprint-label=\"\" className=\"text-xs text-[#f1e7da]/60\">\n                repeat buyers\n              </p>\n            </div>\n          </div>\n        </div>\n        <img\n          data-blueprint\n          data-blueprint-order=\"1\"\n          src={photo(\"1442512595331-e89e73853f31\", 720, 540)}\n          alt=\"Coffee dripping through a pour-over into a glass carafe\"\n          className=\"hidden aspect-[4/3] w-full rounded-lg object-cover md:block\"\n        />\n      </div>\n\n      <div className=\"mt-5 hidden min-h-24 flex-1 grid-cols-3 gap-3 sm:grid\">\n        <img\n          data-blueprint\n          data-blueprint-order=\"1\"\n          src={photo(\"1447933601403-0c6688de566e\", 480, 300)}\n          alt=\"Roasted coffee beans\"\n          className=\"h-full max-h-56 w-full rounded-lg object-cover\"\n        />\n        <img\n          data-blueprint\n          data-blueprint-order=\"1\"\n          src={photo(\"1497935586351-b67a49e012bf\", 480, 300)}\n          alt=\"A latte, a pour-over and ground coffee on a wooden board\"\n          className=\"h-full max-h-56 w-full rounded-lg object-cover\"\n        />\n        <a\n          data-blueprint\n          data-blueprint-order=\"2\"\n          href=\"#case-study\"\n          className=\"flex h-full max-h-56 flex-col justify-between rounded-lg bg-[#e8a35a] p-3 text-sm font-medium text-[#17130f]\"\n        >\n          <span>Read the case study</span>\n          <span aria-hidden>→</span>\n        </a>\n      </div>\n    </article>\n  );\n}\n"
    }
  ]
}