@superdoc-dev/mcp 0.3.0-next.75 → 0.3.0-next.76

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 +56 -21
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -199842,7 +199842,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
199842
199842
  init_remark_gfm_BhnWr3yf_es();
199843
199843
  });
199844
199844
 
199845
- // ../../packages/superdoc/dist/chunks/src-CMq87UyB.es.js
199845
+ // ../../packages/superdoc/dist/chunks/src-BdpJXQ5F.es.js
199846
199846
  function deleteProps(obj, propOrProps) {
199847
199847
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
199848
199848
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -254670,7 +254670,7 @@ function extractCellPadding(cellAttrs) {
254670
254670
  return;
254671
254671
  return normalizeCellPaddingTopBottom(padding);
254672
254672
  }
254673
- function textNodeToRun({ node: node2, positions, storyKey, defaultFont, defaultSize, inheritedMarks = [], sdtMetadata, hyperlinkConfig = DEFAULT_HYPERLINK_CONFIG, themeColors, enableComments, runProperties, converterContext }) {
254673
+ function textNodeToRun({ node: node2, positions, storyKey, defaultFont, defaultSize, inheritedMarks = [], sdtMetadata, hyperlinkConfig = DEFAULT_HYPERLINK_CONFIG, themeColors, enableComments, runProperties, inlineRunProperties, converterContext }) {
254674
254674
  let run2 = {
254675
254675
  text: node2.text || "",
254676
254676
  fontFamily: defaultFont,
@@ -254684,7 +254684,7 @@ function textNodeToRun({ node: node2, positions, storyKey, defaultFont, defaultS
254684
254684
  applyMarksToRun(run2, [...node2.marks ?? [], ...inheritedMarks ?? []], hyperlinkConfig, themeColors, converterContext?.backgroundColor, enableComments, storyKey);
254685
254685
  if (sdtMetadata)
254686
254686
  run2.sdt = sdtMetadata;
254687
- run2 = applyInlineRunProperties(run2, runProperties, converterContext);
254687
+ run2 = applyInlineRunProperties(run2, runProperties, converterContext, inlineRunProperties);
254688
254688
  return run2;
254689
254689
  }
254690
254690
  function buildReferenceMarkerRun(displayText, params$1) {
@@ -254717,7 +254717,7 @@ function runNodeChildrenToRuns({ node: node2, inheritedMarks, sdtMetadata, conve
254717
254717
  if (runProperties.vanish)
254718
254718
  throw new HiddenByVanishError;
254719
254719
  const resolvedRunProperties = resolveRunProperties(converterContext, runProperties, paragraphProperties, converterContext.tableInfo, false, false);
254720
- node2.content?.forEach((child) => visitNode(child, mergedMarks, sdtMetadata, resolvedRunProperties, false));
254720
+ node2.content?.forEach((child) => visitNode(child, mergedMarks, sdtMetadata, resolvedRunProperties, false, runProperties));
254721
254721
  }
254722
254722
  function resolveSdtMetadata(input2) {
254723
254723
  if (!input2)
@@ -255490,12 +255490,12 @@ function handleTableOfAuthoritiesNode(node2, context) {
255490
255490
  sectionState.currentParagraphIndex++;
255491
255491
  });
255492
255492
  }
255493
- function structuredContentNodeToBlocks({ node: node2, inheritedMarks, sdtMetadata, visitNode, runProperties }) {
255493
+ function structuredContentNodeToBlocks({ node: node2, inheritedMarks, sdtMetadata, visitNode, runProperties, inlineRunProperties }) {
255494
255494
  const nextSdt = resolveNodeSdtMetadata(node2, "structuredContent") ?? sdtMetadata;
255495
- node2.content?.forEach((child) => visitNode(child, inheritedMarks, nextSdt, runProperties, false));
255495
+ node2.content?.forEach((child) => visitNode(child, inheritedMarks, nextSdt, runProperties, false, inlineRunProperties));
255496
255496
  }
255497
255497
  function pageReferenceNodeToBlock(params$1) {
255498
- const { node: node2, inheritedMarks, visitNode, sdtMetadata, positions, converterContext, paragraphProperties } = params$1;
255498
+ const { node: node2, inheritedMarks, visitNode, sdtMetadata, positions, converterContext, paragraphProperties, inlineRunProperties: parentInlineRunProperties } = params$1;
255499
255499
  const instruction = getNodeInstruction(node2) || "";
255500
255500
  const nodeAttrs = typeof node2.attrs === "object" && node2.attrs !== null ? node2.attrs : {};
255501
255501
  const mergedMarks = [...Array.isArray(nodeAttrs.marksAsAttrs) ? nodeAttrs.marksAsAttrs : [], ...inheritedMarks ?? []];
@@ -255525,7 +255525,8 @@ function pageReferenceNodeToBlock(params$1) {
255525
255525
  text: fallbackText
255526
255526
  },
255527
255527
  inheritedMarks: mergedMarks,
255528
- runProperties: resolvedRunProperties
255528
+ runProperties: resolvedRunProperties,
255529
+ inlineRunProperties: runProperties
255529
255530
  });
255530
255531
  if (pageRefPos) {
255531
255532
  tokenRun.pmStart = pageRefPos.start;
@@ -255549,7 +255550,7 @@ function pageReferenceNodeToBlock(params$1) {
255549
255550
  tokenRun.sdt = sdtMetadata;
255550
255551
  return tokenRun;
255551
255552
  } else if (Array.isArray(node2.content))
255552
- node2.content.forEach((child) => visitNode(child, mergedMarks, sdtMetadata, runProperties));
255553
+ node2.content.forEach((child) => visitNode(child, mergedMarks, sdtMetadata, runProperties, false, parentInlineRunProperties));
255553
255554
  }
255554
255555
  function fieldAnnotationNodeToRun({ node: node2, positions }) {
255555
255556
  const fieldMetadata = resolveNodeSdtMetadata(node2, "fieldAnnotation");
@@ -255652,7 +255653,7 @@ function fieldAnnotationNodeToRun({ node: node2, positions }) {
255652
255653
  return run2;
255653
255654
  }
255654
255655
  function bookmarkStartNodeToBlocks(params$1) {
255655
- const { node: node2, positions, bookmarks, visitNode, inheritedMarks, sdtMetadata, runProperties, converterContext } = params$1;
255656
+ const { node: node2, positions, bookmarks, visitNode, inheritedMarks, sdtMetadata, runProperties, inlineRunProperties, converterContext } = params$1;
255656
255657
  const nodeAttrs = typeof node2.attrs === "object" && node2.attrs !== null ? node2.attrs : {};
255657
255658
  const bookmarkName = typeof nodeAttrs.name === "string" ? nodeAttrs.name : undefined;
255658
255659
  if (bookmarkName && bookmarks) {
@@ -255682,7 +255683,7 @@ function bookmarkStartNodeToBlocks(params$1) {
255682
255683
  converterContext.renderedBookmarkIds.add(bookmarkId);
255683
255684
  }
255684
255685
  if (Array.isArray(node2.content))
255685
- node2.content.forEach((child) => visitNode(child, inheritedMarks, sdtMetadata, runProperties));
255686
+ node2.content.forEach((child) => visitNode(child, inheritedMarks, sdtMetadata, runProperties, false, inlineRunProperties));
255686
255687
  return run2;
255687
255688
  }
255688
255689
  function bookmarkEndNodeToRun(params$1) {
@@ -255732,7 +255733,7 @@ function tabNodeToRun({ node: node2, positions, storyKey, tabOrdinal, paragraphA
255732
255733
  applyMarksToRun(run2, marks, undefined, undefined, undefined, true, storyKey);
255733
255734
  return run2;
255734
255735
  }
255735
- function noBreakHyphenNodeToRun({ node: node2, positions, storyKey, defaultFont, defaultSize, inheritedMarks = [], sdtMetadata, hyperlinkConfig = DEFAULT_HYPERLINK_CONFIG, themeColors, enableComments, runProperties, converterContext }) {
255736
+ function noBreakHyphenNodeToRun({ node: node2, positions, storyKey, defaultFont, defaultSize, inheritedMarks = [], sdtMetadata, hyperlinkConfig = DEFAULT_HYPERLINK_CONFIG, themeColors, enableComments, runProperties, inlineRunProperties, converterContext }) {
255736
255737
  let run2 = {
255737
255738
  text: NON_BREAKING_HYPHEN,
255738
255739
  fontFamily: defaultFont,
@@ -255746,14 +255747,14 @@ function noBreakHyphenNodeToRun({ node: node2, positions, storyKey, defaultFont,
255746
255747
  applyMarksToRun(run2, [...node2.marks ?? [], ...inheritedMarks ?? []], hyperlinkConfig, themeColors, converterContext?.backgroundColor, enableComments, storyKey);
255747
255748
  if (sdtMetadata)
255748
255749
  run2.sdt = sdtMetadata;
255749
- run2 = applyInlineRunProperties(run2, runProperties, converterContext);
255750
+ run2 = applyInlineRunProperties(run2, runProperties, converterContext, inlineRunProperties);
255750
255751
  return run2;
255751
255752
  }
255752
- function tokenNodeToRun({ node: node2, positions, storyKey, defaultFont, defaultSize, inheritedMarks, hyperlinkConfig, themeColors, sdtMetadata, runProperties, converterContext }) {
255753
+ function tokenNodeToRun({ node: node2, positions, storyKey, defaultFont, defaultSize, inheritedMarks, hyperlinkConfig, themeColors, sdtMetadata, runProperties, inlineRunProperties, converterContext }) {
255753
255754
  const token$1 = TOKEN_INLINE_TYPES.get(node2.type);
255754
255755
  if (!token$1)
255755
255756
  return null;
255756
- const run2 = {
255757
+ let run2 = {
255757
255758
  text: "0",
255758
255759
  token: token$1,
255759
255760
  fontFamily: defaultFont,
@@ -255766,8 +255767,9 @@ function tokenNodeToRun({ node: node2, positions, storyKey, defaultFont, default
255766
255767
  }
255767
255768
  const nodeMarks = node2.marks ?? [];
255768
255769
  const marksAsAttrs = Array.isArray(node2.attrs?.marksAsAttrs) ? node2.attrs.marksAsAttrs : [];
255769
- applyMarksToRun(run2, [...nodeMarks.length > 0 ? nodeMarks : marksAsAttrs, ...inheritedMarks ?? []], hyperlinkConfig, themeColors, undefined, true, storyKey);
255770
- applyInlineRunProperties(run2, runProperties, converterContext);
255770
+ const marks = [...nodeMarks.length > 0 ? nodeMarks : marksAsAttrs, ...inheritedMarks ?? []];
255771
+ applyMarksToRun(run2, marks, hyperlinkConfig, themeColors, undefined, true, storyKey);
255772
+ run2 = applyInlineRunProperties(run2, runProperties, converterContext, inlineRunProperties);
255771
255773
  if (marksAsAttrs.length > 0)
255772
255774
  run2._explicitFont = true;
255773
255775
  if (sdtMetadata)
@@ -256758,7 +256760,7 @@ function paragraphToFlowBlocks({ para, nextBlockId, positions, storyKey, tracked
256758
256760
  });
256759
256761
  partIndex += 1;
256760
256762
  };
256761
- const visitNode = (node2, inheritedMarks = [], activeSdt, activeRunProperties, activeHidden = false) => {
256763
+ const visitNode = (node2, inheritedMarks = [], activeSdt, activeRunProperties, activeHidden = false, activeInlineRunProperties) => {
256762
256764
  if (activeHidden && node2.type !== "run") {
256763
256765
  suppressedByVanish = true;
256764
256766
  return;
@@ -256777,6 +256779,7 @@ function paragraphToFlowBlocks({ para, nextBlockId, positions, storyKey, tracked
256777
256779
  themeColors,
256778
256780
  enableComments,
256779
256781
  runProperties: activeRunProperties,
256782
+ inlineRunProperties: activeInlineRunProperties,
256780
256783
  paragraphProperties: resolvedParagraphProperties,
256781
256784
  converterContext,
256782
256785
  visitNode,
@@ -287375,7 +287378,31 @@ menclose::after {
287375
287378
  if (!normalizedExisting || isAutoColorValue || isDefaultBlack)
287376
287379
  run2.color = resolveAutoColor(backgroundColor);
287377
287380
  }
287378
- }, HiddenByVanishError, NotInlineNodeError, applyInlineRunProperties = (run2, runProperties, converterContext) => {
287381
+ }, HiddenByVanishError, NotInlineNodeError, buildBidiContext = (runProperties) => {
287382
+ if (runProperties.rtl == null)
287383
+ return;
287384
+ return { rtl: runProperties.rtl === true };
287385
+ }, buildScriptContext = (runProperties) => {
287386
+ const cs = runProperties.cs;
287387
+ const lang = runProperties.lang;
287388
+ const hasLang = lang != null && (lang.val != null || lang.bidi != null || lang.eastAsia != null);
287389
+ if (cs == null && !hasLang)
287390
+ return;
287391
+ const ctx$1 = {};
287392
+ if (cs != null)
287393
+ ctx$1.complexScript = cs === true;
287394
+ if (hasLang) {
287395
+ const language = {};
287396
+ if (lang.val != null)
287397
+ language.default = lang.val;
287398
+ if (lang.bidi != null)
287399
+ language.complexScript = lang.bidi;
287400
+ if (lang.eastAsia != null)
287401
+ language.eastAsian = lang.eastAsia;
287402
+ ctx$1.language = language;
287403
+ }
287404
+ return ctx$1;
287405
+ }, applyInlineRunProperties = (run2, runProperties, converterContext, inlineRunProperties) => {
287379
287406
  if (!runProperties)
287380
287407
  return run2;
287381
287408
  const runAttrs = computeRunAttrs(runProperties, converterContext);
@@ -287383,6 +287410,14 @@ menclose::after {
287383
287410
  for (const key2 of Object.keys(runAttrs))
287384
287411
  if (runAttrs[key2] !== undefined)
287385
287412
  merged[key2] = runAttrs[key2];
287413
+ if (inlineRunProperties) {
287414
+ const bidi = buildBidiContext(inlineRunProperties);
287415
+ if (bidi)
287416
+ merged.bidi = bidi;
287417
+ const script = buildScriptContext(inlineRunProperties);
287418
+ if (script)
287419
+ merged.script = script;
287420
+ }
287386
287421
  return merged;
287387
287422
  }, buildSyntheticTextNode = (displayText, marks) => ({
287388
287423
  type: "text",
@@ -293397,7 +293432,7 @@ menclose::after {
293397
293432
  return;
293398
293433
  console.log(...args$1);
293399
293434
  }, 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;
293400
- var init_src_CMq87UyB_es = __esm(() => {
293435
+ var init_src_BdpJXQ5F_es = __esm(() => {
293401
293436
  init_rolldown_runtime_Bg48TavK_es();
293402
293437
  init_SuperConverter_BInxZk0I_es();
293403
293438
  init_jszip_C49i9kUs_es();
@@ -331458,7 +331493,7 @@ var init_zipper_BxRAi0_5_es = __esm(() => {
331458
331493
 
331459
331494
  // ../../packages/superdoc/dist/super-editor.es.js
331460
331495
  var init_super_editor_es = __esm(() => {
331461
- init_src_CMq87UyB_es();
331496
+ init_src_BdpJXQ5F_es();
331462
331497
  init_SuperConverter_BInxZk0I_es();
331463
331498
  init_jszip_C49i9kUs_es();
331464
331499
  init_xml_js_CqGKpaft_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/mcp",
3
- "version": "0.3.0-next.75",
3
+ "version": "0.3.0-next.76",
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
23
  "@superdoc/super-editor": "0.0.1",
23
- "superdoc": "1.32.0",
24
- "@superdoc/document-api": "0.0.1"
24
+ "superdoc": "1.32.0"
25
25
  },
26
26
  "publishConfig": {
27
27
  "access": "public"