{
  "$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<!--\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\" module>\n  import type { Snippet } from \"svelte\";\n  import type { CodeLine } from \"./code-window.types\";\n\n  export type CodeWindowProps = {\n    title: string;\n    prompt: string;\n    lines: CodeLine[];\n    class?: string;\n  };\n</script>\n\n<script lang=\"ts\">\n  import Box from \"../compose/Box.svelte\";\n  import Inline from \"../compose/Inline.svelte\";\n  import List from \"../compose/List.svelte\";\n  import ListItem from \"../compose/ListItem.svelte\";\n  import Text from \"../compose/Text.svelte\";\n  import { cn } from \"../utils\";\n\n  let { title, prompt, lines, class: className }: CodeWindowProps = $props();\n</script>\n\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    {#each lines as line (line.id)}\n      <ListItem\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        {#if (line.kind === \"command\")}\n          <Inline class=\"select-none text-muted-foreground\">\n            {prompt}\n          </Inline>\n        {/if}\n        <Inline>\n          {line.text}\n        </Inline>\n      </ListItem>\n    {/each}\n  </List>\n</Box>\n",
      "path": "components/code-window.svelte",
      "target": "components/code-window.svelte"
    },
    {
      "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": [
      "svelte",
      "component"
    ]
  },
  "name": "code-window",
  "registryDependencies": [
    "box",
    "inline",
    "list",
    "list-item",
    "text",
    "utils"
  ],
  "runtime": "svelte",
  "title": "Code Window",
  "type": "registry:component"
}
