teksilo_widgets/animations.rs
1// SPDX-License-Identifier: MPL-2.0
2// SPDX-FileCopyrightText: 2026 FernTech
3
4//! Animation wrapper widgets — subtree wrappers that drive a
5//! framework `Signal<f32>` to animate a paint-time property
6//! (opacity, transform, layout slot) on the wrapped child.
7//!
8//! These wrappers all reuse the framework's animation infrastructure
9//! (`Signal<f32>::animate_to`, `BuildContext::animate()`,
10//! `MotionTokens` durations, `prefers-reduced-motion`) — they do not
11//! schedule timers themselves.
12//!
13//! - [`Fade`] — opacity 0 ↔ 1, layout-transparent.
14//! - [`Collapse`] — height 0 ↔ natural, layout-driving.
15//! - [`Unroll`] — width 0 ↔ natural, layout-driving (horizontal `Collapse`).
16//!
17//! Spinner is a separate concern: it is a *leaf* widget (shader-driven
18//! `AnimatedQuadKind::SpinnerArc`), not a subtree wrapper, and lives at
19//! the crate root.
20
21pub mod blur;
22pub mod collapse;
23pub mod crossfade;
24pub mod cycle;
25pub mod fade;
26pub mod pulse;
27pub mod rotate;
28pub mod scale;
29pub mod shake;
30pub mod slide;
31pub mod smooth_size;
32pub mod unroll;
33
34pub use blur::Blur;
35pub use collapse::Collapse;
36pub use crossfade::Crossfade;
37pub use cycle::Cycle;
38pub use fade::Fade;
39pub use pulse::Pulse;
40pub use rotate::Rotate;
41pub use scale::{Scale, ScaleOrigin};
42pub use shake::Shake;
43pub use slide::{Slide, SlideEdge};
44pub use smooth_size::{SmoothSize, SmoothSizeAxes};
45pub use unroll::{Unroll, UnrollFrom};