@superdoc-dev/mcp 0.3.0-next.20 → 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.
Files changed (2) hide show
  1. package/dist/index.js +106 -76
  2. package/package.json +3 -3
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-pzodLUJ-.es.js
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) => {
@@ -198811,21 +198811,35 @@ function computeTabStops$1(context) {
198811
198811
  const hanging = paragraphIndent.hanging ?? 0;
198812
198812
  const effectiveMinIndent = Math.max(0, leftIndent - hanging);
198813
198813
  const clearPositions = explicitStops.filter((stop) => stop.val === "clear").map((stop) => stop.pos);
198814
- const filteredExplicitStops = explicitStops.filter((stop) => stop.val !== "clear").filter((stop) => stop.pos >= effectiveMinIndent);
198814
+ const filteredExplicitStops = explicitStops.filter((stop) => stop.val !== "clear").filter((stop) => stop.pos >= effectiveMinIndent).map((stop) => ({
198815
+ ...stop,
198816
+ source: "explicit"
198817
+ }));
198815
198818
  const maxExplicit = filteredExplicitStops.reduce((max$2, stop) => Math.max(max$2, stop.pos), 0);
198816
198819
  const stops = [...filteredExplicitStops];
198817
- const defaultStart = !filteredExplicitStops.some((stop) => stop.val === "start") ? 0 : Math.max(maxExplicit, leftIndent);
198820
+ const hasStartAlignedExplicit = filteredExplicitStops.some((stop) => stop.val === "start");
198821
+ const hasExplicitStops = filteredExplicitStops.length > 0;
198822
+ const hasClearAtLeftIndent = clearPositions.some((clearPos) => Math.abs(clearPos - leftIndent) < TAB_POSITION_TOLERANCE_TWIPS);
198823
+ if (!hasExplicitStops && !hasClearAtLeftIndent && hanging > 0 && leftIndent > effectiveMinIndent)
198824
+ stops.push({
198825
+ val: "start",
198826
+ pos: leftIndent,
198827
+ leader: "none",
198828
+ source: "default"
198829
+ });
198830
+ const defaultStart = !hasStartAlignedExplicit ? 0 : Math.max(maxExplicit, leftIndent);
198818
198831
  let pos = defaultStart;
198819
198832
  const targetLimit = Math.max(defaultStart, leftIndent, maxExplicit) + 14400;
198820
198833
  while (pos < targetLimit) {
198821
198834
  pos += defaultTabInterval;
198822
- const hasExplicitStop = filteredExplicitStops.some((s2) => Math.abs(s2.pos - pos) < 20);
198823
- const hasClearStop = clearPositions.some((clearPos) => Math.abs(clearPos - pos) < 20);
198824
- if (!hasExplicitStop && !hasClearStop && pos >= leftIndent)
198835
+ const hasExistingStop = stops.some((s2) => Math.abs(s2.pos - pos) < TAB_POSITION_TOLERANCE_TWIPS);
198836
+ const hasClearStop = clearPositions.some((clearPos) => Math.abs(clearPos - pos) < TAB_POSITION_TOLERANCE_TWIPS);
198837
+ if (!hasExistingStop && !hasClearStop && pos >= leftIndent)
198825
198838
  stops.push({
198826
198839
  val: "start",
198827
198840
  pos,
198828
- leader: "none"
198841
+ leader: "none",
198842
+ source: "default"
198829
198843
  });
198830
198844
  }
198831
198845
  return stops.sort((a2, b$1) => a2.pos - b$1.pos);
@@ -199037,12 +199051,13 @@ function getFragmentZIndex(block) {
199037
199051
  return resolveFloatingZIndex(block.anchor?.behindDoc === true, raw);
199038
199052
  }
199039
199053
  function shouldApplyJustify(params$1) {
199040
- const { alignment: alignment$1, hasExplicitPositioning, isLastLineOfParagraph, paragraphEndsWithLineBreak, skipJustifyOverride } = params$1;
199054
+ const { alignment: alignment$1, hasExplicitPositioning, hasExplicitTabStops, isLastLineOfParagraph, paragraphEndsWithLineBreak, skipJustifyOverride } = params$1;
199055
+ const lineHasExplicitTabStops = hasExplicitTabStops ?? hasExplicitPositioning ?? false;
199041
199056
  if (alignment$1 !== "justify" && alignment$1 !== "both")
199042
199057
  return false;
199043
199058
  if (skipJustifyOverride === true)
199044
199059
  return false;
199045
- if (hasExplicitPositioning)
199060
+ if (lineHasExplicitTabStops)
199046
199061
  return false;
199047
199062
  if (isLastLineOfParagraph && !paragraphEndsWithLineBreak)
199048
199063
  return false;
@@ -249468,7 +249483,12 @@ function sliceRunsForLine(block, line) {
249468
249483
  function measureCharacterX(block, line, charOffset, availableWidthOverride, alignmentOverride) {
249469
249484
  const ctx$1 = getMeasurementContext();
249470
249485
  const availableWidth = availableWidthOverride ?? line.maxWidth ?? line.width;
249471
- const justify = getJustifyAdjustment(block, line, availableWidth, alignmentOverride, undefined, undefined, lineContainsManualTabWithoutSegments(block, line));
249486
+ const justify = getJustifyAdjustment({
249487
+ block,
249488
+ line,
249489
+ availableWidthOverride: availableWidth,
249490
+ alignmentOverride
249491
+ });
249472
249492
  const alignment$1 = alignmentOverride ?? (block.kind === "paragraph" ? block.attrs?.alignment : undefined);
249473
249493
  const renderedLineWidth = alignment$1 === "justify" && justify.extraPerSpace !== 0 ? availableWidth : line.width;
249474
249494
  const hasExplicitPositioning = line.segments?.some((seg) => seg.x !== undefined);
@@ -249600,7 +249620,12 @@ function charOffsetToPm(block, line, charOffset, fallbackPmStart) {
249600
249620
  function findCharacterAtX(block, line, x, pmStart, availableWidthOverride, alignmentOverride) {
249601
249621
  const ctx$1 = getMeasurementContext();
249602
249622
  const availableWidth = availableWidthOverride ?? line.maxWidth ?? line.width;
249603
- const justify = getJustifyAdjustment(block, line, availableWidth, alignmentOverride, undefined, undefined, lineContainsManualTabWithoutSegments(block, line));
249623
+ const justify = getJustifyAdjustment({
249624
+ block,
249625
+ line,
249626
+ availableWidthOverride: availableWidth,
249627
+ alignmentOverride
249628
+ });
249604
249629
  const alignment$1 = alignmentOverride ?? (block.kind === "paragraph" ? block.attrs?.alignment : undefined);
249605
249630
  const renderedLineWidth = alignment$1 === "justify" ? line.width + Math.max(0, availableWidth - line.width) : line.width;
249606
249631
  const hasExplicitPositioning = line.segments?.some((seg) => seg.x !== undefined);
@@ -258951,6 +258976,8 @@ async function measureParagraphBlock(block, maxWidth) {
258951
258976
  const clampedTarget = Math.min(target, maxAbsWidth);
258952
258977
  const tabAdvance = Math.max(0, clampedTarget - absCurrentX);
258953
258978
  currentLine.width = roundValue(currentLine.width + tabAdvance);
258979
+ if (stop?.source === "explicit")
258980
+ currentLine.hasExplicitTabStops = true;
258954
258981
  run2.width = tabAdvance;
258955
258982
  currentLine.maxFontSize = Math.max(currentLine.maxFontSize, lastFontSize);
258956
258983
  currentLine.toRun = runIndex;
@@ -259709,6 +259736,8 @@ async function measureParagraphBlock(block, maxWidth) {
259709
259736
  const clampedTarget = Math.min(target, maxAbsWidth);
259710
259737
  const tabAdvance = Math.max(0, clampedTarget - absCurrentX);
259711
259738
  currentLine.width = roundValue(currentLine.width + tabAdvance);
259739
+ if (stop?.source === "explicit")
259740
+ currentLine.hasExplicitTabStops = true;
259712
259741
  currentLine.maxFontInfo = updateMaxFontInfo(currentLine.maxFontSize, currentLine.maxFontInfo, run2);
259713
259742
  currentLine.maxFontSize = Math.max(currentLine.maxFontSize, lineHeightFontSize(run2));
259714
259743
  currentLine.toRun = runIndex;
@@ -260797,7 +260826,7 @@ var Node$13 = class Node$14 {
260797
260826
  "iPhone",
260798
260827
  "iPod"
260799
260828
  ].includes(navigator.platform);
260800
- }, OOXML_PCT_DIVISOR = 5000, TWIPS_PER_PX$3 = 15, isPlainObject$7 = (value) => value !== null && typeof value === "object" && !Array.isArray(value), OOXML_Z_INDEX_BASE = 251658240, SPACE_CHARS, isAtomicRunKind = (kind) => kind === "image" || kind === "lineBreak" || kind === "break" || kind === "tab" || kind === "fieldAnnotation", isImageLikeRun = (run2) => {
260829
+ }, TAB_POSITION_TOLERANCE_TWIPS = 20, OOXML_PCT_DIVISOR = 5000, TWIPS_PER_PX$3 = 15, isPlainObject$7 = (value) => value !== null && typeof value === "object" && !Array.isArray(value), OOXML_Z_INDEX_BASE = 251658240, SPACE_CHARS, isAtomicRunKind = (kind) => kind === "image" || kind === "lineBreak" || kind === "break" || kind === "tab" || kind === "fieldAnnotation", isImageLikeRun = (run2) => {
260801
260830
  if (!run2 || typeof run2 !== "object")
260802
260831
  return false;
260803
260832
  return typeof run2.src === "string";
@@ -265412,20 +265441,23 @@ var Node$13 = class Node$14 {
265412
265441
  segments,
265413
265442
  ranges: []
265414
265443
  };
265444
+ const sorted = [...segments].sort((a2, b$1) => a2.from - b$1.from);
265415
265445
  const ranges = [];
265416
- let active = null;
265417
- segments.forEach((seg) => {
265418
- if (!active) {
265419
- active = {
265420
- from: seg.from,
265421
- to: seg.to,
265422
- internal: !!seg.attrs?.internal
265423
- };
265424
- return;
265425
- }
265446
+ let active = {
265447
+ from: sorted[0].from,
265448
+ to: sorted[0].to,
265449
+ internal: !!sorted[0].attrs?.internal
265450
+ };
265451
+ for (let i4 = 1;i4 < sorted.length; i4 += 1) {
265452
+ const seg = sorted[i4];
265426
265453
  if (seg.from <= active.to) {
265427
- active.to = Math.max(active.to, seg.to);
265428
- return;
265454
+ if (seg.to > active.to)
265455
+ active.to = seg.to;
265456
+ continue;
265457
+ }
265458
+ if (!(doc$12.textBetween(active.to, seg.from, "", "").length > 0)) {
265459
+ active.to = seg.to;
265460
+ continue;
265429
265461
  }
265430
265462
  ranges.push(active);
265431
265463
  active = {
@@ -265433,9 +265465,8 @@ var Node$13 = class Node$14 {
265433
265465
  to: seg.to,
265434
265466
  internal: !!seg.attrs?.internal
265435
265467
  };
265436
- });
265437
- if (active)
265438
- ranges.push(active);
265468
+ }
265469
+ ranges.push(active);
265439
265470
  return {
265440
265471
  segments,
265441
265472
  ranges
@@ -281157,19 +281188,6 @@ menclose::after {
281157
281188
  return false;
281158
281189
  const code7 = char.charCodeAt(0);
281159
281190
  return code7 >= 48 && code7 <= 57 || code7 >= 65 && code7 <= 90 || code7 >= 97 && code7 <= 122 || char === "'";
281160
- }, lineContainsManualTabWithoutSegments = (block, line) => {
281161
- if (block.kind !== "paragraph")
281162
- return false;
281163
- if (line.segments?.some((seg) => seg.x !== undefined))
281164
- return false;
281165
- const fromRun = line.fromRun ?? 0;
281166
- const toRun = line.toRun ?? fromRun;
281167
- for (let runIndex = fromRun;runIndex <= toRun; runIndex += 1) {
281168
- const run2 = block.runs[runIndex];
281169
- if (run2 && isTabRun$1(run2))
281170
- return true;
281171
- }
281172
- return false;
281173
281191
  }, capitalizeText$3 = (text5) => {
281174
281192
  if (!text5)
281175
281193
  return text5;
@@ -281196,7 +281214,7 @@ menclose::after {
281196
281214
  if (SPACE_CHARS$1.has(text5[i4]))
281197
281215
  spaces += 1;
281198
281216
  return spaces;
281199
- }, getJustifyAdjustment = (block, line, availableWidthOverride, alignmentOverride, isLastLineOfParagraph, paragraphEndsWithLineBreak, skipJustifyOverride) => {
281217
+ }, getJustifyAdjustment = ({ block, line, availableWidthOverride, alignmentOverride, isLastLineOfParagraph, paragraphEndsWithLineBreak, skipJustifyOverride }) => {
281200
281218
  if (block.kind !== "paragraph")
281201
281219
  return {
281202
281220
  extraPerSpace: 0,
@@ -281208,7 +281226,6 @@ menclose::after {
281208
281226
  totalSpaces: 0
281209
281227
  };
281210
281228
  const alignment$1 = alignmentOverride ?? block.attrs?.alignment;
281211
- const hasExplicitPositioning = line.segments?.some((seg) => seg.x !== undefined) ?? false;
281212
281229
  const lastRunIndex = block.runs.length - 1;
281213
281230
  const lastRun = block.runs[lastRunIndex];
281214
281231
  const lastRunLength = getRunCharacterLength(lastRun);
@@ -281216,7 +281233,8 @@ menclose::after {
281216
281233
  const derivedEndsWithLineBreak = lastRun ? lastRun.kind === "lineBreak" : false;
281217
281234
  if (!shouldApplyJustify({
281218
281235
  alignment: alignment$1,
281219
- hasExplicitPositioning,
281236
+ hasExplicitPositioning: line.segments?.some((seg) => seg.x !== undefined) ?? false,
281237
+ hasExplicitTabStops: line.hasExplicitTabStops === true,
281220
281238
  isLastLineOfParagraph: isLastLineOfParagraph ?? derivedIsLastLine,
281221
281239
  paragraphEndsWithLineBreak: paragraphEndsWithLineBreak ?? derivedEndsWithLineBreak,
281222
281240
  skipJustifyOverride
@@ -282018,7 +282036,8 @@ menclose::after {
282018
282036
  }).map((stop) => ({
282019
282037
  pos: twipsToPx$1(stop.pos),
282020
282038
  val: stop.val,
282021
- leader: stop.leader
282039
+ leader: stop.leader,
282040
+ source: stop.source
282022
282041
  }));
282023
282042
  }, getNextTabStopPx$1 = (currentX, tabStops, startIndex) => {
282024
282043
  let index2 = startIndex;
@@ -282208,6 +282227,8 @@ menclose::after {
282208
282227
  const clampedTarget = Number.isFinite(maxAbsWidth) ? Math.min(target, maxAbsWidth) : target;
282209
282228
  const relativeTarget = clampedTarget - effectiveIndent;
282210
282229
  lineWidth = Math.max(lineWidth, relativeTarget);
282230
+ if (stop?.source === "explicit")
282231
+ line.hasExplicitTabStops = true;
282211
282232
  let currentLeader = null;
282212
282233
  if (stop?.leader && stop.leader !== "none") {
282213
282234
  currentLeader = {
@@ -288298,7 +288319,8 @@ menclose::after {
288298
288319
  }).map((stop) => ({
288299
288320
  pos: twipsToPx(stop.pos),
288300
288321
  val: stop.val,
288301
- leader: stop.leader
288322
+ leader: stop.leader,
288323
+ source: stop.source
288302
288324
  }));
288303
288325
  }, getNextTabStopPx = (currentX, tabStops, startIndex) => {
288304
288326
  let index2 = startIndex;
@@ -289956,7 +289978,7 @@ menclose::after {
289956
289978
  return;
289957
289979
  console.log(...args$1);
289958
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;
289959
- var init_src_pzodLUJ_es = __esm(() => {
289981
+ var init_src_BDVIM2Bl_es = __esm(() => {
289960
289982
  init_rolldown_runtime_Bg48TavK_es();
289961
289983
  init_SuperConverter_DklB_kc9_es();
289962
289984
  init_jszip_C49i9kUs_es();
@@ -319900,14 +319922,14 @@ function print() { __p += __j.call(arguments, '') }
319900
319922
  el.appendChild(barEl);
319901
319923
  });
319902
319924
  const hasExplicitPositioning = line.segments?.some((seg) => seg.x !== undefined);
319903
- const manualTabWithoutSegments = runsForLine.some((run2) => run2.kind === "tab") && !hasExplicitPositioning;
319904
319925
  const availableWidth = availableWidthOverride ?? line.maxWidth ?? line.width;
319905
319926
  const justifyShouldApply = shouldApplyJustify({
319906
319927
  alignment: block.attrs?.alignment,
319907
319928
  hasExplicitPositioning: hasExplicitPositioning ?? false,
319929
+ hasExplicitTabStops: line.hasExplicitTabStops === true,
319908
319930
  isLastLineOfParagraph: false,
319909
319931
  paragraphEndsWithLineBreak: false,
319910
- skipJustifyOverride: skipJustify || manualTabWithoutSegments
319932
+ skipJustifyOverride: skipJustify
319911
319933
  });
319912
319934
  const countSpaces$1 = (text5) => {
319913
319935
  let count = 0;
@@ -326099,19 +326121,19 @@ function print() { __p += __j.call(arguments, '') }
326099
326121
  return true;
326100
326122
  return false;
326101
326123
  }
326102
- async navigateTo(target) {
326124
+ async navigateTo(target, options = {}) {
326103
326125
  if (!target)
326104
326126
  return false;
326105
326127
  try {
326106
326128
  if (target.kind === "block")
326107
- return await this.#navigateToBlock(target);
326129
+ return await this.#navigateToBlock(target, options);
326108
326130
  if (target.kind === "entity") {
326109
326131
  if (target.entityType === "bookmark")
326110
326132
  return await this.#navigateToBookmark(target);
326111
326133
  if (target.entityType === "comment")
326112
- return await this.#navigateToComment(target.entityId);
326134
+ return await this.#navigateToComment(target.entityId, options);
326113
326135
  if (target.entityType === "trackedChange")
326114
- return await this.#navigateToTrackedChange(target.entityId, resolveStoryKeyFromAddress(target.story), target.pageIndex);
326136
+ return await this.#navigateToTrackedChange(target.entityId, resolveStoryKeyFromAddress(target.story), target.pageIndex, options);
326115
326137
  }
326116
326138
  return false;
326117
326139
  } catch (error48) {
@@ -326123,7 +326145,7 @@ function print() { __p += __j.call(arguments, '') }
326123
326145
  return false;
326124
326146
  }
326125
326147
  }
326126
- async#navigateToBlock(target) {
326148
+ async#navigateToBlock(target, options = {}) {
326127
326149
  const editor = this.#editor;
326128
326150
  if (!editor)
326129
326151
  return false;
@@ -326143,9 +326165,9 @@ function print() { __p += __j.call(arguments, '') }
326143
326165
  }
326144
326166
  if (!candidate)
326145
326167
  return false;
326146
- return this.#scrollToBlockCandidate(editor, candidate);
326168
+ return this.#scrollToBlockCandidate(editor, candidate, options);
326147
326169
  }
326148
- async#scrollToBlockCandidate(editor, candidate) {
326170
+ async#scrollToBlockCandidate(editor, candidate, options = {}) {
326149
326171
  const blockNode = editor.state.doc.nodeAt(candidate.pos);
326150
326172
  let contentPos = candidate.pos + 1;
326151
326173
  if (blockNode)
@@ -326156,8 +326178,8 @@ function print() { __p += __j.call(arguments, '') }
326156
326178
  contentPos = candidate.pos + 1 + offset$1 + (child.isText ? 0 : 1);
326157
326179
  });
326158
326180
  if (!await this.scrollToPositionAsync(contentPos, {
326159
- behavior: "auto",
326160
- block: "center"
326181
+ behavior: options.behavior ?? "auto",
326182
+ block: options.block ?? "center"
326161
326183
  }))
326162
326184
  return false;
326163
326185
  editor.commands?.setTextSelection?.({
@@ -326167,7 +326189,7 @@ function print() { __p += __j.call(arguments, '') }
326167
326189
  editor.view?.focus?.();
326168
326190
  return true;
326169
326191
  }
326170
- async#navigateToComment(entityId) {
326192
+ async#navigateToComment(entityId, options = {}) {
326171
326193
  const editor = this.#editor;
326172
326194
  if (!editor)
326173
326195
  return false;
@@ -326180,8 +326202,8 @@ function print() { __p += __j.call(arguments, '') }
326180
326202
  }))
326181
326203
  return false;
326182
326204
  await this.scrollToPositionAsync(editor.state.selection.from, {
326183
- behavior: "auto",
326184
- block: "center"
326205
+ behavior: options.behavior ?? "auto",
326206
+ block: options.block ?? "center"
326185
326207
  });
326186
326208
  return true;
326187
326209
  }
@@ -326207,10 +326229,12 @@ function print() { __p += __j.call(arguments, '') }
326207
326229
  return this.#navigateToActiveStoryBookmark(target.name, activatedStoryKey);
326208
326230
  return false;
326209
326231
  }
326210
- async#navigateToTrackedChange(entityId, storyKey, preferredPageIndex) {
326232
+ async#navigateToTrackedChange(entityId, storyKey, preferredPageIndex, options = {}) {
326211
326233
  const editor = this.#editor;
326212
326234
  if (!editor)
326213
326235
  return false;
326236
+ const behavior = options.behavior ?? "auto";
326237
+ const block = options.block ?? "center";
326214
326238
  if (storyKey && storyKey !== "body") {
326215
326239
  if (this.#navigateToActiveStoryTrackedChange(entityId, storyKey))
326216
326240
  return true;
@@ -326218,31 +326242,37 @@ function print() { __p += __j.call(arguments, '') }
326218
326242
  if (this.#navigateToActiveStoryTrackedChange(entityId, storyKey))
326219
326243
  return true;
326220
326244
  }
326221
- return this.#scrollToRenderedTrackedChange(entityId, storyKey, preferredPageIndex);
326245
+ return this.#scrollToRenderedTrackedChange(entityId, storyKey, preferredPageIndex, {
326246
+ behavior,
326247
+ block
326248
+ });
326222
326249
  }
326223
326250
  const setCursorById = editor.commands?.setCursorById;
326224
326251
  if (typeof setCursorById === "function" && setCursorById(entityId, { preferredActiveThreadId: entityId })) {
326225
326252
  await this.scrollToPositionAsync(editor.state.selection.from, {
326226
- behavior: "auto",
326227
- block: "center"
326253
+ behavior,
326254
+ block
326228
326255
  });
326229
326256
  return true;
326230
326257
  }
326231
326258
  const resolved = resolveTrackedChange(editor, entityId);
326232
326259
  if (!resolved)
326233
- return this.#scrollToRenderedTrackedChange(entityId, undefined, preferredPageIndex);
326260
+ return this.#scrollToRenderedTrackedChange(entityId, undefined, preferredPageIndex, {
326261
+ behavior,
326262
+ block
326263
+ });
326234
326264
  if (typeof setCursorById === "function" && resolved.rawId !== entityId) {
326235
326265
  if (setCursorById(resolved.rawId, { preferredActiveThreadId: resolved.rawId })) {
326236
326266
  await this.scrollToPositionAsync(editor.state.selection.from, {
326237
- behavior: "auto",
326238
- block: "center"
326267
+ behavior,
326268
+ block
326239
326269
  });
326240
326270
  return true;
326241
326271
  }
326242
326272
  }
326243
326273
  if (!await this.scrollToPositionAsync(resolved.from, {
326244
- behavior: "auto",
326245
- block: "center"
326274
+ behavior,
326275
+ block
326246
326276
  }))
326247
326277
  return false;
326248
326278
  editor.commands?.setTextSelection?.({
@@ -326476,14 +326506,14 @@ function print() { __p += __j.call(arguments, '') }
326476
326506
  return candidates[0] ?? null;
326477
326507
  return candidates.find((candidate) => this.#resolveRenderedPageIndexForElement(candidate) === preferredPageIndex) ?? candidates[0] ?? null;
326478
326508
  }
326479
- async#scrollToRenderedTrackedChange(entityId, storyKey, preferredPageIndex) {
326509
+ async#scrollToRenderedTrackedChange(entityId, storyKey, preferredPageIndex, options = {}) {
326480
326510
  const candidate = this.#findRenderedTrackedChangeElement(entityId, storyKey, preferredPageIndex);
326481
326511
  if (!candidate)
326482
326512
  return false;
326483
326513
  try {
326484
326514
  candidate.scrollIntoView({
326485
- behavior: "auto",
326486
- block: "center",
326515
+ behavior: options.behavior ?? "auto",
326516
+ block: options.block ?? "center",
326487
326517
  inline: "nearest"
326488
326518
  });
326489
326519
  return true;
@@ -327346,9 +327376,9 @@ function print() { __p += __j.call(arguments, '') }
327346
327376
  ];
327347
327377
  });
327348
327378
 
327349
- // ../../packages/superdoc/dist/chunks/create-super-doc-ui-C-uFDEFx.es.js
327379
+ // ../../packages/superdoc/dist/chunks/create-super-doc-ui-CTaglEuR.es.js
327350
327380
  var ALL_TOOLBAR_COMMAND_IDS, EMPTY_ACTIVE_IDS;
327351
- var init_create_super_doc_ui_C_uFDEFx_es = __esm(() => {
327381
+ var init_create_super_doc_ui_CTaglEuR_es = __esm(() => {
327352
327382
  init_SuperConverter_DklB_kc9_es();
327353
327383
  init_create_headless_toolbar_lTVVsGdE_es();
327354
327384
  ALL_TOOLBAR_COMMAND_IDS = Object.keys(createToolbarRegistry());
@@ -327368,7 +327398,7 @@ var init_zipper_BxRAi0_5_es = __esm(() => {
327368
327398
 
327369
327399
  // ../../packages/superdoc/dist/super-editor.es.js
327370
327400
  var init_super_editor_es = __esm(() => {
327371
- init_src_pzodLUJ_es();
327401
+ init_src_BDVIM2Bl_es();
327372
327402
  init_SuperConverter_DklB_kc9_es();
327373
327403
  init_jszip_C49i9kUs_es();
327374
327404
  init_xml_js_CqGKpaft_es();
@@ -327377,7 +327407,7 @@ var init_super_editor_es = __esm(() => {
327377
327407
  init_dist_B8HfvhaK_es();
327378
327408
  init_unified_Dsuw2be5_es();
327379
327409
  init_DocxZipper_CUX64E5K_es();
327380
- init_create_super_doc_ui_C_uFDEFx_es();
327410
+ init_create_super_doc_ui_CTaglEuR_es();
327381
327411
  init_ui_CGB3qmy3_es();
327382
327412
  init_eventemitter3_BJrNoN9D_es();
327383
327413
  init_errors_C_DoKMoN_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/mcp",
3
- "version": "0.3.0-next.20",
3
+ "version": "0.3.0-next.22",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=20"
@@ -20,8 +20,8 @@
20
20
  "@types/node": "22.19.2",
21
21
  "typescript": "^5.9.2",
22
22
  "@superdoc/document-api": "0.0.1",
23
- "@superdoc/super-editor": "0.0.1",
24
- "superdoc": "1.29.1"
23
+ "superdoc": "1.29.1",
24
+ "@superdoc/super-editor": "0.0.1"
25
25
  },
26
26
  "publishConfig": {
27
27
  "access": "public"