@harbour-enterprises/superdoc 0.8.1 → 0.8.2

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 (26) hide show
  1. package/dist/chunks/{super-editor.es-CrXCj3vB.js → super-editor.es-DsEPyJm_.js} +53 -22
  2. package/dist/chunks/{super-editor.es-CrXCj3vB.js.map → super-editor.es-DsEPyJm_.js.map} +1 -1
  3. package/dist/super-editor/chunks/{converter-CxyadIIu.js → converter-azXT1h6A.js} +3 -3
  4. package/dist/super-editor/chunks/{converter-CxyadIIu.js.map → converter-azXT1h6A.js.map} +1 -1
  5. package/dist/super-editor/chunks/{docx-zipper-KYJBSgz3.js → docx-zipper-D9w3bMVr.js} +2 -2
  6. package/dist/super-editor/chunks/{docx-zipper-KYJBSgz3.js.map → docx-zipper-D9w3bMVr.js.map} +1 -1
  7. package/dist/super-editor/chunks/{editor-BBN36BZJ.js → editor-D5nTnth_.js} +53 -22
  8. package/dist/super-editor/chunks/editor-D5nTnth_.js.map +1 -0
  9. package/dist/super-editor/chunks/{toolbar-CmvXKW36.js → toolbar-BYleEua6.js} +3 -3
  10. package/dist/super-editor/chunks/{toolbar-CmvXKW36.js.map → toolbar-BYleEua6.js.map} +1 -1
  11. package/dist/super-editor/converter.es.js +1 -1
  12. package/dist/super-editor/docx-zipper.es.js +2 -2
  13. package/dist/super-editor/editor.es.js +3 -3
  14. package/dist/super-editor/extensions/comment/comments-plugin.d.ts.map +1 -1
  15. package/dist/super-editor/extensions/index.d.ts.map +1 -1
  16. package/dist/super-editor/extensions/paragraph/paragraph.d.ts.map +1 -1
  17. package/dist/super-editor/file-zipper.es.js +1 -1
  18. package/dist/super-editor/super-editor.es.js +6 -6
  19. package/dist/super-editor/tests/export/export-helpers/export-helpers.d.ts.map +1 -1
  20. package/dist/super-editor/toolbar.es.js +2 -2
  21. package/dist/super-editor.es.js +1 -1
  22. package/dist/superdoc.es.js +3 -3
  23. package/dist/superdoc.umd.js +53 -22
  24. package/dist/superdoc.umd.js.map +1 -1
  25. package/package.json +1 -1
  26. package/dist/super-editor/chunks/editor-BBN36BZJ.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { C } from "./chunks/converter-CxyadIIu.js";
1
+ import { C } from "./chunks/converter-azXT1h6A.js";
2
2
  export {
3
3
  C as SuperConverter
4
4
  };
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-CxyadIIu.js";
2
- import { D } from "./chunks/docx-zipper-KYJBSgz3.js";
1
+ import "./chunks/converter-azXT1h6A.js";
2
+ import { D } from "./chunks/docx-zipper-D9w3bMVr.js";
3
3
  export {
4
4
  D as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E } from "./chunks/editor-BBN36BZJ.js";
2
- import "./chunks/converter-CxyadIIu.js";
3
- import "./chunks/docx-zipper-KYJBSgz3.js";
1
+ import { E } from "./chunks/editor-D5nTnth_.js";
2
+ import "./chunks/converter-azXT1h6A.js";
3
+ import "./chunks/docx-zipper-D9w3bMVr.js";
4
4
  export {
5
5
  E as Editor
6
6
  };
@@ -1 +1 @@
1
- {"version":3,"file":"comments-plugin.d.ts","sourceRoot":"","sources":["../../../src/extensions/comment/comments-plugin.js"],"names":[],"mappings":"AAoBA,+CAA0D;AAE1D,iCA8QG;0BApS+B,mBAAmB"}
1
+ {"version":3,"file":"comments-plugin.d.ts","sourceRoot":"","sources":["../../../src/extensions/comment/comments-plugin.js"],"names":[],"mappings":"AAoBA,+CAA0D;AAE1D,iCAgRG;0BAtS+B,mBAAmB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/extensions/index.js"],"names":[],"mappings":"wBAsBwB,oBAAoB;yBAPnB,qBAAqB;qBACzB,iBAAiB;wBACd,qBAAqB;2BAClB,wBAAwB;4BACvB,yBAAyB;yBAC5B,sBAAsB;0BACrB,sBAAsB;kCAEqB,oBAAoB;gCAApB,oBAAoB;iCAApB,oBAAoB;wBACjE,gBAAgB;0BACH,uBA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yBAAyB;4BAqBzB,wBAAwB;2BAvCzB,uBAAuB;gCAqBM,6BAA6B;uCAA7B,6BAA6B;sBAC/D,kBAAkB;8BACV,sBAAsB;8BAiBtB,2BAA2B;wBAhBjC,oBAAoB;8BAtBd,0BAA0B;oCACpB,iCAAiC;6BAsCxC,0BAA0B;4BAPD,0BAA0B;4BAA1B,0BAA0B;4BAA1B,0BAA0B;6BACnD,oBAAoB;oCAWb,0BAA0B;AAwC9D,8CAoDC;AA1FD,+CAoCC"}
@@ -1 +1 @@
1
- {"version":3,"file":"paragraph.d.ts","sourceRoot":"","sources":["../../../src/extensions/paragraph/paragraph.js"],"names":[],"mappings":"AAGA,4BA0DG"}
1
+ {"version":3,"file":"paragraph.d.ts","sourceRoot":"","sources":["../../../src/extensions/paragraph/paragraph.js"],"names":[],"mappings":"AAGA,4BAqEG"}
@@ -1,4 +1,4 @@
1
- import { J as JSZip } from "./chunks/docx-zipper-KYJBSgz3.js";
1
+ import { J as JSZip } from "./chunks/docx-zipper-D9w3bMVr.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, j as Extension, A as Attribute, N as Node } from "./chunks/editor-BBN36BZJ.js";
13
- import { l, n, k, m } from "./chunks/editor-BBN36BZJ.js";
14
- import { O as getDefaultExportFromCjs, v as v4, T as TextSelection, U as vClickOutside, a as Plugin } from "./chunks/converter-CxyadIIu.js";
15
- import { C } from "./chunks/converter-CxyadIIu.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, j as Extension, A as Attribute, N as Node } from "./chunks/editor-D5nTnth_.js";
13
+ import { l, n, k, m } from "./chunks/editor-D5nTnth_.js";
14
+ import { O as getDefaultExportFromCjs, v as v4, T as TextSelection, U as vClickOutside, a as Plugin } from "./chunks/converter-azXT1h6A.js";
15
+ import { C } from "./chunks/converter-azXT1h6A.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-CmvXKW36.js";
18
- import { D } from "./chunks/docx-zipper-KYJBSgz3.js";
17
+ import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, N as NSkeleton } from "./chunks/toolbar-BYleEua6.js";
18
+ import { D } from "./chunks/docx-zipper-D9w3bMVr.js";
19
19
  import { createZip } from "./file-zipper.es.js";
20
20
  var eventemitter3 = { exports: {} };
21
21
  (function(module) {
@@ -1 +1 @@
1
- {"version":3,"file":"export-helpers.d.ts","sourceRoot":"","sources":["../../../../src/tests/export/export-helpers/export-helpers.js"],"names":[],"mappings":"AAcO,4CAFM,MAAM,CAKlB;AAmCM,wCAHI,MAAM,qBACJ,OAAO,KAAQ,CAsC3B;AAEM;;;GA0BN"}
1
+ {"version":3,"file":"export-helpers.d.ts","sourceRoot":"","sources":["../../../../src/tests/export/export-helpers/export-helpers.js"],"names":[],"mappings":"AAcO,4CAFM,MAAM,CAKlB;AAmCM,wCAHI,MAAM,qBACJ,OAAO,KAAQ,CAuC3B;AAEM;;;GA0BN"}
@@ -1,6 +1,6 @@
1
1
  import "vue";
2
- import { T } from "./chunks/toolbar-CmvXKW36.js";
3
- import "./chunks/editor-BBN36BZJ.js";
2
+ import { T } from "./chunks/toolbar-BYleEua6.js";
3
+ import "./chunks/editor-D5nTnth_.js";
4
4
  export {
5
5
  T as default
6
6
  };
@@ -1,4 +1,4 @@
1
- import { _, D, E, a, S, b, c, d, T, e, i, g, f, h, j, k, l, m } from "./chunks/super-editor.es-CrXCj3vB.js";
1
+ import { _, D, E, a, S, b, c, d, T, e, i, g, f, h, j, k, l, m } from "./chunks/super-editor.es-DsEPyJm_.js";
2
2
  import "./chunks/vue-BjMDYCe1.js";
3
3
  export {
4
4
  _ as BasicUpload,
@@ -1,5 +1,5 @@
1
- import { E as Editor, j as getRichTextExtensions, c as SuperInput, b as SuperEditor, d as SuperToolbar, e as createZip } from "./chunks/super-editor.es-CrXCj3vB.js";
2
- import { S, i, l, m } from "./chunks/super-editor.es-CrXCj3vB.js";
1
+ import { E as Editor, j as getRichTextExtensions, c as SuperInput, b as SuperEditor, d as SuperToolbar, e as createZip } from "./chunks/super-editor.es-DsEPyJm_.js";
2
+ import { S, i, l, m } from "./chunks/super-editor.es-DsEPyJm_.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 as BlankDOCX } from "./chunks/blank-docx-iwdyG9RH.js";
@@ -45843,7 +45843,7 @@ class SuperDoc extends EventEmitter {
45843
45843
  this.config.colors = shuffleArray(this.config.colors);
45844
45844
  this.userColorMap = /* @__PURE__ */ new Map();
45845
45845
  this.colorIndex = 0;
45846
- this.version = "0.8.1";
45846
+ this.version = "0.8.2";
45847
45847
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
45848
45848
  this.superdocId = config.superdocId || v4();
45849
45849
  this.colors = this.config.colors;
@@ -27997,7 +27997,7 @@
27997
27997
  return;
27998
27998
  }
27999
27999
  }
28000
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.8.1") {
28000
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.8.2") {
28001
28001
  const customLocation = "docProps/custom.xml";
28002
28002
  if (!docx[customLocation]) {
28003
28003
  docx[customLocation] = generateCustomXml();
@@ -28270,7 +28270,7 @@
28270
28270
  function generateCustomXml() {
28271
28271
  return DEFAULT_CUSTOM_XML;
28272
28272
  }
28273
- function generateSuperdocVersion(pid = 2, version2 = "0.8.1") {
28273
+ function generateSuperdocVersion(pid = 2, version2 = "0.8.2") {
28274
28274
  return {
28275
28275
  type: "element",
28276
28276
  name: "property",
@@ -41607,6 +41607,7 @@
41607
41607
  const editor = this.editor;
41608
41608
  let shouldUpdate;
41609
41609
  let activeThreadId;
41610
+ if (editor.options.isHeadless) return [];
41610
41611
  const commentsPlugin = new Plugin({
41611
41612
  key: CommentsPluginKey,
41612
41613
  state: {
@@ -42505,7 +42506,7 @@
42505
42506
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
42506
42507
  */
42507
42508
  processCollaborationMigrations() {
42508
- console.debug("[checkVersionMigrations] Current editor version", "0.8.1");
42509
+ console.debug("[checkVersionMigrations] Current editor version", "0.8.2");
42509
42510
  if (!this.options.ydoc) return;
42510
42511
  const metaMap = this.options.ydoc.getMap("meta");
42511
42512
  let docVersion = metaMap.get("version");
@@ -44743,7 +44744,17 @@
44743
44744
  rendered: false
44744
44745
  },
44745
44746
  filename: { rendered: false },
44746
- rsidRDefault: { rendered: false }
44747
+ rsidRDefault: { rendered: false },
44748
+ // Experimental
44749
+ isEditable: {
44750
+ renderDOM: ({ isEditable }) => {
44751
+ let style2 = "";
44752
+ if (isEditable === false) {
44753
+ style2 = "opacity: 0.5; cursor: default; pointer-events: none; user-select: none;";
44754
+ }
44755
+ return { style: style2, contenteditable: isEditable === false ? false : true };
44756
+ }
44757
+ }
44747
44758
  };
44748
44759
  },
44749
44760
  parseDOM() {
@@ -53277,23 +53288,43 @@
53277
53288
  editor.view.dispatch(newTr);
53278
53289
  });
53279
53290
  };
53280
- const getRichTextExtensions = () => [
53281
- Bold,
53282
- Color,
53283
- Document,
53284
- History,
53285
- Italic,
53286
- Link,
53287
- Paragraph,
53288
- Strike,
53289
- Text,
53290
- TextStyle,
53291
- Underline,
53292
- Placeholder,
53293
- PopoverPlugin,
53294
- Mention,
53295
- Highlight
53296
- ];
53291
+ const getRichTextExtensions = () => {
53292
+ return [
53293
+ Bold,
53294
+ Color,
53295
+ Document,
53296
+ FontFamily,
53297
+ FontSize,
53298
+ History,
53299
+ Heading,
53300
+ Italic,
53301
+ LineHeight,
53302
+ Link,
53303
+ Paragraph,
53304
+ LineBreak,
53305
+ HardBreak,
53306
+ Strike,
53307
+ Text,
53308
+ TextAlign,
53309
+ TextIndent,
53310
+ TextStyle,
53311
+ Underline,
53312
+ Placeholder,
53313
+ PopoverPlugin,
53314
+ Mention,
53315
+ Highlight,
53316
+ FormatCommands,
53317
+ Table,
53318
+ TableRow,
53319
+ TableCell,
53320
+ TableHeader,
53321
+ FieldAnnotation,
53322
+ DropCursor,
53323
+ TrackInsert,
53324
+ TrackDelete,
53325
+ TrackFormat
53326
+ ];
53327
+ };
53297
53328
  const getStarterExtensions = () => {
53298
53329
  return [
53299
53330
  Bold,
@@ -110837,7 +110868,7 @@ ${style2}
110837
110868
  this.config.colors = shuffleArray(this.config.colors);
110838
110869
  this.userColorMap = /* @__PURE__ */ new Map();
110839
110870
  this.colorIndex = 0;
110840
- this.version = "0.8.1";
110871
+ this.version = "0.8.2";
110841
110872
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
110842
110873
  this.superdocId = config.superdocId || v4();
110843
110874
  this.colors = this.config.colors;