rite_tui/lib.rs
1//! Interactive terminal frontend for Rite ceremonies, built on
2//! [`ratatui`] and shaped as a TEA (The Elm Architecture) application.
3//!
4//! The crate exposes a single entry point, [`run`], that the CLI invokes
5//! after spawning the executor thread. Inside, the loop merges three
6//! input sources into a single [`Msg`] stream:
7//!
8//! - keyboard / resize events from `crossterm`
9//! - executor events from the runtime channel
10//! - timer ticks for spinner animation
11//!
12//! `update(model, msg)` is pure and the only place state changes; it
13//! returns a list of [`Cmd`]s the runtime interprets (sending commands
14//! back to the executor, quitting). `view(model, frame)` is pure and the
15//! only place rendering happens.
16//!
17//! # Stability
18//!
19//! Internal crate. This is an implementation detail of the `rite` CLI, with no
20//! stable API and no semver guarantees across releases. Build against the
21//! public `rite-sdk`, `rite-model`, or `rite-resolver` crates instead.
22
23#![warn(missing_docs)]
24
25mod model;
26mod msg;
27#[cfg(test)]
28mod preview;
29mod runtime;
30mod update;
31mod view;
32
33pub use model::{Model, RunningState, Screen, StepTab};
34pub use msg::{Cmd, Msg};
35pub use runtime::run;