superdoc 0.34.6 → 0.34.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 (32) hide show
  1. package/dist/chunks/{PdfViewer-BrSBsHiz.cjs → PdfViewer-B5_CAxAU.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-BrE01k0i.es.js → PdfViewer-CbSi2Lmm.es.js} +1 -1
  3. package/dist/chunks/{index-ZlsBnxiE.es.js → index-CseiDXct.es.js} +3 -3
  4. package/dist/chunks/{index-DD7_Re-5-CzvmaphZ.es.js → index-d6pPim2h-B6jN-92p.es.js} +1 -1
  5. package/dist/chunks/{index-DD7_Re-5-B48aEbZz.cjs → index-d6pPim2h-BcJ4Fg50.cjs} +1 -1
  6. package/dist/chunks/{index-GFozhkXc.cjs → index-fbTTmSgz.cjs} +3 -3
  7. package/dist/chunks/{super-editor.es-k87Y2gby.cjs → super-editor.es-BT9VZozQ.cjs} +62 -44
  8. package/dist/chunks/{super-editor.es-DyBhGWdJ.es.js → super-editor.es-Bv556acQ.es.js} +62 -44
  9. package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
  10. package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -1
  11. package/dist/super-editor/ai-writer.es.js +2 -2
  12. package/dist/super-editor/chunks/{converter-DW2wtoOn.js → converter-BaNBokjA.js} +15 -10
  13. package/dist/super-editor/chunks/{docx-zipper-Bo5xY0tG.js → docx-zipper-C9sW8-b0.js} +1 -1
  14. package/dist/super-editor/chunks/{editor-VFipfW_y.js → editor-CjGE4oUv.js} +49 -36
  15. package/dist/super-editor/chunks/{index-DD7_Re-5.js → index-d6pPim2h.js} +1 -1
  16. package/dist/super-editor/chunks/{toolbar-B1x6Bp3N.js → toolbar-STQu42V2.js} +2 -2
  17. package/dist/super-editor/converter.es.js +1 -1
  18. package/dist/super-editor/docx-zipper.es.js +2 -2
  19. package/dist/super-editor/editor.es.js +3 -3
  20. package/dist/super-editor/file-zipper.es.js +1 -1
  21. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/r/r-translator.d.ts.map +1 -1
  22. package/dist/super-editor/super-editor/src/extensions/collaboration/collaboration-helpers.d.ts.map +1 -1
  23. package/dist/super-editor/super-editor/src/extensions/track-changes/permission-helpers.d.ts.map +1 -1
  24. package/dist/super-editor/super-editor.es.js +6 -6
  25. package/dist/super-editor/toolbar.es.js +2 -2
  26. package/dist/super-editor.cjs +1 -1
  27. package/dist/super-editor.es.js +1 -1
  28. package/dist/superdoc.cjs +2 -2
  29. package/dist/superdoc.es.js +2 -2
  30. package/dist/superdoc.umd.js +64 -46
  31. package/dist/superdoc.umd.js.map +1 -1
  32. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, nextTick, getCurrentInstance, createVNode, readonly, watch, onMounted, onBeforeUnmount, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, h, Teleport, toRef, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, renderList, withCtx } from "vue";
2
- import { p as process$1 } from "./converter-DW2wtoOn.js";
3
- import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-VFipfW_y.js";
2
+ import { p as process$1 } from "./converter-BaNBokjA.js";
3
+ import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-CjGE4oUv.js";
4
4
  const sanitizeNumber = (value, defaultNumber) => {
5
5
  let sanitized = value.replace(/[^0-9.]/g, "");
6
6
  sanitized = parseFloat(sanitized);
@@ -1,4 +1,4 @@
1
- import { a5 } from "./chunks/converter-DW2wtoOn.js";
1
+ import { a5 } from "./chunks/converter-BaNBokjA.js";
2
2
  export {
3
3
  a5 as SuperConverter
4
4
  };
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-DW2wtoOn.js";
2
- import { D } from "./chunks/docx-zipper-Bo5xY0tG.js";
1
+ import "./chunks/converter-BaNBokjA.js";
2
+ import { D } from "./chunks/docx-zipper-C9sW8-b0.js";
3
3
  export {
4
4
  D as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E } from "./chunks/editor-VFipfW_y.js";
2
- import "./chunks/converter-DW2wtoOn.js";
3
- import "./chunks/docx-zipper-Bo5xY0tG.js";
1
+ import { E } from "./chunks/editor-CjGE4oUv.js";
2
+ import "./chunks/converter-BaNBokjA.js";
3
+ import "./chunks/docx-zipper-C9sW8-b0.js";
4
4
  export {
5
5
  E as Editor
6
6
  };
@@ -1,4 +1,4 @@
1
- import { J as JSZip } from "./chunks/docx-zipper-Bo5xY0tG.js";
1
+ import { J as JSZip } from "./chunks/docx-zipper-C9sW8-b0.js";
2
2
  async function createZip(blobs, fileNames) {
3
3
  const zip = new JSZip();
4
4
  blobs.forEach((blob, index) => {
@@ -1 +1 @@
1
- {"version":3,"file":"r-translator.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/core/super-converter/v3/handlers/w/r/r-translator.js"],"names":[],"mappings":"AA0MA,yDAAyD;AACzD,qBADW,OAAO,aAAa,EAAE,oBAAoB,CAQnD;AAEF,mDAAmD;AACnD,yBADW,OAAO,aAAa,EAAE,cAAc,CACO"}
1
+ {"version":3,"file":"r-translator.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/core/super-converter/v3/handlers/w/r/r-translator.js"],"names":[],"mappings":"AAgNA,yDAAyD;AACzD,qBADW,OAAO,aAAa,EAAE,oBAAoB,CAQnD;AAEF,mDAAmD;AACnD,yBADW,OAAO,aAAa,EAAE,cAAc,CACO"}
@@ -1 +1 @@
1
- {"version":3,"file":"collaboration-helpers.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/collaboration/collaboration-helpers.js"],"names":[],"mappings":"AAMO,2CAHI,MAAM,cACJ,OAAO,CAAC,IAAI,CAAC,CA0CzB"}
1
+ {"version":3,"file":"collaboration-helpers.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/collaboration/collaboration-helpers.js"],"names":[],"mappings":"AAMO,2CAHI,MAAM,cACJ,OAAO,CAAC,IAAI,CAAC,CA4DzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"permission-helpers.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/track-changes/permission-helpers.js"],"names":[],"mappings":"AAgDO,2DALJ;IAAwD,KAAK,EAArD,OAAO,mBAAmB,EAAE,WAAW;IACxB,IAAI,EAAnB,MAAM;IACS,EAAE,EAAjB,MAAM;CACd,GAAU,KAAK,KAAQ,CAkBzB;AA+BM,iFALJ;IAAmE,MAAM,EAAjE;;;;;;;;;;;;0BAsDgghgB,aAAa;;;;2BAAgoB,IAAI;;;;;;;6BAAwmI,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAAwte,aAAa;0BAA3kyB,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAAskpC,UAAU;kDAAuV,UAAU,aAA+E,UAAU;oCAAgZ,UAAU;;;;;;;;;KAtD/xhiB;IACxB,MAAM,EAAhC,QAAQ,GAAC,QAAQ;IACK,cAAc,EAApC,KAAK,KAAQ;CACrB,GAAU,OAAO,CAkCnB;AAWM,iFALJ;IAAwD,KAAK,EAArD,OAAO,mBAAmB,EAAE,WAAW;IACnB,GAAG,EAAvB,MAAM,GAAC,IAAI;IACS,eAAe,EAAnC,MAAM,GAAC,IAAI;CACnB,GAAU,KAAK,KAAQ,CAOzB"}
1
+ {"version":3,"file":"permission-helpers.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/track-changes/permission-helpers.js"],"names":[],"mappings":"AAgDO,2DALJ;IAAwD,KAAK,EAArD,OAAO,mBAAmB,EAAE,WAAW;IACxB,IAAI,EAAnB,MAAM;IACS,EAAE,EAAjB,MAAM;CACd,GAAU,KAAK,KAAQ,CAkBzB;AA+BM,iFALJ;IAAmE,MAAM,EAAjE;;;;;;;;;;;;0BAsDu+hgB,aAAa;;;;2BAAgoB,IAAI;;;;;;;6BAAwmI,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAAwte,aAAa;0BAA3kyB,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAAskpC,UAAU;kDAAuV,UAAU,aAA+E,UAAU;oCAAgZ,UAAU;;;;;;;;;KAtDtwiiB;IACxB,MAAM,EAAhC,QAAQ,GAAC,QAAQ;IACK,cAAc,EAApC,KAAK,KAAQ;CACrB,GAAU,OAAO,CAkCnB;AAWM,iFALJ;IAAwD,KAAK,EAArD,OAAO,mBAAmB,EAAE,WAAW;IACnB,GAAG,EAAvB,MAAM,GAAC,IAAI;IACS,eAAe,EAAnC,MAAM,GAAC,IAAI;CACnB,GAAU,KAAK,KAAQ,CAOzB"}
@@ -9,14 +9,14 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
9
9
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10
10
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
11
11
  var _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, enrichTrackedChanges_fn, runCommandWithArgumentOnly_fn;
12
- import { aA as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, aD as vClickOutside, aE as getActiveFormatting, av as isInTable, aF as readFromClipboard, aG as handleClipboardPaste, aH as getFileObject, aI as runPropertyTranslators, aJ as translator, aK as translator$1, aL as translator$2, aM as translator$3, aN as translator$4, aO as translator$5, aP as translator$6, aQ as translator$7, aR as translator$8, aS as translator$9, aT as translator$a, aU as translator$b, aV as translator$c, aW as translator$d, aX as translator$e, aY as commentRangeEndTranslator, aZ as commentRangeStartTranslator, a_ as translator$f, a$ as translator$g, b0 as translator$h, b1 as translator$i, b2 as translator$j, b3 as translator$k, b4 as translator$l, b5 as translator$m, b6 as translator$n, b7 as translator$o, b8 as translator$p, b9 as translator$q, ba as translator$r, bb as translator$s, bc as translator$t, bd as translator$u, be as translator$v, bf as translator$w, bg as translator$x, bh as translator$y, bi as translator$z, bj as translator$A, bk as translator$B, bl as translator$C, bm as translator$D, bn as translator$E, bo as translator$F, bp as translator$G, bq as translator$H, br as translator$I, bs as translator$J, bt as translator$K, bu as translator$L, bv as translator$M, bw as translator$N, bx as translator$O, by as translator$P, bz as translator$Q, bA as translator$R, bB as translator$S, bC as translator$T, bD as translator$U, bE as translator$V, bF as translator$W, bG as translator$X, bH as translator$Y, bI as translator$Z, bJ as translator$_, bK as translator$$, bL as translator$10, bM as translator$11, bN as translator$12, bO as translator$13, bP as translator$14, bQ as translator$15, bR as translator$16, bS as translator$17, bT as translator$18, bU as translator$19, bV as translator$1a, bW as translator$1b, bX as translator$1c, bY as translator$1d, bZ as translator$1e, b_ as translator$1f, b$ as translator$1g, c0 as translator$1h, P as PluginKey, a as Plugin } from "./chunks/converter-DW2wtoOn.js";
13
- import { a5, i, a2 } from "./chunks/converter-DW2wtoOn.js";
14
- import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as collectTargetListItemPositions, d as getFileOpener, e as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, f as uploadAndInsertImage, h as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, j as undoDepth, k as redoDepth, l as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, m as isHeadless, E as Editor, n as getStarterExtensions, P as Placeholder, o as getRichTextExtensions, D as DecorationSet, p as Decoration, M as Mark, q as Extension, A as Attribute, N as Node } from "./chunks/editor-VFipfW_y.js";
15
- import { w, C, x, T, t, z, v } from "./chunks/editor-VFipfW_y.js";
12
+ import { aA as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, aD as vClickOutside, aE as getActiveFormatting, av as isInTable, aF as readFromClipboard, aG as handleClipboardPaste, aH as getFileObject, aI as runPropertyTranslators, aJ as translator, aK as translator$1, aL as translator$2, aM as translator$3, aN as translator$4, aO as translator$5, aP as translator$6, aQ as translator$7, aR as translator$8, aS as translator$9, aT as translator$a, aU as translator$b, aV as translator$c, aW as translator$d, aX as translator$e, aY as commentRangeEndTranslator, aZ as commentRangeStartTranslator, a_ as translator$f, a$ as translator$g, b0 as translator$h, b1 as translator$i, b2 as translator$j, b3 as translator$k, b4 as translator$l, b5 as translator$m, b6 as translator$n, b7 as translator$o, b8 as translator$p, b9 as translator$q, ba as translator$r, bb as translator$s, bc as translator$t, bd as translator$u, be as translator$v, bf as translator$w, bg as translator$x, bh as translator$y, bi as translator$z, bj as translator$A, bk as translator$B, bl as translator$C, bm as translator$D, bn as translator$E, bo as translator$F, bp as translator$G, bq as translator$H, br as translator$I, bs as translator$J, bt as translator$K, bu as translator$L, bv as translator$M, bw as translator$N, bx as translator$O, by as translator$P, bz as translator$Q, bA as translator$R, bB as translator$S, bC as translator$T, bD as translator$U, bE as translator$V, bF as translator$W, bG as translator$X, bH as translator$Y, bI as translator$Z, bJ as translator$_, bK as translator$$, bL as translator$10, bM as translator$11, bN as translator$12, bO as translator$13, bP as translator$14, bQ as translator$15, bR as translator$16, bS as translator$17, bT as translator$18, bU as translator$19, bV as translator$1a, bW as translator$1b, bX as translator$1c, bY as translator$1d, bZ as translator$1e, b_ as translator$1f, b$ as translator$1g, c0 as translator$1h, P as PluginKey, a as Plugin } from "./chunks/converter-BaNBokjA.js";
13
+ import { a5, i, a2 } from "./chunks/converter-BaNBokjA.js";
14
+ import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as collectTargetListItemPositions, d as getFileOpener, e as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, f as uploadAndInsertImage, h as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, j as undoDepth, k as redoDepth, l as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, m as isHeadless, E as Editor, n as getStarterExtensions, P as Placeholder, o as getRichTextExtensions, D as DecorationSet, p as Decoration, M as Mark, q as Extension, A as Attribute, N as Node } from "./chunks/editor-CjGE4oUv.js";
15
+ import { w, C, x, T, t, z, v } from "./chunks/editor-CjGE4oUv.js";
16
16
  import { ref, onMounted, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createElementVNode, withModifiers, toDisplayString, createCommentVNode, normalizeStyle, computed, watch, withDirectives, withKeys, vModelText, createTextVNode, createVNode, h, createApp, markRaw, nextTick, onBeforeUnmount, defineComponent, reactive, onUnmounted, renderSlot, shallowRef, createBlock, withCtx, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
17
- import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-B1x6Bp3N.js";
17
+ import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-STQu42V2.js";
18
18
  import AIWriter from "./ai-writer.es.js";
19
- import { D } from "./chunks/docx-zipper-Bo5xY0tG.js";
19
+ import { D } from "./chunks/docx-zipper-C9sW8-b0.js";
20
20
  import { createZip } from "./file-zipper.es.js";
21
21
  var eventemitter3 = { exports: {} };
22
22
  var hasRequiredEventemitter3;
@@ -1,6 +1,6 @@
1
1
  import "vue";
2
- import { T } from "./chunks/toolbar-B1x6Bp3N.js";
3
- import "./chunks/editor-VFipfW_y.js";
2
+ import { T } from "./chunks/toolbar-STQu42V2.js";
3
+ import "./chunks/editor-CjGE4oUv.js";
4
4
  export {
5
5
  T as default
6
6
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const superEditor_es = require("./chunks/super-editor.es-k87Y2gby.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-BT9VZozQ.cjs");
4
4
  require("./chunks/vue-Cwv-wUpm.cjs");
5
5
  exports.AIWriter = superEditor_es.AIWriter;
6
6
  exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
@@ -1,4 +1,4 @@
1
- import { A, a, _, C, D, E, b, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-DyBhGWdJ.es.js";
1
+ import { A, a, _, C, D, E, b, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-Bv556acQ.es.js";
2
2
  import "./chunks/vue-CKmzTNVs.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-k87Y2gby.cjs");
4
- const superdoc = require("./chunks/index-GFozhkXc.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-BT9VZozQ.cjs");
4
+ const superdoc = require("./chunks/index-fbTTmSgz.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-DyBhGWdJ.es.js";
2
- import { D, H, P, S as S2, m, l } from "./chunks/index-ZlsBnxiE.es.js";
1
+ import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-Bv556acQ.es.js";
2
+ import { D, H, P, S as S2, m, l } from "./chunks/index-CseiDXct.es.js";
3
3
  import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
4
4
  export {
5
5
  a as AnnotatorHelpers,
@@ -27046,6 +27046,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
27046
27046
  runs2.push(trackedClone);
27047
27047
  return;
27048
27048
  }
27049
+ if (child.name === "w:commentRangeStart" || child.name === "w:commentRangeEnd") {
27050
+ const commentRangeClone = cloneXmlNode(child);
27051
+ runs2.push(commentRangeClone);
27052
+ return;
27053
+ }
27049
27054
  const runWrapper = { name: XML_NODE_NAME$j, elements: [] };
27050
27055
  applyBaseRunProps(runWrapper);
27051
27056
  if (!Array.isArray(runWrapper.elements)) runWrapper.elements = [];
@@ -33394,17 +33399,17 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33394
33399
  const indent2 = pPr?.elements?.find((el) => el.name === "w:ind");
33395
33400
  const tabs = pPr?.elements?.find((el) => el.name === "w:tabs");
33396
33401
  let lineSpaceBefore, lineSpaceAfter, line;
33397
- if (spacing) {
33398
- lineSpaceBefore = twipsToPixels(spacing?.attributes["w:before"]);
33399
- lineSpaceAfter = twipsToPixels(spacing?.attributes["w:after"]);
33400
- line = twipsToLines(spacing?.attributes["w:line"]);
33402
+ if (spacing?.attributes) {
33403
+ lineSpaceBefore = twipsToPixels(spacing.attributes["w:before"]);
33404
+ lineSpaceAfter = twipsToPixels(spacing.attributes["w:after"]);
33405
+ line = twipsToLines(spacing.attributes["w:line"]);
33401
33406
  }
33402
33407
  let textAlign, leftIndent, rightIndent, firstLine;
33403
- if (indent2) {
33404
- textAlign = justify?.attributes["w:val"];
33405
- leftIndent = twipsToPixels(indent2?.attributes["w:left"]);
33406
- rightIndent = twipsToPixels(indent2?.attributes["w:right"]);
33407
- firstLine = twipsToPixels(indent2?.attributes["w:firstLine"]);
33408
+ if (indent2?.attributes) {
33409
+ textAlign = justify?.attributes?.["w:val"];
33410
+ leftIndent = twipsToPixels(indent2.attributes["w:left"]);
33411
+ rightIndent = twipsToPixels(indent2.attributes["w:right"]);
33412
+ firstLine = twipsToPixels(indent2.attributes["w:firstLine"]);
33408
33413
  }
33409
33414
  let tabStops = [];
33410
33415
  if (tabs) {
@@ -35793,7 +35798,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35793
35798
  static getStoredSuperdocVersion(docx) {
35794
35799
  return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
35795
35800
  }
35796
- static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "0.34.6") {
35801
+ static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "0.34.8") {
35797
35802
  return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
35798
35803
  }
35799
35804
  /**
@@ -58361,39 +58366,52 @@ Please report this to https://github.com/markedjs/marked.`, e) {
58361
58366
  return `${color2}${alpha}`;
58362
58367
  };
58363
58368
  const updateYdocDocxData = async (editor, ydoc) => {
58364
- ydoc = ydoc || editor.options.ydoc;
58365
- if (!ydoc) return;
58366
- if (!editor || editor.isDestroyed) return;
58367
- const metaMap = ydoc.getMap("meta");
58368
- const docxValue = metaMap.get("docx");
58369
- let docx = [];
58370
- if (Array.isArray(docxValue)) {
58371
- docx = [...docxValue];
58372
- } else if (docxValue && typeof docxValue.toArray === "function") {
58373
- docx = docxValue.toArray();
58374
- } else if (docxValue && typeof docxValue[Symbol.iterator] === "function") {
58375
- docx = Array.from(docxValue);
58376
- }
58377
- if (!docx.length && Array.isArray(editor.options.content)) {
58378
- docx = [...editor.options.content];
58379
- }
58380
- const newXml = await editor.exportDocx({ getUpdatedDocs: true });
58381
- Object.keys(newXml).forEach((key2) => {
58382
- const fileIndex = docx.findIndex((item) => item.name === key2);
58383
- if (fileIndex > -1) {
58384
- docx.splice(fileIndex, 1);
58385
- }
58386
- docx.push({
58387
- name: key2,
58388
- content: newXml[key2]
58369
+ try {
58370
+ ydoc = ydoc || editor?.options?.ydoc;
58371
+ if (!ydoc) return;
58372
+ if (!editor || editor.isDestroyed) return;
58373
+ const metaMap = ydoc.getMap("meta");
58374
+ const docxValue = metaMap.get("docx");
58375
+ let docx = [];
58376
+ if (Array.isArray(docxValue)) {
58377
+ docx = [...docxValue];
58378
+ } else if (docxValue && typeof docxValue.toArray === "function") {
58379
+ docx = docxValue.toArray();
58380
+ } else if (docxValue && typeof docxValue[Symbol.iterator] === "function") {
58381
+ docx = Array.from(docxValue);
58382
+ }
58383
+ if (!docx.length && Array.isArray(editor.options.content)) {
58384
+ docx = [...editor.options.content];
58385
+ }
58386
+ const newXml = await editor.exportDocx({ getUpdatedDocs: true });
58387
+ if (!newXml || typeof newXml !== "object") return;
58388
+ let hasChanges = false;
58389
+ Object.keys(newXml).forEach((key2) => {
58390
+ const fileIndex = docx.findIndex((item) => item.name === key2);
58391
+ const existingContent = fileIndex > -1 ? docx[fileIndex].content : null;
58392
+ if (existingContent === newXml[key2]) {
58393
+ return;
58394
+ }
58395
+ hasChanges = true;
58396
+ if (fileIndex > -1) {
58397
+ docx.splice(fileIndex, 1);
58398
+ }
58399
+ docx.push({
58400
+ name: key2,
58401
+ content: newXml[key2]
58402
+ });
58389
58403
  });
58390
- });
58391
- ydoc.transact(
58392
- () => {
58393
- metaMap.set("docx", docx);
58394
- },
58395
- { event: "docx-update", user: editor.options.user }
58396
- );
58404
+ if (hasChanges || !docxValue) {
58405
+ ydoc.transact(
58406
+ () => {
58407
+ metaMap.set("docx", docx);
58408
+ },
58409
+ { event: "docx-update", user: editor.options.user }
58410
+ );
58411
+ }
58412
+ } catch (error) {
58413
+ console.warn("[collaboration] Failed to update Ydoc docx data", error);
58414
+ }
58397
58415
  };
58398
58416
  const STYLE_ISOLATION_CLASS = "sd-editor-scoped";
58399
58417
  const applyStyleIsolationClass = (target) => {
@@ -61830,7 +61848,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
61830
61848
  { default: remarkStringify2 },
61831
61849
  { default: remarkGfm2 }
61832
61850
  ] = await Promise.all([
61833
- Promise.resolve().then(() => indexDD7_Re5),
61851
+ Promise.resolve().then(() => indexD6pPim2h),
61834
61852
  Promise.resolve().then(() => indexDRCvimau),
61835
61853
  Promise.resolve().then(() => indexC_x_N6Uh),
61836
61854
  Promise.resolve().then(() => indexD_sWOSiG),
@@ -62048,7 +62066,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
62048
62066
  * @returns {Object | void} Migration results
62049
62067
  */
62050
62068
  processCollaborationMigrations() {
62051
- console.debug("[checkVersionMigrations] Current editor version", "0.34.6");
62069
+ console.debug("[checkVersionMigrations] Current editor version", "0.34.8");
62052
62070
  if (!this.options.ydoc) return;
62053
62071
  const metaMap = this.options.ydoc.getMap("meta");
62054
62072
  let docVersion = metaMap.get("version");
@@ -118517,7 +118535,7 @@ ${style2}
118517
118535
  this.config.colors = shuffleArray(this.config.colors);
118518
118536
  this.userColorMap = /* @__PURE__ */ new Map();
118519
118537
  this.colorIndex = 0;
118520
- this.version = "0.34.6";
118538
+ this.version = "0.34.8";
118521
118539
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
118522
118540
  this.superdocId = config2.superdocId || v4();
118523
118541
  this.colors = this.config.colors;
@@ -120917,7 +120935,7 @@ ${style2}
120917
120935
  value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
120918
120936
  );
120919
120937
  }
120920
- const indexDD7_Re5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
120938
+ const indexD6pPim2h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
120921
120939
  __proto__: null,
120922
120940
  unified
120923
120941
  }, Symbol.toStringTag, { value: "Module" }));