@danxbot/ui 15.6.1 → 15.7.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/index.js +145 -125
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as d, jsxs as P, Fragment as ct } from "react/jsx-runtime";
|
|
2
2
|
import * as y from "react";
|
|
3
|
-
import uu, { createElement as ix, useLayoutEffect as Gn, useState as fe, useRef as ye, useId as _t, Component as ZM, useCallback as Ne, useEffect as
|
|
3
|
+
import uu, { createElement as ix, useLayoutEffect as Gn, useState as fe, useRef as ye, useId as _t, Component as ZM, useCallback as Ne, useEffect as Ve, createContext as Mn, useContext as Tn, useMemo as De, memo as du, useImperativeHandle as QM, Fragment as fh, Children as JM, isValidElement as eT, useSyncExternalStore as Vr } from "react";
|
|
4
4
|
import * as Rn from "react-dom";
|
|
5
5
|
import { createPortal as tT } from "react-dom";
|
|
6
6
|
const nT = {
|
|
@@ -12328,9 +12328,9 @@ function GD(e, t) {
|
|
|
12328
12328
|
padding: H
|
|
12329
12329
|
}, Z = y.useRef(null), ne = Tt(s), te = Tt(a), q = typeof s != "function" ? s : 0, J = typeof a != "function" ? a : 0, se = [];
|
|
12330
12330
|
h && se.push(h), se.push(jA((Ke) => {
|
|
12331
|
-
const et = pv(Ke, o, O),
|
|
12331
|
+
const et = pv(Ke, o, O), $e = typeof ne.current == "function" ? ne.current(et) : ne.current, bt = typeof te.current == "function" ? te.current(et) : te.current;
|
|
12332
12332
|
return {
|
|
12333
|
-
mainAxis:
|
|
12333
|
+
mainAxis: $e,
|
|
12334
12334
|
crossAxis: bt,
|
|
12335
12335
|
alignmentAxis: bt
|
|
12336
12336
|
};
|
|
@@ -12359,8 +12359,8 @@ function GD(e, t) {
|
|
|
12359
12359
|
return {};
|
|
12360
12360
|
const {
|
|
12361
12361
|
width: et,
|
|
12362
|
-
height:
|
|
12363
|
-
} = Z.current.getBoundingClientRect(), bt = er(or(Ke.placement)), Xe = bt === "y" ? et :
|
|
12362
|
+
height: $e
|
|
12363
|
+
} = Z.current.getBoundingClientRect(), bt = er(or(Ke.placement)), Xe = bt === "y" ? et : $e, it = bt === "y" ? H.left + H.right : H.top + H.bottom;
|
|
12364
12364
|
return {
|
|
12365
12365
|
offset: Xe / 2 + it / 2
|
|
12366
12366
|
};
|
|
@@ -12373,13 +12373,13 @@ function GD(e, t) {
|
|
|
12373
12373
|
floating: Ke
|
|
12374
12374
|
},
|
|
12375
12375
|
availableWidth: et,
|
|
12376
|
-
availableHeight:
|
|
12376
|
+
availableHeight: $e,
|
|
12377
12377
|
rects: bt
|
|
12378
12378
|
}) {
|
|
12379
12379
|
if (!F.current)
|
|
12380
12380
|
return;
|
|
12381
12381
|
const Xe = Ke.style;
|
|
12382
|
-
Xe.setProperty(dv, `${et}px`), Xe.setProperty(fv, `${
|
|
12382
|
+
Xe.setProperty(dv, `${et}px`), Xe.setProperty(fv, `${$e}px`);
|
|
12383
12383
|
const it = ht(Ke).devicePixelRatio || 1, {
|
|
12384
12384
|
x: ut,
|
|
12385
12385
|
y: Bt,
|
|
@@ -12399,11 +12399,11 @@ function GD(e, t) {
|
|
|
12399
12399
|
fn(Ke) {
|
|
12400
12400
|
const {
|
|
12401
12401
|
elements: et,
|
|
12402
|
-
middlewareData:
|
|
12402
|
+
middlewareData: $e,
|
|
12403
12403
|
placement: bt,
|
|
12404
12404
|
rects: Xe,
|
|
12405
12405
|
y: it
|
|
12406
|
-
} = Ke, ut = or(bt), Bt = er(ut), _e = Z.current, Rt =
|
|
12406
|
+
} = Ke, ut = or(bt), Bt = er(ut), _e = Z.current, Rt = $e.arrow?.x || 0, Nt = $e.arrow?.y || 0, qe = _e?.clientWidth || 0, xt = _e?.clientHeight || 0, Ht = Rt + qe / 2, en = Nt + xt / 2, vn = Math.abs($e.shift?.y || 0), Kt = Xe.reference.height / 2, ln = typeof s == "function" ? s(pv(Ke, o, O)) : s, tn = vn > ln, nt = {
|
|
12407
12407
|
top: `${Ht}px calc(100% + ${ln}px)`,
|
|
12408
12408
|
bottom: `${Ht}px ${-ln}px`,
|
|
12409
12409
|
left: `calc(100% + ${ln}px) ${en}px`,
|
|
@@ -15498,9 +15498,9 @@ function VC(e) {
|
|
|
15498
15498
|
const t = ye(e);
|
|
15499
15499
|
t.current = e;
|
|
15500
15500
|
const [n, r] = fe(!1), [o, s] = fe(null), [i, a] = fe(null), [l, c] = fe(0), u = ye(!1), p = ye(0), f = ye(e.value), h = ye(null), m = ye([]);
|
|
15501
|
-
|
|
15501
|
+
Ve(() => {
|
|
15502
15502
|
l > 0 && t.current.refocus();
|
|
15503
|
-
}, [l]),
|
|
15503
|
+
}, [l]), Ve(
|
|
15504
15504
|
() => () => {
|
|
15505
15505
|
p.current += 1;
|
|
15506
15506
|
},
|
|
@@ -15701,7 +15701,7 @@ function A_(e, t) {
|
|
|
15701
15701
|
}
|
|
15702
15702
|
function D_(e, t, n) {
|
|
15703
15703
|
const r = ye(n);
|
|
15704
|
-
r.current = n,
|
|
15704
|
+
r.current = n, Ve(() => {
|
|
15705
15705
|
const o = e.current;
|
|
15706
15706
|
if (!o) return;
|
|
15707
15707
|
function s(i) {
|
|
@@ -15721,7 +15721,7 @@ function __({ delayMs: e, session: t, elRef: n, openRef: r, composingRef: o, ...
|
|
|
15721
15721
|
function g() {
|
|
15722
15722
|
c.current !== null && (clearTimeout(c.current), c.current = null);
|
|
15723
15723
|
}
|
|
15724
|
-
|
|
15724
|
+
Ve(
|
|
15725
15725
|
() => () => {
|
|
15726
15726
|
if (h.current = !0, c.current === null) return;
|
|
15727
15727
|
g();
|
|
@@ -15867,13 +15867,13 @@ function M8(e) {
|
|
|
15867
15867
|
onError: p,
|
|
15868
15868
|
close: W
|
|
15869
15869
|
}), { pending: z, refusal: F, blocked: B } = _, O = _t(), L = _t(), $ = u !== void 0, H = R && !$;
|
|
15870
|
-
|
|
15870
|
+
Ve(() => {
|
|
15871
15871
|
S && R && $ && k(!1);
|
|
15872
15872
|
}, [S, R, $, k]);
|
|
15873
15873
|
function G(ie) {
|
|
15874
15874
|
I.current = ie, typeof w == "function" ? w(ie) : w && (w.current = ie);
|
|
15875
15875
|
}
|
|
15876
|
-
|
|
15876
|
+
Ve(() => {
|
|
15877
15877
|
const ie = I.current;
|
|
15878
15878
|
if (!ie) return;
|
|
15879
15879
|
H && !D.current ? (_.begin(t, o?.(t) ?? null), V.seed(t), T.current = !0, Tv(ie, t), LC(ie), ie.focus(), M(t.length === 0)) : H || (T.current && X(), Tv(ie, t), M(t.length === 0)), D.current = H;
|
|
@@ -16014,13 +16014,20 @@ function V_(e, t) {
|
|
|
16014
16014
|
}
|
|
16015
16015
|
function T8({ label: e, children: t, editing: n, onEditingChange: r, disabled: o, className: s }) {
|
|
16016
16016
|
km("EditGutter", n, r);
|
|
16017
|
-
const [i, a] = Us(n, !1, r), l = ye(null), c = ye(null), u = !i && !o;
|
|
16018
|
-
|
|
16017
|
+
const [i, a] = Us(n, !1, r), l = ye(null), c = ye(null), u = !i && !o, [p, f] = fe(!1);
|
|
16018
|
+
z_(l, c, u), B_(l, c, i), Ve(() => {
|
|
16019
|
+
u || f(!1);
|
|
16020
|
+
}, [u]);
|
|
16021
|
+
function h(m) {
|
|
16022
|
+
m.pointerType === "touch" && f(!0);
|
|
16023
|
+
}
|
|
16024
|
+
return /* @__PURE__ */ P(
|
|
16019
16025
|
"div",
|
|
16020
16026
|
{
|
|
16021
16027
|
ref: l,
|
|
16022
16028
|
"data-slot": "edit-gutter",
|
|
16023
16029
|
"data-editing": i || void 0,
|
|
16030
|
+
onPointerDown: h,
|
|
16024
16031
|
className: U("group/edit-gutter relative min-w-0", s),
|
|
16025
16032
|
children: [
|
|
16026
16033
|
u && /* @__PURE__ */ d(
|
|
@@ -16028,12 +16035,25 @@ function T8({ label: e, children: t, editing: n, onEditingChange: r, disabled: o
|
|
|
16028
16035
|
{
|
|
16029
16036
|
ref: c,
|
|
16030
16037
|
"data-slot": "edit-gutter-pencil",
|
|
16038
|
+
"data-touch-revealed": p || void 0,
|
|
16031
16039
|
className: U(
|
|
16032
16040
|
"absolute top-0 right-full z-10 flex",
|
|
16033
16041
|
"transition-[var(--tx-colors),opacity] duration-(--dur-fast)",
|
|
16042
|
+
// DX-3623 — reveal on real HOVER or the pencil's OWN
|
|
16043
|
+
// `:focus-visible` (never `focus-within`, which also fires for
|
|
16044
|
+
// the M2 return-focus programmatic `.focus()` after a
|
|
16045
|
+
// pointer-driven close — see the module comment).
|
|
16034
16046
|
"[@media(any-hover:hover)]:opacity-0",
|
|
16047
|
+
"[@media(any-hover:hover)]:pointer-events-none",
|
|
16035
16048
|
"[@media(any-hover:hover)]:group-hover/edit-gutter:opacity-100",
|
|
16036
|
-
"[@media(any-hover:hover)]:
|
|
16049
|
+
"[@media(any-hover:hover)]:group-hover/edit-gutter:pointer-events-auto",
|
|
16050
|
+
"[@media(any-hover:hover)]:has-focus-visible:opacity-100",
|
|
16051
|
+
"[@media(any-hover:hover)]:has-focus-visible:pointer-events-auto",
|
|
16052
|
+
// DX-3623 AC3 — a device with NO hover capability starts
|
|
16053
|
+
// hidden too, and is armed only by `touchRevealed` (a tap).
|
|
16054
|
+
"[@media(any-hover:none)]:opacity-0",
|
|
16055
|
+
"[@media(any-hover:none)]:pointer-events-none",
|
|
16056
|
+
p && "[@media(any-hover:none)]:opacity-100 [@media(any-hover:none)]:pointer-events-auto"
|
|
16037
16057
|
),
|
|
16038
16058
|
children: /* @__PURE__ */ d(gt, { icon: /* @__PURE__ */ d(de, { name: "pencil", size: "sm" }), label: e, size: "sm", onClick: () => a(!0) })
|
|
16039
16059
|
}
|
|
@@ -16057,7 +16077,7 @@ function L_(e) {
|
|
|
16057
16077
|
}
|
|
16058
16078
|
function z_(e, t, n) {
|
|
16059
16079
|
const r = ye(!1);
|
|
16060
|
-
|
|
16080
|
+
Ve(() => {
|
|
16061
16081
|
const o = e.current, s = t.current;
|
|
16062
16082
|
if (!n || !o || !s) return;
|
|
16063
16083
|
function i() {
|
|
@@ -16082,7 +16102,7 @@ function z_(e, t, n) {
|
|
|
16082
16102
|
}
|
|
16083
16103
|
function B_(e, t, n) {
|
|
16084
16104
|
const r = ye(n);
|
|
16085
|
-
|
|
16105
|
+
Ve(() => {
|
|
16086
16106
|
const o = r.current && !n;
|
|
16087
16107
|
if (r.current = n, !o) return;
|
|
16088
16108
|
const s = document.activeElement;
|
|
@@ -23786,7 +23806,7 @@ function sz(e, t) {
|
|
|
23786
23806
|
}
|
|
23787
23807
|
function iz(e, t) {
|
|
23788
23808
|
const [n, r] = fe(0), o = ye(null);
|
|
23789
|
-
return
|
|
23809
|
+
return Ve(() => {
|
|
23790
23810
|
if (!e) return;
|
|
23791
23811
|
const s = e.root.ownerDocument, i = () => r((a) => a + 1);
|
|
23792
23812
|
return s.addEventListener("selectionchange", i), () => s.removeEventListener("selectionchange", i);
|
|
@@ -23837,7 +23857,7 @@ function iy({ surface: e, state: t, run: n, container: r, external: o }) {
|
|
|
23837
23857
|
},
|
|
23838
23858
|
[e, r]
|
|
23839
23859
|
);
|
|
23840
|
-
|
|
23860
|
+
Ve(() => {
|
|
23841
23861
|
if (!e || !r || c) return;
|
|
23842
23862
|
const h = e.root, m = (b) => {
|
|
23843
23863
|
const x = gz(e, b.clientX, b.clientY);
|
|
@@ -23849,7 +23869,7 @@ function iy({ surface: e, state: t, run: n, container: r, external: o }) {
|
|
|
23849
23869
|
return h.addEventListener("pointermove", m), r.addEventListener("pointerleave", g), () => {
|
|
23850
23870
|
h.removeEventListener("pointermove", m), r.removeEventListener("pointerleave", g);
|
|
23851
23871
|
};
|
|
23852
|
-
}, [e, r, p, c, t.caret]),
|
|
23872
|
+
}, [e, r, p, c, t.caret]), Ve(() => {
|
|
23853
23873
|
c || t.caret === null || (l(t.caret), i(p(t.caret)));
|
|
23854
23874
|
}, [t.caret, p, c]);
|
|
23855
23875
|
const f = De(
|
|
@@ -24061,7 +24081,7 @@ function Rr({ icon: e, label: t, onClick: n }) {
|
|
|
24061
24081
|
}
|
|
24062
24082
|
function fz({ surface: e, state: t, run: n, container: r }) {
|
|
24063
24083
|
const [o, s] = fe(null);
|
|
24064
|
-
if (
|
|
24084
|
+
if (Ve(() => {
|
|
24065
24085
|
if (!e || !r) return;
|
|
24066
24086
|
const a = e.root, l = (c) => {
|
|
24067
24087
|
const u = e.getSelection();
|
|
@@ -24305,7 +24325,7 @@ function Ez({
|
|
|
24305
24325
|
const R = ye(p);
|
|
24306
24326
|
R.current = p;
|
|
24307
24327
|
const [k, N] = fe(e.length === 0), M = _t(), I = ye(c), [T, A] = fe(null), [D, _] = fe(0), [V, z] = fe(null), F = ye(t);
|
|
24308
|
-
F.current = t,
|
|
24328
|
+
F.current = t, Ve(() => {
|
|
24309
24329
|
if (!g.current) return;
|
|
24310
24330
|
const W = new TL({
|
|
24311
24331
|
uploader: () => S.current,
|
|
@@ -24371,13 +24391,13 @@ function Ez({
|
|
|
24371
24391
|
}
|
|
24372
24392
|
}),
|
|
24373
24393
|
[r, n]
|
|
24374
|
-
),
|
|
24394
|
+
), Ve(() => {
|
|
24375
24395
|
b.current?.setSource(e), N(e.length === 0), x.current?.sync();
|
|
24376
|
-
}, [e]),
|
|
24396
|
+
}, [e]), Ve(() => {
|
|
24377
24397
|
x.current?.uploaderChanged();
|
|
24378
24398
|
}, [E]);
|
|
24379
24399
|
const B = !n && v.unstored > 0;
|
|
24380
|
-
|
|
24400
|
+
Ve(() => {
|
|
24381
24401
|
if (!B) return;
|
|
24382
24402
|
const W = (j) => {
|
|
24383
24403
|
j.preventDefault(), j.returnValue = !0;
|
|
@@ -24791,7 +24811,7 @@ function U8(e) {
|
|
|
24791
24811
|
close: () => n(!1),
|
|
24792
24812
|
refocus: () => o.current?.focus()
|
|
24793
24813
|
});
|
|
24794
|
-
return
|
|
24814
|
+
return Ve(() => {
|
|
24795
24815
|
t && r && n(!1);
|
|
24796
24816
|
}, [t, r, n]), t && !r ? /* @__PURE__ */ d(Oz, { ...e, session: s, editorRef: o }) : /* @__PURE__ */ d(Pz, { ...e });
|
|
24797
24817
|
}
|
|
@@ -24836,12 +24856,12 @@ function Oz({
|
|
|
24836
24856
|
function E(N) {
|
|
24837
24857
|
C.current !== N && (C.current = N, v.current?.(N));
|
|
24838
24858
|
}
|
|
24839
|
-
|
|
24859
|
+
Ve(() => () => E(!1), []);
|
|
24840
24860
|
const S = Az({
|
|
24841
24861
|
shouldCommit: () => !l.isPending() && x.current === null,
|
|
24842
24862
|
commit: w
|
|
24843
24863
|
});
|
|
24844
|
-
|
|
24864
|
+
Ve(() => {
|
|
24845
24865
|
l.begin(e);
|
|
24846
24866
|
const N = c.current;
|
|
24847
24867
|
if (!N) throw new Error("InlineMarkdownEdit: the editor was not mounted when the field opened.");
|
|
@@ -24900,7 +24920,7 @@ function Az({ shouldCommit: e, commit: t }) {
|
|
|
24900
24920
|
function i() {
|
|
24901
24921
|
r.current !== null && clearTimeout(r.current), r.current = null, o.current !== null && window.removeEventListener("focus", o.current), o.current = null;
|
|
24902
24922
|
}
|
|
24903
|
-
|
|
24923
|
+
Ve(() => i, []);
|
|
24904
24924
|
function a() {
|
|
24905
24925
|
r.current !== null && clearTimeout(r.current), r.current = setTimeout(l, 0);
|
|
24906
24926
|
}
|
|
@@ -25408,31 +25428,31 @@ const zS = /* @__PURE__ */ y.forwardRef(function(t, n) {
|
|
|
25408
25428
|
let Q = 0, re = 0;
|
|
25409
25429
|
!ue && !se && (Q = L?.offsetWidth || 0, re = $?.offsetHeight || 0);
|
|
25410
25430
|
const be = h.width === 0 && h.height === 0, Ce = be ? Q : 0, Oe = be ? re : 0, Te = bo($, "padding", "x"), Ie = bo(L, "padding", "y"), Re = bo(G, "margin", "x"), Ye = bo(H, "margin", "y"), Ue = ce - Te - Re, Le = xe - Ie - Ye, Me = $ ? Math.min($.offsetWidth - Ce, Ue) : Ue, Fe = L ? Math.min(L.offsetHeight - Oe, Le) : Le, We = Math.max(Pp, Me * pe), tt = Math.max(Pp, Fe * le);
|
|
25411
|
-
if (g((
|
|
25431
|
+
if (g(($e) => _l($e, {
|
|
25412
25432
|
width: We,
|
|
25413
25433
|
height: tt
|
|
25414
25434
|
})), L && H) {
|
|
25415
|
-
const
|
|
25435
|
+
const $e = L.offsetHeight - tt - Ie - Ye, bt = dy(H, "--scroll-area-thumb-height", Z, ie, K, tt, $e);
|
|
25416
25436
|
H.style.transform = `translate3d(0,${bt}px,0)`;
|
|
25417
25437
|
}
|
|
25418
25438
|
if ($ && G) {
|
|
25419
|
-
const
|
|
25439
|
+
const $e = $.offsetWidth - We - Te - Re, bt = M === "rtl" ? -ne : ne, Xe = dy(G, "--scroll-area-thumb-width", bt, ae, X, We, $e);
|
|
25420
25440
|
G.style.transform = `translate3d(${M === "rtl" ? -Xe : Xe}px,0,0)`;
|
|
25421
25441
|
}
|
|
25422
25442
|
const Ke = [he, we, oe, ee];
|
|
25423
|
-
LS.forEach((
|
|
25424
|
-
O.style.setProperty(
|
|
25425
|
-
}), Y && m((
|
|
25443
|
+
LS.forEach(($e, bt) => {
|
|
25444
|
+
O.style.setProperty($e, `${Ke[bt]}px`);
|
|
25445
|
+
}), Y && m(($e) => _l($e, {
|
|
25426
25446
|
width: Q,
|
|
25427
25447
|
height: re
|
|
25428
|
-
})), x((
|
|
25448
|
+
})), x(($e) => _l($e, J));
|
|
25429
25449
|
const et = {
|
|
25430
25450
|
xStart: !ue && he > k.xStart,
|
|
25431
25451
|
xEnd: !ue && we > k.xEnd,
|
|
25432
25452
|
yStart: !se && oe > k.yStart,
|
|
25433
25453
|
yEnd: !se && ee > k.yEnd
|
|
25434
25454
|
};
|
|
25435
|
-
R((
|
|
25455
|
+
R(($e) => _l($e, et));
|
|
25436
25456
|
});
|
|
25437
25457
|
ve(() => {
|
|
25438
25458
|
jz();
|
|
@@ -26839,13 +26859,13 @@ const c5 = "data-parent", tk = /* @__PURE__ */ y.forwardRef(function(t, n) {
|
|
|
26839
26859
|
if (Me.key !== "Enter" || (Me.preventBaseUIHandler(), Me.defaultPrevented))
|
|
26840
26860
|
return;
|
|
26841
26861
|
const Fe = re.current?.form ?? null, We = Me.currentTarget, tt = Me.nativeEvent, Ke = Me.preventDefault, et = tt.preventDefault;
|
|
26842
|
-
let
|
|
26862
|
+
let $e = !1;
|
|
26843
26863
|
Me.preventDefault = () => {
|
|
26844
|
-
|
|
26864
|
+
$e = !0, Ke.call(Me);
|
|
26845
26865
|
}, tt.preventDefault = () => {
|
|
26846
|
-
|
|
26866
|
+
$e = !0, et.call(tt);
|
|
26847
26867
|
}, et.call(tt), ht(We).queueMicrotask(() => {
|
|
26848
|
-
Me.preventDefault = Ke, tt.preventDefault = et,
|
|
26868
|
+
Me.preventDefault = Ke, tt.preventDefault = et, $e || i5(Fe)?.click();
|
|
26849
26869
|
});
|
|
26850
26870
|
},
|
|
26851
26871
|
onClick(Me) {
|
|
@@ -29577,8 +29597,8 @@ const Dk = /* @__PURE__ */ y.forwardRef(function(t, n) {
|
|
|
29577
29597
|
const tt = ue ? "bottom" : "insetInlineStart", Ke = ue ? "left" : "top";
|
|
29578
29598
|
let et;
|
|
29579
29599
|
se ? R === Te ? et = 2 : Fe === Te && (et = 1) : R === Te && (et = 1);
|
|
29580
|
-
let
|
|
29581
|
-
!D && !Number.isFinite(Ye) ?
|
|
29600
|
+
let $e;
|
|
29601
|
+
!D && !Number.isFinite(Ye) ? $e = Kn : $e = {
|
|
29582
29602
|
position: "absolute",
|
|
29583
29603
|
[tt]: D ? "var(--position)" : `${Ye}%`,
|
|
29584
29604
|
[Ke]: "50%",
|
|
@@ -29698,7 +29718,7 @@ const Dk = /* @__PURE__ */ y.forwardRef(function(t, n) {
|
|
|
29698
29718
|
const Rt = Ik(_e.currentTarget, ue);
|
|
29699
29719
|
G.current = (ue ? _e.clientY : _e.clientX) - Rt;
|
|
29700
29720
|
},
|
|
29701
|
-
style:
|
|
29721
|
+
style: $e,
|
|
29702
29722
|
suppressHydrationWarning: K || void 0
|
|
29703
29723
|
}, E],
|
|
29704
29724
|
stateAttributesMapping: vi
|
|
@@ -29980,7 +30000,7 @@ function Vk(e, t, { isValid: n, enabled: r = !0 }) {
|
|
|
29980
30000
|
const c = Rg(e, n);
|
|
29981
30001
|
return c === void 0 ? o() : c;
|
|
29982
30002
|
}), a = ye(!1);
|
|
29983
|
-
|
|
30003
|
+
Ve(() => {
|
|
29984
30004
|
if (!(!e || !r)) {
|
|
29985
30005
|
if (!a.current) {
|
|
29986
30006
|
a.current = !0;
|
|
@@ -30009,7 +30029,7 @@ function hd({
|
|
|
30009
30029
|
const a = W5(t);
|
|
30010
30030
|
return n.includes(a ?? "") ? a : r();
|
|
30011
30031
|
});
|
|
30012
|
-
|
|
30032
|
+
Ve(() => {
|
|
30013
30033
|
Y5(e, o), K5(t, o);
|
|
30014
30034
|
}, [e, t, o]);
|
|
30015
30035
|
const i = Ne(() => {
|
|
@@ -30224,7 +30244,7 @@ function iK({
|
|
|
30224
30244
|
!1,
|
|
30225
30245
|
{ isValid: iB }
|
|
30226
30246
|
), x = ye(null);
|
|
30227
|
-
|
|
30247
|
+
Ve(() => {
|
|
30228
30248
|
c !== void 0 && x.current?.scrollTo({ top: 0, behavior: "instant" });
|
|
30229
30249
|
}, [c]);
|
|
30230
30250
|
const [w, v] = fe(!1), C = /* @__PURE__ */ d(
|
|
@@ -31795,9 +31815,9 @@ function pK({
|
|
|
31795
31815
|
})).filter((m) => m.score >= 0);
|
|
31796
31816
|
return h.sort((m, g) => g.score - m.score), h.map((m) => m.item);
|
|
31797
31817
|
}, [e, s]);
|
|
31798
|
-
|
|
31818
|
+
Ve(() => {
|
|
31799
31819
|
t && (i(""), l(0));
|
|
31800
|
-
}, [t]),
|
|
31820
|
+
}, [t]), Ve(() => l(0), [s]);
|
|
31801
31821
|
function u(h) {
|
|
31802
31822
|
h.key === "ArrowDown" ? (h.preventDefault(), l((m) => (m + 1) % Math.max(c.length, 1))) : h.key === "ArrowUp" ? (h.preventDefault(), l((m) => (m - 1 + c.length) % Math.max(c.length, 1))) : h.key === "Enter" && c[a] && (h.preventDefault(), c[a].onSelect(), n(!1));
|
|
31803
31823
|
}
|
|
@@ -31911,7 +31931,7 @@ function pK({
|
|
|
31911
31931
|
}
|
|
31912
31932
|
function hK(e = "k") {
|
|
31913
31933
|
const [t, n] = fe(!1);
|
|
31914
|
-
return
|
|
31934
|
+
return Ve(() => {
|
|
31915
31935
|
function r(o) {
|
|
31916
31936
|
o.key.toLowerCase() === e && (o.metaKey || o.ctrlKey) && (o.preventDefault(), n((s) => !s));
|
|
31917
31937
|
}
|
|
@@ -33194,7 +33214,7 @@ const mR = /* @__PURE__ */ y.forwardRef(function(t, n) {
|
|
|
33194
33214
|
readOnly: v,
|
|
33195
33215
|
required: C,
|
|
33196
33216
|
value: ee
|
|
33197
|
-
}), [Y, z, xe, Oe, f, v, C, ee]),
|
|
33217
|
+
}), [Y, z, xe, Oe, f, v, C, ee]), $e = y.useMemo(() => ({
|
|
33198
33218
|
autoComplete: i,
|
|
33199
33219
|
activeIndex: Ie,
|
|
33200
33220
|
disabled: Y,
|
|
@@ -33234,7 +33254,7 @@ const mR = /* @__PURE__ */ y.forwardRef(function(t, n) {
|
|
|
33234
33254
|
re(Xe.size);
|
|
33235
33255
|
},
|
|
33236
33256
|
children: /* @__PURE__ */ P(Fg.Provider, {
|
|
33237
|
-
value:
|
|
33257
|
+
value: $e,
|
|
33238
33258
|
children: [bt, oe && /* @__PURE__ */ d("input", {
|
|
33239
33259
|
...F.getValidationProps(Y, {
|
|
33240
33260
|
onFocus() {
|
|
@@ -33788,12 +33808,12 @@ function F3(e) {
|
|
|
33788
33808
|
}), [ue, pe] = y.useState(!1), [le, ae] = y.useState(null), ie = y.useRef([]), he = y.useRef([]), we = y.useRef(null), oe = y.useRef(null), ee = y.useRef(null), ce = y.useRef(null), xe = y.useRef(null), Q = y.useRef(!0), re = y.useRef(!1), be = y.useRef(null), Ce = y.useRef(null), Oe = y.useRef(null), Te = y.useRef(Nf), Ie = y.useRef(null), Re = y.useRef([]), Ye = y.useRef(null), Ue = W || m, Le = X ?? f, Me = u === "multiple", Fe = u === "single", We = a !== void 0 || i !== void 0, tt = v !== void 0, Ke = C !== void 0;
|
|
33789
33809
|
let et;
|
|
33790
33810
|
R === "always" ? et = "always" : et = R ? "input-change" : !1;
|
|
33791
|
-
const [
|
|
33811
|
+
const [$e, bt] = fn({
|
|
33792
33812
|
controlled: o,
|
|
33793
33813
|
default: Me ? r ?? Sn : r,
|
|
33794
33814
|
name: "Combobox",
|
|
33795
33815
|
state: "selectedValue"
|
|
33796
|
-
}), Xe = y.useMemo(() => E === null ? () => !0 : E !== void 0 ? E : A3(se, I), [E, se, I]), it = $t(() => We ? i ?? "" : Fe ? Xn(
|
|
33816
|
+
}), Xe = y.useMemo(() => E === null ? () => !0 : E !== void 0 ? E : A3(se, I), [E, se, I]), it = $t(() => We ? i ?? "" : Fe ? Xn($e, I) : "").current, [ut, Bt] = fn({
|
|
33797
33817
|
controlled: a,
|
|
33798
33818
|
default: it,
|
|
33799
33819
|
name: "Combobox",
|
|
@@ -33803,7 +33823,7 @@ function F3(e) {
|
|
|
33803
33823
|
default: c,
|
|
33804
33824
|
name: "Combobox",
|
|
33805
33825
|
state: "open"
|
|
33806
|
-
}), Nt = Ug(v), qe = le ?? String(ut).trim(), xt = Fe ? Xn(
|
|
33826
|
+
}), Nt = Ug(v), qe = le ?? String(ut).trim(), xt = Fe ? Xn($e, I) : "", Ht = Fe && !ue && qe !== "" && xt.length === qe.length && se.contains(xt, qe), en = Ht ? "" : qe, vn = tt && Ke && Ht, Kt = y.useMemo(() => v ? Nt ? v.flatMap((Ae) => Ae.items) : v : Sn, [v, Nt]), ln = y.useMemo(() => {
|
|
33807
33827
|
if (C && !vn)
|
|
33808
33828
|
return C;
|
|
33809
33829
|
if (!v)
|
|
@@ -33850,10 +33870,10 @@ function F3(e) {
|
|
|
33850
33870
|
return Ae;
|
|
33851
33871
|
}, [C, vn, v, Nt, en, F, Xe, I, Kt]), tn = y.useMemo(() => Nt ? ln.flatMap((ze) => ze.items) : ln, [ln, Nt]), nt = $t(() => {
|
|
33852
33872
|
let Ae = null;
|
|
33853
|
-
return _ && _e && tt && u !== "none" && (Ae = Rf(tn,
|
|
33873
|
+
return _ && _e && tt && u !== "none" && (Ae = Rf(tn, $e, A, Me)), new D1({
|
|
33854
33874
|
id: J,
|
|
33855
33875
|
labelId: void 0,
|
|
33856
|
-
selectedValue:
|
|
33876
|
+
selectedValue: $e,
|
|
33857
33877
|
open: _e,
|
|
33858
33878
|
items: v,
|
|
33859
33879
|
selectionMode: u,
|
|
@@ -33917,7 +33937,7 @@ function F3(e) {
|
|
|
33917
33937
|
forceMount: mt,
|
|
33918
33938
|
requestSubmit: mt
|
|
33919
33939
|
});
|
|
33920
|
-
}).current, cr = u === "none" ? ut :
|
|
33940
|
+
}).current, cr = u === "none" ? ut : $e, PM = y.useMemo(() => u === "none" ? cr : Array.isArray($e) ? $e.map((Ae) => dr(Ae, T)) : dr($e, T), [cr, T, u, $e]), OM = ge(p), Yb = ge(n), Xb = me(nt, ke.activeIndex), AM = me(nt, ke.selectedIndex), il = me(nt, ke.positionerElement), Zb = me(nt, ke.listElement), ki = me(nt, ke.triggerElement), al = me(nt, ke.inputElement), DM = me(nt, ke.inputGroupElement), On = me(nt, ke.inline), vr = me(nt, ke.inputInsidePopup), _M = me(nt, ke.inputOwnsFormValue), FM = Tt(ki), {
|
|
33921
33941
|
mounted: Qb,
|
|
33922
33942
|
setMounted: VM,
|
|
33923
33943
|
transitionStatus: $d
|
|
@@ -33982,7 +34002,7 @@ function F3(e) {
|
|
|
33982
34002
|
if (_e !== Ae && (ze.reason === ms && tt && tn.length === 0 && !xe.current && ze.allowPropagation(), e.onOpenChange?.(Ae, ze), !ze.isCanceled && (Ae && vr && !On && le !== null && (pe(!1), ae(null), ut !== "" && ze.reason !== nr && wr("", Se(_n, ze.event))), !Ae && ue && (Fe ? (On || ae(qe), qe === "" && pe(!1)) : Me && (On || ae(qe), vr && yr({
|
|
33983
34003
|
activeIndex: null
|
|
33984
34004
|
}), (!vr || On) && wr("", Se(_n, ze.event)))), Rt(Ae), !Ae && vr && (ze.reason === Jr || ze.reason === Ia) && (j(!0), Z(!1), ne === "onBlur")))) {
|
|
33985
|
-
const Pt = u === "none" ? ut :
|
|
34005
|
+
const Pt = u === "none" ? ut : $e;
|
|
33986
34006
|
te.commit(Pt);
|
|
33987
34007
|
}
|
|
33988
34008
|
}), ll = ge((Ae, ze) => {
|
|
@@ -33998,7 +34018,7 @@ function F3(e) {
|
|
|
33998
34018
|
return;
|
|
33999
34019
|
}
|
|
34000
34020
|
if (Me) {
|
|
34001
|
-
const zt = Array.isArray(
|
|
34021
|
+
const zt = Array.isArray($e) ? $e : [], ur = O3(zt, ze, A) ? vR(zt, ze, A) : [...zt, ze];
|
|
34002
34022
|
if (ll(ur, nn), nn.isCanceled || !(oe.current ? oe.current.value.trim() !== "" : !1))
|
|
34003
34023
|
return;
|
|
34004
34024
|
nt.state.inputInsidePopup ? wr("", Se(_n, nn.event)) : Ri(!1, nn);
|
|
@@ -34020,7 +34040,7 @@ function F3(e) {
|
|
|
34020
34040
|
if (nt.state.inputInsidePopup)
|
|
34021
34041
|
oe.current && oe.current.value !== "" && wr("", Se(_n));
|
|
34022
34042
|
else {
|
|
34023
|
-
const Ae = Xn(
|
|
34043
|
+
const Ae = Xn($e, I);
|
|
34024
34044
|
oe.current && oe.current.value !== Ae && wr(Ae, Se(Ae === "" ? _n : It));
|
|
34025
34045
|
}
|
|
34026
34046
|
}), BM = y.useMemo(() => On && il ? {
|
|
@@ -34040,9 +34060,9 @@ function F3(e) {
|
|
|
34040
34060
|
return;
|
|
34041
34061
|
const ze = tt ? Kt : Re.current;
|
|
34042
34062
|
yr({
|
|
34043
|
-
selectedIndex: Rf(ze,
|
|
34063
|
+
selectedIndex: Rf(ze, $e, A, Me)
|
|
34044
34064
|
});
|
|
34045
|
-
}, [_e,
|
|
34065
|
+
}, [_e, $e, u, Me, tt, Kt, A, yr]), ve(() => {
|
|
34046
34066
|
v && (Re.current = tn, ie.current.length = tn.length);
|
|
34047
34067
|
}, [v, tn]), ve(() => {
|
|
34048
34068
|
const Ae = Ie.current;
|
|
@@ -34098,8 +34118,8 @@ function F3(e) {
|
|
|
34098
34118
|
K(String(ut) !== "");
|
|
34099
34119
|
return;
|
|
34100
34120
|
}
|
|
34101
|
-
K(Me ? Array.isArray(
|
|
34102
|
-
}, [K, u, ut,
|
|
34121
|
+
K(Me ? Array.isArray($e) && $e.length > 0 : $e != null);
|
|
34122
|
+
}, [K, u, ut, $e, Me]), y.useEffect(() => {
|
|
34103
34123
|
tt && et && tn.length === 0 && yr({
|
|
34104
34124
|
activeIndex: null
|
|
34105
34125
|
});
|
|
@@ -34112,11 +34132,11 @@ function F3(e) {
|
|
|
34112
34132
|
!_e || qe === "" || qe === String(it) || pe(!0);
|
|
34113
34133
|
});
|
|
34114
34134
|
function tx() {
|
|
34115
|
-
const Ae = Xn(
|
|
34135
|
+
const Ae = Xn($e, I);
|
|
34116
34136
|
ut !== Ae && wr(Ae, Se(It));
|
|
34117
34137
|
}
|
|
34118
|
-
tr(
|
|
34119
|
-
u !== "none" && (H(Le), G(HM(
|
|
34138
|
+
tr($e, () => {
|
|
34139
|
+
u !== "none" && (H(Le), G(HM($e)), te.change($e), Fe && !We && !vr && tx());
|
|
34120
34140
|
}), tr(ut, () => {
|
|
34121
34141
|
u === "none" && (H(Le), G(ut !== Y.initialValue), te.change(ut));
|
|
34122
34142
|
}), tr(v, () => {
|
|
@@ -34220,7 +34240,7 @@ function F3(e) {
|
|
|
34220
34240
|
}), ve(() => {
|
|
34221
34241
|
nt.update({
|
|
34222
34242
|
id: J,
|
|
34223
|
-
selectedValue:
|
|
34243
|
+
selectedValue: $e,
|
|
34224
34244
|
open: _e,
|
|
34225
34245
|
mounted: Qb,
|
|
34226
34246
|
transitionStatus: $d,
|
|
@@ -34249,13 +34269,13 @@ function F3(e) {
|
|
|
34249
34269
|
hasInputValue: We,
|
|
34250
34270
|
inputOwnsFormValue: u === "none" && (_ || !nt.state.inputInsidePopup)
|
|
34251
34271
|
});
|
|
34252
|
-
}, [nt, J,
|
|
34272
|
+
}, [nt, J, $e, _e, Qb, $d, v, Hd, Ud, Bd, jd, Jb, Ld, u, Le, Ue, g, b, w, D, S, I, z, A, $, We, _, et, h]);
|
|
34253
34273
|
const UM = gn(x, te.inputRef), jM = y.useMemo(() => ({
|
|
34254
34274
|
query: qe,
|
|
34255
34275
|
hasItems: tt,
|
|
34256
34276
|
filteredItems: ln,
|
|
34257
34277
|
flatFilteredItems: tn
|
|
34258
|
-
}), [qe, tt, ln, tn]), GM = y.useMemo(() => Array.isArray(cr) ? "" : dr(cr, T), [cr, T]), WM = Me && Array.isArray(
|
|
34278
|
+
}), [qe, tt, ln, tn]), GM = y.useMemo(() => Array.isArray(cr) ? "" : dr(cr, T), [cr, T]), WM = Me && Array.isArray($e) && $e.length > 0, Gd = Me || u === "none" && _M ? void 0 : Le, KM = y.useMemo(() => !Me || !Array.isArray($e) || !Le ? null : $e.map((Ae) => {
|
|
34259
34279
|
const ze = dr(Ae, T);
|
|
34260
34280
|
return /* @__PURE__ */ d("input", {
|
|
34261
34281
|
type: "hidden",
|
|
@@ -34264,7 +34284,7 @@ function F3(e) {
|
|
|
34264
34284
|
value: ze,
|
|
34265
34285
|
disabled: Ue
|
|
34266
34286
|
}, ze);
|
|
34267
|
-
}), [Me,
|
|
34287
|
+
}), [Me, $e, h, Le, T, Ue]), qM = /* @__PURE__ */ P(y.Fragment, {
|
|
34268
34288
|
children: [e.children, /* @__PURE__ */ d("input", {
|
|
34269
34289
|
...te.getValidationProps(Ue, {
|
|
34270
34290
|
// Move focus when the hidden input is focused.
|
|
@@ -35842,7 +35862,7 @@ function t4(e) {
|
|
|
35842
35862
|
}), Ke = di(tt, {
|
|
35843
35863
|
enabled: !f && !O,
|
|
35844
35864
|
event: "mousedown"
|
|
35845
|
-
}), et = fi(tt),
|
|
35865
|
+
}), et = fi(tt), $e = im(tt, {
|
|
35846
35866
|
enabled: !f && !O,
|
|
35847
35867
|
listRef: K,
|
|
35848
35868
|
activeIndex: ee,
|
|
@@ -35869,7 +35889,7 @@ function t4(e) {
|
|
|
35869
35889
|
onTyping(qe) {
|
|
35870
35890
|
q.current = qe;
|
|
35871
35891
|
}
|
|
35872
|
-
}), Xe = y.useMemo(() => dn(bt.reference,
|
|
35892
|
+
}), Xe = y.useMemo(() => dn(bt.reference, $e.reference, et.reference, Ke.reference, we), [Ke.reference, bt.reference, $e.reference, et.reference, we]), it = y.useMemo(() => dn(pi, bt.floating, $e.floating, et.floating), [bt.floating, $e.floating, et.floating]), ut = $e.item ?? yt;
|
|
35873
35893
|
bR(() => {
|
|
35874
35894
|
oe.update({
|
|
35875
35895
|
popupProps: it,
|
|
@@ -36390,8 +36410,8 @@ const i4 = {
|
|
|
36390
36410
|
let We = Math.min(Ie, Fe);
|
|
36391
36411
|
const tt = Ie - xe - Q, Ke = Fe - We, et = Re - Oe;
|
|
36392
36412
|
L.style.left = `${Vt(Le, Ce, et - he.width)}px`, L.style.height = `${We}px`, L.style.maxHeight = "none", L.style.marginTop = `${xe}px`, L.style.marginBottom = `${Q}px`, ne.style.height = "100%";
|
|
36393
|
-
const
|
|
36394
|
-
bt && (We = Math.min(Ie, he.height) - (Ke -
|
|
36413
|
+
const $e = zl(oe), bt = Ke >= $e - Ur;
|
|
36414
|
+
bt && (We = Math.min(Ie, he.height) - (Ke - $e));
|
|
36395
36415
|
const Xe = ie.top < Te || ie.bottom > Ie - Te || Math.ceil(We) + Ur < Math.min(ee, re), it = (se.visualViewport?.scale ?? 1) !== 1 && ar;
|
|
36396
36416
|
if (Xe || it) {
|
|
36397
36417
|
qc(L, Y.current), N(!1);
|
|
@@ -37782,7 +37802,7 @@ function Wy(e) {
|
|
|
37782
37802
|
}
|
|
37783
37803
|
function w4({ className: e, children: t, variant: n }) {
|
|
37784
37804
|
const r = yd({ variant: n }), o = ye(null);
|
|
37785
|
-
return
|
|
37805
|
+
return Ve(() => {
|
|
37786
37806
|
const s = o.current;
|
|
37787
37807
|
if (!s) return;
|
|
37788
37808
|
Wy(s);
|
|
@@ -38766,7 +38786,7 @@ function OK({
|
|
|
38766
38786
|
v(
|
|
38767
38787
|
Object.fromEntries(O.map((X) => [X.id, X.defaultSize ?? K]))
|
|
38768
38788
|
);
|
|
38769
|
-
}, [f, S, C, v]),
|
|
38789
|
+
}, [f, S, C, v]), Ve(() => {
|
|
38770
38790
|
Object.keys(w).length > 0 && s?.(w);
|
|
38771
38791
|
}, [w, s]);
|
|
38772
38792
|
const A = Ne(
|
|
@@ -42154,19 +42174,19 @@ function cU(e) {
|
|
|
42154
42174
|
const t = ye(null);
|
|
42155
42175
|
t.current ??= new eU(e);
|
|
42156
42176
|
const n = t.current;
|
|
42157
|
-
return n.setCallbacks(e),
|
|
42177
|
+
return n.setCallbacks(e), Ve(() => rU(n), [n]), n;
|
|
42158
42178
|
}
|
|
42159
42179
|
function Rd(e) {
|
|
42160
42180
|
return Vr(e.subscribe, e.getState, e.getState);
|
|
42161
42181
|
}
|
|
42162
42182
|
function uU(e, t) {
|
|
42163
42183
|
const { id: n, container: r, index: o, axis: s = "y", disabled: i = !1, activation: a } = t, [l, c] = fe(null), [u, p] = fe(null);
|
|
42164
|
-
|
|
42184
|
+
Ve(() => {
|
|
42165
42185
|
if (l)
|
|
42166
42186
|
return e.registerItem({ id: n, container: r, index: o, element: l });
|
|
42167
42187
|
}, [e, l, n, r, o]);
|
|
42168
42188
|
const f = `${a?.distance ?? ""}/${a?.delay ?? ""}/${a?.tolerance ?? ""}`, h = ye(a);
|
|
42169
|
-
h.current = a,
|
|
42189
|
+
h.current = a, Ve(() => {
|
|
42170
42190
|
if (!u || i) return;
|
|
42171
42191
|
const g = nU(e, u, {
|
|
42172
42192
|
id: n,
|
|
@@ -42185,7 +42205,7 @@ function uU(e, t) {
|
|
|
42185
42205
|
}
|
|
42186
42206
|
function dU(e, t) {
|
|
42187
42207
|
const { id: n, axis: r = "y" } = t, [o, s] = fe(null);
|
|
42188
|
-
|
|
42208
|
+
Ve(() => {
|
|
42189
42209
|
if (o)
|
|
42190
42210
|
return e.registerContainer({ id: n, element: o, axis: r });
|
|
42191
42211
|
}, [e, o, n, r]);
|
|
@@ -42221,7 +42241,7 @@ function pU(e, t = {}) {
|
|
|
42221
42241
|
const [n, r] = fe(""), o = ye(t);
|
|
42222
42242
|
o.current = t;
|
|
42223
42243
|
const s = ye(null), i = ye(null), a = ye(null), l = ye(0);
|
|
42224
|
-
return
|
|
42244
|
+
return Ve(() => {
|
|
42225
42245
|
function c() {
|
|
42226
42246
|
i.current !== null && (window.clearTimeout(i.current), i.current = null, a.current = null);
|
|
42227
42247
|
}
|
|
@@ -42646,7 +42666,7 @@ function SU(e) {
|
|
|
42646
42666
|
r.current = null, o();
|
|
42647
42667
|
}, 0));
|
|
42648
42668
|
}, [o]);
|
|
42649
|
-
return
|
|
42669
|
+
return Ve(
|
|
42650
42670
|
() => () => {
|
|
42651
42671
|
r.current !== null && (clearTimeout(r.current), r.current = null);
|
|
42652
42672
|
},
|
|
@@ -42680,7 +42700,7 @@ function Sb({
|
|
|
42680
42700
|
() => ({ threshold: u, maxSpeed: p, reducedMaxSpeed: f }),
|
|
42681
42701
|
[u, p, f]
|
|
42682
42702
|
);
|
|
42683
|
-
|
|
42703
|
+
Ve(() => aU(i, h), [i, h]);
|
|
42684
42704
|
const m = ye({
|
|
42685
42705
|
item: /* @__PURE__ */ new Map(),
|
|
42686
42706
|
container: /* @__PURE__ */ new Map()
|
|
@@ -42716,7 +42736,7 @@ function kb({
|
|
|
42716
42736
|
children: o
|
|
42717
42737
|
}) {
|
|
42718
42738
|
const { session: s, registerLabel: i } = Nd("DragDropContainer"), { setContainerRef: a, isOver: l } = dU(s, { id: e, axis: n }), c = Rd(s), u = Ss({ axis: n });
|
|
42719
|
-
|
|
42739
|
+
Ve(
|
|
42720
42740
|
() => i("container", e, t),
|
|
42721
42741
|
[i, e, t]
|
|
42722
42742
|
);
|
|
@@ -42748,7 +42768,7 @@ function Rb({
|
|
|
42748
42768
|
index: t,
|
|
42749
42769
|
axis: u
|
|
42750
42770
|
}), m = Rd(s);
|
|
42751
|
-
|
|
42771
|
+
Ve(() => a("item", e, n), [a, e, n]), Ve(() => l.item(e, c, t), [l, e, c, t]);
|
|
42752
42772
|
const g = m.phase === "dragging" && m.id === e, b = Ss({ axis: u, moving: p !== null }), x = m.from && m.from.container === c && m.from.index < t ? t - 1 : t, w = !g && p?.markerAt === x, v = !g && p !== null && p.markerAt === p.restCount && x === p.restCount - 1, C = p && /* @__PURE__ */ d(iI, { shift: p, at: w ? x : p.restCount - 1 });
|
|
42753
42773
|
return (
|
|
42754
42774
|
/* A FRAGMENT, so the marker is a DIRECT CHILD of the container. Wrapping the
|
|
@@ -42822,14 +42842,14 @@ function kU({
|
|
|
42822
42842
|
const RU = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
42823
42843
|
function oI({ label: e, className: t, children: n }) {
|
|
42824
42844
|
const { instructionsId: r, census: o } = Nd("DragDropSurface"), { axis: s } = Id("DragDropSurface"), { id: i, setHandleRef: a, label: l } = eI("DragDropSurface"), c = JN();
|
|
42825
|
-
|
|
42845
|
+
Ve(() => c ? void 0 : o.source(i), [o, i, c]);
|
|
42826
42846
|
const u = Ss({ axis: s }), [p, f] = fe(null), [h, m] = fe(!1), g = Ne(
|
|
42827
42847
|
(b) => {
|
|
42828
42848
|
f(b), a(b);
|
|
42829
42849
|
},
|
|
42830
42850
|
[a]
|
|
42831
42851
|
);
|
|
42832
|
-
return
|
|
42852
|
+
return Ve(() => {
|
|
42833
42853
|
if (!p || c) return;
|
|
42834
42854
|
const b = p.querySelector(RU);
|
|
42835
42855
|
if (m(b === null), !b) return;
|
|
@@ -42860,7 +42880,7 @@ function oI({ label: e, className: t, children: n }) {
|
|
|
42860
42880
|
}
|
|
42861
42881
|
function sI({ label: e, className: t, children: n }) {
|
|
42862
42882
|
const { instructionsId: r, census: o } = Nd("DragDropHandle"), { axis: s } = Id("DragDropHandle"), { id: i, setHandleRef: a, label: l } = eI("DragDropHandle"), c = JN();
|
|
42863
|
-
|
|
42883
|
+
Ve(() => c ? void 0 : o.source(i), [o, i, c]);
|
|
42864
42884
|
const u = Ss({ axis: s }), p = n ?? /* @__PURE__ */ d(de, { name: "grip-vertical", size: "sm" });
|
|
42865
42885
|
return c ? /* @__PURE__ */ d("span", { "aria-hidden": "true", className: U(u.handle(), t), children: p }) : /* @__PURE__ */ d(
|
|
42866
42886
|
"span",
|
|
@@ -43701,7 +43721,7 @@ function jK({ id: e, index: t, label: n, className: r, children: o }) {
|
|
|
43701
43721
|
const { columnId: s } = $U("BoardCard"), i = ye(!1), a = Ne(() => (i.current = !0, () => {
|
|
43702
43722
|
i.current = !1;
|
|
43703
43723
|
}), []);
|
|
43704
|
-
|
|
43724
|
+
Ve(() => {
|
|
43705
43725
|
i.current || console.warn(
|
|
43706
43726
|
`[danxbot] board: card "${String(e)}" rendered without placing the move control it was handed. Every drag outcome must stay reachable by pointer alone without dragging (WCAG 2.2 SC 2.5.7) — a keyboard path does not satisfy it. Render the node \`BoardCard\` passes to its children function.`
|
|
43707
43727
|
);
|
|
@@ -43714,7 +43734,7 @@ function jK({ id: e, index: t, label: n, className: r, children: o }) {
|
|
|
43714
43734
|
}
|
|
43715
43735
|
function HU({ columnId: e }) {
|
|
43716
43736
|
const t = VU("BoardCardHandle"), n = LU("BoardCardHandle"), r = AU(), [o, s] = fe(!1), i = Nb(), { registerHandle: a } = n;
|
|
43717
|
-
|
|
43737
|
+
Ve(() => a(), [a]);
|
|
43718
43738
|
const c = t.columns.find((g) => g.id === e)?.count ?? 0, u = t.columns.filter((g) => g.id !== e);
|
|
43719
43739
|
function p(g) {
|
|
43720
43740
|
s(!1), t.requestMove({
|
|
@@ -44857,7 +44877,7 @@ function sj({
|
|
|
44857
44877
|
return Gn(() => {
|
|
44858
44878
|
const h = i.current;
|
|
44859
44879
|
h && (h.scrollTop = h.scrollHeight);
|
|
44860
|
-
}, []),
|
|
44880
|
+
}, []), Ve(() => {
|
|
44861
44881
|
const h = a.current;
|
|
44862
44882
|
if (!h || typeof ResizeObserver > "u") return;
|
|
44863
44883
|
const m = new ResizeObserver(() => {
|
|
@@ -44929,7 +44949,7 @@ function ij({
|
|
|
44929
44949
|
className: l
|
|
44930
44950
|
}) {
|
|
44931
44951
|
const [c, u] = fe(!1), [p, f] = fe(!1), h = e.filter((b) => !b.secondary), m = e.filter((b) => b.secondary), g = e.find((b) => b.id === t);
|
|
44932
|
-
return
|
|
44952
|
+
return Ve(() => {
|
|
44933
44953
|
if (!c || !o) return;
|
|
44934
44954
|
const b = (x) => {
|
|
44935
44955
|
if (x.metaKey || x.ctrlKey || x.altKey) return;
|
|
@@ -44937,7 +44957,7 @@ function ij({
|
|
|
44937
44957
|
!Number.isInteger(w) || w < 0 || !v || v.disabled || (x.preventDefault(), n(v.id), u(!1));
|
|
44938
44958
|
};
|
|
44939
44959
|
return document.addEventListener("keydown", b), () => document.removeEventListener("keydown", b);
|
|
44940
|
-
}, [c, o, h, n]),
|
|
44960
|
+
}, [c, o, h, n]), Ve(() => {
|
|
44941
44961
|
c || f(!1);
|
|
44942
44962
|
}, [c]), /* @__PURE__ */ P(
|
|
44943
44963
|
Ka,
|
|
@@ -45711,7 +45731,7 @@ function nq({
|
|
|
45711
45731
|
Rj(b, e, o, s),
|
|
45712
45732
|
{ month: e, weekStartsOn: r, onMonthChange: l }
|
|
45713
45733
|
), v = ye(/* @__PURE__ */ new Map()), C = ye(!1);
|
|
45714
|
-
|
|
45734
|
+
Ve(() => {
|
|
45715
45735
|
C.current && v.current.get(Vn(w.focusedDay))?.focus();
|
|
45716
45736
|
}, [w.focusedDay]);
|
|
45717
45737
|
const E = De(
|
|
@@ -45978,7 +45998,7 @@ function Pj(e, t = {}) {
|
|
|
45978
45998
|
}
|
|
45979
45999
|
function Oj(e = {}) {
|
|
45980
46000
|
const { resolutionMs: t = 6e4, enabled: n = !0, fixed: r } = e, [o, s] = fe(() => r ?? Date.now());
|
|
45981
|
-
return
|
|
46001
|
+
return Ve(() => {
|
|
45982
46002
|
if (r !== void 0) {
|
|
45983
46003
|
s(r);
|
|
45984
46004
|
return;
|
|
@@ -46065,11 +46085,11 @@ function Dj(e) {
|
|
|
46065
46085
|
const x = ye({ columns: [], origin: null, anchor: null, last: null, spoken: null, point: null }), w = Ne(() => {
|
|
46066
46086
|
x.current.columns = b.current.measure();
|
|
46067
46087
|
}, []);
|
|
46068
|
-
|
|
46088
|
+
Ve(() => {
|
|
46069
46089
|
if (!u && !f) return;
|
|
46070
46090
|
const A = () => w();
|
|
46071
46091
|
return window.addEventListener("scroll", A, { capture: !0, passive: !0 }), () => window.removeEventListener("scroll", A, { capture: !0 });
|
|
46072
|
-
}, [u, f, w]),
|
|
46092
|
+
}, [u, f, w]), Ve(() => {
|
|
46073
46093
|
if (!u && !f) return;
|
|
46074
46094
|
const A = (D) => {
|
|
46075
46095
|
D.key === "Escape" && (D.preventDefault(), x.current.origin = null, x.current.anchor = null, x.current.last = null, p(null), h(null), g(!1), b.current.onAnnounce?.("Move cancelled"));
|
|
@@ -46508,7 +46528,7 @@ function rq({
|
|
|
46508
46528
|
const $ = e[0], H = un(t, $) + a * 36e5;
|
|
46509
46529
|
return Math.max(0, Math.min(1, Ca(t, $, H))) * T;
|
|
46510
46530
|
}, [_, t, a, T]);
|
|
46511
|
-
|
|
46531
|
+
Ve(() => {
|
|
46512
46532
|
const $ = S.current;
|
|
46513
46533
|
!$ || V === null || ($.scrollTop = V);
|
|
46514
46534
|
}, [V]);
|
|
@@ -46543,7 +46563,7 @@ function rq({
|
|
|
46543
46563
|
},
|
|
46544
46564
|
locale: x
|
|
46545
46565
|
});
|
|
46546
|
-
|
|
46566
|
+
Ve(() => {
|
|
46547
46567
|
if (!(!F.draft && !F.creating || !S.current))
|
|
46548
46568
|
return Eb({ getPoint: F.getPoint, onScrolled: F.onScrolled });
|
|
46549
46569
|
}, [F.draft, F.creating, F.getPoint, F.onScrolled]);
|
|
@@ -47281,7 +47301,7 @@ function rG({
|
|
|
47281
47301
|
className: l
|
|
47282
47302
|
}) {
|
|
47283
47303
|
const [c, u] = fe(o), [p, f] = fe(s), [h, m] = fe(zi);
|
|
47284
|
-
|
|
47304
|
+
Ve(() => {
|
|
47285
47305
|
t && (u(o), f(s), m(zi));
|
|
47286
47306
|
}, [t]);
|
|
47287
47307
|
const g = c.trim().length > 0 && !i;
|
|
@@ -48203,7 +48223,7 @@ function vq({
|
|
|
48203
48223
|
className: i
|
|
48204
48224
|
}) {
|
|
48205
48225
|
const [a, l] = fe([]), [c, u] = fe(""), [p, f] = fe(n[0]?.id ?? ""), [h, m] = fe(void 0);
|
|
48206
|
-
|
|
48226
|
+
Ve(() => {
|
|
48207
48227
|
e && (l([]), u(""), m(void 0), f(n[0]?.id ?? ""));
|
|
48208
48228
|
}, [e]);
|
|
48209
48229
|
function g() {
|
|
@@ -51796,7 +51816,7 @@ function vW(e) {
|
|
|
51796
51816
|
), w = Ne(() => {
|
|
51797
51817
|
m.current.drag = null, m.current.point = null, c(null);
|
|
51798
51818
|
}, []);
|
|
51799
|
-
|
|
51819
|
+
Ve(() => {
|
|
51800
51820
|
if (!l) return;
|
|
51801
51821
|
const N = (M) => {
|
|
51802
51822
|
if (M.key !== "Escape") return;
|
|
@@ -51807,13 +51827,13 @@ function vW(e) {
|
|
|
51807
51827
|
}), w());
|
|
51808
51828
|
};
|
|
51809
51829
|
return window.addEventListener("keydown", N), () => window.removeEventListener("keydown", N);
|
|
51810
|
-
}, [l, w]),
|
|
51830
|
+
}, [l, w]), Ve(() => {
|
|
51811
51831
|
if (!l && !u) return;
|
|
51812
51832
|
const N = () => g();
|
|
51813
51833
|
return window.addEventListener("scroll", N, { capture: !0, passive: !0 }), window.addEventListener("resize", N), () => {
|
|
51814
51834
|
window.removeEventListener("scroll", N, { capture: !0 }), window.removeEventListener("resize", N);
|
|
51815
51835
|
};
|
|
51816
|
-
}, [l, u, g]),
|
|
51836
|
+
}, [l, u, g]), Ve(() => {
|
|
51817
51837
|
if (l)
|
|
51818
51838
|
return Eb({
|
|
51819
51839
|
getPoint: () => m.current.point,
|
|
@@ -51947,7 +51967,7 @@ function $q({
|
|
|
51947
51967
|
() => S ? { cycleMemberIds: S } : C,
|
|
51948
51968
|
[S, C]
|
|
51949
51969
|
), [N, M] = fe(null), [I, T] = fe("canvas"), A = ye(!1);
|
|
51950
|
-
|
|
51970
|
+
Ve(() => {
|
|
51951
51971
|
A.current || (A.current = !0, typeof window < "u" && window.matchMedia("(max-width: 640px)").matches && T("list"));
|
|
51952
51972
|
}, []);
|
|
51953
51973
|
const D = ye(e.nodes), _ = ye(e.edges);
|
|
@@ -51992,7 +52012,7 @@ function $q({
|
|
|
51992
52012
|
onNodeDragEnd: m,
|
|
51993
52013
|
disabled: g
|
|
51994
52014
|
}), { clearOffsets: G } = H, Y = `${C ?? ""}:${S?.join(",") ?? ""}:${i}`, K = ye(Y);
|
|
51995
|
-
|
|
52015
|
+
Ve(() => {
|
|
51996
52016
|
K.current !== Y && (K.current = Y, G());
|
|
51997
52017
|
}, [Y, G]);
|
|
51998
52018
|
const X = Ne(
|
|
@@ -52078,7 +52098,7 @@ function $q({
|
|
|
52078
52098
|
},
|
|
52079
52099
|
[ie]
|
|
52080
52100
|
);
|
|
52081
|
-
|
|
52101
|
+
Ve(() => {
|
|
52082
52102
|
const Q = ae.current;
|
|
52083
52103
|
!Q || V.nodes.length === 0 || (Q.scrollLeft = Math.max(0, B.width / 2 - Q.clientWidth / 2), Q.scrollTop = Math.max(0, B.height / 2 - Q.clientHeight / 2));
|
|
52084
52104
|
}, [C, S, B.width, B.height]);
|
|
@@ -52493,7 +52513,7 @@ function FW(e) {
|
|
|
52493
52513
|
const L = v.current;
|
|
52494
52514
|
L.width === 0 || L.height === 0 || k(dM(S.current.contentBox, L, S.current.fitBounds));
|
|
52495
52515
|
}, [k]), I = ye(!1), [T, A] = fe(PW);
|
|
52496
|
-
|
|
52516
|
+
Ve(() => {
|
|
52497
52517
|
if (!C) return;
|
|
52498
52518
|
const L = v.current, $ = S.current.frameBox ?? S.current.contentBox, H = { ...S.current.fitBounds, padding: S.current.framePadding ?? Or.fitPadding }, { camera: G, overflow: Y } = SW($, L, {
|
|
52499
52519
|
...H,
|
|
@@ -52595,7 +52615,7 @@ function FW(e) {
|
|
|
52595
52615
|
},
|
|
52596
52616
|
[N, B]
|
|
52597
52617
|
);
|
|
52598
|
-
return
|
|
52618
|
+
return Ve(
|
|
52599
52619
|
() => () => {
|
|
52600
52620
|
R.current !== null && window.clearTimeout(R.current);
|
|
52601
52621
|
},
|
|
@@ -52642,7 +52662,7 @@ function Yw({
|
|
|
52642
52662
|
pe.observe(se), S.current.set(q, pe);
|
|
52643
52663
|
}, R.current.set(q, J), J);
|
|
52644
52664
|
}, []);
|
|
52645
|
-
|
|
52665
|
+
Ve(() => {
|
|
52646
52666
|
const q = S.current;
|
|
52647
52667
|
return () => {
|
|
52648
52668
|
for (const J of q.values()) J.disconnect();
|
|
@@ -53891,7 +53911,7 @@ function A7(e, t, n) {
|
|
|
53891
53911
|
() => r === null ? rl : Dd(r, o),
|
|
53892
53912
|
[r, o]
|
|
53893
53913
|
), a = Vr(s, i, E7);
|
|
53894
|
-
return
|
|
53914
|
+
return Ve(() => r === null ? void 0 : Gb([r]), [r]), a;
|
|
53895
53915
|
}
|
|
53896
53916
|
function Wq(e, t, n) {
|
|
53897
53917
|
const r = n.needs, o = De(() => t.map((f) => co(e.type, f)), [e.type, t.join("\0")]), s = o.join("\0"), i = Ne(
|
|
@@ -53907,7 +53927,7 @@ function Wq(e, t, n) {
|
|
|
53907
53927
|
const m = Object.freeze(f);
|
|
53908
53928
|
return a.current = { signature: s, needs: r, states: m }, m;
|
|
53909
53929
|
}, [s, r]), c = De(() => Object.freeze(o.map(() => rl)), [s]), u = Ne(() => c, [c]), p = Vr(i, l, u);
|
|
53910
|
-
return
|
|
53930
|
+
return Ve(() => Gb(o), [s]), p;
|
|
53911
53931
|
}
|
|
53912
53932
|
function Kq() {
|
|
53913
53933
|
return Vr(CM, jb, M7);
|
|
@@ -54379,7 +54399,7 @@ function Yq({
|
|
|
54379
54399
|
...o
|
|
54380
54400
|
}) {
|
|
54381
54401
|
const [s] = fe(() => new U7({ transport: e, tenant: t, ...o })), i = ye(t);
|
|
54382
|
-
return
|
|
54402
|
+
return Ve(() => (s.start(), () => s.stop()), [s]), Ve(() => {
|
|
54383
54403
|
i.current !== t && (i.current = t, s.setTenant(t)), n && p7(t);
|
|
54384
54404
|
}, [s, t, n]), /* @__PURE__ */ d(SM.Provider, { value: s, children: r });
|
|
54385
54405
|
}
|
|
@@ -54388,7 +54408,7 @@ function kM() {
|
|
|
54388
54408
|
}
|
|
54389
54409
|
function Xq(e, t, n) {
|
|
54390
54410
|
const r = kM(), o = Kb(Fd(t)), s = [...n].sort().join(","), i = ye({ scope: t, events: n });
|
|
54391
|
-
i.current = { scope: t, events: n },
|
|
54411
|
+
i.current = { scope: t, events: n }, Ve(() => {
|
|
54392
54412
|
if (r)
|
|
54393
54413
|
return r.acquire(e.type, i.current.scope, i.current.events);
|
|
54394
54414
|
}, [r, e.type, o, s]);
|
|
@@ -54683,11 +54703,11 @@ function tY(e, t, n) {
|
|
|
54683
54703
|
const f = ye(o);
|
|
54684
54704
|
f.current = o;
|
|
54685
54705
|
const h = ye(!0);
|
|
54686
|
-
|
|
54706
|
+
Ve(() => (h.current = !0, () => {
|
|
54687
54707
|
h.current = !1;
|
|
54688
54708
|
}), []);
|
|
54689
54709
|
const m = ye(null);
|
|
54690
|
-
|
|
54710
|
+
Ve(() => {
|
|
54691
54711
|
if (a === null || !s) {
|
|
54692
54712
|
m.current = null;
|
|
54693
54713
|
return;
|
|
@@ -54729,14 +54749,14 @@ function nY(e, t) {
|
|
|
54729
54749
|
const g = ye(o);
|
|
54730
54750
|
g.current = o;
|
|
54731
54751
|
const b = ye(!0);
|
|
54732
|
-
|
|
54752
|
+
Ve(() => (b.current = !0, () => {
|
|
54733
54753
|
b.current = !1;
|
|
54734
|
-
}), []),
|
|
54754
|
+
}), []), Ve(
|
|
54735
54755
|
() => J7(n, { type: e.type, tag: r, createdScope: u.current }),
|
|
54736
54756
|
[n, e.type, r, c]
|
|
54737
54757
|
);
|
|
54738
54758
|
const x = Ne((S) => l8(n, S), [n]), w = Ne(() => u8(n), [n]), v = Vr(x, w, X7), C = ye(null);
|
|
54739
|
-
|
|
54759
|
+
Ve(() => {
|
|
54740
54760
|
if (!s) {
|
|
54741
54761
|
C.current = null;
|
|
54742
54762
|
return;
|
|
@@ -54782,7 +54802,7 @@ function rY(e, t) {
|
|
|
54782
54802
|
});
|
|
54783
54803
|
}
|
|
54784
54804
|
function oY(e = 6e4) {
|
|
54785
|
-
|
|
54805
|
+
Ve(() => {
|
|
54786
54806
|
const t = setInterval(() => O7(), e);
|
|
54787
54807
|
return () => clearInterval(t);
|
|
54788
54808
|
}, [e]);
|