зеркало из
https://github.com/glebtv/tui-textarea.git
synced 2026-09-08 16:35:49 +03:00
update changelog for v0.5.1 changes
Этот коммит содержится в:
31
CHANGELOG.md
31
CHANGELOG.md
@@ -1,3 +1,33 @@
|
|||||||
|
<a name="v0.5.1"></a>
|
||||||
|
# [v0.5.1](https://github.com/rhysd/tui-textarea/releases/tag/v0.5.1) - 12 Jul 2024
|
||||||
|
|
||||||
|
- Add `serde` optional feature. When it is enabled, some types support the serialization/deserialization with [serde](https://crates.io/crates/serde) crate. See [the document](https://github.com/rhysd/tui-textarea?tab=readme-ov-file#serializationdeserialization-support) for more details. ([#62](https://github.com/rhysd/tui-textarea/issues/62), thanks [@cestef](https://github.com/cestef))
|
||||||
|
```rust
|
||||||
|
use tui_textarea::Input;
|
||||||
|
|
||||||
|
let json = r#"
|
||||||
|
{
|
||||||
|
"key": { "Char": "a" },
|
||||||
|
"ctrl": true,
|
||||||
|
"alt": false,
|
||||||
|
"shift": true
|
||||||
|
}
|
||||||
|
"#;
|
||||||
|
|
||||||
|
let input: Input = serde_json::from_str(json).unwrap();
|
||||||
|
println!("{input}");
|
||||||
|
// Input {
|
||||||
|
// key: Key::Char('a'),
|
||||||
|
// ctrl: true,
|
||||||
|
// alt: false,
|
||||||
|
// shift: true,
|
||||||
|
// }
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
[Changes][v0.5.1]
|
||||||
|
|
||||||
|
|
||||||
<a name="v0.5.0"></a>
|
<a name="v0.5.0"></a>
|
||||||
# [v0.5.0](https://github.com/rhysd/tui-textarea/releases/tag/v0.5.0) - 07 Jul 2024
|
# [v0.5.0](https://github.com/rhysd/tui-textarea/releases/tag/v0.5.0) - 07 Jul 2024
|
||||||
|
|
||||||
@@ -317,6 +347,7 @@ First release :tada:
|
|||||||
[Changes][v0.1.0]
|
[Changes][v0.1.0]
|
||||||
|
|
||||||
|
|
||||||
|
[v0.5.1]: https://github.com/rhysd/tui-textarea/compare/v0.5.0...v0.5.1
|
||||||
[v0.5.0]: https://github.com/rhysd/tui-textarea/compare/v0.4.0...v0.5.0
|
[v0.5.0]: https://github.com/rhysd/tui-textarea/compare/v0.4.0...v0.5.0
|
||||||
[v0.4.0]: https://github.com/rhysd/tui-textarea/compare/v0.3.1...v0.4.0
|
[v0.4.0]: https://github.com/rhysd/tui-textarea/compare/v0.3.1...v0.4.0
|
||||||
[v0.3.1]: https://github.com/rhysd/tui-textarea/compare/v0.3.0...v0.3.1
|
[v0.3.1]: https://github.com/rhysd/tui-textarea/compare/v0.3.0...v0.3.1
|
||||||
|
|||||||
25
README.md
25
README.md
@@ -660,6 +660,30 @@ Values of the following types can be serialized/deserialized:
|
|||||||
- `CursorMove`
|
- `CursorMove`
|
||||||
- `Scrolling`
|
- `Scrolling`
|
||||||
|
|
||||||
|
Here is an example for deserializing key input from JSON using [serde_json][].
|
||||||
|
|
||||||
|
```rust
|
||||||
|
use tui_textarea::Input;
|
||||||
|
|
||||||
|
let json = r#"
|
||||||
|
{
|
||||||
|
"key": { "Char": "a" },
|
||||||
|
"ctrl": true,
|
||||||
|
"alt": false,
|
||||||
|
"shift": true
|
||||||
|
}
|
||||||
|
"#;
|
||||||
|
|
||||||
|
let input: Input = serde_json::from_str(json).unwrap();
|
||||||
|
println!("{input}");
|
||||||
|
// Input {
|
||||||
|
// key: Key::Char('a'),
|
||||||
|
// ctrl: true,
|
||||||
|
// alt: false,
|
||||||
|
// shift: true,
|
||||||
|
// }
|
||||||
|
```
|
||||||
|
|
||||||
## Minimum Supported Rust Version
|
## Minimum Supported Rust Version
|
||||||
|
|
||||||
MSRV of this crate is depending on `tui` crate. Currently MSRV is 1.56.1. Note that `ratatui` crate requires more recent Rust version.
|
MSRV of this crate is depending on `tui` crate. Currently MSRV is 1.56.1. Note that `ratatui` crate requires more recent Rust version.
|
||||||
@@ -705,3 +729,4 @@ tui-textarea is distributed under [The MIT License](./LICENSE.txt).
|
|||||||
[pulls]: https://github.com/rhysd/tui-textarea/pulls
|
[pulls]: https://github.com/rhysd/tui-textarea/pulls
|
||||||
[regex]: https://docs.rs/regex/latest/regex/
|
[regex]: https://docs.rs/regex/latest/regex/
|
||||||
[serde]: https://crates.io/crates/serde
|
[serde]: https://crates.io/crates/serde
|
||||||
|
[serde_json]: https://crates.io/crates/serde_json
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user