{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "message-demo",
  "title": "Message Demo",
  "description": "A worked example of Message: One turn in a thread, with a role, an optional avatar and timestamp, and actions that stay reachable without a pointer.",
  "dependencies": [
    "lucide-react@^1.31.0"
  ],
  "registryDependencies": [
    "https://ui.tinkererslabs.com/r/message.json"
  ],
  "files": [
    {
      "path": "components/demos/message-demo.tsx",
      "content": "\"use client\"\n\nimport { Copy, RefreshCw } from \"lucide-react\"\n\nimport { Message } from \"@/registry/default/message/message\"\n\nfunction Action({ icon, label }: { icon: React.ReactNode; label: string }) {\n  return (\n    <button\n      type=\"button\"\n      aria-label={label}\n      className=\"hover:text-foreground focus-visible:ring-ring inline-flex size-7 items-center justify-center rounded-full focus-visible:ring-2 focus-visible:outline-none\"\n    >\n      {icon}\n    </button>\n  )\n}\n\nexport function MessageDemo() {\n  return (\n    <div className=\"w-full max-w-xl\">\n      <Message role=\"user\" avatar=\"You\" timestamp=\"2:14 PM\">\n        Can you check the migration before I merge it?\n      </Message>\n\n      <Message\n        role=\"assistant\"\n        avatar=\"M\"\n        timestamp=\"2:14 PM\"\n        actions={\n          <>\n            <Action icon={<Copy aria-hidden=\"true\" size={13} />} label=\"Copy\" />\n            <Action\n              icon={<RefreshCw aria-hidden=\"true\" size={13} />}\n              label=\"Regenerate\"\n            />\n          </>\n        }\n      >\n        The index is created before the backfill runs, so any row still holding\n        a null email will collide. Reordering the two statements fixes it.\n      </Message>\n    </div>\n  )\n}\n",
      "type": "registry:example"
    }
  ],
  "type": "registry:example"
}