@superdoc-dev/mcp 0.7.0-next.1 → 0.7.0-next.11
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 +51 -31
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -51891,7 +51891,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
|
|
|
51891
51891
|
emptyOptions2 = {};
|
|
51892
51892
|
});
|
|
51893
51893
|
|
|
51894
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
51894
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-UqLu6KQU.es.js
|
|
51895
51895
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
51896
51896
|
const fieldValue = extension$1.config[field];
|
|
51897
51897
|
if (typeof fieldValue === "function")
|
|
@@ -105867,7 +105867,7 @@ var isRegExp = (value) => {
|
|
|
105867
105867
|
state.kern = kernNode.attributes["w:val"];
|
|
105868
105868
|
}
|
|
105869
105869
|
}, SuperConverter;
|
|
105870
|
-
var
|
|
105870
|
+
var init_SuperConverter_UqLu6KQU_es = __esm(() => {
|
|
105871
105871
|
init_rolldown_runtime_Bg48TavK_es();
|
|
105872
105872
|
init_jszip_C49i9kUs_es();
|
|
105873
105873
|
init_xml_js_CqGKpaft_es();
|
|
@@ -109686,7 +109686,7 @@ var init_SuperConverter_SvCYq2KK_es = __esm(() => {
|
|
|
109686
109686
|
},
|
|
109687
109687
|
"format.paragraph.setAlignment": {
|
|
109688
109688
|
memberPath: "format.paragraph.setAlignment",
|
|
109689
|
-
description: "Set paragraph alignment
|
|
109689
|
+
description: "Set visual paragraph alignment on a paragraph-like block. For RTL paragraphs, left/right are translated to Word-compatible stored justification values.",
|
|
109690
109690
|
expectedResult: "Returns a ParagraphMutationResult; reports NO_OP if the alignment already matches.",
|
|
109691
109691
|
requiresDocumentContext: true,
|
|
109692
109692
|
metadata: mutationOperation({
|
|
@@ -117616,7 +117616,10 @@ var init_SuperConverter_SvCYq2KK_es = __esm(() => {
|
|
|
117616
117616
|
}
|
|
117617
117617
|
}, ["target", "styleId"]), paragraphMutationResultSchemaFor("styles.paragraph.setStyle"), paragraphMutationFailureSchemaFor("styles.paragraph.setStyle"), objectSchema({ target: paragraphTargetSchema }, ["target"]), paragraphMutationResultSchemaFor("styles.paragraph.clearStyle"), paragraphMutationFailureSchemaFor("styles.paragraph.clearStyle"), objectSchema({ target: paragraphTargetSchema }, ["target"]), paragraphMutationResultSchemaFor("format.paragraph.resetDirectFormatting"), paragraphMutationFailureSchemaFor("format.paragraph.resetDirectFormatting"), objectSchema({
|
|
117618
117618
|
target: paragraphTargetSchema,
|
|
117619
|
-
alignment: {
|
|
117619
|
+
alignment: {
|
|
117620
|
+
enum: [...PARAGRAPH_ALIGNMENTS],
|
|
117621
|
+
description: "Visual paragraph alignment. In RTL paragraphs, 'left' stores w:jc='right' and 'right' stores w:jc='left' so Word displays the requested side."
|
|
117622
|
+
}
|
|
117620
117623
|
}, ["target", "alignment"]), paragraphMutationResultSchemaFor("format.paragraph.setAlignment"), paragraphMutationFailureSchemaFor("format.paragraph.setAlignment"), objectSchema({ target: paragraphTargetSchema }, ["target"]), paragraphMutationResultSchemaFor("format.paragraph.clearAlignment"), paragraphMutationFailureSchemaFor("format.paragraph.clearAlignment"), { ...objectSchema({
|
|
117621
117624
|
target: paragraphTargetSchema,
|
|
117622
117625
|
left: {
|
|
@@ -144044,7 +144047,7 @@ var init_SuperConverter_SvCYq2KK_es = __esm(() => {
|
|
|
144044
144047
|
};
|
|
144045
144048
|
});
|
|
144046
144049
|
|
|
144047
|
-
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-
|
|
144050
|
+
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-QcQvy-nD.es.js
|
|
144048
144051
|
function parseSizeUnit(val = "0") {
|
|
144049
144052
|
const length = val.toString() || "0";
|
|
144050
144053
|
const value = Number.parseFloat(length);
|
|
@@ -147327,6 +147330,7 @@ function getWordChanges(oldText, newText) {
|
|
|
147327
147330
|
i4++;
|
|
147328
147331
|
continue;
|
|
147329
147332
|
}
|
|
147333
|
+
const groupStart = i4;
|
|
147330
147334
|
let deleteStart = -1;
|
|
147331
147335
|
let deleteEnd = -1;
|
|
147332
147336
|
let insertText = "";
|
|
@@ -147355,7 +147359,7 @@ function getWordChanges(oldText, newText) {
|
|
|
147355
147359
|
oldTo: deleteEnd
|
|
147356
147360
|
});
|
|
147357
147361
|
else if (insertText.length > 0) {
|
|
147358
|
-
const prevStep =
|
|
147362
|
+
const prevStep = groupStart > 0 ? steps[groupStart - 1] : null;
|
|
147359
147363
|
let insertAt = 0;
|
|
147360
147364
|
if (prevStep && prevStep.type === "equal") {
|
|
147361
147365
|
const prevToken = oldTokens[prevStep.oldIdx];
|
|
@@ -152950,6 +152954,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
|
|
|
152950
152954
|
const documentId = activeEditor?.options?.documentId;
|
|
152951
152955
|
if (!documentId)
|
|
152952
152956
|
return null;
|
|
152957
|
+
if (typeof superdoc.getPresentationEditorForDocument === "function")
|
|
152958
|
+
return superdoc.getPresentationEditorForDocument(documentId);
|
|
152953
152959
|
return (superdoc.superdocStore?.documents ?? []).find((doc3) => doc3.getEditor?.()?.options?.documentId === documentId)?.getPresentationEditor?.() ?? null;
|
|
152954
152960
|
}, resolveToolbarSources = (superdoc) => {
|
|
152955
152961
|
const presentationEditor = resolvePresentationEditor(superdoc);
|
|
@@ -153696,17 +153702,21 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
|
|
|
153696
153702
|
active: false,
|
|
153697
153703
|
disabled: isCommandDisabled(context) || !inTable
|
|
153698
153704
|
};
|
|
153705
|
+
}, lookupCommentByCommentId = (superdoc, commentId) => {
|
|
153706
|
+
if (typeof superdoc?.getComment === "function")
|
|
153707
|
+
return superdoc.getComment(commentId) ?? null;
|
|
153708
|
+
const store = superdoc?.commentsStore;
|
|
153709
|
+
if (typeof store?.getComment === "function")
|
|
153710
|
+
return store.getComment(commentId) ?? null;
|
|
153711
|
+
return null;
|
|
153699
153712
|
}, enrichTrackedChanges = (trackedChanges = [], superdoc) => {
|
|
153700
153713
|
if (!trackedChanges.length)
|
|
153701
153714
|
return trackedChanges;
|
|
153702
|
-
const store = superdoc?.commentsStore;
|
|
153703
|
-
if (!store?.getComment)
|
|
153704
|
-
return trackedChanges;
|
|
153705
153715
|
return trackedChanges.map((change) => {
|
|
153706
153716
|
const commentId = change.id;
|
|
153707
153717
|
if (!commentId)
|
|
153708
153718
|
return change;
|
|
153709
|
-
const storeComment =
|
|
153719
|
+
const storeComment = lookupCommentByCommentId(superdoc, commentId);
|
|
153710
153720
|
if (!storeComment)
|
|
153711
153721
|
return change;
|
|
153712
153722
|
const comment = typeof storeComment.getValues === "function" ? storeComment.getValues() : storeComment;
|
|
@@ -154054,8 +154064,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
|
|
|
154054
154064
|
}
|
|
154055
154065
|
};
|
|
154056
154066
|
};
|
|
154057
|
-
var
|
|
154058
|
-
|
|
154067
|
+
var init_create_headless_toolbar_QcQvy_nD_es = __esm(() => {
|
|
154068
|
+
init_SuperConverter_UqLu6KQU_es();
|
|
154059
154069
|
init_uuid_qzgm05fK_es();
|
|
154060
154070
|
init_constants_DrU4EASo_es();
|
|
154061
154071
|
init_dist_B8HfvhaK_es();
|
|
@@ -208781,7 +208791,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
208781
208791
|
init_remark_gfm_BhnWr3yf_es();
|
|
208782
208792
|
});
|
|
208783
208793
|
|
|
208784
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
208794
|
+
// ../../packages/superdoc/dist/chunks/src-DXlYP0an.es.js
|
|
208785
208795
|
function deleteProps(obj, propOrProps) {
|
|
208786
208796
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
208787
208797
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -297170,13 +297180,13 @@ menclose::after {
|
|
|
297170
297180
|
return;
|
|
297171
297181
|
console.log(...args$1);
|
|
297172
297182
|
}, 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;
|
|
297173
|
-
var
|
|
297183
|
+
var init_src_DXlYP0an_es = __esm(() => {
|
|
297174
297184
|
init_rolldown_runtime_Bg48TavK_es();
|
|
297175
|
-
|
|
297185
|
+
init_SuperConverter_UqLu6KQU_es();
|
|
297176
297186
|
init_jszip_C49i9kUs_es();
|
|
297177
297187
|
init_xml_js_CqGKpaft_es();
|
|
297178
297188
|
init_uuid_qzgm05fK_es();
|
|
297179
|
-
|
|
297189
|
+
init_create_headless_toolbar_QcQvy_nD_es();
|
|
297180
297190
|
init_constants_DrU4EASo_es();
|
|
297181
297191
|
init_dist_B8HfvhaK_es();
|
|
297182
297192
|
init_unified_Dsuw2be5_es();
|
|
@@ -319059,6 +319069,12 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
319059
319069
|
customButtons: [],
|
|
319060
319070
|
showFormattingMarksButton: false
|
|
319061
319071
|
};
|
|
319072
|
+
toolbarItems = [];
|
|
319073
|
+
overflowItems = [];
|
|
319074
|
+
isDev = false;
|
|
319075
|
+
role = "editor";
|
|
319076
|
+
superdoc;
|
|
319077
|
+
toolbarContainer = null;
|
|
319062
319078
|
constructor(config3) {
|
|
319063
319079
|
super();
|
|
319064
319080
|
this.config = {
|
|
@@ -334892,11 +334908,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
334892
334908
|
];
|
|
334893
334909
|
});
|
|
334894
334910
|
|
|
334895
|
-
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-
|
|
334911
|
+
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-BuJIur0F.es.js
|
|
334896
334912
|
var MOD_ALIASES, ALT_ALIASES, CTRL_ALIASES, SHIFT_ALIASES, BUILTIN_CONTEXT_MENU_GROUPS, BUILTIN_GROUP_ORDER, RESERVED_PROXY_PROPERTY_NAMES, ALL_TOOLBAR_COMMAND_IDS, EMPTY_ACTIVE_IDS;
|
|
334897
|
-
var
|
|
334898
|
-
|
|
334899
|
-
|
|
334913
|
+
var init_create_super_doc_ui_BuJIur0F_es = __esm(() => {
|
|
334914
|
+
init_SuperConverter_UqLu6KQU_es();
|
|
334915
|
+
init_create_headless_toolbar_QcQvy_nD_es();
|
|
334900
334916
|
MOD_ALIASES = new Set([
|
|
334901
334917
|
"Mod",
|
|
334902
334918
|
"Meta",
|
|
@@ -334938,16 +334954,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
|
|
|
334938
334954
|
|
|
334939
334955
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
334940
334956
|
var init_super_editor_es = __esm(() => {
|
|
334941
|
-
|
|
334942
|
-
|
|
334957
|
+
init_src_DXlYP0an_es();
|
|
334958
|
+
init_SuperConverter_UqLu6KQU_es();
|
|
334943
334959
|
init_jszip_C49i9kUs_es();
|
|
334944
334960
|
init_xml_js_CqGKpaft_es();
|
|
334945
|
-
|
|
334961
|
+
init_create_headless_toolbar_QcQvy_nD_es();
|
|
334946
334962
|
init_constants_DrU4EASo_es();
|
|
334947
334963
|
init_dist_B8HfvhaK_es();
|
|
334948
334964
|
init_unified_Dsuw2be5_es();
|
|
334949
334965
|
init_DocxZipper_CZMPWpOp_es();
|
|
334950
|
-
|
|
334966
|
+
init_create_super_doc_ui_BuJIur0F_es();
|
|
334951
334967
|
init_ui_C5PAS9hY_es();
|
|
334952
334968
|
init_eventemitter3_BnGqBE_Q_es();
|
|
334953
334969
|
init_errors_CNaD6vcg_es();
|
|
@@ -337545,7 +337561,7 @@ More content with **bold** and *italic*.`
|
|
|
337545
337561
|
},
|
|
337546
337562
|
"format.paragraph.setAlignment": {
|
|
337547
337563
|
memberPath: "format.paragraph.setAlignment",
|
|
337548
|
-
description: "Set paragraph alignment
|
|
337564
|
+
description: "Set visual paragraph alignment on a paragraph-like block. For RTL paragraphs, left/right are translated to Word-compatible stored justification values.",
|
|
337549
337565
|
expectedResult: "Returns a ParagraphMutationResult; reports NO_OP if the alignment already matches.",
|
|
337550
337566
|
requiresDocumentContext: true,
|
|
337551
337567
|
metadata: mutationOperation2({
|
|
@@ -345559,10 +345575,13 @@ var init_schemas4 = __esm(() => {
|
|
|
345559
345575
|
failure: paragraphMutationFailureSchemaFor2("format.paragraph.resetDirectFormatting")
|
|
345560
345576
|
},
|
|
345561
345577
|
"format.paragraph.setAlignment": {
|
|
345562
|
-
input: objectSchema2({
|
|
345563
|
-
|
|
345564
|
-
|
|
345565
|
-
|
|
345578
|
+
input: objectSchema2({
|
|
345579
|
+
target: paragraphTargetSchema2,
|
|
345580
|
+
alignment: {
|
|
345581
|
+
enum: [...PARAGRAPH_ALIGNMENTS2],
|
|
345582
|
+
description: "Visual paragraph alignment. In RTL paragraphs, 'left' stores w:jc='right' and 'right' stores w:jc='left' so Word displays the requested side."
|
|
345583
|
+
}
|
|
345584
|
+
}, ["target", "alignment"]),
|
|
345566
345585
|
output: paragraphMutationResultSchemaFor2("format.paragraph.setAlignment"),
|
|
345567
345586
|
success: paragraphMutationSuccessSchema2,
|
|
345568
345587
|
failure: paragraphMutationFailureSchemaFor2("format.paragraph.setAlignment")
|
|
@@ -438643,6 +438662,7 @@ function getWordChanges2(oldText, newText) {
|
|
|
438643
438662
|
i5++;
|
|
438644
438663
|
continue;
|
|
438645
438664
|
}
|
|
438665
|
+
const groupStart = i5;
|
|
438646
438666
|
let deleteStart = -1;
|
|
438647
438667
|
let deleteEnd = -1;
|
|
438648
438668
|
let insertText2 = "";
|
|
@@ -438663,7 +438683,7 @@ function getWordChanges2(oldText, newText) {
|
|
|
438663
438683
|
} else if (deleteStart !== -1) {
|
|
438664
438684
|
result.push({ type: "delete", oldFrom: deleteStart, oldTo: deleteEnd });
|
|
438665
438685
|
} else if (insertText2.length > 0) {
|
|
438666
|
-
const prevStep =
|
|
438686
|
+
const prevStep = groupStart > 0 ? steps[groupStart - 1] : null;
|
|
438667
438687
|
let insertAt = 0;
|
|
438668
438688
|
if (prevStep && prevStep.type === "equal") {
|
|
438669
438689
|
const prevToken = oldTokens[prevStep.oldIdx];
|
|
@@ -470836,7 +470856,7 @@ var init_catalog = __esm(() => {
|
|
|
470836
470856
|
"right",
|
|
470837
470857
|
"justify"
|
|
470838
470858
|
],
|
|
470839
|
-
description: "Required for action 'set_alignment'."
|
|
470859
|
+
description: "Visual paragraph alignment. In RTL paragraphs, 'left' stores w:jc='right' and 'right' stores w:jc='left' so Word displays the requested side. Required for action 'set_alignment'."
|
|
470840
470860
|
},
|
|
470841
470861
|
left: {
|
|
470842
470862
|
type: "integer",
|