@mkbabb/glass-ui 3.8.0 → 3.9.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 (164) hide show
  1. package/README.md +1 -6
  2. package/dist/{CardAction-q2qHCJFG.js → CardAction-DuArVky-.js} +4 -4
  3. package/dist/{CommandShortcut-SzWRhROC.js → CommandShortcut-CefCj5mt.js} +7 -7
  4. package/dist/{ContextMenuSubContent-Do977Cbf.js → ContextMenuSubContent-Bhg4f5jX.js} +3 -3
  5. package/dist/{DataTable-CvlWXz65.js → DataTable-CUHMukiQ.js} +1 -1
  6. package/dist/{DialogContent-DjZWT3lK.js → DialogContent-BRkT1cjP.js} +1 -1
  7. package/dist/{NumberFieldContent-CLNVR1iY.js → NumberFieldContent-BbLOh8RU.js} +2 -2
  8. package/dist/{SelectScrollDownButton-C7TRe-ep.js → SelectScrollDownButton-T32cVFeM.js} +3 -3
  9. package/dist/{SelectSeparator-L8pPEn4L.js → SelectSeparator-C4Ql0gzV.js} +1 -1
  10. package/dist/{TabsList-qyHZ2lKY.js → TabsList-B8CVOQPC.js} +2 -2
  11. package/dist/{Toaster-CabYEEF_.js → Toaster-1rYWrmAm.js} +1 -1
  12. package/dist/{ToggleGroupItem-CkXUcBlt.js → ToggleGroupItem-Cev4pOVK.js} +4 -4
  13. package/dist/animated-digit.js +1 -1
  14. package/dist/api/index.d.ts +1 -1
  15. package/dist/api.js +1 -1
  16. package/dist/aurora.js +10 -10
  17. package/dist/{badge-DHQrc_GQ.js → badge-BvwvT50i.js} +4 -4
  18. package/dist/badge.js +1 -1
  19. package/dist/{button-CAywcrhO.js → button-DN39cGqL.js} +13 -12
  20. package/dist/button.js +1 -1
  21. package/dist/card.js +1 -1
  22. package/dist/carousel.js +1 -1
  23. package/dist/color.js +1 -1
  24. package/dist/command.js +1 -1
  25. package/dist/{compile-BBTRjvQS.js → compile-DAjIoEy2.js} +1 -1
  26. package/dist/components/custom/configurator/ConfiguratorLayer.vue.d.ts +1 -1
  27. package/dist/components/custom/dock/DockSeparator.vue.d.ts +3 -0
  28. package/dist/components/custom/dock/GlassDock.vue.d.ts +45 -63
  29. package/dist/components/custom/dock/composables/dockContext.d.ts +7 -0
  30. package/dist/components/custom/dock/index.d.ts +2 -1
  31. package/dist/components/custom/goo-blob/composables/useBlobMood.d.ts +19 -5
  32. package/dist/components/custom/tabs/SegmentedTabs.vue.d.ts +92 -0
  33. package/dist/components/custom/tabs/composables/useTabIndicator.d.ts +49 -0
  34. package/dist/components/custom/tabs/index.d.ts +2 -5
  35. package/dist/components/ui/button/index.d.ts +1 -1
  36. package/dist/components/ui/card/Card.vue.d.ts +5 -3
  37. package/dist/components/ui/carousel/CarouselNext.vue.d.ts +1 -1
  38. package/dist/components/ui/carousel/CarouselPrevious.vue.d.ts +1 -1
  39. package/dist/components/ui/carousel/GlassCarouselPager.vue.d.ts +3 -4
  40. package/dist/components/ui/slider/index.d.ts +14 -7
  41. package/dist/components/ui/tabs/TabsList.vue.d.ts +1 -1
  42. package/dist/composables/context/createContext.d.ts +1 -1
  43. package/dist/configurator.js +1 -1
  44. package/dist/confirm-dialog.js +1 -1
  45. package/dist/constellation.js +1 -1
  46. package/dist/context-menu.js +1 -1
  47. package/dist/controls.js +1 -1
  48. package/dist/dark.js +1 -1
  49. package/dist/data-table.js +1 -1
  50. package/dist/deck-progress.js +1 -1
  51. package/dist/dialog.js +1 -1
  52. package/dist/dock.js +256 -243
  53. package/dist/{dropdown-menu-B_4bWyyG.js → dropdown-menu-D77jX6Df.js} +3 -3
  54. package/dist/dropdown-menu.js +1 -1
  55. package/dist/expandable-container.js +1 -1
  56. package/dist/forms.js +5 -5
  57. package/dist/fourier-field.js +3 -3
  58. package/dist/glass-ui.css +1 -1
  59. package/dist/glass-ui.js +101 -104
  60. package/dist/goo-blob.js +36 -32
  61. package/dist/hover-popover.js +1 -1
  62. package/dist/icon-tooltip.js +1 -1
  63. package/dist/index.d.ts +0 -2
  64. package/dist/keyboard.js +1 -1
  65. package/dist/labeled-field.js +4 -4
  66. package/dist/{menuItemVariants-DKM85SNE.js → menuItemVariants-CCoBNkU5.js} +1 -1
  67. package/dist/motion-core.js +4 -4
  68. package/dist/motion.js +2 -2
  69. package/dist/number-field.js +1 -1
  70. package/dist/pulse.js +1 -1
  71. package/dist/reactive.js +1 -1
  72. package/dist/scrolling-text.js +1 -1
  73. package/dist/search.js +4 -4
  74. package/dist/select.js +2 -2
  75. package/dist/{slider-D9puf-Ko.js → slider-DC2mwuoe.js} +1 -1
  76. package/dist/slider.js +1 -1
  77. package/dist/sortable-list.js +1 -1
  78. package/dist/status-dot.js +17 -16
  79. package/dist/styles/animations.css +6 -2
  80. package/dist/styles/components.css +1 -1
  81. package/dist/styles/dock/density.css +230 -0
  82. package/dist/styles/dock/layer-group.css +263 -0
  83. package/dist/styles/dock/layers.css +355 -0
  84. package/dist/styles/dock/morph.css +244 -0
  85. package/dist/styles/dock/overflow.css +201 -0
  86. package/dist/styles/dock/shell.css +457 -0
  87. package/dist/styles/dock-controls.css +166 -32
  88. package/dist/styles/dock.css +42 -1349
  89. package/dist/styles/glass.css +396 -75
  90. package/dist/styles/index.css +12 -11
  91. package/dist/styles/theme.css +51 -0
  92. package/dist/styles/tokens.css +501 -55
  93. package/dist/styles/utilities.css +89 -39
  94. package/dist/tabs.js +182 -151
  95. package/dist/timeline.js +1 -1
  96. package/dist/toast.js +1 -1
  97. package/dist/toggle-group.js +1 -1
  98. package/dist/{useAnimatedNumber-C_3wZLx4.js → useAnimatedNumber-C5I3wWd8.js} +1 -1
  99. package/dist/{useConfiguratorState-CMff4GzH.js → useConfiguratorState-DxAqksK6.js} +21 -10
  100. package/dist/watercolor-dot.js +1 -1
  101. package/package.json +32 -33
  102. package/src/styles/animations.css +6 -2
  103. package/src/styles/dock/density.css +230 -0
  104. package/src/styles/dock/layer-group.css +263 -0
  105. package/src/styles/dock/layers.css +355 -0
  106. package/src/styles/dock/morph.css +244 -0
  107. package/src/styles/dock/overflow.css +201 -0
  108. package/src/styles/dock/shell.css +457 -0
  109. package/src/styles/dock-controls.css +166 -32
  110. package/src/styles/dock.css +42 -1349
  111. package/src/styles/glass.css +396 -75
  112. package/src/styles/index.css +12 -11
  113. package/src/styles/theme.css +51 -0
  114. package/src/styles/tokens.css +501 -55
  115. package/src/styles/utilities.css +89 -39
  116. package/dist/DiscoGlyph-CG0F410s.js +0 -132
  117. package/dist/GlyphFace-DRjDkB0s.js +0 -51
  118. package/dist/UnderlineTabs-Uxn-R3MT.js +0 -39
  119. package/dist/components/custom/aurora/constants/shaders/painterly.wgsl.d.ts +0 -7
  120. package/dist/components/custom/aurora/constants/shaders/wake.wgsl.d.ts +0 -4
  121. package/dist/components/custom/disco-glyph/DiscoGlyph.vue.d.ts +0 -58
  122. package/dist/components/custom/disco-glyph/index.d.ts +0 -1
  123. package/dist/components/custom/glass-carousel/GlassCarousel.vue.d.ts +0 -36
  124. package/dist/components/custom/glass-carousel/GlassCarouselItem.vue.d.ts +0 -28
  125. package/dist/components/custom/glass-carousel/index.d.ts +0 -4
  126. package/dist/components/custom/glass-carousel/useGlassCarousel.d.ts +0 -30
  127. package/dist/components/custom/glyph-face/GlyphFace.vue.d.ts +0 -64
  128. package/dist/components/custom/glyph-face/index.d.ts +0 -2
  129. package/dist/components/custom/glyph-face/keys.d.ts +0 -9
  130. package/dist/components/custom/responsive-tabs/ResponsiveTabs.vue.d.ts +0 -73
  131. package/dist/components/custom/responsive-tabs/index.d.ts +0 -2
  132. package/dist/components/custom/tabs/BouncyTabs.vue.d.ts +0 -27
  133. package/dist/components/custom/tabs/BouncyToggle.vue.d.ts +0 -60
  134. package/dist/components/custom/tabs/UnderlineTabs.vue.d.ts +0 -20
  135. package/dist/components/custom/tabs/composables/useBouncySlider.d.ts +0 -39
  136. package/dist/disco-glyph.d.ts +0 -1
  137. package/dist/disco-glyph.js +0 -2
  138. package/dist/glass-carousel.d.ts +0 -1
  139. package/dist/glass-carousel.js +0 -219
  140. package/dist/glyph-face.d.ts +0 -1
  141. package/dist/glyph-face.js +0 -3
  142. package/dist/keys-BsYjEFOW.js +0 -9
  143. package/dist/responsive-tabs.d.ts +0 -1
  144. package/dist/responsive-tabs.js +0 -95
  145. package/dist/styles/disco-glyph.css +0 -26
  146. package/dist/styles/glyph-face.css +0 -92
  147. package/src/styles/disco-glyph.css +0 -26
  148. package/src/styles/glyph-face.css +0 -92
  149. /package/dist/{DeckProgress-AVgbIULY.js → DeckProgress-Dmk4_AKN.js} +0 -0
  150. /package/dist/{HoverPopover-D56O6Ylp.js → HoverPopover-2LOIW34a.js} +0 -0
  151. /package/dist/{IconTooltip-D2T5nYOM.js → IconTooltip-yefK7cJc.js} +0 -0
  152. /package/dist/{Input-DVG_J0ne.js → Input-DWQQIOC4.js} +0 -0
  153. /package/dist/{ScrollingText-CVyqxvfv.js → ScrollingText-BPP84wKo.js} +0 -0
  154. /package/dist/{color-DMLTunJK.js → color-8jBjWiJ6.js} +0 -0
  155. /package/dist/{constants-BPOqYJAm.js → constants-CS75AWHG.js} +0 -0
  156. /package/dist/{presets-D1XPuTj-.js → presets-BKVyQfbt.js} +0 -0
  157. /package/dist/{prng-COGhh02-.js → prng-wHuHlNHE.js} +0 -0
  158. /package/dist/{useGlobalDark-D3EBWzXK.js → useGlobalDark-yhL4Wp-s.js} +0 -0
  159. /package/dist/{useIntersectionPause-Bj4sPkMh.js → useIntersectionPause-Cc-H9ees.js} +0 -0
  160. /package/dist/{useInterval-CcLfq2WU.js → useInterval-Dsmqwi03.js} +0 -0
  161. /package/dist/{useKeyboardShortcuts-BXWXOZ-9.js → useKeyboardShortcuts-Be3w_Rwk.js} +0 -0
  162. /package/dist/{useScrollProgress-C9ysDic5.js → useScrollProgress-CAH8Ofwt.js} +0 -0
  163. /package/dist/{useSortable-MGAbCGVJ.js → useSortable-C8ReQ50P.js} +0 -0
  164. /package/dist/{useTextHighlight-9nMW23Qb.js → useTextHighlight-DON84L8w.js} +0 -0
package/dist/dock.js CHANGED
@@ -5,11 +5,11 @@ import { t as r } from "./useSpecularTracking-BVRZsRHA.js";
5
5
  import { t as i } from "./useTouchGate-WFyJYsth.js";
6
6
  import { n as a, t as o } from "./createContext-B44Sah_H.js";
7
7
  import { i as s, n as c, r as l, t as u } from "./dockContext-BKeIMmNk.js";
8
- import { i as d, n as f, r as p, t as m } from "./TabsList-qyHZ2lKY.js";
9
- import { Fragment as h, computed as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createVNode as x, defineComponent as S, mergeModels as C, mergeProps as w, nextTick as T, normalizeClass as E, normalizeStyle as D, onBeforeUnmount as O, onMounted as k, onUnmounted as A, openBlock as j, readonly as M, ref as N, renderList as P, renderSlot as F, resolveDynamicComponent as I, toDisplayString as L, unref as R, useAttrs as z, useId as ee, useModel as te, useTemplateRef as B, watch as V, withCtx as H } from "vue";
10
- import { DropdownMenuTrigger as U, Primitive as W, SelectIcon as G, SelectTrigger as ne, useForwardProps as K } from "reka-ui";
11
- import { SpringProgress as q } from "@mkbabb/keyframes.js";
12
- var J = t("pause", [["rect", {
8
+ import { i as d, n as f, r as p, t as m } from "./TabsList-B8CVOQPC.js";
9
+ import { Fragment as h, computed as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createVNode as x, defineComponent as S, mergeModels as C, mergeProps as w, nextTick as T, normalizeClass as E, normalizeStyle as ee, onBeforeUnmount as D, onMounted as te, onUnmounted as O, openBlock as k, readonly as A, ref as j, renderList as M, renderSlot as N, resolveDynamicComponent as P, toDisplayString as F, unref as I, useAttrs as L, useId as ne, useModel as R, useTemplateRef as z, watch as B, withCtx as V } from "vue";
10
+ import { DropdownMenuTrigger as H, Primitive as U, SelectIcon as W, SelectTrigger as re, useForwardProps as G } from "reka-ui";
11
+ import { SpringProgress as K } from "@mkbabb/keyframes.js";
12
+ var ie = t("pause", [["rect", {
13
13
  x: "14",
14
14
  y: "3",
15
15
  width: "5",
@@ -23,21 +23,32 @@ var J = t("pause", [["rect", {
23
23
  height: "18",
24
24
  rx: "1",
25
25
  key: "1wsw3u"
26
- }]]), re = t("play", [["path", {
26
+ }]]), q = 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
+ }]]), ae = ["data-orientation", "aria-orientation"], oe = /* @__PURE__ */ S({
30
+ __name: "DockSeparator",
31
+ setup(e) {
32
+ let t = s(), n = g(() => t?.orientation.value ?? "horizontal"), r = g(() => n.value), i = g(() => n.value === "vertical" ? "horizontal" : "vertical");
33
+ return (e, t) => (k(), y("div", {
34
+ class: "dock-separator",
35
+ role: "separator",
36
+ "data-orientation": r.value,
37
+ "aria-orientation": i.value
38
+ }, null, 8, ae));
39
+ }
40
+ });
30
41
  //#endregion
31
42
  //#region src/components/custom/dock/composables/isTeleportedTarget.ts
32
- function Y(e, t) {
43
+ function J(e, t) {
33
44
  if (!(e instanceof Element)) return !1;
34
45
  let n = e.closest("[data-glass-dock-portal]");
35
46
  return n ? t ? n.getAttribute("data-glass-dock-owner") === t : !0 : !1;
36
47
  }
37
48
  //#endregion
38
49
  //#region src/components/custom/dock/composables/useDockState.ts
39
- function ie(e) {
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 = N(c ? "pinned" : "collapsed"), u = N(c), d = N(c), f = null, p = N(0), m = g(() => p.value > 0), h = null, _ = null, v = !1, y = l.value;
50
+ function se(e) {
51
+ 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 = j(c ? "pinned" : "collapsed"), u = j(c), d = j(c), f = null, p = j(0), m = g(() => p.value > 0), h = null, _ = null, v = !1, y = l.value;
41
52
  function b() {
42
53
  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;
43
54
  }
@@ -68,96 +79,96 @@ function ie(e) {
68
79
  }
69
80
  v ||= (v = !0, x(), T(), l.value = "collapsed", b(), !1);
70
81
  }
71
- function D() {
82
+ function ee() {
72
83
  if (s()) {
73
84
  l.value = "pinned", b();
74
85
  return;
75
86
  }
76
87
  x(), l.value = "hover", b();
77
88
  }
78
- function O() {
89
+ function D() {
79
90
  s() || (x(), l.value === "collapsed" && (l.value = "hover", b()));
80
91
  }
81
- function k(e) {
92
+ function te(e) {
82
93
  if (!s() && l.value === "hover") {
83
94
  if (p.value > 0) return;
84
95
  if (e) {
85
96
  let t = n.value;
86
- if (t && e.relatedTarget instanceof Node && t.contains(e.relatedTarget) || Y(e.relatedTarget, a)) return;
97
+ if (t && e.relatedTarget instanceof Node && t.contains(e.relatedTarget) || J(e.relatedTarget, a)) return;
87
98
  }
88
99
  w();
89
100
  }
90
101
  }
91
- function j() {
102
+ function k() {
92
103
  s() || (x(), l.value === "collapsed" && (l.value = "hover", b()));
93
104
  }
94
- function M(e) {
105
+ function A(e) {
95
106
  if (s() || l.value !== "hover" || p.value > 0) return;
96
107
  let t = e.currentTarget;
97
- e.relatedTarget && t.contains(e.relatedTarget) || Y(e.relatedTarget, a) || w();
108
+ e.relatedTarget && t.contains(e.relatedTarget) || J(e.relatedTarget, a) || w();
98
109
  }
99
- function P() {
110
+ function M() {
100
111
  if (s()) {
101
112
  l.value = "pinned", b();
102
113
  return;
103
114
  }
104
115
  x(), l.value = "pinned", b();
105
116
  }
106
- function F() {
117
+ function N() {
107
118
  p.value++, x();
108
119
  }
109
- function I() {
120
+ function P() {
110
121
  p.value = Math.max(0, p.value - 1), p.value === 0 && l.value === "hover" && (x(), f = setTimeout(() => {
111
122
  p.value === 0 && l.value === "hover" && w();
112
123
  }, Math.min(t, 800)));
113
124
  }
114
- function L(e) {
125
+ function F(e) {
115
126
  if (s() || i?.value) return;
116
127
  let t = n.value;
117
- !t || t.contains(e.target) || Y(e.target, a) || E();
128
+ !t || t.contains(e.target) || J(e.target, a) || E();
118
129
  }
119
- return V(u, (e) => {
130
+ return B(u, (e) => {
120
131
  e ? (C(), _ = requestAnimationFrame(() => {
121
- _ = null, u.value && (document.addEventListener("pointerdown", L, !0), h = () => {
122
- document.removeEventListener("pointerdown", L, !0), h = null;
132
+ _ = null, u.value && (document.addEventListener("pointerdown", F, !0), h = () => {
133
+ document.removeEventListener("pointerdown", F, !0), h = null;
123
134
  });
124
135
  })) : C();
125
- }), typeof r == "boolean" ? r && (l.value = "pinned", b()) : V(r, (e) => {
136
+ }), typeof r == "boolean" ? r && (l.value = "pinned", b()) : B(r, (e) => {
126
137
  if (e) {
127
138
  x(), l.value = "pinned", b();
128
139
  return;
129
140
  }
130
141
  l.value = "collapsed", b();
131
- }, { immediate: !0 }), A(() => {
142
+ }, { immediate: !0 }), O(() => {
132
143
  x(), C();
133
144
  }), {
134
145
  state: l,
135
146
  expanded: u,
136
147
  isPinned: d,
137
148
  isHeld: m,
138
- onMouseEnter: O,
139
- onMouseLeave: k,
140
- onFocusIn: j,
141
- onFocusOut: M,
142
- onClickCollapsed: P,
143
- keepOpen: F,
144
- release: I,
145
- expand: D,
149
+ onMouseEnter: D,
150
+ onMouseLeave: te,
151
+ onFocusIn: k,
152
+ onFocusOut: A,
153
+ onClickCollapsed: M,
154
+ keepOpen: N,
155
+ release: P,
156
+ expand: ee,
146
157
  collapse: E
147
158
  };
148
159
  }
149
160
  //#endregion
150
161
  //#region src/components/custom/dock/composables/dockMorphContext.ts
151
- var X = {
162
+ var ce = {
152
163
  response: .32,
153
164
  dampingFraction: .7
154
- }, Z = o("glass-ui:dock-morph-context");
155
- Z.KEY;
156
- function ae(e) {
157
- Z.provide(e);
165
+ }, Y = o("glass-ui:dock-morph-context");
166
+ Y.KEY;
167
+ function le(e) {
168
+ Y.provide(e);
158
169
  }
159
- var oe = Z.use;
160
- function se(e) {
170
+ var ue = Y.use;
171
+ function de(e) {
161
172
  let { rootEl: t, outerEl: n, outerActiveLayer: r, outerAxis: i } = e, a = null, o = /* @__PURE__ */ new Set();
162
173
  function s() {
163
174
  return t.value;
@@ -197,9 +208,9 @@ function se(e) {
197
208
  if (!s()) return;
198
209
  let e = a !== null && !a.settled ? a.velocity : 0;
199
210
  if (!a || a.settled) {
200
- c(), a = new q({
201
- response: X.response,
202
- dampingFraction: X.dampingFraction,
211
+ c(), a = new K({
212
+ response: ce.response,
213
+ dampingFraction: ce.dampingFraction,
203
214
  initial: 0,
204
215
  respectReducedMotion: !0
205
216
  });
@@ -260,12 +271,12 @@ function se(e) {
260
271
  containerEl: e.containerEl,
261
272
  activeLayer: e.activeLayer,
262
273
  axis: e.axis,
263
- currentLayer: N(e.activeLayer.value),
264
- leavingLayer: N(null),
274
+ currentLayer: j(e.activeLayer.value),
275
+ leavingLayer: j(null),
265
276
  txId: 0,
266
277
  stop: () => {}
267
278
  };
268
- return t.stop = V(e.activeLayer, (e, n) => {
279
+ return t.stop = B(e.activeLayer, (e, n) => {
269
280
  v(t, e, n);
270
281
  }), o.add(t), t;
271
282
  }
@@ -279,8 +290,8 @@ function se(e) {
279
290
  }), S = { registerGroup(e) {
280
291
  let t = y(e);
281
292
  return {
282
- currentLayer: M(t.currentLayer),
283
- leavingLayer: M(t.leavingLayer),
293
+ currentLayer: A(t.currentLayer),
294
+ leavingLayer: A(t.leavingLayer),
284
295
  release: () => b(t)
285
296
  };
286
297
  } };
@@ -290,44 +301,41 @@ function se(e) {
290
301
  let r = u(i.value);
291
302
  e.propertyName !== r && e.propertyName !== l(i.value) || a && a.settled && (m(x), h());
292
303
  }
293
- return A(() => {
304
+ return O(() => {
294
305
  for (let e of o) e.stop();
295
306
  o.clear(), c();
296
307
  }), {
297
308
  context: S,
298
- outerCurrentLayer: M(x.currentLayer),
309
+ outerCurrentLayer: A(x.currentLayer),
299
310
  onOuterTransitionEnd: C
300
311
  };
301
312
  }
302
313
  //#endregion
303
314
  //#region src/components/custom/dock/GlassDock.vue?vue&type=script&setup=true&lang.ts
304
- var ce = [
315
+ var fe = [
305
316
  "data-density",
306
317
  "data-held",
307
318
  "data-container-name"
308
- ], le = ["inert"], ue = ["inert"], Q = /* @__PURE__ */ S({
319
+ ], pe = {
320
+ key: 0,
321
+ class: "dock-persistent"
322
+ }, me = ["inert"], he = ["inert"], ge = {
323
+ key: 2,
324
+ class: "dock-layers dock-layer--vertical-body"
325
+ }, _e = { class: "dock-layer--vertical-section" }, X = /* @__PURE__ */ S({
309
326
  __name: "GlassDock",
310
327
  props: {
311
- collapseDelay: { default: 2e3 },
312
- startCollapsed: {
313
- type: Boolean,
314
- default: !0
315
- },
316
- fitContent: {
317
- type: Boolean,
318
- default: !1
319
- },
320
- position: { default: "inline" },
321
- alwaysExpanded: {
322
- type: Boolean,
323
- default: !1
324
- },
325
- variant: { default: "dock" },
326
- shape: { default: "pill" },
327
- layout: { default: "linear" },
328
- orientation: { default: "horizontal" },
329
- density: { default: "comfortable" },
330
- overflow: { default: "grow" },
328
+ variant: {},
329
+ collapseDelay: {},
330
+ startCollapsed: { type: Boolean },
331
+ layout: {},
332
+ fitContent: { type: Boolean },
333
+ position: {},
334
+ alwaysExpanded: { type: Boolean },
335
+ shape: {},
336
+ orientation: {},
337
+ density: {},
338
+ overflow: {},
331
339
  containerName: {}
332
340
  },
333
341
  setup(e, { expose: t }) {
@@ -336,154 +344,159 @@ var ce = [
336
344
  "container-type": "inline-size",
337
345
  "container-name": n.containerName
338
346
  };
339
- }), a = B("dockEl"), o = B("layersEl"), s = g(() => n.variant), l = g(() => n.shape), u = g(() => n.layout), d = g(() => n.variant === "rail" || n.variant === "instrument-strip" ? "vertical" : n.orientation), f = g(() => n.density), p = g(() => n.overflow === "scroll" ? d.value === "vertical" ? "dock-scroll-y" : "dock-scroll-x" : null), m = g(() => n.alwaysExpanded || d.value === "vertical" || n.layout === "grid"), h = g(() => n.fitContent || n.variant === "rail" || n.variant === "instrument-strip"), _ = N(!1), v = i(n.collapseDelay), x = `glass-dock-${ee()}`, S = null, C = 0, { expanded: w, isPinned: T, isHeld: A, onMouseEnter: M, onMouseLeave: P, onFocusIn: I, onFocusOut: L, onClickCollapsed: z, keepOpen: te, release: H, expand: U, collapse: W } = ie({
340
- collapseDelay: n.collapseDelay,
341
- rootEl: a,
342
- alwaysExpanded: m,
343
- isTransitioning: _,
344
- dockId: x
347
+ });
348
+ function a(e) {
349
+ return e.variant !== "rail" && e.variant !== "instrument-strip";
350
+ }
351
+ let o = g(() => a(n) ? n.collapseDelay ?? 2e3 : 2e3), s = g(() => a(n) ? n.startCollapsed ?? !0 : !1), l = g(() => a(n) ? n.layout ?? "linear" : "linear"), u = z("dockEl"), d = z("layersEl"), f = g(() => n.variant ?? "dock"), p = g(() => n.shape ?? "pill"), m = l, _ = g(() => n.variant === "rail" || n.variant === "instrument-strip" ? "vertical" : n.orientation ?? "horizontal"), S = g(() => n.density ?? "comfortable"), C = g(() => n.overflow === "scroll" ? _.value === "vertical" ? "dock-scroll-y" : "dock-scroll-x" : null), w = g(() => n.alwaysExpanded || _.value === "vertical" || l.value === "grid"), T = g(() => n.fitContent || n.variant === "rail" || n.variant === "instrument-strip"), O = j(!1), A = i(o.value), M = `glass-dock-${ne()}`, P = null, F = 0, { expanded: L, isPinned: R, isHeld: V, onMouseEnter: H, onMouseLeave: U, onFocusIn: W, onFocusOut: re, onClickCollapsed: G, keepOpen: K, release: ie, expand: q, collapse: ae } = se({
352
+ collapseDelay: o.value,
353
+ rootEl: u,
354
+ alwaysExpanded: w,
355
+ isTransitioning: O,
356
+ dockId: M
345
357
  });
346
358
  c({
347
- id: x,
348
- orientation: d,
349
- keepOpen: te,
350
- release: H,
351
- held: A
359
+ id: M,
360
+ orientation: _,
361
+ layout: m,
362
+ keepOpen: K,
363
+ release: ie,
364
+ held: V
352
365
  });
353
- let G = g(() => m.value || w.value), { context: ne, onOuterTransitionEnd: K } = se({
354
- rootEl: a,
355
- outerEl: o,
356
- outerActiveLayer: g(() => G.value ? "full" : "summary"),
366
+ let J = g(() => w.value || L.value), { context: ce, onOuterTransitionEnd: Y } = de({
367
+ rootEl: u,
368
+ outerEl: d,
369
+ outerActiveLayer: g(() => J.value ? "full" : "summary"),
357
370
  outerAxis: g(() => "horizontal")
358
371
  });
359
- ae(ne);
360
- let q = g(() => ({ "view-transition-name": x.replace(/[^a-zA-Z0-9_-]/g, "-") }));
361
- function J(e) {
372
+ le(ce);
373
+ let ue = g(() => ({ "view-transition-name": M.replace(/[^a-zA-Z0-9_-]/g, "-") }));
374
+ function X(e) {
362
375
  let t = e.trim();
363
376
  return t ? t.endsWith("ms") ? Number.parseFloat(t) : t.endsWith("s") ? Number.parseFloat(t) * 1e3 : Number.parseFloat(t) || 0 : 0;
364
377
  }
365
- function re(e) {
366
- let t = getComputedStyle(e), n = t.transitionDuration.split(",").map(J), r = t.transitionDelay.split(",").map(J);
378
+ function Z(e) {
379
+ let t = getComputedStyle(e), n = t.transitionDuration.split(",").map(X), r = t.transitionDelay.split(",").map(X);
367
380
  return Math.max(0, ...n.map((e, t) => e + (r[t] ?? r[0] ?? 0)));
368
381
  }
369
- function Y(e) {
370
- let t = J(getComputedStyle(e).getPropertyValue("--duration-normal") || "0.3s");
382
+ function ve(e) {
383
+ let t = X(getComputedStyle(e).getPropertyValue("--duration-normal") || "0.3s");
371
384
  return Math.max(t > 0 ? t * 2 : 0, 600);
372
385
  }
373
- function X() {
374
- S &&= (clearTimeout(S), null);
386
+ function Q() {
387
+ P &&= (clearTimeout(P), null);
375
388
  }
376
- let Z = new Set([
389
+ let ye = new Set([
377
390
  "width",
378
391
  "height",
379
392
  "padding",
380
393
  "transform"
381
394
  ]);
382
- function oe() {
383
- let e = a.value;
395
+ function be() {
396
+ let e = u.value;
384
397
  if (!e) return;
385
- let t = ++C;
386
- X(), _.value = !0, S = setTimeout(() => {
387
- t === C && (_.value = !1, S = null);
388
- }, Math.max(re(e), Y(e)) + 50);
398
+ let t = ++F;
399
+ Q(), O.value = !0, P = setTimeout(() => {
400
+ t === F && (O.value = !1, P = null);
401
+ }, Math.max(Z(e), ve(e)) + 50);
389
402
  }
390
- function Q(e) {
391
- e.target === a.value && Z.has(e.propertyName) && (X(), C++, _.value = !1);
403
+ function xe(e) {
404
+ e.target === u.value && ye.has(e.propertyName) && (Q(), F++, O.value = !1);
392
405
  }
393
- k(() => {
394
- (n.alwaysExpanded || !n.startCollapsed) && U();
406
+ te(() => {
407
+ (n.alwaysExpanded || !s.value) && q();
395
408
  });
396
409
  function $() {
397
- return d.value === "horizontal" && !m.value;
410
+ return _.value === "horizontal" && !w.value;
398
411
  }
399
- function de(e) {
400
- if (!$() || G.value) return;
401
- let t = a.value, n = e.touches[0];
402
- !t || !n || v.handleTouchStart(t, n.clientY);
412
+ function Se(e) {
413
+ if (!$() || J.value) return;
414
+ let t = u.value, n = e.touches[0];
415
+ !t || !n || A.handleTouchStart(t, n.clientY);
403
416
  }
404
- function fe(e) {
405
- $() && v.handleScrollCheck(e);
417
+ function Ce(e) {
418
+ $() && A.handleScrollCheck(e);
406
419
  }
407
- function pe() {
420
+ function we() {
408
421
  if (!$()) return;
409
- let e = v.isActive.value;
410
- v.handleTouchEnd(), !e && v.isActive.value && !G.value && U();
422
+ let e = A.isActive.value;
423
+ A.handleTouchEnd(), !e && A.isActive.value && !J.value && q();
411
424
  }
412
- return V(v.isActive, (e) => {
413
- !e && w.value && !T.value && !m.value && W();
414
- }), V(G, (e) => {
415
- oe(), e || v.deactivate();
416
- }), O(X), t({
417
- expanded: w,
418
- isPinned: T,
419
- isHeld: A,
420
- isTransitioning: _,
421
- expand: U,
422
- collapse: W,
423
- keepOpen: te,
424
- release: H
425
- }), (t, n) => (j(), y("div", {
425
+ return B(A.isActive, (e) => {
426
+ !e && L.value && !R.value && !w.value && ae();
427
+ }), B(J, (e) => {
428
+ be(), e || A.deactivate();
429
+ }), D(Q), t({
430
+ expanded: L,
431
+ isPinned: R,
432
+ isHeld: V,
433
+ isTransitioning: O,
434
+ expand: q,
435
+ collapse: ae,
436
+ keepOpen: K,
437
+ release: ie
438
+ }), (t, n) => (k(), y("div", {
426
439
  ref_key: "dockEl",
427
- ref: a,
440
+ ref: u,
428
441
  class: E(["glass-dock", [
429
- d.value,
430
- `variant-${s.value}`,
431
- `shape-${l.value}`,
432
- `layout-${u.value}`,
433
- p.value,
442
+ _.value,
443
+ `variant-${f.value}`,
444
+ `shape-${p.value}`,
445
+ `layout-${I(m)}`,
446
+ C.value,
434
447
  {
435
- expanded: G.value,
436
- collapsed: !G.value,
437
- pinned: R(T),
438
- "fit-content": h.value,
439
- "always-expanded": m.value,
440
- "dock-overflow-wrap": e.overflow === "wrap" && d.value !== "vertical"
448
+ expanded: J.value,
449
+ collapsed: !J.value,
450
+ pinned: I(R),
451
+ "fit-content": T.value,
452
+ "always-expanded": w.value,
453
+ "dock-overflow-wrap": e.overflow === "wrap" && _.value !== "vertical"
441
454
  },
442
455
  e.position === "fixed" ? "fixed bottom-[var(--dock-pos)] left-1/2 -translate-x-1/2" : e.position === "sticky" ? "dock-sticky" : "dock-inline"
443
456
  ]]),
444
- "data-density": f.value,
445
- "data-held": R(A) || void 0,
457
+ "data-density": S.value,
458
+ "data-held": I(V) || void 0,
446
459
  "data-container-name": e.containerName || void 0,
447
- style: D([r.value, q.value]),
448
- onMouseenter: n[2] ||= (...e) => R(M) && R(M)(...e),
449
- onMouseleave: n[3] ||= (e) => R(P)(e),
450
- onFocusin: n[4] ||= (...e) => R(I) && R(I)(...e),
451
- onFocusout: n[5] ||= (...e) => R(L) && R(L)(...e),
452
- onTouchstart: de,
453
- onTouchmove: fe,
454
- onTouchend: pe,
455
- onTransitionend: Q,
456
- onTransitioncancel: Q
457
- }, [d.value === "horizontal" ? (j(), y("div", {
458
- key: 0,
460
+ style: ee([r.value, ue.value]),
461
+ onMouseenter: n[2] ||= (...e) => I(H) && I(H)(...e),
462
+ onMouseleave: n[3] ||= (e) => I(U)(e),
463
+ onFocusin: n[4] ||= (...e) => I(W) && I(W)(...e),
464
+ onFocusout: n[5] ||= (...e) => I(re) && I(re)(...e),
465
+ onTouchstart: Se,
466
+ onTouchmove: Ce,
467
+ onTouchend: we,
468
+ onTransitionend: xe,
469
+ onTransitioncancel: xe
470
+ }, [t.$slots.persistent ? (k(), y("div", pe, [N(t.$slots, "persistent")])) : v("", !0), _.value === "horizontal" ? (k(), y("div", {
471
+ key: 1,
459
472
  ref_key: "layersEl",
460
- ref: o,
473
+ ref: d,
461
474
  class: "dock-layers",
462
- onTransitionend: n[1] ||= (...e) => R(K) && R(K)(...e)
475
+ onTransitionend: n[1] ||= (...e) => I(Y) && I(Y)(...e)
463
476
  }, [b("div", {
464
- class: E(["dock-layer dock-layer--full", { "is-active": G.value }]),
465
- inert: !R(w) || void 0
466
- }, [F(t.$slots, "default")], 10, le), b("div", {
467
- class: E(["dock-layer dock-layer--summary", { "is-active": !G.value }]),
468
- inert: R(w) || void 0,
469
- onClick: n[0] ||= (...e) => R(z) && R(z)(...e)
470
- }, [F(t.$slots, "collapsed")], 10, ue)], 544)) : F(t.$slots, "default", { key: 1 })], 46, ce));
471
- }
472
- }), $ = a("glass-ui:dock-layer-group", "[glass-ui:dock] <DockLayer> must be used inside <DockLayerGroup>");
473
- $.KEY;
474
- function de(e) {
475
- $.provide(e);
477
+ class: E(["dock-layer dock-layer--full", { "is-active": J.value }]),
478
+ inert: !I(L) || void 0
479
+ }, [N(t.$slots, "default")], 10, me), b("div", {
480
+ class: E(["dock-layer dock-layer--summary", { "is-active": !J.value }]),
481
+ inert: I(L) || void 0,
482
+ onClick: n[0] ||= (...e) => I(G) && I(G)(...e)
483
+ }, [N(t.$slots, "collapsed")], 10, he)], 544)) : (k(), y("div", ge, [N(t.$slots, "default"), t.$slots.collapsed ? (k(), y(h, { key: 0 }, [x(oe), b("div", _e, [N(t.$slots, "collapsed")])], 64)) : v("", !0)]))], 46, fe));
484
+ }
485
+ }), Z = a("glass-ui:dock-layer-group", "[glass-ui:dock] <DockLayer> must be used inside <DockLayerGroup>");
486
+ Z.KEY;
487
+ function ve(e) {
488
+ Z.provide(e);
476
489
  }
477
- var fe = $.use;
478
- $.useOptional;
490
+ var Q = Z.use;
491
+ Z.useOptional;
479
492
  //#endregion
480
493
  //#region src/components/custom/dock/composables/useLayerTransition.ts
481
- var pe = {
494
+ var ye = {
482
495
  response: .32,
483
496
  dampingFraction: .7
484
497
  };
485
- function me(e) {
486
- let { containerEl: t, activeLayer: n, axis: r } = e, i = g(() => r?.value === "vertical" ? "height" : "width"), a = g(() => i.value === "width" ? "inline-size" : "block-size"), o = (e) => e.getBoundingClientRect()[i.value], s = N(n.value), c = N(null), l = 0, u = null, d = null;
498
+ function be(e) {
499
+ let { containerEl: t, activeLayer: n, axis: r } = e, i = g(() => r?.value === "vertical" ? "height" : "width"), a = g(() => i.value === "width" ? "inline-size" : "block-size"), o = (e) => e.getBoundingClientRect()[i.value], s = j(n.value), c = j(null), l = 0, u = null, d = null;
487
500
  function f() {
488
501
  u &&= (u.dispose(), null), d = null;
489
502
  }
@@ -501,9 +514,9 @@ function me(e) {
501
514
  h(e, t);
502
515
  return;
503
516
  }
504
- e.style.setProperty("--dock-morph-from", `${r}px`), e.style.setProperty("--dock-morph-to", `${i}px`), t.style.setProperty("--dock-morph-t", "0"), t.setAttribute("data-morphing", ""), o || (f(), u = new q({
505
- response: pe.response,
506
- dampingFraction: pe.dampingFraction,
517
+ e.style.setProperty("--dock-morph-from", `${r}px`), e.style.setProperty("--dock-morph-to", `${i}px`), t.style.setProperty("--dock-morph-t", "0"), t.setAttribute("data-morphing", ""), o || (f(), u = new K({
518
+ response: ye.response,
519
+ dampingFraction: ye.dampingFraction,
507
520
  initial: 0,
508
521
  respectReducedMotion: !0
509
522
  }), d = e);
@@ -512,7 +525,7 @@ function me(e) {
512
525
  n === l && (t.style.setProperty("--dock-morph-t", `${r}`), s.settled && h(e, t));
513
526
  });
514
527
  }
515
- V(n, (e, n) => {
528
+ B(n, (e, n) => {
516
529
  if (e === n) return;
517
530
  let r = t.value;
518
531
  if (!r) {
@@ -534,7 +547,7 @@ function me(e) {
534
547
  let n = t.value;
535
548
  n && e.target === n && (e.propertyName !== a.value && e.propertyName !== i.value || u && u.settled && h(n, p(n)));
536
549
  }
537
- return A(f), {
550
+ return O(f), {
538
551
  onTransitionEnd: v,
539
552
  currentLayer: s,
540
553
  leavingLayer: c
@@ -542,7 +555,7 @@ function me(e) {
542
555
  }
543
556
  //#endregion
544
557
  //#region src/components/custom/dock/DockLayerGroup.vue?vue&type=script&setup=true&lang.ts
545
- var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
558
+ var xe = { key: 1 }, $ = { key: 2 }, Se = /* @__PURE__ */ S({
546
559
  __name: "DockLayerGroup",
547
560
  props: /* @__PURE__ */ C({
548
561
  orientation: {},
@@ -557,23 +570,23 @@ var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
557
570
  }),
558
571
  emits: ["update:active"],
559
572
  setup(e) {
560
- let t = e, n = te(e, "active"), r = s(), i = N([]), a = B("containerEl");
573
+ let t = e, n = R(e, "active"), r = s(), i = j([]), a = z("containerEl");
561
574
  function o(e) {
562
575
  i.value.find((t) => t.id === e.id) || i.value.push(e);
563
576
  }
564
577
  function c(e) {
565
578
  i.value = i.value.filter((t) => t.id !== e);
566
579
  }
567
- let l = g(() => t.orientation ?? r?.orientation.value ?? "horizontal"), u = oe(), S, C, w;
568
- if (u) {
569
- let e = u.registerGroup({
580
+ let l = g(() => t.orientation ?? r?.orientation.value ?? "horizontal"), u = g(() => l.value === "vertical" ? "horizontal" : "vertical"), S = ue(), C, w, T;
581
+ if (S) {
582
+ let e = S.registerGroup({
570
583
  containerEl: a,
571
584
  activeLayer: n,
572
585
  axis: l
573
586
  });
574
- S = e.currentLayer, C = e.leavingLayer, w = () => {}, O(() => e.release());
587
+ C = e.currentLayer, w = e.leavingLayer, T = () => {}, D(() => e.release());
575
588
  } else {
576
- let e = me({
589
+ let e = be({
577
590
  containerEl: a,
578
591
  activeLayer: n,
579
592
  axis: l,
@@ -582,74 +595,74 @@ var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
582
595
  return [i.value.findIndex((e) => e.id === t) < n ? "layer-back" : "layer-forward"];
583
596
  }
584
597
  });
585
- S = M(e.currentLayer), C = M(e.leavingLayer), w = e.onTransitionEnd;
598
+ C = A(e.currentLayer), w = A(e.leavingLayer), T = e.onTransitionEnd;
586
599
  }
587
- let T = typeof document < "u" && "startViewTransition" in document, k = ee(), A = g(() => T ? {
588
- "view-transition-name": `gl-dock-stack-${k.replace(/[^a-zA-Z0-9_-]/g, "-")}`,
600
+ let te = typeof document < "u" && "startViewTransition" in document, O = ne(), L = g(() => te ? {
601
+ "view-transition-name": `gl-dock-stack-${O.replace(/[^a-zA-Z0-9_-]/g, "-")}`,
589
602
  "view-transition-class": "gl-dock-layer"
590
603
  } : void 0);
591
- de({
604
+ ve({
592
605
  register: o,
593
606
  unregister: c,
594
- currentLayerId: S,
595
- leavingLayerId: C
607
+ currentLayerId: C,
608
+ leavingLayerId: w
596
609
  });
597
- function z(e) {
610
+ function B(e) {
598
611
  return typeof e == "object" && !!e;
599
612
  }
600
- let V = N(!1);
613
+ let H = j(!1);
601
614
  function U() {
602
- V.value || (V.value = !0, r?.keepOpen());
615
+ H.value || (H.value = !0, r?.keepOpen());
603
616
  }
604
617
  function W(e) {
605
618
  let t = e.relatedTarget, n = e.currentTarget;
606
- t && n?.contains(t) || V.value && (V.value = !1, r?.release());
619
+ t && n?.contains(t) || H.value && (H.value = !1, r?.release());
607
620
  }
608
- return (t, r) => (j(), y("div", { class: E(["dock-layer-group", [l.value, `rail-${e.railPosition}`]]) }, [e.showRail && i.value.length > 1 ? (j(), _(R(d), {
621
+ return (t, r) => (k(), y("div", { class: E(["dock-layer-group", [l.value, `rail-${e.railPosition}`]]) }, [e.showRail && i.value.length > 1 ? (k(), _(I(d), {
609
622
  key: 0,
610
623
  modelValue: n.value,
611
624
  "onUpdate:modelValue": r[0] ||= (e) => n.value = e,
612
- orientation: "horizontal",
625
+ orientation: u.value,
613
626
  "as-child": !0
614
627
  }, {
615
- default: H(() => [x(R(m), {
628
+ default: V(() => [x(I(m), {
616
629
  class: E(["dock-layer-rail", e.railPosition]),
617
630
  onFocusin: U,
618
631
  onFocusout: W
619
632
  }, {
620
- default: H(() => [(j(!0), y(h, null, P(i.value, (e) => (j(), _(R(p), {
633
+ default: V(() => [(k(!0), y(h, null, M(i.value, (e) => (k(), _(I(p), {
621
634
  key: e.id,
622
635
  value: e.id,
623
636
  class: "dock-layer-tab",
624
637
  title: e.label,
625
638
  "aria-label": e.label ?? e.id
626
639
  }, {
627
- default: H(() => [z(e.icon) ? (j(), _(I(e.icon), {
640
+ default: V(() => [B(e.icon) ? (k(), _(P(e.icon), {
628
641
  key: 0,
629
642
  class: "size-4"
630
- })) : typeof e.icon == "string" ? (j(), y("span", he, L(e.icon), 1)) : (j(), y("span", ge, L((e.label ?? e.id).charAt(0)), 1))]),
643
+ })) : typeof e.icon == "string" ? (k(), y("span", xe, F(e.icon), 1)) : (k(), y("span", $, F((e.label ?? e.id).charAt(0)), 1))]),
631
644
  _: 2
632
645
  }, 1032, [
633
646
  "value",
634
647
  "title",
635
648
  "aria-label"
636
- ]))), 128)), x(R(f), { class: "dock-layer-tab-indicator" })]),
649
+ ]))), 128)), x(I(f), { class: "dock-layer-tab-indicator" })]),
637
650
  _: 1
638
651
  }, 8, ["class"])]),
639
652
  _: 1
640
- }, 8, ["modelValue"])) : v("", !0), b("div", {
653
+ }, 8, ["modelValue", "orientation"])) : v("", !0), b("div", {
641
654
  ref_key: "containerEl",
642
655
  ref: a,
643
656
  class: "dock-layer-stack",
644
- style: D(A.value),
645
- onTransitionend: r[1] ||= (...e) => R(w) && R(w)(...e)
646
- }, [F(t.$slots, "default")], 36)], 2));
657
+ style: ee(L.value),
658
+ onTransitionend: r[1] ||= (...e) => I(T) && I(T)(...e)
659
+ }, [N(t.$slots, "default")], 36)], 2));
647
660
  }
648
- }), ve = [
661
+ }), Ce = [
649
662
  "inert",
650
663
  "aria-hidden",
651
664
  "tabindex"
652
- ], ye = /* @__PURE__ */ S({
665
+ ], we = /* @__PURE__ */ S({
653
666
  __name: "DockLayer",
654
667
  props: {
655
668
  id: {},
@@ -657,23 +670,23 @@ var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
657
670
  icon: {}
658
671
  },
659
672
  setup(e) {
660
- let t = e, n = fe();
661
- k(() => {
673
+ let t = e, n = Q();
674
+ te(() => {
662
675
  n.register({
663
676
  id: t.id,
664
677
  label: t.label,
665
678
  icon: t.icon
666
679
  });
667
- }), O(() => {
680
+ }), D(() => {
668
681
  n.unregister(t.id);
669
682
  });
670
- let r = g(() => n.currentLayerId.value === t.id), i = g(() => n.leavingLayerId.value === t.id), a = B("hostEl");
671
- return V(r, async (e, t) => {
683
+ let r = g(() => n.currentLayerId.value === t.id), i = g(() => n.leavingLayerId.value === t.id), a = z("hostEl");
684
+ return B(r, async (e, t) => {
672
685
  !e || t || typeof document < "u" && (() => {
673
686
  let e = document.activeElement;
674
687
  return !e || e === document.body ? !0 : !!e.closest("[inert]");
675
688
  })() && (await T(), a.value?.focus());
676
- }), (e, t) => (j(), y("div", {
689
+ }), (e, t) => (k(), y("div", {
677
690
  ref_key: "hostEl",
678
691
  ref: a,
679
692
  class: E(["dock-layer-item-host", {
@@ -683,9 +696,9 @@ var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
683
696
  inert: r.value ? void 0 : !0,
684
697
  "aria-hidden": r.value ? void 0 : !0,
685
698
  tabindex: r.value ? -1 : void 0
686
- }, [F(e.$slots, "default")], 10, ve));
699
+ }, [N(e.$slots, "default")], 10, Ce));
687
700
  }
688
- }), be = /* @__PURE__ */ S({
701
+ }), Te = /* @__PURE__ */ S({
689
702
  __name: "DockIconButton",
690
703
  props: {
691
704
  compact: {
@@ -708,15 +721,15 @@ var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
708
721
  },
709
722
  setup(t) {
710
723
  let n = t, i = g(() => e("dock-icon-button glass-specular-track", { "dock-icon-button--compact": n.compact }, n.class)), { specularStyle: a, onPointerMove: o } = r(), s = g(() => !n.asChild && n.as === "button" ? { type: n.type } : {});
711
- return (e, n) => (j(), _(R(W), w({
724
+ return (e, n) => (k(), _(I(U), w({
712
725
  as: t.as,
713
726
  "as-child": t.asChild
714
727
  }, s.value, {
715
728
  class: i.value,
716
- style: R(a),
717
- onPointermove: R(o)
729
+ style: I(a),
730
+ onPointermove: I(o)
718
731
  }), {
719
- default: H(() => [F(e.$slots, "default")]),
732
+ default: V(() => [N(e.$slots, "default")]),
720
733
  _: 3
721
734
  }, 16, [
722
735
  "as",
@@ -726,7 +739,7 @@ var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
726
739
  "onPointermove"
727
740
  ]));
728
741
  }
729
- }), xe = /* @__PURE__ */ S({
742
+ }), Ee = /* @__PURE__ */ S({
730
743
  __name: "DockBackgroundToggle",
731
744
  props: {
732
745
  paused: {
@@ -742,18 +755,18 @@ var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
742
755
  function a() {
743
756
  r("update:paused", !n.paused);
744
757
  }
745
- return (t, n) => (j(), _(be, {
758
+ return (t, n) => (k(), _(Te, {
746
759
  type: "button",
747
760
  "aria-pressed": e.paused,
748
761
  "aria-label": i.value,
749
762
  title: i.value,
750
763
  onClick: a
751
764
  }, {
752
- default: H(() => [e.paused ? (j(), _(R(re), {
765
+ default: V(() => [e.paused ? (k(), _(I(q), {
753
766
  key: 0,
754
767
  size: 18,
755
768
  "aria-hidden": "true"
756
- })) : (j(), _(R(J), {
769
+ })) : (k(), _(I(ie), {
757
770
  key: 1,
758
771
  size: 18,
759
772
  "aria-hidden": "true"
@@ -765,7 +778,7 @@ var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
765
778
  "title"
766
779
  ]));
767
780
  }
768
- }), Se = /* @__PURE__ */ S({
781
+ }), De = /* @__PURE__ */ S({
769
782
  __name: "DockTabButton",
770
783
  props: {
771
784
  as: { default: "button" },
@@ -782,13 +795,13 @@ var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
782
795
  ] }
783
796
  },
784
797
  setup(t) {
785
- let n = t, r = z(), i = g(() => r["data-tier"] === "primary"), a = g(() => e("dock-tab-button", i.value && "btn-audacious", n.class));
786
- return (e, n) => (j(), _(R(W), {
798
+ let n = t, r = L(), i = g(() => r["data-tier"] === "primary"), a = g(() => e("dock-tab-button", i.value && "btn-audacious", n.class));
799
+ return (e, n) => (k(), _(I(U), {
787
800
  as: t.as,
788
801
  "as-child": t.asChild,
789
802
  class: E(a.value)
790
803
  }, {
791
- default: H(() => [F(e.$slots, "default")]),
804
+ default: V(() => [N(e.$slots, "default")]),
792
805
  _: 3
793
806
  }, 8, [
794
807
  "as",
@@ -796,7 +809,7 @@ var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
796
809
  "class"
797
810
  ]));
798
811
  }
799
- }), Ce = /* @__PURE__ */ S({
812
+ }), Oe = /* @__PURE__ */ S({
800
813
  __name: "DockSelectTrigger",
801
814
  props: {
802
815
  disabled: { type: Boolean },
@@ -812,19 +825,19 @@ var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
812
825
  ] }
813
826
  },
814
827
  setup(t) {
815
- let r = t, i = K(g(() => {
828
+ let r = t, i = G(g(() => {
816
829
  let { class: e, ...t } = r;
817
830
  return t;
818
831
  }));
819
- return (t, a) => (j(), _(R(ne), w(R(i), { class: R(e)("dock-select-trigger", r.class) }), {
820
- default: H(() => [F(t.$slots, "default"), x(R(G), { "as-child": "" }, {
821
- default: H(() => [F(t.$slots, "icon", {}, () => [x(R(n), { class: "dock-select-trigger__chevron" })])]),
832
+ return (t, a) => (k(), _(I(re), w(I(i), { class: I(e)("dock-select-trigger", r.class) }), {
833
+ default: V(() => [N(t.$slots, "default"), x(I(W), { "as-child": "" }, {
834
+ default: V(() => [N(t.$slots, "icon", {}, () => [x(I(n), { class: "dock-select-trigger__chevron" })])]),
822
835
  _: 3
823
836
  })]),
824
837
  _: 3
825
838
  }, 16, ["class"]));
826
839
  }
827
- }), we = /* @__PURE__ */ S({
840
+ }), ke = /* @__PURE__ */ S({
828
841
  __name: "DockDropdownTrigger",
829
842
  props: {
830
843
  disabled: { type: Boolean },
@@ -840,15 +853,15 @@ var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
840
853
  ] }
841
854
  },
842
855
  setup(t) {
843
- let n = t, r = K(g(() => {
856
+ let n = t, r = G(g(() => {
844
857
  let { class: e, ...t } = n;
845
858
  return t;
846
859
  }));
847
- return (t, i) => (j(), _(R(U), w(R(r), { class: R(e)("dock-dropdown-trigger", n.class) }), {
848
- default: H(() => [F(t.$slots, "default")]),
860
+ return (t, i) => (k(), _(I(H), w(I(r), { class: I(e)("dock-dropdown-trigger", n.class) }), {
861
+ default: V(() => [N(t.$slots, "default")]),
849
862
  _: 3
850
863
  }, 16, ["class"]));
851
864
  }
852
865
  });
853
866
  //#endregion
854
- export { u as DOCK_CONTEXT_KEY, xe as DockBackgroundToggle, we as DockDropdownTrigger, be as DockIconButton, ye as DockLayer, _e as DockLayerGroup, Ce as DockSelectTrigger, Se as DockTabButton, Q as GlassDock, c as provideDockContext, l as useDockContext, me as useLayerTransition, s as useOptionalDockContext };
867
+ export { u as DOCK_CONTEXT_KEY, Ee as DockBackgroundToggle, ke as DockDropdownTrigger, Te as DockIconButton, we as DockLayer, Se as DockLayerGroup, Oe as DockSelectTrigger, oe as DockSeparator, De as DockTabButton, X as GlassDock, c as provideDockContext, l as useDockContext, be as useLayerTransition, s as useOptionalDockContext };