mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-01-31 10:56:41 +01:00
refactor: extract dizzle
This commit is contained in:
parent
b0d2fad17b
commit
1344967f33
34 changed files with 372 additions and 2235 deletions
|
|
@ -4,24 +4,20 @@ description = "UI metaframework, Ratatui backend."
|
|||
version = { workspace = true }
|
||||
edition = { workspace = true }
|
||||
|
||||
[lib]
|
||||
path = "src/tui.rs"
|
||||
|
||||
[features]
|
||||
dsl = [ "dep:tengri_dsl", "tengri_output/dsl" ]
|
||||
dsl = [ "tengri_output/dsl" ]
|
||||
bumpalo = [ "dep:bumpalo" ]
|
||||
|
||||
[dependencies]
|
||||
tengri_core = { workspace = true }
|
||||
dizzle = { workspace = true }
|
||||
|
||||
tengri_input = { workspace = true }
|
||||
tengri_output = { workspace = true }
|
||||
tengri_dsl = { workspace = true, optional = true }
|
||||
|
||||
atomic_float = { workspace = true }
|
||||
better-panic = { workspace = true }
|
||||
bumpalo = { workspace = true, optional = true }
|
||||
crossterm = { workspace = true }
|
||||
konst = { workspace = true }
|
||||
palette = { workspace = true }
|
||||
quanta = { workspace = true }
|
||||
rand = { workspace = true }
|
||||
|
|
@ -30,5 +26,4 @@ unicode-width = { workspace = true }
|
|||
|
||||
[dev-dependencies]
|
||||
tengri = { workspace = true, features = [ "dsl" ] }
|
||||
tengri_dsl = { workspace = true }
|
||||
tengri_proc = { workspace = true }
|
||||
|
|
|
|||
29
tui/src/lib.rs
Normal file
29
tui/src/lib.rs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#![feature(type_changing_struct_update)]
|
||||
#![feature(trait_alias)]
|
||||
#[cfg(test)] mod tui_test;
|
||||
mod tui_engine; pub use self::tui_engine::*;
|
||||
mod tui_content; pub use self::tui_content::*;
|
||||
pub use ::{tengri_input, tengri_output, ratatui, crossterm, palette, better_panic};
|
||||
pub(crate) use ::{
|
||||
dizzle::*,
|
||||
tengri_input::*,
|
||||
tengri_output::*,
|
||||
atomic_float::AtomicF64,
|
||||
std::{io::{stdout, Stdout}, sync::{Arc, RwLock, atomic::{AtomicBool, Ordering::*}}},
|
||||
better_panic::{Settings, Verbosity},
|
||||
palette::{*, convert::*, okhsl::*},
|
||||
ratatui::{
|
||||
prelude::{Color, Style, Buffer},
|
||||
style::Modifier,
|
||||
backend::{Backend, CrosstermBackend, ClearType},
|
||||
layout::{Size, Rect},
|
||||
buffer::Cell
|
||||
},
|
||||
crossterm::{
|
||||
ExecutableCommand,
|
||||
terminal::{EnterAlternateScreen, LeaveAlternateScreen, enable_raw_mode, disable_raw_mode},
|
||||
event::{Event, KeyEvent, KeyCode, KeyModifiers, KeyEventKind, KeyEventState},
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1,39 +1,5 @@
|
|||
#![feature(type_changing_struct_update)]
|
||||
#![feature(trait_alias)]
|
||||
#[cfg(test)] mod tui_test;
|
||||
mod tui_engine; pub use self::tui_engine::*;
|
||||
mod tui_content; pub use self::tui_content::*;
|
||||
pub use ::{
|
||||
tengri_input,
|
||||
tengri_output,
|
||||
ratatui,
|
||||
crossterm,
|
||||
palette,
|
||||
better_panic
|
||||
};
|
||||
pub(crate) use ::{
|
||||
tengri_core::*,
|
||||
tengri_input::*,
|
||||
tengri_output::*,
|
||||
atomic_float::AtomicF64,
|
||||
std::{io::{stdout, Stdout}, sync::{Arc, RwLock, atomic::{AtomicBool, Ordering::*}}},
|
||||
better_panic::{Settings, Verbosity},
|
||||
palette::{*, convert::*, okhsl::*},
|
||||
ratatui::{
|
||||
prelude::{Color, Style, Buffer},
|
||||
style::Modifier,
|
||||
backend::{Backend, CrosstermBackend, ClearType},
|
||||
layout::{Size, Rect},
|
||||
buffer::Cell
|
||||
},
|
||||
crossterm::{
|
||||
ExecutableCommand,
|
||||
terminal::{EnterAlternateScreen, LeaveAlternateScreen, enable_raw_mode, disable_raw_mode},
|
||||
event::{Event, KeyEvent, KeyCode, KeyModifiers, KeyEventKind, KeyEventState},
|
||||
}
|
||||
};
|
||||
use crate::*;
|
||||
|
||||
#[cfg(feature = "dsl")] use tengri_dsl::*;
|
||||
#[cfg(feature = "dsl")]
|
||||
pub fn evaluate_output_expression_tui <'a, S> (
|
||||
state: &S, mut output: &mut TuiOut, expr: impl DslExpr + 'a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue