@mkbabb/glass-ui 10.1.5 → 11.0.1

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 (214) hide show
  1. package/MIGRATION.md +1024 -1461
  2. package/README.md +2 -2
  3. package/dist/DialogContent-DG5kseRQ.js +159 -0
  4. package/dist/DropdownMenuTrigger-uhSXgEfK.js +76 -0
  5. package/dist/{Surface-1nPoabc3.js → Surface-C7wq2j0A.js} +3 -0
  6. package/dist/aurora.css +1 -0
  7. package/dist/aurora.js +246 -2472
  8. package/dist/auroraImageSource-xNLDUjcy.js +30 -0
  9. package/dist/axes.js +8 -8
  10. package/dist/blob.css +1 -0
  11. package/dist/blob.js +57 -54
  12. package/dist/budget-CJfhLIIV.js +13 -0
  13. package/dist/button-CAKhiOZy.js +113 -0
  14. package/dist/button.js +1 -1
  15. package/dist/{card-ByyqRBvK.js → card-D_uXphvL.js} +4 -1
  16. package/dist/card.js +1 -1
  17. package/dist/carousel.js +3 -2
  18. package/dist/{checkbox-B1qn65se.js → checkbox-COLnvULu.js} +1 -0
  19. package/dist/checkbox.css +1 -0
  20. package/dist/checkbox.js +1 -1
  21. package/dist/{collapsible-DFzK29Oh.js → collapsible-Bd4Et730.js} +1 -0
  22. package/dist/collapsible.css +1 -0
  23. package/dist/collapsible.js +1 -1
  24. package/dist/color-HkUaTAJj.js +270 -0
  25. package/dist/{color.glsl-DTJhdekG.js → color.glsl-bFJm8k5R.js} +4 -16
  26. package/dist/color.wgsl-B-qDJ_OM.js +4 -0
  27. package/dist/{command-CatrAsrl.js → command-BsFOGZwB.js} +3 -2
  28. package/dist/command.css +1 -0
  29. package/dist/command.js +1 -1
  30. package/dist/component-styles.css +0 -1
  31. package/dist/components/_shared/axes.d.ts +7 -0
  32. package/dist/components/_shared/feedback/dot-ring.css +1 -1
  33. package/dist/components/_shared/overlay/focus-return.d.ts +9 -0
  34. package/dist/components/_shared/overlay/index.d.ts +3 -0
  35. package/dist/components/_shared/overlay/root-scroll-lock.d.ts +4 -0
  36. package/dist/components/_shared/overlay/sheet-width.d.ts +2 -0
  37. package/dist/components/_shared/shape/useBarShape.d.ts +4 -0
  38. package/dist/components/aurora/composables/auroraFallbackGround.d.ts +12 -0
  39. package/dist/components/aurora/constants/presets.d.ts +21 -0
  40. package/dist/components/aurora/index.d.ts +2 -2
  41. package/dist/components/button/styles.css +1 -1
  42. package/dist/components/dark-mode-toggle/dark-mode-toggle.css +1 -1
  43. package/dist/components/dialog/DialogContent.vue.d.ts +2 -2
  44. package/dist/components/dialog/ModalOverlay.vue.d.ts +2 -2
  45. package/dist/components/dialog/ModalScrim.vue.d.ts +26 -0
  46. package/dist/components/dialog/styles.css +1 -1
  47. package/dist/components/dock/GlassDock.vue.d.ts +4 -1
  48. package/dist/components/dock/composables/useDockShellProps.d.ts +34 -2
  49. package/dist/components/dock/composables/useDockState.d.ts +5 -0
  50. package/dist/components/dock/index.d.ts +1 -2
  51. package/dist/components/dock/styles/controls/icon-button.css +1 -1
  52. package/dist/components/dock/styles/controls/tab-button.css +1 -1
  53. package/dist/components/dock/styles/morph.css +1 -1
  54. package/dist/components/dock/styles/run.css +1 -1
  55. package/dist/components/dock/styles/shell.css +1 -1
  56. package/dist/components/dock/trigger.d.ts +1 -0
  57. package/dist/components/expandable-container/ExpandableContainer.vue.d.ts +30 -29
  58. package/dist/components/menu/ContextMenu.vue.d.ts +27 -0
  59. package/dist/components/menu/DropdownMenu.vue.d.ts +5 -23
  60. package/dist/components/menu/context.d.ts +18 -5
  61. package/dist/components/menu/family-click.d.ts +2 -0
  62. package/dist/components/menu/family-context.d.ts +2 -0
  63. package/dist/components/menu/index.d.ts +1 -1
  64. package/dist/components/sheet/SheetContent.vue.d.ts +2 -2
  65. package/dist/components/sortable-list/styles.css +1 -0
  66. package/dist/components/surface/Surface.vue.d.ts +4 -1
  67. package/dist/components/tabs/composables/useTabDragMorph.d.ts +4 -7
  68. package/dist/components/tabs/styles/segmented.css +1 -1
  69. package/dist/components/tabs/types.d.ts +7 -8
  70. package/dist/composables/glass/fieldPaint.d.ts +4 -0
  71. package/dist/composables/glass/useGlassBackdropLuminance.d.ts +7 -6
  72. package/dist/composables/glass/webgpu/useGpuSubstrate.d.ts +8 -0
  73. package/dist/composables/motion/core/motionTempo.d.ts +2 -1
  74. package/dist/composables/motion/morph/useDragMorph.d.ts +2 -2
  75. package/dist/composables/motion/morph/useSelectionGroup.d.ts +6 -25
  76. package/dist/composables/motion/morph/useSelectionIndicator.d.ts +8 -54
  77. package/dist/composables/motion/spring/useLiquidFlex.d.ts +3 -5
  78. package/dist/composables/motion/spring/useSpringMount.d.ts +0 -9
  79. package/dist/{configurator-Dl10mc3L.js → configurator-C1ZKEf1b.js} +7 -5
  80. package/dist/configurator.css +1 -0
  81. package/dist/configurator.js +1 -1
  82. package/dist/constants-DfrO-IaH.js +8 -0
  83. package/dist/constellation.css +1 -0
  84. package/dist/constellation.js +2 -1
  85. package/dist/control.css +1 -0
  86. package/dist/{control.css_vue_type_style_index_0_src_true_lang-BIdufaDG.js → control.css_vue_type_style_index_0_src_true_lang-D2hdtjs4.js} +1 -0
  87. package/dist/{createCanvasLifecycle-hJHobVTn.js → createCanvasLifecycle-DS0vEs_G.js} +76 -75
  88. package/dist/dark-mode-toggle.js +1 -1
  89. package/dist/{data-table-8y6fbyOB.js → data-table-CunuMkZ3.js} +1 -0
  90. package/dist/data-table.css +1 -0
  91. package/dist/data-table.js +1 -1
  92. package/dist/{deck-Cm_VmyNL.js → deck-Bc-2mEKE.js} +1 -0
  93. package/dist/deck.js +1 -1
  94. package/dist/dialog.js +1 -1
  95. package/dist/dock-trigger.d.ts +1 -0
  96. package/dist/dock-trigger.js +88 -0
  97. package/dist/dock.js +685 -729
  98. package/dist/easing.js +4 -4
  99. package/dist/expandable-container-wS1awXGd.js +135 -0
  100. package/dist/expandable-container.css +1 -0
  101. package/dist/expandable-container.js +1 -1
  102. package/dist/{fading-scroll-ClCPooXb.js → fading-scroll-D3Y20ibL.js} +1 -1
  103. package/dist/fading-scroll.js +1 -1
  104. package/dist/fieldPaint-Ci77oajZ.js +7 -0
  105. package/dist/fourier-field.css +1 -0
  106. package/dist/fourier-field.js +15 -13
  107. package/dist/glSetup-DMaDgrEj.js +577 -0
  108. package/dist/glass-ui.js +66 -65
  109. package/dist/handmark.css +1 -0
  110. package/dist/handmark.js +82 -71
  111. package/dist/index.css +1 -0
  112. package/dist/index.d.ts +1 -1
  113. package/dist/{input-eLZ_AU7l.js → input-BLF2pMHE.js} +1 -1
  114. package/dist/input.js +1 -1
  115. package/dist/{label-CE03H1KL.js → label-ryNPL7e6.js} +1 -0
  116. package/dist/label.css +1 -0
  117. package/dist/label.js +1 -1
  118. package/dist/labeled-field.css +1 -0
  119. package/dist/labeled-field.js +5 -4
  120. package/dist/{menu-DaYAZiVW.js → menu-C_l2Sslf.js} +162 -112
  121. package/dist/menu.js +3 -3
  122. package/dist/metric.js +1 -0
  123. package/dist/motion-core.js +138 -44
  124. package/dist/motion-lHDAQHEE.js +91 -0
  125. package/dist/motion.js +5 -5
  126. package/dist/motionTempo-DXdVbCWr.js +13 -0
  127. package/dist/music-staff.js +1 -0
  128. package/dist/{number-field-RP89046a.js → number-field-BXFUP49Z.js} +3 -2
  129. package/dist/number-field.css +1 -0
  130. package/dist/number-field.js +1 -1
  131. package/dist/pager-dots.css +1 -0
  132. package/dist/pager-dots.js +3 -2
  133. package/dist/participation-C5y5VZTN.js +52 -0
  134. package/dist/{popover-BdpoE4Ar.js → popover-DQUmwuAa.js} +3 -2
  135. package/dist/popover.js +1 -1
  136. package/dist/{progress-eVa-mc7J.js → progress-BUn0Bw7Z.js} +1 -0
  137. package/dist/progress.css +1 -0
  138. package/dist/progress.js +1 -1
  139. package/dist/{radio-group-B58Bz16F.js → radio-group-xdEy2tdi.js} +1 -0
  140. package/dist/radio-group.css +1 -0
  141. package/dist/radio-group.js +1 -1
  142. package/dist/root-scroll-lock-DJFrQhMa.js +22 -0
  143. package/dist/select-Dt5dXm87.js +309 -0
  144. package/dist/select.js +1 -1
  145. package/dist/{separator-D4EZM10u.js → separator-C4y9p_ky.js} +1 -0
  146. package/dist/separator.css +1 -0
  147. package/dist/separator.js +1 -1
  148. package/dist/sheet-DLqNUIZl.js +347 -0
  149. package/dist/sheet-width-DgXgJNa5.js +18 -0
  150. package/dist/sheet.js +2 -2
  151. package/dist/{slider-Dg3Qqdyo.js → slider-B4w12E_u.js} +8 -8
  152. package/dist/slider.js +1 -1
  153. package/dist/sortable-list.js +2 -1
  154. package/dist/{status-dot-W4LFiJps.js → status-dot-BDZKcRxy.js} +2 -1
  155. package/dist/status-dot.css +1 -0
  156. package/dist/status-dot.js +1 -1
  157. package/dist/styles/components.css +1 -1
  158. package/dist/styles/glass/glass-capsule.css +1 -1
  159. package/dist/styles/glass/glass-chip.css +1 -1
  160. package/dist/styles/glass/mark.css +1 -1
  161. package/dist/styles/glass/overlay-plate.css +1 -1
  162. package/dist/styles/glass/surface-axis.css +1 -1
  163. package/dist/styles/index.css +1 -1
  164. package/dist/styles/theme/radius.css +1 -1
  165. package/dist/styles/tokens/color-radius.css +1 -1
  166. package/dist/styles/tokens/manifest.d.ts +1 -1
  167. package/dist/styles/tokens/scale-paper.css +1 -1
  168. package/dist/styles/utilities/base-misc.css +1 -1
  169. package/dist/surface.js +1 -1
  170. package/dist/{switch-BYUZ6g9G.js → switch-DLfGYU35.js} +1 -0
  171. package/dist/switch.css +1 -0
  172. package/dist/switch.js +1 -1
  173. package/dist/tabs-NgTRPGZx.js +229 -0
  174. package/dist/tabs.js +1 -1
  175. package/dist/textarea.js +1 -1
  176. package/dist/timeline.css +1 -0
  177. package/dist/timeline.js +4 -3
  178. package/dist/toggle-group-DgXcJGD6.js +129 -0
  179. package/dist/toggle-group.css +1 -0
  180. package/dist/toggle-group.js +1 -1
  181. package/dist/tokens.js +2 -0
  182. package/dist/{tooltip-CZVubnJf.js → tooltip-Do3qCw0r.js} +1 -1
  183. package/dist/tooltip.js +1 -1
  184. package/dist/typewriter.css +1 -0
  185. package/dist/typewriter.js +1 -0
  186. package/dist/uniformBridge-CJyy7NOn.js +150 -0
  187. package/dist/useBarShape-CmP35Z8o.js +24 -0
  188. package/dist/{useCanvas2D-CQRElMyE.js → useCanvas2D-Bhpwua98.js} +1 -1
  189. package/dist/{useDockCtaReceive-BSSgD6mu.js → useDockCtaReceive-Dn_-paqP.js} +1 -1
  190. package/dist/{useDragMorph-B363RUbF.js → useDragMorph-BEI74U0t.js} +51 -40
  191. package/dist/{color.wgsl-BTszLY39.js → useGpuSubstrate-Y5XAdU8d.js} +7 -7
  192. package/dist/{useLiquidPress-h1scrPtP.js → useLiquidPress-D5mjZC6U.js} +2 -2
  193. package/dist/useScrollChrome-DMP6kDI9.js +67 -0
  194. package/dist/useSelectionGroup-DAQv5Lb5.js +186 -0
  195. package/dist/{useSpring-9u2_shxV.js → useSpring-Aof0nTRt.js} +1 -1
  196. package/dist/useSpringMount-jgNkymRl.js +73 -0
  197. package/dist/wgpuSetup-CFuqd_RP.js +1278 -0
  198. package/package.json +8 -1
  199. package/dist/DialogContent-CwIBvou_.js +0 -157
  200. package/dist/DropdownMenuTrigger-CKRnhDSQ.js +0 -93
  201. package/dist/button-BOFTUPyU.js +0 -110
  202. package/dist/composables/motion/morph/eyeglass.d.ts +0 -141
  203. package/dist/expandable-container-CZUj9BzY.js +0 -142
  204. package/dist/glass-ui.css +0 -2
  205. package/dist/motion-BvV1_24p.js +0 -61
  206. package/dist/motionTempo-tscp92Nm.js +0 -7
  207. package/dist/participation-B7UFdgXB.js +0 -55
  208. package/dist/select-BiF0FCZf.js +0 -292
  209. package/dist/sheet-DmJxgAHc.js +0 -345
  210. package/dist/tabs-C5sC0fBE.js +0 -269
  211. package/dist/toggle-group-CC5b3o1R.js +0 -125
  212. package/dist/useScrollChrome-BJbWV32F.js +0 -162
  213. package/dist/useSelectionGroup-zsEwitF6.js +0 -291
  214. package/dist/useSpringMount-OA-0mTNv.js +0 -73
package/dist/dock.js CHANGED
@@ -1,49 +1,50 @@
1
1
  import { t as e } from "./class-names-FlXcvRRT.js";
2
2
  import { n as t } from "./useReducedMotion-vCXA_vyM.js";
3
3
  import { t as n } from "./vSpecular-DMJo8pfD.js";
4
- import { t as r } from "./motionTempo-tscp92Nm.js";
5
- import { n as i } from "./springPresets-Cbe0Voqg.js";
6
- import { t as a } from "./useLiquidPress-h1scrPtP.js";
7
- import { t as o } from "./useMotionAxis-D-rtIhca.js";
4
+ import { t as r } from "./fieldPaint-Ci77oajZ.js";
5
+ import { t as i } from "./motionTempo-DXdVbCWr.js";
6
+ import { n as a } from "./springPresets-Cbe0Voqg.js";
7
+ import { t as o } from "./useLiquidPress-D5mjZC6U.js";
8
8
  import { n as s, t as c } from "./createContext-BhkE9mLH.js";
9
- import { a as l, c as u, d, f, i as p, l as m, n as h, o as g, r as _, s as v, u as y } from "./participation-B7UFdgXB.js";
10
- import { t as b } from "./useResizeObserver-Bv3nN46q.js";
11
- import { n as x } from "./useResolveTokenColor-B2FfJnd9.js";
12
- import { t as S } from "./useIntersectionPause-CzKR3EyP.js";
13
- import { t as C } from "./focus-Duf7EpUu.js";
14
- import { t as w } from "./DropdownMenuTrigger-CKRnhDSQ.js";
15
- import { t as T } from "./useSelectionGroup-zsEwitF6.js";
16
- import { t as E } from "./useDragMorph-B363RUbF.js";
17
- import { n as D } from "./useDockCtaReceive-BSSgD6mu.js";
18
- import { n as O, t as k } from "./useScrollChrome-BJbWV32F.js";
19
- import { Fragment as A, computed as j, createBlock as M, createCommentVNode as N, createElementBlock as P, createElementVNode as F, createVNode as I, defineComponent as L, h as R, mergeModels as z, mergeProps as B, nextTick as V, normalizeClass as H, normalizeStyle as ee, onBeforeUnmount as U, onMounted as te, onScopeDispose as W, onUnmounted as ne, openBlock as G, readonly as K, ref as q, renderList as re, renderSlot as J, resolveDynamicComponent as ie, toDisplayString as ae, unref as Y, useId as oe, useModel as se, useTemplateRef as X, watch as Z, withCtx as Q, withDirectives as ce } from "vue";
20
- import { PopoverTrigger as le, Primitive as ue, SelectIcon as de, SelectTrigger as fe } from "reka-ui";
21
- import { ChevronDown as pe, Pause as me, Play as he } from "@lucide/vue";
22
- import { SpringProgress as ge } from "@mkbabb/keyframes.js";
23
- import { useMediaQuery as _e } from "@vueuse/core";
9
+ import { a as l, i as u, o as d, r as f, t as p } from "./constants-DfrO-IaH.js";
10
+ import { a as m, i as h, n as g, o as _, r as v, s as y } from "./participation-C5y5VZTN.js";
11
+ import { t as b } from "./useMotionAxis-D-rtIhca.js";
12
+ import { t as x } from "./useResizeObserver-Bv3nN46q.js";
13
+ import { n as S } from "./useResolveTokenColor-B2FfJnd9.js";
14
+ import { t as C } from "./useIntersectionPause-CzKR3EyP.js";
15
+ import { t as w } from "./focus-Duf7EpUu.js";
16
+ import { t as T } from "./useSelectionGroup-DAQv5Lb5.js";
17
+ import { t as E } from "./useDragMorph-BEI74U0t.js";
18
+ import { n as D } from "./useDockCtaReceive-Dn_-paqP.js";
19
+ import { t as O } from "./useScrollChrome-DMP6kDI9.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 L, mergeProps as R, nextTick as z, normalizeClass as B, normalizeStyle as V, onBeforeUnmount as H, onMounted as ee, onScopeDispose as U, onUnmounted as te, openBlock as W, readonly as G, ref as K, renderList as ne, renderSlot as q, resolveDynamicComponent as re, toDisplayString as J, unref as Y, useId as ie, useModel as ae, useTemplateRef as X, watch as Z, withCtx as oe, withDirectives as se } from "vue";
21
+ import { Primitive as ce } from "reka-ui";
22
+ import { Pause as le, Play as ue } from "@lucide/vue";
23
+ import { SpringProgress as de } from "@mkbabb/keyframes.js";
24
+ import { useMediaQuery as fe } from "@vueuse/core";
24
25
  //#region src/components/_shared/overlay/isTeleportedTarget.ts
25
- function ve(e, t) {
26
+ function Q(e, t) {
26
27
  if (!(e instanceof Element)) return !1;
27
28
  let n = e.closest("[data-glass-dock-portal]");
28
29
  return n ? !t || n.getAttribute("data-glass-dock-owner") === t : !1;
29
30
  }
30
31
  //#endregion
31
32
  //#region src/composables/glass/backdropSampleMath.ts
32
- function ye(e) {
33
+ function pe(e) {
33
34
  let t = e / 255;
34
35
  return t <= .03928 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
35
36
  }
36
- function be(e, t, n) {
37
- return .2126 * ye(e) + .7152 * ye(t) + .0722 * ye(n);
37
+ function me(e, t, n) {
38
+ return .2126 * pe(e) + .7152 * pe(t) + .0722 * pe(n);
38
39
  }
39
- function xe(e, t, n, r, i) {
40
+ function he(e, t, n, r, i) {
40
41
  return [
41
42
  e * r + i[0] * (1 - r),
42
43
  t * r + i[1] * (1 - r),
43
44
  n * r + i[2] * (1 - r)
44
45
  ];
45
46
  }
46
- function Se(e) {
47
+ function ge(e) {
47
48
  let t = e.match(/rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:[,\s/]+([\d.]+))?/i);
48
49
  return t ? [
49
50
  Number(t[1]),
@@ -52,31 +53,31 @@ function Se(e) {
52
53
  t[4] === void 0 ? 1 : Number(t[4])
53
54
  ] : null;
54
55
  }
55
- function Ce(e) {
56
+ function _e(e) {
56
57
  return typeof HTMLCanvasElement < "u" && e instanceof HTMLCanvasElement;
57
58
  }
58
- var we = "[data-glass-field-canvas] canvas, canvas[data-glass-field-canvas]";
59
- function Te(e) {
59
+ var ve = "[data-glass-field-canvas] canvas, canvas[data-glass-field-canvas]";
60
+ function ye(e) {
60
61
  if (!e) {
61
62
  if (typeof document < "u") {
62
- let e = document.querySelector(we);
63
- if (Ce(e)) return e;
63
+ let e = document.querySelector(ve);
64
+ if (_e(e)) return e;
64
65
  }
65
66
  return null;
66
67
  }
67
- if (Ce(e)) return e;
68
+ if (_e(e)) return e;
68
69
  if (typeof e == "function") {
69
70
  let t = e();
70
- return Ce(t) ? t : null;
71
+ return _e(t) ? t : null;
71
72
  }
72
73
  if (typeof e == "string" && typeof document < "u") {
73
74
  let t = document.querySelector(e);
74
- return Ce(t) ? t : null;
75
+ return _e(t) ? t : null;
75
76
  }
76
77
  return null;
77
78
  }
78
- function Ee(e, t) {
79
- let n = Se(e);
79
+ function be(e, t) {
80
+ let n = ge(e);
80
81
  if (n) return n;
81
82
  if (!t) return null;
82
83
  try {
@@ -92,7 +93,7 @@ function Ee(e, t) {
92
93
  return null;
93
94
  }
94
95
  }
95
- function De(e, t, n, r) {
96
+ function xe(e, t, n, r) {
96
97
  if (!t || t.width === 0 || t.height === 0 || !n) return null;
97
98
  let i = e.getBoundingClientRect(), a = t.getBoundingClientRect();
98
99
  if (a.width === 0 || a.height === 0) return null;
@@ -102,71 +103,71 @@ function De(e, t, n, r) {
102
103
  n.clearRect(0, 0, 32, 32), n.drawImage(t, c, l, u, d, 0, 0, 32, 32);
103
104
  let e = n.getImageData(0, 0, 32, 32).data, i = 0, a = 0, o = 0;
104
105
  for (let t = 0; t < e.length; t += 4) {
105
- let n = e[t + 3] / 255, [s, c, l] = xe(e[t], e[t + 1], e[t + 2], n, r);
106
- i += be(s, c, l), a += n, o++;
106
+ let n = e[t + 3] / 255, [s, c, l] = he(e[t], e[t + 1], e[t + 2], n, r);
107
+ i += me(s, c, l), a += n, o++;
107
108
  }
108
109
  return o === 0 || a / o < .02 ? null : { luma: i / o };
109
110
  } catch {
110
111
  return null;
111
112
  }
112
113
  }
113
- function Oe(e, t) {
114
+ function Se(e, t) {
114
115
  let n = e.getBoundingClientRect(), r = n.left + n.width / 2, i = n.top + n.height / 2, a = document.elementsFromPoint(r, i);
115
116
  for (let n of a) {
116
117
  if (!(n instanceof HTMLElement) || n === e || e.contains(n)) continue;
117
- let r = getComputedStyle(n).backgroundColor, i = Ee(x(r, e), t);
118
+ let r = getComputedStyle(n).backgroundColor, i = be(S(r, e), t);
118
119
  if (i && !(i[3] < .5)) return i;
119
120
  }
120
- return Ee(x(getComputedStyle(document.body).backgroundColor, e), t);
121
+ return be(S(getComputedStyle(document.body).backgroundColor, e), t);
121
122
  }
122
- var ke = [
123
+ var Ce = [
123
124
  255,
124
125
  255,
125
126
  255
126
127
  ];
127
- function Ae(e, t) {
128
- let n = Oe(e, t);
128
+ function we(e, t) {
129
+ let n = Se(e, t);
129
130
  return n && n[3] >= .5 ? [
130
131
  n[0],
131
132
  n[1],
132
133
  n[2]
133
- ] : [...ke];
134
+ ] : [...Ce];
134
135
  }
135
- function je(e, t) {
136
- let n = Oe(e, t);
137
- return n ? Me(n) : null;
136
+ function Te(e, t) {
137
+ let n = Se(e, t);
138
+ return n ? Ee(n) : null;
138
139
  }
139
- function Me(e) {
140
- return { luma: be(e[0], e[1], e[2]) };
140
+ function Ee(e) {
141
+ return { luma: me(e[0], e[1], e[2]) };
141
142
  }
142
143
  //#endregion
143
144
  //#region src/composables/glass/useGlassBackdropLuminance.ts
144
- var Ne = "data-glass-backdrop-shared";
145
- function Pe(e, n = {}) {
146
- let { lightThreshold: r = .6, minSampleIntervalMs: i = 250, writeBucket: a = !0 } = n, o = Math.max(250, i), s = n.shared === !0;
147
- function c(e) {
148
- return !s && e.closest(`[${Ne}]`) !== null;
145
+ var De = "data-glass-backdrop-shared";
146
+ function Oe(e, n = {}) {
147
+ let { lightThreshold: i = .6, minSampleIntervalMs: a = 250, writeBucket: o = !0 } = n, s = Math.max(250, a), c = n.shared === !0;
148
+ function l(e) {
149
+ return !c && e.closest(`[${De}]`) !== null;
149
150
  }
150
- let l = q(null), u = q(null), d = q({
151
+ let u = K(null), d = K(null), f = K({
151
152
  state: "pending",
152
153
  mode: n.live === !0 ? "live" : "static",
153
154
  source: n.live === !0 ? "canvas" : "elements"
154
155
  });
155
156
  if (typeof window > "u") return {
156
- luma: K(l),
157
- bucket: K(u),
158
- sample: K(d),
157
+ luma: G(u),
158
+ bucket: G(d),
159
+ sample: G(f),
159
160
  sampleNow: () => {},
160
161
  dispose: () => {}
161
162
  };
162
- let f = t(), p = null, m = null;
163
- function h() {
164
- return p || (p = document.createElement("canvas"), p.width = 32, p.height = 32), m ||= p.getContext("2d", { willReadFrequently: !0 }), m;
165
- }
163
+ let p = t(), m = null, h = null;
166
164
  function g() {
167
- return n.live === void 0 ? e.value?.dataset.glassSample === "live" || n.backgroundCanvas != null || Te(void 0) !== null : n.live;
165
+ return m || (m = document.createElement("canvas"), m.width = 32, m.height = 32), h ||= m.getContext("2d", { willReadFrequently: !0 }), h;
168
166
  }
169
- function _(e) {
167
+ function _() {
168
+ return n.live === void 0 ? e.value?.dataset.glassSample === "live" || n.backgroundCanvas != null || ye(void 0) !== null : n.live;
169
+ }
170
+ function v(e) {
170
171
  let t = e.getBoundingClientRect();
171
172
  return {
172
173
  x: t.x,
@@ -175,262 +176,298 @@ function Pe(e, n = {}) {
175
176
  height: t.height
176
177
  };
177
178
  }
178
- function v(e, t, n, i) {
179
- let o = e.luma;
180
- l.value = o;
181
- let s = o >= r ? "light" : "dark";
182
- u.value = s, d.value = {
179
+ function y(e, t, n, r) {
180
+ let a = e.luma;
181
+ u.value = a;
182
+ let s = a >= i ? "light" : "dark";
183
+ d.value = s, f.value = {
183
184
  state: "sampled",
184
185
  mode: n,
185
186
  source: n === "live" ? "canvas" : "elements",
186
- luma: o,
187
- sampledAt: i,
188
- targetRect: _(t)
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);
187
+ luma: a,
188
+ sampledAt: r,
189
+ targetRect: v(t)
190
+ }, t.style.setProperty("--glass-backdrop-luma", a.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"), o && t.style.setProperty("--glass-backdrop", s);
190
191
  }
191
- function y(e, t, n, r) {
192
- l.value = null, u.value = null, d.value = {
192
+ function b(e, t, n, r) {
193
+ u.value = null, d.value = null, f.value = {
193
194
  state: "unavailable",
194
195
  mode: t,
195
196
  source: t === "live" ? "canvas" : "elements",
196
197
  reason: n,
197
198
  sampledAt: r,
198
- targetRect: _(e)
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);
199
+ targetRect: v(e)
200
+ }, e.style.removeProperty("--glass-backdrop-luma"), e.style.removeProperty("--glass-backdrop-sampled"), o && e.style.removeProperty("--glass-backdrop"), e.removeAttribute("data-backdrop-sampled"), e.setAttribute("data-backdrop-sample-state", "unavailable"), e.setAttribute("data-backdrop-sample-source", t === "live" ? "canvas" : "elements"), e.setAttribute("data-backdrop-sample-reason", n);
200
201
  }
201
- let x = 0;
202
- function C() {
202
+ let S = 0;
203
+ function w() {
203
204
  let t = e.value;
204
- if (!t || c(t)) return;
205
- let r = h(), i = g() ? "live" : "static", a = i === "live" ? Te(n.backgroundCanvas) : null, o = i === "live" ? De(t, a, r, Ae(t, r)) : je(t, r), s = Date.now();
206
- o ? v(o, t, i, s) : y(t, i, i === "live" && !a ? "source-unavailable" : "sample-unavailable", s), x = typeof performance < "u" ? performance.now() : s;
205
+ if (!t || l(t)) return;
206
+ let r = g(), i = _() ? "live" : "static", a = i === "live" ? ye(n.backgroundCanvas) : null, o = i === "live" ? xe(t, a, r, we(t, r)) : Te(t, r), s = Date.now();
207
+ o ? y(o, t, i, s) : b(t, i, i === "live" && !a ? "source-unavailable" : "sample-unavailable", s), S = typeof performance < "u" ? performance.now() : s;
207
208
  }
208
- let w = O(({ now: e }) => {
209
- f.value || e - x < o || C();
210
- }, {
211
- immediate: !1,
212
- pauseWhenHidden: !0,
213
- respectReducedMotion: !0
214
- }), T = S(() => e.value, {
215
- pause: () => w.pause(),
209
+ let T = !1, E = !1, D = null;
210
+ function O() {
211
+ D !== null && clearTimeout(D), D = null;
212
+ }
213
+ function k() {
214
+ if (!T || E || D !== null) return;
215
+ let e = performance.now(), t = Math.max(0, S + s - e);
216
+ D = setTimeout(() => {
217
+ D = null, T && !E && w();
218
+ }, t);
219
+ }
220
+ function A(e) {
221
+ !T || D !== null || e.target === ye(n.backgroundCanvas) && k();
222
+ }
223
+ function j(e) {
224
+ if (!T || D !== null) return;
225
+ let t = ye(n.backgroundCanvas), r = e.target;
226
+ t && r instanceof Node && r.contains(t) && k();
227
+ }
228
+ let M = null, N = null;
229
+ function P() {
230
+ T || (T = !0, document.addEventListener(r, A, !0), document.addEventListener("scroll", k, {
231
+ capture: !0,
232
+ passive: !0
233
+ }), document.addEventListener("transitionend", j, !0), document.addEventListener("animationend", j, !0), typeof MutationObserver < "u" && (M = new MutationObserver(k), M.observe(document.documentElement, {
234
+ attributes: !0,
235
+ attributeFilter: [
236
+ "class",
237
+ "data-theme",
238
+ "data-color-scheme"
239
+ ]
240
+ })), typeof matchMedia == "function" && (N = matchMedia("(prefers-color-scheme: dark)"), N.addEventListener("change", k)));
241
+ }
242
+ function F() {
243
+ T && (T = !1, O(), document.removeEventListener(r, A, !0), document.removeEventListener("scroll", k, !0), document.removeEventListener("transitionend", j, !0), document.removeEventListener("animationend", j, !0), M?.disconnect(), M = null, N?.removeEventListener("change", k), N = null);
244
+ }
245
+ let I = C(() => e.value, {
246
+ pause: () => {
247
+ E = !0, O();
248
+ },
216
249
  resume: () => {
217
- let t = e.value;
218
- t && c(t) || g() && !f.value && w.resume();
250
+ E = !1, k();
219
251
  }
220
- }, { rootMargin: "200px" }), E = b(e, () => C());
221
- function D() {
252
+ }, { rootMargin: "200px" }), L = x(e, () => w());
253
+ function R() {
222
254
  let t = e.value;
223
- if (t && c(t)) {
224
- w.stop();
255
+ if (t && l(t)) {
256
+ F();
225
257
  return;
226
258
  }
227
- f.value ? (w.stop(), C()) : g() && w.start();
259
+ p.value ? (F(), w()) : _() && P();
228
260
  }
229
- let k = Z(f, D, { flush: "sync" }), A = Z(() => e.value, (e) => {
261
+ let z = Z(p, R, { flush: "sync" }), B = Z(() => e.value, (e) => {
230
262
  if (e) {
231
- if (s) e.setAttribute(Ne, "");
232
- else if (c(e)) return;
233
- C(), D();
263
+ if (c) e.setAttribute(De, "");
264
+ else if (l(e)) return;
265
+ w(), R();
234
266
  }
235
267
  }, {
236
268
  immediate: !0,
237
269
  flush: "post"
238
270
  });
239
- function j() {
240
- A(), k(), w.dispose(), T.dispose(), E.stop(), p = null, m = null;
241
- }
242
- return W(j), {
243
- luma: K(l),
244
- bucket: K(u),
245
- sample: K(d),
246
- sampleNow: C,
247
- dispose: j
271
+ function V() {
272
+ B(), z(), F(), I.dispose(), L.stop(), m = null, h = null;
273
+ }
274
+ return U(V), {
275
+ luma: G(u),
276
+ bucket: G(d),
277
+ sample: G(f),
278
+ sampleNow: w,
279
+ dispose: V
248
280
  };
249
281
  }
250
282
  //#endregion
251
283
  //#region src/components/dock/composables/useDockState.ts
252
- function Fe(e) {
253
- let { collapseDelay: t = u, rootEl: n, alwaysExpanded: r = !1, initialExpanded: i = !1, isTransitioning: a, dockId: o, onStateChange: s } = e, c = () => typeof r == "boolean" ? r : r.value, l = () => c(), d = q(c() ? "pinned" : i ? "hover" : "collapsed"), f = j(() => d.value !== "collapsed"), p = j(() => d.value === "pinned"), m = null, h = q(0), g = q(0), _ = j(() => h.value > 0), v = j(() => g.value > 0), y = null, b = null, x = !1, S = null;
254
- function C() {
255
- S &&= (clearTimeout(S), null);
284
+ function ke(e) {
285
+ let { collapseDelay: t = p, rootEl: n, alwaysExpanded: r = !1, expandOn: i = "hover", initialExpanded: a = !1, isTransitioning: o, dockId: s, onStateChange: c } = e, l = () => typeof r == "boolean" ? r : r.value, u = () => l(), d = () => (typeof i == "string" ? i : i.value) === "press", f = K(l() ? "pinned" : a ? "hover" : "collapsed"), m = A(() => f.value !== "collapsed"), h = A(() => f.value === "pinned"), g = null, _ = K(0), v = K(0), y = A(() => _.value > 0), b = A(() => v.value > 0), x = null, S = null, C = !1, w = null;
286
+ function T() {
287
+ w &&= (clearTimeout(w), null);
256
288
  }
257
- let w = null, T = null, E = null, D = () => w === "down" || w === "compat";
258
- function O() {
259
- if (!w) return;
260
- w = null, E &&= (clearTimeout(E), null);
261
- for (let [e, t] of M) window.removeEventListener(e, t, !0);
262
- let e = T;
263
- T = null, e && !l() && d.value === "collapsed" && (I(), d.value = "hover", F());
289
+ let E = null, D = null, O = null, k = () => E === "down" || E === "compat";
290
+ function j() {
291
+ if (!E) return;
292
+ E = null, O &&= (clearTimeout(O), null);
293
+ for (let [e, t] of P) window.removeEventListener(e, t, !0);
294
+ let e = D;
295
+ D = null, e && !u() && f.value === "collapsed" && (R(), f.value = "hover", L());
264
296
  }
265
- function k() {
266
- E ??= setTimeout(O, 0);
297
+ function M() {
298
+ O ??= setTimeout(j, 0);
267
299
  }
268
- function A() {
269
- T = null, O();
300
+ function N() {
301
+ D = null, j();
270
302
  }
271
- let M = [
272
- ["click", () => O()],
273
- ["pointercancel", () => O()],
274
- ["dragstart", () => O()],
275
- ["contextmenu", () => O()],
303
+ let P = [
304
+ ["click", () => j()],
305
+ ["pointercancel", () => j()],
306
+ ["dragstart", () => j()],
307
+ ["contextmenu", () => j()],
276
308
  ["pointerup", (e) => {
277
- w === "down" && (e.pointerType === "touch" ? w = "tap" : k());
309
+ E === "down" && (e.pointerType === "touch" ? E = "tap" : M());
278
310
  }],
279
311
  ["mousedown", () => {
280
- w === "tap" && (w = "compat");
312
+ E === "tap" && (E = "compat");
281
313
  }],
282
314
  ["mouseup", () => {
283
- w === "compat" && k();
315
+ E === "compat" && M();
284
316
  }],
285
317
  ["pointerdown", (e) => {
286
- (w === "tap" || e.isPrimary) && A();
318
+ (E === "tap" || e.isPrimary) && N();
287
319
  }]
288
320
  ];
289
- function N() {
290
- w && A(), w = "down";
291
- for (let [e, t] of M) window.addEventListener(e, t, !0);
321
+ function F() {
322
+ E && N(), E = "down", g && V();
323
+ for (let [e, t] of P) window.addEventListener(e, t, !0);
292
324
  }
293
325
  Z(n, (e, t, n) => {
294
- e && (e.addEventListener("pointerdown", N, !0), n(() => e.removeEventListener("pointerdown", N, !0)));
326
+ e && (e.addEventListener("pointerdown", F, !0), n(() => e.removeEventListener("pointerdown", F, !0)));
295
327
  }, {
296
328
  immediate: !0,
297
329
  flush: "sync"
298
330
  });
299
- let P = d.value;
300
- function F() {
301
- c() && (d.value = "pinned"), s && P !== d.value && s(d.value, P), P = d.value;
302
- }
303
- function I() {
304
- m &&= (clearTimeout(m), null);
305
- }
331
+ let I = f.value;
306
332
  function L() {
307
- b !== null && (cancelAnimationFrame(b), b = null);
333
+ l() && (f.value = "pinned"), c && I !== f.value && c(f.value, I), I = f.value;
308
334
  }
309
335
  function R() {
310
- L(), y?.();
336
+ g &&= (clearTimeout(g), null);
311
337
  }
312
338
  function z() {
313
- l() || h.value > 0 || (I(), m = setTimeout(() => {
314
- d.value = "collapsed", F();
315
- }, t));
339
+ S !== null && (cancelAnimationFrame(S), S = null);
316
340
  }
317
341
  function B() {
318
- if (c()) {
319
- d.value = "pinned", F();
342
+ z(), x?.();
343
+ }
344
+ function V() {
345
+ u() || _.value > 0 || (R(), g = setTimeout(() => {
346
+ f.value = "collapsed", L();
347
+ }, t));
348
+ }
349
+ function H() {
350
+ if (l()) {
351
+ f.value = "pinned", L();
320
352
  return;
321
353
  }
322
- x ||= (x = !0, I(), C(), d.value = "collapsed", F(), !1);
354
+ C ||= (C = !0, R(), T(), f.value = "collapsed", L(), !1);
323
355
  }
324
- function V() {
325
- if (c()) {
326
- d.value = "pinned", F();
356
+ function ee() {
357
+ if (l()) {
358
+ f.value = "pinned", L();
327
359
  return;
328
360
  }
329
- I(), C(), d.value = "hover", F();
361
+ R(), T(), f.value = "hover", L();
330
362
  }
331
- function H() {
332
- l() || (I(), d.value === "collapsed" && (C(), S = setTimeout(() => {
333
- if (S = null, !l() && d.value === "collapsed") {
334
- if (D()) {
335
- T ??= "hover";
363
+ function U() {
364
+ u() || d() || (R(), f.value === "collapsed" && (T(), w = setTimeout(() => {
365
+ if (w = null, !u() && f.value === "collapsed") {
366
+ if (k()) {
367
+ D ??= "hover";
336
368
  return;
337
369
  }
338
- d.value = "hover", F();
370
+ f.value = "hover", L();
339
371
  }
340
372
  }, 60)));
341
373
  }
342
- function ee(e) {
343
- if (!l() && (C(), T === "hover" && (T = null), d.value === "hover")) {
344
- if (h.value > 0) return;
374
+ function W(e) {
375
+ if (!(u() || d()) && (T(), D === "hover" && (D = null), f.value === "hover")) {
376
+ if (_.value > 0) return;
345
377
  if (e) {
346
378
  let t = n.value;
347
- if (t && e.relatedTarget instanceof Node && t.contains(e.relatedTarget) || ve(e.relatedTarget, o)) return;
379
+ if (t && e.relatedTarget instanceof Node && t.contains(e.relatedTarget) || Q(e.relatedTarget, s)) return;
348
380
  }
349
- z();
381
+ V();
350
382
  }
351
383
  }
352
- function U() {
353
- if (!l() && (I(), d.value === "collapsed")) {
354
- if (D()) {
355
- T = "focus";
384
+ function G() {
385
+ if (!(u() || d()) && (R(), f.value === "collapsed")) {
386
+ if (k()) {
387
+ D = "focus";
356
388
  return;
357
389
  }
358
- d.value = "hover", F();
390
+ f.value = "hover", L();
359
391
  }
360
392
  }
361
- function te(e) {
362
- if (l()) return;
363
- let t = e.currentTarget, n = !!e.relatedTarget && t.contains(e.relatedTarget) || ve(e.relatedTarget, o);
364
- !n && T === "focus" && (T = null), d.value === "hover" && (h.value > 0 || n || z());
393
+ function ne(e) {
394
+ if (u()) return;
395
+ let t = e.currentTarget, n = !!e.relatedTarget && t.contains(e.relatedTarget) || Q(e.relatedTarget, s);
396
+ if (!n && D === "focus" && (D = null), d()) {
397
+ if (!m.value || _.value > 0 || n || !e.relatedTarget) return;
398
+ H();
399
+ return;
400
+ }
401
+ f.value === "hover" && (_.value > 0 || n || V());
365
402
  }
366
- function W() {
367
- l() || (I(), C(), d.value = "pinned", F());
403
+ function q() {
404
+ u() || (R(), T(), f.value = "pinned", L());
368
405
  }
369
- function G(e = "morph") {
370
- h.value++, e === "grasp" && g.value++, I();
406
+ function re(e = "morph") {
407
+ _.value++, e === "grasp" && v.value++, R();
371
408
  }
372
- function K(e = "morph") {
373
- e === "grasp" && (g.value = Math.max(0, g.value - 1)), h.value = Math.max(0, h.value - 1), h.value === 0 && d.value === "hover" && (I(), m = setTimeout(() => {
374
- h.value === 0 && d.value === "hover" && z();
409
+ function J(e = "morph") {
410
+ e === "grasp" && (v.value = Math.max(0, v.value - 1)), _.value = Math.max(0, _.value - 1), _.value === 0 && f.value === "hover" && (R(), g = setTimeout(() => {
411
+ _.value === 0 && f.value === "hover" && V();
375
412
  }, Math.min(t, 800)));
376
413
  }
377
- function re(e) {
378
- if (l() || h.value > 0 || a?.value) return;
414
+ function Y(e) {
415
+ if (u() || _.value > 0 || o?.value) return;
379
416
  let t = n.value;
380
- !t || t.contains(e.target) || ve(e.target, o) || B();
417
+ !t || t.contains(e.target) || Q(e.target, s) || H();
381
418
  }
382
- return Z(f, (e) => {
419
+ return Z(m, (e) => {
383
420
  if (e) {
384
421
  if (typeof document > "u") return;
385
- R(), b = requestAnimationFrame(() => {
386
- b = null, f.value && (document.addEventListener("pointerdown", re, !0), y = () => {
387
- document.removeEventListener("pointerdown", re, !0), y = null;
422
+ B(), S = requestAnimationFrame(() => {
423
+ S = null, m.value && (document.addEventListener("pointerdown", Y, !0), x = () => {
424
+ document.removeEventListener("pointerdown", Y, !0), x = null;
388
425
  });
389
426
  });
390
- } else R();
391
- }, { immediate: !0 }), typeof r == "boolean" ? r && (d.value = "pinned", F()) : Z(r, (e) => {
427
+ } else B();
428
+ }, { immediate: !0 }), typeof r == "boolean" ? r && (f.value = "pinned", L()) : Z(r, (e) => {
392
429
  if (e) {
393
- I(), d.value = "pinned", F();
430
+ R(), f.value = "pinned", L();
394
431
  return;
395
432
  }
396
- d.value = "collapsed", F();
397
- }), d.value === "hover" && z(), ne(() => {
398
- I(), C(), R(), A();
433
+ f.value = "collapsed", L();
434
+ }), f.value === "hover" && V(), te(() => {
435
+ R(), T(), B(), N();
399
436
  }), {
400
- state: d,
401
- expanded: f,
402
- isPinned: p,
403
- isHeld: _,
404
- graspHeld: v,
405
- onMouseEnter: H,
406
- onMouseLeave: ee,
407
- onFocusIn: U,
408
- onFocusOut: te,
409
- onClickCollapsed: W,
410
- keepOpen: G,
411
- release: K,
412
- expand: V,
413
- collapse: B
437
+ state: f,
438
+ expanded: m,
439
+ isPinned: h,
440
+ isHeld: y,
441
+ graspHeld: b,
442
+ onMouseEnter: U,
443
+ onMouseLeave: W,
444
+ onFocusIn: G,
445
+ onFocusOut: ne,
446
+ onClickCollapsed: q,
447
+ keepOpen: re,
448
+ release: J,
449
+ expand: ee,
450
+ collapse: H
414
451
  };
415
452
  }
416
453
  //#endregion
417
454
  //#region src/components/dock/composables/useDockSpring.ts
418
- function Ie(e) {
455
+ function Ae(e) {
419
456
  let t = null, n = () => t !== null && !t.settled;
420
- function i() {
457
+ function r() {
421
458
  t &&= (t.dispose(), null);
422
459
  }
423
460
  function a(a, o, s) {
424
461
  let c = n() ? t.velocity * (s.inheritVelocityScale ?? 1) : 0;
425
- i();
426
- let l = new ge({
427
- response: e.response * r(),
462
+ r();
463
+ let l = new de({
464
+ response: e.response * i(),
428
465
  dampingFraction: e.dampingFraction,
429
466
  initial: a,
430
467
  respectReducedMotion: !0
431
468
  });
432
469
  t = l, l.reset(a, c), l.target = o, l.play((e, n) => {
433
- s.onFrame(e, n), l.settled && (s.onSettle?.(), t === l && i());
470
+ s.onFrame(e, n), l.settled && (s.onSettle?.(), t === l && r());
434
471
  });
435
472
  }
436
473
  function o(e) {
@@ -445,28 +482,28 @@ function Ie(e) {
445
482
  get velocity() {
446
483
  return n() ? t.velocity : 0;
447
484
  },
448
- dispose: i
485
+ dispose: r
449
486
  };
450
487
  }
451
488
  //#endregion
452
489
  //#region src/components/dock/composables/useDockMorph.ts
453
- function Le(e) {
454
- let { rootEl: t, outerActiveLayer: n, geometry: r } = e, i = q(n.value), a = q(null), o = Ie({
455
- response: d.response,
456
- dampingFraction: d.dampingFraction
457
- }), s = _e("(prefers-reduced-motion: reduce)");
490
+ function je(e) {
491
+ let { rootEl: t, outerActiveLayer: n, geometry: r } = e, i = K(n.value), a = K(null), o = Ae({
492
+ response: l.response,
493
+ dampingFraction: l.dampingFraction
494
+ }), s = fe("(prefers-reduced-motion: reduce)");
458
495
  function c() {
459
496
  return t.value;
460
497
  }
461
- function l() {
498
+ function u() {
462
499
  a.value = null;
463
500
  let t = c();
464
501
  t && (t.removeAttribute("data-morphing"), t.style.removeProperty("--dock-morph-t"), r.release()), e.onMorphActiveChange?.(!1), o.dispose();
465
502
  }
466
503
  Z(s, (e) => {
467
- e && c()?.hasAttribute("data-morphing") && l();
504
+ e && c()?.hasAttribute("data-morphing") && u();
468
505
  });
469
- function u() {
506
+ function d() {
470
507
  let t = c();
471
508
  if (!t) return;
472
509
  e.onMorphActiveChange?.(!0), t.setAttribute("data-morphing", "");
@@ -476,19 +513,19 @@ function Le(e) {
476
513
  onFrame: (e) => {
477
514
  c()?.style.setProperty("--dock-morph-t", `${e}`);
478
515
  },
479
- onSettle: l
516
+ onSettle: u
480
517
  });
481
518
  }
482
519
  let f = Z(n, (e, t) => {
483
520
  e !== t && (c() && r.first(), i.value = e, a.value = c() ? t : null);
484
521
  }), p = Z(n, (e, t) => {
485
- e === t || !c() || (r.measure(), u());
522
+ e === t || !c() || (r.measure(), d());
486
523
  }, { flush: "post" });
487
- return ne(() => {
524
+ return te(() => {
488
525
  f(), p(), o.dispose();
489
526
  }), {
490
- outerCurrentLayer: K(i),
491
- outerLeavingLayer: K(a)
527
+ outerCurrentLayer: G(i),
528
+ outerLeavingLayer: G(a)
492
529
  };
493
530
  }
494
531
  //#endregion
@@ -496,7 +533,7 @@ function Le(e) {
496
533
  function $(e, t) {
497
534
  return t === "vertical" ? e.offsetHeight : e.offsetWidth;
498
535
  }
499
- function Re(e, t) {
536
+ function Me(e, t) {
500
537
  let n = e.map(([e, t]) => [
501
538
  e,
502
539
  t,
@@ -510,7 +547,7 @@ function Re(e, t) {
510
547
  for (let [e, t, r, i] of n.reverse()) r ? e.style.setProperty(t, r, i) : e.style.removeProperty(t);
511
548
  }
512
549
  }
513
- function ze(e, t) {
550
+ function Ne(e, t) {
514
551
  let n = e.scrollLeft, r = e.scrollTop;
515
552
  try {
516
553
  return t();
@@ -522,9 +559,9 @@ function ze(e, t) {
522
559
  });
523
560
  }
524
561
  }
525
- function Be(e, t, n, r, i, a) {
562
+ function Pe(e, t, n, r, i, a) {
526
563
  let o = i === "vertical" ? "margin-block-end" : "margin-inline-end";
527
- return Re([
564
+ return Me([
528
565
  [
529
566
  e,
530
567
  "--dock-expanded-px",
@@ -551,14 +588,14 @@ function Be(e, t, n, r, i, a) {
551
588
  let s = a - (r - $(t, i));
552
589
  if (Math.abs(s) < .5) return r;
553
590
  let c = Number.parseFloat(getComputedStyle(n).getPropertyValue(o)) || 0;
554
- return Re([[
591
+ return Me([[
555
592
  n,
556
593
  o,
557
594
  `${c + s}px`
558
595
  ]], () => $(e, i));
559
596
  });
560
597
  }
561
- function Ve(e, t) {
598
+ function Fe(e, t) {
562
599
  let n = e.getBoundingClientRect();
563
600
  return t === "vertical" ? {
564
601
  start: n.top,
@@ -568,33 +605,33 @@ function Ve(e, t) {
568
605
  size: n.width
569
606
  };
570
607
  }
571
- var He = "--dock-morph-origin", Ue = "--dock-pane-shift", We = 2;
572
- function Ge(e, t) {
608
+ var Ie = "--dock-morph-origin", Le = "--dock-pane-shift", Re = 2;
609
+ function ze(e, t) {
573
610
  let n = getComputedStyle(e), r = e.parentElement;
574
611
  if (!r) return "";
575
612
  let i = getComputedStyle(r);
576
613
  return t === "vertical" ? `${r.clientHeight - parseFloat(i.paddingTop) - parseFloat(i.paddingBottom)} ${n.minHeight} ${n.maxHeight} ${window.innerHeight}` : `${r.clientWidth - parseFloat(i.paddingLeft) - parseFloat(i.paddingRight)} ${n.minWidth} ${n.maxWidth} ${window.innerWidth}`;
577
614
  }
578
- function Ke(e) {
579
- let { rootEl: t, contentEl: n, expandedEl: r, collapsedEl: i, axis: a } = e, o = null, s = null, c = null, l = /* @__PURE__ */ new Map(), u = null, d = null, f = null, p = null, m = null, h = null, g = "", _ = !1, v = !1;
580
- function b() {
615
+ function Be(e) {
616
+ let { rootEl: t, contentEl: n, expandedEl: r, collapsedEl: i, axis: a } = e, o = null, s = null, c = null, l = null, u = null, d = null, f = null, p = null, m = "", h = !1, g = !1;
617
+ function _() {
581
618
  let e = t.value, o = n.value, s = r.value, c = i.value;
582
619
  if (!e || !o || !s || !c) return;
583
- let l = a.value, u = s.classList.contains("is-active"), d = e.hasAttribute("data-morphing");
584
- if (!d) {
585
- let t = $(e, l) - $(o, l);
586
- u ? f = t : p = t;
620
+ let l = a.value, g = s.classList.contains("is-active"), _ = e.hasAttribute("data-morphing"), v = _ ? 0 : $(e, l);
621
+ if (!_) {
622
+ let e = v - $(o, l);
623
+ g ? u = e : d = e;
587
624
  }
588
- let v = ze(s, () => Be(e, o, s, c, l, f));
589
- if (!d) h = v, g = "", _ = !1;
625
+ let x = !_ && g ? v : Ne(s, () => Pe(e, o, s, c, l, u));
626
+ if (!_) p = x, m = "", h = !1;
590
627
  else {
591
- let t = Ge(e, l);
592
- g ||= t, _ ||= t !== g, !_ && h !== null && Math.abs(v - h) <= We && (v = h);
628
+ let t = ze(e, l);
629
+ m ||= t, h ||= t !== m, !h && p !== null && Math.abs(x - p) <= Re && (x = p);
593
630
  }
594
- C(e, s, d && v !== h && f !== null && S !== null ? v - f - S : void 0), u || (m = ze(s, () => Be(e, o, c, s, l, p))), !(v <= 0) && (m !== null && m > 0 && e.style.setProperty("--dock-collapsed-px", `${m}px`), e.style.setProperty("--dock-expanded-px", `${Math.max(v, m ?? 0)}px`));
631
+ b(e, s, _ && x !== p && u !== null && y !== null ? x - u - y : void 0), g || (f = _ ? Ne(s, () => Pe(e, o, c, s, l, d)) : v), !(x <= 0) && (f !== null && f > 0 && e.style.setProperty("--dock-collapsed-px", `${f}px`), e.style.setProperty("--dock-expanded-px", `${Math.max(x, f ?? 0)}px`));
595
632
  }
596
- let x = "", S = null;
597
- function C(e, t, r) {
633
+ let v = "", y = null;
634
+ function b(e, t, r) {
598
635
  if (!t.classList.contains("is-active")) return;
599
636
  let i = e.hasAttribute("data-morphing");
600
637
  if (i && r === void 0) return;
@@ -605,11 +642,11 @@ function Ke(e) {
605
642
  s = Math.min(s, n), c = Math.max(c, n + (o ? e.offsetWidth : e.offsetHeight));
606
643
  }
607
644
  let l = o ? t.clientWidth : t.clientHeight, u = n.value;
608
- !i && u && (S = $(u, a.value) - l);
645
+ !i && u && (y = $(u, a.value) - l);
609
646
  let d = r ?? l, f = c > s && c - s <= d, p = !o && f ? `${Math.floor((d - (c - s)) / 2 * 100) / 100}px` : "", m = `${f ? "1" : "0"} ${p}`;
610
- m !== x && (x = m, p ? e.style.setProperty("--dock-run-room-block", p) : e.style.removeProperty("--dock-run-room-block"), e.toggleAttribute("data-run-fits", f));
647
+ m !== v && (v = m, p ? e.style.setProperty("--dock-run-room-block", p) : e.style.removeProperty("--dock-run-room-block"), e.toggleAttribute("data-run-fits", f));
611
648
  }
612
- function w() {
649
+ function x() {
613
650
  if (!o) return;
614
651
  o.disconnect();
615
652
  let e = [r.value, i.value], a = t.value;
@@ -621,66 +658,44 @@ function Ke(e) {
621
658
  ]) t && o.observe(t);
622
659
  for (let t of e) for (let e of t?.children ?? []) o.observe(e);
623
660
  }
624
- function T(e, t, n) {
661
+ function S(e, t, n) {
625
662
  let r = a.value === "vertical" ? t : n;
626
663
  e.style.setProperty("--dock-plate-cross-px", `${r}px`);
627
664
  }
628
- function E(e) {
665
+ function C(e) {
629
666
  let t = e.querySelector(":scope > .dock-plate");
630
- t && (T(e, t.offsetWidth, t.offsetHeight), !(typeof ResizeObserver > "u") && (s = new ResizeObserver(([t]) => {
631
- let n = t?.borderBoxSize?.[0];
632
- n && T(e, n.inlineSize, n.blockSize);
633
- }), s.observe(t)));
634
- }
635
- let D = `[${y}]:not(.dock-trigger)`, O = "";
636
- function k(e) {
637
- let t = 0, n = 0;
638
- for (let e of l.values()) t = Math.max(t, e.inline), n = Math.max(n, e.block);
639
- let r = `${t} ${n}`;
640
- r !== O && (O = r, e.style.setProperty("--dock-seat-max-inline-px", `${t}px`), e.style.setProperty("--dock-seat-max-block-px", `${n}px`));
641
- }
642
- function A() {
643
- let e = t.value, n = r.value;
644
- if (!e || !n) return;
645
- let i = new Set(n.querySelectorAll(D));
646
- i.size > 0 && !c && typeof ResizeObserver < "u" && (c = new ResizeObserver((t) => {
647
- for (let e of t) {
648
- let t = e.borderBoxSize?.[0];
649
- t && l.has(e.target) && l.set(e.target, {
650
- inline: t.inlineSize,
651
- block: t.blockSize
652
- });
667
+ if (t) {
668
+ if (typeof ResizeObserver > "u") {
669
+ S(e, t.offsetWidth, t.offsetHeight);
670
+ return;
653
671
  }
654
- k(e);
655
- }));
656
- for (let e of l.keys()) i.has(e) || (c?.unobserve(e), l.delete(e));
657
- for (let e of i) l.has(e) || (l.set(e, {
658
- inline: e.offsetWidth,
659
- block: e.offsetHeight
660
- }), c?.observe(e));
661
- k(e);
672
+ s = new ResizeObserver(([t]) => {
673
+ let n = t?.borderBoxSize?.[0];
674
+ n && S(e, n.inlineSize, n.blockSize);
675
+ }), s.observe(t);
676
+ }
662
677
  }
663
- function j() {
664
- o?.disconnect(), o = null, s?.disconnect(), s = null, c?.disconnect(), c = null, u?.disconnect(), u = null, d?.disconnect(), d = null, l.clear(), O = "", x = "", S = null, h = null, g = "", _ = !1;
678
+ function w() {
679
+ o?.disconnect(), o = null, s?.disconnect(), s = null, c?.disconnect(), c = null, l?.disconnect(), l = null, v = "", y = null, p = null, m = "", h = !1;
665
680
  let e = t.value;
666
681
  if (e) {
667
- if (typeof ResizeObserver < "u" && (o = new ResizeObserver(() => b()), w()), E(e), A(), typeof MutationObserver < "u") {
668
- u = new MutationObserver(() => {
669
- w(), A(), b();
682
+ if (typeof ResizeObserver < "u" && (o = new ResizeObserver(() => _()), x()), C(e), typeof MutationObserver < "u") {
683
+ c = new MutationObserver(() => {
684
+ x(), o || _();
670
685
  });
671
- for (let e of [r.value, i.value]) e && u.observe(e, {
686
+ for (let e of [r.value, i.value]) e && c.observe(e, {
672
687
  childList: !0,
673
688
  subtree: !0,
674
689
  characterData: !0
675
690
  });
676
- d = new MutationObserver(() => {
677
- _ || !g || !e.hasAttribute("data-morphing") || Ge(e, a.value) !== g && b();
678
- }), d.observe(e, {
691
+ l = new MutationObserver(() => {
692
+ h || !m || !e.hasAttribute("data-morphing") || ze(e, a.value) !== m && _();
693
+ }), l.observe(e, {
679
694
  attributes: !0,
680
695
  attributeFilter: ["style", "class"]
681
696
  });
682
697
  }
683
- b();
698
+ o || _();
684
699
  }
685
700
  }
686
701
  Z([
@@ -689,52 +704,52 @@ function Ke(e) {
689
704
  r,
690
705
  i,
691
706
  a
692
- ], j, { immediate: !0 });
693
- let M = () => b();
694
- typeof window < "u" && window.addEventListener("resize", M);
695
- let N = typeof document < "u" ? document.fonts : void 0;
696
- N && N.ready.then(() => !v && b()), W(() => {
697
- v = !0, o?.disconnect(), o = null, s?.disconnect(), s = null, c?.disconnect(), c = null, u?.disconnect(), u = null, d?.disconnect(), d = null, typeof window < "u" && window.removeEventListener("resize", M);
707
+ ], w, { immediate: !0 });
708
+ let T = () => _();
709
+ typeof window < "u" && window.addEventListener("resize", T);
710
+ let E = typeof document < "u" ? document.fonts : void 0;
711
+ E && E.ready.then(() => !g && _()), U(() => {
712
+ g = !0, o?.disconnect(), o = null, s?.disconnect(), s = null, c?.disconnect(), c = null, l?.disconnect(), l = null, typeof window < "u" && window.removeEventListener("resize", T);
698
713
  });
699
- let P = null, F = null;
700
- function I(e) {
714
+ let D = null, O = null;
715
+ function k(e) {
701
716
  return [...e.querySelectorAll(":scope > .dock-controls > .dock-persistent")];
702
717
  }
703
- function L() {
718
+ function A() {
704
719
  return [r.value, i.value].filter((e) => !!e);
705
720
  }
706
- function R() {
721
+ function j() {
707
722
  let e = t.value;
708
723
  if (!e) return;
709
724
  let n = a.value;
710
- P = new Map([
725
+ D = new Map([
711
726
  e,
712
- ...I(e),
713
- ...L()
714
- ].map((e) => [e, Ve(e, n)]));
727
+ ...k(e),
728
+ ...A()
729
+ ].map((e) => [e, Fe(e, n)]));
715
730
  let i = r.value;
716
- F = i ? {
731
+ O = i ? {
717
732
  left: i.scrollLeft,
718
733
  top: i.scrollTop
719
734
  } : null;
720
735
  }
721
- function z() {
736
+ function M() {
722
737
  let e = t.value;
723
738
  if (e) {
724
739
  for (let t of [
725
740
  e,
726
- ...I(e),
741
+ ...k(e),
727
742
  n.value
728
- ]) t?.style.removeProperty(He);
729
- for (let e of L()) e.style.removeProperty(Ue);
730
- r.value && C(e, r.value);
743
+ ]) t?.style.removeProperty(Ie);
744
+ for (let e of A()) e.style.removeProperty(Le);
745
+ r.value && b(e, r.value);
731
746
  }
732
747
  }
733
- function B() {
734
- let e = r.value, t = F;
735
- F = null;
748
+ function N() {
749
+ let e = r.value, t = O;
750
+ O = null;
736
751
  try {
737
- V();
752
+ P();
738
753
  } finally {
739
754
  e?.classList.contains("is-leaving") && t && (e.scrollLeft !== t.left || e.scrollTop !== t.top) && e.scrollTo({
740
755
  left: t.left,
@@ -743,10 +758,10 @@ function Ke(e) {
743
758
  });
744
759
  }
745
760
  }
746
- function V() {
747
- let e = t.value, i = n.value, o = P;
748
- if (P = null, z(), !e || !i || !o || !o.get(e)) return;
749
- let s = a.value, c = I(e), l = Ve(e, s), u = [
761
+ function P() {
762
+ let e = t.value, i = n.value, o = D;
763
+ if (D = null, M(), !e || !i || !o || !o.get(e)) return;
764
+ let s = a.value, c = k(e), l = Fe(e, s), u = [
750
765
  e,
751
766
  ...c,
752
767
  i
@@ -758,10 +773,10 @@ function Ke(e) {
758
773
  e,
759
774
  ...c,
760
775
  i,
761
- ...L()
762
- ].map((e) => [e, Ve(e, s)])), f = Re(u, d), p = f.get(e), m = $(e, s), h = p.size / m;
776
+ ...A()
777
+ ].map((e) => [e, Fe(e, s)])), f = Me(u, d), p = f.get(e), m = $(e, s), h = p.size / m;
763
778
  if (!(h > 0)) return;
764
- let g = (e) => Math.abs(1 - e) < 1e-4, _ = l.size / p.size, v = !r.value?.classList.contains("is-active") || g(_) ? Re([
779
+ let g = (e) => Math.abs(1 - e) < 1e-4, _ = l.size / p.size, v = !r.value?.classList.contains("is-active") || g(_) ? Me([
765
780
  ...u,
766
781
  [
767
782
  e,
@@ -776,50 +791,50 @@ function Ke(e) {
776
791
  ], d) : null, y = o;
777
792
  if (v && g(_) && (y = v, _ = v.get(e).size / p.size), !Number.isFinite(_)) return;
778
793
  let b = (e) => (e - p.start) / h, x = (e, t) => g(_) ? null : (e - t) / (1 - _), S = (e) => b(e.start + e.size / 2), C = x(b(y.get(e).start), 0) ?? m / 2, w = (e, t) => `${e / t * 100}%`;
779
- e.style.setProperty(He, w(C, m));
794
+ e.style.setProperty(Ie, w(C, m));
780
795
  for (let e of c) {
781
796
  let t = y.get(e), n = f.get(e), r = $(e, s);
782
797
  if (!t || !(r > 0)) continue;
783
798
  let i = x(S(t), S(n));
784
- e.style.setProperty(He, w((i === null ? C : C - i) - b(n.start), r));
799
+ e.style.setProperty(Ie, w((i === null ? C : C - i) - b(n.start), r));
785
800
  }
786
801
  let T = $(i, s);
787
- T > 0 && i.style.setProperty(He, w(C - b(f.get(i).start), T));
788
- for (let t of L()) {
802
+ T > 0 && i.style.setProperty(Ie, w(C - b(f.get(i).start), T));
803
+ for (let t of A()) {
789
804
  let n = t.classList.contains("is-leaving"), r = n ? o.get(t) : v?.get(t), i = $(t, s);
790
805
  if (!r || !(i > 0)) continue;
791
- let a = n ? f.get(t) : Re([[
806
+ let a = n ? f.get(t) : Me([[
792
807
  e,
793
808
  "--dock-morph-t",
794
809
  "1"
795
- ]], () => Ve(t, s));
796
- a && t.style.setProperty(Ue, w((r.start - a.start) / h, i));
810
+ ]], () => Fe(t, s));
811
+ a && t.style.setProperty(Le, w((r.start - a.start) / h, i));
797
812
  }
798
813
  }
799
814
  return {
800
- measure: b,
801
- first: R,
802
- anchor: B,
803
- release: z
815
+ measure: _,
816
+ first: j,
817
+ anchor: N,
818
+ release: M
804
819
  };
805
820
  }
806
821
  //#endregion
807
822
  //#region src/components/dock/composables/useDockShellProps.ts
808
- function qe(e) {
809
- let t = j(() => e.shape ?? "pill"), n = j(() => e.orientation ?? "horizontal"), r = j(() => e.collapse === !1);
823
+ function Ve(e) {
824
+ let t = A(() => e.shape ?? "pill"), n = A(() => e.orientation ?? "horizontal"), r = A(() => e.collapse === !1);
810
825
  return {
811
- startCollapsed: j(() => !r.value && (e.collapse ?? "closed") === "closed"),
826
+ startCollapsed: A(() => !r.value && (e.collapse ?? "closed") === "closed"),
812
827
  shape: t,
813
828
  orientation: n,
814
829
  alwaysExpanded: r,
815
- fitContent: j(() => e.fitContent ?? !1)
830
+ fitContent: A(() => e.fitContent ?? !1)
816
831
  };
817
832
  }
818
833
  //#endregion
819
834
  //#region src/components/dock/composables/useDockClickIntegrity.ts
820
- var Je = 6;
821
- function Ye(e) {
822
- let { rootEl: t, visualExpanded: n } = e, r = null, i = !1, a = 0, o = null, s = q(null), c = null, l = null, u = -Infinity, d = !1, f = !1;
835
+ var He = 6;
836
+ function Ue(e) {
837
+ let { rootEl: t, visualExpanded: n } = e, r = null, i = !1, a = 0, o = null, s = K(null), c = null, l = null, u = -Infinity, d = !1, f = !1;
823
838
  function p(e) {
824
839
  c = {
825
840
  x: e.clientX,
@@ -836,7 +851,7 @@ function Ye(e) {
836
851
  flush: "sync"
837
852
  });
838
853
  function m(e) {
839
- return f ? d || !l ? !0 : Math.hypot(e.clientX - l.x, e.clientY - l.y) > Je : !1;
854
+ return f ? d || !l ? !0 : Math.hypot(e.clientX - l.x, e.clientY - l.y) > He : !1;
840
855
  }
841
856
  let h = null, g = [];
842
857
  function _() {
@@ -911,42 +926,42 @@ function Ye(e) {
911
926
  }
912
927
  e.stopPropagation(), e.preventDefault(), r = null;
913
928
  }
914
- return U(() => {
929
+ return H(() => {
915
930
  y(), _();
916
931
  }), {
917
932
  onPointerDownCapture: w,
918
933
  onPointerCancelCapture: T,
919
934
  onClickCapture: D,
920
935
  markExpandFlip: b,
921
- pressKeepaliveLayer: K(s)
936
+ pressKeepaliveLayer: G(s)
922
937
  };
923
938
  }
924
939
  //#endregion
925
940
  //#region src/components/dock/composables/useDockRun.ts
926
- function Xe(e) {
941
+ function We(e) {
927
942
  return Array.from(e.children).filter((e) => e instanceof HTMLElement);
928
943
  }
929
- function Ze(e) {
944
+ function Ge(e) {
930
945
  return e.findIndex((e) => {
931
946
  let t = (e.matches("[aria-current]") ? e : e.querySelector("[aria-current]"))?.getAttribute("aria-current");
932
947
  return t != null && t !== "false";
933
948
  });
934
949
  }
935
- function Qe(e) {
936
- return e.hasAttribute(y);
950
+ function Ke(e) {
951
+ return e.hasAttribute(u);
937
952
  }
938
- function $e(e) {
939
- return Xe(e).filter(Qe);
953
+ function qe(e) {
954
+ return We(e).filter(Ke);
940
955
  }
941
- var et = ".dock-separator", tt = "select[aria-hidden=\"true\"][tabindex=\"-1\"]";
942
- function nt(e) {
943
- let t = Xe(e).filter((e) => !e.matches(et) && !e.matches(tt));
944
- return t.length > 0 && t.every(Qe);
956
+ var Je = ".dock-separator", Ye = "select[aria-hidden=\"true\"][tabindex=\"-1\"]";
957
+ function Xe(e) {
958
+ let t = We(e).filter((e) => !e.matches(Je) && !e.matches(Ye));
959
+ return t.length > 0 && t.every(Ke);
945
960
  }
946
- function rt(e) {
947
- let { runEl: t, statusEl: n, orientation: r } = e, i = q(!1), a = Ie({
948
- response: d.response,
949
- dampingFraction: d.dampingFraction
961
+ function Ze(e) {
962
+ let { runEl: t, statusEl: n, orientation: r } = e, i = K(!1), a = Ae({
963
+ response: l.response,
964
+ dampingFraction: l.dampingFraction
950
965
  });
951
966
  function o() {
952
967
  return r.value === "vertical";
@@ -957,10 +972,10 @@ function rt(e) {
957
972
  function c(e, t) {
958
973
  o() ? e.scrollTop = t : e.scrollLeft = t;
959
974
  }
960
- function l(e) {
975
+ function d(e) {
961
976
  return o() ? e.scrollHeight - e.clientHeight : e.scrollWidth - e.clientWidth;
962
977
  }
963
- function u(e, t) {
978
+ function f(e, t) {
964
979
  let n = 0;
965
980
  for (let r = t; r && r !== e;) {
966
981
  n += o() ? r.offsetTop : r.offsetLeft;
@@ -969,32 +984,32 @@ function rt(e) {
969
984
  }
970
985
  return [n, n + (o() ? t.offsetHeight : t.offsetWidth)];
971
986
  }
972
- function f(e) {
987
+ function p(e) {
973
988
  let t = getComputedStyle(e);
974
989
  return Number.parseFloat(o() ? t.paddingBlockStart : t.paddingInlineStart) || 0;
975
990
  }
976
- function p(e, t) {
977
- let n = getComputedStyle(e), r = Number.parseFloat(o() ? n.scrollPaddingBlockStart : n.scrollPaddingInlineStart) || 0, [i] = u(e, t);
978
- return Math.min(Math.max(i - r, 0), l(e));
979
- }
980
991
  function m(e, t) {
981
- let n = s(e), r = o() ? e.clientHeight : e.clientWidth, i = f(e), [a, c] = u(e, t);
982
- return a < n + i - 1 || c > n + r - i + 1;
992
+ let n = getComputedStyle(e), r = Number.parseFloat(o() ? n.scrollPaddingBlockStart : n.scrollPaddingInlineStart) || 0, [i] = f(e, t);
993
+ return Math.min(Math.max(i - r, 0), d(e));
994
+ }
995
+ function h(e, t) {
996
+ let n = s(e), r = o() ? e.clientHeight : e.clientWidth, i = p(e), [a, c] = f(e, t), l = .5;
997
+ return a < n + i - l || c > n + r - i + l;
983
998
  }
984
- function h(e) {
999
+ function g(e) {
985
1000
  let t = n.value;
986
1001
  if (!t) return;
987
- let r = Qe(e) ? e : e.querySelector(C) ?? e, i = r.getAttribute("aria-label") ?? r.getAttribute("title") ?? r.textContent?.trim();
1002
+ let r = Ke(e) ? e : e.querySelector(w) ?? e, i = r.getAttribute("aria-label") ?? r.getAttribute("title") ?? r.textContent?.trim();
988
1003
  i && (t.textContent = i);
989
1004
  }
990
- function g(e) {
1005
+ function _(e) {
991
1006
  let n = t.value;
992
1007
  if (!n) return;
993
- if (h(e), !m(n, e)) {
1008
+ if (g(e), !h(n, e)) {
994
1009
  a.dispose();
995
1010
  return;
996
1011
  }
997
- let r = s(n), i = p(n, e);
1012
+ let r = s(n), i = m(n, e);
998
1013
  if (Math.abs(i - r) < 1) {
999
1014
  a.dispose();
1000
1015
  return;
@@ -1004,35 +1019,35 @@ function rt(e) {
1004
1019
  n && c(n, r + (i - r) * e);
1005
1020
  } });
1006
1021
  }
1007
- let _ = /* @__PURE__ */ new WeakMap();
1008
- function v(e, t) {
1009
- _.has(e) || _.set(e, e.getAttribute("tabindex")), e.tabIndex = t;
1022
+ let v = /* @__PURE__ */ new WeakMap();
1023
+ function y(e, t) {
1024
+ v.has(e) || v.set(e, e.getAttribute("tabindex")), e.tabIndex = t;
1010
1025
  }
1011
1026
  function b(e) {
1012
- if (!_.has(e)) return;
1013
- let t = _.get(e) ?? null;
1014
- _.delete(e), t === null ? e.removeAttribute("tabindex") : e.setAttribute("tabindex", t);
1027
+ if (!v.has(e)) return;
1028
+ let t = v.get(e) ?? null;
1029
+ v.delete(e), t === null ? e.removeAttribute("tabindex") : e.setAttribute("tabindex", t);
1015
1030
  }
1016
1031
  function x() {
1017
1032
  let e = t.value;
1018
1033
  if (!e) return;
1019
- i.value = nt(e);
1020
- for (let t of Xe(e)) Qe(t) || b(t);
1021
- let n = $e(e);
1034
+ i.value = Xe(e);
1035
+ for (let t of We(e)) Ke(t) || b(t);
1036
+ let n = qe(e);
1022
1037
  if (n.length === 0) return;
1023
- let r = Ze(n), a = n.findIndex((e) => e.contains(document.activeElement)), o = a >= 0 ? a : r >= 0 ? r : 0;
1038
+ let r = Ge(n), a = n.findIndex((e) => e.contains(document.activeElement)), o = a >= 0 ? a : r >= 0 ? r : 0;
1024
1039
  n.forEach((e, t) => {
1025
- v(e, t === o ? 0 : -1);
1040
+ y(e, t === o ? 0 : -1);
1026
1041
  });
1027
1042
  }
1028
1043
  function S(e, t) {
1029
1044
  let n = e[t];
1030
- n && (g(n), v(n, 0), n.focus({ preventScroll: !0 }), x());
1045
+ n && (_(n), y(n, 0), n.focus({ preventScroll: !0 }), x());
1031
1046
  }
1032
- function w(e) {
1047
+ function C(e) {
1033
1048
  let n = t.value;
1034
1049
  if (!n) return;
1035
- let r = $e(n);
1050
+ let r = qe(n);
1036
1051
  if (r.length === 0) return;
1037
1052
  let i = r.findIndex((t) => t.contains(e.target));
1038
1053
  if (i < 0) return;
@@ -1055,56 +1070,68 @@ function rt(e) {
1055
1070
  c < 0 || c >= r.length || (e.preventDefault(), S(r, c));
1056
1071
  }
1057
1072
  function T(e, t) {
1058
- let n = (t instanceof Element ? t : t.parentElement)?.closest(`[${y}]`);
1059
- return n && n !== e && e.contains(n) ? n : Xe(e).find((e) => e.contains(t));
1073
+ let n = (t instanceof Element ? t : t.parentElement)?.closest(`[${u}]`);
1074
+ return n && n !== e && e.contains(n) ? n : We(e).find((e) => e.contains(t));
1060
1075
  }
1061
1076
  function E(e) {
1062
1077
  let n = t.value;
1063
1078
  if (!n) return;
1064
1079
  let r = T(n, e.target);
1065
- r && g(r);
1080
+ r && _(r);
1066
1081
  }
1067
- let D = null;
1068
- function O(e, t) {
1082
+ function D(e) {
1083
+ let n = t.value;
1084
+ if (!n || e.ctrlKey) return;
1085
+ let i = r.value === "vertical", a = i ? e.deltaY : e.deltaX;
1086
+ if (a === 0) return;
1087
+ let o = i ? n.scrollTop : n.scrollLeft, s = i ? n.scrollHeight - n.clientHeight : n.scrollWidth - n.clientWidth;
1088
+ s <= 0 || (a > 0 && o >= s - .5 || a < 0 && o <= .5) && e.preventDefault();
1089
+ }
1090
+ let O = null;
1091
+ function k(e, t) {
1069
1092
  if (t.type !== "attributes" || t.attributeName === "aria-current" || t.attributeName === "data-glass-dock-seat") return !0;
1070
1093
  let n = t.target;
1071
- return n.parentElement === e && !Qe(n);
1094
+ return n.parentElement === e && !Ke(n);
1072
1095
  }
1073
- return te(() => {
1096
+ return ee(() => {
1074
1097
  let e = t.value;
1075
- e && (e.addEventListener("keydown", w), e.addEventListener("click", E, { capture: !0 }), e.addEventListener("focusin", E, { capture: !0 }), x(), D = new MutationObserver((t) => {
1076
- t.some((t) => O(e, t)) && x();
1077
- }), D.observe(e, {
1098
+ e && (e.addEventListener("keydown", C), e.addEventListener("wheel", D, { passive: !1 }), e.addEventListener("click", E, { capture: !0 }), e.addEventListener("focusin", E, { capture: !0 }), x(), O = new MutationObserver((t) => {
1099
+ t.some((t) => k(e, t)) && x();
1100
+ }), O.observe(e, {
1078
1101
  childList: !0,
1079
1102
  subtree: !0,
1080
1103
  attributes: !0,
1081
1104
  attributeFilter: [
1082
1105
  "aria-current",
1083
- y,
1106
+ u,
1084
1107
  "aria-hidden",
1085
1108
  "tabindex"
1086
1109
  ]
1087
1110
  }));
1088
- }), ne(() => {
1111
+ }), te(() => {
1089
1112
  let e = t.value;
1090
- e?.removeEventListener("keydown", w), e?.removeEventListener("click", E, { capture: !0 }), e?.removeEventListener("focusin", E, { capture: !0 }), D?.disconnect(), a.dispose();
1113
+ e?.removeEventListener("keydown", C), e?.removeEventListener("wheel", D), e?.removeEventListener("click", E, { capture: !0 }), e?.removeEventListener("focusin", E, { capture: !0 }), O?.disconnect(), a.dispose();
1091
1114
  }), Z(r, () => x()), {
1092
- reach: g,
1115
+ reach: _,
1093
1116
  syncRoving: x,
1094
1117
  toolbar: i
1095
1118
  };
1096
1119
  }
1097
1120
  //#endregion
1098
1121
  //#region src/components/dock/GlassDock.vue?vue&type=script&setup=true&lang.ts
1099
- var it = ["data-backdrop-mode", "data-held"], at = ["data-held"], ot = { class: "dock-controls" }, st = {
1122
+ var Qe = [
1123
+ "data-backdrop-mode",
1124
+ "data-anchor",
1125
+ "data-held"
1126
+ ], $e = ["data-held"], et = { class: "dock-controls" }, tt = {
1100
1127
  key: 0,
1101
1128
  class: "dock-persistent"
1102
- }, ct = [
1129
+ }, nt = [
1103
1130
  "id",
1104
1131
  "role",
1105
1132
  "aria-orientation",
1106
1133
  "inert"
1107
- ], lt = [
1134
+ ], rt = [
1108
1135
  "id",
1109
1136
  "inert",
1110
1137
  "role",
@@ -1112,13 +1139,13 @@ var it = ["data-backdrop-mode", "data-held"], at = ["data-held"], ot = { class:
1112
1139
  "aria-label",
1113
1140
  "aria-expanded",
1114
1141
  "aria-controls"
1115
- ], ut = {
1142
+ ], it = {
1116
1143
  key: 0,
1117
1144
  class: "dock-search-field"
1118
- }, dt = {
1145
+ }, at = {
1119
1146
  key: 1,
1120
1147
  class: "dock-persistent dock-persistent-end"
1121
- }, ft = /* @__PURE__ */ L({
1148
+ }, ot = /* @__PURE__ */ I({
1122
1149
  inheritAttrs: !1,
1123
1150
  __name: "GlassDock",
1124
1151
  props: {
@@ -1130,84 +1157,88 @@ var it = ["data-backdrop-mode", "data-held"], at = ["data-held"], ot = { class:
1130
1157
  type: [Boolean, String],
1131
1158
  default: "closed"
1132
1159
  },
1160
+ expandOn: { default: "hover" },
1161
+ anchor: { default: "center" },
1162
+ collapsedLabel: { default: "Expand dock" },
1133
1163
  backgroundCanvas: {}
1134
1164
  },
1135
1165
  setup(e, { expose: t }) {
1136
- let n = e, { startCollapsed: r, shape: i, orientation: a, alwaysExpanded: o, fitContent: s } = qe(n), c = X("dockEl"), u = X("layersEl"), d = X("fullEl"), m = X("summaryEl"), h = X("statusEl"), { toolbar: g } = rt({
1137
- runEl: d,
1138
- statusEl: h,
1166
+ let n = e, { startCollapsed: r, shape: i, orientation: a, alwaysExpanded: o, fitContent: s } = Ve(n), c = X("dockEl"), l = X("layersEl"), u = X("fullEl"), f = X("summaryEl"), p = X("statusEl"), { toolbar: g } = Ze({
1167
+ runEl: u,
1168
+ statusEl: p,
1139
1169
  orientation: a
1140
1170
  });
1141
- n.backdropMode === "live" && Pe(c, { backgroundCanvas: () => {
1171
+ n.backdropMode === "live" && Oe(c, { backgroundCanvas: () => {
1142
1172
  let e = n.backgroundCanvas;
1143
1173
  return typeof e == "function" ? e() : e instanceof HTMLCanvasElement ? e : null;
1144
1174
  } });
1145
- let _ = q(!1), v = `glass-dock-${oe()}`, { expanded: y, isPinned: b, isHeld: x, graspHeld: S, onMouseEnter: w, onMouseLeave: T, onFocusIn: E, onFocusOut: D, onClickCollapsed: O, keepOpen: k, release: M, expand: L, collapse: R } = Fe({
1175
+ let _ = K(!1), v = `glass-dock-${ie()}`, { expanded: y, isPinned: b, isHeld: x, graspHeld: S, onMouseEnter: C, onMouseLeave: T, onFocusIn: E, onFocusOut: D, onClickCollapsed: O, keepOpen: j, release: I, expand: L, collapse: V } = ke({
1146
1176
  rootEl: c,
1147
1177
  alwaysExpanded: o,
1178
+ expandOn: A(() => n.expandOn),
1148
1179
  initialExpanded: !r.value,
1149
1180
  isTransitioning: _,
1150
1181
  dockId: v
1151
- }), z = j(() => o.value || y.value);
1152
- l({
1182
+ }), H = A(() => o.value || y.value);
1183
+ m({
1153
1184
  id: v,
1154
1185
  orientation: a,
1155
- keepOpen: k,
1156
- release: M,
1186
+ keepOpen: j,
1187
+ release: I,
1157
1188
  held: S,
1158
- expanded: z
1189
+ expanded: H
1159
1190
  });
1160
- let ee = Ke({
1191
+ let ee = Be({
1161
1192
  rootEl: c,
1162
- contentEl: u,
1163
- expandedEl: d,
1164
- collapsedEl: m,
1193
+ contentEl: l,
1194
+ expandedEl: u,
1195
+ collapsedEl: f,
1165
1196
  axis: a
1166
- }), { outerCurrentLayer: U, outerLeavingLayer: te } = Le({
1197
+ }), { outerCurrentLayer: U, outerLeavingLayer: te } = je({
1167
1198
  rootEl: c,
1168
- outerActiveLayer: j(() => z.value ? "full" : "summary"),
1199
+ outerActiveLayer: A(() => H.value ? "full" : "summary"),
1169
1200
  onMorphActiveChange: (e) => {
1170
1201
  _.value = e;
1171
1202
  },
1172
1203
  geometry: ee
1173
- }), W = j(() => U.value === "summary");
1204
+ }), G = A(() => U.value === "summary");
1174
1205
  async function ne() {
1175
- await V(), (d.value?.querySelector(C) ?? d.value)?.focus({ preventScroll: !0 });
1206
+ await z(), (u.value?.querySelector(w) ?? u.value)?.focus({ preventScroll: !0 });
1176
1207
  }
1177
- async function K(e) {
1178
- !W.value || !["Enter", " "].includes(e.key) || (e.preventDefault(), O(), await ne());
1208
+ async function re(e) {
1209
+ !G.value || !["Enter", " "].includes(e.key) || (e.preventDefault(), O(), await ne());
1179
1210
  }
1180
- let re = !1;
1181
- function ie(e) {
1182
- let t = !re && W.value && !!m.value?.matches(":focus-visible");
1211
+ let J = !1;
1212
+ function ae(e) {
1213
+ let t = !J && G.value && !!f.value?.matches(":focus-visible");
1183
1214
  e.stopPropagation(), t && (E(), ne());
1184
1215
  }
1185
- function ae(e) {
1216
+ function se(e) {
1186
1217
  if (e.key !== "Escape") return;
1187
- let t = e.target?.closest?.(f);
1188
- t && d.value?.contains(t) || R();
1218
+ let t = e.target?.closest?.(d);
1219
+ t && u.value?.contains(t) || V();
1189
1220
  }
1190
- Z(z, async (e, t) => {
1221
+ Z(H, async (e, t) => {
1191
1222
  if (!t || e) return;
1192
1223
  let n = document.activeElement;
1193
- if (!(n && d.value?.contains(n) || n?.closest("[data-glass-dock-face]")?.getAttribute("data-glass-dock-owner") === v)) return;
1194
- await V();
1195
- let r = m.value;
1196
- !r || r.hasAttribute("inert") || (re = !0, r.focus({ preventScroll: !0 }), re = !1);
1224
+ if (!(n && u.value?.contains(n) || n?.closest("[data-glass-dock-face]")?.getAttribute("data-glass-dock-owner") === v)) return;
1225
+ await z();
1226
+ let r = f.value;
1227
+ !r || r.hasAttribute("inert") || (J = !0, r.focus({ preventScroll: !0 }), J = !1);
1197
1228
  });
1198
- let { onPointerDownCapture: se, onPointerCancelCapture: ce, onClickCapture: le, markExpandFlip: ue, pressKeepaliveLayer: de } = Ye({
1229
+ let { onPointerDownCapture: ce, onPointerCancelCapture: le, onClickCapture: ue, markExpandFlip: de, pressKeepaliveLayer: fe } = Ue({
1199
1230
  rootEl: c,
1200
- visualExpanded: z
1231
+ visualExpanded: H
1201
1232
  });
1202
- Z(z, (e) => {
1203
- e && ue();
1233
+ Z(H, (e) => {
1234
+ e && de();
1204
1235
  });
1205
- let fe = q(!1);
1236
+ let Q = K(!1);
1206
1237
  Z(S, (e) => {
1207
- e && (fe.value = !0);
1238
+ e && (Q.value = !0);
1208
1239
  });
1209
1240
  function pe(e) {
1210
- e.propertyName === "opacity" && !S.value && (fe.value = !1);
1241
+ e.propertyName === "opacity" && !S.value && (Q.value = !1);
1211
1242
  }
1212
1243
  return t({
1213
1244
  expanded: y,
@@ -1216,10 +1247,10 @@ var it = ["data-backdrop-mode", "data-held"], at = ["data-held"], ot = { class:
1216
1247
  graspHeld: S,
1217
1248
  isTransitioning: _,
1218
1249
  expand: L,
1219
- collapse: R,
1220
- keepOpen: k,
1221
- release: M
1222
- }), (e, t) => (G(), P("div", B({
1250
+ collapse: V,
1251
+ keepOpen: j,
1252
+ release: I
1253
+ }), (e, t) => (W(), N("div", R({
1223
1254
  ref_key: "dockEl",
1224
1255
  ref: c
1225
1256
  }, e.$attrs, {
@@ -1227,107 +1258,108 @@ var it = ["data-backdrop-mode", "data-held"], at = ["data-held"], ot = { class:
1227
1258
  Y(a),
1228
1259
  `shape-${Y(i)}`,
1229
1260
  {
1230
- expanded: z.value,
1231
- collapsed: !z.value,
1261
+ expanded: H.value,
1262
+ collapsed: !H.value,
1232
1263
  pinned: Y(b),
1233
1264
  "fit-content": Y(s),
1234
1265
  "always-expanded": Y(o)
1235
1266
  }
1236
1267
  ]],
1237
1268
  "data-backdrop-mode": n.backdropMode,
1269
+ "data-anchor": n.anchor === "center" ? void 0 : n.anchor,
1238
1270
  "data-held": Y(S) || void 0,
1239
- onMouseenter: t[1] ||= (...e) => Y(w) && Y(w)(...e),
1271
+ onMouseenter: t[1] ||= (...e) => Y(C) && Y(C)(...e),
1240
1272
  onMouseleave: t[2] ||= (e) => Y(T)(e),
1241
1273
  onFocusin: t[3] ||= (...e) => Y(E) && Y(E)(...e),
1242
1274
  onFocusout: t[4] ||= (...e) => Y(D) && Y(D)(...e),
1243
- onPointerdownCapture: t[5] ||= (...e) => Y(se) && Y(se)(...e),
1244
- onPointercancelCapture: t[6] ||= (...e) => Y(ce) && Y(ce)(...e),
1245
- onClickCapture: t[7] ||= (...e) => Y(le) && Y(le)(...e)
1275
+ onPointerdownCapture: t[5] ||= (...e) => Y(ce) && Y(ce)(...e),
1276
+ onPointercancelCapture: t[6] ||= (...e) => Y(le) && Y(le)(...e),
1277
+ onClickCapture: t[7] ||= (...e) => Y(ue) && Y(ue)(...e)
1246
1278
  }), [
1247
- F("div", {
1279
+ P("div", {
1248
1280
  class: "dock-plate",
1249
1281
  "aria-hidden": "true",
1250
1282
  "data-held": Y(S) || void 0
1251
- }, [fe.value ? (G(), P(A, { key: 0 }, [t[8] ||= F("span", {
1283
+ }, [Q.value ? (W(), N(k, { key: 0 }, [t[8] ||= P("span", {
1252
1284
  class: "glass-grasp-carrier",
1253
1285
  "data-grasp": "rest"
1254
- }, null, -1), F("span", {
1286
+ }, null, -1), P("span", {
1255
1287
  class: "glass-grasp-carrier",
1256
1288
  "data-grasp": "grasp",
1257
1289
  onTransitionend: pe
1258
- }, null, 32)], 64)) : N("", !0)], 8, at),
1259
- F("div", ot, [
1260
- e.$slots.persistent ? (G(), P("div", st, [J(e.$slots, "persistent")])) : N("", !0),
1261
- F("div", {
1290
+ }, null, 32)], 64)) : M("", !0)], 8, $e),
1291
+ P("div", et, [
1292
+ e.$slots.persistent ? (W(), N("div", tt, [q(e.$slots, "persistent")])) : M("", !0),
1293
+ P("div", {
1262
1294
  ref_key: "layersEl",
1263
- ref: u,
1295
+ ref: l,
1264
1296
  class: "dock-layers"
1265
1297
  }, [
1266
- F("div", {
1298
+ P("div", {
1267
1299
  ref_key: "fullEl",
1268
- ref: d,
1300
+ ref: u,
1269
1301
  id: `${v}-full`,
1270
1302
  role: Y(g) ? "toolbar" : void 0,
1271
1303
  "aria-orientation": Y(g) ? Y(a) : void 0,
1272
- class: H(["dock-layer dock-layer--full dock-run", {
1304
+ class: B(["dock-layer dock-layer--full dock-run", {
1273
1305
  "is-active": Y(U) === "full",
1274
- "is-leaving": Y(te) === "full" || Y(de) === "full" && Y(U) !== "full",
1275
- "is-press-keepalive": Y(de) === "full"
1306
+ "is-leaving": Y(te) === "full" || Y(fe) === "full" && Y(U) !== "full",
1307
+ "is-press-keepalive": Y(fe) === "full"
1276
1308
  }]),
1277
- inert: Y(U) !== "full" && Y(de) !== "full" || void 0,
1309
+ inert: Y(U) !== "full" && Y(fe) !== "full" || void 0,
1278
1310
  tabindex: "-1",
1279
- onKeydown: ae
1280
- }, [I(Y(p), null, {
1281
- default: Q(() => [J(e.$slots, "default")]),
1311
+ onKeydown: se
1312
+ }, [F(Y(h), null, {
1313
+ default: oe(() => [q(e.$slots, "default")]),
1282
1314
  _: 3
1283
- })], 42, ct),
1284
- F("div", {
1315
+ })], 42, nt),
1316
+ P("div", {
1285
1317
  ref_key: "summaryEl",
1286
- ref: m,
1318
+ ref: f,
1287
1319
  id: `${v}-summary`,
1288
- class: H(["dock-layer dock-layer--summary", {
1320
+ class: B(["dock-layer dock-layer--summary", {
1289
1321
  "is-active": Y(U) === "summary",
1290
1322
  "is-leaving": Y(te) === "summary"
1291
1323
  }]),
1292
1324
  inert: Y(U) !== "summary" || void 0,
1293
- role: W.value ? "button" : void 0,
1294
- tabindex: W.value ? 0 : void 0,
1295
- "aria-label": W.value ? "Expand dock" : void 0,
1296
- "aria-expanded": W.value ? "false" : void 0,
1297
- "aria-controls": W.value ? `${v}-full` : void 0,
1298
- onFocusin: ie,
1299
- onKeydown: K,
1325
+ role: G.value ? "button" : void 0,
1326
+ tabindex: G.value ? 0 : void 0,
1327
+ "aria-label": G.value ? n.collapsedLabel : void 0,
1328
+ "aria-expanded": G.value ? "false" : void 0,
1329
+ "aria-controls": G.value ? `${v}-full` : void 0,
1330
+ onFocusin: ae,
1331
+ onKeydown: re,
1300
1332
  onClick: t[0] ||= (...e) => Y(O) && Y(O)(...e)
1301
- }, [J(e.$slots, "collapsed")], 42, lt),
1302
- e.$slots.search ? (G(), P("div", ut, [J(e.$slots, "search")])) : N("", !0)
1333
+ }, [q(e.$slots, "collapsed")], 42, rt),
1334
+ e.$slots.search ? (W(), N("div", it, [q(e.$slots, "search")])) : M("", !0)
1303
1335
  ], 512),
1304
- e.$slots["persistent-end"] ? (G(), P("div", dt, [J(e.$slots, "persistent-end")])) : N("", !0)
1336
+ e.$slots["persistent-end"] ? (W(), N("div", at, [q(e.$slots, "persistent-end")])) : M("", !0)
1305
1337
  ]),
1306
- F("div", {
1338
+ P("div", {
1307
1339
  ref_key: "statusEl",
1308
- ref: h,
1340
+ ref: p,
1309
1341
  class: "dock-run-status",
1310
1342
  role: "status",
1311
1343
  "aria-live": "polite"
1312
1344
  }, null, 512)
1313
- ], 16, it));
1345
+ ], 16, Qe));
1314
1346
  }
1315
- }), pt = c("glass-ui:dock-switcher-tablist"), { KEY: mt } = pt;
1316
- function ht(e) {
1317
- pt.provide(e);
1347
+ }), st = c("glass-ui:dock-switcher-tablist"), { KEY: ct } = st;
1348
+ function lt(e) {
1349
+ st.provide(e);
1318
1350
  }
1319
- var gt = pt.use, _t = s(m, "[glass-ui:dock] <DockLayer> must be used inside <DockCrossfade> (or <DockLayerGroup>)"), { KEY: vt } = _t;
1320
- function yt(e) {
1321
- _t.provide(e);
1351
+ var ut = st.use, dt = s(f, "[glass-ui:dock] <DockLayer> must be used inside <DockCrossfade> (or <DockLayerGroup>)"), { KEY: ft } = dt;
1352
+ function pt(e) {
1353
+ dt.provide(e);
1322
1354
  }
1323
- var bt = _t.use, xt = /* @__PURE__ */ L({
1355
+ var mt = dt.use, ht = /* @__PURE__ */ I({
1324
1356
  __name: "DockCrossfade",
1325
1357
  props: {
1326
1358
  active: {},
1327
1359
  reserve: { default: "block" }
1328
1360
  },
1329
1361
  setup(e, { expose: t }) {
1330
- let n = e, r = q(null), i = q(/* @__PURE__ */ new Map()), a = j(() => [...i.value.values()].map(({ id: e, label: t, icon: n }) => ({
1362
+ let n = e, r = K(null), i = K(/* @__PURE__ */ new Map()), a = A(() => [...i.value.values()].map(({ id: e, label: t, icon: n }) => ({
1331
1363
  id: e,
1332
1364
  label: t,
1333
1365
  icon: n
@@ -1341,31 +1373,31 @@ var bt = _t.use, xt = /* @__PURE__ */ L({
1341
1373
  let t = new Map(i.value);
1342
1374
  t.delete(e), i.value = t, p();
1343
1375
  }
1344
- let c = j(() => n.active), l = q(null);
1345
- yt({
1376
+ let c = A(() => n.active), u = K(null);
1377
+ pt({
1346
1378
  register: o,
1347
1379
  unregister: s,
1348
1380
  activeId: c,
1349
- leavingId: l,
1381
+ leavingId: u,
1350
1382
  faces: a
1351
1383
  });
1352
- let u = q(0), f = j(() => n.reserve === "inline" ? "min-inline-size" : "min-block-size");
1384
+ let d = K(0), f = A(() => n.reserve === "inline" ? "min-inline-size" : "min-block-size");
1353
1385
  function p() {
1354
1386
  let e = 0;
1355
1387
  for (let { el: t } of i.value.values()) {
1356
1388
  let r = n.reserve === "inline" ? t.scrollWidth : t.scrollHeight;
1357
1389
  r > e && (e = r);
1358
1390
  }
1359
- e > u.value && (u.value = e);
1391
+ e > d.value && (d.value = e);
1360
1392
  }
1361
- let m = j(() => u.value > 0 ? {
1362
- [f.value]: `${u.value}px`,
1363
- "--dock-crossfade-peak": `${u.value}px`
1393
+ let m = A(() => d.value > 0 ? {
1394
+ [f.value]: `${d.value}px`,
1395
+ "--dock-crossfade-peak": `${d.value}px`
1364
1396
  } : void 0);
1365
- b(r, () => p());
1366
- let h = Ie({
1367
- response: d.response,
1368
- dampingFraction: d.dampingFraction
1397
+ x(r, () => p());
1398
+ let h = Ae({
1399
+ response: l.response,
1400
+ dampingFraction: l.dampingFraction
1369
1401
  });
1370
1402
  function g(e) {
1371
1403
  return e ? i.value.get(e)?.el : void 0;
@@ -1379,58 +1411,58 @@ var bt = _t.use, xt = /* @__PURE__ */ L({
1379
1411
  function y(e) {
1380
1412
  return e < 0 ? 0 : e > 1 ? 1 : e;
1381
1413
  }
1382
- let x = _e("(prefers-reduced-motion: reduce)"), S = null, C = 1;
1383
- Z(x, (e) => {
1414
+ let b = fe("(prefers-reduced-motion: reduce)"), S = null, C = 1;
1415
+ Z(b, (e) => {
1384
1416
  e && (h.dispose(), S?.());
1385
1417
  });
1386
1418
  async function w(e, t) {
1387
1419
  if (typeof document > "u") return;
1388
1420
  let n = g(e), r = document.activeElement;
1389
- !n || !r || !n.contains(r) || (await V(), (g(t) ?? document.body).focus?.());
1421
+ !n || !r || !n.contains(r) || (await z(), (g(t) ?? document.body).focus?.());
1390
1422
  }
1391
1423
  return Z(c, (e, t) => {
1392
1424
  if (e === t) return;
1393
1425
  p();
1394
1426
  let n = g(e), i = g(t);
1395
1427
  if (!n || !i) {
1396
- l.value = null, v(e), C = 1;
1428
+ u.value = null, v(e), C = 1;
1397
1429
  return;
1398
1430
  }
1399
- let a = l.value, o = Number.parseFloat(n.style.getPropertyValue("--dock-t")), s = Number.parseFloat(i.style.getPropertyValue("--dock-t")), c = a === e && Number.isFinite(o) ? 1 - y(o) : 0, u = Number.isFinite(s) ? y(s) : 1;
1400
- a && a !== e && a !== t && v(a), l.value = t, _(e, c), _(t, 1 - u), w(t, e), r.value?.setAttribute("data-crossfading", "");
1431
+ let a = u.value, o = Number.parseFloat(n.style.getPropertyValue("--dock-t")), s = Number.parseFloat(i.style.getPropertyValue("--dock-t")), c = a === e && Number.isFinite(o) ? 1 - y(o) : 0, l = Number.isFinite(s) ? y(s) : 1;
1432
+ a && a !== e && a !== t && v(a), u.value = t, _(e, c), _(t, 1 - l), w(t, e), r.value?.setAttribute("data-crossfading", "");
1401
1433
  let d = () => {
1402
- v(e), v(t), r.value?.removeAttribute("data-crossfading"), l.value = null, C = 1, S === d && (S = null);
1434
+ v(e), v(t), r.value?.removeAttribute("data-crossfading"), u.value = null, C = 1, S === d && (S = null);
1403
1435
  };
1404
- if (S = d, x.value) {
1436
+ if (S = d, b.value) {
1405
1437
  d();
1406
1438
  return;
1407
1439
  }
1408
- let f = u > .001 ? -C / u : 0;
1440
+ let f = l > .001 ? -C / l : 0;
1409
1441
  C = 1 - c, h.playTo(0, 1, {
1410
1442
  inheritVelocityScale: f,
1411
1443
  onFrame: (n) => {
1412
- _(e, y(c + (1 - c) * n)), _(t, y(1 - u * (1 - n)));
1444
+ _(e, y(c + (1 - c) * n)), _(t, y(1 - l * (1 - n)));
1413
1445
  },
1414
1446
  onSettle: d
1415
1447
  });
1416
- }), U(() => {
1448
+ }), H(() => {
1417
1449
  h.dispose(), S = null;
1418
- }), t({ faces: a }), (e, t) => (G(), P("div", {
1450
+ }), t({ faces: a }), (e, t) => (W(), N("div", {
1419
1451
  ref_key: "rootEl",
1420
1452
  ref: r,
1421
1453
  class: "dock-crossfade",
1422
- style: ee(m.value)
1423
- }, [J(e.$slots, "default")], 4));
1454
+ style: V(m.value)
1455
+ }, [q(e.$slots, "default")], 4));
1424
1456
  }
1425
- }), St = ["data-motion"], Ct = ["aria-orientation"], wt = [
1457
+ }), gt = ["data-motion"], _t = ["aria-orientation"], vt = [
1426
1458
  "id",
1427
1459
  "tabindex",
1428
1460
  "aria-controls",
1429
1461
  "aria-label",
1430
1462
  "onClick"
1431
- ], Tt = { key: 1 }, Et = { key: 2 }, Dt = /* @__PURE__ */ L({
1463
+ ], yt = { key: 1 }, bt = { key: 2 }, xt = /* @__PURE__ */ I({
1432
1464
  __name: "DockLayerGroup",
1433
- props: /*@__PURE__*/ z({
1465
+ props: /*@__PURE__*/ L({
1434
1466
  orientation: {},
1435
1467
  showSwitcher: {
1436
1468
  type: Boolean,
@@ -1444,27 +1476,27 @@ var bt = _t.use, xt = /* @__PURE__ */ L({
1444
1476
  }),
1445
1477
  emits: ["update:active"],
1446
1478
  setup(e) {
1447
- let t = e, n = o(() => t.motion), r = se(e, "active"), i = v(), a = j(() => t.orientation ?? i?.orientation.value ?? "horizontal"), s = X("crossfade"), c = j(() => s.value?.faces ?? []), l = j(() => a.value === "vertical" ? "horizontal" : "vertical"), u = j(() => l.value === "vertical"), d = q(null), f = q(null), p = q([]), m = T({
1448
- options: j(() => c.value.map((e) => ({ value: e.id }))),
1479
+ let t = e, n = b(() => t.motion), r = ae(e, "active"), i = y(), a = A(() => t.orientation ?? i?.orientation.value ?? "horizontal"), o = X("crossfade"), s = A(() => o.value?.faces ?? []), c = A(() => a.value === "vertical" ? "horizontal" : "vertical"), l = A(() => c.value === "vertical"), u = K(null), d = K(null), f = K([]), p = T({
1480
+ options: A(() => s.value.map((e) => ({ value: e.id }))),
1449
1481
  model: r,
1450
1482
  mode: "single",
1451
1483
  role: "tablist",
1452
- vertical: u,
1453
- containerRef: d,
1454
- indicatorRef: f,
1455
- buttonRefs: p
1456
- }), g = j(() => t.showSwitcher && c.value.length > 1), _ = oe(), y = (e) => e.replace(/[^a-zA-Z0-9_-]/g, ""), b = (e) => `dock-tab-${_}-${y(e)}`, x = (e) => `dock-panel-${_}-${y(e)}`;
1457
- ht({
1458
- isTablist: g,
1459
- tabId: b,
1484
+ vertical: l,
1485
+ containerRef: u,
1486
+ indicatorRef: d,
1487
+ buttonRefs: f
1488
+ }), m = A(() => t.showSwitcher && s.value.length > 1), h = ie(), _ = (e) => e.replace(/[^a-zA-Z0-9_-]/g, ""), v = (e) => `dock-tab-${h}-${_(e)}`, x = (e) => `dock-panel-${h}-${_(e)}`;
1489
+ lt({
1490
+ isTablist: m,
1491
+ tabId: v,
1460
1492
  panelId: x
1461
1493
  });
1462
- let S = j(() => u.value ? "y" : "x");
1494
+ let S = A(() => l.value ? "y" : "x");
1463
1495
  function C() {
1464
- let e = d.value;
1496
+ let e = u.value;
1465
1497
  if (!e) return [];
1466
1498
  let t = Array.from(e.querySelectorAll(".dock-layer-tab"));
1467
- return c.value.map((e, n) => {
1499
+ return s.value.map((e, n) => {
1468
1500
  let r = t[n]?.getBoundingClientRect(), i = r ? S.value === "y" ? r.top + r.height / 2 : r.left + r.width / 2 : 0;
1469
1501
  return {
1470
1502
  value: e.id,
@@ -1473,8 +1505,8 @@ var bt = _t.use, xt = /* @__PURE__ */ L({
1473
1505
  });
1474
1506
  }
1475
1507
  let w = E({
1476
- handle: d,
1477
- surface: f,
1508
+ handle: u,
1509
+ surface: d,
1478
1510
  axis: () => S.value,
1479
1511
  snapTargets: C,
1480
1512
  onSnap: (e) => {
@@ -1482,79 +1514,79 @@ var bt = _t.use, xt = /* @__PURE__ */ L({
1482
1514
  }
1483
1515
  });
1484
1516
  Z(() => [
1485
- c.value.length,
1486
- l.value,
1517
+ s.value.length,
1518
+ c.value,
1487
1519
  n.armed.value
1488
1520
  ], () => {
1489
- n.armed.value && V(() => w.refresh());
1490
- }), te(() => {
1491
- n.armed.value && V(() => w.refresh());
1521
+ n.armed.value && z(() => w.refresh());
1522
+ }), ee(() => {
1523
+ n.armed.value && z(() => w.refresh());
1492
1524
  });
1493
1525
  function D(e) {
1494
1526
  return typeof e == "object" && !!e || typeof e == "function";
1495
1527
  }
1496
- let O = h(() => i);
1497
- function k() {
1528
+ let O = g(() => i);
1529
+ function I() {
1498
1530
  O.acquire();
1499
1531
  }
1500
1532
  function L(e) {
1501
1533
  let t = e.relatedTarget, n = e.currentTarget;
1502
1534
  t && n?.contains(t) || O.release();
1503
1535
  }
1504
- return (t, i) => (G(), P("div", {
1505
- class: H(["dock-layer-group", [a.value, `switcher-${e.switcherPosition}`]]),
1536
+ return (t, i) => (W(), N("div", {
1537
+ class: B(["dock-layer-group", [a.value, `switcher-${e.switcherPosition}`]]),
1506
1538
  "data-motion": Y(n).dataMotion.value,
1507
- style: ee(Y(n).hostStyle.value)
1508
- }, [g.value ? (G(), P("div", {
1539
+ style: V(Y(n).hostStyle.value)
1540
+ }, [m.value ? (W(), N("div", {
1509
1541
  key: 0,
1510
1542
  ref_key: "switcherListEl",
1511
- ref: d,
1543
+ ref: u,
1512
1544
  role: "tablist",
1513
- class: H(["dock-layer-switcher", [e.switcherPosition, Y(n).armed.value && "glass-drag-grabbable"]]),
1514
- "aria-orientation": l.value,
1515
- onKeydown: i[0] ||= (...e) => Y(m).onKeydown && Y(m).onKeydown(...e),
1516
- onFocusin: k,
1545
+ class: B(["dock-layer-switcher", [e.switcherPosition, Y(n).armed.value && "glass-drag-grabbable"]]),
1546
+ "aria-orientation": c.value,
1547
+ onKeydown: i[0] ||= (...e) => Y(p).onKeydown && Y(p).onKeydown(...e),
1548
+ onFocusin: I,
1517
1549
  onFocusout: L
1518
- }, [(G(!0), P(A, null, re(c.value, (e, t) => (G(), P("button", B({
1550
+ }, [(W(!0), N(k, null, ne(s.value, (e, t) => (W(), N("button", R({
1519
1551
  key: e.id,
1520
1552
  ref_for: !0,
1521
1553
  ref: (e) => {
1522
- e && (p.value[t] = e);
1554
+ e && (f.value[t] = e);
1523
1555
  },
1524
1556
  type: "button",
1525
1557
  class: "dock-layer-tab",
1526
- id: b(e.id),
1527
- tabindex: Y(m).rovingTabindex(t)
1528
- }, { ref_for: !0 }, Y(m).itemAttrs(e.id), {
1558
+ id: v(e.id),
1559
+ tabindex: Y(p).rovingTabindex(t)
1560
+ }, { ref_for: !0 }, Y(p).itemAttrs(e.id), {
1529
1561
  "aria-controls": x(e.id),
1530
1562
  "aria-label": e.label ?? e.id,
1531
- onClick: (n) => Y(m).select(e.id, t)
1532
- }), [D(e.icon) ? (G(), M(ie(e.icon), {
1563
+ onClick: (n) => Y(p).select(e.id, t)
1564
+ }), [D(e.icon) ? (W(), j(re(e.icon), {
1533
1565
  key: 0,
1534
1566
  class: "size-4"
1535
- })) : typeof e.icon == "string" ? (G(), P("span", Tt, ae(e.icon), 1)) : (G(), P("span", Et, ae((e.label ?? e.id).charAt(0)), 1))], 16, wt))), 128)), F("div", {
1567
+ })) : typeof e.icon == "string" ? (W(), N("span", yt, J(e.icon), 1)) : (W(), N("span", bt, J((e.label ?? e.id).charAt(0)), 1))], 16, vt))), 128)), P("div", {
1536
1568
  ref_key: "switcherIndicatorEl",
1537
- ref: f,
1538
- class: H(["dock-layer-tab-indicator", Y(n).armed.value && Y(w).dragging.value && "glass-drag-lift"]),
1539
- style: ee(Y(m).singleSliderStyle.value),
1569
+ ref: d,
1570
+ class: B(["dock-layer-tab-indicator", Y(n).armed.value && Y(w).dragging.value && "glass-drag-lift"]),
1571
+ style: V(Y(p).singleSliderStyle.value),
1540
1572
  "aria-hidden": "true"
1541
- }, null, 6)], 42, Ct)) : N("", !0), I(xt, {
1573
+ }, null, 6)], 42, _t)) : M("", !0), F(ht, {
1542
1574
  ref_key: "crossfade",
1543
- ref: s,
1575
+ ref: o,
1544
1576
  active: r.value
1545
1577
  }, {
1546
- default: Q(() => [J(t.$slots, "default")]),
1578
+ default: oe(() => [q(t.$slots, "default")]),
1547
1579
  _: 3
1548
- }, 8, ["active"])], 14, St));
1580
+ }, 8, ["active"])], 14, gt));
1549
1581
  }
1550
- }), Ot = [
1582
+ }), St = [
1551
1583
  "role",
1552
1584
  "id",
1553
1585
  "aria-labelledby",
1554
1586
  "inert",
1555
1587
  "aria-hidden",
1556
1588
  "tabindex"
1557
- ], kt = { class: "dock-face-content" }, At = /* @__PURE__ */ L({
1589
+ ], Ct = { class: "dock-face-content" }, wt = /* @__PURE__ */ I({
1558
1590
  __name: "DockLayer",
1559
1591
  props: {
1560
1592
  id: {},
@@ -1562,8 +1594,8 @@ var bt = _t.use, xt = /* @__PURE__ */ L({
1562
1594
  icon: {}
1563
1595
  },
1564
1596
  setup(e) {
1565
- let t = e, n = bt(), r = X("hostEl");
1566
- te(() => {
1597
+ let t = e, n = mt(), r = X("hostEl");
1598
+ ee(() => {
1567
1599
  r.value && n.register({
1568
1600
  id: t.id,
1569
1601
  label: t.label,
@@ -1581,12 +1613,12 @@ var bt = _t.use, xt = /* @__PURE__ */ L({
1581
1613
  icon: t.icon,
1582
1614
  el: r.value
1583
1615
  });
1584
- }), U(() => n.unregister(t.id));
1585
- let i = j(() => n.activeId.value === t.id), a = j(() => n.leavingId.value === t.id), o = gt(), s = j(() => o?.isTablist.value ?? !1), c = j(() => s.value ? o.panelId(t.id) : void 0), l = j(() => s.value ? o.tabId(t.id) : void 0);
1586
- return (e, t) => (G(), P("div", {
1616
+ }), H(() => n.unregister(t.id));
1617
+ let i = A(() => n.activeId.value === t.id), a = A(() => n.leavingId.value === t.id), o = ut(), 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);
1618
+ return (e, t) => (W(), N("div", {
1587
1619
  ref_key: "hostEl",
1588
1620
  ref: r,
1589
- class: H(["dock-face", {
1621
+ class: B(["dock-face", {
1590
1622
  "is-active": i.value,
1591
1623
  "is-leaving": a.value
1592
1624
  }]),
@@ -1596,9 +1628,9 @@ var bt = _t.use, xt = /* @__PURE__ */ L({
1596
1628
  inert: !i.value || void 0,
1597
1629
  "aria-hidden": !i.value || void 0,
1598
1630
  tabindex: i.value ? -1 : void 0
1599
- }, [F("div", kt, [J(e.$slots, "default")])], 10, Ot));
1631
+ }, [P("div", Ct, [q(e.$slots, "default")])], 10, St));
1600
1632
  }
1601
- }), jt = /* @__PURE__ */ L({
1633
+ }), Tt = /* @__PURE__ */ I({
1602
1634
  __name: "DockControl",
1603
1635
  props: {
1604
1636
  shape: { default: "icon" },
@@ -1629,26 +1661,26 @@ var bt = _t.use, xt = /* @__PURE__ */ L({
1629
1661
  ] }
1630
1662
  },
1631
1663
  setup(t) {
1632
- let r = t, o = j(() => r.shape === "tab"), s = j(() => o.value ? e("dock-tab-button glass-specular-track", r.class) : e("dock-icon-button glass-specular-track glass-capsule-hover", { "glass-capsule": r.active }, { "dock-icon-button--compact": r.compact }, r.class)), c = j(() => ({
1633
- [y]: "",
1664
+ let r = t, i = A(() => r.shape === "tab"), s = A(() => i.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(() => ({
1665
+ [u]: "",
1634
1666
  ...r.active === void 0 ? {} : {
1635
1667
  "aria-pressed": String(r.active),
1636
1668
  ...r.active ? { "data-active": "" } : {}
1637
1669
  },
1638
1670
  ...r.disabled ? { "aria-disabled": "true" } : {}
1639
- })), l = j(() => !r.asChild && r.as === "button" ? { type: r.type } : {}), u = i("press"), d = a({
1640
- disabled: () => r.disabled || o.value,
1671
+ })), l = A(() => !r.asChild && r.as === "button" ? { type: r.type } : {}), d = a("press"), f = o({
1672
+ disabled: () => r.disabled || i.value,
1641
1673
  squish: !0,
1642
- response: u.response,
1643
- dampingFraction: u.dampingFraction,
1674
+ response: d.response,
1675
+ dampingFraction: d.dampingFraction,
1644
1676
  pressVar: "--dock-press-t",
1645
1677
  shrinkDepth: .04,
1646
1678
  maxStretch: 1.03
1647
- }), f = j(() => o.value ? {} : { ...d.pressStyle.value });
1648
- function p(e) {
1679
+ }), p = A(() => i.value ? {} : { ...f.pressStyle.value });
1680
+ function m(e) {
1649
1681
  r.disabled && (e.preventDefault(), e.stopImmediatePropagation());
1650
1682
  }
1651
- return (e, r) => ce((G(), M(Y(ue), B({
1683
+ return (e, r) => se((W(), j(Y(ce), R({
1652
1684
  as: t.as,
1653
1685
  "as-child": t.asChild
1654
1686
  }, {
@@ -1656,19 +1688,19 @@ var bt = _t.use, xt = /* @__PURE__ */ L({
1656
1688
  ...c.value
1657
1689
  }, {
1658
1690
  class: s.value,
1659
- style: f.value,
1660
- "data-press-armed": !o.value && Y(d).armed ? "" : void 0,
1661
- onPointerdown: Y(d).handlers.onPointerdown,
1662
- onPointerup: Y(d).handlers.onPointerup,
1663
- onPointercancel: Y(d).handlers.onPointercancel,
1664
- onPointerleave: Y(d).handlers.onPointerleave,
1665
- onPointerenter: Y(d).handlers.onPointerenter,
1666
- onKeydown: Y(d).handlers.onKeydown,
1667
- onKeyup: Y(d).handlers.onKeyup,
1668
- onBlur: Y(d).handlers.onBlur,
1669
- onClickCapture: p
1691
+ style: p.value,
1692
+ "data-press-armed": !i.value && Y(f).armed ? "" : void 0,
1693
+ onPointerdown: Y(f).handlers.onPointerdown,
1694
+ onPointerup: Y(f).handlers.onPointerup,
1695
+ onPointercancel: Y(f).handlers.onPointercancel,
1696
+ onPointerleave: Y(f).handlers.onPointerleave,
1697
+ onPointerenter: Y(f).handlers.onPointerenter,
1698
+ onKeydown: Y(f).handlers.onKeydown,
1699
+ onKeyup: Y(f).handlers.onKeyup,
1700
+ onBlur: Y(f).handlers.onBlur,
1701
+ onClickCapture: m
1670
1702
  }), {
1671
- default: Q(() => [J(e.$slots, "default")]),
1703
+ default: oe(() => [q(e.$slots, "default")]),
1672
1704
  _: 3
1673
1705
  }, 16, [
1674
1706
  "as",
@@ -1686,83 +1718,7 @@ var bt = _t.use, xt = /* @__PURE__ */ L({
1686
1718
  "onBlur"
1687
1719
  ])), [[Y(n)]]);
1688
1720
  }
1689
- }), Mt = /* @__PURE__ */ L({
1690
- inheritAttrs: !1,
1691
- __name: "DockTrigger",
1692
- props: {
1693
- for: { default: "select" },
1694
- class: { type: [
1695
- Boolean,
1696
- null,
1697
- String,
1698
- Object,
1699
- Array
1700
- ] }
1701
- },
1702
- setup(t) {
1703
- let r = t, i = { [y]: "" };
1704
- function a(e) {
1705
- e.preventDefault(), e.stopImmediatePropagation();
1706
- }
1707
- let o = (e, { attrs: t, slots: n }) => {
1708
- let { disabled: r, ...i } = t, o = r != null && r !== !1;
1709
- return R("button", {
1710
- ...i,
1711
- type: i.type ?? "button",
1712
- ...o ? {
1713
- "aria-disabled": "true",
1714
- onClickCapture: a
1715
- } : {}
1716
- }, n.default?.());
1717
- };
1718
- o.inheritAttrs = !1;
1719
- let s = j(() => e("dock-trigger", r.for === "select" && "dock-select-trigger", r.for !== "select" && "dock-dropdown-trigger", r.class));
1720
- return (e, t) => r.for === "select" ? ce((G(), M(Y(fe), B({ key: 0 }, {
1721
- ...e.$attrs,
1722
- ...i
1723
- }, {
1724
- "as-child": "",
1725
- class: s.value
1726
- }), {
1727
- default: Q(() => [I(o, null, {
1728
- default: Q(() => [J(e.$slots, "default"), I(Y(de), { "as-child": "" }, {
1729
- default: Q(() => [J(e.$slots, "icon", {}, () => [I(Y(pe), {
1730
- class: "dock-select-trigger__chevron",
1731
- "aria-hidden": "true"
1732
- })])]),
1733
- _: 3
1734
- })]),
1735
- _: 3
1736
- })]),
1737
- _: 3
1738
- }, 16, ["class"])), [[Y(n)]]) : r.for === "dropdown" ? ce((G(), M(w, B({ key: 1 }, {
1739
- ...e.$attrs,
1740
- ...i
1741
- }, {
1742
- "as-child": "",
1743
- action: "pointerdown",
1744
- class: s.value
1745
- }), {
1746
- default: Q(() => [I(o, null, {
1747
- default: Q(() => [J(e.$slots, "default")]),
1748
- _: 3
1749
- })]),
1750
- _: 3
1751
- }, 16, ["class"])), [[Y(n)]]) : ce((G(), M(Y(le), B({ key: 2 }, {
1752
- ...e.$attrs,
1753
- ...i
1754
- }, {
1755
- "as-child": "",
1756
- class: s.value
1757
- }), {
1758
- default: Q(() => [I(o, null, {
1759
- default: Q(() => [J(e.$slots, "default")]),
1760
- _: 3
1761
- })]),
1762
- _: 3
1763
- }, 16, ["class"])), [[Y(n)]]);
1764
- }
1765
- }), Nt = /* @__PURE__ */ L({
1721
+ }), Et = /* @__PURE__ */ I({
1766
1722
  __name: "DockBackgroundToggle",
1767
1723
  props: {
1768
1724
  paused: {
@@ -1774,22 +1730,22 @@ var bt = _t.use, xt = /* @__PURE__ */ L({
1774
1730
  },
1775
1731
  emits: ["update:paused"],
1776
1732
  setup(e, { emit: t }) {
1777
- let n = e, r = t, i = j(() => n.paused ? n.playLabel : n.pauseLabel);
1733
+ let n = e, r = t, i = A(() => n.paused ? n.playLabel : n.pauseLabel);
1778
1734
  function a() {
1779
1735
  r("update:paused", !n.paused);
1780
1736
  }
1781
- return (t, n) => (G(), M(jt, {
1737
+ return (t, n) => (W(), j(Tt, {
1782
1738
  type: "button",
1783
1739
  active: e.paused,
1784
1740
  "aria-pressed": e.paused,
1785
1741
  "aria-label": i.value,
1786
1742
  onClick: a
1787
1743
  }, {
1788
- default: Q(() => [e.paused ? (G(), M(Y(he), {
1744
+ default: oe(() => [e.paused ? (W(), j(Y(ue), {
1789
1745
  key: 0,
1790
1746
  size: 18,
1791
1747
  "aria-hidden": "true"
1792
- })) : (G(), M(Y(me), {
1748
+ })) : (W(), j(Y(le), {
1793
1749
  key: 1,
1794
1750
  size: 18,
1795
1751
  "aria-hidden": "true"
@@ -1801,30 +1757,30 @@ var bt = _t.use, xt = /* @__PURE__ */ L({
1801
1757
  "aria-label"
1802
1758
  ]));
1803
1759
  }
1804
- }), Pt = [
1760
+ }), Dt = [
1805
1761
  "data-orientation",
1806
1762
  "data-dock-hairline",
1807
1763
  "aria-orientation"
1808
- ], Ft = /* @__PURE__ */ L({
1764
+ ], Ot = /* @__PURE__ */ I({
1809
1765
  __name: "DockSeparator",
1810
1766
  props: { anchor: {
1811
1767
  type: Boolean,
1812
1768
  default: !1
1813
1769
  } },
1814
1770
  setup(e) {
1815
- let t = v(), n = j(() => t?.orientation.value ?? "horizontal"), r = j(() => n.value), i = j(() => n.value === "vertical" ? "horizontal" : "vertical");
1816
- return (t, n) => (G(), P("div", {
1817
- class: H(["dock-separator", { "dock-hairline": e.anchor }]),
1771
+ let t = y(), n = A(() => t?.orientation.value ?? "horizontal"), r = A(() => n.value), i = A(() => n.value === "vertical" ? "horizontal" : "vertical");
1772
+ return (t, n) => (W(), N("div", {
1773
+ class: B(["dock-separator", { "dock-hairline": e.anchor }]),
1818
1774
  role: "separator",
1819
1775
  "data-orientation": r.value,
1820
1776
  "data-dock-hairline": e.anchor || void 0,
1821
1777
  "aria-orientation": i.value
1822
- }, null, 10, Pt));
1778
+ }, null, 10, Dt));
1823
1779
  }
1824
1780
  });
1825
1781
  //#endregion
1826
1782
  //#region src/composables/search/match.ts
1827
- function It(e, t) {
1783
+ function kt(e, t) {
1828
1784
  let n = e.length, r = t.length;
1829
1785
  if (n === 0) return {
1830
1786
  score: 0,
@@ -1848,11 +1804,11 @@ function It(e, t) {
1848
1804
  matches: i
1849
1805
  });
1850
1806
  }
1851
- function Lt(e, t) {
1807
+ function At(e, t) {
1852
1808
  if (!t) return null;
1853
1809
  let n = 0, r = [];
1854
1810
  for (let i of e) {
1855
- let e = It(i, t);
1811
+ let e = kt(i, t);
1856
1812
  if (!e) return null;
1857
1813
  n += e.score;
1858
1814
  for (let t of e.matches) r.push(t);
@@ -1862,7 +1818,7 @@ function Lt(e, t) {
1862
1818
  matches: r
1863
1819
  };
1864
1820
  }
1865
- function Rt(e, t) {
1821
+ function jt(e, t) {
1866
1822
  let n = null, r = [], i = [
1867
1823
  [t._lc.label, 12],
1868
1824
  [t._lc.type, 10],
@@ -1870,7 +1826,7 @@ function Rt(e, t) {
1870
1826
  ];
1871
1827
  for (let [a, o] of i) {
1872
1828
  if (!a) continue;
1873
- let i = Lt(e, a);
1829
+ let i = At(e, a);
1874
1830
  if (!i) continue;
1875
1831
  let s = i.score * o;
1876
1832
  (n === null || s > n) && (n = s, r = a === t._lc.label ? i.matches : []);
@@ -1880,7 +1836,7 @@ function Rt(e, t) {
1880
1836
  matches: r
1881
1837
  };
1882
1838
  }
1883
- function zt(e) {
1839
+ function Mt(e) {
1884
1840
  return e.map((e) => ({
1885
1841
  item: e,
1886
1842
  _lc: {
@@ -1890,15 +1846,15 @@ function zt(e) {
1890
1846
  }
1891
1847
  }));
1892
1848
  }
1893
- var Bt = /* @__PURE__ */ new WeakMap();
1894
- function Vt(e) {
1895
- let t = Bt.get(e);
1896
- return t || (t = /* @__PURE__ */ new Map(), Bt.set(e, t)), t;
1849
+ var Nt = /* @__PURE__ */ new WeakMap();
1850
+ function Pt(e) {
1851
+ let t = Nt.get(e);
1852
+ return t || (t = /* @__PURE__ */ new Map(), Nt.set(e, t)), t;
1897
1853
  }
1898
- function Ht(e, t, n = 30) {
1854
+ function Ft(e, t, n = 30) {
1899
1855
  let r = t.toLowerCase().trim();
1900
1856
  if (!r) return [];
1901
- let i = Vt(e), a = i.get(r);
1857
+ let i = Pt(e), a = i.get(r);
1902
1858
  if (a) return a.slice(0, n);
1903
1859
  i.size > 200 && i.clear();
1904
1860
  let o = r.split(/\s+/).filter(Boolean);
@@ -1917,7 +1873,7 @@ function Ht(e, t, n = 30) {
1917
1873
  }
1918
1874
  let c = [];
1919
1875
  for (let e of s) {
1920
- let t = Rt(o, e);
1876
+ let t = jt(o, e);
1921
1877
  t && c.push({
1922
1878
  item: e.item,
1923
1879
  score: t.score,
@@ -1926,17 +1882,17 @@ function Ht(e, t, n = 30) {
1926
1882
  }
1927
1883
  return c.sort((e, t) => t.score - e.score), i.set(r, c), c.slice(0, n);
1928
1884
  }
1929
- function Ut(e) {
1885
+ function It(e) {
1930
1886
  if (e) {
1931
- Bt.delete(e);
1887
+ Nt.delete(e);
1932
1888
  return;
1933
1889
  }
1934
- Bt = /* @__PURE__ */ new WeakMap();
1890
+ Nt = /* @__PURE__ */ new WeakMap();
1935
1891
  }
1936
1892
  //#endregion
1937
1893
  //#region src/composables/search/useFuzzySearch.ts
1938
- function Wt(e) {
1939
- let t = typeof e.items == "function" ? e.items : () => e.items, n = e.debounceMs ?? 120, r = e.maxResults ?? 30, i = q(""), a = q(!1), o = q(!1), s = q(0), c = q(""), l = j(() => t()), u = j(() => zt(l.value)), d;
1894
+ function Lt(e) {
1895
+ let t = typeof e.items == "function" ? e.items : () => e.items, n = e.debounceMs ?? 120, r = e.maxResults ?? 30, i = K(""), a = K(!1), o = K(!1), s = K(0), c = K(""), l = A(() => t()), u = A(() => Mt(l.value)), d;
1940
1896
  function f(e = d) {
1941
1897
  e !== void 0 && (clearTimeout(e), d === e && (d = void 0));
1942
1898
  }
@@ -1952,7 +1908,7 @@ function Wt(e) {
1952
1908
  }), Z(l, () => {
1953
1909
  f(), c.value = i.value, s.value = 0;
1954
1910
  }, { deep: !0 });
1955
- let p = j(() => Ht(u.value, c.value, r));
1911
+ let p = A(() => Ft(u.value, c.value, r));
1956
1912
  Z(p, () => {
1957
1913
  s.value = 0;
1958
1914
  });
@@ -1960,7 +1916,7 @@ function Wt(e) {
1960
1916
  e.onSelect?.(t), h();
1961
1917
  }
1962
1918
  function h() {
1963
- a.value = !1, o.value = !1, f(), i.value = "", c.value = "", s.value = 0, Ut(u.value);
1919
+ a.value = !1, o.value = !1, f(), i.value = "", c.value = "", s.value = 0, It(u.value);
1964
1920
  }
1965
1921
  function g() {
1966
1922
  a.value = !0;
@@ -1984,8 +1940,8 @@ function Wt(e) {
1984
1940
  break;
1985
1941
  }
1986
1942
  }
1987
- return W(() => {
1988
- f(), Ut(u.value);
1943
+ return U(() => {
1944
+ f(), It(u.value);
1989
1945
  }, !0), {
1990
1946
  query: i,
1991
1947
  results: p,
@@ -2001,13 +1957,13 @@ function Wt(e) {
2001
1957
  }
2002
1958
  //#endregion
2003
1959
  //#region src/components/dock/composables/useDockSearch.ts
2004
- function Gt(e) {
2005
- let { dockState: t } = e, n = e.debounceMs ?? 120, r = e.maxResults ?? 30, i = q([]), a = null, o = e.items ? e.items : () => i.value;
1960
+ function Rt(e) {
1961
+ let { dockState: t } = e, n = e.debounceMs ?? 120, r = e.maxResults ?? 30, i = K([]), a = null, o = e.items ? e.items : () => i.value;
2006
1962
  function s(t) {
2007
1963
  let n = t.item.id;
2008
1964
  e.ensureTargetWindow?.(n), e.scrollTo?.(n), e.onResultSelect?.(t);
2009
1965
  }
2010
- let c = Wt({
1966
+ let c = Lt({
2011
1967
  items: o,
2012
1968
  debounceMs: n,
2013
1969
  maxResults: r,
@@ -2028,7 +1984,7 @@ function Gt(e) {
2028
1984
  });
2029
1985
  });
2030
1986
  }
2031
- let l = j(() => {
1987
+ let l = A(() => {
2032
1988
  let e = c.query.value;
2033
1989
  if (!e) return "";
2034
1990
  let t = c.results.value[0];
@@ -2040,23 +1996,23 @@ function Gt(e) {
2040
1996
  let e = l.value;
2041
1997
  e && (c.query.value = c.query.value + e);
2042
1998
  }
2043
- let d = h(() => t), f = d.isHeld;
1999
+ let d = g(() => t), f = d.isHeld;
2044
2000
  function p() {
2045
2001
  f.value || (t.expand(), d.acquire(), c.open());
2046
2002
  }
2047
2003
  function m() {
2048
2004
  f.value && (c.close(), d.release());
2049
2005
  }
2050
- let g = null;
2051
- return e.collapseOnScroll && e.scrollContainer && (g = k(e.scrollContainer, {
2006
+ let h = null;
2007
+ return e.collapseOnScroll && e.scrollContainer && (h = O(e.scrollContainer, {
2052
2008
  collapseOnScroll: !0,
2053
2009
  chromeRef: e.chromeRef
2054
- })), W(() => {
2010
+ })), U(() => {
2055
2011
  a?.abort(), a = null;
2056
2012
  }), {
2057
2013
  fuzzy: c,
2058
2014
  autocompleteText: l,
2059
- scrollChrome: g,
2015
+ scrollChrome: h,
2060
2016
  armSearch: p,
2061
2017
  disarmSearch: m,
2062
2018
  acceptAutocomplete: u,
@@ -2064,4 +2020,4 @@ function Gt(e) {
2064
2020
  };
2065
2021
  }
2066
2022
  //#endregion
2067
- export { _ as DOCK_CONTEXT_KEY, Nt as DockBackgroundToggle, jt as DockControl, xt as DockCrossfade, At as DockLayer, Dt as DockLayerGroup, Ft as DockSeparator, Mt as DockTrigger, ft as GlassDock, l as provideDockContext, g as useDockContext, D as useDockCtaReceive, Gt as useDockSearch, v as useOptionalDockContext };
2023
+ export { v as DOCK_CONTEXT_KEY, Et as DockBackgroundToggle, Tt as DockControl, ht as DockCrossfade, wt as DockLayer, xt as DockLayerGroup, Ot as DockSeparator, ot as GlassDock, m as provideDockContext, _ as useDockContext, D as useDockCtaReceive, Rt as useDockSearch, y as useOptionalDockContext };