pub struct File {
pub target: &'static str,
pub content: &'static str,
}
pub struct Item {
pub name: &'static str,
pub kind: &'static str,
pub description: &'static str,
pub dependencies: &'static [&'static str],
pub files: &'static [File],
}
include!(concat!(env!("OUT_DIR"), "/registry.rs"));
pub fn find(name: &str) -> Option<&'static Item> {
let name = name.replace('-', "_");
ITEMS.iter().find(|item| item.name == name)
}
pub fn components() -> impl Iterator<Item = &'static Item> {
ITEMS.iter().filter(|item| item.kind == "registry:ui")
}