@superdoc/mcp 1.5.0-next.4 → 1.5.0-next.5
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.
- package/dist/index.js +40 -5
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -31443,7 +31443,7 @@ var init_host = __esm(() => {
|
|
|
31443
31443
|
});
|
|
31444
31444
|
|
|
31445
31445
|
// ../../packages/sdk/langs/node/src/runtime/sdk-version.generated.ts
|
|
31446
|
-
var SDK_VERSION = "2.18.0-next.
|
|
31446
|
+
var SDK_VERSION = "2.18.0-next.5";
|
|
31447
31447
|
|
|
31448
31448
|
// ../../packages/sdk/langs/node/src/runtime/embedded-platform.ts
|
|
31449
31449
|
import { accessSync, chmodSync, constants, existsSync, statSync } from "node:fs";
|
|
@@ -285967,8 +285967,10 @@ function toCssFontFamily(fontName, options = {}) {
|
|
|
285967
285967
|
if (trimmed.includes(";")) {
|
|
285968
285968
|
trimmed = splitOutsideQuotes(trimmed, ";").join(", ");
|
|
285969
285969
|
}
|
|
285970
|
-
const { fallback, wordFamily } = options;
|
|
285971
|
-
const
|
|
285970
|
+
const { fallback, wordFamily, pitch } = options;
|
|
285971
|
+
const family = typeof wordFamily === "string" ? wordFamily.trim().toLowerCase() : "";
|
|
285972
|
+
const fixedPitch = typeof pitch === "string" && pitch.trim().toLowerCase() === "fixed";
|
|
285973
|
+
const fallbackValue = fallback ?? (fixedPitch ? "monospace" : undefined) ?? (family !== "auto" && Object.hasOwn(FONT_FAMILY_FALLBACKS, family) ? mapWordFamilyFallback(family) : undefined) ?? inferGenericFallbackFromFontName(trimmed);
|
|
285972
285974
|
const fallbackParts = normalizeParts(fallbackValue);
|
|
285973
285975
|
if (fallbackParts.length === 0) {
|
|
285974
285976
|
return trimmed;
|
|
@@ -285984,7 +285986,12 @@ var FONT_FAMILY_FALLBACKS, DEFAULT_GENERIC_FALLBACK = "sans-serif", INHERITED_FO
|
|
|
285984
285986
|
if (!fontName || typeof fontName !== "string")
|
|
285985
285987
|
return "";
|
|
285986
285988
|
return fontName.trim().replace(/^["']|["']$/g, "").toLowerCase();
|
|
285987
|
-
}, inferGenericFallbackFromFontName = (fontName) =>
|
|
285989
|
+
}, MONOSPACE_FONTS, inferGenericFallbackFromFontName = (fontName) => {
|
|
285990
|
+
const name = normalizeFontNameForLookup(fontName);
|
|
285991
|
+
if (MONOSPACE_FONTS.has(name))
|
|
285992
|
+
return "monospace";
|
|
285993
|
+
return SERIF_LIKE_FONTS.has(name) ? "serif" : DEFAULT_GENERIC_FALLBACK;
|
|
285994
|
+
}, normalizeParts = (value) => (value || "").split(",").map((part) => part.trim()).filter(Boolean), splitOutsideQuotes = (str, delimiter) => {
|
|
285988
285995
|
if (!str.includes('"') && !str.includes("'")) {
|
|
285989
285996
|
return str.split(delimiter).map((p) => p.trim()).filter(Boolean);
|
|
285990
285997
|
}
|
|
@@ -286041,6 +286048,17 @@ var init_font_utils = __esm(() => {
|
|
|
286041
286048
|
"bodoni mt",
|
|
286042
286049
|
"constantia"
|
|
286043
286050
|
]);
|
|
286051
|
+
MONOSPACE_FONTS = new Set([
|
|
286052
|
+
"courier",
|
|
286053
|
+
"courier new",
|
|
286054
|
+
"consolas",
|
|
286055
|
+
"menlo",
|
|
286056
|
+
"monaco",
|
|
286057
|
+
"lucida console",
|
|
286058
|
+
"liberation mono",
|
|
286059
|
+
"dejavu sans mono",
|
|
286060
|
+
"source code pro"
|
|
286061
|
+
]);
|
|
286044
286062
|
});
|
|
286045
286063
|
|
|
286046
286064
|
// ../../../v2/node_modules/.pnpm/@superdoc+style-engine@file+..+public+packages+layout-engine+style-engine/node_modules/@superdoc/style-engine/src/normalize/run-attrs.ts
|
|
@@ -286064,7 +286082,9 @@ function normalizeRunAttrsFromOoxml(props, context = {}) {
|
|
|
286064
286082
|
if (props.smallCaps != null)
|
|
286065
286083
|
out.smallCaps = props.smallCaps === true;
|
|
286066
286084
|
const fontFamily = resolveFontFamily(props, context.themeFontScheme);
|
|
286067
|
-
const
|
|
286085
|
+
const fontKey = fontFamily?.trim().replace(/^["']|["']$/g, "");
|
|
286086
|
+
const metadata2 = fontKey ? context.fontTable?.[fontKey] ?? context.fontTable?.[fontKey.toLowerCase()] : undefined;
|
|
286087
|
+
const cssFontFamily = toCssFontFamily(fontFamily, { wordFamily: metadata2?.family, pitch: metadata2?.pitch });
|
|
286068
286088
|
if (cssFontFamily)
|
|
286069
286089
|
out.fontFamily = cssFontFamily;
|
|
286070
286090
|
const fontSize = resolveFontSize(props.fontSize);
|
|
@@ -422668,6 +422688,15 @@ function nextSeededBlockId(shardId, paragraphIndex, reason) {
|
|
|
422668
422688
|
return `sd-${shardToken}-${reason}-${ordinal}`;
|
|
422669
422689
|
}
|
|
422670
422690
|
function seedStoryShard(input) {
|
|
422691
|
+
const target = input.doc;
|
|
422692
|
+
const doc2 = "rootDoc" in target ? target.rootDoc : ("doc" in target) ? target.doc : target;
|
|
422693
|
+
let result;
|
|
422694
|
+
doc2.transact(() => {
|
|
422695
|
+
result = seedStoryShardInTransaction(input);
|
|
422696
|
+
}, "story-shard:seed");
|
|
422697
|
+
return result;
|
|
422698
|
+
}
|
|
422699
|
+
function seedStoryShardInTransaction(input) {
|
|
422671
422700
|
const { shardId, storyId, storyKind, sourcePartUri, paragraphs } = input;
|
|
422672
422701
|
const editable = input.editable ?? STORY_EDITABLE.get(storyKind) ?? false;
|
|
422673
422702
|
const scope = resolveStoryShardScope(input.doc);
|
|
@@ -448986,6 +449015,12 @@ async function openV2CollaborativeDocumentSession(options) {
|
|
|
448986
449015
|
contentUnitIds: Array.from(canonical.contentUnitIds)
|
|
448987
449016
|
});
|
|
448988
449017
|
if (!finalized.committed) {
|
|
449018
|
+
if (finalized.classification === ROOM_CLASSIFICATION.v2Committed && options.runtime.validateLateJoin({
|
|
449019
|
+
compatibility: { supports: COLLAB_V2_ROOM_SCHEMA_VERSION },
|
|
449020
|
+
readiness: READINESS_CLASS.bodyEditable
|
|
449021
|
+
}).ok) {
|
|
449022
|
+
throw new CollabV2DiagnosticError(COLLAB_V2_DIAGNOSTICS.COLLAB_V2_ROOM_ALREADY_EXISTS, "another creator committed this v2 collaboration room during open; reopen with join", { rootId: options.runtime.rootId });
|
|
449023
|
+
}
|
|
448989
449024
|
if (finalized.diagnostics.some((diagnostic2) => diagnostic2.code === COLLAB_V2_DIAGNOSTICS.COLLAB_V2_BOOTSTRAP_CLAIM_LOST)) {
|
|
448990
449025
|
throw new CollabV2DiagnosticError(COLLAB_V2_DIAGNOSTICS.COLLAB_V2_ROOM_INITIALIZING, "another creator is initializing this v2 collaboration room", { rootId: options.runtime.rootId });
|
|
448991
449026
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc/mcp",
|
|
3
|
-
"version": "1.5.0-next.
|
|
3
|
+
"version": "1.5.0-next.5",
|
|
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.18.0-next.
|
|
27
|
+
"@superdoc/sdk": "2.18.0-next.5",
|
|
28
28
|
"debug": "^4.4.3",
|
|
29
29
|
"zod": "^4.3.6"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"superdoc": "2.21.0-next.
|
|
33
|
-
"@superdoc/docx-engine": "0.20.0-next.
|
|
32
|
+
"superdoc": "2.21.0-next.5",
|
|
33
|
+
"@superdoc/docx-engine": "0.20.0-next.5",
|
|
34
34
|
"@superdoc/document-api": "0.1.0-alpha.0",
|
|
35
35
|
"@types/bun": "^1.3.8",
|
|
36
36
|
"@types/node": "22.19.2",
|