@snowcone-app/canvas 0.37.1 → 0.38.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/ERROR_CONTRACT.md +39 -8
- package/STYLING_CONTRACT.md +24 -2
- package/dist/{CanvasRenderer-CTN4j-uO.js → CanvasRenderer-D-E5WWLm.js} +4 -4
- package/dist/{CanvasRenderer-CTN4j-uO.js.map → CanvasRenderer-D-E5WWLm.js.map} +1 -1
- package/dist/{CanvasStateV1-DLE5d1-d.js → CanvasStateV1-C9LQt2J0.js} +7 -7
- package/dist/{CanvasStateV1-DLE5d1-d.js.map → CanvasStateV1-C9LQt2J0.js.map} +1 -1
- package/dist/{ContextualToolbars-CG5Gmv_i.js → ContextualToolbars-C62As-xY.js} +202 -202
- package/dist/{ContextualToolbars-CG5Gmv_i.js.map → ContextualToolbars-C62As-xY.js.map} +1 -1
- package/dist/EditorCanvasImpl-BnxEbr2p.js +144 -0
- package/dist/EditorCanvasImpl-BnxEbr2p.js.map +1 -0
- package/dist/{ExportManager-CDX5_up8.js → ExportManager-BbBfO22S.js} +45 -45
- package/dist/{ExportManager-CDX5_up8.js.map → ExportManager-BbBfO22S.js.map} +1 -1
- package/dist/{FontAnalyzer-CEYA_6fY.js → FontAnalyzer-DWHS41ba.js} +128 -128
- package/dist/FontAnalyzer-DWHS41ba.js.map +1 -0
- package/dist/{ImagePanel-DLxIDKV-.js → ImagePanel-BaX0UE-L.js} +57 -57
- package/dist/{ImagePanel-DLxIDKV-.js.map → ImagePanel-BaX0UE-L.js.map} +1 -1
- package/dist/SnowconeCanvas-CWSPyqqj.js +1112 -0
- package/dist/SnowconeCanvas-CWSPyqqj.js.map +1 -0
- package/dist/advanced.mjs +138 -138
- package/dist/api/placement.d.ts +3 -0
- package/dist/components/editor/EditorPlacements.d.ts +19 -6
- package/dist/components/editor/RootInternals.d.ts +7 -0
- package/dist/components/editor/designStateStore.d.ts +18 -0
- package/dist/components/editor/index.d.ts +3 -1
- package/dist/components/editor/placementLinks.d.ts +52 -0
- package/dist/components/editor/usePlacements.d.ts +28 -4
- package/dist/components/embed-realtime/context.d.ts +20 -4
- package/dist/components/embed-realtime/usePieceGuideBundle.d.ts +1 -0
- package/dist/components/embed-realtime/validateEmbed.d.ts +6 -3
- package/dist/{custom-icons-D51KIAfz.js → custom-icons-o1U13Vcg.js} +14 -14
- package/dist/{custom-icons-D51KIAfz.js.map → custom-icons-o1U13Vcg.js.map} +1 -1
- package/dist/{design-builder-CqgTpp9B.js → design-builder-CoCtjIwj.js} +86 -86
- package/dist/{design-builder-CqgTpp9B.js.map → design-builder-CoCtjIwj.js.map} +1 -1
- package/dist/{embed-CLz3CTcX.js → embed-SOFUZlGB.js} +843 -729
- package/dist/embed-SOFUZlGB.js.map +1 -0
- package/dist/embed.mjs +28 -28
- package/dist/errors/editorError.d.ts +7 -2
- package/dist/{guards-DldCuuJq.js → guards-DMmhw_Ow.js} +4 -4
- package/dist/{guards-DldCuuJq.js.map → guards-DMmhw_Ow.js.map} +1 -1
- package/dist/index.mjs +21 -21
- package/dist/internals.mjs +108 -108
- package/dist/internals.mjs.map +1 -1
- package/dist/placement-Br5jI_-u.js +90 -0
- package/dist/placement-Br5jI_-u.js.map +1 -0
- package/dist/placement.d.ts +2 -0
- package/dist/placement.mjs +5 -0
- package/dist/placement.mjs.map +1 -0
- package/dist/template-fields-CBLHgW7G.js +556 -0
- package/dist/template-fields-CBLHgW7G.js.map +1 -0
- package/dist/testing.mjs +24 -24
- package/dist/{useCommands-CQi4Pyd2.js → useCommands-x8J7_Mzy.js} +262 -262
- package/dist/{useCommands-CQi4Pyd2.js.map → useCommands-x8J7_Mzy.js.map} +1 -1
- package/dist/usePieceGuideBundle-C7r06a_x.js +65 -0
- package/dist/usePieceGuideBundle-C7r06a_x.js.map +1 -0
- package/dist/{validation-THw5W6N_.js → validation-BG-V98h0.js} +846 -846
- package/dist/validation-BG-V98h0.js.map +1 -0
- package/example/package.json +1 -1
- package/package.json +7 -2
- package/dist/EditorCanvasImpl-BRdFWZA5.js +0 -81
- package/dist/EditorCanvasImpl-BRdFWZA5.js.map +0 -1
- package/dist/FontAnalyzer-CEYA_6fY.js.map +0 -1
- package/dist/SnowconeCanvas-BaFR8QXs.js +0 -1196
- package/dist/SnowconeCanvas-BaFR8QXs.js.map +0 -1
- package/dist/embed-CLz3CTcX.js.map +0 -1
- package/dist/template-fields-D8uOutD4.js +0 -505
- package/dist/template-fields-D8uOutD4.js.map +0 -1
- package/dist/usePieceGuideBundle-BUQKb0Ja.js +0 -61
- package/dist/usePieceGuideBundle-BUQKb0Ja.js.map +0 -1
- package/dist/validation-THw5W6N_.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as f, jsxs as j, Fragment as an } from "react/jsx-runtime";
|
|
2
2
|
import * as F from "react";
|
|
3
|
-
import ne, { useRef as V, useState as B, useCallback as N, useMemo as
|
|
4
|
-
import {
|
|
5
|
-
import { G as Ie, c as Qe,
|
|
6
|
-
import {
|
|
3
|
+
import ne, { useRef as V, useState as B, useCallback as N, useMemo as X, useEffect as q, forwardRef as $n, createElement as En, useLayoutEffect as Hn, memo as ei, useReducer as ti, useContext as Be, createContext as Je, cloneElement as ni, useId as Pr, useSyncExternalStore as $r } from "react";
|
|
4
|
+
import { b as Yt, o as ri, n as oi, q as Hr, k as ii, i as si } from "./design-builder-CoCtjIwj.js";
|
|
5
|
+
import { G as Ie, c as Qe, t as rt, X as ai, aU as ln, I as li, P as ci, S as di, T as ui, aV as fi, x as hi, aW as gi, aX as pi, U as sr } from "./FontAnalyzer-DWHS41ba.js";
|
|
6
|
+
import { Q as mi, I as cn, a as dn } from "./ExportManager-BbBfO22S.js";
|
|
7
7
|
import { createPortal as Bn, unstable_batchedUpdates as Ft } from "react-dom";
|
|
8
8
|
import { clsx as Br } from "clsx";
|
|
9
9
|
import { extendTailwindMerge as Vr } from "tailwind-merge";
|
|
@@ -619,25 +619,25 @@ function xi(e = {}) {
|
|
|
619
619
|
executeAddElement: p,
|
|
620
620
|
executeRemoveElement: k,
|
|
621
621
|
executeReorderElement: y
|
|
622
|
-
} =
|
|
622
|
+
} = Yt(), g = V(/* @__PURE__ */ new Map()), [m, S] = B(0), M = c.getActiveArtboardId(), L = t !== void 0 ? t : M, I = L ? (Oe = c.getArtboard) == null ? void 0 : Oe.call(c, L) : null, b = o ?? (I == null ? void 0 : I.backgroundColor) ?? "transparent", E = N(async (x) => {
|
|
623
623
|
const C = s.find((z) => z.id === x);
|
|
624
624
|
if (!C) return;
|
|
625
625
|
const R = await ar(C, r, b);
|
|
626
626
|
g.current.set(x, R), S((z) => z + 1);
|
|
627
|
-
}, [s, r, b]), v =
|
|
627
|
+
}, [s, r, b]), v = X(() => {
|
|
628
628
|
let x = s;
|
|
629
629
|
if (L) {
|
|
630
630
|
const C = c.getElementsOnArtboard(L);
|
|
631
631
|
x = x.filter((R) => C.includes(R.id));
|
|
632
632
|
}
|
|
633
633
|
return n || (x = x.filter((C) => C.visible !== !1)), x;
|
|
634
|
-
}, [s, L, n, c]), D =
|
|
634
|
+
}, [s, L, n, c]), D = X(() => _r(
|
|
635
635
|
v,
|
|
636
636
|
a,
|
|
637
637
|
l,
|
|
638
638
|
g.current,
|
|
639
639
|
E
|
|
640
|
-
), [v, a, l, E, m]), w =
|
|
640
|
+
), [v, a, l, E, m]), w = X(() => Wr(D), [D]), A = X(() => w.filter((x) => x.isSelected), [w]), T = N((x, C = !1) => {
|
|
641
641
|
C ? l.includes(x) ? h(l.filter((R) => R !== x)) : h([...l, x]) : u(x);
|
|
642
642
|
}, [l, h, u]), O = N((x) => {
|
|
643
643
|
h(x);
|
|
@@ -653,12 +653,12 @@ function xi(e = {}) {
|
|
|
653
653
|
if (!C) return;
|
|
654
654
|
const R = C.clone();
|
|
655
655
|
R.locked = !(C.locked ?? !1), d(R);
|
|
656
|
-
}, [s, d]),
|
|
656
|
+
}, [s, d]), J = N((x, C) => {
|
|
657
657
|
const R = s.find((Z) => Z.id === x);
|
|
658
658
|
if (!R) return;
|
|
659
659
|
const z = R.clone();
|
|
660
660
|
z.name = C, d(z);
|
|
661
|
-
}, [s, d]),
|
|
661
|
+
}, [s, d]), Y = N((x) => {
|
|
662
662
|
const C = s.find((R) => R.id === x);
|
|
663
663
|
if (!C) {
|
|
664
664
|
re.warn(`Element ${x} not found for deletion`);
|
|
@@ -797,7 +797,7 @@ function xi(e = {}) {
|
|
|
797
797
|
};
|
|
798
798
|
await C(v), S((R) => R + 1);
|
|
799
799
|
}, [r, b, v]);
|
|
800
|
-
|
|
800
|
+
q(() => {
|
|
801
801
|
if (!i) return;
|
|
802
802
|
const x = setTimeout(() => {
|
|
803
803
|
De();
|
|
@@ -896,8 +896,8 @@ function xi(e = {}) {
|
|
|
896
896
|
clearSelection: W,
|
|
897
897
|
toggleVisibility: ae,
|
|
898
898
|
toggleLock: _,
|
|
899
|
-
renameLayer:
|
|
900
|
-
deleteLayer:
|
|
899
|
+
renameLayer: J,
|
|
900
|
+
deleteLayer: Y,
|
|
901
901
|
duplicateLayer: te,
|
|
902
902
|
reorderLayers: pe,
|
|
903
903
|
reorderById: se,
|
|
@@ -933,7 +933,7 @@ function ki(e, t) {
|
|
|
933
933
|
}
|
|
934
934
|
return Object.keys(n).concat(Object.keys(r)).forEach(i), o;
|
|
935
935
|
}
|
|
936
|
-
const
|
|
936
|
+
const qr = Object.freeze({
|
|
937
937
|
left: 0,
|
|
938
938
|
top: 0,
|
|
939
939
|
width: 16,
|
|
@@ -943,7 +943,7 @@ const Yr = Object.freeze({
|
|
|
943
943
|
vFlip: !1,
|
|
944
944
|
hFlip: !1
|
|
945
945
|
}), Vn = Object.freeze({
|
|
946
|
-
...
|
|
946
|
+
...qr,
|
|
947
947
|
...Bt
|
|
948
948
|
}), An = Object.freeze({
|
|
949
949
|
...Vn,
|
|
@@ -969,7 +969,7 @@ function Si(e, t, n) {
|
|
|
969
969
|
}
|
|
970
970
|
return s(t), n.forEach(s), lr(e, i);
|
|
971
971
|
}
|
|
972
|
-
function
|
|
972
|
+
function Yr(e, t) {
|
|
973
973
|
const n = [];
|
|
974
974
|
if (typeof e != "object" || typeof e.icons != "object") return n;
|
|
975
975
|
e.not_found instanceof Array && e.not_found.forEach((o) => {
|
|
@@ -986,7 +986,7 @@ const Ei = {
|
|
|
986
986
|
provider: "",
|
|
987
987
|
aliases: {},
|
|
988
988
|
not_found: {},
|
|
989
|
-
...
|
|
989
|
+
...qr
|
|
990
990
|
};
|
|
991
991
|
function fn(e, t) {
|
|
992
992
|
for (const n in t) if (n in e && typeof e[n] != typeof t[n]) return !1;
|
|
@@ -1021,8 +1021,8 @@ function it(e, t) {
|
|
|
1021
1021
|
const n = cr[e] || (cr[e] = /* @__PURE__ */ Object.create(null));
|
|
1022
1022
|
return n[t] || (n[t] = Ai(e, t));
|
|
1023
1023
|
}
|
|
1024
|
-
function
|
|
1025
|
-
return Kr(t) ?
|
|
1024
|
+
function Xr(e, t) {
|
|
1025
|
+
return Kr(t) ? Yr(t, (n, r) => {
|
|
1026
1026
|
r ? e.icons[n] = r : e.missing.add(n);
|
|
1027
1027
|
}) : [];
|
|
1028
1028
|
}
|
|
@@ -1034,7 +1034,7 @@ function Mi(e, t, n) {
|
|
|
1034
1034
|
}
|
|
1035
1035
|
return !1;
|
|
1036
1036
|
}
|
|
1037
|
-
const
|
|
1037
|
+
const Jr = /^[a-z0-9]+(-[a-z0-9]+)*$/, Kt = (e, t, n, r = "") => {
|
|
1038
1038
|
const o = e.split(":");
|
|
1039
1039
|
if (e.slice(0, 1) === "@") {
|
|
1040
1040
|
if (o.length < 2 || o.length > 3) return null;
|
|
@@ -1089,7 +1089,7 @@ function eo(e, t) {
|
|
|
1089
1089
|
if (typeof e != "object") return !1;
|
|
1090
1090
|
if (typeof t != "string" && (t = e.provider || ""), xt && !t && !e.prefix) {
|
|
1091
1091
|
let o = !1;
|
|
1092
|
-
return Kr(e) && (e.prefix = "",
|
|
1092
|
+
return Kr(e) && (e.prefix = "", Yr(e, (i, s) => {
|
|
1093
1093
|
Zr(i, s) && (o = !0);
|
|
1094
1094
|
})), o;
|
|
1095
1095
|
}
|
|
@@ -1099,7 +1099,7 @@ function eo(e, t) {
|
|
|
1099
1099
|
name: "a"
|
|
1100
1100
|
})) return !1;
|
|
1101
1101
|
const r = it(t, n);
|
|
1102
|
-
return !!
|
|
1102
|
+
return !!Xr(r, e);
|
|
1103
1103
|
}
|
|
1104
1104
|
const to = Object.freeze({
|
|
1105
1105
|
width: null,
|
|
@@ -1378,7 +1378,7 @@ function _i(e) {
|
|
|
1378
1378
|
}));
|
|
1379
1379
|
}
|
|
1380
1380
|
let Wi = 0;
|
|
1381
|
-
function
|
|
1381
|
+
function qi(e, t, n) {
|
|
1382
1382
|
const r = Wi++, o = so.bind(null, n, r);
|
|
1383
1383
|
if (!t.pending.length) return o;
|
|
1384
1384
|
const i = {
|
|
@@ -1391,7 +1391,7 @@ function Yi(e, t, n) {
|
|
|
1391
1391
|
(s.loaderCallbacks || (s.loaderCallbacks = [])).push(i);
|
|
1392
1392
|
}), o;
|
|
1393
1393
|
}
|
|
1394
|
-
function
|
|
1394
|
+
function Yi(e) {
|
|
1395
1395
|
const t = {
|
|
1396
1396
|
loaded: [],
|
|
1397
1397
|
missing: [],
|
|
@@ -1424,7 +1424,7 @@ function Ki(e, t = !0, n = !1) {
|
|
|
1424
1424
|
i && r.push(i);
|
|
1425
1425
|
}), r;
|
|
1426
1426
|
}
|
|
1427
|
-
const
|
|
1427
|
+
const Xi = {
|
|
1428
1428
|
resources: [],
|
|
1429
1429
|
index: 0,
|
|
1430
1430
|
timeout: 2e3,
|
|
@@ -1432,7 +1432,7 @@ const Ji = {
|
|
|
1432
1432
|
random: !1,
|
|
1433
1433
|
dataAfterTimeout: !1
|
|
1434
1434
|
};
|
|
1435
|
-
function
|
|
1435
|
+
function Ji(e, t, n, r) {
|
|
1436
1436
|
const o = e.resources.length, i = e.random ? Math.floor(Math.random() * o) : e.index;
|
|
1437
1437
|
let s;
|
|
1438
1438
|
if (e.random) {
|
|
@@ -1532,7 +1532,7 @@ function Xi(e, t, n, r) {
|
|
|
1532
1532
|
}
|
|
1533
1533
|
function ao(e) {
|
|
1534
1534
|
const t = {
|
|
1535
|
-
...
|
|
1535
|
+
...Xi,
|
|
1536
1536
|
...e
|
|
1537
1537
|
};
|
|
1538
1538
|
let n = [];
|
|
@@ -1540,7 +1540,7 @@ function ao(e) {
|
|
|
1540
1540
|
n = n.filter((a) => a().status === "pending");
|
|
1541
1541
|
}
|
|
1542
1542
|
function o(a, l, c) {
|
|
1543
|
-
const u =
|
|
1543
|
+
const u = Ji(t, a, l, (d, h) => {
|
|
1544
1544
|
r(), c && c(d, h);
|
|
1545
1545
|
});
|
|
1546
1546
|
return n.push(u), u;
|
|
@@ -1602,7 +1602,7 @@ function es(e) {
|
|
|
1602
1602
|
function ts(e) {
|
|
1603
1603
|
const t = [], n = [];
|
|
1604
1604
|
return e.forEach((r) => {
|
|
1605
|
-
(r.match(
|
|
1605
|
+
(r.match(Jr) ? t : n).push(r);
|
|
1606
1606
|
}), {
|
|
1607
1607
|
valid: t,
|
|
1608
1608
|
invalid: n
|
|
@@ -1616,7 +1616,7 @@ function gt(e, t, n) {
|
|
|
1616
1616
|
});
|
|
1617
1617
|
}
|
|
1618
1618
|
if (n && typeof n == "object") try {
|
|
1619
|
-
if (!
|
|
1619
|
+
if (!Xr(e, n).length) {
|
|
1620
1620
|
r();
|
|
1621
1621
|
return;
|
|
1622
1622
|
}
|
|
@@ -1659,7 +1659,7 @@ function ns(e, t) {
|
|
|
1659
1659
|
}
|
|
1660
1660
|
const { valid: s, invalid: a } = ts(o);
|
|
1661
1661
|
if (a.length && gt(e, a, null), !s.length) return;
|
|
1662
|
-
const l = r.match(
|
|
1662
|
+
const l = r.match(Jr) ? Ln(n) : null;
|
|
1663
1663
|
if (!l) {
|
|
1664
1664
|
gt(e, s, null);
|
|
1665
1665
|
return;
|
|
@@ -1672,7 +1672,7 @@ function ns(e, t) {
|
|
|
1672
1672
|
}));
|
|
1673
1673
|
}
|
|
1674
1674
|
const lo = (e, t) => {
|
|
1675
|
-
const n = Ki(e, !0, Qr()), r =
|
|
1675
|
+
const n = Ki(e, !0, Qr()), r = Yi(n);
|
|
1676
1676
|
if (!r.pending.length) {
|
|
1677
1677
|
let l = !0;
|
|
1678
1678
|
return t && setTimeout(() => {
|
|
@@ -1695,7 +1695,7 @@ const lo = (e, t) => {
|
|
|
1695
1695
|
}), i.forEach((l) => {
|
|
1696
1696
|
const c = o[l.provider][l.prefix];
|
|
1697
1697
|
c.length && ns(l, c);
|
|
1698
|
-
}), t ?
|
|
1698
|
+
}), t ? qi(t, r, i) : hr;
|
|
1699
1699
|
};
|
|
1700
1700
|
function rs(e, t) {
|
|
1701
1701
|
const n = { ...e };
|
|
@@ -1979,7 +1979,7 @@ function fo(e) {
|
|
|
1979
1979
|
});
|
|
1980
1980
|
} else y && ((p = e.onLoad) === null || p === void 0 || p.call(e, k));
|
|
1981
1981
|
}
|
|
1982
|
-
|
|
1982
|
+
q(() => (n(!0), l), []), q(() => {
|
|
1983
1983
|
t && u();
|
|
1984
1984
|
}, [e.icon, t]);
|
|
1985
1985
|
const { name: d, data: h } = s;
|
|
@@ -2227,13 +2227,13 @@ const vo = F.forwardRef(
|
|
|
2227
2227
|
safeAreaPadding: m = !1,
|
|
2228
2228
|
...S
|
|
2229
2229
|
}, M) => {
|
|
2230
|
-
const { open: L, onOpenChange: I } = Wn(), [b, E] = F.useState(!1), [v, D] = F.useState(0), [w, A] = F.useState(!1), [T, O] = F.useState(!1), [W, ae] = F.useState(!1), [_,
|
|
2230
|
+
const { open: L, onOpenChange: I } = Wn(), [b, E] = F.useState(!1), [v, D] = F.useState(0), [w, A] = F.useState(!1), [T, O] = F.useState(!1), [W, ae] = F.useState(!1), [_, J] = F.useState(!1), Y = F.useRef(null), te = F.useRef(null), pe = F.useRef(0), xe = F.useRef(0), [ie, de] = F.useState(!1), [je, ze] = F.useState(!1), le = F.useRef(!1), De = F.useRef(!0), ee = F.useRef(null), se = 120;
|
|
2231
2231
|
F.useEffect(() => {
|
|
2232
2232
|
if (L) {
|
|
2233
|
-
const K = setTimeout(() =>
|
|
2233
|
+
const K = setTimeout(() => J(!0), se);
|
|
2234
2234
|
return () => clearTimeout(K);
|
|
2235
2235
|
} else
|
|
2236
|
-
|
|
2236
|
+
J(!1);
|
|
2237
2237
|
}, [L]);
|
|
2238
2238
|
const P = F.useCallback(
|
|
2239
2239
|
(K) => {
|
|
@@ -2242,7 +2242,7 @@ const vo = F.forwardRef(
|
|
|
2242
2242
|
},
|
|
2243
2243
|
[]
|
|
2244
2244
|
);
|
|
2245
|
-
F.useImperativeHandle(M, () =>
|
|
2245
|
+
F.useImperativeHandle(M, () => Y.current), F.useEffect(() => {
|
|
2246
2246
|
E(!0), D(document.body.clientHeight);
|
|
2247
2247
|
const K = () => D(document.body.clientHeight);
|
|
2248
2248
|
return window.addEventListener("resize", K), () => {
|
|
@@ -2319,19 +2319,19 @@ const vo = F.forwardRef(
|
|
|
2319
2319
|
}, [L, w, Q]);
|
|
2320
2320
|
const fe = F.useCallback(
|
|
2321
2321
|
(K) => {
|
|
2322
|
-
h || (pe.current = K.touches[0].clientY, xe.current = 0,
|
|
2322
|
+
h || (pe.current = K.touches[0].clientY, xe.current = 0, Y.current && (Y.current.style.transition = "none"));
|
|
2323
2323
|
},
|
|
2324
2324
|
[h]
|
|
2325
2325
|
), Le = F.useCallback(
|
|
2326
2326
|
(K) => {
|
|
2327
2327
|
if (h) return;
|
|
2328
2328
|
const he = K.touches[0].clientY - pe.current;
|
|
2329
|
-
xe.current = Math.max(0, he),
|
|
2329
|
+
xe.current = Math.max(0, he), Y.current && (Y.current.style.transform = `translateY(${xe.current}px)`);
|
|
2330
2330
|
},
|
|
2331
2331
|
[h]
|
|
2332
2332
|
), oe = F.useCallback(() => {
|
|
2333
2333
|
if (h) return;
|
|
2334
|
-
|
|
2334
|
+
Y.current && (Y.current.style.transition = `transform ${p}ms cubic-bezier(0.32, 0.72, 0, 1)`, Y.current.style.transform = ""), xe.current > 100 && Q();
|
|
2335
2335
|
}, [h, Q, p]);
|
|
2336
2336
|
if (!b || !L && !w) return null;
|
|
2337
2337
|
const Se = _ || w, ye = {
|
|
@@ -2400,7 +2400,7 @@ const vo = F.forwardRef(
|
|
|
2400
2400
|
children: /* @__PURE__ */ f(go, { asChild: !0, variant: "default", children: /* @__PURE__ */ j(
|
|
2401
2401
|
"div",
|
|
2402
2402
|
{
|
|
2403
|
-
ref:
|
|
2403
|
+
ref: Y,
|
|
2404
2404
|
className: Re(
|
|
2405
2405
|
"sc:flex sc:flex-col sc:shadow-2xl sc:pointer-events-auto",
|
|
2406
2406
|
// Bottom drawer: rounded top, full width
|
|
@@ -2524,7 +2524,7 @@ const bo = F.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(
|
|
|
2524
2524
|
}
|
|
2525
2525
|
));
|
|
2526
2526
|
bo.displayName = "DrawerDescription";
|
|
2527
|
-
const As = ot.Provider, Ms = ot.Root,
|
|
2527
|
+
const As = ot.Provider, Ms = ot.Root, Xt = ot.Trigger, At = F.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ f(ot.Portal, { children: /* @__PURE__ */ f(
|
|
2528
2528
|
ot.Content,
|
|
2529
2529
|
{
|
|
2530
2530
|
ref: r,
|
|
@@ -2539,8 +2539,8 @@ const As = ot.Provider, Ms = ot.Root, Jt = ot.Trigger, At = F.forwardRef(({ clas
|
|
|
2539
2539
|
}
|
|
2540
2540
|
) }));
|
|
2541
2541
|
At.displayName = ot.Content.displayName;
|
|
2542
|
-
const Ds = ({ children: e, delayDuration: t, delay: n, ...r }) => /* @__PURE__ */ f(As, { children: /* @__PURE__ */ f(Ms, { delayDuration: n ?? t ?? 200, ...r, children: e }) }),
|
|
2543
|
-
Trigger:
|
|
2542
|
+
const Ds = ({ children: e, delayDuration: t, delay: n, ...r }) => /* @__PURE__ */ f(As, { children: /* @__PURE__ */ f(Ms, { delayDuration: n ?? t ?? 200, ...r, children: e }) }), qn = Object.assign(Ds, {
|
|
2543
|
+
Trigger: Xt,
|
|
2544
2544
|
Content: At
|
|
2545
2545
|
}), Ls = Vr({ prefix: "sc" });
|
|
2546
2546
|
function In(...e) {
|
|
@@ -2676,8 +2676,8 @@ const Rn = ne.forwardRef(
|
|
|
2676
2676
|
children: typeof e == "string" ? /* @__PURE__ */ f(wo, { icon: e, size: "toolbar" }) : e
|
|
2677
2677
|
}
|
|
2678
2678
|
);
|
|
2679
|
-
return !r || i ? h : /* @__PURE__ */ j(
|
|
2680
|
-
/* @__PURE__ */ f(
|
|
2679
|
+
return !r || i ? h : /* @__PURE__ */ j(qn, { delay: o, children: [
|
|
2680
|
+
/* @__PURE__ */ f(Xt, { asChild: !0, children: h }),
|
|
2681
2681
|
/* @__PURE__ */ f(At, { children: r })
|
|
2682
2682
|
] });
|
|
2683
2683
|
}
|
|
@@ -2749,7 +2749,7 @@ const G = {
|
|
|
2749
2749
|
arrowDown: "lucide:arrow-down",
|
|
2750
2750
|
// Special purpose
|
|
2751
2751
|
wand: "lucide:wand-2"
|
|
2752
|
-
},
|
|
2752
|
+
}, Xe = ({
|
|
2753
2753
|
icon: e,
|
|
2754
2754
|
label: t,
|
|
2755
2755
|
shortcut: n,
|
|
@@ -2788,7 +2788,7 @@ const G = {
|
|
|
2788
2788
|
refreshArtboards: n,
|
|
2789
2789
|
setSelectedId: r,
|
|
2790
2790
|
setMultiSelection: o
|
|
2791
|
-
} =
|
|
2791
|
+
} = Yt(), i = t.getActiveArtboardId(), s = t.getActiveArtboard(), a = X(() => e.map((g) => {
|
|
2792
2792
|
const S = t.getElementsOnArtboard(g.id).length;
|
|
2793
2793
|
return {
|
|
2794
2794
|
id: g.id,
|
|
@@ -2802,7 +2802,7 @@ const G = {
|
|
|
2802
2802
|
isActive: g.id === i,
|
|
2803
2803
|
elementCount: S
|
|
2804
2804
|
};
|
|
2805
|
-
}), [e, t, i]), l =
|
|
2805
|
+
}), [e, t, i]), l = X(() => {
|
|
2806
2806
|
if (!s) return null;
|
|
2807
2807
|
const m = t.getElementsOnArtboard(s.id).length;
|
|
2808
2808
|
return {
|
|
@@ -2873,18 +2873,18 @@ const G = {
|
|
|
2873
2873
|
reorderArtboards: y,
|
|
2874
2874
|
count: e.length
|
|
2875
2875
|
};
|
|
2876
|
-
},
|
|
2876
|
+
}, Jt = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
2877
2877
|
function at(e) {
|
|
2878
2878
|
const t = Object.prototype.toString.call(e);
|
|
2879
2879
|
return t === "[object Window]" || // In Electron context the Window object serializes to [object global]
|
|
2880
2880
|
t === "[object global]";
|
|
2881
2881
|
}
|
|
2882
|
-
function
|
|
2882
|
+
function Yn(e) {
|
|
2883
2883
|
return "nodeType" in e;
|
|
2884
2884
|
}
|
|
2885
2885
|
function Ce(e) {
|
|
2886
2886
|
var t, n;
|
|
2887
|
-
return e ? at(e) ? e :
|
|
2887
|
+
return e ? at(e) ? e : Yn(e) && (t = (n = e.ownerDocument) == null ? void 0 : n.defaultView) != null ? t : window : window;
|
|
2888
2888
|
}
|
|
2889
2889
|
function Kn(e) {
|
|
2890
2890
|
const {
|
|
@@ -2899,9 +2899,9 @@ function xo(e) {
|
|
|
2899
2899
|
return e instanceof Ce(e).SVGElement;
|
|
2900
2900
|
}
|
|
2901
2901
|
function lt(e) {
|
|
2902
|
-
return e ? at(e) ? e.document :
|
|
2902
|
+
return e ? at(e) ? e.document : Yn(e) ? Kn(e) ? e : Mt(e) || xo(e) ? e.ownerDocument : document : document : document;
|
|
2903
2903
|
}
|
|
2904
|
-
const _e =
|
|
2904
|
+
const _e = Jt ? Hn : q;
|
|
2905
2905
|
function Qt(e) {
|
|
2906
2906
|
const t = V(e);
|
|
2907
2907
|
return _e(() => {
|
|
@@ -2929,7 +2929,7 @@ function kt(e, t) {
|
|
|
2929
2929
|
}
|
|
2930
2930
|
function Dt(e, t) {
|
|
2931
2931
|
const n = V();
|
|
2932
|
-
return
|
|
2932
|
+
return X(
|
|
2933
2933
|
() => {
|
|
2934
2934
|
const r = e(n.current);
|
|
2935
2935
|
return n.current = r, r;
|
|
@@ -2950,13 +2950,13 @@ function Vt(e) {
|
|
|
2950
2950
|
}
|
|
2951
2951
|
function Ut(e) {
|
|
2952
2952
|
const t = V();
|
|
2953
|
-
return
|
|
2953
|
+
return q(() => {
|
|
2954
2954
|
t.current = e;
|
|
2955
2955
|
}, [e]), t.current;
|
|
2956
2956
|
}
|
|
2957
2957
|
let mn = {};
|
|
2958
2958
|
function Zt(e, t) {
|
|
2959
|
-
return
|
|
2959
|
+
return X(() => {
|
|
2960
2960
|
if (t)
|
|
2961
2961
|
return t;
|
|
2962
2962
|
const n = mn[e] == null ? 0 : mn[e] + 1;
|
|
@@ -2983,7 +2983,7 @@ const nt = /* @__PURE__ */ ko(1), Ct = /* @__PURE__ */ ko(-1);
|
|
|
2983
2983
|
function $s(e) {
|
|
2984
2984
|
return "clientX" in e && "clientY" in e;
|
|
2985
2985
|
}
|
|
2986
|
-
function
|
|
2986
|
+
function Xn(e) {
|
|
2987
2987
|
if (!e)
|
|
2988
2988
|
return !1;
|
|
2989
2989
|
const {
|
|
@@ -3119,16 +3119,16 @@ function _s() {
|
|
|
3119
3119
|
announcement: e
|
|
3120
3120
|
};
|
|
3121
3121
|
}
|
|
3122
|
-
const Co = /* @__PURE__ */
|
|
3122
|
+
const Co = /* @__PURE__ */ Je(null);
|
|
3123
3123
|
function Ws(e) {
|
|
3124
3124
|
const t = Be(Co);
|
|
3125
|
-
|
|
3125
|
+
q(() => {
|
|
3126
3126
|
if (!t)
|
|
3127
3127
|
throw new Error("useDndMonitor must be used within a children of <DndContext>");
|
|
3128
3128
|
return t(e);
|
|
3129
3129
|
}, [e, t]);
|
|
3130
3130
|
}
|
|
3131
|
-
function
|
|
3131
|
+
function qs() {
|
|
3132
3132
|
const [e] = B(() => /* @__PURE__ */ new Set()), t = N((r) => (e.add(r), () => e.delete(r)), [e]);
|
|
3133
3133
|
return [N((r) => {
|
|
3134
3134
|
let {
|
|
@@ -3141,7 +3141,7 @@ function Ys() {
|
|
|
3141
3141
|
});
|
|
3142
3142
|
}, [e]), t];
|
|
3143
3143
|
}
|
|
3144
|
-
const
|
|
3144
|
+
const Ys = {
|
|
3145
3145
|
draggable: `
|
|
3146
3146
|
To pick up a draggable item, press the space bar.
|
|
3147
3147
|
While dragging, use the arrow keys to move the item.
|
|
@@ -3175,20 +3175,20 @@ const qs = {
|
|
|
3175
3175
|
return "Dragging was cancelled. Draggable item " + t.id + " was dropped.";
|
|
3176
3176
|
}
|
|
3177
3177
|
};
|
|
3178
|
-
function
|
|
3178
|
+
function Xs(e) {
|
|
3179
3179
|
let {
|
|
3180
3180
|
announcements: t = Ks,
|
|
3181
3181
|
container: n,
|
|
3182
3182
|
hiddenTextDescribedById: r,
|
|
3183
|
-
screenReaderInstructions: o =
|
|
3183
|
+
screenReaderInstructions: o = Ys
|
|
3184
3184
|
} = e;
|
|
3185
3185
|
const {
|
|
3186
3186
|
announce: i,
|
|
3187
3187
|
announcement: s
|
|
3188
3188
|
} = _s(), a = Zt("DndLiveRegion"), [l, c] = B(!1);
|
|
3189
|
-
if (
|
|
3189
|
+
if (q(() => {
|
|
3190
3190
|
c(!0);
|
|
3191
|
-
}, []), Ws(
|
|
3191
|
+
}, []), Ws(X(() => ({
|
|
3192
3192
|
onDragStart(d) {
|
|
3193
3193
|
let {
|
|
3194
3194
|
active: h
|
|
@@ -3255,7 +3255,7 @@ var ce;
|
|
|
3255
3255
|
function _t() {
|
|
3256
3256
|
}
|
|
3257
3257
|
function br(e, t) {
|
|
3258
|
-
return
|
|
3258
|
+
return X(
|
|
3259
3259
|
() => ({
|
|
3260
3260
|
sensor: e,
|
|
3261
3261
|
options: t ?? {}
|
|
@@ -3264,10 +3264,10 @@ function br(e, t) {
|
|
|
3264
3264
|
[e, t]
|
|
3265
3265
|
);
|
|
3266
3266
|
}
|
|
3267
|
-
function
|
|
3267
|
+
function Js() {
|
|
3268
3268
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
3269
3269
|
t[n] = arguments[n];
|
|
3270
|
-
return
|
|
3270
|
+
return X(
|
|
3271
3271
|
() => [...t].filter((r) => r != null),
|
|
3272
3272
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3273
3273
|
[...t]
|
|
@@ -3277,7 +3277,7 @@ const Fe = /* @__PURE__ */ Object.freeze({
|
|
|
3277
3277
|
x: 0,
|
|
3278
3278
|
y: 0
|
|
3279
3279
|
});
|
|
3280
|
-
function
|
|
3280
|
+
function Jn(e, t) {
|
|
3281
3281
|
return Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2));
|
|
3282
3282
|
}
|
|
3283
3283
|
function Qs(e, t) {
|
|
@@ -3359,7 +3359,7 @@ const ea = (e) => {
|
|
|
3359
3359
|
id: a
|
|
3360
3360
|
} = s, l = n.get(a);
|
|
3361
3361
|
if (l) {
|
|
3362
|
-
const c =
|
|
3362
|
+
const c = Jn(wr(l), o);
|
|
3363
3363
|
i.push({
|
|
3364
3364
|
id: a,
|
|
3365
3365
|
data: {
|
|
@@ -3382,7 +3382,7 @@ const ea = (e) => {
|
|
|
3382
3382
|
id: a
|
|
3383
3383
|
} = s, l = n.get(a);
|
|
3384
3384
|
if (l) {
|
|
3385
|
-
const c = Nn(l), u = o.reduce((h, p, k) => h +
|
|
3385
|
+
const c = Nn(l), u = o.reduce((h, p, k) => h + Jn(c[k], p), 0), d = Number((u / 4).toFixed(4));
|
|
3386
3386
|
i.push({
|
|
3387
3387
|
id: a,
|
|
3388
3388
|
data: {
|
|
@@ -3449,7 +3449,7 @@ const ia = (e) => {
|
|
|
3449
3449
|
id: s
|
|
3450
3450
|
} = i, a = n.get(s);
|
|
3451
3451
|
if (a && oa(r, a)) {
|
|
3452
|
-
const c = Nn(a).reduce((d, h) => d +
|
|
3452
|
+
const c = Nn(a).reduce((d, h) => d + Jn(r, h), 0), u = Number((c / 4).toFixed(4));
|
|
3453
3453
|
o.push({
|
|
3454
3454
|
id: s,
|
|
3455
3455
|
data: {
|
|
@@ -3605,7 +3605,7 @@ function Mo(e) {
|
|
|
3605
3605
|
return t ?? null;
|
|
3606
3606
|
}
|
|
3607
3607
|
function vn(e) {
|
|
3608
|
-
return !
|
|
3608
|
+
return !Jt || !e ? null : at(e) ? e : Yn(e) ? Kn(e) || e === lt(e).scrollingElement ? window : Mt(e) ? e : null : null;
|
|
3609
3609
|
}
|
|
3610
3610
|
function Do(e) {
|
|
3611
3611
|
return at(e) ? e.scrollX : e.scrollLeft;
|
|
@@ -3624,7 +3624,7 @@ var ge;
|
|
|
3624
3624
|
e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
|
|
3625
3625
|
})(ge || (ge = {}));
|
|
3626
3626
|
function To(e) {
|
|
3627
|
-
return !
|
|
3627
|
+
return !Jt || !e ? !1 : e === document.scrollingElement;
|
|
3628
3628
|
}
|
|
3629
3629
|
function Io(e) {
|
|
3630
3630
|
const t = {
|
|
@@ -3846,7 +3846,7 @@ class er {
|
|
|
3846
3846
|
r && No(r), n(Fe);
|
|
3847
3847
|
}
|
|
3848
3848
|
handleKeyDown(t) {
|
|
3849
|
-
if (
|
|
3849
|
+
if (Xn(t)) {
|
|
3850
3850
|
const {
|
|
3851
3851
|
active: n,
|
|
3852
3852
|
context: r,
|
|
@@ -4228,7 +4228,7 @@ function Ma(e) {
|
|
|
4228
4228
|
}), m = V({
|
|
4229
4229
|
x: 0,
|
|
4230
4230
|
y: 0
|
|
4231
|
-
}), S =
|
|
4231
|
+
}), S = X(() => {
|
|
4232
4232
|
switch (n) {
|
|
4233
4233
|
case bt.Pointer:
|
|
4234
4234
|
return l ? {
|
|
@@ -4246,8 +4246,8 @@ function Ma(e) {
|
|
|
4246
4246
|
return;
|
|
4247
4247
|
const E = g.current.x * m.current.x, v = g.current.y * m.current.y;
|
|
4248
4248
|
b.scrollBy(E, v);
|
|
4249
|
-
}, []), I =
|
|
4250
|
-
|
|
4249
|
+
}, []), I = X(() => a === Wt.TreeOrder ? [...c].reverse() : c, [a, c]);
|
|
4250
|
+
q(
|
|
4251
4251
|
() => {
|
|
4252
4252
|
if (!i || !c.length || !S) {
|
|
4253
4253
|
y();
|
|
@@ -4342,7 +4342,7 @@ function Ta(e, t) {
|
|
|
4342
4342
|
}, [r, t]);
|
|
4343
4343
|
}
|
|
4344
4344
|
function Ia(e, t) {
|
|
4345
|
-
return
|
|
4345
|
+
return X(() => e.reduce((n, r) => {
|
|
4346
4346
|
const {
|
|
4347
4347
|
sensor: o
|
|
4348
4348
|
} = r, i = o.activators.map((s) => ({
|
|
@@ -4392,21 +4392,21 @@ function Ra(e, t) {
|
|
|
4392
4392
|
}
|
|
4393
4393
|
return m;
|
|
4394
4394
|
}, [e, i, n, d, l]);
|
|
4395
|
-
return
|
|
4395
|
+
return q(() => {
|
|
4396
4396
|
u.current = e;
|
|
4397
|
-
}, [e]),
|
|
4397
|
+
}, [e]), q(
|
|
4398
4398
|
() => {
|
|
4399
4399
|
d || p();
|
|
4400
4400
|
},
|
|
4401
4401
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4402
4402
|
[n, d]
|
|
4403
|
-
),
|
|
4403
|
+
), q(
|
|
4404
4404
|
() => {
|
|
4405
4405
|
i && i.length > 0 && s(null);
|
|
4406
4406
|
},
|
|
4407
4407
|
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4408
4408
|
[JSON.stringify(i)]
|
|
4409
|
-
),
|
|
4409
|
+
), q(
|
|
4410
4410
|
() => {
|
|
4411
4411
|
d || typeof a != "number" || k.current !== null || (k.current = setTimeout(() => {
|
|
4412
4412
|
p(), k.current = null;
|
|
@@ -4441,7 +4441,7 @@ function za(e) {
|
|
|
4441
4441
|
callback: t,
|
|
4442
4442
|
disabled: n
|
|
4443
4443
|
} = e;
|
|
4444
|
-
const r = Qt(t), o =
|
|
4444
|
+
const r = Qt(t), o = X(() => {
|
|
4445
4445
|
if (n || typeof window > "u" || typeof window.MutationObserver > "u")
|
|
4446
4446
|
return;
|
|
4447
4447
|
const {
|
|
@@ -4449,14 +4449,14 @@ function za(e) {
|
|
|
4449
4449
|
} = window;
|
|
4450
4450
|
return new i(r);
|
|
4451
4451
|
}, [r, n]);
|
|
4452
|
-
return
|
|
4452
|
+
return q(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
|
|
4453
4453
|
}
|
|
4454
4454
|
function tn(e) {
|
|
4455
4455
|
let {
|
|
4456
4456
|
callback: t,
|
|
4457
4457
|
disabled: n
|
|
4458
4458
|
} = e;
|
|
4459
|
-
const r = Qt(t), o =
|
|
4459
|
+
const r = Qt(t), o = X(
|
|
4460
4460
|
() => {
|
|
4461
4461
|
if (n || typeof window > "u" || typeof window.ResizeObserver > "u")
|
|
4462
4462
|
return;
|
|
@@ -4468,7 +4468,7 @@ function tn(e) {
|
|
|
4468
4468
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4469
4469
|
[n]
|
|
4470
4470
|
);
|
|
4471
|
-
return
|
|
4471
|
+
return q(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
|
|
4472
4472
|
}
|
|
4473
4473
|
function Oa(e) {
|
|
4474
4474
|
return new Zn(Lt(e), e);
|
|
@@ -4519,7 +4519,7 @@ function Fa(e) {
|
|
|
4519
4519
|
const Mr = [];
|
|
4520
4520
|
function ja(e) {
|
|
4521
4521
|
const t = V(e), n = Dt((r) => e ? r && r !== Mr && e && t.current && e.parentNode === t.current.parentNode ? r : en(e) : Mr, [e]);
|
|
4522
|
-
return
|
|
4522
|
+
return q(() => {
|
|
4523
4523
|
t.current = e;
|
|
4524
4524
|
}, [e]), n;
|
|
4525
4525
|
}
|
|
@@ -4528,7 +4528,7 @@ function Pa(e) {
|
|
|
4528
4528
|
const s = vn(i.target);
|
|
4529
4529
|
s && n((a) => a ? (a.set(s, zn(s)), new Map(a)) : null);
|
|
4530
4530
|
}, []);
|
|
4531
|
-
return
|
|
4531
|
+
return q(() => {
|
|
4532
4532
|
const i = r.current;
|
|
4533
4533
|
if (e !== i) {
|
|
4534
4534
|
s(i);
|
|
@@ -4549,26 +4549,26 @@ function Pa(e) {
|
|
|
4549
4549
|
c == null || c.removeEventListener("scroll", o);
|
|
4550
4550
|
});
|
|
4551
4551
|
}
|
|
4552
|
-
}, [o, e]),
|
|
4552
|
+
}, [o, e]), X(() => e.length ? t ? Array.from(t.values()).reduce((i, s) => nt(i, s), Fe) : Ro(e) : Fe, [e, t]);
|
|
4553
4553
|
}
|
|
4554
4554
|
function Dr(e, t) {
|
|
4555
4555
|
t === void 0 && (t = []);
|
|
4556
4556
|
const n = V(null);
|
|
4557
|
-
return
|
|
4557
|
+
return q(
|
|
4558
4558
|
() => {
|
|
4559
4559
|
n.current = null;
|
|
4560
4560
|
},
|
|
4561
4561
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4562
4562
|
t
|
|
4563
|
-
),
|
|
4563
|
+
), q(() => {
|
|
4564
4564
|
const r = e !== Fe;
|
|
4565
4565
|
r && !n.current && (n.current = e), !r && n.current && (n.current = null);
|
|
4566
4566
|
}, [e]), n.current ? Ct(e, n.current) : Fe;
|
|
4567
4567
|
}
|
|
4568
4568
|
function $a(e) {
|
|
4569
|
-
|
|
4569
|
+
q(
|
|
4570
4570
|
() => {
|
|
4571
|
-
if (!
|
|
4571
|
+
if (!Jt)
|
|
4572
4572
|
return;
|
|
4573
4573
|
const t = e.map((n) => {
|
|
4574
4574
|
let {
|
|
@@ -4592,7 +4592,7 @@ function $a(e) {
|
|
|
4592
4592
|
);
|
|
4593
4593
|
}
|
|
4594
4594
|
function Ha(e, t) {
|
|
4595
|
-
return
|
|
4595
|
+
return X(() => e.reduce((n, r) => {
|
|
4596
4596
|
let {
|
|
4597
4597
|
eventName: o,
|
|
4598
4598
|
handler: i
|
|
@@ -4603,7 +4603,7 @@ function Ha(e, t) {
|
|
|
4603
4603
|
}, {}), [e, t]);
|
|
4604
4604
|
}
|
|
4605
4605
|
function Oo(e) {
|
|
4606
|
-
return
|
|
4606
|
+
return X(() => e ? ua(e) : null, [e]);
|
|
4607
4607
|
}
|
|
4608
4608
|
const Lr = [];
|
|
4609
4609
|
function Ba(e, t) {
|
|
@@ -4652,7 +4652,7 @@ function Va(e) {
|
|
|
4652
4652
|
const u = Fo(c);
|
|
4653
4653
|
i == null || i.disconnect(), u && (i == null || i.observe(u)), r(u ? t(u) : null);
|
|
4654
4654
|
}, [t, i]), [a, l] = Vt(s);
|
|
4655
|
-
return
|
|
4655
|
+
return X(() => ({
|
|
4656
4656
|
nodeRef: a,
|
|
4657
4657
|
rect: n,
|
|
4658
4658
|
setRef: l
|
|
@@ -4736,7 +4736,7 @@ const _a = {
|
|
|
4736
4736
|
draggableNodes: /* @__PURE__ */ new Map(),
|
|
4737
4737
|
over: null,
|
|
4738
4738
|
measureDroppableContainers: _t
|
|
4739
|
-
}, Tt = /* @__PURE__ */
|
|
4739
|
+
}, Tt = /* @__PURE__ */ Je(jo), Po = /* @__PURE__ */ Je(_a);
|
|
4740
4740
|
function Wa() {
|
|
4741
4741
|
return {
|
|
4742
4742
|
draggable: {
|
|
@@ -4756,7 +4756,7 @@ function Wa() {
|
|
|
4756
4756
|
}
|
|
4757
4757
|
};
|
|
4758
4758
|
}
|
|
4759
|
-
function
|
|
4759
|
+
function qa(e, t) {
|
|
4760
4760
|
switch (t.type) {
|
|
4761
4761
|
case ce.DragStart:
|
|
4762
4762
|
return {
|
|
@@ -4849,7 +4849,7 @@ function Ya(e, t) {
|
|
|
4849
4849
|
return e;
|
|
4850
4850
|
}
|
|
4851
4851
|
}
|
|
4852
|
-
function
|
|
4852
|
+
function Ya(e) {
|
|
4853
4853
|
let {
|
|
4854
4854
|
disabled: t
|
|
4855
4855
|
} = e;
|
|
@@ -4858,9 +4858,9 @@ function qa(e) {
|
|
|
4858
4858
|
activatorEvent: r,
|
|
4859
4859
|
draggableNodes: o
|
|
4860
4860
|
} = Be(Tt), i = Ut(r), s = Ut(n == null ? void 0 : n.id);
|
|
4861
|
-
return
|
|
4861
|
+
return q(() => {
|
|
4862
4862
|
if (!t && !r && i && s != null) {
|
|
4863
|
-
if (!
|
|
4863
|
+
if (!Xn(i) || document.activeElement === i.target)
|
|
4864
4864
|
return;
|
|
4865
4865
|
const a = o.get(s);
|
|
4866
4866
|
if (!a)
|
|
@@ -4896,7 +4896,7 @@ function $o(e, t) {
|
|
|
4896
4896
|
}), n) : n;
|
|
4897
4897
|
}
|
|
4898
4898
|
function Ka(e) {
|
|
4899
|
-
return
|
|
4899
|
+
return X(
|
|
4900
4900
|
() => ({
|
|
4901
4901
|
draggable: {
|
|
4902
4902
|
...Ht.draggable,
|
|
@@ -4915,7 +4915,7 @@ function Ka(e) {
|
|
|
4915
4915
|
[e == null ? void 0 : e.draggable, e == null ? void 0 : e.droppable, e == null ? void 0 : e.dragOverlay]
|
|
4916
4916
|
);
|
|
4917
4917
|
}
|
|
4918
|
-
function
|
|
4918
|
+
function Xa(e) {
|
|
4919
4919
|
let {
|
|
4920
4920
|
activeNode: t,
|
|
4921
4921
|
measure: n,
|
|
@@ -4949,7 +4949,7 @@ function Ja(e) {
|
|
|
4949
4949
|
}
|
|
4950
4950
|
}, [t, s, a, r, n]);
|
|
4951
4951
|
}
|
|
4952
|
-
const nn = /* @__PURE__ */
|
|
4952
|
+
const nn = /* @__PURE__ */ Je({
|
|
4953
4953
|
...Fe,
|
|
4954
4954
|
scaleX: 1,
|
|
4955
4955
|
scaleY: 1
|
|
@@ -4958,7 +4958,7 @@ var Ke;
|
|
|
4958
4958
|
(function(e) {
|
|
4959
4959
|
e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
|
|
4960
4960
|
})(Ke || (Ke = {}));
|
|
4961
|
-
const
|
|
4961
|
+
const Ja = /* @__PURE__ */ ei(function(t) {
|
|
4962
4962
|
var n, r, o, i;
|
|
4963
4963
|
let {
|
|
4964
4964
|
id: s,
|
|
@@ -4971,7 +4971,7 @@ const Xa = /* @__PURE__ */ ei(function(t) {
|
|
|
4971
4971
|
modifiers: p,
|
|
4972
4972
|
...k
|
|
4973
4973
|
} = t;
|
|
4974
|
-
const y = ti(
|
|
4974
|
+
const y = ti(qa, void 0, Wa), [g, m] = y, [S, M] = qs(), [L, I] = B(Ke.Uninitialized), b = L === Ke.Initialized, {
|
|
4975
4975
|
draggable: {
|
|
4976
4976
|
active: E,
|
|
4977
4977
|
nodes: v,
|
|
@@ -4983,7 +4983,7 @@ const Xa = /* @__PURE__ */ ei(function(t) {
|
|
|
4983
4983
|
} = g, A = E != null ? v.get(E) : null, T = V({
|
|
4984
4984
|
initial: null,
|
|
4985
4985
|
translated: null
|
|
4986
|
-
}), O =
|
|
4986
|
+
}), O = X(() => {
|
|
4987
4987
|
var we;
|
|
4988
4988
|
return E != null ? {
|
|
4989
4989
|
id: E,
|
|
@@ -4991,7 +4991,7 @@ const Xa = /* @__PURE__ */ ei(function(t) {
|
|
|
4991
4991
|
data: (we = A == null ? void 0 : A.data) != null ? we : Ga,
|
|
4992
4992
|
rect: T
|
|
4993
4993
|
} : null;
|
|
4994
|
-
}, [E, A]), W = V(null), [ae, _] = B(null), [
|
|
4994
|
+
}, [E, A]), W = V(null), [ae, _] = B(null), [J, Y] = B(null), te = kt(k, Object.values(k)), pe = Zt("DndDescribedBy", s), xe = X(() => w.getEnabled(), [w]), ie = Ka(h), {
|
|
4995
4995
|
droppableRects: de,
|
|
4996
4996
|
measureDroppableContainers: je,
|
|
4997
4997
|
measuringScheduled: ze
|
|
@@ -4999,8 +4999,8 @@ const Xa = /* @__PURE__ */ ei(function(t) {
|
|
|
4999
4999
|
dragging: b,
|
|
5000
5000
|
dependencies: [D.x, D.y],
|
|
5001
5001
|
config: ie.droppable
|
|
5002
|
-
}), le = Ta(v, E), De =
|
|
5003
|
-
|
|
5002
|
+
}), le = Ta(v, E), De = X(() => J ? Gt(J) : null, [J]), ee = Zo(), se = Na(le, ie.draggable.measure);
|
|
5003
|
+
Xa({
|
|
5004
5004
|
activeNode: E != null ? v.get(E) : null,
|
|
5005
5005
|
config: ee.layoutShiftCompensation,
|
|
5006
5006
|
initialRect: se,
|
|
@@ -5029,7 +5029,7 @@ const Xa = /* @__PURE__ */ ei(function(t) {
|
|
|
5029
5029
|
scaleX: 1,
|
|
5030
5030
|
scaleY: 1
|
|
5031
5031
|
},
|
|
5032
|
-
activatorEvent:
|
|
5032
|
+
activatorEvent: J,
|
|
5033
5033
|
active: O,
|
|
5034
5034
|
activeNodeRect: P,
|
|
5035
5035
|
containerNodeRect: ke,
|
|
@@ -5077,27 +5077,27 @@ const Xa = /* @__PURE__ */ ei(function(t) {
|
|
|
5077
5077
|
event: Ue
|
|
5078
5078
|
});
|
|
5079
5079
|
},
|
|
5080
|
-
onPending(me,
|
|
5080
|
+
onPending(me, qe, $e, Ue) {
|
|
5081
5081
|
if (!v.get(me))
|
|
5082
5082
|
return;
|
|
5083
5083
|
const {
|
|
5084
5084
|
onDragPending: ut
|
|
5085
|
-
} = te.current,
|
|
5085
|
+
} = te.current, Ye = {
|
|
5086
5086
|
id: me,
|
|
5087
|
-
constraint:
|
|
5087
|
+
constraint: qe,
|
|
5088
5088
|
initialCoordinates: $e,
|
|
5089
5089
|
offset: Ue
|
|
5090
5090
|
};
|
|
5091
|
-
ut == null || ut(
|
|
5091
|
+
ut == null || ut(Ye), S({
|
|
5092
5092
|
type: "onDragPending",
|
|
5093
|
-
event:
|
|
5093
|
+
event: Ye
|
|
5094
5094
|
});
|
|
5095
5095
|
},
|
|
5096
5096
|
onStart(me) {
|
|
5097
|
-
const
|
|
5098
|
-
if (
|
|
5097
|
+
const qe = W.current;
|
|
5098
|
+
if (qe == null)
|
|
5099
5099
|
return;
|
|
5100
|
-
const $e = v.get(
|
|
5100
|
+
const $e = v.get(qe);
|
|
5101
5101
|
if (!$e)
|
|
5102
5102
|
return;
|
|
5103
5103
|
const {
|
|
@@ -5105,7 +5105,7 @@ const Xa = /* @__PURE__ */ ei(function(t) {
|
|
|
5105
5105
|
} = te.current, dt = {
|
|
5106
5106
|
activatorEvent: Me,
|
|
5107
5107
|
active: {
|
|
5108
|
-
id:
|
|
5108
|
+
id: qe,
|
|
5109
5109
|
data: $e.data,
|
|
5110
5110
|
rect: T
|
|
5111
5111
|
}
|
|
@@ -5114,11 +5114,11 @@ const Xa = /* @__PURE__ */ ei(function(t) {
|
|
|
5114
5114
|
Ue == null || Ue(dt), I(Ke.Initializing), m({
|
|
5115
5115
|
type: ce.DragStart,
|
|
5116
5116
|
initialCoordinates: me,
|
|
5117
|
-
active:
|
|
5117
|
+
active: qe
|
|
5118
5118
|
}), S({
|
|
5119
5119
|
type: "onDragStart",
|
|
5120
5120
|
event: dt
|
|
5121
|
-
}), _(ct.current),
|
|
5121
|
+
}), _(ct.current), Y(Me);
|
|
5122
5122
|
});
|
|
5123
5123
|
},
|
|
5124
5124
|
onMove(me) {
|
|
@@ -5139,29 +5139,29 @@ const Xa = /* @__PURE__ */ ei(function(t) {
|
|
|
5139
5139
|
over: dt,
|
|
5140
5140
|
scrollAdjustedTranslate: ut
|
|
5141
5141
|
} = ve.current;
|
|
5142
|
-
let
|
|
5142
|
+
let Ye = null;
|
|
5143
5143
|
if ($e && ut) {
|
|
5144
5144
|
const {
|
|
5145
5145
|
cancelDrop: ft
|
|
5146
5146
|
} = te.current;
|
|
5147
|
-
|
|
5147
|
+
Ye = {
|
|
5148
5148
|
activatorEvent: Me,
|
|
5149
5149
|
active: $e,
|
|
5150
5150
|
collisions: Ue,
|
|
5151
5151
|
delta: ut,
|
|
5152
5152
|
over: dt
|
|
5153
|
-
}, me === ce.DragEnd && typeof ft == "function" && await Promise.resolve(ft(
|
|
5153
|
+
}, me === ce.DragEnd && typeof ft == "function" && await Promise.resolve(ft(Ye)) && (me = ce.DragCancel);
|
|
5154
5154
|
}
|
|
5155
5155
|
W.current = null, Ft(() => {
|
|
5156
5156
|
m({
|
|
5157
5157
|
type: me
|
|
5158
|
-
}), I(Ke.Uninitialized), It(null), _(null),
|
|
5158
|
+
}), I(Ke.Uninitialized), It(null), _(null), Y(null), ct.current = null;
|
|
5159
5159
|
const ft = me === ce.DragEnd ? "onDragEnd" : "onDragCancel";
|
|
5160
|
-
if (
|
|
5160
|
+
if (Ye) {
|
|
5161
5161
|
const sn = te.current[ft];
|
|
5162
|
-
sn == null || sn(
|
|
5162
|
+
sn == null || sn(Ye), S({
|
|
5163
5163
|
type: ft,
|
|
5164
|
-
event:
|
|
5164
|
+
event: Ye
|
|
5165
5165
|
});
|
|
5166
5166
|
}
|
|
5167
5167
|
});
|
|
@@ -5188,7 +5188,7 @@ const Xa = /* @__PURE__ */ ei(function(t) {
|
|
|
5188
5188
|
}, [v, Nt]), Ot = Ia(u, zt);
|
|
5189
5189
|
$a(u), _e(() => {
|
|
5190
5190
|
P && L === Ke.Initializing && I(Ke.Initialized);
|
|
5191
|
-
}, [P, L]),
|
|
5191
|
+
}, [P, L]), q(
|
|
5192
5192
|
() => {
|
|
5193
5193
|
const {
|
|
5194
5194
|
onDragMove: we
|
|
@@ -5219,7 +5219,7 @@ const Xa = /* @__PURE__ */ ei(function(t) {
|
|
|
5219
5219
|
},
|
|
5220
5220
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5221
5221
|
[Se.x, Se.y]
|
|
5222
|
-
),
|
|
5222
|
+
), q(
|
|
5223
5223
|
() => {
|
|
5224
5224
|
const {
|
|
5225
5225
|
active: we,
|
|
@@ -5258,7 +5258,7 @@ const Xa = /* @__PURE__ */ ei(function(t) {
|
|
|
5258
5258
|
[he]
|
|
5259
5259
|
), _e(() => {
|
|
5260
5260
|
ve.current = {
|
|
5261
|
-
activatorEvent:
|
|
5261
|
+
activatorEvent: J,
|
|
5262
5262
|
active: O,
|
|
5263
5263
|
activeNode: le,
|
|
5264
5264
|
collisionRect: ye,
|
|
@@ -5283,11 +5283,11 @@ const Xa = /* @__PURE__ */ ei(function(t) {
|
|
|
5283
5283
|
scrollableAncestors: z,
|
|
5284
5284
|
scrollableAncestorRects: Z
|
|
5285
5285
|
});
|
|
5286
|
-
const
|
|
5286
|
+
const Jo = X(() => ({
|
|
5287
5287
|
active: O,
|
|
5288
5288
|
activeNode: le,
|
|
5289
5289
|
activeNodeRect: P,
|
|
5290
|
-
activatorEvent:
|
|
5290
|
+
activatorEvent: J,
|
|
5291
5291
|
collisions: K,
|
|
5292
5292
|
containerNodeRect: ke,
|
|
5293
5293
|
dragOverlay: ue,
|
|
@@ -5301,8 +5301,8 @@ const Xa = /* @__PURE__ */ ei(function(t) {
|
|
|
5301
5301
|
measuringConfiguration: ie,
|
|
5302
5302
|
measuringScheduled: ze,
|
|
5303
5303
|
windowRect: R
|
|
5304
|
-
}), [O, le, P,
|
|
5305
|
-
activatorEvent:
|
|
5304
|
+
}), [O, le, P, J, K, ke, ue, v, w, de, be, je, z, Z, ie, ze, R]), Qo = X(() => ({
|
|
5305
|
+
activatorEvent: J,
|
|
5306
5306
|
activators: Ot,
|
|
5307
5307
|
active: O,
|
|
5308
5308
|
activeNodeRect: P,
|
|
@@ -5313,18 +5313,18 @@ const Xa = /* @__PURE__ */ ei(function(t) {
|
|
|
5313
5313
|
draggableNodes: v,
|
|
5314
5314
|
over: be,
|
|
5315
5315
|
measureDroppableContainers: je
|
|
5316
|
-
}), [
|
|
5316
|
+
}), [J, Ot, O, P, m, pe, v, be, je]);
|
|
5317
5317
|
return ne.createElement(Co.Provider, {
|
|
5318
5318
|
value: M
|
|
5319
5319
|
}, ne.createElement(Tt.Provider, {
|
|
5320
5320
|
value: Qo
|
|
5321
5321
|
}, ne.createElement(Po.Provider, {
|
|
5322
|
-
value:
|
|
5322
|
+
value: Jo
|
|
5323
5323
|
}, ne.createElement(nn.Provider, {
|
|
5324
5324
|
value: Rt
|
|
5325
|
-
}, c)), ne.createElement(
|
|
5325
|
+
}, c)), ne.createElement(Ya, {
|
|
5326
5326
|
disabled: (a == null ? void 0 : a.restoreFocus) === !1
|
|
5327
|
-
})), ne.createElement(
|
|
5327
|
+
})), ne.createElement(Xs, {
|
|
5328
5328
|
...a,
|
|
5329
5329
|
hiddenTextDescribedById: pe
|
|
5330
5330
|
}));
|
|
@@ -5337,7 +5337,7 @@ const Xa = /* @__PURE__ */ ei(function(t) {
|
|
|
5337
5337
|
enabled: Ae
|
|
5338
5338
|
};
|
|
5339
5339
|
}
|
|
5340
|
-
}), Qa = /* @__PURE__ */
|
|
5340
|
+
}), Qa = /* @__PURE__ */ Je(null), Tr = "button", Za = "Draggable";
|
|
5341
5341
|
function el(e) {
|
|
5342
5342
|
let {
|
|
5343
5343
|
id: t,
|
|
@@ -5372,7 +5372,7 @@ function el(e) {
|
|
|
5372
5372
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5373
5373
|
[d, t]
|
|
5374
5374
|
);
|
|
5375
|
-
const v =
|
|
5375
|
+
const v = X(() => ({
|
|
5376
5376
|
role: p,
|
|
5377
5377
|
tabIndex: y,
|
|
5378
5378
|
"aria-disabled": r,
|
|
@@ -5439,9 +5439,9 @@ function Ho(e) {
|
|
|
5439
5439
|
}), L = N((v, D) => {
|
|
5440
5440
|
M && (D && (M.unobserve(D), d.current = !1), v && M.observe(v));
|
|
5441
5441
|
}, [M]), [I, b] = Vt(L), E = kt(t);
|
|
5442
|
-
return
|
|
5442
|
+
return q(() => {
|
|
5443
5443
|
!M || !I.current || (M.disconnect(), d.current = !1, M.observe(I.current));
|
|
5444
|
-
}, [I, M]),
|
|
5444
|
+
}, [I, M]), q(
|
|
5445
5445
|
() => (a({
|
|
5446
5446
|
type: ce.RegisterDroppable,
|
|
5447
5447
|
element: {
|
|
@@ -5459,7 +5459,7 @@ function Ho(e) {
|
|
|
5459
5459
|
})),
|
|
5460
5460
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5461
5461
|
[r]
|
|
5462
|
-
),
|
|
5462
|
+
), q(() => {
|
|
5463
5463
|
n !== u.current.disabled && (a({
|
|
5464
5464
|
type: ce.SetDroppableDisabled,
|
|
5465
5465
|
id: r,
|
|
@@ -5515,7 +5515,7 @@ function sl(e) {
|
|
|
5515
5515
|
const al = {
|
|
5516
5516
|
position: "fixed",
|
|
5517
5517
|
touchAction: "none"
|
|
5518
|
-
}, ll = (e) =>
|
|
5518
|
+
}, ll = (e) => Xn(e) ? "transform 250ms ease" : void 0, cl = /* @__PURE__ */ $n((e, t) => {
|
|
5519
5519
|
let {
|
|
5520
5520
|
as: n,
|
|
5521
5521
|
activatorEvent: r,
|
|
@@ -5694,7 +5694,7 @@ function gl(e) {
|
|
|
5694
5694
|
}
|
|
5695
5695
|
let Ir = 0;
|
|
5696
5696
|
function pl(e) {
|
|
5697
|
-
return
|
|
5697
|
+
return X(() => {
|
|
5698
5698
|
if (e != null)
|
|
5699
5699
|
return Ir++, Ir;
|
|
5700
5700
|
}, [e]);
|
|
@@ -5761,7 +5761,7 @@ const ml = /* @__PURE__ */ ne.memo((e) => {
|
|
|
5761
5761
|
transform: v
|
|
5762
5762
|
}, n) : null));
|
|
5763
5763
|
});
|
|
5764
|
-
function
|
|
5764
|
+
function qt(e) {
|
|
5765
5765
|
if (!e)
|
|
5766
5766
|
return !1;
|
|
5767
5767
|
const t = e.data.current;
|
|
@@ -5827,10 +5827,10 @@ const vl = [U.Down, U.Right, U.Up, U.Left], yl = (e, t) => {
|
|
|
5827
5827
|
}
|
|
5828
5828
|
};
|
|
5829
5829
|
function Bo(e, t) {
|
|
5830
|
-
return !
|
|
5830
|
+
return !qt(e) || !qt(t) ? !1 : e.data.current.sortable.containerId === t.data.current.sortable.containerId;
|
|
5831
5831
|
}
|
|
5832
5832
|
function bl(e, t) {
|
|
5833
|
-
return !
|
|
5833
|
+
return !qt(e) || !qt(t) || !Bo(e, t) ? !1 : e.data.current.sortable.index < t.data.current.sortable.index;
|
|
5834
5834
|
}
|
|
5835
5835
|
function Rr(e) {
|
|
5836
5836
|
var n;
|
|
@@ -5846,7 +5846,7 @@ function wl(e) {
|
|
|
5846
5846
|
onDropIntoGroupAtPosition: o,
|
|
5847
5847
|
onRemoveFromGroup: i,
|
|
5848
5848
|
findParentGroup: s
|
|
5849
|
-
} = e, [a, l] = B(null), [c, u] = B(null), [d, h] = B(null), p = V(null), k =
|
|
5849
|
+
} = e, [a, l] = B(null), [c, u] = B(null), [d, h] = B(null), p = V(null), k = Js(
|
|
5850
5850
|
br(nr, {
|
|
5851
5851
|
activationConstraint: {
|
|
5852
5852
|
distance: 5
|
|
@@ -6217,7 +6217,7 @@ const xl = (e) => {
|
|
|
6217
6217
|
previewSize: h,
|
|
6218
6218
|
previewBackgroundColor: u
|
|
6219
6219
|
});
|
|
6220
|
-
|
|
6220
|
+
q(() => {
|
|
6221
6221
|
n && k.length > 0 && A();
|
|
6222
6222
|
}, [n, k.length, u, A]);
|
|
6223
6223
|
const T = ri(), O = N(
|
|
@@ -6226,7 +6226,7 @@ const xl = (e) => {
|
|
|
6226
6226
|
return T((se = D(ee.id)) == null ? void 0 : se.name);
|
|
6227
6227
|
},
|
|
6228
6228
|
[T, D]
|
|
6229
|
-
), W =
|
|
6229
|
+
), W = X(() => {
|
|
6230
6230
|
const ee = /* @__PURE__ */ new Map(), se = (P) => {
|
|
6231
6231
|
for (const ke of P)
|
|
6232
6232
|
ee.set(ke.id, ke), ke.children && se(ke.children);
|
|
@@ -6245,7 +6245,7 @@ const xl = (e) => {
|
|
|
6245
6245
|
onGroupReorder: I,
|
|
6246
6246
|
onRemoveFromGroup: E,
|
|
6247
6247
|
findParentGroup: w
|
|
6248
|
-
}),
|
|
6248
|
+
}), J = (ee) => [...ee].reverse().map((P) => /* @__PURE__ */ j(ne.Fragment, { children: [
|
|
6249
6249
|
/* @__PURE__ */ f(
|
|
6250
6250
|
kl,
|
|
6251
6251
|
{
|
|
@@ -6263,7 +6263,7 @@ const xl = (e) => {
|
|
|
6263
6263
|
deleteSuppressed: O(P)
|
|
6264
6264
|
}
|
|
6265
6265
|
),
|
|
6266
|
-
P.children &&
|
|
6266
|
+
P.children && J(P.children),
|
|
6267
6267
|
P.isGroup && /* @__PURE__ */ f(
|
|
6268
6268
|
Cl,
|
|
6269
6269
|
{
|
|
@@ -6272,7 +6272,7 @@ const xl = (e) => {
|
|
|
6272
6272
|
depth: P.depth
|
|
6273
6273
|
}
|
|
6274
6274
|
)
|
|
6275
|
-
] }, P.id)),
|
|
6275
|
+
] }, P.id)), Y = (ee) => [...ee].reverse().map((P) => /* @__PURE__ */ j(ne.Fragment, { children: [
|
|
6276
6276
|
/* @__PURE__ */ f(
|
|
6277
6277
|
Al,
|
|
6278
6278
|
{
|
|
@@ -6287,7 +6287,7 @@ const xl = (e) => {
|
|
|
6287
6287
|
deleteSuppressed: O(P)
|
|
6288
6288
|
}
|
|
6289
6289
|
),
|
|
6290
|
-
P.children &&
|
|
6290
|
+
P.children && Y(P.children)
|
|
6291
6291
|
] }, P.id)), te = _.activeId ? W.get(_.activeId) : null, { width: pe, height: xe, flex: ie, ...de } = i, je = pe || (s.includes("w-full") ? "100%" : e ? `${e}px` : void 0), ze = t || xe || void 0, De = ie !== void 0 ? ie : ze === "100%" || ze === "100vh" ? 1 : void 0;
|
|
6292
6292
|
return /* @__PURE__ */ j(
|
|
6293
6293
|
"div",
|
|
@@ -6351,7 +6351,7 @@ const xl = (e) => {
|
|
|
6351
6351
|
),
|
|
6352
6352
|
/* @__PURE__ */ j("div", { style: { flex: 1, overflow: "auto", minHeight: 0 }, children: [
|
|
6353
6353
|
p.length > 0 ? r ? /* @__PURE__ */ j(
|
|
6354
|
-
|
|
6354
|
+
Ja,
|
|
6355
6355
|
{
|
|
6356
6356
|
sensors: _.sensors,
|
|
6357
6357
|
collisionDetection: xl,
|
|
@@ -6361,7 +6361,7 @@ const xl = (e) => {
|
|
|
6361
6361
|
onDragEnd: _.onDragEnd,
|
|
6362
6362
|
onDragCancel: _.onDragCancel,
|
|
6363
6363
|
children: [
|
|
6364
|
-
|
|
6364
|
+
J(p),
|
|
6365
6365
|
/* @__PURE__ */ f(ml, { dropAnimation: null, children: te ? /* @__PURE__ */ f(
|
|
6366
6366
|
Sl,
|
|
6367
6367
|
{
|
|
@@ -6372,7 +6372,7 @@ const xl = (e) => {
|
|
|
6372
6372
|
) : null })
|
|
6373
6373
|
]
|
|
6374
6374
|
}
|
|
6375
|
-
) :
|
|
6375
|
+
) : Y(p) : /* @__PURE__ */ f(
|
|
6376
6376
|
"div",
|
|
6377
6377
|
{
|
|
6378
6378
|
style: {
|
|
@@ -6586,7 +6586,7 @@ class mc {
|
|
|
6586
6586
|
for (const t of [...this.listeners]) t();
|
|
6587
6587
|
}
|
|
6588
6588
|
}
|
|
6589
|
-
const Vo =
|
|
6589
|
+
const Vo = Je(null);
|
|
6590
6590
|
function or(e) {
|
|
6591
6591
|
const t = Be(Vo);
|
|
6592
6592
|
if (!t)
|
|
@@ -6605,7 +6605,7 @@ function ir(e) {
|
|
|
6605
6605
|
);
|
|
6606
6606
|
}
|
|
6607
6607
|
function rn(e, t) {
|
|
6608
|
-
const n = Be(Vo), r = (n == null ? void 0 : n.registry) ?? null, o = Pr(), i = t == null ? void 0 : t.mockupId, s = t == null ? void 0 : t.floatingToolbar, a =
|
|
6608
|
+
const n = Be(Vo), r = (n == null ? void 0 : n.registry) ?? null, o = Pr(), i = t == null ? void 0 : t.mockupId, s = t == null ? void 0 : t.floatingToolbar, a = X(
|
|
6609
6609
|
() => ({
|
|
6610
6610
|
...i !== void 0 ? { mockupId: i } : {},
|
|
6611
6611
|
...s !== void 0 ? { floatingToolbar: s } : {}
|
|
@@ -6730,7 +6730,7 @@ const Uo = ({
|
|
|
6730
6730
|
const u = V(null), d = V(null), h = V(null), [p, k] = B({}), [y, g] = B(!1), m = (M) => {
|
|
6731
6731
|
M.stopPropagation(), !n && a && bs.protectNextClick(), r(!n);
|
|
6732
6732
|
};
|
|
6733
|
-
|
|
6733
|
+
q(() => {
|
|
6734
6734
|
if (!n) return;
|
|
6735
6735
|
let M = () => {
|
|
6736
6736
|
};
|
|
@@ -6745,7 +6745,7 @@ const Uo = ({
|
|
|
6745
6745
|
return () => {
|
|
6746
6746
|
clearTimeout(L), M();
|
|
6747
6747
|
};
|
|
6748
|
-
}, [n, r]),
|
|
6748
|
+
}, [n, r]), q(() => {
|
|
6749
6749
|
if (!n) return;
|
|
6750
6750
|
const M = (L) => {
|
|
6751
6751
|
var I;
|
|
@@ -6758,9 +6758,9 @@ const Uo = ({
|
|
|
6758
6758
|
}
|
|
6759
6759
|
};
|
|
6760
6760
|
return document.addEventListener("keydown", M), () => document.removeEventListener("keydown", M);
|
|
6761
|
-
}, [n, r]),
|
|
6761
|
+
}, [n, r]), q(() => {
|
|
6762
6762
|
n || g(!1);
|
|
6763
|
-
}, [n]),
|
|
6763
|
+
}, [n]), q(() => {
|
|
6764
6764
|
if (!n || !d.current || !h.current) return;
|
|
6765
6765
|
requestAnimationFrame(() => {
|
|
6766
6766
|
const L = d.current, I = h.current;
|
|
@@ -7051,7 +7051,7 @@ const Rl = ({
|
|
|
7051
7051
|
var E;
|
|
7052
7052
|
const { get: a } = Hr(), [l, c] = B(!1), [u, d] = B(!1), [h, p] = B(!1), k = V(null), y = async () => {
|
|
7053
7053
|
try {
|
|
7054
|
-
const { ExportManager: v } = await import("./ExportManager-
|
|
7054
|
+
const { ExportManager: v } = await import("./ExportManager-BbBfO22S.js").then((T) => T.Z), { artboardManager: D, elements: w } = a(), A = D.getAllArtboards();
|
|
7055
7055
|
v.exportToJSON(A, w, D), c(!1);
|
|
7056
7056
|
} catch (v) {
|
|
7057
7057
|
wn.error("Failed to save workspace:", v), alert("Failed to save workspace. Please try again.");
|
|
@@ -7105,7 +7105,7 @@ This will replace your current workspace. Continue?`
|
|
|
7105
7105
|
return;
|
|
7106
7106
|
}
|
|
7107
7107
|
try {
|
|
7108
|
-
const { ExportManager: T } = await import("./ExportManager-
|
|
7108
|
+
const { ExportManager: T } = await import("./ExportManager-BbBfO22S.js").then((O) => O.Z);
|
|
7109
7109
|
await T.exportArtboardToImage(A, D, w.current, {
|
|
7110
7110
|
format: "png",
|
|
7111
7111
|
scale: 2,
|
|
@@ -7131,8 +7131,8 @@ This will replace your current workspace. Continue?`
|
|
|
7131
7131
|
/* @__PURE__ */ f(
|
|
7132
7132
|
Uo,
|
|
7133
7133
|
{
|
|
7134
|
-
trigger: /* @__PURE__ */ j(
|
|
7135
|
-
/* @__PURE__ */ f(
|
|
7134
|
+
trigger: /* @__PURE__ */ j(qn, { delayDuration: 0, children: [
|
|
7135
|
+
/* @__PURE__ */ f(Xt, { asChild: !0, children: /* @__PURE__ */ f(
|
|
7136
7136
|
st,
|
|
7137
7137
|
{
|
|
7138
7138
|
variant: "ghost",
|
|
@@ -7156,7 +7156,7 @@ This will replace your current workspace. Continue?`
|
|
|
7156
7156
|
onMouseEnter: () => d(!0),
|
|
7157
7157
|
onMouseLeave: () => d(!1),
|
|
7158
7158
|
children: [
|
|
7159
|
-
/* @__PURE__ */ f(
|
|
7159
|
+
/* @__PURE__ */ f(Xe, { icon: /* @__PURE__ */ f($, { icon: G.plus, className: "sc:size-[18px]" }), label: "Add Element" }),
|
|
7160
7160
|
u && /* @__PURE__ */ f(
|
|
7161
7161
|
"div",
|
|
7162
7162
|
{
|
|
@@ -7167,7 +7167,7 @@ This will replace your current workspace. Continue?`
|
|
|
7167
7167
|
zIndex: "var(--sc-z-sticky)"
|
|
7168
7168
|
},
|
|
7169
7169
|
children: /* @__PURE__ */ f(jn, { minWidth: "180px", children: I.map((v) => /* @__PURE__ */ f(
|
|
7170
|
-
|
|
7170
|
+
Xe,
|
|
7171
7171
|
{
|
|
7172
7172
|
icon: v.icon,
|
|
7173
7173
|
label: v.label,
|
|
@@ -7181,10 +7181,10 @@ This will replace your current workspace. Continue?`
|
|
|
7181
7181
|
}
|
|
7182
7182
|
),
|
|
7183
7183
|
/* @__PURE__ */ f(b, {}),
|
|
7184
|
-
/* @__PURE__ */ f(
|
|
7185
|
-
/* @__PURE__ */ f(
|
|
7184
|
+
/* @__PURE__ */ f(Xe, { icon: /* @__PURE__ */ f($, { icon: G.save, className: "sc:size-[18px]" }), label: "Save", onClick: y }),
|
|
7185
|
+
/* @__PURE__ */ f(Xe, { icon: /* @__PURE__ */ f($, { icon: G.folderOpen, className: "sc:size-[18px]" }), label: "Open", onClick: g }),
|
|
7186
7186
|
/* @__PURE__ */ f(
|
|
7187
|
-
|
|
7187
|
+
Xe,
|
|
7188
7188
|
{
|
|
7189
7189
|
icon: /* @__PURE__ */ f($, { icon: G.download, className: "sc:size-[18px]" }),
|
|
7190
7190
|
label: "Export Image",
|
|
@@ -7195,7 +7195,7 @@ This will replace your current workspace. Continue?`
|
|
|
7195
7195
|
t && /* @__PURE__ */ j(an, { children: [
|
|
7196
7196
|
/* @__PURE__ */ f(b, {}),
|
|
7197
7197
|
/* @__PURE__ */ f(
|
|
7198
|
-
|
|
7198
|
+
Xe,
|
|
7199
7199
|
{
|
|
7200
7200
|
icon: /* @__PURE__ */ f($, { icon: G.layers, className: "sc:size-[18px]" }),
|
|
7201
7201
|
label: `${e ? "Hide" : "Show"} Layers`,
|
|
@@ -7238,10 +7238,10 @@ function Wo({
|
|
|
7238
7238
|
onOpenChange: n
|
|
7239
7239
|
}) {
|
|
7240
7240
|
const r = or(e), [o, i] = B(null);
|
|
7241
|
-
return
|
|
7241
|
+
return q(() => {
|
|
7242
7242
|
if (!t || o) return;
|
|
7243
7243
|
let s = !1;
|
|
7244
|
-
return import("./ImagePanel-
|
|
7244
|
+
return import("./ImagePanel-BaX0UE-L.js").then(
|
|
7245
7245
|
(a) => {
|
|
7246
7246
|
s || i(() => a.ImagePanel);
|
|
7247
7247
|
},
|
|
@@ -7321,8 +7321,8 @@ function xc({ className: e, style: t }) {
|
|
|
7321
7321
|
/* @__PURE__ */ f(
|
|
7322
7322
|
Uo,
|
|
7323
7323
|
{
|
|
7324
|
-
trigger: /* @__PURE__ */ j(
|
|
7325
|
-
/* @__PURE__ */ f(
|
|
7324
|
+
trigger: /* @__PURE__ */ j(qn, { delayDuration: 0, children: [
|
|
7325
|
+
/* @__PURE__ */ f(Xt, { asChild: !0, children: /* @__PURE__ */ f(st, { variant: "ghost", size: "icon", "aria-label": "Add element", children: /* @__PURE__ */ f($, { icon: G.plus, className: "sc:size-6" }) }) }),
|
|
7326
7326
|
/* @__PURE__ */ f(At, { children: /* @__PURE__ */ f("p", { children: "Add element" }) })
|
|
7327
7327
|
] }),
|
|
7328
7328
|
isOpen: r,
|
|
@@ -7330,7 +7330,7 @@ function xc({ className: e, style: t }) {
|
|
|
7330
7330
|
position: "bottom",
|
|
7331
7331
|
align: "start",
|
|
7332
7332
|
children: /* @__PURE__ */ f(jn, { minWidth: "180px", children: Go.map((d) => /* @__PURE__ */ f(
|
|
7333
|
-
|
|
7333
|
+
Xe,
|
|
7334
7334
|
{
|
|
7335
7335
|
icon: d.icon,
|
|
7336
7336
|
label: d.label,
|
|
@@ -7365,7 +7365,7 @@ function kc() {
|
|
|
7365
7365
|
artboardManager: t,
|
|
7366
7366
|
elements: n,
|
|
7367
7367
|
canvasRef: r
|
|
7368
|
-
} =
|
|
7368
|
+
} = Yt(), [o, i] = B(!1), [s, a] = B(!1), [l, c] = B([]), [u, d] = B({}), [h, p] = B({
|
|
7369
7369
|
totalExports: 0,
|
|
7370
7370
|
avgExportTime: 0,
|
|
7371
7371
|
isWorkerActive: !1
|
|
@@ -7385,7 +7385,7 @@ function kc() {
|
|
|
7385
7385
|
};
|
|
7386
7386
|
c((T) => [...T, A]);
|
|
7387
7387
|
try {
|
|
7388
|
-
const T = Date.now(), O = M.current, W = t.getElementsOnArtboard(v), ae = O.filter((
|
|
7388
|
+
const T = Date.now(), O = M.current, W = t.getElementsOnArtboard(v), ae = O.filter((Y) => W.includes(Y.id)), _ = await dn.exportArtboardToDataURL(
|
|
7389
7389
|
w,
|
|
7390
7390
|
ae,
|
|
7391
7391
|
r.current,
|
|
@@ -7395,12 +7395,12 @@ function kc() {
|
|
|
7395
7395
|
transparentBackground: D.transparentBackground ?? !0,
|
|
7396
7396
|
...D
|
|
7397
7397
|
}
|
|
7398
|
-
),
|
|
7399
|
-
return c((
|
|
7398
|
+
), J = Date.now() - T;
|
|
7399
|
+
return c((Y) => Y.map(
|
|
7400
7400
|
(te) => te.artboardId === v ? { ...te, status: "complete", progress: 100, dataUrl: _, timestamp: Date.now() } : te
|
|
7401
|
-
)), d((
|
|
7402
|
-
totalExports:
|
|
7403
|
-
avgExportTime: (
|
|
7401
|
+
)), d((Y) => ({ ...Y, [v]: _ })), p((Y) => ({
|
|
7402
|
+
totalExports: Y.totalExports + 1,
|
|
7403
|
+
avgExportTime: (Y.avgExportTime * Y.totalExports + J) / (Y.totalExports + 1),
|
|
7404
7404
|
isWorkerActive: g
|
|
7405
7405
|
})), _;
|
|
7406
7406
|
} catch (T) {
|
|
@@ -7473,7 +7473,7 @@ function kc() {
|
|
|
7473
7473
|
scale: T = 3,
|
|
7474
7474
|
format: O = "png",
|
|
7475
7475
|
onChange: W
|
|
7476
|
-
} = v, ae = w ? e.filter((te) => w.includes(te.id)) : e, _ = () => k.current === D,
|
|
7476
|
+
} = v, ae = w ? e.filter((te) => w.includes(te.id)) : e, _ = () => k.current === D, J = async () => {
|
|
7477
7477
|
try {
|
|
7478
7478
|
const te = ae.map(async (ie) => {
|
|
7479
7479
|
const de = await m(ie.id, {
|
|
@@ -7491,11 +7491,11 @@ function kc() {
|
|
|
7491
7491
|
}
|
|
7492
7492
|
};
|
|
7493
7493
|
(async () => {
|
|
7494
|
-
for (await
|
|
7495
|
-
await
|
|
7494
|
+
for (await J(); _() && (await new Promise((te) => setTimeout(te, A)), !!_()); )
|
|
7495
|
+
await J();
|
|
7496
7496
|
})();
|
|
7497
7497
|
}, [e, m]);
|
|
7498
|
-
return
|
|
7498
|
+
return q(() => () => {
|
|
7499
7499
|
b();
|
|
7500
7500
|
}, [b]), {
|
|
7501
7501
|
exportArtboard: m,
|
|
@@ -7512,7 +7512,7 @@ function kc() {
|
|
|
7512
7512
|
workerStats: h
|
|
7513
7513
|
};
|
|
7514
7514
|
}
|
|
7515
|
-
async function
|
|
7515
|
+
async function qo(e, t) {
|
|
7516
7516
|
try {
|
|
7517
7517
|
const n = await e.json();
|
|
7518
7518
|
if (n && typeof n == "object") {
|
|
@@ -7536,7 +7536,7 @@ function $l(e) {
|
|
|
7536
7536
|
credentials: "same-origin"
|
|
7537
7537
|
});
|
|
7538
7538
|
if (!s.ok)
|
|
7539
|
-
throw new Error(await
|
|
7539
|
+
throw new Error(await qo(s, `Image search failed (${s.status})`));
|
|
7540
7540
|
return await s.json();
|
|
7541
7541
|
},
|
|
7542
7542
|
trackSelect(t) {
|
|
@@ -7565,7 +7565,7 @@ function Hl(e) {
|
|
|
7565
7565
|
body: JSON.stringify({ prompt: t, width: n, height: r, numberResults: o })
|
|
7566
7566
|
});
|
|
7567
7567
|
if (!i.ok)
|
|
7568
|
-
throw new Error(await
|
|
7568
|
+
throw new Error(await qo(i, `Image generation failed (${i.status})`));
|
|
7569
7569
|
const s = await i.json();
|
|
7570
7570
|
return { images: s.images ?? (s.imageUrl ? [{ imageUrl: s.imageUrl }] : []) };
|
|
7571
7571
|
}
|
|
@@ -7610,16 +7610,16 @@ function Ul(e) {
|
|
|
7610
7610
|
return o.imageUrl;
|
|
7611
7611
|
};
|
|
7612
7612
|
}
|
|
7613
|
-
const
|
|
7613
|
+
const Yo = {}, Ko = Je(Yo);
|
|
7614
7614
|
function Cc({ services: e, children: t }) {
|
|
7615
|
-
const n =
|
|
7615
|
+
const n = X(() => e ? {
|
|
7616
7616
|
imageSearch: e.imageSearch ?? (e.imageSearchUrl ? $l(e.imageSearchUrl) : void 0),
|
|
7617
7617
|
generate: e.generate ?? (e.generateUrl ? Hl(e.generateUrl) : void 0),
|
|
7618
7618
|
vectors: e.vectors,
|
|
7619
7619
|
removeBackground: e.removeBackground ?? (e.bgRemoveUrl ? Vl(e.bgRemoveUrl) : void 0),
|
|
7620
7620
|
ingestImage: e.ingestImage ?? (e.ingestImageUrl ? Ul(e.ingestImageUrl) : void 0),
|
|
7621
7621
|
onFontUpload: e.onFontUpload
|
|
7622
|
-
} :
|
|
7622
|
+
} : Yo, [
|
|
7623
7623
|
e == null ? void 0 : e.imageSearch,
|
|
7624
7624
|
e == null ? void 0 : e.imageSearchUrl,
|
|
7625
7625
|
e == null ? void 0 : e.generate,
|
|
@@ -7873,23 +7873,23 @@ class Wl {
|
|
|
7873
7873
|
}
|
|
7874
7874
|
}
|
|
7875
7875
|
const Ec = new Wl();
|
|
7876
|
-
function
|
|
7876
|
+
function Xo(e) {
|
|
7877
7877
|
return e instanceof ui;
|
|
7878
7878
|
}
|
|
7879
|
-
function
|
|
7879
|
+
function ql(e) {
|
|
7880
7880
|
return e instanceof li;
|
|
7881
7881
|
}
|
|
7882
|
-
function
|
|
7882
|
+
function Yl(e) {
|
|
7883
7883
|
return e instanceof di;
|
|
7884
7884
|
}
|
|
7885
7885
|
function Kl(e) {
|
|
7886
7886
|
return e instanceof Ie;
|
|
7887
7887
|
}
|
|
7888
|
-
function
|
|
7888
|
+
function Xl(e) {
|
|
7889
7889
|
return e instanceof ci;
|
|
7890
7890
|
}
|
|
7891
|
-
function
|
|
7892
|
-
return
|
|
7891
|
+
function Jl(e) {
|
|
7892
|
+
return Xo(e) ? "text" : ql(e) ? "image" : Yl(e) ? "shape" : Kl(e) ? "group" : Xl(e) ? "path" : null;
|
|
7893
7893
|
}
|
|
7894
7894
|
const mt = ["x", "y", "rotation", "opacity", "name", "visible", "locked"], Ql = ["text", "fontSize", "color", "fontFamily", "bold", "italic", "textAlign"], Zl = ["fillColor", "fill", "width", "height"], ec = ["imageUrl", "width", "height", "adjustments"], tc = {
|
|
7895
7895
|
text: [...mt, ...Ql],
|
|
@@ -7931,7 +7931,7 @@ function nc(e, t) {
|
|
|
7931
7931
|
);
|
|
7932
7932
|
}
|
|
7933
7933
|
function rc(e, t) {
|
|
7934
|
-
const n =
|
|
7934
|
+
const n = Jl(e);
|
|
7935
7935
|
if (!n)
|
|
7936
7936
|
throw He("target is not a patchable editor element.", { kind: null });
|
|
7937
7937
|
const r = tc[n];
|
|
@@ -8014,7 +8014,7 @@ function rc(e, t) {
|
|
|
8014
8014
|
}
|
|
8015
8015
|
function oc(e, t) {
|
|
8016
8016
|
let n = !1;
|
|
8017
|
-
if (t.x !== void 0 && (e.x = t.x), t.y !== void 0 && (e.y = t.y), t.rotation !== void 0 && e.setRotation(t.rotation), t.opacity !== void 0 && (e.opacity = t.opacity), t.name !== void 0 && (e.name = t.name), t.visible !== void 0 && (e.visible = t.visible), t.locked !== void 0 && (e.locked = t.locked),
|
|
8017
|
+
if (t.x !== void 0 && (e.x = t.x), t.y !== void 0 && (e.y = t.y), t.rotation !== void 0 && e.setRotation(t.rotation), t.opacity !== void 0 && (e.opacity = t.opacity), t.name !== void 0 && (e.name = t.name), t.visible !== void 0 && (e.visible = t.visible), t.locked !== void 0 && (e.locked = t.locked), Xo(e))
|
|
8018
8018
|
return t.text !== void 0 && e.setText(t.text), t.fontSize !== void 0 && e.setFontSize(t.fontSize), t.color !== void 0 && e.setColor(t.color), t.fontFamily !== void 0 && t.fontFamily !== e.fontFamily && (hi.clearCache(e.fontFamily), e.fontFamily = t.fontFamily), t.bold !== void 0 && (e.bold = t.bold), t.italic !== void 0 && (e.italic = t.italic), t.textAlign !== void 0 && (e.textAlign = t.textAlign), { needsImageLoad: n };
|
|
8019
8019
|
const r = e;
|
|
8020
8020
|
if (t.width !== void 0 && (r.transformData.width = t.width), t.height !== void 0 && (r.transformData.height = t.height), t.fillColor !== void 0) {
|
|
@@ -8033,7 +8033,7 @@ function oc(e, t) {
|
|
|
8033
8033
|
}
|
|
8034
8034
|
const jr = Qe("useCommands");
|
|
8035
8035
|
function Ac() {
|
|
8036
|
-
const e =
|
|
8036
|
+
const e = Yt(), {
|
|
8037
8037
|
undo: t,
|
|
8038
8038
|
redo: n,
|
|
8039
8039
|
canUndo: r,
|
|
@@ -8062,10 +8062,10 @@ function Ac() {
|
|
|
8062
8062
|
O instanceof sr && O.elementId === A.id && O.newElement && (A = O.newElement), rc(A, v);
|
|
8063
8063
|
const W = A.clone(), { needsImageLoad: ae } = oc(W, v);
|
|
8064
8064
|
if (ae) {
|
|
8065
|
-
const
|
|
8066
|
-
|
|
8067
|
-
S.current(A,
|
|
8068
|
-
}, M.current = null,
|
|
8065
|
+
const J = W;
|
|
8066
|
+
J.onLoadCallback = (Y) => {
|
|
8067
|
+
S.current(A, Y);
|
|
8068
|
+
}, M.current = null, J.loadImage(J.imageUrl);
|
|
8069
8069
|
return;
|
|
8070
8070
|
}
|
|
8071
8071
|
const _ = M.current;
|
|
@@ -8074,8 +8074,8 @@ function Ac() {
|
|
|
8074
8074
|
return;
|
|
8075
8075
|
}
|
|
8076
8076
|
if (S.current(A, W), D != null && D.coalesce && T) {
|
|
8077
|
-
const
|
|
8078
|
-
M.current =
|
|
8077
|
+
const J = g.peekArtboard(T);
|
|
8078
|
+
M.current = J instanceof sr ? { elementId: A.id, command: J } : null;
|
|
8079
8079
|
} else
|
|
8080
8080
|
M.current = null;
|
|
8081
8081
|
},
|
|
@@ -8110,58 +8110,58 @@ function Ac() {
|
|
|
8110
8110
|
};
|
|
8111
8111
|
}
|
|
8112
8112
|
export {
|
|
8113
|
-
|
|
8113
|
+
ir as A,
|
|
8114
8114
|
st as B,
|
|
8115
8115
|
Cc as C,
|
|
8116
|
-
|
|
8117
|
-
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8116
|
+
Rl as D,
|
|
8117
|
+
Vo as E,
|
|
8118
|
+
xc as F,
|
|
8119
|
+
bc as G,
|
|
8120
|
+
wc as H,
|
|
8121
8121
|
$ as I,
|
|
8122
|
-
|
|
8123
|
-
|
|
8122
|
+
yc as J,
|
|
8123
|
+
Jl as K,
|
|
8124
8124
|
El as L,
|
|
8125
8125
|
Fl as M,
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
|
|
8126
|
+
Kl as N,
|
|
8127
|
+
ql as O,
|
|
8128
|
+
Xl as P,
|
|
8129
|
+
Yl as Q,
|
|
8130
|
+
Xo as R,
|
|
8131
8131
|
_o as S,
|
|
8132
|
-
|
|
8132
|
+
qn as T,
|
|
8133
8133
|
Ec as U,
|
|
8134
|
-
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8138
|
-
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
|
|
8142
|
-
|
|
8143
|
-
|
|
8134
|
+
ho as V,
|
|
8135
|
+
As as W,
|
|
8136
|
+
Rn as X,
|
|
8137
|
+
mo as Y,
|
|
8138
|
+
vo as Z,
|
|
8139
|
+
yo as _,
|
|
8140
|
+
Sc as a,
|
|
8141
|
+
js as b,
|
|
8142
|
+
Re as c,
|
|
8143
|
+
Ul as d,
|
|
8144
8144
|
pc as e,
|
|
8145
|
-
|
|
8146
|
-
|
|
8147
|
-
|
|
8148
|
-
|
|
8149
|
-
|
|
8150
|
-
|
|
8151
|
-
|
|
8152
|
-
|
|
8153
|
-
|
|
8154
|
-
|
|
8155
|
-
|
|
8156
|
-
|
|
8157
|
-
|
|
8158
|
-
|
|
8159
|
-
|
|
8160
|
-
|
|
8161
|
-
|
|
8162
|
-
|
|
8163
|
-
|
|
8164
|
-
|
|
8165
|
-
|
|
8145
|
+
Vl as f,
|
|
8146
|
+
Hl as g,
|
|
8147
|
+
$l as h,
|
|
8148
|
+
G as i,
|
|
8149
|
+
Ac as j,
|
|
8150
|
+
kc as k,
|
|
8151
|
+
xi as l,
|
|
8152
|
+
In as m,
|
|
8153
|
+
mc as n,
|
|
8154
|
+
vc as o,
|
|
8155
|
+
Uo as p,
|
|
8156
|
+
Xt as q,
|
|
8157
|
+
At as r,
|
|
8158
|
+
bs as s,
|
|
8159
|
+
jn as t,
|
|
8160
|
+
xs as u,
|
|
8161
|
+
Xe as v,
|
|
8162
|
+
go as w,
|
|
8163
|
+
ks as x,
|
|
8164
|
+
or as y,
|
|
8165
|
+
rn as z
|
|
8166
8166
|
};
|
|
8167
|
-
//# sourceMappingURL=useCommands-
|
|
8167
|
+
//# sourceMappingURL=useCommands-x8J7_Mzy.js.map
|