@superdoc-dev/mcp 0.3.0-next.89 → 0.3.0-next.90

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 +76 -36
  2. package/package.json +3 -3
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-CbX9ZPI9.es.js
51894
+ // ../../packages/superdoc/dist/chunks/SuperConverter-Odr0JG7X.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")
@@ -62869,10 +62869,12 @@ function handleDocumentSectionNode(params) {
62869
62869
  }
62870
62870
  function detectControlType(sdtPr) {
62871
62871
  if (!sdtPr?.elements)
62872
- return null;
62872
+ return "richText";
62873
62873
  const names = sdtPr.elements.map((el) => el.name);
62874
62874
  if (names.includes("w:text"))
62875
62875
  return "text";
62876
+ if (names.includes("w:richText"))
62877
+ return "richText";
62876
62878
  if (names.includes("w:date"))
62877
62879
  return "date";
62878
62880
  if (names.includes("w14:checkbox") || names.includes("w:checkbox"))
@@ -62887,7 +62889,16 @@ function detectControlType(sdtPr) {
62887
62889
  return "repeatingSectionItem";
62888
62890
  if (names.includes("w:group"))
62889
62891
  return "group";
62890
- return null;
62892
+ const TYPE_CHILD_NAMES = new Set([
62893
+ "w:equation",
62894
+ "w:picture",
62895
+ "w:citation",
62896
+ "w:bibliography",
62897
+ "w:docPartList"
62898
+ ]);
62899
+ if (names.some((n) => TYPE_CHILD_NAMES.has(n)))
62900
+ return null;
62901
+ return "richText";
62891
62902
  }
62892
62903
  function extractAppearance(sdtPr) {
62893
62904
  const el = sdtPr?.elements?.find((e) => e.name === "w:appearance" || e.name === "w15:appearance");
@@ -105381,7 +105392,7 @@ var isRegExp = (value) => {
105381
105392
  state.kern = kernNode.attributes["w:val"];
105382
105393
  }
105383
105394
  }, SuperConverter;
105384
- var init_SuperConverter_CbX9ZPI9_es = __esm(() => {
105395
+ var init_SuperConverter_Odr0JG7X_es = __esm(() => {
105385
105396
  init_rolldown_runtime_Bg48TavK_es();
105386
105397
  init_jszip_C49i9kUs_es();
105387
105398
  init_xml_js_CqGKpaft_es();
@@ -120550,6 +120561,7 @@ var init_SuperConverter_CbX9ZPI9_es = __esm(() => {
120550
120561
  ]);
120551
120562
  CONTENT_CONTROL_TYPES = [
120552
120563
  "text",
120564
+ "richText",
120553
120565
  "date",
120554
120566
  "checkbox",
120555
120567
  "comboBox",
@@ -140759,6 +140771,7 @@ var init_SuperConverter_CbX9ZPI9_es = __esm(() => {
140759
140771
  ]);
140760
140772
  CONTROL_TYPE_ELEMENT_MAP = {
140761
140773
  text: "w:text",
140774
+ richText: "w:richText",
140762
140775
  date: "w:date",
140763
140776
  checkbox: "w14:checkbox",
140764
140777
  comboBox: "w:comboBox",
@@ -142111,6 +142124,7 @@ var init_SuperConverter_CbX9ZPI9_es = __esm(() => {
142111
142124
  SDT_NODE_NAMES = ["structuredContent", "structuredContentBlock"];
142112
142125
  VALID_CONTROL_TYPES = [
142113
142126
  "text",
142127
+ "richText",
142114
142128
  "date",
142115
142129
  "checkbox",
142116
142130
  "comboBox",
@@ -143250,7 +143264,7 @@ var init_SuperConverter_CbX9ZPI9_es = __esm(() => {
143250
143264
  };
143251
143265
  });
143252
143266
 
143253
- // ../../packages/superdoc/dist/chunks/create-headless-toolbar-CbUkXBcM.es.js
143267
+ // ../../packages/superdoc/dist/chunks/create-headless-toolbar-DR4hZl1N.es.js
143254
143268
  function parseSizeUnit(val = "0") {
143255
143269
  const length = val.toString() || "0";
143256
143270
  const value = Number.parseFloat(length);
@@ -145972,8 +145986,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
145972
145986
  }
145973
145987
  };
145974
145988
  };
145975
- var init_create_headless_toolbar_CbUkXBcM_es = __esm(() => {
145976
- init_SuperConverter_CbX9ZPI9_es();
145989
+ var init_create_headless_toolbar_DR4hZl1N_es = __esm(() => {
145990
+ init_SuperConverter_Odr0JG7X_es();
145977
145991
  init_constants_DrU4EASo_es();
145978
145992
  init_dist_B8HfvhaK_es();
145979
145993
  CSS_DIMENSION_REGEX = /[\d-.]+(\w+)$/;
@@ -200192,7 +200206,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
200192
200206
  init_remark_gfm_BhnWr3yf_es();
200193
200207
  });
200194
200208
 
200195
- // ../../packages/superdoc/dist/chunks/src-BfDVvw9H.es.js
200209
+ // ../../packages/superdoc/dist/chunks/src-ByXcviOY.es.js
200196
200210
  function deleteProps(obj, propOrProps) {
200197
200211
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
200198
200212
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -235803,7 +235817,10 @@ function wrapWrapper(editor, input2, options) {
235803
235817
  id: id2,
235804
235818
  tag: input2.tag,
235805
235819
  alias: input2.alias,
235806
- lockMode: input2.lockMode ?? "unlocked"
235820
+ lockMode: input2.lockMode ?? "unlocked",
235821
+ controlType: "richText",
235822
+ type: "richText",
235823
+ sdtPr: buildDefaultSdtPr("richText")
235807
235824
  }, resolved.node);
235808
235825
  const { tr } = editor.state;
235809
235826
  tr.replaceWith(resolved.pos, resolved.pos + resolved.node.nodeSize, wrapperNode);
@@ -236016,6 +236033,11 @@ function buildDefaultTypeSdtPrElement(controlType) {
236016
236033
  name: "w:text",
236017
236034
  type: "element"
236018
236035
  };
236036
+ case "richText":
236037
+ return {
236038
+ name: "w:richText",
236039
+ type: "element"
236040
+ };
236019
236041
  case "date":
236020
236042
  return {
236021
236043
  name: "w:date",
@@ -236725,15 +236747,16 @@ function createWrapper(editor, input2, options) {
236725
236747
  if (input2.target)
236726
236748
  resolveSdtByTarget(editor.state.doc, input2.target);
236727
236749
  return executeSdtMutation(editor, target, options, () => {
236750
+ const controlType = input2.controlType ?? "richText";
236728
236751
  const attrs = {
236729
236752
  id: id2,
236730
236753
  tag: input2.tag,
236731
236754
  alias: input2.alias,
236732
236755
  lockMode: input2.lockMode ?? "unlocked",
236733
- controlType: input2.controlType ?? "unknown",
236734
- type: input2.controlType ?? "unknown"
236756
+ controlType,
236757
+ type: controlType
236735
236758
  };
236736
- const defaultSdtPr = buildDefaultSdtPr(input2.controlType ?? "unknown");
236759
+ const defaultSdtPr = buildDefaultSdtPr(controlType);
236737
236760
  const isDateCreate = input2.controlType === "date" && input2.content == null;
236738
236761
  const dateDefaults = isDateCreate ? buildDateControlDefaults() : null;
236739
236762
  const sdtPrWithDateDefaults = dateDefaults ? applyDateDefaultsToSdtPr(defaultSdtPr, dateDefaults) : defaultSdtPr;
@@ -256996,11 +257019,7 @@ function tableNodeToBlock(node2, { nextBlockId, positions, storyKey, trackedChan
256996
257019
  };
256997
257020
  };
256998
257021
  const borderSource = getBorderSource();
256999
- const isRtlTable$1 = tablePropertiesForCascade?.rightToLeft === true;
257000
- const tableBorders = borderSource ? extractTableBorders(borderSource.borders, {
257001
- unit: borderSource.unit,
257002
- isRtl: isRtlTable$1
257003
- }) : undefined;
257022
+ const tableBorders = borderSource ? extractTableBorders(borderSource.borders, { unit: borderSource.unit }) : undefined;
257004
257023
  if (tableBorders)
257005
257024
  tableAttrs.borders = tableBorders;
257006
257025
  if (node2.attrs?.borderCollapse)
@@ -288885,11 +288904,11 @@ menclose::after {
288885
288904
  val: normalizeLegacyBorderStyle(b$1.val)
288886
288905
  };
288887
288906
  }
288888
- const fallback = extractCellBorders({ borders: filteredLegacyBorders }, { isRtl: tableProperties?.rightToLeft === true });
288907
+ const fallback = extractCellBorders({ borders: filteredLegacyBorders });
288889
288908
  if (fallback)
288890
288909
  cellAttrs.borders = fallback;
288891
288910
  }
288892
- const padding = extractCellPadding(cellNode.attrs ?? {}, { isRtl: tableProperties?.rightToLeft === true }) ?? (defaultCellPadding ? { ...defaultCellPadding } : undefined);
288911
+ const padding = extractCellPadding(cellNode.attrs ?? {}) ?? (defaultCellPadding ? { ...defaultCellPadding } : undefined);
288893
288912
  if (padding)
288894
288913
  cellAttrs.padding = padding;
288895
288914
  const verticalAlign = cellNode.attrs?.verticalAlign;
@@ -294035,12 +294054,12 @@ menclose::after {
294035
294054
  return;
294036
294055
  console.log(...args$1);
294037
294056
  }, 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;
294038
- var init_src_BfDVvw9H_es = __esm(() => {
294057
+ var init_src_ByXcviOY_es = __esm(() => {
294039
294058
  init_rolldown_runtime_Bg48TavK_es();
294040
- init_SuperConverter_CbX9ZPI9_es();
294059
+ init_SuperConverter_Odr0JG7X_es();
294041
294060
  init_jszip_C49i9kUs_es();
294042
294061
  init_uuid_qzgm05fK_es();
294043
- init_create_headless_toolbar_CbUkXBcM_es();
294062
+ init_create_headless_toolbar_DR4hZl1N_es();
294044
294063
  init_constants_DrU4EASo_es();
294045
294064
  init_dist_B8HfvhaK_es();
294046
294065
  init_unified_Dsuw2be5_es();
@@ -318303,6 +318322,7 @@ function print() { __p += __j.call(arguments, '') }
318303
318322
  ]);
318304
318323
  CONTROL_TYPE_SDT_PR_ELEMENTS = {
318305
318324
  text: "w:text",
318325
+ richText: "w:richText",
318306
318326
  date: "w:date",
318307
318327
  checkbox: "w14:checkbox",
318308
318328
  comboBox: "w:comboBox",
@@ -332082,11 +332102,11 @@ function print() { __p += __j.call(arguments, '') }
332082
332102
  ];
332083
332103
  });
332084
332104
 
332085
- // ../../packages/superdoc/dist/chunks/create-super-doc-ui-CkcWwDom.es.js
332105
+ // ../../packages/superdoc/dist/chunks/create-super-doc-ui-C-W-_8d_.es.js
332086
332106
  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;
332087
- var init_create_super_doc_ui_CkcWwDom_es = __esm(() => {
332088
- init_SuperConverter_CbX9ZPI9_es();
332089
- init_create_headless_toolbar_CbUkXBcM_es();
332107
+ var init_create_super_doc_ui_C_W__8d__es = __esm(() => {
332108
+ init_SuperConverter_Odr0JG7X_es();
332109
+ init_create_headless_toolbar_DR4hZl1N_es();
332090
332110
  MOD_ALIASES = new Set([
332091
332111
  "Mod",
332092
332112
  "Meta",
@@ -332128,16 +332148,16 @@ var init_zipper_BxRAi0_5_es = __esm(() => {
332128
332148
 
332129
332149
  // ../../packages/superdoc/dist/super-editor.es.js
332130
332150
  var init_super_editor_es = __esm(() => {
332131
- init_src_BfDVvw9H_es();
332132
- init_SuperConverter_CbX9ZPI9_es();
332151
+ init_src_ByXcviOY_es();
332152
+ init_SuperConverter_Odr0JG7X_es();
332133
332153
  init_jszip_C49i9kUs_es();
332134
332154
  init_xml_js_CqGKpaft_es();
332135
- init_create_headless_toolbar_CbUkXBcM_es();
332155
+ init_create_headless_toolbar_DR4hZl1N_es();
332136
332156
  init_constants_DrU4EASo_es();
332137
332157
  init_dist_B8HfvhaK_es();
332138
332158
  init_unified_Dsuw2be5_es();
332139
332159
  init_DocxZipper_TPSo9G36_es();
332140
- init_create_super_doc_ui_CkcWwDom_es();
332160
+ init_create_super_doc_ui_C_W__8d__es();
332141
332161
  init_ui_CGB3qmy3_es();
332142
332162
  init_eventemitter3_UwU_CLPU_es();
332143
332163
  init_errors_C_DoKMoN_es();
@@ -350163,6 +350183,7 @@ var CONTENT_CONTROL_TYPES2, LOCK_MODES2, CONTENT_CONTROL_APPEARANCES2;
350163
350183
  var init_content_controls_types = __esm(() => {
350164
350184
  CONTENT_CONTROL_TYPES2 = [
350165
350185
  "text",
350186
+ "richText",
350166
350187
  "date",
350167
350188
  "checkbox",
350168
350189
  "comboBox",
@@ -371391,6 +371412,7 @@ var init_sdt_info_builder = __esm(() => {
371391
371412
  init_sdt_properties_write();
371392
371413
  VALID_CONTROL_TYPES2 = [
371393
371414
  "text",
371415
+ "richText",
371394
371416
  "date",
371395
371417
  "checkbox",
371396
371418
  "comboBox",
@@ -396703,10 +396725,12 @@ var init_handle_document_section_node = () => {};
396703
396725
  // ../../packages/super-editor/src/editors/v1/core/super-converter/v3/handlers/w/sdt/helpers/handle-structured-content-node.js
396704
396726
  function detectControlType2(sdtPr) {
396705
396727
  if (!sdtPr?.elements)
396706
- return null;
396728
+ return "richText";
396707
396729
  const names = sdtPr.elements.map((el) => el.name);
396708
396730
  if (names.includes("w:text"))
396709
396731
  return "text";
396732
+ if (names.includes("w:richText"))
396733
+ return "richText";
396710
396734
  if (names.includes("w:date"))
396711
396735
  return "date";
396712
396736
  if (names.includes("w14:checkbox") || names.includes("w:checkbox"))
@@ -396721,7 +396745,10 @@ function detectControlType2(sdtPr) {
396721
396745
  return "repeatingSectionItem";
396722
396746
  if (names.includes("w:group"))
396723
396747
  return "group";
396724
- return null;
396748
+ const TYPE_CHILD_NAMES = new Set(["w:equation", "w:picture", "w:citation", "w:bibliography", "w:docPartList"]);
396749
+ if (names.some((n) => TYPE_CHILD_NAMES.has(n)))
396750
+ return null;
396751
+ return "richText";
396725
396752
  }
396726
396753
  function extractAppearance2(sdtPr) {
396727
396754
  const el = sdtPr?.elements?.find((e) => e.name === "w:appearance" || e.name === "w15:appearance");
@@ -416141,6 +416168,7 @@ var init_translate_structured_content = __esm(() => {
416141
416168
  init_convert_sdt_content_to_runs();
416142
416169
  CONTROL_TYPE_ELEMENT_MAP2 = {
416143
416170
  text: "w:text",
416171
+ richText: "w:richText",
416144
416172
  date: "w:date",
416145
416173
  checkbox: "w14:checkbox",
416146
416174
  comboBox: "w:comboBox",
@@ -458291,7 +458319,15 @@ function wrapWrapper2(editor, input2, options) {
458291
458319
  const nodeType = editor.schema.nodes[nodeTypeName];
458292
458320
  if (!nodeType)
458293
458321
  return false;
458294
- const wrapperNode = nodeType.create({ id: id2, tag: input2.tag, alias: input2.alias, lockMode: input2.lockMode ?? "unlocked" }, resolved.node);
458322
+ const wrapperNode = nodeType.create({
458323
+ id: id2,
458324
+ tag: input2.tag,
458325
+ alias: input2.alias,
458326
+ lockMode: input2.lockMode ?? "unlocked",
458327
+ controlType: "richText",
458328
+ type: "richText",
458329
+ sdtPr: buildDefaultSdtPr2("richText")
458330
+ }, resolved.node);
458295
458331
  const { tr } = editor.state;
458296
458332
  tr.replaceWith(resolved.pos, resolved.pos + resolved.node.nodeSize, wrapperNode);
458297
458333
  dispatchTransaction4(editor, tr);
@@ -458487,6 +458523,8 @@ function buildDefaultTypeSdtPrElement2(controlType) {
458487
458523
  switch (controlType) {
458488
458524
  case "text":
458489
458525
  return { name: "w:text", type: "element" };
458526
+ case "richText":
458527
+ return { name: "w:richText", type: "element" };
458490
458528
  case "date":
458491
458529
  return {
458492
458530
  name: "w:date",
@@ -459134,15 +459172,16 @@ function createWrapper2(editor, input2, options) {
459134
459172
  resolveSdtByTarget2(editor.state.doc, input2.target);
459135
459173
  }
459136
459174
  return executeSdtMutation2(editor, target, options, () => {
459175
+ const controlType = input2.controlType ?? "richText";
459137
459176
  const attrs = {
459138
459177
  id: id2,
459139
459178
  tag: input2.tag,
459140
459179
  alias: input2.alias,
459141
459180
  lockMode: input2.lockMode ?? "unlocked",
459142
- controlType: input2.controlType ?? "unknown",
459143
- type: input2.controlType ?? "unknown"
459181
+ controlType,
459182
+ type: controlType
459144
459183
  };
459145
- const defaultSdtPr = buildDefaultSdtPr2(input2.controlType ?? "unknown");
459184
+ const defaultSdtPr = buildDefaultSdtPr2(controlType);
459146
459185
  const isDateCreate = input2.controlType === "date" && input2.content == null;
459147
459186
  const dateDefaults = isDateCreate ? buildDateControlDefaults2() : null;
459148
459187
  const sdtPrWithDateDefaults = dateDefaults ? applyDateDefaultsToSdtPr2(defaultSdtPr, dateDefaults) : defaultSdtPr;
@@ -459295,6 +459334,7 @@ var init_content_controls_wrappers = __esm(() => {
459295
459334
  ]);
459296
459335
  CONTROL_TYPE_SDT_PR_ELEMENTS2 = {
459297
459336
  text: "w:text",
459337
+ richText: "w:richText",
459298
459338
  date: "w:date",
459299
459339
  checkbox: "w14:checkbox",
459300
459340
  comboBox: "w:comboBox",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/mcp",
3
- "version": "0.3.0-next.89",
3
+ "version": "0.3.0-next.90",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=20"
@@ -19,9 +19,9 @@
19
19
  "@types/bun": "^1.3.8",
20
20
  "@types/node": "22.19.2",
21
21
  "typescript": "^5.9.2",
22
- "@superdoc/document-api": "0.0.1",
22
+ "superdoc": "1.32.0",
23
23
  "@superdoc/super-editor": "0.0.1",
24
- "superdoc": "1.32.0"
24
+ "@superdoc/document-api": "0.0.1"
25
25
  },
26
26
  "publishConfig": {
27
27
  "access": "public"