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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
//! tui-realm is a **framework** for **[ratatui](https://github.com/ratatui-org/ratatui)**
//! to simplify the implementation of terminal user interfaces adding the possibility to work
//! with re-usable components with properties and states, as you'd do in React. But that's not all:
//! the components communicate with the ui engine via a system based on **Messages** and **Events**,
//! providing you with the possibility to implement `update` routines as happens in Elm.
//!
//! In addition, the components are organized inside the **View**, which manages mounting/umounting,
//! focus and event forwarding for you.
//!
//! `tui-realm` also comes with a standard library of components, that you may find very useful.
//! The stdlib can be found in [`tui-realm-stdlib`](https://docs.rs/tui-realm-stdlib/latest/tui_realm_stdlib/)
//!
//! ## Get started 🏁
//!
//! ### Add tui-realm to your Cargo.toml 🦀
//!
//! If you want the default features:
//!
//! ```toml
//! tuirealm = "4"
//! ```
//!
//! Alternatively you can specify the features you want to add:
//!
//! ```toml
//! tuirealm = { version = "4", default-features = false, features = [ "derive", "serialize", "crossterm" ] }
//! ```
//!
//! Supported features are:
//!
//! - `derive` (*default*): add the `#[derive(Component)]` proc macro to automatically implement `Component` for `AppComponent`. [Read more](https://github.com/veeso/tui-realm/tree/feature/main/crates/tuirealm_derive).
//! - `async-ports`: add support for async ports
//! - `serialize`: add the serialize/deserialize trait implementation for `KeyEvent` and `Key`.
//! - `crossterm` (*default*): enable the [crossterm](https://github.com/crossterm-rs/crossterm) terminal backend
//! - `termion`: enable the [termion](https://github.com/redox-os/termion) terminal backend
//! - `termwiz`: enable the [termwiz](https://docs.rs/termwiz/latest/termwiz/index.html) terminal backend
//!
//! ### Create a tui-realm application 🪂
//!
//! You can read the [Get Started guide](https://github.com/veeso/tui-realm/blob/main/crates/tuirealm/docs/en/get-started.md) guide on github.
//!
//! ### Run examples 🔍
//!
//! Still confused about how tui-realm works? Don't worry, try with the examples:
//!
//! - [demo](https://github.com/veeso/tui-realm/blob/main/crates/tuirealm/examples/demo/demo.rs): a simple example that shows basic tui-realm usage
//! - [user-events](https://github.com/veeso/tui-realm/blob/main/crates/tuirealm/examples/user_events/user_events.rs): showcase using custom events
//! - [inline-display](https://github.com/veeso/tui-realm/blob/main/crates/tuirealm/examples/inline_display.rs): showcase how tui-realm can be used without requiring a alternate screen
//! - [async-ports](https://github.com/veeso/tui-realm/blob/main/crates/tuirealm/examples/async_ports.rs): showcase usage of async ports
//! - [arbitrary-data](https://github.com/veeso/tui-realm/blob/main/crates/tuirealm/examples/arbitrary_data.rs): showcase usage of `PropPayload::Any` to send custom data across `query` and `attr`
//!
extern crate lazy_regex;
// alias so that the derive can also be used in this crate directly without error
extern crate self as tuirealm;
extern crate tuirealm_derive;
// export async trait for async-ports
pub use async_trait;
pub use ;