/** How a caller narrows what counts as movement. */ export interface DocumentStabilityOptions { /** Stops sampling when the owning capture is replaced or cancelled. */ signal?: AbortSignal; /** * Parts of the screen that never stop on their own — an elapsed clock, a * level meter, a live transcript. Mutations inside them are not movement, * because waiting for them to stop is waiting forever. */ volatileSelectors?: readonly string[]; /** Consecutive identical samples that end the wait. */ requiredStableSamples?: number; /** Gap between samples. */ intervalMs?: number; /** A floor, so a document that renders in one frame is still given a moment. */ minimumWaitMs?: number; /** * A ceiling. A screen that keeps moving is captured mid-movement rather than * never: the frame is worth more than the wait. */ timeoutMs?: number; } /** One mover in a document that would not settle. */ export interface DocumentChurnEntry { target: string; count: number; } /** A compact description of what the document looks like right now. */ export declare function documentStabilitySignature(doc: Document, volatileSelectors?: readonly string[]): string; /** * What kept the document from settling, most active first — read from the * tracker the signature installed, so it reflects the same movement the wait * judged. Empty when nothing moved or nothing was tracked. */ export declare function documentChurnReport(doc: Document, volatileSelectors?: readonly string[], limit?: number): DocumentChurnEntry[]; /** Resolves true when the document held still, false when the ceiling was hit. */ export declare function waitForStableDocument(doc: Document, { signal, volatileSelectors, requiredStableSamples, intervalMs, minimumWaitMs, timeoutMs, }?: DocumentStabilityOptions): Promise;