@harbour-enterprises/superdoc 0.11.55 → 0.11.57

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 (34) hide show
  1. package/dist/chunks/{index-kWwSELc2.es.js → index-CVyuWad2.es.js} +2 -2
  2. package/dist/chunks/{index-BTkgQgI7.es.js → index-CWj8iOm4.es.js} +1 -1
  3. package/dist/chunks/{index-CbUTRvRk.cjs → index-Dnm6LcB6.cjs} +1 -1
  4. package/dist/chunks/{index-C6SLw2ph.cjs → index-Dw-Q9hD6.cjs} +1 -1
  5. package/dist/chunks/{super-editor.es-Ckqy5-TS.es.js → super-editor.es-BuT2FFqD.es.js} +11 -8
  6. package/dist/chunks/{super-editor.es-CzvPSzaM.cjs → super-editor.es-kMbvFzrR.cjs} +5 -5
  7. package/dist/chunks/{url-DRGmEUtI.cjs → url-BV2RvrTf.cjs} +1 -1
  8. package/dist/chunks/{url-C29KYeaj.es.js → url-NtSPOzqh.es.js} +1 -1
  9. package/dist/chunks/{xml-js-CgHhGhcJ.es.js → xml-js-BvgqUvJ5.es.js} +303 -296
  10. package/dist/chunks/xml-js-CCvZbbr7.cjs +10 -0
  11. package/dist/super-editor/ai-writer.es.js +2 -2
  12. package/dist/super-editor/chunks/{converter-B9WjeEIE.js → converter-D3X034CV.js} +2 -2
  13. package/dist/super-editor/chunks/{docx-zipper-D7SeztLe.js → docx-zipper-CczfH-Gl.js} +1 -1
  14. package/dist/super-editor/chunks/{editor-CoWNHEQZ.js → editor-CMO-734F.js} +7 -6
  15. package/dist/super-editor/chunks/{toolbar-C6iUWKaW.js → toolbar-d1TvqceK.js} +2 -2
  16. package/dist/super-editor/components/toolbar/super-toolbar.d.ts.map +1 -1
  17. package/dist/super-editor/converter.es.js +1 -1
  18. package/dist/super-editor/core/helpers/annotator.d.ts.map +1 -1
  19. package/dist/super-editor/docx-zipper.es.js +2 -2
  20. package/dist/super-editor/editor.es.js +3 -3
  21. package/dist/super-editor/file-zipper.es.js +1 -1
  22. package/dist/super-editor/super-editor.es.js +10 -8
  23. package/dist/super-editor/tests/e2e/test-app/dist/assets/index-BTMvkUyI.d.ts +3 -0
  24. package/dist/super-editor/tests/e2e/test-app/dist/assets/index-BTMvkUyI.d.ts.map +1 -0
  25. package/dist/super-editor/tests/e2e/test-app/vite.config.d.ts +1 -1
  26. package/dist/super-editor/toolbar.es.js +2 -2
  27. package/dist/super-editor.cjs +1 -1
  28. package/dist/super-editor.es.js +1 -1
  29. package/dist/superdoc.cjs +3 -3
  30. package/dist/superdoc.es.js +6 -6
  31. package/dist/superdoc.umd.js +12 -9
  32. package/dist/superdoc.umd.js.map +1 -1
  33. package/package.json +1 -1
  34. package/dist/chunks/xml-js-CMQ3QRee.cjs +0 -10
@@ -1,5 +1,5 @@
1
- import { G as md, g as yd, c as bd, n as jo, e as Wo, H as wd, x as Sd, D as Dd, M as vd, b as Fd } from "./chunks/super-editor.es-Ckqy5-TS.es.js";
2
- import { O as Ib, J as Cb, R as fb } from "./chunks/super-editor.es-Ckqy5-TS.es.js";
1
+ import { G as md, g as yd, c as bd, n as jo, e as Wo, H as wd, x as Sd, D as Dd, M as vd, b as Fd } from "./chunks/super-editor.es-BuT2FFqD.es.js";
2
+ import { O as Ib, J as Cb, R as fb } from "./chunks/super-editor.es-BuT2FFqD.es.js";
3
3
  import { Y as Vl, r as W, Z as ui, p as Ge, _ as Vn, a as ae, $ as zn, a0 as ua, D as dt, i as ht, q as ji, l as wt, y as Fe, a1 as kd, N as Zt, u as qt, a2 as xd, a3 as Rd, a4 as Xo, g as Ji, K as Us, O as jr, j as Ii, k as Di, h as da, U as Nd, s as Md, A as Wr, F as jt, R as GA, m as Ct, E as mi, I as ms, C as re, V as Ld, S as Gd, W as Td, J as qi, P as Es, G as ar, Q as Ud, H as Hd, T as Pd, b as ye, o as fe, t as yi, x as bi, z as zl, f as We, B as ri, e as Ze, v as hi, w as Qi, n as Xs, a5 as Zl, d as gn, c as $l, X as Od, a6 as Jd } from "./chunks/vue-DKS68Dra.es.js";
4
4
  import { B as qn } from "./chunks/jszip-OpmRHhd4.es.js";
5
5
  import { B as Yd } from "./chunks/blank-docx-BRvkcuiv.es.js";
@@ -16788,13 +16788,13 @@ var Ue = globalThis.pdfjsLib = {};
16788
16788
  "./chunks/empty-GlqisfcO.es.js"
16789
16789
  ), s = await import(
16790
16790
  /*webpackIgnore: true*/
16791
- "./chunks/index-kWwSELc2.es.js"
16791
+ "./chunks/index-CVyuWad2.es.js"
16792
16792
  ).then((d) => d.i), a = await import(
16793
16793
  /*webpackIgnore: true*/
16794
- "./chunks/index-BTkgQgI7.es.js"
16794
+ "./chunks/index-CWj8iOm4.es.js"
16795
16795
  ).then((d) => d.i), o = await import(
16796
16796
  /*webpackIgnore: true*/
16797
- "./chunks/url-C29KYeaj.es.js"
16797
+ "./chunks/url-NtSPOzqh.es.js"
16798
16798
  ).then((d) => d.u);
16799
16799
  let l, h;
16800
16800
  try {
@@ -32717,7 +32717,7 @@ class hb extends eg {
32717
32717
  this.config = {
32718
32718
  ...this.config,
32719
32719
  ...t
32720
- }, this.config.colors = NI(this.config.colors), this.userColorMap = /* @__PURE__ */ new Map(), this.colorIndex = 0, this.version = "0.11.55", console.debug("🦋 [superdoc] Using SuperDoc version:", this.version), this.superdocId = t.superdocId || ig(), this.colors = this.config.colors, this.#t(), await this.#r(this.config.modules), this.#i(), this.#s(), this.user = this.config.user, this.users = this.config.users || [], this.socket = null, this.isDev = this.config.isDev || !1, this.activeEditor = null, this.comments = [], this.app.mount(this.config.selector), this.readyEditors = 0, this.isLocked = this.config.isLocked || !1, this.lockedBy = this.config.lockedBy || null, this.#a();
32720
+ }, this.config.colors = NI(this.config.colors), this.userColorMap = /* @__PURE__ */ new Map(), this.colorIndex = 0, this.version = "0.11.57", console.debug("🦋 [superdoc] Using SuperDoc version:", this.version), this.superdocId = t.superdocId || ig(), this.colors = this.config.colors, this.#t(), await this.#r(this.config.modules), this.#i(), this.#s(), this.user = this.config.user, this.users = this.config.users || [], this.socket = null, this.isDev = this.config.isDev || !1, this.activeEditor = null, this.comments = [], this.app.mount(this.config.selector), this.readyEditors = 0, this.isLocked = this.config.isLocked || !1, this.lockedBy = this.config.lockedBy || null, this.#a();
32721
32721
  }
32722
32722
  /**
32723
32723
  * Get the number of editors that are required for this superdoc
@@ -24218,7 +24218,7 @@ Actual: ` + p3.attribValue
24218
24218
  return;
24219
24219
  }
24220
24220
  }
24221
- static updateDocumentVersion(e = this.convertedXml, t = "0.11.55") {
24221
+ static updateDocumentVersion(e = this.convertedXml, t = "0.11.57") {
24222
24222
  const n = "docProps/custom.xml";
24223
24223
  e[n] || (e[n] = ku$2());
24224
24224
  const i3 = e["docProps/custom.xml"];
@@ -24481,7 +24481,7 @@ Actual: ` + p3.attribValue
24481
24481
  function ku$2() {
24482
24482
  return Jf$1;
24483
24483
  }
24484
- function Nu$2(r22 = 2, e = "0.11.55") {
24484
+ function Nu$2(r22 = 2, e = "0.11.57") {
24485
24485
  return {
24486
24486
  type: "element",
24487
24487
  name: "property",
@@ -36682,8 +36682,9 @@ Actual: ` + p3.attribValue
36682
36682
  const { state: r } = t, { doc: o } = r, i3 = [];
36683
36683
  return o.descendants((s, a) => {
36684
36684
  s.type.name === "table" && i3.push({ node: s, pos: a });
36685
- }), i3.reverse().forEach((s) => {
36686
- jb({ tableNode: s, annotationValues: n, tr: e, editor: t });
36685
+ }), i3.reverse().forEach(({ pos: s }) => {
36686
+ const a = e.doc.nodeAt(s);
36687
+ !a || a.type.name !== "table" || jb({ tableNode: { node: a, pos: s }, annotationValues: n, tr: e, editor: t });
36687
36688
  }), e;
36688
36689
  }, jb = ({ tableNode: t, annotationValues: e, tr: n, editor: r }) => {
36689
36690
  let o = null, i3 = null;
@@ -36697,7 +36698,7 @@ Actual: ` + p3.attribValue
36697
36698
  if (o) return true;
36698
36699
  if (w.type === s && (i3 = { node: w, pos: x }), w.type === l) {
36699
36700
  const y = vi$1(w.attrs.fieldId, e);
36700
- Array.isArray(y) && (o = i3);
36701
+ Array.isArray(y) && w.attrs.generatorIndex === null && (o = i3);
36701
36702
  }
36702
36703
  }), !o) return;
36703
36704
  const { node: d, pos: u } = o, f = n.mapping.map(t.pos + u), p3 = f + d.nodeSize;
@@ -37265,7 +37266,7 @@ Actual: ` + p3.attribValue
37265
37266
  * @returns {Object | void} Migration results
37266
37267
  */
37267
37268
  processCollaborationMigrations() {
37268
- if (console.debug("[checkVersionMigrations] Current editor version", "0.11.55"), !this.options.ydoc) return;
37269
+ if (console.debug("[checkVersionMigrations] Current editor version", "0.11.57"), !this.options.ydoc) return;
37269
37270
  let r = this.options.ydoc.getMap("meta").get("version");
37270
37271
  r || (r = "initial"), console.debug("[checkVersionMigrations] Document version", r);
37271
37272
  const o = hl$1(r) || [], s = this.state.plugins.find((c3) => c3.key.startsWith("y-sync"));
@@ -54362,7 +54363,7 @@ ${t}
54362
54363
  const o = ref(xa$2()), n = t.type, e = ref(t.name), i3 = t.command, c3 = t.noArgumentCommand, a = ref(t.icon), l = ref(t.group || "center"), d = ref(t.allowWithoutEditor), m = ref(t.attributes || {}), s = t.disabled || false, b = ref(t.disabled), v = ref(false), y = ref(false), E3 = ref(t.style), g = ref(t.isNarrow), F = ref(t.isWide), $ = ref(t.minWidth), p3 = ref(t.suppressActiveHighlight || false), x = ref(t.argument), T3 = ref(null), N3 = ref(null), V3 = ref(t.iconColor), te2 = ref(t.hasCaret), ye2 = ref(t.dropdownStyles), Z3 = ref(t.tooltip), re2 = ref(t.tooltipVisible), be2 = ref(t.tooltipTimeout), I3 = ref(t.defaultLabel), M = ref(t.label), H3 = ref(t.hideLabel), R = ref(t.inlineTextInputVisible), G3 = ref(t.hasInlineTextInput), K3 = ref(t.markName), ce2 = ref(t.labelAttr), ue2 = ref(t.selectedValue), _e2 = ref(t.dropdownValueKey), xe2 = ref(t.inputRef || null), Ee2 = ref([]);
54363
54364
  if (t.options) {
54364
54365
  if (!Array.isArray(t.options)) throw new Error("Invalid toolbar item options - " + t.options);
54365
- Ee2.value.push(...t.options);
54366
+ Ee2.value?.push(...t.options);
54366
54367
  }
54367
54368
  const Fe2 = (se2) => {
54368
54369
  we2(se2), !p3.value && (v.value = true);
@@ -56174,7 +56175,9 @@ ${t}
56174
56175
  */
56175
56176
  rt = function() {
56176
56177
  if (!this.activeEditor || !this.activeEditor.converter || !this.activeEditor.converter.docHiglightColors.size) return;
56177
- const o = this.toolbarItems.find((a) => a.name.value === "highlight"), n = Vn(), e = 7, i3 = Array.from(this.activeEditor.converter.docHiglightColors).reduce((a, l, d) => {
56178
+ const o = this.toolbarItems.find((a) => a.name.value === "highlight");
56179
+ if (!o) return;
56180
+ const n = Vn(), e = 7, i3 = Array.from(this.activeEditor.converter.docHiglightColors).reduce((a, l, d) => {
56178
56181
  const m = Math.floor(d / e);
56179
56182
  return a[m] || (a[m] = []), n.includes(l) || a[m].push(h(l)), a;
56180
56183
  }, []), c3 = {
@@ -71601,7 +71604,7 @@ ${style2}
71601
71604
  this.config.colors = shuffleArray(this.config.colors);
71602
71605
  this.userColorMap = /* @__PURE__ */ new Map();
71603
71606
  this.colorIndex = 0;
71604
- this.version = "0.11.55";
71607
+ this.version = "0.11.57";
71605
71608
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
71606
71609
  this.superdocId = config.superdocId || v4();
71607
71610
  this.colors = this.config.colors;