Skip to main content

euv_ui/
lib.rs

1//! euv-ui
2//!
3//! Reusable UI component library for the euv framework,
4//! providing buttons, cards, modals, inputs, theme management, and more.
5
6mod component;
7mod dom;
8mod hook;
9mod style;
10
11#[cfg(test)]
12#[path = "../tests/mod.rs"]
13mod tests;
14
15pub use {component::*, hook::*, style::*};
16
17pub(crate) use hook::use_form_reset;
18
19use dom::*;
20
21use euv::*;
22
23use std::{
24    any::Any,
25    cell::{Cell, Ref, RefCell, RefMut, UnsafeCell},
26    collections::{HashMap, HashSet},
27    fmt::{self, Debug, Display, Formatter},
28    hash::Hash,
29    ops::Deref,
30    panic::{AssertUnwindSafe, UnwindSafe, catch_unwind},
31    ptr::addr_of_mut,
32    rc::Rc,
33    sync::{
34        LazyLock, OnceLock, PoisonError, RwLock, RwLockReadGuard, RwLockWriteGuard,
35        atomic::{AtomicBool, AtomicUsize, Ordering},
36    },
37};
38
39#[cfg(not(target_arch = "wasm32"))]
40use std::time::{Duration, SystemTime, UNIX_EPOCH};
41
42// The weak handle the splitter's drag teardown uses to reach its own
43// slot without keeping it alive. Only the browser build has a drag.
44#[cfg(target_arch = "wasm32")]
45use std::rc::Weak;
46
47use wasm_bindgen_futures::*;
48
49#[cfg(test)]
50use proc_macro2::{Delimiter, TokenStream, TokenTree};
51#[cfg(test)]
52use syn::LitStr;