{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "conversation-vue",
  "title": "Conversation (Vue)",
  "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/vue@0.1.0-beta.17"
  ],
  "registryDependencies": [
    "@kind-ui/agent-ui-setup"
  ],
  "files": [
    {
      "path": "packages/agent-ui/src/vue/conversation.ts",
      "content": "import { conversationPrimitive } from \"@kind-ui/agent-ui/core\";\nimport { createParts } from \"@ui-sdk/vue/primitive\";\nimport { defineComponent, h, type Slots, type VNodeChild } from \"vue\";\n\nconst conversation = 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\n/** Pass `:controller=\"createConversationController()\"` (from `@kind-ui/agent-ui/core`) to scroll it from outside. */\nexport const Conversation = conversation.Root;\nexport const ConversationViewport = conversation.Viewport;\n/**\n * With `virtualize`, render rows from its state, keyed by index so each measurement stays with its row:\n * `<ConversationContent v-slot=\"{ state }\"><ConversationRow v-for=\"row in state.rows\" :key=\"row.index\" :value=\"row.key\" :index=\"row.index\">…`.\n */\nexport const ConversationContent = conversation.Content;\nexport const ConversationRow = conversation.Row;\n/** Its text is the new-message count, written by the primitive; render it without children. */\nexport const ConversationJump = conversation.Jump;\nexport const ConversationEmpty = conversation.Empty;\nexport const ConversationEmptyTitle = conversation.EmptyTitle;\nexport const ConversationEmptyDescription = conversation.EmptyDescription;\n/** The error's status mark. Hidden from assistive technology: the words say it. */\nexport const ConversationErrorIcon = conversation.ErrorIcon;\n/**\n * One mark on the track, at `--kind-conversation-mark` (0 to 1) down it. `value` is its step. A Vue component renders\n * again only when its props change, so a host render that keeps the marks renders none of them.\n */\nexport const ConversationMark = conversation.Mark;\n\n// A part with default children, unless the host passes its own default slot.\nconst withDefault = <Part extends object>(\n  name: string,\n  part: Part,\n  children: (scope: { state: never }) => VNodeChild,\n): Part =>\n  defineComponent({\n    name,\n    inheritAttrs: false,\n    setup(_, { attrs, slots }) {\n      return () => h(part, attrs, { ...slots, default: slots.default ?? children } as Slots);\n    },\n  }) as unknown as Part;\n\n/** Three placeholder rows while `status` is `\"loading\"`, unless you pass children. Hidden from assistive technology. */\nexport const ConversationSkeleton = withDefault(\"ConversationSkeleton\", conversation.Skeleton, () => [\n  h(\"span\"),\n  h(\"span\"),\n  h(\"span\"),\n]);\n\n/** The visually hidden status read while `status` is `\"loading\"`: \"Loading conversation\", unless you pass children. */\nexport const ConversationLoading = withDefault(\n  \"ConversationLoading\",\n  conversation.Loading,\n  () => \"Loading conversation\",\n);\n\n/** The `error` option's words, unless you pass children. */\nexport const ConversationErrorText = withDefault(\n  \"ConversationErrorText\",\n  conversation.ErrorText,\n  ({ state }: { state: { error: string | undefined } }) => state.error,\n);\n\n/** Calls `onRetry`, shown only while it's set. \"Retry\", unless you pass children. */\nexport const ConversationRetry = withDefault(\"ConversationRetry\", conversation.Retry, () => \"Retry\");\n\n/** Shown while `status` is `\"error\"`: its mark, its words and Retry, unless you pass children. */\nexport const ConversationError = withDefault(\"ConversationError\", conversation.Error, () => [\n  h(ConversationErrorIcon),\n  h(ConversationErrorText),\n  h(ConversationRetry),\n]);\n\n/**\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 */\nexport const ConversationMarks = withDefault(\n  \"ConversationMarks\",\n  conversation.Marks,\n  ({ state }: { state: { marks: readonly number[] } }) =>\n    state.marks.map((step) => h(ConversationMark, { key: step, value: String(step) })),\n);\n",
      "type": "registry:ui",
      "target": "@ui/vue/conversation.ts"
    }
  ],
  "meta": {
    "layer": "vue"
  },
  "type": "registry:ui"
}
