@mkbabb/glass-ui 10.1.1 → 10.1.3

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 (32) hide show
  1. package/MIGRATION.md +45 -0
  2. package/dist/{command-CTQCaHVA.js → command-CatrAsrl.js} +1 -1
  3. package/dist/command.js +1 -1
  4. package/dist/components/dock/DockControl.vue.d.ts +3 -0
  5. package/dist/components/dock/DockTrigger.vue.d.ts +5 -5
  6. package/dist/components/dock/composables/dockMorphMeasure.d.ts +44 -7
  7. package/dist/components/dock/composables/useDockMorph.d.ts +9 -0
  8. package/dist/components/dock/composables/useDockRun.d.ts +5 -0
  9. package/dist/components/dock/constants.d.ts +10 -0
  10. package/dist/components/dock/styles/controls/triggers.css +1 -1
  11. package/dist/components/dock/styles/index.css +1 -1
  12. package/dist/components/dock/styles/layers.css +1 -1
  13. package/dist/components/dock/styles/shape.css +1 -1
  14. package/dist/components/dock/styles/shell.css +1 -1
  15. package/dist/dock.js +815 -519
  16. package/dist/easing.js +3 -3
  17. package/dist/glass-ui.js +6 -6
  18. package/dist/labeled-field.js +1 -1
  19. package/dist/{menu-DN29N6KR.js → menu-DaYAZiVW.js} +1 -1
  20. package/dist/menu.js +1 -1
  21. package/dist/{participation-Cs_UX_Dc.js → participation-B7UFdgXB.js} +11 -11
  22. package/dist/{popover-CJpvT2E6.js → popover-BdpoE4Ar.js} +1 -1
  23. package/dist/popover.js +1 -1
  24. package/dist/{select-5QMeUAU6.js → select-BiF0FCZf.js} +1 -1
  25. package/dist/select.js +1 -1
  26. package/dist/{slider-D1zkobtO.js → slider-5uoY-cLG.js} +1 -1
  27. package/dist/slider.js +1 -1
  28. package/dist/{tabs-C0PYq3Tb.js → tabs-C5sC0fBE.js} +1 -1
  29. package/dist/tabs.js +1 -1
  30. package/dist/{tooltip-D7j6TsE4.js → tooltip-CZVubnJf.js} +1 -1
  31. package/dist/tooltip.js +1 -1
  32. package/package.json +1 -1
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, 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";
9
+ import { a as l, c as u, d, f, i as p, l as m, n as h, o as g, r as _, s as v, u as y } from "./participation-B7UFdgXB.js";
10
+ import { t as b } from "./useResizeObserver-CdUlm2QZ.js";
11
+ import { n as x } from "./useResolveTokenColor-B2FfJnd9.js";
12
+ import { t as S } from "./useIntersectionPause-CzKR3EyP.js";
13
+ import { t as C } from "./focus-Duf7EpUu.js";
14
+ import { t as w } from "./DropdownMenuTrigger-CKRnhDSQ.js";
15
+ import { t as T } from "./useSelectionGroup-zsEwitF6.js";
16
+ import { t as E } from "./useDragMorph-B363RUbF.js";
17
+ import { n as D } from "./useDockCtaReceive-BSSgD6mu.js";
18
+ import { n as O, t as k } from "./useScrollChrome-BJbWV32F.js";
19
+ import { Fragment as ee, computed as A, createBlock as j, createCommentVNode as M, createElementBlock as N, createElementVNode as P, createVNode as F, defineComponent as I, h as te, mergeModels as L, mergeProps as R, nextTick as z, normalizeClass as B, normalizeStyle as ne, onBeforeUnmount as V, onMounted as H, onScopeDispose as U, onUnmounted as re, openBlock as W, readonly as G, ref as K, renderList as ie, renderSlot as q, resolveDynamicComponent as ae, toDisplayString as oe, unref as J, useId as se, useModel as ce, useTemplateRef as Y, watch as X, withCtx as Z, withDirectives as Q, withModifiers as le } from "vue";
20
+ import { PopoverTrigger as ue, Primitive as de, SelectIcon as fe, SelectTrigger as pe } from "reka-ui";
21
+ import { ChevronDown as me, Pause as he, Play as ge } from "@lucide/vue";
22
+ import { SpringProgress as _e } from "@mkbabb/keyframes.js";
23
+ import { useMediaQuery as ve } from "@vueuse/core";
24
24
  //#region src/components/_shared/overlay/isTeleportedTarget.ts
25
- function ge(e, t) {
25
+ function ye(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 _e(e) {
32
+ function be(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 ve(e, t, n) {
37
- return .2126 * _e(e) + .7152 * _e(t) + .0722 * _e(n);
36
+ function xe(e, t, n) {
37
+ return .2126 * be(e) + .7152 * be(t) + .0722 * be(n);
38
38
  }
39
- function ye(e, t, n, r, i) {
39
+ function Se(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 be(e) {
46
+ function Ce(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 be(e) {
52
52
  t[4] === void 0 ? 1 : Number(t[4])
53
53
  ] : null;
54
54
  }
55
- function xe(e) {
55
+ function we(e) {
56
56
  return typeof HTMLCanvasElement < "u" && e instanceof HTMLCanvasElement;
57
57
  }
58
- var Se = "[data-glass-field-canvas] canvas, canvas[data-glass-field-canvas]";
59
- function Ce(e) {
58
+ var Te = "[data-glass-field-canvas] canvas, canvas[data-glass-field-canvas]";
59
+ function Ee(e) {
60
60
  if (!e) {
61
61
  if (typeof document < "u") {
62
- let e = document.querySelector(Se);
63
- if (xe(e)) return e;
62
+ let e = document.querySelector(Te);
63
+ if (we(e)) return e;
64
64
  }
65
65
  return null;
66
66
  }
67
- if (xe(e)) return e;
67
+ if (we(e)) return e;
68
68
  if (typeof e == "function") {
69
69
  let t = e();
70
- return xe(t) ? t : null;
70
+ return we(t) ? t : null;
71
71
  }
72
72
  if (typeof e == "string" && typeof document < "u") {
73
73
  let t = document.querySelector(e);
74
- return xe(t) ? t : null;
74
+ return we(t) ? t : null;
75
75
  }
76
76
  return null;
77
77
  }
78
- function we(e, t) {
79
- let n = be(e);
78
+ function De(e, t) {
79
+ let n = Ce(e);
80
80
  if (n) return n;
81
81
  if (!t) return null;
82
82
  try {
@@ -92,7 +92,7 @@ function we(e, t) {
92
92
  return null;
93
93
  }
94
94
  }
95
- function Te(e, t, n, r) {
95
+ function Oe(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,60 +102,60 @@ function Te(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] = ye(e[t], e[t + 1], e[t + 2], n, r);
106
- i += ve(s, c, l), a += n, o++;
105
+ let n = e[t + 3] / 255, [s, c, l] = Se(e[t], e[t + 1], e[t + 2], n, r);
106
+ i += xe(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 Ee(e, t) {
113
+ function ke(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 = we(b(r, e), t);
117
+ let r = getComputedStyle(n).backgroundColor, i = De(x(r, e), t);
118
118
  if (i && !(i[3] < .5)) return i;
119
119
  }
120
- return we(b(getComputedStyle(document.body).backgroundColor, e), t);
120
+ return De(x(getComputedStyle(document.body).backgroundColor, e), t);
121
121
  }
122
- var De = [
122
+ var Ae = [
123
123
  255,
124
124
  255,
125
125
  255
126
126
  ];
127
- function Oe(e, t) {
128
- let n = Ee(e, t);
127
+ function je(e, t) {
128
+ let n = ke(e, t);
129
129
  return n && n[3] >= .5 ? [
130
130
  n[0],
131
131
  n[1],
132
132
  n[2]
133
- ] : [...De];
133
+ ] : [...Ae];
134
134
  }
135
- function ke(e, t) {
136
- let n = Ee(e, t);
137
- return n ? Ae(n) : null;
135
+ function Me(e, t) {
136
+ let n = ke(e, t);
137
+ return n ? Ne(n) : null;
138
138
  }
139
- function Ae(e) {
140
- return { luma: ve(e[0], e[1], e[2]) };
139
+ function Ne(e) {
140
+ return { luma: xe(e[0], e[1], e[2]) };
141
141
  }
142
142
  //#endregion
143
143
  //#region src/composables/glass/useGlassBackdropLuminance.ts
144
- var je = "data-glass-backdrop-shared";
145
- function Me(e, n = {}) {
144
+ var Pe = "data-glass-backdrop-shared";
145
+ function Fe(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(`[${je}]`) !== null;
148
+ return !s && e.closest(`[${Pe}]`) !== null;
149
149
  }
150
- let l = q(null), u = q(null), d = q({
150
+ let l = K(null), u = K(null), d = K({
151
151
  state: "pending",
152
152
  mode: n.live === !0 ? "live" : "static",
153
153
  source: n.live === !0 ? "canvas" : "elements"
154
154
  });
155
155
  if (typeof window > "u") return {
156
- luma: K(l),
157
- bucket: K(u),
158
- sample: K(d),
156
+ luma: G(l),
157
+ bucket: G(u),
158
+ sample: G(d),
159
159
  sampleNow: () => {},
160
160
  dispose: () => {}
161
161
  };
@@ -164,7 +164,7 @@ function Me(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 || Ce(void 0) !== null : n.live;
167
+ return n.live === void 0 ? e.value?.dataset.glassSample === "live" || n.backgroundCanvas != null || Ee(void 0) !== null : n.live;
168
168
  }
169
169
  function _(e) {
170
170
  let t = e.getBoundingClientRect();
@@ -188,7 +188,7 @@ function Me(e, n = {}) {
188
188
  targetRect: _(t)
189
189
  }, t.style.setProperty("--glass-backdrop-luma", o.toFixed(3)), t.setAttribute("data-backdrop-sampled", ""), t.setAttribute("data-backdrop-sample-state", "sampled"), t.setAttribute("data-backdrop-sample-source", n === "live" ? "canvas" : "elements"), t.removeAttribute("data-backdrop-sample-reason"), t.style.setProperty("--glass-backdrop-sampled", "1"), a && t.style.setProperty("--glass-backdrop", s);
190
190
  }
191
- function b(e, t, n, r) {
191
+ function y(e, t, n, r) {
192
192
  l.value = null, u.value = null, d.value = {
193
193
  state: "unavailable",
194
194
  mode: t,
@@ -198,27 +198,27 @@ function Me(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 S = 0;
201
+ let x = 0;
202
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" ? 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;
205
+ let r = h(), i = g() ? "live" : "static", a = i === "live" ? Ee(n.backgroundCanvas) : null, o = i === "live" ? Oe(t, a, r, je(t, r)) : Me(t, r), s = Date.now();
206
+ o ? v(o, t, i, s) : y(t, i, i === "live" && !a ? "source-unavailable" : "sample-unavailable", s), x = typeof performance < "u" ? performance.now() : s;
207
207
  }
208
- let w = D(({ now: e }) => {
209
- f.value || e - S < o || C();
208
+ let w = O(({ now: e }) => {
209
+ f.value || e - x < o || C();
210
210
  }, {
211
211
  immediate: !1,
212
212
  pauseWhenHidden: !0,
213
213
  respectReducedMotion: !0
214
- }), T = x(() => e.value, {
214
+ }), T = S(() => e.value, {
215
215
  pause: () => w.pause(),
216
216
  resume: () => {
217
217
  let t = e.value;
218
218
  t && c(t) || g() && !f.value && w.resume();
219
219
  }
220
- }, { rootMargin: "200px" }), E = y(e, () => C());
221
- function O() {
220
+ }, { rootMargin: "200px" }), E = b(e, () => C());
221
+ function D() {
222
222
  let t = e.value;
223
223
  if (t && c(t)) {
224
224
  w.stop();
@@ -226,142 +226,196 @@ function Me(e, n = {}) {
226
226
  }
227
227
  f.value ? (w.stop(), C()) : g() && w.start();
228
228
  }
229
- let k = Z(f, O, { flush: "sync" }), A = Z(() => e.value, (e) => {
229
+ let k = X(f, D, { flush: "sync" }), ee = X(() => e.value, (e) => {
230
230
  if (e) {
231
- if (s) e.setAttribute(je, "");
231
+ if (s) e.setAttribute(Pe, "");
232
232
  else if (c(e)) return;
233
- C(), O();
233
+ C(), D();
234
234
  }
235
235
  }, {
236
236
  immediate: !0,
237
237
  flush: "post"
238
238
  });
239
- function j() {
240
- A(), k(), w.dispose(), T.dispose(), E.stop(), p = null, m = null;
239
+ function A() {
240
+ ee(), k(), w.dispose(), T.dispose(), E.stop(), p = null, m = null;
241
241
  }
242
- return W(j), {
243
- luma: K(l),
244
- bucket: K(u),
245
- sample: K(d),
242
+ return U(A), {
243
+ luma: G(l),
244
+ bucket: G(u),
245
+ sample: G(d),
246
246
  sampleNow: C,
247
- dispose: j
247
+ dispose: A
248
248
  };
249
249
  }
250
250
  //#endregion
251
251
  //#region src/components/dock/composables/useDockState.ts
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;
252
+ function Ie(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 = K(c() ? "pinned" : i ? "hover" : "collapsed"), f = A(() => d.value !== "collapsed"), p = A(() => d.value === "pinned"), m = null, h = K(0), g = K(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 = d.value;
258
- function T() {
259
- c() && (d.value = "pinned"), s && w !== d.value && s(d.value, w), w = d.value;
257
+ let w = null, T = null, E = null, D = () => w === "down" || w === "compat";
258
+ function O() {
259
+ if (!w) return;
260
+ w = null, E &&= (clearTimeout(E), null);
261
+ for (let [e, t] of j) window.removeEventListener(e, t, !0);
262
+ let e = T;
263
+ T = null, e && !l() && d.value === "collapsed" && (F(), d.value = "hover", P());
264
+ }
265
+ function k() {
266
+ E ??= setTimeout(O, 0);
267
+ }
268
+ function ee() {
269
+ T = null, O();
270
+ }
271
+ let j = [
272
+ ["click", () => O()],
273
+ ["pointercancel", () => O()],
274
+ ["dragstart", () => O()],
275
+ ["contextmenu", () => O()],
276
+ ["pointerup", (e) => {
277
+ w === "down" && (e.pointerType === "touch" ? w = "tap" : k());
278
+ }],
279
+ ["mousedown", () => {
280
+ w === "tap" && (w = "compat");
281
+ }],
282
+ ["mouseup", () => {
283
+ w === "compat" && k();
284
+ }],
285
+ ["pointerdown", (e) => {
286
+ (w === "tap" || e.isPrimary) && ee();
287
+ }]
288
+ ];
289
+ function M() {
290
+ w && ee(), w = "down";
291
+ for (let [e, t] of j) window.addEventListener(e, t, !0);
292
+ }
293
+ X(n, (e, t, n) => {
294
+ e && (e.addEventListener("pointerdown", M, !0), n(() => e.removeEventListener("pointerdown", M, !0)));
295
+ }, {
296
+ immediate: !0,
297
+ flush: "sync"
298
+ });
299
+ let N = d.value;
300
+ function P() {
301
+ c() && (d.value = "pinned"), s && N !== d.value && s(d.value, N), N = d.value;
260
302
  }
261
- function E() {
303
+ function F() {
262
304
  m &&= (clearTimeout(m), null);
263
305
  }
264
- function D() {
306
+ function I() {
265
307
  b !== null && (cancelAnimationFrame(b), b = null);
266
308
  }
267
- function O() {
268
- D(), y?.();
309
+ function te() {
310
+ I(), y?.();
269
311
  }
270
- function k() {
271
- l() || h.value > 0 || (E(), m = setTimeout(() => {
272
- d.value = "collapsed", T();
312
+ function L() {
313
+ l() || h.value > 0 || (F(), m = setTimeout(() => {
314
+ d.value = "collapsed", P();
273
315
  }, t));
274
316
  }
275
- function j() {
317
+ function R() {
276
318
  if (c()) {
277
- d.value = "pinned", T();
319
+ d.value = "pinned", P();
278
320
  return;
279
321
  }
280
- x ||= (x = !0, E(), C(), d.value = "collapsed", T(), !1);
322
+ x ||= (x = !0, F(), C(), d.value = "collapsed", P(), !1);
281
323
  }
282
- function M() {
324
+ function z() {
283
325
  if (c()) {
284
- d.value = "pinned", T();
326
+ d.value = "pinned", P();
285
327
  return;
286
328
  }
287
- E(), C(), d.value = "hover", T();
288
- }
289
- function N() {
290
- l() || (E(), d.value === "collapsed" && (C(), S = setTimeout(() => {
291
- S = null, !l() && d.value === "collapsed" && (d.value = "hover", T());
329
+ F(), C(), d.value = "hover", P();
330
+ }
331
+ function B() {
332
+ l() || (F(), d.value === "collapsed" && (C(), S = setTimeout(() => {
333
+ if (S = null, !l() && d.value === "collapsed") {
334
+ if (D()) {
335
+ T ??= "hover";
336
+ return;
337
+ }
338
+ d.value = "hover", P();
339
+ }
292
340
  }, 60)));
293
341
  }
294
- function P(e) {
295
- if (!l() && (C(), d.value === "hover")) {
342
+ function ne(e) {
343
+ if (!l() && (C(), T === "hover" && (T = null), d.value === "hover")) {
296
344
  if (h.value > 0) return;
297
345
  if (e) {
298
346
  let t = n.value;
299
- if (t && e.relatedTarget instanceof Node && t.contains(e.relatedTarget) || ge(e.relatedTarget, o)) return;
347
+ if (t && e.relatedTarget instanceof Node && t.contains(e.relatedTarget) || ye(e.relatedTarget, o)) return;
300
348
  }
301
- k();
349
+ L();
302
350
  }
303
351
  }
304
- function F() {
305
- l() || (E(), d.value === "collapsed" && (d.value = "hover", T()));
352
+ function V() {
353
+ if (!l() && (F(), d.value === "collapsed")) {
354
+ if (D()) {
355
+ T = "focus";
356
+ return;
357
+ }
358
+ d.value = "hover", P();
359
+ }
306
360
  }
307
- function I(e) {
308
- if (l() || d.value !== "hover" || h.value > 0) return;
309
- let t = e.currentTarget;
310
- e.relatedTarget && t.contains(e.relatedTarget) || ge(e.relatedTarget, o) || k();
361
+ function H(e) {
362
+ if (l()) return;
363
+ let t = e.currentTarget, n = !!e.relatedTarget && t.contains(e.relatedTarget) || ye(e.relatedTarget, o);
364
+ !n && T === "focus" && (T = null), d.value === "hover" && (h.value > 0 || n || L());
311
365
  }
312
- function L() {
313
- l() || (E(), C(), d.value = "pinned", T());
366
+ function U() {
367
+ l() || (F(), C(), d.value = "pinned", P());
314
368
  }
315
- function R(e = "morph") {
316
- h.value++, e === "grasp" && g.value++, E();
369
+ function W(e = "morph") {
370
+ h.value++, e === "grasp" && g.value++, F();
317
371
  }
318
- function z(e = "morph") {
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();
372
+ function G(e = "morph") {
373
+ e === "grasp" && (g.value = Math.max(0, g.value - 1)), h.value = Math.max(0, h.value - 1), h.value === 0 && d.value === "hover" && (F(), m = setTimeout(() => {
374
+ h.value === 0 && d.value === "hover" && L();
321
375
  }, Math.min(t, 800)));
322
376
  }
323
- function B(e) {
377
+ function ie(e) {
324
378
  if (l() || h.value > 0 || a?.value) return;
325
379
  let t = n.value;
326
- !t || t.contains(e.target) || ge(e.target, o) || j();
380
+ !t || t.contains(e.target) || ye(e.target, o) || R();
327
381
  }
328
- return Z(f, (e) => {
382
+ return X(f, (e) => {
329
383
  if (e) {
330
384
  if (typeof document > "u") return;
331
- O(), b = requestAnimationFrame(() => {
332
- b = null, f.value && (document.addEventListener("pointerdown", B, !0), y = () => {
333
- document.removeEventListener("pointerdown", B, !0), y = null;
385
+ te(), b = requestAnimationFrame(() => {
386
+ b = null, f.value && (document.addEventListener("pointerdown", ie, !0), y = () => {
387
+ document.removeEventListener("pointerdown", ie, !0), y = null;
334
388
  });
335
389
  });
336
- } else O();
337
- }, { immediate: !0 }), typeof r == "boolean" ? r && (d.value = "pinned", T()) : Z(r, (e) => {
390
+ } else te();
391
+ }, { immediate: !0 }), typeof r == "boolean" ? r && (d.value = "pinned", P()) : X(r, (e) => {
338
392
  if (e) {
339
- E(), d.value = "pinned", T();
393
+ F(), d.value = "pinned", P();
340
394
  return;
341
395
  }
342
- d.value = "collapsed", T();
343
- }), ee(() => {
344
- E(), C(), O();
396
+ d.value = "collapsed", P();
397
+ }), re(() => {
398
+ F(), C(), te(), ee();
345
399
  }), {
346
400
  state: d,
347
401
  expanded: f,
348
402
  isPinned: p,
349
403
  isHeld: _,
350
404
  graspHeld: v,
351
- onMouseEnter: N,
352
- onMouseLeave: P,
353
- onFocusIn: F,
354
- onFocusOut: I,
355
- onClickCollapsed: L,
356
- keepOpen: R,
357
- release: z,
358
- expand: M,
359
- collapse: j
405
+ onMouseEnter: B,
406
+ onMouseLeave: ne,
407
+ onFocusIn: V,
408
+ onFocusOut: H,
409
+ onClickCollapsed: U,
410
+ keepOpen: W,
411
+ release: G,
412
+ expand: z,
413
+ collapse: R
360
414
  };
361
415
  }
362
416
  //#endregion
363
417
  //#region src/components/dock/composables/useDockSpring.ts
364
- function Pe(e) {
418
+ function Le(e) {
365
419
  let t = null, n = () => t !== null && !t.settled;
366
420
  function i() {
367
421
  t &&= (t.dispose(), null);
@@ -369,7 +423,7 @@ function Pe(e) {
369
423
  function a(a, o, s) {
370
424
  let c = n() ? t.velocity * (s.inheritVelocityScale ?? 1) : 0;
371
425
  i();
372
- let l = new me({
426
+ let l = new _e({
373
427
  response: e.response * r(),
374
428
  dampingFraction: e.dampingFraction,
375
429
  initial: a,
@@ -396,98 +450,269 @@ function Pe(e) {
396
450
  }
397
451
  //#endregion
398
452
  //#region src/components/dock/composables/useDockMorph.ts
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
- function s() {
453
+ function Re(e) {
454
+ let { rootEl: t, outerActiveLayer: n, geometry: r } = e, i = K(n.value), a = K(null), o = Le({
455
+ response: d.response,
456
+ dampingFraction: d.dampingFraction
457
+ }), s = ve("(prefers-reduced-motion: reduce)");
458
+ function c() {
405
459
  return t.value;
406
460
  }
407
- function c() {
408
- i.value = null;
409
- let t = s();
410
- t && (t.removeAttribute("data-morphing"), t.style.removeProperty("--dock-morph-t")), e.onMorphActiveChange?.(!1), a.dispose();
461
+ function l() {
462
+ a.value = null;
463
+ let t = c();
464
+ t && (t.removeAttribute("data-morphing"), t.style.removeProperty("--dock-morph-t"), r.release()), e.onMorphActiveChange?.(!1), o.dispose();
411
465
  }
412
- Z(o, (e) => {
413
- e && s()?.hasAttribute("data-morphing") && c();
466
+ X(s, (e) => {
467
+ e && c()?.hasAttribute("data-morphing") && l();
414
468
  });
415
- function l() {
416
- let t = s();
469
+ function u() {
470
+ let t = c();
417
471
  if (!t) return;
418
472
  e.onMorphActiveChange?.(!0), t.setAttribute("data-morphing", "");
419
- let n = Number.parseFloat(t.style.getPropertyValue("--dock-morph-t")), r = a.live && !Number.isNaN(n), i = r ? 1 - n : 0;
420
- t.style.setProperty("--dock-morph-t", `${i}`), a.playTo(i, 1, {
421
- inheritVelocityScale: r ? -1 : 1,
473
+ let n = Number.parseFloat(t.style.getPropertyValue("--dock-morph-t")), i = o.live && !Number.isNaN(n), a = i ? 1 - n : 0;
474
+ t.style.setProperty("--dock-morph-t", `${a}`), r.anchor(), o.playTo(a, 1, {
475
+ inheritVelocityScale: i ? -1 : 1,
422
476
  onFrame: (e) => {
423
- s()?.style.setProperty("--dock-morph-t", `${e}`);
477
+ c()?.style.setProperty("--dock-morph-t", `${e}`);
424
478
  },
425
- onSettle: c
479
+ onSettle: l
426
480
  });
427
481
  }
428
- let u = Z(n, (e, t) => {
429
- if (e === t) return;
430
- let n = s();
431
- if (r.value = e, !n) {
432
- i.value = null;
433
- return;
434
- }
435
- i.value = t, l();
436
- });
437
- return ee(() => {
438
- u(), a.dispose();
482
+ let f = X(n, (e, t) => {
483
+ e !== t && (c() && r.first(), i.value = e, a.value = c() ? t : null);
484
+ }), p = X(n, (e, t) => {
485
+ e === t || !c() || (r.measure(), u());
486
+ }, { flush: "post" });
487
+ return re(() => {
488
+ f(), p(), o.dispose();
439
489
  }), {
440
- outerCurrentLayer: K(r),
441
- outerLeavingLayer: K(i)
490
+ outerCurrentLayer: G(i),
491
+ outerLeavingLayer: G(a)
442
492
  };
443
493
  }
444
494
  //#endregion
445
495
  //#region src/components/dock/composables/dockMorphMeasure.ts
446
- function Ie(e, t) {
496
+ function $(e, t) {
447
497
  return t === "vertical" ? e.offsetHeight : e.offsetWidth;
448
498
  }
449
- function Le(e) {
450
- let { rootEl: t, contentEl: n, expandedEl: r, collapsedEl: i, axis: a, expanded: o } = e, s = null, c = 0, l = 0, u = !1;
451
- function d(e = "layout") {
452
- let s = t.value, u = n.value, d = r.value, f = i.value;
453
- if (!s || !u || !d || !f || s.hasAttribute("data-morphing")) return;
454
- let p = a.value, m = Ie(s, p), h = Ie(d, p), g = Ie(f, p);
455
- if (m <= 0 || h < 0 || g < 0) return;
456
- e === "layout" && (o.value ? c = m : l = m);
457
- let _ = o.value ? h : g, v = Math.max(0, m - _), y = c || v + h, b = l || v + g;
458
- y <= 0 || b <= 0 || (s.style.setProperty("--dock-collapsed-px", `${b}px`), s.style.setProperty("--dock-expanded-px", `${Math.max(y, b)}px`));
499
+ function ze(e, t) {
500
+ let n = e.map(([e, t]) => [
501
+ e,
502
+ t,
503
+ e.style.getPropertyValue(t),
504
+ e.style.getPropertyPriority(t)
505
+ ]);
506
+ for (let [t, n, r] of e) t.style.setProperty(n, r, n.startsWith("--") ? "" : "important");
507
+ try {
508
+ return t();
509
+ } finally {
510
+ for (let [e, t, r, i] of n.reverse()) r ? e.style.setProperty(t, r, i) : e.style.removeProperty(t);
459
511
  }
512
+ }
513
+ function Be(e, t) {
514
+ let n = e.scrollLeft, r = e.scrollTop;
515
+ try {
516
+ return t();
517
+ } finally {
518
+ (e.scrollLeft !== n || e.scrollTop !== r) && e.scrollTo({
519
+ left: n,
520
+ top: r,
521
+ behavior: "instant"
522
+ });
523
+ }
524
+ }
525
+ function Ve(e, t, n, r, i) {
526
+ let a = r === "vertical" ? "margin-block-end" : "margin-inline-end";
527
+ return ze([
528
+ [
529
+ e,
530
+ "--dock-expanded-px",
531
+ "initial"
532
+ ],
533
+ [
534
+ t,
535
+ "position",
536
+ "relative"
537
+ ],
538
+ [
539
+ t,
540
+ "inset",
541
+ "auto"
542
+ ],
543
+ [
544
+ n,
545
+ "position",
546
+ "absolute"
547
+ ]
548
+ ], () => {
549
+ let n = $(e, r);
550
+ if (i === null) return n;
551
+ let o = i - (n - $(t, r));
552
+ if (Math.abs(o) < .5) return n;
553
+ let s = Number.parseFloat(getComputedStyle(t).getPropertyValue(a)) || 0;
554
+ return ze([[
555
+ t,
556
+ a,
557
+ `${s + o}px`
558
+ ]], () => $(e, r));
559
+ });
560
+ }
561
+ function He(e, t) {
562
+ let n = e.getBoundingClientRect();
563
+ return t === "vertical" ? {
564
+ start: n.top,
565
+ size: n.height
566
+ } : {
567
+ start: n.left,
568
+ size: n.width
569
+ };
570
+ }
571
+ var Ue = "--dock-morph-origin", We = "--dock-pane-shift";
572
+ function Ge(e) {
573
+ let { rootEl: t, contentEl: n, expandedEl: r, collapsedEl: i, axis: a } = e, o = null, s = null, c = null, l = null, u = null, d = !1;
460
574
  function f() {
461
- s?.disconnect(), s = null;
462
- let e = t.value;
463
- if (e) {
464
- if (typeof ResizeObserver < "u") {
465
- s = new ResizeObserver(() => d("layout"));
466
- for (let t of [
467
- e,
468
- n.value,
469
- r.value,
470
- i.value
471
- ]) t && s.observe(t);
575
+ let e = t.value, o = r.value, s = i.value;
576
+ if (!e || !n.value || !o || !s) return;
577
+ let d = a.value, f = o.classList.contains("is-active");
578
+ if (!e.hasAttribute("data-morphing")) {
579
+ let t = $(e, d) - $(f ? o : s, d);
580
+ f ? c = t : l = t;
581
+ }
582
+ let p = Be(o, () => Ve(e, o, s, d, c));
583
+ f || (u = Be(o, () => Ve(e, s, o, d, l))), !(p <= 0) && (u !== null && u > 0 && e.style.setProperty("--dock-collapsed-px", `${u}px`), e.style.setProperty("--dock-expanded-px", `${Math.max(p, u ?? 0)}px`));
584
+ }
585
+ function p() {
586
+ if (!o) return;
587
+ o.disconnect();
588
+ let e = [r.value, i.value], a = t.value;
589
+ for (let t of [
590
+ a,
591
+ a?.parentElement,
592
+ n.value,
593
+ ...e
594
+ ]) t && o.observe(t);
595
+ for (let t of e) for (let e of t?.children ?? []) o.observe(e);
596
+ }
597
+ function m() {
598
+ if (o?.disconnect(), o = null, s?.disconnect(), s = null, t.value) {
599
+ if (typeof ResizeObserver < "u" && (o = new ResizeObserver(() => f()), p()), typeof MutationObserver < "u") {
600
+ s = new MutationObserver(() => {
601
+ p(), f();
602
+ });
603
+ for (let e of [r.value, i.value]) e && s.observe(e, {
604
+ childList: !0,
605
+ subtree: !0,
606
+ characterData: !0
607
+ });
472
608
  }
473
- d();
609
+ f();
474
610
  }
475
611
  }
476
- Z([
612
+ X([
477
613
  t,
478
614
  n,
479
615
  r,
480
616
  i,
481
617
  a
482
- ], f, { immediate: !0 }), Z(o, () => d("flip"));
483
- let p = typeof document < "u" ? document.fonts : void 0;
484
- p && p.ready.then(() => !u && d("layout")), W(() => {
485
- u = !0, s?.disconnect(), s = null;
618
+ ], m, { immediate: !0 });
619
+ let h = () => f();
620
+ typeof window < "u" && window.addEventListener("resize", h);
621
+ let g = typeof document < "u" ? document.fonts : void 0;
622
+ g && g.ready.then(() => !d && f()), U(() => {
623
+ d = !0, o?.disconnect(), o = null, s?.disconnect(), s = null, typeof window < "u" && window.removeEventListener("resize", h);
486
624
  });
625
+ let _ = null;
626
+ function v(e) {
627
+ return [...e.querySelectorAll(":scope > .dock-controls > .dock-persistent")];
628
+ }
629
+ function y() {
630
+ return [r.value, i.value].filter((e) => !!e);
631
+ }
632
+ function b() {
633
+ let e = t.value;
634
+ if (!e) return;
635
+ let n = a.value;
636
+ _ = new Map([
637
+ e,
638
+ ...v(e),
639
+ ...y()
640
+ ].map((e) => [e, He(e, n)]));
641
+ }
642
+ function x() {
643
+ let e = t.value;
644
+ if (e) {
645
+ for (let t of [
646
+ e,
647
+ ...v(e),
648
+ n.value
649
+ ]) t?.style.removeProperty(Ue);
650
+ for (let e of y()) e.style.removeProperty(We);
651
+ }
652
+ }
653
+ function S() {
654
+ let e = t.value, i = n.value, o = _;
655
+ if (_ = null, x(), !e || !i || !o || !o.get(e)) return;
656
+ let s = a.value, c = v(e), l = He(e, s), u = [
657
+ e,
658
+ ...c,
659
+ i
660
+ ].map((e) => [
661
+ e,
662
+ "scale",
663
+ "none"
664
+ ]), d = () => new Map([
665
+ e,
666
+ ...c,
667
+ i,
668
+ ...y()
669
+ ].map((e) => [e, He(e, s)])), f = ze(u, d), p = f.get(e), m = $(e, s), h = p.size / m;
670
+ if (!(h > 0)) return;
671
+ let g = (e) => Math.abs(1 - e) < 1e-4, b = l.size / p.size, S = !r.value?.classList.contains("is-active") || g(b) ? ze([
672
+ ...u,
673
+ [
674
+ e,
675
+ "--dock-expanded-px",
676
+ "initial"
677
+ ],
678
+ [
679
+ e,
680
+ "--dock-morph-t",
681
+ "1"
682
+ ]
683
+ ], d) : null, C = o;
684
+ if (S && g(b) && (C = S, b = S.get(e).size / p.size), !Number.isFinite(b)) return;
685
+ let w = (e) => (e - p.start) / h, T = (e, t) => g(b) ? null : (e - t) / (1 - b), E = (e) => w(e.start + e.size / 2), D = T(w(C.get(e).start), 0) ?? m / 2, O = (e, t) => `${e / t * 100}%`;
686
+ e.style.setProperty(Ue, O(D, m));
687
+ for (let e of c) {
688
+ let t = C.get(e), n = f.get(e), r = $(e, s);
689
+ if (!t || !(r > 0)) continue;
690
+ let i = T(E(t), E(n));
691
+ e.style.setProperty(Ue, O((i === null ? D : D - i) - w(n.start), r));
692
+ }
693
+ let k = $(i, s);
694
+ k > 0 && i.style.setProperty(Ue, O(D - w(f.get(i).start), k));
695
+ for (let t of y()) {
696
+ let n = t.classList.contains("is-leaving"), r = n ? o.get(t) : S?.get(t), i = $(t, s);
697
+ if (!r || !(i > 0)) continue;
698
+ let a = n ? f.get(t) : ze([[
699
+ e,
700
+ "--dock-morph-t",
701
+ "1"
702
+ ]], () => He(t, s));
703
+ a && t.style.setProperty(We, O((r.start - a.start) / h, i));
704
+ }
705
+ }
706
+ return {
707
+ measure: f,
708
+ first: b,
709
+ anchor: S,
710
+ release: x
711
+ };
487
712
  }
488
713
  //#endregion
489
714
  //#region src/components/dock/composables/useDockShellProps.ts
490
- function Re(e) {
715
+ function Ke(e) {
491
716
  let t = A(() => e.shape ?? "pill"), n = A(() => e.orientation ?? "horizontal"), r = A(() => e.collapse === !1);
492
717
  return {
493
718
  startCollapsed: A(() => !r.value && (e.collapse ?? "closed") === "closed"),
@@ -499,8 +724,8 @@ function Re(e) {
499
724
  }
500
725
  //#endregion
501
726
  //#region src/components/dock/composables/useDockClickIntegrity.ts
502
- function ze(e) {
503
- let { rootEl: t, visualExpanded: n } = e, r = null, i = !1, a = 0, o = null, s = q(null), c = null, l = [];
727
+ function qe(e) {
728
+ let { rootEl: t, visualExpanded: n } = e, r = null, i = !1, a = 0, o = null, s = K(null), c = null, l = [];
504
729
  function u() {
505
730
  c?.removeAttribute("data-dock-press-origin"), c = null;
506
731
  for (let { element: e, wasInert: t } of l.splice(0)) e.toggleAttribute("inert", t);
@@ -543,7 +768,7 @@ function ze(e) {
543
768
  function _(e) {
544
769
  u(), r = e.target, i = g();
545
770
  }
546
- Z(n, (e, t) => {
771
+ X(n, (e, t) => {
547
772
  t && !e && r && d(r);
548
773
  });
549
774
  function v() {
@@ -570,106 +795,121 @@ function ze(e) {
570
795
  }
571
796
  e.stopPropagation(), e.preventDefault(), r = null;
572
797
  }
573
- return H(() => {
798
+ return V(() => {
574
799
  f(), u();
575
800
  }), {
576
801
  onPointerDownCapture: _,
577
802
  onPointerCancelCapture: v,
578
803
  onClickCapture: b,
579
804
  markExpandFlip: p,
580
- pressKeepaliveLayer: K(s)
805
+ pressKeepaliveLayer: G(s)
581
806
  };
582
807
  }
583
808
  //#endregion
584
809
  //#region src/components/dock/composables/useDockRun.ts
585
- function Be(e, t) {
810
+ function Je(e, t) {
586
811
  let n = getComputedStyle(e).getPropertyValue(t).trim(), r = Number.parseFloat(n);
587
812
  return Number.isFinite(r) ? r : 0;
588
813
  }
589
- function Ve(e) {
814
+ function Ye(e) {
590
815
  return Array.from(e.children).filter((e) => e instanceof HTMLElement);
591
816
  }
592
- function He(e) {
817
+ function Xe(e) {
593
818
  return e.findIndex((e) => {
594
819
  let t = (e.matches("[aria-current]") ? e : e.querySelector("[aria-current]"))?.getAttribute("aria-current");
595
820
  return t != null && t !== "false";
596
821
  });
597
822
  }
598
- var Ue = `${S}, [tabindex]`;
599
- function We(e) {
600
- return (e.matches(S) || e.hasAttribute("tabindex")) && !e.querySelector(Ue);
823
+ function Ze(e) {
824
+ return e.hasAttribute(y);
601
825
  }
602
- function Ge(e) {
603
- return Ve(e).filter(We);
826
+ function Qe(e) {
827
+ return Ye(e).filter(Ze);
604
828
  }
605
- function Ke(e) {
606
- let { runEl: t, statusEl: n, orientation: r } = e, i = Pe({
607
- response: v.response,
608
- dampingFraction: v.dampingFraction
829
+ var $e = ".dock-separator", et = "select[aria-hidden=\"true\"][tabindex=\"-1\"]";
830
+ function tt(e) {
831
+ let t = Ye(e).filter((e) => !e.matches($e) && !e.matches(et));
832
+ return t.length > 0 && t.every(Ze);
833
+ }
834
+ function nt(e) {
835
+ let { runEl: t, statusEl: n, orientation: r } = e, i = K(!1), a = Le({
836
+ response: d.response,
837
+ dampingFraction: d.dampingFraction
609
838
  });
610
- function a() {
839
+ function o() {
611
840
  return r.value === "vertical";
612
841
  }
613
- function o(e) {
614
- return a() ? e.scrollTop : e.scrollLeft;
842
+ function s(e) {
843
+ return o() ? e.scrollTop : e.scrollLeft;
615
844
  }
616
- function s(e, t) {
617
- a() ? e.scrollTop = t : e.scrollLeft = t;
845
+ function c(e, t) {
846
+ o() ? e.scrollTop = t : e.scrollLeft = t;
618
847
  }
619
- function c(e) {
620
- return a() ? e.scrollHeight - e.clientHeight : e.scrollWidth - e.clientWidth;
621
- }
622
- function l(e, t) {
623
- let n = Ve(e), r = n.indexOf(t);
624
- if (r < 0) return o(e);
625
- let i = Be(e, "--dock-pitch");
626
- if (i <= 0) return o(e);
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;
628
- return Math.min(Math.max(u, 0), c(e));
848
+ function l(e) {
849
+ return o() ? e.scrollHeight - e.clientHeight : e.scrollWidth - e.clientWidth;
629
850
  }
630
851
  function u(e, t) {
852
+ let n = Ye(e), r = n.indexOf(t);
853
+ if (r < 0) return s(e);
854
+ let i = Je(e, "--dock-pitch");
855
+ if (i <= 0) return s(e);
856
+ let a = Math.max(1, Je(e, "--dock-open-pitches")), o = Xe(n), c = o >= 0 && o < r ? (a - 1) * i : 0, u = r * i + c - i / 2;
857
+ return Math.min(Math.max(u, 0), l(e));
858
+ }
859
+ function f(e, t) {
631
860
  let n = e.getBoundingClientRect(), r = t.getBoundingClientRect();
632
- return a() ? r.top < n.top - 1 || r.bottom > n.bottom + 1 : r.left < n.left - 1 || r.right > n.right + 1;
861
+ return o() ? r.top < n.top - 1 || r.bottom > n.bottom + 1 : r.left < n.left - 1 || r.right > n.right + 1;
633
862
  }
634
- function d(e) {
863
+ function p(e) {
635
864
  let t = n.value;
636
865
  if (!t) return;
637
- let r = We(e) ? e : e.querySelector(S) ?? e, i = r.getAttribute("aria-label") ?? r.getAttribute("title") ?? r.textContent?.trim();
866
+ let r = Ze(e) ? e : e.querySelector(C) ?? e, i = r.getAttribute("aria-label") ?? r.getAttribute("title") ?? r.textContent?.trim();
638
867
  i && (t.textContent = i);
639
868
  }
640
- function f(e) {
869
+ function m(e) {
641
870
  let n = t.value;
642
- if (!n || (d(e), !u(n, e))) return;
643
- let r = o(n), a = l(n, e);
644
- Math.abs(a - r) < 1 || i.playTo(0, 1, { onFrame: (e) => {
871
+ if (!n || (p(e), !f(n, e))) return;
872
+ let r = s(n), i = u(n, e);
873
+ Math.abs(i - r) < 1 || a.playTo(0, 1, { onFrame: (e) => {
645
874
  let n = t.value;
646
- n && s(n, r + (a - r) * e);
875
+ n && c(n, r + (i - r) * e);
647
876
  } });
648
877
  }
649
- function p() {
878
+ let h = /* @__PURE__ */ new WeakMap();
879
+ function g(e, t) {
880
+ h.has(e) || h.set(e, e.getAttribute("tabindex")), e.tabIndex = t;
881
+ }
882
+ function _(e) {
883
+ if (!h.has(e)) return;
884
+ let t = h.get(e) ?? null;
885
+ h.delete(e), t === null ? e.removeAttribute("tabindex") : e.setAttribute("tabindex", t);
886
+ }
887
+ function v() {
650
888
  let e = t.value;
651
889
  if (!e) return;
652
- let n = Ge(e);
890
+ i.value = tt(e);
891
+ for (let t of Ye(e)) Ze(t) || _(t);
892
+ let n = Qe(e);
653
893
  if (n.length === 0) return;
654
- let r = He(n), i = n.findIndex((e) => e.contains(document.activeElement)), a = i >= 0 ? i : r >= 0 ? r : 0;
894
+ let r = Xe(n), a = n.findIndex((e) => e.contains(document.activeElement)), o = a >= 0 ? a : r >= 0 ? r : 0;
655
895
  n.forEach((e, t) => {
656
- e.tabIndex = t === a ? 0 : -1;
896
+ g(e, t === o ? 0 : -1);
657
897
  });
658
898
  }
659
- function m(e, t) {
899
+ function b(e, t) {
660
900
  let n = e[t];
661
- n && (f(n), n.tabIndex = 0, n.focus({ preventScroll: !0 }), p());
901
+ n && (m(n), g(n, 0), n.focus({ preventScroll: !0 }), v());
662
902
  }
663
- function h(e) {
903
+ function x(e) {
664
904
  let n = t.value;
665
905
  if (!n) return;
666
- let r = Ge(n);
906
+ let r = Qe(n);
667
907
  if (r.length === 0) return;
668
908
  let i = r.findIndex((t) => t.contains(e.target));
669
909
  if (i < 0) return;
670
- let [o, s] = a() ? ["ArrowUp", "ArrowDown"] : ["ArrowLeft", "ArrowRight"], c;
910
+ let [a, s] = o() ? ["ArrowUp", "ArrowDown"] : ["ArrowLeft", "ArrowRight"], c;
671
911
  switch (e.key) {
672
- case o:
912
+ case a:
673
913
  c = i - 1;
674
914
  break;
675
915
  case s:
@@ -683,41 +923,55 @@ function Ke(e) {
683
923
  break;
684
924
  default: return;
685
925
  }
686
- c < 0 || c >= r.length || (e.preventDefault(), m(r, c));
926
+ c < 0 || c >= r.length || (e.preventDefault(), b(r, c));
687
927
  }
688
- function g(e) {
928
+ function S(e) {
689
929
  let n = t.value;
690
930
  if (!n) return;
691
- let r = Ve(n).find((t) => t.contains(e.target));
692
- r && f(r);
931
+ let r = Ye(n).find((t) => t.contains(e.target));
932
+ r && m(r);
693
933
  }
694
- let _ = null;
695
- return U(() => {
934
+ let w = null;
935
+ function T(e, t) {
936
+ if (t.type !== "attributes" || t.attributeName === "aria-current" || t.attributeName === "data-glass-dock-seat") return !0;
937
+ let n = t.target;
938
+ return n.parentElement === e && !Ze(n);
939
+ }
940
+ return H(() => {
696
941
  let e = t.value;
697
- e && (e.addEventListener("keydown", h), e.addEventListener("click", g, { capture: !0 }), e.addEventListener("focusin", g, { capture: !0 }), p(), _ = new MutationObserver(() => p()), _.observe(e, {
942
+ e && (e.addEventListener("keydown", x), e.addEventListener("click", S, { capture: !0 }), e.addEventListener("focusin", S, { capture: !0 }), v(), w = new MutationObserver((t) => {
943
+ t.some((t) => T(e, t)) && v();
944
+ }), w.observe(e, {
698
945
  childList: !0,
699
946
  subtree: !0,
700
947
  attributes: !0,
701
- attributeFilter: ["aria-current"]
948
+ attributeFilter: [
949
+ "aria-current",
950
+ y,
951
+ "aria-hidden",
952
+ "tabindex"
953
+ ]
702
954
  }));
703
- }), ee(() => {
955
+ }), re(() => {
704
956
  let e = t.value;
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
957
+ e?.removeEventListener("keydown", x), e?.removeEventListener("click", S, { capture: !0 }), e?.removeEventListener("focusin", S, { capture: !0 }), w?.disconnect(), a.dispose();
958
+ }), X(r, () => v()), {
959
+ reach: m,
960
+ syncRoving: v,
961
+ toolbar: i
709
962
  };
710
963
  }
711
964
  //#endregion
712
965
  //#region src/components/dock/GlassDock.vue?vue&type=script&setup=true&lang.ts
713
- var qe = ["data-backdrop-mode", "data-held"], Je = ["data-held"], Ye = { class: "dock-controls" }, Xe = {
966
+ var rt = ["data-backdrop-mode", "data-held"], it = ["data-held"], at = { class: "dock-controls" }, ot = {
714
967
  key: 0,
715
968
  class: "dock-persistent"
716
- }, Ze = [
969
+ }, st = [
717
970
  "id",
971
+ "role",
718
972
  "aria-orientation",
719
973
  "inert"
720
- ], Qe = [
974
+ ], ct = [
721
975
  "id",
722
976
  "inert",
723
977
  "role",
@@ -725,13 +979,13 @@ var qe = ["data-backdrop-mode", "data-held"], Je = ["data-held"], Ye = { class:
725
979
  "aria-label",
726
980
  "aria-expanded",
727
981
  "aria-controls"
728
- ], $e = {
982
+ ], lt = {
729
983
  key: 0,
730
984
  class: "dock-search-field"
731
- }, et = {
985
+ }, ut = {
732
986
  key: 1,
733
987
  class: "dock-persistent dock-persistent-end"
734
- }, tt = /* @__PURE__ */ I({
988
+ }, dt = /* @__PURE__ */ I({
735
989
  inheritAttrs: !1,
736
990
  __name: "GlassDock",
737
991
  props: {
@@ -746,123 +1000,123 @@ var qe = ["data-backdrop-mode", "data-held"], Je = ["data-held"], Ye = { class:
746
1000
  backgroundCanvas: {}
747
1001
  },
748
1002
  setup(e, { expose: t }) {
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,
1003
+ let n = e, { startCollapsed: r, shape: i, orientation: a, alwaysExpanded: o, fitContent: s } = Ke(n), c = Y("dockEl"), u = Y("layersEl"), d = Y("fullEl"), m = Y("summaryEl"), h = Y("statusEl"), { toolbar: g } = nt({
1004
+ runEl: d,
752
1005
  statusEl: h,
753
1006
  orientation: a
754
- }), n.backdropMode === "live" && Me(c, { backgroundCanvas: () => {
1007
+ });
1008
+ n.backdropMode === "live" && Fe(c, { backgroundCanvas: () => {
755
1009
  let e = n.backgroundCanvas;
756
1010
  return typeof e == "function" ? e() : e instanceof HTMLCanvasElement ? e : null;
757
1011
  } });
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({
1012
+ let _ = K(!1), v = `glass-dock-${se()}`, { expanded: y, isPinned: b, isHeld: x, graspHeld: S, onMouseEnter: w, onMouseLeave: T, onFocusIn: E, onFocusOut: D, onClickCollapsed: O, keepOpen: k, release: j, expand: I, collapse: te } = Ie({
759
1013
  rootEl: c,
760
1014
  alwaysExpanded: o,
761
1015
  initialExpanded: !r.value,
762
- isTransitioning: g,
763
- dockId: _
764
- }), V = A(() => o.value || v.value);
1016
+ isTransitioning: _,
1017
+ dockId: v
1018
+ }), L = A(() => o.value || y.value);
765
1019
  l({
766
- id: _,
1020
+ id: v,
767
1021
  orientation: a,
768
- keepOpen: O,
1022
+ keepOpen: k,
769
1023
  release: j,
770
- held: x,
771
- expanded: V
772
- }), Le({
1024
+ held: S,
1025
+ expanded: L
1026
+ });
1027
+ let ne = Ge({
773
1028
  rootEl: c,
774
1029
  contentEl: u,
775
- expandedEl: p,
1030
+ expandedEl: d,
776
1031
  collapsedEl: m,
777
- axis: a,
778
- expanded: V
779
- });
780
- let { outerCurrentLayer: H, outerLeavingLayer: U } = Fe({
1032
+ axis: a
1033
+ }), { outerCurrentLayer: V, outerLeavingLayer: H } = Re({
781
1034
  rootEl: c,
782
- outerActiveLayer: A(() => V.value ? "full" : "summary"),
1035
+ outerActiveLayer: A(() => L.value ? "full" : "summary"),
783
1036
  onMorphActiveChange: (e) => {
784
- g.value = e;
785
- }
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 }));
1037
+ _.value = e;
1038
+ },
1039
+ geometry: ne
1040
+ }), U = A(() => V.value === "summary");
1041
+ async function re(e) {
1042
+ !U.value || !["Enter", " "].includes(e.key) || (e.preventDefault(), O(), await z(), (d.value?.querySelector(C) ?? d.value)?.focus({ preventScroll: !0 }));
789
1043
  }
790
- function K(e) {
1044
+ function G(e) {
791
1045
  if (e.key !== "Escape") return;
792
- let t = e.target?.closest?.(d);
793
- t && p.value?.contains(t) || L();
1046
+ let t = e.target?.closest?.(f);
1047
+ t && d.value?.contains(t) || te();
794
1048
  }
795
- Z(V, async (e, t) => {
1049
+ X(L, async (e, t) => {
796
1050
  if (!t || e) return;
797
1051
  let n = document.activeElement;
798
- if (!(n && p.value?.contains(n) || n?.closest("[data-glass-dock-face]")?.getAttribute("data-glass-dock-owner") === _)) return;
1052
+ if (!(n && d.value?.contains(n) || n?.closest("[data-glass-dock-face]")?.getAttribute("data-glass-dock-owner") === v)) return;
799
1053
  await z();
800
1054
  let r = m.value;
801
1055
  r && !r.hasAttribute("inert") && r.focus({ preventScroll: !0 });
802
1056
  });
803
- let { onPointerDownCapture: te, onPointerCancelCapture: ne, onClickCapture: re, markExpandFlip: ae, pressKeepaliveLayer: $ } = ze({
1057
+ let { onPointerDownCapture: ie, onPointerCancelCapture: ae, onClickCapture: oe, markExpandFlip: ce, pressKeepaliveLayer: Q } = qe({
804
1058
  rootEl: c,
805
- visualExpanded: V
1059
+ visualExpanded: L
806
1060
  });
807
- Z(V, (e) => {
808
- e && ae();
1061
+ X(L, (e) => {
1062
+ e && ce();
809
1063
  });
810
- let se = q(!1);
811
- Z(x, (e) => {
812
- e && (se.value = !0);
1064
+ let ue = K(!1);
1065
+ X(S, (e) => {
1066
+ e && (ue.value = !0);
813
1067
  });
814
- function ce(e) {
815
- e.propertyName === "opacity" && !x.value && (se.value = !1);
1068
+ function de(e) {
1069
+ e.propertyName === "opacity" && !S.value && (ue.value = !1);
816
1070
  }
817
1071
  return t({
818
- expanded: v,
819
- isPinned: y,
820
- isHeld: b,
821
- graspHeld: x,
822
- isTransitioning: g,
1072
+ expanded: y,
1073
+ isPinned: b,
1074
+ isHeld: x,
1075
+ graspHeld: S,
1076
+ isTransitioning: _,
823
1077
  expand: I,
824
- collapse: L,
825
- keepOpen: O,
1078
+ collapse: te,
1079
+ keepOpen: k,
826
1080
  release: j
827
- }), (e, t) => (G(), N("div", R({
1081
+ }), (e, t) => (W(), N("div", R({
828
1082
  ref_key: "dockEl",
829
1083
  ref: c
830
1084
  }, e.$attrs, {
831
1085
  class: ["glass-dock", [
832
- Y(a),
833
- `shape-${Y(i)}`,
1086
+ J(a),
1087
+ `shape-${J(i)}`,
834
1088
  {
835
- expanded: V.value,
836
- collapsed: !V.value,
837
- pinned: Y(y),
838
- "fit-content": Y(s),
839
- "always-expanded": Y(o)
1089
+ expanded: L.value,
1090
+ collapsed: !L.value,
1091
+ pinned: J(b),
1092
+ "fit-content": J(s),
1093
+ "always-expanded": J(o)
840
1094
  }
841
1095
  ]],
842
1096
  "data-backdrop-mode": n.backdropMode,
843
- "data-held": Y(x) || void 0,
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)
1097
+ "data-held": J(S) || void 0,
1098
+ onMouseenter: t[2] ||= (...e) => J(w) && J(w)(...e),
1099
+ onMouseleave: t[3] ||= (e) => J(T)(e),
1100
+ onFocusin: t[4] ||= (...e) => J(E) && J(E)(...e),
1101
+ onFocusout: t[5] ||= (...e) => J(D) && J(D)(...e),
1102
+ onPointerdownCapture: t[6] ||= (...e) => J(ie) && J(ie)(...e),
1103
+ onPointercancelCapture: t[7] ||= (...e) => J(ae) && J(ae)(...e),
1104
+ onClickCapture: t[8] ||= (...e) => J(oe) && J(oe)(...e)
851
1105
  }), [
852
1106
  P("div", {
853
1107
  class: "dock-plate",
854
1108
  "aria-hidden": "true",
855
- "data-held": Y(x) || void 0
856
- }, [se.value ? (G(), N(k, { key: 0 }, [t[9] ||= P("span", {
1109
+ "data-held": J(S) || void 0
1110
+ }, [ue.value ? (W(), N(ee, { key: 0 }, [t[9] ||= P("span", {
857
1111
  class: "glass-grasp-carrier",
858
1112
  "data-grasp": "rest"
859
1113
  }, null, -1), P("span", {
860
1114
  class: "glass-grasp-carrier",
861
1115
  "data-grasp": "grasp",
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),
1116
+ onTransitionend: de
1117
+ }, null, 32)], 64)) : M("", !0)], 8, it),
1118
+ P("div", at, [
1119
+ e.$slots.persistent ? (W(), N("div", ot, [q(e.$slots, "persistent")])) : M("", !0),
866
1120
  P("div", {
867
1121
  ref_key: "layersEl",
868
1122
  ref: u,
@@ -870,43 +1124,43 @@ var qe = ["data-backdrop-mode", "data-held"], Je = ["data-held"], Ye = { class:
870
1124
  }, [
871
1125
  P("div", {
872
1126
  ref_key: "fullEl",
873
- ref: p,
874
- id: `${_}-full`,
875
- role: "toolbar",
876
- "aria-orientation": Y(a),
1127
+ ref: d,
1128
+ id: `${v}-full`,
1129
+ role: J(g) ? "toolbar" : void 0,
1130
+ "aria-orientation": J(g) ? J(a) : void 0,
877
1131
  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"
1132
+ "is-active": J(V) === "full",
1133
+ "is-leaving": J(H) === "full" || J(Q) === "full" && J(V) !== "full",
1134
+ "is-press-keepalive": J(Q) === "full"
881
1135
  }]),
882
- inert: Y(H) !== "full" && Y($) !== "full" || void 0,
1136
+ inert: J(V) !== "full" && J(Q) !== "full" || void 0,
883
1137
  tabindex: "-1",
884
- onKeydown: K
885
- }, [F(Y(f), null, {
886
- default: Q(() => [J(e.$slots, "default")]),
1138
+ onKeydown: G
1139
+ }, [F(J(p), null, {
1140
+ default: Z(() => [q(e.$slots, "default")]),
887
1141
  _: 3
888
- })], 42, Ze),
1142
+ })], 42, st),
889
1143
  P("div", {
890
1144
  ref_key: "summaryEl",
891
1145
  ref: m,
892
- id: `${_}-summary`,
1146
+ id: `${v}-summary`,
893
1147
  class: B(["dock-layer dock-layer--summary", {
894
- "is-active": Y(H) === "summary",
895
- "is-leaving": Y(U) === "summary"
1148
+ "is-active": J(V) === "summary",
1149
+ "is-leaving": J(H) === "summary"
896
1150
  }]),
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)
1151
+ inert: J(V) !== "summary" || void 0,
1152
+ role: U.value ? "button" : void 0,
1153
+ tabindex: U.value ? 0 : void 0,
1154
+ "aria-label": U.value ? "Expand dock" : void 0,
1155
+ "aria-expanded": U.value ? "false" : void 0,
1156
+ "aria-controls": U.value ? `${v}-full` : void 0,
1157
+ onFocusin: t[0] ||= le(() => {}, ["stop"]),
1158
+ onKeydown: re,
1159
+ onClick: t[1] ||= (...e) => J(O) && J(O)(...e)
1160
+ }, [q(e.$slots, "collapsed")], 42, ct),
1161
+ e.$slots.search ? (W(), N("div", lt, [q(e.$slots, "search")])) : M("", !0)
908
1162
  ], 512),
909
- e.$slots["persistent-end"] ? (G(), N("div", et, [J(e.$slots, "persistent-end")])) : M("", !0)
1163
+ e.$slots["persistent-end"] ? (W(), N("div", ut, [q(e.$slots, "persistent-end")])) : M("", !0)
910
1164
  ]),
911
1165
  P("div", {
912
1166
  ref_key: "statusEl",
@@ -915,47 +1169,47 @@ var qe = ["data-backdrop-mode", "data-held"], Je = ["data-held"], Ye = { class:
915
1169
  role: "status",
916
1170
  "aria-live": "polite"
917
1171
  }, null, 512)
918
- ], 16, qe));
1172
+ ], 16, rt));
919
1173
  }
920
- }), nt = c("glass-ui:dock-switcher-tablist"), { KEY: rt } = nt;
921
- function it(e) {
922
- nt.provide(e);
1174
+ }), ft = c("glass-ui:dock-switcher-tablist"), { KEY: pt } = ft;
1175
+ function mt(e) {
1176
+ ft.provide(e);
923
1177
  }
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);
1178
+ var ht = ft.use, gt = s(m, "[glass-ui:dock] <DockLayer> must be used inside <DockCrossfade> (or <DockLayerGroup>)"), { KEY: _t } = gt;
1179
+ function vt(e) {
1180
+ gt.provide(e);
927
1181
  }
928
- var lt = ot.use, ut = /* @__PURE__ */ I({
1182
+ var yt = gt.use, bt = /* @__PURE__ */ I({
929
1183
  __name: "DockCrossfade",
930
1184
  props: {
931
1185
  active: {},
932
1186
  reserve: { default: "block" }
933
1187
  },
934
1188
  setup(e, { expose: t }) {
935
- let n = e, r = q(null), i = q(/* @__PURE__ */ new Map()), a = A(() => [...i.value.values()].map(({ id: e, label: t, icon: n }) => ({
1189
+ let n = e, r = K(null), i = K(/* @__PURE__ */ new Map()), a = A(() => [...i.value.values()].map(({ id: e, label: t, icon: n }) => ({
936
1190
  id: e,
937
1191
  label: t,
938
1192
  icon: n
939
1193
  })));
940
1194
  function o(e) {
941
1195
  let t = new Map(i.value);
942
- t.set(e.id, e), i.value = t, f();
1196
+ t.set(e.id, e), i.value = t, p();
943
1197
  }
944
1198
  function s(e) {
945
1199
  if (!i.value.has(e)) return;
946
1200
  let t = new Map(i.value);
947
- t.delete(e), i.value = t, f();
1201
+ t.delete(e), i.value = t, p();
948
1202
  }
949
- let c = A(() => n.active), l = q(null);
950
- ct({
1203
+ let c = A(() => n.active), l = K(null);
1204
+ vt({
951
1205
  register: o,
952
1206
  unregister: s,
953
1207
  activeId: c,
954
1208
  leavingId: l,
955
1209
  faces: a
956
1210
  });
957
- let u = q(0), d = A(() => n.reserve === "inline" ? "min-inline-size" : "min-block-size");
958
- function f() {
1211
+ let u = K(0), f = A(() => n.reserve === "inline" ? "min-inline-size" : "min-block-size");
1212
+ function p() {
959
1213
  let e = 0;
960
1214
  for (let { el: t } of i.value.values()) {
961
1215
  let r = n.reserve === "inline" ? t.scrollWidth : t.scrollHeight;
@@ -963,77 +1217,77 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
963
1217
  }
964
1218
  e > u.value && (u.value = e);
965
1219
  }
966
- let p = A(() => u.value > 0 ? {
967
- [d.value]: `${u.value}px`,
1220
+ let m = A(() => u.value > 0 ? {
1221
+ [f.value]: `${u.value}px`,
968
1222
  "--dock-crossfade-peak": `${u.value}px`
969
1223
  } : void 0);
970
- y(r, () => f());
971
- let m = Pe({
972
- response: v.response,
973
- dampingFraction: v.dampingFraction
1224
+ b(r, () => p());
1225
+ let h = Le({
1226
+ response: d.response,
1227
+ dampingFraction: d.dampingFraction
974
1228
  });
975
- function h(e) {
1229
+ function g(e) {
976
1230
  return e ? i.value.get(e)?.el : void 0;
977
1231
  }
978
- function g(e, t) {
979
- h(e)?.style.setProperty("--dock-t", `${t}`);
1232
+ function _(e, t) {
1233
+ g(e)?.style.setProperty("--dock-t", `${t}`);
980
1234
  }
981
- function _(e) {
982
- h(e)?.style.removeProperty("--dock-t");
1235
+ function v(e) {
1236
+ g(e)?.style.removeProperty("--dock-t");
983
1237
  }
984
- function b(e) {
1238
+ function y(e) {
985
1239
  return e < 0 ? 0 : e > 1 ? 1 : e;
986
1240
  }
987
- let x = he("(prefers-reduced-motion: reduce)"), S = null, C = 1;
988
- Z(x, (e) => {
989
- e && (m.dispose(), S?.());
1241
+ let x = ve("(prefers-reduced-motion: reduce)"), S = null, C = 1;
1242
+ X(x, (e) => {
1243
+ e && (h.dispose(), S?.());
990
1244
  });
991
1245
  async function w(e, t) {
992
1246
  if (typeof document > "u") return;
993
- let n = h(e), r = document.activeElement;
994
- !n || !r || !n.contains(r) || (await z(), (h(t) ?? document.body).focus?.());
1247
+ let n = g(e), r = document.activeElement;
1248
+ !n || !r || !n.contains(r) || (await z(), (g(t) ?? document.body).focus?.());
995
1249
  }
996
- return Z(c, (e, t) => {
1250
+ return X(c, (e, t) => {
997
1251
  if (e === t) return;
998
- f();
999
- let n = h(e), i = h(t);
1252
+ p();
1253
+ let n = g(e), i = g(t);
1000
1254
  if (!n || !i) {
1001
- l.value = null, _(e), C = 1;
1255
+ l.value = null, v(e), C = 1;
1002
1256
  return;
1003
1257
  }
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;
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", "");
1258
+ 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 - y(o) : 0, u = Number.isFinite(s) ? y(s) : 1;
1259
+ a && a !== e && a !== t && v(a), l.value = t, _(e, c), _(t, 1 - u), w(t, e), r.value?.setAttribute("data-crossfading", "");
1006
1260
  let d = () => {
1007
- _(e), _(t), r.value?.removeAttribute("data-crossfading"), l.value = null, C = 1, S === d && (S = null);
1261
+ v(e), v(t), r.value?.removeAttribute("data-crossfading"), l.value = null, C = 1, S === d && (S = null);
1008
1262
  };
1009
1263
  if (S = d, x.value) {
1010
1264
  d();
1011
1265
  return;
1012
1266
  }
1013
- let p = u > .001 ? -C / u : 0;
1014
- C = 1 - c, m.playTo(0, 1, {
1015
- inheritVelocityScale: p,
1267
+ let f = u > .001 ? -C / u : 0;
1268
+ C = 1 - c, h.playTo(0, 1, {
1269
+ inheritVelocityScale: f,
1016
1270
  onFrame: (n) => {
1017
- g(e, b(c + (1 - c) * n)), g(t, b(1 - u * (1 - n)));
1271
+ _(e, y(c + (1 - c) * n)), _(t, y(1 - u * (1 - n)));
1018
1272
  },
1019
1273
  onSettle: d
1020
1274
  });
1021
- }), H(() => {
1022
- m.dispose(), S = null;
1023
- }), t({ faces: a }), (e, t) => (G(), N("div", {
1275
+ }), V(() => {
1276
+ h.dispose(), S = null;
1277
+ }), t({ faces: a }), (e, t) => (W(), N("div", {
1024
1278
  ref_key: "rootEl",
1025
1279
  ref: r,
1026
1280
  class: "dock-crossfade",
1027
- style: V(p.value)
1028
- }, [J(e.$slots, "default")], 4));
1281
+ style: ne(m.value)
1282
+ }, [q(e.$slots, "default")], 4));
1029
1283
  }
1030
- }), dt = ["data-motion"], ft = ["aria-orientation"], pt = [
1284
+ }), xt = ["data-motion"], St = ["aria-orientation"], Ct = [
1031
1285
  "id",
1032
1286
  "tabindex",
1033
1287
  "aria-controls",
1034
1288
  "aria-label",
1035
1289
  "onClick"
1036
- ], mt = { key: 1 }, ht = { key: 2 }, gt = /* @__PURE__ */ I({
1290
+ ], wt = { key: 1 }, Tt = { key: 2 }, Et = /* @__PURE__ */ I({
1037
1291
  __name: "DockLayerGroup",
1038
1292
  props: /*@__PURE__*/ L({
1039
1293
  orientation: {},
@@ -1049,7 +1303,7 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1049
1303
  }),
1050
1304
  emits: ["update:active"],
1051
1305
  setup(e) {
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({
1306
+ let t = e, n = o(() => t.motion), r = ce(e, "active"), i = v(), a = A(() => t.orientation ?? i?.orientation.value ?? "horizontal"), s = Y("crossfade"), c = A(() => s.value?.faces ?? []), l = A(() => a.value === "vertical" ? "horizontal" : "vertical"), u = A(() => l.value === "vertical"), d = K(null), f = K(null), p = K([]), m = T({
1053
1307
  options: A(() => c.value.map((e) => ({ value: e.id }))),
1054
1308
  model: r,
1055
1309
  mode: "single",
@@ -1058,8 +1312,8 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1058
1312
  containerRef: d,
1059
1313
  indicatorRef: f,
1060
1314
  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({
1315
+ }), g = A(() => t.showSwitcher && c.value.length > 1), _ = se(), y = (e) => e.replace(/[^a-zA-Z0-9_-]/g, ""), b = (e) => `dock-tab-${_}-${y(e)}`, x = (e) => `dock-panel-${_}-${y(e)}`;
1316
+ mt({
1063
1317
  isTablist: g,
1064
1318
  tabId: b,
1065
1319
  panelId: x
@@ -1077,7 +1331,7 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1077
1331
  };
1078
1332
  });
1079
1333
  }
1080
- let E = T({
1334
+ let w = E({
1081
1335
  handle: d,
1082
1336
  surface: f,
1083
1337
  axis: () => S.value,
@@ -1086,41 +1340,41 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1086
1340
  n.armed.value && r.value !== e && (r.value = e);
1087
1341
  }
1088
1342
  });
1089
- Z(() => [
1343
+ X(() => [
1090
1344
  c.value.length,
1091
1345
  l.value,
1092
1346
  n.armed.value
1093
1347
  ], () => {
1094
- n.armed.value && z(() => E.refresh());
1095
- }), U(() => {
1096
- n.armed.value && z(() => E.refresh());
1348
+ n.armed.value && z(() => w.refresh());
1349
+ }), H(() => {
1350
+ n.armed.value && z(() => w.refresh());
1097
1351
  });
1098
1352
  function D(e) {
1099
1353
  return typeof e == "object" && !!e || typeof e == "function";
1100
1354
  }
1101
- let O = m(() => i);
1102
- function I() {
1355
+ let O = h(() => i);
1356
+ function k() {
1103
1357
  O.acquire();
1104
1358
  }
1105
- function L(e) {
1359
+ function I(e) {
1106
1360
  let t = e.relatedTarget, n = e.currentTarget;
1107
1361
  t && n?.contains(t) || O.release();
1108
1362
  }
1109
- return (t, i) => (G(), N("div", {
1363
+ return (t, i) => (W(), N("div", {
1110
1364
  class: B(["dock-layer-group", [a.value, `switcher-${e.switcherPosition}`]]),
1111
- "data-motion": Y(n).dataMotion.value,
1112
- style: V(Y(n).hostStyle.value)
1113
- }, [g.value ? (G(), N("div", {
1365
+ "data-motion": J(n).dataMotion.value,
1366
+ style: ne(J(n).hostStyle.value)
1367
+ }, [g.value ? (W(), N("div", {
1114
1368
  key: 0,
1115
1369
  ref_key: "switcherListEl",
1116
1370
  ref: d,
1117
1371
  role: "tablist",
1118
- class: B(["dock-layer-switcher", [e.switcherPosition, Y(n).armed.value && "glass-drag-grabbable"]]),
1372
+ class: B(["dock-layer-switcher", [e.switcherPosition, J(n).armed.value && "glass-drag-grabbable"]]),
1119
1373
  "aria-orientation": l.value,
1120
- onKeydown: i[0] ||= (...e) => Y(h).onKeydown && Y(h).onKeydown(...e),
1121
- onFocusin: I,
1122
- onFocusout: L
1123
- }, [(G(!0), N(k, null, te(c.value, (e, t) => (G(), N("button", R({
1374
+ onKeydown: i[0] ||= (...e) => J(m).onKeydown && J(m).onKeydown(...e),
1375
+ onFocusin: k,
1376
+ onFocusout: I
1377
+ }, [(W(!0), N(ee, null, ie(c.value, (e, t) => (W(), N("button", R({
1124
1378
  key: e.id,
1125
1379
  ref_for: !0,
1126
1380
  ref: (e) => {
@@ -1129,37 +1383,37 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1129
1383
  type: "button",
1130
1384
  class: "dock-layer-tab",
1131
1385
  id: b(e.id),
1132
- tabindex: Y(h).rovingTabindex(t)
1133
- }, { ref_for: !0 }, Y(h).itemAttrs(e.id), {
1386
+ tabindex: J(m).rovingTabindex(t)
1387
+ }, { ref_for: !0 }, J(m).itemAttrs(e.id), {
1134
1388
  "aria-controls": x(e.id),
1135
1389
  "aria-label": e.label ?? e.id,
1136
- onClick: (n) => Y(h).select(e.id, t)
1137
- }), [D(e.icon) ? (G(), j(ne(e.icon), {
1390
+ onClick: (n) => J(m).select(e.id, t)
1391
+ }), [D(e.icon) ? (W(), j(ae(e.icon), {
1138
1392
  key: 0,
1139
1393
  class: "size-4"
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", {
1394
+ })) : typeof e.icon == "string" ? (W(), N("span", wt, oe(e.icon), 1)) : (W(), N("span", Tt, oe((e.label ?? e.id).charAt(0)), 1))], 16, Ct))), 128)), P("div", {
1141
1395
  ref_key: "switcherIndicatorEl",
1142
1396
  ref: f,
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),
1397
+ class: B(["dock-layer-tab-indicator", J(n).armed.value && J(w).dragging.value && "glass-drag-lift"]),
1398
+ style: ne(J(m).singleSliderStyle.value),
1145
1399
  "aria-hidden": "true"
1146
- }, null, 6)], 42, ft)) : M("", !0), F(ut, {
1400
+ }, null, 6)], 42, St)) : M("", !0), F(bt, {
1147
1401
  ref_key: "crossfade",
1148
1402
  ref: s,
1149
1403
  active: r.value
1150
1404
  }, {
1151
- default: Q(() => [J(t.$slots, "default")]),
1405
+ default: Z(() => [q(t.$slots, "default")]),
1152
1406
  _: 3
1153
- }, 8, ["active"])], 14, dt));
1407
+ }, 8, ["active"])], 14, xt));
1154
1408
  }
1155
- }), _t = [
1409
+ }), Dt = [
1156
1410
  "role",
1157
1411
  "id",
1158
1412
  "aria-labelledby",
1159
1413
  "inert",
1160
1414
  "aria-hidden",
1161
1415
  "tabindex"
1162
- ], vt = { class: "dock-face-content" }, yt = /* @__PURE__ */ I({
1416
+ ], Ot = { class: "dock-face-content" }, kt = /* @__PURE__ */ I({
1163
1417
  __name: "DockLayer",
1164
1418
  props: {
1165
1419
  id: {},
@@ -1167,15 +1421,15 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1167
1421
  icon: {}
1168
1422
  },
1169
1423
  setup(e) {
1170
- let t = e, n = lt(), r = X("hostEl");
1171
- U(() => {
1424
+ let t = e, n = yt(), r = Y("hostEl");
1425
+ H(() => {
1172
1426
  r.value && n.register({
1173
1427
  id: t.id,
1174
1428
  label: t.label,
1175
1429
  icon: t.icon,
1176
1430
  el: r.value
1177
1431
  });
1178
- }), Z(() => [
1432
+ }), X(() => [
1179
1433
  t.id,
1180
1434
  t.label,
1181
1435
  t.icon
@@ -1186,9 +1440,9 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1186
1440
  icon: t.icon,
1187
1441
  el: r.value
1188
1442
  });
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", {
1443
+ }), V(() => n.unregister(t.id));
1444
+ let i = A(() => n.activeId.value === t.id), a = A(() => n.leavingId.value === t.id), o = ht(), 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);
1445
+ return (e, t) => (W(), N("div", {
1192
1446
  ref_key: "hostEl",
1193
1447
  ref: r,
1194
1448
  class: B(["dock-face", {
@@ -1201,9 +1455,9 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1201
1455
  inert: !i.value || void 0,
1202
1456
  "aria-hidden": !i.value || void 0,
1203
1457
  tabindex: i.value ? -1 : void 0
1204
- }, [P("div", vt, [J(e.$slots, "default")])], 10, _t));
1458
+ }, [P("div", Ot, [q(e.$slots, "default")])], 10, Dt));
1205
1459
  }
1206
- }), bt = /* @__PURE__ */ I({
1460
+ }), At = /* @__PURE__ */ I({
1207
1461
  __name: "DockControl",
1208
1462
  props: {
1209
1463
  shape: { default: "icon" },
@@ -1235,6 +1489,7 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1235
1489
  },
1236
1490
  setup(t) {
1237
1491
  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(() => ({
1492
+ [y]: "",
1238
1493
  ...r.active === void 0 ? {} : {
1239
1494
  "aria-pressed": String(r.active),
1240
1495
  ...r.active ? { "data-active": "" } : {}
@@ -1252,7 +1507,7 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1252
1507
  function p(e) {
1253
1508
  r.disabled && (e.preventDefault(), e.stopImmediatePropagation());
1254
1509
  }
1255
- return (e, r) => $((G(), j(Y(ce), R({
1510
+ return (e, r) => Q((W(), j(J(de), R({
1256
1511
  as: t.as,
1257
1512
  "as-child": t.asChild
1258
1513
  }, {
@@ -1261,18 +1516,18 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1261
1516
  }, {
1262
1517
  class: s.value,
1263
1518
  style: f.value,
1264
- "data-press-armed": !o.value && Y(d).armed ? "" : void 0,
1265
- onPointerdown: Y(d).handlers.onPointerdown,
1266
- onPointerup: Y(d).handlers.onPointerup,
1267
- onPointercancel: Y(d).handlers.onPointercancel,
1268
- onPointerleave: Y(d).handlers.onPointerleave,
1269
- onPointerenter: Y(d).handlers.onPointerenter,
1270
- onKeydown: Y(d).handlers.onKeydown,
1271
- onKeyup: Y(d).handlers.onKeyup,
1272
- onBlur: Y(d).handlers.onBlur,
1519
+ "data-press-armed": !o.value && J(d).armed ? "" : void 0,
1520
+ onPointerdown: J(d).handlers.onPointerdown,
1521
+ onPointerup: J(d).handlers.onPointerup,
1522
+ onPointercancel: J(d).handlers.onPointercancel,
1523
+ onPointerleave: J(d).handlers.onPointerleave,
1524
+ onPointerenter: J(d).handlers.onPointerenter,
1525
+ onKeydown: J(d).handlers.onKeydown,
1526
+ onKeyup: J(d).handlers.onKeyup,
1527
+ onBlur: J(d).handlers.onBlur,
1273
1528
  onClickCapture: p
1274
1529
  }), {
1275
- default: Q(() => [J(e.$slots, "default")]),
1530
+ default: Z(() => [q(e.$slots, "default")]),
1276
1531
  _: 3
1277
1532
  }, 16, [
1278
1533
  "as",
@@ -1288,9 +1543,9 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1288
1543
  "onKeydown",
1289
1544
  "onKeyup",
1290
1545
  "onBlur"
1291
- ])), [[Y(n)]]);
1546
+ ])), [[J(n)]]);
1292
1547
  }
1293
- }), xt = /* @__PURE__ */ I({
1548
+ }), jt = /* @__PURE__ */ I({
1294
1549
  inheritAttrs: !1,
1295
1550
  __name: "DockTrigger",
1296
1551
  props: {
@@ -1304,28 +1559,69 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1304
1559
  ] }
1305
1560
  },
1306
1561
  setup(t) {
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), {
1311
- class: "dock-select-trigger__chevron",
1312
- "aria-hidden": "true"
1313
- })])]),
1562
+ let r = t, i = { [y]: "" };
1563
+ function a(e) {
1564
+ e.preventDefault(), e.stopImmediatePropagation();
1565
+ }
1566
+ let o = (e, { attrs: t, slots: n }) => {
1567
+ let { disabled: r, ...i } = t, o = r != null && r !== !1;
1568
+ return te("button", {
1569
+ ...i,
1570
+ type: i.type ?? "button",
1571
+ ...o ? {
1572
+ "aria-disabled": "true",
1573
+ onClickCapture: a
1574
+ } : {}
1575
+ }, n.default?.());
1576
+ };
1577
+ o.inheritAttrs = !1;
1578
+ let s = A(() => e("dock-trigger", r.for === "select" && "dock-select-trigger", r.for !== "select" && "dock-dropdown-trigger", r.class));
1579
+ return (e, t) => r.for === "select" ? Q((W(), j(J(pe), R({ key: 0 }, {
1580
+ ...e.$attrs,
1581
+ ...i
1582
+ }, {
1583
+ "as-child": "",
1584
+ class: s.value
1585
+ }), {
1586
+ default: Z(() => [F(o, null, {
1587
+ default: Z(() => [q(e.$slots, "default"), F(J(fe), { "as-child": "" }, {
1588
+ default: Z(() => [q(e.$slots, "icon", {}, () => [F(J(me), {
1589
+ class: "dock-select-trigger__chevron",
1590
+ "aria-hidden": "true"
1591
+ })])]),
1592
+ _: 3
1593
+ })]),
1314
1594
  _: 3
1315
1595
  })]),
1316
1596
  _: 3
1317
- }, 16, ["class"])), [[Y(n)]]) : r.for === "dropdown" ? $((G(), j(C, R({ key: 1 }, e.$attrs, {
1597
+ }, 16, ["class"])), [[J(n)]]) : r.for === "dropdown" ? Q((W(), j(w, R({ key: 1 }, {
1598
+ ...e.$attrs,
1599
+ ...i
1600
+ }, {
1601
+ "as-child": "",
1318
1602
  action: "pointerdown",
1319
- class: i.value
1603
+ class: s.value
1320
1604
  }), {
1321
- default: Q(() => [J(e.$slots, "default")]),
1605
+ default: Z(() => [F(o, null, {
1606
+ default: Z(() => [q(e.$slots, "default")]),
1607
+ _: 3
1608
+ })]),
1322
1609
  _: 3
1323
- }, 16, ["class"])), [[Y(n)]]) : $((G(), j(Y(se), R({ key: 2 }, e.$attrs, { class: i.value }), {
1324
- default: Q(() => [J(e.$slots, "default")]),
1610
+ }, 16, ["class"])), [[J(n)]]) : Q((W(), j(J(ue), R({ key: 2 }, {
1611
+ ...e.$attrs,
1612
+ ...i
1613
+ }, {
1614
+ "as-child": "",
1615
+ class: s.value
1616
+ }), {
1617
+ default: Z(() => [F(o, null, {
1618
+ default: Z(() => [q(e.$slots, "default")]),
1619
+ _: 3
1620
+ })]),
1325
1621
  _: 3
1326
- }, 16, ["class"])), [[Y(n)]]);
1622
+ }, 16, ["class"])), [[J(n)]]);
1327
1623
  }
1328
- }), St = /* @__PURE__ */ I({
1624
+ }), Mt = /* @__PURE__ */ I({
1329
1625
  __name: "DockBackgroundToggle",
1330
1626
  props: {
1331
1627
  paused: {
@@ -1341,18 +1637,18 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1341
1637
  function a() {
1342
1638
  r("update:paused", !n.paused);
1343
1639
  }
1344
- return (t, n) => (G(), j(bt, {
1640
+ return (t, n) => (W(), j(At, {
1345
1641
  type: "button",
1346
1642
  active: e.paused,
1347
1643
  "aria-pressed": e.paused,
1348
1644
  "aria-label": i.value,
1349
1645
  onClick: a
1350
1646
  }, {
1351
- default: Q(() => [e.paused ? (G(), j(Y(pe), {
1647
+ default: Z(() => [e.paused ? (W(), j(J(ge), {
1352
1648
  key: 0,
1353
1649
  size: 18,
1354
1650
  "aria-hidden": "true"
1355
- })) : (G(), j(Y(fe), {
1651
+ })) : (W(), j(J(he), {
1356
1652
  key: 1,
1357
1653
  size: 18,
1358
1654
  "aria-hidden": "true"
@@ -1364,30 +1660,30 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1364
1660
  "aria-label"
1365
1661
  ]));
1366
1662
  }
1367
- }), Ct = [
1663
+ }), Nt = [
1368
1664
  "data-orientation",
1369
1665
  "data-dock-hairline",
1370
1666
  "aria-orientation"
1371
- ], wt = /* @__PURE__ */ I({
1667
+ ], Pt = /* @__PURE__ */ I({
1372
1668
  __name: "DockSeparator",
1373
1669
  props: { anchor: {
1374
1670
  type: Boolean,
1375
1671
  default: !1
1376
1672
  } },
1377
1673
  setup(e) {
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", {
1674
+ let t = v(), n = A(() => t?.orientation.value ?? "horizontal"), r = A(() => n.value), i = A(() => n.value === "vertical" ? "horizontal" : "vertical");
1675
+ return (t, n) => (W(), N("div", {
1380
1676
  class: B(["dock-separator", { "dock-hairline": e.anchor }]),
1381
1677
  role: "separator",
1382
1678
  "data-orientation": r.value,
1383
1679
  "data-dock-hairline": e.anchor || void 0,
1384
1680
  "aria-orientation": i.value
1385
- }, null, 10, Ct));
1681
+ }, null, 10, Nt));
1386
1682
  }
1387
1683
  });
1388
1684
  //#endregion
1389
1685
  //#region src/composables/search/match.ts
1390
- function Tt(e, t) {
1686
+ function Ft(e, t) {
1391
1687
  let n = e.length, r = t.length;
1392
1688
  if (n === 0) return {
1393
1689
  score: 0,
@@ -1411,11 +1707,11 @@ function Tt(e, t) {
1411
1707
  matches: i
1412
1708
  });
1413
1709
  }
1414
- function Et(e, t) {
1710
+ function It(e, t) {
1415
1711
  if (!t) return null;
1416
1712
  let n = 0, r = [];
1417
1713
  for (let i of e) {
1418
- let e = Tt(i, t);
1714
+ let e = Ft(i, t);
1419
1715
  if (!e) return null;
1420
1716
  n += e.score;
1421
1717
  for (let t of e.matches) r.push(t);
@@ -1425,7 +1721,7 @@ function Et(e, t) {
1425
1721
  matches: r
1426
1722
  };
1427
1723
  }
1428
- function Dt(e, t) {
1724
+ function Lt(e, t) {
1429
1725
  let n = null, r = [], i = [
1430
1726
  [t._lc.label, 12],
1431
1727
  [t._lc.type, 10],
@@ -1433,7 +1729,7 @@ function Dt(e, t) {
1433
1729
  ];
1434
1730
  for (let [a, o] of i) {
1435
1731
  if (!a) continue;
1436
- let i = Et(e, a);
1732
+ let i = It(e, a);
1437
1733
  if (!i) continue;
1438
1734
  let s = i.score * o;
1439
1735
  (n === null || s > n) && (n = s, r = a === t._lc.label ? i.matches : []);
@@ -1443,7 +1739,7 @@ function Dt(e, t) {
1443
1739
  matches: r
1444
1740
  };
1445
1741
  }
1446
- function Ot(e) {
1742
+ function Rt(e) {
1447
1743
  return e.map((e) => ({
1448
1744
  item: e,
1449
1745
  _lc: {
@@ -1453,15 +1749,15 @@ function Ot(e) {
1453
1749
  }
1454
1750
  }));
1455
1751
  }
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;
1752
+ var zt = /* @__PURE__ */ new WeakMap();
1753
+ function Bt(e) {
1754
+ let t = zt.get(e);
1755
+ return t || (t = /* @__PURE__ */ new Map(), zt.set(e, t)), t;
1460
1756
  }
1461
- function jt(e, t, n = 30) {
1757
+ function Vt(e, t, n = 30) {
1462
1758
  let r = t.toLowerCase().trim();
1463
1759
  if (!r) return [];
1464
- let i = At(e), a = i.get(r);
1760
+ let i = Bt(e), a = i.get(r);
1465
1761
  if (a) return a.slice(0, n);
1466
1762
  i.size > 200 && i.clear();
1467
1763
  let o = r.split(/\s+/).filter(Boolean);
@@ -1480,7 +1776,7 @@ function jt(e, t, n = 30) {
1480
1776
  }
1481
1777
  let c = [];
1482
1778
  for (let e of s) {
1483
- let t = Dt(o, e);
1779
+ let t = Lt(o, e);
1484
1780
  t && c.push({
1485
1781
  item: e.item,
1486
1782
  score: t.score,
@@ -1489,21 +1785,21 @@ function jt(e, t, n = 30) {
1489
1785
  }
1490
1786
  return c.sort((e, t) => t.score - e.score), i.set(r, c), c.slice(0, n);
1491
1787
  }
1492
- function Mt(e) {
1788
+ function Ht(e) {
1493
1789
  if (e) {
1494
- kt.delete(e);
1790
+ zt.delete(e);
1495
1791
  return;
1496
1792
  }
1497
- kt = /* @__PURE__ */ new WeakMap();
1793
+ zt = /* @__PURE__ */ new WeakMap();
1498
1794
  }
1499
1795
  //#endregion
1500
1796
  //#region src/composables/search/useFuzzySearch.ts
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;
1797
+ function Ut(e) {
1798
+ let t = typeof e.items == "function" ? e.items : () => e.items, n = e.debounceMs ?? 120, r = e.maxResults ?? 30, i = K(""), a = K(!1), o = K(!1), s = K(0), c = K(""), l = A(() => t()), u = A(() => Rt(l.value)), d;
1503
1799
  function f(e = d) {
1504
1800
  e !== void 0 && (clearTimeout(e), d === e && (d = void 0));
1505
1801
  }
1506
- Z(i, (e, t, r) => {
1802
+ X(i, (e, t, r) => {
1507
1803
  if (f(), !e || n <= 0) {
1508
1804
  c.value = e;
1509
1805
  return;
@@ -1512,18 +1808,18 @@ function Nt(e) {
1512
1808
  d === i && (c.value = e, d = void 0);
1513
1809
  }, n);
1514
1810
  d = i, r(() => f(i));
1515
- }), Z(l, () => {
1811
+ }), X(l, () => {
1516
1812
  f(), c.value = i.value, s.value = 0;
1517
1813
  }, { deep: !0 });
1518
- let p = A(() => jt(u.value, c.value, r));
1519
- Z(p, () => {
1814
+ let p = A(() => Vt(u.value, c.value, r));
1815
+ X(p, () => {
1520
1816
  s.value = 0;
1521
1817
  });
1522
1818
  function m(t) {
1523
1819
  e.onSelect?.(t), h();
1524
1820
  }
1525
1821
  function h() {
1526
- a.value = !1, o.value = !1, f(), i.value = "", c.value = "", s.value = 0, Mt(u.value);
1822
+ a.value = !1, o.value = !1, f(), i.value = "", c.value = "", s.value = 0, Ht(u.value);
1527
1823
  }
1528
1824
  function g() {
1529
1825
  a.value = !0;
@@ -1547,8 +1843,8 @@ function Nt(e) {
1547
1843
  break;
1548
1844
  }
1549
1845
  }
1550
- return W(() => {
1551
- f(), Mt(u.value);
1846
+ return U(() => {
1847
+ f(), Ht(u.value);
1552
1848
  }, !0), {
1553
1849
  query: i,
1554
1850
  results: p,
@@ -1564,13 +1860,13 @@ function Nt(e) {
1564
1860
  }
1565
1861
  //#endregion
1566
1862
  //#region src/components/dock/composables/useDockSearch.ts
1567
- function Pt(e) {
1568
- let { dockState: t } = e, n = e.debounceMs ?? 120, r = e.maxResults ?? 30, i = q([]), a = null, o = e.items ? e.items : () => i.value;
1863
+ function Wt(e) {
1864
+ let { dockState: t } = e, n = e.debounceMs ?? 120, r = e.maxResults ?? 30, i = K([]), a = null, o = e.items ? e.items : () => i.value;
1569
1865
  function s(t) {
1570
1866
  let n = t.item.id;
1571
1867
  e.ensureTargetWindow?.(n), e.scrollTo?.(n), e.onResultSelect?.(t);
1572
1868
  }
1573
- let c = Nt({
1869
+ let c = Ut({
1574
1870
  items: o,
1575
1871
  debounceMs: n,
1576
1872
  maxResults: r,
@@ -1578,7 +1874,7 @@ function Pt(e) {
1578
1874
  });
1579
1875
  if (e.onSearch) {
1580
1876
  let t = e.onSearch;
1581
- Z(() => c.query.value, (e) => {
1877
+ X(() => c.query.value, (e) => {
1582
1878
  if (a?.abort(), !e) {
1583
1879
  i.value = [];
1584
1880
  return;
@@ -1603,28 +1899,28 @@ function Pt(e) {
1603
1899
  let e = l.value;
1604
1900
  e && (c.query.value = c.query.value + e);
1605
1901
  }
1606
- let d = m(() => t), f = d.isHeld;
1902
+ let d = h(() => t), f = d.isHeld;
1607
1903
  function p() {
1608
1904
  f.value || (t.expand(), d.acquire(), c.open());
1609
1905
  }
1610
- function h() {
1906
+ function m() {
1611
1907
  f.value && (c.close(), d.release());
1612
1908
  }
1613
1909
  let g = null;
1614
- return e.collapseOnScroll && e.scrollContainer && (g = O(e.scrollContainer, {
1910
+ return e.collapseOnScroll && e.scrollContainer && (g = k(e.scrollContainer, {
1615
1911
  collapseOnScroll: !0,
1616
1912
  chromeRef: e.chromeRef
1617
- })), W(() => {
1913
+ })), U(() => {
1618
1914
  a?.abort(), a = null;
1619
1915
  }), {
1620
1916
  fuzzy: c,
1621
1917
  autocompleteText: l,
1622
1918
  scrollChrome: g,
1623
1919
  armSearch: p,
1624
- disarmSearch: h,
1920
+ disarmSearch: m,
1625
1921
  acceptAutocomplete: u,
1626
1922
  isSearchArmed: f
1627
1923
  };
1628
1924
  }
1629
1925
  //#endregion
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 };
1926
+ export { _ as DOCK_CONTEXT_KEY, Mt as DockBackgroundToggle, At as DockControl, bt as DockCrossfade, kt as DockLayer, Et as DockLayerGroup, Pt as DockSeparator, jt as DockTrigger, dt as GlassDock, l as provideDockContext, g as useDockContext, D as useDockCtaReceive, Wt as useDockSearch, v as useOptionalDockContext };