@mkbabb/glass-ui 8.0.0 → 9.0.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 (142) hide show
  1. package/dist/aurora.js +371 -349
  2. package/dist/blob.js +42 -42
  3. package/dist/{checkbox-BnXuGgJ3.js → checkbox-B1qn65se.js} +1 -1
  4. package/dist/checkbox.js +1 -1
  5. package/dist/color.glsl-DTJhdekG.js +34 -0
  6. package/dist/color.wgsl-BTszLY39.js +398 -0
  7. package/dist/{command-BuBnYpxF.js → command-tEzAaVY_.js} +1 -1
  8. package/dist/command.js +1 -1
  9. package/dist/components/_shared/control.d.ts +0 -1
  10. package/dist/components/_shared/index.d.ts +0 -1
  11. package/dist/components/aurora/Aurora.vue.d.ts +1 -0
  12. package/dist/components/aurora/composables/frameLoop.d.ts +6 -5
  13. package/dist/components/aurora/composables/runtime.d.ts +26 -1
  14. package/dist/components/aurora/composables/useAurora.d.ts +28 -0
  15. package/dist/components/aurora/composables/wgpuSetup.d.ts +1 -1
  16. package/dist/components/aurora/constants/presets.d.ts +44 -5
  17. package/dist/components/aurora/index.d.ts +1 -1
  18. package/dist/components/configurator/Configurator.vue.d.ts +25 -2
  19. package/dist/components/configurator/ConfiguratorRow.vue.d.ts +4 -2
  20. package/dist/components/configurator/styles.css +1 -1
  21. package/dist/components/dock/DockSeparator.vue.d.ts +2 -3
  22. package/dist/components/dock/GlassDock.vue.d.ts +1 -0
  23. package/dist/components/dock/composables/dockContext.d.ts +1 -8
  24. package/dist/components/dock/composables/useDockRun.d.ts +20 -0
  25. package/dist/components/dock/composables/useDockSearch.d.ts +1 -1
  26. package/dist/components/dock/composables/useDockShellProps.d.ts +18 -101
  27. package/dist/components/dock/composables/useDockState.d.ts +2 -9
  28. package/dist/components/dock/constants.d.ts +15 -0
  29. package/dist/components/dock/index.d.ts +2 -2
  30. package/dist/components/dock/styles/controls/icon-button.css +1 -1
  31. package/dist/components/dock/styles/controls/tab-button.css +1 -1
  32. package/dist/components/dock/styles/controls/triggers.css +1 -1
  33. package/dist/components/dock/styles/controls.css +1 -1
  34. package/dist/components/dock/styles/density.css +1 -1
  35. package/dist/components/dock/styles/index.css +1 -1
  36. package/dist/components/dock/styles/layer-group.css +1 -1
  37. package/dist/components/dock/styles/layers.css +1 -1
  38. package/dist/components/dock/styles/morph.css +1 -1
  39. package/dist/components/dock/styles/run.css +1 -0
  40. package/dist/components/dock/styles/search.css +1 -1
  41. package/dist/components/dock/styles/shape.css +1 -1
  42. package/dist/components/dock/styles/shell-regions.css +1 -1
  43. package/dist/components/dock/styles/shell.css +1 -1
  44. package/dist/components/fourier-field/FourierField.vue.d.ts +28 -25
  45. package/dist/components/fourier-field/clock.d.ts +35 -0
  46. package/dist/components/fourier-field/constants.d.ts +78 -103
  47. package/dist/components/fourier-field/index.d.ts +3 -28
  48. package/dist/components/fourier-field/math.d.ts +69 -77
  49. package/dist/components/fourier-field/renderer/mint.d.ts +50 -0
  50. package/dist/components/fourier-field/renderer/uniforms.d.ts +84 -0
  51. package/dist/components/fourier-field/renderer/wgpu.d.ts +28 -0
  52. package/dist/components/fourier-field/shaders/compute.wgsl.d.ts +1 -0
  53. package/dist/components/fourier-field/shaders/render.wgsl.d.ts +1 -0
  54. package/dist/components/fourier-field/useFourierField.d.ts +49 -0
  55. package/dist/components/handmark/HandMark.vue.d.ts +18 -14
  56. package/dist/components/handmark/index.d.ts +4 -23
  57. package/dist/components/handmark/stroke.d.ts +92 -0
  58. package/dist/composables/dark/darkModeSyncScript.d.ts +19 -0
  59. package/dist/composables/motion/pointer/pointerFieldMappings.d.ts +0 -41
  60. package/dist/{components/search/composables → composables/search}/index.d.ts +2 -2
  61. package/dist/{components/search/composables/fuzzySearchIndex.d.ts → composables/search/match.d.ts} +8 -3
  62. package/dist/configurator-BHJymdrF.js +339 -0
  63. package/dist/configurator.js +1 -1
  64. package/dist/constellation.js +2 -2
  65. package/dist/control-DJp15L4U.js +7 -0
  66. package/dist/{dark-z_P5QwqI.js → dark-CLlmo7dD.js} +2 -2
  67. package/dist/dark-mode-toggle.js +1 -1
  68. package/dist/dark.js +1 -1
  69. package/dist/dock.js +712 -486
  70. package/dist/dom.js +90 -8
  71. package/dist/easing.js +3 -3
  72. package/dist/expandable-container-BY1hQXi4.js +142 -0
  73. package/dist/expandable-container.js +2 -142
  74. package/dist/fourier-field.js +643 -855
  75. package/dist/fourier-math.js +6 -6
  76. package/dist/glass-ui.css +1 -1
  77. package/dist/glass-ui.js +85 -72
  78. package/dist/handmark.js +330 -718
  79. package/dist/index.d.ts +1 -1
  80. package/dist/labeled-field.js +2 -2
  81. package/dist/{menu-wLu1XGKn.js → menu-TDMNtZjG.js} +1 -1
  82. package/dist/menu.js +1 -1
  83. package/dist/motion-core.js +34 -34
  84. package/dist/{participation-B0hdsIRo.js → participation-Di4UHbzk.js} +8 -8
  85. package/dist/{pointerFieldMappings-DP5tla5z.js → pointerFieldMappings-DXwlU5uj.js} +7 -23
  86. package/dist/{popover-DBMKTPkL.js → popover-C04Rrdcz.js} +1 -1
  87. package/dist/popover.js +1 -1
  88. package/dist/{radio-group-Ci8o-pDx.js → radio-group-BNV7PN1O.js} +1 -1
  89. package/dist/radio-group.js +1 -1
  90. package/dist/{select-CDgwGH_P.js → select-COox45Kv.js} +1 -1
  91. package/dist/select.js +1 -1
  92. package/dist/{slider-gsc8jDIo.js → slider-5ChjjWSR.js} +1 -1
  93. package/dist/slider.js +1 -1
  94. package/dist/styles/components.css +1 -1
  95. package/dist/styles/glass/material.css +1 -1
  96. package/dist/styles/glass/overlay-plate.css +1 -1
  97. package/dist/{switch-DxZzDrmV.js → switch-lLkbREB-.js} +1 -1
  98. package/dist/switch.js +1 -1
  99. package/dist/{tabs-CYscnq5H.js → tabs-DSJMd1Et.js} +1 -1
  100. package/dist/tabs.js +1 -1
  101. package/dist/{toggle-group-11aPGMfE.js → toggle-group-DUcmKnDw.js} +1 -1
  102. package/dist/toggle-group.js +1 -1
  103. package/dist/{tooltip-DqKMZ4dn.js → tooltip-BKk2qVDn.js} +1 -1
  104. package/dist/tooltip.js +1 -1
  105. package/dist/{resolveCanvasColor-6MCrswTB.js → useCanvas2D-CQRElMyE.js} +1 -11
  106. package/dist/useResolveTokenColor-B2FfJnd9.js +24 -0
  107. package/package.json +2 -20
  108. package/dist/canvas.d.ts +0 -1
  109. package/dist/canvas.js +0 -2
  110. package/dist/color.wgsl-B0N3mKMb.js +0 -412
  111. package/dist/compile-D7VYG3gi.js +0 -19
  112. package/dist/components/dock/composables/useDockOverflowFit.d.ts +0 -20
  113. package/dist/components/dock/composables/useDockTouchGate.d.ts +0 -42
  114. package/dist/components/dock/styles/overflow.css +0 -1
  115. package/dist/components/fourier-field/composables/fourierFieldGLSetup.d.ts +0 -24
  116. package/dist/components/fourier-field/composables/fourierFieldWGPUSetup.d.ts +0 -31
  117. package/dist/components/fourier-field/composables/uniformBridgeWGPU.d.ts +0 -39
  118. package/dist/components/fourier-field/composables/useFourierField.d.ts +0 -56
  119. package/dist/components/fourier-field/shaders/fourier-field.compute.wgsl.d.ts +0 -1
  120. package/dist/components/fourier-field/shaders/fourier-field.glsl.d.ts +0 -4
  121. package/dist/components/fourier-field/shaders/fourier-field.render.wgsl.d.ts +0 -1
  122. package/dist/components/fourier-field/shaders/fourier-field.ribbon.d.ts +0 -51
  123. package/dist/components/handmark/brush.d.ts +0 -269
  124. package/dist/components/handmark/composables/useHandMark.d.ts +0 -99
  125. package/dist/components/handmark/constants.d.ts +0 -69
  126. package/dist/components/handmark/freehand.d.ts +0 -69
  127. package/dist/components/handmark/geometry.d.ts +0 -62
  128. package/dist/components/handmark/ink.d.ts +0 -11
  129. package/dist/components/handmark/noise.d.ts +0 -30
  130. package/dist/components/handmark/texture.d.ts +0 -39
  131. package/dist/components/handmark/types.d.ts +0 -70
  132. package/dist/components/search/SearchBar.vue.d.ts +0 -38
  133. package/dist/components/search/index.d.ts +0 -8
  134. package/dist/components/search/searchVariants.d.ts +0 -16
  135. package/dist/configurator-BoeScnDL.js +0 -311
  136. package/dist/control-Da4XeT43.js +0 -11
  137. package/dist/search.d.ts +0 -1
  138. package/dist/search.js +0 -61
  139. package/dist/useFuzzySearch-CUnZknpm.js +0 -177
  140. package/dist/useResolveTokenColor-CspQv_ik.js +0 -107
  141. /package/dist/{components/search/composables → composables/search}/types.d.ts +0 -0
  142. /package/dist/{components/search/composables → composables/search}/useFuzzySearch.d.ts +0 -0
package/dist/dock.js CHANGED
@@ -6,9 +6,9 @@ import { n as i } from "./springPresets-Cbe0Voqg.js";
6
6
  import { t as a } from "./useLiquidPress-h1scrPtP.js";
7
7
  import { t as o } from "./useMotionAxis-D-rtIhca.js";
8
8
  import { n as s, t as c } from "./createContext-BhkE9mLH.js";
9
- import { a as l, c as u, i as d, l as f, n as p, o as m, r as h, s as g } from "./participation-B0hdsIRo.js";
10
- import { t as _ } from "./useResizeObserver-CdUlm2QZ.js";
11
- import { n as v, r as y } from "./useResolveTokenColor-CspQv_ik.js";
9
+ import { a as l, c as u, i as d, l as f, n as p, o as m, r as h, s as g, u as _ } from "./participation-Di4UHbzk.js";
10
+ import { t as v } from "./useResizeObserver-CdUlm2QZ.js";
11
+ import { n as y } from "./useResolveTokenColor-B2FfJnd9.js";
12
12
  import { t as b } from "./focus-Duf7EpUu.js";
13
13
  import { t as x } from "./DropdownMenuTrigger-8UZsBtZ8.js";
14
14
  import { t as S } from "./useSelectionGroup-zsEwitF6.js";
@@ -16,35 +16,34 @@ import { t as C } from "./useDragMorph-B363RUbF.js";
16
16
  import { n as w } from "./useDockCtaReceive-BSSgD6mu.js";
17
17
  import { n as T, t as E } from "./useScrollChrome-BJbWV32F.js";
18
18
  import { t as D } from "./useIntersectionPause-CzKR3EyP.js";
19
- import { t as O } from "./useFuzzySearch-CUnZknpm.js";
20
- 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 ee, mergeProps as L, nextTick as R, normalizeClass as z, normalizeStyle as B, onBeforeUnmount as te, onMounted as V, onScopeDispose as ne, onUnmounted as H, openBlock as U, readonly as W, ref as G, renderList as re, renderSlot as K, resolveDynamicComponent as q, toDisplayString as ie, unref as J, useId as ae, useModel as Y, useTemplateRef as X, watch as Z, withCtx as Q, withDirectives as oe, withModifiers as se } from "vue";
21
- import { PopoverTrigger as ce, Primitive as le, SelectIcon as ue, SelectTrigger as de } from "reka-ui";
22
- import { ChevronDown as fe, Pause as pe, Play as me } from "@lucide/vue";
23
- import { SpringProgress as he } from "@mkbabb/keyframes.js";
24
- import { useMediaQuery as ge } from "@vueuse/core";
19
+ import { Fragment as O, computed as k, createBlock as A, createCommentVNode as j, createElementBlock as M, createElementVNode as N, createVNode as P, defineComponent as F, mergeModels as I, mergeProps as L, nextTick as R, normalizeClass as z, normalizeStyle as B, onBeforeUnmount as V, onMounted as H, onScopeDispose as U, onUnmounted as W, openBlock as G, readonly as K, ref as q, renderList as ee, renderSlot as J, resolveDynamicComponent as te, toDisplayString as ne, unref as Y, useId as re, useModel as ie, useTemplateRef as X, watch as Z, withCtx as Q, withDirectives as $, withModifiers as ae } from "vue";
20
+ import { PopoverTrigger as oe, Primitive as se, SelectIcon as ce, SelectTrigger as le } from "reka-ui";
21
+ import { ChevronDown as ue, Pause as de, Play as fe } from "@lucide/vue";
22
+ import { SpringProgress as pe } from "@mkbabb/keyframes.js";
23
+ import { useMediaQuery as me } from "@vueuse/core";
25
24
  //#region src/components/_shared/overlay/isTeleportedTarget.ts
26
- function $(e, t) {
25
+ function he(e, t) {
27
26
  if (!(e instanceof Element)) return !1;
28
27
  let n = e.closest("[data-glass-dock-portal]");
29
28
  return n ? !t || n.getAttribute("data-glass-dock-owner") === t : !1;
30
29
  }
31
30
  //#endregion
32
31
  //#region src/composables/glass/backdropSampleMath.ts
33
- function _e(e) {
32
+ function ge(e) {
34
33
  let t = e / 255;
35
34
  return t <= .03928 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
36
35
  }
37
- function ve(e, t, n) {
38
- return .2126 * _e(e) + .7152 * _e(t) + .0722 * _e(n);
36
+ function _e(e, t, n) {
37
+ return .2126 * ge(e) + .7152 * ge(t) + .0722 * ge(n);
39
38
  }
40
- function ye(e, t, n, r, i) {
39
+ function ve(e, t, n, r, i) {
41
40
  return [
42
41
  e * r + i[0] * (1 - r),
43
42
  t * r + i[1] * (1 - r),
44
43
  n * r + i[2] * (1 - r)
45
44
  ];
46
45
  }
47
- function be(e) {
46
+ function ye(e) {
48
47
  let t = e.match(/rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:[,\s/]+([\d.]+))?/i);
49
48
  return t ? [
50
49
  Number(t[1]),
@@ -53,31 +52,31 @@ function be(e) {
53
52
  t[4] === void 0 ? 1 : Number(t[4])
54
53
  ] : null;
55
54
  }
56
- function xe(e) {
55
+ function be(e) {
57
56
  return typeof HTMLCanvasElement < "u" && e instanceof HTMLCanvasElement;
58
57
  }
59
- var Se = "[data-glass-field-canvas] canvas, canvas[data-glass-field-canvas]";
60
- function Ce(e) {
58
+ var xe = "[data-glass-field-canvas] canvas, canvas[data-glass-field-canvas]";
59
+ function Se(e) {
61
60
  if (!e) {
62
61
  if (typeof document < "u") {
63
- let e = document.querySelector(Se);
64
- if (xe(e)) return e;
62
+ let e = document.querySelector(xe);
63
+ if (be(e)) return e;
65
64
  }
66
65
  return null;
67
66
  }
68
- if (xe(e)) return e;
67
+ if (be(e)) return e;
69
68
  if (typeof e == "function") {
70
69
  let t = e();
71
- return xe(t) ? t : null;
70
+ return be(t) ? t : null;
72
71
  }
73
72
  if (typeof e == "string" && typeof document < "u") {
74
73
  let t = document.querySelector(e);
75
- return xe(t) ? t : null;
74
+ return be(t) ? t : null;
76
75
  }
77
76
  return null;
78
77
  }
79
- function we(e, t) {
80
- let n = be(e);
78
+ function Ce(e, t) {
79
+ let n = ye(e);
81
80
  if (n) return n;
82
81
  if (!t) return null;
83
82
  try {
@@ -93,7 +92,7 @@ function we(e, t) {
93
92
  return null;
94
93
  }
95
94
  }
96
- function Te(e, t, n, r) {
95
+ function we(e, t, n, r) {
97
96
  if (!t || t.width === 0 || t.height === 0 || !n) return null;
98
97
  let i = e.getBoundingClientRect(), a = t.getBoundingClientRect();
99
98
  if (a.width === 0 || a.height === 0) return null;
@@ -103,60 +102,60 @@ function Te(e, t, n, r) {
103
102
  n.clearRect(0, 0, 32, 32), n.drawImage(t, c, l, u, d, 0, 0, 32, 32);
104
103
  let e = n.getImageData(0, 0, 32, 32).data, i = 0, a = 0, o = 0;
105
104
  for (let t = 0; t < e.length; t += 4) {
106
- let n = e[t + 3] / 255, [s, c, l] = ye(e[t], e[t + 1], e[t + 2], n, r);
107
- i += ve(s, c, l), a += n, o++;
105
+ let n = e[t + 3] / 255, [s, c, l] = ve(e[t], e[t + 1], e[t + 2], n, r);
106
+ i += _e(s, c, l), a += n, o++;
108
107
  }
109
108
  return o === 0 || a / o < .02 ? null : { luma: i / o };
110
109
  } catch {
111
110
  return null;
112
111
  }
113
112
  }
114
- function Ee(e, t) {
113
+ function Te(e, t) {
115
114
  let n = e.getBoundingClientRect(), r = n.left + n.width / 2, i = n.top + n.height / 2, a = document.elementsFromPoint(r, i);
116
115
  for (let n of a) {
117
116
  if (!(n instanceof HTMLElement) || n === e || e.contains(n)) continue;
118
- let r = getComputedStyle(n).backgroundColor, i = we(v(r, e), t);
117
+ let r = getComputedStyle(n).backgroundColor, i = Ce(y(r, e), t);
119
118
  if (i && !(i[3] < .5)) return i;
120
119
  }
121
- return we(v(getComputedStyle(document.body).backgroundColor, e), t);
120
+ return Ce(y(getComputedStyle(document.body).backgroundColor, e), t);
122
121
  }
123
- var De = [
122
+ var Ee = [
124
123
  255,
125
124
  255,
126
125
  255
127
126
  ];
128
- function Oe(e, t) {
129
- let n = Ee(e, t);
127
+ function De(e, t) {
128
+ let n = Te(e, t);
130
129
  return n && n[3] >= .5 ? [
131
130
  n[0],
132
131
  n[1],
133
132
  n[2]
134
- ] : [...De];
133
+ ] : [...Ee];
135
134
  }
136
- function ke(e, t) {
137
- let n = Ee(e, t);
138
- return n ? Ae(n) : null;
135
+ function Oe(e, t) {
136
+ let n = Te(e, t);
137
+ return n ? ke(n) : null;
139
138
  }
140
- function Ae(e) {
141
- return { luma: ve(e[0], e[1], e[2]) };
139
+ function ke(e) {
140
+ return { luma: _e(e[0], e[1], e[2]) };
142
141
  }
143
142
  //#endregion
144
143
  //#region src/composables/glass/useGlassBackdropLuminance.ts
145
- var je = "data-glass-backdrop-shared";
146
- function Me(e, n = {}) {
144
+ var Ae = "data-glass-backdrop-shared";
145
+ function je(e, n = {}) {
147
146
  let { lightThreshold: r = .6, minSampleIntervalMs: i = 250, writeBucket: a = !0 } = n, o = Math.max(250, i), s = n.shared === !0;
148
147
  function c(e) {
149
- return !s && e.closest(`[${je}]`) !== null;
148
+ return !s && e.closest(`[${Ae}]`) !== null;
150
149
  }
151
- let l = G(null), u = G(null), d = G({
150
+ let l = q(null), u = q(null), d = q({
152
151
  state: "pending",
153
152
  mode: n.live === !0 ? "live" : "static",
154
153
  source: n.live === !0 ? "canvas" : "elements"
155
154
  });
156
155
  if (typeof window > "u") return {
157
- luma: W(l),
158
- bucket: W(u),
159
- sample: W(d),
156
+ luma: K(l),
157
+ bucket: K(u),
158
+ sample: K(d),
160
159
  sampleNow: () => {},
161
160
  dispose: () => {}
162
161
  };
@@ -165,9 +164,9 @@ function Me(e, n = {}) {
165
164
  return p || (p = document.createElement("canvas"), p.width = 32, p.height = 32), m ||= p.getContext("2d", { willReadFrequently: !0 }), m;
166
165
  }
167
166
  function g() {
168
- 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 || Se(void 0) !== null : n.live;
169
168
  }
170
- function v(e) {
169
+ function _(e) {
171
170
  let t = e.getBoundingClientRect();
172
171
  return {
173
172
  x: t.x,
@@ -186,7 +185,7 @@ function Me(e, n = {}) {
186
185
  source: n === "live" ? "canvas" : "elements",
187
186
  luma: o,
188
187
  sampledAt: i,
189
- targetRect: v(t)
188
+ targetRect: _(t)
190
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);
191
190
  }
192
191
  function b(e, t, n, r) {
@@ -196,14 +195,14 @@ function Me(e, n = {}) {
196
195
  source: t === "live" ? "canvas" : "elements",
197
196
  reason: n,
198
197
  sampledAt: r,
199
- targetRect: v(e)
198
+ targetRect: _(e)
200
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);
201
200
  }
202
201
  let x = 0;
203
202
  function S() {
204
203
  let t = e.value;
205
204
  if (!t || c(t)) return;
206
- 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();
205
+ let r = h(), i = g() ? "live" : "static", a = i === "live" ? Se(n.backgroundCanvas) : null, o = i === "live" ? we(t, a, r, De(t, r)) : Oe(t, r), s = Date.now();
207
206
  o ? y(o, t, i, s) : b(t, i, i === "live" && !a ? "source-unavailable" : "sample-unavailable", s), x = typeof performance < "u" ? performance.now() : s;
208
207
  }
209
208
  let C = T(({ now: e }) => {
@@ -218,7 +217,7 @@ function Me(e, n = {}) {
218
217
  let t = e.value;
219
218
  t && c(t) || g() && !f.value && C.resume();
220
219
  }
221
- }, { rootMargin: "200px" }), E = _(e, () => S());
220
+ }, { rootMargin: "200px" }), E = v(e, () => S());
222
221
  function O() {
223
222
  let t = e.value;
224
223
  if (t && c(t)) {
@@ -229,7 +228,7 @@ function Me(e, n = {}) {
229
228
  }
230
229
  let k = Z(f, O, { flush: "sync" }), A = Z(() => e.value, (e) => {
231
230
  if (e) {
232
- if (s) e.setAttribute(je, "");
231
+ if (s) e.setAttribute(Ae, "");
233
232
  else if (c(e)) return;
234
233
  S(), O();
235
234
  }
@@ -240,131 +239,129 @@ function Me(e, n = {}) {
240
239
  function j() {
241
240
  A(), k(), C.dispose(), w.dispose(), E.stop(), p = null, m = null;
242
241
  }
243
- return ne(j), {
244
- luma: W(l),
245
- bucket: W(u),
246
- sample: W(d),
242
+ return U(j), {
243
+ luma: K(l),
244
+ bucket: K(u),
245
+ sample: K(d),
247
246
  sampleNow: S,
248
247
  dispose: j
249
248
  };
250
249
  }
251
250
  //#endregion
252
251
  //#region src/components/dock/composables/useDockState.ts
253
- function Ne(e) {
254
- let { collapseDelay: t = 3600, rootEl: n, alwaysExpanded: r = !1, interaction: i = "auto", initialExpanded: a = !1, isTransitioning: o, dockId: s, onStateChange: c } = e, l = () => typeof r == "boolean" ? r : r.value, u = () => typeof i == "string" ? i : i.value, d = () => l() || u() === "manual", f = G(l() ? "pinned" : a ? "hover" : "collapsed"), p = A(() => f.value !== "collapsed"), m = A(() => f.value === "pinned"), h = null, g = G(0), _ = G(0), v = A(() => g.value > 0), y = A(() => _.value > 0), b = null, x = null, S = !1, C = null;
255
- function w() {
256
- C &&= (clearTimeout(C), null);
252
+ function Me(e) {
253
+ let { collapseDelay: t = g, rootEl: n, alwaysExpanded: r = !1, initialExpanded: i = !1, isTransitioning: a, dockId: o, onStateChange: s } = e, c = () => typeof r == "boolean" ? r : r.value, l = () => c(), u = q(c() ? "pinned" : i ? "hover" : "collapsed"), d = k(() => u.value !== "collapsed"), f = k(() => u.value === "pinned"), p = null, m = q(0), h = q(0), _ = k(() => m.value > 0), v = k(() => h.value > 0), y = null, b = null, x = !1, S = null;
254
+ function C() {
255
+ S &&= (clearTimeout(S), null);
256
+ }
257
+ let w = u.value;
258
+ function T() {
259
+ c() && (u.value = "pinned"), s && w !== u.value && s(u.value, w), w = u.value;
257
260
  }
258
- let T = f.value;
259
261
  function E() {
260
- l() && (f.value = "pinned"), c && T !== f.value && c(f.value, T), T = f.value;
262
+ p &&= (clearTimeout(p), null);
261
263
  }
262
264
  function D() {
263
- h &&= (clearTimeout(h), null);
265
+ b !== null && (cancelAnimationFrame(b), b = null);
264
266
  }
265
267
  function O() {
266
- x !== null && (cancelAnimationFrame(x), x = null);
267
- }
268
- function k() {
269
- O(), b?.();
268
+ D(), y?.();
270
269
  }
271
- function j() {
272
- d() || g.value > 0 || (D(), h = setTimeout(() => {
273
- f.value = "collapsed", E();
270
+ function A() {
271
+ l() || m.value > 0 || (E(), p = setTimeout(() => {
272
+ u.value = "collapsed", T();
274
273
  }, t));
275
274
  }
276
- function M() {
277
- if (l()) {
278
- f.value = "pinned", E();
275
+ function j() {
276
+ if (c()) {
277
+ u.value = "pinned", T();
279
278
  return;
280
279
  }
281
- S ||= (S = !0, D(), w(), f.value = "collapsed", E(), !1);
280
+ x ||= (x = !0, E(), C(), u.value = "collapsed", T(), !1);
282
281
  }
283
- function N() {
284
- if (l()) {
285
- f.value = "pinned", E();
282
+ function M() {
283
+ if (c()) {
284
+ u.value = "pinned", T();
286
285
  return;
287
286
  }
288
- D(), w(), f.value = "hover", E();
287
+ E(), C(), u.value = "hover", T();
289
288
  }
290
- function P() {
291
- d() || (D(), f.value === "collapsed" && (w(), C = setTimeout(() => {
292
- C = null, !d() && f.value === "collapsed" && (f.value = "hover", E());
289
+ function N() {
290
+ l() || (E(), u.value === "collapsed" && (C(), S = setTimeout(() => {
291
+ S = null, !l() && u.value === "collapsed" && (u.value = "hover", T());
293
292
  }, 60)));
294
293
  }
295
- function F(e) {
296
- if (!d() && (w(), f.value === "hover")) {
297
- if (g.value > 0) return;
294
+ function P(e) {
295
+ if (!l() && (C(), u.value === "hover")) {
296
+ if (m.value > 0) return;
298
297
  if (e) {
299
298
  let t = n.value;
300
- if (t && e.relatedTarget instanceof Node && t.contains(e.relatedTarget) || $(e.relatedTarget, s)) return;
299
+ if (t && e.relatedTarget instanceof Node && t.contains(e.relatedTarget) || he(e.relatedTarget, o)) return;
301
300
  }
302
- j();
301
+ A();
303
302
  }
304
303
  }
305
- function I() {
306
- d() || (D(), f.value === "collapsed" && (f.value = "hover", E()));
304
+ function F() {
305
+ l() || (E(), u.value === "collapsed" && (u.value = "hover", T()));
307
306
  }
308
- function ee(e) {
309
- if (d() || f.value !== "hover" || g.value > 0) return;
307
+ function I(e) {
308
+ if (l() || u.value !== "hover" || m.value > 0) return;
310
309
  let t = e.currentTarget;
311
- e.relatedTarget && t.contains(e.relatedTarget) || $(e.relatedTarget, s) || j();
310
+ e.relatedTarget && t.contains(e.relatedTarget) || he(e.relatedTarget, o) || A();
312
311
  }
313
312
  function L() {
314
- d() || (D(), w(), f.value = "pinned", E());
313
+ l() || (E(), C(), u.value = "pinned", T());
315
314
  }
316
315
  function R(e = "morph") {
317
- g.value++, e === "grasp" && _.value++, D();
316
+ m.value++, e === "grasp" && h.value++, E();
318
317
  }
319
318
  function z(e = "morph") {
320
- e === "grasp" && (_.value = Math.max(0, _.value - 1)), g.value = Math.max(0, g.value - 1), g.value === 0 && f.value === "hover" && (D(), h = setTimeout(() => {
321
- g.value === 0 && f.value === "hover" && j();
319
+ e === "grasp" && (h.value = Math.max(0, h.value - 1)), m.value = Math.max(0, m.value - 1), m.value === 0 && u.value === "hover" && (E(), p = setTimeout(() => {
320
+ m.value === 0 && u.value === "hover" && A();
322
321
  }, Math.min(t, 800)));
323
322
  }
324
323
  function B(e) {
325
- if (d() || g.value > 0 || o?.value) return;
324
+ if (l() || m.value > 0 || a?.value) return;
326
325
  let t = n.value;
327
- !t || t.contains(e.target) || $(e.target, s) || M();
326
+ !t || t.contains(e.target) || he(e.target, o) || j();
328
327
  }
329
- return Z(p, (e) => {
328
+ return Z(d, (e) => {
330
329
  if (e) {
331
330
  if (typeof document > "u") return;
332
- k(), x = requestAnimationFrame(() => {
333
- x = null, p.value && (document.addEventListener("pointerdown", B, !0), b = () => {
334
- document.removeEventListener("pointerdown", B, !0), b = null;
331
+ O(), b = requestAnimationFrame(() => {
332
+ b = null, d.value && (document.addEventListener("pointerdown", B, !0), y = () => {
333
+ document.removeEventListener("pointerdown", B, !0), y = null;
335
334
  });
336
335
  });
337
- } else k();
338
- }, { immediate: !0 }), typeof r == "boolean" ? r && (f.value = "pinned", E()) : Z(r, (e) => {
336
+ } else O();
337
+ }, { immediate: !0 }), typeof r == "boolean" ? r && (u.value = "pinned", T()) : Z(r, (e) => {
339
338
  if (e) {
340
- D(), f.value = "pinned", E();
339
+ E(), u.value = "pinned", T();
341
340
  return;
342
341
  }
343
- f.value = "collapsed", E();
344
- }), typeof i != "string" && Z(i, (e) => {
345
- e === "manual" && (D(), w());
346
- }), H(() => {
347
- D(), w(), k();
342
+ u.value = "collapsed", T();
343
+ }), W(() => {
344
+ E(), C(), O();
348
345
  }), {
349
- state: f,
350
- expanded: p,
351
- isPinned: m,
352
- isHeld: v,
353
- graspHeld: y,
354
- onMouseEnter: P,
355
- onMouseLeave: F,
356
- onFocusIn: I,
357
- onFocusOut: ee,
346
+ state: u,
347
+ expanded: d,
348
+ isPinned: f,
349
+ isHeld: _,
350
+ graspHeld: v,
351
+ onMouseEnter: N,
352
+ onMouseLeave: P,
353
+ onFocusIn: F,
354
+ onFocusOut: I,
358
355
  onClickCollapsed: L,
359
356
  keepOpen: R,
360
357
  release: z,
361
- expand: N,
362
- collapse: M
358
+ expand: M,
359
+ collapse: j
363
360
  };
364
361
  }
365
362
  //#endregion
366
363
  //#region src/components/dock/composables/useDockSpring.ts
367
- function Pe(e) {
364
+ function Ne(e) {
368
365
  let t = null, n = () => t !== null && !t.settled;
369
366
  function i() {
370
367
  t &&= (t.dispose(), null);
@@ -372,7 +369,7 @@ function Pe(e) {
372
369
  function a(a, o, s) {
373
370
  let c = n() ? t.velocity * (s.inheritVelocityScale ?? 1) : 0;
374
371
  i();
375
- let l = new he({
372
+ let l = new pe({
376
373
  response: e.response * r(),
377
374
  dampingFraction: e.dampingFraction,
378
375
  initial: a,
@@ -399,11 +396,11 @@ function Pe(e) {
399
396
  }
400
397
  //#endregion
401
398
  //#region src/components/dock/composables/useDockMorph.ts
402
- function Fe(e) {
403
- let { rootEl: t, outerActiveLayer: n } = e, r = G(n.value), i = G(null), a = Pe({
404
- response: u.response,
405
- dampingFraction: u.dampingFraction
406
- }), o = ge("(prefers-reduced-motion: reduce)");
399
+ function Pe(e) {
400
+ let { rootEl: t, outerActiveLayer: n } = e, r = q(n.value), i = q(null), a = Ne({
401
+ response: f.response,
402
+ dampingFraction: f.dampingFraction
403
+ }), o = me("(prefers-reduced-motion: reduce)");
407
404
  function s() {
408
405
  return t.value;
409
406
  }
@@ -428,7 +425,7 @@ function Fe(e) {
428
425
  onSettle: c
429
426
  });
430
427
  }
431
- let d = Z(n, (e, t) => {
428
+ let u = Z(n, (e, t) => {
432
429
  if (e === t) return;
433
430
  let n = s();
434
431
  if (r.value = e, !n) {
@@ -437,35 +434,35 @@ function Fe(e) {
437
434
  }
438
435
  i.value = t, l();
439
436
  });
440
- return H(() => {
441
- d(), a.dispose();
437
+ return W(() => {
438
+ u(), a.dispose();
442
439
  }), {
443
- outerCurrentLayer: W(r),
444
- outerLeavingLayer: W(i)
440
+ outerCurrentLayer: K(r),
441
+ outerLeavingLayer: K(i)
445
442
  };
446
443
  }
447
444
  //#endregion
448
445
  //#region src/components/dock/composables/dockMorphMeasure.ts
449
- function Ie(e, t) {
446
+ function Fe(e, t) {
450
447
  return t === "vertical" ? e.offsetHeight : e.offsetWidth;
451
448
  }
452
- function Le(e) {
449
+ function Ie(e) {
453
450
  let { rootEl: t, contentEl: n, expandedEl: r, collapsedEl: i, axis: a, expanded: o } = e, s = null, c = 0, l = 0, u = !1;
454
- function d() {
455
- let e = t.value, s = n.value, u = r.value, d = i.value;
456
- if (!e || !s || !u || !d || e.hasAttribute("data-morphing")) return;
457
- let f = a.value, p = Ie(e, f), m = Ie(u, f), h = Ie(d, f);
458
- if (p <= 0 || m < 0 || h < 0) return;
459
- o.value ? c = p : l = p;
460
- let g = o.value ? m : h, _ = Math.max(0, p - g), v = c || _ + m, y = l || _ + h;
461
- v <= 0 || y <= 0 || (e.style.setProperty("--dock-collapsed-px", `${y}px`), e.style.setProperty("--dock-expanded-px", `${Math.max(v, y)}px`));
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 = Fe(s, p), h = Fe(d, p), g = Fe(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`));
462
459
  }
463
460
  function f() {
464
461
  s?.disconnect(), s = null;
465
462
  let e = t.value;
466
463
  if (e) {
467
464
  if (typeof ResizeObserver < "u") {
468
- s = new ResizeObserver(d);
465
+ s = new ResizeObserver(() => d("layout"));
469
466
  for (let t of [
470
467
  e,
471
468
  n.value,
@@ -482,33 +479,28 @@ function Le(e) {
482
479
  r,
483
480
  i,
484
481
  a
485
- ], f, { immediate: !0 }), Z(o, d);
482
+ ], f, { immediate: !0 }), Z(o, () => d("flip"));
486
483
  let p = typeof document < "u" ? document.fonts : void 0;
487
- p && p.ready.then(() => !u && d()), ne(() => {
484
+ p && p.ready.then(() => !u && d("layout")), U(() => {
488
485
  u = !0, s?.disconnect(), s = null;
489
486
  });
490
487
  }
491
488
  //#endregion
492
489
  //#region src/components/dock/composables/useDockShellProps.ts
493
- function Re(e) {
494
- let t = A(() => e.collapseDelay ?? 3600), n = A(() => e.layout ?? "linear"), r = A(() => e.shape ?? "pill"), i = A(() => e.orientation ?? "horizontal"), a = A(() => e.size ?? "md"), o = A(() => i.value === "vertical" || e.overflow === "wrap" ? null : "dock-scroll-x"), s = A(() => e.alwaysExpanded || n.value === "grid");
490
+ function Le(e) {
491
+ let t = k(() => e.shape ?? "pill"), n = k(() => e.orientation ?? "horizontal"), r = k(() => e.collapse === !1);
495
492
  return {
496
- collapseDelay: t,
497
- startCollapsed: A(() => s.value ? !1 : e.startCollapsed ?? !0),
498
- interaction: A(() => s.value ? "auto" : e.interaction ?? "auto"),
499
- layoutValue: n,
500
- shape: r,
501
- orientation: i,
502
- size: a,
503
- scrollClass: o,
504
- alwaysExpanded: s,
505
- fitContent: A(() => e.fitContent ?? !1)
493
+ startCollapsed: k(() => !r.value && (e.collapse ?? "closed") === "closed"),
494
+ shape: t,
495
+ orientation: n,
496
+ alwaysExpanded: r,
497
+ fitContent: k(() => e.fitContent ?? !1)
506
498
  };
507
499
  }
508
500
  //#endregion
509
501
  //#region src/components/dock/composables/useDockClickIntegrity.ts
510
- function ze(e) {
511
- let { rootEl: t, visualExpanded: n } = e, r = null, i = !1, a = 0, o = null, s = G(null), c = null, l = [];
502
+ function Re(e) {
503
+ let { rootEl: t, visualExpanded: n } = e, r = null, i = !1, a = 0, o = null, s = q(null), c = null, l = [];
512
504
  function u() {
513
505
  c?.removeAttribute("data-dock-press-origin"), c = null;
514
506
  for (let { element: e, wasInert: t } of l.splice(0)) e.toggleAttribute("inert", t);
@@ -578,86 +570,153 @@ function ze(e) {
578
570
  e.stopPropagation(), e.preventDefault(), r = null;
579
571
  }
580
572
  }
581
- return te(() => {
573
+ return V(() => {
582
574
  f(), u();
583
575
  }), {
584
576
  onPointerDownCapture: _,
585
577
  onPointerCancelCapture: v,
586
578
  onClickCapture: b,
587
579
  markExpandFlip: p,
588
- pressKeepaliveLayer: W(s)
580
+ pressKeepaliveLayer: K(s)
589
581
  };
590
582
  }
591
583
  //#endregion
592
- //#region src/components/dock/composables/useDockTouchGate.ts
584
+ //#region src/components/dock/composables/useDockRun.ts
585
+ function ze(e, t) {
586
+ let n = getComputedStyle(e).getPropertyValue(t).trim(), r = Number.parseFloat(n);
587
+ return Number.isFinite(r) ? r : 0;
588
+ }
593
589
  function Be(e) {
594
- let { collapseDelay: t, rootEl: n, quiet: r, visualExpanded: i, expanded: a, isPinned: o, expand: s, collapse: c } = e, l = y(t);
595
- function u() {
596
- return !r.value;
590
+ return Array.from(e.children).filter((e) => e instanceof HTMLElement);
591
+ }
592
+ function Ve(e) {
593
+ return e.findIndex((e) => {
594
+ let t = (e.matches("[aria-current]") ? e : e.querySelector("[aria-current]"))?.getAttribute("aria-current");
595
+ return t != null && t !== "false";
596
+ });
597
+ }
598
+ function He(e) {
599
+ return e.matches(b) ? e : e.querySelector(b);
600
+ }
601
+ function Ue(e) {
602
+ let { runEl: t, statusEl: n, orientation: r } = e, i = Ne({
603
+ response: f.response,
604
+ dampingFraction: f.dampingFraction
605
+ });
606
+ function a() {
607
+ return r.value === "vertical";
597
608
  }
598
- function d(e) {
599
- if (!u() || i.value) return;
600
- let t = n.value, r = e.touches[0];
601
- !t || !r || l.handleTouchStart(t, r.clientY);
609
+ function o(e) {
610
+ return a() ? e.scrollTop : e.scrollLeft;
602
611
  }
603
- function f(e) {
604
- u() && l.handleScrollCheck(e);
612
+ function s(e, t) {
613
+ a() ? e.scrollTop = t : e.scrollLeft = t;
605
614
  }
606
- function p() {
607
- if (!u()) return;
608
- let e = l.isActive.value;
609
- l.handleTouchEnd(), !e && l.isActive.value && !i.value && s();
615
+ function c(e) {
616
+ return a() ? e.scrollHeight - e.clientHeight : e.scrollWidth - e.clientWidth;
610
617
  }
611
- return Z(l.isActive, (e) => {
612
- !e && a.value && !o.value && !r.value && c();
613
- }), {
614
- onTouchStart: d,
615
- onTouchMove: f,
616
- onTouchEnd: p,
617
- deactivate: () => l.deactivate()
618
- };
619
- }
620
- //#endregion
621
- //#region src/components/dock/composables/useDockOverflowFit.ts
622
- function Ve(e) {
623
- let t = null, n = null, r = 0;
624
- function i() {
625
- return e.value?.querySelector(".dock-layer--full") ?? null;
618
+ function l(e, t) {
619
+ let n = Be(e), r = n.indexOf(t);
620
+ if (r < 0) return o(e);
621
+ let i = ze(e, "--dock-pitch");
622
+ if (i <= 0) return o(e);
623
+ let a = Math.max(1, ze(e, "--dock-open-pitches")), s = Ve(n), l = s >= 0 && s < r ? (a - 1) * i : 0, u = r * i + l - i / 2;
624
+ return Math.min(Math.max(u, 0), c(e));
626
625
  }
627
- function a() {
628
- let t = e.value, n = i();
629
- if (!t || !n) return;
630
- let r = t.classList.contains("vertical"), a = r ? t : n, o = r ? a.scrollHeight - a.clientHeight > 1 : a.scrollWidth - a.clientWidth > 1;
631
- t.toggleAttribute("data-dock-overflow", o);
626
+ function u(e, t) {
627
+ let n = e.getBoundingClientRect(), r = t.getBoundingClientRect();
628
+ return a() ? r.top < n.top - 1 || r.bottom > n.bottom + 1 : r.left < n.left - 1 || r.right > n.right + 1;
632
629
  }
633
- function o() {
634
- cancelAnimationFrame(r), r = requestAnimationFrame(a);
630
+ function d(e) {
631
+ let t = n.value;
632
+ if (!t) return;
633
+ let r = He(e) ?? e, i = r.getAttribute("aria-label") ?? r.getAttribute("title") ?? r.textContent?.trim();
634
+ i && (t.textContent = i);
635
+ }
636
+ function p(e) {
637
+ let n = t.value;
638
+ if (!n || (d(e), !u(n, e))) return;
639
+ let r = o(n), a = l(n, e);
640
+ Math.abs(a - r) < 1 || i.playTo(0, 1, { onFrame: (e) => {
641
+ let n = t.value;
642
+ n && s(n, r + (a - r) * e);
643
+ } });
635
644
  }
636
- return V(() => {
637
- let r = e.value, a = i();
638
- o(), r && (t = new ResizeObserver(o), t.observe(r), a && t.observe(a)), r && (n = new MutationObserver(o), n.observe(r, {
645
+ function m() {
646
+ let e = t.value;
647
+ if (!e) return;
648
+ let n = Be(e);
649
+ if (n.length === 0) return;
650
+ let r = Ve(n), i = n.findIndex((e) => e.contains(document.activeElement)), a = i >= 0 ? i : r >= 0 ? r : 0;
651
+ n.forEach((e, t) => {
652
+ let n = He(e);
653
+ n && (n.tabIndex = t === a ? 0 : -1);
654
+ });
655
+ }
656
+ function h(e, t) {
657
+ let n = e[t];
658
+ if (!n) return;
659
+ let r = He(n);
660
+ r && (p(n), r.tabIndex = 0, r.focus({ preventScroll: !0 }), m());
661
+ }
662
+ function g(e) {
663
+ let n = t.value;
664
+ if (!n) return;
665
+ let r = Be(n);
666
+ if (r.length === 0) return;
667
+ let i = r.findIndex((t) => t.contains(e.target));
668
+ if (i < 0) return;
669
+ let [o, s] = a() ? ["ArrowUp", "ArrowDown"] : ["ArrowLeft", "ArrowRight"], c;
670
+ switch (e.key) {
671
+ case o:
672
+ c = i - 1;
673
+ break;
674
+ case s:
675
+ c = i + 1;
676
+ break;
677
+ case "Home":
678
+ c = 0;
679
+ break;
680
+ case "End":
681
+ c = r.length - 1;
682
+ break;
683
+ default: return;
684
+ }
685
+ c < 0 || c >= r.length || (e.preventDefault(), h(r, c));
686
+ }
687
+ function _(e) {
688
+ let n = t.value;
689
+ if (!n) return;
690
+ let r = Be(n).find((t) => t.contains(e.target));
691
+ r && p(r);
692
+ }
693
+ let v = null;
694
+ return H(() => {
695
+ let e = t.value;
696
+ e && (e.addEventListener("keydown", g), e.addEventListener("click", _, { capture: !0 }), e.addEventListener("focusin", _, { capture: !0 }), m(), v = new MutationObserver(() => m()), v.observe(e, {
639
697
  childList: !0,
640
698
  subtree: !0,
641
- characterData: !0,
642
699
  attributes: !0,
643
- attributeFilter: ["class", "hidden"]
700
+ attributeFilter: ["aria-current"]
644
701
  }));
645
- }), Z(() => e.value, () => o()), H(() => {
646
- t?.disconnect(), n?.disconnect(), cancelAnimationFrame(r);
647
- }), { measure: a };
702
+ }), W(() => {
703
+ let e = t.value;
704
+ e?.removeEventListener("keydown", g), e?.removeEventListener("click", _, { capture: !0 }), e?.removeEventListener("focusin", _, { capture: !0 }), v?.disconnect(), i.dispose();
705
+ }), Z(r, () => m()), {
706
+ reach: p,
707
+ syncRoving: m
708
+ };
648
709
  }
649
710
  //#endregion
650
711
  //#region src/components/dock/GlassDock.vue?vue&type=script&setup=true&lang.ts
651
- var He = [
652
- "data-size",
653
- "data-backdrop-mode",
654
- "data-interaction",
655
- "data-held",
656
- "data-search"
657
- ], Ue = ["data-held"], We = { class: "dock-controls" }, Ge = {
712
+ var We = ["data-backdrop-mode", "data-held"], Ge = ["data-held"], Ke = { class: "dock-controls" }, qe = {
658
713
  key: 0,
659
714
  class: "dock-persistent"
660
- }, Ke = ["id", "inert"], qe = [
715
+ }, Je = [
716
+ "id",
717
+ "aria-orientation",
718
+ "inert"
719
+ ], Ye = [
661
720
  "id",
662
721
  "inert",
663
722
  "role",
@@ -665,221 +724,211 @@ var He = [
665
724
  "aria-label",
666
725
  "aria-expanded",
667
726
  "aria-controls"
668
- ], Je = {
727
+ ], Xe = {
669
728
  key: 0,
670
729
  class: "dock-search-field"
671
- }, Ye = {
730
+ }, Ze = {
672
731
  key: 1,
673
732
  class: "dock-persistent dock-persistent-end"
674
- }, Xe = /* @__PURE__ */ I({
733
+ }, Qe = /* @__PURE__ */ F({
675
734
  inheritAttrs: !1,
676
735
  __name: "GlassDock",
677
736
  props: {
678
737
  fitContent: { type: Boolean },
679
- position: {},
680
738
  backdropMode: { default: "live" },
681
- alwaysExpanded: { type: Boolean },
682
739
  shape: {},
683
740
  orientation: {},
684
- size: {},
685
- overflow: {},
686
- collapseDelay: {},
687
- startCollapsed: { type: Boolean },
688
- interaction: {},
689
- layout: {},
690
- backgroundCanvas: {},
691
- search: { type: Boolean }
741
+ collapse: {
742
+ type: [Boolean, String],
743
+ default: "closed"
744
+ },
745
+ backgroundCanvas: {}
692
746
  },
693
747
  setup(e, { expose: t }) {
694
- let n = e, { collapseDelay: r, startCollapsed: i, interaction: a, layoutValue: o, shape: s, orientation: c, size: l, scrollClass: u, alwaysExpanded: p, fitContent: m } = Re(n), h = o, g = X("dockEl"), _ = X("layersEl"), v = X("fullEl"), y = X("summaryEl");
695
- Ve(g), n.backdropMode === "live" && Me(g, { backgroundCanvas: () => {
748
+ let n = e, { startCollapsed: r, shape: i, orientation: a, alwaysExpanded: o, fitContent: s } = Le(n), c = X("dockEl"), l = X("layersEl"), u = X("fullEl"), f = X("summaryEl"), p = X("statusEl");
749
+ Ue({
750
+ runEl: u,
751
+ statusEl: p,
752
+ orientation: a
753
+ }), n.backdropMode === "live" && je(c, { backgroundCanvas: () => {
696
754
  let e = n.backgroundCanvas;
697
755
  return typeof e == "function" ? e() : e instanceof HTMLCanvasElement ? e : null;
698
756
  } });
699
- let x = G(!1), S = `glass-dock-${ae()}`, { expanded: C, isPinned: w, isHeld: T, graspHeld: E, onMouseEnter: D, onMouseLeave: O, onFocusIn: j, onFocusOut: F, onClickCollapsed: I, keepOpen: ee, release: B, expand: te, collapse: V } = Ne({
700
- collapseDelay: r.value,
701
- rootEl: g,
702
- alwaysExpanded: p,
703
- interaction: a,
704
- initialExpanded: !i.value,
705
- isTransitioning: x,
706
- dockId: S
707
- }), ne = A(() => p.value || a.value === "manual");
757
+ let m = q(!1), h = `glass-dock-${re()}`, { expanded: g, isPinned: v, isHeld: y, graspHeld: x, onMouseEnter: S, onMouseLeave: C, onFocusIn: w, onFocusOut: T, onClickCollapsed: E, keepOpen: D, release: A, expand: P, collapse: F } = Me({
758
+ rootEl: c,
759
+ alwaysExpanded: o,
760
+ initialExpanded: !r.value,
761
+ isTransitioning: m,
762
+ dockId: h
763
+ });
708
764
  d({
709
- id: S,
710
- orientation: c,
711
- layout: h,
712
- keepOpen: ee,
713
- release: B,
714
- held: E
765
+ id: h,
766
+ orientation: a,
767
+ keepOpen: D,
768
+ release: A,
769
+ held: x
770
+ });
771
+ let I = k(() => o.value || g.value);
772
+ Ie({
773
+ rootEl: c,
774
+ contentEl: l,
775
+ expandedEl: u,
776
+ collapsedEl: f,
777
+ axis: a,
778
+ expanded: I
715
779
  });
716
- let H = A(() => p.value || C.value), W = A(() => H.value ? "full" : "summary"), re = A(() => c.value), { outerCurrentLayer: q, outerLeavingLayer: ie } = Fe({
717
- rootEl: g,
718
- outerActiveLayer: W,
780
+ let { outerCurrentLayer: B, outerLeavingLayer: V } = Pe({
781
+ rootEl: c,
782
+ outerActiveLayer: k(() => I.value ? "full" : "summary"),
719
783
  onMorphActiveChange: (e) => {
720
- x.value = e;
784
+ m.value = e;
721
785
  }
722
- }), Y = A(() => a.value === "auto" && q.value === "summary");
723
- async function Q(e) {
724
- !Y.value || !["Enter", " "].includes(e.key) || (e.preventDefault(), I(), await R(), (v.value?.querySelector(b) ?? v.value)?.focus({ preventScroll: !0 }));
786
+ }), H = k(() => B.value === "summary");
787
+ async function U(e) {
788
+ !H.value || !["Enter", " "].includes(e.key) || (e.preventDefault(), E(), await R(), (u.value?.querySelector(b) ?? u.value)?.focus({ preventScroll: !0 }));
725
789
  }
726
- async function oe(e) {
727
- if (a.value !== "auto" || e.key !== "Escape") return;
728
- let t = e.target?.closest?.(f);
729
- if (t && v.value?.contains(t)) return;
730
- V(), await R();
731
- let n = y.value;
790
+ async function W(e) {
791
+ if (e.key !== "Escape") return;
792
+ let t = e.target?.closest?.(_);
793
+ if (t && u.value?.contains(t)) return;
794
+ F(), await R();
795
+ let n = f.value;
732
796
  n && !n.hasAttribute("inert") && n.focus({ preventScroll: !0 });
733
797
  }
734
- Le({
735
- rootEl: g,
736
- contentEl: _,
737
- expandedEl: v,
738
- collapsedEl: y,
739
- axis: re,
740
- expanded: H
798
+ let { onPointerDownCapture: K, onPointerCancelCapture: ee, onClickCapture: te, markExpandFlip: ne, pressKeepaliveLayer: ie } = Re({
799
+ rootEl: c,
800
+ visualExpanded: I
741
801
  });
742
- let { onPointerDownCapture: ce, onPointerCancelCapture: le, onClickCapture: ue, markExpandFlip: de, pressKeepaliveLayer: fe } = ze({
743
- rootEl: g,
744
- visualExpanded: H
745
- }), { onTouchStart: pe, onTouchMove: me, onTouchEnd: he, deactivate: ge } = Be({
746
- collapseDelay: r.value,
747
- rootEl: g,
748
- quiet: ne,
749
- visualExpanded: H,
750
- expanded: C,
751
- isPinned: w,
752
- expand: te,
753
- collapse: V
802
+ Z(I, (e) => {
803
+ e && ne();
754
804
  });
755
- Z(H, (e) => {
756
- e ? de() : ge();
757
- });
758
- let $ = G(!1);
759
- Z(E, (e) => {
760
- e && ($.value = !0);
805
+ let Q = q(!1);
806
+ Z(x, (e) => {
807
+ e && (Q.value = !0);
761
808
  });
762
- function _e(e) {
763
- e.propertyName === "opacity" && !E.value && ($.value = !1);
809
+ function $(e) {
810
+ e.propertyName === "opacity" && !x.value && (Q.value = !1);
764
811
  }
765
812
  return t({
766
- expanded: C,
767
- isPinned: w,
768
- isHeld: T,
769
- graspHeld: E,
770
- isTransitioning: x,
771
- expand: te,
772
- collapse: V,
773
- keepOpen: ee,
774
- release: B
775
- }), (t, r) => (U(), N("div", L({
813
+ expanded: g,
814
+ isPinned: v,
815
+ isHeld: y,
816
+ graspHeld: x,
817
+ isTransitioning: m,
818
+ expand: P,
819
+ collapse: F,
820
+ keepOpen: D,
821
+ release: A
822
+ }), (e, t) => (G(), M("div", L({
776
823
  ref_key: "dockEl",
777
- ref: g
778
- }, t.$attrs, {
824
+ ref: c
825
+ }, e.$attrs, {
779
826
  class: ["glass-dock", [
780
- J(c),
781
- `shape-${J(s)}`,
782
- `layout-${J(h)}`,
783
- J(u),
827
+ Y(a),
828
+ `shape-${Y(i)}`,
784
829
  {
785
- expanded: H.value,
786
- collapsed: !H.value,
787
- pinned: J(w),
788
- "fit-content": J(m),
789
- "always-expanded": J(p),
790
- "dock-overflow-wrap": e.overflow === "wrap" && J(c) !== "vertical"
791
- },
792
- e.position === "fixed" ? "fixed bottom-(--dock-pos) inset-x-0 mx-auto w-max" : e.position === "sticky" ? "dock-sticky" : "dock-inline"
830
+ expanded: I.value,
831
+ collapsed: !I.value,
832
+ pinned: Y(v),
833
+ "fit-content": Y(s),
834
+ "always-expanded": Y(o)
835
+ }
793
836
  ]],
794
- "data-size": J(l),
795
837
  "data-backdrop-mode": n.backdropMode,
796
- "data-interaction": J(a) === "manual" ? "manual" : void 0,
797
- "data-held": J(E) || void 0,
798
- "data-search": e.search || void 0,
799
- onMouseenter: r[2] ||= (...e) => J(D) && J(D)(...e),
800
- onMouseleave: r[3] ||= (e) => J(O)(e),
801
- onFocusin: r[4] ||= (...e) => J(j) && J(j)(...e),
802
- onFocusout: r[5] ||= (...e) => J(F) && J(F)(...e),
803
- onTouchstart: r[6] ||= (...e) => J(pe) && J(pe)(...e),
804
- onTouchmove: r[7] ||= (...e) => J(me) && J(me)(...e),
805
- onTouchend: r[8] ||= (...e) => J(he) && J(he)(...e),
806
- onPointerdownCapture: r[9] ||= (...e) => J(ce) && J(ce)(...e),
807
- onPointercancelCapture: r[10] ||= (...e) => J(le) && J(le)(...e),
808
- onClickCapture: r[11] ||= (...e) => J(ue) && J(ue)(...e)
809
- }), [P("div", {
810
- class: "dock-plate",
811
- "aria-hidden": "true",
812
- "data-held": J(E) || void 0
813
- }, [$.value ? (U(), N(k, { key: 0 }, [r[12] ||= P("span", {
814
- class: "glass-grasp-carrier",
815
- "data-grasp": "rest"
816
- }, null, -1), P("span", {
817
- class: "glass-grasp-carrier",
818
- "data-grasp": "grasp",
819
- onTransitionend: _e
820
- }, null, 32)], 64)) : M("", !0)], 8, Ue), P("div", We, [
821
- t.$slots.persistent ? (U(), N("div", Ge, [K(t.$slots, "persistent")])) : M("", !0),
822
- P("div", {
823
- ref_key: "layersEl",
824
- ref: _,
825
- class: "dock-layers"
826
- }, [
827
- P("div", {
828
- ref_key: "fullEl",
829
- ref: v,
830
- id: `${S}-full`,
831
- class: z(["dock-layer dock-layer--full", {
832
- "is-active": J(q) === "full",
833
- "is-leaving": J(ie) === "full" || J(fe) === "full" && J(q) !== "full",
834
- "is-press-keepalive": J(fe) === "full"
835
- }]),
836
- inert: J(q) !== "full" && J(fe) !== "full" || void 0,
837
- tabindex: "-1",
838
- onKeydown: oe
839
- }, [K(t.$slots, "default")], 42, Ke),
840
- P("div", {
841
- ref_key: "summaryEl",
842
- ref: y,
843
- id: `${S}-summary`,
844
- class: z(["dock-layer dock-layer--summary", {
845
- "is-active": J(q) === "summary",
846
- "is-leaving": J(ie) === "summary"
847
- }]),
848
- inert: J(q) !== "summary" || void 0,
849
- role: Y.value ? "button" : void 0,
850
- tabindex: Y.value ? 0 : void 0,
851
- "aria-label": Y.value ? "Expand dock" : void 0,
852
- "aria-expanded": Y.value ? "false" : void 0,
853
- "aria-controls": Y.value ? `${S}-full` : void 0,
854
- onFocusin: r[0] ||= se(() => {}, ["stop"]),
855
- onKeydown: Q,
856
- onClick: r[1] ||= (...e) => J(I) && J(I)(...e)
857
- }, [K(t.$slots, "collapsed")], 42, qe),
858
- e.search ? (U(), N("div", Je, [K(t.$slots, "search")])) : M("", !0)
859
- ], 512),
860
- t.$slots["persistent-end"] ? (U(), N("div", Ye, [K(t.$slots, "persistent-end")])) : M("", !0)
861
- ])], 16, He));
862
- }
863
- }), Ze = c("glass-ui:dock-switcher-tablist"), { KEY: Qe } = Ze;
864
- function $e(e) {
865
- Ze.provide(e);
838
+ "data-held": Y(x) || void 0,
839
+ onMouseenter: t[2] ||= (...e) => Y(S) && Y(S)(...e),
840
+ onMouseleave: t[3] ||= (e) => Y(C)(e),
841
+ onFocusin: t[4] ||= (...e) => Y(w) && Y(w)(...e),
842
+ onFocusout: t[5] ||= (...e) => Y(T) && Y(T)(...e),
843
+ onPointerdownCapture: t[6] ||= (...e) => Y(K) && Y(K)(...e),
844
+ onPointercancelCapture: t[7] ||= (...e) => Y(ee) && Y(ee)(...e),
845
+ onClickCapture: t[8] ||= (...e) => Y(te) && Y(te)(...e)
846
+ }), [
847
+ N("div", {
848
+ class: "dock-plate",
849
+ "aria-hidden": "true",
850
+ "data-held": Y(x) || void 0
851
+ }, [Q.value ? (G(), M(O, { key: 0 }, [t[9] ||= N("span", {
852
+ class: "glass-grasp-carrier",
853
+ "data-grasp": "rest"
854
+ }, null, -1), N("span", {
855
+ class: "glass-grasp-carrier",
856
+ "data-grasp": "grasp",
857
+ onTransitionend: $
858
+ }, null, 32)], 64)) : j("", !0)], 8, Ge),
859
+ N("div", Ke, [
860
+ e.$slots.persistent ? (G(), M("div", qe, [J(e.$slots, "persistent")])) : j("", !0),
861
+ N("div", {
862
+ ref_key: "layersEl",
863
+ ref: l,
864
+ class: "dock-layers"
865
+ }, [
866
+ N("div", {
867
+ ref_key: "fullEl",
868
+ ref: u,
869
+ id: `${h}-full`,
870
+ role: "toolbar",
871
+ "aria-orientation": Y(a),
872
+ class: z(["dock-layer dock-layer--full dock-run", {
873
+ "is-active": Y(B) === "full",
874
+ "is-leaving": Y(V) === "full" || Y(ie) === "full" && Y(B) !== "full",
875
+ "is-press-keepalive": Y(ie) === "full"
876
+ }]),
877
+ inert: Y(B) !== "full" && Y(ie) !== "full" || void 0,
878
+ tabindex: "-1",
879
+ onKeydown: W
880
+ }, [J(e.$slots, "default")], 42, Je),
881
+ N("div", {
882
+ ref_key: "summaryEl",
883
+ ref: f,
884
+ id: `${h}-summary`,
885
+ class: z(["dock-layer dock-layer--summary", {
886
+ "is-active": Y(B) === "summary",
887
+ "is-leaving": Y(V) === "summary"
888
+ }]),
889
+ inert: Y(B) !== "summary" || void 0,
890
+ role: H.value ? "button" : void 0,
891
+ tabindex: H.value ? 0 : void 0,
892
+ "aria-label": H.value ? "Expand dock" : void 0,
893
+ "aria-expanded": H.value ? "false" : void 0,
894
+ "aria-controls": H.value ? `${h}-full` : void 0,
895
+ onFocusin: t[0] ||= ae(() => {}, ["stop"]),
896
+ onKeydown: U,
897
+ onClick: t[1] ||= (...e) => Y(E) && Y(E)(...e)
898
+ }, [J(e.$slots, "collapsed")], 42, Ye),
899
+ e.$slots.search ? (G(), M("div", Xe, [J(e.$slots, "search")])) : j("", !0)
900
+ ], 512),
901
+ e.$slots["persistent-end"] ? (G(), M("div", Ze, [J(e.$slots, "persistent-end")])) : j("", !0)
902
+ ]),
903
+ N("div", {
904
+ ref_key: "statusEl",
905
+ ref: p,
906
+ class: "dock-run-status",
907
+ role: "status",
908
+ "aria-live": "polite"
909
+ }, null, 512)
910
+ ], 16, We));
911
+ }
912
+ }), $e = c("glass-ui:dock-switcher-tablist"), { KEY: et } = $e;
913
+ function tt(e) {
914
+ $e.provide(e);
866
915
  }
867
- var et = Ze.use, tt = s(g, "[glass-ui:dock] <DockLayer> must be used inside <DockCrossfade> (or <DockLayerGroup>)"), { KEY: nt } = tt;
868
- function rt(e) {
869
- tt.provide(e);
916
+ var nt = $e.use, rt = s(u, "[glass-ui:dock] <DockLayer> must be used inside <DockCrossfade> (or <DockLayerGroup>)"), { KEY: it } = rt;
917
+ function at(e) {
918
+ rt.provide(e);
870
919
  }
871
- var it = tt.use;
872
- tt.useOptional;
920
+ var ot = rt.use;
921
+ rt.useOptional;
873
922
  //#endregion
874
923
  //#region src/components/dock/DockCrossfade.vue
875
- var at = /* @__PURE__ */ I({
924
+ var st = /* @__PURE__ */ F({
876
925
  __name: "DockCrossfade",
877
926
  props: {
878
927
  active: {},
879
928
  reserve: { default: "block" }
880
929
  },
881
930
  setup(e, { expose: t }) {
882
- let n = e, r = G(null), i = G(/* @__PURE__ */ new Map()), a = A(() => [...i.value.values()].map(({ id: e, label: t, icon: n }) => ({
931
+ let n = e, r = q(null), i = q(/* @__PURE__ */ new Map()), a = k(() => [...i.value.values()].map(({ id: e, label: t, icon: n }) => ({
883
932
  id: e,
884
933
  label: t,
885
934
  icon: n
@@ -893,36 +942,36 @@ var at = /* @__PURE__ */ I({
893
942
  let t = new Map(i.value);
894
943
  t.delete(e), i.value = t, p();
895
944
  }
896
- let c = A(() => n.active), l = G(null);
897
- rt({
945
+ let c = k(() => n.active), l = q(null);
946
+ at({
898
947
  register: o,
899
948
  unregister: s,
900
949
  activeId: c,
901
950
  leavingId: l,
902
951
  faces: a
903
952
  });
904
- let d = G(0), f = A(() => n.reserve === "inline" ? "min-inline-size" : "min-block-size");
953
+ let u = q(0), d = k(() => n.reserve === "inline" ? "min-inline-size" : "min-block-size");
905
954
  function p() {
906
955
  let e = 0;
907
956
  for (let { el: t } of i.value.values()) {
908
957
  let r = n.reserve === "inline" ? t.scrollWidth : t.scrollHeight;
909
958
  r > e && (e = r);
910
959
  }
911
- e > d.value && (d.value = e);
960
+ e > u.value && (u.value = e);
912
961
  }
913
- let m = A(() => d.value > 0 ? {
914
- [f.value]: `${d.value}px`,
915
- "--dock-crossfade-peak": `${d.value}px`
962
+ let m = k(() => u.value > 0 ? {
963
+ [d.value]: `${u.value}px`,
964
+ "--dock-crossfade-peak": `${u.value}px`
916
965
  } : void 0);
917
- _(r, () => p());
918
- let h = Pe({
919
- response: u.response,
920
- dampingFraction: u.dampingFraction
966
+ v(r, () => p());
967
+ let h = Ne({
968
+ response: f.response,
969
+ dampingFraction: f.dampingFraction
921
970
  });
922
971
  function g(e) {
923
972
  return e ? i.value.get(e)?.el : void 0;
924
973
  }
925
- function v(e, t) {
974
+ function _(e, t) {
926
975
  g(e)?.style.setProperty("--dock-t", `${t}`);
927
976
  }
928
977
  function y(e) {
@@ -931,7 +980,7 @@ var at = /* @__PURE__ */ I({
931
980
  function b(e) {
932
981
  return e < 0 ? 0 : e > 1 ? 1 : e;
933
982
  }
934
- let x = ge("(prefers-reduced-motion: reduce)"), S = null, C = 1;
983
+ let x = me("(prefers-reduced-motion: reduce)"), S = null, C = 1;
935
984
  Z(x, (e) => {
936
985
  e && (h.dispose(), S?.());
937
986
  });
@@ -949,7 +998,7 @@ var at = /* @__PURE__ */ I({
949
998
  return;
950
999
  }
951
1000
  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;
952
- a && a !== e && a !== t && y(a), l.value = t, v(e, c), v(t, 1 - u), w(t, e), r.value?.setAttribute("data-crossfading", "");
1001
+ a && a !== e && a !== t && y(a), l.value = t, _(e, c), _(t, 1 - u), w(t, e), r.value?.setAttribute("data-crossfading", "");
953
1002
  let d = () => {
954
1003
  y(e), y(t), r.value?.removeAttribute("data-crossfading"), l.value = null, C = 1, S === d && (S = null);
955
1004
  };
@@ -961,28 +1010,28 @@ var at = /* @__PURE__ */ I({
961
1010
  C = 1 - c, h.playTo(0, 1, {
962
1011
  inheritVelocityScale: f,
963
1012
  onFrame: (n) => {
964
- v(e, b(c + (1 - c) * n)), v(t, b(1 - u * (1 - n)));
1013
+ _(e, b(c + (1 - c) * n)), _(t, b(1 - u * (1 - n)));
965
1014
  },
966
1015
  onSettle: d
967
1016
  });
968
- }), te(() => {
1017
+ }), V(() => {
969
1018
  h.dispose(), S = null;
970
- }), t({ faces: a }), (e, t) => (U(), N("div", {
1019
+ }), t({ faces: a }), (e, t) => (G(), M("div", {
971
1020
  ref_key: "rootEl",
972
1021
  ref: r,
973
1022
  class: "dock-crossfade",
974
1023
  style: B(m.value)
975
- }, [K(e.$slots, "default")], 4));
1024
+ }, [J(e.$slots, "default")], 4));
976
1025
  }
977
- }), ot = ["data-motion"], st = ["aria-orientation"], ct = [
1026
+ }), ct = ["data-motion"], lt = ["aria-orientation"], ut = [
978
1027
  "id",
979
1028
  "tabindex",
980
1029
  "aria-controls",
981
1030
  "aria-label",
982
1031
  "onClick"
983
- ], lt = { key: 1 }, ut = { key: 2 }, dt = /* @__PURE__ */ I({
1032
+ ], dt = { key: 1 }, ft = { key: 2 }, pt = /* @__PURE__ */ F({
984
1033
  __name: "DockLayerGroup",
985
- props: /*@__PURE__*/ ee({
1034
+ props: /*@__PURE__*/ I({
986
1035
  orientation: {},
987
1036
  showSwitcher: {
988
1037
  type: Boolean,
@@ -996,8 +1045,8 @@ var at = /* @__PURE__ */ I({
996
1045
  }),
997
1046
  emits: ["update:active"],
998
1047
  setup(e) {
999
- let t = e, n = o(() => t.motion), r = Y(e, "active"), i = m(), 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 = G(null), f = G(null), h = G([]), g = S({
1000
- options: A(() => c.value.map((e) => ({ value: e.id }))),
1048
+ let t = e, n = o(() => t.motion), r = ie(e, "active"), i = m(), a = k(() => t.orientation ?? i?.orientation.value ?? "horizontal"), s = X("crossfade"), c = k(() => s.value?.faces ?? []), l = k(() => a.value === "vertical" ? "horizontal" : "vertical"), u = k(() => l.value === "vertical"), d = q(null), f = q(null), h = q([]), g = S({
1049
+ options: k(() => c.value.map((e) => ({ value: e.id }))),
1001
1050
  model: r,
1002
1051
  mode: "single",
1003
1052
  role: "tablist",
@@ -1005,13 +1054,13 @@ var at = /* @__PURE__ */ I({
1005
1054
  containerRef: d,
1006
1055
  indicatorRef: f,
1007
1056
  buttonRefs: h
1008
- }), _ = A(() => t.showSwitcher && c.value.length > 1), v = ae(), y = (e) => e.replace(/[^a-zA-Z0-9_-]/g, ""), b = (e) => `dock-tab-${v}-${y(e)}`, x = (e) => `dock-panel-${v}-${y(e)}`;
1009
- $e({
1057
+ }), _ = k(() => t.showSwitcher && c.value.length > 1), v = re(), y = (e) => e.replace(/[^a-zA-Z0-9_-]/g, ""), b = (e) => `dock-tab-${v}-${y(e)}`, x = (e) => `dock-panel-${v}-${y(e)}`;
1058
+ tt({
1010
1059
  isTablist: _,
1011
1060
  tabId: b,
1012
1061
  panelId: x
1013
1062
  });
1014
- let w = A(() => u.value ? "y" : "x");
1063
+ let w = k(() => u.value ? "y" : "x");
1015
1064
  function T() {
1016
1065
  let e = d.value;
1017
1066
  if (!e) return [];
@@ -1039,35 +1088,35 @@ var at = /* @__PURE__ */ I({
1039
1088
  n.armed.value
1040
1089
  ], () => {
1041
1090
  n.armed.value && R(() => E.refresh());
1042
- }), V(() => {
1091
+ }), H(() => {
1043
1092
  n.armed.value && R(() => E.refresh());
1044
1093
  });
1045
1094
  function D(e) {
1046
1095
  return typeof e == "object" && !!e || typeof e == "function";
1047
1096
  }
1048
- let O = p(() => i);
1097
+ let F = p(() => i);
1049
1098
  function I() {
1050
- O.acquire();
1099
+ F.acquire();
1051
1100
  }
1052
- function ee(e) {
1101
+ function V(e) {
1053
1102
  let t = e.relatedTarget, n = e.currentTarget;
1054
- t && n?.contains(t) || O.release();
1103
+ t && n?.contains(t) || F.release();
1055
1104
  }
1056
- return (t, i) => (U(), N("div", {
1105
+ return (t, i) => (G(), M("div", {
1057
1106
  class: z(["dock-layer-group", [a.value, `switcher-${e.switcherPosition}`]]),
1058
- "data-motion": J(n).dataMotion.value,
1059
- style: B(J(n).hostStyle.value)
1060
- }, [_.value ? (U(), N("div", {
1107
+ "data-motion": Y(n).dataMotion.value,
1108
+ style: B(Y(n).hostStyle.value)
1109
+ }, [_.value ? (G(), M("div", {
1061
1110
  key: 0,
1062
1111
  ref_key: "switcherListEl",
1063
1112
  ref: d,
1064
1113
  role: "tablist",
1065
- class: z(["dock-layer-switcher", [e.switcherPosition, J(n).armed.value && "glass-drag-grabbable"]]),
1114
+ class: z(["dock-layer-switcher", [e.switcherPosition, Y(n).armed.value && "glass-drag-grabbable"]]),
1066
1115
  "aria-orientation": l.value,
1067
- onKeydown: i[0] ||= (...e) => J(g).onKeydown && J(g).onKeydown(...e),
1116
+ onKeydown: i[0] ||= (...e) => Y(g).onKeydown && Y(g).onKeydown(...e),
1068
1117
  onFocusin: I,
1069
- onFocusout: ee
1070
- }, [(U(!0), N(k, null, re(c.value, (e, t) => (U(), N("button", L({
1118
+ onFocusout: V
1119
+ }, [(G(!0), M(O, null, ee(c.value, (e, t) => (G(), M("button", L({
1071
1120
  key: e.id,
1072
1121
  ref_for: !0,
1073
1122
  ref: (e) => {
@@ -1076,37 +1125,37 @@ var at = /* @__PURE__ */ I({
1076
1125
  type: "button",
1077
1126
  class: "dock-layer-tab",
1078
1127
  id: b(e.id),
1079
- tabindex: J(g).rovingTabindex(t)
1080
- }, { ref_for: !0 }, J(g).itemAttrs(e.id), {
1128
+ tabindex: Y(g).rovingTabindex(t)
1129
+ }, { ref_for: !0 }, Y(g).itemAttrs(e.id), {
1081
1130
  "aria-controls": x(e.id),
1082
1131
  "aria-label": e.label ?? e.id,
1083
- onClick: (n) => J(g).select(e.id, t)
1084
- }), [D(e.icon) ? (U(), j(q(e.icon), {
1132
+ onClick: (n) => Y(g).select(e.id, t)
1133
+ }), [D(e.icon) ? (G(), A(te(e.icon), {
1085
1134
  key: 0,
1086
1135
  class: "size-4"
1087
- })) : typeof e.icon == "string" ? (U(), N("span", lt, ie(e.icon), 1)) : (U(), N("span", ut, ie((e.label ?? e.id).charAt(0)), 1))], 16, ct))), 128)), P("div", {
1136
+ })) : typeof e.icon == "string" ? (G(), M("span", dt, ne(e.icon), 1)) : (G(), M("span", ft, ne((e.label ?? e.id).charAt(0)), 1))], 16, ut))), 128)), N("div", {
1088
1137
  ref_key: "switcherIndicatorEl",
1089
1138
  ref: f,
1090
- class: z(["dock-layer-tab-indicator", J(n).armed.value && J(E).dragging.value && "glass-drag-lift"]),
1091
- style: B(J(g).singleSliderStyle.value),
1139
+ class: z(["dock-layer-tab-indicator", Y(n).armed.value && Y(E).dragging.value && "glass-drag-lift"]),
1140
+ style: B(Y(g).singleSliderStyle.value),
1092
1141
  "aria-hidden": "true"
1093
- }, null, 6)], 42, st)) : M("", !0), F(at, {
1142
+ }, null, 6)], 42, lt)) : j("", !0), P(st, {
1094
1143
  ref_key: "crossfade",
1095
1144
  ref: s,
1096
1145
  active: r.value
1097
1146
  }, {
1098
- default: Q(() => [K(t.$slots, "default")]),
1147
+ default: Q(() => [J(t.$slots, "default")]),
1099
1148
  _: 3
1100
- }, 8, ["active"])], 14, ot));
1149
+ }, 8, ["active"])], 14, ct));
1101
1150
  }
1102
- }), ft = [
1151
+ }), mt = [
1103
1152
  "role",
1104
1153
  "id",
1105
1154
  "aria-labelledby",
1106
1155
  "inert",
1107
1156
  "aria-hidden",
1108
1157
  "tabindex"
1109
- ], pt = { class: "dock-face-content" }, mt = /* @__PURE__ */ I({
1158
+ ], ht = { class: "dock-face-content" }, gt = /* @__PURE__ */ F({
1110
1159
  __name: "DockLayer",
1111
1160
  props: {
1112
1161
  id: {},
@@ -1114,8 +1163,8 @@ var at = /* @__PURE__ */ I({
1114
1163
  icon: {}
1115
1164
  },
1116
1165
  setup(e) {
1117
- let t = e, n = it(), r = X("hostEl");
1118
- V(() => {
1166
+ let t = e, n = ot(), r = X("hostEl");
1167
+ H(() => {
1119
1168
  r.value && n.register({
1120
1169
  id: t.id,
1121
1170
  label: t.label,
@@ -1133,9 +1182,9 @@ var at = /* @__PURE__ */ I({
1133
1182
  icon: t.icon,
1134
1183
  el: r.value
1135
1184
  });
1136
- }), te(() => n.unregister(t.id));
1137
- let i = A(() => n.activeId.value === t.id), a = A(() => n.leavingId.value === t.id), o = et(), 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);
1138
- return (e, t) => (U(), N("div", {
1185
+ }), V(() => n.unregister(t.id));
1186
+ let i = k(() => n.activeId.value === t.id), a = k(() => n.leavingId.value === t.id), o = nt(), s = k(() => o?.isTablist.value ?? !1), c = k(() => s.value ? o.panelId(t.id) : void 0), l = k(() => s.value ? o.tabId(t.id) : void 0);
1187
+ return (e, t) => (G(), M("div", {
1139
1188
  ref_key: "hostEl",
1140
1189
  ref: r,
1141
1190
  class: z(["dock-face", {
@@ -1148,9 +1197,9 @@ var at = /* @__PURE__ */ I({
1148
1197
  inert: !i.value || void 0,
1149
1198
  "aria-hidden": !i.value || void 0,
1150
1199
  tabindex: i.value ? -1 : void 0
1151
- }, [P("div", pt, [K(e.$slots, "default")])], 10, ft));
1200
+ }, [N("div", ht, [J(e.$slots, "default")])], 10, mt));
1152
1201
  }
1153
- }), ht = /* @__PURE__ */ I({
1202
+ }), _t = /* @__PURE__ */ F({
1154
1203
  __name: "DockControl",
1155
1204
  props: {
1156
1205
  shape: { default: "icon" },
@@ -1181,13 +1230,13 @@ var at = /* @__PURE__ */ I({
1181
1230
  ] }
1182
1231
  },
1183
1232
  setup(t) {
1184
- 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(() => ({
1233
+ let r = t, o = k(() => r.shape === "tab"), s = k(() => o.value ? e("dock-tab-button glass-specular-track", r.class) : e("dock-icon-button glass-specular-track glass-capsule-hover", { "glass-capsule": r.active }, { "dock-icon-button--compact": r.compact }, r.class)), c = k(() => ({
1185
1234
  ...r.active === void 0 ? {} : {
1186
1235
  "aria-pressed": String(r.active),
1187
1236
  ...r.active ? { "data-active": "" } : {}
1188
1237
  },
1189
1238
  ...r.disabled ? { "aria-disabled": "true" } : {}
1190
- })), l = A(() => !r.asChild && r.as === "button" ? { type: r.type } : {}), u = i("press"), d = a({
1239
+ })), l = k(() => !r.asChild && r.as === "button" ? { type: r.type } : {}), u = i("press"), d = a({
1191
1240
  disabled: () => r.disabled || o.value,
1192
1241
  squish: !0,
1193
1242
  response: u.response,
@@ -1195,11 +1244,11 @@ var at = /* @__PURE__ */ I({
1195
1244
  pressVar: "--dock-press-t",
1196
1245
  shrinkDepth: .04,
1197
1246
  maxStretch: 1.03
1198
- }), f = A(() => o.value ? {} : { ...d.pressStyle.value });
1247
+ }), f = k(() => o.value ? {} : { ...d.pressStyle.value });
1199
1248
  function p(e) {
1200
1249
  r.disabled && (e.preventDefault(), e.stopImmediatePropagation());
1201
1250
  }
1202
- return (e, r) => oe((U(), j(J(le), L({
1251
+ return (e, r) => $((G(), A(Y(se), L({
1203
1252
  as: t.as,
1204
1253
  "as-child": t.asChild
1205
1254
  }, {
@@ -1208,18 +1257,18 @@ var at = /* @__PURE__ */ I({
1208
1257
  }, {
1209
1258
  class: s.value,
1210
1259
  style: f.value,
1211
- "data-press-armed": !o.value && J(d).armed ? "" : void 0,
1212
- onPointerdown: J(d).handlers.onPointerdown,
1213
- onPointerup: J(d).handlers.onPointerup,
1214
- onPointercancel: J(d).handlers.onPointercancel,
1215
- onPointerleave: J(d).handlers.onPointerleave,
1216
- onPointerenter: J(d).handlers.onPointerenter,
1217
- onKeydown: J(d).handlers.onKeydown,
1218
- onKeyup: J(d).handlers.onKeyup,
1219
- onBlur: J(d).handlers.onBlur,
1260
+ "data-press-armed": !o.value && Y(d).armed ? "" : void 0,
1261
+ onPointerdown: Y(d).handlers.onPointerdown,
1262
+ onPointerup: Y(d).handlers.onPointerup,
1263
+ onPointercancel: Y(d).handlers.onPointercancel,
1264
+ onPointerleave: Y(d).handlers.onPointerleave,
1265
+ onPointerenter: Y(d).handlers.onPointerenter,
1266
+ onKeydown: Y(d).handlers.onKeydown,
1267
+ onKeyup: Y(d).handlers.onKeyup,
1268
+ onBlur: Y(d).handlers.onBlur,
1220
1269
  onClickCapture: p
1221
1270
  }), {
1222
- default: Q(() => [K(e.$slots, "default")]),
1271
+ default: Q(() => [J(e.$slots, "default")]),
1223
1272
  _: 3
1224
1273
  }, 16, [
1225
1274
  "as",
@@ -1235,9 +1284,9 @@ var at = /* @__PURE__ */ I({
1235
1284
  "onKeydown",
1236
1285
  "onKeyup",
1237
1286
  "onBlur"
1238
- ])), [[J(n)]]);
1287
+ ])), [[Y(n)]]);
1239
1288
  }
1240
- }), gt = /* @__PURE__ */ I({
1289
+ }), vt = /* @__PURE__ */ F({
1241
1290
  inheritAttrs: !1,
1242
1291
  __name: "DockTrigger",
1243
1292
  props: {
@@ -1251,28 +1300,28 @@ var at = /* @__PURE__ */ I({
1251
1300
  ] }
1252
1301
  },
1253
1302
  setup(t) {
1254
- let r = t, i = A(() => e("dock-trigger", r.for === "select" && "dock-select-trigger", r.for !== "select" && "dock-dropdown-trigger", r.class));
1255
- return (e, t) => r.for === "select" ? oe((U(), j(J(de), L({ key: 0 }, e.$attrs, { class: i.value }), {
1256
- default: Q(() => [K(e.$slots, "default"), F(J(ue), { "as-child": "" }, {
1257
- default: Q(() => [K(e.$slots, "icon", {}, () => [F(J(fe), {
1303
+ let r = t, i = k(() => e("dock-trigger", r.for === "select" && "dock-select-trigger", r.for !== "select" && "dock-dropdown-trigger", r.class));
1304
+ return (e, t) => r.for === "select" ? $((G(), A(Y(le), L({ key: 0 }, e.$attrs, { class: i.value }), {
1305
+ default: Q(() => [J(e.$slots, "default"), P(Y(ce), { "as-child": "" }, {
1306
+ default: Q(() => [J(e.$slots, "icon", {}, () => [P(Y(ue), {
1258
1307
  class: "dock-select-trigger__chevron",
1259
1308
  "aria-hidden": "true"
1260
1309
  })])]),
1261
1310
  _: 3
1262
1311
  })]),
1263
1312
  _: 3
1264
- }, 16, ["class"])), [[J(n)]]) : r.for === "dropdown" ? oe((U(), j(x, L({ key: 1 }, e.$attrs, {
1313
+ }, 16, ["class"])), [[Y(n)]]) : r.for === "dropdown" ? $((G(), A(x, L({ key: 1 }, e.$attrs, {
1265
1314
  action: "pointerdown",
1266
1315
  class: i.value
1267
1316
  }), {
1268
- default: Q(() => [K(e.$slots, "default")]),
1317
+ default: Q(() => [J(e.$slots, "default")]),
1269
1318
  _: 3
1270
- }, 16, ["class"])), [[J(n)]]) : oe((U(), j(J(ce), L({ key: 2 }, e.$attrs, { class: i.value }), {
1271
- default: Q(() => [K(e.$slots, "default")]),
1319
+ }, 16, ["class"])), [[Y(n)]]) : $((G(), A(Y(oe), L({ key: 2 }, e.$attrs, { class: i.value }), {
1320
+ default: Q(() => [J(e.$slots, "default")]),
1272
1321
  _: 3
1273
- }, 16, ["class"])), [[J(n)]]);
1322
+ }, 16, ["class"])), [[Y(n)]]);
1274
1323
  }
1275
- }), _t = /* @__PURE__ */ I({
1324
+ }), yt = /* @__PURE__ */ F({
1276
1325
  __name: "DockBackgroundToggle",
1277
1326
  props: {
1278
1327
  paused: {
@@ -1284,22 +1333,22 @@ var at = /* @__PURE__ */ I({
1284
1333
  },
1285
1334
  emits: ["update:paused"],
1286
1335
  setup(e, { emit: t }) {
1287
- let n = e, r = t, i = A(() => n.paused ? n.playLabel : n.pauseLabel);
1336
+ let n = e, r = t, i = k(() => n.paused ? n.playLabel : n.pauseLabel);
1288
1337
  function a() {
1289
1338
  r("update:paused", !n.paused);
1290
1339
  }
1291
- return (t, n) => (U(), j(ht, {
1340
+ return (t, n) => (G(), A(_t, {
1292
1341
  type: "button",
1293
1342
  active: e.paused,
1294
1343
  "aria-pressed": e.paused,
1295
1344
  "aria-label": i.value,
1296
1345
  onClick: a
1297
1346
  }, {
1298
- default: Q(() => [e.paused ? (U(), j(J(me), {
1347
+ default: Q(() => [e.paused ? (G(), A(Y(fe), {
1299
1348
  key: 0,
1300
1349
  size: 18,
1301
1350
  "aria-hidden": "true"
1302
- })) : (U(), j(J(pe), {
1351
+ })) : (G(), A(Y(de), {
1303
1352
  key: 1,
1304
1353
  size: 18,
1305
1354
  "aria-hidden": "true"
@@ -1311,36 +1360,213 @@ var at = /* @__PURE__ */ I({
1311
1360
  "aria-label"
1312
1361
  ]));
1313
1362
  }
1314
- }), vt = [
1363
+ }), bt = [
1315
1364
  "data-orientation",
1316
1365
  "data-dock-hairline",
1317
1366
  "aria-orientation"
1318
- ], yt = /* @__PURE__ */ I({
1367
+ ], xt = /* @__PURE__ */ F({
1319
1368
  __name: "DockSeparator",
1320
1369
  props: { anchor: {
1321
1370
  type: Boolean,
1322
1371
  default: !1
1323
1372
  } },
1324
1373
  setup(e) {
1325
- let t = m(), n = A(() => t?.orientation.value ?? "horizontal"), r = A(() => n.value), i = A(() => n.value === "vertical" ? "horizontal" : "vertical");
1326
- return (t, n) => (U(), N("div", {
1374
+ let t = m(), n = k(() => t?.orientation.value ?? "horizontal"), r = k(() => n.value), i = k(() => n.value === "vertical" ? "horizontal" : "vertical");
1375
+ return (t, n) => (G(), M("div", {
1327
1376
  class: z(["dock-separator", { "dock-hairline": e.anchor }]),
1328
1377
  role: "separator",
1329
1378
  "data-orientation": r.value,
1330
1379
  "data-dock-hairline": e.anchor || void 0,
1331
1380
  "aria-orientation": i.value
1332
- }, null, 10, vt));
1381
+ }, null, 10, bt));
1333
1382
  }
1334
1383
  });
1335
1384
  //#endregion
1385
+ //#region src/composables/search/match.ts
1386
+ function St(e, t) {
1387
+ let n = e.length, r = t.length;
1388
+ if (n === 0) return {
1389
+ score: 0,
1390
+ matches: []
1391
+ };
1392
+ if (n > r) return null;
1393
+ let i = [], a = 0, o = 0, s = -2;
1394
+ for (let c = 0; c < r && a < n; c++) {
1395
+ if (e[a] !== t[c]) continue;
1396
+ i.push(c);
1397
+ let n = 1;
1398
+ if (s === c - 1 && (n += 5), c === 0) n += 8;
1399
+ else {
1400
+ let e = t[c - 1];
1401
+ " -_./\\:()".includes(e) ? n += 7 : t[c] >= "A" && t[c] <= "Z" && e >= "a" && e <= "z" && (n += 6);
1402
+ }
1403
+ a === c && (n += 3), o += n, s = c, a++;
1404
+ }
1405
+ return a < n ? null : (o -= Math.max(0, (r - n) * .1), {
1406
+ score: o,
1407
+ matches: i
1408
+ });
1409
+ }
1410
+ function Ct(e, t) {
1411
+ if (!t) return null;
1412
+ let n = 0, r = [];
1413
+ for (let i of e) {
1414
+ let e = St(i, t);
1415
+ if (!e) return null;
1416
+ n += e.score;
1417
+ for (let t of e.matches) r.push(t);
1418
+ }
1419
+ return {
1420
+ score: n,
1421
+ matches: r
1422
+ };
1423
+ }
1424
+ function wt(e, t) {
1425
+ let n = null, r = [], i = [
1426
+ [t._lc.label, 12],
1427
+ [t._lc.type, 10],
1428
+ [t._lc.text, 3]
1429
+ ];
1430
+ for (let [a, o] of i) {
1431
+ if (!a) continue;
1432
+ let i = Ct(e, a);
1433
+ if (!i) continue;
1434
+ let s = i.score * o;
1435
+ (n === null || s > n) && (n = s, r = a === t._lc.label ? i.matches : []);
1436
+ }
1437
+ return n === null ? null : {
1438
+ score: n,
1439
+ matches: r
1440
+ };
1441
+ }
1442
+ function Tt(e) {
1443
+ return e.map((e) => ({
1444
+ item: e,
1445
+ _lc: {
1446
+ label: e.label.toLowerCase(),
1447
+ text: e.text.toLowerCase(),
1448
+ type: e.type?.toLowerCase() ?? ""
1449
+ }
1450
+ }));
1451
+ }
1452
+ var Et = /* @__PURE__ */ new WeakMap();
1453
+ function Dt(e) {
1454
+ let t = Et.get(e);
1455
+ return t || (t = /* @__PURE__ */ new Map(), Et.set(e, t)), t;
1456
+ }
1457
+ function Ot(e, t, n = 30) {
1458
+ let r = t.toLowerCase().trim();
1459
+ if (!r) return [];
1460
+ let i = Dt(e), a = i.get(r);
1461
+ if (a) return a.slice(0, n);
1462
+ i.size > 200 && i.clear();
1463
+ let o = r.split(/\s+/).filter(Boolean);
1464
+ if (o.length === 0) return [];
1465
+ let s = e;
1466
+ if (r.length > 1) {
1467
+ let e = r.slice(0, -1), t = i.get(e);
1468
+ t && (s = t.map((e) => ({
1469
+ item: e.item,
1470
+ _lc: {
1471
+ label: e.item.label.toLowerCase(),
1472
+ text: e.item.text.toLowerCase(),
1473
+ type: e.item.type?.toLowerCase() ?? ""
1474
+ }
1475
+ })));
1476
+ }
1477
+ let c = [];
1478
+ for (let e of s) {
1479
+ let t = wt(o, e);
1480
+ t && c.push({
1481
+ item: e.item,
1482
+ score: t.score,
1483
+ matchIndices: t.matches
1484
+ });
1485
+ }
1486
+ return c.sort((e, t) => t.score - e.score), i.set(r, c), c.slice(0, n);
1487
+ }
1488
+ function kt(e) {
1489
+ if (e) {
1490
+ Et.delete(e);
1491
+ return;
1492
+ }
1493
+ Et = /* @__PURE__ */ new WeakMap();
1494
+ }
1495
+ //#endregion
1496
+ //#region src/composables/search/useFuzzySearch.ts
1497
+ function At(e) {
1498
+ let t = typeof e.items == "function" ? e.items : () => e.items, n = e.debounceMs ?? 120, r = e.maxResults ?? 30, i = q(""), a = q(!1), o = q(!1), s = q(0), c = q(""), l = k(() => t()), u = k(() => Tt(l.value)), d;
1499
+ function f(e = d) {
1500
+ e !== void 0 && (clearTimeout(e), d === e && (d = void 0));
1501
+ }
1502
+ Z(i, (e, t, r) => {
1503
+ if (f(), !e || n <= 0) {
1504
+ c.value = e;
1505
+ return;
1506
+ }
1507
+ let i = setTimeout(() => {
1508
+ d === i && (c.value = e, d = void 0);
1509
+ }, n);
1510
+ d = i, r(() => f(i));
1511
+ }), Z(l, () => {
1512
+ f(), c.value = i.value, s.value = 0;
1513
+ }, { deep: !0 });
1514
+ let p = k(() => Ot(u.value, c.value, r));
1515
+ Z(p, () => {
1516
+ s.value = 0;
1517
+ });
1518
+ function m(t) {
1519
+ e.onSelect?.(t), h();
1520
+ }
1521
+ function h() {
1522
+ a.value = !1, o.value = !1, f(), i.value = "", c.value = "", s.value = 0, kt(u.value);
1523
+ }
1524
+ function g() {
1525
+ a.value = !0;
1526
+ }
1527
+ function _() {
1528
+ o.value = !o.value;
1529
+ }
1530
+ function v(e) {
1531
+ switch (e.key) {
1532
+ case "ArrowDown":
1533
+ e.preventDefault(), s.value < p.value.length - 1 && s.value++;
1534
+ break;
1535
+ case "ArrowUp":
1536
+ e.preventDefault(), s.value > 0 && s.value--;
1537
+ break;
1538
+ case "Enter":
1539
+ e.preventDefault(), p.value[s.value] && m(p.value[s.value]);
1540
+ break;
1541
+ case "Escape":
1542
+ e.preventDefault(), o.value ? o.value = !1 : h();
1543
+ break;
1544
+ }
1545
+ }
1546
+ return U(() => {
1547
+ f(), kt(u.value);
1548
+ }, !0), {
1549
+ query: i,
1550
+ results: p,
1551
+ isOpen: a,
1552
+ isExpanded: o,
1553
+ selectedIndex: s,
1554
+ selectResult: m,
1555
+ close: h,
1556
+ open: g,
1557
+ toggleExpanded: _,
1558
+ onKeydown: v
1559
+ };
1560
+ }
1561
+ //#endregion
1336
1562
  //#region src/components/dock/composables/useDockSearch.ts
1337
- function bt(e) {
1338
- let { dockState: t } = e, n = e.debounceMs ?? 120, r = e.maxResults ?? 30, i = G([]), a = null, o = e.items ? e.items : () => i.value;
1563
+ function jt(e) {
1564
+ let { dockState: t } = e, n = e.debounceMs ?? 120, r = e.maxResults ?? 30, i = q([]), a = null, o = e.items ? e.items : () => i.value;
1339
1565
  function s(t) {
1340
1566
  let n = t.item.id;
1341
1567
  e.ensureTargetWindow?.(n), e.scrollTo?.(n), e.onResultSelect?.(t);
1342
1568
  }
1343
- let c = O({
1569
+ let c = At({
1344
1570
  items: o,
1345
1571
  debounceMs: n,
1346
1572
  maxResults: r,
@@ -1361,7 +1587,7 @@ function bt(e) {
1361
1587
  });
1362
1588
  });
1363
1589
  }
1364
- let l = A(() => {
1590
+ let l = k(() => {
1365
1591
  let e = c.query.value;
1366
1592
  if (!e) return "";
1367
1593
  let t = c.results.value[0];
@@ -1384,7 +1610,7 @@ function bt(e) {
1384
1610
  return e.collapseOnScroll && e.scrollContainer && (g = E(e.scrollContainer, {
1385
1611
  collapseOnScroll: !0,
1386
1612
  chromeRef: e.chromeRef
1387
- })), ne(() => {
1613
+ })), U(() => {
1388
1614
  a?.abort(), a = null;
1389
1615
  }), {
1390
1616
  fuzzy: c,
@@ -1397,4 +1623,4 @@ function bt(e) {
1397
1623
  };
1398
1624
  }
1399
1625
  //#endregion
1400
- export { h as DOCK_CONTEXT_KEY, _t as DockBackgroundToggle, ht as DockControl, at as DockCrossfade, mt as DockLayer, dt as DockLayerGroup, yt as DockSeparator, gt as DockTrigger, Xe as GlassDock, d as provideDockContext, l as useDockContext, w as useDockCtaReceive, bt as useDockSearch, m as useOptionalDockContext };
1626
+ export { h as DOCK_CONTEXT_KEY, yt as DockBackgroundToggle, _t as DockControl, st as DockCrossfade, gt as DockLayer, pt as DockLayerGroup, xt as DockSeparator, vt as DockTrigger, Qe as GlassDock, d as provideDockContext, l as useDockContext, w as useDockCtaReceive, jt as useDockSearch, m as useOptionalDockContext };