@superdoc-dev/cli 0.15.0-next.3 → 0.15.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 +8 -8
package/dist/index.js
CHANGED
|
@@ -221759,7 +221759,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
221759
221759
|
init_remark_gfm_BhnWr3yf_es();
|
|
221760
221760
|
});
|
|
221761
221761
|
|
|
221762
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
221762
|
+
// ../../packages/superdoc/dist/chunks/src-B9A7ox0h.es.js
|
|
221763
221763
|
function deleteProps(obj, propOrProps) {
|
|
221764
221764
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
221765
221765
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -223148,6 +223148,29 @@ function checkLockViolation(sdtNodes, from$1, to) {
|
|
|
223148
223148
|
}
|
|
223149
223149
|
return { blocked: false };
|
|
223150
223150
|
}
|
|
223151
|
+
function isAtBlockSdtWrapperDeletePosition(state, sdt, pos) {
|
|
223152
|
+
if (sdt.type !== "structuredContentBlock")
|
|
223153
|
+
return false;
|
|
223154
|
+
const $pos = state.doc.resolve(pos);
|
|
223155
|
+
let sdtDepth = null;
|
|
223156
|
+
for (let depth = $pos.depth;depth > 0; depth -= 1)
|
|
223157
|
+
if ($pos.node(depth).type.name === "structuredContentBlock" && $pos.before(depth) === sdt.pos) {
|
|
223158
|
+
sdtDepth = depth;
|
|
223159
|
+
break;
|
|
223160
|
+
}
|
|
223161
|
+
if (sdtDepth == null)
|
|
223162
|
+
return false;
|
|
223163
|
+
const textblockDepth = sdtDepth + 1;
|
|
223164
|
+
if ($pos.depth < textblockDepth)
|
|
223165
|
+
return false;
|
|
223166
|
+
if (!$pos.node(textblockDepth).isTextblock)
|
|
223167
|
+
return false;
|
|
223168
|
+
if ($pos.node(textblockDepth).type.name !== "paragraph")
|
|
223169
|
+
return false;
|
|
223170
|
+
if ($pos.pos !== $pos.start(textblockDepth))
|
|
223171
|
+
return false;
|
|
223172
|
+
return $pos.before(textblockDepth) === $pos.start(sdtDepth);
|
|
223173
|
+
}
|
|
223151
223174
|
function createStructuredContentLockPlugin() {
|
|
223152
223175
|
return new Plugin({
|
|
223153
223176
|
key: STRUCTURED_CONTENT_LOCK_KEY,
|
|
@@ -223209,6 +223232,9 @@ function createStructuredContentLockPlugin() {
|
|
|
223209
223232
|
view.dispatch(state.tr.delete(emptyInlineSDT.pos, emptyInlineSDT.end));
|
|
223210
223233
|
return true;
|
|
223211
223234
|
}
|
|
223235
|
+
const blockSdtAtWrapperDeletePosition = sdtNodes.find((s2) => isAtBlockSdtWrapperDeletePosition(state, s2, from$1));
|
|
223236
|
+
if ((isBackspace || isDelete) && blockSdtAtWrapperDeletePosition)
|
|
223237
|
+
return false;
|
|
223212
223238
|
const inlineSdtAncestor = sdtNodes.find((s2) => s2.type === "structuredContent" && from$1 > s2.pos && from$1 < s2.end);
|
|
223213
223239
|
const inlineSdtContentEditable = inlineSdtAncestor && inlineSdtAncestor.lockMode !== "contentLocked" && inlineSdtAncestor.lockMode !== "sdtContentLocked";
|
|
223214
223240
|
if ((isBackspace || isDelete) && inlineSdtContentEditable && selection.$from.parent.type.name === "run") {
|
|
@@ -260342,7 +260368,7 @@ function getSdtSiblingBoundaries(containerKeys) {
|
|
|
260342
260368
|
};
|
|
260343
260369
|
});
|
|
260344
260370
|
}
|
|
260345
|
-
function applySdtContainerChrome(doc$12, container, sdt, containerSdt, boundaryOptions, options) {
|
|
260371
|
+
function applySdtContainerChrome(doc$12, container, sdt, containerSdt, boundaryOptions, options, chrome2) {
|
|
260346
260372
|
if (!shouldRenderSdtContainerChrome(sdt, containerSdt, options))
|
|
260347
260373
|
return false;
|
|
260348
260374
|
const metadata = getSdtContainerMetadata(sdt, containerSdt);
|
|
@@ -260364,6 +260390,8 @@ function applySdtContainerChrome(doc$12, container, sdt, containerSdt, boundaryO
|
|
|
260364
260390
|
container.style.setProperty("--sd-sdt-chrome-bottom-extension", `${boundaryOptions.paddingBottomOverride}px`);
|
|
260365
260391
|
}
|
|
260366
260392
|
if (boundaryOptions?.showLabel ?? isStart) {
|
|
260393
|
+
if (chrome2 === "none" && isStructuredContentMetadata(metadata))
|
|
260394
|
+
return true;
|
|
260367
260395
|
const labelEl = doc$12.createElement("div");
|
|
260368
260396
|
labelEl.className = config2.labelClassName;
|
|
260369
260397
|
const labelText = doc$12.createElement("span");
|
|
@@ -260663,7 +260691,7 @@ function computeCellVisibleHeight(cell2, cellFrom, cellTo) {
|
|
|
260663
260691
|
return cellVisHeight;
|
|
260664
260692
|
}
|
|
260665
260693
|
function renderPartialEmbeddedTable(params$1) {
|
|
260666
|
-
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;
|
|
260694
|
+
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;
|
|
260667
260695
|
const rowSegmentCounts = tableMeasure.rows.map((row2) => getEmbeddedRowSegmentCount(row2));
|
|
260668
260696
|
const totalTableSegments = rowSegmentCounts.reduce((s2, c) => s2 + c, 0);
|
|
260669
260697
|
const tableStartSegment = cumulativeLineCount;
|
|
@@ -260749,6 +260777,7 @@ function renderPartialEmbeddedTable(params$1) {
|
|
|
260749
260777
|
captureLineSnapshot,
|
|
260750
260778
|
renderDrawingContent,
|
|
260751
260779
|
applySdtDataset: applySdtDataset$1,
|
|
260780
|
+
chrome: chrome2,
|
|
260752
260781
|
fromRow: embeddedFromRow,
|
|
260753
260782
|
toRow: embeddedToRow,
|
|
260754
260783
|
partialRow: partialRowInfo,
|
|
@@ -300013,8 +300042,9 @@ var Node$13 = class Node$14 {
|
|
|
300013
300042
|
.superdoc-structured-content-block {
|
|
300014
300043
|
box-sizing: border-box;
|
|
300015
300044
|
border-radius: 4px;
|
|
300016
|
-
background-color:
|
|
300045
|
+
background-color: transparent;
|
|
300017
300046
|
position: relative;
|
|
300047
|
+
z-index: 0;
|
|
300018
300048
|
--sd-sdt-chrome-left: 0px;
|
|
300019
300049
|
--sd-sdt-chrome-width: 100%;
|
|
300020
300050
|
--sd-sdt-chrome-bottom-extension: 0px;
|
|
@@ -300028,7 +300058,9 @@ var Node$13 = class Node$14 {
|
|
|
300028
300058
|
bottom: calc(0px - var(--sd-sdt-chrome-bottom-extension, 0px));
|
|
300029
300059
|
width: var(--sd-sdt-chrome-width, 100%);
|
|
300030
300060
|
border-radius: inherit;
|
|
300061
|
+
background-color: var(--sd-content-controls-block-bg, transparent);
|
|
300031
300062
|
box-sizing: border-box;
|
|
300063
|
+
z-index: -1;
|
|
300032
300064
|
pointer-events: none;
|
|
300033
300065
|
}
|
|
300034
300066
|
|
|
@@ -300042,6 +300074,7 @@ var Node$13 = class Node$14 {
|
|
|
300042
300074
|
border: 1px solid transparent;
|
|
300043
300075
|
border-radius: inherit;
|
|
300044
300076
|
box-sizing: border-box;
|
|
300077
|
+
z-index: 1;
|
|
300045
300078
|
pointer-events: none;
|
|
300046
300079
|
}
|
|
300047
300080
|
|
|
@@ -300177,6 +300210,11 @@ var Node$13 = class Node$14 {
|
|
|
300177
300210
|
z-index: 10;
|
|
300178
300211
|
}
|
|
300179
300212
|
|
|
300213
|
+
.superdoc-structured-content-inline[data-contains-inline-image='true']:not([data-appearance='hidden']) {
|
|
300214
|
+
display: inline-block;
|
|
300215
|
+
vertical-align: top;
|
|
300216
|
+
}
|
|
300217
|
+
|
|
300180
300218
|
/* Hover effect for inline structured content */
|
|
300181
300219
|
.superdoc-structured-content-inline:not(.ProseMirror-selectednode):hover {
|
|
300182
300220
|
background-color: var(--sd-content-controls-inline-hover-bg, #f2f2f2);
|
|
@@ -300263,6 +300301,35 @@ var Node$13 = class Node$14 {
|
|
|
300263
300301
|
background-color: transparent;
|
|
300264
300302
|
}
|
|
300265
300303
|
|
|
300304
|
+
/* Global content-control chrome opt-out: preserve SDT wrappers/datasets while
|
|
300305
|
+
* suppressing built-in visual chrome on structured-content controls. Their
|
|
300306
|
+
* label elements are not emitted by renderer/helpers when this class is
|
|
300307
|
+
* present (DOM non-emission), and these rules neutralize
|
|
300308
|
+
* border/padding/hover/selection visuals. documentSection chrome (e.g. the
|
|
300309
|
+
* locked-section tooltip) is intentionally preserved and not in scope. */
|
|
300310
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-inline,
|
|
300311
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block {
|
|
300312
|
+
border: none;
|
|
300313
|
+
padding: 0;
|
|
300314
|
+
border-radius: 0;
|
|
300315
|
+
background: none;
|
|
300316
|
+
}
|
|
300317
|
+
|
|
300318
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-inline:hover,
|
|
300319
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block:hover,
|
|
300320
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block.sdt-group-hover,
|
|
300321
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block[data-lock-mode].sdt-group-hover,
|
|
300322
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-inline[data-lock-mode]:hover {
|
|
300323
|
+
border: none;
|
|
300324
|
+
background: none;
|
|
300325
|
+
}
|
|
300326
|
+
|
|
300327
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-inline.ProseMirror-selectednode,
|
|
300328
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block.ProseMirror-selectednode {
|
|
300329
|
+
border-color: transparent;
|
|
300330
|
+
background: none;
|
|
300331
|
+
}
|
|
300332
|
+
|
|
300266
300333
|
/* Hover highlight for SDT containers.
|
|
300267
300334
|
* Hover adds background highlight and z-index boost.
|
|
300268
300335
|
* Block SDTs use .sdt-group-hover class (event delegation for multi-fragment coordination).
|
|
@@ -300288,6 +300355,35 @@ var Node$13 = class Node$14 {
|
|
|
300288
300355
|
background-color: var(--sd-content-controls-lock-hover-bg, rgba(98, 155, 231, 0.08));
|
|
300289
300356
|
}
|
|
300290
300357
|
|
|
300358
|
+
/* Chrome opt-out for block SDTs. Main paints block chrome through ::before
|
|
300359
|
+
* (background) and ::after (border) pseudo-elements, which the element-level
|
|
300360
|
+
* .superdoc-cc-chrome-none rules above cannot reach. Suppress the pseudo
|
|
300361
|
+
* chrome directly, including the selected-node border and the lock-hover
|
|
300362
|
+
* ::before background. Declared after every chrome-showing pseudo rule so
|
|
300363
|
+
* source order resolves equal-specificity ties, the same way the
|
|
300364
|
+
* viewing-mode rules below do. */
|
|
300365
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block::before,
|
|
300366
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block:hover::before,
|
|
300367
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block.sdt-group-hover::before,
|
|
300368
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block[data-lock-mode].sdt-group-hover::before {
|
|
300369
|
+
background: none;
|
|
300370
|
+
}
|
|
300371
|
+
|
|
300372
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block::after,
|
|
300373
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block:hover::after,
|
|
300374
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block.sdt-group-hover::after,
|
|
300375
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block.ProseMirror-selectednode::after {
|
|
300376
|
+
border: none;
|
|
300377
|
+
}
|
|
300378
|
+
|
|
300379
|
+
/* Reset the lock-hover z-index boost so a suppressed SDT does not stack
|
|
300380
|
+
* above host-attached custom UI. Mirrors the base lock-hover selectors with
|
|
300381
|
+
* the chrome-none prefix so specificity stays above the boost rule. */
|
|
300382
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-block[data-lock-mode].sdt-group-hover:not(.ProseMirror-selectednode),
|
|
300383
|
+
.superdoc-cc-chrome-none .superdoc-structured-content-inline[data-lock-mode]:hover:not(.ProseMirror-selectednode, [data-appearance='hidden']) {
|
|
300384
|
+
z-index: auto;
|
|
300385
|
+
}
|
|
300386
|
+
|
|
300291
300387
|
/* Viewing mode: remove structured content affordances */
|
|
300292
300388
|
.presentation-editor--viewing .superdoc-structured-content-block,
|
|
300293
300389
|
.presentation-editor--viewing .superdoc-structured-content-inline {
|
|
@@ -300308,6 +300404,7 @@ var Node$13 = class Node$14 {
|
|
|
300308
300404
|
border: none;
|
|
300309
300405
|
}
|
|
300310
300406
|
|
|
300407
|
+
.presentation-editor--viewing .superdoc-structured-content-block::before,
|
|
300311
300408
|
.presentation-editor--viewing .superdoc-structured-content-block:hover::before,
|
|
300312
300409
|
.presentation-editor--viewing .superdoc-structured-content-block.sdt-group-hover::before,
|
|
300313
300410
|
.presentation-editor--viewing .superdoc-structured-content-block[data-lock-mode].sdt-group-hover::before {
|
|
@@ -300349,6 +300446,10 @@ var Node$13 = class Node$14 {
|
|
|
300349
300446
|
border: none;
|
|
300350
300447
|
}
|
|
300351
300448
|
|
|
300449
|
+
.superdoc-structured-content-block::before {
|
|
300450
|
+
background: none;
|
|
300451
|
+
}
|
|
300452
|
+
|
|
300352
300453
|
.superdoc-document-section__tooltip,
|
|
300353
300454
|
.superdoc-structured-content__label,
|
|
300354
300455
|
.superdoc-structured-content-inline__label {
|
|
@@ -301814,7 +301915,7 @@ menclose::after {
|
|
|
301814
301915
|
if (element3.style.textIndent)
|
|
301815
301916
|
element3.style.removeProperty("text-indent");
|
|
301816
301917
|
}, INLINE_SDT_CHROME_EXTRA_WIDTH_PX = 4, renderParagraphContent = (params$1) => {
|
|
301817
|
-
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;
|
|
301918
|
+
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;
|
|
301818
301919
|
applyParagraphBlockStyles(frameEl, block.attrs);
|
|
301819
301920
|
const { shadingLayer, borderLayer } = createParagraphDecorationLayers(doc$12, width, block.attrs, betweenInfo);
|
|
301820
301921
|
if (shadingLayer)
|
|
@@ -301835,7 +301936,7 @@ menclose::after {
|
|
|
301835
301936
|
ancestorContainerSdts
|
|
301836
301937
|
});
|
|
301837
301938
|
if (applySdtChrome) {
|
|
301838
|
-
if (applySdtContainerChrome(doc$12, frameEl, block.attrs?.sdt, block.attrs?.containerSdt, sdtBoundary))
|
|
301939
|
+
if (applySdtContainerChrome(doc$12, frameEl, block.attrs?.sdt, block.attrs?.containerSdt, sdtBoundary, undefined, contentControlsChrome))
|
|
301839
301940
|
onSdtContainerChrome?.();
|
|
301840
301941
|
}
|
|
301841
301942
|
renderParagraphDropCap({
|
|
@@ -302234,7 +302335,7 @@ menclose::after {
|
|
|
302234
302335
|
el.style[key2] = String(value);
|
|
302235
302336
|
});
|
|
302236
302337
|
}, renderEmbeddedTable = (params$1) => {
|
|
302237
|
-
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;
|
|
302338
|
+
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;
|
|
302238
302339
|
const effectiveFromRow = paramFromRow ?? 0;
|
|
302239
302340
|
const effectiveToRow = paramToRow ?? table2.rows.length;
|
|
302240
302341
|
const visibleHeight = computeVisibleHeight(measure.rows, effectiveFromRow, effectiveToRow, paramPartialRow);
|
|
@@ -302275,6 +302376,7 @@ menclose::after {
|
|
|
302275
302376
|
renderDrawingContent,
|
|
302276
302377
|
applyFragmentFrame,
|
|
302277
302378
|
applySdtDataset: applySdtDataset$1,
|
|
302379
|
+
chrome: chrome2,
|
|
302278
302380
|
applyStyles: applyInlineStyles,
|
|
302279
302381
|
sdtBoundary,
|
|
302280
302382
|
ancestorContainerKey,
|
|
@@ -302289,7 +302391,7 @@ menclose::after {
|
|
|
302289
302391
|
hasSdtContainerChrome
|
|
302290
302392
|
};
|
|
302291
302393
|
}, renderTableCell = (deps) => {
|
|
302292
|
-
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;
|
|
302394
|
+
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;
|
|
302293
302395
|
const padding = cell2?.attrs?.padding || {
|
|
302294
302396
|
top: 0,
|
|
302295
302397
|
left: 4,
|
|
@@ -302376,6 +302478,7 @@ menclose::after {
|
|
|
302376
302478
|
captureLineSnapshot,
|
|
302377
302479
|
renderDrawingContent,
|
|
302378
302480
|
applySdtDataset: applySdtDataset$1,
|
|
302481
|
+
chrome: chrome2,
|
|
302379
302482
|
sdtBoundary: sdtBoundaries[i4],
|
|
302380
302483
|
ancestorContainerKey,
|
|
302381
302484
|
ancestorContainerSdt,
|
|
@@ -302538,6 +302641,7 @@ menclose::after {
|
|
|
302538
302641
|
cellEl.style.overflow = "visible";
|
|
302539
302642
|
onSdtContainerChrome?.();
|
|
302540
302643
|
},
|
|
302644
|
+
contentControlsChrome: chrome2,
|
|
302541
302645
|
applySdtDataset: applySdtDataset$1,
|
|
302542
302646
|
renderLine: ({ block: block$1, line, lineIndex, isLastLine, resolvedListTextStartPx }) => renderLine$1(block$1, line, {
|
|
302543
302647
|
...context,
|
|
@@ -302715,7 +302819,7 @@ menclose::after {
|
|
|
302715
302819
|
left: baseBorders.left
|
|
302716
302820
|
};
|
|
302717
302821
|
}, renderTableRow = (deps) => {
|
|
302718
|
-
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;
|
|
302822
|
+
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;
|
|
302719
302823
|
const totalCols = columnWidths.length;
|
|
302720
302824
|
const calculateXPosition = (gridColumnStart) => {
|
|
302721
302825
|
let x = cellSpacingPx;
|
|
@@ -302801,12 +302905,13 @@ menclose::after {
|
|
|
302801
302905
|
toLine,
|
|
302802
302906
|
tableIndent,
|
|
302803
302907
|
isRtl,
|
|
302804
|
-
cellWidth: computedCellWidth > 0 ? computedCellWidth : undefined
|
|
302908
|
+
cellWidth: computedCellWidth > 0 ? computedCellWidth : undefined,
|
|
302909
|
+
chrome: chrome2
|
|
302805
302910
|
});
|
|
302806
302911
|
container.appendChild(cellElement);
|
|
302807
302912
|
}
|
|
302808
302913
|
}, renderTableFragment = (deps) => {
|
|
302809
|
-
const { doc: doc$12, fragment: fragment2, 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;
|
|
302914
|
+
const { doc: doc$12, fragment: fragment2, 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;
|
|
302810
302915
|
if (!doc$12) {
|
|
302811
302916
|
console.error("DomPainter: document is not available");
|
|
302812
302917
|
if (typeof document !== "undefined") {
|
|
@@ -302844,7 +302949,7 @@ menclose::after {
|
|
|
302844
302949
|
ancestorContainerSdt,
|
|
302845
302950
|
ancestorContainerKeys,
|
|
302846
302951
|
ancestorContainerSdts
|
|
302847
|
-
}))
|
|
302952
|
+
}, chrome2))
|
|
302848
302953
|
onSdtContainerChrome?.();
|
|
302849
302954
|
const tableContainerSdt = getSdtContainerMetadata(block.attrs?.sdt, block.attrs?.containerSdt);
|
|
302850
302955
|
const tableContainerKey = getSdtContainerKey(block.attrs?.sdt, block.attrs?.containerSdt);
|
|
@@ -302985,6 +303090,7 @@ menclose::after {
|
|
|
302985
303090
|
ancestorContainerKeys: nextAncestorContainerKeys,
|
|
302986
303091
|
ancestorContainerSdts: nextAncestorContainerSdts,
|
|
302987
303092
|
onSdtContainerChrome,
|
|
303093
|
+
chrome: chrome2,
|
|
302988
303094
|
continuesFromPrev: false,
|
|
302989
303095
|
continuesOnNext: false,
|
|
302990
303096
|
cellSpacingPx
|
|
@@ -303101,6 +303207,7 @@ menclose::after {
|
|
|
303101
303207
|
ancestorContainerKeys: nextAncestorContainerKeys,
|
|
303102
303208
|
ancestorContainerSdts: nextAncestorContainerSdts,
|
|
303103
303209
|
onSdtContainerChrome,
|
|
303210
|
+
chrome: chrome2,
|
|
303104
303211
|
continuesFromPrev: isFirstRenderedBodyRow && fragment2.continuesFromPrev === true,
|
|
303105
303212
|
continuesOnNext: isLastRenderedBodyRow && fragment2.continuesOnNext === true,
|
|
303106
303213
|
partialRow: partialRowData,
|
|
@@ -303241,6 +303348,8 @@ menclose::after {
|
|
|
303241
303348
|
wrapper.dataset.appearance = "hidden";
|
|
303242
303349
|
return wrapper;
|
|
303243
303350
|
}
|
|
303351
|
+
if (context.contentControlsChrome === "none")
|
|
303352
|
+
return wrapper;
|
|
303244
303353
|
const alias = sdt?.alias || "Inline content";
|
|
303245
303354
|
const labelEl = context.doc.createElement("span");
|
|
303246
303355
|
labelEl.className = DOM_CLASS_NAMES.INLINE_SDT_LABEL;
|
|
@@ -303320,7 +303429,7 @@ menclose::after {
|
|
|
303320
303429
|
else
|
|
303321
303430
|
delete el.dataset.continuesOnNext;
|
|
303322
303431
|
}, isMinimalWordLayout$2 = (value) => isMinimalWordLayout(value), renderParagraphFragment = (params$1) => {
|
|
303323
|
-
const { doc: doc$12, fragment: fragment2, sdtBoundary, betweenInfo, resolvedItem, applyStyles: applyStyles$3, applyResolvedFragmentFrame, applyFragmentFrame, applySdtDataset: applySdtDataset$1, applyContainerSdtDataset: applyContainerSdtDataset$1, renderLine: renderLine$1, captureLineSnapshot, createErrorPlaceholder } = params$1;
|
|
303432
|
+
const { doc: doc$12, fragment: fragment2, sdtBoundary, betweenInfo, resolvedItem, applyStyles: applyStyles$3, applyResolvedFragmentFrame, applyFragmentFrame, applySdtDataset: applySdtDataset$1, applyContainerSdtDataset: applyContainerSdtDataset$1, renderLine: renderLine$1, captureLineSnapshot, createErrorPlaceholder, contentControlsChrome } = params$1;
|
|
303324
303433
|
try {
|
|
303325
303434
|
if (!doc$12)
|
|
303326
303435
|
throw new Error("DomPainter: document is not available");
|
|
@@ -303387,7 +303496,8 @@ menclose::after {
|
|
|
303387
303496
|
wrapperEl: fragmentEl
|
|
303388
303497
|
});
|
|
303389
303498
|
},
|
|
303390
|
-
sourceAnchor: resolvedItem?.sourceAnchor
|
|
303499
|
+
sourceAnchor: resolvedItem?.sourceAnchor,
|
|
303500
|
+
contentControlsChrome
|
|
303391
303501
|
});
|
|
303392
303502
|
return fragmentEl;
|
|
303393
303503
|
} catch (error3) {
|
|
@@ -304649,6 +304759,8 @@ menclose::after {
|
|
|
304649
304759
|
geoSdtWrapper.style.top = "0px";
|
|
304650
304760
|
geoSdtWrapper.style.height = `${line.lineHeight}px`;
|
|
304651
304761
|
}
|
|
304762
|
+
if (isImageRun$1(runForSdt))
|
|
304763
|
+
geoSdtWrapper.dataset.containsInlineImage = "true";
|
|
304652
304764
|
runContext.syncInlineSdtWrapperTypography(geoSdtWrapper, runForSdt);
|
|
304653
304765
|
elem.style.left = `${elemLeftPx - geoSdtWrapperLeft}px`;
|
|
304654
304766
|
geoSdtMaxRight = Math.max(geoSdtMaxRight, elemLeftPx + elemWidthPx);
|
|
@@ -304802,6 +304914,8 @@ menclose::after {
|
|
|
304802
304914
|
runContext.syncInlineSdtWrapperTypography(currentInlineSdtWrapper, run2);
|
|
304803
304915
|
currentInlineSdtId = runSdtId;
|
|
304804
304916
|
}
|
|
304917
|
+
if (isImageRun$1(run2))
|
|
304918
|
+
currentInlineSdtWrapper.dataset.containsInlineImage = "true";
|
|
304805
304919
|
runContext.expandSdtWrapperPmRange(currentInlineSdtWrapper, run2.pmStart, run2.pmEnd);
|
|
304806
304920
|
currentInlineSdtWrapper.appendChild(elem);
|
|
304807
304921
|
} else
|
|
@@ -305029,12 +305143,14 @@ menclose::after {
|
|
|
305029
305143
|
this.mountedPageIndices = [];
|
|
305030
305144
|
this.resolvedLayout = null;
|
|
305031
305145
|
this.showFormattingMarks = false;
|
|
305146
|
+
this.contentControlsChrome = "default";
|
|
305032
305147
|
this.options = options;
|
|
305033
305148
|
this.layoutMode = options.layoutMode ?? "vertical";
|
|
305034
305149
|
this.isSemanticFlow = (options.flowMode ?? "paginated") === "semantic";
|
|
305035
305150
|
this.headerProvider = options.headerProvider;
|
|
305036
305151
|
this.footerProvider = options.footerProvider;
|
|
305037
305152
|
this.showFormattingMarks = options.showFormattingMarks === true;
|
|
305153
|
+
this.contentControlsChrome = options.contentControlsChrome ?? "default";
|
|
305038
305154
|
const defaultGap = this.layoutMode === "horizontal" ? 20 : 24;
|
|
305039
305155
|
this.pageGap = typeof options.pageGap === "number" && Number.isFinite(options.pageGap) ? Math.max(0, options.pageGap) : defaultGap;
|
|
305040
305156
|
if (!this.isSemanticFlow && this.layoutMode === "vertical" && options.virtualization?.enabled) {
|
|
@@ -305065,6 +305181,7 @@ menclose::after {
|
|
|
305065
305181
|
}
|
|
305066
305182
|
applyFormattingMarksClass(mount = this.mount) {
|
|
305067
305183
|
mount?.classList.toggle("superdoc-show-formatting-marks", this.showFormattingMarks);
|
|
305184
|
+
mount?.classList.toggle("superdoc-cc-chrome-none", this.contentControlsChrome === "none");
|
|
305068
305185
|
}
|
|
305069
305186
|
invalidateRenderedContent() {
|
|
305070
305187
|
this.pageStates = [];
|
|
@@ -306195,6 +306312,7 @@ menclose::after {
|
|
|
306195
306312
|
sourceAnchor: options?.sourceAnchor
|
|
306196
306313
|
});
|
|
306197
306314
|
},
|
|
306315
|
+
contentControlsChrome: this.contentControlsChrome,
|
|
306198
306316
|
createErrorPlaceholder: this.createErrorPlaceholder.bind(this)
|
|
306199
306317
|
});
|
|
306200
306318
|
}
|
|
@@ -306929,6 +307047,7 @@ menclose::after {
|
|
|
306929
307047
|
measure: tableRenderData.measure,
|
|
306930
307048
|
cellSpacingPx: tableRenderData.cellSpacingPx,
|
|
306931
307049
|
effectiveColumnWidths: tableRenderData.effectiveColumnWidths,
|
|
307050
|
+
chrome: this.contentControlsChrome,
|
|
306932
307051
|
sdtBoundary,
|
|
306933
307052
|
renderLine: renderLineForTableCell,
|
|
306934
307053
|
captureLineSnapshot: (lineEl, lineContext, options) => {
|
|
@@ -306982,6 +307101,7 @@ menclose::after {
|
|
|
306982
307101
|
doc: this.doc,
|
|
306983
307102
|
layoutEpoch: this.layoutEpoch,
|
|
306984
307103
|
showFormattingMarks: this.showFormattingMarks,
|
|
307104
|
+
contentControlsChrome: this.contentControlsChrome,
|
|
306985
307105
|
pendingTooltips: this.pendingTooltips,
|
|
306986
307106
|
getNextLinkId: () => `superdoc-link-${++this.linkIdCounter}`,
|
|
306987
307107
|
applySdtDataset,
|
|
@@ -314269,26 +314389,6 @@ menclose::after {
|
|
|
314269
314389
|
const layoutState = this.#deps?.getLayoutState();
|
|
314270
314390
|
return calculateExtendedSelection(layoutState?.blocks ?? [], anchor, head, mode);
|
|
314271
314391
|
}
|
|
314272
|
-
#clampHeadAtIsolatingBoundary(doc$12, anchor, head) {
|
|
314273
|
-
const forward = head >= anchor;
|
|
314274
|
-
try {
|
|
314275
|
-
const $head = doc$12.resolve(head);
|
|
314276
|
-
let isolatingDepth = -1;
|
|
314277
|
-
for (let d = $head.depth;d > 0; d--) {
|
|
314278
|
-
const node3 = $head.node(d);
|
|
314279
|
-
if (node3.type.spec.isolating || node3.type.spec.tableRole === "table")
|
|
314280
|
-
isolatingDepth = d;
|
|
314281
|
-
}
|
|
314282
|
-
if (isolatingDepth > 0) {
|
|
314283
|
-
const boundary = forward ? $head.before(isolatingDepth) : $head.after(isolatingDepth);
|
|
314284
|
-
const near = Selection.near(doc$12.resolve(boundary), forward ? -1 : 1);
|
|
314285
|
-
if (near instanceof TextSelection)
|
|
314286
|
-
return near.head;
|
|
314287
|
-
return anchor;
|
|
314288
|
-
}
|
|
314289
|
-
} catch {}
|
|
314290
|
-
return head;
|
|
314291
|
-
}
|
|
314292
314392
|
#shouldUseCellSelection(currentTableHit) {
|
|
314293
314393
|
return shouldUseCellSelection(currentTableHit, this.#cellAnchor, this.#cellDragMode);
|
|
314294
314394
|
}
|
|
@@ -315426,8 +315526,7 @@ menclose::after {
|
|
|
315426
315526
|
return;
|
|
315427
315527
|
if (!useActiveSurfaceHitTest && isRenderedNoteBlockId(rawHit.blockId))
|
|
315428
315528
|
return;
|
|
315429
|
-
|
|
315430
|
-
if (!doc$12)
|
|
315529
|
+
if (!editor.state?.doc)
|
|
315431
315530
|
return;
|
|
315432
315531
|
this.#dragLastRawHit = rawHit;
|
|
315433
315532
|
const pageMounted = this.#deps.getPageElement(rawHit.pageIndex) != null;
|
|
@@ -315450,9 +315549,7 @@ menclose::after {
|
|
|
315450
315549
|
return;
|
|
315451
315550
|
}
|
|
315452
315551
|
const anchor = this.#dragAnchor;
|
|
315453
|
-
|
|
315454
|
-
if (!this.#cellAnchor)
|
|
315455
|
-
head = this.#clampHeadAtIsolatingBoundary(doc$12, anchor, head);
|
|
315552
|
+
const head = hit.pos;
|
|
315456
315553
|
const { selAnchor, selHead } = this.#calculateExtendedSelection(anchor, head, this.#dragExtensionMode);
|
|
315457
315554
|
try {
|
|
315458
315555
|
const tr = editor.state.tr.setSelection(TextSelection.create(editor.state.doc, selAnchor, selHead));
|
|
@@ -318777,7 +318874,7 @@ menclose::after {
|
|
|
318777
318874
|
return;
|
|
318778
318875
|
console.log(...args$1);
|
|
318779
318876
|
}, 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;
|
|
318780
|
-
var
|
|
318877
|
+
var init_src_B9A7ox0h_es = __esm(() => {
|
|
318781
318878
|
init_rolldown_runtime_Bg48TavK_es();
|
|
318782
318879
|
init_SuperConverter_C6hKp29w_es();
|
|
318783
318880
|
init_jszip_C49i9kUs_es();
|
|
@@ -346910,7 +347007,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
346910
347007
|
enableCommentsInViewing: options.layoutEngineOptions?.enableCommentsInViewing,
|
|
346911
347008
|
presence: validatedPresence,
|
|
346912
347009
|
showBookmarks: options.layoutEngineOptions?.showBookmarks ?? false,
|
|
346913
|
-
showFormattingMarks: options.layoutEngineOptions?.showFormattingMarks ?? false
|
|
347010
|
+
showFormattingMarks: options.layoutEngineOptions?.showFormattingMarks ?? false,
|
|
347011
|
+
contentControlsChrome: options.layoutEngineOptions?.contentControlsChrome
|
|
346914
347012
|
};
|
|
346915
347013
|
this.#trackedChangesOverrides = options.layoutEngineOptions?.trackedChanges;
|
|
346916
347014
|
this.#viewportHost = doc$12.createElement("div");
|
|
@@ -350361,7 +350459,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
350361
350459
|
footerProvider: this.#headerFooterSession?.footerDecorationProvider,
|
|
350362
350460
|
ruler: this.#layoutOptions.ruler,
|
|
350363
350461
|
pageGap: this.#layoutState.layout?.pageGap ?? effectiveGap,
|
|
350364
|
-
showFormattingMarks: this.#layoutOptions.showFormattingMarks ?? false
|
|
350462
|
+
showFormattingMarks: this.#layoutOptions.showFormattingMarks ?? false,
|
|
350463
|
+
contentControlsChrome: this.#layoutOptions.contentControlsChrome ?? "default"
|
|
350365
350464
|
});
|
|
350366
350465
|
const currentZoom = this.#layoutOptions.zoom ?? 1;
|
|
350367
350466
|
if (currentZoom !== 1)
|
|
@@ -353028,7 +353127,7 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
|
|
|
353028
353127
|
|
|
353029
353128
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
353030
353129
|
var init_super_editor_es = __esm(() => {
|
|
353031
|
-
|
|
353130
|
+
init_src_B9A7ox0h_es();
|
|
353032
353131
|
init_SuperConverter_C6hKp29w_es();
|
|
353033
353132
|
init_jszip_C49i9kUs_es();
|
|
353034
353133
|
init_xml_js_CqGKpaft_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.15.0-next.
|
|
3
|
+
"version": "0.15.0-next.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -26,19 +26,19 @@
|
|
|
26
26
|
"typescript": "^5.9.2",
|
|
27
27
|
"@superdoc/document-api": "0.0.1",
|
|
28
28
|
"@superdoc/pm-adapter": "0.0.0",
|
|
29
|
-
"superdoc": "
|
|
30
|
-
"
|
|
29
|
+
"@superdoc/super-editor": "0.0.1",
|
|
30
|
+
"superdoc": "1.37.0"
|
|
31
31
|
},
|
|
32
32
|
"module": "src/index.ts",
|
|
33
33
|
"publishConfig": {
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"optionalDependencies": {
|
|
37
|
-
"@superdoc-dev/cli-darwin-
|
|
38
|
-
"@superdoc-dev/cli-darwin-
|
|
39
|
-
"@superdoc-dev/cli-linux-
|
|
40
|
-
"@superdoc-dev/cli-linux-
|
|
41
|
-
"@superdoc-dev/cli-windows-x64": "0.15.0-next.
|
|
37
|
+
"@superdoc-dev/cli-darwin-x64": "0.15.0-next.5",
|
|
38
|
+
"@superdoc-dev/cli-darwin-arm64": "0.15.0-next.5",
|
|
39
|
+
"@superdoc-dev/cli-linux-x64": "0.15.0-next.5",
|
|
40
|
+
"@superdoc-dev/cli-linux-arm64": "0.15.0-next.5",
|
|
41
|
+
"@superdoc-dev/cli-windows-x64": "0.15.0-next.5"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"predev": "node scripts/ensure-superdoc-build.js",
|