2023-06-23 22:13:14 +01:00
|
|
|
// #![feature(doc_cfg)]
|
2023-05-27 03:00:08 +01:00
|
|
|
//! Collection of essential Leptos utilities inspired by SolidJS USE / VueUse
|
|
|
|
|
2023-07-14 22:43:19 +01:00
|
|
|
use cfg_if::cfg_if;
|
|
|
|
|
2023-05-14 22:45:38 +01:00
|
|
|
pub mod core;
|
2023-05-29 01:52:03 +01:00
|
|
|
#[cfg(feature = "docs")]
|
|
|
|
pub mod docs;
|
2023-06-03 05:25:45 +01:00
|
|
|
#[cfg(feature = "math")]
|
|
|
|
pub mod math;
|
2023-06-08 23:52:14 +01:00
|
|
|
#[cfg(feature = "storage")]
|
|
|
|
pub mod storage;
|
2023-06-10 19:15:41 +01:00
|
|
|
pub mod utils;
|
|
|
|
|
2023-07-14 22:43:19 +01:00
|
|
|
cfg_if! { if #[cfg(web_sys_unstable_apis)] {
|
|
|
|
mod use_element_size;
|
|
|
|
mod use_resize_observer;
|
2023-06-10 23:59:32 +01:00
|
|
|
|
2023-07-14 22:43:19 +01:00
|
|
|
pub use use_element_size::*;
|
|
|
|
pub use use_resize_observer::*;
|
|
|
|
}}
|
2023-06-10 23:59:32 +01:00
|
|
|
|
2023-06-13 17:48:32 +01:00
|
|
|
mod on_click_outside;
|
2023-06-17 14:05:17 +01:00
|
|
|
mod use_active_element;
|
2023-06-10 23:59:32 +01:00
|
|
|
mod use_breakpoints;
|
2023-06-24 01:17:23 +01:00
|
|
|
mod use_color_mode;
|
2023-06-16 19:33:55 +01:00
|
|
|
mod use_css_var;
|
2023-06-24 01:17:23 +01:00
|
|
|
mod use_cycle_list;
|
2023-06-10 23:59:32 +01:00
|
|
|
mod use_debounce_fn;
|
2023-07-07 23:37:22 +01:00
|
|
|
mod use_document_visibility;
|
2023-06-17 04:05:51 +01:00
|
|
|
mod use_element_hover;
|
2023-06-11 01:01:54 +01:00
|
|
|
mod use_element_visibility;
|
2023-05-27 03:00:08 +01:00
|
|
|
mod use_event_listener;
|
2023-06-10 13:49:00 +01:00
|
|
|
mod use_favicon;
|
2023-06-10 23:59:32 +01:00
|
|
|
mod use_intersection_observer;
|
2023-06-15 18:02:13 +02:00
|
|
|
mod use_interval;
|
2023-06-14 16:15:03 +01:00
|
|
|
mod use_interval_fn;
|
2023-07-14 05:48:37 +01:00
|
|
|
mod use_intl_number_format;
|
2023-06-10 03:19:00 +01:00
|
|
|
mod use_media_query;
|
2023-06-02 13:38:01 +01:00
|
|
|
mod use_mouse;
|
2023-06-13 00:31:38 +01:00
|
|
|
mod use_mutation_observer;
|
2023-06-10 03:47:31 +01:00
|
|
|
mod use_preferred_contrast;
|
|
|
|
mod use_preferred_dark;
|
2023-05-27 03:00:08 +01:00
|
|
|
mod use_scroll;
|
2023-05-29 01:52:03 +01:00
|
|
|
mod use_supported;
|
2023-05-27 03:00:08 +01:00
|
|
|
mod use_throttle_fn;
|
2023-07-14 16:43:42 +01:00
|
|
|
mod use_websocket;
|
2023-07-07 23:37:22 +01:00
|
|
|
mod use_window_focus;
|
|
|
|
mod use_window_scroll;
|
2023-05-29 01:52:03 +01:00
|
|
|
mod watch;
|
2023-06-08 23:52:14 +01:00
|
|
|
mod watch_debounced;
|
2023-06-10 00:57:35 +01:00
|
|
|
mod watch_pausable;
|
2023-06-08 23:52:14 +01:00
|
|
|
mod watch_throttled;
|
2023-06-11 17:11:16 +01:00
|
|
|
mod whenever;
|
2023-05-28 17:42:16 +01:00
|
|
|
|
2023-06-13 17:48:32 +01:00
|
|
|
pub use on_click_outside::*;
|
2023-06-17 14:05:17 +01:00
|
|
|
pub use use_active_element::*;
|
2023-06-10 19:15:41 +01:00
|
|
|
pub use use_breakpoints::*;
|
2023-06-24 01:17:23 +01:00
|
|
|
pub use use_color_mode::*;
|
2023-06-16 19:33:55 +01:00
|
|
|
pub use use_css_var::*;
|
2023-06-24 01:17:23 +01:00
|
|
|
pub use use_cycle_list::*;
|
2023-05-26 18:09:01 +01:00
|
|
|
pub use use_debounce_fn::*;
|
2023-07-07 23:37:22 +01:00
|
|
|
pub use use_document_visibility::*;
|
2023-06-17 04:05:51 +01:00
|
|
|
pub use use_element_hover::*;
|
2023-06-11 01:01:54 +01:00
|
|
|
pub use use_element_visibility::*;
|
2023-05-28 17:42:16 +01:00
|
|
|
pub use use_event_listener::*;
|
2023-06-10 13:49:00 +01:00
|
|
|
pub use use_favicon::*;
|
2023-06-10 23:59:32 +01:00
|
|
|
pub use use_intersection_observer::*;
|
2023-06-15 18:02:13 +02:00
|
|
|
pub use use_interval::*;
|
2023-06-14 16:15:03 +01:00
|
|
|
pub use use_interval_fn::*;
|
2023-07-14 05:48:37 +01:00
|
|
|
pub use use_intl_number_format::*;
|
2023-06-10 03:19:00 +01:00
|
|
|
pub use use_media_query::*;
|
2023-06-02 13:38:01 +01:00
|
|
|
pub use use_mouse::*;
|
2023-06-13 00:31:38 +01:00
|
|
|
pub use use_mutation_observer::*;
|
2023-06-10 03:47:31 +01:00
|
|
|
pub use use_preferred_contrast::*;
|
|
|
|
pub use use_preferred_dark::*;
|
2023-05-19 00:58:48 +01:00
|
|
|
pub use use_scroll::*;
|
2023-05-29 01:52:03 +01:00
|
|
|
pub use use_supported::*;
|
2023-05-19 00:58:48 +01:00
|
|
|
pub use use_throttle_fn::*;
|
2023-07-14 16:43:42 +01:00
|
|
|
pub use use_websocket::*;
|
2023-07-07 23:37:22 +01:00
|
|
|
pub use use_window_focus::*;
|
|
|
|
pub use use_window_scroll::*;
|
2023-05-29 01:52:03 +01:00
|
|
|
pub use watch::*;
|
2023-06-08 23:52:14 +01:00
|
|
|
pub use watch_debounced::*;
|
2023-06-10 00:57:35 +01:00
|
|
|
pub use watch_pausable::*;
|
2023-06-08 23:52:14 +01:00
|
|
|
pub use watch_throttled::*;
|
2023-06-11 17:11:16 +01:00
|
|
|
pub use whenever::*;
|