@superdoc-dev/cli 0.8.0-next.25 → 0.8.0-next.27

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 (2) hide show
  1. package/dist/index.js +245 -29
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -11238,7 +11238,10 @@ var init_schemas = __esm(() => {
11238
11238
  commentId: { type: "string" },
11239
11239
  text: { type: "string", description: "Updated comment text." },
11240
11240
  target: textAddressSchema,
11241
- status: { enum: ["resolved"], description: "Set comment status. Use 'resolved' to mark as resolved." },
11241
+ status: {
11242
+ enum: ["resolved", "active"],
11243
+ description: "Set comment status. Use 'resolved' to resolve a comment, or 'active' to reopen a previously resolved comment (lifecycle inverse)."
11244
+ },
11242
11245
  isInternal: {
11243
11246
  type: "boolean",
11244
11247
  description: "When true, marks the comment as internal (hidden from external collaborators)."
@@ -11562,8 +11565,10 @@ var init_schemas = __esm(() => {
11562
11565
  empty: { type: "boolean" },
11563
11566
  target: { oneOf: [textTargetSchema, { type: "null" }] },
11564
11567
  activeMarks: arraySchema({ type: "string" }),
11568
+ activeCommentIds: arraySchema({ type: "string" }),
11569
+ activeChangeIds: arraySchema({ type: "string" }),
11565
11570
  text: { type: "string" }
11566
- }, ["empty", "target", "activeMarks"])
11571
+ }, ["empty", "target", "activeMarks", "activeCommentIds", "activeChangeIds"])
11567
11572
  },
11568
11573
  "mutations.preview": {
11569
11574
  input: mutationsInputSchema,
@@ -13931,8 +13936,8 @@ function validatePatchCommentInput(input) {
13931
13936
  value: text
13932
13937
  });
13933
13938
  }
13934
- if (status !== undefined && status !== "resolved") {
13935
- throw new DocumentApiValidationError("INVALID_INPUT", `status must be "resolved", got "${String(status)}".`, {
13939
+ if (status !== undefined && status !== "resolved" && status !== "active") {
13940
+ throw new DocumentApiValidationError("INVALID_INPUT", `status must be "resolved" or "active", got "${String(status)}".`, {
13936
13941
  field: "status",
13937
13942
  value: status
13938
13943
  });
@@ -13968,6 +13973,9 @@ function executeCommentsPatch(adapter, input, options) {
13968
13973
  if (input.status === "resolved") {
13969
13974
  return adapter.resolve({ commentId: input.commentId }, options);
13970
13975
  }
13976
+ if (input.status === "active") {
13977
+ return adapter.reopen({ commentId: input.commentId }, options);
13978
+ }
13971
13979
  if (input.isInternal !== undefined) {
13972
13980
  return adapter.setInternal({ commentId: input.commentId, isInternal: input.isInternal }, options);
13973
13981
  }
@@ -65857,7 +65865,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
65857
65865
  emptyOptions2 = {};
65858
65866
  });
65859
65867
 
65860
- // ../../packages/superdoc/dist/chunks/SuperConverter-lmyr0gmB.es.js
65868
+ // ../../packages/superdoc/dist/chunks/SuperConverter-BtMpBQnx.es.js
65861
65869
  function getExtensionConfigField(extension$1, field, context = { name: "" }) {
65862
65870
  const fieldValue = extension$1.config[field];
65863
65871
  if (typeof fieldValue === "function")
@@ -68644,8 +68652,8 @@ function validatePatchCommentInput2(input) {
68644
68652
  field: "text",
68645
68653
  value: text$2
68646
68654
  });
68647
- if (status !== undefined && status !== "resolved")
68648
- throw new DocumentApiValidationError2("INVALID_INPUT", `status must be "resolved", got "${String(status)}".`, {
68655
+ if (status !== undefined && status !== "resolved" && status !== "active")
68656
+ throw new DocumentApiValidationError2("INVALID_INPUT", `status must be "resolved" or "active", got "${String(status)}".`, {
68649
68657
  field: "status",
68650
68658
  value: status
68651
68659
  });
@@ -68683,6 +68691,8 @@ function executeCommentsPatch2(adapter, input, options) {
68683
68691
  }, options);
68684
68692
  if (input.status === "resolved")
68685
68693
  return adapter.resolve({ commentId: input.commentId }, options);
68694
+ if (input.status === "active")
68695
+ return adapter.reopen({ commentId: input.commentId }, options);
68686
68696
  if (input.isInternal !== undefined)
68687
68697
  return adapter.setInternal({
68688
68698
  commentId: input.commentId,
@@ -118262,7 +118272,7 @@ var isRegExp = (value) => {
118262
118272
  state.kern = kernNode.attributes["w:val"];
118263
118273
  }
118264
118274
  }, SuperConverter;
118265
- var init_SuperConverter_lmyr0gmB_es = __esm(() => {
118275
+ var init_SuperConverter_BtMpBQnx_es = __esm(() => {
118266
118276
  init_rolldown_runtime_Bg48TavK_es();
118267
118277
  init_jszip_C49i9kUs_es();
118268
118278
  init_xml_js_CqGKpaft_es();
@@ -130712,8 +130722,8 @@ var init_SuperConverter_lmyr0gmB_es = __esm(() => {
130712
130722
  },
130713
130723
  target: textAddressSchema2,
130714
130724
  status: {
130715
- enum: ["resolved"],
130716
- description: "Set comment status. Use 'resolved' to mark as resolved."
130725
+ enum: ["resolved", "active"],
130726
+ description: "Set comment status. Use 'resolved' to resolve a comment, or 'active' to reopen a previously resolved comment (lifecycle inverse)."
130717
130727
  },
130718
130728
  isInternal: {
130719
130729
  type: "boolean",
@@ -131152,11 +131162,15 @@ var init_SuperConverter_lmyr0gmB_es = __esm(() => {
131152
131162
  empty: { type: "boolean" },
131153
131163
  target: { oneOf: [textTargetSchema2, { type: "null" }] },
131154
131164
  activeMarks: arraySchema2({ type: "string" }),
131165
+ activeCommentIds: arraySchema2({ type: "string" }),
131166
+ activeChangeIds: arraySchema2({ type: "string" }),
131155
131167
  text: { type: "string" }
131156
131168
  }, [
131157
131169
  "empty",
131158
131170
  "target",
131159
- "activeMarks"
131171
+ "activeMarks",
131172
+ "activeCommentIds",
131173
+ "activeChangeIds"
131160
131174
  ])
131161
131175
  },
131162
131176
  "mutations.preview": {
@@ -155861,7 +155875,7 @@ var init_SuperConverter_lmyr0gmB_es = __esm(() => {
155861
155875
  };
155862
155876
  });
155863
155877
 
155864
- // ../../packages/superdoc/dist/chunks/create-headless-toolbar-CVKqElqj.es.js
155878
+ // ../../packages/superdoc/dist/chunks/create-headless-toolbar-FOTAKCop.es.js
155865
155879
  function parseSizeUnit(val = "0") {
155866
155880
  const length3 = val.toString() || "0";
155867
155881
  const value = Number.parseFloat(length3);
@@ -158483,8 +158497,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
158483
158497
  }
158484
158498
  };
158485
158499
  };
158486
- var init_create_headless_toolbar_CVKqElqj_es = __esm(() => {
158487
- init_SuperConverter_lmyr0gmB_es();
158500
+ var init_create_headless_toolbar_FOTAKCop_es = __esm(() => {
158501
+ init_SuperConverter_BtMpBQnx_es();
158488
158502
  init_constants_DrU4EASo_es();
158489
158503
  init_dist_B8HfvhaK_es();
158490
158504
  CSS_DIMENSION_REGEX = /[\d-.]+(\w+)$/;
@@ -207171,7 +207185,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
207171
207185
  init_remark_gfm_BhnWr3yf_es();
207172
207186
  });
207173
207187
 
207174
- // ../../packages/superdoc/dist/chunks/src-B2eovI4l.es.js
207188
+ // ../../packages/superdoc/dist/chunks/src-XFPz5mDi.es.js
207175
207189
  function deleteProps(obj, propOrProps) {
207176
207190
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
207177
207191
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -216080,7 +216094,7 @@ function getMarksDiff(marksA = [], marksB = []) {
216080
216094
  if (!attrs)
216081
216095
  return {};
216082
216096
  const ignoredMarkKeys = /* @__PURE__ */ new Set;
216083
- if (TRACK_CHANGE_MARK_NAMES.has(markName))
216097
+ if (TRACK_CHANGE_MARK_NAMES$1.has(markName))
216084
216098
  for (const key2 of TRACK_CHANGE_IGNORED_ATTRIBUTE_KEYS)
216085
216099
  ignoredMarkKeys.add(key2);
216086
216100
  const normalized = {};
@@ -229551,6 +229565,50 @@ function resolveCommentHandler(editor, input2, options) {
229551
229565
  updated: [toCommentAddress(identity.commentId)]
229552
229566
  };
229553
229567
  }
229568
+ function reopenCommentHandler(editor, input2, options) {
229569
+ const reopenComment = requireEditorCommand(editor.commands?.reopenComment, "comments.patch (reopenComment)");
229570
+ const store = getCommentEntityStore(editor);
229571
+ const identity = resolveCommentIdentity(editor, input2.commentId);
229572
+ const existing = findCommentEntity(store, identity.commentId);
229573
+ const isAnchored = identity.anchors.length > 0;
229574
+ const isResolvedInStore = existing ? isCommentResolved(existing) : false;
229575
+ const isResolvedInDoc = isAnchored && identity.anchors.every((a2) => a2.status === "resolved");
229576
+ if (!isResolvedInStore && !isResolvedInDoc)
229577
+ return {
229578
+ success: false,
229579
+ failure: {
229580
+ code: "NO_OP",
229581
+ message: "Comment is already active."
229582
+ }
229583
+ };
229584
+ const storedInternal = existing?.isInternal;
229585
+ const internalOverride = typeof storedInternal === "boolean" ? storedInternal : undefined;
229586
+ if (executeDomainCommand(editor, () => {
229587
+ const didReopen = reopenComment({
229588
+ commentId: identity.commentId,
229589
+ importedId: identity.importedId,
229590
+ internal: internalOverride
229591
+ });
229592
+ if (didReopen)
229593
+ upsertCommentEntity(store, identity.commentId, {
229594
+ importedId: identity.importedId,
229595
+ isDone: false,
229596
+ resolvedTime: null
229597
+ });
229598
+ return Boolean(didReopen);
229599
+ }, { expectedRevision: options?.expectedRevision }).steps[0]?.effect !== "changed")
229600
+ return {
229601
+ success: false,
229602
+ failure: {
229603
+ code: "NO_OP",
229604
+ message: "Comment reopen produced no change."
229605
+ }
229606
+ };
229607
+ return {
229608
+ success: true,
229609
+ updated: [toCommentAddress(identity.commentId)]
229610
+ };
229611
+ }
229554
229612
  function removeCommentHandler(editor, input2, options) {
229555
229613
  const removeComment = requireEditorCommand(editor.commands?.removeComment, "comments.remove (removeComment)");
229556
229614
  const store = getCommentEntityStore(editor);
@@ -229705,6 +229763,7 @@ function createCommentsWrapper(editor) {
229705
229763
  reply: (input2, options) => replyToCommentHandler(editor, input2, options),
229706
229764
  move: (input2, options) => moveCommentHandler(editor, input2, options),
229707
229765
  resolve: (input2, options) => resolveCommentHandler(editor, input2, options),
229766
+ reopen: (input2, options) => reopenCommentHandler(editor, input2, options),
229708
229767
  remove: (input2, options) => removeCommentHandler(editor, input2, options),
229709
229768
  setInternal: (input2, options) => setCommentInternalHandler(editor, input2, options),
229710
229769
  setActive: (input2, options) => setCommentActiveHandler(editor, input2, options),
@@ -234163,14 +234222,21 @@ function resolveCurrentSelectionInfo(editor, input2) {
234163
234222
  return {
234164
234223
  empty: true,
234165
234224
  target: null,
234166
- activeMarks: []
234225
+ activeMarks: [],
234226
+ activeCommentIds: [],
234227
+ activeChangeIds: []
234167
234228
  };
234168
234229
  const { from: from$1, to, empty: empty$1 } = state.selection;
234169
234230
  const segments = collectTextSegments(state.doc, from$1, to);
234231
+ const target = segments && segments.length > 0 ? buildTextTarget(segments) : null;
234232
+ const activeMarks = collectActiveMarks(state, from$1, to);
234233
+ const { commentIds: activeCommentIds, changeIds: activeChangeRawIds } = collectActiveEntityIds(state, from$1, to);
234170
234234
  const info = {
234171
234235
  empty: empty$1,
234172
- target: segments && segments.length > 0 ? buildTextTarget(segments) : null,
234173
- activeMarks: collectActiveMarks(state, from$1, to)
234236
+ target,
234237
+ activeMarks,
234238
+ activeCommentIds,
234239
+ activeChangeIds: mapRawChangeIdsToCanonical(editor, activeChangeRawIds)
234174
234240
  };
234175
234241
  if (input2.includeText && !empty$1)
234176
234242
  info.text = state.doc.textBetween(from$1, to, " ");
@@ -234219,6 +234285,68 @@ function readBlockId(node3) {
234219
234285
  const id2 = attrs.sdBlockId ?? attrs.id ?? attrs.blockId;
234220
234286
  return typeof id2 === "string" && id2.length > 0 ? id2 : null;
234221
234287
  }
234288
+ function mapRawChangeIdsToCanonical(editor, rawIds) {
234289
+ if (rawIds.length === 0)
234290
+ return rawIds;
234291
+ let grouped;
234292
+ try {
234293
+ grouped = groupTrackedChanges(editor);
234294
+ } catch {
234295
+ return [];
234296
+ }
234297
+ const rawToCanonical = /* @__PURE__ */ new Map;
234298
+ for (const change of grouped)
234299
+ rawToCanonical.set(change.rawId, change.id);
234300
+ const seen = /* @__PURE__ */ new Set;
234301
+ const out = [];
234302
+ for (const raw of rawIds) {
234303
+ const canonical = rawToCanonical.get(raw);
234304
+ if (!canonical)
234305
+ continue;
234306
+ if (seen.has(canonical))
234307
+ continue;
234308
+ seen.add(canonical);
234309
+ out.push(canonical);
234310
+ }
234311
+ return out;
234312
+ }
234313
+ function collectActiveEntityIds(state, from$1, to) {
234314
+ const commentIds = /* @__PURE__ */ new Set;
234315
+ const changeIds = /* @__PURE__ */ new Set;
234316
+ const collectFromMark = (markType, attrs) => {
234317
+ if (markType === COMMENT_MARK_NAME2) {
234318
+ const id2 = resolveCommentIdFromAttrs(attrs ?? {});
234319
+ if (typeof id2 === "string" && id2.length > 0)
234320
+ commentIds.add(id2);
234321
+ } else if (TRACK_CHANGE_MARK_NAMES.has(markType)) {
234322
+ const id2 = attrs?.id;
234323
+ if (typeof id2 === "string" && id2.length > 0)
234324
+ changeIds.add(id2);
234325
+ }
234326
+ };
234327
+ if (from$1 === to) {
234328
+ if (state.storedMarks)
234329
+ for (const mark2 of state.storedMarks)
234330
+ collectFromMark(mark2.type.name, mark2.attrs);
234331
+ const $pos = state.doc.resolve(from$1);
234332
+ for (const mark2 of $pos.marks())
234333
+ collectFromMark(mark2.type.name, mark2.attrs);
234334
+ } else
234335
+ state.doc.nodesBetween(from$1, to, (node3, pos) => {
234336
+ if (!node3.isText)
234337
+ return true;
234338
+ const start$1 = Math.max(pos, from$1);
234339
+ if (Math.min(pos + node3.nodeSize, to) <= start$1)
234340
+ return false;
234341
+ for (const mark2 of node3.marks)
234342
+ collectFromMark(mark2.type.name, mark2.attrs);
234343
+ return false;
234344
+ });
234345
+ return {
234346
+ commentIds: Array.from(commentIds),
234347
+ changeIds: Array.from(changeIds)
234348
+ };
234349
+ }
234222
234350
  function collectActiveMarks(state, from$1, to) {
234223
234351
  const names = /* @__PURE__ */ new Set;
234224
234352
  const stored = state.storedMarks;
@@ -234273,7 +234401,9 @@ function selectionInfoKey(info) {
234273
234401
  else
234274
234402
  targetKey = target.segments.map((s2) => `${s2.blockId}:${s2.range.start}-${s2.range.end}`).join("|");
234275
234403
  const marks = [...info.activeMarks].sort().join(",");
234276
- return `${info.empty ? "1" : "0"}:${targetKey}:${marks}`;
234404
+ const comments = [...info.activeCommentIds].sort().join(",");
234405
+ const changes = [...info.activeChangeIds].sort().join(",");
234406
+ return `${info.empty ? "1" : "0"}:${targetKey}:${marks}:c=${comments}:tc=${changes}`;
234277
234407
  }
234278
234408
  function markTypesPresentEverywhere(doc$12, from$1, to) {
234279
234409
  let common = null;
@@ -271864,6 +271994,75 @@ var Node$13 = class Node$14 {
271864
271994
  });
271865
271995
  dispatch(tr);
271866
271996
  return true;
271997
+ }, getCommentRangeAnchorsById = (commentId, doc$12, importedId) => {
271998
+ const anchors = [];
271999
+ doc$12.descendants((node3, pos) => {
272000
+ const typeName = node3.type?.name;
272001
+ if (typeName !== "commentRangeStart" && typeName !== "commentRangeEnd")
272002
+ return;
272003
+ const wid = node3.attrs?.["w:id"];
272004
+ if (wid !== commentId && (!importedId || wid !== importedId))
272005
+ return;
272006
+ anchors.push({
272007
+ pos,
272008
+ type: typeName === "commentRangeStart" ? "start" : "end",
272009
+ internal: !!node3.attrs?.internal
272010
+ });
272011
+ });
272012
+ const pairs = [];
272013
+ const stack = [];
272014
+ for (const anchor of anchors) {
272015
+ if (anchor.type === "start") {
272016
+ stack.push({
272017
+ pos: anchor.pos,
272018
+ internal: anchor.internal
272019
+ });
272020
+ continue;
272021
+ }
272022
+ const opener = stack.shift();
272023
+ if (!opener)
272024
+ continue;
272025
+ pairs.push({
272026
+ from: opener.pos,
272027
+ to: anchor.pos,
272028
+ internal: opener.internal
272029
+ });
272030
+ }
272031
+ return {
272032
+ pairs,
272033
+ anchorNodePositions: anchors.map((a2) => a2.pos)
272034
+ };
272035
+ }, reopenCommentById = ({ commentId, importedId, internal, state, tr, dispatch }) => {
272036
+ const { schema } = state;
272037
+ const markType = schema.marks?.[CommentMarkName];
272038
+ if (!markType)
272039
+ return false;
272040
+ const { pairs, anchorNodePositions } = getCommentRangeAnchorsById(commentId, state.doc, importedId);
272041
+ if (!pairs.length)
272042
+ return false;
272043
+ pairs.forEach(({ from: from$1, to, internal: anchorInternal }) => {
272044
+ const mappedFrom = tr.mapping.map(from$1);
272045
+ const mappedTo = tr.mapping.map(to);
272046
+ if (mappedTo <= mappedFrom)
272047
+ return;
272048
+ const attrs = {
272049
+ commentId,
272050
+ importedId,
272051
+ internal: typeof internal === "boolean" ? internal : anchorInternal
272052
+ };
272053
+ tr.addMark(mappedFrom + 1, mappedTo, markType.create(attrs));
272054
+ });
272055
+ anchorNodePositions.map((pos) => tr.mapping.map(pos)).sort((a2, b$1) => b$1 - a2).forEach((pos) => {
272056
+ const node3 = tr.doc.nodeAt(pos);
272057
+ if (!node3)
272058
+ return;
272059
+ const typeName = node3.type?.name;
272060
+ if (typeName !== "commentRangeStart" && typeName !== "commentRangeEnd")
272061
+ return;
272062
+ tr.delete(pos, pos + node3.nodeSize);
272063
+ });
272064
+ dispatch(tr);
272065
+ return true;
271867
272066
  }, prepareCommentsForExport = (doc$12, tr, schema, comments = []) => {
271868
272067
  const commentMap = /* @__PURE__ */ new Map;
271869
272068
  comments.forEach((c) => {
@@ -277524,7 +277723,7 @@ var Node$13 = class Node$14 {
277524
277723
  id: { default: null },
277525
277724
  edGrp: { default: null },
277526
277725
  displacedByCustomXml: { default: null }
277527
- }), PermEnd, PermEndBlock, IGNORED_ATTRIBUTE_KEYS, TRACK_CHANGE_MARK_NAMES, TRACK_CHANGE_IGNORED_ATTRIBUTE_KEYS, VOLATILE_PARAGRAPH_ATTRS, VOLATILE_IMAGE_ORIGINAL_ATTR_KEYS, SIMILARITY_THRESHOLD = 0.65, MIN_LENGTH_FOR_SIMILARITY = 4, COMMENT_ATTRS_DIFF_IGNORED_KEYS, SLOT_VARIANTS, PART_KINDS, DOCUMENT_RELS_PATH$2 = "word/_rels/document.xml.rels", DOCUMENT_RELS_PATH$1 = "word/_rels/document.xml.rels", BODY_RELATIONSHIP_EXCLUSIONS, setNestedValue = (target, path2, value) => {
277726
+ }), PermEnd, PermEndBlock, IGNORED_ATTRIBUTE_KEYS, TRACK_CHANGE_MARK_NAMES$1, TRACK_CHANGE_IGNORED_ATTRIBUTE_KEYS, VOLATILE_PARAGRAPH_ATTRS, VOLATILE_IMAGE_ORIGINAL_ATTR_KEYS, SIMILARITY_THRESHOLD = 0.65, MIN_LENGTH_FOR_SIMILARITY = 4, COMMENT_ATTRS_DIFF_IGNORED_KEYS, SLOT_VARIANTS, PART_KINDS, DOCUMENT_RELS_PATH$2 = "word/_rels/document.xml.rels", DOCUMENT_RELS_PATH$1 = "word/_rels/document.xml.rels", BODY_RELATIONSHIP_EXCLUSIONS, setNestedValue = (target, path2, value) => {
277528
277727
  if (!path2.includes(".")) {
277529
277728
  target[path2] = value;
277530
277729
  return;
@@ -280439,7 +280638,7 @@ var Node$13 = class Node$14 {
280439
280638
  listener(snapshot2);
280440
280639
  } catch {}
280441
280640
  }
280442
- }, TRACK_MARK_TYPE_BY_NAME, EMITTABLE_BLOCK_TYPES, SDT_BLOCK_NODE_NAMES, REQUIRED_COMMANDS, VALID_CAPABILITY_REASON_CODES, REQUIRED_HELPERS, SCHEMA_NODE_GATES, schemaGatedIds, SUPPORTED_NON_UNIFORM_STRATEGIES, SUPPORTED_SET_MARKS, REGEX_MAX_PATTERN_LENGTH = 1024, STYLES_PART = "word/styles.xml", PROPERTIES_KEY_BY_CHANNEL, XML_PATH_BY_CHANNEL2, UNDERLINE_API_TO_STORAGE, UNDERLINE_STORAGE_TO_API, HEX_SUBKEYS_BY_PROPERTY, SUPPORTED_DELETE_NODE_TYPES3, REJECTED_DELETE_NODE_TYPES3, TEXT_PREVIEW_MAX_LENGTH = 80, RANGE_DELETE_SAFE_NODE_TYPES, HEADING_PATTERN, OOXML_DEFAULT_FONT_SIZE_PT = 10, INDENT_PER_LEVEL_TWIPS = 720, HANGING_INDENT_TWIPS = 360, SYMBOL_FONT_NAMES, RFONTS_FAMILY_ATTRS, ORDERED_PRESET_CONFIG, BULLET_PRESET_CONFIG, PRESET_TEMPLATES, LevelFormattingHelpers, PRESET_KIND_MAP, NUMBERING_PART = "word/numbering.xml", DEFAULT_PRESET_FOR_KIND, _setValueDelegate, PREVIEW_TEXT_MAX_LENGTH = 2000, BLOCK_PREVIEW_MAX_LENGTH = 200, EDGE_NODE_TYPES$1, POINTS_TO_PIXELS, POINTS_TO_TWIPS = 20, PIXELS_TO_TWIPS, DEFAULT_TABLE_GRID_WIDTH_TWIPS = 1500, SETTINGS_PART$1 = "word/settings.xml", WORD_DEFAULT_TBL_LOOK, FLAG_TO_OOXML_KEY, INVERTED_FLAGS, XML_KEY_TO_STYLE_OPTION, CLEARED_BORDER_OOXML, TABLE_MARGIN_KEY_GROUPS, TABLE_ADAPTER_DISPATCH, ROW_TARGETED_TABLE_OPS, registered = false, STYLES_PART_ID = "word/styles.xml", stylesPartDescriptor, settingsPartDescriptor, RELS_PART_ID2 = "word/_rels/document.xml.rels", RELS_XMLNS2 = "http://schemas.openxmlformats.org/package/2006/relationships", HEADER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", relsPartDescriptor, BatchHistoryAdapter = class {
280641
+ }, TRACK_MARK_TYPE_BY_NAME, EMITTABLE_BLOCK_TYPES, SDT_BLOCK_NODE_NAMES, REQUIRED_COMMANDS, VALID_CAPABILITY_REASON_CODES, REQUIRED_HELPERS, SCHEMA_NODE_GATES, schemaGatedIds, SUPPORTED_NON_UNIFORM_STRATEGIES, SUPPORTED_SET_MARKS, REGEX_MAX_PATTERN_LENGTH = 1024, STYLES_PART = "word/styles.xml", PROPERTIES_KEY_BY_CHANNEL, XML_PATH_BY_CHANNEL2, UNDERLINE_API_TO_STORAGE, UNDERLINE_STORAGE_TO_API, HEX_SUBKEYS_BY_PROPERTY, SUPPORTED_DELETE_NODE_TYPES3, REJECTED_DELETE_NODE_TYPES3, TEXT_PREVIEW_MAX_LENGTH = 80, RANGE_DELETE_SAFE_NODE_TYPES, HEADING_PATTERN, OOXML_DEFAULT_FONT_SIZE_PT = 10, INDENT_PER_LEVEL_TWIPS = 720, HANGING_INDENT_TWIPS = 360, SYMBOL_FONT_NAMES, RFONTS_FAMILY_ATTRS, ORDERED_PRESET_CONFIG, BULLET_PRESET_CONFIG, PRESET_TEMPLATES, LevelFormattingHelpers, PRESET_KIND_MAP, NUMBERING_PART = "word/numbering.xml", DEFAULT_PRESET_FOR_KIND, _setValueDelegate, PREVIEW_TEXT_MAX_LENGTH = 2000, BLOCK_PREVIEW_MAX_LENGTH = 200, EDGE_NODE_TYPES$1, COMMENT_MARK_NAME2 = "commentMark", TRACK_CHANGE_MARK_NAMES, POINTS_TO_PIXELS, POINTS_TO_TWIPS = 20, PIXELS_TO_TWIPS, DEFAULT_TABLE_GRID_WIDTH_TWIPS = 1500, SETTINGS_PART$1 = "word/settings.xml", WORD_DEFAULT_TBL_LOOK, FLAG_TO_OOXML_KEY, INVERTED_FLAGS, XML_KEY_TO_STYLE_OPTION, CLEARED_BORDER_OOXML, TABLE_MARGIN_KEY_GROUPS, TABLE_ADAPTER_DISPATCH, ROW_TARGETED_TABLE_OPS, registered = false, STYLES_PART_ID = "word/styles.xml", stylesPartDescriptor, settingsPartDescriptor, RELS_PART_ID2 = "word/_rels/document.xml.rels", RELS_XMLNS2 = "http://schemas.openxmlformats.org/package/2006/relationships", HEADER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", relsPartDescriptor, BatchHistoryAdapter = class {
280443
280642
  #done = [];
280444
280643
  #redone = [];
280445
280644
  #listeners = /* @__PURE__ */ new Set;
@@ -296136,12 +296335,12 @@ menclose::after {
296136
296335
  return;
296137
296336
  console.log(...args$1);
296138
296337
  }, HEADER_FOOTER_INIT_BUDGET_MS = 200, MAX_ZOOM_WARNING_THRESHOLD = 10, MAX_SELECTION_RECTS_PER_USER = 100, SEMANTIC_RESIZE_DEBOUNCE_MS = 120, MIN_SEMANTIC_CONTENT_WIDTH_PX = 1, GLOBAL_PERFORMANCE, PresentationEditor, ICONS, TEXTS, tableActionsOptions;
296139
- var init_src_B2eovI4l_es = __esm(() => {
296338
+ var init_src_XFPz5mDi_es = __esm(() => {
296140
296339
  init_rolldown_runtime_Bg48TavK_es();
296141
- init_SuperConverter_lmyr0gmB_es();
296340
+ init_SuperConverter_BtMpBQnx_es();
296142
296341
  init_jszip_C49i9kUs_es();
296143
296342
  init_uuid_qzgm05fK_es();
296144
- init_create_headless_toolbar_CVKqElqj_es();
296343
+ init_create_headless_toolbar_FOTAKCop_es();
296145
296344
  init_constants_DrU4EASo_es();
296146
296345
  init_dist_B8HfvhaK_es();
296147
296346
  init_unified_Dsuw2be5_es();
@@ -299485,6 +299684,17 @@ ${err.toString()}`);
299485
299684
  dispatch
299486
299685
  });
299487
299686
  },
299687
+ reopenComment: ({ commentId, importedId, internal }) => ({ tr, dispatch, state }) => {
299688
+ tr.setMeta(CommentsPluginKey, { event: "update" });
299689
+ return reopenCommentById({
299690
+ commentId,
299691
+ importedId,
299692
+ internal,
299693
+ state,
299694
+ tr,
299695
+ dispatch
299696
+ });
299697
+ },
299488
299698
  editComment: ({ commentId, importedId, content: content3, text: text5 }) => ({ editor }) => {
299489
299699
  const nextCommentId = commentId ?? importedId;
299490
299700
  if (!nextCommentId)
@@ -314393,7 +314603,7 @@ function print() { __p += __j.call(arguments, '') }
314393
314603
  attributes: sharedAttributes
314394
314604
  });
314395
314605
  IGNORED_ATTRIBUTE_KEYS = new Set(["sdBlockId"]);
314396
- TRACK_CHANGE_MARK_NAMES = new Set([
314606
+ TRACK_CHANGE_MARK_NAMES$1 = new Set([
314397
314607
  "trackInsert",
314398
314608
  "trackDelete",
314399
314609
  "trackFormat"
@@ -318845,6 +319055,7 @@ function print() { __p += __j.call(arguments, '') }
318845
319055
  "editComment",
318846
319056
  "moveComment",
318847
319057
  "resolveComment",
319058
+ "reopenComment",
318848
319059
  "setCommentInternal"
318849
319060
  ],
318850
319061
  "comments.delete": ["removeComment"],
@@ -319210,6 +319421,11 @@ function print() { __p += __j.call(arguments, '') }
319210
319421
  bullet: "disc"
319211
319422
  };
319212
319423
  EDGE_NODE_TYPES$1 = new Set(SELECTION_EDGE_NODE_TYPES2);
319424
+ TRACK_CHANGE_MARK_NAMES = new Set([
319425
+ "trackInsert",
319426
+ "trackDelete",
319427
+ "trackFormat"
319428
+ ]);
319213
319429
  POINTS_TO_PIXELS = 96 / 72;
319214
319430
  PIXELS_TO_TWIPS = 1440 / 96;
319215
319431
  WORD_DEFAULT_TBL_LOOK = {
@@ -333038,11 +333254,11 @@ var init_zipper_DbkgrypV_es = __esm(() => {
333038
333254
 
333039
333255
  // ../../packages/superdoc/dist/super-editor.es.js
333040
333256
  var init_super_editor_es = __esm(() => {
333041
- init_src_B2eovI4l_es();
333042
- init_SuperConverter_lmyr0gmB_es();
333257
+ init_src_XFPz5mDi_es();
333258
+ init_SuperConverter_BtMpBQnx_es();
333043
333259
  init_jszip_C49i9kUs_es();
333044
333260
  init_xml_js_CqGKpaft_es();
333045
- init_create_headless_toolbar_CVKqElqj_es();
333261
+ init_create_headless_toolbar_FOTAKCop_es();
333046
333262
  init_constants_DrU4EASo_es();
333047
333263
  init_dist_B8HfvhaK_es();
333048
333264
  init_unified_Dsuw2be5_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.8.0-next.25",
3
+ "version": "0.8.0-next.27",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -34,11 +34,11 @@
34
34
  "access": "public"
35
35
  },
36
36
  "optionalDependencies": {
37
- "@superdoc-dev/cli-darwin-arm64": "0.8.0-next.25",
38
- "@superdoc-dev/cli-darwin-x64": "0.8.0-next.25",
39
- "@superdoc-dev/cli-linux-x64": "0.8.0-next.25",
40
- "@superdoc-dev/cli-linux-arm64": "0.8.0-next.25",
41
- "@superdoc-dev/cli-windows-x64": "0.8.0-next.25"
37
+ "@superdoc-dev/cli-darwin-arm64": "0.8.0-next.27",
38
+ "@superdoc-dev/cli-darwin-x64": "0.8.0-next.27",
39
+ "@superdoc-dev/cli-linux-arm64": "0.8.0-next.27",
40
+ "@superdoc-dev/cli-linux-x64": "0.8.0-next.27",
41
+ "@superdoc-dev/cli-windows-x64": "0.8.0-next.27"
42
42
  },
43
43
  "scripts": {
44
44
  "predev": "node scripts/ensure-superdoc-build.js",