@superdoc-dev/mcp 0.7.0-next.1 → 0.7.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 (2) hide show
  1. package/dist/index.js +45 -31
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -51891,7 +51891,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
51891
51891
  emptyOptions2 = {};
51892
51892
  });
51893
51893
 
51894
- // ../../packages/superdoc/dist/chunks/SuperConverter-SvCYq2KK.es.js
51894
+ // ../../packages/superdoc/dist/chunks/SuperConverter-UqLu6KQU.es.js
51895
51895
  function getExtensionConfigField(extension$1, field, context = { name: "" }) {
51896
51896
  const fieldValue = extension$1.config[field];
51897
51897
  if (typeof fieldValue === "function")
@@ -105867,7 +105867,7 @@ var isRegExp = (value) => {
105867
105867
  state.kern = kernNode.attributes["w:val"];
105868
105868
  }
105869
105869
  }, SuperConverter;
105870
- var init_SuperConverter_SvCYq2KK_es = __esm(() => {
105870
+ var init_SuperConverter_UqLu6KQU_es = __esm(() => {
105871
105871
  init_rolldown_runtime_Bg48TavK_es();
105872
105872
  init_jszip_C49i9kUs_es();
105873
105873
  init_xml_js_CqGKpaft_es();
@@ -109686,7 +109686,7 @@ var init_SuperConverter_SvCYq2KK_es = __esm(() => {
109686
109686
  },
109687
109687
  "format.paragraph.setAlignment": {
109688
109688
  memberPath: "format.paragraph.setAlignment",
109689
- description: "Set paragraph alignment (justification) on a paragraph-like block.",
109689
+ description: "Set visual paragraph alignment on a paragraph-like block. For RTL paragraphs, left/right are translated to Word-compatible stored justification values.",
109690
109690
  expectedResult: "Returns a ParagraphMutationResult; reports NO_OP if the alignment already matches.",
109691
109691
  requiresDocumentContext: true,
109692
109692
  metadata: mutationOperation({
@@ -117616,7 +117616,10 @@ var init_SuperConverter_SvCYq2KK_es = __esm(() => {
117616
117616
  }
117617
117617
  }, ["target", "styleId"]), paragraphMutationResultSchemaFor("styles.paragraph.setStyle"), paragraphMutationFailureSchemaFor("styles.paragraph.setStyle"), objectSchema({ target: paragraphTargetSchema }, ["target"]), paragraphMutationResultSchemaFor("styles.paragraph.clearStyle"), paragraphMutationFailureSchemaFor("styles.paragraph.clearStyle"), objectSchema({ target: paragraphTargetSchema }, ["target"]), paragraphMutationResultSchemaFor("format.paragraph.resetDirectFormatting"), paragraphMutationFailureSchemaFor("format.paragraph.resetDirectFormatting"), objectSchema({
117618
117618
  target: paragraphTargetSchema,
117619
- alignment: { enum: [...PARAGRAPH_ALIGNMENTS] }
117619
+ alignment: {
117620
+ enum: [...PARAGRAPH_ALIGNMENTS],
117621
+ description: "Visual paragraph alignment. In RTL paragraphs, 'left' stores w:jc='right' and 'right' stores w:jc='left' so Word displays the requested side."
117622
+ }
117620
117623
  }, ["target", "alignment"]), paragraphMutationResultSchemaFor("format.paragraph.setAlignment"), paragraphMutationFailureSchemaFor("format.paragraph.setAlignment"), objectSchema({ target: paragraphTargetSchema }, ["target"]), paragraphMutationResultSchemaFor("format.paragraph.clearAlignment"), paragraphMutationFailureSchemaFor("format.paragraph.clearAlignment"), { ...objectSchema({
117621
117624
  target: paragraphTargetSchema,
117622
117625
  left: {
@@ -144044,7 +144047,7 @@ var init_SuperConverter_SvCYq2KK_es = __esm(() => {
144044
144047
  };
144045
144048
  });
144046
144049
 
144047
- // ../../packages/superdoc/dist/chunks/create-headless-toolbar-CAjlOJ3Q.es.js
144050
+ // ../../packages/superdoc/dist/chunks/create-headless-toolbar-QcQvy-nD.es.js
144048
144051
  function parseSizeUnit(val = "0") {
144049
144052
  const length = val.toString() || "0";
144050
144053
  const value = Number.parseFloat(length);
@@ -147327,6 +147330,7 @@ function getWordChanges(oldText, newText) {
147327
147330
  i4++;
147328
147331
  continue;
147329
147332
  }
147333
+ const groupStart = i4;
147330
147334
  let deleteStart = -1;
147331
147335
  let deleteEnd = -1;
147332
147336
  let insertText = "";
@@ -147355,7 +147359,7 @@ function getWordChanges(oldText, newText) {
147355
147359
  oldTo: deleteEnd
147356
147360
  });
147357
147361
  else if (insertText.length > 0) {
147358
- const prevStep = i4 > 0 ? steps[i4 - 1] : null;
147362
+ const prevStep = groupStart > 0 ? steps[groupStart - 1] : null;
147359
147363
  let insertAt = 0;
147360
147364
  if (prevStep && prevStep.type === "equal") {
147361
147365
  const prevToken = oldTokens[prevStep.oldIdx];
@@ -152950,6 +152954,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
152950
152954
  const documentId = activeEditor?.options?.documentId;
152951
152955
  if (!documentId)
152952
152956
  return null;
152957
+ if (typeof superdoc.getPresentationEditorForDocument === "function")
152958
+ return superdoc.getPresentationEditorForDocument(documentId);
152953
152959
  return (superdoc.superdocStore?.documents ?? []).find((doc3) => doc3.getEditor?.()?.options?.documentId === documentId)?.getPresentationEditor?.() ?? null;
152954
152960
  }, resolveToolbarSources = (superdoc) => {
152955
152961
  const presentationEditor = resolvePresentationEditor(superdoc);
@@ -153696,17 +153702,21 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
153696
153702
  active: false,
153697
153703
  disabled: isCommandDisabled(context) || !inTable
153698
153704
  };
153705
+ }, lookupCommentByCommentId = (superdoc, commentId) => {
153706
+ if (typeof superdoc?.getComment === "function")
153707
+ return superdoc.getComment(commentId) ?? null;
153708
+ const store = superdoc?.commentsStore;
153709
+ if (typeof store?.getComment === "function")
153710
+ return store.getComment(commentId) ?? null;
153711
+ return null;
153699
153712
  }, enrichTrackedChanges = (trackedChanges = [], superdoc) => {
153700
153713
  if (!trackedChanges.length)
153701
153714
  return trackedChanges;
153702
- const store = superdoc?.commentsStore;
153703
- if (!store?.getComment)
153704
- return trackedChanges;
153705
153715
  return trackedChanges.map((change) => {
153706
153716
  const commentId = change.id;
153707
153717
  if (!commentId)
153708
153718
  return change;
153709
- const storeComment = store.getComment(commentId);
153719
+ const storeComment = lookupCommentByCommentId(superdoc, commentId);
153710
153720
  if (!storeComment)
153711
153721
  return change;
153712
153722
  const comment = typeof storeComment.getValues === "function" ? storeComment.getValues() : storeComment;
@@ -154054,8 +154064,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
154054
154064
  }
154055
154065
  };
154056
154066
  };
154057
- var init_create_headless_toolbar_CAjlOJ3Q_es = __esm(() => {
154058
- init_SuperConverter_SvCYq2KK_es();
154067
+ var init_create_headless_toolbar_QcQvy_nD_es = __esm(() => {
154068
+ init_SuperConverter_UqLu6KQU_es();
154059
154069
  init_uuid_qzgm05fK_es();
154060
154070
  init_constants_DrU4EASo_es();
154061
154071
  init_dist_B8HfvhaK_es();
@@ -208781,7 +208791,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
208781
208791
  init_remark_gfm_BhnWr3yf_es();
208782
208792
  });
208783
208793
 
208784
- // ../../packages/superdoc/dist/chunks/src-5wVLGLjJ.es.js
208794
+ // ../../packages/superdoc/dist/chunks/src-BJQRcFsD.es.js
208785
208795
  function deleteProps(obj, propOrProps) {
208786
208796
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
208787
208797
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -297170,13 +297180,13 @@ menclose::after {
297170
297180
  return;
297171
297181
  console.log(...args$1);
297172
297182
  }, 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;
297173
- var init_src_5wVLGLjJ_es = __esm(() => {
297183
+ var init_src_BJQRcFsD_es = __esm(() => {
297174
297184
  init_rolldown_runtime_Bg48TavK_es();
297175
- init_SuperConverter_SvCYq2KK_es();
297185
+ init_SuperConverter_UqLu6KQU_es();
297176
297186
  init_jszip_C49i9kUs_es();
297177
297187
  init_xml_js_CqGKpaft_es();
297178
297188
  init_uuid_qzgm05fK_es();
297179
- init_create_headless_toolbar_CAjlOJ3Q_es();
297189
+ init_create_headless_toolbar_QcQvy_nD_es();
297180
297190
  init_constants_DrU4EASo_es();
297181
297191
  init_dist_B8HfvhaK_es();
297182
297192
  init_unified_Dsuw2be5_es();
@@ -334892,11 +334902,11 @@ function print() { __p += __j.call(arguments, '') }
334892
334902
  ];
334893
334903
  });
334894
334904
 
334895
- // ../../packages/superdoc/dist/chunks/create-super-doc-ui-C2jsxhNG.es.js
334905
+ // ../../packages/superdoc/dist/chunks/create-super-doc-ui-FWAQonYc.es.js
334896
334906
  var MOD_ALIASES, ALT_ALIASES, CTRL_ALIASES, SHIFT_ALIASES, BUILTIN_CONTEXT_MENU_GROUPS, BUILTIN_GROUP_ORDER, RESERVED_PROXY_PROPERTY_NAMES, ALL_TOOLBAR_COMMAND_IDS, EMPTY_ACTIVE_IDS;
334897
- var init_create_super_doc_ui_C2jsxhNG_es = __esm(() => {
334898
- init_SuperConverter_SvCYq2KK_es();
334899
- init_create_headless_toolbar_CAjlOJ3Q_es();
334907
+ var init_create_super_doc_ui_FWAQonYc_es = __esm(() => {
334908
+ init_SuperConverter_UqLu6KQU_es();
334909
+ init_create_headless_toolbar_QcQvy_nD_es();
334900
334910
  MOD_ALIASES = new Set([
334901
334911
  "Mod",
334902
334912
  "Meta",
@@ -334938,16 +334948,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
334938
334948
 
334939
334949
  // ../../packages/superdoc/dist/super-editor.es.js
334940
334950
  var init_super_editor_es = __esm(() => {
334941
- init_src_5wVLGLjJ_es();
334942
- init_SuperConverter_SvCYq2KK_es();
334951
+ init_src_BJQRcFsD_es();
334952
+ init_SuperConverter_UqLu6KQU_es();
334943
334953
  init_jszip_C49i9kUs_es();
334944
334954
  init_xml_js_CqGKpaft_es();
334945
- init_create_headless_toolbar_CAjlOJ3Q_es();
334955
+ init_create_headless_toolbar_QcQvy_nD_es();
334946
334956
  init_constants_DrU4EASo_es();
334947
334957
  init_dist_B8HfvhaK_es();
334948
334958
  init_unified_Dsuw2be5_es();
334949
334959
  init_DocxZipper_CZMPWpOp_es();
334950
- init_create_super_doc_ui_C2jsxhNG_es();
334960
+ init_create_super_doc_ui_FWAQonYc_es();
334951
334961
  init_ui_C5PAS9hY_es();
334952
334962
  init_eventemitter3_BnGqBE_Q_es();
334953
334963
  init_errors_CNaD6vcg_es();
@@ -337545,7 +337555,7 @@ More content with **bold** and *italic*.`
337545
337555
  },
337546
337556
  "format.paragraph.setAlignment": {
337547
337557
  memberPath: "format.paragraph.setAlignment",
337548
- description: "Set paragraph alignment (justification) on a paragraph-like block.",
337558
+ description: "Set visual paragraph alignment on a paragraph-like block. For RTL paragraphs, left/right are translated to Word-compatible stored justification values.",
337549
337559
  expectedResult: "Returns a ParagraphMutationResult; reports NO_OP if the alignment already matches.",
337550
337560
  requiresDocumentContext: true,
337551
337561
  metadata: mutationOperation2({
@@ -345559,10 +345569,13 @@ var init_schemas4 = __esm(() => {
345559
345569
  failure: paragraphMutationFailureSchemaFor2("format.paragraph.resetDirectFormatting")
345560
345570
  },
345561
345571
  "format.paragraph.setAlignment": {
345562
- input: objectSchema2({ target: paragraphTargetSchema2, alignment: { enum: [...PARAGRAPH_ALIGNMENTS2] } }, [
345563
- "target",
345564
- "alignment"
345565
- ]),
345572
+ input: objectSchema2({
345573
+ target: paragraphTargetSchema2,
345574
+ alignment: {
345575
+ enum: [...PARAGRAPH_ALIGNMENTS2],
345576
+ description: "Visual paragraph alignment. In RTL paragraphs, 'left' stores w:jc='right' and 'right' stores w:jc='left' so Word displays the requested side."
345577
+ }
345578
+ }, ["target", "alignment"]),
345566
345579
  output: paragraphMutationResultSchemaFor2("format.paragraph.setAlignment"),
345567
345580
  success: paragraphMutationSuccessSchema2,
345568
345581
  failure: paragraphMutationFailureSchemaFor2("format.paragraph.setAlignment")
@@ -438643,6 +438656,7 @@ function getWordChanges2(oldText, newText) {
438643
438656
  i5++;
438644
438657
  continue;
438645
438658
  }
438659
+ const groupStart = i5;
438646
438660
  let deleteStart = -1;
438647
438661
  let deleteEnd = -1;
438648
438662
  let insertText2 = "";
@@ -438663,7 +438677,7 @@ function getWordChanges2(oldText, newText) {
438663
438677
  } else if (deleteStart !== -1) {
438664
438678
  result.push({ type: "delete", oldFrom: deleteStart, oldTo: deleteEnd });
438665
438679
  } else if (insertText2.length > 0) {
438666
- const prevStep = i5 > 0 ? steps[i5 - 1] : null;
438680
+ const prevStep = groupStart > 0 ? steps[groupStart - 1] : null;
438667
438681
  let insertAt = 0;
438668
438682
  if (prevStep && prevStep.type === "equal") {
438669
438683
  const prevToken = oldTokens[prevStep.oldIdx];
@@ -470836,7 +470850,7 @@ var init_catalog = __esm(() => {
470836
470850
  "right",
470837
470851
  "justify"
470838
470852
  ],
470839
- description: "Required for action 'set_alignment'."
470853
+ description: "Visual paragraph alignment. In RTL paragraphs, 'left' stores w:jc='right' and 'right' stores w:jc='left' so Word displays the requested side. Required for action 'set_alignment'."
470840
470854
  },
470841
470855
  left: {
470842
470856
  type: "integer",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/mcp",
3
- "version": "0.7.0-next.1",
3
+ "version": "0.7.0-next.5",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=20"