edn -> dsl

This commit is contained in:
🪞👃🪞 2025-03-14 23:44:13 +02:00
parent d30eda33d1
commit 877b344765
35 changed files with 197 additions and 225 deletions

View file

@ -1,6 +1,6 @@
[package]
name = "tengri_tui"
edition = "2021"
edition = "2024"
version = "0.1.0"
description = "UI metaframework, Ratatui backend."
@ -16,7 +16,11 @@ quanta = "0.12.3"
tengri_input = { path = "../input" }
tengri_output = { path = "../output" }
tengri_edn = { optional = true, path = "../edn" }
tengri_dsl = { optional = true, path = "../dsl" }
[dev-dependencies]
tengri = { path = "../tengri", features = [ "dsl" ] }
tengri_dsl = { path = "../dsl" }
[features]
edn = [ "tengri_edn", "tengri_input/edn", "tengri_output/edn" ]
dsl = [ "tengri_dsl", "tengri_input/dsl", "tengri_output/dsl" ]

View file

@ -1,5 +1,4 @@
use tengri_tui::{*, tengri_input::*, tengri_output::*};
use tengri_edn::*;
use tengri::{self, input::*, output::*, tui::*, dsl::*};
use std::sync::{Arc, RwLock};
use crossterm::event::{*, KeyCode::*};
use crate::ratatui::style::Color;

View file

@ -6,29 +6,43 @@ mod tui_file; pub use self::tui_file::*;
mod tui_input; pub use self::tui_input::*;
mod tui_output; pub use self::tui_output::*;
mod tui_perf; pub use self::tui_perf::*;
pub use ::tek_edn;// pub(crate) use ::tek_edn::*;
//pub use ::tek_time; pub(crate) use ::tek_time::*;
pub use ::tek_input; pub(crate) use tek_input::*;
pub use ::tek_output; pub(crate) use tek_output::*;
pub use ::better_panic; pub(crate) use better_panic::{Settings, Verbosity};
pub use ::palette; pub(crate) use ::palette::{*, convert::*, okhsl::*};
pub use ::crossterm; pub(crate) use crossterm::{
pub use ::tengri_input as input;
pub(crate) use ::tengri_input::*;
pub use ::tengri_output as output;
pub(crate) use ::tengri_output::*;
#[cfg(feature = "dsl")]
pub use ::tengri_dsl;
#[cfg(feature = "dsl")]
pub(crate) use ::tengri_dsl::*;
pub(crate) use atomic_float::AtomicF64;
pub use ::better_panic; pub(crate) use ::better_panic::{Settings, Verbosity};
pub use ::palette; pub(crate) use ::palette::{*, convert::*, okhsl::*};
pub use ::crossterm; pub(crate) use ::crossterm::{
ExecutableCommand,
terminal::{EnterAlternateScreen, LeaveAlternateScreen, enable_raw_mode, disable_raw_mode},
event::{Event, KeyEvent, KeyCode, KeyModifiers, KeyEventKind, KeyEventState},
};
pub use ::ratatui; pub(crate) use ratatui::{
pub use ::ratatui; pub(crate) use ratatui::{
prelude::{Color, Style, Buffer},
style::Modifier,
backend::{Backend, CrosstermBackend, ClearType},
layout::{Size, Rect},
buffer::Cell
};
pub(crate) use std::sync::{Arc, RwLock, atomic::{AtomicBool, Ordering::*}};
pub(crate) use std::io::{stdout, Stdout};
pub(crate) use std::path::PathBuf;
pub(crate) use std::ffi::OsString;
pub(crate) use atomic_float::AtomicF64;
#[macro_export] macro_rules! from {
($(<$($lt:lifetime),+>)?|$state:ident:$Source:ty|$Target:ty=$cb:expr) => {
impl $(<$($lt),+>)? From<$Source> for $Target {
@ -36,6 +50,7 @@ pub(crate) use atomic_float::AtomicF64;
}
};
}
#[cfg(test)] #[test] fn test_tui_engine () -> Usually<()> {
use crate::*;
use std::sync::{Arc, RwLock};