{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "circuit-pulse",
  "title": "Circuit Pulse",
  "type": "registry:component",
  "description": "Traces carry pulses across a board",
  "dependencies": [
    "motion@^12.43.0"
  ],
  "files": [
    {
      "path": "src/kavyn/circuit-pulse.jsx",
      "type": "registry:file",
      "target": "@components/kavyn/circuit-pulse.jsx",
      "content": "'use client'\n\nimport { useMemo } from 'react'\nimport { motion } from 'motion/react'\n\n/** @param {{ children?: any, traces?: any, seed?: any }} props */\nexport default function CircuitPulse({ children = undefined, traces = 12, seed = 7 }) {\n  const paths = useMemo(() => {\n    let s = seed; const rnd = () => ((s = (s * 9301 + 49297) % 233280) / 233280)\n    return Array.from({ length: traces }, () => {\n      let x = Math.round(rnd() * 20) * 20, y = Math.round(rnd() * 12) * 20, d = `M${x} ${y}`\n      for (let k = 0; k < 4; k++) { if (k % 2) y += (rnd() > 0.5 ? 1 : -1) * Math.round(1 + rnd() * 3) * 20; else x += Math.round(2 + rnd() * 5) * 20; d += ` L${x} ${y}` }\n      return { d, end: [x, y] }\n    })\n  }, [traces, seed])\n  return (\n    <div className=\"relative size-full min-h-64 overflow-hidden bg-bg\">\n      <svg viewBox=\"0 0 400 240\" preserveAspectRatio=\"xMidYMid slice\" className=\"absolute inset-0 size-full\">\n        {paths.map((p, i) => (\n          <g key={i}>\n            <path d={p.d} fill=\"none\" stroke=\"var(--line)\" strokeWidth=\"1.5\" />\n            <motion.path d={p.d} fill=\"none\" stroke=\"var(--acc)\" strokeWidth=\"1.5\" strokeLinecap=\"round\" pathLength=\"1\" strokeDasharray=\"0.12 0.88\"\n              initial={{ strokeDashoffset: 1 }} animate={{ strokeDashoffset: -0.12 }} transition={{ repeat: Infinity, duration: 2.4 + (i % 4) * 0.5, delay: i * 0.3, ease: 'easeIn', repeatDelay: 1 }} style={{ filter: 'drop-shadow(0 0 3px var(--acc))' }} />\n            <circle cx={p.end[0]} cy={p.end[1]} r=\"2.5\" fill=\"var(--panel2)\" stroke=\"var(--line2)\" />\n          </g>\n        ))}\n      </svg>\n      <div className=\"relative grid size-full min-h-64 place-items-center\">{children}</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"
    }
  }
}
