tui_banner/
lib.rs

1// Copyright (c) 2025 Lei Zhang
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
13#![deny(missing_docs)]
14//! Colorful ASCII art banner rendering for Rust CLI/TUI.
15//!
16//! ## Quick Start
17//! ```rust
18//! use tui_banner::{Align, Banner, Style};
19//!
20//! # fn main() -> Result<(), tui_banner::BannerError> {
21//!
22//! let banner = Banner::new("RUST CLI")?
23//!     .style(Style::NeonCyber)
24//!     .align(Align::Center)
25//!     .padding(1)
26//!     .render();
27//!
28//! let _ = banner;
29//! # Ok(())
30//! # }
31//! ```
32
33/// High-level banner builder API.
34pub mod banner;
35/// Color types and palettes.
36pub mod color;
37/// Visual effects (dither, outline, shadow).
38pub mod effects;
39/// ANSI output emitter.
40pub mod emit;
41/// Fill and dither configuration.
42pub mod fill;
43/// Fonts and glyph rendering.
44pub mod font;
45/// Frame (border) rendering.
46pub mod frame;
47/// Gradient definitions.
48pub mod gradient;
49/// Grid and layout types.
50pub mod grid;
51/// Named banner styles.
52pub mod style;
53/// Terminal capability detection.
54pub mod terminal;
55
56pub use banner::{Banner, BannerError};
57pub use color::{Color, ColorMode, Palette, Preset};
58pub use effects::light_sweep::{LightSweep, SweepDirection};
59pub use effects::outline::EdgeShade;
60pub use fill::{Dither, DitherMode, Fill};
61pub use font::{Font, figlet::FigletError};
62pub use frame::{Frame, FrameChars, FramePaint, FrameStyle};
63pub use gradient::{Gradient, GradientDirection};
64pub use grid::{Align, Padding};
65pub use style::Style;