Lightweight scroll-rate estimator for gesture detection.
Tracks a sliding window of scroll event timestamps and computes a velocity
tier (:idle, :medium, :fast) based on event rate. The tier is read by
MingaEditor.Window.scroll_follow_cursor?/3 to tell whether a wheel/trackpad
scroll gesture is in progress, so the render pipeline holds the free-scrolled
viewport instead of re-anchoring to the cursor mid-gesture.
The velocity-aware overscan sizing and directional prefetch that this module also fed were deleted with full residence on by default and huge files refused (#2680, epic #2652), which is why only the rate tier remains.
Summary
Types
@type t() :: %MingaEditor.Window.ScrollVelocity{ count: non_neg_integer(), last_event: integer(), prev_count: non_neg_integer(), window_start: integer() }
@type tier() :: :idle | :medium | :fast