1
0
зеркало из https://github.com/glebtv/tui-textarea.git synced 2026-08-28 11:36:17 +03:00

rename your-backend features to no-backend

Этот коммит содержится в:
rhysd
2023-10-24 15:59:56 +09:00
родитель 9882974669
Коммит 42c76a9d45
6 изменённых файлов: 18 добавлений и 18 удалений

Просмотреть файл

@@ -171,10 +171,10 @@ tui-textarea = { version = "*", default-features = false, features = ["termwiz"]
If you're using [tui-rs][] instead of [ratatui][], you need to enable features for using tui-rs crate and to disable
default features. The following table shows feature names corresponding to the dependencies.
| | crossterm | termion | termwiz | Your own backend |
|---------|----------------------------------|-----------------|-----------|----------------------|
| ratatui | `crossterm` (enabled by default) | `termion` | `termwiz` | `your-backend` |
| tui-rs | `tuirs-crossterm` | `tuirs-termion` | N/A | `tuirs-your-backend` |
| | crossterm | termion | termwiz | Your own backend |
|---------|----------------------------------|-----------------|-----------|--------------------|
| ratatui | `crossterm` (enabled by default) | `termion` | `termwiz` | `no-backend` |
| tui-rs | `tuirs-crossterm` | `tuirs-termion` | N/A | `tuirs-no-backend` |
For example, when you want to use the combination of [tui-rs][] and [crossterm][],
@@ -563,15 +563,15 @@ match read()?.into() {
### Use your own backend
ratatui and tui-rs allows to make your own backend by implementing [`ratatui::backend::Backend`][ratatui-backend] trait.
tui-textarea supports it as well. Please use `your-backend` feature for [ratatui][] or `tuirs-your-backend` feature for
tui-textarea supports it as well. Please use `no-backend` feature for [ratatui][] or `tuirs-no-backend` feature for
[tui-rs][]. They avoid adding backend crates (crossterm, termion, or termwiz) since you're using your own backend.
```toml
[dependencies]
# For ratatui
tui-textarea = { version = "*", default-features = false, features = ["your-backend"] }
tui-textarea = { version = "*", default-features = false, features = ["no-backend"] }
# For tui-rs
tui-textarea = { version = "*", default-features = false, features = ["tuirs-your-backend"] }
tui-textarea = { version = "*", default-features = false, features = ["tuirs-no-backend"] }
```
`tui_textarea::Input` is a type for backend-agnostic key input. What you need to do is converting key event in your own