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
// Copyright (c) 2023-2025 R3BL LLC. Licensed under Apache License, Version 2.0.
//! # Choose implementation module
//!
//! This module provides the implementation for the [`crate::choose()`] function, which
//! creates an interactive selection UI in the terminal. It allows users to select one
//! or multiple items from a list using keyboard navigation.
//!
//! The implementation is cross-platform (macOS, Linux, Windows) and automatically adapts
//! to terminal capabilities (color support, input methods).
//!
//! # Quick example
//!
//! ```no_run
//! # use r3bl_tui::*;
//! # use r3bl_tui::readline_async::*;
//! # async fn example() -> miette::Result<()> {
//! let mut io_devices = DefaultIoDevices::default();
//! let selection = choose(
//! "Select an item",
//! &["option 1", "option 2", "option 3"],
//! None, // default height
//! None, // default width
//! HowToChoose::Single,
//! StyleSheet::default(),
//! io_devices.as_mut_tuple(),
//! ).await?;
//! # Ok(())
//! # }
//! ```
//!
//! For complete examples, see `tui/examples/choose.rs`.
//!
//! # Styling
//!
//! The choose UI supports customizable styling through the [`StyleSheet`] struct.
//! Built-in styles include:
//! - [`StyleSheet::default()`] - Default styling
//! - [`StyleSheet::sea_foam_style()`] - Sea foam color theme
//! - [`StyleSheet::hot_pink_style()`] - Hot pink color theme
//!
//! You can also create custom styles by constructing a `StyleSheet` with your own
//! [`crate::TuiStyle`] settings. See the examples for detailed styling demonstrations.
// https://github.com/rust-lang/rust-clippy
// https://rust-lang.github.io/rust-clippy/master/index.html
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
/// Enable file logging. You can use `tail -f log.txt` to watch the logs.
pub const DEVELOPMENT_MODE: bool = false;