leptos_motion_dom/
lib.rs

1//! Leptos Motion DOM Integration
2//!
3//! Leptos components and DOM utilities for motion animations
4
5#![warn(missing_docs)]
6#![forbid(unsafe_code)]
7
8pub mod components;
9pub mod elements;
10pub mod hooks;
11pub mod improved_motion_div;
12pub mod performance;
13pub mod presence;
14pub mod simplified_event_handling;
15pub mod utils;
16
17#[cfg(feature = "css-animations")]
18pub mod css_animations;
19
20#[cfg(test)]
21mod accessibility_tests;
22
23#[cfg(test)]
24mod components_tests;
25#[cfg(test)]
26mod motion_div_tdd_tests;
27
28#[cfg(test)]
29mod drag_animation_tests {
30    include!("drag_animation_tests.rs");
31}
32
33#[cfg(test)]
34mod drag_integration_tests {
35    include!("drag_integration_tests.rs");
36}
37
38#[cfg(test)]
39mod momentum_animation_tests {
40    include!("momentum_animation_tests.rs");
41}
42
43#[cfg(test)]
44mod momentum_integration_tests {
45    include!("momentum_integration_tests.rs");
46}
47
48// #[cfg(test)]
49// mod phase1_engine_integration_tests;
50
51// #[cfg(test)]
52// mod phase2_leptos_compatibility_tests;
53
54// #[cfg(test)]
55// mod phase3_feature_completion_tests;
56
57// #[cfg(test)]
58// mod phase4_performance_polish_tests;
59
60// Re-export commonly used items
61// pub use components::*; // Temporarily disabled due to unused imports
62pub use elements::*;
63pub use hooks::*;
64pub use presence::*;
65pub use utils::*;
66
67#[cfg(feature = "css-animations")]
68pub use css_animations::*;
69
70// Re-export components
71pub use components::{MotionDiv, MotionSpan};
72pub use improved_motion_div::{
73    ImprovedMotionDiv, use_animation_state, use_drag_state, use_in_view, use_layout_animation,
74};
75
76// Re-export simplified event handling (new public API)
77pub use simplified_event_handling::{
78    DragAxis, DragConfig, DragConstraints, EventHandlers, MotionProps, SimplifiedDragConfig,
79    SimplifiedMotionProps,
80};
81
82// Re-export core types for convenience
83pub use leptos_motion_core::{
84    AnimationConfig, AnimationEngine, AnimationHandle, AnimationTarget, AnimationValue,
85    ComplexValue, Easing, MotionNumber, MotionTransform, MotionValue, MotionValues, RepeatConfig,
86    SpringConfig, StaggerConfig, StaggerFrom, Transform, Transition, Variants,
87};
88
89// Include simplified event handling tests
90#[cfg(test)]
91mod simplified_event_handling_tests {
92    include!("simplified_event_handling_tests.rs");
93}