@superdoc-dev/mcp 0.3.0-next.90 → 0.3.0-next.92
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 +48 -32
- package/package.json +3 -3
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-KEGUvaEC.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")
|
|
@@ -105392,7 +105392,7 @@ var isRegExp = (value) => {
|
|
|
105392
105392
|
state.kern = kernNode.attributes["w:val"];
|
|
105393
105393
|
}
|
|
105394
105394
|
}, SuperConverter;
|
|
105395
|
-
var
|
|
105395
|
+
var init_SuperConverter_KEGUvaEC_es = __esm(() => {
|
|
105396
105396
|
init_rolldown_runtime_Bg48TavK_es();
|
|
105397
105397
|
init_jszip_C49i9kUs_es();
|
|
105398
105398
|
init_xml_js_CqGKpaft_es();
|
|
@@ -140796,12 +140796,7 @@ var init_SuperConverter_Odr0JG7X_es = __esm(() => {
|
|
|
140796
140796
|
attributes: validXmlAttributes$3
|
|
140797
140797
|
};
|
|
140798
140798
|
translator$8 = NodeTranslator.from(config$24);
|
|
140799
|
-
translator$49 = NodeTranslator.from(
|
|
140800
|
-
xmlName: "w:bidiVisual",
|
|
140801
|
-
sdNodeOrKeyName: "rightToLeft",
|
|
140802
|
-
encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
|
|
140803
|
-
decode: ({ node: node2 }) => node2.attrs.rightToLeft ? { attributes: {} } : undefined
|
|
140804
|
-
});
|
|
140799
|
+
translator$49 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:bidiVisual", "rightToLeft"));
|
|
140805
140800
|
translator$155 = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
|
|
140806
140801
|
translator$158 = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
|
|
140807
140802
|
translator$161 = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
|
|
@@ -143264,7 +143259,7 @@ var init_SuperConverter_Odr0JG7X_es = __esm(() => {
|
|
|
143264
143259
|
};
|
|
143265
143260
|
});
|
|
143266
143261
|
|
|
143267
|
-
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-
|
|
143262
|
+
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-DwiDDjhC.es.js
|
|
143268
143263
|
function parseSizeUnit(val = "0") {
|
|
143269
143264
|
const length = val.toString() || "0";
|
|
143270
143265
|
const value = Number.parseFloat(length);
|
|
@@ -145986,8 +145981,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
|
|
|
145986
145981
|
}
|
|
145987
145982
|
};
|
|
145988
145983
|
};
|
|
145989
|
-
var
|
|
145990
|
-
|
|
145984
|
+
var init_create_headless_toolbar_DwiDDjhC_es = __esm(() => {
|
|
145985
|
+
init_SuperConverter_KEGUvaEC_es();
|
|
145991
145986
|
init_constants_DrU4EASo_es();
|
|
145992
145987
|
init_dist_B8HfvhaK_es();
|
|
145993
145988
|
CSS_DIMENSION_REGEX = /[\d-.]+(\w+)$/;
|
|
@@ -200206,7 +200201,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
200206
200201
|
init_remark_gfm_BhnWr3yf_es();
|
|
200207
200202
|
});
|
|
200208
200203
|
|
|
200209
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
200204
|
+
// ../../packages/superdoc/dist/chunks/src-XCAViTso.es.js
|
|
200210
200205
|
function deleteProps(obj, propOrProps) {
|
|
200211
200206
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
200212
200207
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -200461,6 +200456,16 @@ function getParagraphInlineDirection(attrs) {
|
|
|
200461
200456
|
if (attrs?.direction === "ltr" || attrs?.dir === "ltr" || attrs?.rtl === false || ppRtl === false)
|
|
200462
200457
|
return "ltr";
|
|
200463
200458
|
}
|
|
200459
|
+
function getTableVisualDirection(attrs) {
|
|
200460
|
+
const fromContext = attrs?.tableDirectionContext?.visualDirection;
|
|
200461
|
+
if (fromContext != null)
|
|
200462
|
+
return fromContext;
|
|
200463
|
+
const tp = attrs?.tableProperties;
|
|
200464
|
+
if (tp?.rightToLeft === true || tp?.bidiVisual === true)
|
|
200465
|
+
return "rtl";
|
|
200466
|
+
if (tp?.rightToLeft === false || tp?.bidiVisual === false)
|
|
200467
|
+
return "ltr";
|
|
200468
|
+
}
|
|
200464
200469
|
function resolveTableWidthAttr(value) {
|
|
200465
200470
|
if (!value || typeof value !== "object")
|
|
200466
200471
|
return null;
|
|
@@ -204960,7 +204965,7 @@ function getTableContext($head) {
|
|
|
204960
204965
|
};
|
|
204961
204966
|
}
|
|
204962
204967
|
function isRtlTable(table2) {
|
|
204963
|
-
return table2?.attrs
|
|
204968
|
+
return getTableVisualDirection(table2?.attrs) === "rtl";
|
|
204964
204969
|
}
|
|
204965
204970
|
function getCellRect(context) {
|
|
204966
204971
|
const map$12 = TableMap.get(context.table);
|
|
@@ -246730,7 +246735,7 @@ function resolveRenderedTableWidth(columnWidth, measuredWidth, attrs) {
|
|
|
246730
246735
|
function resolveTableFrame(baseX, columnWidth, tableWidth, attrs) {
|
|
246731
246736
|
const width = resolveRenderedTableWidth(columnWidth, tableWidth, attrs);
|
|
246732
246737
|
const explicitJustification = typeof attrs?.justification === "string" ? attrs.justification : undefined;
|
|
246733
|
-
const isRtlTable$1 = attrs
|
|
246738
|
+
const isRtlTable$1 = getTableVisualDirection(attrs) === "rtl";
|
|
246734
246739
|
const effectiveJustification = explicitJustification ?? (isRtlTable$1 ? "end" : undefined);
|
|
246735
246740
|
const tableIndent = getTableIndentWidth(attrs);
|
|
246736
246741
|
if (effectiveJustification === "center")
|
|
@@ -257053,6 +257058,12 @@ function tableNodeToBlock(node2, { nextBlockId, positions, storyKey, trackedChan
|
|
|
257053
257058
|
const tableProperties = node2.attrs?.tableProperties;
|
|
257054
257059
|
if (tableProperties && typeof tableProperties === "object")
|
|
257055
257060
|
tableAttrs.tableProperties = tableProperties;
|
|
257061
|
+
const styleResolvedTableProps = effectiveStyleId && converterContext?.translatedLinkedStyles ? resolveTableProperties(effectiveStyleId, converterContext.translatedLinkedStyles) : undefined;
|
|
257062
|
+
const inlineProps = rawTableProperties;
|
|
257063
|
+
const styleProps = styleResolvedTableProps;
|
|
257064
|
+
const inlineVisual = inlineProps?.rightToLeft ?? inlineProps?.bidiVisual;
|
|
257065
|
+
const styleVisual = styleProps?.rightToLeft ?? styleProps?.bidiVisual;
|
|
257066
|
+
tableAttrs.tableDirectionContext = resolveTableDirection({ rightToLeft: inlineVisual ?? styleVisual }, converterContext?.sectionDirectionContext ?? resolveSectionDirection(undefined));
|
|
257056
257067
|
let columnWidths = undefined;
|
|
257057
257068
|
const twipsToPixels$2 = (twips) => {
|
|
257058
257069
|
return twips / 1440 * 96;
|
|
@@ -281622,7 +281633,7 @@ menclose::after {
|
|
|
281622
281633
|
const tableBorders = block.attrs?.borders;
|
|
281623
281634
|
const tableIndentValue = block.attrs?.tableIndent?.width;
|
|
281624
281635
|
const tableIndent = typeof tableIndentValue === "number" && Number.isFinite(tableIndentValue) ? tableIndentValue : 0;
|
|
281625
|
-
const isRtl = block.attrs
|
|
281636
|
+
const isRtl = getTableVisualDirection(block.attrs) === "rtl";
|
|
281626
281637
|
const container = doc$12.createElement("div");
|
|
281627
281638
|
container.classList.add(CLASS_NAMES$1.fragment);
|
|
281628
281639
|
applyStyles$2(container, fragmentStyles);
|
|
@@ -287140,6 +287151,16 @@ menclose::after {
|
|
|
287140
287151
|
mutated = true;
|
|
287141
287152
|
}
|
|
287142
287153
|
return mutated ? mirrored : indent2;
|
|
287154
|
+
}, resolveTableDirection = (tableProperties, parentSection) => {
|
|
287155
|
+
let visualDirection;
|
|
287156
|
+
if (tableProperties?.rightToLeft === true || tableProperties?.bidiVisual === true)
|
|
287157
|
+
visualDirection = "rtl";
|
|
287158
|
+
else if (tableProperties?.rightToLeft === false || tableProperties?.bidiVisual === false)
|
|
287159
|
+
visualDirection = "ltr";
|
|
287160
|
+
return {
|
|
287161
|
+
visualDirection,
|
|
287162
|
+
parentSection
|
|
287163
|
+
};
|
|
287143
287164
|
}, writingModeFromTextDirection = (val) => {
|
|
287144
287165
|
switch (val) {
|
|
287145
287166
|
case "lrTb":
|
|
@@ -294054,12 +294075,12 @@ menclose::after {
|
|
|
294054
294075
|
return;
|
|
294055
294076
|
console.log(...args$1);
|
|
294056
294077
|
}, 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;
|
|
294057
|
-
var
|
|
294078
|
+
var init_src_XCAViTso_es = __esm(() => {
|
|
294058
294079
|
init_rolldown_runtime_Bg48TavK_es();
|
|
294059
|
-
|
|
294080
|
+
init_SuperConverter_KEGUvaEC_es();
|
|
294060
294081
|
init_jszip_C49i9kUs_es();
|
|
294061
294082
|
init_uuid_qzgm05fK_es();
|
|
294062
|
-
|
|
294083
|
+
init_create_headless_toolbar_DwiDDjhC_es();
|
|
294063
294084
|
init_constants_DrU4EASo_es();
|
|
294064
294085
|
init_dist_B8HfvhaK_es();
|
|
294065
294086
|
init_unified_Dsuw2be5_es();
|
|
@@ -332102,11 +332123,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
332102
332123
|
];
|
|
332103
332124
|
});
|
|
332104
332125
|
|
|
332105
|
-
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-
|
|
332126
|
+
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-BEAzL3ry.es.js
|
|
332106
332127
|
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;
|
|
332107
|
-
var
|
|
332108
|
-
|
|
332109
|
-
|
|
332128
|
+
var init_create_super_doc_ui_BEAzL3ry_es = __esm(() => {
|
|
332129
|
+
init_SuperConverter_KEGUvaEC_es();
|
|
332130
|
+
init_create_headless_toolbar_DwiDDjhC_es();
|
|
332110
332131
|
MOD_ALIASES = new Set([
|
|
332111
332132
|
"Mod",
|
|
332112
332133
|
"Meta",
|
|
@@ -332148,16 +332169,16 @@ var init_zipper_BxRAi0_5_es = __esm(() => {
|
|
|
332148
332169
|
|
|
332149
332170
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
332150
332171
|
var init_super_editor_es = __esm(() => {
|
|
332151
|
-
|
|
332152
|
-
|
|
332172
|
+
init_src_XCAViTso_es();
|
|
332173
|
+
init_SuperConverter_KEGUvaEC_es();
|
|
332153
332174
|
init_jszip_C49i9kUs_es();
|
|
332154
332175
|
init_xml_js_CqGKpaft_es();
|
|
332155
|
-
|
|
332176
|
+
init_create_headless_toolbar_DwiDDjhC_es();
|
|
332156
332177
|
init_constants_DrU4EASo_es();
|
|
332157
332178
|
init_dist_B8HfvhaK_es();
|
|
332158
332179
|
init_unified_Dsuw2be5_es();
|
|
332159
332180
|
init_DocxZipper_TPSo9G36_es();
|
|
332160
|
-
|
|
332181
|
+
init_create_super_doc_ui_BEAzL3ry_es();
|
|
332161
332182
|
init_ui_CGB3qmy3_es();
|
|
332162
332183
|
init_eventemitter3_UwU_CLPU_es();
|
|
332163
332184
|
init_errors_C_DoKMoN_es();
|
|
@@ -416233,12 +416254,7 @@ var translator159;
|
|
|
416233
416254
|
var init_bidiVisual_translator = __esm(() => {
|
|
416234
416255
|
init_node_translator2();
|
|
416235
416256
|
init_utils();
|
|
416236
|
-
translator159 = NodeTranslator3.from(
|
|
416237
|
-
xmlName: "w:bidiVisual",
|
|
416238
|
-
sdNodeOrKeyName: "rightToLeft",
|
|
416239
|
-
encode: ({ nodes }) => parseBoolean2(nodes[0].attributes?.["w:val"] ?? "1"),
|
|
416240
|
-
decode: ({ node: node4 }) => node4.attrs.rightToLeft ? { attributes: {} } : undefined
|
|
416241
|
-
});
|
|
416257
|
+
translator159 = NodeTranslator3.from(createSingleBooleanPropertyHandler2("w:bidiVisual", "rightToLeft"));
|
|
416242
416258
|
});
|
|
416243
416259
|
|
|
416244
416260
|
// ../../packages/super-editor/src/editors/v1/core/super-converter/v3/handlers/w/bidiVisual/index.js
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/mcp",
|
|
3
|
-
"version": "0.3.0-next.
|
|
3
|
+
"version": "0.3.0-next.92",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20"
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"@types/bun": "^1.3.8",
|
|
20
20
|
"@types/node": "22.19.2",
|
|
21
21
|
"typescript": "^5.9.2",
|
|
22
|
-
"superdoc": "
|
|
22
|
+
"@superdoc/document-api": "0.0.1",
|
|
23
23
|
"@superdoc/super-editor": "0.0.1",
|
|
24
|
-
"
|
|
24
|
+
"superdoc": "1.32.0"
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|