{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "connection-status-solid",
  "title": "Connection Status (Solid)",
  "description": "A pill over a conversation that says the connection dropped, counts down and retries.",
  "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/connection-status.tsx",
      "content": "import { connectionStatusPrimitive } from \"@kind-ui/agent-ui/core\";\nimport type { ComponentProps } from \"@solidjs/web\";\nimport { createParts } from \"@ui-sdk/solid/primitive\";\nimport { omit } from \"solid-js\";\n\nconst parts = createParts(connectionStatusPrimitive, {\n  root: \"div\",\n  mark: \"span\",\n  text: \"span\",\n  retry: \"button\",\n});\n\nexport type ConnectionStatusProps = Omit<ComponentProps<typeof parts.Root>, \"children\">;\n\n/**\n * The connection as a pill over the top of a conversation: its mark, its words and Retry while `onRetry` is set.\n * Put it inside the Conversation, beside the viewport. To arrange the parts yourself, use `ConnectionStatusRoot`.\n */\nexport function ConnectionStatus(props: ConnectionStatusProps) {\n  return (\n    <parts.Root {...props}>\n      <ConnectionStatusMark />\n      <ConnectionStatusText />\n      <ConnectionStatusRetry />\n    </parts.Root>\n  );\n}\n\n/** The bare root, for arranging the parts yourself. */\nexport const ConnectionStatusRoot = parts.Root;\nexport const ConnectionStatusMark = parts.Mark;\n\nexport type ConnectionStatusTextProps = ComponentProps<typeof parts.Text>;\n\n/** The state's words, or the countdown while reconnecting, unless you pass children. */\nexport function ConnectionStatusText(props: ConnectionStatusTextProps) {\n  return (\n    <parts.Text {...omit(props, \"children\")}>\n      {props.children ?? ((state: { text: string }) => state.text)}\n    </parts.Text>\n  );\n}\n\nexport type ConnectionStatusRetryProps = ComponentProps<typeof parts.Retry>;\n\n/** \"Retry\", unless you pass children. Rendered only with `onRetry`. */\nexport function ConnectionStatusRetry(props: ConnectionStatusRetryProps) {\n  return (\n    <parts.Retry {...omit(props, \"children\")}>\n      {props.children ?? ((state: { label: string }) => state.label)}\n    </parts.Retry>\n  );\n}\n",
      "type": "registry:ui",
      "target": "@ui/solid/connection-status.tsx"
    }
  ],
  "meta": {
    "layer": "solid"
  },
  "type": "registry:ui"
}
