@mkbabb/glass-ui 3.3.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/{DataTable-FfkaAg2z.js → DataTable-DyKc_26a.js} +144 -106
  2. package/dist/{NumberFieldContent-iOTQ5rGO.js → NumberFieldContent-jO-zGOHf.js} +1 -1
  3. package/dist/api/index.d.ts +1 -0
  4. package/dist/{button-Ckn3eDfB.js → button-i8Ek5vvg.js} +1 -1
  5. package/dist/button.js +1 -1
  6. package/dist/carousel.js +1 -1
  7. package/dist/components/custom/deck-progress/DeckProgress.vue.d.ts +27 -0
  8. package/dist/components/custom/deck-progress/index.d.ts +2 -0
  9. package/dist/components/custom/dock/composables/useLayerTransition.d.ts +11 -0
  10. package/dist/components/ui/data-table/composables/useDataTableResponsive.d.ts +28 -0
  11. package/dist/components/ui/data-table/composables/useDataTableRowIdentity.d.ts +33 -0
  12. package/dist/composables/dark/useGlobalDark.d.ts +17 -6
  13. package/dist/composables/dom/index.d.ts +3 -0
  14. package/dist/composables/dom/useBreakpoint.d.ts +38 -0
  15. package/dist/composables/dom/useIdleReady.d.ts +63 -0
  16. package/dist/composables/dom/useTokenColor.d.ts +13 -0
  17. package/dist/composables/dom/useViewportReady.d.ts +87 -0
  18. package/dist/composables/glass/index.d.ts +1 -1
  19. package/dist/composables/glass/useGlassRenderer.d.ts +10 -3
  20. package/dist/composables/motion/useAnimatedNumber.d.ts +8 -2
  21. package/dist/composables/motion/useCountup.d.ts +8 -2
  22. package/dist/composables/motion/useNumericTransition.d.ts +31 -9
  23. package/dist/composables/motion/useViewTransition.d.ts +16 -1
  24. package/dist/confirm-dialog.js +1 -1
  25. package/dist/data-table.js +1 -1
  26. package/dist/dock.js +169 -158
  27. package/dist/dom.js +4 -4
  28. package/dist/glass-panel.js +14 -14
  29. package/dist/glass-ui.css +1 -1
  30. package/dist/glass-ui.js +134 -119
  31. package/dist/goo-blob.js +108 -89
  32. package/dist/index.d.ts +1 -0
  33. package/dist/labeled-field.js +1 -1
  34. package/dist/motion-core.js +1 -1
  35. package/dist/number-field.js +1 -1
  36. package/dist/search.js +1 -1
  37. package/dist/{slider-BOh8ycfZ.js → slider-CgNzRSh6.js} +1 -1
  38. package/dist/slider.js +1 -1
  39. package/dist/styles/components.css +1 -1
  40. package/dist/styles/dock.css +112 -48
  41. package/dist/styles/glass.css +44 -1
  42. package/dist/styles/instrument-chassis.css +10 -13
  43. package/dist/styles/instrument-rail.css +11 -12
  44. package/dist/styles/tokens.css +9 -7
  45. package/dist/styles/utilities.css +20 -0
  46. package/dist/styles/view-transition.css +24 -0
  47. package/dist/tabs.js +1 -1
  48. package/dist/timeline.js +1 -1
  49. package/dist/useViewTransition-CJnqg6wl.js +21 -0
  50. package/dist/useViewportReady-Dcvf0c4p.js +191 -0
  51. package/package.json +5 -3
  52. package/src/styles/dock.css +112 -48
  53. package/src/styles/glass.css +44 -1
  54. package/src/styles/instrument-chassis.css +10 -13
  55. package/src/styles/instrument-rail.css +11 -12
  56. package/src/styles/tokens.css +9 -7
  57. package/src/styles/utilities.css +20 -0
  58. package/src/styles/view-transition.css +24 -0
  59. package/dist/useClipboard-D8vFyRCa.js +0 -97
  60. package/dist/useViewTransition-D4ssvnXZ.js +0 -18
package/dist/goo-blob.js CHANGED
@@ -2,9 +2,9 @@ import { t as e } from "./_plugin-vue_export-helper-C1je1s0u.js";
2
2
  import { a as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./compile-DVgAxagk.js";
3
3
  import { t as c } from "./useIntersectionPause-DAdVPVp4.js";
4
4
  import { n as l, t as u } from "./prng-Bz_1Tydc.js";
5
- import { createElementBlock as d, createElementVNode as f, defineComponent as p, inject as m, normalizeStyle as h, onUnmounted as g, openBlock as _, readonly as v, ref as y, toRef as b, useTemplateRef as x, watch as S } from "vue";
5
+ import { computed as d, createElementBlock as f, createElementVNode as p, defineComponent as m, inject as h, normalizeStyle as g, onScopeDispose as _, onUnmounted as v, openBlock as y, readonly as b, ref as x, useTemplateRef as S, watch as C } from "vue";
6
6
  //#region src/components/custom/goo-blob/types.ts
7
- var C = {
7
+ var w = {
8
8
  canvasSize: 200,
9
9
  bodyRadius: .25,
10
10
  satelliteCount: 3,
@@ -31,13 +31,13 @@ var C = {
31
31
  absorbedDuration: [2e3, 4e3],
32
32
  emergeDuration: 2200,
33
33
  orbitDuration: [8e3, 14e3]
34
- }, w = Symbol("blobConfig");
34
+ }, T = Symbol("blobConfig");
35
35
  //#endregion
36
36
  //#region src/components/custom/goo-blob/composables/easing.ts
37
- function T(e) {
37
+ function E(e) {
38
38
  return e < .5 ? 2 * e * e : 1 - 2 * (1 - e) * (1 - e);
39
39
  }
40
- function E(e) {
40
+ function D(e) {
41
41
  return e * e;
42
42
  }
43
43
  function ee(e) {
@@ -45,7 +45,7 @@ function ee(e) {
45
45
  }
46
46
  //#endregion
47
47
  //#region src/components/custom/goo-blob/composables/useBlobMood.ts
48
- var D = {
48
+ var O = {
49
49
  idle: {
50
50
  orbitSpeedScale: 1,
51
51
  wobbleScale: 1,
@@ -111,14 +111,14 @@ var D = {
111
111
  pointerAttraction: .1,
112
112
  mergeRate: .3
113
113
  }
114
- }, O = {
114
+ }, k = {
115
115
  idle: 1500,
116
116
  happy: 1200,
117
117
  curious: 800,
118
118
  sleepy: 2500,
119
119
  excited: 600
120
120
  };
121
- function k(e, t, n) {
121
+ function A(e, t, n) {
122
122
  let r = (e, t) => e + (t - e) * n;
123
123
  return {
124
124
  orbitSpeedScale: r(e.orbitSpeedScale, t.orbitSpeedScale),
@@ -134,32 +134,32 @@ function k(e, t, n) {
134
134
  mergeRate: r(e.mergeRate, t.mergeRate)
135
135
  };
136
136
  }
137
- function A() {
138
- let e = y("idle"), t = y({ ...D.idle }), n = { ...D.idle }, r = { ...D.idle }, i = 0, a = 0, o = !1;
137
+ function j() {
138
+ let e = x("idle"), t = x({ ...O.idle }), n = { ...O.idle }, r = { ...O.idle }, i = 0, a = 0, o = !1;
139
139
  function s(s) {
140
- s === e.value && !o || (e.value = s, n = { ...t.value }, r = D[s], a = O[s], i = 0, o = !0);
140
+ s === e.value && !o || (e.value = s, n = { ...t.value }, r = O[s], a = k[s], i = 0, o = !0);
141
141
  }
142
142
  function c(e) {
143
143
  if (!o) return;
144
144
  i += e;
145
- let s = Math.min(i / a, 1), c = T(s);
146
- t.value = k(n, r, c), s >= 1 && (o = !1);
145
+ let s = Math.min(i / a, 1), c = E(s);
146
+ t.value = A(n, r, c), s >= 1 && (o = !1);
147
147
  }
148
148
  return {
149
- currentMood: v(e),
150
- params: v(t),
149
+ currentMood: b(e),
150
+ params: b(t),
151
151
  setMood: s,
152
152
  tick: c
153
153
  };
154
154
  }
155
155
  //#endregion
156
156
  //#region src/components/custom/goo-blob/composables/useBlobPointer.ts
157
- var j = .12;
158
- function M(e) {
159
- let t = y({
157
+ var M = .12;
158
+ function N(e) {
159
+ let t = x({
160
160
  x: 0,
161
161
  y: 0
162
- }), n = y(!1), r = 0, i = 0, a = 0, o = 0;
162
+ }), n = x(!1), r = 0, i = 0, a = 0, o = 0;
163
163
  function s(t) {
164
164
  let a = e.value;
165
165
  if (!a) return;
@@ -170,35 +170,35 @@ function M(e) {
170
170
  n.value = !1;
171
171
  }
172
172
  let l = null;
173
- S(e, (e) => {
173
+ C(e, (e) => {
174
174
  l &&= (l(), null), e && (e.addEventListener("pointermove", s), e.addEventListener("pointerleave", c), l = () => {
175
175
  e.removeEventListener("pointermove", s), e.removeEventListener("pointerleave", c);
176
176
  });
177
- }, { immediate: !0 }), g(() => l?.());
177
+ }, { immediate: !0 }), v(() => l?.());
178
178
  function u() {
179
- n.value ? (a += (r - a) * j, o += (i - o) * j) : (a *= 1 - j, o *= 1 - j), t.value = {
179
+ n.value ? (a += (r - a) * M, o += (i - o) * M) : (a *= 1 - M, o *= 1 - M), t.value = {
180
180
  x: a,
181
181
  y: o
182
182
  };
183
183
  }
184
184
  return {
185
- pointer: v(t),
186
- active: v(n),
185
+ pointer: b(t),
186
+ active: b(n),
187
187
  tick: u
188
188
  };
189
189
  }
190
190
  //#endregion
191
191
  //#region src/components/custom/goo-blob/composables/useBlobSatellites.ts
192
- function N(e, t, n) {
192
+ function P(e, t, n) {
193
193
  return t + e() * (n - t);
194
194
  }
195
- function P(e) {
195
+ function F(e) {
196
196
  return e < 0 ? 0 : e > 1 ? 1 : e;
197
197
  }
198
- function F(e, t, n) {
198
+ function I(e, t, n) {
199
199
  return e + (t - e) * n;
200
200
  }
201
- function I(e, t, n, r) {
201
+ function L(e, t, n, r) {
202
202
  let i = performance.now(), a = t / 4 * Math.PI * 2 + (e() - .5) * Math.PI, o = n * (.8 + e() * .4), s = r * (.3 + e() * .7);
203
203
  return {
204
204
  phase: "orbiting",
@@ -225,23 +225,23 @@ function I(e, t, n, r) {
225
225
  endY: 0
226
226
  };
227
227
  }
228
- function L(e, t, n, r) {
228
+ function R(e, t, n, r) {
229
229
  e.phase = t, e.phaseStart = n, e.phaseDuration = r;
230
230
  }
231
- function R(e, t) {
231
+ function z(e, t) {
232
232
  let n = (t - e.timeOrigin) / 1e3, r = e.angularSpeed * n + e.phaseOffset, i = e.wobbleAmp1 * Math.sin(e.wobbleFreq1 * n) + e.wobbleAmp2 * Math.sin(e.wobbleFreq2 * n + 1.3);
233
233
  return {
234
234
  x: (e.baseRadiusX + i) * Math.cos(r) + e.pertXAmp * Math.sin(e.pertXFreq * n + e.pertXPhase),
235
235
  y: (e.baseRadiusY + i) * Math.sin(r) + e.pertYAmp * Math.cos(e.pertYFreq * n + e.pertYPhase)
236
236
  };
237
237
  }
238
- function z(e, t, n, r, i) {
238
+ function B(e, t, n, r, i) {
239
239
  e.timeOrigin = i, e.angularSpeed = .08 + t() * .16, e.phaseOffset = t() * Math.PI * 2;
240
240
  let a = n * (.8 + t() * .4), o = r * (.3 + t() * .7);
241
241
  e.baseRadiusX = a * (1 - o), e.baseRadiusY = a * (1 + o), e.wobbleAmp1 = .02 + t() * .06, e.wobbleFreq1 = .08 + t() * .22, e.wobbleAmp2 = .015 + t() * .04, e.wobbleFreq2 = .18 + t() * .32, e.pertXAmp = .03 + t() * .05, e.pertXFreq = .06 + t() * .18, e.pertXPhase = t() * Math.PI * 2, e.pertYAmp = .03 + t() * .05, e.pertYFreq = .07 + t() * .17, e.pertYPhase = t() * Math.PI * 2;
242
242
  }
243
- var B = .75, V = 2e3;
244
- function H(e, t) {
243
+ var V = .75, H = 2e3;
244
+ function U(e, t) {
245
245
  let n = l(u(t + "goo")), r = [], i = [], a = [], o = -Infinity, s = e.orbitRadius;
246
246
  function c() {
247
247
  let t = e.orbitRadius;
@@ -253,7 +253,7 @@ function H(e, t) {
253
253
  }
254
254
  function d() {
255
255
  let t = e.satelliteCount;
256
- for (; r.length < t;) r.push(I(n, r.length, e.orbitRadius, e.eccentricity)), i.push({
256
+ for (; r.length < t;) r.push(L(n, r.length, e.orbitRadius, e.eccentricity)), i.push({
257
257
  x: 0,
258
258
  y: 0,
259
259
  radius: e.satelliteRadius,
@@ -270,62 +270,62 @@ function H(e, t) {
270
270
  d(), c();
271
271
  let l = r.length, u = s.mergeRate, f = e.satelliteRadius, p = e.mergeDuration, m = e.emergeDuration, h = e.orbitDuration, g = e.absorbedDuration;
272
272
  for (let s = 0; s < l; s++) {
273
- let c = r[s], l = t - c.phaseStart, d = P(c.phaseDuration > 0 ? l / c.phaseDuration : 1);
273
+ let c = r[s], l = t - c.phaseStart, d = F(c.phaseDuration > 0 ? l / c.phaseDuration : 1);
274
274
  switch (c.phase) {
275
275
  case "orbiting":
276
- if (d >= 1) if (t - o < 3e3 * u) c.phaseStart = t, c.phaseDuration = N(n, h[0], h[1]);
276
+ if (d >= 1) if (t - o < 3e3 * u) c.phaseStart = t, c.phaseDuration = P(n, h[0], h[1]);
277
277
  else {
278
- let e = R(c, t);
278
+ let e = z(c, t);
279
279
  c.startX = e.x, c.startY = e.y;
280
280
  let n = Math.hypot(e.x, e.y), r = n > .01 ? .08 / n : 0;
281
- c.endX = e.x * r, c.endY = e.y * r, L(c, "merging", t, p), o = t;
281
+ c.endX = e.x * r, c.endY = e.y * r, R(c, "merging", t, p), o = t;
282
282
  }
283
283
  break;
284
284
  case "merging":
285
- d >= 1 && L(c, "absorbed", t, N(n, g[0], g[1]));
285
+ d >= 1 && R(c, "absorbed", t, P(n, g[0], g[1]));
286
286
  break;
287
287
  case "absorbed":
288
288
  if (d >= 1) {
289
- z(c, n, e.orbitRadius, e.eccentricity, t);
290
- let r = R(c, t + 3e3);
289
+ B(c, n, e.orbitRadius, e.eccentricity, t);
290
+ let r = z(c, t + 3e3);
291
291
  c.endX = r.x, c.endY = r.y;
292
292
  let i = Math.hypot(r.x, r.y), a = i > .01 ? .08 / i : 0;
293
- c.startX = r.x * a, c.startY = r.y * a, L(c, "emerging", t, m);
293
+ c.startX = r.x * a, c.startY = r.y * a, R(c, "emerging", t, m);
294
294
  }
295
295
  break;
296
296
  case "emerging":
297
297
  if (d >= 1) {
298
298
  let e = a[s];
299
- e.x = c.endX, e.y = c.endY, e.start = t, c.timeOrigin = t, c.phaseOffset = Math.atan2(c.endY, c.endX), L(c, "orbiting", t, N(n, h[0], h[1]));
299
+ e.x = c.endX, e.y = c.endY, e.start = t, c.timeOrigin = t, c.phaseOffset = Math.atan2(c.endY, c.endX), R(c, "orbiting", t, P(n, h[0], h[1]));
300
300
  }
301
301
  break;
302
302
  }
303
303
  let _, v, y, b;
304
304
  switch (c.phase) {
305
305
  case "orbiting": {
306
- let e = R(c, t), n = a[s], r = t - n.start;
307
- if (n.start > 0 && r < V) {
308
- let t = P(r / V), i = t * t * (3 - 2 * t);
309
- _ = F(n.x, e.x, i), v = F(n.y, e.y, i);
306
+ let e = z(c, t), n = a[s], r = t - n.start;
307
+ if (n.start > 0 && r < H) {
308
+ let t = F(r / H), i = t * t * (3 - 2 * t);
309
+ _ = I(n.x, e.x, i), v = I(n.y, e.y, i);
310
310
  } else _ = e.x, v = e.y;
311
- y = B, b = 1;
311
+ y = V, b = 1;
312
312
  break;
313
313
  }
314
314
  case "merging": {
315
- let e = E(P((t - c.phaseStart) / c.phaseDuration));
316
- _ = F(c.startX, c.endX, e), v = F(c.startY, c.endY, e);
317
- let n = P((t - c.phaseStart) / c.phaseDuration);
318
- y = n > .85 ? F(B, 0, (n - .85) / .15) : B, b = F(1, .65, e);
315
+ let e = D(F((t - c.phaseStart) / c.phaseDuration));
316
+ _ = I(c.startX, c.endX, e), v = I(c.startY, c.endY, e);
317
+ let n = F((t - c.phaseStart) / c.phaseDuration);
318
+ y = n > .85 ? I(V, 0, (n - .85) / .15) : V, b = I(1, .65, e);
319
319
  break;
320
320
  }
321
321
  case "absorbed":
322
322
  _ = 0, v = 0, y = 0, b = .5;
323
323
  break;
324
324
  case "emerging": {
325
- let e = ee(P((t - c.phaseStart) / c.phaseDuration));
326
- _ = F(c.startX, c.endX, e), v = F(c.startY, c.endY, e);
327
- let n = P((t - c.phaseStart) / c.phaseDuration);
328
- y = n < .1 ? F(0, B, n / .1) : B, b = F(.65, 1, e);
325
+ let e = ee(F((t - c.phaseStart) / c.phaseDuration));
326
+ _ = I(c.startX, c.endX, e), v = I(c.startY, c.endY, e);
327
+ let n = F((t - c.phaseStart) / c.phaseDuration);
328
+ y = n < .1 ? I(0, V, n / .1) : V, b = I(.65, 1, e);
329
329
  break;
330
330
  }
331
331
  }
@@ -348,7 +348,7 @@ function H(e, t) {
348
348
  }
349
349
  //#endregion
350
350
  //#region src/components/custom/goo-blob/shaders/metaball.vert.ts
351
- var U = "#version 300 es\n\nin vec2 aPosition;\nout vec2 vUv;\n\nvoid main() {\n vUv = 0.5 * (aPosition + 1.0);\n gl_Position = vec4(aPosition, 0.0, 1.0);\n}", W = "// --- SDF ---\n\nfloat sdCircle(vec2 p, vec2 center, float radius) {\n return length(p - center) - radius;\n}\n\n// Edit #2 — Inigo Quilez quadratic polynomial smin (same uSmoothK uniform). The\n// quadratic h*h*k*0.25 form has a cleaner C1 seam than the prior cubic smin.\nfloat smin(float a, float b, float k) {\n float h = max(k - abs(a - b), 0.0) / k;\n return min(a, b) - h * h * k * 0.25;\n}", G = "// --- Noise ---\n\nfloat hash21(vec2 p) {\n vec3 p3 = fract(vec3(p.xyx) * 0.1031);\n p3 += dot(p3, p3.yzx + 33.33);\n return fract((p3.x + p3.y) * p3.z);\n}\n\nfloat valueNoise(vec2 p) {\n vec2 i = floor(p);\n vec2 f = fract(p);\n f = f * f * (3.0 - 2.0 * f);\n\n float a = hash21(i);\n float b = hash21(i + vec2(1.0, 0.0));\n float c = hash21(i + vec2(0.0, 1.0));\n float d = hash21(i + vec2(1.0, 1.0));\n\n return mix(mix(a, b, f.x), mix(c, d, f.x), f.y);\n}\n\n// Edit #3 — rotated-octave FBM: a fixed ~0.5 rad 2x2 rotation between octaves\n// breaks the axis-aligned banding the un-rotated lattice noise produces. The\n// rotation CONSTANT is spliced from the shared chunk (AV.W2 — the one FBM_ROT);\n// the loop below stays blob-local (param octaves + 2.0 lacunarity, per §3a).", K = "float fbm(vec2 p, int octaves) {\n float value = 0.0;\n float amp = 0.5;\n float freq = 1.0;\n for (int i = 0; i < 4; i++) {\n if (i >= octaves) break;\n value += amp * valueNoise(p * freq);\n p = FBM_ROT * p;\n freq *= 2.0;\n amp *= 0.5;\n }\n return value;\n}\n", q = "// Edit #4's gamut step — hue-preserving inward chroma clamp. If the linear result\n// is out of [0,1], bisect chroma toward 0 (L + h fixed) until in gamut. Preserves\n// hue exactly (only C shrinks). 16 steps resolve C to < 2^-16 of its span.\nbool inGamut(vec3 lin) {\n return all(greaterThanEqual(lin, vec3(0.0))) && all(lessThanEqual(lin, vec3(1.0)));\n}\nvec3 gamutClampOklch(vec3 lch) {\n vec3 lin = oklabToLinearSrgb(oklchToOklab(lch));\n if (inGamut(lin)) return lch;\n float lo = 0.0;\n float hi = lch.y;\n for (int i = 0; i < 16; i++) {\n float mid = 0.5 * (lo + hi);\n vec3 test = vec3(lch.x, mid, lch.z);\n if (inGamut(oklabToLinearSrgb(oklchToOklab(test)))) {\n lo = mid;\n } else {\n hi = mid;\n }\n }\n return vec3(lch.x, lo, lch.z);\n}", J = "\n", Y = "#version 300 es\nprecision highp float;\n\nin vec2 vUv;\nout vec4 fragColor;\n\nuniform vec2 uResolution;\nuniform float uTime;\nuniform vec3 uBaseColor;\n\n// Pointer\nuniform vec2 uPointer;\nuniform float uPointerActive;\nuniform float uPointerAttraction;\nuniform float uPointerStrength;\n\n// Main body\nuniform float uBodyRadius;\n\n// Pulsation\nuniform float uPulsePhase;\nuniform float uPulseAmp;\n\n// Surface noise\nuniform float uNoiseAmp;\nuniform float uNoiseFreq;\nuniform float uNoiseSpeed;\n\n// Gooey\nuniform float uSmoothK;\n\n// Color perturbation (perceptually uniform — OKLCh L/C/h)\nuniform float uHueRange; // degrees of hue swing (converted to radians)\nuniform float uSatShift; // OKLCh chroma swing\nuniform float uBrightnessShift; // OKLCh lightness bias\nuniform float uColorNoiseFreq;\nuniform float uColorNoiseSpeed;\n\n// Satellites (max 4)\n#define MAX_SATS 4\nuniform int uSatCount;\nuniform vec2 uSatPos[MAX_SATS];\nuniform float uSatRadius[MAX_SATS];\nuniform float uSatOpacity[MAX_SATS];\n\nconst float PI = 3.141592653589793;\n\n" + G + J + `${t}
351
+ var te = "#version 300 es\n\nin vec2 aPosition;\nout vec2 vUv;\n\nvoid main() {\n vUv = 0.5 * (aPosition + 1.0);\n gl_Position = vec4(aPosition, 0.0, 1.0);\n}", W = "// --- SDF ---\n\nfloat sdCircle(vec2 p, vec2 center, float radius) {\n return length(p - center) - radius;\n}\n\n// Edit #2 — Inigo Quilez quadratic polynomial smin (same uSmoothK uniform). The\n// quadratic h*h*k*0.25 form has a cleaner C1 seam than the prior cubic smin.\nfloat smin(float a, float b, float k) {\n float h = max(k - abs(a - b), 0.0) / k;\n return min(a, b) - h * h * k * 0.25;\n}", G = "// --- Noise ---\n\nfloat hash21(vec2 p) {\n vec3 p3 = fract(vec3(p.xyx) * 0.1031);\n p3 += dot(p3, p3.yzx + 33.33);\n return fract((p3.x + p3.y) * p3.z);\n}\n\nfloat valueNoise(vec2 p) {\n vec2 i = floor(p);\n vec2 f = fract(p);\n f = f * f * (3.0 - 2.0 * f);\n\n float a = hash21(i);\n float b = hash21(i + vec2(1.0, 0.0));\n float c = hash21(i + vec2(0.0, 1.0));\n float d = hash21(i + vec2(1.0, 1.0));\n\n return mix(mix(a, b, f.x), mix(c, d, f.x), f.y);\n}\n\n// Edit #3 — rotated-octave FBM: a fixed ~0.5 rad 2x2 rotation between octaves\n// breaks the axis-aligned banding the un-rotated lattice noise produces. The\n// rotation CONSTANT is spliced from the shared chunk (AV.W2 — the one FBM_ROT);\n// the loop below stays blob-local (param octaves + 2.0 lacunarity, per §3a).", K = "float fbm(vec2 p, int octaves) {\n float value = 0.0;\n float amp = 0.5;\n float freq = 1.0;\n for (int i = 0; i < 4; i++) {\n if (i >= octaves) break;\n value += amp * valueNoise(p * freq);\n p = FBM_ROT * p;\n freq *= 2.0;\n amp *= 0.5;\n }\n return value;\n}\n", q = "// Edit #4's gamut step — hue-preserving inward chroma clamp. If the linear result\n// is out of [0,1], bisect chroma toward 0 (L + h fixed) until in gamut. Preserves\n// hue exactly (only C shrinks). 16 steps resolve C to < 2^-16 of its span.\nbool inGamut(vec3 lin) {\n return all(greaterThanEqual(lin, vec3(0.0))) && all(lessThanEqual(lin, vec3(1.0)));\n}\nvec3 gamutClampOklch(vec3 lch) {\n vec3 lin = oklabToLinearSrgb(oklchToOklab(lch));\n if (inGamut(lin)) return lch;\n float lo = 0.0;\n float hi = lch.y;\n for (int i = 0; i < 16; i++) {\n float mid = 0.5 * (lo + hi);\n vec3 test = vec3(lch.x, mid, lch.z);\n if (inGamut(oklabToLinearSrgb(oklchToOklab(test)))) {\n lo = mid;\n } else {\n hi = mid;\n }\n }\n return vec3(lch.x, lo, lch.z);\n}", J = "\n", Y = "#version 300 es\nprecision highp float;\n\nin vec2 vUv;\nout vec4 fragColor;\n\nuniform vec2 uResolution;\nuniform float uTime;\nuniform vec3 uBaseColor;\n\n// Pointer\nuniform vec2 uPointer;\nuniform float uPointerActive;\nuniform float uPointerAttraction;\nuniform float uPointerStrength;\n\n// Main body\nuniform float uBodyRadius;\n\n// Pulsation\nuniform float uPulsePhase;\nuniform float uPulseAmp;\n\n// Surface noise\nuniform float uNoiseAmp;\nuniform float uNoiseFreq;\nuniform float uNoiseSpeed;\n\n// Gooey\nuniform float uSmoothK;\n\n// Color perturbation (perceptually uniform — OKLCh L/C/h)\nuniform float uHueRange; // degrees of hue swing (converted to radians)\nuniform float uSatShift; // OKLCh chroma swing\nuniform float uBrightnessShift; // OKLCh lightness bias\nuniform float uColorNoiseFreq;\nuniform float uColorNoiseSpeed;\n\n// Satellites (max 4)\n#define MAX_SATS 4\nuniform int uSatCount;\nuniform vec2 uSatPos[MAX_SATS];\nuniform float uSatRadius[MAX_SATS];\nuniform float uSatOpacity[MAX_SATS];\n\nconst float PI = 3.141592653589793;\n\n" + G + J + `${t}
352
352
 
353
353
  ` + K + J + W + J + `
354
354
  // --- Color (Ottosson OKLab/OKLCh — value.js EXACT constants, transposed) ---
@@ -362,7 +362,7 @@ var U = "#version 300 es\n\nin vec2 aPosition;\nout vec2 vUv;\n\nvoid main() {\n
362
362
  ${i}
363
363
  ${o}
364
364
 
365
- ` + q + J + "\nvoid main() {\n vec2 uv = vUv - 0.5;\n\n // Pointer deformation\n if (uPointerActive > 0.5) {\n vec2 pointerDir = uPointer - uv;\n float pointerDist = length(pointerDir);\n float influence = smoothstep(0.4, 0.0, pointerDist) * uPointerAttraction * uPointerStrength;\n uv -= normalize(pointerDir + 1e-6) * influence;\n }\n\n // Main body with pulsation\n float bodyR = uBodyRadius + sin(uPulsePhase) * uPulseAmp;\n\n // FBM displacement for organic watercolor edge\n float noiseVal = fbm(uv * uNoiseFreq + uTime * uNoiseSpeed, 3);\n float bodyDisplacement = (noiseVal - 0.5) * uNoiseAmp;\n\n float d = sdCircle(uv, vec2(0.0), bodyR + bodyDisplacement);\n\n // Satellites\n for (int i = 0; i < MAX_SATS; i++) {\n if (i >= uSatCount) break;\n float satD = sdCircle(uv, uSatPos[i], uSatRadius[i]);\n satD += (1.0 - uSatOpacity[i]) * 0.3;\n d = smin(d, satD, uSmoothK);\n }\n\n // Edit #1 — fwidth-based anti-aliased edge: derive the smoothstep half-width\n // from the SDF screen-space gradient so the edge stays ~1px regardless of zoom.\n float aa = max(fwidth(d), 1e-6);\n float alpha = 1.0 - smoothstep(-aa, aa, d);\n\n if (alpha < 0.001) {\n fragColor = vec4(0.0);\n return;\n }\n\n // Edit #4 — perceptually-uniform OKLCh variation. Gamma base → linear → OKLab\n // → OKLCh; perturb L/C/h; OKLCh → OKLab → linear; hue-preserving gamut clamp.\n vec3 oklch = oklabToOklch(srgbToOklab(uBaseColor));\n\n float colorNoise = fbm(uv * uColorNoiseFreq + uTime * uColorNoiseSpeed, 3);\n oklch.z += (colorNoise - 0.5) * uHueRange * (PI / 180.0); // hue swing, radians\n oklch.y = max(oklch.y + (colorNoise - 0.5) * uSatShift, 0.0); // chroma swing\n oklch.x = clamp(oklch.x + uBrightnessShift, 0.0, 1.0); // lightness bias\n\n // Subtle inner glow near the edge — lifts OKLCh lightness inward.\n float edgeGlow = smoothstep(0.0, -bodyR * 0.6, d);\n oklch.x = mix(oklch.x, min(oklch.x + 0.06, 1.0), 1.0 - edgeGlow);\n\n oklch = gamutClampOklch(oklch);\n\n vec3 lin = oklabToLinearSrgb(oklchToOklab(oklch));\n vec3 rgb = clamp(linearToSrgb(lin), 0.0, 1.0); // MANDATORY OETF — closes the seam\n\n // Edit #8 — premultiply AFTER the OETF: straight-alpha gamma → premultiplied.\n fragColor = vec4(rgb * alpha, alpha);\n}", X = 4, Z = "[GooBlob]", Q = 1 / 1.6, te = [
365
+ ` + q + J + "\nvoid main() {\n vec2 uv = vUv - 0.5;\n\n // Pointer deformation\n if (uPointerActive > 0.5) {\n vec2 pointerDir = uPointer - uv;\n float pointerDist = length(pointerDir);\n float influence = smoothstep(0.4, 0.0, pointerDist) * uPointerAttraction * uPointerStrength;\n uv -= normalize(pointerDir + 1e-6) * influence;\n }\n\n // Main body with pulsation\n float bodyR = uBodyRadius + sin(uPulsePhase) * uPulseAmp;\n\n // FBM displacement for organic watercolor edge\n float noiseVal = fbm(uv * uNoiseFreq + uTime * uNoiseSpeed, 3);\n float bodyDisplacement = (noiseVal - 0.5) * uNoiseAmp;\n\n float d = sdCircle(uv, vec2(0.0), bodyR + bodyDisplacement);\n\n // Satellites\n for (int i = 0; i < MAX_SATS; i++) {\n if (i >= uSatCount) break;\n float satD = sdCircle(uv, uSatPos[i], uSatRadius[i]);\n satD += (1.0 - uSatOpacity[i]) * 0.3;\n d = smin(d, satD, uSmoothK);\n }\n\n // Edit #1 — fwidth-based anti-aliased edge: derive the smoothstep half-width\n // from the SDF screen-space gradient so the edge stays ~1px regardless of zoom.\n float aa = max(fwidth(d), 1e-6);\n float alpha = 1.0 - smoothstep(-aa, aa, d);\n\n if (alpha < 0.001) {\n fragColor = vec4(0.0);\n return;\n }\n\n // Edit #4 — perceptually-uniform OKLCh variation. Gamma base → linear → OKLab\n // → OKLCh; perturb L/C/h; OKLCh → OKLab → linear; hue-preserving gamut clamp.\n vec3 oklch = oklabToOklch(srgbToOklab(uBaseColor));\n\n float colorNoise = fbm(uv * uColorNoiseFreq + uTime * uColorNoiseSpeed, 3);\n oklch.z += (colorNoise - 0.5) * uHueRange * (PI / 180.0); // hue swing, radians\n oklch.y = max(oklch.y + (colorNoise - 0.5) * uSatShift, 0.0); // chroma swing\n oklch.x = clamp(oklch.x + uBrightnessShift, 0.0, 1.0); // lightness bias\n\n // Subtle inner glow near the edge — lifts OKLCh lightness inward.\n float edgeGlow = smoothstep(0.0, -bodyR * 0.6, d);\n oklch.x = mix(oklch.x, min(oklch.x + 0.06, 1.0), 1.0 - edgeGlow);\n\n oklch = gamutClampOklch(oklch);\n\n vec3 lin = oklabToLinearSrgb(oklchToOklab(oklch));\n vec3 rgb = clamp(linearToSrgb(lin), 0.0, 1.0); // MANDATORY OETF — closes the seam\n\n // Edit #8 — premultiply AFTER the OETF: straight-alpha gamma → premultiplied.\n fragColor = vec4(rgb * alpha, alpha);\n}", X = 4, Z = "[GooBlob]", Q = 1 / 1.6, ne = [
366
366
  "uResolution",
367
367
  "uTime",
368
368
  "uBaseColor",
@@ -394,16 +394,16 @@ function $(e) {
394
394
  let n = f(e);
395
395
  return m.size > 256 && m.clear(), m.set(e, n), n;
396
396
  }
397
- let _ = null, v = !1;
397
+ let g = null, _ = !1;
398
398
  c(t, {
399
- pause: () => _?.suspend("off-screen"),
400
- resume: () => _?.resume("off-screen")
399
+ pause: () => g?.suspend("off-screen"),
400
+ resume: () => g?.resume("off-screen")
401
401
  }, {
402
402
  rootMargin: "200px",
403
403
  pauseWhenHidden: !1
404
404
  });
405
405
  function y(e) {
406
- _ = a(e, {
406
+ g = a(e, {
407
407
  contextAttrs: {
408
408
  alpha: !0,
409
409
  premultipliedAlpha: !0,
@@ -411,7 +411,7 @@ function $(e) {
411
411
  preserveDrawingBuffer: !1
412
412
  },
413
413
  setup: (t) => {
414
- let a = s(t, t.VERTEX_SHADER, U, Z), c = s(t, t.FRAGMENT_SHADER, Y, Z), f = r(t, a, c, Z);
414
+ let a = s(t, t.VERTEX_SHADER, te, Z), c = s(t, t.FRAGMENT_SHADER, Y, Z), f = r(t, a, c, Z);
415
415
  t.useProgram(f);
416
416
  let m = t.createVertexArray();
417
417
  t.bindVertexArray(m);
@@ -430,10 +430,10 @@ function $(e) {
430
430
  1,
431
431
  1
432
432
  ]), t.STATIC_DRAW);
433
- let _ = t.getAttribLocation(f, "aPosition");
434
- t.enableVertexAttribArray(_), t.vertexAttribPointer(_, 2, t.FLOAT, !1, 0, 0);
433
+ let v = t.getAttribLocation(f, "aPosition");
434
+ t.enableVertexAttribArray(v), t.vertexAttribPointer(v, 2, t.FLOAT, !1, 0, 0);
435
435
  let y = {};
436
- for (let e of te) y[e] = t.getUniformLocation(f, e);
436
+ for (let e of ne) y[e] = t.getUniformLocation(f, e);
437
437
  let b = [], x = [], S = [];
438
438
  for (let e = 0; e < X; e++) b.push(t.getUniformLocation(f, `uSatPos[${e}]`)), x.push(t.getUniformLocation(f, `uSatRadius[${e}]`)), S.push(t.getUniformLocation(f, `uSatOpacity[${e}]`));
439
439
  t.enable(t.BLEND), t.blendFunc(t.ONE, t.ONE_MINUS_SRC_ALPHA);
@@ -457,7 +457,7 @@ function $(e) {
457
457
  t.clearColor(0, 0, 0, 0), t.clear(t.COLOR_BUFFER_BIT), t.drawArrays(t.TRIANGLES, 0, 6), t.bindVertexArray(null);
458
458
  }
459
459
  function T() {
460
- return !v;
460
+ return !_;
461
461
  }
462
462
  return {
463
463
  frame: w,
@@ -468,24 +468,24 @@ function $(e) {
468
468
  }
469
469
  };
470
470
  }
471
- }), _.arm();
471
+ }), g.arm();
472
472
  }
473
- return S(t, (e) => {
474
- e && !_ && y(e);
475
- }, { immediate: !0 }), S(i, () => _?.wake()), g(() => {
476
- _?.dispose(), _ = null;
473
+ return C(t, (e) => {
474
+ e && !g && y(e);
475
+ }, { immediate: !0 }), C(i, () => g?.wake()), v(() => {
476
+ g?.dispose(), g = null;
477
477
  }), {
478
478
  pause: () => {
479
- v = !0, _?.suspend("manual");
479
+ _ = !0, g?.suspend("manual");
480
480
  },
481
481
  resume: () => {
482
- v = !1, _?.resume("manual");
482
+ _ = !1, g?.resume("manual");
483
483
  }
484
484
  };
485
485
  }
486
486
  //#endregion
487
487
  //#region src/components/custom/goo-blob/GooBlob.vue
488
- var ne = /* @__PURE__ */ e(/* @__PURE__ */ p({
488
+ var re = /* @__PURE__ */ e(/* @__PURE__ */ m({
489
489
  __name: "GooBlob",
490
490
  props: {
491
491
  color: {},
@@ -495,37 +495,56 @@ var ne = /* @__PURE__ */ e(/* @__PURE__ */ p({
495
495
  },
496
496
  emits: ["click"],
497
497
  setup(e, { expose: t, emit: n }) {
498
- let r = n, i = m(w, null), a = e.config ?? i;
498
+ let r = n, i = h(T, null), a = e.config ?? i;
499
499
  if (!a) throw Error("[glass-ui] GooBlob: no blob config. Pass an explicit `config` prop (e.g. BLOB_CONFIG_DEFAULTS) or provide(BLOB_CONFIG_KEY, cfg) from an ancestor. There is no silent defaults synthesis.");
500
- let o = x("canvasRef"), s = x("wrapperRef"), c = A(), l = M(s), u = H(a, e.color + e.seed), p = b(() => e.color);
500
+ let o = S("canvasRef"), s = S("wrapperRef"), c = j(), l = N(s), u = U(a, e.color + e.seed), m = x(e.color);
501
+ function v(e) {
502
+ if (!e.includes("var(")) return e;
503
+ let t = s.value;
504
+ if (typeof window > "u" || !t) return e;
505
+ let n = t.style.color;
506
+ t.style.color = e;
507
+ let r = getComputedStyle(t).color;
508
+ return t.style.color = n, r || e;
509
+ }
510
+ function b() {
511
+ m.value = v(e.color);
512
+ }
501
513
  $({
502
514
  canvasRef: o,
503
- color: p,
515
+ color: m,
504
516
  mood: c,
505
517
  pointer: l,
506
518
  satellites: u,
507
519
  config: a,
508
520
  colorResolver: e.colorResolver
509
- }), S(p, (t) => {
510
- u.reseed(t + e.seed);
521
+ }), C(s, b, { immediate: !0 });
522
+ let w = null;
523
+ typeof document < "u" && (w = new MutationObserver(b), w.observe(document.documentElement, {
524
+ attributes: !0,
525
+ attributeFilter: ["class"]
526
+ })), C(d(() => e.color), (t) => {
527
+ b(), u.reseed(t + e.seed);
528
+ }), _(() => {
529
+ w?.disconnect(), w = null;
511
530
  });
512
- function g() {
531
+ function E() {
513
532
  u.nudge();
514
533
  }
515
- function v(e) {
534
+ function D(e) {
516
535
  c.setMood(e);
517
536
  }
518
537
  return t({
519
- nudge: g,
520
- setMood: v,
538
+ nudge: E,
539
+ setMood: D,
521
540
  currentMood: c.currentMood
522
- }), (t, n) => (_(), d("div", {
541
+ }), (t, n) => (y(), f("div", {
523
542
  ref_key: "wrapperRef",
524
543
  ref: s,
525
544
  class: "goo-blob-wrapper",
526
- style: h({ "--blob-color": e.color }),
545
+ style: g({ "--blob-color": e.color }),
527
546
  onClick: n[0] ||= (e) => r("click")
528
- }, [f("canvas", {
547
+ }, [p("canvas", {
529
548
  ref_key: "canvasRef",
530
549
  ref: o,
531
550
  class: "goo-blob-canvas",
@@ -533,6 +552,6 @@ var ne = /* @__PURE__ */ e(/* @__PURE__ */ p({
533
552
  "data-testid": "goo-blob-canvas"
534
553
  }, null, 512)], 4));
535
554
  }
536
- }), [["__scopeId", "data-v-ff366d67"]]);
555
+ }), [["__scopeId", "data-v-bb3e5830"]]);
537
556
  //#endregion
538
- export { C as BLOB_CONFIG_DEFAULTS, w as BLOB_CONFIG_KEY, ne as GooBlob, A as useBlobMood, M as useBlobPointer, H as useBlobSatellites, $ as useMetaballRenderer };
557
+ export { w as BLOB_CONFIG_DEFAULTS, T as BLOB_CONFIG_KEY, re as GooBlob, j as useBlobMood, N as useBlobPointer, U as useBlobSatellites, $ as useMetaballRenderer };
package/dist/index.d.ts CHANGED
@@ -42,6 +42,7 @@ export * from "./components/custom/disco-glyph";
42
42
  export * from "./components/custom/hover-popover";
43
43
  export * from "./components/custom/configurator";
44
44
  export * from "./components/custom/scrolling-text";
45
+ export * from "./components/custom/deck-progress";
45
46
  export * from "./composables/reactive";
46
47
  export * from "./composables/dom";
47
48
  export * from "./composables/glass";
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./cn-DJXf4yaB.js";
2
2
  import { a as t, i as n, o as r, r as i, s as a } from "./SelectScrollDownButton-BGn3rjs9.js";
3
3
  import { t as o } from "./SelectGroup-CMdoCjRE.js";
4
- import { n as s } from "./slider-BOh8ycfZ.js";
4
+ import { n as s } from "./slider-CgNzRSh6.js";
5
5
  import { t as c } from "./Switch-x8n6husW.js";
6
6
  import { t as l } from "./Input-CU9CNKmo.js";
7
7
  import { t as u } from "./IconTooltip-BTyYn4mr.js";
@@ -1,5 +1,5 @@
1
1
  import { i as e, n as t, r as n, t as r } from "./vReveal-u2wSG2El.js";
2
- import { n as i, t as a } from "./useViewTransition-D4ssvnXZ.js";
2
+ import { n as i, t as a } from "./useViewTransition-CJnqg6wl.js";
3
3
  import { n as o, t as s } from "./useIntersectionPause-DAdVPVp4.js";
4
4
  import { n as c, t as l } from "./constants-DsCdlK9I.js";
5
5
  import { computed as u, getCurrentScope as d, onBeforeUnmount as f, onMounted as p, onScopeDispose as m, reactive as h, readonly as g, ref as _, unref as v, watch as y } from "vue";
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, r, t as i } from "./NumberFieldContent-iOTQ5rGO.js";
1
+ import { a as e, i as t, n, r, t as i } from "./NumberFieldContent-jO-zGOHf.js";
2
2
  export { e as NumberField, i as NumberFieldContent, n as NumberFieldDecrement, r as NumberFieldIncrement, t as NumberFieldInput };
package/dist/search.js CHANGED
@@ -3,7 +3,7 @@ import { n as t, t as n } from "./minimize-2-BP27-qBY.js";
3
3
  import { t as r } from "./search-DBG8qaRs.js";
4
4
  import { t as i } from "./x-C4pz9nbD.js";
5
5
  import { n as a } from "./badge-Cl6JZ1B7.js";
6
- import { n as o } from "./button-Ckn3eDfB.js";
6
+ import { n as o } from "./button-i8Ek5vvg.js";
7
7
  import { n as s, t as c } from "./DialogContent-IQ8_BRrC.js";
8
8
  import { t as l } from "./useTextHighlight-Dmtofpk2.js";
9
9
  import { n as u, r as d, t as f } from "./PopoverContent-B8WtJECb.js";
@@ -108,7 +108,7 @@ var w = /* @__PURE__ */ t(/* @__PURE__ */ l({
108
108
  "data-touch-active"
109
109
  ]));
110
110
  }
111
- }), [["__scopeId", "data-v-78e48602"]]), T = C("glass-slider focus-ring relative flex w-full touch-none select-none items-center transition-colors", {
111
+ }), [["__scopeId", "data-v-d91b5dad"]]), T = C("glass-slider focus-ring relative flex w-full touch-none select-none items-center transition-colors", {
112
112
  variants: {
113
113
  variant: {
114
114
  standard: "",
package/dist/slider.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./slider-BOh8ycfZ.js";
1
+ import { n as e, t } from "./slider-CgNzRSh6.js";
2
2
  export { e as Slider, t as sliderVariants };