import React from "react"; /** * Global animation tick context. * * Provides a single `tick` counter (incremented every TICK_INTERVAL ms) * that all animated components derive their frames from via modular * arithmetic. This replaces per-component setIntervals that each caused * independent React re-renders — N spinners no longer means N timers. * * The tick only runs while at least one component has registered via * `useAnimationActive()`, avoiding 10 re-renders/sec during idle streaming * when no spinners or animations are visible. */ declare const TICK_INTERVAL = 100; export declare function AnimationProvider({ children }: { children: React.ReactNode; }): import("react/jsx-runtime").JSX.Element; /** Returns the current global animation tick counter. */ export declare function useAnimationTick(enabled?: boolean): number; /** Returns whether the terminal currently has focus when focus reporting is supported. */ export declare function useTerminalFocus(enabled?: boolean): boolean; /** * Register this component as needing animation ticks. * The global timer only runs while at least one component is registered. * Call this in any component that uses animation frames (spinners, shimmer, etc). */ export declare function useAnimationActive(enabled?: boolean): void; export declare function useFocusedAnimation(enabled?: boolean): { active: boolean; tick: number; }; /** Derive a frame index from the global tick for a given interval and frame count. */ export declare function deriveFrame(tick: number, intervalMs: number, frameCount: number): number; /** * Check if reduced-motion is requested. * Respects NO_MOTION and REDUCE_MOTION env vars. */ export declare function useReducedMotion(): boolean; export { TICK_INTERVAL }; //# sourceMappingURL=AnimationContext.d.ts.map