{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "document-reference",
  "title": "Document Reference",
  "description": "A source card that preserves document identity, location, metadata, and the cited excerpt.",
  "dependencies": [
    "@solar-icons/react@^2.2.0",
    "cn@^0.3.0"
  ],
  "registryDependencies": [
    "button",
    "https://pastaui.com/r/pastaui-styles.json"
  ],
  "files": [
    {
      "path": "src/components/ai/document-reference.tsx",
      "content": "import { ArrowRightUpIcon as ArrowUpRightIcon } from '@solar-icons/react/linear/arrow-right-up'\nimport { FileTextIcon } from '@solar-icons/react/linear/file-text'\nimport * as React from 'react'\n\nimport { Button } from '@/components/ui/button'\nimport { cn } from 'cn'\n\ninterface DocumentReferenceProps extends React.ComponentProps<'article'> {\n  excerpt?: string\n  label?: string\n  location?: string\n  metadata?: string\n  onOpen?: () => void\n  title: string\n}\n\nfunction DocumentReference({\n  className,\n  excerpt,\n  label = 'Source',\n  location,\n  metadata,\n  onOpen,\n  title,\n  ...props\n}: DocumentReferenceProps) {\n  return (\n    <article\n      data-slot=\"document-reference\"\n      className={cn(\n        'rounded-[16px] bg-card p-4 font-sans text-sm font-[450] tracking-[-0.05px] text-muted-foreground shadow-card',\n        className,\n      )}\n      {...props}\n    >\n      <div className=\"flex items-start gap-3\">\n        <span className=\"flex size-9 shrink-0 items-center justify-center rounded-[10px] bg-muted text-muted-foreground\">\n          <FileTextIcon className=\"size-4\" />\n        </span>\n        <div className=\"min-w-0 flex-1\">\n          <p className=\"text-xs leading-5 text-muted-foreground\">{label}</p>\n          <h3 className=\"mt-0.5 truncate card-heading\">{title}</h3>\n          {(location || metadata) && (\n            <p className=\"mt-1 text-xs leading-5 text-muted-foreground\">\n              {[location, metadata].filter(Boolean).join(' · ')}\n            </p>\n          )}\n        </div>\n        {onOpen && (\n          <Button aria-label={`Open ${title}`} onClick={onOpen} size=\"icon-sm\" variant=\"ghost\">\n            <ArrowUpRightIcon className=\"transition-[translate] duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover/button:translate-x-px group-hover/button:-translate-y-px motion-reduce:transition-none\" />\n          </Button>\n        )}\n      </div>\n      {excerpt && (\n        <blockquote className=\"mt-3 rounded-[10px] bg-muted/45 px-3 py-2.5 text-xs leading-5 text-muted-foreground\">\n          {excerpt}\n        </blockquote>\n      )}\n    </article>\n  )\n}\n\nexport { DocumentReference }\nexport type { DocumentReferenceProps }\n",
      "type": "registry:component",
      "target": "@components/ai/document-reference.tsx"
    }
  ],
  "type": "registry:component"
}