@mkbabb/glass-ui 10.1.3 → 11.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) 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/data-table/composables/useDataTableResponsive.d.ts +2 -0
  44. package/dist/components/deck/styles/capture.css +1 -1
  45. package/dist/components/dialog/DialogContent.vue.d.ts +2 -2
  46. package/dist/components/dialog/ModalOverlay.vue.d.ts +2 -2
  47. package/dist/components/dialog/ModalScrim.vue.d.ts +26 -0
  48. package/dist/components/dialog/styles.css +1 -1
  49. package/dist/components/dock/GlassDock.vue.d.ts +4 -1
  50. package/dist/components/dock/composables/useDockClickIntegrity.d.ts +4 -0
  51. package/dist/components/dock/composables/useDockShellProps.d.ts +34 -2
  52. package/dist/components/dock/composables/useDockState.d.ts +5 -0
  53. package/dist/components/dock/index.d.ts +1 -2
  54. package/dist/components/dock/styles/controls/icon-button.css +1 -1
  55. package/dist/components/dock/styles/controls/tab-button.css +1 -1
  56. package/dist/components/dock/styles/morph.css +1 -1
  57. package/dist/components/dock/styles/run.css +1 -1
  58. package/dist/components/dock/trigger.d.ts +1 -0
  59. package/dist/components/expandable-container/ExpandableContainer.vue.d.ts +30 -29
  60. package/dist/components/menu/ContextMenu.vue.d.ts +27 -0
  61. package/dist/components/menu/DropdownMenu.vue.d.ts +5 -23
  62. package/dist/components/menu/context.d.ts +18 -5
  63. package/dist/components/menu/family-click.d.ts +2 -0
  64. package/dist/components/menu/family-context.d.ts +2 -0
  65. package/dist/components/menu/index.d.ts +1 -1
  66. package/dist/components/sheet/SheetContent.vue.d.ts +2 -2
  67. package/dist/components/sortable-list/styles.css +1 -0
  68. package/dist/components/surface/Surface.vue.d.ts +4 -1
  69. package/dist/components/tabs/composables/useTabDragMorph.d.ts +4 -7
  70. package/dist/components/tabs/styles/segmented.css +1 -1
  71. package/dist/components/tabs/types.d.ts +7 -8
  72. package/dist/composables/dom/useResizeObserver.d.ts +3 -1
  73. package/dist/composables/glass/fieldPaint.d.ts +4 -0
  74. package/dist/composables/glass/useGlassBackdropLuminance.d.ts +7 -6
  75. package/dist/composables/glass/webgpu/useGpuSubstrate.d.ts +8 -0
  76. package/dist/composables/motion/core/motionTempo.d.ts +2 -1
  77. package/dist/composables/motion/morph/useDragMorph.d.ts +2 -2
  78. package/dist/composables/motion/morph/useSelectionGroup.d.ts +6 -25
  79. package/dist/composables/motion/morph/useSelectionIndicator.d.ts +8 -54
  80. package/dist/composables/motion/spring/useLiquidFlex.d.ts +3 -5
  81. package/dist/composables/motion/spring/useSpringMount.d.ts +0 -9
  82. package/dist/{configurator-CPxIo3q2.js → configurator-C1ZKEf1b.js} +7 -5
  83. package/dist/configurator.css +1 -0
  84. package/dist/configurator.js +1 -1
  85. package/dist/constants-DfrO-IaH.js +8 -0
  86. package/dist/constellation.css +1 -0
  87. package/dist/constellation.js +2 -1
  88. package/dist/control.css +1 -0
  89. 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
  90. package/dist/{createCanvasLifecycle-hJHobVTn.js → createCanvasLifecycle-DS0vEs_G.js} +76 -75
  91. package/dist/dark-mode-toggle.js +1 -1
  92. package/dist/{data-table-Cs93-uY7.js → data-table-lDykVYuo.js} +113 -107
  93. package/dist/data-table.css +1 -0
  94. package/dist/data-table.js +1 -1
  95. package/dist/{deck-Cm_VmyNL.js → deck-Bc-2mEKE.js} +1 -0
  96. package/dist/deck.js +1 -1
  97. package/dist/dialog.js +1 -1
  98. package/dist/dock-trigger.d.ts +1 -0
  99. package/dist/dock-trigger.js +88 -0
  100. package/dist/dock.js +677 -689
  101. package/dist/dom.js +1 -1
  102. package/dist/easing.js +4 -4
  103. package/dist/expandable-container-wS1awXGd.js +135 -0
  104. package/dist/expandable-container.css +1 -0
  105. package/dist/expandable-container.js +1 -1
  106. package/dist/{fading-scroll-CTeW3KNS.js → fading-scroll-D3Y20ibL.js} +2 -2
  107. package/dist/fading-scroll.js +1 -1
  108. package/dist/fieldPaint-Ci77oajZ.js +7 -0
  109. package/dist/fourier-field.css +1 -0
  110. package/dist/fourier-field.js +15 -13
  111. package/dist/glSetup-DMaDgrEj.js +577 -0
  112. package/dist/glass-ui.js +67 -66
  113. package/dist/handmark.css +1 -0
  114. package/dist/handmark.js +82 -71
  115. package/dist/index.css +1 -0
  116. package/dist/index.d.ts +1 -1
  117. package/dist/{input-eLZ_AU7l.js → input-BLF2pMHE.js} +1 -1
  118. package/dist/input.js +1 -1
  119. package/dist/{label-CE03H1KL.js → label-ryNPL7e6.js} +1 -0
  120. package/dist/label.css +1 -0
  121. package/dist/label.js +1 -1
  122. package/dist/labeled-field.css +1 -0
  123. package/dist/labeled-field.js +5 -4
  124. package/dist/{menu-DaYAZiVW.js → menu-C_l2Sslf.js} +162 -112
  125. package/dist/menu.js +3 -3
  126. package/dist/metric.js +1 -0
  127. package/dist/motion-core.js +138 -44
  128. package/dist/motion-lHDAQHEE.js +91 -0
  129. package/dist/motion.js +5 -5
  130. package/dist/motionTempo-DXdVbCWr.js +13 -0
  131. package/dist/music-staff.js +1 -0
  132. package/dist/{number-field-RP89046a.js → number-field-BXFUP49Z.js} +3 -2
  133. package/dist/number-field.css +1 -0
  134. package/dist/number-field.js +1 -1
  135. package/dist/pager-dots.css +1 -0
  136. package/dist/pager-dots.js +4 -3
  137. package/dist/participation-C5y5VZTN.js +52 -0
  138. package/dist/{popover-BdpoE4Ar.js → popover-DQUmwuAa.js} +3 -2
  139. package/dist/popover.js +1 -1
  140. package/dist/{progress-eVa-mc7J.js → progress-BUn0Bw7Z.js} +1 -0
  141. package/dist/progress.css +1 -0
  142. package/dist/progress.js +1 -1
  143. package/dist/{radio-group-B58Bz16F.js → radio-group-xdEy2tdi.js} +1 -0
  144. package/dist/radio-group.css +1 -0
  145. package/dist/radio-group.js +1 -1
  146. package/dist/root-scroll-lock-DJFrQhMa.js +22 -0
  147. package/dist/select-Dt5dXm87.js +309 -0
  148. package/dist/select.js +1 -1
  149. package/dist/{separator-D4EZM10u.js → separator-C4y9p_ky.js} +1 -0
  150. package/dist/separator.css +1 -0
  151. package/dist/separator.js +1 -1
  152. package/dist/sheet-DLqNUIZl.js +347 -0
  153. package/dist/sheet-width-DgXgJNa5.js +18 -0
  154. package/dist/sheet.js +2 -2
  155. package/dist/{slider-5uoY-cLG.js → slider-CZiKrWGg.js} +8 -8
  156. package/dist/slider.js +1 -1
  157. package/dist/sortable-list.js +2 -1
  158. package/dist/{status-dot-W4LFiJps.js → status-dot-BDZKcRxy.js} +2 -1
  159. package/dist/status-dot.css +1 -0
  160. package/dist/status-dot.js +1 -1
  161. package/dist/styles/components.css +1 -1
  162. package/dist/styles/glass/glass-capsule.css +1 -1
  163. package/dist/styles/glass/glass-chip.css +1 -1
  164. package/dist/styles/glass/mark.css +1 -1
  165. package/dist/styles/glass/overlay-plate.css +1 -1
  166. package/dist/styles/glass/surface-axis.css +1 -1
  167. package/dist/styles/index.css +1 -1
  168. package/dist/styles/theme/radius.css +1 -1
  169. package/dist/styles/tokens/color-radius.css +1 -1
  170. package/dist/styles/tokens/manifest.d.ts +1 -1
  171. package/dist/styles/tokens/scale-paper.css +1 -1
  172. package/dist/styles/utilities/base-misc.css +1 -1
  173. package/dist/surface.js +1 -1
  174. package/dist/{switch-BYUZ6g9G.js → switch-DLfGYU35.js} +1 -0
  175. package/dist/switch.css +1 -0
  176. package/dist/switch.js +1 -1
  177. package/dist/tabs-NgTRPGZx.js +229 -0
  178. package/dist/tabs.js +1 -1
  179. package/dist/textarea.js +1 -1
  180. package/dist/timeline.css +1 -0
  181. package/dist/timeline.js +4 -3
  182. package/dist/toggle-group-DgXcJGD6.js +129 -0
  183. package/dist/toggle-group.css +1 -0
  184. package/dist/toggle-group.js +1 -1
  185. package/dist/tokens.js +2 -0
  186. package/dist/{tooltip-CZVubnJf.js → tooltip-Do3qCw0r.js} +1 -1
  187. package/dist/tooltip.js +1 -1
  188. package/dist/typewriter.css +1 -0
  189. package/dist/typewriter.js +1 -0
  190. package/dist/uniformBridge-CJyy7NOn.js +150 -0
  191. package/dist/useBarShape-CmP35Z8o.js +24 -0
  192. package/dist/{useCanvas2D-CQRElMyE.js → useCanvas2D-Bhpwua98.js} +1 -1
  193. package/dist/{useDockCtaReceive-BSSgD6mu.js → useDockCtaReceive-Dn_-paqP.js} +1 -1
  194. package/dist/{useDragMorph-B363RUbF.js → useDragMorph-BEI74U0t.js} +51 -40
  195. package/dist/{color.wgsl-BTszLY39.js → useGpuSubstrate-Y5XAdU8d.js} +7 -7
  196. package/dist/{useLiquidPress-h1scrPtP.js → useLiquidPress-D5mjZC6U.js} +2 -2
  197. package/dist/{useResizeObserver-CdUlm2QZ.js → useResizeObserver-Bv3nN46q.js} +4 -7
  198. package/dist/useScrollChrome-DMP6kDI9.js +67 -0
  199. package/dist/useSelectionGroup-DAQv5Lb5.js +186 -0
  200. package/dist/{useSpring-9u2_shxV.js → useSpring-Aof0nTRt.js} +1 -1
  201. package/dist/useSpringMount-jgNkymRl.js +73 -0
  202. package/dist/wgpuSetup-CFuqd_RP.js +1278 -0
  203. package/package.json +8 -1
  204. package/dist/DialogContent-CwIBvou_.js +0 -157
  205. package/dist/DropdownMenuTrigger-CKRnhDSQ.js +0 -93
  206. package/dist/button-BOFTUPyU.js +0 -110
  207. package/dist/composables/motion/morph/eyeglass.d.ts +0 -141
  208. package/dist/expandable-container-CZUj9BzY.js +0 -142
  209. package/dist/glass-ui.css +0 -2
  210. package/dist/motion-BvV1_24p.js +0 -61
  211. package/dist/motionTempo-tscp92Nm.js +0 -7
  212. package/dist/participation-B7UFdgXB.js +0 -55
  213. package/dist/select-BiF0FCZf.js +0 -292
  214. package/dist/sheet-DmJxgAHc.js +0 -345
  215. package/dist/tabs-C5sC0fBE.js +0 -269
  216. package/dist/toggle-group-CC5b3o1R.js +0 -125
  217. package/dist/useScrollChrome-BJbWV32F.js +0 -162
  218. package/dist/useSelectionGroup-zsEwitF6.js +0 -291
  219. package/dist/useSpringMount-OA-0mTNv.js +0 -73
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./asElement-CRnm6A2v.js";
2
- import { t } from "./motionTempo-tscp92Nm.js";
2
+ import { t } from "./motionTempo-DXdVbCWr.js";
3
3
  import { n } from "./springPresets-Cbe0Voqg.js";
4
4
  import { t as r } from "./useLiquidFlex-TJZmRqyY.js";
5
5
  import { computed as i, nextTick as a, onScopeDispose as o, readonly as s, ref as c, watch as l } from "vue";
@@ -209,32 +209,34 @@ function S(e) {
209
209
  channels: { opacity: !1 },
210
210
  respectReducedMotion: !1
211
211
  }), m = c(!1), h = c(0), { response: g, dampingFraction: _ } = n("dock"), v = null, y = null;
212
- function S() {
212
+ function S(t) {
213
+ if (!M || m.value || !t.settled || j) return;
214
+ let n = A(t.value);
215
+ n != null && (j = !0, M = !1, e.onSnap(n), a(() => p.clear()));
216
+ }
217
+ function C() {
213
218
  if (v) return v;
214
- let n = new f({
219
+ let e = new f({
215
220
  response: g,
216
221
  dampingFraction: _,
217
222
  respectReducedMotion: d
218
223
  });
219
- return v = n, y = n.subscribe((r) => {
220
- if (h.value = r, A) {
221
- let e = r - T.value;
224
+ return v = e, y = e.subscribe((n) => {
225
+ if (h.value = n, M) {
226
+ let e = n - E.value;
222
227
  t() === "y" ? p.offset(0, e) : p.offset(e, 0);
223
228
  }
224
- if (d && x() || C.drive(E(r)), A && !m.value && n.settled && !k) {
225
- let t = O(r);
226
- t != null && (k = !0, A = !1, e.onSnap(t), a(() => p.clear()));
227
- }
228
- }), n.play(() => {}), n;
229
+ d && x() || w.drive(O(n)), S(e);
230
+ }), e.play(() => {}), e;
229
231
  }
230
- let C = r({
232
+ let w = r({
231
233
  from: 0,
232
234
  to: 1,
233
235
  axis: "width",
234
236
  squishLaw: "tanh",
235
237
  maxStretch: e.maxStretch ?? (() => 1.08)
236
- }), w = i(() => d && x() ? 1 : C.stretch.value), T = c(0);
237
- function E(e) {
238
+ }), T = i(() => d && x() ? 1 : w.stretch.value), E = c(0), D = 0;
239
+ function O(e) {
238
240
  let t = l();
239
241
  if (t.length < 2) return 0;
240
242
  let n = t[0].center, r = t[t.length - 1].center - n;
@@ -242,7 +244,7 @@ function S(e) {
242
244
  let i = (e - n) / r;
243
245
  return i < 0 ? 0 : i > 1 ? 1 : i;
244
246
  }
245
- function D(e) {
247
+ function k(e) {
246
248
  let t = l();
247
249
  if (t.length === 0) return null;
248
250
  let n = t[0], r = Math.abs(e - n.center);
@@ -252,41 +254,50 @@ function S(e) {
252
254
  }
253
255
  return n;
254
256
  }
255
- let O = (e) => D(e)?.value ?? null, k = !1, A = !1, j = null, M = null, N = null;
256
- function P() {
257
- N?.removeEventListener("pointerdown", F), N = null, M?.(), M = null, j?.detach();
258
- let n = e.handle.value;
259
- n && (N = n, j = new u({
260
- spring: S(),
261
- axis: t(),
262
- snap: l().map((e) => e.center)
263
- }), n.addEventListener("pointerdown", F), M = j.attach(n));
264
- }
265
- function F() {
266
- m.value = !0, k = !1, A = !0, T.value = S().value;
267
- }
257
+ let A = (e) => k(e)?.value ?? null, j = !1, M = !1, N = null, P = null, F = null;
268
258
  function I() {
269
- m.value &&= !1;
259
+ F?.removeEventListener("pointerdown", R, !0), F = null, P?.(), P = null, N?.detach();
260
+ let t = e.handle.value;
261
+ t && (F = t, t.addEventListener("pointerdown", R, !0), L(t));
270
262
  }
271
- function L() {
272
- typeof window > "u" || (window.addEventListener("pointerup", I), window.addEventListener("pointercancel", I));
263
+ function L(e) {
264
+ P?.(), N = new u({
265
+ spring: C(),
266
+ axis: t(),
267
+ snap: l().map((e) => e.center),
268
+ transform: (e) => e - D
269
+ }), P = N.attach(e);
273
270
  }
274
- function R() {
275
- typeof window > "u" || (window.removeEventListener("pointerup", I), window.removeEventListener("pointercancel", I));
271
+ function R(n) {
272
+ if (m.value) return;
273
+ let r = n.currentTarget, i = (e.surface ?? e.handle).value;
274
+ if (!i) return;
275
+ m.value = !0, j = !1, M = !0, p.offset(0, 0);
276
+ let a = i.getBoundingClientRect(), o = t() === "y", s = o ? a.top + a.height / 2 : a.left + a.width / 2;
277
+ E.value = s, D = (o ? n.clientY : n.clientX) - s, L(r);
276
278
  }
277
279
  function z() {
278
- m.value || P();
280
+ m.value && (m.value = !1, v && (!v.settled && v.value === v.target && v.snap(), S(v)));
279
281
  }
280
- P(), L();
281
282
  function B() {
282
- N?.removeEventListener("pointerdown", F), N = null, M?.(), M = null, R(), y?.(), y = null, v?.dispose(), v = null, j?.dispose(), j = null, p.cancel(), p.clear();
283
+ typeof window > "u" || (window.addEventListener("pointerup", z), window.addEventListener("pointercancel", z));
284
+ }
285
+ function V() {
286
+ typeof window > "u" || (window.removeEventListener("pointerup", z), window.removeEventListener("pointercancel", z));
287
+ }
288
+ function H() {
289
+ m.value || I();
290
+ }
291
+ I(), B();
292
+ function U() {
293
+ F?.removeEventListener("pointerdown", R, !0), F = null, P?.(), P = null, V(), y?.(), y = null, v?.dispose(), v = null, N?.dispose(), N = null, p.cancel(), p.clear();
283
294
  }
284
- return o(B), {
295
+ return o(U), {
285
296
  dragging: s(m),
286
297
  position: s(h),
287
- stretch: s(w),
288
- refresh: z,
289
- detach: B
298
+ stretch: s(T),
299
+ refresh: H,
300
+ detach: U
290
301
  };
291
302
  }
292
303
  //#endregion
@@ -1,4 +1,4 @@
1
- import { n as e, t } from "./createCanvasLifecycle-hJHobVTn.js";
1
+ import { n as e, t } from "./createCanvasLifecycle-DS0vEs_G.js";
2
2
  import { a as n, i as r, o as i, r as a } from "./rendererStatus-BxUlBLVy.js";
3
3
  //#region src/composables/glass/webgl/useWebGLCanvas.ts
4
4
  function o() {
@@ -314,13 +314,14 @@ function _(e, t) {
314
314
  d(i("webgpu", o?.adapterClass ?? "Hardware adapter", e)), t.onInitError?.(e);
315
315
  }
316
316
  }) : s = g(e, t);
317
- function m(r) {
317
+ async function m(r) {
318
318
  o?.dispose(), o = null, l = "webgl2", d(n("webgl2")), t.onBackendFallback?.({
319
319
  from: "webgpu",
320
320
  to: "webgl2",
321
321
  error: r
322
322
  });
323
323
  try {
324
+ if (await t.prepare?.("webgl2"), u) return;
324
325
  s = g(e, t), s.arm(), d({
325
326
  phase: "ready",
326
327
  engine: "webgl2",
@@ -333,6 +334,7 @@ function _(e, t) {
333
334
  async function _() {
334
335
  if (!u) {
335
336
  if (v(), o) try {
337
+ if (await t.prepare?.("webgpu"), u || !o) return;
336
338
  await o.armAsync(), d({
337
339
  phase: "ready",
338
340
  engine: "webgpu",
@@ -342,12 +344,13 @@ function _(e, t) {
342
344
  } catch (e) {
343
345
  if (u) return;
344
346
  if (e instanceof c && e.kind !== "pipeline-validation") {
345
- m(e);
347
+ await m(e);
346
348
  return;
347
349
  }
348
350
  throw d(i("webgpu", o.adapterClass, e)), e;
349
351
  }
350
352
  try {
353
+ if (await t.prepare?.("webgl2"), u) return;
351
354
  s?.arm(), d({
352
355
  phase: "ready",
353
356
  engine: "webgl2",
@@ -392,7 +395,4 @@ function _(e, t) {
392
395
  };
393
396
  }
394
397
  //#endregion
395
- //#region src/composables/glass/procedural/color.wgsl.ts
396
- var v = "\nfn srgbToLinearCh(c: f32) -> f32 {\n if (c <= 0.04045) { return c / 12.92; }\n return pow((c + 0.055) / 1.055, 2.4);\n}\nfn srgbToLinear(c: vec3<f32>) -> vec3<f32> {\n return vec3<f32>(srgbToLinearCh(c.r), srgbToLinearCh(c.g), srgbToLinearCh(c.b));\n}\n\nfn linearToSrgbCh(c: f32) -> f32 {\n if (c <= 0.0031308) { return c * 12.92; }\n return 1.055 * pow(c, 1.0 / 2.4) - 0.055;\n}\nfn linearToSrgb(c: vec3<f32>) -> vec3<f32> {\n return vec3<f32>(linearToSrgbCh(c.r), linearToSrgbCh(c.g), linearToSrgbCh(c.b));\n}", y = "const FBM_ROT: mat2x2<f32> = mat2x2<f32>(0.8, 0.6, -0.6, 0.8);", b = "\n// value.js LINEAR_SRGB_TO_LMS, row-major → WGSL columns (= the transpose).\nconst LINEAR_SRGB_TO_LMS: mat3x3<f32> = mat3x3<f32>(\n 0.4122214708, 0.2119034982, 0.0883024619,\n 0.5363325363, 0.6806995451, 0.2817188376,\n 0.0514459929, 0.1073969566, 0.6299787005\n);\n\n// value.js srgbToOKLab's INLINE LMS→OKLab coefficients, row-major → WGSL columns.\nconst LMS_TO_OKLAB: mat3x3<f32> = mat3x3<f32>(\n 0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660\n);\n\n// value.js OKLAB_TO_LMS_COEFF, row-major → WGSL columns.\nconst OKLAB_TO_LMS: mat3x3<f32> = mat3x3<f32>(\n 1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480\n);\n\n// value.js LMS_TO_LINEAR_SRGB, row-major → WGSL columns.\nconst LMS_TO_LINEAR_SRGB: mat3x3<f32> = mat3x3<f32>(\n 4.0767416621, -1.2684380046, -0.0041960863,\n -3.3077115913, 2.6097574011, -0.7034186147,\n 0.2309699292, -0.3413193965, 1.7076147010\n);\n\nfn cbrt3(v: vec3<f32>) -> vec3<f32> {\n return sign(v) * pow(abs(v), vec3<f32>(1.0 / 3.0));\n}\n\n// Gamma sRGB → raw OKLab (L, a, b). Mirrors value.js srgbToOKLab.\nfn srgbToOklab(c: vec3<f32>) -> vec3<f32> {\n let lin = srgbToLinear(c);\n let lms = LINEAR_SRGB_TO_LMS * lin;\n return LMS_TO_OKLAB * cbrt3(lms);\n}\n\n// Raw OKLab (L, a, b) → linear sRGB. Mirrors value.js oklabToLinearSRGB.\nfn oklabToLinearSrgb(lab: vec3<f32>) -> vec3<f32> {\n let lms_ = OKLAB_TO_LMS * lab;\n let lms = lms_ * lms_ * lms_;\n return LMS_TO_LINEAR_SRGB * lms;\n}\n\n// OKLab → OKLCh: H in RADIANS, folded to [0, 2pi). Mirrors value.js rawOklabToOklch.\nfn oklabToOklch(lab: vec3<f32>) -> vec3<f32> {\n let C = length(lab.yz);\n var H = atan2(lab.z, lab.y);\n if (H < 0.0) { H = H + 2.0 * PI; }\n return vec3<f32>(lab.x, C, H);\n}\n\n// OKLCh (H radians) → OKLab. Mirrors value.js rawOklchToOklab.\nfn oklchToOklab(lch: vec3<f32>) -> vec3<f32> {\n return vec3<f32>(lch.x, lch.y * cos(lch.z), lch.y * sin(lch.z));\n}", x = "\n// value.js interpolateHue in the NORMALIZED-TURNS domain. methods: 0 shorter,\n// 1 longer, 2 increasing, 3 decreasing.\nfn interpolateHueTurns(h0: f32, h1: f32, t: f32, method: i32) -> f32 {\n let TAU = 2.0 * PI;\n var a = h0 / TAU;\n var b = h1 / TAU;\n let i = b - a;\n if (method == 0) { // shorter\n if (i > 0.5) { a = a + 1.0; } else if (i < -0.5) { b = b + 1.0; }\n } else if (method == 1) { // longer\n if (i > 0.0 && i < 0.5) { a = a + 1.0; } else if (i > -0.5 && i <= 0.0) { b = b + 1.0; }\n } else if (method == 2) { // increasing\n if (i < 0.0) { b = b + 1.0; }\n } else { // decreasing\n if (i > 0.0) { a = a + 1.0; }\n }\n var r = a + t * (b - a);\n r = fract(r); // fract is non-negative in WGSL\n return r * TAU; // back to radians\n}\n\n// Linear-sRGB endpoint pair → OKLab-rectangular interpolation → linear sRGB.\nfn mixPaletteOklab(linA: vec3<f32>, linB: vec3<f32>, t: f32) -> vec3<f32> {\n let labA = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * linA);\n let labB = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * linB);\n let lab = mix(labA, labB, t);\n return oklabToLinearSrgb(lab);\n}\n\n// Linear-sRGB endpoint pair → OKLCh hue-arc interpolation → linear sRGB.\nfn mixPaletteOklchArc(linA: vec3<f32>, linB: vec3<f32>, t: f32, method: i32) -> vec3<f32> {\n let labA = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * linA);\n let labB = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * linB);\n let lchA = oklabToOklch(labA);\n let lchB = oklabToOklch(labB);\n let L = mix(lchA.x, lchB.x, t);\n let C = mix(lchA.y, lchB.y, t);\n let H = interpolateHueTurns(lchA.z, lchB.z, t, method);\n return oklabToLinearSrgb(oklchToOklab(vec3<f32>(L, C, H)));\n}\n\n// The ramp dispatcher (the samplePalette splices it). tRaw is the raw inter-stop\n// parameter [0,1]; the smoothstep ease + the huePath branch live here so the ramp is\n// one source. increasing(2)/decreasing(3) take the OKLCh hue-arc; every other method\n// takes the OKLab-rectangular straight line.\nfn samplePaletteRamp(a: vec3<f32>, b: vec3<f32>, tRaw: f32, huePath: i32) -> vec3<f32> {\n let t = smoothstep(0.0, 1.0, tRaw);\n if (huePath == 2 || huePath == 3) {\n return mixPaletteOklchArc(a, b, t, huePath);\n }\n return mixPaletteOklab(a, b, t);\n}";
397
- //#endregion
398
- export { _ as a, x as i, v as n, o, b as r, y as t };
398
+ export { o as n, _ as t };
@@ -1,4 +1,4 @@
1
- import { t as e } from "./useSpring-9u2_shxV.js";
1
+ import { t as e } from "./useSpring-Aof0nTRt.js";
2
2
  import { n as t } from "./springPresets-Cbe0Voqg.js";
3
3
  import { t as n } from "./useLiquidFlex-TJZmRqyY.js";
4
4
  import { n as r } from "./writeVelocityWeight-DoGOCW3e.js";
@@ -50,7 +50,7 @@ function f(e = {}) {
50
50
  from: 0,
51
51
  to: 1,
52
52
  axis: "width",
53
- maxStretch: () => r(e.el?.value ?? null, c(e.maxStretch ?? 1.04)),
53
+ maxStretch: () => m.value.value === 0 ? 1 : r(e.el?.value ?? null, c(e.maxStretch ?? 1.04)),
54
54
  squishLaw: "linear"
55
55
  }) : null, g = s(!1);
56
56
  a(() => {
@@ -1,7 +1,7 @@
1
1
  import { getCurrentScope as e, onScopeDispose as t, watch as n } from "vue";
2
2
  //#region src/composables/dom/useResizeObserver.ts
3
3
  function r(r, i, a = {}) {
4
- let o = a.threshold ?? .5, s = a.rafBatch ?? !0, c = a.box, l = null, u = null, d = 0, f = 0, p = null, m = null;
4
+ let o = a.threshold ?? .5, s = a.rafBatch ?? !0, c = a.box, l = null, u = null, d = NaN, f = NaN, p = null, m = null;
5
5
  function h() {
6
6
  if (p = null, !m) return;
7
7
  let e = m;
@@ -18,16 +18,13 @@ function r(r, i, a = {}) {
18
18
  }
19
19
  }
20
20
  function _() {
21
- l && u && l.unobserve(u), l?.disconnect(), l = null, u = null, p !== null && (cancelAnimationFrame(p), p = null), m = null;
21
+ l && u && l.unobserve(u), l?.disconnect(), l = null, u = null, d = NaN, f = NaN, p !== null && (cancelAnimationFrame(p), p = null), m = null;
22
22
  }
23
23
  function v(e) {
24
- if (typeof window > "u" || typeof ResizeObserver > "u") return;
25
- l = new ResizeObserver((e) => {
24
+ typeof window > "u" || typeof ResizeObserver > "u" || (l = new ResizeObserver((e) => {
26
25
  let t = e[e.length - 1];
27
26
  t && g(t);
28
- }), l.observe(e, c ? { box: c } : void 0), u = e;
29
- let t = e.getBoundingClientRect();
30
- d = t.width, f = t.height;
27
+ }), l.observe(e, c ? { box: c } : void 0), u = e);
31
28
  }
32
29
  let y = n(r, (e) => {
33
30
  _(), e && v(e);
@@ -0,0 +1,67 @@
1
+ import { n as e } from "./useReducedMotion-vCXA_vyM.js";
2
+ import { t } from "./asElement-CRnm6A2v.js";
3
+ import { t as n } from "./useScrollTrigger-Abe5dEeO.js";
4
+ import { onBeforeUnmount as r, ref as i, toValue as a, watch as o } from "vue";
5
+ //#region src/composables/motion/scroll/useScrollChrome.ts
6
+ function s(e) {
7
+ return e < 0 ? 0 : e > 1 ? 1 : e;
8
+ }
9
+ function c(c, l = {}) {
10
+ let { collapseOnScroll: u = !1, flipDeltaPx: d = 8, velocityGate: f, snapMidpoint: p = .5, collapseRangePx: m = 116, chromeRef: h, respectReducedMotion: g = !0, scrollStopMs: _ = 140 } = l, v = i(0), y = i(!1), b = g ? e() : i(!1), x = null, S = null, C = !1;
11
+ function w() {
12
+ if (h == null) return null;
13
+ let e = a(h), n = t(e);
14
+ return n == null && e != null && !C && (C = !0, console.warn("[useScrollChrome] chromeRef resolved to a non-element (a fragment-root component exposes a non-element `$el`); `--chrome-collapse-t` will not paint. Pass an element ref or expose the component's root element.")), n;
15
+ }
16
+ function T(e) {
17
+ let t = b.value ? +(e >= p) : s(e);
18
+ v.value = t, y.value = t >= p, w()?.style.setProperty("--chrome-collapse-t", String(t));
19
+ }
20
+ function E() {
21
+ x && clearTimeout(x), x = setTimeout(() => {
22
+ x = null;
23
+ let e = +(v.value >= p);
24
+ S = null, T(e);
25
+ }, _);
26
+ }
27
+ let { direction: D, velocity: O, recalculate: k } = n(c, {
28
+ flipDeltaPx: d,
29
+ trackProgress: !1,
30
+ respectReducedMotion: g,
31
+ onCross: () => {}
32
+ });
33
+ function A(e, t, n) {
34
+ if (!u || e == null) return;
35
+ if (f != null && Math.abs(n) >= f) {
36
+ S = null, T(+(e === "down")), E();
37
+ return;
38
+ }
39
+ S ??= t - v.value * m;
40
+ let r = m > 0 ? m : 1;
41
+ T((t - S) / r), E();
42
+ }
43
+ function j() {
44
+ let e = a(c);
45
+ return e instanceof HTMLElement ? e.scrollTop : typeof window < "u" && (window.scrollY || window.pageYOffset) || 0;
46
+ }
47
+ o(() => D.value, () => {
48
+ S = null;
49
+ });
50
+ let M = o(b, () => T(v.value), { flush: "sync" });
51
+ o(() => O.value, (e) => {
52
+ A(D.value, j(), e);
53
+ });
54
+ function N() {
55
+ k(), S = null, T(v.value);
56
+ }
57
+ return r(() => {
58
+ x && clearTimeout(x), x = null, M();
59
+ }), {
60
+ collapseT: v,
61
+ collapsed: y,
62
+ direction: D,
63
+ recalculate: N
64
+ };
65
+ }
66
+ //#endregion
67
+ export { c as t };
@@ -0,0 +1,186 @@
1
+ import { computed as e, nextTick as t, onMounted as n, onUnmounted as r, ref as i, watch as a } from "vue";
2
+ //#region src/composables/motion/morph/useSelectionIndicator.ts
3
+ function o(e) {
4
+ let { containerRef: o, indicatorRef: s, buttonRefs: c, options: l, model: u, vertical: d } = e, f = i({
5
+ left: "0px",
6
+ top: "0px",
7
+ width: "0px",
8
+ height: "0px",
9
+ translate: "0px 0px",
10
+ opacity: "0"
11
+ });
12
+ function p() {
13
+ if (!s.value) return;
14
+ let e = l.value.findIndex((e) => e.value === u.value), t = o.value;
15
+ if (e < 0) {
16
+ f.value = {
17
+ ...f.value,
18
+ opacity: "0"
19
+ };
20
+ return;
21
+ }
22
+ if (!t || !c.value[e]) {
23
+ f.value = {
24
+ ...f.value,
25
+ opacity: "0"
26
+ };
27
+ return;
28
+ }
29
+ let n = c.value[e], r = t.getBoundingClientRect(), i = n.getBoundingClientRect(), a = i.left - r.left - t.clientLeft + t.scrollLeft, d = i.top - r.top - t.clientTop + t.scrollTop;
30
+ f.value = {
31
+ left: "0px",
32
+ top: "0px",
33
+ width: `${i.width}px`,
34
+ height: `${i.height}px`,
35
+ translate: `${a}px ${d}px`,
36
+ opacity: "1"
37
+ };
38
+ }
39
+ function m() {
40
+ p();
41
+ }
42
+ a(() => u.value, () => t(m)), a(() => l.value, () => t(m), { deep: !0 }), a(() => d.value, () => t(m));
43
+ let h = null;
44
+ return a(o, (e) => {
45
+ h?.disconnect(), e ? (h = new ResizeObserver(m), h.observe(e), t(m)) : m();
46
+ }, { flush: "post" }), n(() => {
47
+ t(m);
48
+ }), r(() => {
49
+ h?.disconnect();
50
+ }), { singleSliderStyle: f };
51
+ }
52
+ //#endregion
53
+ //#region src/components/tabs/composables/useTabRovingFocus.ts
54
+ function s(t) {
55
+ let { stripOptions: n, stripValue: r, isVertical: o, activation: s, buttonRefs: c, select: l } = t, u = e(() => {
56
+ let e = n.value.findIndex((e) => e.value === r.value);
57
+ return e >= 0 && !n.value[e]?.disabled ? e : n.value.findIndex((e) => !e.disabled);
58
+ }), d = i(u.value);
59
+ a(e(() => [r.value ?? "", ...n.value.map((e) => `${e.value}:${e.disabled ? "1" : "0"}`)].join("\0")), () => {
60
+ let e = typeof document > "u" ? null : document.activeElement, t = c.value.findIndex((t, r) => t === e && !n.value[r]?.disabled);
61
+ d.value = t >= 0 ? t : u.value;
62
+ }, { flush: "post" });
63
+ let f = e(() => s.value === "manual" && d.value >= 0 && !n.value[d.value]?.disabled ? d.value : u.value);
64
+ function p(e) {
65
+ return e === f.value ? 0 : -1;
66
+ }
67
+ function m(e) {
68
+ let t = n.value[e];
69
+ !t || t.disabled || (d.value = e, c.value[e]?.focus(), s.value === "automatic" && l(t.value, e));
70
+ }
71
+ function h(e, t) {
72
+ let r = n.value.length;
73
+ if (r !== 0) for (let i = 1; i <= r; i++) {
74
+ let a = (e + t * i + r * i) % r, o = n.value[a];
75
+ if (o && !o.disabled) {
76
+ m(a);
77
+ return;
78
+ }
79
+ }
80
+ }
81
+ function g(e) {
82
+ let t = n.value.length, r = e === "first" ? Array.from({ length: t }, (e, t) => t) : Array.from({ length: t }, (e, n) => t - 1 - n);
83
+ for (let e of r) {
84
+ let t = n.value[e];
85
+ if (t && !t.disabled) {
86
+ m(e);
87
+ return;
88
+ }
89
+ }
90
+ }
91
+ function _(e) {
92
+ let t = c.value.indexOf(e.target), r = t >= 0 && !n.value[t]?.disabled ? t : f.value, i = o.value ? "ArrowDown" : "ArrowRight", a = o.value ? "ArrowUp" : "ArrowLeft", u = e.currentTarget, p = u ? getComputedStyle(u).direction : "", m = u?.closest("[dir]")?.getAttribute("dir")?.toLowerCase(), _ = !o.value && (p === "rtl" || m === "rtl") ? -1 : 1;
93
+ switch (e.key) {
94
+ case i:
95
+ e.preventDefault(), h(r, _);
96
+ break;
97
+ case a:
98
+ e.preventDefault(), h(r, _ === 1 ? -1 : 1);
99
+ break;
100
+ case "Home":
101
+ e.preventDefault(), g("first");
102
+ break;
103
+ case "End":
104
+ e.preventDefault(), g("last");
105
+ break;
106
+ case "Enter":
107
+ case " ": {
108
+ if (s.value !== "manual") break;
109
+ e.preventDefault();
110
+ let t = n.value[r];
111
+ t && !t.disabled && (d.value = r, l(t.value, r));
112
+ break;
113
+ }
114
+ default: break;
115
+ }
116
+ }
117
+ return {
118
+ activeIndex: u,
119
+ rovingTabindex: p,
120
+ onStripKeydown: _
121
+ };
122
+ }
123
+ //#endregion
124
+ //#region src/composables/motion/morph/useSelectionGroup.ts
125
+ function c(e, t) {
126
+ return e == null ? t : typeof e == "object" && "value" in e ? e.value : e;
127
+ }
128
+ function l(t) {
129
+ let { options: n, model: r, containerRef: i, buttonRefs: a, indicatorRef: l, vertical: u } = t, d = e(() => c(t.mode, "single")), f = e(() => c(t.role, d.value === "multiple" ? "group" : "radiogroup")), p = e(() => u?.value ?? !1), m = e(() => c(t.activation, "automatic")), h = e(() => {
130
+ let e = r.value;
131
+ return e == null ? [] : Array.isArray(e) ? e : [e];
132
+ });
133
+ function g(e) {
134
+ return h.value.includes(e);
135
+ }
136
+ let _ = e(() => h.value[0]), { singleSliderStyle: v } = o({
137
+ containerRef: i,
138
+ indicatorRef: l ?? { value: null },
139
+ buttonRefs: a,
140
+ options: n,
141
+ model: _,
142
+ vertical: p
143
+ });
144
+ function y(e, t) {
145
+ if (!n.value[t]?.disabled) {
146
+ if (d.value === "multiple") {
147
+ let t = Array.isArray(r.value) ? [...r.value] : [], n = t.indexOf(e);
148
+ n >= 0 ? t.splice(n, 1) : t.push(e), r.value = t;
149
+ } else r.value = e;
150
+ a.value[t]?.scrollIntoView({
151
+ inline: "nearest",
152
+ block: "nearest"
153
+ });
154
+ }
155
+ }
156
+ let { rovingTabindex: b, onStripKeydown: x } = s({
157
+ stripOptions: n,
158
+ stripValue: _,
159
+ isVertical: p,
160
+ activation: m,
161
+ buttonRefs: a,
162
+ select: y
163
+ });
164
+ function S(e) {
165
+ let t = g(e), n = f.value;
166
+ return n === "radiogroup" ? {
167
+ role: "radio",
168
+ "aria-checked": t ? "true" : "false"
169
+ } : n === "tablist" ? {
170
+ role: "tab",
171
+ "aria-selected": t ? "true" : "false"
172
+ } : { "aria-pressed": t ? "true" : "false" };
173
+ }
174
+ return {
175
+ activeValues: h,
176
+ isSelected: g,
177
+ select: y,
178
+ rovingTabindex: b,
179
+ onKeydown: x,
180
+ singleSliderStyle: v,
181
+ groupRole: f,
182
+ itemAttrs: S
183
+ };
184
+ }
185
+ //#endregion
186
+ export { o as n, l as t };
@@ -1,4 +1,4 @@
1
- import { t as e } from "./motionTempo-tscp92Nm.js";
1
+ import { t as e } from "./motionTempo-DXdVbCWr.js";
2
2
  import { getCurrentScope as t, onScopeDispose as n, readonly as r, ref as i, shallowRef as a, toValue as o, watch as s } from "vue";
3
3
  import { SpringProgress as c } from "@mkbabb/keyframes.js";
4
4
  //#region src/composables/motion/spring/useSpring.ts
@@ -0,0 +1,73 @@
1
+ import { t as e } from "./useSpring-Aof0nTRt.js";
2
+ import { n as t } from "./springPresets-Cbe0Voqg.js";
3
+ import { computed as n, nextTick as r, onMounted as i, onScopeDispose as a, readonly as o, ref as s, watch as c } from "vue";
4
+ //#region src/composables/motion/spring/useSpringMount.ts
5
+ var l = Object.fromEntries([
6
+ "present",
7
+ "panel",
8
+ "bloom"
9
+ ].map((e) => {
10
+ let { response: n, dampingFraction: r } = t(e);
11
+ return [e, {
12
+ response: n,
13
+ dampingFraction: r
14
+ }];
15
+ })), u = .001;
16
+ function d(t) {
17
+ let d = l[t.preset ?? "panel"], f = s(1), p = s(t.open.value), m = s(!1), h = 0, g = 0, _ = null, v = !1, y = e(f, {
18
+ response: d.response,
19
+ dampingFraction: d.dampingFraction,
20
+ initial: 1,
21
+ settleThreshold: u,
22
+ velocitySettleThreshold: .001,
23
+ respectReducedMotion: t.respectReducedMotion !== !1
24
+ });
25
+ i(() => {
26
+ t.open.value && r(() => {
27
+ f.value = 0;
28
+ });
29
+ });
30
+ let b = c(() => t.open.value, (e, t) => {
31
+ e !== t && (e && (p.value = !0), !m.value && (f.value = +!e));
32
+ }, { immediate: !1 }), x = c(() => y.isSettled.value, (e) => {
33
+ e && v && f.value >= 1 && (v = !1, t.onDismiss?.());
34
+ }), S = c(() => y.value.value >= 1 - u && !t.open.value, (e) => {
35
+ e && (p.value = !1);
36
+ });
37
+ function C(e) {
38
+ if (e.button !== 0) return;
39
+ let t = e.currentTarget;
40
+ g = t.getBoundingClientRect().height || 1, h = e.clientY, _ = e.pointerId, m.value = !0, t.setPointerCapture(e.pointerId);
41
+ }
42
+ function w(e) {
43
+ if (!m.value || e.pointerId !== _) return;
44
+ let t = e.clientY - h;
45
+ if (t <= 0) {
46
+ f.value = 0;
47
+ return;
48
+ }
49
+ f.value = Math.min(1, t / g);
50
+ }
51
+ function T(e) {
52
+ if (!m.value || e.pointerId !== _) return;
53
+ let n = e.currentTarget;
54
+ n.hasPointerCapture(e.pointerId) && n.releasePointerCapture(e.pointerId), m.value = !1, _ = null;
55
+ let r = t.dismissThreshold ?? .3;
56
+ f.value >= r ? (v = !0, f.value = 1) : f.value = 0;
57
+ }
58
+ return a(() => {
59
+ b(), x(), S();
60
+ }), {
61
+ position: y.value,
62
+ present: o(p),
63
+ isDragging: n(() => m.value),
64
+ dragHandlers: {
65
+ onPointerdown: C,
66
+ onPointermove: w,
67
+ onPointerup: T,
68
+ onPointercancel: T
69
+ }
70
+ };
71
+ }
72
+ //#endregion
73
+ export { d as t };