{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "conversation-solid",
  "title": "Conversation (Solid)",
  "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/solid@0.1.0-beta.17"
  ],
  "registryDependencies": [
    "@kind-ui/agent-ui-setup"
  ],
  "files": [
    {
      "path": "packages/agent-ui/src/solid/conversation.tsx",
      "content": "import { conversationPrimitive } from \"@kind-ui/agent-ui/core\";\nimport type { ComponentProps } from \"@solidjs/web\";\nimport { createParts } from \"@ui-sdk/solid/primitive\";\nimport { For, omit } from \"solid-js\";\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 * `{(state) => <For each={state.rows} keyed={(row) => row.index}>{(row) => <ConversationRow value={row().key} index={row().index}>…</ConversationRow>}</For>}`.\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\nexport type ConversationSkeletonProps = ComponentProps<typeof conversation.Skeleton>;\n\n/** Three placeholder rows while `status` is `\"loading\"`, unless you pass children. Hidden from assistive technology. */\nexport function ConversationSkeleton(props: ConversationSkeletonProps) {\n  return (\n    <conversation.Skeleton {...omit(props, \"children\")}>\n      {props.children ?? (\n        <>\n          <span />\n          <span />\n          <span />\n        </>\n      )}\n    </conversation.Skeleton>\n  );\n}\n\nexport type ConversationLoadingProps = ComponentProps<typeof conversation.Loading>;\n\n/** The visually hidden status read while `status` is `\"loading\"`: \"Loading conversation\", unless you pass children. */\nexport function ConversationLoading(props: ConversationLoadingProps) {\n  return (\n    <conversation.Loading {...omit(props, \"children\")}>\n      {props.children ?? \"Loading conversation\"}\n    </conversation.Loading>\n  );\n}\n\nexport type ConversationErrorProps = ComponentProps<typeof conversation.Error>;\n\n/** Shown while `status` is `\"error\"`: its mark, its words and Retry, unless you pass children. */\nexport function ConversationError(props: ConversationErrorProps) {\n  return (\n    <conversation.Error {...omit(props, \"children\")}>\n      {props.children ?? (\n        <>\n          <ConversationErrorIcon />\n          <ConversationErrorText />\n          <ConversationRetry />\n        </>\n      )}\n    </conversation.Error>\n  );\n}\n\n/** The error's status mark. Hidden from assistive technology: the words say it. */\nexport const ConversationErrorIcon = conversation.ErrorIcon;\n\nexport type ConversationErrorTextProps = ComponentProps<typeof conversation.ErrorText>;\n\n/** The `error` option's words, unless you pass children. */\nexport function ConversationErrorText(props: ConversationErrorTextProps) {\n  return (\n    <conversation.ErrorText {...omit(props, \"children\")}>\n      {props.children ?? ((state) => state.error)}\n    </conversation.ErrorText>\n  );\n}\n\nexport type ConversationRetryProps = ComponentProps<typeof conversation.Retry>;\n\n/** Calls `onRetry`, shown only while it's set. \"Retry\", unless you pass children. */\nexport function ConversationRetry(props: ConversationRetryProps) {\n  return <conversation.Retry {...omit(props, \"children\")}>{props.children ?? \"Retry\"}</conversation.Retry>;\n}\n\nexport type ConversationMarksProps = ComponentProps<typeof conversation.Marks>;\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 function ConversationMarks(props: ConversationMarksProps) {\n  return (\n    <conversation.Marks {...omit(props, \"children\")}>\n      {props.children ??\n        ((state) => <For each={state.marks}>{(step) => <ConversationMark value={String(step)} />}</For>)}\n    </conversation.Marks>\n  );\n}\n\n/** One mark on the track, at `--kind-conversation-mark` (0 to 1) down it. `value` is its step. */\nexport const ConversationMark = conversation.Mark;\n",
      "type": "registry:ui",
      "target": "@ui/solid/conversation.tsx"
    }
  ],
  "meta": {
    "layer": "solid"
  },
  "type": "registry:ui"
}
