import { type PixelDiff } from "./pixels.js"; import type { ShotRecord } from "../types.js"; /** The baseline's pixels, read before the capture writes over them. */ export declare function snapshotBaseline(pixels: ReadonlyMap): Promise>; /** * Compare each shot whose hash moved against the pixels kept for it. Run one * at a time: a full-page shot decodes to tens of megabytes raw, and the whole * scope in flight at once would hold all of them. */ export declare function measureMoves(args: { shots: Iterable; priorHashes: ReadonlyMap; before: ReadonlyMap; evidenceDir: string; }): Promise>; export interface ShotVerdicts { /** Shots whose pixels moved since the previous run. */ changedShots: Set; /** How many shots had a baseline to compare against at all. */ baselineShots: number; /** Shots whose move was measured, by id. Absent means moved but unmeasured. */ changes: Map; } /** * The per-shot decision, pure. A measurement can only ever move a shot from * changed to unchanged, and only by proving the two images are identical, so * this is never weaker than the hash comparison it replaces. */ export declare function classifyShots(args: { shots: readonly Pick[]; priorHashes: ReadonlyMap; measured: ReadonlyMap; }): ShotVerdicts; /** One shot's move, as the record and the report both keep it. */ export interface ShotMove { shotId: string; /** Pixels that differ, and out of how many. */ changed: number; total: number; fraction: number; /** The same thing in the words the ruling prints. */ said: string; /** Present only when the two captures are not the same size. */ sizeChanged?: true; } /** At most this many moves are kept: a ruling names the largest, not every one. */ export declare const MAX_MOVES = 8; /** The moves worth writing down, largest first. */ export declare function movesRecorded(changes: ReadonlyMap, cap?: number): ShotMove[];