{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "notif-stack",
  "title": "Notification Stack",
  "type": "registry:component",
  "description": "Notifications pile up; tap to fan them out",
  "dependencies": [
    "motion@^12.43.0"
  ],
  "files": [
    {
      "path": "src/kavyn/notif-stack.jsx",
      "type": "registry:file",
      "target": "@components/kavyn/notif-stack.jsx",
      "content": "'use client'\n\nimport { useEffect, useState } from 'react'\nimport { motion, AnimatePresence } from 'motion/react'\n\nconst FEED = [\n  { t: 'Deploy succeeded', s: 'main · 41s', c: 'bg-emerald-400' },\n  { t: 'New sign-up', s: 'priya@studio.dev', c: 'bg-tx' },\n  { t: 'Payment received', s: '₹2,400 · Pro plan', c: 'bg-acc' },\n  { t: 'Spike detected', s: '/api/search · 3.2k rpm', c: 'bg-amber-400' },\n  { t: 'Comment on PR #212', s: 'Looks good, ship it', c: 'bg-mute' },\n]\n\n// Notifications stack like cards. Collapsed it shows a pile; click to fan them out.\nexport default function NotifStack({ items = FEED, interval = 2600 }) {\n  const [list, setList] = useState(() => items.slice(0, 3).map((x, i) => ({ ...x, id: i })))\n  const [open, setOpen] = useState(false)\n  useEffect(() => {\n    let n = 3\n    const id = setInterval(() => {\n      if (document.hidden || !items.length) return\n      const x = items[n % items.length]; n++\n      setList((l) => [{ ...x, id: n }, ...l].slice(0, 4))\n    }, interval)\n    return () => clearInterval(id)\n  }, [items, interval])\n  return (\n    <button type=\"button\" onClick={() => setOpen(!open)} aria-expanded={open} className=\"relative block h-[260px] w-[320px] max-w-full text-left\">\n      <AnimatePresence initial={false}>\n        {list.map((n, i) => (\n          <motion.div key={n.id} layout\n            initial={{ opacity: 0, y: -30, scale: 0.9 }}\n            animate={{ opacity: i > 2 ? 0 : 1 - (open ? 0 : i * 0.2), y: open ? i * 64 : i * 10, scale: open ? 1 : 1 - i * 0.05, zIndex: 10 - i }}\n            exit={{ opacity: 0, scale: 0.9 }}\n            transition={{ type: 'spring', stiffness: 380, damping: 30 }}\n            className=\"absolute inset-x-0 top-0 flex items-center gap-3 rounded-2xl border border-line2 bg-panel2 px-4 py-3 shadow-[0_10px_30px_rgba(0,0,0,.45)]\">\n            <span className={`size-2 shrink-0 rounded-full ${n.c}`} />\n            <div className=\"min-w-0 flex-1\"><div className=\"truncate text-sm text-tx\">{n.t}</div><div className=\"truncate text-xs text-mute\">{n.s}</div></div>\n            <span className=\"text-[10px] text-faint\">now</span>\n          </motion.div>\n        ))}\n      </AnimatePresence>\n      <span className=\"absolute bottom-0 left-0 text-[11px] text-faint\">{open ? 'Tap to stack' : 'Tap to expand'}</span>\n    </button>\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"
    }
  }
}
