@harbour-enterprises/superdoc 1.6.2-next.1 → 1.7.0-next.10

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 { B as BIT8, M as MAX_SAFE_INTEGER, c as create, a as BITS7, u as utf8TextDecoder, b as create$1, s as setIfUndefined, d as create$2, f as from, e as floor$1, g as equalityDeep, w as writeVarUint, h as writeVarString, t as toUint8Array, i as createEncoder, j as createInjectionKey, k as toString, l as throwError, m as useSsrAdapter, n as configProviderInjectionKey, o as cssrAnchorMetaName, p as globalStyle, q as cB, r as c, v as isMounted, x as commonVariables$2, y as cM, z as cNotM, A as cE, C as derived, D as changeColor, E as insideModal, F as insidePopover, G as resolveWrappedSlot, H as on, I as warnOnce, J as useConfig, K as useMergedState, L as useMemo, N as useTheme, O as useRtl, P as createKey, Q as useThemeClass, R as createId, S as call, T as render, U as messageProviderInjectionKey, V as messageApiInjectionKey, W as fromBase64, X as onChange, Y as varStorage, Z as toBase64, _ as createUint8ArrayFromArrayBuffer, $ as offChange, a0 as writeVarUint8Array, a1 as map, a2 as length, a3 as isNode, a4 as min, a5 as pow, a6 as comments_module_events, a7 as getFileObject, a8 as getTrackChanges, a9 as CommentsPluginKey, aa as TrackChangesBasePluginKey, ab as Editor, ac as getRichTextExtensions, ad as ellipsisVerticalSvg, ae as xmarkIconSvg, af as checkIconSvg, ag as caretDownIconSvg, ah as commentIconSvg, ai as _export_sfc, aj as NDropdown, ak as SuperInput, al as vClickOutside, am as PresentationEditor, an as SuperEditor, ao as AIWriter, ap as NConfigProvider, aq as SuperToolbar } from "./index-zOfz1dJM.es.js";
2
- import "./SuperConverter-C0XQKCFE.es.js";
1
+ import { B as BIT8, M as MAX_SAFE_INTEGER, c as create, a as BITS7, u as utf8TextDecoder, b as create$1, s as setIfUndefined, d as create$2, f as from, e as floor$1, g as equalityDeep, w as writeVarUint, h as writeVarString, t as toUint8Array, i as createEncoder, j as createInjectionKey, k as toString, l as throwError, m as useSsrAdapter, n as configProviderInjectionKey, o as cssrAnchorMetaName, p as globalStyle, q as cB, r as c, v as isMounted, x as commonVariables$2, y as cM, z as cNotM, A as cE, C as derived, D as changeColor, E as insideModal, F as insidePopover, G as resolveWrappedSlot, H as on, I as warnOnce, J as useConfig, K as useMergedState, L as useMemo, N as useTheme, O as useRtl, P as createKey, Q as useThemeClass, R as createId, S as call, T as render, U as messageProviderInjectionKey, V as messageApiInjectionKey, W as fromBase64, X as onChange, Y as varStorage, Z as toBase64, _ as createUint8ArrayFromArrayBuffer, $ as offChange, a0 as writeVarUint8Array, a1 as map, a2 as length, a3 as isNode, a4 as min, a5 as pow, a6 as comments_module_events, a7 as getFileObject, a8 as getTrackChanges, a9 as CommentsPluginKey, aa as TrackChangesBasePluginKey, ab as Editor, ac as getRichTextExtensions, ad as ellipsisVerticalSvg, ae as xmarkIconSvg, af as checkIconSvg, ag as caretDownIconSvg, ah as commentIconSvg, ai as _export_sfc, aj as NDropdown, ak as SuperInput, al as vClickOutside, am as PresentationEditor, an as SuperEditor, ao as AIWriter, ap as NConfigProvider, aq as SuperToolbar } from "./index-lM-AjL0q.es.js";
2
+ import "./SuperConverter-CsrXPsVn.es.js";
3
3
  import { B as BlankDOCX } from "./blank-docx-ABm6XYAA.es.js";
4
4
  import { E as EventEmitter } from "./eventemitter3-CwrdEv8r.es.js";
5
5
  import { HocuspocusProvider, HocuspocusProviderWebsocket } from "@hocuspocus/provider";
@@ -4662,6 +4662,11 @@ function useComment(params) {
4662
4662
  const createdTime = params.createdTime || Date.now();
4663
4663
  const importedAuthor = ref(params.importedAuthor || null);
4664
4664
  const docxCommentJSON = params.docxCommentJSON || null;
4665
+ const origin = params.origin;
4666
+ const threadingMethod = params.threadingMethod;
4667
+ const threadingStyleOverride = params.threadingStyleOverride;
4668
+ const threadingParentCommentId = params.threadingParentCommentId;
4669
+ const originalXmlStructure = params.originalXmlStructure;
4665
4670
  const commentText = ref(params.commentText || "");
4666
4671
  const selection = params.selection ? useSelection(params.selection) : useSelection({
4667
4672
  documentId: fileId,
@@ -4786,7 +4791,12 @@ function useComment(params) {
4786
4791
  deletedText: deletedText.value,
4787
4792
  resolvedTime: resolvedTime.value,
4788
4793
  resolvedByEmail: resolvedByEmail.value,
4789
- resolvedByName: resolvedByName.value
4794
+ resolvedByName: resolvedByName.value,
4795
+ origin,
4796
+ threadingMethod,
4797
+ threadingStyleOverride,
4798
+ threadingParentCommentId,
4799
+ originalXmlStructure
4790
4800
  };
4791
4801
  };
4792
4802
  return reactive({
@@ -4816,6 +4826,11 @@ function useComment(params) {
4816
4826
  resolvedByName,
4817
4827
  importedAuthor,
4818
4828
  docxCommentJSON,
4829
+ origin,
4830
+ threadingMethod,
4831
+ threadingStyleOverride,
4832
+ threadingParentCommentId,
4833
+ originalXmlStructure,
4819
4834
  // Actions
4820
4835
  setText,
4821
4836
  getValues,
@@ -4867,6 +4882,7 @@ function useDocument(params, superdocConfig) {
4867
4882
  const annotations = ref(params.annotations || []);
4868
4883
  const conversations = ref(initConversations());
4869
4884
  const conversationsBackup = ref(conversations.value);
4885
+ const commentThreadingProfile = ref(params.commentThreadingProfile || null);
4870
4886
  function initConversations() {
4871
4887
  if (!config.modules.comments) return [];
4872
4888
  return params.conversations?.map((c2) => useComment(c2)) || [];
@@ -4900,6 +4916,7 @@ function useDocument(params, superdocConfig) {
4900
4916
  fields,
4901
4917
  annotations,
4902
4918
  conversations,
4919
+ commentThreadingProfile,
4903
4920
  // Actions
4904
4921
  setEditor,
4905
4922
  getEditor,
@@ -5430,6 +5447,9 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
5430
5447
  };
5431
5448
  const processLoadedDocxComments = async ({ superdoc, editor, comments, documentId }) => {
5432
5449
  const document2 = superdocStore.getDocument(documentId);
5450
+ if (document2?.commentThreadingProfile) {
5451
+ document2.commentThreadingProfile.value = editor?.converter?.commentThreadingProfile || null;
5452
+ }
5433
5453
  comments.forEach((comment) => {
5434
5454
  const htmlContent = getHtmlFromComment(comment.textJson);
5435
5455
  if (!htmlContent && !comment.trackedChange) {
@@ -5463,6 +5483,8 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
5463
5483
  origin: comment.origin || "word",
5464
5484
  // Default to 'word' for backward compatibility
5465
5485
  threadingMethod: comment.threadingMethod,
5486
+ threadingStyleOverride: comment.threadingStyleOverride,
5487
+ threadingParentCommentId: comment.threadingParentCommentId,
5466
5488
  originalXmlStructure: comment.originalXmlStructure
5467
5489
  });
5468
5490
  addComment({ superdoc, comment: newComment });
@@ -7513,7 +7535,7 @@ const _sfc_main = {
7513
7535
  __name: "SuperDoc",
7514
7536
  emits: ["selection-update"],
7515
7537
  setup(__props, { emit: __emit }) {
7516
- const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-OL88sCWB.es.js"));
7538
+ const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-B7LI6tMT.es.js"));
7517
7539
  const superdocStore = useSuperdocStore();
7518
7540
  const commentsStore = useCommentsStore();
7519
7541
  const {
@@ -8467,7 +8489,7 @@ class SuperDoc extends EventEmitter {
8467
8489
  this.config.colors = shuffleArray(this.config.colors);
8468
8490
  this.userColorMap = /* @__PURE__ */ new Map();
8469
8491
  this.colorIndex = 0;
8470
- this.version = "1.6.2-next.1";
8492
+ this.version = "1.7.0-next.10";
8471
8493
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
8472
8494
  this.superdocId = config.superdocId || v4();
8473
8495
  this.colors = this.config.colors;