kindy-editor 3.1.0 → 3.2.0

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 (50) hide show
  1. package/README.md +27 -2
  2. package/dist-lib/builder.js +4 -4
  3. package/dist-lib/{editorApp-F48A7I6z.js → editorApp-CtrnSSsP.js} +9620 -8998
  4. package/dist-lib/events.js +1 -1
  5. package/dist-lib/export.js +6 -6
  6. package/dist-lib/generate-toc.js +3 -3
  7. package/dist-lib/import.js +2 -2
  8. package/dist-lib/{kindy-editor-DnWvHijW.js → kindy-editor-CoeqFYYG.js} +100 -85
  9. package/dist-lib/kindy-editor.js +1 -1
  10. package/dist-lib/measure.js +3 -3
  11. package/dist-lib/{measureHost-Ca_gM01T.js → measureHost-mtLj644m.js} +2 -2
  12. package/dist-lib/{metrics-BFTHu_jF.js → metrics-DHgtBP-R.js} +1 -1
  13. package/dist-lib/{paintStyle-GQFOpJKx.js → paintStyle-Cjk9egel.js} +10 -9
  14. package/dist-lib/{parse-DmTwoFz6.js → parse-D3V5Abci.js} +11 -11
  15. package/dist-lib/{pipeline-BTemNJdx.js → pipeline-JfHxzjns.js} +1 -1
  16. package/dist-lib/recalc-docx.js +1 -1
  17. package/dist-lib/{recalcToc-c9kIMGbk.js → recalcToc-MRszlj8g.js} +80 -80
  18. package/dist-lib/{stylesheet-BcU1Q_JI.js → stylesheet-E5bu1xch.js} +1 -1
  19. package/dist-lib/{toc-mgkp-28Y.js → toc-DSwkNKls.js} +15 -15
  20. package/dist-lib/{webmcp-BLC_QALL.js → webmcp-Dr3n_xAO.js} +2 -2
  21. package/docs/.vitepress/cache/deps/_metadata.json +7 -7
  22. package/docs/.vitepress/config.ts +4 -0
  23. package/docs/.vitepress/dist/404.html +2 -2
  24. package/docs/.vitepress/dist/assets/{app.DYJtoZwO.js → app.rXBVdtfQ.js} +1 -1
  25. package/docs/.vitepress/dist/assets/chunks/framework.D9_ZvfG7.js +19 -0
  26. package/docs/.vitepress/dist/assets/chunks/{theme.BTGY7hKU.js → theme.CFP3sGN8.js} +1 -1
  27. package/docs/.vitepress/dist/assets/fonts.md.W87hfQua.js +75 -0
  28. package/docs/.vitepress/dist/assets/fonts.md.W87hfQua.lean.js +1 -0
  29. package/docs/.vitepress/dist/assets/{http-event-sink.md.BViKRVhd.js → http-event-sink.md.D7mTerle.js} +1 -1
  30. package/docs/.vitepress/dist/assets/{http-event-sink.md.BViKRVhd.lean.js → http-event-sink.md.D7mTerle.lean.js} +1 -1
  31. package/docs/.vitepress/dist/assets/{index.md.Bc6V9_E3.js → index.md.DN1JXJhG.js} +1 -1
  32. package/docs/.vitepress/dist/assets/{index.md.Bc6V9_E3.lean.js → index.md.DN1JXJhG.lean.js} +1 -1
  33. package/docs/.vitepress/dist/assets/{public-events.md.CMTD1Y84.js → public-events.md.Rj44CdBr.js} +1 -1
  34. package/docs/.vitepress/dist/assets/{public-events.md.CMTD1Y84.lean.js → public-events.md.Rj44CdBr.lean.js} +1 -1
  35. package/docs/.vitepress/dist/assets/{review-comments.md.19jCC2Pi.js → review-comments.md.466PcTcC.js} +1 -1
  36. package/docs/.vitepress/dist/assets/{review-comments.md.19jCC2Pi.lean.js → review-comments.md.466PcTcC.lean.js} +1 -1
  37. package/docs/.vitepress/dist/assets/table-editing.md.Bso_sgTE.js +28 -0
  38. package/docs/.vitepress/dist/assets/table-editing.md.Bso_sgTE.lean.js +1 -0
  39. package/docs/.vitepress/dist/fonts.html +99 -0
  40. package/docs/.vitepress/dist/hashmap.json +1 -1
  41. package/docs/.vitepress/dist/http-event-sink.html +6 -6
  42. package/docs/.vitepress/dist/index.html +6 -6
  43. package/docs/.vitepress/dist/public-events.html +7 -7
  44. package/docs/.vitepress/dist/review-comments.html +6 -6
  45. package/docs/.vitepress/dist/table-editing.html +52 -0
  46. package/docs/fonts.md +139 -0
  47. package/docs/table-editing.md +102 -0
  48. package/package.json +4 -1
  49. package/types/kindy-editor.d.ts +65 -1
  50. package/docs/.vitepress/dist/assets/chunks/framework.DCJ5T8RY.js +0 -19
@@ -1,5 +1,5 @@
1
1
  import { E as k } from "./eventHub-CZFpTVqe.js";
2
- import "./toc-mgkp-28Y.js";
2
+ import "./toc-DSwkNKls.js";
3
3
  import { E as I, a as M, p as b } from "./events-D_WEQDa6.js";
4
4
  function T(e) {
5
5
  const h = e.fetch ?? globalThis.fetch;
@@ -1,14 +1,14 @@
1
1
  import { B as $e } from "./index-6mKfgpcs.js";
2
- import { c as Ct, g as Ir, a as Jl, $ as Ql, b as ka, r as Nf, d as jf, i as Uf, e as Ba, s as ec } from "./measureHost-Ca_gM01T.js";
2
+ import { c as Ct, g as Ir, a as Jl, $ as Ql, b as ka, r as Nf, d as jf, i as Uf, e as Ba, s as ec } from "./measureHost-mtLj644m.js";
3
3
  import { _ as tc, f as nt } from "./__vite-browser-external-BYRIRx8p.js";
4
- import { D as rc, d as nc, t as ic, p as ac, i as oc } from "./toc-mgkp-28Y.js";
5
- import { p as Ma, b as sc, n as La, T as Da, a as fc, c as Na, l as lc, d as cc, I as uc, D as hc, r as ja, e as ea, U as Ua, s as za, f as dc, S as pc, w as gc, g as xc, h as yc, i as mc, M as bc, u as wc, j as vc, k as _c, m as Sc, o as Pr, q as zf, t as Ec, C as Ac, F as Tc, v as Pc, x as qf, H as Rc, A as Cc, y as Oc } from "./paintStyle-GQFOpJKx.js";
4
+ import { D as rc, d as nc, t as ic, p as ac, i as oc } from "./toc-DSwkNKls.js";
5
+ import { p as Ma, b as sc, n as La, T as Da, a as fc, c as Na, l as lc, d as cc, I as uc, D as hc, r as ja, e as ea, U as Ua, s as za, f as dc, S as pc, w as gc, g as xc, h as yc, i as mc, M as bc, u as wc, j as vc, k as _c, m as Sc, o as Pr, q as zf, t as Ec, C as Ac, F as Tc, v as Pc, x as qf, H as Rc, A as Cc, y as Oc } from "./paintStyle-Cjk9egel.js";
6
6
  import { s as Fc, z as Ic } from "./browser-BUrsjziD.js";
7
7
  import { h as Wt, p as Je, r as kr, a as ca, b as kc, c as dr, d as $f, e as Bc, t as Mc } from "./styleProps-OePkgWnD.js";
8
8
  import { e as j, X as st, a as Wf, W as Ht, t as Hf } from "./xmlWrite-DxSDwuaP.js";
9
9
  import { u as Lc } from "./change-SnW3Oipy.js";
10
- import { a as Dc } from "./stylesheet-BcU1Q_JI.js";
11
- import { p as Nc, c as jc } from "./recalcToc-c9kIMGbk.js";
10
+ import { a as Dc } from "./stylesheet-E5bu1xch.js";
11
+ import { p as Nc, c as jc } from "./recalcToc-MRszlj8g.js";
12
12
  var pr = { exports: {} }, qa;
13
13
  function ua() {
14
14
  if (qa) return pr.exports;
@@ -14095,7 +14095,7 @@ async function Vd(e, t = {}) {
14095
14095
  }
14096
14096
  async function Kd(e, t, n) {
14097
14097
  await Uf();
14098
- const { createLayoutEngine: r } = await import("./recalcToc-c9kIMGbk.js").then((x) => x.b), i = r(n, t.cjk).layout(e), a = new zl(), o = t.images ?? {}, s = new $r({ autoFirstPage: !1, compress: !0, font: !1 }), f = Jd(s), d = /* @__PURE__ */ new Set(), p = (x, m, A) => {
14098
+ const { createLayoutEngine: r } = await import("./recalcToc-MRszlj8g.js").then((x) => x.b), i = r(n, t.cjk).layout(e), a = new zl(), o = t.images ?? {}, s = new $r({ autoFirstPage: !1, compress: !0, font: !1 }), f = Jd(s), d = /* @__PURE__ */ new Set(), p = (x, m, A) => {
14099
14099
  const O = Ba(x, m, A);
14100
14100
  return d.has(O.file) || (s.registerFont(O.file, Qi(O.bytes)), d.add(O.file), O.substituted && a.warn("font-substituted", x)), O.file;
14101
14101
  }, h = /* @__PURE__ */ new Set();
@@ -1,8 +1,8 @@
1
1
  import { u as G, a as C, s as R, z as M } from "./browser-BUrsjziD.js";
2
- import { p as H, d as K, t as q, i as J, c as Q } from "./toc-mgkp-28Y.js";
2
+ import { p as H, d as K, t as q, i as J, c as Q } from "./toc-DSwkNKls.js";
3
3
  import { f as V } from "./contentTypes-ChqPfcVI.js";
4
- import { r as N } from "./pipeline-BTemNJdx.js";
5
- import { p as Y, c as Z } from "./recalcToc-c9kIMGbk.js";
4
+ import { r as N } from "./pipeline-JfHxzjns.js";
5
+ import { p as Y, c as Z } from "./recalcToc-MRszlj8g.js";
6
6
  import { r as tt, b as et } from "./styleProps-OePkgWnD.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 "./toc-mgkp-28Y.js";
2
- import { r as t } from "./pipeline-BTemNJdx.js";
1
+ import "./toc-DSwkNKls.js";
2
+ import { r as t } from "./pipeline-JfHxzjns.js";
3
3
  import "./contentTypes-ChqPfcVI.js";
4
4
  export {
5
5
  t as runImport
@@ -1,8 +1,8 @@
1
- import "./toc-mgkp-28Y.js";
2
- import { m as x } from "./stylesheet-BcU1Q_JI.js";
3
- import { H as m, A as f, y as v, C as w, I as y, a as C, P as T, F as S, Q as L, R as D, D as z } from "./paintStyle-GQFOpJKx.js";
4
- import { E as P } from "./eventHub-CZFpTVqe.js";
5
- const B = 1.1, A = 0.25, R = 5, M = 36, p = {
1
+ import "./toc-DSwkNKls.js";
2
+ import { m as x } from "./stylesheet-E5bu1xch.js";
3
+ import { H as m, A as f, y as v, C as w, I as y, a as C, P as T, F as S, Q as L, R as D, D as z } from "./paintStyle-Cjk9egel.js";
4
+ import { E as A } from "./eventHub-CZFpTVqe.js";
5
+ const P = 1.1, B = 0.25, R = 5, M = 36, p = {
6
6
  canvasBackground: "#e8eaed",
7
7
  grid: z,
8
8
  gridMesh: "rgba(0,0,0,0.08)",
@@ -26,8 +26,8 @@ const B = 1.1, A = 0.25, R = 5, M = 36, p = {
26
26
  font: "9px 'Segoe UI', sans-serif"
27
27
  }
28
28
  }, g = {
29
- zoomStep: B,
30
- zoomMin: A,
29
+ zoomStep: P,
30
+ zoomMin: B,
31
31
  zoomMax: R,
32
32
  indentStepPx: M,
33
33
  gridSpacingPx: 24
@@ -35,36 +35,39 @@ const B = 1.1, A = 0.25, R = 5, M = 36, p = {
35
35
  canvasBackground: "#202124",
36
36
  ruler: { bg: "#2a2d31", content: "#3c4043", line: "#5f6368", label: "#bdc1c6" }
37
37
  };
38
- function E(r) {
39
- return r ? {
38
+ function E(t) {
39
+ return t ? {
40
40
  ...p,
41
- ...l(r),
42
- ruler: { ...p.ruler, ...r.ruler ? l(r.ruler) : {} }
41
+ ...l(t),
42
+ ruler: { ...p.ruler, ...t.ruler ? l(t.ruler) : {} }
43
43
  } : p;
44
44
  }
45
- function F(r) {
46
- return r ? { ...g, ...l(r) } : g;
45
+ function F(t) {
46
+ return t ? { ...g, ...l(t) } : g;
47
47
  }
48
- function I(r) {
49
- return r ? {
50
- disableBuiltin: r.disableBuiltin ? [...r.disableBuiltin] : [],
51
- fonts: r.fonts ? r.fonts.map((e) => ({ ...e, faces: { ...e.faces }, sizing: { ...e.sizing } })) : []
48
+ function I(t) {
49
+ return t ? {
50
+ disableBuiltin: t.disableBuiltin ? [...t.disableBuiltin] : [],
51
+ fonts: t.fonts ? t.fonts.map((e) => ({ ...e, faces: { ...e.faces }, sizing: { ...e.sizing } })) : [],
52
+ ...t.baseUrl ? { baseUrl: t.baseUrl } : {},
53
+ ...t.manifests ? { manifests: t.manifests.map((e) => typeof e == "string" ? { url: e } : { ...e }) } : {},
54
+ ...t.loader ? { loader: t.loader } : {}
52
55
  } : { disableBuiltin: [], fonts: [] };
53
56
  }
54
- function Z(r = {}) {
55
- const e = r.overrideDefaultStyles ? l(r.overrideDefaultStyles) : {};
57
+ function Z(t = {}) {
58
+ const e = t.overrideDefaultStyles ? l(t.overrideDefaultStyles) : {};
56
59
  return {
57
- theme: E(r.theme),
58
- behavior: F(r.behavior),
60
+ theme: E(t.theme),
61
+ behavior: F(t.behavior),
59
62
  typography: e,
60
63
  stylesheet: x(e),
61
- fonts: I(r.fonts),
62
- cjk: O(r.cjk),
63
- develop: r.develop ?? !1
64
+ fonts: I(t.fonts),
65
+ cjk: O(t.cjk),
66
+ develop: t.develop ?? !1
64
67
  };
65
68
  }
66
- function O(r) {
67
- const e = r ? l(r) : {};
69
+ function O(t) {
70
+ const e = t ? l(t) : {};
68
71
  return {
69
72
  ...e,
70
73
  fallbackFont: e.fallbackFont ?? v,
@@ -72,9 +75,9 @@ function O(r) {
72
75
  hebrewFallbackFont: e.hebrewFallbackFont ?? m
73
76
  };
74
77
  }
75
- function l(r) {
78
+ function l(t) {
76
79
  const e = {};
77
- for (const [t, n] of Object.entries(r)) n !== void 0 && (e[t] = n);
80
+ for (const [r, n] of Object.entries(t)) n !== void 0 && (e[r] = n);
78
81
  return e;
79
82
  }
80
83
  const N = "kindy-editor-styles", H = `
@@ -774,45 +777,45 @@ const N = "kindy-editor-styles", H = `
774
777
  .ked-obj-handle::before { content: ""; position: absolute; inset: -8px; }
775
778
  }
776
779
  `;
777
- function h(r, e) {
778
- if (document.getElementById(r)) return;
779
- const t = document.createElement("style");
780
- t.id = r, t.textContent = e, document.head.appendChild(t);
780
+ function h(t, e) {
781
+ if (document.getElementById(t)) return;
782
+ const r = document.createElement("style");
783
+ r.id = t, r.textContent = e, document.head.appendChild(r);
781
784
  }
782
785
  function Y() {
783
786
  h(N, H);
784
787
  }
785
- const K = `
788
+ const U = `
786
789
  .ked-drag-handle{cursor:move;user-select:none;}
787
790
  .ked-drag-handle::before{content:"⠿";color:#b0b4ba;font-size:14px;line-height:1;margin-right:4px;flex:0 0 auto;}`;
788
- function J(r) {
789
- h("ked-drag-handle-styles", K);
790
- const { backdrop: e, modal: t, handle: n, signal: o } = r;
791
- e.style.pointerEvents = "none", e.style.background = "transparent", e.style.display = "block", t.style.position = "fixed", t.style.margin = "0", t.style.pointerEvents = "auto", n.classList.add("ked-drag-handle");
792
- const d = (i, s) => {
793
- const b = Math.max(4, window.innerWidth - t.offsetWidth - 6), k = Math.max(4, window.innerHeight - 44);
794
- t.style.left = `${Math.min(Math.max(4, i), b)}px`, t.style.top = `${Math.min(Math.max(4, s), k)}px`;
791
+ function J(t) {
792
+ h("ked-drag-handle-styles", U);
793
+ const { backdrop: e, modal: r, handle: n, signal: o } = t;
794
+ e.style.pointerEvents = "none", e.style.background = "transparent", e.style.display = "block", r.style.position = "fixed", r.style.margin = "0", r.style.pointerEvents = "auto", n.classList.add("ked-drag-handle");
795
+ const d = (a, s) => {
796
+ const b = Math.max(4, window.innerWidth - r.offsetWidth - 6), k = Math.max(4, window.innerHeight - 44);
797
+ r.style.left = `${Math.min(Math.max(4, a), b)}px`, r.style.top = `${Math.min(Math.max(4, s), k)}px`;
795
798
  };
796
- d(window.innerWidth - t.offsetWidth - 24, 72);
797
- let a = null;
799
+ d(window.innerWidth - r.offsetWidth - 24, 72);
800
+ let i = null;
798
801
  n.addEventListener(
799
802
  "mousedown",
800
- (i) => {
801
- if (r.noDrag && i.target.closest(r.noDrag)) return;
802
- const s = t.getBoundingClientRect();
803
- a = { dx: i.clientX - s.left, dy: i.clientY - s.top }, i.preventDefault();
803
+ (a) => {
804
+ if (t.noDrag && a.target.closest(t.noDrag)) return;
805
+ const s = r.getBoundingClientRect();
806
+ i = { dx: a.clientX - s.left, dy: a.clientY - s.top }, a.preventDefault();
804
807
  },
805
808
  { signal: o }
806
- ), window.addEventListener("mousemove", (i) => {
807
- a && d(i.clientX - a.dx, i.clientY - a.dy);
809
+ ), window.addEventListener("mousemove", (a) => {
810
+ i && d(a.clientX - i.dx, a.clientY - i.dy);
808
811
  }, { signal: o }), window.addEventListener("mouseup", () => {
809
- a = null;
812
+ i = null;
810
813
  }, { signal: o });
811
814
  }
812
815
  const c = 0.15;
813
- function Q(r, e) {
814
- const t = e > 0 ? r / e : 1;
815
- return { phase: "fonts", loaded: r, total: e, percent: c + (1 - c) * t };
816
+ function Q(t, e) {
817
+ const r = e > 0 ? t / e : 1;
818
+ return { phase: "fonts", loaded: t, total: e, percent: c + (1 - c) * r };
816
819
  }
817
820
  const u = {
818
821
  common: {
@@ -1294,7 +1297,7 @@ const u = {
1294
1297
  submit: "Comment",
1295
1298
  replyPlaceholder: "Reply…"
1296
1299
  }
1297
- }, U = {
1300
+ }, K = {
1298
1301
  common: {
1299
1302
  ok: "Đồng ý",
1300
1303
  cancel: "Hủy",
@@ -1776,11 +1779,11 @@ const u = {
1776
1779
  }
1777
1780
  }, j = {
1778
1781
  en: u,
1779
- vi: U
1782
+ vi: K
1780
1783
  };
1781
- function W(r) {
1782
- const t = (r ?? (typeof navigator < "u" ? navigator.language : "en") ?? "en").split(/[-_]/)[0].toLowerCase();
1783
- return j[t] ?? u;
1784
+ function W(t) {
1785
+ const r = (t ?? (typeof navigator < "u" ? navigator.language : "en") ?? "en").split(/[-_]/)[0].toLowerCase();
1786
+ return j[r] ?? u;
1784
1787
  }
1785
1788
  class $ {
1786
1789
  /** Namespaced, typed public integration events. Legacy on()/off() remains. */
@@ -1789,7 +1792,7 @@ class $ {
1789
1792
  ready;
1790
1793
  handlers = /* @__PURE__ */ new Map();
1791
1794
  constructor(e) {
1792
- this.events = new P(e.events), this.ready = new Promise((t) => {
1795
+ this.events = new A(e.events), this.ready = new Promise((r) => {
1793
1796
  const n = {
1794
1797
  container: e.container,
1795
1798
  backendUrl: e.backendUrl,
@@ -1819,26 +1822,26 @@ class $ {
1819
1822
  includeSelectionEvents: this.events.includeSelection,
1820
1823
  messages: W(e.locale),
1821
1824
  onReady: (o) => {
1822
- this.handle = o, t(o);
1825
+ this.handle = o, r(o);
1823
1826
  },
1824
1827
  onEvent: (o) => this.emit(o),
1825
1828
  onPublicEvent: (o) => this.events.dispatch(o)
1826
1829
  };
1827
- e.onLoadProgress?.({ phase: "bundle", percent: 0, loaded: 0, total: 0 }), import("./editorApp-F48A7I6z.js").then((o) => o.e).then((o) => (e.onLoadProgress?.({ phase: "bundle", percent: c, loaded: 0, total: 0 }), o.mountEditorApp(n)));
1830
+ e.onLoadProgress?.({ phase: "bundle", percent: 0, loaded: 0, total: 0 }), import("./editorApp-CtrnSSsP.js").then((o) => o.e).then((o) => (e.onLoadProgress?.({ phase: "bundle", percent: c, loaded: 0, total: 0 }), o.mountEditorApp(n)));
1828
1831
  });
1829
1832
  }
1830
1833
  /** Subscribe to a collaboration event. Returns an unsubscribe function. */
1831
- on(e, t) {
1834
+ on(e, r) {
1832
1835
  let n = this.handlers.get(e);
1833
- return n || this.handlers.set(e, n = /* @__PURE__ */ new Set()), n.add(t), () => this.off(e, t);
1836
+ return n || this.handlers.set(e, n = /* @__PURE__ */ new Set()), n.add(r), () => this.off(e, r);
1834
1837
  }
1835
1838
  /** Unsubscribe a handler previously passed to on(). */
1836
- off(e, t) {
1837
- this.handlers.get(e)?.delete(t);
1839
+ off(e, r) {
1840
+ this.handlers.get(e)?.delete(r);
1838
1841
  }
1839
1842
  emit(e) {
1840
- const { type: t, ...n } = e;
1841
- for (const o of this.handlers.get(t) ?? []) o(n);
1843
+ const { type: r, ...n } = e;
1844
+ for (const o of this.handlers.get(r) ?? []) o(n);
1842
1845
  }
1843
1846
  /** Resolves once the editor is mounted and ready. */
1844
1847
  whenReady() {
@@ -1852,17 +1855,17 @@ class $ {
1852
1855
  * is ready are buffered and flush on ready. (mountEditor() requires the editor
1853
1856
  * to be ready — await whenReady() first.) */
1854
1857
  createChild() {
1855
- let e = null, t = null, n = !1;
1858
+ let e = null, r = null, n = !1;
1856
1859
  return this.ready.then((o) => {
1857
- n || (e = o.createChild(), t?.(), t = null);
1860
+ n || (e = o.createChild(), r?.(), r = null);
1858
1861
  }), {
1859
- render: (o, d, a) => {
1860
- const i = () => e?.render(o, d, a);
1861
- e ? i() : t = i;
1862
+ render: (o, d, i) => {
1863
+ const a = () => e?.render(o, d, i);
1864
+ e ? a() : r = a;
1862
1865
  },
1863
- mountEditor: (o, d, a) => {
1866
+ mountEditor: (o, d, i) => {
1864
1867
  if (!e) throw new Error("KindyEditor.createChild(): await whenReady() before mountEditor()");
1865
- return e.mountEditor(o, d, a);
1868
+ return e.mountEditor(o, d, i);
1866
1869
  },
1867
1870
  destroy: () => {
1868
1871
  n = !0, e?.destroy(), e = null;
@@ -1936,11 +1939,11 @@ class $ {
1936
1939
  /** Add a comment thread anchored to the current selection (a rich-text body;
1937
1940
  * `mentions` are @-tagged users). Resolves to the thread id, or null if
1938
1941
  * there's no selection. */
1939
- async addComment(e, t) {
1940
- return (await this.ready).addComment(e, t);
1942
+ async addComment(e, r) {
1943
+ return (await this.ready).addComment(e, r);
1941
1944
  }
1942
- async replyToComment(e, t, n) {
1943
- (await this.ready).replyToComment(e, t, n);
1945
+ async replyToComment(e, r, n) {
1946
+ (await this.ready).replyToComment(e, r, n);
1944
1947
  }
1945
1948
  async startComment() {
1946
1949
  (await this.ready).startComment();
@@ -1948,14 +1951,14 @@ class $ {
1948
1951
  async openCommentThread(e) {
1949
1952
  (await this.ready).openCommentThread(e);
1950
1953
  }
1951
- async editComment(e, t, n, o) {
1952
- (await this.ready).editComment(e, t, n, o);
1954
+ async editComment(e, r, n, o) {
1955
+ (await this.ready).editComment(e, r, n, o);
1953
1956
  }
1954
- async deleteComment(e, t) {
1955
- (await this.ready).deleteComment(e, t);
1957
+ async deleteComment(e, r) {
1958
+ (await this.ready).deleteComment(e, r);
1956
1959
  }
1957
- async resolveThread(e, t = !0) {
1958
- (await this.ready).resolveThread(e, t);
1960
+ async resolveThread(e, r = !0) {
1961
+ (await this.ready).resolveThread(e, r);
1959
1962
  }
1960
1963
  async setReviewAccess(e) {
1961
1964
  (await this.ready).setReviewAccess(e);
@@ -1969,6 +1972,18 @@ class $ {
1969
1972
  async insertText(e) {
1970
1973
  (await this.ready).insertText(e);
1971
1974
  }
1975
+ getTableSelection() {
1976
+ return this.handle?.getTableSelection() ?? null;
1977
+ }
1978
+ async setTableSelection(e) {
1979
+ (await this.ready).setTableSelection(e);
1980
+ }
1981
+ canExecuteTableAction(e) {
1982
+ return this.handle?.canExecuteTableAction(e) ?? !1;
1983
+ }
1984
+ async executeTableAction(e) {
1985
+ return (await this.ready).executeTableAction(e);
1986
+ }
1972
1987
  getDocId() {
1973
1988
  return this.handle?.getDocId() ?? null;
1974
1989
  }
@@ -1982,9 +1997,9 @@ class $ {
1982
1997
  export {
1983
1998
  p as D,
1984
1999
  $ as K,
1985
- A as Z,
2000
+ B as Z,
1986
2001
  R as a,
1987
- B as b,
2002
+ P as b,
1988
2003
  Y as c,
1989
2004
  q as d,
1990
2005
  u as e,
@@ -1,4 +1,4 @@
1
- import { K as r, d as e, m as s } from "./kindy-editor-DnWvHijW.js";
1
+ import { K as r, d as e, m as s } from "./kindy-editor-CoeqFYYG.js";
2
2
  import { E as d } from "./eventHub-CZFpTVqe.js";
3
3
  export {
4
4
  d as EditorEvents,
@@ -1,7 +1,7 @@
1
1
  import "./TimesNewRoman-Regular-C7tOI8JO.js";
2
- import "./metrics-BFTHu_jF.js";
3
- import { i as p } from "./measureHost-Ca_gM01T.js";
4
- import "./paintStyle-GQFOpJKx.js";
2
+ import "./metrics-DHgtBP-R.js";
3
+ import { i as p } from "./measureHost-mtLj644m.js";
4
+ import "./paintStyle-Cjk9egel.js";
5
5
  export {
6
6
  p as installMeasureHost
7
7
  };
@@ -1,7 +1,7 @@
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 { s as pi } from "./metrics-BFTHu_jF.js";
2
+ import { s as pi } from "./metrics-DHgtBP-R.js";
3
3
  import { B as At } from "./index-6mKfgpcs.js";
4
- import { z as Wa, B as bi, E as gi, G as vi, M as xi, J as mi, K as dr, L as hr, N as pr, O as br } from "./paintStyle-GQFOpJKx.js";
4
+ import { z as Wa, B as bi, E as gi, G as vi, M as xi, J as mi, K as dr, L as hr, N as pr, O as br } from "./paintStyle-Cjk9egel.js";
5
5
  var c2 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
6
6
  function Pt(i) {
7
7
  return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
@@ -1,4 +1,4 @@
1
- import { S as u, B as r, V as m, z as x, a3 as f } from "./paintStyle-GQFOpJKx.js";
1
+ import { S as u, B as r, V as m, z as x, a4 as f } from "./paintStyle-Cjk9egel.js";
2
2
  let o = null, a = null;
3
3
  function C(t) {
4
4
  o = t;
@@ -305,7 +305,7 @@ function Qt(t, e) {
305
305
  }
306
306
  const Zt = (t) => t + 1;
307
307
  export {
308
- m as $,
308
+ x as $,
309
309
  $ as A,
310
310
  At as B,
311
311
  zt as C,
@@ -329,15 +329,16 @@ export {
329
329
  xt as U,
330
330
  S as V,
331
331
  q as W,
332
- dt as X,
333
- ht as Y,
334
- x as Z,
335
- X as _,
332
+ w as X,
333
+ m as Y,
334
+ dt as Z,
335
+ ht as _,
336
336
  bt as a,
337
- Ft as a0,
338
- Bt as a1,
339
- Xt as a2,
340
- Lt as a3,
337
+ X as a0,
338
+ Ft as a1,
339
+ Bt as a2,
340
+ Xt as a3,
341
+ Lt as a4,
341
342
  Dt as b,
342
343
  Kt as c,
343
344
  Ht as d,
@@ -1,6 +1,6 @@
1
- import { Z as V, _ as H, D as W, Q as $ } from "./toc-mgkp-28Y.js";
2
- import { b as C, s as G } from "./stylesheet-BcU1Q_JI.js";
3
- import { d as m, g as f, h as g, l as y, t as x } from "./pipeline-BTemNJdx.js";
1
+ import { e as V, _ as H, D as W, Q as $ } from "./toc-DSwkNKls.js";
2
+ import { b as C, s as G } from "./stylesheet-E5bu1xch.js";
3
+ import { d as m, g as f, h as g, l as y, t as x } from "./pipeline-JfHxzjns.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(
@@ -78,7 +78,7 @@ function St(r, t, e, s, n) {
78
78
  }
79
79
  return o;
80
80
  }
81
- function Z(r, t) {
81
+ function X(r, t) {
82
82
  const e = [];
83
83
  for (let s = 0; s < r.rows; s++) {
84
84
  const n = [];
@@ -91,7 +91,7 @@ function Z(r, t) {
91
91
  return e;
92
92
  }
93
93
  const k = (r, t, e) => Math.max(t, Math.min(e, r));
94
- function X(r, t) {
94
+ function Y(r, t) {
95
95
  const e = [], s = /* @__PURE__ */ new Set();
96
96
  for (let i = r[t]; i && !s.has(i.id); i = i.basedOn ? r[i.basedOn] : void 0)
97
97
  s.add(i.id), e.unshift(i);
@@ -107,7 +107,7 @@ function P(r, t) {
107
107
  const e = { ...r };
108
108
  return t.char && (e.char = { ...r.char, ...t.char }), t.para && (e.para = { ...r.para, ...t.para }), t.shading !== void 0 && (e.shading = t.shading), t.borders && (e.borders = { ...r.borders, ...t.borders }), t.margin && (e.margin = t.margin), e;
109
109
  }
110
- const Y = [
110
+ const Z = [
111
111
  "wholeTable",
112
112
  "band1Horz",
113
113
  "band2Horz",
@@ -154,7 +154,7 @@ function Q(r, t, e) {
154
154
  }
155
155
  };
156
156
  let n = {};
157
- for (const i of Y)
157
+ for (const i of Z)
158
158
  s(i) && r[i] && (n = P(n, r[i]));
159
159
  return n;
160
160
  }
@@ -178,8 +178,8 @@ function N(r, t, e, s) {
178
178
  return o;
179
179
  }
180
180
  function At(r, t, e, s, n) {
181
- const i = X(e, t.id), o = K(r);
182
- return Z(o, (a, u) => {
181
+ const i = Y(e, t.id), o = K(r);
182
+ return X(o, (a, u) => {
183
183
  const c = J(u.originRow, u.originCol, o.rows, o.cols, {
184
184
  ...s,
185
185
  rowBandSize: t.rowBandSize ?? 1,
@@ -1073,7 +1073,7 @@ export {
1073
1073
  K as a,
1074
1074
  At as b,
1075
1075
  vt as c,
1076
- X as d,
1076
+ Y as d,
1077
1077
  Q as e,
1078
1078
  J as f,
1079
1079
  Ct as g,
@@ -1083,6 +1083,6 @@ export {
1083
1083
  Rt as m,
1084
1084
  kt as n,
1085
1085
  Ot as p,
1086
- Z as r,
1086
+ X as r,
1087
1087
  St as u
1088
1088
  };
@@ -1,4 +1,4 @@
1
- import { t as ne, D as oe, G as Ie, J as ze, $ as $e } from "./toc-mgkp-28Y.js";
1
+ import { t as ne, D as oe, G as Ie, J as ze, $ as $e } from "./toc-DSwkNKls.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 vt, r as wt, d as ot, t as Pt, I as xt, g as Et, f as Ge, W as _e } from "./contentTypes-ChqPfcVI.js";
3
3
  import { u as ie, a as Ue } from "./browser-BUrsjziD.js";
4
4
  function Me() {
@@ -1,6 +1,6 @@
1
1
  import { u, a as f, s as m, z as g } from "./browser-BUrsjziD.js";
2
2
  import { f as h } from "./contentTypes-ChqPfcVI.js";
3
- import { p as b, c as k } from "./recalcToc-c9kIMGbk.js";
3
+ import { p as b, c as k } from "./recalcToc-MRszlj8g.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 ?? {})) {