@superdoc-dev/mcp 0.10.0-next.3 → 0.10.0-next.5
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 +142 -43
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -211378,7 +211378,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
211378
211378
|
init_remark_gfm_BhnWr3yf_es();
|
|
211379
211379
|
});
|
|
211380
211380
|
|
|
211381
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
211381
|
+
// ../../packages/superdoc/dist/chunks/src-B9A7ox0h.es.js
|
|
211382
211382
|
function deleteProps(obj, propOrProps) {
|
|
211383
211383
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
211384
211384
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -212767,6 +212767,29 @@ function checkLockViolation(sdtNodes, from$1, to) {
|
|
|
212767
212767
|
}
|
|
212768
212768
|
return { blocked: false };
|
|
212769
212769
|
}
|
|
212770
|
+
function isAtBlockSdtWrapperDeletePosition(state, sdt, pos) {
|
|
212771
|
+
if (sdt.type !== "structuredContentBlock")
|
|
212772
|
+
return false;
|
|
212773
|
+
const $pos = state.doc.resolve(pos);
|
|
212774
|
+
let sdtDepth = null;
|
|
212775
|
+
for (let depth = $pos.depth;depth > 0; depth -= 1)
|
|
212776
|
+
if ($pos.node(depth).type.name === "structuredContentBlock" && $pos.before(depth) === sdt.pos) {
|
|
212777
|
+
sdtDepth = depth;
|
|
212778
|
+
break;
|
|
212779
|
+
}
|
|
212780
|
+
if (sdtDepth == null)
|
|
212781
|
+
return false;
|
|
212782
|
+
const textblockDepth = sdtDepth + 1;
|
|
212783
|
+
if ($pos.depth < textblockDepth)
|
|
212784
|
+
return false;
|
|
212785
|
+
if (!$pos.node(textblockDepth).isTextblock)
|
|
212786
|
+
return false;
|
|
212787
|
+
if ($pos.node(textblockDepth).type.name !== "paragraph")
|
|
212788
|
+
return false;
|
|
212789
|
+
if ($pos.pos !== $pos.start(textblockDepth))
|
|
212790
|
+
return false;
|
|
212791
|
+
return $pos.before(textblockDepth) === $pos.start(sdtDepth);
|
|
212792
|
+
}
|
|
212770
212793
|
function createStructuredContentLockPlugin() {
|
|
212771
212794
|
return new Plugin({
|
|
212772
212795
|
key: STRUCTURED_CONTENT_LOCK_KEY,
|
|
@@ -212828,6 +212851,9 @@ function createStructuredContentLockPlugin() {
|
|
|
212828
212851
|
view.dispatch(state.tr.delete(emptyInlineSDT.pos, emptyInlineSDT.end));
|
|
212829
212852
|
return true;
|
|
212830
212853
|
}
|
|
212854
|
+
const blockSdtAtWrapperDeletePosition = sdtNodes.find((s2) => isAtBlockSdtWrapperDeletePosition(state, s2, from$1));
|
|
212855
|
+
if ((isBackspace || isDelete) && blockSdtAtWrapperDeletePosition)
|
|
212856
|
+
return false;
|
|
212831
212857
|
const inlineSdtAncestor = sdtNodes.find((s2) => s2.type === "structuredContent" && from$1 > s2.pos && from$1 < s2.end);
|
|
212832
212858
|
const inlineSdtContentEditable = inlineSdtAncestor && inlineSdtAncestor.lockMode !== "contentLocked" && inlineSdtAncestor.lockMode !== "sdtContentLocked";
|
|
212833
212859
|
if ((isBackspace || isDelete) && inlineSdtContentEditable && selection.$from.parent.type.name === "run") {
|
|
@@ -249828,7 +249854,7 @@ function getSdtSiblingBoundaries(containerKeys) {
|
|
|
249828
249854
|
};
|
|
249829
249855
|
});
|
|
249830
249856
|
}
|
|
249831
|
-
function applySdtContainerChrome(doc$12, container, sdt, containerSdt, boundaryOptions, options) {
|
|
249857
|
+
function applySdtContainerChrome(doc$12, container, sdt, containerSdt, boundaryOptions, options, chrome2) {
|
|
249832
249858
|
if (!shouldRenderSdtContainerChrome(sdt, containerSdt, options))
|
|
249833
249859
|
return false;
|
|
249834
249860
|
const metadata = getSdtContainerMetadata(sdt, containerSdt);
|
|
@@ -249850,6 +249876,8 @@ function applySdtContainerChrome(doc$12, container, sdt, containerSdt, boundaryO
|
|
|
249850
249876
|
container.style.setProperty("--sd-sdt-chrome-bottom-extension", `${boundaryOptions.paddingBottomOverride}px`);
|
|
249851
249877
|
}
|
|
249852
249878
|
if (boundaryOptions?.showLabel ?? isStart) {
|
|
249879
|
+
if (chrome2 === "none" && isStructuredContentMetadata(metadata))
|
|
249880
|
+
return true;
|
|
249853
249881
|
const labelEl = doc$12.createElement("div");
|
|
249854
249882
|
labelEl.className = config3.labelClassName;
|
|
249855
249883
|
const labelText = doc$12.createElement("span");
|
|
@@ -250149,7 +250177,7 @@ function computeCellVisibleHeight(cell2, cellFrom, cellTo) {
|
|
|
250149
250177
|
return cellVisHeight;
|
|
250150
250178
|
}
|
|
250151
250179
|
function renderPartialEmbeddedTable(params$1) {
|
|
250152
|
-
const { doc: doc$12, block, blockMeasure: tableMeasure, cumulativeLineCount, globalFromLine, globalToLine, contentWidthPx, context, renderLine: renderLine$1, captureLineSnapshot, renderDrawingContent, applySdtDataset: applySdtDataset$1, sdtBoundary, ancestorContainerKey, ancestorContainerSdt, ancestorContainerKeys, ancestorContainerSdts, onSdtContainerChrome } = params$1;
|
|
250180
|
+
const { doc: doc$12, block, blockMeasure: tableMeasure, cumulativeLineCount, globalFromLine, globalToLine, contentWidthPx, context, renderLine: renderLine$1, captureLineSnapshot, renderDrawingContent, applySdtDataset: applySdtDataset$1, chrome: chrome2, sdtBoundary, ancestorContainerKey, ancestorContainerSdt, ancestorContainerKeys, ancestorContainerSdts, onSdtContainerChrome } = params$1;
|
|
250153
250181
|
const rowSegmentCounts = tableMeasure.rows.map((row2) => getEmbeddedRowSegmentCount(row2));
|
|
250154
250182
|
const totalTableSegments = rowSegmentCounts.reduce((s2, c) => s2 + c, 0);
|
|
250155
250183
|
const tableStartSegment = cumulativeLineCount;
|
|
@@ -250235,6 +250263,7 @@ function renderPartialEmbeddedTable(params$1) {
|
|
|
250235
250263
|
captureLineSnapshot,
|
|
250236
250264
|
renderDrawingContent,
|
|
250237
250265
|
applySdtDataset: applySdtDataset$1,
|
|
250266
|
+
chrome: chrome2,
|
|
250238
250267
|
fromRow: embeddedFromRow,
|
|
250239
250268
|
toRow: embeddedToRow,
|
|
250240
250269
|
partialRow: partialRowInfo,
|
|
@@ -289499,8 +289528,9 @@ var Node$13 = class Node$14 {
|
|
|
289499
289528
|
.superdoc-structured-content-block {
|
|
289500
289529
|
box-sizing: border-box;
|
|
289501
289530
|
border-radius: 4px;
|
|
289502
|
-
background-color:
|
|
289531
|
+
background-color: transparent;
|
|
289503
289532
|
position: relative;
|
|
289533
|
+
z-index: 0;
|
|
289504
289534
|
--sd-sdt-chrome-left: 0px;
|
|
289505
289535
|
--sd-sdt-chrome-width: 100%;
|
|
289506
289536
|
--sd-sdt-chrome-bottom-extension: 0px;
|
|
@@ -289514,7 +289544,9 @@ var Node$13 = class Node$14 {
|
|
|
289514
289544
|
bottom: calc(0px - var(--sd-sdt-chrome-bottom-extension, 0px));
|
|
289515
289545
|
width: var(--sd-sdt-chrome-width, 100%);
|
|
289516
289546
|
border-radius: inherit;
|
|
289547
|
+
background-color: var(--sd-content-controls-block-bg, transparent);
|
|
289517
289548
|
box-sizing: border-box;
|
|
289549
|
+
z-index: -1;
|
|
289518
289550
|
pointer-events: none;
|
|
289519
289551
|
}
|
|
289520
289552
|
|
|
@@ -289528,6 +289560,7 @@ var Node$13 = class Node$14 {
|
|
|
289528
289560
|
border: 1px solid transparent;
|
|
289529
289561
|
border-radius: inherit;
|
|
289530
289562
|
box-sizing: border-box;
|
|
289563
|
+
z-index: 1;
|
|
289531
289564
|
pointer-events: none;
|
|
289532
289565
|
}
|
|
289533
289566
|
|
|
@@ -289663,6 +289696,11 @@ var Node$13 = class Node$14 {
|
|
|
289663
289696
|
z-index: 10;
|
|
289664
289697
|
}
|
|
289665
289698
|
|
|
289699
|
+
.superdoc-structured-content-inline[data-contains-inline-image='true']:not([data-appearance='hidden']) {
|
|
289700
|
+
display: inline-block;
|
|
289701
|
+
vertical-align: top;
|
|
289702
|
+
}
|
|
289703
|
+
|
|
289666
289704
|
/* Hover effect for inline structured content */
|
|
289667
289705
|
.superdoc-structured-content-inline:not(.ProseMirror-selectednode):hover {
|
|
289668
289706
|
background-color: var(--sd-content-controls-inline-hover-bg, #f2f2f2);
|
|
@@ -289749,6 +289787,35 @@ var Node$13 = class Node$14 {
|
|
|
289749
289787
|
background-color: transparent;
|
|
289750
289788
|
}
|
|
289751
289789
|
|
|
289790
|
+
/* Global content-control chrome opt-out: preserve SDT wrappers/datasets while
|
|
289791
|
+
* suppressing built-in visual chrome on structured-content controls. Their
|
|
289792
|
+
* label elements are not emitted by renderer/helpers when this class is
|
|
289793
|
+
* present (DOM non-emission), and these rules neutralize
|
|
289794
|
+
* border/padding/hover/selection visuals. documentSection chrome (e.g. the
|
|
289795
|
+
* locked-section tooltip) is intentionally preserved and not in scope. */
|
|
289796
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-inline,
|
|
289797
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block {
|
|
289798
|
+
border: none;
|
|
289799
|
+
padding: 0;
|
|
289800
|
+
border-radius: 0;
|
|
289801
|
+
background: none;
|
|
289802
|
+
}
|
|
289803
|
+
|
|
289804
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-inline:hover,
|
|
289805
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block:hover,
|
|
289806
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block.sdt-group-hover,
|
|
289807
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block[data-lock-mode].sdt-group-hover,
|
|
289808
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-inline[data-lock-mode]:hover {
|
|
289809
|
+
border: none;
|
|
289810
|
+
background: none;
|
|
289811
|
+
}
|
|
289812
|
+
|
|
289813
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-inline.ProseMirror-selectednode,
|
|
289814
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block.ProseMirror-selectednode {
|
|
289815
|
+
border-color: transparent;
|
|
289816
|
+
background: none;
|
|
289817
|
+
}
|
|
289818
|
+
|
|
289752
289819
|
/* Hover highlight for SDT containers.
|
|
289753
289820
|
* Hover adds background highlight and z-index boost.
|
|
289754
289821
|
* Block SDTs use .sdt-group-hover class (event delegation for multi-fragment coordination).
|
|
@@ -289774,6 +289841,35 @@ var Node$13 = class Node$14 {
|
|
|
289774
289841
|
background-color: var(--sd-content-controls-lock-hover-bg, rgba(98, 155, 231, 0.08));
|
|
289775
289842
|
}
|
|
289776
289843
|
|
|
289844
|
+
/* Chrome opt-out for block SDTs. Main paints block chrome through ::before
|
|
289845
|
+
* (background) and ::after (border) pseudo-elements, which the element-level
|
|
289846
|
+
* .superdoc-cc-chrome-none rules above cannot reach. Suppress the pseudo
|
|
289847
|
+
* chrome directly, including the selected-node border and the lock-hover
|
|
289848
|
+
* ::before background. Declared after every chrome-showing pseudo rule so
|
|
289849
|
+
* source order resolves equal-specificity ties, the same way the
|
|
289850
|
+
* viewing-mode rules below do. */
|
|
289851
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block::before,
|
|
289852
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block:hover::before,
|
|
289853
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block.sdt-group-hover::before,
|
|
289854
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block[data-lock-mode].sdt-group-hover::before {
|
|
289855
|
+
background: none;
|
|
289856
|
+
}
|
|
289857
|
+
|
|
289858
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block::after,
|
|
289859
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block:hover::after,
|
|
289860
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block.sdt-group-hover::after,
|
|
289861
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block.ProseMirror-selectednode::after {
|
|
289862
|
+
border: none;
|
|
289863
|
+
}
|
|
289864
|
+
|
|
289865
|
+
/* Reset the lock-hover z-index boost so a suppressed SDT does not stack
|
|
289866
|
+
* above host-attached custom UI. Mirrors the base lock-hover selectors with
|
|
289867
|
+
* the chrome-none prefix so specificity stays above the boost rule. */
|
|
289868
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block[data-lock-mode].sdt-group-hover:not(.ProseMirror-selectednode),
|
|
289869
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-inline[data-lock-mode]:hover:not(.ProseMirror-selectednode, [data-appearance='hidden']) {
|
|
289870
|
+
z-index: auto;
|
|
289871
|
+
}
|
|
289872
|
+
|
|
289777
289873
|
/* Viewing mode: remove structured content affordances */
|
|
289778
289874
|
.presentation-editor--viewing .superdoc-structured-content-block,
|
|
289779
289875
|
.presentation-editor--viewing .superdoc-structured-content-inline {
|
|
@@ -289794,6 +289890,7 @@ var Node$13 = class Node$14 {
|
|
|
289794
289890
|
border: none;
|
|
289795
289891
|
}
|
|
289796
289892
|
|
|
289893
|
+
.presentation-editor--viewing .superdoc-structured-content-block::before,
|
|
289797
289894
|
.presentation-editor--viewing .superdoc-structured-content-block:hover::before,
|
|
289798
289895
|
.presentation-editor--viewing .superdoc-structured-content-block.sdt-group-hover::before,
|
|
289799
289896
|
.presentation-editor--viewing .superdoc-structured-content-block[data-lock-mode].sdt-group-hover::before {
|
|
@@ -289835,6 +289932,10 @@ var Node$13 = class Node$14 {
|
|
|
289835
289932
|
border: none;
|
|
289836
289933
|
}
|
|
289837
289934
|
|
|
289935
|
+
.superdoc-structured-content-block::before {
|
|
289936
|
+
background: none;
|
|
289937
|
+
}
|
|
289938
|
+
|
|
289838
289939
|
.superdoc-document-section__tooltip,
|
|
289839
289940
|
.superdoc-structured-content__label,
|
|
289840
289941
|
.superdoc-structured-content-inline__label {
|
|
@@ -291300,7 +291401,7 @@ menclose::after {
|
|
|
291300
291401
|
if (element3.style.textIndent)
|
|
291301
291402
|
element3.style.removeProperty("text-indent");
|
|
291302
291403
|
}, INLINE_SDT_CHROME_EXTRA_WIDTH_PX = 4, renderParagraphContent = (params$1) => {
|
|
291303
|
-
const { doc: doc$12, frameEl, block, measure, linesOverride, width, localStartLine, localEndLine, lineIndexOffset = 0, continuesFromPrev, continuesOnNext, resolvedContent, betweenInfo, sdtBoundary, spacingPolicy, ancestorContainerKey, ancestorContainerSdt, ancestorContainerKeys, ancestorContainerSdts, onSdtContainerChrome, applySdtDataset: applySdtDataset$1, applyContainerSdtDataset: applyContainerSdtDataset$1, renderDropCap: renderDropCap$1, lineTopOffset = 0 } = params$1;
|
|
291404
|
+
const { doc: doc$12, frameEl, block, measure, linesOverride, width, localStartLine, localEndLine, lineIndexOffset = 0, continuesFromPrev, continuesOnNext, resolvedContent, betweenInfo, sdtBoundary, spacingPolicy, ancestorContainerKey, ancestorContainerSdt, ancestorContainerKeys, ancestorContainerSdts, onSdtContainerChrome, applySdtDataset: applySdtDataset$1, applyContainerSdtDataset: applyContainerSdtDataset$1, contentControlsChrome, renderDropCap: renderDropCap$1, lineTopOffset = 0 } = params$1;
|
|
291304
291405
|
applyParagraphBlockStyles(frameEl, block.attrs);
|
|
291305
291406
|
const { shadingLayer, borderLayer } = createParagraphDecorationLayers(doc$12, width, block.attrs, betweenInfo);
|
|
291306
291407
|
if (shadingLayer)
|
|
@@ -291321,7 +291422,7 @@ menclose::after {
|
|
|
291321
291422
|
ancestorContainerSdts
|
|
291322
291423
|
});
|
|
291323
291424
|
if (applySdtChrome) {
|
|
291324
|
-
if (applySdtContainerChrome(doc$12, frameEl, block.attrs?.sdt, block.attrs?.containerSdt, sdtBoundary))
|
|
291425
|
+
if (applySdtContainerChrome(doc$12, frameEl, block.attrs?.sdt, block.attrs?.containerSdt, sdtBoundary, undefined, contentControlsChrome))
|
|
291325
291426
|
onSdtContainerChrome?.();
|
|
291326
291427
|
}
|
|
291327
291428
|
renderParagraphDropCap({
|
|
@@ -291720,7 +291821,7 @@ menclose::after {
|
|
|
291720
291821
|
el.style[key2] = String(value);
|
|
291721
291822
|
});
|
|
291722
291823
|
}, renderEmbeddedTable = (params$1) => {
|
|
291723
|
-
const { doc: doc$12, table: table2, measure, availableWidth, context, renderLine: renderLine$1, captureLineSnapshot, renderDrawingContent, applySdtDataset: applySdtDataset$1, fromRow: paramFromRow, toRow: paramToRow, partialRow: paramPartialRow, sdtBoundary, ancestorContainerKey, ancestorContainerSdt, ancestorContainerKeys, ancestorContainerSdts, onSdtContainerChrome } = params$1;
|
|
291824
|
+
const { doc: doc$12, table: table2, measure, availableWidth, context, renderLine: renderLine$1, captureLineSnapshot, renderDrawingContent, applySdtDataset: applySdtDataset$1, chrome: chrome2, fromRow: paramFromRow, toRow: paramToRow, partialRow: paramPartialRow, sdtBoundary, ancestorContainerKey, ancestorContainerSdt, ancestorContainerKeys, ancestorContainerSdts, onSdtContainerChrome } = params$1;
|
|
291724
291825
|
const effectiveFromRow = paramFromRow ?? 0;
|
|
291725
291826
|
const effectiveToRow = paramToRow ?? table2.rows.length;
|
|
291726
291827
|
const visibleHeight = computeVisibleHeight(measure.rows, effectiveFromRow, effectiveToRow, paramPartialRow);
|
|
@@ -291761,6 +291862,7 @@ menclose::after {
|
|
|
291761
291862
|
renderDrawingContent,
|
|
291762
291863
|
applyFragmentFrame,
|
|
291763
291864
|
applySdtDataset: applySdtDataset$1,
|
|
291865
|
+
chrome: chrome2,
|
|
291764
291866
|
applyStyles: applyInlineStyles,
|
|
291765
291867
|
sdtBoundary,
|
|
291766
291868
|
ancestorContainerKey,
|
|
@@ -291775,7 +291877,7 @@ menclose::after {
|
|
|
291775
291877
|
hasSdtContainerChrome
|
|
291776
291878
|
};
|
|
291777
291879
|
}, renderTableCell = (deps) => {
|
|
291778
|
-
const { doc: doc$12, x, y: y$1, rowHeight, cellMeasure, cell: cell2, borders, useDefaultBorder, renderLine: renderLine$1, captureLineSnapshot, renderDrawingContent, context, applySdtDataset: applySdtDataset$1, ancestorContainerKey, ancestorContainerSdt, ancestorContainerKeys, ancestorContainerSdts, onSdtContainerChrome, tableIndent, isRtl, cellWidth, fromLine, toLine } = deps;
|
|
291880
|
+
const { doc: doc$12, x, y: y$1, rowHeight, cellMeasure, cell: cell2, borders, useDefaultBorder, renderLine: renderLine$1, captureLineSnapshot, renderDrawingContent, context, applySdtDataset: applySdtDataset$1, chrome: chrome2, ancestorContainerKey, ancestorContainerSdt, ancestorContainerKeys, ancestorContainerSdts, onSdtContainerChrome, tableIndent, isRtl, cellWidth, fromLine, toLine } = deps;
|
|
291779
291881
|
const padding = cell2?.attrs?.padding || {
|
|
291780
291882
|
top: 0,
|
|
291781
291883
|
left: 4,
|
|
@@ -291862,6 +291964,7 @@ menclose::after {
|
|
|
291862
291964
|
captureLineSnapshot,
|
|
291863
291965
|
renderDrawingContent,
|
|
291864
291966
|
applySdtDataset: applySdtDataset$1,
|
|
291967
|
+
chrome: chrome2,
|
|
291865
291968
|
sdtBoundary: sdtBoundaries[i4],
|
|
291866
291969
|
ancestorContainerKey,
|
|
291867
291970
|
ancestorContainerSdt,
|
|
@@ -292024,6 +292127,7 @@ menclose::after {
|
|
|
292024
292127
|
cellEl.style.overflow = "visible";
|
|
292025
292128
|
onSdtContainerChrome?.();
|
|
292026
292129
|
},
|
|
292130
|
+
contentControlsChrome: chrome2,
|
|
292027
292131
|
applySdtDataset: applySdtDataset$1,
|
|
292028
292132
|
renderLine: ({ block: block$1, line, lineIndex, isLastLine, resolvedListTextStartPx }) => renderLine$1(block$1, line, {
|
|
292029
292133
|
...context,
|
|
@@ -292201,7 +292305,7 @@ menclose::after {
|
|
|
292201
292305
|
left: baseBorders.left
|
|
292202
292306
|
};
|
|
292203
292307
|
}, renderTableRow = (deps) => {
|
|
292204
|
-
const { doc: doc$12, container, rowIndex, y: y$1, rowMeasure, row: row2, totalRows, tableBorders, columnWidths, allRowHeights, tableIndent, isRtl, context, renderLine: renderLine$1, captureLineSnapshot, renderDrawingContent, applySdtDataset: applySdtDataset$1, ancestorContainerKey, ancestorContainerSdt, ancestorContainerKeys, ancestorContainerSdts, onSdtContainerChrome, continuesFromPrev, continuesOnNext, partialRow, cellSpacingPx = 0 } = deps;
|
|
292308
|
+
const { doc: doc$12, container, rowIndex, y: y$1, rowMeasure, row: row2, totalRows, tableBorders, columnWidths, allRowHeights, tableIndent, isRtl, context, renderLine: renderLine$1, captureLineSnapshot, renderDrawingContent, applySdtDataset: applySdtDataset$1, ancestorContainerKey, ancestorContainerSdt, ancestorContainerKeys, ancestorContainerSdts, onSdtContainerChrome, continuesFromPrev, continuesOnNext, partialRow, cellSpacingPx = 0, chrome: chrome2 } = deps;
|
|
292205
292309
|
const totalCols = columnWidths.length;
|
|
292206
292310
|
const calculateXPosition = (gridColumnStart) => {
|
|
292207
292311
|
let x = cellSpacingPx;
|
|
@@ -292287,12 +292391,13 @@ menclose::after {
|
|
|
292287
292391
|
toLine,
|
|
292288
292392
|
tableIndent,
|
|
292289
292393
|
isRtl,
|
|
292290
|
-
cellWidth: computedCellWidth > 0 ? computedCellWidth : undefined
|
|
292394
|
+
cellWidth: computedCellWidth > 0 ? computedCellWidth : undefined,
|
|
292395
|
+
chrome: chrome2
|
|
292291
292396
|
});
|
|
292292
292397
|
container.appendChild(cellElement);
|
|
292293
292398
|
}
|
|
292294
292399
|
}, renderTableFragment = (deps) => {
|
|
292295
|
-
const { doc: doc$12, fragment, block, measure, cellSpacingPx, effectiveColumnWidths, context, sdtBoundary, ancestorContainerKey, ancestorContainerSdt, ancestorContainerKeys, ancestorContainerSdts, onSdtContainerChrome, renderLine: renderLine$1, captureLineSnapshot, renderDrawingContent, applyFragmentFrame, applySdtDataset: applySdtDataset$1, applyContainerSdtDataset: applyContainerSdtDataset$1, applyStyles: applyStyles$3 } = deps;
|
|
292400
|
+
const { doc: doc$12, fragment, block, measure, cellSpacingPx, effectiveColumnWidths, chrome: chrome2, context, sdtBoundary, ancestorContainerKey, ancestorContainerSdt, ancestorContainerKeys, ancestorContainerSdts, onSdtContainerChrome, renderLine: renderLine$1, captureLineSnapshot, renderDrawingContent, applyFragmentFrame, applySdtDataset: applySdtDataset$1, applyContainerSdtDataset: applyContainerSdtDataset$1, applyStyles: applyStyles$3 } = deps;
|
|
292296
292401
|
if (!doc$12) {
|
|
292297
292402
|
console.error("DomPainter: document is not available");
|
|
292298
292403
|
if (typeof document !== "undefined") {
|
|
@@ -292330,7 +292435,7 @@ menclose::after {
|
|
|
292330
292435
|
ancestorContainerSdt,
|
|
292331
292436
|
ancestorContainerKeys,
|
|
292332
292437
|
ancestorContainerSdts
|
|
292333
|
-
}))
|
|
292438
|
+
}, chrome2))
|
|
292334
292439
|
onSdtContainerChrome?.();
|
|
292335
292440
|
const tableContainerSdt = getSdtContainerMetadata(block.attrs?.sdt, block.attrs?.containerSdt);
|
|
292336
292441
|
const tableContainerKey = getSdtContainerKey(block.attrs?.sdt, block.attrs?.containerSdt);
|
|
@@ -292471,6 +292576,7 @@ menclose::after {
|
|
|
292471
292576
|
ancestorContainerKeys: nextAncestorContainerKeys,
|
|
292472
292577
|
ancestorContainerSdts: nextAncestorContainerSdts,
|
|
292473
292578
|
onSdtContainerChrome,
|
|
292579
|
+
chrome: chrome2,
|
|
292474
292580
|
continuesFromPrev: false,
|
|
292475
292581
|
continuesOnNext: false,
|
|
292476
292582
|
cellSpacingPx
|
|
@@ -292587,6 +292693,7 @@ menclose::after {
|
|
|
292587
292693
|
ancestorContainerKeys: nextAncestorContainerKeys,
|
|
292588
292694
|
ancestorContainerSdts: nextAncestorContainerSdts,
|
|
292589
292695
|
onSdtContainerChrome,
|
|
292696
|
+
chrome: chrome2,
|
|
292590
292697
|
continuesFromPrev: isFirstRenderedBodyRow && fragment.continuesFromPrev === true,
|
|
292591
292698
|
continuesOnNext: isLastRenderedBodyRow && fragment.continuesOnNext === true,
|
|
292592
292699
|
partialRow: partialRowData,
|
|
@@ -292727,6 +292834,8 @@ menclose::after {
|
|
|
292727
292834
|
wrapper.dataset.appearance = "hidden";
|
|
292728
292835
|
return wrapper;
|
|
292729
292836
|
}
|
|
292837
|
+
if (context.contentControlsChrome === "none")
|
|
292838
|
+
return wrapper;
|
|
292730
292839
|
const alias = sdt?.alias || "Inline content";
|
|
292731
292840
|
const labelEl = context.doc.createElement("span");
|
|
292732
292841
|
labelEl.className = DOM_CLASS_NAMES.INLINE_SDT_LABEL;
|
|
@@ -292806,7 +292915,7 @@ menclose::after {
|
|
|
292806
292915
|
else
|
|
292807
292916
|
delete el.dataset.continuesOnNext;
|
|
292808
292917
|
}, isMinimalWordLayout$2 = (value) => isMinimalWordLayout(value), renderParagraphFragment = (params$1) => {
|
|
292809
|
-
const { doc: doc$12, fragment, sdtBoundary, betweenInfo, resolvedItem, applyStyles: applyStyles$3, applyResolvedFragmentFrame, applyFragmentFrame, applySdtDataset: applySdtDataset$1, applyContainerSdtDataset: applyContainerSdtDataset$1, renderLine: renderLine$1, captureLineSnapshot, createErrorPlaceholder } = params$1;
|
|
292918
|
+
const { doc: doc$12, fragment, sdtBoundary, betweenInfo, resolvedItem, applyStyles: applyStyles$3, applyResolvedFragmentFrame, applyFragmentFrame, applySdtDataset: applySdtDataset$1, applyContainerSdtDataset: applyContainerSdtDataset$1, renderLine: renderLine$1, captureLineSnapshot, createErrorPlaceholder, contentControlsChrome } = params$1;
|
|
292810
292919
|
try {
|
|
292811
292920
|
if (!doc$12)
|
|
292812
292921
|
throw new Error("DomPainter: document is not available");
|
|
@@ -292873,7 +292982,8 @@ menclose::after {
|
|
|
292873
292982
|
wrapperEl: fragmentEl
|
|
292874
292983
|
});
|
|
292875
292984
|
},
|
|
292876
|
-
sourceAnchor: resolvedItem?.sourceAnchor
|
|
292985
|
+
sourceAnchor: resolvedItem?.sourceAnchor,
|
|
292986
|
+
contentControlsChrome
|
|
292877
292987
|
});
|
|
292878
292988
|
return fragmentEl;
|
|
292879
292989
|
} catch (error48) {
|
|
@@ -294135,6 +294245,8 @@ menclose::after {
|
|
|
294135
294245
|
geoSdtWrapper.style.top = "0px";
|
|
294136
294246
|
geoSdtWrapper.style.height = `${line.lineHeight}px`;
|
|
294137
294247
|
}
|
|
294248
|
+
if (isImageRun$1(runForSdt))
|
|
294249
|
+
geoSdtWrapper.dataset.containsInlineImage = "true";
|
|
294138
294250
|
runContext.syncInlineSdtWrapperTypography(geoSdtWrapper, runForSdt);
|
|
294139
294251
|
elem.style.left = `${elemLeftPx - geoSdtWrapperLeft}px`;
|
|
294140
294252
|
geoSdtMaxRight = Math.max(geoSdtMaxRight, elemLeftPx + elemWidthPx);
|
|
@@ -294288,6 +294400,8 @@ menclose::after {
|
|
|
294288
294400
|
runContext.syncInlineSdtWrapperTypography(currentInlineSdtWrapper, run2);
|
|
294289
294401
|
currentInlineSdtId = runSdtId;
|
|
294290
294402
|
}
|
|
294403
|
+
if (isImageRun$1(run2))
|
|
294404
|
+
currentInlineSdtWrapper.dataset.containsInlineImage = "true";
|
|
294291
294405
|
runContext.expandSdtWrapperPmRange(currentInlineSdtWrapper, run2.pmStart, run2.pmEnd);
|
|
294292
294406
|
currentInlineSdtWrapper.appendChild(elem);
|
|
294293
294407
|
} else
|
|
@@ -294515,12 +294629,14 @@ menclose::after {
|
|
|
294515
294629
|
this.mountedPageIndices = [];
|
|
294516
294630
|
this.resolvedLayout = null;
|
|
294517
294631
|
this.showFormattingMarks = false;
|
|
294632
|
+
this.contentControlsChrome = "default";
|
|
294518
294633
|
this.options = options;
|
|
294519
294634
|
this.layoutMode = options.layoutMode ?? "vertical";
|
|
294520
294635
|
this.isSemanticFlow = (options.flowMode ?? "paginated") === "semantic";
|
|
294521
294636
|
this.headerProvider = options.headerProvider;
|
|
294522
294637
|
this.footerProvider = options.footerProvider;
|
|
294523
294638
|
this.showFormattingMarks = options.showFormattingMarks === true;
|
|
294639
|
+
this.contentControlsChrome = options.contentControlsChrome ?? "default";
|
|
294524
294640
|
const defaultGap = this.layoutMode === "horizontal" ? 20 : 24;
|
|
294525
294641
|
this.pageGap = typeof options.pageGap === "number" && Number.isFinite(options.pageGap) ? Math.max(0, options.pageGap) : defaultGap;
|
|
294526
294642
|
if (!this.isSemanticFlow && this.layoutMode === "vertical" && options.virtualization?.enabled) {
|
|
@@ -294551,6 +294667,7 @@ menclose::after {
|
|
|
294551
294667
|
}
|
|
294552
294668
|
applyFormattingMarksClass(mount = this.mount) {
|
|
294553
294669
|
mount?.classList.toggle("superdoc-show-formatting-marks", this.showFormattingMarks);
|
|
294670
|
+
mount?.classList.toggle("superdoc-cc-chrome-none", this.contentControlsChrome === "none");
|
|
294554
294671
|
}
|
|
294555
294672
|
invalidateRenderedContent() {
|
|
294556
294673
|
this.pageStates = [];
|
|
@@ -295681,6 +295798,7 @@ menclose::after {
|
|
|
295681
295798
|
sourceAnchor: options?.sourceAnchor
|
|
295682
295799
|
});
|
|
295683
295800
|
},
|
|
295801
|
+
contentControlsChrome: this.contentControlsChrome,
|
|
295684
295802
|
createErrorPlaceholder: this.createErrorPlaceholder.bind(this)
|
|
295685
295803
|
});
|
|
295686
295804
|
}
|
|
@@ -296415,6 +296533,7 @@ menclose::after {
|
|
|
296415
296533
|
measure: tableRenderData.measure,
|
|
296416
296534
|
cellSpacingPx: tableRenderData.cellSpacingPx,
|
|
296417
296535
|
effectiveColumnWidths: tableRenderData.effectiveColumnWidths,
|
|
296536
|
+
chrome: this.contentControlsChrome,
|
|
296418
296537
|
sdtBoundary,
|
|
296419
296538
|
renderLine: renderLineForTableCell,
|
|
296420
296539
|
captureLineSnapshot: (lineEl, lineContext, options) => {
|
|
@@ -296468,6 +296587,7 @@ menclose::after {
|
|
|
296468
296587
|
doc: this.doc,
|
|
296469
296588
|
layoutEpoch: this.layoutEpoch,
|
|
296470
296589
|
showFormattingMarks: this.showFormattingMarks,
|
|
296590
|
+
contentControlsChrome: this.contentControlsChrome,
|
|
296471
296591
|
pendingTooltips: this.pendingTooltips,
|
|
296472
296592
|
getNextLinkId: () => `superdoc-link-${++this.linkIdCounter}`,
|
|
296473
296593
|
applySdtDataset,
|
|
@@ -303755,26 +303875,6 @@ menclose::after {
|
|
|
303755
303875
|
const layoutState = this.#deps?.getLayoutState();
|
|
303756
303876
|
return calculateExtendedSelection(layoutState?.blocks ?? [], anchor, head, mode);
|
|
303757
303877
|
}
|
|
303758
|
-
#clampHeadAtIsolatingBoundary(doc$12, anchor, head) {
|
|
303759
|
-
const forward = head >= anchor;
|
|
303760
|
-
try {
|
|
303761
|
-
const $head = doc$12.resolve(head);
|
|
303762
|
-
let isolatingDepth = -1;
|
|
303763
|
-
for (let d = $head.depth;d > 0; d--) {
|
|
303764
|
-
const node2 = $head.node(d);
|
|
303765
|
-
if (node2.type.spec.isolating || node2.type.spec.tableRole === "table")
|
|
303766
|
-
isolatingDepth = d;
|
|
303767
|
-
}
|
|
303768
|
-
if (isolatingDepth > 0) {
|
|
303769
|
-
const boundary = forward ? $head.before(isolatingDepth) : $head.after(isolatingDepth);
|
|
303770
|
-
const near = Selection.near(doc$12.resolve(boundary), forward ? -1 : 1);
|
|
303771
|
-
if (near instanceof TextSelection)
|
|
303772
|
-
return near.head;
|
|
303773
|
-
return anchor;
|
|
303774
|
-
}
|
|
303775
|
-
} catch {}
|
|
303776
|
-
return head;
|
|
303777
|
-
}
|
|
303778
303878
|
#shouldUseCellSelection(currentTableHit) {
|
|
303779
303879
|
return shouldUseCellSelection(currentTableHit, this.#cellAnchor, this.#cellDragMode);
|
|
303780
303880
|
}
|
|
@@ -304912,8 +305012,7 @@ menclose::after {
|
|
|
304912
305012
|
return;
|
|
304913
305013
|
if (!useActiveSurfaceHitTest && isRenderedNoteBlockId(rawHit.blockId))
|
|
304914
305014
|
return;
|
|
304915
|
-
|
|
304916
|
-
if (!doc$12)
|
|
305015
|
+
if (!editor.state?.doc)
|
|
304917
305016
|
return;
|
|
304918
305017
|
this.#dragLastRawHit = rawHit;
|
|
304919
305018
|
const pageMounted = this.#deps.getPageElement(rawHit.pageIndex) != null;
|
|
@@ -304936,9 +305035,7 @@ menclose::after {
|
|
|
304936
305035
|
return;
|
|
304937
305036
|
}
|
|
304938
305037
|
const anchor = this.#dragAnchor;
|
|
304939
|
-
|
|
304940
|
-
if (!this.#cellAnchor)
|
|
304941
|
-
head = this.#clampHeadAtIsolatingBoundary(doc$12, anchor, head);
|
|
305038
|
+
const head = hit.pos;
|
|
304942
305039
|
const { selAnchor, selHead } = this.#calculateExtendedSelection(anchor, head, this.#dragExtensionMode);
|
|
304943
305040
|
try {
|
|
304944
305041
|
const tr = editor.state.tr.setSelection(TextSelection.create(editor.state.doc, selAnchor, selHead));
|
|
@@ -308263,7 +308360,7 @@ menclose::after {
|
|
|
308263
308360
|
return;
|
|
308264
308361
|
console.log(...args$1);
|
|
308265
308362
|
}, 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;
|
|
308266
|
-
var
|
|
308363
|
+
var init_src_B9A7ox0h_es = __esm(() => {
|
|
308267
308364
|
init_rolldown_runtime_Bg48TavK_es();
|
|
308268
308365
|
init_SuperConverter_C6hKp29w_es();
|
|
308269
308366
|
init_jszip_C49i9kUs_es();
|
|
@@ -336396,7 +336493,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
336396
336493
|
enableCommentsInViewing: options.layoutEngineOptions?.enableCommentsInViewing,
|
|
336397
336494
|
presence: validatedPresence,
|
|
336398
336495
|
showBookmarks: options.layoutEngineOptions?.showBookmarks ?? false,
|
|
336399
|
-
showFormattingMarks: options.layoutEngineOptions?.showFormattingMarks ?? false
|
|
336496
|
+
showFormattingMarks: options.layoutEngineOptions?.showFormattingMarks ?? false,
|
|
336497
|
+
contentControlsChrome: options.layoutEngineOptions?.contentControlsChrome
|
|
336400
336498
|
};
|
|
336401
336499
|
this.#trackedChangesOverrides = options.layoutEngineOptions?.trackedChanges;
|
|
336402
336500
|
this.#viewportHost = doc$12.createElement("div");
|
|
@@ -339847,7 +339945,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
339847
339945
|
footerProvider: this.#headerFooterSession?.footerDecorationProvider,
|
|
339848
339946
|
ruler: this.#layoutOptions.ruler,
|
|
339849
339947
|
pageGap: this.#layoutState.layout?.pageGap ?? effectiveGap,
|
|
339850
|
-
showFormattingMarks: this.#layoutOptions.showFormattingMarks ?? false
|
|
339948
|
+
showFormattingMarks: this.#layoutOptions.showFormattingMarks ?? false,
|
|
339949
|
+
contentControlsChrome: this.#layoutOptions.contentControlsChrome ?? "default"
|
|
339851
339950
|
});
|
|
339852
339951
|
const currentZoom = this.#layoutOptions.zoom ?? 1;
|
|
339853
339952
|
if (currentZoom !== 1)
|
|
@@ -342514,7 +342613,7 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
|
|
|
342514
342613
|
|
|
342515
342614
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
342516
342615
|
var init_super_editor_es = __esm(() => {
|
|
342517
|
-
|
|
342616
|
+
init_src_B9A7ox0h_es();
|
|
342518
342617
|
init_SuperConverter_C6hKp29w_es();
|
|
342519
342618
|
init_jszip_C49i9kUs_es();
|
|
342520
342619
|
init_xml_js_CqGKpaft_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/mcp",
|
|
3
|
-
"version": "0.10.0-next.
|
|
3
|
+
"version": "0.10.0-next.5",
|
|
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/document-api": "0.0.1",
|
|
22
23
|
"@superdoc/super-editor": "0.0.1",
|
|
23
|
-
"superdoc": "1.37.0"
|
|
24
|
-
"@superdoc/document-api": "0.0.1"
|
|
24
|
+
"superdoc": "1.37.0"
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|