@snowcone-app/canvas 0.37.1 → 0.39.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-COO5UXtZ.js} +704 -669
- package/dist/CanvasRenderer-COO5UXtZ.js.map +1 -0
- package/dist/{CanvasStateV1-DLE5d1-d.js → CanvasStateV1-CJJff7Ci.js} +319 -318
- package/dist/{CanvasStateV1-DLE5d1-d.js.map → CanvasStateV1-CJJff7Ci.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-C_72UKu3.js +144 -0
- package/dist/EditorCanvasImpl-C_72UKu3.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-C-YbGCcQ.js +1112 -0
- package/dist/SnowconeCanvas-C-YbGCcQ.js.map +1 -0
- package/dist/advanced.mjs +427 -429
- package/dist/advanced.mjs.map +1 -1
- package/dist/api/placement.d.ts +3 -0
- package/dist/components/VisualGuideOverlay.d.ts +4 -1
- 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 +3 -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-DtlgX9iG.js} +843 -729
- package/dist/embed-DtlgX9iG.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/rendering/PieceGuideRenderer.d.ts +4 -1
- package/dist/state/CanvasStateV1.d.ts +3 -3
- package/dist/template-fields-Dltc4Ztb.js +556 -0
- package/dist/template-fields-Dltc4Ztb.js.map +1 -0
- package/dist/testing.mjs +24 -24
- package/dist/types/index.d.ts +2 -1
- 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-Cab2gRnn.js +68 -0
- package/dist/usePieceGuideBundle-Cab2gRnn.js.map +1 -0
- package/dist/utils/pieceRotation.d.ts +35 -0
- package/dist/{validation-THw5W6N_.js → validation-Dh9sVEb9.js} +1182 -1184
- package/dist/validation-Dh9sVEb9.js.map +1 -0
- package/example/package.json +1 -1
- package/package.json +7 -2
- package/dist/CanvasRenderer-CTN4j-uO.js.map +0 -1
- 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
package/dist/advanced.mjs
CHANGED
|
@@ -1,115 +1,116 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { r as
|
|
4
|
-
import {
|
|
5
|
-
import { ImagePanel as
|
|
6
|
-
import { P as
|
|
7
|
-
import { A as
|
|
8
|
-
import {
|
|
9
|
-
import { E as
|
|
10
|
-
import { T as wr, u as
|
|
11
|
-
import { c as
|
|
12
|
-
import { A as
|
|
13
|
-
import {
|
|
14
|
-
import { useState as A, useCallback as y, useEffect as
|
|
15
|
-
import { I as
|
|
16
|
-
import { e as
|
|
17
|
-
import { jsxs as
|
|
18
|
-
import {
|
|
19
|
-
|
|
1
|
+
import { p as Q, T as M, q as D, B as ee, I as j, r as I, s as te, e as re } from "./useCommands-x8J7_Mzy.js";
|
|
2
|
+
import { t as it, L as ct, M as lt, v as dt, S as ut, w as mt, x as ft, u as ht } from "./useCommands-x8J7_Mzy.js";
|
|
3
|
+
import { r as ne, v as se } from "./validation-Dh9sVEb9.js";
|
|
4
|
+
import { d as xt, e as gt, f as bt, h as yt, D as vt, b as St, c as wt, G as Ct, i as Tt, K as Et, L as kt, S as $t, T as At, Z as Ft, j as Pt, g as Nt, k as Bt, l as Rt, a as Mt, m as Dt, n as It, u as zt, o as Ot, p as Lt } from "./validation-Dh9sVEb9.js";
|
|
5
|
+
import { ImagePanel as Kt } from "./ImagePanel-BaX0UE-L.js";
|
|
6
|
+
import { P as ae, b as oe, c as ie } from "./ContextualToolbars-C62As-xY.js";
|
|
7
|
+
import { A as _t, B as Ut, d as jt, e as qt, C as Jt, a as Zt, F as Vt, f as Xt, I as Yt, g as Ht, M as Qt, h as er, S as tr, T as rr, i as nr, j as sr, k as ar, U as or, l as ir, u as cr, m as lr } from "./ContextualToolbars-C62As-xY.js";
|
|
8
|
+
import { b as q } from "./design-builder-CoCtjIwj.js";
|
|
9
|
+
import { E as ur, P as mr, p as fr, j as hr, a as pr, u as xr, k as gr, c as br, m as yr, d as vr } from "./design-builder-CoCtjIwj.js";
|
|
10
|
+
import { T as wr, u as Cr } from "./ThemeContext-Rjz25x9X.js";
|
|
11
|
+
import { c as ce, G as le, ap as de, q as ue, aq as me, ar as fe } from "./FontAnalyzer-DWHS41ba.js";
|
|
12
|
+
import { A as Er, as as kr, I as $r, P as Ar, at as Fr, S as Pr, T as Nr, au as Br, av as Rr, aw as Mr, ax as Dr, ay as Ir, az as zr, aA as Or, aB as Lr, aC as Wr, aD as Kr, aE as Gr, aF as _r, aG as Ur, aH as jr, aI as qr, aJ as Jr, aK as Zr, aL as Vr, aM as Xr, aN as Yr } from "./FontAnalyzer-DWHS41ba.js";
|
|
13
|
+
import { a as Qr, i as en, b as tn, c as rn, d as nn } from "./guards-DMmhw_Ow.js";
|
|
14
|
+
import { useState as A, useCallback as y, useEffect as J, useMemo as Z, useRef as R, memo as he } from "react";
|
|
15
|
+
import { I as pe } from "./ExportManager-BbBfO22S.js";
|
|
16
|
+
import { e as xe, c as ge } from "./compose-DtQL_oit.js";
|
|
17
|
+
import { jsxs as g, jsx as o, Fragment as be } from "react/jsx-runtime";
|
|
18
|
+
import { n as ye, p as ve } from "./CanvasRenderer-COO5UXtZ.js";
|
|
19
|
+
import { P as an, p as on, u as cn } from "./usePieceGuideBundle-Cab2gRnn.js";
|
|
20
|
+
const Oe = ({
|
|
20
21
|
title: e,
|
|
21
22
|
icon: t,
|
|
22
23
|
children: r,
|
|
23
|
-
enableable:
|
|
24
|
+
enableable: a = !1,
|
|
24
25
|
enabled: n = !1,
|
|
25
26
|
onEnabledChange: s,
|
|
26
27
|
collapsible: i = !1,
|
|
27
|
-
expanded:
|
|
28
|
+
expanded: d = !0,
|
|
28
29
|
onExpandChange: l,
|
|
29
|
-
className:
|
|
30
|
+
className: h = ""
|
|
30
31
|
}) => {
|
|
31
|
-
const w =
|
|
32
|
+
const w = a ? n && d : i ? d : !0, p = a && n || i, u = () => {
|
|
32
33
|
s && s(!n);
|
|
33
34
|
}, c = () => {
|
|
34
|
-
l && l(!
|
|
35
|
+
l && l(!d);
|
|
35
36
|
};
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
|
|
37
|
+
return /* @__PURE__ */ g("div", { className: `sc:rounded-xl sc:border sc:border-border-primary sc:bg-bg-secondary sc:p-xl ${h}`, children: [
|
|
38
|
+
/* @__PURE__ */ g("div", { className: "sc:flex sc:items-center sc:justify-between", children: [
|
|
39
|
+
/* @__PURE__ */ g("div", { className: "sc:flex sc:items-center sc:gap-md", children: [
|
|
40
|
+
a && /* @__PURE__ */ o("label", { className: "sc:flex sc:cursor-pointer sc:items-center", children: /* @__PURE__ */ o(
|
|
40
41
|
"input",
|
|
41
42
|
{
|
|
42
43
|
type: "checkbox",
|
|
43
44
|
checked: n,
|
|
44
|
-
onChange:
|
|
45
|
+
onChange: u,
|
|
45
46
|
className: "sc:h-4 sc:w-4 sc:cursor-pointer sc:rounded sc:border-border-primary sc:bg-bg-input sc:accent-accent-primary"
|
|
46
47
|
}
|
|
47
48
|
) }),
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
t && /* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ g("div", { className: "sc:flex sc:items-center sc:gap-md", children: [
|
|
50
|
+
t && /* @__PURE__ */ o("span", { className: "sc:flex sc:items-center sc:text-text-secondary", children: t }),
|
|
51
|
+
/* @__PURE__ */ o("h3", { className: "sc:text-xl sc:font-semibold sc:text-text-primary", children: e })
|
|
51
52
|
] })
|
|
52
53
|
] }),
|
|
53
|
-
|
|
54
|
+
p && /* @__PURE__ */ o(
|
|
54
55
|
"button",
|
|
55
56
|
{
|
|
56
57
|
onClick: c,
|
|
57
58
|
className: "sc:rounded-lg sc:border-none sc:bg-transparent sc:px-md sc:py-xs sc:text-base sc:text-text-muted sc:transition-colors sc:duration-fast sc:hover:text-text-primary",
|
|
58
|
-
title:
|
|
59
|
-
children:
|
|
59
|
+
title: d ? "Collapse" : "Expand",
|
|
60
|
+
children: d ? "▼" : "▶"
|
|
60
61
|
}
|
|
61
62
|
)
|
|
62
63
|
] }),
|
|
63
|
-
w && /* @__PURE__ */
|
|
64
|
+
w && /* @__PURE__ */ o("div", { className: "sc:mt-xl sc:flex sc:flex-col sc:gap-xl", children: r })
|
|
64
65
|
] });
|
|
65
|
-
},
|
|
66
|
+
}, Le = ({
|
|
66
67
|
label: e,
|
|
67
68
|
labelSuffix: t,
|
|
68
69
|
children: r,
|
|
69
|
-
inline:
|
|
70
|
+
inline: a = !1,
|
|
70
71
|
className: n = ""
|
|
71
|
-
}) => /* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
t && /* @__PURE__ */
|
|
72
|
+
}) => /* @__PURE__ */ g("div", { className: `sc:flex ${a ? "sc:items-center sc:justify-between" : "sc:flex-col"} sc:gap-sm ${n}`, children: [
|
|
73
|
+
/* @__PURE__ */ g("label", { className: "sc:flex sc:items-center sc:justify-between sc:text-base sc:font-medium sc:text-text-secondary", children: [
|
|
74
|
+
/* @__PURE__ */ o("span", { children: e }),
|
|
75
|
+
t && /* @__PURE__ */ o("span", { className: "sc:font-semibold sc:text-accent-primary", children: t })
|
|
75
76
|
] }),
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ o("div", { className: a ? "sc:flex-shrink-0" : "", children: r })
|
|
77
78
|
] });
|
|
78
|
-
function
|
|
79
|
+
function We({
|
|
79
80
|
options: e,
|
|
80
81
|
value: t,
|
|
81
82
|
onChange: r,
|
|
82
|
-
fullWidth:
|
|
83
|
+
fullWidth: a = !0,
|
|
83
84
|
className: n = ""
|
|
84
85
|
}) {
|
|
85
|
-
return /* @__PURE__ */
|
|
86
|
+
return /* @__PURE__ */ o("div", { className: `sc:flex sc:gap-sm ${n}`, children: e.map((s) => {
|
|
86
87
|
const i = s.value === t;
|
|
87
|
-
return /* @__PURE__ */
|
|
88
|
+
return /* @__PURE__ */ g(
|
|
88
89
|
"button",
|
|
89
90
|
{
|
|
90
91
|
onClick: () => !s.disabled && r(s.value),
|
|
91
92
|
disabled: s.disabled,
|
|
92
93
|
title: s.tooltip,
|
|
93
|
-
className: ` ${
|
|
94
|
+
className: ` ${a ? "sc:flex-1" : ""} sc:flex sc:items-center sc:justify-center sc:gap-xs sc:rounded-lg sc:border sc:px-md sc:py-sm sc:text-base sc:font-medium sc:transition-all sc:duration-fast ${i ? "sc:border-accent-primary sc:bg-accent-primary sc:text-text-on-accent" : "sc:border-border-primary sc:bg-bg-tertiary sc:text-text-secondary sc:hover:border-border-secondary sc:hover:bg-bg-hover sc:hover:text-text-primary"} ${s.disabled ? "sc:cursor-not-allowed sc:opacity-disabled" : "sc:cursor-pointer"} `,
|
|
94
95
|
children: [
|
|
95
|
-
s.icon && /* @__PURE__ */
|
|
96
|
-
/* @__PURE__ */
|
|
96
|
+
s.icon && /* @__PURE__ */ o("span", { className: "sc:flex sc:items-center", children: s.icon }),
|
|
97
|
+
/* @__PURE__ */ o("span", { children: s.label })
|
|
97
98
|
]
|
|
98
99
|
},
|
|
99
100
|
String(s.value)
|
|
100
101
|
);
|
|
101
102
|
}) });
|
|
102
103
|
}
|
|
103
|
-
const
|
|
104
|
-
const i = (
|
|
105
|
-
|
|
104
|
+
const Ke = ({ label: e, icon: t, checked: r, onChange: a, disabled: n = !1, className: s = "" }) => {
|
|
105
|
+
const i = (d) => {
|
|
106
|
+
a(d.target.checked);
|
|
106
107
|
};
|
|
107
|
-
return /* @__PURE__ */
|
|
108
|
+
return /* @__PURE__ */ g(
|
|
108
109
|
"label",
|
|
109
110
|
{
|
|
110
111
|
className: `sc:flex sc:cursor-pointer sc:items-center sc:gap-md ${n ? "sc:cursor-not-allowed sc:opacity-disabled" : ""} ${s}`,
|
|
111
112
|
children: [
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ o(
|
|
113
114
|
"input",
|
|
114
115
|
{
|
|
115
116
|
type: "checkbox",
|
|
@@ -119,39 +120,39 @@ const We = ({ label: e, icon: t, checked: r, onChange: o, disabled: n = !1, clas
|
|
|
119
120
|
className: "sc:h-4 sc:w-4 sc:cursor-pointer sc:rounded sc:border-border-primary sc:bg-bg-input sc:accent-accent-primary sc:disabled:cursor-not-allowed"
|
|
120
121
|
}
|
|
121
122
|
),
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
-
t && /* @__PURE__ */
|
|
124
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ g("span", { className: "sc:flex sc:items-center sc:gap-sm sc:text-base sc:font-medium sc:text-text-primary", children: [
|
|
124
|
+
t && /* @__PURE__ */ o("span", { className: "sc:flex sc:items-center sc:text-text-secondary", children: t }),
|
|
125
|
+
/* @__PURE__ */ o("span", { children: e })
|
|
125
126
|
] })
|
|
126
127
|
]
|
|
127
128
|
}
|
|
128
129
|
);
|
|
129
|
-
},
|
|
130
|
+
}, Ge = ({
|
|
130
131
|
checked: e,
|
|
131
132
|
onChange: t,
|
|
132
133
|
label: r,
|
|
133
|
-
disabled:
|
|
134
|
+
disabled: a = !1,
|
|
134
135
|
className: n = ""
|
|
135
136
|
}) => {
|
|
136
137
|
const s = () => {
|
|
137
|
-
|
|
138
|
+
a || t(!e);
|
|
138
139
|
};
|
|
139
|
-
return /* @__PURE__ */
|
|
140
|
+
return /* @__PURE__ */ g(
|
|
140
141
|
"label",
|
|
141
142
|
{
|
|
142
|
-
className: `sc:flex sc:items-center sc:gap-md sc:cursor-pointer sc:select-none ${
|
|
143
|
+
className: `sc:flex sc:items-center sc:gap-md sc:cursor-pointer sc:select-none ${a ? "sc:opacity-50 sc:cursor-not-allowed" : ""} ${n}`.trim(),
|
|
143
144
|
children: [
|
|
144
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ o(
|
|
145
146
|
"input",
|
|
146
147
|
{
|
|
147
148
|
type: "checkbox",
|
|
148
149
|
checked: e,
|
|
149
150
|
onChange: s,
|
|
150
|
-
disabled:
|
|
151
|
+
disabled: a,
|
|
151
152
|
className: "sc:absolute sc:opacity-0 sc:w-0 sc:h-0 sc:peer"
|
|
152
153
|
}
|
|
153
154
|
),
|
|
154
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ o(
|
|
155
156
|
"span",
|
|
156
157
|
{
|
|
157
158
|
className: `
|
|
@@ -164,41 +165,41 @@ const We = ({ label: e, icon: t, checked: r, onChange: o, disabled: n = !1, clas
|
|
|
164
165
|
`.trim()
|
|
165
166
|
}
|
|
166
167
|
),
|
|
167
|
-
r && /* @__PURE__ */
|
|
168
|
+
r && /* @__PURE__ */ o("span", { className: "sc:text-md sc:text-text-primary sc:font-medium", children: r })
|
|
168
169
|
]
|
|
169
170
|
}
|
|
170
171
|
);
|
|
171
|
-
},
|
|
172
|
+
}, _e = ({
|
|
172
173
|
isOpen: e,
|
|
173
174
|
onToggle: t,
|
|
174
175
|
trigger: r,
|
|
175
|
-
children:
|
|
176
|
-
}) => /* @__PURE__ */
|
|
177
|
-
|
|
176
|
+
children: a
|
|
177
|
+
}) => /* @__PURE__ */ o(
|
|
178
|
+
Q,
|
|
178
179
|
{
|
|
179
180
|
isOpen: e,
|
|
180
181
|
onToggle: t,
|
|
181
|
-
trigger: r || /* @__PURE__ */
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
|
|
182
|
+
trigger: r || /* @__PURE__ */ g(M, { delayDuration: 0, children: [
|
|
183
|
+
/* @__PURE__ */ o(D, { asChild: !0, children: /* @__PURE__ */ o(
|
|
184
|
+
ee,
|
|
184
185
|
{
|
|
185
186
|
variant: "ghost",
|
|
186
187
|
size: "toolbar",
|
|
187
188
|
onClick: (s) => {
|
|
188
189
|
s.stopPropagation(), t(!e);
|
|
189
190
|
},
|
|
190
|
-
children: /* @__PURE__ */
|
|
191
|
+
children: /* @__PURE__ */ o(j, { icon: "lucide:ellipsis-vertical", className: "sc:size-6" })
|
|
191
192
|
}
|
|
192
193
|
) }),
|
|
193
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ o(I, { children: /* @__PURE__ */ o("p", { children: "More" }) })
|
|
194
195
|
] }),
|
|
195
196
|
position: "bottom",
|
|
196
197
|
align: "end",
|
|
197
198
|
offset: 4,
|
|
198
|
-
children: /* @__PURE__ */
|
|
199
|
+
children: /* @__PURE__ */ o("div", { className: "sc:flex sc:items-center sc:gap-sm sc:bg-bg-primary sc:border sc:border-border-primary sc:rounded-xl sc:px-xl sc:py-md sc:shadow-sm sc:h-[52px]", children: a })
|
|
199
200
|
}
|
|
200
201
|
);
|
|
201
|
-
function
|
|
202
|
+
function Ue(e) {
|
|
202
203
|
const t = {
|
|
203
204
|
name: e.name,
|
|
204
205
|
capabilities: {
|
|
@@ -223,69 +224,69 @@ function _e(e) {
|
|
|
223
224
|
};
|
|
224
225
|
return e.content && (t.content = { ...e.content }), t;
|
|
225
226
|
}
|
|
226
|
-
function
|
|
227
|
+
function je(e) {
|
|
227
228
|
if (!e.name || e.name.trim() === "")
|
|
228
229
|
throw new Error("[loadKitFromJSON] Kit name is required");
|
|
229
230
|
const t = {};
|
|
230
231
|
e.capabilities && (t.capabilities = e.capabilities), e.behavior && (t.behavior = e.behavior), e.layout && (t.layout = e.layout), e.style && (t.style = e.style), e.content && (t.content = e.content);
|
|
231
232
|
let r;
|
|
232
233
|
if (e.extends) {
|
|
233
|
-
const n =
|
|
234
|
-
r =
|
|
234
|
+
const n = ne(e.extends);
|
|
235
|
+
r = xe(n, { name: e.name, ...t });
|
|
235
236
|
} else
|
|
236
|
-
r =
|
|
237
|
-
const
|
|
238
|
-
if (
|
|
239
|
-
for (const n of
|
|
237
|
+
r = ge({ name: e.name, ...t });
|
|
238
|
+
const a = se(r);
|
|
239
|
+
if (a.warnings.length > 0)
|
|
240
|
+
for (const n of a.warnings)
|
|
240
241
|
console.warn(`[loadKitFromJSON] Warning: ${n}`);
|
|
241
|
-
if (!
|
|
242
|
+
if (!a.valid)
|
|
242
243
|
throw new Error(
|
|
243
244
|
`[loadKitFromJSON] Kit "${e.name}" failed validation:
|
|
244
|
-
${
|
|
245
|
+
${a.errors.join(`
|
|
245
246
|
`)}`
|
|
246
247
|
);
|
|
247
248
|
return r;
|
|
248
249
|
}
|
|
249
|
-
const
|
|
250
|
-
function
|
|
250
|
+
const z = ce("useProjectLoader");
|
|
251
|
+
function qe() {
|
|
251
252
|
const {
|
|
252
253
|
handleLoadWorkspace: e
|
|
253
|
-
} =
|
|
254
|
+
} = q(), [t, r] = A(!1), [a, n] = A(null), [s, i] = A(null), [d, l] = A(null), h = y(async (u) => {
|
|
254
255
|
r(!0), n(null);
|
|
255
256
|
try {
|
|
256
|
-
const c = typeof
|
|
257
|
+
const c = typeof u == "string" ? JSON.parse(u) : u;
|
|
257
258
|
if (!c.artboards || !Array.isArray(c.artboards))
|
|
258
259
|
throw new Error("Invalid document format: missing artboards array");
|
|
259
|
-
const x = JSON.stringify(c),
|
|
260
|
-
if (!
|
|
261
|
-
throw new Error(
|
|
262
|
-
e(
|
|
263
|
-
const
|
|
264
|
-
var
|
|
265
|
-
return
|
|
260
|
+
const x = JSON.stringify(c), C = new Blob([x], { type: "application/json" }), b = new File([C], "project.json", { type: "application/json" }), f = await pe.importFromJSON(b);
|
|
261
|
+
if (!f.success || !f.artboards || !f.elements)
|
|
262
|
+
throw new Error(f.error || "Failed to import project");
|
|
263
|
+
e(f.artboards, f.elements, f.activeArtboardId || null), i(c);
|
|
264
|
+
const m = c.artboards.reduce((v, k) => {
|
|
265
|
+
var S;
|
|
266
|
+
return v + (((S = k.elements) == null ? void 0 : S.length) || 0);
|
|
266
267
|
}, 0);
|
|
267
268
|
l({
|
|
268
269
|
version: c.metadata.version,
|
|
269
270
|
timestamp: c.metadata.timestamp,
|
|
270
271
|
artboardCount: c.artboards.length,
|
|
271
|
-
elementCount:
|
|
272
|
+
elementCount: m
|
|
272
273
|
});
|
|
273
274
|
} catch (c) {
|
|
274
|
-
throw
|
|
275
|
+
throw z.error("[useProjectLoader] Failed to load project:", c), n(c), c;
|
|
275
276
|
} finally {
|
|
276
277
|
r(!1);
|
|
277
278
|
}
|
|
278
|
-
}, [e]), w = y(async (
|
|
279
|
+
}, [e]), w = y(async (u) => {
|
|
279
280
|
r(!0), n(null);
|
|
280
281
|
try {
|
|
281
|
-
const c = await
|
|
282
|
-
await
|
|
282
|
+
const c = await u.text();
|
|
283
|
+
await h(c);
|
|
283
284
|
} catch (c) {
|
|
284
|
-
throw
|
|
285
|
+
throw z.error("[useProjectLoader] Failed to load file:", c), n(c), c;
|
|
285
286
|
} finally {
|
|
286
287
|
r(!1);
|
|
287
288
|
}
|
|
288
|
-
}, [
|
|
289
|
+
}, [h]), p = y(async (u) => {
|
|
289
290
|
r(!0), n(null);
|
|
290
291
|
try {
|
|
291
292
|
const c = {
|
|
@@ -294,8 +295,8 @@ function je() {
|
|
|
294
295
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
295
296
|
appVersion: "1.0.0"
|
|
296
297
|
},
|
|
297
|
-
artboards:
|
|
298
|
-
id: `artboard-${Date.now()}-${
|
|
298
|
+
artboards: u.artboards.map((x, C) => ({
|
|
299
|
+
id: `artboard-${Date.now()}-${C}`,
|
|
299
300
|
name: x.name,
|
|
300
301
|
x: 0,
|
|
301
302
|
y: 0,
|
|
@@ -307,24 +308,24 @@ function je() {
|
|
|
307
308
|
activeArtboardId: null
|
|
308
309
|
// First artboard will be active by default
|
|
309
310
|
};
|
|
310
|
-
await
|
|
311
|
+
await h(c);
|
|
311
312
|
} catch (c) {
|
|
312
|
-
throw
|
|
313
|
+
throw z.error("[useProjectLoader] Failed to load template:", c), n(c), c;
|
|
313
314
|
} finally {
|
|
314
315
|
r(!1);
|
|
315
316
|
}
|
|
316
|
-
}, [
|
|
317
|
+
}, [h]);
|
|
317
318
|
return {
|
|
318
|
-
loadFromJSON:
|
|
319
|
+
loadFromJSON: h,
|
|
319
320
|
loadFromFile: w,
|
|
320
|
-
loadTemplate:
|
|
321
|
+
loadTemplate: p,
|
|
321
322
|
isLoading: t,
|
|
322
|
-
loadError:
|
|
323
|
+
loadError: a,
|
|
323
324
|
currentProject: s,
|
|
324
|
-
projectMetadata:
|
|
325
|
+
projectMetadata: d
|
|
325
326
|
};
|
|
326
327
|
}
|
|
327
|
-
const
|
|
328
|
+
const G = {
|
|
328
329
|
xs: 320,
|
|
329
330
|
sm: 480,
|
|
330
331
|
md: 768,
|
|
@@ -332,45 +333,45 @@ const U = {
|
|
|
332
333
|
xl: 1280,
|
|
333
334
|
xxl: 1536
|
|
334
335
|
};
|
|
335
|
-
function
|
|
336
|
+
function Se(e, t) {
|
|
336
337
|
return e >= t.xxl ? "xxl" : e >= t.xl ? "xl" : e >= t.lg ? "lg" : e >= t.md ? "md" : e >= t.sm ? "sm" : "xs";
|
|
337
338
|
}
|
|
338
339
|
function Je(e) {
|
|
339
340
|
const t = {
|
|
340
|
-
...
|
|
341
|
+
...G,
|
|
341
342
|
...e
|
|
342
|
-
}, [r,
|
|
343
|
-
|
|
343
|
+
}, [r, a] = A(() => typeof window < "u" ? window.innerWidth : G.lg);
|
|
344
|
+
J(() => {
|
|
344
345
|
if (typeof window > "u") return;
|
|
345
346
|
const x = () => {
|
|
346
|
-
|
|
347
|
+
a(window.innerWidth);
|
|
347
348
|
};
|
|
348
349
|
return window.addEventListener("resize", x), () => window.removeEventListener("resize", x);
|
|
349
350
|
}, []);
|
|
350
|
-
const n =
|
|
351
|
-
() =>
|
|
351
|
+
const n = Z(
|
|
352
|
+
() => Se(r, t),
|
|
352
353
|
[r, t]
|
|
353
|
-
), s = n === "xs", i = n === "sm",
|
|
354
|
+
), s = n === "xs", i = n === "sm", d = n === "md", l = n === "lg", h = n === "xl", w = n === "xxl", p = ["xs", "sm", "md", "lg", "xl", "xxl"];
|
|
354
355
|
return {
|
|
355
356
|
breakpoint: n,
|
|
356
357
|
width: r,
|
|
357
358
|
isXs: s,
|
|
358
359
|
isSm: i,
|
|
359
|
-
isMd:
|
|
360
|
+
isMd: d,
|
|
360
361
|
isLg: l,
|
|
361
|
-
isXl:
|
|
362
|
+
isXl: h,
|
|
362
363
|
isXxl: w,
|
|
363
364
|
isAtLeast: (x) => {
|
|
364
|
-
const
|
|
365
|
-
return
|
|
365
|
+
const C = p.indexOf(n), b = p.indexOf(x);
|
|
366
|
+
return C >= b;
|
|
366
367
|
},
|
|
367
368
|
isAtMost: (x) => {
|
|
368
|
-
const
|
|
369
|
-
return
|
|
369
|
+
const C = p.indexOf(n), b = p.indexOf(x);
|
|
370
|
+
return C <= b;
|
|
370
371
|
}
|
|
371
372
|
};
|
|
372
373
|
}
|
|
373
|
-
const
|
|
374
|
+
const _ = {
|
|
374
375
|
fps: 0,
|
|
375
376
|
avgRenderTime: 0,
|
|
376
377
|
peakRenderTime: 0,
|
|
@@ -379,29 +380,29 @@ const j = {
|
|
|
379
380
|
exportCount: 0,
|
|
380
381
|
avgExportTime: 0
|
|
381
382
|
};
|
|
382
|
-
function
|
|
383
|
-
const [e, t] = A(
|
|
384
|
-
const
|
|
385
|
-
fps:
|
|
383
|
+
function Ze() {
|
|
384
|
+
const [e, t] = A(_), [r, a] = A(!1), n = R([]), s = R([]), i = R([]), d = R(performance.now()), l = R(null), h = y((m) => m.length === 0 ? 0 : 1e3 / (m.reduce((k, S) => k + S, 0) / m.length), []), w = y((m) => m.length === 0 ? 0 : m.reduce((v, k) => v + k, 0) / m.length, []), p = y(() => "memory" in performance && performance.memory ? performance.memory.usedJSHeapSize / (1024 * 1024) : 0, []), u = y(() => {
|
|
385
|
+
const m = {
|
|
386
|
+
fps: h(n.current),
|
|
386
387
|
avgRenderTime: w(s.current),
|
|
387
388
|
peakRenderTime: Math.max(...s.current, 0),
|
|
388
|
-
memoryUsage:
|
|
389
|
+
memoryUsage: p(),
|
|
389
390
|
elementCount: 0,
|
|
390
391
|
// Would need to be updated by editor context
|
|
391
392
|
exportCount: i.current.length,
|
|
392
393
|
avgExportTime: w(i.current)
|
|
393
394
|
};
|
|
394
|
-
t(
|
|
395
|
-
}, [
|
|
396
|
-
const
|
|
397
|
-
|
|
398
|
-
}, [r,
|
|
399
|
-
|
|
400
|
-
}, [c]),
|
|
401
|
-
|
|
402
|
-
}, []),
|
|
403
|
-
n.current = [], s.current = [], i.current = [], t(
|
|
404
|
-
}, []),
|
|
395
|
+
t(m);
|
|
396
|
+
}, [h, w, p]), c = y(() => {
|
|
397
|
+
const m = performance.now(), v = m - d.current;
|
|
398
|
+
d.current = m, n.current.push(v), n.current.length > 60 && n.current.shift(), n.current.length % 30 === 0 && u(), r && (l.current = requestAnimationFrame(c));
|
|
399
|
+
}, [r, u]), x = y(() => {
|
|
400
|
+
a(!0), d.current = performance.now(), l.current = requestAnimationFrame(c);
|
|
401
|
+
}, [c]), C = y(() => {
|
|
402
|
+
a(!1), l.current !== null && (cancelAnimationFrame(l.current), l.current = null);
|
|
403
|
+
}, []), b = y(() => {
|
|
404
|
+
n.current = [], s.current = [], i.current = [], t(_);
|
|
405
|
+
}, []), f = y(() => `
|
|
405
406
|
Performance Report
|
|
406
407
|
==================
|
|
407
408
|
FPS: ${e.fps.toFixed(1)}
|
|
@@ -412,113 +413,113 @@ Element Count: ${e.elementCount}
|
|
|
412
413
|
Export Count: ${e.exportCount}
|
|
413
414
|
Avg Export Time: ${e.avgExportTime.toFixed(2)}ms
|
|
414
415
|
`.trim(), [e]);
|
|
415
|
-
return
|
|
416
|
+
return J(() => () => {
|
|
416
417
|
l.current !== null && cancelAnimationFrame(l.current);
|
|
417
418
|
}, []), {
|
|
418
419
|
metrics: e,
|
|
419
420
|
startProfiling: x,
|
|
420
|
-
stopProfiling:
|
|
421
|
-
clearMetrics:
|
|
422
|
-
getReport:
|
|
421
|
+
stopProfiling: C,
|
|
422
|
+
clearMetrics: b,
|
|
423
|
+
getReport: f,
|
|
423
424
|
isProfiling: r
|
|
424
425
|
};
|
|
425
426
|
}
|
|
426
|
-
function
|
|
427
|
-
const { getElementById: t } =
|
|
427
|
+
function Ve(e) {
|
|
428
|
+
const { getElementById: t } = q();
|
|
428
429
|
return e ? t(e) ?? null : null;
|
|
429
430
|
}
|
|
430
|
-
function
|
|
431
|
+
function Xe(e) {
|
|
431
432
|
const {
|
|
432
433
|
onReorder: t,
|
|
433
434
|
onGroupReorder: r,
|
|
434
|
-
onDropIntoGroup:
|
|
435
|
+
onDropIntoGroup: a,
|
|
435
436
|
onDropIntoGroupAtPosition: n,
|
|
436
437
|
findElement: s,
|
|
437
438
|
findParentGroup: i
|
|
438
|
-
} = e, [
|
|
439
|
-
|
|
440
|
-
l(
|
|
439
|
+
} = e, [d, l] = A(null), [h, w] = A(null), [p, u] = A(null), c = y((f, m) => {
|
|
440
|
+
f.dataTransfer.effectAllowed = "move", requestAnimationFrame(() => {
|
|
441
|
+
l(m);
|
|
441
442
|
});
|
|
442
443
|
}, []), x = y(
|
|
443
|
-
(
|
|
444
|
-
|
|
445
|
-
const
|
|
444
|
+
(f, m) => {
|
|
445
|
+
f.preventDefault(), f.dataTransfer.dropEffect = "move";
|
|
446
|
+
const v = f.currentTarget.getBoundingClientRect(), S = f.clientY - v.top, P = v.height, F = (s == null ? void 0 : s(m)) instanceof le;
|
|
446
447
|
let $;
|
|
447
|
-
|
|
448
|
+
F ? S < P * 0.25 ? $ = "before" : S > P * 0.75 ? $ = "after" : $ = "into" : S < P * 0.4 ? $ = "before" : S > P * 0.6 ? $ = "after" : $ = S < P / 2 ? "before" : "after", w(m), u($);
|
|
448
449
|
},
|
|
449
450
|
[s]
|
|
450
|
-
),
|
|
451
|
-
l(null), w(null),
|
|
452
|
-
}, []),
|
|
453
|
-
(
|
|
454
|
-
if (
|
|
455
|
-
|
|
451
|
+
), C = y(() => {
|
|
452
|
+
l(null), w(null), u(null);
|
|
453
|
+
}, []), b = y(
|
|
454
|
+
(f, m) => {
|
|
455
|
+
if (f.preventDefault(), !d || d === m || !p) {
|
|
456
|
+
C();
|
|
456
457
|
return;
|
|
457
458
|
}
|
|
458
|
-
if (
|
|
459
|
-
|
|
459
|
+
if (p === "into")
|
|
460
|
+
a && a(d, m);
|
|
460
461
|
else {
|
|
461
|
-
const
|
|
462
|
-
|
|
462
|
+
const v = i == null ? void 0 : i(d), k = i == null ? void 0 : i(m), S = p === "before" ? "after" : "before";
|
|
463
|
+
v && k && v.id === k.id ? r && r(d, m, S, v.id) : !v && k && n ? n(d, k.id, m, S) : t(d, m, S);
|
|
463
464
|
}
|
|
464
|
-
|
|
465
|
+
C();
|
|
465
466
|
},
|
|
466
467
|
[
|
|
467
|
-
|
|
468
|
-
|
|
468
|
+
d,
|
|
469
|
+
p,
|
|
469
470
|
t,
|
|
470
471
|
r,
|
|
471
|
-
|
|
472
|
+
a,
|
|
472
473
|
n,
|
|
473
474
|
i,
|
|
474
|
-
|
|
475
|
+
C
|
|
475
476
|
]
|
|
476
477
|
);
|
|
477
478
|
return {
|
|
478
|
-
draggedId:
|
|
479
|
-
dragOverId:
|
|
480
|
-
dropPosition:
|
|
479
|
+
draggedId: d,
|
|
480
|
+
dragOverId: h,
|
|
481
|
+
dropPosition: p,
|
|
481
482
|
handlers: {
|
|
482
483
|
onDragStart: c,
|
|
483
484
|
onDragOver: x,
|
|
484
|
-
onDrop:
|
|
485
|
-
onDragEnd:
|
|
485
|
+
onDrop: b,
|
|
486
|
+
onDragEnd: C
|
|
486
487
|
}
|
|
487
488
|
};
|
|
488
489
|
}
|
|
489
|
-
function
|
|
490
|
-
const { selectedId: t, multiSelection: r, onSelectionChange:
|
|
491
|
-
(
|
|
490
|
+
function Ye(e) {
|
|
491
|
+
const { selectedId: t, multiSelection: r, onSelectionChange: a, onMultiSelectionChange: n } = e, s = y(
|
|
492
|
+
(d) => d === t || r.includes(d),
|
|
492
493
|
[t, r]
|
|
493
494
|
), i = y(
|
|
494
|
-
(
|
|
495
|
-
if (
|
|
496
|
-
const
|
|
495
|
+
(d, l) => {
|
|
496
|
+
if (d.shiftKey) {
|
|
497
|
+
const h = r.includes(l), w = t === l;
|
|
497
498
|
if (r.length > 0)
|
|
498
|
-
if (
|
|
499
|
-
const
|
|
500
|
-
|
|
499
|
+
if (h) {
|
|
500
|
+
const p = r.filter((u) => u !== l);
|
|
501
|
+
p.length === 1 ? (n([]), a(p[0])) : p.length === 0 ? (n([]), a(null)) : n(p);
|
|
501
502
|
} else
|
|
502
503
|
n([...r, l]);
|
|
503
504
|
else {
|
|
504
505
|
if (w)
|
|
505
506
|
return;
|
|
506
|
-
t !== null ? (n([t, l]),
|
|
507
|
+
t !== null ? (n([t, l]), a(null)) : a(l);
|
|
507
508
|
}
|
|
508
509
|
} else
|
|
509
|
-
|
|
510
|
+
a(l), n([]);
|
|
510
511
|
},
|
|
511
|
-
[t, r,
|
|
512
|
+
[t, r, a, n]
|
|
512
513
|
);
|
|
513
514
|
return { isSelected: s, handleClick: i };
|
|
514
515
|
}
|
|
515
|
-
const
|
|
516
|
+
const we = he(({ value: e, onChange: t, fontSizes: r, isOpen: a, onToggle: n }) => {
|
|
516
517
|
const s = (i) => {
|
|
517
518
|
t(i), n(!1);
|
|
518
519
|
};
|
|
519
|
-
return /* @__PURE__ */
|
|
520
|
-
/* @__PURE__ */
|
|
521
|
-
/* @__PURE__ */
|
|
520
|
+
return /* @__PURE__ */ g(ae, { open: a, onOpenChange: n, children: [
|
|
521
|
+
/* @__PURE__ */ o(oe, { asChild: !0, children: /* @__PURE__ */ o("button", { className: "sc-toolbar-btn", "aria-label": "Font size", children: /* @__PURE__ */ o(j, { icon: "radix-icons:font-size", className: "sc:size-5" }) }) }),
|
|
522
|
+
/* @__PURE__ */ o(ie, { className: "sc:w-[120px] sc:max-h-[300px] sc:overflow-y-auto sc:p-1", maxZIndex: !0, children: /* @__PURE__ */ o("div", { className: "sc:flex sc:flex-col sc:gap-0.5", children: r.map((i) => /* @__PURE__ */ o(
|
|
522
523
|
"button",
|
|
523
524
|
{
|
|
524
525
|
onClick: () => s(i),
|
|
@@ -529,47 +530,47 @@ const Se = xe(({ value: e, onChange: t, fontSizes: r, isOpen: o, onToggle: n })
|
|
|
529
530
|
)) }) })
|
|
530
531
|
] });
|
|
531
532
|
});
|
|
532
|
-
|
|
533
|
-
function
|
|
534
|
-
const { fontSize: t, handleFontSizeIncrement: r, handleFontSizeChange:
|
|
535
|
-
return /* @__PURE__ */
|
|
536
|
-
/* @__PURE__ */
|
|
537
|
-
/* @__PURE__ */
|
|
538
|
-
/* @__PURE__ */
|
|
533
|
+
we.displayName = "FontSizeDropdown";
|
|
534
|
+
function He({ toolbar: e }) {
|
|
535
|
+
const { fontSize: t, handleFontSizeIncrement: r, handleFontSizeChange: a } = e, [n, s] = A(!1);
|
|
536
|
+
return /* @__PURE__ */ g("div", { className: "sc-toolbar-group", children: [
|
|
537
|
+
/* @__PURE__ */ g(M, { delayDuration: 300, children: [
|
|
538
|
+
/* @__PURE__ */ o(D, { asChild: !0, children: /* @__PURE__ */ o("button", { className: "sc-toolbar-btn-sm", onClick: () => r(-1), children: "-" }) }),
|
|
539
|
+
/* @__PURE__ */ o(I, { children: "Decrease Font Size" })
|
|
539
540
|
] }),
|
|
540
|
-
/* @__PURE__ */
|
|
541
|
-
/* @__PURE__ */
|
|
542
|
-
/* @__PURE__ */
|
|
541
|
+
/* @__PURE__ */ g(M, { delayDuration: 300, children: [
|
|
542
|
+
/* @__PURE__ */ o(D, { asChild: !0, children: /* @__PURE__ */ g("div", { style: { position: "relative" }, children: [
|
|
543
|
+
/* @__PURE__ */ o(
|
|
543
544
|
"button",
|
|
544
545
|
{
|
|
545
546
|
className: "sc-toolbar-font-size-display",
|
|
546
547
|
onClick: () => {
|
|
547
|
-
|
|
548
|
+
te.protectNextClick(), s(!n);
|
|
548
549
|
},
|
|
549
550
|
children: t
|
|
550
551
|
}
|
|
551
552
|
),
|
|
552
|
-
n && /* @__PURE__ */
|
|
553
|
+
n && /* @__PURE__ */ o(
|
|
553
554
|
"div",
|
|
554
555
|
{
|
|
555
556
|
className: "font-dropdown",
|
|
556
557
|
ref: (i) => {
|
|
557
558
|
if (i) {
|
|
558
|
-
const
|
|
559
|
-
const
|
|
560
|
-
!i.contains(
|
|
559
|
+
const d = (l) => {
|
|
560
|
+
const h = l.target;
|
|
561
|
+
!i.contains(h) && !h.closest(".sc-toolbar-font-size-display") && s(!1);
|
|
561
562
|
};
|
|
562
563
|
setTimeout(() => {
|
|
563
|
-
document.addEventListener("mousedown",
|
|
564
|
+
document.addEventListener("mousedown", d);
|
|
564
565
|
}, 0);
|
|
565
566
|
}
|
|
566
567
|
},
|
|
567
|
-
children:
|
|
568
|
+
children: de.map((i) => /* @__PURE__ */ o(
|
|
568
569
|
"button",
|
|
569
570
|
{
|
|
570
571
|
className: `font-dropdown-option ${t === i ? "selected" : ""}`,
|
|
571
572
|
onClick: () => {
|
|
572
|
-
|
|
573
|
+
a(i), s(!1);
|
|
573
574
|
},
|
|
574
575
|
children: i
|
|
575
576
|
},
|
|
@@ -578,16 +579,16 @@ function Ye({ toolbar: e }) {
|
|
|
578
579
|
}
|
|
579
580
|
)
|
|
580
581
|
] }) }),
|
|
581
|
-
/* @__PURE__ */
|
|
582
|
+
/* @__PURE__ */ o(I, { children: "Font Size" })
|
|
582
583
|
] }),
|
|
583
|
-
/* @__PURE__ */
|
|
584
|
-
/* @__PURE__ */
|
|
585
|
-
/* @__PURE__ */
|
|
584
|
+
/* @__PURE__ */ g(M, { delayDuration: 300, children: [
|
|
585
|
+
/* @__PURE__ */ o(D, { asChild: !0, children: /* @__PURE__ */ o("button", { className: "sc-toolbar-btn-sm", onClick: () => r(1), children: "+" }) }),
|
|
586
|
+
/* @__PURE__ */ o(I, { children: "Increase Font Size" })
|
|
586
587
|
] })
|
|
587
588
|
] });
|
|
588
589
|
}
|
|
589
|
-
const
|
|
590
|
-
function
|
|
590
|
+
const W = /* @__PURE__ */ new Map();
|
|
591
|
+
function Qe(e) {
|
|
591
592
|
if (!e.type || typeof e.type != "string")
|
|
592
593
|
throw new Error('ElementTypeRegistration requires a non-empty "type" string');
|
|
593
594
|
if (typeof e.Component != "function")
|
|
@@ -598,20 +599,20 @@ function He(e) {
|
|
|
598
599
|
throw new Error(
|
|
599
600
|
`ElementTypeRegistration for "${e.type}" requires a non-empty "label" string`
|
|
600
601
|
);
|
|
601
|
-
|
|
602
|
+
me(e.type, {
|
|
602
603
|
id: e.type,
|
|
603
604
|
label: e.label,
|
|
604
605
|
Component: e.Component
|
|
605
|
-
}),
|
|
606
|
+
}), W.set(e.type, { ...e });
|
|
606
607
|
}
|
|
607
|
-
function
|
|
608
|
-
|
|
608
|
+
function et(e) {
|
|
609
|
+
fe(e), W.delete(e);
|
|
609
610
|
}
|
|
610
|
-
function
|
|
611
|
-
return Array.from(
|
|
611
|
+
function tt() {
|
|
612
|
+
return Array.from(W.values());
|
|
612
613
|
}
|
|
613
|
-
function
|
|
614
|
-
return
|
|
614
|
+
function rt(e) {
|
|
615
|
+
return ue(e) !== void 0;
|
|
615
616
|
}
|
|
616
617
|
class Ce {
|
|
617
618
|
constructor() {
|
|
@@ -628,9 +629,9 @@ class Ce {
|
|
|
628
629
|
* @returns An unsubscribe function -- call it to remove this handler
|
|
629
630
|
*/
|
|
630
631
|
on(t, r) {
|
|
631
|
-
let
|
|
632
|
-
return
|
|
633
|
-
|
|
632
|
+
let a = this.listeners.get(t);
|
|
633
|
+
return a || (a = /* @__PURE__ */ new Set(), this.listeners.set(t, a)), a.add(r), () => {
|
|
634
|
+
a.delete(r), a.size === 0 && this.listeners.delete(t);
|
|
634
635
|
};
|
|
635
636
|
}
|
|
636
637
|
/**
|
|
@@ -645,9 +646,9 @@ class Ce {
|
|
|
645
646
|
* @returns An unsubscribe function
|
|
646
647
|
*/
|
|
647
648
|
once(t, r) {
|
|
648
|
-
const
|
|
649
|
+
const a = (s) => {
|
|
649
650
|
n(), r(s);
|
|
650
|
-
}, n = this.on(t,
|
|
651
|
+
}, n = this.on(t, a);
|
|
651
652
|
return n;
|
|
652
653
|
}
|
|
653
654
|
// -----------------------------------------------------------------------
|
|
@@ -663,9 +664,9 @@ class Ce {
|
|
|
663
664
|
* @param data - The payload to pass to each handler
|
|
664
665
|
*/
|
|
665
666
|
emit(t, r) {
|
|
666
|
-
const
|
|
667
|
-
if (
|
|
668
|
-
for (const n of [...
|
|
667
|
+
const a = this.listeners.get(t);
|
|
668
|
+
if (a)
|
|
669
|
+
for (const n of [...a])
|
|
669
670
|
try {
|
|
670
671
|
n(r);
|
|
671
672
|
} catch (s) {
|
|
@@ -704,10 +705,10 @@ class Ce {
|
|
|
704
705
|
}
|
|
705
706
|
}
|
|
706
707
|
const Te = new Ce();
|
|
707
|
-
function
|
|
708
|
+
function nt() {
|
|
708
709
|
return Te;
|
|
709
710
|
}
|
|
710
|
-
const
|
|
711
|
+
const O = {
|
|
711
712
|
bleedFill: "#ffffff",
|
|
712
713
|
bleedOpacity: 0.5,
|
|
713
714
|
// Subtle boundary — the wash already draws the eye to the safe area,
|
|
@@ -773,8 +774,8 @@ const W = {
|
|
|
773
774
|
bc: { textAnchor: "middle", dominantBaseline: "alphabetic" },
|
|
774
775
|
br: { textAnchor: "end", dominantBaseline: "alphabetic" }
|
|
775
776
|
};
|
|
776
|
-
function
|
|
777
|
-
return e.kind === "rect" ? /* @__PURE__ */
|
|
777
|
+
function L(e, t) {
|
|
778
|
+
return e.kind === "rect" ? /* @__PURE__ */ o(
|
|
778
779
|
"rect",
|
|
779
780
|
{
|
|
780
781
|
x: e.x,
|
|
@@ -783,7 +784,7 @@ function K(e, t) {
|
|
|
783
784
|
height: e.height,
|
|
784
785
|
...t
|
|
785
786
|
}
|
|
786
|
-
) : e.kind === "roundedRect" ? /* @__PURE__ */
|
|
787
|
+
) : e.kind === "roundedRect" ? /* @__PURE__ */ o(
|
|
787
788
|
"rect",
|
|
788
789
|
{
|
|
789
790
|
x: e.x,
|
|
@@ -794,7 +795,7 @@ function K(e, t) {
|
|
|
794
795
|
ry: e.ry,
|
|
795
796
|
...t
|
|
796
797
|
}
|
|
797
|
-
) : /* @__PURE__ */
|
|
798
|
+
) : /* @__PURE__ */ o(
|
|
798
799
|
"path",
|
|
799
800
|
{
|
|
800
801
|
d: e.d,
|
|
@@ -802,7 +803,7 @@ function K(e, t) {
|
|
|
802
803
|
}
|
|
803
804
|
);
|
|
804
805
|
}
|
|
805
|
-
function
|
|
806
|
+
function ke(e, t, r) {
|
|
806
807
|
return (e == null ? void 0 : e.boundary) ?? {
|
|
807
808
|
kind: "rect",
|
|
808
809
|
x: 0,
|
|
@@ -811,16 +812,16 @@ function $e(e, t, r) {
|
|
|
811
812
|
height: r
|
|
812
813
|
};
|
|
813
814
|
}
|
|
814
|
-
function
|
|
815
|
+
function U(e) {
|
|
815
816
|
if (e.kind === "rect")
|
|
816
817
|
return `M ${e.x} ${e.y} h ${e.width} v ${e.height} h ${-e.width} Z`;
|
|
817
818
|
if (e.kind === "roundedRect") {
|
|
818
819
|
const t = e.rx ?? e.ry ?? 0, r = e.ry ?? e.rx ?? 0;
|
|
819
820
|
if (t <= 0 && r <= 0)
|
|
820
821
|
return `M ${e.x} ${e.y} h ${e.width} v ${e.height} h ${-e.width} Z`;
|
|
821
|
-
const { x:
|
|
822
|
+
const { x: a, y: n, width: s, height: i } = e;
|
|
822
823
|
return [
|
|
823
|
-
`M ${
|
|
824
|
+
`M ${a + t} ${n}`,
|
|
824
825
|
`h ${s - 2 * t}`,
|
|
825
826
|
`a ${t} ${r} 0 0 1 ${t} ${r}`,
|
|
826
827
|
`v ${i - 2 * r}`,
|
|
@@ -834,7 +835,7 @@ function J(e) {
|
|
|
834
835
|
}
|
|
835
836
|
return e.d;
|
|
836
837
|
}
|
|
837
|
-
function
|
|
838
|
+
function $e(e, t, r, a) {
|
|
838
839
|
if (e != null && e.safeArea) return e.safeArea;
|
|
839
840
|
if (t.safeAreaInsetPx && t.safeAreaInsetPx > 0) {
|
|
840
841
|
const n = t.safeAreaInsetPx;
|
|
@@ -843,92 +844,89 @@ function ke(e, t, r, o) {
|
|
|
843
844
|
x: n,
|
|
844
845
|
y: n,
|
|
845
846
|
width: Math.max(0, r - n * 2),
|
|
846
|
-
height: Math.max(0,
|
|
847
|
+
height: Math.max(0, a - n * 2)
|
|
847
848
|
};
|
|
848
849
|
}
|
|
849
850
|
return null;
|
|
850
851
|
}
|
|
851
|
-
function
|
|
852
|
+
function st({
|
|
852
853
|
artboardWidth: e,
|
|
853
854
|
artboardHeight: t,
|
|
854
855
|
canvasPadding: r = 0,
|
|
855
|
-
pieces:
|
|
856
|
+
pieces: a,
|
|
856
857
|
pieceGuides: n,
|
|
857
858
|
show: s,
|
|
858
859
|
style: i,
|
|
859
|
-
className:
|
|
860
|
+
className: d
|
|
860
861
|
}) {
|
|
861
|
-
const l =
|
|
862
|
-
const
|
|
862
|
+
const l = Z(() => {
|
|
863
|
+
const u = Math.max(
|
|
863
864
|
16,
|
|
864
865
|
Math.round(Math.min(e, t) * 0.03)
|
|
865
866
|
), c = {
|
|
866
|
-
...
|
|
867
|
+
...O,
|
|
867
868
|
...i ?? {},
|
|
868
|
-
zoneFill: { ...
|
|
869
|
-
zoneStroke: { ...
|
|
869
|
+
zoneFill: { ...O.zoneFill, ...(i == null ? void 0 : i.zoneFill) ?? {} },
|
|
870
|
+
zoneStroke: { ...O.zoneStroke, ...(i == null ? void 0 : i.zoneStroke) ?? {} }
|
|
870
871
|
};
|
|
871
|
-
return (i == null ? void 0 : i.labelFontSize) === void 0 && (c.labelFontSize =
|
|
872
|
-
}, [i, e, t]),
|
|
872
|
+
return (i == null ? void 0 : i.labelFontSize) === void 0 && (c.labelFontSize = u), c;
|
|
873
|
+
}, [i, e, t]), h = {
|
|
873
874
|
bleed: (s == null ? void 0 : s.bleed) ?? !0,
|
|
874
875
|
zones: (s == null ? void 0 : s.zones) ?? !0,
|
|
875
876
|
boundary: (s == null ? void 0 : s.boundary) ?? !0,
|
|
876
877
|
safeArea: (s == null ? void 0 : s.safeArea) ?? !0,
|
|
877
878
|
labels: (s == null ? void 0 : s.labels) ?? !0
|
|
878
|
-
}, w = e + r * 2,
|
|
879
|
-
return /* @__PURE__ */
|
|
879
|
+
}, w = e + r * 2, p = t + r * 2;
|
|
880
|
+
return /* @__PURE__ */ o(
|
|
880
881
|
"svg",
|
|
881
882
|
{
|
|
882
883
|
xmlns: "http://www.w3.org/2000/svg",
|
|
883
|
-
viewBox: `0 0 ${w} ${
|
|
884
|
+
viewBox: `0 0 ${w} ${p}`,
|
|
884
885
|
preserveAspectRatio: "xMidYMid meet",
|
|
885
|
-
className:
|
|
886
|
+
className: d,
|
|
886
887
|
style: { pointerEvents: "none", width: "100%", height: "100%" },
|
|
887
|
-
children: /* @__PURE__ */
|
|
888
|
-
const c = n == null ? void 0 : n[
|
|
889
|
-
let N = "";
|
|
890
|
-
C === 90 ? N = `translate(${d.width} 0) rotate(90)` : C === 180 ? N = `translate(${d.width} ${d.height}) rotate(180)` : C === 270 && (N = `translate(0 ${d.height}) rotate(270)`);
|
|
891
|
-
const z = N ? `${F} ${N}` : F, $ = l.safeAreaWashCornerRadius < 0 ? Math.round(Math.min(u, p) * 0.02) : l.safeAreaWashCornerRadius, P = c != null && c.boundary && (c.boundary.kind === "rect" || c.boundary.kind === "roundedRect") ? c.boundary : null, O = P ? P.kind === "rect" && $ > 0 ? {
|
|
888
|
+
children: /* @__PURE__ */ o("g", { transform: `translate(${r} ${r})`, children: a.map((u) => {
|
|
889
|
+
const c = n == null ? void 0 : n[u.id], x = (c == null ? void 0 : c.zones) ?? [], C = (c == null ? void 0 : c.labels) ?? [], { width: b, height: f } = ye(u), m = ke(c, b, f), v = $e(c, u, b, f), k = `translate(${u.x} ${u.y})`, S = ve(u), P = S ? `${k} ${S}` : k, N = l.safeAreaWashCornerRadius < 0 ? Math.round(Math.min(b, f) * 0.02) : l.safeAreaWashCornerRadius, F = c != null && c.boundary && (c.boundary.kind === "rect" || c.boundary.kind === "roundedRect") ? c.boundary : null, $ = F ? F.kind === "rect" && N > 0 ? {
|
|
892
890
|
kind: "roundedRect",
|
|
893
|
-
x:
|
|
894
|
-
y:
|
|
895
|
-
width:
|
|
896
|
-
height:
|
|
897
|
-
rx:
|
|
898
|
-
ry:
|
|
899
|
-
} :
|
|
891
|
+
x: F.x,
|
|
892
|
+
y: F.y,
|
|
893
|
+
width: F.width,
|
|
894
|
+
height: F.height,
|
|
895
|
+
rx: N,
|
|
896
|
+
ry: N
|
|
897
|
+
} : F : N > 0 ? {
|
|
900
898
|
kind: "roundedRect",
|
|
901
899
|
x: 0,
|
|
902
900
|
y: 0,
|
|
903
|
-
width:
|
|
904
|
-
height:
|
|
905
|
-
rx:
|
|
906
|
-
ry:
|
|
901
|
+
width: b,
|
|
902
|
+
height: f,
|
|
903
|
+
rx: N,
|
|
904
|
+
ry: N
|
|
907
905
|
} : {
|
|
908
906
|
kind: "rect",
|
|
909
907
|
x: 0,
|
|
910
908
|
y: 0,
|
|
911
|
-
width:
|
|
912
|
-
height:
|
|
913
|
-
},
|
|
909
|
+
width: b,
|
|
910
|
+
height: f
|
|
911
|
+
}, K = `bleed-blur-${u.id}`, V = {
|
|
914
912
|
kind: "rect",
|
|
915
913
|
x: 0,
|
|
916
914
|
y: 0,
|
|
917
|
-
width:
|
|
918
|
-
height:
|
|
919
|
-
},
|
|
920
|
-
return /* @__PURE__ */
|
|
921
|
-
|
|
922
|
-
/* @__PURE__ */
|
|
923
|
-
/* @__PURE__ */
|
|
915
|
+
width: b,
|
|
916
|
+
height: f
|
|
917
|
+
}, X = $.kind === "rect" || $.kind === "roundedRect";
|
|
918
|
+
return /* @__PURE__ */ g("g", { transform: P, children: [
|
|
919
|
+
h.safeArea && X && /* @__PURE__ */ g(be, { children: [
|
|
920
|
+
/* @__PURE__ */ g("defs", { children: [
|
|
921
|
+
/* @__PURE__ */ o(
|
|
924
922
|
"filter",
|
|
925
923
|
{
|
|
926
|
-
id:
|
|
924
|
+
id: K,
|
|
927
925
|
x: "-20%",
|
|
928
926
|
y: "-20%",
|
|
929
927
|
width: "140%",
|
|
930
928
|
height: "140%",
|
|
931
|
-
children: /* @__PURE__ */
|
|
929
|
+
children: /* @__PURE__ */ o(
|
|
932
930
|
"feGaussianBlur",
|
|
933
931
|
{
|
|
934
932
|
in: "SourceGraphic",
|
|
@@ -942,32 +940,32 @@ function nt({
|
|
|
942
940
|
// other piece-local geometry.
|
|
943
941
|
Math.max(
|
|
944
942
|
12,
|
|
945
|
-
Math.round(Math.min(
|
|
943
|
+
Math.round(Math.min(b, f) * 0.025)
|
|
946
944
|
)
|
|
947
945
|
)
|
|
948
946
|
}
|
|
949
947
|
)
|
|
950
948
|
}
|
|
951
949
|
),
|
|
952
|
-
/* @__PURE__ */
|
|
950
|
+
/* @__PURE__ */ o("clipPath", { id: `piece-clip-${u.id}`, children: /* @__PURE__ */ o(
|
|
953
951
|
"rect",
|
|
954
952
|
{
|
|
955
953
|
x: 0,
|
|
956
954
|
y: 0,
|
|
957
|
-
width:
|
|
958
|
-
height:
|
|
955
|
+
width: b,
|
|
956
|
+
height: f
|
|
959
957
|
}
|
|
960
958
|
) })
|
|
961
959
|
] }),
|
|
962
|
-
/* @__PURE__ */
|
|
960
|
+
/* @__PURE__ */ o(
|
|
963
961
|
"g",
|
|
964
962
|
{
|
|
965
|
-
clipPath: `url(#piece-clip-${
|
|
966
|
-
filter: `url(#${
|
|
967
|
-
children: /* @__PURE__ */
|
|
963
|
+
clipPath: `url(#piece-clip-${u.id})`,
|
|
964
|
+
filter: `url(#${K})`,
|
|
965
|
+
children: /* @__PURE__ */ o(
|
|
968
966
|
"path",
|
|
969
967
|
{
|
|
970
|
-
d: `${
|
|
968
|
+
d: `${U(V)} ${U($)}`,
|
|
971
969
|
style: {
|
|
972
970
|
// Honor `style.bleedFill` / `style.bleedOpacity`
|
|
973
971
|
// overrides — previously hardcoded, which silently
|
|
@@ -982,33 +980,33 @@ function nt({
|
|
|
982
980
|
}
|
|
983
981
|
)
|
|
984
982
|
] }),
|
|
985
|
-
|
|
983
|
+
h.zones && x.filter((T) => T.kind !== "dieCut").map((T, B) => /* @__PURE__ */ o("g", { children: L(T.path, {
|
|
986
984
|
fill: l.zoneFill[T.kind],
|
|
987
985
|
stroke: l.zoneStroke[T.kind],
|
|
988
986
|
strokeWidth: 1.5,
|
|
989
987
|
strokeDasharray: T.kind === "wrap" ? "4 3" : void 0,
|
|
990
988
|
vectorEffect: "non-scaling-stroke"
|
|
991
|
-
}) }, `zone-${
|
|
992
|
-
|
|
989
|
+
}) }, `zone-${B}`)),
|
|
990
|
+
h.zones && x.filter((T) => T.kind === "dieCut").map((T, B) => {
|
|
993
991
|
const E = T.path;
|
|
994
992
|
if (E.kind !== "rect" && E.kind !== "roundedRect")
|
|
995
993
|
return null;
|
|
996
|
-
const
|
|
997
|
-
return /* @__PURE__ */
|
|
994
|
+
const Y = E.kind === "roundedRect" ? E.rx ?? E.ry ?? 0 : 0, H = E.kind === "roundedRect" ? E.ry ?? E.rx ?? 0 : 0;
|
|
995
|
+
return /* @__PURE__ */ o(
|
|
998
996
|
"foreignObject",
|
|
999
997
|
{
|
|
1000
998
|
x: E.x,
|
|
1001
999
|
y: E.y,
|
|
1002
1000
|
width: E.width,
|
|
1003
1001
|
height: E.height,
|
|
1004
|
-
children: /* @__PURE__ */
|
|
1002
|
+
children: /* @__PURE__ */ o(
|
|
1005
1003
|
"div",
|
|
1006
1004
|
{
|
|
1007
1005
|
xmlns: "http://www.w3.org/1999/xhtml",
|
|
1008
1006
|
style: {
|
|
1009
1007
|
width: "100%",
|
|
1010
1008
|
height: "100%",
|
|
1011
|
-
borderRadius: `${
|
|
1009
|
+
borderRadius: `${Y}px / ${H}px`,
|
|
1012
1010
|
backdropFilter: "blur(4px)",
|
|
1013
1011
|
WebkitBackdropFilter: "blur(4px)",
|
|
1014
1012
|
// Match the canvas's own "outside-artboard"
|
|
@@ -1023,25 +1021,25 @@ function nt({
|
|
|
1023
1021
|
}
|
|
1024
1022
|
)
|
|
1025
1023
|
},
|
|
1026
|
-
`diecut-${
|
|
1024
|
+
`diecut-${B}`
|
|
1027
1025
|
);
|
|
1028
1026
|
}),
|
|
1029
|
-
|
|
1027
|
+
h.boundary && l.boundaryStroke && L(m, {
|
|
1030
1028
|
fill: "none",
|
|
1031
1029
|
stroke: l.boundaryStroke,
|
|
1032
1030
|
strokeWidth: l.boundaryStrokeWidth,
|
|
1033
1031
|
vectorEffect: "non-scaling-stroke"
|
|
1034
1032
|
}),
|
|
1035
|
-
|
|
1033
|
+
h.safeArea && v && l.safeAreaStroke && L(v, {
|
|
1036
1034
|
fill: "none",
|
|
1037
1035
|
stroke: l.safeAreaStroke,
|
|
1038
1036
|
strokeWidth: l.safeAreaStrokeWidth,
|
|
1039
1037
|
strokeDasharray: l.safeAreaDashArray,
|
|
1040
1038
|
vectorEffect: "non-scaling-stroke"
|
|
1041
1039
|
}),
|
|
1042
|
-
|
|
1040
|
+
h.labels && C.map((T, B) => {
|
|
1043
1041
|
const E = Ee[T.anchor ?? "c"];
|
|
1044
|
-
return /* @__PURE__ */
|
|
1042
|
+
return /* @__PURE__ */ o(
|
|
1045
1043
|
"text",
|
|
1046
1044
|
{
|
|
1047
1045
|
x: T.x,
|
|
@@ -1057,142 +1055,142 @@ function nt({
|
|
|
1057
1055
|
strokeLinejoin: "round",
|
|
1058
1056
|
children: T.text
|
|
1059
1057
|
},
|
|
1060
|
-
`label-${
|
|
1058
|
+
`label-${B}`
|
|
1061
1059
|
);
|
|
1062
1060
|
})
|
|
1063
|
-
] },
|
|
1061
|
+
] }, u.id);
|
|
1064
1062
|
}) })
|
|
1065
1063
|
}
|
|
1066
1064
|
);
|
|
1067
1065
|
}
|
|
1068
|
-
|
|
1066
|
+
re();
|
|
1069
1067
|
export {
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1068
|
+
Er as ArtboardElement,
|
|
1069
|
+
_t as ArtboardPropertiesToolbar,
|
|
1070
|
+
xt as ArtboardTabs,
|
|
1071
|
+
gt as AutoExportManager,
|
|
1072
|
+
Ut as BackgroundPickerDropdown,
|
|
1073
|
+
kr as BaseElement,
|
|
1074
|
+
jt as BoldButton,
|
|
1075
|
+
We as ButtonGroup,
|
|
1076
|
+
bt as Canvas,
|
|
1079
1077
|
Ce as CanvasEventBus,
|
|
1080
|
-
|
|
1081
|
-
|
|
1078
|
+
yt as CanvasSkeleton,
|
|
1079
|
+
qt as ColorPickerDropdown,
|
|
1082
1080
|
Jt as ContextualToolbars,
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1081
|
+
Le as ControlGroup,
|
|
1082
|
+
Zt as CropPanel,
|
|
1083
|
+
vt as DEFAULT_AUTO_EXPORT_CONFIG,
|
|
1084
|
+
Q as Dropdown,
|
|
1085
|
+
it as DropdownMenu,
|
|
1086
|
+
ur as EditorProvider,
|
|
1087
|
+
St as EffectsPanel,
|
|
1090
1088
|
wt as ExportPanel,
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1089
|
+
Vt as FontBrowserDrawer,
|
|
1090
|
+
Xt as FontColorButton,
|
|
1091
|
+
we as FontSizeDropdown,
|
|
1092
|
+
He as FontSizeGroup,
|
|
1093
|
+
Ct as GlyphPanel,
|
|
1094
|
+
le as GroupElement,
|
|
1097
1095
|
$r as ImageElement,
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1096
|
+
Kt as ImagePanel,
|
|
1097
|
+
Yt as ImageToolbar,
|
|
1098
|
+
Ht as ItalicButton,
|
|
1099
|
+
Tt as KIT_PRESETS,
|
|
1100
|
+
Et as KitProvider,
|
|
1101
|
+
ct as LayersPanel,
|
|
1102
|
+
kt as LayersPanelSkeleton,
|
|
1103
|
+
lt as MenuButton,
|
|
1104
|
+
dt as MenuItem,
|
|
1105
|
+
Qt as MoreMenu,
|
|
1106
|
+
an as PIECE_GUIDES_API_BASE,
|
|
1107
|
+
mr as PRESERVE_SELECTION_ATTR,
|
|
1108
|
+
Oe as Panel,
|
|
1109
|
+
Ar as PathElement,
|
|
1110
|
+
er as PathToolbar,
|
|
1111
|
+
Fr as RichText,
|
|
1112
|
+
_e as SecondaryToolbar,
|
|
1113
|
+
Pr as ShapeElement,
|
|
1114
|
+
tr as ShapeToolbar,
|
|
1115
|
+
ut as ShapeTypeDrawer,
|
|
1118
1116
|
$t as Spinner,
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1117
|
+
mt as Surface,
|
|
1118
|
+
Ge as Switch,
|
|
1119
|
+
rr as TextAlignButton,
|
|
1120
|
+
Nr as TextElement,
|
|
1121
|
+
nr as TextMoreMenu,
|
|
1122
|
+
sr as TextToolbar,
|
|
1125
1123
|
wr as ThemeProvider,
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1124
|
+
Ke as Toggle,
|
|
1125
|
+
At as ToolbarSkeleton,
|
|
1126
|
+
ar as TransformControlPanel,
|
|
1129
1127
|
or as UnderlineButton,
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1128
|
+
ir as UppercaseButton,
|
|
1129
|
+
st as VisualGuideOverlay,
|
|
1130
|
+
Ft as ZoomControls,
|
|
1133
1131
|
Te as canvasEventBus,
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1132
|
+
Pt as getAllSections,
|
|
1133
|
+
tt as getCustomElementTypes,
|
|
1134
|
+
Nt as getSection,
|
|
1135
|
+
Bt as getSectionIds,
|
|
1136
|
+
Br as hasDistressEffect,
|
|
1139
1137
|
Rr as hasMasks,
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1138
|
+
Mr as hasStroke,
|
|
1139
|
+
Dr as isArchTransform,
|
|
1140
|
+
Ir as isCircleElementConfig,
|
|
1141
|
+
zr as isCircleTransform,
|
|
1142
|
+
Or as isCustomElementConfig,
|
|
1143
|
+
Lr as isCustomTransform,
|
|
1144
|
+
Wr as isFlagTransform,
|
|
1145
|
+
Qr as isGroupElement,
|
|
1146
|
+
Kr as isGroupElementConfig,
|
|
1147
|
+
Gr as isGroupTransform,
|
|
1148
|
+
en as isImageElement,
|
|
1149
|
+
_r as isImageElementConfig,
|
|
1150
|
+
Ur as isImageTransform,
|
|
1151
|
+
jr as isKnockout,
|
|
1152
|
+
tn as isPathElement,
|
|
1153
|
+
qr as isPathElementConfig,
|
|
1156
1154
|
Jr as isPathTransform,
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1155
|
+
rt as isRegisteredElementType,
|
|
1156
|
+
rn as isShapeElement,
|
|
1157
|
+
Zr as isShapeElementConfig,
|
|
1158
|
+
Vr as isShapeTransform,
|
|
1159
|
+
nn as isTextElement,
|
|
1160
|
+
Xr as isTextElementConfig,
|
|
1161
|
+
Yr as isWaveTransform,
|
|
1162
|
+
je as loadKitFromJSON,
|
|
1165
1163
|
on as pieceGuidesForArtboard,
|
|
1166
|
-
|
|
1164
|
+
fr as preserveSelectionProps,
|
|
1167
1165
|
Rt as registerBuiltinSections,
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1166
|
+
Mt as registerBuiltinSectionsSync,
|
|
1167
|
+
Qe as registerElementType,
|
|
1168
|
+
Dt as registerSection,
|
|
1169
|
+
It as renderPieceGuides,
|
|
1170
|
+
Ue as serializeKit,
|
|
1171
|
+
hr as shouldPreserveSelection,
|
|
1172
|
+
ft as surfaceVariants,
|
|
1173
|
+
et as unregisterElementType,
|
|
1174
|
+
zt as unregisterSection,
|
|
1177
1175
|
Je as useBreakpoint,
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1176
|
+
nt as useCanvasEvents,
|
|
1177
|
+
Ot as useCapabilities,
|
|
1178
|
+
pr as useCommandContext,
|
|
1179
|
+
Ve as useElementById,
|
|
1180
|
+
xr as useElementsContext,
|
|
1181
|
+
gr as useHistoryContext,
|
|
1182
|
+
Lt as useKit,
|
|
1183
|
+
Xe as useLayerDragDrop,
|
|
1184
|
+
cr as useLayerPreview,
|
|
1185
|
+
Ye as useLayerSelection,
|
|
1186
|
+
Ze as usePerformance,
|
|
1187
|
+
cn as usePieceGuideBundle,
|
|
1188
|
+
qe as useProjectLoader,
|
|
1189
|
+
br as useSelectionContext,
|
|
1190
|
+
ht as useSurface,
|
|
1191
|
+
lr as useTextToolbar,
|
|
1192
|
+
Cr as useTheme,
|
|
1193
|
+
yr as useToolStateContext,
|
|
1194
|
+
vr as useViewportContext
|
|
1197
1195
|
};
|
|
1198
1196
|
//# sourceMappingURL=advanced.mjs.map
|