/** * The small structural slice of Playwright's Page used by the audit. Keeping * this type dependency-free lets the browser-truth checker ship in the main * package while the CLI still loads Playwright only on demand. */ export interface LayoutAuditPage { evaluate(fn: () => Result | Promise): Promise>; evaluate(fn: (arg: Arg) => Result | Promise, arg: Arg): Promise>; waitForSelector(selector: string, options?: { state?: "attached" | "visible"; timeout?: number; }): Promise; viewportSize(): { width: number; height: number; } | null; setViewportSize(size: { width: number; height: number; }): Promise; } export interface LayoutDiagnostic { severity: "error" | "warning"; element: string; message: string; fix: string; /** Managed-tier geometry failures are usually library bugs — say so instead of blaming the manifest. */ blame: "manifest" | "library"; /** Viewport width (CSS px) the failure was observed at. */ width: number; } export interface AuditOptions { /** Viewport widths to sweep — exercises responsive behavior in one pass. */ widths?: number[]; } export declare const DEFAULT_AUDIT_WIDTHS: number[]; export declare const EDGE_TOLERANCE_PX = 2; /** * THE exemption table (spec: "Widget Layout Manager" — exemptions live in * ONE enumerated place so feature growth can't quietly hollow the checker). * Every entry names its expiry condition. * * No exemptions remain: responsive auto-fold makes the full narrow-width * sweep a release gate. */ export declare const AUDIT_EXEMPTIONS: readonly []; /** Settle contract — resolve when layout is trustworthy, never a timeout. Handles both lanes (React pages have no element — slot containers are the common marker). */ export declare function settleLayout(page: LayoutAuditPage): Promise; /** * Run the audit across a viewport-width sweep. The page must already be * loaded (`page.goto` done); each width re-settles before measuring. */ export declare function auditLayout(page: LayoutAuditPage, opts?: AuditOptions): Promise;