@superdoc/mcp 1.19.0-next.17 → 1.19.0-next.25

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 +11 -8
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -31407,7 +31407,7 @@ var init_host = __esm(() => {
31407
31407
  });
31408
31408
 
31409
31409
  // ../../packages/sdk/langs/node/src/runtime/sdk-version.generated.ts
31410
- var SDK_VERSION = "2.32.0-next.17";
31410
+ var SDK_VERSION = "2.32.0-next.25";
31411
31411
 
31412
31412
  // ../../packages/sdk/langs/node/src/runtime/embedded-platform.ts
31413
31413
  import { accessSync, chmodSync, constants, existsSync, statSync } from "node:fs";
@@ -515703,17 +515703,17 @@ function sectionPropertyAttributes(openTag) {
515703
515703
  }
515704
515704
  return attributes;
515705
515705
  }
515706
- function pageGeometryProblem(size2, margins, gutterAtTop) {
515706
+ function pageGeometryProblem(size2, margins, gutterAtTop, previousSize) {
515707
515707
  const read2 = (attrs, key3, fallback) => {
515708
515708
  const raw = attrs?.get(key3);
515709
515709
  return raw === undefined ? fallback : twips(raw) ?? NaN;
515710
515710
  };
515711
515711
  const width = read2(size2, "w", 12240);
515712
515712
  const height = read2(size2, "h", 15840);
515713
- const left = read2(margins, "left", 1440);
515714
- const right = read2(margins, "right", 1440);
515715
- const top = read2(margins, "top", 1440);
515716
- const bottom = read2(margins, "bottom", 1440);
515713
+ const left = read2(margins, "left", TWIPS_PER_INCH2);
515714
+ const right = read2(margins, "right", TWIPS_PER_INCH2);
515715
+ const top = read2(margins, "top", TWIPS_PER_INCH2);
515716
+ const bottom = read2(margins, "bottom", TWIPS_PER_INCH2);
515717
515717
  const gutter = read2(margins, "gutter", 0);
515718
515718
  if (![width, height, left, right, top, bottom, gutter].every(Number.isFinite) || width <= 0 || height <= 0 || left < 0 || right < 0 || gutter < 0) {
515719
515719
  return "Page dimensions must be positive and left, right, and gutter margins must be non-negative finite lengths.";
@@ -515721,10 +515721,13 @@ function pageGeometryProblem(size2, margins, gutterAtTop) {
515721
515721
  const inch = (value3) => value3 / TWIPS_PER_INCH2;
515722
515722
  const horizontal = left + right + (gutterAtTop ? 0 : gutter);
515723
515723
  const vertical = Math.abs(top) + Math.abs(bottom) + (gutterAtTop ? gutter : 0);
515724
- if (horizontal >= width) {
515724
+ const hasAuthoredBodyMargins = GEOMETRY_ATTRIBUTES.pgMar.some((key3) => margins?.has(key3));
515725
+ const reducesWidth = previousSize !== undefined && width < (twips(previousSize?.get("w")) ?? 12240);
515726
+ const reducesHeight = previousSize !== undefined && height < (twips(previousSize?.get("h")) ?? 15840);
515727
+ if ((hasAuthoredBodyMargins || reducesWidth) && horizontal >= width) {
515725
515728
  return `Left + right${gutterAtTop ? "" : " + gutter"} (${inch(horizontal)} inches) must be less than page width (${inch(width)} inches).`;
515726
515729
  }
515727
- if (vertical >= height) {
515730
+ if ((hasAuthoredBodyMargins || reducesHeight) && vertical >= height) {
515728
515731
  return `Top and bottom margin distances${gutterAtTop ? " plus gutter" : ""} (${inch(vertical)} inches) must be less than page height (${inch(height)} inches).`;
515729
515732
  }
515730
515733
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc/mcp",
3
- "version": "1.19.0-next.17",
3
+ "version": "1.19.0-next.25",
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.32.0-next.17",
27
+ "@superdoc/sdk": "2.32.0-next.25",
28
28
  "debug": "^4.4.3",
29
29
  "zod": "^4.3.6"
30
30
  },
31
31
  "devDependencies": {
32
- "superdoc": "2.35.0-next.17",
33
- "@superdoc/docx-engine": "0.34.0-next.17",
32
+ "superdoc": "2.35.0-next.25",
33
+ "@superdoc/docx-engine": "0.34.0-next.25",
34
34
  "@superdoc/document-api": "0.1.0-alpha.0",
35
35
  "@types/bun": "^1.3.8",
36
36
  "@types/node": "22.19.2",