Skip to main content

frust_widgets/motion/
mod.rs

1//! Motion module: declarative single-child animation wrappers built over
2//! `frust-core`'s `anim` vocabulary
3//! ([`frust_core::AnimationController`]/[`frust_core::Curve`]/
4//! [`frust_core::Tween`]/[`frust_core::Spring`]) and the paint-only
5//! `push_layer`/`push_transform` compositing primitives
6//! ([`frust_core::PaintScene`]).
7//!
8//! # Module map
9//!
10//! Every motion module is pre-declared here so each module's code lives in
11//! its own file and never spills into this module list (mirrors
12//! `nav/mod.rs`'s module-map precedent):
13//!
14//! * [`animated`] — [`AnimatedOpacity`]/[`AnimatedScale`]: declarative
15//!   single-child implicit-animation wrappers. A target-value change
16//!   retargets smoothly (no jump), timed from the theme's
17//!   [`frust_theme::MotionScheme`] by default, or an explicit
18//!   [`crate::Timing`] override.
19//! * [`switcher`] — [`switcher::PatternSwitcher`], a cross-fading
20//!   child-switch wrapper (Flutter's `AnimatedSwitcher`).
21//! * [`patterns`] — higher-level motion patterns (e.g. staggered reveals)
22//!   composed over [`animated`]/[`switcher`].
23//!
24//! # Wholesale facade re-export
25//!
26//! Unlike the baseline widgets' flat per-type re-export lists, the
27//! `frust` facade re-exports this module **wholesale**
28//! (`pub use frust_widgets::motion;`), mirroring the existing
29//! `pub use frust_widgets::icons;` precedent — the only other wholesale
30//! module re-export in the facade today. This lets any future addition to
31//! this module ride along under `frust::motion::*` with no further facade
32//! edits required.
33
34pub mod animated;
35pub mod patterns;
36pub mod switcher;
37
38pub use animated::{
39    AnimatedOpacity, AnimatedOpacityView, AnimatedOpacityWidget, AnimatedScale, AnimatedScaleView,
40    AnimatedScaleWidget, animated_opacity, animated_scale,
41};