@harbour-enterprises/superdoc 0.9.18 → 0.9.19

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.
@@ -3,16 +3,16 @@ var Ne = (t) => {
3
3
  throw TypeError(t);
4
4
  };
5
5
  var rt = (t, s, o) => s in t ? at(t, s, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[s] = o;
6
- var Ie = (t, s, o) => rt(t, typeof s != "symbol" ? s + "" : s, o), Pe = (t, s, o) => s.has(t) || Ne("Cannot " + o);
7
- var we = (t, s, o) => (Pe(t, s, "read from private field"), o ? o.call(t) : s.get(t)), Le = (t, s, o) => s.has(t) ? Ne("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, o);
8
- var O = (t, s, o) => (Pe(t, s, "access private method"), o);
9
- import { _ as K, a as Ue, b as ct, I as Me, f as dt, c as ze, d as ut, i as mt, u as pt, r as ft, E as De, e as ht, P as vt, h as gt, j as yt, A as bt, N as kt } from "./chunks/editor-C3yIzIxA.js";
10
- import { C as ko, T as Co, l as _o, n as wo, k as xo, m as Eo } from "./chunks/editor-C3yIzIxA.js";
11
- import { Q as Ct, v as _t, V as wt, T as Ve, a as xt } from "./chunks/converter-D7tzBwl8.js";
12
- import { G as To } from "./chunks/converter-D7tzBwl8.js";
13
- import { ref as g, createElementBlock as C, openBlock as k, createElementVNode as x, unref as $, getCurrentInstance as Et, computed as j, watch as St, onMounted as ke, createCommentVNode as ee, withDirectives as Tt, withKeys as At, normalizeClass as te, withModifiers as be, vModelText as Ft, createTextVNode as It, toDisplayString as ne, Fragment as U, renderList as J, normalizeStyle as Y, createVNode as z, h as W, createApp as Lt, reactive as We, onUnmounted as Mt, shallowRef as qe, onBeforeUnmount as Ge, createBlock as Dt } from "vue";
14
- import { t as G, s as $t, T as Bt, N as Z } from "./chunks/toolbar-DXgM92D5.js";
15
- import { D as Fo } from "./chunks/docx-zipper-EBPLD6L4.js";
6
+ var Ie = (t, s, o) => rt(t, typeof s != "symbol" ? s + "" : s, o), ze = (t, s, o) => s.has(t) || Ne("Cannot " + o);
7
+ var we = (t, s, o) => (ze(t, s, "read from private field"), o ? o.call(t) : s.get(t)), Le = (t, s, o) => s.has(t) ? Ne("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, o);
8
+ var O = (t, s, o) => (ze(t, s, "access private method"), o);
9
+ import { _ as K, a as Ue, b as ct, I as Me, f as dt, c as Pe, d as ut, i as mt, u as pt, r as ft, E as De, e as ht, P as vt, h as gt, j as yt, A as bt, N as kt } from "./chunks/editor-D0ZPyah6.js";
10
+ import { C as ko, T as Co, l as _o, n as wo, k as xo, m as Eo } from "./chunks/editor-D0ZPyah6.js";
11
+ import { Q as Ct, v as _t, V as wt, T as Ve, a as xt } from "./chunks/converter-Tt5zM06f.js";
12
+ import { G as To } from "./chunks/converter-Tt5zM06f.js";
13
+ import { ref as g, createElementBlock as C, openBlock as k, createElementVNode as x, unref as $, getCurrentInstance as Et, computed as j, watch as St, onMounted as ke, createCommentVNode as ee, withDirectives as Tt, withKeys as At, normalizeClass as te, withModifiers as be, vModelText as Ft, createTextVNode as It, toDisplayString as ne, Fragment as U, renderList as J, normalizeStyle as Y, createVNode as P, h as W, createApp as Lt, reactive as We, onUnmounted as Mt, shallowRef as qe, onBeforeUnmount as Ge, createBlock as Dt } from "vue";
14
+ import { t as G, s as $t, T as Bt, N as Z } from "./chunks/toolbar-CD1usebH.js";
15
+ import { D as Fo } from "./chunks/docx-zipper-D7PDrqbo.js";
16
16
  import { createZip as Lo } from "./file-zipper.es.js";
17
17
  var Ke = { exports: {} };
18
18
  (function(t) {
@@ -74,7 +74,7 @@ var Ke = { exports: {} };
74
74
  D[p - 1] = arguments[p];
75
75
  v.fn.apply(v.context, D);
76
76
  } else {
77
- var _ = v.length, A;
77
+ var _ = v.length, T;
78
78
  for (p = 0; p < _; p++)
79
79
  switch (v[p].once && this.removeListener(d, v[p].fn, void 0, !0), M) {
80
80
  case 1:
@@ -90,8 +90,8 @@ var Ke = { exports: {} };
90
90
  v[p].fn.call(v[p].context, u, r, b);
91
91
  break;
92
92
  default:
93
- if (!D) for (A = 1, D = new Array(M - 1); A < M; A++)
94
- D[A - 1] = arguments[A];
93
+ if (!D) for (T = 1, D = new Array(M - 1); T < M; T++)
94
+ D[T - 1] = arguments[T];
95
95
  v[p].fn.apply(v[p].context, D);
96
96
  }
97
97
  }
@@ -146,7 +146,7 @@ const E = (t) => {
146
146
  throw new Error("Toolbar button item needs either icon or label - " + t.name);
147
147
  if (!t.name)
148
148
  throw new Error("Invalid toolbar item name - " + t.name);
149
- const o = g(_t()), n = t.type, e = g(t.name), i = t.command, c = g(t.icon), l = g(t.group || "center"), a = g(t.allowWithoutEditor), d = g(t.attributes || {}), u = t.disabled || !1, r = g(t.disabled), b = g(!1), h = g(!1), y = g(t.style), w = g(t.isNarrow), v = g(t.isWide), M = g(t.minWidth), D = g(t.suppressActiveHighlight || !1), p = g(t.argument), _ = g(null), A = g(null), B = g(t.iconColor), N = g(t.hasCaret), Q = g(t.tooltip), he = g(t.tooltipVisible), ae = g(t.tooltipTimeout), re = g(t.defaultLabel), se = g(t.label), T = g(t.hideLabel), I = g(t.inlineTextInputVisible), H = g(t.hasInlineTextInput), R = g(t.markName), V = g(t.labelAttr), q = g([]);
149
+ const o = g(_t()), n = t.type, e = g(t.name), i = t.command, c = g(t.icon), l = g(t.group || "center"), a = g(t.allowWithoutEditor), d = g(t.attributes || {}), u = t.disabled || !1, r = g(t.disabled), b = g(!1), h = g(!1), y = g(t.style), w = g(t.isNarrow), v = g(t.isWide), M = g(t.minWidth), D = g(t.suppressActiveHighlight || !1), p = g(t.argument), _ = g(null), T = g(null), B = g(t.iconColor), N = g(t.hasCaret), Q = g(t.tooltip), he = g(t.tooltipVisible), ae = g(t.tooltipTimeout), re = g(t.defaultLabel), se = g(t.label), S = g(t.hideLabel), I = g(t.inlineTextInputVisible), H = g(t.hasInlineTextInput), R = g(t.markName), V = g(t.labelAttr), q = g([]);
150
150
  if (t.options) {
151
151
  if (!Array.isArray(t.options)) throw new Error("Invalid toolbar item options - " + t.options);
152
152
  q.value.push(...t.options);
@@ -182,14 +182,14 @@ const E = (t) => {
182
182
  isWide: v,
183
183
  minWidth: M,
184
184
  argument: p,
185
- parentItem: A,
185
+ parentItem: T,
186
186
  iconColor: B,
187
187
  hasCaret: N,
188
188
  tooltipVisible: he,
189
189
  tooltipTimeout: ae,
190
190
  defaultLabel: re,
191
191
  label: se,
192
- hideLabel: T,
192
+ hideLabel: S,
193
193
  inlineTextInputVisible: I,
194
194
  hasInlineTextInput: H,
195
195
  markName: R,
@@ -207,19 +207,19 @@ const E = (t) => {
207
207
  onActivate: Ce,
208
208
  onDeactivate: ve
209
209
  };
210
- }, Pt = { class: "alignment-buttons" }, zt = ["innerHTML"], Wt = ["innerHTML"], jt = ["innerHTML"], Ut = ["innerHTML"], Vt = {
210
+ }, zt = { class: "alignment-buttons" }, Pt = ["innerHTML"], Wt = ["innerHTML"], jt = ["innerHTML"], Ut = ["innerHTML"], Vt = {
211
211
  __name: "AlignmentButtons",
212
212
  emits: ["select"],
213
213
  setup(t, { emit: s }) {
214
214
  const o = s, n = (e) => {
215
215
  o("select", e);
216
216
  };
217
- return (e, i) => (k(), C("div", Pt, [
217
+ return (e, i) => (k(), C("div", zt, [
218
218
  x("div", {
219
219
  class: "button-icon",
220
220
  onClick: i[0] || (i[0] = (c) => n("left")),
221
221
  innerHTML: $(G).alignLeft
222
- }, null, 8, zt),
222
+ }, null, 8, Pt),
223
223
  x("div", {
224
224
  class: "button-icon",
225
225
  onClick: i[1] || (i[1] = (c) => n("center")),
@@ -317,10 +317,10 @@ const E = (t) => {
317
317
  type: "text",
318
318
  placeholder: "Type or paste a link",
319
319
  class: te({ error: l.value }),
320
- "onUpdate:modelValue": _[0] || (_[0] = (A) => d.value = A),
320
+ "onUpdate:modelValue": _[0] || (_[0] = (T) => d.value = T),
321
321
  onKeydown: [
322
322
  At(be(i, ["stop", "prevent"]), ["enter"]),
323
- _[1] || (_[1] = (A) => l.value = !1)
323
+ _[1] || (_[1] = (T) => l.value = !1)
324
324
  ]
325
325
  }, null, 42, en), [
326
326
  [Ft, d.value]
@@ -351,7 +351,7 @@ const E = (t) => {
351
351
  ])
352
352
  ])) : v.value ? (k(), C("div", sn, [
353
353
  x("a", {
354
- onClick: _[2] || (_[2] = be((...A) => t.goToAnchor && t.goToAnchor(...A), ["stop", "prevent"]))
354
+ onClick: _[2] || (_[2] = be((...T) => t.goToAnchor && t.goToAnchor(...T), ["stop", "prevent"]))
355
355
  }, "Go to " + ne(t.href.startsWith("#_") ? t.href.substring(2) : t.href), 1)
356
356
  ])) : ee("", !0)
357
357
  ]));
@@ -478,14 +478,14 @@ const E = (t) => {
478
478
  o("select", e);
479
479
  };
480
480
  return (e, i) => (k(), C("div", En, [
481
- z(je, {
481
+ P(je, {
482
482
  icons: t.icons,
483
483
  "active-color": t.activeColor,
484
484
  onSelect: n
485
485
  }, null, 8, ["icons", "active-color"]),
486
486
  t.customIcons.flat().length ? (k(), C(U, { key: 0 }, [
487
487
  i[0] || (i[0] = x("span", { class: "option-grid-ctn__subtitle" }, "Custom colors", -1)),
488
- z(je, {
488
+ P(je, {
489
489
  icons: t.customIcons,
490
490
  "active-color": t.activeColor,
491
491
  onSelect: n
@@ -626,7 +626,7 @@ const E = (t) => {
626
626
  x("div", Mn, ne(n.value) + " x " + ne(e.value), 1)
627
627
  ]));
628
628
  }
629
- }, $n = /* @__PURE__ */ K(Dn, [["__scopeId", "data-v-06352ab9"]]), Bn = { class: "toolbar-table-actions" }, Hn = ["onClick"], Rn = { class: "toolbar-table-actions__icon" }, On = ["innerHTML"], Nn = { class: "toolbar-table-actions__label" }, Pn = {
629
+ }, $n = /* @__PURE__ */ K(Dn, [["__scopeId", "data-v-06352ab9"]]), Bn = { class: "toolbar-table-actions" }, Hn = ["onClick"], Rn = { class: "toolbar-table-actions__icon" }, On = ["innerHTML"], Nn = { class: "toolbar-table-actions__label" }, zn = {
630
630
  __name: "TableActions",
631
631
  props: {
632
632
  options: {
@@ -653,7 +653,7 @@ const E = (t) => {
653
653
  ], 10, Hn))), 256))
654
654
  ]));
655
655
  }
656
- }, zn = /* @__PURE__ */ K(Pn, [["__scopeId", "data-v-9a702d7f"]]), le = (t) => {
656
+ }, Pn = /* @__PURE__ */ K(zn, [["__scopeId", "data-v-9a702d7f"]]), le = (t) => {
657
657
  t.expand.value = !1;
658
658
  }, Wn = (t, s = !1, o, n, e) => {
659
659
  const i = E({
@@ -746,8 +746,8 @@ const E = (t) => {
746
746
  ],
747
747
  onActivate: ({ fontSize: m }) => {
748
748
  if (!m) return l.label.value = l.defaultLabel.value;
749
- let S = $t(m, 12);
750
- S < 8 && (S = 8), S > 96 && (S = 96), l.label.value = String(S);
749
+ let A = $t(m, 12);
750
+ A < 8 && (A = 8), A > 96 && (A = 96), l.label.value = String(A);
751
751
  },
752
752
  onDeactivate: () => l.label.value = l.defaultLabel.value
753
753
  }), a = E({
@@ -894,7 +894,7 @@ const E = (t) => {
894
894
  options: [
895
895
  {
896
896
  type: "render",
897
- render: () => A(p)
897
+ render: () => T(p)
898
898
  }
899
899
  ]
900
900
  }), _ = [
@@ -956,12 +956,12 @@ const E = (t) => {
956
956
  icon: e.fixTables
957
957
  }
958
958
  ];
959
- function A(m) {
960
- return W(zn, {
959
+ function T(m) {
960
+ return W(Pn, {
961
961
  options: _,
962
- onSelect: (S) => {
962
+ onSelect: (A) => {
963
963
  le(m);
964
- const { command: F } = S;
964
+ const { command: F } = A;
965
965
  t.emitCommand({ item: m, argument: { command: F } });
966
966
  }
967
967
  });
@@ -981,10 +981,10 @@ const E = (t) => {
981
981
  type: "render",
982
982
  render: () => W("div", {}, [
983
983
  W(qt, {
984
- onSelect: (S) => {
984
+ onSelect: (A) => {
985
985
  le(B);
986
986
  const F = { ...B, command: "setTextAlign" };
987
- F.command = "setTextAlign", t.emitCommand({ item: F, argument: S }), N(B, S);
987
+ F.command = "setTextAlign", t.emitCommand({ item: F, argument: A }), N(B, A);
988
988
  }
989
989
  })
990
990
  ]),
@@ -997,8 +997,8 @@ const E = (t) => {
997
997
  onDeactivate: () => {
998
998
  N(B, "left");
999
999
  }
1000
- }), N = (m, S) => {
1001
- let F = S === "both" ? "justify" : S, X = {
1000
+ }), N = (m, A) => {
1001
+ let F = A === "both" ? "justify" : A, X = {
1002
1002
  left: e.alignLeft,
1003
1003
  right: e.alignRight,
1004
1004
  center: e.alignCenter,
@@ -1037,7 +1037,7 @@ const E = (t) => {
1037
1037
  command: "toggleOverflow",
1038
1038
  icon: e.overflow,
1039
1039
  disabled: !1
1040
- }), T = E({
1040
+ }), S = E({
1041
1041
  type: "dropdown",
1042
1042
  name: "zoom",
1043
1043
  allowWithoutEditor: !0,
@@ -1059,7 +1059,7 @@ const E = (t) => {
1059
1059
  { label: "200%", key: 2 }
1060
1060
  ],
1061
1061
  onActivate: ({ zoom: m }) => {
1062
- m && (T.label.value = m);
1062
+ m && (S.label.value = m);
1063
1063
  }
1064
1064
  }), I = E({
1065
1065
  type: "button",
@@ -1145,7 +1145,7 @@ const E = (t) => {
1145
1145
  tooltip: "Format painter",
1146
1146
  icon: e.copyFormat,
1147
1147
  command: "copyFormat"
1148
- }), Ce = (m, S) => m === "editor" ? S : m === "suggester" ? S.filter((F) => F.value === "suggesting") : S.filter((F) => F.value === "viewing"), ve = (m) => m === "editor" ? "Editing" : m === "suggester" ? "Suggesting" : "Viewing", oe = E({
1148
+ }), Ce = (m, A) => m === "editor" ? A : m === "suggester" ? A.filter((F) => F.value === "suggesting") : A.filter((F) => F.value === "viewing"), ve = (m) => m === "editor" ? "Editing" : m === "suggester" ? "Suggesting" : "Viewing", oe = E({
1149
1149
  type: "dropdown",
1150
1150
  name: "documentMode",
1151
1151
  command: "setDocumentMode",
@@ -1191,9 +1191,9 @@ const E = (t) => {
1191
1191
  }
1192
1192
  ];
1193
1193
  function ie(m) {
1194
- const S = Ce(n, ue);
1194
+ const A = Ce(n, ue);
1195
1195
  return W(vn, {
1196
- options: S,
1196
+ options: A,
1197
1197
  onSelect: (F) => {
1198
1198
  le(m);
1199
1199
  const { label: X, icon: me } = F;
@@ -1242,10 +1242,10 @@ const E = (t) => {
1242
1242
  type: "render",
1243
1243
  key: "linkedStyle",
1244
1244
  render: () => {
1245
- const m = (S) => {
1245
+ const m = (A) => {
1246
1246
  le(ye);
1247
1247
  const F = { ...ye, command: "setLinkedStyle" };
1248
- t.emitCommand({ item: F, argument: S });
1248
+ t.emitCommand({ item: F, argument: A });
1249
1249
  };
1250
1250
  return W("div", {}, [
1251
1251
  W(kn, {
@@ -1267,7 +1267,7 @@ const E = (t) => {
1267
1267
  md: 1024,
1268
1268
  xl: 1410
1269
1269
  }, tt = 120, nt = 32, ot = ["linkedStyles", "clearFormatting", "copyFormat", "ruler"], it = ["zoom", "fontFamily", "fontSize", "redo"];
1270
- let P = [
1270
+ let z = [
1271
1271
  I,
1272
1272
  H,
1273
1273
  // Dev - tracked changes
@@ -1276,8 +1276,7 @@ const E = (t) => {
1276
1276
  q,
1277
1277
  // toggleTrackChangesOriginal,
1278
1278
  // toggleTrackChangesFinal,
1279
- T,
1280
- a,
1279
+ S,
1281
1280
  c,
1282
1281
  a,
1283
1282
  l,
@@ -1309,20 +1308,22 @@ const E = (t) => {
1309
1308
  oe
1310
1309
  // search,
1311
1310
  ];
1312
- if (o <= Te.md && (P = P.filter((m) => m.type !== "separator")), t.config.pagination || (P = P.filter((m) => m.name.value !== "pageBreakTool")), t.config.mode !== "docx") {
1313
- const m = P.findIndex((S) => S.name.value === "linkedStyles");
1314
- P.splice(m - 1, 2), P = P.filter((S) => S.name.value !== "ruler");
1311
+ if (o <= Te.md && (z = z.filter((m) => m.type !== "separator")), t.config.pagination || (z = z.filter((m) => m.name.value !== "pageBreakTool")), t.config.mode !== "docx") {
1312
+ const m = z.findIndex((F) => F.name.value === "linkedStyles");
1313
+ z.splice(m - 1, 2);
1314
+ const A = ["ruler", "zoom", "undo", "redo"];
1315
+ z = z.filter((F) => !A.includes(F.name.value));
1315
1316
  }
1316
1317
  const Oe = [R, ce, de];
1317
- s || (n === "viewer" && Oe.push(V, q), P = P.filter((m) => !Oe.includes(m)));
1318
+ s || (n === "viewer" && Oe.push(V, q), z = z.filter((m) => !Oe.includes(m)));
1318
1319
  const st = [I, se, oe].map((m) => m.name), lt = (m) => st.includes(m.name), _e = [], Ae = [];
1319
1320
  let Fe = nt + tt;
1320
- return P.forEach((m) => {
1321
- const S = Re.get(m.name.value) || Re.get("default");
1321
+ return z.forEach((m) => {
1322
+ const A = Re.get(m.name.value) || Re.get("default");
1322
1323
  if (o < Te.xl && ot.includes(m.name.value)) {
1323
1324
  if (_e.push(m), m.name.value === "linkedStyles") {
1324
- const F = P.findIndex((X) => X.name.value === "linkedStyles");
1325
- P.splice(F + 1, 1);
1325
+ const F = z.findIndex((X) => X.name.value === "linkedStyles");
1326
+ z.splice(F + 1, 1);
1326
1327
  }
1327
1328
  return;
1328
1329
  }
@@ -1331,10 +1332,10 @@ const E = (t) => {
1331
1332
  return;
1332
1333
  }
1333
1334
  if (lt(m)) {
1334
- Ae.push(m), Fe += S;
1335
+ Ae.push(m), Fe += A;
1335
1336
  return;
1336
1337
  }
1337
- Fe < o ? (Ae.push(m), Fe += S) : _e.push(m);
1338
+ Fe < o ? (Ae.push(m), Fe += A) : _e.push(m);
1338
1339
  }), {
1339
1340
  defaultItems: Ae,
1340
1341
  overflowItems: _e.filter((m) => m.type !== "separator")
@@ -1432,7 +1433,9 @@ class po extends Rt {
1432
1433
  pagination: !1,
1433
1434
  icons: { ...G },
1434
1435
  mode: "docx",
1435
- excludeItems: []
1436
+ excludeItems: [],
1437
+ groups: null,
1438
+ editor: null
1436
1439
  });
1437
1440
  Le(this, fe, {
1438
1441
  setZoom: ({ item: o, argument: n }) => {
@@ -1475,13 +1478,13 @@ class po extends Rt {
1475
1478
  },
1476
1479
  increaseTextIndent: ({ item: o, argument: n }) => {
1477
1480
  let e = o.command, { state: i } = this.activeEditor;
1478
- if (ze((l) => l.type.name === "listItem")(i.selection))
1481
+ if (Pe((l) => l.type.name === "listItem")(i.selection))
1479
1482
  return this.activeEditor.chain().sinkListItem("listItem").updateOrderedListStyleType().run();
1480
1483
  e in this.activeEditor.commands && this.activeEditor.commands[e](n);
1481
1484
  },
1482
1485
  decreaseTextIndent: ({ item: o, argument: n }) => {
1483
1486
  let e = o.command, { state: i } = this.activeEditor;
1484
- if (ze((l) => l.type.name === "listItem")(i.selection))
1487
+ if (Pe((l) => l.type.name === "listItem")(i.selection))
1485
1488
  return this.activeEditor.chain().liftListItem("listItem").updateOrderedListStyleType().run();
1486
1489
  e in this.activeEditor.commands && this.activeEditor.commands[e](n);
1487
1490
  },
@@ -1520,7 +1523,7 @@ class po extends Rt {
1520
1523
  Ie(this, "onToolbarResize", () => {
1521
1524
  O(this, L, Be).call(this, this, this.config.icons, this.isDev), this.role === "viewer" && O(this, L, He).call(this);
1522
1525
  });
1523
- this.config = { ...this.config, ...o }, this.toolbarItems = [], this.overflowItems = [], this.documentMode = o.documentMode || "editing", this.isDev = o.isDev || !1, this.superdoc = o.superdoc, this.role = o.role || "editor", this.config.icons = {
1526
+ this.config = { ...this.config, ...o }, this.toolbarItems = [], this.overflowItems = [], this.documentMode = o.documentMode || "editing", this.isDev = o.isDev || !1, this.superdoc = o.superdoc, this.role = o.role || "editor", this.config.editor && (this.config.mode = this.config.editor.options.mode), this.config.icons = {
1524
1527
  ...G,
1525
1528
  ...o.icons
1526
1529
  }, !this.config.selector && this.config.element && (this.config.selector = this.config.element), O(this, L, Ze).call(this), O(this, L, Be).call(this, this, this.config.icons, o.isDev);
@@ -1681,52 +1684,52 @@ const Zn = (t, s) => {
1681
1684
  const o = s, n = t, e = g(null), i = g([]), c = g("#CCCCCC"), l = g("#2563EB66"), a = g(null), d = g(null), u = g(!1), r = g(null), b = We({ side: "left", x: 0 }), h = We({ side: "right", x: 0 }), y = g(!1), w = g(0);
1682
1685
  let v = 0;
1683
1686
  const M = () => {
1684
- const T = [], { pageMargins: I, pageSize: H } = n.editor.getPageStyles();
1687
+ const S = [], { pageMargins: I, pageSize: H } = n.editor.getPageStyles();
1685
1688
  a.value = H, d.value = I, h.x = H.width * 96 - I.right * 96, b.x = I.left * 96;
1686
1689
  for (let R = 0; R < H.width; R++) {
1687
1690
  const q = `${5.5}px`, ce = H.width - R;
1688
- if (T.push(...D(1, "main", "20%", q, R)), T.push(...D(3, "eighth", "10%", q)), T.push(...D(1, "half", "40%", q)), ce <= 0.5) break;
1689
- T.push(...D(3, "eighth", "10%", q));
1691
+ if (S.push(...D(1, "main", "20%", q, R)), S.push(...D(3, "eighth", "10%", q)), S.push(...D(1, "half", "40%", q)), ce <= 0.5) break;
1692
+ S.push(...D(3, "eighth", "10%", q));
1690
1693
  }
1691
- return T;
1692
- }, D = (T, I, H, R, V) => Array.from({ length: T }, (q, ce) => {
1694
+ return S;
1695
+ }, D = (S, I, H, R, V) => Array.from({ length: S }, (q, ce) => {
1693
1696
  const de = {
1694
1697
  className: `${I}-unit ruler-section`,
1695
1698
  height: H,
1696
1699
  margin: R
1697
1700
  };
1698
1701
  return V !== void 0 && (de.numbering = V), de;
1699
- }), p = j(() => (T) => ({
1702
+ }), p = j(() => (S) => ({
1700
1703
  width: "1px",
1701
1704
  minWidth: "1px",
1702
1705
  maxWidth: "1px",
1703
- height: T.height,
1704
- backgroundColor: T.color || "#666",
1705
- marginLeft: T.numbering === 0 ? null : T.margin,
1706
- marginRight: T.margin
1707
- })), _ = j(() => (T) => ({
1708
- left: `${(T === "left" ? b : h).x}px`
1709
- })), A = j(() => {
1706
+ height: S.height,
1707
+ backgroundColor: S.color || "#666",
1708
+ marginLeft: S.numbering === 0 ? null : S.margin,
1709
+ marginRight: S.margin
1710
+ })), _ = j(() => (S) => ({
1711
+ left: `${(S === "left" ? b : h).x}px`
1712
+ })), T = j(() => {
1710
1713
  if (!e.value) return;
1711
1714
  const H = e.value.parentElement.querySelector(".super-editor").getBoundingClientRect();
1712
1715
  return {
1713
1716
  left: `${r.value.x}px`,
1714
1717
  minHeight: `${H.height}px`
1715
1718
  };
1716
- }), B = (T) => {
1719
+ }), B = (S) => {
1717
1720
  u.value = !0, he();
1718
- const I = T.currentTarget.id;
1719
- r.value = I === "left-margin-handle" ? b : h, w.value = r.value.x, v = T.clientX - r.value.x, y.value = !0;
1720
- }, N = (T) => {
1721
+ const I = S.currentTarget.id;
1722
+ r.value = I === "left-margin-handle" ? b : h, w.value = r.value.x, v = S.clientX - r.value.x, y.value = !0;
1723
+ }, N = (S) => {
1721
1724
  if (!u.value) return;
1722
- const I = T.clientX - v;
1725
+ const I = S.clientX - v;
1723
1726
  r.value.x = I, r.value.side === "left" ? I <= 0 ? r.value.x = 0 : I >= h.x - xe && (r.value.x = h.x - xe) : I >= a.value.width * 96 ? r.value.x = a.value.width * 96 : I <= b.x + xe && (r.value.x = b.x + xe);
1724
1727
  }, Q = () => {
1725
1728
  if (u.value = !1, y.value = !1, ae(), r.value && r.value.x !== w.value) {
1726
- const T = re();
1729
+ const S = re();
1727
1730
  o("margin-change", {
1728
1731
  side: r.value.side,
1729
- value: T
1732
+ value: S
1730
1733
  });
1731
1734
  }
1732
1735
  }, he = () => {
@@ -1742,7 +1745,7 @@ const Zn = (t, s) => {
1742
1745
  i.value = M(), window.addEventListener("mousemove", N), window.addEventListener("mouseup", Q);
1743
1746
  }), Mt(() => {
1744
1747
  window.removeEventListener("mousemove", N), window.removeEventListener("mouseup", Q);
1745
- }), (T, I) => (k(), C("div", {
1748
+ }), (S, I) => (k(), C("div", {
1746
1749
  class: "ruler",
1747
1750
  ref_key: "ruler",
1748
1751
  ref: e,
@@ -1763,7 +1766,7 @@ const Zn = (t, s) => {
1763
1766
  y.value ? (k(), C("div", {
1764
1767
  key: 0,
1765
1768
  class: "vertical-indicator",
1766
- style: Y(A.value)
1769
+ style: Y(T.value)
1767
1770
  }, null, 4)) : ee("", !0),
1768
1771
  (k(!0), C(U, null, J(i.value, (H) => (k(), C("div", {
1769
1772
  class: te(H.className),
@@ -1819,16 +1822,16 @@ const Zn = (t, s) => {
1819
1822
  let a;
1820
1823
  const d = () => {
1821
1824
  clearTimeout(a);
1822
- }, u = (p, _ = 10, A = 500) => {
1825
+ }, u = (p, _ = 10, T = 500) => {
1823
1826
  const B = p.getMap("meta"), N = () => {
1824
1827
  const Q = B.get("docx");
1825
- Q ? (d(), y({ content: Q })) : _ > 0 ? (console.debug(`Waiting for 'docx' data... retries left: ${_}`), a = setTimeout(N, A), _--) : console.warn("Failed to load docx data from meta map.");
1828
+ Q ? (d(), y({ content: Q })) : _ > 0 ? (console.debug(`Waiting for 'docx' data... retries left: ${_}`), a = setTimeout(N, T), _--) : console.warn("Failed to load docx data from meta map.");
1826
1829
  };
1827
1830
  N();
1828
1831
  }, r = async () => {
1829
1832
  try {
1830
- const [p, _, A, B] = await De.loadXmlData(n.fileSource);
1831
- return { content: p, media: _, mediaFiles: A, fonts: B };
1833
+ const [p, _, T, B] = await De.loadXmlData(n.fileSource);
1834
+ return { content: p, media: _, mediaFiles: T, fonts: B };
1832
1835
  } catch (p) {
1833
1836
  console.debug("Error loading new file data:", p);
1834
1837
  }
@@ -1838,15 +1841,15 @@ const Zn = (t, s) => {
1838
1841
  return y(p);
1839
1842
  } else if (n.options.ydoc && n.options.collaborationProvider) {
1840
1843
  delete n.options.content;
1841
- const p = n.options.ydoc, _ = n.options.collaborationProvider, A = () => {
1842
- u(p), _.off("synced", A);
1844
+ const p = n.options.ydoc, _ = n.options.collaborationProvider, T = () => {
1845
+ u(p), _.off("synced", T);
1843
1846
  };
1844
- _.on("synced", A);
1847
+ _.on("synced", T);
1845
1848
  }
1846
1849
  }, h = () => {
1847
1850
  const p = ht();
1848
1851
  return n.options.pagination ? p : p.filter((_) => _.name !== "pagination");
1849
- }, y = async ({ content: p, media: _ = {}, mediaFiles: A = {}, fonts: B = {} } = {}) => {
1852
+ }, y = async ({ content: p, media: _ = {}, mediaFiles: T = {}, fonts: B = {} } = {}) => {
1850
1853
  i.value = new De({
1851
1854
  mode: "docx",
1852
1855
  element: l.value,
@@ -1856,7 +1859,7 @@ const Zn = (t, s) => {
1856
1859
  documentId: n.documentId,
1857
1860
  content: p,
1858
1861
  media: _,
1859
- mediaFiles: A,
1862
+ mediaFiles: T,
1860
1863
  fonts: B,
1861
1864
  ...n.options
1862
1865
  }), i.value.on("paginationUpdate", () => {
@@ -1882,7 +1885,7 @@ const Zn = (t, s) => {
1882
1885
  p.target.classList.contains("ProseMirror") || Zn(p, i.value);
1883
1886
  }, D = ({ side: p, value: _ }) => {
1884
1887
  if (!i.value) return;
1885
- const A = i.value.getPageStyles(), { pageMargins: B } = A, N = { ...B, [p]: _ };
1888
+ const T = i.value.getPageStyles(), { pageMargins: B } = T, N = { ...B, [p]: _ };
1886
1889
  i.value?.updatePageStyle({ pageMargins: N });
1887
1890
  };
1888
1891
  return Ge(() => {
@@ -1910,45 +1913,45 @@ const Zn = (t, s) => {
1910
1913
  ], 544),
1911
1914
  e.value ? ee("", !0) : (k(), C("div", no, [
1912
1915
  x("div", oo, [
1913
- z($(Z), {
1916
+ P($(Z), {
1914
1917
  text: "",
1915
1918
  style: { width: "60%" }
1916
1919
  })
1917
1920
  ]),
1918
- z($(Z), {
1921
+ P($(Z), {
1919
1922
  text: "",
1920
1923
  repeat: 6
1921
1924
  }),
1922
- z($(Z), {
1925
+ P($(Z), {
1923
1926
  text: "",
1924
1927
  style: { width: "60%" }
1925
1928
  }),
1926
- z($(Z), {
1929
+ P($(Z), {
1927
1930
  text: "",
1928
1931
  repeat: 6,
1929
1932
  style: { width: "30%", display: "block", margin: "20px" }
1930
1933
  }),
1931
- z($(Z), {
1934
+ P($(Z), {
1932
1935
  text: "",
1933
1936
  style: { width: "60%" }
1934
1937
  }),
1935
- z($(Z), {
1938
+ P($(Z), {
1936
1939
  text: "",
1937
1940
  repeat: 5
1938
1941
  }),
1939
- z($(Z), {
1942
+ P($(Z), {
1940
1943
  text: "",
1941
1944
  style: { width: "30%" }
1942
1945
  }),
1943
- z($(Z), {
1946
+ P($(Z), {
1944
1947
  text: "",
1945
1948
  style: { "margin-top": "50px" }
1946
1949
  }),
1947
- z($(Z), {
1950
+ P($(Z), {
1948
1951
  text: "",
1949
1952
  repeat: 6
1950
1953
  }),
1951
- z($(Z), {
1954
+ P($(Z), {
1952
1955
  text: "",
1953
1956
  style: { width: "70%" }
1954
1957
  })
@@ -1,6 +1,6 @@
1
1
  import "vue";
2
- import { T as p } from "./chunks/toolbar-DXgM92D5.js";
3
- import "./chunks/editor-C3yIzIxA.js";
2
+ import { T as p } from "./chunks/toolbar-CD1usebH.js";
3
+ import "./chunks/editor-D0ZPyah6.js";
4
4
  export {
5
5
  p as default
6
6
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/super-editor.es-DQccY-AY.cjs");require("./chunks/vue-Ckf0DkDN.cjs");exports.BasicUpload=e.ho;exports.CommentsPluginKey=e.me;exports.DocxZipper=e.Nt;exports.Editor=e.Hi;exports.Extensions=e.go;exports.SuperConverter=e.kt;exports.SuperEditor=e.fo;exports.SuperInput=e.vo;exports.SuperToolbar=e.po;exports.Toolbar=e._p;exports.TrackChangesBasePluginKey=e.de;exports.createZip=e.c;exports.fieldAnnotationHelpers=e.Vk;exports.getActiveFormatting=e.Df;exports.getAllowedImageDimensions=e.Gn;exports.getMarksFromSelection=e.Do;exports.getRichTextExtensions=e.Dk;exports.getStarterExtensions=e.Nk;exports.helpers=e.kd;exports.trackChangesHelpers=e.jk;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/super-editor.es-Ci4hKlxU.cjs");require("./chunks/vue-Ckf0DkDN.cjs");exports.BasicUpload=e.ho;exports.CommentsPluginKey=e.me;exports.DocxZipper=e.Nt;exports.Editor=e.Hi;exports.Extensions=e.go;exports.SuperConverter=e.kt;exports.SuperEditor=e.fo;exports.SuperInput=e.vo;exports.SuperToolbar=e.po;exports.Toolbar=e._p;exports.TrackChangesBasePluginKey=e.de;exports.createZip=e.c;exports.fieldAnnotationHelpers=e.Vk;exports.getActiveFormatting=e.Df;exports.getAllowedImageDimensions=e.Gn;exports.getMarksFromSelection=e.Do;exports.getRichTextExtensions=e.Dk;exports.getStarterExtensions=e.Nk;exports.helpers=e.kd;exports.trackChangesHelpers=e.jk;
@@ -1,4 +1,4 @@
1
- import { h as t, m as r, N as o, H as i, g as n, k as p, f as g, v as l, p as c, _ as m, d as u, c as d, V as x, D as S, G as h, a as E, b as k, e as C, i as T, j as b } from "./chunks/super-editor.es-BEkxhYsI.es.js";
1
+ import { h as t, m as r, N as o, H as i, g as n, k as p, f as g, v as l, p as c, _ as m, d as u, c as d, V as x, D as S, G as h, a as E, b as k, e as C, i as T, j as b } from "./chunks/super-editor.es-BFboWKJF.es.js";
2
2
  import "./chunks/vue-BDbTsTMu.es.js";
3
3
  export {
4
4
  t as BasicUpload,