aura-gui 0.2.2

UI nativa acelerada por GPU para escritorio, Android e iOS, en un solo crate: estilo tipo Tailwind, componentes, sombras, animaciones y agentes de IA. Reposo a cero. Licencia AGPL-3.0 o comercial.
//! Iconos Lucide (licencia ISC, ver `icons/LICENSE-lucide`) incrustados en el binario.

use crate::view::media::{Svg, svg};

macro_rules! icons {
    ($($variant:ident => $file:literal,)*) => {
        #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
        pub enum IconName {
            $($variant,)*
        }

        impl IconName {
            pub fn file_name(self) -> &'static str {
                match self {
                    $(Self::$variant => $file,)*
                }
            }

            pub fn bytes(self) -> &'static [u8] {
                match self {
                    $(Self::$variant => include_bytes!(concat!("svg/", $file, ".svg")),)*
                }
            }
        }
    };
}

icons! {
    Aura => "aura",
    ArrowDown => "arrow-down",
    ArrowUp => "arrow-up",
    Braces => "braces",
    CaseSensitive => "case-sensitive",
    Check => "check",
    ChevronDown => "chevron-down",
    ChevronLeft => "chevron-left",
    ChevronRight => "chevron-right",
    ChevronUp => "chevron-up",
    Circle => "circle",
    CircleAlert => "circle-alert",
    Columns => "columns-2",
    Command => "command",
    Copy => "copy",
    CornerDownLeft => "corner-down-left",
    Ellipsis => "ellipsis",
    File => "file",
    FileCode => "file-code",
    FileJson => "file-json",
    FileText => "file-text",
    Folder => "folder",
    FolderOpen => "folder-open",
    GitBranch => "git-branch",
    Hash => "hash",
    Image => "image",
    Info => "info",
    Lightbulb => "lightbulb",
    List => "list",
    Maximize => "maximize-2",
    Minimize => "minimize-2",
    Minus => "minus",
    PanelBottom => "panel-bottom",
    PanelLeft => "panel-left",
    Pencil => "pencil",
    Play => "play",
    Pin => "pin",
    Plus => "plus",
    Regex => "regex",
    Refresh => "refresh-cw",
    Replace => "replace",
    Save => "save",
    Search => "search",
    Send => "send",
    Settings => "settings",
    Sparkles => "sparkles",
    Square => "square",
    Star => "star",
    Terminal => "terminal",
    Trash => "trash-2",
    TriangleAlert => "triangle-alert",
    WholeWord => "whole-word",
    Wrench => "wrench",
    X => "x",
}

/// Icono de 16 px que toma el color del texto; se ajusta con `.size(px(..))`.
pub fn icon(name: IconName) -> Svg {
    svg(name.file_name(), name.bytes())
}