ynotsoft-dynamic-form 1.0.79 → 1.0.80
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/dynamic-form.js +117 -108
- package/dist/dynamic-form.umd.cjs +13 -13
- package/package.json +5 -2
package/dist/dynamic-form.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as c, jsxs as M, Fragment as Ke } from "react/jsx-runtime";
|
|
2
2
|
import * as d from "react";
|
|
3
|
-
import _e, { forwardRef as rs, createElement as ho, useState as fe, useRef as zt, useCallback as ka, useEffect as
|
|
3
|
+
import _e, { forwardRef as rs, createElement as ho, useState as fe, useRef as zt, useCallback as ka, useEffect as Ze, useLayoutEffect as Ra, useMemo as Ta } from "react";
|
|
4
4
|
import { toast as mn } from "react-hot-toast";
|
|
5
5
|
import Kn from "dayjs";
|
|
6
6
|
import Pa from "react-select";
|
|
@@ -306,9 +306,9 @@ function $l({
|
|
|
306
306
|
const S = b.target.value;
|
|
307
307
|
y(S), R.current && clearTimeout(R.current), R.current = setTimeout(() => H(S), 300);
|
|
308
308
|
};
|
|
309
|
-
|
|
309
|
+
Ze(() => {
|
|
310
310
|
m && (h === "" ? H("") : (u.length === 0 || !e.optionsUrl && !i && !e.onSearch) && H(h), setTimeout(() => x.current?.focus(), 50));
|
|
311
|
-
}, [m]),
|
|
311
|
+
}, [m]), Ze(() => {
|
|
312
312
|
const b = (S) => {
|
|
313
313
|
A.current && !A.current.contains(S.target) && (w(!1), y(""), o(e.name));
|
|
314
314
|
};
|
|
@@ -618,14 +618,14 @@ var Gl = [
|
|
|
618
618
|
function Yl(e, t) {
|
|
619
619
|
e && Sn.flushSync(() => e.dispatchEvent(t));
|
|
620
620
|
}
|
|
621
|
-
function
|
|
621
|
+
function Qe(e) {
|
|
622
622
|
const t = d.useRef(e);
|
|
623
623
|
return d.useEffect(() => {
|
|
624
624
|
t.current = e;
|
|
625
625
|
}), d.useMemo(() => (...n) => t.current?.(...n), []);
|
|
626
626
|
}
|
|
627
627
|
function Kl(e, t = globalThis?.document) {
|
|
628
|
-
const n =
|
|
628
|
+
const n = Qe(e);
|
|
629
629
|
d.useEffect(() => {
|
|
630
630
|
const o = (r) => {
|
|
631
631
|
r.key === "Escape" && n(r);
|
|
@@ -698,7 +698,7 @@ var Ql = "DismissableLayerBranch", Jl = d.forwardRef((e, t) => {
|
|
|
698
698
|
});
|
|
699
699
|
Jl.displayName = Ql;
|
|
700
700
|
function ec(e, t = globalThis?.document) {
|
|
701
|
-
const n =
|
|
701
|
+
const n = Qe(e), o = d.useRef(!1), r = d.useRef(() => {
|
|
702
702
|
});
|
|
703
703
|
return d.useEffect(() => {
|
|
704
704
|
const s = (a) => {
|
|
@@ -728,7 +728,7 @@ function ec(e, t = globalThis?.document) {
|
|
|
728
728
|
};
|
|
729
729
|
}
|
|
730
730
|
function tc(e, t = globalThis?.document) {
|
|
731
|
-
const n =
|
|
731
|
+
const n = Qe(e), o = d.useRef(!1);
|
|
732
732
|
return d.useEffect(() => {
|
|
733
733
|
const r = (s) => {
|
|
734
734
|
s.target && !o.current && us(Zl, n, { originalEvent: s }, {
|
|
@@ -793,7 +793,7 @@ var nc = [
|
|
|
793
793
|
onMountAutoFocus: r,
|
|
794
794
|
onUnmountAutoFocus: s,
|
|
795
795
|
...i
|
|
796
|
-
} = e, [a, l] = d.useState(null), u =
|
|
796
|
+
} = e, [a, l] = d.useState(null), u = Qe(r), f = Qe(s), p = d.useRef(null), g = se(t, (h) => l(h)), m = d.useRef({
|
|
797
797
|
paused: !1,
|
|
798
798
|
pause() {
|
|
799
799
|
this.paused = !0;
|
|
@@ -923,7 +923,7 @@ function Wt(e) {
|
|
|
923
923
|
n((o) => o ?? String(fc++));
|
|
924
924
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
925
925
|
}
|
|
926
|
-
const pc = ["top", "right", "bottom", "left"],
|
|
926
|
+
const pc = ["top", "right", "bottom", "left"], Je = Math.min, Se = Math.max, hn = Math.round, Jt = Math.floor, ze = (e) => ({
|
|
927
927
|
x: e,
|
|
928
928
|
y: e
|
|
929
929
|
}), mc = {
|
|
@@ -936,7 +936,7 @@ const pc = ["top", "right", "bottom", "left"], Qe = Math.min, Se = Math.max, hn
|
|
|
936
936
|
end: "start"
|
|
937
937
|
};
|
|
938
938
|
function bo(e, t, n) {
|
|
939
|
-
return Se(e,
|
|
939
|
+
return Se(e, Je(t, n));
|
|
940
940
|
}
|
|
941
941
|
function Ge(e, t) {
|
|
942
942
|
return typeof e == "function" ? e(t) : e;
|
|
@@ -1207,7 +1207,7 @@ const Ac = (e) => ({
|
|
|
1207
1207
|
}, m = $o(r), w = Fo(m), h = await i.getDimensions(u), y = m === "y", C = y ? "top" : "left", E = y ? "bottom" : "right", A = y ? "clientHeight" : "clientWidth", x = s.reference[w] + s.reference[m] - g[m] - s.floating[w], R = g[m] - s.reference[m], L = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u));
|
|
1208
1208
|
let O = L ? L[A] : 0;
|
|
1209
1209
|
(!O || !await (i.isElement == null ? void 0 : i.isElement(L))) && (O = a.floating[A] || s.floating[w]);
|
|
1210
|
-
const P = x / 2 - R / 2, H = O / 2 - h[w] / 2 - 1, W =
|
|
1210
|
+
const P = x / 2 - R / 2, H = O / 2 - h[w] / 2 - 1, W = Je(p[C], H), U = Je(p[E], H), V = W, b = O - h[w] - U, S = O / 2 - h[w] / 2 + P, k = bo(V, S, b), T = !l.arrow && At(r) != null && S !== k && s.reference[w] / 2 - (S < V ? W : U) - h[w] / 2 < 0, _ = T ? S < V ? S - V : S - b : 0;
|
|
1211
1211
|
return {
|
|
1212
1212
|
[m]: g[m] + _,
|
|
1213
1213
|
data: {
|
|
@@ -1523,7 +1523,7 @@ const Tc = function(e) {
|
|
|
1523
1523
|
} = s.floating;
|
|
1524
1524
|
let y, C;
|
|
1525
1525
|
p === "top" || p === "bottom" ? (y = p, C = g === (await (i.isRTL == null ? void 0 : i.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (C = p, y = g === "end" ? "top" : "bottom");
|
|
1526
|
-
const E = h - f.top - f.bottom, A = w - f.left - f.right, x =
|
|
1526
|
+
const E = h - f.top - f.bottom, A = w - f.left - f.right, x = Je(h - f[y], E), R = Je(w - f[C], A), L = !t.middlewareData.shift;
|
|
1527
1527
|
let O = x, P = R;
|
|
1528
1528
|
if ((n = t.middlewareData.shift) != null && n.enabled.x && (P = A), (o = t.middlewareData.shift) != null && o.enabled.y && (O = E), L && !g) {
|
|
1529
1529
|
const W = Se(f.left, 0), U = Se(f.right, 0), V = Se(f.top, 0), b = Se(f.bottom, 0);
|
|
@@ -1599,13 +1599,13 @@ function zo(e) {
|
|
|
1599
1599
|
return Fc.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || $c.some((o) => (n.willChange || "").includes(o)) || zc.some((o) => (n.contain || "").includes(o));
|
|
1600
1600
|
}
|
|
1601
1601
|
function Bc(e) {
|
|
1602
|
-
let t =
|
|
1602
|
+
let t = et(e);
|
|
1603
1603
|
for (; Be(t) && !Ct(t); ) {
|
|
1604
1604
|
if (zo(t))
|
|
1605
1605
|
return t;
|
|
1606
1606
|
if (En(t))
|
|
1607
1607
|
return null;
|
|
1608
|
-
t =
|
|
1608
|
+
t = et(t);
|
|
1609
1609
|
}
|
|
1610
1610
|
return null;
|
|
1611
1611
|
}
|
|
@@ -1628,7 +1628,7 @@ function An(e) {
|
|
|
1628
1628
|
scrollTop: e.scrollY
|
|
1629
1629
|
};
|
|
1630
1630
|
}
|
|
1631
|
-
function
|
|
1631
|
+
function et(e) {
|
|
1632
1632
|
if (Nt(e) === "html")
|
|
1633
1633
|
return e;
|
|
1634
1634
|
const t = (
|
|
@@ -1641,7 +1641,7 @@ function Je(e) {
|
|
|
1641
1641
|
return Tr(t) ? t.host : t;
|
|
1642
1642
|
}
|
|
1643
1643
|
function gs(e) {
|
|
1644
|
-
const t =
|
|
1644
|
+
const t = et(e);
|
|
1645
1645
|
return Ct(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Be(t) && jt(t) ? t : gs(t);
|
|
1646
1646
|
}
|
|
1647
1647
|
function Ut(e, t, n) {
|
|
@@ -1821,7 +1821,7 @@ function _r(e, t, n) {
|
|
|
1821
1821
|
return bn(o);
|
|
1822
1822
|
}
|
|
1823
1823
|
function ws(e, t) {
|
|
1824
|
-
const n =
|
|
1824
|
+
const n = et(e);
|
|
1825
1825
|
return n === t || !Oe(n) || Ct(n) ? !1 : Ie(n).position === "fixed" || ws(n, t);
|
|
1826
1826
|
}
|
|
1827
1827
|
function Xc(e, t) {
|
|
@@ -1830,10 +1830,10 @@ function Xc(e, t) {
|
|
|
1830
1830
|
return n;
|
|
1831
1831
|
let o = Ut(e, [], !1).filter((a) => Oe(a) && Nt(a) !== "body"), r = null;
|
|
1832
1832
|
const s = Ie(e).position === "fixed";
|
|
1833
|
-
let i = s ?
|
|
1833
|
+
let i = s ? et(e) : e;
|
|
1834
1834
|
for (; Oe(i) && !Ct(i); ) {
|
|
1835
1835
|
const a = Ie(i), l = zo(i);
|
|
1836
|
-
!l && a.position === "fixed" && (r = null), (s ? !l && !r : !l && a.position === "static" && !!r && Kc.has(r.position) || jt(i) && !l && ws(e, i)) ? o = o.filter((f) => f !== i) : r = a, i =
|
|
1836
|
+
!l && a.position === "fixed" && (r = null), (s ? !l && !r : !l && a.position === "static" && !!r && Kc.has(r.position) || jt(i) && !l && ws(e, i)) ? o = o.filter((f) => f !== i) : r = a, i = et(i);
|
|
1837
1837
|
}
|
|
1838
1838
|
return t.set(e, o), o;
|
|
1839
1839
|
}
|
|
@@ -1846,7 +1846,7 @@ function Zc(e) {
|
|
|
1846
1846
|
} = e;
|
|
1847
1847
|
const i = [...n === "clippingAncestors" ? En(t) ? [] : Xc(t, this._c) : [].concat(n), o], a = i[0], l = i.reduce((u, f) => {
|
|
1848
1848
|
const p = _r(t, f, r);
|
|
1849
|
-
return u.top = Se(p.top, u.top), u.right =
|
|
1849
|
+
return u.top = Se(p.top, u.top), u.right = Je(p.right, u.right), u.bottom = Je(p.bottom, u.bottom), u.left = Se(p.left, u.left), u;
|
|
1850
1850
|
}, _r(t, a, r));
|
|
1851
1851
|
return {
|
|
1852
1852
|
width: l.right - l.left,
|
|
@@ -1905,11 +1905,11 @@ function xs(e, t) {
|
|
|
1905
1905
|
if (En(e))
|
|
1906
1906
|
return n;
|
|
1907
1907
|
if (!Be(e)) {
|
|
1908
|
-
let r =
|
|
1908
|
+
let r = et(e);
|
|
1909
1909
|
for (; r && !Ct(r); ) {
|
|
1910
1910
|
if (Oe(r) && !Qn(r))
|
|
1911
1911
|
return r;
|
|
1912
|
-
r =
|
|
1912
|
+
r = et(r);
|
|
1913
1913
|
}
|
|
1914
1914
|
return n;
|
|
1915
1915
|
}
|
|
@@ -1967,7 +1967,7 @@ function ou(e, t) {
|
|
|
1967
1967
|
return;
|
|
1968
1968
|
const w = Jt(p), h = Jt(r.clientWidth - (f + g)), y = Jt(r.clientHeight - (p + m)), C = Jt(f), A = {
|
|
1969
1969
|
rootMargin: -w + "px " + -h + "px " + -y + "px " + -C + "px",
|
|
1970
|
-
threshold: Se(0,
|
|
1970
|
+
threshold: Se(0, Je(1, l)) || 1
|
|
1971
1971
|
};
|
|
1972
1972
|
let x = !0;
|
|
1973
1973
|
function R(L) {
|
|
@@ -2387,7 +2387,7 @@ var Wo = "PopperContent", [Tu, Pu] = ks(Wo), Os = d.forwardRef(
|
|
|
2387
2387
|
Iu({ arrowWidth: O, arrowHeight: P }),
|
|
2388
2388
|
g && xu({ strategy: "referenceHidden", ...b })
|
|
2389
2389
|
]
|
|
2390
|
-
}), [K, te] = Ls(T), j =
|
|
2390
|
+
}), [K, te] = Ls(T), j = Qe(w);
|
|
2391
2391
|
ge(() => {
|
|
2392
2392
|
_ && j?.();
|
|
2393
2393
|
}, [_, j]);
|
|
@@ -3192,7 +3192,7 @@ Go.classNames = Rn.classNames;
|
|
|
3192
3192
|
var Pd = [" ", "Enter", "ArrowUp", "ArrowDown"], _d = [" ", "Enter"], ct = "Select", [Tn, Pn, Od] = as(ct), [kt] = dt(ct, [
|
|
3193
3193
|
Od,
|
|
3194
3194
|
kn
|
|
3195
|
-
]), _n = kn(), [Id,
|
|
3195
|
+
]), _n = kn(), [Id, tt] = kt(ct), [Md, Ld] = kt(ct), Xs = (e) => {
|
|
3196
3196
|
const {
|
|
3197
3197
|
__scopeSelect: t,
|
|
3198
3198
|
children: n,
|
|
@@ -3281,7 +3281,7 @@ var Pd = [" ", "Enter", "ArrowUp", "ArrowDown"], _d = [" ", "Enter"], ct = "Sele
|
|
|
3281
3281
|
Xs.displayName = ct;
|
|
3282
3282
|
var Zs = "SelectTrigger", Qs = d.forwardRef(
|
|
3283
3283
|
(e, t) => {
|
|
3284
|
-
const { __scopeSelect: n, disabled: o = !1, ...r } = e, s = _n(n), i =
|
|
3284
|
+
const { __scopeSelect: n, disabled: o = !1, ...r } = e, s = _n(n), i = tt(Zs, n), a = i.disabled || o, l = se(t, i.onTriggerChange), u = Pn(n), f = d.useRef("touch"), [p, g, m] = Si((h) => {
|
|
3285
3285
|
const y = u().filter((A) => !A.disabled), C = y.find((A) => A.value === i.value), E = Ci(y, h, C);
|
|
3286
3286
|
E !== void 0 && i.onValueChange(E.value);
|
|
3287
3287
|
}), w = (h) => {
|
|
@@ -3325,7 +3325,7 @@ var Zs = "SelectTrigger", Qs = d.forwardRef(
|
|
|
3325
3325
|
Qs.displayName = Zs;
|
|
3326
3326
|
var Js = "SelectValue", ei = d.forwardRef(
|
|
3327
3327
|
(e, t) => {
|
|
3328
|
-
const { __scopeSelect: n, className: o, style: r, children: s, placeholder: i = "", ...a } = e, l =
|
|
3328
|
+
const { __scopeSelect: n, className: o, style: r, children: s, placeholder: i = "", ...a } = e, l = tt(Js, n), { onValueNodeHasChildrenChange: u } = l, f = s !== void 0, p = se(t, l.onValueNodeChange);
|
|
3329
3329
|
return ge(() => {
|
|
3330
3330
|
u(f);
|
|
3331
3331
|
}, [u, f]), /* @__PURE__ */ c(
|
|
@@ -3351,7 +3351,7 @@ var Fd = "SelectPortal", ni = (e) => /* @__PURE__ */ c(Vo, { asChild: !0, ...e }
|
|
|
3351
3351
|
ni.displayName = Fd;
|
|
3352
3352
|
var ut = "SelectContent", oi = d.forwardRef(
|
|
3353
3353
|
(e, t) => {
|
|
3354
|
-
const n =
|
|
3354
|
+
const n = tt(ut, e.__scopeSelect), [o, r] = d.useState();
|
|
3355
3355
|
if (ge(() => {
|
|
3356
3356
|
r(new DocumentFragment());
|
|
3357
3357
|
}, []), !n.open) {
|
|
@@ -3365,7 +3365,7 @@ var ut = "SelectContent", oi = d.forwardRef(
|
|
|
3365
3365
|
}
|
|
3366
3366
|
);
|
|
3367
3367
|
oi.displayName = ut;
|
|
3368
|
-
var Te = 10, [ri,
|
|
3368
|
+
var Te = 10, [ri, nt] = kt(ut), $d = "SelectContentImpl", zd = /* @__PURE__ */ xe("SelectContent.RemoveScroll"), si = d.forwardRef(
|
|
3369
3369
|
(e, t) => {
|
|
3370
3370
|
const {
|
|
3371
3371
|
__scopeSelect: n,
|
|
@@ -3387,7 +3387,7 @@ var Te = 10, [ri, tt] = kt(ut), $d = "SelectContentImpl", zd = /* @__PURE__ */ x
|
|
|
3387
3387
|
avoidCollisions: y,
|
|
3388
3388
|
//
|
|
3389
3389
|
...C
|
|
3390
|
-
} = e, E =
|
|
3390
|
+
} = e, E = tt(ut, n), [A, x] = d.useState(null), [R, L] = d.useState(null), O = se(t, (D) => x(D)), [P, H] = d.useState(null), [W, U] = d.useState(
|
|
3391
3391
|
null
|
|
3392
3392
|
), V = Pn(n), [b, S] = d.useState(!1), k = d.useRef(!1);
|
|
3393
3393
|
d.useEffect(() => {
|
|
@@ -3535,26 +3535,26 @@ var Te = 10, [ri, tt] = kt(ut), $d = "SelectContentImpl", zd = /* @__PURE__ */ x
|
|
|
3535
3535
|
);
|
|
3536
3536
|
si.displayName = $d;
|
|
3537
3537
|
var Bd = "SelectItemAlignedPosition", ii = d.forwardRef((e, t) => {
|
|
3538
|
-
const { __scopeSelect: n, onPlaced: o, ...r } = e, s =
|
|
3538
|
+
const { __scopeSelect: n, onPlaced: o, ...r } = e, s = tt(ut, n), i = nt(ut, n), [a, l] = d.useState(null), [u, f] = d.useState(null), p = se(t, (O) => f(O)), g = Pn(n), m = d.useRef(!1), w = d.useRef(!0), { viewport: h, selectedItem: y, selectedItemText: C, focusSelectedItem: E } = i, A = d.useCallback(() => {
|
|
3539
3539
|
if (s.trigger && s.valueNode && a && u && h && y && C) {
|
|
3540
3540
|
const O = s.trigger.getBoundingClientRect(), P = u.getBoundingClientRect(), H = s.valueNode.getBoundingClientRect(), W = C.getBoundingClientRect();
|
|
3541
3541
|
if (s.dir !== "rtl") {
|
|
3542
|
-
const ee = W.left - P.left, ne = H.left - ee, ce = O.left - ne, Ne = O.width + ce, Re = Math.max(Ne, P.width),
|
|
3542
|
+
const ee = W.left - P.left, ne = H.left - ee, ce = O.left - ne, Ne = O.width + ce, Re = Math.max(Ne, P.width), rt = window.innerWidth - Te, st = hr(ne, [
|
|
3543
3543
|
Te,
|
|
3544
3544
|
// Prevents the content from going off the starting edge of the
|
|
3545
3545
|
// viewport. It may still go off the ending edge, but this can be
|
|
3546
3546
|
// controlled by the user since they may want to manage overflow in a
|
|
3547
3547
|
// specific way.
|
|
3548
3548
|
// https://github.com/radix-ui/primitives/issues/2049
|
|
3549
|
-
Math.max(Te,
|
|
3549
|
+
Math.max(Te, rt - Re)
|
|
3550
3550
|
]);
|
|
3551
|
-
a.style.minWidth = Ne + "px", a.style.left =
|
|
3551
|
+
a.style.minWidth = Ne + "px", a.style.left = st + "px";
|
|
3552
3552
|
} else {
|
|
3553
|
-
const ee = P.right - W.right, ne = window.innerWidth - H.right - ee, ce = window.innerWidth - O.right - ne, Ne = O.width + ce, Re = Math.max(Ne, P.width),
|
|
3553
|
+
const ee = P.right - W.right, ne = window.innerWidth - H.right - ee, ce = window.innerWidth - O.right - ne, Ne = O.width + ce, Re = Math.max(Ne, P.width), rt = window.innerWidth - Te, st = hr(ne, [
|
|
3554
3554
|
Te,
|
|
3555
|
-
Math.max(Te,
|
|
3555
|
+
Math.max(Te, rt - Re)
|
|
3556
3556
|
]);
|
|
3557
|
-
a.style.minWidth = Ne + "px", a.style.right =
|
|
3557
|
+
a.style.minWidth = Ne + "px", a.style.right = st + "px";
|
|
3558
3558
|
}
|
|
3559
3559
|
const U = g(), V = window.innerHeight - Te * 2, b = h.scrollHeight, S = window.getComputedStyle(u), k = parseInt(S.borderTopWidth, 10), T = parseInt(S.paddingTop, 10), _ = parseInt(S.borderBottomWidth, 10), N = parseInt(S.paddingBottom, 10), K = k + T + b + N + _, te = Math.min(y.offsetHeight * 5, K), j = window.getComputedStyle(h), Ae = parseInt(j.paddingTop, 10), G = parseInt(j.paddingBottom, 10), oe = O.top + O.height / 2 - Te, Q = V - oe, me = y.offsetHeight / 2, D = y.offsetTop + me, J = k + T + D, ae = K - J;
|
|
3560
3560
|
if (J <= oe) {
|
|
@@ -3670,7 +3670,7 @@ var Ud = "SelectPopperPosition", xo = d.forwardRef((e, t) => {
|
|
|
3670
3670
|
xo.displayName = Ud;
|
|
3671
3671
|
var [Hd, Yo] = kt(ut, {}), So = "SelectViewport", ai = d.forwardRef(
|
|
3672
3672
|
(e, t) => {
|
|
3673
|
-
const { __scopeSelect: n, nonce: o, ...r } = e, s =
|
|
3673
|
+
const { __scopeSelect: n, nonce: o, ...r } = e, s = nt(So, n), i = Yo(So, n), a = se(t, s.onViewportChange), l = d.useRef(0);
|
|
3674
3674
|
return /* @__PURE__ */ M(Ke, { children: [
|
|
3675
3675
|
/* @__PURE__ */ c(
|
|
3676
3676
|
"style",
|
|
@@ -3743,7 +3743,7 @@ var yn = "SelectItem", [Vd, fi] = kt(yn), pi = d.forwardRef(
|
|
|
3743
3743
|
disabled: r = !1,
|
|
3744
3744
|
textValue: s,
|
|
3745
3745
|
...i
|
|
3746
|
-
} = e, a =
|
|
3746
|
+
} = e, a = tt(yn, n), l = nt(yn, n), u = a.value === o, [f, p] = d.useState(s ?? ""), [g, m] = d.useState(!1), w = se(
|
|
3747
3747
|
t,
|
|
3748
3748
|
(E) => l.itemRefCallback?.(E, o, r)
|
|
3749
3749
|
), h = Wt(), y = d.useRef("touch"), C = () => {
|
|
@@ -3815,7 +3815,7 @@ var yn = "SelectItem", [Vd, fi] = kt(yn), pi = d.forwardRef(
|
|
|
3815
3815
|
pi.displayName = yn;
|
|
3816
3816
|
var $t = "SelectItemText", mi = d.forwardRef(
|
|
3817
3817
|
(e, t) => {
|
|
3818
|
-
const { __scopeSelect: n, className: o, style: r, ...s } = e, i =
|
|
3818
|
+
const { __scopeSelect: n, className: o, style: r, ...s } = e, i = tt($t, n), a = nt($t, n), l = fi($t, n), u = Ld($t, n), [f, p] = d.useState(null), g = se(
|
|
3819
3819
|
t,
|
|
3820
3820
|
(C) => p(C),
|
|
3821
3821
|
l.onItemTextChange,
|
|
@@ -3839,7 +3839,7 @@ var hi = "SelectItemIndicator", Gd = d.forwardRef(
|
|
|
3839
3839
|
);
|
|
3840
3840
|
Gd.displayName = hi;
|
|
3841
3841
|
var Co = "SelectScrollUpButton", gi = d.forwardRef((e, t) => {
|
|
3842
|
-
const n =
|
|
3842
|
+
const n = nt(Co, e.__scopeSelect), o = Yo(Co, e.__scopeSelect), [r, s] = d.useState(!1), i = se(t, o.onScrollButtonChange);
|
|
3843
3843
|
return ge(() => {
|
|
3844
3844
|
if (n.viewport && n.isPositioned) {
|
|
3845
3845
|
let a = function() {
|
|
@@ -3863,7 +3863,7 @@ var Co = "SelectScrollUpButton", gi = d.forwardRef((e, t) => {
|
|
|
3863
3863
|
});
|
|
3864
3864
|
gi.displayName = Co;
|
|
3865
3865
|
var Eo = "SelectScrollDownButton", Yd = d.forwardRef((e, t) => {
|
|
3866
|
-
const n =
|
|
3866
|
+
const n = nt(Eo, e.__scopeSelect), o = Yo(Eo, e.__scopeSelect), [r, s] = d.useState(!1), i = se(t, o.onScrollButtonChange);
|
|
3867
3867
|
return ge(() => {
|
|
3868
3868
|
if (n.viewport && n.isPositioned) {
|
|
3869
3869
|
let a = function() {
|
|
@@ -3887,7 +3887,7 @@ var Eo = "SelectScrollDownButton", Yd = d.forwardRef((e, t) => {
|
|
|
3887
3887
|
});
|
|
3888
3888
|
Yd.displayName = Eo;
|
|
3889
3889
|
var bi = d.forwardRef((e, t) => {
|
|
3890
|
-
const { __scopeSelect: n, onAutoScroll: o, ...r } = e, s =
|
|
3890
|
+
const { __scopeSelect: n, onAutoScroll: o, ...r } = e, s = nt("SelectScrollButton", n), i = d.useRef(null), a = Pn(n), l = d.useCallback(() => {
|
|
3891
3891
|
i.current !== null && (window.clearInterval(i.current), i.current = null);
|
|
3892
3892
|
}, []);
|
|
3893
3893
|
return d.useEffect(() => () => l(), [l]), ge(() => {
|
|
@@ -3919,7 +3919,7 @@ var bi = d.forwardRef((e, t) => {
|
|
|
3919
3919
|
vi.displayName = Kd;
|
|
3920
3920
|
var Ao = "SelectArrow", yi = d.forwardRef(
|
|
3921
3921
|
(e, t) => {
|
|
3922
|
-
const { __scopeSelect: n, ...o } = e, r = _n(n), s =
|
|
3922
|
+
const { __scopeSelect: n, ...o } = e, r = _n(n), s = tt(Ao, n), i = nt(Ao, n);
|
|
3923
3923
|
return s.open && i.position === "popper" ? /* @__PURE__ */ c($s, { ...r, ...o, ref: t }) : null;
|
|
3924
3924
|
}
|
|
3925
3925
|
);
|
|
@@ -3954,7 +3954,7 @@ function xi(e) {
|
|
|
3954
3954
|
return e === "" || e === void 0;
|
|
3955
3955
|
}
|
|
3956
3956
|
function Si(e) {
|
|
3957
|
-
const t =
|
|
3957
|
+
const t = Qe(e), n = d.useRef(""), o = d.useRef(0), r = d.useCallback(
|
|
3958
3958
|
(i) => {
|
|
3959
3959
|
const a = n.current + i;
|
|
3960
3960
|
t(a), (function l(u) {
|
|
@@ -4357,7 +4357,7 @@ function ki() {
|
|
|
4357
4357
|
value: null
|
|
4358
4358
|
}
|
|
4359
4359
|
}));
|
|
4360
|
-
let ae = !0, X = !0, ee = !1, ne = !0, ce = !1, Ne = !0, Re = !1,
|
|
4360
|
+
let ae = !0, X = !0, ee = !1, ne = !0, ce = !1, Ne = !0, Re = !1, rt = !1, st = !1, ft = !1, Yt = !1, Kt = !1, Zo = !0, Qo = !1;
|
|
4361
4361
|
const ya = "user-content-";
|
|
4362
4362
|
let Bn = !0, Pt = !1, pt = {}, Me = null;
|
|
4363
4363
|
const Un = q({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
@@ -4378,7 +4378,7 @@ function ki() {
|
|
|
4378
4378
|
let v = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
4379
4379
|
if (!(ht && ht === v)) {
|
|
4380
4380
|
if ((!v || typeof v != "object") && (v = {}), v = De(v), _t = // eslint-disable-next-line unicorn/prefer-includes
|
|
4381
|
-
Sa.indexOf(v.PARSER_MEDIA_TYPE) === -1 ? Ca : v.PARSER_MEDIA_TYPE, ue = _t === "application/xhtml+xml" ? ro : pn, j = Pe(v, "ALLOWED_TAGS") ? q({}, v.ALLOWED_TAGS, ue) : Ae, G = Pe(v, "ALLOWED_ATTR") ? q({}, v.ALLOWED_ATTR, ue) : oe, jn = Pe(v, "ALLOWED_NAMESPACES") ? q({}, v.ALLOWED_NAMESPACES, ro) : wa, Hn = Pe(v, "ADD_URI_SAFE_ATTR") ? q(De(tr), v.ADD_URI_SAFE_ATTR, ue) : tr, Jo = Pe(v, "ADD_DATA_URI_TAGS") ? q(De(er), v.ADD_DATA_URI_TAGS, ue) : er, Me = Pe(v, "FORBID_CONTENTS") ? q({}, v.FORBID_CONTENTS, ue) : Un, me = Pe(v, "FORBID_TAGS") ? q({}, v.FORBID_TAGS, ue) : De({}), D = Pe(v, "FORBID_ATTR") ? q({}, v.FORBID_ATTR, ue) : De({}), pt = Pe(v, "USE_PROFILES") ? v.USE_PROFILES : !1, ae = v.ALLOW_ARIA_ATTR !== !1, X = v.ALLOW_DATA_ATTR !== !1, ee = v.ALLOW_UNKNOWN_PROTOCOLS || !1, ne = v.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ce = v.SAFE_FOR_TEMPLATES || !1, Ne = v.SAFE_FOR_XML !== !1, Re = v.WHOLE_DOCUMENT || !1, ft = v.RETURN_DOM || !1, Yt = v.RETURN_DOM_FRAGMENT || !1, Kt = v.RETURN_TRUSTED_TYPE || !1,
|
|
4381
|
+
Sa.indexOf(v.PARSER_MEDIA_TYPE) === -1 ? Ca : v.PARSER_MEDIA_TYPE, ue = _t === "application/xhtml+xml" ? ro : pn, j = Pe(v, "ALLOWED_TAGS") ? q({}, v.ALLOWED_TAGS, ue) : Ae, G = Pe(v, "ALLOWED_ATTR") ? q({}, v.ALLOWED_ATTR, ue) : oe, jn = Pe(v, "ALLOWED_NAMESPACES") ? q({}, v.ALLOWED_NAMESPACES, ro) : wa, Hn = Pe(v, "ADD_URI_SAFE_ATTR") ? q(De(tr), v.ADD_URI_SAFE_ATTR, ue) : tr, Jo = Pe(v, "ADD_DATA_URI_TAGS") ? q(De(er), v.ADD_DATA_URI_TAGS, ue) : er, Me = Pe(v, "FORBID_CONTENTS") ? q({}, v.FORBID_CONTENTS, ue) : Un, me = Pe(v, "FORBID_TAGS") ? q({}, v.FORBID_TAGS, ue) : De({}), D = Pe(v, "FORBID_ATTR") ? q({}, v.FORBID_ATTR, ue) : De({}), pt = Pe(v, "USE_PROFILES") ? v.USE_PROFILES : !1, ae = v.ALLOW_ARIA_ATTR !== !1, X = v.ALLOW_DATA_ATTR !== !1, ee = v.ALLOW_UNKNOWN_PROTOCOLS || !1, ne = v.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ce = v.SAFE_FOR_TEMPLATES || !1, Ne = v.SAFE_FOR_XML !== !1, Re = v.WHOLE_DOCUMENT || !1, ft = v.RETURN_DOM || !1, Yt = v.RETURN_DOM_FRAGMENT || !1, Kt = v.RETURN_TRUSTED_TYPE || !1, st = v.FORCE_BODY || !1, Zo = v.SANITIZE_DOM !== !1, Qo = v.SANITIZE_NAMED_PROPS || !1, Bn = v.KEEP_CONTENT !== !1, Pt = v.IN_PLACE || !1, te = v.ALLOWED_URI_REGEXP || Ai, mt = v.NAMESPACE || He, Zt = v.MATHML_TEXT_INTEGRATION_POINTS || Zt, Qt = v.HTML_INTEGRATION_POINTS || Qt, Q = v.CUSTOM_ELEMENT_HANDLING || {}, v.CUSTOM_ELEMENT_HANDLING && nr(v.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (Q.tagNameCheck = v.CUSTOM_ELEMENT_HANDLING.tagNameCheck), v.CUSTOM_ELEMENT_HANDLING && nr(v.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (Q.attributeNameCheck = v.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), v.CUSTOM_ELEMENT_HANDLING && typeof v.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (Q.allowCustomizedBuiltInElements = v.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), ce && (X = !1), Yt && (ft = !0), pt && (j = q({}, Vr), G = [], pt.html === !0 && (q(j, jr), q(G, Gr)), pt.svg === !0 && (q(j, io), q(G, co), q(G, sn)), pt.svgFilters === !0 && (q(j, ao), q(G, co), q(G, sn)), pt.mathMl === !0 && (q(j, lo), q(G, Yr), q(G, sn))), v.ADD_TAGS && (typeof v.ADD_TAGS == "function" ? J.tagCheck = v.ADD_TAGS : (j === Ae && (j = De(j)), q(j, v.ADD_TAGS, ue))), v.ADD_ATTR && (typeof v.ADD_ATTR == "function" ? J.attributeCheck = v.ADD_ATTR : (G === oe && (G = De(G)), q(G, v.ADD_ATTR, ue))), v.ADD_URI_SAFE_ATTR && q(Hn, v.ADD_URI_SAFE_ATTR, ue), v.FORBID_CONTENTS && (Me === Un && (Me = De(Me)), q(Me, v.FORBID_CONTENTS, ue)), v.ADD_FORBID_CONTENTS && (Me === Un && (Me = De(Me)), q(Me, v.ADD_FORBID_CONTENTS, ue)), Bn && (j["#text"] = !0), Re && q(j, ["html", "head", "body"]), j.table && (q(j, ["tbody"]), delete me.tbody), v.TRUSTED_TYPES_POLICY) {
|
|
4382
4382
|
if (typeof v.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
4383
4383
|
throw Mt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
4384
4384
|
if (typeof v.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -4405,7 +4405,7 @@ function ki() {
|
|
|
4405
4405
|
} catch {
|
|
4406
4406
|
y(v);
|
|
4407
4407
|
}
|
|
4408
|
-
},
|
|
4408
|
+
}, it = function(v, I) {
|
|
4409
4409
|
try {
|
|
4410
4410
|
Ot(t.removed, {
|
|
4411
4411
|
attribute: I.getAttributeNode(v),
|
|
@@ -4430,7 +4430,7 @@ function ki() {
|
|
|
4430
4430
|
}
|
|
4431
4431
|
}, sr = function(v) {
|
|
4432
4432
|
let I = null, z = null;
|
|
4433
|
-
if (
|
|
4433
|
+
if (st)
|
|
4434
4434
|
v = "<remove></remove>" + v;
|
|
4435
4435
|
else {
|
|
4436
4436
|
const le = so(v, /^[\r\n\t ]+/);
|
|
@@ -4553,22 +4553,22 @@ function ki() {
|
|
|
4553
4553
|
value: je
|
|
4554
4554
|
} = he, gt = ue(le), Yn = je;
|
|
4555
4555
|
let pe = le === "value" ? Yn : wf(Yn);
|
|
4556
|
-
if (z.attrName = gt, z.attrValue = pe, z.keepAttr = !0, z.forceKeepAttr = void 0, We(U.uponSanitizeAttribute, v, z), pe = z.attrValue, Qo && (gt === "id" || gt === "name") && (
|
|
4557
|
-
|
|
4556
|
+
if (z.attrName = gt, z.attrValue = pe, z.keepAttr = !0, z.forceKeepAttr = void 0, We(U.uponSanitizeAttribute, v, z), pe = z.attrValue, Qo && (gt === "id" || gt === "name") && (it(le, v), pe = ya + pe), Ne && be(/((--!?|])>)|<\/(style|title|textarea)/i, pe)) {
|
|
4557
|
+
it(le, v);
|
|
4558
4558
|
continue;
|
|
4559
4559
|
}
|
|
4560
4560
|
if (gt === "attributename" && so(pe, "href")) {
|
|
4561
|
-
|
|
4561
|
+
it(le, v);
|
|
4562
4562
|
continue;
|
|
4563
4563
|
}
|
|
4564
4564
|
if (z.forceKeepAttr)
|
|
4565
4565
|
continue;
|
|
4566
4566
|
if (!z.keepAttr) {
|
|
4567
|
-
|
|
4567
|
+
it(le, v);
|
|
4568
4568
|
continue;
|
|
4569
4569
|
}
|
|
4570
4570
|
if (!ne && be(/\/>/i, pe)) {
|
|
4571
|
-
|
|
4571
|
+
it(le, v);
|
|
4572
4572
|
continue;
|
|
4573
4573
|
}
|
|
4574
4574
|
ce && rn([V, b, S], (pr) => {
|
|
@@ -4576,7 +4576,7 @@ function ki() {
|
|
|
4576
4576
|
});
|
|
4577
4577
|
const fr = ue(v.nodeName);
|
|
4578
4578
|
if (!cr(fr, gt, pe)) {
|
|
4579
|
-
|
|
4579
|
+
it(le, v);
|
|
4580
4580
|
continue;
|
|
4581
4581
|
}
|
|
4582
4582
|
if (x && typeof m == "object" && typeof m.getAttributeType == "function" && !we)
|
|
@@ -4594,7 +4594,7 @@ function ki() {
|
|
|
4594
4594
|
try {
|
|
4595
4595
|
we ? v.setAttributeNS(we, le, pe) : v.setAttribute(le, pe), Gn(v) ? Le(v) : Wr(t.removed);
|
|
4596
4596
|
} catch {
|
|
4597
|
-
|
|
4597
|
+
it(le, v);
|
|
4598
4598
|
}
|
|
4599
4599
|
}
|
|
4600
4600
|
We(U.afterSanitizeAttributes, v, null);
|
|
@@ -4615,7 +4615,7 @@ function ki() {
|
|
|
4615
4615
|
throw Mt("toString is not a function");
|
|
4616
4616
|
if (!t.isSupported)
|
|
4617
4617
|
return B;
|
|
4618
|
-
if (
|
|
4618
|
+
if (rt || Vn(v), t.removed = [], typeof B == "string" && (Pt = !1), Pt) {
|
|
4619
4619
|
if (B.nodeName) {
|
|
4620
4620
|
const je = ue(B.nodeName);
|
|
4621
4621
|
if (!j[je] || me[je])
|
|
@@ -4630,7 +4630,7 @@ function ki() {
|
|
|
4630
4630
|
if (I = sr(B), !I)
|
|
4631
4631
|
return ft ? null : Kt ? R : "";
|
|
4632
4632
|
}
|
|
4633
|
-
I &&
|
|
4633
|
+
I && st && Le(I.firstChild);
|
|
4634
4634
|
const le = ir(Pt ? B : I);
|
|
4635
4635
|
for (; re = le.nextNode(); )
|
|
4636
4636
|
lr(re), dr(re), re.content instanceof s && Na(re.content);
|
|
@@ -4651,9 +4651,9 @@ function ki() {
|
|
|
4651
4651
|
}), x && Kt ? x.createHTML(we) : we;
|
|
4652
4652
|
}, t.setConfig = function() {
|
|
4653
4653
|
let B = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
4654
|
-
Vn(B),
|
|
4654
|
+
Vn(B), rt = !0;
|
|
4655
4655
|
}, t.clearConfig = function() {
|
|
4656
|
-
ht = null,
|
|
4656
|
+
ht = null, rt = !1;
|
|
4657
4657
|
}, t.isValidAttribute = function(B, v, I) {
|
|
4658
4658
|
ht || Vn({});
|
|
4659
4659
|
const z = ue(B), re = ue(v);
|
|
@@ -4674,8 +4674,17 @@ function ki() {
|
|
|
4674
4674
|
}
|
|
4675
4675
|
var Lf = ki();
|
|
4676
4676
|
const Df = ({ editor: e, error: t }) => {
|
|
4677
|
-
|
|
4678
|
-
|
|
4677
|
+
const [, n] = fe(0);
|
|
4678
|
+
if (Ze(() => {
|
|
4679
|
+
if (!e) return;
|
|
4680
|
+
const s = () => {
|
|
4681
|
+
n((i) => i + 1);
|
|
4682
|
+
};
|
|
4683
|
+
return e.on("transaction", s), () => {
|
|
4684
|
+
e.off("transaction", s);
|
|
4685
|
+
};
|
|
4686
|
+
}, [e]), !e) return null;
|
|
4687
|
+
const o = (s) => `p-2 rounded-sm transition-colors duration-200 focus-visible:ring-1 focus-visible:ring-ring/40 focus-visible:outline-none ${s ? "bg-primary text-primary-foreground" : "hover:bg-accent hover:text-accent-foreground text-muted-foreground"}`.trim(), r = () => /* @__PURE__ */ c("div", { className: "w-px h-4 bg-border mx-1 self-center", "aria-hidden": "true" });
|
|
4679
4688
|
return /* @__PURE__ */ M(
|
|
4680
4689
|
"div",
|
|
4681
4690
|
{
|
|
@@ -4689,7 +4698,7 @@ const Df = ({ editor: e, error: t }) => {
|
|
|
4689
4698
|
{
|
|
4690
4699
|
type: "button",
|
|
4691
4700
|
onClick: () => e.chain().focus().toggleBold().run(),
|
|
4692
|
-
className:
|
|
4701
|
+
className: o(e.isActive("bold")),
|
|
4693
4702
|
"aria-label": "Bold",
|
|
4694
4703
|
"aria-pressed": e.isActive("bold"),
|
|
4695
4704
|
children: /* @__PURE__ */ c(Ga, { size: 14 })
|
|
@@ -4700,7 +4709,7 @@ const Df = ({ editor: e, error: t }) => {
|
|
|
4700
4709
|
{
|
|
4701
4710
|
type: "button",
|
|
4702
4711
|
onClick: () => e.chain().focus().toggleItalic().run(),
|
|
4703
|
-
className:
|
|
4712
|
+
className: o(e.isActive("italic")),
|
|
4704
4713
|
"aria-label": "Italic",
|
|
4705
4714
|
"aria-pressed": e.isActive("italic"),
|
|
4706
4715
|
children: /* @__PURE__ */ c(bl, { size: 14 })
|
|
@@ -4711,7 +4720,7 @@ const Df = ({ editor: e, error: t }) => {
|
|
|
4711
4720
|
{
|
|
4712
4721
|
type: "button",
|
|
4713
4722
|
onClick: () => e.chain().focus().toggleUnderline().run(),
|
|
4714
|
-
className:
|
|
4723
|
+
className: o(e.isActive("underline")),
|
|
4715
4724
|
"aria-label": "Underline",
|
|
4716
4725
|
"aria-pressed": e.isActive("underline"),
|
|
4717
4726
|
children: /* @__PURE__ */ c(Il, { size: 14 })
|
|
@@ -4722,38 +4731,38 @@ const Df = ({ editor: e, error: t }) => {
|
|
|
4722
4731
|
{
|
|
4723
4732
|
type: "button",
|
|
4724
4733
|
onClick: () => e.chain().focus().toggleStrike().run(),
|
|
4725
|
-
className:
|
|
4734
|
+
className: o(e.isActive("strike")),
|
|
4726
4735
|
"aria-label": "Strikethrough",
|
|
4727
4736
|
"aria-pressed": e.isActive("strike"),
|
|
4728
4737
|
children: /* @__PURE__ */ c(_l, { size: 14 })
|
|
4729
4738
|
}
|
|
4730
4739
|
)
|
|
4731
4740
|
] }),
|
|
4732
|
-
/* @__PURE__ */ c(
|
|
4733
|
-
/* @__PURE__ */ c("div", { className: "flex gap-1", children: [1, 2, 3].map((
|
|
4741
|
+
/* @__PURE__ */ c(r, {}),
|
|
4742
|
+
/* @__PURE__ */ c("div", { className: "flex gap-1", children: [1, 2, 3].map((s) => /* @__PURE__ */ M(
|
|
4734
4743
|
"button",
|
|
4735
4744
|
{
|
|
4736
4745
|
type: "button",
|
|
4737
|
-
onClick: () => e.chain().focus().toggleHeading({ level:
|
|
4738
|
-
className:
|
|
4739
|
-
"aria-label": `Heading level ${
|
|
4740
|
-
"aria-pressed": e.isActive("heading", { level:
|
|
4746
|
+
onClick: () => e.chain().focus().toggleHeading({ level: s }).run(),
|
|
4747
|
+
className: o(e.isActive("heading", { level: s })),
|
|
4748
|
+
"aria-label": `Heading level ${s}`,
|
|
4749
|
+
"aria-pressed": e.isActive("heading", { level: s }),
|
|
4741
4750
|
children: [
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4751
|
+
s === 1 && /* @__PURE__ */ c(cl, { size: 16 }),
|
|
4752
|
+
s === 2 && /* @__PURE__ */ c(dl, { size: 16 }),
|
|
4753
|
+
s === 3 && /* @__PURE__ */ c(pl, { size: 14 })
|
|
4745
4754
|
]
|
|
4746
4755
|
},
|
|
4747
|
-
|
|
4756
|
+
s
|
|
4748
4757
|
)) }),
|
|
4749
|
-
/* @__PURE__ */ c(
|
|
4758
|
+
/* @__PURE__ */ c(r, {}),
|
|
4750
4759
|
/* @__PURE__ */ M("div", { className: "flex gap-1", children: [
|
|
4751
4760
|
/* @__PURE__ */ c(
|
|
4752
4761
|
"button",
|
|
4753
4762
|
{
|
|
4754
4763
|
type: "button",
|
|
4755
4764
|
onClick: () => e.chain().focus().toggleBulletList().run(),
|
|
4756
|
-
className:
|
|
4765
|
+
className: o(e.isActive("bulletList")),
|
|
4757
4766
|
"aria-label": "Bullet list",
|
|
4758
4767
|
"aria-pressed": e.isActive("bulletList"),
|
|
4759
4768
|
children: /* @__PURE__ */ c(xl, { size: 14 })
|
|
@@ -4764,7 +4773,7 @@ const Df = ({ editor: e, error: t }) => {
|
|
|
4764
4773
|
{
|
|
4765
4774
|
type: "button",
|
|
4766
4775
|
onClick: () => e.chain().focus().toggleOrderedList().run(),
|
|
4767
|
-
className:
|
|
4776
|
+
className: o(e.isActive("orderedList")),
|
|
4768
4777
|
"aria-label": "Numbered list",
|
|
4769
4778
|
"aria-pressed": e.isActive("orderedList"),
|
|
4770
4779
|
children: /* @__PURE__ */ c(yl, { size: 14 })
|
|
@@ -4775,33 +4784,33 @@ const Df = ({ editor: e, error: t }) => {
|
|
|
4775
4784
|
{
|
|
4776
4785
|
type: "button",
|
|
4777
4786
|
onClick: () => e.chain().focus().toggleBlockquote().run(),
|
|
4778
|
-
className:
|
|
4787
|
+
className: o(e.isActive("blockquote")),
|
|
4779
4788
|
"aria-label": "Quote",
|
|
4780
4789
|
"aria-pressed": e.isActive("blockquote"),
|
|
4781
4790
|
children: /* @__PURE__ */ c(Al, { size: 14 })
|
|
4782
4791
|
}
|
|
4783
4792
|
)
|
|
4784
4793
|
] }),
|
|
4785
|
-
/* @__PURE__ */ c(
|
|
4794
|
+
/* @__PURE__ */ c(r, {}),
|
|
4786
4795
|
/* @__PURE__ */ c("div", { className: "flex gap-1", children: /* @__PURE__ */ c(
|
|
4787
4796
|
"button",
|
|
4788
4797
|
{
|
|
4789
4798
|
type: "button",
|
|
4790
4799
|
onClick: () => e.chain().focus().toggleCodeBlock().run(),
|
|
4791
|
-
className:
|
|
4800
|
+
className: o(e.isActive("codeBlock")),
|
|
4792
4801
|
"aria-label": "Code block",
|
|
4793
4802
|
"aria-pressed": e.isActive("codeBlock"),
|
|
4794
4803
|
children: /* @__PURE__ */ c(al, { size: 14 })
|
|
4795
4804
|
}
|
|
4796
4805
|
) }),
|
|
4797
4806
|
/* @__PURE__ */ M("div", { className: "flex gap-1 ml-auto", children: [
|
|
4798
|
-
/* @__PURE__ */ c(
|
|
4807
|
+
/* @__PURE__ */ c(r, {}),
|
|
4799
4808
|
/* @__PURE__ */ c(
|
|
4800
4809
|
"button",
|
|
4801
4810
|
{
|
|
4802
4811
|
type: "button",
|
|
4803
4812
|
onClick: () => e.chain().focus().undo().run(),
|
|
4804
|
-
className:
|
|
4813
|
+
className: o(!1),
|
|
4805
4814
|
"aria-label": "Undo",
|
|
4806
4815
|
children: /* @__PURE__ */ c(Ll, { size: 14 })
|
|
4807
4816
|
}
|
|
@@ -4811,7 +4820,7 @@ const Df = ({ editor: e, error: t }) => {
|
|
|
4811
4820
|
{
|
|
4812
4821
|
type: "button",
|
|
4813
4822
|
onClick: () => e.chain().focus().redo().run(),
|
|
4814
|
-
className:
|
|
4823
|
+
className: o(!1),
|
|
4815
4824
|
"aria-label": "Redo",
|
|
4816
4825
|
children: /* @__PURE__ */ c(kl, { size: 14 })
|
|
4817
4826
|
}
|
|
@@ -4863,9 +4872,9 @@ function Ff({
|
|
|
4863
4872
|
}
|
|
4864
4873
|
}
|
|
4865
4874
|
});
|
|
4866
|
-
return
|
|
4875
|
+
return Ze(() => {
|
|
4867
4876
|
u && t[e.name] !== u.getHTML() && u.commands.setContent(t[e.name] || "");
|
|
4868
|
-
}, [t[e.name], u]),
|
|
4877
|
+
}, [t[e.name], u]), Ze(() => {
|
|
4869
4878
|
u && u.setEditable(!i);
|
|
4870
4879
|
}, [i, u]), /* @__PURE__ */ M(
|
|
4871
4880
|
"div",
|
|
@@ -5073,7 +5082,7 @@ var Hf = [
|
|
|
5073
5082
|
return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
|
|
5074
5083
|
}, {}), In = "Popover", [Ti] = dt(In, [
|
|
5075
5084
|
kn
|
|
5076
|
-
]), Vt = kn(), [Wf,
|
|
5085
|
+
]), Vt = kn(), [Wf, ot] = Ti(In), Pi = (e) => {
|
|
5077
5086
|
const {
|
|
5078
5087
|
__scopePopover: t,
|
|
5079
5088
|
children: n,
|
|
@@ -5107,14 +5116,14 @@ var Hf = [
|
|
|
5107
5116
|
Pi.displayName = In;
|
|
5108
5117
|
var _i = "PopoverAnchor", jf = d.forwardRef(
|
|
5109
5118
|
(e, t) => {
|
|
5110
|
-
const { __scopePopover: n, ...o } = e, r =
|
|
5119
|
+
const { __scopePopover: n, ...o } = e, r = ot(_i, n), s = Vt(n), { onCustomAnchorAdd: i, onCustomAnchorRemove: a } = r;
|
|
5111
5120
|
return d.useEffect(() => (i(), () => a()), [i, a]), /* @__PURE__ */ c(jo, { ...s, ...o, ref: t });
|
|
5112
5121
|
}
|
|
5113
5122
|
);
|
|
5114
5123
|
jf.displayName = _i;
|
|
5115
5124
|
var Oi = "PopoverTrigger", Ii = d.forwardRef(
|
|
5116
5125
|
(e, t) => {
|
|
5117
|
-
const { __scopePopover: n, ...o } = e, r =
|
|
5126
|
+
const { __scopePopover: n, ...o } = e, r = ot(Oi, n), s = Vt(n), i = se(t, r.triggerRef), a = /* @__PURE__ */ c(
|
|
5118
5127
|
Ri.button,
|
|
5119
5128
|
{
|
|
5120
5129
|
type: "button",
|
|
@@ -5134,20 +5143,20 @@ Ii.displayName = Oi;
|
|
|
5134
5143
|
var Ko = "PopoverPortal", [Vf, Gf] = Ti(Ko, {
|
|
5135
5144
|
forceMount: void 0
|
|
5136
5145
|
}), Mi = (e) => {
|
|
5137
|
-
const { __scopePopover: t, forceMount: n, children: o, container: r } = e, s =
|
|
5146
|
+
const { __scopePopover: t, forceMount: n, children: o, container: r } = e, s = ot(Ko, t);
|
|
5138
5147
|
return /* @__PURE__ */ c(Vf, { scope: t, forceMount: n, children: /* @__PURE__ */ c(On, { present: n || s.open, children: /* @__PURE__ */ c(Vo, { asChild: !0, container: r, children: o }) }) });
|
|
5139
5148
|
};
|
|
5140
5149
|
Mi.displayName = Ko;
|
|
5141
5150
|
var Et = "PopoverContent", Li = d.forwardRef(
|
|
5142
5151
|
(e, t) => {
|
|
5143
|
-
const n = Gf(Et, e.__scopePopover), { forceMount: o = n.forceMount, ...r } = e, s =
|
|
5152
|
+
const n = Gf(Et, e.__scopePopover), { forceMount: o = n.forceMount, ...r } = e, s = ot(Et, e.__scopePopover);
|
|
5144
5153
|
return /* @__PURE__ */ c(On, { present: o || s.open, children: s.modal ? /* @__PURE__ */ c(Kf, { ...r, ref: t }) : /* @__PURE__ */ c(qf, { ...r, ref: t }) });
|
|
5145
5154
|
}
|
|
5146
5155
|
);
|
|
5147
5156
|
Li.displayName = Et;
|
|
5148
5157
|
var Yf = /* @__PURE__ */ xe("PopoverContent.RemoveScroll"), Kf = d.forwardRef(
|
|
5149
5158
|
(e, t) => {
|
|
5150
|
-
const n =
|
|
5159
|
+
const n = ot(Et, e.__scopePopover), o = d.useRef(null), r = se(t, o), s = d.useRef(!1);
|
|
5151
5160
|
return d.useEffect(() => {
|
|
5152
5161
|
const i = o.current;
|
|
5153
5162
|
if (i) return Hs(i);
|
|
@@ -5179,7 +5188,7 @@ var Yf = /* @__PURE__ */ xe("PopoverContent.RemoveScroll"), Kf = d.forwardRef(
|
|
|
5179
5188
|
}
|
|
5180
5189
|
), qf = d.forwardRef(
|
|
5181
5190
|
(e, t) => {
|
|
5182
|
-
const n =
|
|
5191
|
+
const n = ot(Et, e.__scopePopover), o = d.useRef(!1), r = d.useRef(!1);
|
|
5183
5192
|
return /* @__PURE__ */ c(
|
|
5184
5193
|
Di,
|
|
5185
5194
|
{
|
|
@@ -5211,7 +5220,7 @@ var Yf = /* @__PURE__ */ xe("PopoverContent.RemoveScroll"), Kf = d.forwardRef(
|
|
|
5211
5220
|
onFocusOutside: u,
|
|
5212
5221
|
onInteractOutside: f,
|
|
5213
5222
|
...p
|
|
5214
|
-
} = e, g =
|
|
5223
|
+
} = e, g = ot(Et, n), m = Vt(n);
|
|
5215
5224
|
return ds(), /* @__PURE__ */ c(
|
|
5216
5225
|
Lo,
|
|
5217
5226
|
{
|
|
@@ -5256,7 +5265,7 @@ var Yf = /* @__PURE__ */ xe("PopoverContent.RemoveScroll"), Kf = d.forwardRef(
|
|
|
5256
5265
|
}
|
|
5257
5266
|
), Fi = "PopoverClose", Xf = d.forwardRef(
|
|
5258
5267
|
(e, t) => {
|
|
5259
|
-
const { __scopePopover: n, ...o } = e, r =
|
|
5268
|
+
const { __scopePopover: n, ...o } = e, r = ot(Fi, n);
|
|
5260
5269
|
return /* @__PURE__ */ c(
|
|
5261
5270
|
Ri.button,
|
|
5262
5271
|
{
|
|
@@ -5572,7 +5581,7 @@ const rp = (e, t) => {
|
|
|
5572
5581
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
5573
5582
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
5574
5583
|
Rp.test(e) && !Tp.test(e)
|
|
5575
|
-
), Gi = () => !1, Mp = (e) => Pp.test(e), Lp = (e) => _p.test(e), Dp = (e) => !F(e) && !$(e), Fp = (e) => Rt(e, qi, Gi), F = (e) => ji.test(e),
|
|
5584
|
+
), Gi = () => !1, Mp = (e) => Pp.test(e), Lp = (e) => _p.test(e), Dp = (e) => !F(e) && !$(e), Fp = (e) => Rt(e, qi, Gi), F = (e) => ji.test(e), at = (e) => Rt(e, Xi, Ip), fo = (e) => Rt(e, Hp, Y), Jr = (e) => Rt(e, Yi, Gi), $p = (e) => Rt(e, Ki, Lp), ln = (e) => Rt(e, Zi, Mp), $ = (e) => Vi.test(e), Ft = (e) => Tt(e, Xi), zp = (e) => Tt(e, Wp), es = (e) => Tt(e, Yi), Bp = (e) => Tt(e, qi), Up = (e) => Tt(e, Ki), cn = (e) => Tt(e, Zi, !0), Rt = (e, t, n) => {
|
|
5576
5585
|
const o = ji.exec(e);
|
|
5577
5586
|
return o ? o[1] ? t(o[1]) : n(o[2]) : !1;
|
|
5578
5587
|
}, Tt = (e, t, n = !1) => {
|
|
@@ -5605,7 +5614,7 @@ const rp = (e, t) => {
|
|
|
5605
5614
|
repeat: ["", "x", "y", "space", "round"]
|
|
5606
5615
|
}], j = () => ["auto", "cover", "contain", Bp, Fp, {
|
|
5607
5616
|
size: [$, F]
|
|
5608
|
-
}], Ae = () => [uo, Ft,
|
|
5617
|
+
}], Ae = () => [uo, Ft, at], G = () => [
|
|
5609
5618
|
// Deprecated since Tailwind CSS v4.0.0
|
|
5610
5619
|
"",
|
|
5611
5620
|
"none",
|
|
@@ -5613,7 +5622,7 @@ const rp = (e, t) => {
|
|
|
5613
5622
|
u,
|
|
5614
5623
|
$,
|
|
5615
5624
|
F
|
|
5616
|
-
], oe = () => ["", Y, Ft,
|
|
5625
|
+
], oe = () => ["", Y, Ft, at], Q = () => ["solid", "dashed", "dotted", "double"], me = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], D = () => [Y, uo, es, Jr], J = () => [
|
|
5617
5626
|
// Deprecated since Tailwind CSS v4.0.0
|
|
5618
5627
|
"",
|
|
5619
5628
|
"none",
|
|
@@ -6313,7 +6322,7 @@ const rp = (e, t) => {
|
|
|
6313
6322
|
* @see https://tailwindcss.com/docs/font-size
|
|
6314
6323
|
*/
|
|
6315
6324
|
"font-size": [{
|
|
6316
|
-
text: ["base", n, Ft,
|
|
6325
|
+
text: ["base", n, Ft, at]
|
|
6317
6326
|
}],
|
|
6318
6327
|
/**
|
|
6319
6328
|
* Font Smoothing
|
|
@@ -6461,7 +6470,7 @@ const rp = (e, t) => {
|
|
|
6461
6470
|
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
6462
6471
|
*/
|
|
6463
6472
|
"text-decoration-thickness": [{
|
|
6464
|
-
decoration: [Y, "from-font", "auto", $,
|
|
6473
|
+
decoration: [Y, "from-font", "auto", $, at]
|
|
6465
6474
|
}],
|
|
6466
6475
|
/**
|
|
6467
6476
|
* Text Decoration Color
|
|
@@ -6948,7 +6957,7 @@ const rp = (e, t) => {
|
|
|
6948
6957
|
* @see https://tailwindcss.com/docs/outline-width
|
|
6949
6958
|
*/
|
|
6950
6959
|
"outline-w": [{
|
|
6951
|
-
outline: ["", Y, Ft,
|
|
6960
|
+
outline: ["", Y, Ft, at]
|
|
6952
6961
|
}],
|
|
6953
6962
|
/**
|
|
6954
6963
|
* Outline Color
|
|
@@ -7023,7 +7032,7 @@ const rp = (e, t) => {
|
|
|
7023
7032
|
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
7024
7033
|
*/
|
|
7025
7034
|
"ring-offset-w": [{
|
|
7026
|
-
"ring-offset": [Y,
|
|
7035
|
+
"ring-offset": [Y, at]
|
|
7027
7036
|
}],
|
|
7028
7037
|
/**
|
|
7029
7038
|
* Ring Offset Color
|
|
@@ -7973,7 +7982,7 @@ const rp = (e, t) => {
|
|
|
7973
7982
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
7974
7983
|
*/
|
|
7975
7984
|
"stroke-w": [{
|
|
7976
|
-
stroke: [Y, Ft,
|
|
7985
|
+
stroke: [Y, Ft, at, fo]
|
|
7977
7986
|
}],
|
|
7978
7987
|
/**
|
|
7979
7988
|
* Stroke
|
|
@@ -8378,7 +8387,7 @@ function Yp({
|
|
|
8378
8387
|
const g = a.current;
|
|
8379
8388
|
g && (g.style.height = "auto", g.style.height = `${g.scrollHeight + 2}px`);
|
|
8380
8389
|
};
|
|
8381
|
-
|
|
8390
|
+
Ze(() => {
|
|
8382
8391
|
f();
|
|
8383
8392
|
}, [l]);
|
|
8384
8393
|
const p = (g) => {
|
|
@@ -8767,7 +8776,7 @@ var bm = d.forwardRef((e, t) => {
|
|
|
8767
8776
|
defaultProp: a ?? null,
|
|
8768
8777
|
onChange: l,
|
|
8769
8778
|
caller: Gt
|
|
8770
|
-
}), [C, E] = d.useState(!1), A =
|
|
8779
|
+
}), [C, E] = d.useState(!1), A = Qe(u), x = ta(n), R = d.useRef(!1), [L, O] = d.useState(0);
|
|
8771
8780
|
return d.useEffect(() => {
|
|
8772
8781
|
const P = g.current;
|
|
8773
8782
|
if (P)
|
|
@@ -9747,7 +9756,7 @@ const sh = ({
|
|
|
9747
9756
|
} finally {
|
|
9748
9757
|
}
|
|
9749
9758
|
};
|
|
9750
|
-
|
|
9759
|
+
Ze(() => {
|
|
9751
9760
|
if (o?.fields && o.fields.length > 0) {
|
|
9752
9761
|
if (!o.fields.some((k) => k.value)) return;
|
|
9753
9762
|
o.fields.forEach((k) => {
|
|
@@ -9852,7 +9861,7 @@ const sh = ({
|
|
|
9852
9861
|
} else
|
|
9853
9862
|
mn.error("Please correct the errors in the form");
|
|
9854
9863
|
};
|
|
9855
|
-
|
|
9864
|
+
Ze(() => {
|
|
9856
9865
|
l(f);
|
|
9857
9866
|
}, [f, l]);
|
|
9858
9867
|
const W = {
|