/** Distance from the true bottom at which a downward scroll resumes following. */ export declare const BOTTOM_RESUME_THRESHOLD_PX = 8; /** Ignore sub-pixel scroll jitter when classifying upward movement. */ export declare const SCROLL_UP_TOLERANCE_PX = 2; export interface ThreadFollowState { readonly following: boolean; readonly lastScrollTop: number | null; readonly lastDistanceFromBottom: number | null; } export type ThreadFollowEvent = { type: 'scrolled'; scrollTop: number; distanceFromBottom: number; } | { type: 'scrolled-up'; } | { type: 'bottom-requested'; } | { type: 'reset'; }; export declare function createThreadFollowState(): ThreadFollowState; /** * Keeps streaming layout changes separate from deliberate reader scrolling. * * `scrollTop` alone cannot distinguish a reader scrolling up from layout * moving the content under a stationary reader: a collapsing live-activity * box shrinks `scrollHeight` and the browser clamps `scrollTop` down, and * `maintainVisibleContentPosition` adjusts `scrollTop` when a row above the * viewport re-measures smaller. Both look like an upward scroll but keep the * reader the same distance from the bottom (or closer). A *real* upward * scroll moves the reader **away** from the bottom, so detaching requires * both signals: `scrollTop` decreased *and* `distanceFromBottom` increased. */ export declare function reduceThreadFollow(state: ThreadFollowState, event: ThreadFollowEvent): ThreadFollowState; //# sourceMappingURL=threadFollowState.d.ts.map