Upgrade pkgs

pull/686/head
Arijit Basu 5 months ago
parent b4c8b4175c
commit 7bea7217c6
No known key found for this signature in database
GPG Key ID: 0F8EF5258DC38077

788
Cargo.lock generated

File diff suppressed because it is too large Load Diff

@ -22,29 +22,29 @@ categories = ['command-line-interface', 'command-line-utilities']
include = ['src/**/*', 'docs/en/src/**/*', 'LICENSE', 'README.md']
[dependencies]
libc = "0.2.147"
libc = "0.2.151"
humansize = "2.1.3"
natord = "1.0.9"
anyhow = "1.0.72"
serde_yaml = "0.9.25"
anyhow = "1.0.79"
serde_yaml = "0.9.30"
crossterm = { version = "0.27.0", features = [], default-features = false }
ansi-to-tui = "3.1.0"
regex = "1.9.3"
regex = "1.10.2"
gethostname = "0.4.3"
serde_json = "1.0.104"
path-absolutize = "3.1.0"
which = "4.4.0"
serde_json = "1.0.110"
path-absolutize = "3.1.1"
which = "5.0.0"
nu-ansi-term = "0.49.0"
textwrap = "0.16"
snailquote = "0.3.1"
skim = { version = "0.10.4", default-features = false }
time = { version = "0.3.25", features = ["serde", "local-offset", "formatting", "macros"] }
time = { version = "0.3.31", features = ["serde", "local-offset", "formatting", "macros"] }
jf = "0.6.2"
xdg = "2.5.2"
home = "0.5.5"
home = "0.5.9"
[dependencies.lscolors]
version = "0.15.0"
version = "0.16.0"
default-features = false
features = ["nu-ansi-term"]
@ -57,22 +57,22 @@ version = "2.0.4"
default-features = false
[dependencies.tui]
version = "0.22.0"
version = "0.25.0"
default-features = false
features = ['crossterm', 'serde']
features = ['crossterm', 'serde', 'underline-color']
package = 'ratatui'
[dependencies.serde]
version = "1.0.183"
version = "1.0.194"
features = []
default-features = false
[dependencies.indexmap]
version = "2.0.0"
version = "2.1.0"
features = ['serde']
[dependencies.mlua]
version = "0.8.9"
version = "0.9.2"
features = ['luajit', 'vendored', 'serialize', 'send']
[dependencies.tui-input]

@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1689422397,
"narHash": "sha256-fnopownlSBGTBYxGdTdUPM215yG/UEEj3wgheBLIbHs=",
"lastModified": 1704262187,
"narHash": "sha256-N4j9qghlp/Eb3Z11WF7Cb9U91AXwpascUbLH7YKMcLc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "45ae0efbbce2aada6d5e8de6ace0c803b08ac9c7",
"rev": "65f0d241783c94a08e4c9a3870736fc8854dd520",
"type": "github"
},
"original": {

@ -9,7 +9,6 @@ use crate::ui::Constraint;
use crate::ui::ContentRendererArg;
use mlua::Lua;
use serde::{Deserialize, Serialize};
use tui::backend::Backend;
use tui::layout::Constraint as TuiConstraint;
use tui::layout::Rect as TuiRect;
use tui::widgets::Cell;
@ -60,8 +59,8 @@ pub struct CustomContent {
}
/// A cursed function from crate::ui.
pub fn draw_custom_content<B: Backend>(
f: &mut Frame<B>,
pub fn draw_custom_content(
f: &mut Frame,
screen_size: TuiRect,
layout_size: TuiRect,
app: &app::App,
@ -165,8 +164,7 @@ pub fn draw_custom_content<B: Backend>(
.map(|w| w.to_tui(screen_size, layout_size))
.collect::<Vec<TuiConstraint>>();
let content = Table::new(rows)
.widths(&widths)
let content = Table::new(rows, widths)
.column_spacing(col_spacing.unwrap_or(1))
.block(block(
config,
@ -209,7 +207,7 @@ pub fn draw_custom_content<B: Backend>(
.map(|w| w.to_tui(screen_size, layout_size))
.collect::<Vec<TuiConstraint>>();
let mut content = Table::new(rows).widths(&widths).block(block(
let mut content = Table::new(rows, &widths).block(block(
config,
title.map(|t| format!(" {t} ")).unwrap_or_default(),
));

@ -18,7 +18,8 @@ pub fn config_dir() -> Option<PathBuf> {
pub fn runtime_dir() -> PathBuf {
let Some(dir) = BASE_DIRS
.as_ref()
.and_then(|base| base.get_runtime_directory().ok()) else {
.and_then(|base| base.get_runtime_directory().ok())
else {
return env::temp_dir();
};
dir.to_owned()

@ -7,7 +7,7 @@ use anyhow::Result;
use mlua::Lua;
use mlua::LuaSerdeExt;
use mlua::SerializeOptions;
use serde::Deserialize;
use serde::de::DeserializeOwned;
use serde::Serialize;
use std::fs;
@ -81,7 +81,7 @@ pub fn init(lua: &Lua) -> Result<(Config, Option<Hooks>)> {
let hooks: Option<Hooks> = lua
.load(DEFAULT_LUA_SCRIPT)
.set_name("xplr init")?
.set_name("xplr init")
.call(())
.and_then(|v| lua.from_value(v))?;
@ -98,7 +98,7 @@ pub fn extend(lua: &Lua, path: &str) -> Result<(Config, Option<Hooks>)> {
let hooks: Option<Hooks> = lua
.load(&script)
.set_name(path)?
.set_name(path)
.call(())
.and_then(|v| lua.from_value(v))?;
@ -138,7 +138,7 @@ pub fn resolve_fn<'lua>(
resolve_fn_recursive(globals, path.split('.'))
}
pub fn call<'lua, R: Deserialize<'lua>>(
pub fn call<'lua, R: DeserializeOwned>(
lua: &'lua Lua,
func: &str,
arg: mlua::Value<'lua>,

@ -16,7 +16,6 @@ use std::collections::HashMap;
use std::env;
use std::ops::BitXor;
use time::macros::format_description;
use tui::backend::Backend;
use tui::layout::Rect as TuiRect;
use tui::layout::{Constraint as TuiConstraint, Direction, Layout as TuiLayout};
use tui::style::{Color, Modifier as TuiModifier, Style as TuiStyle};
@ -666,8 +665,8 @@ pub fn block<'a>(config: PanelUiConfig, default_title: String) -> Block<'a> {
.border_style(config.border_style.into())
}
fn draw_table<B: Backend>(
f: &mut Frame<B>,
fn draw_table(
f: &mut Frame,
screen_size: TuiRect,
layout_size: TuiRect,
app: &app::App,
@ -822,8 +821,7 @@ fn draw_table<B: Backend>(
format!("({node_count}) ")
};
let table = Table::new(rows)
.widths(&table_constraints)
let table = Table::new(rows, table_constraints)
.style(app_config.general.table.style.to_owned().into())
.highlight_style(app_config.general.focus_ui.style.to_owned().into())
.column_spacing(app_config.general.table.col_spacing.unwrap_or_default())
@ -855,8 +853,8 @@ fn draw_table<B: Backend>(
f.render_widget(table, layout_size);
}
fn draw_selection<B: Backend>(
f: &mut Frame<B>,
fn draw_selection(
f: &mut Frame,
_screen_size: TuiRect,
layout_size: TuiRect,
app: &app::App,
@ -911,8 +909,8 @@ fn draw_selection<B: Backend>(
f.render_widget(selection_list, layout_size);
}
fn draw_help_menu<B: Backend>(
f: &mut Frame<B>,
fn draw_help_menu(
f: &mut Frame,
_screen_size: TuiRect,
layout_size: TuiRect,
app: &app::App,
@ -941,25 +939,24 @@ fn draw_help_menu<B: Backend>(
})
.collect::<Vec<Row>>();
let help_menu = Table::new(help_menu_rows)
.block(block(
config,
format!(" Help [{}{}] ", &app.mode.name, read_only_indicator(app)),
))
.widths(if app.config.general.hide_remaps_in_help_menu {
&[TuiConstraint::Percentage(20), TuiConstraint::Percentage(80)]
} else {
&[
TuiConstraint::Percentage(20),
TuiConstraint::Percentage(20),
TuiConstraint::Percentage(60),
]
});
let widths = if app.config.general.hide_remaps_in_help_menu {
vec![TuiConstraint::Percentage(20), TuiConstraint::Percentage(80)]
} else {
vec![
TuiConstraint::Percentage(20),
TuiConstraint::Percentage(20),
TuiConstraint::Percentage(60),
]
};
let help_menu = Table::new(help_menu_rows, widths).block(block(
config,
format!(" Help [{}{}] ", &app.mode.name, read_only_indicator(app)),
));
f.render_widget(help_menu, layout_size);
}
fn draw_input_buffer<B: Backend>(
f: &mut Frame<B>,
fn draw_input_buffer(
f: &mut Frame,
_screen_size: TuiRect,
layout_size: TuiRect,
app: &app::App,
@ -1020,8 +1017,8 @@ fn draw_input_buffer<B: Backend>(
};
}
fn draw_sort_n_filter<B: Backend>(
f: &mut Frame<B>,
fn draw_sort_n_filter(
f: &mut Frame,
_screen_size: TuiRect,
layout_size: TuiRect,
app: &app::App,
@ -1142,8 +1139,8 @@ fn draw_sort_n_filter<B: Backend>(
f.render_widget(p, layout_size);
}
fn draw_logs<B: Backend>(
f: &mut Frame<B>,
fn draw_logs(
f: &mut Frame,
_screen_size: TuiRect,
layout_size: TuiRect,
app: &app::App,
@ -1218,8 +1215,8 @@ fn draw_logs<B: Backend>(
f.render_widget(logs_list, layout_size);
}
pub fn draw_nothing<B: Backend>(
f: &mut Frame<B>,
pub fn draw_nothing(
f: &mut Frame,
_screen_size: TuiRect,
layout_size: TuiRect,
app: &app::App,
@ -1231,8 +1228,8 @@ pub fn draw_nothing<B: Backend>(
f.render_widget(nothing, layout_size);
}
pub fn draw_dynamic<B: Backend>(
f: &mut Frame<B>,
pub fn draw_dynamic(
f: &mut Frame,
screen_size: TuiRect,
layout_size: TuiRect,
app: &app::App,
@ -1255,8 +1252,8 @@ pub fn draw_dynamic<B: Backend>(
draw_static(f, screen_size, layout_size, app, panel, lua);
}
pub fn draw_static<B: Backend>(
f: &mut Frame<B>,
pub fn draw_static(
f: &mut Frame,
screen_size: TuiRect,
layout_size: TuiRect,
app: &app::App,
@ -1309,8 +1306,7 @@ pub fn draw_static<B: Backend>(
.map(|w| w.to_tui(screen_size, layout_size))
.collect::<Vec<TuiConstraint>>();
let content = Table::new(rows)
.widths(&widths)
let content = Table::new(rows, widths)
.column_spacing(col_spacing.unwrap_or(1))
.block(block(config, "".into()));
@ -1349,9 +1345,9 @@ pub struct ContentRendererArg {
pub layout_size: Rect,
}
pub fn draw_layout<B: Backend>(
pub fn draw_layout(
layout: Layout,
f: &mut Frame<B>,
f: &mut Frame,
screen_size: TuiRect,
layout_size: TuiRect,
app: &app::App,
@ -1445,7 +1441,7 @@ pub fn draw_layout<B: Backend>(
}
}
pub fn draw<B: Backend>(f: &mut Frame<B>, app: &app::App, lua: &Lua) {
pub fn draw(f: &mut Frame, app: &app::App, lua: &Lua) {
let screen_size = f.size();
let layout = app.mode.layout.as_ref().unwrap_or(&app.layout).to_owned();

Loading…
Cancel
Save