{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "conversation-svelte",
  "title": "Conversation (Svelte)",
  "description": "A message log that follows new content and offers a jump to the latest.",
  "dependencies": [
    "@kind-ui/agent-ui@0.9.0",
    "@ui-sdk/core@0.1.0-beta.17",
    "@ui-sdk/svelte@0.1.0-beta.17"
  ],
  "registryDependencies": [
    "@kind-ui/agent-ui-setup"
  ],
  "files": [
    {
      "path": "packages/agent-ui/src/svelte/conversation/ConversationError.svelte",
      "content": "<!-- Shown while `status` is `\"error\"`: its mark, its words and Retry, unless you pass children. -->\n<script lang=\"ts\">\n  import type { ComponentProps } from \"svelte\";\n  import ConversationErrorText from \"./ConversationErrorText.svelte\";\n  import ConversationRetry from \"./ConversationRetry.svelte\";\n  import { parts } from \"./parts\";\n\n  let { children, ...props }: ComponentProps<typeof parts.Error> = $props();\n</script>\n\n{#snippet content()}\n  <parts.ErrorIcon\n  /><ConversationErrorText\n  /><ConversationRetry />\n{/snippet}\n\n<parts.Error {...props} children={children ?? content} />\n",
      "type": "registry:ui",
      "target": "@ui/svelte/conversation/ConversationError.svelte"
    },
    {
      "path": "packages/agent-ui/src/svelte/conversation/ConversationErrorText.svelte",
      "content": "<!-- The `error` option's words, unless you pass children. -->\n<script lang=\"ts\">\n  import type { ComponentProps } from \"svelte\";\n  import { parts } from \"./parts\";\n\n  let { children, ...props }: ComponentProps<typeof parts.ErrorText> = $props();\n</script>\n\n{#snippet text({ error }: { error: string })}{error}{/snippet}\n\n<parts.ErrorText {...props} children={children ?? text} />\n",
      "type": "registry:ui",
      "target": "@ui/svelte/conversation/ConversationErrorText.svelte"
    },
    {
      "path": "packages/agent-ui/src/svelte/conversation/ConversationLoading.svelte",
      "content": "<!-- The visually hidden status read while `status` is `\"loading\"`: \"Loading conversation\", unless you pass children. -->\n<script lang=\"ts\">\n  import type { ComponentProps } from \"svelte\";\n  import { parts } from \"./parts\";\n\n  let { children, ...props }: ComponentProps<typeof parts.Loading> = $props();\n</script>\n\n{#snippet text()}Loading conversation{/snippet}\n\n<parts.Loading {...props} children={children ?? text} />\n",
      "type": "registry:ui",
      "target": "@ui/svelte/conversation/ConversationLoading.svelte"
    },
    {
      "path": "packages/agent-ui/src/svelte/conversation/ConversationMarks.svelte",
      "content": "<!--\n  The track beside the scrollbar that shows each message in `marks`, one `ConversationMark` per 4px step that holds\n  one, unless you pass children. Hidden from assistive technology.\n-->\n<script lang=\"ts\">\n  import type { ComponentProps } from \"svelte\";\n  import { parts } from \"./parts\";\n\n  let { children, ...props }: ComponentProps<typeof parts.Marks> = $props();\n</script>\n\n{#snippet steps({ marks }: { marks: readonly number[] })}\n  {#each marks as step (step)}<parts.Mark value={String(step)} />{/each}\n{/snippet}\n\n<parts.Marks {...props} children={children ?? steps} />\n",
      "type": "registry:ui",
      "target": "@ui/svelte/conversation/ConversationMarks.svelte"
    },
    {
      "path": "packages/agent-ui/src/svelte/conversation/ConversationRetry.svelte",
      "content": "<!-- Calls `onRetry`, shown only while it's set. \"Retry\", unless you pass children. -->\n<script lang=\"ts\">\n  import type { ComponentProps } from \"svelte\";\n  import { parts } from \"./parts\";\n\n  let { children, ...props }: ComponentProps<typeof parts.Retry> = $props();\n</script>\n\n{#snippet text()}Retry{/snippet}\n\n<parts.Retry {...props} children={children ?? text} />\n",
      "type": "registry:ui",
      "target": "@ui/svelte/conversation/ConversationRetry.svelte"
    },
    {
      "path": "packages/agent-ui/src/svelte/conversation/ConversationSkeleton.svelte",
      "content": "<!-- Three placeholder rows while `status` is `\"loading\"`, unless you pass children. Hidden from assistive technology. -->\n<script lang=\"ts\">\n  import type { ComponentProps } from \"svelte\";\n  import { parts } from \"./parts\";\n\n  let { children, ...props }: ComponentProps<typeof parts.Skeleton> = $props();\n</script>\n\n{#snippet rows()}<span></span><span></span><span></span>{/snippet}\n\n<parts.Skeleton {...props} children={children ?? rows} />\n",
      "type": "registry:ui",
      "target": "@ui/svelte/conversation/ConversationSkeleton.svelte"
    },
    {
      "path": "packages/agent-ui/src/svelte/conversation/index.ts",
      "content": "import type { ComponentProps } from \"svelte\";\nimport ConversationError from \"./ConversationError.svelte\";\nimport ConversationErrorText from \"./ConversationErrorText.svelte\";\nimport ConversationLoading from \"./ConversationLoading.svelte\";\nimport ConversationMarks from \"./ConversationMarks.svelte\";\nimport ConversationRetry from \"./ConversationRetry.svelte\";\nimport ConversationSkeleton from \"./ConversationSkeleton.svelte\";\nimport { parts } from \"./parts\";\n\n/** Pass `controller={createConversationController()}` (from `@kind-ui/agent-ui/core`) to scroll it from outside. */\nexport const Conversation = parts.Root;\nexport const ConversationViewport = parts.Viewport;\n/**\n * With `virtualize`, render rows from its state, keyed by index so each measurement stays with its row:\n * `{#snippet children({ rows })}{#each rows as row (row.index)}<ConversationRow value={…} index={row.index}>…{/each}{/snippet}`.\n */\nexport const ConversationContent = parts.Content;\nexport const ConversationRow = parts.Row;\n/** Its text is the new-message count, written by the primitive; render it without children. */\nexport const ConversationJump = parts.Jump;\nexport const ConversationEmpty = parts.Empty;\nexport const ConversationEmptyTitle = parts.EmptyTitle;\nexport const ConversationEmptyDescription = parts.EmptyDescription;\n/** The error's status mark. Hidden from assistive technology: the words say it. */\nexport const ConversationErrorIcon = parts.ErrorIcon;\n/** One mark on the track, at `--kind-conversation-mark` (0 to 1) down it. `value` is its step. */\nexport const ConversationMark = parts.Mark;\n\nexport {\n  ConversationError,\n  ConversationErrorText,\n  ConversationLoading,\n  ConversationMarks,\n  ConversationRetry,\n  ConversationSkeleton,\n};\nexport type ConversationSkeletonProps = ComponentProps<typeof ConversationSkeleton>;\nexport type ConversationLoadingProps = ComponentProps<typeof ConversationLoading>;\nexport type ConversationErrorProps = ComponentProps<typeof ConversationError>;\nexport type ConversationErrorTextProps = ComponentProps<typeof ConversationErrorText>;\nexport type ConversationRetryProps = ComponentProps<typeof ConversationRetry>;\nexport type ConversationMarksProps = ComponentProps<typeof ConversationMarks>;\n",
      "type": "registry:ui",
      "target": "@ui/svelte/conversation/index.ts"
    },
    {
      "path": "packages/agent-ui/src/svelte/conversation/parts.ts",
      "content": "import { conversationPrimitive } from \"@kind-ui/agent-ui/core\";\nimport { createParts } from \"@ui-sdk/svelte/primitive\";\n\nexport const parts = createParts(conversationPrimitive, {\n  root: \"div\",\n  viewport: \"div\",\n  content: \"div\",\n  row: \"div\",\n  jump: \"button\",\n  empty: \"div\",\n  \"empty-title\": \"div\",\n  \"empty-description\": \"div\",\n  skeleton: \"div\",\n  loading: \"div\",\n  error: \"div\",\n  \"error-icon\": \"span\",\n  \"error-text\": \"div\",\n  retry: \"button\",\n  marks: \"div\",\n  mark: \"span\",\n});\n",
      "type": "registry:ui",
      "target": "@ui/svelte/conversation/parts.ts"
    }
  ],
  "meta": {
    "layer": "svelte"
  },
  "type": "registry:ui"
}
