ratatui update

This commit is contained in:
extrawurst 2024-07-08 08:52:29 +02:00
parent 72b954a1a5
commit 95bbbda9af
11 changed files with 39 additions and 25 deletions

32
Cargo.lock generated
View file

@ -1063,7 +1063,7 @@ dependencies = [
"fuzzy-matcher",
"gh-emoji",
"indexmap",
"itertools",
"itertools 0.13.0",
"log",
"notify",
"notify-debouncer-mini",
@ -1112,9 +1112,9 @@ dependencies = [
[[package]]
name = "heck"
version = "0.4.1"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "hmac"
@ -1232,6 +1232,15 @@ dependencies = [
"either",
]
[[package]]
name = "itertools"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
dependencies = [
"either",
]
[[package]]
name = "itoa"
version = "1.0.11"
@ -1816,20 +1825,21 @@ dependencies = [
[[package]]
name = "ratatui"
version = "0.26.3"
version = "0.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f44c9e68fd46eda15c646fbb85e1040b657a58cdc8c98db1d97a55930d991eef"
checksum = "d16546c5b5962abf8ce6e2881e722b4e0ae3b6f1a08a26ae3573c55853ca68d3"
dependencies = [
"bitflags 2.6.0",
"cassowary",
"compact_str",
"crossterm",
"itertools",
"itertools 0.13.0",
"lru",
"paste",
"serde",
"stability",
"strum",
"strum_macros",
"unicode-segmentation",
"unicode-truncate",
"unicode-width",
@ -2317,9 +2327,9 @@ dependencies = [
[[package]]
name = "strum_macros"
version = "0.26.2"
version = "0.26.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946"
checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be"
dependencies = [
"heck",
"proc-macro2",
@ -2466,9 +2476,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tui-textarea"
version = "0.4.0"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3e38ced1f941a9cfc923fbf2fe6858443c42cc5220bfd35bdd3648371e7bd8e"
checksum = "6b28768e9fa0560469d49bc37cad4b282b2f887c64da154f1205274e118a9f73"
dependencies = [
"crossterm",
"ratatui",
@ -2525,7 +2535,7 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a5fbabedabe362c618c714dbefda9927b5afc8e2a8102f47f081089a9019226"
dependencies = [
"itertools",
"itertools 0.12.1",
"unicode-width",
]

View file

@ -32,14 +32,14 @@ filetreelist = { path = "./filetreelist", version = "0.5" }
fuzzy-matcher = "0.3"
gh-emoji = { version = "1.0", optional = true }
indexmap = "2"
itertools = "0.12"
itertools = "0.13"
log = "0.4"
notify = "6.1"
notify-debouncer-mini = "0.4"
once_cell = "1"
# pin until upgrading this does not introduce a duplicte dependency
parking_lot_core = "=0.9.9"
ratatui = { version = "0.26", default-features = false, features = [
ratatui = { version = "0.27", default-features = false, features = [
'crossterm',
'serde',
] }
@ -57,7 +57,7 @@ syntect = { version = "5.2", default-features = false, features = [
"default-themes",
"html",
] }
tui-textarea = "0.4.0"
tui-textarea = "0.5"
two-face = { version = "0.4.0", default-features = false }
unicode-segmentation = "1.11"
unicode-truncate = "1.0"

View file

@ -22,4 +22,8 @@ version = "1.0.3"
[bans]
multiple-versions = "deny"
skip-tree = [{ name = "windows-sys" }, { name = "bitflags" }]
skip-tree = [
{ name = "windows-sys" },
{ name = "bitflags" },
{ name = "itertools" },
]

View file

@ -1074,7 +1074,7 @@ impl App {
const SIDE_PADS: usize = 2;
const MARGIN_LEFT_AND_RIGHT: usize = 2;
let r = r.inner(&Margin {
let r = r.inner(Margin {
vertical: 0,
horizontal: 1,
});

View file

@ -80,7 +80,7 @@ impl DrawableComponent for BranchListPopup {
area,
);
let area = area.inner(&Margin {
let area = area.inner(Margin {
vertical: 1,
horizontal: 1,
});

View file

@ -293,7 +293,7 @@ impl DrawableComponent for FuzzyFindPopup {
]
.as_ref(),
)
.split(area.inner(&Margin {
.split(area.inner(Margin {
horizontal: 1,
vertical: 1,
}));

View file

@ -208,7 +208,7 @@ impl HelpPopup {
let mut processed = 0_u16;
for (key, group) in
&self.cmds.iter().group_by(|e| e.text.group)
&self.cmds.iter().chunk_by(|e| e.text.group)
{
txt.push(Line::from(Span::styled(
Cow::from(key.to_string()),

View file

@ -377,7 +377,7 @@ impl LogSearchPopupPopup {
[Constraint::Length(1), Constraint::Percentage(100)]
.as_ref(),
)
.split(area.inner(&Margin {
.split(area.inner(Margin {
horizontal: 1,
vertical: 1,
}));
@ -430,7 +430,7 @@ impl LogSearchPopupPopup {
let chunks = Layout::default()
.direction(Direction::Vertical)
.constraints([Constraint::Length(1)].as_ref())
.split(area.inner(&Margin {
.split(area.inner(Margin {
horizontal: 1,
vertical: 1,
}));

View file

@ -67,7 +67,7 @@ impl DrawableComponent for SubmodulesListPopup {
area,
);
let area = area.inner(&Margin {
let area = area.inner(Margin {
vertical: 1,
horizontal: 1,
});

View file

@ -111,7 +111,7 @@ impl DrawableComponent for TagListPopup {
f.render_widget(Clear, area);
f.render_stateful_widget(table, area, &mut table_state);
let area = area.inner(&Margin {
let area = area.inner(Margin {
vertical: 1,
horizontal: 0,
});

View file

@ -52,7 +52,7 @@ impl Scrollbar {
};
let (bar_top, bar_height) = {
let scrollbar_area = area.inner(&Margin {
let scrollbar_area = area.inner(Margin {
horizontal: 0,
vertical: 1,
});
@ -89,7 +89,7 @@ impl Scrollbar {
};
let (bar_left, bar_width) = {
let scrollbar_area = area.inner(&Margin {
let scrollbar_area = area.inner(Margin {
horizontal: 1,
vertical: 0,
});