{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "chapter-scrubber-demo",
  "type": "registry:example",
  "title": "Chapter Scrubber Demo",
  "description": "Example of a coding agent's task chapters as a vertical rail — hover or arrow over a line to reveal that chapter's preview card.",
  "registryDependencies": [
    "https://ruixen.com/r/chapter-scrubber"
  ],
  "files": [
    {
      "path": "registry/example/chapter-scrubber-demo.tsx",
      "content": "\"use client\";\n\nimport {\n  ChapterScrubber,\n  type Chapter,\n} from \"@/registry/ruixenui/chapter-scrubber\";\n\nconst CHAPTERS: Chapter[] = [\n  {\n    id: \"clone\",\n    title: \"clone the repo and read the layout\",\n    description:\n      \"Pulled the branch and mapped the workspace — the scroll feature lives under registry/ruixenui.\",\n    meta: \"00:00\",\n  },\n  {\n    id: \"reproduce\",\n    title: \"reproduce the reported bug\",\n    description:\n      \"Confirmed the rail flickers on fast pointer moves between adjacent lines. Traced it to state churn.\",\n    meta: \"00:14\",\n  },\n  {\n    id: \"grep\",\n    title: \"grep for the hover handler\",\n    description:\n      \"Found two pointer listeners fighting over the same index every frame.\",\n    meta: \"00:21\",\n  },\n  {\n    id: \"read-test\",\n    title: \"read the failing snapshot test\",\n    description:\n      \"The snapshot expected a clamped card position; the component placed it unclamped near the edges.\",\n    meta: \"00:33\",\n  },\n  {\n    id: \"hypothesis\",\n    title: \"form a hypothesis\",\n    description:\n      \"The card top was never clamped to the rail bounds, so it overshot on the first and last chapters.\",\n    meta: \"00:41\",\n  },\n  {\n    id: \"magnify\",\n    title: \"drive the rail off one pointer value\",\n    description:\n      \"Replaced per-line state with a single spring; each tick reads its rise from the cursor's distance.\",\n    meta: \"00:52\",\n  },\n  {\n    id: \"falloff\",\n    title: \"shape the falloff\",\n    description:\n      \"Swapped the linear ramp for a raised-cosine bump so the wave has no seams at its edges.\",\n    meta: \"01:07\",\n  },\n  {\n    id: \"dedupe\",\n    title: \"collapse hover and focus into one source\",\n    description:\n      \"Hover and keyboard now feed the same pointer value. No more dueling listeners, no more flicker.\",\n    meta: \"01:19\",\n  },\n  {\n    id: \"keyboard\",\n    title: \"add roving tabindex + arrow keys\",\n    description:\n      \"Up/Down walk the rail, Home/End jump to the ends, Enter selects. Only one tick is tabbable at a time.\",\n    meta: \"01:38\",\n  },\n  {\n    id: \"reduced-motion\",\n    title: \"honor prefers-reduced-motion\",\n    description:\n      \"Kept the spatial wave but dropped the springs, so the rise is instant instead of eased.\",\n    meta: \"01:50\",\n  },\n  {\n    id: \"flip\",\n    title: \"auto-flip the card near the edge\",\n    description:\n      \"Compared room on each side against the card width and flipped toward the roomier one.\",\n    meta: \"02:04\",\n  },\n  {\n    id: \"run-tests\",\n    title: \"run the test suite\",\n    description:\n      \"24 passed, 0 failed. The snapshot matches the clamped layout.\",\n    meta: \"02:22\",\n  },\n  {\n    id: \"lint\",\n    title: \"lint and typecheck\",\n    description:\n      \"Clean. Tightened the ref callback and dropped an unused import.\",\n    meta: \"02:30\",\n  },\n  {\n    id: \"self-review\",\n    title: \"re-read my own diff\",\n    description:\n      \"Skimmed the change end to end and trimmed a comment that no longer matched the code.\",\n    meta: \"02:41\",\n  },\n  {\n    id: \"commit\",\n    title: \"commit the fix\",\n    description:\n      \"fix(scrubber): magnify the rail from a single pointer spring.\",\n    meta: \"02:48\",\n  },\n  {\n    id: \"push\",\n    title: \"push and open the PR\",\n    description: \"Opened PR #11148 against main and requested review.\",\n    meta: \"02:55\",\n  },\n  {\n    id: \"update-desc\",\n    title: \"ok update pr desc with bullet points for what was done\",\n    description:\n      \"Updated PR #11148 with accurate implementation bullets, including its opt-in scope and browser fallback.\",\n    meta: \"03:10\",\n  },\n  {\n    id: \"respond\",\n    title: \"respond to review comments\",\n    description:\n      \"Reviewer asked about touch devices — added a note that the rail falls back to focus + tap.\",\n    meta: \"03:26\",\n  },\n  {\n    id: \"green\",\n    title: \"wait for CI to go green\",\n    description:\n      \"All checks passed on the second run after the flaky network mock settled.\",\n    meta: \"03:44\",\n  },\n  {\n    id: \"done\",\n    title: \"hand off — ready to merge\",\n    description:\n      \"Left a summary comment and marked the PR ready. Waiting on the final approval.\",\n    meta: \"03:51\",\n  },\n];\n\nexport default function ChapterScrubberDemo() {\n  return (\n    <div className=\"flex min-h-[400px] w-full items-center justify-center bg-background px-6 py-12\">\n      <ChapterScrubber\n        chapters={CHAPTERS}\n        onSelect={(chapter) => {\n          // Wire this to navigation, scroll-to, or replay in a real app.\n          void chapter;\n        }}\n      />\n    </div>\n  );\n}\n",
      "type": "registry:example",
      "target": "components/chapter-scrubber-demo.tsx"
    }
  ]
}