v0.3.0

sxyazi/yaziv0.3.0Aug 1, 2024by github-actions[bot]

AI Summary

A major breaking release introducing mouse support APIs, a builtin extract plugin, and a package manager. It also enhances file preview formats and significantly improves archive preview performance.

Key Highlights

  • Mouse support APIs (click, scroll, touch, move, drag)
  • Builtin extract plugin with interactive password input
  • Enhanced preview formats: Fonts, SVGs, HEIC, JPEG XL
  • Package manager (`ya pack`) for plugins and themes

Breaking Changes

  • Requires migration due to Lua API changes
  • Rename of 'exec' property to 'run' (deprecated 'exec')

New Features

  • Mouse support APIs
  • Builtin extract plugin
  • Enhanced preview formats (Fonts, SVG, HEIC, JPEG XL)
  • Package manager (`ya pack`)
  • Redesigned icons with HashMap matching
  • Streamed archive preview
  • --hovered option for rename/remove commands
  • Right-click to open files
  • AVIF image preview support
  • Ownership linemode

Full Release Notes

After three months of development, I'm excited to announce the release of Yazi 0.3 today! This version brings a host of new features and bug fixes. Thank you to every contributor for making Yazi better and better!

**This is a breaking change release, so please make sure to read:**

- [Migrating to Yazi v0.3.0](https://github.com/sxyazi/yazi/issues/1046)
- [Packaging](https://github.com/sxyazi/yazi/issues/1046#issuecomment-2255993749)
- [Lua API breaking changes in Yazi v0.3](https://github.com/sxyazi/yazi/issues/1046#issuecomment-2140320472)

## Mouse support

The plugin system now includes five new APIs for each component - `click`, `scroll`, `touch`, `move`, and `drag` to handle mouse events. These APIs come with default implementations to cover common operations.

This also allows plugin developers to extend mouse behavior and create any functionality they desire.

https://github.com/user-attachments/assets/7c129c11-6246-4a6e-a261-3e7a9a141387


See https://github.com/sxyazi/yazi/pull/1038 for more info, thanks to @qsdrqs for his work on this!

## New builtin `extract` plugin


https://github.com/sxyazi/yazi/pull/1321 adds a builtin `extract` plugin for decompressing archives, with these features: 

1. Interactive password input.
2. Smart output directory selection with auto renaming.
3. Supports decompressing multiple files at once.
4. Fully async, decompression tasks can queue up and run in the background.


https://github.com/user-attachments/assets/71093fa8-1798-406b-8578-a85525cb60d2

## Enhanced file preview

Yazi 0.3 now supports the following new format to preview:

- Fonts
- SVGs
- HEIC files
- JPEG XL files

This feature requires the [optional dependency ImageMagick](https://github.com/sxyazi/yazi/issues/1046#issuecomment-2255993749) to enable it.


https://github.com/user-attachments/assets/94ee6f17-88d2-4e41-98e2-1a42b34b49aa

## Package manager

Yazi 0.3 introduces the new `ya pack` subcommand for package management, making plugin and theme updates more convenient. This is especially important as the plugin system is not yet stable, so providing users with the ability to easily keep everything up to date is necessary.

Add a new one to `package.toml`, then install it:

```sh
ya pack -a Reledia/glow

# If it's a sub-directory under the repository
ya pack -a yazi-rs/flavors#catppuccin-mocha 
```

Install all packages configured in `package.toml`:

```sh
ya pack -i
```

Upgrade all packages in `package.toml` to the latest commit:

```sh
ya pack -u
```

See https://github.com/sxyazi/yazi/pull/985 for details.

## Redesigned Icons

https://github.com/sxyazi/yazi/pull/1086 redesigns the icons, bringing the following improvements:

- **Improved Matching Performance:** The new `dirs`, `files`, and `exts` compile the icon rules into a HashMap at startup. This allows most icon matches to be completed with O(1) complexity, significantly enhancing performance.
- **Built-in `nvim-web-devicons`:** This includes a richer and ready-to-use set of icons out of the box.
- **Enhanced Icon Styling:** Each icon now supports specifying both dark and light colors (currently only `fg_dark` is used). In the future, the terminal color will automatically choose the appropriate color. This was added as part of https://github.com/sxyazi/yazi/issues/988.
- **Enhanced `is` Function:** The original `is` functionality has been reimplemented as `conds` to allow more complex conditional expressions, such as `cond = "!dir & exec"`.


## Significant archive preview performance improvements

https://github.com/sxyazi/yazi/pull/1220 reimplements archive previewing to be streamed. This means only a small amount of necessary data needs to be read to display the preview immediately, rather than waiting for all the data to be returned and parsed as before.

Additionally, by replacing `lsar` with `7zip`, the preview speed has been further improved. The new implementation also introduces two new features: icon display and file size display.


## Other improvements

These are a few of my favorite features. For a complete list of improvements in Yazi 0.3, check out the full changelog below.

## What's Changed

* feat: support `yazi-cli` for Nix flake by @XYenon in https://github.com/sxyazi/yazi/pull/944
* feat: allow building with the system Lua by @Kladki in https://github.com/sxyazi/yazi/pull/943
* feat: support expanding Windows paths like "D:" that only have a drive letter but no root by @sxyazi in https://github.com/sxyazi/yazi/pull/948
* fix: always create XDG cache directory even if user has set a custom one by @sxyazi in https://github.com/sxyazi/yazi/pull/956
* feat: support previewing files containing non-UTF-8 characters by @sxyazi in https://github.com/sxyazi/yazi/pull/958
* fix: correct the glob pattern for the icons to fit the new matching algorithm by @sxyazi in https://github.com/sxyazi/yazi/pull/959
* feat: add `*.opus` file icon by @Brixy in https://github.com/sxyazi/yazi/pull/967
* fix: improve accessibility by avoiding hex color code for white by @Brixy in https://github.com/sxyazi/yazi/pull/968
* fix: avoiding duplicate candidates in the `which` component by @mikavilpas in https://github.com/sxyazi/yazi/pull/975
* feat: detect terminal type in tmux with CSI sequence in passthrough mode by @sxyazi in https://github.com/sxyazi/yazi/pull/977
* feat: add more rules to `[filetype]` and `[icon]` by @Brixy in https://github.com/sxyazi/yazi/pull/966
* feat: re-enable the file `created` attribute by @rafi in https://github.com/sxyazi/yazi/pull/987
* feat: add `--force-window` option to mpv by @GOWxx in https://github.com/sxyazi/yazi/pull/998
* feat: close confirmation prompts and exit automatically when the ongoing task gone by @sxyazi in https://github.com/sxyazi/yazi/pull/997
* fix: notification title width does not include the width of the icon by @sxyazi in https://github.com/sxyazi/yazi/pull/1000
* feat: support `cargo binstall yazi-fm` and `cargo binstall yazi-cli` by @slowsage in https://github.com/sxyazi/yazi/pull/1003
* feat: yazi --debug shows `ya` version in its output by @mikavilpas in https://github.com/sxyazi/yazi/pull/1005
* feat: add git commit hash to `ya --version` by @fzdwx in https://github.com/sxyazi/yazi/pull/1006
* feat: package manager by @sxyazi in https://github.com/sxyazi/yazi/pull/985
* feat: `ya pack` displays help if no arguments are given by @mikavilpas in https://github.com/sxyazi/yazi/pull/1012
* feat: new `--args` parameter for `fd` an `rg` search by @LatentDream in https://github.com/sxyazi/yazi/pull/1013
* fix: correct wasm target condition by @itsjunetime in https://github.com/sxyazi/yazi/pull/1018
* fix: broaden file watcher event types to accommodate permission changes on certain platforms by @sxyazi in https://github.com/sxyazi/yazi/pull/1024
* feat: add new `debounce` option to `ya.input()` API by @sxyazi in https://github.com/sxyazi/yazi/pull/1025
* fix: recognize `TERM=rxvt-unicode-256color` by @dtolnay in https://github.com/sxyazi/yazi/pull/1027
* feat: support `stdin` and pipe for `Child` API by @sxyazi in https://github.com/sxyazi/yazi/pull/1033
* ci: consistently enforce Lua coding style by @mikavilpas in https://github.com/sxyazi/yazi/pull/1029
* ci: fix cargo unit tests execution by @clispios in https://github.com/sxyazi/yazi/pull/1041
* refactor: eliminate `exec` by @sxyazi in https://github.com/sxyazi/yazi/pull/1045
* feat: use `Ctrl-c` instead of `Ctrl-q` as the universal close key for all components by @sxyazi in https://github.com/sxyazi/yazi/pull/1047
* fix: remove `ignore` options from `rg` and `fd` search by @chriszarate in https://github.com/sxyazi/yazi/pull/1043
* feat: font preview by @sxyazi in https://github.com/sxyazi/yazi/pull/1048
* docs: add `CONTRIBUTING.md` by @johan-naizu in https://github.com/sxyazi/yazi/pull/1052
* feat: prefetcher by @sxyazi in https://github.com/sxyazi/yazi/pull/1061
* fix: ePUB file mime-type matching for the opener rule by @sxyazi in https://github.com/sxyazi/yazi/pull/1063
* fix: cursor gets out of sync occasionally at image previewing through IIP under tmux by @sxyazi in https://github.com/sxyazi/yazi/pull/1070
* feat: support Super/Command/Windows key notation `D-` by @sxyazi in https://github.com/sxyazi/yazi/pull/1069
* fix: remove the default keybinding for going to the temporary directory by @sxyazi in https://github.com/sxyazi/yazi/pull/1073
* feat!: redesign icons by @sxyazi in https://github.com/sxyazi/yazi/pull/1086
* fix: Sixel support from certain `st` forks cannot be detected by @sxyazi in https://github.com/sxyazi/yazi/pull/1094
* feat: support case insensitive special keys in keymappings by @mikavilpas in https://github.com/sxyazi/yazi/pull/1082
* refactor!: v0.3 API changes by @sxyazi in https://github.com/sxyazi/yazi/pull/1108
* feat: add `pack --list` subcommand to Ya CLI by @lpnh in https://github.com/sxyazi/yazi/pull/1110
* feat!: DDS client-server version check by @sxyazi in https://github.com/sxyazi/yazi/pull/1111
* feat: support mouse event by @qsdrqs in https://github.com/sxyazi/yazi/pull/1038
* feat: add some dependency version information to `yazi --debug` by @omagdy7 in https://github.com/sxyazi/yazi/pull/1112
* fix: block `SIGINT` signal from the spawned subprocess by @sxyazi in https://github.com/sxyazi/yazi/pull/1131
* feat: support completely disabling mouse with `mouse_events=[]`; add new `cursor_blink` to control cursor style of input components by @sxyazi in https://github.com/sxyazi/yazi/pull/1139
* fix: different filenames should be treated as the same file on case-insensitive file systems by @sxyazi in https://github.com/sxyazi/yazi/pull/1151
* feat: support `ya sub` subcommand for the Ya CLI by @mikavilpas in https://github.com/sxyazi/yazi/pull/1004
* fix: file watcher didn't handle realname resolution used for case-insensitive file systems correctly by @sxyazi in https://github.com/sxyazi/yazi/pull/1179
* feat: include file filter state in the header by @thelamb in https://github.com/sxyazi/yazi/pull/1182
* feat!: include the `sender` ID in static messages by @sxyazi in https://github.com/sxyazi/yazi/pull/1172
* fix: accommodate all `hover` events for DDS by @Xerxes-2 in https://github.com/sxyazi/yazi/pull/1187
* feat: support `x-ndjson` mime-type for JSON files by @sxyazi in https://github.com/sxyazi/yazi/pull/1190
* fix: suppress warnings for different name representations of the same file in the case-insensitive file system when renaming by @Xerxes-2 in https://github.com/sxyazi/yazi/pull/1185
* fix: ueberzug image adapter should respect the user's `max_width` and `max_height` settings by @sxyazi in https://github.com/sxyazi/yazi/pull/1200
* fix: `magick` plugin not working properly by @sxyazi in https://github.com/sxyazi/yazi/pull/1213
* perf!: reimplement and significantly speed up archive previewing by @sxyazi in https://github.com/sxyazi/yazi/pull/1220
* feat: add `--hovered` option to the `rename` and `remove` commands by @hankertrix in https://github.com/sxyazi/yazi/pull/1227
* feat: support right-click to open files by @sxyazi in https://github.com/sxyazi/yazi/pull/1232
* feat: support AVIF image preview by @sxyazi in https://github.com/sxyazi/yazi/pull/1249
* feat: ownership linemode by @AidanV in https://github.com/sxyazi/yazi/pull/1238
* feat: add `nlink` property to the `Cha` plugin API by @Ape in https://github.com/sxyazi/yazi/pull/1279
* feat: add `random` option to the `sort` command by @zooeywm in https://github.com/sxyazi/yazi/pull/1291
* feat: show files with inaccessible metadata by @Ape in https://github.com/sxyazi/yazi/pull/1275
* feat: help users migrate shell key bindings to v0.3 by @mikavilpas in https://github.com/sxyazi/yazi/pull/1304
* feat: allow setting `YAZI_ID` as a command line argument by @mikavilpas in https://github.com/sxyazi/yazi/pull/1305
* refactor: reimplement the signal system by @sxyazi in https://github.com/sxyazi/yazi/pull/1307
* fix: destroy term before stopping signals by @sxyazi in https://github.com/sxyazi/yazi/pull/1310
* fix: add `use-dev-tty` to fix piping to Yazi on macOS by @joshuali925 in https://github.com/sxyazi/yazi/pull/1317
* refactor: fix Clippy warnings by @Ape in https://github.com/sxyazi/yazi/pull/1312
* feat: add Winget publishes to CI/CD by @MoaidHathot in https://github.com/sxyazi/yazi/pull/1299
* feat: add support for `%@` argument extension on Windows to align with Unix platforms by @sxyazi in https://github.com/sxyazi/yazi/pull/1319
* fix: wrong directory loading optimization condition by @sxyazi in https://github.com/sxyazi/yazi/pull/1331
* feat: make `F1` also show the help menu by @CyberShadow in https://github.com/sxyazi/yazi/pull/1336
* fix: help menu multi-line text rendering by @sxyazi in https://github.com/sxyazi/yazi/pull/1347
* fix: can't rewatch a directory that has been deleted once before by @leihaojun in https://github.com/sxyazi/yazi/pull/1335
* fix(nix): add `outputHashes` for `notify` git dependency by @uncenter in https://github.com/sxyazi/yazi/pull/1373
* feat(nix): set `VERGEN_*` build env vars by @uncenter in https://github.com/sxyazi/yazi/pull/1375
* refactor(nix): cleanup and switch to `nixfmt-rfc-style` by @uncenter in https://github.com/sxyazi/yazi/pull/1376
* chore: bump version to 0.3 by @sxyazi in https://github.com/sxyazi/yazi/pull/1374

## New Contributors
* @Kladki made their first contribution in https://github.com/sxyazi/yazi/pull/943
* @Brixy made their first contribution in https://github.com/sxyazi/yazi/pull/967
* @rafi made their first contribution in https://github.com/sxyazi/yazi/pull/987
* @GOWxx made their first contribution in https://github.com/sxyazi/yazi/pull/998
* @slowsage made their first contribution in https://github.com/sxyazi/yazi/pull/1003
* @LatentDream made their first contribution in https://github.com/sxyazi/yazi/pull/1013
* @itsjunetime made their first contribution in https://github.com/sxyazi/yazi/pull/1018
* @dtolnay made their first contribution in https://github.com/sxyazi/yazi/pull/1027
* @chriszarate made their first contribution in https://github.com/sxyazi/yazi/pull/1043
* @johan-naizu made their first contribution in https://github.com/sxyazi/yazi/pull/1052
* @qsdrqs made their first contribution in https://github.com/sxyazi/yazi/pull/1038
* @omagdy7 made their first contribution in https://github.com/sxyazi/yazi/pull/1112
* @thelamb made their first contribution in https://github.com/sxyazi/yazi/pull/1182
* @Xerxes-2 made their first contribution in https://github.com/sxyazi/yazi/pull/1187
* @zooeywm made their first contribution in https://github.com/sxyazi/yazi/pull/1291
* @joshuali925 made their first contribution in https://github.com/sxyazi/yazi/pull/1317
* @MoaidHathot made their first contribution in https://github.com/sxyazi/yazi/pull/1299
* @CyberShadow made their first contribution in https://github.com/sxyazi/yazi/pull/1336
* @leihaojun made their first contribution in https://github.com/sxyazi/yazi/pull/1335

**Full Changelog**: https://github.com/sxyazi/yazi/compare/v0.2.5...v0.3.0