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
#![forbid(unsafe_code)]
#![allow(clippy::needless_range_loop)]
#![warn(clippy::dbg_macro, clippy::print_stdout)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![doc = include_str!("../README.md")]

#[cfg(all(
    any(feature = "crossterm", feature = "termion", feature = "your-backend"),
    any(
        feature = "ratatui-crossterm",
        feature = "ratatui-termion",
        feature = "ratatui-your-backend"
    ),
))]
compile_error!("tui-rs support and ratatui support are exclussive. only one of them can be enabled at the same time. see https://github.com/rhysd/tui-textarea#installation");

mod cursor;
mod highlight;
mod history;
mod input;
mod scroll;
#[cfg(feature = "search")]
mod search;
mod textarea;
mod util;
mod widget;
mod word;

#[cfg(any(
    feature = "ratatui-crossterm",
    feature = "ratatui-termion",
    feature = "ratatui-your-backend",
))]
use ratatui as tui;
#[cfg(not(any(
    feature = "ratatui-crossterm",
    feature = "ratatui-termion",
    feature = "ratatui-your-backend",
)))]
#[allow(clippy::single_component_path_imports)]
use tui;

#[cfg(feature = "crossterm")]
#[allow(clippy::single_component_path_imports)]
use crossterm;
#[cfg(feature = "ratatui-crossterm")]
use crossterm_027 as crossterm;

pub use cursor::CursorMove;
pub use input::{Input, Key};
pub use scroll::Scrolling;
pub use textarea::TextArea;