1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//! Motion primitives that respect the user's reduced-motion preference.
//!
//! The layers build on each other:
//!
//! - [`CubicBezier`] and [`Easing`] name curves;
//! - [`Spring`] solves physical motion in closed form;
//! - [`MotionSpec`] pairs a curve with a duration and delay;
//! - [`Interpolate`] moves a value between two states;
//! - [`Keyframes`] takes a value through named stops rather than straight
//! across;
//! - [`Transition`] animates a value whose target can change mid-flight,
//! carrying the speed it already had across a retarget;
//! - [`VelocityTracker`] measures how fast a gesture is moving, which is what
//! [`flick`], [`rubber_band`] and [`Transition::release`] need;
//! - [`ScrollLink`] reads a scroll offset as a progress, which is motion with
//! no clock in it at all;
//! - [`Presence`] keeps an element alive long enough to animate out, and plays
//! a phase backwards from where it had got to when the other cancels it;
//! - [`Stagger`] spreads one specification across a group, forwards or in
//! reverse;
//! - [`Sequence`] runs specifications one after another and knows how long
//! they take together;
//! - [`Flipping::flip`] slides an element from where it was to where it is,
//! and [`Flipping::flip_size`] additionally resizes it;
//! - [`Animated::animate_in`] puts any of this on an element in one call,
//! which is the layer most components should reach for.
//!
//! Motion never changes what a surface publishes. A slide, a press response
//! and a counting number are all painted over a layout, a hit target and a
//! semantic tree that already report the settled value.
//!
//! Decorative motion built on GPUI's `with_animation` already stops when
//! [`gpui::App::reduce_motion`] is set. [`Transition::animate`] and
//! [`Presence::animate`] honor the same preference by finishing immediately.
pub
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use Interpolate;
pub use ;
pub use ;
pub use ScrollLink;
pub use Sequence;
pub use ;
pub use Spring;
pub use ;
pub use Transition;
pub use ;
pub use AnimationExt;
/// Whether the user asked for non-essential motion to be suppressed.