@wow-two-beta/fe 0.0.29 → 0.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/README.md +11 -0
  2. package/dist/chunks/{AccountMenu.vue_vue_type_script_setup_true_lang-CWsiHHiy.js → AccountMenu.vue_vue_type_script_setup_true_lang-CG03MviN.js} +91 -26
  3. package/dist/chunks/AccountMenu.vue_vue_type_script_setup_true_lang-CG03MviN.js.map +1 -0
  4. package/dist/chunks/{Avatar.vue_vue_type_script_setup_true_lang-BIoaOjCh.js → Avatar.vue_vue_type_script_setup_true_lang-BHnzqtQH.js} +2 -2
  5. package/dist/chunks/{Avatar.vue_vue_type_script_setup_true_lang-BIoaOjCh.js.map → Avatar.vue_vue_type_script_setup_true_lang-BHnzqtQH.js.map} +1 -1
  6. package/dist/chunks/{BackToTopButton.vue_vue_type_script_setup_true_lang-6tfkqsrZ.js → BackToTopButton.vue_vue_type_script_setup_true_lang-dmN5MH2T.js} +2 -2
  7. package/dist/chunks/{BackToTopButton.vue_vue_type_script_setup_true_lang-6tfkqsrZ.js.map → BackToTopButton.vue_vue_type_script_setup_true_lang-dmN5MH2T.js.map} +1 -1
  8. package/dist/chunks/{Button.vue_vue_type_script_setup_true_lang-Cw0QS_Mm.js → Button.vue_vue_type_script_setup_true_lang-CAbPBMuc.js} +2 -2
  9. package/dist/chunks/{Button.vue_vue_type_script_setup_true_lang-Cw0QS_Mm.js.map → Button.vue_vue_type_script_setup_true_lang-CAbPBMuc.js.map} +1 -1
  10. package/dist/chunks/{DrawerContent.vue_vue_type_script_setup_true_lang-BA-au7LC.js → DrawerContent.vue_vue_type_script_setup_true_lang-ClhduLMN.js} +2 -2
  11. package/dist/chunks/{DrawerContent.vue_vue_type_script_setup_true_lang-BA-au7LC.js.map → DrawerContent.vue_vue_type_script_setup_true_lang-ClhduLMN.js.map} +1 -1
  12. package/dist/chunks/{ErrorBoundary.vue_vue_type_script_setup_true_lang-DzqE0ZF8.js → ErrorBoundary.vue_vue_type_script_setup_true_lang-Dv9wOZmk.js} +4 -4
  13. package/dist/chunks/{ErrorBoundary.vue_vue_type_script_setup_true_lang-DzqE0ZF8.js.map → ErrorBoundary.vue_vue_type_script_setup_true_lang-Dv9wOZmk.js.map} +1 -1
  14. package/dist/chunks/{FieldHelperText.vue_vue_type_script_setup_true_lang-DuMcXUch.js → FieldHelperText.vue_vue_type_script_setup_true_lang-B-G5rNMG.js} +2 -2
  15. package/dist/chunks/{FieldHelperText.vue_vue_type_script_setup_true_lang-DuMcXUch.js.map → FieldHelperText.vue_vue_type_script_setup_true_lang-B-G5rNMG.js.map} +1 -1
  16. package/dist/chunks/{KanbanCard.vue_vue_type_script_setup_true_lang-CyXb4ZZw.js → KanbanCard.vue_vue_type_script_setup_true_lang-DKgIhFwh.js} +6 -6
  17. package/dist/chunks/KanbanCard.vue_vue_type_script_setup_true_lang-DKgIhFwh.js.map +1 -0
  18. package/dist/chunks/{LightboxModal.vue_vue_type_script_setup_true_lang-BxdSYLYf.js → LightboxModal.vue_vue_type_script_setup_true_lang-CP7Or4sf.js} +6 -6
  19. package/dist/chunks/{LightboxModal.vue_vue_type_script_setup_true_lang-BxdSYLYf.js.map → LightboxModal.vue_vue_type_script_setup_true_lang-CP7Or4sf.js.map} +1 -1
  20. package/dist/chunks/{MasonryLayout.vue_vue_type_script_setup_true_lang-DD_jRzkM.js → MasonryLayout.vue_vue_type_script_setup_true_lang-C5GpXgfl.js} +28 -9
  21. package/dist/chunks/MasonryLayout.vue_vue_type_script_setup_true_lang-C5GpXgfl.js.map +1 -0
  22. package/dist/chunks/{MentionInput.vue_vue_type_script_setup_true_lang-5pRxNIcK.js → MentionInput.vue_vue_type_script_setup_true_lang-D8Ja7QjX.js} +578 -322
  23. package/dist/chunks/MentionInput.vue_vue_type_script_setup_true_lang-D8Ja7QjX.js.map +1 -0
  24. package/dist/chunks/{OverlayCloseButton.vue_vue_type_script_setup_true_lang-Df9raD_m.js → OverlayCloseButton.vue_vue_type_script_setup_true_lang-D0f_usZ9.js} +2 -2
  25. package/dist/chunks/{OverlayCloseButton.vue_vue_type_script_setup_true_lang-Df9raD_m.js.map → OverlayCloseButton.vue_vue_type_script_setup_true_lang-D0f_usZ9.js.map} +1 -1
  26. package/dist/chunks/{PopoverContent.vue_vue_type_script_setup_true_lang-C6YKEo3H.js → PopoverContent.vue_vue_type_script_setup_true_lang-iUlvOlO9.js} +2 -2
  27. package/dist/chunks/{PopoverContent.vue_vue_type_script_setup_true_lang-C6YKEo3H.js.map → PopoverContent.vue_vue_type_script_setup_true_lang-iUlvOlO9.js.map} +1 -1
  28. package/dist/chunks/{ReportAction.vue_vue_type_script_setup_true_lang-DCnPCczd.js → ReportAction.vue_vue_type_script_setup_true_lang-CcAxgi-G.js} +2 -2
  29. package/dist/chunks/{ReportAction.vue_vue_type_script_setup_true_lang-DCnPCczd.js.map → ReportAction.vue_vue_type_script_setup_true_lang-CcAxgi-G.js.map} +1 -1
  30. package/dist/chunks/{SurfaceStyles-BYvRlsWe.js → SurfaceStyles-DUVz963_.js} +25 -6
  31. package/dist/chunks/SurfaceStyles-DUVz963_.js.map +1 -0
  32. package/dist/chunks/{ToastHost.vue_vue_type_script_setup_true_lang-J1ZPZXn3.js → ToastHost.vue_vue_type_script_setup_true_lang-BKfF6cjS.js} +3 -3
  33. package/dist/chunks/{ToastHost.vue_vue_type_script_setup_true_lang-J1ZPZXn3.js.map → ToastHost.vue_vue_type_script_setup_true_lang-BKfF6cjS.js.map} +1 -1
  34. package/dist/chunks/{Tones-Bcz8dIo3.js → Tones-BU9yaXKf.js} +5 -3
  35. package/dist/chunks/{Tones-Bcz8dIo3.js.map → Tones-BU9yaXKf.js.map} +1 -1
  36. package/dist/chunks/VisuallyHidden.vue_vue_type_script_setup_true_lang-SZseKI7j.js +29 -0
  37. package/dist/chunks/VisuallyHidden.vue_vue_type_script_setup_true_lang-SZseKI7j.js.map +1 -0
  38. package/dist/chunks/{index-CGIXFfl9.js → index-Bk5JPh5t.js} +3 -3
  39. package/dist/chunks/{index-CGIXFfl9.js.map → index-Bk5JPh5t.js.map} +1 -1
  40. package/dist/chunks/{index-DA17sNzP.js → index-CRV9gpyX.js} +52 -3
  41. package/dist/chunks/index-CRV9gpyX.js.map +1 -0
  42. package/dist/chunks/{index-Dp6L9sX7.js → index-Clq52PIa.js} +5 -28
  43. package/dist/chunks/index-Clq52PIa.js.map +1 -0
  44. package/dist/foundation/primitives/index.js +5 -4
  45. package/dist/foundation/primitives/index.js.map +1 -1
  46. package/dist/foundation/styles/SurfaceStyles.d.ts +25 -8
  47. package/dist/foundation/styles/index.js +3 -3
  48. package/dist/foundation/themes/Theme.d.ts +33 -0
  49. package/dist/foundation/themes/index.d.ts +1 -1
  50. package/dist/foundation/themes/index.js +1 -1
  51. package/dist/index.css +106 -0
  52. package/dist/index.js +18 -18
  53. package/dist/presentation/actions/index.js +2 -2
  54. package/dist/presentation/display/card/Card.vue.d.ts +4 -1
  55. package/dist/presentation/display/index.js +3 -3
  56. package/dist/presentation/feedback/index.js +3 -3
  57. package/dist/presentation/feedback/toastHost/index.js +1 -1
  58. package/dist/presentation/forms/InputStyles.d.ts +7 -0
  59. package/dist/presentation/forms/ReadOnlyHint.vue.d.ts +6 -0
  60. package/dist/presentation/forms/UseReadOnlyHint.d.ts +17 -0
  61. package/dist/presentation/forms/colorSwatchPicker/ColorSwatchItem.vue.d.ts +2 -0
  62. package/dist/presentation/forms/emojiPicker/EmojiPickerPopover.vue.d.ts +6 -0
  63. package/dist/presentation/forms/fontPicker/FontPicker.vue.d.ts +3 -0
  64. package/dist/presentation/forms/iconPicker/IconPicker.vue.d.ts +6 -0
  65. package/dist/presentation/forms/index.js +2 -2
  66. package/dist/presentation/forms/multiSelectPicker/MultiSelectPickerContext.d.ts +2 -0
  67. package/dist/presentation/layout/appShell/AppShellSidebar.vue.d.ts +13 -10
  68. package/dist/presentation/layout/index.js +1 -1
  69. package/dist/presentation/layout/navbar/Navbar.variants.d.ts +11 -2
  70. package/dist/presentation/layout/surfaceLayout/SurfaceLayout.vue.d.ts +4 -1
  71. package/dist/presentation/nav/index.js +1 -1
  72. package/dist/presentation/nav/menu/MenuContext.d.ts +1 -1
  73. package/dist/presentation/nav/menu/MenuItem.vue.d.ts +19 -1
  74. package/dist/presentation/overlays/index.js +4 -4
  75. package/dist/themes.css +18 -0
  76. package/package.json +1 -1
  77. package/dist/chunks/AccountMenu.vue_vue_type_script_setup_true_lang-CWsiHHiy.js.map +0 -1
  78. package/dist/chunks/KanbanCard.vue_vue_type_script_setup_true_lang-CyXb4ZZw.js.map +0 -1
  79. package/dist/chunks/MasonryLayout.vue_vue_type_script_setup_true_lang-DD_jRzkM.js.map +0 -1
  80. package/dist/chunks/MentionInput.vue_vue_type_script_setup_true_lang-5pRxNIcK.js.map +0 -1
  81. package/dist/chunks/SurfaceStyles-BYvRlsWe.js.map +0 -1
  82. package/dist/chunks/index-DA17sNzP.js.map +0 -1
  83. package/dist/chunks/index-Dp6L9sX7.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ToastHost.vue_vue_type_script_setup_true_lang-J1ZPZXn3.js","sources":["../../src/presentation/feedback/toastSimple/ToastSimple.vue","../../src/presentation/feedback/toast/Toast.vue","../../src/presentation/feedback/toastHost/ToastHost.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { Severity } from '../../../foundation/styles';\n\n/** Represents the prop surface of `ToastSimple`. */\nexport interface ToastSimpleProps {\n /** The semantic severity palette. */\n readonly severity?: Severity;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn, surfaceVariants } from '../../../foundation/styles';\nimport type { Tone } from '../../../foundation/styles';\nimport type { ToastSimpleVariants } from './ToastSimple.variants';\n\n/** Maps the toast `severity` keyword to a SurfaceStyles `tone`. */\nconst SeverityToTone: Record<NonNullable<ToastSimpleVariants['severity']>, Tone> = {\n info: 'info',\n success: 'success',\n warning: 'warning',\n danger: 'danger',\n neutral: 'neutral',\n};\n\n/**\n * Renders the atomic toast card — a single tone-driven notification around free-form children.\n *\n * `role=\"status\"` + `aria-live=\"polite\"` are the live-region contract; `role` is\n * bound before `v-bind=\"rest\"` so a caller-supplied `role` still wins.\n */\ndefineOptions({ name: 'ToastSimple', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ToastSimpleProps>(), { severity: 'neutral' });\n\ndefineSlots<{\n /** The toast content. */\n default?(): unknown;\n}>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst classes = computed(() =>\n cn(\n 'pointer-events-auto text-sm',\n surfaceVariants({\n variant: 'surface',\n tone: SeverityToTone[props.severity],\n radius: 'md',\n padding: 'md',\n elevation: 3,\n }),\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" role=\"status\" aria-live=\"polite\" v-bind=\"rest\" :class=\"classes\"><slot /></div>\n</template>\n","<script lang=\"ts\">\nimport type { Severity } from '../../../foundation/styles';\n\nexport interface ToastProps {\n /** The semantic severity palette. */\n readonly severity?: Severity;\n /** The optional leading icon. Rich content → the `icon` slot. */\n readonly icon?: string;\n /** The bold heading line. Rich content → the `title` slot. */\n readonly title?: string;\n /** The body text below the title. Rich content → the `description` slot. */\n readonly description?: string;\n /** The action area below the body. Rich content → the `actions` slot. */\n readonly actions?: string;\n /** The accessible label for the close button. Default `\"Dismiss\"`. */\n readonly closeLabel?: string;\n /** The accessible label for removing a retained notice. Default \"Delete notification\". */\n readonly deleteLabel?: string;\n /**\n * Shows the severity's own glyph when no `icon` is given — a distinct shape per severity, so the meaning\n * never rests on colour alone. `neutral` has none. Default `true`.\n */\n readonly showSeverityIcon?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useLocaleDefaults } from '../../../foundation/i18n';\nimport { computed, getCurrentInstance, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport { Trash2, X } from 'lucide-vue-next';\nimport { cn, Severity as SeverityToken } from '../../../foundation/styles';\nimport { Icon, SeverityIconClasses, SeverityIcons } from '../../../foundation/icons';\nimport ToastSimple from '../toastSimple/ToastSimple.vue';\n\nconst CloseIcon = X;\n\n/**\n * Renders a toast card — icon, title, description, actions, and a close button.\n * Visual only (queue / portal / lifecycle land with `ToastHost` at L5); the atom is `ToastSimple`.\n *\n * Each of React's four `ReactNode` props keeps its string form and gains a\n * same-named slot for rich content; the slot wins when both are supplied.\n */\ndefineOptions({ name: 'Toast', inheritAttrs: false });\n\nconst componentProps = withDefaults(defineProps<ToastProps>(), { showSeverityIcon: true });\nconst props = useLocaleDefaults(componentProps, 'Toast', { closeLabel: 'Dismiss', deleteLabel: 'Delete notification' });\n\n/** Replaces React's `onClose`; omitting `@close` omits the close button. */\nconst emit = defineEmits<{\n /** Fires when the close button is activated. */\n close: [];\n /** Fires when the delete icon is activated; only rendered when bound for retained notices. */\n delete: [];\n}>();\n\ndefineSlots<{\n /** The extra content below the description. */\n default?(): unknown;\n /** The leading icon. Falls back to the `icon` prop. */\n icon?(): unknown;\n /** The heading line. Falls back to the `title` prop. */\n title?(): unknown;\n /** The body text below the title. Falls back to the `description` prop. */\n description?(): unknown;\n /** The action row. Falls back to the `actions` prop. */\n actions?(): unknown;\n /** The adornment beside the close button — a countdown, a timestamp. */\n trailing?(): unknown;\n}>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst instance = getCurrentInstance();\nconst inner = useTemplateRef<InstanceType<typeof ToastSimple>>('inner');\n\n/**\n * Mirrors React's `onClose && <button/>` guard — the close button renders only\n * when the consumer bound `@close`. Read through a call, not a cached computed:\n * `instance.vnode` is replaced on every re-render.\n */\nconst hasClose = () => Boolean(instance?.vnode.props?.onClose);\nconst hasDelete = () => Boolean(instance?.vnode.props?.onDelete);\n\n/**\n * The glyph standing in for a missing `icon` — `null` when switched off, or for a neutral toast. An `icon`\n * slot replaces it as the slot's fallback content, so slot presence stays out of this cached value.\n */\nconst severityIcon = computed(() =>\n props.showSeverityIcon && !props.icon ? SeverityIcons[props.severity ?? SeverityToken.Neutral] : null,\n);\nconst severityIconClass = computed(() => SeverityIconClasses[props.severity ?? SeverityToken.Neutral]);\n\n/*\n * Slot presence is read through calls, not cached computeds: `slots` is not reactive, and a host that updates a\n * toast in place (a promise settling, a dedup refresh) adds or drops slots between renders.\n */\nconst hasIcon = () => Boolean(props.icon) || Boolean(slots.icon) || severityIcon.value !== null;\nconst hasTitle = () => Boolean(props.title) || Boolean(slots.title);\nconst hasDescription = () => Boolean(props.description) || Boolean(slots.description);\nconst hasActions = () => Boolean(props.actions) || Boolean(slots.actions);\n\nconst classes = computed(() => cn('flex items-start gap-3', attrs.class as string | undefined));\n\nconst descriptionClasses = () => cn('text-sm', hasTitle() && 'mt-0.5 text-muted-foreground');\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\n/** Re-exposes the underlying `ToastSimple` root element, matching React's forwarded ref. */\nconst el = computed(() => inner.value?.el ?? null);\n\ndefineExpose({ el });\n</script>\n\n<template>\n <ToastSimple ref=\"inner\" :severity=\"props.severity\" v-bind=\"rest\" :class=\"classes\">\n <span v-if=\"hasIcon()\" data-toast-icon class=\"mt-0.5 shrink-0\">\n <slot name=\"icon\">\n <Icon v-if=\"severityIcon\" :icon=\"severityIcon\" :size=\"16\" :class=\"severityIconClass\" />\n <template v-else>{{ props.icon }}</template>\n </slot>\n </span>\n <div class=\"min-w-0 flex-1\">\n <div v-if=\"hasTitle()\" class=\"font-medium\">\n <slot name=\"title\">{{ props.title }}</slot>\n </div>\n <div v-if=\"hasDescription()\" :class=\"descriptionClasses()\">\n <slot name=\"description\">{{ props.description }}</slot>\n </div>\n <div v-if=\"hasActions()\" class=\"mt-2 flex flex-wrap items-center gap-2\">\n <slot name=\"actions\">{{ props.actions }}</slot>\n </div>\n <slot />\n </div>\n <span v-if=\"slots.trailing\" class=\"flex h-5 shrink-0 items-center\">\n <slot name=\"trailing\" />\n </span>\n <button\n v-if=\"hasDelete()\"\n type=\"button\"\n :aria-label=\"props.deleteLabel\"\n class=\"grid h-6 w-6 shrink-0 place-items-center rounded text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring\"\n @click=\"emit('delete')\"\n >\n <Icon :icon=\"Trash2\" :size=\"14\" />\n </button>\n <button\n v-if=\"hasClose()\"\n type=\"button\"\n :aria-label=\"props.closeLabel\"\n class=\"-mr-1 grid h-6 w-6 shrink-0 place-items-center rounded text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring\"\n @click=\"emit('close')\"\n >\n <Icon :icon=\"CloseIcon\" :size=\"14\" />\n </button>\n </ToastSimple>\n</template>\n","<script lang=\"ts\">\nimport type { VNode } from 'vue';\nimport type { OverlayPosition } from '../../../foundation/styles';\nimport type { ReportSend } from '../../../reporting';\nimport type { ToastSimpleVariants } from '../toastSimple/ToastSimple.variants';\n\nexport type ToastSeverity = NonNullable<ToastSimpleVariants['severity']>;\n\n/** Defines how a toast shows the time left before it dismisses itself. */\nexport const ToastTimer = {\n /** Refers to no countdown — the toast still expires on time. */\n None: 'none',\n /** Refers to a bar draining along the toast's bottom edge. */\n Bar: 'bar',\n /** Refers to a ring draining beside the close button. */\n Ring: 'ring',\n /** Refers to the whole seconds left, counted beside the close button. */\n Seconds: 'seconds',\n} as const;\n\nexport type ToastTimer = (typeof ToastTimer)[keyof typeof ToastTimer];\n\n/** Provides the per-severity expiry a `ToastHost` starts from — an error stays long enough to read and report. */\nexport const DefaultToastDurations: Readonly<Partial<Record<ToastSeverity, number>>> = Object.freeze({\n danger: 8000,\n});\n\n/**\n * A renderable slice of a toast. These travel through the imperative\n * `toastHost.toast()` payload, not through a slot, so a caller who wants\n * markup builds it with `h()`.\n */\nexport type ToastNode = string | VNode;\n\nexport interface ToastOptions {\n title?: ToastNode;\n description?: ToastNode;\n icon?: ToastNode;\n severity?: ToastSeverity;\n /**\n * ms before auto-dismiss. Default: the ToastHost's `durations` entry for the severity, then its\n * `defaultDuration`. `Infinity` = sticky.\n */\n duration?: number;\n action?: ToastNode;\n /**\n * Sends a one-click report of the failure this toast shows; the toast renders a Report action that walks\n * sending → reported (with the reference) → retry on failure. Pairs with `/reporting`'s `capture(error).send`.\n */\n report?: ReportSend;\n /** Shows the severity's own glyph when no `icon` is given. Default: the ToastHost's `showSeverityIcon`. */\n showSeverityIcon?: boolean;\n /**\n * Fully custom body — replaces the default `Toast` chrome (icon/title/description/close).\n * Still animates + auto-dismisses; the content owns its close via the returned id.\n */\n content?: ToastNode;\n /**\n * Fired when the toast is removed — auto-dismiss, close button, `dismiss(id)`, or `dismissAll()`.\n * Not fired on a dedup-update. For undo cleanup / analytics.\n */\n onDismiss?: () => void;\n /** Deletes an explicitly retained notification; omitted for transient toasts. */\n onDelete?: () => void;\n /**\n * Dedup key — a `toast` whose `key` is already showing updates that toast in place,\n * refreshing its timer instead of stacking a duplicate.\n */\n key?: string;\n /** How this toast shows its time left. Default: the ToastHost's `timer`. */\n timer?: ToastTimer;\n /**\n * Shows or hides this toast's countdown bar.\n * @deprecated Use `timer` — `ToastTimer.Bar` or `ToastTimer.None`.\n */\n progress?: boolean;\n}\n\n/** Content for a `toastHost.promise` phase — a title string, or a full partial options object. */\nexport type ToastContent = string | Partial<ToastOptions>;\n\n/**\n * Options for `toastHost.promise` — loading / success / error content\n * (success + error may be a fn of the settled value).\n */\nexport interface ToastPromiseOptions<T> {\n loading: ToastContent;\n success: ToastContent | ((value: T) => ToastContent);\n error: ToastContent | ((err: unknown) => ToastContent);\n /** Auto-dismiss (ms) for the settled toast; defaults to the ToastHost's `defaultDuration`. */\n duration?: number;\n}\n\nfunction normalizeContent(content: ToastContent): Partial<ToastOptions> {\n return typeof content === 'string' ? { title: content } : content;\n}\n\ninterface ToastEntry extends ToastOptions {\n id: string;\n /** Bumped on every `update` / dedup so the viewport can reset that toast's auto-dismiss timer. */\n nonce: number;\n}\n\ntype Listener = (toasts: ReadonlyArray<ToastEntry>) => void;\n\nclass ToastHostStore {\n private items: ReadonlyArray<ToastEntry> = [];\n private listeners = new Set<Listener>();\n private idSeq = 0;\n\n toast(opts: ToastOptions): string {\n if (opts.key !== undefined) {\n const existing = this.items.find((t) => t.key === opts.key);\n if (existing) {\n this.update(existing.id, opts);\n return existing.id;\n }\n }\n const id = `t_${++this.idSeq}`;\n this.items = [...this.items, { id, ...opts, nonce: 0 }];\n this.emit();\n return id;\n }\n\n /** Merges a patch into an existing toast (content + severity + duration), refreshing its timer. */\n update(id: string, patch: Partial<ToastOptions>): void {\n this.items = this.items.map((t) => (t.id === id ? { ...t, ...patch, nonce: t.nonce + 1 } : t));\n this.emit();\n }\n\n /** Shows a sticky loading toast; returns the full content-update and promise settlement chain. */\n promise<T>(promise: Promise<T>, opts: ToastPromiseOptions<T>): Promise<T> {\n const id = this.toast({ ...normalizeContent(opts.loading), severity: 'info', duration: Infinity });\n const settle = (content: ToastContent, severity: ToastSeverity) =>\n this.update(id, { ...normalizeContent(content), severity, duration: opts.duration });\n return promise.then(\n (value) => {\n settle(typeof opts.success === 'function' ? opts.success(value) : opts.success, 'success');\n return value;\n },\n (err: unknown) => {\n settle(typeof opts.error === 'function' ? opts.error(err) : opts.error, 'danger');\n throw err;\n },\n );\n }\n\n dismiss(id: string): void {\n const entry = this.items.find((t) => t.id === id);\n this.items = this.items.filter((t) => t.id !== id);\n try {\n entry?.onDismiss?.();\n } finally {\n this.emit();\n }\n }\n\n dismissAll(): void {\n const gone = this.items;\n this.items = [];\n try {\n for (const t of gone) t.onDismiss?.();\n } finally {\n this.emit();\n }\n }\n\n subscribe(fn: Listener): () => void {\n this.listeners.add(fn);\n fn(this.items);\n return () => {\n this.listeners.delete(fn);\n };\n }\n\n private emit() {\n for (const fn of this.listeners) fn(this.items);\n }\n}\n\nexport const toastHost = new ToastHostStore();\n\n/**\n * The imperative toast API, bound to the app-wide store. A plain object — the\n * store is a module singleton, so there is nothing per-instance to memoize.\n */\nexport function useToastHost() {\n return {\n toast: (opts: ToastOptions) => toastHost.toast(opts),\n update: (id: string, patch: Partial<ToastOptions>) => toastHost.update(id, patch),\n promise: <T,>(promise: Promise<T>, opts: ToastPromiseOptions<T>) => toastHost.promise(promise, opts),\n dismiss: (id: string) => toastHost.dismiss(id),\n dismissAll: () => toastHost.dismissAll(),\n };\n}\n\nconst PositionClasses = 'top-4 right-4 items-end';\n\n/** Toasts enter from the right; reduced-motion users get an instant swap. */\nconst MotionClasses =\n 'motion-safe:data-[state=open]:animate-(--animate-slide-in-right) motion-safe:data-[state=closed]:animate-(--animate-slide-out-right) motion-reduce:animate-none';\n\nexport interface ToastHostProps {\n /** @deprecated Toasts always anchor top-right. Accepted for one release, without changing placement. */\n readonly position?: OverlayPosition;\n readonly max?: number;\n /**\n * The auto-dismiss delay in ms for a severity missing from `durations`; per-toast `duration` overrides.\n * Default 5000. `Infinity` to disable.\n */\n readonly defaultDuration?: number;\n /**\n * The auto-dismiss delay in ms per severity; per-toast `duration` overrides, and a severity left out falls\n * back to `defaultDuration`. Default `DefaultToastDurations` — errors stay 8 seconds. Replaces, never merges.\n */\n readonly durations?: Readonly<Partial<Record<ToastSeverity, number>>>;\n readonly canPauseOnHover?: boolean;\n readonly gap?: number;\n /**\n * How each auto-dismissing toast shows its time left; a toast's `timer` overrides. Every display pauses with\n * the expiry timer and restarts when the toast updates; sticky toasts show none, and reduced motion drops the\n * bar and the ring. Custom `content` has no close button to sit beside, so it takes the bar for a ring or\n * seconds. Default `ToastTimer.None`.\n */\n readonly timer?: ToastTimer;\n /**\n * Shows a countdown bar along the bottom of each auto-dismissing toast.\n * @deprecated Use `timer` — `ToastTimer.Bar`.\n */\n readonly showProgress?: boolean;\n /** Shows each severity's glyph on toasts given no `icon`; a toast's `showSeverityIcon` overrides. Default `true`. */\n readonly showSeverityIcon?: boolean;\n}\n\ninterface VisibleToast extends ToastEntry {\n resolvedDuration: number;\n}\n\n/** Countdown fill per severity; the neutral countdown uses the brand primary. */\nconst ProgressClasses: Record<ToastSeverity, string> = {\n neutral: 'bg-primary',\n info: 'bg-info',\n success: 'bg-success',\n warning: 'bg-warning',\n danger: 'bg-destructive',\n};\n\n/** Countdown-ring stroke per severity — the bar's tones, drawn as an arc. */\nconst RingClasses: Record<ToastSeverity, string> = {\n neutral: 'stroke-primary',\n info: 'stroke-info',\n success: 'stroke-success',\n warning: 'stroke-warning',\n danger: 'stroke-destructive',\n};\n\n/** The ring's radius in the 16×16 view box; the circumference is the dash the countdown drains. */\nconst RingRadius = 6;\nconst RingCircumference = 2 * Math.PI * RingRadius;\n\n/** How often the seconds display re-reads its clock — a quarter second keeps a whole-second flip on time. */\nconst SecondsTickMs = 250;\n</script>\n\n<script setup lang=\"ts\">\nimport { useLocale } from '../../../foundation/i18n';\nimport {\n computed,\n defineComponent,\n h,\n onMounted,\n onUnmounted,\n ref,\n shallowRef,\n useAttrs,\n watch,\n type PropType,\n} from 'vue';\nimport { cn, OverlayPosition as OverlayPositionToken } from '../../../foundation/styles';\nimport { Announce, Portal, Presence } from '../../../foundation/primitives';\nimport Toast from '../toast/Toast.vue';\nimport ReportAction from '../reportAction/ReportAction.vue';\n\nconst locale = useLocale();\n\n/** Renders a `ToastNode` — either a plain string or a caller-built VNode. */\nconst ToastNodeView = defineComponent({\n name: 'ToastNodeView',\n props: { node: { type: [String, Object] as PropType<ToastNode>, required: true } },\n setup: (nodeProps) => () => nodeProps.node,\n});\n\n/** The props every countdown display shares — it mirrors the host's expiry timer, never drives it. */\nconst CountdownProps = {\n duration: { type: Number, required: true },\n paused: { type: Boolean, default: false },\n severity: { type: String as PropType<ToastSeverity>, default: 'neutral' },\n} as const;\n\n/**\n * Runs one Web Animations API countdown on a template ref, paused and resumed in step with the host's expiry\n * timer; environments without `animate` leave the element static at full.\n */\nfunction useCountdownAnimation(\n element: () => Element | null,\n keyframes: Keyframe[],\n countdown: { readonly duration: number; readonly paused: boolean },\n): void {\n let animation: Animation | undefined;\n onMounted(() => {\n const target = element();\n if (!target || typeof target.animate !== 'function') return;\n animation = target.animate(keyframes, { duration: countdown.duration, easing: 'linear', fill: 'forwards' });\n if (countdown.paused) animation.pause();\n });\n watch(\n () => countdown.paused,\n (isPaused) => {\n if (isPaused) animation?.pause();\n else animation?.play();\n },\n );\n onUnmounted(() => animation?.cancel());\n}\n\n/** The countdown bar — a scale transform draining along the toast's bottom edge. */\nconst ToastProgress = defineComponent({\n name: 'ToastProgress',\n props: CountdownProps,\n setup(countdown) {\n const fill = ref<HTMLElement | null>(null);\n useCountdownAnimation(() => fill.value, [{ transform: 'scaleX(1)' }, { transform: 'scaleX(0)' }], countdown);\n return () =>\n h(\n 'div',\n {\n 'aria-hidden': 'true',\n 'data-toast-progress': '',\n class: 'absolute inset-x-0 bottom-0 h-1 motion-reduce:hidden',\n },\n [\n h('div', {\n ref: fill,\n class: cn('h-full w-full origin-left opacity-80', ProgressClasses[countdown.severity]),\n }),\n ],\n );\n },\n});\n\n/** The countdown ring — an arc draining clockwise from twelve o'clock, drawn beside the close button. */\nconst ToastRing = defineComponent({\n name: 'ToastRing',\n props: CountdownProps,\n setup(countdown) {\n const arc = ref<SVGCircleElement | null>(null);\n useCountdownAnimation(\n () => arc.value,\n [{ strokeDashoffset: '0' }, { strokeDashoffset: `${RingCircumference}` }],\n countdown,\n );\n return () =>\n h(\n 'svg',\n {\n 'aria-hidden': 'true',\n 'data-toast-timer': ToastTimer.Ring,\n viewBox: '0 0 16 16',\n class: 'size-4 -rotate-90 motion-reduce:hidden',\n },\n [\n h('circle', { cx: 8, cy: 8, r: RingRadius, fill: 'none', 'stroke-width': 2, class: 'stroke-border' }),\n h('circle', {\n ref: arc,\n cx: 8,\n cy: 8,\n r: RingRadius,\n fill: 'none',\n 'stroke-width': 2,\n 'stroke-linecap': 'round',\n 'stroke-dasharray': `${RingCircumference}`,\n class: RingClasses[countdown.severity],\n }),\n ],\n );\n },\n});\n\n/**\n * The seconds display — the whole seconds left, rounded up so it reads `1s` until the toast goes. It keeps its\n * own clock, advancing only while unpaused; the announcement region already carries the toast, so it is hidden.\n */\nconst ToastSeconds = defineComponent({\n name: 'ToastSeconds',\n props: CountdownProps,\n setup(countdown) {\n const left = ref(countdown.duration);\n let lastTick = 0;\n let handle: number | undefined;\n const tick = () => {\n const now = Date.now();\n left.value = Math.max(0, left.value - (now - lastTick));\n lastTick = now;\n };\n const start = () => {\n if (handle !== undefined) return;\n lastTick = Date.now();\n handle = window.setInterval(tick, SecondsTickMs);\n };\n const stop = () => {\n if (handle === undefined) return;\n tick();\n window.clearInterval(handle);\n handle = undefined;\n };\n onMounted(() => {\n if (!countdown.paused) start();\n });\n watch(\n () => countdown.paused,\n (isPaused) => (isPaused ? stop() : start()),\n );\n onUnmounted(() => {\n if (handle !== undefined) window.clearInterval(handle);\n });\n return () =>\n h(\n 'span',\n {\n 'aria-hidden': 'true',\n 'data-toast-timer': ToastTimer.Seconds,\n class: 'text-xs tabular-nums text-muted-foreground',\n },\n `${Math.ceil(left.value / 1000)}s`,\n );\n },\n});\n\n/**\n * Renders the toast viewport — subscribes to the global `toastHost` store and stacks `Toast` cards.\n * Mount once, per app.\n *\n * A caller's `class` attr lands on the stack container.\n */\ndefineOptions({ name: 'ToastHost', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ToastHostProps>(), {\n position: OverlayPositionToken.TopRight,\n max: 5,\n defaultDuration: 5000,\n durations: () => DefaultToastDurations,\n canPauseOnHover: true,\n gap: 8,\n timer: undefined,\n showProgress: false,\n showSeverityIcon: true,\n});\n\nconst attrs = useAttrs();\n\nconst items = shallowRef<ReadonlyArray<ToastEntry>>([]);\nconst hovered = ref(false);\nconst focused = ref(false);\nconst paused = computed(() => props.canPauseOnHover && (hovered.value || focused.value));\n\n/* Non-reactive state — mutated across ticks, never rendered. */\nconst timers = new Map<string, number>();\nconst remaining = new Map<string, number>();\nconst startedAt = new Map<string, number>();\nconst nonces = new Map<string, number>();\n\nlet unsubscribe: (() => void) | undefined;\nonMounted(() => {\n unsubscribe = toastHost.subscribe((next) => {\n items.value = next;\n });\n});\n\n// Visible window (FIFO).\nconst visible = computed<ReadonlyArray<VisibleToast>>(() =>\n items.value.slice(0, props.max).map((t) => ({\n ...t,\n resolvedDuration: t.duration ?? props.durations[t.severity ?? 'neutral'] ?? props.defaultDuration,\n })),\n);\nconst visibleIds = computed(() => new Set(visible.value.map((v) => v.id)));\n\n// Toasts that just left `visible` (dismissed, or pushed out of the FIFO\n// window) but must still play their exit animation. Kept mounted with\n// `data-state=\"closed\"` until `Presence` unmounts the child — the `@vue:unmounted`\n// hook below then prunes the entry here.\nconst exiting = shallowRef<ReadonlyArray<VisibleToast>>([]);\nlet prevVisible: ReadonlyArray<VisibleToast> = [];\n\nwatch(\n visibleIds,\n (ids) => {\n const gone = prevVisible.filter((p) => !ids.has(p.id));\n prevVisible = visible.value;\n const current = exiting.value;\n const known = new Set(current.map((e) => e.id));\n // Add newly-gone toasts; drop any that re-entered `visible`.\n const merged = [...current, ...gone.filter((g) => !known.has(g.id))].filter((e) => !ids.has(e.id));\n if (merged.length !== current.length || !merged.every((e, i) => e.id === current[i]?.id)) {\n exiting.value = merged;\n }\n },\n { immediate: true, flush: 'post' },\n);\n\nconst removeExiting = (id: string) => {\n exiting.value = exiting.value.filter((e) => e.id !== id);\n};\n\n// Visible (present) first, then the ones animating out.\nconst rendered = computed<Array<VisibleToast & { present: boolean }>>(() => [\n ...visible.value.map((v) => ({ ...v, present: true })),\n ...exiting.value.map((e) => ({ ...e, present: false })),\n]);\n\nconst latestTitle = computed(() => {\n const last = visible.value[visible.value.length - 1];\n if (typeof last?.title === 'string') return last.title;\n if (typeof last?.description === 'string') return last.description;\n return '';\n});\n\n// Schedule auto-dismiss timers.\nwatch(\n [items, () => props.max, () => props.defaultDuration, () => props.durations, paused],\n () => {\n const ids = visibleIds.value;\n // Clear timers for items that are no longer visible.\n for (const [id, handle] of timers) {\n if (!ids.has(id)) {\n window.clearTimeout(handle);\n timers.delete(id);\n remaining.delete(id);\n startedAt.delete(id);\n }\n }\n for (const id of nonces.keys()) {\n if (!ids.has(id)) nonces.delete(id);\n }\n if (paused.value) return;\n // A content update / dedup bumps `nonce` — clear that toast's timer so it reschedules fresh.\n for (const v of visible.value) {\n const seen = nonces.get(v.id);\n if (seen !== undefined && seen !== v.nonce) {\n const handle = timers.get(v.id);\n if (handle !== undefined) window.clearTimeout(handle);\n timers.delete(v.id);\n remaining.delete(v.id);\n startedAt.delete(v.id);\n }\n nonces.set(v.id, v.nonce);\n }\n for (const v of visible.value) {\n if (v.resolvedDuration === Infinity) continue;\n if (timers.has(v.id)) continue;\n const left = remaining.get(v.id) ?? v.resolvedDuration;\n const handle = window.setTimeout(() => {\n toastHost.dismiss(v.id);\n }, left);\n timers.set(v.id, handle);\n startedAt.set(v.id, Date.now());\n remaining.set(v.id, left);\n }\n },\n { immediate: true, flush: 'post' },\n);\n\n// Cleanup on unmount.\nonUnmounted(() => {\n unsubscribe?.();\n for (const handle of timers.values()) window.clearTimeout(handle);\n timers.clear();\n});\n\nwatch(\n paused,\n (isPaused) => {\n if (!isPaused) return;\n for (const [id, handle] of timers) {\n window.clearTimeout(handle);\n const start = startedAt.get(id) ?? Date.now();\n remaining.set(id, Math.max(0, (remaining.get(id) ?? 0) - (Date.now() - start)));\n }\n timers.clear();\n },\n { flush: 'sync' },\n);\n\nwatch(\n () => rendered.value.length,\n (count) => {\n if (count === 0) {\n hovered.value = false;\n focused.value = false;\n }\n },\n);\n\nfunction onFocusout(event: FocusEvent): void {\n const stack = event.currentTarget as HTMLElement;\n if (!(event.relatedTarget instanceof Node) || !stack.contains(event.relatedTarget)) focused.value = false;\n}\n\nconst stackClasses = computed(() =>\n cn('pointer-events-none fixed z-toast flex flex-col', PositionClasses, attrs.class as string | undefined),\n);\n\nconst itemClasses = computed(() => cn('pointer-events-auto relative w-80 overflow-hidden rounded-md', MotionClasses));\n\n/** The display a toast asked for — its own `timer`, its deprecated `progress`, then the host's two. */\nfunction requestedTimer(t: VisibleToast): ToastTimer {\n if (t.timer !== undefined) return t.timer;\n if (t.progress !== undefined) return t.progress ? ToastTimer.Bar : ToastTimer.None;\n if (props.timer !== undefined) return props.timer;\n return props.showProgress ? ToastTimer.Bar : ToastTimer.None;\n}\n\n/**\n * The display a toast gets — none while exiting or sticky, and the bar for custom `content`, which has no close\n * button for a ring or seconds to sit beside.\n */\nfunction timerFor(t: VisibleToast & { present: boolean }): ToastTimer {\n if (!t.present || !Number.isFinite(t.resolvedDuration)) return ToastTimer.None;\n const requested = requestedTimer(t);\n return t.content && requested !== ToastTimer.None ? ToastTimer.Bar : requested;\n}\n\n/** Whether a toast's display sits beside the close button rather than along the bottom edge. */\nconst isTrailingTimer = (timer: ToastTimer): boolean => timer === ToastTimer.Ring || timer === ToastTimer.Seconds;\n\n/** Vue does not auto-suffix numeric style values with `px`. */\nconst stackStyle = computed(() => ({ gap: `${props.gap}px` }));\n</script>\n\n<template>\n <Portal>\n <div\n v-if=\"rendered.length > 0\"\n role=\"region\"\n :aria-label=\"locale.t('ToastHost.notifications', undefined, 'Notifications')\"\n :style=\"stackStyle\"\n :class=\"stackClasses\"\n @mouseenter=\"hovered = true\"\n @mouseleave=\"hovered = false\"\n @focusin=\"focused = true\"\n @focusout=\"onFocusout\"\n >\n <Presence v-for=\"t in rendered\" :key=\"t.id\" :is-present=\"t.present\">\n <!--\n `Presence` clones `data-state` onto this node and keeps it mounted\n until the exit animation ends; the `@vue:unmounted` hook is that\n \"exit finished\" signal (the read-only `Presence` API exposes no\n callback).\n -->\n <div :class=\"itemClasses\" @vue:unmounted=\"t.present ? undefined : removeExiting(t.id)\">\n <ToastNodeView v-if=\"t.content\" :node=\"t.content\" />\n <Toast\n v-else\n :severity=\"t.severity\"\n :show-severity-icon=\"t.showSeverityIcon ?? props.showSeverityIcon\"\n v-on=\"t.onDelete ? { delete: t.onDelete } : {}\"\n @close=\"toastHost.dismiss(t.id)\"\n >\n <template v-if=\"t.icon\" #icon><ToastNodeView :node=\"t.icon\" /></template>\n <template v-if=\"t.title\" #title><ToastNodeView :node=\"t.title\" /></template>\n <template v-if=\"t.description\" #description>\n <ToastNodeView :node=\"t.description\" />\n </template>\n <template v-if=\"t.action || t.report\" #actions>\n <ToastNodeView v-if=\"t.action\" :node=\"t.action\" />\n <ReportAction v-if=\"t.report\" :send=\"t.report\" />\n </template>\n <template v-if=\"isTrailingTimer(timerFor(t))\" #trailing>\n <ToastRing\n v-if=\"timerFor(t) === ToastTimer.Ring\"\n :key=\"`${t.id}:${t.nonce}`\"\n :duration=\"t.resolvedDuration\"\n :paused=\"paused\"\n :severity=\"t.severity ?? 'neutral'\"\n />\n <ToastSeconds\n v-else\n :key=\"`${t.id}:${t.nonce}`\"\n :duration=\"t.resolvedDuration\"\n :paused=\"paused\"\n :severity=\"t.severity ?? 'neutral'\"\n />\n </template>\n </Toast>\n <ToastProgress\n v-if=\"timerFor(t) === ToastTimer.Bar\"\n :key=\"`${t.id}:${t.nonce}`\"\n :duration=\"t.resolvedDuration\"\n :paused=\"paused\"\n :severity=\"t.severity ?? 'neutral'\"\n />\n </div>\n </Presence>\n </div>\n <Announce politeness=\"polite\">{{ latestTitle }}</Announce>\n </Portal>\n</template>\n"],"names":["_openBlock","_createElementBlock","_mergeProps","_renderSlot","SeverityToken","_createBlock","ToastSimple","_unref","_hoisted_1","Icon","_Fragment","_createTextVNode","_toDisplayString","_createElementVNode","_hoisted_2","_createVNode","Portal","_renderList","Toast","_toHandlers","ReportAction","Announce"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAiBA,UAAM,iBAA6E;AAAA,MACjF,MAAM;AAAA,MACN,SAAS;AAAA,MACT,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,SAAS;AAAA,IAAA;AAWX,UAAM,QAAQ;AAOd,UAAM,QAAQ,SAAA;AACd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gB,SAAS,CAAC,CAAA;8BAAK;AAAA,oCAC7C,MAME;AAAA,0BALM,SAAS,CAAC,MAAM,WAAW,qBADnCf,YAMEE,MAAA,SAAA,GAAA;AAAA,4BAJC,QAAQ,EAAE,EAAE,IAAI,EAAE,KAAK;AAAA,4BACvB,UAAU,EAAE;AAAA,4BACZ,QAAQ,OAAA;AAAA,4BACR,UAAU,EAAE,YAAQ;AAAA,0BAAA,iEAEvBF,YAMEE,MAAA,YAAA,GAAA;AAAA,4BAJC,QAAQ,EAAE,EAAE,IAAI,EAAE,KAAK;AAAA,4BACvB,UAAU,EAAE;AAAA,4BACZ,QAAQ,OAAA;AAAA,4BACR,UAAU,EAAE,YAAQ;AAAA,0BAAA;;;;;oBAKnB,SAAS,CAAC,MAAM,WAAW,oBADnCF,YAMEE,MAAA,aAAA,GAAA;AAAA,sBAJC,QAAQ,EAAE,EAAE,IAAI,EAAE,KAAK;AAAA,sBACvB,UAAU,EAAE;AAAA,sBACZ,QAAQ,OAAA;AAAA,sBACR,UAAU,EAAE,YAAQ;AAAA,oBAAA;;;;;;;UAK7BQ,YAA0DR,MAAAc,WAAA,GAAA,EAAhD,YAAW,YAAQ;AAAA,6BAAC,MAAiB;AAAA,8CAAd,YAAA,KAAW,GAAA,CAAA;AAAA,YAAA;;;;;;;;;"}
1
+ {"version":3,"file":"ToastHost.vue_vue_type_script_setup_true_lang-BKfF6cjS.js","sources":["../../src/presentation/feedback/toastSimple/ToastSimple.vue","../../src/presentation/feedback/toast/Toast.vue","../../src/presentation/feedback/toastHost/ToastHost.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { Severity } from '../../../foundation/styles';\n\n/** Represents the prop surface of `ToastSimple`. */\nexport interface ToastSimpleProps {\n /** The semantic severity palette. */\n readonly severity?: Severity;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn, surfaceVariants } from '../../../foundation/styles';\nimport type { Tone } from '../../../foundation/styles';\nimport type { ToastSimpleVariants } from './ToastSimple.variants';\n\n/** Maps the toast `severity` keyword to a SurfaceStyles `tone`. */\nconst SeverityToTone: Record<NonNullable<ToastSimpleVariants['severity']>, Tone> = {\n info: 'info',\n success: 'success',\n warning: 'warning',\n danger: 'danger',\n neutral: 'neutral',\n};\n\n/**\n * Renders the atomic toast card — a single tone-driven notification around free-form children.\n *\n * `role=\"status\"` + `aria-live=\"polite\"` are the live-region contract; `role` is\n * bound before `v-bind=\"rest\"` so a caller-supplied `role` still wins.\n */\ndefineOptions({ name: 'ToastSimple', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ToastSimpleProps>(), { severity: 'neutral' });\n\ndefineSlots<{\n /** The toast content. */\n default?(): unknown;\n}>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst classes = computed(() =>\n cn(\n 'pointer-events-auto text-sm',\n surfaceVariants({\n variant: 'surface',\n tone: SeverityToTone[props.severity],\n radius: 'md',\n padding: 'md',\n elevation: 3,\n }),\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" role=\"status\" aria-live=\"polite\" v-bind=\"rest\" :class=\"classes\"><slot /></div>\n</template>\n","<script lang=\"ts\">\nimport type { Severity } from '../../../foundation/styles';\n\nexport interface ToastProps {\n /** The semantic severity palette. */\n readonly severity?: Severity;\n /** The optional leading icon. Rich content → the `icon` slot. */\n readonly icon?: string;\n /** The bold heading line. Rich content → the `title` slot. */\n readonly title?: string;\n /** The body text below the title. Rich content → the `description` slot. */\n readonly description?: string;\n /** The action area below the body. Rich content → the `actions` slot. */\n readonly actions?: string;\n /** The accessible label for the close button. Default `\"Dismiss\"`. */\n readonly closeLabel?: string;\n /** The accessible label for removing a retained notice. Default \"Delete notification\". */\n readonly deleteLabel?: string;\n /**\n * Shows the severity's own glyph when no `icon` is given — a distinct shape per severity, so the meaning\n * never rests on colour alone. `neutral` has none. Default `true`.\n */\n readonly showSeverityIcon?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useLocaleDefaults } from '../../../foundation/i18n';\nimport { computed, getCurrentInstance, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport { Trash2, X } from 'lucide-vue-next';\nimport { cn, Severity as SeverityToken } from '../../../foundation/styles';\nimport { Icon, SeverityIconClasses, SeverityIcons } from '../../../foundation/icons';\nimport ToastSimple from '../toastSimple/ToastSimple.vue';\n\nconst CloseIcon = X;\n\n/**\n * Renders a toast card — icon, title, description, actions, and a close button.\n * Visual only (queue / portal / lifecycle land with `ToastHost` at L5); the atom is `ToastSimple`.\n *\n * Each of React's four `ReactNode` props keeps its string form and gains a\n * same-named slot for rich content; the slot wins when both are supplied.\n */\ndefineOptions({ name: 'Toast', inheritAttrs: false });\n\nconst componentProps = withDefaults(defineProps<ToastProps>(), { showSeverityIcon: true });\nconst props = useLocaleDefaults(componentProps, 'Toast', { closeLabel: 'Dismiss', deleteLabel: 'Delete notification' });\n\n/** Replaces React's `onClose`; omitting `@close` omits the close button. */\nconst emit = defineEmits<{\n /** Fires when the close button is activated. */\n close: [];\n /** Fires when the delete icon is activated; only rendered when bound for retained notices. */\n delete: [];\n}>();\n\ndefineSlots<{\n /** The extra content below the description. */\n default?(): unknown;\n /** The leading icon. Falls back to the `icon` prop. */\n icon?(): unknown;\n /** The heading line. Falls back to the `title` prop. */\n title?(): unknown;\n /** The body text below the title. Falls back to the `description` prop. */\n description?(): unknown;\n /** The action row. Falls back to the `actions` prop. */\n actions?(): unknown;\n /** The adornment beside the close button — a countdown, a timestamp. */\n trailing?(): unknown;\n}>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst instance = getCurrentInstance();\nconst inner = useTemplateRef<InstanceType<typeof ToastSimple>>('inner');\n\n/**\n * Mirrors React's `onClose && <button/>` guard — the close button renders only\n * when the consumer bound `@close`. Read through a call, not a cached computed:\n * `instance.vnode` is replaced on every re-render.\n */\nconst hasClose = () => Boolean(instance?.vnode.props?.onClose);\nconst hasDelete = () => Boolean(instance?.vnode.props?.onDelete);\n\n/**\n * The glyph standing in for a missing `icon` — `null` when switched off, or for a neutral toast. An `icon`\n * slot replaces it as the slot's fallback content, so slot presence stays out of this cached value.\n */\nconst severityIcon = computed(() =>\n props.showSeverityIcon && !props.icon ? SeverityIcons[props.severity ?? SeverityToken.Neutral] : null,\n);\nconst severityIconClass = computed(() => SeverityIconClasses[props.severity ?? SeverityToken.Neutral]);\n\n/*\n * Slot presence is read through calls, not cached computeds: `slots` is not reactive, and a host that updates a\n * toast in place (a promise settling, a dedup refresh) adds or drops slots between renders.\n */\nconst hasIcon = () => Boolean(props.icon) || Boolean(slots.icon) || severityIcon.value !== null;\nconst hasTitle = () => Boolean(props.title) || Boolean(slots.title);\nconst hasDescription = () => Boolean(props.description) || Boolean(slots.description);\nconst hasActions = () => Boolean(props.actions) || Boolean(slots.actions);\n\nconst classes = computed(() => cn('flex items-start gap-3', attrs.class as string | undefined));\n\nconst descriptionClasses = () => cn('text-sm', hasTitle() && 'mt-0.5 text-muted-foreground');\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\n/** Re-exposes the underlying `ToastSimple` root element, matching React's forwarded ref. */\nconst el = computed(() => inner.value?.el ?? null);\n\ndefineExpose({ el });\n</script>\n\n<template>\n <ToastSimple ref=\"inner\" :severity=\"props.severity\" v-bind=\"rest\" :class=\"classes\">\n <span v-if=\"hasIcon()\" data-toast-icon class=\"mt-0.5 shrink-0\">\n <slot name=\"icon\">\n <Icon v-if=\"severityIcon\" :icon=\"severityIcon\" :size=\"16\" :class=\"severityIconClass\" />\n <template v-else>{{ props.icon }}</template>\n </slot>\n </span>\n <div class=\"min-w-0 flex-1\">\n <div v-if=\"hasTitle()\" class=\"font-medium\">\n <slot name=\"title\">{{ props.title }}</slot>\n </div>\n <div v-if=\"hasDescription()\" :class=\"descriptionClasses()\">\n <slot name=\"description\">{{ props.description }}</slot>\n </div>\n <div v-if=\"hasActions()\" class=\"mt-2 flex flex-wrap items-center gap-2\">\n <slot name=\"actions\">{{ props.actions }}</slot>\n </div>\n <slot />\n </div>\n <span v-if=\"slots.trailing\" class=\"flex h-5 shrink-0 items-center\">\n <slot name=\"trailing\" />\n </span>\n <button\n v-if=\"hasDelete()\"\n type=\"button\"\n :aria-label=\"props.deleteLabel\"\n class=\"grid h-6 w-6 shrink-0 place-items-center rounded text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring\"\n @click=\"emit('delete')\"\n >\n <Icon :icon=\"Trash2\" :size=\"14\" />\n </button>\n <button\n v-if=\"hasClose()\"\n type=\"button\"\n :aria-label=\"props.closeLabel\"\n class=\"-mr-1 grid h-6 w-6 shrink-0 place-items-center rounded text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring\"\n @click=\"emit('close')\"\n >\n <Icon :icon=\"CloseIcon\" :size=\"14\" />\n </button>\n </ToastSimple>\n</template>\n","<script lang=\"ts\">\nimport type { VNode } from 'vue';\nimport type { OverlayPosition } from '../../../foundation/styles';\nimport type { ReportSend } from '../../../reporting';\nimport type { ToastSimpleVariants } from '../toastSimple/ToastSimple.variants';\n\nexport type ToastSeverity = NonNullable<ToastSimpleVariants['severity']>;\n\n/** Defines how a toast shows the time left before it dismisses itself. */\nexport const ToastTimer = {\n /** Refers to no countdown — the toast still expires on time. */\n None: 'none',\n /** Refers to a bar draining along the toast's bottom edge. */\n Bar: 'bar',\n /** Refers to a ring draining beside the close button. */\n Ring: 'ring',\n /** Refers to the whole seconds left, counted beside the close button. */\n Seconds: 'seconds',\n} as const;\n\nexport type ToastTimer = (typeof ToastTimer)[keyof typeof ToastTimer];\n\n/** Provides the per-severity expiry a `ToastHost` starts from — an error stays long enough to read and report. */\nexport const DefaultToastDurations: Readonly<Partial<Record<ToastSeverity, number>>> = Object.freeze({\n danger: 8000,\n});\n\n/**\n * A renderable slice of a toast. These travel through the imperative\n * `toastHost.toast()` payload, not through a slot, so a caller who wants\n * markup builds it with `h()`.\n */\nexport type ToastNode = string | VNode;\n\nexport interface ToastOptions {\n title?: ToastNode;\n description?: ToastNode;\n icon?: ToastNode;\n severity?: ToastSeverity;\n /**\n * ms before auto-dismiss. Default: the ToastHost's `durations` entry for the severity, then its\n * `defaultDuration`. `Infinity` = sticky.\n */\n duration?: number;\n action?: ToastNode;\n /**\n * Sends a one-click report of the failure this toast shows; the toast renders a Report action that walks\n * sending → reported (with the reference) → retry on failure. Pairs with `/reporting`'s `capture(error).send`.\n */\n report?: ReportSend;\n /** Shows the severity's own glyph when no `icon` is given. Default: the ToastHost's `showSeverityIcon`. */\n showSeverityIcon?: boolean;\n /**\n * Fully custom body — replaces the default `Toast` chrome (icon/title/description/close).\n * Still animates + auto-dismisses; the content owns its close via the returned id.\n */\n content?: ToastNode;\n /**\n * Fired when the toast is removed — auto-dismiss, close button, `dismiss(id)`, or `dismissAll()`.\n * Not fired on a dedup-update. For undo cleanup / analytics.\n */\n onDismiss?: () => void;\n /** Deletes an explicitly retained notification; omitted for transient toasts. */\n onDelete?: () => void;\n /**\n * Dedup key — a `toast` whose `key` is already showing updates that toast in place,\n * refreshing its timer instead of stacking a duplicate.\n */\n key?: string;\n /** How this toast shows its time left. Default: the ToastHost's `timer`. */\n timer?: ToastTimer;\n /**\n * Shows or hides this toast's countdown bar.\n * @deprecated Use `timer` — `ToastTimer.Bar` or `ToastTimer.None`.\n */\n progress?: boolean;\n}\n\n/** Content for a `toastHost.promise` phase — a title string, or a full partial options object. */\nexport type ToastContent = string | Partial<ToastOptions>;\n\n/**\n * Options for `toastHost.promise` — loading / success / error content\n * (success + error may be a fn of the settled value).\n */\nexport interface ToastPromiseOptions<T> {\n loading: ToastContent;\n success: ToastContent | ((value: T) => ToastContent);\n error: ToastContent | ((err: unknown) => ToastContent);\n /** Auto-dismiss (ms) for the settled toast; defaults to the ToastHost's `defaultDuration`. */\n duration?: number;\n}\n\nfunction normalizeContent(content: ToastContent): Partial<ToastOptions> {\n return typeof content === 'string' ? { title: content } : content;\n}\n\ninterface ToastEntry extends ToastOptions {\n id: string;\n /** Bumped on every `update` / dedup so the viewport can reset that toast's auto-dismiss timer. */\n nonce: number;\n}\n\ntype Listener = (toasts: ReadonlyArray<ToastEntry>) => void;\n\nclass ToastHostStore {\n private items: ReadonlyArray<ToastEntry> = [];\n private listeners = new Set<Listener>();\n private idSeq = 0;\n\n toast(opts: ToastOptions): string {\n if (opts.key !== undefined) {\n const existing = this.items.find((t) => t.key === opts.key);\n if (existing) {\n this.update(existing.id, opts);\n return existing.id;\n }\n }\n const id = `t_${++this.idSeq}`;\n this.items = [...this.items, { id, ...opts, nonce: 0 }];\n this.emit();\n return id;\n }\n\n /** Merges a patch into an existing toast (content + severity + duration), refreshing its timer. */\n update(id: string, patch: Partial<ToastOptions>): void {\n this.items = this.items.map((t) => (t.id === id ? { ...t, ...patch, nonce: t.nonce + 1 } : t));\n this.emit();\n }\n\n /** Shows a sticky loading toast; returns the full content-update and promise settlement chain. */\n promise<T>(promise: Promise<T>, opts: ToastPromiseOptions<T>): Promise<T> {\n const id = this.toast({ ...normalizeContent(opts.loading), severity: 'info', duration: Infinity });\n const settle = (content: ToastContent, severity: ToastSeverity) =>\n this.update(id, { ...normalizeContent(content), severity, duration: opts.duration });\n return promise.then(\n (value) => {\n settle(typeof opts.success === 'function' ? opts.success(value) : opts.success, 'success');\n return value;\n },\n (err: unknown) => {\n settle(typeof opts.error === 'function' ? opts.error(err) : opts.error, 'danger');\n throw err;\n },\n );\n }\n\n dismiss(id: string): void {\n const entry = this.items.find((t) => t.id === id);\n this.items = this.items.filter((t) => t.id !== id);\n try {\n entry?.onDismiss?.();\n } finally {\n this.emit();\n }\n }\n\n dismissAll(): void {\n const gone = this.items;\n this.items = [];\n try {\n for (const t of gone) t.onDismiss?.();\n } finally {\n this.emit();\n }\n }\n\n subscribe(fn: Listener): () => void {\n this.listeners.add(fn);\n fn(this.items);\n return () => {\n this.listeners.delete(fn);\n };\n }\n\n private emit() {\n for (const fn of this.listeners) fn(this.items);\n }\n}\n\nexport const toastHost = new ToastHostStore();\n\n/**\n * The imperative toast API, bound to the app-wide store. A plain object — the\n * store is a module singleton, so there is nothing per-instance to memoize.\n */\nexport function useToastHost() {\n return {\n toast: (opts: ToastOptions) => toastHost.toast(opts),\n update: (id: string, patch: Partial<ToastOptions>) => toastHost.update(id, patch),\n promise: <T,>(promise: Promise<T>, opts: ToastPromiseOptions<T>) => toastHost.promise(promise, opts),\n dismiss: (id: string) => toastHost.dismiss(id),\n dismissAll: () => toastHost.dismissAll(),\n };\n}\n\nconst PositionClasses = 'top-4 right-4 items-end';\n\n/** Toasts enter from the right; reduced-motion users get an instant swap. */\nconst MotionClasses =\n 'motion-safe:data-[state=open]:animate-(--animate-slide-in-right) motion-safe:data-[state=closed]:animate-(--animate-slide-out-right) motion-reduce:animate-none';\n\nexport interface ToastHostProps {\n /** @deprecated Toasts always anchor top-right. Accepted for one release, without changing placement. */\n readonly position?: OverlayPosition;\n readonly max?: number;\n /**\n * The auto-dismiss delay in ms for a severity missing from `durations`; per-toast `duration` overrides.\n * Default 5000. `Infinity` to disable.\n */\n readonly defaultDuration?: number;\n /**\n * The auto-dismiss delay in ms per severity; per-toast `duration` overrides, and a severity left out falls\n * back to `defaultDuration`. Default `DefaultToastDurations` — errors stay 8 seconds. Replaces, never merges.\n */\n readonly durations?: Readonly<Partial<Record<ToastSeverity, number>>>;\n readonly canPauseOnHover?: boolean;\n readonly gap?: number;\n /**\n * How each auto-dismissing toast shows its time left; a toast's `timer` overrides. Every display pauses with\n * the expiry timer and restarts when the toast updates; sticky toasts show none, and reduced motion drops the\n * bar and the ring. Custom `content` has no close button to sit beside, so it takes the bar for a ring or\n * seconds. Default `ToastTimer.None`.\n */\n readonly timer?: ToastTimer;\n /**\n * Shows a countdown bar along the bottom of each auto-dismissing toast.\n * @deprecated Use `timer` — `ToastTimer.Bar`.\n */\n readonly showProgress?: boolean;\n /** Shows each severity's glyph on toasts given no `icon`; a toast's `showSeverityIcon` overrides. Default `true`. */\n readonly showSeverityIcon?: boolean;\n}\n\ninterface VisibleToast extends ToastEntry {\n resolvedDuration: number;\n}\n\n/** Countdown fill per severity; the neutral countdown uses the brand primary. */\nconst ProgressClasses: Record<ToastSeverity, string> = {\n neutral: 'bg-primary',\n info: 'bg-info',\n success: 'bg-success',\n warning: 'bg-warning',\n danger: 'bg-destructive',\n};\n\n/** Countdown-ring stroke per severity — the bar's tones, drawn as an arc. */\nconst RingClasses: Record<ToastSeverity, string> = {\n neutral: 'stroke-primary',\n info: 'stroke-info',\n success: 'stroke-success',\n warning: 'stroke-warning',\n danger: 'stroke-destructive',\n};\n\n/** The ring's radius in the 16×16 view box; the circumference is the dash the countdown drains. */\nconst RingRadius = 6;\nconst RingCircumference = 2 * Math.PI * RingRadius;\n\n/** How often the seconds display re-reads its clock — a quarter second keeps a whole-second flip on time. */\nconst SecondsTickMs = 250;\n</script>\n\n<script setup lang=\"ts\">\nimport { useLocale } from '../../../foundation/i18n';\nimport {\n computed,\n defineComponent,\n h,\n onMounted,\n onUnmounted,\n ref,\n shallowRef,\n useAttrs,\n watch,\n type PropType,\n} from 'vue';\nimport { cn, OverlayPosition as OverlayPositionToken } from '../../../foundation/styles';\nimport { Announce, Portal, Presence } from '../../../foundation/primitives';\nimport Toast from '../toast/Toast.vue';\nimport ReportAction from '../reportAction/ReportAction.vue';\n\nconst locale = useLocale();\n\n/** Renders a `ToastNode` — either a plain string or a caller-built VNode. */\nconst ToastNodeView = defineComponent({\n name: 'ToastNodeView',\n props: { node: { type: [String, Object] as PropType<ToastNode>, required: true } },\n setup: (nodeProps) => () => nodeProps.node,\n});\n\n/** The props every countdown display shares — it mirrors the host's expiry timer, never drives it. */\nconst CountdownProps = {\n duration: { type: Number, required: true },\n paused: { type: Boolean, default: false },\n severity: { type: String as PropType<ToastSeverity>, default: 'neutral' },\n} as const;\n\n/**\n * Runs one Web Animations API countdown on a template ref, paused and resumed in step with the host's expiry\n * timer; environments without `animate` leave the element static at full.\n */\nfunction useCountdownAnimation(\n element: () => Element | null,\n keyframes: Keyframe[],\n countdown: { readonly duration: number; readonly paused: boolean },\n): void {\n let animation: Animation | undefined;\n onMounted(() => {\n const target = element();\n if (!target || typeof target.animate !== 'function') return;\n animation = target.animate(keyframes, { duration: countdown.duration, easing: 'linear', fill: 'forwards' });\n if (countdown.paused) animation.pause();\n });\n watch(\n () => countdown.paused,\n (isPaused) => {\n if (isPaused) animation?.pause();\n else animation?.play();\n },\n );\n onUnmounted(() => animation?.cancel());\n}\n\n/** The countdown bar — a scale transform draining along the toast's bottom edge. */\nconst ToastProgress = defineComponent({\n name: 'ToastProgress',\n props: CountdownProps,\n setup(countdown) {\n const fill = ref<HTMLElement | null>(null);\n useCountdownAnimation(() => fill.value, [{ transform: 'scaleX(1)' }, { transform: 'scaleX(0)' }], countdown);\n return () =>\n h(\n 'div',\n {\n 'aria-hidden': 'true',\n 'data-toast-progress': '',\n class: 'absolute inset-x-0 bottom-0 h-1 motion-reduce:hidden',\n },\n [\n h('div', {\n ref: fill,\n class: cn('h-full w-full origin-left opacity-80', ProgressClasses[countdown.severity]),\n }),\n ],\n );\n },\n});\n\n/** The countdown ring — an arc draining clockwise from twelve o'clock, drawn beside the close button. */\nconst ToastRing = defineComponent({\n name: 'ToastRing',\n props: CountdownProps,\n setup(countdown) {\n const arc = ref<SVGCircleElement | null>(null);\n useCountdownAnimation(\n () => arc.value,\n [{ strokeDashoffset: '0' }, { strokeDashoffset: `${RingCircumference}` }],\n countdown,\n );\n return () =>\n h(\n 'svg',\n {\n 'aria-hidden': 'true',\n 'data-toast-timer': ToastTimer.Ring,\n viewBox: '0 0 16 16',\n class: 'size-4 -rotate-90 motion-reduce:hidden',\n },\n [\n h('circle', { cx: 8, cy: 8, r: RingRadius, fill: 'none', 'stroke-width': 2, class: 'stroke-border' }),\n h('circle', {\n ref: arc,\n cx: 8,\n cy: 8,\n r: RingRadius,\n fill: 'none',\n 'stroke-width': 2,\n 'stroke-linecap': 'round',\n 'stroke-dasharray': `${RingCircumference}`,\n class: RingClasses[countdown.severity],\n }),\n ],\n );\n },\n});\n\n/**\n * The seconds display — the whole seconds left, rounded up so it reads `1s` until the toast goes. It keeps its\n * own clock, advancing only while unpaused; the announcement region already carries the toast, so it is hidden.\n */\nconst ToastSeconds = defineComponent({\n name: 'ToastSeconds',\n props: CountdownProps,\n setup(countdown) {\n const left = ref(countdown.duration);\n let lastTick = 0;\n let handle: number | undefined;\n const tick = () => {\n const now = Date.now();\n left.value = Math.max(0, left.value - (now - lastTick));\n lastTick = now;\n };\n const start = () => {\n if (handle !== undefined) return;\n lastTick = Date.now();\n handle = window.setInterval(tick, SecondsTickMs);\n };\n const stop = () => {\n if (handle === undefined) return;\n tick();\n window.clearInterval(handle);\n handle = undefined;\n };\n onMounted(() => {\n if (!countdown.paused) start();\n });\n watch(\n () => countdown.paused,\n (isPaused) => (isPaused ? stop() : start()),\n );\n onUnmounted(() => {\n if (handle !== undefined) window.clearInterval(handle);\n });\n return () =>\n h(\n 'span',\n {\n 'aria-hidden': 'true',\n 'data-toast-timer': ToastTimer.Seconds,\n class: 'text-xs tabular-nums text-muted-foreground',\n },\n `${Math.ceil(left.value / 1000)}s`,\n );\n },\n});\n\n/**\n * Renders the toast viewport — subscribes to the global `toastHost` store and stacks `Toast` cards.\n * Mount once, per app.\n *\n * A caller's `class` attr lands on the stack container.\n */\ndefineOptions({ name: 'ToastHost', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ToastHostProps>(), {\n position: OverlayPositionToken.TopRight,\n max: 5,\n defaultDuration: 5000,\n durations: () => DefaultToastDurations,\n canPauseOnHover: true,\n gap: 8,\n timer: undefined,\n showProgress: false,\n showSeverityIcon: true,\n});\n\nconst attrs = useAttrs();\n\nconst items = shallowRef<ReadonlyArray<ToastEntry>>([]);\nconst hovered = ref(false);\nconst focused = ref(false);\nconst paused = computed(() => props.canPauseOnHover && (hovered.value || focused.value));\n\n/* Non-reactive state — mutated across ticks, never rendered. */\nconst timers = new Map<string, number>();\nconst remaining = new Map<string, number>();\nconst startedAt = new Map<string, number>();\nconst nonces = new Map<string, number>();\n\nlet unsubscribe: (() => void) | undefined;\nonMounted(() => {\n unsubscribe = toastHost.subscribe((next) => {\n items.value = next;\n });\n});\n\n// Visible window (FIFO).\nconst visible = computed<ReadonlyArray<VisibleToast>>(() =>\n items.value.slice(0, props.max).map((t) => ({\n ...t,\n resolvedDuration: t.duration ?? props.durations[t.severity ?? 'neutral'] ?? props.defaultDuration,\n })),\n);\nconst visibleIds = computed(() => new Set(visible.value.map((v) => v.id)));\n\n// Toasts that just left `visible` (dismissed, or pushed out of the FIFO\n// window) but must still play their exit animation. Kept mounted with\n// `data-state=\"closed\"` until `Presence` unmounts the child — the `@vue:unmounted`\n// hook below then prunes the entry here.\nconst exiting = shallowRef<ReadonlyArray<VisibleToast>>([]);\nlet prevVisible: ReadonlyArray<VisibleToast> = [];\n\nwatch(\n visibleIds,\n (ids) => {\n const gone = prevVisible.filter((p) => !ids.has(p.id));\n prevVisible = visible.value;\n const current = exiting.value;\n const known = new Set(current.map((e) => e.id));\n // Add newly-gone toasts; drop any that re-entered `visible`.\n const merged = [...current, ...gone.filter((g) => !known.has(g.id))].filter((e) => !ids.has(e.id));\n if (merged.length !== current.length || !merged.every((e, i) => e.id === current[i]?.id)) {\n exiting.value = merged;\n }\n },\n { immediate: true, flush: 'post' },\n);\n\nconst removeExiting = (id: string) => {\n exiting.value = exiting.value.filter((e) => e.id !== id);\n};\n\n// Visible (present) first, then the ones animating out.\nconst rendered = computed<Array<VisibleToast & { present: boolean }>>(() => [\n ...visible.value.map((v) => ({ ...v, present: true })),\n ...exiting.value.map((e) => ({ ...e, present: false })),\n]);\n\nconst latestTitle = computed(() => {\n const last = visible.value[visible.value.length - 1];\n if (typeof last?.title === 'string') return last.title;\n if (typeof last?.description === 'string') return last.description;\n return '';\n});\n\n// Schedule auto-dismiss timers.\nwatch(\n [items, () => props.max, () => props.defaultDuration, () => props.durations, paused],\n () => {\n const ids = visibleIds.value;\n // Clear timers for items that are no longer visible.\n for (const [id, handle] of timers) {\n if (!ids.has(id)) {\n window.clearTimeout(handle);\n timers.delete(id);\n remaining.delete(id);\n startedAt.delete(id);\n }\n }\n for (const id of nonces.keys()) {\n if (!ids.has(id)) nonces.delete(id);\n }\n if (paused.value) return;\n // A content update / dedup bumps `nonce` — clear that toast's timer so it reschedules fresh.\n for (const v of visible.value) {\n const seen = nonces.get(v.id);\n if (seen !== undefined && seen !== v.nonce) {\n const handle = timers.get(v.id);\n if (handle !== undefined) window.clearTimeout(handle);\n timers.delete(v.id);\n remaining.delete(v.id);\n startedAt.delete(v.id);\n }\n nonces.set(v.id, v.nonce);\n }\n for (const v of visible.value) {\n if (v.resolvedDuration === Infinity) continue;\n if (timers.has(v.id)) continue;\n const left = remaining.get(v.id) ?? v.resolvedDuration;\n const handle = window.setTimeout(() => {\n toastHost.dismiss(v.id);\n }, left);\n timers.set(v.id, handle);\n startedAt.set(v.id, Date.now());\n remaining.set(v.id, left);\n }\n },\n { immediate: true, flush: 'post' },\n);\n\n// Cleanup on unmount.\nonUnmounted(() => {\n unsubscribe?.();\n for (const handle of timers.values()) window.clearTimeout(handle);\n timers.clear();\n});\n\nwatch(\n paused,\n (isPaused) => {\n if (!isPaused) return;\n for (const [id, handle] of timers) {\n window.clearTimeout(handle);\n const start = startedAt.get(id) ?? Date.now();\n remaining.set(id, Math.max(0, (remaining.get(id) ?? 0) - (Date.now() - start)));\n }\n timers.clear();\n },\n { flush: 'sync' },\n);\n\nwatch(\n () => rendered.value.length,\n (count) => {\n if (count === 0) {\n hovered.value = false;\n focused.value = false;\n }\n },\n);\n\nfunction onFocusout(event: FocusEvent): void {\n const stack = event.currentTarget as HTMLElement;\n if (!(event.relatedTarget instanceof Node) || !stack.contains(event.relatedTarget)) focused.value = false;\n}\n\nconst stackClasses = computed(() =>\n cn('pointer-events-none fixed z-toast flex flex-col', PositionClasses, attrs.class as string | undefined),\n);\n\nconst itemClasses = computed(() => cn('pointer-events-auto relative w-80 overflow-hidden rounded-md', MotionClasses));\n\n/** The display a toast asked for — its own `timer`, its deprecated `progress`, then the host's two. */\nfunction requestedTimer(t: VisibleToast): ToastTimer {\n if (t.timer !== undefined) return t.timer;\n if (t.progress !== undefined) return t.progress ? ToastTimer.Bar : ToastTimer.None;\n if (props.timer !== undefined) return props.timer;\n return props.showProgress ? ToastTimer.Bar : ToastTimer.None;\n}\n\n/**\n * The display a toast gets — none while exiting or sticky, and the bar for custom `content`, which has no close\n * button for a ring or seconds to sit beside.\n */\nfunction timerFor(t: VisibleToast & { present: boolean }): ToastTimer {\n if (!t.present || !Number.isFinite(t.resolvedDuration)) return ToastTimer.None;\n const requested = requestedTimer(t);\n return t.content && requested !== ToastTimer.None ? ToastTimer.Bar : requested;\n}\n\n/** Whether a toast's display sits beside the close button rather than along the bottom edge. */\nconst isTrailingTimer = (timer: ToastTimer): boolean => timer === ToastTimer.Ring || timer === ToastTimer.Seconds;\n\n/** Vue does not auto-suffix numeric style values with `px`. */\nconst stackStyle = computed(() => ({ gap: `${props.gap}px` }));\n</script>\n\n<template>\n <Portal>\n <div\n v-if=\"rendered.length > 0\"\n role=\"region\"\n :aria-label=\"locale.t('ToastHost.notifications', undefined, 'Notifications')\"\n :style=\"stackStyle\"\n :class=\"stackClasses\"\n @mouseenter=\"hovered = true\"\n @mouseleave=\"hovered = false\"\n @focusin=\"focused = true\"\n @focusout=\"onFocusout\"\n >\n <Presence v-for=\"t in rendered\" :key=\"t.id\" :is-present=\"t.present\">\n <!--\n `Presence` clones `data-state` onto this node and keeps it mounted\n until the exit animation ends; the `@vue:unmounted` hook is that\n \"exit finished\" signal (the read-only `Presence` API exposes no\n callback).\n -->\n <div :class=\"itemClasses\" @vue:unmounted=\"t.present ? undefined : removeExiting(t.id)\">\n <ToastNodeView v-if=\"t.content\" :node=\"t.content\" />\n <Toast\n v-else\n :severity=\"t.severity\"\n :show-severity-icon=\"t.showSeverityIcon ?? props.showSeverityIcon\"\n v-on=\"t.onDelete ? { delete: t.onDelete } : {}\"\n @close=\"toastHost.dismiss(t.id)\"\n >\n <template v-if=\"t.icon\" #icon><ToastNodeView :node=\"t.icon\" /></template>\n <template v-if=\"t.title\" #title><ToastNodeView :node=\"t.title\" /></template>\n <template v-if=\"t.description\" #description>\n <ToastNodeView :node=\"t.description\" />\n </template>\n <template v-if=\"t.action || t.report\" #actions>\n <ToastNodeView v-if=\"t.action\" :node=\"t.action\" />\n <ReportAction v-if=\"t.report\" :send=\"t.report\" />\n </template>\n <template v-if=\"isTrailingTimer(timerFor(t))\" #trailing>\n <ToastRing\n v-if=\"timerFor(t) === ToastTimer.Ring\"\n :key=\"`${t.id}:${t.nonce}`\"\n :duration=\"t.resolvedDuration\"\n :paused=\"paused\"\n :severity=\"t.severity ?? 'neutral'\"\n />\n <ToastSeconds\n v-else\n :key=\"`${t.id}:${t.nonce}`\"\n :duration=\"t.resolvedDuration\"\n :paused=\"paused\"\n :severity=\"t.severity ?? 'neutral'\"\n />\n </template>\n </Toast>\n <ToastProgress\n v-if=\"timerFor(t) === ToastTimer.Bar\"\n :key=\"`${t.id}:${t.nonce}`\"\n :duration=\"t.resolvedDuration\"\n :paused=\"paused\"\n :severity=\"t.severity ?? 'neutral'\"\n />\n </div>\n </Presence>\n </div>\n <Announce politeness=\"polite\">{{ latestTitle }}</Announce>\n </Portal>\n</template>\n"],"names":["_openBlock","_createElementBlock","_mergeProps","_renderSlot","SeverityToken","_createBlock","ToastSimple","_unref","_hoisted_1","Icon","_Fragment","_createTextVNode","_toDisplayString","_createElementVNode","_hoisted_2","_createVNode","Portal","_renderList","Toast","_toHandlers","ReportAction","Announce"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAiBA,UAAM,iBA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MAAA,aAAA,GAAA;AAAA;4BAAlB,MAAM,EAAE;AAAA,0BAAA;0BACpB,EAAE,uBAAtBF,YAAiDe,aAAA;AAAA;4BAAlB,MAAM,EAAE;AAAA,0BAAA;;;;sBAEzB,gBAAgB,SAAS,CAAC,CAAA;8BAAK;AAAA,oCAC7C,MAME;AAAA,0BALM,SAAS,CAAC,MAAM,WAAW,qBADnCf,YAMEE,MAAA,SAAA,GAAA;AAAA,4BAJC,QAAQ,EAAE,EAAE,IAAI,EAAE,KAAK;AAAA,4BACvB,UAAU,EAAE;AAAA,4BACZ,QAAQ,OAAA;AAAA,4BACR,UAAU,EAAE,YAAQ;AAAA,0BAAA,iEAEvBF,YAMEE,MAAA,YAAA,GAAA;AAAA,4BAJC,QAAQ,EAAE,EAAE,IAAI,EAAE,KAAK;AAAA,4BACvB,UAAU,EAAE;AAAA,4BACZ,QAAQ,OAAA;AAAA,4BACR,UAAU,EAAE,YAAQ;AAAA,0BAAA;;;;;oBAKnB,SAAS,CAAC,MAAM,WAAW,oBADnCF,YAMEE,MAAA,aAAA,GAAA;AAAA,sBAJC,QAAQ,EAAE,EAAE,IAAI,EAAE,KAAK;AAAA,sBACvB,UAAU,EAAE;AAAA,sBACZ,QAAQ,OAAA;AAAA,sBACR,UAAU,EAAE,YAAQ;AAAA,oBAAA;;;;;;;UAK7BQ,YAA0DR,MAAAc,WAAA,GAAA,EAAhD,YAAW,YAAQ;AAAA,6BAAC,MAAiB;AAAA,8CAAd,YAAA,KAAW,GAAA,CAAA;AAAA,YAAA;;;;;;;;;"}
@@ -170,6 +170,7 @@ const ToneFamily = {
170
170
  /** Refers to a low-alpha tinted fill + neutral border, no shadow. */
171
171
  Subtle: "subtle"
172
172
  };
173
+ const GlassFill = "bg-[color:var(--glass-fill,color-mix(in_oklab,var(--color-popover)_70%,transparent))]";
173
174
  const Tones = {
174
175
  /** Opaque tone bg + foreground. Used by `solid`, `elevated`, `flat`, button defaults. */
175
176
  solid: {
@@ -238,9 +239,10 @@ const Tones = {
238
239
  /**
239
240
  * Translucent fills use soft foregrounds, verified over background/card/popover/muted.
240
241
  * Custom colors and image backdrops require contrast verification by the caller.
242
+ * The neutral fill reads the theme's glass strength (`--glass-fill`); unset, it is the popover at 70%.
241
243
  */
242
244
  glass: {
243
- neutral: "bg-popover/70 text-popover-foreground",
245
+ neutral: `${GlassFill} text-popover-foreground`,
244
246
  primary: "bg-primary/30 text-primary-soft-foreground",
245
247
  danger: "bg-destructive/30 text-destructive-soft-foreground",
246
248
  success: "bg-success/30 text-success-soft-foreground",
@@ -249,7 +251,7 @@ const Tones = {
249
251
  },
250
252
  /** Glass + tone-accent border at 50% alpha. Same foreground reasoning as `glass`. */
251
253
  glassOutline: {
252
- neutral: "border-border/50 bg-popover/70 text-popover-foreground",
254
+ neutral: `border-border/50 ${GlassFill} text-popover-foreground`,
253
255
  primary: "border-primary/50 bg-primary/30 text-primary-soft-foreground",
254
256
  danger: "border-destructive/50 bg-destructive/30 text-destructive-soft-foreground",
255
257
  success: "border-success/50 bg-success/30 text-success-soft-foreground",
@@ -278,4 +280,4 @@ export {
278
280
  Tones as T,
279
281
  ToneFamily as a
280
282
  };
281
- //# sourceMappingURL=Tones-Bcz8dIo3.js.map
283
+ //# sourceMappingURL=Tones-BU9yaXKf.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tones-Bcz8dIo3.js","sources":["../../src/foundation/styles/extensions/CssExtensions.ts","../../src/foundation/styles/constants/Tones.ts"],"sourcesContent":["import type { CSSProperties } from 'vue';\nimport { Padding } from '../enums/StyleTokens';\n\n/** CSS-value extensions — types, token maps, resolvers. Call as `CssExtensions.x(...)`. */\n\n// =============================================================================\n// Tokens (enums + types — individually exported)\n// =============================================================================\n\n/* Padding token vocabulary — reuses the shared `Padding` enum (superset: adds `2xl`). */\nexport type PaddingToken = Padding;\n\n/**\n * Defines the corner-radius token vocabulary local to CSS resolvers — diverges from the shared `Radius`\n * (carries `xs`, omits `2xl`).\n */\nexport const RadiusToken = {\n /** Refers to no rounding (square corners). */\n None: 'none',\n /** Refers to an extra-small radius. */\n Xs: 'xs',\n /** Refers to a small radius. */\n Sm: 'sm',\n /** Refers to a medium radius. */\n Md: 'md',\n /** Refers to a large radius. */\n Lg: 'lg',\n /** Refers to an extra-large radius. */\n Xl: 'xl',\n /** Refers to a fully-rounded (pill) radius. */\n Full: 'full',\n} as const;\n\nexport type RadiusToken = (typeof RadiusToken)[keyof typeof RadiusToken];\n\nexport type SizeValue = string | number;\nexport type PaddingProp = PaddingToken | { x?: SizeValue; y?: SizeValue };\nexport type RadiusProp = RadiusToken | SizeValue;\nexport interface BoxSizeOverrides {\n width?: SizeValue;\n height?: SizeValue;\n minWidth?: SizeValue;\n minHeight?: SizeValue;\n maxWidth?: SizeValue;\n maxHeight?: SizeValue;\n /**\n * Shorthand for square boxes — applied as fallback for both `width` and `height`. Explicit `width`/`height`\n * win when both are set.\n */\n boxSize?: SizeValue;\n\n /** CSS `aspect-ratio`. String like `'16/9'` or number like `1.5`. Pairs naturally with a single width/height. */\n aspectRatio?: string | number;\n}\n\n/**\n * Defines the canonical size preset vocabulary — shared across components. Each component picks the subset it\n * supports via `Extract<SizePreset, ...>` and owns its internal dimension mapping.\n */\nexport const SizePreset = {\n /** Refers to the extra-small step. */\n Xs: 'xs',\n /** Refers to the small step. */\n Sm: 'sm',\n /** Refers to the medium (default) step. */\n Md: 'md',\n /** Refers to the large step. */\n Lg: 'lg',\n /** Refers to the extra-large step. */\n Xl: 'xl',\n /** Refers to the 2x extra-large step. */\n Xxl: '2xl',\n} as const;\n\nexport type SizePreset = (typeof SizePreset)[keyof typeof SizePreset];\n\n/** Defines the absolute-positioning preset — a 9-anchor value-set; pair with raw inset overrides. */\nexport const AbsolutePositionPreset = {\n /** Refers to the top-right corner. */\n TopRight: 'top-right',\n /** Refers to the top-left corner. */\n TopLeft: 'top-left',\n /** Refers to the bottom-right corner. */\n BottomRight: 'bottom-right',\n /** Refers to the bottom-left corner. */\n BottomLeft: 'bottom-left',\n /** Refers to the top edge, horizontally centered. */\n Top: 'top',\n /** Refers to the bottom edge, horizontally centered. */\n Bottom: 'bottom',\n /** Refers to the left edge, vertically centered. */\n Left: 'left',\n /** Refers to the right edge, vertically centered. */\n Right: 'right',\n /** Refers to the dead center. */\n Center: 'center',\n} as const;\n\nexport type AbsolutePositionPreset = (typeof AbsolutePositionPreset)[keyof typeof AbsolutePositionPreset];\n\nexport interface AbsoluteInsetOverrides {\n top?: SizeValue;\n right?: SizeValue;\n bottom?: SizeValue;\n left?: SizeValue;\n}\n\nexport type AbsolutePosition = AbsolutePositionPreset | AbsoluteInsetOverrides;\n\n// =============================================================================\n// Token → CSS maps\n// =============================================================================\n\nconst PaddingTokenToCss: Record<Exclude<PaddingToken, 'none' | '2xl'>, string> = {\n xs: '0.5rem',\n sm: '0.75rem',\n md: '1rem',\n lg: '1.5rem',\n xl: '2rem',\n};\n\nconst RadiusTokenToCss: Record<Exclude<RadiusToken, 'none' | 'full'>, string> = {\n xs: '0.125rem',\n sm: '0.25rem',\n md: '0.5rem',\n lg: '0.75rem',\n xl: '1rem',\n};\n\n// =============================================================================\n// Internal resolvers\n// =============================================================================\n\nfunction toCss(v: SizeValue): string {\n return typeof v === 'number' ? `${v}px` : v;\n}\n\nfunction resolvePadding(padding: PaddingProp | undefined): CSSProperties | undefined {\n if (!padding) return undefined;\n if (typeof padding === 'string') {\n if (padding === 'none') {\n return { paddingLeft: 0, paddingRight: 0, paddingTop: 0, paddingBottom: 0 };\n }\n // `2xl` is carried by the shared `Padding` enum but sits outside the inline rem map.\n const v = padding === '2xl' ? '3rem' : PaddingTokenToCss[padding];\n return { paddingLeft: v, paddingRight: v, paddingTop: v, paddingBottom: v };\n }\n const style: CSSProperties = {};\n if (padding.x !== undefined) {\n const v = toCss(padding.x);\n style.paddingLeft = v;\n style.paddingRight = v;\n }\n if (padding.y !== undefined) {\n const v = toCss(padding.y);\n style.paddingTop = v;\n style.paddingBottom = v;\n }\n return style;\n}\n\nfunction resolveRadius(radius: RadiusProp | undefined): CSSProperties | undefined {\n if (radius === undefined || radius === null) return undefined;\n if (typeof radius === 'number') return { borderRadius: `${radius}px` };\n if (radius === 'none') return { borderRadius: 0 };\n if (radius === 'full') return { borderRadius: '9999px' };\n if (Object.hasOwn(RadiusTokenToCss, radius)) {\n return {\n borderRadius: RadiusTokenToCss[radius as Exclude<RadiusToken, 'none' | 'full'>],\n };\n }\n return { borderRadius: radius };\n}\n\nfunction resolveBoxSize(overrides: BoxSizeOverrides): CSSProperties | undefined {\n const style: CSSProperties = {};\n let hasAny = false;\n // boxSize is the fallback for width AND height — explicit dims win.\n const effectiveWidth = overrides.width ?? overrides.boxSize;\n const effectiveHeight = overrides.height ?? overrides.boxSize;\n if (effectiveWidth !== undefined) {\n style.width = toCss(effectiveWidth);\n hasAny = true;\n }\n if (effectiveHeight !== undefined) {\n style.height = toCss(effectiveHeight);\n hasAny = true;\n }\n if (overrides.minWidth !== undefined) {\n style.minWidth = toCss(overrides.minWidth);\n hasAny = true;\n }\n if (overrides.minHeight !== undefined) {\n style.minHeight = toCss(overrides.minHeight);\n hasAny = true;\n }\n if (overrides.maxWidth !== undefined) {\n style.maxWidth = toCss(overrides.maxWidth);\n hasAny = true;\n }\n if (overrides.maxHeight !== undefined) {\n style.maxHeight = toCss(overrides.maxHeight);\n hasAny = true;\n }\n if (overrides.aspectRatio !== undefined) {\n style.aspectRatio = String(overrides.aspectRatio);\n hasAny = true;\n }\n return hasAny ? style : undefined;\n}\n\n/** Defines a size prop — a named preset, a raw value (applied as `boxSize`), or an explicit dim object. */\nexport type SizeUnion<P extends string> =\n | P\n | (string & {}) // keeps preset literals in autocomplete while accepting any CSS unit string\n | number\n | BoxSizeOverrides;\n\n/**\n * Parse a union-style size prop into (a) a preset name (if matched), or (b) a `BoxSizeOverrides` payload.\n *\n * Resolution order:\n * - `undefined` → `{}`\n * - object → `{ box: input }`\n * - preset string → `{ preset: input }`\n * - any other string → `{ box: { boxSize: input } }`\n * - number → `{ box: { boxSize: input } }`\n */\nfunction parseSizeUnion<P extends string>(\n input: SizeUnion<P> | undefined,\n presets: ReadonlySet<string>,\n): { preset?: P; box?: BoxSizeOverrides } {\n if (input === undefined) return {};\n if (typeof input === 'object' && input !== null) return { box: input };\n if (typeof input === 'string' && presets.has(input)) return { preset: input as P };\n if (typeof input === 'number' || typeof input === 'string') {\n return { box: { boxSize: input } };\n }\n return {};\n}\n\n// =============================================================================\n// Grouped namespace export\n// =============================================================================\n\nexport const CssExtensions = {\n toCss,\n resolvePadding,\n resolveRadius,\n resolveBoxSize,\n parseSizeUnion,\n PaddingTokenToCss,\n RadiusTokenToCss,\n} as const;\n","import type { Tone } from '../enums/StyleTokens';\n\n/* Contains the (variant-family × tone) → Tailwind class lookup shared between\n `surfaceVariants` and `buttonVariants` (and any future variant config). */\n\n/** Defines a tone-family — the variant group that picks the same bg/border/text palette. */\nexport const ToneFamily = {\n /** Refers to an opaque tone bg + foreground. */\n Solid: 'solid',\n /** Refers to a muted/tinted bg + tone-readable foreground. */\n Soft: 'soft',\n /** Refers to a popover bg + tone-accent border. */\n Surface: 'surface',\n /** Refers to a popover bg + a stronger tone border — open menus, listboxes and popovers. */\n Raised: 'raised',\n /** Refers to a transparent bg, tone border + tone text. */\n Outline: 'outline',\n /** Refers to a translucent tone bg + blur. */\n Glass: 'glass',\n /** Refers to a glass fill + tone-accent border at 50% alpha. */\n GlassOutline: 'glassOutline',\n /** Refers to a low-alpha tinted fill + neutral border, no shadow. */\n Subtle: 'subtle',\n} as const;\n\nexport type ToneFamily = (typeof ToneFamily)[keyof typeof ToneFamily];\n\n/** Contains the cross-engine palette: bg / text (+ border where applicable) per tone-family × tone. */\nexport const Tones: Record<ToneFamily, Record<Tone, string>> = {\n /** Opaque tone bg + foreground. Used by `solid`, `elevated`, `flat`, button defaults. */\n solid: {\n neutral: 'bg-popover text-popover-foreground',\n primary: 'bg-primary text-primary-foreground',\n danger: 'bg-destructive text-destructive-foreground',\n success: 'bg-success text-success-foreground',\n warning: 'bg-warning text-warning-foreground',\n info: 'bg-info text-info-foreground',\n },\n /**\n * Muted/tinted bg + tone-readable foreground.\n *\n * Pairs `bg-{tone}-soft` with `text-{tone}-soft-foreground`, the token minted for\n * exactly this background — `themes/Validate.ts` asserts that pair at AA. The\n * full-strength `text-{tone}` is a *solid*-fill foreground: on the soft tint it\n * measured 2.07:1 for `warning` and 3.15:1 for `success`.\n */\n soft: {\n neutral: 'bg-muted text-foreground',\n primary: 'bg-primary-soft text-primary-soft-foreground',\n danger: 'bg-destructive-soft text-destructive-soft-foreground',\n success: 'bg-success-soft text-success-soft-foreground',\n warning: 'bg-warning-soft text-warning-soft-foreground',\n info: 'bg-info-soft text-info-soft-foreground',\n },\n /** Popover bg + tone-accent border. The \"default\" subtle look. */\n surface: {\n neutral: 'border-border bg-popover text-popover-foreground',\n primary: 'border-primary/40 bg-popover text-popover-foreground',\n danger: 'border-destructive/40 bg-popover text-popover-foreground',\n success: 'border-success/40 bg-popover text-popover-foreground',\n warning: 'border-warning/40 bg-popover text-popover-foreground',\n info: 'border-info/40 bg-popover text-popover-foreground',\n },\n /**\n * Popover bg + a visible tone border. The fill differs from the `field` fill of the inputs an open menu covers\n * (in dark mode; light mode separates them by border and shadow), and the border reads at ~2:1 where `surface`'s\n * decorative border fades into a white page.\n */\n raised: {\n neutral: 'border-border-strong/60 bg-popover text-popover-foreground',\n primary: 'border-primary/60 bg-popover text-popover-foreground',\n danger: 'border-destructive/60 bg-popover text-popover-foreground',\n success: 'border-success/60 bg-popover text-popover-foreground',\n warning: 'border-warning/60 bg-popover text-popover-foreground',\n info: 'border-info/60 bg-popover text-popover-foreground',\n },\n /**\n * Transparent bg, tone border + tone text.\n *\n * The fill is transparent, so the text lands on whatever surface hosts the\n * component — the same situation `-soft-foreground` is toned for. Keeping the\n * border at full-strength `{tone}` preserves the tone read; only the text\n * darkens (light) / lightens (dark). Full-strength `text-{tone}` measured\n * 2.15:1 for `warning` on the default light background.\n */\n outline: {\n neutral: 'border-border text-foreground',\n primary: 'border-primary text-primary-soft-foreground',\n danger: 'border-destructive text-destructive-soft-foreground',\n success: 'border-success text-success-soft-foreground',\n warning: 'border-warning text-warning-soft-foreground',\n info: 'border-info text-info-soft-foreground',\n },\n /**\n * Translucent fills use soft foregrounds, verified over background/card/popover/muted.\n * Custom colors and image backdrops require contrast verification by the caller.\n */\n glass: {\n neutral: 'bg-popover/70 text-popover-foreground',\n primary: 'bg-primary/30 text-primary-soft-foreground',\n danger: 'bg-destructive/30 text-destructive-soft-foreground',\n success: 'bg-success/30 text-success-soft-foreground',\n warning: 'bg-warning/30 text-warning-soft-foreground',\n info: 'bg-info/30 text-info-soft-foreground',\n },\n /** Glass + tone-accent border at 50% alpha. Same foreground reasoning as `glass`. */\n glassOutline: {\n neutral: 'border-border/50 bg-popover/70 text-popover-foreground',\n primary: 'border-primary/50 bg-primary/30 text-primary-soft-foreground',\n danger: 'border-destructive/50 bg-destructive/30 text-destructive-soft-foreground',\n success: 'border-success/50 bg-success/30 text-success-soft-foreground',\n warning: 'border-warning/50 bg-warning/30 text-warning-soft-foreground',\n info: 'border-info/50 bg-info/30 text-info-soft-foreground',\n },\n /**\n * Low-alpha tinted fill + neutral `border-border`, no shadow. The understated\n * \"tinted panel / section band\" look — quieter than `soft`, flatter than `surface`.\n * Neutral fills from the muted token; coloured tones tint their `-soft` token at low alpha.\n */\n subtle: {\n neutral: 'border-border bg-muted/30 text-foreground',\n primary: 'border-primary/20 bg-primary-soft/60 text-foreground',\n danger: 'border-destructive/20 bg-destructive-soft/60 text-foreground',\n success: 'border-success/20 bg-success-soft/60 text-foreground',\n warning: 'border-warning/20 bg-warning-soft/60 text-foreground',\n info: 'border-info/20 bg-info-soft/60 text-foreground',\n },\n};\n"],"names":[],"mappings":"AAgBO,MAAM,cAAc;AAAA;AAAA,EAEzB,MAAM;AAAA;AAAA,EAEN,IAAI;AAAA;AAAA,EAEJ,IAAI;AAAA;AAAA,EAEJ,IAAI;AAAA;AAAA,EAEJ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EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOR,QAAQ;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,IACT,MAAM;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWR,SAAS;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,IACT,MAAM;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMR,OAAO;AAAA,IACL,SAAS;AAAA,IACT,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,IACT,MAAM;AAAA,EAAA;AAAA;AAAA,EAGR,cAAc;AAAA,IACZ,SAAS;AAAA,IACT,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,IACT,MAAM;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOR,QAAQ;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,IACT,MAAM;AAAA,EAAA;AAEV;"}
1
+ {"version":3,"file":"Tones-BU9yaXKf.js","sources":["../../src/foundation/styles/extensions/CssExtensions.ts","../../src/foundation/styles/constants/Tones.ts"],"sourcesContent":["import type { CSSProperties } from 'vue';\nimport { Padding } from '../enums/StyleTokens';\n\n/** CSS-value extensions — types, token maps, resolvers. Call as `CssExtensions.x(...)`. */\n\n// =============================================================================\n// Tokens (enums + types — individually exported)\n// =============================================================================\n\n/* Padding token vocabulary — reuses the shared `Padding` enum (superset: adds `2xl`). */\nexport type PaddingToken = Padding;\n\n/**\n * Defines the corner-radius token vocabulary local to CSS resolvers — diverges from the shared `Radius`\n * (carries `xs`, omits `2xl`).\n */\nexport const RadiusToken = {\n /** Refers to no rounding (square corners). */\n None: 'none',\n /** Refers to an extra-small radius. */\n Xs: 'xs',\n /** Refers to a small radius. */\n Sm: 'sm',\n /** Refers to a medium radius. */\n Md: 'md',\n /** Refers to a large radius. */\n Lg: 'lg',\n /** Refers to an extra-large radius. */\n Xl: 'xl',\n /** Refers to a fully-rounded (pill) radius. */\n Full: 'full',\n} as const;\n\nexport type RadiusToken = (typeof RadiusToken)[keyof typeof RadiusToken];\n\nexport type SizeValue = string | number;\nexport type PaddingProp = PaddingToken | { x?: SizeValue; y?: SizeValue };\nexport type RadiusProp = RadiusToken | SizeValue;\nexport interface BoxSizeOverrides {\n width?: SizeValue;\n height?: SizeValue;\n minWidth?: SizeValue;\n minHeight?: SizeValue;\n maxWidth?: SizeValue;\n maxHeight?: SizeValue;\n /**\n * Shorthand for square boxes — applied as fallback for both `width` and `height`. Explicit `width`/`height`\n * win when both are set.\n */\n boxSize?: SizeValue;\n\n /** CSS `aspect-ratio`. String like `'16/9'` or number like `1.5`. Pairs naturally with a single width/height. */\n aspectRatio?: string | number;\n}\n\n/**\n * Defines the canonical size preset vocabulary — shared across components. Each component picks the subset it\n * supports via `Extract<SizePreset, ...>` and owns its internal dimension mapping.\n */\nexport const SizePreset = {\n /** Refers to the extra-small step. */\n Xs: 'xs',\n /** Refers to the small step. */\n Sm: 'sm',\n /** Refers to the medium (default) step. */\n Md: 'md',\n /** Refers to the large step. */\n Lg: 'lg',\n /** Refers to the extra-large step. */\n Xl: 'xl',\n /** Refers to the 2x extra-large step. */\n Xxl: '2xl',\n} as const;\n\nexport type SizePreset = (typeof SizePreset)[keyof typeof SizePreset];\n\n/** Defines the absolute-positioning preset — a 9-anchor value-set; pair with raw inset overrides. */\nexport const AbsolutePositionPreset = {\n /** Refers to the top-right corner. */\n TopRight: 'top-right',\n /** Refers to the top-left corner. */\n TopLeft: 'top-left',\n /** Refers to the bottom-right corner. */\n BottomRight: 'bottom-right',\n /** Refers to the bottom-left corner. */\n BottomLeft: 'bottom-left',\n /** Refers to the top edge, horizontally centered. */\n Top: 'top',\n /** Refers to the bottom edge, horizontally centered. */\n Bottom: 'bottom',\n /** Refers to the left edge, vertically centered. */\n Left: 'left',\n /** Refers to the right edge, vertically centered. */\n Right: 'right',\n /** Refers to the dead center. */\n Center: 'center',\n} as const;\n\nexport type AbsolutePositionPreset = (typeof AbsolutePositionPreset)[keyof typeof AbsolutePositionPreset];\n\nexport interface AbsoluteInsetOverrides {\n top?: SizeValue;\n right?: SizeValue;\n bottom?: SizeValue;\n left?: SizeValue;\n}\n\nexport type AbsolutePosition = AbsolutePositionPreset | AbsoluteInsetOverrides;\n\n// =============================================================================\n// Token → CSS maps\n// =============================================================================\n\nconst PaddingTokenToCss: Record<Exclude<PaddingToken, 'none' | '2xl'>, string> = {\n xs: '0.5rem',\n sm: '0.75rem',\n md: '1rem',\n lg: '1.5rem',\n xl: '2rem',\n};\n\nconst RadiusTokenToCss: Record<Exclude<RadiusToken, 'none' | 'full'>, string> = {\n xs: '0.125rem',\n sm: '0.25rem',\n md: '0.5rem',\n lg: '0.75rem',\n xl: '1rem',\n};\n\n// =============================================================================\n// Internal resolvers\n// =============================================================================\n\nfunction toCss(v: SizeValue): string {\n return typeof v === 'number' ? `${v}px` : v;\n}\n\nfunction resolvePadding(padding: PaddingProp | undefined): CSSProperties | undefined {\n if (!padding) return undefined;\n if (typeof padding === 'string') {\n if (padding === 'none') {\n return { paddingLeft: 0, paddingRight: 0, paddingTop: 0, paddingBottom: 0 };\n }\n // `2xl` is carried by the shared `Padding` enum but sits outside the inline rem map.\n const v = padding === '2xl' ? '3rem' : PaddingTokenToCss[padding];\n return { paddingLeft: v, paddingRight: v, paddingTop: v, paddingBottom: v };\n }\n const style: CSSProperties = {};\n if (padding.x !== undefined) {\n const v = toCss(padding.x);\n style.paddingLeft = v;\n style.paddingRight = v;\n }\n if (padding.y !== undefined) {\n const v = toCss(padding.y);\n style.paddingTop = v;\n style.paddingBottom = v;\n }\n return style;\n}\n\nfunction resolveRadius(radius: RadiusProp | undefined): CSSProperties | undefined {\n if (radius === undefined || radius === null) return undefined;\n if (typeof radius === 'number') return { borderRadius: `${radius}px` };\n if (radius === 'none') return { borderRadius: 0 };\n if (radius === 'full') return { borderRadius: '9999px' };\n if (Object.hasOwn(RadiusTokenToCss, radius)) {\n return {\n borderRadius: RadiusTokenToCss[radius as Exclude<RadiusToken, 'none' | 'full'>],\n };\n }\n return { borderRadius: radius };\n}\n\nfunction resolveBoxSize(overrides: BoxSizeOverrides): CSSProperties | undefined {\n const style: CSSProperties = {};\n let hasAny = false;\n // boxSize is the fallback for width AND height — explicit dims win.\n const effectiveWidth = overrides.width ?? overrides.boxSize;\n const effectiveHeight = overrides.height ?? overrides.boxSize;\n if (effectiveWidth !== undefined) {\n style.width = toCss(effectiveWidth);\n hasAny = true;\n }\n if (effectiveHeight !== undefined) {\n style.height = toCss(effectiveHeight);\n hasAny = true;\n }\n if (overrides.minWidth !== undefined) {\n style.minWidth = toCss(overrides.minWidth);\n hasAny = true;\n }\n if (overrides.minHeight !== undefined) {\n style.minHeight = toCss(overrides.minHeight);\n hasAny = true;\n }\n if (overrides.maxWidth !== undefined) {\n style.maxWidth = toCss(overrides.maxWidth);\n hasAny = true;\n }\n if (overrides.maxHeight !== undefined) {\n style.maxHeight = toCss(overrides.maxHeight);\n hasAny = true;\n }\n if (overrides.aspectRatio !== undefined) {\n style.aspectRatio = String(overrides.aspectRatio);\n hasAny = true;\n }\n return hasAny ? style : undefined;\n}\n\n/** Defines a size prop — a named preset, a raw value (applied as `boxSize`), or an explicit dim object. */\nexport type SizeUnion<P extends string> =\n | P\n | (string & {}) // keeps preset literals in autocomplete while accepting any CSS unit string\n | number\n | BoxSizeOverrides;\n\n/**\n * Parse a union-style size prop into (a) a preset name (if matched), or (b) a `BoxSizeOverrides` payload.\n *\n * Resolution order:\n * - `undefined` → `{}`\n * - object → `{ box: input }`\n * - preset string → `{ preset: input }`\n * - any other string → `{ box: { boxSize: input } }`\n * - number → `{ box: { boxSize: input } }`\n */\nfunction parseSizeUnion<P extends string>(\n input: SizeUnion<P> | undefined,\n presets: ReadonlySet<string>,\n): { preset?: P; box?: BoxSizeOverrides } {\n if (input === undefined) return {};\n if (typeof input === 'object' && input !== null) return { box: input };\n if (typeof input === 'string' && presets.has(input)) return { preset: input as P };\n if (typeof input === 'number' || typeof input === 'string') {\n return { box: { boxSize: input } };\n }\n return {};\n}\n\n// =============================================================================\n// Grouped namespace export\n// =============================================================================\n\nexport const CssExtensions = {\n toCss,\n resolvePadding,\n resolveRadius,\n resolveBoxSize,\n parseSizeUnion,\n PaddingTokenToCss,\n RadiusTokenToCss,\n} as const;\n","import type { Tone } from '../enums/StyleTokens';\n\n/* Contains the (variant-family × tone) → Tailwind class lookup shared between\n `surfaceVariants` and `buttonVariants` (and any future variant config). */\n\n/** Defines a tone-family — the variant group that picks the same bg/border/text palette. */\nexport const ToneFamily = {\n /** Refers to an opaque tone bg + foreground. */\n Solid: 'solid',\n /** Refers to a muted/tinted bg + tone-readable foreground. */\n Soft: 'soft',\n /** Refers to a popover bg + tone-accent border. */\n Surface: 'surface',\n /** Refers to a popover bg + a stronger tone border — open menus, listboxes and popovers. */\n Raised: 'raised',\n /** Refers to a transparent bg, tone border + tone text. */\n Outline: 'outline',\n /** Refers to a translucent tone bg + blur. */\n Glass: 'glass',\n /** Refers to a glass fill + tone-accent border at 50% alpha. */\n GlassOutline: 'glassOutline',\n /** Refers to a low-alpha tinted fill + neutral border, no shadow. */\n Subtle: 'subtle',\n} as const;\n\nexport type ToneFamily = (typeof ToneFamily)[keyof typeof ToneFamily];\n\n/**\n * The neutral glass fill: the theme's `--glass-fill` when it sets one, else the popover at 70% — the SDK's own glass.\n * A literal class, so Tailwind finds it in the package source.\n */\nconst GlassFill = 'bg-[color:var(--glass-fill,color-mix(in_oklab,var(--color-popover)_70%,transparent))]';\n\n/** Contains the cross-engine palette: bg / text (+ border where applicable) per tone-family × tone. */\nexport const Tones: Record<ToneFamily, Record<Tone, string>> = {\n /** Opaque tone bg + foreground. Used by `solid`, `elevated`, `flat`, button defaults. */\n solid: {\n neutral: 'bg-popover text-popover-foreground',\n primary: 'bg-primary text-primary-foreground',\n danger: 'bg-destructive text-destructive-foreground',\n success: 'bg-success text-success-foreground',\n warning: 'bg-warning text-warning-foreground',\n info: 'bg-info text-info-foreground',\n },\n /**\n * Muted/tinted bg + tone-readable foreground.\n *\n * Pairs `bg-{tone}-soft` with `text-{tone}-soft-foreground`, the token minted for\n * exactly this background — `themes/Validate.ts` asserts that pair at AA. The\n * full-strength `text-{tone}` is a *solid*-fill foreground: on the soft tint it\n * measured 2.07:1 for `warning` and 3.15:1 for `success`.\n */\n soft: {\n neutral: 'bg-muted text-foreground',\n primary: 'bg-primary-soft text-primary-soft-foreground',\n danger: 'bg-destructive-soft text-destructive-soft-foreground',\n success: 'bg-success-soft text-success-soft-foreground',\n warning: 'bg-warning-soft text-warning-soft-foreground',\n info: 'bg-info-soft text-info-soft-foreground',\n },\n /** Popover bg + tone-accent border. The \"default\" subtle look. */\n surface: {\n neutral: 'border-border bg-popover text-popover-foreground',\n primary: 'border-primary/40 bg-popover text-popover-foreground',\n danger: 'border-destructive/40 bg-popover text-popover-foreground',\n success: 'border-success/40 bg-popover text-popover-foreground',\n warning: 'border-warning/40 bg-popover text-popover-foreground',\n info: 'border-info/40 bg-popover text-popover-foreground',\n },\n /**\n * Popover bg + a visible tone border. The fill differs from the `field` fill of the inputs an open menu covers\n * (in dark mode; light mode separates them by border and shadow), and the border reads at ~2:1 where `surface`'s\n * decorative border fades into a white page.\n */\n raised: {\n neutral: 'border-border-strong/60 bg-popover text-popover-foreground',\n primary: 'border-primary/60 bg-popover text-popover-foreground',\n danger: 'border-destructive/60 bg-popover text-popover-foreground',\n success: 'border-success/60 bg-popover text-popover-foreground',\n warning: 'border-warning/60 bg-popover text-popover-foreground',\n info: 'border-info/60 bg-popover text-popover-foreground',\n },\n /**\n * Transparent bg, tone border + tone text.\n *\n * The fill is transparent, so the text lands on whatever surface hosts the\n * component — the same situation `-soft-foreground` is toned for. Keeping the\n * border at full-strength `{tone}` preserves the tone read; only the text\n * darkens (light) / lightens (dark). Full-strength `text-{tone}` measured\n * 2.15:1 for `warning` on the default light background.\n */\n outline: {\n neutral: 'border-border text-foreground',\n primary: 'border-primary text-primary-soft-foreground',\n danger: 'border-destructive text-destructive-soft-foreground',\n success: 'border-success text-success-soft-foreground',\n warning: 'border-warning text-warning-soft-foreground',\n info: 'border-info text-info-soft-foreground',\n },\n /**\n * Translucent fills use soft foregrounds, verified over background/card/popover/muted.\n * Custom colors and image backdrops require contrast verification by the caller.\n * The neutral fill reads the theme's glass strength (`--glass-fill`); unset, it is the popover at 70%.\n */\n glass: {\n neutral: `${GlassFill} text-popover-foreground`,\n primary: 'bg-primary/30 text-primary-soft-foreground',\n danger: 'bg-destructive/30 text-destructive-soft-foreground',\n success: 'bg-success/30 text-success-soft-foreground',\n warning: 'bg-warning/30 text-warning-soft-foreground',\n info: 'bg-info/30 text-info-soft-foreground',\n },\n /** Glass + tone-accent border at 50% alpha. Same foreground reasoning as `glass`. */\n glassOutline: {\n neutral: `border-border/50 ${GlassFill} text-popover-foreground`,\n primary: 'border-primary/50 bg-primary/30 text-primary-soft-foreground',\n danger: 'border-destructive/50 bg-destructive/30 text-destructive-soft-foreground',\n success: 'border-success/50 bg-success/30 text-success-soft-foreground',\n warning: 'border-warning/50 bg-warning/30 text-warning-soft-foreground',\n info: 'border-info/50 bg-info/30 text-info-soft-foreground',\n },\n /**\n * Low-alpha tinted fill + neutral `border-border`, no shadow. The understated\n * \"tinted panel / section band\" look — quieter than `soft`, flatter than `surface`.\n * Neutral fills from the muted token; coloured tones tint their `-soft` token at low alpha.\n */\n subtle: {\n neutral: 'border-border bg-muted/30 text-foreground',\n primary: 'border-primary/20 bg-primary-soft/60 text-foreground',\n danger: 'border-destructive/20 bg-destructive-soft/60 text-foreground',\n success: 'border-success/20 bg-success-soft/60 text-foreground',\n warning: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A,IACJ,SAAS;AAAA,IACT,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,IACT,MAAM;AAAA,EAAA;AAAA;AAAA,EAGR,SAAS;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,IACT,MAAM;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOR,QAAQ;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,IACT,MAAM;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWR,SAAS;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,IACT,MAAM;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOR,OAAO;AAAA,IACL,SAAS,GAAG,SAAS;AAAA,IACrB,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,IACT,MAAM;AAAA,EAAA;AAAA;AAAA,EAGR,cAAc;AAAA,IACZ,SAAS,oBAAoB,SAAS;AAAA,IACtC,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,IACT,MAAM;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOR,QAAQ;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,IACT,MAAM;AAAA,EAAA;AAEV;"}
@@ -0,0 +1,29 @@
1
+ import { defineComponent, useAttrs, computed, openBlock, createElementBlock, mergeProps, renderSlot } from "vue";
2
+ import { c as cn } from "./Cn-C7De6POU.js";
3
+ const _sfc_main = /* @__PURE__ */ defineComponent({
4
+ ...{ name: "VisuallyHidden", inheritAttrs: false },
5
+ __name: "VisuallyHidden",
6
+ setup(__props) {
7
+ const attrs = useAttrs();
8
+ const classes = computed(
9
+ () => cn(
10
+ "absolute h-px w-px overflow-hidden whitespace-nowrap border-0 p-0",
11
+ "m-[-1px] [clip:rect(0_0_0_0)] [clip-path:inset(50%)]",
12
+ attrs.class
13
+ )
14
+ );
15
+ const rest = computed(() => {
16
+ const { class: _class, ...others } = attrs;
17
+ return others;
18
+ });
19
+ return (_ctx, _cache) => {
20
+ return openBlock(), createElementBlock("span", mergeProps(rest.value, { class: classes.value }), [
21
+ renderSlot(_ctx.$slots, "default")
22
+ ], 16);
23
+ };
24
+ }
25
+ });
26
+ export {
27
+ _sfc_main as _
28
+ };
29
+ //# sourceMappingURL=VisuallyHidden.vue_vue_type_script_setup_true_lang-SZseKI7j.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VisuallyHidden.vue_vue_type_script_setup_true_lang-SZseKI7j.js","sources":["../../src/foundation/primitives/visuallyHidden/VisuallyHidden.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { HTMLAttributes } from 'vue';\n\nexport type VisuallyHiddenProps = HTMLAttributes;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport { cn } from '../../styles/Cn';\n\n/**\n * Renders the slot in a visually hidden span — content removed from the visual\n * layout but still announced to screen readers. Use for accessible labels on\n * icon-only affordances and live-region announcements.\n *\n * `inheritAttrs: false` so a caller's `class` goes through `cn` (tailwind-merge\n * resolves the conflict) instead of being blindly concatenated by Vue's\n * automatic class fallthrough — a caller's `p-2` must be able to beat `p-0`.\n */\ndefineOptions({ name: 'VisuallyHidden', inheritAttrs: false });\n\ndefineSlots<{\n /** The content announced to screen readers but hidden from view. */\n default(): unknown;\n}>();\n\nconst attrs = useAttrs();\n\nconst classes = computed(() =>\n cn(\n 'absolute h-px w-px overflow-hidden whitespace-nowrap border-0 p-0',\n 'm-[-1px] [clip:rect(0_0_0_0)] [clip-path:inset(50%)]',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n</script>\n\n<template>\n <span v-bind=\"rest\" :class=\"classes\"><slot /></span>\n</template>\n"],"names":["_openBlock","_createElementBlock","_mergeProps","_renderSlot"],"mappings":";;;;;;AA0BA,UAAM,QAAQ,SAAA;AAEd,UAAM,UAAU;AAAA,MAAS,MACvB;AAAA,QACE;AAAA,QACA;AAAA,QACA,MAAM;AAAA,MAAA;AAAA,IACR;AAIF,UAAM,OAAO,SAAS,MAAM;AAC1B,YAAM,EAAE,OAAO,QAAQ,GAAG,WAAW;AACrC,aAAO;AAAA,IACT,CAAC;;AAIC,aAAAA,UAAA,GAAAC,mBAAoD,QAApDC,WAAoD,YAAlC,EAAG,OAAO,QAAA,MAAA,CAAO,GAAA;AAAA,QAAEC,WAAQ,KAAA,QAAA,SAAA;AAAA,MAAA;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { c as cn } from "./Cn-C7De6POU.js";
2
- import { A as AbsolutePositionPreset, C as CssExtensions, R as RadiusToken, S as SizePreset, a as ToneFamily, T as Tones } from "./Tones-Bcz8dIo3.js";
2
+ import { A as AbsolutePositionPreset, C as CssExtensions, R as RadiusToken, S as SizePreset, a as ToneFamily, T as Tones } from "./Tones-BU9yaXKf.js";
3
3
  import { C as ColorExtensions, a as ColorTone } from "./ColorExtensions-DiCSaVbJ.js";
4
- import { S as SurfaceVariant, s as surfaceVariants } from "./SurfaceStyles-BYvRlsWe.js";
4
+ import { S as SurfaceVariant, s as surfaceVariants } from "./SurfaceStyles-DUVz963_.js";
5
5
  import { P as Padding, R as Radius, S as Size, T as Tone } from "./StyleTokens-Bkz7Dm5L.js";
6
6
  import { S as Severity } from "./Severity-D0C5oAt-.js";
7
7
  import { O as Orientation } from "./Orientation-u-sYunuG.js";
@@ -87,4 +87,4 @@ export {
87
87
  index as i,
88
88
  layerStyle as l
89
89
  };
90
- //# sourceMappingURL=index-CGIXFfl9.js.map
90
+ //# sourceMappingURL=index-Bk5JPh5t.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-CGIXFfl9.js","sources":["../../src/foundation/styles/constants/Layers.ts","../../src/foundation/styles/enums/Density.ts"],"sourcesContent":["/* Provides semantic z-index tiers — the single source of truth for stacking order. */\n\n/** Contains the semantic z-index tiers; matching `z-{name}` utilities ship via @theme. */\nexport const Layer = {\n /** Slips under the base layer; visually hidden. */\n Hide: -1,\n /** Sits in the default DOM flow with no z-index applied. */\n Base: 0,\n /** Slightly elevates over siblings — badges, sticky list items, in-grid overlays. */\n Raised: 10,\n /** Pins widgets inside a section — panels, inline overlays. */\n Docked: 20,\n /** Anchors a page-level sticky header or footer. */\n Sticky: 30,\n /** Hosts system banners — cookie notice, status banner, persistent Fab. */\n Banner: 40,\n /** Hosts dropdowns, popovers, comboboxes, menus, hover-cards anchored to a trigger. */\n Dropdown: 50,\n /** Dims the page behind a modal — backdrop / scrim layer. */\n Overlay: 60,\n /** Hosts modal / dialog / drawer / sheet content above its backdrop. */\n Modal: 70,\n /** Hosts popovers / menus opened FROM inside a modal — must beat Modal. */\n Popover: 80,\n /** Hosts toasts, snackbars, undo bars — survives above modals. */\n Toast: 90,\n /** Hosts tooltips and live-cursors — highest functional layer. */\n Tooltip: 100,\n /** Hosts DevTools / design-system inspector overlays — always wins. */\n Debug: 9999,\n} as const;\n\n/** Represents the name of a semantic z-index tier. */\nexport type LayerName = keyof typeof Layer;\n\n/** Provides an inline `style` object for programmatic z-index assignment. */\nexport function layerStyle(layer: LayerName): { zIndex: number } {\n return { zIndex: Layer[layer] };\n}\n","/**\n * Defines the density scale an app or a region renders at, set with `data-density` on any element.\n *\n * Every spacing utility — control heights, padding, gaps — derives from Tailwind's `--spacing`, so one attribute\n * rescales everything inside it; type sizes stay put. `comfortable` is the default scale.\n */\nexport const Density = {\n /** Refers to 87.5% spacing — dense tools and tables. The smallest controls can fall under a 24px target. */\n Compact: 'compact',\n /** Refers to the default spacing. */\n Comfortable: 'comfortable',\n /** Refers to 112.5% spacing — reading and touch-first surfaces. */\n Spacious: 'spacious',\n} as const;\n\nexport type Density = (typeof Density)[keyof typeof Density];\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAGO,MAAM,QAAQ;AAAA;AAAA,EAEnB,MAAM;AAAA;AAAA,EAEN,MAAM;AAAA;AAAA,EAEN,QAAQ;AAAA;AAAA,EAER,QAAQ;AAAA;AAAA,EAER,QAAQ;AAAA;AAAA,EAER,QAAQ;AAAA;AAAA,EAER,UAAU;AAAA;AAAA,EAEV,SAAS;AAAA;AAAA,EAET,OAAO;AAAA;AAAA,EAEP,SAAS;AAAA;AAAA,EAET,OAAO;AAAA;AAAA,EAEP,SAAS;AAAA;AAAA,EAET,OAAO;AACT;AAMO,SAAS,WAAW,OAAsC;AAC/D,SAAO,EAAE,QAAQ,MAAM,KAAK,EAAA;AAC9B;AChCO,MAAM,UAAU;AAAA;AAAA,EAErB,SAAS;AAAA;AAAA,EAET,aAAa;AAAA;AAAA,EAEb,UAAU;AACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index-Bk5JPh5t.js","sources":["../../src/foundation/styles/constants/Layers.ts","../../src/foundation/styles/enums/Density.ts"],"sourcesContent":["/* Provides semantic z-index tiers — the single source of truth for stacking order. */\n\n/** Contains the semantic z-index tiers; matching `z-{name}` utilities ship via @theme. */\nexport const Layer = {\n /** Slips under the base layer; visually hidden. */\n Hide: -1,\n /** Sits in the default DOM flow with no z-index applied. */\n Base: 0,\n /** Slightly elevates over siblings — badges, sticky list items, in-grid overlays. */\n Raised: 10,\n /** Pins widgets inside a section — panels, inline overlays. */\n Docked: 20,\n /** Anchors a page-level sticky header or footer. */\n Sticky: 30,\n /** Hosts system banners — cookie notice, status banner, persistent Fab. */\n Banner: 40,\n /** Hosts dropdowns, popovers, comboboxes, menus, hover-cards anchored to a trigger. */\n Dropdown: 50,\n /** Dims the page behind a modal — backdrop / scrim layer. */\n Overlay: 60,\n /** Hosts modal / dialog / drawer / sheet content above its backdrop. */\n Modal: 70,\n /** Hosts popovers / menus opened FROM inside a modal — must beat Modal. */\n Popover: 80,\n /** Hosts toasts, snackbars, undo bars — survives above modals. */\n Toast: 90,\n /** Hosts tooltips and live-cursors — highest functional layer. */\n Tooltip: 100,\n /** Hosts DevTools / design-system inspector overlays — always wins. */\n Debug: 9999,\n} as const;\n\n/** Represents the name of a semantic z-index tier. */\nexport type LayerName = keyof typeof Layer;\n\n/** Provides an inline `style` object for programmatic z-index assignment. */\nexport function layerStyle(layer: LayerName): { zIndex: number } {\n return { zIndex: Layer[layer] };\n}\n","/**\n * Defines the density scale an app or a region renders at, set with `data-density` on any element.\n *\n * Every spacing utility — control heights, padding, gaps — derives from Tailwind's `--spacing`, so one attribute\n * rescales everything inside it; type sizes stay put. `comfortable` is the default scale.\n */\nexport const Density = {\n /** Refers to 87.5% spacing — dense tools and tables. The smallest controls can fall under a 24px target. */\n Compact: 'compact',\n /** Refers to the default spacing. */\n Comfortable: 'comfortable',\n /** Refers to 112.5% spacing — reading and touch-first surfaces. */\n Spacious: 'spacious',\n} as const;\n\nexport type Density = (typeof Density)[keyof typeof Density];\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAGO,MAAM,QAAQ;AAAA;AAAA,EAEnB,MAAM;AAAA;AAAA,EAEN,MAAM;AAAA;AAAA,EAEN,QAAQ;AAAA;AAAA,EAER,QAAQ;AAAA;AAAA,EAER,QAAQ;AAAA;AAAA,EAER,QAAQ;AAAA;AAAA,EAER,UAAU;AAAA;AAAA,EAEV,SAAS;AAAA;AAAA,EAET,OAAO;AAAA;AAAA,EAEP,SAAS;AAAA;AAAA,EAET,OAAO;AAAA;AAAA,EAEP,SAAS;AAAA;AAAA,EAET,OAAO;AACT;AAMO,SAAS,WAAW,OAAsC;AAC/D,SAAO,EAAE,QAAQ,MAAM,KAAK,EAAA;AAC9B;AChCO,MAAM,UAAU;AAAA;AAAA,EAErB,SAAS;AAAA;AAAA,EAET,aAAa;AAAA;AAAA,EAEb,UAAU;AACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -349,15 +349,39 @@ function ambientDeclaration(layers, indent = " ") {
349
349
  return layers ? `
350
350
  ${indent}--theme-ambient: ${layers};` : "";
351
351
  }
352
+ const GlassProperties = [
353
+ ["fill", "--glass-fill"],
354
+ ["sideFill", "--glass-side-fill"],
355
+ ["menuFill", "--glass-menu-fill"],
356
+ ["blur", "--glass-blur"],
357
+ ["saturate", "--glass-saturate"],
358
+ ["edge", "--glass-edge"],
359
+ ["highlight", "--glass-highlight"],
360
+ ["shadow", "--glass-shadow"],
361
+ ["menuShadow", "--glass-menu-shadow"]
362
+ ];
363
+ function glassDeclarations(tokens, indent = " ") {
364
+ if (!tokens) return "";
365
+ const lines = [];
366
+ for (const [key, property] of GlassProperties) {
367
+ const value = tokens[key];
368
+ if (value === void 0) continue;
369
+ const isShadow = key === "shadow" || key === "menuShadow";
370
+ const declared = isShadow && tokens.highlight !== void 0 ? `${value}, inset 0 1px 0 var(--glass-highlight)` : value;
371
+ lines.push(`
372
+ ${indent}${property}: ${declared};`);
373
+ }
374
+ return lines.join("");
375
+ }
352
376
  function themeToCss(theme) {
353
377
  const radius = radiusDeclarations(theme);
354
378
  const id = theme.id.replace(/[^a-zA-Z0-9_-]/gu, (character) => `\\${character.codePointAt(0).toString(16)} `);
355
379
  const selector = `.theme-${id}`;
356
380
  const light = `${selector} {
357
- ${declarations(theme.light)}${radius}${ambientDeclaration(theme.ambient?.light)}
381
+ ${declarations(theme.light)}${radius}${ambientDeclaration(theme.ambient?.light)}${glassDeclarations(theme.glass?.light)}
358
382
  }`;
359
383
  const dark = `.dark${selector}, .dark ${selector} {
360
- ${declarations(theme.dark)}${ambientDeclaration(theme.ambient?.dark)}
384
+ ${declarations(theme.dark)}${ambientDeclaration(theme.ambient?.dark)}${glassDeclarations(theme.glass?.dark)}
361
385
  }`;
362
386
  return `${light}
363
387
 
@@ -754,6 +778,30 @@ const ocharoAmbient = {
754
778
  "radial-gradient(ellipse 40% 35% at 70% 8%, #8a6f9e14, transparent 75%)"
755
779
  ].join(", ")
756
780
  };
781
+ const ocharoGlass = {
782
+ light: {
783
+ fill: "rgb(255 255 255 / 0.84)",
784
+ sideFill: "rgb(255 255 255 / 0.6)",
785
+ menuFill: "rgb(255 255 255 / 0.92)",
786
+ blur: "24px",
787
+ saturate: "120%",
788
+ edge: "rgb(24 27 37 / 0.08)",
789
+ highlight: "rgb(255 255 255 / 0.9)",
790
+ shadow: "0 10px 30px rgb(24 27 37 / 0.06)",
791
+ menuShadow: "0 18px 50px rgb(24 27 37 / 0.16)"
792
+ },
793
+ dark: {
794
+ fill: "rgb(41 41 45 / 0.9)",
795
+ sideFill: "rgb(33 33 37 / 0.7)",
796
+ menuFill: "rgb(41 41 45 / 0.96)",
797
+ blur: "24px",
798
+ saturate: "100%",
799
+ edge: "rgb(255 255 255 / 0.07)",
800
+ highlight: "rgb(255 255 255 / 0.06)",
801
+ shadow: "0 12px 32px rgb(0 0 0 / 0.25)",
802
+ menuShadow: "0 20px 60px rgb(0 0 0 / 0.5)"
803
+ }
804
+ };
757
805
  const ocharo = {
758
806
  id: "ocharo",
759
807
  name: "Ocharo",
@@ -763,6 +811,7 @@ const ocharo = {
763
811
  dark: ocharoDark,
764
812
  radius: ThemeRadius.Lg,
765
813
  ambient: ocharoAmbient,
814
+ glass: ocharoGlass,
766
815
  status: ThemeStatus.Candidate,
767
816
  meta: validateTheme({ light: ocharoLight, dark: ocharoDark })
768
817
  };
@@ -2187,4 +2236,4 @@ export {
2187
2236
  validatedThemes as u,
2188
2237
  validateTheme as v
2189
2238
  };
2190
- //# sourceMappingURL=index-DA17sNzP.js.map
2239
+ //# sourceMappingURL=index-CRV9gpyX.js.map