@superdoc-dev/mcp 0.12.0-next.25 → 0.12.0-next.26
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 +79 -53
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -52172,7 +52172,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
|
|
|
52172
52172
|
emptyOptions2 = {};
|
|
52173
52173
|
});
|
|
52174
52174
|
|
|
52175
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
52175
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-WQVqM0th.es.js
|
|
52176
52176
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
52177
52177
|
const fieldValue = extension$1.config[field];
|
|
52178
52178
|
if (typeof fieldValue === "function")
|
|
@@ -72379,6 +72379,22 @@ function fixTable(state, table, tablePos, tr) {
|
|
|
72379
72379
|
}
|
|
72380
72380
|
return tr.setMeta(fixTablesKey, { fixTables: true });
|
|
72381
72381
|
}
|
|
72382
|
+
function findTable($pos) {
|
|
72383
|
+
return findParentNode$1((node2) => node2.type.spec.tableRole === "table", $pos);
|
|
72384
|
+
}
|
|
72385
|
+
function findParentNode$1(predicate, $pos) {
|
|
72386
|
+
for (let depth = $pos.depth;depth >= 0; depth -= 1) {
|
|
72387
|
+
const node2 = $pos.node(depth);
|
|
72388
|
+
if (predicate(node2))
|
|
72389
|
+
return {
|
|
72390
|
+
node: node2,
|
|
72391
|
+
pos: depth === 0 ? 0 : $pos.before(depth),
|
|
72392
|
+
start: $pos.start(depth),
|
|
72393
|
+
depth
|
|
72394
|
+
};
|
|
72395
|
+
}
|
|
72396
|
+
return null;
|
|
72397
|
+
}
|
|
72382
72398
|
function selectedRect(state) {
|
|
72383
72399
|
const sel = state.selection;
|
|
72384
72400
|
const $pos = selectionCell(state);
|
|
@@ -118758,7 +118774,7 @@ var isRegExp = (value) => {
|
|
|
118758
118774
|
state.kern = kernNode.attributes["w:val"];
|
|
118759
118775
|
}
|
|
118760
118776
|
}, SuperConverter;
|
|
118761
|
-
var
|
|
118777
|
+
var init_SuperConverter_WQVqM0th_es = __esm(() => {
|
|
118762
118778
|
init_rolldown_runtime_Bg48TavK_es();
|
|
118763
118779
|
init_jszip_C49i9kUs_es();
|
|
118764
118780
|
init_xml_js_CqGKpaft_es();
|
|
@@ -159502,7 +159518,7 @@ var init_SuperConverter_CCgGAnXY_es = __esm(() => {
|
|
|
159502
159518
|
};
|
|
159503
159519
|
});
|
|
159504
159520
|
|
|
159505
|
-
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-
|
|
159521
|
+
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-B8OXKxcw.es.js
|
|
159506
159522
|
function parseSizeUnit(val = "0") {
|
|
159507
159523
|
const length = val.toString() || "0";
|
|
159508
159524
|
const value = Number.parseFloat(length);
|
|
@@ -169897,8 +169913,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
|
|
|
169897
169913
|
}
|
|
169898
169914
|
};
|
|
169899
169915
|
};
|
|
169900
|
-
var
|
|
169901
|
-
|
|
169916
|
+
var init_create_headless_toolbar_B8OXKxcw_es = __esm(() => {
|
|
169917
|
+
init_SuperConverter_WQVqM0th_es();
|
|
169902
169918
|
init_uuid_B2wVPhPi_es();
|
|
169903
169919
|
init_constants_D9qj59G2_es();
|
|
169904
169920
|
init_dist_B8HfvhaK_es();
|
|
@@ -224588,7 +224604,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
224588
224604
|
init_remark_gfm_BhnWr3yf_es();
|
|
224589
224605
|
});
|
|
224590
224606
|
|
|
224591
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
224607
|
+
// ../../packages/superdoc/dist/chunks/src-Bvhjxf8i.es.js
|
|
224592
224608
|
function deleteProps(obj, propOrProps) {
|
|
224593
224609
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
224594
224610
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -275606,11 +275622,12 @@ function percentile(sortedValues, p$12) {
|
|
|
275606
275622
|
return sortedValues[lower] * (1 - weight) + sortedValues[upper] * weight;
|
|
275607
275623
|
}
|
|
275608
275624
|
function pushEmptyLineSelectionBand(rects, opts) {
|
|
275625
|
+
const lineOffset = sumLineHeights(opts.measure, opts.startLineIndex, opts.lineIndex);
|
|
275609
275626
|
rects.push({
|
|
275610
275627
|
x: opts.x,
|
|
275611
|
-
y: opts.
|
|
275628
|
+
y: opts.yBase + lineOffset,
|
|
275612
275629
|
width: Math.max(1, opts.width),
|
|
275613
|
-
height: opts.
|
|
275630
|
+
height: opts.lineHeight,
|
|
275614
275631
|
pageIndex: opts.pageIndex
|
|
275615
275632
|
});
|
|
275616
275633
|
}
|
|
@@ -275641,13 +275658,15 @@ function selectionToRects(layout, blocks2, measures, from$1, to, geometryHelper)
|
|
|
275641
275658
|
const sliceFrom = Math.max(range.pmStart, from$1);
|
|
275642
275659
|
const sliceTo = Math.min(range.pmEnd, to);
|
|
275643
275660
|
if (sliceFrom >= sliceTo) {
|
|
275644
|
-
const emptyLineOffset = lineHeightBeforeIndex$1(measure, index2) - lineHeightBeforeIndex$1(measure, fragment.fromLine);
|
|
275645
275661
|
pushEmptyLineSelectionBand(rects, {
|
|
275646
275662
|
x: fragment.x,
|
|
275647
|
-
|
|
275663
|
+
yBase: fragment.y + pageTopY,
|
|
275648
275664
|
width: fragment.width,
|
|
275649
|
-
|
|
275650
|
-
pageIndex
|
|
275665
|
+
lineHeight: line.lineHeight,
|
|
275666
|
+
pageIndex,
|
|
275667
|
+
measure,
|
|
275668
|
+
lineIndex: index2,
|
|
275669
|
+
startLineIndex: fragment.fromLine
|
|
275651
275670
|
});
|
|
275652
275671
|
return;
|
|
275653
275672
|
}
|
|
@@ -275829,13 +275848,15 @@ function selectionToRects(layout, blocks2, measures, from$1, to, geometryHelper)
|
|
|
275829
275848
|
const sliceFrom = Math.max(range.pmStart, from$1);
|
|
275830
275849
|
const sliceTo = Math.min(range.pmEnd, to);
|
|
275831
275850
|
if (sliceFrom >= sliceTo) {
|
|
275832
|
-
const emptyLineOffset = lineHeightBeforeIndex$1(info.measure, index2) - lineHeightBeforeIndex$1(info.measure, info.startLine);
|
|
275833
275851
|
pushEmptyLineSelectionBand(rects, {
|
|
275834
275852
|
x: fragment.x + contentOffsetX + cellX + padding.left,
|
|
275835
|
-
|
|
275853
|
+
yBase: fragment.y + contentOffsetY + rowOffset + blockTopCursor + effectiveSpacingBeforePx + pageTopY,
|
|
275836
275854
|
width: cellMeasure.width - padding.left - padding.right,
|
|
275837
|
-
|
|
275838
|
-
pageIndex
|
|
275855
|
+
lineHeight: line.lineHeight,
|
|
275856
|
+
pageIndex,
|
|
275857
|
+
measure: info.measure,
|
|
275858
|
+
lineIndex: index2,
|
|
275859
|
+
startLineIndex: info.startLine
|
|
275839
275860
|
});
|
|
275840
275861
|
return;
|
|
275841
275862
|
}
|
|
@@ -276176,15 +276197,7 @@ function selectionCollapsesAcrossTableCells(doc$12, anchor, head) {
|
|
|
276176
276197
|
return false;
|
|
276177
276198
|
const $from = doc$12.resolve(Math.min(anchor, head));
|
|
276178
276199
|
const $to = doc$12.resolve(Math.max(anchor, head));
|
|
276179
|
-
|
|
276180
|
-
for (let depth = pos.depth;depth > 0; depth--) {
|
|
276181
|
-
const role = pos.node(depth).type.spec.tableRole;
|
|
276182
|
-
if (role === "cell" || role === "header_cell")
|
|
276183
|
-
return pos.node(depth);
|
|
276184
|
-
}
|
|
276185
|
-
return null;
|
|
276186
|
-
};
|
|
276187
|
-
return cellAncestor($from) !== cellAncestor($to) && $to.parentOffset === 0;
|
|
276200
|
+
return cellWrapping2($from) !== cellWrapping2($to) && $to.parentOffset === 0;
|
|
276188
276201
|
} catch {
|
|
276189
276202
|
return false;
|
|
276190
276203
|
}
|
|
@@ -278172,6 +278185,19 @@ function getTopLevelTableBlockAtPos(doc$12, blocks2, tablePos) {
|
|
|
278172
278185
|
return null;
|
|
278173
278186
|
return getTableBlocks(blocks2)[tableIndex] ?? null;
|
|
278174
278187
|
}
|
|
278188
|
+
function resolveCellContextAtResolvedPos($pos) {
|
|
278189
|
+
const $cell = cellAround($pos);
|
|
278190
|
+
if (!$cell)
|
|
278191
|
+
return null;
|
|
278192
|
+
const table2 = findTable($cell);
|
|
278193
|
+
if (!table2)
|
|
278194
|
+
return null;
|
|
278195
|
+
return {
|
|
278196
|
+
$cell,
|
|
278197
|
+
cellPos: $cell.pos,
|
|
278198
|
+
tablePos: table2.pos
|
|
278199
|
+
};
|
|
278200
|
+
}
|
|
278175
278201
|
function resolveCellAnchorStateFromCellPos(doc$12, blocks2, cellPos) {
|
|
278176
278202
|
if (!doc$12 || !Number.isFinite(cellPos) || cellPos < 0 || cellPos > doc$12.content.size)
|
|
278177
278203
|
return null;
|
|
@@ -278276,30 +278302,30 @@ function resolveCellContext(doc$12, pos) {
|
|
|
278276
278302
|
} catch {
|
|
278277
278303
|
return null;
|
|
278278
278304
|
}
|
|
278279
|
-
|
|
278280
|
-
|
|
278281
|
-
for (let depth = $pos.depth;depth > 0; depth--) {
|
|
278282
|
-
const role = $pos.node(depth).type.spec.tableRole;
|
|
278283
|
-
if (cellDepth === -1 && (role === "cell" || role === "header_cell"))
|
|
278284
|
-
cellDepth = depth;
|
|
278285
|
-
if (cellDepth !== -1 && role === "table") {
|
|
278286
|
-
tableDepth = depth;
|
|
278287
|
-
break;
|
|
278288
|
-
}
|
|
278289
|
-
}
|
|
278290
|
-
if (cellDepth === -1 || tableDepth === -1)
|
|
278305
|
+
const context = resolveCellContextAtResolvedPos($pos);
|
|
278306
|
+
if (!context)
|
|
278291
278307
|
return null;
|
|
278292
278308
|
return {
|
|
278293
|
-
cellPos:
|
|
278294
|
-
tablePos:
|
|
278309
|
+
cellPos: context.cellPos,
|
|
278310
|
+
tablePos: context.tablePos
|
|
278295
278311
|
};
|
|
278296
278312
|
}
|
|
278297
278313
|
function resolveCrossCellSelection(doc$12, anchorPos, headPos) {
|
|
278298
|
-
|
|
278299
|
-
|
|
278314
|
+
if (!doc$12)
|
|
278315
|
+
return null;
|
|
278316
|
+
let $anchorPos;
|
|
278317
|
+
let $headPos;
|
|
278318
|
+
try {
|
|
278319
|
+
$anchorPos = doc$12.resolve(anchorPos);
|
|
278320
|
+
$headPos = doc$12.resolve(headPos);
|
|
278321
|
+
} catch {
|
|
278322
|
+
return null;
|
|
278323
|
+
}
|
|
278324
|
+
const anchor = resolveCellContextAtResolvedPos($anchorPos);
|
|
278325
|
+
const head = resolveCellContextAtResolvedPos($headPos);
|
|
278300
278326
|
if (!anchor || !head)
|
|
278301
278327
|
return null;
|
|
278302
|
-
if (anchor
|
|
278328
|
+
if (!inSameTable(anchor.$cell, head.$cell))
|
|
278303
278329
|
return null;
|
|
278304
278330
|
if (anchor.cellPos === head.cellPos)
|
|
278305
278331
|
return null;
|
|
@@ -322687,13 +322713,13 @@ menclose::after {
|
|
|
322687
322713
|
return;
|
|
322688
322714
|
console.log(...args$1);
|
|
322689
322715
|
}, 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, TRACKED_MARK_NAMES;
|
|
322690
|
-
var
|
|
322716
|
+
var init_src_Bvhjxf8i_es = __esm(() => {
|
|
322691
322717
|
init_rolldown_runtime_Bg48TavK_es();
|
|
322692
|
-
|
|
322718
|
+
init_SuperConverter_WQVqM0th_es();
|
|
322693
322719
|
init_jszip_C49i9kUs_es();
|
|
322694
322720
|
init_xml_js_CqGKpaft_es();
|
|
322695
322721
|
init_uuid_B2wVPhPi_es();
|
|
322696
|
-
|
|
322722
|
+
init_create_headless_toolbar_B8OXKxcw_es();
|
|
322697
322723
|
init_constants_D9qj59G2_es();
|
|
322698
322724
|
init_dist_B8HfvhaK_es();
|
|
322699
322725
|
init_unified_Dsuw2be5_es();
|
|
@@ -358478,11 +358504,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
358478
358504
|
]);
|
|
358479
358505
|
});
|
|
358480
358506
|
|
|
358481
|
-
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-
|
|
358507
|
+
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-CCLA6uFG.es.js
|
|
358482
358508
|
var DEFAULT_TEXT_ALIGN_OPTIONS, DEFAULT_LINE_HEIGHT_OPTIONS, DEFAULT_ZOOM_OPTIONS, DEFAULT_DOCUMENT_MODE_OPTIONS, DEFAULT_FONT_SIZE_OPTIONS, headlessToolbarConstants, 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, FONT_SIZE_OPTIONS;
|
|
358483
|
-
var
|
|
358484
|
-
|
|
358485
|
-
|
|
358509
|
+
var init_create_super_doc_ui_CCLA6uFG_es = __esm(() => {
|
|
358510
|
+
init_SuperConverter_WQVqM0th_es();
|
|
358511
|
+
init_create_headless_toolbar_B8OXKxcw_es();
|
|
358486
358512
|
DEFAULT_TEXT_ALIGN_OPTIONS = [
|
|
358487
358513
|
{
|
|
358488
358514
|
label: "Left",
|
|
@@ -358773,16 +358799,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
|
|
|
358773
358799
|
|
|
358774
358800
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
358775
358801
|
var init_super_editor_es = __esm(() => {
|
|
358776
|
-
|
|
358777
|
-
|
|
358802
|
+
init_src_Bvhjxf8i_es();
|
|
358803
|
+
init_SuperConverter_WQVqM0th_es();
|
|
358778
358804
|
init_jszip_C49i9kUs_es();
|
|
358779
358805
|
init_xml_js_CqGKpaft_es();
|
|
358780
|
-
|
|
358806
|
+
init_create_headless_toolbar_B8OXKxcw_es();
|
|
358781
358807
|
init_constants_D9qj59G2_es();
|
|
358782
358808
|
init_dist_B8HfvhaK_es();
|
|
358783
358809
|
init_unified_Dsuw2be5_es();
|
|
358784
358810
|
init_DocxZipper_FUsfThjV_es();
|
|
358785
|
-
|
|
358811
|
+
init_create_super_doc_ui_CCLA6uFG_es();
|
|
358786
358812
|
init_ui_C5PAS9hY_es();
|
|
358787
358813
|
init_eventemitter3_BnGqBE_Q_es();
|
|
358788
358814
|
init_errors_CNaD6vcg_es();
|