@superdoc-dev/mcp 0.3.0-next.21 → 0.3.0-next.23
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 +46 -35
- 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-97w5ApZ8.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) => {
|
|
@@ -276285,19 +276285,22 @@ var Node$13 = class Node$14 {
|
|
|
276285
276285
|
}
|
|
276286
276286
|
|
|
276287
276287
|
.superdoc-layout .track-insert-dec.highlighted.track-change-focused {
|
|
276288
|
-
border-
|
|
276289
|
-
border-
|
|
276288
|
+
border-left: none;
|
|
276289
|
+
border-right: none;
|
|
276290
|
+
border-top-style: solid;
|
|
276291
|
+
border-bottom-style: solid;
|
|
276290
276292
|
background-color: var(--sd-tracked-changes-insert-background-focused, #399c7244);
|
|
276291
276293
|
}
|
|
276292
276294
|
|
|
276293
276295
|
.superdoc-layout .track-delete-dec.highlighted.track-change-focused {
|
|
276294
|
-
border-
|
|
276295
|
-
border-
|
|
276296
|
+
border-left: none;
|
|
276297
|
+
border-right: none;
|
|
276298
|
+
border-top-style: solid;
|
|
276299
|
+
border-bottom-style: solid;
|
|
276296
276300
|
background-color: var(--sd-tracked-changes-delete-background-focused, #cb0e4744);
|
|
276297
276301
|
}
|
|
276298
276302
|
|
|
276299
276303
|
.superdoc-layout .track-format-dec.highlighted.track-change-focused {
|
|
276300
|
-
border-bottom-width: 3px;
|
|
276301
276304
|
background-color: var(--sd-tracked-changes-format-background-focused, #ffd70033);
|
|
276302
276305
|
}
|
|
276303
276306
|
`, SDT_CONTAINER_STYLES = `
|
|
@@ -289978,7 +289981,7 @@ menclose::after {
|
|
|
289978
289981
|
return;
|
|
289979
289982
|
console.log(...args$1);
|
|
289980
289983
|
}, 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
|
|
289984
|
+
var init_src_97w5ApZ8_es = __esm(() => {
|
|
289982
289985
|
init_rolldown_runtime_Bg48TavK_es();
|
|
289983
289986
|
init_SuperConverter_DklB_kc9_es();
|
|
289984
289987
|
init_jszip_C49i9kUs_es();
|
|
@@ -326121,19 +326124,19 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
326121
326124
|
return true;
|
|
326122
326125
|
return false;
|
|
326123
326126
|
}
|
|
326124
|
-
async navigateTo(target) {
|
|
326127
|
+
async navigateTo(target, options = {}) {
|
|
326125
326128
|
if (!target)
|
|
326126
326129
|
return false;
|
|
326127
326130
|
try {
|
|
326128
326131
|
if (target.kind === "block")
|
|
326129
|
-
return await this.#navigateToBlock(target);
|
|
326132
|
+
return await this.#navigateToBlock(target, options);
|
|
326130
326133
|
if (target.kind === "entity") {
|
|
326131
326134
|
if (target.entityType === "bookmark")
|
|
326132
326135
|
return await this.#navigateToBookmark(target);
|
|
326133
326136
|
if (target.entityType === "comment")
|
|
326134
|
-
return await this.#navigateToComment(target.entityId);
|
|
326137
|
+
return await this.#navigateToComment(target.entityId, options);
|
|
326135
326138
|
if (target.entityType === "trackedChange")
|
|
326136
|
-
return await this.#navigateToTrackedChange(target.entityId, resolveStoryKeyFromAddress(target.story), target.pageIndex);
|
|
326139
|
+
return await this.#navigateToTrackedChange(target.entityId, resolveStoryKeyFromAddress(target.story), target.pageIndex, options);
|
|
326137
326140
|
}
|
|
326138
326141
|
return false;
|
|
326139
326142
|
} catch (error48) {
|
|
@@ -326145,7 +326148,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
326145
326148
|
return false;
|
|
326146
326149
|
}
|
|
326147
326150
|
}
|
|
326148
|
-
async#navigateToBlock(target) {
|
|
326151
|
+
async#navigateToBlock(target, options = {}) {
|
|
326149
326152
|
const editor = this.#editor;
|
|
326150
326153
|
if (!editor)
|
|
326151
326154
|
return false;
|
|
@@ -326165,9 +326168,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
326165
326168
|
}
|
|
326166
326169
|
if (!candidate)
|
|
326167
326170
|
return false;
|
|
326168
|
-
return this.#scrollToBlockCandidate(editor, candidate);
|
|
326171
|
+
return this.#scrollToBlockCandidate(editor, candidate, options);
|
|
326169
326172
|
}
|
|
326170
|
-
async#scrollToBlockCandidate(editor, candidate) {
|
|
326173
|
+
async#scrollToBlockCandidate(editor, candidate, options = {}) {
|
|
326171
326174
|
const blockNode = editor.state.doc.nodeAt(candidate.pos);
|
|
326172
326175
|
let contentPos = candidate.pos + 1;
|
|
326173
326176
|
if (blockNode)
|
|
@@ -326178,8 +326181,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
326178
326181
|
contentPos = candidate.pos + 1 + offset$1 + (child.isText ? 0 : 1);
|
|
326179
326182
|
});
|
|
326180
326183
|
if (!await this.scrollToPositionAsync(contentPos, {
|
|
326181
|
-
behavior: "auto",
|
|
326182
|
-
block: "center"
|
|
326184
|
+
behavior: options.behavior ?? "auto",
|
|
326185
|
+
block: options.block ?? "center"
|
|
326183
326186
|
}))
|
|
326184
326187
|
return false;
|
|
326185
326188
|
editor.commands?.setTextSelection?.({
|
|
@@ -326189,7 +326192,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
326189
326192
|
editor.view?.focus?.();
|
|
326190
326193
|
return true;
|
|
326191
326194
|
}
|
|
326192
|
-
async#navigateToComment(entityId) {
|
|
326195
|
+
async#navigateToComment(entityId, options = {}) {
|
|
326193
326196
|
const editor = this.#editor;
|
|
326194
326197
|
if (!editor)
|
|
326195
326198
|
return false;
|
|
@@ -326202,8 +326205,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
326202
326205
|
}))
|
|
326203
326206
|
return false;
|
|
326204
326207
|
await this.scrollToPositionAsync(editor.state.selection.from, {
|
|
326205
|
-
behavior: "auto",
|
|
326206
|
-
block: "center"
|
|
326208
|
+
behavior: options.behavior ?? "auto",
|
|
326209
|
+
block: options.block ?? "center"
|
|
326207
326210
|
});
|
|
326208
326211
|
return true;
|
|
326209
326212
|
}
|
|
@@ -326229,10 +326232,12 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
326229
326232
|
return this.#navigateToActiveStoryBookmark(target.name, activatedStoryKey);
|
|
326230
326233
|
return false;
|
|
326231
326234
|
}
|
|
326232
|
-
async#navigateToTrackedChange(entityId, storyKey, preferredPageIndex) {
|
|
326235
|
+
async#navigateToTrackedChange(entityId, storyKey, preferredPageIndex, options = {}) {
|
|
326233
326236
|
const editor = this.#editor;
|
|
326234
326237
|
if (!editor)
|
|
326235
326238
|
return false;
|
|
326239
|
+
const behavior = options.behavior ?? "auto";
|
|
326240
|
+
const block = options.block ?? "center";
|
|
326236
326241
|
if (storyKey && storyKey !== "body") {
|
|
326237
326242
|
if (this.#navigateToActiveStoryTrackedChange(entityId, storyKey))
|
|
326238
326243
|
return true;
|
|
@@ -326240,31 +326245,37 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
326240
326245
|
if (this.#navigateToActiveStoryTrackedChange(entityId, storyKey))
|
|
326241
326246
|
return true;
|
|
326242
326247
|
}
|
|
326243
|
-
return this.#scrollToRenderedTrackedChange(entityId, storyKey, preferredPageIndex
|
|
326248
|
+
return this.#scrollToRenderedTrackedChange(entityId, storyKey, preferredPageIndex, {
|
|
326249
|
+
behavior,
|
|
326250
|
+
block
|
|
326251
|
+
});
|
|
326244
326252
|
}
|
|
326245
326253
|
const setCursorById = editor.commands?.setCursorById;
|
|
326246
326254
|
if (typeof setCursorById === "function" && setCursorById(entityId, { preferredActiveThreadId: entityId })) {
|
|
326247
326255
|
await this.scrollToPositionAsync(editor.state.selection.from, {
|
|
326248
|
-
behavior
|
|
326249
|
-
block
|
|
326256
|
+
behavior,
|
|
326257
|
+
block
|
|
326250
326258
|
});
|
|
326251
326259
|
return true;
|
|
326252
326260
|
}
|
|
326253
326261
|
const resolved = resolveTrackedChange(editor, entityId);
|
|
326254
326262
|
if (!resolved)
|
|
326255
|
-
return this.#scrollToRenderedTrackedChange(entityId, undefined, preferredPageIndex
|
|
326263
|
+
return this.#scrollToRenderedTrackedChange(entityId, undefined, preferredPageIndex, {
|
|
326264
|
+
behavior,
|
|
326265
|
+
block
|
|
326266
|
+
});
|
|
326256
326267
|
if (typeof setCursorById === "function" && resolved.rawId !== entityId) {
|
|
326257
326268
|
if (setCursorById(resolved.rawId, { preferredActiveThreadId: resolved.rawId })) {
|
|
326258
326269
|
await this.scrollToPositionAsync(editor.state.selection.from, {
|
|
326259
|
-
behavior
|
|
326260
|
-
block
|
|
326270
|
+
behavior,
|
|
326271
|
+
block
|
|
326261
326272
|
});
|
|
326262
326273
|
return true;
|
|
326263
326274
|
}
|
|
326264
326275
|
}
|
|
326265
326276
|
if (!await this.scrollToPositionAsync(resolved.from, {
|
|
326266
|
-
behavior
|
|
326267
|
-
block
|
|
326277
|
+
behavior,
|
|
326278
|
+
block
|
|
326268
326279
|
}))
|
|
326269
326280
|
return false;
|
|
326270
326281
|
editor.commands?.setTextSelection?.({
|
|
@@ -326498,14 +326509,14 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
326498
326509
|
return candidates[0] ?? null;
|
|
326499
326510
|
return candidates.find((candidate) => this.#resolveRenderedPageIndexForElement(candidate) === preferredPageIndex) ?? candidates[0] ?? null;
|
|
326500
326511
|
}
|
|
326501
|
-
async#scrollToRenderedTrackedChange(entityId, storyKey, preferredPageIndex) {
|
|
326512
|
+
async#scrollToRenderedTrackedChange(entityId, storyKey, preferredPageIndex, options = {}) {
|
|
326502
326513
|
const candidate = this.#findRenderedTrackedChangeElement(entityId, storyKey, preferredPageIndex);
|
|
326503
326514
|
if (!candidate)
|
|
326504
326515
|
return false;
|
|
326505
326516
|
try {
|
|
326506
326517
|
candidate.scrollIntoView({
|
|
326507
|
-
behavior: "auto",
|
|
326508
|
-
block: "center",
|
|
326518
|
+
behavior: options.behavior ?? "auto",
|
|
326519
|
+
block: options.block ?? "center",
|
|
326509
326520
|
inline: "nearest"
|
|
326510
326521
|
});
|
|
326511
326522
|
return true;
|
|
@@ -327368,9 +327379,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
327368
327379
|
];
|
|
327369
327380
|
});
|
|
327370
327381
|
|
|
327371
|
-
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-
|
|
327382
|
+
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-BKSS0H4i.es.js
|
|
327372
327383
|
var ALL_TOOLBAR_COMMAND_IDS, EMPTY_ACTIVE_IDS;
|
|
327373
|
-
var
|
|
327384
|
+
var init_create_super_doc_ui_BKSS0H4i_es = __esm(() => {
|
|
327374
327385
|
init_SuperConverter_DklB_kc9_es();
|
|
327375
327386
|
init_create_headless_toolbar_lTVVsGdE_es();
|
|
327376
327387
|
ALL_TOOLBAR_COMMAND_IDS = Object.keys(createToolbarRegistry());
|
|
@@ -327390,7 +327401,7 @@ var init_zipper_BxRAi0_5_es = __esm(() => {
|
|
|
327390
327401
|
|
|
327391
327402
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
327392
327403
|
var init_super_editor_es = __esm(() => {
|
|
327393
|
-
|
|
327404
|
+
init_src_97w5ApZ8_es();
|
|
327394
327405
|
init_SuperConverter_DklB_kc9_es();
|
|
327395
327406
|
init_jszip_C49i9kUs_es();
|
|
327396
327407
|
init_xml_js_CqGKpaft_es();
|
|
@@ -327399,7 +327410,7 @@ var init_super_editor_es = __esm(() => {
|
|
|
327399
327410
|
init_dist_B8HfvhaK_es();
|
|
327400
327411
|
init_unified_Dsuw2be5_es();
|
|
327401
327412
|
init_DocxZipper_CUX64E5K_es();
|
|
327402
|
-
|
|
327413
|
+
init_create_super_doc_ui_BKSS0H4i_es();
|
|
327403
327414
|
init_ui_CGB3qmy3_es();
|
|
327404
327415
|
init_eventemitter3_BJrNoN9D_es();
|
|
327405
327416
|
init_errors_C_DoKMoN_es();
|