Releases: parneetsingh022/prettyt
v0.3.0
Added
-
Global Control Overrides: Introduced thread-safe
set_override(level: ColorLevel)andclear_override()APIs, allowing developers to programmatically bypass environment cascades and explicitly lock down terminal styling preferences at runtime. -
Hex Color Construction: Added
Color::from_hex(...)for creating RGB colors from"#RRGGBB"or"RRGGBB"hex strings, including support for compile-timeconstcolor definitions -
CSS Colors: Added
CSSColorstruct, providing the complete set of CSS named colors asColorconstants. All standard 140 CSS color names and aliases are now available for convenient compile-time color selection. -
Panel Layouts: Added a generic
Panellayout container supporting nested frames, custom titles, and automatic padding calculated viaunicode-width.
Removed
- Apple Terminal Strikethrough Fallback: Removed the custom character-stitching fallback loop for macOS
Terminal.appto resolve layout corruption, string data bloat, and ANSI tracking de-synchronization. The library now universally emits standard SGR 9 escape sequences across all environments.
v0.2.0
Added
-
Apple Terminal Strikethrough Fallback: Implemented an automated fallback engine for macOS Terminal.app that dynamically embeds Unicode combining long stroke characters (
\u{0336}) through printable text strings to resolve its native lack of\x1b[9mANSI sequence support. -
Zero-Allocation Lazy Evaluation: Introduced
StyledRefto lazily stream ANSI text styling configurations directly to formatting targets viafmt::Displayimplementation, completely eliminating heap allocations on formatting passes.
Breaking Changes
- Reference-Bound
Style::applyAPI: The signature ofStyle::applynow accepts arguments by shared reference (&T) instead of taking ownership by value. Passing owned primitives or numeric constants manually now explicitly requires a reference borrow prefix (e.g.,style.apply(&34)instead ofstyle.apply(34)). Normal string literals remain unaffected as they naturally satisfy the reference type bound (&str).
v0.1.0
Added
- Multi-Tier Colors: Full support for 16 standard ANSI colors, 256-color palettes, and 24-bit TrueColor RGB.
- Smart Downsampling: Automatic fallback math to translate rich RGB colors down to 256 or 16 colors depending on terminal support.
- Environment Detection: Strict compliance with
NO_COLOR,FORCE_COLOR, TTY status checking (stdout.is_terminal()),COLORTERM, andTERM. - Fluent API: Builder pattern interface (
Style::new()) to programmatically stack properties like colors, bold, italic, underline, dim, strikethrough, and inversion. - Logging Macros:
make_style!for declarative style creation andsprintln!for direct formatting output. - Performance: Zero external dependencies and thread-safe environment caching via
OnceLock.