1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//! Beautiful terminal UI components for Ratatui.
//!
//! Ono ships themeable, parameterized widgets that drop into an existing
//! Ratatui app like any other `Widget`. The library is the default path —
//! the `ono` CLI (`list` / `preview` / `add`) is a helper for discovery and
//! for users who want to eject the source into their own tree.
//!
//! # Quick start
//!
//! ```no_run
//! use std::time::Duration;
//! use figlet_rs::FIGlet;
//! use ono::components::splash::{Banner, Splash};
//! use ono::theme::Theme;
//! use ratatui::widgets::Widget;
//! # use ratatui::{buffer::Buffer, layout::Rect};
//! # let mut buf = Buffer::empty(Rect::new(0, 0, 80, 16));
//! # let area = buf.area;
//!
//! let theme = Theme::Forest;
//! let font = FIGlet::standard().unwrap();
//! let banner = Banner::from_text("ono", &font);
//!
//! Splash::new(&banner, theme.palette(), theme.knobs())
//! .elapsed(Duration::from_millis(1200))
//! .render(area, &mut buf);
//! ```
//!
//! # What's in the crate
//!
//! - [`theme`] — [`theme::Theme`], [`theme::Palette`] (9 semantic roles),
//! [`theme::Knobs`] (animation + behavior).
//! - [`elements`] — atomic widgets: `box`, `progress`, `spinner`,
//! `percentage`, `sparkline`, `typewriter`.
//! - [`components`] — composites: `splash`, `boot`, `dashboard`,
//! `statusbar`, `map`.
//!
//! # Themes
//!
//! Ono ships four built-in themes — Forest, Retro, Minimal, and Cyber.
//! Forest is the default and is always built; enable the `theme-retro`,
//! `theme-minimal`, `theme-cyber`, or `all-themes` cargo features to compile
//! in the others. Components never branch on theme identity for visual logic
//! — they pull colors from the palette and behaviour from the knobs.
//!
//! # Ejecting to source
//!
//! Run `cargo install ono` and then `ono add splash` in your project to copy
//! a component's source (plus transitive deps and a `theme.rs` you own) into
//! `./src/ono/`. Ejected code imports only `ratatui` and your own `theme.rs`
//! — no runtime dependency on this crate.
//!
//! # Semver
//!
//! The public surface covered by semver is everything under [`theme`],
//! [`elements`], and [`components`]. The CLI (`cli`) and spec engine
//! (internal) are not semver-stable.
//!
//! # Narrative docs
//!
//! Rustdoc covers the API; the repo's `docs/` directory covers the
//! conceptual side — getting started, theming guide, component catalog,
//! eject guide.
//!
//! <https://github.com/nullorder/ono/tree/main/docs>
pub