@superdoc-dev/mcp 0.12.0-next.49 → 0.12.0-next.50

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 +27 -21
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -148100,7 +148100,7 @@ var init_SuperConverter_DlrS7cQT_es = __esm(() => {
148100
148100
  };
148101
148101
  });
148102
148102
 
148103
- // ../../packages/superdoc/dist/chunks/create-headless-toolbar-Bm-c7KZd.es.js
148103
+ // ../../packages/superdoc/dist/chunks/create-headless-toolbar-0mIJ8-xU.es.js
148104
148104
  function parseSizeUnit(val = "0") {
148105
148105
  const length = val.toString() || "0";
148106
148106
  const value = Number.parseFloat(length);
@@ -157306,7 +157306,7 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, MARK_KEYS, STEP_OP_CATALOG_UNFROZEN, PU
157306
157306
  init() {
157307
157307
  if (!editor.converter || editor.options.mode !== "docx")
157308
157308
  return {};
157309
- if (editor.presentationEditor)
157309
+ if (editor.presentationEditor || editor.options?.isHeadless)
157310
157310
  return {
157311
157311
  styles: editor.converter?.linkedStyles || [],
157312
157312
  decorations: DecorationSet.empty
@@ -157320,7 +157320,7 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, MARK_KEYS, STEP_OP_CATALOG_UNFROZEN, PU
157320
157320
  apply(tr, prev, oldEditorState, newEditorState) {
157321
157321
  if (!editor.converter || editor.options.mode !== "docx")
157322
157322
  return { ...prev };
157323
- if (editor.presentationEditor)
157323
+ if (editor.presentationEditor || editor.options?.isHeadless)
157324
157324
  return {
157325
157325
  ...prev,
157326
157326
  decorations: DecorationSet.empty
@@ -158921,7 +158921,7 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, MARK_KEYS, STEP_OP_CATALOG_UNFROZEN, PU
158921
158921
  }
158922
158922
  };
158923
158923
  };
158924
- var init_create_headless_toolbar_Bm_c7KZd_es = __esm(() => {
158924
+ var init_create_headless_toolbar_0mIJ8_xU_es = __esm(() => {
158925
158925
  init_rolldown_runtime_Bg48TavK_es();
158926
158926
  init_SuperConverter_DlrS7cQT_es();
158927
158927
  init_jszip_C49i9kUs_es();
@@ -214537,7 +214537,7 @@ var init_remark_gfm_DCND_V_3_es = __esm(() => {
214537
214537
  init_remark_gfm_BUJjZJLy_es();
214538
214538
  });
214539
214539
 
214540
- // ../../packages/superdoc/dist/chunks/src-CVmBLxZV.es.js
214540
+ // ../../packages/superdoc/dist/chunks/src-Dra6R0wc.es.js
214541
214541
  function deleteProps(obj, propOrProps) {
214542
214542
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
214543
214543
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -236172,7 +236172,7 @@ function createHeadingWrapper(editor, input2, options) {
236172
236172
  function extractTextPreview(node2) {
236173
236173
  if (!node2.isTextblock)
236174
236174
  return null;
236175
- const text5 = node2.textContent;
236175
+ const text5 = textContentInBlock(node2, { textModel: "visible" });
236176
236176
  if (text5.length <= TEXT_PREVIEW_MAX_LENGTH)
236177
236177
  return text5;
236178
236178
  return text5.slice(0, TEXT_PREVIEW_MAX_LENGTH);
@@ -236180,7 +236180,7 @@ function extractTextPreview(node2) {
236180
236180
  function extractBlockText$1(node2) {
236181
236181
  if (!node2.isTextblock)
236182
236182
  return null;
236183
- return node2.textContent;
236183
+ return textContentInBlock(node2, { textModel: "visible" });
236184
236184
  }
236185
236185
  function buildStyleContext(editor) {
236186
236186
  const styleProps = readTranslatedLinkedStyles(editor);
@@ -236249,6 +236249,8 @@ function extractBlockFormatting(node2, styleCtx) {
236249
236249
  const marks = child.marks ?? [];
236250
236250
  if (!child.isText || marks.length === 0)
236251
236251
  return;
236252
+ if (marks.some((mark2) => mark2.type.name === "trackDelete"))
236253
+ return;
236252
236254
  for (const mark2 of marks) {
236253
236255
  const markName = mark2.type.name;
236254
236256
  const attrs = mark2.attrs;
@@ -236358,7 +236360,7 @@ function blocksListWrapper(editor, input2) {
236358
236360
  return {
236359
236361
  total,
236360
236362
  blocks: paged.map((candidate, i3) => {
236361
- const textLength = computeTextContentLength(candidate.node);
236363
+ const textLength = computeTextContentLength(candidate.node, { textModel: "visible" });
236362
236364
  const fullText = input2?.includeText ? extractBlockText$1(candidate.node) : undefined;
236363
236365
  const numbering = extractBlockNumbering(candidate.node);
236364
236366
  const ref$1 = textLength > 0 ? encodeV4Ref({
@@ -315522,13 +315524,13 @@ menclose::after {
315522
315524
  return;
315523
315525
  console.log(...args$1);
315524
315526
  }, 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, TRACKED_MARK_NAMES;
315525
- var init_src_CVmBLxZV_es = __esm(() => {
315527
+ var init_src_Dra6R0wc_es = __esm(() => {
315526
315528
  init_rolldown_runtime_Bg48TavK_es();
315527
315529
  init_SuperConverter_DlrS7cQT_es();
315528
315530
  init_jszip_C49i9kUs_es();
315529
315531
  init_xml_js_CqGKpaft_es();
315530
315532
  init_uuid_B2wVPhPi_es();
315531
- init_create_headless_toolbar_Bm_c7KZd_es();
315533
+ init_create_headless_toolbar_0mIJ8_xU_es();
315532
315534
  init_constants_D9qj59G2_es();
315533
315535
  init_unified_BDuVPlMu_es();
315534
315536
  init_remark_gfm_BUJjZJLy_es();
@@ -315957,7 +315959,7 @@ var init_src_CVmBLxZV_es = __esm(() => {
315957
315959
  },
315958
315960
  "blocks.list": {
315959
315961
  memberPath: "blocks.list",
315960
- description: "List top-level blocks in document order with IDs, types, text previews, and optional full text when includeText:true. Supports pagination via offset/limit, optional nodeType filtering, and single-story scoping via `in: <StoryLocator>`.",
315962
+ description: "List top-level blocks in document order with IDs, types, text previews, and optional full text when includeText:true. Text, previews, lengths, and formatting hints use the VISIBLE model: pending tracked deletions are excluded (matching how edit refs resolve), and inline atoms render as a single placeholder character. Supports pagination via offset/limit, optional nodeType filtering, and single-story scoping via `in: <StoryLocator>`.",
315961
315963
  expectedResult: "Returns a BlocksListResult with total block count, an ordered array of block entries (ordinal, nodeId, nodeType, textPreview, optional text, isEmpty), and the current document revision.",
315962
315964
  requiresDocumentContext: true,
315963
315965
  metadata: readOperation({ throws: ["INVALID_INPUT", ...T_STORY] }),
@@ -358835,11 +358837,11 @@ function print() { __p += __j.call(arguments, '') }
358835
358837
  ]);
358836
358838
  });
358837
358839
 
358838
- // ../../packages/superdoc/dist/chunks/create-super-doc-ui-D2qFX5i6.es.js
358840
+ // ../../packages/superdoc/dist/chunks/create-super-doc-ui-BNkolmSw.es.js
358839
358841
  var DEFAULT_TEXT_ALIGN_OPTIONS, DEFAULT_LINE_HEIGHT_OPTIONS, DEFAULT_ZOOM_OPTIONS, DEFAULT_DOCUMENT_MODE_OPTIONS, DEFAULT_FONT_SIZE_OPTIONS, headlessToolbarConstants, 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, FONT_SIZE_OPTIONS;
358840
- var init_create_super_doc_ui_D2qFX5i6_es = __esm(() => {
358842
+ var init_create_super_doc_ui_BNkolmSw_es = __esm(() => {
358841
358843
  init_SuperConverter_DlrS7cQT_es();
358842
- init_create_headless_toolbar_Bm_c7KZd_es();
358844
+ init_create_headless_toolbar_0mIJ8_xU_es();
358843
358845
  DEFAULT_TEXT_ALIGN_OPTIONS = [
358844
358846
  {
358845
358847
  label: "Left",
@@ -359130,15 +359132,15 @@ var init_zipper_BxRAi0_5_es = __esm(() => {
359130
359132
 
359131
359133
  // ../../packages/superdoc/dist/super-editor.es.js
359132
359134
  var init_super_editor_es = __esm(() => {
359133
- init_src_CVmBLxZV_es();
359135
+ init_src_Dra6R0wc_es();
359134
359136
  init_SuperConverter_DlrS7cQT_es();
359135
359137
  init_jszip_C49i9kUs_es();
359136
359138
  init_xml_js_CqGKpaft_es();
359137
- init_create_headless_toolbar_Bm_c7KZd_es();
359139
+ init_create_headless_toolbar_0mIJ8_xU_es();
359138
359140
  init_constants_D9qj59G2_es();
359139
359141
  init_unified_BDuVPlMu_es();
359140
359142
  init_DocxZipper_BzS208BW_es();
359141
- init_create_super_doc_ui_D2qFX5i6_es();
359143
+ init_create_super_doc_ui_BNkolmSw_es();
359142
359144
  init_ui_CGB3qmy3_es();
359143
359145
  init_eventemitter3_UwU_CLPU_es();
359144
359146
  init_errors_C_DoKMoN_es();
@@ -361521,7 +361523,7 @@ More content with **bold** and *italic*.`
361521
361523
  },
361522
361524
  "blocks.list": {
361523
361525
  memberPath: "blocks.list",
361524
- description: "List top-level blocks in document order with IDs, types, text previews, and optional full text when includeText:true. Supports pagination via offset/limit, optional nodeType filtering, and single-story scoping via `in: <StoryLocator>`.",
361526
+ description: "List top-level blocks in document order with IDs, types, text previews, and optional full text when includeText:true. Text, previews, lengths, and formatting hints use the VISIBLE model: pending tracked deletions are excluded (matching how edit refs resolve), and inline atoms render as a single placeholder character. Supports pagination via offset/limit, optional nodeType filtering, and single-story scoping via `in: <StoryLocator>`.",
361525
361527
  expectedResult: "Returns a BlocksListResult with total block count, an ordered array of block entries (ordinal, nodeId, nodeType, textPreview, optional text, isEmpty), and the current document revision.",
361526
361528
  requiresDocumentContext: true,
361527
361529
  metadata: readOperation2({
@@ -492648,7 +492650,7 @@ var init_create_wrappers = __esm(() => {
492648
492650
  function extractTextPreview2(node4) {
492649
492651
  if (!node4.isTextblock)
492650
492652
  return null;
492651
- const text9 = node4.textContent;
492653
+ const text9 = textContentInBlock2(node4, { textModel: "visible" });
492652
492654
  if (text9.length <= TEXT_PREVIEW_MAX_LENGTH2)
492653
492655
  return text9;
492654
492656
  return text9.slice(0, TEXT_PREVIEW_MAX_LENGTH2);
@@ -492656,7 +492658,7 @@ function extractTextPreview2(node4) {
492656
492658
  function extractBlockText2(node4) {
492657
492659
  if (!node4.isTextblock)
492658
492660
  return null;
492659
- return node4.textContent;
492661
+ return textContentInBlock2(node4, { textModel: "visible" });
492660
492662
  }
492661
492663
  function buildStyleContext2(editor) {
492662
492664
  const styleProps = readTranslatedLinkedStyles2(editor);
@@ -492719,6 +492721,8 @@ function extractBlockFormatting2(node4, styleCtx) {
492719
492721
  const marks = child.marks ?? [];
492720
492722
  if (!child.isText || marks.length === 0)
492721
492723
  return;
492724
+ if (marks.some((mark2) => mark2.type.name === TrackDeleteMarkName2))
492725
+ return;
492722
492726
  for (const mark2 of marks) {
492723
492727
  const markName = mark2.type.name;
492724
492728
  const attrs = mark2.attrs;
@@ -492825,7 +492829,7 @@ function blocksListWrapper2(editor, input2) {
492825
492829
  const rev = getRevision2(editor);
492826
492830
  const styleCtx = buildStyleContext2(editor);
492827
492831
  const blocks2 = paged.map((candidate, i4) => {
492828
- const textLength = computeTextContentLength2(candidate.node);
492832
+ const textLength = computeTextContentLength2(candidate.node, { textModel: "visible" });
492829
492833
  const fullText = input2?.includeText ? extractBlockText2(candidate.node) : undefined;
492830
492834
  const numbering = extractBlockNumbering2(candidate.node);
492831
492835
  const ref3 = textLength > 0 ? encodeV4Ref2({
@@ -492987,6 +492991,8 @@ var SUPPORTED_DELETE_NODE_TYPES4, REJECTED_DELETE_NODE_TYPES4, TEXT_PREVIEW_MAX_
492987
492991
  var init_blocks_wrappers = __esm(() => {
492988
492992
  init_dist2();
492989
492993
  init_index_cache();
492994
+ init_text_offset_resolver();
492995
+ init_constants2();
492990
492996
  init_node_address_resolver();
492991
492997
  init_text_offset_resolver();
492992
492998
  init_errors4();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/mcp",
3
- "version": "0.12.0-next.49",
3
+ "version": "0.12.0-next.50",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=20"
@@ -20,8 +20,8 @@
20
20
  "@types/node": "22.19.2",
21
21
  "typescript": "^5.9.2",
22
22
  "@superdoc/document-api": "0.1.0-alpha.0",
23
- "@superdoc/super-editor": "0.0.1",
24
- "superdoc": "1.43.1"
23
+ "superdoc": "1.43.1",
24
+ "@superdoc/super-editor": "0.0.1"
25
25
  },
26
26
  "publishConfig": {
27
27
  "access": "public"