@harbour-enterprises/superdoc 0.16.3 → 0.17.0-next.1

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 (59) hide show
  1. package/dist/chunks/{PdfViewer-DZ7nYZ_7.es.js → PdfViewer-C9MkdsYe.es.js} +2 -2
  2. package/dist/chunks/{PdfViewer-BF9znEuU.cjs → PdfViewer-GP6I2zIW.cjs} +2 -2
  3. package/dist/chunks/{eventemitter3-DboF-RUw.cjs → eventemitter3-B_kO1Pxm.cjs} +1 -1
  4. package/dist/chunks/{eventemitter3-Bvb0wURT.es.js → eventemitter3-CZv6vEhA.es.js} +1 -1
  5. package/dist/chunks/{index-ix5rRPuN.cjs → index-D__8AUF5.cjs} +12 -11
  6. package/dist/chunks/{index-B5SFvLE3.es.js → index-DyzJFuXw.es.js} +12 -11
  7. package/dist/chunks/{jszip-DXHu60h9.es.js → jszip-B8KIZSNe.es.js} +1 -1
  8. package/dist/chunks/{jszip-DmmUnPkH.cjs → jszip-b7l8QkfH.cjs} +1 -1
  9. package/dist/chunks/{super-editor.es-CUUY0Y9b.cjs → super-editor.es-JiSMNI00.cjs} +618 -233
  10. package/dist/chunks/{super-editor.es-CcHzk5fr.es.js → super-editor.es-v-3xRSOD.es.js} +618 -233
  11. package/dist/chunks/{vue-xvq3uP6K.es.js → vue-CXxsqYcP.es.js} +79 -42
  12. package/dist/chunks/{vue-B6WOnFdF.cjs → vue-DWle4Cai.cjs} +79 -42
  13. package/dist/chunks/xml-js-CX8FH0He.cjs +3 -0
  14. package/dist/chunks/xml-js-D0tLGmKu.es.js +2 -0
  15. package/dist/core/SuperDoc.d.ts +5 -0
  16. package/dist/core/SuperDoc.d.ts.map +1 -1
  17. package/dist/stores/comments-store.d.ts.map +1 -1
  18. package/dist/style.css +51 -28
  19. package/dist/super-editor/ai-writer.es.js +2 -2
  20. package/dist/super-editor/chunks/{converter-daTWQDSX.js → converter-WThahWt0.js} +159 -33
  21. package/dist/super-editor/chunks/{docx-zipper-D6pIqvek.js → docx-zipper-6iJv_uCL.js} +1 -1
  22. package/dist/super-editor/chunks/{editor-DlwltKCg.js → editor-OX-YyKoc.js} +424 -184
  23. package/dist/super-editor/chunks/{toolbar-BUKbd0tf.js → toolbar-CUglet_U.js} +5 -6
  24. package/dist/super-editor/converter.es.js +1 -1
  25. package/dist/super-editor/docx-zipper.es.js +2 -2
  26. package/dist/super-editor/editor.es.js +3 -3
  27. package/dist/super-editor/file-zipper.es.js +1 -1
  28. package/dist/super-editor/src/components/toolbar/constants.d.ts +7 -0
  29. package/dist/super-editor/src/components/toolbar/super-toolbar.d.ts +13 -2
  30. package/dist/super-editor/src/core/Editor.d.ts +5 -1
  31. package/dist/super-editor/src/core/Node.d.ts +24 -13
  32. package/dist/super-editor/src/core/OxmlNode.d.ts +19 -0
  33. package/dist/super-editor/src/core/commands/list-helpers/test-helpers.d.ts +126 -0
  34. package/dist/super-editor/src/core/commands/toggleList.d.ts +0 -2
  35. package/dist/super-editor/src/core/helpers/getSchemaTypeNameByName.d.ts +1 -1
  36. package/dist/super-editor/src/core/helpers/list-numbering-helpers.d.ts +6 -0
  37. package/dist/super-editor/src/core/helpers/orderedListUtils.d.ts +1 -0
  38. package/dist/super-editor/src/core/index.d.ts +1 -0
  39. package/dist/super-editor/src/core/super-converter/exporter.d.ts +7 -0
  40. package/dist/super-editor/src/core/super-converter/v2/handlers/index.d.ts +1 -0
  41. package/dist/super-editor/src/core/super-converter/v2/importer/ignoredNodes.d.ts +2 -0
  42. package/dist/super-editor/src/core/types/index.d.ts +128 -0
  43. package/dist/super-editor/src/core/utilities/clipboardUtils.d.ts +7 -17
  44. package/dist/super-editor/src/extensions/heading/heading.d.ts +2 -2
  45. package/dist/super-editor/src/extensions/index.d.ts +2 -2
  46. package/dist/super-editor/src/extensions/linked-styles/helpers.d.ts +3 -1
  47. package/dist/super-editor/src/extensions/search/search.d.ts +34 -0
  48. package/dist/super-editor/style.css +13 -1
  49. package/dist/super-editor/super-editor.es.js +55 -27
  50. package/dist/super-editor/toolbar.es.js +2 -2
  51. package/dist/super-editor.cjs +2 -2
  52. package/dist/super-editor.es.js +2 -2
  53. package/dist/superdoc.cjs +4 -4
  54. package/dist/superdoc.es.js +4 -4
  55. package/dist/superdoc.umd.js +689 -270
  56. package/dist/superdoc.umd.js.map +1 -1
  57. package/package.json +1 -1
  58. package/dist/chunks/xml-js-A6_UhjPs.cjs +0 -3
  59. package/dist/chunks/xml-js-DQugfHmw.es.js +0 -2
@@ -1,5 +1,5 @@
1
- import { m as defineComponent, B as h, O as Transition, $ as process$1, I as watchEffect, d as computed, r as ref, j as onMounted, W as onUnmounted, c as createElementBlock, o as openBlock, a as createBaseVNode, f as createCommentVNode, v as createVNode, x as unref } from "./vue-xvq3uP6K.es.js";
2
- import { d as derived, c, a as cB, f as fadeInTransition, b as cM, N as NBaseLoading, w as warnOnce, u as useConfig, e as useTheme, p as pxfy, g as createKey, h as useThemeClass, i as useCompitable, _ as _export_sfc, j as useSuperdocStore, s as storeToRefs, k as useSelection } from "./index-B5SFvLE3.es.js";
1
+ import { m as defineComponent, B as h, O as Transition, $ as process$1, I as watchEffect, d as computed, r as ref, j as onMounted, W as onUnmounted, c as createElementBlock, o as openBlock, a as createBaseVNode, f as createCommentVNode, v as createVNode, x as unref } from "./vue-CXxsqYcP.es.js";
2
+ import { d as derived, c, a as cB, f as fadeInTransition, b as cM, N as NBaseLoading, w as warnOnce, u as useConfig, e as useTheme, p as pxfy, g as createKey, h as useThemeClass, i as useCompitable, _ as _export_sfc, j as useSuperdocStore, s as storeToRefs, k as useSelection } from "./index-DyzJFuXw.es.js";
3
3
  function self(vars) {
4
4
  const {
5
5
  opacityDisabled,
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const vue = require("./vue-B6WOnFdF.cjs");
4
- const superdoc = require("./index-ix5rRPuN.cjs");
3
+ const vue = require("./vue-DWle4Cai.cjs");
4
+ const superdoc = require("./index-D__8AUF5.cjs");
5
5
  function self(vars) {
6
6
  const {
7
7
  opacityDisabled,
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const jszip = require("./jszip-DmmUnPkH.cjs");
2
+ const jszip = require("./jszip-b7l8QkfH.cjs");
3
3
  var eventemitter3 = { exports: {} };
4
4
  var hasRequiredEventemitter3;
5
5
  function requireEventemitter3() {
@@ -1,4 +1,4 @@
1
- import { g as getDefaultExportFromCjs } from "./jszip-DXHu60h9.es.js";
1
+ import { g as getDefaultExportFromCjs } from "./jszip-B8KIZSNe.es.js";
2
2
  var eventemitter3 = { exports: {} };
3
3
  var hasRequiredEventemitter3;
4
4
  function requireEventemitter3() {
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
- const superEditor_es = require("./super-editor.es-CUUY0Y9b.cjs");
3
- const vue = require("./vue-B6WOnFdF.cjs");
4
- const jszip = require("./jszip-DmmUnPkH.cjs");
2
+ const superEditor_es = require("./super-editor.es-JiSMNI00.cjs");
3
+ const vue = require("./vue-DWle4Cai.cjs");
4
+ const jszip = require("./jszip-b7l8QkfH.cjs");
5
5
  const blankDocx = require("./blank-docx-CPqX9RF5.cjs");
6
- const eventemitter3 = require("./eventemitter3-DboF-RUw.cjs");
6
+ const eventemitter3 = require("./eventemitter3-B_kO1Pxm.cjs");
7
7
  const provider = require("@hocuspocus/provider");
8
8
  const Y = require("yjs");
9
9
  const uuid = require("./uuid-CQzaMNgL.cjs");
@@ -4375,10 +4375,10 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
4375
4375
  const createCommentForTrackChanges = (editor) => {
4376
4376
  let trackedChanges = superEditor_es.index.getTrackChanges(editor.state);
4377
4377
  const groupedChanges = groupChanges(trackedChanges);
4378
+ const { tr } = editor.view.state;
4379
+ const { dispatch } = editor.view;
4378
4380
  groupedChanges.forEach(({ insertedMark, deletionMark, formatMark }, index2) => {
4379
4381
  console.debug(`Create comment for track change: ${index2}`);
4380
- const { dispatch } = editor.view;
4381
- const { tr } = editor.view.state;
4382
4382
  const foundComment = commentsList.value.find(
4383
4383
  (i) => i.commentId === insertedMark?.mark.attrs.id || i.commentId === deletionMark?.mark.attrs.id || i.commentId === formatMark?.mark.attrs.id
4384
4384
  );
@@ -4386,7 +4386,6 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
4386
4386
  if (foundComment) {
4387
4387
  if (isLastIteration) {
4388
4388
  tr.setMeta(superEditor_es.CommentsPluginKey, { type: "force" });
4389
- dispatch(tr);
4390
4389
  }
4391
4390
  return;
4392
4391
  }
@@ -4399,9 +4398,9 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
4399
4398
  if (isLastIteration) tr.setMeta(superEditor_es.CommentsPluginKey, { type: "force" });
4400
4399
  tr.setMeta(superEditor_es.CommentsPluginKey, { type: "forceTrackChanges" });
4401
4400
  tr.setMeta(superEditor_es.TrackChangesBasePluginKey, trackChangesPayload);
4402
- dispatch(tr);
4403
4401
  }
4404
4402
  });
4403
+ dispatch(tr);
4405
4404
  };
4406
4405
  const translateCommentsForExport = () => {
4407
4406
  const processedComments = [];
@@ -17266,7 +17265,7 @@ const _sfc_main = {
17266
17265
  __name: "SuperDoc",
17267
17266
  emits: ["selection-update"],
17268
17267
  setup(__props, { emit: __emit }) {
17269
- const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-BF9znEuU.cjs")));
17268
+ const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-GP6I2zIW.cjs")));
17270
17269
  const superdocStore = useSuperdocStore();
17271
17270
  const commentsStore = useCommentsStore();
17272
17271
  const {
@@ -17432,6 +17431,7 @@ const _sfc_main = {
17432
17431
  };
17433
17432
  const editorOptions = (doc) => {
17434
17433
  const options = {
17434
+ isDebug: proxy.$superdoc.config.isDebug || false,
17435
17435
  pagination: proxy.$superdoc.config.pagination,
17436
17436
  documentId: doc.id,
17437
17437
  user: proxy.$superdoc.user,
@@ -17807,7 +17807,7 @@ const _sfc_main = {
17807
17807
  };
17808
17808
  }
17809
17809
  };
17810
- const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d64407d7"]]);
17810
+ const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-07532c12"]]);
17811
17811
  const createSuperdocVueApp = () => {
17812
17812
  const app = vue.createApp(App);
17813
17813
  const pinia = createPinia();
@@ -17869,6 +17869,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
17869
17869
  toolbarIcons: {},
17870
17870
  toolbarTexts: {},
17871
17871
  isDev: false,
17872
+ // telemetry config
17872
17873
  telemetry: null,
17873
17874
  // Events
17874
17875
  onEditorBeforeCreate: () => null,
@@ -17908,7 +17909,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
17908
17909
  this.config.colors = shuffleArray(this.config.colors);
17909
17910
  this.userColorMap = /* @__PURE__ */ new Map();
17910
17911
  this.colorIndex = 0;
17911
- this.version = "0.16.2";
17912
+ this.version = "0.16.5";
17912
17913
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
17913
17914
  this.superdocId = config.superdocId || uuid.v4();
17914
17915
  this.colors = this.config.colors;
@@ -1,8 +1,8 @@
1
- import { q as index$1, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-CcHzk5fr.es.js";
2
- import { a0 as effectScope, r as ref, _ as markRaw, $ as process$1, a1 as toRaw, d as computed, a2 as isRef, a3 as isReactive, C as toRef, i as inject, p as getCurrentInstance, l as watch, x as unref, a4 as hasInjectionContext, M as reactive, s as nextTick, a5 as getCurrentScope, a6 as onScopeDispose, a7 as toRefs, g as global$1, J as shallowRef, N as readonly, j as onMounted, k as onBeforeUnmount, h as onBeforeMount, S as onActivated, q as onDeactivated, z as createTextVNode, F as Fragment, Q as Comment, m as defineComponent, D as provide, H as withDirectives, B as h, U as Teleport, R as renderSlot, V as isVNode, I as watchEffect, O as Transition, a8 as TransitionGroup, E as mergeProps, P as vShow, G as cloneVNode, T as Text, c as createElementBlock, o as openBlock, t as toDisplayString, v as createVNode, y as withCtx, a as createBaseVNode, A as normalizeStyle, f as createCommentVNode, u as createBlock, w as withModifiers, n as normalizeClass, a9 as resolveDirective, e as renderList, b as createApp, X as resolveDynamicComponent, aa as defineAsyncComponent } from "./vue-xvq3uP6K.es.js";
3
- import { B as Buffer$2 } from "./jszip-DXHu60h9.es.js";
1
+ import { q as index$1, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-v-3xRSOD.es.js";
2
+ import { a0 as effectScope, r as ref, _ as markRaw, $ as process$1, a1 as toRaw, d as computed, a2 as isRef, a3 as isReactive, C as toRef, i as inject, p as getCurrentInstance, l as watch, x as unref, a4 as hasInjectionContext, M as reactive, s as nextTick, a5 as getCurrentScope, a6 as onScopeDispose, a7 as toRefs, g as global$1, J as shallowRef, N as readonly, j as onMounted, k as onBeforeUnmount, h as onBeforeMount, S as onActivated, q as onDeactivated, z as createTextVNode, F as Fragment, Q as Comment, m as defineComponent, D as provide, H as withDirectives, B as h, U as Teleport, R as renderSlot, V as isVNode, I as watchEffect, O as Transition, a8 as TransitionGroup, E as mergeProps, P as vShow, G as cloneVNode, T as Text, c as createElementBlock, o as openBlock, t as toDisplayString, v as createVNode, y as withCtx, a as createBaseVNode, A as normalizeStyle, f as createCommentVNode, u as createBlock, w as withModifiers, n as normalizeClass, a9 as resolveDirective, e as renderList, b as createApp, X as resolveDynamicComponent, aa as defineAsyncComponent } from "./vue-CXxsqYcP.es.js";
3
+ import { B as Buffer$2 } from "./jszip-B8KIZSNe.es.js";
4
4
  import { B as BlankDOCX } from "./blank-docx-iwdyG9RH.es.js";
5
- import { E as EventEmitter } from "./eventemitter3-Bvb0wURT.es.js";
5
+ import { E as EventEmitter } from "./eventemitter3-CZv6vEhA.es.js";
6
6
  import { HocuspocusProvider, HocuspocusProviderWebsocket } from "@hocuspocus/provider";
7
7
  import * as Y from "yjs";
8
8
  import { Doc, Map as Map$2 } from "yjs";
@@ -4358,10 +4358,10 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
4358
4358
  const createCommentForTrackChanges = (editor) => {
4359
4359
  let trackedChanges = index$1.getTrackChanges(editor.state);
4360
4360
  const groupedChanges = groupChanges(trackedChanges);
4361
+ const { tr } = editor.view.state;
4362
+ const { dispatch } = editor.view;
4361
4363
  groupedChanges.forEach(({ insertedMark, deletionMark, formatMark }, index2) => {
4362
4364
  console.debug(`Create comment for track change: ${index2}`);
4363
- const { dispatch } = editor.view;
4364
- const { tr } = editor.view.state;
4365
4365
  const foundComment = commentsList.value.find(
4366
4366
  (i) => i.commentId === insertedMark?.mark.attrs.id || i.commentId === deletionMark?.mark.attrs.id || i.commentId === formatMark?.mark.attrs.id
4367
4367
  );
@@ -4369,7 +4369,6 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
4369
4369
  if (foundComment) {
4370
4370
  if (isLastIteration) {
4371
4371
  tr.setMeta(CommentsPluginKey, { type: "force" });
4372
- dispatch(tr);
4373
4372
  }
4374
4373
  return;
4375
4374
  }
@@ -4382,9 +4381,9 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
4382
4381
  if (isLastIteration) tr.setMeta(CommentsPluginKey, { type: "force" });
4383
4382
  tr.setMeta(CommentsPluginKey, { type: "forceTrackChanges" });
4384
4383
  tr.setMeta(TrackChangesBasePluginKey, trackChangesPayload);
4385
- dispatch(tr);
4386
4384
  }
4387
4385
  });
4386
+ dispatch(tr);
4388
4387
  };
4389
4388
  const translateCommentsForExport = () => {
4390
4389
  const processedComments = [];
@@ -17249,7 +17248,7 @@ const _sfc_main = {
17249
17248
  __name: "SuperDoc",
17250
17249
  emits: ["selection-update"],
17251
17250
  setup(__props, { emit: __emit }) {
17252
- const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-DZ7nYZ_7.es.js"));
17251
+ const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-C9MkdsYe.es.js"));
17253
17252
  const superdocStore = useSuperdocStore();
17254
17253
  const commentsStore = useCommentsStore();
17255
17254
  const {
@@ -17415,6 +17414,7 @@ const _sfc_main = {
17415
17414
  };
17416
17415
  const editorOptions = (doc) => {
17417
17416
  const options = {
17417
+ isDebug: proxy.$superdoc.config.isDebug || false,
17418
17418
  pagination: proxy.$superdoc.config.pagination,
17419
17419
  documentId: doc.id,
17420
17420
  user: proxy.$superdoc.user,
@@ -17790,7 +17790,7 @@ const _sfc_main = {
17790
17790
  };
17791
17791
  }
17792
17792
  };
17793
- const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d64407d7"]]);
17793
+ const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-07532c12"]]);
17794
17794
  const createSuperdocVueApp = () => {
17795
17795
  const app = createApp(App);
17796
17796
  const pinia = createPinia();
@@ -17852,6 +17852,7 @@ class SuperDoc extends EventEmitter {
17852
17852
  toolbarIcons: {},
17853
17853
  toolbarTexts: {},
17854
17854
  isDev: false,
17855
+ // telemetry config
17855
17856
  telemetry: null,
17856
17857
  // Events
17857
17858
  onEditorBeforeCreate: () => null,
@@ -17891,7 +17892,7 @@ class SuperDoc extends EventEmitter {
17891
17892
  this.config.colors = shuffleArray(this.config.colors);
17892
17893
  this.userColorMap = /* @__PURE__ */ new Map();
17893
17894
  this.colorIndex = 0;
17894
- this.version = "0.16.2";
17895
+ this.version = "0.16.5";
17895
17896
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
17896
17897
  this.superdocId = config.superdocId || v4();
17897
17898
  this.colors = this.config.colors;
@@ -1,4 +1,4 @@
1
- import "./vue-xvq3uP6K.es.js";
1
+ import "./vue-CXxsqYcP.es.js";
2
2
  var buffer = {};
3
3
  var base64Js = {};
4
4
  base64Js.byteLength = byteLength;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- require("./vue-B6WOnFdF.cjs");
2
+ require("./vue-DWle4Cai.cjs");
3
3
  var buffer = {};
4
4
  var base64Js = {};
5
5
  base64Js.byteLength = byteLength;