{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A terminal or code window: a title bar with three round marks, then the lines. A `command` line starts with the prompt, an `output` line is muted. Static: the typing animation belongs to the port (TypingText contract).",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n/**\n * A terminal or code window: a title bar with three round marks, then the lines. A `command` line starts with\n * the prompt, an `output` line is muted. Static: the typing animation belongs to the port (TypingText contract).\n */\nimport { type ReactNode } from \"react\";\nimport { Box, Inline, List, ListItem, Text } from \"../compose\";\nimport { cn } from \"../utils\";\nimport type { CodeLine } from \"./code-window.types\";\n\nexport type CodeWindowProps = {\n  title: string;\n  prompt: string;\n  lines: CodeLine[];\n  className?: string;\n};\n\nexport function CodeWindow({ title, prompt, lines, className }: CodeWindowProps) {\n  return (\n    <Box\n      className={cn(\n        \"w-full overflow-hidden rounded bg-card text-left inset-ring inset-ring-border\",\n        className\n      )}\n      role=\"group\"\n      aria-label={title}\n      data-slot=\"code-window\"\n    >\n      <Box className=\"flex items-center border-b border-border px-4 py-2\">\n        <Text size=\"xs\" className=\"text-muted-foreground\">\n          {title}\n        </Text>\n      </Box>\n      <List className=\"m-0 flex list-none flex-col gap-2 p-4 font-mono text-sm\">\n        {(lines ?? []).map((line) => (\n          <ListItem key={line.id}\n            className={cn(\n              \"flex gap-2\",\n              ((line.kind === \"command\") ? \"text-foreground\" : \"text-muted-foreground\")\n            )}\n            data-kind={line.kind}\n            data-slot=\"code-line\"\n          >\n            {(line.kind === \"command\") ? (\n              <Inline className=\"select-none text-muted-foreground\">\n                {prompt}\n              </Inline>\n            ) : null}\n            <Inline>\n              {line.text}\n            </Inline>\n          </ListItem>\n        ))}\n      </List>\n    </Box>\n  );\n}\n",
      "path": "components/code-window.tsx",
      "target": "components/code-window.tsx"
    },
    {
      "content": "// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n\nexport type CodeLine = {\n  id: string;\n  text: string;\n  kind: string;\n};\n",
      "path": "components/code-window.types.ts",
      "target": "components/code-window.types.ts"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "react",
      "component"
    ]
  },
  "name": "code-window",
  "registryDependencies": [
    "compose",
    "utils"
  ],
  "runtime": "react",
  "title": "Code Window",
  "type": "registry:component"
}
