@harbour-enterprises/superdoc 0.12.17 → 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.
@@ -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-C5seifML.es.js";
2
- import { S, i, m } from "./chunks/super-editor.es-C5seifML.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.17";
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;
@@ -30664,7 +30664,7 @@
30664
30664
  return;
30665
30665
  }
30666
30666
  }
30667
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.17") {
30667
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.18") {
30668
30668
  const customLocation = "docProps/custom.xml";
30669
30669
  if (!docx[customLocation]) {
30670
30670
  docx[customLocation] = generateCustomXml();
@@ -31130,7 +31130,7 @@
31130
31130
  function generateCustomXml() {
31131
31131
  return DEFAULT_CUSTOM_XML;
31132
31132
  }
31133
- function generateSuperdocVersion(pid = 2, version2 = "0.12.17") {
31133
+ function generateSuperdocVersion(pid = 2, version2 = "0.12.18") {
31134
31134
  return {
31135
31135
  type: "element",
31136
31136
  name: "property",
@@ -47698,7 +47698,8 @@
47698
47698
  numbering: {},
47699
47699
  isHeaderOrFooter: false,
47700
47700
  lastSelection: null,
47701
- htmlOverride: false,
47701
+ suppressDefaultDocxStyles: false,
47702
+ jsonOverride: false,
47702
47703
  onBeforeCreate: () => null,
47703
47704
  onCreate: () => null,
47704
47705
  onUpdate: () => null,
@@ -48027,7 +48028,7 @@
48027
48028
  * @returns {void}
48028
48029
  */
48029
48030
  initDefaultStyles(element = this.element) {
48030
- if (this.options.isHeadless || this.options.htmlOverride) return;
48031
+ if (this.options.isHeadless || this.options.suppressDefaultDocxStyles) return;
48031
48032
  const proseMirror = element?.querySelector(".ProseMirror");
48032
48033
  const { pageSize, pageMargins } = this.converter.pageStyles ?? {};
48033
48034
  if (!proseMirror || !pageSize || !pageMargins) {
@@ -48284,7 +48285,7 @@
48284
48285
  * @returns {Object | void} Migration results
48285
48286
  */
48286
48287
  processCollaborationMigrations() {
48287
- console.debug("[checkVersionMigrations] Current editor version", "0.12.17");
48288
+ console.debug("[checkVersionMigrations] Current editor version", "0.12.18");
48288
48289
  if (!this.options.ydoc) return;
48289
48290
  const metaMap = this.options.ydoc.getMap("meta");
48290
48291
  let docVersion = metaMap.get("version");
@@ -48601,6 +48602,7 @@
48601
48602
  doc2 = createDocument(this.converter, this.schema, this);
48602
48603
  doc2 = __privateMethod$1(this, _Editor_instances, prepareDocumentForImport_fn).call(this, doc2);
48603
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);
48604
48606
  if (fragment) doc2 = yXmlFragmentToProseMirrorRootNode(fragment, this.schema);
48605
48607
  }
48606
48608
  } else if (mode === "text" || mode === "html") {
@@ -88967,7 +88969,8 @@ ${style2}
88967
88969
  handleImageUpload: proxy.$superdoc.config.handleImageUpload,
88968
88970
  telemetry: proxy.$superdoc.telemetry,
88969
88971
  externalExtensions: proxy.$superdoc.config.editorExtensions || [],
88970
- htmlOverride: proxy.$superdoc.config.htmlOverride
88972
+ suppressDefaultDocxStyles: proxy.$superdoc.config.suppressDefaultDocxStyles,
88973
+ jsonOverride: proxy.$superdoc.config.jsonOverride
88971
88974
  };
88972
88975
  return options2;
88973
88976
  };
@@ -89296,7 +89299,7 @@ ${style2}
89296
89299
  };
89297
89300
  }
89298
89301
  };
89299
- const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-52a65823"]]);
89302
+ const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e620aa2b"]]);
89300
89303
  const createSuperdocVueApp = () => {
89301
89304
  const app = createApp(App);
89302
89305
  const pinia = createPinia();
@@ -89393,7 +89396,7 @@ ${style2}
89393
89396
  this.config.colors = shuffleArray(this.config.colors);
89394
89397
  this.userColorMap = /* @__PURE__ */ new Map();
89395
89398
  this.colorIndex = 0;
89396
- this.version = "0.12.17";
89399
+ this.version = "0.12.18";
89397
89400
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
89398
89401
  this.superdocId = config.superdocId || v4();
89399
89402
  this.colors = this.config.colors;