{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "internal-alert-dialog-vue",
  "title": "Internal Alert Dialog (Vue)",
  "description": "Internal primitive used by Agent UI components; add a component instead.",
  "dependencies": [
    "@ui-sdk/core@0.1.0-beta.17",
    "@ui-sdk/vue@0.1.0-beta.17"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "packages/agent-ui/src/vue/internal/alert-dialog.ts",
      "content": "import {\n  AlertDialog,\n  AlertDialogBackdrop,\n  AlertDialogContent,\n  AlertDialogDescription,\n  AlertDialogTitle,\n  AlertDialogTrigger,\n} from \"@ui-sdk/vue/alert-dialog\";\nimport { withKindClass } from \"./kind-class\";\n\nexport const KindAlertDialog = AlertDialog;\nexport const KindAlertDialogTrigger = AlertDialogTrigger;\nexport const KindAlertDialogBackdrop = withKindClass(\n  AlertDialogBackdrop,\n  \"fixed inset-0 z-50 bg-[var(--kind-color-scrim)] backdrop-blur-[var(--kind-scrim-blur)]\",\n  \"KindAlertDialogBackdrop\",\n);\nexport const KindAlertDialogContent = withKindClass(\n  AlertDialogContent,\n  \"fixed inset-0 z-50 m-[var(--kind-alert-dialog-margin,auto)] flex h-fit max-h-[calc(100dvh-2rem)] w-[var(--kind-alert-dialog-width,min(26rem,calc(100%-2rem)))] flex-col gap-2 overflow-y-auto rounded-[var(--kind-alert-dialog-radius,var(--kind-dialog-radius))] bg-[var(--kind-color-raised)] p-6 text-[length:var(--kind-text-md)]/5 text-[var(--kind-color-fg)] shadow-[var(--kind-shadow-dialog)] outline-hidden\",\n  \"KindAlertDialogContent\",\n);\nexport const KindAlertDialogTitle = withKindClass(\n  AlertDialogTitle,\n  \"m-0 text-[length:var(--kind-text-xl)] font-semibold leading-6\",\n  \"KindAlertDialogTitle\",\n);\nexport const KindAlertDialogDescription = withKindClass(\n  AlertDialogDescription,\n  \"m-0 text-[var(--kind-color-muted)]\",\n  \"KindAlertDialogDescription\",\n);\n",
      "type": "registry:ui",
      "target": "@ui/vue/internal/alert-dialog.ts"
    },
    {
      "path": "packages/agent-ui/src/vue/internal/kind-class.ts",
      "content": "import {\n  type Component,\n  cloneVNode,\n  defineComponent,\n  Fragment,\n  h,\n  isVNode,\n  type Slots,\n  type VNode,\n} from \"vue\";\n\ntype RenderSlot = (scope: Record<string, unknown>) => VNode[];\n\nconst bareParts = new WeakMap<object, Component>();\n\n// A Kind part rendered as another (`<KindToolbarButton>` whose `#render` slot holds a `<KindMenuTrigger>`) renders\n// the target's bare UI SDK part, so the element gets the outer base classes once instead of both lists.\nfunction bareNodes(nodes: VNode[]): VNode[] {\n  return nodes.map((node) => {\n    if (!isVNode(node)) return node;\n    if (node.type === Fragment && Array.isArray(node.children))\n      return h(Fragment, { key: node.key ?? undefined }, bareNodes(node.children as VNode[]));\n    const bare = bareParts.get(node.type as object);\n    if (!bare) return node;\n    // A clone keeps the node's directives (`v-show`), transition, key and ref.\n    const clone = cloneVNode(node);\n    clone.type = bare;\n    clone.children = bareSlots(node.children as Slots | null);\n    return clone;\n  });\n}\n\nfunction bareSlots(slots: Slots | null): Slots | null {\n  const render = slots?.render as RenderSlot | undefined;\n  if (!render) return slots;\n  return { ...slots, render: (scope: Record<string, unknown>) => bareNodes(render(scope)) };\n}\n\n/**\n * Passes a UI SDK part through with Kind's classes before the caller's `class`. Vue binds `class` as a string, an\n * array or an object, never a function of the part's state: style state through `data-*` attributes.\n */\nexport function withKindClass<C extends Component>(component: C, base: string, name: string): C {\n  const Kind = defineComponent({\n    name,\n    inheritAttrs: false,\n    setup(_, { attrs, slots }) {\n      return () => h(component, { ...attrs, class: [base, attrs.class] }, bareSlots(slots) ?? undefined);\n    },\n  });\n  bareParts.set(Kind, component);\n  return Kind as unknown as C;\n}\n",
      "type": "registry:ui",
      "target": "@ui/vue/internal/kind-class.ts"
    }
  ],
  "meta": {
    "layer": "vue",
    "hidden": true
  },
  "categories": [
    "internal"
  ],
  "type": "registry:ui"
}
