{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ai-source",
  "type": "registry:ui",
  "description": "AI source attribution component",
  "files": [
    {
      "path": "packages/ai/source.tsx",
      "content": "'use client';\n\nimport { BookIcon, ChevronDownIcon } from 'lucide-react';\nimport type { ComponentProps } from 'react';\nimport {\n  Collapsible,\n  CollapsibleContent,\n  CollapsibleTrigger,\n} from '@repo/shadcn-ui/components/ui/collapsible';\nimport { cn } from '@repo/shadcn-ui/lib/utils';\n\nexport type AISourcesProps = ComponentProps<'div'>;\n\nexport const AISources = ({ className, ...props }: AISourcesProps) => (\n  <Collapsible\n    className={cn('flex flex-col not-prose mb-4 text-primary justify-center items-center text-center text-sm w-full', \n      'bg-muted text-muted-foreground hover:bg-muted/80 transition-colors rounded-md p-1',\n      className)}\n    {...props}\n  />\n);\n\nexport type AISourcesTriggerProps = ComponentProps<\n  typeof CollapsibleTrigger\n> & {\n  count: number;\n};\n\nexport const AISourcesTrigger = ({\n  className,\n  count,\n  children,\n  ...props\n}: AISourcesTriggerProps) => (\n  <CollapsibleTrigger className=\"flex items-center gap-2 w-full justify-center\" {...props}>\n    {children ?? (\n      <>\n        <p className=\"font-medium\">Used {count} sources</p>\n        <ChevronDownIcon className=\"h-4 w-4\" />\n      </>\n    )}\n  </CollapsibleTrigger>\n);\n\nexport type AISourcesContentProps = ComponentProps<typeof CollapsibleContent>;\n\nexport const AISourcesContent = ({\n  className,\n  ...props\n}: AISourcesContentProps) => (\n  <CollapsibleContent\n    className={cn('mt-3 flex flex-col gap-2', className)}\n    {...props}\n  />\n);\n\nexport type AISourceProps = ComponentProps<'a'>;\n\nexport const AISource = ({\n  href,\n  title,\n  children,\n  ...props\n}: AISourceProps) => (\n  <a\n    className=\"flex items-center gap-2 hover:bg-muted hover:text-primary rounded-md p-2 transition-colors\"\n    href={href}\n    rel=\"noreferrer\"\n    target=\"_blank\"\n    {...props}\n  >\n    {children ?? (\n      <>\n        <BookIcon className=\"h-4 w-4\" />\n        <span className=\"block font-medium\">{title}</span>\n      </>\n    )}\n  </a>\n);\n",
      "type": "registry:component"
    }
  ]
}