{
  "$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/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n// Source: packages/compose-gen/specs/patterns/code-window.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/ui/box\"\n\t\"github.com/ui8kit/codegen/generated/templ/compose\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// CodeWindowProps are the props of CodeWindow; the values are the JSON shapes of the TypeScript props.\ntype CodeWindowProps struct {\n\tTitle any `json:\"title\"`\n\tPrompt any `json:\"prompt\"`\n\tLines any `json:\"lines\"`\n\tClass string `json:\"className\"`\n}\n\n// 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).\ntempl CodeWindow(p CodeWindowProps) {\n\t{{ vTitle := p.Title }}\n\t{{ vPrompt := p.Prompt }}\n\t{{ vLines := p.Lines }}\n\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(\"w-full overflow-hidden rounded bg-card text-left inset-ring inset-ring-border\", p.Class)), Attrs: uiutils.Attrs(\"role\", \"group\", \"aria-label\", vTitle, \"data-slot\", \"code-window\")}}) {\n\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"flex items-center border-b border-border px-4 py-2\"}}) {\n\t\t\t@compose.Text(compose.TextProps{Size: \"xs\", TextProps: text.TextProps{Class: \"text-muted-foreground\"}}) {\n\t\t\t\t{ uiutils.Text(vTitle) }\n\t\t\t}\n\t\t}\n\t\t@compose.List(compose.ListProps{BoxProps: box.BoxProps{Class: \"m-0 flex list-none flex-col gap-2 p-4 font-mono text-sm\"}}) {\n\t\t\tfor _, vLine := range uiutils.L(vLines) {\n\t\t\t\t@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(\"flex gap-2\", uiutils.Cond(uiutils.T(uiutils.Eq(uiutils.Get(vLine, \"kind\"), \"command\")), \"text-foreground\", \"text-muted-foreground\"))), Attrs: uiutils.Attrs(\"data-kind\", uiutils.Get(vLine, \"kind\"), \"data-slot\", \"code-line\")}}) {\n\t\t\t\t\tif uiutils.Eq(uiutils.Get(vLine, \"kind\"), \"command\") {\n\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"select-none text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t{ uiutils.Text(vPrompt) }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLine, \"text\")) }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",
      "path": "blocks/code-window.templ",
      "target": "blocks/code-window.templ"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "templ",
      "component"
    ]
  },
  "name": "code-window",
  "registryDependencies": [
    "box",
    "inline",
    "kit-box",
    "kit-text",
    "list",
    "list-item",
    "text",
    "utils"
  ],
  "runtime": "templ",
  "title": "Code Window",
  "type": "registry:component"
}
