virtualizer_adapter/lib.rs
1//! Adapter utilities for the `virtualizer` crate.
2//!
3//! The `virtualizer` crate is UI-agnostic and focuses on the core math and state. This crate
4//! provides small, framework-neutral helpers commonly needed by adapters:
5//!
6//! - Scroll anchoring (e.g. prepend in chat/timelines without visual jumps)
7//! - Tween-based smooth scrolling helpers (optional; adapter-driven)
8//!
9//! This crate is intentionally framework-agnostic (no ratatui/egui bindings).
10#![cfg_attr(not(feature = "std"), no_std)]
11#![forbid(unsafe_code)]
12
13extern crate alloc;
14
15#[cfg(test)]
16extern crate std;
17
18mod anchor;
19mod controller;
20mod key;
21mod tween;
22
23#[cfg(test)]
24mod tests;
25
26pub use anchor::{ScrollAnchor, apply_anchor, capture_first_visible_anchor};
27pub use controller::Controller;
28pub use key::VirtualizerKey;
29pub use tween::{Easing, Tween};