@superdoc-dev/cli 0.5.0-next.66 → 0.5.0-next.67
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 +162 -77
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -204563,7 +204563,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
204563
204563
|
init_remark_gfm_BhnWr3yf_es();
|
|
204564
204564
|
});
|
|
204565
204565
|
|
|
204566
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
204566
|
+
// ../../packages/superdoc/dist/chunks/src-BzK2Ejl0.es.js
|
|
204567
204567
|
function deleteProps(obj, propOrProps) {
|
|
204568
204568
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
204569
204569
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -248040,6 +248040,32 @@ function createAnchoredTableFragment(block, measure, x, y$1) {
|
|
|
248040
248040
|
applyTableFragmentPmRange(fragment2, block, measure);
|
|
248041
248041
|
return fragment2;
|
|
248042
248042
|
}
|
|
248043
|
+
function buildParagraphIndexById(blocks2, len3) {
|
|
248044
|
+
const paragraphIndexById = /* @__PURE__ */ new Map;
|
|
248045
|
+
for (let i4 = 0;i4 < len3; i4 += 1) {
|
|
248046
|
+
const block = blocks2[i4];
|
|
248047
|
+
if (block.kind === "paragraph")
|
|
248048
|
+
paragraphIndexById.set(block.id, i4);
|
|
248049
|
+
}
|
|
248050
|
+
return paragraphIndexById;
|
|
248051
|
+
}
|
|
248052
|
+
function findNearestParagraphIndex(blocks2, len3, fromIndex) {
|
|
248053
|
+
for (let i4 = fromIndex - 1;i4 >= 0; i4 -= 1)
|
|
248054
|
+
if (blocks2[i4].kind === "paragraph")
|
|
248055
|
+
return i4;
|
|
248056
|
+
for (let i4 = fromIndex + 1;i4 < len3; i4 += 1)
|
|
248057
|
+
if (blocks2[i4].kind === "paragraph")
|
|
248058
|
+
return i4;
|
|
248059
|
+
return null;
|
|
248060
|
+
}
|
|
248061
|
+
function resolveAnchorParagraphIndex(blocks2, len3, paragraphIndexById, fromIndex, anchorParagraphId) {
|
|
248062
|
+
if (typeof anchorParagraphId === "string") {
|
|
248063
|
+
const explicitIndex = paragraphIndexById.get(anchorParagraphId);
|
|
248064
|
+
if (typeof explicitIndex === "number")
|
|
248065
|
+
return explicitIndex;
|
|
248066
|
+
}
|
|
248067
|
+
return findNearestParagraphIndex(blocks2, len3, fromIndex);
|
|
248068
|
+
}
|
|
248043
248069
|
function isPageRelativeAnchor(block) {
|
|
248044
248070
|
const vRelativeFrom = block.anchor?.vRelativeFrom;
|
|
248045
248071
|
return vRelativeFrom === "margin" || vRelativeFrom === "page";
|
|
@@ -248069,24 +248095,7 @@ function collectPreRegisteredAnchors(blocks2, measures) {
|
|
|
248069
248095
|
function collectAnchoredDrawings(blocks2, measures) {
|
|
248070
248096
|
const map$12 = /* @__PURE__ */ new Map;
|
|
248071
248097
|
const len3 = Math.min(blocks2.length, measures.length);
|
|
248072
|
-
const paragraphIndexById =
|
|
248073
|
-
for (let i4 = 0;i4 < len3; i4 += 1) {
|
|
248074
|
-
const block = blocks2[i4];
|
|
248075
|
-
if (block.kind === "paragraph")
|
|
248076
|
-
paragraphIndexById.set(block.id, i4);
|
|
248077
|
-
}
|
|
248078
|
-
const nearestPrevParagraph = (fromIndex) => {
|
|
248079
|
-
for (let i4 = fromIndex - 1;i4 >= 0; i4 -= 1)
|
|
248080
|
-
if (blocks2[i4].kind === "paragraph")
|
|
248081
|
-
return i4;
|
|
248082
|
-
return null;
|
|
248083
|
-
};
|
|
248084
|
-
const nearestNextParagraph = (fromIndex) => {
|
|
248085
|
-
for (let i4 = fromIndex + 1;i4 < len3; i4 += 1)
|
|
248086
|
-
if (blocks2[i4].kind === "paragraph")
|
|
248087
|
-
return i4;
|
|
248088
|
-
return null;
|
|
248089
|
-
};
|
|
248098
|
+
const paragraphIndexById = buildParagraphIndexById(blocks2, len3);
|
|
248090
248099
|
for (let i4 = 0;i4 < len3; i4 += 1) {
|
|
248091
248100
|
const block = blocks2[i4];
|
|
248092
248101
|
const measure = measures[i4];
|
|
@@ -248101,11 +248110,7 @@ function collectAnchoredDrawings(blocks2, measures) {
|
|
|
248101
248110
|
if (isPageRelativeAnchor(drawingBlock))
|
|
248102
248111
|
continue;
|
|
248103
248112
|
const anchorParagraphId = typeof drawingBlock.attrs === "object" && drawingBlock.attrs ? drawingBlock.attrs.anchorParagraphId : undefined;
|
|
248104
|
-
|
|
248105
|
-
if (anchorParaIndex == null)
|
|
248106
|
-
anchorParaIndex = nearestPrevParagraph(i4);
|
|
248107
|
-
if (anchorParaIndex == null)
|
|
248108
|
-
anchorParaIndex = nearestNextParagraph(i4);
|
|
248113
|
+
const anchorParaIndex = resolveAnchorParagraphIndex(blocks2, len3, paragraphIndexById, i4, anchorParagraphId);
|
|
248109
248114
|
if (anchorParaIndex == null)
|
|
248110
248115
|
continue;
|
|
248111
248116
|
const list5 = map$12.get(anchorParaIndex) ?? [];
|
|
@@ -248118,26 +248123,11 @@ function collectAnchoredDrawings(blocks2, measures) {
|
|
|
248118
248123
|
return map$12;
|
|
248119
248124
|
}
|
|
248120
248125
|
function collectAnchoredTables(blocks2, measures) {
|
|
248121
|
-
const
|
|
248122
|
-
const
|
|
248123
|
-
|
|
248124
|
-
|
|
248125
|
-
|
|
248126
|
-
paragraphIndexById.set(block.id, i4);
|
|
248127
|
-
}
|
|
248128
|
-
const nearestPrevParagraph = (fromIndex) => {
|
|
248129
|
-
for (let i4 = fromIndex - 1;i4 >= 0; i4 -= 1)
|
|
248130
|
-
if (blocks2[i4].kind === "paragraph")
|
|
248131
|
-
return i4;
|
|
248132
|
-
return null;
|
|
248133
|
-
};
|
|
248134
|
-
const nearestNextParagraph = (fromIndex) => {
|
|
248135
|
-
for (let i4 = fromIndex + 1;i4 < blocks2.length; i4 += 1)
|
|
248136
|
-
if (blocks2[i4].kind === "paragraph")
|
|
248137
|
-
return i4;
|
|
248138
|
-
return null;
|
|
248139
|
-
};
|
|
248140
|
-
for (let i4 = 0;i4 < blocks2.length; i4 += 1) {
|
|
248126
|
+
const len3 = Math.min(blocks2.length, measures.length);
|
|
248127
|
+
const byParagraph = /* @__PURE__ */ new Map;
|
|
248128
|
+
const withoutParagraph = [];
|
|
248129
|
+
const paragraphIndexById = buildParagraphIndexById(blocks2, len3);
|
|
248130
|
+
for (let i4 = 0;i4 < len3; i4 += 1) {
|
|
248141
248131
|
const block = blocks2[i4];
|
|
248142
248132
|
const measure = measures[i4];
|
|
248143
248133
|
if (block.kind !== "table" || measure?.kind !== "table")
|
|
@@ -248147,21 +248137,25 @@ function collectAnchoredTables(blocks2, measures) {
|
|
|
248147
248137
|
if (!tableBlock.anchor?.isAnchored)
|
|
248148
248138
|
continue;
|
|
248149
248139
|
const anchorParagraphId = typeof tableBlock.attrs === "object" && tableBlock.attrs ? tableBlock.attrs.anchorParagraphId : undefined;
|
|
248150
|
-
|
|
248151
|
-
if (anchorParaIndex == null)
|
|
248152
|
-
|
|
248153
|
-
|
|
248154
|
-
|
|
248155
|
-
|
|
248140
|
+
const anchorParaIndex = resolveAnchorParagraphIndex(blocks2, len3, paragraphIndexById, i4, anchorParagraphId);
|
|
248141
|
+
if (anchorParaIndex == null) {
|
|
248142
|
+
withoutParagraph.push({
|
|
248143
|
+
block: tableBlock,
|
|
248144
|
+
measure: tableMeasure
|
|
248145
|
+
});
|
|
248156
248146
|
continue;
|
|
248157
|
-
|
|
248147
|
+
}
|
|
248148
|
+
const list5 = byParagraph.get(anchorParaIndex) ?? [];
|
|
248158
248149
|
list5.push({
|
|
248159
248150
|
block: tableBlock,
|
|
248160
248151
|
measure: tableMeasure
|
|
248161
248152
|
});
|
|
248162
|
-
|
|
248153
|
+
byParagraph.set(anchorParaIndex, list5);
|
|
248163
248154
|
}
|
|
248164
|
-
return
|
|
248155
|
+
return {
|
|
248156
|
+
byParagraph,
|
|
248157
|
+
withoutParagraph
|
|
248158
|
+
};
|
|
248165
248159
|
}
|
|
248166
248160
|
function computePhysicalAnchorY(block, fragmentHeight, pageHeight) {
|
|
248167
248161
|
const alignV = block.anchor?.alignV ?? "top";
|
|
@@ -248203,6 +248197,12 @@ function normalizeFragmentsForRegion(pages, blocks2, _measures, _kind, constrain
|
|
|
248203
248197
|
function createPaginator(opts) {
|
|
248204
248198
|
const states = [];
|
|
248205
248199
|
const pages = [];
|
|
248200
|
+
const pruneTrailingEmptyPages = () => {
|
|
248201
|
+
while (pages.length > 0 && pages[pages.length - 1].fragments.length === 0) {
|
|
248202
|
+
pages.pop();
|
|
248203
|
+
states.pop();
|
|
248204
|
+
}
|
|
248205
|
+
};
|
|
248206
248206
|
const getActiveColumnsForState = (state) => {
|
|
248207
248207
|
if (state.activeConstraintIndex >= 0 && state.constraintBoundaries[state.activeConstraintIndex])
|
|
248208
248208
|
return state.constraintBoundaries[state.activeConstraintIndex].columns;
|
|
@@ -248289,7 +248289,8 @@ function createPaginator(opts) {
|
|
|
248289
248289
|
advanceColumn,
|
|
248290
248290
|
columnX,
|
|
248291
248291
|
getActiveColumnsForState,
|
|
248292
|
-
getPageByNumber
|
|
248292
|
+
getPageByNumber,
|
|
248293
|
+
pruneTrailingEmptyPages
|
|
248293
248294
|
};
|
|
248294
248295
|
}
|
|
248295
248296
|
function toUpperRoman(num) {
|
|
@@ -248832,6 +248833,7 @@ function layoutDocument(blocks2, measures, options = {}) {
|
|
|
248832
248833
|
let pendingPageSize = null;
|
|
248833
248834
|
let activeColumns = cloneColumnLayout(options.columns);
|
|
248834
248835
|
let pendingColumns = null;
|
|
248836
|
+
const allowParagraphlessAnchoredTableFallback = options.allowParagraphlessAnchoredTableFallback !== false;
|
|
248835
248837
|
let activeOrientation = null;
|
|
248836
248838
|
let pendingOrientation = null;
|
|
248837
248839
|
let activeVAlign = null;
|
|
@@ -249295,11 +249297,38 @@ function layoutDocument(blocks2, measures, options = {}) {
|
|
|
249295
249297
|
}, activePageSize.w);
|
|
249296
249298
|
};
|
|
249297
249299
|
const anchoredByParagraph = collectAnchoredDrawings(blocks2, measures);
|
|
249298
|
-
const
|
|
249300
|
+
const anchoredTables = collectAnchoredTables(blocks2, measures);
|
|
249301
|
+
const anchoredTablesByParagraph = anchoredTables.byParagraph;
|
|
249302
|
+
const paragraphlessAnchoredTables = anchoredTables.withoutParagraph;
|
|
249299
249303
|
const placedAnchoredIds = /* @__PURE__ */ new Set;
|
|
249300
249304
|
const placedAnchoredTableIds = /* @__PURE__ */ new Set;
|
|
249301
249305
|
const preRegisteredAnchors = collectPreRegisteredAnchors(blocks2, measures);
|
|
249302
249306
|
const preRegisteredPositions = /* @__PURE__ */ new Map;
|
|
249307
|
+
const resolveParagraphlessAnchoredTableY = (block, measure, state) => {
|
|
249308
|
+
const contentTop = state.topMargin;
|
|
249309
|
+
const contentBottom = state.contentBottom;
|
|
249310
|
+
const contentHeight = Math.max(0, contentBottom - contentTop);
|
|
249311
|
+
const tableHeight = measure.totalHeight ?? 0;
|
|
249312
|
+
const anchor = block.anchor;
|
|
249313
|
+
const offsetV = anchor?.offsetV ?? 0;
|
|
249314
|
+
const vRelativeFrom = anchor?.vRelativeFrom;
|
|
249315
|
+
const alignV = anchor?.alignV;
|
|
249316
|
+
if (vRelativeFrom === "margin") {
|
|
249317
|
+
if (alignV === "bottom")
|
|
249318
|
+
return contentBottom - tableHeight + offsetV;
|
|
249319
|
+
if (alignV === "center")
|
|
249320
|
+
return contentTop + (contentHeight - tableHeight) / 2 + offsetV;
|
|
249321
|
+
return contentTop + offsetV;
|
|
249322
|
+
}
|
|
249323
|
+
if (vRelativeFrom === "page") {
|
|
249324
|
+
if (alignV === "bottom")
|
|
249325
|
+
return contentBottom + (state.page.margins?.bottom ?? activeBottomMargin) - tableHeight + offsetV;
|
|
249326
|
+
if (alignV === "center")
|
|
249327
|
+
return (contentBottom + (state.page.margins?.bottom ?? activeBottomMargin) - tableHeight) / 2 + offsetV;
|
|
249328
|
+
return offsetV;
|
|
249329
|
+
}
|
|
249330
|
+
return contentTop + offsetV;
|
|
249331
|
+
};
|
|
249303
249332
|
for (const entry of preRegisteredAnchors) {
|
|
249304
249333
|
const state = paginator.ensurePage();
|
|
249305
249334
|
const vRelativeFrom = entry.block.anchor?.vRelativeFrom ?? "paragraph";
|
|
@@ -249783,8 +249812,21 @@ function layoutDocument(blocks2, measures, options = {}) {
|
|
|
249783
249812
|
}
|
|
249784
249813
|
throw new Error(`layoutDocument: unsupported block kind for ${block.id}`);
|
|
249785
249814
|
}
|
|
249786
|
-
|
|
249787
|
-
|
|
249815
|
+
paginator.pruneTrailingEmptyPages();
|
|
249816
|
+
if (allowParagraphlessAnchoredTableFallback && pages.length === 0 && paragraphlessAnchoredTables.length > 0) {
|
|
249817
|
+
const state = paginator.ensurePage();
|
|
249818
|
+
for (const { block: tableBlock, measure: tableMeasure } of paragraphlessAnchoredTables) {
|
|
249819
|
+
const columnWidthForTable = getCurrentColumnWidth();
|
|
249820
|
+
const totalWidth = tableMeasure.totalWidth ?? 0;
|
|
249821
|
+
if (columnWidthForTable > 0 && totalWidth >= columnWidthForTable * 0.99)
|
|
249822
|
+
continue;
|
|
249823
|
+
const anchorY = resolveParagraphlessAnchoredTableY(tableBlock, tableMeasure, state);
|
|
249824
|
+
const anchorX = tableBlock.anchor?.offsetH ?? columnX(state.columnIndex);
|
|
249825
|
+
floatManager.registerTable(tableBlock, tableMeasure, anchorY, state.columnIndex, state.page.number);
|
|
249826
|
+
state.page.fragments.push(createAnchoredTableFragment(tableBlock, tableMeasure, anchorX, anchorY));
|
|
249827
|
+
placedAnchoredTableIds.add(tableBlock.id);
|
|
249828
|
+
}
|
|
249829
|
+
}
|
|
249788
249830
|
for (const page of pages) {
|
|
249789
249831
|
if (!page.vAlign || page.vAlign === "top")
|
|
249790
249832
|
continue;
|
|
@@ -249940,7 +249982,8 @@ function layoutHeaderFooter(blocks2, measures, constraints, kind) {
|
|
|
249940
249982
|
right: 0,
|
|
249941
249983
|
bottom: 0,
|
|
249942
249984
|
left: 0
|
|
249943
|
-
}
|
|
249985
|
+
},
|
|
249986
|
+
allowParagraphlessAnchoredTableFallback: false
|
|
249944
249987
|
});
|
|
249945
249988
|
if (kind === "footer" && constraints.pageHeight != null)
|
|
249946
249989
|
normalizeFragmentsForRegion(layout.pages, blocks2, measures, kind, constraints);
|
|
@@ -250502,6 +250545,8 @@ async function layoutHeaderFooterWithCache(sections, constraints, measureBlock$1
|
|
|
250502
250545
|
return result;
|
|
250503
250546
|
}
|
|
250504
250547
|
const { totalPages: docTotalPages } = pageResolver(1);
|
|
250548
|
+
if (!Number.isFinite(docTotalPages) || docTotalPages <= 0)
|
|
250549
|
+
return result;
|
|
250505
250550
|
const useBucketing = FeatureFlags.HF_DIGIT_BUCKETING && docTotalPages >= MIN_PAGES_FOR_BUCKETING;
|
|
250506
250551
|
for (const [type, blocks2] of Object.entries(sections)) {
|
|
250507
250552
|
if (!blocks2 || blocks2.length === 0)
|
|
@@ -260323,15 +260368,45 @@ function resolveTableMinWidth(spec, contentWidth) {
|
|
|
260323
260368
|
return contentWidth * (spec.value / OOXML_PCT_DIVISOR);
|
|
260324
260369
|
return spec.value;
|
|
260325
260370
|
}
|
|
260326
|
-
function
|
|
260371
|
+
function getRefsForKind(section, kind) {
|
|
260372
|
+
return kind === "header" ? section.headerRefs : section.footerRefs;
|
|
260373
|
+
}
|
|
260374
|
+
function buildEffectiveRefsBySection(sectionMetadata, kind) {
|
|
260327
260375
|
const result = /* @__PURE__ */ new Map;
|
|
260328
|
-
let
|
|
260376
|
+
let inheritedRefs = {};
|
|
260329
260377
|
for (const section of sectionMetadata) {
|
|
260330
|
-
const
|
|
260331
|
-
|
|
260332
|
-
|
|
260333
|
-
|
|
260334
|
-
|
|
260378
|
+
const explicitRefs = getRefsForKind(section, kind);
|
|
260379
|
+
const effectiveRefs = { ...inheritedRefs };
|
|
260380
|
+
for (const variant of HEADER_FOOTER_VARIANTS4) {
|
|
260381
|
+
const rId = explicitRefs?.[variant];
|
|
260382
|
+
if (rId)
|
|
260383
|
+
effectiveRefs[variant] = rId;
|
|
260384
|
+
}
|
|
260385
|
+
if (Object.keys(effectiveRefs).length > 0)
|
|
260386
|
+
result.set(section.sectionIndex, effectiveRefs);
|
|
260387
|
+
inheritedRefs = effectiveRefs;
|
|
260388
|
+
}
|
|
260389
|
+
return result;
|
|
260390
|
+
}
|
|
260391
|
+
function collectReferencedRIdsBySection(effectiveRefsBySection) {
|
|
260392
|
+
const result = /* @__PURE__ */ new Set;
|
|
260393
|
+
for (const refs of effectiveRefsBySection.values())
|
|
260394
|
+
for (const variant of HEADER_FOOTER_VARIANTS4) {
|
|
260395
|
+
const rId = refs[variant];
|
|
260396
|
+
if (rId)
|
|
260397
|
+
result.add(rId);
|
|
260398
|
+
}
|
|
260399
|
+
return result;
|
|
260400
|
+
}
|
|
260401
|
+
function resolveDefaultRIdPerSection(sectionMetadata, kind) {
|
|
260402
|
+
const result = /* @__PURE__ */ new Map;
|
|
260403
|
+
let inheritedDefaultRId;
|
|
260404
|
+
for (const section of sectionMetadata) {
|
|
260405
|
+
const explicitDefaultRId = getRefsForKind(section, kind)?.default;
|
|
260406
|
+
if (explicitDefaultRId)
|
|
260407
|
+
inheritedDefaultRId = explicitDefaultRId;
|
|
260408
|
+
if (inheritedDefaultRId)
|
|
260409
|
+
result.set(section.sectionIndex, inheritedDefaultRId);
|
|
260335
260410
|
}
|
|
260336
260411
|
return result;
|
|
260337
260412
|
}
|
|
@@ -260353,14 +260428,18 @@ async function layoutPerRIdHeaderFooters(headerFooterInput, layout, sectionMetad
|
|
|
260353
260428
|
await layoutWithPerSectionConstraints("header", headerBlocksByRId, sectionMetadata, constraints, pageResolver, deps.headerLayoutsByRId);
|
|
260354
260429
|
await layoutWithPerSectionConstraints("footer", footerBlocksByRId, sectionMetadata, constraints, pageResolver, deps.footerLayoutsByRId);
|
|
260355
260430
|
} else {
|
|
260356
|
-
|
|
260357
|
-
|
|
260431
|
+
const effectiveHeaderRefsBySection = buildEffectiveRefsBySection(sectionMetadata, "header");
|
|
260432
|
+
const effectiveFooterRefsBySection = buildEffectiveRefsBySection(sectionMetadata, "footer");
|
|
260433
|
+
await layoutBlocksByRId("header", headerBlocksByRId, collectReferencedRIdsBySection(effectiveHeaderRefsBySection), constraints, pageResolver, deps.headerLayoutsByRId);
|
|
260434
|
+
await layoutBlocksByRId("footer", footerBlocksByRId, collectReferencedRIdsBySection(effectiveFooterRefsBySection), constraints, pageResolver, deps.footerLayoutsByRId);
|
|
260358
260435
|
}
|
|
260359
260436
|
}
|
|
260360
|
-
async function layoutBlocksByRId(kind, blocksByRId, constraints, pageResolver, layoutsByRId) {
|
|
260361
|
-
if (!blocksByRId)
|
|
260437
|
+
async function layoutBlocksByRId(kind, blocksByRId, referencedRIds, constraints, pageResolver, layoutsByRId) {
|
|
260438
|
+
if (!blocksByRId || referencedRIds.size === 0)
|
|
260362
260439
|
return;
|
|
260363
260440
|
for (const [rId, blocks2] of blocksByRId) {
|
|
260441
|
+
if (!referencedRIds.has(rId))
|
|
260442
|
+
continue;
|
|
260364
260443
|
if (!blocks2 || blocks2.length === 0)
|
|
260365
260444
|
continue;
|
|
260366
260445
|
try {
|
|
@@ -260413,7 +260492,7 @@ function adjustFramePositionsForContentWidth(layout, blocks2, effectiveWidth, co
|
|
|
260413
260492
|
async function layoutWithPerSectionConstraints(kind, blocksByRId, sectionMetadata, fallbackConstraints, pageResolver, layoutsByRId) {
|
|
260414
260493
|
if (!blocksByRId)
|
|
260415
260494
|
return;
|
|
260416
|
-
const
|
|
260495
|
+
const defaultRIdPerSection = resolveDefaultRIdPerSection(sectionMetadata, kind);
|
|
260417
260496
|
const tableWidthSpecByRId = /* @__PURE__ */ new Map;
|
|
260418
260497
|
for (const [rId, blocks2] of blocksByRId) {
|
|
260419
260498
|
const spec = getTableWidthSpec(blocks2);
|
|
@@ -260422,7 +260501,7 @@ async function layoutWithPerSectionConstraints(kind, blocksByRId, sectionMetadat
|
|
|
260422
260501
|
}
|
|
260423
260502
|
const groups = /* @__PURE__ */ new Map;
|
|
260424
260503
|
for (const section of sectionMetadata) {
|
|
260425
|
-
const rId =
|
|
260504
|
+
const rId = defaultRIdPerSection.get(section.sectionIndex);
|
|
260426
260505
|
if (!rId || !blocksByRId.has(rId))
|
|
260427
260506
|
continue;
|
|
260428
260507
|
const contentWidth = buildSectionContentWidth(section, fallbackConstraints);
|
|
@@ -285383,7 +285462,7 @@ var Node$13 = class Node$14 {
|
|
|
285383
285462
|
exportSubEditorToPart(mainEditor, editor, headerFooterRefId, type);
|
|
285384
285463
|
}, setEditorToolbar = ({ editor }, mainEditor) => {
|
|
285385
285464
|
editor.setToolbar(mainEditor.toolbar);
|
|
285386
|
-
},
|
|
285465
|
+
}, HEADER_FOOTER_VARIANTS$12, DEFAULT_HEADER_FOOTER_HEIGHT = 100, EDITOR_READY_TIMEOUT_MS = 5000, MAX_CACHED_EDITORS_LIMIT = 100, HeaderFooterEditorManager, HeaderFooterLayoutAdapter = class {
|
|
285387
285466
|
#manager;
|
|
285388
285467
|
#mediaFiles;
|
|
285389
285468
|
#blockCache = /* @__PURE__ */ new Map;
|
|
@@ -285844,7 +285923,7 @@ var Node$13 = class Node$14 {
|
|
|
285844
285923
|
target: currentX + DEFAULT_TAB_INTERVAL_PX,
|
|
285845
285924
|
nextIndex: index2
|
|
285846
285925
|
};
|
|
285847
|
-
}, HeaderFooterSessionManager = class {
|
|
285926
|
+
}, HEADER_FOOTER_VARIANTS4, HeaderFooterSessionManager = class {
|
|
285848
285927
|
#options;
|
|
285849
285928
|
#deps = null;
|
|
285850
285929
|
#callbacks = {};
|
|
@@ -286988,7 +287067,7 @@ var Node$13 = class Node$14 {
|
|
|
286988
287067
|
return;
|
|
286989
287068
|
console.log(...args$1);
|
|
286990
287069
|
}, 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;
|
|
286991
|
-
var
|
|
287070
|
+
var init_src_BzK2Ejl0_es = __esm(() => {
|
|
286992
287071
|
init_rolldown_runtime_Bg48TavK_es();
|
|
286993
287072
|
init_SuperConverter_tT_4c8Ha_es();
|
|
286994
287073
|
init_jszip_C49i9kUs_es();
|
|
@@ -316933,7 +317012,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
316933
317012
|
".tif"
|
|
316934
317013
|
]);
|
|
316935
317014
|
new PluginKey("paginationPlugin");
|
|
316936
|
-
|
|
317015
|
+
HEADER_FOOTER_VARIANTS$12 = [
|
|
316937
317016
|
"default",
|
|
316938
317017
|
"first",
|
|
316939
317018
|
"even",
|
|
@@ -317174,7 +317253,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
317174
317253
|
variant
|
|
317175
317254
|
});
|
|
317176
317255
|
};
|
|
317177
|
-
|
|
317256
|
+
HEADER_FOOTER_VARIANTS$12.forEach((variant) => {
|
|
317178
317257
|
const headerId = collections.headerIds?.[variant];
|
|
317179
317258
|
const footerId = collections.footerIds?.[variant];
|
|
317180
317259
|
if (typeof headerId === "string")
|
|
@@ -317437,6 +317516,12 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
317437
317516
|
"bar",
|
|
317438
317517
|
"clear"
|
|
317439
317518
|
]);
|
|
317519
|
+
HEADER_FOOTER_VARIANTS4 = [
|
|
317520
|
+
"default",
|
|
317521
|
+
"first",
|
|
317522
|
+
"even",
|
|
317523
|
+
"odd"
|
|
317524
|
+
];
|
|
317440
317525
|
DEFAULT_SEMANTIC_FOOTNOTE_HEADING_STYLE = {
|
|
317441
317526
|
fontFamily: "Arial",
|
|
317442
317527
|
fontSize: 14,
|
|
@@ -321502,7 +321587,7 @@ var init_zipper_DbkgrypV_es = __esm(() => {
|
|
|
321502
321587
|
|
|
321503
321588
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
321504
321589
|
var init_super_editor_es = __esm(() => {
|
|
321505
|
-
|
|
321590
|
+
init_src_BzK2Ejl0_es();
|
|
321506
321591
|
init_SuperConverter_tT_4c8Ha_es();
|
|
321507
321592
|
init_jszip_C49i9kUs_es();
|
|
321508
321593
|
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.67",
|
|
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
|
-
"
|
|
30
|
-
"superdoc": "
|
|
29
|
+
"superdoc": "1.25.0",
|
|
30
|
+
"@superdoc/super-editor": "0.0.1"
|
|
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-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.67",
|
|
38
|
+
"@superdoc-dev/cli-darwin-x64": "0.5.0-next.67",
|
|
39
|
+
"@superdoc-dev/cli-linux-x64": "0.5.0-next.67",
|
|
40
|
+
"@superdoc-dev/cli-linux-arm64": "0.5.0-next.67",
|
|
41
|
+
"@superdoc-dev/cli-windows-x64": "0.5.0-next.67"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"predev": "node scripts/ensure-superdoc-build.js",
|