use std::{collections::HashMap, path::PathBuf};
pub use atlas_ui_components as components;
pub use atlas_ui_core as core;
#[cfg(feature = "documents")]
pub use atlas_ui_documents as documents;
pub use atlas_ui_icons as icons;
pub use atlas_ui_tokens as tokens;
pub const COMPONENT_LIBRARY: &str = "atlas-ui";
#[must_use]
pub fn slint_library_paths() -> HashMap<String, PathBuf> {
HashMap::from([
(COMPONENT_LIBRARY.to_owned(), components::ui_path()),
("atlas-ui-core".to_owned(), core::ui_path()),
("atlas-ui-icons".to_owned(), icons::ui_path()),
("atlas-ui-tokens".to_owned(), tokens::ui_path()),
])
}
#[must_use]
pub fn stable_slint_path() -> PathBuf {
components::ui_path().join("stable.slint")
}
#[must_use]
pub fn preview_slint_path() -> PathBuf {
components::ui_path().join("preview.slint")
}
#[must_use]
pub fn preview_nonresponsive_slint_path() -> PathBuf {
components::ui_path().join("preview-nonresponsive.slint")
}
#[cfg(test)]
mod tests {
use super::{
preview_nonresponsive_slint_path, preview_slint_path, slint_library_paths,
stable_slint_path,
};
#[test]
fn exported_slint_paths_exist() {
assert!(stable_slint_path().is_file());
assert!(preview_slint_path().is_file());
assert!(preview_nonresponsive_slint_path().is_file());
assert!(slint_library_paths().values().all(|path| path.is_dir()));
}
}