//! Alloy design system for ratatui. //! //! Consumes makeover `.toml` themes (the same schema every make-family app //! reads) and renders them as ratatui `Color` / `Style`. Two Alloy-specific //! tokens (`border-subtle`, `border-strong`) are derived locally so theme //! files stay minimal — see `docs/TOKENS.md` for the storage format and //! derivation math, `docs/CONSOLE.md` for the widget roster this crate //! targets, and `docs/DESIGN-LANGUAGE.md` for the color-is-information rule //! enforced here: chrome is tinted-greyscale, accents live on text via //! `Severity`. //! //! Every `docs/*.md` path in this crate's documentation names a file in the //! Alloy repo, not this one. The design docs stayed behind when `alloy_tui` //! was split out, so they are not published alongside these pages. //! //! Beyond the widgets, the crate carries the two things ratatui leaves to the //! app and every Alloy TUI must agree on: the reserved keymap ([`keys`]) and //! the focus ring ([`focus`]). Both descend from mountaineer-sysop's //! `sysop-tui`, retinted from a const palette to the runtime [`Theme`]. //! //! pub mod bevel; pub mod connector; pub mod cursor; pub mod focus; pub mod geometry; pub mod help; pub mod input; pub mod keys; pub mod layout; pub mod selection; pub mod text; pub mod theme; pub mod widgets; pub use bevel::{Bevel, Elevation}; pub use connector::AlloyConnector; pub use cursor::Cursor; pub use focus::FocusRing; pub use geometry::{Gap, padding}; pub use help::{AlloyKeymap, Binding, KeyGroup, binding, unavailable}; pub use input::TextField; pub use keys::{Action, classify}; pub use layout::{ConsoleAreas, PaneAreas, console, panes}; pub use selection::{MARKER, selected_style}; pub use theme::{ Fidelity, Mode, Theme, ThemeError, border_strong, border_subtle, fidelity, mix_linear_srgb, }; pub use widgets::*; #[cfg(test)] mod tests { // The crate root is the API. Every one of these is reachable through its // own module regardless, so a re-export missing from this list still // compiles everywhere inside the crate and breaks only at a call site // outside it. That is how 4.0.0 shipped without `fidelity`, which is the // replacement the same release told callers to move to. #[test] fn the_names_a_caller_is_told_to_use_are_exported_from_the_root() { let _: crate::Fidelity = crate::fidelity(); let _: fn(&makeover::ThemeColors) -> _ = crate::Theme::from_theme; let _: fn(makeover::Rgb, makeover::Rgb) -> _ = crate::border_subtle; let _: fn(makeover::Rgb, makeover::Rgb) -> _ = crate::border_strong; let _: fn(makeover::Rgb, makeover::Rgb, f32) -> _ = crate::mix_linear_srgb; } }