{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "weight-wave",
  "title": "Weight Wave",
  "type": "registry:component",
  "description": "Variable-font weight ripples under the cursor",
  "dependencies": [
    "motion@^12.43.0"
  ],
  "files": [
    {
      "path": "src/kavyn/weight-wave.jsx",
      "type": "registry:file",
      "target": "@components/kavyn/weight-wave.jsx",
      "content": "'use client'\n\nimport { useRef } from 'react'\nimport { motion, useMotionValue, useSpring, useTransform } from 'motion/react'\n\nfunction Letter({ ch, mx, idx, total }) {\n  const w = useTransform(mx, (x) => {\n    if (x < 0) return 300\n    const center = (idx + 0.5) / total\n    const d = Math.abs(x - center)\n    return 300 + 600 * Math.max(0, 1 - d * 5)\n  })\n  const s = useSpring(w, { stiffness: 220, damping: 20 })\n  return <motion.span style={{ fontWeight: s }} className=\"inline-block whitespace-pre\">{ch}</motion.span>\n}\n\nexport default function WeightWave({ text = 'MERIDIAN' }) {\n  const ref = useRef(null)\n  const mx = useMotionValue(-1)\n  return (\n    <h3\n      ref={ref}\n      onPointerMove={(e) => { const r = ref.current.getBoundingClientRect(); mx.set((e.clientX - r.left) / r.width) }}\n      onPointerLeave={() => mx.set(-1)}\n      className=\"cursor-default select-none text-6xl tracking-tight text-tx\"\n    >\n      {text.split('').map((c, i) => <Letter key={i} ch={c} mx={mx} idx={i} total={text.length} />)}\n    </h3>\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"
    }
  }
}
