@mkbabb/glass-ui 10.1.1 → 10.1.2

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.
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 A, computed as j, createBlock as M, createCommentVNode as N, createElementBlock as P, createElementVNode as F, createVNode as I, defineComponent as L, h as ee, mergeModels as R, mergeProps as z, nextTick as B, normalizeClass as V, normalizeStyle as te, onBeforeUnmount as H, onMounted as U, onScopeDispose as W, onUnmounted as ne, openBlock as G, readonly as K, ref as q, renderList as re, renderSlot as J, resolveDynamicComponent as ie, toDisplayString as ae, unref as Y, useId as oe, useModel as se, useTemplateRef as X, watch as Z, withCtx as Q, withDirectives as $, withModifiers as ce } from "vue";
20
+ import { PopoverTrigger as le, Primitive as ue, SelectIcon as de, SelectTrigger as fe } from "reka-ui";
21
+ import { ChevronDown as pe, Pause as me, Play as he } from "@lucide/vue";
22
+ import { SpringProgress as ge } from "@mkbabb/keyframes.js";
23
+ import { useMediaQuery as _e } from "@vueuse/core";
24
24
  //#region src/components/_shared/overlay/isTeleportedTarget.ts
25
- function ge(e, t) {
25
+ function ve(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 ye(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 be(e, t, n) {
37
+ return .2126 * ye(e) + .7152 * ye(t) + .0722 * ye(n);
38
38
  }
39
- function ye(e, t, n, r, i) {
39
+ function xe(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 Se(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 Ce(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 we = "[data-glass-field-canvas] canvas, canvas[data-glass-field-canvas]";
59
+ function Te(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(we);
63
+ if (Ce(e)) return e;
64
64
  }
65
65
  return null;
66
66
  }
67
- if (xe(e)) return e;
67
+ if (Ce(e)) return e;
68
68
  if (typeof e == "function") {
69
69
  let t = e();
70
- return xe(t) ? t : null;
70
+ return Ce(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 Ce(t) ? t : null;
75
75
  }
76
76
  return null;
77
77
  }
78
- function we(e, t) {
79
- let n = be(e);
78
+ function Ee(e, t) {
79
+ let n = Se(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 De(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 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] = xe(e[t], e[t + 1], e[t + 2], n, r);
106
+ i += be(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 Oe(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 = Ee(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 Ee(x(getComputedStyle(document.body).backgroundColor, e), t);
121
121
  }
122
- var De = [
122
+ var ke = [
123
123
  255,
124
124
  255,
125
125
  255
126
126
  ];
127
- function Oe(e, t) {
128
- let n = Ee(e, t);
127
+ function Ae(e, t) {
128
+ let n = Oe(e, t);
129
129
  return n && n[3] >= .5 ? [
130
130
  n[0],
131
131
  n[1],
132
132
  n[2]
133
- ] : [...De];
133
+ ] : [...ke];
134
134
  }
135
- function ke(e, t) {
136
- let n = Ee(e, t);
137
- return n ? Ae(n) : null;
135
+ function je(e, t) {
136
+ let n = Oe(e, t);
137
+ return n ? Me(n) : null;
138
138
  }
139
- function Ae(e) {
140
- return { luma: ve(e[0], e[1], e[2]) };
139
+ function Me(e) {
140
+ return { luma: be(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 Ne = "data-glass-backdrop-shared";
145
+ function Pe(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(`[${Ne}]`) !== null;
149
149
  }
150
150
  let l = q(null), u = q(null), d = q({
151
151
  state: "pending",
@@ -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 || Te(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" ? Te(n.backgroundCanvas) : null, o = i === "live" ? De(t, a, r, Ae(t, r)) : je(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,11 +226,11 @@ 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 = Z(f, D, { flush: "sync" }), A = Z(() => e.value, (e) => {
230
230
  if (e) {
231
- if (s) e.setAttribute(je, "");
231
+ if (s) e.setAttribute(Ne, "");
232
232
  else if (c(e)) return;
233
- C(), O();
233
+ C(), D();
234
234
  }
235
235
  }, {
236
236
  immediate: !0,
@@ -249,8 +249,8 @@ function Me(e, n = {}) {
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 Fe(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 = j(() => d.value !== "collapsed"), p = j(() => d.value === "pinned"), m = null, h = q(0), g = q(0), _ = j(() => h.value > 0), v = j(() => g.value > 0), y = null, b = null, x = !1, S = null;
254
254
  function C() {
255
255
  S &&= (clearTimeout(S), null);
256
256
  }
@@ -272,7 +272,7 @@ function Ne(e) {
272
272
  d.value = "collapsed", T();
273
273
  }, t));
274
274
  }
275
- function j() {
275
+ function A() {
276
276
  if (c()) {
277
277
  d.value = "pinned", T();
278
278
  return;
@@ -296,7 +296,7 @@ function Ne(e) {
296
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) || ge(e.relatedTarget, o)) return;
299
+ if (t && e.relatedTarget instanceof Node && t.contains(e.relatedTarget) || ve(e.relatedTarget, o)) return;
300
300
  }
301
301
  k();
302
302
  }
@@ -307,30 +307,30 @@ function Ne(e) {
307
307
  function I(e) {
308
308
  if (l() || d.value !== "hover" || h.value > 0) return;
309
309
  let t = e.currentTarget;
310
- e.relatedTarget && t.contains(e.relatedTarget) || ge(e.relatedTarget, o) || k();
310
+ e.relatedTarget && t.contains(e.relatedTarget) || ve(e.relatedTarget, o) || k();
311
311
  }
312
312
  function L() {
313
313
  l() || (E(), C(), d.value = "pinned", T());
314
314
  }
315
- function R(e = "morph") {
315
+ function ee(e = "morph") {
316
316
  h.value++, e === "grasp" && g.value++, E();
317
317
  }
318
- function z(e = "morph") {
318
+ function R(e = "morph") {
319
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
320
  h.value === 0 && d.value === "hover" && k();
321
321
  }, Math.min(t, 800)));
322
322
  }
323
- function B(e) {
323
+ function z(e) {
324
324
  if (l() || h.value > 0 || a?.value) return;
325
325
  let t = n.value;
326
- !t || t.contains(e.target) || ge(e.target, o) || j();
326
+ !t || t.contains(e.target) || ve(e.target, o) || A();
327
327
  }
328
328
  return Z(f, (e) => {
329
329
  if (e) {
330
330
  if (typeof document > "u") return;
331
331
  O(), b = requestAnimationFrame(() => {
332
- b = null, f.value && (document.addEventListener("pointerdown", B, !0), y = () => {
333
- document.removeEventListener("pointerdown", B, !0), y = null;
332
+ b = null, f.value && (document.addEventListener("pointerdown", z, !0), y = () => {
333
+ document.removeEventListener("pointerdown", z, !0), y = null;
334
334
  });
335
335
  });
336
336
  } else O();
@@ -340,7 +340,7 @@ function Ne(e) {
340
340
  return;
341
341
  }
342
342
  d.value = "collapsed", T();
343
- }), ee(() => {
343
+ }), ne(() => {
344
344
  E(), C(), O();
345
345
  }), {
346
346
  state: d,
@@ -353,15 +353,15 @@ function Ne(e) {
353
353
  onFocusIn: F,
354
354
  onFocusOut: I,
355
355
  onClickCollapsed: L,
356
- keepOpen: R,
357
- release: z,
356
+ keepOpen: ee,
357
+ release: R,
358
358
  expand: M,
359
- collapse: j
359
+ collapse: A
360
360
  };
361
361
  }
362
362
  //#endregion
363
363
  //#region src/components/dock/composables/useDockSpring.ts
364
- function Pe(e) {
364
+ function Ie(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 Pe(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 me({
372
+ let l = new ge({
373
373
  response: e.response * r(),
374
374
  dampingFraction: e.dampingFraction,
375
375
  initial: a,
@@ -396,11 +396,11 @@ function Pe(e) {
396
396
  }
397
397
  //#endregion
398
398
  //#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)");
399
+ function Le(e) {
400
+ let { rootEl: t, outerActiveLayer: n } = e, r = q(n.value), i = q(null), a = Ie({
401
+ response: d.response,
402
+ dampingFraction: d.dampingFraction
403
+ }), o = _e("(prefers-reduced-motion: reduce)");
404
404
  function s() {
405
405
  return t.value;
406
406
  }
@@ -426,16 +426,12 @@ function Fe(e) {
426
426
  });
427
427
  }
428
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();
429
+ e !== t && (r.value = e, i.value = s() ? t : null);
430
+ }), f = Z(n, (t, n) => {
431
+ t === n || !s() || (e.measure(), l());
432
+ }, { flush: "post" });
433
+ return ne(() => {
434
+ u(), f(), a.dispose();
439
435
  }), {
440
436
  outerCurrentLayer: K(r),
441
437
  outerLeavingLayer: K(i)
@@ -443,34 +439,109 @@ function Fe(e) {
443
439
  }
444
440
  //#endregion
445
441
  //#region src/components/dock/composables/dockMorphMeasure.ts
446
- function Ie(e, t) {
442
+ function Re(e, t) {
447
443
  return t === "vertical" ? e.offsetHeight : e.offsetWidth;
448
444
  }
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`));
445
+ function ze(e, t) {
446
+ let n = e.map(([e, t]) => [
447
+ e,
448
+ t,
449
+ e.style.getPropertyValue(t),
450
+ e.style.getPropertyPriority(t)
451
+ ]);
452
+ for (let [t, n, r] of e) t.style.setProperty(n, r, n.startsWith("--") ? "" : "important");
453
+ try {
454
+ return t();
455
+ } finally {
456
+ for (let [e, t, r, i] of n.reverse()) r ? e.style.setProperty(t, r, i) : e.style.removeProperty(t);
459
457
  }
458
+ }
459
+ function Be(e, t) {
460
+ let n = e.scrollLeft, r = e.scrollTop;
461
+ try {
462
+ return t();
463
+ } finally {
464
+ (e.scrollLeft !== n || e.scrollTop !== r) && e.scrollTo({
465
+ left: n,
466
+ top: r,
467
+ behavior: "instant"
468
+ });
469
+ }
470
+ }
471
+ function Ve(e, t, n, r, i) {
472
+ let a = r === "vertical" ? "margin-block-end" : "margin-inline-end";
473
+ return ze([
474
+ [
475
+ e,
476
+ "--dock-expanded-px",
477
+ "initial"
478
+ ],
479
+ [
480
+ t,
481
+ "position",
482
+ "relative"
483
+ ],
484
+ [
485
+ t,
486
+ "inset",
487
+ "auto"
488
+ ],
489
+ [
490
+ n,
491
+ "position",
492
+ "absolute"
493
+ ]
494
+ ], () => {
495
+ let n = Re(e, r);
496
+ if (i === null) return n;
497
+ let o = i - (n - Re(t, r));
498
+ if (Math.abs(o) < .5) return n;
499
+ let s = Number.parseFloat(getComputedStyle(t).getPropertyValue(a)) || 0;
500
+ return ze([[
501
+ t,
502
+ a,
503
+ `${s + o}px`
504
+ ]], () => Re(e, r));
505
+ });
506
+ }
507
+ function He(e) {
508
+ 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
509
  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);
510
+ let e = t.value, o = r.value, s = i.value;
511
+ if (!e || !n.value || !o || !s) return;
512
+ let d = a.value, f = o.classList.contains("is-active");
513
+ if (!e.hasAttribute("data-morphing")) {
514
+ let t = Re(e, d) - Re(f ? o : s, d);
515
+ f ? c = t : l = t;
516
+ }
517
+ let p = Be(o, () => Ve(e, o, s, d, c));
518
+ 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`));
519
+ }
520
+ function p() {
521
+ if (!o) return;
522
+ o.disconnect();
523
+ let e = [r.value, i.value], a = t.value;
524
+ for (let t of [
525
+ a,
526
+ a?.parentElement,
527
+ n.value,
528
+ ...e
529
+ ]) t && o.observe(t);
530
+ for (let t of e) for (let e of t?.children ?? []) o.observe(e);
531
+ }
532
+ function m() {
533
+ if (o?.disconnect(), o = null, s?.disconnect(), s = null, t.value) {
534
+ if (typeof ResizeObserver < "u" && (o = new ResizeObserver(() => f()), p()), typeof MutationObserver < "u") {
535
+ s = new MutationObserver(() => {
536
+ p(), f();
537
+ });
538
+ for (let e of [r.value, i.value]) e && s.observe(e, {
539
+ childList: !0,
540
+ subtree: !0,
541
+ characterData: !0
542
+ });
472
543
  }
473
- d();
544
+ f();
474
545
  }
475
546
  }
476
547
  Z([
@@ -479,27 +550,29 @@ function Le(e) {
479
550
  r,
480
551
  i,
481
552
  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;
486
- });
553
+ ], m, { immediate: !0 });
554
+ let h = () => f();
555
+ typeof window < "u" && window.addEventListener("resize", h);
556
+ let g = typeof document < "u" ? document.fonts : void 0;
557
+ return g && g.ready.then(() => !d && f()), W(() => {
558
+ d = !0, o?.disconnect(), o = null, s?.disconnect(), s = null, typeof window < "u" && window.removeEventListener("resize", h);
559
+ }), { measure: f };
487
560
  }
488
561
  //#endregion
489
562
  //#region src/components/dock/composables/useDockShellProps.ts
490
- function Re(e) {
491
- let t = A(() => e.shape ?? "pill"), n = A(() => e.orientation ?? "horizontal"), r = A(() => e.collapse === !1);
563
+ function Ue(e) {
564
+ let t = j(() => e.shape ?? "pill"), n = j(() => e.orientation ?? "horizontal"), r = j(() => e.collapse === !1);
492
565
  return {
493
- startCollapsed: A(() => !r.value && (e.collapse ?? "closed") === "closed"),
566
+ startCollapsed: j(() => !r.value && (e.collapse ?? "closed") === "closed"),
494
567
  shape: t,
495
568
  orientation: n,
496
569
  alwaysExpanded: r,
497
- fitContent: A(() => e.fitContent ?? !1)
570
+ fitContent: j(() => e.fitContent ?? !1)
498
571
  };
499
572
  }
500
573
  //#endregion
501
574
  //#region src/components/dock/composables/useDockClickIntegrity.ts
502
- function ze(e) {
575
+ function We(e) {
503
576
  let { rootEl: t, visualExpanded: n } = e, r = null, i = !1, a = 0, o = null, s = q(null), c = null, l = [];
504
577
  function u() {
505
578
  c?.removeAttribute("data-dock-press-origin"), c = null;
@@ -582,94 +655,109 @@ function ze(e) {
582
655
  }
583
656
  //#endregion
584
657
  //#region src/components/dock/composables/useDockRun.ts
585
- function Be(e, t) {
658
+ function Ge(e, t) {
586
659
  let n = getComputedStyle(e).getPropertyValue(t).trim(), r = Number.parseFloat(n);
587
660
  return Number.isFinite(r) ? r : 0;
588
661
  }
589
- function Ve(e) {
662
+ function Ke(e) {
590
663
  return Array.from(e.children).filter((e) => e instanceof HTMLElement);
591
664
  }
592
- function He(e) {
665
+ function qe(e) {
593
666
  return e.findIndex((e) => {
594
667
  let t = (e.matches("[aria-current]") ? e : e.querySelector("[aria-current]"))?.getAttribute("aria-current");
595
668
  return t != null && t !== "false";
596
669
  });
597
670
  }
598
- var Ue = `${S}, [tabindex]`;
599
- function We(e) {
600
- return (e.matches(S) || e.hasAttribute("tabindex")) && !e.querySelector(Ue);
671
+ function Je(e) {
672
+ return e.hasAttribute(y);
601
673
  }
602
- function Ge(e) {
603
- return Ve(e).filter(We);
674
+ function Ye(e) {
675
+ return Ke(e).filter(Je);
604
676
  }
605
- function Ke(e) {
606
- let { runEl: t, statusEl: n, orientation: r } = e, i = Pe({
607
- response: v.response,
608
- dampingFraction: v.dampingFraction
677
+ var Xe = ".dock-separator", Ze = "select[aria-hidden=\"true\"][tabindex=\"-1\"]";
678
+ function Qe(e) {
679
+ let t = Ke(e).filter((e) => !e.matches(Xe) && !e.matches(Ze));
680
+ return t.length > 0 && t.every(Je);
681
+ }
682
+ function $e(e) {
683
+ let { runEl: t, statusEl: n, orientation: r } = e, i = q(!1), a = Ie({
684
+ response: d.response,
685
+ dampingFraction: d.dampingFraction
609
686
  });
610
- function a() {
687
+ function o() {
611
688
  return r.value === "vertical";
612
689
  }
613
- function o(e) {
614
- return a() ? e.scrollTop : e.scrollLeft;
690
+ function s(e) {
691
+ return o() ? e.scrollTop : e.scrollLeft;
615
692
  }
616
- function s(e, t) {
617
- a() ? e.scrollTop = t : e.scrollLeft = t;
618
- }
619
- function c(e) {
620
- return a() ? e.scrollHeight - e.clientHeight : e.scrollWidth - e.clientWidth;
693
+ function c(e, t) {
694
+ o() ? e.scrollTop = t : e.scrollLeft = t;
621
695
  }
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));
696
+ function l(e) {
697
+ return o() ? e.scrollHeight - e.clientHeight : e.scrollWidth - e.clientWidth;
629
698
  }
630
699
  function u(e, t) {
700
+ let n = Ke(e), r = n.indexOf(t);
701
+ if (r < 0) return s(e);
702
+ let i = Ge(e, "--dock-pitch");
703
+ if (i <= 0) return s(e);
704
+ let a = Math.max(1, Ge(e, "--dock-open-pitches")), o = qe(n), c = o >= 0 && o < r ? (a - 1) * i : 0, u = r * i + c - i / 2;
705
+ return Math.min(Math.max(u, 0), l(e));
706
+ }
707
+ function f(e, t) {
631
708
  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;
709
+ return o() ? r.top < n.top - 1 || r.bottom > n.bottom + 1 : r.left < n.left - 1 || r.right > n.right + 1;
633
710
  }
634
- function d(e) {
711
+ function p(e) {
635
712
  let t = n.value;
636
713
  if (!t) return;
637
- let r = We(e) ? e : e.querySelector(S) ?? e, i = r.getAttribute("aria-label") ?? r.getAttribute("title") ?? r.textContent?.trim();
714
+ let r = Je(e) ? e : e.querySelector(C) ?? e, i = r.getAttribute("aria-label") ?? r.getAttribute("title") ?? r.textContent?.trim();
638
715
  i && (t.textContent = i);
639
716
  }
640
- function f(e) {
717
+ function m(e) {
641
718
  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) => {
719
+ if (!n || (p(e), !f(n, e))) return;
720
+ let r = s(n), i = u(n, e);
721
+ Math.abs(i - r) < 1 || a.playTo(0, 1, { onFrame: (e) => {
645
722
  let n = t.value;
646
- n && s(n, r + (a - r) * e);
723
+ n && c(n, r + (i - r) * e);
647
724
  } });
648
725
  }
649
- function p() {
726
+ let h = /* @__PURE__ */ new WeakMap();
727
+ function g(e, t) {
728
+ h.has(e) || h.set(e, e.getAttribute("tabindex")), e.tabIndex = t;
729
+ }
730
+ function _(e) {
731
+ if (!h.has(e)) return;
732
+ let t = h.get(e) ?? null;
733
+ h.delete(e), t === null ? e.removeAttribute("tabindex") : e.setAttribute("tabindex", t);
734
+ }
735
+ function v() {
650
736
  let e = t.value;
651
737
  if (!e) return;
652
- let n = Ge(e);
738
+ i.value = Qe(e);
739
+ for (let t of Ke(e)) Je(t) || _(t);
740
+ let n = Ye(e);
653
741
  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;
742
+ let r = qe(n), a = n.findIndex((e) => e.contains(document.activeElement)), o = a >= 0 ? a : r >= 0 ? r : 0;
655
743
  n.forEach((e, t) => {
656
- e.tabIndex = t === a ? 0 : -1;
744
+ g(e, t === o ? 0 : -1);
657
745
  });
658
746
  }
659
- function m(e, t) {
747
+ function b(e, t) {
660
748
  let n = e[t];
661
- n && (f(n), n.tabIndex = 0, n.focus({ preventScroll: !0 }), p());
749
+ n && (m(n), g(n, 0), n.focus({ preventScroll: !0 }), v());
662
750
  }
663
- function h(e) {
751
+ function x(e) {
664
752
  let n = t.value;
665
753
  if (!n) return;
666
- let r = Ge(n);
754
+ let r = Ye(n);
667
755
  if (r.length === 0) return;
668
756
  let i = r.findIndex((t) => t.contains(e.target));
669
757
  if (i < 0) return;
670
- let [o, s] = a() ? ["ArrowUp", "ArrowDown"] : ["ArrowLeft", "ArrowRight"], c;
758
+ let [a, s] = o() ? ["ArrowUp", "ArrowDown"] : ["ArrowLeft", "ArrowRight"], c;
671
759
  switch (e.key) {
672
- case o:
760
+ case a:
673
761
  c = i - 1;
674
762
  break;
675
763
  case s:
@@ -683,41 +771,55 @@ function Ke(e) {
683
771
  break;
684
772
  default: return;
685
773
  }
686
- c < 0 || c >= r.length || (e.preventDefault(), m(r, c));
774
+ c < 0 || c >= r.length || (e.preventDefault(), b(r, c));
687
775
  }
688
- function g(e) {
776
+ function S(e) {
689
777
  let n = t.value;
690
778
  if (!n) return;
691
- let r = Ve(n).find((t) => t.contains(e.target));
692
- r && f(r);
779
+ let r = Ke(n).find((t) => t.contains(e.target));
780
+ r && m(r);
781
+ }
782
+ let w = null;
783
+ function T(e, t) {
784
+ if (t.type !== "attributes" || t.attributeName === "aria-current" || t.attributeName === "data-glass-dock-seat") return !0;
785
+ let n = t.target;
786
+ return n.parentElement === e && !Je(n);
693
787
  }
694
- let _ = null;
695
788
  return U(() => {
696
789
  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, {
790
+ e && (e.addEventListener("keydown", x), e.addEventListener("click", S, { capture: !0 }), e.addEventListener("focusin", S, { capture: !0 }), v(), w = new MutationObserver((t) => {
791
+ t.some((t) => T(e, t)) && v();
792
+ }), w.observe(e, {
698
793
  childList: !0,
699
794
  subtree: !0,
700
795
  attributes: !0,
701
- attributeFilter: ["aria-current"]
796
+ attributeFilter: [
797
+ "aria-current",
798
+ y,
799
+ "aria-hidden",
800
+ "tabindex"
801
+ ]
702
802
  }));
703
- }), ee(() => {
803
+ }), ne(() => {
704
804
  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
805
+ e?.removeEventListener("keydown", x), e?.removeEventListener("click", S, { capture: !0 }), e?.removeEventListener("focusin", S, { capture: !0 }), w?.disconnect(), a.dispose();
806
+ }), Z(r, () => v()), {
807
+ reach: m,
808
+ syncRoving: v,
809
+ toolbar: i
709
810
  };
710
811
  }
711
812
  //#endregion
712
813
  //#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 = {
814
+ var et = ["data-backdrop-mode", "data-held"], tt = ["data-held"], nt = { class: "dock-controls" }, rt = {
714
815
  key: 0,
715
816
  class: "dock-persistent"
716
- }, Ze = [
817
+ }, it = [
717
818
  "id",
819
+ "role",
718
820
  "aria-orientation",
719
821
  "inert"
720
- ], Qe = [
822
+ ], at = [
721
823
  "id",
722
824
  "inert",
723
825
  "role",
@@ -725,13 +827,13 @@ var qe = ["data-backdrop-mode", "data-held"], Je = ["data-held"], Ye = { class:
725
827
  "aria-label",
726
828
  "aria-expanded",
727
829
  "aria-controls"
728
- ], $e = {
830
+ ], ot = {
729
831
  key: 0,
730
832
  class: "dock-search-field"
731
- }, et = {
833
+ }, st = {
732
834
  key: 1,
733
835
  class: "dock-persistent dock-persistent-end"
734
- }, tt = /* @__PURE__ */ I({
836
+ }, ct = /* @__PURE__ */ L({
735
837
  inheritAttrs: !1,
736
838
  __name: "GlassDock",
737
839
  props: {
@@ -746,85 +848,85 @@ var qe = ["data-backdrop-mode", "data-held"], Je = ["data-held"], Ye = { class:
746
848
  backgroundCanvas: {}
747
849
  },
748
850
  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,
851
+ let n = e, { startCollapsed: r, shape: i, orientation: a, alwaysExpanded: o, fitContent: s } = Ue(n), c = X("dockEl"), u = X("layersEl"), d = X("fullEl"), m = X("summaryEl"), h = X("statusEl"), { toolbar: g } = $e({
852
+ runEl: d,
752
853
  statusEl: h,
753
854
  orientation: a
754
- }), n.backdropMode === "live" && Me(c, { backgroundCanvas: () => {
855
+ });
856
+ n.backdropMode === "live" && Pe(c, { backgroundCanvas: () => {
755
857
  let e = n.backgroundCanvas;
756
858
  return typeof e == "function" ? e() : e instanceof HTMLCanvasElement ? e : null;
757
859
  } });
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({
860
+ let _ = q(!1), v = `glass-dock-${oe()}`, { expanded: y, isPinned: b, isHeld: x, graspHeld: S, onMouseEnter: w, onMouseLeave: T, onFocusIn: E, onFocusOut: D, onClickCollapsed: O, keepOpen: k, release: M, expand: L, collapse: ee } = Fe({
759
861
  rootEl: c,
760
862
  alwaysExpanded: o,
761
863
  initialExpanded: !r.value,
762
- isTransitioning: g,
763
- dockId: _
764
- }), V = A(() => o.value || v.value);
864
+ isTransitioning: _,
865
+ dockId: v
866
+ }), R = j(() => o.value || y.value);
765
867
  l({
766
- id: _,
868
+ id: v,
767
869
  orientation: a,
768
- keepOpen: O,
769
- release: j,
770
- held: x,
771
- expanded: V
772
- }), Le({
870
+ keepOpen: k,
871
+ release: M,
872
+ held: S,
873
+ expanded: R
874
+ });
875
+ let { measure: te } = He({
773
876
  rootEl: c,
774
877
  contentEl: u,
775
- expandedEl: p,
878
+ expandedEl: d,
776
879
  collapsedEl: m,
777
- axis: a,
778
- expanded: V
779
- });
780
- let { outerCurrentLayer: H, outerLeavingLayer: U } = Fe({
880
+ axis: a
881
+ }), { outerCurrentLayer: H, outerLeavingLayer: U } = Le({
781
882
  rootEl: c,
782
- outerActiveLayer: A(() => V.value ? "full" : "summary"),
883
+ outerActiveLayer: j(() => R.value ? "full" : "summary"),
783
884
  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 }));
885
+ _.value = e;
886
+ },
887
+ measure: te
888
+ }), W = j(() => H.value === "summary");
889
+ async function ne(e) {
890
+ !W.value || !["Enter", " "].includes(e.key) || (e.preventDefault(), O(), await B(), (d.value?.querySelector(C) ?? d.value)?.focus({ preventScroll: !0 }));
789
891
  }
790
892
  function K(e) {
791
893
  if (e.key !== "Escape") return;
792
- let t = e.target?.closest?.(d);
793
- t && p.value?.contains(t) || L();
894
+ let t = e.target?.closest?.(f);
895
+ t && d.value?.contains(t) || ee();
794
896
  }
795
- Z(V, async (e, t) => {
897
+ Z(R, async (e, t) => {
796
898
  if (!t || e) return;
797
899
  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();
900
+ if (!(n && d.value?.contains(n) || n?.closest("[data-glass-dock-face]")?.getAttribute("data-glass-dock-owner") === v)) return;
901
+ await B();
800
902
  let r = m.value;
801
903
  r && !r.hasAttribute("inert") && r.focus({ preventScroll: !0 });
802
904
  });
803
- let { onPointerDownCapture: te, onPointerCancelCapture: ne, onClickCapture: re, markExpandFlip: ae, pressKeepaliveLayer: $ } = ze({
905
+ let { onPointerDownCapture: re, onPointerCancelCapture: ie, onClickCapture: ae, markExpandFlip: se, pressKeepaliveLayer: $ } = We({
804
906
  rootEl: c,
805
- visualExpanded: V
907
+ visualExpanded: R
806
908
  });
807
- Z(V, (e) => {
808
- e && ae();
909
+ Z(R, (e) => {
910
+ e && se();
809
911
  });
810
- let se = q(!1);
811
- Z(x, (e) => {
812
- e && (se.value = !0);
912
+ let le = q(!1);
913
+ Z(S, (e) => {
914
+ e && (le.value = !0);
813
915
  });
814
- function ce(e) {
815
- e.propertyName === "opacity" && !x.value && (se.value = !1);
916
+ function ue(e) {
917
+ e.propertyName === "opacity" && !S.value && (le.value = !1);
816
918
  }
817
919
  return t({
818
- expanded: v,
819
- isPinned: y,
820
- isHeld: b,
821
- graspHeld: x,
822
- isTransitioning: g,
823
- expand: I,
824
- collapse: L,
825
- keepOpen: O,
826
- release: j
827
- }), (e, t) => (G(), N("div", R({
920
+ expanded: y,
921
+ isPinned: b,
922
+ isHeld: x,
923
+ graspHeld: S,
924
+ isTransitioning: _,
925
+ expand: L,
926
+ collapse: ee,
927
+ keepOpen: k,
928
+ release: M
929
+ }), (e, t) => (G(), P("div", z({
828
930
  ref_key: "dockEl",
829
931
  ref: c
830
932
  }, e.$attrs, {
@@ -832,49 +934,49 @@ var qe = ["data-backdrop-mode", "data-held"], Je = ["data-held"], Ye = { class:
832
934
  Y(a),
833
935
  `shape-${Y(i)}`,
834
936
  {
835
- expanded: V.value,
836
- collapsed: !V.value,
837
- pinned: Y(y),
937
+ expanded: R.value,
938
+ collapsed: !R.value,
939
+ pinned: Y(b),
838
940
  "fit-content": Y(s),
839
941
  "always-expanded": Y(o)
840
942
  }
841
943
  ]],
842
944
  "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)
945
+ "data-held": Y(S) || void 0,
946
+ onMouseenter: t[2] ||= (...e) => Y(w) && Y(w)(...e),
947
+ onMouseleave: t[3] ||= (e) => Y(T)(e),
948
+ onFocusin: t[4] ||= (...e) => Y(E) && Y(E)(...e),
949
+ onFocusout: t[5] ||= (...e) => Y(D) && Y(D)(...e),
950
+ onPointerdownCapture: t[6] ||= (...e) => Y(re) && Y(re)(...e),
951
+ onPointercancelCapture: t[7] ||= (...e) => Y(ie) && Y(ie)(...e),
952
+ onClickCapture: t[8] ||= (...e) => Y(ae) && Y(ae)(...e)
851
953
  }), [
852
- P("div", {
954
+ F("div", {
853
955
  class: "dock-plate",
854
956
  "aria-hidden": "true",
855
- "data-held": Y(x) || void 0
856
- }, [se.value ? (G(), N(k, { key: 0 }, [t[9] ||= P("span", {
957
+ "data-held": Y(S) || void 0
958
+ }, [le.value ? (G(), P(A, { key: 0 }, [t[9] ||= F("span", {
857
959
  class: "glass-grasp-carrier",
858
960
  "data-grasp": "rest"
859
- }, null, -1), P("span", {
961
+ }, null, -1), F("span", {
860
962
  class: "glass-grasp-carrier",
861
963
  "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),
866
- P("div", {
964
+ onTransitionend: ue
965
+ }, null, 32)], 64)) : N("", !0)], 8, tt),
966
+ F("div", nt, [
967
+ e.$slots.persistent ? (G(), P("div", rt, [J(e.$slots, "persistent")])) : N("", !0),
968
+ F("div", {
867
969
  ref_key: "layersEl",
868
970
  ref: u,
869
971
  class: "dock-layers"
870
972
  }, [
871
- P("div", {
973
+ F("div", {
872
974
  ref_key: "fullEl",
873
- ref: p,
874
- id: `${_}-full`,
875
- role: "toolbar",
876
- "aria-orientation": Y(a),
877
- class: B(["dock-layer dock-layer--full dock-run", {
975
+ ref: d,
976
+ id: `${v}-full`,
977
+ role: Y(g) ? "toolbar" : void 0,
978
+ "aria-orientation": Y(g) ? Y(a) : void 0,
979
+ class: V(["dock-layer dock-layer--full dock-run", {
878
980
  "is-active": Y(H) === "full",
879
981
  "is-leaving": Y(U) === "full" || Y($) === "full" && Y(H) !== "full",
880
982
  "is-press-keepalive": Y($) === "full"
@@ -882,15 +984,15 @@ var qe = ["data-backdrop-mode", "data-held"], Je = ["data-held"], Ye = { class:
882
984
  inert: Y(H) !== "full" && Y($) !== "full" || void 0,
883
985
  tabindex: "-1",
884
986
  onKeydown: K
885
- }, [F(Y(f), null, {
987
+ }, [I(Y(p), null, {
886
988
  default: Q(() => [J(e.$slots, "default")]),
887
989
  _: 3
888
- })], 42, Ze),
889
- P("div", {
990
+ })], 42, it),
991
+ F("div", {
890
992
  ref_key: "summaryEl",
891
993
  ref: m,
892
- id: `${_}-summary`,
893
- class: B(["dock-layer dock-layer--summary", {
994
+ id: `${v}-summary`,
995
+ class: V(["dock-layer dock-layer--summary", {
894
996
  "is-active": Y(H) === "summary",
895
997
  "is-leaving": Y(U) === "summary"
896
998
  }]),
@@ -899,63 +1001,63 @@ var qe = ["data-backdrop-mode", "data-held"], Je = ["data-held"], Ye = { class:
899
1001
  tabindex: W.value ? 0 : void 0,
900
1002
  "aria-label": W.value ? "Expand dock" : void 0,
901
1003
  "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)
1004
+ "aria-controls": W.value ? `${v}-full` : void 0,
1005
+ onFocusin: t[0] ||= ce(() => {}, ["stop"]),
1006
+ onKeydown: ne,
1007
+ onClick: t[1] ||= (...e) => Y(O) && Y(O)(...e)
1008
+ }, [J(e.$slots, "collapsed")], 42, at),
1009
+ e.$slots.search ? (G(), P("div", ot, [J(e.$slots, "search")])) : N("", !0)
908
1010
  ], 512),
909
- e.$slots["persistent-end"] ? (G(), N("div", et, [J(e.$slots, "persistent-end")])) : M("", !0)
1011
+ e.$slots["persistent-end"] ? (G(), P("div", st, [J(e.$slots, "persistent-end")])) : N("", !0)
910
1012
  ]),
911
- P("div", {
1013
+ F("div", {
912
1014
  ref_key: "statusEl",
913
1015
  ref: h,
914
1016
  class: "dock-run-status",
915
1017
  role: "status",
916
1018
  "aria-live": "polite"
917
1019
  }, null, 512)
918
- ], 16, qe));
1020
+ ], 16, et));
919
1021
  }
920
- }), nt = c("glass-ui:dock-switcher-tablist"), { KEY: rt } = nt;
921
- function it(e) {
922
- nt.provide(e);
1022
+ }), lt = c("glass-ui:dock-switcher-tablist"), { KEY: ut } = lt;
1023
+ function dt(e) {
1024
+ lt.provide(e);
923
1025
  }
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);
1026
+ var ft = lt.use, pt = s(m, "[glass-ui:dock] <DockLayer> must be used inside <DockCrossfade> (or <DockLayerGroup>)"), { KEY: mt } = pt;
1027
+ function ht(e) {
1028
+ pt.provide(e);
927
1029
  }
928
- var lt = ot.use, ut = /* @__PURE__ */ I({
1030
+ var gt = pt.use, _t = /* @__PURE__ */ L({
929
1031
  __name: "DockCrossfade",
930
1032
  props: {
931
1033
  active: {},
932
1034
  reserve: { default: "block" }
933
1035
  },
934
1036
  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 }) => ({
1037
+ let n = e, r = q(null), i = q(/* @__PURE__ */ new Map()), a = j(() => [...i.value.values()].map(({ id: e, label: t, icon: n }) => ({
936
1038
  id: e,
937
1039
  label: t,
938
1040
  icon: n
939
1041
  })));
940
1042
  function o(e) {
941
1043
  let t = new Map(i.value);
942
- t.set(e.id, e), i.value = t, f();
1044
+ t.set(e.id, e), i.value = t, p();
943
1045
  }
944
1046
  function s(e) {
945
1047
  if (!i.value.has(e)) return;
946
1048
  let t = new Map(i.value);
947
- t.delete(e), i.value = t, f();
1049
+ t.delete(e), i.value = t, p();
948
1050
  }
949
- let c = A(() => n.active), l = q(null);
950
- ct({
1051
+ let c = j(() => n.active), l = q(null);
1052
+ ht({
951
1053
  register: o,
952
1054
  unregister: s,
953
1055
  activeId: c,
954
1056
  leavingId: l,
955
1057
  faces: a
956
1058
  });
957
- let u = q(0), d = A(() => n.reserve === "inline" ? "min-inline-size" : "min-block-size");
958
- function f() {
1059
+ let u = q(0), f = j(() => n.reserve === "inline" ? "min-inline-size" : "min-block-size");
1060
+ function p() {
959
1061
  let e = 0;
960
1062
  for (let { el: t } of i.value.values()) {
961
1063
  let r = n.reserve === "inline" ? t.scrollWidth : t.scrollHeight;
@@ -963,79 +1065,79 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
963
1065
  }
964
1066
  e > u.value && (u.value = e);
965
1067
  }
966
- let p = A(() => u.value > 0 ? {
967
- [d.value]: `${u.value}px`,
1068
+ let m = j(() => u.value > 0 ? {
1069
+ [f.value]: `${u.value}px`,
968
1070
  "--dock-crossfade-peak": `${u.value}px`
969
1071
  } : void 0);
970
- y(r, () => f());
971
- let m = Pe({
972
- response: v.response,
973
- dampingFraction: v.dampingFraction
1072
+ b(r, () => p());
1073
+ let h = Ie({
1074
+ response: d.response,
1075
+ dampingFraction: d.dampingFraction
974
1076
  });
975
- function h(e) {
1077
+ function g(e) {
976
1078
  return e ? i.value.get(e)?.el : void 0;
977
1079
  }
978
- function g(e, t) {
979
- h(e)?.style.setProperty("--dock-t", `${t}`);
1080
+ function _(e, t) {
1081
+ g(e)?.style.setProperty("--dock-t", `${t}`);
980
1082
  }
981
- function _(e) {
982
- h(e)?.style.removeProperty("--dock-t");
1083
+ function v(e) {
1084
+ g(e)?.style.removeProperty("--dock-t");
983
1085
  }
984
- function b(e) {
1086
+ function y(e) {
985
1087
  return e < 0 ? 0 : e > 1 ? 1 : e;
986
1088
  }
987
- let x = he("(prefers-reduced-motion: reduce)"), S = null, C = 1;
1089
+ let x = _e("(prefers-reduced-motion: reduce)"), S = null, C = 1;
988
1090
  Z(x, (e) => {
989
- e && (m.dispose(), S?.());
1091
+ e && (h.dispose(), S?.());
990
1092
  });
991
1093
  async function w(e, t) {
992
1094
  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?.());
1095
+ let n = g(e), r = document.activeElement;
1096
+ !n || !r || !n.contains(r) || (await B(), (g(t) ?? document.body).focus?.());
995
1097
  }
996
1098
  return Z(c, (e, t) => {
997
1099
  if (e === t) return;
998
- f();
999
- let n = h(e), i = h(t);
1100
+ p();
1101
+ let n = g(e), i = g(t);
1000
1102
  if (!n || !i) {
1001
- l.value = null, _(e), C = 1;
1103
+ l.value = null, v(e), C = 1;
1002
1104
  return;
1003
1105
  }
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", "");
1106
+ 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;
1107
+ a && a !== e && a !== t && v(a), l.value = t, _(e, c), _(t, 1 - u), w(t, e), r.value?.setAttribute("data-crossfading", "");
1006
1108
  let d = () => {
1007
- _(e), _(t), r.value?.removeAttribute("data-crossfading"), l.value = null, C = 1, S === d && (S = null);
1109
+ v(e), v(t), r.value?.removeAttribute("data-crossfading"), l.value = null, C = 1, S === d && (S = null);
1008
1110
  };
1009
1111
  if (S = d, x.value) {
1010
1112
  d();
1011
1113
  return;
1012
1114
  }
1013
- let p = u > .001 ? -C / u : 0;
1014
- C = 1 - c, m.playTo(0, 1, {
1015
- inheritVelocityScale: p,
1115
+ let f = u > .001 ? -C / u : 0;
1116
+ C = 1 - c, h.playTo(0, 1, {
1117
+ inheritVelocityScale: f,
1016
1118
  onFrame: (n) => {
1017
- g(e, b(c + (1 - c) * n)), g(t, b(1 - u * (1 - n)));
1119
+ _(e, y(c + (1 - c) * n)), _(t, y(1 - u * (1 - n)));
1018
1120
  },
1019
1121
  onSettle: d
1020
1122
  });
1021
1123
  }), H(() => {
1022
- m.dispose(), S = null;
1023
- }), t({ faces: a }), (e, t) => (G(), N("div", {
1124
+ h.dispose(), S = null;
1125
+ }), t({ faces: a }), (e, t) => (G(), P("div", {
1024
1126
  ref_key: "rootEl",
1025
1127
  ref: r,
1026
1128
  class: "dock-crossfade",
1027
- style: V(p.value)
1129
+ style: te(m.value)
1028
1130
  }, [J(e.$slots, "default")], 4));
1029
1131
  }
1030
- }), dt = ["data-motion"], ft = ["aria-orientation"], pt = [
1132
+ }), vt = ["data-motion"], yt = ["aria-orientation"], bt = [
1031
1133
  "id",
1032
1134
  "tabindex",
1033
1135
  "aria-controls",
1034
1136
  "aria-label",
1035
1137
  "onClick"
1036
- ], mt = { key: 1 }, ht = { key: 2 }, gt = /* @__PURE__ */ I({
1138
+ ], xt = { key: 1 }, St = { key: 2 }, Ct = /* @__PURE__ */ L({
1037
1139
  __name: "DockLayerGroup",
1038
- props: /*@__PURE__*/ L({
1140
+ props: /*@__PURE__*/ R({
1039
1141
  orientation: {},
1040
1142
  showSwitcher: {
1041
1143
  type: Boolean,
@@ -1049,8 +1151,8 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1049
1151
  }),
1050
1152
  emits: ["update:active"],
1051
1153
  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({
1053
- options: A(() => c.value.map((e) => ({ value: e.id }))),
1154
+ let t = e, n = o(() => t.motion), r = se(e, "active"), i = v(), a = j(() => t.orientation ?? i?.orientation.value ?? "horizontal"), s = X("crossfade"), c = j(() => s.value?.faces ?? []), l = j(() => a.value === "vertical" ? "horizontal" : "vertical"), u = j(() => l.value === "vertical"), d = q(null), f = q(null), p = q([]), m = T({
1155
+ options: j(() => c.value.map((e) => ({ value: e.id }))),
1054
1156
  model: r,
1055
1157
  mode: "single",
1056
1158
  role: "tablist",
@@ -1058,13 +1160,13 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1058
1160
  containerRef: d,
1059
1161
  indicatorRef: f,
1060
1162
  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({
1163
+ }), g = j(() => t.showSwitcher && c.value.length > 1), _ = oe(), y = (e) => e.replace(/[^a-zA-Z0-9_-]/g, ""), b = (e) => `dock-tab-${_}-${y(e)}`, x = (e) => `dock-panel-${_}-${y(e)}`;
1164
+ dt({
1063
1165
  isTablist: g,
1064
1166
  tabId: b,
1065
1167
  panelId: x
1066
1168
  });
1067
- let S = A(() => u.value ? "y" : "x");
1169
+ let S = j(() => u.value ? "y" : "x");
1068
1170
  function C() {
1069
1171
  let e = d.value;
1070
1172
  if (!e) return [];
@@ -1077,7 +1179,7 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1077
1179
  };
1078
1180
  });
1079
1181
  }
1080
- let E = T({
1182
+ let w = E({
1081
1183
  handle: d,
1082
1184
  surface: f,
1083
1185
  axis: () => S.value,
@@ -1091,36 +1193,36 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1091
1193
  l.value,
1092
1194
  n.armed.value
1093
1195
  ], () => {
1094
- n.armed.value && z(() => E.refresh());
1196
+ n.armed.value && B(() => w.refresh());
1095
1197
  }), U(() => {
1096
- n.armed.value && z(() => E.refresh());
1198
+ n.armed.value && B(() => w.refresh());
1097
1199
  });
1098
1200
  function D(e) {
1099
1201
  return typeof e == "object" && !!e || typeof e == "function";
1100
1202
  }
1101
- let O = m(() => i);
1102
- function I() {
1203
+ let O = h(() => i);
1204
+ function k() {
1103
1205
  O.acquire();
1104
1206
  }
1105
1207
  function L(e) {
1106
1208
  let t = e.relatedTarget, n = e.currentTarget;
1107
1209
  t && n?.contains(t) || O.release();
1108
1210
  }
1109
- return (t, i) => (G(), N("div", {
1110
- class: B(["dock-layer-group", [a.value, `switcher-${e.switcherPosition}`]]),
1211
+ return (t, i) => (G(), P("div", {
1212
+ class: V(["dock-layer-group", [a.value, `switcher-${e.switcherPosition}`]]),
1111
1213
  "data-motion": Y(n).dataMotion.value,
1112
- style: V(Y(n).hostStyle.value)
1113
- }, [g.value ? (G(), N("div", {
1214
+ style: te(Y(n).hostStyle.value)
1215
+ }, [g.value ? (G(), P("div", {
1114
1216
  key: 0,
1115
1217
  ref_key: "switcherListEl",
1116
1218
  ref: d,
1117
1219
  role: "tablist",
1118
- class: B(["dock-layer-switcher", [e.switcherPosition, Y(n).armed.value && "glass-drag-grabbable"]]),
1220
+ class: V(["dock-layer-switcher", [e.switcherPosition, Y(n).armed.value && "glass-drag-grabbable"]]),
1119
1221
  "aria-orientation": l.value,
1120
- onKeydown: i[0] ||= (...e) => Y(h).onKeydown && Y(h).onKeydown(...e),
1121
- onFocusin: I,
1222
+ onKeydown: i[0] ||= (...e) => Y(m).onKeydown && Y(m).onKeydown(...e),
1223
+ onFocusin: k,
1122
1224
  onFocusout: L
1123
- }, [(G(!0), N(k, null, te(c.value, (e, t) => (G(), N("button", R({
1225
+ }, [(G(!0), P(A, null, re(c.value, (e, t) => (G(), P("button", z({
1124
1226
  key: e.id,
1125
1227
  ref_for: !0,
1126
1228
  ref: (e) => {
@@ -1129,37 +1231,37 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1129
1231
  type: "button",
1130
1232
  class: "dock-layer-tab",
1131
1233
  id: b(e.id),
1132
- tabindex: Y(h).rovingTabindex(t)
1133
- }, { ref_for: !0 }, Y(h).itemAttrs(e.id), {
1234
+ tabindex: Y(m).rovingTabindex(t)
1235
+ }, { ref_for: !0 }, Y(m).itemAttrs(e.id), {
1134
1236
  "aria-controls": x(e.id),
1135
1237
  "aria-label": e.label ?? e.id,
1136
- onClick: (n) => Y(h).select(e.id, t)
1137
- }), [D(e.icon) ? (G(), j(ne(e.icon), {
1238
+ onClick: (n) => Y(m).select(e.id, t)
1239
+ }), [D(e.icon) ? (G(), M(ie(e.icon), {
1138
1240
  key: 0,
1139
1241
  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", {
1242
+ })) : typeof e.icon == "string" ? (G(), P("span", xt, ae(e.icon), 1)) : (G(), P("span", St, ae((e.label ?? e.id).charAt(0)), 1))], 16, bt))), 128)), F("div", {
1141
1243
  ref_key: "switcherIndicatorEl",
1142
1244
  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),
1245
+ class: V(["dock-layer-tab-indicator", Y(n).armed.value && Y(w).dragging.value && "glass-drag-lift"]),
1246
+ style: te(Y(m).singleSliderStyle.value),
1145
1247
  "aria-hidden": "true"
1146
- }, null, 6)], 42, ft)) : M("", !0), F(ut, {
1248
+ }, null, 6)], 42, yt)) : N("", !0), I(_t, {
1147
1249
  ref_key: "crossfade",
1148
1250
  ref: s,
1149
1251
  active: r.value
1150
1252
  }, {
1151
1253
  default: Q(() => [J(t.$slots, "default")]),
1152
1254
  _: 3
1153
- }, 8, ["active"])], 14, dt));
1255
+ }, 8, ["active"])], 14, vt));
1154
1256
  }
1155
- }), _t = [
1257
+ }), wt = [
1156
1258
  "role",
1157
1259
  "id",
1158
1260
  "aria-labelledby",
1159
1261
  "inert",
1160
1262
  "aria-hidden",
1161
1263
  "tabindex"
1162
- ], vt = { class: "dock-face-content" }, yt = /* @__PURE__ */ I({
1264
+ ], Tt = { class: "dock-face-content" }, Et = /* @__PURE__ */ L({
1163
1265
  __name: "DockLayer",
1164
1266
  props: {
1165
1267
  id: {},
@@ -1167,7 +1269,7 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1167
1269
  icon: {}
1168
1270
  },
1169
1271
  setup(e) {
1170
- let t = e, n = lt(), r = X("hostEl");
1272
+ let t = e, n = gt(), r = X("hostEl");
1171
1273
  U(() => {
1172
1274
  r.value && n.register({
1173
1275
  id: t.id,
@@ -1187,11 +1289,11 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1187
1289
  el: r.value
1188
1290
  });
1189
1291
  }), 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", {
1292
+ let i = j(() => n.activeId.value === t.id), a = j(() => n.leavingId.value === t.id), o = ft(), s = j(() => o?.isTablist.value ?? !1), c = j(() => s.value ? o.panelId(t.id) : void 0), l = j(() => s.value ? o.tabId(t.id) : void 0);
1293
+ return (e, t) => (G(), P("div", {
1192
1294
  ref_key: "hostEl",
1193
1295
  ref: r,
1194
- class: B(["dock-face", {
1296
+ class: V(["dock-face", {
1195
1297
  "is-active": i.value,
1196
1298
  "is-leaving": a.value
1197
1299
  }]),
@@ -1201,9 +1303,9 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1201
1303
  inert: !i.value || void 0,
1202
1304
  "aria-hidden": !i.value || void 0,
1203
1305
  tabindex: i.value ? -1 : void 0
1204
- }, [P("div", vt, [J(e.$slots, "default")])], 10, _t));
1306
+ }, [F("div", Tt, [J(e.$slots, "default")])], 10, wt));
1205
1307
  }
1206
- }), bt = /* @__PURE__ */ I({
1308
+ }), Dt = /* @__PURE__ */ L({
1207
1309
  __name: "DockControl",
1208
1310
  props: {
1209
1311
  shape: { default: "icon" },
@@ -1234,13 +1336,14 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1234
1336
  ] }
1235
1337
  },
1236
1338
  setup(t) {
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(() => ({
1339
+ let r = t, o = j(() => r.shape === "tab"), s = j(() => 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 = j(() => ({
1340
+ [y]: "",
1238
1341
  ...r.active === void 0 ? {} : {
1239
1342
  "aria-pressed": String(r.active),
1240
1343
  ...r.active ? { "data-active": "" } : {}
1241
1344
  },
1242
1345
  ...r.disabled ? { "aria-disabled": "true" } : {}
1243
- })), l = A(() => !r.asChild && r.as === "button" ? { type: r.type } : {}), u = i("press"), d = a({
1346
+ })), l = j(() => !r.asChild && r.as === "button" ? { type: r.type } : {}), u = i("press"), d = a({
1244
1347
  disabled: () => r.disabled || o.value,
1245
1348
  squish: !0,
1246
1349
  response: u.response,
@@ -1248,11 +1351,11 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1248
1351
  pressVar: "--dock-press-t",
1249
1352
  shrinkDepth: .04,
1250
1353
  maxStretch: 1.03
1251
- }), f = A(() => o.value ? {} : { ...d.pressStyle.value });
1354
+ }), f = j(() => o.value ? {} : { ...d.pressStyle.value });
1252
1355
  function p(e) {
1253
1356
  r.disabled && (e.preventDefault(), e.stopImmediatePropagation());
1254
1357
  }
1255
- return (e, r) => $((G(), j(Y(ce), R({
1358
+ return (e, r) => $((G(), M(Y(ue), z({
1256
1359
  as: t.as,
1257
1360
  "as-child": t.asChild
1258
1361
  }, {
@@ -1290,7 +1393,7 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1290
1393
  "onBlur"
1291
1394
  ])), [[Y(n)]]);
1292
1395
  }
1293
- }), xt = /* @__PURE__ */ I({
1396
+ }), Ot = /* @__PURE__ */ L({
1294
1397
  inheritAttrs: !1,
1295
1398
  __name: "DockTrigger",
1296
1399
  props: {
@@ -1304,28 +1407,69 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1304
1407
  ] }
1305
1408
  },
1306
1409
  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
- })])]),
1410
+ let r = t, i = { [y]: "" };
1411
+ function a(e) {
1412
+ e.preventDefault(), e.stopImmediatePropagation();
1413
+ }
1414
+ let o = (e, { attrs: t, slots: n }) => {
1415
+ let { disabled: r, ...i } = t, o = r != null && r !== !1;
1416
+ return ee("button", {
1417
+ ...i,
1418
+ type: i.type ?? "button",
1419
+ ...o ? {
1420
+ "aria-disabled": "true",
1421
+ onClickCapture: a
1422
+ } : {}
1423
+ }, n.default?.());
1424
+ };
1425
+ o.inheritAttrs = !1;
1426
+ let s = j(() => e("dock-trigger", r.for === "select" && "dock-select-trigger", r.for !== "select" && "dock-dropdown-trigger", r.class));
1427
+ return (e, t) => r.for === "select" ? $((G(), M(Y(fe), z({ key: 0 }, {
1428
+ ...e.$attrs,
1429
+ ...i
1430
+ }, {
1431
+ "as-child": "",
1432
+ class: s.value
1433
+ }), {
1434
+ default: Q(() => [I(o, null, {
1435
+ default: Q(() => [J(e.$slots, "default"), I(Y(de), { "as-child": "" }, {
1436
+ default: Q(() => [J(e.$slots, "icon", {}, () => [I(Y(pe), {
1437
+ class: "dock-select-trigger__chevron",
1438
+ "aria-hidden": "true"
1439
+ })])]),
1440
+ _: 3
1441
+ })]),
1314
1442
  _: 3
1315
1443
  })]),
1316
1444
  _: 3
1317
- }, 16, ["class"])), [[Y(n)]]) : r.for === "dropdown" ? $((G(), j(C, R({ key: 1 }, e.$attrs, {
1445
+ }, 16, ["class"])), [[Y(n)]]) : r.for === "dropdown" ? $((G(), M(w, z({ key: 1 }, {
1446
+ ...e.$attrs,
1447
+ ...i
1448
+ }, {
1449
+ "as-child": "",
1318
1450
  action: "pointerdown",
1319
- class: i.value
1451
+ class: s.value
1320
1452
  }), {
1321
- default: Q(() => [J(e.$slots, "default")]),
1453
+ default: Q(() => [I(o, null, {
1454
+ default: Q(() => [J(e.$slots, "default")]),
1455
+ _: 3
1456
+ })]),
1322
1457
  _: 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")]),
1458
+ }, 16, ["class"])), [[Y(n)]]) : $((G(), M(Y(le), z({ key: 2 }, {
1459
+ ...e.$attrs,
1460
+ ...i
1461
+ }, {
1462
+ "as-child": "",
1463
+ class: s.value
1464
+ }), {
1465
+ default: Q(() => [I(o, null, {
1466
+ default: Q(() => [J(e.$slots, "default")]),
1467
+ _: 3
1468
+ })]),
1325
1469
  _: 3
1326
1470
  }, 16, ["class"])), [[Y(n)]]);
1327
1471
  }
1328
- }), St = /* @__PURE__ */ I({
1472
+ }), kt = /* @__PURE__ */ L({
1329
1473
  __name: "DockBackgroundToggle",
1330
1474
  props: {
1331
1475
  paused: {
@@ -1337,22 +1481,22 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1337
1481
  },
1338
1482
  emits: ["update:paused"],
1339
1483
  setup(e, { emit: t }) {
1340
- let n = e, r = t, i = A(() => n.paused ? n.playLabel : n.pauseLabel);
1484
+ let n = e, r = t, i = j(() => n.paused ? n.playLabel : n.pauseLabel);
1341
1485
  function a() {
1342
1486
  r("update:paused", !n.paused);
1343
1487
  }
1344
- return (t, n) => (G(), j(bt, {
1488
+ return (t, n) => (G(), M(Dt, {
1345
1489
  type: "button",
1346
1490
  active: e.paused,
1347
1491
  "aria-pressed": e.paused,
1348
1492
  "aria-label": i.value,
1349
1493
  onClick: a
1350
1494
  }, {
1351
- default: Q(() => [e.paused ? (G(), j(Y(pe), {
1495
+ default: Q(() => [e.paused ? (G(), M(Y(he), {
1352
1496
  key: 0,
1353
1497
  size: 18,
1354
1498
  "aria-hidden": "true"
1355
- })) : (G(), j(Y(fe), {
1499
+ })) : (G(), M(Y(me), {
1356
1500
  key: 1,
1357
1501
  size: 18,
1358
1502
  "aria-hidden": "true"
@@ -1364,30 +1508,30 @@ var lt = ot.use, ut = /* @__PURE__ */ I({
1364
1508
  "aria-label"
1365
1509
  ]));
1366
1510
  }
1367
- }), Ct = [
1511
+ }), At = [
1368
1512
  "data-orientation",
1369
1513
  "data-dock-hairline",
1370
1514
  "aria-orientation"
1371
- ], wt = /* @__PURE__ */ I({
1515
+ ], jt = /* @__PURE__ */ L({
1372
1516
  __name: "DockSeparator",
1373
1517
  props: { anchor: {
1374
1518
  type: Boolean,
1375
1519
  default: !1
1376
1520
  } },
1377
1521
  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", {
1380
- class: B(["dock-separator", { "dock-hairline": e.anchor }]),
1522
+ let t = v(), n = j(() => t?.orientation.value ?? "horizontal"), r = j(() => n.value), i = j(() => n.value === "vertical" ? "horizontal" : "vertical");
1523
+ return (t, n) => (G(), P("div", {
1524
+ class: V(["dock-separator", { "dock-hairline": e.anchor }]),
1381
1525
  role: "separator",
1382
1526
  "data-orientation": r.value,
1383
1527
  "data-dock-hairline": e.anchor || void 0,
1384
1528
  "aria-orientation": i.value
1385
- }, null, 10, Ct));
1529
+ }, null, 10, At));
1386
1530
  }
1387
1531
  });
1388
1532
  //#endregion
1389
1533
  //#region src/composables/search/match.ts
1390
- function Tt(e, t) {
1534
+ function Mt(e, t) {
1391
1535
  let n = e.length, r = t.length;
1392
1536
  if (n === 0) return {
1393
1537
  score: 0,
@@ -1411,11 +1555,11 @@ function Tt(e, t) {
1411
1555
  matches: i
1412
1556
  });
1413
1557
  }
1414
- function Et(e, t) {
1558
+ function Nt(e, t) {
1415
1559
  if (!t) return null;
1416
1560
  let n = 0, r = [];
1417
1561
  for (let i of e) {
1418
- let e = Tt(i, t);
1562
+ let e = Mt(i, t);
1419
1563
  if (!e) return null;
1420
1564
  n += e.score;
1421
1565
  for (let t of e.matches) r.push(t);
@@ -1425,7 +1569,7 @@ function Et(e, t) {
1425
1569
  matches: r
1426
1570
  };
1427
1571
  }
1428
- function Dt(e, t) {
1572
+ function Pt(e, t) {
1429
1573
  let n = null, r = [], i = [
1430
1574
  [t._lc.label, 12],
1431
1575
  [t._lc.type, 10],
@@ -1433,7 +1577,7 @@ function Dt(e, t) {
1433
1577
  ];
1434
1578
  for (let [a, o] of i) {
1435
1579
  if (!a) continue;
1436
- let i = Et(e, a);
1580
+ let i = Nt(e, a);
1437
1581
  if (!i) continue;
1438
1582
  let s = i.score * o;
1439
1583
  (n === null || s > n) && (n = s, r = a === t._lc.label ? i.matches : []);
@@ -1443,7 +1587,7 @@ function Dt(e, t) {
1443
1587
  matches: r
1444
1588
  };
1445
1589
  }
1446
- function Ot(e) {
1590
+ function Ft(e) {
1447
1591
  return e.map((e) => ({
1448
1592
  item: e,
1449
1593
  _lc: {
@@ -1453,15 +1597,15 @@ function Ot(e) {
1453
1597
  }
1454
1598
  }));
1455
1599
  }
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;
1600
+ var It = /* @__PURE__ */ new WeakMap();
1601
+ function Lt(e) {
1602
+ let t = It.get(e);
1603
+ return t || (t = /* @__PURE__ */ new Map(), It.set(e, t)), t;
1460
1604
  }
1461
- function jt(e, t, n = 30) {
1605
+ function Rt(e, t, n = 30) {
1462
1606
  let r = t.toLowerCase().trim();
1463
1607
  if (!r) return [];
1464
- let i = At(e), a = i.get(r);
1608
+ let i = Lt(e), a = i.get(r);
1465
1609
  if (a) return a.slice(0, n);
1466
1610
  i.size > 200 && i.clear();
1467
1611
  let o = r.split(/\s+/).filter(Boolean);
@@ -1480,7 +1624,7 @@ function jt(e, t, n = 30) {
1480
1624
  }
1481
1625
  let c = [];
1482
1626
  for (let e of s) {
1483
- let t = Dt(o, e);
1627
+ let t = Pt(o, e);
1484
1628
  t && c.push({
1485
1629
  item: e.item,
1486
1630
  score: t.score,
@@ -1489,17 +1633,17 @@ function jt(e, t, n = 30) {
1489
1633
  }
1490
1634
  return c.sort((e, t) => t.score - e.score), i.set(r, c), c.slice(0, n);
1491
1635
  }
1492
- function Mt(e) {
1636
+ function zt(e) {
1493
1637
  if (e) {
1494
- kt.delete(e);
1638
+ It.delete(e);
1495
1639
  return;
1496
1640
  }
1497
- kt = /* @__PURE__ */ new WeakMap();
1641
+ It = /* @__PURE__ */ new WeakMap();
1498
1642
  }
1499
1643
  //#endregion
1500
1644
  //#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;
1645
+ function Bt(e) {
1646
+ 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 = j(() => t()), u = j(() => Ft(l.value)), d;
1503
1647
  function f(e = d) {
1504
1648
  e !== void 0 && (clearTimeout(e), d === e && (d = void 0));
1505
1649
  }
@@ -1515,7 +1659,7 @@ function Nt(e) {
1515
1659
  }), Z(l, () => {
1516
1660
  f(), c.value = i.value, s.value = 0;
1517
1661
  }, { deep: !0 });
1518
- let p = A(() => jt(u.value, c.value, r));
1662
+ let p = j(() => Rt(u.value, c.value, r));
1519
1663
  Z(p, () => {
1520
1664
  s.value = 0;
1521
1665
  });
@@ -1523,7 +1667,7 @@ function Nt(e) {
1523
1667
  e.onSelect?.(t), h();
1524
1668
  }
1525
1669
  function h() {
1526
- a.value = !1, o.value = !1, f(), i.value = "", c.value = "", s.value = 0, Mt(u.value);
1670
+ a.value = !1, o.value = !1, f(), i.value = "", c.value = "", s.value = 0, zt(u.value);
1527
1671
  }
1528
1672
  function g() {
1529
1673
  a.value = !0;
@@ -1548,7 +1692,7 @@ function Nt(e) {
1548
1692
  }
1549
1693
  }
1550
1694
  return W(() => {
1551
- f(), Mt(u.value);
1695
+ f(), zt(u.value);
1552
1696
  }, !0), {
1553
1697
  query: i,
1554
1698
  results: p,
@@ -1564,13 +1708,13 @@ function Nt(e) {
1564
1708
  }
1565
1709
  //#endregion
1566
1710
  //#region src/components/dock/composables/useDockSearch.ts
1567
- function Pt(e) {
1711
+ function Vt(e) {
1568
1712
  let { dockState: t } = e, n = e.debounceMs ?? 120, r = e.maxResults ?? 30, i = q([]), a = null, o = e.items ? e.items : () => i.value;
1569
1713
  function s(t) {
1570
1714
  let n = t.item.id;
1571
1715
  e.ensureTargetWindow?.(n), e.scrollTo?.(n), e.onResultSelect?.(t);
1572
1716
  }
1573
- let c = Nt({
1717
+ let c = Bt({
1574
1718
  items: o,
1575
1719
  debounceMs: n,
1576
1720
  maxResults: r,
@@ -1591,7 +1735,7 @@ function Pt(e) {
1591
1735
  });
1592
1736
  });
1593
1737
  }
1594
- let l = A(() => {
1738
+ let l = j(() => {
1595
1739
  let e = c.query.value;
1596
1740
  if (!e) return "";
1597
1741
  let t = c.results.value[0];
@@ -1603,15 +1747,15 @@ function Pt(e) {
1603
1747
  let e = l.value;
1604
1748
  e && (c.query.value = c.query.value + e);
1605
1749
  }
1606
- let d = m(() => t), f = d.isHeld;
1750
+ let d = h(() => t), f = d.isHeld;
1607
1751
  function p() {
1608
1752
  f.value || (t.expand(), d.acquire(), c.open());
1609
1753
  }
1610
- function h() {
1754
+ function m() {
1611
1755
  f.value && (c.close(), d.release());
1612
1756
  }
1613
1757
  let g = null;
1614
- return e.collapseOnScroll && e.scrollContainer && (g = O(e.scrollContainer, {
1758
+ return e.collapseOnScroll && e.scrollContainer && (g = k(e.scrollContainer, {
1615
1759
  collapseOnScroll: !0,
1616
1760
  chromeRef: e.chromeRef
1617
1761
  })), W(() => {
@@ -1621,10 +1765,10 @@ function Pt(e) {
1621
1765
  autocompleteText: l,
1622
1766
  scrollChrome: g,
1623
1767
  armSearch: p,
1624
- disarmSearch: h,
1768
+ disarmSearch: m,
1625
1769
  acceptAutocomplete: u,
1626
1770
  isSearchArmed: f
1627
1771
  };
1628
1772
  }
1629
1773
  //#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 };
1774
+ export { _ as DOCK_CONTEXT_KEY, kt as DockBackgroundToggle, Dt as DockControl, _t as DockCrossfade, Et as DockLayer, Ct as DockLayerGroup, jt as DockSeparator, Ot as DockTrigger, ct as GlassDock, l as provideDockContext, g as useDockContext, D as useDockCtaReceive, Vt as useDockSearch, v as useOptionalDockContext };