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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
//! # Leptos Motion
//!
//! A comprehensive animation library for Leptos with Framer Motion-inspired API.
//!
//! ## Features
//!
//! - **Declarative animations** with Motion-style API
//! - **Hardware acceleration** via Web Animations API with RAF fallback
//! - **Gesture support** for drag, hover, tap, and more
//! - **Layout animations** using FLIP technique
//! - **Scroll animations** with intersection observers
//! - **Type safety** with full Rust compile-time validation
//! - **High performance** targeting 60fps for 100+ concurrent animations
//! - **Animation presets** for common patterns
//! - **Keyframe animations** for complex multi-step animations
//! - **Variants** for named animation states
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use leptos::*;
//! use leptos_motion::*;
//! use std::collections::HashMap;
//!
//! #[component]
//! fn App() -> impl IntoView {
//! let mut initial = HashMap::new();
//! initial.insert("opacity".to_string(), AnimationValue::Number(0.0));
//! initial.insert("scale".to_string(), AnimationValue::Number(0.5));
//!
//! let mut animate = HashMap::new();
//! animate.insert("opacity".to_string(), AnimationValue::Number(1.0));
//! animate.insert("scale".to_string(), AnimationValue::Number(1.0));
//!
//! view! {
//! <MotionDiv
//! class="my-element".to_string()
//! initial=initial
//! animate=animate
//! transition=Transition {
//! duration: Some(0.5),
//! ease: Easing::EaseOut,
//! delay: None,
//! repeat: RepeatConfig::Never,
//! stagger: None,
//! }
//! >
//! "Hello Leptos Motion!"
//! </MotionDiv>
//! }
//! }
//! ```
//!
//! ## Core Concepts
//!
//! ### Animation Values
//!
//! Animation values represent different types of animatable properties:
//!
//! ```rust,no_run
//! use leptos_motion::*;
//!
//! let opacity = AnimationValue::Number(1.0);
//! let position = AnimationValue::Pixels(100.0);
//! let rotation = AnimationValue::Degrees(45.0);
//! let color = AnimationValue::Color("#ff0000".to_string());
//! ```
//!
//! ### Transitions
//!
//! Configure how animations behave:
//!
//! ```rust,no_run
//! # use leptos_motion::*;
//! // Spring animation
//! let spring = Transition {
//! ease: Easing::Spring(SpringConfig {
//! stiffness: 100.0,
//! damping: 10.0,
//! mass: 1.0,
//! ..Default::default()
//! }),
//! ..Default::default()
//! };
//!
//! // Tween animation
//! let tween = Transition {
//! duration: Some(0.3),
//! ease: Easing::EaseInOut,
//! delay: Some(0.1),
//! ..Default::default()
//! };
//! ```
//!
//! ### Gestures
//!
//! Add interactivity to your animations:
//!
//! ```rust,no_run
//! # use leptos::*;
//! # use leptos_motion::*;
//! # use std::collections::HashMap;
//! # fn main() {
//! let mut hover_target = HashMap::new();
//! hover_target.insert("scale".to_string(), AnimationValue::Number(1.1));
//!
//! let mut tap_target = HashMap::new();
//! tap_target.insert("scale".to_string(), AnimationValue::Number(0.9));
//!
//! let _view = view! {
//! <MotionDiv
//! while_hover=hover_target
//! while_tap=tap_target
//! drag=DragConfig::default()
//! >
//! "Interactive element"
//! </MotionDiv>
//! };
//! # }
//! ```
// Re-export core functionality
pub use ;
// Re-export performance module if available
pub use performance;
// Re-export DOM functionality
pub use ;
// Re-export macros
pub use motion_target;
pub use *;
pub use *;
pub use *;
pub use *;
/// Animation presets and common patterns
/// Re-export commonly used external types
/// Version information
pub const VERSION: &str = env!;
/// Library information
pub const DESCRIPTION: &str = env!;