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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
//! # Blazer
//!
//! `blazer` is a lightweight, dependency-minimal library for building
//! beautiful command-line interfaces in Rust. It provides:
//!
//! - **Text styling & coloring** via the [`Stylize`] trait — chainable,
//! ergonomic methods like `.red()`, `.bold()`, `.on_blue()`.
//! - **True color & 256-color support** via [`Color::Rgb`] and [`Color::Fixed`].
//! - **Progress bars** via [`progress::ProgressBar`].
//! - **Animated spinners** via [`spinner::Spinner`].
//! - **Tables** via [`table::Table`].
//! - **Common CLI symbols** (checkmarks, crosses, arrows, etc.) via the
//! [`symbols`] module.
//! - **Terminal utilities** (size detection, color support detection) via
//! the [`terminal`] module.
//!
//! ## Quick start
//!
//! ```
//! use blazer::Stylize;
//!
//! println!("{}", "Success!".green().bold());
//! println!("{}", "Warning".yellow().italic());
//! println!("{}", "Error".white().on_red().bold());
//! println!("{}", "Custom".rgb(255, 140, 0));
//! ```
//!
//! ## Progress bars
//!
//! ```no_run
//! use blazer::progress::ProgressBar;
//!
//! let mut bar = ProgressBar::new(50).with_label("Downloading");
//! for i in 0..=50 {
//! bar.set_position(i);
//! bar.draw();
//! std::thread::sleep(std::time::Duration::from_millis(20));
//! }
//! bar.finish_with_message("Done!");
//! ```
//!
//! ## Spinners
//!
//! ```no_run
//! use blazer::spinner::Spinner;
//!
//! let mut spinner = Spinner::new("Working...");
//! spinner.start();
//! std::thread::sleep(std::time::Duration::from_secs(2));
//! spinner.stop("Finished!");
//! ```
//!
//! ## Tables
//!
//! ```
//! use blazer::table::Table;
//!
//! let mut table = Table::new(vec!["Name", "Status"]);
//! table.add_row(vec!["build", "ok"]);
//! table.add_row(vec!["test", "failed"]);
//! table.print();
//! ```
//!
//! ## Module overview
//!
//! | Module | Purpose |
//! |-------------|----------------------------------------------|
//! | [`color`] | Color enums and ANSI code generation |
//! | [`style`] | The [`Stylize`] trait and [`StyledString`] |
//! | [`progress`]| Progress bar widget |
//! | [`spinner`] | Animated spinner widget |
//! | [`table`] | Simple table renderer |
//! | [`symbols`] | Common CLI Unicode symbols |
//! | [`terminal`]| Terminal size & color support detection |
pub use Color;
pub use ;