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
use std::{
    any::Any,
    hash::BuildHasherDefault,
};

use node_ref::NodeMask;
use rustc_hash::FxHasher;

pub mod attributes;
pub mod dioxus;
pub mod events;
pub mod node;
pub mod node_ref;
mod passes;
pub mod real_dom;
pub mod tags;
pub mod tree;

pub use shipyard::EntityId as NodeId;

pub mod exports {
    //! Important dependencies that are used by the rest of the library
    //! Feel free to just add the dependencies in your own Crates.toml
    // exported for the macro
    #[doc(hidden)]
    pub use rustc_hash::FxHashSet;
    pub use shipyard;
}

/// A prelude of commonly used items
pub mod prelude {
    pub use crate::{
        attributes::*,
        dioxus::*,
        events::*,
        node::{
            ElementNode,
            FromAnyValue,
            NodeType,
            OwnedAttributeView,
        },
        node_ref::{
            AttributeMaskBuilder,
            NodeMaskBuilder,
            NodeView,
        },
        passes::{
            run_pass,
            Dependancy,
            DependancyView,
            Dependants,
            PassDirection,
            RunPassView,
            State,
            TypeErasedState,
        },
        real_dom::{
            NodeImmutable,
            NodeMut,
            NodeRef,
            RealDom,
        },
        NodeId,
        SendAnyMap,
    };
}

/// A map that can be sent between threads
pub type FxDashMap<K, V> = dashmap::DashMap<K, V, BuildHasherDefault<FxHasher>>;
/// A set that can be sent between threads
pub type FxDashSet<K> = dashmap::DashSet<K, BuildHasherDefault<FxHasher>>;
/// A map of types that can be sent between threads
pub type SendAnyMap = anymap::Map<dyn Any + Send + Sync + 'static>;