@mkbabb/glass-ui 10.1.0 → 10.1.1

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 (37) hide show
  1. package/MIGRATION.md +25 -0
  2. package/dist/aurora.js +29 -29
  3. package/dist/{command-C-5xSEJ2.js → command-CTQCaHVA.js} +1 -1
  4. package/dist/command.js +1 -1
  5. package/dist/components/_shared/overlay/participation.d.ts +13 -1
  6. package/dist/components/dock/GlassDock.vue.d.ts +5 -5
  7. package/dist/components/dock/composables/dockContext.d.ts +16 -2
  8. package/dist/components/sheet/styles.css +1 -1
  9. package/dist/components/skeleton/Skeleton.vue.d.ts +6 -0
  10. package/dist/content-BhcJH1bI.js +22 -0
  11. package/dist/data-table-Cs93-uY7.js +511 -0
  12. package/dist/data-table.js +1 -1
  13. package/dist/dock.js +417 -409
  14. package/dist/easing.js +3 -3
  15. package/dist/glass-ui.css +1 -1
  16. package/dist/glass-ui.js +8 -8
  17. package/dist/labeled-field.js +1 -1
  18. package/dist/{menu-BnmCOa3y.js → menu-DN29N6KR.js} +6 -3
  19. package/dist/menu.js +1 -1
  20. package/dist/motion-core.js +11 -11
  21. package/dist/participation-Cs_UX_Dc.js +55 -0
  22. package/dist/{popover-DA87hFBx.js → popover-CJpvT2E6.js} +9 -4
  23. package/dist/popover.js +1 -1
  24. package/dist/{select-fy3vtArm.js → select-5QMeUAU6.js} +26 -24
  25. package/dist/select.js +1 -1
  26. package/dist/{sheet-BQJyER59.js → sheet-DmJxgAHc.js} +1 -1
  27. package/dist/sheet.js +1 -1
  28. package/dist/{slider-5ChjjWSR.js → slider-D1zkobtO.js} +1 -1
  29. package/dist/slider.js +1 -1
  30. package/dist/{tabs-rdRXKXxd.js → tabs-C0PYq3Tb.js} +1 -1
  31. package/dist/tabs.js +1 -1
  32. package/dist/{tooltip-DhTHhtJN.js → tooltip-D7j6TsE4.js} +3 -3
  33. package/dist/tooltip.js +1 -1
  34. package/package.json +1 -1
  35. package/dist/content-So3j6SOe.js +0 -18
  36. package/dist/data-table-Ba_uTfPc.js +0 -493
  37. package/dist/participation-Di4UHbzk.js +0 -42
package/dist/dock.js CHANGED
@@ -6,44 +6,44 @@ import { n as i } from "./springPresets-Cbe0Voqg.js";
6
6
  import { t as a } from "./useLiquidPress-h1scrPtP.js";
7
7
  import { t as o } from "./useMotionAxis-D-rtIhca.js";
8
8
  import { n as s, t as c } from "./createContext-BhkE9mLH.js";
9
- import { a as l, c as u, i as d, l as f, n as p, o as m, r as h, s as g, u as _ } from "./participation-Di4UHbzk.js";
10
- import { t as v } from "./useResizeObserver-CdUlm2QZ.js";
11
- import { n as y } from "./useResolveTokenColor-B2FfJnd9.js";
12
- import { t as b } from "./focus-Duf7EpUu.js";
13
- import { t as x } from "./DropdownMenuTrigger-CKRnhDSQ.js";
14
- import { t as S } from "./useSelectionGroup-zsEwitF6.js";
15
- import { t as C } from "./useDragMorph-B363RUbF.js";
16
- import { n as w } from "./useDockCtaReceive-BSSgD6mu.js";
17
- import { n as T, t as E } from "./useScrollChrome-BJbWV32F.js";
18
- import { t as D } from "./useIntersectionPause-CzKR3EyP.js";
19
- import { Fragment as O, computed as k, createBlock as A, createCommentVNode as j, createElementBlock as M, createElementVNode as N, createVNode as P, defineComponent as F, mergeModels as I, mergeProps as L, nextTick as R, normalizeClass as z, normalizeStyle as B, onBeforeUnmount as V, onMounted as H, onScopeDispose as U, onUnmounted as W, openBlock as G, readonly as K, ref as q, renderList as ee, renderSlot as J, resolveDynamicComponent as te, toDisplayString as ne, unref as Y, useId as re, useModel as ie, useTemplateRef as X, watch as Z, withCtx as Q, withDirectives as $, withModifiers as ae } from "vue";
20
- import { PopoverTrigger as oe, Primitive as se, SelectIcon as ce, SelectTrigger as le } from "reka-ui";
21
- import { ChevronDown as ue, Pause as de, Play as fe } from "@lucide/vue";
22
- import { SpringProgress as pe } from "@mkbabb/keyframes.js";
23
- import { useMediaQuery as me } from "@vueuse/core";
9
+ import { a as l, c as u, d, i as f, l as p, n as m, o as h, r as g, s as _, u as v } from "./participation-Cs_UX_Dc.js";
10
+ import { t as y } from "./useResizeObserver-CdUlm2QZ.js";
11
+ import { n as b } from "./useResolveTokenColor-B2FfJnd9.js";
12
+ import { t as x } from "./useIntersectionPause-CzKR3EyP.js";
13
+ import { t as S } from "./focus-Duf7EpUu.js";
14
+ import { t as C } from "./DropdownMenuTrigger-CKRnhDSQ.js";
15
+ import { t as w } from "./useSelectionGroup-zsEwitF6.js";
16
+ import { t as T } from "./useDragMorph-B363RUbF.js";
17
+ import { n as E } from "./useDockCtaReceive-BSSgD6mu.js";
18
+ import { n as D, t as O } from "./useScrollChrome-BJbWV32F.js";
19
+ import { Fragment as k, computed as A, createBlock as j, createCommentVNode as M, createElementBlock as N, createElementVNode as P, createVNode as F, defineComponent as I, mergeModels as L, mergeProps as R, nextTick as z, normalizeClass as B, normalizeStyle as V, onBeforeUnmount as H, onMounted as U, onScopeDispose as W, onUnmounted as ee, openBlock as G, readonly as K, ref as q, renderList as te, renderSlot as J, resolveDynamicComponent as ne, toDisplayString as re, unref as Y, useId as ie, useModel as ae, useTemplateRef as X, watch as Z, withCtx as Q, withDirectives as $, withModifiers as oe } from "vue";
20
+ import { PopoverTrigger as se, Primitive as ce, SelectIcon as le, SelectTrigger as ue } from "reka-ui";
21
+ import { ChevronDown as de, Pause as fe, Play as pe } from "@lucide/vue";
22
+ import { SpringProgress as me } from "@mkbabb/keyframes.js";
23
+ import { useMediaQuery as he } from "@vueuse/core";
24
24
  //#region src/components/_shared/overlay/isTeleportedTarget.ts
25
- function he(e, t) {
25
+ function ge(e, t) {
26
26
  if (!(e instanceof Element)) return !1;
27
27
  let n = e.closest("[data-glass-dock-portal]");
28
28
  return n ? !t || n.getAttribute("data-glass-dock-owner") === t : !1;
29
29
  }
30
30
  //#endregion
31
31
  //#region src/composables/glass/backdropSampleMath.ts
32
- function ge(e) {
32
+ function _e(e) {
33
33
  let t = e / 255;
34
34
  return t <= .03928 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
35
35
  }
36
- function _e(e, t, n) {
37
- return .2126 * ge(e) + .7152 * ge(t) + .0722 * ge(n);
36
+ function ve(e, t, n) {
37
+ return .2126 * _e(e) + .7152 * _e(t) + .0722 * _e(n);
38
38
  }
39
- function ve(e, t, n, r, i) {
39
+ function ye(e, t, n, r, i) {
40
40
  return [
41
41
  e * r + i[0] * (1 - r),
42
42
  t * r + i[1] * (1 - r),
43
43
  n * r + i[2] * (1 - r)
44
44
  ];
45
45
  }
46
- function ye(e) {
46
+ function be(e) {
47
47
  let t = e.match(/rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:[,\s/]+([\d.]+))?/i);
48
48
  return t ? [
49
49
  Number(t[1]),
@@ -52,31 +52,31 @@ function ye(e) {
52
52
  t[4] === void 0 ? 1 : Number(t[4])
53
53
  ] : null;
54
54
  }
55
- function be(e) {
55
+ function xe(e) {
56
56
  return typeof HTMLCanvasElement < "u" && e instanceof HTMLCanvasElement;
57
57
  }
58
- var xe = "[data-glass-field-canvas] canvas, canvas[data-glass-field-canvas]";
59
- function Se(e) {
58
+ var Se = "[data-glass-field-canvas] canvas, canvas[data-glass-field-canvas]";
59
+ function Ce(e) {
60
60
  if (!e) {
61
61
  if (typeof document < "u") {
62
- let e = document.querySelector(xe);
63
- if (be(e)) return e;
62
+ let e = document.querySelector(Se);
63
+ if (xe(e)) return e;
64
64
  }
65
65
  return null;
66
66
  }
67
- if (be(e)) return e;
67
+ if (xe(e)) return e;
68
68
  if (typeof e == "function") {
69
69
  let t = e();
70
- return be(t) ? t : null;
70
+ return xe(t) ? t : null;
71
71
  }
72
72
  if (typeof e == "string" && typeof document < "u") {
73
73
  let t = document.querySelector(e);
74
- return be(t) ? t : null;
74
+ return xe(t) ? t : null;
75
75
  }
76
76
  return null;
77
77
  }
78
- function Ce(e, t) {
79
- let n = ye(e);
78
+ function we(e, t) {
79
+ let n = be(e);
80
80
  if (n) return n;
81
81
  if (!t) return null;
82
82
  try {
@@ -92,7 +92,7 @@ function Ce(e, t) {
92
92
  return null;
93
93
  }
94
94
  }
95
- function we(e, t, n, r) {
95
+ function Te(e, t, n, r) {
96
96
  if (!t || t.width === 0 || t.height === 0 || !n) return null;
97
97
  let i = e.getBoundingClientRect(), a = t.getBoundingClientRect();
98
98
  if (a.width === 0 || a.height === 0) return null;
@@ -102,50 +102,50 @@ function we(e, t, n, r) {
102
102
  n.clearRect(0, 0, 32, 32), n.drawImage(t, c, l, u, d, 0, 0, 32, 32);
103
103
  let e = n.getImageData(0, 0, 32, 32).data, i = 0, a = 0, o = 0;
104
104
  for (let t = 0; t < e.length; t += 4) {
105
- let n = e[t + 3] / 255, [s, c, l] = ve(e[t], e[t + 1], e[t + 2], n, r);
106
- i += _e(s, c, l), a += n, o++;
105
+ let n = e[t + 3] / 255, [s, c, l] = ye(e[t], e[t + 1], e[t + 2], n, r);
106
+ i += ve(s, c, l), a += n, o++;
107
107
  }
108
108
  return o === 0 || a / o < .02 ? null : { luma: i / o };
109
109
  } catch {
110
110
  return null;
111
111
  }
112
112
  }
113
- function Te(e, t) {
113
+ function Ee(e, t) {
114
114
  let n = e.getBoundingClientRect(), r = n.left + n.width / 2, i = n.top + n.height / 2, a = document.elementsFromPoint(r, i);
115
115
  for (let n of a) {
116
116
  if (!(n instanceof HTMLElement) || n === e || e.contains(n)) continue;
117
- let r = getComputedStyle(n).backgroundColor, i = Ce(y(r, e), t);
117
+ let r = getComputedStyle(n).backgroundColor, i = we(b(r, e), t);
118
118
  if (i && !(i[3] < .5)) return i;
119
119
  }
120
- return Ce(y(getComputedStyle(document.body).backgroundColor, e), t);
120
+ return we(b(getComputedStyle(document.body).backgroundColor, e), t);
121
121
  }
122
- var Ee = [
122
+ var De = [
123
123
  255,
124
124
  255,
125
125
  255
126
126
  ];
127
- function De(e, t) {
128
- let n = Te(e, t);
127
+ function Oe(e, t) {
128
+ let n = Ee(e, t);
129
129
  return n && n[3] >= .5 ? [
130
130
  n[0],
131
131
  n[1],
132
132
  n[2]
133
- ] : [...Ee];
133
+ ] : [...De];
134
134
  }
135
- function Oe(e, t) {
136
- let n = Te(e, t);
137
- return n ? ke(n) : null;
135
+ function ke(e, t) {
136
+ let n = Ee(e, t);
137
+ return n ? Ae(n) : null;
138
138
  }
139
- function ke(e) {
140
- return { luma: _e(e[0], e[1], e[2]) };
139
+ function Ae(e) {
140
+ return { luma: ve(e[0], e[1], e[2]) };
141
141
  }
142
142
  //#endregion
143
143
  //#region src/composables/glass/useGlassBackdropLuminance.ts
144
- var Ae = "data-glass-backdrop-shared";
145
- function je(e, n = {}) {
144
+ var je = "data-glass-backdrop-shared";
145
+ function Me(e, n = {}) {
146
146
  let { lightThreshold: r = .6, minSampleIntervalMs: i = 250, writeBucket: a = !0 } = n, o = Math.max(250, i), s = n.shared === !0;
147
147
  function c(e) {
148
- return !s && e.closest(`[${Ae}]`) !== null;
148
+ return !s && e.closest(`[${je}]`) !== null;
149
149
  }
150
150
  let l = q(null), u = q(null), d = q({
151
151
  state: "pending",
@@ -164,7 +164,7 @@ function je(e, n = {}) {
164
164
  return p || (p = document.createElement("canvas"), p.width = 32, p.height = 32), m ||= p.getContext("2d", { willReadFrequently: !0 }), m;
165
165
  }
166
166
  function g() {
167
- return n.live === void 0 ? e.value?.dataset.glassSample === "live" || n.backgroundCanvas != null || Se(void 0) !== null : n.live;
167
+ return n.live === void 0 ? e.value?.dataset.glassSample === "live" || n.backgroundCanvas != null || Ce(void 0) !== null : n.live;
168
168
  }
169
169
  function _(e) {
170
170
  let t = e.getBoundingClientRect();
@@ -175,7 +175,7 @@ function je(e, n = {}) {
175
175
  height: t.height
176
176
  };
177
177
  }
178
- function y(e, t, n, i) {
178
+ function v(e, t, n, i) {
179
179
  let o = e.luma;
180
180
  l.value = o;
181
181
  let s = o >= r ? "light" : "dark";
@@ -198,68 +198,68 @@ function je(e, n = {}) {
198
198
  targetRect: _(e)
199
199
  }, e.style.removeProperty("--glass-backdrop-luma"), e.style.removeProperty("--glass-backdrop-sampled"), a && e.style.removeProperty("--glass-backdrop"), e.removeAttribute("data-backdrop-sampled"), e.setAttribute("data-backdrop-sample-state", "unavailable"), e.setAttribute("data-backdrop-sample-source", t === "live" ? "canvas" : "elements"), e.setAttribute("data-backdrop-sample-reason", n);
200
200
  }
201
- let x = 0;
202
- function S() {
201
+ let S = 0;
202
+ function C() {
203
203
  let t = e.value;
204
204
  if (!t || c(t)) return;
205
- let r = h(), i = g() ? "live" : "static", a = i === "live" ? Se(n.backgroundCanvas) : null, o = i === "live" ? we(t, a, r, De(t, r)) : Oe(t, r), s = Date.now();
206
- o ? y(o, t, i, s) : b(t, i, i === "live" && !a ? "source-unavailable" : "sample-unavailable", s), x = typeof performance < "u" ? performance.now() : s;
205
+ let r = h(), i = g() ? "live" : "static", a = i === "live" ? Ce(n.backgroundCanvas) : null, o = i === "live" ? Te(t, a, r, Oe(t, r)) : ke(t, r), s = Date.now();
206
+ o ? v(o, t, i, s) : b(t, i, i === "live" && !a ? "source-unavailable" : "sample-unavailable", s), S = typeof performance < "u" ? performance.now() : s;
207
207
  }
208
- let C = T(({ now: e }) => {
209
- f.value || e - x < o || S();
208
+ let w = D(({ now: e }) => {
209
+ f.value || e - S < o || C();
210
210
  }, {
211
211
  immediate: !1,
212
212
  pauseWhenHidden: !0,
213
213
  respectReducedMotion: !0
214
- }), w = D(() => e.value, {
215
- pause: () => C.pause(),
214
+ }), T = x(() => e.value, {
215
+ pause: () => w.pause(),
216
216
  resume: () => {
217
217
  let t = e.value;
218
- t && c(t) || g() && !f.value && C.resume();
218
+ t && c(t) || g() && !f.value && w.resume();
219
219
  }
220
- }, { rootMargin: "200px" }), E = v(e, () => S());
220
+ }, { rootMargin: "200px" }), E = y(e, () => C());
221
221
  function O() {
222
222
  let t = e.value;
223
223
  if (t && c(t)) {
224
- C.stop();
224
+ w.stop();
225
225
  return;
226
226
  }
227
- f.value ? (C.stop(), S()) : g() && C.start();
227
+ f.value ? (w.stop(), C()) : g() && w.start();
228
228
  }
229
229
  let k = Z(f, O, { flush: "sync" }), A = Z(() => e.value, (e) => {
230
230
  if (e) {
231
- if (s) e.setAttribute(Ae, "");
231
+ if (s) e.setAttribute(je, "");
232
232
  else if (c(e)) return;
233
- S(), O();
233
+ C(), O();
234
234
  }
235
235
  }, {
236
236
  immediate: !0,
237
237
  flush: "post"
238
238
  });
239
239
  function j() {
240
- A(), k(), C.dispose(), w.dispose(), E.stop(), p = null, m = null;
240
+ A(), k(), w.dispose(), T.dispose(), E.stop(), p = null, m = null;
241
241
  }
242
- return U(j), {
242
+ return W(j), {
243
243
  luma: K(l),
244
244
  bucket: K(u),
245
245
  sample: K(d),
246
- sampleNow: S,
246
+ sampleNow: C,
247
247
  dispose: j
248
248
  };
249
249
  }
250
250
  //#endregion
251
251
  //#region src/components/dock/composables/useDockState.ts
252
- function Me(e) {
253
- let { collapseDelay: t = g, rootEl: n, alwaysExpanded: r = !1, initialExpanded: i = !1, isTransitioning: a, dockId: o, onStateChange: s } = e, c = () => typeof r == "boolean" ? r : r.value, l = () => c(), u = q(c() ? "pinned" : i ? "hover" : "collapsed"), d = k(() => u.value !== "collapsed"), f = k(() => u.value === "pinned"), p = null, m = q(0), h = q(0), _ = k(() => m.value > 0), v = k(() => h.value > 0), y = null, b = null, x = !1, S = null;
252
+ function Ne(e) {
253
+ let { collapseDelay: t = u, rootEl: n, alwaysExpanded: r = !1, initialExpanded: i = !1, isTransitioning: a, dockId: o, onStateChange: s } = e, c = () => typeof r == "boolean" ? r : r.value, l = () => c(), d = q(c() ? "pinned" : i ? "hover" : "collapsed"), f = A(() => d.value !== "collapsed"), p = A(() => d.value === "pinned"), m = null, h = q(0), g = q(0), _ = A(() => h.value > 0), v = A(() => g.value > 0), y = null, b = null, x = !1, S = null;
254
254
  function C() {
255
255
  S &&= (clearTimeout(S), null);
256
256
  }
257
- let w = u.value;
257
+ let w = d.value;
258
258
  function T() {
259
- c() && (u.value = "pinned"), s && w !== u.value && s(u.value, w), w = u.value;
259
+ c() && (d.value = "pinned"), s && w !== d.value && s(d.value, w), w = d.value;
260
260
  }
261
261
  function E() {
262
- p &&= (clearTimeout(p), null);
262
+ m &&= (clearTimeout(m), null);
263
263
  }
264
264
  function D() {
265
265
  b !== null && (cancelAnimationFrame(b), b = null);
@@ -267,85 +267,85 @@ function Me(e) {
267
267
  function O() {
268
268
  D(), y?.();
269
269
  }
270
- function A() {
271
- l() || m.value > 0 || (E(), p = setTimeout(() => {
272
- u.value = "collapsed", T();
270
+ function k() {
271
+ l() || h.value > 0 || (E(), m = setTimeout(() => {
272
+ d.value = "collapsed", T();
273
273
  }, t));
274
274
  }
275
275
  function j() {
276
276
  if (c()) {
277
- u.value = "pinned", T();
277
+ d.value = "pinned", T();
278
278
  return;
279
279
  }
280
- x ||= (x = !0, E(), C(), u.value = "collapsed", T(), !1);
280
+ x ||= (x = !0, E(), C(), d.value = "collapsed", T(), !1);
281
281
  }
282
282
  function M() {
283
283
  if (c()) {
284
- u.value = "pinned", T();
284
+ d.value = "pinned", T();
285
285
  return;
286
286
  }
287
- E(), C(), u.value = "hover", T();
287
+ E(), C(), d.value = "hover", T();
288
288
  }
289
289
  function N() {
290
- l() || (E(), u.value === "collapsed" && (C(), S = setTimeout(() => {
291
- S = null, !l() && u.value === "collapsed" && (u.value = "hover", T());
290
+ l() || (E(), d.value === "collapsed" && (C(), S = setTimeout(() => {
291
+ S = null, !l() && d.value === "collapsed" && (d.value = "hover", T());
292
292
  }, 60)));
293
293
  }
294
294
  function P(e) {
295
- if (!l() && (C(), u.value === "hover")) {
296
- if (m.value > 0) return;
295
+ if (!l() && (C(), d.value === "hover")) {
296
+ if (h.value > 0) return;
297
297
  if (e) {
298
298
  let t = n.value;
299
- if (t && e.relatedTarget instanceof Node && t.contains(e.relatedTarget) || he(e.relatedTarget, o)) return;
299
+ if (t && e.relatedTarget instanceof Node && t.contains(e.relatedTarget) || ge(e.relatedTarget, o)) return;
300
300
  }
301
- A();
301
+ k();
302
302
  }
303
303
  }
304
304
  function F() {
305
- l() || (E(), u.value === "collapsed" && (u.value = "hover", T()));
305
+ l() || (E(), d.value === "collapsed" && (d.value = "hover", T()));
306
306
  }
307
307
  function I(e) {
308
- if (l() || u.value !== "hover" || m.value > 0) return;
308
+ if (l() || d.value !== "hover" || h.value > 0) return;
309
309
  let t = e.currentTarget;
310
- e.relatedTarget && t.contains(e.relatedTarget) || he(e.relatedTarget, o) || A();
310
+ e.relatedTarget && t.contains(e.relatedTarget) || ge(e.relatedTarget, o) || k();
311
311
  }
312
312
  function L() {
313
- l() || (E(), C(), u.value = "pinned", T());
313
+ l() || (E(), C(), d.value = "pinned", T());
314
314
  }
315
315
  function R(e = "morph") {
316
- m.value++, e === "grasp" && h.value++, E();
316
+ h.value++, e === "grasp" && g.value++, E();
317
317
  }
318
318
  function z(e = "morph") {
319
- e === "grasp" && (h.value = Math.max(0, h.value - 1)), m.value = Math.max(0, m.value - 1), m.value === 0 && u.value === "hover" && (E(), p = setTimeout(() => {
320
- m.value === 0 && u.value === "hover" && A();
319
+ e === "grasp" && (g.value = Math.max(0, g.value - 1)), h.value = Math.max(0, h.value - 1), h.value === 0 && d.value === "hover" && (E(), m = setTimeout(() => {
320
+ h.value === 0 && d.value === "hover" && k();
321
321
  }, Math.min(t, 800)));
322
322
  }
323
323
  function B(e) {
324
- if (l() || m.value > 0 || a?.value) return;
324
+ if (l() || h.value > 0 || a?.value) return;
325
325
  let t = n.value;
326
- !t || t.contains(e.target) || he(e.target, o) || j();
326
+ !t || t.contains(e.target) || ge(e.target, o) || j();
327
327
  }
328
- return Z(d, (e) => {
328
+ return Z(f, (e) => {
329
329
  if (e) {
330
330
  if (typeof document > "u") return;
331
331
  O(), b = requestAnimationFrame(() => {
332
- b = null, d.value && (document.addEventListener("pointerdown", B, !0), y = () => {
332
+ b = null, f.value && (document.addEventListener("pointerdown", B, !0), y = () => {
333
333
  document.removeEventListener("pointerdown", B, !0), y = null;
334
334
  });
335
335
  });
336
336
  } else O();
337
- }, { immediate: !0 }), typeof r == "boolean" ? r && (u.value = "pinned", T()) : Z(r, (e) => {
337
+ }, { immediate: !0 }), typeof r == "boolean" ? r && (d.value = "pinned", T()) : Z(r, (e) => {
338
338
  if (e) {
339
- E(), u.value = "pinned", T();
339
+ E(), d.value = "pinned", T();
340
340
  return;
341
341
  }
342
- u.value = "collapsed", T();
343
- }), W(() => {
342
+ d.value = "collapsed", T();
343
+ }), ee(() => {
344
344
  E(), C(), O();
345
345
  }), {
346
- state: u,
347
- expanded: d,
348
- isPinned: f,
346
+ state: d,
347
+ expanded: f,
348
+ isPinned: p,
349
349
  isHeld: _,
350
350
  graspHeld: v,
351
351
  onMouseEnter: N,
@@ -361,7 +361,7 @@ function Me(e) {
361
361
  }
362
362
  //#endregion
363
363
  //#region src/components/dock/composables/useDockSpring.ts
364
- function Ne(e) {
364
+ function Pe(e) {
365
365
  let t = null, n = () => t !== null && !t.settled;
366
366
  function i() {
367
367
  t &&= (t.dispose(), null);
@@ -369,7 +369,7 @@ function Ne(e) {
369
369
  function a(a, o, s) {
370
370
  let c = n() ? t.velocity * (s.inheritVelocityScale ?? 1) : 0;
371
371
  i();
372
- let l = new pe({
372
+ let l = new me({
373
373
  response: e.response * r(),
374
374
  dampingFraction: e.dampingFraction,
375
375
  initial: a,
@@ -396,11 +396,11 @@ function Ne(e) {
396
396
  }
397
397
  //#endregion
398
398
  //#region src/components/dock/composables/useDockMorph.ts
399
- function Pe(e) {
400
- let { rootEl: t, outerActiveLayer: n } = e, r = q(n.value), i = q(null), a = Ne({
401
- response: f.response,
402
- dampingFraction: f.dampingFraction
403
- }), o = me("(prefers-reduced-motion: reduce)");
399
+ function Fe(e) {
400
+ let { rootEl: t, outerActiveLayer: n } = e, r = q(n.value), i = q(null), a = Pe({
401
+ response: v.response,
402
+ dampingFraction: v.dampingFraction
403
+ }), o = he("(prefers-reduced-motion: reduce)");
404
404
  function s() {
405
405
  return t.value;
406
406
  }
@@ -434,7 +434,7 @@ function Pe(e) {
434
434
  }
435
435
  i.value = t, l();
436
436
  });
437
- return W(() => {
437
+ return ee(() => {
438
438
  u(), a.dispose();
439
439
  }), {
440
440
  outerCurrentLayer: K(r),
@@ -443,15 +443,15 @@ function Pe(e) {
443
443
  }
444
444
  //#endregion
445
445
  //#region src/components/dock/composables/dockMorphMeasure.ts
446
- function Fe(e, t) {
446
+ function Ie(e, t) {
447
447
  return t === "vertical" ? e.offsetHeight : e.offsetWidth;
448
448
  }
449
- function Ie(e) {
449
+ function Le(e) {
450
450
  let { rootEl: t, contentEl: n, expandedEl: r, collapsedEl: i, axis: a, expanded: o } = e, s = null, c = 0, l = 0, u = !1;
451
451
  function d(e = "layout") {
452
452
  let s = t.value, u = n.value, d = r.value, f = i.value;
453
453
  if (!s || !u || !d || !f || s.hasAttribute("data-morphing")) return;
454
- let p = a.value, m = Fe(s, p), h = Fe(d, p), g = Fe(f, p);
454
+ let p = a.value, m = Ie(s, p), h = Ie(d, p), g = Ie(f, p);
455
455
  if (m <= 0 || h < 0 || g < 0) return;
456
456
  e === "layout" && (o.value ? c = m : l = m);
457
457
  let _ = o.value ? h : g, v = Math.max(0, m - _), y = c || v + h, b = l || v + g;
@@ -481,25 +481,25 @@ function Ie(e) {
481
481
  a
482
482
  ], f, { immediate: !0 }), Z(o, () => d("flip"));
483
483
  let p = typeof document < "u" ? document.fonts : void 0;
484
- p && p.ready.then(() => !u && d("layout")), U(() => {
484
+ p && p.ready.then(() => !u && d("layout")), W(() => {
485
485
  u = !0, s?.disconnect(), s = null;
486
486
  });
487
487
  }
488
488
  //#endregion
489
489
  //#region src/components/dock/composables/useDockShellProps.ts
490
- function Le(e) {
491
- let t = k(() => e.shape ?? "pill"), n = k(() => e.orientation ?? "horizontal"), r = k(() => e.collapse === !1);
490
+ function Re(e) {
491
+ let t = A(() => e.shape ?? "pill"), n = A(() => e.orientation ?? "horizontal"), r = A(() => e.collapse === !1);
492
492
  return {
493
- startCollapsed: k(() => !r.value && (e.collapse ?? "closed") === "closed"),
493
+ startCollapsed: A(() => !r.value && (e.collapse ?? "closed") === "closed"),
494
494
  shape: t,
495
495
  orientation: n,
496
496
  alwaysExpanded: r,
497
- fitContent: k(() => e.fitContent ?? !1)
497
+ fitContent: A(() => e.fitContent ?? !1)
498
498
  };
499
499
  }
500
500
  //#endregion
501
501
  //#region src/components/dock/composables/useDockClickIntegrity.ts
502
- function Re(e) {
502
+ function ze(e) {
503
503
  let { rootEl: t, visualExpanded: n } = e, r = null, i = !1, a = 0, o = null, s = q(null), c = null, l = [];
504
504
  function u() {
505
505
  c?.removeAttribute("data-dock-press-origin"), c = null;
@@ -570,7 +570,7 @@ function Re(e) {
570
570
  }
571
571
  e.stopPropagation(), e.preventDefault(), r = null;
572
572
  }
573
- return V(() => {
573
+ return H(() => {
574
574
  f(), u();
575
575
  }), {
576
576
  onPointerDownCapture: _,
@@ -582,26 +582,30 @@ function Re(e) {
582
582
  }
583
583
  //#endregion
584
584
  //#region src/components/dock/composables/useDockRun.ts
585
- function ze(e, t) {
585
+ function Be(e, t) {
586
586
  let n = getComputedStyle(e).getPropertyValue(t).trim(), r = Number.parseFloat(n);
587
587
  return Number.isFinite(r) ? r : 0;
588
588
  }
589
- function Be(e) {
589
+ function Ve(e) {
590
590
  return Array.from(e.children).filter((e) => e instanceof HTMLElement);
591
591
  }
592
- function Ve(e) {
592
+ function He(e) {
593
593
  return e.findIndex((e) => {
594
594
  let t = (e.matches("[aria-current]") ? e : e.querySelector("[aria-current]"))?.getAttribute("aria-current");
595
595
  return t != null && t !== "false";
596
596
  });
597
597
  }
598
- function He(e) {
599
- return e.matches(b) ? e : e.querySelector(b);
598
+ var Ue = `${S}, [tabindex]`;
599
+ function We(e) {
600
+ return (e.matches(S) || e.hasAttribute("tabindex")) && !e.querySelector(Ue);
601
+ }
602
+ function Ge(e) {
603
+ return Ve(e).filter(We);
600
604
  }
601
- function Ue(e) {
602
- let { runEl: t, statusEl: n, orientation: r } = e, i = Ne({
603
- response: f.response,
604
- dampingFraction: f.dampingFraction
605
+ function Ke(e) {
606
+ let { runEl: t, statusEl: n, orientation: r } = e, i = Pe({
607
+ response: v.response,
608
+ dampingFraction: v.dampingFraction
605
609
  });
606
610
  function a() {
607
611
  return r.value === "vertical";
@@ -616,11 +620,11 @@ function Ue(e) {
616
620
  return a() ? e.scrollHeight - e.clientHeight : e.scrollWidth - e.clientWidth;
617
621
  }
618
622
  function l(e, t) {
619
- let n = Be(e), r = n.indexOf(t);
623
+ let n = Ve(e), r = n.indexOf(t);
620
624
  if (r < 0) return o(e);
621
- let i = ze(e, "--dock-pitch");
625
+ let i = Be(e, "--dock-pitch");
622
626
  if (i <= 0) return o(e);
623
- let a = Math.max(1, ze(e, "--dock-open-pitches")), s = Ve(n), l = s >= 0 && s < r ? (a - 1) * i : 0, u = r * i + l - i / 2;
627
+ let a = Math.max(1, Be(e, "--dock-open-pitches")), s = He(n), l = s >= 0 && s < r ? (a - 1) * i : 0, u = r * i + l - i / 2;
624
628
  return Math.min(Math.max(u, 0), c(e));
625
629
  }
626
630
  function u(e, t) {
@@ -630,10 +634,10 @@ function Ue(e) {
630
634
  function d(e) {
631
635
  let t = n.value;
632
636
  if (!t) return;
633
- let r = He(e) ?? e, i = r.getAttribute("aria-label") ?? r.getAttribute("title") ?? r.textContent?.trim();
637
+ let r = We(e) ? e : e.querySelector(S) ?? e, i = r.getAttribute("aria-label") ?? r.getAttribute("title") ?? r.textContent?.trim();
634
638
  i && (t.textContent = i);
635
639
  }
636
- function p(e) {
640
+ function f(e) {
637
641
  let n = t.value;
638
642
  if (!n || (d(e), !u(n, e))) return;
639
643
  let r = o(n), a = l(n, e);
@@ -642,27 +646,24 @@ function Ue(e) {
642
646
  n && s(n, r + (a - r) * e);
643
647
  } });
644
648
  }
645
- function m() {
649
+ function p() {
646
650
  let e = t.value;
647
651
  if (!e) return;
648
- let n = Be(e);
652
+ let n = Ge(e);
649
653
  if (n.length === 0) return;
650
- let r = Ve(n), i = n.findIndex((e) => e.contains(document.activeElement)), a = i >= 0 ? i : r >= 0 ? r : 0;
654
+ let r = He(n), i = n.findIndex((e) => e.contains(document.activeElement)), a = i >= 0 ? i : r >= 0 ? r : 0;
651
655
  n.forEach((e, t) => {
652
- let n = He(e);
653
- n && (n.tabIndex = t === a ? 0 : -1);
656
+ e.tabIndex = t === a ? 0 : -1;
654
657
  });
655
658
  }
656
- function h(e, t) {
659
+ function m(e, t) {
657
660
  let n = e[t];
658
- if (!n) return;
659
- let r = He(n);
660
- r && (p(n), r.tabIndex = 0, r.focus({ preventScroll: !0 }), m());
661
+ n && (f(n), n.tabIndex = 0, n.focus({ preventScroll: !0 }), p());
661
662
  }
662
- function g(e) {
663
+ function h(e) {
663
664
  let n = t.value;
664
665
  if (!n) return;
665
- let r = Be(n);
666
+ let r = Ge(n);
666
667
  if (r.length === 0) return;
667
668
  let i = r.findIndex((t) => t.contains(e.target));
668
669
  if (i < 0) return;
@@ -682,41 +683,41 @@ function Ue(e) {
682
683
  break;
683
684
  default: return;
684
685
  }
685
- c < 0 || c >= r.length || (e.preventDefault(), h(r, c));
686
+ c < 0 || c >= r.length || (e.preventDefault(), m(r, c));
686
687
  }
687
- function _(e) {
688
+ function g(e) {
688
689
  let n = t.value;
689
690
  if (!n) return;
690
- let r = Be(n).find((t) => t.contains(e.target));
691
- r && p(r);
691
+ let r = Ve(n).find((t) => t.contains(e.target));
692
+ r && f(r);
692
693
  }
693
- let v = null;
694
- return H(() => {
694
+ let _ = null;
695
+ return U(() => {
695
696
  let e = t.value;
696
- e && (e.addEventListener("keydown", g), e.addEventListener("click", _, { capture: !0 }), e.addEventListener("focusin", _, { capture: !0 }), m(), v = new MutationObserver(() => m()), v.observe(e, {
697
+ e && (e.addEventListener("keydown", h), e.addEventListener("click", g, { capture: !0 }), e.addEventListener("focusin", g, { capture: !0 }), p(), _ = new MutationObserver(() => p()), _.observe(e, {
697
698
  childList: !0,
698
699
  subtree: !0,
699
700
  attributes: !0,
700
701
  attributeFilter: ["aria-current"]
701
702
  }));
702
- }), W(() => {
703
+ }), ee(() => {
703
704
  let e = t.value;
704
- e?.removeEventListener("keydown", g), e?.removeEventListener("click", _, { capture: !0 }), e?.removeEventListener("focusin", _, { capture: !0 }), v?.disconnect(), i.dispose();
705
- }), Z(r, () => m()), {
706
- reach: p,
707
- syncRoving: m
705
+ e?.removeEventListener("keydown", h), e?.removeEventListener("click", g, { capture: !0 }), e?.removeEventListener("focusin", g, { capture: !0 }), _?.disconnect(), i.dispose();
706
+ }), Z(r, () => p()), {
707
+ reach: f,
708
+ syncRoving: p
708
709
  };
709
710
  }
710
711
  //#endregion
711
712
  //#region src/components/dock/GlassDock.vue?vue&type=script&setup=true&lang.ts
712
- var We = ["data-backdrop-mode", "data-held"], Ge = ["data-held"], Ke = { class: "dock-controls" }, qe = {
713
+ var qe = ["data-backdrop-mode", "data-held"], Je = ["data-held"], Ye = { class: "dock-controls" }, Xe = {
713
714
  key: 0,
714
715
  class: "dock-persistent"
715
- }, Je = [
716
+ }, Ze = [
716
717
  "id",
717
718
  "aria-orientation",
718
719
  "inert"
719
- ], Ye = [
720
+ ], Qe = [
720
721
  "id",
721
722
  "inert",
722
723
  "role",
@@ -724,13 +725,13 @@ var We = ["data-backdrop-mode", "data-held"], Ge = ["data-held"], Ke = { class:
724
725
  "aria-label",
725
726
  "aria-expanded",
726
727
  "aria-controls"
727
- ], Xe = {
728
+ ], $e = {
728
729
  key: 0,
729
730
  class: "dock-search-field"
730
- }, Ze = {
731
+ }, et = {
731
732
  key: 1,
732
733
  class: "dock-persistent dock-persistent-end"
733
- }, Qe = /* @__PURE__ */ F({
734
+ }, tt = /* @__PURE__ */ I({
734
735
  inheritAttrs: !1,
735
736
  __name: "GlassDock",
736
737
  props: {
@@ -745,81 +746,85 @@ var We = ["data-backdrop-mode", "data-held"], Ge = ["data-held"], Ke = { class:
745
746
  backgroundCanvas: {}
746
747
  },
747
748
  setup(e, { expose: t }) {
748
- let n = e, { startCollapsed: r, shape: i, orientation: a, alwaysExpanded: o, fitContent: s } = Le(n), c = X("dockEl"), l = X("layersEl"), u = X("fullEl"), f = X("summaryEl"), p = X("statusEl");
749
- Ue({
750
- runEl: u,
751
- statusEl: p,
749
+ let n = e, { startCollapsed: r, shape: i, orientation: a, alwaysExpanded: o, fitContent: s } = Re(n), c = X("dockEl"), u = X("layersEl"), p = X("fullEl"), m = X("summaryEl"), h = X("statusEl");
750
+ Ke({
751
+ runEl: p,
752
+ statusEl: h,
752
753
  orientation: a
753
- }), n.backdropMode === "live" && je(c, { backgroundCanvas: () => {
754
+ }), n.backdropMode === "live" && Me(c, { backgroundCanvas: () => {
754
755
  let e = n.backgroundCanvas;
755
756
  return typeof e == "function" ? e() : e instanceof HTMLCanvasElement ? e : null;
756
757
  } });
757
- let m = q(!1), h = `glass-dock-${re()}`, { expanded: g, isPinned: v, isHeld: y, graspHeld: x, onMouseEnter: S, onMouseLeave: C, onFocusIn: w, onFocusOut: T, onClickCollapsed: E, keepOpen: D, release: A, expand: P, collapse: F } = Me({
758
+ let g = q(!1), _ = `glass-dock-${ie()}`, { expanded: v, isPinned: y, isHeld: b, graspHeld: x, onMouseEnter: C, onMouseLeave: w, onFocusIn: T, onFocusOut: E, onClickCollapsed: D, keepOpen: O, release: j, expand: I, collapse: L } = Ne({
758
759
  rootEl: c,
759
760
  alwaysExpanded: o,
760
761
  initialExpanded: !r.value,
761
- isTransitioning: m,
762
- dockId: h
763
- });
764
- d({
765
- id: h,
762
+ isTransitioning: g,
763
+ dockId: _
764
+ }), V = A(() => o.value || v.value);
765
+ l({
766
+ id: _,
766
767
  orientation: a,
767
- keepOpen: D,
768
- release: A,
769
- held: x
770
- });
771
- let I = k(() => o.value || g.value);
772
- Ie({
768
+ keepOpen: O,
769
+ release: j,
770
+ held: x,
771
+ expanded: V
772
+ }), Le({
773
773
  rootEl: c,
774
- contentEl: l,
775
- expandedEl: u,
776
- collapsedEl: f,
774
+ contentEl: u,
775
+ expandedEl: p,
776
+ collapsedEl: m,
777
777
  axis: a,
778
- expanded: I
778
+ expanded: V
779
779
  });
780
- let { outerCurrentLayer: B, outerLeavingLayer: V } = Pe({
780
+ let { outerCurrentLayer: H, outerLeavingLayer: U } = Fe({
781
781
  rootEl: c,
782
- outerActiveLayer: k(() => I.value ? "full" : "summary"),
782
+ outerActiveLayer: A(() => V.value ? "full" : "summary"),
783
783
  onMorphActiveChange: (e) => {
784
- m.value = e;
784
+ g.value = e;
785
785
  }
786
- }), H = k(() => B.value === "summary");
787
- async function U(e) {
788
- !H.value || !["Enter", " "].includes(e.key) || (e.preventDefault(), E(), await R(), (u.value?.querySelector(b) ?? u.value)?.focus({ preventScroll: !0 }));
786
+ }), W = A(() => H.value === "summary");
787
+ async function ee(e) {
788
+ !W.value || !["Enter", " "].includes(e.key) || (e.preventDefault(), D(), await z(), (p.value?.querySelector(S) ?? p.value)?.focus({ preventScroll: !0 }));
789
789
  }
790
- async function W(e) {
790
+ function K(e) {
791
791
  if (e.key !== "Escape") return;
792
- let t = e.target?.closest?.(_);
793
- if (t && u.value?.contains(t)) return;
794
- F(), await R();
795
- let n = f.value;
796
- n && !n.hasAttribute("inert") && n.focus({ preventScroll: !0 });
792
+ let t = e.target?.closest?.(d);
793
+ t && p.value?.contains(t) || L();
797
794
  }
798
- let { onPointerDownCapture: K, onPointerCancelCapture: ee, onClickCapture: te, markExpandFlip: ne, pressKeepaliveLayer: ie } = Re({
795
+ Z(V, async (e, t) => {
796
+ if (!t || e) return;
797
+ let n = document.activeElement;
798
+ if (!(n && p.value?.contains(n) || n?.closest("[data-glass-dock-face]")?.getAttribute("data-glass-dock-owner") === _)) return;
799
+ await z();
800
+ let r = m.value;
801
+ r && !r.hasAttribute("inert") && r.focus({ preventScroll: !0 });
802
+ });
803
+ let { onPointerDownCapture: te, onPointerCancelCapture: ne, onClickCapture: re, markExpandFlip: ae, pressKeepaliveLayer: $ } = ze({
799
804
  rootEl: c,
800
- visualExpanded: I
805
+ visualExpanded: V
801
806
  });
802
- Z(I, (e) => {
803
- e && ne();
807
+ Z(V, (e) => {
808
+ e && ae();
804
809
  });
805
- let Q = q(!1);
810
+ let se = q(!1);
806
811
  Z(x, (e) => {
807
- e && (Q.value = !0);
812
+ e && (se.value = !0);
808
813
  });
809
- function $(e) {
810
- e.propertyName === "opacity" && !x.value && (Q.value = !1);
814
+ function ce(e) {
815
+ e.propertyName === "opacity" && !x.value && (se.value = !1);
811
816
  }
812
817
  return t({
813
- expanded: g,
814
- isPinned: v,
815
- isHeld: y,
818
+ expanded: v,
819
+ isPinned: y,
820
+ isHeld: b,
816
821
  graspHeld: x,
817
- isTransitioning: m,
818
- expand: P,
819
- collapse: F,
820
- keepOpen: D,
821
- release: A
822
- }), (e, t) => (G(), M("div", L({
822
+ isTransitioning: g,
823
+ expand: I,
824
+ collapse: L,
825
+ keepOpen: O,
826
+ release: j
827
+ }), (e, t) => (G(), N("div", R({
823
828
  ref_key: "dockEl",
824
829
  ref: c
825
830
  }, e.$attrs, {
@@ -827,127 +832,130 @@ var We = ["data-backdrop-mode", "data-held"], Ge = ["data-held"], Ke = { class:
827
832
  Y(a),
828
833
  `shape-${Y(i)}`,
829
834
  {
830
- expanded: I.value,
831
- collapsed: !I.value,
832
- pinned: Y(v),
835
+ expanded: V.value,
836
+ collapsed: !V.value,
837
+ pinned: Y(y),
833
838
  "fit-content": Y(s),
834
839
  "always-expanded": Y(o)
835
840
  }
836
841
  ]],
837
842
  "data-backdrop-mode": n.backdropMode,
838
843
  "data-held": Y(x) || void 0,
839
- onMouseenter: t[2] ||= (...e) => Y(S) && Y(S)(...e),
840
- onMouseleave: t[3] ||= (e) => Y(C)(e),
841
- onFocusin: t[4] ||= (...e) => Y(w) && Y(w)(...e),
842
- onFocusout: t[5] ||= (...e) => Y(T) && Y(T)(...e),
843
- onPointerdownCapture: t[6] ||= (...e) => Y(K) && Y(K)(...e),
844
- onPointercancelCapture: t[7] ||= (...e) => Y(ee) && Y(ee)(...e),
845
- onClickCapture: t[8] ||= (...e) => Y(te) && Y(te)(...e)
844
+ onMouseenter: t[2] ||= (...e) => Y(C) && Y(C)(...e),
845
+ onMouseleave: t[3] ||= (e) => Y(w)(e),
846
+ onFocusin: t[4] ||= (...e) => Y(T) && Y(T)(...e),
847
+ onFocusout: t[5] ||= (...e) => Y(E) && Y(E)(...e),
848
+ onPointerdownCapture: t[6] ||= (...e) => Y(te) && Y(te)(...e),
849
+ onPointercancelCapture: t[7] ||= (...e) => Y(ne) && Y(ne)(...e),
850
+ onClickCapture: t[8] ||= (...e) => Y(re) && Y(re)(...e)
846
851
  }), [
847
- N("div", {
852
+ P("div", {
848
853
  class: "dock-plate",
849
854
  "aria-hidden": "true",
850
855
  "data-held": Y(x) || void 0
851
- }, [Q.value ? (G(), M(O, { key: 0 }, [t[9] ||= N("span", {
856
+ }, [se.value ? (G(), N(k, { key: 0 }, [t[9] ||= P("span", {
852
857
  class: "glass-grasp-carrier",
853
858
  "data-grasp": "rest"
854
- }, null, -1), N("span", {
859
+ }, null, -1), P("span", {
855
860
  class: "glass-grasp-carrier",
856
861
  "data-grasp": "grasp",
857
- onTransitionend: $
858
- }, null, 32)], 64)) : j("", !0)], 8, Ge),
859
- N("div", Ke, [
860
- e.$slots.persistent ? (G(), M("div", qe, [J(e.$slots, "persistent")])) : j("", !0),
861
- N("div", {
862
+ onTransitionend: ce
863
+ }, null, 32)], 64)) : M("", !0)], 8, Je),
864
+ P("div", Ye, [
865
+ e.$slots.persistent ? (G(), N("div", Xe, [J(e.$slots, "persistent")])) : M("", !0),
866
+ P("div", {
862
867
  ref_key: "layersEl",
863
- ref: l,
868
+ ref: u,
864
869
  class: "dock-layers"
865
870
  }, [
866
- N("div", {
871
+ P("div", {
867
872
  ref_key: "fullEl",
868
- ref: u,
869
- id: `${h}-full`,
873
+ ref: p,
874
+ id: `${_}-full`,
870
875
  role: "toolbar",
871
876
  "aria-orientation": Y(a),
872
- class: z(["dock-layer dock-layer--full dock-run", {
873
- "is-active": Y(B) === "full",
874
- "is-leaving": Y(V) === "full" || Y(ie) === "full" && Y(B) !== "full",
875
- "is-press-keepalive": Y(ie) === "full"
877
+ class: B(["dock-layer dock-layer--full dock-run", {
878
+ "is-active": Y(H) === "full",
879
+ "is-leaving": Y(U) === "full" || Y($) === "full" && Y(H) !== "full",
880
+ "is-press-keepalive": Y($) === "full"
876
881
  }]),
877
- inert: Y(B) !== "full" && Y(ie) !== "full" || void 0,
882
+ inert: Y(H) !== "full" && Y($) !== "full" || void 0,
878
883
  tabindex: "-1",
879
- onKeydown: W
880
- }, [J(e.$slots, "default")], 42, Je),
881
- N("div", {
884
+ onKeydown: K
885
+ }, [F(Y(f), null, {
886
+ default: Q(() => [J(e.$slots, "default")]),
887
+ _: 3
888
+ })], 42, Ze),
889
+ P("div", {
882
890
  ref_key: "summaryEl",
883
- ref: f,
884
- id: `${h}-summary`,
885
- class: z(["dock-layer dock-layer--summary", {
886
- "is-active": Y(B) === "summary",
887
- "is-leaving": Y(V) === "summary"
891
+ ref: m,
892
+ id: `${_}-summary`,
893
+ class: B(["dock-layer dock-layer--summary", {
894
+ "is-active": Y(H) === "summary",
895
+ "is-leaving": Y(U) === "summary"
888
896
  }]),
889
- inert: Y(B) !== "summary" || void 0,
890
- role: H.value ? "button" : void 0,
891
- tabindex: H.value ? 0 : void 0,
892
- "aria-label": H.value ? "Expand dock" : void 0,
893
- "aria-expanded": H.value ? "false" : void 0,
894
- "aria-controls": H.value ? `${h}-full` : void 0,
895
- onFocusin: t[0] ||= ae(() => {}, ["stop"]),
896
- onKeydown: U,
897
- onClick: t[1] ||= (...e) => Y(E) && Y(E)(...e)
898
- }, [J(e.$slots, "collapsed")], 42, Ye),
899
- e.$slots.search ? (G(), M("div", Xe, [J(e.$slots, "search")])) : j("", !0)
897
+ inert: Y(H) !== "summary" || void 0,
898
+ role: W.value ? "button" : void 0,
899
+ tabindex: W.value ? 0 : void 0,
900
+ "aria-label": W.value ? "Expand dock" : void 0,
901
+ "aria-expanded": W.value ? "false" : void 0,
902
+ "aria-controls": W.value ? `${_}-full` : void 0,
903
+ onFocusin: t[0] ||= oe(() => {}, ["stop"]),
904
+ onKeydown: ee,
905
+ onClick: t[1] ||= (...e) => Y(D) && Y(D)(...e)
906
+ }, [J(e.$slots, "collapsed")], 42, Qe),
907
+ e.$slots.search ? (G(), N("div", $e, [J(e.$slots, "search")])) : M("", !0)
900
908
  ], 512),
901
- e.$slots["persistent-end"] ? (G(), M("div", Ze, [J(e.$slots, "persistent-end")])) : j("", !0)
909
+ e.$slots["persistent-end"] ? (G(), N("div", et, [J(e.$slots, "persistent-end")])) : M("", !0)
902
910
  ]),
903
- N("div", {
911
+ P("div", {
904
912
  ref_key: "statusEl",
905
- ref: p,
913
+ ref: h,
906
914
  class: "dock-run-status",
907
915
  role: "status",
908
916
  "aria-live": "polite"
909
917
  }, null, 512)
910
- ], 16, We));
918
+ ], 16, qe));
911
919
  }
912
- }), $e = c("glass-ui:dock-switcher-tablist"), { KEY: et } = $e;
913
- function tt(e) {
914
- $e.provide(e);
920
+ }), nt = c("glass-ui:dock-switcher-tablist"), { KEY: rt } = nt;
921
+ function it(e) {
922
+ nt.provide(e);
915
923
  }
916
- var nt = $e.use, rt = s(u, "[glass-ui:dock] <DockLayer> must be used inside <DockCrossfade> (or <DockLayerGroup>)"), { KEY: it } = rt;
917
- function at(e) {
918
- rt.provide(e);
924
+ var at = nt.use, ot = s(p, "[glass-ui:dock] <DockLayer> must be used inside <DockCrossfade> (or <DockLayerGroup>)"), { KEY: st } = ot;
925
+ function ct(e) {
926
+ ot.provide(e);
919
927
  }
920
- var ot = rt.use, st = /* @__PURE__ */ F({
928
+ var lt = ot.use, ut = /* @__PURE__ */ I({
921
929
  __name: "DockCrossfade",
922
930
  props: {
923
931
  active: {},
924
932
  reserve: { default: "block" }
925
933
  },
926
934
  setup(e, { expose: t }) {
927
- let n = e, r = q(null), i = q(/* @__PURE__ */ new Map()), a = k(() => [...i.value.values()].map(({ id: e, label: t, icon: n }) => ({
935
+ let n = e, r = q(null), i = q(/* @__PURE__ */ new Map()), a = A(() => [...i.value.values()].map(({ id: e, label: t, icon: n }) => ({
928
936
  id: e,
929
937
  label: t,
930
938
  icon: n
931
939
  })));
932
940
  function o(e) {
933
941
  let t = new Map(i.value);
934
- t.set(e.id, e), i.value = t, p();
942
+ t.set(e.id, e), i.value = t, f();
935
943
  }
936
944
  function s(e) {
937
945
  if (!i.value.has(e)) return;
938
946
  let t = new Map(i.value);
939
- t.delete(e), i.value = t, p();
947
+ t.delete(e), i.value = t, f();
940
948
  }
941
- let c = k(() => n.active), l = q(null);
942
- at({
949
+ let c = A(() => n.active), l = q(null);
950
+ ct({
943
951
  register: o,
944
952
  unregister: s,
945
953
  activeId: c,
946
954
  leavingId: l,
947
955
  faces: a
948
956
  });
949
- let u = q(0), d = k(() => n.reserve === "inline" ? "min-inline-size" : "min-block-size");
950
- function p() {
957
+ let u = q(0), d = A(() => n.reserve === "inline" ? "min-inline-size" : "min-block-size");
958
+ function f() {
951
959
  let e = 0;
952
960
  for (let { el: t } of i.value.values()) {
953
961
  let r = n.reserve === "inline" ? t.scrollWidth : t.scrollHeight;
@@ -955,79 +963,79 @@ var ot = rt.use, st = /* @__PURE__ */ F({
955
963
  }
956
964
  e > u.value && (u.value = e);
957
965
  }
958
- let m = k(() => u.value > 0 ? {
966
+ let p = A(() => u.value > 0 ? {
959
967
  [d.value]: `${u.value}px`,
960
968
  "--dock-crossfade-peak": `${u.value}px`
961
969
  } : void 0);
962
- v(r, () => p());
963
- let h = Ne({
964
- response: f.response,
965
- dampingFraction: f.dampingFraction
970
+ y(r, () => f());
971
+ let m = Pe({
972
+ response: v.response,
973
+ dampingFraction: v.dampingFraction
966
974
  });
967
- function g(e) {
975
+ function h(e) {
968
976
  return e ? i.value.get(e)?.el : void 0;
969
977
  }
970
- function _(e, t) {
971
- g(e)?.style.setProperty("--dock-t", `${t}`);
978
+ function g(e, t) {
979
+ h(e)?.style.setProperty("--dock-t", `${t}`);
972
980
  }
973
- function y(e) {
974
- g(e)?.style.removeProperty("--dock-t");
981
+ function _(e) {
982
+ h(e)?.style.removeProperty("--dock-t");
975
983
  }
976
984
  function b(e) {
977
985
  return e < 0 ? 0 : e > 1 ? 1 : e;
978
986
  }
979
- let x = me("(prefers-reduced-motion: reduce)"), S = null, C = 1;
987
+ let x = he("(prefers-reduced-motion: reduce)"), S = null, C = 1;
980
988
  Z(x, (e) => {
981
- e && (h.dispose(), S?.());
989
+ e && (m.dispose(), S?.());
982
990
  });
983
991
  async function w(e, t) {
984
992
  if (typeof document > "u") return;
985
- let n = g(e), r = document.activeElement;
986
- !n || !r || !n.contains(r) || (await R(), (g(t) ?? document.body).focus?.());
993
+ let n = h(e), r = document.activeElement;
994
+ !n || !r || !n.contains(r) || (await z(), (h(t) ?? document.body).focus?.());
987
995
  }
988
996
  return Z(c, (e, t) => {
989
997
  if (e === t) return;
990
- p();
991
- let n = g(e), i = g(t);
998
+ f();
999
+ let n = h(e), i = h(t);
992
1000
  if (!n || !i) {
993
- l.value = null, y(e), C = 1;
1001
+ l.value = null, _(e), C = 1;
994
1002
  return;
995
1003
  }
996
1004
  let a = l.value, o = Number.parseFloat(n.style.getPropertyValue("--dock-t")), s = Number.parseFloat(i.style.getPropertyValue("--dock-t")), c = a === e && Number.isFinite(o) ? 1 - b(o) : 0, u = Number.isFinite(s) ? b(s) : 1;
997
- a && a !== e && a !== t && y(a), l.value = t, _(e, c), _(t, 1 - u), w(t, e), r.value?.setAttribute("data-crossfading", "");
1005
+ a && a !== e && a !== t && _(a), l.value = t, g(e, c), g(t, 1 - u), w(t, e), r.value?.setAttribute("data-crossfading", "");
998
1006
  let d = () => {
999
- y(e), y(t), r.value?.removeAttribute("data-crossfading"), l.value = null, C = 1, S === d && (S = null);
1007
+ _(e), _(t), r.value?.removeAttribute("data-crossfading"), l.value = null, C = 1, S === d && (S = null);
1000
1008
  };
1001
1009
  if (S = d, x.value) {
1002
1010
  d();
1003
1011
  return;
1004
1012
  }
1005
- let f = u > .001 ? -C / u : 0;
1006
- C = 1 - c, h.playTo(0, 1, {
1007
- inheritVelocityScale: f,
1013
+ let p = u > .001 ? -C / u : 0;
1014
+ C = 1 - c, m.playTo(0, 1, {
1015
+ inheritVelocityScale: p,
1008
1016
  onFrame: (n) => {
1009
- _(e, b(c + (1 - c) * n)), _(t, b(1 - u * (1 - n)));
1017
+ g(e, b(c + (1 - c) * n)), g(t, b(1 - u * (1 - n)));
1010
1018
  },
1011
1019
  onSettle: d
1012
1020
  });
1013
- }), V(() => {
1014
- h.dispose(), S = null;
1015
- }), t({ faces: a }), (e, t) => (G(), M("div", {
1021
+ }), H(() => {
1022
+ m.dispose(), S = null;
1023
+ }), t({ faces: a }), (e, t) => (G(), N("div", {
1016
1024
  ref_key: "rootEl",
1017
1025
  ref: r,
1018
1026
  class: "dock-crossfade",
1019
- style: B(m.value)
1027
+ style: V(p.value)
1020
1028
  }, [J(e.$slots, "default")], 4));
1021
1029
  }
1022
- }), ct = ["data-motion"], lt = ["aria-orientation"], ut = [
1030
+ }), dt = ["data-motion"], ft = ["aria-orientation"], pt = [
1023
1031
  "id",
1024
1032
  "tabindex",
1025
1033
  "aria-controls",
1026
1034
  "aria-label",
1027
1035
  "onClick"
1028
- ], dt = { key: 1 }, ft = { key: 2 }, pt = /* @__PURE__ */ F({
1036
+ ], mt = { key: 1 }, ht = { key: 2 }, gt = /* @__PURE__ */ I({
1029
1037
  __name: "DockLayerGroup",
1030
- props: /*@__PURE__*/ I({
1038
+ props: /*@__PURE__*/ L({
1031
1039
  orientation: {},
1032
1040
  showSwitcher: {
1033
1041
  type: Boolean,
@@ -1041,39 +1049,39 @@ var ot = rt.use, st = /* @__PURE__ */ F({
1041
1049
  }),
1042
1050
  emits: ["update:active"],
1043
1051
  setup(e) {
1044
- let t = e, n = o(() => t.motion), r = ie(e, "active"), i = m(), a = k(() => t.orientation ?? i?.orientation.value ?? "horizontal"), s = X("crossfade"), c = k(() => s.value?.faces ?? []), l = k(() => a.value === "vertical" ? "horizontal" : "vertical"), u = k(() => l.value === "vertical"), d = q(null), f = q(null), h = q([]), g = S({
1045
- options: k(() => c.value.map((e) => ({ value: e.id }))),
1052
+ let t = e, n = o(() => t.motion), r = ae(e, "active"), i = _(), a = A(() => t.orientation ?? i?.orientation.value ?? "horizontal"), s = X("crossfade"), c = A(() => s.value?.faces ?? []), l = A(() => a.value === "vertical" ? "horizontal" : "vertical"), u = A(() => l.value === "vertical"), d = q(null), f = q(null), p = q([]), h = w({
1053
+ options: A(() => c.value.map((e) => ({ value: e.id }))),
1046
1054
  model: r,
1047
1055
  mode: "single",
1048
1056
  role: "tablist",
1049
1057
  vertical: u,
1050
1058
  containerRef: d,
1051
1059
  indicatorRef: f,
1052
- buttonRefs: h
1053
- }), _ = k(() => t.showSwitcher && c.value.length > 1), v = re(), y = (e) => e.replace(/[^a-zA-Z0-9_-]/g, ""), b = (e) => `dock-tab-${v}-${y(e)}`, x = (e) => `dock-panel-${v}-${y(e)}`;
1054
- tt({
1055
- isTablist: _,
1060
+ buttonRefs: p
1061
+ }), g = A(() => t.showSwitcher && c.value.length > 1), v = ie(), y = (e) => e.replace(/[^a-zA-Z0-9_-]/g, ""), b = (e) => `dock-tab-${v}-${y(e)}`, x = (e) => `dock-panel-${v}-${y(e)}`;
1062
+ it({
1063
+ isTablist: g,
1056
1064
  tabId: b,
1057
1065
  panelId: x
1058
1066
  });
1059
- let w = k(() => u.value ? "y" : "x");
1060
- function T() {
1067
+ let S = A(() => u.value ? "y" : "x");
1068
+ function C() {
1061
1069
  let e = d.value;
1062
1070
  if (!e) return [];
1063
1071
  let t = Array.from(e.querySelectorAll(".dock-layer-tab"));
1064
1072
  return c.value.map((e, n) => {
1065
- let r = t[n]?.getBoundingClientRect(), i = r ? w.value === "y" ? r.top + r.height / 2 : r.left + r.width / 2 : 0;
1073
+ let r = t[n]?.getBoundingClientRect(), i = r ? S.value === "y" ? r.top + r.height / 2 : r.left + r.width / 2 : 0;
1066
1074
  return {
1067
1075
  value: e.id,
1068
1076
  center: i
1069
1077
  };
1070
1078
  });
1071
1079
  }
1072
- let E = C({
1080
+ let E = T({
1073
1081
  handle: d,
1074
1082
  surface: f,
1075
- axis: () => w.value,
1076
- snapTargets: T,
1083
+ axis: () => S.value,
1084
+ snapTargets: C,
1077
1085
  onSnap: (e) => {
1078
1086
  n.armed.value && r.value !== e && (r.value = e);
1079
1087
  }
@@ -1083,75 +1091,75 @@ var ot = rt.use, st = /* @__PURE__ */ F({
1083
1091
  l.value,
1084
1092
  n.armed.value
1085
1093
  ], () => {
1086
- n.armed.value && R(() => E.refresh());
1087
- }), H(() => {
1088
- n.armed.value && R(() => E.refresh());
1094
+ n.armed.value && z(() => E.refresh());
1095
+ }), U(() => {
1096
+ n.armed.value && z(() => E.refresh());
1089
1097
  });
1090
1098
  function D(e) {
1091
1099
  return typeof e == "object" && !!e || typeof e == "function";
1092
1100
  }
1093
- let F = p(() => i);
1101
+ let O = m(() => i);
1094
1102
  function I() {
1095
- F.acquire();
1103
+ O.acquire();
1096
1104
  }
1097
- function V(e) {
1105
+ function L(e) {
1098
1106
  let t = e.relatedTarget, n = e.currentTarget;
1099
- t && n?.contains(t) || F.release();
1107
+ t && n?.contains(t) || O.release();
1100
1108
  }
1101
- return (t, i) => (G(), M("div", {
1102
- class: z(["dock-layer-group", [a.value, `switcher-${e.switcherPosition}`]]),
1109
+ return (t, i) => (G(), N("div", {
1110
+ class: B(["dock-layer-group", [a.value, `switcher-${e.switcherPosition}`]]),
1103
1111
  "data-motion": Y(n).dataMotion.value,
1104
- style: B(Y(n).hostStyle.value)
1105
- }, [_.value ? (G(), M("div", {
1112
+ style: V(Y(n).hostStyle.value)
1113
+ }, [g.value ? (G(), N("div", {
1106
1114
  key: 0,
1107
1115
  ref_key: "switcherListEl",
1108
1116
  ref: d,
1109
1117
  role: "tablist",
1110
- class: z(["dock-layer-switcher", [e.switcherPosition, Y(n).armed.value && "glass-drag-grabbable"]]),
1118
+ class: B(["dock-layer-switcher", [e.switcherPosition, Y(n).armed.value && "glass-drag-grabbable"]]),
1111
1119
  "aria-orientation": l.value,
1112
- onKeydown: i[0] ||= (...e) => Y(g).onKeydown && Y(g).onKeydown(...e),
1120
+ onKeydown: i[0] ||= (...e) => Y(h).onKeydown && Y(h).onKeydown(...e),
1113
1121
  onFocusin: I,
1114
- onFocusout: V
1115
- }, [(G(!0), M(O, null, ee(c.value, (e, t) => (G(), M("button", L({
1122
+ onFocusout: L
1123
+ }, [(G(!0), N(k, null, te(c.value, (e, t) => (G(), N("button", R({
1116
1124
  key: e.id,
1117
1125
  ref_for: !0,
1118
1126
  ref: (e) => {
1119
- e && (h.value[t] = e);
1127
+ e && (p.value[t] = e);
1120
1128
  },
1121
1129
  type: "button",
1122
1130
  class: "dock-layer-tab",
1123
1131
  id: b(e.id),
1124
- tabindex: Y(g).rovingTabindex(t)
1125
- }, { ref_for: !0 }, Y(g).itemAttrs(e.id), {
1132
+ tabindex: Y(h).rovingTabindex(t)
1133
+ }, { ref_for: !0 }, Y(h).itemAttrs(e.id), {
1126
1134
  "aria-controls": x(e.id),
1127
1135
  "aria-label": e.label ?? e.id,
1128
- onClick: (n) => Y(g).select(e.id, t)
1129
- }), [D(e.icon) ? (G(), A(te(e.icon), {
1136
+ onClick: (n) => Y(h).select(e.id, t)
1137
+ }), [D(e.icon) ? (G(), j(ne(e.icon), {
1130
1138
  key: 0,
1131
1139
  class: "size-4"
1132
- })) : typeof e.icon == "string" ? (G(), M("span", dt, ne(e.icon), 1)) : (G(), M("span", ft, ne((e.label ?? e.id).charAt(0)), 1))], 16, ut))), 128)), N("div", {
1140
+ })) : typeof e.icon == "string" ? (G(), N("span", mt, re(e.icon), 1)) : (G(), N("span", ht, re((e.label ?? e.id).charAt(0)), 1))], 16, pt))), 128)), P("div", {
1133
1141
  ref_key: "switcherIndicatorEl",
1134
1142
  ref: f,
1135
- class: z(["dock-layer-tab-indicator", Y(n).armed.value && Y(E).dragging.value && "glass-drag-lift"]),
1136
- style: B(Y(g).singleSliderStyle.value),
1143
+ class: B(["dock-layer-tab-indicator", Y(n).armed.value && Y(E).dragging.value && "glass-drag-lift"]),
1144
+ style: V(Y(h).singleSliderStyle.value),
1137
1145
  "aria-hidden": "true"
1138
- }, null, 6)], 42, lt)) : j("", !0), P(st, {
1146
+ }, null, 6)], 42, ft)) : M("", !0), F(ut, {
1139
1147
  ref_key: "crossfade",
1140
1148
  ref: s,
1141
1149
  active: r.value
1142
1150
  }, {
1143
1151
  default: Q(() => [J(t.$slots, "default")]),
1144
1152
  _: 3
1145
- }, 8, ["active"])], 14, ct));
1153
+ }, 8, ["active"])], 14, dt));
1146
1154
  }
1147
- }), mt = [
1155
+ }), _t = [
1148
1156
  "role",
1149
1157
  "id",
1150
1158
  "aria-labelledby",
1151
1159
  "inert",
1152
1160
  "aria-hidden",
1153
1161
  "tabindex"
1154
- ], ht = { class: "dock-face-content" }, gt = /* @__PURE__ */ F({
1162
+ ], vt = { class: "dock-face-content" }, yt = /* @__PURE__ */ I({
1155
1163
  __name: "DockLayer",
1156
1164
  props: {
1157
1165
  id: {},
@@ -1159,8 +1167,8 @@ var ot = rt.use, st = /* @__PURE__ */ F({
1159
1167
  icon: {}
1160
1168
  },
1161
1169
  setup(e) {
1162
- let t = e, n = ot(), r = X("hostEl");
1163
- H(() => {
1170
+ let t = e, n = lt(), r = X("hostEl");
1171
+ U(() => {
1164
1172
  r.value && n.register({
1165
1173
  id: t.id,
1166
1174
  label: t.label,
@@ -1178,12 +1186,12 @@ var ot = rt.use, st = /* @__PURE__ */ F({
1178
1186
  icon: t.icon,
1179
1187
  el: r.value
1180
1188
  });
1181
- }), V(() => n.unregister(t.id));
1182
- let i = k(() => n.activeId.value === t.id), a = k(() => n.leavingId.value === t.id), o = nt(), s = k(() => o?.isTablist.value ?? !1), c = k(() => s.value ? o.panelId(t.id) : void 0), l = k(() => s.value ? o.tabId(t.id) : void 0);
1183
- return (e, t) => (G(), M("div", {
1189
+ }), H(() => n.unregister(t.id));
1190
+ let i = A(() => n.activeId.value === t.id), a = A(() => n.leavingId.value === t.id), o = at(), s = A(() => o?.isTablist.value ?? !1), c = A(() => s.value ? o.panelId(t.id) : void 0), l = A(() => s.value ? o.tabId(t.id) : void 0);
1191
+ return (e, t) => (G(), N("div", {
1184
1192
  ref_key: "hostEl",
1185
1193
  ref: r,
1186
- class: z(["dock-face", {
1194
+ class: B(["dock-face", {
1187
1195
  "is-active": i.value,
1188
1196
  "is-leaving": a.value
1189
1197
  }]),
@@ -1193,9 +1201,9 @@ var ot = rt.use, st = /* @__PURE__ */ F({
1193
1201
  inert: !i.value || void 0,
1194
1202
  "aria-hidden": !i.value || void 0,
1195
1203
  tabindex: i.value ? -1 : void 0
1196
- }, [N("div", ht, [J(e.$slots, "default")])], 10, mt));
1204
+ }, [P("div", vt, [J(e.$slots, "default")])], 10, _t));
1197
1205
  }
1198
- }), _t = /* @__PURE__ */ F({
1206
+ }), bt = /* @__PURE__ */ I({
1199
1207
  __name: "DockControl",
1200
1208
  props: {
1201
1209
  shape: { default: "icon" },
@@ -1226,13 +1234,13 @@ var ot = rt.use, st = /* @__PURE__ */ F({
1226
1234
  ] }
1227
1235
  },
1228
1236
  setup(t) {
1229
- let r = t, o = k(() => r.shape === "tab"), s = k(() => o.value ? e("dock-tab-button glass-specular-track", r.class) : e("dock-icon-button glass-specular-track glass-capsule-hover", { "glass-capsule": r.active }, { "dock-icon-button--compact": r.compact }, r.class)), c = k(() => ({
1237
+ let r = t, o = A(() => r.shape === "tab"), s = A(() => o.value ? e("dock-tab-button glass-specular-track", r.class) : e("dock-icon-button glass-specular-track glass-capsule-hover", { "glass-capsule": r.active }, { "dock-icon-button--compact": r.compact }, r.class)), c = A(() => ({
1230
1238
  ...r.active === void 0 ? {} : {
1231
1239
  "aria-pressed": String(r.active),
1232
1240
  ...r.active ? { "data-active": "" } : {}
1233
1241
  },
1234
1242
  ...r.disabled ? { "aria-disabled": "true" } : {}
1235
- })), l = k(() => !r.asChild && r.as === "button" ? { type: r.type } : {}), u = i("press"), d = a({
1243
+ })), l = A(() => !r.asChild && r.as === "button" ? { type: r.type } : {}), u = i("press"), d = a({
1236
1244
  disabled: () => r.disabled || o.value,
1237
1245
  squish: !0,
1238
1246
  response: u.response,
@@ -1240,11 +1248,11 @@ var ot = rt.use, st = /* @__PURE__ */ F({
1240
1248
  pressVar: "--dock-press-t",
1241
1249
  shrinkDepth: .04,
1242
1250
  maxStretch: 1.03
1243
- }), f = k(() => o.value ? {} : { ...d.pressStyle.value });
1251
+ }), f = A(() => o.value ? {} : { ...d.pressStyle.value });
1244
1252
  function p(e) {
1245
1253
  r.disabled && (e.preventDefault(), e.stopImmediatePropagation());
1246
1254
  }
1247
- return (e, r) => $((G(), A(Y(se), L({
1255
+ return (e, r) => $((G(), j(Y(ce), R({
1248
1256
  as: t.as,
1249
1257
  "as-child": t.asChild
1250
1258
  }, {
@@ -1282,7 +1290,7 @@ var ot = rt.use, st = /* @__PURE__ */ F({
1282
1290
  "onBlur"
1283
1291
  ])), [[Y(n)]]);
1284
1292
  }
1285
- }), vt = /* @__PURE__ */ F({
1293
+ }), xt = /* @__PURE__ */ I({
1286
1294
  inheritAttrs: !1,
1287
1295
  __name: "DockTrigger",
1288
1296
  props: {
@@ -1296,28 +1304,28 @@ var ot = rt.use, st = /* @__PURE__ */ F({
1296
1304
  ] }
1297
1305
  },
1298
1306
  setup(t) {
1299
- let r = t, i = k(() => e("dock-trigger", r.for === "select" && "dock-select-trigger", r.for !== "select" && "dock-dropdown-trigger", r.class));
1300
- return (e, t) => r.for === "select" ? $((G(), A(Y(le), L({ key: 0 }, e.$attrs, { class: i.value }), {
1301
- default: Q(() => [J(e.$slots, "default"), P(Y(ce), { "as-child": "" }, {
1302
- default: Q(() => [J(e.$slots, "icon", {}, () => [P(Y(ue), {
1307
+ let r = t, i = A(() => e("dock-trigger", r.for === "select" && "dock-select-trigger", r.for !== "select" && "dock-dropdown-trigger", r.class));
1308
+ return (e, t) => r.for === "select" ? $((G(), j(Y(ue), R({ key: 0 }, e.$attrs, { class: i.value }), {
1309
+ default: Q(() => [J(e.$slots, "default"), F(Y(le), { "as-child": "" }, {
1310
+ default: Q(() => [J(e.$slots, "icon", {}, () => [F(Y(de), {
1303
1311
  class: "dock-select-trigger__chevron",
1304
1312
  "aria-hidden": "true"
1305
1313
  })])]),
1306
1314
  _: 3
1307
1315
  })]),
1308
1316
  _: 3
1309
- }, 16, ["class"])), [[Y(n)]]) : r.for === "dropdown" ? $((G(), A(x, L({ key: 1 }, e.$attrs, {
1317
+ }, 16, ["class"])), [[Y(n)]]) : r.for === "dropdown" ? $((G(), j(C, R({ key: 1 }, e.$attrs, {
1310
1318
  action: "pointerdown",
1311
1319
  class: i.value
1312
1320
  }), {
1313
1321
  default: Q(() => [J(e.$slots, "default")]),
1314
1322
  _: 3
1315
- }, 16, ["class"])), [[Y(n)]]) : $((G(), A(Y(oe), L({ key: 2 }, e.$attrs, { class: i.value }), {
1323
+ }, 16, ["class"])), [[Y(n)]]) : $((G(), j(Y(se), R({ key: 2 }, e.$attrs, { class: i.value }), {
1316
1324
  default: Q(() => [J(e.$slots, "default")]),
1317
1325
  _: 3
1318
1326
  }, 16, ["class"])), [[Y(n)]]);
1319
1327
  }
1320
- }), yt = /* @__PURE__ */ F({
1328
+ }), St = /* @__PURE__ */ I({
1321
1329
  __name: "DockBackgroundToggle",
1322
1330
  props: {
1323
1331
  paused: {
@@ -1329,22 +1337,22 @@ var ot = rt.use, st = /* @__PURE__ */ F({
1329
1337
  },
1330
1338
  emits: ["update:paused"],
1331
1339
  setup(e, { emit: t }) {
1332
- let n = e, r = t, i = k(() => n.paused ? n.playLabel : n.pauseLabel);
1340
+ let n = e, r = t, i = A(() => n.paused ? n.playLabel : n.pauseLabel);
1333
1341
  function a() {
1334
1342
  r("update:paused", !n.paused);
1335
1343
  }
1336
- return (t, n) => (G(), A(_t, {
1344
+ return (t, n) => (G(), j(bt, {
1337
1345
  type: "button",
1338
1346
  active: e.paused,
1339
1347
  "aria-pressed": e.paused,
1340
1348
  "aria-label": i.value,
1341
1349
  onClick: a
1342
1350
  }, {
1343
- default: Q(() => [e.paused ? (G(), A(Y(fe), {
1351
+ default: Q(() => [e.paused ? (G(), j(Y(pe), {
1344
1352
  key: 0,
1345
1353
  size: 18,
1346
1354
  "aria-hidden": "true"
1347
- })) : (G(), A(Y(de), {
1355
+ })) : (G(), j(Y(fe), {
1348
1356
  key: 1,
1349
1357
  size: 18,
1350
1358
  "aria-hidden": "true"
@@ -1356,30 +1364,30 @@ var ot = rt.use, st = /* @__PURE__ */ F({
1356
1364
  "aria-label"
1357
1365
  ]));
1358
1366
  }
1359
- }), bt = [
1367
+ }), Ct = [
1360
1368
  "data-orientation",
1361
1369
  "data-dock-hairline",
1362
1370
  "aria-orientation"
1363
- ], xt = /* @__PURE__ */ F({
1371
+ ], wt = /* @__PURE__ */ I({
1364
1372
  __name: "DockSeparator",
1365
1373
  props: { anchor: {
1366
1374
  type: Boolean,
1367
1375
  default: !1
1368
1376
  } },
1369
1377
  setup(e) {
1370
- let t = m(), n = k(() => t?.orientation.value ?? "horizontal"), r = k(() => n.value), i = k(() => n.value === "vertical" ? "horizontal" : "vertical");
1371
- return (t, n) => (G(), M("div", {
1372
- class: z(["dock-separator", { "dock-hairline": e.anchor }]),
1378
+ let t = _(), n = A(() => t?.orientation.value ?? "horizontal"), r = A(() => n.value), i = A(() => n.value === "vertical" ? "horizontal" : "vertical");
1379
+ return (t, n) => (G(), N("div", {
1380
+ class: B(["dock-separator", { "dock-hairline": e.anchor }]),
1373
1381
  role: "separator",
1374
1382
  "data-orientation": r.value,
1375
1383
  "data-dock-hairline": e.anchor || void 0,
1376
1384
  "aria-orientation": i.value
1377
- }, null, 10, bt));
1385
+ }, null, 10, Ct));
1378
1386
  }
1379
1387
  });
1380
1388
  //#endregion
1381
1389
  //#region src/composables/search/match.ts
1382
- function St(e, t) {
1390
+ function Tt(e, t) {
1383
1391
  let n = e.length, r = t.length;
1384
1392
  if (n === 0) return {
1385
1393
  score: 0,
@@ -1403,11 +1411,11 @@ function St(e, t) {
1403
1411
  matches: i
1404
1412
  });
1405
1413
  }
1406
- function Ct(e, t) {
1414
+ function Et(e, t) {
1407
1415
  if (!t) return null;
1408
1416
  let n = 0, r = [];
1409
1417
  for (let i of e) {
1410
- let e = St(i, t);
1418
+ let e = Tt(i, t);
1411
1419
  if (!e) return null;
1412
1420
  n += e.score;
1413
1421
  for (let t of e.matches) r.push(t);
@@ -1417,7 +1425,7 @@ function Ct(e, t) {
1417
1425
  matches: r
1418
1426
  };
1419
1427
  }
1420
- function wt(e, t) {
1428
+ function Dt(e, t) {
1421
1429
  let n = null, r = [], i = [
1422
1430
  [t._lc.label, 12],
1423
1431
  [t._lc.type, 10],
@@ -1425,7 +1433,7 @@ function wt(e, t) {
1425
1433
  ];
1426
1434
  for (let [a, o] of i) {
1427
1435
  if (!a) continue;
1428
- let i = Ct(e, a);
1436
+ let i = Et(e, a);
1429
1437
  if (!i) continue;
1430
1438
  let s = i.score * o;
1431
1439
  (n === null || s > n) && (n = s, r = a === t._lc.label ? i.matches : []);
@@ -1435,7 +1443,7 @@ function wt(e, t) {
1435
1443
  matches: r
1436
1444
  };
1437
1445
  }
1438
- function Tt(e) {
1446
+ function Ot(e) {
1439
1447
  return e.map((e) => ({
1440
1448
  item: e,
1441
1449
  _lc: {
@@ -1445,15 +1453,15 @@ function Tt(e) {
1445
1453
  }
1446
1454
  }));
1447
1455
  }
1448
- var Et = /* @__PURE__ */ new WeakMap();
1449
- function Dt(e) {
1450
- let t = Et.get(e);
1451
- return t || (t = /* @__PURE__ */ new Map(), Et.set(e, t)), t;
1456
+ var kt = /* @__PURE__ */ new WeakMap();
1457
+ function At(e) {
1458
+ let t = kt.get(e);
1459
+ return t || (t = /* @__PURE__ */ new Map(), kt.set(e, t)), t;
1452
1460
  }
1453
- function Ot(e, t, n = 30) {
1461
+ function jt(e, t, n = 30) {
1454
1462
  let r = t.toLowerCase().trim();
1455
1463
  if (!r) return [];
1456
- let i = Dt(e), a = i.get(r);
1464
+ let i = At(e), a = i.get(r);
1457
1465
  if (a) return a.slice(0, n);
1458
1466
  i.size > 200 && i.clear();
1459
1467
  let o = r.split(/\s+/).filter(Boolean);
@@ -1472,7 +1480,7 @@ function Ot(e, t, n = 30) {
1472
1480
  }
1473
1481
  let c = [];
1474
1482
  for (let e of s) {
1475
- let t = wt(o, e);
1483
+ let t = Dt(o, e);
1476
1484
  t && c.push({
1477
1485
  item: e.item,
1478
1486
  score: t.score,
@@ -1481,17 +1489,17 @@ function Ot(e, t, n = 30) {
1481
1489
  }
1482
1490
  return c.sort((e, t) => t.score - e.score), i.set(r, c), c.slice(0, n);
1483
1491
  }
1484
- function kt(e) {
1492
+ function Mt(e) {
1485
1493
  if (e) {
1486
- Et.delete(e);
1494
+ kt.delete(e);
1487
1495
  return;
1488
1496
  }
1489
- Et = /* @__PURE__ */ new WeakMap();
1497
+ kt = /* @__PURE__ */ new WeakMap();
1490
1498
  }
1491
1499
  //#endregion
1492
1500
  //#region src/composables/search/useFuzzySearch.ts
1493
- function At(e) {
1494
- let t = typeof e.items == "function" ? e.items : () => e.items, n = e.debounceMs ?? 120, r = e.maxResults ?? 30, i = q(""), a = q(!1), o = q(!1), s = q(0), c = q(""), l = k(() => t()), u = k(() => Tt(l.value)), d;
1501
+ function Nt(e) {
1502
+ let t = typeof e.items == "function" ? e.items : () => e.items, n = e.debounceMs ?? 120, r = e.maxResults ?? 30, i = q(""), a = q(!1), o = q(!1), s = q(0), c = q(""), l = A(() => t()), u = A(() => Ot(l.value)), d;
1495
1503
  function f(e = d) {
1496
1504
  e !== void 0 && (clearTimeout(e), d === e && (d = void 0));
1497
1505
  }
@@ -1507,7 +1515,7 @@ function At(e) {
1507
1515
  }), Z(l, () => {
1508
1516
  f(), c.value = i.value, s.value = 0;
1509
1517
  }, { deep: !0 });
1510
- let p = k(() => Ot(u.value, c.value, r));
1518
+ let p = A(() => jt(u.value, c.value, r));
1511
1519
  Z(p, () => {
1512
1520
  s.value = 0;
1513
1521
  });
@@ -1515,7 +1523,7 @@ function At(e) {
1515
1523
  e.onSelect?.(t), h();
1516
1524
  }
1517
1525
  function h() {
1518
- a.value = !1, o.value = !1, f(), i.value = "", c.value = "", s.value = 0, kt(u.value);
1526
+ a.value = !1, o.value = !1, f(), i.value = "", c.value = "", s.value = 0, Mt(u.value);
1519
1527
  }
1520
1528
  function g() {
1521
1529
  a.value = !0;
@@ -1539,8 +1547,8 @@ function At(e) {
1539
1547
  break;
1540
1548
  }
1541
1549
  }
1542
- return U(() => {
1543
- f(), kt(u.value);
1550
+ return W(() => {
1551
+ f(), Mt(u.value);
1544
1552
  }, !0), {
1545
1553
  query: i,
1546
1554
  results: p,
@@ -1556,13 +1564,13 @@ function At(e) {
1556
1564
  }
1557
1565
  //#endregion
1558
1566
  //#region src/components/dock/composables/useDockSearch.ts
1559
- function jt(e) {
1567
+ function Pt(e) {
1560
1568
  let { dockState: t } = e, n = e.debounceMs ?? 120, r = e.maxResults ?? 30, i = q([]), a = null, o = e.items ? e.items : () => i.value;
1561
1569
  function s(t) {
1562
1570
  let n = t.item.id;
1563
1571
  e.ensureTargetWindow?.(n), e.scrollTo?.(n), e.onResultSelect?.(t);
1564
1572
  }
1565
- let c = At({
1573
+ let c = Nt({
1566
1574
  items: o,
1567
1575
  debounceMs: n,
1568
1576
  maxResults: r,
@@ -1583,7 +1591,7 @@ function jt(e) {
1583
1591
  });
1584
1592
  });
1585
1593
  }
1586
- let l = k(() => {
1594
+ let l = A(() => {
1587
1595
  let e = c.query.value;
1588
1596
  if (!e) return "";
1589
1597
  let t = c.results.value[0];
@@ -1595,28 +1603,28 @@ function jt(e) {
1595
1603
  let e = l.value;
1596
1604
  e && (c.query.value = c.query.value + e);
1597
1605
  }
1598
- let d = p(() => t), f = d.isHeld;
1599
- function m() {
1606
+ let d = m(() => t), f = d.isHeld;
1607
+ function p() {
1600
1608
  f.value || (t.expand(), d.acquire(), c.open());
1601
1609
  }
1602
1610
  function h() {
1603
1611
  f.value && (c.close(), d.release());
1604
1612
  }
1605
1613
  let g = null;
1606
- return e.collapseOnScroll && e.scrollContainer && (g = E(e.scrollContainer, {
1614
+ return e.collapseOnScroll && e.scrollContainer && (g = O(e.scrollContainer, {
1607
1615
  collapseOnScroll: !0,
1608
1616
  chromeRef: e.chromeRef
1609
- })), U(() => {
1617
+ })), W(() => {
1610
1618
  a?.abort(), a = null;
1611
1619
  }), {
1612
1620
  fuzzy: c,
1613
1621
  autocompleteText: l,
1614
1622
  scrollChrome: g,
1615
- armSearch: m,
1623
+ armSearch: p,
1616
1624
  disarmSearch: h,
1617
1625
  acceptAutocomplete: u,
1618
1626
  isSearchArmed: f
1619
1627
  };
1620
1628
  }
1621
1629
  //#endregion
1622
- export { h as DOCK_CONTEXT_KEY, yt as DockBackgroundToggle, _t as DockControl, st as DockCrossfade, gt as DockLayer, pt as DockLayerGroup, xt as DockSeparator, vt as DockTrigger, Qe as GlassDock, d as provideDockContext, l as useDockContext, w as useDockCtaReceive, jt as useDockSearch, m as useOptionalDockContext };
1630
+ export { g as DOCK_CONTEXT_KEY, St as DockBackgroundToggle, bt as DockControl, ut as DockCrossfade, yt as DockLayer, gt as DockLayerGroup, wt as DockSeparator, xt as DockTrigger, tt as GlassDock, l as provideDockContext, h as useDockContext, E as useDockCtaReceive, Pt as useDockSearch, _ as useOptionalDockContext };