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
//! Layout primitives for composing structured terminal output.
//!
//! This module provides high-level building blocks for arranging and formatting
//! terminal content. These components abstract away raw styling APIs, offering
//! reusable structures like panels and text blocks to simplify UI construction.
//!
//! > To use layout primitives like `Panel` or `Text`, you must explicitly
//! > enable the `layout` feature in your `Cargo.toml`.
//!
//! # Components
//!
//! When the `layout` feature is enabled, the following components become available:
//!
//! | Component | Description |
//! | :--- | :--- |
//! | [`panel`] | Draws text framed inside a customizable, bordered box. |
//! | [`text`] | A text widget that can be displayed within the layout system. |
//!
//! # Examples
//!
//! Creating and displaying a simple bordered panel:
//!
//! ```rust,no_run
//! use prettyt::layout::{Panel, Text};
//!
//! let text = Text::new("Hello from prettyt");
//! let panel = Panel::new(&text);
//!
//! // Prints a framed message to the terminal
//! println!("{}", panel);
//! ```
use fmt;
pub use Panel;
pub use Text;
/// A zero-allocation proxy container that binds a [`Renderable`] element to an explicit
/// rendering width, enabling lazy evaluations during streaming output passes.