ftui_extras/lib.rs
1#![forbid(unsafe_code)]
2
3//! Optional feature-gated extensions for FrankenTUI.
4//!
5//! Each module is behind a Cargo feature flag and can be enabled independently.
6//! These modules provide higher-level functionality built on top of the core
7//! ftui crates (render, style, text, widgets).
8//!
9//! # Role in FrankenTUI
10//! `ftui-extras` collects optional, higher-level utilities that are useful
11//! across apps but not required by the core runtime or render kernel. It is
12//! feature-gated to keep the base dependency graph lean.
13//!
14//! # How it fits in the system
15//! Extras build on `ftui-render`, `ftui-style`, `ftui-text`, and `ftui-widgets`.
16//! You can enable only the pieces you need without pulling in everything else.
17//!
18//! # Available Features
19//!
20//! | Feature | Module | Description |
21//! |---------|--------|-------------|
22//! | `canvas` | [`canvas`] | Pixel-level drawing primitives |
23//! | `charts` | [`charts`] | Chart widgets (depends on canvas) |
24//! | `clipboard` | [`clipboard`] | OSC 52 clipboard integration |
25//! | `diagram` | [`diagram`] | ASCII diagram detection and correction |
26//! | `console` | [`console`] | ANSI-aware console text processing |
27//! | `export` | [`export`] | Buffer export to HTML/SVG/text |
28//! | `filesize` | [`filesize`] | Human-readable file size formatting |
29//! | `filepicker` | [`filepicker`] | File picker state utilities |
30//! | `forms` | [`forms`] | Form layout and input widgets |
31//! | `validation` | [`validation`] | Form validation framework with composable validators |
32//! | `image` | [`image`] | Terminal image protocols (iTerm2/Kitty) |
33//! | `live` | [`live`] | Live-updating display (depends on console) |
34//! | `logging` | [`logging`] | Tracing subscriber for TUI logging |
35//! | `markdown` | [`markdown`] | Markdown to styled text rendering |
36//! | `pty-capture` | [`pty_capture`] | PTY session capture |
37//! | `stopwatch` | [`stopwatch`] | Stopwatch timing utility |
38//! | `syntax` | [`syntax`] | Syntax highlighting spans |
39//! | `timer` | [`timer`] | Countdown timer utility |
40//! | `traceback` | [`traceback`] | Error/stacktrace display |
41//! | `theme` | [`theme`] | Color themes + palette tokens |
42//! | `terminal` | [`terminal`] | ANSI escape sequence parser for terminal emulation |
43//! | `text-effects` | [`text_effects`] | Animated text effects (gradients, fades, ASCII art) |
44//! | `visual-fx` | [`visual_fx`] | Feature-gated visual FX primitives (backdrops, CPU/GPU adapters) |
45//! | `fx-gpu` | `visual_fx::gpu` | Optional GPU acceleration for metaballs (silent CPU fallback) |
46//! | `help` | [`help`] | Contextual help system with tooltips |
47
48#[cfg(feature = "canvas")]
49pub mod canvas;
50
51#[cfg(feature = "console")]
52pub mod console;
53
54#[cfg(feature = "charts")]
55pub mod charts;
56
57#[cfg(feature = "clipboard")]
58pub mod clipboard;
59
60#[cfg(feature = "diagram")]
61pub mod diagram;
62
63#[cfg(feature = "diagram")]
64pub mod mermaid;
65
66#[cfg(feature = "export")]
67pub mod export;
68
69#[cfg(feature = "filesize")]
70pub mod filesize;
71
72#[cfg(feature = "forms")]
73pub mod forms;
74
75#[cfg(feature = "validation")]
76pub mod validation;
77
78#[cfg(feature = "image")]
79pub mod image;
80
81#[cfg(feature = "live")]
82pub mod live;
83
84#[cfg(feature = "logging")]
85pub mod logging;
86
87#[cfg(feature = "markdown")]
88pub mod markdown;
89
90#[cfg(feature = "pty-capture")]
91pub mod pty_capture;
92
93#[cfg(feature = "syntax")]
94pub mod syntax;
95
96#[cfg(feature = "filepicker")]
97pub mod filepicker;
98
99#[cfg(feature = "traceback")]
100pub mod traceback;
101
102#[cfg(feature = "stopwatch")]
103pub mod stopwatch;
104
105#[cfg(feature = "timer")]
106pub mod timer;
107
108#[cfg(feature = "theme")]
109pub mod theme;
110
111#[cfg(feature = "terminal")]
112pub mod terminal;
113
114#[cfg(feature = "text-effects")]
115pub mod text_effects;
116
117#[cfg(feature = "visual-fx")]
118pub mod visual_fx;
119
120#[cfg(feature = "help")]
121pub mod help;