/** * Page-level helpers the web capture engine drives: scheme plumbing, settling, * element resolution, and the scheme read-back. Split from web.ts so the * engine file holds only the walk itself. */ import type { Locator, Page } from "playwright"; import type { ResolvedConfig, Scheme, ShotRecord } from "../types.js"; export declare function schemeUrl(resolved: ResolvedConfig, routeUrl: string, scheme: Scheme): string; export declare function setScheme(resolved: ResolvedConfig, page: Page, scheme: Scheme): Promise; export declare function settle(page: Page, settleMs: number): Promise; export declare function resolveElement(page: Page, selector: string | undefined): Promise; /** * Scheme read-back: when the dark and light shots of the same route, state, * and form factor are byte-identical, the app ignored the configured scheme * mechanism and one label is a lie. The capture-ui lesson: never trust a * scheme switch without reading it back. Filed on the light shot as a warning * (a page can legitimately look near-identical, but byte-identical means the * mechanism did nothing). */ export declare function markSchemeMismatches(shots: ShotRecord[]): void; /** * Indicator read-back: a focus or hover shot whose pixels are identical to its * own rest shot means the interaction changed nothing on screen. * * This is the half of a focus or hover state a judge cannot rule on. A * screenshot never draws the cursor, and a judge sees a state's view group * without its rest sibling, so "hovering this did nothing" is not visible in * the evidence it is given: it is a comparison, and comparisons are what the * deterministic channel is for. The same read-back the scheme check does. * * One-sided on purpose. Identical pixels prove the interaction did nothing; * different pixels prove only that SOMETHING moved, which a clock or a lazy * image can do on its own, so nothing is filed in that direction. */ export declare function markIndicatorReadback(shots: ShotRecord[]): void;