/** @internal */ export type Phase = "hidden" | "entering" | "shown" | "leaving"; /** @internal */ export type IntersectionState = { phase: Phase; direction: 1 | -1; enterProgress: number; leaveProgress: number; /** Logical in/out after hysteresis. */ isIn: boolean; /** Last frame's ratio was at or above `threshold`. */ wasAbove: boolean; /** Last frame's ratio was below `leaveThreshold`. */ wasBelow: boolean; /** Virtual time of the last step. */ lastTime: number; }; /** @internal */ export declare function createIntersectionState(now: number): IntersectionState; /** * In/out with hysteresis. Updates `wasAbove` / `wasBelow`, not `isIn`. * A threshold of 0 counts a touching element as in. * @internal */ export declare function nextIsIn(state: IntersectionState, ratio: number, touching: boolean, threshold: number, leaveThreshold: number): boolean; /** * Skip a frame without moving progress, e.g. while frozen. * The next step then starts from `now`. * @internal */ export declare function pauseIntersection(state: IntersectionState, now: number): void; /** * Advance the state. Mutates and returns it. * `duration` must be above 0. * @internal */ export declare function stepIntersection(state: IntersectionState, isIn: boolean, now: number, duration: number): IntersectionState;