/** * Visual Diff * * Pixel-by-pixel comparison of screenshots using a simple diff algorithm. * Uses raw pixel comparison without external dependencies. */ export interface VisualDiffResult { mismatchPercentage: number; mismatchCount: number; totalPixels: number; diffImagePath?: string; /** Path to the interactive HTML viewer with side-by-side + overlay views. */ diffViewerPath?: string; pass: boolean; /** * When the comparison failed for IO/permission reasons (NOT a real pixel * mismatch), this carries the error message. CI users debugging "100% * mismatch" can check this to distinguish a real regression from a typo * in baselineDir or a missing baseline. */ error?: string; /** True when the baseline was not found (vs. a real error). */ baselineMissing?: boolean; } /** * Simple visual diff using Playwright's built-in comparison. * Takes two PNG buffers and returns mismatch info. * * For pixel-perfect comparison, we compare raw buffer bytes. * For a production-grade solution, pixelmatch can be added as optional dep. */ export declare function visualDiff(baseline: Buffer, current: Buffer, options?: { threshold?: number; outputPath?: string; }): Promise; /** * Compare screenshots from a directory against baselines. */ export declare function diffDirectory(baselineDir: string, currentDir: string, options?: { threshold?: number; }): Promise>; //# sourceMappingURL=visualDiff.d.ts.map