{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "timeline-rail",
  "title": "Timeline Rail",
  "type": "registry:component",
  "description": "Events snap along a scroll rail",
  "dependencies": [
    "motion@^12.43.0"
  ],
  "files": [
    {
      "path": "src/kavyn/timeline-rail.jsx",
      "type": "registry:file",
      "target": "@components/kavyn/timeline-rail.jsx",
      "content": "'use client'\n\nimport { useState } from 'react'\nimport { motion, AnimatePresence } from 'motion/react'\n\nconst EV = [\n  { v: '2.4', d: 'Sep 18', t: 'Offline mode', b: 'Edits sync when you reconnect.' },\n  { v: '2.3', d: 'Aug 30', t: 'Shared inboxes', b: 'Route mail to a team, not a person.' },\n  { v: '2.2', d: 'Aug 02', t: 'Faster search', b: 'Results in under 80 ms on big workspaces.' },\n  { v: '2.1', d: 'Jul 11', t: 'Dark theme', b: 'Follows your system setting.' },\n]\n\nexport default function TimelineRail({ events = EV }) {\n  const [i, setI] = useState(0)\n  const [dir, setDir] = useState(1)\n  const go = (n) => { setDir(n > i ? 1 : -1); setI(n) }\n  return (\n    <div className=\"w-full max-w-md\"\n      onWheel={(e) => { if (Math.abs(e.deltaY) > 20) go(Math.min(events.length - 1, Math.max(0, i + Math.sign(e.deltaY)))) }}>\n      <div className=\"relative mb-6 flex justify-between px-2\">\n        <div className=\"absolute inset-x-2 top-1/2 h-px bg-line2\" />\n        <motion.div className=\"absolute left-2 top-1/2 h-px bg-acc\" animate={{ width: `calc(${(i / (events.length - 1)) * 100}% - ${(i / (events.length - 1)) * 16}px)` }} transition={{ type: 'spring', stiffness: 200, damping: 26 }} />\n        {events.map((e, k) => (\n          <button key={e.v} onClick={() => go(k)} className=\"relative grid size-4 place-items-center\">\n            <span className={`size-2 rounded-full ${k <= i ? 'bg-acc' : 'bg-line2'}`} />\n            {k === i && <motion.span layoutId=\"tl-ring\" className=\"absolute inset-0 rounded-full border border-acc\" transition={{ type: 'spring', stiffness: 400, damping: 30 }} />}\n            <span className=\"absolute top-6 font-mono text-[10px] text-faint\">{e.v}</span>\n          </button>\n        ))}\n      </div>\n      <div className=\"relative mt-10 h-28 overflow-hidden\">\n        <AnimatePresence custom={dir} initial={false}>\n          <motion.div key={i} custom={dir}\n            initial={{ x: dir * 60, opacity: 0 }} animate={{ x: 0, opacity: 1 }} exit={{ x: -dir * 60, opacity: 0 }}\n            transition={{ type: 'spring', stiffness: 300, damping: 30 }}\n            className=\"absolute inset-0 rounded-xl border border-line bg-panel p-4\">\n            <div className=\"font-mono text-[11px] text-acc\">v{events[i].v} · {events[i].d}</div>\n            <div className=\"mt-1 text-base text-tx\">{events[i].t}</div>\n            <div className=\"mt-1 text-sm text-mute\">{events[i].b}</div>\n          </motion.div>\n        </AnimatePresence>\n      </div>\n    </div>\n  )\n}\n"
    }
  ],
  "cssVars": {
    "theme": {
      "color-bg": "var(--bg)",
      "color-panel": "var(--panel)",
      "color-panel2": "var(--panel2)",
      "color-line": "var(--line)",
      "color-line2": "var(--line2)",
      "color-tx": "var(--tx)",
      "color-mute": "var(--mute)",
      "color-faint": "var(--faint)",
      "color-acc": "var(--acc)",
      "color-acc-fg": "var(--acc-fg)"
    },
    "light": {
      "bg": "#ffffff",
      "panel": "#f5f5f7",
      "panel2": "#e8e8ed",
      "line": "#e5e5ea",
      "line2": "#d2d2d7",
      "tx": "#1d1d1f",
      "mute": "#6e6e73",
      "faint": "#a1a1a6",
      "acc": "#1d1d1f",
      "acc-fg": "#ffffff"
    },
    "dark": {
      "bg": "#000000",
      "panel": "#141416",
      "panel2": "#1f1f22",
      "line": "#262628",
      "line2": "#3a3a3d",
      "tx": "#f5f5f7",
      "mute": "#a1a1a6",
      "faint": "#6e6e73",
      "acc": "#f5f5f7",
      "acc-fg": "#000000"
    }
  },
  "css": {
    ".light": {
      "--bg": "#ffffff",
      "--panel": "#f5f5f7",
      "--panel2": "#e8e8ed",
      "--line": "#e5e5ea",
      "--line2": "#d2d2d7",
      "--tx": "#1d1d1f",
      "--mute": "#6e6e73",
      "--faint": "#a1a1a6",
      "--acc": "#1d1d1f",
      "--acc-fg": "#ffffff"
    }
  }
}
