1
0
зеркало из https://github.com/glebtv/tui-textarea.git synced 2026-09-08 00:15:50 +03:00

Feat/textarea row measurement min max (#14)

* feat(textarea): add row measurement API with configurable min/max bounds

- add TextAreaMeasure and TextArea::measure(width_cols)
- make measurement wrap-aware and include block chrome rows
- add set_min_rows/set_max_rows (+ getters) with invariant normalization
- clamp preferred_rows to effective [min_rows, max_rows]
- export TextAreaMeasure at crate root
- switch examples/variable.rs to measured preferred_rows
- add integration tests for measure + min/max behavior

* chore(release): bump to v0.10.0 and update changelog
Этот коммит содержится в:
srothgan
2026-02-25 16:00:26 +01:00
коммит произвёл GitHub
родитель 56f531a73f
Коммит 1a64a949b6
6 изменённых файлов: 236 добавлений и 4 удалений

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

@@ -1,3 +1,15 @@
<a id="v0.10.0"></a>
# [v0.10.0](https://github.com/srothgan/tui-textarea/releases/tag/v0.10.0) - 2026-02-25
- Add row-based measurement API via `TextArea::measure(width_cols)` and `TextAreaMeasure`.
- Include content rows and preferred rows (with block chrome such as borders/padding) in measurement results.
- Add configurable row bounds via `TextArea::set_min_rows` / `set_max_rows` with getters.
- Clamp `preferred_rows` to effective `[min_rows, max_rows]` while keeping wrapping and viewport behavior unchanged.
- Update the variable-height example to size from `measure().preferred_rows` instead of raw line count.
- Add integration tests covering measurement semantics, wrapping/line-number effects, and min/max normalization.
[Changes][v0.10.0]
<a id="v0.9.2"></a>
# [v0.9.2](https://github.com/srothgan/tui-textarea/releases/tag/v0.9.2) - 2026-02-19
@@ -495,6 +507,8 @@ First release :tada:
[Changes][v0.1.0]
[v0.10.0]: https://github.com/srothgan/tui-textarea/compare/v0.9.2...v0.10.0
[v0.9.2]: https://github.com/srothgan/tui-textarea/compare/v0.9.1...v0.9.2
[v0.9.1]: https://github.com/srothgan/tui-textarea/compare/v0.9.0...v0.9.1
[v0.9.0]: https://github.com/srothgan/tui-textarea/compare/v0.8.0...v0.9.0
[v0.8.0]: https://github.com/srothgan/tui-textarea/compare/v0.7.1...v0.8.0