@harbour-enterprises/superdoc 0.23.0-next.3 → 0.23.0-next.5

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 (42) hide show
  1. package/dist/chunks/{PdfViewer-BfGJJ5Fk.es.js → PdfViewer-BlOezZGN.es.js} +2 -2
  2. package/dist/chunks/{PdfViewer-Cm-ziNtE.cjs → PdfViewer-D89-VJvM.cjs} +2 -2
  3. package/dist/chunks/{eventemitter3-CZv6vEhA.es.js → eventemitter3-CR2eBWft.es.js} +1 -1
  4. package/dist/chunks/{eventemitter3-B_kO1Pxm.cjs → eventemitter3-DSRogsNq.cjs} +1 -1
  5. package/dist/chunks/{index-CJIVhJxE.cjs → index-9hY1WuxT.cjs} +30 -13
  6. package/dist/chunks/{index-Bl4NtKeS.es.js → index-DTw4eF5D.es.js} +30 -13
  7. package/dist/chunks/{jszip-b7l8QkfH.cjs → jszip-B4LDL19y.cjs} +1 -1
  8. package/dist/chunks/{jszip-B8KIZSNe.es.js → jszip-DAXEPCUv.es.js} +1 -1
  9. package/dist/chunks/{super-editor.es-C7stybby.cjs → super-editor.es-C8gNFcB_.cjs} +81 -23
  10. package/dist/chunks/{super-editor.es-DQnqUJZs.es.js → super-editor.es-C9Ql0kHS.es.js} +81 -23
  11. package/dist/chunks/{vue-DWle4Cai.cjs → vue-DKMj1I9B.cjs} +39 -42
  12. package/dist/chunks/{vue-CXxsqYcP.es.js → vue-ZWZLQtoU.es.js} +39 -42
  13. package/dist/chunks/xml-js-Bbc0NeKa.es.js +2 -0
  14. package/dist/chunks/xml-js-CWV8R-ek.cjs +3 -0
  15. package/dist/core/SuperDoc.d.ts.map +1 -1
  16. package/dist/core/types/index.d.ts.map +1 -1
  17. package/dist/stores/superdoc-store.d.ts.map +1 -1
  18. package/dist/style.css +27 -27
  19. package/dist/super-editor/ai-writer.es.js +2 -2
  20. package/dist/super-editor/chunks/{converter-BVirrB35.js → converter-ClnqoStR.js} +16 -18
  21. package/dist/super-editor/chunks/{docx-zipper-Cpb9d2an.js → docx-zipper-DC28ucAi.js} +1 -1
  22. package/dist/super-editor/chunks/{editor-DIINh50j.js → editor-DLan-MJ6.js} +66 -6
  23. package/dist/super-editor/chunks/{toolbar-CmDmkPHL.js → toolbar-CekMv4Mk.js} +2 -2
  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/core/Attribute.d.ts +2 -2
  29. package/dist/super-editor/src/core/Schema.d.ts +2 -2
  30. package/dist/super-editor/src/extensions/structured-content/structuredContentHelpers/getStructuredContentTagsByAlias.d.ts +8 -0
  31. package/dist/super-editor/src/extensions/structured-content/structuredContentHelpers/index.d.ts +1 -0
  32. package/dist/super-editor/super-editor.es.js +6 -6
  33. package/dist/super-editor/toolbar.es.js +2 -2
  34. package/dist/super-editor.cjs +2 -2
  35. package/dist/super-editor.es.js +2 -2
  36. package/dist/superdoc.cjs +4 -4
  37. package/dist/superdoc.es.js +4 -4
  38. package/dist/superdoc.umd.js +139 -64
  39. package/dist/superdoc.umd.js.map +1 -1
  40. package/package.json +1 -1
  41. package/dist/chunks/xml-js-CX8FH0He.cjs +0 -3
  42. package/dist/chunks/xml-js-D0tLGmKu.es.js +0 -2
@@ -20,7 +20,7 @@
20
20
  }
21
21
  const Y__namespace = /* @__PURE__ */ _interopNamespaceDefault(Y);
22
22
  /**
23
- * @vue/shared v3.5.21
23
+ * @vue/shared v3.5.22
24
24
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
25
25
  * @license MIT
26
26
  **/
@@ -915,7 +915,7 @@
915
915
  iter._next = iter.next;
916
916
  iter.next = () => {
917
917
  const result = iter._next();
918
- if (result.value) {
918
+ if (!result.done) {
919
919
  result.value = wrapValue(result.value);
920
920
  }
921
921
  return result;
@@ -1041,7 +1041,8 @@
1041
1041
  return res;
1042
1042
  }
1043
1043
  if (isRef(res)) {
1044
- return targetIsArray && isIntegerKey(key2) ? res : res.value;
1044
+ const value = targetIsArray && isIntegerKey(key2) ? res : res.value;
1045
+ return isReadonly2 && isObject$3(value) ? readonly(value) : value;
1045
1046
  }
1046
1047
  if (isObject$3(res)) {
1047
1048
  return isReadonly2 ? readonly(res) : reactive(res);
@@ -2214,9 +2215,6 @@
2214
2215
  insert(mainAnchor, container, anchor);
2215
2216
  const mount2 = (container2, anchor2) => {
2216
2217
  if (shapeFlag & 16) {
2217
- if (parentComponent && parentComponent.isCE) {
2218
- parentComponent.ce._teleportTarget = container2;
2219
- }
2220
2218
  mountChildren(
2221
2219
  children,
2222
2220
  container2,
@@ -2238,6 +2236,9 @@
2238
2236
  } else if (namespace2 !== "mathml" && isTargetMathML(target)) {
2239
2237
  namespace2 = "mathml";
2240
2238
  }
2239
+ if (parentComponent && parentComponent.isCE) {
2240
+ (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
2241
+ }
2241
2242
  if (!disabled) {
2242
2243
  mount2(target, targetAnchor);
2243
2244
  updateCssVars(n2, false);
@@ -3326,11 +3327,12 @@
3326
3327
  }
3327
3328
  function renderSlot(slots, name, props = {}, fallback, noSlotted) {
3328
3329
  if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
3330
+ const hasProps = Object.keys(props).length > 0;
3329
3331
  return openBlock(), createBlock(
3330
3332
  Fragment$1,
3331
3333
  null,
3332
3334
  [createVNode("slot", props, fallback)],
3333
- 64
3335
+ hasProps ? -2 : 64
3334
3336
  );
3335
3337
  }
3336
3338
  let slot = slots[name];
@@ -6720,34 +6722,31 @@
6720
6722
  return c2;
6721
6723
  };
6722
6724
  function h$1(type2, propsOrChildren, children) {
6723
- const doCreateVNode = (type22, props, children2) => {
6725
+ try {
6724
6726
  setBlockTracking(-1);
6725
- try {
6726
- return createVNode(type22, props, children2);
6727
- } finally {
6728
- setBlockTracking(1);
6729
- }
6730
- };
6731
- const l = arguments.length;
6732
- if (l === 2) {
6733
- if (isObject$3(propsOrChildren) && !isArray$3(propsOrChildren)) {
6734
- if (isVNode(propsOrChildren)) {
6735
- return doCreateVNode(type2, null, [propsOrChildren]);
6727
+ const l = arguments.length;
6728
+ if (l === 2) {
6729
+ if (isObject$3(propsOrChildren) && !isArray$3(propsOrChildren)) {
6730
+ if (isVNode(propsOrChildren)) {
6731
+ return createVNode(type2, null, [propsOrChildren]);
6732
+ }
6733
+ return createVNode(type2, propsOrChildren);
6734
+ } else {
6735
+ return createVNode(type2, null, propsOrChildren);
6736
6736
  }
6737
- return doCreateVNode(type2, propsOrChildren);
6738
6737
  } else {
6739
- return doCreateVNode(type2, null, propsOrChildren);
6740
- }
6741
- } else {
6742
- if (l > 3) {
6743
- children = Array.prototype.slice.call(arguments, 2);
6744
- } else if (l === 3 && isVNode(children)) {
6745
- children = [children];
6738
+ if (l > 3) {
6739
+ children = Array.prototype.slice.call(arguments, 2);
6740
+ } else if (l === 3 && isVNode(children)) {
6741
+ children = [children];
6742
+ }
6743
+ return createVNode(type2, propsOrChildren, children);
6746
6744
  }
6747
- return doCreateVNode(type2, propsOrChildren, children);
6745
+ } finally {
6746
+ setBlockTracking(1);
6748
6747
  }
6749
6748
  }
6750
- const version$1 = "3.5.21";
6749
+ const version$1 = "3.5.22";
6751
6750
  let policy = void 0;
6752
6751
  const tt = typeof window !== "undefined" && window.trustedTypes;
6753
6752
  if (tt) {
@@ -6953,11 +6952,11 @@
6953
6952
  const resolve2 = () => finishLeave(el, done);
6954
6953
  addTransitionClass(el, leaveFromClass);
6955
6954
  if (!el._enterCancelled) {
6956
- forceReflow();
6955
+ forceReflow(el);
6957
6956
  addTransitionClass(el, leaveActiveClass);
6958
6957
  } else {
6959
6958
  addTransitionClass(el, leaveActiveClass);
6960
- forceReflow();
6959
+ forceReflow(el);
6961
6960
  }
6962
6961
  nextFrame(() => {
6963
6962
  if (!el._isLeaving) {
@@ -7100,8 +7099,9 @@
7100
7099
  if (s === "auto") return 0;
7101
7100
  return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
7102
7101
  }
7103
- function forceReflow() {
7104
- return document.body.offsetHeight;
7102
+ function forceReflow(el) {
7103
+ const targetDocument = el ? el.ownerDocument : document;
7104
+ return targetDocument.body.offsetHeight;
7105
7105
  }
7106
7106
  function patchClass(el, value, isSVG2) {
7107
7107
  const transitionClasses = el[vtcKey];
@@ -7487,7 +7487,7 @@
7487
7487
  prevChildren.forEach(callPendingCbs);
7488
7488
  prevChildren.forEach(recordPosition);
7489
7489
  const movedChildren = prevChildren.filter(applyTranslation);
7490
- forceReflow();
7490
+ forceReflow(instance.vnode.el);
7491
7491
  movedChildren.forEach((c2) => {
7492
7492
  const el = c2.el;
7493
7493
  const style2 = el.style;
@@ -12836,6 +12836,19 @@
12836
12836
  };
12837
12837
  return safeRegexTest;
12838
12838
  }
12839
+ var generatorFunction;
12840
+ var hasRequiredGeneratorFunction;
12841
+ function requireGeneratorFunction() {
12842
+ if (hasRequiredGeneratorFunction) return generatorFunction;
12843
+ hasRequiredGeneratorFunction = 1;
12844
+ const cached = (
12845
+ /** @type {GeneratorFunctionConstructor} */
12846
+ function* () {
12847
+ }.constructor
12848
+ );
12849
+ generatorFunction = () => cached;
12850
+ return generatorFunction;
12851
+ }
12839
12852
  var isGeneratorFunction;
12840
12853
  var hasRequiredIsGeneratorFunction;
12841
12854
  function requireIsGeneratorFunction() {
@@ -12848,16 +12861,7 @@
12848
12861
  var getProto2 = requireGetProto();
12849
12862
  var toStr = callBound2("Object.prototype.toString");
12850
12863
  var fnToStr = callBound2("Function.prototype.toString");
12851
- var getGeneratorFunc = function() {
12852
- if (!hasToStringTag) {
12853
- return false;
12854
- }
12855
- try {
12856
- return Function("return function*() {}")();
12857
- } catch (e) {
12858
- }
12859
- };
12860
- var GeneratorFunction;
12864
+ var getGeneratorFunction = /* @__PURE__ */ requireGeneratorFunction();
12861
12865
  isGeneratorFunction = function isGeneratorFunction2(fn) {
12862
12866
  if (typeof fn !== "function") {
12863
12867
  return false;
@@ -12872,14 +12876,8 @@
12872
12876
  if (!getProto2) {
12873
12877
  return false;
12874
12878
  }
12875
- if (typeof GeneratorFunction === "undefined") {
12876
- var generatorFunc = getGeneratorFunc();
12877
- GeneratorFunction = generatorFunc ? (
12878
- /** @type {GeneratorFunctionConstructor} */
12879
- getProto2(generatorFunc)
12880
- ) : false;
12881
- }
12882
- return getProto2(fn) === GeneratorFunction;
12879
+ var GeneratorFunction = getGeneratorFunction();
12880
+ return GeneratorFunction && getProto2(fn) === GeneratorFunction.prototype;
12883
12881
  };
12884
12882
  return isGeneratorFunction;
12885
12883
  }
@@ -49790,8 +49788,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
49790
49788
  let $to = parse.doc.resolveNoCache(change.endB - parse.from);
49791
49789
  let $fromA = doc2.resolve(change.start);
49792
49790
  let inlineChange = $from.sameParent($to) && $from.parent.inlineContent && $fromA.end() >= change.endA;
49793
- let nextSel;
49794
- if ((ios && view.input.lastIOSEnter > Date.now() - 225 && (!inlineChange || addedNodes.some((n) => n.nodeName == "DIV" || n.nodeName == "P")) || !inlineChange && $from.pos < parse.doc.content.size && (!$from.sameParent($to) || !$from.parent.inlineContent) && !/\S/.test(parse.doc.textBetween($from.pos, $to.pos, "", "")) && (nextSel = Selection.findFrom(parse.doc.resolve($from.pos + 1), 1, true)) && nextSel.head > $from.pos) && view.someProp("handleKeyDown", (f) => f(view, keyEvent(13, "Enter")))) {
49791
+ if ((ios && view.input.lastIOSEnter > Date.now() - 225 && (!inlineChange || addedNodes.some((n) => n.nodeName == "DIV" || n.nodeName == "P")) || !inlineChange && $from.pos < parse.doc.content.size && (!$from.sameParent($to) || !$from.parent.inlineContent) && $from.pos < $to.pos && !/\S/.test(parse.doc.textBetween($from.pos, $to.pos, "", ""))) && view.someProp("handleKeyDown", (f) => f(view, keyEvent(13, "Enter")))) {
49795
49792
  view.input.lastIOSEnter = 0;
49796
49793
  return;
49797
49794
  }
@@ -61935,6 +61932,17 @@ Please report this to https://github.com/markedjs/marked.`, e) {
61935
61932
  });
61936
61933
  return result;
61937
61934
  }
61935
+ function getStructuredContentTagsByAlias(aliasOrAliases, state2) {
61936
+ const result = findChildren$5(state2.doc, (node) => {
61937
+ const isStructuredContent = ["structuredContent", "structuredContentBlock"].includes(node.type.name);
61938
+ if (Array.isArray(aliasOrAliases)) {
61939
+ return isStructuredContent && aliasOrAliases.includes(node.attrs.alias);
61940
+ } else {
61941
+ return isStructuredContent && node.attrs.alias === aliasOrAliases;
61942
+ }
61943
+ });
61944
+ return result;
61945
+ }
61938
61946
  function getStructuredContentTags(state2) {
61939
61947
  const result = findChildren$5(state2.doc, (node) => {
61940
61948
  return node.type.name === "structuredContent" || node.type.name === "structuredContentBlock";
@@ -61954,6 +61962,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
61954
61962
  getStructuredContentBlockTags,
61955
61963
  getStructuredContentInlineTags,
61956
61964
  getStructuredContentTags,
61965
+ getStructuredContentTagsByAlias,
61957
61966
  getStructuredContentTagsById
61958
61967
  }, Symbol.toStringTag, { value: "Module" }));
61959
61968
  const STRUCTURED_CONTENT_NAMES = ["structuredContent", "structuredContentBlock"];
@@ -62042,10 +62051,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
62042
62051
  return true;
62043
62052
  },
62044
62053
  /**
62045
- * Updates a structured content attributes or content.
62054
+ * Updates a single structured content field by its unique ID.
62055
+ * IDs are unique identifiers, so this will update at most one field.
62046
62056
  * If the updated node does not match the schema, it will not be updated.
62047
62057
  * @category Command
62048
- * @param {string} id
62058
+ * @param {string} id - Unique identifier of the field
62049
62059
  * @param {StructuredContentUpdate} options
62050
62060
  */
62051
62061
  updateStructuredContentById: (id, options = {}) => ({ editor, dispatch, state: state2, tr }) => {
@@ -62085,6 +62095,54 @@ Please report this to https://github.com/markedjs/marked.`, e) {
62085
62095
  }
62086
62096
  return true;
62087
62097
  },
62098
+ /**
62099
+ * Updates all structured content fields with the same alias.
62100
+ * Unlike IDs (which are unique), aliases can be shared across multiple fields.
62101
+ * This will update every field that matches the given alias.
62102
+ * If any updated node does not match the schema, no updates will be applied.
62103
+ * @category Command
62104
+ * @param {string} alias - Shared identifier for fields (e.g., "customer_name")
62105
+ * @param {StructuredContentUpdate} options
62106
+ */
62107
+ updateStructuredContentByAlias: (alias, options = {}) => ({ editor, dispatch, state: state2, tr }) => {
62108
+ const structuredContentTags = getStructuredContentTagsByAlias(alias, state2);
62109
+ if (!structuredContentTags.length) {
62110
+ return true;
62111
+ }
62112
+ const { schema } = editor;
62113
+ const updates = [];
62114
+ for (const { pos, node } of structuredContentTags) {
62115
+ let content = null;
62116
+ if (options.text) {
62117
+ content = schema.text(options.text);
62118
+ }
62119
+ if (options.html) {
62120
+ const html = htmlHandler(options.html, editor);
62121
+ const doc2 = DOMParser$1.fromSchema(schema).parse(html);
62122
+ content = doc2.content;
62123
+ }
62124
+ if (options.json) {
62125
+ content = schema.nodeFromJSON(options.json);
62126
+ }
62127
+ if (!content) {
62128
+ content = node.content;
62129
+ }
62130
+ const updatedNode = node.type.create({ ...node.attrs, ...options.attrs }, content, node.marks);
62131
+ try {
62132
+ updatedNode.check();
62133
+ updates.push({ pos, node: updatedNode, size: node.nodeSize });
62134
+ } catch {
62135
+ console.error("Updated node does not conform to the schema");
62136
+ return false;
62137
+ }
62138
+ }
62139
+ if (dispatch) {
62140
+ updates.reverse().forEach(({ pos, node, size: size2 }) => {
62141
+ tr.replaceWith(pos, pos + size2, node);
62142
+ });
62143
+ }
62144
+ return true;
62145
+ },
62088
62146
  /**
62089
62147
  * Removes a structured content.
62090
62148
  * @category Command
@@ -97457,6 +97515,9 @@ ${reason}`);
97457
97515
  documentUsers.value = configUsers || [];
97458
97516
  Object.assign(user, configUser);
97459
97517
  Object.assign(modules, configModules);
97518
+ if (!Object.prototype.hasOwnProperty.call(modules, "comments")) {
97519
+ modules.comments = {};
97520
+ }
97460
97521
  if (!configDocs?.length && !config2.modules.collaboration) {
97461
97522
  const newDoc = await getFileObject(BlankDOCX, "blank.docx", DOCX);
97462
97523
  const newDocConfig = {
@@ -111047,6 +111108,11 @@ ${style2}
111047
111108
  const { proxy } = getCurrentInstance();
111048
111109
  commentsStore.proxy = proxy;
111049
111110
  const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode();
111111
+ const commentsModuleConfig = computed(() => {
111112
+ const config2 = modules.comments;
111113
+ if (config2 === false || config2 == null) return null;
111114
+ return config2;
111115
+ });
111050
111116
  const layers = ref$1(null);
111051
111117
  const commentsLayer = ref$1(null);
111052
111118
  const toolsMenuPosition = reactive({ top: null, right: "-25px", zIndex: 101 });
@@ -111194,7 +111260,7 @@ ${style2}
111194
111260
  rulers: doc2.rulers,
111195
111261
  isInternal: proxy.$superdoc.config.isInternal,
111196
111262
  annotations: proxy.$superdoc.config.annotations,
111197
- isCommentsEnabled: proxy.$superdoc.config.modules?.comments,
111263
+ isCommentsEnabled: Boolean(commentsModuleConfig.value),
111198
111264
  isAiEnabled: proxy.$superdoc.config.modules?.ai,
111199
111265
  slashMenuConfig: proxy.$superdoc.config.modules?.slashMenu,
111200
111266
  onBeforeCreate: onEditorBeforeCreate,
@@ -111225,7 +111291,8 @@ ${style2}
111225
111291
  return options;
111226
111292
  };
111227
111293
  const onEditorCommentLocationsUpdate = ({ allCommentIds: activeThreadId, allCommentPositions }) => {
111228
- if (!proxy.$superdoc.config.modules?.comments) return;
111294
+ const commentsConfig = proxy.$superdoc.config.modules?.comments;
111295
+ if (!commentsConfig || commentsConfig === false) return;
111229
111296
  handleEditorLocationsUpdate(allCommentPositions, activeThreadId);
111230
111297
  };
111231
111298
  const onEditorCommentsUpdate = (params2 = {}) => {
@@ -111247,7 +111314,7 @@ ${style2}
111247
111314
  proxy.$superdoc.config.onTransaction({ editor, transaction, duration: duration2 });
111248
111315
  }
111249
111316
  };
111250
- const isCommentsEnabled = computed(() => "comments" in modules);
111317
+ const isCommentsEnabled = computed(() => Boolean(commentsModuleConfig.value));
111251
111318
  const showCommentsSidebar = computed(() => {
111252
111319
  return pendingComment.value || getFloatingComments.value?.length > 0 && isReady.value && layers.value && isCommentsEnabled.value && !isCommentsListVisible.value;
111253
111320
  });
@@ -111257,13 +111324,14 @@ ${style2}
111257
111324
  });
111258
111325
  computed(() => {
111259
111326
  if (!isCommentsEnabled.value) return false;
111260
- !getConfig?.readOnly && selectionPosition.value;
111327
+ return !getConfig.value?.readOnly && selectionPosition.value;
111261
111328
  });
111262
111329
  watch(showCommentsSidebar, (value) => {
111263
111330
  proxy.$superdoc.broadcastSidebarToggle(value);
111264
111331
  });
111265
111332
  const scrollToComment = (commentId) => {
111266
- if (!proxy.$superdoc.config?.modules?.comments) return;
111333
+ const commentsConfig = proxy.$superdoc.config?.modules?.comments;
111334
+ if (!commentsConfig || commentsConfig === false) return;
111267
111335
  const element = document.querySelector(`[data-thread-id=${commentId}]`);
111268
111336
  if (element) {
111269
111337
  element.scrollIntoView({ behavior: "smooth", block: "start" });
@@ -111271,7 +111339,8 @@ ${style2}
111271
111339
  }
111272
111340
  };
111273
111341
  onMounted(() => {
111274
- if (isCommentsEnabled.value && !modules.comments.readOnly) {
111342
+ const config2 = commentsModuleConfig.value;
111343
+ if (config2 && !config2.readOnly) {
111275
111344
  document.addEventListener("mousedown", handleDocumentMouseDown);
111276
111345
  }
111277
111346
  });
@@ -111393,6 +111462,7 @@ ${style2}
111393
111462
  };
111394
111463
  const shouldShowSelection = computed(() => {
111395
111464
  const config2 = proxy.$superdoc.config.modules?.comments;
111465
+ if (!config2 || config2 === false) return false;
111396
111466
  return !config2.readOnly;
111397
111467
  });
111398
111468
  const handleSuperEditorPageMarginsChange = (doc2, params2) => {
@@ -111559,7 +111629,7 @@ ${style2}
111559
111629
  };
111560
111630
  }
111561
111631
  };
111562
- const App = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-3f71b1bf"]]);
111632
+ const App = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-45f44b6e"]]);
111563
111633
  const createSuperdocVueApp = () => {
111564
111634
  const app = createApp(App);
111565
111635
  const pinia = createPinia();
@@ -111658,6 +111728,10 @@ ${style2}
111658
111728
  ...this.config,
111659
111729
  ...config2
111660
111730
  };
111731
+ this.config.modules = this.config.modules || {};
111732
+ if (!Object.prototype.hasOwnProperty.call(this.config.modules, "comments")) {
111733
+ this.config.modules.comments = {};
111734
+ }
111661
111735
  this.config.colors = shuffleArray(this.config.colors);
111662
111736
  this.userColorMap = /* @__PURE__ */ new Map();
111663
111737
  this.colorIndex = 0;
@@ -111792,7 +111866,8 @@ ${style2}
111792
111866
  this.superdocStore.setExceptionHandler((payload) => this.emit("exception", payload));
111793
111867
  }
111794
111868
  this.superdocStore.init(this.config);
111795
- this.commentsStore.init(this.config.modules.comments);
111869
+ const commentsModuleConfig = this.config.modules.comments;
111870
+ this.commentsStore.init(commentsModuleConfig && commentsModuleConfig !== false ? commentsModuleConfig : {});
111796
111871
  }
111797
111872
  #initListeners() {
111798
111873
  this.on("editorBeforeCreate", this.config.onEditorBeforeCreate);