kindy-editor 3.2.2 → 3.2.3
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-CHtzL1YW.js → worker-BIFTSRF2.js} +7043 -7021
- package/dist-lib/{browser-BxYyzpLt.js → browser-xuRja-pP.js} +2 -2
- package/dist-lib/builder.js +7 -7
- package/dist-lib/changeAggregator-ymKDXGA8.js +376 -0
- package/dist-lib/{editorApp-N20nk5uQ.js → editorApp-zIpjgEaZ.js} +7281 -7230
- package/dist-lib/events.js +119 -43
- package/dist-lib/export.js +1739 -1732
- package/dist-lib/generate-toc.js +5 -5
- package/dist-lib/import.js +2 -2
- package/dist-lib/{kindy-editor-D4xSNtvA.js → kindy-editor-DuN692fi.js} +5 -5
- package/dist-lib/kindy-editor.js +9 -6
- package/dist-lib/{lists-DpmgbDyt.js → lists-BVCy5dMa.js} +2 -2
- package/dist-lib/measure.js +3 -3
- package/dist-lib/{measureHost-C2NOdNkI.js → measureHost-y37gLU6M.js} +2 -2
- package/dist-lib/{metrics-DHgtBP-R.js → metrics-CdfHD-8y.js} +3 -3
- package/dist-lib/{paintStyle-Cjk9egel.js → paintStyle-Cb7IGKPW.js} +51 -51
- package/dist-lib/{parse-JE_w0NNt.js → parse-DJZd-2A7.js} +20 -20
- package/dist-lib/{pipeline-CgbvBwNe.js → pipeline-DKgBMmw1.js} +301 -301
- package/dist-lib/recalc-docx.js +2 -2
- package/dist-lib/{recalcToc-DKJK9f5X.js → recalcToc-DCykIt4o.js} +80 -80
- package/dist-lib/{styleProps-OePkgWnD.js → styleProps-Dg3Wf-ZJ.js} +3 -3
- package/dist-lib/{stylesheet-COz2MSt6.js → stylesheet-EQFx9l5c.js} +3 -3
- package/dist-lib/{toc-C6XLbDEA.js → toc-BIj8uQ-W.js} +48 -48
- package/dist-lib/{webmcp-DrpPKUeh.js → webmcp-QA5rVg1F.js} +2 -2
- package/docs/http-event-sink.md +7 -0
- package/docs/public-events.md +102 -0
- package/docs/track-changes-events.md +551 -0
- package/package.json +2 -2
- package/types/events.d.ts +67 -1
- package/types/kindy-editor.d.ts +4 -0
- package/dist-lib/eventHub-CZFpTVqe.js +0 -71
- package/dist-lib/events-D_WEQDa6.js +0 -104
- package/docs/.vitepress/cache/deps/@theme_index.js +0 -275
- package/docs/.vitepress/cache/deps/@theme_index.js.map +0 -7
- package/docs/.vitepress/cache/deps/_metadata.json +0 -40
- package/docs/.vitepress/cache/deps/chunk-FNDFPMRQ.js +0 -13131
- package/docs/.vitepress/cache/deps/chunk-FNDFPMRQ.js.map +0 -7
- package/docs/.vitepress/cache/deps/chunk-IOFLAFGL.js +0 -9719
- package/docs/.vitepress/cache/deps/chunk-IOFLAFGL.js.map +0 -7
- package/docs/.vitepress/cache/deps/package.json +0 -3
- package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js +0 -4483
- package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map +0 -7
- package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js +0 -583
- package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js.map +0 -7
- package/docs/.vitepress/cache/deps/vue.js +0 -347
- package/docs/.vitepress/cache/deps/vue.js.map +0 -7
- package/docs/.vitepress/config.ts +0 -32
package/dist-lib/generate-toc.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { u as G,
|
|
2
|
-
import {
|
|
1
|
+
import { u as G, s as C, a as R, z as M } from "./browser-xuRja-pP.js";
|
|
2
|
+
import { a as H, d as K, t as q, i as J, b as Q } from "./toc-BIj8uQ-W.js";
|
|
3
3
|
import { f as V } from "./contentTypes-ChqPfcVI.js";
|
|
4
|
-
import { r as N } from "./pipeline-
|
|
5
|
-
import { p as Y, c as Z } from "./recalcToc-
|
|
6
|
-
import { r as tt,
|
|
4
|
+
import { r as N } from "./pipeline-DKgBMmw1.js";
|
|
5
|
+
import { p as Y, c as Z } from "./recalcToc-DCykIt4o.js";
|
|
6
|
+
import { r as tt, p as et } from "./styleProps-Dg3Wf-ZJ.js";
|
|
7
7
|
import { e as d, t as T, a as nt } from "./xmlWrite-DxSDwuaP.js";
|
|
8
8
|
const b = (t) => d("w:r", void 0, d("w:fldChar", { "w:fldCharType": t })), j = (t) => d("w:r", void 0, d("w:instrText", { "xml:space": "preserve" }, nt(t)));
|
|
9
9
|
function rt(t, a, s) {
|
package/dist-lib/import.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./toc-
|
|
2
|
-
import { m as x } from "./stylesheet-
|
|
3
|
-
import { H as m, A as f,
|
|
4
|
-
import { E as A } from "./
|
|
1
|
+
import "./toc-BIj8uQ-W.js";
|
|
2
|
+
import { m as x } from "./stylesheet-EQFx9l5c.js";
|
|
3
|
+
import { H as m, A as f, C as v, b as y, I as w, T as C, F as T, d as S, e as L, E as D, D as P } from "./paintStyle-Cb7IGKPW.js";
|
|
4
|
+
import { E as A } from "./changeAggregator-ymKDXGA8.js";
|
|
5
5
|
const z = 1.1, B = 0.25, R = 5, M = 36, p = {
|
|
6
6
|
canvasBackground: "#e8eaed",
|
|
7
7
|
grid: P,
|
|
@@ -1830,7 +1830,7 @@ class $ {
|
|
|
1830
1830
|
onEvent: (o) => this.emit(o),
|
|
1831
1831
|
onPublicEvent: (o) => this.events.dispatch(o)
|
|
1832
1832
|
};
|
|
1833
|
-
e.onLoadProgress?.({ phase: "bundle", percent: 0, loaded: 0, total: 0 }), import("./editorApp-
|
|
1833
|
+
e.onLoadProgress?.({ phase: "bundle", percent: 0, loaded: 0, total: 0 }), import("./editorApp-zIpjgEaZ.js").then((o) => o.e).then((o) => (e.onLoadProgress?.({ phase: "bundle", percent: c, loaded: 0, total: 0 }), o.mountEditorApp(n)));
|
|
1834
1834
|
});
|
|
1835
1835
|
}
|
|
1836
1836
|
/** Subscribe to a collaboration event. Returns an unsubscribe function. */
|
package/dist-lib/kindy-editor.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { K as
|
|
2
|
-
import { E as
|
|
1
|
+
import { K as e, d as o, m as r } from "./kindy-editor-DuN692fi.js";
|
|
2
|
+
import { C as i, a as m, E as n, c as g } from "./changeAggregator-ymKDXGA8.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
i as ChangeAggregator,
|
|
5
|
+
m as CommitPolicy,
|
|
6
|
+
n as EditorEvents,
|
|
7
|
+
e as KindyEditor,
|
|
8
|
+
g as createHttpEventSink,
|
|
9
|
+
o as darkCanvasTheme,
|
|
10
|
+
r as makeFloatingDialog
|
|
8
11
|
};
|
package/dist-lib/measure.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./TimesNewRoman-Regular-C7tOI8JO.js";
|
|
2
|
-
import "./metrics-
|
|
3
|
-
import { i as p } from "./measureHost-
|
|
4
|
-
import "./paintStyle-
|
|
2
|
+
import "./metrics-CdfHD-8y.js";
|
|
3
|
+
import { i as p } from "./measureHost-y37gLU6M.js";
|
|
4
|
+
import "./paintStyle-Cb7IGKPW.js";
|
|
5
5
|
export {
|
|
6
6
|
p as installMeasureHost
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as si, a as ai, b as ni, c as ii, d as oi, e as li, f as ui, g as ci, h as fi, i as di, j as hi, k as pi, l as bi, m as gi, n as vi, o as xi, p as mi, q as wi, r as yi, s as Ci, t as Ai, u as Si, v as Ii, w as ki, x as Pi, y as Ei, z as Oi, A as Ti, B as Fi } from "./TimesNewRoman-Regular-C7tOI8JO.js";
|
|
2
|
-
import { s as Bi } from "./metrics-
|
|
2
|
+
import { s as Bi } from "./metrics-CdfHD-8y.js";
|
|
3
3
|
import { B as P0 } from "./index-DJhF0j6V.js";
|
|
4
|
-
import {
|
|
4
|
+
import { a as Za, c as Di, h as Li, i as Mi, M as Ri, j as Ni, k as Sr, l as Ir, n as kr, o as Pr } from "./paintStyle-Cb7IGKPW.js";
|
|
5
5
|
var Q2 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
6
6
|
function Z0(a) {
|
|
7
7
|
return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as u,
|
|
1
|
+
import { S as u, c as r, f as m, a as f, m as x } from "./paintStyle-Cb7IGKPW.js";
|
|
2
2
|
let o = null, a = null;
|
|
3
3
|
function C(t) {
|
|
4
4
|
o = t;
|
|
@@ -15,10 +15,10 @@ function y(t, n) {
|
|
|
15
15
|
return e.font = n, e.measureText(t).width;
|
|
16
16
|
}
|
|
17
17
|
function S(t) {
|
|
18
|
-
const n =
|
|
18
|
+
const n = f().metricsCache;
|
|
19
19
|
let e = n.get(t);
|
|
20
20
|
if (!e) {
|
|
21
|
-
const c = /(\d+(?:\.\d+)?)px/.exec(t), i = c ? parseFloat(c[1]) : 16, l = t.slice(t.indexOf("px ") + 3).trim(), s =
|
|
21
|
+
const c = /(\d+(?:\.\d+)?)px/.exec(t), i = c ? parseFloat(c[1]) : 16, l = t.slice(t.indexOf("px ") + 3).trim(), s = x(r(l).clone);
|
|
22
22
|
e = { ascent: Math.round(s.ascent * i), descent: Math.round(s.descent * i) }, n.set(t, e);
|
|
23
23
|
}
|
|
24
24
|
return e;
|
|
@@ -305,63 +305,63 @@ function Qt(t, e) {
|
|
|
305
305
|
}
|
|
306
306
|
const Zt = (t) => t + 1;
|
|
307
307
|
export {
|
|
308
|
-
|
|
308
|
+
ht as $,
|
|
309
309
|
$ as A,
|
|
310
|
-
|
|
311
|
-
|
|
310
|
+
yt as B,
|
|
311
|
+
G as C,
|
|
312
312
|
Ot as D,
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
313
|
+
V as E,
|
|
314
|
+
Nt as F,
|
|
315
|
+
j as G,
|
|
316
316
|
W as H,
|
|
317
317
|
gt as I,
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
318
|
+
tt as J,
|
|
319
|
+
vt as K,
|
|
320
|
+
Vt as L,
|
|
321
321
|
U as M,
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
322
|
+
Pt as N,
|
|
323
|
+
Jt as O,
|
|
324
|
+
Xt as P,
|
|
325
|
+
Qt as Q,
|
|
326
|
+
Ut as R,
|
|
327
327
|
It as S,
|
|
328
|
-
|
|
328
|
+
bt as T,
|
|
329
329
|
xt as U,
|
|
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
|
-
|
|
330
|
+
Gt as V,
|
|
331
|
+
Zt as W,
|
|
332
|
+
q as X,
|
|
333
|
+
w as Y,
|
|
334
|
+
m as Z,
|
|
335
|
+
dt as _,
|
|
336
|
+
_t as a,
|
|
337
|
+
x as a0,
|
|
338
|
+
X as a1,
|
|
339
|
+
Ft as a2,
|
|
340
|
+
mt as a3,
|
|
341
|
+
Et as a4,
|
|
342
|
+
zt as b,
|
|
343
|
+
At as c,
|
|
344
|
+
wt as d,
|
|
345
|
+
St as e,
|
|
346
|
+
S as f,
|
|
347
|
+
Bt as g,
|
|
348
|
+
v as h,
|
|
349
|
+
Rt as i,
|
|
350
|
+
Tt as j,
|
|
351
|
+
P as k,
|
|
352
|
+
H as l,
|
|
353
|
+
Lt as m,
|
|
354
|
+
K as n,
|
|
355
|
+
Y as o,
|
|
356
|
+
Yt as p,
|
|
357
|
+
qt as q,
|
|
358
|
+
Dt as r,
|
|
359
|
+
Ct as s,
|
|
360
|
+
pt as t,
|
|
361
|
+
Wt as u,
|
|
362
|
+
Kt as v,
|
|
363
363
|
kt as w,
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
364
|
+
$t as x,
|
|
365
|
+
Ht as y,
|
|
366
|
+
Mt as z
|
|
367
367
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { g as V, f as H, D as W, h as $ } from "./toc-BIj8uQ-W.js";
|
|
2
|
+
import { r as C, s as G } from "./stylesheet-EQFx9l5c.js";
|
|
3
|
+
import { e as m, a as f, c as g, l as y, t as x } from "./pipeline-DKgBMmw1.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(
|
|
@@ -122,7 +122,7 @@ const Z = [
|
|
|
122
122
|
"swCell",
|
|
123
123
|
"seCell"
|
|
124
124
|
];
|
|
125
|
-
function
|
|
125
|
+
function J(r, t, e) {
|
|
126
126
|
const s = (i) => {
|
|
127
127
|
switch (i) {
|
|
128
128
|
case "wholeTable":
|
|
@@ -158,7 +158,7 @@ function Q(r, t, e) {
|
|
|
158
158
|
s(i) && r[i] && (n = P(n, r[i]));
|
|
159
159
|
return n;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function Q(r, t, e, s, n) {
|
|
162
162
|
const i = {}, o = n.firstRow && r === 0, a = n.lastRow && r === e - 1, u = n.firstCol && t === 0, c = n.lastCol && t === s - 1;
|
|
163
163
|
if (o && (i.firstRow = !0), a && (i.lastRow = !0), u && (i.firstCol = !0), c && (i.lastCol = !0), n.bandRows && !o && !a) {
|
|
164
164
|
const l = n.firstRow ? 1 : 0, h = Math.floor((r - l) / Math.max(1, n.rowBandSize ?? 1));
|
|
@@ -171,7 +171,7 @@ function J(r, t, e, s, n) {
|
|
|
171
171
|
return i;
|
|
172
172
|
}
|
|
173
173
|
const Et = { firstRow: !0, bandRows: !0 };
|
|
174
|
-
function
|
|
174
|
+
function _(r, t, e, s) {
|
|
175
175
|
const n = r, i = e, o = { ...n };
|
|
176
176
|
for (const [a, u] of Object.entries(t))
|
|
177
177
|
s?.has(a) || u !== void 0 && (n[a] === void 0 || n[a] === i[a]) && (o[a] = u);
|
|
@@ -180,16 +180,16 @@ function N(r, t, e, s) {
|
|
|
180
180
|
function At(r, t, e, s, n) {
|
|
181
181
|
const i = Y(e, t.id), o = K(r);
|
|
182
182
|
return X(o, (a, u) => {
|
|
183
|
-
const c =
|
|
183
|
+
const c = Q(u.originRow, u.originCol, o.rows, o.cols, {
|
|
184
184
|
...s,
|
|
185
185
|
rowBandSize: t.rowBandSize ?? 1,
|
|
186
186
|
colBandSize: t.colBandSize ?? 1
|
|
187
|
-
}), l =
|
|
187
|
+
}), l = J(i, c), h = { ...a };
|
|
188
188
|
return l.shading !== void 0 ? h.shading = l.shading : delete h.shading, l.borders && Object.keys(l.borders).length > 0 ? h.borders = l.borders : delete h.borders, l.margin ? h.margin = l.margin : delete h.margin, n && (l.char || l.para) && (h.blocks = h.blocks.map(
|
|
189
189
|
(d) => d.kind === "paragraph" ? {
|
|
190
190
|
...d,
|
|
191
|
-
style: l.para ?
|
|
192
|
-
runs: l.char ? d.runs.map((w) => ({ ...w, style:
|
|
191
|
+
style: l.para ? _(d.style, l.para, n.para, n.explicitPara?.get(d)) : d.style,
|
|
192
|
+
runs: l.char ? d.runs.map((w) => ({ ...w, style: _(w.style, l.char, n.char, n.explicitChar?.get(w)) })) : d.runs
|
|
193
193
|
} : d
|
|
194
194
|
)), h;
|
|
195
195
|
});
|
|
@@ -228,7 +228,7 @@ function Tt(r, t) {
|
|
|
228
228
|
style: { ...T, ...e.para }
|
|
229
229
|
};
|
|
230
230
|
}
|
|
231
|
-
class
|
|
231
|
+
class Nt {
|
|
232
232
|
ids;
|
|
233
233
|
doc;
|
|
234
234
|
warnings = [];
|
|
@@ -759,7 +759,7 @@ class ct {
|
|
|
759
759
|
* tokenizer already captured the brace group as one `rawtext` token; fall back
|
|
760
760
|
* to a math atom flattened to text if it wasn't (e.g. `\text x`). */
|
|
761
761
|
rawTextArg() {
|
|
762
|
-
return this.peek()?.k === "rawtext" ? this.next().v :
|
|
762
|
+
return this.peek()?.k === "rawtext" ? this.next().v : N(this.arg());
|
|
763
763
|
}
|
|
764
764
|
/** Consume an optional `[...]` argument; returns null if absent. */
|
|
765
765
|
optArg() {
|
|
@@ -857,7 +857,7 @@ class ct {
|
|
|
857
857
|
}
|
|
858
858
|
/** \begin{env} … \end{env} — matrices and cases. */
|
|
859
859
|
environment() {
|
|
860
|
-
const t =
|
|
860
|
+
const t = N(this.arg()), e = rt[t] ?? ["", ""], s = [];
|
|
861
861
|
let n = [], i = [];
|
|
862
862
|
const o = () => {
|
|
863
863
|
n.push(this.row(i)), i = [];
|
|
@@ -907,7 +907,7 @@ function pt(r) {
|
|
|
907
907
|
function I(r, t) {
|
|
908
908
|
return r.type === "ident" ? { ...r, variant: t } : r.type === "number" ? { ...r, variant: t } : r.type === "row" ? { ...r, children: r.children.map((e) => I(e, t)) } : r;
|
|
909
909
|
}
|
|
910
|
-
function
|
|
910
|
+
function N(r) {
|
|
911
911
|
switch (r.type) {
|
|
912
912
|
case "ident":
|
|
913
913
|
case "number":
|
|
@@ -915,12 +915,12 @@ function _(r) {
|
|
|
915
915
|
case "text":
|
|
916
916
|
return r.text;
|
|
917
917
|
case "row":
|
|
918
|
-
return r.children.map(
|
|
918
|
+
return r.children.map(N).join("");
|
|
919
919
|
default:
|
|
920
920
|
return "";
|
|
921
921
|
}
|
|
922
922
|
}
|
|
923
|
-
function
|
|
923
|
+
function _t(r) {
|
|
924
924
|
return { type: "row", children: new ct(at(r)).parseList() };
|
|
925
925
|
}
|
|
926
926
|
const M = /* @__PURE__ */ new Set([
|
|
@@ -1061,7 +1061,7 @@ function wt(r) {
|
|
|
1061
1061
|
}
|
|
1062
1062
|
export {
|
|
1063
1063
|
z as A,
|
|
1064
|
-
|
|
1064
|
+
Nt as B,
|
|
1065
1065
|
Et as D,
|
|
1066
1066
|
L as G,
|
|
1067
1067
|
E as O,
|
|
@@ -1070,12 +1070,12 @@ export {
|
|
|
1070
1070
|
At as b,
|
|
1071
1071
|
vt as c,
|
|
1072
1072
|
Y as d,
|
|
1073
|
-
|
|
1074
|
-
|
|
1073
|
+
J as e,
|
|
1074
|
+
Q as f,
|
|
1075
1075
|
Ct as g,
|
|
1076
1076
|
q as h,
|
|
1077
1077
|
Tt as i,
|
|
1078
|
-
|
|
1078
|
+
_t as l,
|
|
1079
1079
|
Rt as m,
|
|
1080
1080
|
kt as n,
|
|
1081
1081
|
Ot as p,
|