mce 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +685 -700
- package/dist/locale/en.d.ts +0 -1
- package/dist/models/Doc.d.ts +1 -0
- package/dist/typed-plugins.d.ts +0 -1
- package/package.json +3 -3
- package/dist/plugins/preference.d.ts +0 -16
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ref as V, computed as
|
|
1
|
+
import { ref as V, computed as $, watch as pe, markRaw as fe, warn as Lt, shallowRef as Ze, reactive as Ee, nextTick as Re, inject as Se, provide as De, defineComponent as X, createVNode as H, mergeProps as $e, createElementVNode as F, toValue as yn, getCurrentInstance as Qe, onScopeDispose as gn, createElementBlock as R, openBlock as O, Fragment as se, renderList as _e, unref as S, normalizeStyle as q, normalizeClass as be, onBeforeUnmount as we, readonly as bn, toRef as Te, onMounted as He, useId as Dt, onDeactivated as wn, onActivated as xn, useAttrs as Vt, createBlock as oe, resolveDynamicComponent as jt, useTemplateRef as ce, renderSlot as Q, Teleport as _n, createCommentVNode as ee, mergeModels as Oe, useModel as ke, resolveComponent as kn, withCtx as ne, createTextVNode as Cn, toDisplayString as K, createSlots as pt, normalizeProps as vt, guardReactiveProps as yt, withDirectives as ze, vShow as Xe, vModelText as En, withModifiers as Ke, onBeforeMount as gt, isRef as Tn } from "vue";
|
|
2
2
|
import { useFileDialog as Ut, useEventListener as Xt, isClient as An, useResizeObserver as Ht, useLocalStorage as Sn, onClickOutside as Mn, useMouse as zn, useDebounceFn as Yt } from "@vueuse/core";
|
|
3
|
-
import { Timeline as
|
|
3
|
+
import { Timeline as $n, Engine as On, Camera2D as In, DrawboardEffect as Fn, Element2D as G, IN_BROWSER as bt, clamp as Pn, assets as qt, TimelineNode as Nn, Transform2D as Rn, DEG_TO_RAD as Bn, Node as Ct, render as et, Animation as Ln } from "modern-canvas";
|
|
4
4
|
import { getObjectValueByPath as Dn, setObjectValueByPath as Vn, normalizeTextContent as jn, idGenerator as wt, normalizeElement as Gt, Observable as Wt, Reactivable as Un, property as Ye } from "modern-idoc";
|
|
5
5
|
import { saveAs as Kt } from "file-saver";
|
|
6
6
|
import { Fonts as Xn } from "modern-font";
|
|
@@ -23,37 +23,37 @@ const eo = (o) => {
|
|
|
23
23
|
t.value.delete(r);
|
|
24
24
|
},
|
|
25
25
|
exec: (r, ...i) => {
|
|
26
|
-
const [
|
|
27
|
-
|
|
28
|
-
const u = t.value.get(
|
|
26
|
+
const [l, c] = r.split(":");
|
|
27
|
+
c !== void 0 && i.unshift(c);
|
|
28
|
+
const u = t.value.get(l);
|
|
29
29
|
if (!u)
|
|
30
|
-
throw new Error(`Command "${
|
|
30
|
+
throw new Error(`Command "${l}" not found`);
|
|
31
31
|
const d = u.handle(...i);
|
|
32
|
-
return e(`command:${
|
|
32
|
+
return e(`command:${l}`, d), d;
|
|
33
33
|
}
|
|
34
34
|
});
|
|
35
35
|
}, to = (o) => {
|
|
36
36
|
const {
|
|
37
37
|
config: e
|
|
38
38
|
} = o;
|
|
39
|
-
function t(
|
|
40
|
-
return Dn(e.value,
|
|
39
|
+
function t(c, u) {
|
|
40
|
+
return Dn(e.value, c) ?? u;
|
|
41
41
|
}
|
|
42
|
-
function n(
|
|
43
|
-
Vn(e.value,
|
|
42
|
+
function n(c, u) {
|
|
43
|
+
Vn(e.value, c, u);
|
|
44
44
|
}
|
|
45
|
-
function s(
|
|
46
|
-
return
|
|
47
|
-
get: () => t(
|
|
48
|
-
set: (u) => n(
|
|
45
|
+
function s(c) {
|
|
46
|
+
return $({
|
|
47
|
+
get: () => t(c),
|
|
48
|
+
set: (u) => n(c, u)
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
function a(
|
|
52
|
-
const d = s(
|
|
51
|
+
function a(c, u) {
|
|
52
|
+
const d = s(c);
|
|
53
53
|
return d.value === void 0 && (d.value = u), d;
|
|
54
54
|
}
|
|
55
55
|
function r() {
|
|
56
|
-
return new Promise((
|
|
56
|
+
return new Promise((c) => {
|
|
57
57
|
const { onChange: u, open: d } = Ut({
|
|
58
58
|
accept: ".json",
|
|
59
59
|
reset: !0,
|
|
@@ -61,17 +61,17 @@ const eo = (o) => {
|
|
|
61
61
|
});
|
|
62
62
|
u(async (g) => {
|
|
63
63
|
const h = g?.[0];
|
|
64
|
-
h && (e.value = JSON.parse(await h.text()),
|
|
64
|
+
h && (e.value = JSON.parse(await h.text()), c(e.value));
|
|
65
65
|
}), d();
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
function i() {
|
|
69
69
|
return new Blob([JSON.stringify(e.value)], { type: "application/json" });
|
|
70
70
|
}
|
|
71
|
-
function c
|
|
71
|
+
function l(c = "settings.json") {
|
|
72
72
|
Kt(
|
|
73
73
|
i(),
|
|
74
|
-
|
|
74
|
+
c
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
77
|
Object.assign(o, {
|
|
@@ -81,7 +81,7 @@ const eo = (o) => {
|
|
|
81
81
|
registerConfig: a,
|
|
82
82
|
importConfig: r,
|
|
83
83
|
exportConfig: i,
|
|
84
|
-
saveAsConfig:
|
|
84
|
+
saveAsConfig: l
|
|
85
85
|
});
|
|
86
86
|
}, no = (o, e) => {
|
|
87
87
|
const {
|
|
@@ -114,7 +114,7 @@ const eo = (o) => {
|
|
|
114
114
|
}, oo = (o) => {
|
|
115
115
|
const {
|
|
116
116
|
emit: e
|
|
117
|
-
} = o, t = fe(new Xn()), n = V(new
|
|
117
|
+
} = o, t = fe(new Xn()), n = V(new $n({ startTime: 0, endTime: 0, loop: !0, paused: !0 })), s = new On({
|
|
118
118
|
pixelRatio: 2,
|
|
119
119
|
fonts: t,
|
|
120
120
|
timeline: n.value,
|
|
@@ -126,7 +126,7 @@ const eo = (o) => {
|
|
|
126
126
|
s.root.append(a.value), s.root.append(r.value);
|
|
127
127
|
const i = V(s);
|
|
128
128
|
i.value.start();
|
|
129
|
-
const
|
|
129
|
+
const l = V(), c = V({ left: 0, top: 0, width: 0, height: 0 }), u = V(), d = V(), g = $(() => d.value?.root), h = V(), v = V(), y = V();
|
|
130
130
|
function f(z, I) {
|
|
131
131
|
switch (v.value = z, y.value = I, z) {
|
|
132
132
|
case "drawing":
|
|
@@ -141,8 +141,8 @@ const eo = (o) => {
|
|
|
141
141
|
function _() {
|
|
142
142
|
const { x: z = 0, y: I = 0 } = h.value ?? {};
|
|
143
143
|
return a.value.toGlobal({
|
|
144
|
-
x: z -
|
|
145
|
-
y: I -
|
|
144
|
+
x: z - c.value.left,
|
|
145
|
+
y: I - c.value.top
|
|
146
146
|
}, { x: 0, y: 0 });
|
|
147
147
|
}
|
|
148
148
|
Object.assign(o, {
|
|
@@ -152,8 +152,8 @@ const eo = (o) => {
|
|
|
152
152
|
camera: a,
|
|
153
153
|
drawboardEffect: r,
|
|
154
154
|
root: g,
|
|
155
|
-
drawboardDom:
|
|
156
|
-
drawboardAabb:
|
|
155
|
+
drawboardDom: l,
|
|
156
|
+
drawboardAabb: c,
|
|
157
157
|
workspace: u,
|
|
158
158
|
doc: d,
|
|
159
159
|
state: v,
|
|
@@ -189,21 +189,21 @@ const eo = (o) => {
|
|
|
189
189
|
emit: t,
|
|
190
190
|
fonts: n
|
|
191
191
|
} = o, s = V(!1);
|
|
192
|
-
async function a(
|
|
193
|
-
const u = await n.load(
|
|
192
|
+
async function a(l, c) {
|
|
193
|
+
const u = await n.load(l, c);
|
|
194
194
|
return console.log("loadFont", u), t("loadFont", u), u;
|
|
195
195
|
}
|
|
196
|
-
async function r(
|
|
196
|
+
async function r(l, c) {
|
|
197
197
|
s.value = !0;
|
|
198
198
|
try {
|
|
199
|
-
n.fallbackFont = await a(
|
|
199
|
+
n.fallbackFont = await a(l, c);
|
|
200
200
|
} finally {
|
|
201
201
|
s.value = !1;
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
async function i() {
|
|
205
205
|
for (; s.value; )
|
|
206
|
-
await new Promise((
|
|
206
|
+
await new Promise((l) => setTimeout(l, 100));
|
|
207
207
|
return await n.waitUntilLoad();
|
|
208
208
|
}
|
|
209
209
|
return Object.assign(o, {
|
|
@@ -213,9 +213,9 @@ const eo = (o) => {
|
|
|
213
213
|
waitUntilFontLoad: i
|
|
214
214
|
}), () => {
|
|
215
215
|
const {
|
|
216
|
-
defaultFont:
|
|
216
|
+
defaultFont: l
|
|
217
217
|
} = e;
|
|
218
|
-
|
|
218
|
+
l && r(l);
|
|
219
219
|
};
|
|
220
220
|
}, io = {
|
|
221
221
|
cancel: "Cancel",
|
|
@@ -231,7 +231,6 @@ const eo = (o) => {
|
|
|
231
231
|
file: "File",
|
|
232
232
|
new: "New",
|
|
233
233
|
open: "Open",
|
|
234
|
-
preferences: "Preferences",
|
|
235
234
|
import: "Import",
|
|
236
235
|
export: "Export",
|
|
237
236
|
"saveAs:png": "Save as PNG",
|
|
@@ -294,7 +293,7 @@ const eo = (o) => {
|
|
|
294
293
|
}, ro = (o, e) => {
|
|
295
294
|
const {
|
|
296
295
|
locale: t
|
|
297
|
-
} = e, n =
|
|
296
|
+
} = e, n = $(() => {
|
|
298
297
|
const {
|
|
299
298
|
locale: a,
|
|
300
299
|
fallback: r,
|
|
@@ -313,7 +312,7 @@ const eo = (o) => {
|
|
|
313
312
|
};
|
|
314
313
|
});
|
|
315
314
|
function s(a, r) {
|
|
316
|
-
const { locale: i, localeMessages:
|
|
315
|
+
const { locale: i, localeMessages: l, fallbackMessages: c } = n.value, u = e.t?.(a, r) ?? l?.[a ?? -1] ?? c?.[a ?? -1] ?? l?.[r ?? -1] ?? c?.[r ?? -1];
|
|
317
316
|
return u === void 0 && console.warn(`[mce] Not found '${a}' key in '${i}' locale messages.`), u ?? a ?? r;
|
|
318
317
|
}
|
|
319
318
|
Object.assign(o, {
|
|
@@ -323,16 +322,16 @@ const eo = (o) => {
|
|
|
323
322
|
const {
|
|
324
323
|
root: e,
|
|
325
324
|
getAncestor: t
|
|
326
|
-
} = o, n =
|
|
325
|
+
} = o, n = $(() => e.value?.children.filter(l) ?? []), s = V(-1), a = $(() => n.value[s.value]), r = $(() => {
|
|
327
326
|
const { left: u = 0, top: d = 0, width: g = 0, height: h = 0 } = a.value?.style ?? {};
|
|
328
327
|
return { left: u, top: d, width: g, height: h };
|
|
329
328
|
}), i = V([]);
|
|
330
|
-
function
|
|
329
|
+
function l(u) {
|
|
331
330
|
return u instanceof G && u.meta?.inEditorIs === "Frame";
|
|
332
331
|
}
|
|
333
|
-
function
|
|
332
|
+
function c(u) {
|
|
334
333
|
const d = t(u);
|
|
335
|
-
return d &&
|
|
334
|
+
return d && l(d) ? d : void 0;
|
|
336
335
|
}
|
|
337
336
|
return Object.assign(o, {
|
|
338
337
|
frames: n,
|
|
@@ -340,14 +339,14 @@ const eo = (o) => {
|
|
|
340
339
|
currentFrameIndex: s,
|
|
341
340
|
currentFrame: a,
|
|
342
341
|
currentFrameAabb: r,
|
|
343
|
-
isFrame:
|
|
344
|
-
getAncestorFrame:
|
|
342
|
+
isFrame: l,
|
|
343
|
+
getAncestorFrame: c
|
|
345
344
|
}), () => {
|
|
346
345
|
const {
|
|
347
346
|
selection: u
|
|
348
347
|
} = o;
|
|
349
348
|
pe(() => u.value.length === 1 && u.value[0], (d) => {
|
|
350
|
-
d &&
|
|
349
|
+
d && l(d) && (s.value = n.value.findIndex((g) => g.equal(d)));
|
|
351
350
|
});
|
|
352
351
|
};
|
|
353
352
|
};
|
|
@@ -378,12 +377,12 @@ function co(o, e) {
|
|
|
378
377
|
if (!o.rotate && !e.rotate)
|
|
379
378
|
return Be(o, e);
|
|
380
379
|
{
|
|
381
|
-
const t = ([i,
|
|
382
|
-
|
|
383
|
-
const u =
|
|
380
|
+
const t = ([i, l], [c, u]) => Math.abs(i * c + l * u), n = ({ width: i, height: l, rotate: c = 0 }) => {
|
|
381
|
+
c = -c % 180;
|
|
382
|
+
const u = c / 180 * Math.PI, d = [Math.cos(u), -Math.sin(u)], g = [Math.sin(u), Math.cos(u)];
|
|
384
383
|
return {
|
|
385
384
|
axis: [d, g],
|
|
386
|
-
projectionRadius: (h) => i / 2 * t(h, d) +
|
|
385
|
+
projectionRadius: (h) => i / 2 * t(h, d) + l / 2 * t(h, g)
|
|
387
386
|
};
|
|
388
387
|
}, s = n(o), a = n(e), r = [
|
|
389
388
|
o.left + o.width / 2 - (e.left + e.width / 2),
|
|
@@ -395,7 +394,7 @@ function co(o, e) {
|
|
|
395
394
|
return !0;
|
|
396
395
|
}
|
|
397
396
|
}
|
|
398
|
-
function
|
|
397
|
+
function Zi(o) {
|
|
399
398
|
if (o.length < 2)
|
|
400
399
|
return {
|
|
401
400
|
left: o[0]?.left ?? 0,
|
|
@@ -417,7 +416,7 @@ function Qi(o) {
|
|
|
417
416
|
function uo(o) {
|
|
418
417
|
Lt(`mce: ${o}`);
|
|
419
418
|
}
|
|
420
|
-
function
|
|
419
|
+
function Qi(o) {
|
|
421
420
|
Lt(`mce error: ${o}`);
|
|
422
421
|
}
|
|
423
422
|
const Tt = bt && window.navigator && "clipboard" in navigator, Qt = bt ? window.navigator?.userAgent : "", Fe = /Macintosh|Mac OS X/i.test(Qt), mo = /Windows/i.test(Qt);
|
|
@@ -433,8 +432,8 @@ function ho(o, e = {}) {
|
|
|
433
432
|
r.onload = null, r.onerror = null, a(new Error(`image load timeout (${n} ms)`));
|
|
434
433
|
}, n)), r.onload = function() {
|
|
435
434
|
i && clearTimeout(i);
|
|
436
|
-
const
|
|
437
|
-
!
|
|
435
|
+
const l = this.naturalWidth, c = this.naturalHeight;
|
|
436
|
+
!l || !c ? a(new Error("failed to read natural size")) : s({ width: l, height: c });
|
|
438
437
|
}, r.onerror = function() {
|
|
439
438
|
i && clearTimeout(i), a(new Error(`failed to load image: ${o}`));
|
|
440
439
|
}, r.src = o;
|
|
@@ -478,8 +477,8 @@ async function dt(o) {
|
|
|
478
477
|
};
|
|
479
478
|
}
|
|
480
479
|
function po(o, e) {
|
|
481
|
-
const t = o.clientX, n = o.clientY, s = e.getBoundingClientRect(), a = s.left, r = s.top, i = s.right,
|
|
482
|
-
return t >= a && t <= i && n >= r && n <=
|
|
480
|
+
const t = o.clientX, n = o.clientY, s = e.getBoundingClientRect(), a = s.left, r = s.top, i = s.right, l = s.bottom;
|
|
481
|
+
return t >= a && t <= i && n >= r && n <= l;
|
|
483
482
|
}
|
|
484
483
|
function vo(o) {
|
|
485
484
|
if (o && "$el" in o) {
|
|
@@ -534,7 +533,7 @@ function tn(o, e) {
|
|
|
534
533
|
}, {});
|
|
535
534
|
}
|
|
536
535
|
const go = crypto.getRandomValues.bind(crypto), bo = () => go(new Uint32Array(1))[0], wo = "10000000-1000-4000-8000" + -1e11;
|
|
537
|
-
function
|
|
536
|
+
function er() {
|
|
538
537
|
return wo.replace(/[018]/g, (o) => (o ^ bo() & 15 >> o / 4).toString(16));
|
|
539
538
|
}
|
|
540
539
|
const xo = [
|
|
@@ -552,25 +551,25 @@ const ko = (o) => {
|
|
|
552
551
|
const {
|
|
553
552
|
registerConfig: e
|
|
554
553
|
} = o, t = e("hotkeys", xo), n = V(/* @__PURE__ */ new Map());
|
|
555
|
-
function s(
|
|
556
|
-
if (Array.isArray(
|
|
557
|
-
|
|
554
|
+
function s(l) {
|
|
555
|
+
if (Array.isArray(l))
|
|
556
|
+
l.forEach((c) => s(c));
|
|
558
557
|
else {
|
|
559
558
|
const {
|
|
560
|
-
when:
|
|
559
|
+
when: c,
|
|
561
560
|
handle: u,
|
|
562
561
|
...d
|
|
563
|
-
} =
|
|
562
|
+
} = l, {
|
|
564
563
|
command: g
|
|
565
564
|
} = d;
|
|
566
565
|
t.value = [
|
|
567
566
|
...t.value.filter((h) => h.command !== g),
|
|
568
567
|
d
|
|
569
|
-
], n.value.set(g,
|
|
568
|
+
], n.value.set(g, l);
|
|
570
569
|
}
|
|
571
570
|
}
|
|
572
|
-
function a(
|
|
573
|
-
t.value = t.value.filter((
|
|
571
|
+
function a(l) {
|
|
572
|
+
t.value = t.value.filter((c) => c.command !== l);
|
|
574
573
|
}
|
|
575
574
|
const r = {
|
|
576
575
|
ArrowUp: "↑",
|
|
@@ -595,12 +594,12 @@ const ko = (o) => {
|
|
|
595
594
|
"™": "2",
|
|
596
595
|
Dead: "N"
|
|
597
596
|
};
|
|
598
|
-
function i(
|
|
599
|
-
if (!
|
|
597
|
+
function i(l) {
|
|
598
|
+
if (!l)
|
|
600
599
|
return "";
|
|
601
|
-
let
|
|
602
|
-
const u = t.value.find((d) => d.command ===
|
|
603
|
-
return u ?
|
|
600
|
+
let c;
|
|
601
|
+
const u = t.value.find((d) => d.command === l);
|
|
602
|
+
return u ? c = Array.isArray(u.key) ? u.key : [u.key] : c = [l], c[0].split("+").map((d) => {
|
|
604
603
|
switch (d) {
|
|
605
604
|
case "Control":
|
|
606
605
|
return Fe ? "⌃" : "Ctrl";
|
|
@@ -628,19 +627,19 @@ const ko = (o) => {
|
|
|
628
627
|
getKbd: i
|
|
629
628
|
}), () => {
|
|
630
629
|
const {
|
|
631
|
-
exec:
|
|
630
|
+
exec: l
|
|
632
631
|
} = o;
|
|
633
632
|
Xt(
|
|
634
633
|
An ? window : void 0,
|
|
635
634
|
"keydown",
|
|
636
|
-
(
|
|
637
|
-
if (_o(
|
|
635
|
+
(c) => {
|
|
636
|
+
if (_o(c))
|
|
638
637
|
return;
|
|
639
638
|
const u = [
|
|
640
|
-
(
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
!["Meta", "Control", "Alt", "Shift"].includes(
|
|
639
|
+
(c.metaKey || c.ctrlKey) && "CmdOrCtrl",
|
|
640
|
+
c.altKey && "Alt",
|
|
641
|
+
c.shiftKey && "Shift",
|
|
642
|
+
!["Meta", "Control", "Alt", "Shift"].includes(c.key) && c.key
|
|
644
643
|
].filter(Boolean).map((d) => d.toLowerCase()).sort().join("+");
|
|
645
644
|
t.value.forEach((d) => {
|
|
646
645
|
const g = d.command, h = n.value.get(g);
|
|
@@ -655,7 +654,7 @@ const ko = (o) => {
|
|
|
655
654
|
return p;
|
|
656
655
|
}
|
|
657
656
|
}).filter(Boolean).map((p) => p.toLowerCase()).sort().join("+");
|
|
658
|
-
u === f && (!h?.when || h.when(
|
|
657
|
+
u === f && (!h?.when || h.when(c)) && (c.preventDefault(), h?.handle ? h.handle(c) : l(g), o.emit(`hotkey:${g}`, c));
|
|
659
658
|
});
|
|
660
659
|
});
|
|
661
660
|
},
|
|
@@ -667,33 +666,33 @@ const ko = (o) => {
|
|
|
667
666
|
root: e,
|
|
668
667
|
timeline: t,
|
|
669
668
|
renderEngine: n
|
|
670
|
-
} = o, s = V(10), a =
|
|
669
|
+
} = o, s = V(10), a = $({
|
|
671
670
|
get: () => t.value.currentTime,
|
|
672
|
-
set: (
|
|
671
|
+
set: (c) => {
|
|
673
672
|
const { startTime: u, endTime: d } = t.value;
|
|
674
|
-
t.value.currentTime = Pn(
|
|
673
|
+
t.value.currentTime = Pn(c, u, d);
|
|
675
674
|
}
|
|
676
|
-
}), r =
|
|
675
|
+
}), r = $(() => t.value.startTime), i = $(() => t.value.endTime), l = (c) => {
|
|
677
676
|
const u = { startTime: 0, endTime: 0 };
|
|
678
677
|
function d(h) {
|
|
679
678
|
return h instanceof Nn && (u.startTime = Math.min(u.startTime, h.globalStartTime), u.endTime = Math.max(u.endTime, h.globalEndTime)), h instanceof G && (h.background.animatedTexture && (u.endTime = Math.max(u.endTime, h.globalStartTime + h.background.animatedTexture.duration)), h.foreground.animatedTexture && (u.endTime = Math.max(u.endTime, h.globalStartTime + h.foreground.animatedTexture.duration)), h.fill.animatedTexture && (u.endTime = Math.max(u.endTime, h.globalStartTime + h.fill.animatedTexture.duration)), h.outline.animatedTexture && (u.endTime = Math.max(u.endTime, h.globalStartTime + h.outline.animatedTexture.duration))), !1;
|
|
680
679
|
}
|
|
681
|
-
return (Array.isArray(
|
|
680
|
+
return (Array.isArray(c) ? c : [c]).forEach((h) => h.findOne(d)), u;
|
|
682
681
|
};
|
|
683
682
|
return Object.assign(o, {
|
|
684
683
|
msPerPx: s,
|
|
685
684
|
currentTime: a,
|
|
686
685
|
startTime: r,
|
|
687
686
|
endTime: i,
|
|
688
|
-
getTimeRange:
|
|
687
|
+
getTimeRange: l
|
|
689
688
|
}), () => {
|
|
690
689
|
const {
|
|
691
|
-
on:
|
|
690
|
+
on: c
|
|
692
691
|
} = o;
|
|
693
692
|
async function u() {
|
|
694
|
-
await n.value.nextTick(), t.value.endTime = e.value ?
|
|
693
|
+
await n.value.nextTick(), t.value.endTime = e.value ? l(e.value).endTime : 0;
|
|
695
694
|
}
|
|
696
|
-
qt.on("loaded", u),
|
|
695
|
+
qt.on("loaded", u), c("setDoc", u);
|
|
697
696
|
};
|
|
698
697
|
}, Eo = (o, e) => {
|
|
699
698
|
Object.assign(o, {
|
|
@@ -749,7 +748,7 @@ const To = (o) => {
|
|
|
749
748
|
function r(h, v) {
|
|
750
749
|
let y;
|
|
751
750
|
if (Array.isArray(h) && h.length > 0)
|
|
752
|
-
h.length === 1 ? y = r(h[0]) : y = { ...
|
|
751
|
+
h.length === 1 ? y = r(h[0]) : y = { ...l(h), rotate: 0 };
|
|
753
752
|
else if (h instanceof G) {
|
|
754
753
|
const f = h.style;
|
|
755
754
|
At([f.left, f.top, f.width, f.height, f.rotate]);
|
|
@@ -778,11 +777,11 @@ const To = (o) => {
|
|
|
778
777
|
function i(h) {
|
|
779
778
|
return r(h, "drawboard");
|
|
780
779
|
}
|
|
781
|
-
function
|
|
780
|
+
function l(h, v) {
|
|
782
781
|
let y;
|
|
783
782
|
if (Array.isArray(h) && h.length > 0)
|
|
784
783
|
if (h.length === 1)
|
|
785
|
-
y =
|
|
784
|
+
y = l(h[0]);
|
|
786
785
|
else {
|
|
787
786
|
const f = {
|
|
788
787
|
minX: Number.MAX_SAFE_INTEGER,
|
|
@@ -792,7 +791,7 @@ const To = (o) => {
|
|
|
792
791
|
};
|
|
793
792
|
h.forEach((p) => {
|
|
794
793
|
if (p instanceof G) {
|
|
795
|
-
const _ =
|
|
794
|
+
const _ = l(p);
|
|
796
795
|
f.minX = Math.min(f.minX, _.left), f.minY = Math.min(f.minY, _.top), f.maxX = Math.max(f.maxX, _.left + _.width), f.maxY = Math.max(f.maxY, _.top + _.height);
|
|
797
796
|
}
|
|
798
797
|
}), y = {
|
|
@@ -825,39 +824,39 @@ const To = (o) => {
|
|
|
825
824
|
}
|
|
826
825
|
return y;
|
|
827
826
|
}
|
|
828
|
-
function
|
|
829
|
-
return
|
|
827
|
+
function c(h) {
|
|
828
|
+
return l(h, "drawboard");
|
|
830
829
|
}
|
|
831
830
|
function u(h) {
|
|
832
831
|
const v = { ...h }, y = e.value.zoom, f = e.value.position;
|
|
833
832
|
return v.left *= y.x, v.top *= y.y, v.width *= y.x, v.height *= y.y, v.left += f.x, v.top += f.y, v;
|
|
834
833
|
}
|
|
835
|
-
const d =
|
|
834
|
+
const d = $(() => l(t.value?.children ?? [])), g = $(() => l(n.value));
|
|
836
835
|
Object.assign(o, {
|
|
837
836
|
obbToFit: a,
|
|
838
837
|
getObb: r,
|
|
839
838
|
getObbInDrawboard: i,
|
|
840
|
-
getAabb:
|
|
841
|
-
getAabbInDrawboard:
|
|
839
|
+
getAabb: l,
|
|
840
|
+
getAabbInDrawboard: c,
|
|
842
841
|
aabbToDrawboardAabb: u,
|
|
843
842
|
rootAabb: d,
|
|
844
843
|
currentAabb: g
|
|
845
844
|
});
|
|
846
845
|
}, Ao = (o) => {
|
|
847
846
|
const e = V(/* @__PURE__ */ new Map()), t = V(!1), n = V(0), s = (i) => {
|
|
848
|
-
Array.isArray(i) ? i.forEach((
|
|
847
|
+
Array.isArray(i) ? i.forEach((l) => s(l)) : e.value.set(i.name, i);
|
|
849
848
|
}, a = (i) => {
|
|
850
849
|
e.value.delete(i);
|
|
851
|
-
}, r = (i,
|
|
852
|
-
const
|
|
853
|
-
...
|
|
850
|
+
}, r = (i, l = {}) => {
|
|
851
|
+
const c = e.value.get(i)?.handle({
|
|
852
|
+
...l,
|
|
854
853
|
onProgress: (u) => {
|
|
855
|
-
n.value = u,
|
|
854
|
+
n.value = u, l.onProgress?.(u);
|
|
856
855
|
}
|
|
857
856
|
});
|
|
858
|
-
return
|
|
857
|
+
return c instanceof Promise ? (n.value = 0, t.value = !0, c.finally(() => {
|
|
859
858
|
t.value = !1;
|
|
860
|
-
})) :
|
|
859
|
+
})) : c;
|
|
861
860
|
};
|
|
862
861
|
Object.assign(o, {
|
|
863
862
|
exporters: e,
|
|
@@ -881,26 +880,26 @@ const To = (o) => {
|
|
|
881
880
|
handle: (r) => {
|
|
882
881
|
const {
|
|
883
882
|
selected: i = !1,
|
|
884
|
-
scale:
|
|
883
|
+
scale: l
|
|
885
884
|
} = r;
|
|
886
|
-
let
|
|
887
|
-
Array.isArray(i) ?
|
|
888
|
-
const u = t(
|
|
885
|
+
let c = [];
|
|
886
|
+
Array.isArray(i) ? c = i : (i === !0 && (c = n.value), c.length === 0 && (c = s.value?.children ?? []));
|
|
887
|
+
const u = t(c, "frame");
|
|
889
888
|
return {
|
|
890
889
|
style: {
|
|
891
890
|
width: u.width,
|
|
892
891
|
height: u.height,
|
|
893
|
-
scaleX:
|
|
894
|
-
scaleY:
|
|
892
|
+
scaleX: l,
|
|
893
|
+
scaleY: l
|
|
895
894
|
},
|
|
896
|
-
children:
|
|
895
|
+
children: c.map((d) => {
|
|
897
896
|
const g = d.toJSON();
|
|
898
897
|
return u.left && (g.style.left = (g.style.left ?? 0) - u.left), u.top && (g.style.top = (g.style.top ?? 0) - u.top), g.meta ??= {}, g.meta.inPptIs = "Slide", g;
|
|
899
898
|
}),
|
|
900
899
|
meta: {
|
|
901
900
|
inPptIs: "Pptx",
|
|
902
901
|
inCanvasIs: "Node2D",
|
|
903
|
-
...a(
|
|
902
|
+
...a(c)
|
|
904
903
|
}
|
|
905
904
|
};
|
|
906
905
|
}
|
|
@@ -909,7 +908,7 @@ const To = (o) => {
|
|
|
909
908
|
const {
|
|
910
909
|
state: e
|
|
911
910
|
} = o, t = V(/* @__PURE__ */ new Map()), n = (i) => {
|
|
912
|
-
Array.isArray(i) ? i.forEach((
|
|
911
|
+
Array.isArray(i) ? i.forEach((l) => n(l)) : t.value.set(i.name, i);
|
|
913
912
|
};
|
|
914
913
|
Object.assign(o, {
|
|
915
914
|
loaders: t,
|
|
@@ -919,34 +918,34 @@ const To = (o) => {
|
|
|
919
918
|
},
|
|
920
919
|
load: async (i) => {
|
|
921
920
|
e.value = "loading";
|
|
922
|
-
let
|
|
921
|
+
let l;
|
|
923
922
|
try {
|
|
924
|
-
for (const
|
|
925
|
-
if (await
|
|
926
|
-
|
|
923
|
+
for (const c of t.value.values())
|
|
924
|
+
if (await c.test(i)) {
|
|
925
|
+
l = await c.load(i);
|
|
927
926
|
break;
|
|
928
927
|
}
|
|
929
928
|
} finally {
|
|
930
929
|
e.value = void 0;
|
|
931
930
|
}
|
|
932
|
-
if (
|
|
931
|
+
if (l === void 0)
|
|
933
932
|
throw new Error(`Failed to load source "${i}"`);
|
|
934
|
-
return
|
|
933
|
+
return l;
|
|
935
934
|
},
|
|
936
935
|
openFileDialog: (i = {}) => {
|
|
937
936
|
const {
|
|
938
|
-
multiple:
|
|
937
|
+
multiple: l = !1
|
|
939
938
|
} = i;
|
|
940
|
-
return new Promise((
|
|
939
|
+
return new Promise((c) => {
|
|
941
940
|
const u = [];
|
|
942
941
|
for (const v of t.value.values())
|
|
943
942
|
v.accept && u.push(v.accept);
|
|
944
943
|
const d = u.join(","), { onChange: g, open: h } = Ut({
|
|
945
944
|
accept: d,
|
|
946
945
|
reset: !0,
|
|
947
|
-
multiple:
|
|
946
|
+
multiple: l
|
|
948
947
|
});
|
|
949
|
-
g((v) =>
|
|
948
|
+
g((v) => c(v ? Array.from(v) : [])), h();
|
|
950
949
|
});
|
|
951
950
|
}
|
|
952
951
|
});
|
|
@@ -963,15 +962,15 @@ const To = (o) => {
|
|
|
963
962
|
return "version" in s && "elements" in s && console.log(s), s;
|
|
964
963
|
}
|
|
965
964
|
});
|
|
966
|
-
},
|
|
965
|
+
}, $o = (o) => {
|
|
967
966
|
const {
|
|
968
967
|
renderEngine: e,
|
|
969
968
|
rootAabb: t,
|
|
970
969
|
currentFrameAabb: n,
|
|
971
970
|
config: s
|
|
972
|
-
} = o, a =
|
|
973
|
-
function r(i,
|
|
974
|
-
function
|
|
971
|
+
} = o, a = $(() => s.value.viewMode === "frame" ? n.value : t.value);
|
|
972
|
+
function r(i, l) {
|
|
973
|
+
function c() {
|
|
975
974
|
const g = e.value.view;
|
|
976
975
|
!g.width || !g.height || (i.width = g.width, i.height = g.height, i.dataset.pixelRatio = g.dataset.pixelRatio, i.getContext("2d")?.drawImage(g, 0, 0, g.width, g.height));
|
|
977
976
|
}
|
|
@@ -979,7 +978,7 @@ const To = (o) => {
|
|
|
979
978
|
i._onRendered && e.value.off("rendered", i._onRendered), e.value.input.setTarget(e.value.view);
|
|
980
979
|
}
|
|
981
980
|
function d() {
|
|
982
|
-
u(), i._onRendered =
|
|
981
|
+
u(), i._onRendered = c, e.value.on("rendered", c), l && e.value.input.setTarget(l);
|
|
983
982
|
}
|
|
984
983
|
return d(), u;
|
|
985
984
|
}
|
|
@@ -989,15 +988,15 @@ const To = (o) => {
|
|
|
989
988
|
}), () => {
|
|
990
989
|
const {
|
|
991
990
|
root: i,
|
|
992
|
-
currentFrame:
|
|
993
|
-
on:
|
|
991
|
+
currentFrame: l,
|
|
992
|
+
on: c,
|
|
994
993
|
exec: u
|
|
995
994
|
} = o;
|
|
996
995
|
function d() {
|
|
997
996
|
switch (s.value.viewMode) {
|
|
998
997
|
case "frame":
|
|
999
998
|
i.value?.children.forEach((g) => {
|
|
1000
|
-
g instanceof G && (g.visible = g.equal(
|
|
999
|
+
g instanceof G && (g.visible = g.equal(l.value));
|
|
1001
1000
|
});
|
|
1002
1001
|
break;
|
|
1003
1002
|
case "edgeless":
|
|
@@ -1008,21 +1007,21 @@ const To = (o) => {
|
|
|
1008
1007
|
}
|
|
1009
1008
|
u("zoomToFit");
|
|
1010
1009
|
}
|
|
1011
|
-
pe(() => s.value.viewMode, d),
|
|
1010
|
+
pe(() => s.value.viewMode, d), c("setCurrentFrame", d), c("setDoc", d);
|
|
1012
1011
|
};
|
|
1013
|
-
},
|
|
1012
|
+
}, Oo = (o) => {
|
|
1014
1013
|
const {
|
|
1015
1014
|
config: e
|
|
1016
1015
|
} = o;
|
|
1017
1016
|
function t(s) {
|
|
1018
1017
|
function a(r) {
|
|
1019
1018
|
const i = r.text.base.characters;
|
|
1020
|
-
let
|
|
1019
|
+
let l = 0, c;
|
|
1021
1020
|
i.forEach((f) => {
|
|
1022
1021
|
const p = f.lineBox.left + f.lineBox.width;
|
|
1023
|
-
p >
|
|
1022
|
+
p > l && (c = f, l = p);
|
|
1024
1023
|
});
|
|
1025
|
-
const u = {}, d = i.filter((f) => f.lineBox.top ===
|
|
1024
|
+
const u = {}, d = i.filter((f) => f.lineBox.top === c?.lineBox.top).map((f) => (Object.assign(
|
|
1026
1025
|
u,
|
|
1027
1026
|
{ ...f.parent.style },
|
|
1028
1027
|
{ ...f.parent.parent.style }
|
|
@@ -1058,25 +1057,25 @@ const To = (o) => {
|
|
|
1058
1057
|
t(s);
|
|
1059
1058
|
return;
|
|
1060
1059
|
}
|
|
1061
|
-
function i(
|
|
1062
|
-
if (!
|
|
1060
|
+
function i(l) {
|
|
1061
|
+
if (!l.text?.isValid?.() || typeof l.text?.content != "object")
|
|
1063
1062
|
return;
|
|
1064
|
-
const
|
|
1063
|
+
const c = l.style.toJSON();
|
|
1065
1064
|
switch (r) {
|
|
1066
1065
|
case "autoWidth":
|
|
1067
|
-
|
|
1066
|
+
c.width = "auto";
|
|
1068
1067
|
break;
|
|
1069
1068
|
case "autoHeight":
|
|
1070
|
-
|
|
1069
|
+
c.height = "auto";
|
|
1071
1070
|
break;
|
|
1072
1071
|
}
|
|
1073
1072
|
const { boundingBox: u } = lt({
|
|
1074
|
-
style:
|
|
1075
|
-
content:
|
|
1073
|
+
style: c,
|
|
1074
|
+
content: l.text.content
|
|
1076
1075
|
});
|
|
1077
|
-
(
|
|
1076
|
+
(l.style.width !== u.width || l.style.height !== u.height) && (l.style.width = u.width, l.style.height = u.height, l.requestRedraw());
|
|
1078
1077
|
}
|
|
1079
|
-
i(s), s.findOne((
|
|
1078
|
+
i(s), s.findOne((l) => (l instanceof G && i(l), !1));
|
|
1080
1079
|
}
|
|
1081
1080
|
return Object.assign(o, {
|
|
1082
1081
|
textFontSizeToFit: t,
|
|
@@ -1108,8 +1107,8 @@ const To = (o) => {
|
|
|
1108
1107
|
textFontSizeToFit: a,
|
|
1109
1108
|
textToFit: r,
|
|
1110
1109
|
log: i,
|
|
1111
|
-
root:
|
|
1112
|
-
isFrame:
|
|
1110
|
+
root: l,
|
|
1111
|
+
isFrame: c,
|
|
1113
1112
|
isLock: u,
|
|
1114
1113
|
getObbInDrawboard: d,
|
|
1115
1114
|
config: g,
|
|
@@ -1134,7 +1133,7 @@ const To = (o) => {
|
|
|
1134
1133
|
x = n.value;
|
|
1135
1134
|
else {
|
|
1136
1135
|
const U = f.value[0];
|
|
1137
|
-
U && (
|
|
1136
|
+
U && (c(U) ? x = U : x = h(U));
|
|
1138
1137
|
}
|
|
1139
1138
|
let N = t.value.top;
|
|
1140
1139
|
const L = t.value.left + t.value.width + g.value.frameGap, j = Array.isArray(b), D = e.value.transact(() => {
|
|
@@ -1203,7 +1202,7 @@ const To = (o) => {
|
|
|
1203
1202
|
f.value = b ? [b] : [];
|
|
1204
1203
|
}
|
|
1205
1204
|
function m(b) {
|
|
1206
|
-
const k =
|
|
1205
|
+
const k = l.value?.children.flatMap((x) => c(x) ? x.children : [x]).filter((x) => "isVisibleInTree" in x && x.isVisibleInTree() && co(b, d(x)) && !u(x)) ?? [];
|
|
1207
1206
|
return f.value = k, k;
|
|
1208
1207
|
}
|
|
1209
1208
|
Object.assign(o, {
|
|
@@ -1224,8 +1223,8 @@ const To = (o) => {
|
|
|
1224
1223
|
frameThumbs: a,
|
|
1225
1224
|
emit: r,
|
|
1226
1225
|
selection: i,
|
|
1227
|
-
frames:
|
|
1228
|
-
config:
|
|
1226
|
+
frames: l,
|
|
1227
|
+
config: c
|
|
1229
1228
|
} = o;
|
|
1230
1229
|
function u(y = {}, f) {
|
|
1231
1230
|
const p = Gt({
|
|
@@ -1237,8 +1236,8 @@ const To = (o) => {
|
|
|
1237
1236
|
inEditorIs: "Frame"
|
|
1238
1237
|
}
|
|
1239
1238
|
});
|
|
1240
|
-
p.style ??= {}, p.style.left = n.value.left + n.value.width +
|
|
1241
|
-
const _ = f ?? (s.value > -1 ? s.value + 1 :
|
|
1239
|
+
p.style ??= {}, p.style.left = n.value.left + n.value.width + c.value.frameGap, p.style.width ||= n.value.width, p.style.height ||= n.value.height;
|
|
1240
|
+
const _ = f ?? (s.value > -1 ? s.value + 1 : l.value.length - 1);
|
|
1242
1241
|
e.value?.addElement(p, { index: _ }), v(_), r("addFrame", _);
|
|
1243
1242
|
}
|
|
1244
1243
|
function d(y = s.value) {
|
|
@@ -1263,9 +1262,9 @@ const To = (o) => {
|
|
|
1263
1262
|
f && (e.value?.deleteElement(f), a.value.splice(y, 1), v(y), r("deleteFrame", y));
|
|
1264
1263
|
}
|
|
1265
1264
|
function v(y = s.value) {
|
|
1266
|
-
y = Math.max(0, Math.min(
|
|
1265
|
+
y = Math.max(0, Math.min(l.value.length - 1, y));
|
|
1267
1266
|
const f = s.value;
|
|
1268
|
-
s.value = y,
|
|
1267
|
+
s.value = y, c.value.viewMode === "edgeless" ? i.value = [l.value[y]] : i.value = [], r("setCurrentFrame", y, f);
|
|
1269
1268
|
}
|
|
1270
1269
|
Object.assign(o, {
|
|
1271
1270
|
addFrame: u,
|
|
@@ -1539,9 +1538,9 @@ function Qo(o, e = {}, t, n = !1) {
|
|
|
1539
1538
|
}
|
|
1540
1539
|
function cn(o, e, t = !1) {
|
|
1541
1540
|
const n = [], s = new le.Map(), { normalized: a, yChildrenIds: r } = Qo(s, o, e, t), i = a.id;
|
|
1542
|
-
return n.push({ id: i, element: s }), a.children?.forEach((
|
|
1543
|
-
const
|
|
1544
|
-
r.push([
|
|
1541
|
+
return n.push({ id: i, element: s }), a.children?.forEach((l) => {
|
|
1542
|
+
const c = cn(l, i, t);
|
|
1543
|
+
r.push([c[0].id]), n.push(...c);
|
|
1545
1544
|
}), n;
|
|
1546
1545
|
}
|
|
1547
1546
|
class un extends ln {
|
|
@@ -1584,9 +1583,12 @@ class un extends ln {
|
|
|
1584
1583
|
_isSelfTransaction(e) {
|
|
1585
1584
|
return !e.origin || e.origin === this._yDoc.clientID;
|
|
1586
1585
|
}
|
|
1586
|
+
_debug(...e) {
|
|
1587
|
+
}
|
|
1587
1588
|
_onChildrenChange(e, t) {
|
|
1588
1589
|
if (this._isSelfTransaction(t))
|
|
1589
1590
|
return;
|
|
1591
|
+
this._debug("_onChildrenChange", e);
|
|
1590
1592
|
const { keysChanged: n, changes: s } = e;
|
|
1591
1593
|
n.forEach((a) => {
|
|
1592
1594
|
const r = s.keys.get(a), i = this._yChildren.get(a);
|
|
@@ -1622,9 +1624,9 @@ class un extends ln {
|
|
|
1622
1624
|
_addElement(e, t = {}) {
|
|
1623
1625
|
const { parentId: n, index: s, regenId: a } = t, r = cn(e, n, a);
|
|
1624
1626
|
r.forEach((d) => this._yChildren.set(d.id, d.element));
|
|
1625
|
-
const
|
|
1626
|
-
let
|
|
1627
|
-
return n ? (
|
|
1627
|
+
const l = r.map((d) => this._getOrCreateNode(d.element))[0];
|
|
1628
|
+
let c, u;
|
|
1629
|
+
return n ? (c = this.nodeMap.get(n), u = this._yChildren.get(n)?.get("childrenIds")) : (c = this.root, u = this._yChildrenIds), c && u && (s === void 0 ? (u.push([l.id]), c.appendChild(l)) : (u.insert(s, [l.id]), c.moveChild(l, s))), l;
|
|
1628
1630
|
}
|
|
1629
1631
|
addElement(e, t) {
|
|
1630
1632
|
return this.transact(() => this._addElement(e, t));
|
|
@@ -1670,30 +1672,30 @@ class un extends ln {
|
|
|
1670
1672
|
if (n) {
|
|
1671
1673
|
e._propertyAccessor = void 0;
|
|
1672
1674
|
const r = {};
|
|
1673
|
-
t.forEach((i,
|
|
1674
|
-
r[
|
|
1675
|
-
}), e._propertyAccessor = fe(s), t.forEach((i,
|
|
1676
|
-
const
|
|
1677
|
-
|
|
1675
|
+
t.forEach((i, l) => {
|
|
1676
|
+
r[l] = e.getProperty(l);
|
|
1677
|
+
}), e._propertyAccessor = fe(s), t.forEach((i, l) => {
|
|
1678
|
+
const c = e.getProperty(l), u = r[l];
|
|
1679
|
+
c !== void 0 && !Object.is(c, u) && (e.setProperty(l, c), e.requestUpdate(l, c, u));
|
|
1678
1680
|
});
|
|
1679
1681
|
}
|
|
1680
1682
|
e.setPropertyAccessor(s);
|
|
1681
1683
|
const a = (r, i) => {
|
|
1682
|
-
this._isSelfTransaction(i) || this.transact(() => {
|
|
1683
|
-
const { keysChanged:
|
|
1684
|
-
|
|
1685
|
-
const d =
|
|
1684
|
+
this._isSelfTransaction(i) || (this._debug("_proxyProps", r, e), this.transact(() => {
|
|
1685
|
+
const { keysChanged: l, changes: c } = r;
|
|
1686
|
+
l.forEach((u) => {
|
|
1687
|
+
const d = c.keys.get(u), g = d?.oldValue;
|
|
1686
1688
|
switch (d?.action) {
|
|
1687
1689
|
case "add":
|
|
1688
1690
|
case "update":
|
|
1689
1691
|
this.undoManager.stopCapturing(), e[u] = t.get(u), e.requestUpdate(u, t.get(u), g);
|
|
1690
1692
|
break;
|
|
1691
1693
|
case "delete":
|
|
1692
|
-
this.undoManager.stopCapturing(), e[u] = void 0, e.requestUpdate(u,
|
|
1694
|
+
this.undoManager.stopCapturing(), e[u] = void 0, e.requestUpdate(u, e[u], g);
|
|
1693
1695
|
break;
|
|
1694
1696
|
}
|
|
1695
1697
|
});
|
|
1696
|
-
}, !1);
|
|
1698
|
+
}, !1));
|
|
1697
1699
|
};
|
|
1698
1700
|
e._yMap = fe(t), e._yMapObserveFn && t.unobserve(e._yMapObserveFn), e._yMapObserveFn = fe(a), t.observe(a);
|
|
1699
1701
|
}
|
|
@@ -1705,15 +1707,16 @@ class un extends ln {
|
|
|
1705
1707
|
const n = (s, a) => {
|
|
1706
1708
|
if (this._isSelfTransaction(a))
|
|
1707
1709
|
return;
|
|
1710
|
+
this._debug("_proxyChildren", s, e);
|
|
1708
1711
|
const r = e.children;
|
|
1709
1712
|
let i = 0;
|
|
1710
|
-
s.changes.delta.forEach((
|
|
1711
|
-
if (
|
|
1712
|
-
for (let
|
|
1713
|
-
r[
|
|
1714
|
-
if (
|
|
1715
|
-
const
|
|
1716
|
-
|
|
1713
|
+
s.changes.delta.forEach((l) => {
|
|
1714
|
+
if (l.retain !== void 0 && (i += l.retain), l.delete)
|
|
1715
|
+
for (let c = i; c < i + l.delete; c++)
|
|
1716
|
+
r[c]?.remove();
|
|
1717
|
+
if (l.insert) {
|
|
1718
|
+
const c = Array.isArray(l.insert) ? l.insert : [l.insert];
|
|
1719
|
+
c.forEach((u, d) => {
|
|
1717
1720
|
let g = this.nodeMap.get(u);
|
|
1718
1721
|
const h = (v) => {
|
|
1719
1722
|
e.moveChild(v, i + d);
|
|
@@ -1721,7 +1724,7 @@ class un extends ln {
|
|
|
1721
1724
|
g ? h(g) : setTimeout(() => {
|
|
1722
1725
|
g = this.nodeMap.get(u), g && h(g);
|
|
1723
1726
|
}, 0);
|
|
1724
|
-
}), i +=
|
|
1727
|
+
}), i += c.length;
|
|
1725
1728
|
}
|
|
1726
1729
|
});
|
|
1727
1730
|
};
|
|
@@ -1801,15 +1804,15 @@ const ts = (o, e) => {
|
|
|
1801
1804
|
emit: a,
|
|
1802
1805
|
selection: r,
|
|
1803
1806
|
setCurrentFrame: i,
|
|
1804
|
-
state:
|
|
1805
|
-
to:
|
|
1807
|
+
state: l,
|
|
1808
|
+
to: c,
|
|
1806
1809
|
waitUntilFontLoad: u,
|
|
1807
1810
|
config: d,
|
|
1808
1811
|
load: g
|
|
1809
1812
|
} = o, h = () => {
|
|
1810
1813
|
s.value.root.removeChildren(), s.value.root.children.length = 0, n.value = void 0, r.value = [], a("clearDoc");
|
|
1811
|
-
}, v = () =>
|
|
1812
|
-
|
|
1814
|
+
}, v = () => c("json"), y = async (p) => {
|
|
1815
|
+
l.value = "loading";
|
|
1813
1816
|
const _ = new un(typeof p == "string" ? p : p.id);
|
|
1814
1817
|
try {
|
|
1815
1818
|
await u(), h(), await _.load(async () => {
|
|
@@ -1822,7 +1825,7 @@ const ts = (o, e) => {
|
|
|
1822
1825
|
typeof p != "string" && _.set(p);
|
|
1823
1826
|
}), _.on("update", Hn((z, I) => a("updateDoc", z, I), 200)), t.value?.addDoc(_), n.value?.destroy(), n.value = _, s.value.root.appendChild(_.root), i(0), a("setDoc", _);
|
|
1824
1827
|
} finally {
|
|
1825
|
-
|
|
1828
|
+
l.value = void 0;
|
|
1826
1829
|
}
|
|
1827
1830
|
return _;
|
|
1828
1831
|
};
|
|
@@ -1849,10 +1852,10 @@ const ts = (o, e) => {
|
|
|
1849
1852
|
frameThumbs: a,
|
|
1850
1853
|
log: r,
|
|
1851
1854
|
fonts: i,
|
|
1852
|
-
registerConfig:
|
|
1855
|
+
registerConfig: l
|
|
1853
1856
|
} = o;
|
|
1854
|
-
|
|
1855
|
-
async function
|
|
1857
|
+
l("frameScreenshot", !1);
|
|
1858
|
+
async function c() {
|
|
1856
1859
|
a.value.length = t.value.length;
|
|
1857
1860
|
for (let h = 0; h < t.value.length; h++)
|
|
1858
1861
|
await d(h);
|
|
@@ -1902,7 +1905,7 @@ const ts = (o, e) => {
|
|
|
1902
1905
|
);
|
|
1903
1906
|
}
|
|
1904
1907
|
return Object.assign(o, {
|
|
1905
|
-
snapshot:
|
|
1908
|
+
snapshot: c,
|
|
1906
1909
|
captureElementScreenshot: u,
|
|
1907
1910
|
captureFrameScreenshot: d,
|
|
1908
1911
|
renderFrameThumb: g
|
|
@@ -1912,7 +1915,7 @@ const ts = (o, e) => {
|
|
|
1912
1915
|
config: v
|
|
1913
1916
|
} = o;
|
|
1914
1917
|
h("setDoc", (y) => {
|
|
1915
|
-
v.value.frameScreenshot &&
|
|
1918
|
+
v.value.frameScreenshot && c();
|
|
1916
1919
|
function f(p) {
|
|
1917
1920
|
if (v.value.frameScreenshot) {
|
|
1918
1921
|
const _ = p.getIndex();
|
|
@@ -1945,8 +1948,8 @@ const ts = (o, e) => {
|
|
|
1945
1948
|
So,
|
|
1946
1949
|
Mo,
|
|
1947
1950
|
zo,
|
|
1948
|
-
Oo,
|
|
1949
1951
|
$o,
|
|
1952
|
+
Oo,
|
|
1950
1953
|
Io,
|
|
1951
1954
|
Fo,
|
|
1952
1955
|
Po,
|
|
@@ -2699,24 +2702,24 @@ const rs = (o) => {
|
|
|
2699
2702
|
let m, b, k, x;
|
|
2700
2703
|
return E.instanceId ? (C.id = E.instanceId, { top: m, left: b, height: k, width: x } = s(E)) : (C.id = Math.random(), { top: m, left: b, height: k, width: x } = E), C.vt = Pe(m, "vt", C), C.vm = Pe(m + k / 2, "vm", C), C.vb = Pe(m + k, "vb", C), C.hl = Pe(b, "hl", C), C.hm = Pe(b + x / 2, "hm", C), C.hr = Pe(b + x, "hr", C), C;
|
|
2701
2704
|
}
|
|
2702
|
-
const i =
|
|
2705
|
+
const i = $(() => 4), l = $(() => new Set(
|
|
2703
2706
|
[
|
|
2704
2707
|
t.value[0]?.instanceId
|
|
2705
2708
|
].filter(Boolean)
|
|
2706
|
-
)),
|
|
2709
|
+
)), c = $(() => {
|
|
2707
2710
|
if (t.value[0])
|
|
2708
2711
|
return r(t.value[0]);
|
|
2709
|
-
}), u =
|
|
2712
|
+
}), u = $(() => {
|
|
2710
2713
|
const E = t.value[0].parent;
|
|
2711
2714
|
return E instanceof G ? E : void 0;
|
|
2712
|
-
}), d =
|
|
2715
|
+
}), d = $(() => r(
|
|
2713
2716
|
u.value ?? { left: 0, top: 0, width: 0, height: 0 }
|
|
2714
|
-
)), g =
|
|
2717
|
+
)), g = $(() => {
|
|
2715
2718
|
const E = [
|
|
2716
2719
|
...u.value?.children ?? a.value?.children ?? []
|
|
2717
2720
|
];
|
|
2718
|
-
return e.value && u.value?.equal(e.value) && E.push(u.value), E.filter((C) => !
|
|
2719
|
-
}), h =
|
|
2721
|
+
return e.value && u.value?.equal(e.value) && E.push(u.value), E.filter((C) => !l.value.has(C.instanceId)).map((C) => r(C)).filter(Boolean);
|
|
2722
|
+
}), h = $(() => g.value.reduce(
|
|
2720
2723
|
(E, C) => ([C.vt, C.vm, C.vb].forEach((m) => E.vLines.add(m)), [C.hl, C.hm, C.hr].forEach((m) => E.hLines.add(m)), E),
|
|
2721
2724
|
{
|
|
2722
2725
|
vLines: new St((E, C) => E.pos - C.pos),
|
|
@@ -2774,10 +2777,10 @@ const rs = (o) => {
|
|
|
2774
2777
|
pos: m ? b + k : b - k
|
|
2775
2778
|
}, x);
|
|
2776
2779
|
}
|
|
2777
|
-
const p =
|
|
2778
|
-
if (!
|
|
2780
|
+
const p = $(() => {
|
|
2781
|
+
if (!c.value)
|
|
2779
2782
|
return [];
|
|
2780
|
-
const { vLines: E, hLines: C } = h.value, m =
|
|
2783
|
+
const { vLines: E, hLines: C } = h.value, m = c.value, b = { vt: [], vb: [], hl: [], hr: [] }, k = [];
|
|
2781
2784
|
return [
|
|
2782
2785
|
{ sources: [m.vt, m.vm, m.vb], targets: E },
|
|
2783
2786
|
{ sources: [m.hl, m.hm, m.hr], targets: C }
|
|
@@ -2830,7 +2833,7 @@ const rs = (o) => {
|
|
|
2830
2833
|
}
|
|
2831
2834
|
}
|
|
2832
2835
|
}), k;
|
|
2833
|
-
}), _ = (E) => E, z =
|
|
2836
|
+
}), _ = (E) => E, z = $(() => {
|
|
2834
2837
|
if (n.value !== "transforming")
|
|
2835
2838
|
return [];
|
|
2836
2839
|
const E = { left: 0, top: 0 };
|
|
@@ -2930,7 +2933,7 @@ const rs = (o) => {
|
|
|
2930
2933
|
async function i() {
|
|
2931
2934
|
await r(), t("delete");
|
|
2932
2935
|
}
|
|
2933
|
-
async function
|
|
2936
|
+
async function l() {
|
|
2934
2937
|
if (Tt) {
|
|
2935
2938
|
const u = await navigator.clipboard.read(), d = [];
|
|
2936
2939
|
for (const g of u)
|
|
@@ -2985,8 +2988,8 @@ const rs = (o) => {
|
|
|
2985
2988
|
regenId: !0
|
|
2986
2989
|
});
|
|
2987
2990
|
}
|
|
2988
|
-
async function
|
|
2989
|
-
await r(), await
|
|
2991
|
+
async function c() {
|
|
2992
|
+
await r(), await l();
|
|
2990
2993
|
}
|
|
2991
2994
|
return Object.assign(o, {
|
|
2992
2995
|
copiedData: a
|
|
@@ -2995,8 +2998,8 @@ const rs = (o) => {
|
|
|
2995
2998
|
commands: [
|
|
2996
2999
|
{ command: "copy", handle: r },
|
|
2997
3000
|
{ command: "cut", handle: i },
|
|
2998
|
-
{ command: "paste", handle:
|
|
2999
|
-
{ command: "duplicate", handle:
|
|
3001
|
+
{ command: "paste", handle: l },
|
|
3002
|
+
{ command: "duplicate", handle: c }
|
|
3000
3003
|
],
|
|
3001
3004
|
hotkeys: [
|
|
3002
3005
|
{ command: "copy", key: "CmdOrCtrl+c", editable: !1 },
|
|
@@ -3060,7 +3063,7 @@ const rs = (o) => {
|
|
|
3060
3063
|
isFrame: r,
|
|
3061
3064
|
doc: i
|
|
3062
3065
|
} = o;
|
|
3063
|
-
function
|
|
3066
|
+
function l() {
|
|
3064
3067
|
const d = s.value;
|
|
3065
3068
|
if (d.length === 0)
|
|
3066
3069
|
return;
|
|
@@ -3081,7 +3084,7 @@ const rs = (o) => {
|
|
|
3081
3084
|
}), d.forEach((v) => e(v.id));
|
|
3082
3085
|
});
|
|
3083
3086
|
}
|
|
3084
|
-
function
|
|
3087
|
+
function c() {
|
|
3085
3088
|
const d = s.value[0];
|
|
3086
3089
|
if (!d)
|
|
3087
3090
|
return;
|
|
@@ -3097,13 +3100,13 @@ const rs = (o) => {
|
|
|
3097
3100
|
});
|
|
3098
3101
|
}
|
|
3099
3102
|
function u() {
|
|
3100
|
-
s.value.length === 1 ? r(s.value[0]) &&
|
|
3103
|
+
s.value.length === 1 ? r(s.value[0]) && c() : s.value.length > 1 && l();
|
|
3101
3104
|
}
|
|
3102
3105
|
return {
|
|
3103
3106
|
name: "mce:frame",
|
|
3104
3107
|
commands: [
|
|
3105
|
-
{ command: "frame", handle:
|
|
3106
|
-
{ command: "unframe", handle:
|
|
3108
|
+
{ command: "frame", handle: l },
|
|
3109
|
+
{ command: "unframe", handle: c },
|
|
3107
3110
|
{ command: "frame/unframe", handle: u }
|
|
3108
3111
|
],
|
|
3109
3112
|
hotkeys: [
|
|
@@ -3121,9 +3124,9 @@ const rs = (o) => {
|
|
|
3121
3124
|
{
|
|
3122
3125
|
name: "gif",
|
|
3123
3126
|
handle: async (a) => {
|
|
3124
|
-
const { Encoder: r } = await import("modern-gif"), { onProgress: i, ...
|
|
3127
|
+
const { Encoder: r } = await import("modern-gif"), { onProgress: i, ...l } = a, c = n("json", l), { startTime: u, endTime: d } = c.meta, g = Math.floor(c.style.width), h = Math.floor(c.style.height), v = new r({ width: g, height: h, workerUrl: s });
|
|
3125
3128
|
return await et({
|
|
3126
|
-
data:
|
|
3129
|
+
data: c,
|
|
3127
3130
|
width: g,
|
|
3128
3131
|
height: h,
|
|
3129
3132
|
fonts: t,
|
|
@@ -3166,7 +3169,7 @@ const rs = (o) => {
|
|
|
3166
3169
|
}), u.forEach((h) => a(h.id));
|
|
3167
3170
|
});
|
|
3168
3171
|
}
|
|
3169
|
-
function
|
|
3172
|
+
function l() {
|
|
3170
3173
|
const u = n.value[0];
|
|
3171
3174
|
if (!u)
|
|
3172
3175
|
return;
|
|
@@ -3181,15 +3184,15 @@ const rs = (o) => {
|
|
|
3181
3184
|
}), a(u.id);
|
|
3182
3185
|
});
|
|
3183
3186
|
}
|
|
3184
|
-
function
|
|
3185
|
-
n.value.length === 1 ?
|
|
3187
|
+
function c() {
|
|
3188
|
+
n.value.length === 1 ? l() : n.value.length > 1 && i();
|
|
3186
3189
|
}
|
|
3187
3190
|
return {
|
|
3188
3191
|
name: "mce:group",
|
|
3189
3192
|
commands: [
|
|
3190
3193
|
{ command: "group", handle: i },
|
|
3191
|
-
{ command: "ungroup", handle:
|
|
3192
|
-
{ command: "group/ungroup", handle:
|
|
3194
|
+
{ command: "ungroup", handle: l },
|
|
3195
|
+
{ command: "group/ungroup", handle: c }
|
|
3193
3196
|
],
|
|
3194
3197
|
hotkeys: [
|
|
3195
3198
|
{ command: "group/ungroup", key: "CmdOrCtrl+g" }
|
|
@@ -3207,8 +3210,8 @@ const rs = (o) => {
|
|
|
3207
3210
|
e.value?.undo();
|
|
3208
3211
|
}
|
|
3209
3212
|
return t("setDoc", (i) => {
|
|
3210
|
-
i.on("history", (
|
|
3211
|
-
n.value =
|
|
3213
|
+
i.on("history", (l) => {
|
|
3214
|
+
n.value = l.canUndo(), s.value = l.canRedo();
|
|
3212
3215
|
});
|
|
3213
3216
|
}), Object.assign(o, {
|
|
3214
3217
|
canUndo: n,
|
|
@@ -3238,7 +3241,7 @@ const rs = (o) => {
|
|
|
3238
3241
|
sizeToFit: !0,
|
|
3239
3242
|
positionToFit: !0,
|
|
3240
3243
|
...d
|
|
3241
|
-
}),
|
|
3244
|
+
}), l = () => {
|
|
3242
3245
|
e("drawing", {
|
|
3243
3246
|
content: "image",
|
|
3244
3247
|
callback: (u) => {
|
|
@@ -3246,7 +3249,7 @@ const rs = (o) => {
|
|
|
3246
3249
|
}
|
|
3247
3250
|
});
|
|
3248
3251
|
};
|
|
3249
|
-
function
|
|
3252
|
+
function c(u) {
|
|
3250
3253
|
return {
|
|
3251
3254
|
name: u,
|
|
3252
3255
|
handle: async (d) => {
|
|
@@ -3269,12 +3272,12 @@ const rs = (o) => {
|
|
|
3269
3272
|
name: "mce:image",
|
|
3270
3273
|
commands: [
|
|
3271
3274
|
{ command: "insertImage", handle: i },
|
|
3272
|
-
{ command: "drawImage", handle:
|
|
3275
|
+
{ command: "drawImage", handle: l }
|
|
3273
3276
|
],
|
|
3274
3277
|
exporters: [
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
+
c("jpeg"),
|
|
3279
|
+
c("png"),
|
|
3280
|
+
c("webp")
|
|
3278
3281
|
],
|
|
3279
3282
|
loaders: [
|
|
3280
3283
|
{
|
|
@@ -3298,9 +3301,9 @@ const rs = (o) => {
|
|
|
3298
3301
|
const r = await t({ multiple: !0 });
|
|
3299
3302
|
return n((await Promise.all(
|
|
3300
3303
|
r.map(async (i) => {
|
|
3301
|
-
const
|
|
3302
|
-
let
|
|
3303
|
-
return
|
|
3304
|
+
const l = await e(i);
|
|
3305
|
+
let c;
|
|
3306
|
+
return l.meta?.inEditorIs === "Doc" ? c = l.children ?? [] : c = [l], c;
|
|
3304
3307
|
})
|
|
3305
3308
|
)).flat(), {
|
|
3306
3309
|
...a,
|
|
@@ -3317,14 +3320,14 @@ const rs = (o) => {
|
|
|
3317
3320
|
const {
|
|
3318
3321
|
selection: e
|
|
3319
3322
|
} = o;
|
|
3320
|
-
function t(i,
|
|
3323
|
+
function t(i, l) {
|
|
3321
3324
|
(Array.isArray(i) ? i : [i]).forEach((u) => {
|
|
3322
3325
|
const d = u.getParent();
|
|
3323
3326
|
if (!d)
|
|
3324
3327
|
return;
|
|
3325
3328
|
let g = u.getIndex();
|
|
3326
3329
|
const h = d.children.length - 1, v = 0;
|
|
3327
|
-
switch (
|
|
3330
|
+
switch (l) {
|
|
3328
3331
|
case "bringForward":
|
|
3329
3332
|
g = Math.min(d.children.length - 1, g + 1);
|
|
3330
3333
|
break;
|
|
@@ -3445,7 +3448,7 @@ const rs = (o) => {
|
|
|
3445
3448
|
selection: s,
|
|
3446
3449
|
textSelection: a,
|
|
3447
3450
|
config: r
|
|
3448
|
-
} = o, i =
|
|
3451
|
+
} = o, i = $(() => s.value.length > 0), l = $(() => ({
|
|
3449
3452
|
key: "export",
|
|
3450
3453
|
children: [
|
|
3451
3454
|
{ key: "saveAs:png" },
|
|
@@ -3458,27 +3461,25 @@ const rs = (o) => {
|
|
|
3458
3461
|
{ key: "saveAs:pptx" },
|
|
3459
3462
|
{ key: "saveAs:json" }
|
|
3460
3463
|
]
|
|
3461
|
-
})),
|
|
3464
|
+
})), c = $(() => ({
|
|
3462
3465
|
key: "file",
|
|
3463
3466
|
children: [
|
|
3464
3467
|
{ key: "new" },
|
|
3465
3468
|
{ key: "open" },
|
|
3466
3469
|
{ type: "divider" },
|
|
3467
3470
|
{ key: "import" },
|
|
3468
|
-
|
|
3469
|
-
{ type: "divider" },
|
|
3470
|
-
{ key: "preferences" }
|
|
3471
|
+
l.value
|
|
3471
3472
|
]
|
|
3472
|
-
})), u =
|
|
3473
|
+
})), u = $(() => [
|
|
3473
3474
|
{ key: "undo", disabled: !e.value },
|
|
3474
3475
|
{ key: "redo", disabled: !t.value }
|
|
3475
|
-
]), d =
|
|
3476
|
+
]), d = $(() => [
|
|
3476
3477
|
{ key: "copy", disabled: !i.value },
|
|
3477
3478
|
{ key: "cut", disabled: !i.value },
|
|
3478
3479
|
{ key: "paste", disabled: !n.value },
|
|
3479
3480
|
{ key: "duplicate", disabled: !i.value },
|
|
3480
3481
|
{ key: "delete", disabled: !i.value }
|
|
3481
|
-
]), g =
|
|
3482
|
+
]), g = $(() => ({
|
|
3482
3483
|
key: "select",
|
|
3483
3484
|
children: [
|
|
3484
3485
|
{ key: "selectAll" },
|
|
@@ -3487,7 +3488,7 @@ const rs = (o) => {
|
|
|
3487
3488
|
{ key: "previousSelection", disabled: !i.value },
|
|
3488
3489
|
{ key: "nextSelection", disabled: !i.value }
|
|
3489
3490
|
]
|
|
3490
|
-
})), h =
|
|
3491
|
+
})), h = $(() => ({
|
|
3491
3492
|
key: "edit",
|
|
3492
3493
|
children: [
|
|
3493
3494
|
...u.value,
|
|
@@ -3496,7 +3497,7 @@ const rs = (o) => {
|
|
|
3496
3497
|
{ type: "divider" },
|
|
3497
3498
|
...g.value.children
|
|
3498
3499
|
]
|
|
3499
|
-
})), v =
|
|
3500
|
+
})), v = $(() => ({
|
|
3500
3501
|
key: "zoom",
|
|
3501
3502
|
children: [
|
|
3502
3503
|
{ key: "zoomIn" },
|
|
@@ -3505,7 +3506,7 @@ const rs = (o) => {
|
|
|
3505
3506
|
{ key: "zoomToFit" },
|
|
3506
3507
|
{ key: "zoomToSelection", disabled: !i.value }
|
|
3507
3508
|
]
|
|
3508
|
-
})), y =
|
|
3509
|
+
})), y = $(() => ({
|
|
3509
3510
|
key: "view",
|
|
3510
3511
|
children: [
|
|
3511
3512
|
{ key: "view:checkerboard", checked: r.value.checkerboard },
|
|
@@ -3518,10 +3519,10 @@ const rs = (o) => {
|
|
|
3518
3519
|
{ type: "divider" },
|
|
3519
3520
|
...v.value.children
|
|
3520
3521
|
]
|
|
3521
|
-
})), f =
|
|
3522
|
+
})), f = $(() => [
|
|
3522
3523
|
{ key: "group/ungroup", disabled: !i.value },
|
|
3523
3524
|
{ key: "frame/unframe", disabled: !i.value }
|
|
3524
|
-
]), p =
|
|
3525
|
+
]), p = $(() => ({
|
|
3525
3526
|
key: "layerOrder",
|
|
3526
3527
|
children: [
|
|
3527
3528
|
{ key: "bringToFront", disabled: !i.value },
|
|
@@ -3529,16 +3530,16 @@ const rs = (o) => {
|
|
|
3529
3530
|
{ key: "sendBackward", disabled: !i.value },
|
|
3530
3531
|
{ key: "sendToBack", disabled: !i.value }
|
|
3531
3532
|
]
|
|
3532
|
-
})), _ =
|
|
3533
|
+
})), _ = $(() => ({
|
|
3533
3534
|
key: "flip",
|
|
3534
3535
|
children: [
|
|
3535
3536
|
{ key: "flipHorizontal", disabled: !i.value },
|
|
3536
3537
|
{ key: "flipVertical", disabled: !i.value }
|
|
3537
3538
|
]
|
|
3538
|
-
})), z =
|
|
3539
|
+
})), z = $(() => [
|
|
3539
3540
|
{ key: "hide/show", disabled: !i.value },
|
|
3540
3541
|
{ key: "lock/unlock", disabled: !i.value }
|
|
3541
|
-
]), I =
|
|
3542
|
+
]), I = $(() => ({
|
|
3542
3543
|
key: "object",
|
|
3543
3544
|
children: [
|
|
3544
3545
|
...f.value,
|
|
@@ -3549,25 +3550,25 @@ const rs = (o) => {
|
|
|
3549
3550
|
{ type: "divider" },
|
|
3550
3551
|
...z.value
|
|
3551
3552
|
]
|
|
3552
|
-
})), E =
|
|
3553
|
+
})), E = $(() => [
|
|
3553
3554
|
{ key: "alignLeft", disabled: !i.value },
|
|
3554
3555
|
{ key: "alignHorizontalCenter", disabled: !i.value },
|
|
3555
3556
|
{ key: "alignRight", disabled: !i.value },
|
|
3556
3557
|
{ key: "alignTop", disabled: !i.value },
|
|
3557
3558
|
{ key: "alignVerticalCenter", disabled: !i.value },
|
|
3558
3559
|
{ key: "alignBottom", disabled: !i.value }
|
|
3559
|
-
]), C =
|
|
3560
|
+
]), C = $(() => ({
|
|
3560
3561
|
key: "layerPosition",
|
|
3561
3562
|
children: [
|
|
3562
3563
|
...E.value
|
|
3563
3564
|
]
|
|
3564
|
-
})), m =
|
|
3565
|
-
|
|
3565
|
+
})), m = $(() => [
|
|
3566
|
+
c.value,
|
|
3566
3567
|
h.value,
|
|
3567
3568
|
y.value,
|
|
3568
3569
|
I.value,
|
|
3569
3570
|
C.value
|
|
3570
|
-
]), b =
|
|
3571
|
+
]), b = $(() => s.value.length > 0 ? a.value ? [
|
|
3571
3572
|
...d.value
|
|
3572
3573
|
] : [
|
|
3573
3574
|
...d.value,
|
|
@@ -3579,13 +3580,13 @@ const rs = (o) => {
|
|
|
3579
3580
|
C.value,
|
|
3580
3581
|
_.value,
|
|
3581
3582
|
{ type: "divider" },
|
|
3582
|
-
|
|
3583
|
+
l.value
|
|
3583
3584
|
] : [
|
|
3584
3585
|
d.value[2],
|
|
3585
3586
|
{ type: "divider" },
|
|
3586
3587
|
...m.value,
|
|
3587
3588
|
{ type: "divider" },
|
|
3588
|
-
|
|
3589
|
+
l.value
|
|
3589
3590
|
]);
|
|
3590
3591
|
return Object.assign(o, {
|
|
3591
3592
|
mainMenu: m,
|
|
@@ -3645,7 +3646,7 @@ const rs = (o) => {
|
|
|
3645
3646
|
{
|
|
3646
3647
|
name: "mp4",
|
|
3647
3648
|
handle: async (n) => {
|
|
3648
|
-
const { MP4Encoder: s } = await import("modern-mp4"), { onProgress: a, ...r } = n, i = t("json", r), { startTime:
|
|
3649
|
+
const { MP4Encoder: s } = await import("modern-mp4"), { onProgress: a, ...r } = n, i = t("json", r), { startTime: l, endTime: c } = i.meta, u = Math.floor(i.style.width / 2) * 2, d = Math.floor(i.style.height / 2) * 2, g = 30, h = {
|
|
3649
3650
|
width: u,
|
|
3650
3651
|
height: d,
|
|
3651
3652
|
framerate: g,
|
|
@@ -3677,7 +3678,7 @@ const rs = (o) => {
|
|
|
3677
3678
|
duration: E
|
|
3678
3679
|
}), m.close(), z += E, a?.(C);
|
|
3679
3680
|
},
|
|
3680
|
-
keyframes: Array.from({ length: ~~((
|
|
3681
|
+
keyframes: Array.from({ length: ~~((c - l) / v) }, (I, E) => l + E * v)
|
|
3681
3682
|
}), await _.flush();
|
|
3682
3683
|
}
|
|
3683
3684
|
}
|
|
@@ -3771,10 +3772,10 @@ const rs = (o) => {
|
|
|
3771
3772
|
{
|
|
3772
3773
|
name: "pptx",
|
|
3773
3774
|
handle: async (i) => {
|
|
3774
|
-
const { idocToPptx:
|
|
3775
|
+
const { idocToPptx: l } = await import("modern-openxml"), c = await s("json", i);
|
|
3775
3776
|
return new Blob([
|
|
3776
|
-
await
|
|
3777
|
-
...
|
|
3777
|
+
await l({
|
|
3778
|
+
...c,
|
|
3778
3779
|
fonts: a
|
|
3779
3780
|
})
|
|
3780
3781
|
], {
|
|
@@ -3789,15 +3790,15 @@ const rs = (o) => {
|
|
|
3789
3790
|
accept: ".pptx",
|
|
3790
3791
|
test: (i) => !!(i instanceof Blob && i.type.startsWith("application/vnd.openxmlformats-officedocument.presentationml.presentation") || i instanceof File && r.test(i.name)),
|
|
3791
3792
|
load: async (i) => {
|
|
3792
|
-
const { pptxToIdoc:
|
|
3793
|
-
presetShapeDefinitions:
|
|
3793
|
+
const { pptxToIdoc: l } = await import("modern-openxml"), c = await import("modern-openxml/presetShapeDefinitions").then((d) => d.default), u = await l(await i.arrayBuffer(), {
|
|
3794
|
+
presetShapeDefinitions: c,
|
|
3794
3795
|
upload: async (d, g) => {
|
|
3795
3796
|
const h = g.image;
|
|
3796
|
-
let v =
|
|
3797
|
+
let v = $t(g.image);
|
|
3797
3798
|
const y = As(d);
|
|
3798
3799
|
if (!v) {
|
|
3799
3800
|
const f = Ss(y);
|
|
3800
|
-
f && (v =
|
|
3801
|
+
f && (v = $t(f));
|
|
3801
3802
|
}
|
|
3802
3803
|
return await t(
|
|
3803
3804
|
new File([y], h, {
|
|
@@ -3827,7 +3828,7 @@ const rs = (o) => {
|
|
|
3827
3828
|
emf: "image/emf",
|
|
3828
3829
|
wmf: "image/wmf"
|
|
3829
3830
|
};
|
|
3830
|
-
function
|
|
3831
|
+
function $t(o) {
|
|
3831
3832
|
const e = o.split("."), t = e[e.length - 1].toLowerCase();
|
|
3832
3833
|
return t in zt ? zt[t] : null;
|
|
3833
3834
|
}
|
|
@@ -3868,42 +3869,27 @@ function Ss(o) {
|
|
|
3868
3869
|
}
|
|
3869
3870
|
}
|
|
3870
3871
|
const Ms = (o) => {
|
|
3871
|
-
const e = V(!1);
|
|
3872
|
-
function t() {
|
|
3873
|
-
e.value = !e.value;
|
|
3874
|
-
}
|
|
3875
|
-
return Object.assign(o, {
|
|
3876
|
-
preferencesVisible: e
|
|
3877
|
-
}), {
|
|
3878
|
-
name: "mce:preferences",
|
|
3879
|
-
commands: [
|
|
3880
|
-
{ command: "preferences", handle: t }
|
|
3881
|
-
],
|
|
3882
|
-
hotkeys: [
|
|
3883
|
-
{ command: "preferences", key: "CmdOrCtrl+,", editable: !1, system: !0 }
|
|
3884
|
-
]
|
|
3885
|
-
};
|
|
3886
|
-
}, zs = (o) => {
|
|
3887
3872
|
const {
|
|
3888
|
-
to: e
|
|
3873
|
+
to: e,
|
|
3874
|
+
root: t
|
|
3889
3875
|
} = o;
|
|
3890
3876
|
return {
|
|
3891
3877
|
name: "mce:saveAs",
|
|
3892
3878
|
commands: [
|
|
3893
|
-
{ command: "saveAs", handle: async (
|
|
3879
|
+
{ command: "saveAs", handle: async (s, a = {}) => {
|
|
3894
3880
|
const {
|
|
3895
|
-
filename:
|
|
3896
|
-
...
|
|
3897
|
-
} =
|
|
3898
|
-
let
|
|
3881
|
+
filename: r = t.value?.meta.name ?? "download",
|
|
3882
|
+
...i
|
|
3883
|
+
} = a;
|
|
3884
|
+
let l = await e(s, {
|
|
3899
3885
|
selected: !0,
|
|
3900
|
-
...
|
|
3886
|
+
...i
|
|
3901
3887
|
});
|
|
3902
|
-
|
|
3888
|
+
l instanceof Blob || (l = new Blob([JSON.stringify(l)], { type: "application/json" })), Kt(l, `${r}.${s}`);
|
|
3903
3889
|
} }
|
|
3904
3890
|
]
|
|
3905
3891
|
};
|
|
3906
|
-
},
|
|
3892
|
+
}, zs = (o) => {
|
|
3907
3893
|
const {
|
|
3908
3894
|
selection: e,
|
|
3909
3895
|
root: t
|
|
@@ -3915,22 +3901,22 @@ const Ms = (o) => {
|
|
|
3915
3901
|
e.value = [];
|
|
3916
3902
|
}
|
|
3917
3903
|
function a() {
|
|
3918
|
-
const
|
|
3919
|
-
|
|
3904
|
+
const l = e.value[0]?.parent;
|
|
3905
|
+
l instanceof G && (e.value = [l]);
|
|
3920
3906
|
}
|
|
3921
3907
|
function r() {
|
|
3922
|
-
const
|
|
3923
|
-
if (!
|
|
3908
|
+
const l = e.value[0];
|
|
3909
|
+
if (!l)
|
|
3924
3910
|
return;
|
|
3925
|
-
const
|
|
3926
|
-
|
|
3911
|
+
const c = l.previousSibling;
|
|
3912
|
+
c instanceof G && !l.equal(c) && (e.value = [c]);
|
|
3927
3913
|
}
|
|
3928
3914
|
function i() {
|
|
3929
|
-
const
|
|
3930
|
-
if (!
|
|
3915
|
+
const l = e.value[0];
|
|
3916
|
+
if (!l)
|
|
3931
3917
|
return;
|
|
3932
|
-
const
|
|
3933
|
-
|
|
3918
|
+
const c = l.nextSibling;
|
|
3919
|
+
c instanceof G && !l.equal(c) && (e.value = [c]);
|
|
3934
3920
|
}
|
|
3935
3921
|
return {
|
|
3936
3922
|
name: "mce:select",
|
|
@@ -3955,18 +3941,18 @@ const Ms = (o) => {
|
|
|
3955
3941
|
t,
|
|
3956
3942
|
exec: n,
|
|
3957
3943
|
addElement: s
|
|
3958
|
-
} = o, a = (
|
|
3959
|
-
const { style: u, ...d } =
|
|
3960
|
-
return s(ut(
|
|
3944
|
+
} = o, a = (l = t("clickEditText"), c = {}) => {
|
|
3945
|
+
const { style: u, ...d } = c;
|
|
3946
|
+
return s(ut(l, u), {
|
|
3961
3947
|
sizeToFit: !0,
|
|
3962
3948
|
positionToFit: !0,
|
|
3963
3949
|
...d
|
|
3964
3950
|
});
|
|
3965
|
-
}, r = (
|
|
3951
|
+
}, r = (l, c) => {
|
|
3966
3952
|
e("drawing", {
|
|
3967
3953
|
content: "text",
|
|
3968
3954
|
callback: (u) => {
|
|
3969
|
-
n("insertText",
|
|
3955
|
+
n("insertText", l, { ...c, position: u });
|
|
3970
3956
|
}
|
|
3971
3957
|
});
|
|
3972
3958
|
}, i = /\.txt$/i;
|
|
@@ -3980,12 +3966,12 @@ const Ms = (o) => {
|
|
|
3980
3966
|
{
|
|
3981
3967
|
name: "txt",
|
|
3982
3968
|
accept: ".txt",
|
|
3983
|
-
test: (
|
|
3984
|
-
load: async (
|
|
3969
|
+
test: (l) => !!(l instanceof Blob && l.type.startsWith("text/plain") || l instanceof File && i.test(l.name)),
|
|
3970
|
+
load: async (l) => ut(await l.text())
|
|
3985
3971
|
}
|
|
3986
3972
|
]
|
|
3987
3973
|
};
|
|
3988
|
-
},
|
|
3974
|
+
}, Os = (o) => {
|
|
3989
3975
|
const {
|
|
3990
3976
|
selection: e,
|
|
3991
3977
|
getAabbInDrawboard: t,
|
|
@@ -4001,7 +3987,7 @@ const Ms = (o) => {
|
|
|
4001
3987
|
);
|
|
4002
3988
|
}
|
|
4003
3989
|
};
|
|
4004
|
-
},
|
|
3990
|
+
}, Is = () => {
|
|
4005
3991
|
async function o(e) {
|
|
4006
3992
|
try {
|
|
4007
3993
|
const n = (await fetch(e, { method: "HEAD" })).headers.get("Content-Type");
|
|
@@ -4024,7 +4010,7 @@ const Ms = (o) => {
|
|
|
4024
4010
|
}
|
|
4025
4011
|
]
|
|
4026
4012
|
};
|
|
4027
|
-
},
|
|
4013
|
+
}, Fs = (o) => {
|
|
4028
4014
|
const {
|
|
4029
4015
|
config: e
|
|
4030
4016
|
} = o;
|
|
@@ -4038,7 +4024,7 @@ const Ms = (o) => {
|
|
|
4038
4024
|
{ command: "view:ruler", key: "Shift+R" }
|
|
4039
4025
|
]
|
|
4040
4026
|
};
|
|
4041
|
-
},
|
|
4027
|
+
}, Ps = (o) => {
|
|
4042
4028
|
const {
|
|
4043
4029
|
selection: e
|
|
4044
4030
|
} = o;
|
|
@@ -4068,7 +4054,7 @@ const Ms = (o) => {
|
|
|
4068
4054
|
{ command: "hide/show", key: "Shift+CmdOrCtrl+h" }
|
|
4069
4055
|
]
|
|
4070
4056
|
};
|
|
4071
|
-
},
|
|
4057
|
+
}, Ot = { left: 0, top: 0, bottom: 0, right: 0 }, Ns = (o) => {
|
|
4072
4058
|
const {
|
|
4073
4059
|
camera: e,
|
|
4074
4060
|
drawboardAabb: t,
|
|
@@ -4078,11 +4064,11 @@ const Ms = (o) => {
|
|
|
4078
4064
|
registerConfig: r,
|
|
4079
4065
|
selection: i
|
|
4080
4066
|
} = o;
|
|
4081
|
-
r("zoomToFitOffset", {
|
|
4082
|
-
function
|
|
4067
|
+
r("zoomToFitOffset", { ...Ot });
|
|
4068
|
+
function l() {
|
|
4083
4069
|
e.value.addZoom(0.25);
|
|
4084
4070
|
}
|
|
4085
|
-
function
|
|
4071
|
+
function c() {
|
|
4086
4072
|
e.value.addZoom(-0.25);
|
|
4087
4073
|
}
|
|
4088
4074
|
function u() {
|
|
@@ -4090,7 +4076,7 @@ const Ms = (o) => {
|
|
|
4090
4076
|
}
|
|
4091
4077
|
function d(y, f = !1) {
|
|
4092
4078
|
const p = f ? a.value : n.value, _ = {
|
|
4093
|
-
|
|
4079
|
+
...Ot,
|
|
4094
4080
|
...s.value.zoomToFitOffset
|
|
4095
4081
|
};
|
|
4096
4082
|
s.value.scrollbar && (_.right += 8, _.bottom += 8), s.value.ruler && (_.left += 16, _.top += 16);
|
|
@@ -4120,8 +4106,8 @@ const Ms = (o) => {
|
|
|
4120
4106
|
return {
|
|
4121
4107
|
name: "mce:zoom",
|
|
4122
4108
|
commands: [
|
|
4123
|
-
{ command: "zoomIn", handle:
|
|
4124
|
-
{ command: "zoomOut", handle:
|
|
4109
|
+
{ command: "zoomIn", handle: l },
|
|
4110
|
+
{ command: "zoomOut", handle: c },
|
|
4125
4111
|
{ command: "zoomTo100", handle: u },
|
|
4126
4112
|
{ command: "zoomToFit", handle: g },
|
|
4127
4113
|
{ command: "zoomToCover", handle: h },
|
|
@@ -4151,7 +4137,7 @@ const Ms = (o) => {
|
|
|
4151
4137
|
});
|
|
4152
4138
|
}
|
|
4153
4139
|
};
|
|
4154
|
-
},
|
|
4140
|
+
}, Rs = [
|
|
4155
4141
|
rs,
|
|
4156
4142
|
ls,
|
|
4157
4143
|
cs,
|
|
@@ -4174,13 +4160,12 @@ const Ms = (o) => {
|
|
|
4174
4160
|
Ts,
|
|
4175
4161
|
Ms,
|
|
4176
4162
|
zs,
|
|
4177
|
-
Os,
|
|
4178
4163
|
$s,
|
|
4164
|
+
Os,
|
|
4179
4165
|
Is,
|
|
4180
4166
|
Fs,
|
|
4181
4167
|
Ps,
|
|
4182
|
-
Ns
|
|
4183
|
-
Rs
|
|
4168
|
+
Ns
|
|
4184
4169
|
];
|
|
4185
4170
|
class Le extends Wt {
|
|
4186
4171
|
static injectionKey = Symbol.for("EditorKey");
|
|
@@ -4208,7 +4193,7 @@ class Le extends Wt {
|
|
|
4208
4193
|
os,
|
|
4209
4194
|
e
|
|
4210
4195
|
), this.use([
|
|
4211
|
-
...
|
|
4196
|
+
...Rs,
|
|
4212
4197
|
...n
|
|
4213
4198
|
], e);
|
|
4214
4199
|
}
|
|
@@ -4234,11 +4219,11 @@ class Le extends Wt {
|
|
|
4234
4219
|
const {
|
|
4235
4220
|
commands: r = [],
|
|
4236
4221
|
hotkeys: i = [],
|
|
4237
|
-
loaders:
|
|
4238
|
-
exporters:
|
|
4222
|
+
loaders: l = [],
|
|
4223
|
+
exporters: c = [],
|
|
4239
4224
|
events: u
|
|
4240
4225
|
} = a;
|
|
4241
|
-
if (this.registerCommand(r), this.registerHotkey(i), this.registerLoader(
|
|
4226
|
+
if (this.registerCommand(r), this.registerHotkey(i), this.registerLoader(l), this.registerExporter(c), u)
|
|
4242
4227
|
for (const d in u)
|
|
4243
4228
|
this.on(d, u[d]);
|
|
4244
4229
|
};
|
|
@@ -4273,16 +4258,16 @@ class Le extends Wt {
|
|
|
4273
4258
|
e.provide(Le.injectionKey, this);
|
|
4274
4259
|
};
|
|
4275
4260
|
}
|
|
4276
|
-
function
|
|
4261
|
+
function tr(o) {
|
|
4277
4262
|
return o;
|
|
4278
4263
|
}
|
|
4279
|
-
function
|
|
4264
|
+
function nr(o) {
|
|
4280
4265
|
return o;
|
|
4281
4266
|
}
|
|
4282
4267
|
function de() {
|
|
4283
4268
|
return Se(Le.injectionKey);
|
|
4284
4269
|
}
|
|
4285
|
-
function
|
|
4270
|
+
function Bs(o = new Le()) {
|
|
4286
4271
|
return De(Le.injectionKey, o), o;
|
|
4287
4272
|
}
|
|
4288
4273
|
function _t() {
|
|
@@ -4301,7 +4286,7 @@ const dn = X({
|
|
|
4301
4286
|
inheritAttrs: !1,
|
|
4302
4287
|
props: _t(),
|
|
4303
4288
|
setup(o, { attrs: e }) {
|
|
4304
|
-
return () => H(o.tag,
|
|
4289
|
+
return () => H(o.tag, $e(e, { style: null }), {
|
|
4305
4290
|
default: () => [
|
|
4306
4291
|
F("svg", {
|
|
4307
4292
|
class: "mce-icon__svg",
|
|
@@ -4333,12 +4318,12 @@ const dn = X({
|
|
|
4333
4318
|
});
|
|
4334
4319
|
}
|
|
4335
4320
|
});
|
|
4336
|
-
function
|
|
4321
|
+
function Ls(o) {
|
|
4337
4322
|
const e = Se(mn);
|
|
4338
4323
|
if (!e)
|
|
4339
4324
|
throw new Error("Missing Mce Icons provide!");
|
|
4340
4325
|
return {
|
|
4341
|
-
iconData:
|
|
4326
|
+
iconData: $(() => {
|
|
4342
4327
|
const n = yn(o);
|
|
4343
4328
|
if (!n)
|
|
4344
4329
|
return {
|
|
@@ -4355,7 +4340,7 @@ function Ds(o) {
|
|
|
4355
4340
|
component: It,
|
|
4356
4341
|
icon: s
|
|
4357
4342
|
};
|
|
4358
|
-
const a = Object.keys(e.sets).find((
|
|
4343
|
+
const a = Object.keys(e.sets).find((l) => typeof s == "string" && s.startsWith(`${l}:`)), r = a ? s.slice(a.length + 1) : s;
|
|
4359
4344
|
return {
|
|
4360
4345
|
component: e.sets[a ?? e.defaultSet].component,
|
|
4361
4346
|
icon: r
|
|
@@ -4363,7 +4348,7 @@ function Ds(o) {
|
|
|
4363
4348
|
})
|
|
4364
4349
|
};
|
|
4365
4350
|
}
|
|
4366
|
-
const
|
|
4351
|
+
const Ds = {
|
|
4367
4352
|
play: "M8 5.14v14l11-7z",
|
|
4368
4353
|
pause: "M14 19h4V5h-4M6 19h4V5H6z",
|
|
4369
4354
|
gps: "M12 8a4 4 0 0 1 4 4a4 4 0 0 1-4 4a4 4 0 0 1-4-4a4 4 0 0 1 4-4m-8.95 5H1v-2h2.05C3.5 6.83 6.83 3.5 11 3.05V1h2v2.05c4.17.45 7.5 3.78 7.95 7.95H23v2h-2.05c-.45 4.17-3.78 7.5-7.95 7.95V23h-2v-2.05C6.83 20.5 3.5 17.17 3.05 13M12 5a7 7 0 0 0-7 7a7 7 0 0 0 7 7a7 7 0 0 0 7-7a7 7 0 0 0-7-7",
|
|
@@ -4371,15 +4356,15 @@ const Vs = {
|
|
|
4371
4356
|
mouseLeftClick: "M13 9V1.07A8.01 8.01 0 0 1 19.75 7c.16.64.25 1.31.25 2zm4.66-2c-.48-1.35-1.43-2.5-2.66-3.19V7zM6 15v-2h12v2c0 1.59-.63 3.12-1.76 4.24A5.97 5.97 0 0 1 12 21a5.97 5.97 0 0 1-4.24-1.76A5.97 5.97 0 0 1 6 15m-2 0c0 2.12.84 4.16 2.34 5.66S9.88 23 12 23s4.16-.84 5.66-2.34S20 17.12 20 15v-4H4zm7-6V1.07C7.06 1.56 4 4.92 4 9z",
|
|
4372
4357
|
mouseRightClick: "M13 9V1.07c3.94.49 7 3.85 7 7.93zm-2 0V1.07A8.01 8.01 0 0 0 4.25 7C4.09 7.64 4 8.31 4 9zM6.34 7C6.82 5.65 7.78 4.5 9 3.81V7zM6 15v-2h12v2c0 1.59-.63 3.12-1.76 4.24A5.97 5.97 0 0 1 12 21a5.97 5.97 0 0 1-4.24-1.76A5.97 5.97 0 0 1 6 15m-2 0c0 2.12.84 4.16 2.34 5.66S9.88 23 12 23s4.16-.84 5.66-2.34S20 17.12 20 15v-4H4z",
|
|
4373
4358
|
check: "M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59z"
|
|
4374
|
-
},
|
|
4359
|
+
}, Vs = {
|
|
4375
4360
|
component: dn
|
|
4376
4361
|
}, mn = Symbol.for("mce:icons");
|
|
4377
|
-
function
|
|
4362
|
+
function js(o = {}) {
|
|
4378
4363
|
return Jt({
|
|
4379
4364
|
defaultSet: "svg",
|
|
4380
|
-
aliases:
|
|
4365
|
+
aliases: Ds,
|
|
4381
4366
|
sets: {
|
|
4382
|
-
svg:
|
|
4367
|
+
svg: Vs
|
|
4383
4368
|
}
|
|
4384
4369
|
}, o);
|
|
4385
4370
|
}
|
|
@@ -4392,9 +4377,9 @@ const ht = Symbol.for("MceOverlaySymbol"), qe = tn({
|
|
|
4392
4377
|
default: void 0
|
|
4393
4378
|
}
|
|
4394
4379
|
}, "makeMceOverlayProps");
|
|
4395
|
-
let
|
|
4396
|
-
function
|
|
4397
|
-
return
|
|
4380
|
+
let Us;
|
|
4381
|
+
function Xs() {
|
|
4382
|
+
return Us ??= hn();
|
|
4398
4383
|
}
|
|
4399
4384
|
function hn(o = {}) {
|
|
4400
4385
|
const e = V([]);
|
|
@@ -4402,19 +4387,19 @@ function hn(o = {}) {
|
|
|
4402
4387
|
register: (t) => {
|
|
4403
4388
|
const n = e.value.push(t);
|
|
4404
4389
|
return {
|
|
4405
|
-
index:
|
|
4390
|
+
index: $(() => n),
|
|
4406
4391
|
attach: o.attach
|
|
4407
4392
|
};
|
|
4408
4393
|
},
|
|
4409
4394
|
unregister: (t) => e.value.splice(e.value.indexOf(t), 1)
|
|
4410
4395
|
};
|
|
4411
4396
|
}
|
|
4412
|
-
function
|
|
4397
|
+
function Hs(o = {}) {
|
|
4413
4398
|
let e = Se(ht, null);
|
|
4414
4399
|
return e || (e = hn(o), De(ht, e)), e;
|
|
4415
4400
|
}
|
|
4416
|
-
function
|
|
4417
|
-
const o = Se(ht,
|
|
4401
|
+
function Ys() {
|
|
4402
|
+
const o = Se(ht, Xs()), e = Qe();
|
|
4418
4403
|
if (!e)
|
|
4419
4404
|
throw new Error("Failed to useOverlayRoot, vm is null");
|
|
4420
4405
|
const t = o.register(e.uid);
|
|
@@ -4422,36 +4407,36 @@ function qs() {
|
|
|
4422
4407
|
o.unregister(e.uid);
|
|
4423
4408
|
}), t;
|
|
4424
4409
|
}
|
|
4425
|
-
const
|
|
4410
|
+
const qs = tn({
|
|
4426
4411
|
resizeStrategy: Function,
|
|
4427
4412
|
activeStrategy: Function,
|
|
4428
4413
|
hoverStrategy: Function
|
|
4429
|
-
}, "makeMceStrategyProps"),
|
|
4414
|
+
}, "makeMceStrategyProps"), Gs = (o) => {
|
|
4430
4415
|
switch (o.meta?.inPptIs) {
|
|
4431
4416
|
case "Picture":
|
|
4432
4417
|
return "diagonalAspectRatio";
|
|
4433
4418
|
}
|
|
4434
4419
|
return o.foreground.isValid() ? "diagonalAspectRatio" : "free";
|
|
4435
|
-
},
|
|
4420
|
+
}, Ws = (o) => {
|
|
4436
4421
|
const { element: e, oldElement: t, isExcluded: n } = o;
|
|
4437
4422
|
if (e && !n(e))
|
|
4438
4423
|
return e.equal(t) && e.text.isValid() ? {
|
|
4439
4424
|
element: e,
|
|
4440
4425
|
state: "typing"
|
|
4441
4426
|
} : e;
|
|
4442
|
-
},
|
|
4427
|
+
}, Ks = (o) => {
|
|
4443
4428
|
const { element: e, isExcluded: t, oldElement: n } = o;
|
|
4444
4429
|
if (e && !t(e))
|
|
4445
4430
|
return e.equal(n) ? {
|
|
4446
4431
|
element: e,
|
|
4447
4432
|
cursor: "move"
|
|
4448
4433
|
} : e;
|
|
4449
|
-
},
|
|
4434
|
+
}, Js = { class: "mce-auxiliary" }, Zs = /* @__PURE__ */ X({
|
|
4450
4435
|
__name: "Auxiliary",
|
|
4451
4436
|
setup(o) {
|
|
4452
4437
|
const { auxiliaryLines: e } = de();
|
|
4453
|
-
return (t, n) => (
|
|
4454
|
-
(
|
|
4438
|
+
return (t, n) => (O(), R("div", Js, [
|
|
4439
|
+
(O(!0), R(se, null, _e(S(e), (s, a) => (O(), R("div", {
|
|
4455
4440
|
key: a,
|
|
4456
4441
|
class: be(s.class),
|
|
4457
4442
|
style: q({
|
|
@@ -4464,7 +4449,7 @@ const Gs = tn({
|
|
|
4464
4449
|
]));
|
|
4465
4450
|
}
|
|
4466
4451
|
});
|
|
4467
|
-
function
|
|
4452
|
+
function Qs(o, e = "content") {
|
|
4468
4453
|
const t = yo(), n = V();
|
|
4469
4454
|
if (bt) {
|
|
4470
4455
|
const s = new ResizeObserver((a) => {
|
|
@@ -4484,7 +4469,7 @@ function ea(o, e = "content") {
|
|
|
4484
4469
|
};
|
|
4485
4470
|
}
|
|
4486
4471
|
const Je = Symbol.for("mce:layout"), fn = Symbol.for("mce:layout-item"), Ft = 1e3;
|
|
4487
|
-
function
|
|
4472
|
+
function ea() {
|
|
4488
4473
|
return {
|
|
4489
4474
|
overlaps: {
|
|
4490
4475
|
type: Array,
|
|
@@ -4493,7 +4478,7 @@ function ta() {
|
|
|
4493
4478
|
fullHeight: Boolean
|
|
4494
4479
|
};
|
|
4495
4480
|
}
|
|
4496
|
-
function
|
|
4481
|
+
function ta() {
|
|
4497
4482
|
return {
|
|
4498
4483
|
name: {
|
|
4499
4484
|
type: String
|
|
@@ -4505,7 +4490,7 @@ function na() {
|
|
|
4505
4490
|
absolute: Boolean
|
|
4506
4491
|
};
|
|
4507
4492
|
}
|
|
4508
|
-
function
|
|
4493
|
+
function na() {
|
|
4509
4494
|
const o = Se(Je);
|
|
4510
4495
|
if (!o)
|
|
4511
4496
|
throw new Error("[mce] Could not find injected layout");
|
|
@@ -4515,7 +4500,7 @@ function oa() {
|
|
|
4515
4500
|
mainStyles: o.mainStyles
|
|
4516
4501
|
};
|
|
4517
4502
|
}
|
|
4518
|
-
function
|
|
4503
|
+
function oa(o) {
|
|
4519
4504
|
const e = Se(Je);
|
|
4520
4505
|
if (!e)
|
|
4521
4506
|
throw new Error("[mce] Could not find injected layout");
|
|
@@ -4528,21 +4513,21 @@ function sa(o) {
|
|
|
4528
4513
|
layoutItemScrimStyles: r
|
|
4529
4514
|
} = e.register(n, {
|
|
4530
4515
|
...o,
|
|
4531
|
-
active:
|
|
4516
|
+
active: $(() => s.value ? !1 : o.active.value),
|
|
4532
4517
|
id: t
|
|
4533
4518
|
});
|
|
4534
4519
|
return we(() => e.unregister(t)), { layoutItemStyles: a, layoutRect: e.layoutRect, layoutItemScrimStyles: r };
|
|
4535
4520
|
}
|
|
4536
|
-
function
|
|
4521
|
+
function sa(o, e, t, n) {
|
|
4537
4522
|
let s = { top: 0, left: 0, right: 0, bottom: 0 };
|
|
4538
4523
|
const a = [{ id: "", layer: { ...s } }];
|
|
4539
4524
|
for (const r of o) {
|
|
4540
|
-
const i = e.get(r),
|
|
4541
|
-
if (!i || !
|
|
4525
|
+
const i = e.get(r), l = t.get(r), c = n.get(r);
|
|
4526
|
+
if (!i || !l || !c)
|
|
4542
4527
|
continue;
|
|
4543
4528
|
const u = {
|
|
4544
4529
|
...s,
|
|
4545
|
-
[i.value]: Number.parseInt(String(s[i.value]), 10) + (
|
|
4530
|
+
[i.value]: Number.parseInt(String(s[i.value]), 10) + (c.value ? Number.parseInt(String(l.value), 10) : 0)
|
|
4546
4531
|
};
|
|
4547
4532
|
a.push({
|
|
4548
4533
|
id: r,
|
|
@@ -4551,8 +4536,8 @@ function aa(o, e, t, n) {
|
|
|
4551
4536
|
}
|
|
4552
4537
|
return a;
|
|
4553
4538
|
}
|
|
4554
|
-
function
|
|
4555
|
-
const e = Se(Je, null), t =
|
|
4539
|
+
function aa(o) {
|
|
4540
|
+
const e = Se(Je, null), t = $(() => e ? e.rootZIndex.value - 100 : Ft), n = V([]), s = Ee(/* @__PURE__ */ new Map()), a = Ee(/* @__PURE__ */ new Map()), r = Ee(/* @__PURE__ */ new Map()), i = Ee(/* @__PURE__ */ new Map()), l = Ee(/* @__PURE__ */ new Map()), { resizeRef: c, contentRect: u } = Qs(), d = $(() => {
|
|
4556
4541
|
const C = /* @__PURE__ */ new Map(), m = o.overlaps ?? [];
|
|
4557
4542
|
for (const b of m.filter((k) => k.includes(":"))) {
|
|
4558
4543
|
const [k, x] = b.split(":");
|
|
@@ -4562,20 +4547,20 @@ function ia(o) {
|
|
|
4562
4547
|
!w || !T || !M || !P || (C.set(x, { position: w.value, amount: Number.parseInt(String(M.value), 10) }), C.set(k, { position: T.value, amount: -Number.parseInt(String(P.value), 10) }));
|
|
4563
4548
|
}
|
|
4564
4549
|
return C;
|
|
4565
|
-
}), g =
|
|
4550
|
+
}), g = $(() => {
|
|
4566
4551
|
const C = [...new Set([...r.values()].map((b) => b.value))].sort((b, k) => b - k), m = [];
|
|
4567
4552
|
for (const b of C) {
|
|
4568
4553
|
const k = n.value.filter((x) => r.get(x)?.value === b);
|
|
4569
4554
|
m.push(...k);
|
|
4570
4555
|
}
|
|
4571
|
-
return
|
|
4572
|
-
}), h =
|
|
4556
|
+
return sa(m, s, a, i);
|
|
4557
|
+
}), h = $(() => !Array.from(l.values()).some((C) => C.value)), v = $(() => g.value[g.value.length - 1].layer), y = Te(() => ({
|
|
4573
4558
|
"--mce-layout-left": Ge(v.value.left),
|
|
4574
4559
|
"--mce-layout-right": Ge(v.value.right),
|
|
4575
4560
|
"--mce-layout-top": Ge(v.value.top),
|
|
4576
4561
|
"--mce-layout-bottom": Ge(v.value.bottom),
|
|
4577
4562
|
...h.value ? void 0 : { transition: "none" }
|
|
4578
|
-
})), f =
|
|
4563
|
+
})), f = $(() => g.value.slice(1).map(({ id: C }, m) => {
|
|
4579
4564
|
const { layer: b } = g.value[m], k = a.get(C), x = s.get(C);
|
|
4580
4565
|
return {
|
|
4581
4566
|
id: C,
|
|
@@ -4597,10 +4582,10 @@ function ia(o) {
|
|
|
4597
4582
|
disableTransitions: M,
|
|
4598
4583
|
absolute: P
|
|
4599
4584
|
}) => {
|
|
4600
|
-
r.set(m, b), s.set(m, k), a.set(m, x), i.set(m, T), M &&
|
|
4585
|
+
r.set(m, b), s.set(m, k), a.set(m, x), i.set(m, T), M && l.set(m, M);
|
|
4601
4586
|
const A = je(fn, _?.vnode).indexOf(C);
|
|
4602
4587
|
A > -1 ? n.value.splice(A, 0, m) : n.value.push(m);
|
|
4603
|
-
const N =
|
|
4588
|
+
const N = $(() => f.value.findIndex((U) => U.id === m)), L = $(() => t.value + g.value.length * 2 - N.value * 2), j = $(() => {
|
|
4604
4589
|
const U = k.value === "left" || k.value === "right", W = k.value === "right", Z = k.value === "bottom", he = w.value ?? x.value, Y = he === 0 ? "%" : "px", xe = {
|
|
4605
4590
|
[k.value]: 0,
|
|
4606
4591
|
zIndex: L.value,
|
|
@@ -4622,13 +4607,13 @@ function ia(o) {
|
|
|
4622
4607
|
bottom: k.value !== "top" ? `${ae.bottom}px` : void 0,
|
|
4623
4608
|
width: U ? w.value ? `${w.value}px` : void 0 : `calc(100% - ${ae.left}px - ${ae.right}px)`
|
|
4624
4609
|
};
|
|
4625
|
-
}), D =
|
|
4610
|
+
}), D = $(() => ({
|
|
4626
4611
|
zIndex: L.value - 1
|
|
4627
4612
|
}));
|
|
4628
4613
|
return { layoutItemStyles: j, layoutItemScrimStyles: D, zIndex: L };
|
|
4629
4614
|
},
|
|
4630
4615
|
unregister: (C) => {
|
|
4631
|
-
r.delete(C), s.delete(C), a.delete(C), i.delete(C),
|
|
4616
|
+
r.delete(C), s.delete(C), a.delete(C), i.delete(C), l.delete(C), n.value = n.value.filter((m) => m !== C);
|
|
4632
4617
|
},
|
|
4633
4618
|
mainRect: v,
|
|
4634
4619
|
mainStyles: y,
|
|
@@ -4651,7 +4636,7 @@ function ia(o) {
|
|
|
4651
4636
|
getLayoutItem: p,
|
|
4652
4637
|
items: f,
|
|
4653
4638
|
layoutRect: u,
|
|
4654
|
-
layoutRef:
|
|
4639
|
+
layoutRef: c
|
|
4655
4640
|
};
|
|
4656
4641
|
}
|
|
4657
4642
|
const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
@@ -4661,8 +4646,8 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
4661
4646
|
..._t()
|
|
4662
4647
|
},
|
|
4663
4648
|
setup(o) {
|
|
4664
|
-
const e = o, t = Vt(), { iconData: n } =
|
|
4665
|
-
return (a, r) => (
|
|
4649
|
+
const e = o, t = Vt(), { iconData: n } = Ls($(() => e.icon)), s = !!(t.onClick || t.onClickOnce);
|
|
4650
|
+
return (a, r) => (O(), oe(jt(S(n).component), {
|
|
4666
4651
|
icon: S(n).icon,
|
|
4667
4652
|
tag: e.tag,
|
|
4668
4653
|
class: be(["mce-icon", {
|
|
@@ -4685,10 +4670,10 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
4685
4670
|
},
|
|
4686
4671
|
emits: ["click:outside", "update:modelValue"],
|
|
4687
4672
|
setup(o, { expose: e, emit: t }) {
|
|
4688
|
-
const n = o, s = t, a =
|
|
4673
|
+
const n = o, s = t, a = Ys(), r = $({
|
|
4689
4674
|
get: () => n.modelValue,
|
|
4690
4675
|
set: (p) => s("update:modelValue", p)
|
|
4691
|
-
}), i = V(),
|
|
4676
|
+
}), i = V(), l = {
|
|
4692
4677
|
getBoundingClientRect() {
|
|
4693
4678
|
const { x: p = 0, y: _ = 0 } = n.target;
|
|
4694
4679
|
return {
|
|
@@ -4702,18 +4687,18 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
4702
4687
|
height: 0
|
|
4703
4688
|
};
|
|
4704
4689
|
}
|
|
4705
|
-
},
|
|
4706
|
-
placement:
|
|
4690
|
+
}, c = $(() => typeof n.target == "object" && !(n.target instanceof Element) && "x" in n.target && "y" in n.target ? l : n.target ?? i.value), u = ce("contentElTpl"), d = $(() => n.attach ?? a.attach?.value ?? "body"), { floatingStyles: g, update: h } = Gn(c, u, {
|
|
4691
|
+
placement: $(() => n.location),
|
|
4707
4692
|
whileElementsMounted: Zn,
|
|
4708
4693
|
middleware: [
|
|
4709
4694
|
Wn(() => n.offset ?? 0),
|
|
4710
4695
|
Kn(),
|
|
4711
4696
|
Jn({ padding: 20 })
|
|
4712
4697
|
]
|
|
4713
|
-
}), v =
|
|
4698
|
+
}), v = $(() => ({
|
|
4714
4699
|
...g.value,
|
|
4715
4700
|
zIndex: 2e3 + a.index.value
|
|
4716
|
-
})), y =
|
|
4701
|
+
})), y = $(() => ({
|
|
4717
4702
|
ref: (p) => i.value = p
|
|
4718
4703
|
}));
|
|
4719
4704
|
let f = [];
|
|
@@ -4731,19 +4716,19 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
4731
4716
|
];
|
|
4732
4717
|
}), we(() => f.forEach((p) => p())), e({
|
|
4733
4718
|
activatorEl: i,
|
|
4734
|
-
target:
|
|
4719
|
+
target: c,
|
|
4735
4720
|
contentEl: u,
|
|
4736
4721
|
updateLocation: h
|
|
4737
|
-
}), (p, _) => (
|
|
4722
|
+
}), (p, _) => (O(), R(se, null, [
|
|
4738
4723
|
Q(p.$slots, "activator", {
|
|
4739
4724
|
props: y.value,
|
|
4740
4725
|
isActive: r.value
|
|
4741
4726
|
}),
|
|
4742
|
-
(
|
|
4727
|
+
(O(), oe(_n, {
|
|
4743
4728
|
disabled: d.value === !1,
|
|
4744
4729
|
to: typeof d.value == "boolean" ? void 0 : d.value
|
|
4745
4730
|
}, [
|
|
4746
|
-
r.value ? (
|
|
4731
|
+
r.value ? (O(), R("div", $e({
|
|
4747
4732
|
key: 0,
|
|
4748
4733
|
ref: "contentElTpl",
|
|
4749
4734
|
class: "mce-overlay",
|
|
@@ -4754,13 +4739,13 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
4754
4739
|
], 8, ["disabled", "to"]))
|
|
4755
4740
|
], 64));
|
|
4756
4741
|
}
|
|
4757
|
-
}),
|
|
4742
|
+
}), ia = ["onMouseenter"], ra = ["onClick"], la = { class: "mce-list-item__prepend" }, ca = { class: "mce-list-item__title" }, ua = {
|
|
4758
4743
|
key: 0,
|
|
4759
4744
|
class: "mce-list-item__append"
|
|
4760
|
-
},
|
|
4745
|
+
}, da = /* @__PURE__ */ X({
|
|
4761
4746
|
name: "MceMenu",
|
|
4762
4747
|
__name: "Menu",
|
|
4763
|
-
props: /* @__PURE__ */
|
|
4748
|
+
props: /* @__PURE__ */ Oe({
|
|
4764
4749
|
...qe(),
|
|
4765
4750
|
items: Object,
|
|
4766
4751
|
openOnHover: Boolean,
|
|
@@ -4769,19 +4754,19 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
4769
4754
|
modelValue: { type: Boolean },
|
|
4770
4755
|
modelModifiers: {}
|
|
4771
4756
|
}),
|
|
4772
|
-
emits: /* @__PURE__ */
|
|
4757
|
+
emits: /* @__PURE__ */ Oe(["click:item"], ["update:modelValue"]),
|
|
4773
4758
|
setup(o, { expose: e, emit: t }) {
|
|
4774
|
-
const n = o, s = t, a = ke(o, "modelValue"), r = V(-1), i = ce("overlayTpl"),
|
|
4759
|
+
const n = o, s = t, a = ke(o, "modelValue"), r = V(-1), i = ce("overlayTpl"), l = ce("menuItemTplRefs"), c = Dt(), u = Se(Pt, null), d = Ze(/* @__PURE__ */ new Set());
|
|
4775
4760
|
De(Pt, {
|
|
4776
|
-
register: () => d.value.add(
|
|
4777
|
-
unregister: () => d.value.delete(
|
|
4761
|
+
register: () => d.value.add(c),
|
|
4762
|
+
unregister: () => d.value.delete(c),
|
|
4778
4763
|
closeParents(p) {
|
|
4779
4764
|
!d.value.size && !n.persistent && (p == null || i.value?.contentEl && !po(p, i.value.contentEl)) && (a.value = !1, u?.closeParents());
|
|
4780
4765
|
}
|
|
4781
4766
|
}), we(() => {
|
|
4782
4767
|
u?.unregister();
|
|
4783
4768
|
});
|
|
4784
|
-
const g =
|
|
4769
|
+
const g = $(() => {
|
|
4785
4770
|
const p = {};
|
|
4786
4771
|
return n.openOnHover && (p.onMouseenter = () => a.value = !0), p;
|
|
4787
4772
|
});
|
|
@@ -4802,7 +4787,7 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
4802
4787
|
updateLocation: v
|
|
4803
4788
|
}), (p, _) => {
|
|
4804
4789
|
const z = kn("MceMenu");
|
|
4805
|
-
return
|
|
4790
|
+
return O(), oe(ot, {
|
|
4806
4791
|
ref: "overlayTpl",
|
|
4807
4792
|
modelValue: a.value,
|
|
4808
4793
|
"onUpdate:modelValue": _[2] || (_[2] = (I) => a.value = I),
|
|
@@ -4814,23 +4799,23 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
4814
4799
|
"onClick:outside": h
|
|
4815
4800
|
}, {
|
|
4816
4801
|
activator: ne((I) => [
|
|
4817
|
-
Q(p.$slots, "activator",
|
|
4802
|
+
Q(p.$slots, "activator", $e(I, {
|
|
4818
4803
|
props: { ...I.props, ...g.value }
|
|
4819
4804
|
}))
|
|
4820
4805
|
]),
|
|
4821
4806
|
default: ne(() => [
|
|
4822
|
-
o.items?.length ? (
|
|
4807
|
+
o.items?.length ? (O(), R("div", {
|
|
4823
4808
|
key: 0,
|
|
4824
4809
|
class: "mce-list",
|
|
4825
4810
|
onMouseleave: f
|
|
4826
4811
|
}, [
|
|
4827
|
-
(
|
|
4828
|
-
I.type === "divider" ? (
|
|
4812
|
+
(O(!0), R(se, null, _e(o.items, (I, E) => (O(), R(se, { key: E }, [
|
|
4813
|
+
I.type === "divider" ? (O(), R("div", {
|
|
4829
4814
|
key: 0,
|
|
4830
4815
|
ref_for: !0,
|
|
4831
4816
|
ref: "menuItemTplRefs",
|
|
4832
4817
|
class: "mce-list__divider"
|
|
4833
|
-
}, null, 512)) : (
|
|
4818
|
+
}, null, 512)) : (O(), R("div", {
|
|
4834
4819
|
key: 1,
|
|
4835
4820
|
ref_for: !0,
|
|
4836
4821
|
ref: "menuItemTplRefs",
|
|
@@ -4844,30 +4829,30 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
4844
4829
|
]]),
|
|
4845
4830
|
onClick: (C) => y(I, E, C)
|
|
4846
4831
|
}, [
|
|
4847
|
-
F("div",
|
|
4848
|
-
I.checked ? (
|
|
4832
|
+
F("div", la, [
|
|
4833
|
+
I.checked ? (O(), oe(Ae, {
|
|
4849
4834
|
key: 0,
|
|
4850
4835
|
icon: "$check"
|
|
4851
4836
|
})) : ee("", !0)
|
|
4852
4837
|
]),
|
|
4853
|
-
F("div",
|
|
4838
|
+
F("div", ca, [
|
|
4854
4839
|
Q(p.$slots, "title", { item: I }, () => [
|
|
4855
4840
|
Cn(K(I.key), 1)
|
|
4856
4841
|
])
|
|
4857
4842
|
]),
|
|
4858
|
-
I.children?.length ? (
|
|
4843
|
+
I.children?.length ? (O(), R("div", ua, [
|
|
4859
4844
|
H(Ae, { icon: "$menuRight" })
|
|
4860
4845
|
])) : ee("", !0)
|
|
4861
|
-
], 10,
|
|
4862
|
-
], 40,
|
|
4846
|
+
], 10, ra)
|
|
4847
|
+
], 40, ia))
|
|
4863
4848
|
], 64))), 128)),
|
|
4864
|
-
r.value > -1 && o.items?.[r.value]?.children?.length ? (
|
|
4849
|
+
r.value > -1 && o.items?.[r.value]?.children?.length ? (O(), oe(z, {
|
|
4865
4850
|
key: 0,
|
|
4866
4851
|
"open-on-hover": "",
|
|
4867
4852
|
items: o.items?.[r.value]?.children,
|
|
4868
4853
|
location: "right",
|
|
4869
4854
|
"model-value": r.value > -1,
|
|
4870
|
-
target:
|
|
4855
|
+
target: l.value?.[r.value],
|
|
4871
4856
|
attach: !1,
|
|
4872
4857
|
offset: 16,
|
|
4873
4858
|
"onUpdate:modelValue": _[0] || (_[0] = (I) => r.value = -1),
|
|
@@ -4887,10 +4872,10 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
4887
4872
|
}, 8, ["modelValue", "location", "offset", "target", "attach"]);
|
|
4888
4873
|
};
|
|
4889
4874
|
}
|
|
4890
|
-
}),
|
|
4875
|
+
}), ma = { class: "mce-context-menu__title" }, ha = {
|
|
4891
4876
|
key: 0,
|
|
4892
4877
|
class: "mce-context-menu__kbd"
|
|
4893
|
-
},
|
|
4878
|
+
}, fa = /* @__PURE__ */ X({
|
|
4894
4879
|
__name: "ContextMenu",
|
|
4895
4880
|
props: {
|
|
4896
4881
|
modelValue: { type: Boolean },
|
|
@@ -4909,13 +4894,13 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
4909
4894
|
exec: a,
|
|
4910
4895
|
getKbd: r,
|
|
4911
4896
|
t: i,
|
|
4912
|
-
hotkeys:
|
|
4913
|
-
} = de(),
|
|
4897
|
+
hotkeys: l
|
|
4898
|
+
} = de(), c = ke(o, "modelValue"), u = ke(o, "position"), d = ce("menuTplRef");
|
|
4914
4899
|
function g() {
|
|
4915
4900
|
d.value?.updateLocation();
|
|
4916
4901
|
}
|
|
4917
4902
|
function h(y) {
|
|
4918
|
-
y.preventDefault(),
|
|
4903
|
+
y.preventDefault(), c.value = !0, u.value = {
|
|
4919
4904
|
x: y.clientX,
|
|
4920
4905
|
y: y.clientY
|
|
4921
4906
|
}, g();
|
|
@@ -4930,10 +4915,10 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
4930
4915
|
}
|
|
4931
4916
|
return e({
|
|
4932
4917
|
updateLocation: g
|
|
4933
|
-
}), (y, f) => (
|
|
4918
|
+
}), (y, f) => (O(), oe(da, {
|
|
4934
4919
|
ref: "menuTplRef",
|
|
4935
|
-
modelValue:
|
|
4936
|
-
"onUpdate:modelValue": f[0] || (f[0] = (p) =>
|
|
4920
|
+
modelValue: c.value,
|
|
4921
|
+
"onUpdate:modelValue": f[0] || (f[0] = (p) => c.value = p),
|
|
4937
4922
|
offset: 10,
|
|
4938
4923
|
class: "mce-context-menu",
|
|
4939
4924
|
target: u.value,
|
|
@@ -4945,16 +4930,16 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
4945
4930
|
"onClick:item": v
|
|
4946
4931
|
}, {
|
|
4947
4932
|
title: ne(({ item: p }) => [
|
|
4948
|
-
F("span",
|
|
4949
|
-
S(
|
|
4933
|
+
F("span", ma, K(S(i)(p.key)), 1),
|
|
4934
|
+
S(l).has(p.key) ? (O(), R("span", ha, K(S(r)(p.key)), 1)) : ee("", !0)
|
|
4950
4935
|
]),
|
|
4951
4936
|
_: 1
|
|
4952
4937
|
}, 8, ["modelValue", "target", "items", "style"]));
|
|
4953
4938
|
}
|
|
4954
|
-
}),
|
|
4939
|
+
}), pa = {
|
|
4955
4940
|
key: 0,
|
|
4956
4941
|
class: "mce-drawing__content"
|
|
4957
|
-
},
|
|
4942
|
+
}, va = /* @__PURE__ */ X({
|
|
4958
4943
|
__name: "Drawing",
|
|
4959
4944
|
setup(o) {
|
|
4960
4945
|
const {
|
|
@@ -4964,27 +4949,27 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
4964
4949
|
camera: s,
|
|
4965
4950
|
drawboardAabb: a,
|
|
4966
4951
|
setCursor: r
|
|
4967
|
-
} = de(), { x: i, y:
|
|
4968
|
-
function
|
|
4952
|
+
} = de(), { x: i, y: l } = zn();
|
|
4953
|
+
function c(u) {
|
|
4969
4954
|
const d = s.value.toGlobal({
|
|
4970
4955
|
x: u.clientX - a.value.left,
|
|
4971
4956
|
y: u.clientY - a.value.top
|
|
4972
4957
|
});
|
|
4973
4958
|
t.value?.callback?.(d), r(void 0);
|
|
4974
4959
|
}
|
|
4975
|
-
return (u, d) => S(e) === "drawing" ? (
|
|
4960
|
+
return (u, d) => S(e) === "drawing" ? (O(), R("div", {
|
|
4976
4961
|
key: 0,
|
|
4977
4962
|
class: "mce-drawing",
|
|
4978
4963
|
style: q({
|
|
4979
4964
|
left: `${S(i)}px`,
|
|
4980
|
-
top: `${S(
|
|
4965
|
+
top: `${S(l)}px`
|
|
4981
4966
|
}),
|
|
4982
|
-
onMousedown:
|
|
4967
|
+
onMousedown: c
|
|
4983
4968
|
}, [
|
|
4984
|
-
S(t)?.content ? (
|
|
4969
|
+
S(t)?.content ? (O(), R("div", pa, K(S(n)(S(t).content)), 1)) : ee("", !0)
|
|
4985
4970
|
], 36)) : ee("", !0);
|
|
4986
4971
|
}
|
|
4987
|
-
}),
|
|
4972
|
+
}), ya = /* @__PURE__ */ X({
|
|
4988
4973
|
__name: "Floatbar",
|
|
4989
4974
|
props: {
|
|
4990
4975
|
...qe({
|
|
@@ -5005,7 +4990,7 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5005
4990
|
deep: !0
|
|
5006
4991
|
}), e({
|
|
5007
4992
|
updateLocation: i
|
|
5008
|
-
}), (
|
|
4993
|
+
}), (l, c) => (O(), oe(ot, {
|
|
5009
4994
|
ref: "overlayTpl",
|
|
5010
4995
|
class: "mce-floatbar",
|
|
5011
4996
|
location: t.location,
|
|
@@ -5015,12 +5000,12 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5015
5000
|
"model-value": !0
|
|
5016
5001
|
}, {
|
|
5017
5002
|
default: ne(() => [
|
|
5018
|
-
S(s).length > 0 ? Q(
|
|
5003
|
+
S(s).length > 0 ? Q(l.$slots, "default", { key: 0 }) : ee("", !0)
|
|
5019
5004
|
]),
|
|
5020
5005
|
_: 3
|
|
5021
5006
|
}, 8, ["location", "offset", "target"]));
|
|
5022
5007
|
}
|
|
5023
|
-
}),
|
|
5008
|
+
}), ga = /* @__PURE__ */ X({
|
|
5024
5009
|
__name: "Frame",
|
|
5025
5010
|
props: {
|
|
5026
5011
|
modelValue: { required: !0 },
|
|
@@ -5034,15 +5019,15 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5034
5019
|
selection: a,
|
|
5035
5020
|
state: r,
|
|
5036
5021
|
config: i,
|
|
5037
|
-
exec:
|
|
5038
|
-
} = de(),
|
|
5022
|
+
exec: l
|
|
5023
|
+
} = de(), c = V(!1);
|
|
5039
5024
|
async function u() {
|
|
5040
|
-
|
|
5025
|
+
c.value = !0, await Re(), t.value && (t.value.focus(), t.value.select());
|
|
5041
5026
|
}
|
|
5042
5027
|
async function d(g) {
|
|
5043
|
-
|
|
5028
|
+
c.value || (a.value = [e.value], await Re(), l("startTransform", g));
|
|
5044
5029
|
}
|
|
5045
|
-
return (g, h) => ze((
|
|
5030
|
+
return (g, h) => ze((O(), R("div", {
|
|
5046
5031
|
style: q(S(Me)(S(n)(e.value))),
|
|
5047
5032
|
class: be(["mce-frame", [
|
|
5048
5033
|
S(i).frameOutline && "mce-frame--outline"
|
|
@@ -5059,9 +5044,9 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5059
5044
|
ze(F("input", {
|
|
5060
5045
|
ref: "inputTpl",
|
|
5061
5046
|
"onUpdate:modelValue": h[0] || (h[0] = (v) => e.value.name = v),
|
|
5062
|
-
onBlur: h[1] || (h[1] = (v) =>
|
|
5047
|
+
onBlur: h[1] || (h[1] = (v) => c.value = !1)
|
|
5063
5048
|
}, null, 544), [
|
|
5064
|
-
[Xe,
|
|
5049
|
+
[Xe, c.value],
|
|
5065
5050
|
[En, e.value.name]
|
|
5066
5051
|
])
|
|
5067
5052
|
], 544), [
|
|
@@ -5071,18 +5056,18 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5071
5056
|
[Xe, e.value.visible]
|
|
5072
5057
|
]);
|
|
5073
5058
|
}
|
|
5074
|
-
}),
|
|
5059
|
+
}), ba = /* @__PURE__ */ X({
|
|
5075
5060
|
__name: "Frames",
|
|
5076
5061
|
setup(o) {
|
|
5077
5062
|
const {
|
|
5078
5063
|
frames: e
|
|
5079
5064
|
} = de();
|
|
5080
|
-
return (t, n) => (
|
|
5065
|
+
return (t, n) => (O(!0), R(se, null, _e(S(e), (s, a) => (O(), oe(ga, {
|
|
5081
5066
|
key: a,
|
|
5082
5067
|
"model-value": s
|
|
5083
5068
|
}, null, 8, ["model-value"]))), 128));
|
|
5084
5069
|
}
|
|
5085
|
-
}),
|
|
5070
|
+
}), wa = /* @__PURE__ */ X({
|
|
5086
5071
|
__name: "GoBackSelectedArea",
|
|
5087
5072
|
setup(o) {
|
|
5088
5073
|
const {
|
|
@@ -5091,28 +5076,28 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5091
5076
|
aabbToDrawboardAabb: n,
|
|
5092
5077
|
exec: s,
|
|
5093
5078
|
t: a
|
|
5094
|
-
} = de(), r =
|
|
5079
|
+
} = de(), r = $(() => e.value.width && e.value.height && !Be(
|
|
5095
5080
|
t.value,
|
|
5096
5081
|
n(e.value)
|
|
5097
5082
|
));
|
|
5098
|
-
return (i,
|
|
5083
|
+
return (i, l) => r.value ? (O(), R("div", {
|
|
5099
5084
|
key: 0,
|
|
5100
5085
|
class: "mce-back-selected-aera",
|
|
5101
|
-
onClick:
|
|
5086
|
+
onClick: l[0] || (l[0] = Ke((c) => S(s)("zoomToSelection"), ["prevent"]))
|
|
5102
5087
|
}, [
|
|
5103
5088
|
H(Ae, { icon: "$gps" }),
|
|
5104
5089
|
F("span", null, K(S(a)("goBackSelectedArea")), 1)
|
|
5105
5090
|
])) : ee("", !0);
|
|
5106
5091
|
}
|
|
5107
|
-
}),
|
|
5092
|
+
}), xa = ["data-name"], _a = /* @__PURE__ */ X({
|
|
5108
5093
|
__name: "Hover",
|
|
5109
5094
|
setup(o) {
|
|
5110
5095
|
const {
|
|
5111
5096
|
selection: e,
|
|
5112
5097
|
hoverElement: t,
|
|
5113
5098
|
getObbInDrawboard: n
|
|
5114
|
-
} = de(), s =
|
|
5115
|
-
return (a, r) => S(t) && !S(t).equal(S(e)[0]) ? (
|
|
5099
|
+
} = de(), s = $(() => n(t.value));
|
|
5100
|
+
return (a, r) => S(t) && !S(t).equal(S(e)[0]) ? (O(), R("div", {
|
|
5116
5101
|
key: 0,
|
|
5117
5102
|
class: "mce-hover",
|
|
5118
5103
|
"data-name": S(t).name,
|
|
@@ -5120,11 +5105,11 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5120
5105
|
borderColor: "currentcolor",
|
|
5121
5106
|
...S(Me)(s.value)
|
|
5122
5107
|
})
|
|
5123
|
-
}, null, 12,
|
|
5108
|
+
}, null, 12, xa)) : ee("", !0);
|
|
5124
5109
|
}
|
|
5125
|
-
}),
|
|
5110
|
+
}), ka = /* @__PURE__ */ X({
|
|
5126
5111
|
__name: "Tooltip",
|
|
5127
|
-
props: /* @__PURE__ */
|
|
5112
|
+
props: /* @__PURE__ */ Oe({
|
|
5128
5113
|
...qe({
|
|
5129
5114
|
location: "right",
|
|
5130
5115
|
offset: 8
|
|
@@ -5141,10 +5126,10 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5141
5126
|
}
|
|
5142
5127
|
return e({
|
|
5143
5128
|
updateLocation: a
|
|
5144
|
-
}), (r, i) => (
|
|
5129
|
+
}), (r, i) => (O(), oe(ot, {
|
|
5145
5130
|
ref: "overlayTpl",
|
|
5146
5131
|
modelValue: n.value,
|
|
5147
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
5132
|
+
"onUpdate:modelValue": i[0] || (i[0] = (l) => n.value = l),
|
|
5148
5133
|
class: "mce-tooltip",
|
|
5149
5134
|
location: t.location,
|
|
5150
5135
|
offset: t.offset,
|
|
@@ -5158,14 +5143,14 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5158
5143
|
}, [
|
|
5159
5144
|
r.$slots.activator ? {
|
|
5160
5145
|
name: "activator",
|
|
5161
|
-
fn: ne((
|
|
5162
|
-
Q(r.$slots, "activator", vt(yt(
|
|
5146
|
+
fn: ne((l) => [
|
|
5147
|
+
Q(r.$slots, "activator", vt(yt(l)))
|
|
5163
5148
|
]),
|
|
5164
5149
|
key: "0"
|
|
5165
5150
|
} : void 0
|
|
5166
5151
|
]), 1032, ["modelValue", "location", "offset", "target", "attach"]));
|
|
5167
5152
|
}
|
|
5168
|
-
}),
|
|
5153
|
+
}), Ca = ["width", "height"], Ea = ["onDblclick", "onMousedown", "onMousemove"], Ta = { style: { "font-size": "12px", "text-wrap": "nowrap" } }, ft = /* @__PURE__ */ X({
|
|
5169
5154
|
inheritAttrs: !1,
|
|
5170
5155
|
__name: "Ruler",
|
|
5171
5156
|
props: {
|
|
@@ -5182,30 +5167,30 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5182
5167
|
labelFormat: { type: Function, default: (o) => String(o) }
|
|
5183
5168
|
},
|
|
5184
5169
|
setup(o, { expose: e }) {
|
|
5185
|
-
const t = o, n = Vt(), s =
|
|
5170
|
+
const t = o, n = Vt(), s = $(() => t.pixelRatio), a = V(), r = V({ x: 0, y: 0 }), i = ce("canvasTpl"), l = "OffscreenCanvas" in window ? new OffscreenCanvas(t.size, t.size) : document.createElement("canvas"), c = l.getContext("2d"), u = V(), d = Ee({
|
|
5186
5171
|
text: "#000",
|
|
5187
5172
|
border: "#000"
|
|
5188
5173
|
});
|
|
5189
5174
|
function g() {
|
|
5190
5175
|
if (!t.selected?.width || !t.selected?.height)
|
|
5191
5176
|
return;
|
|
5192
|
-
|
|
5177
|
+
c.fillStyle = "#6165FD20";
|
|
5193
5178
|
const A = t.vertical ? t.selected.top : t.selected.left, N = t.vertical ? t.selected.height : t.selected.width;
|
|
5194
|
-
|
|
5179
|
+
c.fillRect(A, 0, N, t.size);
|
|
5195
5180
|
}
|
|
5196
5181
|
function h(A, N, L, j) {
|
|
5197
|
-
|
|
5182
|
+
c.lineWidth = L, c.strokeStyle = j, c.beginPath(), c.moveTo(A[0], A[1]), c.lineTo(N[0], N[1]), c.stroke();
|
|
5198
5183
|
}
|
|
5199
5184
|
function v(A, N, L = 1) {
|
|
5200
5185
|
const j = A, D = t.size, U = A, W = t.size - N * L;
|
|
5201
|
-
|
|
5186
|
+
c.moveTo(j, D), c.lineTo(U, W);
|
|
5202
5187
|
}
|
|
5203
5188
|
function y(A, N, L, j) {
|
|
5204
|
-
|
|
5189
|
+
c.font = `${j}px sans-serif`, c.textAlign = "left", c.textBaseline = "bottom";
|
|
5205
5190
|
const D = N, U = t.size - L;
|
|
5206
|
-
|
|
5191
|
+
c.save(), t.vertical && (c.translate(0, t.size), c.scale(1, -1)), c.fillText(A, D, U), c.restore();
|
|
5207
5192
|
}
|
|
5208
|
-
const f =
|
|
5193
|
+
const f = $(() => {
|
|
5209
5194
|
const A = Math.max(t.unit / t.zoom, 1), N = t.unitFractions, L = Math.floor(Math.log10(A)), j = A / 10 ** L;
|
|
5210
5195
|
let D = N[N.length - 1];
|
|
5211
5196
|
for (const U of N)
|
|
@@ -5214,10 +5199,10 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5214
5199
|
break;
|
|
5215
5200
|
}
|
|
5216
5201
|
return D * 10 ** L;
|
|
5217
|
-
}), p =
|
|
5202
|
+
}), p = $(() => {
|
|
5218
5203
|
const A = -t.position / t.zoom;
|
|
5219
5204
|
return Math.floor(A / f.value) * f.value;
|
|
5220
|
-
}), _ =
|
|
5205
|
+
}), _ = $(() => {
|
|
5221
5206
|
const N = ((t.vertical ? u.value?.height : u.value?.width) ?? 0) / t.zoom;
|
|
5222
5207
|
return p.value + Math.ceil(N / f.value) * f.value;
|
|
5223
5208
|
});
|
|
@@ -5229,9 +5214,9 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5229
5214
|
}
|
|
5230
5215
|
function E() {
|
|
5231
5216
|
const A = i.value;
|
|
5232
|
-
if (!A || !
|
|
5217
|
+
if (!A || !l.width || !l.height)
|
|
5233
5218
|
return;
|
|
5234
|
-
|
|
5219
|
+
c.clearRect(0, 0, l.width, l.height), c.save(), c.scale(s.value, s.value), t.vertical && (c.scale(1, -1), c.translate(0, 0), c.rotate(-Math.PI / 2)), g(), t.axis && h(
|
|
5235
5220
|
[0, t.size],
|
|
5236
5221
|
[t.vertical ? A.height : A.width, t.size],
|
|
5237
5222
|
2,
|
|
@@ -5241,17 +5226,17 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5241
5226
|
v(D, 10), y(U, D + 2, 4, 8);
|
|
5242
5227
|
}, L = (D) => v(D, 4);
|
|
5243
5228
|
let j = f.value / 10;
|
|
5244
|
-
j = (j > 0 ? 1 : -1) * Math.max(1, Math.abs(j)),
|
|
5229
|
+
j = (j > 0 ? 1 : -1) * Math.max(1, Math.abs(j)), c.beginPath(), c.lineWidth = 1, c.strokeStyle = d.text, c.fillStyle = d.text;
|
|
5245
5230
|
for (let D = p.value; D <= _.value; D += j)
|
|
5246
5231
|
D % f.value === 0 && N(z(D), t.labelFormat(D));
|
|
5247
|
-
|
|
5232
|
+
c.stroke(), c.beginPath(), c.lineWidth = 1, c.strokeStyle = d.border;
|
|
5248
5233
|
for (let D = p.value; D <= _.value; D += j)
|
|
5249
5234
|
D % f.value === 0 || D % j === 0 && L(z(D));
|
|
5250
|
-
if (
|
|
5251
|
-
A.getContext("bitmaprenderer").transferFromImageBitmap(
|
|
5235
|
+
if (c.stroke(), c.restore(), "transferToImageBitmap" in l)
|
|
5236
|
+
A.getContext("bitmaprenderer").transferFromImageBitmap(l.transferToImageBitmap());
|
|
5252
5237
|
else {
|
|
5253
5238
|
const D = A.getContext("2d");
|
|
5254
|
-
D && (D.clearRect(0, 0, A.width, A.height), D.drawImage(
|
|
5239
|
+
D && (D.clearRect(0, 0, A.width, A.height), D.drawImage(l, 0, 0));
|
|
5255
5240
|
}
|
|
5256
5241
|
}
|
|
5257
5242
|
pe(
|
|
@@ -5265,7 +5250,7 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5265
5250
|
if (!i.value)
|
|
5266
5251
|
return;
|
|
5267
5252
|
const A = i.value.parentElement.getBoundingClientRect();
|
|
5268
|
-
|
|
5253
|
+
l.width = i.value.width = A.width * s.value, l.height = i.value.height = A.height * s.value, i.value.style.width = `${A.width}px`, i.value.style.height = `${A.height}px`, u.value = A, E();
|
|
5269
5254
|
}, 50);
|
|
5270
5255
|
He(() => {
|
|
5271
5256
|
C();
|
|
@@ -5275,9 +5260,9 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5275
5260
|
d.text = N.getPropertyValue("--text-color").trim(), d.border = N.getPropertyValue("--border-color").trim();
|
|
5276
5261
|
}
|
|
5277
5262
|
}), we(() => {
|
|
5278
|
-
|
|
5263
|
+
l.width = 0, l.height = 0;
|
|
5279
5264
|
});
|
|
5280
|
-
const m = V([]), b = V(), k =
|
|
5265
|
+
const m = V([]), b = V(), k = $(() => {
|
|
5281
5266
|
const A = [...m.value];
|
|
5282
5267
|
return typeof b.value == "number" && A.unshift(b.value), A;
|
|
5283
5268
|
});
|
|
@@ -5311,8 +5296,8 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5311
5296
|
}
|
|
5312
5297
|
return e({
|
|
5313
5298
|
box: u
|
|
5314
|
-
}), (A, N) => (
|
|
5315
|
-
ze((
|
|
5299
|
+
}), (A, N) => (O(), R(se, null, [
|
|
5300
|
+
ze((O(), R("div", $e({
|
|
5316
5301
|
class: ["mce-ruler", [
|
|
5317
5302
|
`mce-ruler--${t.vertical ? "vertical" : "horizontal"}`
|
|
5318
5303
|
]],
|
|
@@ -5327,11 +5312,11 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5327
5312
|
class: "mce-ruler__canvas",
|
|
5328
5313
|
width: t.size,
|
|
5329
5314
|
height: t.size
|
|
5330
|
-
}, null, 8,
|
|
5315
|
+
}, null, 8, Ca)
|
|
5331
5316
|
], 16)), [
|
|
5332
5317
|
[S(Zt), S(C)]
|
|
5333
5318
|
]),
|
|
5334
|
-
(
|
|
5319
|
+
(O(!0), R(se, null, _e(k.value, (L, j) => (O(), R("div", {
|
|
5335
5320
|
key: j,
|
|
5336
5321
|
class: be(["mce-ruler-refline", {
|
|
5337
5322
|
"mce-ruler-refline--vertical": t.vertical,
|
|
@@ -5348,20 +5333,20 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5348
5333
|
onMousedown: (D) => B(D, j),
|
|
5349
5334
|
onMousemove: () => a.value = `${L}`,
|
|
5350
5335
|
onMouseleave: M
|
|
5351
|
-
}, null, 46,
|
|
5352
|
-
H(
|
|
5336
|
+
}, null, 46, Ea))), 128)),
|
|
5337
|
+
H(ka, {
|
|
5353
5338
|
"model-value": !!a.value,
|
|
5354
5339
|
target: r.value,
|
|
5355
5340
|
offset: 24
|
|
5356
5341
|
}, {
|
|
5357
5342
|
default: ne(() => [
|
|
5358
|
-
F("div",
|
|
5343
|
+
F("div", Ta, K(a.value), 1)
|
|
5359
5344
|
]),
|
|
5360
5345
|
_: 1
|
|
5361
5346
|
}, 8, ["model-value", "target"])
|
|
5362
5347
|
], 64));
|
|
5363
5348
|
}
|
|
5364
|
-
}),
|
|
5349
|
+
}), Aa = { class: "mce-rulers" }, Sa = /* @__PURE__ */ X({
|
|
5365
5350
|
inheritAttrs: !1,
|
|
5366
5351
|
__name: "Rulers",
|
|
5367
5352
|
setup(o) {
|
|
@@ -5369,8 +5354,8 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5369
5354
|
camera: e,
|
|
5370
5355
|
getAabbInDrawboard: t,
|
|
5371
5356
|
selection: n
|
|
5372
|
-
} = de(), s =
|
|
5373
|
-
return (a, r) => (
|
|
5357
|
+
} = de(), s = $(() => t(n.value));
|
|
5358
|
+
return (a, r) => (O(), R("div", Aa, [
|
|
5374
5359
|
H(ft, {
|
|
5375
5360
|
refline: "",
|
|
5376
5361
|
zoom: S(e).zoom.x,
|
|
@@ -5391,12 +5376,12 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5391
5376
|
r[0] || (r[0] = F("div", { class: "mce-rulers__left-top" }, null, -1))
|
|
5392
5377
|
]));
|
|
5393
5378
|
}
|
|
5394
|
-
}),
|
|
5379
|
+
}), Ma = {
|
|
5395
5380
|
ref: "trackTplRef",
|
|
5396
5381
|
class: "mce-scrollbar__track"
|
|
5397
|
-
},
|
|
5382
|
+
}, za = 50, Nt = 50, Rt = /* @__PURE__ */ X({
|
|
5398
5383
|
__name: "Scrollbar",
|
|
5399
|
-
props: /* @__PURE__ */
|
|
5384
|
+
props: /* @__PURE__ */ Oe({
|
|
5400
5385
|
zoom: {},
|
|
5401
5386
|
length: {},
|
|
5402
5387
|
vertical: { type: Boolean },
|
|
@@ -5407,16 +5392,16 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5407
5392
|
modelValue: { required: !0 },
|
|
5408
5393
|
modelModifiers: {}
|
|
5409
5394
|
}),
|
|
5410
|
-
emits: /* @__PURE__ */
|
|
5395
|
+
emits: /* @__PURE__ */ Oe(["scroll"], ["update:modelValue"]),
|
|
5411
5396
|
setup(o, { emit: e }) {
|
|
5412
|
-
const t = o, n = e, s = (w, T, M) => w * (1 - M) + T * M, a = (w, T) => s(w / 2, 1 - w / 2, T), r = ke(o, "modelValue"), i = ce("trackTplRef"),
|
|
5413
|
-
() => t.infinite ? t.length * t.zoom +
|
|
5414
|
-
), d =
|
|
5397
|
+
const t = o, n = e, s = (w, T, M) => w * (1 - M) + T * M, a = (w, T) => s(w / 2, 1 - w / 2, T), r = ke(o, "modelValue"), i = ce("trackTplRef"), l = ce("thumbTplRef"), c = V(0), u = $(
|
|
5398
|
+
() => t.infinite ? t.length * t.zoom + c.value + Math.abs(r.value) * 2 : r.value > 0 ? r.value + t.length * t.zoom : Math.max(c.value - r.value, t.length * t.zoom)
|
|
5399
|
+
), d = $(
|
|
5415
5400
|
() => t.infinite ? Math.abs(r.value) - r.value : r.value > 0 ? 0 : -r.value
|
|
5416
|
-
), g =
|
|
5401
|
+
), g = $(() => Math.max(0.05, Math.min(1, c.value / u.value))), h = $(() => d.value / (u.value - c.value) * (1 - g.value)), v = Yt(() => {
|
|
5417
5402
|
const w = i.value?.getBoundingClientRect() ?? { width: 0, height: 0 };
|
|
5418
|
-
|
|
5419
|
-
}, 50), y =
|
|
5403
|
+
c.value = t.vertical ? w.height : w.width;
|
|
5404
|
+
}, 50), y = $(() => t.infinite ? a(g.value, h.value) : h.value), f = $(() => 1 - y.value - g.value), p = $(() => t.vertical ? `${y.value * 100}%` : "0%"), _ = $(() => t.vertical ? `${f.value * 100}%` : "50%"), z = $(() => t.vertical ? "0%" : `${y.value * 100}%`), I = $(() => t.vertical ? "50%" : `${f.value * 100}%`);
|
|
5420
5405
|
function E(w) {
|
|
5421
5406
|
n("scroll", w - r.value), r.value = w;
|
|
5422
5407
|
}
|
|
@@ -5428,11 +5413,11 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5428
5413
|
function k(w) {
|
|
5429
5414
|
const T = w.target;
|
|
5430
5415
|
let M = 0;
|
|
5431
|
-
if (
|
|
5416
|
+
if (l.value?.contains(T)) {
|
|
5432
5417
|
x();
|
|
5433
5418
|
return;
|
|
5434
5419
|
} else if (i.value?.contains(T)) {
|
|
5435
|
-
const P = (t.vertical ? w.offsetY : w.offsetX) /
|
|
5420
|
+
const P = (t.vertical ? w.offsetY : w.offsetX) / c.value;
|
|
5436
5421
|
if (P < y.value)
|
|
5437
5422
|
M = 1;
|
|
5438
5423
|
else if (P > 1 - f.value)
|
|
@@ -5442,14 +5427,14 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5442
5427
|
return;
|
|
5443
5428
|
}
|
|
5444
5429
|
}
|
|
5445
|
-
C(
|
|
5430
|
+
C(za * M), b = setTimeout(() => k(w), Nt);
|
|
5446
5431
|
}
|
|
5447
5432
|
function x() {
|
|
5448
5433
|
clearTimeout(b);
|
|
5449
5434
|
}
|
|
5450
5435
|
return we(() => {
|
|
5451
5436
|
x();
|
|
5452
|
-
}), (w, T) => ze((
|
|
5437
|
+
}), (w, T) => ze((O(), R("div", {
|
|
5453
5438
|
class: be(["mce-scrollbar", {
|
|
5454
5439
|
"mce-scrollbar--vertical": t.vertical,
|
|
5455
5440
|
"mce-scrollbar--horizontal": !t.vertical
|
|
@@ -5460,7 +5445,7 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5460
5445
|
[t.vertical ? "top" : "left"]: `${t.offset}px`
|
|
5461
5446
|
})
|
|
5462
5447
|
}, [
|
|
5463
|
-
F("div",
|
|
5448
|
+
F("div", Ma, [
|
|
5464
5449
|
ze(F("div", {
|
|
5465
5450
|
ref: "thumbTplRef",
|
|
5466
5451
|
class: be(["mce-scrollbar__thumb", {
|
|
@@ -5494,15 +5479,15 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5494
5479
|
camera: t,
|
|
5495
5480
|
viewAabb: n
|
|
5496
5481
|
} = de();
|
|
5497
|
-
return (s, a) => (
|
|
5498
|
-
H(Rt,
|
|
5482
|
+
return (s, a) => (O(), R(se, null, [
|
|
5483
|
+
H(Rt, $e(e, {
|
|
5499
5484
|
modelValue: S(t).position.y,
|
|
5500
5485
|
"onUpdate:modelValue": a[0] || (a[0] = (r) => S(t).position.y = r),
|
|
5501
5486
|
zoom: S(t).zoom.y,
|
|
5502
5487
|
vertical: "",
|
|
5503
5488
|
length: S(n).height
|
|
5504
5489
|
}), null, 16, ["modelValue", "zoom", "length"]),
|
|
5505
|
-
H(Rt,
|
|
5490
|
+
H(Rt, $e(e, {
|
|
5506
5491
|
modelValue: S(t).position.x,
|
|
5507
5492
|
"onUpdate:modelValue": a[1] || (a[1] = (r) => S(t).position.x = r),
|
|
5508
5493
|
zoom: S(t).zoom.x,
|
|
@@ -5510,10 +5495,10 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5510
5495
|
}), null, 16, ["modelValue", "zoom", "length"])
|
|
5511
5496
|
], 64));
|
|
5512
5497
|
}
|
|
5513
|
-
}),
|
|
5498
|
+
}), Oa = { class: "mce-transformable__svg" }, Ia = { "pointer-events": "all" }, Fa = ["x", "y", "width", "height", "aria-label", "fill"], Pa = ["cx", "cy", "r", "aria-label", "fill"], Na = ["x", "y", "width", "height", "aria-label", "cursor", "onPointerdown"], Ra = {
|
|
5514
5499
|
key: 0,
|
|
5515
5500
|
class: "mce-transformable__tip"
|
|
5516
|
-
},
|
|
5501
|
+
}, Ba = /* @__PURE__ */ X({
|
|
5517
5502
|
__name: "Transformable",
|
|
5518
5503
|
props: {
|
|
5519
5504
|
tag: { default: "div" },
|
|
@@ -5562,13 +5547,13 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5562
5547
|
"resize-top-right": (m) => _("resizeBevel", 180 + m),
|
|
5563
5548
|
"resize-bottom-right": (m) => _("resizeBevel", 90 + m),
|
|
5564
5549
|
"resize-bottom-left": (m) => _("resizeBevel", 180 + m)
|
|
5565
|
-
}, r = ke(n, "modelValue"), i =
|
|
5550
|
+
}, r = ke(n, "modelValue"), i = $({
|
|
5566
5551
|
get: () => {
|
|
5567
5552
|
let { left: m = 0, top: b = 0, width: k = 0, height: x = 0, rotate: w = 0 } = r.value ?? {};
|
|
5568
5553
|
return Number.isNaN(Number(k)) && (k = 0), Number.isNaN(Number(x)) && (x = 0), { left: m, top: b, width: k, height: x, rotate: w };
|
|
5569
5554
|
},
|
|
5570
5555
|
set: (m) => r.value = m
|
|
5571
|
-
}),
|
|
5556
|
+
}), l = V(!1), c = V(), u = $(() => {
|
|
5572
5557
|
const { width: m = 0, height: b = 0 } = i.value, k = 6, x = k / 2, w = 8, T = w / 2, M = 12;
|
|
5573
5558
|
let P;
|
|
5574
5559
|
return n.handleStrategy === "point" ? P = [
|
|
@@ -5608,25 +5593,25 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5608
5593
|
{ type: "rotate-bottom-left", x: -M - T, y: b + T, width: M, height: M },
|
|
5609
5594
|
{ type: "rotate-bottom-right", x: m + T, y: b + T, width: M, height: M }
|
|
5610
5595
|
], P.filter((B) => n.handles.includes(B.type)).map((B) => (B.width = Math.max(B.width, 0), B.height = Math.max(B.height, 0), B));
|
|
5611
|
-
}), d = V(), g =
|
|
5596
|
+
}), d = V(), g = $(() => {
|
|
5612
5597
|
const { width: m = 0, height: b = 0 } = i.value;
|
|
5613
5598
|
return {
|
|
5614
5599
|
width: n.initialSize && !m ? void 0 : `${m}px`,
|
|
5615
5600
|
height: n.initialSize && !b ? void 0 : `${b}px`
|
|
5616
5601
|
};
|
|
5617
|
-
}), h =
|
|
5602
|
+
}), h = $(() => {
|
|
5618
5603
|
const { left: m = 0, top: b = 0, rotate: k = 0 } = i.value, x = k * Math.PI / 180, w = Math.cos(x), T = Math.sin(x);
|
|
5619
5604
|
return {
|
|
5620
5605
|
...g.value,
|
|
5621
5606
|
transform: `matrix(${w}, ${T}, ${-T}, ${w}, ${m}, ${b})`
|
|
5622
5607
|
};
|
|
5623
|
-
}), v =
|
|
5608
|
+
}), v = $(() => n.visibility === "auto" && l.value), y = $(() => n.tipFormat?.("size"));
|
|
5624
5609
|
function f(m, b) {
|
|
5625
5610
|
if (m && m.button !== void 0 && m.button !== 0)
|
|
5626
5611
|
return !1;
|
|
5627
5612
|
m?.preventDefault(), m?.stopPropagation();
|
|
5628
5613
|
const { left: k = 0, top: x = 0, width: w = 0, height: T = 0, rotate: M = 0 } = i.value, P = w && T ? w / T : 0, B = b === void 0 ? { type: "move", x: 0, y: 0, width: 0, height: 0 } : u.value[b];
|
|
5629
|
-
|
|
5614
|
+
c.value = B.type;
|
|
5630
5615
|
const A = B.type === "move", N = B.type.startsWith("rotate"), L = B.type === "resize-left" || B.type === "resize-right", j = B.type.split("-").length === 2, D = {
|
|
5631
5616
|
x: k + w / 2,
|
|
5632
5617
|
y: x + T / 2
|
|
@@ -5648,9 +5633,9 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5648
5633
|
) / (Math.PI / 180);
|
|
5649
5634
|
let Y = m ? { x: m.clientX, y: m.clientY } : void 0;
|
|
5650
5635
|
function xe() {
|
|
5651
|
-
|
|
5636
|
+
l.value = !0, s("start", i.value);
|
|
5652
5637
|
}
|
|
5653
|
-
!n.threshold && !
|
|
5638
|
+
!n.threshold && !l.value && xe();
|
|
5654
5639
|
function ae(ye) {
|
|
5655
5640
|
const J = {};
|
|
5656
5641
|
Y || (Y = { x: ye.clientX, y: ye.clientY });
|
|
@@ -5658,7 +5643,7 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5658
5643
|
x: ye.clientX - Y.x,
|
|
5659
5644
|
y: ye.clientY - Y.y
|
|
5660
5645
|
};
|
|
5661
|
-
if (!
|
|
5646
|
+
if (!l.value) {
|
|
5662
5647
|
if (Math.abs(me.x) < n.threshold && Math.abs(me.y) < n.threshold)
|
|
5663
5648
|
return;
|
|
5664
5649
|
xe();
|
|
@@ -5710,7 +5695,7 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5710
5695
|
i.value = ie, s("move", ie, te);
|
|
5711
5696
|
}
|
|
5712
5697
|
function ve() {
|
|
5713
|
-
window.removeEventListener("pointermove", ae), window.removeEventListener("pointerup", ve, !0),
|
|
5698
|
+
window.removeEventListener("pointermove", ae), window.removeEventListener("pointerup", ve, !0), l.value = !1, s("end", i.value);
|
|
5714
5699
|
}
|
|
5715
5700
|
return window.addEventListener("pointermove", ae), window.addEventListener("pointerup", ve, !0), !0;
|
|
5716
5701
|
}
|
|
@@ -5763,9 +5748,9 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5763
5748
|
}
|
|
5764
5749
|
}), e({
|
|
5765
5750
|
start: f,
|
|
5766
|
-
activeHandle:
|
|
5767
|
-
transforming:
|
|
5768
|
-
}), (m, b) => (
|
|
5751
|
+
activeHandle: c,
|
|
5752
|
+
transforming: l
|
|
5753
|
+
}), (m, b) => (O(), oe(jt(o.tag), {
|
|
5769
5754
|
class: "mce-transformable",
|
|
5770
5755
|
style: q(h.value)
|
|
5771
5756
|
}, {
|
|
@@ -5778,7 +5763,7 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5778
5763
|
},
|
|
5779
5764
|
start: f
|
|
5780
5765
|
}),
|
|
5781
|
-
(
|
|
5766
|
+
(O(), R("svg", Oa, [
|
|
5782
5767
|
F("rect", {
|
|
5783
5768
|
width: "100%",
|
|
5784
5769
|
height: "100%",
|
|
@@ -5790,10 +5775,10 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5790
5775
|
strokeWidth: v.value ? "0.5px" : void 0
|
|
5791
5776
|
})
|
|
5792
5777
|
}, null, 4),
|
|
5793
|
-
F("g",
|
|
5794
|
-
(
|
|
5795
|
-
(o.handleStrategy === "point" ? k.type.startsWith("resize") : k.type === "resize-top-left" || k.type === "resize-top-right" || k.type === "resize-bottom-left" || k.type === "resize-bottom-right") ? (
|
|
5796
|
-
n.handleShape === "rect" ? (
|
|
5778
|
+
F("g", Ia, [
|
|
5779
|
+
(O(!0), R(se, null, _e(u.value.filter((k) => !(!o.resizable && k.type.startsWith("resize") || !o.rotatable && k.type.startsWith("rotate") || !o.moveable && k.type === "move")), (k, x) => (O(), R(se, { key: x }, [
|
|
5780
|
+
(o.handleStrategy === "point" ? k.type.startsWith("resize") : k.type === "resize-top-left" || k.type === "resize-top-right" || k.type === "resize-bottom-left" || k.type === "resize-bottom-right") ? (O(), R(se, { key: 0 }, [
|
|
5781
|
+
n.handleShape === "rect" ? (O(), R("rect", {
|
|
5797
5782
|
key: 0,
|
|
5798
5783
|
x: k.x,
|
|
5799
5784
|
y: k.y,
|
|
@@ -5803,9 +5788,9 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5803
5788
|
fill: o.handleColor,
|
|
5804
5789
|
class: "mce-transformable__handle",
|
|
5805
5790
|
style: q({
|
|
5806
|
-
opacity: o.visibility === "none" ||
|
|
5791
|
+
opacity: o.visibility === "none" || l.value && o.visibility !== "visible" ? 0 : void 0
|
|
5807
5792
|
})
|
|
5808
|
-
}, null, 12,
|
|
5793
|
+
}, null, 12, Fa)) : (O(), R("circle", {
|
|
5809
5794
|
key: 1,
|
|
5810
5795
|
cx: k.x + k.width / 2,
|
|
5811
5796
|
cy: k.y + k.width / 2,
|
|
@@ -5814,9 +5799,9 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5814
5799
|
fill: o.handleColor,
|
|
5815
5800
|
class: "mce-transformable__handle",
|
|
5816
5801
|
style: q({
|
|
5817
|
-
opacity: o.visibility === "none" ||
|
|
5802
|
+
opacity: o.visibility === "none" || l.value && o.visibility !== "visible" ? 0 : void 0
|
|
5818
5803
|
})
|
|
5819
|
-
}, null, 12,
|
|
5804
|
+
}, null, 12, Pa))
|
|
5820
5805
|
], 64)) : ee("", !0),
|
|
5821
5806
|
F("rect", {
|
|
5822
5807
|
ref_for: !0,
|
|
@@ -5829,11 +5814,11 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5829
5814
|
"aria-label": k.type,
|
|
5830
5815
|
class: "mce-transformable__handle-box",
|
|
5831
5816
|
style: q({
|
|
5832
|
-
opacity: o.visibility === "none" ||
|
|
5817
|
+
opacity: o.visibility === "none" || l.value && o.visibility !== "visible" ? 0 : void 0
|
|
5833
5818
|
}),
|
|
5834
|
-
cursor:
|
|
5819
|
+
cursor: l.value ? "auto" : z(k.type),
|
|
5835
5820
|
onPointerdown: (w) => f(w, x)
|
|
5836
|
-
}, null, 44,
|
|
5821
|
+
}, null, 44, Na)
|
|
5837
5822
|
], 64))), 128))
|
|
5838
5823
|
]),
|
|
5839
5824
|
F("g", {
|
|
@@ -5843,12 +5828,12 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5843
5828
|
Q(m.$slots, "svg", { box: i.value })
|
|
5844
5829
|
], 4)
|
|
5845
5830
|
])),
|
|
5846
|
-
y.value ? (
|
|
5831
|
+
y.value ? (O(), R("div", Ra, K(y.value), 1)) : ee("", !0)
|
|
5847
5832
|
]),
|
|
5848
5833
|
_: 3
|
|
5849
5834
|
}, 8, ["style"]));
|
|
5850
5835
|
}
|
|
5851
|
-
}),
|
|
5836
|
+
}), La = /* @__PURE__ */ X({
|
|
5852
5837
|
inheritAttrs: !1,
|
|
5853
5838
|
__name: "Selector",
|
|
5854
5839
|
props: {
|
|
@@ -5862,8 +5847,8 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5862
5847
|
selection: a,
|
|
5863
5848
|
camera: r,
|
|
5864
5849
|
obbToFit: i,
|
|
5865
|
-
getObbInDrawboard:
|
|
5866
|
-
getObb:
|
|
5850
|
+
getObbInDrawboard: l,
|
|
5851
|
+
getObb: c,
|
|
5867
5852
|
registerCommand: u,
|
|
5868
5853
|
unregisterCommand: d,
|
|
5869
5854
|
isFrame: g,
|
|
@@ -5875,15 +5860,15 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5875
5860
|
}), we(() => {
|
|
5876
5861
|
d("startTransform");
|
|
5877
5862
|
});
|
|
5878
|
-
const f =
|
|
5863
|
+
const f = $(() => {
|
|
5879
5864
|
if (a.value.length !== 1)
|
|
5880
5865
|
return [];
|
|
5881
5866
|
const E = [];
|
|
5882
|
-
return a.value[0]?.findAncestor((C) => (C instanceof G && E.push(
|
|
5883
|
-
}), p =
|
|
5867
|
+
return a.value[0]?.findAncestor((C) => (C instanceof G && E.push(l(C)), !1)), E;
|
|
5868
|
+
}), p = $(() => n.value !== "selecting" && a.value.length === 1 ? [] : a.value.map((E) => ({
|
|
5884
5869
|
name: E.name,
|
|
5885
|
-
box:
|
|
5886
|
-
}))), _ =
|
|
5870
|
+
box: l(E)
|
|
5871
|
+
}))), _ = $(() => l(a.value)), z = $({
|
|
5887
5872
|
get: () => _.value,
|
|
5888
5873
|
set: (E) => {
|
|
5889
5874
|
const C = r.value.zoom, m = _.value, b = {
|
|
@@ -5911,13 +5896,13 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5911
5896
|
}
|
|
5912
5897
|
});
|
|
5913
5898
|
function I() {
|
|
5914
|
-
const E = a.value.length === 1 ? a.value[0].style :
|
|
5899
|
+
const E = a.value.length === 1 ? a.value[0].style : c(a.value);
|
|
5915
5900
|
return `${Number(E.width.toFixed(2))} × ${Number(E.height.toFixed(2))}`;
|
|
5916
5901
|
}
|
|
5917
5902
|
return e({
|
|
5918
5903
|
transformable: y
|
|
5919
|
-
}), (E, C) => (
|
|
5920
|
-
(
|
|
5904
|
+
}), (E, C) => (O(), R(se, null, [
|
|
5905
|
+
(O(!0), R(se, null, _e(f.value, (m, b) => (O(), R("div", {
|
|
5921
5906
|
key: b,
|
|
5922
5907
|
class: "mce-parent-element-obb",
|
|
5923
5908
|
style: q({
|
|
@@ -5925,7 +5910,7 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5925
5910
|
...S(Me)(m)
|
|
5926
5911
|
})
|
|
5927
5912
|
}, null, 4))), 128)),
|
|
5928
|
-
S(n) === "selecting" ? (
|
|
5913
|
+
S(n) === "selecting" ? (O(), R("div", {
|
|
5929
5914
|
key: 0,
|
|
5930
5915
|
class: "mce-selected-area",
|
|
5931
5916
|
style: q({
|
|
@@ -5933,7 +5918,7 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5933
5918
|
...S(Me)(t.selectedArea)
|
|
5934
5919
|
})
|
|
5935
5920
|
}, null, 4)) : ee("", !0),
|
|
5936
|
-
(
|
|
5921
|
+
(O(!0), R(se, null, _e(p.value, (m, b) => (O(), R("div", {
|
|
5937
5922
|
key: b,
|
|
5938
5923
|
class: "mce-element-obb",
|
|
5939
5924
|
style: q({
|
|
@@ -5941,7 +5926,7 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5941
5926
|
...S(Me)(m.box)
|
|
5942
5927
|
})
|
|
5943
5928
|
}, null, 4))), 128)),
|
|
5944
|
-
z.value.width && z.value.height ? (
|
|
5929
|
+
z.value.width && z.value.height ? (O(), oe(Ba, {
|
|
5945
5930
|
key: 1,
|
|
5946
5931
|
ref: "transformableRef",
|
|
5947
5932
|
modelValue: z.value,
|
|
@@ -5964,7 +5949,7 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5964
5949
|
key: "0"
|
|
5965
5950
|
} : void 0
|
|
5966
5951
|
]), 1032, ["modelValue", "visibility", "moveable", "resize-strategy", "handle-shape", "border-style"])) : ee("", !0),
|
|
5967
|
-
z.value.width && z.value.height && E.$slots.default ? (
|
|
5952
|
+
z.value.width && z.value.height && E.$slots.default ? (O(), R("div", {
|
|
5968
5953
|
key: 2,
|
|
5969
5954
|
style: q([{ position: "absolute" }, S(Me)(z.value)])
|
|
5970
5955
|
}, [
|
|
@@ -5972,15 +5957,15 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5972
5957
|
], 4)) : ee("", !0)
|
|
5973
5958
|
], 64));
|
|
5974
5959
|
}
|
|
5975
|
-
}),
|
|
5960
|
+
}), Da = /* @__PURE__ */ X({
|
|
5976
5961
|
__name: "Setup",
|
|
5977
5962
|
setup(o) {
|
|
5978
5963
|
return de().setup(), (e, t) => null;
|
|
5979
5964
|
}
|
|
5980
|
-
}),
|
|
5965
|
+
}), Va = /* @__PURE__ */ X({
|
|
5981
5966
|
__name: "Layout",
|
|
5982
5967
|
props: {
|
|
5983
|
-
...
|
|
5968
|
+
...ea()
|
|
5984
5969
|
},
|
|
5985
5970
|
setup(o, { expose: e }) {
|
|
5986
5971
|
const t = o, {
|
|
@@ -5989,16 +5974,16 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
5989
5974
|
items: a,
|
|
5990
5975
|
getLayoutItem: r,
|
|
5991
5976
|
layoutRef: i
|
|
5992
|
-
} =
|
|
5977
|
+
} = aa(t);
|
|
5993
5978
|
return e({
|
|
5994
5979
|
items: a,
|
|
5995
5980
|
getLayoutItem: r
|
|
5996
|
-
}), (
|
|
5981
|
+
}), (l, c) => (O(), R("div", {
|
|
5997
5982
|
ref: S(i),
|
|
5998
5983
|
class: be([S(n)]),
|
|
5999
5984
|
style: q([S(s)])
|
|
6000
5985
|
}, [
|
|
6001
|
-
Q(
|
|
5986
|
+
Q(l.$slots, "default")
|
|
6002
5987
|
], 6));
|
|
6003
5988
|
}
|
|
6004
5989
|
}), Bt = /* @__PURE__ */ X({
|
|
@@ -6013,19 +5998,19 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6013
5998
|
default: 300
|
|
6014
5999
|
},
|
|
6015
6000
|
modelValue: Boolean,
|
|
6016
|
-
...
|
|
6001
|
+
...ta()
|
|
6017
6002
|
},
|
|
6018
6003
|
setup(o) {
|
|
6019
|
-
const e = o, { layoutItemStyles: t } =
|
|
6004
|
+
const e = o, { layoutItemStyles: t } = oa({
|
|
6020
6005
|
id: e.name,
|
|
6021
|
-
order:
|
|
6006
|
+
order: $(() => Number.parseInt(String(e.order), 10)),
|
|
6022
6007
|
position: Te(() => e.position),
|
|
6023
6008
|
elementSize: Te(() => e.size),
|
|
6024
6009
|
layoutSize: Te(() => e.size),
|
|
6025
6010
|
active: Te(() => e.modelValue),
|
|
6026
6011
|
absolute: Te(() => e.absolute)
|
|
6027
6012
|
});
|
|
6028
|
-
return (n, s) => (
|
|
6013
|
+
return (n, s) => (O(), R("div", {
|
|
6029
6014
|
class: be(["mce-layout-item", [
|
|
6030
6015
|
`mce-layout-item--${e.position}`
|
|
6031
6016
|
]]),
|
|
@@ -6034,36 +6019,36 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6034
6019
|
Q(n.$slots, "default")
|
|
6035
6020
|
], 6));
|
|
6036
6021
|
}
|
|
6037
|
-
}),
|
|
6022
|
+
}), ja = {
|
|
6038
6023
|
key: 0,
|
|
6039
6024
|
class: "mce-main__scroller"
|
|
6040
|
-
},
|
|
6025
|
+
}, Ua = /* @__PURE__ */ X({
|
|
6041
6026
|
__name: "Main",
|
|
6042
6027
|
props: {
|
|
6043
6028
|
scrollable: Boolean
|
|
6044
6029
|
},
|
|
6045
6030
|
setup(o) {
|
|
6046
|
-
const e = o, { mainStyles: t } =
|
|
6047
|
-
return (n, s) => (
|
|
6031
|
+
const e = o, { mainStyles: t } = na();
|
|
6032
|
+
return (n, s) => (O(), R("main", {
|
|
6048
6033
|
class: be(["mce-main", [
|
|
6049
6034
|
{ "mce-main--scrollable": e.scrollable }
|
|
6050
6035
|
]]),
|
|
6051
6036
|
style: q([S(t)])
|
|
6052
6037
|
}, [
|
|
6053
|
-
e.scrollable ? (
|
|
6038
|
+
e.scrollable ? (O(), R("div", ja, [
|
|
6054
6039
|
Q(n.$slots, "default")
|
|
6055
6040
|
])) : Q(n.$slots, "default", { key: 1 })
|
|
6056
6041
|
], 6));
|
|
6057
6042
|
}
|
|
6058
|
-
}),
|
|
6043
|
+
}), Xa = { class: "progress-indicator" }, Ha = {
|
|
6059
6044
|
key: 0,
|
|
6060
6045
|
class: "progress-indicator__status"
|
|
6061
|
-
},
|
|
6046
|
+
}, Ya = { class: "progress-indicator__bar" }, qa = {
|
|
6062
6047
|
key: 1,
|
|
6063
6048
|
class: "progress-indicator__bar-indeterminate"
|
|
6064
|
-
},
|
|
6049
|
+
}, Ga = /* @__PURE__ */ X({
|
|
6065
6050
|
__name: "ProgressIndicator",
|
|
6066
|
-
props: /* @__PURE__ */
|
|
6051
|
+
props: /* @__PURE__ */ Oe({
|
|
6067
6052
|
label: {},
|
|
6068
6053
|
indeterminate: { type: Boolean }
|
|
6069
6054
|
}, {
|
|
@@ -6073,10 +6058,10 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6073
6058
|
emits: ["update:modelValue"],
|
|
6074
6059
|
setup(o) {
|
|
6075
6060
|
const e = ke(o, "modelValue");
|
|
6076
|
-
return (t, n) => (
|
|
6077
|
-
o.label ? (
|
|
6078
|
-
F("div",
|
|
6079
|
-
o.indeterminate ? (
|
|
6061
|
+
return (t, n) => (O(), R("div", Xa, [
|
|
6062
|
+
o.label ? (O(), R("span", Ha, K(o.label), 1)) : ee("", !0),
|
|
6063
|
+
F("div", Ya, [
|
|
6064
|
+
o.indeterminate ? (O(), R("div", qa)) : (O(), R("div", {
|
|
6080
6065
|
key: 0,
|
|
6081
6066
|
class: "progress-indicator__bar-fill",
|
|
6082
6067
|
style: q({ width: `${e.value * 100}%` })
|
|
@@ -6089,7 +6074,7 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6089
6074
|
for (const [n, s] of e)
|
|
6090
6075
|
t[n] = s;
|
|
6091
6076
|
return t;
|
|
6092
|
-
},
|
|
6077
|
+
}, Wa = /* @__PURE__ */ pn(Ga, [["__scopeId", "data-v-c4234331"]]), Ka = { class: "mce-statusbar" }, Ja = { class: "mce-statusbar__main" }, Za = { class: "mce-statusbar__item" }, Qa = { class: "mce-statusbar__kbd" }, ei = { class: "mce-statusbar__kbd" }, ti = { class: "mce-statusbar__item" }, ni = { class: "mce-statusbar__kbd" }, oi = { class: "mce-statusbar__item" }, si = { class: "mce-statusbar__item" }, ai = { class: "mce-statusbar__kbd" }, ii = { class: "mce-statusbar__item" }, ri = { class: "mce-statusbar__kbd" }, li = { key: 2 }, ci = { class: "mce-statusbar__item" }, ui = { class: "mce-statusbar__item" }, di = { class: "mce-statusbar__kbd" }, mi = { class: "mce-statusbar__item" }, hi = { class: "mce-statusbar__item" }, fi = { class: "mce-statusbar__kbd" }, pi = { class: "mce-statusbar__item" }, vi = { class: "mce-statusbar__progress" }, yi = /* @__PURE__ */ X({
|
|
6093
6078
|
__name: "Statusbar",
|
|
6094
6079
|
setup(o) {
|
|
6095
6080
|
const {
|
|
@@ -6099,70 +6084,70 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6099
6084
|
exporting: s,
|
|
6100
6085
|
exportProgress: a
|
|
6101
6086
|
} = de();
|
|
6102
|
-
return (r, i) => (
|
|
6103
|
-
F("div",
|
|
6104
|
-
S(e) === "typing" ? (
|
|
6105
|
-
F("div",
|
|
6106
|
-
F("span",
|
|
6107
|
-
F("span",
|
|
6087
|
+
return (r, i) => (O(), R("div", Ka, [
|
|
6088
|
+
F("div", Ja, [
|
|
6089
|
+
S(e) === "typing" ? (O(), R(se, { key: 0 }, [
|
|
6090
|
+
F("div", Za, [
|
|
6091
|
+
F("span", Qa, K(S(n)("Command")), 1),
|
|
6092
|
+
F("span", ei, K(S(n)("Enter")), 1)
|
|
6108
6093
|
]),
|
|
6109
6094
|
i[1] || (i[1] = F("span", null, "/", -1)),
|
|
6110
|
-
F("div",
|
|
6111
|
-
F("span",
|
|
6095
|
+
F("div", ti, [
|
|
6096
|
+
F("span", ni, K(S(n)("Escape")), 1),
|
|
6112
6097
|
F("span", null, K(S(t)("commitChanges")), 1)
|
|
6113
6098
|
])
|
|
6114
|
-
], 64)) : S(e) === "transforming" ? (
|
|
6115
|
-
F("div",
|
|
6099
|
+
], 64)) : S(e) === "transforming" ? (O(), R(se, { key: 1 }, [
|
|
6100
|
+
F("div", oi, [
|
|
6116
6101
|
H(Ae, { icon: "$mouseRightClick" })
|
|
6117
6102
|
]),
|
|
6118
6103
|
i[2] || (i[2] = F("span", null, " / ", -1)),
|
|
6119
|
-
F("div",
|
|
6120
|
-
F("span",
|
|
6104
|
+
F("div", si, [
|
|
6105
|
+
F("span", ai, K(S(n)("Escape")), 1),
|
|
6121
6106
|
F("span", null, K(S(t)("cancel")), 1)
|
|
6122
6107
|
]),
|
|
6123
6108
|
i[3] || (i[3] = F("div", { class: "mce-statusbar__divider" }, null, -1)),
|
|
6124
|
-
F("div",
|
|
6125
|
-
F("span",
|
|
6109
|
+
F("div", ii, [
|
|
6110
|
+
F("span", ri, K(S(n)("Shift")), 1),
|
|
6126
6111
|
F("span", null, K(S(t)("constrainToAxis")), 1)
|
|
6127
6112
|
])
|
|
6128
|
-
], 64)) : S(e) ? (
|
|
6129
|
-
F("div",
|
|
6113
|
+
], 64)) : S(e) ? (O(), R("span", li, K(S(t)(S(e))), 1)) : (O(), R(se, { key: 3 }, [
|
|
6114
|
+
F("div", ci, [
|
|
6130
6115
|
H(Ae, { icon: "$mouseLeftClick" }),
|
|
6131
6116
|
F("span", null, K(S(t)("selectObject")), 1)
|
|
6132
6117
|
]),
|
|
6133
6118
|
i[4] || (i[4] = F("span", null, " + ", -1)),
|
|
6134
|
-
F("div",
|
|
6135
|
-
F("span",
|
|
6119
|
+
F("div", ui, [
|
|
6120
|
+
F("span", di, K(S(n)("Shift")), 1),
|
|
6136
6121
|
F("span", null, K(S(t)("extend")), 1)
|
|
6137
6122
|
]),
|
|
6138
6123
|
i[5] || (i[5] = F("div", { class: "mce-statusbar__divider" }, null, -1)),
|
|
6139
|
-
F("div",
|
|
6124
|
+
F("div", mi, [
|
|
6140
6125
|
H(Ae, { icon: "$mouseLeftClick" }),
|
|
6141
6126
|
F("span", null, K(S(t)("selectArea")), 1)
|
|
6142
6127
|
]),
|
|
6143
6128
|
i[6] || (i[6] = F("span", null, " + ", -1)),
|
|
6144
|
-
F("div",
|
|
6145
|
-
F("span",
|
|
6129
|
+
F("div", hi, [
|
|
6130
|
+
F("span", fi, K(S(n)("Shift")), 1),
|
|
6146
6131
|
F("span", null, K(S(t)("extend")), 1)
|
|
6147
6132
|
]),
|
|
6148
6133
|
i[7] || (i[7] = F("div", { class: "mce-statusbar__divider" }, null, -1)),
|
|
6149
|
-
F("div",
|
|
6134
|
+
F("div", pi, [
|
|
6150
6135
|
H(Ae, { icon: "$mouseLeftClick" }),
|
|
6151
6136
|
F("span", null, K(S(t)("dragSelected")), 1)
|
|
6152
6137
|
])
|
|
6153
6138
|
], 64))
|
|
6154
6139
|
]),
|
|
6155
|
-
F("div",
|
|
6156
|
-
S(s) ? (
|
|
6140
|
+
F("div", vi, [
|
|
6141
|
+
S(s) ? (O(), oe(Wa, {
|
|
6157
6142
|
key: 0,
|
|
6158
6143
|
modelValue: S(a),
|
|
6159
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
6144
|
+
"onUpdate:modelValue": i[0] || (i[0] = (l) => Tn(a) ? a.value = l : null),
|
|
6160
6145
|
label: S(t)("exporting")
|
|
6161
6146
|
}, null, 8, ["modelValue", "label"])) : ee("", !0)
|
|
6162
6147
|
])
|
|
6163
6148
|
]));
|
|
6164
6149
|
}
|
|
6165
|
-
}),
|
|
6150
|
+
}), gi = /* @__PURE__ */ pn(yi, [["__scopeId", "data-v-36c89bd7"]]), bi = /* @__PURE__ */ X({
|
|
6166
6151
|
__name: "TextEditor",
|
|
6167
6152
|
setup(o, { expose: e }) {
|
|
6168
6153
|
const {
|
|
@@ -6172,15 +6157,15 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6172
6157
|
textToFit: a,
|
|
6173
6158
|
getObb: r,
|
|
6174
6159
|
registerCommand: i,
|
|
6175
|
-
unregisterCommand:
|
|
6176
|
-
camera:
|
|
6177
|
-
} = de(), u = V(), d =
|
|
6178
|
-
const { zoom: f, position: p } =
|
|
6160
|
+
unregisterCommand: l,
|
|
6161
|
+
camera: c
|
|
6162
|
+
} = de(), u = V(), d = $(() => {
|
|
6163
|
+
const { zoom: f, position: p } = c.value;
|
|
6179
6164
|
return {
|
|
6180
6165
|
transformOrigin: "left top",
|
|
6181
6166
|
transform: `translate(${p.x}px, ${p.y}px) scale(${f.x}, ${f.y})`
|
|
6182
6167
|
};
|
|
6183
|
-
}), g =
|
|
6168
|
+
}), g = $(() => {
|
|
6184
6169
|
const f = t.value[0], p = r(f), _ = f?.text.base?.boundingBox;
|
|
6185
6170
|
return _ && (p.left += _.left, p.top += _.top), {
|
|
6186
6171
|
...Me(p)
|
|
@@ -6201,9 +6186,9 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6201
6186
|
const _ = u.value;
|
|
6202
6187
|
return _.set(p.text.base), await Re(), _.pointerdown(f);
|
|
6203
6188
|
}
|
|
6204
|
-
return gt(() => i({ command: "startTyping", handle: y })), we(() =>
|
|
6189
|
+
return gt(() => i({ command: "startTyping", handle: y })), we(() => l("startTyping")), e({
|
|
6205
6190
|
textEditor: u
|
|
6206
|
-
}), (f, p) => ze((
|
|
6191
|
+
}), (f, p) => ze((O(), R("div", {
|
|
6207
6192
|
class: "mce-text-editor",
|
|
6208
6193
|
style: q({
|
|
6209
6194
|
...d.value
|
|
@@ -6231,24 +6216,24 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6231
6216
|
[Xe, S(t)[0] && S(n) === "typing"]
|
|
6232
6217
|
]);
|
|
6233
6218
|
}
|
|
6234
|
-
}),
|
|
6219
|
+
}), wi = { class: "mce-payhead" }, xi = /* @__PURE__ */ X({
|
|
6235
6220
|
__name: "Playhead",
|
|
6236
6221
|
setup(o) {
|
|
6237
|
-
return (e, t) => (
|
|
6222
|
+
return (e, t) => (O(), R("div", wi, [...t[0] || (t[0] = [
|
|
6238
6223
|
F("header", { class: "mce-payhead__header" }, null, -1),
|
|
6239
6224
|
F("main", { class: "mce-payhead__main" }, null, -1)
|
|
6240
6225
|
])]));
|
|
6241
6226
|
}
|
|
6242
|
-
}),
|
|
6227
|
+
}), _i = {
|
|
6243
6228
|
key: 0,
|
|
6244
6229
|
class: "mce-segment__edge mce-segment__edge--front"
|
|
6245
|
-
},
|
|
6230
|
+
}, ki = {
|
|
6246
6231
|
class: "mce-segment__node",
|
|
6247
6232
|
style: { overflow: "hidden" }
|
|
6248
|
-
},
|
|
6233
|
+
}, Ci = {
|
|
6249
6234
|
key: 1,
|
|
6250
6235
|
class: "mce-segment__edge mce-segment__edge--end"
|
|
6251
|
-
},
|
|
6236
|
+
}, Ei = /* @__PURE__ */ X({
|
|
6252
6237
|
__name: "Segment",
|
|
6253
6238
|
props: {
|
|
6254
6239
|
node: {},
|
|
@@ -6256,46 +6241,46 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6256
6241
|
active: { type: Boolean }
|
|
6257
6242
|
},
|
|
6258
6243
|
setup(o) {
|
|
6259
|
-
const e = o, t =
|
|
6244
|
+
const e = o, t = $(() => {
|
|
6260
6245
|
const n = { left: 0, top: 0, width: 0 };
|
|
6261
6246
|
return n.left = e.node.delay / e.msPerPx, n.width = e.node.duration / e.msPerPx, n.width ? n.width = `${n.width}px` : n.width = "100%", {
|
|
6262
6247
|
width: n.width,
|
|
6263
6248
|
transform: `matrix(1, 0, 0, 1, ${n.left}, ${n.top})`
|
|
6264
6249
|
};
|
|
6265
6250
|
});
|
|
6266
|
-
return (n, s) => (
|
|
6251
|
+
return (n, s) => (O(), R("div", {
|
|
6267
6252
|
class: be(["mce-segment", [
|
|
6268
6253
|
`mce-segment--${o.node.meta.inEditorIs}`,
|
|
6269
6254
|
o.active && "mce-segment--active"
|
|
6270
6255
|
]]),
|
|
6271
6256
|
style: q(t.value)
|
|
6272
6257
|
}, [
|
|
6273
|
-
o.active ? (
|
|
6274
|
-
F("span",
|
|
6275
|
-
o.active ? (
|
|
6258
|
+
o.active ? (O(), R("div", _i)) : ee("", !0),
|
|
6259
|
+
F("span", ki, K(e.node.name), 1),
|
|
6260
|
+
o.active ? (O(), R("div", Ci)) : ee("", !0)
|
|
6276
6261
|
], 6));
|
|
6277
6262
|
}
|
|
6278
|
-
}),
|
|
6263
|
+
}), Ti = { class: "mce-track" }, Ai = /* @__PURE__ */ X({
|
|
6279
6264
|
__name: "Track",
|
|
6280
6265
|
setup(o) {
|
|
6281
|
-
return (e, t) => (
|
|
6266
|
+
return (e, t) => (O(), R("div", Ti, [
|
|
6282
6267
|
Q(e.$slots, "default")
|
|
6283
6268
|
]));
|
|
6284
6269
|
}
|
|
6285
|
-
}),
|
|
6270
|
+
}), Si = /* @__PURE__ */ X({
|
|
6286
6271
|
__name: "Trackhead",
|
|
6287
6272
|
props: {
|
|
6288
6273
|
node: {}
|
|
6289
6274
|
},
|
|
6290
6275
|
setup(o) {
|
|
6291
|
-
return (e, t) => (
|
|
6276
|
+
return (e, t) => (O(), R("div", {
|
|
6292
6277
|
class: "mce-trackhead",
|
|
6293
6278
|
style: q({
|
|
6294
6279
|
height: `var(--timeline-track-height__${o.node.meta.inEditorIs}, 22px)`
|
|
6295
6280
|
})
|
|
6296
6281
|
}, K(o.node.meta.inEditorIs), 5));
|
|
6297
6282
|
}
|
|
6298
|
-
}),
|
|
6283
|
+
}), Mi = { class: "mce-timeline__toolbar" }, zi = { class: "mce-timeline__main" }, $i = { class: "mce-timeline__left" }, Oi = { class: "mce-timeline__left-wrapper" }, Ii = { class: "mce-timeline__right-wrapper" }, Fi = { class: "mce-timeline__ruler" }, Pi = { class: "mce-timeline__track" }, Ni = 0.02, Ri = /* @__PURE__ */ X({
|
|
6299
6284
|
__name: "Timeline",
|
|
6300
6285
|
setup(o) {
|
|
6301
6286
|
const {
|
|
@@ -6305,12 +6290,12 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6305
6290
|
timeline: s,
|
|
6306
6291
|
endTime: a,
|
|
6307
6292
|
selection: r
|
|
6308
|
-
} = de(), i = V(1e3 / 30),
|
|
6293
|
+
} = de(), i = V(1e3 / 30), l = ce("rulerTpl"), c = V(!0), u = V([0, 0]), d = $(() => e.value?.findAll((z) => !!(z instanceof G && z.children.some((I) => I instanceof Ln))) ?? []);
|
|
6309
6294
|
function g(z) {
|
|
6310
6295
|
if (z.ctrlKey) {
|
|
6311
6296
|
if (!(z.wheelDeltaY ? Math.abs(Math.abs(z.wheelDeltaY) - Math.abs(3 * z.deltaY)) < 3 : z.deltaMode === 0)) {
|
|
6312
6297
|
z.preventDefault();
|
|
6313
|
-
const E = t.value, C = Math.log(E), m = -z.deltaY *
|
|
6298
|
+
const E = t.value, C = Math.log(E), m = -z.deltaY * Ni, b = C + m;
|
|
6314
6299
|
t.value = Math.exp(b);
|
|
6315
6300
|
}
|
|
6316
6301
|
} else
|
|
@@ -6320,7 +6305,7 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6320
6305
|
];
|
|
6321
6306
|
}
|
|
6322
6307
|
function h(z) {
|
|
6323
|
-
const I =
|
|
6308
|
+
const I = l.value?.box;
|
|
6324
6309
|
if (I) {
|
|
6325
6310
|
n.value = (z.clientX - I.left + u.value[0]) * t.value;
|
|
6326
6311
|
const E = (m) => {
|
|
@@ -6340,7 +6325,7 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6340
6325
|
}
|
|
6341
6326
|
let y;
|
|
6342
6327
|
function f() {
|
|
6343
|
-
|
|
6328
|
+
c.value = !1;
|
|
6344
6329
|
let z;
|
|
6345
6330
|
function I(E) {
|
|
6346
6331
|
z !== void 0 && E !== void 0 && s.value.addTime(E - z), z = E, y = requestAnimationFrame(I);
|
|
@@ -6348,35 +6333,35 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6348
6333
|
I();
|
|
6349
6334
|
}
|
|
6350
6335
|
function p() {
|
|
6351
|
-
|
|
6336
|
+
c.value = !0, y !== void 0 && (cancelAnimationFrame(y), y = void 0);
|
|
6352
6337
|
}
|
|
6353
6338
|
function _() {
|
|
6354
|
-
|
|
6339
|
+
c.value ? f() : p();
|
|
6355
6340
|
}
|
|
6356
|
-
return we(p), (z, I) => (
|
|
6341
|
+
return we(p), (z, I) => (O(), R("div", {
|
|
6357
6342
|
class: "mce-timeline",
|
|
6358
6343
|
onWheel: I[0] || (I[0] = Ke(() => {
|
|
6359
6344
|
}, ["prevent"]))
|
|
6360
6345
|
}, [
|
|
6361
|
-
F("div",
|
|
6346
|
+
F("div", Mi, [
|
|
6362
6347
|
F("div", {
|
|
6363
6348
|
class: "mce-timeline__play",
|
|
6364
6349
|
onClick: _
|
|
6365
6350
|
}, [
|
|
6366
6351
|
H(Ae, {
|
|
6367
|
-
icon:
|
|
6352
|
+
icon: c.value ? "$play" : "$pause"
|
|
6368
6353
|
}, null, 8, ["icon"])
|
|
6369
6354
|
])
|
|
6370
6355
|
]),
|
|
6371
|
-
F("div",
|
|
6356
|
+
F("div", zi, [
|
|
6372
6357
|
F("div", $i, [
|
|
6373
|
-
F("div",
|
|
6358
|
+
F("div", Oi, [
|
|
6374
6359
|
F("div", {
|
|
6375
6360
|
style: q({
|
|
6376
6361
|
transform: `translateY(${u.value[1]}px)`
|
|
6377
6362
|
})
|
|
6378
6363
|
}, [
|
|
6379
|
-
(
|
|
6364
|
+
(O(!0), R(se, null, _e(d.value, (E, C) => (O(), oe(Si, {
|
|
6380
6365
|
key: C,
|
|
6381
6366
|
node: E
|
|
6382
6367
|
}, null, 8, ["node"]))), 128))
|
|
@@ -6388,8 +6373,8 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6388
6373
|
onWheel: g,
|
|
6389
6374
|
onMousedown: h
|
|
6390
6375
|
}, [
|
|
6391
|
-
F("div",
|
|
6392
|
-
F("div",
|
|
6376
|
+
F("div", Ii, [
|
|
6377
|
+
F("div", Fi, [
|
|
6393
6378
|
H(ft, {
|
|
6394
6379
|
ref: "rulerTpl",
|
|
6395
6380
|
zoom: 1 / S(t) * i.value,
|
|
@@ -6400,16 +6385,16 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6400
6385
|
"label-format": v
|
|
6401
6386
|
}, null, 8, ["zoom", "position"])
|
|
6402
6387
|
]),
|
|
6403
|
-
F("div",
|
|
6388
|
+
F("div", Pi, [
|
|
6404
6389
|
F("div", {
|
|
6405
6390
|
style: q({
|
|
6406
6391
|
width: `${S(a) / S(t)}px`,
|
|
6407
6392
|
transform: `translate(${u.value[0]}px, ${u.value[1]}px)`
|
|
6408
6393
|
})
|
|
6409
6394
|
}, [
|
|
6410
|
-
(
|
|
6395
|
+
(O(!0), R(se, null, _e(d.value, (E, C) => (O(), oe(Ai, { key: C }, {
|
|
6411
6396
|
default: ne(() => [
|
|
6412
|
-
H(
|
|
6397
|
+
H(Ei, {
|
|
6413
6398
|
node: E,
|
|
6414
6399
|
"ms-per-px": S(t),
|
|
6415
6400
|
active: S(r).some((m) => m.equal(E)),
|
|
@@ -6420,7 +6405,7 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6420
6405
|
}, 1024))), 128))
|
|
6421
6406
|
], 4)
|
|
6422
6407
|
]),
|
|
6423
|
-
H(
|
|
6408
|
+
H(xi, {
|
|
6424
6409
|
style: q({
|
|
6425
6410
|
transform: `translate(${u.value[0] + Math.ceil(S(n) / S(t))}px, 0px)`
|
|
6426
6411
|
})
|
|
@@ -6430,19 +6415,19 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6430
6415
|
])
|
|
6431
6416
|
], 32));
|
|
6432
6417
|
}
|
|
6433
|
-
}),
|
|
6418
|
+
}), Bi = ["data-pixel-ratio"], Li = {
|
|
6434
6419
|
ref: "canvasTpl",
|
|
6435
6420
|
class: "mce-editor__canvas"
|
|
6436
|
-
},
|
|
6421
|
+
}, Di = {
|
|
6437
6422
|
ref: "overlayContainerTpl",
|
|
6438
6423
|
class: "mce-editor__overlay-container"
|
|
6439
|
-
},
|
|
6424
|
+
}, or = /* @__PURE__ */ X({
|
|
6440
6425
|
__name: "EditorLayout",
|
|
6441
6426
|
props: {
|
|
6442
|
-
...
|
|
6443
|
-
resizeStrategy:
|
|
6444
|
-
activeStrategy:
|
|
6445
|
-
hoverStrategy:
|
|
6427
|
+
...qs({
|
|
6428
|
+
resizeStrategy: Gs,
|
|
6429
|
+
activeStrategy: Ws,
|
|
6430
|
+
hoverStrategy: Ks
|
|
6446
6431
|
}),
|
|
6447
6432
|
editor: Le
|
|
6448
6433
|
},
|
|
@@ -6450,13 +6435,13 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6450
6435
|
setup(o, { emit: e }) {
|
|
6451
6436
|
const t = o, n = e;
|
|
6452
6437
|
let s;
|
|
6453
|
-
t.editor ? s =
|
|
6438
|
+
t.editor ? s = Bs(t.editor) : s = de(), De(mn, js());
|
|
6454
6439
|
const {
|
|
6455
6440
|
config: a,
|
|
6456
6441
|
drawboardDom: r,
|
|
6457
6442
|
renderEngine: i,
|
|
6458
|
-
camera:
|
|
6459
|
-
bindRenderCanvas:
|
|
6443
|
+
camera: l,
|
|
6444
|
+
bindRenderCanvas: c,
|
|
6460
6445
|
hoverElement: u,
|
|
6461
6446
|
state: d,
|
|
6462
6447
|
setCursor: g,
|
|
@@ -6469,15 +6454,15 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6469
6454
|
drawboardAabb: z,
|
|
6470
6455
|
drawboardPointer: I
|
|
6471
6456
|
} = s, E = ce("overlayContainerTpl"), C = ce("canvasTpl"), m = ce("selectorTpl"), b = ce("textEditorTpl"), k = V({ left: 0, top: 0, width: 0, height: 0 });
|
|
6472
|
-
|
|
6473
|
-
attach:
|
|
6457
|
+
Hs({
|
|
6458
|
+
attach: $(() => E.value)
|
|
6474
6459
|
}), Ht(C, (A) => {
|
|
6475
6460
|
const { width: N, height: L } = A[0].contentRect;
|
|
6476
6461
|
i.value.resize(N, L);
|
|
6477
6462
|
}), gt(() => {
|
|
6478
6463
|
i.value.on("pointerdown", T), i.value.on("pointermove", M), i.value.on("pointerover", P);
|
|
6479
6464
|
}), He(() => {
|
|
6480
|
-
|
|
6465
|
+
c(C.value, r.value);
|
|
6481
6466
|
}), we(() => {
|
|
6482
6467
|
i.value.off("pointerdown", T), i.value.off("pointermove", M), i.value.off("pointerover", P);
|
|
6483
6468
|
});
|
|
@@ -6503,7 +6488,7 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6503
6488
|
u.value = L, g(N);
|
|
6504
6489
|
}
|
|
6505
6490
|
function T(A) {
|
|
6506
|
-
if (A.srcElement !== r.value && A.srcElement.dataset?.pointerdown_to_drawboard === void 0 ||
|
|
6491
|
+
if (A.srcElement !== r.value && A.srcElement.dataset?.pointerdown_to_drawboard === void 0 || l.value.spaceKey || ![0, 2].includes(A.button))
|
|
6507
6492
|
return;
|
|
6508
6493
|
const N = p.value[0], L = A.target, j = { x: A.clientX, y: A.clientY };
|
|
6509
6494
|
let D = { ...j }, U = !1, W = !1, Z = [], he;
|
|
@@ -6577,7 +6562,7 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6577
6562
|
i.value.on("pointermove", J), document.addEventListener("pointermove", me), document.addEventListener("pointerup", ue);
|
|
6578
6563
|
}
|
|
6579
6564
|
function M(A) {
|
|
6580
|
-
A.srcElement === r.value && (I.value = { x: A.clientX, y: A.clientY }, !(
|
|
6565
|
+
A.srcElement === r.value && (I.value = { x: A.clientX, y: A.clientY }, !(l.value.grabbing || A.button === 1 || d.value && d.value !== "typing") && w(A));
|
|
6581
6566
|
}
|
|
6582
6567
|
function P() {
|
|
6583
6568
|
I.value = void 0, u.value = void 0, g(void 0);
|
|
@@ -6585,10 +6570,10 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6585
6570
|
function B() {
|
|
6586
6571
|
r.value && (r.value.scrollLeft && (r.value.scrollLeft = 0), r.value.scrollTop && (r.value.scrollTop = 0));
|
|
6587
6572
|
}
|
|
6588
|
-
return (A, N) => (
|
|
6573
|
+
return (A, N) => (O(), oe(Va, { class: "mce-editor" }, {
|
|
6589
6574
|
default: ne(() => [
|
|
6590
|
-
H(
|
|
6591
|
-
H(
|
|
6575
|
+
H(Da),
|
|
6576
|
+
H(Ua, null, {
|
|
6592
6577
|
default: ne(() => [
|
|
6593
6578
|
F("div", {
|
|
6594
6579
|
ref_key: "drawboardDom",
|
|
@@ -6600,13 +6585,13 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6600
6585
|
onWheel: N[1] || (N[1] = Ke(() => {
|
|
6601
6586
|
}, ["prevent"]))
|
|
6602
6587
|
}, [
|
|
6603
|
-
F("canvas",
|
|
6604
|
-
H(
|
|
6605
|
-
H(
|
|
6606
|
-
H(
|
|
6607
|
-
H(
|
|
6608
|
-
H(
|
|
6609
|
-
H(
|
|
6588
|
+
F("canvas", Li, null, 512),
|
|
6589
|
+
H(bi, { ref: "textEditorTpl" }, null, 512),
|
|
6590
|
+
H(Zs),
|
|
6591
|
+
H(_a),
|
|
6592
|
+
H(ba),
|
|
6593
|
+
H(va),
|
|
6594
|
+
H(La, {
|
|
6610
6595
|
ref: "selectorTpl",
|
|
6611
6596
|
"selected-area": k.value,
|
|
6612
6597
|
"resize-strategy": S(p)[0] ? t.resizeStrategy(S(p)[0]) : void 0
|
|
@@ -6619,8 +6604,8 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6619
6604
|
]),
|
|
6620
6605
|
_: 3
|
|
6621
6606
|
}, 8, ["selected-area", "resize-strategy"]),
|
|
6622
|
-
S(a).scrollbar ? (
|
|
6623
|
-
A.$slots.floatbar ? (
|
|
6607
|
+
S(a).scrollbar ? (O(), oe($a, { key: 0 })) : ee("", !0),
|
|
6608
|
+
A.$slots.floatbar ? (O(), oe(ya, {
|
|
6624
6609
|
key: 1,
|
|
6625
6610
|
target: S(d) === "typing" ? b.value?.textEditor : m.value?.transformable?.$el
|
|
6626
6611
|
}, {
|
|
@@ -6629,11 +6614,11 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6629
6614
|
]),
|
|
6630
6615
|
_: 3
|
|
6631
6616
|
}, 8, ["target"])) : ee("", !0),
|
|
6632
|
-
H(
|
|
6633
|
-
H(
|
|
6634
|
-
S(a).ruler ? (
|
|
6617
|
+
H(fa),
|
|
6618
|
+
H(wa),
|
|
6619
|
+
S(a).ruler ? (O(), oe(Sa, { key: 2 })) : ee("", !0),
|
|
6635
6620
|
Q(A.$slots, "drawboard")
|
|
6636
|
-
], 40,
|
|
6621
|
+
], 40, Bi)
|
|
6637
6622
|
]),
|
|
6638
6623
|
_: 3
|
|
6639
6624
|
}),
|
|
@@ -6645,7 +6630,7 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6645
6630
|
size: 24
|
|
6646
6631
|
}, {
|
|
6647
6632
|
default: ne(() => [
|
|
6648
|
-
H(
|
|
6633
|
+
H(gi)
|
|
6649
6634
|
]),
|
|
6650
6635
|
_: 1
|
|
6651
6636
|
}, 8, ["modelValue"]),
|
|
@@ -6656,18 +6641,18 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6656
6641
|
size: 160
|
|
6657
6642
|
}, {
|
|
6658
6643
|
default: ne(() => [
|
|
6659
|
-
H(
|
|
6644
|
+
H(Ri)
|
|
6660
6645
|
]),
|
|
6661
6646
|
_: 1
|
|
6662
6647
|
}, 8, ["modelValue"]),
|
|
6663
|
-
F("div",
|
|
6648
|
+
F("div", Di, null, 512)
|
|
6664
6649
|
]),
|
|
6665
6650
|
_: 3
|
|
6666
6651
|
}));
|
|
6667
6652
|
}
|
|
6668
|
-
}),
|
|
6653
|
+
}), sr = /* @__PURE__ */ X({
|
|
6669
6654
|
__name: "Dialog",
|
|
6670
|
-
props: /* @__PURE__ */
|
|
6655
|
+
props: /* @__PURE__ */ Oe({
|
|
6671
6656
|
...qe()
|
|
6672
6657
|
}, {
|
|
6673
6658
|
modelValue: { type: Boolean },
|
|
@@ -6675,7 +6660,7 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6675
6660
|
}),
|
|
6676
6661
|
emits: ["update:modelValue"],
|
|
6677
6662
|
setup(o, { expose: e }) {
|
|
6678
|
-
const t = o, n = ke(o, "modelValue"), s = ce("overlayTpl"), a =
|
|
6663
|
+
const t = o, n = ke(o, "modelValue"), s = ce("overlayTpl"), a = $(() => ({
|
|
6679
6664
|
onClick: () => n.value = !0
|
|
6680
6665
|
}));
|
|
6681
6666
|
function r() {
|
|
@@ -6684,19 +6669,19 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6684
6669
|
return e({
|
|
6685
6670
|
isActive: n,
|
|
6686
6671
|
updateLocation: r
|
|
6687
|
-
}), (i,
|
|
6672
|
+
}), (i, l) => (O(), oe(ot, {
|
|
6688
6673
|
ref: "overlayTpl",
|
|
6689
6674
|
modelValue: n.value,
|
|
6690
|
-
"onUpdate:modelValue":
|
|
6675
|
+
"onUpdate:modelValue": l[0] || (l[0] = (c) => n.value = c),
|
|
6691
6676
|
location: t.location,
|
|
6692
6677
|
offset: t.offset,
|
|
6693
6678
|
target: t.target,
|
|
6694
6679
|
attach: t.attach,
|
|
6695
6680
|
class: "mce-dialog"
|
|
6696
6681
|
}, {
|
|
6697
|
-
activator: ne((
|
|
6698
|
-
Q(i.$slots, "activator",
|
|
6699
|
-
props: { ...
|
|
6682
|
+
activator: ne((c) => [
|
|
6683
|
+
Q(i.$slots, "activator", $e(c, {
|
|
6684
|
+
props: { ...c.props, ...a.value }
|
|
6700
6685
|
}))
|
|
6701
6686
|
]),
|
|
6702
6687
|
default: ne(() => [
|
|
@@ -6707,10 +6692,10 @@ const Pt = Symbol.for("MceMenuSymbol"), Ae = /* @__PURE__ */ X({
|
|
|
6707
6692
|
}
|
|
6708
6693
|
});
|
|
6709
6694
|
export {
|
|
6710
|
-
|
|
6695
|
+
sr as Dialog,
|
|
6711
6696
|
un as Doc,
|
|
6712
6697
|
Le as Editor,
|
|
6713
|
-
|
|
6698
|
+
or as EditorLayout,
|
|
6714
6699
|
Bt as EditorLayoutItem,
|
|
6715
6700
|
mn as IconsSymbol,
|
|
6716
6701
|
It as MceComponentIcon,
|
|
@@ -6719,27 +6704,27 @@ export {
|
|
|
6719
6704
|
Pt as MceMenuSymbol,
|
|
6720
6705
|
ht as MceOverlaySymbol,
|
|
6721
6706
|
dn as MceSvgIcon,
|
|
6722
|
-
|
|
6707
|
+
da as Menu,
|
|
6723
6708
|
ln as Model,
|
|
6724
6709
|
ft as Ruler,
|
|
6725
6710
|
Tt as SUPPORTS_CLIPBOARD,
|
|
6726
6711
|
Rt as Scrollbar,
|
|
6727
|
-
|
|
6712
|
+
Ba as Transformable,
|
|
6728
6713
|
Qt as USER_AGENT,
|
|
6729
6714
|
nt as Workspace,
|
|
6730
6715
|
Me as boundingBoxToStyle,
|
|
6731
|
-
|
|
6716
|
+
Qi as consoleError,
|
|
6732
6717
|
uo as consoleWarn,
|
|
6733
6718
|
Ge as convertToUnit,
|
|
6734
|
-
|
|
6719
|
+
js as createIcons,
|
|
6735
6720
|
dt as createImageElement,
|
|
6736
|
-
|
|
6721
|
+
aa as createLayout,
|
|
6737
6722
|
ut as createTextElement,
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
|
|
6723
|
+
Ws as defaultActiveStrategy,
|
|
6724
|
+
Ks as defaultHoverStrategy,
|
|
6725
|
+
Gs as defaultResizeStrategy,
|
|
6726
|
+
nr as defineMixin,
|
|
6727
|
+
tr as definePlugin,
|
|
6743
6728
|
je as findChildrenWithProvide,
|
|
6744
6729
|
ho as getImageSizeFromUrl,
|
|
6745
6730
|
go as getRandomValues,
|
|
@@ -6754,24 +6739,24 @@ export {
|
|
|
6754
6739
|
Et as isPointInsideAabb,
|
|
6755
6740
|
mo as isWindows,
|
|
6756
6741
|
_t as makeIconProps,
|
|
6757
|
-
|
|
6758
|
-
|
|
6742
|
+
ta as makeLayoutItemProps,
|
|
6743
|
+
ea as makeLayoutProps,
|
|
6759
6744
|
qe as makeMceOverlayProps,
|
|
6760
|
-
|
|
6761
|
-
|
|
6745
|
+
qs as makeMceStrategyProps,
|
|
6746
|
+
Zi as minBoundingBox,
|
|
6762
6747
|
os as mixins,
|
|
6763
|
-
|
|
6748
|
+
Rs as plugins,
|
|
6764
6749
|
tn as propsFactory,
|
|
6765
|
-
|
|
6766
|
-
|
|
6750
|
+
Bs as provideEditor,
|
|
6751
|
+
Hs as provideOverlay,
|
|
6767
6752
|
vo as refElement,
|
|
6768
6753
|
yo as templateRef,
|
|
6769
6754
|
bo as uint32,
|
|
6770
6755
|
de as useEditor,
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
|
|
6776
|
-
|
|
6756
|
+
Ls as useIcon,
|
|
6757
|
+
na as useLayout,
|
|
6758
|
+
oa as useLayoutItem,
|
|
6759
|
+
Ys as useOverlay,
|
|
6760
|
+
Qs as useResizeObserver,
|
|
6761
|
+
er as uuidv4
|
|
6777
6762
|
};
|