@harbour-enterprises/superdoc 2.0.0-next.6 → 2.0.0-next.8

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 (27) hide show
  1. package/dist/chunks/{PdfViewer-BznIC9kN.cjs → PdfViewer-B9CqbRwb.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-BPIxxJx1.es.js → PdfViewer-Do6Fwxg6.es.js} +1 -1
  3. package/dist/chunks/{index-CjroI_aV.cjs → index-AWdTcD50.cjs} +3 -3
  4. package/dist/chunks/{index-CjcK6uv5-igEsQh5Z.cjs → index-BenJjJks-BKrQ08cZ.cjs} +1 -1
  5. package/dist/chunks/{index-CjcK6uv5-_OL7V7hX.es.js → index-BenJjJks-D2bzxDYh.es.js} +1 -1
  6. package/dist/chunks/{index-C8DpZaYe.es.js → index-irAVws9u.es.js} +3 -3
  7. package/dist/chunks/{super-editor.es-CwbjhJ-l.cjs → super-editor.es-BkQd_jPX.cjs} +33 -11
  8. package/dist/chunks/{super-editor.es-Rg5N0oRz.es.js → super-editor.es-T6MeXgis.es.js} +33 -11
  9. package/dist/super-editor/ai-writer.es.js +2 -2
  10. package/dist/super-editor/chunks/{converter-CkaVRpl3.js → converter-zhWKWEc1.js} +1 -1
  11. package/dist/super-editor/chunks/{docx-zipper-kpJAPGdW.js → docx-zipper-D_hjsmAn.js} +1 -1
  12. package/dist/super-editor/chunks/{editor-Of8Mcai_.js → editor-Bd549Ee3.js} +34 -12
  13. package/dist/super-editor/chunks/{index-CjcK6uv5.js → index-BenJjJks.js} +1 -1
  14. package/dist/super-editor/chunks/{toolbar-DSV5sJpY.js → toolbar-YbPoc0AP.js} +2 -2
  15. package/dist/super-editor/converter.es.js +1 -1
  16. package/dist/super-editor/docx-zipper.es.js +2 -2
  17. package/dist/super-editor/editor.es.js +3 -3
  18. package/dist/super-editor/file-zipper.es.js +1 -1
  19. package/dist/super-editor/super-editor.es.js +6 -6
  20. package/dist/super-editor/toolbar.es.js +2 -2
  21. package/dist/super-editor.cjs +1 -1
  22. package/dist/super-editor.es.js +1 -1
  23. package/dist/superdoc.cjs +2 -2
  24. package/dist/superdoc.es.js +2 -2
  25. package/dist/superdoc.umd.js +35 -13
  26. package/dist/superdoc.umd.js.map +1 -1
  27. package/package.json +1 -1
@@ -42428,7 +42428,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
42428
42428
  static getStoredSuperdocVersion(docx) {
42429
42429
  return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
42430
42430
  }
42431
- static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "2.0.0-next.6") {
42431
+ static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "2.0.0-next.8") {
42432
42432
  return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
42433
42433
  }
42434
42434
  /**
@@ -68384,7 +68384,7 @@ ${err.toString()}`);
68384
68384
  const shouldSkipNodeView = (editor) => {
68385
68385
  return isHeadless(editor);
68386
68386
  };
68387
- const summaryVersion = "2.0.0-next.6";
68387
+ const summaryVersion = "2.0.0-next.8";
68388
68388
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
68389
68389
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
68390
68390
  function mapAttributes(attrs) {
@@ -69173,7 +69173,7 @@ ${err.toString()}`);
69173
69173
  { default: remarkStringify2 },
69174
69174
  { default: remarkGfm2 }
69175
69175
  ] = await Promise.all([
69176
- Promise.resolve().then(() => indexCjcK6uv5),
69176
+ Promise.resolve().then(() => indexBenJjJks),
69177
69177
  Promise.resolve().then(() => indexDRCvimau),
69178
69178
  Promise.resolve().then(() => indexC_x_N6Uh),
69179
69179
  Promise.resolve().then(() => indexD_sWOSiG),
@@ -69378,7 +69378,7 @@ ${err.toString()}`);
69378
69378
  * Process collaboration migrations
69379
69379
  */
69380
69380
  processCollaborationMigrations() {
69381
- console.debug("[checkVersionMigrations] Current editor version", "2.0.0-next.6");
69381
+ console.debug("[checkVersionMigrations] Current editor version", "2.0.0-next.8");
69382
69382
  if (!this.options.ydoc) return;
69383
69383
  const metaMap = this.options.ydoc.getMap("meta");
69384
69384
  let docVersion = metaMap.get("version");
@@ -92504,11 +92504,27 @@ ${l}
92504
92504
  }, void 0);
92505
92505
  };
92506
92506
  const normalizeUnderlineStyle = (value) => {
92507
- if (value === "none") {
92508
- return void 0;
92507
+ if (value === void 0 || value === null) {
92508
+ return "single";
92509
92509
  }
92510
- if (value === "double" || value === "dotted" || value === "dashed" || value === "wavy") {
92511
- return value;
92510
+ if (typeof value === "boolean") {
92511
+ return value ? "single" : void 0;
92512
+ }
92513
+ if (typeof value === "number") {
92514
+ return value === 0 ? void 0 : "single";
92515
+ }
92516
+ if (typeof value === "string") {
92517
+ const normalized = value.trim().toLowerCase();
92518
+ if (!normalized) {
92519
+ return "single";
92520
+ }
92521
+ if (normalized === "none" || normalized === "0" || normalized === "false" || normalized === "off") {
92522
+ return void 0;
92523
+ }
92524
+ if (normalized === "double" || normalized === "dotted" || normalized === "dashed" || normalized === "wavy") {
92525
+ return normalized;
92526
+ }
92527
+ return "single";
92512
92528
  }
92513
92529
  return "single";
92514
92530
  };
@@ -92660,13 +92676,16 @@ ${l}
92660
92676
  break;
92661
92677
  }
92662
92678
  case "underline": {
92663
- const style2 = normalizeUnderlineStyle(mark2.attrs?.underlineType);
92679
+ const underlineValue = mark2.attrs?.underlineType ?? mark2.attrs?.value ?? mark2.attrs?.underline ?? mark2.attrs?.style;
92680
+ const style2 = normalizeUnderlineStyle(underlineValue);
92664
92681
  if (style2) {
92665
92682
  const underlineColor = resolveColorFromAttributes(mark2.attrs ?? {}, themeColors);
92666
92683
  run2.underline = {
92667
92684
  style: style2,
92668
92685
  color: underlineColor ?? run2.underline?.color
92669
92686
  };
92687
+ } else if (underlineValue !== void 0 && underlineValue !== null) {
92688
+ delete run2.underline;
92670
92689
  }
92671
92690
  break;
92672
92691
  }
@@ -94229,7 +94248,10 @@ ${l}
94229
94248
  tabStops: cloneIfObject(resolvedExtended.tabStops),
94230
94249
  keepLines: resolvedExtended.keepLines,
94231
94250
  keepNext: resolvedExtended.keepNext,
94232
- numberingProperties: cloneIfObject(resolvedAsRecord.numberingProperties)
94251
+ numberingProperties: cloneIfObject(resolvedAsRecord.numberingProperties),
94252
+ // Extract contextualSpacing from style resolution - this is a sibling to spacing in OOXML,
94253
+ // not nested within it. When true, suppresses spacing between paragraphs of the same style.
94254
+ contextualSpacing: resolvedExtended.contextualSpacing
94233
94255
  };
94234
94256
  return hydrated;
94235
94257
  };
@@ -94964,7 +94986,7 @@ ${l}
94964
94986
  paragraphAttrs.spacing.afterAutospacing = normalizedSpacing.afterAutospacing;
94965
94987
  }
94966
94988
  }
94967
- const contextualSpacingValue = normalizedSpacing?.contextualSpacing ?? safeGetProperty(paragraphProps, "contextualSpacing") ?? safeGetProperty(attrs, "contextualSpacing");
94989
+ const contextualSpacingValue = normalizedSpacing?.contextualSpacing ?? safeGetProperty(paragraphProps, "contextualSpacing") ?? safeGetProperty(attrs, "contextualSpacing") ?? hydrated?.contextualSpacing;
94968
94990
  if (contextualSpacingValue != null) {
94969
94991
  paragraphAttrs.contextualSpacing = isTruthy(contextualSpacingValue);
94970
94992
  }
@@ -157795,7 +157817,7 @@ ${style2}
157795
157817
  this.config.colors = shuffleArray(this.config.colors);
157796
157818
  this.userColorMap = /* @__PURE__ */ new Map();
157797
157819
  this.colorIndex = 0;
157798
- this.version = "2.0.0-next.6";
157820
+ this.version = "2.0.0-next.8";
157799
157821
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
157800
157822
  this.superdocId = config2.superdocId || v4();
157801
157823
  this.colors = this.config.colors;
@@ -160268,7 +160290,7 @@ ${style2}
160268
160290
  value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
160269
160291
  );
160270
160292
  }
160271
- const indexCjcK6uv5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
160293
+ const indexBenJjJks = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
160272
160294
  __proto__: null,
160273
160295
  unified
160274
160296
  }, Symbol.toStringTag, { value: "Module" }));