@harbour-enterprises/superdoc 1.3.0-next.8 → 1.3.0-next.9

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,6 +1,6 @@
1
1
  import { B as Buffer$2 } from "./jszip-B1fkPkPJ.es.js";
2
2
  import { t as twipsToInches, i as inchesToTwips, p as ptToTwips, l as linesToTwips, a as twipsToLines, b as pixelsToTwips, h as halfPointToPoints, c as twipsToPixels$2, d as convertSizeToCSS, e as inchesToPixels } from "./helpers-C8e9wR5l.es.js";
3
- import { g as generateDocxRandomId, T as TextSelection$1, o as objectIncludes, w as wrapTextsInRuns, D as DOMParser$1, c as createDocFromMarkdown, a as createDocFromHTML, b as chainableEditorState, d as convertMarkdownToHTML, f as findParentNode, e as findParentNodeClosestToPos, h as generateRandom32BitHex, i as generateRandomSigned32BitIntStrId, P as PluginKey, j as Plugin, M as Mapping, N as NodeSelection, k as Selection, l as Slice, m as DOMSerializer, F as Fragment, n as Mark$1, p as dropPoint, A as AllSelection, q as Schema$1, s as canSplit, t as resolveRunProperties, u as encodeMarksFromRPr, v as liftTarget, x as canJoin, y as joinPoint, z as replaceStep$1, R as ReplaceAroundStep$1, B as htmlHandler, C as ReplaceStep, E as getResolvedParagraphProperties, G as changeListLevel, H as isList$1, I as updateNumberingProperties, L as ListHelpers, J as inputRulesPlugin, K as TrackDeleteMarkName$1, O as TrackInsertMarkName$1, Q as TrackFormatMarkName$1, U as AddMarkStep, V as RemoveMarkStep, W as CommandService, S as SuperConverter, X as EditorState, Y as unflattenListsInHtml, Z as SelectionRange, _ as Transform, $ as createOoxmlResolver, a0 as translator, a1 as translator$1, a2 as resolveDocxFontFamily, a3 as _getReferencedTableStyles, a4 as decodeRPrFromMarks, a5 as calculateResolvedParagraphProperties, a6 as encodeCSSFromPPr, a7 as encodeCSSFromRPr, a8 as generateOrderedListIndex, a9 as docxNumberingHelpers, aa as InputRule, ab as insertNewRelationship, ac as kebabCase$1, ad as getUnderlineCssString } from "./SuperConverter-DwLhA2mM.es.js";
3
+ import { g as generateDocxRandomId, T as TextSelection$1, o as objectIncludes, w as wrapTextsInRuns, D as DOMParser$1, c as createDocFromMarkdown, a as createDocFromHTML, b as chainableEditorState, d as convertMarkdownToHTML, f as findParentNode, e as findParentNodeClosestToPos, h as generateRandom32BitHex, i as generateRandomSigned32BitIntStrId, P as PluginKey, j as Plugin, M as Mapping, N as NodeSelection, k as Selection, l as Slice, m as DOMSerializer, F as Fragment, n as Mark$1, p as dropPoint, A as AllSelection, q as Schema$1, s as canSplit, t as resolveRunProperties, u as encodeMarksFromRPr, v as liftTarget, x as canJoin, y as joinPoint, z as replaceStep$1, R as ReplaceAroundStep$1, B as htmlHandler, C as ReplaceStep, E as getResolvedParagraphProperties, G as changeListLevel, H as isList$1, I as updateNumberingProperties, L as ListHelpers, J as inputRulesPlugin, K as TrackDeleteMarkName$1, O as TrackInsertMarkName$1, Q as TrackFormatMarkName$1, U as AddMarkStep, V as RemoveMarkStep, W as CommandService, S as SuperConverter, X as EditorState, Y as unflattenListsInHtml, Z as SelectionRange, _ as Transform, $ as createOoxmlResolver, a0 as translator, a1 as translator$1, a2 as resolveDocxFontFamily, a3 as _getReferencedTableStyles, a4 as decodeRPrFromMarks, a5 as calculateResolvedParagraphProperties, a6 as encodeCSSFromPPr, a7 as encodeCSSFromRPr, a8 as generateOrderedListIndex, a9 as docxNumberingHelpers, aa as InputRule, ab as insertNewRelationship, ac as kebabCase$1, ad as getUnderlineCssString } from "./SuperConverter-lLx4GqcF.es.js";
4
4
  import { p as process$1, r as ref, C as global$1, c as computed, E as createElementBlock, F as Fragment$1, S as renderList, O as withModifiers, G as openBlock, P as normalizeClass, M as createCommentVNode, H as toDisplayString, K as createBaseVNode, U as createApp, f as onMounted, X as onUnmounted, R as withDirectives, v as unref, Y as vModelText, y as nextTick, L as normalizeStyle, u as watch, Z as withKeys, _ as createTextVNode, I as createVNode, h, $ as readonly, s as getCurrentInstance, o as onBeforeUnmount, j as reactive, b as onBeforeMount, i as inject, a0 as onActivated, a1 as onDeactivated, a2 as Comment, d as defineComponent, a as provide, g as Teleport, t as toRef, a3 as renderSlot, a4 as isVNode, D as shallowRef, w as watchEffect, T as Transition, a5 as mergeProps, a6 as vShow, a7 as cloneVNode, a8 as Text$2, m as markRaw, N as createBlock, J as withCtx, a9 as useCssVars, V as resolveDynamicComponent, aa as normalizeProps, ab as guardReactiveProps } from "./vue-BnBKJwCW.es.js";
5
5
  import "./jszip.min-DCl8qkFO.es.js";
6
6
  import { E as EventEmitter$1 } from "./eventemitter3-CwrdEv8r.es.js";
@@ -13202,8 +13202,8 @@ const CommentsPlugin = Extension.create({
13202
13202
  }
13203
13203
  if (!onlyActiveThreadChanged) {
13204
13204
  const positionsChanged = hasPositionsChanged(prevAllCommentPositions, allCommentPositions);
13205
- const hasComments = Object.keys(allCommentPositions).length > 0;
13206
- const shouldEmitPositions = positionsChanged || !hasEverEmitted && hasComments;
13205
+ const hasComments2 = Object.keys(allCommentPositions).length > 0;
13206
+ const shouldEmitPositions = positionsChanged || !hasEverEmitted && hasComments2;
13207
13207
  if (shouldEmitPositions) {
13208
13208
  prevAllCommentPositions = allCommentPositions;
13209
13209
  hasEverEmitted = true;
@@ -15334,7 +15334,7 @@ const canUseDOM = () => {
15334
15334
  return false;
15335
15335
  }
15336
15336
  };
15337
- const summaryVersion = "1.3.0-next.8";
15337
+ const summaryVersion = "1.3.0-next.9";
15338
15338
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
15339
15339
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
15340
15340
  function mapAttributes(attrs) {
@@ -17967,7 +17967,7 @@ class Editor extends EventEmitter {
17967
17967
  * Process collaboration migrations
17968
17968
  */
17969
17969
  processCollaborationMigrations() {
17970
- console.debug("[checkVersionMigrations] Current editor version", "1.3.0-next.8");
17970
+ console.debug("[checkVersionMigrations] Current editor version", "1.3.0-next.9");
17971
17971
  if (!this.options.ydoc) return;
17972
17972
  const metaMap = this.options.ydoc.getMap("meta");
17973
17973
  let docVersion = metaMap.get("version");
@@ -28198,7 +28198,9 @@ const deriveBlockVersion = (block) => {
28198
28198
  textRun.pmEnd ?? "",
28199
28199
  textRun.token ?? "",
28200
28200
  // Tracked changes - force re-render when added or removed tracked change
28201
- textRun.trackedChange ? 1 : 0
28201
+ textRun.trackedChange ? 1 : 0,
28202
+ // Comment annotations - force re-render when comments are enabled/disabled
28203
+ textRun.comments?.length ?? 0
28202
28204
  ].join(",");
28203
28205
  }).join("|");
28204
28206
  const attrs = block.attrs;
@@ -34070,6 +34072,9 @@ const hashCellBorders = (borders) => {
34070
34072
  if (borders.left) parts.push(`l:[${hashBorderSpec(borders.left)}]`);
34071
34073
  return parts.join(";");
34072
34074
  };
34075
+ function hasComments$1(run) {
34076
+ return "comments" in run && Array.isArray(run.comments) && run.comments.length > 0;
34077
+ }
34073
34078
  const MAX_CACHE_SIZE$1 = 1e4;
34074
34079
  const BYTES_PER_ENTRY_ESTIMATE = 5e3;
34075
34080
  const hashParagraphFrame = (frame) => {
@@ -34137,6 +34142,7 @@ const hashRuns = (block) => {
34137
34142
  fontFamily2 ? `ff:${fontFamily2}` : "",
34138
34143
  highlight ? `hl:${highlight}` : ""
34139
34144
  ].join("");
34145
+ const commentHash = hasComments$1(run) ? run.comments.map((c2) => `${c2.commentId ?? ""}:${c2.internal ? "1" : "0"}`).join("|") : "";
34140
34146
  let trackedKey = "";
34141
34147
  if (hasTrackedChange(run)) {
34142
34148
  const tc = run.trackedChange;
@@ -34144,7 +34150,8 @@ const hashRuns = (block) => {
34144
34150
  const afterHash = tc.after ? JSON.stringify(tc.after) : "";
34145
34151
  trackedKey = `|tc:${tc.kind ?? ""}:${tc.id ?? ""}:${tc.author ?? ""}:${tc.date ?? ""}:${beforeHash}:${afterHash}`;
34146
34152
  }
34147
- cellHashes.push(`${text}:${marks}${trackedKey}`);
34153
+ const commentKey = commentHash ? `|cm:${commentHash}` : "";
34154
+ cellHashes.push(`${text}:${marks}${trackedKey}${commentKey}`);
34148
34155
  }
34149
34156
  if (paragraphBlock.attrs) {
34150
34157
  const attrs = paragraphBlock.attrs;
@@ -35275,6 +35282,9 @@ function remeasureParagraph(block, maxWidth, firstLineIndent = 0) {
35275
35282
  const totalHeight = lines.reduce((s2, l) => s2 + l.lineHeight, 0);
35276
35283
  return { kind: "paragraph", lines, totalHeight };
35277
35284
  }
35285
+ function hasComments(run) {
35286
+ return "comments" in run && Array.isArray(run.comments) && run.comments.length > 0;
35287
+ }
35278
35288
  const computeDirtyRegions = (previous, next) => {
35279
35289
  const prevMap = new Map(previous.map((block, index2) => [block.id, { block, index: index2 }]));
35280
35290
  const nextMap = new Map(next.map((block, index2) => [block.id, { block, index: index2 }]));
@@ -35335,6 +35345,10 @@ const getTrackedChangeKey = (run) => {
35335
35345
  }
35336
35346
  return "";
35337
35347
  };
35348
+ const getCommentKey = (run) => {
35349
+ if (!hasComments(run)) return "";
35350
+ return run.comments.map((c2) => `${c2.commentId ?? ""}:${c2.internal ? "1" : "0"}`).join("|");
35351
+ };
35338
35352
  const paragraphSpacingEqual = (a, b) => {
35339
35353
  if (a === b) return true;
35340
35354
  if (!a || !b) return !a && !b;
@@ -35416,7 +35430,7 @@ const paragraphBlocksEqual = (a, b) => {
35416
35430
  for (let i = 0; i < a.runs.length; i += 1) {
35417
35431
  const runA = a.runs[i];
35418
35432
  const runB = b.runs[i];
35419
- if (("src" in runA || runA.kind === "lineBreak" || runA.kind === "break" || runA.kind === "fieldAnnotation" ? "" : runA.text) !== ("src" in runB || runB.kind === "lineBreak" || runB.kind === "break" || runB.kind === "fieldAnnotation" ? "" : runB.text) || ("bold" in runA ? runA.bold : false) !== ("bold" in runB ? runB.bold : false) || ("italic" in runA ? runA.italic : false) !== ("italic" in runB ? runB.italic : false) || ("color" in runA ? runA.color : void 0) !== ("color" in runB ? runB.color : void 0) || ("fontSize" in runA ? runA.fontSize : void 0) !== ("fontSize" in runB ? runB.fontSize : void 0) || ("fontFamily" in runA ? runA.fontFamily : void 0) !== ("fontFamily" in runB ? runB.fontFamily : void 0) || ("highlight" in runA ? runA.highlight : void 0) !== ("highlight" in runB ? runB.highlight : void 0) || getTrackedChangeKey(runA) !== getTrackedChangeKey(runB)) {
35433
+ if (("src" in runA || runA.kind === "lineBreak" || runA.kind === "break" || runA.kind === "fieldAnnotation" ? "" : runA.text) !== ("src" in runB || runB.kind === "lineBreak" || runB.kind === "break" || runB.kind === "fieldAnnotation" ? "" : runB.text) || ("bold" in runA ? runA.bold : false) !== ("bold" in runB ? runB.bold : false) || ("italic" in runA ? runA.italic : false) !== ("italic" in runB ? runB.italic : false) || ("color" in runA ? runA.color : void 0) !== ("color" in runB ? runB.color : void 0) || ("fontSize" in runA ? runA.fontSize : void 0) !== ("fontSize" in runB ? runB.fontSize : void 0) || ("fontFamily" in runA ? runA.fontFamily : void 0) !== ("fontFamily" in runB ? runB.fontFamily : void 0) || ("highlight" in runA ? runA.highlight : void 0) !== ("highlight" in runB ? runB.highlight : void 0) || getTrackedChangeKey(runA) !== getTrackedChangeKey(runB) || getCommentKey(runA) !== getCommentKey(runB)) {
35420
35434
  return false;
35421
35435
  }
35422
35436
  }
@@ -40166,7 +40180,7 @@ const resetRunFormatting = (run) => {
40166
40180
  delete run.link;
40167
40181
  delete run.letterSpacing;
40168
40182
  };
40169
- const applyFormatChangeMarks = (run, config, hyperlinkConfig, applyMarksToRun2, themeColors) => {
40183
+ const applyFormatChangeMarks = (run, config, hyperlinkConfig, applyMarksToRun2, themeColors, enableComments = true) => {
40170
40184
  const tracked = run.trackedChange;
40171
40185
  if (!tracked || tracked.kind !== "format") {
40172
40186
  return;
@@ -40191,7 +40205,7 @@ const applyFormatChangeMarks = (run, config, hyperlinkConfig, applyMarksToRun2,
40191
40205
  }
40192
40206
  resetRunFormatting(run);
40193
40207
  try {
40194
- applyMarksToRun2(run, beforeMarks, hyperlinkConfig, themeColors);
40208
+ applyMarksToRun2(run, beforeMarks, hyperlinkConfig, themeColors, void 0, enableComments);
40195
40209
  } catch (error) {
40196
40210
  if (process$1.env.NODE_ENV === "development") {
40197
40211
  console.warn("[PM-Adapter] Error applying format change marks, resetting formatting:", error);
@@ -40199,7 +40213,7 @@ const applyFormatChangeMarks = (run, config, hyperlinkConfig, applyMarksToRun2,
40199
40213
  resetRunFormatting(run);
40200
40214
  }
40201
40215
  };
40202
- const applyTrackedChangesModeToRuns = (runs, config, hyperlinkConfig, applyMarksToRun2, themeColors) => {
40216
+ const applyTrackedChangesModeToRuns = (runs, config, hyperlinkConfig, applyMarksToRun2, themeColors, enableComments = true) => {
40203
40217
  if (!config) {
40204
40218
  return runs;
40205
40219
  }
@@ -40212,7 +40226,7 @@ const applyTrackedChangesModeToRuns = (runs, config, hyperlinkConfig, applyMarks
40212
40226
  } else {
40213
40227
  runs.forEach((run) => {
40214
40228
  if (isTextRun$1(run)) {
40215
- applyFormatChangeMarks(run, config, hyperlinkConfig, applyMarksToRun2, themeColors);
40229
+ applyFormatChangeMarks(run, config, hyperlinkConfig, applyMarksToRun2, themeColors, enableComments);
40216
40230
  }
40217
40231
  });
40218
40232
  }
@@ -40242,7 +40256,14 @@ const applyTrackedChangesModeToRuns = (runs, config, hyperlinkConfig, applyMarks
40242
40256
  } else {
40243
40257
  filtered.forEach((run) => {
40244
40258
  if (isTextRun$1(run)) {
40245
- applyFormatChangeMarks(run, config, hyperlinkConfig || DEFAULT_HYPERLINK_CONFIG$1, applyMarksToRun2, themeColors);
40259
+ applyFormatChangeMarks(
40260
+ run,
40261
+ config,
40262
+ hyperlinkConfig || DEFAULT_HYPERLINK_CONFIG$1,
40263
+ applyMarksToRun2,
40264
+ themeColors,
40265
+ enableComments
40266
+ );
40246
40267
  }
40247
40268
  });
40248
40269
  }
@@ -41186,7 +41207,10 @@ const applyTextStyleMark = (run, attrs, themeColors) => {
41186
41207
  const DEFAULT_HYPERLINK_CONFIG = {
41187
41208
  enableRichHyperlinks: false
41188
41209
  };
41189
- const applyMarksToRun = (run, marks, hyperlinkConfig = DEFAULT_HYPERLINK_CONFIG, themeColors, backgroundColor) => {
41210
+ const applyMarksToRun = (run, marks, hyperlinkConfig = DEFAULT_HYPERLINK_CONFIG, themeColors, backgroundColor, enableComments = true) => {
41211
+ if (!enableComments && "comments" in run && run.comments) {
41212
+ delete run.comments;
41213
+ }
41190
41214
  const isTabRun2 = run.kind === "tab";
41191
41215
  let markSetColor = false;
41192
41216
  marks.forEach((mark) => {
@@ -41233,7 +41257,7 @@ const applyMarksToRun = (run, marks, hyperlinkConfig = DEFAULT_HYPERLINK_CONFIG,
41233
41257
  break;
41234
41258
  case "commentMark":
41235
41259
  case "comment": {
41236
- if (!isTabRun2) {
41260
+ if (!isTabRun2 && enableComments) {
41237
41261
  pushCommentAnnotation(run, mark.attrs ?? {});
41238
41262
  }
41239
41263
  break;
@@ -44859,7 +44883,7 @@ const applyInlineRunProperties = (run, runProperties) => {
44859
44883
  run.letterSpacing = twipsToPx$1(runProperties.letterSpacing);
44860
44884
  }
44861
44885
  };
44862
- function paragraphToFlowBlocks$1(para, nextBlockId, positions, defaultFont, defaultSize, styleContext, listCounterContext, trackedChanges, bookmarks, hyperlinkConfig = DEFAULT_HYPERLINK_CONFIG$1, themeColors, converters, converterContext) {
44886
+ function paragraphToFlowBlocks$1(para, nextBlockId, positions, defaultFont, defaultSize, styleContext, listCounterContext, trackedChanges, bookmarks, hyperlinkConfig = DEFAULT_HYPERLINK_CONFIG$1, themeColors, converters, converterContext, enableComments = true) {
44863
44887
  const baseBlockId = nextBlockId("paragraph");
44864
44888
  const paragraphProps = typeof para.attrs?.paragraphProperties === "object" && para.attrs.paragraphProperties !== null ? para.attrs.paragraphProperties : {};
44865
44889
  const paragraphStyleId = typeof para.attrs?.styleId === "string" && para.attrs.styleId.trim() ? para.attrs.styleId : typeof paragraphProps.styleId === "string" && paragraphProps.styleId.trim() ? paragraphProps.styleId : null;
@@ -45033,7 +45057,8 @@ function paragraphToFlowBlocks$1(para, nextBlockId, positions, defaultFont, defa
45033
45057
  [...node.marks ?? [], ...inheritedMarks ?? []],
45034
45058
  hyperlinkConfig,
45035
45059
  themeColors,
45036
- converterContext?.backgroundColor
45060
+ converterContext?.backgroundColor,
45061
+ enableComments
45037
45062
  );
45038
45063
  currentRuns.push(run);
45039
45064
  return;
@@ -45095,7 +45120,8 @@ function paragraphToFlowBlocks$1(para, nextBlockId, positions, defaultFont, defa
45095
45120
  positions,
45096
45121
  defaultFont,
45097
45122
  defaultSize,
45098
- mergedMarks,
45123
+ [],
45124
+ // Empty marks - will be applied after linked styles
45099
45125
  activeSdt,
45100
45126
  hyperlinkConfig,
45101
45127
  themeColors
@@ -45104,6 +45130,14 @@ function paragraphToFlowBlocks$1(para, nextBlockId, positions, defaultFont, defa
45104
45130
  applyRunStyles2(tokenRun, inlineStyleId, activeRunStyleId);
45105
45131
  applyBaseRunDefaults(tokenRun, baseRunDefaults, defaultFont, defaultSize);
45106
45132
  applyInlineRunProperties(tokenRun, activeRunProperties);
45133
+ applyMarksToRun(
45134
+ tokenRun,
45135
+ mergedMarks,
45136
+ hyperlinkConfig,
45137
+ themeColors,
45138
+ converterContext?.backgroundColor,
45139
+ enableComments
45140
+ );
45107
45141
  if (pageRefPos) {
45108
45142
  tokenRun.pmStart = pageRefPos.start;
45109
45143
  tokenRun.pmEnd = pageRefPos.end;
@@ -45177,7 +45211,8 @@ function paragraphToFlowBlocks$1(para, nextBlockId, positions, defaultFont, defa
45177
45211
  mergedMarks,
45178
45212
  hyperlinkConfig,
45179
45213
  themeColors,
45180
- converterContext?.backgroundColor
45214
+ converterContext?.backgroundColor,
45215
+ enableComments
45181
45216
  );
45182
45217
  }
45183
45218
  console.debug("[token-debug] paragraph-token-run", {
@@ -45376,7 +45411,8 @@ function paragraphToFlowBlocks$1(para, nextBlockId, positions, defaultFont, defa
45376
45411
  trackedChanges,
45377
45412
  hyperlinkConfig,
45378
45413
  applyMarksToRun,
45379
- themeColors
45414
+ themeColors,
45415
+ enableComments
45380
45416
  );
45381
45417
  if (trackedChanges.enabled && filteredRuns.length === 0) {
45382
45418
  return;
@@ -46275,6 +46311,7 @@ function toFlowBlocks(pmDoc, options) {
46275
46311
  const hyperlinkConfig = {
46276
46312
  enableRichHyperlinks: options?.enableRichHyperlinks ?? false
46277
46313
  };
46314
+ const enableComments = options?.enableComments ?? true;
46278
46315
  const themeColors = options?.themeColors;
46279
46316
  const converterContext = options?.converterContext;
46280
46317
  if (!doc2.content) {
@@ -46324,7 +46361,8 @@ function toFlowBlocks(pmDoc, options) {
46324
46361
  bookmarks2,
46325
46362
  hyperlinkConfig2,
46326
46363
  themeColorsParam ?? themeColors,
46327
- converterCtx ?? converterContext
46364
+ converterCtx ?? converterContext,
46365
+ enableComments
46328
46366
  );
46329
46367
  const tableConverter = (node, nextBlockId2, positions2, defaultFont2, defaultSize2, context, trackedChanges, bookmarks2, hyperlinkConfig2, themeColorsParam, converterCtx) => tableNodeToBlock(
46330
46368
  node,
@@ -46363,6 +46401,7 @@ function toFlowBlocks(pmDoc, options) {
46363
46401
  listCounterContext: { getListCounter, incrementListCounter, resetListCounter },
46364
46402
  trackedChangesConfig,
46365
46403
  hyperlinkConfig,
46404
+ enableComments,
46366
46405
  bookmarks,
46367
46406
  sectionState: {
46368
46407
  ranges: sectionRanges,
@@ -46431,7 +46470,7 @@ function mergeDropCapParagraphs(blocks) {
46431
46470
  }
46432
46471
  return result;
46433
46472
  }
46434
- function paragraphToFlowBlocks(para, nextBlockId, positions, defaultFont, defaultSize, styleContext, listCounterContext, trackedChanges, bookmarks, hyperlinkConfig = DEFAULT_HYPERLINK_CONFIG$1, themeColors, converterContext) {
46473
+ function paragraphToFlowBlocks(para, nextBlockId, positions, defaultFont, defaultSize, styleContext, listCounterContext, trackedChanges, bookmarks, hyperlinkConfig = DEFAULT_HYPERLINK_CONFIG$1, themeColors, converterContext, enableComments = true) {
46435
46474
  return paragraphToFlowBlocks$1(
46436
46475
  para,
46437
46476
  nextBlockId,
@@ -46478,7 +46517,8 @@ function paragraphToFlowBlocks(para, nextBlockId, positions, defaultFont, defaul
46478
46517
  }
46479
46518
  )
46480
46519
  },
46481
- converterContext
46520
+ converterContext,
46521
+ enableComments
46482
46522
  );
46483
46523
  }
46484
46524
  function tableNodeToBlock(node, nextBlockId, positions, defaultFont, defaultSize, styleContext, trackedChanges, bookmarks, hyperlinkConfig, themeColors, _paragraphToFlowBlocksParam, converterContext, options) {
@@ -50687,12 +50727,13 @@ class PresentationEditor extends EventEmitter {
50687
50727
  if (!validModes.includes(mode)) {
50688
50728
  throw new TypeError(`[PresentationEditor] Invalid mode "${mode}". Must be one of: ${validModes.join(", ")}`);
50689
50729
  }
50730
+ const modeChanged = this.#documentMode !== mode;
50690
50731
  this.#documentMode = mode;
50691
50732
  this.#editor.setDocumentMode(mode);
50692
50733
  this.#syncDocumentModeClass();
50693
50734
  this.#syncHiddenEditorA11yAttributes();
50694
50735
  const trackedChangesChanged = this.#syncTrackedChangesPreferences();
50695
- if (trackedChangesChanged) {
50736
+ if (modeChanged || trackedChangesChanged) {
50696
50737
  this.#pendingDocChange = true;
50697
50738
  this.#scheduleRerender();
50698
50739
  }
@@ -53097,12 +53138,14 @@ class PresentationEditor extends EventEmitter {
53097
53138
  } : void 0;
53098
53139
  const atomNodeTypes = getAtomNodeTypes(this.#editor?.schema ?? null);
53099
53140
  const positionMap = this.#editor?.state?.doc && docJson ? buildPositionMapFromPmDoc(this.#editor.state.doc, docJson) : null;
53141
+ const commentsEnabled = this.#documentMode !== "viewing";
53100
53142
  const result = toFlowBlocks(docJson, {
53101
53143
  mediaFiles: this.#editor?.storage?.image?.media,
53102
53144
  emitSectionBreaks: true,
53103
53145
  sectionMetadata,
53104
53146
  trackedChangesMode: this.#trackedChangesMode,
53105
53147
  enableTrackedChanges: this.#trackedChangesEnabled,
53148
+ enableComments: commentsEnabled,
53106
53149
  enableRichHyperlinks: true,
53107
53150
  themeColors: this.#editor?.converter?.themeColors ?? void 0,
53108
53151
  converterContext,
@@ -53233,10 +53276,12 @@ class PresentationEditor extends EventEmitter {
53233
53276
  const payload = { layout, blocks, measures, metrics };
53234
53277
  this.emit("layoutUpdated", payload);
53235
53278
  this.emit("paginationUpdate", payload);
53236
- const commentPositions = this.#collectCommentPositions();
53237
- const positionKeys = Object.keys(commentPositions);
53238
- if (positionKeys.length > 0) {
53239
- this.emit("commentPositions", { positions: commentPositions });
53279
+ if (this.#documentMode !== "viewing") {
53280
+ const commentPositions = this.#collectCommentPositions();
53281
+ const positionKeys = Object.keys(commentPositions);
53282
+ if (positionKeys.length > 0) {
53283
+ this.emit("commentPositions", { positions: commentPositions });
53284
+ }
53240
53285
  }
53241
53286
  if (this.#telemetryEmitter && metrics) {
53242
53287
  this.#telemetryEmitter({ type: "layout", data: { layout, blocks, measures, metrics } });
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("../chunks/jszip-C8_CqJxM.cjs");
4
4
  require("../chunks/helpers-nOdwpmwb.cjs");
5
- const superEditor_converter = require("../chunks/SuperConverter-d7nvQrVD.cjs");
5
+ const superEditor_converter = require("../chunks/SuperConverter-BuhT_Z5G.cjs");
6
6
  require("../chunks/uuid-R7L08bOx.cjs");
7
7
  exports.SuperConverter = superEditor_converter.SuperConverter;
@@ -1,6 +1,6 @@
1
1
  import "../chunks/jszip-B1fkPkPJ.es.js";
2
2
  import "../chunks/helpers-C8e9wR5l.es.js";
3
- import { S } from "../chunks/SuperConverter-DwLhA2mM.es.js";
3
+ import { S } from "../chunks/SuperConverter-lLx4GqcF.es.js";
4
4
  import "../chunks/uuid-CjlX8hrF.es.js";
5
5
  export {
6
6
  S as SuperConverter
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./chunks/index-DzCJy9Bf.cjs");
3
+ const index = require("./chunks/index-CqzJ4gdV.cjs");
4
4
  const superEditor_docxZipper = require("./super-editor/docx-zipper.cjs");
5
5
  const superEditor_fileZipper = require("./super-editor/file-zipper.cjs");
6
6
  const vue = require("./chunks/vue-De9wkgLl.cjs");
7
- const superEditor_converter = require("./chunks/SuperConverter-d7nvQrVD.cjs");
7
+ const superEditor_converter = require("./chunks/SuperConverter-BuhT_Z5G.cjs");
8
8
  function isNodeType(node, name) {
9
9
  return node.type.name === name;
10
10
  }
@@ -1,9 +1,9 @@
1
- import { ax as Node, ay as Mark } from "./chunks/index-DoZiv8EQ.es.js";
2
- import { ao, au, a9, ab, aw, am, av, aA, an, ak, aq, az, aa, as, aC, aE, aB, ac, aD, ar, at } from "./chunks/index-DoZiv8EQ.es.js";
1
+ import { ax as Node, ay as Mark } from "./chunks/index-s5ZqooQe.es.js";
2
+ import { ao, au, a9, ab, aw, am, av, aA, an, ak, aq, az, aa, as, aC, aE, aB, ac, aD, ar, at } from "./chunks/index-s5ZqooQe.es.js";
3
3
  import { default as default2 } from "./super-editor/docx-zipper.es.js";
4
4
  import { createZip } from "./super-editor/file-zipper.es.js";
5
5
  import { d as defineComponent, E as createElementBlock, G as openBlock, K as createBaseVNode } from "./chunks/vue-BnBKJwCW.es.js";
6
- import { S, r } from "./chunks/SuperConverter-DwLhA2mM.es.js";
6
+ import { S, r } from "./chunks/SuperConverter-lLx4GqcF.es.js";
7
7
  function isNodeType(node, name) {
8
8
  return node.type.name === name;
9
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SuperDoc.d.ts","sourceRoot":"","sources":["../../../../src/core/SuperDoc.js"],"names":[],"mappings":"AAsBA,6CAA6C;AAC7C,mEAAmE;AACnE,qDAAqD;AACrD,mDAAmD;AACnD,iDAAiD;AACjD,6DAA6D;AAC7D,iDAAiD;AACjD,6DAA6D;AAE7D;;;;;;GAMG;AACH;IACE,4BAA4B;IAC5B,qBADW,KAAK,CAAC,MAAM,CAAC,CACgB;IAkFxC;;OAEG;IACH,oBAFW,MAAM,EAKhB;IAnFD,qBAAqB;IACrB,SADW,MAAM,CACT;IAER,qB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AA;KAAE,QAc/E;IAgED;;;;OAIG;IACH,aAHW,MAAM,GAAG,MAAM,GACb,MAAM,EAAE,CAIpB;IAED;;;;OAIG;IACH,wBAHW,MAAM,GACJ,IAAI,CAIhB;IAED;;;OAGG;IACH,iBAFW,OAAO,QAUjB;IAED;;;OAGG;IACH,uBAFa,KAAK,CAAC,MAAM,CAAC,CAYzB;IAED;;;;OAIG;IACH,0CAFW,IAAI,QAOd;IAED;;;;OAIG;IACH,8IAHW,YAAY,GACV,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CA0ChC;IAED;;;;OAIG;IACH,yEAHW;QAAE,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE,GAC7C,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAkChC;IAWK,8CAAkC;IAsBxC;;;OAGG;IACH,QAFa,OAAO,CAAC,IAAI,EAAE,CAAC,CAY3B;IAsBD;;;OAGG;IACH,WAFa,IAAI,CAoBhB;IAED;;;OAGG;IACH,SAFa,IAAI,CAahB;IAED;;;;OAIG;IACH,oCAHW,OAAO,GACL,IAAI,CAMhB;IAED;;;;;;;OAOG;IACH,oCAJG;QAAwB,IAAI,EAApB,MAAM;QACU,IAAI,EAApB,MAAM;KACd,GAAU,IAAI,CAUhB;;CACF;mBApjCa,OAAO,SAAS,EAAE,IAAI;8BACtB,OAAO,SAAS,EAAE,eAAe;uBACjC,OAAO,SAAS,EAAE,QAAQ;sBAC1B,OAAO,SAAS,EAAE,OAAO;qBACzB,OAAO,SAAS,EAAE,MAAM;2BACxB,OAAO,SAAS,EAAE,YAAY;qBAC9B,OAAO,SAAS,EAAE,MAAM;2BACxB,OAAO,SAAS,EAAE,YAAY;6BA3Bf,eAAe;6BAKJ,wBAAwB;8BAClC,iEAAiE"}
@@ -76,6 +76,7 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
76
76
  }) => void;
77
77
  translateCommentsForExport: () => any[];
78
78
  handleEditorLocationsUpdate: (allCommentPositions: any) => void;
79
+ clearEditorCommentPositions: () => void;
79
80
  handleTrackedChangeUpdate: ({ superdoc, params }: {
80
81
  superdoc: Object;
81
82
  params: Object;
@@ -158,6 +159,7 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
158
159
  }) => void;
159
160
  translateCommentsForExport: () => any[];
160
161
  handleEditorLocationsUpdate: (allCommentPositions: any) => void;
162
+ clearEditorCommentPositions: () => void;
161
163
  handleTrackedChangeUpdate: ({ superdoc, params }: {
162
164
  superdoc: Object;
163
165
  params: Object;
@@ -240,9 +242,10 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
240
242
  }) => void;
241
243
  translateCommentsForExport: () => any[];
242
244
  handleEditorLocationsUpdate: (allCommentPositions: any) => void;
245
+ clearEditorCommentPositions: () => void;
243
246
  handleTrackedChangeUpdate: ({ superdoc, params }: {
244
247
  superdoc: Object;
245
248
  params: Object;
246
249
  }) => void;
247
- }, "cancelComment" | "init" | "getComment" | "setActiveComment" | "getCommentLocation" | "hasOverlapId" | "getPendingComment" | "showAddComment" | "addComment" | "deleteComment" | "removePendingComment" | "processLoadedDocxComments" | "translateCommentsForExport" | "handleEditorLocationsUpdate" | "handleTrackedChangeUpdate">>;
250
+ }, "cancelComment" | "init" | "getComment" | "setActiveComment" | "getCommentLocation" | "hasOverlapId" | "getPendingComment" | "showAddComment" | "addComment" | "deleteComment" | "removePendingComment" | "processLoadedDocxComments" | "translateCommentsForExport" | "handleEditorLocationsUpdate" | "clearEditorCommentPositions" | "handleTrackedChangeUpdate">>;
248
251
  //# sourceMappingURL=comments-store.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"comments-store.d.ts","sourceRoot":"","sources":["../../../../src/stores/comments-store.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBA2Ca,MAAM,KACJ,IAAI;qBAiBN,MAAM,KACJ,M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,IAAI;qBAiBN,MAAM,KACJ,MAAM;0CAUR,MAAM,GAAG,SAAS,GAAG,IAAI,KACvB,IAAI;;;;;;gFA8Ld;QAAuB,SAAS,EAAxB,MAAM;QACS,UAAU;QACV,eAAe;KACtC,KAAU,MAAM;;0DAqDhB;QAAuB,QAAQ,EAAvB,MAAM;KACd,KAAU,IAAI;sCAyEJ,IAAI;;;;;6CAzFJ,IAAI;4EAsGd;QAAsB,QAAQ;QACP,UAAU;KACjC,KAAU,IAAI;;+DA0HJ,IAAI;;sDAjbd;QAAuB,QAAQ,EAAvB,MAAM;QACS,MAAM,EAArB,MAAM;KACd,KAAU,IAAI;wWAikBhB"}
@@ -77,6 +77,7 @@ export const useSuperdocStore: import('pinia').StoreDefinition<"superdoc", Pick<
77
77
  }) => void;
78
78
  translateCommentsForExport: () => any[];
79
79
  handleEditorLocationsUpdate: (allCommentPositions: any) => void;
80
+ clearEditorCommentPositions: () => void;
80
81
  handleTrackedChangeUpdate: ({ superdoc, params }: {
81
82
  superdoc: Object;
82
83
  params: Object;
@@ -159,6 +160,7 @@ export const useSuperdocStore: import('pinia').StoreDefinition<"superdoc", Pick<
159
160
  }) => void;
160
161
  translateCommentsForExport: () => any[];
161
162
  handleEditorLocationsUpdate: (allCommentPositions: any) => void;
163
+ clearEditorCommentPositions: () => void;
162
164
  handleTrackedChangeUpdate: ({ superdoc, params }: {
163
165
  superdoc: Object;
164
166
  params: Object;
@@ -241,11 +243,12 @@ export const useSuperdocStore: import('pinia').StoreDefinition<"superdoc", Pick<
241
243
  }) => void;
242
244
  translateCommentsForExport: () => any[];
243
245
  handleEditorLocationsUpdate: (allCommentPositions: any) => void;
246
+ clearEditorCommentPositions: () => void;
244
247
  handleTrackedChangeUpdate: ({ superdoc, params }: {
245
248
  superdoc: Object;
246
249
  params: Object;
247
250
  }) => void;
248
- }, "cancelComment" | "init" | "getComment" | "setActiveComment" | "getCommentLocation" | "hasOverlapId" | "getPendingComment" | "showAddComment" | "addComment" | "deleteComment" | "removePendingComment" | "processLoadedDocxComments" | "translateCommentsForExport" | "handleEditorLocationsUpdate" | "handleTrackedChangeUpdate">>;
251
+ }, "cancelComment" | "init" | "getComment" | "setActiveComment" | "getCommentLocation" | "hasOverlapId" | "getPendingComment" | "showAddComment" | "addComment" | "deleteComment" | "removePendingComment" | "processLoadedDocxComments" | "translateCommentsForExport" | "handleEditorLocationsUpdate" | "clearEditorCommentPositions" | "handleTrackedChangeUpdate">>;
249
252
  documents: import('vue').Ref<never[], never[]>;
250
253
  documentBounds: import('vue').Ref<never[], never[]>;
251
254
  pages: {};
@@ -371,6 +374,7 @@ export const useSuperdocStore: import('pinia').StoreDefinition<"superdoc", Pick<
371
374
  }) => void;
372
375
  translateCommentsForExport: () => any[];
373
376
  handleEditorLocationsUpdate: (allCommentPositions: any) => void;
377
+ clearEditorCommentPositions: () => void;
374
378
  handleTrackedChangeUpdate: ({ superdoc, params }: {
375
379
  superdoc: Object;
376
380
  params: Object;
@@ -453,6 +457,7 @@ export const useSuperdocStore: import('pinia').StoreDefinition<"superdoc", Pick<
453
457
  }) => void;
454
458
  translateCommentsForExport: () => any[];
455
459
  handleEditorLocationsUpdate: (allCommentPositions: any) => void;
460
+ clearEditorCommentPositions: () => void;
456
461
  handleTrackedChangeUpdate: ({ superdoc, params }: {
457
462
  superdoc: Object;
458
463
  params: Object;
@@ -535,11 +540,12 @@ export const useSuperdocStore: import('pinia').StoreDefinition<"superdoc", Pick<
535
540
  }) => void;
536
541
  translateCommentsForExport: () => any[];
537
542
  handleEditorLocationsUpdate: (allCommentPositions: any) => void;
543
+ clearEditorCommentPositions: () => void;
538
544
  handleTrackedChangeUpdate: ({ superdoc, params }: {
539
545
  superdoc: Object;
540
546
  params: Object;
541
547
  }) => void;
542
- }, "cancelComment" | "init" | "getComment" | "setActiveComment" | "getCommentLocation" | "hasOverlapId" | "getPendingComment" | "showAddComment" | "addComment" | "deleteComment" | "removePendingComment" | "processLoadedDocxComments" | "translateCommentsForExport" | "handleEditorLocationsUpdate" | "handleTrackedChangeUpdate">>;
548
+ }, "cancelComment" | "init" | "getComment" | "setActiveComment" | "getCommentLocation" | "hasOverlapId" | "getPendingComment" | "showAddComment" | "addComment" | "deleteComment" | "removePendingComment" | "processLoadedDocxComments" | "translateCommentsForExport" | "handleEditorLocationsUpdate" | "clearEditorCommentPositions" | "handleTrackedChangeUpdate">>;
543
549
  documents: import('vue').Ref<never[], never[]>;
544
550
  documentBounds: import('vue').Ref<never[], never[]>;
545
551
  pages: {};
@@ -665,6 +671,7 @@ export const useSuperdocStore: import('pinia').StoreDefinition<"superdoc", Pick<
665
671
  }) => void;
666
672
  translateCommentsForExport: () => any[];
667
673
  handleEditorLocationsUpdate: (allCommentPositions: any) => void;
674
+ clearEditorCommentPositions: () => void;
668
675
  handleTrackedChangeUpdate: ({ superdoc, params }: {
669
676
  superdoc: Object;
670
677
  params: Object;
@@ -747,6 +754,7 @@ export const useSuperdocStore: import('pinia').StoreDefinition<"superdoc", Pick<
747
754
  }) => void;
748
755
  translateCommentsForExport: () => any[];
749
756
  handleEditorLocationsUpdate: (allCommentPositions: any) => void;
757
+ clearEditorCommentPositions: () => void;
750
758
  handleTrackedChangeUpdate: ({ superdoc, params }: {
751
759
  superdoc: Object;
752
760
  params: Object;
@@ -829,11 +837,12 @@ export const useSuperdocStore: import('pinia').StoreDefinition<"superdoc", Pick<
829
837
  }) => void;
830
838
  translateCommentsForExport: () => any[];
831
839
  handleEditorLocationsUpdate: (allCommentPositions: any) => void;
840
+ clearEditorCommentPositions: () => void;
832
841
  handleTrackedChangeUpdate: ({ superdoc, params }: {
833
842
  superdoc: Object;
834
843
  params: Object;
835
844
  }) => void;
836
- }, "cancelComment" | "init" | "getComment" | "setActiveComment" | "getCommentLocation" | "hasOverlapId" | "getPendingComment" | "showAddComment" | "addComment" | "deleteComment" | "removePendingComment" | "processLoadedDocxComments" | "translateCommentsForExport" | "handleEditorLocationsUpdate" | "handleTrackedChangeUpdate">>;
845
+ }, "cancelComment" | "init" | "getComment" | "setActiveComment" | "getCommentLocation" | "hasOverlapId" | "getPendingComment" | "showAddComment" | "addComment" | "deleteComment" | "removePendingComment" | "processLoadedDocxComments" | "translateCommentsForExport" | "handleEditorLocationsUpdate" | "clearEditorCommentPositions" | "handleTrackedChangeUpdate">>;
837
846
  documents: import('vue').Ref<never[], never[]>;
838
847
  documentBounds: import('vue').Ref<never[], never[]>;
839
848
  pages: {};
@@ -1 +1 @@
1
- {"version":3,"file":"superdoc-store.d.ts","sourceRoot":"","sources":["../../../../src/stores/superdoc-store.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oGA4QG"}
package/dist/superdoc.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./chunks/index-DzCJy9Bf.cjs");
4
- const superdoc = require("./chunks/index-B2Aynj2f.cjs");
5
- const superEditor_converter = require("./chunks/SuperConverter-d7nvQrVD.cjs");
3
+ const index = require("./chunks/index-CqzJ4gdV.cjs");
4
+ const superdoc = require("./chunks/index-Dgo4AYNb.cjs");
5
+ const superEditor_converter = require("./chunks/SuperConverter-BuhT_Z5G.cjs");
6
6
  const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
7
7
  require("./chunks/jszip-C8_CqJxM.cjs");
8
8
  require("./chunks/helpers-nOdwpmwb.cjs");
@@ -1,6 +1,6 @@
1
- import { au, ab, aw, av, as, a7, ac, ar, at } from "./chunks/index-DoZiv8EQ.es.js";
2
- import { D, H, P, S, c } from "./chunks/index-U7zpbaq1.es.js";
3
- import { S as S2, r } from "./chunks/SuperConverter-DwLhA2mM.es.js";
1
+ import { au, ab, aw, av, as, a7, ac, ar, at } from "./chunks/index-s5ZqooQe.es.js";
2
+ import { D, H, P, S, c } from "./chunks/index-C0aR6iQ3.es.js";
3
+ import { S as S2, r } from "./chunks/SuperConverter-lLx4GqcF.es.js";
4
4
  import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
5
5
  import "./chunks/jszip-B1fkPkPJ.es.js";
6
6
  import "./chunks/helpers-C8e9wR5l.es.js";