@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.
@@ -16820,7 +16820,7 @@ const ws = class X1 {
16820
16820
  return;
16821
16821
  }
16822
16822
  }
16823
- static updateDocumentVersion(e = this.convertedXml, n = "0.12.9") {
16823
+ static updateDocumentVersion(e = this.convertedXml, n = "0.12.10") {
16824
16824
  const r = "docProps/custom.xml";
16825
16825
  e[r] || (e[r] = Y1());
16826
16826
  const o = e["docProps/custom.xml"];
@@ -17144,7 +17144,7 @@ function yT(t) {
17144
17144
  function Y1() {
17145
17145
  return R4;
17146
17146
  }
17147
- function Z1(t = 2, e = "0.12.9") {
17147
+ function Z1(t = 2, e = "0.12.10") {
17148
17148
  return {
17149
17149
  type: "element",
17150
17150
  name: "property",
@@ -29472,8 +29472,9 @@ const Ux = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
29472
29472
  const { state: r } = t, { doc: o } = r, i = [];
29473
29473
  return o.descendants((s, a) => {
29474
29474
  s.type.name === "table" && i.push({ node: s, pos: a });
29475
- }), i.reverse().forEach((s) => {
29476
- b8({ tableNode: s, annotationValues: n, tr: e, editor: t });
29475
+ }), i.reverse().forEach(({ pos: s }) => {
29476
+ const a = e.doc.nodeAt(s);
29477
+ !a || a.type.name !== "table" || b8({ tableNode: { node: a, pos: s }, annotationValues: n, tr: e, editor: t });
29477
29478
  }), e;
29478
29479
  }, b8 = ({ tableNode: t, annotationValues: e, tr: n, editor: r }) => {
29479
29480
  let o = null, i = null;
@@ -29487,7 +29488,7 @@ const Ux = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
29487
29488
  if (o) return !0;
29488
29489
  if (b.type === s && (i = { node: b, pos: x }), b.type === l) {
29489
29490
  const w = gd(b.attrs.fieldId, e);
29490
- Array.isArray(w) && (o = i);
29491
+ Array.isArray(w) && b.attrs.generatorIndex === null && (o = i);
29491
29492
  }
29492
29493
  }), !o) return;
29493
29494
  const { node: u, pos: d } = o, p = n.mapping.map(t.pos + d), f = p + u.nodeSize;
@@ -30188,7 +30189,7 @@ const O8 = class e3 extends w_ {
30188
30189
  * @returns {Object | void} Migration results
30189
30190
  */
30190
30191
  processCollaborationMigrations() {
30191
- if (console.debug("[checkVersionMigrations] Current editor version", "0.12.9"), !this.options.ydoc) return;
30192
+ if (console.debug("[checkVersionMigrations] Current editor version", "0.12.10"), !this.options.ydoc) return;
30192
30193
  let e = this.options.ydoc.getMap("meta").get("version");
30193
30194
  e || (e = "initial"), console.debug("[checkVersionMigrations] Document version", e);
30194
30195
  const n = vw(e) || [], r = this.state.plugins.find((i) => i.key.startsWith("y-sync"));
@@ -47257,7 +47258,7 @@ const Je = (t) => {
47257
47258
  const e = fe(ao()), n = t.type, r = fe(t.name), o = t.command, i = t.noArgumentCommand, s = fe(t.icon), a = fe(t.group || "center"), l = fe(t.allowWithoutEditor), c = fe(t.attributes || {}), u = t.disabled || !1, d = fe(t.disabled), p = fe(!1), f = fe(!1), h = fe(t.style), m = fe(t.isNarrow), y = fe(t.isWide), g = fe(t.minWidth), b = fe(t.suppressActiveHighlight || !1), x = fe(t.argument), w = fe(null), A = fe(null), M = fe(t.iconColor), O = fe(t.hasCaret), I = fe(t.dropdownStyles), C = fe(t.tooltip), W = fe(t.tooltipVisible), re = fe(t.tooltipTimeout), _ = fe(t.defaultLabel), H = fe(t.label), S = fe(t.hideLabel), K = fe(t.inlineTextInputVisible), oe = fe(t.hasInlineTextInput), V = fe(t.markName), le = fe(t.labelAttr), J = fe(t.selectedValue), ce = fe(t.dropdownValueKey), Y = fe(t.inputRef || null), F = fe([]);
47258
47259
  if (t.options) {
47259
47260
  if (!Array.isArray(t.options)) throw new Error("Invalid toolbar item options - " + t.options);
47260
- F.value.push(...t.options);
47261
+ F.value?.push(...t.options);
47261
47262
  }
47262
47263
  const Q = (N) => {
47263
47264
  $(N), !b.value && (p.value = !0);
@@ -49132,7 +49133,9 @@ GS = function() {
49132
49133
  */
49133
49134
  KS = function() {
49134
49135
  if (!this.activeEditor || !this.activeEditor.converter || !this.activeEditor.converter.docHiglightColors.size) return;
49135
- const t = this.toolbarItems.find((i) => i.name.value === "highlight"), e = nV(), n = 7, r = Array.from(this.activeEditor.converter.docHiglightColors).reduce((i, s, a) => {
49136
+ const t = this.toolbarItems.find((i) => i.name.value === "highlight");
49137
+ if (!t) return;
49138
+ const e = nV(), n = 7, r = Array.from(this.activeEditor.converter.docHiglightColors).reduce((i, s, a) => {
49136
49139
  const l = Math.floor(a / n);
49137
49140
  return i[l] || (i[l] = []), e.includes(s) || i[l].push(_e(s)), i;
49138
49141
  }, []), o = {