{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Timeline 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 vertical list of events (an order's history): a dot on a line, the title, an optional text and the time.\n  Newest first or oldest first is the caller's order.\n-->\n<script lang=\"ts\" module>\n  import type { Snippet } from \"svelte\";\n  import type { TimelineItem } from \"./timeline.types\";\n\n  export type TimelineProps = {\n    items: TimelineItem[];\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 { at, cn } from \"../utils\";\n\n  const TONE_DOT: Record<string, string> = {\n    \"gray\": \"bg-muted-foreground\",\n    \"green\": \"bg-emerald-500\",\n    \"blue\": \"bg-blue-500\",\n    \"amber\": \"bg-amber-500\",\n    \"red\": \"bg-red-500\",\n  };\n  let { items, class: className }: TimelineProps = $props();\n</script>\n\n<Box class={cn(\"min-w-0\", className)} data-slot=\"timeline\">\n  <List class=\"m-0 flex list-none flex-col p-0\">\n    {#each items as item, i (item.id)}\n      <ListItem class=\"relative flex min-w-0 gap-4 pb-4 last:pb-0\" data-event={item.id} data-slot=\"timeline-item\">\n        <Box class=\"relative flex w-2 shrink-0 justify-center\">\n          {#if (i < ((items?.length ?? 0) - 1))}\n            <Inline class=\"absolute top-4 -bottom-0 w-px bg-border\" />\n          {/if}\n          <Inline class={cn(\"mt-2 size-2 rounded-full\", at(TONE_DOT, (item.tone ?? \"gray\")))} />\n        </Box>\n        <Box class=\"flex min-w-0 flex-1 flex-col gap-0\">\n          <Box class=\"flex flex-wrap items-baseline justify-between gap-x-4\">\n            <Text class=\"m-0 text-sm font-bold text-foreground\">\n              {item.title}\n            </Text>\n            <Text class=\"m-0 shrink-0 text-xs font-medium text-muted-foreground\">\n              {item.time}\n            </Text>\n          </Box>\n          {#if item.text}\n            <Text class=\"m-0 text-xs font-medium text-muted-foreground\">\n              {item.text}\n            </Text>\n          {/if}\n        </Box>\n      </ListItem>\n    {/each}\n  </List>\n</Box>\n",
      "path": "components/timeline.svelte",
      "target": "components/timeline.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 TimelineItem = {\n  id: string;\n  title: string;\n  text?: string;\n  time: string;\n  tone?: string;\n};\n",
      "path": "components/timeline.types.ts",
      "target": "components/timeline.types.ts"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "svelte",
      "component"
    ]
  },
  "name": "timeline",
  "registryDependencies": [
    "box",
    "inline",
    "list",
    "list-item",
    "text",
    "utils"
  ],
  "runtime": "svelte",
  "title": "Timeline",
  "type": "registry:component"
}
