kindy-editor 3.2.7 → 3.2.8
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-lib/assets/{worker-pUzyeoiR.js → worker-Du8hmveE.js} +2232 -2218
- package/dist-lib/builder.js +4 -4
- package/dist-lib/events.js +9 -120
- package/dist-lib/export.js +7 -7
- package/dist-lib/generate-toc.js +3 -3
- package/dist-lib/import.js +2 -2
- package/dist-lib/index-D5dkvB0x.js +490 -0
- package/dist-lib/{editorApp-BtDzRfJq.js → kindy-editor-T1YCQdwF.js} +12929 -10746
- package/dist-lib/kindy-editor.js +4 -4
- package/dist-lib/measure.js +3 -4
- package/dist-lib/{measureHost-CpqJsipA.js → measureHost-BG9FPivu.js} +17 -18
- package/dist-lib/{paintStyle-Cb7IGKPW.js → metrics-D7Ma2xlj.js} +175 -148
- package/dist-lib/{parse-CpGoMQ_v.js → parse-BsUkqk-n.js} +3 -3
- package/dist-lib/{pipeline-CCwWMjhw.js → pipeline-CX_Hc5BD.js} +1 -1
- package/dist-lib/{qrcode-BCaJLV1G.js → qrcode--5MhVNEZ.js} +1 -1
- package/dist-lib/{qrcode-B-JKix2T.js → qrcode-CR8i1-w0.js} +6 -6
- package/dist-lib/recalc-docx.js +1 -1
- package/dist-lib/{recalcToc-CaiTn2IJ.js → recalcToc-zAFS4S6S.js} +755 -742
- package/dist-lib/{stylesheet-BPIJJMlK.js → stylesheet-BfxJTGA5.js} +1 -1
- package/dist-lib/{webmcp-B0swfp0T.js → webmcp-Ds469lXP.js} +2 -2
- package/docs/table-editing.md +14 -1
- package/docs/table-form-integration.md +49 -1
- package/package.json +1 -1
- package/types/kindy-editor.d.ts +4 -0
- package/dist-lib/changeAggregator-DEuynIcV.js +0 -376
- package/dist-lib/kindy-editor---oVGhZU.js +0 -2190
- package/dist-lib/metrics-CdfHD-8y.js +0 -31
package/dist-lib/kindy-editor.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { K as
|
|
2
|
-
import { C as i,
|
|
1
|
+
import { K as t, d as o, m as r } from "./kindy-editor-T1YCQdwF.js";
|
|
2
|
+
import { C as i, d as m, b as n, e as d } from "./index-D5dkvB0x.js";
|
|
3
3
|
export {
|
|
4
4
|
i as ChangeAggregator,
|
|
5
5
|
m as CommitPolicy,
|
|
6
6
|
n as EditorEvents,
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
t as KindyEditor,
|
|
8
|
+
d as createHttpEventSink,
|
|
9
9
|
o as darkCanvasTheme,
|
|
10
10
|
r as makeFloatingDialog
|
|
11
11
|
};
|
package/dist-lib/measure.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import "./TimesNewRoman-Regular-C7tOI8JO.js";
|
|
2
|
-
import "./metrics-
|
|
3
|
-
import { i as
|
|
4
|
-
import "./paintStyle-Cb7IGKPW.js";
|
|
2
|
+
import "./metrics-D7Ma2xlj.js";
|
|
3
|
+
import { i as s } from "./measureHost-BG9FPivu.js";
|
|
5
4
|
export {
|
|
6
|
-
|
|
5
|
+
s as installMeasureHost
|
|
7
6
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { _ as Gn, a as Vn, b as zn, c as qn, d as Wn, e as Hn, f as $n, g as Xn, h as jn, i as Yn, j as Kn, k as Zn, l as Jn, m as _n, n as Qn, o as ei, p as ti, q as ri, r as si, s as ai, t as ni, u as ii, v as oi, w as li, x as ui, y as ci, z as fi, A as di, B as hi } from "./TimesNewRoman-Regular-C7tOI8JO.js";
|
|
2
|
-
import {
|
|
2
|
+
import { d as Wa, c as pi, e as bi, g as gi, M as vi, F as xi, h as dr, C as hr, A as pr, H as br, i as mi } from "./metrics-D7Ma2xlj.js";
|
|
3
3
|
import { B as At } from "./index-6mKfgpcs.js";
|
|
4
|
-
|
|
5
|
-
var c2 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
4
|
+
var u2 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
6
5
|
function Pt(i) {
|
|
7
6
|
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
|
|
8
7
|
}
|
|
9
|
-
function
|
|
8
|
+
function c2(i) {
|
|
10
9
|
if (Object.prototype.hasOwnProperty.call(i, "__esModule")) return i;
|
|
11
10
|
var e = i.default;
|
|
12
11
|
if (typeof e == "function") {
|
|
@@ -14514,11 +14513,11 @@ function e2(i) {
|
|
|
14514
14513
|
function Rt(i, e, t = !1) {
|
|
14515
14514
|
Ve.has(i) && !t || Ve.set(i, { bytes: e, font: _a(e2(e)) });
|
|
14516
14515
|
}
|
|
14517
|
-
function
|
|
14516
|
+
function f2(i) {
|
|
14518
14517
|
const e = Wa();
|
|
14519
14518
|
for (const t of i) Rt(e.faceKey(t.family, t.style), t.bytes, !0);
|
|
14520
14519
|
}
|
|
14521
|
-
function
|
|
14520
|
+
function d2(i) {
|
|
14522
14521
|
if (!i.faceKeyPrefix) return;
|
|
14523
14522
|
const e = `__custom__${i.faceKeyPrefix}`;
|
|
14524
14523
|
for (const t of [...Ve.keys()]) t.startsWith(e) && Ve.delete(t);
|
|
@@ -14527,8 +14526,8 @@ function t2() {
|
|
|
14527
14526
|
return Ve.has("Arimo-Regular.ttf");
|
|
14528
14527
|
}
|
|
14529
14528
|
function Mn(i, e, t) {
|
|
14530
|
-
const { clone: r, substituted: s } =
|
|
14531
|
-
if (
|
|
14529
|
+
const { clone: r, substituted: s } = pi(i), n = e && t ? "BoldItalic" : e ? "Bold" : t ? "Italic" : "Regular";
|
|
14530
|
+
if (bi(r)) {
|
|
14532
14531
|
const c = Wa(), d = c.faceKey(r, n), f = c.faceKey(r, "Regular"), p = Ve.get(d) ?? Ve.get(f);
|
|
14533
14532
|
if (p)
|
|
14534
14533
|
return { file: Ve.has(d) ? d : f, font: p.font, bytes: p.bytes, substituted: !1 };
|
|
@@ -14536,14 +14535,14 @@ function Mn(i, e, t) {
|
|
|
14536
14535
|
if (!m) throw new Error("fontRegistry: no fonts loaded — call installMeasureHost() before measuring/exporting");
|
|
14537
14536
|
return { file: "Arimo-Regular.ttf", font: m.font, bytes: m.bytes, substituted: !0 };
|
|
14538
14537
|
}
|
|
14539
|
-
const a =
|
|
14538
|
+
const a = gi[r] ?? `${r}-${n}.ttf`, l = Ve.get(a);
|
|
14540
14539
|
if (l) return { file: a, font: l.font, bytes: l.bytes, substituted: s };
|
|
14541
14540
|
const u = Ve.get("Arimo-Regular.ttf");
|
|
14542
14541
|
if (!u)
|
|
14543
14542
|
throw new Error("fontRegistry: no fonts loaded — call installMeasureHost() before measuring/exporting");
|
|
14544
14543
|
return { file: "Arimo-Regular.ttf", font: u.font, bytes: u.bytes, substituted: !0 };
|
|
14545
14544
|
}
|
|
14546
|
-
const r2 = [
|
|
14545
|
+
const r2 = [vi];
|
|
14547
14546
|
function s2(i, e) {
|
|
14548
14547
|
if (e.font.hasGlyphForCodePoint(i)) return e;
|
|
14549
14548
|
for (const t of r2) {
|
|
@@ -14628,10 +14627,10 @@ async function Qt(i) {
|
|
|
14628
14627
|
return new Uint8Array(await t.arrayBuffer());
|
|
14629
14628
|
}
|
|
14630
14629
|
let E0 = null;
|
|
14631
|
-
function
|
|
14630
|
+
function h2() {
|
|
14632
14631
|
return E0 || (E0 = (async () => {
|
|
14633
14632
|
if (!t2()) {
|
|
14634
|
-
await Promise.all(
|
|
14633
|
+
await Promise.all(xi.map(async (e) => Rt(e, await Qt(e))));
|
|
14635
14634
|
try {
|
|
14636
14635
|
Rt(dr, await Qt(dr));
|
|
14637
14636
|
} catch (e) {
|
|
@@ -14660,18 +14659,18 @@ function p2() {
|
|
|
14660
14659
|
getContext() {
|
|
14661
14660
|
return new Gr();
|
|
14662
14661
|
}
|
|
14663
|
-
}, i.document = { createElement: () => ({ getContext: () => new Gr() }), body: null },
|
|
14662
|
+
}, i.document = { createElement: () => ({ getContext: () => new Gr() }), body: null }, mi(new Gr());
|
|
14664
14663
|
})(), E0);
|
|
14665
14664
|
}
|
|
14666
14665
|
export {
|
|
14667
14666
|
H0 as $,
|
|
14668
|
-
|
|
14667
|
+
c2 as a,
|
|
14669
14668
|
_a as b,
|
|
14670
|
-
|
|
14671
|
-
|
|
14669
|
+
u2 as c,
|
|
14670
|
+
d2 as d,
|
|
14672
14671
|
Mn as e,
|
|
14673
14672
|
Pt as g,
|
|
14674
|
-
|
|
14675
|
-
|
|
14673
|
+
h2 as i,
|
|
14674
|
+
f2 as r,
|
|
14676
14675
|
a2 as s
|
|
14677
14676
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const
|
|
1
|
+
const Rt = ["Regular", "Bold", "Italic", "BoldItalic"];
|
|
2
2
|
function m(t) {
|
|
3
3
|
return t.trim().toLowerCase().replace(/^["']|["']$/g, "");
|
|
4
4
|
}
|
|
5
|
-
function
|
|
5
|
+
function At(t, e) {
|
|
6
6
|
switch (e) {
|
|
7
7
|
case "Bold":
|
|
8
8
|
return t.bold ?? t.regular;
|
|
@@ -14,18 +14,18 @@ function ht(t, e) {
|
|
|
14
14
|
return t.regular;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function A(t) {
|
|
18
18
|
return /\.woff2?(\?|#|$)/i.test(t);
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function k(t, e) {
|
|
21
21
|
return t.faces.regular === e.faces.regular && t.faces.bold === e.faces.bold && t.faces.italic === e.faces.italic && t.faces.boldItalic === e.faces.boldItalic && t.sizing.ascent === e.sizing.ascent && t.sizing.descent === e.sizing.descent;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function N(t, e = !1) {
|
|
24
24
|
if (!m(t.family)) return !1;
|
|
25
25
|
const { ascent: s, descent: a } = t.sizing ?? {};
|
|
26
|
-
return typeof s == "number" && s > 0 && typeof a == "number" && a >= 0 ? t.faces?.regular ?
|
|
26
|
+
return typeof s == "number" && s > 0 && typeof a == "number" && a >= 0 ? t.faces?.regular ? A(t.faces.regular) || t.faces.bold && A(t.faces.bold) || t.faces.italic && A(t.faces.italic) || t.faces.boldItalic && A(t.faces.boldItalic) ? (e && console.warn(`[kindy-editor] custom font "${t.family}": WOFF/WOFF2 is not supported — use TTF/OTF; skipped`), !1) : !0 : (e && console.warn(`[kindy-editor] custom font "${t.family}" is missing the required regular face; skipped`), !1) : (e && console.warn(`[kindy-editor] custom font "${t.family}" has invalid sizing (need ascent > 0, descent >= 0); skipped`), !1);
|
|
27
27
|
}
|
|
28
|
-
class
|
|
28
|
+
class b {
|
|
29
29
|
/** Disambiguates this instance's synthetic face keys in the export-side fontkit
|
|
30
30
|
* `loaded` map, so two concurrent jobs registering the same family with
|
|
31
31
|
* different bytes don't collide. Empty for the default registry so its keys
|
|
@@ -47,9 +47,9 @@ class N {
|
|
|
47
47
|
register(e) {
|
|
48
48
|
if (e?.fonts)
|
|
49
49
|
for (const s of e.fonts) {
|
|
50
|
-
if (!
|
|
50
|
+
if (!N(s, !0)) continue;
|
|
51
51
|
const a = m(s.family), n = this.fonts.get(a);
|
|
52
|
-
n && !
|
|
52
|
+
n && !k(n, s) && (console.warn(`[kindy-editor] custom font "${s.family}" redefined with different faces/sizing; using the latest`), this.metricsCache.clear()), this.fonts.set(a, s);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
fontFor(e) {
|
|
@@ -70,27 +70,27 @@ class N {
|
|
|
70
70
|
this.fonts.clear(), this.metricsCache.clear();
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
const
|
|
74
|
-
let
|
|
75
|
-
function
|
|
76
|
-
return new
|
|
73
|
+
const p = new b("");
|
|
74
|
+
let L = p, B = 0;
|
|
75
|
+
function Lt() {
|
|
76
|
+
return new b(`r${++B}__`);
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
return
|
|
78
|
+
function y() {
|
|
79
|
+
return L;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
|
|
81
|
+
function Ft(t) {
|
|
82
|
+
L = t;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
return
|
|
84
|
+
function St() {
|
|
85
|
+
return p;
|
|
86
86
|
}
|
|
87
|
-
function
|
|
88
|
-
return
|
|
87
|
+
function D(t) {
|
|
88
|
+
return L.fontFor(t);
|
|
89
89
|
}
|
|
90
|
-
function
|
|
91
|
-
return
|
|
90
|
+
function U(t) {
|
|
91
|
+
return L.metricsFor(t);
|
|
92
92
|
}
|
|
93
|
-
const
|
|
93
|
+
const P = ["Carlito", "Caladea", "Gelasio", "Arimo", "TimesNewRoman", "Cousine"], G = "Arimo", $ = {
|
|
94
94
|
// metric clones of common Office/Windows fonts
|
|
95
95
|
calibri: "Carlito",
|
|
96
96
|
cambria: "Caladea",
|
|
@@ -138,12 +138,12 @@ const x = ["Carlito", "Caladea", "Gelasio", "Arimo", "TimesNewRoman", "Cousine"]
|
|
|
138
138
|
notosansarabic: "NotoSansArabic",
|
|
139
139
|
// Noto Sans Hebrew — the bundled Hebrew fallback (single Regular face); identity.
|
|
140
140
|
notosanshebrew: "NotoSansHebrew"
|
|
141
|
-
},
|
|
142
|
-
[
|
|
143
|
-
[
|
|
144
|
-
[
|
|
145
|
-
[
|
|
146
|
-
},
|
|
141
|
+
}, H = "StixTwoMath", z = "StixTwoMath-Regular.ttf", K = "NotoSansSC", W = "NotoSansSC-Regular.ttf", Y = "NotoSansArabic", X = "NotoSansArabic-Regular.ttf", q = "NotoSansHebrew", V = "NotoSansHebrew-Regular.ttf", wt = {
|
|
142
|
+
[H]: z,
|
|
143
|
+
[K]: W,
|
|
144
|
+
[Y]: X,
|
|
145
|
+
[q]: V
|
|
146
|
+
}, J = {
|
|
147
147
|
Carlito: { ascent: 0.9375, descent: 0.25 },
|
|
148
148
|
Caladea: { ascent: 0.9375, descent: 0.25 },
|
|
149
149
|
Gelasio: { ascent: 0.9375, descent: 0.3125 },
|
|
@@ -165,18 +165,18 @@ const x = ["Carlito", "Caladea", "Gelasio", "Arimo", "TimesNewRoman", "Cousine"]
|
|
|
165
165
|
// ratios keep editor + export pagination in lock-step, like the other fallbacks.
|
|
166
166
|
NotoSansHebrew: { ascent: 1.068, descent: 0.292 }
|
|
167
167
|
};
|
|
168
|
-
function
|
|
169
|
-
const e =
|
|
168
|
+
function M(t) {
|
|
169
|
+
const e = D(t);
|
|
170
170
|
if (e) return { clone: e.family, substituted: !1 };
|
|
171
|
-
const s = t.trim().toLowerCase().replace(/^["']|["']$/g, ""), a =
|
|
172
|
-
return a ? { clone: a, substituted: !1 } : { clone:
|
|
171
|
+
const s = t.trim().toLowerCase().replace(/^["']|["']$/g, ""), a = $[s];
|
|
172
|
+
return a ? { clone: a, substituted: !1 } : { clone: G, substituted: !0 };
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
return
|
|
174
|
+
function Q(t) {
|
|
175
|
+
return U(t) ?? J[t] ?? { ascent: 0.9, descent: 0.25 };
|
|
176
176
|
}
|
|
177
|
-
const
|
|
178
|
-
(t) =>
|
|
179
|
-
),
|
|
177
|
+
const O = (t) => (t.split(",")[0] ?? "").trim(), j = ["Regular", "Bold", "Italic", "BoldItalic"], Ot = P.flatMap(
|
|
178
|
+
(t) => j.map((e) => `${t}-${e}.ttf`)
|
|
179
|
+
), Z = [
|
|
180
180
|
{ value: "Calibri, sans-serif", label: "Calibri (Carlito)" },
|
|
181
181
|
{ value: "Cambria, serif", label: "Cambria (Caladea)" },
|
|
182
182
|
{ value: "Georgia, serif", label: "Georgia (Gelasio)" },
|
|
@@ -186,37 +186,37 @@ const S = (t) => (t.split(",")[0] ?? "").trim(), X = ["Regular", "Bold", "Italic
|
|
|
186
186
|
{ value: "Consolas, monospace", label: "Consolas (Cousine)" },
|
|
187
187
|
{ value: "Courier New, monospace", label: "Courier New (Cousine)" }
|
|
188
188
|
];
|
|
189
|
-
function
|
|
190
|
-
const e = new Set((t?.disableBuiltin ?? []).map((n) =>
|
|
189
|
+
function gt(t) {
|
|
190
|
+
const e = new Set((t?.disableBuiltin ?? []).map((n) => O(n).trim().toLowerCase())), s = Z.filter((n) => !e.has(O(n.value).trim().toLowerCase())), a = (t?.fonts ?? []).filter((n) => N(n)).map((n) => ({ value: n.family, label: n.label ?? n.family }));
|
|
191
191
|
return [...s, ...a];
|
|
192
192
|
}
|
|
193
|
-
const
|
|
193
|
+
const Nt = "#c0c4c9", tt = "#0b57d0", bt = "#1a73e8", I = "#202124", pt = "#80868b", Mt = "#7a8aa0", It = "#9aa0a6", xt = "#f1f3f4", x = /* @__PURE__ */ new Set([
|
|
194
194
|
"#0563c1",
|
|
195
195
|
"#0000ff",
|
|
196
196
|
"#0000ee",
|
|
197
197
|
"#0b57d0",
|
|
198
198
|
"#0066cc",
|
|
199
199
|
"#1155cc"
|
|
200
|
-
]),
|
|
201
|
-
function
|
|
202
|
-
return t === "super" ?
|
|
203
|
-
}
|
|
204
|
-
function Mt(t) {
|
|
205
|
-
return Z(t.verticalAlign, t.fontSizePx) - (t.positionPx ?? 0);
|
|
200
|
+
]), vt = (t) => x.has(t.toLowerCase()) ? I : t, et = 0.65, st = -0.38, at = 0.16;
|
|
201
|
+
function nt(t, e) {
|
|
202
|
+
return t === "super" ? st * e : t === "sub" ? at * e : 0;
|
|
206
203
|
}
|
|
207
204
|
function kt(t) {
|
|
205
|
+
return nt(t.verticalAlign, t.fontSizePx) - (t.positionPx ?? 0);
|
|
206
|
+
}
|
|
207
|
+
function Bt(t) {
|
|
208
208
|
const e = t.widthScalePct;
|
|
209
209
|
return e !== void 0 && e > 0 ? e / 100 : 1;
|
|
210
210
|
}
|
|
211
|
-
function
|
|
212
|
-
const e =
|
|
211
|
+
function yt(t) {
|
|
212
|
+
const e = it(t), s = Math.max(1.5, t / 11);
|
|
213
213
|
return [e - s / 2, e + s / 2];
|
|
214
214
|
}
|
|
215
|
-
const
|
|
216
|
-
function
|
|
215
|
+
const Dt = 0.78, ot = (t) => Math.max(1, t / 14), Ut = 1.5, it = (t) => -0.28 * t;
|
|
216
|
+
function Pt(t, e = tt) {
|
|
217
217
|
const s = t.link !== void 0 && t.link.startsWith("#"), a = t.link !== void 0 && !s;
|
|
218
218
|
let n = t.color;
|
|
219
|
-
a ? n = e : s &&
|
|
219
|
+
a ? n = e : s && x.has(t.color.toLowerCase()) && (n = I);
|
|
220
220
|
const o = a || !!t.underline && !s;
|
|
221
221
|
return {
|
|
222
222
|
color: n,
|
|
@@ -227,24 +227,24 @@ function yt(t, e = V) {
|
|
|
227
227
|
externalLink: a
|
|
228
228
|
};
|
|
229
229
|
}
|
|
230
|
-
const
|
|
231
|
-
function
|
|
232
|
-
const n = s + e *
|
|
230
|
+
const ct = "•", rt = "◦", lt = "▪", ut = 0.22, ft = 0.31, dt = 0.135, ht = 0.13, mt = 0.05, Ct = 0.22;
|
|
231
|
+
function Gt(t, e, s, a) {
|
|
232
|
+
const n = s + e * ut, o = a - e * ft;
|
|
233
233
|
switch (t) {
|
|
234
|
-
case
|
|
235
|
-
return { kind: "disc", cx: n, cy: o, r: e *
|
|
236
|
-
case
|
|
237
|
-
return { kind: "ring", cx: n, cy: o, r: e *
|
|
238
|
-
case
|
|
239
|
-
const
|
|
240
|
-
return { kind: "square", x: n -
|
|
234
|
+
case ct:
|
|
235
|
+
return { kind: "disc", cx: n, cy: o, r: e * dt };
|
|
236
|
+
case rt:
|
|
237
|
+
return { kind: "ring", cx: n, cy: o, r: e * ht, lineWidth: e * mt };
|
|
238
|
+
case lt: {
|
|
239
|
+
const i = e * Ct;
|
|
240
|
+
return { kind: "square", x: n - i / 2, y: o - i / 2, size: i };
|
|
241
241
|
}
|
|
242
242
|
default:
|
|
243
243
|
return;
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
-
function
|
|
247
|
-
const s =
|
|
246
|
+
function $t(t, e) {
|
|
247
|
+
const s = ot(e);
|
|
248
248
|
switch (t) {
|
|
249
249
|
case "double":
|
|
250
250
|
return { dash: [], double: !0, wave: !1, thickness: s };
|
|
@@ -264,104 +264,131 @@ function Ut(t, e) {
|
|
|
264
264
|
return { dash: [], double: !1, wave: !1, thickness: s };
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
|
-
const
|
|
268
|
-
function
|
|
269
|
-
const n = Math.max(0.75, a / 18), o = Math.max(4, a / 3),
|
|
270
|
-
for (let r = 0; r <=
|
|
271
|
-
const f = t + s * r /
|
|
267
|
+
const Ht = (t) => t + 1;
|
|
268
|
+
function zt(t, e, s, a) {
|
|
269
|
+
const n = Math.max(0.75, a / 18), o = Math.max(4, a / 3), i = Math.max(2, Math.ceil(s / o * 4)), u = [];
|
|
270
|
+
for (let r = 0; r <= i; r++) {
|
|
271
|
+
const f = t + s * r / i;
|
|
272
272
|
u.push({ x: f, y: e + n * Math.sin(2 * Math.PI * (f - t) / o) });
|
|
273
273
|
}
|
|
274
274
|
return u;
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function Kt(t) {
|
|
277
277
|
return t === "dot" ? [1, 3] : t === "dash" ? [4, 3] : [];
|
|
278
278
|
}
|
|
279
|
-
const
|
|
280
|
-
function
|
|
279
|
+
const Wt = (t) => Math.max(1, t / 14), Yt = [1, 4], Xt = 8, qt = 1 / 3, Vt = "#c0c4c9", Jt = 4;
|
|
280
|
+
function Qt(t, e, s) {
|
|
281
281
|
const a = s.pad ?? 0;
|
|
282
282
|
return { x: t - a, y: e - a, width: s.width + 2 * a, height: s.height + 2 * a };
|
|
283
283
|
}
|
|
284
|
-
const
|
|
285
|
-
function
|
|
286
|
-
const n = t.offsetFrom === "text", o = (
|
|
287
|
-
if (!
|
|
288
|
-
const l =
|
|
289
|
-
if (
|
|
290
|
-
const
|
|
291
|
-
if (d ===
|
|
292
|
-
const h = d < s / 2 ?
|
|
293
|
-
|
|
284
|
+
const _t = 24;
|
|
285
|
+
function jt(t, e, s, a) {
|
|
286
|
+
const n = t.offsetFrom === "text", o = (c) => c?.spacePx ?? _t, i = n ? a.left - o(t.left) : o(t.left), u = n ? e - a.right + o(t.right) : e - o(t.right), r = n ? a.top - o(t.top) : o(t.top), f = n ? s - a.bottom + o(t.bottom) : s - o(t.bottom), C = [], _ = (c, E, d, F, T) => {
|
|
287
|
+
if (!c || c.style === "none") return;
|
|
288
|
+
const l = c.style === "thick" ? Math.max(2, c.widthPx) : Math.max(0.5, c.widthPx), S = c.color === "auto" ? "#000000" : c.color, v = c.style === "dashed" ? [l * 3, l * 2] : c.style === "dotted" ? [l, l * 1.5] : [];
|
|
289
|
+
if (C.push({ x1: E, y1: d, x2: F, y2: T, widthPx: l, color: S, dash: v }), c.style === "double") {
|
|
290
|
+
const R = l + 1;
|
|
291
|
+
if (d === T) {
|
|
292
|
+
const h = d < s / 2 ? R : -R;
|
|
293
|
+
C.push({ x1: E, y1: d + h, x2: F, y2: T + h, widthPx: l, color: S, dash: [] });
|
|
294
294
|
} else {
|
|
295
|
-
const h = E < e / 2 ?
|
|
296
|
-
|
|
295
|
+
const h = E < e / 2 ? R : -R;
|
|
296
|
+
C.push({ x1: E + h, y1: d, x2: F + h, y2: T, widthPx: l, color: S, dash: [] });
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
};
|
|
300
|
-
return
|
|
300
|
+
return _(t.top, i, r, u, r), _(t.bottom, i, f, u, f), _(t.left, i, r, i, f), _(t.right, u, r, u, f), C;
|
|
301
301
|
}
|
|
302
|
-
const
|
|
303
|
-
function
|
|
302
|
+
const Zt = (t) => Math.max(0.5, t);
|
|
303
|
+
function te(t, e) {
|
|
304
304
|
return t === "dashed" ? [e * 3, e * 2] : t === "dotted" ? [e, e * 1.5] : [];
|
|
305
305
|
}
|
|
306
|
-
const
|
|
306
|
+
const ee = (t) => t + 1;
|
|
307
|
+
let g = null, w = null;
|
|
308
|
+
function se(t) {
|
|
309
|
+
g = t;
|
|
310
|
+
}
|
|
311
|
+
function Et() {
|
|
312
|
+
return g || (w || (w = document.createElement("canvas").getContext("2d")), w);
|
|
313
|
+
}
|
|
314
|
+
function ae(t) {
|
|
315
|
+
const e = t.italic ? "italic " : "", s = t.bold ? "700" : "400", a = t.verticalAlign ? Math.round(t.fontSizePx * et) : t.fontSizePx, n = M(O(t.fontFamily)).clone;
|
|
316
|
+
return `${e}${s} ${a}px ${n}`;
|
|
317
|
+
}
|
|
318
|
+
function ne(t, e) {
|
|
319
|
+
const s = Et();
|
|
320
|
+
return s.font = e, s.measureText(t).width;
|
|
321
|
+
}
|
|
322
|
+
function oe(t) {
|
|
323
|
+
const e = y().metricsCache;
|
|
324
|
+
let s = e.get(t);
|
|
325
|
+
if (!s) {
|
|
326
|
+
const a = /(\d+(?:\.\d+)?)px/.exec(t), n = a ? parseFloat(a[1]) : 16, o = t.slice(t.indexOf("px ") + 3).trim(), i = Q(M(o).clone);
|
|
327
|
+
s = { ascent: Math.round(i.ascent * n), descent: Math.round(i.descent * n) }, e.set(t, s);
|
|
328
|
+
}
|
|
329
|
+
return s;
|
|
330
|
+
}
|
|
307
331
|
export {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
332
|
+
m as $,
|
|
333
|
+
X as A,
|
|
334
|
+
Wt as B,
|
|
335
|
+
W as C,
|
|
336
|
+
Nt as D,
|
|
337
|
+
tt as E,
|
|
338
|
+
Ot as F,
|
|
339
|
+
Kt as G,
|
|
340
|
+
V as H,
|
|
341
|
+
xt as I,
|
|
342
|
+
kt as J,
|
|
343
|
+
Pt as K,
|
|
344
|
+
ot as L,
|
|
345
|
+
H as M,
|
|
346
|
+
it as N,
|
|
347
|
+
yt as O,
|
|
348
|
+
Jt as P,
|
|
349
|
+
zt as Q,
|
|
350
|
+
Ht as R,
|
|
351
|
+
Dt as S,
|
|
352
|
+
It as T,
|
|
353
|
+
Ut as U,
|
|
354
|
+
Zt as V,
|
|
355
|
+
te as W,
|
|
356
|
+
$t as X,
|
|
357
|
+
ee as Y,
|
|
358
|
+
Z,
|
|
359
|
+
N as _,
|
|
360
|
+
oe as a,
|
|
361
|
+
Rt as a0,
|
|
362
|
+
At as a1,
|
|
363
|
+
P as a2,
|
|
364
|
+
j as a3,
|
|
365
|
+
gt as a4,
|
|
366
|
+
Lt as a5,
|
|
367
|
+
et as a6,
|
|
368
|
+
St as a7,
|
|
369
|
+
ae as b,
|
|
370
|
+
M as c,
|
|
371
|
+
y as d,
|
|
372
|
+
D as e,
|
|
373
|
+
O as f,
|
|
374
|
+
wt as g,
|
|
375
|
+
z as h,
|
|
376
|
+
se as i,
|
|
377
|
+
q as j,
|
|
378
|
+
Y as k,
|
|
379
|
+
K as l,
|
|
380
|
+
ne as m,
|
|
381
|
+
Vt as n,
|
|
382
|
+
Mt as o,
|
|
383
|
+
pt as p,
|
|
384
|
+
bt as q,
|
|
385
|
+
qt as r,
|
|
386
|
+
Ft as s,
|
|
387
|
+
jt as t,
|
|
388
|
+
Qt as u,
|
|
389
|
+
Gt as v,
|
|
390
|
+
Bt as w,
|
|
391
|
+
vt as x,
|
|
392
|
+
Xt as y,
|
|
393
|
+
Yt as z
|
|
367
394
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as V, f as H, D as W, h as $ } from "./qrcode-
|
|
2
|
-
import { r as C, s as G } from "./stylesheet-
|
|
3
|
-
import { e as m, a as f, c as g, l as y, t as x } from "./pipeline-
|
|
1
|
+
import { g as V, f as H, D as W, h as $ } from "./qrcode-CR8i1-w0.js";
|
|
2
|
+
import { r as C, s as G } from "./stylesheet-BfxJTGA5.js";
|
|
3
|
+
import { e as m, a as f, c as g, l as y, t as x } from "./pipeline-CX_Hc5BD.js";
|
|
4
4
|
import { a as U, h as j } from "./contentTypes-ChqPfcVI.js";
|
|
5
5
|
function K(r) {
|
|
6
6
|
const t = V(r), e = r.rows.length, s = Array.from(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ne, D as oe, n as Me, o as We, r as $e } from "./qrcode-
|
|
1
|
+
import { t as ne, D as oe, n as Me, o as We, r as $e } from "./qrcode-CR8i1-w0.js";
|
|
2
2
|
import { h as je, e as f, b as h, n as y, v as nt, o as Z, c as dt, p as yt, r as wt, d as ot, t as It, I as kt, g as Et, f as Ge, W as Ue } from "./contentTypes-ChqPfcVI.js";
|
|
3
3
|
import { u as ie, s as Ve } from "./browser-ODPzT3Lm.js";
|
|
4
4
|
function Ae() {
|
|
@@ -2253,12 +2253,12 @@ export {
|
|
|
2253
2253
|
Q as B,
|
|
2254
2254
|
Fe as C,
|
|
2255
2255
|
Et as D,
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2256
|
+
Re as E,
|
|
2257
|
+
nt as F,
|
|
2258
|
+
St as G,
|
|
2259
|
+
De as H,
|
|
2260
|
+
_e as I,
|
|
2261
|
+
te as J,
|
|
2262
2262
|
Be as K,
|
|
2263
2263
|
Te as L,
|
|
2264
2264
|
It as M,
|
package/dist-lib/recalc-docx.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { u, s as f, a as m, z as g } from "./browser-ODPzT3Lm.js";
|
|
2
2
|
import { f as h } from "./contentTypes-ChqPfcVI.js";
|
|
3
|
-
import { p as b, c as k } from "./recalcToc-
|
|
3
|
+
import { p as b, c as k } from "./recalcToc-zAFS4S6S.js";
|
|
4
4
|
function w(s, r) {
|
|
5
5
|
const n = b(r), a = {};
|
|
6
6
|
for (const [o, i] of Object.entries(s.bookmarks ?? {})) {
|