@harbour-enterprises/superdoc 1.0.0-beta.77 → 1.0.0-beta.79

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-BKr7cEPu.es.js → PdfViewer-DLPMtoVD.es.js} +1 -1
  2. package/dist/chunks/{PdfViewer-lTqAVIMY.cjs → PdfViewer-Dn5MoKhX.cjs} +1 -1
  3. package/dist/chunks/{index-CIRPA99b.cjs → index-DLvHMUJi.cjs} +3 -3
  4. package/dist/chunks/{index-BDzn27Zf.es.js → index-X_javC2m.es.js} +3 -3
  5. package/dist/chunks/{index-DKeRWPom-Cnh8G0CD.es.js → index-lIKPN00V-Bn76jN3g.es.js} +1 -1
  6. package/dist/chunks/{index-DKeRWPom-Dm_fBY3M.cjs → index-lIKPN00V-dYKYHttm.cjs} +1 -1
  7. package/dist/chunks/{super-editor.es-C4jK4tEr.cjs → super-editor.es-37HP4-SX.cjs} +46 -12
  8. package/dist/chunks/{super-editor.es-CQTHqCrf.es.js → super-editor.es-eQ24GmlY.es.js} +46 -12
  9. package/dist/super-editor/ai-writer.es.js +2 -2
  10. package/dist/super-editor/chunks/{converter-Do4k748P.js → converter-DqebDh5Y.js} +1 -1
  11. package/dist/super-editor/chunks/{docx-zipper-C563XFK8.js → docx-zipper-DNBbqIUN.js} +1 -1
  12. package/dist/super-editor/chunks/{editor-Cu65eurk.js → editor-BHqPITqs.js} +47 -13
  13. package/dist/super-editor/chunks/{index-DKeRWPom.js → index-lIKPN00V.js} +1 -1
  14. package/dist/super-editor/chunks/{toolbar-BWxDI5ku.js → toolbar-gYGrkDSx.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 +48 -14
  26. package/dist/superdoc.umd.js.map +1 -1
  27. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { A, a, _, C, D, E, b, P, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-CQTHqCrf.es.js";
1
+ import { A, a, _, C, D, E, b, P, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-eQ24GmlY.es.js";
2
2
  import "./chunks/vue-Dysv_7z5.es.js";
3
3
  export {
4
4
  A as AIWriter,
package/dist/superdoc.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const superEditor_es = require("./chunks/super-editor.es-C4jK4tEr.cjs");
4
- const superdoc = require("./chunks/index-CIRPA99b.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-37HP4-SX.cjs");
4
+ const superdoc = require("./chunks/index-DLvHMUJi.cjs");
5
5
  const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
6
6
  exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
7
7
  exports.Editor = superEditor_es.Editor;
@@ -1,5 +1,5 @@
1
- import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-CQTHqCrf.es.js";
2
- import { D, H, P, S as S2, m, l } from "./chunks/index-BDzn27Zf.es.js";
1
+ import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-eQ24GmlY.es.js";
2
+ import { D, H, P, S as S2, m, l } from "./chunks/index-X_javC2m.es.js";
3
3
  import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
4
4
  export {
5
5
  a as AnnotatorHelpers,
@@ -42327,7 +42327,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
42327
42327
  static getStoredSuperdocVersion(docx) {
42328
42328
  return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
42329
42329
  }
42330
- static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.77") {
42330
+ static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.79") {
42331
42331
  return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
42332
42332
  }
42333
42333
  /**
@@ -67373,7 +67373,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
67373
67373
  const shouldSkipNodeView = (editor) => {
67374
67374
  return isHeadless(editor);
67375
67375
  };
67376
- const summaryVersion = "1.0.0-beta.77";
67376
+ const summaryVersion = "1.0.0-beta.79";
67377
67377
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
67378
67378
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
67379
67379
  function mapAttributes(attrs) {
@@ -68162,7 +68162,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
68162
68162
  { default: remarkStringify2 },
68163
68163
  { default: remarkGfm2 }
68164
68164
  ] = await Promise.all([
68165
- Promise.resolve().then(() => indexDKeRWPom),
68165
+ Promise.resolve().then(() => indexLIKPN00V),
68166
68166
  Promise.resolve().then(() => indexDRCvimau),
68167
68167
  Promise.resolve().then(() => indexC_x_N6Uh),
68168
68168
  Promise.resolve().then(() => indexD_sWOSiG),
@@ -68367,7 +68367,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
68367
68367
  * Process collaboration migrations
68368
68368
  */
68369
68369
  processCollaborationMigrations() {
68370
- console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.77");
68370
+ console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.79");
68371
68371
  if (!this.options.ydoc) return;
68372
68372
  const metaMap = this.options.ydoc.getMap("meta");
68373
68373
  let docVersion = metaMap.get("version");
@@ -70298,6 +70298,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
70298
70298
  }, void 0);
70299
70299
  };
70300
70300
  const normalizeUnderlineStyle = (value) => {
70301
+ if (value === "none") {
70302
+ return void 0;
70303
+ }
70301
70304
  if (value === "double" || value === "dotted" || value === "dashed" || value === "wavy") {
70302
70305
  return value;
70303
70306
  }
@@ -70315,7 +70318,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
70315
70318
  }
70316
70319
  if (typeof value === "string") {
70317
70320
  const normalized = value.trim().toLowerCase();
70318
- if (normalized === "0" || normalized === "false" || normalized === "off") {
70321
+ if (normalized === "0" || normalized === "false" || normalized === "off" || normalized === "none") {
70319
70322
  return false;
70320
70323
  }
70321
70324
  if (normalized === "1" || normalized === "true" || normalized === "on") {
@@ -73825,9 +73828,20 @@ Please report this to https://github.com/markedjs/marked.`, e) {
73825
73828
  return `#${raw}`;
73826
73829
  };
73827
73830
  const toUnderlineStyle = (value) => {
73828
- const raw = `${extractValue(value) ?? ""}`.toLowerCase();
73829
- if (!raw) return void 0;
73830
- if (raw === "double" || raw === "dotted" || raw === "dashed" || raw === "wavy") return raw;
73831
+ let raw;
73832
+ if (value && typeof value === "object") {
73833
+ const obj = value;
73834
+ raw = obj.underline ?? obj.underlineType ?? obj.value ?? value;
73835
+ } else {
73836
+ raw = extractValue(value);
73837
+ }
73838
+ const normalized = `${raw ?? ""}`.toLowerCase();
73839
+ if (!normalized || normalized === "none" || normalized === "0" || normalized === "[object object]") {
73840
+ return void 0;
73841
+ }
73842
+ if (normalized === "double" || normalized === "dotted" || normalized === "dashed" || normalized === "wavy") {
73843
+ return normalized;
73844
+ }
73831
73845
  return "single";
73832
73846
  };
73833
73847
  const PT_TO_PX = 96 / 72;
@@ -73885,13 +73899,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
73885
73899
  const { resolver, paragraphStyleId, inlineStyleId, runStyleId } = options;
73886
73900
  const maps = [];
73887
73901
  if (paragraphStyleId) {
73888
- maps.push(resolver.getStyleMap(paragraphStyleId));
73902
+ const pMap = resolver.getStyleMap(paragraphStyleId);
73903
+ maps.push(pMap);
73889
73904
  }
73890
73905
  if (inlineStyleId && !paragraphStyleId?.startsWith("TOC")) {
73891
- maps.push(resolver.getStyleMap(inlineStyleId));
73906
+ const iMap = resolver.getStyleMap(inlineStyleId);
73907
+ maps.push(iMap);
73892
73908
  }
73893
73909
  if (runStyleId) {
73894
- maps.push(resolver.getStyleMap(runStyleId));
73910
+ const rMap = resolver.getStyleMap(runStyleId);
73911
+ maps.push(rMap);
73895
73912
  }
73896
73913
  if (!maps.length) return;
73897
73914
  const finalStyles = Object.assign({}, ...maps);
@@ -89325,6 +89342,23 @@ ${l}
89325
89342
  const runPmStart = run2.pmStart ?? null;
89326
89343
  const runPmEnd = run2.pmEnd ?? (runPmStart != null ? runPmStart + runLength : null);
89327
89344
  if (runPmStart == null || runPmEnd == null) continue;
89345
+ if (!Number.isFinite(runPmStart) || runPmStart < 0) {
89346
+ console.warn(
89347
+ `[computeLinePmRange] Invalid runPmStart (${runPmStart}) in block ${block.id}, run ${runIndex}. This may indicate layout data corruption. Expected a non-negative finite number.`
89348
+ );
89349
+ }
89350
+ if (!Number.isFinite(runPmEnd) || runPmEnd < 0) {
89351
+ console.warn(
89352
+ `[computeLinePmRange] Invalid runPmEnd (${runPmEnd}) in block ${block.id}, run ${runIndex}. This may indicate layout data corruption. Expected a non-negative finite number.`
89353
+ );
89354
+ }
89355
+ if (runLength === 0) {
89356
+ if (pmStart == null) {
89357
+ pmStart = runPmStart;
89358
+ }
89359
+ pmEnd = runPmEnd;
89360
+ continue;
89361
+ }
89328
89362
  const isFirstRun = runIndex === line.fromRun;
89329
89363
  const isLastRun = runIndex === line.toRun;
89330
89364
  const startOffset = isFirstRun ? line.fromChar : 0;
@@ -110619,7 +110653,7 @@ ${l}
110619
110653
  if (color2) markValue["background-color"] = color2;
110620
110654
  }
110621
110655
  } else if (key2 === "underline" && node2) {
110622
- const styleValRaw = value?.value ?? value ?? "";
110656
+ const styleValRaw = value?.underline ?? value?.underlineType ?? value?.value ?? (typeof value === "string" ? value : "");
110623
110657
  const styleVal = styleValRaw.toString().toLowerCase();
110624
110658
  const hasInlineUnderlineOff = node2.marks?.some(
110625
110659
  (m2) => m2.type?.name === "underline" && m2.attrs?.underlineType === "none"
@@ -150398,7 +150432,7 @@ ${style2}
150398
150432
  this.config.colors = shuffleArray(this.config.colors);
150399
150433
  this.userColorMap = /* @__PURE__ */ new Map();
150400
150434
  this.colorIndex = 0;
150401
- this.version = "1.0.0-beta.77";
150435
+ this.version = "1.0.0-beta.79";
150402
150436
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
150403
150437
  this.superdocId = config2.superdocId || v4();
150404
150438
  this.colors = this.config.colors;
@@ -152870,7 +152904,7 @@ ${style2}
152870
152904
  value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
152871
152905
  );
152872
152906
  }
152873
- const indexDKeRWPom = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
152907
+ const indexLIKPN00V = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
152874
152908
  __proto__: null,
152875
152909
  unified
152876
152910
  }, Symbol.toStringTag, { value: "Module" }));