@mkbabb/glass-ui 3.3.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/{DataTable-FfkaAg2z.js → DataTable-DyKc_26a.js} +144 -106
  2. package/dist/{NumberFieldContent-iOTQ5rGO.js → NumberFieldContent-jO-zGOHf.js} +1 -1
  3. package/dist/api/index.d.ts +1 -0
  4. package/dist/{button-Ckn3eDfB.js → button-i8Ek5vvg.js} +1 -1
  5. package/dist/button.js +1 -1
  6. package/dist/carousel.js +1 -1
  7. package/dist/components/custom/deck-progress/DeckProgress.vue.d.ts +27 -0
  8. package/dist/components/custom/deck-progress/index.d.ts +2 -0
  9. package/dist/components/custom/dock/composables/useLayerTransition.d.ts +11 -0
  10. package/dist/components/ui/data-table/composables/useDataTableResponsive.d.ts +28 -0
  11. package/dist/components/ui/data-table/composables/useDataTableRowIdentity.d.ts +33 -0
  12. package/dist/composables/dark/useGlobalDark.d.ts +17 -6
  13. package/dist/composables/dom/index.d.ts +3 -0
  14. package/dist/composables/dom/useBreakpoint.d.ts +38 -0
  15. package/dist/composables/dom/useIdleReady.d.ts +63 -0
  16. package/dist/composables/dom/useTokenColor.d.ts +13 -0
  17. package/dist/composables/dom/useViewportReady.d.ts +87 -0
  18. package/dist/composables/glass/index.d.ts +1 -1
  19. package/dist/composables/glass/useGlassRenderer.d.ts +10 -3
  20. package/dist/composables/motion/useAnimatedNumber.d.ts +8 -2
  21. package/dist/composables/motion/useCountup.d.ts +8 -2
  22. package/dist/composables/motion/useNumericTransition.d.ts +31 -9
  23. package/dist/composables/motion/useViewTransition.d.ts +16 -1
  24. package/dist/confirm-dialog.js +1 -1
  25. package/dist/data-table.js +1 -1
  26. package/dist/dock.js +169 -158
  27. package/dist/dom.js +4 -4
  28. package/dist/glass-panel.js +14 -14
  29. package/dist/glass-ui.css +1 -1
  30. package/dist/glass-ui.js +134 -119
  31. package/dist/goo-blob.js +108 -89
  32. package/dist/index.d.ts +1 -0
  33. package/dist/labeled-field.js +1 -1
  34. package/dist/motion-core.js +1 -1
  35. package/dist/number-field.js +1 -1
  36. package/dist/search.js +1 -1
  37. package/dist/{slider-BOh8ycfZ.js → slider-CgNzRSh6.js} +1 -1
  38. package/dist/slider.js +1 -1
  39. package/dist/styles/components.css +1 -1
  40. package/dist/styles/dock.css +112 -48
  41. package/dist/styles/glass.css +44 -1
  42. package/dist/styles/instrument-chassis.css +10 -13
  43. package/dist/styles/instrument-rail.css +11 -12
  44. package/dist/styles/tokens.css +9 -7
  45. package/dist/styles/utilities.css +20 -0
  46. package/dist/styles/view-transition.css +24 -0
  47. package/dist/tabs.js +1 -1
  48. package/dist/timeline.js +1 -1
  49. package/dist/useViewTransition-CJnqg6wl.js +21 -0
  50. package/dist/useViewportReady-Dcvf0c4p.js +191 -0
  51. package/package.json +5 -3
  52. package/src/styles/dock.css +112 -48
  53. package/src/styles/glass.css +44 -1
  54. package/src/styles/instrument-chassis.css +10 -13
  55. package/src/styles/instrument-rail.css +11 -12
  56. package/src/styles/tokens.css +9 -7
  57. package/src/styles/utilities.css +20 -0
  58. package/src/styles/view-transition.css +24 -0
  59. package/dist/useClipboard-D8vFyRCa.js +0 -97
  60. package/dist/useViewTransition-D4ssvnXZ.js +0 -18
package/dist/dock.js CHANGED
@@ -5,11 +5,11 @@ import { t as r } from "./useTouchGate-CS5Csc2h.js";
5
5
  import { n as i } from "./createContext-DBMGRlx4.js";
6
6
  import { i as a, n as o, r as s, t as c } from "./dockContext-spUj_-E5.js";
7
7
  import { i as l, n as u, r as d, t as f } from "./TabsIndicator-DA0x9gPr.js";
8
- import { t as p } from "./useViewTransition-D4ssvnXZ.js";
9
- import { Fragment as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createVNode as b, defineComponent as x, mergeModels as S, mergeProps as C, nextTick as w, normalizeClass as T, normalizeStyle as E, onBeforeUnmount as D, onMounted as O, onUnmounted as k, openBlock as A, readonly as j, ref as M, renderList as N, renderSlot as P, resolveDynamicComponent as F, toDisplayString as I, unref as L, useAttrs as R, useId as z, useModel as B, useTemplateRef as V, watch as H, withCtx as U } from "vue";
10
- import { DropdownMenuTrigger as W, Primitive as G, SelectIcon as K, SelectTrigger as q, useForwardProps as J } from "reka-ui";
11
- import { SpringProgress as ee } from "@mkbabb/keyframes.js";
12
- var Y = t("pause", [["rect", {
8
+ import { t as p } from "./useViewTransition-CJnqg6wl.js";
9
+ import { Fragment as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createVNode as b, defineComponent as x, mergeModels as S, mergeProps as C, nextTick as w, normalizeClass as T, normalizeStyle as E, onBeforeUnmount as D, onMounted as O, onUnmounted as k, openBlock as A, readonly as j, ref as M, renderList as N, renderSlot as P, resolveDynamicComponent as F, toDisplayString as I, unref as L, useAttrs as R, useId as ee, useModel as z, useTemplateRef as B, watch as V, withCtx as H } from "vue";
10
+ import { DropdownMenuTrigger as U, Primitive as W, SelectIcon as G, SelectTrigger as K, useForwardProps as q } from "reka-ui";
11
+ import { SpringProgress as te } from "@mkbabb/keyframes.js";
12
+ var J = t("pause", [["rect", {
13
13
  x: "14",
14
14
  y: "3",
15
15
  width: "5",
@@ -23,20 +23,20 @@ var Y = t("pause", [["rect", {
23
23
  height: "18",
24
24
  rx: "1",
25
25
  key: "1wsw3u"
26
- }]]), te = t("play", [["path", {
26
+ }]]), ne = t("play", [["path", {
27
27
  d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",
28
28
  key: "10ikf1"
29
29
  }]]);
30
30
  //#endregion
31
31
  //#region src/components/custom/dock/composables/isTeleportedTarget.ts
32
- function X(e, t) {
32
+ function Y(e, t) {
33
33
  if (!(e instanceof Element)) return !1;
34
34
  let n = e.closest("[data-glass-dock-portal]");
35
35
  return n ? t ? n.getAttribute("data-glass-dock-owner") === t : !0 : !1;
36
36
  }
37
37
  //#endregion
38
38
  //#region src/components/custom/dock/composables/useDockState.ts
39
- function ne(e) {
39
+ function re(e) {
40
40
  let { collapseDelay: t = 2500, rootEl: n, alwaysExpanded: r = !1, isTransitioning: i, dockId: a, onStateChange: o } = e, s = () => typeof r == "boolean" ? r : r.value, c = s(), l = M(c ? "pinned" : "collapsed"), u = M(c), d = M(c), f = null, p = M(0), m = h(() => p.value > 0), g = null, _ = null, v = !1, y = l.value;
41
41
  function b() {
42
42
  s() && (l.value = "pinned"), u.value = l.value !== "collapsed", d.value = l.value === "pinned", o && y !== l.value && o(l.value, y), y = l.value;
@@ -83,7 +83,7 @@ function ne(e) {
83
83
  if (p.value > 0) return;
84
84
  if (e) {
85
85
  let t = n.value;
86
- if (t && e.relatedTarget instanceof Node && t.contains(e.relatedTarget) || X(e.relatedTarget, a)) return;
86
+ if (t && e.relatedTarget instanceof Node && t.contains(e.relatedTarget) || Y(e.relatedTarget, a)) return;
87
87
  }
88
88
  w();
89
89
  }
@@ -94,7 +94,7 @@ function ne(e) {
94
94
  function N(e) {
95
95
  if (s() || l.value !== "hover" || p.value > 0) return;
96
96
  let t = e.currentTarget;
97
- e.relatedTarget && t.contains(e.relatedTarget) || X(e.relatedTarget, a) || w();
97
+ e.relatedTarget && t.contains(e.relatedTarget) || Y(e.relatedTarget, a) || w();
98
98
  }
99
99
  function P() {
100
100
  if (s()) {
@@ -114,15 +114,15 @@ function ne(e) {
114
114
  function L(e) {
115
115
  if (s() || i?.value) return;
116
116
  let t = n.value;
117
- !t || t.contains(e.target) || X(e.target, a) || E();
117
+ !t || t.contains(e.target) || Y(e.target, a) || E();
118
118
  }
119
- return H(u, (e) => {
119
+ return V(u, (e) => {
120
120
  e ? (C(), _ = requestAnimationFrame(() => {
121
121
  _ = null, u.value && (document.addEventListener("pointerdown", L, !0), g = () => {
122
122
  document.removeEventListener("pointerdown", L, !0), g = null;
123
123
  });
124
124
  })) : C();
125
- }), typeof r == "boolean" ? r && (l.value = "pinned", b()) : H(r, (e) => {
125
+ }), typeof r == "boolean" ? r && (l.value = "pinned", b()) : V(r, (e) => {
126
126
  if (e) {
127
127
  x(), l.value = "pinned", b();
128
128
  return;
@@ -148,107 +148,118 @@ function ne(e) {
148
148
  }
149
149
  //#endregion
150
150
  //#region src/components/custom/dock/composables/useLayerTransition.ts
151
- var Z = {
152
- response: .5,
153
- dampingFraction: .5
151
+ var X = {
152
+ response: .32,
153
+ dampingFraction: .7
154
154
  };
155
- function re(e) {
156
- let { containerEl: t, activeLayer: n, axis: r } = e, i = typeof document < "u" && "startViewTransition" in document, a = h(() => r?.value === "vertical" ? "height" : "width"), o = (e) => e.getBoundingClientRect()[a.value], s = M(n.value), c = M(null), l = 0, u = null, d = null, f = null;
157
- function m() {
158
- d &&= (d.dispose(), null), f = null;
155
+ function ie(e) {
156
+ let { containerEl: t, activeLayer: n, axis: r, directionTypes: i } = e, a = typeof document < "u" && "startViewTransition" in document, o = h(() => r?.value === "vertical" ? "height" : "width"), s = (e) => e.getBoundingClientRect()[o.value], c = M(n.value), l = M(null), u = 0, d = null, f = null, m = null;
157
+ function g() {
158
+ f &&= (f.dispose(), null), m = null;
159
159
  }
160
- function g(e) {
160
+ function _(e) {
161
161
  let t = e.trim();
162
162
  return t ? t.endsWith("ms") ? Number.parseFloat(t) : t.endsWith("s") ? Number.parseFloat(t) * 1e3 : Number.parseFloat(t) || 0 : 0;
163
163
  }
164
- function _(e) {
165
- let t = getComputedStyle(e), n = t.transitionProperty.split(",").map((e) => e.trim()), r = t.transitionDuration.split(",").map(g), i = t.transitionDelay.split(",").map(g), o = r.map((e, t) => {
164
+ function v(e) {
165
+ let t = getComputedStyle(e), n = t.transitionProperty.split(",").map((e) => e.trim()), r = t.transitionDuration.split(",").map(_), i = t.transitionDelay.split(",").map(_), a = r.map((e, t) => {
166
166
  let r = n[t] ?? n[0] ?? "all";
167
- return r !== "all" && r !== a.value ? 0 : e + (i[t] ?? i[0] ?? 0);
167
+ return r !== "all" && r !== o.value ? 0 : e + (i[t] ?? i[0] ?? 0);
168
168
  });
169
- return Math.max(0, ...o) + 50;
169
+ return Math.max(0, ...a) + 50;
170
170
  }
171
- function v() {
172
- u &&= (clearTimeout(u), null);
171
+ function y() {
172
+ d &&= (clearTimeout(d), null);
173
173
  }
174
- function y(e, t) {
175
- e.style.setProperty(a.value, t);
176
- }
177
- function b(e) {
178
- e.style.removeProperty(a.value);
174
+ function b(e, t) {
175
+ e.style.setProperty(o.value, t);
179
176
  }
180
177
  function x(e) {
181
- e.style.willChange = a.value;
178
+ e.style.removeProperty(o.value);
182
179
  }
183
180
  function S(e) {
181
+ e.style.willChange = o.value;
182
+ }
183
+ function C(e) {
184
184
  e.style.willChange = "auto";
185
185
  }
186
- H(n, (e, n) => {
186
+ function T(e) {
187
+ return e.closest(".glass-dock");
188
+ }
189
+ function E(e) {
190
+ T(e)?.setAttribute("data-morphing", "");
191
+ }
192
+ function D(e) {
193
+ T(e)?.removeAttribute("data-morphing");
194
+ }
195
+ V(n, (e, n) => {
187
196
  if (e === n) return;
188
197
  let r = t.value;
189
198
  if (!r) {
190
- s.value = e, c.value = null;
199
+ c.value = e, l.value = null;
191
200
  return;
192
201
  }
193
- if (i) {
194
- v();
195
- let t = ++l, { finished: r } = p(() => {
196
- c.value = n, s.value = e;
202
+ if (a) {
203
+ y();
204
+ let t = ++u;
205
+ E(r);
206
+ let { finished: i } = p(() => {
207
+ l.value = n, c.value = e;
197
208
  });
198
- r.finally(() => {
199
- t === l && (c.value = null);
209
+ i.finally(() => {
210
+ t === u && (l.value = null, D(r));
200
211
  });
201
212
  return;
202
213
  }
203
214
  if (typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches) {
204
- v(), ++l, s.value = e, c.value = null;
215
+ y(), ++u, c.value = e, l.value = null;
205
216
  return;
206
217
  }
207
- v();
208
- let a = ++l, h = d !== null && f === r && !d.settled ? d : null, g = h ? h.value : o(r);
209
- h || (m(), y(r, `${g}px`)), w(() => {
210
- a === l && r && requestAnimationFrame(() => {
211
- if (a !== l) return;
212
- c.value = n, s.value = e, r.style.transition = "none", b(r);
213
- let t = o(r);
214
- if (y(r, `${g}px`), r.offsetWidth, !h && Math.abs(t - g) < .5) {
215
- r.style.transition = "", b(r), S(r), c.value = null;
218
+ y();
219
+ let i = ++u, o = f !== null && m === r && !f.settled ? f : null, h = o ? o.value : s(r);
220
+ o || (g(), b(r, `${h}px`)), w(() => {
221
+ i === u && r && requestAnimationFrame(() => {
222
+ if (i !== u) return;
223
+ l.value = n, c.value = e, r.style.transition = "none", x(r);
224
+ let t = s(r);
225
+ if (b(r, `${h}px`), r.offsetWidth, !o && Math.abs(t - h) < .5) {
226
+ r.style.transition = "", x(r), C(r), D(r), l.value = null;
216
227
  return;
217
228
  }
218
- x(r), h || (d = new ee({
219
- response: Z.response,
220
- dampingFraction: Z.dampingFraction,
221
- initial: g,
229
+ S(r), E(r), o || (f = new te({
230
+ response: X.response,
231
+ dampingFraction: X.dampingFraction,
232
+ initial: h,
222
233
  respectReducedMotion: !0
223
- }), f = r);
224
- let i = d;
225
- i.target = t, i.play((e) => {
226
- a === l && (y(r, `${e}px`), i.settled && (r.style.transition = "", b(r), S(r), c.value = null, m()));
227
- }), u = setTimeout(() => {
228
- a === l && (r.style.transition = "", b(r), S(r), c.value = null, m());
229
- }, _(r));
234
+ }), m = r);
235
+ let a = f;
236
+ a.target = t, a.play((e) => {
237
+ i === u && (b(r, `${e}px`), a.settled && (r.style.transition = "", x(r), C(r), D(r), l.value = null, g()));
238
+ }), d = setTimeout(() => {
239
+ i === u && (r.style.transition = "", x(r), C(r), D(r), l.value = null, g());
240
+ }, v(r));
230
241
  });
231
242
  });
232
243
  });
233
- function C(e) {
244
+ function O(e) {
234
245
  let n = t.value;
235
- n && e.target === n && e.propertyName === a.value && (v(), m(), n.style.transition = "", b(n), S(n), c.value = null);
246
+ n && e.target === n && e.propertyName === o.value && (y(), g(), n.style.transition = "", x(n), C(n), D(n), l.value = null);
236
247
  }
237
248
  return k(() => {
238
- v(), m();
249
+ y(), g();
239
250
  }), {
240
- onTransitionEnd: C,
241
- currentLayer: s,
242
- leavingLayer: c
251
+ onTransitionEnd: O,
252
+ currentLayer: c,
253
+ leavingLayer: l
243
254
  };
244
255
  }
245
256
  //#endregion
246
257
  //#region src/components/custom/dock/GlassDock.vue?vue&type=script&setup=true&lang.ts
247
- var ie = [
258
+ var ae = [
248
259
  "data-density",
249
260
  "data-held",
250
261
  "data-container-name"
251
- ], ae = ["inert"], oe = ["inert"], se = /* @__PURE__ */ x({
262
+ ], oe = ["inert"], se = ["inert"], ce = /* @__PURE__ */ x({
252
263
  __name: "GlassDock",
253
264
  props: {
254
265
  collapseDelay: { default: 2e3 },
@@ -278,7 +289,7 @@ var ie = [
278
289
  "container-type": "inline-size",
279
290
  "container-name": n.containerName
280
291
  };
281
- }), a = V("dockEl"), s = V("layersEl"), c = h(() => n.variant), l = h(() => n.shape), u = h(() => n.variant === "rail" || n.variant === "instrument-strip" ? "vertical" : n.orientation), d = h(() => n.density), f = h(() => n.overflow === "scroll" ? u.value === "vertical" ? "dock-scroll-y" : "dock-scroll-x" : null), p = h(() => n.alwaysExpanded || u.value === "vertical"), m = h(() => n.fitContent || n.variant === "rail" || n.variant === "instrument-strip"), g = M(!1), _ = r(n.collapseDelay), b = `glass-dock-${z()}`, x = null, S = 0, { expanded: C, isPinned: w, isHeld: k, onMouseEnter: j, onMouseLeave: N, onFocusIn: F, onFocusOut: I, onClickCollapsed: R, keepOpen: B, release: U, expand: W, collapse: G } = ne({
292
+ }), a = B("dockEl"), s = B("layersEl"), c = h(() => n.variant), l = h(() => n.shape), u = h(() => n.variant === "rail" || n.variant === "instrument-strip" ? "vertical" : n.orientation), d = h(() => n.density), f = h(() => n.overflow === "scroll" ? u.value === "vertical" ? "dock-scroll-y" : "dock-scroll-x" : null), p = h(() => n.alwaysExpanded || u.value === "vertical"), m = h(() => n.fitContent || n.variant === "rail" || n.variant === "instrument-strip"), g = M(!1), _ = r(n.collapseDelay), b = `glass-dock-${ee()}`, x = null, S = 0, { expanded: C, isPinned: w, isHeld: k, onMouseEnter: j, onMouseLeave: N, onFocusIn: F, onFocusOut: I, onClickCollapsed: R, keepOpen: z, release: H, expand: U, collapse: W } = re({
282
293
  collapseDelay: n.collapseDelay,
283
294
  rootEl: a,
284
295
  alwaysExpanded: p,
@@ -288,78 +299,78 @@ var ie = [
288
299
  o({
289
300
  id: b,
290
301
  orientation: u,
291
- keepOpen: B,
292
- release: U,
302
+ keepOpen: z,
303
+ release: H,
293
304
  held: k
294
305
  });
295
- let K = h(() => p.value || C.value), { onTransitionEnd: q } = re({
306
+ let G = h(() => p.value || C.value), { onTransitionEnd: K } = ie({
296
307
  containerEl: s,
297
- activeLayer: h(() => K.value ? "full" : "summary"),
308
+ activeLayer: h(() => G.value ? "full" : "summary"),
298
309
  axis: h(() => "horizontal")
299
- }), J = typeof document < "u" && "startViewTransition" in document, ee = h(() => J ? {
310
+ }), q = typeof document < "u" && "startViewTransition" in document, te = h(() => q ? {
300
311
  "view-transition-name": b.replace(/[^a-zA-Z0-9_-]/g, "-"),
301
312
  "view-transition-class": "gl-dock-layer"
302
313
  } : void 0);
303
- function Y(e) {
314
+ function J(e) {
304
315
  let t = e.trim();
305
316
  return t ? t.endsWith("ms") ? Number.parseFloat(t) : t.endsWith("s") ? Number.parseFloat(t) * 1e3 : Number.parseFloat(t) || 0 : 0;
306
317
  }
307
- function te(e) {
308
- let t = getComputedStyle(e), n = t.transitionDuration.split(",").map(Y), r = t.transitionDelay.split(",").map(Y);
318
+ function ne(e) {
319
+ let t = getComputedStyle(e), n = t.transitionDuration.split(",").map(J), r = t.transitionDelay.split(",").map(J);
309
320
  return Math.max(0, ...n.map((e, t) => e + (r[t] ?? r[0] ?? 0)));
310
321
  }
311
- function X() {
322
+ function Y() {
312
323
  x &&= (clearTimeout(x), null);
313
324
  }
314
- let Z = new Set([
325
+ let X = new Set([
315
326
  "width",
316
327
  "height",
317
328
  "padding",
318
329
  "transform"
319
330
  ]);
320
- function se() {
331
+ function ce() {
321
332
  let e = a.value;
322
333
  if (!e) return;
323
334
  let t = ++S;
324
- X(), g.value = !0, x = setTimeout(() => {
335
+ Y(), g.value = !0, x = setTimeout(() => {
325
336
  t === S && (g.value = !1, x = null);
326
- }, te(e) + 50);
337
+ }, ne(e) + 50);
327
338
  }
328
- function Q(e) {
329
- e.target === a.value && Z.has(e.propertyName) && (X(), S++, g.value = !1);
339
+ function Z(e) {
340
+ e.target === a.value && X.has(e.propertyName) && (Y(), S++, g.value = !1);
330
341
  }
331
342
  O(() => {
332
- (n.alwaysExpanded || !n.startCollapsed) && W();
343
+ (n.alwaysExpanded || !n.startCollapsed) && U();
333
344
  });
334
- function $() {
345
+ function Q() {
335
346
  return u.value === "horizontal" && !p.value;
336
347
  }
337
- function ce(e) {
338
- if (!$() || K.value) return;
348
+ function le(e) {
349
+ if (!Q() || G.value) return;
339
350
  let t = a.value, n = e.touches[0];
340
351
  !t || !n || _.handleTouchStart(t, n.clientY);
341
352
  }
342
- function le(e) {
343
- $() && _.handleScrollCheck(e);
353
+ function ue(e) {
354
+ Q() && _.handleScrollCheck(e);
344
355
  }
345
- function ue() {
346
- if (!$()) return;
356
+ function de() {
357
+ if (!Q()) return;
347
358
  let e = _.isActive.value;
348
- _.handleTouchEnd(), !e && _.isActive.value && !K.value && W();
359
+ _.handleTouchEnd(), !e && _.isActive.value && !G.value && U();
349
360
  }
350
- return H(_.isActive, (e) => {
351
- !e && C.value && !w.value && !p.value && G();
352
- }), H(K, (e) => {
353
- se(), e || _.deactivate();
354
- }), D(X), t({
361
+ return V(_.isActive, (e) => {
362
+ !e && C.value && !w.value && !p.value && W();
363
+ }), V(G, (e) => {
364
+ ce(), e || _.deactivate();
365
+ }), D(Y), t({
355
366
  expanded: C,
356
367
  isPinned: w,
357
368
  isHeld: k,
358
369
  isTransitioning: g,
359
- expand: W,
360
- collapse: G,
361
- keepOpen: B,
362
- release: U
370
+ expand: U,
371
+ collapse: W,
372
+ keepOpen: z,
373
+ release: H
363
374
  }), (t, n) => (A(), v("div", {
364
375
  ref_key: "dockEl",
365
376
  ref: a,
@@ -369,8 +380,8 @@ var ie = [
369
380
  `shape-${l.value}`,
370
381
  f.value,
371
382
  {
372
- expanded: K.value,
373
- collapsed: !K.value,
383
+ expanded: G.value,
384
+ collapsed: !G.value,
374
385
  pinned: L(w),
375
386
  "fit-content": m.value,
376
387
  "always-expanded": p.value,
@@ -386,37 +397,37 @@ var ie = [
386
397
  onMouseleave: n[3] ||= (e) => L(N)(e),
387
398
  onFocusin: n[4] ||= (...e) => L(F) && L(F)(...e),
388
399
  onFocusout: n[5] ||= (...e) => L(I) && L(I)(...e),
389
- onTouchstart: ce,
390
- onTouchmove: le,
391
- onTouchend: ue,
392
- onTransitionend: Q,
393
- onTransitioncancel: Q
400
+ onTouchstart: le,
401
+ onTouchmove: ue,
402
+ onTouchend: de,
403
+ onTransitionend: Z,
404
+ onTransitioncancel: Z
394
405
  }, [u.value === "horizontal" ? (A(), v("div", {
395
406
  key: 0,
396
407
  ref_key: "layersEl",
397
408
  ref: s,
398
409
  class: "dock-layers",
399
- style: E(ee.value),
400
- onTransitionend: n[1] ||= (...e) => L(q) && L(q)(...e)
410
+ style: E(te.value),
411
+ onTransitionend: n[1] ||= (...e) => L(K) && L(K)(...e)
401
412
  }, [y("div", {
402
- class: T(["dock-layer dock-layer--full", { "layer-active": K.value }]),
413
+ class: T(["dock-layer dock-layer--full", { "layer-active": G.value }]),
403
414
  inert: !L(C) || void 0
404
- }, [P(t.$slots, "default")], 10, ae), y("div", {
405
- class: T(["dock-layer dock-layer--summary", { "layer-active": !K.value }]),
415
+ }, [P(t.$slots, "default")], 10, oe), y("div", {
416
+ class: T(["dock-layer dock-layer--summary", { "layer-active": !G.value }]),
406
417
  inert: L(C) || void 0,
407
418
  onClick: n[0] ||= (...e) => L(R) && L(R)(...e)
408
- }, [P(t.$slots, "collapsed")], 10, oe)], 36)) : P(t.$slots, "default", { key: 1 })], 46, ie));
419
+ }, [P(t.$slots, "collapsed")], 10, se)], 36)) : P(t.$slots, "default", { key: 1 })], 46, ae));
409
420
  }
410
- }), Q = i("glass-ui:dock-layer-group", "[glass-ui:dock] <DockLayer> must be used inside <DockLayerGroup>");
411
- Q.KEY;
412
- function $(e) {
413
- Q.provide(e);
421
+ }), Z = i("glass-ui:dock-layer-group", "[glass-ui:dock] <DockLayer> must be used inside <DockLayerGroup>");
422
+ Z.KEY;
423
+ function Q(e) {
424
+ Z.provide(e);
414
425
  }
415
- var ce = Q.use;
416
- Q.useOptional;
426
+ var le = Z.use;
427
+ Z.useOptional;
417
428
  //#endregion
418
429
  //#region src/components/custom/dock/DockLayerGroup.vue?vue&type=script&setup=true&lang.ts
419
- var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
430
+ var ue = { key: 1 }, de = { key: 2 }, fe = /* @__PURE__ */ x({
420
431
  __name: "DockLayerGroup",
421
432
  props: /* @__PURE__ */ S({
422
433
  orientation: {},
@@ -431,22 +442,22 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
431
442
  }),
432
443
  emits: ["update:active"],
433
444
  setup(e) {
434
- let t = e, n = B(e, "active"), r = a(), i = M([]), o = V("containerEl");
445
+ let t = e, n = z(e, "active"), r = a(), i = M([]), o = B("containerEl");
435
446
  function s(e) {
436
447
  i.value.find((t) => t.id === e.id) || i.value.push(e);
437
448
  }
438
449
  function c(e) {
439
450
  i.value = i.value.filter((t) => t.id !== e);
440
451
  }
441
- let p = h(() => t.orientation ?? r?.orientation.value ?? "horizontal"), { onTransitionEnd: x, currentLayer: S, leavingLayer: C } = re({
452
+ let p = h(() => t.orientation ?? r?.orientation.value ?? "horizontal"), { onTransitionEnd: x, currentLayer: S, leavingLayer: C } = ie({
442
453
  containerEl: o,
443
454
  activeLayer: n,
444
455
  axis: p
445
- }), w = typeof document < "u" && "startViewTransition" in document, D = z(), O = h(() => w ? {
456
+ }), w = typeof document < "u" && "startViewTransition" in document, D = ee(), O = h(() => w ? {
446
457
  "view-transition-name": `gl-dock-stack-${D.replace(/[^a-zA-Z0-9_-]/g, "-")}`,
447
458
  "view-transition-class": "gl-dock-layer"
448
459
  } : void 0);
449
- $({
460
+ Q({
450
461
  register: s,
451
462
  unregister: c,
452
463
  currentLayerId: j(S),
@@ -456,10 +467,10 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
456
467
  return typeof e == "object" && !!e;
457
468
  }
458
469
  let R = M(!1);
459
- function H() {
470
+ function V() {
460
471
  R.value || (R.value = !0, r?.keepOpen());
461
472
  }
462
- function W(e) {
473
+ function U(e) {
463
474
  let t = e.relatedTarget, n = e.currentTarget;
464
475
  t && n?.contains(t) || R.value && (R.value = !1, r?.release());
465
476
  }
@@ -470,22 +481,22 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
470
481
  orientation: "horizontal",
471
482
  "as-child": !0
472
483
  }, {
473
- default: U(() => [b(L(u), {
484
+ default: H(() => [b(L(u), {
474
485
  class: T(["dock-layer-rail", e.railPosition]),
475
- onFocusin: H,
476
- onFocusout: W
486
+ onFocusin: V,
487
+ onFocusout: U
477
488
  }, {
478
- default: U(() => [(A(!0), v(m, null, N(i.value, (e) => (A(), g(L(d), {
489
+ default: H(() => [(A(!0), v(m, null, N(i.value, (e) => (A(), g(L(d), {
479
490
  key: e.id,
480
491
  value: e.id,
481
492
  class: "dock-layer-tab",
482
493
  title: e.label,
483
494
  "aria-label": e.label ?? e.id
484
495
  }, {
485
- default: U(() => [k(e.icon) ? (A(), g(F(e.icon), {
496
+ default: H(() => [k(e.icon) ? (A(), g(F(e.icon), {
486
497
  key: 0,
487
498
  class: "size-4"
488
- })) : typeof e.icon == "string" ? (A(), v("span", le, I(e.icon), 1)) : (A(), v("span", ue, I((e.label ?? e.id).charAt(0)), 1))]),
499
+ })) : typeof e.icon == "string" ? (A(), v("span", ue, I(e.icon), 1)) : (A(), v("span", de, I((e.label ?? e.id).charAt(0)), 1))]),
489
500
  _: 2
490
501
  }, 1032, [
491
502
  "value",
@@ -503,11 +514,11 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
503
514
  onTransitionend: r[1] ||= (...e) => L(x) && L(x)(...e)
504
515
  }, [P(t.$slots, "default")], 36)], 2));
505
516
  }
506
- }), fe = [
517
+ }), pe = [
507
518
  "inert",
508
519
  "aria-hidden",
509
520
  "tabindex"
510
- ], pe = /* @__PURE__ */ x({
521
+ ], me = /* @__PURE__ */ x({
511
522
  __name: "DockLayer",
512
523
  props: {
513
524
  id: {},
@@ -515,7 +526,7 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
515
526
  icon: {}
516
527
  },
517
528
  setup(e) {
518
- let t = e, n = ce();
529
+ let t = e, n = le();
519
530
  O(() => {
520
531
  n.register({
521
532
  id: t.id,
@@ -525,8 +536,8 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
525
536
  }), D(() => {
526
537
  n.unregister(t.id);
527
538
  });
528
- let r = h(() => n.currentLayerId.value === t.id), i = h(() => n.leavingLayerId.value === t.id), a = V("hostEl");
529
- return H(r, async (e, t) => {
539
+ let r = h(() => n.currentLayerId.value === t.id), i = h(() => n.leavingLayerId.value === t.id), a = B("hostEl");
540
+ return V(r, async (e, t) => {
530
541
  !e || t || typeof document < "u" && (() => {
531
542
  let e = document.activeElement;
532
543
  return !e || e === document.body ? !0 : !!e.closest("[inert]");
@@ -541,9 +552,9 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
541
552
  inert: r.value ? void 0 : !0,
542
553
  "aria-hidden": r.value ? void 0 : !0,
543
554
  tabindex: r.value ? -1 : void 0
544
- }, [P(e.$slots, "default")], 10, fe));
555
+ }, [P(e.$slots, "default")], 10, pe));
545
556
  }
546
- }), me = /* @__PURE__ */ x({
557
+ }), $ = /* @__PURE__ */ x({
547
558
  __name: "DockIconButton",
548
559
  props: {
549
560
  compact: {
@@ -578,7 +589,7 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
578
589
  };
579
590
  }
580
591
  let o = h(() => !n.asChild && n.as === "button" ? { type: n.type } : {});
581
- return (e, n) => (A(), g(L(G), C({
592
+ return (e, n) => (A(), g(L(W), C({
582
593
  as: t.as,
583
594
  "as-child": t.asChild
584
595
  }, o.value, {
@@ -586,7 +597,7 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
586
597
  style: i.value,
587
598
  onPointermove: a
588
599
  }), {
589
- default: U(() => [P(e.$slots, "default")]),
600
+ default: H(() => [P(e.$slots, "default")]),
590
601
  _: 3
591
602
  }, 16, [
592
603
  "as",
@@ -611,18 +622,18 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
611
622
  function a() {
612
623
  r("update:paused", !n.paused);
613
624
  }
614
- return (t, n) => (A(), g(me, {
625
+ return (t, n) => (A(), g($, {
615
626
  type: "button",
616
627
  "aria-pressed": e.paused,
617
628
  "aria-label": i.value,
618
629
  title: i.value,
619
630
  onClick: a
620
631
  }, {
621
- default: U(() => [e.paused ? (A(), g(L(te), {
632
+ default: H(() => [e.paused ? (A(), g(L(ne), {
622
633
  key: 0,
623
634
  size: 18,
624
635
  "aria-hidden": "true"
625
- })) : (A(), g(L(Y), {
636
+ })) : (A(), g(L(J), {
626
637
  key: 1,
627
638
  size: 18,
628
639
  "aria-hidden": "true"
@@ -652,12 +663,12 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
652
663
  },
653
664
  setup(t) {
654
665
  let n = t, r = R(), i = h(() => r["data-tier"] === "primary"), a = h(() => e("dock-tab-button", i.value && "btn-audacious", n.class));
655
- return (e, n) => (A(), g(L(G), {
666
+ return (e, n) => (A(), g(L(W), {
656
667
  as: t.as,
657
668
  "as-child": t.asChild,
658
669
  class: T(a.value)
659
670
  }, {
660
- default: U(() => [P(e.$slots, "default")]),
671
+ default: H(() => [P(e.$slots, "default")]),
661
672
  _: 3
662
673
  }, 8, [
663
674
  "as",
@@ -681,13 +692,13 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
681
692
  ] }
682
693
  },
683
694
  setup(t) {
684
- let r = t, i = J(h(() => {
695
+ let r = t, i = q(h(() => {
685
696
  let { class: e, ...t } = r;
686
697
  return t;
687
698
  }));
688
- return (t, a) => (A(), g(L(q), C(L(i), { class: L(e)("dock-select-trigger", r.class) }), {
689
- default: U(() => [P(t.$slots, "default"), b(L(K), { "as-child": "" }, {
690
- default: U(() => [P(t.$slots, "icon", {}, () => [b(L(n), { class: "dock-select-trigger__chevron" })])]),
699
+ return (t, a) => (A(), g(L(K), C(L(i), { class: L(e)("dock-select-trigger", r.class) }), {
700
+ default: H(() => [P(t.$slots, "default"), b(L(G), { "as-child": "" }, {
701
+ default: H(() => [P(t.$slots, "icon", {}, () => [b(L(n), { class: "dock-select-trigger__chevron" })])]),
691
702
  _: 3
692
703
  })]),
693
704
  _: 3
@@ -709,15 +720,15 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
709
720
  ] }
710
721
  },
711
722
  setup(t) {
712
- let n = t, r = J(h(() => {
723
+ let n = t, r = q(h(() => {
713
724
  let { class: e, ...t } = n;
714
725
  return t;
715
726
  }));
716
- return (t, i) => (A(), g(L(W), C(L(r), { class: L(e)("dock-dropdown-trigger", n.class) }), {
717
- default: U(() => [P(t.$slots, "default")]),
727
+ return (t, i) => (A(), g(L(U), C(L(r), { class: L(e)("dock-dropdown-trigger", n.class) }), {
728
+ default: H(() => [P(t.$slots, "default")]),
718
729
  _: 3
719
730
  }, 16, ["class"]));
720
731
  }
721
732
  });
722
733
  //#endregion
723
- export { c as DOCK_CONTEXT_KEY, he as DockBackgroundToggle, ve as DockDropdownTrigger, me as DockIconButton, pe as DockLayer, de as DockLayerGroup, _e as DockSelectTrigger, ge as DockTabButton, se as GlassDock, o as provideDockContext, s as useDockContext, a as useOptionalDockContext };
734
+ export { c as DOCK_CONTEXT_KEY, he as DockBackgroundToggle, ve as DockDropdownTrigger, $ as DockIconButton, me as DockLayer, fe as DockLayerGroup, _e as DockSelectTrigger, ge as DockTabButton, ce as GlassDock, o as provideDockContext, s as useDockContext, a as useOptionalDockContext };
package/dist/dom.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./useResizeObserver-DX-STszm.js";
2
2
  import { t } from "./useTouchGate-CS5Csc2h.js";
3
- import { n, r, t as i } from "./useClipboard-D8vFyRCa.js";
4
- import { t as a } from "./useUserInvalidAria-DmvZ_6Dx.js";
5
- import { t as o } from "./useTextHighlight-Dmtofpk2.js";
6
- export { i as copyToClipboard, n as useClipboard, e as useResizeObserver, o as useTextHighlight, r as useTokenColor, t as useTouchGate, a as useUserInvalidAria };
3
+ import { a as n, i as r, n as i, o as a, r as o, t as s } from "./useViewportReady-Dcvf0c4p.js";
4
+ import { t as c } from "./useUserInvalidAria-DmvZ_6Dx.js";
5
+ import { t as l } from "./useTextHighlight-Dmtofpk2.js";
6
+ export { r as copyToClipboard, o as useBreakpoint, n as useClipboard, i as useIdleReady, e as useResizeObserver, l as useTextHighlight, a as useTokenColor, t as useTouchGate, c as useUserInvalidAria, s as useViewportReady };