Skip to content

Commit

Permalink
Update deps (#18)
Browse files Browse the repository at this point in the history
* Update dependencies

* Fix termion example

* Improve termion example

* v0.7.0
  • Loading branch information
sayanarijit authored Mar 22, 2023
1 parent 217d642 commit 3ad9536
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 12 deletions.
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tui-input"
version = "0.6.1"
version = "0.7.0"
edition = "2021"
authors = ["Arijit Basu <hi@arijitbasu.in>"]
description = "TUI input library supporting multiple backends"
Expand All @@ -16,10 +16,10 @@ autoexamples = true
default = ["crossterm"]

[dependencies]
crossterm = { version = "0.26.0", optional = true }
serde = { version = "1.0.145", optional = true, features = ["derive"] }
termion = { version = "1.5.6", optional = true }
unicode-width = "0.1.4"
crossterm = { version = "0.26.1", optional = true }
serde = { version = "1.0.158", optional = true, features = ["derive"] }
termion = { version = "2.0.1", optional = true }
unicode-width = "0.1.10"

[[example]]
name = "crossterm_input"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Crate Status](https://img.shields.io/crates/v/tui-input.svg)](https://crates.io/crates/tui-input)
[![Docs Status](https://docs.rs/tui-input/badge.svg)](https://docs.rs/tui-input/)

[![tui-input.gif](https://s10.gifyu.com/images/tui-input.gif)](https://github.com/sayanarijit/tui-input/blob/main/examples/tui-rs-input/src/main.rs)
[![tui-input.gif](https://s10.gifyu.com/images/tui-input.gif)](https://github.com/sayanarijit/tui-input/blob/main/examples/ratatui-input/src/main.rs)

A TUI input library supporting multiple backends.

Expand Down Expand Up @@ -41,7 +41,7 @@ cargo run --example crossterm_input
cargo run --example termion_input --features termion

# Run the tui-rs example
(cd ./examples/tui-rs-input/ && cargo run)
(cd ./examples/ratatui-input/ && cargo run)
```

## Used in
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "tui-rs-input"
name = "ratatui-input"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
crossterm = "0.26.0"
crossterm = "0.26.1"
tui = { package = "ratatui", version = "0.20.0", features = ["crossterm"] }
tui-input = { path = "../../" }
unicode-width = "0.1.10"
File renamed without changes.
File renamed without changes.
5 changes: 2 additions & 3 deletions examples/termion_input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use termion::cursor::{Hide, Show};
use termion::event::{Event, Key};
use termion::input::TermRead;
use termion::raw::IntoRawMode;
use termion::screen::AlternateScreen;
use termion::screen::IntoAlternateScreen;
use tui_input::backend::termion as backend;
use tui_input::backend::termion::EventHandler;
use tui_input::Input;
Expand All @@ -12,8 +12,7 @@ fn main() -> Result<()> {
let mut input: Input = "Hello ".into();
{
let stdin = stdin();
let stdout = stdout().into_raw_mode().unwrap();
let mut stdout = AlternateScreen::from(stdout);
let mut stdout = stdout().into_raw_mode()?.into_alternate_screen()?;

write!(&mut stdout, "{}", Hide)?;
backend::write(&mut stdout, input.value(), input.cursor(), (0, 0), 15)?;
Expand Down

0 comments on commit 3ad9536

Please sign in to comment.