@harbour-enterprises/superdoc 0.10.64 → 0.10.65

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.
@@ -16474,7 +16474,10 @@ function _$(t) {
16474
16474
  const I$ = (t, e, n) => {
16475
16475
  const r = t["word/_rels/document.xml.rels"].elements.find((u) => u.name === "Relationships"), { elements: o } = r, i = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", s = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", a = o.filter((u) => u.attributes.Type === i), l = o.filter((u) => u.attributes.Type === s), c = (Sv(t["word/document.xml"]) || []).flatMap((u) => u.elements);
16476
16476
  a.forEach((u) => {
16477
- const { rId: d, referenceFile: f, currentFileName: p } = sy(u, t), h = c.find((g) => g.name === "w:headerReference" && g.attributes["r:id"] === d)?.attributes["w:type"], m = Bs(), y = m.handler({
16477
+ const { rId: d, referenceFile: f, currentFileName: p } = sy(u, t);
16478
+ let h = c.find((g) => g.name === "w:headerReference" && g.attributes["r:id"] === d)?.attributes["w:type"];
16479
+ e.headerIds[h] && (h = null);
16480
+ const m = Bs(), y = m.handler({
16478
16481
  nodes: f.elements[0].elements,
16479
16482
  nodeListHandler: m,
16480
16483
  docx: t,
@@ -16482,7 +16485,7 @@ const I$ = (t, e, n) => {
16482
16485
  editor: n,
16483
16486
  filename: p
16484
16487
  });
16485
- e.headerIds.ids || (e.headerIds.ids = []), e.headerIds.ids.push(d), e.headers[d] = { type: "doc", content: [...y] }, e.headerIds[h] = d;
16488
+ e.headerIds.ids || (e.headerIds.ids = []), e.headerIds.ids.push(d), e.headers[d] = { type: "doc", content: [...y] }, h && (e.headerIds[h] = d);
16486
16489
  }), l.forEach((u) => {
16487
16490
  const { rId: d, referenceFile: f, currentFileName: p } = sy(u, t), h = c.find((g) => g.name === "w:footerReference" && g.attributes["r:id"] === d)?.attributes["w:type"], m = Bs(), y = m.handler({
16488
16491
  nodes: f.elements[0].elements,
@@ -16555,7 +16558,7 @@ const hs = class Tv {
16555
16558
  return;
16556
16559
  }
16557
16560
  }
16558
- static updateDocumentVersion(e = this.convertedXml, n = "0.10.64") {
16561
+ static updateDocumentVersion(e = this.convertedXml, n = "0.10.65") {
16559
16562
  const r = "docProps/custom.xml";
16560
16563
  e[r] || (e[r] = Ov());
16561
16564
  const o = e["docProps/custom.xml"];
@@ -16816,7 +16819,7 @@ function R$(t) {
16816
16819
  function Ov() {
16817
16820
  return i4;
16818
16821
  }
16819
- function Mv(t = 2, e = "0.10.64") {
16822
+ function Mv(t = 2, e = "0.10.65") {
16820
16823
  return {
16821
16824
  type: "element",
16822
16825
  name: "property",
@@ -29288,7 +29291,7 @@ const w8 = class $x extends yM {
29288
29291
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
29289
29292
  */
29290
29293
  processCollaborationMigrations() {
29291
- if (console.debug("[checkVersionMigrations] Current editor version", "0.10.64"), !this.options.ydoc) return;
29294
+ if (console.debug("[checkVersionMigrations] Current editor version", "0.10.65"), !this.options.ydoc) return;
29292
29295
  let e = this.options.ydoc.getMap("meta").get("version");
29293
29296
  e || (e = "initial"), console.debug("[checkVersionMigrations] Document version", e);
29294
29297
  const n = iw(e) || [], r = this.state.plugins.find((i) => i.key.startsWith("y-sync"));