{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "dictation-card-demo",
  "type": "registry:example",
  "title": "Dictation Card Demo",
  "registryDependencies": [
    "https://seamui.dev/r/dictation-card.json"
  ],
  "files": [
    {
      "path": "registry/seam/examples/dictation-card-demo.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { DictationCard } from \"@/registry/seam/ui/dictation-card\"\n\nconst PHRASES = [\n  \"Refactor the auth middleware\",\n  \"Refactor the auth middleware to use the new session store\",\n  \"Refactor the auth middleware to use the new session store and add tests\",\n]\n\n// Simulated dictation: the transcript grows while a synthetic level drives\n// the visualizer. In a real app, feed your STT stream into `value` and the\n// mic track into `track`.\nexport default function DictationCardDemo() {\n  const [value, setValue] = React.useState(PHRASES[0])\n  const [level, setLevel] = React.useState(0.4)\n  const [status, setStatus] = React.useState<string | null>(null)\n\n  React.useEffect(() => {\n    let tick = 0\n    const iv = setInterval(() => {\n      tick++\n      setLevel(0.25 + Math.abs(Math.sin(tick / 2)) * 0.6)\n      if (tick % 4 === 0) {\n        setValue(PHRASES[Math.min(tick / 4, PHRASES.length - 1)])\n      }\n    }, 500)\n    return () => clearInterval(iv)\n  }, [])\n\n  return (\n    <div className=\"flex w-full max-w-md flex-col gap-3\">\n      {/* the composer well the card sits in */}\n      <div className=\"bg-muted shadow-well rounded-lg squircle border border-border/60 p-2\">\n        <DictationCard\n          value={value}\n          onValueChange={setValue}\n          listening\n          level={level}\n          onConfirm={(v) => setStatus(`Confirmed: “${v.slice(0, 40)}…”`)}\n          onCancel={() => {\n            setValue(\"\")\n            setStatus(\"Discarded\")\n          }}\n        />\n      </div>\n      <p className=\"text-muted-foreground text-xs\" aria-live=\"polite\">\n        {status ?? \"Speech lands as editable text — nothing sends on silence.\"}\n      </p>\n    </div>\n  )\n}\n",
      "type": "registry:example"
    }
  ]
}