{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "internal-alert-dialog-svelte",
  "title": "Internal Alert Dialog (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/alert-dialog/index.ts",
      "content": "import {\n  AlertDialog,\n  AlertDialogBackdrop,\n  AlertDialogContent,\n  AlertDialogDescription,\n  AlertDialogTitle,\n  AlertDialogTrigger,\n} from \"@ui-sdk/svelte/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);\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);\nexport const KindAlertDialogTitle = withKindClass(\n  AlertDialogTitle,\n  \"m-0 text-[length:var(--kind-text-xl)] font-semibold leading-6\",\n);\nexport const KindAlertDialogDescription = withKindClass(\n  AlertDialogDescription,\n  \"m-0 text-[var(--kind-color-muted)]\",\n);\n",
      "type": "registry:ui",
      "target": "@ui/svelte/internal/alert-dialog/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"
}
