{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Code Window component",
  "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\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"
    },
    {
      "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-->\n<script lang=\"ts\">\nimport type { CodeLine } from \"./code-window.types\";\n\nexport type CodeWindowProps = {\n  title: string;\n  prompt: string;\n  lines: CodeLine[];\n  class?: string;\n};\n</script>\n\n<script setup lang=\"ts\">\nimport Box from \"../compose/Box.vue\";\nimport Inline from \"../compose/Inline.vue\";\nimport List from \"../compose/List.vue\";\nimport ListItem from \"../compose/ListItem.vue\";\nimport Text from \"../compose/Text.vue\";\nimport { cn } from \"../utils\";\n\nconst { title, prompt, lines, class: className } = defineProps<CodeWindowProps>();\n</script>\n\n<template>\n  <Box\n    :class=\"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 class=\"flex items-center border-b border-border px-4 py-2\">\n      <Text size=\"xs\" class=\"text-muted-foreground\">\n        {{ title }}\n      </Text>\n    </Box>\n    <List class=\"m-0 flex list-none flex-col gap-2 p-4 font-mono text-sm\">\n      <ListItem v-for=\"line in lines\" :key=\"line.id\"\n        :class=\"cn('flex gap-2', ((line.kind === 'command') ? 'text-foreground' : 'text-muted-foreground'))\"\n        :data-kind=\"line.kind\"\n        data-slot=\"code-line\"\n      >\n        <Inline v-if=\"(line.kind === 'command')\" class=\"select-none text-muted-foreground\">\n          {{ prompt }}\n        </Inline>\n        <Inline>\n          {{ line.text }}\n        </Inline>\n      </ListItem>\n    </List>\n  </Box>\n</template>\n",
      "path": "components/code-window.vue",
      "target": "components/code-window.vue"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "vue",
      "component"
    ]
  },
  "name": "code-window",
  "registryDependencies": [
    "box",
    "inline",
    "list",
    "list-item",
    "text",
    "utils"
  ],
  "runtime": "vue",
  "title": "Code Window",
  "type": "registry:component"
}
