1use std::{collections::HashMap, path::PathBuf};
7
8pub use atlas_ui_components as components;
9pub use atlas_ui_core as core;
10#[cfg(feature = "documents")]
11pub use atlas_ui_documents as documents;
12pub use atlas_ui_icons as icons;
13pub use atlas_ui_tokens as tokens;
14
15pub const COMPONENT_LIBRARY: &str = "atlas-ui";
17
18#[must_use]
25pub fn slint_library_paths() -> HashMap<String, PathBuf> {
26 HashMap::from([
27 (COMPONENT_LIBRARY.to_owned(), components::ui_path()),
28 ("atlas-ui-core".to_owned(), core::ui_path()),
29 ("atlas-ui-icons".to_owned(), icons::ui_path()),
30 ("atlas-ui-tokens".to_owned(), tokens::ui_path()),
31 ])
32}
33
34#[must_use]
36pub fn stable_slint_path() -> PathBuf {
37 components::ui_path().join("stable.slint")
38}
39
40#[must_use]
42pub fn preview_slint_path() -> PathBuf {
43 components::ui_path().join("preview.slint")
44}
45
46#[cfg(test)]
47mod tests {
48 use super::{preview_slint_path, slint_library_paths, stable_slint_path};
49
50 #[test]
51 fn exported_slint_paths_exist() {
52 assert!(stable_slint_path().is_file());
53 assert!(preview_slint_path().is_file());
54 assert!(slint_library_paths().values().all(|path| path.is_dir()));
55 }
56}