@harbour-enterprises/superdoc 0.12.9 → 0.12.10

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.
@@ -1,5 +1,5 @@
1
- import { k as md, g as yd, c as bd, l as jo, f as Wo, a as wd, x as Sd, z as Dd, $ as vd, d as Fd } from "./chunks/super-editor.es-BI8I7zQw.es.js";
2
- import { O as Ib, w as Cb, i as fb } from "./chunks/super-editor.es-BI8I7zQw.es.js";
1
+ import { k as md, g as yd, c as bd, l as jo, f as Wo, a as wd, x as Sd, z as Dd, $ as vd, d as Fd } from "./chunks/super-editor.es-B4hMBqlj.es.js";
2
+ import { O as Ib, w as Cb, i as fb } from "./chunks/super-editor.es-B4hMBqlj.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";
@@ -32718,7 +32718,7 @@ class hb extends eg {
32718
32718
  this.config = {
32719
32719
  ...this.config,
32720
32720
  ...t
32721
- }, this.config.colors = NI(this.config.colors), this.userColorMap = /* @__PURE__ */ new Map(), this.colorIndex = 0, this.version = "0.12.9", 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
+ }, this.config.colors = NI(this.config.colors), this.userColorMap = /* @__PURE__ */ new Map(), this.colorIndex = 0, this.version = "0.12.10", 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();
32722
32722
  }
32723
32723
  /**
32724
32724
  * Get the number of editors that are required for this superdoc
@@ -24219,7 +24219,7 @@ Actual: ` + p3.attribValue
24219
24219
  return;
24220
24220
  }
24221
24221
  }
24222
- static updateDocumentVersion(e = this.convertedXml, t = "0.12.9") {
24222
+ static updateDocumentVersion(e = this.convertedXml, t = "0.12.10") {
24223
24223
  const n = "docProps/custom.xml";
24224
24224
  e[n] || (e[n] = Nu$2());
24225
24225
  const i3 = e["docProps/custom.xml"];
@@ -24543,7 +24543,7 @@ Actual: ` + p3.attribValue
24543
24543
  function Nu$2() {
24544
24544
  return Kf$2;
24545
24545
  }
24546
- function Iu$2(r22 = 2, e = "0.12.9") {
24546
+ function Iu$2(r22 = 2, e = "0.12.10") {
24547
24547
  return {
24548
24548
  type: "element",
24549
24549
  name: "property",
@@ -36908,8 +36908,9 @@ Actual: ` + p3.attribValue
36908
36908
  const { state: r } = e, { doc: o } = r, i3 = [];
36909
36909
  return o.descendants((s, a) => {
36910
36910
  s.type.name === "table" && i3.push({ node: s, pos: a });
36911
- }), i3.reverse().forEach((s) => {
36912
- u0$1({ tableNode: s, annotationValues: n, tr: t, editor: e });
36911
+ }), i3.reverse().forEach(({ pos: s }) => {
36912
+ const a = t.doc.nodeAt(s);
36913
+ !a || a.type.name !== "table" || u0$1({ tableNode: { node: a, pos: s }, annotationValues: n, tr: t, editor: e });
36913
36914
  }), t;
36914
36915
  }, u0$1 = ({ tableNode: e, annotationValues: t, tr: n, editor: r }) => {
36915
36916
  let o = null, i3 = null;
@@ -36923,7 +36924,7 @@ Actual: ` + p3.attribValue
36923
36924
  if (o) return true;
36924
36925
  if (w.type === s && (i3 = { node: w, pos: x3 }), w.type === l) {
36925
36926
  const y = Oi$1(w.attrs.fieldId, t);
36926
- Array.isArray(y) && (o = i3);
36927
+ Array.isArray(y) && w.attrs.generatorIndex === null && (o = i3);
36927
36928
  }
36928
36929
  }), !o) return;
36929
36930
  const { node: d, pos: u } = o, f3 = n.mapping.map(e.pos + u), p3 = f3 + d.nodeSize;
@@ -37635,7 +37636,7 @@ Actual: ` + p3.attribValue
37635
37636
  * @returns {Object | void} Migration results
37636
37637
  */
37637
37638
  processCollaborationMigrations() {
37638
- if (console.debug("[checkVersionMigrations] Current editor version", "0.12.9"), !this.options.ydoc) return;
37639
+ if (console.debug("[checkVersionMigrations] Current editor version", "0.12.10"), !this.options.ydoc) return;
37639
37640
  let r = this.options.ydoc.getMap("meta").get("version");
37640
37641
  r || (r = "initial"), console.debug("[checkVersionMigrations] Document version", r);
37641
37642
  const o = wl$1(r) || [], s = this.state.plugins.find((c3) => c3.key.startsWith("y-sync"));
@@ -54731,7 +54732,7 @@ ${t}
54731
54732
  const t = ref(xa$1()), n = e.type, o = ref(e.name), i3 = e.command, c3 = e.noArgumentCommand, a = ref(e.icon), l = ref(e.group || "center"), d = ref(e.allowWithoutEditor), u = ref(e.attributes || {}), r = e.disabled || false, w = ref(e.disabled), v = ref(false), b = ref(false), y = ref(e.style), g = ref(e.isNarrow), L3 = ref(e.isWide), D3 = ref(e.minWidth), p3 = ref(e.suppressActiveHighlight || false), S = ref(e.argument), F = ref(null), O3 = ref(null), W = ref(e.iconColor), oe2 = ref(e.hasCaret), ue2 = ref(e.dropdownStyles), ve2 = ref(e.tooltip), ge2 = ref(e.tooltipVisible), Y = ref(e.tooltipTimeout), T = ref(e.defaultLabel), H3 = ref(e.label), B3 = ref(e.hideLabel), z3 = ref(e.inlineTextInputVisible), G3 = ref(e.hasInlineTextInput), K3 = ref(e.markName), ce2 = ref(e.labelAttr), se2 = ref(e.selectedValue), ke2 = ref(e.dropdownValueKey), Ie2 = ref(e.inputRef || null), be2 = ref([]);
54732
54733
  if (e.options) {
54733
54734
  if (!Array.isArray(e.options)) throw new Error("Invalid toolbar item options - " + e.options);
54734
- be2.value.push(...e.options);
54735
+ be2.value?.push(...e.options);
54735
54736
  }
54736
54737
  const _e2 = (ae2) => {
54737
54738
  xe2(ae2), !p3.value && (v.value = true);
@@ -56611,7 +56612,9 @@ ${t}
56611
56612
  */
56612
56613
  dt = function() {
56613
56614
  if (!this.activeEditor || !this.activeEditor.converter || !this.activeEditor.converter.docHiglightColors.size) return;
56614
- const t = this.toolbarItems.find((a) => a.name.value === "highlight"), n = jn(), o = 7, i3 = Array.from(this.activeEditor.converter.docHiglightColors).reduce((a, l, d) => {
56615
+ const t = this.toolbarItems.find((a) => a.name.value === "highlight");
56616
+ if (!t) return;
56617
+ const n = jn(), o = 7, i3 = Array.from(this.activeEditor.converter.docHiglightColors).reduce((a, l, d) => {
56615
56618
  const u = Math.floor(d / o);
56616
56619
  return a[u] || (a[u] = []), n.includes(l) || a[u].push(f(l)), a;
56617
56620
  }, []), c3 = {
@@ -72039,7 +72042,7 @@ ${style2}
72039
72042
  this.config.colors = shuffleArray(this.config.colors);
72040
72043
  this.userColorMap = /* @__PURE__ */ new Map();
72041
72044
  this.colorIndex = 0;
72042
- this.version = "0.12.9";
72045
+ this.version = "0.12.10";
72043
72046
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
72044
72047
  this.superdocId = config.superdocId || v4();
72045
72048
  this.colors = this.config.colors;