@superdoc-dev/cli 0.5.0-next.69 → 0.5.0-next.70
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 +30 -7
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -204645,7 +204645,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
204645
204645
|
init_remark_gfm_BhnWr3yf_es();
|
|
204646
204646
|
});
|
|
204647
204647
|
|
|
204648
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
204648
|
+
// ../../packages/superdoc/dist/chunks/src-B4IUhaj4.es.js
|
|
204649
204649
|
function deleteProps(obj, propOrProps) {
|
|
204650
204650
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
204651
204651
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -248938,6 +248938,7 @@ function layoutDocument(blocks2, measures, options = {}) {
|
|
|
248938
248938
|
let activeColumns = cloneColumnLayout(options.columns);
|
|
248939
248939
|
let pendingColumns = null;
|
|
248940
248940
|
const allowParagraphlessAnchoredTableFallback = options.allowParagraphlessAnchoredTableFallback !== false;
|
|
248941
|
+
const allowSectionBreakOnlyPageFallback = options.allowSectionBreakOnlyPageFallback !== false;
|
|
248941
248942
|
let activeOrientation = null;
|
|
248942
248943
|
let pendingOrientation = null;
|
|
248943
248944
|
let activeVAlign = null;
|
|
@@ -249171,6 +249172,7 @@ function layoutDocument(blocks2, measures, options = {}) {
|
|
|
249171
249172
|
let pageCount = 0;
|
|
249172
249173
|
let activeNumberFormat = "decimal";
|
|
249173
249174
|
let activePageCounter = 1;
|
|
249175
|
+
let activeSectionPageCounterStart = activePageCounter;
|
|
249174
249176
|
let pendingNumbering = null;
|
|
249175
249177
|
const normalizeRefs = (refs) => refs && Object.keys(refs).length > 0 ? refs : undefined;
|
|
249176
249178
|
const mergeSectionRefs = (base5, next2) => {
|
|
@@ -249189,8 +249191,10 @@ function layoutDocument(blocks2, measures, options = {}) {
|
|
|
249189
249191
|
const initialSectionMetadata = sectionMetadataList[0];
|
|
249190
249192
|
if (initialSectionMetadata?.numbering?.format)
|
|
249191
249193
|
activeNumberFormat = initialSectionMetadata.numbering.format;
|
|
249192
|
-
if (typeof initialSectionMetadata?.numbering?.start === "number")
|
|
249194
|
+
if (typeof initialSectionMetadata?.numbering?.start === "number") {
|
|
249193
249195
|
activePageCounter = initialSectionMetadata.numbering.start;
|
|
249196
|
+
activeSectionPageCounterStart = activePageCounter;
|
|
249197
|
+
}
|
|
249194
249198
|
let activeSectionRefs = null;
|
|
249195
249199
|
let pendingSectionRefs = null;
|
|
249196
249200
|
if (initialSectionMetadata?.headerRefs || initialSectionMetadata?.footerRefs)
|
|
@@ -249222,6 +249226,7 @@ function layoutDocument(blocks2, measures, options = {}) {
|
|
|
249222
249226
|
onNewPage: (state) => {
|
|
249223
249227
|
if (!state) {
|
|
249224
249228
|
const isEnteringNewSection = pendingSectionIndex !== null;
|
|
249229
|
+
const isApplyingPendingSection = pendingTopMargin !== null || pendingBottomMargin !== null || pendingLeftMargin !== null || pendingRightMargin !== null || pendingHeaderDistance !== null || pendingFooterDistance !== null || pendingPageSize !== null || pendingColumns !== null || pendingOrientation !== null || pendingNumbering !== null || pendingSectionRefs !== null || pendingSectionIndex !== null || pendingVAlign !== undefined || pendingSectionBaseTopMargin !== null || pendingSectionBaseBottomMargin !== null;
|
|
249225
249230
|
const applied = applyPendingToActive({
|
|
249226
249231
|
activeTopMargin,
|
|
249227
249232
|
activeBottomMargin,
|
|
@@ -249296,6 +249301,8 @@ function layoutDocument(blocks2, measures, options = {}) {
|
|
|
249296
249301
|
activeSectionBaseBottomMargin = pendingSectionBaseBottomMargin;
|
|
249297
249302
|
pendingSectionBaseBottomMargin = null;
|
|
249298
249303
|
}
|
|
249304
|
+
if (isApplyingPendingSection)
|
|
249305
|
+
activeSectionPageCounterStart = activePageCounter;
|
|
249299
249306
|
pageCount += 1;
|
|
249300
249307
|
const newPageNumber = pageCount;
|
|
249301
249308
|
if (isEnteringNewSection || !sectionFirstPageNumbers.has(activeSectionIndex))
|
|
@@ -249602,16 +249609,20 @@ function layoutDocument(blocks2, measures, options = {}) {
|
|
|
249602
249609
|
if (isFirstSection) {
|
|
249603
249610
|
if (sectionMetadata.numbering.format)
|
|
249604
249611
|
activeNumberFormat = sectionMetadata.numbering.format;
|
|
249605
|
-
if (typeof sectionMetadata.numbering.start === "number")
|
|
249612
|
+
if (typeof sectionMetadata.numbering.start === "number") {
|
|
249606
249613
|
activePageCounter = sectionMetadata.numbering.start;
|
|
249614
|
+
activeSectionPageCounterStart = activePageCounter;
|
|
249615
|
+
}
|
|
249607
249616
|
} else
|
|
249608
249617
|
pendingNumbering = { ...sectionMetadata.numbering };
|
|
249609
249618
|
else if (effectiveBlock.numbering)
|
|
249610
249619
|
if (isFirstSection) {
|
|
249611
249620
|
if (effectiveBlock.numbering.format)
|
|
249612
249621
|
activeNumberFormat = effectiveBlock.numbering.format;
|
|
249613
|
-
if (typeof effectiveBlock.numbering.start === "number")
|
|
249622
|
+
if (typeof effectiveBlock.numbering.start === "number") {
|
|
249614
249623
|
activePageCounter = effectiveBlock.numbering.start;
|
|
249624
|
+
activeSectionPageCounterStart = activePageCounter;
|
|
249625
|
+
}
|
|
249615
249626
|
} else
|
|
249616
249627
|
pendingNumbering = { ...effectiveBlock.numbering };
|
|
249617
249628
|
if (breakInfo.forceMidPageRegion && updatedState.pendingColumns) {
|
|
@@ -249917,6 +249928,13 @@ function layoutDocument(blocks2, measures, options = {}) {
|
|
|
249917
249928
|
throw new Error(`layoutDocument: unsupported block kind for ${block.id}`);
|
|
249918
249929
|
}
|
|
249919
249930
|
paginator.pruneTrailingEmptyPages();
|
|
249931
|
+
const resetPaginationStateForBlankPageFallback = () => {
|
|
249932
|
+
pageCount = 0;
|
|
249933
|
+
activePageCounter = activeSectionPageCounterStart;
|
|
249934
|
+
sectionFirstPageNumbers.clear();
|
|
249935
|
+
};
|
|
249936
|
+
if (pages.length === 0 && (allowParagraphlessAnchoredTableFallback && paragraphlessAnchoredTables.length > 0 || allowSectionBreakOnlyPageFallback && hasOnlySectionBreakBlocks(blocks2)))
|
|
249937
|
+
resetPaginationStateForBlankPageFallback();
|
|
249920
249938
|
if (allowParagraphlessAnchoredTableFallback && pages.length === 0 && paragraphlessAnchoredTables.length > 0) {
|
|
249921
249939
|
const state = paginator.ensurePage();
|
|
249922
249940
|
for (const { block: tableBlock, measure: tableMeasure } of paragraphlessAnchoredTables) {
|
|
@@ -249931,6 +249949,8 @@ function layoutDocument(blocks2, measures, options = {}) {
|
|
|
249931
249949
|
placedAnchoredTableIds.add(tableBlock.id);
|
|
249932
249950
|
}
|
|
249933
249951
|
}
|
|
249952
|
+
if (allowSectionBreakOnlyPageFallback && pages.length === 0 && hasOnlySectionBreakBlocks(blocks2))
|
|
249953
|
+
paginator.ensurePage();
|
|
249934
249954
|
for (const page of pages) {
|
|
249935
249955
|
if (!page.vAlign || page.vAlign === "top")
|
|
249936
249956
|
continue;
|
|
@@ -250087,7 +250107,8 @@ function layoutHeaderFooter(blocks2, measures, constraints, kind) {
|
|
|
250087
250107
|
bottom: 0,
|
|
250088
250108
|
left: 0
|
|
250089
250109
|
},
|
|
250090
|
-
allowParagraphlessAnchoredTableFallback: false
|
|
250110
|
+
allowParagraphlessAnchoredTableFallback: false,
|
|
250111
|
+
allowSectionBreakOnlyPageFallback: false
|
|
250091
250112
|
});
|
|
250092
250113
|
if (kind === "footer" && constraints.pageHeight != null)
|
|
250093
250114
|
normalizeFragmentsForRegion(layout.pages, blocks2, measures, kind, constraints);
|
|
@@ -278298,6 +278319,8 @@ var Node$13 = class Node$14 {
|
|
|
278298
278319
|
if (!state)
|
|
278299
278320
|
return true;
|
|
278300
278321
|
return state.page.fragments.length === 0 && state.columnIndex === 0 && Math.abs(state.cursorY - state.topMargin) <= PAGE_START_EPSILON;
|
|
278322
|
+
}, hasOnlySectionBreakBlocks = (blocks2) => {
|
|
278323
|
+
return blocks2.length > 0 && blocks2.every((block) => block.kind === "sectionBreak");
|
|
278301
278324
|
}, layoutDebugEnabled$2, layoutLog = (...args$1) => {
|
|
278302
278325
|
if (!layoutDebugEnabled$2)
|
|
278303
278326
|
return;
|
|
@@ -287308,7 +287331,7 @@ var Node$13 = class Node$14 {
|
|
|
287308
287331
|
return;
|
|
287309
287332
|
console.log(...args$1);
|
|
287310
287333
|
}, 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;
|
|
287311
|
-
var
|
|
287334
|
+
var init_src_B4IUhaj4_es = __esm(() => {
|
|
287312
287335
|
init_rolldown_runtime_Bg48TavK_es();
|
|
287313
287336
|
init_SuperConverter_DKPcCGTm_es();
|
|
287314
287337
|
init_jszip_C49i9kUs_es();
|
|
@@ -321882,7 +321905,7 @@ var init_zipper_DbkgrypV_es = __esm(() => {
|
|
|
321882
321905
|
|
|
321883
321906
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
321884
321907
|
var init_super_editor_es = __esm(() => {
|
|
321885
|
-
|
|
321908
|
+
init_src_B4IUhaj4_es();
|
|
321886
321909
|
init_SuperConverter_DKPcCGTm_es();
|
|
321887
321910
|
init_jszip_C49i9kUs_es();
|
|
321888
321911
|
init_xml_js_CqGKpaft_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.5.0-next.
|
|
3
|
+
"version": "0.5.0-next.70",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"optionalDependencies": {
|
|
37
|
-
"@superdoc-dev/cli-darwin-arm64": "0.5.0-next.
|
|
38
|
-
"@superdoc-dev/cli-darwin-x64": "0.5.0-next.
|
|
39
|
-
"@superdoc-dev/cli-linux-x64": "0.5.0-next.
|
|
40
|
-
"@superdoc-dev/cli-linux-arm64": "0.5.0-next.
|
|
41
|
-
"@superdoc-dev/cli-windows-x64": "0.5.0-next.
|
|
37
|
+
"@superdoc-dev/cli-darwin-arm64": "0.5.0-next.70",
|
|
38
|
+
"@superdoc-dev/cli-darwin-x64": "0.5.0-next.70",
|
|
39
|
+
"@superdoc-dev/cli-linux-x64": "0.5.0-next.70",
|
|
40
|
+
"@superdoc-dev/cli-linux-arm64": "0.5.0-next.70",
|
|
41
|
+
"@superdoc-dev/cli-windows-x64": "0.5.0-next.70"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"predev": "node scripts/ensure-superdoc-build.js",
|