@snowcone-app/canvas 0.39.2 → 0.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ContextualToolbars-C62As-xY.js → ContextualToolbars-_5zqlcSw.js} +324 -319
- package/dist/{ContextualToolbars-C62As-xY.js.map → ContextualToolbars-_5zqlcSw.js.map} +1 -1
- package/dist/{EditorCanvasImpl-DIiRhNbF.js → EditorCanvasImpl-CBl27o5h.js} +4 -4
- package/dist/{EditorCanvasImpl-DIiRhNbF.js.map → EditorCanvasImpl-CBl27o5h.js.map} +1 -1
- package/dist/{SnowconeCanvas-B9HtP9gI.js → SnowconeCanvas-uUJy5mxC.js} +3 -3
- package/dist/{SnowconeCanvas-B9HtP9gI.js.map → SnowconeCanvas-uUJy5mxC.js.map} +1 -1
- package/dist/advanced.mjs +4 -4
- package/dist/{embed-BLwf1X5u.js → embed-BY6gMPTK.js} +3 -3
- package/dist/{embed-BLwf1X5u.js.map → embed-BY6gMPTK.js.map} +1 -1
- package/dist/embed.mjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/utils/documentColors.d.ts +10 -2
- package/dist/{validation-Dh9sVEb9.js → validation-BMB6_hp4.js} +4 -4
- package/dist/{validation-Dh9sVEb9.js.map → validation-BMB6_hp4.js.map} +1 -1
- package/example/package.json +1 -1
- package/package.json +3 -3
|
@@ -278,21 +278,21 @@ const nc = oe.forwardRef(
|
|
|
278
278
|
...b
|
|
279
279
|
}, m) => {
|
|
280
280
|
var q;
|
|
281
|
-
const w = s !== void 0 ? Array.isArray(s) ? s : [s] : void 0, [y,
|
|
281
|
+
const w = s !== void 0 ? Array.isArray(s) ? s : [s] : void 0, [y, x] = oe.useState(w ?? [r]), g = oe.useRef(!1), N = oe.useRef(null), v = oe.useCallback((B) => {
|
|
282
282
|
g.current && B.preventDefault();
|
|
283
283
|
}, []), M = (B) => {
|
|
284
|
-
g.current = !0,
|
|
285
|
-
},
|
|
284
|
+
g.current = !0, x(B), n == null || n(B);
|
|
285
|
+
}, I = (B) => {
|
|
286
286
|
g.current = !1, o == null || o(B);
|
|
287
287
|
}, D = oe.useCallback(() => {
|
|
288
|
-
N.current || (N.current =
|
|
289
|
-
}, [
|
|
288
|
+
N.current || (N.current = v, document.addEventListener("touchmove", v, { passive: !1 }));
|
|
289
|
+
}, [v]), k = oe.useCallback(() => {
|
|
290
290
|
g.current = !1, N.current && (document.removeEventListener("touchmove", N.current), N.current = null);
|
|
291
291
|
}, []);
|
|
292
292
|
oe.useEffect(() => () => {
|
|
293
293
|
N.current && document.removeEventListener("touchmove", N.current);
|
|
294
294
|
}, []);
|
|
295
|
-
const
|
|
295
|
+
const E = oe.Children.count(f) > 0, L = (w == null ? void 0 : w.length) ?? ((q = b.defaultValue) == null ? void 0 : q.length) ?? 1, z = oe.useMemo(
|
|
296
296
|
() => ({
|
|
297
297
|
values: w ?? y,
|
|
298
298
|
min: r,
|
|
@@ -307,7 +307,7 @@ const nc = oe.forwardRef(
|
|
|
307
307
|
className: Se("sc:relative sc:flex sc:w-full sc:touch-none sc:select-none sc:items-center", e),
|
|
308
308
|
value: w,
|
|
309
309
|
onValueChange: M,
|
|
310
|
-
onValueCommit:
|
|
310
|
+
onValueCommit: I,
|
|
311
311
|
onPointerDown: D,
|
|
312
312
|
onPointerUp: k,
|
|
313
313
|
onPointerCancel: k,
|
|
@@ -316,7 +316,7 @@ const nc = oe.forwardRef(
|
|
|
316
316
|
max: c,
|
|
317
317
|
step: i,
|
|
318
318
|
...b,
|
|
319
|
-
children:
|
|
319
|
+
children: E ? f : /* @__PURE__ */ h(Ve, { children: [
|
|
320
320
|
/* @__PURE__ */ t(dt.Track, { className: "sc:relative sc:h-2 sc:w-full sc:grow sc:overflow-hidden sc:rounded-full sc:bg-muted", children: /* @__PURE__ */ t(dt.Range, { className: "sc:absolute sc:h-full sc:bg-primary" }) }),
|
|
321
321
|
Array.from({ length: L }).map((B, U) => /* @__PURE__ */ t(
|
|
322
322
|
dt.Thumb,
|
|
@@ -379,8 +379,8 @@ const Xs = ({
|
|
|
379
379
|
y: w.touches[0].clientY
|
|
380
380
|
};
|
|
381
381
|
}, m = (w) => {
|
|
382
|
-
const y = Math.abs(w.touches[0].clientX - i.current.x),
|
|
383
|
-
y > 10 && y >
|
|
382
|
+
const y = Math.abs(w.touches[0].clientX - i.current.x), x = Math.abs(w.touches[0].clientY - i.current.y);
|
|
383
|
+
y > 10 && y > x && w.preventDefault();
|
|
384
384
|
};
|
|
385
385
|
return f.addEventListener("touchstart", b, { passive: !0 }), f.addEventListener("touchmove", m, { passive: !1 }), () => {
|
|
386
386
|
f.removeEventListener("touchstart", b), f.removeEventListener("touchmove", m);
|
|
@@ -447,7 +447,7 @@ const be = ({
|
|
|
447
447
|
className: w,
|
|
448
448
|
variant: y = "inline"
|
|
449
449
|
}) => {
|
|
450
|
-
const
|
|
450
|
+
const x = Math.round(s);
|
|
451
451
|
return y === "stacked" ? /* @__PURE__ */ h("div", { className: St("sc:flex sc:flex-col sc:gap-2.5 sc:md:gap-1.5", w), children: [
|
|
452
452
|
/* @__PURE__ */ h("div", { className: "sc:flex sc:items-center sc:justify-between", children: [
|
|
453
453
|
/* @__PURE__ */ t("span", { className: "sc:text-foreground/60 sc:text-base sc:md:text-xs", children: e }),
|
|
@@ -455,7 +455,7 @@ const be = ({
|
|
|
455
455
|
"input",
|
|
456
456
|
{
|
|
457
457
|
type: "number",
|
|
458
|
-
value:
|
|
458
|
+
value: x,
|
|
459
459
|
onChange: (g) => n(Math.max(r, Math.min(c, Number(g.target.value)))),
|
|
460
460
|
min: r,
|
|
461
461
|
max: c,
|
|
@@ -486,7 +486,7 @@ const be = ({
|
|
|
486
486
|
"input",
|
|
487
487
|
{
|
|
488
488
|
type: "number",
|
|
489
|
-
value:
|
|
489
|
+
value: x,
|
|
490
490
|
onChange: (g) => n(Math.max(r, Math.min(c, Number(g.target.value)))),
|
|
491
491
|
min: r,
|
|
492
492
|
max: c,
|
|
@@ -511,7 +511,7 @@ const be = ({
|
|
|
511
511
|
}
|
|
512
512
|
) }),
|
|
513
513
|
/* @__PURE__ */ h("span", { className: "sc:text-foreground sc:text-base sc:md:text-[13px] sc:min-w-[44px] sc:md:min-w-[32px] sc:text-right", children: [
|
|
514
|
-
|
|
514
|
+
x,
|
|
515
515
|
f
|
|
516
516
|
] })
|
|
517
517
|
] });
|
|
@@ -529,16 +529,16 @@ const be = ({
|
|
|
529
529
|
(y) => {
|
|
530
530
|
if (y.key !== "ArrowLeft" && y.key !== "ArrowRight") return;
|
|
531
531
|
y.preventDefault(), y.stopPropagation();
|
|
532
|
-
const
|
|
533
|
-
if (!
|
|
534
|
-
const g = Array.from(
|
|
535
|
-
let
|
|
536
|
-
|
|
532
|
+
const x = i.current;
|
|
533
|
+
if (!x) return;
|
|
534
|
+
const g = Array.from(x.querySelectorAll("button[data-preset-id]")), N = document.activeElement;
|
|
535
|
+
let v = g.indexOf(N);
|
|
536
|
+
v === -1 && (v = g.findIndex((k) => k.getAttribute("aria-selected") === "true"), v === -1 && (v = 0));
|
|
537
537
|
let M;
|
|
538
|
-
y.key === "ArrowRight" ? M =
|
|
539
|
-
const
|
|
540
|
-
|
|
541
|
-
const D =
|
|
538
|
+
y.key === "ArrowRight" ? M = v < g.length - 1 ? v + 1 : 0 : M = v > 0 ? v - 1 : g.length - 1;
|
|
539
|
+
const I = g[M];
|
|
540
|
+
I.focus(), f(I);
|
|
541
|
+
const D = I.getAttribute("data-preset-id");
|
|
542
542
|
D !== null && n(D);
|
|
543
543
|
},
|
|
544
544
|
[f, n]
|
|
@@ -567,8 +567,8 @@ const be = ({
|
|
|
567
567
|
children: /* @__PURE__ */ t("span", { className: "sc:text-xs sc:text-muted-foreground", children: "Off" })
|
|
568
568
|
}
|
|
569
569
|
),
|
|
570
|
-
e.map((y,
|
|
571
|
-
const g = s === y.id, N = g || !o && !w &&
|
|
570
|
+
e.map((y, x) => {
|
|
571
|
+
const g = s === y.id, N = g || !o && !w && x === 0;
|
|
572
572
|
return /* @__PURE__ */ t(
|
|
573
573
|
"button",
|
|
574
574
|
{
|
|
@@ -636,36 +636,36 @@ var qt = function(e, s, n) {
|
|
|
636
636
|
var s = e.onMove, n = e.onKey, o = e.onEnd, r = oc(e, ["onMove", "onKey", "onEnd"]), c = V(null), i = Vt(s), f = Vt(n), b = Vt(o), m = V(null), w = V(!1), y = He(function() {
|
|
637
637
|
var M = function(k) {
|
|
638
638
|
wo(k), (Yt(k) ? k.touches.length > 0 : k.buttons > 0) && c.current ? i(Co(c.current, k, m.current)) : (D(!1), b());
|
|
639
|
-
},
|
|
639
|
+
}, I = function() {
|
|
640
640
|
D(!1), b();
|
|
641
641
|
};
|
|
642
642
|
function D(k) {
|
|
643
|
-
var
|
|
644
|
-
z(
|
|
643
|
+
var E = w.current, L = qs(c.current), z = k ? L.addEventListener : L.removeEventListener;
|
|
644
|
+
z(E ? "touchmove" : "mousemove", M), z(E ? "touchend" : "mouseup", I);
|
|
645
645
|
}
|
|
646
646
|
return [function(k) {
|
|
647
|
-
var
|
|
648
|
-
if (L && (wo(
|
|
647
|
+
var E = k.nativeEvent, L = c.current;
|
|
648
|
+
if (L && (wo(E), !function(q, B) {
|
|
649
649
|
return B && !Yt(q);
|
|
650
|
-
}(
|
|
651
|
-
if (Yt(
|
|
650
|
+
}(E, w.current) && L)) {
|
|
651
|
+
if (Yt(E)) {
|
|
652
652
|
w.current = !0;
|
|
653
|
-
var z =
|
|
653
|
+
var z = E.changedTouches || [];
|
|
654
654
|
z.length && (m.current = z[0].identifier);
|
|
655
655
|
}
|
|
656
|
-
L.focus(), i(Co(L,
|
|
656
|
+
L.focus(), i(Co(L, E, m.current)), D(!0);
|
|
657
657
|
}
|
|
658
658
|
}, function(k) {
|
|
659
|
-
var
|
|
660
|
-
|
|
659
|
+
var E = k.which || k.keyCode;
|
|
660
|
+
E < 37 || E > 40 || (k.preventDefault(), f({ left: E === 39 ? 0.05 : E === 37 ? -0.05 : 0, top: E === 40 ? 0.05 : E === 38 ? -0.05 : 0 }));
|
|
661
661
|
}, function(k) {
|
|
662
|
-
var
|
|
663
|
-
|
|
662
|
+
var E = k.which || k.keyCode;
|
|
663
|
+
E >= 37 && E <= 40 && b();
|
|
664
664
|
}, D];
|
|
665
|
-
}, [f, i, b]),
|
|
665
|
+
}, [f, i, b]), x = y[0], g = y[1], N = y[2], v = y[3];
|
|
666
666
|
return Z(function() {
|
|
667
|
-
return
|
|
668
|
-
}, [
|
|
667
|
+
return v;
|
|
668
|
+
}, [v]), Fe.createElement("div", xs({}, r, { onTouchStart: x, onMouseDown: x, className: "react-colorful__interactive", ref: c, onKeyDown: g, onKeyUp: N, tabIndex: 0, role: "slider" }));
|
|
669
669
|
}), Ps = function(e) {
|
|
670
670
|
return e.filter(Boolean).join(" ");
|
|
671
671
|
}, ac = function(e) {
|
|
@@ -737,10 +737,10 @@ function Pr(e, s, n, o) {
|
|
|
737
737
|
b(function(N) {
|
|
738
738
|
return Object.assign({}, N, g);
|
|
739
739
|
});
|
|
740
|
-
}, []),
|
|
740
|
+
}, []), x = S(function() {
|
|
741
741
|
w.current && (w.current = !1, c(m.current.color));
|
|
742
742
|
}, [c]);
|
|
743
|
-
return [f, y,
|
|
743
|
+
return [f, y, x];
|
|
744
744
|
}
|
|
745
745
|
var ei = typeof window < "u" ? Mo : Z, ti = function() {
|
|
746
746
|
return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : void 0;
|
|
@@ -757,8 +757,8 @@ var ei = typeof window < "u" ? Mo : Z, ti = function() {
|
|
|
757
757
|
}, ni = function(e) {
|
|
758
758
|
var s = e.className, n = e.colorModel, o = e.color, r = o === void 0 ? n.defaultColor : o, c = e.onChange, i = e.onChangeEnd, f = oc(e, ["className", "colorModel", "color", "onChange", "onChangeEnd"]), b = V(null);
|
|
759
759
|
si(b);
|
|
760
|
-
var m = Pr(n, r, c, i), w = m[0], y = m[1],
|
|
761
|
-
return Fe.createElement("div", xs({}, f, { ref: b, className: g }), Fe.createElement(Qr, { hsva: w, onChange: y, onChangeEnd:
|
|
760
|
+
var m = Pr(n, r, c, i), w = m[0], y = m[1], x = m[2], g = Ps(["react-colorful", s]);
|
|
761
|
+
return Fe.createElement("div", xs({}, f, { ref: b, className: g }), Fe.createElement(Qr, { hsva: w, onChange: y, onChangeEnd: x }), Fe.createElement(Zr, { hue: w.h, onChange: y, onChangeEnd: x, className: "react-colorful__last-control" }));
|
|
762
762
|
}, oi = { defaultColor: "000", toHsva: Vr, fromHsva: function(e) {
|
|
763
763
|
return Yr({ h: e.h, s: e.s, v: e.v, a: 1 });
|
|
764
764
|
}, equal: Jr }, ic = function(e) {
|
|
@@ -776,22 +776,22 @@ const Et = Eo(({
|
|
|
776
776
|
onOpenChange: b,
|
|
777
777
|
embedded: m = !1
|
|
778
778
|
}) => {
|
|
779
|
-
const [w, y] = T(!1), [
|
|
779
|
+
const [w, y] = T(!1), [x, g] = T(e), [N, v] = T(e), M = V(0), I = V(null), D = V(!1), k = V(s);
|
|
780
780
|
k.current = s;
|
|
781
|
-
const
|
|
781
|
+
const E = f !== void 0 ? f : w, L = b || y;
|
|
782
782
|
Z(() => {
|
|
783
|
-
!D.current && e !== "transparent" && (g(e),
|
|
783
|
+
!D.current && e !== "transparent" && (g(e), v(e));
|
|
784
784
|
}, [e]);
|
|
785
785
|
const z = (X) => {
|
|
786
|
-
D.current = !0,
|
|
786
|
+
D.current = !0, v(X), g(X);
|
|
787
787
|
const K = Date.now(), Y = K - M.current;
|
|
788
|
-
Y >= 16 ? (k.current({ target: { value: X } }), M.current = K,
|
|
789
|
-
k.current({ target: { value: X } }), M.current = Date.now(),
|
|
788
|
+
Y >= 16 ? (k.current({ target: { value: X } }), M.current = K, I.current && (clearTimeout(I.current), I.current = null)) : (I.current && clearTimeout(I.current), I.current = setTimeout(() => {
|
|
789
|
+
k.current({ target: { value: X } }), M.current = Date.now(), I.current = null, D.current = !1;
|
|
790
790
|
}, 16 - Y));
|
|
791
791
|
}, q = V(N);
|
|
792
792
|
q.current = N, Z(() => {
|
|
793
793
|
const X = () => {
|
|
794
|
-
|
|
794
|
+
I.current && (clearTimeout(I.current), I.current = null, k.current({ target: { value: q.current } })), setTimeout(() => {
|
|
795
795
|
D.current = !1;
|
|
796
796
|
}, 50);
|
|
797
797
|
};
|
|
@@ -799,7 +799,7 @@ const Et = Eo(({
|
|
|
799
799
|
window.removeEventListener("pointerup", X), window.removeEventListener("pointercancel", X);
|
|
800
800
|
};
|
|
801
801
|
}, []), Z(() => () => {
|
|
802
|
-
|
|
802
|
+
I.current && clearTimeout(I.current);
|
|
803
803
|
}, []);
|
|
804
804
|
const B = (X) => {
|
|
805
805
|
const K = X.target.value;
|
|
@@ -847,7 +847,7 @@ const Et = Eo(({
|
|
|
847
847
|
id: "hex-input",
|
|
848
848
|
type: "text",
|
|
849
849
|
className: "sc:w-24 sc:rounded-lg sc:border sc:border-divider sc:bg-field sc:px-2 sc:py-1.5 sc:text-sm sc:text-foreground sc:focus:border-primary sc:focus:outline-none",
|
|
850
|
-
value:
|
|
850
|
+
value: x,
|
|
851
851
|
onChange: B,
|
|
852
852
|
placeholder: "#000000",
|
|
853
853
|
maxLength: 7
|
|
@@ -881,7 +881,7 @@ const Et = Eo(({
|
|
|
881
881
|
)) })
|
|
882
882
|
] })
|
|
883
883
|
] });
|
|
884
|
-
return m ? de : /* @__PURE__ */ h(Qe, { open:
|
|
884
|
+
return m ? de : /* @__PURE__ */ h(Qe, { open: E, onOpenChange: L, children: [
|
|
885
885
|
/* @__PURE__ */ t(Ge, { asChild: !0, children: /* @__PURE__ */ t(
|
|
886
886
|
"button",
|
|
887
887
|
{
|
|
@@ -969,15 +969,15 @@ const ri = ({
|
|
|
969
969
|
removeBackgroundError: m = null,
|
|
970
970
|
onDelete: w,
|
|
971
971
|
cornerRadiusExpanded: y = !1,
|
|
972
|
-
onCornerRadiusToggle:
|
|
972
|
+
onCornerRadiusToggle: x,
|
|
973
973
|
cropExpanded: g = !1,
|
|
974
974
|
onCropToggle: N,
|
|
975
|
-
adjustExpanded:
|
|
975
|
+
adjustExpanded: v = !1,
|
|
976
976
|
onAdjustToggle: M,
|
|
977
|
-
rotationExpanded:
|
|
977
|
+
rotationExpanded: I = !1,
|
|
978
978
|
onRotationToggle: D,
|
|
979
979
|
opacityExpanded: k = !1,
|
|
980
|
-
onOpacityToggle:
|
|
980
|
+
onOpacityToggle: E,
|
|
981
981
|
strokeExpanded: L = !1,
|
|
982
982
|
onStrokeToggle: z,
|
|
983
983
|
shadowExpanded: q = !1,
|
|
@@ -1065,8 +1065,8 @@ const ri = ({
|
|
|
1065
1065
|
},
|
|
1066
1066
|
onMouseLeave: () => Ie(!1),
|
|
1067
1067
|
tooltip: "Adjust",
|
|
1068
|
-
tooltipDisabled: ye ||
|
|
1069
|
-
active:
|
|
1068
|
+
tooltipDisabled: ye || v,
|
|
1069
|
+
active: v || $e.adjustments,
|
|
1070
1070
|
"data-testid": "toolbar-adjust",
|
|
1071
1071
|
"aria-label": "Adjust"
|
|
1072
1072
|
}
|
|
@@ -1080,8 +1080,8 @@ const ri = ({
|
|
|
1080
1080
|
},
|
|
1081
1081
|
onMouseLeave: () => p(!1),
|
|
1082
1082
|
tooltip: "Rotate",
|
|
1083
|
-
tooltipDisabled: ze ||
|
|
1084
|
-
active:
|
|
1083
|
+
tooltipDisabled: ze || I,
|
|
1084
|
+
active: I || $e.rotation
|
|
1085
1085
|
}
|
|
1086
1086
|
),
|
|
1087
1087
|
/* @__PURE__ */ t(
|
|
@@ -1089,7 +1089,7 @@ const ri = ({
|
|
|
1089
1089
|
{
|
|
1090
1090
|
icon: "lucide:blend",
|
|
1091
1091
|
onClick: () => {
|
|
1092
|
-
R(!0),
|
|
1092
|
+
R(!0), E == null || E();
|
|
1093
1093
|
},
|
|
1094
1094
|
onMouseLeave: () => R(!1),
|
|
1095
1095
|
tooltip: "Transparency",
|
|
@@ -1102,7 +1102,7 @@ const ri = ({
|
|
|
1102
1102
|
{
|
|
1103
1103
|
icon: "lucide:square-round-corner",
|
|
1104
1104
|
onClick: () => {
|
|
1105
|
-
we(!0),
|
|
1105
|
+
we(!0), x == null || x();
|
|
1106
1106
|
},
|
|
1107
1107
|
onMouseLeave: () => we(!1),
|
|
1108
1108
|
tooltip: "Corner Radius",
|
|
@@ -1267,15 +1267,15 @@ const ri = ({
|
|
|
1267
1267
|
onDelete: m,
|
|
1268
1268
|
rotationExpanded: w = !1,
|
|
1269
1269
|
onRotationToggle: y,
|
|
1270
|
-
cornerRadiusExpanded:
|
|
1270
|
+
cornerRadiusExpanded: x = !1,
|
|
1271
1271
|
onCornerRadiusToggle: g,
|
|
1272
1272
|
transparencyExpanded: N = !1,
|
|
1273
|
-
onTransparencyToggle:
|
|
1273
|
+
onTransparencyToggle: v,
|
|
1274
1274
|
sidesExpanded: M = !1,
|
|
1275
|
-
onSidesToggle:
|
|
1275
|
+
onSidesToggle: I,
|
|
1276
1276
|
pointsExpanded: D = !1,
|
|
1277
1277
|
onPointsToggle: k,
|
|
1278
|
-
innerRadiusExpanded:
|
|
1278
|
+
innerRadiusExpanded: E = !1,
|
|
1279
1279
|
onInnerRadiusToggle: L,
|
|
1280
1280
|
colorExpanded: z = !1,
|
|
1281
1281
|
onColorToggle: q,
|
|
@@ -1360,16 +1360,16 @@ const ri = ({
|
|
|
1360
1360
|
},
|
|
1361
1361
|
onMouseLeave: () => ye(!1),
|
|
1362
1362
|
tooltip: "Corner Radius",
|
|
1363
|
-
tooltipDisabled: Ee ||
|
|
1364
|
-
active:
|
|
1363
|
+
tooltipDisabled: Ee || x,
|
|
1364
|
+
active: x || Le.cornerRadius
|
|
1365
1365
|
}
|
|
1366
1366
|
),
|
|
1367
|
-
e.transformData.shapeType === "polygon" &&
|
|
1367
|
+
e.transformData.shapeType === "polygon" && I && /* @__PURE__ */ t(
|
|
1368
1368
|
j,
|
|
1369
1369
|
{
|
|
1370
1370
|
icon: "healthicons:polygon",
|
|
1371
1371
|
onClick: () => {
|
|
1372
|
-
C(!0),
|
|
1372
|
+
C(!0), I();
|
|
1373
1373
|
},
|
|
1374
1374
|
onMouseLeave: () => C(!1),
|
|
1375
1375
|
tooltip: "Sides",
|
|
@@ -1399,16 +1399,16 @@ const ri = ({
|
|
|
1399
1399
|
},
|
|
1400
1400
|
onMouseLeave: () => ke(!1),
|
|
1401
1401
|
tooltip: "Inner Radius",
|
|
1402
|
-
tooltipDisabled: G ||
|
|
1403
|
-
active:
|
|
1402
|
+
tooltipDisabled: G || E,
|
|
1403
|
+
active: E
|
|
1404
1404
|
}
|
|
1405
1405
|
),
|
|
1406
|
-
|
|
1406
|
+
v && /* @__PURE__ */ t(
|
|
1407
1407
|
j,
|
|
1408
1408
|
{
|
|
1409
1409
|
icon: "lucide:blend",
|
|
1410
1410
|
onClick: () => {
|
|
1411
|
-
ze(!0),
|
|
1411
|
+
ze(!0), v();
|
|
1412
1412
|
},
|
|
1413
1413
|
onMouseLeave: () => ze(!1),
|
|
1414
1414
|
tooltip: "Transparency",
|
|
@@ -1569,7 +1569,7 @@ const ri = ({
|
|
|
1569
1569
|
}, y = (z) => {
|
|
1570
1570
|
const q = e.clone();
|
|
1571
1571
|
q.transformData.fillColor = z, s(q), f(!1);
|
|
1572
|
-
},
|
|
1572
|
+
}, x = () => {
|
|
1573
1573
|
const z = e.clone();
|
|
1574
1574
|
z.transformData.strokeEnabled = !z.transformData.strokeEnabled, s(z);
|
|
1575
1575
|
}, g = () => {
|
|
@@ -1578,7 +1578,7 @@ const ri = ({
|
|
|
1578
1578
|
}, N = (z) => {
|
|
1579
1579
|
const q = e.clone();
|
|
1580
1580
|
q.transformData.strokeWidth = z, s(q);
|
|
1581
|
-
},
|
|
1581
|
+
}, v = e.transformData.strokeColor || "#000000", M = e.transformData.fillColor || "#3b82f6", I = e.transformData.strokeEnabled ?? !0, D = e.transformData.fillEnabled ?? !1, k = e.transformData.strokeWidth ?? 2, E = e.transformData.closed, L = e.transformData.points.length;
|
|
1582
1582
|
return /* @__PURE__ */ h("div", { className: "sc:fixed sc:top-3xl sc:left-1/2 sc:-translate-x-1/2 sc:flex sc:items-center sc:gap-md sc:px-xl sc:py-md sc:bg-bg-primary sc:rounded-xl sc:shadow-md", style: { zIndex: "var(--sc-z-dropdown)" }, children: [
|
|
1583
1583
|
/* @__PURE__ */ h("div", { className: "sc:px-xl sc:text-base sc:text-text-muted sc:border-r sc:border-border-primary", children: [
|
|
1584
1584
|
/* @__PURE__ */ t("span", { className: "sc:font-semibold", children: "Path" }),
|
|
@@ -1586,27 +1586,27 @@ const ri = ({
|
|
|
1586
1586
|
L,
|
|
1587
1587
|
" ",
|
|
1588
1588
|
L === 1 ? "point" : "points",
|
|
1589
|
-
|
|
1589
|
+
E && " • Closed"
|
|
1590
1590
|
] })
|
|
1591
1591
|
] }),
|
|
1592
1592
|
/* @__PURE__ */ h(he, { delay: 300, children: [
|
|
1593
1593
|
/* @__PURE__ */ t(me, { asChild: !0, children: /* @__PURE__ */ t(
|
|
1594
1594
|
P,
|
|
1595
1595
|
{
|
|
1596
|
-
variant:
|
|
1597
|
-
onClick:
|
|
1596
|
+
variant: I ? "default" : "ghost",
|
|
1597
|
+
onClick: x,
|
|
1598
1598
|
className: "sc:px-xl sc:text-base",
|
|
1599
1599
|
children: "Stroke"
|
|
1600
1600
|
}
|
|
1601
1601
|
) }),
|
|
1602
|
-
/* @__PURE__ */ t(ge, { children:
|
|
1602
|
+
/* @__PURE__ */ t(ge, { children: I ? "Disable Stroke" : "Enable Stroke" })
|
|
1603
1603
|
] }),
|
|
1604
|
-
|
|
1604
|
+
I && /* @__PURE__ */ h(Qe, { open: r, onOpenChange: c, children: [
|
|
1605
1605
|
/* @__PURE__ */ t(Ge, { asChild: !0, children: /* @__PURE__ */ t(
|
|
1606
1606
|
"button",
|
|
1607
1607
|
{
|
|
1608
1608
|
className: "sc:w-8 sc:h-8 sc:p-xs sc:rounded-md sc:border-2 sc:border-border-primary sc:cursor-pointer sc:transition-transform sc:hover:scale-105",
|
|
1609
|
-
style: { background:
|
|
1609
|
+
style: { background: v },
|
|
1610
1610
|
title: "Stroke Color"
|
|
1611
1611
|
}
|
|
1612
1612
|
) }),
|
|
@@ -1616,7 +1616,7 @@ const ri = ({
|
|
|
1616
1616
|
{
|
|
1617
1617
|
onClick: () => w(z.color),
|
|
1618
1618
|
"aria-label": z.name,
|
|
1619
|
-
className: `sc:w-8 sc:h-8 sc:rounded-md sc:cursor-pointer sc:transition-all sc:min-h-0 sc:min-w-0 sc:p-0 ${
|
|
1619
|
+
className: `sc:w-8 sc:h-8 sc:rounded-md sc:cursor-pointer sc:transition-all sc:min-h-0 sc:min-w-0 sc:p-0 ${v === z.color ? "sc:border-2 sc:border-accent-primary sc:scale-110" : "sc:border sc:border-border-primary sc:hover:scale-105"}`,
|
|
1620
1620
|
style: { background: z.color }
|
|
1621
1621
|
},
|
|
1622
1622
|
z.color
|
|
@@ -1625,14 +1625,14 @@ const ri = ({
|
|
|
1625
1625
|
"input",
|
|
1626
1626
|
{
|
|
1627
1627
|
type: "color",
|
|
1628
|
-
value:
|
|
1628
|
+
value: v,
|
|
1629
1629
|
onChange: (z) => w(z.target.value),
|
|
1630
1630
|
className: "sc:w-full sc:h-8 sc:cursor-pointer sc:rounded-md sc:border sc:border-border-primary"
|
|
1631
1631
|
}
|
|
1632
1632
|
)
|
|
1633
1633
|
] }) })
|
|
1634
1634
|
] }),
|
|
1635
|
-
|
|
1635
|
+
I && /* @__PURE__ */ h(Qe, { open: b, onOpenChange: m, children: [
|
|
1636
1636
|
/* @__PURE__ */ t(Ge, { asChild: !0, children: /* @__PURE__ */ h(P, { variant: "ghost", className: "sc:px-xl sc:text-base", children: [
|
|
1637
1637
|
k,
|
|
1638
1638
|
"px"
|
|
@@ -1723,16 +1723,16 @@ const ri = ({
|
|
|
1723
1723
|
}, [e]), Z(() => {
|
|
1724
1724
|
s !== "transparent" && y(s);
|
|
1725
1725
|
}, [s]);
|
|
1726
|
-
const
|
|
1726
|
+
const x = (D) => {
|
|
1727
1727
|
y(D), r(D), o("color");
|
|
1728
1728
|
}, g = (D) => {
|
|
1729
1729
|
const k = D.target.value;
|
|
1730
1730
|
y(k);
|
|
1731
|
-
const
|
|
1732
|
-
|
|
1731
|
+
const E = /^#?([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})$/, L = k.startsWith("#") ? k : `#${k}`;
|
|
1732
|
+
E.test(L) && (r(L), o("color"));
|
|
1733
1733
|
}, N = () => {
|
|
1734
1734
|
r("transparent"), o("transparent");
|
|
1735
|
-
},
|
|
1735
|
+
}, v = (D) => {
|
|
1736
1736
|
c(D), o("texture");
|
|
1737
1737
|
}, M = (D) => {
|
|
1738
1738
|
if (m(D), D === "color")
|
|
@@ -1744,7 +1744,7 @@ const ri = ({
|
|
|
1744
1744
|
}
|
|
1745
1745
|
o("texture");
|
|
1746
1746
|
}
|
|
1747
|
-
},
|
|
1747
|
+
}, I = s === "transparent";
|
|
1748
1748
|
return /* @__PURE__ */ h(Qe, { open: i, onOpenChange: f, children: [
|
|
1749
1749
|
/* @__PURE__ */ t(Ge, { asChild: !0, children: /* @__PURE__ */ t(P, { variant: i ? "default" : "ghost", "aria-label": "Background", children: /* @__PURE__ */ t(Q, { icon: le.palette, className: "sc:size-[18px]" }) }) }),
|
|
1750
1750
|
/* @__PURE__ */ t(Ye, { className: "sc:w-auto sc:p-3", children: /* @__PURE__ */ h("div", { className: "sc:flex sc:min-w-[220px] sc:flex-col sc:gap-3", children: [
|
|
@@ -1786,7 +1786,7 @@ const ri = ({
|
|
|
1786
1786
|
P,
|
|
1787
1787
|
{
|
|
1788
1788
|
variant: "ghost",
|
|
1789
|
-
className: `sc:flex sc:w-full sc:cursor-pointer sc:items-center sc:justify-start sc:gap-2 sc:rounded-lg ${
|
|
1789
|
+
className: `sc:flex sc:w-full sc:cursor-pointer sc:items-center sc:justify-start sc:gap-2 sc:rounded-lg ${I ? "sc:bg-primary/10" : ""}`,
|
|
1790
1790
|
onClick: N,
|
|
1791
1791
|
children: [
|
|
1792
1792
|
/* @__PURE__ */ t("div", { className: "transparent-pattern-small sc:h-6 sc:w-6 sc:rounded" }),
|
|
@@ -1794,7 +1794,7 @@ const ri = ({
|
|
|
1794
1794
|
]
|
|
1795
1795
|
}
|
|
1796
1796
|
),
|
|
1797
|
-
/* @__PURE__ */ t(ic, { color:
|
|
1797
|
+
/* @__PURE__ */ t(ic, { color: I ? "#ffffff" : s, onChange: x }),
|
|
1798
1798
|
/* @__PURE__ */ h("div", { className: "sc:flex sc:items-center sc:gap-2", children: [
|
|
1799
1799
|
/* @__PURE__ */ t("label", { htmlFor: "bg-hex-input", className: "sc:text-sm sc:font-medium sc:uppercase sc:text-foreground/60", children: "HEX" }),
|
|
1800
1800
|
/* @__PURE__ */ t(
|
|
@@ -1817,7 +1817,7 @@ const ri = ({
|
|
|
1817
1817
|
"button",
|
|
1818
1818
|
{
|
|
1819
1819
|
className: `sc:flex sc:items-center sc:justify-center sc:p-1 sc:rounded-lg sc:cursor-pointer sc:transition-all sc:border-2 ${n === D.id ? "sc:border-primary" : "sc:border-transparent sc:hover:border-primary/50"}`,
|
|
1820
|
-
onClick: () =>
|
|
1820
|
+
onClick: () => v(D.id),
|
|
1821
1821
|
"aria-label": D.name,
|
|
1822
1822
|
children: /* @__PURE__ */ t("img", { src: D.url, alt: D.name, className: "sc:w-full sc:h-full sc:rounded" })
|
|
1823
1823
|
},
|
|
@@ -1925,7 +1925,7 @@ const dc = ({ distressTexture: e, onChange: s }) => {
|
|
|
1925
1925
|
e && s({ ...e, maskType: g });
|
|
1926
1926
|
}, y = (g) => {
|
|
1927
1927
|
e && s({ ...e, opacity: g[0] });
|
|
1928
|
-
},
|
|
1928
|
+
}, x = (g) => {
|
|
1929
1929
|
e && s({ ...e, inverted: g });
|
|
1930
1930
|
};
|
|
1931
1931
|
return /* @__PURE__ */ h(Vo, { open: n, onOpenChange: b, className: "sc:mb-xl", children: [
|
|
@@ -1976,7 +1976,7 @@ const dc = ({ distressTexture: e, onChange: s }) => {
|
|
|
1976
1976
|
}
|
|
1977
1977
|
),
|
|
1978
1978
|
/* @__PURE__ */ h("label", { className: "sc:flex sc:items-center sc:gap-2 sc:text-sm sc:text-foreground", children: [
|
|
1979
|
-
/* @__PURE__ */ t(Xt, { checked: i, onCheckedChange: (g) =>
|
|
1979
|
+
/* @__PURE__ */ t(Xt, { checked: i, onCheckedChange: (g) => x(g === !0) }),
|
|
1980
1980
|
"Invert Mask"
|
|
1981
1981
|
] })
|
|
1982
1982
|
] })
|
|
@@ -1989,19 +1989,19 @@ const dc = ({ distressTexture: e, onChange: s }) => {
|
|
|
1989
1989
|
onDeleteArtboard: r,
|
|
1990
1990
|
artboardScreenBounds: c
|
|
1991
1991
|
}) => {
|
|
1992
|
-
const [i, f] = T(!1), [b, m] = T(""), [w, y] = T(!1),
|
|
1992
|
+
const [i, f] = T(!1), [b, m] = T(""), [w, y] = T(!1), x = V(null), g = (B) => {
|
|
1993
1993
|
const U = e.clone();
|
|
1994
1994
|
U.backgroundType = B, n(U);
|
|
1995
1995
|
}, N = (B) => {
|
|
1996
1996
|
const U = e.clone();
|
|
1997
1997
|
U.backgroundColor = B, n(U);
|
|
1998
|
-
},
|
|
1998
|
+
}, v = (B) => {
|
|
1999
1999
|
const U = e.clone();
|
|
2000
2000
|
U.backgroundTexture = B, n(U);
|
|
2001
2001
|
}, M = (B) => {
|
|
2002
2002
|
const U = e.clone();
|
|
2003
2003
|
U.exportBackground = B, n(U);
|
|
2004
|
-
},
|
|
2004
|
+
}, I = (B) => {
|
|
2005
2005
|
const U = e.clone();
|
|
2006
2006
|
U.distressTexture = B, n(U);
|
|
2007
2007
|
}, D = (B) => {
|
|
@@ -2009,12 +2009,12 @@ const dc = ({ distressTexture: e, onChange: s }) => {
|
|
|
2009
2009
|
U.imageMask = B, n(U);
|
|
2010
2010
|
}, k = () => {
|
|
2011
2011
|
f(!0), m(e.name);
|
|
2012
|
-
},
|
|
2012
|
+
}, E = () => {
|
|
2013
2013
|
b.trim() && o(e.id, b.trim()), f(!1), m("");
|
|
2014
2014
|
}, L = () => {
|
|
2015
2015
|
f(!1), m("");
|
|
2016
2016
|
}, z = (B) => {
|
|
2017
|
-
B.key === "Enter" ?
|
|
2017
|
+
B.key === "Enter" ? E() : B.key === "Escape" && L();
|
|
2018
2018
|
}, q = () => {
|
|
2019
2019
|
if (s.length <= 1) {
|
|
2020
2020
|
alert("Cannot delete the last artboard");
|
|
@@ -2023,7 +2023,7 @@ const dc = ({ distressTexture: e, onChange: s }) => {
|
|
|
2023
2023
|
e.getElementCount() > 0 && !confirm(`Delete "${e.name}" with ${e.getElementCount()} element(s)?`) || r(e.id);
|
|
2024
2024
|
};
|
|
2025
2025
|
return Z(() => {
|
|
2026
|
-
i &&
|
|
2026
|
+
i && x.current && (x.current.focus(), x.current.select());
|
|
2027
2027
|
}, [i]), /* @__PURE__ */ h(
|
|
2028
2028
|
Ht,
|
|
2029
2029
|
{
|
|
@@ -2038,7 +2038,7 @@ const dc = ({ distressTexture: e, onChange: s }) => {
|
|
|
2038
2038
|
/* @__PURE__ */ t(
|
|
2039
2039
|
"input",
|
|
2040
2040
|
{
|
|
2041
|
-
ref:
|
|
2041
|
+
ref: x,
|
|
2042
2042
|
type: "text",
|
|
2043
2043
|
value: b,
|
|
2044
2044
|
onChange: (B) => m(B.target.value),
|
|
@@ -2047,7 +2047,7 @@ const dc = ({ distressTexture: e, onChange: s }) => {
|
|
|
2047
2047
|
}
|
|
2048
2048
|
),
|
|
2049
2049
|
/* @__PURE__ */ h(he, { delay: 300, children: [
|
|
2050
|
-
/* @__PURE__ */ t(me, { asChild: !0, children: /* @__PURE__ */ t(P, { variant: "ghost", onClick:
|
|
2050
|
+
/* @__PURE__ */ t(me, { asChild: !0, children: /* @__PURE__ */ t(P, { variant: "ghost", onClick: E, "aria-label": "Save", children: /* @__PURE__ */ t(Q, { icon: le.check, className: "sc:size-4" }) }) }),
|
|
2051
2051
|
/* @__PURE__ */ t(ge, { children: "Save" })
|
|
2052
2052
|
] }),
|
|
2053
2053
|
/* @__PURE__ */ h(he, { delay: 300, children: [
|
|
@@ -2074,7 +2074,7 @@ const dc = ({ distressTexture: e, onChange: s }) => {
|
|
|
2074
2074
|
backgroundTexture: e.backgroundTexture,
|
|
2075
2075
|
onBackgroundTypeChange: g,
|
|
2076
2076
|
onColorChange: N,
|
|
2077
|
-
onTextureChange:
|
|
2077
|
+
onTextureChange: v
|
|
2078
2078
|
}
|
|
2079
2079
|
),
|
|
2080
2080
|
/* @__PURE__ */ t(Wt, { orientation: "vertical", className: "sc:h-6" }),
|
|
@@ -2102,7 +2102,7 @@ const dc = ({ distressTexture: e, onChange: s }) => {
|
|
|
2102
2102
|
dc,
|
|
2103
2103
|
{
|
|
2104
2104
|
distressTexture: e.distressTexture,
|
|
2105
|
-
onChange:
|
|
2105
|
+
onChange: I
|
|
2106
2106
|
}
|
|
2107
2107
|
),
|
|
2108
2108
|
/* @__PURE__ */ t(
|
|
@@ -2134,7 +2134,7 @@ const $t = bs("FontBrowserDrawer"), fi = ({
|
|
|
2134
2134
|
previewText: i,
|
|
2135
2135
|
elements: f
|
|
2136
2136
|
}) => {
|
|
2137
|
-
const b = V(null), [m, w] = T(""), [y,
|
|
2137
|
+
const b = V(null), [m, w] = T(""), [y, x] = T("all"), [g, N] = T(0), [v, M] = T("name"), [I, D] = T("medium"), [k, E] = T("masonry"), [L, z] = T(/* @__PURE__ */ new Set()), q = V([]), B = V(!1), { onFontUpload: U } = Lo(), se = ur(
|
|
2138
2138
|
_s.subscribe,
|
|
2139
2139
|
_s.list,
|
|
2140
2140
|
_s.list
|
|
@@ -2191,7 +2191,7 @@ const $t = bs("FontBrowserDrawer"), fi = ({
|
|
|
2191
2191
|
case "large":
|
|
2192
2192
|
return 3;
|
|
2193
2193
|
}
|
|
2194
|
-
})(
|
|
2194
|
+
})(I);
|
|
2195
2195
|
Z(() => {
|
|
2196
2196
|
const p = "font-preview-style";
|
|
2197
2197
|
if (!document.getElementById(p)) {
|
|
@@ -2241,14 +2241,14 @@ const $t = bs("FontBrowserDrawer"), fi = ({
|
|
|
2241
2241
|
Z(() => {
|
|
2242
2242
|
o && setTimeout(() => {
|
|
2243
2243
|
b.current && b.current.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
2244
|
-
}, 150), o || (w(""),
|
|
2244
|
+
}, 150), o || (w(""), x("all"), Ze.clearPreviewFonts(), z(/* @__PURE__ */ new Set()));
|
|
2245
2245
|
}, [o, e]), Z(() => {
|
|
2246
2246
|
if (e && !L.has(e)) {
|
|
2247
2247
|
const C = Ze.getAllFonts().find((R) => R.name === e);
|
|
2248
2248
|
C && xe(C, !0);
|
|
2249
2249
|
}
|
|
2250
2250
|
}, [e, L, g]), Z(() => {
|
|
2251
|
-
m.trim() &&
|
|
2251
|
+
m.trim() && x("all");
|
|
2252
2252
|
}, [m]);
|
|
2253
2253
|
const we = async (p) => {
|
|
2254
2254
|
const R = Ze.getAllFonts().find(($) => $.name === p);
|
|
@@ -2276,8 +2276,8 @@ const $t = bs("FontBrowserDrawer"), fi = ({
|
|
|
2276
2276
|
return ve.observe(R.current), () => ve.disconnect();
|
|
2277
2277
|
}, [p.name, G]);
|
|
2278
2278
|
let ke = "", H = !1;
|
|
2279
|
-
|
|
2280
|
-
const ae =
|
|
2279
|
+
v === "name" ? (ke = p.name, H = !1) : v === "preview" ? (ke = i || p.name, H = C) : (ke = i || p.name, H = !0);
|
|
2280
|
+
const ae = v === "preview" && !H, Je = /* @__PURE__ */ h(
|
|
2281
2281
|
Ht,
|
|
2282
2282
|
{
|
|
2283
2283
|
ref: (ve) => {
|
|
@@ -2495,7 +2495,7 @@ const $t = bs("FontBrowserDrawer"), fi = ({
|
|
|
2495
2495
|
/* @__PURE__ */ t(
|
|
2496
2496
|
st,
|
|
2497
2497
|
{
|
|
2498
|
-
value:
|
|
2498
|
+
value: I,
|
|
2499
2499
|
onValueChange: (p) => D(p),
|
|
2500
2500
|
children: /* @__PURE__ */ t(st.ListContainer, { children: /* @__PURE__ */ h(st.List, { "aria-label": "Card size", children: [
|
|
2501
2501
|
/* @__PURE__ */ h(st.Tab, { id: "small", className: "sc:text-xs sc:font-semibold", "aria-label": "Small card size", children: [
|
|
@@ -2520,16 +2520,16 @@ const $t = bs("FontBrowserDrawer"), fi = ({
|
|
|
2520
2520
|
onClick: () => {
|
|
2521
2521
|
M((p) => p === "both" ? "name" : p === "name" ? "preview" : "both");
|
|
2522
2522
|
},
|
|
2523
|
-
"aria-label":
|
|
2523
|
+
"aria-label": v === "both" ? "Show font name only" : v === "name" ? "Show preview only" : "Show preview with font name",
|
|
2524
2524
|
className: "sc:h-10 sc:w-10 sc:p-0",
|
|
2525
|
-
children:
|
|
2525
|
+
children: v === "both" ? /* @__PURE__ */ t(Q, { icon: "lucide:credit-card", className: "sc:size-[22px]" }) : v === "name" ? /* @__PURE__ */ t(Q, { icon: "lucide:type", className: "sc:size-[22px]" }) : /* @__PURE__ */ t(Q, { icon: "lucide:text-cursor", className: "sc:size-[22px]" })
|
|
2526
2526
|
}
|
|
2527
2527
|
),
|
|
2528
2528
|
/* @__PURE__ */ t(
|
|
2529
2529
|
P,
|
|
2530
2530
|
{
|
|
2531
2531
|
variant: "secondary",
|
|
2532
|
-
onClick: () =>
|
|
2532
|
+
onClick: () => E(k === "grid" ? "masonry" : "grid"),
|
|
2533
2533
|
"aria-label": k === "grid" ? "Switch to masonry view" : "Switch to grid view",
|
|
2534
2534
|
className: "sc:h-10 sc:w-10 sc:p-0",
|
|
2535
2535
|
children: k === "grid" ? /* @__PURE__ */ t(Q, { icon: "lucide:grid-2x2", className: "sc:size-[22px]" }) : /* @__PURE__ */ t(Q, { icon: "lucide:grid-3x3", className: "sc:size-[22px]" })
|
|
@@ -2555,7 +2555,7 @@ const $t = bs("FontBrowserDrawer"), fi = ({
|
|
|
2555
2555
|
{
|
|
2556
2556
|
size: "sm",
|
|
2557
2557
|
variant: y === p ? "default" : "secondary",
|
|
2558
|
-
onClick: () =>
|
|
2558
|
+
onClick: () => x(p),
|
|
2559
2559
|
className: `sc:shrink-0 ${y === p ? "" : "sc:hover:brightness-95"}`,
|
|
2560
2560
|
children: C
|
|
2561
2561
|
},
|
|
@@ -2592,7 +2592,7 @@ const $t = bs("FontBrowserDrawer"), fi = ({
|
|
|
2592
2592
|
"--font-preview": `"${p}", sans-serif`,
|
|
2593
2593
|
fontSize: `${15 * W}px`
|
|
2594
2594
|
},
|
|
2595
|
-
children:
|
|
2595
|
+
children: v === "name" ? p : i || p
|
|
2596
2596
|
}
|
|
2597
2597
|
)
|
|
2598
2598
|
},
|
|
@@ -2674,16 +2674,16 @@ const $t = bs("FontBrowserDrawer"), fi = ({
|
|
|
2674
2674
|
id: `control-${c.key}`,
|
|
2675
2675
|
checked: i,
|
|
2676
2676
|
onCheckedChange: (y) => {
|
|
2677
|
-
const
|
|
2678
|
-
|
|
2677
|
+
const x = e.clone();
|
|
2678
|
+
x.transformData[c.key] = y, n(x);
|
|
2679
2679
|
}
|
|
2680
2680
|
}
|
|
2681
2681
|
),
|
|
2682
2682
|
/* @__PURE__ */ t(Me, { htmlFor: `control-${c.key}`, children: c.label })
|
|
2683
2683
|
] }, c.key);
|
|
2684
2684
|
const f = typeof i == "number" && !isNaN(i) ? i : c.defaultInternalValue ?? 0, b = o[c.key] !== void 0 ? o[c.key] : f, m = c.toSlider ? c.toSlider(b) : b, w = (y) => {
|
|
2685
|
-
const
|
|
2686
|
-
return typeof
|
|
2685
|
+
const x = c.fromSlider ? c.fromSlider(y) : y;
|
|
2686
|
+
return typeof x != "number" || isNaN(x) ? (pi.warn("Invalid internalValue:", x, "for control:", c.key), "0") : c.toDisplay ? c.toDisplay(x) : "isPercentage" in c && c.isPercentage ? `${(x * 100).toFixed(0)}%` : x.toFixed(1);
|
|
2687
2687
|
};
|
|
2688
2688
|
return /* @__PURE__ */ h("div", { className: "sc:flex sc:flex-col sc:gap-sm", children: [
|
|
2689
2689
|
/* @__PURE__ */ h("div", { className: "sc:flex sc:justify-between", children: [
|
|
@@ -2695,14 +2695,14 @@ const $t = bs("FontBrowserDrawer"), fi = ({
|
|
|
2695
2695
|
{
|
|
2696
2696
|
value: [m],
|
|
2697
2697
|
onValueChange: (y) => {
|
|
2698
|
-
const
|
|
2698
|
+
const x = y[0], g = c.fromSlider ? c.fromSlider(x) : x;
|
|
2699
2699
|
r((N) => ({ ...N, [c.key]: g }));
|
|
2700
2700
|
},
|
|
2701
2701
|
onChangeEnd: (y) => {
|
|
2702
|
-
const
|
|
2703
|
-
g.transformData[c.key] = c.fromSlider ? c.fromSlider(
|
|
2704
|
-
const
|
|
2705
|
-
return delete
|
|
2702
|
+
const x = y[0], g = e.clone();
|
|
2703
|
+
g.transformData[c.key] = c.fromSlider ? c.fromSlider(x) : x, n(g), r((N) => {
|
|
2704
|
+
const v = { ...N };
|
|
2705
|
+
return delete v[c.key], v;
|
|
2706
2706
|
});
|
|
2707
2707
|
},
|
|
2708
2708
|
min: 0,
|
|
@@ -2722,7 +2722,7 @@ const $t = bs("FontBrowserDrawer"), fi = ({
|
|
|
2722
2722
|
}) => {
|
|
2723
2723
|
const [c, i] = T(!1), f = o !== void 0 ? o : c, b = r || i, m = e.transformType, w = Nr(m), y = Tr.filter(
|
|
2724
2724
|
(g) => g.Component && g.id !== "image" && g.id !== "group" && g.id !== "shape" && g.id !== "path"
|
|
2725
|
-
),
|
|
2725
|
+
), x = (g) => {
|
|
2726
2726
|
g !== m && s(g);
|
|
2727
2727
|
};
|
|
2728
2728
|
return /* @__PURE__ */ h(Qe, { open: f, onOpenChange: b, children: [
|
|
@@ -2730,7 +2730,7 @@ const $t = bs("FontBrowserDrawer"), fi = ({
|
|
|
2730
2730
|
/* @__PURE__ */ t(Ye, { align: "start", className: "sc:w-[280px] sc:p-0", maxZIndex: !0, children: /* @__PURE__ */ h("div", { className: "sc:space-y-4 sc:p-6", children: [
|
|
2731
2731
|
/* @__PURE__ */ h("div", { className: "sc:space-y-2", children: [
|
|
2732
2732
|
/* @__PURE__ */ t(Me, { children: "Text Effect" }),
|
|
2733
|
-
/* @__PURE__ */ h($r, { value: m, onValueChange:
|
|
2733
|
+
/* @__PURE__ */ h($r, { value: m, onValueChange: x, children: [
|
|
2734
2734
|
/* @__PURE__ */ t(qo, { children: /* @__PURE__ */ t(jr, { placeholder: "Select effect" }) }),
|
|
2735
2735
|
/* @__PURE__ */ t(Zo, { style: { zIndex: 2147483647 }, children: y.map((g) => /* @__PURE__ */ t(Qo, { value: g.id, children: g.label }, g.id)) })
|
|
2736
2736
|
] })
|
|
@@ -2906,15 +2906,15 @@ function Ti({
|
|
|
2906
2906
|
onRotationToggle: m,
|
|
2907
2907
|
onOpacityToggle: w,
|
|
2908
2908
|
onFontSizeToggle: y,
|
|
2909
|
-
strokeExpanded:
|
|
2909
|
+
strokeExpanded: x = !1,
|
|
2910
2910
|
onStrokeToggle: g,
|
|
2911
2911
|
shadowExpanded: N = !1,
|
|
2912
|
-
onShadowToggle:
|
|
2912
|
+
onShadowToggle: v,
|
|
2913
2913
|
blendModeExpanded: M = !1,
|
|
2914
|
-
onBlendModeToggle:
|
|
2914
|
+
onBlendModeToggle: I,
|
|
2915
2915
|
knockoutExpanded: D = !1,
|
|
2916
2916
|
onKnockoutToggle: k,
|
|
2917
|
-
distressTextureExpanded:
|
|
2917
|
+
distressTextureExpanded: E = !1,
|
|
2918
2918
|
onDistressTextureToggle: L,
|
|
2919
2919
|
imageMaskExpanded: z = !1,
|
|
2920
2920
|
onImageMaskToggle: q,
|
|
@@ -2993,8 +2993,8 @@ function Ti({
|
|
|
2993
2993
|
},
|
|
2994
2994
|
onMouseLeave: () => Ce(!1),
|
|
2995
2995
|
tooltip: "Stroke",
|
|
2996
|
-
tooltipDisabled: xe ||
|
|
2997
|
-
active:
|
|
2996
|
+
tooltipDisabled: xe || x,
|
|
2997
|
+
active: x || p.stroke
|
|
2998
2998
|
}
|
|
2999
2999
|
),
|
|
3000
3000
|
/* @__PURE__ */ t(
|
|
@@ -3023,12 +3023,12 @@ function Ti({
|
|
|
3023
3023
|
active: (b == null ? void 0 : b.type) === "opacity" || p.opacity
|
|
3024
3024
|
}
|
|
3025
3025
|
),
|
|
3026
|
-
|
|
3026
|
+
v && /* @__PURE__ */ t(
|
|
3027
3027
|
j,
|
|
3028
3028
|
{
|
|
3029
3029
|
icon: "gravity-ui:square-dashed-circle",
|
|
3030
3030
|
onClick: () => {
|
|
3031
|
-
G(!0),
|
|
3031
|
+
G(!0), v();
|
|
3032
3032
|
},
|
|
3033
3033
|
onMouseLeave: () => G(!1),
|
|
3034
3034
|
tooltip: "Shadow",
|
|
@@ -3036,12 +3036,12 @@ function Ti({
|
|
|
3036
3036
|
active: N || p.shadow
|
|
3037
3037
|
}
|
|
3038
3038
|
),
|
|
3039
|
-
|
|
3039
|
+
I && /* @__PURE__ */ t(
|
|
3040
3040
|
j,
|
|
3041
3041
|
{
|
|
3042
3042
|
icon: "gravity-ui:circles-intersection",
|
|
3043
3043
|
onClick: () => {
|
|
3044
|
-
H(!0),
|
|
3044
|
+
H(!0), I();
|
|
3045
3045
|
},
|
|
3046
3046
|
onMouseLeave: () => H(!1),
|
|
3047
3047
|
tooltip: "Blend Mode",
|
|
@@ -3071,8 +3071,8 @@ function Ti({
|
|
|
3071
3071
|
},
|
|
3072
3072
|
onMouseLeave: () => We(!1),
|
|
3073
3073
|
tooltip: "Distress Texture",
|
|
3074
|
-
tooltipDisabled: ve ||
|
|
3075
|
-
active:
|
|
3074
|
+
tooltipDisabled: ve || E,
|
|
3075
|
+
active: E || p.distress
|
|
3076
3076
|
}
|
|
3077
3077
|
),
|
|
3078
3078
|
q && /* @__PURE__ */ t(
|
|
@@ -3141,22 +3141,22 @@ function Si(e, s, n, o) {
|
|
|
3141
3141
|
r = { radius: n * 1.2 * 2, scale: 1 }, c = o.x, i = o.y;
|
|
3142
3142
|
break;
|
|
3143
3143
|
case "custom":
|
|
3144
|
-
const w = 200, y = n * e.text.length * 0.6,
|
|
3145
|
-
r = { width:
|
|
3144
|
+
const w = 200, y = n * e.text.length * 0.6, x = Math.max(y, w);
|
|
3145
|
+
r = { width: x };
|
|
3146
3146
|
const g = n * 1.2;
|
|
3147
|
-
c = o.x -
|
|
3147
|
+
c = o.x - x / 2, i = o.y - g / 2;
|
|
3148
3148
|
break;
|
|
3149
3149
|
case "arch":
|
|
3150
|
-
const N = 200,
|
|
3150
|
+
const N = 200, v = n * e.text.length * 0.6;
|
|
3151
3151
|
r = {
|
|
3152
|
-
width: Math.max(
|
|
3152
|
+
width: Math.max(v, N),
|
|
3153
3153
|
archHeight: Mr.archHeight
|
|
3154
3154
|
}, c = o.x, i = o.y;
|
|
3155
3155
|
break;
|
|
3156
3156
|
case "wave":
|
|
3157
|
-
const M = 200,
|
|
3157
|
+
const M = 200, I = n * e.text.length * 0.6;
|
|
3158
3158
|
r = {
|
|
3159
|
-
width: Math.max(
|
|
3159
|
+
width: Math.max(I, M),
|
|
3160
3160
|
amplitude: mo.amplitude,
|
|
3161
3161
|
frequency: mo.frequency
|
|
3162
3162
|
}, c = o.x, i = o.y;
|
|
@@ -3170,9 +3170,9 @@ function Si(e, s, n, o) {
|
|
|
3170
3170
|
}, c = o.x, i = o.y;
|
|
3171
3171
|
break;
|
|
3172
3172
|
case "lean":
|
|
3173
|
-
const
|
|
3173
|
+
const E = 200, L = n * e.text.length * 0.6;
|
|
3174
3174
|
r = {
|
|
3175
|
-
width: Math.max(L,
|
|
3175
|
+
width: Math.max(L, E),
|
|
3176
3176
|
leanAmount: Dr.leanAmount
|
|
3177
3177
|
}, c = o.x, i = o.y;
|
|
3178
3178
|
break;
|
|
@@ -3197,11 +3197,11 @@ function Di(e = {}) {
|
|
|
3197
3197
|
r(p);
|
|
3198
3198
|
},
|
|
3199
3199
|
[n, o, r]
|
|
3200
|
-
), f = c == null ? void 0 : c.id, b = V(void 0), [m, w] = T(32), [y,
|
|
3200
|
+
), f = c == null ? void 0 : c.id, b = V(void 0), [m, w] = T(32), [y, x] = T("#333333"), [g, N] = T("Arial"), [v, M] = T("center");
|
|
3201
3201
|
Z(() => {
|
|
3202
|
-
f !== b.current && (b.current = f, c && c instanceof je && (c.transformType === "circle" && "getEffectiveFontSize" in c ? w(Math.round(c.getEffectiveFontSize())) : c.fontSize !== void 0 && w(Math.round(c.fontSize)), c.color !== void 0 &&
|
|
3202
|
+
f !== b.current && (b.current = f, c && c instanceof je && (c.transformType === "circle" && "getEffectiveFontSize" in c ? w(Math.round(c.getEffectiveFontSize())) : c.fontSize !== void 0 && w(Math.round(c.fontSize)), c.color !== void 0 && x(c.color), c.fontFamily !== void 0 && N(c.fontFamily), M(c.textAlign || "center")));
|
|
3203
3203
|
}, [f, c]);
|
|
3204
|
-
const
|
|
3204
|
+
const I = m, D = y, k = g, E = v, L = c instanceof je ? c : null, z = (L == null ? void 0 : L.letterSpacing) ?? 0, q = (L == null ? void 0 : L.lineHeight) ?? 1.2, B = (L == null ? void 0 : L.bold) ?? !1, U = (L == null ? void 0 : L.italic) ?? !1, se = (L == null ? void 0 : L.underline) ?? !1, J = (L == null ? void 0 : L.letterCase) ?? "none", ee = S(
|
|
3205
3205
|
(p) => {
|
|
3206
3206
|
if (w(p), !c || !(c instanceof je)) return;
|
|
3207
3207
|
const C = c.clone();
|
|
@@ -3217,7 +3217,7 @@ function Di(e = {}) {
|
|
|
3217
3217
|
[c, i]
|
|
3218
3218
|
), X = S(
|
|
3219
3219
|
(p) => {
|
|
3220
|
-
if (
|
|
3220
|
+
if (x(p), !c || !(c instanceof je)) return;
|
|
3221
3221
|
const C = c.clone();
|
|
3222
3222
|
C.color = p, C.richText && C.richText.clearStyleProperty("color"), i(C);
|
|
3223
3223
|
},
|
|
@@ -3237,10 +3237,10 @@ function Di(e = {}) {
|
|
|
3237
3237
|
[ee, s]
|
|
3238
3238
|
), ue = S(
|
|
3239
3239
|
(p) => {
|
|
3240
|
-
const C =
|
|
3240
|
+
const C = I + p;
|
|
3241
3241
|
C >= 8 && C <= 500 && Y(C);
|
|
3242
3242
|
},
|
|
3243
|
-
[
|
|
3243
|
+
[I, Y]
|
|
3244
3244
|
), A = S(
|
|
3245
3245
|
(p) => {
|
|
3246
3246
|
var R;
|
|
@@ -3305,16 +3305,16 @@ function Di(e = {}) {
|
|
|
3305
3305
|
const p = J === "uppercase" ? "none" : "uppercase", C = c.clone();
|
|
3306
3306
|
C.letterCase = p, i(C);
|
|
3307
3307
|
}, [J, c, i]), Ee = S(() => J === "uppercase", [J]), ye = S(() => {
|
|
3308
|
-
const p = ["left", "center", "right"], C = p.indexOf(
|
|
3308
|
+
const p = ["left", "center", "right"], C = p.indexOf(E), R = p[(C + 1) % p.length];
|
|
3309
3309
|
K(R);
|
|
3310
|
-
}, [
|
|
3310
|
+
}, [E, K]), Ie = S(() => {
|
|
3311
3311
|
var p, C, R, $;
|
|
3312
3312
|
if ((C = (p = s == null ? void 0 : s.current) == null ? void 0 : p.isEditingText) != null && C.call(p)) {
|
|
3313
3313
|
const G = ($ = (R = s.current).getSelectionStyle) == null ? void 0 : $.call(R);
|
|
3314
3314
|
if (G)
|
|
3315
3315
|
return {
|
|
3316
3316
|
fontFamily: G.fontFamily ?? k,
|
|
3317
|
-
fontSize: G.fontSize ??
|
|
3317
|
+
fontSize: G.fontSize ?? I,
|
|
3318
3318
|
color: G.color ?? D,
|
|
3319
3319
|
bold: G.bold ?? B,
|
|
3320
3320
|
italic: G.italic ?? U,
|
|
@@ -3323,13 +3323,13 @@ function Di(e = {}) {
|
|
|
3323
3323
|
}
|
|
3324
3324
|
return {
|
|
3325
3325
|
fontFamily: k,
|
|
3326
|
-
fontSize:
|
|
3326
|
+
fontSize: I,
|
|
3327
3327
|
color: D,
|
|
3328
3328
|
bold: B,
|
|
3329
3329
|
italic: U,
|
|
3330
3330
|
underline: se
|
|
3331
3331
|
};
|
|
3332
|
-
}, [s, k,
|
|
3332
|
+
}, [s, k, I, D, B, U, se]), ze = S(
|
|
3333
3333
|
(p) => {
|
|
3334
3334
|
if (!c) return;
|
|
3335
3335
|
const C = Er(p);
|
|
@@ -3340,10 +3340,10 @@ function Di(e = {}) {
|
|
|
3340
3340
|
[c, i]
|
|
3341
3341
|
);
|
|
3342
3342
|
return {
|
|
3343
|
-
fontSize:
|
|
3343
|
+
fontSize: I,
|
|
3344
3344
|
fontColor: D,
|
|
3345
3345
|
fontFamily: k,
|
|
3346
|
-
textAlign:
|
|
3346
|
+
textAlign: E,
|
|
3347
3347
|
bold: B,
|
|
3348
3348
|
italic: U,
|
|
3349
3349
|
underline: se,
|
|
@@ -3368,32 +3368,32 @@ function Di(e = {}) {
|
|
|
3368
3368
|
}
|
|
3369
3369
|
const Mi = bs("useLayerPreview");
|
|
3370
3370
|
function Ei(e) {
|
|
3371
|
-
var w, y,
|
|
3371
|
+
var w, y, x, g, N;
|
|
3372
3372
|
const { element: s, size: n = 148, backgroundColor: o = "transparent", enabled: r = !0 } = e, [c, i] = T(null), [f, b] = T(!1), m = V(null);
|
|
3373
3373
|
return Z(() => {
|
|
3374
3374
|
if (!r) {
|
|
3375
3375
|
i(null), b(!1);
|
|
3376
3376
|
return;
|
|
3377
3377
|
}
|
|
3378
|
-
let
|
|
3378
|
+
let v = !0;
|
|
3379
3379
|
return b(!0), m.current && clearTimeout(m.current), m.current = setTimeout(() => {
|
|
3380
3380
|
(async () => {
|
|
3381
3381
|
try {
|
|
3382
3382
|
if (s instanceof ot && s.imageUrl) {
|
|
3383
3383
|
const D = new Image();
|
|
3384
|
-
if (D.crossOrigin = "anonymous", await new Promise((k,
|
|
3385
|
-
D.onload = () => k(), D.onerror = () =>
|
|
3386
|
-
}), !
|
|
3384
|
+
if (D.crossOrigin = "anonymous", await new Promise((k, E) => {
|
|
3385
|
+
D.onload = () => k(), D.onerror = () => E(new Error("Failed to load image")), D.src = s.imageUrl;
|
|
3386
|
+
}), !v) return;
|
|
3387
3387
|
}
|
|
3388
|
-
const
|
|
3388
|
+
const I = bo(s, {
|
|
3389
3389
|
width: n,
|
|
3390
3390
|
height: n,
|
|
3391
3391
|
padding: 8,
|
|
3392
3392
|
backgroundColor: o
|
|
3393
3393
|
});
|
|
3394
|
-
|
|
3395
|
-
} catch (
|
|
3396
|
-
if (Mi.warn("Failed to generate preview:",
|
|
3394
|
+
v && (i(I), b(!1));
|
|
3395
|
+
} catch (I) {
|
|
3396
|
+
if (Mi.warn("Failed to generate preview:", I), v) {
|
|
3397
3397
|
const D = bo(s, {
|
|
3398
3398
|
width: n,
|
|
3399
3399
|
height: n,
|
|
@@ -3405,7 +3405,7 @@ function Ei(e) {
|
|
|
3405
3405
|
}
|
|
3406
3406
|
})();
|
|
3407
3407
|
}, 50), () => {
|
|
3408
|
-
|
|
3408
|
+
v = !1, m.current && clearTimeout(m.current);
|
|
3409
3409
|
};
|
|
3410
3410
|
}, [
|
|
3411
3411
|
s.id,
|
|
@@ -3427,7 +3427,7 @@ function Ei(e) {
|
|
|
3427
3427
|
s instanceof ot ? s.isCropping : null,
|
|
3428
3428
|
s instanceof $s ? (w = s.transformData) == null ? void 0 : w.fillColor : null,
|
|
3429
3429
|
s instanceof $s ? (y = s.transformData) == null ? void 0 : y.fill : null,
|
|
3430
|
-
s instanceof _o ? (g = (
|
|
3430
|
+
s instanceof _o ? (g = (x = s.transformData) == null ? void 0 : x.points) == null ? void 0 : g.length : null,
|
|
3431
3431
|
s instanceof Dt ? (N = s.children) == null ? void 0 : N.length : null
|
|
3432
3432
|
]), { previewUrl: c, isLoading: f };
|
|
3433
3433
|
}
|
|
@@ -3581,14 +3581,14 @@ function Fi(e, s) {
|
|
|
3581
3581
|
{ mode: s, count: e.length, min: ps }
|
|
3582
3582
|
);
|
|
3583
3583
|
const n = s === "horizontal", o = [...e].sort(
|
|
3584
|
-
(y,
|
|
3584
|
+
(y, x) => n ? y.bbox.x + y.bbox.width / 2 - (x.bbox.x + x.bbox.width / 2) : y.bbox.y + y.bbox.height / 2 - (x.bbox.y + x.bbox.height / 2)
|
|
3585
3585
|
), r = o[0], c = o[o.length - 1], i = n ? c.bbox.x + c.bbox.width - r.bbox.x : c.bbox.y + c.bbox.height - r.bbox.y, f = o.reduce(
|
|
3586
|
-
(y,
|
|
3586
|
+
(y, x) => y + (n ? x.bbox.width : x.bbox.height),
|
|
3587
3587
|
0
|
|
3588
3588
|
), b = (i - f) / (o.length - 1), m = [];
|
|
3589
3589
|
let w = n ? r.bbox.x : r.bbox.y;
|
|
3590
3590
|
for (const y of o) {
|
|
3591
|
-
const
|
|
3591
|
+
const x = n ? y.bbox.x : y.bbox.y, g = w - x;
|
|
3592
3592
|
g !== 0 && m.push({
|
|
3593
3593
|
id: y.id,
|
|
3594
3594
|
x: y.x + (n ? g : 0),
|
|
@@ -3601,17 +3601,17 @@ function pc() {
|
|
|
3601
3601
|
const { elements: e, multiSelection: s, selectedElement: n, artboardManager: o, executeCommandBatch: r, setElements: c } = ms(), i = He(() => (s.length > 0 ? e.filter((y) => s.includes(y.id)) : n ? [n] : []).filter((y) => !y.locked), [e, s, n]), f = S(
|
|
3602
3602
|
(w) => {
|
|
3603
3603
|
if (w.length === 0) return;
|
|
3604
|
-
const y = new Map(i.map((g) => [g.id, g])),
|
|
3604
|
+
const y = new Map(i.map((g) => [g.id, g])), x = w.flatMap((g) => {
|
|
3605
3605
|
const N = y.get(g.id);
|
|
3606
3606
|
if (!N) return [];
|
|
3607
|
-
const
|
|
3608
|
-
|
|
3609
|
-
const M = (
|
|
3610
|
-
c((D) => D.map((k) => k.id ===
|
|
3607
|
+
const v = N.clone();
|
|
3608
|
+
v.x = g.x, v.y = g.y;
|
|
3609
|
+
const M = (I) => {
|
|
3610
|
+
c((D) => D.map((k) => k.id === I.id ? I : k));
|
|
3611
3611
|
};
|
|
3612
|
-
return [{ execute: () => M(
|
|
3612
|
+
return [{ execute: () => M(v), undo: () => M(N) }];
|
|
3613
3613
|
});
|
|
3614
|
-
r(
|
|
3614
|
+
r(x);
|
|
3615
3615
|
},
|
|
3616
3616
|
[i, r, c]
|
|
3617
3617
|
), b = S(
|
|
@@ -3622,22 +3622,22 @@ function pc() {
|
|
|
3622
3622
|
y: g.y,
|
|
3623
3623
|
bbox: g.getBoundingBox()
|
|
3624
3624
|
}));
|
|
3625
|
-
let
|
|
3626
|
-
if (!
|
|
3625
|
+
let x = y.length >= Li ? fc(y) : null;
|
|
3626
|
+
if (!x) {
|
|
3627
3627
|
const g = o.getActiveArtboard();
|
|
3628
3628
|
if (!g) return;
|
|
3629
|
-
|
|
3629
|
+
x = { x: g.x, y: g.y, width: g.width, height: g.height };
|
|
3630
3630
|
}
|
|
3631
|
-
f(Ai(y, w,
|
|
3631
|
+
f(Ai(y, w, x));
|
|
3632
3632
|
},
|
|
3633
3633
|
[i, o, f]
|
|
3634
3634
|
), m = S(
|
|
3635
3635
|
(w) => {
|
|
3636
|
-
const y = i.map((
|
|
3637
|
-
id:
|
|
3638
|
-
x:
|
|
3639
|
-
y:
|
|
3640
|
-
bbox:
|
|
3636
|
+
const y = i.map((x) => ({
|
|
3637
|
+
id: x.id,
|
|
3638
|
+
x: x.x,
|
|
3639
|
+
y: x.y,
|
|
3640
|
+
bbox: x.getBoundingBox()
|
|
3641
3641
|
}));
|
|
3642
3642
|
f(Fi(y, w));
|
|
3643
3643
|
},
|
|
@@ -3666,19 +3666,19 @@ const hc = [
|
|
|
3666
3666
|
artboardScreenBounds: s,
|
|
3667
3667
|
partAttr: n
|
|
3668
3668
|
}) => {
|
|
3669
|
-
const { elements: o, multiSelection: r, artboardManager: c, canvasRef: i, canvasEditorRef: f } = ms(), { panOffset: b } = Ro(), { canAlign: m, canDistribute: w, align: y, distribute:
|
|
3670
|
-
const k = o.filter((
|
|
3669
|
+
const { elements: o, multiSelection: r, artboardManager: c, canvasRef: i, canvasEditorRef: f } = ms(), { panOffset: b } = Ro(), { canAlign: m, canDistribute: w, align: y, distribute: x } = pc(), g = V(null), [N, v] = T(null), M = He(() => {
|
|
3670
|
+
const k = o.filter((E) => r.includes(E.id)).map((E) => ({ id: E.id, x: E.x, y: E.y, bbox: E.getBoundingBox() }));
|
|
3671
3671
|
return fc(k);
|
|
3672
3672
|
}, [o, r]);
|
|
3673
3673
|
if (Z(() => {
|
|
3674
3674
|
if (e !== "floating") return;
|
|
3675
3675
|
if (!M) {
|
|
3676
|
-
|
|
3676
|
+
v(null);
|
|
3677
3677
|
return;
|
|
3678
3678
|
}
|
|
3679
3679
|
const k = () => {
|
|
3680
3680
|
var A, te, De, W;
|
|
3681
|
-
const
|
|
3681
|
+
const E = ((A = g.current) == null ? void 0 : A.offsetWidth) || 0, L = ((te = g.current) == null ? void 0 : te.offsetHeight) || 48, z = c.getActiveArtboard(), q = (z == null ? void 0 : z.x) || 0, B = (z == null ? void 0 : z.y) || 0, U = ((W = (De = f == null ? void 0 : f.current) == null ? void 0 : De.getZoom) == null ? void 0 : W.call(De)) || 1, se = i == null ? void 0 : i.current;
|
|
3682
3682
|
let J, ee;
|
|
3683
3683
|
if (se) {
|
|
3684
3684
|
const xe = se.getBoundingClientRect();
|
|
@@ -3686,17 +3686,17 @@ const hc = [
|
|
|
3686
3686
|
} else s ? (J = s.left + (M.x - q) * U, ee = s.top + (M.y - B) * U) : (J = window.innerWidth / 2 - M.width * U / 2, ee = window.innerHeight / 2 - M.height * U / 2);
|
|
3687
3687
|
const de = M.width * U, X = M.height * U, K = 12;
|
|
3688
3688
|
let Y = ee - L - K, ue = J + de / 2;
|
|
3689
|
-
if (
|
|
3690
|
-
const Ce =
|
|
3689
|
+
if (E > 0) {
|
|
3690
|
+
const Ce = E / 2 + 20, we = window.innerWidth - E / 2 - 20;
|
|
3691
3691
|
ue = Math.max(Ce, Math.min(we, ue));
|
|
3692
3692
|
}
|
|
3693
|
-
Y < 10 && (Y = ee + X + K), Y = Math.min(Y, window.innerHeight - L - 10), Y = Math.max(10, Y),
|
|
3693
|
+
Y < 10 && (Y = ee + X + K), Y = Math.min(Y, window.innerHeight - L - 10), Y = Math.max(10, Y), v({ top: Y, left: ue });
|
|
3694
3694
|
};
|
|
3695
3695
|
return k(), window.addEventListener("resize", k), window.addEventListener("scroll", k, { passive: !0, capture: !0 }), () => {
|
|
3696
3696
|
window.removeEventListener("resize", k), window.removeEventListener("scroll", k, { capture: !0 });
|
|
3697
3697
|
};
|
|
3698
3698
|
}, [e, M, c, i, f, s, b]), !m || r.length === 0) return null;
|
|
3699
|
-
const
|
|
3699
|
+
const I = e === "embedded" ? { borderRadius: "9999px", position: "static", display: "flex", justifyContent: "flex-start" } : N ? {
|
|
3700
3700
|
top: `${N.top}px`,
|
|
3701
3701
|
left: `${N.left}px`,
|
|
3702
3702
|
position: "fixed",
|
|
@@ -3719,23 +3719,23 @@ const hc = [
|
|
|
3719
3719
|
"data-testid": "multi-selection-toolbar",
|
|
3720
3720
|
"data-mode": e,
|
|
3721
3721
|
"data-preserve-selection": !0,
|
|
3722
|
-
style:
|
|
3722
|
+
style: I,
|
|
3723
3723
|
children: /* @__PURE__ */ h("div", { className: "sc-toolbar-items", children: [
|
|
3724
|
-
hc.map(({ mode: k, icon:
|
|
3724
|
+
hc.map(({ mode: k, icon: E, label: L }) => /* @__PURE__ */ t(
|
|
3725
3725
|
j,
|
|
3726
3726
|
{
|
|
3727
|
-
icon:
|
|
3727
|
+
icon: E,
|
|
3728
3728
|
onClick: () => y(k),
|
|
3729
3729
|
tooltip: L,
|
|
3730
3730
|
"data-testid": `align-${k}`
|
|
3731
3731
|
},
|
|
3732
3732
|
k
|
|
3733
3733
|
)),
|
|
3734
|
-
w && Oi.map(({ mode: k, icon:
|
|
3734
|
+
w && Oi.map(({ mode: k, icon: E, label: L }) => /* @__PURE__ */ t(
|
|
3735
3735
|
j,
|
|
3736
3736
|
{
|
|
3737
|
-
icon:
|
|
3738
|
-
onClick: () =>
|
|
3737
|
+
icon: E,
|
|
3738
|
+
onClick: () => x(k),
|
|
3739
3739
|
tooltip: L,
|
|
3740
3740
|
"data-testid": `distribute-${k}`
|
|
3741
3741
|
},
|
|
@@ -3758,14 +3758,14 @@ const hc = [
|
|
|
3758
3758
|
blendModeExpanded: m = !1,
|
|
3759
3759
|
onBlendModeToggle: w,
|
|
3760
3760
|
knockoutExpanded: y = !1,
|
|
3761
|
-
onKnockoutToggle:
|
|
3761
|
+
onKnockoutToggle: x,
|
|
3762
3762
|
distressTextureExpanded: g = !1,
|
|
3763
3763
|
onDistressTextureToggle: N,
|
|
3764
|
-
imageMaskExpanded:
|
|
3764
|
+
imageMaskExpanded: v = !1,
|
|
3765
3765
|
onImageMaskToggle: M,
|
|
3766
|
-
onUngroup:
|
|
3766
|
+
onUngroup: I
|
|
3767
3767
|
}) => {
|
|
3768
|
-
const [D, k] = T(!1), [
|
|
3768
|
+
const [D, k] = T(!1), [E, L] = T(!1), [z, q] = T(!1), [B, U] = T(!1), [se, J] = T(!1), [ee, de] = T(!1), [X, K] = T(!1), [Y, ue] = T(!1), A = vs(e ?? null);
|
|
3769
3769
|
return /* @__PURE__ */ h("div", { className: "sc-toolbar-items", children: [
|
|
3770
3770
|
/* @__PURE__ */ t(
|
|
3771
3771
|
j,
|
|
@@ -3789,7 +3789,7 @@ const hc = [
|
|
|
3789
3789
|
},
|
|
3790
3790
|
onMouseLeave: () => L(!1),
|
|
3791
3791
|
tooltip: "Transparency",
|
|
3792
|
-
tooltipDisabled:
|
|
3792
|
+
tooltipDisabled: E || o,
|
|
3793
3793
|
active: o || A.opacity
|
|
3794
3794
|
}
|
|
3795
3795
|
),
|
|
@@ -3832,12 +3832,12 @@ const hc = [
|
|
|
3832
3832
|
active: m || A.blendMode
|
|
3833
3833
|
}
|
|
3834
3834
|
),
|
|
3835
|
-
|
|
3835
|
+
x && /* @__PURE__ */ t(
|
|
3836
3836
|
j,
|
|
3837
3837
|
{
|
|
3838
3838
|
icon: "lucide:scissors",
|
|
3839
3839
|
onClick: () => {
|
|
3840
|
-
de(!0),
|
|
3840
|
+
de(!0), x();
|
|
3841
3841
|
},
|
|
3842
3842
|
onMouseLeave: () => de(!1),
|
|
3843
3843
|
tooltip: "Knockout",
|
|
@@ -3867,12 +3867,12 @@ const hc = [
|
|
|
3867
3867
|
},
|
|
3868
3868
|
onMouseLeave: () => ue(!1),
|
|
3869
3869
|
tooltip: "Image Mask",
|
|
3870
|
-
tooltipDisabled: Y ||
|
|
3871
|
-
active:
|
|
3870
|
+
tooltipDisabled: Y || v,
|
|
3871
|
+
active: v || A.imageMask
|
|
3872
3872
|
}
|
|
3873
3873
|
),
|
|
3874
3874
|
/* @__PURE__ */ h(he, { delayDuration: 300, children: [
|
|
3875
|
-
/* @__PURE__ */ t(me, { asChild: !0, children: /* @__PURE__ */ t(P, { variant: "ghost", size: "sm", onClick:
|
|
3875
|
+
/* @__PURE__ */ t(me, { asChild: !0, children: /* @__PURE__ */ t(P, { variant: "ghost", size: "sm", onClick: I, children: "Ungroup" }) }),
|
|
3876
3876
|
/* @__PURE__ */ t(ge, { children: "Ungroup this group" })
|
|
3877
3877
|
] })
|
|
3878
3878
|
] });
|
|
@@ -3896,42 +3896,42 @@ const hs = ({ element: e, onElementUpdate: s, className: n }) => {
|
|
|
3896
3896
|
var g, N;
|
|
3897
3897
|
const [o, r] = T("center"), c = V(null), i = V({ x: 0, y: 0 });
|
|
3898
3898
|
Z(() => {
|
|
3899
|
-
const
|
|
3900
|
-
if (!
|
|
3899
|
+
const v = c.current;
|
|
3900
|
+
if (!v) return;
|
|
3901
3901
|
const M = (D) => {
|
|
3902
3902
|
i.current = {
|
|
3903
3903
|
x: D.touches[0].clientX,
|
|
3904
3904
|
y: D.touches[0].clientY
|
|
3905
3905
|
};
|
|
3906
|
-
},
|
|
3907
|
-
const k = Math.abs(D.touches[0].clientX - i.current.x),
|
|
3908
|
-
k > 10 && k >
|
|
3906
|
+
}, I = (D) => {
|
|
3907
|
+
const k = Math.abs(D.touches[0].clientX - i.current.x), E = Math.abs(D.touches[0].clientY - i.current.y);
|
|
3908
|
+
k > 10 && k > E && D.preventDefault();
|
|
3909
3909
|
};
|
|
3910
|
-
return
|
|
3911
|
-
|
|
3910
|
+
return v.addEventListener("touchstart", M, { passive: !0 }), v.addEventListener("touchmove", I, { passive: !1 }), () => {
|
|
3911
|
+
v.removeEventListener("touchstart", M), v.removeEventListener("touchmove", I);
|
|
3912
3912
|
};
|
|
3913
3913
|
}, []);
|
|
3914
3914
|
const f = ((g = e.transformData) == null ? void 0 : g.cropWidth) || 1, b = ((N = e.transformData) == null ? void 0 : N.cropHeight) || 1, m = S(
|
|
3915
|
-
(
|
|
3915
|
+
(v, M, I, D) => {
|
|
3916
3916
|
const k = e.clone();
|
|
3917
|
-
k.updateCrop(
|
|
3917
|
+
k.updateCrop(v, M, I, D, !0), s(k);
|
|
3918
3918
|
},
|
|
3919
3919
|
[e, s]
|
|
3920
3920
|
), w = S(
|
|
3921
|
-
(
|
|
3922
|
-
const
|
|
3923
|
-
let
|
|
3924
|
-
M.includes("center") ?
|
|
3921
|
+
(v, M = o) => {
|
|
3922
|
+
const I = e.transformData.cropWidth, D = e.transformData.cropX, k = v - I;
|
|
3923
|
+
let E = D;
|
|
3924
|
+
M.includes("center") ? E = D - k / 2 : M.includes("right") && (E = D - k), E = Math.max(0, Math.min(1 - v, E)), m(E, e.transformData.cropY, v, e.transformData.cropHeight);
|
|
3925
3925
|
},
|
|
3926
3926
|
[e, m, o]
|
|
3927
3927
|
), y = S(
|
|
3928
|
-
(
|
|
3929
|
-
const
|
|
3930
|
-
let
|
|
3931
|
-
M.includes("middle") || M === "center" ?
|
|
3928
|
+
(v, M = o) => {
|
|
3929
|
+
const I = e.transformData.cropHeight, D = e.transformData.cropY, k = v - I;
|
|
3930
|
+
let E = D;
|
|
3931
|
+
M.includes("middle") || M === "center" ? E = D - k / 2 : M.includes("bottom") && (E = D - k), E = Math.max(0, Math.min(1 - v, E)), m(e.transformData.cropX, E, e.transformData.cropWidth, v);
|
|
3932
3932
|
},
|
|
3933
3933
|
[e, m, o]
|
|
3934
|
-
),
|
|
3934
|
+
), x = [
|
|
3935
3935
|
"top-left",
|
|
3936
3936
|
"top-center",
|
|
3937
3937
|
"top-right",
|
|
@@ -3952,26 +3952,26 @@ const hs = ({ element: e, onElementUpdate: s, className: n }) => {
|
|
|
3952
3952
|
children: /* @__PURE__ */ t("div", { className: "sc:flex sc:flex-col sc:gap-5 sc:px-5 sc:pt-1 sc:pb-[calc(env(safe-area-inset-bottom,0px)+20px)] sc:md:gap-4 sc:md:px-4 sc:md:pt-0 sc:md:pb-[calc(env(safe-area-inset-bottom,0px)+16px)]", children: /* @__PURE__ */ h("div", { className: "sc:flex sc:items-start sc:gap-6 sc:md:gap-5", children: [
|
|
3953
3953
|
/* @__PURE__ */ h("div", { className: "sc:flex sc:flex-col sc:gap-2", children: [
|
|
3954
3954
|
/* @__PURE__ */ t("span", { className: "sc:text-foreground/60 sc:text-sm sc:md:text-xs", children: "Anchor" }),
|
|
3955
|
-
/* @__PURE__ */ t("div", { className: "sc:grid sc:grid-cols-3 sc:gap-0.5 sc:rounded-md sc:p-1", children:
|
|
3955
|
+
/* @__PURE__ */ t("div", { className: "sc:grid sc:grid-cols-3 sc:gap-0.5 sc:rounded-md sc:p-1", children: x.map((v) => /* @__PURE__ */ t(
|
|
3956
3956
|
"button",
|
|
3957
3957
|
{
|
|
3958
|
-
onClick: () => r(
|
|
3958
|
+
onClick: () => r(v),
|
|
3959
3959
|
className: St(
|
|
3960
3960
|
"sc-crop-anchor-btn sc:size-8 sc:rounded-md sc:md:size-6 sc:md:rounded",
|
|
3961
|
-
o ===
|
|
3961
|
+
o === v && "sc-active"
|
|
3962
3962
|
),
|
|
3963
|
-
title:
|
|
3963
|
+
title: v.replace("-", " "),
|
|
3964
3964
|
children: /* @__PURE__ */ t(
|
|
3965
3965
|
"div",
|
|
3966
3966
|
{
|
|
3967
3967
|
className: St(
|
|
3968
3968
|
"sc-crop-anchor-dot sc:size-2 sc:md:size-1.5",
|
|
3969
|
-
o ===
|
|
3969
|
+
o === v && "sc-active sc:size-2.5 sc:md:size-2"
|
|
3970
3970
|
)
|
|
3971
3971
|
}
|
|
3972
3972
|
)
|
|
3973
3973
|
},
|
|
3974
|
-
|
|
3974
|
+
v
|
|
3975
3975
|
)) })
|
|
3976
3976
|
] }),
|
|
3977
3977
|
/* @__PURE__ */ h("div", { className: "sc:flex sc:flex-1 sc:flex-col sc:gap-4 sc:md:gap-3", children: [
|
|
@@ -3983,7 +3983,7 @@ const hs = ({ element: e, onElementUpdate: s, className: n }) => {
|
|
|
3983
3983
|
{
|
|
3984
3984
|
type: "number",
|
|
3985
3985
|
value: Math.round(f * 100),
|
|
3986
|
-
onChange: (
|
|
3986
|
+
onChange: (v) => w(Math.max(10, Math.min(100, Number(v.target.value))) / 100),
|
|
3987
3987
|
min: 10,
|
|
3988
3988
|
max: 100,
|
|
3989
3989
|
className: "sc:bg-transparent sc:text-foreground sc:w-14 sc:rounded-md sc:border-none sc:px-2.5 sc:py-2 sc:text-right sc:text-base sc:md:w-14 sc:md:rounded sc:md:px-1.5 sc:md:py-1 sc:md:text-[13px]"
|
|
@@ -3994,7 +3994,7 @@ const hs = ({ element: e, onElementUpdate: s, className: n }) => {
|
|
|
3994
3994
|
Te,
|
|
3995
3995
|
{
|
|
3996
3996
|
value: [f * 100],
|
|
3997
|
-
onValueChange: (
|
|
3997
|
+
onValueChange: (v) => w(v[0] / 100),
|
|
3998
3998
|
min: 10,
|
|
3999
3999
|
max: 100,
|
|
4000
4000
|
step: 1,
|
|
@@ -4013,7 +4013,7 @@ const hs = ({ element: e, onElementUpdate: s, className: n }) => {
|
|
|
4013
4013
|
{
|
|
4014
4014
|
type: "number",
|
|
4015
4015
|
value: Math.round(b * 100),
|
|
4016
|
-
onChange: (
|
|
4016
|
+
onChange: (v) => y(Math.max(10, Math.min(100, Number(v.target.value))) / 100),
|
|
4017
4017
|
min: 10,
|
|
4018
4018
|
max: 100,
|
|
4019
4019
|
className: "sc:bg-transparent sc:text-foreground sc:w-14 sc:rounded-md sc:border-none sc:px-2.5 sc:py-2 sc:text-right sc:text-base sc:md:w-14 sc:md:rounded sc:md:px-1.5 sc:md:py-1 sc:md:text-[13px]"
|
|
@@ -4024,7 +4024,7 @@ const hs = ({ element: e, onElementUpdate: s, className: n }) => {
|
|
|
4024
4024
|
Te,
|
|
4025
4025
|
{
|
|
4026
4026
|
value: [b * 100],
|
|
4027
|
-
onValueChange: (
|
|
4027
|
+
onValueChange: (v) => y(v[0] / 100),
|
|
4028
4028
|
min: 10,
|
|
4029
4029
|
max: 100,
|
|
4030
4030
|
step: 1,
|
|
@@ -4039,7 +4039,7 @@ const hs = ({ element: e, onElementUpdate: s, className: n }) => {
|
|
|
4039
4039
|
] }) })
|
|
4040
4040
|
}
|
|
4041
4041
|
);
|
|
4042
|
-
},
|
|
4042
|
+
}, Fl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4043
4043
|
__proto__: null,
|
|
4044
4044
|
CropPanel: hs,
|
|
4045
4045
|
default: hs
|
|
@@ -4291,11 +4291,11 @@ const hs = ({ element: e, onElementUpdate: s, className: n }) => {
|
|
|
4291
4291
|
}) => {
|
|
4292
4292
|
var N;
|
|
4293
4293
|
const i = (n == null ? void 0 : n.type) === "linear" || (n == null ? void 0 : n.type) === "radial" ? n.type : "solid", f = (n == null ? void 0 : n.type) === "linear" || (n == null ? void 0 : n.type) === "radial" ? n : null, [b, m] = T(0), w = S(
|
|
4294
|
-
(
|
|
4295
|
-
var
|
|
4296
|
-
if (
|
|
4297
|
-
if (
|
|
4298
|
-
s(((
|
|
4294
|
+
(v) => {
|
|
4295
|
+
var I;
|
|
4296
|
+
if (v === i || !o) return;
|
|
4297
|
+
if (v === "solid") {
|
|
4298
|
+
s(((I = f == null ? void 0 : f.stops[0]) == null ? void 0 : I.color) ?? e);
|
|
4299
4299
|
return;
|
|
4300
4300
|
}
|
|
4301
4301
|
const M = f ? f.stops.map((D) => ({ ...D })) : [
|
|
@@ -4303,22 +4303,22 @@ const hs = ({ element: e, onElementUpdate: s, className: n }) => {
|
|
|
4303
4303
|
{ offset: 1, color: "#ffffff" }
|
|
4304
4304
|
];
|
|
4305
4305
|
o(
|
|
4306
|
-
|
|
4306
|
+
v === "linear" ? { type: "linear", angle: (f == null ? void 0 : f.type) === "linear" ? f.angle : 180, stops: M } : { type: "radial", stops: M }
|
|
4307
4307
|
), m(0);
|
|
4308
4308
|
},
|
|
4309
4309
|
[i, f, e, s, o]
|
|
4310
4310
|
), y = S(
|
|
4311
|
-
(
|
|
4311
|
+
(v) => {
|
|
4312
4312
|
if (!f || !o) return;
|
|
4313
|
-
const M = f.stops.map((
|
|
4313
|
+
const M = f.stops.map((I, D) => D === b ? { ...I, color: v } : { ...I });
|
|
4314
4314
|
o(
|
|
4315
4315
|
f.type === "linear" ? { type: "linear", angle: f.angle, stops: M } : { type: "radial", stops: M }
|
|
4316
4316
|
);
|
|
4317
4317
|
},
|
|
4318
4318
|
[f, b, o]
|
|
4319
|
-
),
|
|
4320
|
-
(
|
|
4321
|
-
(f == null ? void 0 : f.type) !== "linear" || !o || o({ type: "linear", angle:
|
|
4319
|
+
), x = S(
|
|
4320
|
+
(v) => {
|
|
4321
|
+
(f == null ? void 0 : f.type) !== "linear" || !o || o({ type: "linear", angle: v, stops: f.stops.map((M) => ({ ...M })) });
|
|
4322
4322
|
},
|
|
4323
4323
|
[f, o]
|
|
4324
4324
|
), g = f ? ((N = f.stops[b]) == null ? void 0 : N.color) ?? e : e;
|
|
@@ -4331,25 +4331,25 @@ const hs = ({ element: e, onElementUpdate: s, className: n }) => {
|
|
|
4331
4331
|
children: /* @__PURE__ */ h("div", { className: mc, children: [
|
|
4332
4332
|
o && /* @__PURE__ */ h("div", { className: "sc:flex sc:items-center sc:gap-3", children: [
|
|
4333
4333
|
/* @__PURE__ */ t(Me, { className: "sc:text-base sc:md:text-sm sc:font-medium", children: "Fill" }),
|
|
4334
|
-
/* @__PURE__ */ t("div", { className: "sc:flex sc:rounded-md sc:border sc:border-divider sc:overflow-hidden", children: ["solid", "linear", "radial"].map((
|
|
4334
|
+
/* @__PURE__ */ t("div", { className: "sc:flex sc:rounded-md sc:border sc:border-divider sc:overflow-hidden", children: ["solid", "linear", "radial"].map((v) => /* @__PURE__ */ t(
|
|
4335
4335
|
"button",
|
|
4336
4336
|
{
|
|
4337
|
-
className: `sc:px-4 sc:py-2.5 sc:text-base sc:md:px-3 sc:md:py-1.5 sc:md:text-sm sc:transition-colors ${i ===
|
|
4338
|
-
onClick: () => w(
|
|
4339
|
-
"aria-pressed": i ===
|
|
4340
|
-
children: Gi[
|
|
4337
|
+
className: `sc:px-4 sc:py-2.5 sc:text-base sc:md:px-3 sc:md:py-1.5 sc:md:text-sm sc:transition-colors ${i === v ? "sc:bg-primary sc:text-primary-foreground" : "sc:text-foreground sc:hover:bg-muted"}`,
|
|
4338
|
+
onClick: () => w(v),
|
|
4339
|
+
"aria-pressed": i === v,
|
|
4340
|
+
children: Gi[v]
|
|
4341
4341
|
},
|
|
4342
|
-
|
|
4342
|
+
v
|
|
4343
4343
|
)) })
|
|
4344
4344
|
] }),
|
|
4345
4345
|
f && /* @__PURE__ */ h(Ve, { children: [
|
|
4346
4346
|
/* @__PURE__ */ h("div", { className: "sc:flex sc:items-center sc:gap-3", children: [
|
|
4347
4347
|
/* @__PURE__ */ t(Me, { className: "sc:text-base sc:md:text-sm sc:font-medium", children: "Stops" }),
|
|
4348
|
-
/* @__PURE__ */ t("div", { className: "sc:flex sc:items-center sc:gap-2", children: f.stops.map((
|
|
4348
|
+
/* @__PURE__ */ t("div", { className: "sc:flex sc:items-center sc:gap-2", children: f.stops.map((v, M) => /* @__PURE__ */ t(
|
|
4349
4349
|
"button",
|
|
4350
4350
|
{
|
|
4351
4351
|
className: `sc:h-8 sc:w-8 sc:rounded-md sc:border-2 sc:transition-colors ${M === b ? "sc:border-primary" : "sc:border-divider"}`,
|
|
4352
|
-
style: { backgroundColor:
|
|
4352
|
+
style: { backgroundColor: v.color },
|
|
4353
4353
|
onClick: () => m(M),
|
|
4354
4354
|
"aria-label": `Edit gradient stop ${M + 1}`,
|
|
4355
4355
|
"aria-pressed": M === b
|
|
@@ -4362,7 +4362,7 @@ const hs = ({ element: e, onElementUpdate: s, className: n }) => {
|
|
|
4362
4362
|
{
|
|
4363
4363
|
label: "Angle",
|
|
4364
4364
|
value: Math.round(f.angle),
|
|
4365
|
-
onChange:
|
|
4365
|
+
onChange: x,
|
|
4366
4366
|
min: 0,
|
|
4367
4367
|
max: 360,
|
|
4368
4368
|
unit: "°"
|
|
@@ -4373,7 +4373,7 @@ const hs = ({ element: e, onElementUpdate: s, className: n }) => {
|
|
|
4373
4373
|
Et,
|
|
4374
4374
|
{
|
|
4375
4375
|
value: g,
|
|
4376
|
-
onChange: (
|
|
4376
|
+
onChange: (v) => f ? y(v.target.value) : s(v.target.value),
|
|
4377
4377
|
documentColors: r,
|
|
4378
4378
|
imageColors: c,
|
|
4379
4379
|
showSquare: !0,
|
|
@@ -4563,7 +4563,7 @@ const hs = ({ element: e, onElementUpdate: s, className: n }) => {
|
|
|
4563
4563
|
}
|
|
4564
4564
|
);
|
|
4565
4565
|
}, tl = ({ stroke: e, onChange: s, documentColors: n, imageColors: o }) => {
|
|
4566
|
-
const [r, c] = T(!1), i = (e == null ? void 0 : e.enabled) ?? !1, f = (e == null ? void 0 : e.color) ?? "#000000", b = (e == null ? void 0 : e.width) ?? 5, m = (e == null ? void 0 : e.opacity) ?? 1, w = (e == null ? void 0 : e.lineCap) ?? "butt", y = (e == null ? void 0 : e.lineJoin) ?? "miter",
|
|
4566
|
+
const [r, c] = T(!1), i = (e == null ? void 0 : e.enabled) ?? !1, f = (e == null ? void 0 : e.color) ?? "#000000", b = (e == null ? void 0 : e.width) ?? 5, m = (e == null ? void 0 : e.opacity) ?? 1, w = (e == null ? void 0 : e.lineCap) ?? "butt", y = (e == null ? void 0 : e.lineJoin) ?? "miter", x = S(
|
|
4567
4567
|
(N) => {
|
|
4568
4568
|
s(N ? { enabled: !0, color: f, width: b, lineCap: w, lineJoin: y, opacity: m } : void 0);
|
|
4569
4569
|
},
|
|
@@ -4583,7 +4583,7 @@ const hs = ({ element: e, onElementUpdate: s, className: n }) => {
|
|
|
4583
4583
|
children: /* @__PURE__ */ h("div", { className: Ue, children: [
|
|
4584
4584
|
/* @__PURE__ */ h("div", { className: "sc:flex sc:items-center sc:justify-between", children: [
|
|
4585
4585
|
/* @__PURE__ */ t(Me, { className: "sc:text-foreground/70 sc:text-base sc:md:text-[13px]", children: "Stroke" }),
|
|
4586
|
-
/* @__PURE__ */ t(bt, { checked: i, onCheckedChange:
|
|
4586
|
+
/* @__PURE__ */ t(bt, { checked: i, onCheckedChange: x })
|
|
4587
4587
|
] }),
|
|
4588
4588
|
i && /* @__PURE__ */ h(Ve, { children: [
|
|
4589
4589
|
/* @__PURE__ */ h("div", { className: "sc:flex sc:items-center sc:justify-between", children: [
|
|
@@ -4670,13 +4670,13 @@ const hs = ({ element: e, onElementUpdate: s, className: n }) => {
|
|
|
4670
4670
|
opacity: 0.5
|
|
4671
4671
|
}, sl = ({ shadow: e, onChange: s, documentColors: n, imageColors: o }) => {
|
|
4672
4672
|
const r = (e == null ? void 0 : e.enabled) ?? !1, c = (e == null ? void 0 : e.color) ?? jt.color, i = (e == null ? void 0 : e.blur) ?? jt.blur, f = (e == null ? void 0 : e.offsetX) ?? jt.offsetX, b = (e == null ? void 0 : e.offsetY) ?? jt.offsetY, m = (e == null ? void 0 : e.opacity) ?? jt.opacity, w = S(
|
|
4673
|
-
(
|
|
4674
|
-
s(
|
|
4673
|
+
(x) => {
|
|
4674
|
+
s(x ? { enabled: !0, color: c, blur: i, offsetX: f, offsetY: b, opacity: m } : void 0);
|
|
4675
4675
|
},
|
|
4676
4676
|
[s, c, i, f, b, m]
|
|
4677
4677
|
), y = S(
|
|
4678
|
-
(
|
|
4679
|
-
e && s({ ...e, ...
|
|
4678
|
+
(x) => {
|
|
4679
|
+
e && s({ ...e, ...x });
|
|
4680
4680
|
},
|
|
4681
4681
|
[e, s]
|
|
4682
4682
|
);
|
|
@@ -4699,7 +4699,7 @@ const hs = ({ element: e, onElementUpdate: s, className: n }) => {
|
|
|
4699
4699
|
Et,
|
|
4700
4700
|
{
|
|
4701
4701
|
value: c,
|
|
4702
|
-
onChange: (
|
|
4702
|
+
onChange: (x) => y({ color: x.target.value }),
|
|
4703
4703
|
documentColors: n,
|
|
4704
4704
|
imageColors: o,
|
|
4705
4705
|
showSquare: !0
|
|
@@ -4711,7 +4711,7 @@ const hs = ({ element: e, onElementUpdate: s, className: n }) => {
|
|
|
4711
4711
|
{
|
|
4712
4712
|
label: "Blur",
|
|
4713
4713
|
value: i,
|
|
4714
|
-
onChange: (
|
|
4714
|
+
onChange: (x) => y({ blur: x }),
|
|
4715
4715
|
min: 0,
|
|
4716
4716
|
max: 100,
|
|
4717
4717
|
unit: "px"
|
|
@@ -4722,7 +4722,7 @@ const hs = ({ element: e, onElementUpdate: s, className: n }) => {
|
|
|
4722
4722
|
{
|
|
4723
4723
|
label: "Offset X",
|
|
4724
4724
|
value: f,
|
|
4725
|
-
onChange: (
|
|
4725
|
+
onChange: (x) => y({ offsetX: x }),
|
|
4726
4726
|
min: -100,
|
|
4727
4727
|
max: 100,
|
|
4728
4728
|
unit: "px"
|
|
@@ -4733,7 +4733,7 @@ const hs = ({ element: e, onElementUpdate: s, className: n }) => {
|
|
|
4733
4733
|
{
|
|
4734
4734
|
label: "Offset Y",
|
|
4735
4735
|
value: b,
|
|
4736
|
-
onChange: (
|
|
4736
|
+
onChange: (x) => y({ offsetY: x }),
|
|
4737
4737
|
min: -100,
|
|
4738
4738
|
max: 100,
|
|
4739
4739
|
unit: "px"
|
|
@@ -4744,7 +4744,7 @@ const hs = ({ element: e, onElementUpdate: s, className: n }) => {
|
|
|
4744
4744
|
{
|
|
4745
4745
|
label: "Opacity",
|
|
4746
4746
|
value: Math.round(m * 100),
|
|
4747
|
-
onChange: (
|
|
4747
|
+
onChange: (x) => y({ opacity: x / 100 }),
|
|
4748
4748
|
min: 0,
|
|
4749
4749
|
max: 100,
|
|
4750
4750
|
unit: "%"
|
|
@@ -4872,15 +4872,15 @@ const hs = ({ element: e, onElementUpdate: s, className: n }) => {
|
|
|
4872
4872
|
isRotationPanelOpen: m,
|
|
4873
4873
|
isOpacityPanelOpen: w,
|
|
4874
4874
|
isAdjustPanelOpen: y,
|
|
4875
|
-
isFontSizePanelOpen:
|
|
4875
|
+
isFontSizePanelOpen: x,
|
|
4876
4876
|
isShapeCornerRadiusPanelOpen: g,
|
|
4877
4877
|
isShapeTransparencyPanelOpen: N,
|
|
4878
|
-
isShapeSidesPanelOpen:
|
|
4878
|
+
isShapeSidesPanelOpen: v,
|
|
4879
4879
|
isShapePointsPanelOpen: M,
|
|
4880
|
-
isShapeInnerRadiusPanelOpen:
|
|
4880
|
+
isShapeInnerRadiusPanelOpen: I,
|
|
4881
4881
|
isShapeColorPanelOpen: D,
|
|
4882
4882
|
isTextColorPanelOpen: k,
|
|
4883
|
-
isStrokePanelOpen:
|
|
4883
|
+
isStrokePanelOpen: E,
|
|
4884
4884
|
isShadowPanelOpen: L,
|
|
4885
4885
|
isBlendModePanelOpen: z,
|
|
4886
4886
|
isKnockoutPanelOpen: q,
|
|
@@ -4945,15 +4945,15 @@ const hs = ({ element: e, onElementUpdate: s, className: n }) => {
|
|
|
4945
4945
|
/* @__PURE__ */ t(Ae, { isOpen: m, children: de }),
|
|
4946
4946
|
/* @__PURE__ */ t(Ae, { isOpen: w, children: X }),
|
|
4947
4947
|
/* @__PURE__ */ t(Ae, { isOpen: y, children: K }),
|
|
4948
|
-
/* @__PURE__ */ t(Ae, { isOpen:
|
|
4948
|
+
/* @__PURE__ */ t(Ae, { isOpen: x, children: Y }),
|
|
4949
4949
|
/* @__PURE__ */ t(Ae, { isOpen: g, children: ue }),
|
|
4950
4950
|
/* @__PURE__ */ t(Ae, { isOpen: N, children: A }),
|
|
4951
|
-
/* @__PURE__ */ t(Ae, { isOpen:
|
|
4951
|
+
/* @__PURE__ */ t(Ae, { isOpen: v, children: te }),
|
|
4952
4952
|
/* @__PURE__ */ t(Ae, { isOpen: M, children: De }),
|
|
4953
|
-
/* @__PURE__ */ t(Ae, { isOpen:
|
|
4953
|
+
/* @__PURE__ */ t(Ae, { isOpen: I, children: W }),
|
|
4954
4954
|
/* @__PURE__ */ t(No, { isOpen: D, children: xe }),
|
|
4955
4955
|
/* @__PURE__ */ t(No, { isOpen: k, children: Ce }),
|
|
4956
|
-
/* @__PURE__ */ t(Ae, { isOpen:
|
|
4956
|
+
/* @__PURE__ */ t(Ae, { isOpen: E, children: we }),
|
|
4957
4957
|
/* @__PURE__ */ t(Ae, { isOpen: L, children: Re }),
|
|
4958
4958
|
/* @__PURE__ */ t(Ae, { isOpen: z, children: Ee }),
|
|
4959
4959
|
/* @__PURE__ */ t(Ae, { isOpen: q, children: ye }),
|
|
@@ -5155,7 +5155,14 @@ const Us = (e) => e.toString(16).padStart(2, "0");
|
|
|
5155
5155
|
function xl(e) {
|
|
5156
5156
|
return `#${Us(e.r)}${Us(e.g)}${Us(e.b)}`;
|
|
5157
5157
|
}
|
|
5158
|
-
|
|
5158
|
+
function vl(e, s = 5) {
|
|
5159
|
+
if (e.length === 0 || s <= 0) return [];
|
|
5160
|
+
const n = Math.max(s * 4, 16), o = gl(e, n);
|
|
5161
|
+
o.sort((c, i) => i.pixels.length - c.pixels.length);
|
|
5162
|
+
const r = o.map((c) => ml(c.pixels));
|
|
5163
|
+
return yl(r, s, 50).map(xl);
|
|
5164
|
+
}
|
|
5165
|
+
async function Cl(e, s = 5) {
|
|
5159
5166
|
if (!e) return [];
|
|
5160
5167
|
const n = fs.get(e);
|
|
5161
5168
|
if (n) return n;
|
|
@@ -5163,7 +5170,7 @@ async function vl(e, s = 5) {
|
|
|
5163
5170
|
if (o) return o;
|
|
5164
5171
|
const r = (async () => {
|
|
5165
5172
|
try {
|
|
5166
|
-
const c = await
|
|
5173
|
+
const c = await wl(e), i = 48, b = (typeof OffscreenCanvas < "u" ? new OffscreenCanvas(i, i) : (() => {
|
|
5167
5174
|
const x = document.createElement("canvas");
|
|
5168
5175
|
return x.width = i, x.height = i, x;
|
|
5169
5176
|
})()).getContext("2d");
|
|
@@ -5172,15 +5179,13 @@ async function vl(e, s = 5) {
|
|
|
5172
5179
|
const { data: m } = b.getImageData(0, 0, i, i), w = [];
|
|
5173
5180
|
for (let x = 0; x < m.length; x += 4) {
|
|
5174
5181
|
if (m[x + 3] < 128) continue;
|
|
5175
|
-
const
|
|
5176
|
-
|
|
5182
|
+
const N = m[x], v = m[x + 1], M = m[x + 2];
|
|
5183
|
+
N > 240 && v > 240 && M > 240 || w.push({ r: N, g: v, b: M });
|
|
5177
5184
|
}
|
|
5178
5185
|
if (w.length === 0)
|
|
5179
5186
|
return fs.set(e, []), [];
|
|
5180
|
-
const y =
|
|
5181
|
-
|
|
5182
|
-
const g = v.map((x) => ml(x.pixels)), N = yl(g, s, 50).map(xl);
|
|
5183
|
-
return fs.set(e, N), N;
|
|
5187
|
+
const y = vl(w, s);
|
|
5188
|
+
return fs.set(e, y), y;
|
|
5184
5189
|
} catch {
|
|
5185
5190
|
return fs.set(e, []), [];
|
|
5186
5191
|
} finally {
|
|
@@ -5189,13 +5194,13 @@ async function vl(e, s = 5) {
|
|
|
5189
5194
|
})();
|
|
5190
5195
|
return Bs.set(e, r), r;
|
|
5191
5196
|
}
|
|
5192
|
-
function
|
|
5197
|
+
function wl(e) {
|
|
5193
5198
|
return new Promise((s, n) => {
|
|
5194
5199
|
const o = new Image();
|
|
5195
5200
|
o.crossOrigin = "anonymous", o.onload = () => s(o), o.onerror = () => n(new Error(`Failed to load image: ${e}`)), o.src = e;
|
|
5196
5201
|
});
|
|
5197
5202
|
}
|
|
5198
|
-
async function
|
|
5203
|
+
async function kl(e, s = 5) {
|
|
5199
5204
|
const n = [], o = /* @__PURE__ */ new Set(), r = (b) => {
|
|
5200
5205
|
if (b instanceof ot) {
|
|
5201
5206
|
const m = b.imageUrl;
|
|
@@ -5206,22 +5211,22 @@ async function wl(e, s = 5) {
|
|
|
5206
5211
|
for (const b of e) r(b);
|
|
5207
5212
|
if (n.length === 0) return [];
|
|
5208
5213
|
const c = await Promise.all(
|
|
5209
|
-
n.map((b) =>
|
|
5214
|
+
n.map((b) => Cl(b, s))
|
|
5210
5215
|
), i = [], f = /* @__PURE__ */ new Set();
|
|
5211
5216
|
for (const b of c)
|
|
5212
5217
|
for (const m of b)
|
|
5213
5218
|
f.has(m) || (f.add(m), i.push(m));
|
|
5214
5219
|
return i;
|
|
5215
5220
|
}
|
|
5216
|
-
const So = bs("ContextualToolbars"),
|
|
5217
|
-
function
|
|
5221
|
+
const So = bs("ContextualToolbars"), Tl = "Background removal is temporarily unavailable.";
|
|
5222
|
+
function Nl(e, s) {
|
|
5218
5223
|
const n = e instanceof Error ? e.message : "";
|
|
5219
5224
|
return !n || /VITE_|NEXT_PUBLIC_|\.env/i.test(n) ? s : n;
|
|
5220
5225
|
}
|
|
5221
5226
|
const Do = ({ services: e, ...s }) => {
|
|
5222
|
-
const n = /* @__PURE__ */ t(
|
|
5227
|
+
const n = /* @__PURE__ */ t(Sl, { ...s });
|
|
5223
5228
|
return e ? /* @__PURE__ */ t(br, { services: e, children: n }) : n;
|
|
5224
|
-
},
|
|
5229
|
+
}, Sl = ({
|
|
5225
5230
|
mode: e = "floating",
|
|
5226
5231
|
onOpenGlyphBrowser: s,
|
|
5227
5232
|
onChangeImage: n,
|
|
@@ -5234,15 +5239,15 @@ const Do = ({ services: e, ...s }) => {
|
|
|
5234
5239
|
onArtboardUpdate: m,
|
|
5235
5240
|
artboardScreenBounds: w,
|
|
5236
5241
|
maxWidth: y,
|
|
5237
|
-
transparent:
|
|
5242
|
+
transparent: x = !1,
|
|
5238
5243
|
onPanelExpandChange: g,
|
|
5239
5244
|
defaultExpandedPanel: N,
|
|
5240
|
-
onExpandedPanelTypeChange:
|
|
5245
|
+
onExpandedPanelTypeChange: v,
|
|
5241
5246
|
onOpenCropDrawer: M,
|
|
5242
|
-
onOpenCornerRadiusDrawer:
|
|
5247
|
+
onOpenCornerRadiusDrawer: I,
|
|
5243
5248
|
closeButtonStyle: D = "icon",
|
|
5244
5249
|
emptyStateMessage: k = "Tap an element to select and edit",
|
|
5245
|
-
emptyStateRender:
|
|
5250
|
+
emptyStateRender: E,
|
|
5246
5251
|
editArtboardMode: L = !1,
|
|
5247
5252
|
onEditArtboardModeChange: z,
|
|
5248
5253
|
onLayerThumbnailClick: q,
|
|
@@ -5335,7 +5340,7 @@ const Do = ({ services: e, ...s }) => {
|
|
|
5335
5340
|
mn(!0), Ds(null), p(a.imageUrl).then((F) => {
|
|
5336
5341
|
zt.current && bn(u, F);
|
|
5337
5342
|
}).catch((F) => {
|
|
5338
|
-
So.error("Error removing background:", F), zt.current && Ds(
|
|
5343
|
+
So.error("Error removing background:", F), zt.current && Ds(Nl(F, Tl));
|
|
5339
5344
|
}).finally(() => {
|
|
5340
5345
|
zt.current && mn(!1);
|
|
5341
5346
|
});
|
|
@@ -5397,10 +5402,10 @@ const Do = ({ services: e, ...s }) => {
|
|
|
5397
5402
|
(a) => (a == null ? void 0 : a.type) === "align" ? null : { type: "align", icon: "gravity-ui:objects-align-center-vertical", label: "Position" }
|
|
5398
5403
|
);
|
|
5399
5404
|
}, []), zc = S(() => {
|
|
5400
|
-
|
|
5405
|
+
I ? I() : ce(
|
|
5401
5406
|
(a) => (a == null ? void 0 : a.type) === "cornerRadius" ? null : { type: "cornerRadius", icon: "lucide:square-round-corner", label: "Corner Radius" }
|
|
5402
5407
|
);
|
|
5403
|
-
}, [
|
|
5408
|
+
}, [I]), Lc = S(() => {
|
|
5404
5409
|
M ? M() : ce((a) => (a == null ? void 0 : a.type) === "crop" ? null : { type: "crop", icon: "lucide:crop", label: "Crop" });
|
|
5405
5410
|
}, [M]), Jt = S(() => {
|
|
5406
5411
|
ce(
|
|
@@ -5700,10 +5705,10 @@ const Do = ({ services: e, ...s }) => {
|
|
|
5700
5705
|
o ? o() : $e(!0);
|
|
5701
5706
|
}, [o]);
|
|
5702
5707
|
Z(() => {
|
|
5703
|
-
g == null || g(l !== null),
|
|
5708
|
+
g == null || g(l !== null), v == null || v(
|
|
5704
5709
|
(l == null ? void 0 : l.type) ?? null
|
|
5705
5710
|
);
|
|
5706
|
-
}, [l, g,
|
|
5711
|
+
}, [l, g, v]), Z(() => {
|
|
5707
5712
|
const a = (l == null ? void 0 : l.type) ?? null;
|
|
5708
5713
|
a !== Zt.current && (Zt.current = a, de(a));
|
|
5709
5714
|
}, [l, de]), Z(() => {
|
|
@@ -5875,7 +5880,7 @@ const Do = ({ services: e, ...s }) => {
|
|
|
5875
5880
|
return;
|
|
5876
5881
|
}
|
|
5877
5882
|
let a = !1;
|
|
5878
|
-
return
|
|
5883
|
+
return kl(Y).then((u) => {
|
|
5879
5884
|
a || Tn(u);
|
|
5880
5885
|
}), () => {
|
|
5881
5886
|
a = !0;
|
|
@@ -6198,7 +6203,7 @@ const Do = ({ services: e, ...s }) => {
|
|
|
6198
6203
|
"data-sc-part": B,
|
|
6199
6204
|
"data-mode": e,
|
|
6200
6205
|
"data-wrap": y ? "" : void 0,
|
|
6201
|
-
"data-transparent":
|
|
6206
|
+
"data-transparent": x ? "" : void 0,
|
|
6202
6207
|
"data-panel-expanded": l ? "" : void 0,
|
|
6203
6208
|
"data-preserve-selection": !0,
|
|
6204
6209
|
style: {
|
|
@@ -6310,7 +6315,7 @@ const Do = ({ services: e, ...s }) => {
|
|
|
6310
6315
|
onOpacityChange: ia,
|
|
6311
6316
|
onInvertedChange: la
|
|
6312
6317
|
}
|
|
6313
|
-
) : null, er = e === "embedded" && !A && !L ?
|
|
6318
|
+
) : null, er = e === "embedded" && !A && !L ? E ? /* @__PURE__ */ t("div", { className: "toolbar-empty-state", children: E }) : k !== null ? /* @__PURE__ */ t(
|
|
6314
6319
|
"div",
|
|
6315
6320
|
{
|
|
6316
6321
|
className: "toolbar-empty-state",
|
|
@@ -6491,7 +6496,7 @@ const Do = ({ services: e, ...s }) => {
|
|
|
6491
6496
|
}
|
|
6492
6497
|
)
|
|
6493
6498
|
] });
|
|
6494
|
-
},
|
|
6499
|
+
}, Ol = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6495
6500
|
__proto__: null,
|
|
6496
6501
|
ContextualToolbars: Do,
|
|
6497
6502
|
default: Do
|
|
@@ -6525,8 +6530,8 @@ export {
|
|
|
6525
6530
|
bt as o,
|
|
6526
6531
|
Xo as p,
|
|
6527
6532
|
Te as q,
|
|
6528
|
-
|
|
6529
|
-
|
|
6533
|
+
Fl as r,
|
|
6534
|
+
Ol as s,
|
|
6530
6535
|
Ei as u
|
|
6531
6536
|
};
|
|
6532
|
-
//# sourceMappingURL=ContextualToolbars-
|
|
6537
|
+
//# sourceMappingURL=ContextualToolbars-_5zqlcSw.js.map
|