@harbour-enterprises/superdoc 0.15.7-next.1 → 0.15.7-next.3

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/{super-editor.es-wYUD2FbG.cjs → super-editor.es-BZl0f40H.cjs} +174 -81
  2. package/dist/chunks/{super-editor.es-DK_jRQOE.es.js → super-editor.es-CySS7Yji.es.js} +174 -81
  3. package/dist/core/SuperDoc.d.ts +0 -1
  4. package/dist/core/SuperDoc.d.ts.map +1 -1
  5. package/dist/super-editor/ai-writer.es.js +2 -2
  6. package/dist/super-editor/chunks/{converter-DeJTqjPR.js → converter-Cq8wkRD4.js} +173 -80
  7. package/dist/super-editor/chunks/{docx-zipper-vN19SPa8.js → docx-zipper-CXwmm6eO.js} +1 -1
  8. package/dist/super-editor/chunks/{editor-Dd9HYASE.js → editor-BwaURTck.js} +3 -3
  9. package/dist/super-editor/chunks/{toolbar-D0DQ38PV.js → toolbar-CCVzfOoQ.js} +2 -2
  10. package/dist/super-editor/converter.es.js +1 -1
  11. package/dist/super-editor/core/helpers/list-numbering-helpers.d.ts +1 -1
  12. package/dist/super-editor/core/helpers/list-numbering-helpers.d.ts.map +1 -1
  13. package/dist/super-editor/core/helpers/pasteListHelpers.d.ts +7 -0
  14. package/dist/super-editor/core/helpers/pasteListHelpers.d.ts.map +1 -0
  15. package/dist/super-editor/core/inputRules/docx-paste/docx-paste.d.ts.map +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 +11 -11
  24. package/dist/superdoc.es.js +12 -12
  25. package/dist/superdoc.umd.js +184 -91
  26. package/dist/superdoc.umd.js.map +1 -1
  27. package/package.json +1 -1
@@ -22941,20 +22941,62 @@ const helpers = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
22941
22941
  isTextSelection,
22942
22942
  posToDOMRect
22943
22943
  }, Symbol.toStringTag, { value: "Module" }));
22944
- const generateNewListDefinition = ({ numId, listType, editor }) => {
22944
+ const generateNewListDefinition = ({ numId, listType, level, start, text, fmt, editor }) => {
22945
22945
  if (typeof listType === "string") listType = editor.schema.nodes[listType];
22946
22946
  const definition = listType.name === "orderedList" ? baseOrderedListDef : baseBulletList;
22947
22947
  const numbering = editor.converter.numbering;
22948
22948
  const newNumbering = { ...numbering };
22949
- const newAbstractId = getNewListId(editor, "abstracts");
22950
- const newAbstractDef = {
22951
- ...definition,
22952
- attributes: {
22953
- ...definition.attributes,
22954
- "w:abstractNumId": String(newAbstractId)
22955
- }
22956
- };
22957
- newNumbering.abstracts[newAbstractId] = newAbstractDef;
22949
+ let skipAddingNewAbstract = false;
22950
+ let newAbstractId = getNewListId(editor, "abstracts");
22951
+ let newAbstractDef = JSON.parse(
22952
+ JSON.stringify({
22953
+ ...definition,
22954
+ attributes: {
22955
+ ...definition.attributes,
22956
+ "w:abstractNumId": String(newAbstractId)
22957
+ }
22958
+ })
22959
+ );
22960
+ if (level && start && text && fmt) {
22961
+ if (newNumbering.definitions[numId]) {
22962
+ const abstractId = newNumbering.definitions[numId]?.elements[0]?.attributes["w:val"];
22963
+ newAbstractId = abstractId;
22964
+ const abstract = editor.converter.numbering.abstracts[abstractId];
22965
+ newAbstractDef = { ...abstract };
22966
+ skipAddingNewAbstract = true;
22967
+ }
22968
+ const levelDefIndex = newAbstractDef.elements.findIndex(
22969
+ (el) => el.name === "w:lvl" && el.attributes["w:ilvl"] === level
22970
+ );
22971
+ const levelProps = newAbstractDef.elements[levelDefIndex];
22972
+ const elToFilter = ["w:numFmt", "w:lvlText", "w:start"];
22973
+ const oldElements = levelProps.elements.filter((el) => !elToFilter.includes(el.name));
22974
+ levelProps.elements = [
22975
+ ...oldElements,
22976
+ {
22977
+ type: "element",
22978
+ name: "w:start",
22979
+ attributes: {
22980
+ "w:val": start
22981
+ }
22982
+ },
22983
+ {
22984
+ type: "element",
22985
+ name: "w:numFmt",
22986
+ attributes: {
22987
+ "w:val": fmt
22988
+ }
22989
+ },
22990
+ {
22991
+ type: "element",
22992
+ name: "w:lvlText",
22993
+ attributes: {
22994
+ "w:val": text
22995
+ }
22996
+ }
22997
+ ];
22998
+ }
22999
+ if (!skipAddingNewAbstract) newNumbering.abstracts[newAbstractId] = newAbstractDef;
22958
23000
  const newNumDef = getBasicNumIdTag(numId, newAbstractId);
22959
23001
  newNumbering.definitions[numId] = newNumDef;
22960
23002
  editor.converter.numbering = newNumbering;
@@ -23186,7 +23228,7 @@ const ListHelpers = {
23186
23228
  baseOrderedListDef,
23187
23229
  baseBulletList
23188
23230
  };
23189
- function extractListLevelStyles(cssText, listId, level) {
23231
+ const extractListLevelStyles = (cssText, listId, level) => {
23190
23232
  const pattern = new RegExp(`@list\\s+l${listId}:level${level}\\s*\\{([^}]+)\\}`, "i");
23191
23233
  const match = cssText.match(pattern);
23192
23234
  if (!match) return null;
@@ -23197,14 +23239,58 @@ function extractListLevelStyles(cssText, listId, level) {
23197
23239
  styleMap[key] = value;
23198
23240
  }
23199
23241
  return styleMap;
23200
- }
23242
+ };
23201
23243
  const numDefMap = /* @__PURE__ */ new Map([
23202
- ["decimal", { def: "decimal", abstractNum: 1 }],
23203
- ["alpha-lower", { def: "lowerLetter", abstractNum: 1 }],
23204
- ["alpha-upper", { def: "upperLetter", abstractNum: 1 }],
23205
- ["roman-lower", { def: "lowerRoman", abstractNum: 1 }],
23206
- ["roman-upper", { def: "upperRoman", abstractNum: 1 }],
23207
- ["bullet", { def: "bullet", abstractNum: 0 }]
23244
+ ["decimal", "decimal"],
23245
+ ["alpha-lower", "lowerLetter"],
23246
+ ["alpha-upper", "upperLetter"],
23247
+ ["roman-lower", "lowerRoman"],
23248
+ ["roman-upper", "upperRoman"],
23249
+ ["bullet", "bullet"]
23250
+ ]);
23251
+ const numDefByTypeMap = /* @__PURE__ */ new Map([
23252
+ ["1", "decimal"],
23253
+ ["a", "lowerLetter"],
23254
+ ["A", "upperLetter"],
23255
+ ["I", "upperRoman"],
23256
+ ["i", "lowerRoman"]
23257
+ ]);
23258
+ function getStartNumber(lvlText) {
23259
+ const match = lvlText.match(/^(\d+)/);
23260
+ if (match) return parseInt(match[1], 10);
23261
+ return null;
23262
+ }
23263
+ function letterToNumber(letter) {
23264
+ return letter.toLowerCase().charCodeAt(0) - "a".charCodeAt(0) + 1;
23265
+ }
23266
+ function getStartNumberFromAlpha(lvlText) {
23267
+ const match = lvlText.match(/^([a-zA-Z])/);
23268
+ if (match) return letterToNumber(match[1]);
23269
+ return null;
23270
+ }
23271
+ function romanToNumber(roman) {
23272
+ const map = { I: 1, V: 5, X: 10, L: 50, C: 100, D: 500, M: 1e3 };
23273
+ let num = 0, prev = 0;
23274
+ for (let i = roman.length - 1; i >= 0; i--) {
23275
+ const curr = map[roman[i].toUpperCase()] || 0;
23276
+ if (curr < prev) num -= curr;
23277
+ else num += curr;
23278
+ prev = curr;
23279
+ }
23280
+ return num;
23281
+ }
23282
+ function getStartNumberFromRoman(lvlText) {
23283
+ const match = lvlText.match(/^([ivxlcdmIVXLCDM]+)/);
23284
+ if (match) return romanToNumber(match[1]);
23285
+ return null;
23286
+ }
23287
+ const startHelperMap = /* @__PURE__ */ new Map([
23288
+ ["decimal", getStartNumber],
23289
+ ["lowerLetter", getStartNumberFromAlpha],
23290
+ ["upperLetter", getStartNumberFromAlpha],
23291
+ ["lowerRoman", getStartNumberFromRoman],
23292
+ ["upperRoman", getStartNumberFromRoman],
23293
+ ["bullet", () => 1]
23208
23294
  ]);
23209
23295
  const handleDocxPaste = (html, editor, view, plugin) => {
23210
23296
  const { converter } = editor;
@@ -23213,35 +23299,50 @@ const handleDocxPaste = (html, editor, view, plugin) => {
23213
23299
  cleanedHtml = cleanHtmlUnnecessaryTags(cleanedHtml);
23214
23300
  const tempDiv = document.createElement("div");
23215
23301
  tempDiv.innerHTML = cleanedHtml;
23216
- const paragraphs = tempDiv.querySelectorAll("p");
23217
- paragraphs.forEach((p) => {
23218
- const innerHTML = p.innerHTML;
23219
- if (!innerHTML.includes("<!--[if !supportLists]")) return;
23220
- const styleAttr = p.getAttribute("style") || "";
23302
+ const data = tempDiv.querySelectorAll("p, li");
23303
+ const startMap = {};
23304
+ data.forEach((item) => {
23305
+ let type2;
23306
+ if (item.localName === "li") {
23307
+ type2 = "listItem";
23308
+ } else {
23309
+ const html2 = item.innerHTML;
23310
+ type2 = "p";
23311
+ if (!html2.includes("<!--[if !supportLists]")) return;
23312
+ }
23313
+ const styleAttr = item.getAttribute("style") || "";
23221
23314
  const msoListMatch = styleAttr.match(/mso-list:\s*l(\d+)\s+level(\d+)\s+lfo(\d+)/);
23222
23315
  const css = tempDiv.querySelector("style").innerHTML;
23223
23316
  if (msoListMatch) {
23224
23317
  const [, abstractId, level, numId] = msoListMatch;
23225
23318
  const styles = extractListLevelStyles(css, abstractId, level);
23226
- const msoNumFormat = styles["mso-level-number-format"] || "decimal";
23227
- const abstractOverride = numDefMap.get(msoNumFormat);
23228
- if (!numId) return;
23229
- const abstractDefinition = getListAbstractDefinition(
23230
- abstractOverride ? abstractOverride.abstractNum : numId,
23231
- editor
23232
- );
23233
- let { lvlText, start, numFmt } = getLevelDefinition(abstractDefinition, level);
23234
- if (abstractOverride.abstractNum === 1) lvlText = `%${level}.`;
23235
- p.setAttribute("data-num-id", numId);
23236
- p.setAttribute("data-list-level", level - 1);
23237
- p.setAttribute("data-start", start);
23238
- p.setAttribute("data-lvl-text", styles["mso-level-text"] || lvlText);
23239
- p.setAttribute("data-num-fmt", abstractOverride.def || numFmt);
23319
+ let start, numFmt, lvlText;
23320
+ if (type2 === "listItem") {
23321
+ const listType = item.parentNode.getAttribute("type");
23322
+ const startAttr = item.parentNode.getAttribute("start");
23323
+ if (!startMap[numId]) startMap[numId] = startAttr;
23324
+ start = startMap[numId];
23325
+ numFmt = numDefByTypeMap.get(listType);
23326
+ lvlText = `%${level}.`;
23327
+ } else {
23328
+ const msoNumFormat = styles["mso-level-number-format"] || "decimal";
23329
+ numFmt = numDefMap.get(msoNumFormat);
23330
+ const punc = item.children[0]?.innerText?.slice(-1) || ".";
23331
+ lvlText = numFmt === "bullet" ? normalizeLvlTextChar(styles["mso-level-text"]) : `%${level}${punc}`;
23332
+ const startGetter = startHelperMap.get(numFmt);
23333
+ if (!startMap[numId]) startMap[numId] = startGetter(item.children[0]?.innerText || "1");
23334
+ start = startMap[numId];
23335
+ }
23336
+ item.setAttribute("data-num-id", numId);
23337
+ item.setAttribute("data-list-level", parseInt(level) - 1);
23338
+ item.setAttribute("data-start", start);
23339
+ item.setAttribute("data-lvl-text", lvlText);
23340
+ item.setAttribute("data-num-fmt", numFmt);
23240
23341
  const ptToPxRatio = 1.333;
23241
23342
  const indent = parseInt(styles["margin-left"]) * ptToPxRatio || 0;
23242
- if (indent > 0) p.setAttribute("data-left-indent", indent);
23343
+ if (indent > 0) item.setAttribute("data-left-indent", indent);
23243
23344
  }
23244
- extractAndRemoveConditionalPrefix(p);
23345
+ extractAndRemoveConditionalPrefix(item);
23245
23346
  });
23246
23347
  transformWordLists(tempDiv, editor);
23247
23348
  const doc2 = DOMParser$1.fromSchema(editor.schema).parse(tempDiv);
@@ -23251,37 +23352,29 @@ const handleDocxPaste = (html, editor, view, plugin) => {
23251
23352
  dispatch(view.state.tr.replaceSelectionWith(doc2, true));
23252
23353
  return true;
23253
23354
  };
23254
- const getLevelDefinition = (abstractDefinition, level) => {
23255
- if (!abstractDefinition || !abstractDefinition.elements) return null;
23256
- const levelElement = abstractDefinition.elements.find((el) => {
23257
- return el.name === "w:lvl" && el.attributes?.["w:ilvl"] == level;
23258
- });
23259
- if (!levelElement) return null;
23260
- const { elements } = levelElement;
23261
- const lvlText = elements.find((el) => el.name === "w:lvlText")?.attributes?.["w:val"];
23262
- const start = elements.find((el) => el.name === "w:start")?.attributes?.["w:val"];
23263
- const numFmt = elements.find((el) => el.name === "w:numFmt")?.attributes?.["w:val"];
23264
- return { lvlText, start, numFmt, elements };
23265
- };
23266
- const getListAbstractDefinition = (abstractId, editor) => {
23267
- const { abstracts = {} } = editor?.converter?.numbering;
23268
- return abstracts[abstractId] || null;
23269
- };
23270
23355
  const transformWordLists = (container, editor) => {
23271
- const paragraphs = Array.from(container.querySelectorAll("p[data-num-id]"));
23356
+ const listItems = Array.from(container.querySelectorAll("[data-num-id]"));
23272
23357
  const lists = {};
23273
23358
  const mappedLists = {};
23274
- for (const p of paragraphs) {
23275
- const level = parseInt(p.getAttribute("data-list-level"));
23276
- const numFmt = p.getAttribute("data-num-fmt");
23277
- const start = p.getAttribute("data-start");
23278
- const lvlText = p.getAttribute("data-lvl-text");
23279
- const indent = p.getAttribute("data-left-indent");
23280
- const importedId = p.getAttribute("data-num-id");
23359
+ for (const item of listItems) {
23360
+ const level = parseInt(item.getAttribute("data-list-level"));
23361
+ const numFmt = item.getAttribute("data-num-fmt");
23362
+ const start = item.getAttribute("data-start");
23363
+ const lvlText = item.getAttribute("data-lvl-text");
23364
+ const indent = item.getAttribute("data-left-indent");
23365
+ const importedId = item.getAttribute("data-num-id");
23281
23366
  if (!mappedLists[importedId]) mappedLists[importedId] = ListHelpers.getNewListId(editor);
23282
23367
  const id = mappedLists[importedId];
23283
23368
  const listType = numFmt === "bullet" ? "bulletList" : "orderedList";
23284
- ListHelpers.generateNewListDefinition({ numId: id, listType, editor });
23369
+ ListHelpers.generateNewListDefinition({
23370
+ numId: id,
23371
+ listType,
23372
+ level: level.toString(),
23373
+ start,
23374
+ fmt: numFmt,
23375
+ text: lvlText,
23376
+ editor
23377
+ });
23285
23378
  if (!lists[id]) lists[id] = { levels: {} };
23286
23379
  const currentListByNumId = lists[id];
23287
23380
  if (!currentListByNumId.levels[level]) currentListByNumId.levels[level] = Number(start) || 1;
@@ -23295,28 +23388,28 @@ const transformWordLists = (container, editor) => {
23295
23388
  const path = generateListPath(level, currentListByNumId.levels, start);
23296
23389
  if (!path.length) path.push(currentListByNumId.levels[level]);
23297
23390
  const li = document.createElement("li");
23298
- li.innerHTML = p.innerHTML;
23391
+ li.innerHTML = item.innerHTML;
23299
23392
  li.setAttribute("data-num-id", id);
23300
23393
  li.setAttribute("data-list-level", JSON.stringify(path));
23301
23394
  li.setAttribute("data-level", level);
23302
23395
  li.setAttribute("data-lvl-text", lvlText);
23303
23396
  li.setAttribute("data-num-fmt", numFmt);
23304
23397
  if (indent) li.setAttribute("data-indent", JSON.stringify({ left: indent }));
23305
- if (p.hasAttribute("data-font-family")) {
23306
- li.setAttribute("data-font-family", p.getAttribute("data-font-family"));
23398
+ if (item.hasAttribute("data-font-family")) {
23399
+ li.setAttribute("data-font-family", item.getAttribute("data-font-family"));
23307
23400
  }
23308
- if (p.hasAttribute("data-font-size")) {
23309
- li.setAttribute("data-font-size", p.getAttribute("data-font-size"));
23401
+ if (item.hasAttribute("data-font-size")) {
23402
+ li.setAttribute("data-font-size", item.getAttribute("data-font-size"));
23310
23403
  }
23311
- const parentNode = p.parentNode;
23404
+ const parentNode = item.parentNode;
23312
23405
  let listForLevel;
23313
23406
  const newList = numFmt === "bullet" ? document.createElement("ul") : document.createElement("ol");
23314
23407
  newList.setAttribute("data-list-id", id);
23315
23408
  newList.level = level;
23316
- parentNode.insertBefore(newList, p);
23409
+ parentNode.insertBefore(newList, item);
23317
23410
  listForLevel = newList;
23318
23411
  listForLevel.appendChild(li);
23319
- p.remove();
23412
+ item.remove();
23320
23413
  }
23321
23414
  };
23322
23415
  const generateListPath = (level, levels, start) => {
@@ -23330,8 +23423,8 @@ const generateListPath = (level, levels, start) => {
23330
23423
  }
23331
23424
  return path;
23332
23425
  };
23333
- function extractAndRemoveConditionalPrefix(p) {
23334
- const nodes = Array.from(p.childNodes);
23426
+ function extractAndRemoveConditionalPrefix(item) {
23427
+ const nodes = Array.from(item.childNodes);
23335
23428
  let fontFamily = null;
23336
23429
  let fontSize = null;
23337
23430
  let start = -1, end = -1;
@@ -23352,10 +23445,10 @@ function extractAndRemoveConditionalPrefix(p) {
23352
23445
  }
23353
23446
  }
23354
23447
  for (let i = end; i >= start; i--) {
23355
- p.removeChild(p.childNodes[i]);
23448
+ item.removeChild(item.childNodes[i]);
23356
23449
  }
23357
- if (fontFamily) p.setAttribute("data-font-family", fontFamily);
23358
- if (fontSize) p.setAttribute("data-font-size", fontSize);
23450
+ if (fontFamily) item.setAttribute("data-font-family", fontFamily);
23451
+ if (fontSize) item.setAttribute("data-font-size", fontSize);
23359
23452
  }
23360
23453
  }
23361
23454
  const generateOrderedListIndex = ({ listLevel, lvlText, listNumberingType, customFormat }) => {
@@ -26081,7 +26174,7 @@ function generateTableCellProperties(node2) {
26081
26174
  const cellBordersElement = {
26082
26175
  name: "w:tcBorders",
26083
26176
  elements: Object.entries(borders).map(([key, value]) => {
26084
- if (!value.size) {
26177
+ if (!value.size || value.val === "none") {
26085
26178
  return {
26086
26179
  name: `w:${key}`,
26087
26180
  attributes: {
@@ -28901,7 +28994,7 @@ const _SuperConverter = class _SuperConverter {
28901
28994
  return;
28902
28995
  }
28903
28996
  }
28904
- static updateDocumentVersion(docx = this.convertedXml, version = "0.15.7-next.1") {
28997
+ static updateDocumentVersion(docx = this.convertedXml, version = "0.15.7-next.3") {
28905
28998
  const customLocation = "docProps/custom.xml";
28906
28999
  if (!docx[customLocation]) {
28907
29000
  docx[customLocation] = generateCustomXml();
@@ -29383,7 +29476,7 @@ function storeSuperdocVersion(docx) {
29383
29476
  function generateCustomXml() {
29384
29477
  return DEFAULT_CUSTOM_XML;
29385
29478
  }
29386
- function generateSuperdocVersion(pid = 2, version = "0.15.7-next.1") {
29479
+ function generateSuperdocVersion(pid = 2, version = "0.15.7-next.3") {
29387
29480
  return {
29388
29481
  type: "element",
29389
29482
  name: "property",
@@ -1,4 +1,4 @@
1
- import { H as process$1, at as commonjsGlobal, I as Buffer, au as getDefaultExportFromCjs, av as getContentTypesFromXml, aw as xmljs } from "./converter-DeJTqjPR.js";
1
+ import { H as process$1, at as commonjsGlobal, I as Buffer, au as getDefaultExportFromCjs, av as getContentTypesFromXml, aw as xmljs } from "./converter-Cq8wkRD4.js";
2
2
  function commonjsRequire(path) {
3
3
  throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
4
4
  }
@@ -12,9 +12,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
12
12
  var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _editor, _stateValidators, _requiredNodeTypes, _requiredMarkTypes, _SuperValidator_instances, initializeValidators_fn, collectValidatorRequirements_fn, analyzeDocument_fn, _commandService, _css, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, insertNewFileData_fn, registerPluginByNameIfNotExists_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, createSchema_fn, generatePmData_fn, createDocFromHTML_fn, createView_fn, onCollaborationReady_fn, initComments_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, validateDocumentInit_fn, _ListItemNodeView_instances, init_fn2, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn, _DocumentSectionView_instances, init_fn3, addToolTip_fn;
13
13
  import * as Y from "yjs";
14
14
  import { UndoManager, Item as Item$1, ContentType, Text as Text$1, XmlElement, encodeStateAsUpdate } from "yjs";
15
- import { P as PluginKey, a as Plugin, M as Mapping, c as callOrGet, g as getExtensionConfigField, b as getMarkType, d as getMarksFromSelection, e as getNodeType, f as getSchemaTypeNameByName, S as Schema$1, h as cleanSchemaItem, T as TextSelection, i as canSplit, l as liftTarget, A as AllSelection, j as canJoin, k as joinPoint, N as NodeSelection, m as Selection, r as replaceStep$1, F as Fragment, R as ReplaceAroundStep$1, n as Slice, o as defaultBlockAt$1, p as isTextSelection, q as getMarkRange, s as isMarkActive, t as isNodeActive, u as deleteProps, D as DOMParser$1, v as ReplaceStep, w as NodeRange, x as findWrapping, y as findParentNode, L as ListHelpers, z as isMacOS, B as isIOS, C as DOMSerializer, E as Mark$1, G as dropPoint, H as process$1, I as Buffer2, J as getSchemaTypeByName, K as inputRulesPlugin, O as TrackDeleteMarkName, Q as TrackInsertMarkName, U as v4, V as TrackFormatMarkName, W as comments_module_events, X as findMark, Y as objectIncludes, Z as AddMarkStep, _ as RemoveMarkStep, $ as twipsToLines, a0 as pixelsToTwips, a1 as helpers, a2 as posToDOMRect, a3 as CommandService, a4 as SuperConverter, a5 as createDocument, a6 as EditorState, a7 as hasSomeParentWithClass, a8 as isActive, a9 as unflattenListsInHtml, aa as parseSizeUnit, ab as minMax, ac as getLineHeightValueString, ad as InputRule, ae as kebabCase, af as generateOrderedListIndex, ag as getListItemStyleDefinitions, ah as docxNumberigHelpers, ai as parseIndentElement, aj as combineIndents, ak as getColStyleDeclaration, al as SelectionRange, am as Transform, an as findParentNodeClosestToPos, ao as isInTable$1, ap as createColGroup, aq as generateDocxRandomId, ar as SectionHelpers, as as htmlHandler } from "./converter-DeJTqjPR.js";
15
+ import { P as PluginKey, a as Plugin, M as Mapping, c as callOrGet, g as getExtensionConfigField, b as getMarkType, d as getMarksFromSelection, e as getNodeType, f as getSchemaTypeNameByName, S as Schema$1, h as cleanSchemaItem, T as TextSelection, i as canSplit, l as liftTarget, A as AllSelection, j as canJoin, k as joinPoint, N as NodeSelection, m as Selection, r as replaceStep$1, F as Fragment, R as ReplaceAroundStep$1, n as Slice, o as defaultBlockAt$1, p as isTextSelection, q as getMarkRange, s as isMarkActive, t as isNodeActive, u as deleteProps, D as DOMParser$1, v as ReplaceStep, w as NodeRange, x as findWrapping, y as findParentNode, L as ListHelpers, z as isMacOS, B as isIOS, C as DOMSerializer, E as Mark$1, G as dropPoint, H as process$1, I as Buffer2, J as getSchemaTypeByName, K as inputRulesPlugin, O as TrackDeleteMarkName, Q as TrackInsertMarkName, U as v4, V as TrackFormatMarkName, W as comments_module_events, X as findMark, Y as objectIncludes, Z as AddMarkStep, _ as RemoveMarkStep, $ as twipsToLines, a0 as pixelsToTwips, a1 as helpers, a2 as posToDOMRect, a3 as CommandService, a4 as SuperConverter, a5 as createDocument, a6 as EditorState, a7 as hasSomeParentWithClass, a8 as isActive, a9 as unflattenListsInHtml, aa as parseSizeUnit, ab as minMax, ac as getLineHeightValueString, ad as InputRule, ae as kebabCase, af as generateOrderedListIndex, ag as getListItemStyleDefinitions, ah as docxNumberigHelpers, ai as parseIndentElement, aj as combineIndents, ak as getColStyleDeclaration, al as SelectionRange, am as Transform, an as findParentNodeClosestToPos, ao as isInTable$1, ap as createColGroup, aq as generateDocxRandomId, ar as SectionHelpers, as as htmlHandler } from "./converter-Cq8wkRD4.js";
16
16
  import { ref, computed, createElementBlock, openBlock, withModifiers, Fragment as Fragment$1, renderList, normalizeClass, createCommentVNode, toDisplayString, createElementVNode, createApp } from "vue";
17
- import { D as DocxZipper } from "./docx-zipper-vN19SPa8.js";
17
+ import { D as DocxZipper } from "./docx-zipper-CXwmm6eO.js";
18
18
  var GOOD_LEAF_SIZE = 200;
19
19
  var RopeSequence = function RopeSequence2() {
20
20
  };
@@ -13845,7 +13845,7 @@ const _Editor = class _Editor extends EventEmitter {
13845
13845
  * @returns {Object | void} Migration results
13846
13846
  */
13847
13847
  processCollaborationMigrations() {
13848
- console.debug("[checkVersionMigrations] Current editor version", "0.15.7-next.1");
13848
+ console.debug("[checkVersionMigrations] Current editor version", "0.15.7-next.3");
13849
13849
  if (!this.options.ydoc) return;
13850
13850
  const metaMap = this.options.ydoc.getMap("meta");
13851
13851
  let docVersion = metaMap.get("version");
@@ -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 { H as process$1 } from "./converter-DeJTqjPR.js";
3
- import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-Dd9HYASE.js";
2
+ import { H as process$1 } from "./converter-Cq8wkRD4.js";
3
+ import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-BwaURTck.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 { a4 } from "./chunks/converter-DeJTqjPR.js";
1
+ import { a4 } from "./chunks/converter-Cq8wkRD4.js";
2
2
  export {
3
3
  a4 as SuperConverter
4
4
  };
@@ -1,4 +1,4 @@
1
- export function generateNewListDefinition({ numId, listType, editor }: {
1
+ export function generateNewListDefinition({ numId, listType, level, start, text, fmt, editor }: {
2
2
  numId: number;
3
3
  listType: any;
4
4
  editor: Editor;
@@ -1 +1 @@
1
- {"version":3,"file":"list-numbering-helpers.d.ts","sourceRoot":"","sources":["../../../src/core/helpers/list-numbering-helpers.js"],"names":[],"mappings":"AAmBO,uEALJ;IAAuB,KAAK,EAApB,MAAM;IACS,QAAQ;IACR,MAAM,EAArB,MAAM;CACd,OAiCF;AAUM,+CANI,MAAM,SACN,MAAM,YACN,MAAM,UACN,MAAM,GACJ,MAAM,CAsBlB;AAEM;;;;;;;;;;;;EASN;AASM,qCAHI,MAAM,sBACJ,MAAM,CASlB;AAiBM,6EAVJ;IAAuB,KAAK,EAApB,MAAM;IACS,KAAK,EAApB,MAAM;IACS,MAAM,EAArB,MAAM;CACd,OA+BF;AAUM,8CAJI,MAAM,UACN,MAAM,GACJ,IAAI,CAehB;AAgBM,yGATJ;IAAuB,KAAK,EAApB,MAAM;IACS,OAAO,EAAtB,MAAM;IACS,KAAK,EAApB,MAAM;IACS,MAAM,EAArB,MAAM;IACS,KAAK,EAApB,MAAM;IACQ,SAAS;IACR,WAAW;CAClC,OA4BF;AAaM,wGANJ;IAAuB,KAAK,EAApB,MAAM;IACS,KAAK,EAApB,MAAM;IACS,MAAM,EAArB,MAAM;IACS,WAAW;CAClC,OAiBF;AAWM,wDANJ;IAA8B,QAAQ,EAA9B,MAAM,MAAO;IACE,MAAM,EAArB,MAAM;IACS,IAAI;IACJ,OAAO;CAC9B,YA0BF;AAOM,gDAFM,IAAI,GAAC,IAAI,CAIrB;AAOM,kDAFM,IAAI,GAAC,IAAI,CAIrB;AAQM,4DAHI,MAAM,GACJ,IAAI,CAUhB;AAWM,+DANJ;IAAuB,EAAE;IACF,IAAI,EAAnB,MAAM;IACS,EAAE,EAAjB,MAAM;IACO,OAAO,EAApB,IAAI;CACZ,GAAU,IAAI,CAIhB;AAYM,+FAPJ;IAAuB,KAAK;IACL,EAAE;IACJ,WAAW,EAAxB,IAAI;IACW,WAAW,EAA1B,MAAM;IACS,SAAS,EAAxB,MAAM;CACd,GAAU,OAAO,CAmBnB;AAWM,oDAPI,MAAM,aACN,MAAM,YACN,IAAI,2BAmBd;AAWM,4FANJ;IAAuB,OAAO,EAAtB,MAAM;IACS,KAAK,EAApB,MAAM;IACS,KAAK,EAApB,MAAM;IACS,MAAM,EAArB,MAAM;CACd,OA8BF;AASM,kFAQN"}
1
+ {"version":3,"file":"list-numbering-helpers.d.ts","sourceRoot":"","sources":["../../../src/core/helpers/list-numbering-helpers.js"],"names":[],"mappings":"AAmBO,gGALJ;IAAuB,KAAK,EAApB,MAAM;IACS,QAAQ;IACR,MAAM,EAArB,MAAM;CACd,OA+EF;AAUM,+CANI,MAAM,SACN,MAAM,YACN,MAAM,UACN,MAAM,GACJ,MAAM,CAsBlB;AAEM;;;;;;;;;;;;EASN;AASM,qCAHI,MAAM,sBACJ,MAAM,CASlB;AAiBM,6EAVJ;IAAuB,KAAK,EAApB,MAAM;IACS,KAAK,EAApB,MAAM;IACS,MAAM,EAArB,MAAM;CACd,OA+BF;AAUM,8CAJI,MAAM,UACN,MAAM,GACJ,IAAI,CAehB;AAgBM,yGATJ;IAAuB,KAAK,EAApB,MAAM;IACS,OAAO,EAAtB,MAAM;IACS,KAAK,EAApB,MAAM;IACS,MAAM,EAArB,MAAM;IACS,KAAK,EAApB,MAAM;IACQ,SAAS;IACR,WAAW;CAClC,OA4BF;AAaM,wGANJ;IAAuB,KAAK,EAApB,MAAM;IACS,KAAK,EAApB,MAAM;IACS,MAAM,EAArB,MAAM;IACS,WAAW;CAClC,OAiBF;AAWM,wDANJ;IAA8B,QAAQ,EAA9B,MAAM,MAAO;IACE,MAAM,EAArB,MAAM;IACS,IAAI;IACJ,OAAO;CAC9B,YA0BF;AAOM,gDAFM,IAAI,GAAC,IAAI,CAIrB;AAOM,kDAFM,IAAI,GAAC,IAAI,CAIrB;AAQM,4DAHI,MAAM,GACJ,IAAI,CAUhB;AAWM,+DANJ;IAAuB,EAAE;IACF,IAAI,EAAnB,MAAM;IACS,EAAE,EAAjB,MAAM;IACO,OAAO,EAApB,IAAI;CACZ,GAAU,IAAI,CAIhB;AAYM,+FAPJ;IAAuB,KAAK;IACL,EAAE;IACJ,WAAW,EAAxB,IAAI;IACW,WAAW,EAA1B,MAAM;IACS,SAAS,EAAxB,MAAM;CACd,GAAU,OAAO,CAmBnB;AAWM,oDAPI,MAAM,aACN,MAAM,YACN,IAAI,2BAmBd;AAWM,4FANJ;IAAuB,OAAO,EAAtB,MAAM;IACS,KAAK,EAApB,MAAM;IACS,KAAK,EAApB,MAAM;IACS,MAAM,EAArB,MAAM;CACd,OA8BF;AASM,kFAQN"}
@@ -0,0 +1,7 @@
1
+ export function extractListLevelStyles(cssText: any, listId: any, level: any): {};
2
+ export const numDefMap: Map<string, string>;
3
+ export const numDefByTypeMap: Map<string, string>;
4
+ export const startHelperMap: Map<string, typeof getStartNumber>;
5
+ declare function getStartNumber(lvlText: any): number;
6
+ export {};
7
+ //# sourceMappingURL=pasteListHelpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pasteListHelpers.d.ts","sourceRoot":"","sources":["../../../src/core/helpers/pasteListHelpers.js"],"names":[],"mappings":"AAAO,kFAiBN;AAED,4CAOG;AAEH,kDAMG;AAqCH,gEAOG;AA1CH,sDAIC"}
@@ -1 +1 @@
1
- {"version":3,"file":"docx-paste.d.ts","sourceRoot":"","sources":["../../../../src/core/inputRules/docx-paste/docx-paste.js"],"names":[],"mappings":"AAyCO,sCANI,MAAM,UACN,MAAM,mCAqEhB;AA8FM,6EAUN"}
1
+ {"version":3,"file":"docx-paste.d.ts","sourceRoot":"","sources":["../../../../src/core/inputRules/docx-paste/docx-paste.js"],"names":[],"mappings":"AAeO,sCANI,MAAM,UACN,MAAM,mCAkFhB;AAiFM,6EAUN"}
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-DeJTqjPR.js";
2
- import { D } from "./chunks/docx-zipper-vN19SPa8.js";
1
+ import "./chunks/converter-Cq8wkRD4.js";
2
+ import { D } from "./chunks/docx-zipper-CXwmm6eO.js";
3
3
  export {
4
4
  D as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E } from "./chunks/editor-Dd9HYASE.js";
2
- import "./chunks/converter-DeJTqjPR.js";
3
- import "./chunks/docx-zipper-vN19SPa8.js";
1
+ import { E } from "./chunks/editor-BwaURTck.js";
2
+ import "./chunks/converter-Cq8wkRD4.js";
3
+ import "./chunks/docx-zipper-CXwmm6eO.js";
4
4
  export {
5
5
  E as Editor
6
6
  };
@@ -1,4 +1,4 @@
1
- import { J as JSZip } from "./chunks/docx-zipper-vN19SPa8.js";
1
+ import { J as JSZip } from "./chunks/docx-zipper-CXwmm6eO.js";
2
2
  async function createZip(blobs, fileNames) {
3
3
  const zip = new JSZip();
4
4
  blobs.forEach((blob, index) => {
@@ -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, runCommandWithArgumentOnly_fn;
12
- import { au as getDefaultExportFromCjs, U as v4, T as TextSelection$1, q as getMarkRange, ax as vClickOutside, y as findParentNode, ay as getActiveFormatting, ao as isInTable, az as readFromClipboard, aA as handleClipboardPaste, a as Plugin } from "./chunks/converter-DeJTqjPR.js";
13
- import { ar, a4, d, a1 } from "./chunks/converter-DeJTqjPR.js";
14
- import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, s as startImageUpload, y as yUndoPluginKey, d as undoDepth, r as redoDepth, S as SlashMenuPluginKey, E as Editor, e as getStarterExtensions, P as Placeholder, f as getRichTextExtensions, M as Mark, h as Extension, A as Attribute, N as Node } from "./chunks/editor-Dd9HYASE.js";
15
- import { k, C, T, i, l, j } from "./chunks/editor-Dd9HYASE.js";
12
+ import { au as getDefaultExportFromCjs, U as v4, T as TextSelection$1, q as getMarkRange, ax as vClickOutside, y as findParentNode, ay as getActiveFormatting, ao as isInTable, az as readFromClipboard, aA as handleClipboardPaste, a as Plugin } from "./chunks/converter-Cq8wkRD4.js";
13
+ import { ar, a4, d, a1 } from "./chunks/converter-Cq8wkRD4.js";
14
+ import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, s as startImageUpload, y as yUndoPluginKey, d as undoDepth, r as redoDepth, S as SlashMenuPluginKey, E as Editor, e as getStarterExtensions, P as Placeholder, f as getRichTextExtensions, M as Mark, h as Extension, A as Attribute, N as Node } from "./chunks/editor-BwaURTck.js";
15
+ import { k, C, T, i, l, j } from "./chunks/editor-BwaURTck.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, reactive, onUnmounted, renderSlot, shallowRef, createBlock, withCtx, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
17
- import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, m as magicWandIcon, p as plusIconSvg, a as trashIconSvg, l as linkIconSvg, b as tableIconSvg, c as scissorsIconSvg, d as copyIconSvg, e as pasteIconSvg, f as borderNoneIconSvg, g as arrowsToDotIconSvg, h as arrowsLeftRightIconSvg, w as wrenchIconSvg, N as NSkeleton } from "./chunks/toolbar-D0DQ38PV.js";
17
+ import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, m as magicWandIcon, p as plusIconSvg, a as trashIconSvg, l as linkIconSvg, b as tableIconSvg, c as scissorsIconSvg, d as copyIconSvg, e as pasteIconSvg, f as borderNoneIconSvg, g as arrowsToDotIconSvg, h as arrowsLeftRightIconSvg, w as wrenchIconSvg, N as NSkeleton } from "./chunks/toolbar-CCVzfOoQ.js";
18
18
  import AIWriter from "./ai-writer.es.js";
19
- import { D } from "./chunks/docx-zipper-vN19SPa8.js";
19
+ import { D } from "./chunks/docx-zipper-CXwmm6eO.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-D0DQ38PV.js";
3
- import "./chunks/editor-Dd9HYASE.js";
2
+ import { T } from "./chunks/toolbar-CCVzfOoQ.js";
3
+ import "./chunks/editor-BwaURTck.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-wYUD2FbG.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-BZl0f40H.cjs");
4
4
  require("./chunks/vue-CfKg12kH.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, q } from "./chunks/super-editor.es-DK_jRQOE.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, q } from "./chunks/super-editor.es-CySS7Yji.es.js";
2
2
  import "./chunks/vue-B_OPNNfX.es.js";
3
3
  export {
4
4
  A as AIWriter,
package/dist/superdoc.cjs CHANGED
@@ -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-wYUD2FbG.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-BZl0f40H.cjs");
4
4
  const vue = require("./chunks/vue-CfKg12kH.cjs");
5
5
  const jszip = require("./chunks/jszip-DWfnW2xV.cjs");
6
6
  const blankDocx = require("./chunks/blank-docx-CPqX9RF5.cjs");
@@ -47847,8 +47847,8 @@ class SuperDoc extends eventemitter3.EventEmitter {
47847
47847
  this.config.colors = shuffleArray(this.config.colors);
47848
47848
  this.userColorMap = /* @__PURE__ */ new Map();
47849
47849
  this.colorIndex = 0;
47850
- this.version = "0.15.7-next.1";
47851
- console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
47850
+ this.version = "0.15.7-next.3";
47851
+ this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
47852
47852
  this.superdocId = config.superdocId || uuid.v4();
47853
47853
  this.colors = this.config.colors;
47854
47854
  this.#initDocuments();
@@ -48065,8 +48065,8 @@ class SuperDoc extends eventemitter3.EventEmitter {
48065
48065
  broadcastSidebarToggle(isOpened) {
48066
48066
  this.emit("sidebar-toggle", isOpened);
48067
48067
  }
48068
- log(...args) {
48069
- console.debug("🦋 🦸‍♀️ [superdoc]", ...args);
48068
+ #log(...args) {
48069
+ (console.debug ? console.debug : console.log)("🦋 🦸‍♀️ [superdoc]", ...args);
48070
48070
  }
48071
48071
  /**
48072
48072
  * Set the active editor
@@ -48137,7 +48137,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
48137
48137
  */
48138
48138
  addCommentsList(element) {
48139
48139
  if (!this.config?.modules?.comments || this.config.role === "viewer") return;
48140
- console.debug("🦋 [superdoc] Adding comments list to:", element);
48140
+ this.#log("🦋 [superdoc] Adding comments list to:", element);
48141
48141
  if (element) this.config.modules.comments.element = element;
48142
48142
  this.commentsList = new SuperComments(this.config.modules?.comments, this);
48143
48143
  if (this.config.onCommentsListChange) this.config.onCommentsListChange({ isRendered: true });
@@ -48277,7 +48277,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
48277
48277
  lockSuperdoc(isLocked = false, lockedBy) {
48278
48278
  this.isLocked = isLocked;
48279
48279
  this.lockedBy = lockedBy;
48280
- console.debug("🦋 [superdoc] Locking superdoc:", isLocked, lockedBy, "\n\n\n");
48280
+ this.#log("🦋 [superdoc] Locking superdoc:", isLocked, lockedBy, "\n\n\n");
48281
48281
  this.emit("locked", { isLocked, lockedBy });
48282
48282
  }
48283
48283
  /**
@@ -48347,7 +48347,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
48347
48347
  * @returns {Promise<void>} Resolves when all documents have saved
48348
48348
  */
48349
48349
  async #triggerCollaborationSaves() {
48350
- console.debug("🦋 [superdoc] Triggering collaboration saves");
48350
+ this.#log("🦋 [superdoc] Triggering collaboration saves");
48351
48351
  return new Promise((resolve, reject) => {
48352
48352
  this.superdocStore.documents.forEach((doc) => {
48353
48353
  this.pendingCollaborationSaves = 0;
@@ -48376,9 +48376,9 @@ class SuperDoc extends eventemitter3.EventEmitter {
48376
48376
  this.#triggerCollaborationSaves()
48377
48377
  // this.exportEditorsToDOCX(),
48378
48378
  ];
48379
- console.debug("🦋 [superdoc] Saving superdoc");
48379
+ this.#log("🦋 [superdoc] Saving superdoc");
48380
48380
  const result = await Promise.all(savePromises);
48381
- console.debug("🦋 [superdoc] Save complete:", result);
48381
+ this.#log("🦋 [superdoc] Save complete:", result);
48382
48382
  return result;
48383
48383
  }
48384
48384
  /**
@@ -48389,7 +48389,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
48389
48389
  if (!this.app) {
48390
48390
  return;
48391
48391
  }
48392
- this.log("[superdoc] Unmounting app");
48392
+ this.#log("[superdoc] Unmounting app");
48393
48393
  this.config.socket?.cancelWebsocketRetry();
48394
48394
  this.config.socket?.disconnect();
48395
48395
  this.config.socket?.destroy();