@wow-two-beta/fe 0.0.32 → 0.0.33

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 (47) hide show
  1. package/dist/chunks/Alert.vue_vue_type_script_setup_true_lang-CoLxB2dM.js +155 -0
  2. package/dist/chunks/Alert.vue_vue_type_script_setup_true_lang-CoLxB2dM.js.map +1 -0
  3. package/dist/chunks/{FieldHelperText.vue_vue_type_script_setup_true_lang-B-G5rNMG.js → ColorSwatchPreview.vue_vue_type_script_setup_true_lang-Btd7KUEw.js} +70 -230
  4. package/dist/chunks/ColorSwatchPreview.vue_vue_type_script_setup_true_lang-Btd7KUEw.js.map +1 -0
  5. package/dist/chunks/{ErrorBoundary.vue_vue_type_script_setup_true_lang-Dv9wOZmk.js → ErrorBoundary.vue_vue_type_script_setup_true_lang-E72RRrNG.js} +87 -233
  6. package/dist/chunks/ErrorBoundary.vue_vue_type_script_setup_true_lang-E72RRrNG.js.map +1 -0
  7. package/dist/chunks/FieldHelperText.vue_vue_type_script_setup_true_lang-2IDI_JgQ.js +216 -0
  8. package/dist/chunks/FieldHelperText.vue_vue_type_script_setup_true_lang-2IDI_JgQ.js.map +1 -0
  9. package/dist/chunks/{KanbanCard.vue_vue_type_script_setup_true_lang-DKgIhFwh.js → KanbanCard.vue_vue_type_script_setup_true_lang-BrQFyOiU.js} +177 -223
  10. package/dist/chunks/KanbanCard.vue_vue_type_script_setup_true_lang-BrQFyOiU.js.map +1 -0
  11. package/dist/chunks/MasonryLayout.vue_vue_type_script_setup_true_lang-BmWwoZrv.js.map +1 -1
  12. package/dist/chunks/TypedConfirmField.vue_vue_type_script_setup_true_lang-DXCZlnlM.js +447 -0
  13. package/dist/chunks/TypedConfirmField.vue_vue_type_script_setup_true_lang-DXCZlnlM.js.map +1 -0
  14. package/dist/chunks/{LightboxModal.vue_vue_type_script_setup_true_lang-CP7Or4sf.js → TypedConfirmModal.vue_vue_type_script_setup_true_lang-CoIaH_xx.js} +299 -108
  15. package/dist/chunks/TypedConfirmModal.vue_vue_type_script_setup_true_lang-CoIaH_xx.js.map +1 -0
  16. package/dist/chunks/{MentionInput.vue_vue_type_script_setup_true_lang-D8Ja7QjX.js → UseTypedConfirmation-CvY2T4Up.js} +331 -582
  17. package/dist/chunks/UseTypedConfirmation-CvY2T4Up.js.map +1 -0
  18. package/dist/foundation/http/ApiDecoderExtensions.d.ts +22 -0
  19. package/dist/foundation/http/ApiFailureExtensions.d.ts +22 -0
  20. package/dist/foundation/http/ProblemDetailsExtensions.d.ts +31 -0
  21. package/dist/foundation/http/index.d.ts +3 -0
  22. package/dist/foundation/http/index.js +93 -2
  23. package/dist/foundation/http/index.js.map +1 -1
  24. package/dist/index.js +632 -627
  25. package/dist/index.js.map +1 -1
  26. package/dist/presentation/display/index.js +158 -157
  27. package/dist/presentation/display/index.js.map +1 -1
  28. package/dist/presentation/feedback/index.js +43 -42
  29. package/dist/presentation/feedback/index.js.map +1 -1
  30. package/dist/presentation/forms/index.d.ts +1 -0
  31. package/dist/presentation/forms/index.js +139 -137
  32. package/dist/presentation/forms/tagsInput/TagsInput.vue.d.ts +1 -1
  33. package/dist/presentation/forms/typedConfirmField/TypedConfirmField.vue.d.ts +61 -0
  34. package/dist/presentation/forms/typedConfirmField/UseTypedConfirmation.d.ts +32 -0
  35. package/dist/presentation/forms/typedConfirmField/index.d.ts +2 -0
  36. package/dist/presentation/overlays/index.d.ts +1 -0
  37. package/dist/presentation/overlays/index.js +6 -5
  38. package/dist/presentation/overlays/typedConfirmModal/TypedConfirmModal.vue.d.ts +64 -0
  39. package/dist/presentation/overlays/typedConfirmModal/index.d.ts +1 -0
  40. package/package.json +1 -1
  41. package/dist/chunks/ErrorBoundary.vue_vue_type_script_setup_true_lang-Dv9wOZmk.js.map +0 -1
  42. package/dist/chunks/FieldHelperText.vue_vue_type_script_setup_true_lang-B-G5rNMG.js.map +0 -1
  43. package/dist/chunks/KanbanCard.vue_vue_type_script_setup_true_lang-DKgIhFwh.js.map +0 -1
  44. package/dist/chunks/LightboxModal.vue_vue_type_script_setup_true_lang-CP7Or4sf.js.map +0 -1
  45. package/dist/chunks/ListboxPicker.variants-hiMcl66_.js +0 -44
  46. package/dist/chunks/ListboxPicker.variants-hiMcl66_.js.map +0 -1
  47. package/dist/chunks/MentionInput.vue_vue_type_script_setup_true_lang-D8Ja7QjX.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"LightboxModal.vue_vue_type_script_setup_true_lang-CP7Or4sf.js","sources":["../../src/presentation/overlays/modal/ModalTrigger.vue","../../src/presentation/overlays/OverlayHeader.vue","../../src/presentation/overlays/OverlayDescription.vue","../../src/presentation/overlays/OverlayBody.vue","../../src/presentation/overlays/OverlayFooter.vue","../../src/presentation/overlays/alertModal/AlertModal.vue","../../src/presentation/overlays/alertModal/AlertModalContent.vue","../../src/presentation/overlays/alertModal/AlertModalAction.vue","../../src/presentation/overlays/alertModal/AlertModalCancel.vue","../../src/presentation/overlays/drawer/DrawerTrigger.vue","../../src/presentation/overlays/popover/PopoverArrow.vue","../../src/presentation/overlays/confirmPopover/ConfirmPopover.vue","../../src/presentation/overlays/hoverCard/HoverCard.vue","../../src/presentation/overlays/hoverCard/HoverCardTrigger.vue","../../src/presentation/overlays/hoverCard/HoverCardContent.vue","../../src/presentation/overlays/hoverCard/HoverCardArrow.vue","../../src/presentation/overlays/actionSheet/ActionSheet.vue","../../src/presentation/overlays/actionSheet/ActionSheetAction.vue","../../src/presentation/overlays/actionSheet/ActionSheetCancel.vue","../../src/presentation/overlays/bottomSheet/BottomSheet.vue","../../src/presentation/overlays/commandPaletteModal/CommandPaletteModalContext.ts","../../src/presentation/overlays/commandPaletteModal/CommandPaletteModal.vue","../../src/presentation/overlays/commandPaletteModal/CommandPaletteModalContent.vue","../../src/presentation/overlays/commandPaletteModal/CommandPaletteModalInput.vue","../../src/presentation/overlays/commandPaletteModal/CommandPaletteModalList.vue","../../src/presentation/overlays/commandPaletteModal/CommandPaletteModalGroup.vue","../../src/presentation/overlays/commandPaletteModal/CommandPaletteModalItem.vue","../../src/presentation/overlays/commandPaletteModal/CommandPaletteModalEmpty.vue","../../src/presentation/overlays/commandPaletteModal/CommandPaletteModalSeparator.vue","../../src/presentation/overlays/lightboxModal/LightboxModal.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * The prop surface of `ModalTrigger`.\n *\n * React declared `extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>`;\n * attributes reach the root through `useAttrs` here, so only `asChild` remains.\n */\nexport interface ModalTriggerProps {\n /** Merge onto the single slot child instead of rendering a `<button>`. */\n readonly asChild?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { resolveElement } from '../../../foundation/dom';\nimport { computed, useAttrs, useTemplateRef, watch, type ComponentPublicInstance } from 'vue';\nimport { OverlayExtensions } from '../OverlayExtensions';\nimport { Primitive } from '../../../foundation/primitives';\nimport { useModalContext } from './Modal.vue';\n\n/** Renders the control that opens the enclosing `Modal` and takes focus back on close. */\ndefineOptions({ name: 'ModalTrigger', inheritAttrs: false });\n\n/** The trigger content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<ModalTriggerProps>(), { asChild: false });\n\nconst attrs = useAttrs();\nconst context = useModalContext();\nconst inner = useTemplateRef<ComponentPublicInstance>('inner');\n\n/* Lifted to a setup const so the template auto-unwraps it (a plain injected object does not). */\nconst isOpen = context.open;\n\n/* React composed a ref onto the trigger to seed `ctx.triggerRef`; a post-flush watch is the equivalent. */\nwatch(\n inner,\n (instance) => {\n context.triggerEl.value = OverlayExtensions.toHtmlElement(instance?.$el);\n },\n { immediate: true, flush: 'post' },\n);\n\n/**\n * `@click` is declared after `v-bind=\"attrs\"`, so Vue chains the caller's own\n * handler first and this one second — React's `onClick?.(e)` order, which is\n * what makes the `defaultPrevented` opt-out work.\n */\nfunction handleClick(event: MouseEvent): void {\n if (event.defaultPrevented) return;\n context.setOpen(true);\n}\n\n/** `Primitive` renders the real element, so its `$el` is this component's root. */\nconst el = computed(() => resolveElement(inner.value));\n\ndefineExpose({ el });\n</script>\n\n<template>\n <Primitive\n ref=\"inner\"\n as=\"button\"\n :as-child=\"props.asChild\"\n type=\"button\"\n aria-haspopup=\"dialog\"\n :aria-expanded=\"isOpen\"\n :data-state=\"isOpen ? 'open' : 'closed'\"\n v-bind=\"attrs\"\n @click=\"handleClick\"\n >\n <slot />\n </Primitive>\n</template>\n","<script lang=\"ts\">\n/**\n * The prop surface of `OverlayHeader`.\n *\n * React declared `extends HTMLAttributes<HTMLDivElement>` plus `children`;\n * attributes reach the root through `useAttrs` here and `children` is the\n * default slot, which leaves no declared prop.\n */\nexport type OverlayHeaderProps = Record<string, never>;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../foundation/styles';\n\n/** Renders the stacked title and description region at the top of a Modal / Drawer panel. */\ndefineOptions({ name: 'OverlayHeader', inheritAttrs: false });\n\n/** The header content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst classes = computed(() => cn('mb-4 flex shrink-0 flex-col gap-1.5', attrs.class as string | undefined));\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\" v-bind=\"rest\" :class=\"classes\"><slot /></div>\n</template>\n","<script lang=\"ts\">\n/**\n * The prop surface of `OverlayDescription`.\n *\n * React declared `extends HTMLAttributes<HTMLParagraphElement>` plus `children`;\n * attributes reach the root through `useAttrs` here and `children` is the\n * default slot, which leaves no declared prop.\n */\nexport type OverlayDescriptionProps = Record<string, never>;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../foundation/styles';\nimport { useOverlayChromeContext } from './OverlayChrome';\n\n/** Renders the enclosing dialog's accessible description, carrying the `id` `aria-describedby` names. */\ndefineOptions({ name: 'OverlayDescription', inheritAttrs: false });\n\n/** The description text — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst context = useOverlayChromeContext();\nconst el = useTemplateRef<HTMLParagraphElement>('el');\n\nconst classes = computed(() => cn('text-sm text-muted-foreground', attrs.class as string | undefined));\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 <!-- `id` sits before `v-bind`, so a caller-supplied `id` still wins — React's prop order. -->\n <p ref=\"el\" :id=\"context.descriptionId\" v-bind=\"rest\" :class=\"classes\"><slot /></p>\n</template>\n","<script lang=\"ts\">\n/**\n * The prop surface of `OverlayBody`.\n *\n * React declared `extends HTMLAttributes<HTMLDivElement>` plus `children`;\n * attributes reach the root through `useAttrs` here and `children` is the\n * default slot, which leaves no declared prop.\n */\nexport type OverlayBodyProps = Record<string, never>;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../foundation/styles';\n\n/** Renders the main content region of a Modal / Drawer panel. */\ndefineOptions({ name: 'OverlayBody', inheritAttrs: false });\n\n/** The body content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\n/* In a height-capped panel the body is what scrolls; the inline padding keeps focus rings inside its clip. */\nconst classes = computed(() =>\n cn('-mx-1 min-h-0 flex-1 overflow-y-auto px-1 text-sm text-foreground', attrs.class as string | undefined),\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\" v-bind=\"rest\" :class=\"classes\"><slot /></div>\n</template>\n","<script lang=\"ts\">\n/**\n * The prop surface of `OverlayFooter`.\n *\n * React declared `extends HTMLAttributes<HTMLDivElement>` plus `children`;\n * attributes reach the root through `useAttrs` here and `children` is the\n * default slot, which leaves no declared prop.\n */\nexport type OverlayFooterProps = Record<string, never>;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../foundation/styles';\n\n/** Renders the trailing action row of a Modal / Drawer panel — stacked on narrow, right-aligned from `sm`. */\ndefineOptions({ name: 'OverlayFooter', inheritAttrs: false });\n\n/** The footer content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst classes = computed(() =>\n cn('mt-6 flex shrink-0 flex-col-reverse gap-2 sm:flex-row sm:justify-end', attrs.class as string | undefined),\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\" v-bind=\"rest\" :class=\"classes\"><slot /></div>\n</template>\n","<script lang=\"ts\">\nimport type { ModalProps } from '../modal';\n\n/**\n * The prop surface of `AlertModal` — `Modal`'s, minus the two axes an alert\n * dialog fixes: `role` is always `alertdialog` and outside-click dismissal is\n * always off, so a destructive confirmation cannot be dismissed by accident.\n */\nexport type AlertModalProps = Omit<ModalProps, 'role' | 'dismissOnOutsideClick'>;\n</script>\n\n<script setup lang=\"ts\">\nimport Modal from '../modal/Modal.vue';\n\n/** Renders a confirmation dialog — a `Modal` locked to `role=\"alertdialog\"`, outside-click dismissal off. */\ndefineOptions({ name: 'AlertModal', inheritAttrs: false });\n\n/** The AlertModal tree — `ModalTrigger` and `AlertModalContent`. React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\n/** Same `undefined` defaults as `Modal` — an absent `Boolean` prop must not read as an explicit `false`. */\nconst props = withDefaults(defineProps<AlertModalProps>(), {\n open: undefined,\n defaultOpen: false,\n dismissOnEscape: true,\n});\n\nconst emit = defineEmits<{\n /** Fires when the dialog opens or closes — the `v-model:open` half. */\n 'update:open': [open: boolean];\n}>();\n\nfunction handleOpenChange(open: boolean): void {\n emit('update:open', open);\n}\n</script>\n\n<template>\n <Modal\n :open=\"props.open\"\n :default-open=\"props.defaultOpen\"\n :dismiss-on-escape=\"props.dismissOnEscape\"\n role=\"alertdialog\"\n :dismiss-on-outside-click=\"false\"\n @update:open=\"handleOpenChange\"\n >\n <slot />\n </Modal>\n</template>\n","<script lang=\"ts\">\nimport type { ModalContentProps } from '../modal';\n\n/** The prop surface of `AlertModalContent` — `ModalContent`'s, with `phoneLayout` defaulting to `sheet`. */\nexport type AlertModalContentProps = ModalContentProps;\n</script>\n\n<script setup lang=\"ts\">\nimport { resolveElement } from '../../../foundation/dom';\nimport { computed, useAttrs, useTemplateRef, type ComponentPublicInstance } from 'vue';\nimport ModalContent, { ModalPhoneLayout } from '../modal/ModalContent.vue';\n\n/**\n * Renders the alert dialog's panel — `ModalContent`, opening as a bottom sheet on phones; the alert semantics live\n * on the root.\n */\ndefineOptions({ name: 'AlertModalContent', inheritAttrs: false });\n\n/** The panel content — chrome subcomponents and the dialog body. React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\n/* Absent booleans stay `undefined`: a cast `false` would forward `showBackdrop: false` and drop the scrim. */\nconst props = withDefaults(defineProps<AlertModalContentProps>(), {\n showBackdrop: undefined,\n hideBackdrop: undefined,\n isBlurred: undefined,\n phoneLayout: ModalPhoneLayout.Sheet,\n showHandle: undefined,\n});\n\nconst attrs = useAttrs();\nconst inner = useTemplateRef<ComponentPublicInstance & { el?: unknown }>('inner');\n\n/** Declared props first, attrs (including `class`) after, so a caller's attribute wins — React's spread order. */\nconst forwarded = computed(() => ({ ...props, ...attrs }));\n\nconst el = computed(() => resolveElement(inner.value));\n\ndefineExpose({ el });\n</script>\n\n<template>\n <ModalContent ref=\"inner\" v-bind=\"forwarded\"><slot /></ModalContent>\n</template>\n","<script lang=\"ts\">\n/**\n * The prop surface of `AlertModalAction`.\n *\n * React declared `extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>`\n * plus an `onAction` callback; attributes reach the root through `useAttrs` here\n * and `onAction` is the `action` emit, which leaves no declared prop.\n */\nexport type AlertModalActionProps = Record<string, never>;\n</script>\n\n<script setup lang=\"ts\">\nimport { resolveElement } from '../../../foundation/dom';\nimport { computed, useAttrs, useTemplateRef, type ComponentPublicInstance } from 'vue';\nimport { cn } from '../../../foundation/styles';\nimport OverlayCloseButton from '../OverlayCloseButton.vue';\n\n/** Renders the confirming button of an `AlertModal`; it fires `action`, then closes the dialog. */\ndefineOptions({ name: 'AlertModalAction', inheritAttrs: false });\n\n/** The button label — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst emit = defineEmits<{\n /** Fires when the reader confirms the action, just before the dialog closes. */\n action: [];\n}>();\n\nconst attrs = useAttrs();\nconst inner = useTemplateRef<ComponentPublicInstance & { el?: unknown }>('inner');\n\n/**\n * Passed on to `OverlayCloseButton`, which merges it over its own chrome the way\n * React's `ModalClose` did — `cn` resolves the two, last-in wins per utility.\n */\nconst classes = computed(() =>\n cn(\n 'inline-flex h-9 items-center justify-center rounded-md bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring',\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\n/**\n * Declared after `v-bind=\"rest\"`, so Vue chains the caller's own handler first\n * and this one second; `OverlayCloseButton`'s close runs last. React's order.\n */\nfunction handleClick(event: MouseEvent): void {\n if (event.defaultPrevented) return;\n emit('action');\n}\n\nconst el = computed(() => resolveElement(inner.value));\n\ndefineExpose({ el });\n</script>\n\n<template>\n <OverlayCloseButton ref=\"inner\" as-child>\n <button v-bind=\"rest\" type=\"button\" :class=\"classes\" @click=\"handleClick\">\n <slot />\n </button>\n </OverlayCloseButton>\n</template>\n","<script lang=\"ts\">\n/**\n * The prop surface of `AlertModalCancel`.\n *\n * React declared `extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>`;\n * attributes reach the root through `useAttrs` here, which leaves no declared prop.\n */\nexport type AlertModalCancelProps = Record<string, never>;\n</script>\n\n<script setup lang=\"ts\">\nimport { resolveElement } from '../../../foundation/dom';\nimport { computed, useAttrs, useTemplateRef, type ComponentPublicInstance } from 'vue';\nimport { cn } from '../../../foundation/styles';\nimport OverlayCloseButton from '../OverlayCloseButton.vue';\n\n/** Renders the dismissing button of an `AlertModal`; it closes the dialog without firing an action. */\ndefineOptions({ name: 'AlertModalCancel', inheritAttrs: false });\n\n/** The button label — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst inner = useTemplateRef<ComponentPublicInstance & { el?: unknown }>('inner');\n\n/**\n * Passed on to `OverlayCloseButton`, which merges it over its own chrome the way\n * React's `ModalClose` did — `cn` resolves the two, last-in wins per utility.\n */\nconst classes = computed(() =>\n cn(\n 'inline-flex h-9 items-center justify-center rounded-md border border-border bg-background px-4 text-sm font-medium text-foreground transition-colors hover:bg-muted focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring',\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\nconst el = computed(() => resolveElement(inner.value));\n\ndefineExpose({ el });\n</script>\n\n<template>\n <OverlayCloseButton ref=\"inner\" as-child>\n <button v-bind=\"rest\" type=\"button\" :class=\"classes\"><slot /></button>\n </OverlayCloseButton>\n</template>\n","<script lang=\"ts\">\n/**\n * The prop surface of `DrawerTrigger`.\n *\n * React declared `extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>`;\n * attributes reach the root through `useAttrs` here, so only `asChild` remains.\n */\nexport interface DrawerTriggerProps {\n /** Merge onto the single slot child instead of rendering a `<button>`. */\n readonly asChild?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { resolveElement } from '../../../foundation/dom';\nimport { computed, useAttrs, useTemplateRef, watch, type ComponentPublicInstance } from 'vue';\nimport { OverlayExtensions } from '../OverlayExtensions';\nimport { Primitive } from '../../../foundation/primitives';\nimport { useDrawerContext } from './Drawer.vue';\n\n/** Renders the control that opens the enclosing `Drawer` and takes focus back on close. */\ndefineOptions({ name: 'DrawerTrigger', inheritAttrs: false });\n\n/** The trigger content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<DrawerTriggerProps>(), { asChild: false });\n\nconst attrs = useAttrs();\nconst context = useDrawerContext();\nconst inner = useTemplateRef<ComponentPublicInstance>('inner');\n\n/* Lifted to a setup const so the template auto-unwraps it (a plain injected object does not). */\nconst isOpen = context.open;\n\n/* React composed a ref onto the trigger to seed `ctx.triggerRef`; a post-flush watch is the equivalent. */\nwatch(\n inner,\n (instance) => {\n context.triggerEl.value = OverlayExtensions.toHtmlElement(instance?.$el);\n },\n { immediate: true, flush: 'post' },\n);\n\n/**\n * `@click` is declared after `v-bind=\"attrs\"`, so Vue chains the caller's own\n * handler first and this one second — React's `onClick?.(e)` order, which is\n * what makes the `defaultPrevented` opt-out work.\n */\nfunction handleClick(event: MouseEvent): void {\n if (event.defaultPrevented) return;\n context.setOpen(true);\n}\n\n/** `Primitive` renders the real element, so its `$el` is this component's root. */\nconst el = computed(() => resolveElement(inner.value));\n\ndefineExpose({ el });\n</script>\n\n<template>\n <Primitive\n ref=\"inner\"\n as=\"button\"\n :as-child=\"props.asChild\"\n type=\"button\"\n aria-haspopup=\"dialog\"\n :aria-expanded=\"isOpen\"\n :data-state=\"isOpen ? 'open' : 'closed'\"\n v-bind=\"attrs\"\n @click=\"handleClick\"\n >\n <slot />\n </Primitive>\n</template>\n","<script lang=\"ts\">\n/** The prop surface of `PopoverArrow` — the `OverlayArrow` primitive's, unchanged. */\nexport interface PopoverArrowProps {\n /** The arrow width in px. Default 12. */\n readonly width?: number;\n\n /** The arrow height in px. Default 6. */\n readonly height?: number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport { cn } from '../../../foundation/styles';\nimport { OverlayArrow } from '../../../foundation/primitives';\n\n/** Renders a tip arrow tinted to the popover surface; pair with Floating UI's `arrow()` to place it. */\ndefineOptions({ name: 'PopoverArrow', inheritAttrs: false });\n\nconst props = defineProps<PopoverArrowProps>();\n\nconst attrs = useAttrs();\n\nconst classes = computed(() => cn('text-popover', attrs.class as string | undefined));\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 <OverlayArrow :width=\"props.width\" :height=\"props.height\" v-bind=\"rest\" :class=\"classes\" />\n</template>\n","<script lang=\"ts\">\nimport type { Placement } from '@floating-ui/vue';\nimport type { ColorTone } from '../../../foundation/styles';\n\n/** Defines props for the inline confirmation popover. */\nexport interface ConfirmPopoverProps {\n /** The open state, controlled. The `v-model:open` binding target. */\n readonly open?: boolean;\n\n /** The initial open state when uncontrolled. Default `false`. */\n readonly defaultOpen?: boolean;\n\n /** The question the popover asks — it names the panel. */\n readonly title: string;\n\n /** The consequence spelled out under the title. The `#description` slot is the rich override. */\n readonly description?: string;\n\n /** The confirm button text. Default `\"Confirm\"`, localized. */\n readonly confirmLabel?: string;\n\n /** The cancel button text. Default `\"Cancel\"`, localized. */\n readonly cancelLabel?: string;\n\n /** The confirm button tone. Default `primary`; `danger` marks a destructive action. */\n readonly tone?: ColorTone;\n\n /** The Floating UI placement. Default `top`. */\n readonly placement?: Placement;\n\n /** The distance between the trigger and the panel in px. Default 8. */\n readonly offset?: number;\n\n /** The disabled state — the trigger does not open the popover. */\n readonly isDisabled?: boolean;\n\n /**\n * Runs when the reader confirms. Returning a promise keeps the popover open with a busy confirm button\n * until it settles: it closes on resolve and stays open on reject, emitting `error`.\n *\n * Kept a PROP, not an emit: the popover awaits what it RETURNS, which an emit cannot carry. `@confirm`\n * binds it all the same.\n */\n readonly onConfirm?: () => unknown;\n}\n\n/** @internal Whether a value can be awaited. */\nfunction isThenable(value: unknown): value is PromiseLike<unknown> {\n return (\n (typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n typeof (value as PromiseLike<unknown>).then === 'function'\n );\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onScopeDispose, shallowRef, useAttrs, useSlots } from 'vue';\nimport { useLocaleDefaults } from '../../../foundation/i18n';\nimport { useId } from '../../../foundation/identifiers';\nimport { useControlled } from '../../../foundation/state';\nimport Button from '../../actions/button/Button.vue';\nimport Popover from '../popover/Popover.vue';\nimport PopoverContent from '../popover/PopoverContent.vue';\nimport PopoverTrigger from '../popover/PopoverTrigger.vue';\n\n/**\n * Renders its trigger and, once pressed, an anchored panel that asks the reader to confirm or cancel one\n * action — a lighter, non-modal sibling of `AlertModal` for actions whose context is the trigger itself.\n */\ndefineOptions({ name: 'ConfirmPopover', inheritAttrs: false });\n\ndefineSlots<{\n /** The trigger — one element, merged through `as-child`. */\n default(): unknown;\n\n /** The rich override for the `description` prop. */\n description?(): unknown;\n}>();\n\nconst componentProps = withDefaults(defineProps<ConfirmPopoverProps>(), {\n open: undefined,\n defaultOpen: false,\n description: undefined,\n tone: 'primary',\n placement: 'top',\n offset: 8,\n isDisabled: false,\n onConfirm: undefined,\n});\nconst props = useLocaleDefaults(componentProps, 'ConfirmPopover', { confirmLabel: 'Confirm', cancelLabel: 'Cancel' });\n\nconst emit = defineEmits<{\n /** Fires when the popover opens or closes — the `v-model:open` half. */\n 'update:open': [open: boolean];\n\n /** Fires when the reader dismisses without confirming — Cancel, Escape or an outside press. */\n cancel: [];\n\n /** Fires when `onConfirm` throws or its promise rejects; the popover stays open. */\n error: [error: unknown];\n}>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst titleId = useId();\nconst descriptionId = useId();\n\nconst controlled = useControlled<boolean>({\n controlled: () => props.open,\n default: () => props.defaultOpen,\n onChange: (value) => {\n emit('update:open', value);\n },\n});\n\nconst isOpen = controlled.value;\n\n/** Whether a confirmation is awaiting its promise. */\nconst isPending = shallowRef(false);\n\n/** @internal Bumped on every settle-relevant change, so a stale promise cannot close a newer request. */\nlet attempt = 0;\n\nconst hasDescription = computed(() => Boolean(props.description) || Boolean(slots.description));\n\nonScopeDispose(() => {\n attempt += 1;\n});\n\n/** Opens or dismisses the popover; a dismissal of an open popover reports `cancel`. */\nfunction requestOpen(next: boolean): void {\n if (next && props.isDisabled) return;\n if (!next && isPending.value) return;\n const wasOpen = isOpen.value;\n controlled.setValue(next);\n if (wasOpen && !next) emit('cancel');\n}\n\n/** Runs the confirm callback, awaits a returned promise and closes once it resolves. */\nasync function confirm(): Promise<void> {\n if (isPending.value) return;\n const current = ++attempt;\n let outcome: unknown;\n try {\n outcome = props.onConfirm?.();\n } catch (error) {\n emit('error', error);\n return;\n }\n if (isThenable(outcome)) {\n isPending.value = true;\n try {\n await outcome;\n } catch (error) {\n if (current !== attempt) return;\n isPending.value = false;\n emit('error', error);\n return;\n }\n if (current !== attempt) return;\n isPending.value = false;\n }\n controlled.setValue(false);\n}\n</script>\n\n<template>\n <Popover\n :open=\"isOpen\"\n :placement=\"props.placement\"\n :offset=\"props.offset\"\n :dismiss-on-escape=\"!isPending\"\n :dismiss-on-outside-click=\"!isPending\"\n @update:open=\"requestOpen\"\n >\n <PopoverTrigger as-child :aria-disabled=\"props.isDisabled || undefined\">\n <slot />\n </PopoverTrigger>\n <PopoverContent\n :aria-labelledby=\"titleId\"\n :aria-describedby=\"hasDescription ? descriptionId : undefined\"\n :aria-busy=\"isPending || undefined\"\n v-bind=\"attrs\"\n >\n <div class=\"space-y-3\">\n <div class=\"space-y-1\">\n <p :id=\"titleId\" class=\"text-sm font-medium text-foreground\">{{ props.title }}</p>\n <p v-if=\"hasDescription\" :id=\"descriptionId\" class=\"text-sm text-muted-foreground\">\n <slot name=\"description\">{{ props.description }}</slot>\n </p>\n </div>\n <div class=\"flex justify-end gap-2\">\n <Button variant=\"ghost\" size=\"sm\" :is-disabled=\"isPending\" @click=\"requestOpen(false)\">\n {{ props.cancelLabel }}\n </Button>\n <Button variant=\"solid\" size=\"sm\" :tone=\"props.tone\" :is-loading=\"isPending\" @click=\"confirm\">\n {{ props.confirmLabel }}\n </Button>\n </div>\n </div>\n </PopoverContent>\n </Popover>\n</template>\n","<script lang=\"ts\">\nimport { inject, type ComputedRef, type InjectionKey, type Ref, type ShallowRef } from 'vue';\nimport type { Placement } from '@floating-ui/vue';\n\n/** The value shared with `HoverCardTrigger` / `HoverCardContent`. */\nexport interface HoverCardContextValue {\n /** The resolved open state. Writable — an assignment routes through `setOpen`. */\n open: Ref<boolean>;\n setOpen: (open: boolean) => void;\n /** The trigger element — the positioning anchor. */\n triggerEl: ShallowRef<HTMLElement | null>;\n /** Opens after `openDelay`. */\n show: () => void;\n /** Closes after `closeDelay`. */\n hide: () => void;\n /** Cancels a pending close — the pointer moved onto the card. */\n cancelHide: () => void;\n placement: ComputedRef<Placement>;\n offset: ComputedRef<number>;\n}\n\nexport const hoverCardContextKey: InjectionKey<HoverCardContextValue> = Symbol('wow-two.hoverCard');\n\nexport function useHoverCardContext(): HoverCardContextValue {\n const context = inject(hoverCardContextKey, null);\n if (!context) throw new Error('HoverCard.* must be used inside <HoverCard>');\n return context;\n}\n\n/** Controlled axes use their canonical Vue model names; each update event requests caller state. */\nexport interface HoverCardProps {\n /** The open state, controlled. The `v-model:open` binding target. */\n readonly open?: boolean;\n\n /** The initial open state when uncontrolled. Default `false`. */\n readonly defaultOpen?: boolean;\n\n /** The hover dwell before opening, in ms. Default 700. */\n readonly openDelay?: number;\n\n /** The grace period before closing, in ms. Default 300. */\n readonly closeDelay?: number;\n\n /** The Floating UI placement. Default `bottom`. */\n readonly placement?: Placement;\n\n /** The distance between anchor and card in px. Default 8. */\n readonly offset?: number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onScopeDispose, provide, shallowRef } from 'vue';\nimport { useControlled } from '../../../foundation/state';\nimport { useEscape } from '../../../foundation/shortcuts';\n\n/**\n * Renders only its slot, owning the open state and hover timing of the HoverCard tree below it.\n * React returned a bare context Provider, which has no element of its own.\n */\ndefineOptions({ name: 'HoverCard', inheritAttrs: false });\n\n/** The HoverCard tree — `HoverCardTrigger` and `HoverCardContent`. React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\n/** `open` default to `undefined` so an absent prop cannot read as an explicit `false`. */\nconst props = withDefaults(defineProps<HoverCardProps>(), {\n open: undefined,\n defaultOpen: false,\n openDelay: 700,\n closeDelay: 300,\n placement: 'bottom',\n offset: 8,\n});\n\nconst emit = defineEmits<{\n /** Fires when the card opens or closes — the `v-model:open` half. */\n 'update:open': [open: boolean];\n}>();\n\nconst controlled = useControlled<boolean>({\n controlled: () => props.open,\n default: () => props.defaultOpen,\n onChange: (value) => {\n emit('update:open', value);\n },\n});\n\nconst triggerEl = shallowRef<HTMLElement | null>(null);\n\nlet openTimer: ReturnType<typeof setTimeout> | null = null;\nlet closeTimer: ReturnType<typeof setTimeout> | null = null;\n\nfunction clear(): void {\n if (openTimer) clearTimeout(openTimer);\n if (closeTimer) clearTimeout(closeTimer);\n openTimer = null;\n closeTimer = null;\n}\n\nfunction show(): void {\n clear();\n openTimer = setTimeout(() => controlled.setValue(true), props.openDelay);\n}\n\nfunction hide(): void {\n clear();\n closeTimer = setTimeout(() => controlled.setValue(false), props.closeDelay);\n}\n\nfunction cancelHide(): void {\n if (closeTimer) {\n clearTimeout(closeTimer);\n closeTimer = null;\n }\n}\n\n/* Clear pending timers on teardown — React's `useEffect(() => clear, …)`. */\nonScopeDispose(clear);\n\n// WCAG 1.4.13 — hover content must be dismissible without moving the pointer.\nuseEscape(\n () => {\n clear();\n controlled.setValue(false);\n },\n () => controlled.value.value,\n);\n\nprovide(hoverCardContextKey, {\n open: controlled.value,\n setOpen: controlled.setValue,\n triggerEl,\n show,\n hide,\n cancelHide,\n placement: computed(() => props.placement),\n offset: computed(() => props.offset),\n});\n</script>\n\n<template>\n <slot />\n</template>\n","<script lang=\"ts\">\n/** The prop surface of `HoverCardTrigger`. */\nexport interface HoverCardTriggerProps {\n /**\n * Merge onto the single slot child instead of rendering a `<span>`. Default `true`.\n *\n * React declared this prop but always cloned the child regardless; honouring it\n * gives the same default with an escape hatch when the slot is not a single element.\n */\n readonly asChild?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { resolveElement } from '../../../foundation/dom';\nimport { computed, useAttrs, useTemplateRef, watch, type ComponentPublicInstance } from 'vue';\nimport { OverlayExtensions } from '../OverlayExtensions';\nimport { Primitive } from '../../../foundation/primitives';\nimport { useHoverCardContext } from './HoverCard.vue';\n\n/** Renders the element that opens the enclosing `HoverCard` on hover or focus, and anchors it. */\ndefineOptions({ name: 'HoverCardTrigger', inheritAttrs: false });\n\n/** The trigger element — React's `children`, typed there as a single `ReactElement`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<HoverCardTriggerProps>(), { asChild: true });\n\nconst attrs = useAttrs();\nconst context = useHoverCardContext();\nconst inner = useTemplateRef<ComponentPublicInstance>('inner');\n\n/* React composed a ref onto the cloned child to seed `ctx.triggerRef`; a post-flush watch is the equivalent. */\nwatch(\n inner,\n (instance) => {\n context.triggerEl.value = OverlayExtensions.toHtmlElement(instance?.$el);\n },\n { immediate: true, flush: 'post' },\n);\n\n/* A touch has no hover: a tap would open the card late and leave it hanging over the page, so touch pointers\n neither open nor close it — the trigger's own tap action (a link, a button) runs as usual. */\nfunction onPointerEnter(event: PointerEvent): void {\n if (event.pointerType !== 'touch') context.show();\n}\n\nfunction onPointerLeave(event: PointerEvent): void {\n if (event.pointerType !== 'touch') context.hide();\n}\n\n/** `Primitive` renders the real element, so its `$el` is this component's root. */\nconst el = computed(() => resolveElement(inner.value));\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!--\n Handlers come after `v-bind=\"attrs\"`, so Vue chains the caller's own first —\n React called `trigger.props.onPointerEnter?.(e)` before its own in each clone.\n -->\n <Primitive\n ref=\"inner\"\n as=\"span\"\n :as-child=\"props.asChild\"\n v-bind=\"attrs\"\n @pointerenter=\"onPointerEnter\"\n @pointerleave=\"onPointerLeave\"\n @focus=\"context.show()\"\n @blur=\"context.hide()\"\n >\n <slot />\n </Primitive>\n</template>\n","<script lang=\"ts\">\n/**\n * The prop surface of `HoverCardContent`.\n *\n * Attributes reach the root through `useAttrs` and the content is the default\n * slot, which leaves no declared prop.\n */\nexport type HoverCardContentProps = Record<string, never>;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/styles';\nimport { AnchoredPositioner, Portal, Presence } from '../../../foundation/primitives';\nimport { useHoverCardContext } from './HoverCard.vue';\n\n/** Renders the anchored hover-card panel, which stays open while the pointer is over it. */\ndefineOptions({ name: 'HoverCardContent', inheritAttrs: false });\n\n/** The card content. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst context = useHoverCardContext();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\n/* Refs lifted to setup consts so the template auto-unwraps them (a plain injected object does not). */\nconst isOpen = context.open;\nconst placement = context.placement;\nconst offset = context.offset;\n\nconst anchor = computed(() => context.triggerEl.value);\n\nconst classes = computed(() =>\n cn(\n 'w-64 rounded-md border border-border bg-popover p-4 text-popover-foreground shadow-md outline-hidden',\n 'motion-safe:data-[state=open]:animate-(--animate-pop-in) motion-safe:data-[state=closed]:animate-(--animate-pop-out) motion-reduce:animate-none',\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 <!--\n Vue resolves a cloned `ref` through `$el` and a Teleport has no element, so\n `Portal` and `AnchoredPositioner` are hoisted above `Presence` and the panel\n stays Presence's direct child — keeping `data-state` and the pop animation on\n the same node. The trade: the positioner stays mounted (empty) while closed.\n -->\n <Portal>\n <AnchoredPositioner :anchor=\"anchor\" :placement=\"placement\" :offset=\"offset\" class=\"z-dropdown\">\n <Presence :is-present=\"isOpen\">\n <div\n ref=\"el\"\n v-bind=\"rest\"\n :class=\"classes\"\n @pointerenter=\"context.cancelHide()\"\n @pointerleave=\"context.hide()\"\n >\n <slot />\n </div>\n </Presence>\n </AnchoredPositioner>\n </Portal>\n</template>\n","<script lang=\"ts\">\n/** The prop surface of `HoverCardArrow` — the `OverlayArrow` primitive's, unchanged. */\nexport interface HoverCardArrowProps {\n /** The arrow width in px. Default 12. */\n readonly width?: number;\n\n /** The arrow height in px. Default 6. */\n readonly height?: number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport { cn } from '../../../foundation/styles';\nimport { OverlayArrow } from '../../../foundation/primitives';\n\n/** Renders a tip arrow tinted to the card surface; pair with Floating UI's `arrow()` to position it. */\ndefineOptions({ name: 'HoverCardArrow', inheritAttrs: false });\n\nconst props = defineProps<HoverCardArrowProps>();\n\nconst attrs = useAttrs();\n\nconst classes = computed(() => cn('text-popover', attrs.class as string | undefined));\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 <OverlayArrow :width=\"props.width\" :height=\"props.height\" v-bind=\"rest\" :class=\"classes\" />\n</template>\n","<script lang=\"ts\">\nimport { inject, type InjectionKey } from 'vue';\n\n/** The value shared with `ActionSheetAction` / `ActionSheetCancel`. */\nexport interface ActionSheetContextValue {\n setOpen: (open: boolean) => void;\n}\n\nexport const actionSheetContextKey: InjectionKey<ActionSheetContextValue> = Symbol('wow-two.actionSheet');\n\nexport function useActionSheetContext(): ActionSheetContextValue {\n const context = inject(actionSheetContextKey, null);\n if (!context) throw new Error('ActionSheet.* must be used inside <ActionSheet>');\n return context;\n}\n\n/**\n * The prop surface of `ActionSheet`.\n *\n * React's `title` / `description` were `ReactNode`; they are `string` props here\n * with matching named slots for rich content. React's `className` is the `class`\n * attr, forwarded to the panel exactly as React forwarded it.\n */\nexport interface ActionSheetProps {\n /** The open state, controlled. The `v-model:open` binding target. */\n readonly open?: boolean;\n\n /** The initial open state when uncontrolled. Default `false`. */\n readonly defaultOpen?: boolean;\n\n /** The heading above the action rows. Use the `title` slot for rich content. */\n readonly title?: string;\n\n /** The supporting line under the heading. Use the `description` slot for rich content. */\n readonly description?: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, useAttrs, useSlots } from 'vue';\nimport { cn } from '../../../foundation/styles';\nimport { useControlled } from '../../../foundation/state';\nimport Drawer from '../drawer/Drawer.vue';\nimport DrawerContent from '../drawer/DrawerContent.vue';\nimport OverlayTitle from '../OverlayTitle.vue';\nimport OverlayDescription from '../OverlayDescription.vue';\n\n/**\n * Renders an iOS-style action sheet — a bottom `Drawer` of stacked button rows and a split Cancel.\n */\ndefineOptions({ name: 'ActionSheet', inheritAttrs: false });\n\ndefineSlots<{\n /** The action rows — `ActionSheetAction` / `ActionSheetCancel`. React's `children`. */\n default(): unknown;\n /** The heading, when it is richer than the `title` string prop. */\n title?(): unknown;\n /** The supporting line, when it is richer than the `description` string prop. */\n description?(): unknown;\n}>();\n\n/** `open` / the node-ish props default to `undefined` so an absent prop cannot read as a set one. */\nconst props = withDefaults(defineProps<ActionSheetProps>(), {\n open: undefined,\n defaultOpen: false,\n title: undefined,\n description: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the sheet opens or closes — the `v-model:open` half. */\n 'update:open': [open: boolean];\n}>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\n\n/*\n * ActionSheet owns open state and drives Drawer fully controlled, so `setOpen`\n * works in both controlled and uncontrolled modes (Drawer's context isn't\n * interceptable).\n */\nconst controlled = useControlled<boolean>({\n controlled: () => props.open,\n default: () => props.defaultOpen,\n onChange: (value) => {\n emit('update:open', value);\n },\n});\n\nconst resolvedOpen = controlled.value;\n\nprovide(actionSheetContextKey, { setOpen: controlled.setValue });\n\nconst hasTitle = computed(() => props.title !== undefined || slots.title !== undefined);\nconst hasDescription = computed(() => props.description !== undefined || slots.description !== undefined);\n\nconst classes = computed(() =>\n cn('mx-auto max-w-md rounded-t-xl bg-card p-2 text-card-foreground', attrs.class as string | undefined),\n);\n\n/* Every other attribute reaches the dialog panel — an `aria-label` is how a sheet without a title gets its name. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n</script>\n\n<template>\n <Drawer :open=\"resolvedOpen\" side=\"bottom\" @update:open=\"controlled.setValue\">\n <DrawerContent v-bind=\"rest\" :class=\"classes\">\n <div v-if=\"hasTitle || hasDescription\" class=\"px-3 py-2 text-center\">\n <OverlayTitle v-if=\"hasTitle\" class=\"text-sm font-medium text-muted-foreground\">\n <slot name=\"title\">{{ props.title }}</slot>\n </OverlayTitle>\n <OverlayDescription v-if=\"hasDescription\" class=\"mt-1 text-xs text-muted-foreground\">\n <slot name=\"description\">{{ props.description }}</slot>\n </OverlayDescription>\n </div>\n <div class=\"flex flex-col gap-px overflow-hidden rounded-lg bg-border\">\n <slot />\n </div>\n </DrawerContent>\n </Drawer>\n</template>\n","<script lang=\"ts\">\n/**\n * The prop surface of `ActionSheetAction`.\n *\n * React declared `extends ButtonHTMLAttributes<HTMLButtonElement>` plus an\n * `onSelect` callback; attributes reach the root through `useAttrs` here and\n * `onSelect` is the `select` emit.\n */\nexport interface ActionSheetActionProps {\n /** The destructive tone — renders the label in the danger color. */\n readonly isDestructive?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/styles';\nimport { useActionSheetContext } from './ActionSheet.vue';\n\n/** Renders one action row of an `ActionSheet`; it fires `select`, then closes the sheet. */\ndefineOptions({ name: 'ActionSheetAction', inheritAttrs: false });\n\n/** The row label — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<ActionSheetActionProps>(), { isDestructive: false });\n\nconst emit = defineEmits<{\n /** Fires when the reader picks this row, just before the sheet closes. */\n select: [];\n}>();\n\nconst attrs = useAttrs();\nconst context = useActionSheetContext();\nconst el = useTemplateRef<HTMLButtonElement>('el');\n\nconst classes = computed(() =>\n cn(\n 'flex h-12 w-full items-center justify-center bg-card px-4 text-base font-medium transition-colors hover:bg-muted focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50',\n props.isDestructive ? 'text-destructive-soft-foreground' : 'text-foreground',\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\n/**\n * `@click` is declared after `v-bind=\"rest\"`, so Vue chains the caller's own\n * handler first and this one second — React's `onClick?.(e)` order.\n */\nfunction handleClick(event: MouseEvent): void {\n if (event.defaultPrevented) return;\n emit('select');\n context.setOpen(false);\n}\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- `type` sits before `v-bind`, so a caller-supplied `type` still wins — React's `type = 'button'` default. -->\n <button ref=\"el\" type=\"button\" v-bind=\"rest\" :class=\"classes\" @click=\"handleClick\">\n <slot />\n </button>\n</template>\n","<script lang=\"ts\">\n/**\n * The prop surface of `ActionSheetCancel`.\n *\n * React declared it as `ButtonHTMLAttributes<HTMLButtonElement>`; attributes\n * reach the root through `useAttrs` here, which leaves no declared prop.\n */\nexport type ActionSheetCancelProps = Record<string, never>;\n</script>\n\n<script setup lang=\"ts\">\nimport { useLocale } from '../../../foundation/i18n';\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/styles';\nimport { useActionSheetContext } from './ActionSheet.vue';\n\nconst locale = useLocale();\n\n/** Renders the separated dismiss row of an `ActionSheet`. */\ndefineOptions({ name: 'ActionSheetCancel', inheritAttrs: false });\n\n/** The row label — React's `children`, which defaulted to `Cancel`. */\ndefineSlots<{ default?(): unknown }>();\n\nconst attrs = useAttrs();\nconst context = useActionSheetContext();\nconst el = useTemplateRef<HTMLButtonElement>('el');\n\nconst classes = computed(() =>\n cn(\n 'mt-2 flex h-12 w-full items-center justify-center rounded-lg bg-card text-base font-semibold text-foreground shadow-sm transition-colors hover:bg-muted focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring',\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\n/**\n * `@click` is declared after `v-bind=\"rest\"`, so Vue chains the caller's own\n * handler first and this one second — React's `onClick?.(e)` order.\n */\nfunction handleClick(event: MouseEvent): void {\n if (event.defaultPrevented) return;\n context.setOpen(false);\n}\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- `type` sits before `v-bind`, so a caller-supplied `type` still wins — React's `type = 'button'` default. -->\n <button ref=\"el\" type=\"button\" v-bind=\"rest\" :class=\"classes\" @click=\"handleClick\">\n <slot>{{ locale.t('ActionSheetCancel.cancel', undefined, 'Cancel') }}</slot>\n </button>\n</template>\n","<script lang=\"ts\">\nimport { inject, type ComputedRef, type InjectionKey, type Ref } from 'vue';\nimport type {\n SurfaceElevation,\n SurfacePadding,\n SurfaceRadius,\n SurfaceTone,\n SurfaceVariant,\n} from '../../../foundation/styles';\n\nexport type SnapPoint = number | string;\n\n/** The value `useBottomSheet()` hands to anything rendered inside the sheet. */\nexport interface BottomSheetContextValue {\n /** The resolved open state. Writable — an assignment routes through `setOpen`. */\n open: Ref<boolean>;\n setOpen: (open: boolean) => void;\n /** The index of the active snap point. */\n currentSnap: Ref<number>;\n setCurrentSnap: (index: number) => void;\n snapPoints: ComputedRef<ReadonlyArray<SnapPoint>>;\n}\n\nexport const bottomSheetContextKey: InjectionKey<BottomSheetContextValue> = Symbol('wow-two.bottomSheet');\n\nexport function useBottomSheet(): BottomSheetContextValue {\n const context = inject(bottomSheetContextKey, null);\n if (!context) throw new Error('useBottomSheet must be used inside <BottomSheet>');\n return context;\n}\n\nexport function resolveSnapPx(point: SnapPoint, viewport: number): number {\n if (typeof point === 'number') return point;\n const trimmed = point.trim();\n if (trimmed.endsWith('vh')) return (parseFloat(trimmed) / 100) * viewport;\n if (trimmed.endsWith('px')) return parseFloat(trimmed);\n if (trimmed.endsWith('%')) return (parseFloat(trimmed) / 100) * viewport;\n // Fallback: try parseFloat as px.\n const n = parseFloat(trimmed);\n return Number.isFinite(n) ? n : 0;\n}\n\n/**\n * Represents the prop surface of `BottomSheet`.\n *\n * React declared the surface axes by `extends SurfaceLayoutVariants`; they are\n * spelled out here because the SFC compiler's type resolver cannot follow a\n * `VariantProps<typeof …>` base and fails the build on it. The aliases below\n * are the canonical ones from `foundation/styles`, already locked against the\n * `surfaceVariants` config there, so the two cannot drift.\n */\nexport interface BottomSheetProps {\n /** The open state, controlled. The `v-model:open` binding target. */\n readonly open?: boolean;\n\n /** The initial open state when uncontrolled. Default `false`. */\n readonly defaultOpen?: boolean;\n\n /** The heights the sheet snaps between — px numbers or CSS lengths. Default `['40vh', '90vh']`. */\n readonly snapPoints?: ReadonlyArray<SnapPoint>;\n\n /** The snap index the sheet opens at. Default 0. */\n readonly initialSnap?: number;\n\n /** The outside-click dismissal toggle. Default `true`. */\n readonly canDismissOnOutsideClick?: boolean;\n /** @deprecated Use `canDismissOnOutsideClick`; this alias is removed next release. */\n readonly dismissOnOutsideClick?: boolean;\n\n /** The Escape dismissal toggle. Default `true`. */\n readonly canDismissOnEscape?: boolean;\n /** @deprecated Use `canDismissOnEscape`; this alias is removed next release. */\n readonly dismissOnEscape?: boolean;\n\n /** The drag-below-lowest-snap dismissal toggle. Default `true`. */\n readonly canDragToDismiss?: boolean;\n /** @deprecated Use `canDragToDismiss`; this alias is removed next release. */\n readonly dragToDismiss?: boolean;\n\n /** The visual recipe. Default `elevated`. */\n readonly variant?: SurfaceVariant;\n\n /** The color tone the recipe is tinted with. */\n readonly tone?: SurfaceTone;\n\n /** The corner rounding. Default `none`. */\n readonly radius?: SurfaceRadius;\n\n /** The inner spacing step. Default `none`. */\n readonly padding?: SurfacePadding;\n\n /** The shadow depth. Default `5`. */\n readonly elevation?: SurfaceElevation;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n normalizeStyle,\n provide,\n ref,\n shallowRef,\n useAttrs,\n useTemplateRef,\n watch,\n type ComponentPublicInstance,\n} from 'vue';\nimport { cn, surfaceVariants } from '../../../foundation/styles';\nimport { useControlled } from '../../../foundation/state';\nimport { useId } from '../../../foundation/identifiers';\nimport { DismissableLayer, FocusScope, Portal, Presence, ScrollLockProvider } from '../../../foundation/primitives';\nimport BackdropOverlay from '../backdropOverlay/BackdropOverlay.vue';\nimport { overlayChromeContextKey } from '../OverlayChrome';\nimport { OverlayExtensions } from '../OverlayExtensions';\nimport { useLocale } from '../../../foundation/i18n';\n\n/**\n * Renders a mobile bottom sheet with a drag handle and snap points.\n * Pointer-event drag moves between heights; releasing snaps to the nearest point. Past the lowest\n * snap with `canDragToDismiss`, the sheet closes.\n */\ndefineOptions({ name: 'BottomSheet', inheritAttrs: false });\n\n/** The sheet content — `BottomSheetTitle` / `BottomSheetDescription` and the body. React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\n/** `open` default to `undefined` so an absent prop cannot read as an explicit `false`. */\nconst props = withDefaults(defineProps<BottomSheetProps>(), {\n open: undefined,\n defaultOpen: false,\n snapPoints: () => ['40vh', '90vh'],\n initialSnap: 0,\n canDismissOnOutsideClick: undefined,\n dismissOnOutsideClick: undefined,\n canDismissOnEscape: undefined,\n dismissOnEscape: undefined,\n canDragToDismiss: undefined,\n dragToDismiss: undefined,\n});\n\n/* Each flag reads its `can*` name first, then the deprecated alias. */\nconst dismissesOnOutsideClick = computed(() => props.canDismissOnOutsideClick ?? props.dismissOnOutsideClick ?? true);\nconst dismissesOnEscape = computed(() => props.canDismissOnEscape ?? props.dismissOnEscape ?? true);\nconst dismissesOnDrag = computed(() => props.canDragToDismiss ?? props.dragToDismiss ?? true);\n\nconst emit = defineEmits<{\n /** Fires when the sheet opens or closes — the `v-model:open` half. */\n 'update:open': [open: boolean];\n}>();\n\nconst attrs = useAttrs();\n\nconst controlled = useControlled<boolean>({\n controlled: () => props.open,\n default: () => props.defaultOpen,\n onChange: (value) => {\n emit('update:open', value);\n },\n});\n\nconst resolvedOpen = controlled.value;\nconst currentSnap = ref(Math.min(props.initialSnap, props.snapPoints.length - 1));\nconst dragHeight = shallowRef<number | null>(null);\nconst locale = useLocale();\nconst titleId = useId('bottom-sheet-title');\nconst descriptionId = useId('bottom-sheet-description');\n\nconst panel = useTemplateRef<ComponentPublicInstance>('panel');\nconst handle = useTemplateRef<HTMLDivElement>('handle');\n\nlet startY: number | null = null;\nlet startHeight = 0;\n\n/* Reset to `initialSnap` each time the sheet re-opens. */\nwatch(\n () => [resolvedOpen.value, props.initialSnap, props.snapPoints.length] as const,\n () => {\n if (resolvedOpen.value) currentSnap.value = Math.min(props.initialSnap, props.snapPoints.length - 1);\n },\n);\n\nprovide(bottomSheetContextKey, {\n open: resolvedOpen,\n setOpen: controlled.setValue,\n currentSnap,\n setCurrentSnap: (index: number) => {\n currentSnap.value = index;\n },\n snapPoints: computed(() => props.snapPoints),\n});\n\n// The chrome pieces wire `id={titleId}` / `id={descriptionId}`, which is what\n// the panel's `aria-labelledby` / `aria-describedby` resolve against.\nprovide(overlayChromeContextKey, {\n titleId,\n descriptionId,\n close: () => controlled.setValue(false),\n});\n\n/** `DismissableLayer` renders the panel div and exposes it, so `$el` is the sheet element. */\nfunction panelEl(): HTMLElement | null {\n return OverlayExtensions.toHtmlElement(panel.value?.$el);\n}\n\nfunction handlePointerDown(event: PointerEvent): void {\n if (event.button !== 0) return;\n startY = event.clientY;\n const rect = panelEl()?.getBoundingClientRect();\n startHeight = rect ? rect.height : 0;\n try {\n (event.currentTarget as HTMLElement).setPointerCapture(event.pointerId);\n } catch {\n /* A synthetic or already-released pointer has nothing to capture; the drag still tracks moves on the handle. */\n }\n}\n\nfunction handlePointerMove(event: PointerEvent): void {\n if (startY === null) return;\n const dy = event.clientY - startY;\n dragHeight.value = Math.max(0, startHeight - dy);\n}\n\n/** A cancelled drag — the browser took the pointer back — returns to the snap it started from. */\nfunction handlePointerCancel(): void {\n startY = null;\n dragHeight.value = null;\n}\n\nfunction handlePointerUp(event: PointerEvent): void {\n if (startY === null) return;\n startY = null;\n const handleElement = event.currentTarget as HTMLElement;\n if (handleElement.hasPointerCapture?.(event.pointerId)) handleElement.releasePointerCapture(event.pointerId);\n\n const viewport = typeof window !== 'undefined' ? window.innerHeight : 800;\n const heights = props.snapPoints.map((point) => resolveSnapPx(point, viewport));\n const liveHeight = dragHeight.value ?? heights[currentSnap.value] ?? 0;\n dragHeight.value = null;\n\n // Below lowest snap by 60px → dismiss.\n if (dismissesOnDrag.value && liveHeight < (heights[0] ?? 0) - 60) {\n controlled.setValue(false);\n return;\n }\n // Snap to nearest.\n let bestIdx = 0;\n let bestDist = Number.POSITIVE_INFINITY;\n heights.forEach((height, index) => {\n const distance = Math.abs(height - liveHeight);\n if (distance < bestDist) {\n bestDist = distance;\n bestIdx = index;\n }\n });\n currentSnap.value = bestIdx;\n}\n\nfunction handleKeyDown(event: KeyboardEvent): void {\n if (event.key === 'ArrowUp' && currentSnap.value < props.snapPoints.length - 1) {\n event.preventDefault();\n currentSnap.value += 1;\n } else if (event.key === 'ArrowDown') {\n event.preventDefault();\n if (currentSnap.value > 0) currentSnap.value -= 1;\n else if (dismissesOnDrag.value) controlled.setValue(false);\n }\n}\n\n/**\n * The drag handle is the sheet's primary keyboard affordance (ArrowUp/ArrowDown\n * drive the snap state) — give it initial focus instead of FocusScope's default\n * first-tabbable walk, which falls back to the layer container here.\n */\nfunction handleMountAutoFocus(event: CustomEvent): void {\n event.preventDefault();\n handle.value?.focus();\n}\n\n/** The handle's spoken position, so the snap it moves between is announced, not just an index. */\nconst handleValueText = computed(() =>\n locale.t(\n 'BottomSheet.snapPosition',\n { index: currentSnap.value + 1, count: props.snapPoints.length },\n 'Height {index} of {count}',\n ),\n);\n\n/** A click on the outside layer itself (`.self`), not on the panel inside it. */\nfunction handleOutsideClick(): void {\n if (dismissesOnOutsideClick.value) controlled.setValue(false);\n}\n\nfunction handleEscape(): void {\n controlled.setValue(false);\n}\n\nconst heightStyle = computed<string>(() => {\n if (dragHeight.value !== null) return `${dragHeight.value}px`;\n const point = props.snapPoints[currentSnap.value];\n if (typeof point === 'number') return `${point}px`;\n return point ?? '40vh';\n});\n\n/** Own declarations first so a caller's `style` still wins — React's `style={{…}}` then `{...rest}`. */\nconst panelStyle = computed(() =>\n normalizeStyle([\n {\n height: heightStyle.value,\n transition:\n dragHeight.value === null ? 'height 220ms ease-out, transform var(--duration-base) var(--ease-out)' : 'none',\n },\n attrs.style,\n ]),\n);\n\n/**\n * The outside layer spans the window above the scrim and holds the panel. The panel's modal FocusScope marks every\n * body branch outside it inert, the scrim beside it included, so a tap on the scrim reached nothing; an ancestor of\n * the panel stays live, so taps outside the panel land on this layer. Closed, it lets every pointer through.\n */\nconst outsideClasses = computed(() => cn('fixed inset-0 z-modal', !resolvedOpen.value && 'pointer-events-none'));\n\nconst classes = computed(() =>\n cn(\n 'fixed inset-x-0 bottom-0 z-modal flex flex-col rounded-t-xl border-t outline-hidden',\n 'will-change-transform',\n 'motion-safe:data-[state=closed]:translate-y-full',\n 'motion-reduce:translate-y-0',\n surfaceVariants({\n variant: props.variant ?? 'elevated',\n tone: props.tone,\n radius: props.radius ?? 'none',\n padding: props.padding ?? 'none',\n elevation: props.elevation ?? 5,\n }),\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class` / `style`, both re-applied above. */\nconst rest = computed(() => {\n const { class: _class, style: _style, ...others } = attrs;\n return others;\n});\n\nconst el = computed(() => panelEl());\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!--\n React nested `Portal` + `ScrollLockProvider` inside the Presence-cloned\n surface and forwarded the injected `ref` past them onto the panel with\n `forwardRef`. Vue resolves a cloned `ref` through `$el`, and a Teleport /\n renderless root has no element, so both are hoisted above `Presence` and the\n lock now follows open state rather than mount. Presence's cloned child is the\n sheet panel itself — the node that carries `data-state` and the\n `transition-transform` whose end defers the unmount.\n -->\n <Portal>\n <ScrollLockProvider :is-enabled=\"resolvedOpen\">\n <!-- The scrim runs on `BackdropOverlay`'s own `Presence` (its `open` prop) so the\n fade-out plays before it unmounts. It is inert while the panel is up; the outside layer takes the taps. -->\n <BackdropOverlay is-inline :is-open=\"resolvedOpen\" />\n <div :class=\"outsideClasses\" data-bottom-sheet-outside @click.self=\"handleOutsideClick\">\n <Presence :is-present=\"resolvedOpen\">\n <!--\n `FocusScope as-child` merges into `DismissableLayer`, whose own root div\n *is* the sheet panel — React kept the layer div and the panel div separate\n and forwarded `data-state` down to the inner one. Collapsing them keeps\n every attribute of React's panel on the node `Presence` clones.\n -->\n <FocusScope as-child is-trapped can-loop is-modal :on-mount-auto-focus=\"handleMountAutoFocus\">\n <DismissableLayer\n ref=\"panel\"\n :is-escape-disabled=\"!dismissesOnEscape\"\n is-outside-click-disabled\n :on-escape=\"handleEscape\"\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-labelledby=\"titleId\"\n :aria-describedby=\"descriptionId\"\n :style=\"panelStyle\"\n v-bind=\"rest\"\n :class=\"classes\"\n >\n <div\n ref=\"handle\"\n role=\"separator\"\n aria-orientation=\"horizontal\"\n :aria-valuenow=\"currentSnap\"\n :aria-valuemin=\"0\"\n :aria-valuemax=\"props.snapPoints.length - 1\"\n :aria-valuetext=\"handleValueText\"\n :aria-label=\"locale.t('BottomSheet.resize', undefined, 'Resize sheet')\"\n tabindex=\"0\"\n class=\"flex h-7 cursor-ns-resize touch-none items-center justify-center focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring\"\n @pointerdown=\"handlePointerDown\"\n @pointermove=\"handlePointerMove\"\n @pointerup=\"handlePointerUp\"\n @pointercancel=\"handlePointerCancel\"\n @keydown=\"handleKeyDown\"\n >\n <span class=\"h-1 w-10 rounded-full bg-border-strong\" aria-hidden=\"true\" />\n </div>\n <div class=\"flex-1 overflow-y-auto px-4 pb-4\"><slot /></div>\n </DismissableLayer>\n </FocusScope>\n </Presence>\n </div>\n </ScrollLockProvider>\n </Portal>\n</template>\n","import { inject, type InjectionKey, type Ref, type ShallowRef } from 'vue';\n\n/** One registered `CommandPaletteModalItem` — the unit the filter and the arrow walk move across. */\nexport interface CommandItemEntry {\n id: string;\n value: string;\n searchText: string;\n disabled: boolean;\n select: () => void;\n closeOnSelect: boolean;\n}\n\n/**\n * The seam between `CommandPaletteModal` and its parts.\n *\n * React carried the registry as a mutable `useRef` array plus a `registryVersion`\n * counter, because a ref mutation cannot re-render. A `shallowRef` holding a\n * replaced array is reactive on its own, so the counter is gone — readers watch\n * `items` directly.\n */\nexport interface CommandPaletteModalContextValue {\n /** The resolved open state. Writable — an assignment routes through `setOpen`. */\n open: Ref<boolean>;\n setOpen: (open: boolean) => void;\n\n /** The resolved search text. Writable — an assignment routes through `setInputValue`. */\n inputValue: Ref<string>;\n setInputValue: (input: string) => void;\n\n /** The `aria-activedescendant` target — the id of the highlighted option. */\n activeId: ShallowRef<string | null>;\n setActiveId: (id: string | null) => void;\n\n /** The live item registry. */\n items: ShallowRef<ReadonlyArray<CommandItemEntry>>;\n registerItem: (entry: CommandItemEntry) => void;\n unregisterItem: (id: string) => void;\n\n /** The match predicate. Reads the root's live `filter` prop. */\n filter: (searchText: string, search: string) => boolean;\n\n inputId: string;\n listboxId: string;\n inputEl: ShallowRef<HTMLInputElement | null>;\n}\n\nexport const commandPaletteContextKey: InjectionKey<CommandPaletteModalContextValue> = Symbol('wow-two.commandPalette');\n\nexport function useCommandPaletteContext(): CommandPaletteModalContextValue {\n const context = inject(commandPaletteContextKey, null);\n if (!context) throw new Error('CommandPaletteModal.* must be used inside <CommandPaletteModal>');\n return context;\n}\n\n/** The default match predicate — case-insensitive substring. */\nexport const defaultFilter = (searchText: string, search: string): boolean =>\n searchText.toLowerCase().includes(search.toLowerCase());\n","<script lang=\"ts\">\n/** Controlled axes use their canonical Vue model names; each update event requests caller state. */\nexport interface CommandPaletteModalProps {\n /** The open state, controlled. The `v-model:open` binding target. */\n readonly open?: boolean;\n\n /** The initial open state when uncontrolled. Default `false`. */\n readonly defaultOpen?: boolean;\n\n /** The search text, controlled. The `v-model:input-value` binding target. */\n readonly inputValue?: string;\n\n /** The initial search text when uncontrolled. Default `''`. */\n readonly defaultInputValue?: string;\n\n /** The key that opens the palette with ⌘/Ctrl. Omit to bind no global shortcut. */\n readonly triggerKey?: string;\n\n /** The match predicate. Default case-insensitive substring. */\n readonly filter?: (searchText: string, search: string) => boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, shallowRef, watch } from 'vue';\nimport { useControlled } from '../../../foundation/state';\nimport { useId } from '../../../foundation/identifiers';\nimport { useHotkeys } from '../../../foundation/shortcuts';\nimport { Modal } from '../modal';\nimport { commandPaletteContextKey, defaultFilter, type CommandItemEntry } from './CommandPaletteModalContext';\n\n/**\n * Renders the command palette inside a `Modal`, owning open state, search text, and the registry.\n * Its `CommandPaletteModalItem` children register themselves with this root.\n */\ndefineOptions({ name: 'CommandPaletteModal', inheritAttrs: false });\n\n/** The palette tree — `CommandPaletteModalContent` and its parts. React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\n/** `open` default to `undefined` so an absent prop cannot read as an explicit `false`. */\nconst props = withDefaults(defineProps<CommandPaletteModalProps>(), {\n open: undefined,\n defaultOpen: false,\n inputValue: undefined,\n defaultInputValue: undefined,\n triggerKey: undefined,\n filter: defaultFilter,\n});\n\nconst emit = defineEmits<{\n /** Fires when the palette opens or closes — the `v-model:open` half. */\n 'update:open': [open: boolean];\n\n /** Fires when the reader edits the search text — the `v-model:input-value` half. */\n 'update:inputValue': [input: string];\n}>();\n\nconst openState = useControlled<boolean>({\n controlled: () => props.open,\n default: () => props.defaultOpen,\n onChange: (value) => {\n emit('update:open', value);\n },\n});\n\nconst inputState = useControlled<string>({\n controlled: () => props.inputValue,\n default: () => props.defaultInputValue ?? '',\n onChange: (value) => {\n emit('update:inputValue', value);\n },\n});\n\nconst items = shallowRef<ReadonlyArray<CommandItemEntry>>([]);\nconst activeId = shallowRef<string | null>(null);\nconst inputEl = shallowRef<HTMLInputElement | null>(null);\nconst inputId = useId();\nconst listboxId = useId();\n\nfunction registerItem(entry: CommandItemEntry): void {\n const next = items.value.slice();\n const index = next.findIndex((i) => i.id === entry.id);\n if (index >= 0) next[index] = entry;\n else next.push(entry);\n items.value = next;\n}\n\nfunction unregisterItem(id: string): void {\n items.value = items.value.filter((i) => i.id !== id);\n}\n\n/* Global keybinding (cmd-/ctrl-K). `mod` = ⌘ on Apple / Ctrl elsewhere; the explicit `ctrl+`/`meta+` pair keeps\n the spec's \"we accept both on every platform\" contract. The chord must always parse (`+` is the token\n separator → `plus`; a falsy `triggerKey` needs a placeholder), so `enabled` — not an early return — unbinds. */\nconst chordKey = computed(() => {\n const key = props.triggerKey;\n return !key ? 'k' : key === '+' ? 'plus' : key;\n});\n\nuseHotkeys(\n () => [`mod+${chordKey.value}`, `ctrl+${chordKey.value}`, `meta+${chordKey.value}`],\n () => openState.setValue(true),\n { enabled: () => Boolean(props.triggerKey) },\n);\n\n// Reset the active id on close.\nwatch(\n () => openState.value.value,\n (isOpen) => {\n if (!isOpen) activeId.value = null;\n },\n { flush: 'post' },\n);\n\nprovide(commandPaletteContextKey, {\n open: openState.value,\n setOpen: openState.setValue,\n inputValue: inputState.value,\n setInputValue: inputState.setValue,\n activeId,\n setActiveId: (id: string | null) => {\n activeId.value = id;\n },\n items,\n registerItem,\n unregisterItem,\n /* Wrapped rather than stored, so a `filter` prop change is picked up live —\n React re-created the whole context value for the same effect. */\n filter: (searchText: string, search: string) => props.filter(searchText, search),\n inputId,\n listboxId,\n inputEl,\n});\n\n/* Lifted to a setup const so the template auto-unwraps it. Named `resolvedOpen`\n rather than `open` — that name is already a declared prop here. */\nconst resolvedOpen = openState.value;\n</script>\n\n<template>\n <Modal :open=\"resolvedOpen\" @update:open=\"openState.setValue\"><slot /></Modal>\n</template>\n","<script lang=\"ts\">\n/**\n * The prop surface of `CommandPaletteModalContent`.\n *\n * React declared `HTMLAttributes<HTMLDivElement>`; attributes reach `ModalContent`\n * through `useAttrs` here, which leaves no declared prop.\n */\nexport type CommandPaletteModalContentProps = Record<string, never>;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport { cn } from '../../../foundation/styles';\nimport { ModalContent } from '../modal';\n\n/** Renders the modal panel the palette lives in — full-bleed, no gap, no padding. */\ndefineOptions({ name: 'CommandPaletteModalContent', inheritAttrs: false });\n\n/** The palette parts — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\n\nconst classes = computed(() => cn('w-full max-w-xl gap-0 overflow-hidden p-0', attrs.class as string | undefined));\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 <ModalContent v-bind=\"rest\" :class=\"classes\"><slot /></ModalContent>\n</template>\n","<script lang=\"ts\">\n/**\n * The prop surface of `CommandPaletteModalInput`.\n *\n * React declared `Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange'>`\n * and destructured `placeholder` out of it for a default; attributes reach the\n * `<input>` through `useAttrs` here and the placeholder default is applied from\n * `attrs`, which leaves no declared prop.\n */\nexport type CommandPaletteModalInputProps = Record<string, never>;\n\n/** The placeholder used when the consumer supplies none. */\nconst DefaultPlaceholder = 'Type a command…';\n</script>\n\n<script setup lang=\"ts\">\nimport { useLocale } from '../../../foundation/i18n';\nimport { DomOrderExtensions } from '../../../foundation/dom';\nimport { computed, shallowRef, useAttrs, watch } from 'vue';\nimport { Search } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/styles';\nimport { Icon } from '../../../foundation/icons';\nimport { useCommandPaletteContext, type CommandItemEntry } from './CommandPaletteModalContext';\n\nconst locale = useLocale();\n\n/** Renders the palette's search field — a `role=\"combobox\"` driving the option list. */\ndefineOptions({ name: 'CommandPaletteModalInput', inheritAttrs: false });\n\nconst attrs = useAttrs();\nconst context = useCommandPaletteContext();\n\nconst el = shallowRef<HTMLInputElement | null>(null);\n\n/* Lifted to setup consts so the template auto-unwraps them (a plain injected object does not). */\nconst inputValue = context.inputValue;\nconst activeId = context.activeId;\n\nfunction setRef(node: unknown): void {\n const input = (node ?? null) as HTMLInputElement | null;\n el.value = input;\n context.inputEl.value = input;\n}\n\n// Keep DOM focus on the input whenever the palette is open.\nwatch(\n [() => context.open.value, el],\n ([isOpen, input]) => {\n if (isOpen && input) input.focus();\n },\n { flush: 'post' },\n);\n\nfunction visibleItems(): ReadonlyArray<CommandItemEntry> {\n const search = context.inputValue.value;\n return DomOrderExtensions.inDocumentOrder(\n context.items.value.filter((i) => !i.disabled && (search === '' || context.filter(i.searchText, search))),\n (item) => context.inputEl.value?.ownerDocument.getElementById(item.id),\n );\n}\n\n// Auto-set first match when the filter or the item registry changes.\nwatch(\n [() => context.inputValue.value, context.items],\n () => {\n const list = visibleItems();\n if (list.length > 0 && !list.some((i) => i.id === context.activeId.value)) {\n context.setActiveId(list[0]!.id);\n } else if (list.length === 0) {\n context.setActiveId(null);\n }\n },\n { immediate: true, flush: 'post' },\n);\n\nfunction moveActive(direction: 1 | -1): void {\n const list = visibleItems();\n if (list.length === 0) return;\n const index = list.findIndex((i) => i.id === context.activeId.value);\n let nextIndex = index + direction;\n if (index === -1) nextIndex = direction === 1 ? 0 : list.length - 1;\n if (nextIndex < 0) nextIndex = list.length - 1;\n if (nextIndex >= list.length) nextIndex = 0;\n const next = list[nextIndex]!;\n context.setActiveId(next.id);\n el.value?.ownerDocument.getElementById(next.id)?.scrollIntoView({ block: 'nearest' });\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented || event.isComposing || !context.open.value) return;\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n moveActive(1);\n break;\n case 'ArrowUp':\n event.preventDefault();\n moveActive(-1);\n break;\n case 'Home': {\n if (event.target !== context.inputEl.value) break;\n const first = visibleItems();\n if (first.length > 0) context.setActiveId(first[0]!.id);\n break;\n }\n case 'End': {\n if (event.target !== context.inputEl.value) break;\n const last = visibleItems();\n if (last.length > 0) context.setActiveId(last[last.length - 1]!.id);\n break;\n }\n case 'Enter': {\n const id = context.activeId.value;\n if (!id) return;\n const entry = visibleItems().find((i) => i.id === id);\n if (!entry || entry.disabled) return;\n event.preventDefault();\n entry.select();\n if (entry.closeOnSelect) context.setOpen(false);\n break;\n }\n }\n}\n\nfunction handleInput(event: Event): void {\n context.setInputValue((event.target as HTMLInputElement).value);\n}\n\nconst placeholder = computed(\n () =>\n (attrs.placeholder as string | undefined) ??\n locale.t('CommandPaletteModalInput.placeholder', undefined, DefaultPlaceholder),\n);\n\nconst classes = computed(() =>\n cn(\n 'flex h-12 w-full bg-transparent text-sm text-foreground placeholder:text-subtle-foreground outline-hidden disabled:cursor-not-allowed disabled:opacity-50',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class` and `placeholder`, both re-applied above. */\nconst rest = computed(() => {\n const { class: _class, placeholder: _placeholder, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div class=\"flex items-center gap-2 border-b border-border px-3\">\n <Icon :icon=\"Search\" :size=\"16\" class=\"text-muted-foreground\" />\n <!-- `v-bind=\"rest\"` comes FIRST here, deliberately: React spread `{...rest}`\n ahead of its own bindings on this element, so `id` / `role` / `value` and\n the ARIA wiring cannot be overridden. `@keydown` still chains after a\n consumer's, which is what makes the `defaultPrevented` check meaningful. -->\n <input\n v-bind=\"rest\"\n :id=\"context.inputId\"\n :ref=\"setRef\"\n type=\"text\"\n role=\"combobox\"\n aria-expanded=\"true\"\n :aria-controls=\"context.listboxId\"\n :aria-activedescendant=\"activeId ?? undefined\"\n aria-autocomplete=\"list\"\n :placeholder=\"placeholder\"\n :value=\"inputValue\"\n :class=\"classes\"\n @input=\"handleInput\"\n @keydown=\"handleKeydown\"\n />\n </div>\n</template>\n","<script lang=\"ts\">\n/**\n * The prop surface of `CommandPaletteModalList`.\n *\n * React declared `HTMLAttributes<HTMLDivElement>`; attributes reach the root\n * through `useAttrs` here, which leaves no declared prop.\n */\nexport type CommandPaletteModalListProps = Record<string, never>;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/styles';\nimport { useCommandPaletteContext } from './CommandPaletteModalContext';\n\n/** Renders the scrollable `role=\"listbox\"` the search input drives. */\ndefineOptions({ name: 'CommandPaletteModalList', inheritAttrs: false });\n\n/** The groups / items — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\nconst context = useCommandPaletteContext();\n\nconst classes = computed(() => cn('max-h-80 overflow-y-auto p-1', attrs.class as string | undefined));\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\n :id=\"context.listboxId\"\n ref=\"el\"\n role=\"listbox\"\n :aria-labelledby=\"context.inputId\"\n v-bind=\"rest\"\n :class=\"classes\"\n >\n <slot />\n </div>\n</template>\n","<script lang=\"ts\">\nexport interface CommandPaletteModalGroupProps {\n /** The group heading. React typed this `ReactNode`; the scalar form is the prop and `#label` is the rich override. */\n readonly label?: string | number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport { useId } from '../../../foundation/identifiers';\nimport { listboxGroupLabelVariants } from '../../forms/listboxPicker/ListboxPicker.variants';\n\n/** Renders a labelled `role=\"group\"` band of palette items. */\ndefineOptions({ name: 'CommandPaletteModalGroup', inheritAttrs: false });\n\ndefineSlots<{\n /** The grouped items — React's `children`. */\n default(): unknown;\n\n /** The rich override for the `label` prop. */\n label?(): unknown;\n}>();\n\nconst props = defineProps<CommandPaletteModalGroupProps>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst el = useTemplateRef<HTMLDivElement>('el');\nconst labelId = useId();\n\nconst hasLabel = computed(() => Boolean(props.label) || Boolean(slots.label));\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- React passed `className` straight through (no `cn` merge) and spread the\n rest after it; `v-bind=\"attrs\"` is the same single pass-through. -->\n <div ref=\"el\" role=\"group\" :aria-labelledby=\"hasLabel ? labelId : undefined\" v-bind=\"attrs\">\n <div v-if=\"hasLabel\" :id=\"labelId\" :class=\"listboxGroupLabelVariants()\">\n <slot name=\"label\">{{ props.label }}</slot>\n </div>\n <slot />\n </div>\n</template>\n","<script lang=\"ts\">\nexport interface CommandPaletteModalItemProps {\n readonly value: string;\n\n /**\n * The text used by the filter; defaults to `value`.\n *\n * React additionally fell back to `children` when they were a plain string.\n * A Vue slot's text cannot be read at setup time without invoking the slot\n * outside the render function (which Vue warns about, and which would not\n * work at all for an item filtered out of the DOM), so the fallback is\n * `value` — pass `searchText` whenever the visible label differs from it.\n */\n readonly searchText?: string;\n\n readonly isDisabled?: boolean;\n\n /** The close-on-activate toggle. Default `true`. */\n readonly canCloseOnSelect?: boolean;\n /** @deprecated Use `canCloseOnSelect`; this alias is removed next release. */\n readonly closeOnSelect?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onScopeDispose, useAttrs, useTemplateRef, watch } from 'vue';\nimport { cn } from '../../../foundation/styles';\nimport { useId } from '../../../foundation/identifiers';\nimport { listboxItemVariants } from '../../forms/listboxPicker/ListboxPicker.variants';\nimport { useCommandPaletteContext } from './CommandPaletteModalContext';\n\n/** Renders one `role=\"option\"` row, hiding itself while the current filter excludes it. */\ndefineOptions({ name: 'CommandPaletteModalItem', inheritAttrs: false });\n\n/** The row content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\n/** `isDisabled` defaults to `undefined`, not `false` — an absent optional boolean must stay absent. */\nconst props = withDefaults(defineProps<CommandPaletteModalItemProps>(), {\n searchText: undefined,\n isDisabled: undefined,\n canCloseOnSelect: undefined,\n closeOnSelect: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the reader activates the row with Enter or a click. */\n select: [];\n}>();\n\nconst attrs = useAttrs();\nconst context = useCommandPaletteContext();\nconst el = useTemplateRef<HTMLDivElement>('el');\nconst id = useId();\n\nconst resolvedSearch = computed(() => props.searchText ?? props.value);\n\nwatch(\n [\n () => props.value,\n resolvedSearch,\n () => props.isDisabled,\n () => props.canCloseOnSelect ?? props.closeOnSelect ?? true,\n ],\n ([value, searchText, isDisabled, closeOnSelect]) => {\n context.registerItem({\n id,\n value,\n searchText,\n disabled: isDisabled === true,\n select: () => emit('select'),\n closeOnSelect,\n });\n },\n { immediate: true, flush: 'post' },\n);\n\nonScopeDispose(() => context.unregisterItem(id));\n\n/** Hidden when the current filter excludes it — React returned `null` for the same case. */\nconst matches = computed(\n () => context.inputValue.value === '' || context.filter(resolvedSearch.value, context.inputValue.value),\n);\n\nconst isActive = computed(() => context.activeId.value === id);\n\nconst state = computed(() => (props.isDisabled ? 'disabled' : isActive.value ? 'active' : 'default'));\n\nfunction handleClick(event: MouseEvent): void {\n if (event.defaultPrevented || props.isDisabled) return;\n emit('select');\n if (props.canCloseOnSelect ?? props.closeOnSelect ?? true) context.setOpen(false);\n}\n\nfunction handlePointerEnter(): void {\n if (!props.isDisabled) context.setActiveId(id);\n}\n\nconst classes = computed(() => cn(listboxItemVariants({ state: state.value }), attrs.class as string | undefined));\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 <!-- Own attrs, then `v-bind=\"rest\"`, then own handlers last — a consumer's\n handler therefore runs first, the order React got from calling\n `onClick?.(e)` ahead of its own logic. -->\n <div\n v-if=\"matches\"\n :id=\"id\"\n ref=\"el\"\n role=\"option\"\n :aria-selected=\"isActive\"\n :aria-disabled=\"isDisabled || undefined\"\n :data-active=\"isActive ? '' : undefined\"\n v-bind=\"rest\"\n :class=\"classes\"\n @click=\"handleClick\"\n @pointerenter=\"handlePointerEnter\"\n >\n <slot />\n </div>\n</template>\n","<script lang=\"ts\">\n/**\n * The prop surface of `CommandPaletteModalEmpty`.\n *\n * React declared `HTMLAttributes<HTMLDivElement>`; attributes reach the root\n * through `useAttrs` here, which leaves no declared prop.\n */\nexport type CommandPaletteModalEmptyProps = Record<string, never>;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/styles';\nimport { listboxEmptyVariants } from '../../forms/listboxPicker/ListboxPicker.variants';\nimport { useCommandPaletteContext } from './CommandPaletteModalContext';\n\n/** Renders the \"no results\" notice, shown only while the filter matches nothing. */\ndefineOptions({ name: 'CommandPaletteModalEmpty', inheritAttrs: false });\n\n/** The empty-state copy — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\nconst context = useCommandPaletteContext();\n\n/* React read the mutable `itemsRef` during render; `items` is a reactive ref\n here, so the count re-derives on every register / unregister without the\n `registryVersion` counter React needed. */\nconst matchCount = computed(() => {\n const search = context.inputValue.value;\n return context.items.value.filter((i) => search === '' || context.filter(i.searchText, search)).length;\n});\n\nconst classes = computed(() => cn(listboxEmptyVariants(), attrs.class as string | undefined));\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 <!-- Polite live region — \"no results\" must be announced, not hidden as\n presentational chrome. -->\n <div v-if=\"matchCount === 0\" ref=\"el\" role=\"status\" v-bind=\"rest\" :class=\"classes\">\n <slot />\n </div>\n</template>\n","<script lang=\"ts\">\n/**\n * The prop surface of `CommandPaletteModalSeparator`.\n *\n * React declared `HTMLAttributes<HTMLDivElement>`; attributes reach the root\n * through `useAttrs` here, which leaves no declared prop.\n */\nexport type CommandPaletteModalSeparatorProps = Record<string, never>;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/styles';\nimport { listboxSeparatorVariants } from '../../forms/listboxPicker/ListboxPicker.variants';\n\n/** Renders the hairline rule between palette sections. */\ndefineOptions({ name: 'CommandPaletteModalSeparator', inheritAttrs: false });\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\n/* React spread `{...props}` *after* its own `className`, so a consumer's class\n replaced the recipe outright; `cn` reproduces that precedence through\n tailwind-merge rather than concatenating the two. */\nconst classes = computed(() => cn(listboxSeparatorVariants(), attrs.class as string | undefined));\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=\"separator\" v-bind=\"rest\" :class=\"classes\" />\n</template>\n","<script lang=\"ts\">\n/** Defines one image the lightbox shows. */\nexport interface LightboxImage {\n /** The image URL. */\n readonly src: string;\n\n /** The text alternative; also announced when the image changes. */\n readonly alt: string;\n\n /** The caption shown under the image. */\n readonly caption?: string;\n\n /** The responsive image candidates. */\n readonly srcset?: string;\n}\n\n/** Defines props for the full-screen image viewer. */\nexport interface LightboxModalProps {\n /** The images, in viewing order. */\n readonly images: ReadonlyArray<LightboxImage>;\n\n /** The open state, controlled. The `v-model:open` binding target. */\n readonly open?: boolean;\n\n /** The initial open state when uncontrolled. Default `false`. */\n readonly defaultOpen?: boolean;\n\n /** The shown image's position, controlled. The `v-model:index` binding target. */\n readonly index?: number;\n\n /** The initial position when uncontrolled. Default 0. */\n readonly defaultIndex?: number;\n\n /** Whether stepping past either end wraps around. Default `true`. */\n readonly isLooping?: boolean;\n\n /** The dialog's name. Default `\"Image viewer\"`, localized. */\n readonly label?: string;\n}\n\n/** @internal The horizontal travel, in CSS pixels, that turns a touch drag into a swipe. */\nconst SwipeDistance = 48;\n\n/** @internal The step buttons' shared look. */\nconst StepButtonClass =\n 'absolute top-1/2 grid size-10 -translate-y-1/2 place-items-center rounded-full bg-black/50 text-white ' +\n 'transition-colors hover:bg-black/70 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-white ' +\n 'disabled:pointer-events-none disabled:opacity-30';\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, watch } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { ChevronLeft, ChevronRight } from 'lucide-vue-next';\nimport { useLocale, useLocaleDefaults } from '../../../foundation/i18n';\nimport { useControlled } from '../../../foundation/state';\nimport { cn } from '../../../foundation/styles';\nimport { Modal, ModalClose, ModalContent, ModalTitle } from '../modal';\n\n/**\n * Renders a full-screen viewer that steps through images by button, arrow key or swipe, with captions and a\n * position counter.\n */\ndefineOptions({ name: 'LightboxModal', inheritAttrs: false });\n\ndefineSlots<{\n /** The triggers — typically thumbnails; `openAt(index)` opens the viewer on that image. */\n default?(props: { openAt: (index: number) => void }): unknown;\n}>();\n\nconst componentProps = withDefaults(defineProps<LightboxModalProps>(), {\n open: undefined,\n defaultOpen: false,\n index: undefined,\n defaultIndex: 0,\n isLooping: true,\n});\nconst props = useLocaleDefaults(componentProps, 'LightboxModal', { label: 'Image viewer' });\n\nconst emit = defineEmits<{\n /** Fires when the viewer opens or closes — the `v-model:open` half. */\n 'update:open': [open: boolean];\n\n /** Fires when the reader steps to another image — the `v-model:index` half. */\n 'update:index': [index: number];\n}>();\n\nconst attrs = useAttrs();\nconst locale = useLocale();\n\nconst openState = useControlled<boolean>({\n controlled: () => props.open,\n default: () => props.defaultOpen,\n onChange: (next) => {\n emit('update:open', next);\n },\n});\nconst isOpen = openState.value;\n\nconst indexState = useControlled<number>({\n controlled: () => props.index,\n default: () => props.defaultIndex,\n onChange: (next) => {\n emit('update:index', next);\n },\n});\n\nconst count = computed(() => props.images.length);\nconst lastIndex = computed(() => Math.max(0, count.value - 1));\nconst current = computed(() => {\n const requested = Number.isFinite(indexState.value.value) ? Math.round(indexState.value.value) : 0;\n return Math.min(Math.max(0, requested), lastIndex.value);\n});\nconst image = computed<LightboxImage | undefined>(() => props.images[current.value]);\nconst hasMany = computed(() => count.value > 1);\nconst canGoBack = computed(() => hasMany.value && (props.isLooping || current.value > 0));\nconst canGoForward = computed(() => hasMany.value && (props.isLooping || current.value < lastIndex.value));\n\n/** Shows the image at a position — wrapped when looping, clamped otherwise. */\nfunction show(next: number): void {\n if (count.value === 0) return;\n const target = props.isLooping\n ? ((next % count.value) + count.value) % count.value\n : Math.min(Math.max(0, next), lastIndex.value);\n if (target !== current.value) indexState.setValue(target);\n}\n\n/** Opens the viewer on one image — handed to the trigger slot. */\nfunction openAt(index: number): void {\n show(index);\n openState.setValue(true);\n}\n\nfunction setOpen(next: boolean): void {\n openState.setValue(next);\n}\n\n/** `1` in a left-to-right layout, `-1` in a right-to-left one — the direction \"next\" travels on screen. */\nfunction forward(element: Element): 1 | -1 {\n return getComputedStyle(element).direction === 'rtl' ? -1 : 1;\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n const step = forward(event.currentTarget as Element);\n if (event.key === 'ArrowRight') show(current.value + step);\n else if (event.key === 'ArrowLeft') show(current.value - step);\n else if (event.key === 'Home') show(0);\n else if (event.key === 'End') show(lastIndex.value);\n else return;\n event.preventDefault();\n}\n\nlet swipe: { readonly x: number; readonly y: number; readonly pointerId: number } | null = null;\n\nfunction onPointerDown(event: PointerEvent): void {\n swipe = event.pointerType === 'mouse' ? null : { x: event.clientX, y: event.clientY, pointerId: event.pointerId };\n}\n\nfunction onPointerUp(event: PointerEvent): void {\n const start = swipe;\n swipe = null;\n if (!start || start.pointerId !== event.pointerId) return;\n const travel = event.clientX - start.x;\n if (Math.abs(travel) < SwipeDistance || Math.abs(travel) < Math.abs(event.clientY - start.y)) return;\n const step = forward(event.currentTarget as Element);\n show(current.value + (travel < 0 ? step : -step));\n}\n\nfunction cancelSwipe(): void {\n swipe = null;\n}\n\n/* Warms the neighbours so a step shows its image at once. Client-only: watchers never fire during SSR. */\nwatch([isOpen, current], () => {\n if (!isOpen.value || !hasMany.value || typeof Image === 'undefined') return;\n for (const offset of [-1, 1]) {\n const neighbour = props.images[(current.value + offset + count.value) % count.value];\n if (neighbour) new Image().src = neighbour.src;\n }\n});\n\nconst counterText = computed(() =>\n locale.t('LightboxModal.counter', { current: current.value + 1, total: count.value }, '{current} of {total}'),\n);\nconst announcement = computed(() =>\n image.value ? (hasMany.value ? `${counterText.value}: ${image.value.alt}` : image.value.alt) : '',\n);\n\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\nconst contentClass = computed(() =>\n cn(\n 'flex h-[min(90vh,60rem)] w-[min(96vw,80rem)] max-w-none flex-col gap-2 bg-black/90 p-3 text-white shadow-none',\n attrs.class as ClassValue,\n ),\n);\n</script>\n\n<template>\n <Modal :open=\"isOpen\" @update:open=\"setOpen\">\n <slot :open-at=\"openAt\" />\n <ModalContent v-bind=\"rest\" is-blurred :class=\"contentClass\" @keydown=\"onKeydown\">\n <ModalTitle class=\"sr-only\">{{ props.label }}</ModalTitle>\n <div class=\"flex min-h-10 items-center gap-2 text-sm text-white/80\">\n <span v-if=\"hasMany\" aria-hidden=\"true\" data-counter>{{ counterText }}</span>\n <ModalClose class=\"ms-auto text-white hover:bg-white/10\" />\n </div>\n <figure\n class=\"relative flex min-h-0 flex-1 touch-pan-y touch-pinch-zoom flex-col items-center justify-center gap-2\"\n @pointerdown=\"onPointerDown\"\n @pointerup=\"onPointerUp\"\n @pointercancel=\"cancelSwipe\"\n >\n <img\n v-if=\"image\"\n :key=\"image.src\"\n :src=\"image.src\"\n :srcset=\"image.srcset\"\n :alt=\"image.alt\"\n draggable=\"false\"\n class=\"min-h-0 max-w-full flex-1 rounded-md object-contain select-none\"\n />\n <figcaption v-if=\"image?.caption\" class=\"text-center text-sm text-white/90\">{{ image.caption }}</figcaption>\n <button\n v-if=\"hasMany\"\n type=\"button\"\n :aria-label=\"locale.t('LightboxModal.previous', undefined, 'Previous image')\"\n :disabled=\"!canGoBack\"\n :class=\"cn(StepButtonClass, 'start-2')\"\n @click=\"show(current - 1)\"\n >\n <ChevronLeft class=\"size-5 rtl:-scale-x-100\" />\n </button>\n <button\n v-if=\"hasMany\"\n type=\"button\"\n :aria-label=\"locale.t('LightboxModal.next', undefined, 'Next image')\"\n :disabled=\"!canGoForward\"\n :class=\"cn(StepButtonClass, 'end-2')\"\n @click=\"show(current + 1)\"\n >\n <ChevronRight class=\"size-5 rtl:-scale-x-100\" />\n </button>\n </figure>\n <p class=\"sr-only\" aria-live=\"polite\">{{ announcement }}</p>\n </ModalContent>\n </Modal>\n</template>\n"],"names":["_openBlock","_createBlock","_unref","_mergeProps","_renderSlot","_createElementBlock","Modal","ModalContent","OverlayCloseButton","_createElementVNode","Popover","_createVNode","PopoverTrigger","PopoverContent","_hoisted_1","_hoisted_2","_toDisplayString","_hoisted_3","_createTextVNode","_hoisted_5","Button","Portal","AnchoredPositioner","Drawer","DrawerContent","OverlayTitle","OverlayDescription","ScrollLockProvider","BackdropOverlay","FocusScope","Icon","ModalTitle","ModalClose","_normalizeClass"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,UAAM,QAAQ;AAEd,UAAM,QAAQ,SAAA;AACd,UAAM,UAAU,gBAAA;AAChB,UAAM,QAAQ,eAAwC,OAAO;AAG7D,UAAM,SAAS,QAAQ;AAGvB;AAAA,MACE;AAAA,MACA,CAAC,aAAa;AACZ,gBAAQ,UAAU,QAAQ,kBAAkB,cAAc,UAAU,GAAG;AAAA,MACzE;AAAA,MACA,EAAE,WAAW,MAAM,OAAO,OAAA;AAAA,IAAO;AAQnC,aAAS,YAAY,OAAyB;AAC5C,UAAI,MAAM,iBAAkB;AAC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gBAAA;kBAEpBS,YAA+CT,MAAA,WAAA,GAAA,EAAlC,OAAM,2BAAyB;AAAA,gBAAA;gBAGtC,QAAA,sBADRG,mBASS,UAAA;AAAA;kBAPP,MAAK;AAAA,kBACJ,cAAYH,MAAA,MAAA,EAAO,wBAAwB,QAAS,YAAA;AAAA,kBACpD,WAAW,aAAA;AAAA,kBACX,OAAK+B,eAAE/B,MAAA,EAAA,EAAG,iBAAe,OAAA,CAAA;AAAA,kBACzB,SAAK,OAAA,CAAA,MAAA,OAAA,CAAA,IAAA,CAAA,WAAE,KAAK,QAAA,QAAO,CAAA;AAAA,gBAAA;kBAEpBS,YAAgDT,MAAA,YAAA,GAAA,EAAlC,OAAM,2BAAyB;AAAA,gBAAA;;cAGjDO,mBAA4D,KAA5D,YAA4DO,gBAAnB,aAAA,KAAY,GAAA,CAAA;AAAA,YAAA;;;;;;;;;"}
@@ -1,44 +0,0 @@
1
- import { tv } from "tailwind-variants";
2
- const ListboxPickerItemState = {
3
- /** Refers to the resting item. */
4
- Default: "default",
5
- /** Refers to the active (roving-focused) item. */
6
- Active: "active",
7
- /** Refers to a selected item. */
8
- Selected: "selected",
9
- /** Refers to a disabled item. */
10
- Disabled: "disabled"
11
- };
12
- const listboxVariants = tv({
13
- base: "flex max-h-72 flex-col gap-0.5 overflow-y-auto text-sm outline-hidden"
14
- });
15
- const listboxItemVariants = tv({
16
- base: "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden",
17
- variants: {
18
- state: {
19
- default: "text-popover-foreground",
20
- active: "bg-muted text-foreground",
21
- selected: "bg-primary-soft text-primary-soft-foreground",
22
- disabled: "pointer-events-none opacity-50"
23
- }
24
- },
25
- defaultVariants: { state: "default" }
26
- });
27
- const listboxGroupLabelVariants = tv({
28
- base: "px-2 py-1.5 text-xs font-semibold text-muted-foreground"
29
- });
30
- const listboxSeparatorVariants = tv({
31
- base: "-mx-1 my-1 h-px bg-border"
32
- });
33
- const listboxEmptyVariants = tv({
34
- base: "px-2 py-6 text-center text-sm text-muted-foreground"
35
- });
36
- export {
37
- ListboxPickerItemState as L,
38
- listboxItemVariants as a,
39
- listboxEmptyVariants as b,
40
- listboxSeparatorVariants as c,
41
- listboxVariants as d,
42
- listboxGroupLabelVariants as l
43
- };
44
- //# sourceMappingURL=ListboxPicker.variants-hiMcl66_.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ListboxPicker.variants-hiMcl66_.js","sources":["../../src/presentation/forms/listboxPicker/ListboxPicker.variants.ts"],"sourcesContent":["import { tv, type VariantProps } from '../../../foundation/styles';\n\n/** Defines the visual state of a listbox item. */\nexport const ListboxPickerItemState = {\n /** Refers to the resting item. */\n Default: 'default',\n /** Refers to the active (roving-focused) item. */\n Active: 'active',\n /** Refers to a selected item. */\n Selected: 'selected',\n /** Refers to a disabled item. */\n Disabled: 'disabled',\n} as const;\n\nexport type ListboxPickerItemState = (typeof ListboxPickerItemState)[keyof typeof ListboxPickerItemState];\n\n/* ListboxPicker container — STRUCTURAL only. SurfaceLayout chrome (bg, border, shadow,\n rounded, padding) is composed from `surfaceVariants` in `ListboxPicker.tsx`. */\nexport const listboxVariants = tv({\n base: 'flex max-h-72 flex-col gap-0.5 overflow-y-auto text-sm outline-hidden',\n});\n\nexport const listboxItemVariants = tv({\n base: 'relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden',\n variants: {\n state: {\n default: 'text-popover-foreground',\n active: 'bg-muted text-foreground',\n selected: 'bg-primary-soft text-primary-soft-foreground',\n disabled: 'pointer-events-none opacity-50',\n },\n },\n defaultVariants: { state: 'default' },\n});\n\nexport const listboxGroupLabelVariants = tv({\n base: 'px-2 py-1.5 text-xs font-semibold text-muted-foreground',\n});\n\nexport const listboxSeparatorVariants = tv({\n base: '-mx-1 my-1 h-px bg-border',\n});\n\nexport const listboxEmptyVariants = tv({\n base: 'px-2 py-6 text-center text-sm text-muted-foreground',\n});\n\nexport type ListboxPickerVariants = VariantProps<typeof listboxVariants>;\nexport type ListboxPickerItemVariants = VariantProps<typeof listboxItemVariants>;\n\n/* Compile-time lock: enum values ≡ tv axis keys (drift = type error). */\ntype AssertExact<A, B> = [A] extends [B] ? ([B] extends [A] ? true : never) : never;\nconst _assertListboxItemState: AssertExact<\n ListboxPickerItemState,\n NonNullable<VariantProps<typeof listboxItemVariants>['state']>\n> = true;\nvoid _assertListboxItemState;\n"],"names":[],"mappings":";AAGO,MAAM,yBAAyB;AAAA;AAAA,EAEpC,SAAS;AAAA;AAAA,EAET,QAAQ;AAAA;AAAA,EAER,UAAU;AAAA;AAAA,EAEV,UAAU;AACZ;AAMO,MAAM,kBAAkB,GAAG;AAAA,EAChC,MAAM;AACR,CAAC;AAEM,MAAM,sBAAsB,GAAG;AAAA,EACpC,MAAM;AAAA,EACN,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,UAAU;AAAA,IAAA;AAAA,EACZ;AAAA,EAEF,iBAAiB,EAAE,OAAO,UAAA;AAC5B,CAAC;AAEM,MAAM,4BAA4B,GAAG;AAAA,EAC1C,MAAM;AACR,CAAC;AAEM,MAAM,2BAA2B,GAAG;AAAA,EACzC,MAAM;AACR,CAAC;AAEM,MAAM,uBAAuB,GAAG;AAAA,EACrC,MAAM;AACR,CAAC;"}