@apatureai/verdict-capture
v0.1.4
Published
verdict capture worker: deterministic Chromium capture, DOM geometry, and the code-computed contrast / overflow / touch-target checks.
Maintainers
Readme
@apatureai/verdict-capture
The capture and measurement layer of verdict: deterministic headless-Chromium capture, a DOM geometry map, and the code-computed WCAG checks (contrast, horizontal overflow, touch-target size) that a critique is grounded on.
The check functions are pure — no browser, no model, no API key — so they run identically on captured data and in a unit test.
import { contrastRatio, contrastViolations } from "@apatureai/verdict-capture";
contrastRatio({ r: 138, g: 138, b: 138 }, { r: 255, g: 255, b: 255 }); // 3.45See the repository README for the
full pipeline and a runnable example under
examples/.
Status: 0.1.x, API may still move. Requires Node >= 24. The Playwright entry point (
@apatureai/verdict-capture/playwright) additionally needsplaywright-core's Chromium; the pure check functions do not.
