{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "inline-citations-demo",
  "title": "Inline Citations Demo",
  "description": "A worked example of Inline Citations: Numbered markers placed inside generated text, each linking to its entry in a source list underneath.",
  "registryDependencies": [
    "https://ui.tinkererslabs.com/r/inline-citations.json"
  ],
  "files": [
    {
      "path": "components/demos/inline-citations-demo.tsx",
      "content": "\"use client\"\n\nimport {\n  Citation,\n  InlineCitations,\n} from \"@/registry/default/inline-citations/inline-citations\"\n\nconst sources = [\n  {\n    id: \"postgres\",\n    title: \"PostgreSQL — Unique indexes\",\n    url: \"https://www.postgresql.org/docs/current/indexes-unique.html\",\n    snippet: \"Null values are not considered equal by a unique constraint.\",\n  },\n  {\n    id: \"migration\",\n    title: \"0004_add_email_index.sql\",\n    snippet: \"Creates the index before the backfill statement runs.\",\n  },\n]\n\nexport function InlineCitationsDemo() {\n  return (\n    <InlineCitations\n      className=\"w-full max-w-xl text-[0.95rem]\"\n      sources={sources}\n    >\n      <p className=\"leading-relaxed\">\n        Postgres treats nulls as distinct inside a unique index\n        <Citation id=\"postgres\" />, so the constraint itself will not reject the\n        empty rows. The failure comes from the ordering in the migration\n        <Citation id=\"migration\" />, where the index is created before anything\n        backfills the column.\n      </p>\n    </InlineCitations>\n  )\n}\n",
      "type": "registry:example"
    }
  ],
  "type": "registry:example"
}