@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
- import { Fragment as e, Teleport as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, getCurrentInstance as u, guardReactiveProps as d, inject as f, mergeProps as p, normalizeProps as m, onMounted as h, openBlock as g, provide as _, ref as v, renderList as y, renderSlot as b, toDisplayString as x, unref as S, useAttrs as C, watch as w, withCtx as T } from "vue";
2
- import { Combobox as E, createListCollection as D } from "@ark-ui/vue/combobox";
3
- import { Dialog as O } from "@ark-ui/vue/dialog";
1
+ import { Fragment as e, Teleport as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, getCurrentInstance as u, guardReactiveProps as d, inject as f, mergeProps as p, nextTick as m, normalizeProps as h, onMounted as g, openBlock as _, provide as v, ref as y, renderList as b, renderSlot as x, toDisplayString as S, unref as C, useAttrs as w, watch as T, withCtx as E } from "vue";
2
+ import { Combobox as D, createListCollection as ee, useComboboxContext as O } from "@ark-ui/vue/combobox";
3
+ import { Dialog as k } from "@ark-ui/vue/dialog";
4
4
  //#endregion
5
5
  //#region src/components/command-palette/CommandPaletteDialog.vue
6
- var k = /* @__PURE__ */ l({
6
+ var A = /* @__PURE__ */ l({
7
7
  inheritAttrs: !1,
8
8
  __name: "CommandPaletteDialog",
9
9
  props: {
@@ -48,16 +48,16 @@ var k = /* @__PURE__ */ l({
48
48
  },
49
49
  emits: ["openChange", "update:open"],
50
50
  setup(e, { emit: n }) {
51
- let a = e, o = n, s = v(!1), l = v(null), u = v(null), d = () => l.value?.querySelector("[data-kappa-command-palette-autofocus]") ?? null, f = () => u.value;
52
- h(() => {
51
+ let a = e, o = n, s = y(!1), l = y(null), u = y(null), d = () => l.value?.querySelector("[data-kappa-command-palette-autofocus]") ?? null, f = () => u.value;
52
+ g(() => {
53
53
  s.value = !0;
54
- }), w(() => a.open, (e, t) => {
54
+ }), T(() => a.open, (e, t) => {
55
55
  e && !t && document.activeElement instanceof HTMLElement && (u.value = document.activeElement);
56
56
  }, { flush: "sync" });
57
57
  let m = (e) => {
58
58
  o("update:open", e.open), o("openChange", e.open);
59
59
  };
60
- return (e, n) => (g(), r(S(O).Root, {
60
+ return (e, n) => (_(), r(C(k).Root, {
61
61
  ids: a.ids,
62
62
  "close-on-escape": a.closeOnEscape,
63
63
  "close-on-interact-outside": a.closeOnInteractOutside,
@@ -72,11 +72,11 @@ var k = /* @__PURE__ */ l({
72
72
  "unmount-on-exit": a.unmountOnExit,
73
73
  onOpenChange: m
74
74
  }, {
75
- default: T(() => [s.value ? (g(), r(t, {
75
+ default: E(() => [s.value ? (_(), r(t, {
76
76
  key: 0,
77
77
  to: "body"
78
- }, [c(S(O).Backdrop, { class: "kappa-command-palette__backdrop" }), c(S(O).Positioner, { class: "kappa-command-palette__positioner" }, {
79
- default: T(() => [c(S(O).Content, p({
78
+ }, [c(C(k).Backdrop, { class: "kappa-command-palette__backdrop" }), c(C(k).Positioner, { class: "kappa-command-palette__positioner" }, {
79
+ default: E(() => [c(C(k).Content, p({
80
80
  ref_key: "content",
81
81
  ref: l
82
82
  }, {
@@ -86,7 +86,7 @@ var k = /* @__PURE__ */ l({
86
86
  "aria-label": a.ariaLabel,
87
87
  class: "kappa-command-palette__content"
88
88
  }), {
89
- default: T(() => [b(e.$slots, "default")]),
89
+ default: E(() => [x(e.$slots, "default")]),
90
90
  _: 3
91
91
  }, 16, ["aria-label"])]),
92
92
  _: 3
@@ -105,53 +105,53 @@ var k = /* @__PURE__ */ l({
105
105
  "unmount-on-exit"
106
106
  ]));
107
107
  }
108
- }), A = /* @__PURE__ */ l({
108
+ }), j = /* @__PURE__ */ l({
109
109
  inheritAttrs: !1,
110
110
  __name: "CommandPaletteEmpty",
111
111
  setup(e) {
112
- return (e, t) => (g(), r(S(E).Empty, p(e.$attrs, { class: "kappa-command-palette__empty" }), {
113
- default: T(() => [b(e.$slots, "default", {}, () => [t[0] ||= s("No results found.", -1)])]),
112
+ return (e, t) => (_(), r(C(D).Empty, p(e.$attrs, { class: "kappa-command-palette__empty" }), {
113
+ default: E(() => [x(e.$slots, "default", {}, () => [t[0] ||= s("No results found.", -1)])]),
114
114
  _: 3
115
115
  }, 16));
116
116
  }
117
- }), j = /* @__PURE__ */ l({
117
+ }), M = /* @__PURE__ */ l({
118
118
  inheritAttrs: !1,
119
119
  __name: "CommandPaletteFooter",
120
120
  setup(e) {
121
- return (e, t) => (g(), a("div", p(e.$attrs, { class: "kappa-command-palette__footer" }), [b(e.$slots, "default")], 16));
121
+ return (e, t) => (_(), a("div", p(e.$attrs, { class: "kappa-command-palette__footer" }), [x(e.$slots, "default")], 16));
122
122
  }
123
- }), M = Symbol("kappa-command-palette"), N = Symbol("kappa-command-palette-group"), ee = (e) => {
124
- _(M, e);
125
- }, P = (e = "CommandPalette") => {
126
- let t = f(M, null);
123
+ }), N = Symbol("kappa-command-palette"), P = Symbol("kappa-command-palette-group"), te = (e) => {
124
+ v(N, e);
125
+ }, F = (e = "CommandPalette") => {
126
+ let t = f(N, null);
127
127
  if (!t) throw Error(`${e} must be used inside CommandPalette.Root or CommandPalette.Panel.`);
128
128
  return t;
129
- }, F = (e) => {
130
- _(N, e);
131
- }, I = () => f(N, null), L = /* @__PURE__ */ l({
129
+ }, I = (e) => {
130
+ v(P, e);
131
+ }, L = () => f(P, null), R = /* @__PURE__ */ l({
132
132
  inheritAttrs: !1,
133
133
  __name: "CommandPaletteGroup",
134
134
  props: { items: { default: () => [] } },
135
135
  setup(e) {
136
136
  let t = e;
137
- return F(n(() => t.items)), (e, t) => (g(), r(S(E).ItemGroup, p(e.$attrs, { class: "kappa-command-palette__group" }), {
138
- default: T(() => [b(e.$slots, "default")]),
137
+ return I(n(() => t.items)), (e, t) => (_(), r(C(D).ItemGroup, p(e.$attrs, { class: "kappa-command-palette__group" }), {
138
+ default: E(() => [x(e.$slots, "default")]),
139
139
  _: 3
140
140
  }, 16));
141
141
  }
142
- }), R = /* @__PURE__ */ l({
142
+ }), z = /* @__PURE__ */ l({
143
143
  inheritAttrs: !1,
144
144
  __name: "CommandPaletteGroupLabel",
145
145
  setup(e) {
146
- return (e, t) => (g(), r(S(E).ItemGroupLabel, p(e.$attrs, { class: "kappa-command-palette__group-label" }), {
147
- default: T(() => [b(e.$slots, "default")]),
146
+ return (e, t) => (_(), r(C(D).ItemGroupLabel, p(e.$attrs, { class: "kappa-command-palette__group-label" }), {
147
+ default: E(() => [x(e.$slots, "default")]),
148
148
  _: 3
149
149
  }, 16));
150
150
  }
151
- }), z = (e) => typeof e == "object" && !!e && !Array.isArray(e), B = (e, t) => {
151
+ }), B = (e) => typeof e == "object" && !!e && !Array.isArray(e), V = (e, t) => {
152
152
  if (t) return t(e);
153
153
  if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") return String(e);
154
- if (z(e)) {
154
+ if (B(e)) {
155
155
  for (let t of [
156
156
  "title",
157
157
  "label",
@@ -160,9 +160,9 @@ var k = /* @__PURE__ */ l({
160
160
  ]) if (e[t] != null) return String(e[t]);
161
161
  }
162
162
  return String(e ?? "");
163
- }, V = (e, t, n) => {
163
+ }, H = (e, t, n) => {
164
164
  if (t) return t(e);
165
- if (z(e)) {
165
+ if (B(e)) {
166
166
  for (let t of [
167
167
  "id",
168
168
  "value",
@@ -171,11 +171,11 @@ var k = /* @__PURE__ */ l({
171
171
  "name"
172
172
  ]) if (e[t] != null) return String(e[t]);
173
173
  }
174
- return B(e, n);
175
- }, H = ({ filter: e, item: t, itemToStringValue: n, query: r }) => {
174
+ return V(e, n);
175
+ }, U = ({ filter: e, item: t, itemToStringValue: n, query: r }) => {
176
176
  let i = r.trim();
177
- return !i || e === !1 ? !0 : typeof e == "function" ? e(t, i) : B(t, n).toLocaleLowerCase().includes(i.toLocaleLowerCase());
178
- }, U = (e, t) => {
177
+ return !i || e === !1 ? !0 : typeof e == "function" ? e(t, i) : V(t, n).toLocaleLowerCase().includes(i.toLocaleLowerCase());
178
+ }, W = (e, t) => {
179
179
  if (!t?.length || !e.length) return [{
180
180
  highlighted: !1,
181
181
  text: e
@@ -197,10 +197,10 @@ var k = /* @__PURE__ */ l({
197
197
  highlighted: !1,
198
198
  text: e.slice(a)
199
199
  }), i;
200
- }, te = {
200
+ }, ne = {
201
201
  key: 0,
202
202
  class: "kappa-command-palette__mark"
203
- }, ne = { key: 1 }, W = /* @__PURE__ */ l({
203
+ }, re = { key: 1 }, G = /* @__PURE__ */ l({
204
204
  inheritAttrs: !1,
205
205
  __name: "CommandPaletteHighlightedText",
206
206
  props: {
@@ -208,10 +208,10 @@ var k = /* @__PURE__ */ l({
208
208
  text: {}
209
209
  },
210
210
  setup(t) {
211
- let r = t, i = n(() => U(r.text, r.highlights));
212
- return (t, n) => (g(), a("span", p(t.$attrs, { class: "kappa-command-palette__highlighted-text" }), [(g(!0), a(e, null, y(i.value, (t, n) => (g(), a(e, { key: `${t.text}-${n}` }, [t.highlighted ? (g(), a("mark", te, x(t.text), 1)) : (g(), a("span", ne, x(t.text), 1))], 64))), 128))], 16));
211
+ let r = t, i = n(() => W(r.text, r.highlights));
212
+ return (t, n) => (_(), a("span", p(t.$attrs, { class: "kappa-command-palette__highlighted-text" }), [(_(!0), a(e, null, b(i.value, (t, n) => (_(), a(e, { key: `${t.text}-${n}` }, [t.highlighted ? (_(), a("mark", ne, S(t.text), 1)) : (_(), a("span", re, S(t.text), 1))], 64))), 128))], 16));
213
213
  }
214
- }), G = /* @__PURE__ */ l({
214
+ }), K = /* @__PURE__ */ l({
215
215
  inheritAttrs: !1,
216
216
  __name: "CommandPaletteInput",
217
217
  props: {
@@ -223,8 +223,15 @@ var k = /* @__PURE__ */ l({
223
223
  placeholder: { default: "Type a command or search..." }
224
224
  },
225
225
  setup(e) {
226
- let t = e, i = C(), a = P("CommandPalette.Input"), s = n(() => String(i["aria-label"] ?? t.ariaLabel)), l = (e) => {
227
- [
226
+ let t = e, i = w(), a = F("CommandPalette.Input"), s = n(() => String(i["aria-label"] ?? t.ariaLabel)), l = (e) => {
227
+ let t = e.target;
228
+ if (!(t instanceof HTMLInputElement) || e instanceof InputEvent && e.isComposing) return;
229
+ let { value: n, selectionStart: r, selectionEnd: i, selectionDirection: a } = t;
230
+ r !== null && i !== null && m(() => {
231
+ !t.isConnected || t.ownerDocument.activeElement !== t || t.value !== n || t.setSelectionRange(r, i, a ?? void 0);
232
+ });
233
+ }, u = (e) => {
234
+ e.defaultPrevented || ([
228
235
  "ArrowDown",
229
236
  "ArrowUp",
230
237
  "End",
@@ -234,15 +241,15 @@ var k = /* @__PURE__ */ l({
234
241
  ].includes(e.key) && a.noteHighlightReason("keyboard"), !e.isComposing && (e.key === "Enter" ? (e.preventDefault(), a.selectHighlightedItem({
235
242
  event: e,
236
243
  newTab: e.metaKey || e.ctrlKey
237
- })) : e.key === "Escape" && (e.preventDefault(), a.close()));
244
+ })) : e.key === "Escape" && (e.preventDefault(), a.close())));
238
245
  };
239
- return (e, n) => (g(), r(S(E).Control, { class: "kappa-command-palette__input-header" }, {
240
- default: T(() => [
241
- b(e.$slots, "leading", {}, () => [n[1] ||= o("span", {
246
+ return (e, n) => (_(), r(C(D).Control, { class: "kappa-command-palette__input-header" }, {
247
+ default: E(() => [
248
+ x(e.$slots, "leading", {}, () => [n[1] ||= o("span", {
242
249
  class: "kappa-command-palette__search-icon",
243
250
  "aria-hidden": "true"
244
251
  }, null, -1)]),
245
- c(S(E).Input, p(S(i), {
252
+ c(C(D).Input, p(C(i), {
246
253
  "aria-label": s.value,
247
254
  autocomplete: "off",
248
255
  autocapitalize: "none",
@@ -251,23 +258,24 @@ var k = /* @__PURE__ */ l({
251
258
  "data-kappa-command-palette-autofocus": t.autoFocus ? "" : void 0,
252
259
  placeholder: t.placeholder,
253
260
  spellcheck: "false",
254
- onKeydown: l
261
+ onInput: l,
262
+ onKeydownCapture: u
255
263
  }), null, 16, [
256
264
  "aria-label",
257
265
  "data-kappa-command-palette-autofocus",
258
266
  "placeholder"
259
267
  ]),
260
- b(e.$slots, "trailing", {}, () => [o("button", {
268
+ x(e.$slots, "trailing", {}, () => [o("button", {
261
269
  class: "kappa-command-palette__close-trigger",
262
270
  type: "button",
263
271
  "aria-label": "Close command palette",
264
- onClick: n[0] ||= (...e) => S(a).close && S(a).close(...e)
272
+ onClick: n[0] ||= (...e) => C(a).close && C(a).close(...e)
265
273
  }, [...n[2] ||= [o("span", { "aria-hidden": "true" }, null, -1)]])])
266
274
  ]),
267
275
  _: 3
268
276
  }));
269
277
  }
270
- }), K = /* @__PURE__ */ l({
278
+ }), q = /* @__PURE__ */ l({
271
279
  inheritAttrs: !1,
272
280
  __name: "CommandPaletteItem",
273
281
  props: {
@@ -279,27 +287,27 @@ var k = /* @__PURE__ */ l({
279
287
  },
280
288
  emits: ["select"],
281
289
  setup(e, { emit: t }) {
282
- let n = e, i = t, a = P("CommandPalette.Item"), o = () => a.noteHighlightReason("pointer"), s = (e) => {
283
- if (n.disabled) {
290
+ let i = e, a = t, o = F("CommandPalette.Item"), s = O(), l = n(() => i.disabled || s.value.getItemState({ item: i.value }).disabled), u = () => o.noteHighlightReason("pointer"), d = (e) => {
291
+ if (l.value) {
284
292
  e.preventDefault(), e.stopImmediatePropagation();
285
293
  return;
286
294
  }
287
- (e.metaKey || e.ctrlKey) && (e.preventDefault(), e.stopImmediatePropagation(), i("select", n.value, e), a.selectItem(n.value, {
295
+ (e.metaKey || e.ctrlKey) && (e.preventDefault(), e.stopImmediatePropagation(), a("select", i.value, e), o.selectItem(i.value, {
288
296
  event: e,
289
297
  newTab: !0
290
298
  }));
291
299
  };
292
- return (e, t) => (g(), r(S(E).Item, p(e.$attrs, {
293
- "aria-disabled": n.disabled ? "true" : void 0,
300
+ return (e, t) => (_(), r(C(D).Item, p(e.$attrs, {
301
+ "aria-disabled": l.value ? "true" : void 0,
294
302
  class: "kappa-command-palette__item",
295
- "data-disabled": n.disabled ? "" : void 0,
296
- item: n.value,
297
- onClickCapture: s,
298
- onClick: t[0] ||= (e) => i("select", n.value, e),
299
- onPointermove: o
303
+ "data-disabled": l.value ? "" : void 0,
304
+ item: i.value,
305
+ onClickCapture: d,
306
+ onClick: t[0] ||= (e) => a("select", i.value, e),
307
+ onPointermove: u
300
308
  }), {
301
- default: T(() => [c(S(E).ItemText, { class: "kappa-command-palette__item-text" }, {
302
- default: T(() => [b(e.$slots, "default")]),
309
+ default: E(() => [c(C(D).ItemText, { class: "kappa-command-palette__item-text" }, {
310
+ default: E(() => [x(e.$slots, "default")]),
303
311
  _: 3
304
312
  })]),
305
313
  _: 3
@@ -309,37 +317,40 @@ var k = /* @__PURE__ */ l({
309
317
  "item"
310
318
  ]));
311
319
  }
312
- }), q = /* @__PURE__ */ l({
320
+ }), J = /* @__PURE__ */ l({
313
321
  inheritAttrs: !1,
314
322
  __name: "CommandPaletteItems",
315
323
  props: { items: {} },
316
324
  setup(t) {
317
- let r = t, i = I(), o = n(() => r.items ?? i?.value ?? []);
318
- return (t, n) => (g(), a("div", p(t.$attrs, { class: "kappa-command-palette__items" }), [(g(!0), a(e, null, y(o.value, (e, n) => b(t.$slots, "default", {
325
+ let r = t, i = L(), o = n(() => r.items ?? i?.value ?? []);
326
+ return (t, n) => (_(), a("div", p(t.$attrs, { class: "kappa-command-palette__items" }), [(_(!0), a(e, null, b(o.value, (e, n) => x(t.$slots, "default", {
319
327
  key: n,
320
328
  index: n,
321
329
  item: e
322
330
  })), 128))], 16));
323
331
  }
324
- }), J = /* @__PURE__ */ l({
332
+ }), Y = /* @__PURE__ */ l({
325
333
  inheritAttrs: !1,
326
334
  __name: "CommandPaletteList",
327
335
  setup(e) {
328
- return (e, t) => (g(), a("div", p(e.$attrs, { class: "kappa-command-palette__list" }), [b(e.$slots, "default")], 16));
336
+ return (e, t) => (_(), r(C(D).Content, p(e.$attrs, { class: "kappa-command-palette__list" }), {
337
+ default: E(() => [x(e.$slots, "default")]),
338
+ _: 3
339
+ }, 16));
329
340
  }
330
- }), Y = /* @__PURE__ */ l({
341
+ }), X = /* @__PURE__ */ l({
331
342
  inheritAttrs: !1,
332
343
  __name: "CommandPaletteLoading",
333
344
  setup(e) {
334
- return (e, t) => (g(), a("div", p(e.$attrs, {
345
+ return (e, t) => (_(), a("div", p(e.$attrs, {
335
346
  class: "kappa-command-palette__loading",
336
347
  role: "status"
337
- }), [b(e.$slots, "default", {}, () => [t[0] ||= o("span", {
348
+ }), [x(e.$slots, "default", {}, () => [t[0] ||= o("span", {
338
349
  class: "kappa-command-palette__spinner",
339
350
  "aria-hidden": "true"
340
351
  }, null, -1), t[1] ||= o("span", null, "Loading results...", -1)])], 16));
341
352
  }
342
- }), X = /* @__PURE__ */ l({
353
+ }), Z = /* @__PURE__ */ l({
343
354
  inheritAttrs: !1,
344
355
  __name: "CommandPalettePanel",
345
356
  props: {
@@ -367,89 +378,91 @@ var k = /* @__PURE__ */ l({
367
378
  "valueChange"
368
379
  ],
369
380
  setup(e, { emit: t }) {
370
- let i = e, a = t, o = u()?.vnode.props ?? {}, s = Object.prototype.hasOwnProperty.call(o, "value"), c = v(i.value ?? i.defaultValue ?? ""), l = v(null), d = v(), f = v("reset"), m = (e) => B(e, i.itemToStringValue), h = (e) => V(e, i.itemToValue, i.itemToStringValue), _ = (e) => i.isItemDisabled?.(e) ?? (z(e) && e.disabled === !0), y = n(() => s ? i.value ?? "" : c.value), x = n(() => i.open ?? !0), C = n(() => {
381
+ let i = e, a = t, o = u()?.vnode.props ?? {}, s = Object.prototype.hasOwnProperty.call(o, "value"), c = y(i.value ?? i.defaultValue ?? ""), l = y(null), d = y(), f = y("reset"), m = (e) => V(e, i.itemToStringValue), h = (e) => H(e, i.itemToValue, i.itemToStringValue), g = (e) => i.isItemDisabled?.(e) ?? (B(e) && e.disabled === !0), v = n(() => s ? i.value ?? "" : c.value), b = n(() => i.open ?? !0), S = n(() => {
371
382
  let e = i.items ?? [];
372
- return i.getSelectableItems || i.filter === !1 ? e : e.filter((e) => H({
383
+ return i.getSelectableItems || i.filter === !1 ? e : e.filter((e) => U({
373
384
  filter: i.filter,
374
385
  item: e,
375
386
  itemToStringValue: i.itemToStringValue,
376
- query: y.value
387
+ query: v.value
377
388
  }));
378
- }), O = n(() => i.getSelectableItems?.(C.value) ?? C.value), k = n(() => D({
379
- isItemDisabled: _,
389
+ }), w = n(() => i.getSelectableItems?.(S.value) ?? S.value), O = n(() => ee({
390
+ isItemDisabled: g,
380
391
  itemToString: m,
381
392
  itemToValue: h,
382
- items: O.value
383
- })), A = n(() => l.value ?? void 0), j = (e) => O.value.find((t) => h(t) === e), M = (e) => {
393
+ items: w.value
394
+ })), k = n(() => l.value ?? void 0), A = (e) => w.value.find((t) => h(t) === e), j = (e) => {
384
395
  s || (c.value = e), a("update:value", e), a("valueChange", e);
385
- }, N = (e, t) => {
386
- _(e) || a("select", e, t);
396
+ }, M = (e, t) => {
397
+ g(e) || a("select", e, t);
398
+ }, N = (e) => {
399
+ d.value !== void 0 && M(d.value, e);
387
400
  }, P = (e) => {
388
- d.value !== void 0 && N(d.value, e);
389
- }, F = (e) => {
390
401
  f.value = e;
402
+ }, F = (e) => {
403
+ e.reason !== "item-select" && j(e.inputValue);
391
404
  }, I = (e) => {
392
- e.reason !== "item-select" && M(e.inputValue);
393
- }, L = (e) => {
394
405
  let t = e.highlightedItem ?? void 0;
395
406
  d.value = t, l.value = e.highlightedValue, a("itemHighlighted", t, {
396
- index: t === void 0 ? -1 : O.value.indexOf(t),
407
+ index: t === void 0 ? -1 : w.value.indexOf(t),
397
408
  reason: t === void 0 ? "reset" : f.value
398
409
  });
399
- }, R = (e) => {
400
- let t = j(e.itemValue);
401
- t !== void 0 && N(t, { newTab: !1 });
410
+ }, L = (e) => {
411
+ let t = e.value[0];
412
+ if (t === void 0) return;
413
+ let n = A(t);
414
+ n !== void 0 && M(n, { newTab: !1 });
402
415
  };
403
- return ee({
416
+ return te({
404
417
  close: () => a("close"),
405
- collection: k,
406
- inputValue: y,
407
- items: C,
408
- noteHighlightReason: F,
409
- open: x,
410
- selectHighlightedItem: P,
411
- selectItem: N,
412
- selectableItems: O,
418
+ collection: O,
419
+ inputValue: v,
420
+ items: S,
421
+ noteHighlightReason: P,
422
+ open: b,
423
+ selectHighlightedItem: N,
424
+ selectItem: M,
425
+ selectableItems: w,
413
426
  stringifyItem: m
414
- }), w([O, x], () => {
415
- if (!x.value) {
427
+ }), T([w, b], () => {
428
+ if (!b.value) {
416
429
  d.value = void 0, l.value = null, f.value = "reset";
417
430
  return;
418
431
  }
419
- if (l.value && O.value.some((e) => h(e) === l.value)) {
420
- d.value = j(l.value);
432
+ if (l.value && w.value.some((e) => h(e) === l.value)) {
433
+ d.value = A(l.value);
421
434
  return;
422
435
  }
423
- let e = O.value.find((e) => !_(e));
436
+ let e = w.value.find((e) => !g(e));
424
437
  d.value = e, l.value = e === void 0 ? null : h(e), f.value = "reset";
425
- }, { immediate: !0 }), w(() => i.value, (e) => {
438
+ }, { immediate: !0 }), T(() => i.value, (e) => {
426
439
  s && (c.value = e ?? "");
427
- }), (e, t) => (g(), r(S(E).Root, p(e.$attrs, {
440
+ }), (e, t) => (_(), r(C(D).Root, p(e.$attrs, {
428
441
  class: "kappa-command-palette",
429
442
  "allow-custom-value": !0,
430
443
  "auto-focus": !1,
431
444
  "close-on-select": !1,
432
- collection: k.value,
445
+ collection: O.value,
433
446
  "disable-layer": !0,
434
- "highlighted-value": A.value,
447
+ "highlighted-value": k.value,
435
448
  "input-behavior": "autohighlight",
436
- "input-value": y.value,
449
+ "input-value": v.value,
437
450
  "loop-focus": !0,
438
451
  "model-value": [],
439
- open: x.value,
452
+ open: b.value,
440
453
  "open-on-click": !1,
441
454
  "open-on-key-press": !0,
442
455
  "selection-behavior": "preserve",
443
- onHighlightChange: L,
444
- onInputValueChange: I,
445
- onSelect: R,
456
+ onHighlightChange: I,
457
+ onInputValueChange: F,
458
+ onValueChange: L,
446
459
  "onUpdate:highlightedValue": t[0] ||= (e) => l.value = e
447
460
  }), {
448
- default: T(() => [b(e.$slots, "default", {
449
- collection: k.value,
450
- items: C.value,
451
- selectableItems: O.value,
452
- value: y.value
461
+ default: E(() => [x(e.$slots, "default", {
462
+ collection: O.value,
463
+ items: S.value,
464
+ selectableItems: w.value,
465
+ value: v.value
453
466
  })]),
454
467
  _: 3
455
468
  }, 16, [
@@ -459,21 +472,21 @@ var k = /* @__PURE__ */ l({
459
472
  "open"
460
473
  ]));
461
474
  }
462
- }), re = {
475
+ }), ie = {
463
476
  key: 0,
464
477
  class: "kappa-command-palette__result-icon"
465
- }, ie = { class: "kappa-command-palette__result-body" }, ae = { class: "kappa-command-palette__result-path" }, oe = {
478
+ }, ae = { class: "kappa-command-palette__result-body" }, oe = { class: "kappa-command-palette__result-path" }, se = {
466
479
  key: 0,
467
480
  class: "kappa-command-palette__result-description"
468
- }, se = {
481
+ }, ce = {
469
482
  key: 1,
470
483
  class: "kappa-command-palette__external-icon",
471
484
  "aria-hidden": "true"
472
- }, ce = {
485
+ }, le = {
473
486
  key: 2,
474
487
  class: "kappa-command-palette__arrow-icon",
475
488
  "aria-hidden": "true"
476
- }, Z = /* @__PURE__ */ l({
489
+ }, Q = /* @__PURE__ */ l({
477
490
  inheritAttrs: !1,
478
491
  __name: "CommandPaletteResultItem",
479
492
  props: {
@@ -494,7 +507,7 @@ var k = /* @__PURE__ */ l({
494
507
  emits: ["select"],
495
508
  setup(t, { emit: n }) {
496
509
  let s = t, l = n;
497
- return (t, n) => (g(), r(K, p(t.$attrs, {
510
+ return (t, n) => (_(), r(q, p(t.$attrs, {
498
511
  disabled: s.disabled || s.nonInteractive,
499
512
  class: ["kappa-command-palette__result-item", {
500
513
  "kappa-command-palette__result-item--external": s.external,
@@ -503,21 +516,21 @@ var k = /* @__PURE__ */ l({
503
516
  value: s.value,
504
517
  onSelect: n[0] ||= (e, t) => l("select", e, t)
505
518
  }), {
506
- default: T(() => [
507
- t.$slots.icon ? (g(), a("span", re, [b(t.$slots, "icon")])) : i("", !0),
508
- o("span", ie, [o("span", ae, [(g(!0), a(e, null, y(s.breadcrumbs, (t, r) => (g(), a(e, { key: `${t}-${r}` }, [c(W, {
519
+ default: E(() => [
520
+ t.$slots.icon ? (_(), a("span", ie, [x(t.$slots, "icon")])) : i("", !0),
521
+ o("span", ae, [o("span", oe, [(_(!0), a(e, null, b(s.breadcrumbs, (t, r) => (_(), a(e, { key: `${t}-${r}` }, [c(G, {
509
522
  class: "kappa-command-palette__breadcrumb",
510
523
  highlights: s.breadcrumbHighlights?.[r],
511
524
  text: t
512
525
  }, null, 8, ["highlights", "text"]), n[1] ||= o("span", {
513
526
  class: "kappa-command-palette__separator",
514
527
  "aria-hidden": "true"
515
- }, "/", -1)], 64))), 128)), c(W, {
528
+ }, "/", -1)], 64))), 128)), c(G, {
516
529
  class: "kappa-command-palette__result-title",
517
530
  highlights: s.titleHighlights,
518
531
  text: s.title
519
- }, null, 8, ["highlights", "text"])]), s.description ? (g(), a("span", oe, x(s.description), 1)) : i("", !0)]),
520
- s.external ? (g(), a("span", se)) : s.showArrow && !s.nonInteractive ? (g(), a("span", ce)) : i("", !0)
532
+ }, null, 8, ["highlights", "text"])]), s.description ? (_(), a("span", se, S(s.description), 1)) : i("", !0)]),
533
+ s.external ? (_(), a("span", ce)) : s.showArrow && !s.nonInteractive ? (_(), a("span", le)) : i("", !0)
521
534
  ]),
522
535
  _: 3
523
536
  }, 16, [
@@ -526,14 +539,14 @@ var k = /* @__PURE__ */ l({
526
539
  "value"
527
540
  ]));
528
541
  }
529
- }), Q = /* @__PURE__ */ l({
542
+ }), ue = /* @__PURE__ */ l({
530
543
  inheritAttrs: !1,
531
544
  __name: "CommandPaletteResults",
532
545
  setup(t) {
533
- let n = P("CommandPalette.Results");
534
- return (t, i) => (g(), r(S(E).List, p(t.$attrs, { class: "kappa-command-palette__results" }), {
535
- default: T(() => [(g(!0), a(e, null, y(S(n).items.value, (e, r) => b(t.$slots, "default", {
536
- key: S(n).stringifyItem(e) || r,
546
+ let n = F("CommandPalette.Results");
547
+ return (t, i) => (_(), r(C(D).List, p(t.$attrs, { class: "kappa-command-palette__results" }), {
548
+ default: E(() => [(_(!0), a(e, null, b(C(n).items.value, (e, r) => x(t.$slots, "default", {
549
+ key: C(n).stringifyItem(e) || r,
537
550
  index: r,
538
551
  item: e
539
552
  })), 128))]),
@@ -601,28 +614,28 @@ var k = /* @__PURE__ */ l({
601
614
  "valueChange"
602
615
  ],
603
616
  setup(e, { emit: t }) {
604
- let i = e, a = t, o = C(), s = u()?.vnode.props ?? {}, l = Object.prototype.hasOwnProperty.call(s, "open"), f = Object.prototype.hasOwnProperty.call(s, "value"), h = v(i.open ?? i.defaultOpen ?? !1), _ = n(() => l ? i.open ?? !1 : h.value), y = n(() => ({
617
+ let i = e, a = t, o = w(), s = u()?.vnode.props ?? {}, l = Object.prototype.hasOwnProperty.call(s, "open"), f = Object.prototype.hasOwnProperty.call(s, "value"), m = y(i.open ?? i.defaultOpen ?? !1), g = n(() => l ? i.open ?? !1 : m.value), v = n(() => ({
605
618
  ...o,
606
619
  ...f ? { value: i.value } : {}
607
- })), x = (e) => {
608
- e !== _.value && (l || (h.value = e), a("update:open", e), a("openChange", e), e || a("close"));
620
+ })), b = (e) => {
621
+ e !== g.value && (l || (m.value = e), a("update:open", e), a("openChange", e), e || a("close"));
609
622
  };
610
- return w(() => i.open, (e) => {
611
- l && e !== void 0 && (h.value = e);
612
- }), (t, n) => (g(), r(k, {
623
+ return T(() => i.open, (e) => {
624
+ l && e !== void 0 && (m.value = e);
625
+ }), (t, n) => (_(), r(A, {
613
626
  "aria-label": e.ariaLabel,
614
627
  "close-on-escape": e.closeOnEscape,
615
628
  "close-on-interact-outside": e.closeOnInteractOutside,
616
629
  "lazy-mount": e.lazyMount,
617
630
  modal: e.modal,
618
- open: _.value,
631
+ open: g.value,
619
632
  "prevent-scroll": e.preventScroll,
620
633
  "restore-focus": e.restoreFocus,
621
634
  "trap-focus": e.trapFocus,
622
635
  "unmount-on-exit": e.unmountOnExit,
623
- onOpenChange: x
636
+ onOpenChange: b
624
637
  }, {
625
- default: T(() => [c(X, p(y.value, {
638
+ default: E(() => [c(Z, p(v.value, {
626
639
  "default-value": e.defaultValue,
627
640
  filter: e.filter,
628
641
  "get-selectable-items": e.getSelectableItems,
@@ -630,14 +643,14 @@ var k = /* @__PURE__ */ l({
630
643
  "item-to-string-value": e.itemToStringValue,
631
644
  "item-to-value": e.itemToValue,
632
645
  items: e.items,
633
- open: _.value,
634
- onClose: n[0] ||= (e) => x(!1),
646
+ open: g.value,
647
+ onClose: n[0] ||= (e) => b(!1),
635
648
  onItemHighlighted: n[1] ||= (e, t) => a("itemHighlighted", e, t),
636
649
  onSelect: n[2] ||= (e, t) => a("select", e, t),
637
650
  "onUpdate:value": n[3] ||= (e) => a("update:value", e),
638
651
  onValueChange: n[4] ||= (e) => a("valueChange", e)
639
652
  }), {
640
- default: T((e) => [b(t.$slots, "default", m(d(e)))]),
653
+ default: E((e) => [x(t.$slots, "default", h(d(e)))]),
641
654
  _: 3
642
655
  }, 16, [
643
656
  "default-value",
@@ -663,24 +676,24 @@ var k = /* @__PURE__ */ l({
663
676
  "unmount-on-exit"
664
677
  ]));
665
678
  }
666
- }), le = Object.assign($, {
667
- Dialog: k,
668
- Empty: A,
669
- Footer: j,
670
- Group: L,
671
- GroupLabel: R,
672
- HighlightedText: W,
673
- Input: G,
674
- Item: K,
675
- Items: q,
676
- List: J,
677
- Loading: Y,
678
- Panel: X,
679
- ResultItem: Z,
680
- Results: Q,
679
+ }), de = Object.assign($, {
680
+ Dialog: A,
681
+ Empty: j,
682
+ Footer: M,
683
+ Group: R,
684
+ GroupLabel: z,
685
+ HighlightedText: G,
686
+ Input: K,
687
+ Item: q,
688
+ Items: J,
689
+ List: Y,
690
+ Loading: X,
691
+ Panel: Z,
692
+ ResultItem: Q,
693
+ Results: ue,
681
694
  Root: $
682
695
  });
683
696
  //#endregion
684
- export { L as _, X as a, k as b, q as c, W as d, U as f, R as g, B as h, Z as i, K as l, H as m, $ as n, Y as o, V as p, Q as r, J as s, le as t, G as u, j as v, A as y };
697
+ export { R as _, Z as a, A as b, J as c, G as d, W as f, z as g, V as h, Q as i, q as l, U as m, $ as n, X as o, H as p, ue as r, Y as s, de as t, K as u, M as v, j as y };
685
698
 
686
- //# sourceMappingURL=command-palette-BHFB86Gc.js.map
699
+ //# sourceMappingURL=command-palette-BjXvHrd6.js.map