@dicehub/kappa 0.4.2 → 0.6.0

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 (131) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/THIRD_PARTY_NOTICES.md +32 -1
  3. package/dist/{DropdownSubTrigger-CBmdRDUH.js → DropdownSubTrigger-DrZmNIcU.js} +15 -13
  4. package/dist/DropdownSubTrigger-DrZmNIcU.js.map +1 -0
  5. package/dist/InlineCopyText-Bosrszdf.js +118 -0
  6. package/dist/InlineCopyText-Bosrszdf.js.map +1 -0
  7. package/dist/{SidebarLayout-Cs6OnqU2.js → SidebarLayout-D9RT-MdT.js} +18 -8
  8. package/dist/SidebarLayout-D9RT-MdT.js.map +1 -0
  9. package/dist/WorkspaceSwitcher-DBWdKZbM.js +265 -0
  10. package/dist/WorkspaceSwitcher-DBWdKZbM.js.map +1 -0
  11. package/dist/blocks/file-browser.js +1 -1
  12. package/dist/blocks/index.d.ts +2 -0
  13. package/dist/blocks/settings-layout/SettingsLayout.vue.d.ts +11 -0
  14. package/dist/blocks/settings-layout/SettingsSection.vue.d.ts +30 -0
  15. package/dist/blocks/settings-layout/index.d.ts +7 -0
  16. package/dist/blocks/settings-layout/settings-layout.d.ts +42 -0
  17. package/dist/blocks/settings-layout.js +2 -0
  18. package/dist/blocks/sidebar-layout/SidebarLayout.vue.d.ts +2 -0
  19. package/dist/blocks/sidebar-layout/index.d.ts +1 -1
  20. package/dist/blocks/sidebar-layout/sidebar-layout.d.ts +4 -0
  21. package/dist/blocks/sidebar-layout.js +1 -1
  22. package/dist/blocks/workspace-switcher/WorkspaceSwitcher.vue.d.ts +33 -0
  23. package/dist/blocks/workspace-switcher/WorkspaceSwitcherActions.vue.d.ts +12 -0
  24. package/dist/blocks/workspace-switcher/WorkspaceSwitcherBadge.vue.d.ts +8 -0
  25. package/dist/blocks/workspace-switcher/index.d.ts +3 -0
  26. package/dist/blocks/workspace-switcher/workspace-switcher.d.ts +63 -0
  27. package/dist/blocks/workspace-switcher.js +2 -0
  28. package/dist/{clipboard-text-Ob056Gly.js → clipboard-text-Clp3y-6f.js} +10 -14
  29. package/dist/{clipboard-text-Ob056Gly.js.map → clipboard-text-Clp3y-6f.js.map} +1 -1
  30. package/dist/{command-palette-CGREegfE.js → command-palette-BHFB86Gc.js} +9 -3
  31. package/dist/command-palette-BHFB86Gc.js.map +1 -0
  32. package/dist/components/clipboard-text.js +1 -1
  33. package/dist/components/code-highlighted/CodeHighlighted.vue.d.ts +6 -1
  34. package/dist/components/code-highlighted/CodeHighlightedCopy.vue.d.ts +8 -0
  35. package/dist/components/code-highlighted/code-highlighted.d.ts +9 -0
  36. package/dist/components/code-highlighted/index.d.ts +1 -1
  37. package/dist/components/code-highlighted.js +185 -116
  38. package/dist/components/code-highlighted.js.map +1 -1
  39. package/dist/components/command-palette/command-palette.d.ts +1 -1
  40. package/dist/components/command-palette.js +1 -1
  41. package/dist/components/context-menu/ContextMenu.vue.d.ts +2 -2
  42. package/dist/components/context-menu.js +2 -2
  43. package/dist/components/data-grid.js +1 -1
  44. package/dist/components/dialog/Dialog.vue.d.ts +2 -2
  45. package/dist/components/dialog-layout/DialogLayoutAlert.vue.d.ts +2 -2
  46. package/dist/components/diff-viewer.js +1 -1
  47. package/dist/components/drawer/Drawer.vue.d.ts +2 -2
  48. package/dist/components/dropdown/Dropdown.vue.d.ts +2 -2
  49. package/dist/components/dropdown/DropdownSub.vue.d.ts +2 -2
  50. package/dist/components/dropdown.js +2 -2
  51. package/dist/components/filter-bar.js +1 -1
  52. package/dist/components/hover-card/HoverCard.vue.d.ts +1 -1
  53. package/dist/components/index.d.ts +2 -0
  54. package/dist/components/inline-copy-text/InlineCopyText.vue.d.ts +26 -0
  55. package/dist/components/inline-copy-text/index.d.ts +2 -0
  56. package/dist/components/inline-copy-text/inline-copy-text.d.ts +34 -0
  57. package/dist/components/inline-copy-text.js +2 -0
  58. package/dist/components/menu-bar.js +1 -1
  59. package/dist/components/navigation-menu/NavigationMenu.vue.d.ts +23 -0
  60. package/dist/components/navigation-menu/NavigationMenuArrow.vue.d.ts +13 -0
  61. package/dist/components/navigation-menu/NavigationMenuContent.vue.d.ts +14 -0
  62. package/dist/components/navigation-menu/NavigationMenuContext.vue.d.ts +11 -0
  63. package/dist/components/navigation-menu/NavigationMenuIndicator.vue.d.ts +13 -0
  64. package/dist/components/navigation-menu/NavigationMenuItem.vue.d.ts +15 -0
  65. package/dist/components/navigation-menu/NavigationMenuItemIndicator.vue.d.ts +13 -0
  66. package/dist/components/navigation-menu/NavigationMenuLink.vue.d.ts +16 -0
  67. package/dist/components/navigation-menu/NavigationMenuList.vue.d.ts +13 -0
  68. package/dist/components/navigation-menu/NavigationMenuRootProvider.vue.d.ts +13 -0
  69. package/dist/components/navigation-menu/NavigationMenuTrigger.vue.d.ts +15 -0
  70. package/dist/components/navigation-menu/NavigationMenuViewport.vue.d.ts +13 -0
  71. package/dist/components/navigation-menu/NavigationMenuViewportPositioner.vue.d.ts +15 -0
  72. package/dist/components/navigation-menu/index.d.ts +34 -0
  73. package/dist/components/navigation-menu/navigation-menu-attrs.d.ts +4 -0
  74. package/dist/components/navigation-menu/navigation-menu.d.ts +36 -0
  75. package/dist/components/navigation-menu/use-navigation-menu.d.ts +9 -0
  76. package/dist/components/navigation-menu.js +2 -0
  77. package/dist/components/number-input/NumberInput.vue.d.ts +1 -1
  78. package/dist/components/number-input/NumberInputRootProvider.vue.d.ts +1 -1
  79. package/dist/components/number-input/index.d.ts +2 -1
  80. package/dist/components/number-input/number-input-cursor.d.ts +11 -0
  81. package/dist/components/number-input/number-input-machine.d.ts +5 -0
  82. package/dist/components/number-input/use-number-input.d.ts +2 -0
  83. package/dist/components/number-input.js +2 -2
  84. package/dist/components/popover/Popover.vue.d.ts +2 -2
  85. package/dist/components/sidebar/SidebarProvider.vue.d.ts +1 -0
  86. package/dist/components/sidebar/SidebarTrigger.vue.d.ts +1 -0
  87. package/dist/components/sidebar/sidebar-context.d.ts +1 -0
  88. package/dist/components/sidebar/sidebar-peek.d.ts +1 -1
  89. package/dist/components/sidebar/sidebar-resize.d.ts +1 -0
  90. package/dist/components/sidebar/sidebar.d.ts +6 -1
  91. package/dist/components/sidebar.js +1 -1
  92. package/dist/components/tooltip/Tooltip.vue.d.ts +1 -1
  93. package/dist/{context-menu-C_XGS00V.js → context-menu-B_noSd5p.js} +2 -2
  94. package/dist/{context-menu-C_XGS00V.js.map → context-menu-B_noSd5p.js.map} +1 -1
  95. package/dist/{data-grid-C7ZyN-nX.js → data-grid-BWXpMwCT.js} +2 -2
  96. package/dist/{data-grid-C7ZyN-nX.js.map → data-grid-BWXpMwCT.js.map} +1 -1
  97. package/dist/{diff-viewer-DpDGXsGd.js → diff-viewer-fDKJ-67E.js} +2 -2
  98. package/dist/{diff-viewer-DpDGXsGd.js.map → diff-viewer-fDKJ-67E.js.map} +1 -1
  99. package/dist/{dropdown-B4YZ7mck.js → dropdown-Dedb1tk8.js} +2 -2
  100. package/dist/{dropdown-B4YZ7mck.js.map → dropdown-Dedb1tk8.js.map} +1 -1
  101. package/dist/{file-browser-BU08V7Lh.js → file-browser-tqo1PirD.js} +4 -4
  102. package/dist/{file-browser-BU08V7Lh.js.map → file-browser-tqo1PirD.js.map} +1 -1
  103. package/dist/{filter-bar-yEkaxil8.js → filter-bar-COAlDQE4.js} +2 -2
  104. package/dist/{filter-bar-yEkaxil8.js.map → filter-bar-COAlDQE4.js.map} +1 -1
  105. package/dist/index.js +66 -62
  106. package/dist/{menu-bar-CraWEpaF.js → menu-bar-C-qQn2L1.js} +2 -2
  107. package/dist/{menu-bar-CraWEpaF.js.map → menu-bar-C-qQn2L1.js.map} +1 -1
  108. package/dist/navigation-menu-DbfnBaTw.js +379 -0
  109. package/dist/navigation-menu-DbfnBaTw.js.map +1 -0
  110. package/dist/{number-input-D59rbYIn.js → number-input-B3Xkb5sT.js} +258 -146
  111. package/dist/number-input-B3Xkb5sT.js.map +1 -0
  112. package/dist/registry/component-registry.json +25 -3
  113. package/dist/registry/generated.d.ts +155 -5
  114. package/dist/{registry-CTLhOxfJ.js → registry-Bt3InMf5.js} +187 -5
  115. package/dist/registry-Bt3InMf5.js.map +1 -0
  116. package/dist/registry.js +1 -1
  117. package/dist/settings-layout-RlKrLGUx.js +170 -0
  118. package/dist/settings-layout-RlKrLGUx.js.map +1 -0
  119. package/dist/{sidebar-DkQJmgBd.js → sidebar-tcrbUrk_.js} +279 -222
  120. package/dist/sidebar-tcrbUrk_.js.map +1 -0
  121. package/dist/styles/kappa.css +1 -1
  122. package/dist/styles/theme-kappa.css +6 -1
  123. package/dist/styles/tokens.json +22 -0
  124. package/licenses/zag-number-input.LICENSE +21 -0
  125. package/package.json +3 -2
  126. package/dist/DropdownSubTrigger-CBmdRDUH.js.map +0 -1
  127. package/dist/SidebarLayout-Cs6OnqU2.js.map +0 -1
  128. package/dist/command-palette-CGREegfE.js.map +0 -1
  129. package/dist/number-input-D59rbYIn.js.map +0 -1
  130. package/dist/registry-CTLhOxfJ.js.map +0 -1
  131. package/dist/sidebar-DkQJmgBd.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidebarLayout-D9RT-MdT.js","names":["$attrs","$slots"],"sources":["../src/blocks/sidebar-layout/SidebarLayoutSecondary.vue","../src/blocks/sidebar-layout/SidebarLayoutSecondary.vue","../src/blocks/sidebar-layout/sidebar-layout.ts","../src/blocks/sidebar-layout/SidebarLayout.vue","../src/blocks/sidebar-layout/SidebarLayout.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { nextTick, ref, watch } from \"vue\";\nimport { Sidebar, useSidebarContext } from \"../../components/sidebar\";\n\ndefineProps<{ label: string }>();\nconst sidebar = useSidebarContext();\nconst content = ref<{ $el: HTMLElement }>();\nwatch(sidebar.iconCollapsed, async (hidden) => {\n const element = content.value?.$el;\n if (!hidden || !element?.contains(document.activeElement)) return;\n const toggle = element.closest(\".kappa-sidebar-layout\")?.querySelector<HTMLElement>('.kappa-sidebar-layout__toolbar [data-slot=\"sidebar-trigger\"]');\n await nextTick();\n toggle?.focus({ preventScroll: true });\n});\n</script>\n\n<template>\n <Sidebar.Content ref=\"content\" :aria-label=\"label\" class=\"kappa-sidebar-layout__secondary\" :hidden=\"sidebar.iconCollapsed.value\" :inert=\"sidebar.iconCollapsed.value || undefined\"><slot /></Sidebar.Content>\n</template>\n","<script setup lang=\"ts\">\nimport { nextTick, ref, watch } from \"vue\";\nimport { Sidebar, useSidebarContext } from \"../../components/sidebar\";\n\ndefineProps<{ label: string }>();\nconst sidebar = useSidebarContext();\nconst content = ref<{ $el: HTMLElement }>();\nwatch(sidebar.iconCollapsed, async (hidden) => {\n const element = content.value?.$el;\n if (!hidden || !element?.contains(document.activeElement)) return;\n const toggle = element.closest(\".kappa-sidebar-layout\")?.querySelector<HTMLElement>('.kappa-sidebar-layout__toolbar [data-slot=\"sidebar-trigger\"]');\n await nextTick();\n toggle?.focus({ preventScroll: true });\n});\n</script>\n\n<template>\n <Sidebar.Content ref=\"content\" :aria-label=\"label\" class=\"kappa-sidebar-layout__secondary\" :hidden=\"sidebar.iconCollapsed.value\" :inert=\"sidebar.iconCollapsed.value || undefined\"><slot /></Sidebar.Content>\n</template>\n","import type { VNodeChild } from \"vue\";\nimport type { SidebarContextValue, SidebarProviderEmits, SidebarProviderProps, SidebarTriggerProps } from \"../../components/sidebar\";\n\nexport const SIDEBAR_LAYOUT_VARIANTS = [\"workspace\", \"rail\", \"inset\", \"floating\", \"split\", \"header\"] as const;\nexport type SidebarLayoutVariant = (typeof SIDEBAR_LAYOUT_VARIANTS)[number];\nexport type SidebarLayoutContentAlignment = \"available\" | \"shell\";\n\nexport const SIDEBAR_LAYOUT_DEFAULTS = {\n variant: \"workspace\",\n contentAlignment: \"available\",\n label: \"Application navigation\",\n navigationLabel: \"Navigation links\",\n secondaryLabel: \"Secondary navigation\",\n closeLabel: \"Close navigation\",\n resizeLabel: \"Resize sidebar\",\n fullScreenOnMobile: false,\n} as const;\n\nexport interface SidebarLayoutProps extends SidebarProviderProps {\n variant?: SidebarLayoutVariant;\n /** Center the content region within the available space or the complete shell. */\n contentAlignment?: SidebarLayoutContentAlignment;\n /** Name of the navigation landmark and mobile dialog. */\n label?: string;\n navigationLabel?: string;\n secondaryLabel?: string;\n closeLabel?: string;\n resizeLabel?: string;\n fullScreenOnMobile?: boolean;\n /** Translated labels and disabled state for the built-in toggle. */\n triggerProps?: SidebarTriggerProps;\n}\n\nexport type SidebarLayoutEmits = SidebarProviderEmits;\nexport interface SidebarLayoutSlots {\n header?: (context: SidebarContextValue) => VNodeChild;\n navigation?: (context: SidebarContextValue) => VNodeChild;\n footer?: (context: SidebarContextValue) => VNodeChild;\n /** Used by split; hidden with the collapsed rail and stacked on mobile. */\n secondary?: (context: SidebarContextValue) => VNodeChild;\n /** Content after the built-in toggle; in the site header for header. */\n toolbar?: (context: SidebarContextValue) => VNodeChild;\n default?: (context: SidebarContextValue) => VNodeChild;\n}\n\nexport function sidebarLayoutDefaultOpen(variant: SidebarLayoutVariant): boolean {\n return variant !== \"rail\";\n}\n\nexport function sidebarLayoutDefaultWidth(variant: SidebarLayoutVariant): number {\n return variant === \"split\" ? 352 : 260;\n}\n","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { Sidebar, SIDEBAR_DEFAULTS } from \"../../components/sidebar\";\nimport SidebarLayoutSecondary from \"./SidebarLayoutSecondary.vue\";\nimport {\n SIDEBAR_LAYOUT_DEFAULTS, sidebarLayoutDefaultOpen, sidebarLayoutDefaultWidth,\n type SidebarLayoutEmits, type SidebarLayoutProps, type SidebarLayoutSlots,\n} from \"./sidebar-layout\";\n\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarLayoutProps>(), {\n ...SIDEBAR_DEFAULTS, ...SIDEBAR_LAYOUT_DEFAULTS,\n open: undefined, mobileOpen: undefined, defaultOpen: undefined,\n width: undefined, defaultWidth: undefined,\n});\nconst emit = defineEmits<SidebarLayoutEmits>();\ndefineSlots<SidebarLayoutSlots>();\nconst providerProps = computed(() => {\n const { variant, contentAlignment, label, navigationLabel, secondaryLabel, closeLabel, resizeLabel, fullScreenOnMobile, triggerProps, ...provider } = props;\n return {\n ...provider,\n defaultOpen: props.defaultOpen ?? sidebarLayoutDefaultOpen(variant),\n width: props.width ?? `${sidebarLayoutDefaultWidth(variant)}px`,\n defaultWidth: props.defaultWidth ?? sidebarLayoutDefaultWidth(variant),\n };\n});\n</script>\n\n<template>\n <Sidebar.Provider\n v-bind=\"{ ...$attrs, ...providerProps }\"\n class=\"kappa-sidebar-layout\" :data-variant=\"props.variant\" :data-side=\"props.side\"\n :data-content-alignment=\"props.contentAlignment\" :data-collapsible=\"props.collapsible\"\n @update:open=\"emit('update:open', $event)\" @open-change=\"emit('openChange', $event)\"\n @update:mobile-open=\"emit('update:mobileOpen', $event)\" @mobile-open-change=\"emit('mobileOpenChange', $event)\"\n @update:resize-width=\"emit('update:resizeWidth', $event)\" @resize=\"emit('resize', $event)\" @resize-end=\"emit('resizeEnd', $event)\"\n >\n <Sidebar.Context v-slot=\"context\">\n <header v-if=\"props.variant === 'header'\" class=\"kappa-sidebar-layout__toolbar kappa-sidebar-layout__site-header\">\n <Sidebar.Trigger v-bind=\"props.triggerProps\" />\n <slot name=\"toolbar\" v-bind=\"context\" />\n </header>\n <div class=\"kappa-sidebar-layout__body\">\n <Sidebar.Root :label=\"props.label\" :full-screen-on-mobile=\"props.fullScreenOnMobile\" class=\"kappa-sidebar-layout__navigation\" :data-layout=\"props.variant\">\n <Sidebar.Header>\n <slot name=\"header\" v-bind=\"context\" />\n <Sidebar.Close :label=\"props.closeLabel\" />\n </Sidebar.Header>\n <div class=\"kappa-sidebar-layout__columns\">\n <Sidebar.Content :aria-label=\"props.navigationLabel\" class=\"kappa-sidebar-layout__primary\">\n <slot name=\"navigation\" v-bind=\"context\" />\n </Sidebar.Content>\n <SidebarLayoutSecondary\n v-if=\"props.variant === 'split' && $slots.secondary\"\n :label=\"props.secondaryLabel\"\n ><slot name=\"secondary\" v-bind=\"context\" /></SidebarLayoutSecondary>\n </div>\n <Sidebar.Footer v-if=\"$slots.footer\"><slot name=\"footer\" v-bind=\"context\" /></Sidebar.Footer>\n <Sidebar.ResizeHandle v-if=\"props.resizable\" :label=\"props.resizeLabel\" />\n </Sidebar.Root>\n <div class=\"kappa-sidebar-layout__main\">\n <header v-if=\"props.variant !== 'header'\" class=\"kappa-sidebar-layout__toolbar\">\n <Sidebar.Trigger v-bind=\"props.triggerProps\" />\n <slot name=\"toolbar\" v-bind=\"context\" />\n </header>\n <div class=\"kappa-sidebar-layout__content-frame\">\n <div class=\"kappa-sidebar-layout__content\"><slot v-bind=\"context\" /></div>\n </div>\n </div>\n </div>\n </Sidebar.Context>\n </Sidebar.Provider>\n</template>\n\n<style src=\"./sidebar-layout.css\"></style>\n","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { Sidebar, SIDEBAR_DEFAULTS } from \"../../components/sidebar\";\nimport SidebarLayoutSecondary from \"./SidebarLayoutSecondary.vue\";\nimport {\n SIDEBAR_LAYOUT_DEFAULTS, sidebarLayoutDefaultOpen, sidebarLayoutDefaultWidth,\n type SidebarLayoutEmits, type SidebarLayoutProps, type SidebarLayoutSlots,\n} from \"./sidebar-layout\";\n\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarLayoutProps>(), {\n ...SIDEBAR_DEFAULTS, ...SIDEBAR_LAYOUT_DEFAULTS,\n open: undefined, mobileOpen: undefined, defaultOpen: undefined,\n width: undefined, defaultWidth: undefined,\n});\nconst emit = defineEmits<SidebarLayoutEmits>();\ndefineSlots<SidebarLayoutSlots>();\nconst providerProps = computed(() => {\n const { variant, contentAlignment, label, navigationLabel, secondaryLabel, closeLabel, resizeLabel, fullScreenOnMobile, triggerProps, ...provider } = props;\n return {\n ...provider,\n defaultOpen: props.defaultOpen ?? sidebarLayoutDefaultOpen(variant),\n width: props.width ?? `${sidebarLayoutDefaultWidth(variant)}px`,\n defaultWidth: props.defaultWidth ?? sidebarLayoutDefaultWidth(variant),\n };\n});\n</script>\n\n<template>\n <Sidebar.Provider\n v-bind=\"{ ...$attrs, ...providerProps }\"\n class=\"kappa-sidebar-layout\" :data-variant=\"props.variant\" :data-side=\"props.side\"\n :data-content-alignment=\"props.contentAlignment\" :data-collapsible=\"props.collapsible\"\n @update:open=\"emit('update:open', $event)\" @open-change=\"emit('openChange', $event)\"\n @update:mobile-open=\"emit('update:mobileOpen', $event)\" @mobile-open-change=\"emit('mobileOpenChange', $event)\"\n @update:resize-width=\"emit('update:resizeWidth', $event)\" @resize=\"emit('resize', $event)\" @resize-end=\"emit('resizeEnd', $event)\"\n >\n <Sidebar.Context v-slot=\"context\">\n <header v-if=\"props.variant === 'header'\" class=\"kappa-sidebar-layout__toolbar kappa-sidebar-layout__site-header\">\n <Sidebar.Trigger v-bind=\"props.triggerProps\" />\n <slot name=\"toolbar\" v-bind=\"context\" />\n </header>\n <div class=\"kappa-sidebar-layout__body\">\n <Sidebar.Root :label=\"props.label\" :full-screen-on-mobile=\"props.fullScreenOnMobile\" class=\"kappa-sidebar-layout__navigation\" :data-layout=\"props.variant\">\n <Sidebar.Header>\n <slot name=\"header\" v-bind=\"context\" />\n <Sidebar.Close :label=\"props.closeLabel\" />\n </Sidebar.Header>\n <div class=\"kappa-sidebar-layout__columns\">\n <Sidebar.Content :aria-label=\"props.navigationLabel\" class=\"kappa-sidebar-layout__primary\">\n <slot name=\"navigation\" v-bind=\"context\" />\n </Sidebar.Content>\n <SidebarLayoutSecondary\n v-if=\"props.variant === 'split' && $slots.secondary\"\n :label=\"props.secondaryLabel\"\n ><slot name=\"secondary\" v-bind=\"context\" /></SidebarLayoutSecondary>\n </div>\n <Sidebar.Footer v-if=\"$slots.footer\"><slot name=\"footer\" v-bind=\"context\" /></Sidebar.Footer>\n <Sidebar.ResizeHandle v-if=\"props.resizable\" :label=\"props.resizeLabel\" />\n </Sidebar.Root>\n <div class=\"kappa-sidebar-layout__main\">\n <header v-if=\"props.variant !== 'header'\" class=\"kappa-sidebar-layout__toolbar\">\n <Sidebar.Trigger v-bind=\"props.triggerProps\" />\n <slot name=\"toolbar\" v-bind=\"context\" />\n </header>\n <div class=\"kappa-sidebar-layout__content-frame\">\n <div class=\"kappa-sidebar-layout__content\"><slot v-bind=\"context\" /></div>\n </div>\n </div>\n </div>\n </Sidebar.Context>\n </Sidebar.Provider>\n</template>\n\n<style src=\"./sidebar-layout.css\"></style>\n"],"mappings":";;;;;;;;EAKA,IAAM,IAAU,EAAkB,GAC5B,IAAU,EAA0B;SAC1C,EAAM,EAAQ,eAAe,OAAO,MAAW;GAC7C,IAAM,IAAU,EAAQ,OAAO;GAC/B,IAAI,CAAC,KAAU,CAAC,GAAS,SAAS,SAAS,aAAa,GAAG;GAC3D,IAAM,IAAS,EAAQ,QAAQ,uBAAuB,CAAC,EAAE,cAA2B,gEAA8D;GAElJ,AADA,MAAM,EAAS,GACf,GAAQ,MAAM,EAAE,eAAe,GAAK,CAAC;EACvC,CAAC,cAIC,EAAA,GAAA,EAA6M,EAAA,CAAA,CAAA,CAAA,SAAA;GAAxL,SAAA;GAAJ,KAAI;GAAW,cAAY,EAAA;GAAO,OAAM;GAAmC,QAAQ,EAAA,CAAA,CAAO,CAAC,cAAc;GAAQ,OAAO,EAAA,CAAA,CAAO,CAAC,cAAc,SAAS,KAAA;;GAAW,SAAA,QAAQ,CAAR,EAAQ,EAAA,QAAA,SAAA,CAAA,CAAA;;;;;;;;IEdhL,IAA0B;CAAC;CAAa;CAAQ;CAAS;CAAY;CAAS;AAAQ,GAItF,IAA0B;CACrC,SAAS;CACT,kBAAkB;CAClB,OAAO;CACP,iBAAiB;CACjB,gBAAgB;CAChB,YAAY;CACZ,aAAa;CACb,oBAAoB;AACtB;AA6BA,SAAgB,EAAyB,GAAwC;CAC/E,OAAO,MAAY;AACrB;AAEA,SAAgB,EAA0B,GAAuC;CAC/E,OAAO,MAAY,UAAU,MAAM;AACrC;;;;;;;;;;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;;;;;;;;IAE7D,CAAA,GAAA,EAQM,OARN,GAQM,CAPU,EAAM,YAAO,WAEW,EAAA,IAAA,EAAA,KAFtC,EAAA,GAAA,EAGS,UAHT,GAGS,CAFP,EAA+C,EAAA,CAAA,CAAA,CAAA,SAAA,EAAA,EAAtB,EAAM,YAAY,CAAA,GAAA,MAAA,EAAA,GAC3C,EAAwC,EAAA,QAAA,WAAA,EAAA,EAAX,CAAO,CAAA,CAAA,CAAA,CAAA,IAEtC,EAEM,OAFN,GAEM,CADJ,EAA0E,OAA1E,GAA0E,CAA/B,EAAyB,EAAA,QAAA,WAAA,EAAA,EAAX,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA"}
@@ -0,0 +1,265 @@
1
+ import { t as e } from "./avatar-BTIZnxA-.js";
2
+ import { t } from "./Button-Da1Xjklh.js";
3
+ import { t as n } from "./dropdown-Dedb1tk8.js";
4
+ import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, mergeProps as f, nextTick as p, openBlock as m, ref as h, renderList as g, renderSlot as _, resolveDynamicComponent as v, toDisplayString as y, unref as b, withCtx as x } from "vue";
5
+ //#region src/blocks/workspace-switcher/WorkspaceSwitcherBadge.vue?vue&type=script&setup=true&lang.ts
6
+ var S = ["data-large"], C = { key: 2 }, w = /* @__PURE__ */ d({
7
+ __name: "WorkspaceSwitcherBadge",
8
+ props: {
9
+ item: {},
10
+ large: { type: Boolean }
11
+ },
12
+ setup(t) {
13
+ return (n, r) => (m(), s("span", {
14
+ class: "kappa-workspace-switcher__badge",
15
+ "data-large": t.large || void 0,
16
+ "aria-hidden": "true"
17
+ }, [t.item.avatarSrc ? (m(), a(b(e).Root, {
18
+ key: 0,
19
+ class: "kappa-workspace-switcher__avatar"
20
+ }, {
21
+ default: x(() => [u(b(e).Image, {
22
+ src: t.item.avatarSrc,
23
+ alt: ""
24
+ }, null, 8, ["src"]), u(b(e).Fallback, null, {
25
+ default: x(() => [l(y(t.item.initials ?? t.item.name.slice(0, 2).toUpperCase()), 1)]),
26
+ _: 1
27
+ })]),
28
+ _: 1
29
+ })) : t.item.icon ? (m(), a(v(t.item.icon), { key: 1 })) : (m(), s("span", C, y(t.item.initials ?? t.item.name.slice(0, 2).toUpperCase()), 1))], 8, S));
30
+ }
31
+ }), T = /* @__PURE__ */ d({
32
+ __name: "WorkspaceSwitcherActions",
33
+ props: {
34
+ items: {},
35
+ section: {}
36
+ },
37
+ emits: ["action"],
38
+ setup(e) {
39
+ return (t, i) => (m(), a(b(n).Group, null, {
40
+ default: x(() => [e.section === "footer" ? (m(), a(b(n).Separator, { key: 0 })) : o("", !0), (m(!0), s(r, null, g(e.items, (r) => (m(), a(b(n).Item, {
41
+ key: r.value,
42
+ value: `workspace-action:${e.section}:${r.value}`,
43
+ "value-text": r.label,
44
+ icon: r.icon,
45
+ disabled: r.disabled,
46
+ variant: r.variant,
47
+ "data-accent": r.accent || void 0,
48
+ class: "kappa-workspace-switcher__action",
49
+ onSelect: (e) => t.$emit("action", r)
50
+ }, {
51
+ default: x(() => [l(y(r.label), 1)]),
52
+ _: 2
53
+ }, 1032, [
54
+ "value",
55
+ "value-text",
56
+ "icon",
57
+ "disabled",
58
+ "variant",
59
+ "data-accent",
60
+ "onSelect"
61
+ ]))), 128))]),
62
+ _: 1
63
+ }));
64
+ }
65
+ }), E = {
66
+ placement: "bottom-start",
67
+ strategy: "fixed",
68
+ gutter: 6,
69
+ fitViewport: !0,
70
+ overflowPadding: 8
71
+ }, D = { class: "kappa-workspace-switcher__trigger-name" }, O = {
72
+ key: 0,
73
+ class: "kappa-workspace-switcher__current",
74
+ "data-slot": "workspace-switcher-current"
75
+ }, k = { class: "kappa-workspace-switcher__identity" }, A = { key: 0 }, j = { class: "kappa-workspace-switcher__name" }, M = "workspace:", N = /* @__PURE__ */ d({
76
+ inheritAttrs: !1,
77
+ __name: "WorkspaceSwitcher",
78
+ props: {
79
+ items: {},
80
+ modelValue: {},
81
+ label: { default: "Workspaces" },
82
+ placeholder: { default: "Select workspace" },
83
+ triggerLabel: {},
84
+ accountLabel: {},
85
+ actions: { default: () => [] },
86
+ workspaceActions: { default: () => [] },
87
+ footerActions: { default: () => [] },
88
+ disabled: {
89
+ type: Boolean,
90
+ default: !1
91
+ },
92
+ open: {
93
+ type: Boolean,
94
+ default: void 0
95
+ },
96
+ defaultOpen: {
97
+ type: Boolean,
98
+ default: !1
99
+ },
100
+ dir: { default: void 0 },
101
+ positioning: { default: () => ({ ...E }) },
102
+ teleport: {
103
+ type: Boolean,
104
+ default: !0
105
+ }
106
+ },
107
+ emits: [
108
+ "update:modelValue",
109
+ "update:open",
110
+ "openChange",
111
+ "action"
112
+ ],
113
+ setup(e, { emit: d }) {
114
+ let v = e, S = d, C = h(), N = i(() => v.items.find((e) => e.value === v.modelValue)), P = i(() => M + v.modelValue), F = i(() => ({
115
+ ...E,
116
+ ...v.positioning
117
+ })), I = i(() => v.triggerLabel ?? (N.value ? `${v.label}: ${N.value.name}` : v.placeholder));
118
+ async function L(e) {
119
+ await p();
120
+ let t = C.value;
121
+ if (!t || e.highlightedValue === null) return;
122
+ let n = Array.from(t.querySelectorAll("[data-part=\"item\"]")).find((t) => t.dataset.value === e.highlightedValue && t.hasAttribute("data-highlighted"));
123
+ if (!n) return;
124
+ let r = t.getBoundingClientRect(), i = n.getBoundingClientRect();
125
+ (i.top < r.top || i.bottom > r.bottom) && n.scrollIntoView({
126
+ block: "nearest",
127
+ inline: "nearest"
128
+ });
129
+ }
130
+ return (e, i) => (m(), a(b(n).Root, {
131
+ open: v.open,
132
+ "default-open": v.defaultOpen,
133
+ dir: v.dir,
134
+ positioning: F.value,
135
+ "lazy-mount": !v.teleport,
136
+ "unmount-on-exit": !v.teleport,
137
+ "aria-label": v.label,
138
+ "onUpdate:open": i[4] ||= (e) => S("update:open", e),
139
+ onOpenChange: i[5] ||= (e) => S("openChange", e),
140
+ onHighlightChange: L
141
+ }, {
142
+ default: x(() => [u(b(n).Trigger, { "as-child": "" }, {
143
+ default: x(() => [_(e.$slots, "trigger", {
144
+ workspace: N.value,
145
+ disabled: v.disabled
146
+ }, () => [u(b(t), {
147
+ variant: "ghost",
148
+ disabled: v.disabled,
149
+ "aria-label": I.value,
150
+ class: "kappa-workspace-switcher__trigger"
151
+ }, {
152
+ default: x(() => [
153
+ N.value ? (m(), a(w, {
154
+ key: 0,
155
+ item: N.value
156
+ }, null, 8, ["item"])) : o("", !0),
157
+ c("span", D, y(N.value?.name ?? v.placeholder), 1),
158
+ i[6] ||= c("svg", {
159
+ class: "kappa-workspace-switcher__chevron",
160
+ viewBox: "0 0 16 16",
161
+ "aria-hidden": "true",
162
+ focusable: "false"
163
+ }, [c("path", { d: "m5 6 3-3 3 3M5 10l3 3 3-3" })], -1)
164
+ ]),
165
+ _: 1
166
+ }, 8, ["disabled", "aria-label"])])]),
167
+ _: 3
168
+ }), u(b(n).Context, null, {
169
+ default: x((t) => [u(b(n).Content, f(e.$attrs, {
170
+ teleport: v.teleport,
171
+ inert: !t.open || void 0,
172
+ class: "kappa-workspace-switcher",
173
+ "data-workspace-switcher": ""
174
+ }), {
175
+ default: x(() => [c("div", {
176
+ ref_key: "scrollBody",
177
+ ref: C,
178
+ class: "kappa-workspace-switcher__body"
179
+ }, [
180
+ N.value ? (m(), s("div", O, [u(w, {
181
+ item: N.value,
182
+ large: ""
183
+ }, null, 8, ["item"]), c("div", k, [c("strong", null, y(N.value.name), 1), N.value.description ? (m(), s("span", A, y(N.value.description), 1)) : o("", !0)])])) : o("", !0),
184
+ v.actions.length ? (m(), s(r, { key: 1 }, [u(b(n).Separator), u(T, {
185
+ items: v.actions,
186
+ section: "primary",
187
+ onAction: i[0] ||= (e) => S("action", e)
188
+ }, null, 8, ["items"])], 64)) : o("", !0),
189
+ N.value || v.actions.length ? (m(), a(b(n).Separator, { key: 2 })) : o("", !0),
190
+ u(b(n).RadioGroup, {
191
+ "model-value": P.value,
192
+ "onUpdate:modelValue": i[1] ||= (e) => S("update:modelValue", e.slice(10))
193
+ }, {
194
+ default: x(() => [u(b(n).Label, { class: "kappa-workspace-switcher__label" }, {
195
+ default: x(() => [l(y(v.accountLabel ?? v.label), 1)]),
196
+ _: 1
197
+ }), (m(!0), s(r, null, g(v.items, (e) => (m(), a(b(n).RadioItem, {
198
+ key: e.value,
199
+ value: M + e.value,
200
+ "value-text": e.name,
201
+ "aria-label": e.name,
202
+ "aria-keyshortcuts": e.ariaKeyshortcuts,
203
+ disabled: e.disabled,
204
+ "close-on-select": "",
205
+ class: "kappa-workspace-switcher__option"
206
+ }, {
207
+ indicator: x(() => [...i[7] ||= [c("svg", {
208
+ viewBox: "0 0 16 16",
209
+ "aria-hidden": "true",
210
+ focusable: "false"
211
+ }, [c("path", { d: "m3 8.25 3 3 7-7" })], -1)]]),
212
+ default: x(() => [
213
+ u(w, { item: e }, null, 8, ["item"]),
214
+ c("span", j, y(e.name), 1),
215
+ e.shortcut ? (m(), a(b(n).Shortcut, {
216
+ key: 0,
217
+ "aria-hidden": "true"
218
+ }, {
219
+ default: x(() => [l(y(e.shortcut), 1)]),
220
+ _: 2
221
+ }, 1024)) : o("", !0)
222
+ ]),
223
+ _: 2
224
+ }, 1032, [
225
+ "value",
226
+ "value-text",
227
+ "aria-label",
228
+ "aria-keyshortcuts",
229
+ "disabled"
230
+ ]))), 128))]),
231
+ _: 1
232
+ }, 8, ["model-value"]),
233
+ v.workspaceActions.length ? (m(), a(T, {
234
+ key: 3,
235
+ items: v.workspaceActions,
236
+ section: "workspace",
237
+ onAction: i[2] ||= (e) => S("action", e)
238
+ }, null, 8, ["items"])) : o("", !0)
239
+ ], 512), v.footerActions.length ? (m(), a(T, {
240
+ key: 0,
241
+ items: v.footerActions,
242
+ section: "footer",
243
+ class: "kappa-workspace-switcher__footer",
244
+ onAction: i[3] ||= (e) => S("action", e)
245
+ }, null, 8, ["items"])) : o("", !0)]),
246
+ _: 1
247
+ }, 16, ["teleport", "inert"])]),
248
+ _: 1
249
+ })]),
250
+ _: 3
251
+ }, 8, [
252
+ "open",
253
+ "default-open",
254
+ "dir",
255
+ "positioning",
256
+ "lazy-mount",
257
+ "unmount-on-exit",
258
+ "aria-label"
259
+ ]));
260
+ }
261
+ });
262
+ //#endregion
263
+ export { E as n, N as t };
264
+
265
+ //# sourceMappingURL=WorkspaceSwitcher-DBWdKZbM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WorkspaceSwitcher-DBWdKZbM.js","names":["$emit","$attrs"],"sources":["../src/blocks/workspace-switcher/WorkspaceSwitcherBadge.vue","../src/blocks/workspace-switcher/WorkspaceSwitcherBadge.vue","../src/blocks/workspace-switcher/WorkspaceSwitcherActions.vue","../src/blocks/workspace-switcher/WorkspaceSwitcherActions.vue","../src/blocks/workspace-switcher/workspace-switcher.ts","../src/blocks/workspace-switcher/WorkspaceSwitcher.vue","../src/blocks/workspace-switcher/WorkspaceSwitcher.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { Avatar } from \"../../components/avatar\";\nimport type { WorkspaceSwitcherItem } from \"./workspace-switcher\";\ndefineProps<{ item: WorkspaceSwitcherItem; large?: boolean }>();\n</script>\n\n<template>\n <span class=\"kappa-workspace-switcher__badge\" :data-large=\"large || undefined\" aria-hidden=\"true\">\n <Avatar.Root v-if=\"item.avatarSrc\" class=\"kappa-workspace-switcher__avatar\">\n <Avatar.Image :src=\"item.avatarSrc\" alt=\"\" />\n <Avatar.Fallback>{{ item.initials ?? item.name.slice(0, 2).toUpperCase() }}</Avatar.Fallback>\n </Avatar.Root>\n <component :is=\"item.icon\" v-else-if=\"item.icon\" />\n <span v-else>{{ item.initials ?? item.name.slice(0, 2).toUpperCase() }}</span>\n </span>\n</template>\n","<script setup lang=\"ts\">\nimport { Avatar } from \"../../components/avatar\";\nimport type { WorkspaceSwitcherItem } from \"./workspace-switcher\";\ndefineProps<{ item: WorkspaceSwitcherItem; large?: boolean }>();\n</script>\n\n<template>\n <span class=\"kappa-workspace-switcher__badge\" :data-large=\"large || undefined\" aria-hidden=\"true\">\n <Avatar.Root v-if=\"item.avatarSrc\" class=\"kappa-workspace-switcher__avatar\">\n <Avatar.Image :src=\"item.avatarSrc\" alt=\"\" />\n <Avatar.Fallback>{{ item.initials ?? item.name.slice(0, 2).toUpperCase() }}</Avatar.Fallback>\n </Avatar.Root>\n <component :is=\"item.icon\" v-else-if=\"item.icon\" />\n <span v-else>{{ item.initials ?? item.name.slice(0, 2).toUpperCase() }}</span>\n </span>\n</template>\n","<script setup lang=\"ts\">\nimport { Dropdown } from \"../../components/dropdown\";\nimport type { WorkspaceSwitcherAction } from \"./workspace-switcher\";\ndefineProps<{ items: readonly WorkspaceSwitcherAction[]; section: \"primary\" | \"workspace\" | \"footer\" }>();\ndefineEmits<{ action: [action: WorkspaceSwitcherAction] }>();\n</script>\n\n<template>\n <Dropdown.Group>\n <Dropdown.Separator v-if=\"section === 'footer'\" />\n <Dropdown.Item v-for=\"action in items\" :key=\"action.value\" :value=\"`workspace-action:${section}:${action.value}`\"\n :value-text=\"action.label\" :icon=\"action.icon\" :disabled=\"action.disabled\" :variant=\"action.variant\"\n :data-accent=\"action.accent || undefined\" class=\"kappa-workspace-switcher__action\"\n @select=\"$emit('action', action)\">{{ action.label }}</Dropdown.Item>\n </Dropdown.Group>\n</template>\n","<script setup lang=\"ts\">\nimport { Dropdown } from \"../../components/dropdown\";\nimport type { WorkspaceSwitcherAction } from \"./workspace-switcher\";\ndefineProps<{ items: readonly WorkspaceSwitcherAction[]; section: \"primary\" | \"workspace\" | \"footer\" }>();\ndefineEmits<{ action: [action: WorkspaceSwitcherAction] }>();\n</script>\n\n<template>\n <Dropdown.Group>\n <Dropdown.Separator v-if=\"section === 'footer'\" />\n <Dropdown.Item v-for=\"action in items\" :key=\"action.value\" :value=\"`workspace-action:${section}:${action.value}`\"\n :value-text=\"action.label\" :icon=\"action.icon\" :disabled=\"action.disabled\" :variant=\"action.variant\"\n :data-accent=\"action.accent || undefined\" class=\"kappa-workspace-switcher__action\"\n @select=\"$emit('action', action)\">{{ action.label }}</Dropdown.Item>\n </Dropdown.Group>\n</template>\n","import type { Component, VNodeChild } from \"vue\";\nimport type { DropdownDirection, DropdownEmits, DropdownItemVariant, DropdownPositioningOptions } from \"../../components/dropdown\";\n\nexport interface WorkspaceSwitcherItem {\n value: string;\n name: string;\n /** Plan, member count, or other application-provided details. */\n description?: string;\n icon?: Component;\n avatarSrc?: string;\n initials?: string;\n disabled?: boolean;\n shortcut?: string;\n ariaKeyshortcuts?: string;\n}\n\nexport interface WorkspaceSwitcherAction {\n value: string;\n label: string;\n icon?: Component;\n disabled?: boolean;\n variant?: DropdownItemVariant;\n accent?: boolean;\n}\n\nexport const WORKSPACE_SWITCHER_DEFAULT_POSITIONING = {\n placement: \"bottom-start\", strategy: \"fixed\", gutter: 6, fitViewport: true, overflowPadding: 8,\n} as const satisfies DropdownPositioningOptions;\n\nexport interface WorkspaceSwitcherProps {\n items: readonly WorkspaceSwitcherItem[];\n /** Controlled workspace selection. */\n modelValue: string;\n label?: string;\n placeholder?: string;\n triggerLabel?: string;\n accountLabel?: string;\n /** Actions below the current workspace details. */\n actions?: readonly WorkspaceSwitcherAction[];\n /** Actions below the workspace list, such as creation or browsing. */\n workspaceActions?: readonly WorkspaceSwitcherAction[];\n footerActions?: readonly WorkspaceSwitcherAction[];\n disabled?: boolean;\n open?: boolean;\n defaultOpen?: boolean;\n dir?: DropdownDirection;\n positioning?: DropdownPositioningOptions;\n /** Disable inside a mobile drawer to keep its menu in the dialog. */\n teleport?: boolean;\n}\n\nexport type WorkspaceSwitcherEmits = {\n \"update:modelValue\": [value: string];\n \"update:open\": [value: boolean];\n openChange: [details: DropdownEmits[\"openChange\"][0]];\n action: [action: WorkspaceSwitcherAction];\n};\n\nexport interface WorkspaceSwitcherSlots {\n /** One button or link. Bind disabled when supplying a custom trigger. */\n trigger?: (context: { workspace: WorkspaceSwitcherItem | undefined; disabled: boolean }) => VNodeChild;\n}\n","<script setup lang=\"ts\">\nimport { computed, nextTick, ref } from \"vue\";\nimport { Button } from \"../../components/button\";\nimport { Dropdown } from \"../../components/dropdown\";\nimport WorkspaceSwitcherBadge from \"./WorkspaceSwitcherBadge.vue\";\nimport WorkspaceSwitcherActions from \"./WorkspaceSwitcherActions.vue\";\nimport { WORKSPACE_SWITCHER_DEFAULT_POSITIONING, type WorkspaceSwitcherEmits, type WorkspaceSwitcherProps, type WorkspaceSwitcherSlots } from \"./workspace-switcher\";\n\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<WorkspaceSwitcherProps>(), {\n label: \"Workspaces\", placeholder: \"Select workspace\", disabled: false,\n open: undefined, defaultOpen: false, dir: undefined, teleport: true,\n positioning: () => ({ ...WORKSPACE_SWITCHER_DEFAULT_POSITIONING }),\n actions: () => [], workspaceActions: () => [], footerActions: () => [],\n});\nconst emit = defineEmits<WorkspaceSwitcherEmits>();\ndefineSlots<WorkspaceSwitcherSlots>();\nconst scrollBody = ref<HTMLElement>();\nconst current = computed(() => props.items.find(item => item.value === props.modelValue));\nconst workspacePrefix = \"workspace:\";\nconst menuValue = computed(() => workspacePrefix + props.modelValue);\nconst positioning = computed(() => ({ ...WORKSPACE_SWITCHER_DEFAULT_POSITIONING, ...props.positioning }));\nconst triggerLabel = computed(() => props.triggerLabel ?? (current.value ? `${props.label}: ${current.value.name}` : props.placeholder));\nasync function scrollHighlighted(details: { highlightedValue: string | null }) {\n await nextTick();\n const body = scrollBody.value;\n if (!body || details.highlightedValue === null) return;\n const item = Array.from(body.querySelectorAll<HTMLElement>('[data-part=\"item\"]'))\n .find(item => item.dataset.value === details.highlightedValue && item.hasAttribute(\"data-highlighted\"));\n if (!item) return;\n const bounds = body.getBoundingClientRect();\n const row = item.getBoundingClientRect();\n if (row.top < bounds.top || row.bottom > bounds.bottom) item.scrollIntoView({ block: \"nearest\", inline: \"nearest\" });\n}\n</script>\n\n<template>\n <Dropdown.Root :open=\"props.open\" :default-open=\"props.defaultOpen\" :dir=\"props.dir\" :positioning=\"positioning\"\n :lazy-mount=\"!props.teleport\" :unmount-on-exit=\"!props.teleport\"\n :aria-label=\"props.label\" @update:open=\"emit('update:open', $event)\" @open-change=\"emit('openChange', $event)\"\n @highlight-change=\"scrollHighlighted\">\n <Dropdown.Trigger as-child>\n <slot name=\"trigger\" :workspace=\"current\" :disabled=\"props.disabled\">\n <Button variant=\"ghost\" :disabled=\"props.disabled\" :aria-label=\"triggerLabel\" class=\"kappa-workspace-switcher__trigger\">\n <WorkspaceSwitcherBadge v-if=\"current\" :item=\"current\" />\n <span class=\"kappa-workspace-switcher__trigger-name\">{{ current?.name ?? props.placeholder }}</span>\n <svg class=\"kappa-workspace-switcher__chevron\" viewBox=\"0 0 16 16\" aria-hidden=\"true\" focusable=\"false\"><path d=\"m5 6 3-3 3 3M5 10l3 3 3-3\" /></svg>\n </Button>\n </slot>\n </Dropdown.Trigger>\n <Dropdown.Context v-slot=\"menu\">\n <Dropdown.Content v-bind=\"$attrs\" :teleport=\"props.teleport\" :inert=\"!menu.open || undefined\"\n class=\"kappa-workspace-switcher\" data-workspace-switcher>\n <div ref=\"scrollBody\" class=\"kappa-workspace-switcher__body\">\n <div v-if=\"current\" class=\"kappa-workspace-switcher__current\" data-slot=\"workspace-switcher-current\">\n <WorkspaceSwitcherBadge :item=\"current\" large />\n <div class=\"kappa-workspace-switcher__identity\"><strong>{{ current.name }}</strong><span v-if=\"current.description\">{{ current.description }}</span></div>\n </div>\n <template v-if=\"props.actions.length\">\n <Dropdown.Separator />\n <WorkspaceSwitcherActions :items=\"props.actions\" section=\"primary\" @action=\"emit('action', $event)\" />\n </template>\n <Dropdown.Separator v-if=\"current || props.actions.length\" />\n <Dropdown.RadioGroup :model-value=\"menuValue\" @update:model-value=\"emit('update:modelValue', $event.slice(workspacePrefix.length))\">\n <Dropdown.Label class=\"kappa-workspace-switcher__label\">{{ props.accountLabel ?? props.label }}</Dropdown.Label>\n <Dropdown.RadioItem v-for=\"item in props.items\" :key=\"item.value\" :value=\"workspacePrefix + item.value\" :value-text=\"item.name\"\n :aria-label=\"item.name\" :aria-keyshortcuts=\"item.ariaKeyshortcuts\" :disabled=\"item.disabled\" close-on-select\n class=\"kappa-workspace-switcher__option\">\n <template #indicator><svg viewBox=\"0 0 16 16\" aria-hidden=\"true\" focusable=\"false\"><path d=\"m3 8.25 3 3 7-7\" /></svg></template>\n <WorkspaceSwitcherBadge :item=\"item\" />\n <span class=\"kappa-workspace-switcher__name\">{{ item.name }}</span>\n <Dropdown.Shortcut v-if=\"item.shortcut\" aria-hidden=\"true\">{{ item.shortcut }}</Dropdown.Shortcut>\n </Dropdown.RadioItem>\n </Dropdown.RadioGroup>\n <WorkspaceSwitcherActions v-if=\"props.workspaceActions.length\" :items=\"props.workspaceActions\" section=\"workspace\" @action=\"emit('action', $event)\" />\n </div>\n <WorkspaceSwitcherActions v-if=\"props.footerActions.length\" :items=\"props.footerActions\" section=\"footer\"\n class=\"kappa-workspace-switcher__footer\" @action=\"emit('action', $event)\" />\n </Dropdown.Content>\n </Dropdown.Context>\n </Dropdown.Root>\n</template>\n\n<style src=\"./workspace-switcher.css\"></style>\n","<script setup lang=\"ts\">\nimport { computed, nextTick, ref } from \"vue\";\nimport { Button } from \"../../components/button\";\nimport { Dropdown } from \"../../components/dropdown\";\nimport WorkspaceSwitcherBadge from \"./WorkspaceSwitcherBadge.vue\";\nimport WorkspaceSwitcherActions from \"./WorkspaceSwitcherActions.vue\";\nimport { WORKSPACE_SWITCHER_DEFAULT_POSITIONING, type WorkspaceSwitcherEmits, type WorkspaceSwitcherProps, type WorkspaceSwitcherSlots } from \"./workspace-switcher\";\n\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<WorkspaceSwitcherProps>(), {\n label: \"Workspaces\", placeholder: \"Select workspace\", disabled: false,\n open: undefined, defaultOpen: false, dir: undefined, teleport: true,\n positioning: () => ({ ...WORKSPACE_SWITCHER_DEFAULT_POSITIONING }),\n actions: () => [], workspaceActions: () => [], footerActions: () => [],\n});\nconst emit = defineEmits<WorkspaceSwitcherEmits>();\ndefineSlots<WorkspaceSwitcherSlots>();\nconst scrollBody = ref<HTMLElement>();\nconst current = computed(() => props.items.find(item => item.value === props.modelValue));\nconst workspacePrefix = \"workspace:\";\nconst menuValue = computed(() => workspacePrefix + props.modelValue);\nconst positioning = computed(() => ({ ...WORKSPACE_SWITCHER_DEFAULT_POSITIONING, ...props.positioning }));\nconst triggerLabel = computed(() => props.triggerLabel ?? (current.value ? `${props.label}: ${current.value.name}` : props.placeholder));\nasync function scrollHighlighted(details: { highlightedValue: string | null }) {\n await nextTick();\n const body = scrollBody.value;\n if (!body || details.highlightedValue === null) return;\n const item = Array.from(body.querySelectorAll<HTMLElement>('[data-part=\"item\"]'))\n .find(item => item.dataset.value === details.highlightedValue && item.hasAttribute(\"data-highlighted\"));\n if (!item) return;\n const bounds = body.getBoundingClientRect();\n const row = item.getBoundingClientRect();\n if (row.top < bounds.top || row.bottom > bounds.bottom) item.scrollIntoView({ block: \"nearest\", inline: \"nearest\" });\n}\n</script>\n\n<template>\n <Dropdown.Root :open=\"props.open\" :default-open=\"props.defaultOpen\" :dir=\"props.dir\" :positioning=\"positioning\"\n :lazy-mount=\"!props.teleport\" :unmount-on-exit=\"!props.teleport\"\n :aria-label=\"props.label\" @update:open=\"emit('update:open', $event)\" @open-change=\"emit('openChange', $event)\"\n @highlight-change=\"scrollHighlighted\">\n <Dropdown.Trigger as-child>\n <slot name=\"trigger\" :workspace=\"current\" :disabled=\"props.disabled\">\n <Button variant=\"ghost\" :disabled=\"props.disabled\" :aria-label=\"triggerLabel\" class=\"kappa-workspace-switcher__trigger\">\n <WorkspaceSwitcherBadge v-if=\"current\" :item=\"current\" />\n <span class=\"kappa-workspace-switcher__trigger-name\">{{ current?.name ?? props.placeholder }}</span>\n <svg class=\"kappa-workspace-switcher__chevron\" viewBox=\"0 0 16 16\" aria-hidden=\"true\" focusable=\"false\"><path d=\"m5 6 3-3 3 3M5 10l3 3 3-3\" /></svg>\n </Button>\n </slot>\n </Dropdown.Trigger>\n <Dropdown.Context v-slot=\"menu\">\n <Dropdown.Content v-bind=\"$attrs\" :teleport=\"props.teleport\" :inert=\"!menu.open || undefined\"\n class=\"kappa-workspace-switcher\" data-workspace-switcher>\n <div ref=\"scrollBody\" class=\"kappa-workspace-switcher__body\">\n <div v-if=\"current\" class=\"kappa-workspace-switcher__current\" data-slot=\"workspace-switcher-current\">\n <WorkspaceSwitcherBadge :item=\"current\" large />\n <div class=\"kappa-workspace-switcher__identity\"><strong>{{ current.name }}</strong><span v-if=\"current.description\">{{ current.description }}</span></div>\n </div>\n <template v-if=\"props.actions.length\">\n <Dropdown.Separator />\n <WorkspaceSwitcherActions :items=\"props.actions\" section=\"primary\" @action=\"emit('action', $event)\" />\n </template>\n <Dropdown.Separator v-if=\"current || props.actions.length\" />\n <Dropdown.RadioGroup :model-value=\"menuValue\" @update:model-value=\"emit('update:modelValue', $event.slice(workspacePrefix.length))\">\n <Dropdown.Label class=\"kappa-workspace-switcher__label\">{{ props.accountLabel ?? props.label }}</Dropdown.Label>\n <Dropdown.RadioItem v-for=\"item in props.items\" :key=\"item.value\" :value=\"workspacePrefix + item.value\" :value-text=\"item.name\"\n :aria-label=\"item.name\" :aria-keyshortcuts=\"item.ariaKeyshortcuts\" :disabled=\"item.disabled\" close-on-select\n class=\"kappa-workspace-switcher__option\">\n <template #indicator><svg viewBox=\"0 0 16 16\" aria-hidden=\"true\" focusable=\"false\"><path d=\"m3 8.25 3 3 7-7\" /></svg></template>\n <WorkspaceSwitcherBadge :item=\"item\" />\n <span class=\"kappa-workspace-switcher__name\">{{ item.name }}</span>\n <Dropdown.Shortcut v-if=\"item.shortcut\" aria-hidden=\"true\">{{ item.shortcut }}</Dropdown.Shortcut>\n </Dropdown.RadioItem>\n </Dropdown.RadioGroup>\n <WorkspaceSwitcherActions v-if=\"props.workspaceActions.length\" :items=\"props.workspaceActions\" section=\"workspace\" @action=\"emit('action', $event)\" />\n </div>\n <WorkspaceSwitcherActions v-if=\"props.footerActions.length\" :items=\"props.footerActions\" section=\"footer\"\n class=\"kappa-workspace-switcher__footer\" @action=\"emit('action', $event)\" />\n </Dropdown.Content>\n </Dropdown.Context>\n </Dropdown.Root>\n</template>\n\n<style src=\"./workspace-switcher.css\"></style>\n"],"mappings":";;;;;;;;;;;;oBAOE,EAAA,GAAA,EAOO,QAAA;GAPD,OAAM;GAAmC,cAAY,EAAA,SAAS,KAAA;GAAW,eAAY;EACtE,GAAA,CAAA,EAAA,KAAK,aAAxB,EAAA,GAAA,EAGc,EAAA,CAAA,CAAA,CAAA,MAAA;;GAHqB,OAAM;;GACvC,SAAA,QAA6C,CAA7C,EAA6C,EAAA,CAAA,CAAA,CAAA,OAAA;IAA9B,KAAK,EAAA,KAAK;IAAW,KAAI;GACxC,GAAA,MAAA,GAAA,CAAA,KAAA,CAAA,GAAA,EAA6F,EAAA,CAAA,CAAA,CAAA,UAAA,MAAA;IAA5E,SAAA,QAA0D,CAAvD,EAAA,EAAA,EAAA,KAAK,YAAY,EAAA,KAAK,KAAK,MAAK,GAAA,CAAA,CAAA,CAAO,YAAW,CAAA,GAAA,CAAA,CAAA,CAAA;;;;EAElC,CAAA,KAAA,EAAA,KAAK,QAA3C,EAAA,GAAA,EAAmD,EAAnC,EAAA,KAAK,IAAI,GAAA,EAAA,KAAA,EAAA,CAAA,MACzB,EAAA,GAAA,EAA8E,QAAA,GAAA,EAA9D,EAAA,KAAK,YAAY,EAAA,KAAK,KAAK,MAAK,GAAA,CAAA,CAAA,CAAO,YAAW,CAAA,GAAA,CAAA,EAAA,GAAA,GAAA,CAAA;;;;;;;;;;oBELpE,EAAA,GAAA,EAMiB,EAAA,CAAA,CAAA,CAAA,OAAA,MAAA;GALf,SAAA,QAAkD,CAAxB,EAAA,YAAO,YAAjC,EAAA,GAAA,EAAkD,EAAA,CAAA,CAAA,CAAA,WAAA,EAAA,KAAA,EAAA,CAAA,KAA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-BU08V7Lh.js";
1
+ import { n as e, r as t, t as n } from "../file-browser-tqo1PirD.js";
2
2
  export { t as FILE_BROWSER_DEFAULT_LABELS, n as FileBrowser, e as FileBrowserRoot };
@@ -5,3 +5,5 @@ export * from './message-composer/index';
5
5
  export * from './resource-picker/index';
6
6
  export * from './resource-list-layout/index';
7
7
  export * from './sidebar-layout/index';
8
+ export * from './settings-layout/index';
9
+ export * from './workspace-switcher/index';
@@ -0,0 +1,11 @@
1
+ import { SettingsLayoutProps, SettingsLayoutSlots } from './settings-layout';
2
+ type __VLS_Slots = SettingsLayoutSlots;
3
+ declare const __VLS_base: import('vue').DefineComponent<SettingsLayoutProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SettingsLayoutProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
4
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
7
+ type __VLS_WithSlots<T, S> = T & {
8
+ new (): {
9
+ $slots: S;
10
+ };
11
+ };
@@ -0,0 +1,30 @@
1
+ import { Collapsible as ArkCollapsible } from '@ark-ui/vue/collapsible';
2
+ import { SettingsSectionProps, SettingsSectionSlots } from './settings-layout';
3
+ type __VLS_Slots = SettingsSectionSlots;
4
+ declare const __VLS_base: import('vue').DefineComponent<SettingsSectionProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
5
+ exitComplete: () => any;
6
+ openChange: (details: ArkCollapsible.OpenChangeDetails) => any;
7
+ "update:open": (open: boolean) => any;
8
+ }, string, import('vue').PublicProps, Readonly<SettingsSectionProps> & Readonly<{
9
+ onExitComplete?: (() => any) | undefined;
10
+ onOpenChange?: ((details: ArkCollapsible.OpenChangeDetails) => any) | undefined;
11
+ "onUpdate:open"?: ((open: boolean) => any) | undefined;
12
+ }>, {
13
+ collapsible: boolean;
14
+ disabled: boolean;
15
+ lazyMount: boolean;
16
+ unmountOnExit: boolean;
17
+ open: boolean;
18
+ defaultOpen: boolean;
19
+ closeLabel: string;
20
+ expandLabel: string;
21
+ headingLevel: 2 | 3 | 4;
22
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
23
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
+ declare const _default: typeof __VLS_export;
25
+ export default _default;
26
+ type __VLS_WithSlots<T, S> = T & {
27
+ new (): {
28
+ $slots: S;
29
+ };
30
+ };
@@ -0,0 +1,7 @@
1
+ import type SettingsLayoutRoot from "./SettingsLayout.vue";
2
+ import { default as SettingsSection } from './SettingsSection.vue';
3
+ export declare const SettingsLayout: typeof SettingsLayoutRoot & {
4
+ Section: typeof SettingsSection;
5
+ };
6
+ export { SettingsSection };
7
+ export type { SettingsLayoutProps, SettingsLayoutSlots, SettingsSectionContext, SettingsSectionEmits, SettingsSectionProps, SettingsSectionSlots, } from './settings-layout';
@@ -0,0 +1,42 @@
1
+ import { CollapsibleRootProps, CollapsibleOpenChangeDetails } from '@ark-ui/vue/collapsible';
2
+ import { VNodeChild } from 'vue';
3
+ export interface SettingsLayoutProps {
4
+ title?: string;
5
+ description?: string;
6
+ }
7
+ export interface SettingsLayoutSlots {
8
+ title?: () => VNodeChild;
9
+ description?: () => VNodeChild;
10
+ actions?: () => VNodeChild;
11
+ navigation?: () => VNodeChild;
12
+ default?: () => VNodeChild;
13
+ }
14
+ export interface SettingsSectionProps {
15
+ title: string;
16
+ description?: string;
17
+ headingLevel?: 2 | 3 | 4;
18
+ collapsible?: boolean;
19
+ defaultOpen?: CollapsibleRootProps["defaultOpen"];
20
+ open?: CollapsibleRootProps["open"];
21
+ disabled?: CollapsibleRootProps["disabled"];
22
+ id?: CollapsibleRootProps["id"];
23
+ ids?: CollapsibleRootProps["ids"];
24
+ lazyMount?: CollapsibleRootProps["lazyMount"];
25
+ unmountOnExit?: CollapsibleRootProps["unmountOnExit"];
26
+ expandLabel?: string;
27
+ closeLabel?: string;
28
+ }
29
+ export type SettingsSectionEmits = {
30
+ "update:open": [open: boolean];
31
+ openChange: [details: CollapsibleOpenChangeDetails];
32
+ exitComplete: [];
33
+ };
34
+ export interface SettingsSectionContext {
35
+ open: boolean;
36
+ }
37
+ export interface SettingsSectionSlots {
38
+ title?: (context: SettingsSectionContext) => VNodeChild;
39
+ description?: (context: SettingsSectionContext) => VNodeChild;
40
+ actions?: (context: SettingsSectionContext) => VNodeChild;
41
+ default?: (context: SettingsSectionContext) => VNodeChild;
42
+ }
@@ -0,0 +1,2 @@
1
+ import { n as e, t } from "../settings-layout-RlKrLGUx.js";
2
+ export { t as SettingsLayout, e as SettingsSection };
@@ -37,6 +37,8 @@ declare const __VLS_base: import('vue').DefineComponent<SidebarLayoutProps, {},
37
37
  defaultMobileOpen: boolean;
38
38
  mobileBreakpoint: number;
39
39
  mobileWidth: string;
40
+ collapseOnResize: boolean;
41
+ contentAlignment: import('./sidebar-layout').SidebarLayoutContentAlignment;
40
42
  navigationLabel: string;
41
43
  secondaryLabel: string;
42
44
  resizeLabel: string;
@@ -1,3 +1,3 @@
1
1
  export { default as SidebarLayout } from './SidebarLayout.vue';
2
2
  export { SIDEBAR_LAYOUT_DEFAULTS, SIDEBAR_LAYOUT_VARIANTS } from './sidebar-layout';
3
- export type { SidebarLayoutProps, SidebarLayoutEmits, SidebarLayoutSlots, SidebarLayoutVariant } from './sidebar-layout';
3
+ export type { SidebarLayoutProps, SidebarLayoutEmits, SidebarLayoutSlots, SidebarLayoutVariant, SidebarLayoutContentAlignment } from './sidebar-layout';
@@ -2,8 +2,10 @@ import { VNodeChild } from 'vue';
2
2
  import { SidebarContextValue, SidebarProviderEmits, SidebarProviderProps, SidebarTriggerProps } from '../../components/sidebar/index';
3
3
  export declare const SIDEBAR_LAYOUT_VARIANTS: readonly ["workspace", "rail", "inset", "floating", "split", "header"];
4
4
  export type SidebarLayoutVariant = (typeof SIDEBAR_LAYOUT_VARIANTS)[number];
5
+ export type SidebarLayoutContentAlignment = "available" | "shell";
5
6
  export declare const SIDEBAR_LAYOUT_DEFAULTS: {
6
7
  readonly variant: "workspace";
8
+ readonly contentAlignment: "available";
7
9
  readonly label: "Application navigation";
8
10
  readonly navigationLabel: "Navigation links";
9
11
  readonly secondaryLabel: "Secondary navigation";
@@ -13,6 +15,8 @@ export declare const SIDEBAR_LAYOUT_DEFAULTS: {
13
15
  };
14
16
  export interface SidebarLayoutProps extends SidebarProviderProps {
15
17
  variant?: SidebarLayoutVariant;
18
+ /** Center the content region within the available space or the complete shell. */
19
+ contentAlignment?: SidebarLayoutContentAlignment;
16
20
  /** Name of the navigation landmark and mobile dialog. */
17
21
  label?: string;
18
22
  navigationLabel?: string;
@@ -1,2 +1,2 @@
1
- import { n as e, r as t, t as n } from "../SidebarLayout-Cs6OnqU2.js";
1
+ import { n as e, r as t, t as n } from "../SidebarLayout-D9RT-MdT.js";
2
2
  export { e as SIDEBAR_LAYOUT_DEFAULTS, t as SIDEBAR_LAYOUT_VARIANTS, n as SidebarLayout };
@@ -0,0 +1,33 @@
1
+ import { WorkspaceSwitcherProps, WorkspaceSwitcherSlots } from './workspace-switcher';
2
+ type __VLS_Slots = WorkspaceSwitcherSlots;
3
+ declare const __VLS_base: import('vue').DefineComponent<WorkspaceSwitcherProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
4
+ "update:modelValue": (value: string) => any;
5
+ openChange: (details: import('@zag-js/menu/dist').OpenChangeDetails) => any;
6
+ "update:open": (value: boolean) => any;
7
+ action: (action: import('./workspace-switcher').WorkspaceSwitcherAction) => any;
8
+ }, string, import('vue').PublicProps, Readonly<WorkspaceSwitcherProps> & Readonly<{
9
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
10
+ onOpenChange?: ((details: import('@zag-js/menu/dist').OpenChangeDetails) => any) | undefined;
11
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
12
+ onAction?: ((action: import('./workspace-switcher').WorkspaceSwitcherAction) => any) | undefined;
13
+ }>, {
14
+ disabled: boolean;
15
+ dir: import('../../index').ContextMenuDirection;
16
+ label: string;
17
+ placeholder: string;
18
+ open: boolean;
19
+ positioning: import('../../index').ContextMenuPositioningOptions;
20
+ defaultOpen: boolean;
21
+ teleport: boolean;
22
+ actions: readonly import('./workspace-switcher').WorkspaceSwitcherAction[];
23
+ workspaceActions: readonly import('./workspace-switcher').WorkspaceSwitcherAction[];
24
+ footerActions: readonly import('./workspace-switcher').WorkspaceSwitcherAction[];
25
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
26
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
27
+ declare const _default: typeof __VLS_export;
28
+ export default _default;
29
+ type __VLS_WithSlots<T, S> = T & {
30
+ new (): {
31
+ $slots: S;
32
+ };
33
+ };
@@ -0,0 +1,12 @@
1
+ import { WorkspaceSwitcherAction } from './workspace-switcher';
2
+ type __VLS_Props = {
3
+ items: readonly WorkspaceSwitcherAction[];
4
+ section: "primary" | "workspace" | "footer";
5
+ };
6
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
+ action: (action: WorkspaceSwitcherAction) => any;
8
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
9
+ onAction?: ((action: WorkspaceSwitcherAction) => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import { WorkspaceSwitcherItem } from './workspace-switcher';
2
+ type __VLS_Props = {
3
+ item: WorkspaceSwitcherItem;
4
+ large?: boolean;
5
+ };
6
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export { default as WorkspaceSwitcher } from './WorkspaceSwitcher.vue';
2
+ export { WORKSPACE_SWITCHER_DEFAULT_POSITIONING } from './workspace-switcher';
3
+ export type { WorkspaceSwitcherAction, WorkspaceSwitcherEmits, WorkspaceSwitcherItem, WorkspaceSwitcherProps, WorkspaceSwitcherSlots } from './workspace-switcher';