@superdoc/mcp 1.3.1-next.6 → 1.3.1-next.7

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 +15 -6
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -31318,7 +31318,7 @@ var init_host = __esm(() => {
31318
31318
  });
31319
31319
 
31320
31320
  // ../../packages/sdk/langs/node/src/runtime/sdk-version.generated.ts
31321
- var SDK_VERSION = "2.16.1-next.6";
31321
+ var SDK_VERSION = "2.16.1-next.7";
31322
31322
 
31323
31323
  // ../../packages/sdk/langs/node/src/runtime/embedded-platform.ts
31324
31324
  import { chmodSync, existsSync } from "node:fs";
@@ -199148,7 +199148,7 @@ function hasProvableSelectedCommentRange(paragraphXml, rangeStart, rangeEnd) {
199148
199148
  markerKindsById.set(marker.id, markerKinds);
199149
199149
  }
199150
199150
  for (const marker of markers) {
199151
- const selected = marker.markerKind === "commentRangeStart" ? rangeStart <= marker.visibleStart && marker.visibleStart < rangeEnd : rangeStart < marker.visibleStart && marker.visibleStart <= rangeEnd;
199151
+ const selected = marker.markerKind === "commentRangeStart" ? rangeStart <= marker.visibleStart && marker.visibleStart < rangeEnd : selectionStraddlesMarker2(rangeStart, rangeEnd, marker.visibleStart);
199152
199152
  if (!selected)
199153
199153
  continue;
199154
199154
  if (marker.id === null)
@@ -429197,7 +429197,7 @@ function replaceLiveTableStructuralProperties(tableXml, tableBlocks, rowProperti
429197
429197
  const replacements = [];
429198
429198
  for (const row of directElementSpans(tableXml, table.openEnd, table.closeStart, "tr")) {
429199
429199
  const cells = directElementSpans(tableXml, row.openEnd, row.closeStart, "tc");
429200
- const rowBlock = cells.flatMap((cell) => directParagraphSpans(tableXml, cell)).map((paragraph4) => blockIdFromParagraphXml(tableXml.slice(paragraph4.start, paragraph4.end))).map((blockId) => blockId == null ? undefined : blockById.get(blockId)).find(Boolean);
429200
+ const rowBlock = cells.flatMap((cell) => cellParagraphSpans(tableXml, cell)).map((paragraph4) => blockIdFromParagraphXml(tableXml.slice(paragraph4.start, paragraph4.end))).map((blockId) => blockId == null ? undefined : blockById.get(blockId)).find(Boolean);
429201
429201
  const rowNodeId = rowBlock?.structuralRefs.rowNodeId;
429202
429202
  if (rowNodeId && cells[0] && rowProperties.has(rowNodeId)) {
429203
429203
  const prefix = tableXml.slice(row.start, cells[0].start);
@@ -429208,12 +429208,12 @@ function replaceLiveTableStructuralProperties(tableXml, tableBlocks, rowProperti
429208
429208
  });
429209
429209
  }
429210
429210
  for (const cell of cells) {
429211
- const paragraphs = directParagraphSpans(tableXml, cell);
429211
+ const paragraphs = cellParagraphSpans(tableXml, cell);
429212
429212
  const cellBlock = paragraphs.map((paragraph4) => blockIdFromParagraphXml(tableXml.slice(paragraph4.start, paragraph4.end))).map((blockId) => blockId == null ? undefined : blockById.get(blockId)).find(Boolean);
429213
429213
  const cellNodeId = cellBlock?.structuralRefs.cellNodeId;
429214
429214
  if (!cellNodeId || !cellProperties.has(cellNodeId))
429215
429215
  continue;
429216
- const contentStart = paragraphs[0]?.start ?? cell.closeStart;
429216
+ const contentStart = directParagraphSpans(tableXml, cell)[0]?.start ?? cell.closeStart;
429217
429217
  const prefix = tableXml.slice(cell.start, contentStart);
429218
429218
  replacements.push({
429219
429219
  start: cell.start,
@@ -429533,7 +429533,7 @@ function tableBlockIdsFromXml(tableXml) {
429533
429533
  return blockIds;
429534
429534
  for (const row of directElementSpans(tableXml, table.openEnd, table.closeStart, "tr")) {
429535
429535
  for (const cell of directElementSpans(tableXml, row.openEnd, row.closeStart, "tc")) {
429536
- for (const paragraph4 of directParagraphSpans(tableXml, cell)) {
429536
+ for (const paragraph4 of cellParagraphSpans(tableXml, cell)) {
429537
429537
  const blockId = blockIdFromParagraphXml(tableXml.slice(paragraph4.start, paragraph4.end));
429538
429538
  if (blockId)
429539
429539
  blockIds.add(blockId);
@@ -429590,6 +429590,15 @@ function findContainingTableCellSpan(xml, offset) {
429590
429590
  }
429591
429591
  return containing;
429592
429592
  }
429593
+ function cellParagraphSpans(xml, cellSpan) {
429594
+ const spans = directParagraphSpans(xml, cellSpan);
429595
+ for (const control of directElementSpans(xml, cellSpan.openEnd, cellSpan.closeStart, "sdt")) {
429596
+ for (const content3 of directElementSpans(xml, control.openEnd, control.closeStart, "sdtContent")) {
429597
+ spans.push(...cellParagraphSpans(xml, content3));
429598
+ }
429599
+ }
429600
+ return spans;
429601
+ }
429593
429602
  function directParagraphSpans(xml, cellSpan) {
429594
429603
  const spans = [];
429595
429604
  let cursor = cellSpan.openEnd;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc/mcp",
3
- "version": "1.3.1-next.6",
3
+ "version": "1.3.1-next.7",
4
4
  "description": "Model Context Protocol server for SuperDoc, giving an AI agent tools to read and edit .docx files.",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0",
@@ -24,13 +24,13 @@
24
24
  ],
25
25
  "dependencies": {
26
26
  "@modelcontextprotocol/sdk": "^1.26.0",
27
- "@superdoc/sdk": "2.16.1-next.6",
27
+ "@superdoc/sdk": "2.16.1-next.7",
28
28
  "debug": "^4.4.3",
29
29
  "zod": "^4.3.6"
30
30
  },
31
31
  "devDependencies": {
32
- "superdoc": "2.19.1-next.2",
33
- "@superdoc/docx-engine": "0.18.1-next.2",
32
+ "superdoc": "2.19.1-next.3",
33
+ "@superdoc/docx-engine": "0.18.1-next.3",
34
34
  "@superdoc/document-api": "0.1.0-alpha.0",
35
35
  "@types/bun": "^1.3.8",
36
36
  "@types/node": "22.19.2",