@dicehub/kappa 0.7.0 → 1.1.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 (128) hide show
  1. package/CHANGELOG.md +106 -0
  2. package/THIRD_PARTY_NOTICES.md +103 -1
  3. package/dist/{DropdownSubTrigger-DrZmNIcU.js → DropdownSubTrigger-DVOFK5Y1.js} +202 -146
  4. package/dist/DropdownSubTrigger-DVOFK5Y1.js.map +1 -0
  5. package/dist/PoweredByDicehub-DPceYF8f.js +143 -0
  6. package/dist/PoweredByDicehub-DPceYF8f.js.map +1 -0
  7. package/dist/{WorkspaceSwitcher-DBWdKZbM.js → WorkspaceSwitcher-DDAIMxeE.js} +5 -9
  8. package/dist/WorkspaceSwitcher-DDAIMxeE.js.map +1 -0
  9. package/dist/app-shell-BeYS5h5q.js +578 -0
  10. package/dist/app-shell-BeYS5h5q.js.map +1 -0
  11. package/dist/blocks/app-shell/AppShell.vue.d.ts +41 -0
  12. package/dist/blocks/app-shell/AppShellActions.vue.d.ts +3 -0
  13. package/dist/blocks/app-shell/AppShellAsideResizeHandle.vue.d.ts +20 -0
  14. package/dist/blocks/app-shell/AppShellPage.vue.d.ts +6 -0
  15. package/dist/blocks/app-shell/AppShellPanels.vue.d.ts +33 -0
  16. package/dist/blocks/app-shell/AppShellSearchDialog.vue.d.ts +10 -0
  17. package/dist/blocks/app-shell/AppShellSearchTrigger.vue.d.ts +7 -0
  18. package/dist/blocks/app-shell/AppShellToolbar.vue.d.ts +3 -0
  19. package/dist/blocks/app-shell/app-shell.d.ts +67 -0
  20. package/dist/blocks/app-shell/index.d.ts +19 -0
  21. package/dist/blocks/app-shell.js +2 -0
  22. package/dist/blocks/file-browser.js +1 -1
  23. package/dist/blocks/index.d.ts +1 -0
  24. package/dist/blocks/sidebar-layout/SidebarLayout.vue.d.ts +4 -0
  25. package/dist/blocks/sidebar-layout/sidebar-layout.d.ts +14 -2
  26. package/dist/blocks/sidebar-layout.js +1 -1
  27. package/dist/blocks/workspace-switcher/workspace-switcher.d.ts +2 -0
  28. package/dist/blocks/workspace-switcher.js +1 -1
  29. package/dist/breadcrumbs-Nh5QvVSR.js +162 -0
  30. package/dist/breadcrumbs-Nh5QvVSR.js.map +1 -0
  31. package/dist/button-Cst2B-9X.js +208 -0
  32. package/dist/button-Cst2B-9X.js.map +1 -0
  33. package/dist/{command-palette-BHFB86Gc.js → command-palette-BjXvHrd6.js} +178 -165
  34. package/dist/command-palette-BjXvHrd6.js.map +1 -0
  35. package/dist/components/breadcrumbs/Breadcrumbs.vue.d.ts +1 -0
  36. package/dist/components/breadcrumbs/BreadcrumbsTrigger.vue.d.ts +14 -0
  37. package/dist/components/breadcrumbs/breadcrumbs.d.ts +18 -1
  38. package/dist/components/breadcrumbs/index.d.ts +4 -2
  39. package/dist/components/breadcrumbs.js +2 -2
  40. package/dist/components/button/index.d.ts +2 -0
  41. package/dist/components/button/toolbar-button.d.ts +23 -0
  42. package/dist/components/button.js +2 -2
  43. package/dist/components/command-palette/CommandPaletteResultItem.vue.d.ts +1 -1
  44. package/dist/components/command-palette.js +1 -1
  45. package/dist/components/context-menu/ContextMenu.vue.d.ts +5 -5
  46. package/dist/components/context-menu.js +2 -2
  47. package/dist/components/data-grid.js +1 -1
  48. package/dist/components/date-picker/DatePicker.vue.d.ts +1 -1
  49. package/dist/components/dialog/Dialog.vue.d.ts +7 -7
  50. package/dist/components/dialog-layout/DialogLayoutAlert.vue.d.ts +3 -3
  51. package/dist/components/dicehub-logo/dicehub-logo.d.ts +17 -4
  52. package/dist/components/dicehub-logo/index.d.ts +1 -1
  53. package/dist/components/dicehub-logo.js +2 -2
  54. package/dist/components/drawer/Drawer.vue.d.ts +3 -3
  55. package/dist/components/dropdown/Dropdown.vue.d.ts +5 -5
  56. package/dist/components/dropdown/DropdownContent.vue.d.ts +1 -0
  57. package/dist/components/dropdown/DropdownSub.vue.d.ts +5 -5
  58. package/dist/components/dropdown/DropdownSubContent.vue.d.ts +1 -0
  59. package/dist/components/dropdown/dropdown.d.ts +2 -0
  60. package/dist/components/dropdown/use-dropdown-focus.d.ts +6 -0
  61. package/dist/components/dropdown.js +2 -2
  62. package/dist/components/filter-bar.js +1 -1
  63. package/dist/components/hover-card/HoverCard.vue.d.ts +2 -2
  64. package/dist/components/kbd.js +1 -1
  65. package/dist/components/loader/Loader.vue.d.ts +1 -1
  66. package/dist/components/matrix-loader/MatrixLoader.vue.d.ts +1 -1
  67. package/dist/components/menu-bar.js +1 -1
  68. package/dist/components/popover/Popover.vue.d.ts +7 -7
  69. package/dist/components/sidebar/SidebarProvider.vue.d.ts +3 -0
  70. package/dist/components/sidebar/index.d.ts +1 -1
  71. package/dist/components/sidebar/sidebar-preferred-width.d.ts +12 -0
  72. package/dist/components/sidebar/sidebar-resize.d.ts +10 -0
  73. package/dist/components/sidebar/sidebar-smart-resize.d.ts +22 -0
  74. package/dist/components/sidebar/sidebar.d.ts +11 -1
  75. package/dist/components/sidebar.js +1 -1
  76. package/dist/components/table/TableCheckCell.vue.d.ts +1 -1
  77. package/dist/components/table/TableCheckHead.vue.d.ts +1 -1
  78. package/dist/components/toolbar/ToolbarButton.vue.d.ts +5 -1
  79. package/dist/components/toolbar/index.d.ts +3 -2
  80. package/dist/components/toolbar/toolbar.d.ts +2 -3
  81. package/dist/components/toolbar.js +3 -2
  82. package/dist/components/tooltip/Tooltip.vue.d.ts +5 -5
  83. package/dist/{context-menu-B_noSd5p.js → context-menu-WmJWrUGu.js} +2 -2
  84. package/dist/{context-menu-B_noSd5p.js.map → context-menu-WmJWrUGu.js.map} +1 -1
  85. package/dist/{data-grid-CobgDr8q.js → data-grid-BQkLsfk0.js} +2 -2
  86. package/dist/{data-grid-CobgDr8q.js.map → data-grid-BQkLsfk0.js.map} +1 -1
  87. package/dist/{dropdown-Dedb1tk8.js → dropdown-BABKXjuz.js} +2 -2
  88. package/dist/{dropdown-Dedb1tk8.js.map → dropdown-BABKXjuz.js.map} +1 -1
  89. package/dist/{file-browser-CGqaz2eI.js → file-browser-CAGvIXr9.js} +5 -5
  90. package/dist/{file-browser-CGqaz2eI.js.map → file-browser-CAGvIXr9.js.map} +1 -1
  91. package/dist/{filter-bar-COAlDQE4.js → filter-bar-CAyW-YoF.js} +2 -2
  92. package/dist/{filter-bar-COAlDQE4.js.map → filter-bar-CAyW-YoF.js.map} +1 -1
  93. package/dist/index.js +105 -104
  94. package/dist/{KbdGroup-CNwqr4vX.js → kbd-CNwqr4vX.js} +1 -1
  95. package/dist/kbd-CNwqr4vX.js.map +1 -0
  96. package/dist/{menu-bar-C-qQn2L1.js → menu-bar-DPJllpvf.js} +2 -2
  97. package/dist/{menu-bar-C-qQn2L1.js.map → menu-bar-DPJllpvf.js.map} +1 -1
  98. package/dist/paneled-bottom.png +0 -0
  99. package/dist/paneled-side.png +0 -0
  100. package/dist/registry/component-registry.json +18 -8
  101. package/dist/registry/generated.d.ts +86 -12
  102. package/dist/{registry-BhOIvW4q.js → registry-BvRgKksA.js} +115 -11
  103. package/dist/{registry-BhOIvW4q.js.map → registry-BvRgKksA.js.map} +1 -1
  104. package/dist/registry.js +1 -1
  105. package/dist/{sidebar-tcrbUrk_.js → sidebar-DPCWLFHj.js} +397 -232
  106. package/dist/sidebar-DPCWLFHj.js.map +1 -0
  107. package/dist/{SidebarLayout-D9RT-MdT.js → sidebar-layout-CDGqskKn.js} +67 -46
  108. package/dist/sidebar-layout-CDGqskKn.js.map +1 -0
  109. package/dist/styles/kappa.css +1 -1
  110. package/dist/styles/theme-kappa.css +301 -1
  111. package/dist/styles/tokens.json +780 -0
  112. package/dist/{toolbar-DC-4XdHD.js → toolbar-DJsnox8t.js} +90 -146
  113. package/dist/toolbar-DJsnox8t.js.map +1 -0
  114. package/licenses/nunito.LICENSE +93 -0
  115. package/package.json +1 -1
  116. package/dist/DropdownSubTrigger-DrZmNIcU.js.map +0 -1
  117. package/dist/KbdGroup-CNwqr4vX.js.map +0 -1
  118. package/dist/PoweredByDicehub-BD-y1NZA.js +0 -92
  119. package/dist/PoweredByDicehub-BD-y1NZA.js.map +0 -1
  120. package/dist/SidebarLayout-D9RT-MdT.js.map +0 -1
  121. package/dist/WorkspaceSwitcher-DBWdKZbM.js.map +0 -1
  122. package/dist/breadcrumbs-CIxUxZVD.js +0 -127
  123. package/dist/breadcrumbs-CIxUxZVD.js.map +0 -1
  124. package/dist/button-DSgFcDoO.js +0 -128
  125. package/dist/button-DSgFcDoO.js.map +0 -1
  126. package/dist/command-palette-BHFB86Gc.js.map +0 -1
  127. package/dist/sidebar-tcrbUrk_.js.map +0 -1
  128. package/dist/toolbar-DC-4XdHD.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  import { t as e } from "./avatar-BTIZnxA-.js";
2
2
  import { t } from "./Button-Da1Xjklh.js";
3
- import { t as n } from "./dropdown-Dedb1tk8.js";
3
+ import { t as n } from "./dropdown-BABKXjuz.js";
4
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
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({
6
+ var S = ["data-large", "data-avatar-shape"], C = { key: 2 }, w = /* @__PURE__ */ d({
7
7
  __name: "WorkspaceSwitcherBadge",
8
8
  props: {
9
9
  item: {},
@@ -13,6 +13,7 @@ var S = ["data-large"], C = { key: 2 }, w = /* @__PURE__ */ d({
13
13
  return (n, r) => (m(), s("span", {
14
14
  class: "kappa-workspace-switcher__badge",
15
15
  "data-large": t.large || void 0,
16
+ "data-avatar-shape": t.item.avatarShape ?? "square",
16
17
  "aria-hidden": "true"
17
18
  }, [t.item.avatarSrc ? (m(), a(b(e).Root, {
18
19
  key: 0,
@@ -37,7 +38,7 @@ var S = ["data-large"], C = { key: 2 }, w = /* @__PURE__ */ d({
37
38
  emits: ["action"],
38
39
  setup(e) {
39
40
  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
+ default: x(() => [e.section === "workspace" || 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
42
  key: r.value,
42
43
  value: `workspace-action:${e.section}:${r.value}`,
43
44
  "value-text": r.label,
@@ -204,11 +205,6 @@ var S = ["data-large"], C = { key: 2 }, w = /* @__PURE__ */ d({
204
205
  "close-on-select": "",
205
206
  class: "kappa-workspace-switcher__option"
206
207
  }, {
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
208
  default: x(() => [
213
209
  u(w, { item: e }, null, 8, ["item"]),
214
210
  c("span", j, y(e.name), 1),
@@ -262,4 +258,4 @@ var S = ["data-large"], C = { key: 2 }, w = /* @__PURE__ */ d({
262
258
  //#endregion
263
259
  export { E as n, N as t };
264
260
 
265
- //# sourceMappingURL=WorkspaceSwitcher-DBWdKZbM.js.map
261
+ //# sourceMappingURL=WorkspaceSwitcher-DDAIMxeE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WorkspaceSwitcher-DDAIMxeE.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\" :data-avatar-shape=\"item.avatarShape ?? 'square'\" 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\" :data-avatar-shape=\"item.avatarShape ?? 'square'\" 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 === 'workspace' || 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 === 'workspace' || 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 /** Use a circle for personal identities. Defaults to square. */\n avatarShape?: \"circle\" | \"square\";\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 <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 <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;GAAY,qBAAmB,EAAA,KAAK,eAAW;GAAc,eAAY;EACxH,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,EAA6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;UAAO,SAAA,QAAmB,CAAhB,EAAA,EAAA,EAAK,QAAQ,GAAA,CAAA,CAAA,CAAA;;;;;;;;;;;;;;MAG/C,EAAM,iBAAiB,UAAvD,EAAA,GAAA,EAAsJ,GAAA;;OAAtF,OAAO,EAAM;OAAkB,SAAQ;OAAa,UAAM,AAAA,EAAA,QAAA,MAAE,EAAI,UAAW,CAAM;;KAEnH,GAAA,GAAA,GAAA,EAAM,cAAc,UAApD,EAAA,GAAA,EAC8E,GAAA;;MADjB,OAAO,EAAM;MAAe,SAAQ;MAC/F,OAAM;MAAoC,UAAM,AAAA,EAAA,QAAA,MAAE,EAAI,UAAW,CAAM"}
@@ -0,0 +1,578 @@
1
+ import { t as e } from "./Button-Da1Xjklh.js";
2
+ import { t } from "./command-palette-BjXvHrd6.js";
3
+ import { t as n } from "./dialog-BgI1aM8y.js";
4
+ import { n as r, t as i } from "./kbd-CNwqr4vX.js";
5
+ import { t as a } from "./resizable-C9p_l-MV.js";
6
+ import { t as o } from "./sidebar-DPCWLFHj.js";
7
+ import { t as s } from "./sidebar-layout-CDGqskKn.js";
8
+ import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createSlots as m, createTextVNode as h, createVNode as g, defineComponent as _, guardReactiveProps as v, mergeProps as y, nextTick as ee, normalizeProps as b, normalizeStyle as te, onBeforeUnmount as ne, onMounted as re, openBlock as x, ref as S, renderList as C, renderSlot as w, resolveDynamicComponent as T, toDisplayString as E, unref as D, useId as ie, useSlots as O, watch as k, withCtx as A, withModifiers as j } from "vue";
9
+ import { DEFAULT_LOCALE as ae, LocaleProvider as oe, useLocaleContext as se } from "@ark-ui/vue/locale";
10
+ import { useFocusVisible as M } from "@ark-ui/vue/interaction";
11
+ import { useSplitter as N } from "@ark-ui/vue/splitter";
12
+ //#region src/blocks/app-shell/AppShell.vue?vue&type=script&setup=true&lang.ts
13
+ var P = ["aria-label"], F = /* @__PURE__ */ _({
14
+ inheritAttrs: !1,
15
+ __name: "AppShell",
16
+ props: {
17
+ appearance: { default: "default" },
18
+ fill: {
19
+ type: Boolean,
20
+ default: !1
21
+ },
22
+ hideDesktopTrigger: { type: Boolean },
23
+ bloom: {
24
+ type: Boolean,
25
+ default: !1
26
+ },
27
+ railLabel: { default: "Workspace tools" },
28
+ variant: {},
29
+ contentAlignment: {},
30
+ contentMaxWidth: {},
31
+ label: {},
32
+ navigationLabel: {},
33
+ navigationProps: {},
34
+ secondaryLabel: {},
35
+ closeLabel: {},
36
+ resizeLabel: {},
37
+ fullScreenOnMobile: {
38
+ type: Boolean,
39
+ default: void 0
40
+ },
41
+ triggerProps: {},
42
+ id: {},
43
+ open: {
44
+ type: Boolean,
45
+ default: void 0
46
+ },
47
+ defaultOpen: {
48
+ type: Boolean,
49
+ default: void 0
50
+ },
51
+ mobileOpen: {
52
+ type: Boolean,
53
+ default: void 0
54
+ },
55
+ defaultMobileOpen: {
56
+ type: Boolean,
57
+ default: void 0
58
+ },
59
+ collapsible: {},
60
+ side: {},
61
+ compact: {
62
+ type: Boolean,
63
+ default: void 0
64
+ },
65
+ mobileBreakpoint: {},
66
+ mobileBreakpointReference: {},
67
+ width: {},
68
+ collapsedWidth: {},
69
+ mobileWidth: {},
70
+ resizable: {
71
+ type: Boolean,
72
+ default: void 0
73
+ },
74
+ collapseOnResize: {
75
+ type: Boolean,
76
+ default: void 0
77
+ },
78
+ smartResize: { type: Boolean },
79
+ showSnapGuide: { type: Boolean },
80
+ resizeWidth: {},
81
+ defaultWidth: {},
82
+ minWidth: {},
83
+ maxWidth: {},
84
+ peekable: {
85
+ type: Boolean,
86
+ default: void 0
87
+ }
88
+ },
89
+ emits: [
90
+ "update:open",
91
+ "openChange",
92
+ "update:mobileOpen",
93
+ "mobileOpenChange",
94
+ "update:resizeWidth",
95
+ "resize",
96
+ "resizeEnd"
97
+ ],
98
+ setup(e, { emit: t }) {
99
+ let n = e, r = t, i = O(), a = () => Object.keys(i).filter((e) => e !== "rail" && e !== "toolbar-trigger"), c = l(() => {
100
+ let { appearance: e, fill: t, bloom: r, hideDesktopTrigger: i, railLabel: a, ...o } = n;
101
+ return {
102
+ ...e === "paneled" ? {
103
+ variant: "header",
104
+ contentAlignment: "available",
105
+ width: "240px",
106
+ collapsedWidth: "44px",
107
+ mobileWidth: "min(80vw, 320px)",
108
+ mobileBreakpoint: 1200
109
+ } : e === "compact" ? {
110
+ variant: "header",
111
+ width: "250px",
112
+ defaultWidth: 250,
113
+ collapsedWidth: "48px",
114
+ resizable: !0,
115
+ minWidth: 200,
116
+ maxWidth: 420
117
+ } : {},
118
+ ...Object.fromEntries(Object.entries(o).filter(([, e]) => e !== void 0))
119
+ };
120
+ });
121
+ return (e, t) => (x(), u(D(s), y({
122
+ ...e.$attrs,
123
+ ...c.value
124
+ }, {
125
+ class: "kappa-app-shell",
126
+ "data-has-rail": !!i.rail || void 0,
127
+ "data-hide-desktop-trigger": n.hideDesktopTrigger || void 0,
128
+ "data-appearance": n.appearance,
129
+ "data-fill": n.fill || void 0,
130
+ "data-bloom": n.bloom || void 0,
131
+ "navigation-props": {
132
+ ...n.navigationProps,
133
+ "data-app-shell-appearance": n.appearance
134
+ },
135
+ "onUpdate:open": t[0] ||= (e) => r("update:open", e),
136
+ onOpenChange: t[1] ||= (e) => r("openChange", e),
137
+ "onUpdate:mobileOpen": t[2] ||= (e) => r("update:mobileOpen", e),
138
+ onMobileOpenChange: t[3] ||= (e) => r("mobileOpenChange", e),
139
+ "onUpdate:resizeWidth": t[4] ||= (e) => r("update:resizeWidth", e),
140
+ onResize: t[5] ||= (e) => r("resize", e),
141
+ onResizeEnd: t[6] ||= (e) => r("resizeEnd", e)
142
+ }), m({
143
+ "toolbar-trigger": A((r) => [w(e.$slots, "toolbar-trigger", b(v(r)), () => [n.appearance === "paneled" && r.isMobile ? (x(), u(D(o).Trigger, y({ key: 0 }, n.triggerProps, { "aria-label": r.mobileOpen ? n.triggerProps?.closeLabel ?? "Close sidebar" : n.triggerProps?.openLabel ?? "Open sidebar" }), {
144
+ default: A(() => [...t[7] ||= [p("svg", {
145
+ viewBox: "0 0 16 16",
146
+ fill: "none",
147
+ "aria-hidden": "true",
148
+ focusable: "false"
149
+ }, [p("path", { d: "M2 4h12M2 8h12M2 12h12" })], -1)]]),
150
+ _: 1
151
+ }, 16, ["aria-label"])) : (x(), u(D(o).Trigger, b(y({ key: 1 }, n.triggerProps)), null, 16))])]),
152
+ _: 2
153
+ }, [C(a(), (t) => ({
154
+ name: t,
155
+ fn: A((n) => [w(e.$slots, t, b(v(n)))])
156
+ })), i.rail ? {
157
+ name: "rail",
158
+ fn: A((t) => [p("nav", {
159
+ class: "kappa-app-shell__rail",
160
+ "aria-label": n.railLabel
161
+ }, [w(e.$slots, "rail", b(v(t)))], 8, P)]),
162
+ key: "0"
163
+ } : void 0]), 1040, [
164
+ "data-has-rail",
165
+ "data-hide-desktop-trigger",
166
+ "data-appearance",
167
+ "data-fill",
168
+ "data-bloom",
169
+ "navigation-props"
170
+ ]));
171
+ }
172
+ }), I = [
173
+ "dir",
174
+ "aria-label",
175
+ "aria-controls",
176
+ "aria-valuemin",
177
+ "aria-valuemax",
178
+ "aria-valuenow",
179
+ "aria-valuetext"
180
+ ], ce = /* @__PURE__ */ _({
181
+ __name: "AppShellAsideResizeHandle",
182
+ props: {
183
+ frameId: {},
184
+ primaryId: {},
185
+ asideId: {},
186
+ direction: {},
187
+ width: {},
188
+ groupWidth: {},
189
+ minWidth: {},
190
+ maxWidth: {},
191
+ label: {}
192
+ },
193
+ emits: ["resize", "reset"],
194
+ setup(e, { emit: t }) {
195
+ let n = e, r = t, i = l(() => n.direction === "rtl" ? 0 : 1), a = l(() => i.value ? "primary:aside" : "aside:primary"), o = N(l(() => {
196
+ let e = n.groupWidth > 0 ? n.width / n.groupWidth * 100 : 50, t = {
197
+ id: "aside",
198
+ minSize: `${n.minWidth}px`,
199
+ maxSize: `${n.maxWidth}px`
200
+ }, a = {
201
+ id: "primary",
202
+ minSize: 0
203
+ };
204
+ return {
205
+ id: `${n.frameId}-resize`,
206
+ ids: {
207
+ root: n.frameId,
208
+ panel: (e) => e === "aside" ? n.asideId : n.primaryId
209
+ },
210
+ panels: i.value ? [a, t] : [t, a],
211
+ size: i.value ? [100 - e, e] : [e, 100 - e],
212
+ keyboardResizeBy: n.groupWidth > 0 ? 24 / n.groupWidth * 100 : 1,
213
+ onResize: ({ size: e }) => {
214
+ n.groupWidth > 0 && r("resize", e[i.value] / 100 * n.groupWidth);
215
+ }
216
+ };
217
+ })), s = l(() => o.value.getResizeTriggerProps({ id: a.value }));
218
+ return (t, n) => (x(), f("div", y(s.value, {
219
+ dir: e.direction,
220
+ class: "kappa-app-shell__aside-resize",
221
+ "data-slot": "app-shell-aside-resize",
222
+ "aria-label": e.label,
223
+ "aria-orientation": "vertical",
224
+ "aria-controls": e.asideId,
225
+ "aria-valuemin": e.minWidth,
226
+ "aria-valuemax": e.maxWidth,
227
+ "aria-valuenow": Math.round(e.width),
228
+ "aria-valuetext": `${Math.round(e.width)} pixels`,
229
+ onDblclick: n[0] ||= j((e) => r("reset"), ["prevent"])
230
+ }), null, 16, I));
231
+ }
232
+ }), le = [
233
+ "data-aside-mode",
234
+ "data-aside-open",
235
+ "data-aside-present",
236
+ "data-maximized",
237
+ "data-wide"
238
+ ], ue = [
239
+ "id",
240
+ "inert",
241
+ "data-panel-mode",
242
+ "data-detail-open"
243
+ ], de = ["id"], L = /* @__PURE__ */ _({
244
+ __name: "AppShellPanels",
245
+ props: {
246
+ detailOpen: {
247
+ type: Boolean,
248
+ default: !1
249
+ },
250
+ asideOpen: {
251
+ type: Boolean,
252
+ default: !1
253
+ },
254
+ asideMaximized: {
255
+ type: Boolean,
256
+ default: void 0
257
+ },
258
+ asideWidth: {},
259
+ size: {},
260
+ splitAt: { default: 1200 },
261
+ minSize: { default: 30 },
262
+ detailLabel: { default: "Details" },
263
+ asideLabel: { default: "Activity" },
264
+ resizeLabel: { default: "Resize panels" },
265
+ asideResizeLabel: { default: "Resize side panel" },
266
+ initialDetailFocus: {},
267
+ finalDetailFocus: {},
268
+ initialAsideFocus: {},
269
+ finalAsideFocus: {}
270
+ },
271
+ emits: [
272
+ "update:detailOpen",
273
+ "update:asideOpen",
274
+ "update:asideMaximized",
275
+ "update:asideWidth",
276
+ "update:size"
277
+ ],
278
+ setup(e, { emit: t }) {
279
+ let r = e, i = t, o = S(), s = S(), c = S(), m = S(0), h = S(0), _ = S(0), v = `kappa-shell-panels-${ie()}`, y = se(ae), b = S(0), C = l(() => b.value || h.value), T = null, E = l(() => m.value >= r.splitAt ? "split" : "overlay"), O = l(() => C.value < 992 ? "overlay" : "inline"), j = S(!1), M = l(() => r.asideMaximized ?? j.value);
280
+ function N(e) {
281
+ r.asideMaximized === void 0 && (j.value = e), i("update:asideMaximized", e);
282
+ }
283
+ let P = l(() => r.asideOpen && M.value && O.value === "inline"), F = l(() => P.value && C.value < 2560), I = S(r.asideOpen), L = S(), R = l(() => Math.min(400, Math.floor(_.value || 400))), z = l(() => Math.floor(Math.max(R.value, Math.min(960, C.value * .6, _.value - 320)))), B = l(() => Math.max(400, Math.min(560, C.value * .2))), V = l(() => Math.max(R.value, Math.min(z.value, r.asideWidth ?? L.value ?? B.value)));
284
+ function H(e) {
285
+ let t = Math.max(R.value, Math.min(z.value, e));
286
+ r.asideWidth === void 0 && (L.value = t), i("update:asideWidth", t);
287
+ }
288
+ function U() {
289
+ L.value = void 0, i("update:asideWidth", void 0);
290
+ }
291
+ let W = S([50, 50]), G = l(() => r.detailOpen && E.value === "split" ? r.size ?? W.value : [100, 0]), K = l(() => [{
292
+ id: "primary",
293
+ minSize: r.detailOpen && E.value === "split" ? r.minSize : 0
294
+ }, {
295
+ id: "detail",
296
+ minSize: r.detailOpen && E.value === "split" ? r.minSize : 0
297
+ }]);
298
+ function q(e) {
299
+ !r.detailOpen || E.value !== "split" || e.some((e) => e < r.minSize) || (W.value = e, i("update:size", e));
300
+ }
301
+ function fe() {
302
+ i("update:detailOpen", !1);
303
+ }
304
+ function pe() {
305
+ i("update:asideOpen", !1);
306
+ }
307
+ function me() {
308
+ N(!P.value);
309
+ }
310
+ let J = null, Y = null;
311
+ k(() => r.detailOpen, (e) => {
312
+ e && (J = document.activeElement instanceof HTMLElement ? document.activeElement : null);
313
+ }, { flush: "sync" }), k(() => r.asideOpen, (e) => {
314
+ e ? (I.value = !0, Y = document.activeElement instanceof HTMLElement ? document.activeElement : null) : M.value && N(!1);
315
+ }, { flush: "sync" }), k(O, (e) => {
316
+ e === "overlay" && M.value && N(!1);
317
+ });
318
+ function X(e, t) {
319
+ let n = e?.() ?? t;
320
+ n?.isConnected && n.getClientRects().length && !n.closest("[inert]") && n.focus({ preventScroll: !0 });
321
+ }
322
+ function Z() {
323
+ r.detailOpen || X(r.finalDetailFocus, J);
324
+ }
325
+ async function Q() {
326
+ r.asideOpen || (I.value = !1, await ee(), X(r.finalAsideFocus, Y));
327
+ }
328
+ let $;
329
+ return re(() => {
330
+ T = o.value?.closest(".kappa-app-shell") ?? null, $ = new ResizeObserver((e) => {
331
+ for (let t of e) t.target === c.value && (m.value = t.contentRect.width), t.target === T && (b.value = t.contentRect.width), t.target === o.value && (h.value = t.contentRect.width), t.target === s.value && (_.value = t.contentRect.width);
332
+ }), c.value && $.observe(c.value), o.value && $.observe(o.value), s.value && $.observe(s.value), T && $.observe(T);
333
+ }), ne(() => $?.disconnect()), (e, t) => (x(), f("div", {
334
+ ref_key: "body",
335
+ ref: o,
336
+ class: "kappa-app-shell__panels-body",
337
+ "data-aside-mode": O.value,
338
+ "data-aside-open": r.asideOpen || void 0,
339
+ "data-aside-present": I.value || void 0,
340
+ "data-maximized": P.value || void 0,
341
+ "data-wide": C.value >= 2560 || void 0
342
+ }, [p("div", {
343
+ id: v,
344
+ ref_key: "frame",
345
+ ref: s,
346
+ class: "kappa-app-shell__panel-frame",
347
+ style: te({ "--kappa-shell-aside-width": `${V.value}px` })
348
+ }, [p("div", {
349
+ id: `${v}-primary`,
350
+ ref_key: "primary",
351
+ ref: c,
352
+ class: "kappa-app-shell__panels",
353
+ inert: F.value || void 0,
354
+ "data-panel-mode": E.value,
355
+ "data-detail-open": r.detailOpen || void 0
356
+ }, [g(D(a).Root, {
357
+ size: G.value,
358
+ panels: K.value,
359
+ class: "kappa-app-shell__splitter",
360
+ "onUpdate:size": q
361
+ }, {
362
+ default: A(() => [
363
+ g(D(a).Panel, {
364
+ id: "primary",
365
+ class: "kappa-app-shell__primary"
366
+ }, {
367
+ default: A(() => [w(e.$slots, "header"), w(e.$slots, "default")]),
368
+ _: 3
369
+ }),
370
+ r.detailOpen && E.value === "split" ? (x(), u(D(a).Handle, {
371
+ key: 0,
372
+ id: "primary:detail",
373
+ "aria-label": r.resizeLabel,
374
+ class: "kappa-app-shell__resize"
375
+ }, null, 8, ["aria-label"])) : d("", !0),
376
+ g(D(a).Panel, {
377
+ id: "detail",
378
+ class: "kappa-app-shell__detail-region"
379
+ }, {
380
+ default: A(() => [g(D(n).Root, {
381
+ open: r.detailOpen,
382
+ "restore-focus": !1,
383
+ modal: !1,
384
+ "trap-focus": !1,
385
+ "prevent-scroll": !1,
386
+ "close-on-interact-outside": !1,
387
+ "initial-focus-el": r.initialDetailFocus,
388
+ "aria-label": r.detailLabel,
389
+ "onUpdate:open": t[0] ||= (e) => i("update:detailOpen", e),
390
+ onExitComplete: Z
391
+ }, {
392
+ default: A(() => [g(D(n).Content, {
393
+ teleport: !1,
394
+ "show-backdrop": !1,
395
+ "show-close-button": !1,
396
+ class: "kappa-app-shell__detail",
397
+ "aria-label": r.detailLabel,
398
+ inert: !r.detailOpen || void 0
399
+ }, {
400
+ default: A(() => [w(e.$slots, "detail", {
401
+ close: fe,
402
+ mode: E.value
403
+ })]),
404
+ _: 3
405
+ }, 8, ["aria-label", "inert"])]),
406
+ _: 3
407
+ }, 8, [
408
+ "open",
409
+ "initial-focus-el",
410
+ "aria-label"
411
+ ])]),
412
+ _: 3
413
+ })
414
+ ]),
415
+ _: 3
416
+ }, 8, ["size", "panels"])], 8, ue), e.$slots.aside ? (x(), f("div", {
417
+ key: 0,
418
+ id: `${v}-aside`,
419
+ class: "kappa-app-shell__aside-region"
420
+ }, [r.asideOpen && O.value === "inline" && !P.value && h.value > 0 ? (x(), u(D(oe), {
421
+ key: 0,
422
+ locale: "en-US"
423
+ }, {
424
+ default: A(() => [g(ce, {
425
+ "frame-id": v,
426
+ "primary-id": `${v}-primary`,
427
+ "aside-id": `${v}-aside`,
428
+ direction: D(y).dir,
429
+ width: V.value,
430
+ "group-width": h.value,
431
+ "min-width": R.value,
432
+ "max-width": z.value,
433
+ label: r.asideResizeLabel,
434
+ onResize: H,
435
+ onReset: U
436
+ }, null, 8, [
437
+ "primary-id",
438
+ "aside-id",
439
+ "direction",
440
+ "width",
441
+ "group-width",
442
+ "min-width",
443
+ "max-width",
444
+ "label"
445
+ ])]),
446
+ _: 1
447
+ })) : d("", !0), g(D(n).Root, {
448
+ open: r.asideOpen,
449
+ "restore-focus": !1,
450
+ modal: !1,
451
+ "trap-focus": !1,
452
+ "prevent-scroll": !1,
453
+ "close-on-interact-outside": !1,
454
+ "initial-focus-el": r.initialAsideFocus,
455
+ "aria-label": r.asideLabel,
456
+ "onUpdate:open": t[1] ||= (e) => i("update:asideOpen", e),
457
+ onExitComplete: Q
458
+ }, {
459
+ default: A(() => [g(D(n).Content, {
460
+ teleport: !1,
461
+ "show-backdrop": !1,
462
+ "show-close-button": !1,
463
+ class: "kappa-app-shell__aside",
464
+ "aria-label": r.asideLabel,
465
+ inert: !r.asideOpen || void 0
466
+ }, {
467
+ default: A(() => [w(e.$slots, "aside", {
468
+ close: pe,
469
+ toggleMaximized: me,
470
+ maximized: P.value,
471
+ canMaximize: O.value === "inline"
472
+ })]),
473
+ _: 3
474
+ }, 8, ["aria-label", "inert"])]),
475
+ _: 3
476
+ }, 8, [
477
+ "open",
478
+ "initial-focus-el",
479
+ "aria-label"
480
+ ])], 8, de)) : d("", !0)], 4)], 8, le));
481
+ }
482
+ }), R = {
483
+ key: 0,
484
+ class: "kappa-app-shell__page-heading"
485
+ }, z = { key: 0 }, B = { key: 1 }, V = {
486
+ key: 0,
487
+ class: "kappa-app-shell__actions"
488
+ }, H = /* @__PURE__ */ _({
489
+ __name: "AppShellPage",
490
+ props: {
491
+ as: { default: "main" },
492
+ title: {},
493
+ description: {}
494
+ },
495
+ setup(e) {
496
+ return (t, n) => (x(), u(T(e.as), { class: "kappa-app-shell__page" }, {
497
+ default: A(() => [e.title || t.$slots.actions ? (x(), f("header", R, [p("div", null, [e.title ? (x(), f("h1", z, E(e.title), 1)) : d("", !0), e.description ? (x(), f("p", B, E(e.description), 1)) : d("", !0)]), t.$slots.actions ? (x(), f("div", V, [w(t.$slots, "actions")])) : d("", !0)])) : d("", !0), w(t.$slots, "default")]),
498
+ _: 3
499
+ }));
500
+ }
501
+ }), U = (e, t) => {
502
+ let n = e.__vccOpts || e;
503
+ for (let [e, r] of t) n[e] = r;
504
+ return n;
505
+ }, W = {}, G = { class: "kappa-app-shell__toolbar" };
506
+ function K(e, t) {
507
+ return x(), f("header", G, [w(e.$slots, "default")]);
508
+ }
509
+ var q = /*#__PURE__*/ U(W, [["render", K]]), fe = {}, pe = { class: "kappa-app-shell__actions" };
510
+ function me(e, t) {
511
+ return x(), f("div", pe, [w(e.$slots, "default")]);
512
+ }
513
+ var J = /*#__PURE__*/ U(fe, [["render", me]]), Y = { class: "kappa-app-shell__search-label" }, X = { key: 0 }, Z = /* @__PURE__ */ _({
514
+ __name: "AppShellSearchTrigger",
515
+ props: {
516
+ label: { default: "Search or go to…" },
517
+ shortcut: { default: "" },
518
+ icon: {}
519
+ },
520
+ setup(t) {
521
+ let n = t, a = l(() => n.shortcut.trim().split(/\s+\+\s+/).filter(Boolean)), o = M();
522
+ return (n, s) => (x(), u(D(e), {
523
+ class: "kappa-app-shell__search",
524
+ variant: "ghost",
525
+ icon: t.icon,
526
+ "aria-label": t.label,
527
+ "aria-haspopup": "dialog",
528
+ "data-kappa-focus-visible": D(o)
529
+ }, {
530
+ default: A(() => [p("span", Y, E(t.label), 1), a.value.length ? (x(), u(D(i), {
531
+ key: 0,
532
+ "aria-hidden": "true"
533
+ }, {
534
+ default: A(() => [(x(!0), f(c, null, C(a.value, (e, t) => (x(), f(c, { key: t }, [t ? (x(), f("span", X, "+")) : d("", !0), g(D(r), null, {
535
+ default: A(() => [h(E(e), 1)]),
536
+ _: 2
537
+ }, 1024)], 64))), 128))]),
538
+ _: 1
539
+ })) : d("", !0)]),
540
+ _: 1
541
+ }, 8, [
542
+ "icon",
543
+ "aria-label",
544
+ "data-kappa-focus-visible"
545
+ ]));
546
+ }
547
+ }), Q = /* @__PURE__ */ _({
548
+ __name: "AppShellSearchDialog",
549
+ props: { open: { type: Boolean } },
550
+ emits: ["update:open"],
551
+ setup(e, { emit: n }) {
552
+ let r = n;
553
+ return (n, i) => (x(), u(D(t).Dialog, {
554
+ open: e.open,
555
+ class: "kappa-app-shell__search-dialog",
556
+ "onUpdate:open": i[0] ||= (e) => r("update:open", e)
557
+ }, {
558
+ default: A(() => [w(n.$slots, "default")]),
559
+ _: 3
560
+ }, 8, ["open"]));
561
+ }
562
+ }), $ = [
563
+ "default",
564
+ "compact",
565
+ "paneled"
566
+ ], he = Object.assign(F, {
567
+ Root: F,
568
+ SearchDialog: Q,
569
+ Panels: L,
570
+ Page: H,
571
+ Toolbar: q,
572
+ Actions: J,
573
+ SearchTrigger: Z
574
+ });
575
+ //#endregion
576
+ export { J as a, L as c, Z as i, F as l, $ as n, q as o, Q as r, H as s, he as t };
577
+
578
+ //# sourceMappingURL=app-shell-BeYS5h5q.js.map