From c45a4de47c601554f6b981d211181468b4798e41 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 26 Aug 2024 23:53:44 -0400
Subject: [PATCH] build(deps): bump ratatui from 0.28.0 to 0.28.1 in the
cargo-dependencies group (#70)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Bumps the cargo-dependencies group with 1 update:
[ratatui](https://github.com/ratatui/ratatui).
Updates `ratatui` from 0.28.0 to 0.28.1
Sourced from ratatui's
releases. ed51c4b
(terminal) Add ratatui::init() and restore() methods by These are simple opinionated methods for creating a terminal that is
useful to use in most apps. The new init method creates a crossterm
backend writing to stdout, enables raw mode, enters the alternate
screen, and sets a panic handler that restores the terminal on
panic. A minimal hello world now looks a bit like: fn main() {Release notes
v0.28.1
v0.28.1
- 2024-08-25
Features
@joshka
in #1289
use ratatui::{
crossterm::event::{self, Event},
text::Text,
Frame,
};
let mut terminal = ratatui::init();
loop {
terminal
.draw(|frame: &mut Frame| frame.render_widget(Text::raw("Hello
World!"), frame.area()))
.expect("Failed to draw");
if matches!(event::read().expect("failed to read event"),
Event::Key(_)) {
break;
}
}
ratatui::restore();
}
A type alias DefaultTerminal
is added to represent this
terminal
type and to simplify any cases where applications need to pass this
terminal around. It is equivalent to:
Terminal<CrosstermBackend<Stdout>>
We also added ratatui::try_init()
and
try_restore()
, for situations
where you might want to handle initialization errors yourself instead
of letting the panic handler fire and cleanup. Simple Apps should
prefer the init
and restore
functions over
these functions.
Corresponding functions to allow passing a
TerminalOptions
with
a Viewport
(e.g. inline, fixed) are also available
(init_with_options
,
and try_init_with_options
).
... (truncated)
Sourced from ratatui's changelog.
v0.28.1 - 2024-08-25
Features
ed51c4b (terminal) Add ratatui::init() and restore() methods by
@joshka
in #1289These are simple opinionated methods for creating a terminal that is useful to use in most apps. The new init method creates a crossterm backend writing to stdout, enables raw mode, enters the alternate screen, and sets a panic handler that restores the terminal on panic.
A minimal hello world now looks a bit like:
use ratatui::{ crossterm::event::{self, Event}, text::Text, Frame, };
fn main() {
let mut terminal = ratatui::init();
loop {
terminal
.draw(|frame: &mut Frame| frame.render_widget(Text::raw("Hello World!"), frame.area()))
.expect("Failed to draw");
if matches!(event::read().expect("failed to read event"), Event::Key(_)) {
break;
}
}
ratatui::restore();
}
A type alias
DefaultTerminal
is added to represent this terminal type and to simplify any cases where applications need to pass this terminal around. It is equivalent to:Terminal<CrosstermBackend<Stdout>>
We also added
ratatui::try_init()
andtry_restore()
, for situations where you might want to handle initialization errors yourself instead of letting the panic handler fire and cleanup. Simple Apps should prefer theinit
andrestore
functions over these functions.Corresponding functions to allow passing a
TerminalOptions
with aViewport
(e.g. inline, fixed) are also available (init_with_options
, andtry_init_with_options
).The existing code to create a backend and terminal will remain and
... (truncated)
3a90e2a
chore(release): prepare for 0.28.1 (#1343)65da535
chore(ci): update release strategy (#1337)9ed85fd
docs(table): fix incorrect backticks in TableState
docs (#1342)aed60b9
fix(terminal): Terminal::insert_before would crash when called while the
view...3631b34
docs(examples): add widget implementation example (#1147)0d5f3c0
test: Avoid unneeded allocations in assertions (#1335)ed51c4b
feat(terminal): Add ratatui::init() and restore() methods (#1289)23516bc
chore: rename ratatui-org to ratatui (#1334)6d1bd99
docs: minor grammar fixes (#1330)2fb0b8a
fix: fix u16 overflow in Terminal::insert_before. (#1323)