@wow-two-beta/fe 0.0.21 → 0.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/auth/AuthBridge.d.ts +15 -0
  2. package/dist/auth/index.d.ts +1 -1
  3. package/dist/auth/index.js +47 -8
  4. package/dist/auth/index.js.map +1 -1
  5. package/dist/auth/providers/AuthProvider.vue.d.ts +1 -1
  6. package/dist/chunks/{SidebarMenuSection.vue_vue_type_script_setup_true_lang-CIEgYHl_.js → AppSwitcherMenu.vue_vue_type_script_setup_true_lang-DVqdOOst.js} +641 -226
  7. package/dist/chunks/AppSwitcherMenu.vue_vue_type_script_setup_true_lang-DVqdOOst.js.map +1 -0
  8. package/dist/chunks/Breakpoints-CltjxN0E.js +32 -0
  9. package/dist/chunks/Breakpoints-CltjxN0E.js.map +1 -0
  10. package/dist/chunks/{DrawerContent.vue_vue_type_script_setup_true_lang-C17R6SMV.js → DrawerContent.vue_vue_type_script_setup_true_lang-CZQnfNGk.js} +4 -12
  11. package/dist/chunks/DrawerContent.vue_vue_type_script_setup_true_lang-CZQnfNGk.js.map +1 -0
  12. package/dist/chunks/{ErrorBoundary.vue_vue_type_script_setup_true_lang-DBPGTzwk.js → ErrorBoundary.vue_vue_type_script_setup_true_lang-LRQbVAiW.js} +2 -2
  13. package/dist/chunks/{ErrorBoundary.vue_vue_type_script_setup_true_lang-DBPGTzwk.js.map → ErrorBoundary.vue_vue_type_script_setup_true_lang-LRQbVAiW.js.map} +1 -1
  14. package/dist/chunks/{LightboxModal.vue_vue_type_script_setup_true_lang-HSUZqn0g.js → LightboxModal.vue_vue_type_script_setup_true_lang-Dm79L1eK.js} +71 -477
  15. package/dist/chunks/LightboxModal.vue_vue_type_script_setup_true_lang-Dm79L1eK.js.map +1 -0
  16. package/dist/chunks/ListboxPicker.variants-hiMcl66_.js +44 -0
  17. package/dist/chunks/ListboxPicker.variants-hiMcl66_.js.map +1 -0
  18. package/dist/chunks/{MasonryLayout.vue_vue_type_script_setup_true_lang-CKhBN2SC.js → MasonryLayout.vue_vue_type_script_setup_true_lang-TuNWahLw.js} +2 -2
  19. package/dist/chunks/{MasonryLayout.vue_vue_type_script_setup_true_lang-CKhBN2SC.js.map → MasonryLayout.vue_vue_type_script_setup_true_lang-TuNWahLw.js.map} +1 -1
  20. package/dist/chunks/{MentionInput.vue_vue_type_script_setup_true_lang-vfxAeyB7.js → MentionInput.vue_vue_type_script_setup_true_lang-DdT24dkW.js} +197 -130
  21. package/dist/chunks/MentionInput.vue_vue_type_script_setup_true_lang-DdT24dkW.js.map +1 -0
  22. package/dist/chunks/OverlayChrome-BqRpuYX5.js +13 -0
  23. package/dist/chunks/OverlayChrome-BqRpuYX5.js.map +1 -0
  24. package/dist/chunks/OverlayCloseButton.vue_vue_type_script_setup_true_lang-D01KYAAn.js +429 -0
  25. package/dist/chunks/OverlayCloseButton.vue_vue_type_script_setup_true_lang-D01KYAAn.js.map +1 -0
  26. package/dist/chunks/{PopoverContent.vue_vue_type_script_setup_true_lang-hfb8AAVv.js → PopoverContent.vue_vue_type_script_setup_true_lang-BIHYpwzT.js} +2 -43
  27. package/dist/chunks/PopoverContent.vue_vue_type_script_setup_true_lang-BIHYpwzT.js.map +1 -0
  28. package/dist/chunks/{ToastHost.vue_vue_type_script_setup_true_lang-Xr-kmwgK.js → ToastHost.vue_vue_type_script_setup_true_lang-p0bfXJ9l.js} +2 -1
  29. package/dist/chunks/{ToastHost.vue_vue_type_script_setup_true_lang-Xr-kmwgK.js.map → ToastHost.vue_vue_type_script_setup_true_lang-p0bfXJ9l.js.map} +1 -1
  30. package/dist/feedback/FeedbackQueryErrors.d.ts +4 -3
  31. package/dist/feedback/FeedbackSessionExpiry.d.ts +5 -0
  32. package/dist/feedback/index.d.ts +1 -0
  33. package/dist/feedback/index.js +13 -1
  34. package/dist/feedback/index.js.map +1 -1
  35. package/dist/foundation/device/index.js +3 -27
  36. package/dist/foundation/device/index.js.map +1 -1
  37. package/dist/foundation/http/CreateApiClient.d.ts +1 -0
  38. package/dist/foundation/http/index.js +5 -1
  39. package/dist/foundation/http/index.js.map +1 -1
  40. package/dist/index.js +220 -216
  41. package/dist/index.js.map +1 -1
  42. package/dist/presentation/feedback/index.js +2 -2
  43. package/dist/presentation/feedback/toastHost/index.js +1 -1
  44. package/dist/presentation/forms/OptionCollection.d.ts +24 -0
  45. package/dist/presentation/forms/index.js +2 -2
  46. package/dist/presentation/forms/multiSelectPicker/MultiSelectPicker.vue.d.ts +3 -4
  47. package/dist/presentation/forms/multiSelectPicker/MultiSelectPickerContext.d.ts +3 -5
  48. package/dist/presentation/forms/passwordInput/PasswordInput.vue.d.ts +4 -0
  49. package/dist/presentation/forms/selectPicker/SelectPicker.vue.d.ts +5 -8
  50. package/dist/presentation/forms/selectPicker/SelectPickerContext.d.ts +6 -2
  51. package/dist/presentation/layout/index.js +1 -1
  52. package/dist/presentation/nav/appSwitcherMenu/AppSwitcherMenu.vue.d.ts +81 -0
  53. package/dist/presentation/nav/appSwitcherMenu/AppSwitcherMenuExtensions.d.ts +8 -0
  54. package/dist/presentation/nav/appSwitcherMenu/AppSwitcherMenuPanel.vue.d.ts +25 -0
  55. package/dist/presentation/nav/appSwitcherMenu/index.d.ts +1 -0
  56. package/dist/presentation/nav/index.d.ts +1 -0
  57. package/dist/presentation/nav/index.js +72 -70
  58. package/dist/presentation/overlays/index.js +55 -54
  59. package/dist/presentation/overlays/index.js.map +1 -1
  60. package/dist/router/adapters/vueRouter/Guards.d.ts +6 -1
  61. package/dist/router/adapters/vueRouter/index.d.ts +1 -1
  62. package/dist/router/index.js +8 -0
  63. package/dist/router/index.js.map +1 -1
  64. package/package.json +1 -1
  65. package/dist/chunks/DrawerContent.vue_vue_type_script_setup_true_lang-C17R6SMV.js.map +0 -1
  66. package/dist/chunks/LightboxModal.vue_vue_type_script_setup_true_lang-HSUZqn0g.js.map +0 -1
  67. package/dist/chunks/MentionInput.vue_vue_type_script_setup_true_lang-vfxAeyB7.js.map +0 -1
  68. package/dist/chunks/PopoverContent.vue_vue_type_script_setup_true_lang-hfb8AAVv.js.map +0 -1
  69. package/dist/chunks/SidebarMenuSection.vue_vue_type_script_setup_true_lang-CIEgYHl_.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppSwitcherMenu.vue_vue_type_script_setup_true_lang-DVqdOOst.js","sources":["../../src/presentation/nav/breadcrumb/Breadcrumb.vue","../../src/presentation/nav/pagination/Pagination.vue","../../src/presentation/nav/menu/MenuContext.ts","../../src/presentation/nav/menu/MenuExtensions.ts","../../src/presentation/nav/menu/Menu.variants.ts","../../src/presentation/nav/menu/Menu.vue","../../src/presentation/nav/menu/MenuItem.vue","../../src/presentation/nav/menu/MenuCheckboxItem.vue","../../src/presentation/nav/menu/MenuRadioGroup.vue","../../src/presentation/nav/menu/MenuRadioItem.vue","../../src/presentation/nav/menu/MenuSub.vue","../../src/presentation/nav/menu/MenuSubTrigger.vue","../../src/presentation/nav/menu/MenuSubContent.vue","../../src/presentation/nav/menu/MenuGroup.vue","../../src/presentation/nav/menu/MenuLabel.vue","../../src/presentation/nav/menu/MenuSeparator.vue","../../src/presentation/nav/dropdownMenu/DropdownMenuContext.ts","../../src/presentation/nav/dropdownMenu/DropdownMenu.vue","../../src/presentation/nav/NavExtensions.ts","../../src/presentation/nav/dropdownMenu/DropdownMenuTrigger.vue","../../src/presentation/nav/dropdownMenu/DropdownMenuContent.vue","../../src/presentation/nav/contextMenu/ContextMenuContext.ts","../../src/presentation/nav/contextMenu/ContextMenu.vue","../../src/presentation/nav/contextMenu/ContextMenuTrigger.vue","../../src/presentation/nav/contextMenu/ContextMenuContent.vue","../../src/presentation/nav/menubar/MenubarContext.ts","../../src/presentation/nav/menubar/Menubar.variants.ts","../../src/presentation/nav/menubar/Menubar.vue","../../src/presentation/nav/menubar/MenubarMenu.vue","../../src/presentation/nav/menubar/MenubarTrigger.vue","../../src/presentation/nav/menubar/MenubarContent.vue","../../src/presentation/nav/navigationMenu/NavigationMenuContext.ts","../../src/presentation/nav/navigationMenu/NavigationMenu.vue","../../src/presentation/nav/navigationMenu/NavigationMenuList.vue","../../src/presentation/nav/navigationMenu/NavigationMenuItem.vue","../../src/presentation/nav/navigationMenu/NavigationMenuTrigger.vue","../../src/presentation/nav/navigationMenu/NavigationMenuContent.vue","../../src/presentation/nav/navigationMenu/NavigationMenuLink.vue","../../src/presentation/nav/scrollSpy/UseScrollSpy.ts","../../src/presentation/nav/scrollSpy/ScrollSpy.vue","../../src/presentation/nav/tableOfContents/TableOfContents.vue","../../src/presentation/nav/linkItem/LinkItem.variants.ts","../../src/presentation/nav/linkItem/LinkItem.vue","../../src/presentation/nav/bottomNavMenu/BottomNavMenu.vue","../../src/presentation/nav/bottomNavMenu/BottomNavMenuItem.vue","../../src/presentation/nav/sidebarMenu/SidebarMenuContext.ts","../../src/presentation/nav/sidebarMenu/SidebarMenu.vue","../../src/presentation/nav/sidebarMenu/SidebarMenuItem.vue","../../src/presentation/nav/sidebarMenu/SidebarMenuGroup.vue","../../src/presentation/nav/sidebarMenu/SidebarMenuSection.vue","../../src/presentation/nav/appSwitcherMenu/AppSwitcherMenuPanel.vue","../../src/presentation/nav/appSwitcherMenu/AppSwitcherMenuExtensions.ts","../../src/presentation/nav/appSwitcherMenu/AppSwitcherMenu.vue"],"sourcesContent":["<script lang=\"ts\">\nexport interface BreadcrumbItem {\n /** The item's label — scalar; an array item carries no rich content. The `#label` slot is the rich override. */\n readonly label: string | number;\n\n /** Make this item a link. Last item is typically rendered as plain text. */\n readonly href?: string;\n}\n\nexport interface BreadcrumbProps {\n readonly items: ReadonlyArray<BreadcrumbItem>;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useLocale } from '../../../foundation/i18n';\nimport { UrlExtensions } from '../../../foundation/dom';\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { ChevronRight } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/styles';\nimport { Icon } from '../../../foundation/icons';\n\nconst locale = useLocale();\n\n/**\n * Renders a linear trail of links and separators marking where the reader stands.\n * The last item is always rendered as `aria-current=\"page\"` and not a link. Use the L5\n * collapsing version when the chain gets long.\n */\ndefineOptions({ name: 'Breadcrumb', inheritAttrs: false });\n\ndefineSlots<{\n /** The rich override for an item's `label`. */\n label?(props: { item: BreadcrumbItem; index: number }): unknown;\n\n /** The custom separator element. React's `separator` prop; defaults to a chevron-right icon. */\n separator?(): unknown;\n}>();\n\nconst props = defineProps<BreadcrumbProps>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLElement>('el');\n\nconst classes = computed(() => cn('text-sm', attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\nconst lastIndex = computed(() => props.items.length - 1);\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- `aria-label` sits before `v-bind=\"rest\"` so a consumer-supplied one wins,\n the precedence React got from spreading `{...props}` after it. -->\n <nav ref=\"el\" :aria-label=\"locale.t('Breadcrumb.breadcrumb', undefined, 'Breadcrumb')\" v-bind=\"rest\" :class=\"classes\">\n <ol class=\"flex flex-wrap items-center gap-1.5\">\n <template v-for=\"(item, i) in props.items\" :key=\"item.href ?? item.label\">\n <li>\n <a\n v-if=\"item.href && i !== lastIndex\"\n :href=\"UrlExtensions.safeNavigation(item.href)\"\n class=\"text-muted-foreground hover:text-foreground hover:underline focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring rounded-sm\"\n >\n <slot name=\"label\" :item=\"item\" :index=\"i\">{{ item.label }}</slot>\n </a>\n <span v-else :aria-current=\"i === lastIndex ? 'page' : undefined\" class=\"text-foreground\">\n <slot name=\"label\" :item=\"item\" :index=\"i\">{{ item.label }}</slot>\n </span>\n </li>\n <li v-if=\"i !== lastIndex\" aria-hidden=\"true\" class=\"text-subtle-foreground\">\n <slot name=\"separator\"><Icon :icon=\"ChevronRight\" :size=\"14\" /></slot>\n </li>\n </template>\n </ol>\n </nav>\n</template>\n","<script lang=\"ts\">\nexport interface PaginationProps {\n /** The total page count (1-based). */\n readonly total: number;\n\n /** The current page (1-based). The `v-model:page` binding target. */\n readonly page: number;\n\n /** The number of page buttons surrounding the current. Default `1`. At most 50 neighbors per side are rendered. */\n readonly siblings?: number;\n\n /** Shows the first/last buttons beside prev/next and the numbers. Default `true`. */\n readonly showFirstLast?: boolean;\n /** @deprecated Use `showFirstLast` (inverted); this alias is removed next release. */\n readonly hideFirstLast?: boolean;\n}\n\nfunction range(start: number, end: number): ReadonlyArray<number> {\n return Array.from({ length: Math.max(0, end - start + 1) }, (_, i) => start + i);\n}\n\nfunction buildPages(total: number, page: number, siblings: number): ReadonlyArray<number | 'ellipsis'> {\n if (total <= 1) return [1];\n const left = Math.max(2, page - siblings);\n const right = Math.min(total - 1, page + siblings);\n const pages: Array<number | 'ellipsis'> = [1];\n if (left > 2) pages.push('ellipsis');\n pages.push(...range(left, right));\n if (right < total - 1) pages.push('ellipsis');\n if (total > 1) pages.push(total);\n return pages;\n}\n\nconst BaseButton =\n 'inline-flex h-8 min-w-8 items-center justify-center rounded-md border border-transparent px-2 text-sm transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50';\n</script>\n\n<script setup lang=\"ts\">\nimport { useLocale } from '../../../foundation/i18n';\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/styles';\nimport { Icon } from '../../../foundation/icons';\n\nconst locale = useLocale();\n\n/**\n * Renders a compact page-number row with prev / next arrows and ellipses for skipped ranges.\n * Stateless — the consumer drives `page` and reacts to `update:page`.\n */\ndefineOptions({ name: 'Pagination', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<PaginationProps>(), {\n siblings: 1,\n showFirstLast: undefined,\n hideFirstLast: undefined,\n});\n\n/** `showFirstLast` first, then the inverted deprecated `hideFirstLast`. */\nconst hasFirstLast = computed(() => props.showFirstLast ?? !(props.hideFirstLast ?? false));\n\nconst emit = defineEmits<{\n /** Fires when the reader lands on a different page — the `v-model:page` half. */\n 'update:page': [page: number];\n}>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLElement>('el');\n\nconst total = computed(() => (Number.isSafeInteger(props.total) && props.total > 0 ? props.total : 1));\nconst page = computed(() =>\n Number.isFinite(props.page) ? Math.max(1, Math.min(total.value, Math.trunc(props.page))) : 1,\n);\nconst siblings = computed(() =>\n Number.isFinite(props.siblings) ? Math.max(0, Math.min(50, Math.trunc(props.siblings))) : 1,\n);\nconst pages = computed(() => buildPages(total.value, page.value, siblings.value));\n\nfunction go(target: number): void {\n const next = Math.min(total.value, Math.max(1, target));\n if (next === page.value) return;\n emit('update:page', next);\n}\n\nconst classes = computed(() => cn('inline-flex items-center gap-1', attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <nav ref=\"el\" :aria-label=\"locale.t('Pagination.pagination', undefined, 'Pagination')\" v-bind=\"rest\" :class=\"classes\">\n <button\n v-if=\"hasFirstLast\"\n type=\"button\"\n :aria-label=\"locale.t('Pagination.firstPage', undefined, 'First page')\"\n :disabled=\"page <= 1\"\n :class=\"cn(BaseButton, 'hover:bg-muted')\"\n @click=\"go(1)\"\n >\n <Icon :icon=\"ChevronsLeft\" :size=\"16\" />\n </button>\n <button\n type=\"button\"\n :aria-label=\"locale.t('Pagination.previousPage', undefined, 'Previous page')\"\n :disabled=\"page <= 1\"\n :class=\"cn(BaseButton, 'hover:bg-muted')\"\n @click=\"go(page - 1)\"\n >\n <Icon :icon=\"ChevronLeft\" :size=\"16\" />\n </button>\n <template v-for=\"(p, i) in pages\">\n <span v-if=\"p === 'ellipsis'\" :key=\"`e-${i}`\" class=\"px-1 text-muted-foreground\">…</span>\n <button\n v-else\n :key=\"p\"\n type=\"button\"\n :aria-current=\"p === page ? 'page' : undefined\"\n :class=\"cn(BaseButton, p === page ? 'border-primary bg-primary text-primary-foreground' : 'hover:bg-muted')\"\n @click=\"go(p)\"\n >\n {{ p }}\n </button>\n </template>\n <button\n type=\"button\"\n :aria-label=\"locale.t('Pagination.nextPage', undefined, 'Next page')\"\n :disabled=\"page >= total\"\n :class=\"cn(BaseButton, 'hover:bg-muted')\"\n @click=\"go(page + 1)\"\n >\n <Icon :icon=\"ChevronRight\" :size=\"16\" />\n </button>\n <button\n v-if=\"hasFirstLast\"\n type=\"button\"\n :aria-label=\"locale.t('Pagination.lastPage', undefined, 'Last page')\"\n :disabled=\"page >= total\"\n :class=\"cn(BaseButton, 'hover:bg-muted')\"\n @click=\"go(total)\"\n >\n <Icon :icon=\"ChevronsRight\" :size=\"16\" />\n </button>\n </nav>\n</template>\n","import { inject, type InjectionKey, type Ref, type ShallowRef } from 'vue';\n\n/** One registered `MenuItem` — the unit the arrow-key walk moves across. */\nexport interface MenuItemEntry {\n id: string;\n el: HTMLButtonElement | null;\n disabled: boolean;\n}\n\n/** Defines the focus targets the arrow-key walk accepts: a relative step or an edge. */\nexport type MenuFocusTarget = 1 | -1 | 'first' | 'last';\n\n/** One open submenu, as its parent menu tracks it so only one sibling submenu stays open. */\nexport interface MenuSubmenuEntry {\n readonly id: string;\n\n /** The submenu's trigger row, which keeps the submenu open while it holds focus or the pointer. */\n readonly trigger: () => HTMLElement | null;\n\n /** Closes the submenu without moving focus. */\n readonly close: () => void;\n}\n\n/**\n * The seam between `Menu` and its `MenuItem` / `MenuGroup` / `MenuLabel` /\n * `MenuSeparator` children.\n *\n * React attached these as `Menu.Item` / `.Group` / … over a `createContext`. An\n * SFC's generated default export cannot carry statics cleanly, so they ship as\n * sibling components and share state through provide/inject instead.\n */\nexport interface MenuContextValue {\n registerItem: (entry: MenuItemEntry) => void;\n unregisterItem: (id: string) => void;\n\n /** The live registry — a plain array, read imperatively, exactly as React's `useRef` list was. */\n items: Array<MenuItemEntry>;\n\n /** Closes the menu after a selection. A submenu closes its whole menu tree. */\n close: () => void;\n\n /** Moves focus from the item `fromId` across the enabled items in document order, wrapping at the edges. */\n moveFocus: (fromId: string, target: MenuFocusTarget) => void;\n\n /** Applies the shared Arrow/Home/End walk for one item's keydown; returns whether the key was consumed. */\n navigate: (fromId: string, event: KeyboardEvent) => boolean;\n\n /** Returns focus to the menu surface, so no row stays highlighted after the pointer leaves it. */\n focusSurface: () => void;\n\n /** Records the pointer entering a row; `ownerSubmenuId` names the submenu that row opens, if any. */\n hoverItem: (ownerSubmenuId: string | null) => void;\n\n /** Tracks a submenu that just opened, closing any other open sibling submenu. */\n trackSubmenu: (entry: MenuSubmenuEntry) => void;\n\n /** Stops tracking a submenu that closed. */\n untrackSubmenu: (id: string) => void;\n\n /** Cancels a pending hover close — the pointer reached the open submenu. */\n holdSubmenu: () => void;\n}\n\nexport const MenuKey: InjectionKey<MenuContextValue> = Symbol('wow-two.menu');\n\nexport function useMenuContext(): MenuContextValue {\n const context = inject(MenuKey, null);\n if (!context) {\n throw new Error('Menu rows, groups, labels and separators must be used inside <Menu>');\n }\n return context;\n}\n\n/**\n * The seam every `Menu` in one nested tree shares — the root menu and each submenu surface below it.\n *\n * The root `Menu` provides it; a submenu's `Menu` reads it, so a selection or a Tab anywhere closes the\n * whole tree and an outside pointerdown can tell a sibling surface from the page.\n */\nexport interface MenuTreeContextValue {\n /** Closes the root menu, which unmounts every submenu below it. */\n closeTree: () => void;\n\n /** Whether a node sits inside the root anchor or any mounted surface of the tree. */\n contains: (node: Node | null) => boolean;\n\n /** Registers one surface of the tree; returns the unregister. */\n registerSurface: (surface: () => HTMLElement | null) => () => void;\n}\n\nexport const MenuTreeKey: InjectionKey<MenuTreeContextValue> = Symbol('wow-two.menuTree');\n\n/** Defines how a submenu was opened — a keyboard open moves focus into it, a pointer open does not. */\nexport const MenuSubOpenReason = {\n /** Refers to an open from Enter, Space or the inline-end arrow key. */\n Keyboard: 'keyboard',\n /** Refers to an open from hover or a click. */\n Pointer: 'pointer',\n} as const;\n\nexport type MenuSubOpenReason = (typeof MenuSubOpenReason)[keyof typeof MenuSubOpenReason];\n\n/** The value `MenuSub` shares with its `MenuSubTrigger` and `MenuSubContent`. */\nexport interface MenuSubContextValue {\n readonly id: string;\n\n /** The resolved open state. */\n readonly open: Ref<boolean>;\n\n /** Requests the next open state; `reason` records how an open started. */\n readonly setOpen: (open: boolean, reason?: MenuSubOpenReason) => void;\n\n /** How the current open started. A plain box — a one-shot signal between two handlers, never rendered. */\n readonly openReason: { current: MenuSubOpenReason };\n\n /** The trigger row — the positioning anchor and the focus-return target. */\n readonly triggerEl: ShallowRef<HTMLElement | null>;\n\n /** The trigger row's id, which names the submenu surface. */\n readonly triggerId: string;\n\n /** The submenu surface's id, which the trigger's `aria-controls` points at. */\n readonly contentId: string;\n}\n\n/** `null` is provided below every `Menu`, so a menu nested without `MenuSub` stays a root menu. */\nexport const MenuSubKey: InjectionKey<MenuSubContextValue | null> = Symbol('wow-two.menuSub');\n\nexport function useMenuSubContext(): MenuSubContextValue {\n const context = inject(MenuSubKey, null);\n if (!context) throw new Error('MenuSubTrigger / MenuSubContent must be used inside <MenuSub>');\n return context;\n}\n\n/** The value `MenuRadioGroup` shares with its `MenuRadioItem` rows. */\nexport interface MenuRadioGroupContextValue {\n /** The selected value, or `null` when none is selected. */\n readonly value: Ref<string | null>;\n\n /** Requests a selection. */\n readonly select: (value: string) => void;\n\n /** Whether the whole group is disabled. */\n readonly isDisabled: Readonly<Ref<boolean>>;\n}\n\nexport const MenuRadioGroupKey: InjectionKey<MenuRadioGroupContextValue> = Symbol('wow-two.menuRadioGroup');\n\nexport function useMenuRadioGroupContext(): MenuRadioGroupContextValue {\n const context = inject(MenuRadioGroupKey, null);\n if (!context) throw new Error('MenuRadioItem must be used inside <MenuRadioGroup>');\n return context;\n}\n","// Folder-internal helpers for `nav/menu`. Not exported from the barrel — the \"internal\" signal is\n// absence from `index.ts`, not the file name.\n\n/** Extends menu rows with the pointer, focus and direction reads every row kind shares. */\nexport const MenuExtensions = {\n /** @internal The pointer type that moves the row highlight; touch and pen only activate. */\n MousePointerType: 'mouse',\n\n /** Whether a pointer event came from a mouse, the one pointer whose movement moves the highlight. */\n isMousePointer(event: PointerEvent): boolean {\n return event.pointerType === MenuExtensions.MousePointerType;\n },\n\n /** Focuses a row unless it already holds focus, without scrolling the page. */\n focusRow(row: HTMLElement | null): void {\n if (!row || row.ownerDocument.activeElement === row) return;\n\n row.focus({ preventScroll: true });\n },\n\n /** Whether a node lays out right to left, read from its computed `direction`. */\n isRightToLeft(node: HTMLElement | null): boolean {\n return node?.ownerDocument.defaultView?.getComputedStyle(node).direction === 'rtl';\n },\n} as const;\n","import { tv, type VariantProps } from '../../../foundation/styles';\n\nexport const menuVariants = tv({\n /* Layout only: fill, border, radius, padding and shadow come from the surface recipe, so the `variant`, `tone`,\n `radius`, `padding` and `elevation` props reach the panel. */\n base: 'flex min-w-[8rem] flex-col gap-0.5 text-sm outline-hidden',\n});\n\nexport const menuItemVariants = tv({\n base: 'relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm outline-hidden transition-colors focus:bg-muted focus:text-foreground hover:bg-muted hover:text-foreground',\n variants: {\n state: {\n default: 'text-popover-foreground',\n destructive: 'text-destructive-soft-foreground focus:bg-destructive-soft hover:bg-destructive-soft',\n disabled: 'pointer-events-none opacity-50',\n },\n },\n defaultVariants: { state: 'default' },\n});\n\nexport const menuLabelVariants = tv({\n base: 'px-2 py-1.5 text-xs font-semibold text-muted-foreground',\n});\n\nexport const menuSeparatorVariants = tv({\n base: '-mx-1 my-1 h-px bg-border',\n});\n\n/** The fixed leading column a checkbox or radio row draws its check mark in. */\nexport const menuItemIndicatorVariants = tv({\n base: 'inline-flex size-4 shrink-0 items-center justify-center',\n});\n\n/** The trailing chevron a submenu trigger row points at its submenu with; it mirrors in right-to-left. */\nexport const menuSubIndicatorVariants = tv({\n base: 'ms-auto size-4 shrink-0 text-muted-foreground rtl:-scale-x-100',\n});\n\nexport type MenuVariants = VariantProps<typeof menuVariants>;\nexport type MenuItemVariants = VariantProps<typeof menuItemVariants>;\n\n/** Defines the visual state of a menu item. */\nexport const MenuItemState = {\n /** Refers to the default, neutral item. */\n Default: 'default',\n /** Refers to a destructive item (e.g. delete). */\n Destructive: 'destructive',\n /** Refers to a non-interactive, dimmed item. */\n Disabled: 'disabled',\n} as const;\n\nexport type MenuItemState = (typeof MenuItemState)[keyof typeof MenuItemState];\n\n/* Compile-time lock: enum values ≡ tv `state` keys (drift = type error). */\ntype AssertExact<A, B> = [A] extends [B] ? ([B] extends [A] ? true : never) : never;\nconst _assertMenuItemState: AssertExact<\n MenuItemState,\n NonNullable<VariantProps<typeof menuItemVariants>['state']>\n> = true;\nvoid _assertMenuItemState;\n","<script lang=\"ts\">\nimport type { Placement } from '@floating-ui/vue';\nimport type {\n SurfaceElevation,\n SurfacePadding,\n SurfaceRadius,\n SurfaceTone,\n SurfaceVariant,\n} from '../../../foundation/styles';\n\n/**\n * Represents the prop surface of `Menu`.\n *\n * React declared the surface axes by `extends SurfaceLayoutVariants`; they are\n * spelled out here because the SFC compiler's type resolver cannot follow a\n * `VariantProps<typeof …>` base and fails the build on it. The aliases below\n * are the canonical ones from `foundation/styles`, already locked against the\n * `surfaceVariants` config there, so the two cannot drift. `placement` is\n * `Placement` for the same reason — React read it back off `AnchoredPositioner`\n * with an indexed access, which the resolver cannot follow either.\n *\n * The accessible label is *not* a prop: a declared `'aria-label'` arrives as\n * `props.ariaLabel` and never renders. It stays a fallthrough attr and lands on\n * the menu surface through `v-bind=\"rest\"` below.\n */\nexport interface MenuProps {\n /** Controlled axes use their canonical Vue model names; each update event requests caller state. */\n readonly open?: boolean;\n\n /** The element the surface anchors to. */\n readonly anchor: HTMLElement | null;\n\n /** The Floating UI placement. Default `bottom-start`. */\n readonly placement?: Placement;\n\n /** The distance between anchor and surface in px. Default 6. */\n readonly offset?: number;\n\n /** The visual recipe. Default `raised`. */\n readonly variant?: SurfaceVariant;\n\n /** The color tone the recipe is tinted with. */\n readonly tone?: SurfaceTone;\n\n /** The corner rounding. Default `md`. */\n readonly radius?: SurfaceRadius;\n\n /** The inner spacing step. Default `xs`. */\n readonly padding?: SurfacePadding;\n\n /** The shadow depth. */\n readonly elevation?: SurfaceElevation;\n\n /** Optional pre-gesture focus target, restored only while this menu owns focus. */\n readonly returnFocus?: () => HTMLElement | null;\n}\n\n/** @internal How long a hovered sibling row waits before closing an open submenu, in ms. */\nconst SubmenuCloseDelayMs = 250;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, inject, onScopeDispose, provide, useAttrs, useTemplateRef } from 'vue';\nimport { cn, surfaceVariants } from '../../../foundation/styles';\nimport { AnchoredPositioner, DismissableLayer, FocusScope, Portal, Presence } from '../../../foundation/primitives';\nimport { DomOrderExtensions } from '../../../foundation/dom';\nimport { useTypeahead } from '../../../foundation/selection';\nimport {\n MenuKey,\n MenuSubKey,\n MenuSubOpenReason,\n MenuTreeKey,\n type MenuFocusTarget,\n type MenuItemEntry,\n type MenuSubmenuEntry,\n type MenuTreeContextValue,\n} from './MenuContext';\nimport { MenuExtensions } from './MenuExtensions';\nimport { menuVariants } from './Menu.variants';\n\n/** Renders the anchored, focus-trapped menu surface the arrow keys walk. */\ndefineOptions({ name: 'Menu', inheritAttrs: false });\n\n/** The menu contents — `MenuItem` / `MenuGroup` / `MenuLabel` / `MenuSeparator`. React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\n/** `open` default to `undefined` so an absent prop cannot read as an explicit `false`. */\nconst props = withDefaults(defineProps<MenuProps>(), {\n open: undefined,\n placement: 'bottom-start',\n offset: 6,\n variant: undefined,\n tone: undefined,\n radius: undefined,\n padding: undefined,\n elevation: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the menu should update:open — Escape, an outside pointerdown, Tab, or a selection. */\n 'update:open': [open: boolean];\n\n /**\n * Fires when a key goes down on the menu container, ahead of the menu's own Tab\n * handling, so a wrapper (Menubar) can add navigation and opt out with `preventDefault()`.\n */\n keydown: [event: KeyboardEvent];\n}>();\n\nconst attrs = useAttrs();\nconst layer = useTemplateRef<{ readonly el: HTMLElement | null }>('layer');\n\n/* A menu rendered by `MenuSubContent` is a submenu of the tree its parent owns; any other menu roots\n a tree of its own. `MenuSubKey` is reset to `null` below, so only `MenuSub` can mark a submenu. */\nconst parentTree = inject(MenuTreeKey, null);\nconst sub = inject(MenuSubKey, null);\nconst isSubmenu = parentTree !== null && sub !== null;\n\nconst isMenuOpen = computed(() => props.open ?? false);\n\n/** The live item registry — a plain array, not reactive: the ordering is read imperatively. */\nconst items: Array<MenuItemEntry> = [];\n\n/** The surfaces a root tree has registered — its own and every mounted submenu's. */\nconst surfaces = new Set<() => HTMLElement | null>();\n\n/** The submenu opened from one of this menu's rows, if any. */\nlet openSubmenu: MenuSubmenuEntry | null = null;\n\nlet submenuCloseTimer: ReturnType<typeof setTimeout> | null = null;\n\n/** The tree this surface belongs to — its own when it is a root. */\nconst tree: MenuTreeContextValue =\n isSubmenu && parentTree\n ? parentTree\n : {\n closeTree: () => emit('update:open', false),\n contains: (node) =>\n node !== null &&\n (props.anchor?.contains(node) === true || [...surfaces].some((resolve) => resolve()?.contains(node))),\n registerSurface: (resolve) => {\n surfaces.add(resolve);\n return () => surfaces.delete(resolve);\n },\n };\n\nif (!isSubmenu) provide(MenuTreeKey, tree);\nprovide(MenuSubKey, null);\n\nconst unregisterSurface = tree.registerSurface(surface);\n\n/** Registers an item, replacing the entry when its id is already known. */\nfunction registerItem(entry: MenuItemEntry): void {\n const index = items.findIndex((i) => i.id === entry.id);\n if (index >= 0) items[index] = entry;\n else items.push(entry);\n}\n\n/** Removes an item's registration. */\nfunction unregisterItem(id: string): void {\n const index = items.findIndex((i) => i.id === id);\n if (index >= 0) items.splice(index, 1);\n}\n\n/** Resolves the rendered menu surface. */\nfunction surface(): HTMLElement | null {\n return layer.value?.el ?? null;\n}\n\n/** Closes the open submenu unless `focused` is the row that opened it. */\nfunction closeSubmenuUnlessOwner(focused: HTMLElement | null): void {\n if (openSubmenu && openSubmenu.trigger() !== focused) openSubmenu.close();\n}\n\n/** Focuses an item's row and closes any submenu another row opened. */\nfunction focusItem(item: MenuItemEntry | undefined): void {\n if (!item?.el) return;\n item.el.focus();\n closeSubmenuUnlessOwner(item.el);\n}\n\n/** Moves focus across the enabled items in document order, wrapping at the edges. */\nfunction moveFocus(fromId: string, target: MenuFocusTarget): void {\n const list = DomOrderExtensions.inDocumentOrder(\n items.filter((i) => !i.disabled),\n (item) => item.el,\n );\n if (list.length === 0) return;\n if (target === 'first' || target === 'last') {\n focusItem(list[target === 'first' ? 0 : list.length - 1]);\n return;\n }\n const index = list.findIndex((i) => i.id === fromId);\n let nextIndex = index + target;\n if (index === -1) nextIndex = target === 1 ? 0 : list.length - 1;\n if (nextIndex < 0) nextIndex = list.length - 1;\n if (nextIndex >= list.length) nextIndex = 0;\n focusItem(list[nextIndex]);\n}\n\n/** Applies the Arrow/Home/End walk; returns whether the key was consumed. */\nfunction navigate(fromId: string, event: KeyboardEvent): boolean {\n switch (event.key) {\n case 'ArrowDown':\n moveFocus(fromId, 1);\n break;\n case 'ArrowUp':\n moveFocus(fromId, -1);\n break;\n case 'Home':\n moveFocus(fromId, 'first');\n break;\n case 'End':\n moveFocus(fromId, 'last');\n break;\n default:\n return false;\n }\n event.preventDefault();\n return true;\n}\n\n/** Moves focus from a row back to the surface, so no row stays highlighted. */\nfunction focusSurface(): void {\n const node = surface();\n const active = node?.ownerDocument.activeElement ?? null;\n if (node && active && active !== node && node.contains(active)) node.focus({ preventScroll: true });\n}\n\n/** Cancels a pending hover close of the open submenu. */\nfunction clearSubmenuTimer(): void {\n if (submenuCloseTimer === null) return;\n clearTimeout(submenuCloseTimer);\n submenuCloseTimer = null;\n}\n\n/** Schedules the open submenu to close when the pointer rests on a row that does not own it. */\nfunction hoverItem(ownerSubmenuId: string | null): void {\n if (!openSubmenu) return;\n if (openSubmenu.id === ownerSubmenuId) {\n clearSubmenuTimer();\n return;\n }\n if (submenuCloseTimer !== null) return;\n const pending = openSubmenu;\n submenuCloseTimer = setTimeout(() => {\n submenuCloseTimer = null;\n if (openSubmenu === pending) pending.close();\n }, SubmenuCloseDelayMs);\n}\n\n/** Tracks a newly opened submenu and closes the sibling that was open before it. */\nfunction trackSubmenu(entry: MenuSubmenuEntry): void {\n clearSubmenuTimer();\n const previous = openSubmenu;\n openSubmenu = entry;\n if (previous && previous.id !== entry.id) previous.close();\n}\n\n/** Stops tracking a submenu that closed. */\nfunction untrackSubmenu(id: string): void {\n if (openSubmenu?.id !== id) return;\n clearSubmenuTimer();\n openSubmenu = null;\n}\n\nprovide(MenuKey, {\n registerItem,\n unregisterItem,\n items,\n close: () => tree.closeTree(),\n moveFocus,\n navigate,\n focusSurface,\n hoverItem,\n trackSubmenu,\n untrackSubmenu,\n holdSubmenu: clearSubmenuTimer,\n});\n\nonScopeDispose(() => {\n clearSubmenuTimer();\n unregisterSurface();\n});\n\nconst classes = computed(() =>\n cn(\n surfaceVariants({\n variant: props.variant ?? 'raised',\n tone: props.tone,\n radius: props.radius ?? 'md',\n padding: props.padding ?? 'xs',\n elevation: props.elevation,\n }),\n menuVariants(),\n 'motion-safe:data-[state=open]:animate-(--animate-pop-in)',\n 'motion-safe:data-[state=closed]:animate-(--animate-pop-out)',\n 'motion-reduce:animate-none',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. Carries `aria-label` onto the surface. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\nfunction handleEscape(): void {\n emit('update:open', false);\n}\n\nfunction handleOutsidePointerDown(event: PointerEvent): void {\n const target = event.target as Node | null;\n if (props.anchor?.contains(target)) return;\n // A submenu keeps its tree open for a press on a sibling surface, and closes it for one on the page.\n if (isSubmenu && !tree.contains(target)) {\n tree.closeTree();\n return;\n }\n emit('update:open', false);\n}\n\n/** Keeps focus on the trigger row when a submenu opened from the pointer. */\nfunction handleMountAutoFocus(event: CustomEvent): void {\n if (isSubmenu && sub?.openReason.current === MenuSubOpenReason.Pointer) event.preventDefault();\n}\n\nconst orderedItems = () => DomOrderExtensions.inDocumentOrder(items, (item) => item.el);\nconst typeahead = useTypeahead({\n items: orderedItems,\n enabled: isMenuOpen,\n getLabel: (item) => item.el?.textContent?.trim() ?? '',\n isDisabled: (item) => item.disabled || !item.el?.isConnected,\n getActiveIndex: () => orderedItems().findIndex((item) => item.el === item.el?.ownerDocument.activeElement),\n onMatch: (item) => focusItem(item),\n});\n\nfunction handleKeydown(event: KeyboardEvent): void {\n emit('keydown', event);\n if (event.defaultPrevented || event.isComposing) return;\n const target = event.target as HTMLElement;\n if (!target.closest('input,textarea,[contenteditable=\"true\"]') && typeahead.onKeyDown(event)) {\n event.preventDefault();\n return;\n }\n if (event.key === 'Tab') {\n event.preventDefault();\n tree.closeTree();\n return;\n }\n if (isSubmenu && event.key === (MenuExtensions.isRightToLeft(surface()) ? 'ArrowRight' : 'ArrowLeft')) {\n event.preventDefault();\n emit('update:open', false);\n }\n}\n</script>\n\n<template>\n <!-- No hard `v-if=\"isMenuOpen\"` — Presence keeps the surface mounted through its\n pop-out exit, flipping data-state to \"closed\" and deferring unmount until the\n animation ends. `FocusScope as-child` relays Presence's cloned `ref` +\n `data-state` down onto the DismissableLayer's div, which *is* the surface.\n A submenu does not trap focus: its root menu's scope already owns the tree. -->\n <Portal>\n <AnchoredPositioner :anchor=\"props.anchor\" :placement=\"props.placement\" :offset=\"props.offset\" class=\"z-dropdown\">\n <Presence :is-present=\"isMenuOpen\">\n <FocusScope\n as-child\n :is-trapped=\"!isSubmenu\"\n can-loop\n :return-focus=\"props.returnFocus\"\n :on-mount-auto-focus=\"handleMountAutoFocus\"\n >\n <DismissableLayer\n ref=\"layer\"\n role=\"menu\"\n :on-escape=\"handleEscape\"\n :on-outside-pointer-down=\"handleOutsidePointerDown\"\n v-bind=\"rest\"\n :class=\"classes\"\n @keydown=\"handleKeydown\"\n >\n <slot />\n </DismissableLayer>\n </FocusScope>\n </Presence>\n </AnchoredPositioner>\n </Portal>\n</template>\n","<script lang=\"ts\">\nimport type { MenuItemState } from './Menu.variants';\n\n/**\n * Represents the prop surface of `MenuItem`.\n *\n * React declared `extends Omit<MenuItemVariants, 'state'>`; `state` is the only\n * axis `menuItemVariants` carries, so the heritage contributed nothing and is\n * dropped — a `VariantProps<…>` base is unresolvable to the SFC compiler anyway.\n */\nexport interface MenuItemProps {\n /** The visual state of the item. */\n readonly state?: MenuItemState;\n\n /** The disabled state — blocks activation. */\n readonly isDisabled?: boolean;\n\n /** The close-after-activate toggle. Default `true`; `false` keeps the menu open for repeated actions. */\n readonly canCloseOnSelect?: boolean;\n /** @deprecated Use `canCloseOnSelect`; this alias is removed next release. */\n readonly closeOnSelect?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onScopeDispose, shallowRef, useAttrs, watch } from 'vue';\nimport { cn } from '../../../foundation/styles';\nimport { dataAttr } from '../../../foundation/dom';\nimport { useId } from '../../../foundation/identifiers';\nimport { useMenuContext } from './MenuContext';\nimport { MenuExtensions } from './MenuExtensions';\nimport { MenuItemState as MenuItemStateToken, menuItemVariants } from './Menu.variants';\n\n/** Renders one activatable menu row; the arrow keys walk the enabled siblings. */\ndefineOptions({ name: 'MenuItem', inheritAttrs: false });\n\n/** The row content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\n/** `isDisabled` defaults to `undefined`, not `false` — an absent optional boolean must stay absent. */\nconst props = withDefaults(defineProps<MenuItemProps>(), {\n state: undefined,\n isDisabled: undefined,\n canCloseOnSelect: undefined,\n closeOnSelect: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the reader activates the row with Enter, Space, or a click; the menu closes after by default. */\n select: [];\n}>();\n\nconst attrs = useAttrs();\nconst menu = useMenuContext();\nconst id = useId();\nconst el = shallowRef<HTMLButtonElement | null>(null);\n\nconst itemState = computed(\n () => props.state ?? (props.isDisabled ? MenuItemStateToken.Disabled : MenuItemStateToken.Default),\n);\n\nconst classes = computed(() => cn(menuItemVariants({ state: itemState.value }), attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\n/* React re-registered from an effect keyed on `[ctx, id, isDisabled]`; the same\n two inputs are watched here, so a disabled toggle re-registers and the arrow\n walk sees it without a remount. */\nwatch(\n [el, () => props.isDisabled],\n ([node, isDisabled]) => {\n menu.registerItem({ id, el: node, disabled: isDisabled === true });\n },\n { immediate: true, flush: 'post' },\n);\n\nonScopeDispose(() => menu.unregisterItem(id));\n\n/** Emits `select`, then closes the menu tree unless the row keeps it open. */\nfunction activate(): void {\n emit('select');\n if (props.canCloseOnSelect ?? props.closeOnSelect ?? true) menu.close();\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented || props.isDisabled) return;\n if (menu.navigate(id, event)) return;\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n activate();\n }\n}\n\nfunction handleClick(event: MouseEvent): void {\n if (event.defaultPrevented || props.isDisabled) return;\n activate();\n}\n\n/** Moves focus to the row under a mouse pointer, so pointer and keyboard share one highlight. */\nfunction handlePointerMove(event: PointerEvent): void {\n if (!MenuExtensions.isMousePointer(event)) return;\n menu.hoverItem(null);\n if (props.isDisabled) menu.focusSurface();\n else MenuExtensions.focusRow(el.value);\n}\n\nfunction handlePointerLeave(event: PointerEvent): void {\n if (MenuExtensions.isMousePointer(event)) menu.focusSurface();\n}\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- Own attrs, then `v-bind=\"rest\"`, then own handlers last — a consumer's\n `click` / `keydown` handler therefore runs first, the order React got from\n calling `onClick?.(e)` ahead of its own logic, which is what makes the\n `defaultPrevented` check meaningful. -->\n <button\n ref=\"el\"\n type=\"button\"\n role=\"menuitem\"\n :disabled=\"isDisabled\"\n :aria-disabled=\"isDisabled || undefined\"\n :data-disabled=\"dataAttr(isDisabled)\"\n v-bind=\"rest\"\n :class=\"classes\"\n @click=\"handleClick\"\n @keydown=\"handleKeydown\"\n @pointermove=\"handlePointerMove\"\n @pointerleave=\"handlePointerLeave\"\n >\n <slot />\n </button>\n</template>\n","<script lang=\"ts\">\nimport type { MenuItemState } from './Menu.variants';\n\n/** Defines props for the checkable menu row. */\nexport interface MenuCheckboxItemProps {\n /** The checked state, controlled. The `v-model` binding target. */\n readonly modelValue?: boolean;\n\n /** The initial checked state when uncontrolled. Default `false`. */\n readonly defaultValue?: boolean;\n\n /** The mixed state — announces `aria-checked=\"mixed\"` and draws a dash; the next toggle checks the row. */\n readonly isIndeterminate?: boolean;\n\n /** The visual state of the row. */\n readonly state?: MenuItemState;\n\n /** The disabled state — blocks toggling. */\n readonly isDisabled?: boolean;\n\n /** The close-after-toggle toggle. Default `true`; `false` keeps the menu open to flip several rows. */\n readonly canCloseOnSelect?: boolean;\n /** @deprecated Use `canCloseOnSelect`; this alias is removed next release. */\n readonly closeOnSelect?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onScopeDispose, shallowRef, useAttrs, watch } from 'vue';\nimport { Check, Minus } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/styles';\nimport { dataAttr } from '../../../foundation/dom';\nimport { Icon } from '../../../foundation/icons';\nimport { useId } from '../../../foundation/identifiers';\nimport { useControlled } from '../../../foundation/state';\nimport { useMenuContext } from './MenuContext';\nimport { MenuExtensions } from './MenuExtensions';\nimport { MenuItemState as MenuItemStateToken, menuItemIndicatorVariants, menuItemVariants } from './Menu.variants';\n\n/** Renders a menu row that toggles one boolean option and marks it with a check. */\ndefineOptions({ name: 'MenuCheckboxItem', inheritAttrs: false });\n\ndefineSlots<{\n /** The row label. */\n default(): unknown;\n\n /** The check mark override; receives the current state. */\n indicator?(props: { checked: boolean; isIndeterminate: boolean }): unknown;\n}>();\n\n/* Explicit `undefined` defaults: `useControlled` keys on `=== undefined`, and Vue casts an absent\n `boolean` prop to `false`, which would select controlled mode for every row. */\nconst props = withDefaults(defineProps<MenuCheckboxItemProps>(), {\n modelValue: undefined,\n defaultValue: false,\n isIndeterminate: false,\n state: undefined,\n isDisabled: undefined,\n canCloseOnSelect: undefined,\n closeOnSelect: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the reader toggles the row — the `v-model` half. */\n 'update:modelValue': [checked: boolean];\n\n /** Fires after each toggle from Enter, Space or a click. */\n select: [];\n}>();\n\nconst attrs = useAttrs();\nconst menu = useMenuContext();\nconst id = useId();\nconst el = shallowRef<HTMLButtonElement | null>(null);\n\nconst controlled = useControlled<boolean>({\n controlled: () => props.modelValue,\n default: () => props.defaultValue,\n onChange: (next) => {\n emit('update:modelValue', next);\n },\n});\n\nconst isChecked = controlled.value;\n\n/** The `aria-checked` value — `mixed` while indeterminate. */\nconst ariaChecked = computed(() => (props.isIndeterminate ? 'mixed' : isChecked.value));\n\nconst itemState = computed(\n () => props.state ?? (props.isDisabled ? MenuItemStateToken.Disabled : MenuItemStateToken.Default),\n);\n\nconst classes = computed(() => cn(menuItemVariants({ state: itemState.value }), attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\n/** Registers the row with the menu's arrow walk; a disabled toggle re-registers it. */\nwatch(\n [el, () => props.isDisabled],\n ([node, isDisabled]) => {\n menu.registerItem({ id, el: node, disabled: isDisabled === true });\n },\n { immediate: true, flush: 'post' },\n);\n\nonScopeDispose(() => menu.unregisterItem(id));\n\n/** Toggles the row — a mixed row becomes checked — then closes the menu tree unless the row keeps it open. */\nfunction toggle(): void {\n controlled.setValue(props.isIndeterminate ? true : !isChecked.value);\n emit('select');\n if (props.canCloseOnSelect ?? props.closeOnSelect ?? true) menu.close();\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented || props.isDisabled) return;\n if (menu.navigate(id, event)) return;\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n toggle();\n }\n}\n\nfunction handleClick(event: MouseEvent): void {\n if (event.defaultPrevented || props.isDisabled) return;\n toggle();\n}\n\n/** Moves focus to the row under a mouse pointer, so pointer and keyboard share one highlight. */\nfunction handlePointerMove(event: PointerEvent): void {\n if (!MenuExtensions.isMousePointer(event)) return;\n menu.hoverItem(null);\n if (props.isDisabled) menu.focusSurface();\n else MenuExtensions.focusRow(el.value);\n}\n\nfunction handlePointerLeave(event: PointerEvent): void {\n if (MenuExtensions.isMousePointer(event)) menu.focusSurface();\n}\n\ndefineExpose({ el });\n</script>\n\n<template>\n <button\n ref=\"el\"\n type=\"button\"\n role=\"menuitemcheckbox\"\n :aria-checked=\"ariaChecked\"\n :disabled=\"isDisabled\"\n :aria-disabled=\"isDisabled || undefined\"\n :data-disabled=\"dataAttr(isDisabled)\"\n :data-state=\"isIndeterminate ? 'indeterminate' : isChecked ? 'checked' : 'unchecked'\"\n v-bind=\"rest\"\n :class=\"classes\"\n @click=\"handleClick\"\n @keydown=\"handleKeydown\"\n @pointermove=\"handlePointerMove\"\n @pointerleave=\"handlePointerLeave\"\n >\n <span :class=\"menuItemIndicatorVariants()\" aria-hidden=\"true\">\n <slot name=\"indicator\" :checked=\"isChecked\" :is-indeterminate=\"isIndeterminate\">\n <Icon v-if=\"isIndeterminate\" :icon=\"Minus\" :size=\"14\" />\n <Icon v-else-if=\"isChecked\" :icon=\"Check\" :size=\"14\" />\n </slot>\n </span>\n <slot />\n </button>\n</template>\n","<script lang=\"ts\">\n/** Defines props for the single-choice band of menu rows. */\nexport interface MenuRadioGroupProps {\n /** The selected value, controlled. The `v-model` binding target; `null` selects nothing. */\n readonly modelValue?: string | null;\n\n /** The initial selected value when uncontrolled. Default `null`. */\n readonly defaultValue?: string | null;\n\n /** The group heading. The `#label` slot is the rich override. */\n readonly label?: string | number;\n\n /** The disabled state — blocks every row in the group. */\n readonly isDisabled?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport { useId } from '../../../foundation/identifiers';\nimport { useControlled } from '../../../foundation/state';\nimport { MenuRadioGroupKey } from './MenuContext';\nimport { menuLabelVariants } from './Menu.variants';\n\n/** Renders a labelled `role=\"group\"` band whose `MenuRadioItem` rows choose exactly one value. */\ndefineOptions({ name: 'MenuRadioGroup', inheritAttrs: false });\n\ndefineSlots<{\n /** The `MenuRadioItem` rows. */\n default(): unknown;\n\n /** The rich override for the `label` prop. */\n label?(): unknown;\n}>();\n\n/* `modelValue` defaults to `undefined` so omission selects uncontrolled mode; `null` stays a real value. */\nconst props = withDefaults(defineProps<MenuRadioGroupProps>(), {\n modelValue: undefined,\n defaultValue: null,\n label: undefined,\n isDisabled: false,\n});\n\nconst emit = defineEmits<{\n /** Fires when the reader picks a row — the `v-model` half. */\n 'update:modelValue': [value: string | null];\n}>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst el = useTemplateRef<HTMLDivElement>('el');\nconst labelId = useId();\n\nconst controlled = useControlled<string | null>({\n controlled: () => props.modelValue,\n default: () => props.defaultValue,\n onChange: (next) => {\n emit('update:modelValue', next);\n },\n});\n\nconst hasLabel = computed(() => (props.label !== undefined && props.label !== '') || Boolean(slots.label));\n\nprovide(MenuRadioGroupKey, {\n value: controlled.value,\n select: (value) => controlled.setValue(value),\n isDisabled: computed(() => props.isDisabled),\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" role=\"group\" :aria-labelledby=\"hasLabel ? labelId : undefined\" v-bind=\"attrs\">\n <div v-if=\"hasLabel\" :id=\"labelId\" :class=\"menuLabelVariants()\">\n <slot name=\"label\">{{ props.label }}</slot>\n </div>\n <slot />\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { MenuItemState } from './Menu.variants';\n\n/** Defines props for one choice inside a `MenuRadioGroup`. */\nexport interface MenuRadioItemProps {\n /** The value this row selects. */\n readonly value: string;\n\n /** The visual state of the row. */\n readonly state?: MenuItemState;\n\n /** The disabled state — blocks selection. Falls back to the group's `isDisabled`. */\n readonly isDisabled?: boolean;\n\n /** The close-after-select toggle. Default `true`; `false` keeps the menu open. */\n readonly canCloseOnSelect?: boolean;\n /** @deprecated Use `canCloseOnSelect`; this alias is removed next release. */\n readonly closeOnSelect?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onScopeDispose, shallowRef, useAttrs, watch } from 'vue';\nimport { cn } from '../../../foundation/styles';\nimport { dataAttr } from '../../../foundation/dom';\nimport { useId } from '../../../foundation/identifiers';\nimport { useMenuContext, useMenuRadioGroupContext } from './MenuContext';\nimport { MenuExtensions } from './MenuExtensions';\nimport { MenuItemState as MenuItemStateToken, menuItemIndicatorVariants, menuItemVariants } from './Menu.variants';\n\n/** Renders one single-choice menu row that marks the group's selected value with a dot. */\ndefineOptions({ name: 'MenuRadioItem', inheritAttrs: false });\n\ndefineSlots<{\n /** The row label. */\n default(): unknown;\n\n /** The selection mark override; receives whether this row is selected. */\n indicator?(props: { checked: boolean }): unknown;\n}>();\n\n/* `isDisabled` defaults to `undefined` so the group's disabled state can apply. */\nconst props = withDefaults(defineProps<MenuRadioItemProps>(), {\n state: undefined,\n isDisabled: undefined,\n canCloseOnSelect: undefined,\n closeOnSelect: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires after the reader picks this row with Enter, Space or a click. */\n select: [];\n}>();\n\nconst attrs = useAttrs();\nconst menu = useMenuContext();\nconst group = useMenuRadioGroupContext();\nconst id = useId();\nconst el = shallowRef<HTMLButtonElement | null>(null);\n\n/** Whether this row is disabled by itself or through its group. */\nconst disabled = computed(() => props.isDisabled ?? group.isDisabled.value);\n\n/** Whether this row holds the group's value. */\nconst isChecked = computed(() => group.value.value === props.value);\n\nconst itemState = computed(\n () => props.state ?? (disabled.value ? MenuItemStateToken.Disabled : MenuItemStateToken.Default),\n);\n\nconst classes = computed(() => cn(menuItemVariants({ state: itemState.value }), attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\n/** Registers the row with the menu's arrow walk; a disabled toggle re-registers it. */\nwatch(\n [el, disabled],\n ([node, isDisabled]) => {\n menu.registerItem({ id, el: node, disabled: isDisabled });\n },\n { immediate: true, flush: 'post' },\n);\n\nonScopeDispose(() => menu.unregisterItem(id));\n\n/** Selects this row's value, then closes the menu tree unless the row keeps it open. */\nfunction choose(): void {\n group.select(props.value);\n emit('select');\n if (props.canCloseOnSelect ?? props.closeOnSelect ?? true) menu.close();\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented || disabled.value) return;\n if (menu.navigate(id, event)) return;\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n choose();\n }\n}\n\nfunction handleClick(event: MouseEvent): void {\n if (event.defaultPrevented || disabled.value) return;\n choose();\n}\n\n/** Moves focus to the row under a mouse pointer, so pointer and keyboard share one highlight. */\nfunction handlePointerMove(event: PointerEvent): void {\n if (!MenuExtensions.isMousePointer(event)) return;\n menu.hoverItem(null);\n if (disabled.value) menu.focusSurface();\n else MenuExtensions.focusRow(el.value);\n}\n\nfunction handlePointerLeave(event: PointerEvent): void {\n if (MenuExtensions.isMousePointer(event)) menu.focusSurface();\n}\n\ndefineExpose({ el });\n</script>\n\n<template>\n <button\n ref=\"el\"\n type=\"button\"\n role=\"menuitemradio\"\n :aria-checked=\"isChecked\"\n :disabled=\"disabled\"\n :aria-disabled=\"disabled || undefined\"\n :data-disabled=\"dataAttr(disabled)\"\n :data-state=\"isChecked ? 'checked' : 'unchecked'\"\n v-bind=\"rest\"\n :class=\"classes\"\n @click=\"handleClick\"\n @keydown=\"handleKeydown\"\n @pointermove=\"handlePointerMove\"\n @pointerleave=\"handlePointerLeave\"\n >\n <span :class=\"menuItemIndicatorVariants()\" aria-hidden=\"true\">\n <slot name=\"indicator\" :checked=\"isChecked\">\n <span v-if=\"isChecked\" class=\"size-2 rounded-full bg-current\" />\n </slot>\n </span>\n <slot />\n </button>\n</template>\n","<script lang=\"ts\">\n/** Defines props for a nested submenu; controlled axes use their canonical Vue model names. */\nexport interface MenuSubProps {\n /** The open state, controlled. The `v-model:open` binding target. */\n readonly open?: boolean;\n\n /** The initial open state when uncontrolled. Default `false`. */\n readonly defaultOpen?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { onScopeDispose, provide, shallowRef, watch } from 'vue';\nimport { useId } from '../../../foundation/identifiers';\nimport { useControlled } from '../../../foundation/state';\nimport { MenuSubKey, MenuSubOpenReason, useMenuContext } from './MenuContext';\n\n/**\n * Renders only its slot, owning the open state of one nested submenu — the `MenuSubTrigger` row and\n * the `MenuSubContent` surface below it. Opening it closes any sibling submenu of the same menu.\n */\ndefineOptions({ name: 'MenuSub', inheritAttrs: false });\n\n/** The submenu tree — one `MenuSubTrigger` and one `MenuSubContent`. */\ndefineSlots<{ default(): unknown }>();\n\n/** `open` defaults to `undefined` so an absent prop cannot read as an explicit `false`. */\nconst props = withDefaults(defineProps<MenuSubProps>(), {\n open: undefined,\n defaultOpen: false,\n});\n\nconst emit = defineEmits<{\n /** Fires when the submenu opens or closes — the `v-model:open` half. */\n 'update:open': [open: boolean];\n}>();\n\nconst menu = useMenuContext();\nconst id = useId();\nconst triggerId = useId();\nconst contentId = useId();\nconst triggerEl = shallowRef<HTMLElement | null>(null);\n\n/** @internal How the current open started, read once by the submenu surface when it mounts. */\nconst openReason: { current: MenuSubOpenReason } = { current: MenuSubOpenReason.Keyboard };\n\nconst controlled = useControlled<boolean>({\n controlled: () => props.open,\n default: () => props.defaultOpen,\n onChange: (value) => {\n emit('update:open', value);\n },\n});\n\n/** Syncs the parent menu's record of its open submenu, so opening a sibling closes this one. */\nwatch(\n controlled.value,\n (open) => {\n if (open) menu.trackSubmenu({ id, trigger: () => triggerEl.value, close: () => setOpen(false) });\n else menu.untrackSubmenu(id);\n },\n { immediate: true },\n);\n\nonScopeDispose(() => menu.untrackSubmenu(id));\n\n/** Requests the next open state and records how an open started. */\nfunction setOpen(open: boolean, reason: MenuSubOpenReason = MenuSubOpenReason.Keyboard): void {\n if (open) openReason.current = reason;\n controlled.setValue(open);\n}\n\nprovide(MenuSubKey, {\n id,\n open: controlled.value,\n setOpen,\n openReason,\n triggerEl,\n triggerId,\n contentId,\n});\n</script>\n\n<template>\n <slot />\n</template>\n","<script lang=\"ts\">\nimport type { MenuItemState } from './Menu.variants';\n\n/** Defines props for the row that opens a submenu. */\nexport interface MenuSubTriggerProps {\n /** The visual state of the row. */\n readonly state?: MenuItemState;\n\n /** The disabled state — the submenu cannot open. */\n readonly isDisabled?: boolean;\n}\n\n/** @internal How long the mouse rests on the row before its submenu opens, in ms. */\nconst OpenDelayMs = 100;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onScopeDispose, shallowRef, useAttrs, watch } from 'vue';\nimport { ChevronRight } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/styles';\nimport { dataAttr } from '../../../foundation/dom';\nimport { Icon } from '../../../foundation/icons';\nimport { MenuSubOpenReason, useMenuContext, useMenuSubContext } from './MenuContext';\nimport { MenuExtensions } from './MenuExtensions';\nimport { MenuItemState as MenuItemStateToken, menuItemVariants, menuSubIndicatorVariants } from './Menu.variants';\n\n/** Renders the menu row that opens its `MenuSub`'s submenu beside it, with a trailing chevron. */\ndefineOptions({ name: 'MenuSubTrigger', inheritAttrs: false });\n\n/** The row label. */\ndefineSlots<{ default(): unknown }>();\n\n/** `isDisabled` defaults to `undefined`, not `false` — an absent optional boolean must stay absent. */\nconst props = withDefaults(defineProps<MenuSubTriggerProps>(), {\n state: undefined,\n isDisabled: undefined,\n});\n\nconst attrs = useAttrs();\nconst menu = useMenuContext();\nconst sub = useMenuSubContext();\nconst el = shallowRef<HTMLButtonElement | null>(null);\n\n/* Lifted to a setup const so the template auto-unwraps it (a plain injected object does not). */\nconst isOpen = sub.open;\n\nlet openTimer: ReturnType<typeof setTimeout> | null = null;\n\nconst itemState = computed(\n () => props.state ?? (props.isDisabled ? MenuItemStateToken.Disabled : MenuItemStateToken.Default),\n);\n\nconst classes = computed(() =>\n cn(menuItemVariants({ state: itemState.value }), 'data-[state=open]:bg-muted', attrs.class as string | undefined),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\n/** Registers the row with the parent menu's arrow walk and publishes it as the submenu's anchor. */\nwatch(\n [el, () => props.isDisabled],\n ([node, isDisabled]) => {\n sub.triggerEl.value = node;\n menu.registerItem({ id: sub.triggerId, el: node, disabled: isDisabled === true });\n },\n { immediate: true, flush: 'post' },\n);\n\n/** Closes the submenu when its trigger becomes disabled. */\nwatch(\n () => props.isDisabled,\n (isDisabled) => {\n if (isDisabled && sub.open.value) sub.setOpen(false);\n },\n);\n\nonScopeDispose(() => {\n clearOpenTimer();\n menu.unregisterItem(sub.triggerId);\n});\n\n/** Cancels a pending hover open. */\nfunction clearOpenTimer(): void {\n if (openTimer === null) return;\n clearTimeout(openTimer);\n openTimer = null;\n}\n\n/** Focuses the first enabled row of the open submenu. */\nfunction focusFirstRow(): void {\n const content = el.value?.ownerDocument.getElementById(sub.contentId);\n content?.querySelector<HTMLElement>('[role^=\"menuitem\"]:not([disabled])')?.focus();\n}\n\n/** Opens the submenu from the keyboard, or moves into it when it is already open. */\nfunction openFromKeyboard(): void {\n clearOpenTimer();\n if (sub.open.value) focusFirstRow();\n else sub.setOpen(true, MenuSubOpenReason.Keyboard);\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented || props.isDisabled) return;\n if (menu.navigate(sub.triggerId, event)) return;\n const openKey = MenuExtensions.isRightToLeft(el.value) ? 'ArrowLeft' : 'ArrowRight';\n if (event.key === 'Enter' || event.key === ' ' || event.key === openKey) {\n event.preventDefault();\n openFromKeyboard();\n }\n}\n\nfunction handleClick(event: MouseEvent): void {\n if (event.defaultPrevented || props.isDisabled || sub.open.value) return;\n clearOpenTimer();\n sub.setOpen(true, MenuSubOpenReason.Pointer);\n}\n\n/** Highlights the row under a mouse pointer and opens its submenu after a short rest. */\nfunction handlePointerMove(event: PointerEvent): void {\n if (!MenuExtensions.isMousePointer(event) || props.isDisabled) return;\n menu.hoverItem(sub.id);\n MenuExtensions.focusRow(el.value);\n if (sub.open.value || openTimer !== null) return;\n openTimer = setTimeout(() => {\n openTimer = null;\n sub.setOpen(true, MenuSubOpenReason.Pointer);\n }, OpenDelayMs);\n}\n\n/** Cancels a pending open; an open submenu keeps its trigger highlighted while the pointer travels to it. */\nfunction handlePointerLeave(event: PointerEvent): void {\n if (!MenuExtensions.isMousePointer(event)) return;\n clearOpenTimer();\n if (!sub.open.value) menu.focusSurface();\n}\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- The id is bound after the fallthrough set: the submenu surface is named by it. -->\n <button\n ref=\"el\"\n type=\"button\"\n role=\"menuitem\"\n aria-haspopup=\"menu\"\n :aria-expanded=\"isOpen\"\n :aria-controls=\"isOpen ? sub.contentId : undefined\"\n :disabled=\"isDisabled\"\n :aria-disabled=\"isDisabled || undefined\"\n :data-disabled=\"dataAttr(isDisabled)\"\n :data-state=\"isOpen ? 'open' : 'closed'\"\n v-bind=\"rest\"\n :id=\"sub.triggerId\"\n :class=\"classes\"\n @click=\"handleClick\"\n @keydown=\"handleKeydown\"\n @pointermove=\"handlePointerMove\"\n @pointerleave=\"handlePointerLeave\"\n >\n <slot />\n <Icon :icon=\"ChevronRight\" :size=\"14\" :class=\"menuSubIndicatorVariants()\" />\n </button>\n</template>\n","<script lang=\"ts\">\nimport type {\n SurfaceElevation,\n SurfacePadding,\n SurfaceRadius,\n SurfaceTone,\n SurfaceVariant,\n} from '../../../foundation/styles';\n\n/**\n * Defines props for the submenu surface.\n *\n * The surface axes are spelled out rather than taken off `MenuProps`: the SFC compiler cannot\n * resolve an indexed access into another component's props.\n */\nexport interface MenuSubContentProps {\n /** The distance between the trigger row and the surface in px. Default 2. */\n readonly offset?: number;\n\n /** The visual recipe. Default `surface`. */\n readonly variant?: SurfaceVariant;\n\n /** The color tone the recipe is tinted with. */\n readonly tone?: SurfaceTone;\n\n /** The corner rounding. Default `md`. */\n readonly radius?: SurfaceRadius;\n\n /** The inner spacing step. Default `xs`. */\n readonly padding?: SurfacePadding;\n\n /** The shadow depth. */\n readonly elevation?: SurfaceElevation;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport type { Placement } from '@floating-ui/vue';\nimport Menu from './Menu.vue';\nimport { useMenuContext, useMenuSubContext } from './MenuContext';\nimport { MenuExtensions } from './MenuExtensions';\n\n/**\n * Renders the submenu surface beside its trigger row while the `MenuSub` is open. Selecting a row or\n * pressing Tab closes the whole menu tree; Escape or the inline-start arrow closes this level and\n * returns focus to the trigger.\n */\ndefineOptions({ name: 'MenuSubContent', inheritAttrs: false });\n\n/** The submenu rows. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<MenuSubContentProps>(), {\n offset: 2,\n variant: undefined,\n tone: undefined,\n radius: undefined,\n padding: undefined,\n elevation: undefined,\n});\n\nconst attrs = useAttrs();\nconst parent = useMenuContext();\nconst sub = useMenuSubContext();\n\n/* Lifted to a setup const so the template auto-unwraps it (a plain injected object does not). */\nconst isOpen = sub.open;\n\nconst anchor = computed(() => sub.triggerEl.value);\n\n/** The side the surface opens on — the trigger row's inline end. */\nconst placement = computed<Placement>(() =>\n MenuExtensions.isRightToLeft(sub.triggerEl.value) ? 'left-start' : 'right-start',\n);\n\n/** Closes this level when the surface asks to close. */\nfunction handleOpenChange(open: boolean): void {\n if (!open) sub.setOpen(false);\n}\n\n/** Holds the submenu open once the mouse reaches it. */\nfunction handlePointerEnter(event: PointerEvent): void {\n if (MenuExtensions.isMousePointer(event)) parent.holdSubmenu();\n}\n\n/** Returns focus to the trigger row when this level closes while it owns focus. */\nfunction triggerRow(): HTMLElement | null {\n return sub.triggerEl.value;\n}\n</script>\n\n<template>\n <!-- Mounted only while open: a closed submenu keeps no positioner, focus scope or dismiss layer.\n The id and name are bound after the fallthrough set — the trigger's aria-controls points at them. -->\n <Menu\n v-if=\"isOpen\"\n :open=\"isOpen\"\n :anchor=\"anchor\"\n :placement=\"placement\"\n :offset=\"props.offset\"\n :variant=\"props.variant\"\n :tone=\"props.tone\"\n :radius=\"props.radius\"\n :padding=\"props.padding\"\n :elevation=\"props.elevation\"\n :return-focus=\"triggerRow\"\n v-bind=\"attrs\"\n :id=\"sub.contentId\"\n :aria-labelledby=\"sub.triggerId\"\n @update:open=\"handleOpenChange\"\n @pointerenter=\"handlePointerEnter\"\n >\n <slot />\n </Menu>\n</template>\n","<script lang=\"ts\">\nexport interface MenuGroupProps {\n /** The group heading. React typed this `ReactNode`; the scalar form is the prop and `#label` is the rich override. */\n readonly label?: string | number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport { useId } from '../../../foundation/identifiers';\nimport { menuLabelVariants } from './Menu.variants';\n\n/** Renders a labelled `role=\"group\"` band of menu items. */\ndefineOptions({ name: 'MenuGroup', inheritAttrs: false });\n\ndefineSlots<{\n /** The grouped items — React's `children`. */\n default(): unknown;\n\n /** The rich override for the `label` prop. */\n label?(): unknown;\n}>();\n\nconst props = defineProps<MenuGroupProps>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst el = useTemplateRef<HTMLDivElement>('el');\nconst labelId = useId();\n\nconst hasLabel = computed(() => Boolean(props.label) || Boolean(slots.label));\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- React passed `className` straight through (no `cn` merge) and spread the\n rest after it; `v-bind=\"attrs\"` is the same single pass-through. -->\n <div ref=\"el\" role=\"group\" :aria-labelledby=\"hasLabel ? labelId : undefined\" v-bind=\"attrs\">\n <div v-if=\"hasLabel\" :id=\"labelId\" :class=\"menuLabelVariants()\">\n <slot name=\"label\">{{ props.label }}</slot>\n </div>\n <slot />\n </div>\n</template>\n","<script lang=\"ts\">\n/**\n * The prop surface of `MenuLabel`.\n *\n * React declared `HTMLAttributes<HTMLDivElement>`; attributes reach the root\n * through `useAttrs` here and `children` is the default slot, which leaves no\n * declared prop.\n */\nexport type MenuLabelProps = Record<string, never>;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/styles';\nimport { menuLabelVariants } from './Menu.variants';\n\n/** Renders a standalone heading row inside a menu — no `role`, purely visual. */\ndefineOptions({ name: 'MenuLabel', inheritAttrs: false });\n\n/** The label content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst classes = computed(() => cn(menuLabelVariants(), attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" v-bind=\"rest\" :class=\"classes\"><slot /></div>\n</template>\n","<script lang=\"ts\">\n/**\n * The prop surface of `MenuSeparator`.\n *\n * React declared `HTMLAttributes<HTMLDivElement>`; attributes reach the root\n * through `useAttrs` here, which leaves no declared prop.\n */\nexport type MenuSeparatorProps = Record<string, never>;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/styles';\nimport { menuSeparatorVariants } from './Menu.variants';\n\n/** Renders the hairline rule between menu sections. */\ndefineOptions({ name: 'MenuSeparator', inheritAttrs: false });\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\n/* React spread `{...props}` *after* its own `className`, so a consumer's class\n replaced the recipe outright; `cn` reproduces that precedence through\n tailwind-merge rather than concatenating the two. */\nconst classes = computed(() => cn(menuSeparatorVariants(), attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" role=\"separator\" v-bind=\"rest\" :class=\"classes\" />\n</template>\n","import { inject, type ComputedRef, type InjectionKey, type Ref, type ShallowRef } from 'vue';\nimport type { Placement } from '@floating-ui/vue';\n\n/**\n * The value shared with `DropdownMenuTrigger` / `DropdownMenuContent`.\n *\n * React carried the trigger twice — a ref for imperative focus and a state copy\n * so anchored content re-rendered once the ref attached. A `shallowRef` is\n * already reactive, so one field covers both here.\n */\nexport interface DropdownMenuContextValue {\n /** The resolved open state. Writable — an assignment routes through `setOpen`. */\n open: Ref<boolean>;\n setOpen: (open: boolean) => void;\n\n /** The trigger element — the positioning anchor and the focus-return target. */\n triggerEl: ShallowRef<HTMLElement | null>;\n\n /**\n * Which item takes focus on open — the trigger arms it per gesture\n * (APG menu-button pattern: ArrowUp → last). A plain mutable box, not a ref:\n * it is a one-shot signal between two handlers, never rendered.\n */\n openFocus: { current: 'first' | 'last' };\n\n placement: ComputedRef<Placement>;\n offset: ComputedRef<number>;\n}\n\nexport const dropdownMenuContextKey: InjectionKey<DropdownMenuContextValue> = Symbol('wow-two.dropdownMenu');\n\nexport function useDropdownMenuContext(): DropdownMenuContextValue {\n const context = inject(dropdownMenuContextKey, null);\n if (!context) throw new Error('DropdownMenu.* must be used inside <DropdownMenu>');\n return context;\n}\n","<script lang=\"ts\">\nimport type { Placement } from '@floating-ui/vue';\n\n/** Controlled axes use their canonical Vue model names; each update event requests caller state. */\nexport interface DropdownMenuProps {\n /** The open state, controlled. The `v-model:open` binding target. */\n readonly open?: boolean;\n\n /** The initial open state when uncontrolled. Default `false`. */\n readonly defaultOpen?: boolean;\n\n /** The Floating UI placement. Default `bottom-start`. */\n readonly placement?: Placement;\n\n /** The distance between trigger and menu in px. Default 6. */\n readonly offset?: number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, shallowRef } from 'vue';\nimport { useControlled } from '../../../foundation/state';\nimport { dropdownMenuContextKey } from './DropdownMenuContext';\n\n/**\n * Renders only its slot, owning the open state and placement of the DropdownMenu tree below.\n * React returned a bare context Provider, which has no element of its own.\n */\ndefineOptions({ name: 'DropdownMenu', inheritAttrs: false });\n\n/** The DropdownMenu tree — `DropdownMenuTrigger` and `DropdownMenuContent`. React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\n/** `open` default to `undefined` so an absent prop cannot read as an explicit `false`. */\nconst props = withDefaults(defineProps<DropdownMenuProps>(), {\n open: undefined,\n defaultOpen: false,\n placement: 'bottom-start',\n offset: 6,\n});\n\nconst emit = defineEmits<{\n /** Fires when the menu opens or closes — the `v-model:open` half. */\n 'update:open': [open: boolean];\n}>();\n\nconst controlled = useControlled<boolean>({\n controlled: () => props.open,\n default: () => props.defaultOpen,\n onChange: (value) => {\n emit('update:open', value);\n },\n});\n\nprovide(dropdownMenuContextKey, {\n open: controlled.value,\n setOpen: controlled.setValue,\n triggerEl: shallowRef<HTMLElement | null>(null),\n openFocus: { current: 'first' },\n placement: computed(() => props.placement),\n offset: computed(() => props.offset),\n});\n</script>\n\n<template>\n <slot />\n</template>\n","// Domain-internal helpers for `nav/`. Not exported from the group barrel —\n// the \"internal\" signal is absence from `index.ts`, not the file name.\n\n/** Extends `nav/` with the DOM-node reads its triggers share. */\nexport const NavExtensions = {\n /**\n * The DOM node behind a template ref, or `null`.\n *\n * The `typeof` guard is load-bearing rather than defensive. Every trigger here\n * seeds its anchor element from a `watch(..., { immediate: true, flush: 'post' })`,\n * and Vue runs an *immediate* watcher once during SSR — where `HTMLElement` is\n * not a global, so a bare `value instanceof HTMLElement` throws `ReferenceError`\n * and takes the whole server render down. Returning `null` on the server is\n * correct as well as safe: there is no element to anchor to until hydration.\n */\n toHtmlElement(value: unknown): HTMLElement | null {\n const node = value as HTMLElement | null;\n const elementType = node?.ownerDocument?.defaultView?.HTMLElement;\n return elementType && node instanceof elementType ? node : null;\n },\n /** Native and ARIA inactive controls cannot open menus or receive roving focus. */\n isDisabled(node: HTMLElement | null): boolean {\n return !node || node.matches(':disabled,[aria-disabled=\"true\"],[data-disabled]');\n },\n} as const;\n","<script lang=\"ts\">\n/**\n * The prop surface of `DropdownMenuTrigger`.\n *\n * React declared `extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>`;\n * attributes reach the root through `useAttrs` here, so only `asChild` remains.\n */\nexport interface DropdownMenuTriggerProps {\n /** The as-child toggle — renders the trigger as its single slot child (e.g. `<Button>`). */\n readonly asChild?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { resolveElement } from '../../../foundation/dom';\nimport { computed, useAttrs, useTemplateRef, watch, type ComponentPublicInstance } from 'vue';\nimport { Primitive } from '../../../foundation/primitives';\nimport { NavExtensions } from '../NavExtensions';\nimport { useDropdownMenuContext } from './DropdownMenuContext';\n\n/** Renders the button that toggles the enclosing `DropdownMenu` and anchors its panel. */\ndefineOptions({ name: 'DropdownMenuTrigger', inheritAttrs: false });\n\n/** The trigger content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\n/* Not bound to a `props` const: with every reference now in the template — where the bare\n name compiles to `$props`, which survives a setup throw — the binding would be unused. */\nwithDefaults(defineProps<DropdownMenuTriggerProps>(), { asChild: false });\n\nconst attrs = useAttrs();\nconst context = useDropdownMenuContext();\nconst inner = useTemplateRef<ComponentPublicInstance>('inner');\n\n/* Lifted to a setup const so the template auto-unwraps it (a plain injected object does not). */\nconst isOpen = context.open;\n\nwatch(\n inner,\n (instance) => {\n context.triggerEl.value = NavExtensions.toHtmlElement(instance?.$el);\n },\n { immediate: true, flush: 'post' },\n);\n\nfunction handleClick(event: MouseEvent): void {\n if (event.defaultPrevented) return;\n context.openFocus.current = 'first';\n context.setOpen(!context.open.value);\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented) return;\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp' || event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n // APG menu-button pattern: ArrowUp-open focuses the last item.\n context.openFocus.current = event.key === 'ArrowUp' ? 'last' : 'first';\n context.setOpen(true);\n }\n}\n\n/** `Primitive` renders the real element, so its `$el` is this component's root. */\nconst el = computed(() => resolveElement(inner.value));\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- Own attrs, then `v-bind=\"attrs\"`, then own handlers last — Vue chains the\n caller's handler first and ours second, React's `onClick?.(e)` order, which\n is what makes the `defaultPrevented` opt-out work. -->\n <Primitive\n ref=\"inner\"\n as=\"button\"\n :as-child=\"asChild\"\n type=\"button\"\n aria-haspopup=\"menu\"\n :aria-expanded=\"isOpen\"\n :data-state=\"isOpen ? 'open' : 'closed'\"\n v-bind=\"attrs\"\n @click=\"handleClick\"\n @keydown=\"handleKeydown\"\n >\n <slot />\n </Primitive>\n</template>\n","<script lang=\"ts\">\n/**\n * The prop surface of `DropdownMenuContent`.\n *\n * React declared `className` and `'aria-label'`; both are fallthrough attrs\n * here. `class` lands on the animated panel (as React's did), everything else —\n * `aria-label` above all — is relayed to `Menu`, which puts it on the menu\n * surface. A declared `'aria-label'` would arrive as `props.ariaLabel` and never\n * render, so it stays an attr.\n */\nexport type DropdownMenuContentProps = Record<string, never>;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, shallowRef, useAttrs, watch } from 'vue';\nimport { cn } from '../../../foundation/styles';\nimport { useReducedMotion } from '../../../foundation/device';\nimport { Presence } from '../../../foundation/primitives';\nimport Menu from '../menu/Menu.vue';\nimport { useDropdownMenuContext } from './DropdownMenuContext';\n\n/**\n * Renders the animated panel handed to `Menu` as its child. `Presence` clones `data-state`\n * (\"open\" | \"closed\") onto the panel div, so the pop tokens below run gated on\n * that state.\n */\ndefineOptions({ name: 'DropdownMenuContent', inheritAttrs: false });\n\n/** The menu contents — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst context = useDropdownMenuContext();\nconst reducedMotion = useReducedMotion();\n\n/* Lifted to setup consts so the template auto-unwraps them (a plain injected object does not). */\nconst isOpen = context.open;\nconst anchor = computed(() => context.triggerEl.value);\nconst placement = context.placement;\nconst offset = context.offset;\n\nconst panelEl = shallowRef<HTMLElement | null>(null);\n\n/* Keep `Menu` (positioner / focus scope / dismiss layer) mounted while the\n pop-out plays — `Menu` unmounts with this component, which would kill the exit.\n Opening flips this true synchronously; closing defers the unmount until the\n panel's exit animation ends (`animationend` below). Under reduced motion no\n animation fires, so drop it on the next frame instead. Presence removing the\n closed panel also drops it (`setPanel` below): an exit that never animates —\n a close inside the enter frames, or no animation support — must not leave an\n empty, focus-trapping surface behind. */\nconst mounted = shallowRef(context.open.value);\n\nwatch(\n [() => context.open.value, reducedMotion],\n ([open, isReduced], _previous, onCleanup) => {\n if (open) {\n mounted.value = true;\n return;\n }\n if (!isReduced) return;\n /* `immediate: true` makes this watcher run during SSR too, where there is no\n `requestAnimationFrame`. */\n if (typeof requestAnimationFrame === 'undefined') return;\n const raf = requestAnimationFrame(() => {\n mounted.value = false;\n });\n onCleanup(() => cancelAnimationFrame(raf));\n },\n { immediate: true, flush: 'post' },\n);\n\n/* ArrowUp-open focuses the LAST enabled row of any kind — plain, checkbox, radio or submenu\n trigger (APG menu-button pattern); the trigger arms `openFocus` per gesture and this consumes\n it. Other opens leave it at 'first' and FocusScope's default first-tabbable autofocus applies. */\nfunction focusLastEnabledItem(panel: HTMLElement): void {\n if (context.openFocus.current !== 'last') return;\n context.openFocus.current = 'first';\n const items = panel.querySelectorAll<HTMLElement>('[role^=\"menuitem\"]:not([disabled])');\n items[items.length - 1]?.focus();\n}\n\n/* Both the mount path (panel enters the DOM a commit after `mounted` flips) and\n the reopen path (an open while the exit animation still has the panel mounted,\n which fires no fresh ref) are the same watch here — React needed a callback ref\n plus a second effect to cover them separately. */\nwatch(\n [panelEl, () => context.open.value],\n ([panel, open]) => {\n if (!panel || !open) return;\n focusLastEnabledItem(panel);\n },\n { flush: 'post' },\n);\n\nfunction setPanel(node: unknown): void {\n panelEl.value = (node ?? null) as HTMLElement | null;\n /* The panel left the DOM after its exit: drop `Menu` with it. */\n if (node === null && !context.open.value) mounted.value = false;\n}\n\nfunction handleClose(): void {\n context.setOpen(false);\n}\n\nfunction handleAnimationEnd(): void {\n /* Drop `Menu` once the exit animation completes. */\n if (!context.open.value) mounted.value = false;\n}\n\nconst panelClasses = computed(() =>\n cn(\n /* pop (fade + slight scale) gated on data-state; motion-safe so\n reduced-motion users get no movement. */\n 'motion-safe:data-[state=open]:animate-(--animate-pop-in)',\n 'motion-safe:data-[state=closed]:animate-(--animate-pop-out)',\n 'motion-reduce:animate-none',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class` — relayed to `Menu`, which lands `aria-label` on the surface. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n</script>\n\n<template>\n <Menu\n v-if=\"mounted\"\n :open=\"mounted\"\n :anchor=\"anchor\"\n :placement=\"placement\"\n :offset=\"offset\"\n v-bind=\"rest\"\n @update:open=\"handleClose\"\n >\n <Presence :is-present=\"isOpen\">\n <div :ref=\"setPanel\" :class=\"panelClasses\" @animationend=\"handleAnimationEnd\">\n <slot />\n </div>\n </Presence>\n </Menu>\n</template>\n","import { inject, type InjectionKey, type ShallowRef } from 'vue';\n\n/** The value shared with `ContextMenuTrigger` / `ContextMenuContent`. */\nexport interface ContextMenuContextValue {\n open: ShallowRef<boolean>;\n setOpen: (open: boolean) => void;\n\n /** The zero-size virtual element the menu anchors to, positioned at the gesture's coordinates. */\n anchor: ShallowRef<HTMLElement | null>;\n setAnchor: (el: HTMLElement | null) => void;\n\n triggerEl: ShallowRef<HTMLElement | null>;\n\n /**\n * Element to hand focus back to on close — captured before the open gesture\n * moves focus. A plain mutable box, not a ref: it is a one-shot signal\n * between handlers, never rendered.\n */\n restoreFocus: { current: HTMLElement | null };\n}\n\nexport const contextMenuContextKey: InjectionKey<ContextMenuContextValue> = Symbol('wow-two.contextMenu');\n\nexport function useContextMenuContext(): ContextMenuContextValue {\n const context = inject(contextMenuContextKey, null);\n if (!context) throw new Error('ContextMenu.* must be used inside <ContextMenu>');\n return context;\n}\n","<script lang=\"ts\">\n/**\n * The prop surface of `ContextMenu`.\n *\n * React declared only `children`, which is the default slot here — leaving no\n * declared prop. The root owns its open state outright; there is no controlled\n * form to mirror.\n */\nexport type ContextMenuProps = Record<string, never>;\n</script>\n\n<script setup lang=\"ts\">\nimport { onScopeDispose, provide, shallowRef } from 'vue';\nimport { contextMenuContextKey } from './ContextMenuContext';\n\n/**\n * Renders only its slot, owning the open state and anchor point of the ContextMenu tree below.\n * React returned a bare context Provider, which has no element of its own.\n */\ndefineOptions({ name: 'ContextMenu', inheritAttrs: false });\n\n/** The ContextMenu tree — `ContextMenuTrigger` and `ContextMenuContent`. React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst open = shallowRef(false);\nconst anchor = shallowRef<HTMLElement | null>(null);\nconst triggerEl = shallowRef<HTMLElement | null>(null);\nconst restoreFocus: { current: HTMLElement | null } = { current: null };\n\n/** Detaches the outgoing body-appended virtual anchor before adopting the new one. */\nfunction setAnchor(el: HTMLElement | null): void {\n const previous = anchor.value;\n if (previous && previous.parentNode === previous.ownerDocument.body) {\n previous.remove();\n }\n anchor.value = el;\n}\n\nfunction setOpen(next: boolean): void {\n if (next && !open.value) {\n const document = triggerEl.value?.ownerDocument;\n const active = document?.activeElement;\n restoreFocus.current ??= active && 'focus' in active ? (active as HTMLElement) : triggerEl.value;\n }\n open.value = next;\n if (!next) setAnchor(null);\n}\n\nonScopeDispose(() => setAnchor(null));\n\nprovide(contextMenuContextKey, { open, setOpen, anchor, setAnchor, triggerEl, restoreFocus });\n</script>\n\n<template>\n <slot />\n</template>\n","<script lang=\"ts\">\n/**\n * The prop surface of `ContextMenuTrigger`.\n *\n * React declared `extends HTMLAttributes<HTMLDivElement>`; attributes reach the\n * root through `useAttrs` here, which leaves `asChild` and `isDisabled`.\n */\nexport interface ContextMenuTriggerProps {\n /** The as-child toggle — renders the trigger as its single slot child. */\n readonly asChild?: boolean;\n\n /** The disabled state — blocks both the right-click and the long-press open. */\n readonly isDisabled?: boolean;\n}\n\n/** The long-press duration, in ms, that opens the menu on touch. */\nconst LongPressMs = 600;\n\n/** Build a zero-size virtual element at coordinates to anchor Floating UI. */\nfunction makeVirtualAnchor(x: number, y: number, document: Document): HTMLElement {\n const el = document.createElement('div');\n el.style.position = 'fixed';\n el.style.left = `${x}px`;\n el.style.top = `${y}px`;\n el.style.width = '0px';\n el.style.height = '0px';\n el.style.pointerEvents = 'none';\n document.body.appendChild(el);\n return el;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { resolveElement } from '../../../foundation/dom';\nimport { computed, onScopeDispose, useAttrs, useTemplateRef, watch, type ComponentPublicInstance } from 'vue';\nimport { Primitive } from '../../../foundation/primitives';\nimport { NavExtensions } from '../NavExtensions';\nimport { useContextMenuContext } from './ContextMenuContext';\n\n/** Renders the region a right-click, or a touch long-press, opens the menu over. */\ndefineOptions({ name: 'ContextMenuTrigger', inheritAttrs: false });\n\n/** The region's content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\n/** `isDisabled` defaults to `undefined`, not `false` — an absent optional boolean must stay absent. */\nconst props = withDefaults(defineProps<ContextMenuTriggerProps>(), {\n asChild: false,\n isDisabled: undefined,\n});\n\nconst attrs = useAttrs();\nconst context = useContextMenuContext();\nconst inner = useTemplateRef<ComponentPublicInstance>('inner');\n\nlet longPressTimer: ReturnType<typeof setTimeout> | null = null;\nlet pointerFocusCaptured = false;\nlet pressOrigin: { x: number; y: number; pointerId: number } | null = null;\n\nwatch(\n inner,\n (instance) => {\n context.triggerEl.value = NavExtensions.toHtmlElement(instance?.$el);\n },\n { immediate: true, flush: 'post' },\n);\n\nfunction clearLongPress(): void {\n if (longPressTimer) clearTimeout(longPressTimer);\n longPressTimer = null;\n pressOrigin = null;\n}\n\n// Clear a pending long-press timer if the trigger unmounts mid-press.\nonScopeDispose(clearLongPress);\n\nfunction captureReturnFocus(): void {\n if (context.open.value) return;\n const document = el.value?.ownerDocument;\n const active = document?.activeElement;\n context.restoreFocus.current =\n active && active !== document?.body && 'focus' in active ? (active as HTMLElement) : el.value;\n}\n\nfunction openAt(x: number, y: number): void {\n const document = el.value?.ownerDocument;\n if (!document || props.isDisabled) return;\n context.setAnchor(makeVirtualAnchor(x, y, document));\n context.setOpen(true);\n}\n\nfunction handleContextMenu(event: MouseEvent): void {\n clearLongPress();\n if (event.defaultPrevented || props.isDisabled) return;\n event.preventDefault();\n if (!pointerFocusCaptured) captureReturnFocus();\n pointerFocusCaptured = false;\n openAt(event.clientX, event.clientY);\n}\n\nfunction handlePointerDown(event: PointerEvent): void {\n clearLongPress();\n if (event.defaultPrevented || props.isDisabled) return;\n pointerFocusCaptured = event.button === 2 || event.pointerType === 'touch';\n if (pointerFocusCaptured) captureReturnFocus();\n if (event.pointerType !== 'touch' || !event.isPrimary) return;\n const x = event.clientX;\n const y = event.clientY;\n pressOrigin = { x, y, pointerId: event.pointerId };\n longPressTimer = setTimeout(() => {\n clearLongPress();\n openAt(x, y);\n }, LongPressMs);\n}\n\nfunction handlePointerMove(event: PointerEvent): void {\n if (!pressOrigin || event.pointerId !== pressOrigin.pointerId) return;\n if (Math.hypot(event.clientX - pressOrigin.x, event.clientY - pressOrigin.y) > 8) clearLongPress();\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented || event.isComposing || props.isDisabled) return;\n if (event.key !== 'ContextMenu' && !(event.shiftKey && event.key === 'F10')) return;\n event.preventDefault();\n clearLongPress();\n captureReturnFocus();\n const rect = el.value?.getBoundingClientRect();\n if (rect) openAt(rect.left, rect.bottom);\n}\n\nwatch(\n () => props.isDisabled,\n (disabled) => {\n if (disabled) clearLongPress();\n },\n);\n\n/** `Primitive` renders the real element, so its `$el` is this component's root. */\nconst el = computed(() => resolveElement(inner.value));\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- `v-bind=\"attrs\"` before the own handlers, so a consumer's `contextmenu` /\n `pointerdown` handler runs first — React's `onContextMenu?.(e)` order,\n which is what makes the `defaultPrevented` opt-out work. -->\n <Primitive\n ref=\"inner\"\n as=\"div\"\n :as-child=\"asChild\"\n :tabindex=\"props.isDisabled ? -1 : 0\"\n aria-haspopup=\"menu\"\n :aria-expanded=\"context.open.value\"\n :aria-disabled=\"props.isDisabled || undefined\"\n v-bind=\"attrs\"\n @contextmenu=\"handleContextMenu\"\n @pointerdown=\"handlePointerDown\"\n @pointermove=\"handlePointerMove\"\n @keydown=\"handleKeydown\"\n @pointerup=\"clearLongPress\"\n @pointercancel=\"clearLongPress\"\n >\n <slot />\n </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { Placement } from '@floating-ui/vue';\n\n/**\n * The prop surface of `ContextMenuContent`.\n *\n * React declared `className` and `'aria-label'` alongside these; both are\n * fallthrough attrs here and are relayed to `Menu`, which lands `aria-label` on\n * the menu surface. A declared `'aria-label'` would arrive as `props.ariaLabel`\n * and never render, so it stays an attr. `placement` is `Placement` rather than\n * an indexed access into `MenuProps`, which the SFC compiler cannot resolve.\n */\nexport interface ContextMenuContentProps {\n /** The Floating UI placement. Default `bottom-start`. */\n readonly placement?: Placement;\n\n /** The distance between the gesture point and the menu in px. Default 2. */\n readonly offset?: number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport { cn } from '../../../foundation/styles';\nimport Menu from '../menu/Menu.vue';\nimport { useContextMenuContext } from './ContextMenuContext';\n\n/** Renders the menu surface, anchored to the point the gesture happened at. */\ndefineOptions({ name: 'ContextMenuContent', inheritAttrs: false });\n\n/** The menu contents — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\n/* Not bound to a `props` const: with every reference now in the template — where the bare\n name compiles to `$props`, which survives a setup throw — the binding would be unused. */\nwithDefaults(defineProps<ContextMenuContentProps>(), {\n placement: 'bottom-start',\n offset: 2,\n});\n\nconst attrs = useAttrs();\nconst context = useContextMenuContext();\n\n/* Lifted to setup consts so the template auto-unwraps them (a plain injected object does not). */\nconst isOpen = context.open;\nconst anchor = context.anchor;\n\n/* Enter-only pop: the surface mounts when `open` flips true, so the anim fires\n once on mount. motion-safe gates it for reduced-motion. (Exit anim is owned by\n the shared `Menu`'s Presence gate.) */\nconst classes = computed(() => cn('motion-safe:animate-(--animate-pop-in)', attrs.class as string | undefined));\n\n/** Everything but `class` — relayed to `Menu`, which lands `aria-label` on the surface. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n</script>\n\n<template>\n <Menu\n :open=\"isOpen\"\n :anchor=\"anchor\"\n :return-focus=\"() => context.restoreFocus.current\"\n :placement=\"placement\"\n :offset=\"offset\"\n v-bind=\"rest\"\n :class=\"classes\"\n @update:open=\"context.setOpen(false)\"\n >\n <slot />\n </Menu>\n</template>\n","import { inject, type ComputedRef, type InjectionKey, type Ref, type ShallowRef } from 'vue';\n\n/** One registered menu trigger — the unit `moveAcross` walks. */\nexport interface MenubarTriggerEntry {\n id: string;\n el: HTMLButtonElement | null;\n}\n\n/** The bar-level seam: which menu is open, and how focus moves between triggers. */\nexport interface MenubarContextValue {\n /** The id of the currently-open menu, or `null` if none. */\n activeId: Ref<string | null>;\n setActiveId: (id: string | null) => void;\n\n registerTrigger: (id: string, el: HTMLButtonElement | null) => void;\n unregisterTrigger: (id: string) => void;\n\n /** Focuses the trigger adjacent to `fromId`; switches the open menu when one is open. */\n moveAcross: (fromId: string, direction: 1 | -1) => void;\n}\n\nexport const menubarContextKey: InjectionKey<MenubarContextValue> = Symbol('wow-two.menubar');\n\nexport function useMenubarContext(): MenubarContextValue {\n const context = inject(menubarContextKey, null);\n if (!context) throw new Error('Menubar.* must be used inside <Menubar>');\n return context;\n}\n\n/**\n * The per-menu seam.\n *\n * React carried the trigger twice — a ref for imperative focus and a state copy\n * so anchored content re-rendered once the ref attached. A `shallowRef` is\n * already reactive, so one field covers both here.\n */\nexport interface MenubarMenuContextValue {\n id: string;\n open: ComputedRef<boolean>;\n setOpen: (open: boolean) => void;\n\n /** The trigger element — the positioning anchor and the focus-return target. */\n triggerEl: ShallowRef<HTMLButtonElement | null>;\n}\n\nexport const menubarMenuContextKey: InjectionKey<MenubarMenuContextValue> = Symbol('wow-two.menubarMenu');\n\nexport function useMenubarMenuContext(): MenubarMenuContextValue {\n const context = inject(menubarMenuContextKey, null);\n if (!context) throw new Error('MenubarTrigger / MenubarContent must be used inside <MenubarMenu>');\n return context;\n}\n","import { tv, type VariantProps } from '../../../foundation/styles';\n\nexport const menubarVariants = tv({\n base: 'flex items-center gap-1 rounded-md border border-border bg-background p-1',\n});\n\nexport const menubarTriggerVariants = tv({\n base: 'inline-flex select-none items-center rounded-sm px-3 py-1 text-sm font-medium text-foreground outline-hidden transition-colors hover:bg-muted focus-visible:bg-muted data-[state=open]:bg-muted',\n});\n\nexport type MenubarVariants = VariantProps<typeof menubarVariants>;\n","<script lang=\"ts\">\n/**\n * The prop surface of `Menubar`.\n *\n * React declared `extends Omit<HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'onChange'>`;\n * attributes reach the root through `useAttrs` here, which leaves the active-menu\n * value pair. React's `onValueChange` is the `update:modelValue` emit.\n */\nexport interface MenubarProps {\n /** The id of the currently-open menu, or `null` if none. Controlled. */\n readonly modelValue?: string | null;\n\n /** The initially-open menu id when uncontrolled. Default `null`. */\n readonly defaultValue?: string | null;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, useAttrs, useTemplateRef } from 'vue';\nimport { NavExtensions } from '../NavExtensions';\nimport { DomOrderExtensions } from '../../../foundation/dom';\nimport { cn } from '../../../foundation/styles';\nimport { useControlled } from '../../../foundation/state';\nimport { RovingFocusGroup, type ComponentElement } from '../../../foundation/primitives';\nimport { menubarContextKey, type MenubarTriggerEntry } from './MenubarContext';\nimport { menubarVariants } from './Menubar.variants';\n\n/** Renders the application menu bar — one composite tab stop holding a single menu open at a time. */\ndefineOptions({ name: 'Menubar', inheritAttrs: false });\n\n/** The `MenubarMenu` children — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\n/** `modelValue` defaults to `undefined` — the tri-state that separates \"controlled to null\" from \"uncontrolled\". */\nconst props = withDefaults(defineProps<MenubarProps>(), {\n modelValue: undefined,\n defaultValue: null,\n});\n\nconst emit = defineEmits<{\n /** Fires when the reader opens a different menu — carries its id, or `null` once all close. */\n 'update:modelValue': [value: string | null];\n}>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<ComponentElement>('el');\n\nconst { value: activeId, setValue: setActiveId } = useControlled<string | null>({\n controlled: () => props.modelValue,\n default: () => props.defaultValue,\n onChange: (next) => emit('update:modelValue', next),\n});\n\n/** Plain array, not reactive — the ordering is read imperatively, exactly as React's `useRef` list was. */\nconst triggers: Array<MenubarTriggerEntry> = [];\n\nfunction registerTrigger(id: string, triggerEl: HTMLButtonElement | null): void {\n const index = triggers.findIndex((t) => t.id === id);\n if (index >= 0) triggers[index] = { id, el: triggerEl };\n else triggers.push({ id, el: triggerEl });\n}\n\nfunction unregisterTrigger(id: string): void {\n const index = triggers.findIndex((t) => t.id === id);\n if (index >= 0) triggers.splice(index, 1);\n}\n\nfunction moveAcross(fromId: string, direction: 1 | -1): void {\n const ordered = DomOrderExtensions.inDocumentOrder(triggers, (item) => item.el).filter(\n (item) => !NavExtensions.isDisabled(item.el),\n );\n const index = ordered.findIndex((t) => t.id === fromId);\n if (index === -1) return;\n const root = rootElement.value;\n const rtl = root && root.ownerDocument.defaultView?.getComputedStyle(root).direction === 'rtl';\n let nextIndex = index + (rtl ? -direction : direction);\n if (nextIndex < 0) nextIndex = ordered.length - 1;\n if (nextIndex >= ordered.length) nextIndex = 0;\n const next = ordered[nextIndex];\n if (!next) return;\n next.el?.focus();\n // If a menu is already open, switch the open menu to follow focus.\n if (activeId.value !== null) setActiveId(next.id);\n}\n\nprovide(menubarContextKey, {\n activeId,\n setActiveId,\n registerTrigger,\n unregisterTrigger,\n moveAcross,\n});\n\nconst classes = computed(() => cn(menubarVariants(), attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\n/** Exposes the child's documented DOM handle, never its component instance. */\nconst rootElement = computed<HTMLElement | null>(() => {\n const node = el.value?.el;\n const elementType = node?.ownerDocument.defaultView?.HTMLElement;\n return elementType && node instanceof elementType ? node : null;\n});\n\ndefineExpose({ el: rootElement });\n</script>\n\n<template>\n <!-- Roving tabindex (APG): the menubar is a single composite tab stop — one\n trigger holds tabindex 0, arrows / Home / End rove focus. `role` falls\n through and replaces the primitive's own `role=\"group\"`. -->\n <RovingFocusGroup ref=\"el\" orientation=\"horizontal\" can-loop role=\"menubar\" v-bind=\"rest\" :class=\"classes\">\n <slot />\n </RovingFocusGroup>\n</template>\n","<script lang=\"ts\">\nexport interface MenubarMenuProps {\n /** The stable id for this menu — used for active-menu tracking. */\n readonly value: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, shallowRef } from 'vue';\nimport { menubarMenuContextKey, useMenubarContext } from './MenubarContext';\n\n/**\n * Renders only its slot, pairing one `MenubarTrigger` with its `MenubarContent`.\n * React returned a bare context Provider, which has no element of its own.\n */\ndefineOptions({ name: 'MenubarMenu', inheritAttrs: false });\n\n/** The `MenubarTrigger` and `MenubarContent` pair — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = defineProps<MenubarMenuProps>();\n\nconst bar = useMenubarContext();\n\nprovide(menubarMenuContextKey, {\n get id() {\n return props.value;\n },\n open: computed(() => bar.activeId.value === props.value),\n setOpen: (next: boolean) => bar.setActiveId(next ? props.value : null),\n triggerEl: shallowRef<HTMLButtonElement | null>(null),\n});\n</script>\n\n<template>\n <slot />\n</template>\n","<script lang=\"ts\">\n/**\n * The prop surface of `MenubarTrigger`.\n *\n * React declared `extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>`;\n * attributes reach the root through `useAttrs` here and `children` is the default\n * slot, which leaves no declared prop.\n */\nexport type MenubarTriggerProps = Record<string, never>;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, shallowRef, useAttrs, watch } from 'vue';\nimport { NavExtensions } from '../NavExtensions';\nimport { cn } from '../../../foundation/styles';\nimport { useRovingFocusItem } from '../../../foundation/primitives';\nimport { useMenubarContext, useMenubarMenuContext } from './MenubarContext';\nimport { menubarTriggerVariants } from './Menubar.variants';\n\n/** Renders one `role=\"menuitem\"` button in the bar, and anchors its menu. */\ndefineOptions({ name: 'MenubarTrigger', inheritAttrs: false });\n\n/** The trigger label — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst bar = useMenubarContext();\nconst menu = useMenubarMenuContext();\n\n// Roving tab stop — one trigger is tabbable; the stop follows focus.\n// Reactive object: read its members, never destructure them.\nconst item = useRovingFocusItem();\n\nconst el = shallowRef<HTMLButtonElement | null>(null);\n\n/* One element, three consumers of `ref` — the roving group needs the node, the\n menu context anchors to it, and `defineExpose` publishes it. React composed\n them with `composeRefs`; this is the same composition. */\nfunction setRef(node: unknown): void {\n const button = (node ?? null) as HTMLButtonElement | null;\n el.value = button;\n menu.triggerEl.value = button;\n item.ref(node);\n}\n\nwatch(\n [() => menu.id, el],\n ([id, node], _, onCleanup) => {\n bar.registerTrigger(id, node);\n onCleanup(() => bar.unregisterTrigger(id));\n },\n { immediate: true, flush: 'post' },\n);\n\n/* Lifted to a setup const so the template auto-unwraps it (a plain injected object does not). */\nconst isOpen = menu.open;\n\nfunction handleClick(event: MouseEvent): void {\n if (event.defaultPrevented || NavExtensions.isDisabled(el.value)) return;\n menu.setOpen(!menu.open.value);\n}\n\nfunction handlePointerEnter(): void {\n if (NavExtensions.isDisabled(el.value)) return;\n // If any menu is open, moving the pointer onto a trigger switches the active menu.\n if (bar.activeId.value !== null && bar.activeId.value !== menu.id) {\n bar.setActiveId(menu.id);\n }\n}\n\nfunction handleFocus(): void {\n // The roving stop follows focus — however it arrived (arrows, moveAcross from\n // an open popup, focus return on close).\n item.onFocus();\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.isComposing) return;\n if (event.defaultPrevented || NavExtensions.isDisabled(el.value)) return;\n switch (event.key) {\n case 'ArrowDown':\n case 'Enter':\n case ' ':\n event.preventDefault();\n menu.setOpen(true);\n return;\n case 'ArrowRight':\n case 'ArrowLeft':\n // A menu is open → switching semantics: focus AND open state move to the\n // adjacent menu together.\n if (bar.activeId.value !== null) {\n event.preventDefault();\n bar.moveAcross(menu.id, event.key === 'ArrowRight' ? 1 : -1);\n return;\n }\n break;\n }\n // Closed menubar: arrows / Home / End rove the single tab stop\n // (disabled triggers skipped, RTL-aware).\n item.onKeydown(event);\n}\n\nconst classes = computed(() => cn(menubarTriggerVariants(), attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- Own attrs, then `v-bind=\"rest\"`, then own handlers last — a consumer's\n handler therefore runs first, the order React got from calling\n `onClick?.(e)` ahead of its own logic. -->\n <button\n type=\"button\"\n role=\"menuitem\"\n aria-haspopup=\"menu\"\n :aria-expanded=\"isOpen\"\n :data-state=\"isOpen ? 'open' : 'closed'\"\n :tabindex=\"item.tabindex\"\n :data-roving-focus-item=\"true\"\n v-bind=\"rest\"\n :ref=\"setRef\"\n :class=\"classes\"\n @click=\"handleClick\"\n @pointerenter=\"handlePointerEnter\"\n @focus=\"handleFocus\"\n @keydown=\"handleKeydown\"\n >\n <slot />\n </button>\n</template>\n","<script lang=\"ts\">\nimport type { Placement } from '@floating-ui/vue';\n\n/**\n * The prop surface of `MenubarContent`.\n *\n * React declared `className` and `'aria-label'` alongside these; both are\n * fallthrough attrs here and are relayed to `Menu`, which merges `class` and\n * lands `aria-label` on the menu surface. A declared `'aria-label'` would arrive\n * as `props.ariaLabel` and never render, so it stays an attr. `placement` is\n * `Placement` rather than an indexed access into `MenuProps`, which the SFC\n * compiler cannot resolve.\n */\nexport interface MenubarContentProps {\n /** The Floating UI placement. Default `bottom-start`. */\n readonly placement?: Placement;\n\n /** The distance between trigger and menu in px. Default 4. */\n readonly offset?: number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport Menu from '../menu/Menu.vue';\nimport { useMenubarContext, useMenubarMenuContext } from './MenubarContext';\n\n/** Renders the menu surface for one bar entry. */\ndefineOptions({ name: 'MenubarContent', inheritAttrs: false });\n\n/** The menu contents — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\n/* Not bound to a `props` const: with every reference now in the template — where the bare\n name compiles to `$props`, which survives a setup throw — the binding would be unused. */\nwithDefaults(defineProps<MenubarContentProps>(), {\n placement: 'bottom-start',\n offset: 4,\n});\n\nconst attrs = useAttrs();\nconst bar = useMenubarContext();\nconst menu = useMenubarMenuContext();\n\n/* Lifted to setup consts so the template auto-unwraps them (a plain injected object does not). */\nconst isOpen = menu.open;\nconst anchor = computed(() => menu.triggerEl.value);\n\nfunction handleClose(): void {\n menu.setOpen(false);\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented || event.isComposing) return;\n // Arrow across menus while a popup is open — close current, open adjacent.\n switch (event.key) {\n case 'ArrowRight':\n event.preventDefault();\n bar.moveAcross(menu.id, 1);\n break;\n case 'ArrowLeft':\n event.preventDefault();\n bar.moveAcross(menu.id, -1);\n break;\n }\n}\n</script>\n\n<template>\n <!-- `v-bind=\"attrs\"` carries `class` and `aria-label` straight to `Menu`, which\n merges the first through `cn` and lands the second on the surface. -->\n <Menu\n :open=\"isOpen\"\n :anchor=\"anchor\"\n :placement=\"placement\"\n :offset=\"offset\"\n v-bind=\"attrs\"\n @update:open=\"handleClose\"\n @keydown=\"handleKeydown\"\n >\n <slot />\n </Menu>\n</template>\n","import { inject, type ComputedRef, type InjectionKey, type Ref, type ShallowRef } from 'vue';\n\n/** The root-level seam: which item's panel is open. */\nexport interface NavigationMenuContextValue {\n activeId: Ref<string | null>;\n setActiveId: (id: string | null) => void;\n}\n\nexport const navigationMenuContextKey: InjectionKey<NavigationMenuContextValue> = Symbol('wow-two.navigationMenu');\n\nexport function useNavigationMenuContext(): NavigationMenuContextValue {\n const context = inject(navigationMenuContextKey, null);\n if (!context) throw new Error('NavigationMenu.* must be used inside <NavigationMenu>');\n return context;\n}\n\n/**\n * The per-item seam.\n *\n * React carried the trigger as a ref only and read `.current` from the content;\n * a `shallowRef` is reactive, so the anchored panel re-positions once the node\n * attaches without the extra state copy React needed.\n */\nexport interface NavigationMenuItemContextValue {\n value: string;\n open: ComputedRef<boolean>;\n triggerEl: ShallowRef<HTMLElement | null>;\n contentId: string;\n triggerId: string;\n}\n\nexport const navigationMenuItemContextKey: InjectionKey<NavigationMenuItemContextValue> =\n Symbol('wow-two.navigationMenuItem');\n\nexport function useNavigationMenuItemContext(): NavigationMenuItemContextValue {\n const context = inject(navigationMenuItemContextKey, null);\n if (!context) {\n throw new Error('NavigationMenuTrigger / NavigationMenuContent must be used inside <NavigationMenuItem>');\n }\n return context;\n}\n","<script lang=\"ts\">\n/**\n * The prop surface of `NavigationMenu`.\n *\n * React declared `extends Omit<HTMLAttributes<HTMLElement>, 'defaultValue'>` and\n * read `'aria-label'` off it (defaulting to `Main navigation`). A declared\n * `'aria-label'` would arrive as `props.ariaLabel` and never render, so it stays\n * a fallthrough attr — the default is applied from `useAttrs` below.\n */\nexport interface NavigationMenuProps {\n /** The value of the item whose panel is open, or `null` if none. Controlled. */\n readonly modelValue?: string | null;\n\n /** The initially-open item value when uncontrolled. Default `null`. */\n readonly defaultValue?: string | null;\n}\n\n/** The accessible name used when the consumer supplies no `aria-label`. */\nconst DefaultAriaLabel = 'Main navigation';\n</script>\n\n<script setup lang=\"ts\">\nimport { useLocale } from '../../../foundation/i18n';\nimport { computed, provide, useAttrs, useTemplateRef } from 'vue';\nimport { AriaAttribute } from '../../../foundation/dom';\nimport { cn } from '../../../foundation/styles';\nimport { useControlled } from '../../../foundation/state';\nimport { navigationMenuContextKey } from './NavigationMenuContext';\n\nconst locale = useLocale();\n\n/** Renders the top-level site navigation bar, holding one expandable panel open at a time. */\ndefineOptions({ name: 'NavigationMenu', inheritAttrs: false });\n\n/** The `NavigationMenuList` tree — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\n/** `modelValue` defaults to `undefined` — the tri-state that separates \"controlled to null\" from \"uncontrolled\". */\nconst props = withDefaults(defineProps<NavigationMenuProps>(), {\n modelValue: undefined,\n defaultValue: null,\n});\n\nconst emit = defineEmits<{\n /** Fires when the reader opens a different item — carries its value, or `null` once all close. */\n 'update:modelValue': [value: string | null];\n}>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLElement>('el');\n\nconst { value: activeId, setValue: setActiveId } = useControlled<string | null>({\n controlled: () => props.modelValue,\n default: () => props.defaultValue,\n onChange: (next) => emit('update:modelValue', next),\n});\n\nprovide(navigationMenuContextKey, { activeId, setActiveId });\n\nconst ariaLabel = computed(\n () =>\n (attrs[AriaAttribute.Label] as string | undefined) ?? locale.t('NavigationMenu.label', undefined, DefaultAriaLabel),\n);\n\nconst classes = computed(() => cn('relative', attrs.class as string | undefined));\n\n/** Everything but `class` and `aria-label`, both re-applied above. */\nconst rest = computed(() => {\n const { class: _class, [AriaAttribute.Label]: _ariaLabel, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <nav ref=\"el\" :aria-label=\"ariaLabel\" v-bind=\"rest\" :class=\"classes\"><slot /></nav>\n</template>\n","<script lang=\"ts\">\n/**\n * The prop surface of `NavigationMenuList`.\n *\n * React declared `extends HTMLAttributes<HTMLDivElement>` plus `children`;\n * attributes reach the root through `useAttrs` here and `children` is the\n * default slot, which leaves no declared prop.\n */\nexport type NavigationMenuListProps = Record<string, never>;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/styles';\nimport { RovingFocusGroup, type ComponentElement } from '../../../foundation/primitives';\n\n/** Renders the horizontal strip of items; arrow-key navigation comes from `RovingFocusGroup`. */\ndefineOptions({ name: 'NavigationMenuList', inheritAttrs: false });\n\n/** The `NavigationMenuItem` children — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<ComponentElement>('el');\n\nconst classes = computed(() => cn('flex items-center gap-1', attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\n/** Exposes the child's documented DOM handle, never its component instance. */\nconst rootElement = computed<HTMLElement | null>(() => {\n const node = el.value?.el;\n const elementType = node?.ownerDocument.defaultView?.HTMLElement;\n return elementType && node instanceof elementType ? node : null;\n});\n\ndefineExpose({ el: rootElement });\n</script>\n\n<template>\n <!-- `role` falls through and replaces the primitive's own `role=\"group\"`. -->\n <RovingFocusGroup ref=\"el\" orientation=\"horizontal\" can-loop role=\"list\" v-bind=\"rest\" :class=\"classes\">\n <slot />\n </RovingFocusGroup>\n</template>\n","<script lang=\"ts\">\nexport interface NavigationMenuItemProps {\n /** The stable id for active-state tracking. Required when item has a Trigger + Content. */\n readonly value: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, shallowRef, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/styles';\nimport { useId } from '../../../foundation/identifiers';\nimport { navigationMenuItemContextKey, useNavigationMenuContext } from './NavigationMenuContext';\n\n/** Renders one `<li>` of the strip, pairing a trigger or link with its content panel. */\ndefineOptions({ name: 'NavigationMenuItem', inheritAttrs: false });\n\n/** The trigger / link and optional content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = defineProps<NavigationMenuItemProps>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLLIElement>('el');\nconst nav = useNavigationMenuContext();\n\nprovide(navigationMenuItemContextKey, {\n get value() {\n return props.value;\n },\n open: computed(() => nav.activeId.value === props.value),\n triggerEl: shallowRef<HTMLElement | null>(null),\n contentId: useId(),\n triggerId: useId(),\n});\n\n/* `list-none` is load-bearing, not cosmetic. `NavigationMenuList` renders a `<div\n role=\"list\">` (it wraps `RovingFocusGroup`), so this `<li>` has no `ul`/`ol`\n parent — and Tailwind preflight only resets `list-style` on `ul`/`ol`. The\n orphan keeps the UA's `list-item` display and drew a disc: `• Products ⌄`. */\nconst classes = computed(() => cn('relative list-none', attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- `role` sits before `v-bind=\"rest\"` so a consumer-supplied one wins. An `<li>`\n only maps to `listitem` under a `ul`/`ol`/`menu` parent; under the list div it\n would leave `role=\"list\"` with no children, so the role is stated. -->\n <li ref=\"el\" role=\"listitem\" v-bind=\"rest\" :class=\"classes\"><slot /></li>\n</template>\n","<script lang=\"ts\">\n/**\n * The prop surface of `NavigationMenuTrigger`.\n *\n * React declared `extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>`;\n * attributes reach the root through `useAttrs` here and `children` is the default\n * slot, which leaves no declared prop.\n */\nexport type NavigationMenuTriggerProps = Record<string, never>;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, shallowRef, useAttrs } from 'vue';\nimport { ChevronDown } from 'lucide-vue-next';\nimport { NavExtensions } from '../NavExtensions';\nimport { cn } from '../../../foundation/styles';\nimport { useRovingFocusItem } from '../../../foundation/primitives';\nimport { useNavigationMenuContext, useNavigationMenuItemContext } from './NavigationMenuContext';\n\n/** Renders the button that expands an item's panel, and anchors the panel's position. */\ndefineOptions({ name: 'NavigationMenuTrigger', inheritAttrs: false });\n\n/** The trigger label — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst nav = useNavigationMenuContext();\nconst item = useNavigationMenuItemContext();\n\n// Reactive object: read its members, never destructure them.\nconst roving = useRovingFocusItem();\n\nconst el = shallowRef<HTMLButtonElement | null>(null);\n\n/* One element, three consumers of `ref` — the roving group needs the node, the\n item context anchors the panel to it, and `defineExpose` publishes it. React\n composed them in a single callback ref; this is the same composition. */\nfunction setRef(node: unknown): void {\n const button = (node ?? null) as HTMLButtonElement | null;\n el.value = button;\n item.triggerEl.value = button;\n roving.ref(node);\n}\n\n/* Lifted to a setup const so the template auto-unwraps it (a plain injected object does not). */\nconst isOpen = item.open;\n\n/* Set when a pointer hover-swap opened this panel. With a real pointer the\n `pointerenter` swap always precedes the click, so without this guard the click\n would land on an already-open trigger and toggle it straight back closed\n (Radix guards the same way). Cleared on pointerleave: once the pointer leaves,\n the next click is a deliberate toggle again. Plain mutable box, never rendered. */\nlet wasOpenedByPointer = false;\n\nfunction handleClick(event: MouseEvent): void {\n if (event.defaultPrevented || NavExtensions.isDisabled(el.value)) return;\n if (wasOpenedByPointer) {\n // The hover-swap just opened this panel — keep it open.\n wasOpenedByPointer = false;\n return;\n }\n nav.setActiveId(item.open.value ? null : item.value);\n}\n\nfunction handlePointerEnter(): void {\n if (NavExtensions.isDisabled(el.value)) return;\n if (nav.activeId.value !== null && nav.activeId.value !== item.value) {\n nav.setActiveId(item.value);\n wasOpenedByPointer = true;\n }\n}\n\nfunction handlePointerLeave(): void {\n wasOpenedByPointer = false;\n}\n\nfunction handleFocus(): void {\n roving.onFocus();\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.isComposing) return;\n if (event.defaultPrevented || NavExtensions.isDisabled(el.value)) return;\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n nav.setActiveId(item.value);\n void nextTick(() => {\n if (!item.open.value || NavExtensions.isDisabled(el.value)) return;\n const panel = el.value?.ownerDocument.getElementById(item.contentId);\n panel?.querySelector<HTMLElement>('a[href],button:not(:disabled),[tabindex=\"0\"]')?.focus();\n });\n return;\n }\n roving.onKeydown(event);\n}\n\nconst classes = computed(() =>\n cn(\n 'inline-flex items-center gap-1 rounded-md px-3 py-1.5 text-sm font-medium text-foreground transition-colors hover:bg-muted focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring data-[state=open]:bg-muted',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- Own attrs, then `v-bind=\"rest\"`, then own handlers last — a consumer's\n handler therefore runs first, the order React got from calling\n `onClick?.(e)` ahead of its own logic. -->\n <button\n :id=\"item.triggerId\"\n type=\"button\"\n aria-haspopup=\"true\"\n :aria-expanded=\"isOpen\"\n :aria-controls=\"item.contentId\"\n :data-state=\"isOpen ? 'open' : 'closed'\"\n :tabindex=\"roving.tabindex\"\n :data-roving-focus-item=\"true\"\n v-bind=\"rest\"\n :ref=\"setRef\"\n :class=\"classes\"\n @click=\"handleClick\"\n @pointerenter=\"handlePointerEnter\"\n @pointerleave=\"handlePointerLeave\"\n @focus=\"handleFocus\"\n @keydown=\"handleKeydown\"\n >\n <slot />\n <ChevronDown :class=\"cn('h-4 w-4 transition-transform', isOpen && 'rotate-180')\" />\n </button>\n</template>\n","<script lang=\"ts\">\n/**\n * The prop surface of `NavigationMenuContent`.\n *\n * React declared `extends HTMLAttributes<HTMLDivElement>` plus `children`;\n * attributes reach the panel through `useAttrs` here and `children` is the\n * default slot, which leaves no declared prop.\n */\nexport type NavigationMenuContentProps = Record<string, never>;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, shallowRef, useAttrs, watch } from 'vue';\nimport { cn, surfaceVariants } from '../../../foundation/styles';\nimport { useReducedMotion } from '../../../foundation/device';\nimport { AnchoredPositioner, DismissableLayer, Portal, Presence } from '../../../foundation/primitives';\nimport { useNavigationMenuContext, useNavigationMenuItemContext } from './NavigationMenuContext';\n\n/**\n * Renders the anchored panel for one item. `Presence` clones `data-state`\n * (\"open\" | \"closed\") onto the panel div, so the pop tokens below run gated on\n * that state.\n */\ndefineOptions({ name: 'NavigationMenuContent', inheritAttrs: false });\n\n/** The panel content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst nav = useNavigationMenuContext();\nconst item = useNavigationMenuItemContext();\nconst reducedMotion = useReducedMotion();\n\n/* Lifted to setup consts so the template auto-unwraps them (a plain injected object does not). */\nconst isOpen = item.open;\nconst anchor = computed(() => item.triggerEl.value);\n\nconst el = shallowRef<HTMLElement | null>(null);\n\n/* Keep the positioner / dismiss layer mounted while the pop-out plays — the\n stack unmounts with this component, which would kill the exit. Opening flips\n this true synchronously; closing defers the unmount until the panel's exit\n animation ends (`animationend` below). Under reduced motion no animation\n fires, so drop it on the next frame instead. */\nconst mounted = shallowRef(item.open.value);\n\nwatch(\n [() => item.open.value, reducedMotion],\n ([open, isReduced], _previous, onCleanup) => {\n if (open) {\n mounted.value = true;\n return;\n }\n if (!isReduced) return;\n /* `immediate: true` makes this watcher run during SSR too, where there is no\n `requestAnimationFrame`. */\n if (typeof requestAnimationFrame === 'undefined') return;\n const raf = requestAnimationFrame(() => {\n mounted.value = false;\n });\n onCleanup(() => cancelAnimationFrame(raf));\n },\n { immediate: true, flush: 'post' },\n);\n\nfunction handleClose(): void {\n if (el.value?.contains(el.value.ownerDocument.activeElement)) item.triggerEl.value?.focus();\n nav.setActiveId(null);\n}\n\nfunction handleOutsidePointerDown(event: PointerEvent): void {\n if (item.triggerEl.value?.contains(event.target as Node)) return;\n nav.setActiveId(null);\n}\n\nfunction handleAnimationEnd(): void {\n /* Drop the positioner stack once the exit animation completes. */\n if (!item.open.value) mounted.value = false;\n}\n\nfunction setPanel(node: unknown): void {\n el.value = (node ?? null) as HTMLElement | null;\n}\n\nconst classes = computed(() =>\n cn(\n /* pop (fade + slight scale) gated on data-state; motion-safe so\n reduced-motion users get no movement. */\n 'min-w-[12rem] outline-hidden',\n 'motion-safe:data-[state=open]:animate-(--animate-pop-in)',\n 'motion-safe:data-[state=closed]:animate-(--animate-pop-out)',\n 'motion-reduce:animate-none',\n surfaceVariants({ variant: 'raised', radius: 'md', padding: 'md' }),\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <Portal v-if=\"mounted\">\n <AnchoredPositioner :anchor=\"anchor\" placement=\"bottom-start\" :offset=\"6\" class=\"z-dropdown\">\n <DismissableLayer :on-escape=\"handleClose\" :on-outside-pointer-down=\"handleOutsidePointerDown\">\n <Presence :is-present=\"isOpen\">\n <div\n :id=\"item.contentId\"\n :aria-labelledby=\"item.triggerId\"\n v-bind=\"rest\"\n :ref=\"setPanel\"\n :class=\"classes\"\n @animationend=\"handleAnimationEnd\"\n >\n <slot />\n </div>\n </Presence>\n </DismissableLayer>\n </AnchoredPositioner>\n </Portal>\n</template>\n","<script lang=\"ts\">\n/**\n * The prop surface of `NavigationMenuLink`.\n *\n * React declared `extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'children'>`;\n * attributes reach the root through `useAttrs` here and `children` is the default\n * slot, which leaves no declared prop.\n */\nexport type NavigationMenuLinkProps = Record<string, never>;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, shallowRef, useAttrs } from 'vue';\nimport { cn } from '../../../foundation/styles';\nimport { useRovingFocusItem } from '../../../foundation/primitives';\n\n/** Renders a plain link that joins the strip's roving tab stop. */\ndefineOptions({ name: 'NavigationMenuLink', inheritAttrs: false });\n\n/** The link content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\n\n// Reactive object: read its members, never destructure them.\nconst roving = useRovingFocusItem();\n\nconst el = shallowRef<HTMLAnchorElement | null>(null);\n\nfunction setRef(node: unknown): void {\n el.value = (node ?? null) as HTMLAnchorElement | null;\n roving.ref(node);\n}\n\nfunction handleFocus(): void {\n roving.onFocus();\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented) return;\n roving.onKeydown(event);\n}\n\nconst classes = computed(() =>\n cn(\n 'inline-flex items-center rounded-md px-3 py-1.5 text-sm font-medium text-foreground transition-colors hover:bg-muted hover:underline-offset-2 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <a\n :tabindex=\"roving.tabindex\"\n :data-roving-focus-item=\"true\"\n v-bind=\"rest\"\n :ref=\"setRef\"\n :class=\"classes\"\n @focus=\"handleFocus\"\n @keydown=\"handleKeydown\"\n >\n <slot />\n </a>\n</template>\n","import { onMounted, shallowRef, toValue, watch, type MaybeRefOrGetter, type ShallowRef } from 'vue';\n\n/**\n * The `useScrollSpy` tuning knobs.\n *\n * Every field is a `MaybeRefOrGetter` — pass a getter (`() => props.rootMargin`)\n * so a change re-creates the observer, the job React's effect dependency array did.\n * `ScrollSpy`'s own props are the plain-value mirror of this shape.\n */\nexport interface UseScrollSpyOptions {\n rootMargin?: MaybeRefOrGetter<string | undefined>;\n threshold?: MaybeRefOrGetter<number | ReadonlyArray<number> | undefined>;\n /** Element to observe within. Defaults to viewport. */\n root?: MaybeRefOrGetter<Element | Document | null | undefined>;\n}\n\n/**\n * Track which of `ids` is currently the topmost in-view section.\n * Uses `IntersectionObserver` — the returned ref holds `null` until the first\n * intersection.\n */\nexport function useScrollSpy(\n ids: MaybeRefOrGetter<ReadonlyArray<string>>,\n options: UseScrollSpyOptions = {},\n): Readonly<ShallowRef<string | null>> {\n const activeId = shallowRef<string | null>(null);\n const mounted = shallowRef(false);\n onMounted(() => {\n mounted.value = true;\n });\n\n watch(\n [\n () => [...toValue(ids)],\n () => toValue(options.rootMargin) ?? '0px 0px -60% 0px',\n () => toValue(options.threshold) ?? 0,\n () => toValue(options.root) ?? null,\n mounted,\n ],\n ([idList, rootMargin, threshold, root, isMounted], _previous, onCleanup) => {\n activeId.value = null;\n if (!isMounted) return;\n /* `immediate: true` makes this watcher run during SSR too (Vue skips only the\n non-immediate post-flush ones), where neither `document` nor\n `IntersectionObserver` exists. */\n if (typeof document === 'undefined' || typeof IntersectionObserver === 'undefined' || idList.length === 0) {\n return;\n }\n\n let active = true;\n const seen = new Map<string, number>(); // id → top offset\n const elements = idList.map((id) => document.getElementById(id)).filter((el): el is HTMLElement => el != null);\n\n const observer = new IntersectionObserver(\n (entries) => {\n if (!active) return;\n for (const e of entries) {\n if (e.isIntersecting) {\n seen.set(e.target.id, e.boundingClientRect.top);\n } else {\n seen.delete(e.target.id);\n }\n }\n if (seen.size === 0) {\n activeId.value = null;\n return;\n }\n // Pick the section whose top is closest to (but above) the rootMargin band.\n let bestId: string | null = null;\n let bestTop = Number.POSITIVE_INFINITY;\n for (const [id, top] of seen) {\n if (top < bestTop) {\n bestTop = top;\n bestId = id;\n }\n }\n activeId.value = bestId;\n },\n /* `IntersectionObserverInit.threshold` is spelled `number[]`; the option keeps the readonly form for\n callers, and the observer only reads the list. */\n { rootMargin, threshold: threshold as number | Array<number>, root },\n );\n\n for (const el of elements) observer.observe(el);\n onCleanup(() => {\n active = false;\n observer.disconnect();\n });\n },\n { immediate: true, flush: 'post' },\n );\n\n return activeId;\n}\n","<script lang=\"ts\">\n/**\n * The prop surface of `ScrollSpy`.\n *\n * React declared `extends UseScrollSpyOptions`; that interface carries\n * `MaybeRefOrGetter` fields here (the house composable contract), which a prop\n * cannot hold, so the plain-value mirror is spelled out instead.\n */\nexport interface ScrollSpyProps {\n readonly ids: ReadonlyArray<string>;\n readonly rootMargin?: string;\n readonly threshold?: number | ReadonlyArray<number>;\n /** Element to observe within. Defaults to viewport. */\n readonly root?: Element | Document | null;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { watch } from 'vue';\nimport { useScrollSpy } from './UseScrollSpy';\n\n/**\n * Renders nothing by default — hands the topmost in-view section's id to its default slot.\n * The scoped-slot variant of `useScrollSpy`; the id also leaves through `active-change`.\n */\ndefineOptions({ name: 'ScrollSpy' });\n\ndefineSlots<{\n /** React's render-prop `children` — receives the currently-active section id. */\n default?(props: { activeId: string | null }): unknown;\n}>();\n\nconst props = defineProps<ScrollSpyProps>();\n\nconst emit = defineEmits<{\n /** Fires when a different section becomes the topmost in view; fires once on mount as well. */\n 'active-change': [id: string | null];\n}>();\n\nconst activeId = useScrollSpy(() => props.ids, {\n rootMargin: () => props.rootMargin,\n threshold: () => props.threshold,\n root: () => props.root,\n});\n\nwatch(activeId, (id) => emit('active-change', id), { immediate: true, flush: 'post' });\n</script>\n\n<template>\n <slot v-bind=\"{ activeId }\" />\n</template>\n","<script lang=\"ts\">\nexport interface TableOfContentsItem {\n readonly id: string;\n\n /** The item's label — scalar; an array item carries no rich content. The `#label` slot is the rich override. */\n readonly label: string | number;\n\n /** Indent level. 0 = top, 1 = nested, … */\n readonly depth?: number;\n}\n\nexport interface TableOfContentsProps {\n readonly items?: ReadonlyArray<TableOfContentsItem>;\n\n /**\n * The element whose headings are auto-extracted. React took a `RefObject`;\n * Vue template refs unwrap to the element itself, so pass the element\n * (`sourceRef` from `useTemplateRef`).\n */\n readonly source?: HTMLElement | null;\n\n /** The CSS selector used with `source`. Default `h2, h3`. */\n readonly headingSelector?: string;\n\n /** The override for the auto-derived active id. `undefined` keeps the derived value. */\n readonly activeId?: string | null;\n\n /** The sticky toggle — applies `sticky top-4 self-start` helper classes. */\n readonly isSticky?: boolean;\n\n /**\n * Whether following an entry writes its `#id` into the URL, as a plain link does. `false` scrolls the heading into\n * view and moves focus to it without touching the URL — for hash-routed apps, where `#id` is a route. Default\n * `true`.\n */\n readonly canUpdateHash?: boolean;\n}\n\nfunction depthFromTagName(tag: string): number {\n const match = /^H([1-6])$/i.exec(tag);\n return match ? Number(match[1]) - 2 : 0; // h2 → 0, h3 → 1, h4 → 2\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useLocale } from '../../../foundation/i18n';\nimport { computed, shallowRef, useAttrs, useTemplateRef, watch } from 'vue';\nimport { cn } from '../../../foundation/styles';\nimport { useScrollSpy } from '../scrollSpy/UseScrollSpy';\nimport { useReducedMotion } from '../../../foundation/device';\n\nconst locale = useLocale();\n\n/**\n * Renders an outline of headings, taken from `items` (explicit) or `source` (auto-extracted).\n * The active entry is derived from `useScrollSpy` over the headings' IDs.\n */\ndefineOptions({ name: 'TableOfContents', inheritAttrs: false });\n\ndefineSlots<{\n /** The rich override for an item's `label`. */\n label?(props: { item: TableOfContentsItem; index: number }): unknown;\n}>();\n\n/** `activeId` defaults to `undefined` — the tri-state that lets an absent prop mean \"derive it\". */\nconst props = withDefaults(defineProps<TableOfContentsProps>(), {\n headingSelector: 'h2, h3',\n activeId: undefined,\n canUpdateHash: true,\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLElement>('el');\n\nconst extracted = shallowRef<ReadonlyArray<TableOfContentsItem>>([]);\n\nwatch(\n [() => props.items, () => props.source, () => props.headingSelector],\n ([itemsProp, source, headingSelector]) => {\n if (itemsProp || !source) return;\n const headings = Array.from(source.querySelectorAll<HTMLElement>(headingSelector));\n extracted.value = headings\n .filter((h) => h.id)\n .map((h) => ({\n id: h.id,\n label: h.textContent ?? '',\n depth: Math.max(0, depthFromTagName(h.tagName)),\n }));\n },\n { immediate: true, flush: 'post' },\n);\n\nconst items = computed(() => props.items ?? extracted.value);\nconst ids = computed(() => items.value.map((i) => i.id));\nconst spyId = useScrollSpy(() => ids.value);\nconst activeId = computed(() => (props.activeId !== undefined ? props.activeId : spyId.value));\n\nconst reducedMotion = useReducedMotion();\n\n/**\n * With `canUpdateHash` off, an entry is followed in place: the heading scrolls into view and takes focus (made\n * programmatically focusable when it is not), so the next Tab continues from the section just reached. Modified\n * clicks — a new tab, a new window — keep the plain link behavior.\n */\nfunction onFollow(event: MouseEvent, id: string): void {\n if (props.canUpdateHash || event.defaultPrevented || event.button !== 0) return;\n if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;\n const heading = el.value?.ownerDocument.getElementById(id);\n if (!heading) return;\n event.preventDefault();\n heading.scrollIntoView({ block: 'start', behavior: reducedMotion.value ? 'auto' : 'smooth' });\n if (!heading.hasAttribute('tabindex')) heading.setAttribute('tabindex', '-1');\n heading.focus({ preventScroll: true });\n}\n\nconst classes = computed(() => cn(props.isSticky && 'sticky top-4 self-start', attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- React returned `null` for an empty outline; `v-if` is the same gate. -->\n <nav\n v-if=\"items.length > 0\"\n ref=\"el\"\n :aria-label=\"locale.t('TableOfContents.tableOfContents', undefined, 'Table of contents')\"\n v-bind=\"rest\"\n :class=\"classes\"\n >\n <ul class=\"space-y-1 text-sm\">\n <li v-for=\"(item, i) in items\" :key=\"item.id\" :style=\"{ paddingLeft: `${(item.depth ?? 0) * 12}px` }\">\n <a\n :href=\"`#${item.id}`\"\n :aria-current=\"item.id === activeId ? 'location' : undefined\"\n @click=\"onFollow($event, item.id)\"\n :class=\"\n cn(\n 'block rounded-sm px-2 py-1 transition-colors',\n item.id === activeId\n ? 'bg-muted font-medium text-foreground'\n : 'text-muted-foreground hover:bg-muted/40 hover:text-foreground',\n )\n \"\n >\n <slot name=\"label\" :item=\"item\" :index=\"i\">{{ item.label }}</slot>\n </a>\n </li>\n </ul>\n </nav>\n</template>\n","import { tv, type VariantProps } from '../../../foundation/styles';\n\n/** Defines the LinkItem's color treatment. */\nexport const LinkItemVariant = {\n /** Refers to the primary-colored link. */\n Default: 'default',\n /** Refers to a foreground-colored, underline-on-hover link. */\n Subtle: 'subtle',\n /** Refers to a muted link that brightens on hover. */\n Muted: 'muted',\n /** Refers to a link that inherits the surrounding text color. */\n Inherit: 'inherit',\n} as const;\n\nexport type LinkItemVariant = (typeof LinkItemVariant)[keyof typeof LinkItemVariant];\n\n/** Defines the LinkItem's text size. */\nexport const LinkItemSize = {\n /** Refers to the small text size. */\n Sm: 'sm',\n /** Refers to the base (default) text size. */\n Md: 'md',\n /** Refers to the large text size. */\n Lg: 'lg',\n} as const;\n\nexport type LinkItemSize = (typeof LinkItemSize)[keyof typeof LinkItemSize];\n\nexport const linkVariants = tv({\n base: 'inline-flex items-center transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring rounded-sm',\n variants: {\n variant: {\n /* `-soft-foreground`, not `text-primary`: a link has no fill of its own, so it lands on\n whatever surface hosts it — the pairing `--color-primary-soft-foreground` is toned for.\n `text-primary` measured 4.19:1 on `theme-smart-qr`'s own page background, under AA for\n body text. Same fix as `Button.variants.ts` and `foundation/styles/constants/Tones.ts`. */\n default: 'text-primary-soft-foreground hover:text-primary-soft-foreground/85 hover:underline',\n subtle: 'text-foreground hover:underline',\n muted: 'text-muted-foreground hover:text-foreground hover:underline',\n inherit: 'text-current underline-offset-2 hover:underline',\n },\n size: {\n sm: 'text-sm',\n md: 'text-base',\n lg: 'text-lg',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'md',\n },\n});\n\nexport type LinkItemVariants = VariantProps<typeof linkVariants>;\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 _assertLinkVariant: AssertExact<LinkItemVariant, NonNullable<LinkItemVariants['variant']>> = true;\nconst _assertLinkSize: AssertExact<LinkItemSize, NonNullable<LinkItemVariants['size']>> = true;\nvoid _assertLinkVariant;\nvoid _assertLinkSize;\n","<script lang=\"ts\">\nimport type { AnchorHTMLAttributes } from 'vue';\nimport type { LinkItemVariants, LinkItemVariant, LinkItemSize } from './LinkItem.variants';\n\n/* Both heritage types are `@vue-ignore`d — native anchor attributes belong in attribute\n fallthrough, and `LinkItemVariants` resolves through `typeof linkVariants`, which the SFC prop\n compiler cannot walk. The type surface is unchanged. */\nexport interface LinkItemProps\n extends /* @vue-ignore */ AnchorHTMLAttributes, /* @vue-ignore */ Omit<LinkItemVariants, 'variant' | 'size'> {\n /** The color treatment. */\n readonly variant?: LinkItemVariant;\n /** The text size. */\n readonly size?: LinkItemSize;\n /** The as-child flag — when true, renders the child element as the link instead of an `<a>`.\n * Use for a router `<RouterLink>`. */\n readonly asChild?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { UrlExtensions } from '../../../foundation/dom';\nimport { computed, useAttrs, useTemplateRef, type ComponentPublicInstance } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/styles';\nimport { HtmlElement } from '../../../foundation/dom';\nimport { Primitive } from '../../../foundation/primitives';\nimport { linkVariants } from './LinkItem.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/* `<link-item>` is a real HTML element, but this is a library component — imported, never globally\n registered — so the name cannot shadow the tag, and renaming it would break parity with the\n React package. `vue/no-reserved-component-names` is off for `src/presentation/**` for exactly\n this reason. */\n/** Renders a styled anchor with consistent focus and hover treatment, or lends its styling to a router link. */\ndefineOptions({ name: 'LinkItem', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<LinkItemProps>(), { asChild: false });\n\ndefineSlots<{\n /** The link text, or — under `asChild` — the single element that becomes the link. */\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 href: UrlExtensions.safeNavigation(attrs.href),\n}));\n\nconst rootClass = computed(() =>\n cn(linkVariants({ variant: props.variant, size: props.size }), attrs.class as ClassValue),\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 <!-- Anchor with consistent focus/hover styling — `asChild` swaps in router links. -->\n <Primitive ref=\"root\" :as=\"HtmlElement.Anchor\" :as-child=\"asChild\" :class=\"rootClass\" v-bind=\"passthroughAttrs\">\n <slot />\n </Primitive>\n</template>\n","<script lang=\"ts\">\n/** Defines props for the mobile bottom navigation bar. */\nexport interface BottomNavMenuProps {\n /** Whether the bar pins to the bottom of the viewport. Default `true`; `false` keeps it in flow. */\n readonly isFixed?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { AriaAttribute } from '../../../foundation/dom';\nimport { useLocale } from '../../../foundation/i18n';\nimport { cn } from '../../../foundation/styles';\n\n/**\n * Renders the mobile bottom navigation bar — three to five top-level destinations as equal-width tabs, padded\n * clear of the device's home indicator.\n */\ndefineOptions({ name: 'BottomNavMenu', inheritAttrs: false });\n\n/** The `BottomNavMenuItem` destinations. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<BottomNavMenuProps>(), { isFixed: true });\n\nconst attrs = useAttrs();\nconst locale = useLocale();\n\n/** The landmark name — the caller's `aria-label`, else the localized default. */\nconst landmarkName = computed(\n () => (attrs[AriaAttribute.Label] as string | undefined) ?? locale.t('BottomNavMenu.label', undefined, 'Primary'),\n);\n\nconst rest = computed(() => {\n const { class: _class, [AriaAttribute.Label]: _label, ...others } = attrs;\n return others;\n});\n\nconst classes = computed(() =>\n cn(\n 'border-t border-border bg-background pb-[env(safe-area-inset-bottom)]',\n props.isFixed && 'fixed inset-x-0 bottom-0 z-sticky',\n attrs.class as ClassValue,\n ),\n);\n</script>\n\n<template>\n <nav v-bind=\"rest\" :aria-label=\"landmarkName\" :class=\"classes\">\n <ul role=\"list\" class=\"mx-auto grid max-w-lg auto-cols-fr grid-flow-col\">\n <slot />\n </ul>\n </nav>\n</template>\n","<script lang=\"ts\">\n/** Defines props for one destination of the bottom navigation bar. */\nexport interface BottomNavMenuItemProps {\n /** Whether this is the current place — marked `aria-current=\"page\"` and tinted. */\n readonly isActive?: boolean;\n\n /** The escape hatch to render the slotted router link instead of an `<a>`. */\n readonly asChild?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef, type ComponentPublicInstance } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { dataAttr, resolveElement } from '../../../foundation/dom';\nimport { Primitive, Slottable } from '../../../foundation/primitives';\nimport { cn } from '../../../foundation/styles';\n\n/** Renders one bottom-bar destination — an icon over a short label, with an optional count badge. */\ndefineOptions({ name: 'BottomNavMenuItem', inheritAttrs: false });\n\ndefineSlots<{\n /** The short label, or the router link itself under `asChild`. */\n default(): unknown;\n\n /** The icon drawn above the label. */\n icon?(): unknown;\n\n /** The count or dot drawn on the icon's corner. */\n badge?(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<BottomNavMenuItemProps>(), {\n isActive: undefined,\n asChild: false,\n});\n\nconst attrs = useAttrs();\nconst inner = useTemplateRef<ComponentPublicInstance>('inner');\n\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\nconst classes = computed(() =>\n cn(\n 'group flex min-h-14 w-full flex-col items-center justify-center gap-0.5 px-2 py-1.5 text-xs font-medium',\n 'text-muted-foreground transition-colors hover:text-foreground',\n 'focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset',\n 'data-[active]:text-primary-soft-foreground',\n attrs.class as ClassValue,\n ),\n);\n\n/** `Primitive` renders the real element, so its `$el` is this component's root. */\nconst el = computed(() => resolveElement(inner.value));\n\ndefineExpose({ el });\n</script>\n\n<template>\n <li class=\"flex\">\n <Primitive\n ref=\"inner\"\n as=\"a\"\n :as-child=\"props.asChild\"\n :aria-current=\"props.isActive ? 'page' : undefined\"\n :data-active=\"dataAttr(props.isActive)\"\n v-bind=\"rest\"\n :class=\"classes\"\n >\n <!-- The badge stays audible: only the icon is hidden, so a count reads before the label. -->\n <span v-if=\"$slots.icon || $slots.badge\" class=\"relative inline-flex\">\n <span v-if=\"$slots.icon\" class=\"inline-flex\" aria-hidden=\"true\"><slot name=\"icon\" /></span>\n <span v-if=\"$slots.badge\" :class=\"$slots.icon ? 'absolute -end-2 -top-1.5' : 'inline-flex'\">\n <slot name=\"badge\" />\n </span>\n </span>\n <Slottable v-if=\"props.asChild\"><slot /></Slottable>\n <span v-else class=\"max-w-full truncate\"><slot /></span>\n </Primitive>\n </li>\n</template>\n","import { inject, type InjectionKey } from 'vue';\n\n/** The state a `SidebarMenu` shares with its items, groups and sections. */\nexport interface SidebarMenuContextValue {\n /** Whether the menu shows as an icon rail. Live getter — read it, don't destructure it. */\n readonly isCollapsed: boolean;\n}\n\nexport const SidebarMenuKey: InjectionKey<SidebarMenuContextValue> = Symbol('wow-two.sidebarMenu');\n\n/** The state outside a `SidebarMenu` — the parts render expanded. */\nconst Standalone: SidebarMenuContextValue = { isCollapsed: false };\n\n/** Reads the surrounding `SidebarMenu`; outside one, the parts render expanded. */\nexport function useSidebarMenuContext(): SidebarMenuContextValue {\n return inject(SidebarMenuKey, Standalone);\n}\n","<script lang=\"ts\">\n/** Defines props for the vertical app sidebar menu. */\nexport interface SidebarMenuProps {\n /** Whether the menu shows as an icon rail — labels stay for assistive tech only. */\n readonly isCollapsed?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, useAttrs } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { AriaAttribute, dataAttr } from '../../../foundation/dom';\nimport { useLocale } from '../../../foundation/i18n';\nimport { cn } from '../../../foundation/styles';\nimport { SidebarMenuKey } from './SidebarMenuContext';\n\n/**\n * Renders the app's vertical sidebar navigation — destinations, labelled sections and collapsible groups,\n * with an icon-rail mode.\n */\ndefineOptions({ name: 'SidebarMenu', inheritAttrs: false });\n\n/** The `SidebarMenuItem`, `SidebarMenuGroup` and `SidebarMenuSection` parts. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<SidebarMenuProps>(), { isCollapsed: false });\n\nconst attrs = useAttrs();\nconst locale = useLocale();\n\nprovide(SidebarMenuKey, {\n get isCollapsed() {\n return props.isCollapsed;\n },\n});\n\n/** The landmark name — the caller's `aria-label`, else the localized default. */\nconst landmarkName = computed(\n () => (attrs[AriaAttribute.Label] as string | undefined) ?? locale.t('SidebarMenu.label', undefined, 'Sidebar'),\n);\n\nconst rest = computed(() => {\n const { class: _class, [AriaAttribute.Label]: _label, ...others } = attrs;\n return others;\n});\n\nconst classes = computed(() => cn('flex flex-col', attrs.class as ClassValue));\n</script>\n\n<template>\n <nav v-bind=\"rest\" :aria-label=\"landmarkName\" :data-collapsed=\"dataAttr(props.isCollapsed)\" :class=\"classes\">\n <ul role=\"list\" class=\"flex flex-col gap-0.5\">\n <slot />\n </ul>\n </nav>\n</template>\n","<script lang=\"ts\">\n/** Defines props for one sidebar destination. */\nexport interface SidebarMenuItemProps {\n /** Whether this is the current place — marked `aria-current=\"page\"` and tinted. */\n readonly isActive?: boolean;\n\n /** The escape hatch to render the slotted router link instead of an `<a>`. */\n readonly asChild?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef, type ComponentPublicInstance } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { dataAttr, resolveElement } from '../../../foundation/dom';\nimport { Primitive, Slottable } from '../../../foundation/primitives';\nimport { cn } from '../../../foundation/styles';\nimport { useSidebarMenuContext } from './SidebarMenuContext';\n\n/** Renders one sidebar destination — icon, label and a trailing count; icon-only in the rail. */\ndefineOptions({ name: 'SidebarMenuItem', inheritAttrs: false });\n\ndefineSlots<{\n /** The label, or the router link itself under `asChild`. */\n default(): unknown;\n\n /** The leading icon. */\n icon?(): unknown;\n\n /** The trailing count or status dot; hidden in the rail. */\n trailing?(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<SidebarMenuItemProps>(), {\n isActive: undefined,\n asChild: false,\n});\n\nconst attrs = useAttrs();\nconst context = useSidebarMenuContext();\nconst inner = useTemplateRef<ComponentPublicInstance>('inner');\n\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\nconst classes = computed(() =>\n cn(\n 'group flex h-9 w-full items-center gap-2.5 rounded-md px-2.5 text-sm font-medium text-foreground',\n 'transition-colors hover:bg-muted focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring',\n 'data-[active]:bg-primary-soft data-[active]:text-primary-soft-foreground',\n context.isCollapsed && 'justify-center px-0',\n attrs.class as ClassValue,\n ),\n);\n\n/** `Primitive` renders the real element, so its `$el` is this component's root. */\nconst el = computed(() => resolveElement(inner.value));\n\ndefineExpose({ el });\n</script>\n\n<template>\n <li class=\"flex\">\n <Primitive\n ref=\"inner\"\n as=\"a\"\n :as-child=\"props.asChild\"\n :aria-current=\"props.isActive ? 'page' : undefined\"\n :data-active=\"dataAttr(props.isActive)\"\n v-bind=\"rest\"\n :class=\"classes\"\n >\n <span\n v-if=\"$slots.icon\"\n class=\"inline-flex shrink-0 text-muted-foreground group-data-[active]:text-current\"\n aria-hidden=\"true\"\n >\n <slot name=\"icon\" />\n </span>\n <Slottable v-if=\"props.asChild\"><slot /></Slottable>\n <span v-else :class=\"context.isCollapsed ? 'sr-only' : 'flex-1 truncate text-start'\"><slot /></span>\n <span v-if=\"$slots.trailing && !context.isCollapsed\" class=\"ms-auto shrink-0\"><slot name=\"trailing\" /></span>\n </Primitive>\n </li>\n</template>\n","<script lang=\"ts\">\n/** Defines props for a collapsible group of sidebar destinations. */\nexport interface SidebarMenuGroupProps {\n /** The group heading on its toggle; also names the nested list. */\n readonly label: string;\n\n /** The open state, controlled. The `v-model:open` binding target. */\n readonly open?: boolean;\n\n /** The initial open state when uncontrolled. Default `false`. */\n readonly defaultOpen?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { ChevronRight } from 'lucide-vue-next';\nimport { useId } from '../../../foundation/identifiers';\nimport { useControlled } from '../../../foundation/state';\nimport { cn } from '../../../foundation/styles';\nimport { useSidebarMenuContext } from './SidebarMenuContext';\n\n/** Renders a disclosure of nested sidebar destinations under one toggle row. */\ndefineOptions({ name: 'SidebarMenuGroup', inheritAttrs: false });\n\ndefineSlots<{\n /** The nested `SidebarMenuItem` destinations. */\n default(): unknown;\n\n /** The toggle row's icon. */\n icon?(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<SidebarMenuGroupProps>(), {\n open: undefined,\n defaultOpen: false,\n});\n\nconst emit = defineEmits<{\n /** Fires when the reader opens or closes the group — the `v-model:open` half. */\n 'update:open': [open: boolean];\n}>();\n\nconst attrs = useAttrs();\nconst context = useSidebarMenuContext();\nconst listId = useId('sidebar-group');\n\nconst controlled = useControlled<boolean>({\n controlled: () => props.open,\n default: () => props.defaultOpen,\n onChange: (next) => {\n emit('update:open', next);\n },\n});\nconst isOpen = controlled.value;\n\n/* The rail has no room for nested rows (they often lack icons), so a group shows only its toggle there; its\n open state still applies once the menu expands. */\nconst isShown = computed(() => isOpen.value && !context.isCollapsed);\n\nfunction toggle(): void {\n controlled.setValue(!isOpen.value);\n}\n\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\nconst rootClasses = computed(() => cn('flex flex-col', attrs.class as ClassValue));\n\nconst toggleClasses = computed(() =>\n cn(\n 'flex h-9 w-full items-center gap-2.5 rounded-md px-2.5 text-sm font-medium text-foreground',\n 'transition-colors hover:bg-muted focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring',\n context.isCollapsed && 'justify-center px-0',\n ),\n);\n\nconst listClasses = computed(() =>\n cn('flex flex-col gap-0.5 pt-0.5', !context.isCollapsed && 'ms-4 border-s border-border ps-2'),\n);\n</script>\n\n<template>\n <li v-bind=\"rest\" :class=\"rootClasses\" :data-state=\"isOpen ? 'open' : 'closed'\">\n <button type=\"button\" :aria-expanded=\"isShown\" :aria-controls=\"listId\" :class=\"toggleClasses\" @click=\"toggle\">\n <span v-if=\"$slots.icon\" class=\"inline-flex shrink-0 text-muted-foreground\" aria-hidden=\"true\">\n <slot name=\"icon\" />\n </span>\n <span :class=\"context.isCollapsed ? 'sr-only' : 'flex-1 truncate text-start'\">{{ props.label }}</span>\n <ChevronRight\n v-if=\"!context.isCollapsed\"\n :class=\"cn('size-4 shrink-0 text-muted-foreground transition-transform', isOpen && 'rotate-90')\"\n aria-hidden=\"true\"\n />\n </button>\n <ul v-show=\"isShown\" :id=\"listId\" role=\"list\" :aria-label=\"props.label\" :class=\"listClasses\">\n <slot />\n </ul>\n </li>\n</template>\n","<script lang=\"ts\">\n/** Defines props for a labelled section of sidebar destinations. */\nexport interface SidebarMenuSectionProps {\n /** The section heading; also names the nested list. */\n readonly label: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { useId } from '../../../foundation/identifiers';\nimport { cn } from '../../../foundation/styles';\nimport { useSidebarMenuContext } from './SidebarMenuContext';\n\n/** Renders a labelled, always-open section of sidebar destinations; a divider in the rail. */\ndefineOptions({ name: 'SidebarMenuSection', inheritAttrs: false });\n\n/** The section's `SidebarMenuItem` and `SidebarMenuGroup` parts. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = defineProps<SidebarMenuSectionProps>();\n\nconst attrs = useAttrs();\nconst context = useSidebarMenuContext();\nconst labelId = useId('sidebar-section');\n\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\nconst classes = computed(() =>\n cn(\n 'flex flex-col gap-0.5 pt-3 first:pt-0',\n context.isCollapsed && 'mt-3 border-t border-border first:mt-0 first:border-t-0',\n attrs.class as ClassValue,\n ),\n);\n</script>\n\n<template>\n <li v-bind=\"rest\" :class=\"classes\">\n <span\n :id=\"labelId\"\n :class=\"context.isCollapsed ? 'sr-only' : 'px-2.5 pb-1 text-xs font-medium text-muted-foreground'\"\n >\n {{ props.label }}\n </span>\n <ul role=\"list\" :aria-labelledby=\"labelId\" class=\"flex flex-col gap-0.5\">\n <slot />\n </ul>\n </li>\n</template>\n","<script lang=\"ts\">\nimport type { AppSwitcherItem } from './AppSwitcherMenu.vue';\n\n/**\n * @internal Defines props for the app switcher's body, shared by its popover and its phone dialog. The owner\n * passes destinations already split by kind, with checked hrefs.\n */\nexport interface AppSwitcherMenuPanelProps {\n /** The workspace apps, drawn as tiles. */\n readonly apps: ReadonlyArray<AppSwitcherItem>;\n\n /** The public sites, drawn as new-tab links under a divider. */\n readonly sites: ReadonlyArray<AppSwitcherItem>;\n\n /** The key of the open app or site. */\n readonly current: string;\n\n /** The sites group heading. */\n readonly sitesLabel: string;\n\n /** The screen-reader text after each new-tab link. */\n readonly newTabLabel: string;\n}\n\nconst FocusClass = 'outline-hidden focus-visible:ring-2 focus-visible:ring-ring';\n\nconst TileClass = `flex min-h-14 w-full items-center gap-3 rounded-xl px-2.5 py-2 text-start transition-colors motion-reduce:transition-none ${FocusClass}`;\n\nconst TileIconClass =\n 'grid size-9 shrink-0 place-items-center rounded-lg border text-sm font-semibold forced-colors:border-[CanvasText]';\n\nconst SiteClass = `inline-flex min-h-9 items-center gap-1.5 rounded-lg border px-3 text-sm transition-colors motion-reduce:transition-none ${FocusClass}`;\n</script>\n\n<script setup lang=\"ts\">\nimport { ExternalLink } from 'lucide-vue-next';\nimport { Icon } from '../../../foundation/icons';\nimport { useId } from '../../../foundation/identifiers';\nimport { cn } from '../../../foundation/styles';\n\n/** Renders the app switcher's body: the workspace apps as tiles, then the public sites as new-tab links. */\ndefineOptions({ name: 'AppSwitcherMenuPanel', inheritAttrs: false });\n\nconst props = defineProps<AppSwitcherMenuPanelProps>();\n\nconst emit = defineEmits<{\n /** Fires when the reader opens another app or site; the link's own navigation proceeds. */\n select: [item: AppSwitcherItem, event: MouseEvent];\n\n /** Fires when the reader picks anything, the current app included; the owner closes the menu. */\n close: [];\n}>();\n\nconst sitesId = useId('app-switcher-sites');\n\n/** The tile glyph for an app without an icon: its label's first character. */\nfunction initialOf(label: string): string {\n return (Array.from(label.trim())[0] ?? '').toLocaleUpperCase();\n}\n\nfunction pick(item: AppSwitcherItem, event: MouseEvent): void {\n emit('select', item, event);\n emit('close');\n}\n\nfunction close(): void {\n emit('close');\n}\n</script>\n\n<template>\n <div class=\"flex flex-col gap-3\">\n <ul v-if=\"props.apps.length > 0\" role=\"list\" class=\"grid grid-cols-1 gap-1 sm:grid-cols-2\">\n <li v-for=\"app in props.apps\" :key=\"app.key\">\n <button\n v-if=\"app.key === props.current\"\n type=\"button\"\n aria-current=\"true\"\n :class=\"cn(TileClass, 'bg-primary-soft')\"\n @click=\"close\"\n >\n <span\n aria-hidden=\"true\"\n :class=\"cn(TileIconClass, 'border-transparent bg-primary text-primary-foreground')\"\n data-app-switcher-icon\n >\n <Icon v-if=\"app.icon\" :icon=\"app.icon\" :size=\"18\" />\n <template v-else>{{ initialOf(app.label) }}</template>\n </span>\n <span class=\"min-w-0\">\n <span class=\"block truncate text-sm font-semibold text-primary-soft-foreground\">{{ app.label }}</span>\n <span v-if=\"app.description\" class=\"block truncate text-xs text-muted-foreground\">{{\n app.description\n }}</span>\n </span>\n </button>\n <a v-else :href=\"app.href\" :class=\"cn(TileClass, 'hover:bg-muted')\" @click=\"pick(app, $event)\">\n <span\n aria-hidden=\"true\"\n :class=\"cn(TileIconClass, 'border-primary/10 bg-primary-soft/70 text-primary-soft-foreground')\"\n data-app-switcher-icon\n >\n <Icon v-if=\"app.icon\" :icon=\"app.icon\" :size=\"18\" />\n <template v-else>{{ initialOf(app.label) }}</template>\n </span>\n <span class=\"min-w-0\">\n <span class=\"block truncate text-sm font-semibold text-foreground\">{{ app.label }}</span>\n <span v-if=\"app.description\" class=\"block truncate text-xs text-muted-foreground\">{{\n app.description\n }}</span>\n </span>\n </a>\n </li>\n </ul>\n <template v-if=\"props.sites.length > 0\">\n <div v-if=\"props.apps.length > 0\" aria-hidden=\"true\" class=\"h-px bg-border\" data-app-switcher-divider />\n <h3 :id=\"sitesId\" class=\"px-1 text-xs font-semibold uppercase tracking-wider text-muted-foreground\">\n {{ props.sitesLabel }}\n </h3>\n <ul role=\"list\" :aria-labelledby=\"sitesId\" class=\"flex flex-wrap gap-2 px-1\">\n <li v-for=\"site in props.sites\" :key=\"site.key\">\n <button\n v-if=\"site.key === props.current\"\n type=\"button\"\n aria-current=\"true\"\n :class=\"cn(SiteClass, 'border-primary/15 bg-primary-soft text-primary-soft-foreground')\"\n @click=\"close\"\n >\n {{ site.label }}\n </button>\n <a\n v-else\n :href=\"site.href\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n :class=\"cn(SiteClass, 'border-border text-muted-foreground hover:border-input hover:text-foreground')\"\n @click=\"pick(site, $event)\"\n >{{ site.label }}<Icon :icon=\"ExternalLink\" :size=\"14\" /><span class=\"sr-only\">{{\n ` ${props.newTabLabel}`\n }}</span></a\n >\n </li>\n </ul>\n </template>\n </div>\n</template>\n","// Folder-internal helpers for `appSwitcherMenu/`. Not exported from the group barrel —\n// the \"internal\" signal is absence from `index.ts`, not the file name.\n\n/** Extends `appSwitcherMenu/` with the destination check its menu applies to every href. */\nexport const AppSwitcherMenuExtensions = {\n /**\n * The href as a plain absolute HTTPS URL, else `null`. Credentials, a query or a fragment could carry a token\n * from configuration into another app's address bar and history, so each one rejects the href.\n */\n toSafeHref(href: string): string | null {\n try {\n const url = new URL(href);\n if (url.protocol !== 'https:' || url.username || url.password || url.search || url.hash) return null;\n return `${url.origin}${url.pathname}`;\n } catch {\n return null;\n }\n },\n} as const;\n","<script lang=\"ts\">\nimport type { HTMLAttributes } from 'vue';\nimport type { IconAdapter } from '../../../foundation/icons';\nimport type { SurfaceVariant } from '../../../foundation/styles';\nimport type { Breakpoint } from '../../layout/appShell/AppShell.vue';\n\n/** Defines which group of an `AppSwitcherMenu` a destination joins. */\nexport const AppSwitcherKind = {\n /** Refers to a workspace app — a tile that opens in the same tab. */\n App: 'app',\n /** Refers to a public site — a link under the divider that opens in a new tab. */\n Site: 'site',\n} as const;\n\nexport type AppSwitcherKind = (typeof AppSwitcherKind)[keyof typeof AppSwitcherKind];\n\n/** Represents one destination in an `AppSwitcherMenu`. */\nexport interface AppSwitcherItem {\n /** The stable identity; `current` names the open app by it. */\n readonly key: string;\n\n /** The app or site name, already translated. */\n readonly label: string;\n\n /** One line under an app's label naming what it is for. */\n readonly description?: string;\n\n /** The address: an absolute HTTPS URL without credentials, query or fragment, else the menu drops the item. */\n readonly href: string;\n\n /** An app tile's glyph. Default the label's first character. */\n readonly icon?: IconAdapter;\n\n /** The group — `app` tiles or `site` links. */\n readonly kind: AppSwitcherKind;\n}\n\n/** Defines props for the control that names the current app and opens the others. */\nexport interface AppSwitcherMenuProps<T extends AppSwitcherItem = AppSwitcherItem> {\n /** Every destination, in display order; each group keeps this order. */\n readonly items: ReadonlyArray<T>;\n\n /** The key of the open app or site; that entry renders as the current marker. */\n readonly current: string;\n\n /** The app name on the trigger. Default the current item's label, else `title`. */\n readonly label?: string;\n\n /** A second line on the trigger — the organisation or workspace. Hidden below `breakpoint`. */\n readonly subtitle?: string;\n\n /** The open state, controlled. The `v-model:open` binding target. */\n readonly open?: boolean;\n\n /** The initial open state when uncontrolled. Default `false`. */\n readonly defaultOpen?: boolean;\n\n /** From this breakpoint up the menu is a popover; below it, a dialog. Default `md`. */\n readonly breakpoint?: Breakpoint;\n\n /** The menu heading. Default `\"Apps\"`, localized. */\n readonly title?: string;\n\n /** The sites group heading. Default `\"Sites\"`, localized. */\n readonly sitesLabel?: string;\n\n /** The dialog's close button name. Default `\"Close\"`, localized. */\n readonly closeLabel?: string;\n\n /** The screen-reader text after each site link. Default `\"(opens in a new tab)\"`, localized. */\n readonly newTabLabel?: string;\n\n /** The trigger's accessible name; `{app}` becomes the app name. Default `\"{app} — switch app\"`, localized. */\n readonly triggerLabel?: string;\n\n /** The panel's surface recipe — `glass` or `glass-outline` for translucent chrome. Default the overlay's own. */\n readonly variant?: SurfaceVariant;\n\n /** The popover and dialog panel class — the hook for an app's own material. */\n readonly panelClass?: HTMLAttributes['class'];\n}\n\n/* Static per-breakpoint classes, so Tailwind finds every one in the source. */\nconst NarrowHiddenClass: Record<Breakpoint, string> = {\n sm: 'max-sm:hidden',\n md: 'max-md:hidden',\n lg: 'max-lg:hidden',\n xl: 'max-xl:hidden',\n '2xl': 'max-2xl:hidden',\n};\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends AppSwitcherItem\">\nimport { computed, onMounted, useAttrs, useTemplateRef, watch } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { ChevronDown, LayoutGrid } from 'lucide-vue-next';\nimport { TailwindBreakpoints, useMediaQuery } from '../../../foundation/device';\nimport { Icon } from '../../../foundation/icons';\nimport { useLocale, useLocaleDefaults } from '../../../foundation/i18n';\nimport { useId } from '../../../foundation/identifiers';\nimport { useControlled } from '../../../foundation/state';\nimport { cn } from '../../../foundation/styles';\nimport Modal from '../../overlays/modal/Modal.vue';\nimport ModalContent from '../../overlays/modal/ModalContent.vue';\nimport OverlayCloseButton from '../../overlays/OverlayCloseButton.vue';\nimport OverlayTitle from '../../overlays/OverlayTitle.vue';\nimport Popover from '../../overlays/popover/Popover.vue';\nimport PopoverContent from '../../overlays/popover/PopoverContent.vue';\nimport PopoverTrigger from '../../overlays/popover/PopoverTrigger.vue';\nimport AppSwitcherMenuPanel from './AppSwitcherMenuPanel.vue';\nimport { AppSwitcherMenuExtensions } from './AppSwitcherMenuExtensions';\n\n/**\n * Renders the app-switcher menu: one trigger naming the current app, which opens the suite's other apps as tiles\n * and its public sites as new-tab links — a popover under the trigger from `breakpoint` up, a dialog below it.\n */\ndefineOptions({ name: 'AppSwitcherMenu', inheritAttrs: false });\n\ndefineSlots<{\n /** The brand mark at the trigger's start. Default a grid glyph on the primary colour. */\n mark?(props: { current: T | undefined }): unknown;\n}>();\n\nconst componentProps = withDefaults(defineProps<AppSwitcherMenuProps<T>>(), {\n label: undefined,\n subtitle: undefined,\n open: undefined,\n defaultOpen: false,\n breakpoint: 'md',\n triggerLabel: undefined,\n variant: undefined,\n panelClass: undefined,\n});\n\nconst props = useLocaleDefaults(componentProps, 'AppSwitcherMenu', {\n title: 'Apps',\n sitesLabel: 'Sites',\n closeLabel: 'Close',\n newTabLabel: '(opens in a new tab)',\n});\n\nconst emit = defineEmits<{\n /** Fires when the menu opens or closes — the `v-model:open` half. */\n 'update:open': [open: boolean];\n\n /** Fires when the reader opens another app or site. The link navigates unless the listener prevents it. */\n select: [item: T, event: MouseEvent];\n}>();\n\nconst attrs = useAttrs();\nconst locale = useLocale();\nconst titleId = useId('app-switcher-title');\nconst trigger = useTemplateRef<InstanceType<typeof PopoverTrigger>>('trigger');\n\nconst controlled = useControlled<boolean>({\n controlled: () => props.open,\n default: () => props.defaultOpen,\n onChange: (value) => {\n emit('update:open', value);\n },\n});\n\nconst isOpen = controlled.value;\n\nfunction setOpen(open: boolean): void {\n controlled.setValue(open);\n}\n\nfunction close(): void {\n controlled.setValue(false);\n}\n\n/** Whether the viewport reaches `breakpoint` — `false` on the server and in the first render. */\nconst isWide = useMediaQuery(() => `(min-width: ${TailwindBreakpoints[props.breakpoint]}px)`);\n\n/* An open menu closes when the viewport crosses the breakpoint, since its surface changes kind. Registered after\n mount, so the first media-query reading never closes a menu opened by `defaultOpen`. */\nonMounted(() => {\n watch(isWide, () => {\n if (isOpen.value) close();\n });\n});\n\nconst currentItem = computed(() => props.items.find((item) => item.key === props.current));\n\n/** The trigger's visible app name. */\nconst appName = computed(() => props.label ?? currentItem.value?.label ?? props.title);\n\nconst triggerName = computed(() =>\n props.triggerLabel === undefined\n ? locale.t('AppSwitcherMenu.triggerLabel', { app: appName.value }, '{app} — switch app')\n : props.triggerLabel.replaceAll('{app}', appName.value),\n);\n\n/** Every destination the menu can show: the current entry as given, the rest only with a safe href. */\nconst destinations = computed(() =>\n props.items.flatMap((item): AppSwitcherItem[] => {\n if (item.key === props.current) return [item];\n const href = AppSwitcherMenuExtensions.toSafeHref(item.href);\n return href === null ? [] : [{ ...item, href }];\n }),\n);\n\nconst apps = computed(() => destinations.value.filter((item) => item.kind === AppSwitcherKind.App));\nconst sites = computed(() => destinations.value.filter((item) => item.kind === AppSwitcherKind.Site));\n\n/** Reports the caller's own item, not the checked copy the panel rendered. */\nfunction select(item: AppSwitcherItem, event: MouseEvent): void {\n const original = props.items.find((entry) => entry.key === item.key);\n if (original) emit('select', original, event);\n}\n\nconst triggerClasses = computed(() =>\n cn(\n 'group/app-switcher inline-flex min-h-11 min-w-0 max-w-full shrink-0 items-center gap-2.5 rounded-xl border',\n 'border-transparent py-1 ps-1 pe-2 text-start text-foreground transition-colors motion-reduce:transition-none',\n 'hover:border-primary/15 hover:bg-primary-soft data-[state=open]:border-primary/15 data-[state=open]:bg-primary-soft',\n 'outline-hidden focus-visible:ring-2 focus-visible:ring-ring',\n attrs.class as ClassValue,\n ),\n);\n\nconst subtitleClasses = computed(() =>\n cn('block max-w-40 truncate text-xs leading-tight text-muted-foreground', NarrowHiddenClass[props.breakpoint]),\n);\n\nconst popoverClasses = computed(() => cn('w-[min(28rem,calc(100vw-2rem))]', props.panelClass as ClassValue));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\n/** The trigger button. */\nconst el = computed(() => trigger.value?.el ?? null);\n\ndefineExpose({ el });\n</script>\n\n<template>\n <Popover :open=\"isOpen && isWide\" placement=\"bottom-start\" @update:open=\"setOpen\">\n <PopoverTrigger ref=\"trigger\" as-child>\n <button\n type=\"button\"\n aria-haspopup=\"dialog\"\n :aria-expanded=\"isOpen\"\n :aria-label=\"triggerName\"\n :data-state=\"isOpen ? 'open' : 'closed'\"\n v-bind=\"rest\"\n :class=\"triggerClasses\"\n >\n <span aria-hidden=\"true\" class=\"flex shrink-0\" data-app-switcher-mark>\n <slot name=\"mark\" :current=\"currentItem\">\n <span class=\"grid size-9 place-items-center rounded-lg bg-primary text-primary-foreground\">\n <Icon :icon=\"LayoutGrid\" :size=\"18\" />\n </span>\n </slot>\n </span>\n <span class=\"min-w-0\">\n <span class=\"block truncate text-sm font-semibold leading-tight\">{{ appName }}</span>\n <span v-if=\"props.subtitle\" :class=\"subtitleClasses\" data-app-switcher-subtitle>{{ props.subtitle }}</span>\n </span>\n <Icon\n :icon=\"ChevronDown\"\n :size=\"16\"\n class=\"shrink-0 text-muted-foreground transition-transform duration-200 group-data-[state=open]/app-switcher:rotate-180 motion-reduce:transition-none\"\n data-app-switcher-chevron\n />\n </button>\n </PopoverTrigger>\n <PopoverContent\n v-if=\"isWide\"\n :aria-labelledby=\"titleId\"\n :variant=\"props.variant\"\n radius=\"xl\"\n :class=\"popoverClasses\"\n >\n <h2 :id=\"titleId\" class=\"mb-3 px-1 text-xs font-semibold uppercase tracking-wider text-muted-foreground\">\n {{ props.title }}\n </h2>\n <AppSwitcherMenuPanel\n :apps=\"apps\"\n :sites=\"sites\"\n :current=\"props.current\"\n :sites-label=\"props.sitesLabel\"\n :new-tab-label=\"props.newTabLabel\"\n @select=\"select\"\n @close=\"close\"\n />\n </PopoverContent>\n </Popover>\n <Modal v-if=\"!isWide\" :open=\"isOpen\" @update:open=\"setOpen\">\n <ModalContent :variant=\"props.variant\" radius=\"xl\" padding=\"lg\" :class=\"props.panelClass\">\n <div class=\"mb-4 flex shrink-0 items-center justify-between gap-3\">\n <OverlayTitle>{{ props.title }}</OverlayTitle>\n <OverlayCloseButton :aria-label=\"props.closeLabel\" class=\"static -me-2 h-11 w-11 rounded-xl\" />\n </div>\n <AppSwitcherMenuPanel\n :apps=\"apps\"\n :sites=\"sites\"\n :current=\"props.current\"\n :sites-label=\"props.sitesLabel\"\n :new-tab-label=\"props.newTabLabel\"\n @select=\"select\"\n @close=\"close\"\n />\n </ModalContent>\n </Modal>\n</template>\n"],"names":["_openBlock","_createElementBlock","_mergeProps","_unref","_createElementVNode","_hoisted_2","_Fragment","_renderSlot","_createTextVNode","_toDisplayString","_hoisted_5","_createVNode","Icon","_normalizeClass","_renderList","_hoisted_4","_createBlock","Portal","AnchoredPositioner","FocusScope","MenuItemStateToken","Menu","document","DismissableLayer","_normalizeStyle","_hoisted_1","$slots","_hoisted_3","_hoisted_7","Popover","PopoverTrigger","PopoverContent","AppSwitcherMenuPanel","Modal","ModalContent","OverlayTitle","OverlayCloseButton"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,UAAM,SAAS,UAAA;AAiBf,UAAM,QAAQ;AAEd,UAAM,QAAQ,SAAA;AACd,UAAM,KAAK,eAA4B,IAAI;AAE3C,UAAM,UAAU,SAAS,MAAM,GAAG,WAAW,MAAM,KAA2B,CAAC;AAG/E,UAAM,OAAO,SAAS,MAAM;AAC1B,YAAM,EAAE,OAAO,QAAQ,GAAG,WAAW;AACrC,aAAO;AAAA,IACT,CAAC;AAED,UAAM,YAAY,SAAS,MAAM,MAAM,MAAM,SAAS,CAAC;AAEvD,aAAa,EAAE,IAAI;;AAMjB,aAAAA,UAAA,GAAAC,mBAoBM,OApBNC,WAoBM;AAAA,iBApBG;AAAA,QAAJ,KAAI;AAAA,QAAM,cAAYC,MAAA,MAAA,EAAO,2BAA2B,QAAS,YAAA;AAAA,MAAA,GAAyB,KAAA,OAAI,EAAG,OAAO,QAAA,MAAA,CAAO,GAAA;AAAA,QAClHC,mBAkBK,MAlBLC,cAkBK;AAAA,WAjBHL,UAAA,IAAA,GAAAC,mBAgBWK,2BAhBmB,MAAM,OAAK,CAAvB,MAAM,MAAC;;cAAwB,KAAA,KAAK,QAAQ,KAAK;AAAA,YAAA;cACjEF,mBAWK,MAAA,MAAA;AAAA,gBATK,KAAK,QAAQ,MAAM,UAAA,sBAD3BH,mBAMI,KAAA;AAAA;kBAJD,MAAME,MAAA,aAAA,EAAc,eAAe,KAAK,IAAI;AAAA,kBAC7C,OAAM;AAAA,gBAAA;kBAENI,WAAkE,KAAA,QAAA,SAAA;AAAA,oBAA9C;AAAA,oBAAa,OAAO;AAAA,kBAAA,GAAxC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