Skip to main content

max / alloy_tui

1.6 KB · 48 lines History Blame Raw
1 //! Alloy design system for ratatui.
2 //!
3 //! Consumes makeover `.toml` themes (the same schema every make-family app
4 //! reads) and renders them as ratatui `Color` / `Style`. Two Alloy-specific
5 //! tokens (`border-subtle`, `border-strong`) are derived locally so theme
6 //! files stay minimal — see `docs/TOKENS.md` for the storage format and
7 //! derivation math, `docs/CONSOLE.md` for the widget roster this crate
8 //! targets, and `docs/DESIGN-LANGUAGE.md` for the color-is-information rule
9 //! enforced here: chrome is tinted-greyscale, accents live on text via
10 //! `Severity`.
11 //!
12 //! Beyond the widgets, the crate carries the two things ratatui leaves to the
13 //! app and every Alloy TUI must agree on: the reserved keymap ([`keys`]) and
14 //! the focus ring ([`focus`]). Both descend from mountaineer-sysop's
15 //! `sysop-tui`, retinted from a const palette to the runtime [`Theme`].
16 //!
17 //! <!-- wiki: alloy-console -->
18
19 pub mod bevel;
20 pub mod connector;
21 pub mod cursor;
22 pub mod focus;
23 pub mod geometry;
24 pub mod help;
25 pub mod input;
26 pub mod keys;
27 pub mod layout;
28 pub mod selection;
29 pub mod text;
30 pub mod theme;
31 pub mod widgets;
32
33 pub use bevel::{Bevel, Elevation};
34 pub use connector::AlloyConnector;
35 pub use cursor::Cursor;
36 pub use focus::FocusRing;
37 pub use geometry::{Gap, padding};
38 pub use help::{AlloyKeymap, Binding, KeyGroup, binding, unavailable};
39 pub use input::TextField;
40 pub use keys::{Action, classify};
41 pub use layout::{ConsoleAreas, PaneAreas, console, panes};
42 pub use selection::{MARKER, selected_style};
43 pub use theme::{
44 ColorDepth, Mode, Theme, ThemeError, border_strong, border_subtle, detect_color_depth,
45 mix_linear_srgb,
46 };
47 pub use widgets::*;
48