{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ai-response",
  "title": "Ai Response",
  "dependencies": [
    "lucide-react@0.546.0",
    "streamdown@2.5.0"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://ui.orchid.ai/r/orchid-foundation.json",
    "https://ui.orchid.ai/r/orchid-theme.json"
  ],
  "files": [
    {
      "path": "registry/ui/orchid/ai-elements/response.tsx",
      "content": "\"use client\";\nimport { cn } from \"../lib/ui-utils\";\nimport { Check, Copy } from 'lucide-react';\nimport { memo, useState, type ComponentProps } from 'react';\nimport { Streamdown } from 'streamdown';\ntype ResponseProps = ComponentProps<typeof Streamdown>;\nconst TableCell = ({ children, ...props }: any) => {\n    const [copied, setCopied] = useState(false);\n    const handleCopy = async () => {\n        if (typeof children === 'string') {\n            await navigator.clipboard.writeText(children);\n            setCopied(true);\n            setTimeout(() => setCopied(false), 2000);\n        }\n    };\n    return (<td className=\"text-neutral group/cell relative px-4 py-3 align-top\" {...props}>\n      <div className=\"flex items-start justify-between gap-2\">\n        <span>{children}</span>\n        <button onClick={handleCopy} className=\"text-neutral-subtle hover:text-neutral hover:bg-surface-subtle cursor-pointer rounded-md p-1 opacity-0 transition-opacity group-hover/cell:opacity-100\" title=\"Copy to clipboard\">\n          {copied ? <Check className=\"size-3\"/> : <Copy className=\"size-3\"/>}\n        </button>\n      </div>\n    </td>);\n};\nconst defaultComponents = {\n    table: ({ node, ...props }: any) => (<div className=\"ring-neutral-subtle bg-surface-subtle my-4 w-full overflow-hidden rounded-xl tabular-nums antialiased ring-1\">\n      <table className=\"text-copy-sm w-full\" {...props}/>\n    </div>),\n    thead: ({ node, ...props }: any) => (<thead className=\"bg-surface-weak border-neutral-subtle text-neutral-subtle border-b font-medium\" {...props}/>),\n    th: ({ node, ...props }: any) => (<th className=\"px-4 py-3 text-left font-medium whitespace-nowrap\" {...props}/>),\n    tr: ({ node, ...props }: any) => (<tr className=\"border-neutral-subtle even:bg-surface-subtle/50 hover:bg-surface-subtle border-b transition-colors duration-150 ease-out last:border-0\" {...props}/>),\n    td: TableCell,\n};\nexport const Response = memo(({ className, components, ...props }: ResponseProps) => (<Streamdown className={cn('size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0', className)} components={{ ...defaultComponents, ...components }} {...props}/>), (prevProps, nextProps) => prevProps.children === nextProps.children &&\n    prevProps.mode === nextProps.mode &&\n    prevProps.isAnimating === nextProps.isAnimating);\nResponse.displayName = 'Response';\n",
      "type": "registry:ui",
      "target": "@ui/orchid/ai-elements/response.tsx"
    }
  ],
  "css": {
    "@import \"streamdown/styles.css\"": {},
    "@source inline(\"--- ---- --sd-animation --sd-delay --sd-duration --sd-easing --sdm-bg --sdm-c --sdm-fg --sdm-tbg --shiki-dark --shiki-dark-bg --streamdown-caret -mt-10 [&>*:first-child]:mt-0 [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)] [&>*:last-child]:after:inline [&>*:last-child]:mb-0 [&>p]:inline [&_svg]:h-auto [&_svg]:w-auto [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10 [counter-increment:line_0] [counter-reset:line] [li_&]:pl-6 a abap about absolute actionscript-3 ada add adoc an and angular-html angular-ts animate animate-spin animated annotation anonymous ao apl appearance-none applescript application ara area aria-label aria-modal as asm astro auto available awk b backdrop-blur-sm background-color bal base bat be beancount before:[counter-increment:line] before:content-[counter(line)] before:font-mono before:inline-block before:mr-4 before:select-none before:text-[13px] before:text-muted-foreground/50 before:text-right before:w-6 berry bg-[var(--sdm-tbg)] bg-background bg-background/50 bg-background/80 bg-background/90 bg-background/95 bg-black/10 bg-muted bg-muted/80 bg-primary bg-red-100 bg-red-50 bg-sidebar bg-sidebar/80 bib bicep blob block blockquote boolean border border-b-2 border-border border-collapse border-current border-l-4 border-muted-foreground/30 border-sidebar bottom-2 bottom-4 br break-all bs bsl button button! c cache cairo canvas cdc center char chart children children:typeof cjk clar className client clj closure-templates cls clsx cmake cmd co cob code code-block code-block-actions code-block-body code-block-copy-button code-block-download-button code-block-header coffee col color common-lisp components! conf config content content! contents context copy cpp cql cr create crossOrigin cs cshtml css csv cue current currentColor cursor-pointer d dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))] dark:text-[var(--shiki-dark,var(--sdm-c,inherit))] dart data data-block data-footnote-backref data-footnotes data-incomplete data-language data-sd-animate data-streamdown dax default desktop details diagram dialog diff dir dir! disabled:cursor-not-allowed disabled:opacity-50 displayName div divide-border divide-y dm dn do dockerfile download dream-maker duration-150 duration-200 ease ease-out edge ee el element elm else emacs-lisp embed enable env erb erl es et evenodd ex export external f f03 f08 f18 f77 f90 f95 fadeIn feature file finally fish fixed flex flex-1 flex-col fnl fo font-medium font-mono font-semibold for fortran-fixed-form fortran-free-form found from fs fsl ft ftl fullscreen function gap-1 gap-2 gap-4 gd gdshader gi gif git-commit git-rebase gitcommit github-dark github-light gitrebase gleam glimmer-js glimmer-ts glsl go gql grab grabbing graphql groovy group group-hover:block group-hover:opacity-100 gs gts h-4 h-8 h-[46px] h-full h1 h2 h3 h4 h5 h6 hProperties hack haml harden hast-util-to-jsx-runtime hbs hcl he heading-1 heading-2 heading-3 heading-4 heading-5 heading-6 height height! hidden hjson hlsl horizontal-rule hover:bg-background hover:bg-muted hover:bg-muted/40 hover:bg-primary/90 hover:text-foreground hr href hs html html-derivative html-url-attributes http hx hxml hy image image-fallback image-wrapper image/png imba img import in index! inherit ini inline-block inline-code input inset-0 instanceof io isAnimating isIncomplete! isPrimary italic items-center jade java jinja jison jl jo jpeg jpg js json json5 jsonc jsonl jsonnet jssm jsx jt justify-center justify-end ke key keyCache keydown kql kt kts l language lastRenderCharCount lean left-2 left-4 length length! less let li line lineNumbers link link-safety-modal linkSafety liquid lisp list-decimal list-disc list-inside list-item lit literalTagContent ll ln load log logo lowercase lr ls ltr lua luau m mak markdown marked marko math max-h-32 max-w-full max-w-md maxSize mb-2 md mdc mdx mermaid mermaid-block mermaid-block-actions meta metastring min-h-28 min-h-[200px] min-w-[120px] ml ml-1 mm mmd mode mojo mousedown move ms mt-1 mt-2 mt-6 mx-4 my-4 my-6 n name nar narrat new nf nim nix none noreferrer normalizeHtmlIndentation not nt nu number o object objective-c objective-cpp of ol onerror onload opacity-0 ordered-list origin-center ot out outerHTML overflow overflow-auto overflow-hidden overflow-x-auto overflow-y-auto p p-1 p-1.5 p-2 p-3 p-4 p-6 p6 pan panZoom panZoom! param pas path pcss php pl pl-4 pls plt plugin plugins png po pointer-events-auto pointer-events-none pointercancel pointermove pointerup polar pot potx pp pq pre prefix presentation prevContentLength prisma properties props proto ps ps1 pt-0 pug purs px-1.5 px-3 px-4 py py-0.5 py-1 py-2 ql qml qmldir qo qss r raku raw rb re react react-dom react/jsx-runtime reg regex regexp rehype-harden rehype-raw rehype-sanitize rehypePlugin rehypePlugins! rel relative remark-gfm remark-parse remark-rehype remarkPlugin remarkPlugins! remarkPluginsAfter remarkPluginsBefore remend render result return right-0 right-2 right-4 rkt rootStyle round rounded rounded-full rounded-lg rounded-md rounded-xl rq rs rst rt rtl s sas sass scala scm scss sdbl section sep service sh shader shadow-lg shadow-sm shikiTheme shouldNormalizeHtmlIndentation! shrink-0 size-4 size-full so sol source soy space space-x-2 space-y-4 span spl sql src ss ssh-config st startLine static sticky streamdown:incomplete-link streaming string strong styl sub subscript summary sup superscript supports-[backdrop-filter]:backdrop-blur supports-[backdrop-filter]:backdrop-blur-sm supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:bg-sidebar/70 sv svelte svg swift system-verilog table table-body table-cell table-fullscreen table-header table-header-cell table-row table-wrapper tailwind-merge talon tasl tbody tcl td tel templ tex text text-2xl text-3xl text-[var(--sdm-c,inherit)] text-base text-left text-lg text-muted-foreground text-primary text-primary-foreground text-red-600 text-red-700 text-red-800 text-sm text-xl text-xs text/csv text/html text/markdown text/plain tf tfvars th the thead to toml top-2 top-4 top-full tr track transform transition-all transition-colors transition-transform transparent tres true try ts ts-tags tsp tsv tsx ttl twig txt typ type type! typeof ue ul un undefined underline unified unist-util-visit unist-util-visit-parents unordered-list use userSelect v vala var vb vhdl vim vine visit vo vue vue-html vue-vine vy w w-4 w-8 w-full wait wasm wbr we webp wgsl wheel whitespace-normal whitespace-nowrap width width! wiki window window! wit wl word wrap-anywhere wy xml xsl yaml yml z-10 z-20 z-50 zig zo zoom zs zsh\")": {}
  },
  "type": "registry:ui"
}