kindy-editor 3.2.6 → 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.
Files changed (31) hide show
  1. package/dist-lib/assets/{worker-B7ALyZOw.js → worker-DjZBUOhB.js} +1009 -997
  2. package/dist-lib/assets/{worker-z-dyEi8F.js → worker-Du8hmveE.js} +2234 -2222
  3. package/dist-lib/builder.js +4 -4
  4. package/dist-lib/events.js +9 -120
  5. package/dist-lib/export.js +9 -11
  6. package/dist-lib/generate-toc.js +3 -3
  7. package/dist-lib/import.js +2 -2
  8. package/dist-lib/index-D5dkvB0x.js +490 -0
  9. package/dist-lib/{editorApp-Bu3dbUIU.js → kindy-editor-T1YCQdwF.js} +13483 -11185
  10. package/dist-lib/kindy-editor.js +4 -4
  11. package/dist-lib/measure.js +3 -4
  12. package/dist-lib/{measureHost-CpqJsipA.js → measureHost-BG9FPivu.js} +17 -18
  13. package/dist-lib/{paintStyle-Cb7IGKPW.js → metrics-D7Ma2xlj.js} +175 -148
  14. package/dist-lib/{parse-CKw-ZDr9.js → parse-BsUkqk-n.js} +3 -3
  15. package/dist-lib/{pipeline-BkC7G8gU.js → pipeline-CX_Hc5BD.js} +850 -837
  16. package/dist-lib/{qrcode-oNwKusWD.js → qrcode--5MhVNEZ.js} +1 -1
  17. package/dist-lib/{qrcode-efBlPzzh.js → qrcode-CR8i1-w0.js} +11 -11
  18. package/dist-lib/recalc-docx.js +1 -1
  19. package/dist-lib/{recalcToc-Bc8V9Ecn.js → recalcToc-zAFS4S6S.js} +755 -742
  20. package/dist-lib/{stylesheet-BT1DGhnx.js → stylesheet-BfxJTGA5.js} +1 -1
  21. package/dist-lib/{webmcp-ClHEa6Gq.js → webmcp-Ds469lXP.js} +2 -2
  22. package/docs/find-and-replace.md +224 -0
  23. package/docs/security-review.md +26 -0
  24. package/docs/table-editing.md +17 -2
  25. package/docs/table-form-integration.md +53 -1
  26. package/package.json +6 -6
  27. package/types/import.d.ts +7 -0
  28. package/types/kindy-editor.d.ts +30 -0
  29. package/dist-lib/changeAggregator-ZI959nPP.js +0 -376
  30. package/dist-lib/kindy-editor-CToKn_gP.js +0 -2171
  31. package/dist-lib/metrics-CdfHD-8y.js +0 -31
@@ -1,8 +1,8 @@
1
- import { t as k, B as I, j as E, k as N } from "./qrcode-efBlPzzh.js";
2
- import { s as F, d as H } from "./stylesheet-BT1DGhnx.js";
1
+ import { t as k, B as I, j as E, k as N } from "./qrcode-CR8i1-w0.js";
2
+ import { s as F, d as H } from "./stylesheet-BfxJTGA5.js";
3
3
  import { d as B, D as O, a as W, b as q, n as $, m as j } from "./lists-BVCy5dMa.js";
4
- import { l as U, p as K, D as z, b as _, B as T } from "./parse-CKw-ZDr9.js";
5
- import { b as G, d as V, r as Z } from "./pipeline-BkC7G8gU.js";
4
+ import { l as U, p as K, D as z, b as _, B as T } from "./parse-BsUkqk-n.js";
5
+ import { b as G, d as V, r as Z } from "./pipeline-CX_Hc5BD.js";
6
6
  function M(a, t) {
7
7
  return { root: U(a), display: t };
8
8
  }
@@ -1,122 +1,11 @@
1
- import { C as l, a as I, E as u, c as h } from "./changeAggregator-ZI959nPP.js";
2
- import "./qrcode-efBlPzzh.js";
3
- const n = "1.0";
4
- function c(e) {
5
- const t = /* @__PURE__ */ new Set();
6
- for (const a of e)
7
- switch (a.type) {
8
- case "insertText":
9
- case "insertRuns":
10
- case "splitParagraph":
11
- t.add(a.at.blockId), a.type === "splitParagraph" && t.add(a.newBlockId);
12
- break;
13
- case "mergeParagraphs":
14
- t.add(a.firstBlockId);
15
- break;
16
- case "insertBlock":
17
- t.add(a.block.id);
18
- break;
19
- case "setTableRow":
20
- case "setTableStructure":
21
- case "setTableStyleRef":
22
- case "insertTableRow":
23
- case "removeTableRow":
24
- case "setRowHeight":
25
- case "insertTableColumn":
26
- case "removeTableColumn":
27
- t.add(a.tableId);
28
- break;
29
- case "deleteRange":
30
- case "setRuns":
31
- case "setParaStyle":
32
- case "removeBlock":
33
- case "setImageProps":
34
- case "setEquation":
35
- case "setEquationAlign":
36
- case "setTableColFractions":
37
- case "setTableWidthMode":
38
- case "setTablePreferredWidth":
39
- case "setTableAlign":
40
- case "setTableProps":
41
- t.add(a.blockId);
42
- break;
43
- }
44
- return [...t];
45
- }
46
- function i(e, t) {
47
- const a = { type: "review.operation.applied", data: { operation: e, remote: t } };
48
- switch (e.type) {
49
- case "addSuggestion":
50
- return [a, { type: "review.suggestion.created", data: { suggestionId: e.s.id, kind: e.s.kind, remote: t } }];
51
- case "removeSuggestion":
52
- return [a, { type: "review.suggestion.removed", data: { suggestionId: e.id, remote: t } }];
53
- case "growSuggestion":
54
- return [a];
55
- case "addThread": {
56
- const d = e.t.comments[0];
57
- return d ? [
58
- a,
59
- { type: "review.thread.created", data: { threadId: e.t.id, remote: t } },
60
- {
61
- type: "review.comment.added",
62
- data: {
63
- threadId: e.t.id,
64
- commentId: d.id,
65
- authorId: d.author.id,
66
- isReply: !1,
67
- mentionedUserIds: (d.mentions ?? []).map((s) => s.id),
68
- remote: t
69
- }
70
- }
71
- ] : [a, { type: "review.thread.created", data: { threadId: e.t.id, remote: t } }];
72
- }
73
- case "removeThread":
74
- return [a, { type: "review.thread.removed", data: { threadId: e.id, remote: t } }];
75
- case "addComment":
76
- return [a, {
77
- type: "review.comment.added",
78
- data: {
79
- threadId: e.threadId,
80
- commentId: e.c.id,
81
- authorId: e.c.author.id,
82
- isReply: !0,
83
- mentionedUserIds: (e.c.mentions ?? []).map((d) => d.id),
84
- remote: t
85
- }
86
- }];
87
- case "removeComment":
88
- return [a, { type: "review.comment.removed", data: { threadId: e.threadId, commentId: e.commentId, remote: t } }];
89
- case "editComment":
90
- return [a, {
91
- type: "review.comment.edited",
92
- data: {
93
- threadId: e.threadId,
94
- commentId: e.commentId,
95
- mentionedUserIds: (e.mentions ?? []).map((d) => d.id),
96
- newlyMentionedUserIds: e.newlyMentionedUserIds ?? [],
97
- remote: t
98
- }
99
- }];
100
- case "deleteComment":
101
- return [a, {
102
- type: "review.comment.deleted",
103
- data: {
104
- threadId: e.threadId,
105
- commentId: e.commentId,
106
- deletedByUserId: e.deletedBy.id,
107
- remote: t
108
- }
109
- }];
110
- case "setThreadStatus":
111
- return [a, { type: "review.thread.status.changed", data: { threadId: e.threadId, status: e.status, remote: t } }];
112
- }
113
- }
1
+ import { C as s, d as E, E as o, b as r, a as i, e as c, p as n } from "./index-D5dkvB0x.js";
2
+ import "./qrcode-CR8i1-w0.js";
114
3
  export {
115
- l as ChangeAggregator,
116
- I as CommitPolicy,
117
- n as EDITOR_EVENT_SCHEMA_VERSION,
118
- u as EditorEvents,
119
- c as affectedBlockIds,
120
- h as createHttpEventSink,
121
- i as projectReviewEvents
4
+ s as ChangeAggregator,
5
+ E as CommitPolicy,
6
+ o as EDITOR_EVENT_SCHEMA_VERSION,
7
+ r as EditorEvents,
8
+ i as affectedBlockIds,
9
+ c as createHttpEventSink,
10
+ n as projectReviewEvents
122
11
  };
@@ -1,14 +1,14 @@
1
1
  import { B as $e } from "./index-6mKfgpcs.js";
2
- import { c as Ct, g as Ir, a as ec, $ as tc, b as ka, r as jf, d as Uf, i as zf, e as Ba, s as rc } from "./measureHost-CpqJsipA.js";
2
+ import { c as Ct, g as Ir, a as ec, $ as tc, b as ka, r as jf, d as Uf, i as zf, e as Ba, s as rc } from "./measureHost-BG9FPivu.js";
3
3
  import { _ as nc, f as nt } from "./__vite-browser-external-BYRIRx8p.js";
4
- import { D as ic, d as ac, t as oc, a as sc, i as fc } from "./qrcode-efBlPzzh.js";
5
- import { i as lc, r as qf, g as cc, b as uc, u as hc, f as dc, d as pc } from "./qrcode-oNwKusWD.js";
6
- import { q as Ma, r as gc, t as La, u as Da, T as xc, v as Na, x as yc, y as mc, I as bc, D as wc, B as ja, G as ea, U as Ua, J as za, z as vc, S as _c, w as Sc, K as Ec, O as Ac, Q as Pc, M as Tc, R as Rc, N as Cc, V as Oc, W as Fc, s as Tr, a3 as $f, L as Ic, b as kc, d as Bc, p as Mc, a4 as Wf, H as Lc, A as Dc, C as Nc } from "./paintStyle-Cb7IGKPW.js";
4
+ import { D as ic, d as ac, t as oc, a as sc, i as fc } from "./qrcode-CR8i1-w0.js";
5
+ import { i as lc, r as qf, g as cc, b as uc, u as hc, f as dc, d as pc } from "./qrcode--5MhVNEZ.js";
6
+ import { u as Ma, v as gc, x as La, y as Da, T as xc, z as Na, B as yc, G as mc, I as bc, D as wc, K as ja, L as ea, U as Ua, N as za, J as vc, a6 as _c, w as Sc, O as Ec, V as Ac, W as Pc, M as Tc, X as Rc, R as Cc, Q as Oc, Y as Fc, s as Tr, a5 as $f, t as Ic, n as kc, p as Bc, r as Mc, a7 as Wf, j as Lc, k as Dc, l as Nc } from "./metrics-D7Ma2xlj.js";
7
7
  import { a as jc, z as Uc } from "./browser-ODPzT3Lm.js";
8
8
  import { h as Wt, a as Je, r as kr, b as ca, p as zc, c as dr, d as Hf, e as qc, t as $c } from "./styleProps-Dg3Wf-ZJ.js";
9
9
  import { e as j, X as st, a as Gf, W as Ht, t as Zf } from "./xmlWrite-DxSDwuaP.js";
10
- import { a as Wc } from "./stylesheet-BT1DGhnx.js";
11
- import { p as Hc, c as Gc } from "./recalcToc-Bc8V9Ecn.js";
10
+ import { a as Wc } from "./stylesheet-BfxJTGA5.js";
11
+ import { p as Hc, c as Gc } from "./recalcToc-zAFS4S6S.js";
12
12
  var pr = { exports: {} }, qa;
13
13
  function ua() {
14
14
  if (qa) return pr.exports;
@@ -3532,9 +3532,7 @@ function tr() {
3532
3532
  }
3533
3533
  }), ti;
3534
3534
  }
3535
- var ri = {}, xr = { exports: {} };
3536
- /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
3537
- var ts;
3535
+ var ri = {}, xr = { exports: {} }, ts;
3538
3536
  function Fu() {
3539
3537
  return ts || (ts = 1, (function(e, t) {
3540
3538
  var n = qt(), r = n.Buffer;
@@ -3546,7 +3544,7 @@ function Fu() {
3546
3544
  function a(o, s, f) {
3547
3545
  return r(o, s, f);
3548
3546
  }
3549
- a.prototype = Object.create(r.prototype), i(r, a), a.from = function(o, s, f) {
3547
+ i(r, a), a.from = function(o, s, f) {
3550
3548
  if (typeof o == "number")
3551
3549
  throw new TypeError("Argument must not be a number");
3552
3550
  return r(o, s, f);
@@ -14095,7 +14093,7 @@ async function rp(e, t = {}) {
14095
14093
  }
14096
14094
  async function np(e, t, n) {
14097
14095
  await zf();
14098
- const { createLayoutEngine: r } = await import("./recalcToc-Bc8V9Ecn.js").then((g) => g.b), i = r(n, t.cjk).layout(e), a = new $l(), o = t.images ?? {}, s = new $r({ autoFirstPage: !1, compress: !0, font: !1 }), f = ap(s), d = /* @__PURE__ */ new Set(), p = (g, m, A) => {
14096
+ const { createLayoutEngine: r } = await import("./recalcToc-zAFS4S6S.js").then((g) => g.b), i = r(n, t.cjk).layout(e), a = new $l(), o = t.images ?? {}, s = new $r({ autoFirstPage: !1, compress: !0, font: !1 }), f = ap(s), d = /* @__PURE__ */ new Set(), p = (g, m, A) => {
14099
14097
  const C = Ba(g, m, A);
14100
14098
  return d.has(C.file) || (s.registerFont(C.file, Qi(C.bytes)), d.add(C.file), C.substituted && a.warn("font-substituted", g)), C.file;
14101
14099
  }, h = /* @__PURE__ */ new Set();
@@ -1,8 +1,8 @@
1
1
  import { u as G, s as C, a as R, z as M } from "./browser-ODPzT3Lm.js";
2
- import { a as H, d as K, t as q, i as J, b as Q } from "./qrcode-efBlPzzh.js";
2
+ import { a as H, d as K, t as q, i as J, b as Q } from "./qrcode-CR8i1-w0.js";
3
3
  import { f as V } from "./contentTypes-ChqPfcVI.js";
4
- import { r as N } from "./pipeline-BkC7G8gU.js";
5
- import { p as Y, c as Z } from "./recalcToc-Bc8V9Ecn.js";
4
+ import { r as N } from "./pipeline-CX_Hc5BD.js";
5
+ import { p as Y, c as Z } from "./recalcToc-zAFS4S6S.js";
6
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)));
@@ -1,5 +1,5 @@
1
- import "./qrcode-efBlPzzh.js";
2
- import { r as t } from "./pipeline-BkC7G8gU.js";
1
+ import "./qrcode-CR8i1-w0.js";
2
+ import { r as t } from "./pipeline-CX_Hc5BD.js";
3
3
  import "./contentTypes-ChqPfcVI.js";
4
4
  export {
5
5
  t as runImport