{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "code-block",
  "title": "Code block",
  "description": "Syntax-colored code from a built-in tokenizer or your own tokens, with theme-derived colors, line numbers, highlighted lines, a file tab, copy with a drawn check, a wrap toggle and a staggered line entrance.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "https://goodui.dev/r/goodui-motion.json",
    "https://goodui.dev/r/locale.json"
  ],
  "files": [
    {
      "path": "registry/components/ai/code-block.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Check, Copy, FileCode2, WrapText } from \"lucide-react\"\nimport { cn } from \"@/lib/utils\"\nimport { useLabels } from \"@/lib/goodui-locale\"\nimport { GooduiTokens } from \"@/lib/goodui-motion\"\n\n/*\n * Code block with a small hand-written tokenizer (TypeScript/JS/JSX, JSON, bash, Python, CSS, HTML, SQL, YAML),\n * or pre-tokenized lines from your own highlighter (shiki, prism). Token colors are derived from the theme's\n * --chart-1..5 so they follow the buyer's palette and stay readable in light and dark.\n */\n\nexport type CodeTokenType = \"plain\" | \"keyword\" | \"string\" | \"number\" | \"comment\" | \"function\" | \"type\" | \"property\" | \"punctuation\" | \"operator\" | \"tag\" | \"attr\" | \"variable\" | \"constant\"\nexport type CodeToken = { content: string; type: CodeTokenType }\nexport type CodeLanguage = \"ts\" | \"tsx\" | \"js\" | \"jsx\" | \"json\" | \"bash\" | \"sh\" | \"python\" | \"py\" | \"css\" | \"html\" | \"sql\" | \"yaml\" | \"yml\" | \"text\"\n\ntype Family = \"js\" | \"json\" | \"bash\" | \"py\" | \"css\" | \"html\" | \"sql\" | \"yaml\" | \"text\"\nconst FAMILY: Record<CodeLanguage, Family> = { ts: \"js\", tsx: \"js\", js: \"js\", jsx: \"js\", json: \"json\", bash: \"bash\", sh: \"bash\", python: \"py\", py: \"py\", css: \"css\", html: \"html\", sql: \"sql\", yaml: \"yaml\", yml: \"yaml\", text: \"text\" }\n\nconst words = (s: string) => new Set(s.split(\" \"))\nconst KEYWORDS: Partial<Record<Family, Set<string>>> = {\n  js: words(\n    \"abstract as async await break case catch class const continue debugger declare default delete do else enum export extends finally for from function if implements import in instanceof interface is keyof let namespace new of package private protected public readonly return satisfies static super switch this throw try type typeof var void while with yield\",\n  ),\n  py: words(\"and as assert async await break class continue def del elif else except finally for from global if import in is lambda nonlocal not or pass raise return try while with yield self\"),\n  bash: words(\"if then else elif fi for in do done while until case esac function return exit export source local set unset readonly shift break continue\"),\n  sql: words(\n    \"select from where and or not null is in as on join left right inner outer full group by order limit offset insert into values update set delete create table primary key index drop alter add having union all distinct case when then else end between like exists returning with asc desc\",\n  ),\n}\nconst CONSTANTS = words(\"true false null undefined None True False NaN Infinity\")\n\ntype Rule = { re: RegExp; type: CodeTokenType; open?: string }\nconst R = (src: string, type: CodeTokenType, open?: string, flags = \"\"): Rule => ({ re: new RegExp(src, \"y\" + flags), type, open })\nconst LINE_COMMENT = R(\"\\\\/\\\\/.*\", \"comment\")\nconst HASH_COMMENT = R(\"#.*\", \"comment\")\nconst BLOCK_COMMENT = [R(\"\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\/\", \"comment\"), R(\"\\\\/\\\\*.*\", \"comment\", \"*/\")]\nconst DQ = R('\"(?:\\\\\\\\.|[^\"\\\\\\\\])*\"?', \"string\")\nconst SQ = R(\"'(?:\\\\\\\\.|[^'\\\\\\\\])*'?\", \"string\")\nconst NUMBER = R(\"0x[\\\\da-f]+(?!\\\\w)|\\\\d[\\\\d_]*(?:\\\\.\\\\d+)?(?:e[+-]?\\\\d+)?(?:px|em|rem|vh|vw|vmin|vmax|ms|s|deg|fr|ch|%)?(?!\\\\w)\", \"number\", undefined, \"i\")\nconst WORD = R(\"[A-Za-z_$][\\\\w$]*\", \"plain\")\nconst SPACE = R(\"\\\\s+\", \"plain\")\nconst PUNCT = R(\"[{}()\\\\[\\\\].,;]\", \"punctuation\")\nconst OPERATOR = R(\"[+\\\\-*/%=<>!&|^~?:@]+\", \"operator\")\nconst ANY = R(\"[\\\\s\\\\S]\", \"plain\")\n\nconst RULES: Record<Family, Rule[]> = {\n  js: [LINE_COMMENT, ...BLOCK_COMMENT, DQ, SQ, R(\"`(?:\\\\\\\\.|[^`\\\\\\\\])*`\", \"string\"), R(\"`.*\", \"string\", \"`\"), NUMBER, WORD, SPACE, PUNCT, OPERATOR, ANY],\n  json: [DQ, NUMBER, WORD, SPACE, PUNCT, OPERATOR, ANY],\n  bash: [HASH_COMMENT, DQ, SQ, R(\"\\\\$\\\\{[^}]*\\\\}|\\\\$[\\\\w@#?*]+\", \"variable\"), R(\"--?[\\\\w-]+\", \"attr\"), NUMBER, WORD, SPACE, R(\"[|&;<>()]+\", \"punctuation\"), ANY],\n  py: [HASH_COMMENT, R('\"\"\"[\\\\s\\\\S]*?\"\"\"|\\'\\'\\'[\\\\s\\\\S]*?\\'\\'\\'', \"string\"), R('\"\"\".*', \"string\", '\"\"\"'), DQ, SQ, R(\"@[\\\\w.]+\", \"attr\"), NUMBER, WORD, SPACE, PUNCT, OPERATOR, ANY],\n  css: [...BLOCK_COMMENT, DQ, SQ, R(\"@[\\\\w-]+\", \"keyword\"), R(\"!important\", \"keyword\"), R(\"#[\\\\da-f]{3,8}\\\\b\", \"number\", undefined, \"i\"), NUMBER, R(\"[\\\\w-]+(?=\\\\()\", \"function\"), R(\"::?[\\\\w-]+\", \"attr\"), R(\"[.#]?[A-Za-z_-][\\\\w-]*\", \"plain\"), SPACE, PUNCT, OPERATOR, ANY],\n  html: [R(\"<!--[\\\\s\\\\S]*?-->\", \"comment\"), R(\"<!--.*\", \"comment\", \"-->\"), R(\"<!DOCTYPE[^>]*>\", \"keyword\", undefined, \"i\"), R(\"<\\\\/?\", \"punctuation\"), SPACE, R(\"[^<\\\\s][^<]*\", \"plain\"), ANY],\n  sql: [R(\"--.*\", \"comment\"), ...BLOCK_COMMENT, SQ, DQ, NUMBER, WORD, SPACE, PUNCT, OPERATOR, ANY],\n  yaml: [HASH_COMMENT, DQ, SQ, R(\"[&*][\\\\w-]+\", \"variable\"), R(\"^\\\\s*-(?=\\\\s)\", \"punctuation\"), NUMBER, R(\"[\\\\w.-]+(?=\\\\s*:(?:\\\\s|$))\", \"property\"), WORD, SPACE, R(\"[:\\\\[\\\\]{},|>-]\", \"punctuation\"), ANY],\n  text: [],\n}\nconst TAG_RULES: Rule[] = [SPACE, R(\"\\\\/?>\", \"punctuation\"), DQ, SQ, R(\"=\", \"operator\"), R(\"[\\\\w:.-]+\", \"attr\"), ANY]\n\ntype ScanState = { open: string | null; tag: boolean; brace: boolean }\n\nfunction classify(word: string, fam: Family, line: string, start: number, end: number, st: ScanState): CodeTokenType {\n  if (CONSTANTS.has(word)) return \"constant\"\n  if (fam === \"css\") {\n    if (st.brace && /^\\s*:/.test(line.slice(end)) && !/[.#]/.test(word[0] ?? \"\")) return \"property\"\n    return st.brace ? \"plain\" : \"tag\"\n  }\n  if (fam === \"json\" || fam === \"yaml\") return \"plain\"\n  const next = line.slice(end)\n  const prev = line.slice(0, start)\n  if (KEYWORDS[fam]?.has(fam === \"sql\" ? word.toLowerCase() : word)) return \"keyword\"\n  if (fam === \"js\" && (prev.endsWith(\"<\") || prev.endsWith(\"</\"))) return \"tag\"\n  if (/^\\s*\\(/.test(next)) return \"function\"\n  if (fam === \"bash\") return /^\\s*$/.test(prev) || /(?:[|;&]|&&|\\|\\||\\bthen|\\bdo)\\s*$/.test(prev) ? \"function\" : \"plain\"\n  if (fam === \"js\" && prev.endsWith(\".\")) return \"property\"\n  if ((fam === \"js\" || fam === \"py\") && /^[A-Z]/.test(word) && !/^[A-Z0-9_]+$/.test(word)) return \"type\"\n  if (fam === \"js\" && /^[A-Z][A-Z0-9_]+$/.test(word)) return \"constant\"\n  return \"plain\"\n}\n\nfunction tokenizeLine(line: string, fam: Family, st: ScanState): CodeToken[] {\n  const out: CodeToken[] = []\n  const push = (content: string, type: CodeTokenType) => {\n    if (!content) return\n    const last = out[out.length - 1]\n    if (last && last.type === type) last.content += content\n    else out.push({ content, type })\n  }\n  if (fam === \"text\") {\n    push(line, \"plain\")\n    return out\n  }\n  let i = 0\n  while (i < line.length) {\n    // Inside a block comment, a template literal or a triple-quoted string from an earlier line.\n    if (st.open) {\n      const end = line.indexOf(st.open, i)\n      const type: CodeTokenType = st.open === \"*/\" || st.open === \"-->\" ? \"comment\" : \"string\"\n      if (end === -1) {\n        push(line.slice(i), type)\n        i = line.length\n      } else {\n        push(line.slice(i, end + st.open.length), type)\n        i = end + st.open.length\n        st.open = null\n      }\n      continue\n    }\n    const rules = fam === \"html\" && st.tag ? TAG_RULES : RULES[fam]\n    let matched = false\n    for (const rule of rules) {\n      rule.re.lastIndex = i\n      const m = rule.re.exec(line)\n      if (!m || !m[0]) continue\n      const text = m[0]\n      let type = rule.type\n      if (rule === WORD || (fam === \"css\" && rule.type === \"plain\" && rule !== SPACE && rule !== ANY)) type = classify(text, fam, line, i, i + text.length, st)\n      else if (fam === \"json\" && rule === DQ && /^\\s*:/.test(line.slice(i + text.length))) type = \"property\"\n      else if (fam === \"html\" && rule.re.source === \"<\\\\/?\") {\n        push(text, \"punctuation\")\n        const name = /[\\w:-]+/y\n        name.lastIndex = i + text.length\n        const nm = name.exec(line)\n        if (nm) push(nm[0], \"tag\")\n        i += text.length + (nm?.[0].length ?? 0)\n        st.tag = true\n        matched = true\n        break\n      }\n      if (fam === \"css\" && text === \"{\") st.brace = true\n      if (fam === \"css\" && text === \"}\") st.brace = false\n      if (fam === \"html\" && st.tag && text.endsWith(\">\")) st.tag = false\n      push(text, type)\n      if (rule.open) st.open = rule.open\n      i += text.length\n      matched = true\n      break\n    }\n    if (!matched) {\n      push(line[i] ?? \"\", \"plain\")\n      i++\n    }\n  }\n  return out\n}\n\n/** Splits code into lines of colored tokens. Exported so other components (diffs, messages) can reuse it. */\nexport function tokenizeCode(code: string, language: CodeLanguage = \"text\"): CodeToken[][] {\n  const fam = FAMILY[language] ?? \"text\"\n  const st: ScanState = { open: null, tag: false, brace: false }\n  return code.replace(/\\r\\n?/g, \"\\n\").split(\"\\n\").map((line) => tokenizeLine(line, fam, st))\n}\n\n/** Renders one line of tokens as colored spans (inside a `.pc-code` element for the colors to apply). */\nexport function CodeTokens({ tokens }: { tokens: CodeToken[] }) {\n  return (\n    <>\n      {tokens.map((t, i) =>\n        t.type === \"plain\" ? (\n          <React.Fragment key={i}>{t.content}</React.Fragment>\n        ) : (\n          <span key={i} data-t={t.type}>\n            {t.content}\n          </span>\n        ),\n      )}\n    </>\n  )\n}\n\n/** Token color rules; other components that render CodeTokens ship this with the same href so it is loaded once. */\nexport const CODE_CSS = `\n.pc-code{--pc-code-kw:color-mix(in oklab,var(--chart-4) 62%,var(--foreground));--pc-code-str:color-mix(in oklab,var(--chart-2) 50%,var(--foreground));--pc-code-num:color-mix(in oklab,var(--chart-3) 42%,var(--foreground));--pc-code-fn:color-mix(in oklab,var(--chart-1) 66%,var(--foreground));--pc-code-type:color-mix(in oklab,var(--chart-5) 56%,var(--foreground));--pc-code-prop:color-mix(in oklab,var(--chart-1) 52%,var(--foreground));--pc-code-tag:color-mix(in oklab,var(--chart-5) 60%,var(--foreground));--pc-code-attr:color-mix(in oklab,var(--chart-3) 42%,var(--foreground));--pc-code-var:color-mix(in oklab,var(--chart-2) 45%,var(--foreground));--pc-code-const:color-mix(in oklab,var(--chart-3) 45%,var(--foreground));--pc-code-punct:color-mix(in oklab,var(--foreground) 62%,var(--muted-foreground));--pc-code-op:color-mix(in oklab,var(--chart-1) 40%,var(--foreground));--pc-code-comment:var(--muted-foreground)}\n.dark .pc-code{--pc-code-kw:color-mix(in oklab,var(--chart-4) 82%,var(--foreground));--pc-code-str:color-mix(in oklab,var(--chart-2) 85%,var(--foreground));--pc-code-num:color-mix(in oklab,var(--chart-3) 85%,var(--foreground));--pc-code-fn:color-mix(in oklab,var(--chart-1) 85%,var(--foreground));--pc-code-type:color-mix(in oklab,var(--chart-5) 80%,var(--foreground));--pc-code-prop:color-mix(in oklab,var(--chart-1) 70%,var(--foreground));--pc-code-tag:color-mix(in oklab,var(--chart-5) 85%,var(--foreground));--pc-code-attr:color-mix(in oklab,var(--chart-3) 80%,var(--foreground));--pc-code-var:color-mix(in oklab,var(--chart-2) 75%,var(--foreground));--pc-code-const:color-mix(in oklab,var(--chart-3) 80%,var(--foreground));--pc-code-punct:color-mix(in oklab,var(--foreground) 70%,var(--muted-foreground));--pc-code-op:color-mix(in oklab,var(--chart-1) 60%,var(--foreground))}\n.pc-code [data-t=keyword]{color:var(--pc-code-kw)}\n.pc-code [data-t=string]{color:var(--pc-code-str)}\n.pc-code [data-t=number]{color:var(--pc-code-num)}\n.pc-code [data-t=function]{color:var(--pc-code-fn)}\n.pc-code [data-t=type]{color:var(--pc-code-type)}\n.pc-code [data-t=property]{color:var(--pc-code-prop)}\n.pc-code [data-t=tag]{color:var(--pc-code-tag)}\n.pc-code [data-t=attr]{color:var(--pc-code-attr)}\n.pc-code [data-t=variable]{color:var(--pc-code-var)}\n.pc-code [data-t=constant]{color:var(--pc-code-const)}\n.pc-code [data-t=punctuation]{color:var(--pc-code-punct)}\n.pc-code [data-t=operator]{color:var(--pc-code-op)}\n.pc-code [data-t=comment]{color:var(--pc-code-comment);font-style:italic}\n.pc-code-line{display:grid;grid-template-columns:var(--pc-code-gutter,0) minmax(0,1fr);min-height:1.5rem}\n.pc-code[data-ln=false] .pc-code-line{grid-template-columns:minmax(0,1fr)}\n.pc-code-line[data-hl]{background:color-mix(in oklab,var(--chart-1) 10%,transparent);box-shadow:inset 3px 0 var(--chart-1)}\n.pc-code-ln{color:var(--muted-foreground);text-align:end;padding-inline-end:1rem;user-select:none;-webkit-user-select:none}\n.pc-code-text{white-space:pre}\n.pc-code[data-wrap=true] .pc-code-text{white-space:pre-wrap;overflow-wrap:anywhere}\n.pc-code[data-appear=lines] .pc-code-line{animation:pc-code-in .4s var(--pc-ease-out) both;animation-delay:calc(var(--i) * 28ms)}\n.pc-code[data-appear=fade]{animation:pc-code-in .35s ease-out both}\n@keyframes pc-code-in{from{opacity:0;transform:translateY(4px)}}\n@media (prefers-reduced-motion:reduce){.pc-code[data-appear] .pc-code-line,.pc-code[data-appear]{animation:none}}\n`\n\nexport type CodeBlockLabels = { copy: string; copied: string; wrap: string; code: string }\nconst DEFAULT_LABELS: CodeBlockLabels = { copy: \"Copy code\", copied: \"Copied\", wrap: \"Wrap long lines\", code: \"Code\" }\n\nexport type CodeBlockProps = Omit<React.ComponentProps<\"div\">, \"children\"> & {\n  /** Source text. Tokenized with the built-in tokenizer unless `tokens` is passed. */\n  code: string\n  language?: CodeLanguage\n  /** Pre-tokenized lines from your own highlighter; each token's type picks the color. Overrides the built-in tokenizer. */\n  tokens?: CodeToken[][]\n  /** Shown as a tab in the header, e.g. \"lib/booking.ts\". */\n  fileName?: string\n  /** Replaces the language label next to the file tab. */\n  title?: string\n  showLineNumbers?: boolean\n  /** Number of the first line. */\n  startLine?: number\n  /** 1-based line numbers (counted from startLine) to highlight. */\n  highlightLines?: number[]\n  /** Controlled wrap state. */\n  wrap?: boolean\n  defaultWrap?: boolean\n  onWrapChange?: (wrap: boolean) => void\n  /** Show the wrap toggle. */\n  wrapToggle?: boolean\n  /** Show the copy button. */\n  copy?: boolean\n  onCopy?: (code: string) => void\n  /** Scroll inside the block beyond this height (px). */\n  maxHeight?: number\n  /** Entrance: lines fade up one after another, the whole block fades, or nothing. */\n  appear?: \"none\" | \"fade\" | \"lines\"\n  /** Text for built-in controls and screen readers; pass translations here. */\n  labels?: Partial<CodeBlockLabels>\n}\n\nasync function writeClipboard(text: string) {\n  try {\n    await navigator.clipboard.writeText(text)\n    return true\n  } catch {\n    const ta = document.createElement(\"textarea\")\n    ta.value = text\n    ta.setAttribute(\"readonly\", \"\")\n    ta.style.cssText = \"position:fixed;opacity:0;top:0;left:0\"\n    document.body.appendChild(ta)\n    ta.select()\n    let ok = false\n    try {\n      ok = document.execCommand(\"copy\")\n    } catch {}\n    ta.remove()\n    return ok\n  }\n}\n\n/** Syntax-colored code with line numbers, a file tab, copy and wrap controls. */\nexport function CodeBlock({\n  code,\n  language = \"text\",\n  tokens: tokensProp,\n  fileName,\n  title,\n  showLineNumbers = true,\n  startLine = 1,\n  highlightLines,\n  wrap: wrapProp,\n  defaultWrap = false,\n  onWrapChange,\n  wrapToggle = true,\n  copy = true,\n  onCopy,\n  maxHeight,\n  appear = \"none\",\n  labels,\n  className,\n  ...props\n}: CodeBlockProps) {\n  const l = useLabels(\"code-block\", DEFAULT_LABELS, labels)\n  const [wrapInner, setWrapInner] = React.useState(defaultWrap)\n  const wrap = wrapProp ?? wrapInner\n  const [copied, setCopied] = React.useState(false)\n  const lines = React.useMemo(() => tokensProp ?? tokenizeCode(code, language), [code, language, tokensProp])\n  const hl = React.useMemo(() => new Set(highlightLines ?? []), [highlightLines])\n  const digits = String(startLine + lines.length - 1).length\n\n  React.useEffect(() => {\n    if (!copied) return\n    const id = window.setTimeout(() => setCopied(false), 1600)\n    return () => window.clearTimeout(id)\n  }, [copied])\n\n  const doCopy = async () => {\n    if (await writeClipboard(code)) setCopied(true)\n    onCopy?.(code)\n  }\n  const toggleWrap = () => {\n    if (wrapProp === undefined) setWrapInner(!wrap)\n    onWrapChange?.(!wrap)\n  }\n  const langLabel = title ?? (language === \"text\" ? undefined : language)\n\n  return (\n    <div\n      className={cn(\"pc-code overflow-hidden rounded-xl border bg-card text-[13px] text-card-foreground\", className)}\n      data-wrap={wrap}\n      data-ln={showLineNumbers}\n      data-appear={appear === \"none\" ? undefined : appear}\n      style={{ [\"--pc-code-gutter\" as string]: `${digits + 2.5}ch` }}\n      {...props}\n    >\n      <GooduiTokens />\n      <style href=\"pc-code-block\" precedence=\"default\">\n        {CODE_CSS}\n      </style>\n      <div className=\"flex h-10 items-center gap-2 border-b bg-muted/40 ps-2 pe-1.5\">\n        {fileName ? (\n          <span className=\"inline-flex h-7 max-w-[60%] items-center gap-1.5 rounded-md border bg-background px-2 text-xs font-medium\">\n            <FileCode2 className=\"size-3.5 shrink-0 text-muted-foreground\" aria-hidden=\"true\" />\n            <span className=\"truncate\">{fileName}</span>\n          </span>\n        ) : (\n          <span className=\"ps-1 text-xs font-medium text-muted-foreground\">{langLabel ?? l.code}</span>\n        )}\n        {fileName && langLabel && <span className=\"text-xs text-muted-foreground\">{langLabel}</span>}\n        <span className=\"flex-1\" />\n        {wrapToggle && (\n          <button\n            type=\"button\"\n            aria-pressed={wrap}\n            aria-label={l.wrap}\n            title={l.wrap}\n            onClick={toggleWrap}\n            className=\"pc-press grid size-7 place-items-center rounded-md text-muted-foreground transition-colors outline-none hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 aria-pressed:bg-muted aria-pressed:text-foreground\"\n          >\n            <WrapText className=\"size-4\" aria-hidden=\"true\" />\n          </button>\n        )}\n        {copy && (\n          <button\n            type=\"button\"\n            aria-label={copied ? l.copied : l.copy}\n            title={l.copy}\n            onClick={doCopy}\n            className=\"pc-press relative grid size-7 place-items-center rounded-md text-muted-foreground transition-colors outline-none hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50\"\n          >\n            <Copy className={cn(\"size-4 transition-[opacity,transform] duration-200\", copied && \"scale-50 opacity-0\")} aria-hidden=\"true\" />\n            <Check className={cn(\"absolute size-4 text-emerald-600 transition-[opacity,transform] duration-200 dark:text-emerald-400\", copied ? \"scale-100 opacity-100\" : \"scale-50 opacity-0\")} aria-hidden=\"true\" />\n            <span className=\"sr-only\" aria-live=\"polite\">\n              {copied ? l.copied : \"\"}\n            </span>\n          </button>\n        )}\n      </div>\n      <div className=\"overflow-auto outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset\" style={{ maxHeight }} tabIndex={0} dir=\"ltr\">\n        <pre className=\"m-0 py-3 font-mono leading-6\">\n          <code className=\"block\">\n            {lines.map((tokens, i) => (\n              <span key={i} className=\"pc-code-line px-3\" data-hl={hl.has(startLine + i) ? \"\" : undefined} style={appear === \"lines\" ? { [\"--i\" as string]: Math.min(i, 24) } : undefined}>\n                {showLineNumbers && (\n                  <span className=\"pc-code-ln\" aria-hidden=\"true\">\n                    {startLine + i}\n                  </span>\n                )}\n                <span className=\"pc-code-text\">\n                  <CodeTokens tokens={tokens} />\n                </span>\n              </span>\n            ))}\n          </code>\n        </pre>\n      </div>\n    </div>\n  )\n}\n",
      "type": "registry:component",
      "target": "components/goodui/code-block.tsx"
    }
  ],
  "categories": [
    "components",
    "ai"
  ],
  "type": "registry:component"
}