refactor: simplify module exports (#1770)

This commit is contained in:
三咲雅 · Misaki Masa 2024-10-12 21:05:12 +08:00 committed by GitHub
parent da1b2365b9
commit 13e307eab2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
209 changed files with 553 additions and 1021 deletions

72
Cargo.lock generated
View file

@ -339,9 +339,9 @@ dependencies = [
[[package]] [[package]]
name = "cc" name = "cc"
version = "1.1.28" version = "1.1.30"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e80e3b6a3ab07840e1cae9b0666a63970dc28e8ed5ffbcdacbfc760c281bfc1" checksum = "b16803a61b81d9eabb7eae2588776c4c1e584b738ede45fdbb4c972cec1e9945"
dependencies = [ dependencies = [
"jobserver", "jobserver",
"libc", "libc",
@ -378,9 +378,9 @@ dependencies = [
[[package]] [[package]]
name = "clap" name = "clap"
version = "4.5.19" version = "4.5.20"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7be5744db7978a28d9df86a214130d106a89ce49644cbc4e3f0c22c3fba30615" checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8"
dependencies = [ dependencies = [
"clap_builder", "clap_builder",
"clap_derive", "clap_derive",
@ -388,9 +388,9 @@ dependencies = [
[[package]] [[package]]
name = "clap_builder" name = "clap_builder"
version = "4.5.19" version = "4.5.20"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a5fbc17d3ef8278f55b282b2a2e75ae6f6c7d4bb70ed3d0382375104bfafdb4b" checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54"
dependencies = [ dependencies = [
"anstream", "anstream",
"anstyle", "anstyle",
@ -400,9 +400,9 @@ dependencies = [
[[package]] [[package]]
name = "clap_complete" name = "clap_complete"
version = "4.5.32" version = "4.5.33"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74a01f4f9ee6c066d42a1c8dedf0dcddad16c72a8981a309d6398de3a75b0c39" checksum = "9646e2e245bf62f45d39a0f3f36f1171ad1ea0d6967fd114bca72cb02a8fcdfb"
dependencies = [ dependencies = [
"clap", "clap",
] ]
@ -419,9 +419,9 @@ dependencies = [
[[package]] [[package]]
name = "clap_complete_nushell" name = "clap_complete_nushell"
version = "4.5.3" version = "4.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5fe32110e006bccf720f8c9af3fee1ba7db290c724eab61544e1d3295be3a40e" checksum = "315902e790cc6e5ddd20cbd313c1d0d49db77f191e149f96397230fb82a17677"
dependencies = [ dependencies = [
"clap", "clap",
"clap_complete", "clap_complete",
@ -640,18 +640,18 @@ dependencies = [
[[package]] [[package]]
name = "derive_builder" name = "derive_builder"
version = "0.20.1" version = "0.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd33f37ee6a119146a1781d3356a7c26028f83d779b2e04ecd45fdc75c76877b" checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947"
dependencies = [ dependencies = [
"derive_builder_macro", "derive_builder_macro",
] ]
[[package]] [[package]]
name = "derive_builder_core" name = "derive_builder_core"
version = "0.20.1" version = "0.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7431fa049613920234f22c47fdc33e6cf3ee83067091ea4277a3f8c4587aae38" checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8"
dependencies = [ dependencies = [
"darling", "darling",
"proc-macro2", "proc-macro2",
@ -661,9 +661,9 @@ dependencies = [
[[package]] [[package]]
name = "derive_builder_macro" name = "derive_builder_macro"
version = "0.20.1" version = "0.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4abae7035bf79b9877b779505d8cf3749285b80c43941eda66604841889451dc" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c"
dependencies = [ dependencies = [
"derive_builder_core", "derive_builder_core",
"syn 2.0.79", "syn 2.0.79",
@ -1228,9 +1228,9 @@ dependencies = [
[[package]] [[package]]
name = "js-sys" name = "js-sys"
version = "0.3.70" version = "0.3.72"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9"
dependencies = [ dependencies = [
"wasm-bindgen", "wasm-bindgen",
] ]
@ -1355,9 +1355,9 @@ dependencies = [
[[package]] [[package]]
name = "luajit-src" name = "luajit-src"
version = "210.5.10+f725e44" version = "210.5.11+97813fb"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18a0fa0df28e21f785c48d9c0f0be355cf40658badb667284207dbb4d1e574a9" checksum = "3015551c284515db7c30c559fc1080f9cb9ee990d1f6fca315451a107c7540bb"
dependencies = [ dependencies = [
"cc", "cc",
"which", "which",
@ -2862,9 +2862,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]] [[package]]
name = "wasm-bindgen" name = "wasm-bindgen"
version = "0.2.93" version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"once_cell", "once_cell",
@ -2873,9 +2873,9 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-backend" name = "wasm-bindgen-backend"
version = "0.2.93" version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358"
dependencies = [ dependencies = [
"bumpalo", "bumpalo",
"log", "log",
@ -2888,9 +2888,9 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-macro" name = "wasm-bindgen-macro"
version = "0.2.93" version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56"
dependencies = [ dependencies = [
"quote", "quote",
"wasm-bindgen-macro-support", "wasm-bindgen-macro-support",
@ -2898,9 +2898,9 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-macro-support" name = "wasm-bindgen-macro-support"
version = "0.2.93" version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -2911,9 +2911,9 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-shared" name = "wasm-bindgen-shared"
version = "0.2.93" version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d"
[[package]] [[package]]
name = "weezl" name = "weezl"
@ -3208,6 +3208,7 @@ dependencies = [
"tokio", "tokio",
"tracing", "tracing",
"yazi-config", "yazi-config",
"yazi-macro",
"yazi-shared", "yazi-shared",
] ]
@ -3224,6 +3225,7 @@ dependencies = [
"vergen-gitcl", "vergen-gitcl",
"yazi-adapter", "yazi-adapter",
"yazi-config", "yazi-config",
"yazi-macro",
"yazi-shared", "yazi-shared",
] ]
@ -3244,6 +3246,7 @@ dependencies = [
"vergen-gitcl", "vergen-gitcl",
"yazi-boot", "yazi-boot",
"yazi-dds", "yazi-dds",
"yazi-macro",
"yazi-shared", "yazi-shared",
] ]
@ -3270,6 +3273,7 @@ dependencies = [
"serde", "serde",
"toml", "toml",
"validator", "validator",
"yazi-macro",
"yazi-shared", "yazi-shared",
] ]
@ -3299,6 +3303,7 @@ dependencies = [
"yazi-config", "yazi-config",
"yazi-dds", "yazi-dds",
"yazi-fs", "yazi-fs",
"yazi-macro",
"yazi-plugin", "yazi-plugin",
"yazi-proxy", "yazi-proxy",
"yazi-scheduler", "yazi-scheduler",
@ -3321,6 +3326,7 @@ dependencies = [
"uzers", "uzers",
"vergen-gitcl", "vergen-gitcl",
"yazi-boot", "yazi-boot",
"yazi-macro",
"yazi-shared", "yazi-shared",
] ]
@ -3352,6 +3358,7 @@ dependencies = [
"yazi-core", "yazi-core",
"yazi-dds", "yazi-dds",
"yazi-fs", "yazi-fs",
"yazi-macro",
"yazi-plugin", "yazi-plugin",
"yazi-proxy", "yazi-proxy",
"yazi-shared", "yazi-shared",
@ -3363,10 +3370,10 @@ version = "0.3.3"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"futures", "futures",
"ratatui",
"regex", "regex",
"tokio", "tokio",
"yazi-config", "yazi-config",
"yazi-macro",
"yazi-proxy", "yazi-proxy",
"yazi-shared", "yazi-shared",
] ]
@ -3402,6 +3409,7 @@ dependencies = [
"yazi-boot", "yazi-boot",
"yazi-config", "yazi-config",
"yazi-dds", "yazi-dds",
"yazi-macro",
"yazi-prebuild", "yazi-prebuild",
"yazi-proxy", "yazi-proxy",
"yazi-shared", "yazi-shared",
@ -3422,6 +3430,7 @@ dependencies = [
"shell-words", "shell-words",
"tokio", "tokio",
"yazi-config", "yazi-config",
"yazi-macro",
"yazi-shared", "yazi-shared",
] ]
@ -3440,6 +3449,7 @@ dependencies = [
"trash", "trash",
"yazi-config", "yazi-config",
"yazi-dds", "yazi-dds",
"yazi-macro",
"yazi-plugin", "yazi-plugin",
"yazi-proxy", "yazi-proxy",
"yazi-shared", "yazi-shared",

View file

@ -15,7 +15,7 @@ anyhow = "1.0.89"
arc-swap = "1.7.1" arc-swap = "1.7.1"
base64 = "0.22.1" base64 = "0.22.1"
bitflags = "2.6.0" bitflags = "2.6.0"
clap = { version = "4.5.19", features = [ "derive" ] } clap = { version = "4.5.20", features = [ "derive" ] }
crossterm = { version = "0.28.1", features = [ "event-stream" ] } crossterm = { version = "0.28.1", features = [ "event-stream" ] }
dirs = "5.0.1" dirs = "5.0.1"
futures = "0.3.31" futures = "0.3.31"

View file

@ -1 +1 @@
{"language":"en","words":["Punct","KEYMAP","splitn","crossterm","YAZI","unar","peekable","ratatui","syntect","pbpaste","pbcopy","ffmpegthumbnailer","oneshot","Posix","Lsar","XADDOS","zoxide","cands","Deque","precache","imageops","IFBLK","IFCHR","IFDIR","IFIFO","IFLNK","IFMT","IFSOCK","IRGRP","IROTH","IRUSR","ISGID","ISUID","ISVTX","IWGRP","IWOTH","IWUSR","IXGRP","IXOTH","IXUSR","libc","winsize","TIOCGWINSZ","xpixel","ypixel","ioerr","appender","Catppuccin","macchiato","gitmodules","Dotfiles","bashprofile","vimrc","flac","webp","exiftool","mediainfo","ripgrep","nvim","indexmap","indexmap","unwatch","canonicalize","serde","fsevent","Ueberzug","iterm","wezterm","sixel","chafa","ueberzugpp"," Überzug"," Überzug","Konsole","Alacritty","Überzug","pkgs","paru","unarchiver","pdftoppm","poppler","prebuild","singlefile","jpegopt","EXIF","rustfmt","mktemp","nanos","xclip","xsel","natord","Mintty","nixos","nixpkgs","SIGTSTP","SIGCONT","SIGCONT","mlua","nonstatic","userdata","metatable","natsort","backstack","luajit","Succ","Succ","cand","fileencoding","foldmethod","lightgreen","darkgray","lightred","lightyellow","lightcyan","nushell","msvc","aarch","linemode","sxyazi","rsplit","ZELLIJ","bitflags","bitflags","USERPROFILE","Neovim","vergen","gitcl","Renderable","preloaders","prec","imagesize","Upserting","prio","Ghostty","Catmull","Lanczos","cmds","unyank","scrolloff","headsup","unsub","uzers","scopeguard","SPDLOG","globset","filetime","magick","magick","prefetcher","Prework","prefetchers","PREWORKERS","conds","translit","rxvt","Urxvt","realpath","realname","REPARSE","hardlink","hardlinking","nlink","nlink","linemodes","SIGSTOP","sevenzip","rsplitn","replacen","DECSET","DECRQM","repeek","cwds","tcsi","Hyprland","Wayfire","SWAYSOCK","btime","nsec","codegen"],"version":"0.2","flagWords":[]} {"words":["Punct","KEYMAP","splitn","crossterm","YAZI","unar","peekable","ratatui","syntect","pbpaste","pbcopy","ffmpegthumbnailer","oneshot","Posix","Lsar","XADDOS","zoxide","cands","Deque","precache","imageops","IFBLK","IFCHR","IFDIR","IFIFO","IFLNK","IFMT","IFSOCK","IRGRP","IROTH","IRUSR","ISGID","ISUID","ISVTX","IWGRP","IWOTH","IWUSR","IXGRP","IXOTH","IXUSR","libc","winsize","TIOCGWINSZ","xpixel","ypixel","ioerr","appender","Catppuccin","macchiato","gitmodules","Dotfiles","bashprofile","vimrc","flac","webp","exiftool","mediainfo","ripgrep","nvim","indexmap","indexmap","unwatch","canonicalize","serde","fsevent","Ueberzug","iterm","wezterm","sixel","chafa","ueberzugpp"," Überzug"," Überzug","Konsole","Alacritty","Überzug","pkgs","paru","unarchiver","pdftoppm","poppler","prebuild","singlefile","jpegopt","EXIF","rustfmt","mktemp","nanos","xclip","xsel","natord","Mintty","nixos","nixpkgs","SIGTSTP","SIGCONT","SIGCONT","mlua","nonstatic","userdata","metatable","natsort","backstack","luajit","Succ","Succ","cand","fileencoding","foldmethod","lightgreen","darkgray","lightred","lightyellow","lightcyan","nushell","msvc","aarch","linemode","sxyazi","rsplit","ZELLIJ","bitflags","bitflags","USERPROFILE","Neovim","vergen","gitcl","Renderable","preloaders","prec","imagesize","Upserting","prio","Ghostty","Catmull","Lanczos","cmds","unyank","scrolloff","headsup","unsub","uzers","scopeguard","SPDLOG","globset","filetime","magick","magick","prefetcher","Prework","prefetchers","PREWORKERS","conds","translit","rxvt","Urxvt","realpath","realname","REPARSE","hardlink","hardlinking","nlink","nlink","linemodes","SIGSTOP","sevenzip","rsplitn","replacen","DECSET","DECRQM","repeek","cwds","tcsi","Hyprland","Wayfire","SWAYSOCK","btime","nsec","codegen","gethostname"],"flagWords":[],"version":"0.2","language":"en"}

View file

@ -10,6 +10,7 @@ repository = "https://github.com/sxyazi/yazi"
[dependencies] [dependencies]
yazi-config = { path = "../yazi-config", version = "0.3.3" } yazi-config = { path = "../yazi-config", version = "0.3.3" }
yazi-macro = { path = "../yazi-macro", version = "0.3.3" }
yazi-shared = { path = "../yazi-shared", version = "0.3.3" } yazi-shared = { path = "../yazi-shared", version = "0.3.3" }
# External dependencies # External dependencies

View file

@ -1,31 +1,10 @@
#![allow(clippy::unit_arg)] #![allow(clippy::unit_arg)]
mod adapter; yazi_macro::mod_flat!(
mod chafa; adapter, chafa, dimension, emulator, iip, image, kgp, kgp_old, mux, sixel, ueberzug
mod dimension; );
mod emulator;
mod iip;
mod image;
mod kgp;
mod kgp_old;
mod mux;
mod sixel;
mod ueberzug;
pub use adapter::*;
use chafa::*;
pub use dimension::*;
pub use emulator::*;
use iip::*;
use kgp::*;
use kgp_old::*;
pub use mux::*;
use sixel::*;
use ueberzug::*;
use yazi_shared::{RoCell, env_exists, in_wsl}; use yazi_shared::{RoCell, env_exists, in_wsl};
pub use crate::image::*;
pub static ADAPTOR: RoCell<Adapter> = RoCell::new(); pub static ADAPTOR: RoCell<Adapter> = RoCell::new();
// Tmux support // Tmux support

View file

@ -9,18 +9,19 @@ homepage = "https://yazi-rs.github.io"
repository = "https://github.com/sxyazi/yazi" repository = "https://github.com/sxyazi/yazi"
[dependencies] [dependencies]
regex = { workspace = true }
yazi-adapter = { path = "../yazi-adapter", version = "0.3.3" } yazi-adapter = { path = "../yazi-adapter", version = "0.3.3" }
yazi-config = { path = "../yazi-config", version = "0.3.3" } yazi-config = { path = "../yazi-config", version = "0.3.3" }
yazi-macro = { path = "../yazi-macro", version = "0.3.3" }
yazi-shared = { path = "../yazi-shared", version = "0.3.3" } yazi-shared = { path = "../yazi-shared", version = "0.3.3" }
# External dependencies # External dependencies
clap = { workspace = true } clap = { workspace = true }
regex = { workspace = true }
serde = { workspace = true } serde = { workspace = true }
[build-dependencies] [build-dependencies]
clap = { workspace = true } clap = { workspace = true }
clap_complete = "4.5.32" clap_complete = "4.5.33"
clap_complete_fig = "4.5.2" clap_complete_fig = "4.5.2"
clap_complete_nushell = "4.5.3" clap_complete_nushell = "4.5.4"
vergen-gitcl = { version = "1.0.1", features = [ "build" ] } vergen-gitcl = { version = "1.0.1", features = [ "build" ] }

View file

@ -1,8 +1,3 @@
#![allow(clippy::module_inception)] #![allow(clippy::module_inception)]
mod actions; yazi_macro::mod_flat!(actions, clear_cache, debug, version);
mod clear_cache;
mod debug;
mod version;
pub(super) use actions::*;

View file

@ -1,13 +1,10 @@
yazi_macro::mod_pub!(actions);
yazi_macro::mod_flat!(args, boot);
use clap::Parser; use clap::Parser;
use yazi_shared::RoCell; use yazi_shared::RoCell;
mod actions;
mod args;
mod boot;
pub use args::*;
pub use boot::*;
pub static ARGS: RoCell<Args> = RoCell::new(); pub static ARGS: RoCell<Args> = RoCell::new();
pub static BOOT: RoCell<Boot> = RoCell::new(); pub static BOOT: RoCell<Boot> = RoCell::new();

View file

@ -11,6 +11,7 @@ repository = "https://github.com/sxyazi/yazi"
[dependencies] [dependencies]
yazi-boot = { path = "../yazi-boot", version = "0.3.3" } yazi-boot = { path = "../yazi-boot", version = "0.3.3" }
yazi-dds = { path = "../yazi-dds", version = "0.3.3" } yazi-dds = { path = "../yazi-dds", version = "0.3.3" }
yazi-macro = { path = "../yazi-macro", version = "0.3.3" }
yazi-shared = { path = "../yazi-shared", version = "0.3.3" } yazi-shared = { path = "../yazi-shared", version = "0.3.3" }
# External dependencies # External dependencies
@ -26,9 +27,9 @@ toml_edit = "0.22.22"
# External build dependencies # External build dependencies
anyhow = { workspace = true } anyhow = { workspace = true }
clap = { workspace = true } clap = { workspace = true }
clap_complete = "4.5.32" clap_complete = "4.5.33"
clap_complete_fig = "4.5.2" clap_complete_fig = "4.5.2"
clap_complete_nushell = "4.5.3" clap_complete_nushell = "4.5.4"
serde_json = { workspace = true } serde_json = { workspace = true }
vergen-gitcl = { version = "1.0.1", features = [ "build" ] } vergen-gitcl = { version = "1.0.1", features = [ "build" ] }

View file

@ -1,7 +1,7 @@
mod args; yazi_macro::mod_pub!(package);
mod package;
yazi_macro::mod_flat!(args);
use args::*;
use clap::Parser; use clap::Parser;
#[tokio::main] #[tokio::main]

View file

@ -1,16 +1,8 @@
#![allow(clippy::module_inception)] #![allow(clippy::module_inception)]
mod add; yazi_macro::mod_flat!(add, deploy, git, install, package, parser, upgrade);
mod deploy;
mod git;
mod install;
mod package;
mod parser;
mod upgrade;
use anyhow::Context; use anyhow::Context;
use git::*;
pub(super) use package::*;
pub(super) fn init() -> anyhow::Result<()> { pub(super) fn init() -> anyhow::Result<()> {
let root = yazi_shared::Xdg::state_dir().join("packages"); let root = yazi_shared::Xdg::state_dir().join("packages");

View file

@ -9,6 +9,7 @@ homepage = "https://yazi-rs.github.io"
repository = "https://github.com/sxyazi/yazi" repository = "https://github.com/sxyazi/yazi"
[dependencies] [dependencies]
yazi-macro = { path = "../yazi-macro", version = "0.3.3" }
yazi-shared = { path = "../yazi-shared", version = "0.3.3" } yazi-shared = { path = "../yazi-shared", version = "0.3.3" }
# External dependencies # External dependencies

View file

@ -1,11 +1 @@
mod chord; yazi_macro::mod_flat!(chord, cow, deserializers, key, keymap);
mod cow;
mod deserializers;
mod key;
mod keymap;
pub use chord::*;
pub use cow::*;
use deserializers::*;
pub use key::*;
pub use keymap::*;

View file

@ -1,30 +1,13 @@
#![allow(clippy::module_inception)] #![allow(clippy::module_inception)]
yazi_macro::mod_pub!(keymap, log, manager, open, plugin, popup, preview, tasks, theme, which);
yazi_macro::mod_flat!(layout, pattern, preset, priority);
use std::str::FromStr; use std::str::FromStr;
use yazi_shared::{RoCell, Xdg}; use yazi_shared::{RoCell, Xdg};
pub mod keymap;
mod layout;
mod log;
mod macros;
pub mod manager;
pub mod open;
mod pattern;
pub mod plugin;
pub mod popup;
mod preset;
pub mod preview;
mod priority;
mod tasks;
pub mod theme;
pub mod which;
pub use layout::*;
pub(crate) use pattern::*;
pub(crate) use preset::*;
pub use priority::*;
pub static LAYOUT: RoCell<arc_swap::ArcSwap<Layout>> = RoCell::new(); pub static LAYOUT: RoCell<arc_swap::ArcSwap<Layout>> = RoCell::new();
pub static KEYMAP: RoCell<keymap::Keymap> = RoCell::new(); pub static KEYMAP: RoCell<keymap::Keymap> = RoCell::new();

View file

@ -1,3 +1 @@
mod log; yazi_macro::mod_flat!(log);
pub use log::*;

View file

@ -1,9 +1 @@
mod manager; yazi_macro::mod_flat!(manager, mouse, ratio, sorting);
mod mouse;
mod ratio;
mod sorting;
pub use manager::*;
pub use mouse::*;
pub use ratio::*;
pub use sorting::*;

View file

@ -1,7 +1 @@
mod open; yazi_macro::mod_flat!(open, opener, rule);
mod opener;
mod rule;
pub use open::*;
pub use opener::*;
use rule::*;

View file

@ -1,11 +1,3 @@
mod fetcher; yazi_macro::mod_flat!(fetcher, plugin, preloader, previewer);
mod plugin;
mod preloader;
mod previewer;
pub use fetcher::*;
pub use plugin::*;
pub use preloader::*;
pub use previewer::*;
pub const MAX_PREWORKERS: u8 = 32; pub const MAX_PREWORKERS: u8 = 32;

View file

@ -1,15 +1 @@
mod confirm; yazi_macro::mod_flat!(confirm, input, offset, options, origin, position, select);
mod input;
mod offset;
mod options;
mod origin;
mod position;
mod select;
pub use confirm::*;
pub use input::*;
pub use offset::*;
pub use options::*;
pub use origin::*;
pub use position::*;
pub use select::*;

View file

@ -2,8 +2,9 @@ use std::{borrow::Cow, path::{Path, PathBuf}};
use anyhow::{Context, Result}; use anyhow::{Context, Result};
use toml::{Table, Value}; use toml::{Table, Value};
use yazi_macro::config_preset as preset;
use crate::{preset, theme::Flavor}; use crate::theme::Flavor;
pub(crate) struct Preset; pub(crate) struct Preset;

View file

@ -1,5 +1 @@
mod preview; yazi_macro::mod_flat!(preview, wrap);
mod wrap;
pub use preview::*;
pub use wrap::*;

View file

@ -1,3 +1 @@
mod tasks; yazi_macro::mod_flat!(tasks);
pub use tasks::*;

View file

@ -1,11 +1 @@
mod filetype; yazi_macro::mod_flat!(filetype, flavor, icons, is, theme);
mod flavor;
mod icons;
mod is;
mod theme;
pub use filetype::*;
pub use flavor::*;
pub use icons::*;
pub use is::*;
pub use theme::*;

View file

@ -1,5 +1 @@
mod sorting; yazi_macro::mod_flat!(sorting, which);
mod which;
pub use sorting::*;
pub use which::*;

View file

@ -15,6 +15,7 @@ yazi-codegen = { path = "../yazi-codegen", version = "0.3.3" }
yazi-config = { path = "../yazi-config", version = "0.3.3" } yazi-config = { path = "../yazi-config", version = "0.3.3" }
yazi-dds = { path = "../yazi-dds", version = "0.3.3" } yazi-dds = { path = "../yazi-dds", version = "0.3.3" }
yazi-fs = { path = "../yazi-fs", version = "0.3.3" } yazi-fs = { path = "../yazi-fs", version = "0.3.3" }
yazi-macro = { path = "../yazi-macro", version = "0.3.3" }
yazi-plugin = { path = "../yazi-plugin", version = "0.3.3" } yazi-plugin = { path = "../yazi-plugin", version = "0.3.3" }
yazi-proxy = { path = "../yazi-proxy", version = "0.3.3" } yazi-proxy = { path = "../yazi-proxy", version = "0.3.3" }
yazi-scheduler = { path = "../yazi-scheduler", version = "0.3.3" } yazi-scheduler = { path = "../yazi-scheduler", version = "0.3.3" }

View file

@ -1,8 +1,9 @@
use yazi_shared::{event::{Cmd, Data}, render}; use yazi_macro::render;
use yazi_shared::event::{Cmd, Data};
use crate::completion::Completion; use crate::completion::Completion;
pub struct Opt { struct Opt {
step: isize, step: isize,
} }

View file

@ -1,9 +1,10 @@
use yazi_macro::render;
use yazi_proxy::InputProxy; use yazi_proxy::InputProxy;
use yazi_shared::{event::Cmd, render}; use yazi_shared::event::Cmd;
use crate::completion::Completion; use crate::completion::Completion;
pub struct Opt { struct Opt {
submit: bool, submit: bool,
} }

View file

@ -1,4 +1 @@
mod arrow; yazi_macro::mod_flat!(arrow, close, show, trigger);
mod close;
mod show;
mod trigger;

View file

@ -1,12 +1,13 @@
use std::{mem, ops::ControlFlow}; use std::{mem, ops::ControlFlow};
use yazi_shared::{event::{Cmd, Data}, render}; use yazi_macro::render;
use yazi_shared::event::{Cmd, Data};
use crate::completion::Completion; use crate::completion::Completion;
const LIMIT: usize = 30; const LIMIT: usize = 30;
pub struct Opt { struct Opt {
cache: Vec<String>, cache: Vec<String>,
cache_name: String, cache_name: String,
word: String, word: String,

View file

@ -1,7 +1,8 @@
use std::{borrow::Cow, mem, path::{MAIN_SEPARATOR, MAIN_SEPARATOR_STR}}; use std::{borrow::Cow, mem, path::{MAIN_SEPARATOR, MAIN_SEPARATOR_STR}};
use tokio::fs; use tokio::fs;
use yazi_shared::{Layer, emit, event::{Cmd, Data}, render}; use yazi_macro::{emit, render};
use yazi_shared::{Layer, event::{Cmd, Data}};
use crate::completion::Completion; use crate::completion::Completion;
@ -11,7 +12,7 @@ const SEPARATOR: [char; 2] = ['/', '\\'];
#[cfg(not(windows))] #[cfg(not(windows))]
const SEPARATOR: char = std::path::MAIN_SEPARATOR; const SEPARATOR: char = std::path::MAIN_SEPARATOR;
pub struct Opt { struct Opt {
word: String, word: String,
ticket: usize, ticket: usize,
} }

View file

@ -1,4 +1,3 @@
mod commands; yazi_macro::mod_pub!(commands);
mod completion;
pub use completion::*; yazi_macro::mod_flat!(completion);

View file

@ -1,8 +1,9 @@
use yazi_shared::{event::{Cmd, Data}, render}; use yazi_macro::render;
use yazi_shared::event::{Cmd, Data};
use crate::{confirm::Confirm, manager::Manager}; use crate::{confirm::Confirm, manager::Manager};
pub struct Opt { struct Opt {
step: isize, step: isize,
} }

View file

@ -1,8 +1,9 @@
use yazi_shared::{event::Cmd, render}; use yazi_macro::render;
use yazi_shared::event::Cmd;
use crate::confirm::Confirm; use crate::confirm::Confirm;
pub struct Opt { struct Opt {
submit: bool, submit: bool,
} }

View file

@ -1,3 +1 @@
mod arrow; yazi_macro::mod_flat!(arrow, close, show);
mod close;
mod show;

View file

@ -1,6 +1,7 @@
use tokio::sync::oneshot; use tokio::sync::oneshot;
use yazi_config::popup::ConfirmCfg; use yazi_config::popup::ConfirmCfg;
use yazi_shared::{event::Cmd, render}; use yazi_macro::render;
use yazi_shared::event::Cmd;
use crate::confirm::Confirm; use crate::confirm::Confirm;

View file

@ -1,4 +1,3 @@
mod commands; yazi_macro::mod_pub!(commands);
mod confirm;
pub use confirm::*; yazi_macro::mod_flat!(confirm);

View file

@ -1,8 +1,9 @@
use yazi_shared::{event::{Cmd, Data}, render}; use yazi_macro::render;
use yazi_shared::event::{Cmd, Data};
use crate::help::Help; use crate::help::Help;
pub struct Opt { struct Opt {
step: isize, step: isize,
} }

View file

@ -1,4 +1,5 @@
use yazi_shared::{event::Cmd, render}; use yazi_macro::render;
use yazi_shared::event::Cmd;
use crate::help::Help; use crate::help::Help;

View file

@ -1,5 +1,6 @@
use yazi_config::popup::{Offset, Origin, Position}; use yazi_config::popup::{Offset, Origin, Position};
use yazi_shared::{event::Cmd, render}; use yazi_macro::render;
use yazi_shared::event::Cmd;
use crate::{help::Help, input::Input}; use crate::{help::Help, input::Input};

View file

@ -1,3 +1 @@
mod arrow; yazi_macro::mod_flat!(arrow, escape, filter);
mod escape;
mod filter;

View file

@ -2,7 +2,8 @@ use crossterm::event::KeyCode;
use unicode_width::UnicodeWidthStr; use unicode_width::UnicodeWidthStr;
use yazi_adapter::Dimension; use yazi_adapter::Dimension;
use yazi_config::{KEYMAP, keymap::{Chord, Key}}; use yazi_config::{KEYMAP, keymap::{Chord, Key}};
use yazi_shared::{Layer, render, render_and}; use yazi_macro::{render, render_and};
use yazi_shared::Layer;
use super::HELP_MARGIN; use super::HELP_MARGIN;
use crate::input::Input; use crate::input::Input;

View file

@ -1,6 +1,5 @@
mod commands; yazi_macro::mod_pub!(commands);
mod help;
pub use help::*; yazi_macro::mod_flat!(help);
pub const HELP_MARGIN: u16 = 1; pub const HELP_MARGIN: u16 = 1;

View file

@ -1,8 +1,9 @@
use yazi_shared::{event::Cmd, render}; use yazi_macro::render;
use yazi_shared::event::Cmd;
use crate::input::Input; use crate::input::Input;
pub struct Opt { struct Opt {
under: bool, under: bool,
} }

View file

@ -1,9 +1,10 @@
use yazi_macro::render;
use yazi_proxy::CompletionProxy; use yazi_proxy::CompletionProxy;
use yazi_shared::{InputError, event::Cmd, render}; use yazi_shared::{errors::InputError, event::Cmd};
use crate::input::Input; use crate::input::Input;
pub struct Opt { struct Opt {
submit: bool, submit: bool,
} }

View file

@ -1,6 +1,7 @@
use std::path::MAIN_SEPARATOR_STR; use std::path::MAIN_SEPARATOR_STR;
use yazi_shared::{event::{Cmd, Data}, render}; use yazi_macro::render;
use yazi_shared::event::{Cmd, Data};
use crate::input::Input; use crate::input::Input;
@ -10,7 +11,7 @@ const SEPARATOR: [char; 2] = ['/', '\\'];
#[cfg(not(windows))] #[cfg(not(windows))]
const SEPARATOR: char = std::path::MAIN_SEPARATOR; const SEPARATOR: char = std::path::MAIN_SEPARATOR;
pub struct Opt { struct Opt {
word: String, word: String,
ticket: usize, ticket: usize,
} }

View file

@ -1,8 +1,9 @@
use yazi_shared::{event::Cmd, render}; use yazi_macro::render;
use yazi_shared::event::Cmd;
use crate::input::{Input, op::InputOp}; use crate::input::{Input, op::InputOp};
pub struct Opt { struct Opt {
cut: bool, cut: bool,
insert: bool, insert: bool,
} }

View file

@ -1,9 +1,10 @@
use yazi_macro::render;
use yazi_proxy::CompletionProxy; use yazi_proxy::CompletionProxy;
use yazi_shared::{event::Cmd, render}; use yazi_shared::event::Cmd;
use crate::input::{Input, InputMode, op::InputOp}; use crate::input::{Input, InputMode, op::InputOp};
pub struct Opt; struct Opt;
impl From<Cmd> for Opt { impl From<Cmd> for Opt {
fn from(_: Cmd) -> Self { Self } fn from(_: Cmd) -> Self { Self }

View file

@ -2,7 +2,7 @@ use yazi_shared::{CharKind, event::Cmd};
use crate::input::{Input, op::InputOp}; use crate::input::{Input, op::InputOp};
pub struct Opt { struct Opt {
end_of_word: bool, end_of_word: bool,
} }

View file

@ -1,8 +1,9 @@
use yazi_shared::{event::Cmd, render}; use yazi_macro::render;
use yazi_shared::event::Cmd;
use crate::input::{Input, InputMode, op::InputOp}; use crate::input::{Input, InputMode, op::InputOp};
pub struct Opt { struct Opt {
append: bool, append: bool,
} }

View file

@ -1,10 +1,11 @@
use std::ops::RangeBounds; use std::ops::RangeBounds;
use yazi_shared::{CharKind, event::Cmd, render}; use yazi_macro::render;
use yazi_shared::{CharKind, event::Cmd};
use crate::input::Input; use crate::input::Input;
pub struct Opt { struct Opt {
kind: String, kind: String,
} }

View file

@ -1,17 +1,4 @@
mod backspace; yazi_macro::mod_flat!(
mod backward; backspace, backward, close, complete, delete, escape, forward, insert, kill, move_, paste, redo,
mod close; show, type_, undo, visual, yank
mod complete; );
mod delete;
mod escape;
mod forward;
mod insert;
mod kill;
mod move_;
mod paste;
mod redo;
mod show;
mod type_;
mod undo;
mod visual;
mod yank;

View file

@ -1,9 +1,10 @@
use unicode_width::UnicodeWidthStr; use unicode_width::UnicodeWidthStr;
use yazi_shared::{event::{Cmd, Data}, render}; use yazi_macro::render;
use yazi_shared::event::{Cmd, Data};
use crate::input::{Input, op::InputOp, snap::InputSnap}; use crate::input::{Input, op::InputOp, snap::InputSnap};
pub struct Opt { struct Opt {
step: isize, step: isize,
in_operating: bool, in_operating: bool,
} }

View file

@ -1,9 +1,10 @@
use yazi_macro::render;
use yazi_plugin::CLIPBOARD; use yazi_plugin::CLIPBOARD;
use yazi_shared::{event::Cmd, render}; use yazi_shared::event::Cmd;
use crate::input::{Input, op::InputOp}; use crate::input::{Input, op::InputOp};
pub struct Opt { struct Opt {
before: bool, before: bool,
} }

View file

@ -1,4 +1,5 @@
use yazi_shared::{event::Cmd, render}; use yazi_macro::render;
use yazi_shared::event::Cmd;
use crate::input::Input; use crate::input::Input;

View file

@ -1,6 +1,7 @@
use tokio::sync::mpsc; use tokio::sync::mpsc;
use yazi_config::popup::InputCfg; use yazi_config::popup::InputCfg;
use yazi_shared::{InputError, event::Cmd, render}; use yazi_macro::render;
use yazi_shared::{errors::InputError, event::Cmd};
use crate::input::Input; use crate::input::Input;

View file

@ -3,7 +3,7 @@ use yazi_shared::event::Cmd;
use crate::input::{Input, InputMode}; use crate::input::{Input, InputMode};
pub struct Opt; struct Opt;
impl From<Cmd> for Opt { impl From<Cmd> for Opt {
fn from(_: Cmd) -> Self { Self } fn from(_: Cmd) -> Self { Self }

View file

@ -1,4 +1,5 @@
use yazi_shared::{event::Cmd, render}; use yazi_macro::render;
use yazi_shared::event::Cmd;
use crate::input::{Input, InputMode}; use crate::input::{Input, InputMode};

View file

@ -1,4 +1,5 @@
use yazi_shared::{event::Cmd, render}; use yazi_macro::render;
use yazi_shared::event::Cmd;
use crate::input::{Input, InputMode, op::InputOp}; use crate::input::{Input, InputMode, op::InputOp};

View file

@ -1,4 +1,5 @@
use yazi_shared::{event::Cmd, render}; use yazi_macro::render;
use yazi_shared::event::Cmd;
use crate::input::{Input, op::InputOp}; use crate::input::{Input, op::InputOp};

View file

@ -3,8 +3,9 @@ use std::ops::Range;
use tokio::sync::mpsc::UnboundedSender; use tokio::sync::mpsc::UnboundedSender;
use unicode_width::UnicodeWidthStr; use unicode_width::UnicodeWidthStr;
use yazi_config::{INPUT, popup::Position}; use yazi_config::{INPUT, popup::Position};
use yazi_macro::render;
use yazi_plugin::CLIPBOARD; use yazi_plugin::CLIPBOARD;
use yazi_shared::{InputError, render}; use yazi_shared::errors::InputError;
use super::{InputSnap, InputSnaps, mode::InputMode, op::InputOp}; use super::{InputSnap, InputSnaps, mode::InputMode, op::InputOp};

View file

@ -1,12 +1,3 @@
mod commands; yazi_macro::mod_pub!(commands);
mod input;
mod mode;
mod op;
mod snap;
mod snaps;
pub use input::*; yazi_macro::mod_flat!(input, mode, op, snap, snaps);
pub use mode::*;
use op::*;
use snap::*;
use snaps::*;

View file

@ -6,16 +6,7 @@
clippy::unit_arg clippy::unit_arg
)] )]
pub mod completion; yazi_macro::mod_pub!(completion, confirm, help, input, manager, notify, select, tab, tasks, which);
pub mod confirm;
pub mod help;
pub mod input;
pub mod manager;
pub mod notify;
pub mod select;
pub mod tab;
pub mod tasks;
pub mod which;
pub fn init() { pub fn init() {
manager::WATCHED.with(<_>::default); manager::WATCHED.with(<_>::default);

View file

@ -8,7 +8,7 @@ use yazi_shared::{event::Cmd, fs::{File, FilesOp, Url, UrnBuf, maybe_exists, ok_
use crate::manager::Manager; use crate::manager::Manager;
pub struct Opt { struct Opt {
dir: bool, dir: bool,
force: bool, force: bool,
} }

View file

@ -2,7 +2,7 @@ use yazi_shared::event::Cmd;
use crate::{manager::Manager, tasks::Tasks}; use crate::{manager::Manager, tasks::Tasks};
pub struct Opt { struct Opt {
force: bool, force: bool,
follow: bool, follow: bool,
} }

View file

@ -1,11 +1,12 @@
use std::{collections::HashSet, path::PathBuf}; use std::{collections::HashSet, path::PathBuf};
use yazi_dds::Pubsub; use yazi_dds::Pubsub;
use yazi_shared::{event::{Cmd, Data}, fs::{Url, Urn}, render}; use yazi_macro::render;
use yazi_shared::{event::{Cmd, Data}, fs::{Url, Urn}};
use crate::manager::Manager; use crate::manager::Manager;
pub struct Opt { struct Opt {
url: Option<Url>, url: Option<Url>,
tab: Option<usize>, tab: Option<usize>,
} }

View file

@ -2,7 +2,7 @@ use yazi_shared::event::Cmd;
use crate::{manager::Manager, tasks::Tasks}; use crate::{manager::Manager, tasks::Tasks};
pub struct Opt { struct Opt {
relative: bool, relative: bool,
force: bool, force: bool,
} }

View file

@ -1,26 +1,28 @@
mod bulk_rename; yazi_macro::mod_flat!(
mod close; bulk_rename,
mod create; close,
mod hardlink; create,
mod hover; hardlink,
mod link; hover,
mod open; link,
mod paste; open,
mod peek; paste,
mod quit; peek,
mod refresh; quit,
mod remove; refresh,
mod rename; remove,
mod seek; rename,
mod suspend; seek,
mod tab_close; suspend,
mod tab_create; tab_close,
mod tab_swap; tab_create,
mod tab_switch; tab_swap,
mod unyank; tab_switch,
mod update_files; unyank,
mod update_mimetype; update_files,
mod update_paged; update_mimetype,
mod update_task; update_paged,
mod update_yanked; update_task,
mod yank; update_yanked,
yank
);

View file

@ -4,14 +4,15 @@ use tracing::error;
use yazi_boot::ARGS; use yazi_boot::ARGS;
use yazi_config::{OPEN, popup::SelectCfg}; use yazi_config::{OPEN, popup::SelectCfg};
use yazi_fs::Folder; use yazi_fs::Folder;
use yazi_macro::emit;
use yazi_plugin::isolate; use yazi_plugin::isolate;
use yazi_proxy::{ManagerProxy, TasksProxy, options::OpenDoOpt}; use yazi_proxy::{ManagerProxy, TasksProxy, options::OpenDoOpt};
use yazi_shared::{MIME_DIR, emit, event::{Cmd, EventQuit}, fs::{File, Url}}; use yazi_shared::{MIME_DIR, event::{Cmd, EventQuit}, fs::{File, Url}};
use crate::{manager::Manager, tasks::Tasks}; use crate::{manager::Manager, tasks::Tasks};
#[derive(Clone, Copy)] #[derive(Clone, Copy)]
pub struct Opt { struct Opt {
interactive: bool, interactive: bool,
hovered: bool, hovered: bool,
} }

View file

@ -2,7 +2,7 @@ use yazi_shared::event::Cmd;
use crate::{manager::Manager, tasks::Tasks}; use crate::{manager::Manager, tasks::Tasks};
pub struct Opt { struct Opt {
force: bool, force: bool,
follow: bool, follow: bool,
} }

View file

@ -3,7 +3,7 @@ use yazi_shared::{event::{Cmd, Data}, fs::Url};
use crate::manager::Manager; use crate::manager::Manager;
#[derive(Debug, Default)] #[derive(Debug, Default)]
pub struct Opt { struct Opt {
skip: Option<usize>, skip: Option<usize>,
force: bool, force: bool,
only_if: Option<Url>, only_if: Option<Url>,

View file

@ -2,13 +2,14 @@ use std::time::Duration;
use tokio::{select, time}; use tokio::{select, time};
use yazi_config::popup::ConfirmCfg; use yazi_config::popup::ConfirmCfg;
use yazi_macro::emit;
use yazi_proxy::ConfirmProxy; use yazi_proxy::ConfirmProxy;
use yazi_shared::{emit, event::{Cmd, EventQuit}}; use yazi_shared::event::{Cmd, EventQuit};
use crate::{manager::Manager, tasks::Tasks}; use crate::{manager::Manager, tasks::Tasks};
#[derive(Default)] #[derive(Default)]
pub struct Opt { struct Opt {
no_cwd_file: bool, no_cwd_file: bool,
} }
impl From<()> for Opt { impl From<()> for Opt {

View file

@ -4,7 +4,7 @@ use yazi_shared::{event::Cmd, fs::Url};
use crate::{manager::Manager, tasks::Tasks}; use crate::{manager::Manager, tasks::Tasks};
pub struct Opt { struct Opt {
force: bool, force: bool,
permanently: bool, permanently: bool,
hovered: bool, hovered: bool,

View file

@ -9,7 +9,7 @@ use yazi_shared::{event::Cmd, fs::{File, FilesOp, Url, UrnBuf, maybe_exists, ok_
use crate::manager::Manager; use crate::manager::Manager;
pub struct Opt { struct Opt {
hovered: bool, hovered: bool,
force: bool, force: bool,
empty: String, empty: String,

View file

@ -5,7 +5,7 @@ use yazi_shared::{MIME_DIR, event::{Cmd, Data}};
use crate::manager::Manager; use crate::manager::Manager;
#[derive(Debug)] #[derive(Debug)]
pub struct Opt { struct Opt {
units: i16, units: i16,
} }

View file

@ -1,8 +1,9 @@
use yazi_shared::{event::{Cmd, Data}, render}; use yazi_macro::render;
use yazi_shared::event::{Cmd, Data};
use crate::manager::Tabs; use crate::manager::Tabs;
pub struct Opt { struct Opt {
idx: usize, idx: usize,
} }

View file

@ -1,12 +1,13 @@
use yazi_boot::BOOT; use yazi_boot::BOOT;
use yazi_macro::render;
use yazi_proxy::AppProxy; use yazi_proxy::AppProxy;
use yazi_shared::{event::{Cmd, Data}, fs::Url, render}; use yazi_shared::{event::{Cmd, Data}, fs::Url};
use crate::{manager::Tabs, tab::Tab}; use crate::{manager::Tabs, tab::Tab};
const MAX_TABS: usize = 9; const MAX_TABS: usize = 9;
pub struct Opt { struct Opt {
url: Url, url: Url,
current: bool, current: bool,
} }

View file

@ -1,8 +1,9 @@
use yazi_shared::{event::{Cmd, Data}, render}; use yazi_macro::render;
use yazi_shared::event::{Cmd, Data};
use crate::manager::Tabs; use crate::manager::Tabs;
pub struct Opt { struct Opt {
step: isize, step: isize,
} }

View file

@ -1,8 +1,9 @@
use yazi_shared::{event::{Cmd, Data}, render}; use yazi_macro::render;
use yazi_shared::event::{Cmd, Data};
use crate::manager::Tabs; use crate::manager::Tabs;
pub struct Opt { struct Opt {
step: isize, step: isize,
relative: bool, relative: bool,
} }

View file

@ -1,8 +1,9 @@
use yazi_shared::{event::Cmd, render}; use yazi_macro::render;
use yazi_shared::event::Cmd;
use crate::manager::Manager; use crate::manager::Manager;
pub struct Opt; struct Opt;
impl From<Cmd> for Opt { impl From<Cmd> for Opt {
fn from(_: Cmd) -> Self { Self } fn from(_: Cmd) -> Self { Self }

View file

@ -1,8 +1,9 @@
use std::borrow::Cow; use std::borrow::Cow;
use yazi_fs::Folder; use yazi_fs::Folder;
use yazi_macro::render;
use yazi_proxy::ManagerProxy; use yazi_proxy::ManagerProxy;
use yazi_shared::{event::Cmd, fs::FilesOp, render}; use yazi_shared::{event::Cmd, fs::FilesOp};
use crate::{manager::{LINKED, Manager}, tab::Tab, tasks::Tasks}; use crate::{manager::{LINKED, Manager}, tab::Tab, tasks::Tasks};

View file

@ -1,7 +1,8 @@
use std::collections::HashMap; use std::collections::HashMap;
use tracing::error; use tracing::error;
use yazi_shared::{event::Cmd, fs::Url, render}; use yazi_macro::render;
use yazi_shared::{event::Cmd, fs::Url};
use crate::{manager::{LINKED, Manager}, tasks::Tasks}; use crate::{manager::{LINKED, Manager}, tasks::Tasks};

View file

@ -1,6 +1,7 @@
use std::collections::HashSet; use std::collections::HashSet;
use yazi_shared::{event::Cmd, fs::Url, render}; use yazi_macro::render;
use yazi_shared::{event::Cmd, fs::Url};
use crate::manager::{Manager, Yanked}; use crate::manager::{Manager, Yanked};

View file

@ -1,8 +1,9 @@
use yazi_shared::{event::Cmd, render}; use yazi_macro::render;
use yazi_shared::event::Cmd;
use crate::manager::{Manager, Yanked}; use crate::manager::{Manager, Yanked};
pub struct Opt { struct Opt {
cut: bool, cut: bool,
} }

View file

@ -1,14 +1,3 @@
mod commands; yazi_macro::mod_pub!(commands);
mod linked;
mod manager;
mod mimetype;
mod tabs;
mod watcher;
mod yanked;
pub use linked::*; yazi_macro::mod_flat!(linked, manager, mimetype, tabs, watcher, yanked);
pub use manager::*;
pub use mimetype::*;
pub use tabs::*;
pub use watcher::*;
pub use yanked::*;

View file

@ -1,2 +1 @@
mod push; yazi_macro::mod_flat!(push, tick);
mod tick;

View file

@ -1,6 +1,7 @@
use std::time::Instant; use std::time::Instant;
use yazi_shared::{Layer, emit, event::Cmd}; use yazi_macro::emit;
use yazi_shared::{Layer, event::Cmd};
use crate::notify::{Message, Notify}; use crate::notify::{Message, Notify};

View file

@ -1,7 +1,8 @@
use std::time::Duration; use std::time::Duration;
use ratatui::layout::Rect; use ratatui::layout::Rect;
use yazi_shared::{Layer, emit, event::{Cmd, Data}}; use yazi_macro::emit;
use yazi_shared::{Layer, event::{Cmd, Data}};
use crate::notify::Notify; use crate::notify::Notify;

View file

@ -1,9 +1,6 @@
mod commands; yazi_macro::mod_pub!(commands);
mod message;
mod notify;
pub use message::*; yazi_macro::mod_flat!(message, notify);
pub use notify::*;
pub const NOTIFY_BORDER: u16 = 2; pub const NOTIFY_BORDER: u16 = 2;
pub const NOTIFY_SPACING: u16 = 1; pub const NOTIFY_SPACING: u16 = 1;

View file

@ -1,8 +1,9 @@
use yazi_shared::{event::{Cmd, Data}, render}; use yazi_macro::render;
use yazi_shared::event::{Cmd, Data};
use crate::select::Select; use crate::select::Select;
pub struct Opt { struct Opt {
step: isize, step: isize,
} }

View file

@ -1,9 +1,10 @@
use anyhow::anyhow; use anyhow::anyhow;
use yazi_shared::{event::Cmd, render}; use yazi_macro::render;
use yazi_shared::event::Cmd;
use crate::select::Select; use crate::select::Select;
pub struct Opt { struct Opt {
submit: bool, submit: bool,
} }

View file

@ -1,3 +1 @@
mod arrow; yazi_macro::mod_flat!(arrow, close, show);
mod close;
mod show;

View file

@ -1,6 +1,7 @@
use tokio::sync::oneshot; use tokio::sync::oneshot;
use yazi_config::popup::SelectCfg; use yazi_config::popup::SelectCfg;
use yazi_shared::{event::Cmd, render}; use yazi_macro::render;
use yazi_shared::event::Cmd;
use crate::select::Select; use crate::select::Select;

View file

@ -1,4 +1,3 @@
mod commands; yazi_macro::mod_pub!(commands);
mod select;
pub use select::*; yazi_macro::mod_flat!(select);

View file

@ -1,10 +1,11 @@
use yazi_fs::Step; use yazi_fs::Step;
use yazi_macro::render;
use yazi_proxy::ManagerProxy; use yazi_proxy::ManagerProxy;
use yazi_shared::{event::{Cmd, Data}, render}; use yazi_shared::event::{Cmd, Data};
use crate::tab::Tab; use crate::tab::Tab;
pub struct Opt { struct Opt {
step: Step, step: Step,
} }

View file

@ -4,12 +4,13 @@ use tokio::{fs, pin};
use tokio_stream::{StreamExt, wrappers::UnboundedReceiverStream}; use tokio_stream::{StreamExt, wrappers::UnboundedReceiverStream};
use yazi_config::popup::InputCfg; use yazi_config::popup::InputCfg;
use yazi_dds::Pubsub; use yazi_dds::Pubsub;
use yazi_macro::render;
use yazi_proxy::{CompletionProxy, InputProxy, ManagerProxy, TabProxy}; use yazi_proxy::{CompletionProxy, InputProxy, ManagerProxy, TabProxy};
use yazi_shared::{Debounce, InputError, event::{Cmd, Data}, fs::{Url, expand_path}, render}; use yazi_shared::{Debounce, errors::InputError, event::{Cmd, Data}, fs::{Url, expand_path}};
use crate::tab::Tab; use crate::tab::Tab;
pub struct Opt { struct Opt {
target: Url, target: Url,
interactive: bool, interactive: bool,
} }

View file

@ -5,7 +5,7 @@ use yazi_shared::event::Cmd;
use crate::tab::Tab; use crate::tab::Tab;
pub struct Opt { struct Opt {
type_: String, type_: String,
} }

View file

@ -1,11 +1,12 @@
use bitflags::bitflags; use bitflags::bitflags;
use yazi_macro::{render, render_and};
use yazi_proxy::{AppProxy, ManagerProxy}; use yazi_proxy::{AppProxy, ManagerProxy};
use yazi_shared::{event::Cmd, render, render_and}; use yazi_shared::event::Cmd;
use crate::tab::Tab; use crate::tab::Tab;
bitflags! { bitflags! {
pub struct Opt: u8 { struct Opt: u8 {
const FIND = 0b00001; const FIND = 0b00001;
const VISUAL = 0b00010; const VISUAL = 0b00010;
const FILTER = 0b00100; const FILTER = 0b00100;

View file

@ -4,13 +4,14 @@ use tokio::pin;
use tokio_stream::{StreamExt, wrappers::UnboundedReceiverStream}; use tokio_stream::{StreamExt, wrappers::UnboundedReceiverStream};
use yazi_config::popup::InputCfg; use yazi_config::popup::InputCfg;
use yazi_fs::FilterCase; use yazi_fs::FilterCase;
use yazi_macro::emit;
use yazi_proxy::InputProxy; use yazi_proxy::InputProxy;
use yazi_shared::{Debounce, InputError, Layer, emit, event::Cmd}; use yazi_shared::{Debounce, Layer, errors::InputError, event::Cmd};
use crate::tab::Tab; use crate::tab::Tab;
#[derive(Default)] #[derive(Default)]
pub struct Opt { pub(super) struct Opt {
pub query: String, pub query: String,
pub case: FilterCase, pub case: FilterCase,
pub done: bool, pub done: bool,

View file

@ -1,6 +1,6 @@
use yazi_fs::Filter; use yazi_fs::Filter;
use yazi_macro::render;
use yazi_proxy::ManagerProxy; use yazi_proxy::ManagerProxy;
use yazi_shared::render;
use super::filter::Opt; use super::filter::Opt;
use crate::tab::Tab; use crate::tab::Tab;

View file

@ -4,12 +4,13 @@ use tokio::pin;
use tokio_stream::{StreamExt, wrappers::UnboundedReceiverStream}; use tokio_stream::{StreamExt, wrappers::UnboundedReceiverStream};
use yazi_config::popup::InputCfg; use yazi_config::popup::InputCfg;
use yazi_fs::FilterCase; use yazi_fs::FilterCase;
use yazi_macro::emit;
use yazi_proxy::InputProxy; use yazi_proxy::InputProxy;
use yazi_shared::{Debounce, InputError, Layer, emit, event::Cmd}; use yazi_shared::{Debounce, Layer, errors::InputError, event::Cmd};
use crate::tab::Tab; use crate::tab::Tab;
pub struct Opt { pub(super) struct Opt {
pub(super) query: Option<String>, pub(super) query: Option<String>,
pub(super) prev: bool, pub(super) prev: bool,
pub(super) case: FilterCase, pub(super) case: FilterCase,

Some files were not shown because too many files have changed in this diff Show more