@wow-two-beta/fe 0.0.34 → 0.0.35
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.
- package/dist/chunks/BackToTopButton.vue_vue_type_script_setup_true_lang-DHSpEajG.js.map +1 -1
- package/dist/foundation/storage/PersistentRef.d.ts +25 -0
- package/dist/foundation/storage/index.d.ts +1 -0
- package/dist/foundation/storage/index.js +46 -1
- package/dist/foundation/storage/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackToTopButton.vue_vue_type_script_setup_true_lang-DHSpEajG.js","sources":["../../src/presentation/actions/buttonGroup/ButtonGroup.vue","../../src/presentation/actions/fabButton/FabButton.variants.ts","../../src/presentation/actions/fabButton/FabButton.vue","../../src/presentation/actions/copyButton/CopyButton.vue","../../src/presentation/actions/refreshButton/RefreshButton.vue","../../src/presentation/actions/googleSignInButton/GoogleSignInButton.vue","../../src/presentation/actions/disclosureButton/DisclosureButton.vue","../../src/presentation/actions/toolbar/ToolbarContext.ts","../../src/presentation/actions/toolbar/Toolbar.vue","../../src/presentation/actions/toolbar/ToolbarButton.vue","../../src/presentation/actions/toolbar/ToolbarLink.vue","../../src/presentation/actions/toolbar/ToolbarSeparator.vue","../../src/presentation/actions/toolbar/index.ts","../../src/presentation/actions/speedDialGroup/SpeedDialGroupContext.ts","../../src/presentation/actions/speedDialGroup/SpeedDialGroupList.vue","../../src/presentation/actions/speedDialGroup/SpeedDialGroupTrigger.vue","../../src/presentation/actions/speedDialGroup/SpeedDialGroup.vue","../../src/presentation/actions/speedDialGroup/SpeedDialGroupAction.vue","../../src/presentation/actions/speedDialGroup/index.ts","../../src/presentation/actions/backToTopButton/BackToTopButton.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { HTMLAttributes } from 'vue';\nimport type { Orientation } from '../../../foundation/styles';\n\n/* Native div attributes stay in attribute fallthrough rather than becoming runtime props. */\nexport interface ButtonGroupProps extends /* @vue-ignore */ HTMLAttributes {\n /** The visual orientation. Default `horizontal`. */\n readonly orientation?: Orientation;\n\n /** The attached state — groups children with collapsed inner radii (connected look). Default `true`. */\n readonly isAttached?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn, Orientation as OrientationValue } from '../../../foundation/styles';\n\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\n/** Renders a row or column of related buttons, collapsing their inner radii into one connected control. */\ndefineOptions({ name: 'ButtonGroup', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ButtonGroupProps>(), {\n orientation: OrientationValue.Horizontal,\n isAttached: true,\n});\n\ndefineSlots<{\n /** The buttons the group lays out and joins into one connected control. */\n default(): unknown;\n}>();\n\nconst attrs = useAttrs();\n\nconst OwnedAttributes: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\nconst isHorizontal = computed(() => props.orientation === OrientationValue.Horizontal);\n\nconst rootClass = computed(() =>\n cn(\n 'inline-flex',\n isHorizontal.value ? 'flex-row' : 'flex-col',\n props.isAttached\n ? isHorizontal.value\n ? '[&>*]:rounded-none [&>*:first-child]:rounded-l-md [&>*:last-child]:rounded-r-md [&>*:not(:first-child)]:-ml-px'\n : '[&>*]:rounded-none [&>*:first-child]:rounded-t-md [&>*:last-child]:rounded-b-md [&>*:not(:first-child)]:-mt-px'\n : 'gap-2',\n attrs.class as ClassValue,\n ),\n);\n\nconst root = useTemplateRef<HTMLDivElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <!-- Visually groups action-children — collapses inner radii when `isAttached`. -->\n <div ref=\"root\" role=\"group\" :data-orientation=\"orientation\" :class=\"rootClass\" v-bind=\"passthroughAttrs\">\n <slot />\n </div>\n</template>\n","import { tv, OverlayPosition, type VariantProps } from '../../../foundation/styles';\n\n/** Defines the FabButton's visual surface style. */\nexport const FabButtonVariant = {\n /** Refers to the primary brand-filled surface. */\n Primary: 'primary',\n /** Refers to the neutral card surface with a hairline border. */\n Secondary: 'secondary',\n /** Refers to the destructive / error-filled surface. */\n Destructive: 'destructive',\n} as const;\n\nexport type FabButtonVariant = (typeof FabButtonVariant)[keyof typeof FabButtonVariant];\n\n/** Defines the FabButton's diameter. */\nexport const FabButtonSize = {\n /** Refers to the small (2.5rem) diameter. */\n Sm: 'sm',\n /** Refers to the medium (3.5rem) default diameter. */\n Md: 'md',\n /** Refers to the large (4rem) diameter. */\n Lg: 'lg',\n} as const;\n\nexport type FabButtonSize = (typeof FabButtonSize)[keyof typeof FabButtonSize];\n\nexport const fabVariants = tv({\n base: 'fixed inline-flex items-center justify-center rounded-full shadow-lg transition-all hover:shadow-xl focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50',\n variants: {\n variant: {\n primary: 'bg-primary text-primary-foreground hover:bg-primary/90',\n secondary: 'bg-card text-card-foreground border border-border hover:bg-muted',\n destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',\n },\n size: {\n sm: 'h-10 w-10',\n md: 'h-14 w-14',\n lg: 'h-16 w-16',\n },\n position: {\n 'bottom-right': 'bottom-6 right-6',\n 'bottom-left': 'bottom-6 left-6',\n 'bottom-center': 'bottom-6 left-1/2 -translate-x-1/2',\n 'top-right': 'top-6 right-6',\n 'top-left': 'top-6 left-6',\n 'top-center': 'top-6 left-1/2 -translate-x-1/2',\n },\n },\n defaultVariants: {\n variant: 'primary',\n size: 'md',\n position: 'bottom-right',\n },\n});\n\nexport type FabButtonVariants = VariantProps<typeof fabVariants>;\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 _assertFabVariant: AssertExact<FabButtonVariant, NonNullable<FabButtonVariants['variant']>> = true;\nconst _assertFabSize: AssertExact<FabButtonSize, NonNullable<FabButtonVariants['size']>> = true;\nconst _assertFabPosition: AssertExact<OverlayPosition, NonNullable<FabButtonVariants['position']>> = true;\nvoid _assertFabVariant;\nvoid _assertFabSize;\nvoid _assertFabPosition;\n","<script lang=\"ts\">\nimport type { ButtonHTMLAttributes } from 'vue';\nimport { AriaAttribute } from '../../../foundation/dom';\nimport { type OverlayPosition } from '../../../foundation/styles';\nimport type { FabButtonVariants, FabButtonVariant, FabButtonSize } from './FabButton.variants';\n\n/** @internal An attribute name this component derives or requires. */\ntype RequiredAttribute = typeof AriaAttribute.Label;\n\n/* The required accessible label rides on the ignored heritage rather than the body — FabButton content\n is typically icon-only, so the name is mandatory, but it must reach the DOM as an attribute. */\ntype FabButtonAttributes = ButtonHTMLAttributes & Record<RequiredAttribute, string>;\n\n/* Both heritage types are `@vue-ignore`d — native button attributes belong in attribute\n fallthrough, and `FabButtonVariants` resolves through `typeof fabVariants`, which the SFC prop\n compiler cannot walk. */\ntype FabButtonBase = FabButtonAttributes & Omit<FabButtonVariants, 'variant' | 'size' | 'position'>;\n\nexport interface FabButtonProps extends /* @vue-ignore */ FabButtonBase {\n /** The visual surface style. */\n readonly variant?: FabButtonVariant;\n /** The button diameter. */\n readonly size?: FabButtonSize;\n /** The anchor position on the viewport. */\n readonly position?: OverlayPosition;\n /** The button type. Default `ButtonType.Button`. */\n readonly type?: ButtonType;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { ButtonType } from '../../../foundation/dom';\nimport { cn } from '../../../foundation/styles';\nimport { fabVariants } from './FabButton.variants';\n\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\n/** Renders a floating action button — a circular, shadowed control pinned to a corner of the viewport. */\ndefineOptions({ name: 'FabButton', inheritAttrs: false });\n\n/* `aria-label` is deliberately NOT a declared prop: Vue camelizes prop keys, so a declared\n `'aria-label'` would arrive as `props.ariaLabel` and never render. It stays a fallthrough attr;\n the interface keeps the requirement through the `@vue-ignore`d heritage. */\n/* `children` has no prop counterpart — it is the default slot. */\nconst props = withDefaults(defineProps<FabButtonProps>(), { type: ButtonType.Button });\n\ndefineSlots<{\n /** The button's content — typically a single icon. */\n default(): unknown;\n}>();\n\nconst attrs = useAttrs();\n\nconst OwnedAttributes: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(fabVariants({ variant: props.variant, size: props.size, position: props.position }), attrs.class as ClassValue),\n);\n\nconst root = useTemplateRef<HTMLButtonElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <!-- Floating Action Button — fixed-position circular button with shadow. -->\n <button ref=\"root\" :type=\"type\" :class=\"rootClass\" v-bind=\"passthroughAttrs\">\n <slot />\n </button>\n</template>\n","<script lang=\"ts\">\nimport { AriaAttribute, DomEvent, type HandlerProp } from '../../../foundation/dom';\nimport type { ButtonProps } from '../button';\n\n/** @internal The attributes this component renders itself rather than forwarding. */\nconst OwnedAttributes = [AriaAttribute.Label] as const;\n\n/** @internal An attribute name from {@link OwnedAttributes}. */\ntype OwnedAttribute = (typeof OwnedAttributes)[number];\n\n/** @internal The `ButtonProps` handler this component replaces with its own emit. */\ntype ReplacedButtonProp = keyof Pick<ButtonProps, HandlerProp<typeof DomEvent.Error>>;\n\n/** Defines the forwarded `ButtonProps`, with the owned attributes re-added as required. */\ntype CopyButtonAttributes = Omit<ButtonProps, ReplacedButtonProp | OwnedAttribute> & Record<OwnedAttribute, string>;\n\n/** Defines props for the clipboard-copy button. */\nexport interface CopyButtonProps extends /* @vue-ignore */ CopyButtonAttributes {\n /** The text to copy when the button is activated. */\n readonly text: string;\n\n /** The reset window for the `copied` state in ms. Default 2000. Set 0 to hold `copied` until the next mount. */\n readonly resetAfter?: number;\n\n /** The accessible name to announce while `copied` is true. Falls back to `aria-label` when omitted. */\n readonly copiedAriaLabel?: string;\n\n /** The accessible name to announce while the last copy has failed. Falls back to `aria-label` when omitted. */\n readonly failedAriaLabel?: string;\n\n /** The visual surface style. Default `ghost`. */\n readonly variant?: ButtonVariant;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, watch } from 'vue';\nimport { Check, Copy, X } from 'lucide-vue-next';\n\nimport { Icon } from '../../../foundation/icons';\nimport { useClipboard } from '../../../foundation/clipboard';\nimport { AttributeValue } from '../../../foundation/dom';\nimport { OptionalExtensions } from '../../../foundation/optionals';\nimport Button from '../button/Button.vue';\nimport { ButtonVariant } from '../button';\n\n/** Renders a clipboard-copy button — for code blocks, ID / URL fields, and inline copy affordances. */\ndefineOptions({ name: 'CopyButton', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<CopyButtonProps>(), {\n resetAfter: 2000,\n variant: ButtonVariant.Ghost,\n});\n\nconst emit = defineEmits<{\n /** Fires when the copy fails — the Clipboard API and the legacy fallback both refused — once per failure. */\n error: [error: Error];\n}>();\n\nconst slots = defineSlots<{\n /** The content — receives `{ copied, error }` for a state-driven swap. Icon-only Copy/Check/X when omitted. */\n default?: (props: { copied: boolean; error: Error | null }) => unknown;\n}>();\n\n/** @internal {@link OwnedAttributes} as a lookup, for filtering the fallthrough set. */\nconst OwnedAttributeLookup: ReadonlySet<string> = new Set(OwnedAttributes);\n\nconst attrs = useAttrs();\n\nconst { copied, error, copy } = useClipboard({ resetAfter: () => props.resetAfter });\n\n/** The fallthrough attributes minus the ones this component renders itself. */\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributeLookup.has(key))),\n);\n\n/** The accessible name for the current state — `copiedAriaLabel` while copied, `failedAriaLabel` after a failure. */\nconst effectiveAriaLabel = computed(() => {\n const label = attrs[AriaAttribute.Label] as string | undefined;\n if (copied.value) return props.copiedAriaLabel ?? label;\n return error.value ? (props.failedAriaLabel ?? label) : label;\n});\n\n/** The state icon shown when the consumer supplies no content: Check once copied, X once the copy failed. */\nconst fallbackIcon = computed(() => (copied.value ? Check : error.value ? X : Copy));\n\n/** Emits `error` on each transition into a failed copy. */\nwatch(error, (next) => {\n if (next) emit(DomEvent.Error, next);\n});\n\n/** Copies the current text from the clicked button, discarding the settled promise. */\nfunction handleClick(event: MouseEvent): void {\n void copy(props.text, event.target instanceof Element ? event.target : null);\n}\n</script>\n\n<template>\n <Button\n :variant=\"variant\"\n :aria-label=\"effectiveAriaLabel\"\n :data-copied=\"OptionalExtensions.from(copied, AttributeValue.True)\"\n :data-error=\"OptionalExtensions.from(error !== null, AttributeValue.True)\"\n :class=\"error ? 'text-destructive-soft-foreground' : undefined\"\n v-bind=\"passthroughAttrs\"\n @click=\"handleClick\"\n >\n <slot v-if=\"slots.default\" :copied=\"copied\" :error=\"error\" />\n <Icon v-else :icon=\"fallbackIcon\" :size=\"16\" />\n </Button>\n</template>\n","<script lang=\"ts\">\nimport type { ButtonProps } from '../button';\n\n/** @internal The `ButtonProps` this preset decides itself. */\ntype OwnedButtonProp = keyof Pick<ButtonProps, 'isLoading' | 'shape' | 'leadingSlot'>;\n\n/** Defines the forwarded `ButtonProps`, minus the ones the refresh preset sets. */\ntype RefreshButtonAttributes = Omit<ButtonProps, OwnedButtonProp>;\n\n/** Defines props for the one refresh control a region shows. */\nexport interface RefreshButtonProps extends /* @vue-ignore */ RefreshButtonAttributes {\n /** True from the click until the refresh settles — `useRefresh`'s `refreshing`; the icon spins and clicks wait. */\n readonly isRefreshing?: boolean;\n\n /** The visible label, or the accessible name of an icon-only button. Default `\"Refresh\"`, localized. */\n readonly label?: string;\n\n /** Renders the icon alone, square at its size, named by `label`. */\n readonly isIconOnly?: boolean;\n\n /** The visual surface style. Default `outline`; `ghost` inside a panel header. */\n readonly variant?: ButtonProps['variant'];\n\n /** The size step. Default `sm`; `md` beside page-level controls. */\n readonly size?: ButtonProps['size'];\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport { RefreshCw } from 'lucide-vue-next';\nimport { useLocaleDefaults } from '../../../foundation/i18n';\nimport { Icon } from '../../../foundation/icons';\nimport Button from '../button/Button.vue';\n\n/**\n * Renders the refresh control a region reruns its reads with — a `Button` preset that swaps the refresh icon for the\n * spinner while `isRefreshing`, keeps its label and width, and swallows repeat clicks until the refresh settles. Pair\n * it with `useRefresh` from `@wow-two-beta/fe/query`, which also drives the region's placeholders.\n */\ndefineOptions({ name: 'RefreshButton', inheritAttrs: false });\n\nconst componentProps = withDefaults(defineProps<RefreshButtonProps>(), {\n isRefreshing: false,\n label: undefined,\n isIconOnly: false,\n variant: 'outline',\n size: 'sm',\n});\nconst props = useLocaleDefaults(componentProps, 'RefreshButton', { label: 'Refresh' });\n\nconst attrs = useAttrs();\n\n/** The icon-only form names itself through `aria-label`, and `title` shows the name on hover. */\nconst naming = computed(() =>\n props.isIconOnly ? { 'aria-label': props.label, title: props.label } : ({} as Record<string, string>),\n);\n</script>\n\n<template>\n <Button\n tone=\"neutral\"\n :variant=\"props.variant\"\n :size=\"props.size\"\n :shape=\"props.isIconOnly ? 'square' : 'default'\"\n :is-loading=\"props.isRefreshing\"\n v-bind=\"{ ...naming, ...attrs }\"\n >\n <template #leading><Icon :icon=\"RefreshCw\" :size=\"14\" /></template>\n <template v-if=\"!props.isIconOnly\">{{ props.label }}</template>\n </Button>\n</template>\n","<script lang=\"ts\">\nimport type { GoogleButtonOptions } from '../../../foundation/oauth';\n\n/** Defines the props for {@link GoogleSignInButton}. */\nexport interface GoogleSignInButtonProps {\n /** The button surface. Default `outline`. */\n readonly theme?: GoogleButtonOptions['theme'];\n\n /** The button height band. Default `large`. */\n readonly size?: GoogleButtonOptions['size'];\n\n /** The label wording. Default `signin_with`. */\n readonly text?: GoogleButtonOptions['text'];\n\n /** The button outline. Default `rectangular`. */\n readonly shape?: GoogleButtonOptions['shape'];\n\n /** The rendered width in px. GIS caps this at 400; omit to size to the host element. */\n readonly width?: number;\n\n /** The logo placement. Default `left`. */\n readonly logoAlignment?: GoogleButtonOptions['logo_alignment'];\n\n /** The BCP-47 locale for the button copy. Defaults to the browser's. */\n readonly locale?: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, ref, watch } from 'vue';\n\nimport { GoogleIdentityStatus, useGoogleIdentity } from '../../../foundation/oauth';\n\n/**\n * Renders the Google sign-in button — the Google-owned control for the GIS ID-token flow.\n *\n * The button itself is drawn by Google into the host element, not by this package: the ID-token flow\n * requires Google's own branding, so `theme` / `size` / `shape` are forwarded to GIS rather than\n * mapped onto house variants. Everything below the pixels is ours — script loading, `initialize`, and\n * the credential handoff live in the ancestor's `provideGoogleIdentity` owner.\n *\n * The owner receives a signed JWT ID token, not a session. Post it to the\n * product's identity endpoint for server-side verification, and let the response drive `AuthProvider`.\n */\ndefineOptions({ name: 'GoogleSignInButton', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<GoogleSignInButtonProps>(), {\n theme: 'outline',\n size: 'large',\n text: 'signin_with',\n shape: 'rectangular',\n logoAlignment: 'left',\n});\n\nconst host = ref<HTMLElement | null>(null);\nconst identity = useGoogleIdentity();\nconst isConfigured = computed(() => identity.status.value !== GoogleIdentityStatus.Unresolved);\n\n/* GIS reads these once per `renderButton` call, so a prop change has to re-render the button rather\n than mutate it. Collected into one computed so the watcher below fires on any of them. */\nconst buttonOptions = computed<GoogleButtonOptions>(() => ({\n theme: props.theme,\n size: props.size,\n text: props.text,\n shape: props.shape,\n width: props.width,\n logo_alignment: props.logoAlignment,\n locale: props.locale,\n}));\n\nconst isReady = computed(() => identity.status.value === GoogleIdentityStatus.Ready);\n\n/* `immediate` covers the case where the script resolved before this watcher was registered; the\n `nextTick` covers the opposite one, where `isReady` flips in the same tick the host is created and\n the ref is not populated yet. */\nwatch(\n [isReady, buttonOptions, host],\n async () => {\n if (!isReady.value) {\n host.value?.replaceChildren();\n return;\n }\n await nextTick();\n if (!isReady.value) return;\n\n const target = host.value;\n if (!target) return;\n\n // GIS appends; without the clear, a re-render stacks a second button under the first.\n target.replaceChildren();\n identity.renderButton(target, buttonOptions.value);\n },\n { immediate: true },\n);\n</script>\n\n<template>\n <div v-if=\"isConfigured\" ref=\"host\" v-bind=\"$attrs\" />\n</template>\n","<script lang=\"ts\">\nimport type { ButtonHTMLAttributes } from 'vue';\nimport type { Side } from '../../../foundation/styles';\n\n/* Native button attributes stay in attribute fallthrough rather than becoming runtime props. */\nexport interface DisclosureButtonProps extends /* @vue-ignore */ Omit<ButtonHTMLAttributes, 'children' | 'onChange'> {\n /** The controlled open state. */\n readonly open?: boolean;\n /** The uncontrolled initial state. */\n readonly defaultOpen?: boolean;\n /** The side the chevron sits on (`left` · `right`). Default `right`. */\n readonly chevronSide?: Side;\n /** The button type. Default `ButtonType.Button`. */\n readonly type?: ButtonType;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { ChevronDown } from 'lucide-vue-next';\nimport type { ClassValue } from 'clsx';\nimport { ButtonType, dataAttr } from '../../../foundation/dom';\nimport { cn, Side as SideValue } from '../../../foundation/styles';\nimport { Icon } from '../../../foundation/icons';\nimport { useControlled } from '../../../foundation/state';\n\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\n/** Renders a full-width labelled button with a rotating chevron that expands or collapses a section. */\ndefineOptions({ name: 'DisclosureButton', inheritAttrs: false });\n\n/* `children` became the default slot (the visible, left-aligned label); `onOpenChange` the\n `update:open` emit. */\nconst props = withDefaults(defineProps<DisclosureButtonProps>(), {\n chevronSide: SideValue.Right,\n type: ButtonType.Button,\n defaultOpen: false,\n open: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the reader expands or collapses the section, carrying the new open state. */\n 'update:open': [open: boolean];\n}>();\n\ndefineSlots<{\n /** The button's own label, left-aligned beside the chevron. */\n default(): unknown;\n}>();\n\nconst attrs = useAttrs();\n\nconst { value: open, setValue: setOpen } = useControlled<boolean>({\n controlled: () => props.open,\n default: props.defaultOpen,\n onChange: (next) => emit('update:open', next),\n});\n\nconst OwnedAttributes: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\nconst chevronClass = computed(() => cn('transition-transform', open.value && 'rotate-180'));\n\nconst rootClass = computed(() =>\n cn(\n 'inline-flex w-full items-center justify-between gap-2 rounded-md px-3 py-2 text-sm font-medium text-foreground transition-colors hover:bg-muted focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50',\n attrs.class as ClassValue,\n ),\n);\n\n/* Chained after the consumer's own click (attribute fallthrough puts theirs first) and skipped\n when they called `preventDefault()` — the original's `onClick?.(e); if (!e.defaultPrevented)`. */\nfunction handleClick(event: MouseEvent): void {\n if (event.defaultPrevented) return;\n setOpen(!open.value);\n}\n\nconst root = useTemplateRef<HTMLButtonElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <!-- Button with a rotating chevron — sets `aria-expanded` + `data-state=\"open|closed\"`. -->\n <button\n ref=\"root\"\n :type=\"type\"\n :aria-expanded=\"open\"\n :data-state=\"open ? 'open' : 'closed'\"\n :data-disabled=\"dataAttr(attrs.disabled as boolean | undefined)\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n @click=\"handleClick\"\n >\n <Icon v-if=\"chevronSide === SideValue.Left\" :icon=\"ChevronDown\" :size=\"16\" :class=\"chevronClass\" />\n <span class=\"flex-1 text-left\"><slot /></span>\n <Icon v-if=\"chevronSide === SideValue.Right\" :icon=\"ChevronDown\" :size=\"16\" :class=\"chevronClass\" />\n </button>\n</template>\n","import { inject, type InjectionKey } from 'vue';\nimport type { Orientation } from '../../../foundation/styles';\n\nexport interface ToolbarContextValue {\n /** The toolbar's layout axis. Live getter — read it, don't destructure it. */\n readonly orientation: Orientation;\n}\n\nexport const ToolbarKey: InjectionKey<ToolbarContextValue> = Symbol('wow-two.toolbar');\n\n/** Reads the surrounding `Toolbar`. Throws outside one — the parts are not standalone. */\nexport function useToolbarContext(): ToolbarContextValue {\n const context = inject(ToolbarKey, null);\n if (!context) throw new Error('Toolbar.* must be used inside <Toolbar>');\n return context;\n}\n","<script lang=\"ts\">\nimport type { HTMLAttributes } from 'vue';\nimport type { Orientation } from '../../../foundation/styles';\n\n/* Native div attributes stay in attribute fallthrough rather than becoming runtime props. */\nexport interface ToolbarProps extends /* @vue-ignore */ HTMLAttributes {\n /** The layout axis — drives both the arrow-key navigation and the flex direction. Default `horizontal`. */\n readonly orientation?: Orientation;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, useAttrs, useTemplateRef, type ComponentPublicInstance } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn, Orientation as OrientationValue } from '../../../foundation/styles';\nimport { RovingFocusGroup } from '../../../foundation/primitives';\nimport { ToolbarKey } from './ToolbarContext';\n\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\n/** Renders a bordered strip of actions that arrow keys walk through as a single tab stop. */\ndefineOptions({ name: 'Toolbar', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ToolbarProps>(), {\n orientation: OrientationValue.Horizontal,\n});\n\ndefineSlots<{\n /** The toolbar items — buttons, links, and separators sharing one roving tab stop. */\n default(): unknown;\n}>();\n\nconst attrs = useAttrs();\n\n/* Live getter, not a snapshot — `ToolbarSeparator` re-reads it to flip its own axis. */\nprovide(ToolbarKey, {\n get orientation() {\n return props.orientation;\n },\n});\n\nconst OwnedAttributes: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n 'inline-flex items-center gap-1 rounded-md border border-border bg-background p-1',\n props.orientation === OrientationValue.Vertical && 'flex-col items-stretch',\n attrs.class as ClassValue,\n ),\n);\n\nconst root = useTemplateRef<ComponentPublicInstance>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\nconst el = computed<HTMLElement | null>(() => {\n const node = root.value?.$el;\n return node instanceof HTMLElement ? node : null;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <RovingFocusGroup\n ref=\"root\"\n :orientation=\"orientation\"\n can-loop\n role=\"toolbar\"\n :aria-orientation=\"orientation\"\n :data-orientation=\"orientation\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n >\n <slot />\n </RovingFocusGroup>\n</template>\n","<script lang=\"ts\">\nimport type { ButtonHTMLAttributes } from 'vue';\n\n/* Native button attributes stay in attribute fallthrough rather than becoming runtime props. */\nexport interface ToolbarButtonProps extends /* @vue-ignore */ Omit<ButtonHTMLAttributes, 'children'> {\n /** The as-child flag — renders as the single child via `Primitive`, dropping item chrome. */\n readonly asChild?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { ButtonType, HtmlElement } from '../../../foundation/dom';\nimport { cn } from '../../../foundation/styles';\nimport { Primitive, useRovingFocusItem } from '../../../foundation/primitives';\n\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\n/** Renders one action button inside a toolbar, taking its turn in the group's roving tab stop. */\ndefineOptions({ name: 'ToolbarButton', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ToolbarButtonProps>(), { asChild: false });\n\ndefineSlots<{\n /** The button's label, or — under `asChild` — the single element that becomes the item. */\n default(): unknown;\n}>();\n\nconst attrs = useAttrs();\n\n/* Reactive object — `tabindex` tracks the group's tab stop, so read through it rather than\n destructuring. The function `ref` registers this item's node with the group. */\nconst roving = useRovingFocusItem();\n\nconst OwnedAttributes: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\nconst rootClass = computed(() =>\n props.asChild\n ? cn(attrs.class as ClassValue)\n : cn(\n 'inline-flex h-8 items-center justify-center rounded-sm px-2 text-sm transition-colors hover:bg-muted focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50',\n attrs.class as ClassValue,\n ),\n);\n\n/* Chained after the consumer's own keydown (attribute fallthrough puts theirs first) and skipped\n when they called `preventDefault()` — the original's explicit `if (e.defaultPrevented) return`. */\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented) return;\n roving.onKeydown(event);\n}\n</script>\n\n<template>\n <Primitive\n :ref=\"roving.ref\"\n :as=\"HtmlElement.Button\"\n :as-child=\"asChild\"\n :type=\"asChild ? undefined : ButtonType.Button\"\n :tabindex=\"roving.tabindex\"\n :data-roving-focus-item=\"roving['data-roving-focus-item']\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n @focus=\"roving.onFocus()\"\n @keydown=\"handleKeydown\"\n >\n <slot />\n </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { AnchorHTMLAttributes } from 'vue';\n\n/* Native anchor attributes stay in attribute fallthrough rather than becoming runtime props. */\nexport type ToolbarLinkProps = /* @vue-ignore */ Omit<AnchorHTMLAttributes, 'children'>;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/styles';\nimport { useRovingFocusItem } from '../../../foundation/primitives';\n\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\n/** Renders one anchor inside a toolbar, taking its turn in the group's roving tab stop. */\ndefineOptions({ name: 'ToolbarLink', inheritAttrs: false });\n\ndefineSlots<{\n /** The anchor's own label. */\n default(): unknown;\n}>();\n\nconst attrs = useAttrs();\n\n/* Reactive object — `tabindex` tracks the group's tab stop, so read through it rather than\n destructuring. The function `ref` registers this item's node with the group. */\nconst roving = useRovingFocusItem();\n\nconst OwnedAttributes: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n 'inline-flex h-8 items-center justify-center rounded-sm px-2 text-sm text-foreground underline-offset-2 transition-colors hover:bg-muted hover:underline focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring',\n attrs.class as ClassValue,\n ),\n);\n\n/* Chained after the consumer's own keydown (attribute fallthrough puts theirs first) and skipped\n when they called `preventDefault()` — the original's explicit `if (e.defaultPrevented) return`. */\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented) return;\n roving.onKeydown(event);\n}\n</script>\n\n<template>\n <a\n :ref=\"roving.ref\"\n :tabindex=\"roving.tabindex\"\n :data-roving-focus-item=\"roving['data-roving-focus-item']\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n @focus=\"roving.onFocus()\"\n @keydown=\"handleKeydown\"\n >\n <slot />\n </a>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn, Orientation } from '../../../foundation/styles';\nimport { useToolbarContext } from './ToolbarContext';\n\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\n/** Renders a hairline rule between two toolbar groups, turned across the toolbar's own axis. */\ndefineOptions({ name: 'ToolbarSeparator', inheritAttrs: false });\n\nconst attrs = useAttrs();\nconst context = useToolbarContext();\n\nconst isVertical = computed(() => context.orientation === Orientation.Vertical);\n\nconst OwnedAttributes: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn('shrink-0 bg-border', isVertical.value ? 'mx-1 h-px' : 'my-1 w-px self-stretch', attrs.class as ClassValue),\n);\n</script>\n\n<template>\n <div\n role=\"separator\"\n :aria-orientation=\"isVertical ? 'horizontal' : 'vertical'\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n />\n</template>\n","import ToolbarRoot from './Toolbar.vue';\nimport ToolbarButton from './ToolbarButton.vue';\nimport ToolbarLink from './ToolbarLink.vue';\nimport ToolbarSeparator from './ToolbarSeparator.vue';\n\n/**\n * The toolbar root, carrying its parts as properties so `<Toolbar.Button>` /\n * `<Toolbar.Separator>` resolve in a template — the counterpart of the React\n * original's `Object.assign`. Each part is also exported on its own name.\n */\nconst Toolbar: typeof ToolbarRoot & {\n Button: typeof ToolbarButton;\n LinkItem: typeof ToolbarLink;\n SeparatorLayout: typeof ToolbarSeparator;\n} = Object.assign(ToolbarRoot, {\n Button: ToolbarButton,\n LinkItem: ToolbarLink,\n SeparatorLayout: ToolbarSeparator,\n});\n\nexport { Toolbar, ToolbarButton, ToolbarLink, ToolbarSeparator };\nexport type { ToolbarProps } from './Toolbar.vue';\nexport type { ToolbarButtonProps } from './ToolbarButton.vue';\nexport type { ToolbarLinkProps } from './ToolbarLink.vue';\nexport { ToolbarKey, useToolbarContext, type ToolbarContextValue } from './ToolbarContext';\n","import { inject, type InjectionKey, type ShallowRef } from 'vue';\nimport type { OverlayPosition } from '../../../foundation/styles';\n\n/** The overlay anchor position of a SpeedDialGroup (shared overlay vocabulary). */\nexport type SpeedDialGroupPosition = OverlayPosition;\n\n/** Defines the axis a SpeedDialGroup's action items fan out along. */\nexport const SpeedDialGroupDirection = {\n /** Refers to items stacking upward from the trigger. */\n Up: 'up',\n /** Refers to items stacking downward from the trigger. */\n Down: 'down',\n /** Refers to items stacking to the left of the trigger. */\n Left: 'left',\n /** Refers to items stacking to the right of the trigger. */\n Right: 'right',\n} as const;\n\nexport type SpeedDialGroupDirection = (typeof SpeedDialGroupDirection)[keyof typeof SpeedDialGroupDirection];\n\nexport interface SpeedDialGroupContextValue {\n /** The open state. Live getter — read it, don't destructure it. */\n readonly open: boolean;\n\n /** Sets the open state (and fires the root's `open-change`). */\n setOpen: (open: boolean) => void;\n\n /**\n * The trigger's element, published by `SpeedDialGroupTrigger` on mount. Escape and\n * action-select return focus here — the React original held a `MutableRefObject`\n * threaded through `composeRefs`; a Vue child writes its own element into this ref\n * instead.\n */\n triggerEl: ShallowRef<HTMLElement | null>;\n\n /** The resolved fan-out axis. Live getter. */\n readonly direction: SpeedDialGroupDirection;\n\n /** The viewport anchor. Live getter. */\n readonly position: SpeedDialGroupPosition;\n}\n\nexport const SpeedDialGroupKey: InjectionKey<SpeedDialGroupContextValue> = Symbol('wow-two.speedDial');\n\n/** Reads the surrounding `SpeedDialGroup`. Throws outside one — the parts are not standalone. */\nexport function useSpeedDialContext(): SpeedDialGroupContextValue {\n const context = inject(SpeedDialGroupKey, null);\n if (!context) throw new Error('SpeedDialGroup.* must be used inside <SpeedDialGroup>');\n return context;\n}\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/styles';\n\n/**\n * Renders the `<ul>` an open speed dial fans its action items into.\n *\n * `Presence`-clonable list: a single element that takes the `data-state` and `ref`\n * `Presence` injects. Marked `group` so each action item animates off its\n * `data-[state]`; carries its own fade so `Presence` has an animation on *this*\n * node to watch before unmount. Internal — not exported from the barrel.\n */\ndefineOptions({ name: 'SpeedDialGroupList', inheritAttrs: false });\n\ndefineSlots<{\n /** The `SpeedDialGroupAction` items the list fans out, each its own `<li>`. */\n default(): unknown;\n}>();\n\nconst attrs = useAttrs();\n\nconst OwnedAttributes: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n 'group absolute flex',\n /* list fade gated on data-state; motion-safe so reduced-motion users\n get no movement. */\n 'motion-safe:data-[state=open]:animate-(--animate-fade-in)',\n 'motion-safe:data-[state=closed]:animate-(--animate-fade-out)',\n 'motion-reduce:animate-none',\n /* Per-item enter stagger: ramp `animation-delay` on the first few items\n while opening only (closed → delay 0 so no item outlasts the list's\n own fade-out, which gates unmount). */\n 'motion-safe:group-data-[state=open]:[&>li:nth-child(2)]:[animation-delay:40ms]',\n 'motion-safe:group-data-[state=open]:[&>li:nth-child(3)]:[animation-delay:80ms]',\n 'motion-safe:group-data-[state=open]:[&>li:nth-child(4)]:[animation-delay:120ms]',\n 'motion-safe:group-data-[state=open]:[&>li:nth-child(n+5)]:[animation-delay:160ms]',\n attrs.class as ClassValue,\n ),\n);\n</script>\n\n<template>\n <ul role=\"menu\" :class=\"rootClass\" v-bind=\"passthroughAttrs\">\n <slot />\n </ul>\n</template>\n","<script lang=\"ts\">\nimport type { ButtonHTMLAttributes, VNodeChild } from 'vue';\nimport type { FabButtonVariant, FabButtonSize } from '../fabButton/FabButton.variants';\n\n/* Native button attributes stay in attribute fallthrough rather than becoming runtime props. */\nexport interface SpeedDialGroupTriggerProps extends /* @vue-ignore */ Omit<ButtonHTMLAttributes, 'children'> {\n /** The glyph shown while closed. Defaults to a `Plus` icon. Prefer the `closed-icon` named slot. */\n readonly closedIcon?: VNodeChild;\n\n /** The glyph shown while open. Defaults to an `X` icon. Prefer the `open-icon` named slot. */\n readonly openIcon?: VNodeChild;\n\n /** The FabButton surface style. */\n readonly variant?: FabButtonVariant;\n\n /** The FabButton diameter. */\n readonly size?: FabButtonSize;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useLocale } from '../../../foundation/i18n';\nimport { computed, defineComponent, useAttrs, useTemplateRef, watchPostEffect } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { Plus, X } from 'lucide-vue-next';\nimport { AriaAttribute } from '../../../foundation/dom';\nimport { cn } from '../../../foundation/styles';\nimport { Icon } from '../../../foundation/icons';\nimport FabButton from '../fabButton/FabButton.vue';\nimport { useSpeedDialContext } from './SpeedDialGroupContext';\n\nconst locale = useLocale();\n\n/** Renders the speed dial's pinned FAB, swapping its glyph as the dial opens and closes. */\ndefineOptions({ name: 'SpeedDialGroupTrigger', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<SpeedDialGroupTriggerProps>(), {\n /* `VNodeChild` includes `boolean`, so Vue's boolean casting turns an absent node-valued prop\n into `false` rather than `undefined` — which reads as \"supplied\" at every `!== undefined`\n check. An explicit `undefined` default suppresses the cast. */\n closedIcon: undefined,\n openIcon: undefined,\n});\n\ndefineSlots<{\n /** The glyph shown while the dial is open. Falls back to `openIcon`, then to an `X` icon. */\n 'open-icon'?(): unknown;\n\n /** The glyph shown while the dial is closed. Falls back to `closedIcon`, then to a `Plus` icon. */\n 'closed-icon'?(): unknown;\n}>();\n\nconst attrs = useAttrs();\nconst context = useSpeedDialContext();\n\n/* `aria-label` is read off `attrs`, not `props`: Vue camelizes declared prop keys, so a declared\n `'aria-label'` would arrive as `props.ariaLabel` and never render. It is stripped from the\n forwarded attrs and re-bound below, so the resolved value is the one that lands. */\nconst ariaLabel = computed(\n () =>\n (attrs[AriaAttribute.Label] as string | undefined) ??\n locale.t('SpeedDialGroupTrigger.label', undefined, 'Toggle actions'),\n);\n\nconst OwnedAttributes: ReadonlySet<string> = new Set(['class', AriaAttribute.Label]);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\n/* Stable render-only wrappers for the node-valued props, so each can render as the fallback of its\n named-slot twin. */\nconst ClosedIconProp = defineComponent({ render: () => props.closedIcon });\nconst OpenIconProp = defineComponent({ render: () => props.openIcon });\n\nconst fab = useTemplateRef('fab');\n\n/* Publishes the trigger element into the root's context — Escape and action-select return focus\n here. The React original threaded a shared `MutableRefObject` through `composeRefs`. */\nwatchPostEffect(() => {\n const node = fab.value?.el;\n const elementType = node?.ownerDocument.defaultView?.HTMLElement;\n context.triggerEl.value = elementType && node instanceof elementType ? node : null;\n});\n\nconst rootClass = computed(() =>\n cn('static !bottom-auto !left-auto !right-auto !top-auto !translate-x-0', attrs.class as ClassValue),\n);\n\n/* Chained after the consumer's own click (attribute fallthrough puts theirs first) and skipped\n when they called `preventDefault()` — the original's `onClick?.(e); if (e.defaultPrevented) return`. */\nfunction handleClick(event: MouseEvent): void {\n if (event.defaultPrevented) return;\n context.setOpen(!context.open);\n}\n</script>\n\n<template>\n <FabButton\n ref=\"fab\"\n v-bind=\"passthroughAttrs\"\n :aria-label=\"ariaLabel\"\n aria-haspopup=\"menu\"\n :aria-expanded=\"context.open\"\n :variant=\"variant\"\n :size=\"size\"\n :position=\"context.position\"\n :class=\"rootClass\"\n @click=\"handleClick\"\n >\n <template v-if=\"context.open\">\n <slot name=\"open-icon\">\n <OpenIconProp v-if=\"openIcon !== undefined\" />\n <Icon v-else :icon=\"X\" :size=\"20\" />\n </slot>\n </template>\n <template v-else>\n <slot name=\"closed-icon\">\n <ClosedIconProp v-if=\"closedIcon !== undefined\" />\n <Icon v-else :icon=\"Plus\" :size=\"20\" />\n </slot>\n </template>\n </FabButton>\n</template>\n","<script lang=\"ts\">\nimport type { SpeedDialGroupDirection, SpeedDialGroupPosition } from './SpeedDialGroupContext';\n\nexport interface SpeedDialGroupProps {\n /** The viewport anchor. Default `bottom-right`. */\n readonly position?: SpeedDialGroupPosition;\n\n /** The axis the action items fan out along. Defaults to the one implied by `position`. */\n readonly direction?: SpeedDialGroupDirection;\n\n /** The controlled open state. */\n readonly open?: boolean;\n\n /** The uncontrolled initial state. */\n readonly defaultOpen?: boolean;\n\n /** The pixel gap between stacked action items. Default 12. */\n readonly gap?: number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, shallowRef, useAttrs, useSlots, useTemplateRef, watch, type VNode } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn, OverlayPosition } from '../../../foundation/styles';\nimport { Key } from '../../../foundation/dom';\nimport { Presence, renderableChildren } from '../../../foundation/primitives';\nimport { useControlled } from '../../../foundation/state';\nimport { useEscape } from '../../../foundation/shortcuts';\nimport { useOutsideClick } from '../../../foundation/dom';\nimport { SpeedDialGroupDirection as SpeedDialGroupDirectionValue, SpeedDialGroupKey } from './SpeedDialGroupContext';\nimport SpeedDialGroupList from './SpeedDialGroupList.vue';\nimport SpeedDialGroupTrigger from './SpeedDialGroupTrigger.vue';\n\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\n/** Renders a pinned trigger that fans a stack of action buttons out across the viewport when opened. */\ndefineOptions({ name: 'SpeedDialGroup', inheritAttrs: false });\n\n/* `className` is Vue's `class` fallthrough attr; `children` is the default slot. */\nconst props = withDefaults(defineProps<SpeedDialGroupProps>(), {\n position: OverlayPosition.BottomRight,\n direction: undefined,\n gap: 12,\n defaultOpen: false,\n open: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the dial opens or closes, carrying the new open state. */\n 'update:open': [open: boolean];\n}>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\n\nconst OwnedAttributes: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\nconst PositionToDirection: Record<SpeedDialGroupPosition, SpeedDialGroupDirection> = {\n 'bottom-right': SpeedDialGroupDirectionValue.Up,\n 'bottom-left': SpeedDialGroupDirectionValue.Up,\n 'bottom-center': SpeedDialGroupDirectionValue.Up,\n 'top-right': SpeedDialGroupDirectionValue.Down,\n 'top-left': SpeedDialGroupDirectionValue.Down,\n 'top-center': SpeedDialGroupDirectionValue.Down,\n};\n\nconst PositionOffsets: Record<SpeedDialGroupPosition, string> = {\n 'bottom-right': 'bottom-6 right-6',\n 'bottom-left': 'bottom-6 left-6',\n 'bottom-center': 'bottom-6 left-1/2 -translate-x-1/2',\n 'top-right': 'top-6 right-6',\n 'top-left': 'top-6 left-6',\n 'top-center': 'top-6 left-1/2 -translate-x-1/2',\n};\n\nconst DirectionToStack: Record<SpeedDialGroupDirection, string> = {\n [SpeedDialGroupDirectionValue.Up]: 'flex-col-reverse bottom-full mb-3',\n [SpeedDialGroupDirectionValue.Down]: 'flex-col top-full mt-3',\n [SpeedDialGroupDirectionValue.Left]: 'flex-row-reverse right-full mr-3',\n [SpeedDialGroupDirectionValue.Right]: 'flex-row top-1/2 -translate-y-1/2 left-full ml-3',\n};\n\nconst { value: open, setValue: setOpen } = useControlled<boolean>({\n controlled: () => props.open,\n default: props.defaultOpen,\n onChange: (next) => emit('update:open', next),\n});\n\nconst rootEl = useTemplateRef<HTMLDivElement>('rootEl');\nconst triggerEl = shallowRef<HTMLElement | null>(null);\n\nconst resolvedDirection = computed(() => props.direction ?? PositionToDirection[props.position]);\n\nuseEscape((event) => {\n if (event.defaultPrevented) return;\n setOpen(false);\n}, open);\n\n// Restore only while the closing dial owns focus; never queue a callback that can steal it later.\nwatch(\n open,\n (isOpen) => {\n const root = rootEl.value;\n if (!isOpen && root?.contains(root.ownerDocument.activeElement)) triggerEl.value?.focus();\n },\n { flush: 'pre' },\n);\n\nuseOutsideClick(\n rootEl,\n () => {\n if (open.value) setOpen(false);\n },\n open,\n);\n\nprovide(SpeedDialGroupKey, {\n get open() {\n return open.value;\n },\n setOpen,\n triggerEl,\n get direction() {\n return resolvedDirection.value;\n },\n get position() {\n return props.position;\n },\n});\n\n/* The trigger renders always (a closed dial must still be openable); only the action items are\n gated behind `open`. The React original partitioned `Children.toArray` on `child.type`; the\n same split runs over the slot's vnodes, so the authoring shape is unchanged. */\nfunction splitChildren(keepTrigger: boolean): Array<VNode> {\n return renderableChildren(slots.default?.()).filter(\n (child) => (child.type === SpeedDialGroupTrigger) === keepTrigger,\n );\n}\n\nconst rootClass = computed(() => cn('fixed', PositionOffsets[props.position], attrs.class as ClassValue));\nconst stackClass = computed(() => DirectionToStack[resolvedDirection.value]);\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (\n event.defaultPrevented ||\n event.isComposing ||\n !open.value ||\n (event.key !== Key.ArrowDown && event.key !== Key.ArrowUp)\n )\n return;\n const root = rootEl.value;\n if (!root) return;\n const items = Array.from(root.querySelectorAll<HTMLButtonElement>('[role=\"menuitem\"]')).filter(\n (item) => !item.matches(':disabled,[aria-disabled=\"true\"],[data-disabled],[hidden]') && !item.closest('[inert]'),\n );\n if (items.length === 0) return;\n event.preventDefault();\n const currentIndex = items.indexOf(root.ownerDocument.activeElement as HTMLButtonElement);\n const nextIndex =\n currentIndex === -1\n ? event.key === Key.ArrowDown\n ? 0\n : items.length - 1\n : (currentIndex + (event.key === Key.ArrowDown ? 1 : -1) + items.length) % items.length;\n items[nextIndex]?.focus();\n}\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: rootEl });\n</script>\n\n<template>\n <div\n ref=\"rootEl\"\n :data-state=\"open ? 'open' : 'closed'\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n @keydown=\"handleKeydown\"\n >\n <!-- `Presence` clones `data-state` (\"open\" | \"closed\") + a `ref` onto the list and defers\n unmount until its fade-out ends — keeps the exit from being killed by the hard `!open`\n unmount. Items pop in/out off the list's `group` state (see `SpeedDialGroupAction`),\n staggered on enter. -->\n <Presence :is-present=\"open\">\n <SpeedDialGroupList :data-direction=\"resolvedDirection\" :style=\"{ gap: `${gap}px` }\" :class=\"stackClass\">\n <component :is=\"node\" v-for=\"(node, index) in splitChildren(false)\" :key=\"node.key ?? index\" />\n </SpeedDialGroupList>\n </Presence>\n <component :is=\"node\" v-for=\"(node, index) in splitChildren(true)\" :key=\"node.key ?? index\" />\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { ButtonHTMLAttributes, VNodeChild } from 'vue';\nimport { AriaAttribute } from '../../../foundation/dom';\n\n/** @internal An attribute name this component derives or requires. */\ntype RequiredAttribute = typeof AriaAttribute.Label;\n\n/* The required accessible label rides on the ignored heritage rather than the body — action items\n are icon-only, so the name is mandatory, but it must reach the DOM as an attribute. */\ntype SpeedDialGroupActionAttributes = Omit<ButtonHTMLAttributes, 'children'> & Record<RequiredAttribute, string>;\n\n/* Native button attributes stay in attribute fallthrough rather than becoming runtime props. */\nexport interface SpeedDialGroupActionProps extends /* @vue-ignore */ SpeedDialGroupActionAttributes {\n /** The action's glyph. Prefer the `icon` named slot; this prop stays for parity with the React API. */\n readonly icon?: VNodeChild;\n\n /** The label chip rendered beside the button. Prefer the `tooltip` named slot. */\n readonly tooltip?: VNodeChild;\n\n /** The button type. Default `ButtonType.Button`. */\n readonly type?: ButtonType;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, defineComponent, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { ButtonType } from '../../../foundation/dom';\nimport { cn, Side } from '../../../foundation/styles';\nimport { SpeedDialGroupDirection, useSpeedDialContext } from './SpeedDialGroupContext';\n\n/* `aria-label` is deliberately NOT a declared prop: Vue camelizes prop keys, so a declared\n `'aria-label'` would arrive as `props.ariaLabel` and never render. It stays a fallthrough attr;\n the interface keeps the requirement through the `@vue-ignore`d heritage. */\n/** Renders one icon button of an open speed dial, with an optional label chip beside it. */\ndefineOptions({ name: 'SpeedDialGroupAction', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<SpeedDialGroupActionProps>(), {\n type: ButtonType.Button,\n /* `VNodeChild` includes `boolean`, so Vue's boolean casting turns an absent node-valued prop\n into `false` rather than `undefined` — which reads as \"supplied\" at every `!== undefined`\n check. An explicit `undefined` default suppresses the cast. */\n icon: undefined,\n tooltip: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the action is chosen — the dial closes and focus returns to the trigger afterwards. */\n select: [];\n}>();\n\ndefineSlots<{\n /** The action's glyph. Preferred over the `icon` prop. */\n icon?(): unknown;\n /** The glyph, in the plain-children shape a Vue caller reaches for. Same slot as `icon`. */\n default?(): unknown;\n /** The label chip beside the button. Preferred over the `tooltip` prop. */\n tooltip?(): unknown;\n}>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst context = useSpeedDialContext();\n\nconst DirectionLabelSide: Record<SpeedDialGroupDirection, Side> = {\n [SpeedDialGroupDirection.Up]: Side.Right,\n [SpeedDialGroupDirection.Down]: Side.Right,\n [SpeedDialGroupDirection.Left]: Side.Right,\n [SpeedDialGroupDirection.Right]: Side.Left,\n};\n\n/* Stable render-only wrappers for the node-valued props, so each can render as the fallback of its\n named-slot twin. */\nconst IconProp = defineComponent({ render: () => props.icon });\nconst TooltipProp = defineComponent({ render: () => props.tooltip });\n\nconst labelSide = computed(() => DirectionLabelSide[context.direction]);\nconst hasTooltip = computed(() => props.tooltip !== undefined || slots.tooltip !== undefined);\n\nconst OwnedAttributes: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\nconst buttonClass = computed(() =>\n cn(\n 'inline-flex h-10 w-10 items-center justify-center rounded-full bg-card text-card-foreground shadow-md transition-all hover:shadow-lg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring',\n attrs.class as ClassValue,\n ),\n);\n\n/* Chained after the consumer's own click (attribute fallthrough puts theirs first) and skipped\n when they called `preventDefault()` — the original's `onClick?.(e); if (e.defaultPrevented) return`. */\nfunction handleClick(event: MouseEvent): void {\n if (\n event.defaultPrevented ||\n !context.open ||\n root.value?.matches(':disabled,[aria-disabled=\"true\"],[data-disabled]')\n )\n return;\n emit('select');\n context.setOpen(false);\n}\n\nconst root = useTemplateRef<HTMLButtonElement>('root');\nfunction handleClickCapture(event: MouseEvent): void {\n if (context.open && !root.value?.matches(':disabled,[aria-disabled=\"true\"],[data-disabled]')) return;\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <li\n role=\"none\"\n :data-side=\"labelSide\"\n :class=\"\n cn(\n 'flex items-center gap-2',\n /* fade+scale each action off the list's `group` state; motion-safe so\n reduced-motion users get no movement (delay ramp lives on the list). */\n 'motion-safe:group-data-[state=open]:animate-(--animate-pop-in)',\n 'motion-safe:group-data-[state=closed]:animate-(--animate-pop-out)',\n 'motion-reduce:animate-none',\n )\n \"\n >\n <span\n v-if=\"hasTooltip && labelSide === Side.Left\"\n class=\"rounded-md bg-popover px-2 py-1 text-xs text-popover-foreground shadow\"\n >\n <slot name=\"tooltip\"><TooltipProp v-if=\"tooltip !== undefined\" /></slot>\n </span>\n <button\n ref=\"root\"\n v-bind=\"passthroughAttrs\"\n :type=\"type\"\n role=\"menuitem\"\n :class=\"buttonClass\"\n @click.capture=\"handleClickCapture\"\n @click=\"handleClick\"\n >\n <!-- The default slot is the fallback, not a second API: React typed `children` away,\n so a Vue caller writing `<SpeedDialGroupAction><Pencil /></SpeedDialGroupAction>` — the\n idiomatic shape — got a silently empty button. Precedence stays `icon` slot →\n default slot → `icon` prop. -->\n <slot name=\"icon\">\n <slot><IconProp v-if=\"icon !== undefined\" /></slot>\n </slot>\n </button>\n <span\n v-if=\"hasTooltip && labelSide === Side.Right\"\n class=\"rounded-md bg-popover px-2 py-1 text-xs text-popover-foreground shadow\"\n >\n <slot name=\"tooltip\"><TooltipProp v-if=\"tooltip !== undefined\" /></slot>\n </span>\n </li>\n</template>\n","import SpeedDialGroupRoot from './SpeedDialGroup.vue';\nimport SpeedDialGroupTrigger from './SpeedDialGroupTrigger.vue';\nimport SpeedDialGroupAction from './SpeedDialGroupAction.vue';\n\n/**\n * The dial root, carrying its parts as properties so `<SpeedDialGroup.Trigger>` /\n * `<SpeedDialGroup.Action>` resolve in a template — the counterpart of the React\n * original's `Object.assign`. Each part is also exported on its own name.\n */\nconst SpeedDialGroup: typeof SpeedDialGroupRoot & {\n Trigger: typeof SpeedDialGroupTrigger;\n Action: typeof SpeedDialGroupAction;\n} = Object.assign(SpeedDialGroupRoot, {\n Trigger: SpeedDialGroupTrigger,\n Action: SpeedDialGroupAction,\n});\n\nexport { SpeedDialGroup, SpeedDialGroupAction, SpeedDialGroupTrigger };\nexport {\n SpeedDialGroupDirection,\n SpeedDialGroupKey,\n useSpeedDialContext,\n type SpeedDialGroupContextValue,\n type SpeedDialGroupPosition,\n} from './SpeedDialGroupContext';\nexport type { SpeedDialGroupProps } from './SpeedDialGroup.vue';\nexport type { SpeedDialGroupTriggerProps } from './SpeedDialGroupTrigger.vue';\nexport type { SpeedDialGroupActionProps } from './SpeedDialGroupAction.vue';\nexport default SpeedDialGroup;\n","<script lang=\"ts\">\nimport type { ButtonHTMLAttributes, VNodeChild } from 'vue';\nimport type { OverlayPosition } from '../../../foundation/styles';\n\n/* Native button attributes stay in attribute fallthrough rather than becoming runtime props. */\nexport interface BackToTopButtonProps extends /* @vue-ignore */ ButtonHTMLAttributes {\n /** The scroll distance (px) before the button appears. Default 400. */\n readonly threshold?: number;\n\n /** The scrollable element to scope to. Defaults to the window. */\n readonly scrollContainer?: HTMLElement | null;\n\n /** The anchor position on the viewport. Default `bottom-right`. */\n readonly position?: OverlayPosition;\n\n /** The visible label. Omit for icon-only. Prefer the `label` named slot. */\n readonly label?: VNodeChild;\n\n /** The button type. Default `ButtonType.Button`. */\n readonly type?: ButtonType;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useLocale } from '../../../foundation/i18n';\nimport { computed, defineComponent, shallowRef, useAttrs, useTemplateRef, watchPostEffect } from 'vue';\nimport { ArrowUp } from 'lucide-vue-next';\nimport type { ClassValue } from 'clsx';\nimport { AriaAttribute, ButtonType } from '../../../foundation/dom';\nimport { cn, OverlayPosition as OverlayPositionValue } from '../../../foundation/styles';\nimport { Icon } from '../../../foundation/icons';\n\nconst locale = useLocale();\n\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\n/** Renders a floating button that appears past a scroll threshold and returns the page to the top. */\ndefineOptions({ name: 'BackToTopButton', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<BackToTopButtonProps>(), {\n threshold: 400,\n position: OverlayPositionValue.BottomRight,\n type: ButtonType.Button,\n scrollContainer: null,\n /* `VNodeChild` includes `boolean`, so Vue's boolean casting turns an absent node-valued prop\n into `false` rather than `undefined` — which reads as \"supplied\" at every `!== undefined`\n check. An explicit `undefined` default suppresses the cast. */\n label: undefined,\n});\n\nconst slots = defineSlots<{\n /** The visible label beside the arrow. Falls back to the `label` prop, then to icon-only. */\n label?(): unknown;\n}>();\n\nconst attrs = useAttrs();\n\nconst PositionClasses: Record<OverlayPosition, string> = {\n 'bottom-right': 'bottom-6 right-6',\n 'bottom-left': 'bottom-6 left-6',\n 'bottom-center': 'bottom-6 left-1/2 -translate-x-1/2',\n 'top-right': 'top-6 right-6',\n 'top-left': 'top-6 left-6',\n 'top-center': 'top-6 left-1/2 -translate-x-1/2',\n};\n\n/* Stable render-only wrapper for the node-valued `label` prop, so it can render as the fallback of\n its named-slot twin. */\nconst LabelProp = defineComponent({ render: () => props.label });\n\nconst hasLabel = computed(() => props.label !== undefined || slots.label !== undefined);\n\nconst visible = shallowRef(false);\n\n/* `watchPostEffect` is the `useEffect` counterpart: it re-subscribes whenever `threshold` or\n `scrollContainer` changes, and reads once on attach. */\nwatchPostEffect((onCleanup) => {\n if (typeof window === 'undefined') return;\n const element: HTMLElement | Window = props.scrollContainer ?? window;\n const read = (): void => {\n const y = 'scrollY' in element ? (element as Window).scrollY : (element as HTMLElement).scrollTop;\n visible.value = y >= props.threshold;\n };\n read();\n const target = element as EventTarget;\n target.addEventListener('scroll', read, { passive: true });\n onCleanup(() => target.removeEventListener('scroll', read));\n});\n\n/* `aria-label` is read off `attrs`, not `props`: Vue camelizes declared prop keys, so a declared\n `'aria-label'` would arrive as `props.ariaLabel` and never render. It is stripped from the\n forwarded attrs and re-bound below, so the resolved value is the one that lands. */\nconst ariaLabel = computed(\n () =>\n (attrs[AriaAttribute.Label] as string | undefined) ?? locale.t('BackToTopButton.label', undefined, 'Back to top'),\n);\n\nconst OwnedAttributes: ReadonlySet<string> = new Set(['class', AriaAttribute.Label]);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n 'fixed z-banner inline-flex items-center justify-center gap-2 rounded-full bg-card text-card-foreground shadow-lg ring-1 ring-border transition-all hover:shadow-xl focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring',\n hasLabel.value ? 'h-11 px-4 text-sm font-medium' : 'h-11 w-11',\n PositionClasses[props.position],\n attrs.class as ClassValue,\n ),\n);\n\n/* Chained after the consumer's own click (attribute fallthrough puts theirs first) and skipped\n when they called `preventDefault()` — the original's `onClick?.(e); if (e.defaultPrevented) return`. */\nfunction handleClick(event: MouseEvent): void {\n if (event.defaultPrevented) return;\n const reducedMotion =\n typeof window !== 'undefined' && window.matchMedia?.('(prefers-reduced-motion: reduce)').matches;\n const target = props.scrollContainer ?? window;\n if ('scrollTo' in target) {\n target.scrollTo({ top: 0, behavior: reducedMotion ? 'auto' : 'smooth' });\n }\n}\n\nconst root = useTemplateRef<HTMLButtonElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <!-- Floating button revealed past `threshold` scroll — smooth-scrolls to top. -->\n <button\n v-if=\"visible\"\n ref=\"root\"\n :type=\"type\"\n :aria-label=\"ariaLabel\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n @click=\"handleClick\"\n >\n <Icon :icon=\"ArrowUp\" :size=\"16\" />\n <slot name=\"label\"><LabelProp v-if=\"label !== undefined\" /></slot>\n </button>\n</template>\n"],"names":["OwnedAttributes","OrientationValue","_openBlock","_createElementBlock","_mergeProps","_renderSlot","_useSlots","_createBlock","Button","_unref","Icon","_createVNode","_Fragment","_createTextVNode","_toDisplayString","$attrs","SideValue","_createElementVNode","_hoisted_2","_hoisted_1","ToolbarRoot","ToolbarButton","ToolbarLink","ToolbarSeparator","FabButton","SpeedDialGroupDirectionValue","SpeedDialGroupTrigger","SpeedDialGroupList","_renderList","_resolveDynamicComponent","_normalizeClass","SpeedDialGroupRoot","SpeedDialGroupAction"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,UAAM,QAAQ;AAUd,UAAM,QAAQ,SAAA;AAEd,UAAMA,mBAAuC,oBAAI,IAAI,CAAC,OAAO,CAAC;AAC9D,UAAM,mBAAmB;AAAA,MAAS,MAChC,OAAO,YAAY,OAAO,QAAQ,KAAK,EAAE,OAAO,CAAC,CAAC,GAAG,MAAM,CAACA,iBAAgB,IAAI,GAAG,CAAC,CAAC;AAAA,IAAA;AAGvF,UAAM,eAAe,SAAS,MAAM,MAAM,gBAAgBC,YAAiB,UAAU;AAErF,UAAM,YAAY;AAAA,MAAS,MACzB;AAAA,QACE;AAAA,QACA,aAAa,QAAQ,aAAa;AAAA,QAClC,MAAM,aACF,aAAa,QACX,mHACA,mHACF;AAAA,QACJ,MAAM;AAAA,MAAA;AAAA,IACR;AAGF,UAAM,OAAO,eAA+B,MAAM;AAGlD,aAAa,EAAE,IAAI,MAAM;;AAKvB,aAAAC,UAAA,GAAAC,mBAEM,OAFNC,WAEM;AAAA,iBAFG;AAAA,QAAJ,KAAI;AAAA,QAAO,MAAK;AAAA,QAAS,oBAAkB,QAAA;AAAA,QAAc,OAAO,UAAA;AAAA,MAAA,GAAmB,iBAAA,KAAgB,GAAA;AAAA,QACtGC,WAAQ,KAAA,QAAA,SAAA;AAAA,MAAA;;;;AC9DL,MAAM,mBAAmB;AAAA;AAAA,EAE9B,SAAS;AAAA;AAAA,EAET,WAAW;AAA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ACJ,OAAO,WAAW,eAAe,OAAO,aAAa,kCAAkC,EAAE;AAC3F,YAAM,SAAS,MAAM,mBAAmB;AACxC,UAAI,cAAc,QAAQ;AACxB,eAAO,SAAS,EAAE,KAAK,GAAG,UAAU,gBAAgB,SAAS,UAAU;AAAA,MACzE;AAAA,IACF;AAEA,UAAM,OAAO,eAAkC,MAAM;AAGrD,aAAa,EAAE,IAAI,MAAM;;aAMf,QAAA,SADRE,UAAA,GAAAC,mBAWS,UAXTC,WAWS;AAAA;iBATH;AAAA,QAAJ,KAAI;AAAA,QACH,MAAM,QAAA;AAAA,QACN,cAAY,UAAA;AAAA,QACZ,OAAO,UAAA;AAAA,MAAA,GACA,iBAAA,OAAgB,EACvB,SAAO,YAAA,CAAW,GAAA;AAAA,QAEnBO,YAAmCF,MAAAC,WAAA,GAAA;AAAA,UAA5B,MAAMD,MAAA,OAAA;AAAA,UAAU,MAAM;AAAA,QAAA;QAC7BJ,WAAkE,0BAAlE,MAAkE;AAAA,UAA9B,QAAA,UAAU,uBAA3BE,YAAwCE,MAAA,SAAA,GAAA,EAAA,KAAA,EAAA,CAAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"BackToTopButton.vue_vue_type_script_setup_true_lang-DHSpEajG.js","sources":["../../src/presentation/actions/buttonGroup/ButtonGroup.vue","../../src/presentation/actions/fabButton/FabButton.variants.ts","../../src/presentation/actions/fabButton/FabButton.vue","../../src/presentation/actions/copyButton/CopyButton.vue","../../src/presentation/actions/refreshButton/RefreshButton.vue","../../src/presentation/actions/googleSignInButton/GoogleSignInButton.vue","../../src/presentation/actions/disclosureButton/DisclosureButton.vue","../../src/presentation/actions/toolbar/ToolbarContext.ts","../../src/presentation/actions/toolbar/Toolbar.vue","../../src/presentation/actions/toolbar/ToolbarButton.vue","../../src/presentation/actions/toolbar/ToolbarLink.vue","../../src/presentation/actions/toolbar/ToolbarSeparator.vue","../../src/presentation/actions/toolbar/index.ts","../../src/presentation/actions/speedDialGroup/SpeedDialGroupContext.ts","../../src/presentation/actions/speedDialGroup/SpeedDialGroupList.vue","../../src/presentation/actions/speedDialGroup/SpeedDialGroupTrigger.vue","../../src/presentation/actions/speedDialGroup/SpeedDialGroup.vue","../../src/presentation/actions/speedDialGroup/SpeedDialGroupAction.vue","../../src/presentation/actions/speedDialGroup/index.ts","../../src/presentation/actions/backToTopButton/BackToTopButton.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { HTMLAttributes } from 'vue';\nimport type { Orientation } from '../../../foundation/styles';\n\n/* Native div attributes stay in attribute fallthrough rather than becoming runtime props. */\nexport interface ButtonGroupProps extends /* @vue-ignore */ HTMLAttributes {\n /** The visual orientation. Default `horizontal`. */\n readonly orientation?: Orientation;\n\n /** The attached state — groups children with collapsed inner radii (connected look). Default `true`. */\n readonly isAttached?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn, Orientation as OrientationValue } from '../../../foundation/styles';\n\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\n/** Renders a row or column of related buttons, collapsing their inner radii into one connected control. */\ndefineOptions({ name: 'ButtonGroup', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ButtonGroupProps>(), {\n orientation: OrientationValue.Horizontal,\n isAttached: true,\n});\n\ndefineSlots<{\n /** The buttons the group lays out and joins into one connected control. */\n default(): unknown;\n}>();\n\nconst attrs = useAttrs();\n\nconst OwnedAttributes: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\nconst isHorizontal = computed(() => props.orientation === OrientationValue.Horizontal);\n\nconst rootClass = computed(() =>\n cn(\n 'inline-flex',\n isHorizontal.value ? 'flex-row' : 'flex-col',\n props.isAttached\n ? isHorizontal.value\n ? '[&>*]:rounded-none [&>*:first-child]:rounded-l-md [&>*:last-child]:rounded-r-md [&>*:not(:first-child)]:-ml-px'\n : '[&>*]:rounded-none [&>*:first-child]:rounded-t-md [&>*:last-child]:rounded-b-md [&>*:not(:first-child)]:-mt-px'\n : 'gap-2',\n attrs.class as ClassValue,\n ),\n);\n\nconst root = useTemplateRef<HTMLDivElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <!-- Visually groups action-children — collapses inner radii when `isAttached`. -->\n <div ref=\"root\" role=\"group\" :data-orientation=\"orientation\" :class=\"rootClass\" v-bind=\"passthroughAttrs\">\n <slot />\n </div>\n</template>\n","import { tv, OverlayPosition, type VariantProps } from '../../../foundation/styles';\n\n/** Defines the FabButton's visual surface style. */\nexport const FabButtonVariant = {\n /** Refers to the primary brand-filled surface. */\n Primary: 'primary',\n /** Refers to the neutral card surface with a hairline border. */\n Secondary: 'secondary',\n /** Refers to the destructive / error-filled surface. */\n Destructive: 'destructive',\n} as const;\n\nexport type FabButtonVariant = (typeof FabButtonVariant)[keyof typeof FabButtonVariant];\n\n/** Defines the FabButton's diameter. */\nexport const FabButtonSize = {\n /** Refers to the small (2.5rem) diameter. */\n Sm: 'sm',\n /** Refers to the medium (3.5rem) default diameter. */\n Md: 'md',\n /** Refers to the large (4rem) diameter. */\n Lg: 'lg',\n} as const;\n\nexport type FabButtonSize = (typeof FabButtonSize)[keyof typeof FabButtonSize];\n\nexport const fabVariants = tv({\n base: 'fixed inline-flex items-center justify-center rounded-full shadow-lg transition-all hover:shadow-xl focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50',\n variants: {\n variant: {\n primary: 'bg-primary text-primary-foreground hover:bg-primary/90',\n secondary: 'bg-card text-card-foreground border border-border hover:bg-muted',\n destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',\n },\n size: {\n sm: 'h-10 w-10',\n md: 'h-14 w-14',\n lg: 'h-16 w-16',\n },\n position: {\n 'bottom-right': 'bottom-6 right-6',\n 'bottom-left': 'bottom-6 left-6',\n 'bottom-center': 'bottom-6 left-1/2 -translate-x-1/2',\n 'top-right': 'top-6 right-6',\n 'top-left': 'top-6 left-6',\n 'top-center': 'top-6 left-1/2 -translate-x-1/2',\n },\n },\n defaultVariants: {\n variant: 'primary',\n size: 'md',\n position: 'bottom-right',\n },\n});\n\nexport type FabButtonVariants = VariantProps<typeof fabVariants>;\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 _assertFabVariant: AssertExact<FabButtonVariant, NonNullable<FabButtonVariants['variant']>> = true;\nconst _assertFabSize: AssertExact<FabButtonSize, NonNullable<FabButtonVariants['size']>> = true;\nconst _assertFabPosition: AssertExact<OverlayPosition, NonNullable<FabButtonVariants['position']>> = true;\nvoid _assertFabVariant;\nvoid _assertFabSize;\nvoid _assertFabPosition;\n","<script lang=\"ts\">\nimport type { ButtonHTMLAttributes } from 'vue';\nimport { AriaAttribute } from '../../../foundation/dom';\nimport { type OverlayPosition } from '../../../foundation/styles';\nimport type { FabButtonVariants, FabButtonVariant, FabButtonSize } from './FabButton.variants';\n\n/** @internal An attribute name this component derives or requires. */\ntype RequiredAttribute = typeof AriaAttribute.Label;\n\n/* The required accessible label rides on the ignored heritage rather than the body — FabButton content\n is typically icon-only, so the name is mandatory, but it must reach the DOM as an attribute. */\ntype FabButtonAttributes = ButtonHTMLAttributes & Record<RequiredAttribute, string>;\n\n/* Both heritage types are `@vue-ignore`d — native button attributes belong in attribute\n fallthrough, and `FabButtonVariants` resolves through `typeof fabVariants`, which the SFC prop\n compiler cannot walk. */\ntype FabButtonBase = FabButtonAttributes & Omit<FabButtonVariants, 'variant' | 'size' | 'position'>;\n\nexport interface FabButtonProps extends /* @vue-ignore */ FabButtonBase {\n /** The visual surface style. */\n readonly variant?: FabButtonVariant;\n /** The button diameter. */\n readonly size?: FabButtonSize;\n /** The anchor position on the viewport. */\n readonly position?: OverlayPosition;\n /** The button type. Default `ButtonType.Button`. */\n readonly type?: ButtonType;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { ButtonType } from '../../../foundation/dom';\nimport { cn } from '../../../foundation/styles';\nimport { fabVariants } from './FabButton.variants';\n\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\n/** Renders a floating action button — a circular, shadowed control pinned to a corner of the viewport. */\ndefineOptions({ name: 'FabButton', inheritAttrs: false });\n\n/* `aria-label` is deliberately NOT a declared prop: Vue camelizes prop keys, so a declared\n `'aria-label'` would arrive as `props.ariaLabel` and never render. It stays a fallthrough attr;\n the interface keeps the requirement through the `@vue-ignore`d heritage. */\n/* `children` has no prop counterpart — it is the default slot. */\nconst props = withDefaults(defineProps<FabButtonProps>(), { type: ButtonType.Button });\n\ndefineSlots<{\n /** The button's content — typically a single icon. */\n default(): unknown;\n}>();\n\nconst attrs = useAttrs();\n\nconst OwnedAttributes: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(fabVariants({ variant: props.variant, size: props.size, position: props.position }), attrs.class as ClassValue),\n);\n\nconst root = useTemplateRef<HTMLButtonElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <!-- Floating Action Button — fixed-position circular button with shadow. -->\n <button ref=\"root\" :type=\"type\" :class=\"rootClass\" v-bind=\"passthroughAttrs\">\n <slot />\n </button>\n</template>\n","<script lang=\"ts\">\nimport { AriaAttribute, DomEvent, type HandlerProp } from '../../../foundation/dom';\nimport type { ButtonProps } from '../button';\n\n/** @internal The attributes this component renders itself rather than forwarding. */\nconst OwnedAttributes = [AriaAttribute.Label] as const;\n\n/** @internal An attribute name from {@link OwnedAttributes}. */\ntype OwnedAttribute = (typeof OwnedAttributes)[number];\n\n/** @internal The `ButtonProps` handler this component replaces with its own emit. */\ntype ReplacedButtonProp = keyof Pick<ButtonProps, HandlerProp<typeof DomEvent.Error>>;\n\n/** Defines the forwarded `ButtonProps`, with the owned attributes re-added as required. */\ntype CopyButtonAttributes = Omit<ButtonProps, ReplacedButtonProp | OwnedAttribute> & Record<OwnedAttribute, string>;\n\n/** Defines props for the clipboard-copy button. */\nexport interface CopyButtonProps extends /* @vue-ignore */ CopyButtonAttributes {\n /** The text to copy when the button is activated. */\n readonly text: string;\n\n /** The reset window for the `copied` state in ms. Default 2000. Set 0 to hold `copied` until the next mount. */\n readonly resetAfter?: number;\n\n /** The accessible name to announce while `copied` is true. Falls back to `aria-label` when omitted. */\n readonly copiedAriaLabel?: string;\n\n /** The accessible name to announce while the last copy has failed. Falls back to `aria-label` when omitted. */\n readonly failedAriaLabel?: string;\n\n /** The visual surface style. Default `ghost`. */\n readonly variant?: ButtonVariant;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, watch } from 'vue';\nimport { Check, Copy, X } from 'lucide-vue-next';\n\nimport { Icon } from '../../../foundation/icons';\nimport { useClipboard } from '../../../foundation/clipboard';\nimport { AttributeValue } from '../../../foundation/dom';\nimport { OptionalExtensions } from '../../../foundation/optionals';\nimport Button from '../button/Button.vue';\nimport { ButtonVariant } from '../button';\n\n/** Renders a clipboard-copy button — for code blocks, ID / URL fields, and inline copy affordances. */\ndefineOptions({ name: 'CopyButton', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<CopyButtonProps>(), {\n resetAfter: 2000,\n variant: ButtonVariant.Ghost,\n});\n\nconst emit = defineEmits<{\n /** Fires when the copy fails — the Clipboard API and the legacy fallback both refused — once per failure. */\n error: [error: Error];\n}>();\n\nconst slots = defineSlots<{\n /** The content — receives `{ copied, error }` for a state-driven swap. Icon-only Copy/Check/X when omitted. */\n default?: (props: { copied: boolean; error: Error | null }) => unknown;\n}>();\n\n/** @internal {@link OwnedAttributes} as a lookup, for filtering the fallthrough set. */\nconst OwnedAttributeLookup: ReadonlySet<string> = new Set(OwnedAttributes);\n\nconst attrs = useAttrs();\n\nconst { copied, error, copy } = useClipboard({ resetAfter: () => props.resetAfter });\n\n/** The fallthrough attributes minus the ones this component renders itself. */\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributeLookup.has(key))),\n);\n\n/** The accessible name for the current state — `copiedAriaLabel` while copied, `failedAriaLabel` after a failure. */\nconst effectiveAriaLabel = computed(() => {\n const label = attrs[AriaAttribute.Label] as string | undefined;\n if (copied.value) return props.copiedAriaLabel ?? label;\n return error.value ? (props.failedAriaLabel ?? label) : label;\n});\n\n/** The state icon shown when the consumer supplies no content: Check once copied, X once the copy failed. */\nconst fallbackIcon = computed(() => (copied.value ? Check : error.value ? X : Copy));\n\n/** Emits `error` on each transition into a failed copy. */\nwatch(error, (next) => {\n if (next) emit(DomEvent.Error, next);\n});\n\n/** Copies the current text from the clicked button, discarding the settled promise. */\nfunction handleClick(event: MouseEvent): void {\n void copy(props.text, event.target instanceof Element ? event.target : null);\n}\n</script>\n\n<template>\n <Button\n :variant=\"variant\"\n :aria-label=\"effectiveAriaLabel\"\n :data-copied=\"OptionalExtensions.from(copied, AttributeValue.True)\"\n :data-error=\"OptionalExtensions.from(error !== null, AttributeValue.True)\"\n :class=\"error ? 'text-destructive-soft-foreground' : undefined\"\n v-bind=\"passthroughAttrs\"\n @click=\"handleClick\"\n >\n <slot v-if=\"slots.default\" :copied=\"copied\" :error=\"error\" />\n <Icon v-else :icon=\"fallbackIcon\" :size=\"16\" />\n </Button>\n</template>\n","<script lang=\"ts\">\nimport type { ButtonProps } from '../button';\n\n/** @internal The `ButtonProps` this preset decides itself. */\ntype OwnedButtonProp = keyof Pick<ButtonProps, 'isLoading' | 'shape' | 'leadingSlot'>;\n\n/** Defines the forwarded `ButtonProps`, minus the ones the refresh preset sets. */\ntype RefreshButtonAttributes = Omit<ButtonProps, OwnedButtonProp>;\n\n/** Defines props for the one refresh control a region shows. */\nexport interface RefreshButtonProps extends /* @vue-ignore */ RefreshButtonAttributes {\n /** True from the click until the refresh settles — `useRefresh`'s `refreshing`; the icon spins and clicks wait. */\n readonly isRefreshing?: boolean;\n\n /** The visible label, or the accessible name of an icon-only button. Default `\"Refresh\"`, localized. */\n readonly label?: string;\n\n /** Renders the icon alone, square at its size, named by `label`. */\n readonly isIconOnly?: boolean;\n\n /** The visual surface style. Default `outline`; `ghost` inside a panel header. */\n readonly variant?: ButtonProps['variant'];\n\n /** The size step. Default `sm`; `md` beside page-level controls. */\n readonly size?: ButtonProps['size'];\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport { RefreshCw } from 'lucide-vue-next';\nimport { useLocaleDefaults } from '../../../foundation/i18n';\nimport { Icon } from '../../../foundation/icons';\nimport Button from '../button/Button.vue';\n\n/**\n * Renders the refresh control a region reruns its reads with — a `Button` preset that swaps the refresh icon for the\n * spinner while `isRefreshing`, keeps its label and width, and swallows repeat clicks until the refresh settles. Pair\n * it with `useRefresh` from `@wow-two-beta/fe/query`, which also drives the region's placeholders.\n */\ndefineOptions({ name: 'RefreshButton', inheritAttrs: false });\n\nconst componentProps = withDefaults(defineProps<RefreshButtonProps>(), {\n isRefreshing: false,\n label: undefined,\n isIconOnly: false,\n variant: 'outline',\n size: 'sm',\n});\nconst props = useLocaleDefaults(componentProps, 'RefreshButton', { label: 'Refresh' });\n\nconst attrs = useAttrs();\n\n/** The icon-only form names itself through `aria-label`, and `title` shows the name on hover. */\nconst naming = computed(() =>\n props.isIconOnly ? { 'aria-label': props.label, title: props.label } : ({} as Record<string, string>),\n);\n</script>\n\n<template>\n <Button\n tone=\"neutral\"\n :variant=\"props.variant\"\n :size=\"props.size\"\n :shape=\"props.isIconOnly ? 'square' : 'default'\"\n :is-loading=\"props.isRefreshing\"\n v-bind=\"{ ...naming, ...attrs }\"\n >\n <template #leading><Icon :icon=\"RefreshCw\" :size=\"14\" /></template>\n <template v-if=\"!props.isIconOnly\">{{ props.label }}</template>\n </Button>\n</template>\n","<script lang=\"ts\">\nimport type { GoogleButtonOptions } from '../../../foundation/oauth';\n\n/** Defines the props for {@link GoogleSignInButton}. */\nexport interface GoogleSignInButtonProps {\n /** The button surface. Default `outline`. */\n readonly theme?: GoogleButtonOptions['theme'];\n\n /** The button height band. Default `large`. */\n readonly size?: GoogleButtonOptions['size'];\n\n /** The label wording. Default `signin_with`. */\n readonly text?: GoogleButtonOptions['text'];\n\n /** The button outline. Default `rectangular`. */\n readonly shape?: GoogleButtonOptions['shape'];\n\n /** The rendered width in px. GIS caps this at 400; omit to size to the host element. */\n readonly width?: number;\n\n /** The logo placement. Default `left`. */\n readonly logoAlignment?: GoogleButtonOptions['logo_alignment'];\n\n /** The BCP-47 locale for the button copy. Defaults to the browser's. */\n readonly locale?: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, ref, watch } from 'vue';\n\nimport { GoogleIdentityStatus, useGoogleIdentity } from '../../../foundation/oauth';\n\n/**\n * Renders the Google sign-in button — the Google-owned control for the GIS ID-token flow.\n *\n * The button itself is drawn by Google into the host element, not by this package: the ID-token flow\n * requires Google's own branding, so `theme` / `size` / `shape` are forwarded to GIS rather than\n * mapped onto house variants. Everything below the pixels is ours — script loading, `initialize`, and\n * the credential handoff live in the ancestor's `provideGoogleIdentity` owner.\n *\n * The owner receives a signed JWT ID token, not a session. Post it to the\n * product's identity endpoint for server-side verification, and let the response drive `AuthProvider`.\n */\ndefineOptions({ name: 'GoogleSignInButton', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<GoogleSignInButtonProps>(), {\n theme: 'outline',\n size: 'large',\n text: 'signin_with',\n shape: 'rectangular',\n logoAlignment: 'left',\n});\n\nconst host = ref<HTMLElement | null>(null);\nconst identity = useGoogleIdentity();\nconst isConfigured = computed(() => identity.status.value !== GoogleIdentityStatus.Unresolved);\n\n/* GIS reads these once per `renderButton` call, so a prop change has to re-render the button rather\n than mutate it. Collected into one computed so the watcher below fires on any of them. */\nconst buttonOptions = computed<GoogleButtonOptions>(() => ({\n theme: props.theme,\n size: props.size,\n text: props.text,\n shape: props.shape,\n width: props.width,\n logo_alignment: props.logoAlignment,\n locale: props.locale,\n}));\n\nconst isReady = computed(() => identity.status.value === GoogleIdentityStatus.Ready);\n\n/* `immediate` covers the case where the script resolved before this watcher was registered; the\n `nextTick` covers the opposite one, where `isReady` flips in the same tick the host is created and\n the ref is not populated yet. */\nwatch(\n [isReady, buttonOptions, host],\n async () => {\n if (!isReady.value) {\n host.value?.replaceChildren();\n return;\n }\n await nextTick();\n if (!isReady.value) return;\n\n const target = host.value;\n if (!target) return;\n\n // GIS appends; without the clear, a re-render stacks a second button under the first.\n target.replaceChildren();\n identity.renderButton(target, buttonOptions.value);\n },\n { immediate: true },\n);\n</script>\n\n<template>\n <div v-if=\"isConfigured\" ref=\"host\" v-bind=\"$attrs\" />\n</template>\n","<script lang=\"ts\">\nimport type { ButtonHTMLAttributes } from 'vue';\nimport type { Side } from '../../../foundation/styles';\n\n/* Native button attributes stay in attribute fallthrough rather than becoming runtime props. */\nexport interface DisclosureButtonProps extends /* @vue-ignore */ Omit<ButtonHTMLAttributes, 'children' | 'onChange'> {\n /** The controlled open state. */\n readonly open?: boolean;\n /** The uncontrolled initial state. */\n readonly defaultOpen?: boolean;\n /** The side the chevron sits on (`left` · `right`). Default `right`. */\n readonly chevronSide?: Side;\n /** The button type. Default `ButtonType.Button`. */\n readonly type?: ButtonType;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { ChevronDown } from 'lucide-vue-next';\nimport type { ClassValue } from 'clsx';\nimport { ButtonType, dataAttr } from '../../../foundation/dom';\nimport { cn, Side as SideValue } from '../../../foundation/styles';\nimport { Icon } from '../../../foundation/icons';\nimport { useControlled } from '../../../foundation/state';\n\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\n/** Renders a full-width labelled button with a rotating chevron that expands or collapses a section. */\ndefineOptions({ name: 'DisclosureButton', inheritAttrs: false });\n\n/* `children` became the default slot (the visible, left-aligned label); `onOpenChange` the\n `update:open` emit. */\nconst props = withDefaults(defineProps<DisclosureButtonProps>(), {\n chevronSide: SideValue.Right,\n type: ButtonType.Button,\n defaultOpen: false,\n open: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the reader expands or collapses the section, carrying the new open state. */\n 'update:open': [open: boolean];\n}>();\n\ndefineSlots<{\n /** The button's own label, left-aligned beside the chevron. */\n default(): unknown;\n}>();\n\nconst attrs = useAttrs();\n\nconst { value: open, setValue: setOpen } = useControlled<boolean>({\n controlled: () => props.open,\n default: props.defaultOpen,\n onChange: (next) => emit('update:open', next),\n});\n\nconst OwnedAttributes: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\nconst chevronClass = computed(() => cn('transition-transform', open.value && 'rotate-180'));\n\nconst rootClass = computed(() =>\n cn(\n 'inline-flex w-full items-center justify-between gap-2 rounded-md px-3 py-2 text-sm font-medium text-foreground transition-colors hover:bg-muted focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50',\n attrs.class as ClassValue,\n ),\n);\n\n/* Chained after the consumer's own click (attribute fallthrough puts theirs first) and skipped\n when they called `preventDefault()` — the original's `onClick?.(e); if (!e.defaultPrevented)`. */\nfunction handleClick(event: MouseEvent): void {\n if (event.defaultPrevented) return;\n setOpen(!open.value);\n}\n\nconst root = useTemplateRef<HTMLButtonElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <!-- Button with a rotating chevron — sets `aria-expanded` + `data-state=\"open|closed\"`. -->\n <button\n ref=\"root\"\n :type=\"type\"\n :aria-expanded=\"open\"\n :data-state=\"open ? 'open' : 'closed'\"\n :data-disabled=\"dataAttr(attrs.disabled as boolean | undefined)\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n @click=\"handleClick\"\n >\n <Icon v-if=\"chevronSide === SideValue.Left\" :icon=\"ChevronDown\" :size=\"16\" :class=\"chevronClass\" />\n <span class=\"flex-1 text-left\"><slot /></span>\n <Icon v-if=\"chevronSide === SideValue.Right\" :icon=\"ChevronDown\" :size=\"16\" :class=\"chevronClass\" />\n </button>\n</template>\n","import { inject, type InjectionKey } from 'vue';\nimport type { Orientation } from '../../../foundation/styles';\n\nexport interface ToolbarContextValue {\n /** The toolbar's layout axis. Live getter — read it, don't destructure it. */\n readonly orientation: Orientation;\n}\n\nexport const ToolbarKey: InjectionKey<ToolbarContextValue> = Symbol('wow-two.toolbar');\n\n/** Reads the surrounding `Toolbar`. Throws outside one — the parts are not standalone. */\nexport function useToolbarContext(): ToolbarContextValue {\n const context = inject(ToolbarKey, null);\n if (!context) throw new Error('Toolbar.* must be used inside <Toolbar>');\n return context;\n}\n","<script lang=\"ts\">\nimport type { HTMLAttributes } from 'vue';\nimport type { Orientation } from '../../../foundation/styles';\n\n/* Native div attributes stay in attribute fallthrough rather than becoming runtime props. */\nexport interface ToolbarProps extends /* @vue-ignore */ HTMLAttributes {\n /** The layout axis — drives both the arrow-key navigation and the flex direction. Default `horizontal`. */\n readonly orientation?: Orientation;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, useAttrs, useTemplateRef, type ComponentPublicInstance } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn, Orientation as OrientationValue } from '../../../foundation/styles';\nimport { RovingFocusGroup } from '../../../foundation/primitives';\nimport { ToolbarKey } from './ToolbarContext';\n\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\n/** Renders a bordered strip of actions that arrow keys walk through as a single tab stop. */\ndefineOptions({ name: 'Toolbar', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ToolbarProps>(), {\n orientation: OrientationValue.Horizontal,\n});\n\ndefineSlots<{\n /** The toolbar items — buttons, links, and separators sharing one roving tab stop. */\n default(): unknown;\n}>();\n\nconst attrs = useAttrs();\n\n/* Live getter, not a snapshot — `ToolbarSeparator` re-reads it to flip its own axis. */\nprovide(ToolbarKey, {\n get orientation() {\n return props.orientation;\n },\n});\n\nconst OwnedAttributes: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n 'inline-flex items-center gap-1 rounded-md border border-border bg-background p-1',\n props.orientation === OrientationValue.Vertical && 'flex-col items-stretch',\n attrs.class as ClassValue,\n ),\n);\n\nconst root = useTemplateRef<ComponentPublicInstance>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\nconst el = computed<HTMLElement | null>(() => {\n const node = root.value?.$el;\n return node instanceof HTMLElement ? node : null;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <RovingFocusGroup\n ref=\"root\"\n :orientation=\"orientation\"\n can-loop\n role=\"toolbar\"\n :aria-orientation=\"orientation\"\n :data-orientation=\"orientation\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n >\n <slot />\n </RovingFocusGroup>\n</template>\n","<script lang=\"ts\">\nimport type { ButtonHTMLAttributes } from 'vue';\n\n/* Native button attributes stay in attribute fallthrough rather than becoming runtime props. */\nexport interface ToolbarButtonProps extends /* @vue-ignore */ Omit<ButtonHTMLAttributes, 'children'> {\n /** The as-child flag — renders as the single child via `Primitive`, dropping item chrome. */\n readonly asChild?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { ButtonType, HtmlElement } from '../../../foundation/dom';\nimport { cn } from '../../../foundation/styles';\nimport { Primitive, useRovingFocusItem } from '../../../foundation/primitives';\n\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\n/** Renders one action button inside a toolbar, taking its turn in the group's roving tab stop. */\ndefineOptions({ name: 'ToolbarButton', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ToolbarButtonProps>(), { asChild: false });\n\ndefineSlots<{\n /** The button's label, or — under `asChild` — the single element that becomes the item. */\n default(): unknown;\n}>();\n\nconst attrs = useAttrs();\n\n/* Reactive object — `tabindex` tracks the group's tab stop, so read through it rather than\n destructuring. The function `ref` registers this item's node with the group. */\nconst roving = useRovingFocusItem();\n\nconst OwnedAttributes: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\nconst rootClass = computed(() =>\n props.asChild\n ? cn(attrs.class as ClassValue)\n : cn(\n 'inline-flex h-8 items-center justify-center rounded-sm px-2 text-sm transition-colors hover:bg-muted focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50',\n attrs.class as ClassValue,\n ),\n);\n\n/* Chained after the consumer's own keydown (attribute fallthrough puts theirs first) and skipped\n when they called `preventDefault()` — the original's explicit `if (e.defaultPrevented) return`. */\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented) return;\n roving.onKeydown(event);\n}\n</script>\n\n<template>\n <Primitive\n :ref=\"roving.ref\"\n :as=\"HtmlElement.Button\"\n :as-child=\"asChild\"\n :type=\"asChild ? undefined : ButtonType.Button\"\n :tabindex=\"roving.tabindex\"\n :data-roving-focus-item=\"roving['data-roving-focus-item']\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n @focus=\"roving.onFocus()\"\n @keydown=\"handleKeydown\"\n >\n <slot />\n </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { AnchorHTMLAttributes } from 'vue';\n\n/* Native anchor attributes stay in attribute fallthrough rather than becoming runtime props. */\nexport type ToolbarLinkProps = /* @vue-ignore */ Omit<AnchorHTMLAttributes, 'children'>;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/styles';\nimport { useRovingFocusItem } from '../../../foundation/primitives';\n\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\n/** Renders one anchor inside a toolbar, taking its turn in the group's roving tab stop. */\ndefineOptions({ name: 'ToolbarLink', inheritAttrs: false });\n\ndefineSlots<{\n /** The anchor's own label. */\n default(): unknown;\n}>();\n\nconst attrs = useAttrs();\n\n/* Reactive object — `tabindex` tracks the group's tab stop, so read through it rather than\n destructuring. The function `ref` registers this item's node with the group. */\nconst roving = useRovingFocusItem();\n\nconst OwnedAttributes: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n 'inline-flex h-8 items-center justify-center rounded-sm px-2 text-sm text-foreground underline-offset-2 transition-colors hover:bg-muted hover:underline focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring',\n attrs.class as ClassValue,\n ),\n);\n\n/* Chained after the consumer's own keydown (attribute fallthrough puts theirs first) and skipped\n when they called `preventDefault()` — the original's explicit `if (e.defaultPrevented) return`. */\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented) return;\n roving.onKeydown(event);\n}\n</script>\n\n<template>\n <a\n :ref=\"roving.ref\"\n :tabindex=\"roving.tabindex\"\n :data-roving-focus-item=\"roving['data-roving-focus-item']\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n @focus=\"roving.onFocus()\"\n @keydown=\"handleKeydown\"\n >\n <slot />\n </a>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn, Orientation } from '../../../foundation/styles';\nimport { useToolbarContext } from './ToolbarContext';\n\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\n/** Renders a hairline rule between two toolbar groups, turned across the toolbar's own axis. */\ndefineOptions({ name: 'ToolbarSeparator', inheritAttrs: false });\n\nconst attrs = useAttrs();\nconst context = useToolbarContext();\n\nconst isVertical = computed(() => context.orientation === Orientation.Vertical);\n\nconst OwnedAttributes: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn('shrink-0 bg-border', isVertical.value ? 'mx-1 h-px' : 'my-1 w-px self-stretch', attrs.class as ClassValue),\n);\n</script>\n\n<template>\n <div\n role=\"separator\"\n :aria-orientation=\"isVertical ? 'horizontal' : 'vertical'\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n />\n</template>\n","import ToolbarRoot from './Toolbar.vue';\nimport ToolbarButton from './ToolbarButton.vue';\nimport ToolbarLink from './ToolbarLink.vue';\nimport ToolbarSeparator from './ToolbarSeparator.vue';\n\n/**\n * The toolbar root, carrying its parts as properties so `<Toolbar.Button>` /\n * `<Toolbar.Separator>` resolve in a template — the counterpart of the React\n * original's `Object.assign`. Each part is also exported on its own name.\n */\nconst Toolbar: typeof ToolbarRoot & {\n Button: typeof ToolbarButton;\n LinkItem: typeof ToolbarLink;\n SeparatorLayout: typeof ToolbarSeparator;\n} = Object.assign(ToolbarRoot, {\n Button: ToolbarButton,\n LinkItem: ToolbarLink,\n SeparatorLayout: ToolbarSeparator,\n});\n\nexport { Toolbar, ToolbarButton, ToolbarLink, ToolbarSeparator };\nexport type { ToolbarProps } from './Toolbar.vue';\nexport type { ToolbarButtonProps } from './ToolbarButton.vue';\nexport type { ToolbarLinkProps } from './ToolbarLink.vue';\nexport { ToolbarKey, useToolbarContext, type ToolbarContextValue } from './ToolbarContext';\n","import { inject, type InjectionKey, type ShallowRef } from 'vue';\nimport type { OverlayPosition } from '../../../foundation/styles';\n\n/** The overlay anchor position of a SpeedDialGroup (shared overlay vocabulary). */\nexport type SpeedDialGroupPosition = OverlayPosition;\n\n/** Defines the axis a SpeedDialGroup's action items fan out along. */\nexport const SpeedDialGroupDirection = {\n /** Refers to items stacking upward from the trigger. */\n Up: 'up',\n /** Refers to items stacking downward from the trigger. */\n Down: 'down',\n /** Refers to items stacking to the left of the trigger. */\n Left: 'left',\n /** Refers to items stacking to the right of the trigger. */\n Right: 'right',\n} as const;\n\nexport type SpeedDialGroupDirection = (typeof SpeedDialGroupDirection)[keyof typeof SpeedDialGroupDirection];\n\nexport interface SpeedDialGroupContextValue {\n /** The open state. Live getter — read it, don't destructure it. */\n readonly open: boolean;\n\n /** Sets the open state (and fires the root's `open-change`). */\n setOpen: (open: boolean) => void;\n\n /**\n * The trigger's element, published by `SpeedDialGroupTrigger` on mount. Escape and\n * action-select return focus here — the React original held a `MutableRefObject`\n * threaded through `composeRefs`; a Vue child writes its own element into this ref\n * instead.\n */\n triggerEl: ShallowRef<HTMLElement | null>;\n\n /** The resolved fan-out axis. Live getter. */\n readonly direction: SpeedDialGroupDirection;\n\n /** The viewport anchor. Live getter. */\n readonly position: SpeedDialGroupPosition;\n}\n\nexport const SpeedDialGroupKey: InjectionKey<SpeedDialGroupContextValue> = Symbol('wow-two.speedDial');\n\n/** Reads the surrounding `SpeedDialGroup`. Throws outside one — the parts are not standalone. */\nexport function useSpeedDialContext(): SpeedDialGroupContextValue {\n const context = inject(SpeedDialGroupKey, null);\n if (!context) throw new Error('SpeedDialGroup.* must be used inside <SpeedDialGroup>');\n return context;\n}\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/styles';\n\n/**\n * Renders the `<ul>` an open speed dial fans its action items into.\n *\n * `Presence`-clonable list: a single element that takes the `data-state` and `ref`\n * `Presence` injects. Marked `group` so each action item animates off its\n * `data-[state]`; carries its own fade so `Presence` has an animation on *this*\n * node to watch before unmount. Internal — not exported from the barrel.\n */\ndefineOptions({ name: 'SpeedDialGroupList', inheritAttrs: false });\n\ndefineSlots<{\n /** The `SpeedDialGroupAction` items the list fans out, each its own `<li>`. */\n default(): unknown;\n}>();\n\nconst attrs = useAttrs();\n\nconst OwnedAttributes: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n 'group absolute flex',\n /* list fade gated on data-state; motion-safe so reduced-motion users\n get no movement. */\n 'motion-safe:data-[state=open]:animate-(--animate-fade-in)',\n 'motion-safe:data-[state=closed]:animate-(--animate-fade-out)',\n 'motion-reduce:animate-none',\n /* Per-item enter stagger: ramp `animation-delay` on the first few items\n while opening only (closed → delay 0 so no item outlasts the list's\n own fade-out, which gates unmount). */\n 'motion-safe:group-data-[state=open]:[&>li:nth-child(2)]:[animation-delay:40ms]',\n 'motion-safe:group-data-[state=open]:[&>li:nth-child(3)]:[animation-delay:80ms]',\n 'motion-safe:group-data-[state=open]:[&>li:nth-child(4)]:[animation-delay:120ms]',\n 'motion-safe:group-data-[state=open]:[&>li:nth-child(n+5)]:[animation-delay:160ms]',\n attrs.class as ClassValue,\n ),\n);\n</script>\n\n<template>\n <ul role=\"menu\" :class=\"rootClass\" v-bind=\"passthroughAttrs\">\n <slot />\n </ul>\n</template>\n","<script lang=\"ts\">\nimport type { ButtonHTMLAttributes, VNodeChild } from 'vue';\nimport type { FabButtonVariant, FabButtonSize } from '../fabButton/FabButton.variants';\n\n/* Native button attributes stay in attribute fallthrough rather than becoming runtime props. */\nexport interface SpeedDialGroupTriggerProps extends /* @vue-ignore */ Omit<ButtonHTMLAttributes, 'children'> {\n /** The glyph shown while closed. Defaults to a `Plus` icon. Prefer the `closed-icon` named slot. */\n readonly closedIcon?: VNodeChild;\n\n /** The glyph shown while open. Defaults to an `X` icon. Prefer the `open-icon` named slot. */\n readonly openIcon?: VNodeChild;\n\n /** The FabButton surface style. */\n readonly variant?: FabButtonVariant;\n\n /** The FabButton diameter. */\n readonly size?: FabButtonSize;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useLocale } from '../../../foundation/i18n';\nimport { computed, defineComponent, useAttrs, useTemplateRef, watchPostEffect } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { Plus, X } from 'lucide-vue-next';\nimport { AriaAttribute } from '../../../foundation/dom';\nimport { cn } from '../../../foundation/styles';\nimport { Icon } from '../../../foundation/icons';\nimport FabButton from '../fabButton/FabButton.vue';\nimport { useSpeedDialContext } from './SpeedDialGroupContext';\n\nconst locale = useLocale();\n\n/** Renders the speed dial's pinned FAB, swapping its glyph as the dial opens and closes. */\ndefineOptions({ name: 'SpeedDialGroupTrigger', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<SpeedDialGroupTriggerProps>(), {\n /* `VNodeChild` includes `boolean`, so Vue's boolean casting turns an absent node-valued prop\n into `false` rather than `undefined` — which reads as \"supplied\" at every `!== undefined`\n check. An explicit `undefined` default suppresses the cast. */\n closedIcon: undefined,\n openIcon: undefined,\n});\n\ndefineSlots<{\n /** The glyph shown while the dial is open. Falls back to `openIcon`, then to an `X` icon. */\n 'open-icon'?(): unknown;\n\n /** The glyph shown while the dial is closed. Falls back to `closedIcon`, then to a `Plus` icon. */\n 'closed-icon'?(): unknown;\n}>();\n\nconst attrs = useAttrs();\nconst context = useSpeedDialContext();\n\n/* `aria-label` is read off `attrs`, not `props`: Vue camelizes declared prop keys, so a declared\n `'aria-label'` would arrive as `props.ariaLabel` and never render. It is stripped from the\n forwarded attrs and re-bound below, so the resolved value is the one that lands. */\nconst ariaLabel = computed(\n () =>\n (attrs[AriaAttribute.Label] as string | undefined) ??\n locale.t('SpeedDialGroupTrigger.label', undefined, 'Toggle actions'),\n);\n\nconst OwnedAttributes: ReadonlySet<string> = new Set(['class', AriaAttribute.Label]);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\n/* Stable render-only wrappers for the node-valued props, so each can render as the fallback of its\n named-slot twin. */\nconst ClosedIconProp = defineComponent({ render: () => props.closedIcon });\nconst OpenIconProp = defineComponent({ render: () => props.openIcon });\n\nconst fab = useTemplateRef('fab');\n\n/* Publishes the trigger element into the root's context — Escape and action-select return focus\n here. The React original threaded a shared `MutableRefObject` through `composeRefs`. */\nwatchPostEffect(() => {\n const node = fab.value?.el;\n const elementType = node?.ownerDocument.defaultView?.HTMLElement;\n context.triggerEl.value = elementType && node instanceof elementType ? node : null;\n});\n\nconst rootClass = computed(() =>\n cn('static !bottom-auto !left-auto !right-auto !top-auto !translate-x-0', attrs.class as ClassValue),\n);\n\n/* Chained after the consumer's own click (attribute fallthrough puts theirs first) and skipped\n when they called `preventDefault()` — the original's `onClick?.(e); if (e.defaultPrevented) return`. */\nfunction handleClick(event: MouseEvent): void {\n if (event.defaultPrevented) return;\n context.setOpen(!context.open);\n}\n</script>\n\n<template>\n <FabButton\n ref=\"fab\"\n v-bind=\"passthroughAttrs\"\n :aria-label=\"ariaLabel\"\n aria-haspopup=\"menu\"\n :aria-expanded=\"context.open\"\n :variant=\"variant\"\n :size=\"size\"\n :position=\"context.position\"\n :class=\"rootClass\"\n @click=\"handleClick\"\n >\n <template v-if=\"context.open\">\n <slot name=\"open-icon\">\n <OpenIconProp v-if=\"openIcon !== undefined\" />\n <Icon v-else :icon=\"X\" :size=\"20\" />\n </slot>\n </template>\n <template v-else>\n <slot name=\"closed-icon\">\n <ClosedIconProp v-if=\"closedIcon !== undefined\" />\n <Icon v-else :icon=\"Plus\" :size=\"20\" />\n </slot>\n </template>\n </FabButton>\n</template>\n","<script lang=\"ts\">\nimport type { SpeedDialGroupDirection, SpeedDialGroupPosition } from './SpeedDialGroupContext';\n\nexport interface SpeedDialGroupProps {\n /** The viewport anchor. Default `bottom-right`. */\n readonly position?: SpeedDialGroupPosition;\n\n /** The axis the action items fan out along. Defaults to the one implied by `position`. */\n readonly direction?: SpeedDialGroupDirection;\n\n /** The controlled open state. */\n readonly open?: boolean;\n\n /** The uncontrolled initial state. */\n readonly defaultOpen?: boolean;\n\n /** The pixel gap between stacked action items. Default 12. */\n readonly gap?: number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, shallowRef, useAttrs, useSlots, useTemplateRef, watch, type VNode } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn, OverlayPosition } from '../../../foundation/styles';\nimport { Key } from '../../../foundation/dom';\nimport { Presence, renderableChildren } from '../../../foundation/primitives';\nimport { useControlled } from '../../../foundation/state';\nimport { useEscape } from '../../../foundation/shortcuts';\nimport { useOutsideClick } from '../../../foundation/dom';\nimport { SpeedDialGroupDirection as SpeedDialGroupDirectionValue, SpeedDialGroupKey } from './SpeedDialGroupContext';\nimport SpeedDialGroupList from './SpeedDialGroupList.vue';\nimport SpeedDialGroupTrigger from './SpeedDialGroupTrigger.vue';\n\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\n/** Renders a pinned trigger that fans a stack of action buttons out across the viewport when opened. */\ndefineOptions({ name: 'SpeedDialGroup', inheritAttrs: false });\n\n/* `className` is Vue's `class` fallthrough attr; `children` is the default slot. */\nconst props = withDefaults(defineProps<SpeedDialGroupProps>(), {\n position: OverlayPosition.BottomRight,\n direction: undefined,\n gap: 12,\n defaultOpen: false,\n open: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the dial opens or closes, carrying the new open state. */\n 'update:open': [open: boolean];\n}>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\n\nconst OwnedAttributes: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\nconst PositionToDirection: Record<SpeedDialGroupPosition, SpeedDialGroupDirection> = {\n 'bottom-right': SpeedDialGroupDirectionValue.Up,\n 'bottom-left': SpeedDialGroupDirectionValue.Up,\n 'bottom-center': SpeedDialGroupDirectionValue.Up,\n 'top-right': SpeedDialGroupDirectionValue.Down,\n 'top-left': SpeedDialGroupDirectionValue.Down,\n 'top-center': SpeedDialGroupDirectionValue.Down,\n};\n\nconst PositionOffsets: Record<SpeedDialGroupPosition, string> = {\n 'bottom-right': 'bottom-6 right-6',\n 'bottom-left': 'bottom-6 left-6',\n 'bottom-center': 'bottom-6 left-1/2 -translate-x-1/2',\n 'top-right': 'top-6 right-6',\n 'top-left': 'top-6 left-6',\n 'top-center': 'top-6 left-1/2 -translate-x-1/2',\n};\n\nconst DirectionToStack: Record<SpeedDialGroupDirection, string> = {\n [SpeedDialGroupDirectionValue.Up]: 'flex-col-reverse bottom-full mb-3',\n [SpeedDialGroupDirectionValue.Down]: 'flex-col top-full mt-3',\n [SpeedDialGroupDirectionValue.Left]: 'flex-row-reverse right-full mr-3',\n [SpeedDialGroupDirectionValue.Right]: 'flex-row top-1/2 -translate-y-1/2 left-full ml-3',\n};\n\nconst { value: open, setValue: setOpen } = useControlled<boolean>({\n controlled: () => props.open,\n default: props.defaultOpen,\n onChange: (next) => emit('update:open', next),\n});\n\nconst rootEl = useTemplateRef<HTMLDivElement>('rootEl');\nconst triggerEl = shallowRef<HTMLElement | null>(null);\n\nconst resolvedDirection = computed(() => props.direction ?? PositionToDirection[props.position]);\n\nuseEscape((event) => {\n if (event.defaultPrevented) return;\n setOpen(false);\n}, open);\n\n// Restore only while the closing dial owns focus; never queue a callback that can steal it later.\nwatch(\n open,\n (isOpen) => {\n const root = rootEl.value;\n if (!isOpen && root?.contains(root.ownerDocument.activeElement)) triggerEl.value?.focus();\n },\n { flush: 'pre' },\n);\n\nuseOutsideClick(\n rootEl,\n () => {\n if (open.value) setOpen(false);\n },\n open,\n);\n\nprovide(SpeedDialGroupKey, {\n get open() {\n return open.value;\n },\n setOpen,\n triggerEl,\n get direction() {\n return resolvedDirection.value;\n },\n get position() {\n return props.position;\n },\n});\n\n/* The trigger renders always (a closed dial must still be openable); only the action items are\n gated behind `open`. The React original partitioned `Children.toArray` on `child.type`; the\n same split runs over the slot's vnodes, so the authoring shape is unchanged. */\nfunction splitChildren(keepTrigger: boolean): Array<VNode> {\n return renderableChildren(slots.default?.()).filter(\n (child) => (child.type === SpeedDialGroupTrigger) === keepTrigger,\n );\n}\n\nconst rootClass = computed(() => cn('fixed', PositionOffsets[props.position], attrs.class as ClassValue));\nconst stackClass = computed(() => DirectionToStack[resolvedDirection.value]);\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (\n event.defaultPrevented ||\n event.isComposing ||\n !open.value ||\n (event.key !== Key.ArrowDown && event.key !== Key.ArrowUp)\n )\n return;\n const root = rootEl.value;\n if (!root) return;\n const items = Array.from(root.querySelectorAll<HTMLButtonElement>('[role=\"menuitem\"]')).filter(\n (item) => !item.matches(':disabled,[aria-disabled=\"true\"],[data-disabled],[hidden]') && !item.closest('[inert]'),\n );\n if (items.length === 0) return;\n event.preventDefault();\n const currentIndex = items.indexOf(root.ownerDocument.activeElement as HTMLButtonElement);\n const nextIndex =\n currentIndex === -1\n ? event.key === Key.ArrowDown\n ? 0\n : items.length - 1\n : (currentIndex + (event.key === Key.ArrowDown ? 1 : -1) + items.length) % items.length;\n items[nextIndex]?.focus();\n}\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: rootEl });\n</script>\n\n<template>\n <div\n ref=\"rootEl\"\n :data-state=\"open ? 'open' : 'closed'\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n @keydown=\"handleKeydown\"\n >\n <!-- `Presence` clones `data-state` (\"open\" | \"closed\") + a `ref` onto the list and defers\n unmount until its fade-out ends — keeps the exit from being killed by the hard `!open`\n unmount. Items pop in/out off the list's `group` state (see `SpeedDialGroupAction`),\n staggered on enter. -->\n <Presence :is-present=\"open\">\n <SpeedDialGroupList :data-direction=\"resolvedDirection\" :style=\"{ gap: `${gap}px` }\" :class=\"stackClass\">\n <component :is=\"node\" v-for=\"(node, index) in splitChildren(false)\" :key=\"node.key ?? index\" />\n </SpeedDialGroupList>\n </Presence>\n <component :is=\"node\" v-for=\"(node, index) in splitChildren(true)\" :key=\"node.key ?? index\" />\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { ButtonHTMLAttributes, VNodeChild } from 'vue';\nimport { AriaAttribute } from '../../../foundation/dom';\n\n/** @internal An attribute name this component derives or requires. */\ntype RequiredAttribute = typeof AriaAttribute.Label;\n\n/* The required accessible label rides on the ignored heritage rather than the body — action items\n are icon-only, so the name is mandatory, but it must reach the DOM as an attribute. */\ntype SpeedDialGroupActionAttributes = Omit<ButtonHTMLAttributes, 'children'> & Record<RequiredAttribute, string>;\n\n/* Native button attributes stay in attribute fallthrough rather than becoming runtime props. */\nexport interface SpeedDialGroupActionProps extends /* @vue-ignore */ SpeedDialGroupActionAttributes {\n /** The action's glyph. Prefer the `icon` named slot; this prop stays for parity with the React API. */\n readonly icon?: VNodeChild;\n\n /** The label chip rendered beside the button. Prefer the `tooltip` named slot. */\n readonly tooltip?: VNodeChild;\n\n /** The button type. Default `ButtonType.Button`. */\n readonly type?: ButtonType;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, defineComponent, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { ButtonType } from '../../../foundation/dom';\nimport { cn, Side } from '../../../foundation/styles';\nimport { SpeedDialGroupDirection, useSpeedDialContext } from './SpeedDialGroupContext';\n\n/* `aria-label` is deliberately NOT a declared prop: Vue camelizes prop keys, so a declared\n `'aria-label'` would arrive as `props.ariaLabel` and never render. It stays a fallthrough attr;\n the interface keeps the requirement through the `@vue-ignore`d heritage. */\n/** Renders one icon button of an open speed dial, with an optional label chip beside it. */\ndefineOptions({ name: 'SpeedDialGroupAction', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<SpeedDialGroupActionProps>(), {\n type: ButtonType.Button,\n /* `VNodeChild` includes `boolean`, so Vue's boolean casting turns an absent node-valued prop\n into `false` rather than `undefined` — which reads as \"supplied\" at every `!== undefined`\n check. An explicit `undefined` default suppresses the cast. */\n icon: undefined,\n tooltip: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the action is chosen — the dial closes and focus returns to the trigger afterwards. */\n select: [];\n}>();\n\ndefineSlots<{\n /** The action's glyph. Preferred over the `icon` prop. */\n icon?(): unknown;\n /** The glyph, in the plain-children shape a Vue caller reaches for. Same slot as `icon`. */\n default?(): unknown;\n /** The label chip beside the button. Preferred over the `tooltip` prop. */\n tooltip?(): unknown;\n}>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst context = useSpeedDialContext();\n\nconst DirectionLabelSide: Record<SpeedDialGroupDirection, Side> = {\n [SpeedDialGroupDirection.Up]: Side.Right,\n [SpeedDialGroupDirection.Down]: Side.Right,\n [SpeedDialGroupDirection.Left]: Side.Right,\n [SpeedDialGroupDirection.Right]: Side.Left,\n};\n\n/* Stable render-only wrappers for the node-valued props, so each can render as the fallback of its\n named-slot twin. */\nconst IconProp = defineComponent({ render: () => props.icon });\nconst TooltipProp = defineComponent({ render: () => props.tooltip });\n\nconst labelSide = computed(() => DirectionLabelSide[context.direction]);\nconst hasTooltip = computed(() => props.tooltip !== undefined || slots.tooltip !== undefined);\n\nconst OwnedAttributes: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\nconst buttonClass = computed(() =>\n cn(\n 'inline-flex h-10 w-10 items-center justify-center rounded-full bg-card text-card-foreground shadow-md transition-all hover:shadow-lg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring',\n attrs.class as ClassValue,\n ),\n);\n\n/* Chained after the consumer's own click (attribute fallthrough puts theirs first) and skipped\n when they called `preventDefault()` — the original's `onClick?.(e); if (e.defaultPrevented) return`. */\nfunction handleClick(event: MouseEvent): void {\n if (\n event.defaultPrevented ||\n !context.open ||\n root.value?.matches(':disabled,[aria-disabled=\"true\"],[data-disabled]')\n )\n return;\n emit('select');\n context.setOpen(false);\n}\n\nconst root = useTemplateRef<HTMLButtonElement>('root');\nfunction handleClickCapture(event: MouseEvent): void {\n if (context.open && !root.value?.matches(':disabled,[aria-disabled=\"true\"],[data-disabled]')) return;\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <li\n role=\"none\"\n :data-side=\"labelSide\"\n :class=\"\n cn(\n 'flex items-center gap-2',\n /* fade+scale each action off the list's `group` state; motion-safe so\n reduced-motion users get no movement (delay ramp lives on the list). */\n 'motion-safe:group-data-[state=open]:animate-(--animate-pop-in)',\n 'motion-safe:group-data-[state=closed]:animate-(--animate-pop-out)',\n 'motion-reduce:animate-none',\n )\n \"\n >\n <span\n v-if=\"hasTooltip && labelSide === Side.Left\"\n class=\"rounded-md bg-popover px-2 py-1 text-xs text-popover-foreground shadow\"\n >\n <slot name=\"tooltip\"><TooltipProp v-if=\"tooltip !== undefined\" /></slot>\n </span>\n <button\n ref=\"root\"\n v-bind=\"passthroughAttrs\"\n :type=\"type\"\n role=\"menuitem\"\n :class=\"buttonClass\"\n @click.capture=\"handleClickCapture\"\n @click=\"handleClick\"\n >\n <!-- The default slot is the fallback, not a second API: React typed `children` away,\n so a Vue caller writing `<SpeedDialGroupAction><Pencil /></SpeedDialGroupAction>` — the\n idiomatic shape — got a silently empty button. Precedence stays `icon` slot →\n default slot → `icon` prop. -->\n <slot name=\"icon\">\n <slot><IconProp v-if=\"icon !== undefined\" /></slot>\n </slot>\n </button>\n <span\n v-if=\"hasTooltip && labelSide === Side.Right\"\n class=\"rounded-md bg-popover px-2 py-1 text-xs text-popover-foreground shadow\"\n >\n <slot name=\"tooltip\"><TooltipProp v-if=\"tooltip !== undefined\" /></slot>\n </span>\n </li>\n</template>\n","import SpeedDialGroupRoot from './SpeedDialGroup.vue';\nimport SpeedDialGroupTrigger from './SpeedDialGroupTrigger.vue';\nimport SpeedDialGroupAction from './SpeedDialGroupAction.vue';\n\n/**\n * The dial root, carrying its parts as properties so `<SpeedDialGroup.Trigger>` /\n * `<SpeedDialGroup.Action>` resolve in a template — the counterpart of the React\n * original's `Object.assign`. Each part is also exported on its own name.\n */\nconst SpeedDialGroup: typeof SpeedDialGroupRoot & {\n Trigger: typeof SpeedDialGroupTrigger;\n Action: typeof SpeedDialGroupAction;\n} = Object.assign(SpeedDialGroupRoot, {\n Trigger: SpeedDialGroupTrigger,\n Action: SpeedDialGroupAction,\n});\n\nexport { SpeedDialGroup, SpeedDialGroupAction, SpeedDialGroupTrigger };\nexport {\n SpeedDialGroupDirection,\n SpeedDialGroupKey,\n useSpeedDialContext,\n type SpeedDialGroupContextValue,\n type SpeedDialGroupPosition,\n} from './SpeedDialGroupContext';\nexport type { SpeedDialGroupProps } from './SpeedDialGroup.vue';\nexport type { SpeedDialGroupTriggerProps } from './SpeedDialGroupTrigger.vue';\nexport type { SpeedDialGroupActionProps } from './SpeedDialGroupAction.vue';\nexport default SpeedDialGroup;\n","<script lang=\"ts\">\nimport type { ButtonHTMLAttributes, VNodeChild } from 'vue';\nimport type { OverlayPosition } from '../../../foundation/styles';\n\n/* Native button attributes stay in attribute fallthrough rather than becoming runtime props. */\nexport interface BackToTopButtonProps extends /* @vue-ignore */ ButtonHTMLAttributes {\n /** The scroll distance (px) before the button appears. Default 400. */\n readonly threshold?: number;\n\n /** The scrollable element to scope to. Defaults to the window. */\n readonly scrollContainer?: HTMLElement | null;\n\n /** The anchor position on the viewport. Default `bottom-right`. */\n readonly position?: OverlayPosition;\n\n /** The visible label. Omit for icon-only. Prefer the `label` named slot. */\n readonly label?: VNodeChild;\n\n /** The button type. Default `ButtonType.Button`. */\n readonly type?: ButtonType;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useLocale } from '../../../foundation/i18n';\nimport { computed, defineComponent, shallowRef, useAttrs, useTemplateRef, watchPostEffect } from 'vue';\nimport { ArrowUp } from 'lucide-vue-next';\nimport type { ClassValue } from 'clsx';\nimport { AriaAttribute, ButtonType } from '../../../foundation/dom';\nimport { cn, OverlayPosition as OverlayPositionValue } from '../../../foundation/styles';\nimport { Icon } from '../../../foundation/icons';\n\nconst locale = useLocale();\n\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\n/** Renders a floating button that appears past a scroll threshold and returns the page to the top. */\ndefineOptions({ name: 'BackToTopButton', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<BackToTopButtonProps>(), {\n threshold: 400,\n position: OverlayPositionValue.BottomRight,\n type: ButtonType.Button,\n scrollContainer: null,\n /* `VNodeChild` includes `boolean`, so Vue's boolean casting turns an absent node-valued prop\n into `false` rather than `undefined` — which reads as \"supplied\" at every `!== undefined`\n check. An explicit `undefined` default suppresses the cast. */\n label: undefined,\n});\n\nconst slots = defineSlots<{\n /** The visible label beside the arrow. Falls back to the `label` prop, then to icon-only. */\n label?(): unknown;\n}>();\n\nconst attrs = useAttrs();\n\nconst PositionClasses: Record<OverlayPosition, string> = {\n 'bottom-right': 'bottom-6 right-6',\n 'bottom-left': 'bottom-6 left-6',\n 'bottom-center': 'bottom-6 left-1/2 -translate-x-1/2',\n 'top-right': 'top-6 right-6',\n 'top-left': 'top-6 left-6',\n 'top-center': 'top-6 left-1/2 -translate-x-1/2',\n};\n\n/* Stable render-only wrapper for the node-valued `label` prop, so it can render as the fallback of\n its named-slot twin. */\nconst LabelProp = defineComponent({ render: () => props.label });\n\nconst hasLabel = computed(() => props.label !== undefined || slots.label !== undefined);\n\nconst visible = shallowRef(false);\n\n/* `watchPostEffect` is the `useEffect` counterpart: it re-subscribes whenever `threshold` or\n `scrollContainer` changes, and reads once on attach. */\nwatchPostEffect((onCleanup) => {\n if (typeof window === 'undefined') return;\n const element: HTMLElement | Window = props.scrollContainer ?? window;\n const read = (): void => {\n const y = 'scrollY' in element ? (element as Window).scrollY : (element as HTMLElement).scrollTop;\n visible.value = y >= props.threshold;\n };\n read();\n const target = element as EventTarget;\n target.addEventListener('scroll', read, { passive: true });\n onCleanup(() => target.removeEventListener('scroll', read));\n});\n\n/* `aria-label` is read off `attrs`, not `props`: Vue camelizes declared prop keys, so a declared\n `'aria-label'` would arrive as `props.ariaLabel` and never render. It is stripped from the\n forwarded attrs and re-bound below, so the resolved value is the one that lands. */\nconst ariaLabel = computed(\n () =>\n (attrs[AriaAttribute.Label] as string | undefined) ?? locale.t('BackToTopButton.label', undefined, 'Back to top'),\n);\n\nconst OwnedAttributes: ReadonlySet<string> = new Set(['class', AriaAttribute.Label]);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n 'fixed z-banner inline-flex items-center justify-center gap-2 rounded-full bg-card text-card-foreground shadow-lg ring-1 ring-border transition-all hover:shadow-xl focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring',\n hasLabel.value ? 'h-11 px-4 text-sm font-medium' : 'h-11 w-11',\n PositionClasses[props.position],\n attrs.class as ClassValue,\n ),\n);\n\n/* Chained after the consumer's own click (attribute fallthrough puts theirs first) and skipped\n when they called `preventDefault()` — the original's `onClick?.(e); if (e.defaultPrevented) return`. */\nfunction handleClick(event: MouseEvent): void {\n if (event.defaultPrevented) return;\n const reducedMotion =\n typeof window !== 'undefined' && window.matchMedia?.('(prefers-reduced-motion: reduce)').matches;\n const target = props.scrollContainer ?? window;\n if ('scrollTo' in target) {\n target.scrollTo({ top: 0, behavior: reducedMotion ? 'auto' : 'smooth' });\n }\n}\n\nconst root = useTemplateRef<HTMLButtonElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <!-- Floating button revealed past `threshold` scroll — smooth-scrolls to top. -->\n <button\n v-if=\"visible\"\n ref=\"root\"\n :type=\"type\"\n :aria-label=\"ariaLabel\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n @click=\"handleClick\"\n >\n <Icon :icon=\"ArrowUp\" :size=\"16\" />\n <slot name=\"label\"><LabelProp v-if=\"label !== undefined\" /></slot>\n </button>\n</template>\n"],"names":["OwnedAttributes","OrientationValue","_openBlock","_createElementBlock","_mergeProps","_renderSlot","_useSlots","_createBlock","Button","_unref","Icon","_createVNode","_Fragment","_createTextVNode","_toDisplayString","$attrs","SideValue","_createElementVNode","_hoisted_2","_hoisted_1","ToolbarRoot","ToolbarButton","ToolbarLink","ToolbarSeparator","FabButton","SpeedDialGroupDirectionValue","SpeedDialGroupTrigger","SpeedDialGroupList","_renderList","_resolveDynamicComponent","_normalizeClass","SpeedDialGroupRoot","SpeedDialGroupAction"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,UAAM,QAAQ;AAUd,UAAM,QAAQ,SAAA;AAEd,UAAMA,mBAAuC,oBAAI,IAAI,CAAC,OAAO,CAAC;AAC9D,UAAM,mBAAmB;AAAA,MAAS,MAChC,OAAO,YAAY,OAAO,QAAQ,KAAK,EAAE,OAAO,CAAC,CAAC,GAAG,MAAM,CAACA,iBAAgB,IAAI,GAAG,CAAC,CAAC;AAAA,IAAA;AAGvF,UAAM,eAAe,SAAS,MAAM,MAAM,gBAAgBC,YAAiB,UAAU;AAErF,UAAM,YAAY;AAAA,MAAS,MACzB;AAAA,QACE;AAAA,QACA,aAAa,QAAQ,aAAa;AAAA,QAClC,MAAM,aACF,aAAa,QACX,mHACA,mHACF;AAAA,QACJ,MAAM;AAAA,MAAA;AAAA,IACR;AAGF,UAA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mBAAmB;AAAA,MAAS,MAChC,OAAO,YAAY,OAAO,QAAQ,KAAK,EAAE,OAAO,CAAC,CAAC,GAAG,MAAM,CAACA,iBAAgB,IAAI,GAAG,CAAC,CAAC;AAAA,IAAA;AAGvF,UAAM,YAAY;AAAA,MAAS,MACzB;AAAA,QACE;AAAA,QACA,SAAS,QAAQ,kCAAkC;AAAA,QACnD,gBAAgB,MAAM,QAAQ;AAAA,QAC9B,MAAM;AAAA,MAAA;AAAA,IACR;AAKF,aAAS,YAAY,OAAyB;AAC5C,UAAI,MAAM,iBAAkB;AAC5B,YAAM,gBACJ,OAAO,WAAW,eAAe,OAAO,aAAa,kCAAkC,EAAE;AAC3F,YAAM,SAAS,MAAM,mBAAmB;AACxC,UAAI,cAAc,QAAQ;AACxB,eAAO,SAAS,EAAE,KAAK,GAAG,UAAU,gBAAgB,SAAS,UAAU;AAAA,MACzE;AAAA,IACF;AAEA,UAAM,OAAO,eAAkC,MAAM;AAGrD,aAAa,EAAE,IAAI,MAAM;;aAMf,QAAA,SADRE,UAAA,GAAAC,mBAWS,UAXTC,WAWS;AAAA;iBATH;AAAA,QAAJ,KAAI;AAAA,QACH,MAAM,QAAA;AAAA,QACN,cAAY,UAAA;AAAA,QACZ,OAAO,UAAA;AAAA,MAAA,GACA,iBAAA,OAAgB,EACvB,SAAO,YAAA,CAAW,GAAA;AAAA,QAEnBO,YAAmCF,MAAAC,WAAA,GAAA;AAAA,UAA5B,MAAMD,MAAA,OAAA;AAAA,UAAU,MAAM;AAAA,QAAA;QAC7BJ,WAAkE,0BAAlE,MAAkE;AAAA,UAA9B,QAAA,UAAU,uBAA3BE,YAAwCE,MAAA,SAAA,GAAA,EAAA,KAAA,EAAA,CAAA;;;;;;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { StorageBroker } from './StorageBroker';
|
|
3
|
+
/** Accepts a stored JSON value as `T`, or answers `undefined` for a shape it does not recognise. */
|
|
4
|
+
export type PersistentDecoder<T> = (stored: unknown) => T | undefined;
|
|
5
|
+
/** Tunes where a persistent ref stores and what it accepts back. */
|
|
6
|
+
export interface PersistentRefOptions<T> {
|
|
7
|
+
/** Validates a stored value before it is adopted; a rejection or a throw reads as `initial`. Defaults to trust. */
|
|
8
|
+
readonly decode?: PersistentDecoder<T>;
|
|
9
|
+
/** The persistence seam to read and write through; defaults to `localStorageStorageBroker`. */
|
|
10
|
+
readonly broker?: StorageBroker;
|
|
11
|
+
/** Whether another tab's write under the same key is adopted; defaults to true. Only `localStorage` reports one. */
|
|
12
|
+
readonly syncTabs?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Creates a ref mirrored into a `StorageBroker` under `key`, meant to be created once and shared by every reader.
|
|
16
|
+
* It reads storage when created: a miss, a stored `null`, a value `decode` rejects or a throwing `decode` yields
|
|
17
|
+
* `initial`. Assigning a different value writes it through at once; reading never writes, and a failed write keeps the
|
|
18
|
+
* value for this visit. Backed by `localStorage`, it adopts a decoded write from another tab and returns to `initial`
|
|
19
|
+
* when another tab removes the key or clears storage.
|
|
20
|
+
*
|
|
21
|
+
* The ref is shallow: replace an array or object to persist it, never mutate it in place. Created inside an effect
|
|
22
|
+
* scope (a component's `setup`, an `effectScope`), its tab listener detaches with the scope; at module scope it lives
|
|
23
|
+
* as long as the page.
|
|
24
|
+
*/
|
|
25
|
+
export declare function createPersistentRef<T>(key: string, initial: T, options?: PersistentRefOptions<T>): Ref<T>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { type StorageBroker, localStorageStorageBroker, memoryStorageBroker } from './StorageBroker';
|
|
2
2
|
export { namespacedBroker } from './NamespacedBroker';
|
|
3
|
+
export { type PersistentDecoder, type PersistentRefOptions, createPersistentRef } from './PersistentRef';
|
|
3
4
|
export { type Migration, type MigrationMap, type VersionedStore, type VersionedStoreOptions, createVersionedStore, } from './VersionedStore';
|
|
4
5
|
export * from './hooks/UseAutosave';
|
|
5
6
|
export * from './hooks/UsePersistentState';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { l as localStorageStorageBroker } from "../../chunks/StorageBroker-BCd8Sov7.js";
|
|
2
2
|
import { m } from "../../chunks/StorageBroker-BCd8Sov7.js";
|
|
3
|
-
import { shallowRef, watch, toValue
|
|
3
|
+
import { customRef, getCurrentScope, onScopeDispose, shallowRef, watch, toValue } from "vue";
|
|
4
4
|
import { p, u, a } from "../../chunks/UseRecentItems-BV7p4em6.js";
|
|
5
5
|
const NamespaceSeparator = ":";
|
|
6
6
|
function namespacedBroker(inner, namespace) {
|
|
@@ -17,6 +17,50 @@ function namespacedBroker(inner, namespace) {
|
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
+
function createPersistentRef(key, initial, options = {}) {
|
|
21
|
+
const { decode, broker = localStorageStorageBroker, syncTabs = true } = options;
|
|
22
|
+
function readStored() {
|
|
23
|
+
const stored = broker.read(key);
|
|
24
|
+
if (stored === null) return initial;
|
|
25
|
+
if (decode === void 0) return stored;
|
|
26
|
+
try {
|
|
27
|
+
const decoded = decode(stored);
|
|
28
|
+
return decoded === void 0 ? initial : decoded;
|
|
29
|
+
} catch {
|
|
30
|
+
return initial;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
let current = readStored();
|
|
34
|
+
let notify = () => void 0;
|
|
35
|
+
const value = customRef((track, trigger) => {
|
|
36
|
+
notify = trigger;
|
|
37
|
+
return {
|
|
38
|
+
get() {
|
|
39
|
+
track();
|
|
40
|
+
return current;
|
|
41
|
+
},
|
|
42
|
+
set(next) {
|
|
43
|
+
if (Object.is(next, current)) return;
|
|
44
|
+
current = next;
|
|
45
|
+
broker.write(key, next);
|
|
46
|
+
trigger();
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
if (syncTabs && broker === localStorageStorageBroker && typeof window !== "undefined") {
|
|
51
|
+
const onStorage = (event) => {
|
|
52
|
+
if (event.storageArea !== null && event.storageArea !== window.localStorage) return;
|
|
53
|
+
if (event.key !== null && event.key !== key) return;
|
|
54
|
+
const next = event.newValue === null ? initial : readStored();
|
|
55
|
+
if (Object.is(next, current)) return;
|
|
56
|
+
current = next;
|
|
57
|
+
notify();
|
|
58
|
+
};
|
|
59
|
+
window.addEventListener("storage", onStorage);
|
|
60
|
+
if (getCurrentScope()) onScopeDispose(() => window.removeEventListener("storage", onStorage));
|
|
61
|
+
}
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
20
64
|
function isEnvelope(value) {
|
|
21
65
|
return typeof value === "object" && value !== null && "v" in value && "data" in value && typeof value.v === "number";
|
|
22
66
|
}
|
|
@@ -168,6 +212,7 @@ function useAutosave(value, save, options = {}) {
|
|
|
168
212
|
return { status, error, lastSavedAt, flush, cancel };
|
|
169
213
|
}
|
|
170
214
|
export {
|
|
215
|
+
createPersistentRef,
|
|
171
216
|
createVersionedStore,
|
|
172
217
|
localStorageStorageBroker,
|
|
173
218
|
m as memoryStorageBroker,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/foundation/storage/NamespacedBroker.ts","../../../src/foundation/storage/VersionedStore.ts","../../../src/foundation/storage/hooks/UseAutosave.ts"],"sourcesContent":["// A `StorageBroker` decorator that prefixes every key with a namespace. Wrapping a shared broker (one\n// `localStorage`) in a namespace keeps unrelated features — or two tenants in the same app — from colliding on\n// a bare key like `\"draft\"`, without any hook change: the persistence hooks still see a plain `StorageBroker`.\n// Composes with any broker (production, memory, or another namespace) since it only rewrites keys.\n\nimport type { StorageBroker } from './StorageBroker';\n\n/** The separator between a namespace and the caller's key. */\nconst NamespaceSeparator = ':';\n\n/**\n * Wraps `inner` so every key is transparently prefixed with `namespace` (joined by `:`). Reads, writes, and\n * removes all address the namespaced key, so two brokers with distinct namespaces over the same backing store\n * never observe each other's values. Delegates JSON handling and failure-tolerance to `inner` unchanged.\n */\nexport function namespacedBroker(inner: StorageBroker, namespace: string): StorageBroker {\n const scope = (key: string): string => `${namespace}${NamespaceSeparator}${key}`;\n\n return {\n read<T>(key: string): T | null {\n return inner.read<T>(scope(key));\n },\n\n write<T>(key: string, value: T): boolean {\n return inner.write(scope(key), value);\n },\n\n remove(key: string): boolean {\n return inner.remove(scope(key));\n },\n };\n}\n","// A versioned wrapper over a `StorageBroker`. Persisted client state outlives the code that wrote it: a user\n// carries last month's `localStorage` into today's deploy. A `VersionedStore` stamps each value with a schema\n// `version` and, on read, walks a migration chain from the stored version up to the current one — so an old\n// shape is upgraded in place instead of silently mis-parsed. It inherits the broker's failure-tolerance: any\n// unrecoverable state (missing migration, a future version, a broken read) degrades to `initial`, never a throw.\n\nimport { localStorageStorageBroker, type StorageBroker } from './StorageBroker';\n\n/** Upgrades a value from one schema version to the next. Receives the prior shape as `unknown`; returns the next. */\nexport type Migration = (previous: unknown) => unknown;\n\n/** A map from *source* version to the migration that upgrades it to the following version (`n` upgrades `n`→`n+1`). */\nexport type MigrationMap = Readonly<Record<number, Migration>>;\n\n/** Configures a versioned store. */\nexport interface VersionedStoreOptions<T> {\n /** The storage key the envelope is persisted under. */\n readonly key: string;\n\n /** The current schema version (a positive integer). A stored value below this is migrated up on read. */\n readonly version: number;\n\n /** The value returned when nothing is stored or the stored value cannot be recovered. */\n readonly initial: T;\n\n /** Migrations keyed by source version; `migrations[n]` upgrades a v`n` value to v`n+1`. */\n readonly migrations?: MigrationMap;\n\n /** The backing persistence seam; defaults to `localStorageStorageBroker`. */\n readonly broker?: StorageBroker;\n}\n\n/** A versioned view over a storage key — hydrate-with-migration on read, envelope-stamp on write. */\nexport interface VersionedStore<T> {\n /** The storage key this store owns. */\n readonly key: string;\n\n /** The current schema version. */\n readonly version: number;\n\n /** Reads and, if needed, migrates the stored value; returns `initial` on absence or any unrecoverable state. */\n read(): T;\n\n /** Writes `value` stamped with the current version. */\n write(value: T): void;\n\n /** Removes the stored value. */\n clear(): void;\n}\n\n/** The persisted shape: the schema version alongside the caller's data. */\ninterface Envelope {\n readonly v: number;\n readonly data: unknown;\n}\n\n/** Recognises a value as a version envelope (vs a legacy bare value written before versioning). */\nfunction isEnvelope(value: unknown): value is Envelope {\n return (\n typeof value === 'object' &&\n value !== null &&\n 'v' in value &&\n 'data' in value &&\n typeof (value as Envelope).v === 'number'\n );\n}\n\n/**\n * Builds a {@link VersionedStore} over `key`. On `read`, a stored value is interpreted as:\n * - **current version** → returned as-is;\n * - **older version** → each `migrations[n]` is applied in turn from the stored version up to `version`, the\n * upgraded value is written back, and returned. A gap in the chain (a missing `migrations[n]`) yields `initial`;\n * - **newer version** (a rollback to older code) → `initial`, leaving the forward-written value untouched;\n * - **legacy bare value** (no envelope) → treated as version `0` and migrated the same way.\n *\n * Any thrown error inside migration or the broker degrades to `initial`, mirroring the broker's never-throw contract.\n */\nexport function createVersionedStore<T>(options: VersionedStoreOptions<T>): VersionedStore<T> {\n const { key, version, initial, migrations = {} } = options;\n const broker = options.broker ?? localStorageStorageBroker;\n\n /** Runs the migration chain from `fromVersion` to the current `version`; null when a step is missing. */\n function migrate(fromVersion: number, data: unknown): { data: unknown } | null {\n let current = data;\n for (let from = fromVersion; from < version; from++) {\n const step = migrations[from];\n if (step === undefined) return null; // chain gap — cannot safely interpret the old shape\n current = step(current);\n }\n return { data: current };\n }\n\n return {\n key,\n version,\n\n read(): T {\n try {\n const stored = broker.read<unknown>(key);\n if (stored === null) return initial;\n\n const { v, data } = isEnvelope(stored) ? stored : { v: 0, data: stored };\n\n if (v === version) return data as T;\n if (v > version) return initial; // forward-written by newer code — don't guess\n\n const migrated = migrate(v, data);\n if (migrated === null) return initial;\n\n // Persist the upgrade so the next read is a fast, migration-free hit.\n broker.write<Envelope>(key, { v: version, data: migrated.data });\n return migrated.data as T;\n } catch {\n return initial;\n }\n },\n\n write(value: T): void {\n broker.write<Envelope>(key, { v: version, data: value });\n },\n\n clear(): void {\n broker.remove(key);\n },\n };\n}\n","import { onScopeDispose, shallowRef, toValue, watch, type MaybeRefOrGetter, type ShallowRef } from 'vue';\nimport type { AppError, Result } from '../../results';\n\n/** The lifecycle of the latest autosave intent, including a queued trailing write. */\nexport type AutosaveStatus = 'idle' | 'pending' | 'saving' | 'saved' | 'error';\n\n/** Tunes autosave timing, gating and failure reporting. */\nexport interface UseAutosaveOptions {\n /** The quiet period in milliseconds. Defaults to 800; read when an edit is scheduled. */\n readonly delayMs?: MaybeRefOrGetter<number>;\n /** Disabling drops pending work and invalidates completion state; reenabling schedules the current value. */\n readonly enabled?: MaybeRefOrGetter<boolean>;\n /** Reports a current write's explicit failure or exception while the scope remains enabled and live. */\n readonly onError?: (error: unknown) => void | PromiseLike<void>;\n}\n\n/** The current autosave intent and explicit queue controls. */\nexport interface AutosaveControls {\n readonly status: Readonly<ShallowRef<AutosaveStatus>>;\n /** The latest current-intent failure or exception; cleared by a new edit or cancellation. */\n readonly error: Readonly<ShallowRef<unknown | null>>;\n /** Date.now() when a still-current write last succeeded; obsolete completions do not advance it. */\n readonly lastSavedAt: Readonly<ShallowRef<number | null>>;\n /**\n * Makes pending work ready immediately, still waiting for any active sink. Without pending work this is a no-op.\n */\n flush(): void;\n /** Drops queued work and invalidates active completion state. An already-started sink cannot be undone. */\n cancel(): void;\n}\n\n/**\n * Watches edits deeply and serializes saves, retaining only the latest pending value behind an active write.\n * A new edit immediately supersedes the old completion status, even while its debounce is still pending.\n * The sink receives the latest value when its turn starts. For mutable drafts, a sink that needs an immutable\n * payload must snapshot before its first await; autosave does not impose a cloning policy on domain values.\n *\n * A void sink acknowledges completion by returning normally, preserving synchronous storage adapters.\n * A Result sink acknowledges success explicitly or supplies an AppError. Neither means durable persistence\n * beyond the sink's own contract. Thrown/rejected exceptions remain the original error in the handle/onError;\n * they are not converted into an expected Result failure. Error-observer failures are reported diagnostically.\n *\n * The initial value is not saved. Disable/cancel discard queued writes and invalidate late completion state.\n * Disposal cancels scheduling and starts no new writes; the rejection of an already-started sink is observed\n * without updating disposed state or invoking onError. Flush readies queued work but does not await durability;\n * disposal still cancels a write queued behind an active sink.\n */\nexport function useAutosave<T>(\n value: MaybeRefOrGetter<T>,\n save: (value: T) => void | Result<void, AppError> | PromiseLike<void | Result<void, AppError>>,\n options: UseAutosaveOptions = {},\n): AutosaveControls {\n const { delayMs = 800, enabled = true, onError } = options;\n const status = shallowRef<AutosaveStatus>('idle');\n const error = shallowRef<unknown | null>(null);\n const lastSavedAt = shallowRef<number | null>(null);\n let timer: ReturnType<typeof setTimeout> | null = null;\n let isDisposed = false;\n let isRunning = false;\n let pending = false;\n let ready = false;\n let revision = 0;\n const isEnabled = (): boolean => toValue(enabled);\n\n function clearTimer(): void {\n if (timer === null) return;\n clearTimeout(timer);\n timer = null;\n }\n\n /** Error observers are not allowed to create an unobserved rejection in the scheduler. */\n function reportError(failure: unknown): void {\n if (!onError) return;\n const reportObserverFailure = (observerError: unknown): void => {\n console.error('Autosave onError callback failed', observerError);\n };\n try {\n void Promise.resolve(onError(failure)).catch(reportObserverFailure);\n } catch (observerError) {\n reportObserverFailure(observerError);\n }\n }\n\n async function execute(currentRevision: number): Promise<void> {\n let failed = false;\n let failure: unknown;\n try {\n const outcome = await save(toValue(value));\n if (outcome && !outcome.ok) {\n failed = true;\n failure = outcome.failure;\n }\n } catch (caught) {\n failed = true;\n failure = caught;\n }\n isRunning = false;\n if (!isDisposed && isEnabled() && currentRevision === revision) {\n status.value = failed ? 'error' : 'saved';\n error.value = failed ? failure : null;\n if (failed) reportError(failure);\n else lastSavedAt.value = Date.now();\n }\n drain();\n }\n\n function drain(): void {\n if (isDisposed || !isEnabled() || isRunning || !pending || !ready) return;\n clearTimer();\n pending = false;\n ready = false;\n isRunning = true;\n status.value = 'saving';\n void execute(revision);\n }\n\n function flush(): void {\n if (isDisposed || !isEnabled() || !pending) return;\n clearTimer();\n ready = true;\n drain();\n }\n\n function cancel(): void {\n clearTimer();\n pending = false;\n ready = false;\n revision += 1;\n if (isDisposed) return;\n status.value = 'idle';\n error.value = null;\n }\n\n watch(\n [() => toValue(value), isEnabled],\n () => {\n if (isDisposed) return;\n if (!isEnabled()) {\n cancel();\n return;\n }\n revision += 1;\n clearTimer();\n pending = true;\n ready = false;\n status.value = 'pending';\n error.value = null;\n const delay = toValue(delayMs);\n timer = setTimeout(\n () => {\n timer = null;\n ready = true;\n drain();\n },\n Number.isFinite(delay) ? Math.max(0, delay) : 800,\n );\n },\n // Invalidate a completion immediately on edit; a queued watcher could otherwise report obsolete success.\n { deep: true, flush: 'sync' },\n );\n\n onScopeDispose(() => {\n isDisposed = true;\n cancel();\n status.value = 'idle';\n error.value = null;\n });\n return { status, error, lastSavedAt, flush, cancel };\n}\n"],"names":[],"mappings":";;;;AAQA,MAAM,qBAAqB;AAOpB,SAAS,iBAAiB,OAAsB,WAAkC;AACvF,QAAM,QAAQ,CAAC,QAAwB,GAAG,SAAS,GAAG,kBAAkB,GAAG,GAAG;AAE9E,SAAO;AAAA,IACL,KAAQ,KAAuB;AAC7B,aAAO,MAAM,KAAQ,MAAM,GAAG,CAAC;AAAA,IACjC;AAAA,IAEA,MAAS,KAAa,OAAmB;AACvC,aAAO,MAAM,MAAM,MAAM,GAAG,GAAG,KAAK;AAAA,IACtC;AAAA,IAEA,OAAO,KAAsB;AAC3B,aAAO,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA,IAChC;AAAA,EAAA;AAEJ;AC0BA,SAAS,WAAW,OAAmC;AACrD,SACE,OAAO,UAAU,YACjB,UAAU,QACV,OAAO,SACP,UAAU,SACV,OAAQ,MAAmB,MAAM;AAErC;AAYO,SAAS,qBAAwB,SAAsD;AAC5F,QAAM,EAAE,KAAK,SAAS,SAAS,aAAa,CAAA,MAAO;AACnD,QAAM,SAAS,QAAQ,UAAU;AAGjC,WAAS,QAAQ,aAAqB,MAAyC;AAC7E,QAAI,UAAU;AACd,aAAS,OAAO,aAAa,OAAO,SAAS,QAAQ;AACnD,YAAM,OAAO,WAAW,IAAI;AAC5B,UAAI,SAAS,OAAW,QAAO;AAC/B,gBAAU,KAAK,OAAO;AAAA,IACxB;AACA,W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AACA,gBAAU;AACV,cAAQ;AACR,aAAO,QAAQ;AACf,YAAM,QAAQ;AACd,YAAM,QAAQ,QAAQ,OAAO;AAC7B,cAAQ;AAAA,QACN,MAAM;AACJ,kBAAQ;AACR,kBAAQ;AACR,gBAAA;AAAA,QACF;AAAA,QACA,OAAO,SAAS,KAAK,IAAI,KAAK,IAAI,GAAG,KAAK,IAAI;AAAA,MAAA;AAAA,IAElD;AAAA;AAAA,IAEA,EAAE,MAAM,MAAM,OAAO,OAAA;AAAA,EAAO;AAG9B,iBAAe,MAAM;AACnB,iBAAa;AACb,WAAA;AACA,WAAO,QAAQ;AACf,UAAM,QAAQ;AAAA,EAChB,CAAC;AACD,SAAO,EAAE,QAAQ,OAAO,aAAa,OAAO,OAAA;AAC9C;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/foundation/storage/NamespacedBroker.ts","../../../src/foundation/storage/PersistentRef.ts","../../../src/foundation/storage/VersionedStore.ts","../../../src/foundation/storage/hooks/UseAutosave.ts"],"sourcesContent":["// A `StorageBroker` decorator that prefixes every key with a namespace. Wrapping a shared broker (one\n// `localStorage`) in a namespace keeps unrelated features — or two tenants in the same app — from colliding on\n// a bare key like `\"draft\"`, without any hook change: the persistence hooks still see a plain `StorageBroker`.\n// Composes with any broker (production, memory, or another namespace) since it only rewrites keys.\n\nimport type { StorageBroker } from './StorageBroker';\n\n/** The separator between a namespace and the caller's key. */\nconst NamespaceSeparator = ':';\n\n/**\n * Wraps `inner` so every key is transparently prefixed with `namespace` (joined by `:`). Reads, writes, and\n * removes all address the namespaced key, so two brokers with distinct namespaces over the same backing store\n * never observe each other's values. Delegates JSON handling and failure-tolerance to `inner` unchanged.\n */\nexport function namespacedBroker(inner: StorageBroker, namespace: string): StorageBroker {\n const scope = (key: string): string => `${namespace}${NamespaceSeparator}${key}`;\n\n return {\n read<T>(key: string): T | null {\n return inner.read<T>(scope(key));\n },\n\n write<T>(key: string, value: T): boolean {\n return inner.write(scope(key), value);\n },\n\n remove(key: string): boolean {\n return inner.remove(scope(key));\n },\n };\n}\n","// A persisted ref shared by every reader. `usePersistentState` gives each component its own copy hydrated on mount;\n// an app-wide view choice — a sidebar fold, a filter switch, the last page opened — needs one value that every\n// component reads and any of them writes. `createPersistentRef` builds it once, at module scope, over the broker,\n// and decodes what storage holds before adopting it: a value written by older code, another app or a hand edit is\n// rejected to `initial`, never trusted as `T`.\n\nimport { customRef, getCurrentScope, onScopeDispose, type Ref } from 'vue';\n\nimport { localStorageStorageBroker, type StorageBroker } from './StorageBroker';\n\n/** Accepts a stored JSON value as `T`, or answers `undefined` for a shape it does not recognise. */\nexport type PersistentDecoder<T> = (stored: unknown) => T | undefined;\n\n/** Tunes where a persistent ref stores and what it accepts back. */\nexport interface PersistentRefOptions<T> {\n /** Validates a stored value before it is adopted; a rejection or a throw reads as `initial`. Defaults to trust. */\n readonly decode?: PersistentDecoder<T>;\n\n /** The persistence seam to read and write through; defaults to `localStorageStorageBroker`. */\n readonly broker?: StorageBroker;\n\n /** Whether another tab's write under the same key is adopted; defaults to true. Only `localStorage` reports one. */\n readonly syncTabs?: boolean;\n}\n\n/**\n * Creates a ref mirrored into a `StorageBroker` under `key`, meant to be created once and shared by every reader.\n * It reads storage when created: a miss, a stored `null`, a value `decode` rejects or a throwing `decode` yields\n * `initial`. Assigning a different value writes it through at once; reading never writes, and a failed write keeps the\n * value for this visit. Backed by `localStorage`, it adopts a decoded write from another tab and returns to `initial`\n * when another tab removes the key or clears storage.\n *\n * The ref is shallow: replace an array or object to persist it, never mutate it in place. Created inside an effect\n * scope (a component's `setup`, an `effectScope`), its tab listener detaches with the scope; at module scope it lives\n * as long as the page.\n */\nexport function createPersistentRef<T>(key: string, initial: T, options: PersistentRefOptions<T> = {}): Ref<T> {\n const { decode, broker = localStorageStorageBroker, syncTabs = true } = options;\n\n /** The stored value, decoded; `initial` for a miss, a rejection or a throwing decoder. */\n function readStored(): T {\n const stored = broker.read<unknown>(key);\n if (stored === null) return initial;\n if (decode === undefined) return stored as T;\n\n try {\n const decoded = decode(stored);\n return decoded === undefined ? initial : decoded;\n } catch {\n return initial;\n }\n }\n\n let current = readStored();\n let notify = (): void => undefined;\n\n const value = customRef<T>((track, trigger) => {\n notify = trigger;\n return {\n get() {\n track();\n return current;\n },\n set(next) {\n if (Object.is(next, current)) return;\n current = next;\n broker.write(key, next);\n trigger();\n },\n };\n });\n\n if (syncTabs && broker === localStorageStorageBroker && typeof window !== 'undefined') {\n // Adoption assigns `current` directly, never through the setter, so another tab's write is never echoed back.\n const onStorage = (event: StorageEvent): void => {\n if (event.storageArea !== null && event.storageArea !== window.localStorage) return;\n if (event.key !== null && event.key !== key) return;\n const next = event.newValue === null ? initial : readStored();\n if (Object.is(next, current)) return;\n current = next;\n notify();\n };\n\n window.addEventListener('storage', onStorage);\n if (getCurrentScope()) onScopeDispose(() => window.removeEventListener('storage', onStorage));\n }\n\n return value;\n}\n","// A versioned wrapper over a `StorageBroker`. Persisted client state outlives the code that wrote it: a user\n// carries last month's `localStorage` into today's deploy. A `VersionedStore` stamps each value with a schema\n// `version` and, on read, walks a migration chain from the stored version up to the current one — so an old\n// shape is upgraded in place instead of silently mis-parsed. It inherits the broker's failure-tolerance: any\n// unrecoverable state (missing migration, a future version, a broken read) degrades to `initial`, never a throw.\n\nimport { localStorageStorageBroker, type StorageBroker } from './StorageBroker';\n\n/** Upgrades a value from one schema version to the next. Receives the prior shape as `unknown`; returns the next. */\nexport type Migration = (previous: unknown) => unknown;\n\n/** A map from *source* version to the migration that upgrades it to the following version (`n` upgrades `n`→`n+1`). */\nexport type MigrationMap = Readonly<Record<number, Migration>>;\n\n/** Configures a versioned store. */\nexport interface VersionedStoreOptions<T> {\n /** The storage key the envelope is persisted under. */\n readonly key: string;\n\n /** The current schema version (a positive integer). A stored value below this is migrated up on read. */\n readonly version: number;\n\n /** The value returned when nothing is stored or the stored value cannot be recovered. */\n readonly initial: T;\n\n /** Migrations keyed by source version; `migrations[n]` upgrades a v`n` value to v`n+1`. */\n readonly migrations?: MigrationMap;\n\n /** The backing persistence seam; defaults to `localStorageStorageBroker`. */\n readonly broker?: StorageBroker;\n}\n\n/** A versioned view over a storage key — hydrate-with-migration on read, envelope-stamp on write. */\nexport interface VersionedStore<T> {\n /** The storage key this store owns. */\n readonly key: string;\n\n /** The current schema version. */\n readonly version: number;\n\n /** Reads and, if needed, migrates the stored value; returns `initial` on absence or any unrecoverable state. */\n read(): T;\n\n /** Writes `value` stamped with the current version. */\n write(value: T): void;\n\n /** Removes the stored value. */\n clear(): void;\n}\n\n/** The persisted shape: the schema version alongside the caller's data. */\ninterface Envelope {\n readonly v: number;\n readonly data: unknown;\n}\n\n/** Recognises a value as a version envelope (vs a legacy bare value written before versioning). */\nfunction isEnvelope(value: unknown): value is Envelope {\n return (\n typeof value === 'object' &&\n value !== null &&\n 'v' in value &&\n 'data' in value &&\n typeof (value as Envelope).v === 'number'\n );\n}\n\n/**\n * Builds a {@link VersionedStore} over `key`. On `read`, a stored value is interpreted as:\n * - **current version** → returned as-is;\n * - **older version** → each `migrations[n]` is applied in turn from the stored version up to `version`, the\n * upgraded value is written back, and returned. A gap in the chain (a missing `migrations[n]`) yields `initial`;\n * - **newer version** (a rollback to older code) → `initial`, leaving the forward-written value untouched;\n * - **legacy bare value** (no envelope) → treated as version `0` and migrated the same way.\n *\n * Any thrown error inside migration or the broker degrades to `initial`, mirroring the broker's never-throw contract.\n */\nexport function createVersionedStore<T>(options: VersionedStoreOptions<T>): VersionedStore<T> {\n const { key, version, initial, migrations = {} } = options;\n const broker = options.broker ?? localStorageStorageBroker;\n\n /** Runs the migration chain from `fromVersion` to the current `version`; null when a step is missing. */\n function migrate(fromVersion: number, data: unknown): { data: unknown } | null {\n let current = data;\n for (let from = fromVersion; from < version; from++) {\n const step = migrations[from];\n if (step === undefined) return null; // chain gap — cannot safely interpret the old shape\n current = step(current);\n }\n return { data: current };\n }\n\n return {\n key,\n version,\n\n read(): T {\n try {\n const stored = broker.read<unknown>(key);\n if (stored === null) return initial;\n\n const { v, data } = isEnvelope(stored) ? stored : { v: 0, data: stored };\n\n if (v === version) return data as T;\n if (v > version) return initial; // forward-written by newer code — don't guess\n\n const migrated = migrate(v, data);\n if (migrated === null) return initial;\n\n // Persist the upgrade so the next read is a fast, migration-free hit.\n broker.write<Envelope>(key, { v: version, data: migrated.data });\n return migrated.data as T;\n } catch {\n return initial;\n }\n },\n\n write(value: T): void {\n broker.write<Envelope>(key, { v: version, data: value });\n },\n\n clear(): void {\n broker.remove(key);\n },\n };\n}\n","import { onScopeDispose, shallowRef, toValue, watch, type MaybeRefOrGetter, type ShallowRef } from 'vue';\nimport type { AppError, Result } from '../../results';\n\n/** The lifecycle of the latest autosave intent, including a queued trailing write. */\nexport type AutosaveStatus = 'idle' | 'pending' | 'saving' | 'saved' | 'error';\n\n/** Tunes autosave timing, gating and failure reporting. */\nexport interface UseAutosaveOptions {\n /** The quiet period in milliseconds. Defaults to 800; read when an edit is scheduled. */\n readonly delayMs?: MaybeRefOrGetter<number>;\n /** Disabling drops pending work and invalidates completion state; reenabling schedules the current value. */\n readonly enabled?: MaybeRefOrGetter<boolean>;\n /** Reports a current write's explicit failure or exception while the scope remains enabled and live. */\n readonly onError?: (error: unknown) => void | PromiseLike<void>;\n}\n\n/** The current autosave intent and explicit queue controls. */\nexport interface AutosaveControls {\n readonly status: Readonly<ShallowRef<AutosaveStatus>>;\n /** The latest current-intent failure or exception; cleared by a new edit or cancellation. */\n readonly error: Readonly<ShallowRef<unknown | null>>;\n /** Date.now() when a still-current write last succeeded; obsolete completions do not advance it. */\n readonly lastSavedAt: Readonly<ShallowRef<number | null>>;\n /**\n * Makes pending work ready immediately, still waiting for any active sink. Without pending work this is a no-op.\n */\n flush(): void;\n /** Drops queued work and invalidates active completion state. An already-started sink cannot be undone. */\n cancel(): void;\n}\n\n/**\n * Watches edits deeply and serializes saves, retaining only the latest pending value behind an active write.\n * A new edit immediately supersedes the old completion status, even while its debounce is still pending.\n * The sink receives the latest value when its turn starts. For mutable drafts, a sink that needs an immutable\n * payload must snapshot before its first await; autosave does not impose a cloning policy on domain values.\n *\n * A void sink acknowledges completion by returning normally, preserving synchronous storage adapters.\n * A Result sink acknowledges success explicitly or supplies an AppError. Neither means durable persistence\n * beyond the sink's own contract. Thrown/rejected exceptions remain the original error in the handle/onError;\n * they are not converted into an expected Result failure. Error-observer failures are reported diagnostically.\n *\n * The initial value is not saved. Disable/cancel discard queued writes and invalidate late completion state.\n * Disposal cancels scheduling and starts no new writes; the rejection of an already-started sink is observed\n * without updating disposed state or invoking onError. Flush readies queued work but does not await durability;\n * disposal still cancels a write queued behind an active sink.\n */\nexport function useAutosave<T>(\n value: MaybeRefOrGetter<T>,\n save: (value: T) => void | Result<void, AppError> | PromiseLike<void | Result<void, AppError>>,\n options: UseAutosaveOptions = {},\n): AutosaveControls {\n const { delayMs = 800, enabled = true, onError } = options;\n const status = shallowRef<AutosaveStatus>('idle');\n const error = shallowRef<unknown | null>(null);\n const lastSavedAt = shallowRef<number | null>(null);\n let timer: ReturnType<typeof setTimeout> | null = null;\n let isDisposed = false;\n let isRunning = false;\n let pending = false;\n let ready = false;\n let revision = 0;\n const isEnabled = (): boolean => toValue(enabled);\n\n function clearTimer(): void {\n if (timer === null) return;\n clearTimeout(timer);\n timer = null;\n }\n\n /** Error observers are not allowed to create an unobserved rejection in the scheduler. */\n function reportError(failure: unknown): void {\n if (!onError) return;\n const reportObserverFailure = (observerError: unknown): void => {\n console.error('Autosave onError callback failed', observerError);\n };\n try {\n void Promise.resolve(onError(failure)).catch(reportObserverFailure);\n } catch (observerError) {\n reportObserverFailure(observerError);\n }\n }\n\n async function execute(currentRevision: number): Promise<void> {\n let failed = false;\n let failure: unknown;\n try {\n const outcome = await save(toValue(value));\n if (outcome && !outcome.ok) {\n failed = true;\n failure = outcome.failure;\n }\n } catch (caught) {\n failed = true;\n failure = caught;\n }\n isRunning = false;\n if (!isDisposed && isEnabled() && currentRevision === revision) {\n status.value = failed ? 'error' : 'saved';\n error.value = failed ? failure : null;\n if (failed) reportError(failure);\n else lastSavedAt.value = Date.now();\n }\n drain();\n }\n\n function drain(): void {\n if (isDisposed || !isEnabled() || isRunning || !pending || !ready) return;\n clearTimer();\n pending = false;\n ready = false;\n isRunning = true;\n status.value = 'saving';\n void execute(revision);\n }\n\n function flush(): void {\n if (isDisposed || !isEnabled() || !pending) return;\n clearTimer();\n ready = true;\n drain();\n }\n\n function cancel(): void {\n clearTimer();\n pending = false;\n ready = false;\n revision += 1;\n if (isDisposed) return;\n status.value = 'idle';\n error.value = null;\n }\n\n watch(\n [() => toValue(value), isEnabled],\n () => {\n if (isDisposed) return;\n if (!isEnabled()) {\n cancel();\n return;\n }\n revision += 1;\n clearTimer();\n pending = true;\n ready = false;\n status.value = 'pending';\n error.value = null;\n const delay = toValue(delayMs);\n timer = setTimeout(\n () => {\n timer = null;\n ready = true;\n drain();\n },\n Number.isFinite(delay) ? Math.max(0, delay) : 800,\n );\n },\n // Invalidate a completion immediately on edit; a queued watcher could otherwise report obsolete success.\n { deep: true, flush: 'sync' },\n );\n\n onScopeDispose(() => {\n isDisposed = true;\n cancel();\n status.value = 'idle';\n error.value = null;\n });\n return { status, error, lastSavedAt, flush, cancel };\n}\n"],"names":[],"mappings":";;;;AAQA,MAAM,qBAAqB;AAOpB,SAAS,iBAAiB,OAAsB,WAAkC;AACvF,QAAM,QAAQ,CAAC,QAAwB,GAAG,SAAS,GAAG,kBAAkB,GAAG,GAAG;AAE9E,SAAO;AAAA,IACL,KAAQ,KAAuB;AAC7B,aAAO,MAAM,KAAQ,MAAM,GAAG,CAAC;AAAA,IACjC;AAAA,IAEA,MAAS,KAAa,OAAmB;AACvC,aAAO,MAAM,MAAM,MAAM,GAAG,GAAG,KAAK;AAAA,IACtC;AAAA,IAEA,OAAO,KAAsB;AAC3B,aAAO,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA,IAChC;AAAA,EAAA;AAEJ;ACKO,SAAS,oBAAuB,KAAa,SAAY,UAAmC,CA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