Add pagination blocks, renderCore, layout audit and react-pdf quirk tests

TableGuard, BottomSpacer, FirstPageHeader and PageChrome implement the
verified pagination rules; renderCore returns bytes, a normalised layout
tree, audit issues and a layout fingerprint. auditLayout detects overlaps,
ink overflow, truncation, header-only pages and split blocks. Quirk tests
pin the react-pdf behaviours the design depends on, and a child-process
test pins the page-level absolute Svg hang.
This commit is contained in:
2026-10-04 05:05:51 +05:30
parent 40aa3e05d9
commit 8d4f8e666b
24 changed files with 2187 additions and 5 deletions
+13
View File
@@ -0,0 +1,13 @@
import { View } from "@react-pdf/renderer";
import { FILL } from "../engine/columns";
import { pdfFlags } from "./pdfProps";
/**
* Elastic gap before the closing block (amount in words, bank, signatory). It grows to push the closing
* block to the foot of whichever page it ends on. `closingH` is the closing block's height: as
* minPresenceAhead it keeps the spacer from staying on the previous page while the block starts the
* next one (without it the spacer stays behind and the block sits at the top of the new page).
*/
export function BottomSpacer({ closingH }: { closingH: number }) {
return <View style={FILL} {...pdfFlags({ minPresenceAhead: closingH })} />;
}