@superdoc-dev/cli 0.16.0-next.19 → 0.16.0-next.20
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 +293 -9
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -230111,7 +230111,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
230111
230111
|
init_remark_gfm_BhnWr3yf_es();
|
|
230112
230112
|
});
|
|
230113
230113
|
|
|
230114
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
230114
|
+
// ../../packages/superdoc/dist/chunks/src-CEhzpYi5.es.js
|
|
230115
230115
|
function deleteProps(obj, propOrProps) {
|
|
230116
230116
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
230117
230117
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -288229,6 +288229,224 @@ async function layoutWithPerSectionConstraints(kind, blocksByRId, sectionMetadat
|
|
|
288229
288229
|
}
|
|
288230
288230
|
}
|
|
288231
288231
|
}
|
|
288232
|
+
function roundNullable(value) {
|
|
288233
|
+
if (value == null || !Number.isFinite(value))
|
|
288234
|
+
return null;
|
|
288235
|
+
return Math.round(value * 1000) / 1000 + 0;
|
|
288236
|
+
}
|
|
288237
|
+
function roundNumber(value) {
|
|
288238
|
+
return roundNullable(value) ?? 0;
|
|
288239
|
+
}
|
|
288240
|
+
function naturalCompare(a2, b$1) {
|
|
288241
|
+
const re2 = /(\d+)|(\D+)/g;
|
|
288242
|
+
const aParts = a2.match(re2) ?? [];
|
|
288243
|
+
const bParts = b$1.match(re2) ?? [];
|
|
288244
|
+
const len3 = Math.min(aParts.length, bParts.length);
|
|
288245
|
+
for (let i4 = 0;i4 < len3; i4 += 1) {
|
|
288246
|
+
const an = Number(aParts[i4]);
|
|
288247
|
+
const bn = Number(bParts[i4]);
|
|
288248
|
+
if (!Number.isNaN(an) && !Number.isNaN(bn)) {
|
|
288249
|
+
if (an !== bn)
|
|
288250
|
+
return an - bn;
|
|
288251
|
+
} else if (aParts[i4] !== bParts[i4])
|
|
288252
|
+
return aParts[i4] < bParts[i4] ? -1 : 1;
|
|
288253
|
+
}
|
|
288254
|
+
return aParts.length - bParts.length;
|
|
288255
|
+
}
|
|
288256
|
+
function makeStoryKey(kind, layoutKey) {
|
|
288257
|
+
return `${kind}::${layoutKey}`;
|
|
288258
|
+
}
|
|
288259
|
+
function refIdFromLayoutKey(layoutKey) {
|
|
288260
|
+
return layoutKey.replace(COMPOSITE_KEY_SUFFIX, "");
|
|
288261
|
+
}
|
|
288262
|
+
function resolveBindingStoryKey(kind, refId, sectionIndex, layoutsByRId) {
|
|
288263
|
+
if (!refId)
|
|
288264
|
+
return null;
|
|
288265
|
+
const composite = buildSectionAwareHeaderFooterLayoutKey(refId, sectionIndex);
|
|
288266
|
+
if (layoutsByRId.has(composite))
|
|
288267
|
+
return makeStoryKey(kind, composite);
|
|
288268
|
+
if (layoutsByRId.has(refId))
|
|
288269
|
+
return makeStoryKey(kind, refId);
|
|
288270
|
+
return makeStoryKey(kind, composite);
|
|
288271
|
+
}
|
|
288272
|
+
function summarizeRegion(region) {
|
|
288273
|
+
return {
|
|
288274
|
+
localX: roundNumber(region.localX),
|
|
288275
|
+
localY: roundNumber(region.localY),
|
|
288276
|
+
width: roundNumber(region.width),
|
|
288277
|
+
height: roundNumber(region.height),
|
|
288278
|
+
contentHeight: roundNullable(region.contentHeight)
|
|
288279
|
+
};
|
|
288280
|
+
}
|
|
288281
|
+
function summarizeBinding(kind, region, layoutsByRId) {
|
|
288282
|
+
const refId = region.headerFooterRefId ?? null;
|
|
288283
|
+
return {
|
|
288284
|
+
storyKey: resolveBindingStoryKey(kind, refId, region.sectionIndex ?? 0, layoutsByRId),
|
|
288285
|
+
refId,
|
|
288286
|
+
variant: region.matchedVariant ?? region.sectionType ?? null,
|
|
288287
|
+
region: summarizeRegion(region)
|
|
288288
|
+
};
|
|
288289
|
+
}
|
|
288290
|
+
function hasBoundStoryRegion(region) {
|
|
288291
|
+
return typeof region?.headerFooterRefId === "string" && region.headerFooterRefId.length > 0;
|
|
288292
|
+
}
|
|
288293
|
+
function summarizeFragment(fragment2) {
|
|
288294
|
+
const withSize = fragment2;
|
|
288295
|
+
return {
|
|
288296
|
+
kind: fragment2.kind,
|
|
288297
|
+
blockId: typeof fragment2.blockId === "string" ? fragment2.blockId : null,
|
|
288298
|
+
x: roundNumber(fragment2.x),
|
|
288299
|
+
y: roundNumber(fragment2.y),
|
|
288300
|
+
width: roundNullable(withSize.width),
|
|
288301
|
+
height: roundNullable(withSize.height)
|
|
288302
|
+
};
|
|
288303
|
+
}
|
|
288304
|
+
function summarizeRawLayout(result) {
|
|
288305
|
+
const { layout } = result;
|
|
288306
|
+
return {
|
|
288307
|
+
height: roundNumber(layout.height),
|
|
288308
|
+
minY: roundNullable(layout.minY),
|
|
288309
|
+
maxY: roundNullable(layout.maxY),
|
|
288310
|
+
renderHeight: roundNullable(layout.renderHeight),
|
|
288311
|
+
pages: [...layout.pages].sort((a2, b$1) => a2.number - b$1.number).map((page) => ({
|
|
288312
|
+
number: page.number,
|
|
288313
|
+
displayNumber: page.displayNumber ?? null,
|
|
288314
|
+
numberText: page.numberText ?? null,
|
|
288315
|
+
fragments: page.fragments.map(summarizeFragment)
|
|
288316
|
+
}))
|
|
288317
|
+
};
|
|
288318
|
+
}
|
|
288319
|
+
function summarizeResolvedItem(item) {
|
|
288320
|
+
const withMeta = item;
|
|
288321
|
+
return {
|
|
288322
|
+
kind: item.kind,
|
|
288323
|
+
blockId: typeof withMeta.blockId === "string" ? withMeta.blockId : null,
|
|
288324
|
+
fragmentKind: typeof withMeta.fragmentKind === "string" ? withMeta.fragmentKind : null,
|
|
288325
|
+
x: roundNumber(item.x),
|
|
288326
|
+
y: roundNumber(item.y),
|
|
288327
|
+
width: roundNullable(item.width),
|
|
288328
|
+
height: roundNullable(item.height),
|
|
288329
|
+
childCount: Array.isArray(withMeta.children) ? withMeta.children.length : null
|
|
288330
|
+
};
|
|
288331
|
+
}
|
|
288332
|
+
function summarizeResolvedLayout(resolved) {
|
|
288333
|
+
return {
|
|
288334
|
+
height: roundNumber(resolved.height),
|
|
288335
|
+
minY: roundNullable(resolved.minY),
|
|
288336
|
+
maxY: roundNullable(resolved.maxY),
|
|
288337
|
+
renderHeight: roundNullable(resolved.renderHeight),
|
|
288338
|
+
pages: [...resolved.pages].sort((a2, b$1) => a2.number - b$1.number).map((page) => ({
|
|
288339
|
+
number: page.number,
|
|
288340
|
+
displayNumber: page.displayNumber ?? null,
|
|
288341
|
+
numberText: page.numberText ?? null,
|
|
288342
|
+
items: page.items.map(summarizeResolvedItem)
|
|
288343
|
+
}))
|
|
288344
|
+
};
|
|
288345
|
+
}
|
|
288346
|
+
function buildPageBindings(source) {
|
|
288347
|
+
const sectionsByStoryKey = /* @__PURE__ */ new Map;
|
|
288348
|
+
const recordSection = (storyKey, sectionIndex) => {
|
|
288349
|
+
if (!storyKey)
|
|
288350
|
+
return;
|
|
288351
|
+
let sections = sectionsByStoryKey.get(storyKey);
|
|
288352
|
+
if (!sections) {
|
|
288353
|
+
sections = /* @__PURE__ */ new Set;
|
|
288354
|
+
sectionsByStoryKey.set(storyKey, sections);
|
|
288355
|
+
}
|
|
288356
|
+
sections.add(sectionIndex);
|
|
288357
|
+
};
|
|
288358
|
+
const pageIndices = new Set([...source.headerRegions.keys(), ...source.footerRegions.keys()]);
|
|
288359
|
+
const pageBindings = [];
|
|
288360
|
+
for (const pageIndex of [...pageIndices].sort((a2, b$1) => a2 - b$1)) {
|
|
288361
|
+
const headerRegion = source.headerRegions.get(pageIndex) ?? null;
|
|
288362
|
+
const footerRegion = source.footerRegions.get(pageIndex) ?? null;
|
|
288363
|
+
const boundHeaderRegion = hasBoundStoryRegion(headerRegion) ? headerRegion : null;
|
|
288364
|
+
const boundFooterRegion = hasBoundStoryRegion(footerRegion) ? footerRegion : null;
|
|
288365
|
+
const anchor = boundHeaderRegion ?? boundFooterRegion;
|
|
288366
|
+
if (!anchor)
|
|
288367
|
+
continue;
|
|
288368
|
+
const header = boundHeaderRegion ? summarizeBinding("header", boundHeaderRegion, source.headerLayoutsByRId) : null;
|
|
288369
|
+
const footer = boundFooterRegion ? summarizeBinding("footer", boundFooterRegion, source.footerLayoutsByRId) : null;
|
|
288370
|
+
if (header)
|
|
288371
|
+
recordSection(header.storyKey, boundHeaderRegion.sectionIndex ?? 0);
|
|
288372
|
+
if (footer)
|
|
288373
|
+
recordSection(footer.storyKey, boundFooterRegion.sectionIndex ?? 0);
|
|
288374
|
+
pageBindings.push({
|
|
288375
|
+
pageIndex,
|
|
288376
|
+
pageNumber: anchor.pageNumber,
|
|
288377
|
+
sectionIndex: anchor.sectionIndex ?? 0,
|
|
288378
|
+
header,
|
|
288379
|
+
footer
|
|
288380
|
+
});
|
|
288381
|
+
}
|
|
288382
|
+
return {
|
|
288383
|
+
pageBindings,
|
|
288384
|
+
sectionsByStoryKey
|
|
288385
|
+
};
|
|
288386
|
+
}
|
|
288387
|
+
function makeStorySnapshot(kind, storyKey, refId, sectionIndices, rawLayout, resolvedLayout) {
|
|
288388
|
+
return {
|
|
288389
|
+
storyKey,
|
|
288390
|
+
kind,
|
|
288391
|
+
refId,
|
|
288392
|
+
sectionIndices: [...new Set(sectionIndices)].sort((a2, b$1) => a2 - b$1),
|
|
288393
|
+
rawLayout: summarizeRawLayout(rawLayout),
|
|
288394
|
+
resolvedLayout: resolvedLayout ? summarizeResolvedLayout(resolvedLayout) : null
|
|
288395
|
+
};
|
|
288396
|
+
}
|
|
288397
|
+
function buildVariantResultMaps(results, resolvedLayouts) {
|
|
288398
|
+
const rawByVariant = /* @__PURE__ */ new Map;
|
|
288399
|
+
const resolvedByVariant = /* @__PURE__ */ new Map;
|
|
288400
|
+
if (!results)
|
|
288401
|
+
return {
|
|
288402
|
+
rawByVariant,
|
|
288403
|
+
resolvedByVariant
|
|
288404
|
+
};
|
|
288405
|
+
for (const [index2, result] of results.entries())
|
|
288406
|
+
if (!rawByVariant.has(result.type)) {
|
|
288407
|
+
rawByVariant.set(result.type, result);
|
|
288408
|
+
const resolved = resolvedLayouts?.[index2];
|
|
288409
|
+
if (resolved)
|
|
288410
|
+
resolvedByVariant.set(result.type, resolved);
|
|
288411
|
+
}
|
|
288412
|
+
return {
|
|
288413
|
+
rawByVariant,
|
|
288414
|
+
resolvedByVariant
|
|
288415
|
+
};
|
|
288416
|
+
}
|
|
288417
|
+
function buildStoryLayouts(kind, pageBindings, layoutsByRId, layoutResults, resolvedByRId, resolvedLayouts, sectionsByStoryKey) {
|
|
288418
|
+
const entries2 = /* @__PURE__ */ new Map;
|
|
288419
|
+
for (const [layoutKey, result] of layoutsByRId) {
|
|
288420
|
+
const storyKey = makeStoryKey(kind, layoutKey);
|
|
288421
|
+
const sections = new Set(sectionsByStoryKey.get(storyKey) ?? []);
|
|
288422
|
+
const compositeMatch = COMPOSITE_KEY_SUFFIX.exec(layoutKey);
|
|
288423
|
+
if (compositeMatch)
|
|
288424
|
+
sections.add(Number(compositeMatch[1]));
|
|
288425
|
+
const resolved = resolvedByRId.get(layoutKey) ?? null;
|
|
288426
|
+
entries2.set(storyKey, makeStorySnapshot(kind, storyKey, refIdFromLayoutKey(layoutKey), sections, result, resolved));
|
|
288427
|
+
}
|
|
288428
|
+
const { rawByVariant, resolvedByVariant } = buildVariantResultMaps(layoutResults, resolvedLayouts);
|
|
288429
|
+
for (const pageBinding of pageBindings) {
|
|
288430
|
+
const binding = kind === "header" ? pageBinding.header : pageBinding.footer;
|
|
288431
|
+
if (!binding?.storyKey || !binding.refId || !binding.variant || entries2.has(binding.storyKey))
|
|
288432
|
+
continue;
|
|
288433
|
+
const fallbackRawLayout = rawByVariant.get(binding.variant);
|
|
288434
|
+
if (!fallbackRawLayout)
|
|
288435
|
+
continue;
|
|
288436
|
+
entries2.set(binding.storyKey, makeStorySnapshot(kind, binding.storyKey, binding.refId, sectionsByStoryKey.get(binding.storyKey) ?? [pageBinding.sectionIndex], fallbackRawLayout, resolvedByVariant.get(binding.variant) ?? null));
|
|
288437
|
+
}
|
|
288438
|
+
return [...entries2.values()].sort((a2, b$1) => naturalCompare(a2.storyKey, b$1.storyKey));
|
|
288439
|
+
}
|
|
288440
|
+
function buildHeaderFooterLayoutSnapshot(source) {
|
|
288441
|
+
const { pageBindings, sectionsByStoryKey } = buildPageBindings(source);
|
|
288442
|
+
return {
|
|
288443
|
+
pageBindings,
|
|
288444
|
+
storyLayouts: {
|
|
288445
|
+
headers: buildStoryLayouts("header", pageBindings, source.headerLayoutsByRId, source.headerLayoutResults, source.resolvedHeaderByRId, source.resolvedHeaderLayouts, sectionsByStoryKey),
|
|
288446
|
+
footers: buildStoryLayouts("footer", pageBindings, source.footerLayoutsByRId, source.footerLayoutResults, source.resolvedFooterByRId, source.resolvedFooterLayouts, sectionsByStoryKey)
|
|
288447
|
+
}
|
|
288448
|
+
};
|
|
288449
|
+
}
|
|
288232
288450
|
function hasSectionRefsForKind(identifier, kind) {
|
|
288233
288451
|
const refKey = kind === "header" ? "headerRefs" : "footerRefs";
|
|
288234
288452
|
return Boolean(identifier?.sections?.some((section) => section[refKey] !== undefined));
|
|
@@ -323446,7 +323664,7 @@ menclose::after {
|
|
|
323446
323664
|
target: currentX + DEFAULT_TAB_INTERVAL_PX,
|
|
323447
323665
|
nextIndex: index2
|
|
323448
323666
|
};
|
|
323449
|
-
}, HeaderFooterSessionManager = class {
|
|
323667
|
+
}, COMPOSITE_KEY_SUFFIX, HeaderFooterSessionManager = class {
|
|
323450
323668
|
#options;
|
|
323451
323669
|
#deps = null;
|
|
323452
323670
|
#callbacks = {};
|
|
@@ -323467,6 +323685,14 @@ menclose::after {
|
|
|
323467
323685
|
#footerDecorationProvider;
|
|
323468
323686
|
#headerRegions = /* @__PURE__ */ new Map;
|
|
323469
323687
|
#footerRegions = /* @__PURE__ */ new Map;
|
|
323688
|
+
#publishedHeaderFooterLayoutSnapshot = {
|
|
323689
|
+
pageBindings: [],
|
|
323690
|
+
storyLayouts: {
|
|
323691
|
+
headers: [],
|
|
323692
|
+
footers: []
|
|
323693
|
+
}
|
|
323694
|
+
};
|
|
323695
|
+
#headerFooterLayoutSnapshotPending = false;
|
|
323470
323696
|
#session = { mode: "body" };
|
|
323471
323697
|
#activeEditor = null;
|
|
323472
323698
|
#activeEditorEventCleanup = null;
|
|
@@ -323532,6 +323758,7 @@ menclose::after {
|
|
|
323532
323758
|
return this.#headerLayoutResults;
|
|
323533
323759
|
}
|
|
323534
323760
|
set headerLayoutResults(results) {
|
|
323761
|
+
this.#headerFooterLayoutSnapshotPending = true;
|
|
323535
323762
|
this.#headerLayoutResults = results;
|
|
323536
323763
|
this.#resolvedHeaderLayouts = results ? results.map((result) => resolveResult(result)) : null;
|
|
323537
323764
|
}
|
|
@@ -323539,6 +323766,7 @@ menclose::after {
|
|
|
323539
323766
|
return this.#footerLayoutResults;
|
|
323540
323767
|
}
|
|
323541
323768
|
set footerLayoutResults(results) {
|
|
323769
|
+
this.#headerFooterLayoutSnapshotPending = true;
|
|
323542
323770
|
this.#footerLayoutResults = results;
|
|
323543
323771
|
this.#resolvedFooterLayouts = results ? results.map((result) => resolveResult(result)) : null;
|
|
323544
323772
|
}
|
|
@@ -323566,6 +323794,25 @@ menclose::after {
|
|
|
323566
323794
|
get footerRegions() {
|
|
323567
323795
|
return this.#footerRegions;
|
|
323568
323796
|
}
|
|
323797
|
+
getHeaderFooterLayoutSnapshot() {
|
|
323798
|
+
if (this.#headerFooterLayoutSnapshotPending)
|
|
323799
|
+
return this.#publishedHeaderFooterLayoutSnapshot;
|
|
323800
|
+
return this.#buildLiveHeaderFooterLayoutSnapshot();
|
|
323801
|
+
}
|
|
323802
|
+
#buildLiveHeaderFooterLayoutSnapshot() {
|
|
323803
|
+
return buildHeaderFooterLayoutSnapshot({
|
|
323804
|
+
headerRegions: this.#headerRegions,
|
|
323805
|
+
footerRegions: this.#footerRegions,
|
|
323806
|
+
headerLayoutsByRId: this.#headerLayoutsByRId,
|
|
323807
|
+
footerLayoutsByRId: this.#footerLayoutsByRId,
|
|
323808
|
+
headerLayoutResults: this.#headerLayoutResults,
|
|
323809
|
+
footerLayoutResults: this.#footerLayoutResults,
|
|
323810
|
+
resolvedHeaderByRId: this.#resolvedHeaderByRId,
|
|
323811
|
+
resolvedFooterByRId: this.#resolvedFooterByRId,
|
|
323812
|
+
resolvedHeaderLayouts: this.#resolvedHeaderLayouts,
|
|
323813
|
+
resolvedFooterLayouts: this.#resolvedFooterLayouts
|
|
323814
|
+
});
|
|
323815
|
+
}
|
|
323569
323816
|
setDependencies(deps) {
|
|
323570
323817
|
this.#deps = deps;
|
|
323571
323818
|
}
|
|
@@ -323593,6 +323840,7 @@ menclose::after {
|
|
|
323593
323840
|
this.#headerFooterAdapter?.setTrackedChangesRenderConfig(nextConfig);
|
|
323594
323841
|
}
|
|
323595
323842
|
setLayoutResults(headerResults, footerResults) {
|
|
323843
|
+
this.#headerFooterLayoutSnapshotPending = true;
|
|
323596
323844
|
this.#headerLayoutResults = headerResults;
|
|
323597
323845
|
this.#footerLayoutResults = footerResults;
|
|
323598
323846
|
this.#resolvedHeaderLayouts = headerResults ? headerResults.map((result) => resolveResult(result)) : null;
|
|
@@ -323655,7 +323903,7 @@ menclose::after {
|
|
|
323655
323903
|
const sectionIndex = page.sectionIndex ?? 0;
|
|
323656
323904
|
const sectionId = sectionIdBySectionIndex.get(sectionIndex) ?? `section-${sectionIndex}`;
|
|
323657
323905
|
const sectionPageCount = sectionPageCounts.get(sectionIndex) ?? resolvedLayout.pages.length ?? 1;
|
|
323658
|
-
const headerPayload = this.#headerDecorationProvider?.(page.number, margins, page);
|
|
323906
|
+
const headerPayload = this.#headerDecorationProvider?.(page.number, margins, page) ?? null;
|
|
323659
323907
|
const headerBox = this.#computeDecorationBox("header", margins, actualPageHeight);
|
|
323660
323908
|
const displayPageNumber = page.numberText ?? String(page.number);
|
|
323661
323909
|
const displayPageNumberValue = page.displayNumber ?? page.number;
|
|
@@ -323665,6 +323913,7 @@ menclose::after {
|
|
|
323665
323913
|
kind: "header",
|
|
323666
323914
|
headerFooterRefId: headerPayload?.headerFooterRefId,
|
|
323667
323915
|
sectionType: headerPayload?.sectionType ?? this.#computeExpectedSectionType("header", page, sectionFirstPageNumbers),
|
|
323916
|
+
matchedVariant: headerPayload?.matchedVariant ?? undefined,
|
|
323668
323917
|
sectionId,
|
|
323669
323918
|
sectionIndex,
|
|
323670
323919
|
pageIndex,
|
|
@@ -323677,15 +323926,18 @@ menclose::after {
|
|
|
323677
323926
|
localX: headerPayload?.hitRegion?.x ?? headerBox.x,
|
|
323678
323927
|
localY: headerPayload?.hitRegion?.y ?? headerBox.offset,
|
|
323679
323928
|
width: headerPayload?.hitRegion?.width ?? headerBox.width,
|
|
323680
|
-
height: headerPayload?.hitRegion?.height ?? headerBox.height
|
|
323929
|
+
height: headerPayload?.hitRegion?.height ?? headerBox.height,
|
|
323930
|
+
contentHeight: headerPayload?.contentHeight,
|
|
323931
|
+
minY: headerPayload?.minY
|
|
323681
323932
|
});
|
|
323682
|
-
const footerPayload = this.#footerDecorationProvider?.(page.number, margins, page);
|
|
323933
|
+
const footerPayload = this.#footerDecorationProvider?.(page.number, margins, page) ?? null;
|
|
323683
323934
|
const footerBoxMargins = this.#stripFootnoteReserveFromBottomMargin(margins, page);
|
|
323684
323935
|
const footerBox = this.#computeDecorationBox("footer", footerBoxMargins, actualPageHeight);
|
|
323685
323936
|
this.#footerRegions.set(pageIndex, {
|
|
323686
323937
|
kind: "footer",
|
|
323687
323938
|
headerFooterRefId: footerPayload?.headerFooterRefId,
|
|
323688
323939
|
sectionType: footerPayload?.sectionType ?? this.#computeExpectedSectionType("footer", page, sectionFirstPageNumbers),
|
|
323940
|
+
matchedVariant: footerPayload?.matchedVariant ?? undefined,
|
|
323689
323941
|
sectionId,
|
|
323690
323942
|
sectionIndex,
|
|
323691
323943
|
pageIndex,
|
|
@@ -324723,6 +324975,8 @@ menclose::after {
|
|
|
324723
324975
|
this.#headerDecorationProvider = this.createDecorationProvider("header", resolvedLayout);
|
|
324724
324976
|
this.#footerDecorationProvider = this.createDecorationProvider("footer", resolvedLayout);
|
|
324725
324977
|
this.rebuildRegions(resolvedLayout);
|
|
324978
|
+
this.#publishedHeaderFooterLayoutSnapshot = this.#buildLiveHeaderFooterLayoutSnapshot();
|
|
324979
|
+
this.#headerFooterLayoutSnapshotPending = false;
|
|
324726
324980
|
}
|
|
324727
324981
|
resolveAlignedDecorationItems(fragments, slotPageNumber, result, cachedResolvedLayout, contextLabel, storyId) {
|
|
324728
324982
|
const cachedItems = cachedResolvedLayout?.pages.find((page) => page.number === slotPageNumber)?.items;
|
|
@@ -324830,7 +325084,8 @@ menclose::after {
|
|
|
324830
325084
|
y: metrics$1.offset,
|
|
324831
325085
|
width: effectiveWidth,
|
|
324832
325086
|
height: metrics$1.containerHeight
|
|
324833
|
-
}
|
|
325087
|
+
},
|
|
325088
|
+
matchedVariant: layoutVariantType
|
|
324834
325089
|
};
|
|
324835
325090
|
}
|
|
324836
325091
|
}
|
|
@@ -324885,7 +325140,8 @@ menclose::after {
|
|
|
324885
325140
|
y: metrics.offset,
|
|
324886
325141
|
width: box.width,
|
|
324887
325142
|
height: metrics.containerHeight
|
|
324888
|
-
}
|
|
325143
|
+
},
|
|
325144
|
+
matchedVariant: layoutVariantType
|
|
324889
325145
|
};
|
|
324890
325146
|
};
|
|
324891
325147
|
}
|
|
@@ -324925,6 +325181,14 @@ menclose::after {
|
|
|
324925
325181
|
this.#resolvedFooterLayouts = null;
|
|
324926
325182
|
this.#resolvedHeaderByRId.clear();
|
|
324927
325183
|
this.#resolvedFooterByRId.clear();
|
|
325184
|
+
this.#publishedHeaderFooterLayoutSnapshot = {
|
|
325185
|
+
pageBindings: [],
|
|
325186
|
+
storyLayouts: {
|
|
325187
|
+
headers: [],
|
|
325188
|
+
footers: []
|
|
325189
|
+
}
|
|
325190
|
+
};
|
|
325191
|
+
this.#headerFooterLayoutSnapshotPending = false;
|
|
324928
325192
|
this.#headerDecorationProvider = undefined;
|
|
324929
325193
|
this.#footerDecorationProvider = undefined;
|
|
324930
325194
|
this.#headerRegions.clear();
|
|
@@ -325441,7 +325705,7 @@ menclose::after {
|
|
|
325441
325705
|
return;
|
|
325442
325706
|
console.log(...args$1);
|
|
325443
325707
|
}, 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;
|
|
325444
|
-
var
|
|
325708
|
+
var init_src_CEhzpYi5_es = __esm(() => {
|
|
325445
325709
|
init_rolldown_runtime_Bg48TavK_es();
|
|
325446
325710
|
init_SuperConverter_B9mZiCO9_es();
|
|
325447
325711
|
init_jszip_C49i9kUs_es();
|
|
@@ -353495,6 +353759,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
353495
353759
|
"bar",
|
|
353496
353760
|
"clear"
|
|
353497
353761
|
]);
|
|
353762
|
+
COMPOSITE_KEY_SUFFIX = /::s(\d+)$/;
|
|
353498
353763
|
FACE_STATUS_PRIORITY = [
|
|
353499
353764
|
"failed",
|
|
353500
353765
|
"timed_out",
|
|
@@ -354844,6 +355109,25 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
354844
355109
|
sectionMetadata: this.#sectionMetadata
|
|
354845
355110
|
};
|
|
354846
355111
|
}
|
|
355112
|
+
getLayoutResolveSnapshot() {
|
|
355113
|
+
const blocks2 = this.#layoutLookupBlocks.length > 0 ? this.#layoutLookupBlocks : this.#layoutState.blocks;
|
|
355114
|
+
const measures = this.#layoutLookupMeasures.length > 0 ? this.#layoutLookupMeasures : this.#layoutState.measures;
|
|
355115
|
+
return {
|
|
355116
|
+
layout: this.#layoutState.layout,
|
|
355117
|
+
blocks: blocks2,
|
|
355118
|
+
measures,
|
|
355119
|
+
sectionMetadata: this.#sectionMetadata
|
|
355120
|
+
};
|
|
355121
|
+
}
|
|
355122
|
+
getHeaderFooterLayoutSnapshot() {
|
|
355123
|
+
return this.#headerFooterSession?.getHeaderFooterLayoutSnapshot() ?? {
|
|
355124
|
+
pageBindings: [],
|
|
355125
|
+
storyLayouts: {
|
|
355126
|
+
headers: [],
|
|
355127
|
+
footers: []
|
|
355128
|
+
}
|
|
355129
|
+
};
|
|
355130
|
+
}
|
|
354847
355131
|
getFontReport() {
|
|
354848
355132
|
return this.#fontGate?.getReport() ?? [];
|
|
354849
355133
|
}
|
|
@@ -360109,7 +360393,7 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
|
|
|
360109
360393
|
|
|
360110
360394
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
360111
360395
|
var init_super_editor_es = __esm(() => {
|
|
360112
|
-
|
|
360396
|
+
init_src_CEhzpYi5_es();
|
|
360113
360397
|
init_SuperConverter_B9mZiCO9_es();
|
|
360114
360398
|
init_jszip_C49i9kUs_es();
|
|
360115
360399
|
init_xml_js_CqGKpaft_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.16.0-next.
|
|
3
|
+
"version": "0.16.0-next.20",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -25,19 +25,19 @@
|
|
|
25
25
|
"@types/ws": "^8.5.13",
|
|
26
26
|
"typescript": "^5.9.2",
|
|
27
27
|
"@superdoc/document-api": "0.0.1",
|
|
28
|
-
"superdoc": "
|
|
29
|
-
"
|
|
28
|
+
"@superdoc/super-editor": "0.0.1",
|
|
29
|
+
"superdoc": "1.38.0"
|
|
30
30
|
},
|
|
31
31
|
"module": "src/index.ts",
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
35
|
"optionalDependencies": {
|
|
36
|
-
"@superdoc-dev/cli-darwin-arm64": "0.16.0-next.
|
|
37
|
-
"@superdoc-dev/cli-darwin-x64": "0.16.0-next.
|
|
38
|
-
"@superdoc-dev/cli-linux-x64": "0.16.0-next.
|
|
39
|
-
"@superdoc-dev/cli-windows-x64": "0.16.0-next.
|
|
40
|
-
"@superdoc-dev/cli-linux-arm64": "0.16.0-next.
|
|
36
|
+
"@superdoc-dev/cli-darwin-arm64": "0.16.0-next.20",
|
|
37
|
+
"@superdoc-dev/cli-darwin-x64": "0.16.0-next.20",
|
|
38
|
+
"@superdoc-dev/cli-linux-x64": "0.16.0-next.20",
|
|
39
|
+
"@superdoc-dev/cli-windows-x64": "0.16.0-next.20",
|
|
40
|
+
"@superdoc-dev/cli-linux-arm64": "0.16.0-next.20"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"predev": "node scripts/ensure-superdoc-build.js",
|