From daa817a4a77e8a6b1bbe18236ae811bc08db7856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Orhun=20Parmaks=C4=B1z?= Date: Sun, 3 Nov 2024 17:12:24 +0300 Subject: [PATCH] Replace vendored dependencies --- .gitmodules | 6 ------ Cargo.lock | 16 +++++++--------- Cargo.toml | 5 ++--- src/theme/base.rs | 2 -- src/theme/components.rs | 1 - vendor/ansi-to-tui | 1 - vendor/color-to-tui | 1 - 7 files changed, 9 insertions(+), 23 deletions(-) delete mode 100644 .gitmodules delete mode 160000 vendor/ansi-to-tui delete mode 160000 vendor/color-to-tui diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index c09e2c3..0000000 --- a/.gitmodules +++ /dev/null @@ -1,6 +0,0 @@ -[submodule "vendor/color-to-tui"] - path = vendor/color-to-tui - url = https://github.com/Macchina-CLI/color-to-tui -[submodule "vendor/ansi-to-tui"] - path = vendor/ansi-to-tui - url = https://github.com/Macchina-CLI/ansi-to-tui diff --git a/Cargo.lock b/Cargo.lock index 102fe09..2cb855e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -47,6 +47,8 @@ dependencies = [ [[package]] name = "ansi-to-tui" version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67555e1f1ece39d737e28c8a017721287753af3f93225e4a445b29ccb0f5912c" dependencies = [ "nom", "ratatui", @@ -138,6 +140,9 @@ name = "bitflags" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +dependencies = [ + "serde", +] [[package]] name = "block" @@ -299,14 +304,6 @@ dependencies = [ "objc", ] -[[package]] -name = "color-to-tui" -version = "0.3.0" -dependencies = [ - "ratatui", - "serde", -] - [[package]] name = "colorchoice" version = "1.0.2" @@ -334,6 +331,7 @@ dependencies = [ "itoa", "rustversion", "ryu", + "serde", "static_assertions", ] @@ -924,7 +922,6 @@ dependencies = [ "atty", "bytesize", "clap", - "color-to-tui", "colored", "dirs", "lazy_static", @@ -1262,6 +1259,7 @@ dependencies = [ "itertools 0.13.0", "lru", "paste", + "serde", "strum", "unicode-segmentation", "unicode-truncate", diff --git a/Cargo.toml b/Cargo.toml index 8d21e8c..410a4de 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,13 +20,12 @@ colored = "2.0.4" rand = "0.8.5" unicode-width = "0.1.11" lazy_static = "1.4.0" -ansi-to-tui = { path = "vendor/ansi-to-tui" } -color-to-tui = { path = "vendor/color-to-tui" } +ansi-to-tui = "7.0.0" dirs = "5.0.1" toml = { version = "0.8.8", features = ["parse"] } serde_json = "1.0.107" thiserror = "1.0.49" -ratatui = { version = "0.29", default-features = false, features = ["crossterm"] } +ratatui = { version = "0.29", default-features = false, features = ["crossterm", "serde"] } serde = { version = "1.0.188", features = ["derive"] } [build-dependencies.vergen] diff --git a/src/theme/base.rs b/src/theme/base.rs index d29246d..32ad353 100644 --- a/src/theme/base.rs +++ b/src/theme/base.rs @@ -25,9 +25,7 @@ pub struct Theme { hide_ascii: bool, prefer_small_ascii: bool, keys: Keys, - #[serde(with = "color_to_tui")] key_color: Color, - #[serde(with = "color_to_tui")] separator_color: Color, #[serde(skip_serializing, skip_deserializing)] name: String, diff --git a/src/theme/components.rs b/src/theme/components.rs index d95a43a..d696f5f 100644 --- a/src/theme/components.rs +++ b/src/theme/components.rs @@ -118,7 +118,6 @@ pub struct ASCII { path: Option, #[serde(default)] - #[serde(with = "color_to_tui::optional")] color: Option, } diff --git a/vendor/ansi-to-tui b/vendor/ansi-to-tui deleted file mode 160000 index 950d680..0000000 --- a/vendor/ansi-to-tui +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 950d68067ed8c7f74469eb2fd996e04e1b931481 diff --git a/vendor/color-to-tui b/vendor/color-to-tui deleted file mode 160000 index 9a1b684..0000000 --- a/vendor/color-to-tui +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9a1b684d92cc64994889e100575e38316a68670b