Skip to main content

tatara_ui/
lib.rs

1//! # tatara-ui — Nord-themed CLI UX for the tatara toolchain
2//!
3//! Three layers, every one content-addressable:
4//!
5//! 1. **Palette** ([`palette`]) — canonical Nord values + semantic `Role` vocabulary
6//!    mapped via `RoleMap::default()`.
7//! 2. **Sigils** ([`sigil`]) — typed Unicode glyphs (❄ ✓ ✗ ⟡ → ● ◇ ⚡ ⚙ …) each
8//!    bound to a default `Role`.
9//! 3. **Events** ([`event`]) — `UiEvent` is a typed enum that serializes to
10//!    tatara-lisp Sexps. A whole run is an `EventStream`; BLAKE3 of the stream
11//!    JSON is the **run-identity hash** that `tatara replay <hash>` uses.
12//!
13//! Plus the cache-aware fun:
14//!
15//! - **Themes are derivations**: `(deftheme nord-arctic …)` parses via
16//!   `#[derive(TataraDomain)]`; `ThemeSpec::id()` is a BLAKE3 of the spec.
17//! - **Every artifact line shows `⚡ cached` or `⚙ built 5.3s`** next to a
18//!   `◇ blake3:cxx3i50` short hash, so cache hits tell a visual story.
19//! - **Summary banner** at the end shows the content-root hash + `{built,
20//!   cached, failed, total}` counts.
21//!
22//! ```lisp
23//! (deftheme nord-arctic
24//!   :description "the canonical tatara look"
25//!   :semantic    (:primary "#88C0D0"
26//!                 :success "#A3BE8C"
27//!                 :warn    "#EBCB8B"
28//!                 :error   "#BF616A"))
29//! ```
30
31extern crate self as tatara_ui;
32
33pub mod event;
34pub mod palette;
35pub mod render;
36pub mod sigil;
37pub mod theme;
38
39pub use event::{ArtifactState, Cell, EventStream, LogLevel, ShortHash, UiEvent};
40pub use palette::{Rgb, Role, RoleMap, NORD};
41pub use render::{should_color, Renderer};
42pub use sigil::Sigil;
43pub use theme::{SemanticOverrides, ThemeId, ThemeRegistry, ThemeSpec};