@danxbot/ui 7.9.6 → 7.9.8

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/index.js CHANGED
@@ -43582,7 +43582,7 @@ function lN({
43582
43582
  type: "button",
43583
43583
  onClick: () => s(e),
43584
43584
  "aria-label": `Preview ${e.name}`,
43585
- className: "absolute inset-0 z-0 cursor-pointer rounded-[inherit] outline-none focus-visible:ring-2 focus-visible:ring-focus-ring"
43585
+ className: "absolute inset-0 z-1 cursor-pointer rounded-[inherit] outline-none focus-visible:ring-2 focus-visible:ring-focus-ring"
43586
43586
  }
43587
43587
  ),
43588
43588
  m ? /* @__PURE__ */ P(lt, { children: [
@@ -49928,6 +49928,7 @@ function z6(e, t) {
49928
49928
  pending: [],
49929
49929
  optimisticHead: [],
49930
49930
  optimisticTail: [],
49931
+ awaitingSettle: [],
49931
49932
  meta: void 0,
49932
49933
  refs: 0,
49933
49934
  memberReleases: [],
@@ -49951,16 +49952,23 @@ function B6(e, t, n, r = []) {
49951
49952
  if (!o) return;
49952
49953
  o.keys = [...t];
49953
49954
  const s = /* @__PURE__ */ new Set([...o.keys, ...r]);
49954
- o.pending = o.pending.filter((i) => !s.has(i)), o.meta = n, Fa(o), $a(o);
49955
+ o.pending = o.pending.filter((i) => !s.has(i)), o.awaitingSettle = o.awaitingSettle.filter((i) => !s.has(i)), o.meta = n, Fa(o), $a(o);
49955
49956
  }
49956
49957
  function H6(e) {
49957
49958
  return wn.get(e)?.pending ?? vd.keys;
49958
49959
  }
49959
49960
  function U6(e) {
49960
49961
  const t = e.key;
49961
- if (t)
49962
+ if (t) {
49962
49963
  for (const n of wn.values())
49963
- n.type !== e.type || !G6(n, e) || n.keys.includes(t) || n.pending.includes(t) || (n.pending = [...n.pending, t], Fa(n), $a(n));
49964
+ if (!(n.type !== e.type || !G6(n, e)) && !(n.keys.includes(t) || n.pending.includes(t) || n.awaitingSettle.includes(t))) {
49965
+ if (n.optimisticHead.length > 0 || n.optimisticTail.length > 0) {
49966
+ n.awaitingSettle = [...n.awaitingSettle, t];
49967
+ continue;
49968
+ }
49969
+ n.pending = [...n.pending, t], Fa(n), $a(n);
49970
+ }
49971
+ }
49964
49972
  }
49965
49973
  function G6(e, t) {
49966
49974
  const n = e.created;
@@ -49981,8 +49989,8 @@ function W6(e) {
49981
49989
  wn.has(e.id) && (K6(e), $a(e));
49982
49990
  }
49983
49991
  function K6(e) {
49984
- const t = (o) => r6(o), n = e.keys.filter((o) => !t(o)), r = e.pending.filter((o) => !t(o));
49985
- n.length === e.keys.length && r.length === e.pending.length || (e.keys = n, e.pending = r, Fa(e));
49992
+ const t = (s) => r6(s), n = e.keys.filter((s) => !t(s)), r = e.pending.filter((s) => !t(s)), o = e.awaitingSettle.filter((s) => !t(s));
49993
+ n.length === e.keys.length && r.length === e.pending.length && o.length === e.awaitingSettle.length || (e.keys = n, e.pending = r, e.awaitingSettle = o, Fa(e));
49986
49994
  }
49987
49995
  function $a(e) {
49988
49996
  e.dirty = !0;
@@ -50002,11 +50010,19 @@ function q6(e, t, n, r) {
50002
50010
  function pw(e, t) {
50003
50011
  for (const n of wn.values()) {
50004
50012
  const r = n.optimisticHead.includes(e), o = n.optimisticTail.includes(e);
50005
- !r && !o || (n.optimisticHead = n.optimisticHead.filter((s) => s !== e), n.optimisticTail = n.optimisticTail.filter((s) => s !== e), t !== null && !n.keys.includes(t) && (n.pending = n.pending.filter((s) => s !== t), n.keys = r ? [t, ...n.keys] : [...n.keys, t]), Fa(n), $a(n));
50013
+ if (!(!r && !o)) {
50014
+ if (n.optimisticHead = n.optimisticHead.filter((s) => s !== e), n.optimisticTail = n.optimisticTail.filter((s) => s !== e), t !== null && !n.keys.includes(t) && (n.pending = n.pending.filter((s) => s !== t), n.awaitingSettle = n.awaitingSettle.filter((s) => s !== t), n.keys = r ? [t, ...n.keys] : [...n.keys, t]), n.optimisticHead.length === 0 && n.optimisticTail.length === 0 && n.awaitingSettle.length > 0) {
50015
+ const s = n.awaitingSettle;
50016
+ n.awaitingSettle = [];
50017
+ for (const i of s)
50018
+ !n.keys.includes(i) && !n.pending.includes(i) && (n.pending = [...n.pending, i]);
50019
+ }
50020
+ Fa(n), $a(n);
50021
+ }
50006
50022
  }
50007
50023
  }
50008
50024
  function Nb(e) {
50009
- return [...e.optimisticHead, ...e.keys, ...e.optimisticTail, ...e.pending];
50025
+ return [...e.optimisticHead, ...e.keys, ...e.optimisticTail, ...e.pending, ...e.awaitingSettle];
50010
50026
  }
50011
50027
  function Y6(e, t) {
50012
50028
  let n = Is.get(e);