// --------------------------------------------------------------------------- // customer-grid / catalogPrint.ts // Wave-18 owner item 4, ruling R10 — catalog EXPORT is browser print-to-PDF: // true paginated pages, a real `@page` sized from the catalog's own paper // setting, and page-break rules so ONE catalog prints and nothing else does. // // Why a generated stylesheet instead of CSS in index.css: `@page { size: … }` // cannot read a custom property. The page size is DATA (per catalog, per // orientation), so the only way to state it is to write the rule at print time. // index.css carries everything static; this module carries the one rule that // changes with the artifact. // // ⚠ The gate that proves this passes `preferCSSPageSize: True` to Playwright's // `page.pdf()`. Without it Playwright IGNORES `@page { size }` and emits Letter // whatever the rule says — a green check that proves the default, not the // contract ([[gate-can-report-green-on-nothing]]). // --------------------------------------------------------------------------- import { cssLength, pageBox } from "./catalogData"; import type { CatalogSpec } from "./types"; /** The `