{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "internal-command-svelte",
  "title": "Internal Command (Svelte)",
  "description": "Internal primitive used by Agent UI components; add a component instead.",
  "dependencies": [
    "@ui-sdk/core@0.1.0-beta.17",
    "@ui-sdk/svelte@0.1.0-beta.17"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "packages/agent-ui/src/svelte/internal/command/index.ts",
      "content": "import {\n  Command,\n  CommandEmpty,\n  CommandGroup,\n  CommandGroupLabel,\n  CommandInput,\n  CommandItem,\n  CommandItemIcon,\n  CommandItemText,\n  CommandList,\n  CommandPage,\n  CommandSeparator,\n  CommandShortcut,\n  CommandStatus,\n} from \"@ui-sdk/svelte/command\";\nimport { withKindClass } from \"../kind-class\";\n\nexport const KindCommand = withKindClass(\n  Command,\n  \"flex min-w-0 flex-col text-[length:var(--kind-text-md)]/5 text-[var(--kind-color-fg)]\",\n);\nexport const KindCommandInput = withKindClass(\n  CommandInput,\n  \"h-[var(--kind-command-input-height,2.25rem)] w-full min-w-0 border-b border-[var(--kind-color-border)] bg-transparent px-3 text-[length:var(--kind-text-md)]/5 text-[var(--kind-color-fg)] outline-hidden placeholder:text-[var(--kind-color-muted)]\",\n);\nexport const KindCommandList = withKindClass(\n  CommandList,\n  \"max-h-[var(--kind-command-list-max-height,18rem)] overflow-y-auto overscroll-contain p-1 outline-hidden\",\n);\nexport const KindCommandGroup = withKindClass(CommandGroup, \"py-0.5\");\nexport const KindCommandGroupLabel = withKindClass(\n  CommandGroupLabel,\n  \"px-2.5 pt-1.5 pb-1 text-[length:var(--kind-text-xs)]/4 font-medium text-[var(--kind-color-muted)]\",\n);\nexport const KindCommandItem = withKindClass(\n  CommandItem,\n  \"flex cursor-default select-none items-center gap-2 rounded-[var(--kind-radius-md)] px-2.5 py-[var(--kind-command-item-padding-block,0.375rem)] outline-hidden data-highlighted:bg-[var(--kind-color-selected)] data-disabled:cursor-not-allowed data-disabled:opacity-[var(--kind-command-item-disabled-opacity,var(--kind-disabled-opacity))] data-pending:cursor-wait\",\n);\nexport const KindCommandItemIcon = withKindClass(\n  CommandItemIcon,\n  \"inline-flex size-4 shrink-0 items-center justify-center text-[var(--kind-command-icon-color,var(--kind-color-muted))] [&_svg]:size-4\",\n);\nexport const KindCommandItemText = withKindClass(\n  CommandItemText,\n  \"min-w-0 truncate [&_mark]:bg-transparent [&_mark]:[font-weight:var(--kind-command-mark-weight,500)] [&_mark]:text-[var(--kind-command-mark-color,var(--kind-color-fg))]\",\n);\nexport const KindCommandShortcut = withKindClass(\n  CommandShortcut,\n  \"ms-auto text-[length:var(--kind-text-xs)]/4 tracking-widest text-[var(--kind-color-muted)]\",\n);\nexport const KindCommandSeparator = withKindClass(\n  CommandSeparator,\n  \"mx-2.5 my-1 h-px bg-[var(--kind-color-border)]\",\n);\nexport const KindCommandEmpty = withKindClass(\n  CommandEmpty,\n  \"px-2 text-center text-[length:var(--kind-text-md)]/5 text-[var(--kind-color-muted)] data-empty:py-6\",\n);\nexport const KindCommandStatus = withKindClass(\n  CommandStatus,\n  \"px-2 text-center text-[length:var(--kind-text-md)]/5 text-[var(--kind-color-muted)] not-empty:py-6\",\n);\nexport const KindCommandPage = CommandPage;\n",
      "type": "registry:ui",
      "target": "@ui/svelte/internal/command/index.ts"
    },
    {
      "path": "packages/agent-ui/src/svelte/internal/kind-class.ts",
      "content": "import type { Component } from \"svelte\";\nimport type { ClassValue } from \"svelte/elements\";\n\n// Class values a Kind part already merged. A part hands its props to its `render` snippet, so a Kind part rendered\n// there (`{#snippet render({ props })}<KindMenuTrigger {...props} />{/snippet}`) keeps them rather than adding its\n// own base classes: the element gets the outer part's base classes once, as React's `withKindClass` does.\nconst merged = new WeakSet<object>();\n\n// A caller may wrap the handed-over value (`class={[props.class, \"extra\"]}`), so a mark at any depth counts.\nconst isMerged = (value: unknown): boolean =>\n  Array.isArray(value) && (merged.has(value) || value.some(isMerged));\n\nfunction kindClass(base: string, value: unknown): ClassValue {\n  const result = isMerged(value) ? [value as ClassValue] : value ? [base, value as ClassValue] : [base];\n  merged.add(result);\n  return result;\n}\n\n/**\n * A UI SDK part with Kind's base classes before the caller's `class`. Every other prop, bindings and snippets\n * included, passes through as the caller wrote it.\n */\nexport function withKindClass<C extends Component<never>>(component: C, base: string): C {\n  const inner = component as unknown as (internals: unknown, props: object) => unknown;\n  const Kind = (internals: unknown, props: Record<PropertyKey, unknown>) =>\n    inner(\n      internals,\n      new Proxy(props, {\n        get: (target, key) => (key === \"class\" ? kindClass(base, target.class) : Reflect.get(target, key)),\n        has: (target, key) => key === \"class\" || Reflect.has(target, key),\n        ownKeys: (target) => {\n          const keys = Reflect.ownKeys(target);\n          return keys.includes(\"class\") ? keys : [...keys, \"class\"];\n        },\n        getOwnPropertyDescriptor: (target, key) =>\n          key === \"class\"\n            ? { enumerable: true, configurable: true, value: kindClass(base, target.class) }\n            : Reflect.getOwnPropertyDescriptor(target, key),\n      }),\n    );\n  return Kind as unknown as C;\n}\n",
      "type": "registry:ui",
      "target": "@ui/svelte/internal/kind-class.ts"
    }
  ],
  "meta": {
    "layer": "svelte",
    "hidden": true
  },
  "categories": [
    "internal"
  ],
  "type": "registry:ui"
}
