@mkbabb/glass-ui 0.2.0 → 0.3.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.
package/dist/glass-ui.js CHANGED
@@ -661,26 +661,26 @@ function Br(e, t, n, o, a, s, l, i, u, c, f, d, m, h, _, k, b, v, C) {
661
661
  direction: E
662
662
  } = e, L = ["INPUT", "SELECT", "TEXTAREA"], F = {
663
663
  passive: !1
664
- }, H = ct(), O = ct(), D = Ue(50, 225).constrain(h.measure(20)), x = {
664
+ }, N = ct(), O = ct(), D = Ue(50, 225).constrain(h.measure(20)), x = {
665
665
  mouse: 300,
666
666
  touch: 400
667
667
  }, T = {
668
668
  mouse: 500,
669
669
  touch: 600
670
670
  }, I = _ ? 43 : 25;
671
- let j = !1, N = 0, U = 0, X = !1, ee = !1, q = !1, K = !1;
671
+ let j = !1, H = 0, U = 0, X = !1, ee = !1, q = !1, K = !1;
672
672
  function Q(W) {
673
673
  if (!C) return;
674
674
  function le(ve) {
675
675
  (Pt(C) || C(W, ve)) && Fe(ve);
676
676
  }
677
677
  const me = t;
678
- H.add(me, "dragstart", (ve) => ve.preventDefault(), F).add(me, "touchmove", () => {
678
+ N.add(me, "dragstart", (ve) => ve.preventDefault(), F).add(me, "touchmove", () => {
679
679
  }, F).add(me, "touchend", () => {
680
680
  }).add(me, "touchstart", le).add(me, "mousedown", le).add(me, "touchcancel", ye).add(me, "contextmenu", ye).add(me, "click", Me, !0);
681
681
  }
682
682
  function Z() {
683
- H.clear(), O.clear();
683
+ N.clear(), O.clear();
684
684
  }
685
685
  function fe() {
686
686
  const W = K ? n : t;
@@ -699,11 +699,11 @@ function Br(e, t, n, o, a, s, l, i, u, c, f, d, m, h, _, k, b, v, C) {
699
699
  }
700
700
  function Fe(W) {
701
701
  const le = Xt(W, o);
702
- K = le, q = _ && le && !W.buttons && j, j = nt(a.get(), l.get()) >= 2, !(le && W.button !== 0) && ($e(W.target) || (X = !0, s.pointerDown(W), c.useFriction(0).useDuration(0), a.set(l), fe(), N = s.readPoint(W), U = s.readPoint(W, $), m.emit("pointerDown")));
702
+ K = le, q = _ && le && !W.buttons && j, j = nt(a.get(), l.get()) >= 2, !(le && W.button !== 0) && ($e(W.target) || (X = !0, s.pointerDown(W), c.useFriction(0).useDuration(0), a.set(l), fe(), H = s.readPoint(W), U = s.readPoint(W, $), m.emit("pointerDown")));
703
703
  }
704
704
  function he(W) {
705
705
  if (!Xt(W, o) && W.touches.length >= 2) return ye(W);
706
- const me = s.readPoint(W), ve = s.readPoint(W, $), Ae = nt(me, N), Pe = nt(ve, U);
706
+ const me = s.readPoint(W), ve = s.readPoint(W, $), Ae = nt(me, H), Pe = nt(ve, U);
707
707
  if (!ee && !K && (!W.cancelable || (ee = Ae > Pe, !ee)))
708
708
  return ye(W);
709
709
  const je = s.pointerMove(W);
@@ -794,8 +794,8 @@ function Ar(e, t, n, o, a, s, l) {
794
794
  function v(C) {
795
795
  for (const $ of C) {
796
796
  if (d) return;
797
- const E = $.target === e, L = o.indexOf($.target), F = E ? c : f[L], H = m(E ? e : o[L]);
798
- if (de(H - F) >= 0.5) {
797
+ const E = $.target === e, L = o.indexOf($.target), F = E ? c : f[L], N = m(E ? e : o[L]);
798
+ if (de(N - F) >= 0.5) {
799
799
  b.reInit(), t.emit("resize");
800
800
  break;
801
801
  }
@@ -818,9 +818,9 @@ function Ar(e, t, n, o, a, s, l) {
818
818
  function Mr(e, t, n, o, a, s) {
819
819
  let l = 0, i = 0, u = a, c = s, f = e.get(), d = 0;
820
820
  function m() {
821
- const F = o.get() - e.get(), H = !u;
821
+ const F = o.get() - e.get(), N = !u;
822
822
  let O = 0;
823
- return H ? (l = 0, n.set(o), e.set(o), O = F) : (n.set(e), l += F / u, l *= c, f += l, e.add(l), O = f - d), i = nn(O), d = f, L;
823
+ return N ? (l = 0, n.set(o), e.set(o), O = F) : (n.set(e), l += F / u, l *= c, f += l, e.add(l), O = f - d), i = nn(O), d = f, L;
824
824
  }
825
825
  function h() {
826
826
  const F = o.get() - t.get();
@@ -1148,22 +1148,22 @@ function mo(e, t) {
1148
1148
  }
1149
1149
  function jr(e, t, n, o, a, s, l, i, u) {
1150
1150
  const f = lt(a), d = lt(a).reverse(), m = v().concat(C());
1151
- function h(H, O) {
1152
- return H.reduce((D, x) => D - a[x], O);
1151
+ function h(N, O) {
1152
+ return N.reduce((D, x) => D - a[x], O);
1153
1153
  }
1154
- function _(H, O) {
1155
- return H.reduce((D, x) => h(D, O) > 0 ? D.concat([x]) : D, []);
1154
+ function _(N, O) {
1155
+ return N.reduce((D, x) => h(D, O) > 0 ? D.concat([x]) : D, []);
1156
1156
  }
1157
- function k(H) {
1157
+ function k(N) {
1158
1158
  return s.map((O, D) => ({
1159
- start: O - o[D] + 0.5 + H,
1160
- end: O + t - 0.5 + H
1159
+ start: O - o[D] + 0.5 + N,
1160
+ end: O + t - 0.5 + N
1161
1161
  }));
1162
1162
  }
1163
- function b(H, O, D) {
1163
+ function b(N, O, D) {
1164
1164
  const x = k(O);
1165
- return H.map((T) => {
1166
- const I = D ? 0 : -n, j = D ? n : 0, N = D ? "end" : "start", U = x[T][N];
1165
+ return N.map((T) => {
1166
+ const I = D ? 0 : -n, j = D ? n : 0, H = D ? "end" : "start", U = x[T][H];
1167
1167
  return {
1168
1168
  index: T,
1169
1169
  loopPoint: U,
@@ -1174,33 +1174,33 @@ function jr(e, t, n, o, a, s, l, i, u) {
1174
1174
  });
1175
1175
  }
1176
1176
  function v() {
1177
- const H = l[0], O = _(d, H);
1177
+ const N = l[0], O = _(d, N);
1178
1178
  return b(O, n, !1);
1179
1179
  }
1180
1180
  function C() {
1181
- const H = t - l[0] - 1, O = _(f, H);
1181
+ const N = t - l[0] - 1, O = _(f, N);
1182
1182
  return b(O, -n, !0);
1183
1183
  }
1184
1184
  function $() {
1185
1185
  return m.every(({
1186
- index: H
1186
+ index: N
1187
1187
  }) => {
1188
- const O = f.filter((D) => D !== H);
1188
+ const O = f.filter((D) => D !== N);
1189
1189
  return h(O, t) <= 0.1;
1190
1190
  });
1191
1191
  }
1192
1192
  function E() {
1193
- m.forEach((H) => {
1193
+ m.forEach((N) => {
1194
1194
  const {
1195
1195
  target: O,
1196
1196
  translate: D,
1197
1197
  slideLocation: x
1198
- } = H, T = O();
1198
+ } = N, T = O();
1199
1199
  T !== x.get() && (D.to(T), x.set(T));
1200
1200
  });
1201
1201
  }
1202
1202
  function L() {
1203
- m.forEach((H) => H.translate.clear());
1203
+ m.forEach((N) => N.translate.clear());
1204
1204
  }
1205
1205
  return {
1206
1206
  canLoop: $,
@@ -1311,8 +1311,8 @@ function Gr(e, t, n, o, a, s, l, i, u) {
1311
1311
  }
1312
1312
  function _(v) {
1313
1313
  return v.length ? lt(v).reduce((C, $, E) => {
1314
- const L = Te(C) || 0, F = L === 0, H = $ === pt(v), O = a[c] - s[L][c], D = a[c] - s[$][f], x = !o && F ? d(l) : 0, T = !o && H ? d(i) : 0, I = de(D - T - (O + x));
1315
- return E && I > t + u && C.push($), H && C.push(v.length), C;
1314
+ const L = Te(C) || 0, F = L === 0, N = $ === pt(v), O = a[c] - s[L][c], D = a[c] - s[$][f], x = !o && F ? d(l) : 0, T = !o && N ? d(i) : 0, I = de(D - T - (O + x));
1315
+ return E && I > t + u && C.push($), N && C.push(v.length), C;
1316
1316
  }, []).map((C, $, E) => {
1317
1317
  const L = Math.max(E[$ - 1] || 0);
1318
1318
  return v.slice(L, C);
@@ -1343,18 +1343,18 @@ function Ur(e, t, n, o, a, s, l) {
1343
1343
  watchSlides: E,
1344
1344
  watchDrag: L,
1345
1345
  watchFocus: F
1346
- } = s, H = 2, O = Tr(), D = O.measure(t), x = n.map(O.measure), T = Cr(u, c), I = T.measureSize(D), j = $r(I), N = wr(i, I), U = !d && !!C, X = d || !!C, {
1346
+ } = s, N = 2, O = Tr(), D = O.measure(t), x = n.map(O.measure), T = Cr(u, c), I = T.measureSize(D), j = $r(I), H = wr(i, I), U = !d && !!C, X = d || !!C, {
1347
1347
  slideSizes: ee,
1348
1348
  slideSizesWithGaps: q,
1349
1349
  startGap: K,
1350
1350
  endGap: Q
1351
- } = qr(T, D, x, n, X, a), Z = Gr(T, I, b, d, D, x, K, Q, H), {
1351
+ } = qr(T, D, x, n, X, a), Z = Gr(T, I, b, d, D, x, K, Q, N), {
1352
1352
  snaps: fe,
1353
1353
  snapsAligned: $e
1354
- } = Lr(T, N, D, x, Z), ce = -Te(fe) + Te(q), {
1354
+ } = Lr(T, H, D, x, Z), ce = -Te(fe) + Te(q), {
1355
1355
  snapsContained: Ve,
1356
1356
  scrollContainLimit: Fe
1357
- } = Or(I, ce, $e, C, H), he = U ? Ve : $e, {
1357
+ } = Or(I, ce, $e, C, N), he = U ? Ve : $e, {
1358
1358
  limit: ye
1359
1359
  } = Dr(ce, he, d), Me = po(pt(he), f, d), Ce = Me.clone(), ue = lt(n), W = ({
1360
1360
  dragHandler: Ke,
@@ -1521,7 +1521,7 @@ function Bt(e, t, n) {
1521
1521
  off: h,
1522
1522
  emit: _
1523
1523
  } = u, k = T;
1524
- let b = !1, v, C = c(Wr, Bt.globalOptions), $ = c(C), E = [], L, F, H;
1524
+ let b = !1, v, C = c(Wr, Bt.globalOptions), $ = c(C), E = [], L, F, N;
1525
1525
  function O() {
1526
1526
  const {
1527
1527
  container: ue,
@@ -1529,10 +1529,10 @@ function Bt(e, t, n) {
1529
1529
  } = $;
1530
1530
  F = (Wt(ue) ? e.querySelector(ue) : ue) || e.children[0];
1531
1531
  const me = Wt(W) ? F.querySelectorAll(W) : W;
1532
- H = [].slice.call(me || F.children);
1532
+ N = [].slice.call(me || F.children);
1533
1533
  }
1534
1534
  function D(ue) {
1535
- const W = Ur(e, F, H, o, a, ue, u);
1535
+ const W = Ur(e, F, N, o, a, ue, u);
1536
1536
  if (ue.loop && !W.slideLooper.canLoop()) {
1537
1537
  const le = Object.assign({}, ue, {
1538
1538
  loop: !1
@@ -1544,7 +1544,7 @@ function Bt(e, t, n) {
1544
1544
  function x(ue, W) {
1545
1545
  b || (C = c(C, ue), $ = f(C), E = W || E, O(), v = D($), d([C, ...E.map(({
1546
1546
  options: le
1547
- }) => le)]).forEach((le) => i.add(le, "change", T)), $.active && (v.translate.to(v.location.get()), v.animation.init(), v.slidesInView.init(), v.slideFocus.init(Ce), v.eventHandler.init(Ce), v.resizeHandler.init(Ce), v.slidesHandler.init(Ce), v.options.loop && v.slideLooper.loop(), F.offsetParent && H.length && v.dragHandler.init(Ce), L = l.init(Ce, E)));
1547
+ }) => le)]).forEach((le) => i.add(le, "change", T)), $.active && (v.translate.to(v.location.get()), v.animation.init(), v.slidesInView.init(), v.slideFocus.init(Ce), v.eventHandler.init(Ce), v.resizeHandler.init(Ce), v.slidesHandler.init(Ce), v.options.loop && v.slideLooper.loop(), F.offsetParent && N.length && v.dragHandler.init(Ce), L = l.init(Ce, E)));
1548
1548
  }
1549
1549
  function T(ue, W) {
1550
1550
  const le = Z();
@@ -1558,16 +1558,16 @@ function Bt(e, t, n) {
1558
1558
  function j() {
1559
1559
  b || (b = !0, i.clear(), I(), u.emit("destroy"), u.clear());
1560
1560
  }
1561
- function N(ue, W, le) {
1561
+ function H(ue, W, le) {
1562
1562
  !$.active || b || (v.scrollBody.useBaseFriction().useDuration(W === !0 ? 0 : $.duration), v.scrollTo.index(ue, le || 0));
1563
1563
  }
1564
1564
  function U(ue) {
1565
1565
  const W = v.index.add(1).get();
1566
- N(W, ue, -1);
1566
+ H(W, ue, -1);
1567
1567
  }
1568
1568
  function X(ue) {
1569
1569
  const W = v.index.add(-1).get();
1570
- N(W, ue, 1);
1570
+ H(W, ue, 1);
1571
1571
  }
1572
1572
  function ee() {
1573
1573
  return v.index.add(1).get() !== Z();
@@ -1606,7 +1606,7 @@ function Bt(e, t, n) {
1606
1606
  return F;
1607
1607
  }
1608
1608
  function Me() {
1609
- return H;
1609
+ return N;
1610
1610
  }
1611
1611
  const Ce = {
1612
1612
  canScrollNext: ee,
@@ -1625,7 +1625,7 @@ function Bt(e, t, n) {
1625
1625
  scrollPrev: X,
1626
1626
  scrollProgress: Q,
1627
1627
  scrollSnapList: K,
1628
- scrollTo: N,
1628
+ scrollTo: H,
1629
1629
  selectedScrollSnap: Z,
1630
1630
  slideNodes: Me,
1631
1631
  slidesInView: $e,
@@ -5173,11 +5173,12 @@ const ad = /* @__PURE__ */ y({
5173
5173
  }, 8, ["class"]),
5174
5174
  (p(!0), M(se, null, pe(e.modelValue, (c, f) => (p(), S(r(ys), {
5175
5175
  key: f,
5176
+ "aria-label": i.$attrs["aria-label"] ?? void 0,
5176
5177
  class: z(r(B)(
5177
5178
  "slider-thumb block transition-colors focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",
5178
5179
  l.value === "spectrum" ? "w-3 h-full rounded-full border-2 border-foreground/40 bg-transparent" : l.value === "timeline" ? "h-6 w-6 rounded-full bg-foreground/15 border-none shadow-none" : "h-3.5 w-3.5 rounded-full border-2 border-background bg-foreground shadow-sm"
5179
5180
  ))
5180
- }, null, 8, ["class"]))), 128))
5181
+ }, null, 8, ["aria-label", "class"]))), 128))
5181
5182
  ]),
5182
5183
  _: 1
5183
5184
  }, 16, ["class"]));
@@ -6109,12 +6110,12 @@ function Bi(e) {
6109
6110
  function F() {
6110
6111
  s() || _ || (v(), i.value === "collapsed" && (i.value = "hover", b()));
6111
6112
  }
6112
- function H(N) {
6113
+ function N(H) {
6113
6114
  if (!s() && i.value === "hover") {
6114
6115
  if (d > 0) return;
6115
- if (N) {
6116
+ if (H) {
6116
6117
  const U = n.value;
6117
- if (U && N.relatedTarget instanceof Node && U.contains(N.relatedTarget) || jt(N.relatedTarget)) return;
6118
+ if (U && H.relatedTarget instanceof Node && U.contains(H.relatedTarget) || jt(H.relatedTarget)) return;
6118
6119
  }
6119
6120
  C();
6120
6121
  }
@@ -6122,10 +6123,10 @@ function Bi(e) {
6122
6123
  function O() {
6123
6124
  s() || _ || (v(), i.value === "collapsed" && (i.value = "hover", b()));
6124
6125
  }
6125
- function D(N) {
6126
+ function D(H) {
6126
6127
  if (s() || i.value !== "hover" || d > 0) return;
6127
- const U = N.currentTarget;
6128
- N.relatedTarget && U.contains(N.relatedTarget) || jt(N.relatedTarget) || C();
6128
+ const U = H.currentTarget;
6129
+ H.relatedTarget && U.contains(H.relatedTarget) || jt(H.relatedTarget) || C();
6129
6130
  }
6130
6131
  function x() {
6131
6132
  if (s()) {
@@ -6143,13 +6144,15 @@ function Bi(e) {
6143
6144
  }, Math.min(t, 800)));
6144
6145
  }
6145
6146
  vt("dockKeepOpen", T), vt("dockRelease", I), vt("dockExpanded", u);
6146
- function j(N) {
6147
+ function j(H) {
6147
6148
  if (s()) return;
6148
6149
  const U = n.value;
6149
- !U || U.contains(N.target) || jt(N.target) || E();
6150
+ if (!U || U.contains(H.target) || jt(H.target)) return;
6151
+ const X = U.getBoundingClientRect();
6152
+ H.clientX >= X.left && H.clientX <= X.right && H.clientY >= X.top && H.clientY <= X.bottom || E();
6150
6153
  }
6151
- return ne(u, (N) => {
6152
- N ? requestAnimationFrame(() => {
6154
+ return ne(u, (H) => {
6155
+ H ? requestAnimationFrame(() => {
6153
6156
  document.addEventListener(
6154
6157
  "pointerdown",
6155
6158
  j,
@@ -6162,8 +6165,8 @@ function Bi(e) {
6162
6165
  ), m = null;
6163
6166
  };
6164
6167
  }) : m?.();
6165
- }), typeof o != "boolean" ? ne(o, (N) => {
6166
- if (N) {
6168
+ }), typeof o != "boolean" ? ne(o, (H) => {
6169
+ if (H) {
6167
6170
  v(), i.value = "pinned", b();
6168
6171
  return;
6169
6172
  }
@@ -6175,7 +6178,7 @@ function Bi(e) {
6175
6178
  expanded: u,
6176
6179
  isPinned: c,
6177
6180
  onMouseEnter: F,
6178
- onMouseLeave: H,
6181
+ onMouseLeave: N,
6179
6182
  onFocusIn: O,
6180
6183
  onFocusOut: D,
6181
6184
  onClickCollapsed: x,
@@ -6268,7 +6271,7 @@ const Ti = ["inert"], $i = ["inert"], Ai = /* @__PURE__ */ y({
6268
6271
  );
6269
6272
  return Se(() => {
6270
6273
  (n.alwaysExpanded || !n.startCollapsed) && _();
6271
- }), t({ expanded: s, isPinned: l, expand: _, collapse: k, keepOpen: m, release: h }), (F, H) => (p(), M("div", {
6274
+ }), t({ expanded: s, isPinned: l, expand: _, collapse: k, keepOpen: m, release: h }), (F, N) => (p(), M("div", {
6272
6275
  ref_key: "dockEl",
6273
6276
  ref: o,
6274
6277
  class: z(["glass-dock", [
@@ -6276,14 +6279,14 @@ const Ti = ["inert"], $i = ["inert"], Ai = /* @__PURE__ */ y({
6276
6279
  e.position === "fixed" ? "fixed bottom-[var(--dock-pos)] left-1/2 -translate-x-1/2" : e.position === "sticky" ? "dock-sticky" : "dock-inline"
6277
6280
  ]]),
6278
6281
  style: De(L.value),
6279
- onMouseenter: H[1] || (H[1] = //@ts-ignore
6282
+ onMouseenter: N[1] || (N[1] = //@ts-ignore
6280
6283
  (...O) => r(i) && r(i)(...O)),
6281
- onMouseleave: H[2] || (H[2] = (O) => r(u)(O)),
6282
- onFocusin: H[3] || (H[3] = //@ts-ignore
6284
+ onMouseleave: N[2] || (N[2] = (O) => r(u)(O)),
6285
+ onFocusin: N[3] || (N[3] = //@ts-ignore
6283
6286
  (...O) => r(c) && r(c)(...O)),
6284
- onFocusout: H[4] || (H[4] = //@ts-ignore
6287
+ onFocusout: N[4] || (N[4] = //@ts-ignore
6285
6288
  (...O) => r(f) && r(f)(...O)),
6286
- onTransitionend: H[5] || (H[5] = //@ts-ignore
6289
+ onTransitionend: N[5] || (N[5] = //@ts-ignore
6287
6290
  (...O) => r(E) && r(E)(...O))
6288
6291
  }, [
6289
6292
  V("div", {
@@ -6298,7 +6301,7 @@ const Ti = ["inert"], $i = ["inert"], Ai = /* @__PURE__ */ y({
6298
6301
  V("div", {
6299
6302
  class: z(["dock-layer dock-layer--summary", { "layer-active": !r(b) }]),
6300
6303
  inert: r(s) || void 0,
6301
- onClick: H[0] || (H[0] = //@ts-ignore
6304
+ onClick: N[0] || (N[0] = //@ts-ignore
6302
6305
  (...O) => r(d) && r(d)(...O))
6303
6306
  }, [
6304
6307
  w(F.$slots, "collapsed", {}, void 0, !0)
@@ -6352,9 +6355,9 @@ const Ti = ["inert"], $i = ["inert"], Ai = /* @__PURE__ */ y({
6352
6355
  function E() {
6353
6356
  const D = C.value, x = $.value;
6354
6357
  if (!D || !x) return;
6355
- const T = D.getBoundingClientRect(), I = x.getBoundingClientRect(), j = window.innerWidth, N = window.innerHeight;
6358
+ const T = D.getBoundingClientRect(), I = x.getBoundingClientRect(), j = window.innerWidth, H = window.innerHeight;
6356
6359
  let U = a.direction;
6357
- U === "up" && T.top - I.height - gt < Re ? U = "down" : U === "down" && T.bottom + I.height + gt > N - Re && (U = "up"), u.value = U;
6360
+ U === "up" && T.top - I.height - gt < Re ? U = "down" : U === "down" && T.bottom + I.height + gt > H - Re && (U = "up"), u.value = U;
6358
6361
  const X = {
6359
6362
  position: "absolute",
6360
6363
  zIndex: 50 + l.value % 50
@@ -6375,14 +6378,14 @@ const Ti = ["inert"], $i = ["inert"], Ai = /* @__PURE__ */ y({
6375
6378
  i.value = X;
6376
6379
  }
6377
6380
  ne(s, async (D) => {
6378
- D ? (H(), await ge(), E()) : O();
6381
+ D ? (N(), await ge(), E()) : O();
6379
6382
  });
6380
6383
  let L = null;
6381
6384
  function F(D) {
6382
6385
  const x = C.value;
6383
6386
  !x || x.contains(D.target) || (s.value = !1);
6384
6387
  }
6385
- function H() {
6388
+ function N() {
6386
6389
  ge(() => {
6387
6390
  document.addEventListener("pointerdown", F, !0), L = () => {
6388
6391
  document.removeEventListener("pointerdown", F, !0), L = null;
@@ -6956,8 +6959,8 @@ function qi(e, t) {
6956
6959
  1,
6957
6960
  1
6958
6961
  ]), a.STATIC_DRAW);
6959
- const N = a.getAttribLocation(s, "a_position");
6960
- a.enableVertexAttribArray(N), a.vertexAttribPointer(N, 2, a.FLOAT, !1, 0, 0), c = a.getUniformLocation(s, "u_resolution"), f = a.getUniformLocation(s, "u_blobCount"), d = a.getUniformLocation(s, "u_positions"), m = a.getUniformLocation(s, "u_colors"), h = a.getUniformLocation(s, "u_threshold"), _ = a.getUniformLocation(s, "u_edgeSoftness"), k = a.getUniformLocation(s, "u_bgAlpha"), a.uniform1i(f, n.blobCount), a.uniform1f(h, n.threshold), a.uniform1f(_, n.edgeSoftness), a.uniform1f(k, n.bgAlpha);
6962
+ const H = a.getAttribLocation(s, "a_position");
6963
+ a.enableVertexAttribArray(H), a.vertexAttribPointer(H, 2, a.FLOAT, !1, 0, 0), c = a.getUniformLocation(s, "u_resolution"), f = a.getUniformLocation(s, "u_blobCount"), d = a.getUniformLocation(s, "u_positions"), m = a.getUniformLocation(s, "u_colors"), h = a.getUniformLocation(s, "u_threshold"), _ = a.getUniformLocation(s, "u_edgeSoftness"), k = a.getUniformLocation(s, "u_bgAlpha"), a.uniform1i(f, n.blobCount), a.uniform1f(h, n.threshold), a.uniform1f(_, n.edgeSoftness), a.uniform1f(k, n.bgAlpha);
6961
6964
  for (let U = 0; U < We; U++) {
6962
6965
  const [X, ee, q] = U < n.blobCount ? Sn(n.colors[U % n.colors.length]) : [0, 0, 0];
6963
6966
  v[U * 3] = X / 255, v[U * 3 + 1] = ee / 255, v[U * 3 + 2] = q / 255;
@@ -6973,9 +6976,9 @@ function qi(e, t) {
6973
6976
  const T = Math.min(window.devicePixelRatio || 1, 1.5), I = x.getBoundingClientRect();
6974
6977
  x.width = I.width * T, x.height = I.height * T, a.viewport(0, 0, x.width, x.height), c && a.uniform2f(c, x.width, x.height);
6975
6978
  }
6976
- const E = 1.618033988749, L = 1.4142135623731, F = 1.7320508075689, H = [];
6979
+ const E = 1.618033988749, L = 1.4142135623731, F = 1.7320508075689, N = [];
6977
6980
  for (let x = 0; x < We; x++)
6978
- H.push([
6981
+ N.push([
6979
6982
  (x + 1) * E % 1,
6980
6983
  // phase offset
6981
6984
  0.15 + x * 0.37 % 0.4,
@@ -6993,13 +6996,13 @@ function qi(e, t) {
6993
6996
  if (!a || !s) return;
6994
6997
  const T = (x - i) * 1e-3 * n.speed, I = n.orbitAmplitude;
6995
6998
  for (let j = 0; j < n.blobCount; j++) {
6996
- const N = H[j], U = N[0] * Math.PI * 2, X = 0.5 + Math.sin(T * N[1] + U) * I * 0.6 + Math.sin(T * N[3] * L + U * E) * I * 0.3 + Math.cos(T * N[5] * F + j) * I * 0.15, ee = 0.5 + Math.cos(T * N[2] + U * E) * I * 0.6 + Math.cos(T * N[4] * E + U * L) * I * 0.3 + Math.sin(T * N[5] * E + j * L) * I * 0.15, q = 0.6 + N[0] * 0.8, K = n.baseRadius * q + Math.sin(T * 0.4 + j * E) * n.baseRadius * 0.2;
6999
+ const H = N[j], U = H[0] * Math.PI * 2, X = 0.5 + Math.sin(T * H[1] + U) * I * 0.6 + Math.sin(T * H[3] * L + U * E) * I * 0.3 + Math.cos(T * H[5] * F + j) * I * 0.15, ee = 0.5 + Math.cos(T * H[2] + U * E) * I * 0.6 + Math.cos(T * H[4] * E + U * L) * I * 0.3 + Math.sin(T * H[5] * E + j * L) * I * 0.15, q = 0.6 + H[0] * 0.8, K = n.baseRadius * q + Math.sin(T * 0.4 + j * E) * n.baseRadius * 0.2;
6997
7000
  b[j * 3] = X, b[j * 3 + 1] = ee, b[j * 3 + 2] = K;
6998
7001
  }
6999
7002
  a.uniform1i(f, n.blobCount), a.uniform1f(h, n.threshold), a.uniform1f(_, n.edgeSoftness), a.uniform1f(k, n.bgAlpha);
7000
7003
  for (let j = 0; j < We; j++) {
7001
- const [N, U, X] = j < n.blobCount ? Sn(n.colors[j % n.colors.length]) : [0, 0, 0];
7002
- v[j * 3] = N / 255, v[j * 3 + 1] = U / 255, v[j * 3 + 2] = X / 255;
7004
+ const [H, U, X] = j < n.blobCount ? Sn(n.colors[j % n.colors.length]) : [0, 0, 0];
7005
+ v[j * 3] = H / 255, v[j * 3 + 1] = U / 255, v[j * 3 + 2] = X / 255;
7003
7006
  }
7004
7007
  a.uniform3fv(m, v), a.uniform3fv(d, b), a.drawArrays(a.TRIANGLES, 0, 6), l = requestAnimationFrame(O);
7005
7008
  }
@@ -7621,8 +7624,8 @@ function Mp(e) {
7621
7624
  );
7622
7625
  }
7623
7626
  function m(O, D) {
7624
- const x = O.clientHeight, T = D.offsetTop + D.offsetHeight / 2, I = Math.max(0, O.scrollHeight - x), j = x * 0.18, N = O.scrollTop + x / 2;
7625
- return Math.abs(T - N) <= j ? O.scrollTop : Math.max(0, Math.min(I, T - x / 2));
7627
+ const x = O.clientHeight, T = D.offsetTop + D.offsetHeight / 2, I = Math.max(0, O.scrollHeight - x), j = x * 0.18, H = O.scrollTop + x / 2;
7628
+ return Math.abs(T - H) <= j ? O.scrollTop : Math.max(0, Math.min(I, T - x / 2));
7626
7629
  }
7627
7630
  function h(O) {
7628
7631
  u += 1;
@@ -7685,13 +7688,13 @@ function Mp(e) {
7685
7688
  function F(O) {
7686
7689
  s !== O && (s?.removeEventListener("wheel", v), s?.removeEventListener("scroll", L), s?.removeEventListener("touchstart", C), s?.removeEventListener("pointerdown", $), s?.removeEventListener("keydown", E), s = O, s?.addEventListener("wheel", v, { passive: !0 }), s?.addEventListener("scroll", L, { passive: !0 }), s?.addEventListener("touchstart", C, { passive: !0 }), s?.addEventListener("pointerdown", $, { passive: !0 }), s?.addEventListener("keydown", E));
7687
7690
  }
7688
- function H(O) {
7691
+ function N(O) {
7689
7692
  a !== O && (a?.removeEventListener("scroll", b), a = O, a?.addEventListener("scroll", b, {
7690
7693
  passive: !0
7691
7694
  }));
7692
7695
  }
7693
7696
  return Se(() => {
7694
- H(e.scrollSource?.value ?? null), F(e.sidebarEl.value ?? null), ge(() => k(!0)), window.addEventListener("resize", b);
7697
+ N(e.scrollSource?.value ?? null), F(e.sidebarEl.value ?? null), ge(() => k(!0)), window.addEventListener("resize", b);
7695
7698
  }), ne(
7696
7699
  [e.activeId, e.activeRootId ?? { value: null }],
7697
7700
  () => {
@@ -7707,7 +7710,7 @@ function Mp(e) {
7707
7710
  ), ne(
7708
7711
  () => e.scrollSource?.value ?? null,
7709
7712
  (O) => {
7710
- H(O);
7713
+ N(O);
7711
7714
  },
7712
7715
  { immediate: !0 }
7713
7716
  ), we(() => {
@@ -7748,8 +7751,8 @@ function Pp(e, t, n) {
7748
7751
  function T(I) {
7749
7752
  for (const j of I) {
7750
7753
  x.push(j.id);
7751
- const N = o(j);
7752
- N && T(N);
7754
+ const H = o(j);
7755
+ H && T(H);
7753
7756
  }
7754
7757
  }
7755
7758
  return T(xe(e)), v = x, x;
@@ -7761,12 +7764,12 @@ function Pp(e, t, n) {
7761
7764
  function L() {
7762
7765
  f || E || (E = requestAnimationFrame(() => {
7763
7766
  E = 0;
7764
- const x = n?.scrollContainer?.value, T = parseFloat(a.split(" ")[0]) / 100, I = x ? x.clientHeight : window.innerHeight, j = Math.abs(T) * I, N = x ? x.getBoundingClientRect().top : 0, U = C();
7767
+ const x = n?.scrollContainer?.value, T = parseFloat(a.split(" ")[0]) / 100, I = x ? x.clientHeight : window.innerHeight, j = Math.abs(T) * I, H = x ? x.getBoundingClientRect().top : 0, U = C();
7765
7768
  let X = null, ee = 1 / 0, q = null, K = 1 / 0;
7766
7769
  for (const Z of U) {
7767
7770
  const fe = document.getElementById(Z);
7768
7771
  if (!fe) continue;
7769
- const ce = fe.getBoundingClientRect().top - N - j;
7772
+ const ce = fe.getBoundingClientRect().top - H - j;
7770
7773
  ce <= 0 && Math.abs(ce) < ee && (ee = Math.abs(ce), X = Z), ce > 0 && ce < K && (K = ce, q = Z);
7771
7774
  }
7772
7775
  const Q = X ?? q;
@@ -7783,7 +7786,7 @@ function Pp(e, t, n) {
7783
7786
  I && F(I);
7784
7787
  }
7785
7788
  }
7786
- function H() {
7789
+ function N() {
7787
7790
  u?.disconnect(), c.clear(), i.clear(), $();
7788
7791
  const x = n?.scrollContainer?.value;
7789
7792
  u = new IntersectionObserver(
@@ -7807,23 +7810,23 @@ function Pp(e, t, n) {
7807
7810
  ne(
7808
7811
  () => xe(e),
7809
7812
  (x) => {
7810
- d && (l.value = x[0]?.id ?? null, H());
7813
+ d && (l.value = x[0]?.id ?? null, N());
7811
7814
  }
7812
7815
  );
7813
7816
  let O = null;
7814
7817
  Se(() => {
7815
- d = !0, H(), O = n?.scrollContainer?.value ?? document, O.addEventListener("scroll", L, { passive: !0 });
7818
+ d = !0, N(), O = n?.scrollContainer?.value ?? document, O.addEventListener("scroll", L, { passive: !0 });
7816
7819
  }), we(() => {
7817
7820
  d = !1, u?.disconnect(), E && cancelAnimationFrame(E), O?.removeEventListener("scroll", L);
7818
7821
  });
7819
7822
  function D() {
7820
7823
  i.clear(), E && cancelAnimationFrame(E), E = 0;
7821
- const x = n?.scrollContainer?.value, T = parseFloat(a.split(" ")[0]) / 100, I = x ? x.clientHeight : window.innerHeight, j = Math.abs(T) * I, N = x ? x.getBoundingClientRect().top : 0, U = C();
7824
+ const x = n?.scrollContainer?.value, T = parseFloat(a.split(" ")[0]) / 100, I = x ? x.clientHeight : window.innerHeight, j = Math.abs(T) * I, H = x ? x.getBoundingClientRect().top : 0, U = C();
7822
7825
  let X = null, ee = 1 / 0, q = null, K = 1 / 0;
7823
7826
  for (const Z of U) {
7824
7827
  const fe = document.getElementById(Z);
7825
7828
  if (!fe) continue;
7826
- const ce = fe.getBoundingClientRect().top - N - j;
7829
+ const ce = fe.getBoundingClientRect().top - H - j;
7827
7830
  ce <= 0 && Math.abs(ce) < ee && (ee = Math.abs(ce), X = Z), ce > 0 && ce < K && (K = ce, q = Z);
7828
7831
  }
7829
7832
  const Q = X ?? q;
@@ -8458,19 +8461,19 @@ function Yc(e) {
8458
8461
  async function m(x) {
8459
8462
  const T = c;
8460
8463
  let I = Nc();
8461
- const j = d(), N = s.value ? t.firstAnimationSpeedFactor : 1, U = s.value;
8464
+ const j = d(), H = s.value ? t.firstAnimationSpeedFactor : 1, U = s.value;
8462
8465
  for (; o.value.length < T.length; ) {
8463
8466
  if (x.cancelled) return;
8464
8467
  const X = o.value.length, ee = T[X], q = X > 0 ? T[X - 1] : "";
8465
8468
  if (I.state !== "normal") {
8466
8469
  const Q = $n(I, ee, j, t.errorRate);
8467
- if (I = Q.ctx, !await h(Q.action, x, q, N)) return;
8470
+ if (I = Q.ctx, !await h(Q.action, x, q, H)) return;
8468
8471
  continue;
8469
8472
  }
8470
8473
  if (!U && X > 3 && X < T.length - 3) {
8471
8474
  const Q = $n(I, ee, j, t.errorRate);
8472
8475
  if (I = Q.ctx, Q.action.type === "type_wrong") {
8473
- if (!await h(Q.action, x, q, N)) return;
8476
+ if (!await h(Q.action, x, q, H)) return;
8474
8477
  continue;
8475
8478
  }
8476
8479
  }
@@ -8479,7 +8482,7 @@ function Yc(e) {
8479
8482
  if (x.cancelled) return;
8480
8483
  const Z = X + Q, fe = T[Z], $e = Z > 0 ? T[Z - 1] : "";
8481
8484
  if (o.value += fe, Q === K - 1) {
8482
- const ce = T[Z + 1] ?? "", Ve = ht($e, fe) * N, Fe = tt(Ve, t.variance);
8485
+ const ce = T[Z + 1] ?? "", Ve = ht($e, fe) * H, Fe = tt(Ve, t.variance);
8483
8486
  let he = 0;
8484
8487
  if (s.value || (he = zc(fe, ce, Rc)), !await _e(Fe + he, x)) return;
8485
8488
  }
@@ -8491,19 +8494,19 @@ function Yc(e) {
8491
8494
  case "type_correct": {
8492
8495
  if (x.char === "") return !0;
8493
8496
  o.value += x.char;
8494
- const N = ht(I, x.char) * j;
8495
- return _e(tt(N, t.variance), T);
8497
+ const H = ht(I, x.char) * j;
8498
+ return _e(tt(H, t.variance), T);
8496
8499
  }
8497
8500
  case "type_wrong": {
8498
8501
  o.value += x.char;
8499
- const N = ht(I, x.char) * j;
8500
- return _e(tt(N, t.variance), T);
8502
+ const H = ht(I, x.char) * j;
8503
+ return _e(tt(H, t.variance), T);
8501
8504
  }
8502
8505
  case "type_past_correct": {
8503
8506
  o.value += x.char;
8504
- const N = ht(I, x.char) * j;
8507
+ const H = ht(I, x.char) * j;
8505
8508
  return _e(
8506
- tt(N * t.correctionSpeedMultiplier, t.variance),
8509
+ tt(H * t.correctionSpeedMultiplier, t.variance),
8507
8510
  T
8508
8511
  );
8509
8512
  }
@@ -8516,11 +8519,11 @@ function Yc(e) {
8516
8519
  }
8517
8520
  }
8518
8521
  async function _(x, T, I) {
8519
- const j = I ? t.correctionBaseDelay : t.backspaceBaseDelay, N = I ? t.backspaceAcceleration * 2 : t.backspaceAcceleration;
8522
+ const j = I ? t.correctionBaseDelay : t.backspaceBaseDelay, H = I ? t.backspaceAcceleration * 2 : t.backspaceAcceleration;
8520
8523
  for (let U = 0; U < x; U++) {
8521
8524
  if (T.cancelled) return !1;
8522
8525
  o.value = o.value.slice(0, -1);
8523
- const X = Vc(j, t.variance * 0.5, U, N);
8526
+ const X = Vc(j, t.variance * 0.5, U, H);
8524
8527
  if (!await _e(X, T)) return !1;
8525
8528
  }
8526
8529
  return !0;
@@ -8586,7 +8589,7 @@ function Yc(e) {
8586
8589
  function F() {
8587
8590
  C();
8588
8591
  }
8589
- function H() {
8592
+ function N() {
8590
8593
  a.value || v();
8591
8594
  }
8592
8595
  function O(x) {
@@ -8615,7 +8618,7 @@ function Yc(e) {
8615
8618
  backspaceToPosition: L,
8616
8619
  // Word-rotation API
8617
8620
  pause: F,
8618
- resume: H,
8621
+ resume: N,
8619
8622
  setCharPosition: O,
8620
8623
  forceWord: D
8621
8624
  };
@@ -8927,7 +8930,7 @@ const pu = {
8927
8930
  hueShiftSmall: 55
8928
8931
  }, Pn = 1.618033988749895, On = 1.4142135623730951;
8929
8932
  function Dn() {
8930
- return document.documentElement.classList.contains("dark") || window.matchMedia("(prefers-color-scheme: dark)").matches;
8933
+ return document.documentElement.classList.contains("dark");
8931
8934
  }
8932
8935
  function Ze(e, t, n, o) {
8933
8936
  return `rgba(${Ge(Math.round(e), 0, 255)},${Ge(Math.round(t), 0, 255)},${Ge(Math.round(n), 0, 255)},${o})`;
@@ -8936,10 +8939,10 @@ function mu(e, t, n) {
8936
8939
  const o = jn(t) ? t : rt({ ...pu, ...t });
8937
8940
  let a = [], s = 0, l = !1, i = 1, u = null, c = null;
8938
8941
  function f(b) {
8939
- const v = xe(n) ?? "#c084fc", [C, $, E] = qt(v), [L, F, H] = du(C, $, E), O = [];
8942
+ const v = xe(n) ?? "#c084fc", [C, $, E] = qt(v), [L, F, N] = du(C, $, E), O = [];
8940
8943
  for (let D = 0; D < b; D++) {
8941
- const x = D >= Math.ceil(b / 2), T = x ? o.lShiftSmall : o.lShiftLarge, I = x ? o.hueShiftSmall : o.hueShiftLarge, j = D % 2 === 0 ? 1 : -1, N = T * (0.5 + D / b * 0.5) * j, U = I * ((D + 1) / b) * (D % 3 === 0 ? -1 : 1);
8942
- O.push(fu(Ge(L + N, 0, 1), F, (H + U + 360) % 360));
8944
+ const x = D >= Math.ceil(b / 2), T = x ? o.lShiftSmall : o.lShiftLarge, I = x ? o.hueShiftSmall : o.hueShiftLarge, j = D % 2 === 0 ? 1 : -1, H = T * (0.5 + D / b * 0.5) * j, U = I * ((D + 1) / b) * (D % 3 === 0 ? -1 : 1);
8945
+ O.push(fu(Ge(L + H, 0, 1), F, (N + U + 360) % 360));
8943
8946
  }
8944
8947
  return O;
8945
8948
  }
@@ -8954,10 +8957,10 @@ function mu(e, t, n) {
8954
8957
  function m() {
8955
8958
  const b = e.value;
8956
8959
  if (!b) return;
8957
- const v = b.width / i, C = b.height / i, $ = Math.sqrt(v * v + C * C), E = Math.max(document.documentElement.scrollHeight, C), L = Math.round(o.blobCount * o.viewportAnchorRatio), F = o.blobCount - L, H = Math.PI * (3 - Math.sqrt(5)), O = o.colorMode === "derived" ? f(o.blobCount) : o.colors.map((D) => qt(D));
8960
+ const v = b.width / i, C = b.height / i, $ = Math.sqrt(v * v + C * C), E = Math.max(document.documentElement.scrollHeight, C), L = Math.round(o.blobCount * o.viewportAnchorRatio), F = o.blobCount - L, N = Math.PI * (3 - Math.sqrt(5)), O = o.colorMode === "derived" ? f(o.blobCount) : o.colors.map((D) => qt(D));
8958
8961
  a = [];
8959
8962
  for (let D = 0; D < L; D++) {
8960
- const x = D % O.length, T = o.baseRadius + (D / Math.max(L, 1) - 0.5) * o.radiusVariance * 2, I = D * H;
8963
+ const x = D % O.length, T = o.baseRadius + (D / Math.max(L, 1) - 0.5) * o.radiusVariance * 2, I = D * N;
8961
8964
  a.push({
8962
8965
  anchorX: 0.5 + Math.cos(I) * 0.3,
8963
8966
  anchorY: 0.5 + Math.sin(I) * 0.35,
@@ -8971,7 +8974,7 @@ function mu(e, t, n) {
8971
8974
  });
8972
8975
  }
8973
8976
  for (let D = 0; D < F; D++) {
8974
- const x = (L + D) % O.length, T = o.baseRadius + (D / Math.max(F, 1) - 0.5) * o.radiusVariance * 2, I = (L + D) * H, j = (D + 0.5) / F * E;
8977
+ const x = (L + D) % O.length, T = o.baseRadius + (D / Math.max(F, 1) - 0.5) * o.radiusVariance * 2, I = (L + D) * N, j = (D + 0.5) / F * E;
8975
8978
  a.push({
8976
8979
  anchorX: 0.5 + Math.cos(I) * 0.35,
8977
8980
  anchorY: j,
@@ -9005,11 +9008,11 @@ function mu(e, t, n) {
9005
9008
  C.save(), C.scale(i, i);
9006
9009
  const F = d();
9007
9010
  F.alpha > 0 ? (C.globalAlpha = F.alpha, C.globalCompositeOperation = "source-over", C.filter = "none", C.fillStyle = Ze(F.rgb[0], F.rgb[1], F.rgb[2], 1), C.fillRect(0, 0, $, E), C.globalAlpha = 1) : C.clearRect(0, 0, $, E), C.filter = `blur(${o.blur}px) saturate(140%)`, C.globalCompositeOperation = o.blendMode;
9008
- const H = l ? o.alphaDark : o.alphaLight, O = o.surfaceMode === "theme" ? l ? 0.6 : 2.2 : 1, x = window.matchMedia("(prefers-reduced-motion: reduce)").matches ? 0.05 : o.speed;
9011
+ const N = l ? o.alphaDark : o.alphaLight, O = o.surfaceMode === "theme" ? l ? 0.6 : 2.2 : 1, x = window.matchMedia("(prefers-reduced-motion: reduce)").matches ? 0.05 : o.speed;
9009
9012
  for (const T of a) {
9010
9013
  let I, j;
9011
9014
  if (T.mode === "viewport" ? (I = T.anchorX * $, j = T.anchorY * E) : (I = T.anchorX * $, j = T.anchorY - L), I += Math.sin(b * T.freqX * x + T.phaseX) * $ * o.orbitAmplitude, j += Math.cos(b * T.freqY * x + T.phaseY) * E * o.orbitAmplitude, j + T.radius < -T.radius * 0.5 || j - T.radius > E + T.radius * 0.5) continue;
9012
- const [N, U, X] = T.color, ee = l ? 0.7 : 1, q = Math.round(N * ee + 128 * (1 - ee)), K = Math.round(U * ee + 128 * (1 - ee)), Q = Math.round(X * ee + 128 * (1 - ee)), Z = H * O, fe = C.createRadialGradient(I, j, 0, I, j, T.radius);
9015
+ const [H, U, X] = T.color, ee = l ? 0.7 : 1, q = Math.round(H * ee + 128 * (1 - ee)), K = Math.round(U * ee + 128 * (1 - ee)), Q = Math.round(X * ee + 128 * (1 - ee)), Z = N * O, fe = C.createRadialGradient(I, j, 0, I, j, T.radius);
9013
9016
  fe.addColorStop(0, Ze(q, K, Q, Z)), fe.addColorStop(o.gradStop2, Ze(q, K, Q, Z * 0.6)), fe.addColorStop(o.gradStop3, Ze(q, K, Q, Z * 0.2)), fe.addColorStop(o.gradStop4, Ze(q, K, Q, 0)), C.fillStyle = fe, C.fillRect(I - T.radius, j - T.radius, T.radius * 2, T.radius * 2);
9014
9017
  }
9015
9018
  C.restore(), s = requestAnimationFrame(_);
@@ -9424,9 +9427,9 @@ function Wp(e, t = {}) {
9424
9427
  C = E;
9425
9428
  for (let L = 0; L < 8; L++) {
9426
9429
  const F = b[L];
9427
- let H = (E - F.startTime) / F.duration;
9428
- H >= 1 && (F.from = F.to, F.to = h + c() * (_ - h), F.duration = o * (0.5 + c() * 1.3), F.startTime = E, H = 0);
9429
- const O = 0.5 - 0.5 * Math.cos(Math.PI * H);
9430
+ let N = (E - F.startTime) / F.duration;
9431
+ N >= 1 && (F.from = F.to, F.to = h + c() * (_ - h), F.duration = o * (0.5 + c() * 1.3), F.startTime = E, N = 0);
9432
+ const O = 0.5 - 0.5 * Math.cos(Math.PI * N);
9430
9433
  k[L] = F.from + O * (F.to - F.from);
9431
9434
  }
9432
9435
  l.value = Je(k), v = requestAnimationFrame($);
@@ -9625,7 +9628,7 @@ function Qp(e) {
9625
9628
  function F(q) {
9626
9629
  u.delete(q);
9627
9630
  }
9628
- function H(q, K) {
9631
+ function N(q, K) {
9629
9632
  if (!K) {
9630
9633
  F(q);
9631
9634
  return;
@@ -9685,24 +9688,24 @@ function Qp(e) {
9685
9688
  (q) => j(q),
9686
9689
  { immediate: !0 }
9687
9690
  );
9688
- let N = null;
9691
+ let H = null;
9689
9692
  e.contentEl && ne(
9690
9693
  e.contentEl,
9691
9694
  (q) => {
9692
- N?.disconnect(), N = null, q && typeof ResizeObserver < "u" && (N = new ResizeObserver(() => $()), N.observe(q));
9695
+ H?.disconnect(), H = null, q && typeof ResizeObserver < "u" && (H = new ResizeObserver(() => $()), H.observe(q));
9693
9696
  },
9694
9697
  { immediate: !0 }
9695
9698
  ), Se(() => {
9696
9699
  $();
9697
9700
  }), we(() => {
9698
- c && cancelAnimationFrame(c), f && cancelAnimationFrame(f), d && window.clearTimeout(d), I && I.removeEventListener("scroll", T), m?.disconnect(), N?.disconnect(), u.clear();
9701
+ c && cancelAnimationFrame(c), f && cancelAnimationFrame(f), d && window.clearTimeout(d), I && I.removeEventListener("scroll", T), m?.disconnect(), H?.disconnect(), u.clear();
9699
9702
  });
9700
9703
  const U = P(() => s.value.endIndex < s.value.startIndex ? [] : t.value.slice(s.value.startIndex, s.value.endIndex + 1)), X = P(() => l.value?.id ?? null), ee = P(() => l.value?.rootId ?? null);
9701
9704
  return {
9702
9705
  visibleItems: U,
9703
9706
  topSpacerPx: P(() => s.value.topSpacerPx),
9704
9707
  bottomSpacerPx: P(() => s.value.bottomSpacerPx),
9705
- measureSection: H,
9708
+ measureSection: N,
9706
9709
  ensureTargetWindow: O,
9707
9710
  getOffsetFor: D,
9708
9711
  activeId: X,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mkbabb/glass-ui",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Glassmorphic design system — Vue 3.5 components, reka-ui primitives, Tailwind CSS v4 tokens",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -116,10 +116,7 @@ const PHI = 1.618033988749895;
116
116
  const SQRT2 = 1.4142135623730951;
117
117
 
118
118
  function isDarkMode(): boolean {
119
- return (
120
- document.documentElement.classList.contains("dark") ||
121
- window.matchMedia("(prefers-color-scheme: dark)").matches
122
- );
119
+ return document.documentElement.classList.contains("dark");
123
120
  }
124
121
 
125
122
  function rgba(r: number, g: number, b: number, a: number): string {
@@ -231,6 +231,19 @@ export function useDockState(options: UseDockStateOptions) {
231
231
  if (!root || root.contains(e.target as Node)) return;
232
232
  if (isTeleportedTarget(e.target)) return;
233
233
 
234
+ // Bounds check: during transitions, pointer-events:none on dock-layers
235
+ // makes the event target the parent element. The click is still visually
236
+ // "inside" the dock, so don't treat it as an outside click.
237
+ const rect = root.getBoundingClientRect();
238
+ if (
239
+ e.clientX >= rect.left &&
240
+ e.clientX <= rect.right &&
241
+ e.clientY >= rect.top &&
242
+ e.clientY <= rect.bottom
243
+ ) {
244
+ return;
245
+ }
246
+
234
247
  // Click outside → always collapse, even if keepOpenCount > 0
235
248
  // (keepOpenCount prevents timer-based collapse, not explicit dismissal)
236
249
  collapse();
@@ -53,6 +53,7 @@ const v = computed(() => props.variant ?? 'standard')
53
53
  <SliderThumb
54
54
  v-for="(_, key) in modelValue"
55
55
  :key="key"
56
+ :aria-label="$attrs['aria-label'] as string ?? undefined"
56
57
  :class="cn(
57
58
  'slider-thumb block transition-colors focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50',
58
59
  v === 'spectrum'
@@ -73,6 +73,7 @@
73
73
  border: 1px solid var(--glass-border-default);
74
74
  border-radius: var(--radius-card);
75
75
  box-shadow: var(--glass-shadow-default);
76
+ contain: layout style;
76
77
  }
77
78
 
78
79
  .glass-pill {
@@ -83,6 +84,7 @@
83
84
  border: 1px solid var(--glass-border-default);
84
85
  border-radius: var(--radius-pill);
85
86
  box-shadow: var(--glass-shadow-subtle);
87
+ contain: layout style;
86
88
  }
87
89
 
88
90
  /* ── Glassmorphic circular icon button ── */
@@ -126,7 +128,8 @@
126
128
  pointer-events: none;
127
129
  }
128
130
 
129
- .glass-btn.is-active {
131
+ .glass-btn.is-active,
132
+ .glass-btn[aria-pressed="true"] {
130
133
  background: color-mix(in srgb, var(--foreground) 10%, transparent);
131
134
  border-color: color-mix(in srgb, var(--foreground) 25%, transparent);
132
135
  color: var(--foreground);
@@ -157,6 +160,11 @@
157
160
  cursor: not-allowed;
158
161
  }
159
162
 
163
+ .btn-pill[aria-pressed="true"] {
164
+ background: color-mix(in srgb, var(--primary) 15%, transparent);
165
+ border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border));
166
+ }
167
+
160
168
  .btn-pill-accent {
161
169
  background: var(--th-accent-opaque, var(--primary));
162
170
  color: var(--foreground);
@@ -197,12 +197,33 @@
197
197
  font-size: max(1rem, 1em);
198
198
  }
199
199
 
200
- /* ── Scroll fade mask ── */
200
+ /* ── Scroll fade masks ── */
201
201
  .scroll-fade-mask {
202
202
  mask-image: linear-gradient(to right, transparent, black var(--mask-fade-width), black calc(100% - var(--mask-fade-width)), transparent);
203
203
  -webkit-mask-image: linear-gradient(to right, transparent, black var(--mask-fade-width), black calc(100% - var(--mask-fade-width)), transparent);
204
204
  }
205
205
 
206
+ .scroll-fade-top {
207
+ mask-image: linear-gradient(to bottom, transparent, black var(--mask-fade-width));
208
+ -webkit-mask-image: linear-gradient(to bottom, transparent, black var(--mask-fade-width));
209
+ }
210
+
211
+ .scroll-fade-bottom {
212
+ mask-image: linear-gradient(to bottom, black calc(100% - var(--mask-fade-width)), transparent);
213
+ -webkit-mask-image: linear-gradient(to bottom, black calc(100% - var(--mask-fade-width)), transparent);
214
+ }
215
+
216
+ .scroll-fade-y {
217
+ mask-image: linear-gradient(to bottom, transparent, black var(--mask-fade-width), black calc(100% - var(--mask-fade-width)), transparent);
218
+ -webkit-mask-image: linear-gradient(to bottom, transparent, black var(--mask-fade-width), black calc(100% - var(--mask-fade-width)), transparent);
219
+ }
220
+
221
+ /* ── Icon sizing ── */
222
+ .icon-xs { @apply w-3 h-3 shrink-0; }
223
+ .icon-sm { @apply w-3.5 h-3.5 shrink-0; }
224
+ .icon-md { @apply w-4 h-4 shrink-0; }
225
+ .icon-lg { @apply w-5 h-5 shrink-0; }
226
+
206
227
  /* ── Shimmer text effects ── */
207
228
  .gold-shimmer {
208
229
  background: linear-gradient(90deg, var(--color-gold-dark), var(--color-gold-light), var(--color-gold), var(--color-gold-light), var(--color-gold-dark));