@superdoc-dev/cli 0.21.0 → 0.21.1
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 +105 -4
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -226940,7 +226940,7 @@ var init_remark_gfm_DCND_V_3_es = __esm(() => {
|
|
|
226940
226940
|
init_remark_gfm_BUJjZJLy_es();
|
|
226941
226941
|
});
|
|
226942
226942
|
|
|
226943
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
226943
|
+
// ../../packages/superdoc/dist/chunks/src-CA6yipr-.es.js
|
|
226944
226944
|
function deleteProps(obj, propOrProps) {
|
|
226945
226945
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
226946
226946
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -311703,6 +311703,95 @@ menclose::after {
|
|
|
311703
311703
|
ownIsEnd: boundary.ownIsEnd === undefined ? undefined : boundary.ownIsEnd && isLastSlice,
|
|
311704
311704
|
ownShowLabel: boundary.ownShowLabel === undefined ? undefined : boundary.ownShowLabel && isFirstSlice
|
|
311705
311705
|
};
|
|
311706
|
+
}, getCellBlockSegmentCount = (blockMeasure) => {
|
|
311707
|
+
if (blockMeasure.kind === "paragraph")
|
|
311708
|
+
return blockMeasure.lines?.length || 0;
|
|
311709
|
+
if (blockMeasure.kind === "table")
|
|
311710
|
+
return getEmbeddedTableSegmentCount(blockMeasure);
|
|
311711
|
+
if (blockMeasure.kind === "image" || blockMeasure.kind === "drawing")
|
|
311712
|
+
return blockMeasure.height > 0 ? 1 : 0;
|
|
311713
|
+
return 0;
|
|
311714
|
+
}, computeRenderedParagraphFlowHeight = (block, measure, localStartLine, localEndLine, isFirstBlock, isLastBlock, paddingTop) => {
|
|
311715
|
+
const lines = measure.lines ?? [];
|
|
311716
|
+
const renderedLocalEndLine = Math.min(localEndLine, lines.length);
|
|
311717
|
+
let renderedHeight = 0;
|
|
311718
|
+
for (let lineIdx = localStartLine;lineIdx < renderedLocalEndLine; lineIdx += 1)
|
|
311719
|
+
renderedHeight += lines[lineIdx]?.lineHeight ?? 0;
|
|
311720
|
+
const renderedEntireBlock = localStartLine === 0 && renderedLocalEndLine >= lines.length;
|
|
311721
|
+
if (renderedEntireBlock && measure.totalHeight && measure.totalHeight > renderedHeight)
|
|
311722
|
+
renderedHeight = measure.totalHeight;
|
|
311723
|
+
const beforeHeight = localStartLine === 0 ? effectiveTableCellSpacing(block.attrs?.spacing?.before, isFirstBlock, paddingTop) : 0;
|
|
311724
|
+
const spacingAfter = block.attrs?.spacing?.after;
|
|
311725
|
+
const afterHeight = renderedEntireBlock && !isLastBlock && typeof spacingAfter === "number" && spacingAfter > 0 ? spacingAfter : 0;
|
|
311726
|
+
return beforeHeight + renderedHeight + afterHeight;
|
|
311727
|
+
}, computeRenderedBlockFlowHeight = (block, blockMeasure, blockIndex, blockStartGlobal, blockEndGlobal, globalFromLine, globalToLine, blockCount, paddingTop) => {
|
|
311728
|
+
if (blockEndGlobal <= globalFromLine || blockStartGlobal >= globalToLine)
|
|
311729
|
+
return 0;
|
|
311730
|
+
if (blockMeasure.kind === "paragraph" && block.kind === "paragraph") {
|
|
311731
|
+
const blockLineCount = blockMeasure.lines?.length || 0;
|
|
311732
|
+
return computeRenderedParagraphFlowHeight(block, blockMeasure, Math.max(0, globalFromLine - blockStartGlobal), Math.min(blockLineCount, globalToLine - blockStartGlobal), blockIndex === 0, blockIndex === blockCount - 1, paddingTop);
|
|
311733
|
+
}
|
|
311734
|
+
if (blockMeasure.kind === "table")
|
|
311735
|
+
return computeCellVisibleHeight({
|
|
311736
|
+
blocks: [blockMeasure],
|
|
311737
|
+
width: 0,
|
|
311738
|
+
height: 0
|
|
311739
|
+
}, Math.max(0, globalFromLine - blockStartGlobal), Math.min(blockEndGlobal - blockStartGlobal, globalToLine - blockStartGlobal));
|
|
311740
|
+
if (blockMeasure.kind === "image" || blockMeasure.kind === "drawing") {
|
|
311741
|
+
if ((block.kind === "image" || block.kind === "drawing") && block.anchor?.isAnchored)
|
|
311742
|
+
return 0;
|
|
311743
|
+
return blockMeasure.height;
|
|
311744
|
+
}
|
|
311745
|
+
return 0;
|
|
311746
|
+
}, resolveCellAnchoredTop = (params$1) => {
|
|
311747
|
+
const offsetV = params$1.anchor?.offsetV ?? 0;
|
|
311748
|
+
const vRelativeFrom = params$1.anchor?.vRelativeFrom;
|
|
311749
|
+
if (vRelativeFrom !== undefined && vRelativeFrom !== "paragraph")
|
|
311750
|
+
return {
|
|
311751
|
+
top: offsetV,
|
|
311752
|
+
paragraphResolved: false
|
|
311753
|
+
};
|
|
311754
|
+
if (!params$1.anchorParagraphId)
|
|
311755
|
+
return {
|
|
311756
|
+
top: offsetV,
|
|
311757
|
+
paragraphResolved: false
|
|
311758
|
+
};
|
|
311759
|
+
let flowY = 0;
|
|
311760
|
+
let cumulativeLineCount = 0;
|
|
311761
|
+
const blockCount = Math.min(params$1.blockMeasures.length, params$1.cellBlocks.length);
|
|
311762
|
+
for (let i3 = 0;i3 < blockCount; i3 += 1) {
|
|
311763
|
+
const blockMeasure = params$1.blockMeasures[i3];
|
|
311764
|
+
const block = params$1.cellBlocks[i3];
|
|
311765
|
+
const blockSegmentCount = getCellBlockSegmentCount(blockMeasure);
|
|
311766
|
+
const blockStartGlobal = cumulativeLineCount;
|
|
311767
|
+
const blockEndGlobal = cumulativeLineCount + blockSegmentCount;
|
|
311768
|
+
if (block.kind === "paragraph" && block.id === params$1.anchorParagraphId) {
|
|
311769
|
+
if (blockStartGlobal < params$1.globalFromLine || blockStartGlobal >= params$1.globalToLine)
|
|
311770
|
+
return null;
|
|
311771
|
+
const firstLineHeight = blockMeasure.lines?.[0]?.lineHeight ?? 0;
|
|
311772
|
+
return {
|
|
311773
|
+
top: resolveAnchoredGraphicY({
|
|
311774
|
+
anchor: {
|
|
311775
|
+
vRelativeFrom,
|
|
311776
|
+
alignV: params$1.anchor?.alignV,
|
|
311777
|
+
offsetV
|
|
311778
|
+
},
|
|
311779
|
+
objectHeight: params$1.objectHeight,
|
|
311780
|
+
contentTop: 0,
|
|
311781
|
+
contentBottom: 0,
|
|
311782
|
+
anchorParagraphY: flowY,
|
|
311783
|
+
firstLineHeight
|
|
311784
|
+
}),
|
|
311785
|
+
paragraphResolved: true
|
|
311786
|
+
};
|
|
311787
|
+
}
|
|
311788
|
+
flowY += computeRenderedBlockFlowHeight(block, blockMeasure, i3, blockStartGlobal, blockEndGlobal, params$1.globalFromLine, params$1.globalToLine, blockCount, params$1.paddingTop);
|
|
311789
|
+
cumulativeLineCount = blockEndGlobal;
|
|
311790
|
+
}
|
|
311791
|
+
return {
|
|
311792
|
+
top: offsetV,
|
|
311793
|
+
paragraphResolved: false
|
|
311794
|
+
};
|
|
311706
311795
|
}, applyInlineStyles = (el, styles) => {
|
|
311707
311796
|
Object.entries(styles).forEach(([key2, value]) => {
|
|
311708
311797
|
if (value != null && value !== "" && key2 in el.style)
|
|
@@ -312047,7 +312136,19 @@ menclose::after {
|
|
|
312047
312136
|
const baseLeft = anchor.offsetH ?? 0;
|
|
312048
312137
|
const indentOffset = typeof tableIndent === "number" && Number.isFinite(tableIndent) ? tableIndent : 0;
|
|
312049
312138
|
const left$1 = anchor.hRelativeFrom === "column" ? baseLeft - x - indentOffset : baseLeft;
|
|
312050
|
-
const
|
|
312139
|
+
const resolvedTop = resolveCellAnchoredTop({
|
|
312140
|
+
anchor,
|
|
312141
|
+
anchorParagraphId: typeof anchoredBlock.attrs?.anchorParagraphId === "string" ? anchoredBlock.attrs.anchorParagraphId : undefined,
|
|
312142
|
+
cellBlocks,
|
|
312143
|
+
blockMeasures,
|
|
312144
|
+
globalFromLine,
|
|
312145
|
+
globalToLine,
|
|
312146
|
+
paddingTop,
|
|
312147
|
+
objectHeight
|
|
312148
|
+
});
|
|
312149
|
+
if (resolvedTop === null)
|
|
312150
|
+
continue;
|
|
312151
|
+
const top$1 = resolvedTop.top + (resolvedTop.paragraphResolved ? alignmentOffsetY : 0);
|
|
312051
312152
|
const behindDoc = anchor.behindDoc === true || anchoredBlock.wrap?.type === "None" && anchoredBlock.wrap?.behindDoc;
|
|
312052
312153
|
const zIndex = typeof anchoredBlock.zIndex === "number" ? anchoredBlock.zIndex : normalizeZIndex(anchoredBlock.attrs?.originalAttributes) ?? (behindDoc ? -1 : 1);
|
|
312053
312154
|
const wrap5 = anchoredBlock.wrap;
|
|
@@ -328060,7 +328161,7 @@ menclose::after {
|
|
|
328060
328161
|
return;
|
|
328061
328162
|
console.log(...args$1);
|
|
328062
328163
|
}, 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;
|
|
328063
|
-
var
|
|
328164
|
+
var init_src_CA6yipr_es = __esm(() => {
|
|
328064
328165
|
init_rolldown_runtime_Bg48TavK_es();
|
|
328065
328166
|
init_SuperConverter_SsIUcBUk_es();
|
|
328066
328167
|
init_jszip_C49i9kUs_es();
|
|
@@ -371668,7 +371769,7 @@ var init_zipper_BxRAi0_5_es = __esm(() => {
|
|
|
371668
371769
|
|
|
371669
371770
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
371670
371771
|
var init_super_editor_es = __esm(() => {
|
|
371671
|
-
|
|
371772
|
+
init_src_CA6yipr_es();
|
|
371672
371773
|
init_SuperConverter_SsIUcBUk_es();
|
|
371673
371774
|
init_jszip_C49i9kUs_es();
|
|
371674
371775
|
init_xml_js_CqGKpaft_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -26,21 +26,21 @@
|
|
|
26
26
|
"lib0": "^0.2.114",
|
|
27
27
|
"typescript": "^5.9.2",
|
|
28
28
|
"y-protocols": "^1.0.6",
|
|
29
|
-
"@superdoc-dev/sdk": "1.19.2",
|
|
30
29
|
"@superdoc/document-api": "0.1.0-alpha.0",
|
|
31
|
-
"@superdoc/
|
|
32
|
-
"superdoc": "1.44.0"
|
|
30
|
+
"@superdoc-dev/sdk": "1.20.0",
|
|
31
|
+
"superdoc": "1.44.0",
|
|
32
|
+
"@superdoc/super-editor": "0.0.1"
|
|
33
33
|
},
|
|
34
34
|
"module": "src/index.ts",
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
38
|
"optionalDependencies": {
|
|
39
|
-
"@superdoc-dev/cli-darwin-arm64": "0.21.
|
|
40
|
-
"@superdoc-dev/cli-
|
|
41
|
-
"@superdoc-dev/cli-linux-
|
|
42
|
-
"@superdoc-dev/cli-windows-x64": "0.21.
|
|
43
|
-
"@superdoc-dev/cli-
|
|
39
|
+
"@superdoc-dev/cli-darwin-arm64": "0.21.1",
|
|
40
|
+
"@superdoc-dev/cli-linux-x64": "0.21.1",
|
|
41
|
+
"@superdoc-dev/cli-linux-arm64": "0.21.1",
|
|
42
|
+
"@superdoc-dev/cli-windows-x64": "0.21.1",
|
|
43
|
+
"@superdoc-dev/cli-darwin-x64": "0.21.1"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"predev": "node scripts/ensure-superdoc-build.js",
|