Skip to main content

max / alloy_tui

1.4 KB · 39 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 connector;
20 pub mod cursor;
21 pub mod focus;
22 pub mod input;
23 pub mod keys;
24 pub mod layout;
25 pub mod selection;
26 pub mod text;
27 pub mod theme;
28 pub mod widgets;
29
30 pub use connector::AlloyConnector;
31 pub use cursor::Cursor;
32 pub use focus::FocusRing;
33 pub use input::TextField;
34 pub use keys::{Action, classify};
35 pub use layout::{ConsoleAreas, PaneAreas, console, panes};
36 pub use selection::{MARKER, selected_style};
37 pub use theme::{ColorDepth, Mode, Theme, ThemeError, detect_color_depth};
38 pub use widgets::*;
39