@harbour-enterprises/superdoc 0.6.88 → 0.6.89

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,4 +1,4 @@
1
- import { C } from "./chunks/converter-Cec-lU-u.js";
1
+ import { C } from "./chunks/converter-DoRQBZ-W.js";
2
2
  export {
3
3
  C as SuperConverter
4
4
  };
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-Cec-lU-u.js";
2
- import { D } from "./chunks/docx-zipper-BWrCoChV.js";
1
+ import "./chunks/converter-DoRQBZ-W.js";
2
+ import { D } from "./chunks/docx-zipper-BTBfvzAS.js";
3
3
  export {
4
4
  D as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E } from "./chunks/editor-C9mmgGXz.js";
2
- import "./chunks/converter-Cec-lU-u.js";
3
- import "./chunks/docx-zipper-BWrCoChV.js";
1
+ import { E } from "./chunks/editor-C5-AioY1.js";
2
+ import "./chunks/converter-DoRQBZ-W.js";
3
+ import "./chunks/docx-zipper-BTBfvzAS.js";
4
4
  export {
5
5
  E as Editor
6
6
  };
@@ -1,4 +1,4 @@
1
- import { J as JSZip } from "./chunks/docx-zipper-BWrCoChV.js";
1
+ import { J as JSZip } from "./chunks/docx-zipper-BTBfvzAS.js";
2
2
  async function createZip(blobs, fileNames) {
3
3
  const zip = new JSZip();
4
4
  blobs.forEach((blob, index) => {
@@ -9,13 +9,13 @@ 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 _interceptedCommands, _SuperToolbar_instances, 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 } from "./chunks/editor-C9mmgGXz.js";
13
- import { k, m, j, l } from "./chunks/editor-C9mmgGXz.js";
14
- import { O as getDefaultExportFromCjs, v as v4, T as TextSelection, U as vClickOutside } from "./chunks/converter-Cec-lU-u.js";
15
- import { C } from "./chunks/converter-Cec-lU-u.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 } from "./chunks/editor-C5-AioY1.js";
13
+ import { k, m, j, l } from "./chunks/editor-C5-AioY1.js";
14
+ import { O as getDefaultExportFromCjs, v as v4, T as TextSelection, U as vClickOutside } from "./chunks/converter-DoRQBZ-W.js";
15
+ import { C } from "./chunks/converter-DoRQBZ-W.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-Dq9F9vDH.js";
18
- import { D } from "./chunks/docx-zipper-BWrCoChV.js";
17
+ import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, N as NSkeleton } from "./chunks/toolbar-CmzzG-d8.js";
18
+ import { D } from "./chunks/docx-zipper-BTBfvzAS.js";
19
19
  import { createZip } from "./file-zipper.es.js";
20
20
  var eventemitter3 = { exports: {} };
21
21
  (function(module) {
@@ -1,6 +1,6 @@
1
1
  import "vue";
2
- import { T } from "./chunks/toolbar-Dq9F9vDH.js";
3
- import "./chunks/editor-C9mmgGXz.js";
2
+ import { T } from "./chunks/toolbar-CmzzG-d8.js";
3
+ import "./chunks/editor-C5-AioY1.js";
4
4
  export {
5
5
  T as default
6
6
  };
@@ -1,4 +1,4 @@
1
- import { _, D, E, S, a, b, c, T, d, i, g, e, f, h, j, k, l } from "./chunks/super-editor.es-B9wZhLXC.js";
1
+ import { _, D, E, S, a, b, c, T, d, i, g, e, f, h, j, k, l } from "./chunks/super-editor.es-CMnNT5PV.js";
2
2
  import "./chunks/vue-BjMDYCe1.js";
3
3
  export {
4
4
  _ as BasicUpload,
@@ -1,5 +1,5 @@
1
- import { E as Editor, h as getRichTextExtensions, b as SuperInput, a as SuperEditor, c as SuperToolbar, d as createZip } from "./chunks/super-editor.es-B9wZhLXC.js";
2
- import { S, i, k, l } from "./chunks/super-editor.es-B9wZhLXC.js";
1
+ import { E as Editor, h as getRichTextExtensions, b as SuperInput, a as SuperEditor, c as SuperToolbar, d as createZip } from "./chunks/super-editor.es-CMnNT5PV.js";
2
+ import { S, i, k, l } from "./chunks/super-editor.es-CMnNT5PV.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, C as toRef, i as inject, q as getCurrentInstance, l as watch, x as unref, a1 as hasInjectionContext, L as reactive, R as nextTick, a2 as getCurrentScope, a3 as onScopeDispose, a4 as toRefs, g as global$1, N as shallowRef, M as readonly, j as onMounted, k as onBeforeUnmount, h as onBeforeMount, U as onActivated, s as onDeactivated, z as createTextVNode, F as Fragment, Q as Comment, m as defineComponent, D as provide, G as withDirectives, B as h, V as Teleport, S as renderSlot, W as isVNode, K as watchEffect, O as Transition, E as mergeProps, P as vShow, J as cloneVNode, T as Text, b as createElementBlock, o as openBlock, t as toDisplayString, v as createVNode, y as withCtx, f as createBaseVNode, A as normalizeStyle, e as createCommentVNode, u as createBlock, w as withModifiers, n as normalizeClass, a5 as resolveDirective, d as renderList, c as createApp, a6 as resolveDynamicComponent } from "./chunks/vue-BjMDYCe1.js";
4
4
  import { B as Buffer$2 } from "./chunks/jszip-Df6uKve1.js";
5
5
  import { b } from "./chunks/blank-docx-BagxM198.js";
@@ -45819,7 +45819,7 @@ class SuperDoc extends EventEmitter {
45819
45819
  this.config.colors = shuffleArray(this.config.colors);
45820
45820
  this.userColorMap = /* @__PURE__ */ new Map();
45821
45821
  this.colorIndex = 0;
45822
- this.version = "0.6.88";
45822
+ this.version = "0.6.89";
45823
45823
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
45824
45824
  this.superdocId = config.superdocId || v4();
45825
45825
  this.colors = this.config.colors;
@@ -27936,7 +27936,7 @@
27936
27936
  return;
27937
27937
  }
27938
27938
  }
27939
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.6.88") {
27939
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.6.89") {
27940
27940
  const customLocation = "docProps/custom.xml";
27941
27941
  if (!docx[customLocation]) {
27942
27942
  docx[customLocation] = generateCustomXml();
@@ -28192,18 +28192,23 @@
28192
28192
  const properties = customXml.elements.find((el) => el.name === "Properties");
28193
28193
  if (!properties.elements) properties.elements = [];
28194
28194
  const elements = properties.elements;
28195
+ const cleanProperties = elements.filter((prop) => typeof prop === "object" && prop !== null).filter((prop) => {
28196
+ const { attributes } = prop;
28197
+ return attributes.name !== "SuperdocVersion";
28198
+ });
28195
28199
  let pid = 2;
28196
28200
  try {
28197
- pid = elements.length ? Math.max(...elements.map((el) => el.attributes.pid)) + 1 : 2;
28201
+ pid = cleanProperties.length ? Math.max(...elements.map((el) => el.attributes.pid)) + 1 : 2;
28198
28202
  } catch (error) {
28199
28203
  }
28200
- elements.push(pid, generateSuperdocVersion());
28204
+ cleanProperties.push(pid, generateSuperdocVersion());
28205
+ properties.elements = cleanProperties;
28201
28206
  return docx;
28202
28207
  }
28203
28208
  function generateCustomXml() {
28204
28209
  return DEFAULT_CUSTOM_XML;
28205
28210
  }
28206
- function generateSuperdocVersion(pid = 2, version2 = "0.6.88") {
28211
+ function generateSuperdocVersion(pid = 2, version2 = "0.6.89") {
28207
28212
  return {
28208
28213
  type: "element",
28209
28214
  name: "property",
@@ -42387,7 +42392,7 @@
42387
42392
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
42388
42393
  */
42389
42394
  processCollaborationMigrations() {
42390
- console.debug("[checkVersionMigrations] Current editor version", "0.6.88");
42395
+ console.debug("[checkVersionMigrations] Current editor version", "0.6.89");
42391
42396
  if (!this.options.ydoc) return;
42392
42397
  const metaMap = this.options.ydoc.getMap("meta");
42393
42398
  let docVersion = metaMap.get("version");
@@ -110674,7 +110679,7 @@ ${style2}
110674
110679
  this.config.colors = shuffleArray(this.config.colors);
110675
110680
  this.userColorMap = /* @__PURE__ */ new Map();
110676
110681
  this.colorIndex = 0;
110677
- this.version = "0.6.88";
110682
+ this.version = "0.6.89";
110678
110683
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
110679
110684
  this.superdocId = config.superdocId || v4();
110680
110685
  this.colors = this.config.colors;