From 3b18e005eae8cdd261f8c8c257d9b668d6d3d51a Mon Sep 17 00:00:00 2001 From: JasterV <49537445+JasterV@users.noreply.github.com> Date: Tue, 19 Aug 2025 23:24:13 +0200 Subject: [PATCH] Update name to TeaTui --- .github/workflows/release.yml | 4 ++-- Cargo.lock | 20 ++++++++++---------- Cargo.toml | 2 +- README.md | 9 ++++----- examples/counter/Cargo.toml | 2 +- examples/counter/src/main.rs | 4 ++-- {ratatui-elm => teatui}/Cargo.toml | 2 +- {ratatui-elm => teatui}/src/effects.rs | 0 {ratatui-elm => teatui}/src/events.rs | 0 {ratatui-elm => teatui}/src/lib.rs | 2 +- {ratatui-elm => teatui}/src/update.rs | 0 {ratatui-elm => teatui}/src/view.rs | 0 12 files changed, 22 insertions(+), 23 deletions(-) rename {ratatui-elm => teatui}/Cargo.toml (92%) rename {ratatui-elm => teatui}/src/effects.rs (100%) rename {ratatui-elm => teatui}/src/events.rs (100%) rename {ratatui-elm => teatui}/src/lib.rs (98%) rename {ratatui-elm => teatui}/src/update.rs (100%) rename {ratatui-elm => teatui}/src/view.rs (100%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 556f845..661075d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,8 +25,8 @@ jobs: - name: Update crate version id: update-version run: | - cargo set-version -p ratatui-elm $GITHUB_REF_NAME + cargo set-version -p teatui $GITHUB_REF_NAME - name: Publish crate run: | # Publish the crate using the updated version from the previous step - cargo publish -p ratatui-elm --token ${{ secrets.CRATES_IO_TOKEN }} + cargo publish -p teatui --token ${{ secrets.CRATES_IO_TOKEN }} diff --git a/Cargo.lock b/Cargo.lock index 426549d..4521923 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -128,7 +128,7 @@ dependencies = [ "color-eyre", "crossterm 0.29.0", "ratatui", - "ratatui-elm", + "teatui", ] [[package]] @@ -529,15 +529,6 @@ dependencies = [ "unicode-width 0.2.0", ] -[[package]] -name = "ratatui-elm" -version = "0.1.0" -dependencies = [ - "color-eyre", - "crossterm 0.29.0", - "ratatui", -] - [[package]] name = "redox_syscall" version = "0.5.17" @@ -687,6 +678,15 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "teatui" +version = "0.1.0" +dependencies = [ + "color-eyre", + "crossterm 0.29.0", + "ratatui", +] + [[package]] name = "thread_local" version = "1.1.9" diff --git a/Cargo.toml b/Cargo.toml index e3da979..9ca16c9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace] resolver = "3" -members = ["ratatui-elm", "examples/*"] +members = ["teatui", "examples/*"] [workspace.package] authors = ["JasterV <49537445+JasterV@users.noreply.github.com>"] diff --git a/README.md b/README.md index 2cdf3fd..8bfa724 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# Ratatui Elm +# TeaTui + +> Tea = The Elm Architecture This is an experimental project that aims to build an Elm-like framework for TUI development in Rust on top of [Ratatui](https://github.com/ratatui/ratatui). @@ -10,9 +12,6 @@ I want to minimize the usage of mutability and build the most pure functional TU I feel that Elm has always been a great example to follow when it comes to building frontend in a pure-functional style, and so I will try to reproduce it in here. - - - ## How does it work The state of your application is represented by a single type called the Model. @@ -45,7 +44,7 @@ The users of this framework only need to provide: ### Examples -You can find a folder with example projects in the [examples](https://github.com/JasterV/ratatui-elm/tree/main/examples) folder. +You can find a folder with example projects in the [examples](https://github.com/JasterV/teatui/tree/main/examples) folder. ## License diff --git a/examples/counter/Cargo.toml b/examples/counter/Cargo.toml index b6a19b6..7dbb6c5 100644 --- a/examples/counter/Cargo.toml +++ b/examples/counter/Cargo.toml @@ -9,4 +9,4 @@ authors.workspace = true color-eyre.workspace = true crossterm.workspace = true ratatui.workspace = true -ratatui-elm = { path = "../../ratatui-elm" } +teatui = { path = "../../teatui" } diff --git a/examples/counter/src/main.rs b/examples/counter/src/main.rs index 0776c59..ba8a4ca 100644 --- a/examples/counter/src/main.rs +++ b/examples/counter/src/main.rs @@ -5,11 +5,11 @@ use ratatui::{ text::Line, widgets::{Block, Paragraph}, }; -use ratatui_elm::{Update, View}; +use teatui::{Update, View}; fn main() -> Result<()> { color_eyre::install()?; - let result = ratatui_elm::start(Model::default(), update, view, run_effects); + let result = teatui::start(Model::default(), update, view, run_effects); result } diff --git a/ratatui-elm/Cargo.toml b/teatui/Cargo.toml similarity index 92% rename from ratatui-elm/Cargo.toml rename to teatui/Cargo.toml index 5f81c71..2f788f3 100644 --- a/ratatui-elm/Cargo.toml +++ b/teatui/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "ratatui-elm" +name = "teatui" version = "0.1.0" description = "An elm-like abstraction over Ratatui" license.workspace = true diff --git a/ratatui-elm/src/effects.rs b/teatui/src/effects.rs similarity index 100% rename from ratatui-elm/src/effects.rs rename to teatui/src/effects.rs diff --git a/ratatui-elm/src/events.rs b/teatui/src/events.rs similarity index 100% rename from ratatui-elm/src/events.rs rename to teatui/src/events.rs diff --git a/ratatui-elm/src/lib.rs b/teatui/src/lib.rs similarity index 98% rename from ratatui-elm/src/lib.rs rename to teatui/src/lib.rs index 160157a..3a2acc5 100644 --- a/ratatui-elm/src/lib.rs +++ b/teatui/src/lib.rs @@ -30,7 +30,7 @@ //! //! ### Examples //! -//! You can find a folder with example projects in the [examples](https://github.com/JasterV/ratatui-elm/tree/main/examples) folder. +//! You can find a folder with example projects in the [examples](https://github.com/JasterV/teatui/tree/main/examples) folder. use color_eyre::Report; use color_eyre::Result; use std::{ diff --git a/ratatui-elm/src/update.rs b/teatui/src/update.rs similarity index 100% rename from ratatui-elm/src/update.rs rename to teatui/src/update.rs diff --git a/ratatui-elm/src/view.rs b/teatui/src/view.rs similarity index 100% rename from ratatui-elm/src/view.rs rename to teatui/src/view.rs