@superdoc-dev/mcp 0.3.0-next.21 → 0.3.0-next.22
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 +38 -30
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -198749,7 +198749,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
198749
198749
|
init_remark_gfm_BhnWr3yf_es();
|
|
198750
198750
|
});
|
|
198751
198751
|
|
|
198752
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
198752
|
+
// ../../packages/superdoc/dist/chunks/src-BDVIM2Bl.es.js
|
|
198753
198753
|
function deleteProps(obj, propOrProps) {
|
|
198754
198754
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
198755
198755
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -289978,7 +289978,7 @@ menclose::after {
|
|
|
289978
289978
|
return;
|
|
289979
289979
|
console.log(...args$1);
|
|
289980
289980
|
}, 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;
|
|
289981
|
-
var
|
|
289981
|
+
var init_src_BDVIM2Bl_es = __esm(() => {
|
|
289982
289982
|
init_rolldown_runtime_Bg48TavK_es();
|
|
289983
289983
|
init_SuperConverter_DklB_kc9_es();
|
|
289984
289984
|
init_jszip_C49i9kUs_es();
|
|
@@ -326121,19 +326121,19 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
326121
326121
|
return true;
|
|
326122
326122
|
return false;
|
|
326123
326123
|
}
|
|
326124
|
-
async navigateTo(target) {
|
|
326124
|
+
async navigateTo(target, options = {}) {
|
|
326125
326125
|
if (!target)
|
|
326126
326126
|
return false;
|
|
326127
326127
|
try {
|
|
326128
326128
|
if (target.kind === "block")
|
|
326129
|
-
return await this.#navigateToBlock(target);
|
|
326129
|
+
return await this.#navigateToBlock(target, options);
|
|
326130
326130
|
if (target.kind === "entity") {
|
|
326131
326131
|
if (target.entityType === "bookmark")
|
|
326132
326132
|
return await this.#navigateToBookmark(target);
|
|
326133
326133
|
if (target.entityType === "comment")
|
|
326134
|
-
return await this.#navigateToComment(target.entityId);
|
|
326134
|
+
return await this.#navigateToComment(target.entityId, options);
|
|
326135
326135
|
if (target.entityType === "trackedChange")
|
|
326136
|
-
return await this.#navigateToTrackedChange(target.entityId, resolveStoryKeyFromAddress(target.story), target.pageIndex);
|
|
326136
|
+
return await this.#navigateToTrackedChange(target.entityId, resolveStoryKeyFromAddress(target.story), target.pageIndex, options);
|
|
326137
326137
|
}
|
|
326138
326138
|
return false;
|
|
326139
326139
|
} catch (error48) {
|
|
@@ -326145,7 +326145,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
326145
326145
|
return false;
|
|
326146
326146
|
}
|
|
326147
326147
|
}
|
|
326148
|
-
async#navigateToBlock(target) {
|
|
326148
|
+
async#navigateToBlock(target, options = {}) {
|
|
326149
326149
|
const editor = this.#editor;
|
|
326150
326150
|
if (!editor)
|
|
326151
326151
|
return false;
|
|
@@ -326165,9 +326165,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
326165
326165
|
}
|
|
326166
326166
|
if (!candidate)
|
|
326167
326167
|
return false;
|
|
326168
|
-
return this.#scrollToBlockCandidate(editor, candidate);
|
|
326168
|
+
return this.#scrollToBlockCandidate(editor, candidate, options);
|
|
326169
326169
|
}
|
|
326170
|
-
async#scrollToBlockCandidate(editor, candidate) {
|
|
326170
|
+
async#scrollToBlockCandidate(editor, candidate, options = {}) {
|
|
326171
326171
|
const blockNode = editor.state.doc.nodeAt(candidate.pos);
|
|
326172
326172
|
let contentPos = candidate.pos + 1;
|
|
326173
326173
|
if (blockNode)
|
|
@@ -326178,8 +326178,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
326178
326178
|
contentPos = candidate.pos + 1 + offset$1 + (child.isText ? 0 : 1);
|
|
326179
326179
|
});
|
|
326180
326180
|
if (!await this.scrollToPositionAsync(contentPos, {
|
|
326181
|
-
behavior: "auto",
|
|
326182
|
-
block: "center"
|
|
326181
|
+
behavior: options.behavior ?? "auto",
|
|
326182
|
+
block: options.block ?? "center"
|
|
326183
326183
|
}))
|
|
326184
326184
|
return false;
|
|
326185
326185
|
editor.commands?.setTextSelection?.({
|
|
@@ -326189,7 +326189,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
326189
326189
|
editor.view?.focus?.();
|
|
326190
326190
|
return true;
|
|
326191
326191
|
}
|
|
326192
|
-
async#navigateToComment(entityId) {
|
|
326192
|
+
async#navigateToComment(entityId, options = {}) {
|
|
326193
326193
|
const editor = this.#editor;
|
|
326194
326194
|
if (!editor)
|
|
326195
326195
|
return false;
|
|
@@ -326202,8 +326202,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
326202
326202
|
}))
|
|
326203
326203
|
return false;
|
|
326204
326204
|
await this.scrollToPositionAsync(editor.state.selection.from, {
|
|
326205
|
-
behavior: "auto",
|
|
326206
|
-
block: "center"
|
|
326205
|
+
behavior: options.behavior ?? "auto",
|
|
326206
|
+
block: options.block ?? "center"
|
|
326207
326207
|
});
|
|
326208
326208
|
return true;
|
|
326209
326209
|
}
|
|
@@ -326229,10 +326229,12 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
326229
326229
|
return this.#navigateToActiveStoryBookmark(target.name, activatedStoryKey);
|
|
326230
326230
|
return false;
|
|
326231
326231
|
}
|
|
326232
|
-
async#navigateToTrackedChange(entityId, storyKey, preferredPageIndex) {
|
|
326232
|
+
async#navigateToTrackedChange(entityId, storyKey, preferredPageIndex, options = {}) {
|
|
326233
326233
|
const editor = this.#editor;
|
|
326234
326234
|
if (!editor)
|
|
326235
326235
|
return false;
|
|
326236
|
+
const behavior = options.behavior ?? "auto";
|
|
326237
|
+
const block = options.block ?? "center";
|
|
326236
326238
|
if (storyKey && storyKey !== "body") {
|
|
326237
326239
|
if (this.#navigateToActiveStoryTrackedChange(entityId, storyKey))
|
|
326238
326240
|
return true;
|
|
@@ -326240,31 +326242,37 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
326240
326242
|
if (this.#navigateToActiveStoryTrackedChange(entityId, storyKey))
|
|
326241
326243
|
return true;
|
|
326242
326244
|
}
|
|
326243
|
-
return this.#scrollToRenderedTrackedChange(entityId, storyKey, preferredPageIndex
|
|
326245
|
+
return this.#scrollToRenderedTrackedChange(entityId, storyKey, preferredPageIndex, {
|
|
326246
|
+
behavior,
|
|
326247
|
+
block
|
|
326248
|
+
});
|
|
326244
326249
|
}
|
|
326245
326250
|
const setCursorById = editor.commands?.setCursorById;
|
|
326246
326251
|
if (typeof setCursorById === "function" && setCursorById(entityId, { preferredActiveThreadId: entityId })) {
|
|
326247
326252
|
await this.scrollToPositionAsync(editor.state.selection.from, {
|
|
326248
|
-
behavior
|
|
326249
|
-
block
|
|
326253
|
+
behavior,
|
|
326254
|
+
block
|
|
326250
326255
|
});
|
|
326251
326256
|
return true;
|
|
326252
326257
|
}
|
|
326253
326258
|
const resolved = resolveTrackedChange(editor, entityId);
|
|
326254
326259
|
if (!resolved)
|
|
326255
|
-
return this.#scrollToRenderedTrackedChange(entityId, undefined, preferredPageIndex
|
|
326260
|
+
return this.#scrollToRenderedTrackedChange(entityId, undefined, preferredPageIndex, {
|
|
326261
|
+
behavior,
|
|
326262
|
+
block
|
|
326263
|
+
});
|
|
326256
326264
|
if (typeof setCursorById === "function" && resolved.rawId !== entityId) {
|
|
326257
326265
|
if (setCursorById(resolved.rawId, { preferredActiveThreadId: resolved.rawId })) {
|
|
326258
326266
|
await this.scrollToPositionAsync(editor.state.selection.from, {
|
|
326259
|
-
behavior
|
|
326260
|
-
block
|
|
326267
|
+
behavior,
|
|
326268
|
+
block
|
|
326261
326269
|
});
|
|
326262
326270
|
return true;
|
|
326263
326271
|
}
|
|
326264
326272
|
}
|
|
326265
326273
|
if (!await this.scrollToPositionAsync(resolved.from, {
|
|
326266
|
-
behavior
|
|
326267
|
-
block
|
|
326274
|
+
behavior,
|
|
326275
|
+
block
|
|
326268
326276
|
}))
|
|
326269
326277
|
return false;
|
|
326270
326278
|
editor.commands?.setTextSelection?.({
|
|
@@ -326498,14 +326506,14 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
326498
326506
|
return candidates[0] ?? null;
|
|
326499
326507
|
return candidates.find((candidate) => this.#resolveRenderedPageIndexForElement(candidate) === preferredPageIndex) ?? candidates[0] ?? null;
|
|
326500
326508
|
}
|
|
326501
|
-
async#scrollToRenderedTrackedChange(entityId, storyKey, preferredPageIndex) {
|
|
326509
|
+
async#scrollToRenderedTrackedChange(entityId, storyKey, preferredPageIndex, options = {}) {
|
|
326502
326510
|
const candidate = this.#findRenderedTrackedChangeElement(entityId, storyKey, preferredPageIndex);
|
|
326503
326511
|
if (!candidate)
|
|
326504
326512
|
return false;
|
|
326505
326513
|
try {
|
|
326506
326514
|
candidate.scrollIntoView({
|
|
326507
|
-
behavior: "auto",
|
|
326508
|
-
block: "center",
|
|
326515
|
+
behavior: options.behavior ?? "auto",
|
|
326516
|
+
block: options.block ?? "center",
|
|
326509
326517
|
inline: "nearest"
|
|
326510
326518
|
});
|
|
326511
326519
|
return true;
|
|
@@ -327368,9 +327376,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
327368
327376
|
];
|
|
327369
327377
|
});
|
|
327370
327378
|
|
|
327371
|
-
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-
|
|
327379
|
+
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-CTaglEuR.es.js
|
|
327372
327380
|
var ALL_TOOLBAR_COMMAND_IDS, EMPTY_ACTIVE_IDS;
|
|
327373
|
-
var
|
|
327381
|
+
var init_create_super_doc_ui_CTaglEuR_es = __esm(() => {
|
|
327374
327382
|
init_SuperConverter_DklB_kc9_es();
|
|
327375
327383
|
init_create_headless_toolbar_lTVVsGdE_es();
|
|
327376
327384
|
ALL_TOOLBAR_COMMAND_IDS = Object.keys(createToolbarRegistry());
|
|
@@ -327390,7 +327398,7 @@ var init_zipper_BxRAi0_5_es = __esm(() => {
|
|
|
327390
327398
|
|
|
327391
327399
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
327392
327400
|
var init_super_editor_es = __esm(() => {
|
|
327393
|
-
|
|
327401
|
+
init_src_BDVIM2Bl_es();
|
|
327394
327402
|
init_SuperConverter_DklB_kc9_es();
|
|
327395
327403
|
init_jszip_C49i9kUs_es();
|
|
327396
327404
|
init_xml_js_CqGKpaft_es();
|
|
@@ -327399,7 +327407,7 @@ var init_super_editor_es = __esm(() => {
|
|
|
327399
327407
|
init_dist_B8HfvhaK_es();
|
|
327400
327408
|
init_unified_Dsuw2be5_es();
|
|
327401
327409
|
init_DocxZipper_CUX64E5K_es();
|
|
327402
|
-
|
|
327410
|
+
init_create_super_doc_ui_CTaglEuR_es();
|
|
327403
327411
|
init_ui_CGB3qmy3_es();
|
|
327404
327412
|
init_eventemitter3_BJrNoN9D_es();
|
|
327405
327413
|
init_errors_C_DoKMoN_es();
|