@snowcone-app/canvas 0.19.1 → 0.21.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/README.md +124 -13
- package/STYLING_CONTRACT.md +427 -0
- package/dist/{CanvasRenderer-DUc-MOeR.js → CanvasRenderer-CwiYq8qg.js} +3 -3
- package/dist/{CanvasRenderer-DUc-MOeR.js.map → CanvasRenderer-CwiYq8qg.js.map} +1 -1
- package/dist/{CanvasStateV1-Bq48qhv5.js → CanvasStateV1-BFabcAKC.js} +35 -30
- package/dist/{CanvasStateV1-Bq48qhv5.js.map → CanvasStateV1-BFabcAKC.js.map} +1 -1
- package/dist/{ContextualToolbars-CkLjHNPn.js → ContextualToolbars--vTtorNg.js} +5 -5
- package/dist/{ContextualToolbars-CkLjHNPn.js.map → ContextualToolbars--vTtorNg.js.map} +1 -1
- package/dist/{EditorCanvasImpl-_3xCnLkx.js → EditorCanvasImpl-2ZgIUVpK.js} +18 -17
- package/dist/{EditorCanvasImpl-_3xCnLkx.js.map → EditorCanvasImpl-2ZgIUVpK.js.map} +1 -1
- package/dist/{ImportManager-D--7JnvW.js → ExportManager-DK7CdI-G.js} +24758 -24758
- package/dist/ExportManager-DK7CdI-G.js.map +1 -0
- package/dist/{FontAnalyzer-DIlqmyuf.js → FontAnalyzer-BpsTYowD.js} +5 -2
- package/dist/FontAnalyzer-BpsTYowD.js.map +1 -0
- package/dist/SnowconeCanvas-DqZicdxK.js +1172 -0
- package/dist/SnowconeCanvas-DqZicdxK.js.map +1 -0
- package/dist/{MenuButton-CeoEAtzP.js → UnifiedFontService-B1PGVu8O.js} +3704 -3429
- package/dist/UnifiedFontService-B1PGVu8O.js.map +1 -0
- package/dist/advanced.mjs +13 -13
- package/dist/api/embed.d.ts +3 -1
- package/dist/api/stable.d.ts +2 -2
- package/dist/components/editor/EditorAdd.d.ts +2 -1
- package/dist/components/editor/EditorBuy.d.ts +2 -1
- package/dist/components/editor/EditorCanvas.d.ts +2 -1
- package/dist/components/editor/EditorControls.d.ts +2 -1
- package/dist/components/editor/EditorHistory.d.ts +2 -1
- package/dist/components/editor/EditorLayers.d.ts +2 -1
- package/dist/components/editor/EditorMenu.d.ts +2 -1
- package/dist/components/editor/EditorPreview.d.ts +2 -1
- package/dist/components/editor/EditorRoot.d.ts +2 -1
- package/dist/components/editor/EditorTextField.d.ts +2 -1
- package/dist/components/editor/useProductSelection.d.ts +2 -1
- package/dist/components/embed/SnowconeCanvas.d.ts +10 -2
- package/dist/components/embed-realtime/context.d.ts +1 -1
- package/dist/contexts/EditorContext.d.ts +1 -1
- package/dist/core/ArtboardElement.d.ts +2 -1
- package/dist/default-editor/SnowconeEditor.d.ts +40 -0
- package/dist/design/design-builder.d.ts +46 -21
- package/dist/design/template-fields.d.ts +32 -0
- package/dist/design-builder-CPF60RU2.js +367 -0
- package/dist/design-builder-CPF60RU2.js.map +1 -0
- package/dist/{EditorContext-5QpqAhjh.js → editorErrors-CK1RISFa.js} +382 -358
- package/dist/editorErrors-CK1RISFa.js.map +1 -0
- package/dist/embed-2tp6Ue90.js +1117 -0
- package/dist/embed-2tp6Ue90.js.map +1 -0
- package/dist/embed.mjs +33 -31
- package/dist/hooks/useArtboards.d.ts +2 -1
- package/dist/index.mjs +8 -8
- package/dist/internals.mjs +5 -5
- package/dist/kits/sections.d.ts +11 -7
- package/dist/rendering/serialize-for-server.d.ts +3 -0
- package/dist/state/CanvasStateV1.d.ts +12 -0
- package/dist/template-fields-FgImixyv.js +476 -0
- package/dist/template-fields-FgImixyv.js.map +1 -0
- package/dist/testing/assertRenders.d.ts +2 -1
- package/dist/testing.mjs +8 -8
- package/dist/testing.mjs.map +1 -1
- package/dist/types/index.d.ts +10 -0
- package/dist/{usePieceGuideBundle-DVOISsB1.js → usePieceGuideBundle-Ctnu5k2D.js} +2 -2
- package/dist/{usePieceGuideBundle-DVOISsB1.js.map → usePieceGuideBundle-Ctnu5k2D.js.map} +1 -1
- package/dist/{validation-0IscSfRb.js → validation-3YEMnKLB.js} +467 -463
- package/dist/validation-3YEMnKLB.js.map +1 -0
- package/example/README.md +179 -0
- package/example/index.html +12 -0
- package/example/package.json +24 -0
- package/example/src/Widget.tsx +62 -0
- package/example/src/main.tsx +9 -0
- package/example/tsconfig.json +14 -0
- package/example/vite.config.ts +11 -0
- package/llms.txt +45 -0
- package/package.json +11 -6
- package/dist/EditorContext-5QpqAhjh.js.map +0 -1
- package/dist/FontAnalyzer-DIlqmyuf.js.map +0 -1
- package/dist/ImportManager-D--7JnvW.js.map +0 -1
- package/dist/MenuButton-CeoEAtzP.js.map +0 -1
- package/dist/SnowconeCanvas-3PA17na3.js +0 -1166
- package/dist/SnowconeCanvas-3PA17na3.js.map +0 -1
- package/dist/design-builder-v4935TeS.js +0 -343
- package/dist/design-builder-v4935TeS.js.map +0 -1
- package/dist/editorErrors-DXNfVXtD.js +0 -29
- package/dist/editorErrors-DXNfVXtD.js.map +0 -1
- package/dist/embed-D2QOpJXG.js +0 -1090
- package/dist/embed-D2QOpJXG.js.map +0 -1
- package/dist/template-fields-Dr3fMItw.js +0 -329
- package/dist/template-fields-Dr3fMItw.js.map +0 -1
- package/dist/validation-0IscSfRb.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as H } from "react/jsx-runtime";
|
|
2
|
-
import { useContext as X, useSyncExternalStore as
|
|
3
|
-
import { y as
|
|
4
|
-
const We = Q(null),
|
|
5
|
-
},
|
|
6
|
-
function
|
|
7
|
-
const t = X(We), e =
|
|
8
|
-
t ? t.subscribe :
|
|
9
|
-
t ? t.getVersion :
|
|
10
|
-
t ? t.getVersion :
|
|
2
|
+
import { useContext as X, useSyncExternalStore as rt, useCallback as a, createContext as Q, useRef as me, useState as E, useEffect as ve, useMemo as q } from "react";
|
|
3
|
+
import { y as Ve, N as it, a9 as st, aa as ct, G as ke, ab as dt, ac as at, ad as lt, ae as ut, af as mt, c as $e, z as ft, ag as At, ah as pt, ai as ht, E as xt, L as Ne, I as yt, g as Et, S as St, aj as bt, ak as De } from "./FontAnalyzer-BpsTYowD.js";
|
|
4
|
+
const We = Q(null), It = () => () => {
|
|
5
|
+
}, Le = () => 0;
|
|
6
|
+
function Jt() {
|
|
7
|
+
const t = X(We), e = rt(
|
|
8
|
+
t ? t.subscribe : It,
|
|
9
|
+
t ? t.getVersion : Le,
|
|
10
|
+
t ? t.getVersion : Le
|
|
11
11
|
);
|
|
12
12
|
return a(
|
|
13
13
|
(o) => !!(t && o && t.getBoundLayer(o)),
|
|
@@ -16,27 +16,27 @@ function Xt() {
|
|
|
16
16
|
[t, e]
|
|
17
17
|
);
|
|
18
18
|
}
|
|
19
|
-
class
|
|
19
|
+
class wt extends Error {
|
|
20
20
|
constructor(e, o, n = {}) {
|
|
21
21
|
super(`[Editor] ${e}: ${o}`), this.name = "EditorError", this.code = e, this.data = { code: e, ...n };
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function gt(t) {
|
|
25
25
|
return t instanceof Error && t.name === "EditorError" && "code" in t;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function Tt() {
|
|
28
28
|
var t;
|
|
29
|
-
return typeof
|
|
29
|
+
return typeof Ve < "u" && ((t = Ve.env) == null ? void 0 : t.NODE_ENV) !== "production";
|
|
30
30
|
}
|
|
31
|
-
const
|
|
32
|
-
function
|
|
33
|
-
const d =
|
|
34
|
-
(
|
|
35
|
-
const y =
|
|
31
|
+
const Ae = $e("useCommandHistory");
|
|
32
|
+
function Pt(t, e, o, n) {
|
|
33
|
+
const d = me(new it(o)), l = X(We), i = a(
|
|
34
|
+
(s, A) => {
|
|
35
|
+
const y = s == null ? void 0 : s.name;
|
|
36
36
|
if (!l || !y) return;
|
|
37
37
|
const x = l.getBoundLayer(y);
|
|
38
38
|
if (x)
|
|
39
|
-
throw new
|
|
39
|
+
throw new wt(
|
|
40
40
|
"E_BOUND_LAYER_MUTATION",
|
|
41
41
|
`cannot ${A} layer "${y}" — a mounted <${x.part} layer={design.layer("${y}")}> is bound to it. Unmount that field first, or keep the layer and set its text through the field / its binding instead.`,
|
|
42
42
|
{ layer: y, part: x.part, operation: A, docSlug: "embed-mode" }
|
|
@@ -49,24 +49,24 @@ function wt(t, e, o, n) {
|
|
|
49
49
|
// Per-artboard state for the active artboard
|
|
50
50
|
canUndoActiveArtboard: !1,
|
|
51
51
|
canRedoActiveArtboard: !1
|
|
52
|
-
}),
|
|
53
|
-
const
|
|
52
|
+
}), c = a(() => {
|
|
53
|
+
const s = d.current, A = o.getActiveArtboardId();
|
|
54
54
|
u({
|
|
55
|
-
canUndo:
|
|
56
|
-
canRedo:
|
|
55
|
+
canUndo: s.canUndo(),
|
|
56
|
+
canRedo: s.canRedo(),
|
|
57
57
|
// Per-artboard state - only check active artboard's history
|
|
58
|
-
canUndoActiveArtboard: A ?
|
|
59
|
-
canRedoActiveArtboard: A ?
|
|
58
|
+
canUndoActiveArtboard: A ? s.canUndoArtboard(A) : !1,
|
|
59
|
+
canRedoActiveArtboard: A ? s.canRedoArtboard(A) : !1
|
|
60
60
|
});
|
|
61
61
|
}, [o]), V = a(
|
|
62
|
-
(
|
|
63
|
-
|
|
64
|
-
const y = new
|
|
62
|
+
(s, A) => {
|
|
63
|
+
s && s.name !== A.name && i(s, "rename");
|
|
64
|
+
const y = new st(
|
|
65
65
|
A.id,
|
|
66
|
-
|
|
66
|
+
s || null,
|
|
67
67
|
A,
|
|
68
68
|
(P) => {
|
|
69
|
-
e((k) => k.map((
|
|
69
|
+
e((k) => k.map((R) => R.id === P.id ? P : R));
|
|
70
70
|
}
|
|
71
71
|
), x = o.getArtboardIdForElement(A.id);
|
|
72
72
|
if (x)
|
|
@@ -75,67 +75,67 @@ function wt(t, e, o, n) {
|
|
|
75
75
|
const P = o.getActiveArtboardId();
|
|
76
76
|
P && d.current.executeOnArtboard(P, y);
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
c();
|
|
79
79
|
},
|
|
80
|
-
[e, o,
|
|
80
|
+
[e, o, c, i]
|
|
81
81
|
), O = a(
|
|
82
|
-
(
|
|
82
|
+
(s, A, y, x) => {
|
|
83
83
|
const P = A || o.getActiveArtboardId();
|
|
84
84
|
if (!P) {
|
|
85
|
-
|
|
85
|
+
Ae.warn("No active artboard to add element to");
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
88
88
|
const k = new ct(
|
|
89
|
-
|
|
90
|
-
(
|
|
91
|
-
const N =
|
|
89
|
+
s,
|
|
90
|
+
(R) => {
|
|
91
|
+
const N = R;
|
|
92
92
|
e((v) => {
|
|
93
93
|
if (x) {
|
|
94
|
-
const U = v.findIndex((
|
|
94
|
+
const U = v.findIndex((F) => F.id === x);
|
|
95
95
|
if (U !== -1) {
|
|
96
|
-
const
|
|
97
|
-
return
|
|
96
|
+
const F = [...v];
|
|
97
|
+
return F.splice(U, 0, N), F;
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
if (y) {
|
|
101
|
-
const U = v.findIndex((
|
|
101
|
+
const U = v.findIndex((F) => F.id === y);
|
|
102
102
|
if (U !== -1) {
|
|
103
|
-
const
|
|
104
|
-
return
|
|
103
|
+
const F = [...v];
|
|
104
|
+
return F.splice(U + 1, 0, N), F;
|
|
105
105
|
}
|
|
106
|
-
for (let
|
|
107
|
-
const
|
|
108
|
-
if (
|
|
109
|
-
const ne =
|
|
106
|
+
for (let F = 0; F < v.length; F++) {
|
|
107
|
+
const j = v[F];
|
|
108
|
+
if (j instanceof ke && j.children) {
|
|
109
|
+
const ne = j.children.findIndex((Y) => Y.id === y);
|
|
110
110
|
if (ne !== -1) {
|
|
111
|
-
const
|
|
112
|
-
|
|
111
|
+
const Y = j.clone();
|
|
112
|
+
Y.children.splice(ne + 1, 0, N);
|
|
113
113
|
const J = [...v];
|
|
114
|
-
return J[
|
|
114
|
+
return J[F] = Y, J;
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
return [...v, N];
|
|
120
|
-
}), o.addElementToArtboard(
|
|
120
|
+
}), o.addElementToArtboard(R.id, P);
|
|
121
121
|
},
|
|
122
|
-
(
|
|
123
|
-
e((N) => N.filter((v) => v.id !==
|
|
122
|
+
(R) => {
|
|
123
|
+
e((N) => N.filter((v) => v.id !== R)), o.removeElementFromArtboard(R);
|
|
124
124
|
}
|
|
125
125
|
);
|
|
126
|
-
d.current.executeOnArtboard(P, k),
|
|
126
|
+
d.current.executeOnArtboard(P, k), c();
|
|
127
127
|
},
|
|
128
|
-
[e, o,
|
|
128
|
+
[e, o, c]
|
|
129
129
|
), D = a(
|
|
130
|
-
(
|
|
131
|
-
i(
|
|
132
|
-
const A = o.getArtboardIdForElement(
|
|
130
|
+
(s) => {
|
|
131
|
+
i(s, "delete");
|
|
132
|
+
const A = o.getArtboardIdForElement(s.id);
|
|
133
133
|
if (!A) {
|
|
134
|
-
|
|
134
|
+
Ae.warn("Element not found in any artboard");
|
|
135
135
|
return;
|
|
136
136
|
}
|
|
137
|
-
const y = new
|
|
138
|
-
|
|
137
|
+
const y = new dt(
|
|
138
|
+
s,
|
|
139
139
|
(x) => {
|
|
140
140
|
e((P) => [...P, x]), o.addElementToArtboard(x.id, A);
|
|
141
141
|
},
|
|
@@ -143,37 +143,37 @@ function wt(t, e, o, n) {
|
|
|
143
143
|
e((P) => P.filter((k) => k.id !== x)), o.removeElementFromArtboard(x);
|
|
144
144
|
}
|
|
145
145
|
);
|
|
146
|
-
d.current.executeOnArtboard(A, y),
|
|
146
|
+
d.current.executeOnArtboard(A, y), c();
|
|
147
147
|
},
|
|
148
|
-
[e, o,
|
|
148
|
+
[e, o, c, i]
|
|
149
149
|
), w = a(
|
|
150
|
-
(
|
|
151
|
-
const A = new
|
|
152
|
-
d.current.executeGlobal(A),
|
|
150
|
+
(s) => {
|
|
151
|
+
const A = new at(s, o);
|
|
152
|
+
d.current.executeGlobal(A), c(), n == null || n();
|
|
153
153
|
},
|
|
154
|
-
[o,
|
|
154
|
+
[o, c, n]
|
|
155
155
|
), L = a(
|
|
156
|
-
(
|
|
157
|
-
const A = new
|
|
158
|
-
d.current.executeGlobal(A),
|
|
156
|
+
(s) => {
|
|
157
|
+
const A = new lt(s, o);
|
|
158
|
+
d.current.executeGlobal(A), c(), n == null || n();
|
|
159
159
|
},
|
|
160
|
-
[o,
|
|
160
|
+
[o, c, n]
|
|
161
161
|
), p = a(
|
|
162
|
-
(
|
|
163
|
-
const x = new
|
|
164
|
-
d.current.executeGlobal(x),
|
|
162
|
+
(s, A, y) => {
|
|
163
|
+
const x = new ut(s, A, y, o);
|
|
164
|
+
d.current.executeGlobal(x), c(), n == null || n();
|
|
165
165
|
},
|
|
166
|
-
[o,
|
|
166
|
+
[o, c, n]
|
|
167
167
|
), f = a(
|
|
168
|
-
(
|
|
169
|
-
if (
|
|
168
|
+
(s) => {
|
|
169
|
+
if (s.length === 0)
|
|
170
170
|
return;
|
|
171
171
|
const A = o.getActiveArtboardId();
|
|
172
172
|
if (!A) {
|
|
173
|
-
|
|
173
|
+
Ae.warn("No active artboard for batch execution");
|
|
174
174
|
return;
|
|
175
175
|
}
|
|
176
|
-
const y =
|
|
176
|
+
const y = s.map((x) => new class extends Object {
|
|
177
177
|
execute() {
|
|
178
178
|
x.execute();
|
|
179
179
|
}
|
|
@@ -181,54 +181,54 @@ function wt(t, e, o, n) {
|
|
|
181
181
|
x.undo();
|
|
182
182
|
}
|
|
183
183
|
}());
|
|
184
|
-
d.current.executeBatchOnArtboard(A, y),
|
|
184
|
+
d.current.executeBatchOnArtboard(A, y), c();
|
|
185
185
|
},
|
|
186
|
-
[o,
|
|
187
|
-
),
|
|
188
|
-
d.current.undo() && (
|
|
189
|
-
}, [
|
|
190
|
-
d.current.redo() && (
|
|
191
|
-
}, [
|
|
192
|
-
const
|
|
193
|
-
|
|
194
|
-
}, [o,
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
}, [o,
|
|
198
|
-
d.current.clear(),
|
|
199
|
-
}, [
|
|
200
|
-
(
|
|
201
|
-
d.current.clearArtboardHistory(
|
|
186
|
+
[o, c]
|
|
187
|
+
), g = a(() => {
|
|
188
|
+
d.current.undo() && (c(), n == null || n());
|
|
189
|
+
}, [c, n]), z = a(() => {
|
|
190
|
+
d.current.redo() && (c(), n == null || n());
|
|
191
|
+
}, [c, n]), T = a(() => {
|
|
192
|
+
const s = o.getActiveArtboardId();
|
|
193
|
+
s && d.current.undoArtboard(s) && (c(), n == null || n());
|
|
194
|
+
}, [o, c, n]), b = a(() => {
|
|
195
|
+
const s = o.getActiveArtboardId();
|
|
196
|
+
s && d.current.redoArtboard(s) && (c(), n == null || n());
|
|
197
|
+
}, [o, c, n]), _ = a(() => {
|
|
198
|
+
d.current.clear(), c();
|
|
199
|
+
}, [c]), te = a(
|
|
200
|
+
(s) => {
|
|
201
|
+
d.current.clearArtboardHistory(s), c();
|
|
202
202
|
},
|
|
203
|
-
[
|
|
204
|
-
), B =
|
|
205
|
-
|
|
206
|
-
const
|
|
207
|
-
|
|
203
|
+
[c]
|
|
204
|
+
), B = me(null);
|
|
205
|
+
ve(() => {
|
|
206
|
+
const s = o.getActiveArtboardId();
|
|
207
|
+
s !== B.current && (B.current = s, c());
|
|
208
208
|
});
|
|
209
|
-
const
|
|
210
|
-
(
|
|
211
|
-
const x = t.map((
|
|
209
|
+
const $ = a(
|
|
210
|
+
(s, A, y) => {
|
|
211
|
+
const x = t.map((R) => R.id), P = o.getArtboardIdForElement(s);
|
|
212
212
|
if (!P) {
|
|
213
|
-
|
|
213
|
+
Ae.warn("Element not found in any artboard");
|
|
214
214
|
return;
|
|
215
215
|
}
|
|
216
|
-
const k = new
|
|
216
|
+
const k = new mt(s, A, y, x, (R) => {
|
|
217
217
|
e((N) => {
|
|
218
218
|
const v = new Map(N.map((U) => [U.id, U]));
|
|
219
|
-
return
|
|
219
|
+
return R.map((U) => v.get(U)).filter(Boolean);
|
|
220
220
|
});
|
|
221
221
|
});
|
|
222
|
-
d.current.executeOnArtboard(P, k),
|
|
222
|
+
d.current.executeOnArtboard(P, k), c();
|
|
223
223
|
},
|
|
224
|
-
[t, e, o,
|
|
224
|
+
[t, e, o, c]
|
|
225
225
|
);
|
|
226
226
|
return {
|
|
227
227
|
// Element operations
|
|
228
228
|
executeElementUpdate: V,
|
|
229
229
|
executeAddElement: O,
|
|
230
230
|
executeRemoveElement: D,
|
|
231
|
-
executeReorderElement:
|
|
231
|
+
executeReorderElement: $,
|
|
232
232
|
// Batch operations
|
|
233
233
|
executeCommandBatch: f,
|
|
234
234
|
// Artboard operations
|
|
@@ -236,10 +236,10 @@ function wt(t, e, o, n) {
|
|
|
236
236
|
executeDeleteArtboard: L,
|
|
237
237
|
executeUpdateArtboard: p,
|
|
238
238
|
// Undo/redo (smart - considers last operation and active artboard)
|
|
239
|
-
undo:
|
|
239
|
+
undo: g,
|
|
240
240
|
redo: z,
|
|
241
241
|
// Undo/redo for active artboard only (element operations)
|
|
242
|
-
undoActiveArtboard:
|
|
242
|
+
undoActiveArtboard: T,
|
|
243
243
|
redoActiveArtboard: b,
|
|
244
244
|
clearHistory: _,
|
|
245
245
|
clearArtboardHistory: te,
|
|
@@ -255,21 +255,21 @@ function wt(t, e, o, n) {
|
|
|
255
255
|
function oe(t) {
|
|
256
256
|
return t && "fontSize" in t && "color" in t && "fontFamily" in t;
|
|
257
257
|
}
|
|
258
|
-
function
|
|
259
|
-
const [o, n] = E(32), [d, l] = E("#333333"), [i, r] = E("Arial"), [u,
|
|
260
|
-
|
|
258
|
+
function Ct(t, e) {
|
|
259
|
+
const [o, n] = E(32), [d, l] = E("#333333"), [i, r] = E("Arial"), [u, c] = E("center");
|
|
260
|
+
ve(() => {
|
|
261
261
|
if (t && oe(t)) {
|
|
262
|
-
const p = t.transformType === "circle" && "getEffectiveFontSize" in t ? Math.round(t.getEffectiveFontSize()) : Math.round(t.fontSize), f = t.color,
|
|
263
|
-
n((
|
|
262
|
+
const p = t.transformType === "circle" && "getEffectiveFontSize" in t ? Math.round(t.getEffectiveFontSize()) : Math.round(t.fontSize), f = t.color, g = t.fontFamily, z = t.textAlign;
|
|
263
|
+
n((T) => T !== p ? p : T), l((T) => T !== f ? f : T), r((T) => T !== g ? g : T), c((T) => T !== z ? z : T);
|
|
264
264
|
}
|
|
265
265
|
}, [t]);
|
|
266
266
|
const V = a(
|
|
267
267
|
(p) => {
|
|
268
268
|
if (!t || !oe(t)) return;
|
|
269
|
-
const f = Math.max(
|
|
269
|
+
const f = Math.max(At, Math.min(pt, o + p));
|
|
270
270
|
n(f);
|
|
271
|
-
const
|
|
272
|
-
|
|
271
|
+
const g = t.clone();
|
|
272
|
+
g.transformType === "circle" && "setEffectiveFontSize" in g ? g.setEffectiveFontSize(f) : g.setFontSize(f), e(g);
|
|
273
273
|
},
|
|
274
274
|
[t, o, e]
|
|
275
275
|
), O = a(
|
|
@@ -286,8 +286,8 @@ function Tt(t, e) {
|
|
|
286
286
|
l(p);
|
|
287
287
|
const f = t.clone();
|
|
288
288
|
if (f.color = p, f.richText)
|
|
289
|
-
for (const
|
|
290
|
-
|
|
289
|
+
for (const g of f.richText.spans)
|
|
290
|
+
g.style.color = void 0;
|
|
291
291
|
e(f);
|
|
292
292
|
},
|
|
293
293
|
[t, e]
|
|
@@ -295,15 +295,15 @@ function Tt(t, e) {
|
|
|
295
295
|
(p) => {
|
|
296
296
|
if (!t || !oe(t)) return;
|
|
297
297
|
const f = t.fontFamily;
|
|
298
|
-
f !== p &&
|
|
299
|
-
const
|
|
300
|
-
|
|
298
|
+
f !== p && ft.clearCache(f), r(p);
|
|
299
|
+
const g = t.clone();
|
|
300
|
+
g.fontFamily = p, e(g);
|
|
301
301
|
},
|
|
302
302
|
[t, e]
|
|
303
303
|
), L = a(
|
|
304
304
|
(p) => {
|
|
305
305
|
if (!t || !oe(t)) return;
|
|
306
|
-
|
|
306
|
+
c(p);
|
|
307
307
|
const f = t.clone();
|
|
308
308
|
f.textAlign = p, e(f);
|
|
309
309
|
},
|
|
@@ -319,7 +319,7 @@ function Tt(t, e) {
|
|
|
319
319
|
setFontSize: n,
|
|
320
320
|
setFontColor: l,
|
|
321
321
|
setFontFamily: r,
|
|
322
|
-
setTextAlign:
|
|
322
|
+
setTextAlign: c,
|
|
323
323
|
// Update functions (update element + UI)
|
|
324
324
|
updateFontSize: V,
|
|
325
325
|
setFontSizeValue: O,
|
|
@@ -329,7 +329,7 @@ function Tt(t, e) {
|
|
|
329
329
|
};
|
|
330
330
|
}
|
|
331
331
|
const Ze = "data-preserve-selection";
|
|
332
|
-
function
|
|
332
|
+
function Ft(t) {
|
|
333
333
|
if (!(t instanceof Element))
|
|
334
334
|
return !1;
|
|
335
335
|
let e = t;
|
|
@@ -348,18 +348,18 @@ function gt(t) {
|
|
|
348
348
|
}
|
|
349
349
|
return !1;
|
|
350
350
|
}
|
|
351
|
-
const
|
|
351
|
+
const Kt = {
|
|
352
352
|
[Ze]: ""
|
|
353
353
|
};
|
|
354
|
-
function
|
|
355
|
-
const e =
|
|
354
|
+
function Rt(t) {
|
|
355
|
+
const e = Ge(t);
|
|
356
356
|
return e !== null && e < 0.5;
|
|
357
357
|
}
|
|
358
|
-
function
|
|
359
|
-
const e =
|
|
358
|
+
function Mt(t) {
|
|
359
|
+
const e = Ge(t);
|
|
360
360
|
return e !== null && e >= 0.5;
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function Ge(t) {
|
|
363
363
|
const e = t.trim();
|
|
364
364
|
if (e.startsWith("#")) {
|
|
365
365
|
const n = e.slice(1);
|
|
@@ -369,40 +369,40 @@ function $e(t) {
|
|
|
369
369
|
else if (n.length === 6)
|
|
370
370
|
d = parseInt(n.slice(0, 2), 16), l = parseInt(n.slice(2, 4), 16), i = parseInt(n.slice(4, 6), 16);
|
|
371
371
|
else return null;
|
|
372
|
-
return Number.isNaN(d) || Number.isNaN(l) || Number.isNaN(i) ? null :
|
|
372
|
+
return Number.isNaN(d) || Number.isNaN(l) || Number.isNaN(i) ? null : Be(d, l, i);
|
|
373
373
|
}
|
|
374
374
|
const o = e.match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/);
|
|
375
|
-
return o ?
|
|
375
|
+
return o ? Be(Number(o[1]), Number(o[2]), Number(o[3])) : null;
|
|
376
376
|
}
|
|
377
|
-
function
|
|
377
|
+
function Be(t, e, o) {
|
|
378
378
|
const n = (d) => {
|
|
379
379
|
const l = d / 255;
|
|
380
380
|
return l <= 0.03928 ? l / 12.92 : Math.pow((l + 0.055) / 1.055, 2.4);
|
|
381
381
|
};
|
|
382
382
|
return 0.2126 * n(t) + 0.7152 * n(e) + 0.0722 * n(o);
|
|
383
383
|
}
|
|
384
|
-
const
|
|
385
|
-
function
|
|
386
|
-
return t &&
|
|
384
|
+
const vt = "#333333", zt = "#f4f4f5";
|
|
385
|
+
function Ot(t) {
|
|
386
|
+
return t && Rt(t) ? zt : vt;
|
|
387
387
|
}
|
|
388
|
-
const
|
|
388
|
+
const Xe = Q(null), Ut = 0.1, Ht = 4, _e = 0.25, Vt = ({
|
|
389
389
|
children: t,
|
|
390
390
|
artboardManager: e,
|
|
391
391
|
canvasRef: o,
|
|
392
392
|
viewPadding: n = 0.9
|
|
393
393
|
}) => {
|
|
394
|
-
const [d, l] = E(1), [i, r] = E({ x: 0, y: 0 }), [u,
|
|
394
|
+
const [d, l] = E(1), [i, r] = E({ x: 0, y: 0 }), [u, c] = E(!1), [V, O] = E(1), D = a(() => {
|
|
395
395
|
O(1), r({ x: 0, y: 0 });
|
|
396
396
|
}, []), w = a(() => {
|
|
397
|
-
l((z) => Math.min(z +
|
|
397
|
+
l((z) => Math.min(z + _e, Ht));
|
|
398
398
|
}, []), L = a(() => {
|
|
399
|
-
l((z) => Math.max(z -
|
|
399
|
+
l((z) => Math.max(z - _e, Ut));
|
|
400
400
|
}, []), p = a(() => {
|
|
401
401
|
const z = e.getActiveArtboard();
|
|
402
402
|
if (!z || !o.current) return;
|
|
403
|
-
let
|
|
404
|
-
for (;
|
|
405
|
-
|
|
403
|
+
let T = o.current.parentElement, b = 0, _ = 0;
|
|
404
|
+
for (; T && (b = T.clientWidth, _ = T.clientHeight, !(b > 0 && _ > 0)); )
|
|
405
|
+
T = T.parentElement;
|
|
406
406
|
if (!b || !_) return;
|
|
407
407
|
const te = Math.min(
|
|
408
408
|
b * n / z.width,
|
|
@@ -413,7 +413,7 @@ const Ge = Q(null), vt = 0.1, zt = 4, Be = 0.25, Ot = ({
|
|
|
413
413
|
l(te), r({ x: 0, y: 0 });
|
|
414
414
|
}, [e, o, n]), f = a(() => {
|
|
415
415
|
l(1), r({ x: 0, y: 0 });
|
|
416
|
-
}, []),
|
|
416
|
+
}, []), g = q(
|
|
417
417
|
() => ({
|
|
418
418
|
zoom: d,
|
|
419
419
|
panOffset: i,
|
|
@@ -424,23 +424,23 @@ const Ge = Q(null), vt = 0.1, zt = 4, Be = 0.25, Ot = ({
|
|
|
424
424
|
resetView: f,
|
|
425
425
|
setZoom: l,
|
|
426
426
|
setPanOffset: r,
|
|
427
|
-
setIsPanning:
|
|
427
|
+
setIsPanning: c,
|
|
428
428
|
userZoom: V,
|
|
429
429
|
setUserZoom: O,
|
|
430
430
|
resetUserView: D
|
|
431
431
|
}),
|
|
432
432
|
[d, i, u, w, L, p, f, V, D]
|
|
433
433
|
);
|
|
434
|
-
return /* @__PURE__ */ H(
|
|
434
|
+
return /* @__PURE__ */ H(Xe.Provider, { value: g, children: t });
|
|
435
435
|
};
|
|
436
|
-
function
|
|
437
|
-
const t = X(
|
|
436
|
+
function Nt() {
|
|
437
|
+
const t = X(Xe);
|
|
438
438
|
if (!t)
|
|
439
439
|
throw new Error("useViewportContext must be used within a ViewportProvider (or EditorProvider)");
|
|
440
440
|
return t;
|
|
441
441
|
}
|
|
442
|
-
const
|
|
443
|
-
const [e, o] = E(null), [n, d] = E([]), [l, i] = E(null), [r, u] = E(null), [
|
|
442
|
+
const je = Q(null), Dt = ({ children: t }) => {
|
|
443
|
+
const [e, o] = E(null), [n, d] = E([]), [l, i] = E(null), [r, u] = E(null), [c, V] = E(!1), O = a((L) => {
|
|
444
444
|
o(L);
|
|
445
445
|
}, []), D = a((L) => {
|
|
446
446
|
i(L);
|
|
@@ -450,7 +450,7 @@ const Xe = Q(null), Ht = ({ children: t }) => {
|
|
|
450
450
|
multiSelection: n,
|
|
451
451
|
activeChildElement: l,
|
|
452
452
|
hoveredElementId: r,
|
|
453
|
-
hideHandles:
|
|
453
|
+
hideHandles: c,
|
|
454
454
|
setSelectedId: o,
|
|
455
455
|
setMultiSelection: d,
|
|
456
456
|
setHoveredElementId: u,
|
|
@@ -463,20 +463,20 @@ const Xe = Q(null), Ht = ({ children: t }) => {
|
|
|
463
463
|
n,
|
|
464
464
|
l,
|
|
465
465
|
r,
|
|
466
|
-
|
|
466
|
+
c,
|
|
467
467
|
O,
|
|
468
468
|
D
|
|
469
469
|
]
|
|
470
470
|
);
|
|
471
|
-
return /* @__PURE__ */ H(
|
|
471
|
+
return /* @__PURE__ */ H(je.Provider, { value: w, children: t });
|
|
472
472
|
};
|
|
473
|
-
function
|
|
474
|
-
const t = X(
|
|
473
|
+
function Lt() {
|
|
474
|
+
const t = X(je);
|
|
475
475
|
if (!t)
|
|
476
476
|
throw new Error("useSelectionContext must be used within a SelectionProvider (or EditorProvider)");
|
|
477
477
|
return t;
|
|
478
478
|
}
|
|
479
|
-
const Ye = Q(null),
|
|
479
|
+
const Ye = Q(null), Bt = ({ children: t, value: e }) => {
|
|
480
480
|
const o = q(
|
|
481
481
|
() => ({
|
|
482
482
|
undo: e.undo,
|
|
@@ -501,14 +501,14 @@ const Ye = Q(null), Nt = ({ children: t, value: e }) => {
|
|
|
501
501
|
);
|
|
502
502
|
return /* @__PURE__ */ H(Ye.Provider, { value: o, children: t });
|
|
503
503
|
};
|
|
504
|
-
function
|
|
504
|
+
function qt() {
|
|
505
505
|
const t = X(Ye);
|
|
506
506
|
if (!t)
|
|
507
507
|
throw new Error("useHistoryContext must be used within a HistoryProvider (or EditorProvider)");
|
|
508
508
|
return t;
|
|
509
509
|
}
|
|
510
|
-
const
|
|
511
|
-
const [e, o] = E(null), [n, d] = E(!1), [l, i] = E(0), [r, u] = E(!1), [
|
|
510
|
+
const Je = Q(null), _t = ({ children: t }) => {
|
|
511
|
+
const [e, o] = E(null), [n, d] = E(!1), [l, i] = E(0), [r, u] = E(!1), [c, V] = E(!1), O = q(
|
|
512
512
|
() => ({
|
|
513
513
|
expandedPanelType: e,
|
|
514
514
|
setExpandedPanelType: o,
|
|
@@ -518,20 +518,20 @@ const je = Q(null), Dt = ({ children: t }) => {
|
|
|
518
518
|
setTextSelectionVersion: i,
|
|
519
519
|
isCanvasReady: r,
|
|
520
520
|
setCanvasReady: u,
|
|
521
|
-
isRotating:
|
|
521
|
+
isRotating: c,
|
|
522
522
|
setIsRotating: V
|
|
523
523
|
}),
|
|
524
|
-
[e, n, l, r,
|
|
524
|
+
[e, n, l, r, c]
|
|
525
525
|
);
|
|
526
|
-
return /* @__PURE__ */ H(
|
|
526
|
+
return /* @__PURE__ */ H(Je.Provider, { value: O, children: t });
|
|
527
527
|
};
|
|
528
|
-
function
|
|
529
|
-
const t = X(
|
|
528
|
+
function kt() {
|
|
529
|
+
const t = X(Je);
|
|
530
530
|
if (!t)
|
|
531
531
|
throw new Error("useToolStateContext must be used within a ToolStateProvider (or EditorProvider)");
|
|
532
532
|
return t;
|
|
533
533
|
}
|
|
534
|
-
const
|
|
534
|
+
const Ke = Q(null), $t = ({ children: t, value: e }) => {
|
|
535
535
|
const o = q(
|
|
536
536
|
() => ({
|
|
537
537
|
elements: e.elements,
|
|
@@ -586,15 +586,15 @@ const Je = Q(null), Bt = ({ children: t, value: e }) => {
|
|
|
586
586
|
e.canvasEditorRef
|
|
587
587
|
]
|
|
588
588
|
);
|
|
589
|
-
return /* @__PURE__ */ H(
|
|
589
|
+
return /* @__PURE__ */ H(Ke.Provider, { value: o, children: t });
|
|
590
590
|
};
|
|
591
|
-
function
|
|
592
|
-
const t = X(
|
|
591
|
+
function Qt() {
|
|
592
|
+
const t = X(Ke);
|
|
593
593
|
if (!t)
|
|
594
594
|
throw new Error("useElementsContext must be used within an ElementsProvider (or EditorProvider)");
|
|
595
595
|
return t;
|
|
596
596
|
}
|
|
597
|
-
const
|
|
597
|
+
const Me = Q(null), Wt = ({ children: t, value: e }) => {
|
|
598
598
|
const o = q(
|
|
599
599
|
() => ({
|
|
600
600
|
executeElementUpdate: e.executeElementUpdate,
|
|
@@ -635,53 +635,53 @@ const Ke = Q(null), _t = ({ children: t, value: e }) => {
|
|
|
635
635
|
e.historyManager
|
|
636
636
|
]
|
|
637
637
|
);
|
|
638
|
-
return /* @__PURE__ */ H(
|
|
638
|
+
return /* @__PURE__ */ H(Me.Provider, { value: o, children: t });
|
|
639
639
|
};
|
|
640
|
-
function
|
|
641
|
-
const t = X(
|
|
640
|
+
function en() {
|
|
641
|
+
const t = X(Me);
|
|
642
642
|
if (!t)
|
|
643
643
|
throw new Error("useCommandContext must be used within a CommandProvider (or EditorProvider)");
|
|
644
644
|
return t;
|
|
645
645
|
}
|
|
646
|
-
const
|
|
647
|
-
const t = X(
|
|
646
|
+
const Zt = $e("EditorContext"), qe = Q(null), Qe = Q(null), tn = () => {
|
|
647
|
+
const t = X(Qe);
|
|
648
648
|
if (!t)
|
|
649
649
|
throw new Error("useEditorHandles must be used within EditorProvider");
|
|
650
650
|
return t;
|
|
651
|
-
},
|
|
652
|
-
const d =
|
|
651
|
+
}, Gt = ({ children: t, artboardManager: e, canvasRef: o, canvasEditorRef: n }) => {
|
|
652
|
+
const d = me(null), l = q(() => ({ get: () => d.current }), []), i = Nt(), r = Lt(), u = kt(), [c, V] = E(
|
|
653
653
|
() => e.getAllArtboards()
|
|
654
654
|
), [O, D] = E(0), [w, L] = E(
|
|
655
|
-
() => new
|
|
655
|
+
() => new Ne()
|
|
656
656
|
), p = q(() => w.toArray(), [w]), f = a((m) => {
|
|
657
657
|
L((h) => {
|
|
658
|
-
const I = h.toArray(),
|
|
659
|
-
return
|
|
658
|
+
const I = h.toArray(), C = typeof m == "function" ? m(I) : m;
|
|
659
|
+
return C === I ? h : Ne.fromArray(C);
|
|
660
660
|
});
|
|
661
|
-
}, []),
|
|
661
|
+
}, []), g = a(
|
|
662
662
|
(m) => w.get(m),
|
|
663
663
|
[w]
|
|
664
|
-
), [z,
|
|
664
|
+
), [z, T] = E([]), b = r.selectedId ? w.get(r.selectedId) : void 0, _ = a(() => {
|
|
665
665
|
V([...e.getAllArtboards()]), D((m) => m + 1);
|
|
666
666
|
}, [e]), {
|
|
667
667
|
historyManager: te,
|
|
668
668
|
executeElementUpdate: B,
|
|
669
|
-
executeAddElement:
|
|
670
|
-
executeRemoveElement:
|
|
669
|
+
executeAddElement: $,
|
|
670
|
+
executeRemoveElement: s,
|
|
671
671
|
executeReorderElement: A,
|
|
672
672
|
executeCommandBatch: y,
|
|
673
673
|
executeCreateArtboard: x,
|
|
674
674
|
executeDeleteArtboard: P,
|
|
675
675
|
executeUpdateArtboard: k,
|
|
676
|
-
undo:
|
|
676
|
+
undo: R,
|
|
677
677
|
redo: N,
|
|
678
678
|
canUndo: v,
|
|
679
679
|
canRedo: U,
|
|
680
|
-
undoActiveArtboard:
|
|
681
|
-
redoActiveArtboard:
|
|
680
|
+
undoActiveArtboard: F,
|
|
681
|
+
redoActiveArtboard: j,
|
|
682
682
|
canUndoActiveArtboard: ne,
|
|
683
|
-
canRedoActiveArtboard:
|
|
684
|
-
} =
|
|
683
|
+
canRedoActiveArtboard: Y
|
|
684
|
+
} = Pt(
|
|
685
685
|
p,
|
|
686
686
|
f,
|
|
687
687
|
e,
|
|
@@ -692,43 +692,43 @@ const kt = ke("EditorContext"), Me = Q(null), qe = Q(null), en = () => {
|
|
|
692
692
|
B(h, m);
|
|
693
693
|
},
|
|
694
694
|
[w, B]
|
|
695
|
-
),
|
|
695
|
+
), et = a(
|
|
696
696
|
(m) => {
|
|
697
|
-
if (!b || !(b instanceof
|
|
697
|
+
if (!b || !(b instanceof ke))
|
|
698
698
|
return;
|
|
699
699
|
const h = b.clone(), I = h.children.findIndex(
|
|
700
|
-
(
|
|
700
|
+
(C) => C.id === m.id
|
|
701
701
|
);
|
|
702
702
|
I >= 0 && (h.children[I] = m, J(h));
|
|
703
703
|
},
|
|
704
704
|
[b, J]
|
|
705
|
-
),
|
|
706
|
-
fontSize:
|
|
707
|
-
fontColor:
|
|
708
|
-
fontFamily:
|
|
709
|
-
textAlign:
|
|
710
|
-
updateFontSize:
|
|
711
|
-
setFontSizeValue:
|
|
712
|
-
updateFontColor:
|
|
713
|
-
updateFontFamily:
|
|
714
|
-
updateTextAlign:
|
|
715
|
-
} =
|
|
705
|
+
), tt = r.activeChildElement || b, nt = r.activeChildElement ? et : J, {
|
|
706
|
+
fontSize: pe,
|
|
707
|
+
fontColor: he,
|
|
708
|
+
fontFamily: xe,
|
|
709
|
+
textAlign: ye,
|
|
710
|
+
updateFontSize: Ee,
|
|
711
|
+
setFontSizeValue: Se,
|
|
712
|
+
updateFontColor: be,
|
|
713
|
+
updateFontFamily: Ie,
|
|
714
|
+
updateTextAlign: we
|
|
715
|
+
} = Ct(tt, nt), ge = a(
|
|
716
716
|
async (m, h) => {
|
|
717
|
-
var
|
|
717
|
+
var Oe;
|
|
718
718
|
const I = e.getActiveArtboardId();
|
|
719
719
|
if (!I) {
|
|
720
720
|
alert("Please create or select an artboard first");
|
|
721
721
|
return;
|
|
722
722
|
}
|
|
723
|
-
const
|
|
723
|
+
const C = `element-${Date.now()}`, S = e.getActiveArtboard(), ie = S ? S.x + S.width / 2 : window.innerWidth / 2, se = S ? S.y + S.height / 2 : window.innerHeight / 2, W = ((Oe = n.current) == null ? void 0 : Oe.getZoom()) || i.zoom || 1;
|
|
724
724
|
if (m === "image") {
|
|
725
|
-
const
|
|
726
|
-
id:
|
|
727
|
-
x:
|
|
728
|
-
y:
|
|
725
|
+
const ue = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==", ee = 200 / W, K = h == null ? void 0 : h.src, G = new yt({
|
|
726
|
+
id: C,
|
|
727
|
+
x: ie,
|
|
728
|
+
y: se,
|
|
729
729
|
// Defer loading `src` until after the element is in the store so a
|
|
730
730
|
// synchronously-cached image can't fire onLoadCallback too early.
|
|
731
|
-
imageUrl: K ? "" :
|
|
731
|
+
imageUrl: K ? "" : ue,
|
|
732
732
|
transformData: {
|
|
733
733
|
type: "image",
|
|
734
734
|
width: ee,
|
|
@@ -743,32 +743,32 @@ const kt = ke("EditorContext"), Me = Q(null), qe = Q(null), en = () => {
|
|
|
743
743
|
}
|
|
744
744
|
});
|
|
745
745
|
K && (G.imageLoaded = !1, G.imageElement = null, G.isCropping = !1, G.imageUrl = K, G.preserveDimensions = !1, G.onLoadCallback = (M) => {
|
|
746
|
-
const
|
|
747
|
-
Re < 1 && (M.transformData.width =
|
|
748
|
-
}),
|
|
746
|
+
const Ue = M.transformData.width, He = M.transformData.height, Re = Math.min(ee / Ue, ee / He, 1);
|
|
747
|
+
Re < 1 && (M.transformData.width = Ue * Re, M.transformData.height = He * Re), M.transformData.cropX = 0, M.transformData.cropY = 0, M.transformData.cropWidth = 1, M.transformData.cropHeight = 1, B(G, M);
|
|
748
|
+
}), $(G, I), r.setSelectedId(G.id), K && G.loadImage(K);
|
|
749
749
|
return;
|
|
750
750
|
}
|
|
751
751
|
let ce;
|
|
752
|
-
const
|
|
752
|
+
const Z = {
|
|
753
753
|
text: "custom",
|
|
754
754
|
circle: "circle",
|
|
755
755
|
wave: "wave",
|
|
756
756
|
arch: "arch",
|
|
757
757
|
shape: "shape"
|
|
758
|
-
}[m] || "custom",
|
|
759
|
-
if (!
|
|
758
|
+
}[m] || "custom", ae = Et(Z);
|
|
759
|
+
if (!ae || !ae.Component)
|
|
760
760
|
return;
|
|
761
|
-
const
|
|
761
|
+
const le = e.getActiveArtboard(), ot = le ? Math.min(le.width, le.height) * 0.1 : 80, Fe = le ? le.width * 0.5 : 300;
|
|
762
762
|
if (m === "shape") {
|
|
763
|
-
const
|
|
764
|
-
let ee = 200 /
|
|
765
|
-
|
|
766
|
-
id:
|
|
767
|
-
x:
|
|
768
|
-
y:
|
|
763
|
+
const ue = (h == null ? void 0 : h.shapeType) ?? "rectangle";
|
|
764
|
+
let ee = 200 / W, K = 200 / W;
|
|
765
|
+
ue === "ellipse" ? (ee = 150 / W, K = 250 / W) : ue === "line" && (ee = 300 / W, K = 8 / W), ce = new St({
|
|
766
|
+
id: C,
|
|
767
|
+
x: ie,
|
|
768
|
+
y: se,
|
|
769
769
|
transformData: {
|
|
770
770
|
type: "shape",
|
|
771
|
-
shapeType:
|
|
771
|
+
shapeType: ue,
|
|
772
772
|
width: ee,
|
|
773
773
|
height: K,
|
|
774
774
|
fillColor: "#3b82f6",
|
|
@@ -776,35 +776,35 @@ const kt = ke("EditorContext"), Me = Q(null), qe = Q(null), en = () => {
|
|
|
776
776
|
}
|
|
777
777
|
});
|
|
778
778
|
} else
|
|
779
|
-
ce = new
|
|
780
|
-
id:
|
|
779
|
+
ce = new ae.Component({
|
|
780
|
+
id: C,
|
|
781
781
|
text: "New Text",
|
|
782
|
-
x:
|
|
783
|
-
y:
|
|
784
|
-
fontSize:
|
|
782
|
+
x: ie,
|
|
783
|
+
y: se,
|
|
784
|
+
fontSize: ot,
|
|
785
785
|
fontFamily: "Poppins",
|
|
786
|
-
color:
|
|
787
|
-
transformData:
|
|
786
|
+
color: Ot(S == null ? void 0 : S.backgroundColor),
|
|
787
|
+
transformData: Z === "arch" ? {
|
|
788
788
|
type: "arch",
|
|
789
789
|
width: Fe,
|
|
790
|
-
archHeight:
|
|
791
|
-
} :
|
|
790
|
+
archHeight: bt.archHeight
|
|
791
|
+
} : Z === "wave" ? {
|
|
792
792
|
type: "wave",
|
|
793
793
|
width: Fe,
|
|
794
|
-
amplitude:
|
|
795
|
-
frequency:
|
|
796
|
-
} :
|
|
794
|
+
amplitude: De.amplitude,
|
|
795
|
+
frequency: De.frequency
|
|
796
|
+
} : Z === "circle" ? {
|
|
797
797
|
type: "circle",
|
|
798
798
|
radius: Fe / 2
|
|
799
799
|
} : void 0
|
|
800
800
|
});
|
|
801
|
-
e.addElementToArtboard(
|
|
801
|
+
e.addElementToArtboard(C, I), $(
|
|
802
802
|
ce,
|
|
803
803
|
I,
|
|
804
804
|
r.selectedId || void 0
|
|
805
|
-
), r.setSelectedId(
|
|
805
|
+
), r.setSelectedId(C);
|
|
806
806
|
},
|
|
807
|
-
[e,
|
|
807
|
+
[e, $, B, r, i.zoom, n]
|
|
808
808
|
), Te = a(() => {
|
|
809
809
|
const m = [];
|
|
810
810
|
if (r.multiSelection.length > 0) {
|
|
@@ -815,33 +815,33 @@ const kt = ke("EditorContext"), Me = Q(null), qe = Q(null), en = () => {
|
|
|
815
815
|
} else b && m.push(b);
|
|
816
816
|
if (m.length > 0) {
|
|
817
817
|
const h = m.map((I) => I.clone());
|
|
818
|
-
|
|
818
|
+
T(h);
|
|
819
819
|
}
|
|
820
|
-
}, [b, r.multiSelection, p]),
|
|
820
|
+
}, [b, r.multiSelection, p]), Pe = a(() => {
|
|
821
821
|
if (z.length === 0) return;
|
|
822
822
|
const m = [], h = 30, I = 30;
|
|
823
|
-
z.forEach((
|
|
824
|
-
const S = w.get(
|
|
825
|
-
delete
|
|
826
|
-
const ce =
|
|
827
|
-
|
|
828
|
-
let
|
|
829
|
-
if (S && (
|
|
823
|
+
z.forEach((C) => {
|
|
824
|
+
const S = w.get(C.id), ie = S ? S.x : C.x, se = S ? S.y : C.y, W = C.toJSON();
|
|
825
|
+
delete W.id;
|
|
826
|
+
const ce = C.constructor, de = new ce(W);
|
|
827
|
+
de.x = ie + h, de.y = se + I;
|
|
828
|
+
let Z = null;
|
|
829
|
+
if (S && (Z = e.getArtboardIdForElement(
|
|
830
830
|
S.id
|
|
831
|
-
)),
|
|
832
|
-
|
|
831
|
+
)), Z || (Z = e.getActiveArtboardId()), !Z) {
|
|
832
|
+
Zt.warn("[handlePasteElements] No artboard found for pasting");
|
|
833
833
|
return;
|
|
834
834
|
}
|
|
835
|
-
const
|
|
836
|
-
|
|
835
|
+
const ae = S ? S.id : void 0;
|
|
836
|
+
$(de, Z, ae), m.push(de.id);
|
|
837
837
|
}), m.length === 1 ? r.handleSelectionChange(m[0]) : m.length > 1 && r.setMultiSelection(m);
|
|
838
838
|
}, [
|
|
839
839
|
z,
|
|
840
840
|
w,
|
|
841
841
|
e,
|
|
842
|
-
|
|
842
|
+
$,
|
|
843
843
|
r
|
|
844
|
-
]),
|
|
844
|
+
]), fe = a(() => {
|
|
845
845
|
if (u.expandedPanelType === "crop" && (b == null ? void 0 : b.transformType) === "image") {
|
|
846
846
|
const m = b;
|
|
847
847
|
if (m.isCropping) {
|
|
@@ -856,10 +856,10 @@ const kt = ke("EditorContext"), Me = Q(null), qe = Q(null), en = () => {
|
|
|
856
856
|
b,
|
|
857
857
|
B
|
|
858
858
|
]);
|
|
859
|
-
|
|
859
|
+
ve(() => {
|
|
860
860
|
const m = (h) => {
|
|
861
861
|
const I = h.target;
|
|
862
|
-
if (I.tagName === "CANVAS" ||
|
|
862
|
+
if (I.tagName === "CANVAS" || Ft(I))
|
|
863
863
|
return;
|
|
864
864
|
const S = document.activeElement;
|
|
865
865
|
if (S != null && S.hasAttribute("data-preserve-selection")) {
|
|
@@ -867,21 +867,21 @@ const kt = ke("EditorContext"), Me = Q(null), qe = Q(null), en = () => {
|
|
|
867
867
|
return;
|
|
868
868
|
}
|
|
869
869
|
if (u.expandedPanelType !== null) {
|
|
870
|
-
|
|
870
|
+
fe();
|
|
871
871
|
return;
|
|
872
872
|
}
|
|
873
873
|
r.selectedId !== null && r.setSelectedId(null), r.multiSelection.length > 0 && r.setMultiSelection([]);
|
|
874
874
|
};
|
|
875
875
|
return document.addEventListener("pointerdown", m), () => document.removeEventListener("pointerdown", m);
|
|
876
|
-
}, [u.expandedPanelType,
|
|
877
|
-
const
|
|
876
|
+
}, [u.expandedPanelType, fe, r]);
|
|
877
|
+
const Ce = a(
|
|
878
878
|
(m, h, I) => {
|
|
879
|
-
e.clear(), m.forEach((
|
|
880
|
-
e.createArtboard(
|
|
881
|
-
}), I && e.setActiveArtboard(I), V([...e.getAllArtboards()]), D((
|
|
879
|
+
e.clear(), m.forEach((C) => {
|
|
880
|
+
e.createArtboard(C.toJSON());
|
|
881
|
+
}), I && e.setActiveArtboard(I), V([...e.getAllArtboards()]), D((C) => C + 1), f(h), r.setSelectedId(null);
|
|
882
882
|
},
|
|
883
883
|
[e, r, f]
|
|
884
|
-
),
|
|
884
|
+
), ze = q(() => ({
|
|
885
885
|
// From ViewportContext
|
|
886
886
|
zoom: i.zoom,
|
|
887
887
|
panOffset: i.panOffset,
|
|
@@ -917,13 +917,13 @@ const kt = ke("EditorContext"), Me = Q(null), qe = Q(null), en = () => {
|
|
|
917
917
|
isRotating: u.isRotating,
|
|
918
918
|
setIsRotating: u.setIsRotating,
|
|
919
919
|
// Cross-context handler
|
|
920
|
-
clearExpandedPanel:
|
|
920
|
+
clearExpandedPanel: fe,
|
|
921
921
|
// Core state (element/artboard domain)
|
|
922
922
|
artboardManager: e,
|
|
923
|
-
artboards:
|
|
923
|
+
artboards: c,
|
|
924
924
|
elements: p,
|
|
925
925
|
elementStore: w,
|
|
926
|
-
getElementById:
|
|
926
|
+
getElementById: g,
|
|
927
927
|
// Derived state (cross-context)
|
|
928
928
|
selectedElement: b,
|
|
929
929
|
// Refs
|
|
@@ -936,38 +936,38 @@ const kt = ke("EditorContext"), Me = Q(null), qe = Q(null), en = () => {
|
|
|
936
936
|
// Handlers
|
|
937
937
|
refreshArtboards: _,
|
|
938
938
|
handleElementUpdate: J,
|
|
939
|
-
handleAddElement:
|
|
940
|
-
handleLoadWorkspace:
|
|
939
|
+
handleAddElement: ge,
|
|
940
|
+
handleLoadWorkspace: Ce,
|
|
941
941
|
handleCopyElements: Te,
|
|
942
|
-
handlePasteElements:
|
|
942
|
+
handlePasteElements: Pe,
|
|
943
943
|
// Command history (undo/redo actions + execute functions)
|
|
944
944
|
historyManager: te,
|
|
945
945
|
executeElementUpdate: B,
|
|
946
|
-
executeAddElement:
|
|
947
|
-
executeRemoveElement:
|
|
946
|
+
executeAddElement: $,
|
|
947
|
+
executeRemoveElement: s,
|
|
948
948
|
executeReorderElement: A,
|
|
949
949
|
executeCommandBatch: y,
|
|
950
950
|
executeCreateArtboard: x,
|
|
951
951
|
executeDeleteArtboard: P,
|
|
952
952
|
executeUpdateArtboard: k,
|
|
953
|
-
undo:
|
|
953
|
+
undo: R,
|
|
954
954
|
redo: N,
|
|
955
955
|
canUndo: v,
|
|
956
956
|
canRedo: U,
|
|
957
|
-
undoActiveArtboard:
|
|
958
|
-
redoActiveArtboard:
|
|
957
|
+
undoActiveArtboard: F,
|
|
958
|
+
redoActiveArtboard: j,
|
|
959
959
|
canUndoActiveArtboard: ne,
|
|
960
|
-
canRedoActiveArtboard:
|
|
960
|
+
canRedoActiveArtboard: Y,
|
|
961
961
|
// Element properties
|
|
962
|
-
fontSize:
|
|
963
|
-
fontColor:
|
|
964
|
-
fontFamily:
|
|
965
|
-
textAlign:
|
|
966
|
-
updateFontSize:
|
|
967
|
-
setFontSizeValue:
|
|
968
|
-
updateFontColor:
|
|
969
|
-
updateFontFamily:
|
|
970
|
-
updateTextAlign:
|
|
962
|
+
fontSize: pe,
|
|
963
|
+
fontColor: he,
|
|
964
|
+
fontFamily: xe,
|
|
965
|
+
textAlign: ye,
|
|
966
|
+
updateFontSize: Ee,
|
|
967
|
+
setFontSizeValue: Se,
|
|
968
|
+
updateFontColor: be,
|
|
969
|
+
updateFontFamily: Ie,
|
|
970
|
+
updateTextAlign: we
|
|
971
971
|
}), [
|
|
972
972
|
// Viewport
|
|
973
973
|
i.zoom,
|
|
@@ -1003,13 +1003,13 @@ const kt = ke("EditorContext"), Me = Q(null), qe = Q(null), en = () => {
|
|
|
1003
1003
|
u.setCanvasReady,
|
|
1004
1004
|
u.isRotating,
|
|
1005
1005
|
u.setIsRotating,
|
|
1006
|
-
|
|
1006
|
+
fe,
|
|
1007
1007
|
// Element/artboard domain
|
|
1008
1008
|
e,
|
|
1009
|
-
|
|
1009
|
+
c,
|
|
1010
1010
|
p,
|
|
1011
1011
|
w,
|
|
1012
|
-
|
|
1012
|
+
g,
|
|
1013
1013
|
b,
|
|
1014
1014
|
o,
|
|
1015
1015
|
n,
|
|
@@ -1017,30 +1017,29 @@ const kt = ke("EditorContext"), Me = Q(null), qe = Q(null), en = () => {
|
|
|
1017
1017
|
O,
|
|
1018
1018
|
_,
|
|
1019
1019
|
J,
|
|
1020
|
-
we,
|
|
1021
|
-
Pe,
|
|
1022
|
-
Te,
|
|
1023
1020
|
ge,
|
|
1021
|
+
Ce,
|
|
1022
|
+
Te,
|
|
1023
|
+
Pe,
|
|
1024
1024
|
// Command history
|
|
1025
1025
|
te,
|
|
1026
1026
|
B,
|
|
1027
|
-
|
|
1028
|
-
|
|
1027
|
+
$,
|
|
1028
|
+
s,
|
|
1029
1029
|
A,
|
|
1030
1030
|
y,
|
|
1031
1031
|
x,
|
|
1032
1032
|
P,
|
|
1033
1033
|
k,
|
|
1034
|
-
|
|
1034
|
+
R,
|
|
1035
1035
|
N,
|
|
1036
1036
|
v,
|
|
1037
1037
|
U,
|
|
1038
|
-
|
|
1039
|
-
Y,
|
|
1040
|
-
ne,
|
|
1038
|
+
F,
|
|
1041
1039
|
j,
|
|
1040
|
+
ne,
|
|
1041
|
+
Y,
|
|
1042
1042
|
// Element properties
|
|
1043
|
-
Ae,
|
|
1044
1043
|
pe,
|
|
1045
1044
|
he,
|
|
1046
1045
|
xe,
|
|
@@ -1048,103 +1047,104 @@ const kt = ke("EditorContext"), Me = Q(null), qe = Q(null), en = () => {
|
|
|
1048
1047
|
Ee,
|
|
1049
1048
|
Se,
|
|
1050
1049
|
be,
|
|
1051
|
-
Ie
|
|
1050
|
+
Ie,
|
|
1051
|
+
we
|
|
1052
1052
|
]);
|
|
1053
|
-
return d.current =
|
|
1054
|
-
|
|
1053
|
+
return d.current = ze, /* @__PURE__ */ H(Qe.Provider, { value: l, children: /* @__PURE__ */ H(
|
|
1054
|
+
Bt,
|
|
1055
1055
|
{
|
|
1056
1056
|
value: {
|
|
1057
|
-
undo:
|
|
1057
|
+
undo: R,
|
|
1058
1058
|
redo: N,
|
|
1059
1059
|
canUndo: v,
|
|
1060
1060
|
canRedo: U,
|
|
1061
|
-
undoActiveArtboard:
|
|
1062
|
-
redoActiveArtboard:
|
|
1061
|
+
undoActiveArtboard: F,
|
|
1062
|
+
redoActiveArtboard: j,
|
|
1063
1063
|
canUndoActiveArtboard: ne,
|
|
1064
|
-
canRedoActiveArtboard:
|
|
1064
|
+
canRedoActiveArtboard: Y
|
|
1065
1065
|
},
|
|
1066
1066
|
children: /* @__PURE__ */ H(
|
|
1067
|
-
|
|
1067
|
+
$t,
|
|
1068
1068
|
{
|
|
1069
1069
|
value: {
|
|
1070
1070
|
elements: p,
|
|
1071
1071
|
elementStore: w,
|
|
1072
|
-
artboards:
|
|
1072
|
+
artboards: c,
|
|
1073
1073
|
artboardManager: e,
|
|
1074
1074
|
artboardVersion: O,
|
|
1075
1075
|
setElements: f,
|
|
1076
1076
|
refreshArtboards: _,
|
|
1077
|
-
getElementById:
|
|
1078
|
-
handleAddElement:
|
|
1077
|
+
getElementById: g,
|
|
1078
|
+
handleAddElement: ge,
|
|
1079
1079
|
handleElementUpdate: J,
|
|
1080
|
-
handleLoadWorkspace:
|
|
1080
|
+
handleLoadWorkspace: Ce,
|
|
1081
1081
|
handleCopyElements: Te,
|
|
1082
|
-
handlePasteElements:
|
|
1083
|
-
fontSize:
|
|
1084
|
-
fontColor:
|
|
1085
|
-
fontFamily:
|
|
1086
|
-
textAlign:
|
|
1087
|
-
updateFontSize:
|
|
1088
|
-
setFontSizeValue:
|
|
1089
|
-
updateFontColor:
|
|
1090
|
-
updateFontFamily:
|
|
1091
|
-
updateTextAlign:
|
|
1082
|
+
handlePasteElements: Pe,
|
|
1083
|
+
fontSize: pe,
|
|
1084
|
+
fontColor: he,
|
|
1085
|
+
fontFamily: xe,
|
|
1086
|
+
textAlign: ye,
|
|
1087
|
+
updateFontSize: Ee,
|
|
1088
|
+
setFontSizeValue: Se,
|
|
1089
|
+
updateFontColor: be,
|
|
1090
|
+
updateFontFamily: Ie,
|
|
1091
|
+
updateTextAlign: we,
|
|
1092
1092
|
canvasRef: o,
|
|
1093
1093
|
canvasEditorRef: n
|
|
1094
1094
|
},
|
|
1095
1095
|
children: /* @__PURE__ */ H(
|
|
1096
|
-
|
|
1096
|
+
Wt,
|
|
1097
1097
|
{
|
|
1098
1098
|
value: {
|
|
1099
1099
|
executeElementUpdate: B,
|
|
1100
|
-
executeAddElement:
|
|
1101
|
-
executeRemoveElement:
|
|
1100
|
+
executeAddElement: $,
|
|
1101
|
+
executeRemoveElement: s,
|
|
1102
1102
|
executeReorderElement: A,
|
|
1103
1103
|
executeCommandBatch: y,
|
|
1104
1104
|
executeCreateArtboard: x,
|
|
1105
1105
|
executeDeleteArtboard: P,
|
|
1106
1106
|
executeUpdateArtboard: k,
|
|
1107
|
-
undo:
|
|
1107
|
+
undo: R,
|
|
1108
1108
|
redo: N,
|
|
1109
1109
|
canUndo: v,
|
|
1110
1110
|
canRedo: U,
|
|
1111
|
-
undoActiveArtboard:
|
|
1112
|
-
redoActiveArtboard:
|
|
1111
|
+
undoActiveArtboard: F,
|
|
1112
|
+
redoActiveArtboard: j,
|
|
1113
1113
|
canUndoActiveArtboard: ne,
|
|
1114
|
-
canRedoActiveArtboard:
|
|
1114
|
+
canRedoActiveArtboard: Y,
|
|
1115
1115
|
historyManager: te
|
|
1116
1116
|
},
|
|
1117
|
-
children: /* @__PURE__ */ H(
|
|
1117
|
+
children: /* @__PURE__ */ H(qe.Provider, { value: ze, children: t })
|
|
1118
1118
|
}
|
|
1119
1119
|
)
|
|
1120
1120
|
}
|
|
1121
1121
|
)
|
|
1122
1122
|
}
|
|
1123
1123
|
) });
|
|
1124
|
-
},
|
|
1124
|
+
}, nn = ({
|
|
1125
1125
|
children: t,
|
|
1126
1126
|
initialArtboardConfig: e = {},
|
|
1127
1127
|
viewPadding: o = 0.9
|
|
1128
1128
|
}) => {
|
|
1129
1129
|
const [n] = E(() => {
|
|
1130
|
-
const i = new
|
|
1130
|
+
const i = new xt(), r = {
|
|
1131
1131
|
name: e.name || "Artboard 1",
|
|
1132
1132
|
x: e.x ?? 0,
|
|
1133
1133
|
y: e.y ?? 0,
|
|
1134
1134
|
width: e.width ?? 1e3,
|
|
1135
1135
|
height: e.height ?? 1e3,
|
|
1136
|
-
backgroundColor: e.backgroundColor ||
|
|
1136
|
+
backgroundColor: e.backgroundColor || ht
|
|
1137
1137
|
};
|
|
1138
1138
|
return i.createArtboard(r), i;
|
|
1139
|
-
}), d =
|
|
1139
|
+
}), d = me(null), l = me(null);
|
|
1140
1140
|
return /* @__PURE__ */ H(
|
|
1141
|
-
|
|
1141
|
+
Vt,
|
|
1142
1142
|
{
|
|
1143
1143
|
artboardManager: n,
|
|
1144
1144
|
canvasRef: d,
|
|
1145
1145
|
viewPadding: o,
|
|
1146
|
-
children: /* @__PURE__ */ H(
|
|
1147
|
-
|
|
1146
|
+
children: /* @__PURE__ */ H(Dt, { children: /* @__PURE__ */ H(_t, { children: /* @__PURE__ */ H(
|
|
1147
|
+
Gt,
|
|
1148
1148
|
{
|
|
1149
1149
|
artboardManager: n,
|
|
1150
1150
|
canvasRef: d,
|
|
@@ -1154,31 +1154,55 @@ const kt = ke("EditorContext"), Me = Q(null), qe = Q(null), en = () => {
|
|
|
1154
1154
|
) }) })
|
|
1155
1155
|
}
|
|
1156
1156
|
);
|
|
1157
|
-
},
|
|
1158
|
-
const t = X(
|
|
1157
|
+
}, on = () => {
|
|
1158
|
+
const t = X(qe);
|
|
1159
1159
|
if (!t)
|
|
1160
1160
|
throw new Error("useEditor must be used within EditorProvider");
|
|
1161
1161
|
return t;
|
|
1162
|
-
};
|
|
1162
|
+
}, re = [];
|
|
1163
|
+
function rn(t) {
|
|
1164
|
+
Tt() && re.push(t);
|
|
1165
|
+
}
|
|
1166
|
+
function sn() {
|
|
1167
|
+
return [...re];
|
|
1168
|
+
}
|
|
1169
|
+
function cn() {
|
|
1170
|
+
re.length = 0;
|
|
1171
|
+
}
|
|
1172
|
+
function dn() {
|
|
1173
|
+
if (re.length === 0) return;
|
|
1174
|
+
const t = re.map((e) => gt(e) ? `${e.code}: ${e.message}` : `${e.name}: ${e.message}`).join(`
|
|
1175
|
+
- `);
|
|
1176
|
+
throw re.length = 0, new Error(
|
|
1177
|
+
`expectNoEditorErrors: ${t.includes(`
|
|
1178
|
+
`) ? "errors were" : "an error was"} contained by <Editor.Root>'s boundary during this test:
|
|
1179
|
+
- ${t}
|
|
1180
|
+
A contained error renders an error card in prod — this composition is broken even if the test rendered "successfully".`
|
|
1181
|
+
);
|
|
1182
|
+
}
|
|
1163
1183
|
export {
|
|
1164
1184
|
We as B,
|
|
1165
|
-
|
|
1185
|
+
nn as E,
|
|
1166
1186
|
Ze as P,
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1187
|
+
Nt as a,
|
|
1188
|
+
en as b,
|
|
1189
|
+
Qt as c,
|
|
1190
|
+
qt as d,
|
|
1191
|
+
Lt as e,
|
|
1192
|
+
kt as f,
|
|
1193
|
+
wt as g,
|
|
1194
|
+
Jt as h,
|
|
1195
|
+
gt as i,
|
|
1196
|
+
Tt as j,
|
|
1197
|
+
tn as k,
|
|
1198
|
+
dn as l,
|
|
1199
|
+
sn as m,
|
|
1200
|
+
cn as n,
|
|
1201
|
+
Rt as o,
|
|
1202
|
+
Kt as p,
|
|
1203
|
+
Mt as q,
|
|
1204
|
+
rn as r,
|
|
1205
|
+
Ft as s,
|
|
1206
|
+
on as u
|
|
1183
1207
|
};
|
|
1184
|
-
//# sourceMappingURL=
|
|
1208
|
+
//# sourceMappingURL=editorErrors-CK1RISFa.js.map
|