@mce/bigesj 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.
@@ -0,0 +1 @@
1
+ export declare function convertImageElementToUrl(el: Record<string, any>): Promise<string>;
@@ -1,4 +1,7 @@
1
1
  export * from './animation';
2
2
  export * from './doc';
3
3
  export * from './element';
4
+ export * from './image';
4
5
  export * from './layout';
6
+ export * from './svg';
7
+ export * from './text';
@@ -0,0 +1 @@
1
+ export declare function convertSvgElementToUrl(el: Record<string, any>): Promise<string>;
package/dist/index.js CHANGED
@@ -1,70 +1,70 @@
1
- import { useEditor as k, definePlugin as O } from "mce";
2
- import { Element2D as v } from "modern-canvas";
3
- import { ref as D, effectScope as Q, getCurrentScope as X, onScopeDispose as G, onBeforeUnmount as W } from "vue";
4
- import { idGenerator as h, normalizeCRLF as F, isGradient as P } from "modern-idoc";
5
- import { gunzipSync as B } from "fflate";
6
- const C = D([]);
7
- function J(e, r) {
8
- const n = [];
1
+ import { useEditor as rt, definePlugin as ot } from "mce";
2
+ import { assets as B, Element2D as nt } from "modern-canvas";
3
+ import { ref as Z, effectScope as it, getCurrentScope as ft, onScopeDispose as ct, onBeforeUnmount as lt } from "vue";
4
+ import { idGenerator as U, normalizeCRLF as Mt, isGradient as dt } from "modern-idoc";
5
+ import { gunzipSync as Lt } from "fflate";
6
+ const X = Z([]);
7
+ function wt(e, r) {
8
+ const o = [];
9
9
  for (let t = 0; t <= r.length; t++)
10
- n[t] = [t];
10
+ o[t] = [t];
11
11
  for (let t = 0; t <= e.length; t++)
12
- n[0][t] = t;
12
+ o[0][t] = t;
13
13
  for (let t = 1; t <= r.length; t++)
14
- for (let i = 1; i <= e.length; i++) {
15
- const o = e[i - 1] === r[t - 1] ? 0 : 1;
16
- n[t][i] = Math.min(n[t - 1][i] + 1, n[t][i - 1] + 1, n[t - 1][i - 1] + o);
14
+ for (let s = 1; s <= e.length; s++) {
15
+ const n = e[s - 1] === r[t - 1] ? 0 : 1;
16
+ o[t][s] = Math.min(o[t - 1][s] + 1, o[t][s - 1] + 1, o[t - 1][s - 1] + n);
17
17
  }
18
- return n[r.length][e.length];
18
+ return o[r.length][e.length];
19
19
  }
20
- function U() {
20
+ function mt() {
21
21
  const {
22
22
  loadFont: e
23
- } = k(), r = D(/* @__PURE__ */ new Map());
24
- async function n(o) {
25
- let s = C.value;
26
- return s.length || (s = await fetch(o).then((f) => f.json()).then((f) => f.data.datalist), C.value = s), s;
23
+ } = rt(), r = Z(/* @__PURE__ */ new Map());
24
+ async function o(n) {
25
+ let i = X.value;
26
+ return i.length || (i = await fetch(n).then((f) => f.json()).then((f) => f.data.datalist), X.value = i), i;
27
27
  }
28
- function t(o, s = C.value) {
29
- const f = new Map(s.map((a, c) => [a.id, c])), L = new Map(
30
- s.flatMap((a, c) => [...a.en_name.split(","), ...a.name.split(",")].map((l) => [l, c]))
31
- ), d = o.replace(/"/g, "").split(",");
32
- let M;
28
+ function t(n, i = X.value) {
29
+ const f = new Map(i.map((a, l) => [a.id, l])), M = new Map(
30
+ i.flatMap((a, l) => [...a.en_name.split(","), ...a.name.split(",")].map((L) => [L, l]))
31
+ ), d = n.replace(/"/g, "").split(",");
32
+ let c;
33
33
  if (d.forEach((a) => {
34
- M ??= f.get(a), M ??= L.get(a);
35
- }), M === void 0) {
34
+ c ??= f.get(a), c ??= M.get(a);
35
+ }), c === void 0) {
36
36
  let a;
37
- d.forEach((c) => {
38
- let l = c;
39
- l.endsWith(" R") ? l = `${l.substring(0, l.length - 2)}常规` : l.endsWith(" B") && (l = `${l.substring(0, l.length - 2)}粗体`);
40
- const w = l.length;
41
- L.forEach((u, m) => {
42
- const y = J(l, m);
43
- if (w <= y)
37
+ d.forEach((l) => {
38
+ let L = l;
39
+ L.endsWith(" R") ? L = `${L.substring(0, L.length - 2)}常规` : L.endsWith(" B") && (L = `${L.substring(0, L.length - 2)}粗体`);
40
+ const w = L.length;
41
+ M.forEach((y, m) => {
42
+ const C = wt(L, m);
43
+ if (w <= C)
44
44
  return;
45
- const j = -(y * 0.9 + (m.endsWith("常规") ? 0 : 1) * 0.1);
46
- (a === void 0 || j > a) && (a = j, M = u);
45
+ const j = -(C * 0.9 + (m.endsWith("常规") ? 0 : 1) * 0.1);
46
+ (a === void 0 || j > a) && (a = j, c = y);
47
47
  });
48
48
  });
49
49
  }
50
- return M !== void 0 ? s[M] : void 0;
50
+ return c !== void 0 ? i[c] : void 0;
51
51
  }
52
- async function i(o) {
53
- const s = typeof o == "string" ? [o] : o, f = [];
54
- for (const L of s) {
55
- let d = r.value.get(L);
52
+ async function s(n) {
53
+ const i = typeof n == "string" ? [n] : n, f = [];
54
+ for (const M of i) {
55
+ let d = r.value.get(M);
56
56
  if (!d) {
57
- const M = t(L);
58
- if (M && (d = r.value.get(M.en_name), !d)) {
57
+ const c = t(M);
58
+ if (c && (d = r.value.get(c.en_name), !d)) {
59
59
  const a = Array.from(
60
60
  new Set(
61
- [L, M.en_name].filter(Boolean).map((c) => c.replace(/"/g, ""))
61
+ [M, c.en_name].filter(Boolean).map((l) => l.replace(/"/g, ""))
62
62
  )
63
63
  );
64
64
  d = e({
65
65
  family: a,
66
- src: M.fonturl
67
- }), a.forEach((c) => r.value.set(c, d)), r.value.set(String(L), d);
66
+ src: c.fonturl
67
+ }), a.forEach((l) => r.value.set(l, d)), r.value.set(String(M), d);
68
68
  }
69
69
  }
70
70
  d && f.push(d);
@@ -72,39 +72,39 @@ function U() {
72
72
  return await Promise.all(f);
73
73
  }
74
74
  return {
75
- bigeFonts: C,
75
+ bigeFonts: X,
76
76
  searchBigeFont: t,
77
- loadBigeFonts: n,
78
- loadFont: i
77
+ loadBigeFonts: o,
78
+ loadFont: s
79
79
  };
80
80
  }
81
- function R(e, r) {
82
- return X() ? (G(e, r), !0) : !1;
81
+ function ut(e, r) {
82
+ return ft() ? (ct(e, r), !0) : !1;
83
83
  }
84
- const Z = typeof window < "u" && typeof document < "u";
84
+ const gt = typeof window < "u" && typeof document < "u";
85
85
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
86
86
  // @__NO_SIDE_EFFECTS__
87
- function $(e) {
88
- if (!Z) return e;
89
- let r = 0, n, t;
90
- const i = () => {
91
- r -= 1, t && r <= 0 && (t.stop(), n = void 0, t = void 0);
87
+ function yt(e) {
88
+ if (!gt) return e;
89
+ let r = 0, o, t;
90
+ const s = () => {
91
+ r -= 1, t && r <= 0 && (t.stop(), o = void 0, t = void 0);
92
92
  };
93
- return ((...o) => (r += 1, t || (t = Q(!0), n = t.run(() => e(...o))), R(i), n));
93
+ return ((...n) => (r += 1, t || (t = it(!0), o = t.run(() => e(...n))), ut(s), o));
94
94
  }
95
- const I = /* @__PURE__ */ $(() => {
95
+ const _ = /* @__PURE__ */ yt(() => {
96
96
  const e = /* @__PURE__ */ new Map();
97
- function r(t, i) {
98
- let o = e.get(t);
99
- return o || (o = fetch(t).then(i), e.set(t, o)), o;
97
+ function r(t, s) {
98
+ let n = e.get(t);
99
+ return n || (n = fetch(t).then(s), e.set(t, n)), n;
100
100
  }
101
- async function n(t) {
102
- return r(t, (i) => i.text());
101
+ async function o(t) {
102
+ return r(t, (s) => s.text());
103
103
  }
104
104
  return {
105
- fetchToText: n
105
+ fetchToText: o
106
106
  };
107
- }), g = {
107
+ }), Y = {
108
108
  easing: {
109
109
  匀速: "linear",
110
110
  加速: "cubic-bezier(0.55, 0, 1, 0.45)",
@@ -437,66 +437,66 @@ const I = /* @__PURE__ */ $(() => {
437
437
  ]
438
438
  }
439
439
  };
440
- function A(e, r, n) {
440
+ function G(e, r, o) {
441
441
  const {
442
442
  name: t,
443
- delay: i = 0,
444
- duration: o,
445
- iterations: s,
443
+ delay: s = 0,
444
+ duration: n,
445
+ iterations: i,
446
446
  mode: f,
447
- easing: L,
447
+ easing: M,
448
448
  path: d,
449
- offsetRotate: M,
449
+ offsetRotate: c,
450
450
  ...a
451
451
  } = r;
452
- let c;
452
+ let l;
453
453
  if (t === "自定义路径" && d) {
454
- let l = `M ${e.style.width / 2} ${e.style.height / 2}`;
455
- d.forEach((u) => {
456
- const m = Object.keys(u);
457
- l += ` ${m[0]}${u[m[0]].join(" ")}`;
454
+ let L = `M ${e.style.width / 2} ${e.style.height / 2}`;
455
+ d.forEach((y) => {
456
+ const m = Object.keys(y);
457
+ L += ` ${m[0]}${y[m[0]].join(" ")}`;
458
458
  });
459
- const w = `path("${l}")`;
460
- switch (n) {
459
+ const w = `path("${L}")`;
460
+ switch (o) {
461
461
  case "in":
462
- c = [
463
- { opacity: 0, offsetDistance: "100%", offsetPath: w, offsetRotate: M },
464
- { offsetDistance: "0%", offsetPath: w, offsetRotate: M }
462
+ l = [
463
+ { opacity: 0, offsetDistance: "100%", offsetPath: w, offsetRotate: c },
464
+ { offsetDistance: "0%", offsetPath: w, offsetRotate: c }
465
465
  ];
466
466
  break;
467
467
  case "stay":
468
- c = [
469
- { offsetDistance: "0%", offsetPath: w, offsetRotate: M },
470
- { offsetDistance: "100%", offsetPath: w, offsetRotate: M }
468
+ l = [
469
+ { offsetDistance: "0%", offsetPath: w, offsetRotate: c },
470
+ { offsetDistance: "100%", offsetPath: w, offsetRotate: c }
471
471
  ];
472
472
  break;
473
473
  case "out":
474
- c = [
475
- { offsetDistance: "0%", offsetPath: w, offsetRotate: M },
476
- { opacity: 0, offsetDistance: "100%", offsetPath: w, offsetRotate: M }
474
+ l = [
475
+ { offsetDistance: "0%", offsetPath: w, offsetRotate: c },
476
+ { opacity: 0, offsetDistance: "100%", offsetPath: w, offsetRotate: c }
477
477
  ];
478
478
  break;
479
479
  }
480
480
  } else
481
- switch (n) {
481
+ switch (o) {
482
482
  case "in":
483
- c = g.textIn[t]?.[0] ?? g.in[t];
483
+ l = Y.textIn[t]?.[0] ?? Y.in[t];
484
484
  break;
485
485
  case "stay":
486
- c = g.stay[t];
486
+ l = Y.stay[t];
487
487
  break;
488
488
  case "out":
489
- c = g.out[t];
489
+ l = Y.out[t];
490
490
  break;
491
491
  }
492
492
  return {
493
- id: h(),
493
+ id: U(),
494
494
  name: r.name ?? r.title ?? r.id,
495
- delay: i,
496
- duration: t ? o * (s || 1) : 0,
495
+ delay: s,
496
+ duration: t ? n * (i || 1) : 0,
497
497
  effectMode: f === "逐字" || f === "逐行" ? "sibling" : "parent",
498
- keyframes: c ?? [],
499
- easing: g.easing[L],
498
+ keyframes: l ?? [],
499
+ easing: Y.easing[M],
500
500
  meta: {
501
501
  ...a,
502
502
  inCanvasIs: "Animation",
@@ -505,163 +505,338 @@ function A(e, r, n) {
505
505
  }
506
506
  };
507
507
  }
508
- function H(e) {
508
+ function jt(e) {
509
509
  if (!e.animations?.length)
510
510
  return {
511
511
  delay: 0,
512
512
  duration: 0,
513
513
  animations: []
514
514
  };
515
- let r, n, t;
516
- e.animations[0].in ? (r = e.animations[0].in, n = e.animations[0].stay, t = e.animations[0].out) : (r = e.animations?.find((f) => f.category === "in"), n = e.animations?.find((f) => f.category === "stay"), t = e.animations?.find((f) => f.category === "out"));
517
- const i = r?.delay ?? 0, o = t ? t.delay - i + t.duration : 0, s = [];
518
- return r && s.push(
519
- A(e, {
515
+ let r, o, t;
516
+ e.animations[0].in ? (r = e.animations[0].in, o = e.animations[0].stay, t = e.animations[0].out) : (r = e.animations?.find((f) => f.category === "in"), o = e.animations?.find((f) => f.category === "stay"), t = e.animations?.find((f) => f.category === "out"));
517
+ const s = r?.delay ?? 0, n = t ? t.delay - s + t.duration : 0, i = [];
518
+ return r && i.push(
519
+ G(e, {
520
520
  ...r,
521
521
  delay: 0
522
522
  }, "in")
523
- ), n && s.push(
524
- A(e, {
525
- ...n,
526
- delay: n.delay - i
523
+ ), o && i.push(
524
+ G(e, {
525
+ ...o,
526
+ delay: o.delay - s
527
527
  }, "stay")
528
- ), t && s.push(
529
- A(e, {
528
+ ), t && i.push(
529
+ G(e, {
530
530
  ...t,
531
- delay: t.delay - i
531
+ delay: t.delay - s
532
532
  }, "out")
533
533
  ), {
534
- delay: i,
535
- duration: o - i,
536
- animations: s.filter((f) => !!f?.keyframes)
534
+ delay: s,
535
+ duration: n - s,
536
+ animations: i.filter((f) => !!f?.keyframes)
537
537
  };
538
538
  }
539
- const _ = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNzIgNzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDcyIDcyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnPgoJPHBhdGggZD0iTTE5LjMsMzguMWMwLjIsMC41LDAuNCwwLjksMC43LDEuNGMwLjIsMC4zLDAuNCwwLjQsMC44LDAuNGMwLjMsMCwwLjUtMC4xLDAuNi0wLjRjMC4xLTAuMywwLjEtMC42LDAuMi0wLjkgICBjMC0wLjIsMC4xLTAuNCwwLjMtMC41YzAuMi0wLjEsMC40LTAuMiwwLjYtMC4xYzAuMiwwLDAuNCwwLjEsMC41LDAuM2MwLjEsMC4yLDAuMiwwLjQsMC4xLDAuNmMtMC4xLDAuNi0wLjIsMS4yLTAuNCwxLjcgICBjLTAuMywwLjgtMC45LDEuMi0xLjcsMS4yYy0wLjksMC0xLjYtMC40LTIuMS0xLjJjLTAuMy0wLjQtMC41LTAuOC0wLjctMS4zYy0wLjQsMC4zLTEsMC42LTEuNywxYy0wLjUsMC4yLTAuOCwwLjEtMS4xLTAuMyAgIGMtMC4yLTAuNS0wLjEtMC45LDAuMy0xLjFjMC43LTAuNCwxLjQtMC44LDEuOS0xLjFjLTAuMi0wLjktMC40LTIuMS0wLjUtMy43TDE1LjksMzRjLTAuMiwwLTAuNCwwLTAuNi0wLjEgICBjLTAuMi0wLjEtMC4zLTAuMy0wLjMtMC41YzAtMC4yLDAtMC40LDAuMi0wLjZzMC4zLTAuM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AuMS0wLjQsMC4yLTAuNmMwLjItMC4yLDAuMy0wLjIsMC42LTAuMmMwLjIsMCwwLjQsMC4xLDAuNiwwLjIgICBjMC4yLDAuMiwwLjIsMC40LDAuMiwwLjZWNDAuN3ogTTU2LjYsNDAuM2MwLjIsMC40LDAuMSwwLjgtMC4zLDEuMWMtMC41LDAuMy0wLjgsMC4yLTEuMS0wLjNsLTEtMS43Yy0wLjItMC41LTAuMS0wLjgsMC4zLTEuMSAgIGMwLjUtMC4yLDAuOS0wLjEsMS4xLDAuM0w1Ni42LDQwLjN6Ii8+CjwvZz4KPC9zdmc+";
540
- async function V(e, r = !1) {
541
- const { fetchToText: n } = I(), t = {
539
+ async function V(e) {
540
+ const {
541
+ transform: r = {},
542
+ style: o = {},
543
+ maskUrl: t,
544
+ imageEffects: s = [],
545
+ imageEffectsRatio: n = 1
546
+ } = e, i = e.clipUrl || e.url, {
547
+ translateX: f = 0,
548
+ translateY: M = 0,
549
+ zoom: d = 1
550
+ } = r ?? {}, {
551
+ scaleX: c = 1,
552
+ scaleY: a = 1,
553
+ filter: l
554
+ } = o;
555
+ if (f === 0 && M === 0 && d === 1 && c === 1 && a === 1 && !t && !l && !s.length)
556
+ return i;
557
+ const L = await B.fetchImageBitmap(i), {
558
+ originWidth: w = L.width,
559
+ originHeight: y = L.height,
560
+ imageWidth: m = w,
561
+ imageHeight: C = y
562
+ } = r, {
563
+ width: j = w,
564
+ height: h = y
565
+ } = o, D = window.devicePixelRatio || 1, [g, u] = W(j, h, D);
566
+ if (l && (u.filter = l), u.scale(c, a), u.translate(c < 0 ? -j : 0, a < 0 ? -h : 0), t) {
567
+ const T = await B.fetchImageBitmap(t);
568
+ u.drawImage(T, 0, 0, T.width, T.height, 0, 0, j, h), T.close(), u.globalCompositeOperation = "source-in";
569
+ }
570
+ const A = m * d, k = C * d, tt = -(A / 2 - m / 2) + f, et = -(k / 2 - C / 2) + M;
571
+ if (u.drawImage(L, 0, 0, L.width, L.height, tt, et, A, k), L.close(), u.globalCompositeOperation = "source-over", s.length > 0) {
572
+ const S = {
573
+ x: (j - j * 0.9) / 2,
574
+ y: (h - h * 0.9) / 2
575
+ }, v = await createImageBitmap(g);
576
+ u.clearRect(0, 0, g.width, g.height), u.scale(0.9, 0.9);
577
+ for (let F = s.length - 1; F >= 0; F--) {
578
+ const { filling: E, offset: R, stroke: at } = s[F];
579
+ let z = v;
580
+ if (E) {
581
+ const [I, x] = W(j, h, D);
582
+ if (x.drawImage(z, 0, 0, j, h), x.globalCompositeOperation = "source-in", E.color) {
583
+ const [p, N] = W(j, h, D);
584
+ N.fillStyle = E.color, N.fillRect(0, 0, j, h), x.drawImage(p, 0, 0, j, h);
585
+ } else if (E.imageContent?.image) {
586
+ const p = await B.fetchImageBitmap(E.imageContent.image);
587
+ x.drawImage(p, 0, 0, j, h), p.close();
588
+ }
589
+ z = I;
590
+ }
591
+ if (at?.forEach(({ width: I, color: x }) => {
592
+ z = new ht().use((p, N, O) => {
593
+ const [, J] = W(N.width, N.height);
594
+ J.drawImage(N, 0, 0);
595
+ const st = Ct(J), $ = O.thickness, H = O.thickness;
596
+ p.strokeStyle = O.color, p.lineWidth = O.thickness * 2, p.lineJoin = "round", st.forEach((b) => {
597
+ p.beginPath(), p.moveTo($ + b[0].x, H + b[1].y);
598
+ for (let Q = 1; Q < b.length; Q++)
599
+ p.lineTo($ + b[Q].x, H + b[Q].y);
600
+ p.closePath();
601
+ }), p.stroke();
602
+ }).make(z, {
603
+ color: x,
604
+ thickness: I / 50 * n
605
+ });
606
+ }), R) {
607
+ let { x: I, y: x } = R;
608
+ I = I / 50 * n * 200, x = x / 50 * n * 200, u.drawImage(z, I + S.x, x + S.y, j, h);
609
+ } else
610
+ u.drawImage(z, S.x, S.y, j, h);
611
+ }
612
+ v.close();
613
+ }
614
+ return await new Promise((T) => {
615
+ g.toBlob((S) => {
616
+ try {
617
+ T(URL.createObjectURL(S));
618
+ } catch (v) {
619
+ console.error(`Failed to URL.createObjectURL, url: ${i}`, v), T(i);
620
+ }
621
+ });
622
+ });
623
+ }
624
+ function W(e, r, o = 1) {
625
+ const t = document.createElement("canvas");
626
+ t.width = e * o, t.height = r * o, t.style.width = `${e}px`, t.style.height = `${r}px`;
627
+ const s = t.getContext("2d");
628
+ return s.scale(o, o), [t, s];
629
+ }
630
+ class ht {
631
+ canvas = document.createElement("canvas");
632
+ method;
633
+ use(r) {
634
+ return this.method = r, this;
635
+ }
636
+ make(r, o) {
637
+ const { canvas: t } = this, s = this.canvas.getContext("2d"), n = o.thickness * 2, [i, f] = [r.width, r.height].map((M) => M + n);
638
+ return (i !== t.width || f !== t.height) && (t.width = i, t.height = f), s.clearRect(0, 0, s.canvas.width, s.canvas.height), this.method(s, r, o), s.drawImage(r, o.thickness, o.thickness), t;
639
+ }
640
+ }
641
+ function Ct(e) {
642
+ const t = e.canvas.width, s = e.canvas.height, n = [];
643
+ let i = 3;
644
+ const f = 100;
645
+ return (() => {
646
+ const d = [], c = new Uint32Array(e.getImageData(0, 0, t, s).data.buffer);
647
+ let a, l, L, w, y = -1, m, C = 9;
648
+ const j = [9, 0, 3, 3, 2, 0, 9, 3, 1, 9, 1, 1, 2, 0, 2, 9];
649
+ function h(g, u) {
650
+ return g >= 0 && u >= 0 && g < t && u < s ? c[u * t + g] >>> 24 > f : !1;
651
+ }
652
+ function D(g, u) {
653
+ let A = 0;
654
+ return h(g - 1, u - 1) && (A += 1), h(g, u - 1) && (A += 2), h(g - 1, u) && (A += 4), h(g, u) && (A += 8), A === 6 ? C === 0 ? 2 : 3 : A === 9 ? C === 3 ? 0 : 1 : j[A];
655
+ }
656
+ for (let g = i; g < c.length; g++)
657
+ if (c[g] >>> 24 > f) {
658
+ y = i = g;
659
+ break;
660
+ }
661
+ if (y >= 0) {
662
+ a = L = y % t, l = w = Math.floor(y / t);
663
+ do
664
+ m = D(a, l), m === 0 ? l-- : m === 1 ? l++ : m === 2 ? a-- : m === 3 && a++, m !== C && (d.push({ x: a + 0, y: l + 0 }), C = m);
665
+ while (a !== L || l !== w);
666
+ }
667
+ return n.push(d), d;
668
+ })(), n;
669
+ }
670
+ async function pt(e) {
671
+ const {
672
+ id: r,
673
+ doc: o,
674
+ url: t,
675
+ style: s = {},
676
+ background: n = {}
677
+ } = e;
678
+ let i = o;
679
+ i || (i = await fetch(t).then((M) => M.text()));
680
+ const f = new DOMParser().parseFromString(
681
+ i.replace(new RegExp(`#el-${r} `, "gi"), "").replace(/data-colors\s/, " ").replace(/[a-z-]+="([^\s<]*<\S*)"/gi, ""),
682
+ "image/svg+xml"
683
+ ).documentElement;
684
+ if (!(f instanceof SVGElement))
685
+ throw new TypeError(`Failed to DOMParser, parse svg to DOM error: ${i}`);
686
+ if (n.src) {
687
+ const M = `#${r}-fill-blip`, d = f.querySelector(M), c = d?.querySelector("image");
688
+ if (d && c)
689
+ try {
690
+ const a = await B.fetchImageBitmap(n.src).then((l) => {
691
+ const L = document.createElement("canvas");
692
+ return L.width = l.width, L.height = l.height, L.getContext("2d")?.drawImage(l, 0, 0), l.close(), L.toDataURL("image/png");
693
+ });
694
+ c?.setAttribute("href", a), d?.setAttribute("fill", M);
695
+ } catch (a) {
696
+ console.error(a);
697
+ }
698
+ }
699
+ return s.width && f.setAttribute("width", String(s.width * 2)), s.height && f.setAttribute("height", String(s.height * 2)), await V({
700
+ ...e,
701
+ transform: {
702
+ ...e.transform,
703
+ originWidth: s.width,
704
+ originHeight: s.height
705
+ },
706
+ url: `data:image/svg+xml;charset=utf-8,${encodeURIComponent(f.outerHTML)}`
707
+ });
708
+ }
709
+ const At = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNzIgNzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwI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async function xt(e, r = !1) {
711
+ const { fetchToText: o } = _(), t = {
542
712
  ...e.style,
543
- highlightReferImage: _,
713
+ highlightReferImage: At,
544
714
  listStyleType: "none",
545
715
  listStyleImage: "none"
546
716
  };
547
- return e.style.fontSize && (t.fontSize = Math.floor(e.style.fontSize)), e.listStyle?.colormap && (t.listStyleColormap = e.listStyle?.colormap), r || (e.listMode ? t.listStyleType = "disc" : e.listStyle && (t.listStyleImage = await n(e.listStyle.image), t.listStyleSize = `${e.listStyle.size * 100}%`)), e.background?.enabled ? (t.backgroundImage = e.background.image, t.backgroundSize = e.background.size, t.backgroundColormap = e.background.colormap, t.padding = e.background.padding) : t.padding = 0, t;
717
+ return e.style.fontSize && (t.fontSize = Math.floor(e.style.fontSize)), e.listStyle?.colormap && (t.listStyleColormap = e.listStyle?.colormap), r || (e.listMode ? t.listStyleType = "disc" : e.listStyle && (t.listStyleImage = await o(e.listStyle.image), t.listStyleSize = `${e.listStyle.size * 100}%`)), e.background?.enabled ? (t.backgroundImage = e.background.image, t.backgroundSize = e.background.size, t.backgroundColormap = e.background.colormap, t.padding = e.background.padding) : t.padding = 0, t;
548
718
  }
549
- async function q(e) {
719
+ async function Tt(e) {
550
720
  const r = e.textEffects ?? [];
551
721
  if (r.length)
552
722
  return await Promise.all(
553
- [...r].reverse().map(async (n) => {
554
- const t = {}, { offset: i, skew: o, stroke: s, shadow: f, filling: L } = n;
555
- if (i && (t.translateX = i.x, t.translateY = i.y), o && (t.skewX = o.x, t.skewY = o.y), s?.color && s.width && (t.textStrokeWidth = s.width, t.textStrokeColor = s.color), f && (t.shadowOffsetX = f.offsetX, t.shadowOffsetY = f.offsetY, t.shadowBlur = f.blur, t.shadowColor = f.color), L) {
556
- const { color: d, imageContent: M, gradient: a } = L;
557
- M?.image || (a ? t.color = `linear-gradient(${90 - a.angle}deg, ${a.stops.map((c) => `${c.color} ${c.offset * 100}%`).join(",")})` : d && (t.color = d));
723
+ [...r].reverse().map(async (o) => {
724
+ const t = {}, { offset: s, skew: n, stroke: i, shadow: f, filling: M } = o;
725
+ if (s && (t.translateX = s.x, t.translateY = s.y), n && (t.skewX = n.x, t.skewY = n.y), i?.color && i.width && (t.textStrokeWidth = i.width, t.textStrokeColor = i.color), f && (t.shadowOffsetX = f.offsetX, t.shadowOffsetY = f.offsetY, t.shadowBlur = f.blur, t.shadowColor = f.color), M) {
726
+ const { color: d, imageContent: c, gradient: a } = M;
727
+ c?.image || (a ? t.color = `linear-gradient(${90 - a.angle}deg, ${a.stops.map((l) => `${l.color} ${l.offset * 100}%`).join(",")})` : d && (t.color = d));
558
728
  }
559
729
  return t;
560
730
  })
561
731
  );
562
732
  }
563
- function K(e) {
733
+ function Dt(e) {
564
734
  return e.version ? e.contents : e.contents.map((r) => {
565
- let n;
566
- return r.map((t, i) => {
567
- let o = t.content;
568
- o = o.replace(/ |\r\n|\n\r|[\n\r\t\v]/g, " "), o = o.replace(/<br\/>/g, `
735
+ let o;
736
+ return r.map((t, s) => {
737
+ let n = t.content;
738
+ n = n.replace(/ |\r\n|\n\r|[\n\r\t\v]/g, " "), n = n.replace(/<br\/>/g, `
569
739
  `);
570
- let s = "", f = 0;
571
- for (const L of Array.from(o))
572
- i === 0 && f === 0 && L === " " || n === " " && L === " " || (s += L), n = L, f++;
740
+ let i = "", f = 0;
741
+ for (const M of Array.from(n))
742
+ s === 0 && f === 0 && M === " " || o === " " && M === " " || (i += M), o = M, f++;
573
743
  return {
574
744
  ...t,
575
- content: s
745
+ content: i
576
746
  };
577
747
  }).filter((t) => t.content);
578
748
  });
579
749
  }
580
- async function tt(e, r = !1) {
581
- const { fetchToText: n } = I(), t = K(e), i = [];
582
- for (let o = 0, s = t.length; o < s; o++) {
583
- const f = t[o], L = {
750
+ async function It(e, r = !1) {
751
+ const { fetchToText: o } = _(), t = Dt(e), s = [];
752
+ for (let n = 0, i = t.length; n < i; n++) {
753
+ const f = t[n], M = {
584
754
  fragments: []
585
755
  };
586
- i.push(L);
587
- for (let d = 0, M = f.length; d < M; d++) {
588
- const a = {}, c = f[d];
589
- for (const w in c)
590
- w !== "id" && c[w] !== "" && (a[w] = c[w]);
591
- a.fontSize && (a.fontSize = Math.floor(a.fontSize)), a.content = F(a.content), a.highlight && (a.highlightImage = await n(a.highlight.image), r ? a.highlightSize = "cover" : a.highlight.size && (a.highlightSize = `${a.highlight.size}rem`), a.highlight.colormap && (a.highlightColormap = a.highlight.colormap), a.highlight.line && (a.highlightLine = a.highlight.line), a.highlight.thickness && (a.highlightThickness = `${a.highlight.thickness}%`), delete a.highlight), r || (a.listMode ? L.listStyleType = "disc" : a.listStyle && (L.listStyleImage = await n(a.listStyle.image), L.listStyleSize = `${a.listStyle.size * 100}%`));
592
- const l = L.fragments[L.fragments.length - 1];
593
- l && Object.keys(l).length === 1 && l.content && Object.keys(a).length === 1 && a.content ? l.content += a.content : L.fragments.push(a);
756
+ s.push(M);
757
+ for (let d = 0, c = f.length; d < c; d++) {
758
+ const a = {}, l = f[d];
759
+ for (const w in l)
760
+ w !== "id" && l[w] !== "" && (a[w] = l[w]);
761
+ a.fontSize && (a.fontSize = Math.floor(a.fontSize)), a.content = Mt(a.content), a.highlight && (a.highlightImage = await o(a.highlight.image), r ? a.highlightSize = "cover" : a.highlight.size && (a.highlightSize = `${a.highlight.size}rem`), a.highlight.colormap && (a.highlightColormap = a.highlight.colormap), a.highlight.line && (a.highlightLine = a.highlight.line), a.highlight.thickness && (a.highlightThickness = `${a.highlight.thickness}%`), delete a.highlight), r || (a.listMode ? M.listStyleType = "disc" : a.listStyle && (M.listStyleImage = await o(a.listStyle.image), M.listStyleSize = `${a.listStyle.size * 100}%`));
762
+ const L = M.fragments[M.fragments.length - 1];
763
+ L && Object.keys(L).length === 1 && L.content && Object.keys(a).length === 1 && a.content ? L.content += a.content : M.fragments.push(a);
594
764
  }
595
765
  }
596
- return i;
766
+ return s;
597
767
  }
598
- const p = (e) => (Number.parseFloat(e) || 0) / 100;
599
- async function S(e, r, n) {
600
- const t = { ...e.style ?? e }, i = {
768
+ const P = (e) => (Number.parseFloat(e) || 0) / 100;
769
+ async function q(e, r, o) {
770
+ const t = { ...e.style ?? e }, s = {
601
771
  inPptIs: "Shape",
602
772
  inEditorIs: "Element"
603
- }, o = {
604
- id: h(),
773
+ }, n = {
774
+ id: U(),
605
775
  name: e.name ?? e.title ?? e.id,
606
776
  style: t,
607
- meta: i,
777
+ meta: s,
608
778
  children: []
609
779
  };
610
- if (t.borderRadius && (t.borderRadius = t.borderRadius * 0.01 * Math.max(t.height, t.width)), r && e.groupStyle && (t.width = r.style.width * p(e.groupStyle.width), t.height = r.style.height * p(e.groupStyle.height), t.left = r.style.width * p(e.groupStyle.left), t.top = r.style.height * p(e.groupStyle.top)), e.editable === !1 && (t.visibility = "hidden"), e.lock === !0 && (i.lock = !0), e.animations?.length) {
611
- const s = H(e);
612
- o.delay = s.delay, o.duration = s.duration, o.children.push(...s.animations), n && (s.animations.forEach((f) => {
613
- n.endTime = Math.max(
614
- n.endTime,
615
- s.delay + f.delay + f.duration
780
+ if (t.borderRadius && (t.borderRadius = t.borderRadius * 0.01 * Math.max(t.height, t.width)), r && e.groupStyle && (t.width = r.style.width * P(e.groupStyle.width), t.height = r.style.height * P(e.groupStyle.height), t.left = r.style.width * P(e.groupStyle.left), t.top = r.style.height * P(e.groupStyle.top)), e.editable === !1 && (t.visibility = "hidden"), e.lock === !0 && (s.lock = !0), e.animations?.length) {
781
+ const i = jt(e);
782
+ n.delay = i.delay, n.duration = i.duration, n.children.push(...i.animations), o && (i.animations.forEach((f) => {
783
+ o.endTime = Math.max(
784
+ o.endTime,
785
+ i.delay + f.delay + f.duration
616
786
  );
617
- }), n.endTime = Math.max(n.endTime, s.delay + s.duration));
787
+ }), o.endTime = Math.max(o.endTime, i.delay + i.duration));
618
788
  }
619
789
  switch (e.type) {
620
790
  case "image":
621
- if (i.inPptIs = "Picture", o.foreground = {
622
- image: e.url,
791
+ if (s.inPptIs = "Picture", n.foreground = {
792
+ image: await V(e),
623
793
  fillWithShape: !0
624
- }, e.maskUrl, e.cropping) {
625
- const s = e.style.width, f = e.style.height, {
626
- imageWidth: L,
794
+ }, e.clipUrl && (s.rawForegroundImage = e.url), e.cropping) {
795
+ const i = e.style.width, f = e.style.height, {
796
+ imageWidth: M,
627
797
  imageHeight: d,
628
- maskWidth: M = s,
798
+ maskWidth: c = i,
629
799
  maskHeight: a = f,
630
- translateX: c,
631
- translateY: l,
800
+ translateX: l,
801
+ translateY: L,
632
802
  zoom: w = 1
633
- } = e.cropping, u = L * w, m = d * w, y = (u - M) / 2 - c, j = (m - a) / 2 - l, N = y + M / 2, E = j + a / 2, x = -(s / 2 - N), T = -(f / 2 - E), b = u - (x + s), Y = m - (T + f);
634
- o.foreground.cropRect = {
635
- left: x / u,
636
- top: T / m,
637
- right: b / u,
638
- bottom: Y / m
803
+ } = e.cropping, y = M * w, m = d * w, C = (y - c) / 2 - l, j = (m - a) / 2 - L, h = C + c / 2, D = j + a / 2, g = -(i / 2 - h), u = -(f / 2 - D), A = y - (g + i), k = m - (u + f);
804
+ n.foreground.cropRect = {
805
+ left: g / y,
806
+ top: u / m,
807
+ right: A / y,
808
+ bottom: k / m
639
809
  };
640
810
  }
641
811
  break;
642
812
  case "svg": {
643
- i.inPptIs = "Picture";
644
- let s = e.doc;
645
- s || (s = await fetch(e.url).then((f) => f.text())), s = s.replace(new RegExp(`#el-${e.id} `, "gi"), ""), s = s.replace('width="100%"', `width="${t.width * 2}"`), s = s.replace('height="100%"', `height="${t.height * 2}"`), o.foreground = {
646
- image: `data:image/svg+xml;charset=utf-8,${encodeURIComponent(s)}`,
813
+ s.inPptIs = "Picture", n.foreground = {
814
+ image: await pt(e),
647
815
  fillWithShape: !0
648
816
  };
649
817
  break;
650
818
  }
651
819
  case "text": {
652
- i.inPptIs = "Shape", t.writingMode === "horizontal-tb" ? t.width = Math.ceil(t.width + t.letterSpacing) : t.height = Math.ceil(t.height + t.letterSpacing), o.text = {
653
- content: await tt(e),
654
- style: await V(e),
655
- effects: await q(e),
820
+ s.inPptIs = "Shape", t.writingMode === "horizontal-tb" ? t.width = Math.ceil(t.width + t.letterSpacing) : t.height = Math.ceil(t.height + t.letterSpacing), n.text = {
821
+ content: await It(e),
822
+ style: await xt(e),
823
+ effects: await Tt(e),
656
824
  // plugins: [deformation(el.deformation?.type?.endsWith("byWord") ? -1 : 999, () => el.deformation)],
657
825
  drawMode: "texture"
658
826
  };
659
827
  break;
660
828
  }
661
829
  case "com":
662
- i.inPptIs = "GroupShape", o.children = await Promise.all(
663
- e.children.map((s) => S(s, e, n))
664
- );
830
+ s.inPptIs = "GroupShape", n.children = (await Promise.all(
831
+ e.children.map(async (i) => {
832
+ try {
833
+ return await q(i, e, o);
834
+ } catch (f) {
835
+ console.warn(f);
836
+ return;
837
+ }
838
+ })
839
+ )).filter(Boolean);
665
840
  break;
666
841
  case "pic":
667
842
  case "mosaic":
@@ -688,53 +863,60 @@ async function S(e, r, n) {
688
863
  console.warn(e);
689
864
  break;
690
865
  }
691
- return o;
866
+ return n;
692
867
  }
693
- async function et(e, r = !0, n) {
694
- const t = h(), i = {
868
+ async function St(e, r = !0, o) {
869
+ const t = U(), s = {
695
870
  ...e.style ?? e
696
871
  };
697
- r && (i.overflow = "hidden");
698
- let o;
699
- return e.background && (e.background.color && (o ??= {}, P(e.background.color ?? "") ? o.image = e.background.color : o.color = e.background.color), e.background.image && (o ??= {}, o.image = e.background.image)), {
872
+ r && (s.overflow = "hidden");
873
+ let n;
874
+ return e.background && (e.background.color && (n ??= {}, dt(e.background.color ?? "") ? n.image = e.background.color : n.color = e.background.color), e.background.image && (n ??= {}, n.image = e.background.image)), {
700
875
  id: t,
701
876
  name: r ? `Frame ${t}` : e.name,
702
- style: i,
877
+ style: s,
703
878
  // TODO 过滤掉部分属性
704
- background: o,
705
- children: await Promise.all(
706
- e.elements.map((s) => S(s, void 0, n))
707
- ),
879
+ background: n,
880
+ children: (await Promise.all(
881
+ e.elements.map(async (i) => {
882
+ try {
883
+ return await q(i, void 0, o);
884
+ } catch (f) {
885
+ console.warn(f);
886
+ return;
887
+ }
888
+ })
889
+ )).filter(Boolean),
708
890
  meta: {
709
891
  inPptIs: r ? "Slide" : "GroupShape",
710
892
  inEditorIs: r ? "Frame" : "Element"
711
893
  }
712
894
  };
713
895
  }
714
- async function z(e, r = 48) {
896
+ async function K(e, r = 0) {
715
897
  const {
716
- layouts: n,
898
+ layouts: o,
717
899
  metas: t = {}
718
- } = e, i = {
900
+ } = e, s = {
719
901
  endTime: 0
720
902
  };
721
- let o = await Promise.all(
722
- n.map(async (L, d) => ({
903
+ let n = await Promise.all(
904
+ o.map(async (M, d) => ({
723
905
  index: d,
724
- element: await et(L, !0, i)
906
+ element: await St(M, !0, s)
725
907
  }))
726
- ), s = 0;
727
- o = o.sort((L, d) => L.index - d.index).map((L, d) => {
728
- const M = L.element;
729
- return M.style && (M.style.top = s, s += Number(M.style.height) + r), M.name = `Frame ${d + 1}`, M;
908
+ ), i = 0;
909
+ n = n.sort((M, d) => M.index - d.index).map((M, d) => {
910
+ const c = M.element;
911
+ return c.style && (c.style.top = i, i += Number(c.style.height) + r), c.name = `Frame ${d + 1}`, c;
730
912
  });
731
- const f = o.reduce((L) => {
732
- const d = L.style?.left ?? 0, M = L.style?.top ?? 0, a = L.style?.width ?? 0, c = L.style?.height ?? 0;
913
+ const f = n.reduce((M) => {
914
+ const d = M.style?.left ?? 0, c = M.style?.top ?? 0, a = M.style?.width ?? 0, l = M.style?.height ?? 0;
733
915
  return {
734
916
  minX: d,
735
- minY: M,
917
+ minY: c,
736
918
  maxX: d + a,
737
- maxY: M + c
919
+ maxY: c + l
738
920
  };
739
921
  }, { minX: 0, minY: 0, maxX: 0, maxY: 0 });
740
922
  return {
@@ -743,120 +925,125 @@ async function z(e, r = 48) {
743
925
  width: t?.width ?? f.maxX - f.minX,
744
926
  height: t?.height ?? f.maxY - f.minY
745
927
  },
746
- children: o,
928
+ children: n,
747
929
  meta: {
748
930
  ...t,
749
- endTime: i.endTime,
931
+ endTime: s.endTime,
750
932
  inEditorIs: "Doc"
751
933
  }
752
934
  };
753
935
  }
754
- function at(e, r) {
755
- const { config: n } = e;
936
+ function zt(e, r) {
937
+ const { config: o } = e;
756
938
  return {
757
939
  name: "bigesj:bidTid",
758
940
  test: (t) => typeof t == "object" && t && !!(t.bid || t.tid),
759
941
  load: async (t) => {
760
- const i = t.bid ?? t.tid ?? "", o = async (M) => await fetch(
761
- (t.bid ? r.bid : r.tid).replace("%d", M)
942
+ const s = t.bid ?? t.tid ?? "", n = async (c) => await fetch(
943
+ (t.bid ? r.bid : r.tid).replace("%d", c)
762
944
  ).then((a) => a.json()).then((a) => JSON.parse(a.data.content));
763
- let s = 0;
945
+ let i = 0;
764
946
  const f = await Promise.all(
765
- i.split("|").map(async (M) => {
766
- let [a, c] = M.split("[");
767
- c && (c = c.substring(0, c.length - 1));
768
- const l = c ? c.split(",").map((m) => Number(m)) : void 0, w = await o(a);
769
- l !== void 0 && (w.layouts = w.layouts.filter((m, y) => l.includes(y)));
770
- const u = await z(w, n.value.frameGap);
771
- return s = Math.max(s, u.meta?.maxTime ?? 0), u;
947
+ s.split("|").map(async (c) => {
948
+ let [a, l] = c.split("[");
949
+ l && (l = l.substring(0, l.length - 1));
950
+ const L = l ? l.split(",").map((m) => Number(m)) : void 0, w = await n(a);
951
+ L !== void 0 && (w.layouts = w.layouts.filter((m, C) => L.includes(C)));
952
+ const y = await K(w);
953
+ return i = Math.max(i, y.meta?.maxTime ?? 0), y;
772
954
  })
773
- ), L = { ...f[0], id: i, children: [] };
774
- L.meta ??= {}, L.meta.maxTime = s, L.meta.inEditorIs = "Doc";
955
+ ), M = { ...f[0], id: s, children: [] };
956
+ M.meta ??= {}, M.meta.maxTime = i, M.meta.inEditorIs = "Doc";
775
957
  let d = 0;
776
- return f.forEach((M) => {
958
+ return f.forEach((c) => {
777
959
  let a = 0;
778
- M.children?.forEach((c) => {
779
- c.style && (c.style.left = d, a = Math.max(a, Number(c.style.width)), L.children.push(c));
780
- }), d += a + n.value.frameGap;
781
- }), L;
960
+ c.children?.forEach((l) => {
961
+ l.style && (l.style.left = d, a = Math.max(a, Number(l.style.width)), M.children.push(l));
962
+ }), d += a + o.value.frameGap;
963
+ }), M;
782
964
  }
783
965
  };
784
966
  }
785
- function st(e) {
967
+ function Nt(e) {
786
968
  const { config: r } = e;
787
969
  return {
788
970
  name: "bigesj:bige",
789
971
  accept: ".bige",
790
- test: (n) => n instanceof File && n.name.endsWith(".bige"),
791
- load: async (n) => await z(
972
+ test: (o) => o instanceof File && o.name.endsWith(".bige"),
973
+ load: async (o) => await K(
792
974
  JSON.parse(
793
975
  new TextDecoder().decode(
794
- B(new Uint8Array(await n.arrayBuffer()))
976
+ Lt(new Uint8Array(await o.arrayBuffer()))
795
977
  )
796
- ).content,
797
- r.value.frameGap
978
+ ).content
798
979
  )
799
980
  };
800
981
  }
801
- function Lt(e = {}) {
982
+ function Qt(e = {}) {
802
983
  const {
803
984
  font: r,
804
- api: n
985
+ api: o
805
986
  } = e, t = {
806
987
  fonts: "/new/design/fonts",
807
988
  bid: "/new/udesign/info/%d",
808
989
  tid: "/new/design/info/%d",
809
- ...n
990
+ ...o
810
991
  };
811
- return O((i) => ({
992
+ return ot((s) => ({
812
993
  name: "bigesj",
813
994
  loaders: [
814
- st(i),
815
- at(i, t)
995
+ Nt(s),
996
+ zt(s, t)
816
997
  ],
817
998
  setup: async () => {
818
- r && await rt(i, t);
999
+ r && await Et(s, t);
819
1000
  }
820
1001
  }));
821
1002
  }
822
- async function rt(e, r) {
1003
+ async function Et(e, r) {
823
1004
  const {
824
- on: n,
1005
+ on: o,
825
1006
  off: t,
826
- root: i
1007
+ root: s
827
1008
  } = e, {
828
- loadBigeFonts: o,
829
- loadFont: s
830
- } = U();
831
- function f(M) {
832
- M instanceof v && (M.style.fontFamily && s(M.style.fontFamily).then(() => M.text.update()), M.text.content.forEach((a) => {
833
- a.fragments.forEach((c) => {
834
- c.fontFamily && s(c.fontFamily).then(() => M.text.update());
835
- }), a.fontFamily && s(a.fontFamily).then(() => M.text.update());
1009
+ loadBigeFonts: n,
1010
+ loadFont: i
1011
+ } = mt();
1012
+ function f(c) {
1013
+ c instanceof nt && (c.style.fontFamily && i(c.style.fontFamily).then(() => c.text.update()), c.text.content.forEach((a) => {
1014
+ a.fragments.forEach((l) => {
1015
+ l.fontFamily && i(l.fontFamily).then(() => c.text.update());
1016
+ }), a.fontFamily && i(a.fontFamily).then(() => c.text.update());
836
1017
  }));
837
1018
  }
838
- function L(M) {
839
- M.forEach((a) => {
840
- f(a), a.findOne((c) => (f(c), !1));
1019
+ function M(c) {
1020
+ c.forEach((a) => {
1021
+ f(a), a.findOne((l) => (f(l), !1));
841
1022
  });
842
1023
  }
843
1024
  async function d() {
844
- i.value && L([i.value]);
1025
+ s.value && M([s.value]);
845
1026
  }
846
- W(() => {
847
- t("setDoc", d), t("addElement", L);
848
- }), n("setDoc", d), n("addElement", L), await o(r.fonts);
1027
+ lt(() => {
1028
+ t("setDoc", d), t("addElement", M);
1029
+ }), o("setDoc", d), o("addElement", M), await n(r.fonts);
849
1030
  }
850
1031
  export {
851
- at as bidTidLoader,
852
- st as bigeLoader,
853
- A as convertAnimation,
854
- z as convertDoc,
855
- S as convertElement,
856
- et as convertLayout,
857
- Lt as default,
858
- H as parseAnimations,
859
- Lt as plugin,
860
- U as useFonts,
861
- I as useSharedTextAssets
1032
+ zt as bidTidLoader,
1033
+ Nt as bigeLoader,
1034
+ G as convertAnimation,
1035
+ K as convertDoc,
1036
+ q as convertElement,
1037
+ V as convertImageElementToUrl,
1038
+ St as convertLayout,
1039
+ pt as convertSvgElementToUrl,
1040
+ It as convertTextContent,
1041
+ Tt as convertTextEffects,
1042
+ xt as convertTextStyle,
1043
+ Qt as default,
1044
+ Dt as getTextContents,
1045
+ jt as parseAnimations,
1046
+ Qt as plugin,
1047
+ mt as useFonts,
1048
+ _ as useSharedTextAssets
862
1049
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mce/bigesj",
3
3
  "type": "module",
4
- "version": "0.2.4",
4
+ "version": "0.2.5",
5
5
  "description": "Plugin for mce",
6
6
  "author": "wxm",
7
7
  "license": "MIT",
@@ -48,11 +48,11 @@
48
48
  "fflate": "^0.8.2"
49
49
  },
50
50
  "devDependencies": {
51
- "modern-canvas": "^0.12.19",
51
+ "modern-canvas": "^0.12.20",
52
52
  "modern-font": "^0.4.4",
53
53
  "modern-idoc": "^0.10.5",
54
54
  "vue": "^3.5.22",
55
- "mce": "0.2.4"
55
+ "mce": "0.2.5"
56
56
  },
57
57
  "peerDependencies": {
58
58
  "mce": "^0"