{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "step-group-solid",
  "title": "Step Group (Solid)",
  "description": "One line that names a turn's work, with its status in words, over the host's own steps.",
  "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/step-group.tsx",
      "content": "import { codeSpans, stepGroupPrimitive } from \"@kind-ui/agent-ui/core\";\nimport type { ComponentProps, JSX } from \"@solidjs/web\";\nimport { createParts } from \"@ui-sdk/solid/primitive\";\nimport { For, omit } from \"solid-js\";\n\nconst parts = createParts(stepGroupPrimitive, {\n  root: \"div\",\n  trigger: \"button\",\n  icon: \"span\",\n  title: \"span\",\n  meta: \"span\",\n  content: \"div\",\n  children: \"div\",\n});\n\nexport type StepGroupProps = Omit<ComponentProps<typeof parts.Root>, \"children\"> & {\n  /** The steps, like a `StepList` of `Tool`s, `Terminal`s or `Subagent`s. */\n  children?: JSX.Element;\n};\n\n/**\n * One line that names a turn's work and opens to the host's own steps. Its `children` are the steps; to arrange\n * the parts yourself, use `StepGroupRoot`.\n */\nexport function StepGroup(props: StepGroupProps) {\n  return (\n    <parts.Root {...omit(props, \"children\")}>\n      <StepGroupTrigger>\n        <StepGroupIcon />\n        <StepGroupTitle />\n        <StepGroupMeta />\n      </StepGroupTrigger>\n      <StepGroupContent>\n        <StepGroupChildren>{props.children}</StepGroupChildren>\n      </StepGroupContent>\n    </parts.Root>\n  );\n}\n\n/** The bare root, for arranging the parts yourself. */\nexport const StepGroupRoot = parts.Root;\nexport const StepGroupTrigger = parts.Trigger;\nexport const StepGroupIcon = parts.Icon;\nexport const StepGroupContent = parts.Content;\nexport const StepGroupChildren = parts.Children;\n\n// Text with its backticks as `code`.\nfunction Code(props: { text: string }) {\n  return (\n    <For each={codeSpans(props.text)} keyed={false}>\n      {(piece, index) => (index % 2 ? <code>{piece()}</code> : <>{piece()}</>)}\n    </For>\n  );\n}\n\nexport type StepGroupTitleProps = ComponentProps<typeof parts.Title>;\n\n/** The work in words, with code as `code`, unless you pass children. */\nexport function StepGroupTitle(props: StepGroupTitleProps) {\n  return (\n    <parts.Title {...omit(props, \"children\")}>\n      {props.children ?? ((state: { title: string }) => <Code text={state.title} />)}\n    </parts.Title>\n  );\n}\n\nexport type StepGroupMetaProps = ComponentProps<typeof parts.Meta>;\n\n/** \"3 of 5\", \"1 waiting\", \"1 failed · 41 sec\" or the duration, unless you pass children. */\nexport function StepGroupMeta(props: StepGroupMetaProps) {\n  return (\n    <parts.Meta {...omit(props, \"children\")}>\n      {props.children ?? ((state: { meta: string }) => state.meta)}\n    </parts.Meta>\n  );\n}\n",
      "type": "registry:ui",
      "target": "@ui/solid/step-group.tsx"
    }
  ],
  "meta": {
    "layer": "solid"
  },
  "type": "registry:ui"
}
