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
77
78
79
80
//! Route transition helpers for screen-to-screen animation.
//!
//! Route animation builds on the state module and adds screen-specific helpers.
//! Use [`RouteAnimator`] for route state, [`RouteScreenTransition`] for paired
//! outgoing and incoming screen timelines, and [`RouteScreenTargets`] to keep
//! each screen's sampled properties separate.
//!
//! ```
//! use aura_anim_iced::{
//! AnimationRuntime, AnimationTargetId, Duration, OPACITY, RouteAnimator,
//! RouteIncomingMotion, RouteScreenTargets, RouteScreenTransition, Timeline,
//! Track,
//! };
//!
//! #[derive(Debug, Clone, Copy, PartialEq, Eq)]
//! enum Route {
//! Home,
//! Settings,
//! }
//!
//! let mut runtime = AnimationRuntime::testing();
//! let route_target = AnimationTargetId::new();
//! let outgoing_target = AnimationTargetId::new();
//! let incoming_target = AnimationTargetId::new();
//! let mut animator = RouteAnimator::new(route_target, Route::Home);
//!
//! let transition = RouteScreenTransition::with_incoming_motion(
//! Route::Home,
//! Route::Settings,
//! Timeline::track(
//! Track::from(OPACITY, 1.0)
//! .to(0.0)
//! .duration(Duration::from_millis(80.0)),
//! ),
//! RouteIncomingMotion::new(
//! iced::Vector::new(24.0, 0.0),
//! Duration::from_millis(120.0),
//! ),
//! );
//!
//! let registration = animator
//! .transition_screens_with(
//! &mut runtime,
//! &transition,
//! RouteScreenTargets::new(outgoing_target, incoming_target),
//! )
//! .expect("route screen transition");
//!
//! assert_eq!(animator.current(), Route::Settings);
//! assert_eq!(runtime.active_count(), 3);
//! assert_eq!(registration.outgoing().handle(), animator.active_screen_transition().unwrap().outgoing_handle());
//! ```
use crate::;
pub use RouteAnimator;
pub use RouteIncomingMotion;
pub use ;
pub use RouteScreenTransition;
/// Active route transition metadata tracked by a [`RouteAnimator`].
pub type ActiveRouteTransition<R> = ;
/// Animation timeline for switching between two application routes.
pub type RouteTransition<R> = ;
/// Route transition collection with optional fallback behavior.
pub type RouteTransitionSet<R> = ;
/// Output produced when a route transition is registered.
pub type RouteTransitionRegistration<R> = ;