superdoc 0.34.4 → 0.34.6-RC1

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 (48) hide show
  1. package/dist/chunks/{PdfViewer-CcDvbfeP.cjs → PdfViewer-Cdq6hWaP.cjs} +2 -2
  2. package/dist/chunks/{PdfViewer-CL_-YyBC.es.js → PdfViewer-Yy390Dyv.es.js} +2 -2
  3. package/dist/chunks/{eventemitter3-hYlnBzSA.es.js → eventemitter3-BZXKb7j7.es.js} +1 -1
  4. package/dist/chunks/{eventemitter3-DmHNHvFX.cjs → eventemitter3-CFCpOk3d.cjs} +1 -1
  5. package/dist/chunks/{index-oLU8CBCH.es.js → index-M9d0bJ9k.es.js} +12 -7
  6. package/dist/chunks/{index-Cp_Yy4vP.cjs → index-QkGtTLUE.cjs} +12 -7
  7. package/dist/chunks/{index-DPjn4rpi-Bs9-iTbY.cjs → index-_8cQcYzu-CB4RkW2W.cjs} +1 -1
  8. package/dist/chunks/{index-DPjn4rpi-BwmVppCt.es.js → index-_8cQcYzu-Dj8Emsl2.es.js} +1 -1
  9. package/dist/chunks/{jszip-BP2FTbpi.cjs → jszip-B99MTu59.cjs} +1 -1
  10. package/dist/chunks/{jszip-jKrsZoMS.es.js → jszip-Duxs2YMV.es.js} +1 -1
  11. package/dist/chunks/{super-editor.es-C2FJLfJa.cjs → super-editor.es-C-hpEM8j.cjs} +794 -636
  12. package/dist/chunks/{super-editor.es-C350__qM.es.js → super-editor.es-kNY6AOSu.es.js} +747 -589
  13. package/dist/chunks/{vue-Cwv-wUpm.cjs → vue-ARQSyfaw.cjs} +2401 -2360
  14. package/dist/chunks/{vue-CKmzTNVs.es.js → vue-B5QAf5pA.es.js} +2401 -2360
  15. package/dist/chunks/xml-js-CVyfrKaV.es.js +2 -0
  16. package/dist/chunks/xml-js-DQa4Ye5C.cjs +3 -0
  17. package/dist/packages/superdoc/src/components/CommentsLayer/use-comment.d.ts.map +1 -1
  18. package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
  19. package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -1
  20. package/dist/packages/superdoc/src/stores/comments-store.d.ts.map +1 -1
  21. package/dist/super-editor/ai-writer.es.js +2 -2
  22. package/dist/super-editor/chunks/{converter-KW3z-Mzc.js → converter-Ddl2ZmKy.js} +416 -301
  23. package/dist/super-editor/chunks/{docx-zipper-CYtxqNuc.js → docx-zipper-D1BgiAWm.js} +1 -1
  24. package/dist/super-editor/chunks/{editor-CTHJwQNA.js → editor-B2T2u3JG.js} +65 -22
  25. package/dist/super-editor/chunks/{index-DPjn4rpi.js → index-_8cQcYzu.js} +1 -1
  26. package/dist/super-editor/chunks/{toolbar-BUz0UuKQ.js → toolbar-hyRTdNjv.js} +2 -2
  27. package/dist/super-editor/converter.es.js +1 -1
  28. package/dist/super-editor/docx-zipper.es.js +2 -2
  29. package/dist/super-editor/editor.es.js +3 -3
  30. package/dist/super-editor/file-zipper.es.js +1 -1
  31. package/dist/super-editor/super-editor/src/core/super-converter/helpers.d.ts.map +1 -1
  32. package/dist/super-editor/super-editor/src/core/super-converter/v2/exporter/commentsExporter.d.ts.map +1 -1
  33. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/del/del-translator.d.ts.map +1 -1
  34. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/ins/ins-translator.d.ts.map +1 -1
  35. package/dist/super-editor/super-editor/src/extensions/structured-content/structured-content-commands.d.ts +5 -0
  36. package/dist/super-editor/super-editor/src/extensions/structured-content/structured-content-commands.d.ts.map +1 -1
  37. package/dist/super-editor/super-editor/src/extensions/track-changes/permission-helpers.d.ts.map +1 -1
  38. package/dist/super-editor/super-editor.es.js +6 -6
  39. package/dist/super-editor/toolbar.es.js +2 -2
  40. package/dist/super-editor.cjs +2 -2
  41. package/dist/super-editor.es.js +2 -2
  42. package/dist/superdoc.cjs +2 -2
  43. package/dist/superdoc.es.js +2 -2
  44. package/dist/superdoc.umd.js +1141 -938
  45. package/dist/superdoc.umd.js.map +1 -1
  46. package/package.json +1 -1
  47. package/dist/chunks/xml-js-BSDu25I7.cjs +0 -3
  48. package/dist/chunks/xml-js-CBrRls0f.es.js +0 -2
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const vue = require("./vue-Cwv-wUpm.cjs");
4
- const superdoc = require("./index-Cp_Yy4vP.cjs");
3
+ const vue = require("./vue-ARQSyfaw.cjs");
4
+ const superdoc = require("./index-QkGtTLUE.cjs");
5
5
  function self(vars) {
6
6
  const {
7
7
  opacityDisabled,
@@ -1,5 +1,5 @@
1
- import { m as defineComponent, y as h, O as Transition, $ as process$1, J as watchEffect, a as computed, r as ref, j as onMounted, W as onUnmounted, b as createElementBlock, o as openBlock, f as createBaseVNode, e as createCommentVNode, v as createVNode, x as unref } from "./vue-CKmzTNVs.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-oLU8CBCH.es.js";
1
+ import { m as defineComponent, y as h, O as Transition, $ as process$1, J as watchEffect, a as computed, r as ref, j as onMounted, W as onUnmounted, b as createElementBlock, o as openBlock, f as createBaseVNode, e as createCommentVNode, v as createVNode, x as unref } from "./vue-B5QAf5pA.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-M9d0bJ9k.es.js";
3
3
  function self(vars) {
4
4
  const {
5
5
  opacityDisabled,
@@ -1,4 +1,4 @@
1
- import { g as getDefaultExportFromCjs } from "./jszip-jKrsZoMS.es.js";
1
+ import { g as getDefaultExportFromCjs } from "./jszip-Duxs2YMV.es.js";
2
2
  var eventemitter3 = { exports: {} };
3
3
  var hasRequiredEventemitter3;
4
4
  function requireEventemitter3() {
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const jszip = require("./jszip-BP2FTbpi.cjs");
2
+ const jszip = require("./jszip-B99MTu59.cjs");
3
3
  var eventemitter3 = { exports: {} };
4
4
  var hasRequiredEventemitter3;
5
5
  function requireEventemitter3() {
@@ -1,11 +1,11 @@
1
- import { q as index, 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-C350__qM.es.js";
1
+ import { q as index, 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-kNY6AOSu.es.js";
2
2
  import { B as BlankDOCX } from "./blank-docx-ABm6XYAA.es.js";
3
- import { E as EventEmitter } from "./eventemitter3-hYlnBzSA.es.js";
3
+ import { E as EventEmitter } from "./eventemitter3-BZXKb7j7.es.js";
4
4
  import { HocuspocusProvider, HocuspocusProviderWebsocket } from "@hocuspocus/provider";
5
- import { a0 as effectScope, r as ref, _ as markRaw, $ as process$1, a1 as toRaw, a as computed, a2 as isRef, a3 as isReactive, E 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, A as shallowRef, N as readonly, j as onMounted, k as onBeforeUnmount, h as onBeforeMount, S as onActivated, q as onDeactivated, C as createTextVNode, F as Fragment, Q as Comment, m as defineComponent, G as provide, I as withDirectives, y as h, U as Teleport, R as renderSlot, V as isVNode, J as watchEffect, O as Transition, a8 as TransitionGroup, z as mergeProps, P as vShow, H as cloneVNode, T as Text, b as createElementBlock, o as openBlock, t as toDisplayString, v as createVNode, B as withCtx, f as createBaseVNode, D as normalizeStyle, e as createCommentVNode, u as createBlock, w as withModifiers, n as normalizeClass, a9 as resolveDirective, d as renderList, c as createApp, X as resolveDynamicComponent, aa as defineAsyncComponent } from "./vue-CKmzTNVs.es.js";
5
+ import { a0 as effectScope, r as ref, _ as markRaw, $ as process$1, a1 as toRaw, a as computed, a2 as isRef, a3 as isReactive, E 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, A as shallowRef, N as readonly, j as onMounted, k as onBeforeUnmount, h as onBeforeMount, S as onActivated, q as onDeactivated, C as createTextVNode, F as Fragment, Q as Comment, m as defineComponent, G as provide, I as withDirectives, y as h, U as Teleport, R as renderSlot, V as isVNode, J as watchEffect, O as Transition, a8 as TransitionGroup, z as mergeProps, P as vShow, H as cloneVNode, T as Text, b as createElementBlock, o as openBlock, t as toDisplayString, v as createVNode, B as withCtx, f as createBaseVNode, D as normalizeStyle, e as createCommentVNode, u as createBlock, w as withModifiers, n as normalizeClass, a9 as resolveDirective, d as renderList, c as createApp, X as resolveDynamicComponent, aa as defineAsyncComponent } from "./vue-B5QAf5pA.es.js";
6
6
  import * as Y from "yjs";
7
7
  import { Doc, Map as Map$2 } from "yjs";
8
- import { B as Buffer$2 } from "./jszip-jKrsZoMS.es.js";
8
+ import { B as Buffer$2 } from "./jszip-Duxs2YMV.es.js";
9
9
  import { v as v4 } from "./uuid-CjlX8hrF.es.js";
10
10
  const DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
11
11
  const PDF = "application/pdf";
@@ -3462,6 +3462,7 @@ function useComment(params2) {
3462
3462
  const creatorImage = params2.creatorImage;
3463
3463
  const createdTime = params2.createdTime || Date.now();
3464
3464
  const importedAuthor = ref(params2.importedAuthor || null);
3465
+ const docxCommentJSON = params2.docxCommentJSON || null;
3465
3466
  const commentText = ref(params2.commentText || "");
3466
3467
  const selection = params2.selection ? useSelection(params2.selection) : useSelection({
3467
3468
  documentId: fileId,
@@ -3576,6 +3577,7 @@ function useComment(params2) {
3576
3577
  creatorImage,
3577
3578
  createdTime,
3578
3579
  importedAuthor: importedAuthor.value,
3580
+ docxCommentJSON,
3579
3581
  isInternal: isInternal.value,
3580
3582
  commentText: commentText.value,
3581
3583
  selection: selection ? selection.getValues() : null,
@@ -3614,6 +3616,7 @@ function useComment(params2) {
3614
3616
  resolvedByEmail,
3615
3617
  resolvedByName,
3616
3618
  importedAuthor,
3619
+ docxCommentJSON,
3617
3620
  // Actions
3618
3621
  setText,
3619
3622
  getValues,
@@ -4190,6 +4193,8 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
4190
4193
  const newComment = useComment({
4191
4194
  fileId: documentId,
4192
4195
  fileType: document2.type,
4196
+ // Preserve original DOCX-schema comment JSON so exporter can reuse it
4197
+ docxCommentJSON: comment.textJson,
4193
4198
  commentId: comment.commentId,
4194
4199
  isInternal: false,
4195
4200
  parentCommentId: comment.parentCommentId,
@@ -4250,7 +4255,7 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
4250
4255
  commentsList.value.forEach((comment) => {
4251
4256
  const values = comment.getValues();
4252
4257
  const richText = values.commentText;
4253
- const schema = convertHtmlToSchema(richText);
4258
+ const schema = values.docxCommentJSON || convertHtmlToSchema(richText);
4254
4259
  processedComments.push({
4255
4260
  ...values,
4256
4261
  commentJSON: schema
@@ -17202,7 +17207,7 @@ const _sfc_main = {
17202
17207
  __name: "SuperDoc",
17203
17208
  emits: ["selection-update"],
17204
17209
  setup(__props, { emit: __emit }) {
17205
- const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-CL_-YyBC.es.js"));
17210
+ const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-Yy390Dyv.es.js"));
17206
17211
  const superdocStore = useSuperdocStore();
17207
17212
  const commentsStore = useCommentsStore();
17208
17213
  const {
@@ -17966,7 +17971,7 @@ class SuperDoc extends EventEmitter {
17966
17971
  this.config.colors = shuffleArray(this.config.colors);
17967
17972
  this.userColorMap = /* @__PURE__ */ new Map();
17968
17973
  this.colorIndex = 0;
17969
- this.version = "0.34.4";
17974
+ this.version = "0.34.6-RC1";
17970
17975
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
17971
17976
  this.superdocId = config.superdocId || v4();
17972
17977
  this.colors = this.config.colors;
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
- const superEditor_es = require("./super-editor.es-C2FJLfJa.cjs");
2
+ const superEditor_es = require("./super-editor.es-C-hpEM8j.cjs");
3
3
  const blankDocx = require("./blank-docx-DfW3Eeh2.cjs");
4
- const eventemitter3 = require("./eventemitter3-DmHNHvFX.cjs");
4
+ const eventemitter3 = require("./eventemitter3-CFCpOk3d.cjs");
5
5
  const provider = require("@hocuspocus/provider");
6
- const vue = require("./vue-Cwv-wUpm.cjs");
6
+ const vue = require("./vue-ARQSyfaw.cjs");
7
7
  const Y = require("yjs");
8
- const jszip = require("./jszip-BP2FTbpi.cjs");
8
+ const jszip = require("./jszip-B99MTu59.cjs");
9
9
  const uuid = require("./uuid-R7L08bOx.cjs");
10
10
  function _interopNamespaceDefault(e) {
11
11
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
@@ -3479,6 +3479,7 @@ function useComment(params2) {
3479
3479
  const creatorImage = params2.creatorImage;
3480
3480
  const createdTime = params2.createdTime || Date.now();
3481
3481
  const importedAuthor = vue.ref(params2.importedAuthor || null);
3482
+ const docxCommentJSON = params2.docxCommentJSON || null;
3482
3483
  const commentText = vue.ref(params2.commentText || "");
3483
3484
  const selection = params2.selection ? useSelection(params2.selection) : useSelection({
3484
3485
  documentId: fileId,
@@ -3593,6 +3594,7 @@ function useComment(params2) {
3593
3594
  creatorImage,
3594
3595
  createdTime,
3595
3596
  importedAuthor: importedAuthor.value,
3597
+ docxCommentJSON,
3596
3598
  isInternal: isInternal.value,
3597
3599
  commentText: commentText.value,
3598
3600
  selection: selection ? selection.getValues() : null,
@@ -3631,6 +3633,7 @@ function useComment(params2) {
3631
3633
  resolvedByEmail,
3632
3634
  resolvedByName,
3633
3635
  importedAuthor,
3636
+ docxCommentJSON,
3634
3637
  // Actions
3635
3638
  setText,
3636
3639
  getValues,
@@ -4207,6 +4210,8 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
4207
4210
  const newComment = useComment({
4208
4211
  fileId: documentId,
4209
4212
  fileType: document2.type,
4213
+ // Preserve original DOCX-schema comment JSON so exporter can reuse it
4214
+ docxCommentJSON: comment.textJson,
4210
4215
  commentId: comment.commentId,
4211
4216
  isInternal: false,
4212
4217
  parentCommentId: comment.parentCommentId,
@@ -4267,7 +4272,7 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
4267
4272
  commentsList.value.forEach((comment) => {
4268
4273
  const values = comment.getValues();
4269
4274
  const richText = values.commentText;
4270
- const schema = convertHtmlToSchema(richText);
4275
+ const schema = values.docxCommentJSON || convertHtmlToSchema(richText);
4271
4276
  processedComments.push({
4272
4277
  ...values,
4273
4278
  commentJSON: schema
@@ -17219,7 +17224,7 @@ const _sfc_main = {
17219
17224
  __name: "SuperDoc",
17220
17225
  emits: ["selection-update"],
17221
17226
  setup(__props, { emit: __emit }) {
17222
- const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-CcDvbfeP.cjs")));
17227
+ const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-Cdq6hWaP.cjs")));
17223
17228
  const superdocStore = useSuperdocStore();
17224
17229
  const commentsStore = useCommentsStore();
17225
17230
  const {
@@ -17983,7 +17988,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
17983
17988
  this.config.colors = shuffleArray(this.config.colors);
17984
17989
  this.userColorMap = /* @__PURE__ */ new Map();
17985
17990
  this.colorIndex = 0;
17986
- this.version = "0.34.4";
17991
+ this.version = "0.34.6-RC1";
17987
17992
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
17988
17993
  this.superdocId = config.superdocId || uuid.v4();
17989
17994
  this.colors = this.config.colors;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const superEditor_es = require("./super-editor.es-C2FJLfJa.cjs");
3
+ const superEditor_es = require("./super-editor.es-C-hpEM8j.cjs");
4
4
  const indexCvBqQJbG = require("./index-CvBqQJbG-Dwm0THD7.cjs");
5
5
  function bail(error) {
6
6
  if (error) {
@@ -1,4 +1,4 @@
1
- import { s as getDefaultExportFromCjs$2 } from "./super-editor.es-C350__qM.es.js";
1
+ import { s as getDefaultExportFromCjs$2 } from "./super-editor.es-kNY6AOSu.es.js";
2
2
  import { V as VFile } from "./index-CvBqQJbG-CvBqQJbG.es.js";
3
3
  function bail(error) {
4
4
  if (error) {
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- require("./vue-Cwv-wUpm.cjs");
2
+ require("./vue-ARQSyfaw.cjs");
3
3
  function getDefaultExportFromCjs(x) {
4
4
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
5
5
  }
@@ -1,4 +1,4 @@
1
- import "./vue-CKmzTNVs.es.js";
1
+ import "./vue-B5QAf5pA.es.js";
2
2
  function getDefaultExportFromCjs(x) {
3
3
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
4
4
  }