@superdoc/mcp 1.12.0-next.6 → 1.12.0-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.
- package/dist/index.js +19 -6
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -31651,7 +31651,7 @@ var init_host = __esm(() => {
|
|
|
31651
31651
|
});
|
|
31652
31652
|
|
|
31653
31653
|
// ../../packages/sdk/langs/node/src/runtime/sdk-version.generated.ts
|
|
31654
|
-
var SDK_VERSION = "2.25.0-next.
|
|
31654
|
+
var SDK_VERSION = "2.25.0-next.7";
|
|
31655
31655
|
|
|
31656
31656
|
// ../../packages/sdk/langs/node/src/runtime/embedded-platform.ts
|
|
31657
31657
|
import { accessSync, chmodSync, constants, existsSync, statSync } from "node:fs";
|
|
@@ -232867,7 +232867,7 @@ function runImageMoveCommit(input) {
|
|
|
232867
232867
|
};
|
|
232868
232868
|
}
|
|
232869
232869
|
const sourceWithoutCarrier = sourceParagraphXml.slice(0, carrier.runStart) + sourceParagraphXml.slice(carrier.runEnd);
|
|
232870
|
-
const removeSourceParagraph = !sameParagraph && op.target.storyId === input.state.mainStoryId && sourceParagraph.isDirectBodyChild && isEmptyImageMoveSource(sourceWithoutCarrier, lazyNamespaceBindingsAt(storyBytes, sourceParagraph.byteStart)());
|
|
232870
|
+
const removeSourceParagraph = !sameParagraph && op.target.storyId === input.state.mainStoryId && sourceParagraph.isDirectBodyChild && isEmptyImageMoveSource(sourceWithoutCarrier, lazyNamespaceBindingsAt(storyBytes, sourceParagraph.byteStart)(), input.state);
|
|
232871
232871
|
const adjustedDestinationOffset = sameParagraph && op.to.offset > carrier.visibleOffset ? op.to.offset - 1 : op.to.offset;
|
|
232872
232872
|
const destinationBaseXml = sameParagraph ? sourceWithoutCarrier : destinationParagraphXml;
|
|
232873
232873
|
let validationWId = Number.MAX_SAFE_INTEGER;
|
|
@@ -232978,7 +232978,7 @@ function resolveParagraph(state, storyId, paraId) {
|
|
|
232978
232978
|
isDirectBodyChild: entry.directBodyChildOrdinal != null
|
|
232979
232979
|
};
|
|
232980
232980
|
}
|
|
232981
|
-
function isEmptyImageMoveSource(xml, namespaceBindings) {
|
|
232981
|
+
function isEmptyImageMoveSource(xml, namespaceBindings, state) {
|
|
232982
232982
|
if (xml.includes("<!--") || xml.includes("<?"))
|
|
232983
232983
|
return false;
|
|
232984
232984
|
const parsed = collectXmlElementRanges(xml, {
|
|
@@ -232989,7 +232989,20 @@ function isEmptyImageMoveSource(xml, namespaceBindings) {
|
|
|
232989
232989
|
return false;
|
|
232990
232990
|
if (parseParagraphInlineMap(xml, namespaceBindings).visibleLength !== 0)
|
|
232991
232991
|
return false;
|
|
232992
|
-
|
|
232992
|
+
const styles = parsed.ranges.filter((range) => range.tag.namespaceUri === WORDPROCESSINGML_NS && range.tag.localName === "pStyle");
|
|
232993
|
+
let defaultStyleId = null;
|
|
232994
|
+
if (styles.length) {
|
|
232995
|
+
if (styles.length !== 1)
|
|
232996
|
+
return false;
|
|
232997
|
+
const style = styles[0], properties2 = parsed.ranges.find((range) => range.tag.namespaceUri === WORDPROCESSINGML_NS && range.tag.localName === "pPr");
|
|
232998
|
+
if (!properties2 || style.start < properties2.openEnd || style.end > properties2.closeStart || xml.slice(style.openEnd, style.closeStart).trim())
|
|
232999
|
+
return false;
|
|
233000
|
+
const resolved = resolveDefaultParagraphStyle(state);
|
|
233001
|
+
defaultStyleId = resolved.ok ? resolved.styleId : null;
|
|
233002
|
+
if (!defaultStyleId || !style.tag.attributes.some((attribute2) => attribute2.namespaceUri === WORDPROCESSINGML_NS && attribute2.localName === "val" && attribute2.value === defaultStyleId))
|
|
233003
|
+
return false;
|
|
233004
|
+
}
|
|
233005
|
+
return parsed.ranges.every(({ tag }) => tag.namespaceUri === WORDPROCESSINGML_NS && ["p", "pPr", "pStyle", "r", "rPr", "t"].includes(tag.localName) && tag.attributes.every((attribute2) => attribute2.namespaceUri === "http://www.w3.org/2000/xmlns/" || attribute2.namespaceUri === "http://www.w3.org/XML/1998/namespace" && attribute2.localName === "space" || tag.localName === "pStyle" && attribute2.namespaceUri === WORDPROCESSINGML_NS && attribute2.localName === "val" && attribute2.value === defaultStyleId || tag.localName === "p" && (attribute2.namespaceUri === "http://schemas.microsoft.com/office/word/2010/wordml" && ["paraId", "textId"].includes(attribute2.localName) || attribute2.namespaceUri === WORDPROCESSINGML_NS && /^rsid/.test(attribute2.localName))));
|
|
232993
233006
|
}
|
|
232994
233007
|
function resolveIsolatedImageCarrier(input) {
|
|
232995
233008
|
const relativeDrawingStart = input.descriptor.byteStart - input.paragraphByteStart;
|
|
@@ -233555,6 +233568,7 @@ var init_compile_image_ops = __esm(() => {
|
|
|
233555
233568
|
init_revision_wid_allocator();
|
|
233556
233569
|
init_split_paragraph_inline();
|
|
233557
233570
|
init_paragraph_para_id_attrs();
|
|
233571
|
+
init_insertion_formatting_context();
|
|
233558
233572
|
init_insertion_restoration();
|
|
233559
233573
|
init_prepared_mutation();
|
|
233560
233574
|
init_patch_substrate();
|
|
@@ -327906,8 +327920,7 @@ function selectedDrawingRepresentation(piece) {
|
|
|
327906
327920
|
pic: "http://schemas.openxmlformats.org/drawingml/2006/picture",
|
|
327907
327921
|
wp: WORD_DRAWING_NAMESPACE,
|
|
327908
327922
|
wps: "http://schemas.microsoft.com/office/word/2010/wordprocessingShape",
|
|
327909
|
-
wpg: "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"
|
|
327910
|
-
...Object.fromEntries(piece.namespaceBindings)
|
|
327923
|
+
wpg: "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"
|
|
327911
327924
|
};
|
|
327912
327925
|
for (const attribute2 of root.tag.attributes) {
|
|
327913
327926
|
if (attribute2.prefix === "xmlns")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc/mcp",
|
|
3
|
-
"version": "1.12.0-next.
|
|
3
|
+
"version": "1.12.0-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.25.0-next.
|
|
27
|
+
"@superdoc/sdk": "2.25.0-next.7",
|
|
28
28
|
"debug": "^4.4.3",
|
|
29
29
|
"zod": "^4.3.6"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"superdoc": "2.28.0-next.
|
|
33
|
-
"@superdoc/docx-engine": "0.27.0-next.
|
|
32
|
+
"superdoc": "2.28.0-next.9",
|
|
33
|
+
"@superdoc/docx-engine": "0.27.0-next.9",
|
|
34
34
|
"@superdoc/document-api": "0.1.0-alpha.0",
|
|
35
35
|
"@types/bun": "^1.3.8",
|
|
36
36
|
"@types/node": "22.19.2",
|