@harbour-enterprises/superdoc 0.10.66 → 0.10.67

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.
@@ -15265,17 +15265,27 @@ function mv(t) {
15265
15265
  }
15266
15266
  const D6 = (t) => {
15267
15267
  const { nodes: e, nodeListHandler: n } = t;
15268
- if (e.length === 0 || !(e[0].name === "w:del" || e[0].name === "w:ins"))
15268
+ if (e.length === 0 || !(e[0].name === "w:del" || e[0].name === "w:ins" || e[0].name === "w:sdt"))
15269
15269
  return { nodes: [], consumed: 0 };
15270
- const r = e[0], { name: o } = r, { attributes: i, elements: s } = Fo(r), a = n.handler({ ...t, insideTrackChange: !0, nodes: s }), l = o === "w:del" ? wt : Wt, c = {
15271
- id: i["w:id"],
15272
- date: i["w:date"],
15273
- author: i["w:author"],
15274
- authorEmail: i["w:authorEmail"]
15270
+ const r = e[0];
15271
+ let o;
15272
+ if (["w:ins", "w:del"].includes(r.name))
15273
+ o = r;
15274
+ else {
15275
+ const d = r.elements.find((f) => f.name === "w:sdtContent")?.elements.find((f) => ["w:ins", "w:del"].includes(f.name));
15276
+ d && (o = d);
15277
+ }
15278
+ if (!o)
15279
+ return { nodes: [], consumed: 0 };
15280
+ const { name: i } = o, { attributes: s, elements: a } = Fo(o), l = n.handler({ ...t, insideTrackChange: !0, nodes: a }), c = i === "w:del" ? wt : Wt, u = {
15281
+ id: s["w:id"],
15282
+ date: s["w:date"],
15283
+ author: s["w:author"],
15284
+ authorEmail: s["w:authorEmail"]
15275
15285
  };
15276
- return a.forEach((u) => {
15277
- u.marks === void 0 && (u.marks = []), u.marks.push({ type: l, attrs: c });
15278
- }), { nodes: a, consumed: 1 };
15286
+ return l.forEach((d) => {
15287
+ d.marks === void 0 && (d.marks = []), d.marks.push({ type: c, attrs: u });
15288
+ }), { nodes: l, consumed: 1 };
15279
15289
  }, _6 = {
15280
15290
  handlerName: "trackChangeNodeHandler",
15281
15291
  handler: D6
@@ -16558,7 +16568,7 @@ const hs = class Tv {
16558
16568
  return;
16559
16569
  }
16560
16570
  }
16561
- static updateDocumentVersion(e = this.convertedXml, n = "0.10.66") {
16571
+ static updateDocumentVersion(e = this.convertedXml, n = "0.10.67") {
16562
16572
  const r = "docProps/custom.xml";
16563
16573
  e[r] || (e[r] = Ov());
16564
16574
  const o = e["docProps/custom.xml"];
@@ -16821,7 +16831,7 @@ function R$(t) {
16821
16831
  function Ov() {
16822
16832
  return i4;
16823
16833
  }
16824
- function Mv(t = 2, e = "0.10.66") {
16834
+ function Mv(t = 2, e = "0.10.67") {
16825
16835
  return {
16826
16836
  type: "element",
16827
16837
  name: "property",
@@ -29293,7 +29303,7 @@ const w8 = class $x extends yM {
29293
29303
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
29294
29304
  */
29295
29305
  processCollaborationMigrations() {
29296
- if (console.debug("[checkVersionMigrations] Current editor version", "0.10.66"), !this.options.ydoc) return;
29306
+ if (console.debug("[checkVersionMigrations] Current editor version", "0.10.67"), !this.options.ydoc) return;
29297
29307
  let e = this.options.ydoc.getMap("meta").get("version");
29298
29308
  e || (e = "initial"), console.debug("[checkVersionMigrations] Document version", e);
29299
29309
  const n = iw(e) || [], r = this.state.plugins.find((i) => i.key.startsWith("y-sync"));