{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "reasoning-svelte",
  "title": "Reasoning (Svelte)",
  "description": "The model's thinking as a step, with its thoughts streamed as markdown.",
  "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",
    "@kind-ui/markdown-svelte"
  ],
  "files": [
    {
      "path": "packages/agent-ui/src/svelte/reasoning/Reasoning.svelte",
      "content": "<!--\n  The model's thinking as a step: \"Thinking\" while it runs, \"Thought for N s\" once done, and its `text` as streamed\n  markdown. Any `children` replace the default trigger and content.\n-->\n<script lang=\"ts\">\n  import type { ComponentProps } from \"svelte\";\n  import { parts } from \"./parts\";\n  import ReasoningContent from \"./ReasoningContent.svelte\";\n  import ReasoningTitle from \"./ReasoningTitle.svelte\";\n\n  let { children: content, open = $bindable(), ...props }: ComponentProps<typeof parts.Root> = $props();\n</script>\n\n<parts.Root {...props} bind:open\n  >{#snippet children(state)}{#if content}{@render content(state)}{:else}<parts.Trigger\n        ><parts.Icon\n        /><ReasoningTitle\n      /></parts.Trigger\n      ><ReasoningContent\n    />{/if}{/snippet}</parts.Root>\n",
      "type": "registry:ui",
      "target": "@ui/svelte/reasoning/Reasoning.svelte"
    },
    {
      "path": "packages/agent-ui/src/svelte/reasoning/ReasoningContent.svelte",
      "content": "<!-- The `text` as markdown, streaming while the step runs, unless you pass children. -->\n<script lang=\"ts\">\n  import type { ComponentProps } from \"svelte\";\n  import { Markdown } from \"../markdown/index\";\n  import { parts } from \"./parts\";\n\n  let { children: content, ...props }: ComponentProps<typeof parts.Content> = $props();\n</script>\n\n<parts.Content {...props}\n  >{#snippet children(state)}{#if content}{@render content(state)}{:else}<Markdown source={state.text} streaming={state.streaming}\n    />{/if}{/snippet}</parts.Content>\n",
      "type": "registry:ui",
      "target": "@ui/svelte/reasoning/ReasoningContent.svelte"
    },
    {
      "path": "packages/agent-ui/src/svelte/reasoning/ReasoningTitle.svelte",
      "content": "<!-- \"Thinking\", \"Thought for N s\" or the `label`, unless you pass children. -->\n<script lang=\"ts\">\n  import type { ComponentProps } from \"svelte\";\n  import { parts } from \"./parts\";\n\n  let { children: content, ...props }: ComponentProps<typeof parts.Title> = $props();\n</script>\n\n<parts.Title {...props}\n  >{#snippet children(state)}{#if content}{@render content(state)}{:else}{state.title}{/if}{/snippet}</parts.Title>\n",
      "type": "registry:ui",
      "target": "@ui/svelte/reasoning/ReasoningTitle.svelte"
    },
    {
      "path": "packages/agent-ui/src/svelte/reasoning/index.ts",
      "content": "import type { ComponentProps } from \"svelte\";\nimport { parts } from \"./parts\";\nimport Reasoning from \"./Reasoning.svelte\";\nimport ReasoningContent from \"./ReasoningContent.svelte\";\nimport ReasoningTitle from \"./ReasoningTitle.svelte\";\n\nexport { Reasoning, ReasoningContent, ReasoningTitle };\nexport const ReasoningTrigger = parts.Trigger;\nexport const ReasoningIcon = parts.Icon;\n\nexport type ReasoningProps = ComponentProps<typeof Reasoning>;\nexport type ReasoningTitleProps = ComponentProps<typeof ReasoningTitle>;\nexport type ReasoningContentProps = ComponentProps<typeof ReasoningContent>;\n",
      "type": "registry:ui",
      "target": "@ui/svelte/reasoning/index.ts"
    },
    {
      "path": "packages/agent-ui/src/svelte/reasoning/parts.ts",
      "content": "import { reasoningPrimitive } from \"@kind-ui/agent-ui/core\";\nimport { createParts } from \"@ui-sdk/svelte/primitive\";\n\nexport const parts = createParts(reasoningPrimitive, {\n  root: \"div\",\n  trigger: \"button\",\n  icon: \"span\",\n  title: \"span\",\n  content: \"div\",\n});\n",
      "type": "registry:ui",
      "target": "@ui/svelte/reasoning/parts.ts"
    }
  ],
  "meta": {
    "layer": "svelte"
  },
  "type": "registry:ui"
}
