@harbour-enterprises/superdoc 0.12.16 → 0.12.18

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-BB3W_xzz.es.js → super-editor.es-DIiFOcde.es.js} +33 -13
  2. package/dist/chunks/{super-editor.es-C1sOUR_S.cjs → super-editor.es-DK2NC1Gl.cjs} +33 -13
  3. package/dist/core/SuperDoc.d.ts +10 -0
  4. package/dist/core/SuperDoc.d.ts.map +1 -1
  5. package/dist/style.css +28 -28
  6. package/dist/super-editor/ai-writer.es.js +2 -2
  7. package/dist/super-editor/chunks/{converter-CaX3dOo9.js → converter-BbPgOxa0.js} +28 -10
  8. package/dist/super-editor/chunks/{docx-zipper-C21KiTVk.js → docx-zipper-Ce0B_FTd.js} +1 -1
  9. package/dist/super-editor/chunks/{editor-Ctzz2gCC.js → editor-CU4NcQRP.js} +7 -5
  10. package/dist/super-editor/chunks/{toolbar-C0EZHJoI.js → toolbar-BhjcMYDy.js} +2 -2
  11. package/dist/super-editor/converter.es.js +1 -1
  12. package/dist/super-editor/core/Editor.d.ts +10 -4
  13. package/dist/super-editor/core/Editor.d.ts.map +1 -1
  14. package/dist/super-editor/core/super-converter/exporter.d.ts.map +1 -1
  15. package/dist/super-editor/core/super-converter/v2/importer/listImporter.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 +5 -4
  24. package/dist/superdoc.es.js +6 -5
  25. package/dist/superdoc.umd.js +37 -16
  26. package/dist/superdoc.umd.js.map +1 -1
  27. package/package.json +1 -1
@@ -71,7 +71,8 @@
71
71
  * @property {Function} [onException] - Called when an exception occurs
72
72
  * @property {Function} [handleImageUpload] - Handler for image uploads
73
73
  * @property {Object} [telemetry] - Telemetry configuration
74
- * @property {boolean} [htmlOverride] - Whether to override content with provided html
74
+ * @property {boolean} [suppressDefaultDocxStyles] - Prevent default styles from being applied in docx mode
75
+ * @property {boolean} [jsonOverride] - Whether to override content with provided json
75
76
  * @property {string} [html] - HTML content to initialize the editor with
76
77
  */
77
78
  /**
@@ -182,7 +183,8 @@ export class Editor extends EventEmitter {
182
183
  numbering: {};
183
184
  isHeaderOrFooter: boolean;
184
185
  lastSelection: any;
185
- htmlOverride: boolean;
186
+ suppressDefaultDocxStyles: boolean;
187
+ jsonOverride: boolean;
186
188
  onBeforeCreate: () => any;
187
189
  onCreate: () => any;
188
190
  onUpdate: () => any;
@@ -723,9 +725,13 @@ export type EditorOptions = {
723
725
  */
724
726
  telemetry?: any;
725
727
  /**
726
- * - Whether to override content with provided html
728
+ * - Prevent default styles from being applied in docx mode
727
729
  */
728
- htmlOverride?: boolean;
730
+ suppressDefaultDocxStyles?: boolean;
731
+ /**
732
+ * - Whether to override content with provided json
733
+ */
734
+ jsonOverride?: boolean;
729
735
  /**
730
736
  * - HTML content to initialize the editor with
731
737
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Editor.d.ts","sourceRoot":"","sources":["../../src/core/Editor.js"],"names":[],"mappings":"AA6BA;;;;GAIG;AAEH;;;;;GAKG;AACH;;;;;EAKE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AAEH;;;;GAIG;AACH;IAoqBE;;;;;;;;;;;;OAYG;IACH,+BARW,IAAI,GAAC,IAAI,GAAC,MAAM,WAChB,OAAO,GACL,OAAO,OAAO,CAc1B;IAED;;;;;OAKG;IACH,qCAFa,MAAM,CAKlB;IAED;;;;;;OAMG;IACH,gDAHW,MAAM,OAMhB;IAupBD;;;;;OAKG;IACH,2CAFa,OAAO,CAOnB;IA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AAO;;;;WACP,MAAM;;6BApGS,mBAAmB"}
@@ -1 +1 @@
1
- {"version":3,"file":"exporter.d.ts","sourceRoot":"","sources":["../../../src/core/super-converter/exporter.js"],"names":[],"mappings":"AAwBA;;;;;GAKG;AAEH;;;;;;;;;;;;GAYG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;;;GAKG;AACH,2CAHW,YAAY,GACV,YAAY,CAsCxB;AA+DD;;;;;GAKG;AACH,qDAFa,YAAY,CAyBxB;AAk3DD;;;;;;;;;EAcC;AA+FD;IACE,4BAEC;IADC,eAA0B;IAG5B,gDAGC;;CAsEF;;;;;;;;;;;;;mBAptEa,KAAQ;;;;;;UAKR,MAAM;;;;aACN,KAAK,CAAC,UAAU,CAAC;;;;;;;;;;;;;UAMjB,MAAM;;;;cACN,KAAK,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;UAgBnB,MAAM"}
1
+ {"version":3,"file":"exporter.d.ts","sourceRoot":"","sources":["../../../src/core/super-converter/exporter.js"],"names":[],"mappings":"AAwBA;;;;;GAKG;AAEH;;;;;;;;;;;;GAYG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;;;GAKG;AACH,2CAHW,YAAY,GACV,YAAY,CAsCxB;AA+DD;;;;;GAKG;AACH,qDAFa,YAAY,CAyBxB;AA84DD;;;;;;;;;EAcC;AA+FD;IACE,4BAEC;IADC,eAA0B;IAG5B,gDAGC;;CAsEF;;;;;;;;;;;;;mBAhvEa,KAAQ;;;;;;UAKR,MAAM;;;;aACN,KAAK,CAAC,UAAU,CAAC;;;;;;;;;;;;;UAMjB,MAAM;;;;cACN,KAAK,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;UAgBnB,MAAM"}
@@ -1 +1 @@
1
- {"version":3,"file":"listImporter.d.ts","sourceRoot":"","sources":["../../../../../src/core/super-converter/v2/importer/listImporter.js"],"names":[],"mappings":"AA2UA;;;;;GAKG;AACH,kCAHW,OAAO,cACL,OAAO,CAkBnB;AAkND;;;;;;;GAOG;AACH,6DAJW,GAAG,QACH,UAAU;;;;;;;;;;;;;;;;;;;;EA8CpB;AA/lBD;;GAEG;AACH,iCAwCE;AAEF;;GAEG;AACH,oCAGE"}
1
+ {"version":3,"file":"listImporter.d.ts","sourceRoot":"","sources":["../../../../../src/core/super-converter/v2/importer/listImporter.js"],"names":[],"mappings":"AAmUA;;;;;GAKG;AACH,kCAHW,OAAO,cACL,OAAO,CAkBnB;AAkND;;;;;;;GAOG;AACH,6DAJW,GAAG,QACH,UAAU;;;;;;;;;;;;;;;;;;;;EA8CpB;AAvlBD;;GAEG;AACH,iCAwCE;AAEF;;GAEG;AACH,oCAGE"}
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-CaX3dOo9.js";
2
- import { D } from "./chunks/docx-zipper-C21KiTVk.js";
1
+ import "./chunks/converter-BbPgOxa0.js";
2
+ import { D } from "./chunks/docx-zipper-Ce0B_FTd.js";
3
3
  export {
4
4
  D as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E } from "./chunks/editor-Ctzz2gCC.js";
2
- import "./chunks/converter-CaX3dOo9.js";
3
- import "./chunks/docx-zipper-C21KiTVk.js";
1
+ import { E } from "./chunks/editor-CU4NcQRP.js";
2
+ import "./chunks/converter-BbPgOxa0.js";
3
+ import "./chunks/docx-zipper-Ce0B_FTd.js";
4
4
  export {
5
5
  E as Editor
6
6
  };
@@ -1,4 +1,4 @@
1
- import { J as JSZip } from "./chunks/docx-zipper-C21KiTVk.js";
1
+ import { J as JSZip } from "./chunks/docx-zipper-Ce0B_FTd.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 { _ as _export_sfc, a as getQuickFormatList, b as generateLinkedStyleString, I as ImagePlaceholderPluginKey, f as findPlaceholder, c as findParentNode, d as getActiveFormatting, i as isInTable, u as undoDepth, r as redoDepth, E as Editor, e as getStarterExtensions, P as Placeholder, h as getRichTextExtensions, M as Mark, j as Extension, A as Attribute, N as Node } from "./chunks/editor-Ctzz2gCC.js";
13
- import { C, T, l, n, k, m } from "./chunks/editor-Ctzz2gCC.js";
14
- import { a2 as getDefaultExportFromCjs, E as v4, a5 as vClickOutside, T as TextSelection, a as Plugin } from "./chunks/converter-CaX3dOo9.js";
15
- import { O } from "./chunks/converter-CaX3dOo9.js";
12
+ import { _ as _export_sfc, a as getQuickFormatList, b as generateLinkedStyleString, I as ImagePlaceholderPluginKey, f as findPlaceholder, c as findParentNode, d as getActiveFormatting, i as isInTable, u as undoDepth, r as redoDepth, E as Editor, e as getStarterExtensions, P as Placeholder, h as getRichTextExtensions, M as Mark, j as Extension, A as Attribute, N as Node } from "./chunks/editor-CU4NcQRP.js";
13
+ import { C, T, l, n, k, m } from "./chunks/editor-CU4NcQRP.js";
14
+ import { a2 as getDefaultExportFromCjs, E as v4, a5 as vClickOutside, T as TextSelection, a as Plugin } from "./chunks/converter-BbPgOxa0.js";
15
+ import { O } from "./chunks/converter-BbPgOxa0.js";
16
16
  import { ref, createElementBlock, openBlock, createElementVNode, unref, getCurrentInstance, computed, watch, onMounted, createCommentVNode, withDirectives, withKeys, normalizeClass, withModifiers, vModelText, createTextVNode, toDisplayString, Fragment, renderList, normalizeStyle, createVNode, h, createApp, reactive, onUnmounted, shallowRef, onBeforeUnmount, createBlock } from "vue";
17
- import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, N as NSkeleton } from "./chunks/toolbar-C0EZHJoI.js";
17
+ import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, N as NSkeleton } from "./chunks/toolbar-BhjcMYDy.js";
18
18
  import AIWriter from "./ai-writer.es.js";
19
- import { D } from "./chunks/docx-zipper-C21KiTVk.js";
19
+ import { D } from "./chunks/docx-zipper-Ce0B_FTd.js";
20
20
  import { createZip } from "./file-zipper.es.js";
21
21
  var eventemitter3 = { exports: {} };
22
22
  (function(module) {
@@ -1,6 +1,6 @@
1
1
  import "vue";
2
- import { T } from "./chunks/toolbar-C0EZHJoI.js";
3
- import "./chunks/editor-Ctzz2gCC.js";
2
+ import { T } from "./chunks/toolbar-BhjcMYDy.js";
3
+ import "./chunks/editor-CU4NcQRP.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-C1sOUR_S.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-DK2NC1Gl.cjs");
4
4
  require("./chunks/vue-DPZkajuO.cjs");
5
5
  exports.AIWriter = superEditor_es.AIWriter;
6
6
  exports.BasicUpload = superEditor_es._sfc_main$1;
@@ -1,4 +1,4 @@
1
- import { A, _, C, D, E, a, S, b, c, d, T, e, f, i, g, h, j, k, l, m, n } from "./chunks/super-editor.es-BB3W_xzz.es.js";
1
+ import { A, _, C, D, E, a, S, b, c, d, T, e, f, i, g, h, j, k, l, m, n } from "./chunks/super-editor.es-DIiFOcde.es.js";
2
2
  import "./chunks/vue-IIIZMHTg.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-C1sOUR_S.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-DK2NC1Gl.cjs");
4
4
  const vue = require("./chunks/vue-DPZkajuO.cjs");
5
5
  const jszip = require("./chunks/jszip-Bwu_om3F.cjs");
6
6
  const blankDocx = require("./chunks/blank-docx-CPqX9RF5.cjs");
@@ -46132,7 +46132,8 @@ const _sfc_main = {
46132
46132
  handleImageUpload: proxy.$superdoc.config.handleImageUpload,
46133
46133
  telemetry: proxy.$superdoc.telemetry,
46134
46134
  externalExtensions: proxy.$superdoc.config.editorExtensions || [],
46135
- htmlOverride: proxy.$superdoc.config.htmlOverride
46135
+ suppressDefaultDocxStyles: proxy.$superdoc.config.suppressDefaultDocxStyles,
46136
+ jsonOverride: proxy.$superdoc.config.jsonOverride
46136
46137
  };
46137
46138
  return options;
46138
46139
  };
@@ -46461,7 +46462,7 @@ const _sfc_main = {
46461
46462
  };
46462
46463
  }
46463
46464
  };
46464
- const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-52a65823"]]);
46465
+ const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e620aa2b"]]);
46465
46466
  const createSuperdocVueApp = () => {
46466
46467
  const app = vue.createApp(App);
46467
46468
  const pinia = createPinia();
@@ -46558,7 +46559,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
46558
46559
  this.config.colors = shuffleArray(this.config.colors);
46559
46560
  this.userColorMap = /* @__PURE__ */ new Map();
46560
46561
  this.colorIndex = 0;
46561
- this.version = "0.12.16";
46562
+ this.version = "0.12.18";
46562
46563
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
46563
46564
  this.superdocId = config.superdocId || uuid.v4();
46564
46565
  this.colors = this.config.colors;
@@ -1,5 +1,5 @@
1
- import { n as index$1, C as CommentsPluginKey, e as TrackChangesBasePluginKey, E as Editor, k as getRichTextExtensions, c as SuperInput, A as AIWriter, b as SuperEditor, d as SuperToolbar, f as createZip } from "./chunks/super-editor.es-BB3W_xzz.es.js";
2
- import { S, i, m } from "./chunks/super-editor.es-BB3W_xzz.es.js";
1
+ import { n as index$1, C as CommentsPluginKey, e as TrackChangesBasePluginKey, E as Editor, k as getRichTextExtensions, c as SuperInput, A as AIWriter, b as SuperEditor, d as SuperToolbar, f as createZip } from "./chunks/super-editor.es-DIiFOcde.es.js";
2
+ import { S, i, m } from "./chunks/super-editor.es-DIiFOcde.es.js";
3
3
  import { Y as effectScope, r as ref, Z as markRaw, p as process$1, _ as toRaw, a as computed, $ as isRef, a0 as isReactive, D as toRef, i as inject, q as getCurrentInstance, l as watch, y as unref, a1 as hasInjectionContext, N as reactive, u as nextTick, a2 as getCurrentScope, a3 as onScopeDispose, a4 as toRefs, g as global$1, K as shallowRef, O as readonly, j as onMounted, k as onBeforeUnmount, h as onBeforeMount, U as onActivated, s as onDeactivated, A as createTextVNode, F as Fragment, R as Comment, m as defineComponent, E as provide, I as withDirectives, C as h, V as Teleport, S as renderSlot, W as isVNode, J as watchEffect, P as Transition, G as mergeProps, Q as vShow, H as cloneVNode, T as Text, b as createElementBlock, o as openBlock, t as toDisplayString, x as createVNode, z as withCtx, f as createBaseVNode, B as normalizeStyle, e as createCommentVNode, v as createBlock, w as withModifiers, n as normalizeClass, a5 as resolveDirective, d as renderList, c as createApp, X as onUnmounted, a6 as resolveDynamicComponent } from "./chunks/vue-IIIZMHTg.es.js";
4
4
  import { B as Buffer$2 } from "./chunks/jszip-BmWWPxfF.es.js";
5
5
  import { B as BlankDOCX } from "./chunks/blank-docx-iwdyG9RH.es.js";
@@ -46131,7 +46131,8 @@ const _sfc_main = {
46131
46131
  handleImageUpload: proxy.$superdoc.config.handleImageUpload,
46132
46132
  telemetry: proxy.$superdoc.telemetry,
46133
46133
  externalExtensions: proxy.$superdoc.config.editorExtensions || [],
46134
- htmlOverride: proxy.$superdoc.config.htmlOverride
46134
+ suppressDefaultDocxStyles: proxy.$superdoc.config.suppressDefaultDocxStyles,
46135
+ jsonOverride: proxy.$superdoc.config.jsonOverride
46135
46136
  };
46136
46137
  return options;
46137
46138
  };
@@ -46460,7 +46461,7 @@ const _sfc_main = {
46460
46461
  };
46461
46462
  }
46462
46463
  };
46463
- const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-52a65823"]]);
46464
+ const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e620aa2b"]]);
46464
46465
  const createSuperdocVueApp = () => {
46465
46466
  const app = createApp(App);
46466
46467
  const pinia = createPinia();
@@ -46557,7 +46558,7 @@ class SuperDoc extends EventEmitter {
46557
46558
  this.config.colors = shuffleArray(this.config.colors);
46558
46559
  this.userColorMap = /* @__PURE__ */ new Map();
46559
46560
  this.colorIndex = 0;
46560
- this.version = "0.12.16";
46561
+ this.version = "0.12.18";
46561
46562
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
46562
46563
  this.superdocId = config.superdocId || v4();
46563
46564
  this.colors = this.config.colors;
@@ -26658,9 +26658,15 @@
26658
26658
  if (!outputNode.elements) {
26659
26659
  outputNode.elements = [];
26660
26660
  }
26661
+ if (Array.isArray(outputNode)) {
26662
+ const mapped = [];
26663
+ outputNode.forEach((el) => mapped.push(...el.elements, { name: "w:br", type: "element" }));
26664
+ mapped.unshift(carbonCopy(pPr));
26665
+ return listNodes.push({ name: "w:p", elements: mapped });
26666
+ }
26661
26667
  const propsElementIndex = outputNode.elements.findIndex((e) => e.name === "w:pPr");
26662
26668
  const content2 = outputNode.elements.filter((e) => e.name !== "w:pPr");
26663
- if (!content2.length) {
26669
+ if (!content2.length && !Array.isArray(outputNode)) {
26664
26670
  const elements = contentNode.attrs.paragraphProperties ? [contentNode.attrs.paragraphProperties] : [];
26665
26671
  const spacer = {
26666
26672
  name: "w:p",
@@ -26669,6 +26675,23 @@
26669
26675
  };
26670
26676
  return listNodes.push(spacer);
26671
26677
  }
26678
+ outputNode.elements = outputNode.elements.map((el, index22) => {
26679
+ if (el.name === "w:sdt") {
26680
+ const contentIndex = el.elements.findIndex((e) => e.name === "w:sdtContent");
26681
+ const content3 = el.elements[contentIndex];
26682
+ const innerContent = content3.elements[0];
26683
+ if (innerContent.name === "w:p") {
26684
+ content3.elements = innerContent.elements;
26685
+ }
26686
+ return {
26687
+ name: "w:r",
26688
+ type: "element",
26689
+ elements: [el]
26690
+ };
26691
+ } else {
26692
+ return el;
26693
+ }
26694
+ });
26672
26695
  const { attributes: generalAttributes } = attrs;
26673
26696
  const { originalInlineRunProps } = generalAttributes || {};
26674
26697
  if (originalInlineRunProps) pPr.elements.push(originalInlineRunProps);
@@ -28836,12 +28859,6 @@
28836
28859
  let lastNestedListLevel = 0;
28837
28860
  for (let [index2, item] of listItems.entries()) {
28838
28861
  if (item.seen) continue;
28839
- if (item.elements && !hasTextNode(item.elements)) {
28840
- const n = handleStandardNode2({ ...params2, nodes: [item] }).nodes[0];
28841
- if (n) parsedListItems[parsedListItems.length - 1]?.content.push(n);
28842
- item.seen = true;
28843
- continue;
28844
- }
28845
28862
  const { attributes, elements, marks = [] } = parseProperties(item);
28846
28863
  const matchedStyle = getStyleTagFromStyleId(styleId, docx) || {};
28847
28864
  const { marks: styleIdMarks } = parseProperties(matchedStyle);
@@ -28879,9 +28896,10 @@
28879
28896
  overallListType = listType;
28880
28897
  item.seen = true;
28881
28898
  const schemaElements = [];
28899
+ const nodeContents = nodeListHandler2.handler({ ...params2, nodes: [attributes.paragraphProperties, ...elements] })?.filter((n) => n) || [];
28882
28900
  let parNode = {
28883
28901
  type: "paragraph",
28884
- content: nodeListHandler2.handler({ ...params2, nodes: [attributes.paragraphProperties, ...elements] })?.filter((n) => n)
28902
+ content: nodeContents
28885
28903
  };
28886
28904
  if (parNode.content) {
28887
28905
  parNode = {
@@ -30646,7 +30664,7 @@
30646
30664
  return;
30647
30665
  }
30648
30666
  }
30649
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.16") {
30667
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.18") {
30650
30668
  const customLocation = "docProps/custom.xml";
30651
30669
  if (!docx[customLocation]) {
30652
30670
  docx[customLocation] = generateCustomXml();
@@ -31112,7 +31130,7 @@
31112
31130
  function generateCustomXml() {
31113
31131
  return DEFAULT_CUSTOM_XML;
31114
31132
  }
31115
- function generateSuperdocVersion(pid = 2, version2 = "0.12.16") {
31133
+ function generateSuperdocVersion(pid = 2, version2 = "0.12.18") {
31116
31134
  return {
31117
31135
  type: "element",
31118
31136
  name: "property",
@@ -47680,7 +47698,8 @@
47680
47698
  numbering: {},
47681
47699
  isHeaderOrFooter: false,
47682
47700
  lastSelection: null,
47683
- htmlOverride: false,
47701
+ suppressDefaultDocxStyles: false,
47702
+ jsonOverride: false,
47684
47703
  onBeforeCreate: () => null,
47685
47704
  onCreate: () => null,
47686
47705
  onUpdate: () => null,
@@ -48009,7 +48028,7 @@
48009
48028
  * @returns {void}
48010
48029
  */
48011
48030
  initDefaultStyles(element = this.element) {
48012
- if (this.options.isHeadless || this.options.htmlOverride) return;
48031
+ if (this.options.isHeadless || this.options.suppressDefaultDocxStyles) return;
48013
48032
  const proseMirror = element?.querySelector(".ProseMirror");
48014
48033
  const { pageSize, pageMargins } = this.converter.pageStyles ?? {};
48015
48034
  if (!proseMirror || !pageSize || !pageMargins) {
@@ -48266,7 +48285,7 @@
48266
48285
  * @returns {Object | void} Migration results
48267
48286
  */
48268
48287
  processCollaborationMigrations() {
48269
- console.debug("[checkVersionMigrations] Current editor version", "0.12.16");
48288
+ console.debug("[checkVersionMigrations] Current editor version", "0.12.18");
48270
48289
  if (!this.options.ydoc) return;
48271
48290
  const metaMap = this.options.ydoc.getMap("meta");
48272
48291
  let docVersion = metaMap.get("version");
@@ -48583,6 +48602,7 @@
48583
48602
  doc2 = createDocument(this.converter, this.schema, this);
48584
48603
  doc2 = __privateMethod$1(this, _Editor_instances, prepareDocumentForImport_fn).call(this, doc2);
48585
48604
  if (this.options.html) doc2 = __privateMethod$1(this, _Editor_instances, createDocFromHTML_fn).call(this, this.options.html);
48605
+ else if (this.options.jsonOverride) doc2 = this.schema.nodeFromJSON(this.options.jsonOverride);
48586
48606
  if (fragment) doc2 = yXmlFragmentToProseMirrorRootNode(fragment, this.schema);
48587
48607
  }
48588
48608
  } else if (mode === "text" || mode === "html") {
@@ -88949,7 +88969,8 @@ ${style2}
88949
88969
  handleImageUpload: proxy.$superdoc.config.handleImageUpload,
88950
88970
  telemetry: proxy.$superdoc.telemetry,
88951
88971
  externalExtensions: proxy.$superdoc.config.editorExtensions || [],
88952
- htmlOverride: proxy.$superdoc.config.htmlOverride
88972
+ suppressDefaultDocxStyles: proxy.$superdoc.config.suppressDefaultDocxStyles,
88973
+ jsonOverride: proxy.$superdoc.config.jsonOverride
88953
88974
  };
88954
88975
  return options2;
88955
88976
  };
@@ -89278,7 +89299,7 @@ ${style2}
89278
89299
  };
89279
89300
  }
89280
89301
  };
89281
- const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-52a65823"]]);
89302
+ const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e620aa2b"]]);
89282
89303
  const createSuperdocVueApp = () => {
89283
89304
  const app = createApp(App);
89284
89305
  const pinia = createPinia();
@@ -89375,7 +89396,7 @@ ${style2}
89375
89396
  this.config.colors = shuffleArray(this.config.colors);
89376
89397
  this.userColorMap = /* @__PURE__ */ new Map();
89377
89398
  this.colorIndex = 0;
89378
- this.version = "0.12.16";
89399
+ this.version = "0.12.18";
89379
89400
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
89380
89401
  this.superdocId = config.superdocId || v4();
89381
89402
  this.colors = this.config.colors;