Upgrade to ratatui 0.26 (#11742)

# Description
Upgrade `ratatui` to 0.26

# User-Facing Changes
n/a
This commit is contained in:
Antoine Büsch 2024-02-08 11:15:45 +11:00 committed by GitHub
parent 09f513bb53
commit b2092df27e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 71 additions and 15 deletions

78
Cargo.lock generated
View file

@ -604,6 +604,15 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
[[package]]
name = "castaway"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a17ed5635fc8536268e5d4de1e22e81ac34419e5f052d4d51f4e01dcc263fcc"
dependencies = [
"rustversion",
]
[[package]]
name = "cc"
version = "1.0.83"
@ -812,11 +821,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c64043d6c7b7a4c58e39e7efccfdea7b93d885a795d0c054a69dbbf4dd52686"
dependencies = [
"crossterm",
"strum",
"strum_macros",
"strum 0.25.0",
"strum_macros 0.25.3",
"unicode-width",
]
[[package]]
name = "compact_str"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f86b9c4c00838774a6d902ef931eff7470720c51d90c2e32cfe15dc304737b3f"
dependencies = [
"castaway",
"cfg-if",
"itoa",
"ryu",
"static_assertions",
]
[[package]]
name = "console"
version = "0.15.8"
@ -3176,8 +3198,8 @@ dependencies = [
"rstest",
"serde",
"serde_json",
"strum",
"strum_macros",
"strum 0.25.0",
"strum_macros 0.25.3",
"thiserror",
"typetag",
]
@ -4214,7 +4236,7 @@ dependencies = [
"regex",
"serde",
"smartstring",
"strum_macros",
"strum_macros 0.25.3",
"version_check",
]
@ -4583,17 +4605,20 @@ dependencies = [
[[package]]
name = "ratatui"
version = "0.23.0"
version = "0.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e2e4cd95294a85c3b4446e63ef054eea43e0205b1fd60120c16b74ff7ff96ad"
checksum = "154b85ef15a5d1719bcaa193c3c81fe645cd120c156874cd660fe49fd21d1373"
dependencies = [
"bitflags 2.4.2",
"cassowary",
"compact_str",
"crossterm",
"indoc",
"itertools 0.11.0",
"itertools 0.12.0",
"lru",
"paste",
"strum",
"stability",
"strum 0.26.1",
"unicode-segmentation",
"unicode-width",
]
@ -4654,8 +4679,8 @@ dependencies = [
"serde",
"serde_json",
"strip-ansi-escapes",
"strum",
"strum_macros",
"strum 0.25.0",
"strum_macros 0.25.3",
"thiserror",
"unicode-segmentation",
"unicode-width",
@ -5359,6 +5384,16 @@ dependencies = [
"log",
]
[[package]]
name = "stability"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ebd1b177894da2a2d9120208c3386066af06a488255caabc5de8ddca22dbc3ce"
dependencies = [
"quote",
"syn 1.0.109",
]
[[package]]
name = "stable_deref_trait"
version = "1.2.0"
@ -5463,8 +5498,14 @@ name = "strum"
version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125"
[[package]]
name = "strum"
version = "0.26.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "723b93e8addf9aa965ebe2d11da6d7540fa2283fcea14b3371ff055f7ba13f5f"
dependencies = [
"strum_macros",
"strum_macros 0.26.1",
]
[[package]]
@ -5480,6 +5521,19 @@ dependencies = [
"syn 2.0.48",
]
[[package]]
name = "strum_macros"
version = "0.26.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a3417fc93d76740d974a01654a09777cb500428cc874ca9f45edfe0c4d4cd18"
dependencies = [
"heck",
"proc-macro2",
"quote",
"rustversion",
"syn 2.0.48",
]
[[package]]
name = "supports-color"
version = "2.1.0"

View file

@ -23,7 +23,9 @@ nu-utils = { path = "../nu-utils", version = "0.90.2" }
terminal_size = "0.3"
strip-ansi-escapes = "0.2.0"
crossterm = "0.27"
ratatui = "0.23"
ratatui = "0.26"
ansi-str = "0.8"
unicode-width = "0.1"
lscolors = { version = "0.17", default-features = false, features = ["nu-ansi-term"] }
lscolors = { version = "0.17", default-features = false, features = [
"nu-ansi-term",
] }

View file

@ -45,7 +45,7 @@ use super::views::{Layout, View};
use events::UIEvents;
pub type Frame<'a> = ratatui::Frame<'a, CrosstermBackend<Stdout>>;
pub type Frame<'a> = ratatui::Frame<'a>;
pub type Terminal = ratatui::Terminal<CrosstermBackend<Stdout>>;
pub type ConfigMap = HashMap<String, Value>;