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
#![doc(
    html_logo_url = "https://freyaui.dev/logo.svg",
    html_favicon_url = "https://freyaui.dev/logo.svg"
)]
//! # Freya
//!
//! **Freya** is a declarative, cross-platform GUI Rust library, powered by 🧬 [Dioxus](https://dioxuslabs.com) and 🎨 [Skia](https://skia.org/).
//!
//! **It does not use any web tech**, check the [Differences with Dioxus](https://book.freyaui.dev/differences_with_dioxus.html).
//!
//! ### Basics
//! - [Introduction](self::_docs::introduction)
//! - [Dioxus Fundamentals](self::_docs::dioxus_fundamentals)
//!     - [UI](self::_docs::ui)
//!     - [Components](self::_docs::components_and_props)
//!     - [Hooks](self::_docs::hooks)
//!     - [State Management](self::_docs::state_management)
//!         - [Signals](self::_docs::state_management::signals)
//!         - [Global Signals](self::_docs::state_management::global_signals)
//!         - [Lifecycle](self::_docs::state_management::lifecycle)
//!         - [Context](self::_docs::state_management::context)
//!         - [Memoization](self::_docs::state_management::memoization)
//!     - [Async Tasks](self::_docs::async_tasks)
//!
//! ### Learn
//! - [Development Setup](self::_docs::development_setup)
//! - [Elements Overview](self::_docs::elements)
//! - [Theming](self::_docs::theming)
//! - [i18n](self::_docs::i18n)
//! - [Accessibility](self::_docs::accessibility)
//! - [Router](self::_docs::router)
//!     - [Native Router](self::_docs::router::native_router)
//!     - [Animated transitions](self::_docs::router::animated_transitions)
//! - [Third Party State Managemement](self::_docs::third_party_state)
//! - [Devtools](self::_docs::devtools)
//! - [Performance Tips](self::_docs::performance)
//!
//! ### Advanced
//! - [Animations](self::hooks::use_animation)
//! - [Text Editing](self::hooks::use_editable)
//! - [Unit Testing of Components](freya_testing)
//!
//! ### API References
//! - [Elements and attributes](self::elements#structs)
//! - [Events](self::events#functions)
//! - [Built-in Components](self::components)
//! - [Built-in Components Gallery](self::components::gallery)
//! - [Built-in Hooks](self::hooks)
//!
//! ## Features flags
//!
//! - `devtools`: enables a side panel to inspect your App tree, styles and computed layout.
//! - `use_camera`: enables the `use_camera` hook.

/// Freya docs.
#[cfg(doc)]
pub mod _docs;

/// Dioxus library.
pub use dioxus;
pub use dioxus_core;
#[cfg(doc)]
pub use freya_elements::_docs as elements_docs;

/// Launch your app.
pub mod launch;

/// Collection of components.
///
/// Go to [Gallery](freya_components::gallery) to see previews of the components.
pub mod components {
    pub use freya_components::*;
}

/// Useful utilities.
pub mod hooks {
    pub use freya_hooks::*;
}

/// Common data structures and utils.
pub mod common {
    pub use freya_core::*;
}

/// Core APIs.
pub mod core {
    pub use freya_core::*;
}

/// Elements, attributes and events definitions.
pub use freya_elements::elements;
/// Events data.
pub use freya_elements::events;
pub use torin;

pub mod plugins;

/// Useful imports.
pub mod prelude {
    pub use dioxus_core::{
        prelude::*,
        {
            self,
        },
    };
    pub use dioxus_core_macro::*;
    pub use dioxus_hooks::*;
    pub use dioxus_signals::*;
    pub use freya_components::*;
    pub use freya_core::{
        custom_attributes::{
            dynamic_bytes,
            static_bytes,
            CustomAttributeValues,
        },
        platform::*,
        platform_state::*,
        types::AccessibilityId,
    };
    pub use freya_elements::{
        self as dioxus_elements,
        events::*,
    };
    pub use freya_hooks::*;
    pub use freya_winit::*;
    pub use torin::prelude::*;

    pub use crate::{
        launch::*,
        plugins::*,
    };
}