Files
vue-tui/packages
Yunfei He 8bc7976561 feat(components): scroll ScrollBox through an imperative handle (drop wheel/keyboard) (#242)
ScrollBox drops its `wheel`, `keyboard`, and `linesPerWheel` props and instead
exposes an imperative handle (`ScrollBoxExpose`): scrollToLine / scrollByLines /
scrollToTop / scrollToBottom. It listens to no mouse or keyboard input itself —
the consumer wires its own bindings to the handle.

Built-in input is deferred because best practice isn't settled: the mouse wheel
needs terminal mouse tracking (which suppresses native text selection
window-wide), and keyboard input is global (collides with a focused field).
Shipping only the scroll mechanism keeps the component honest and lets the app
own input policy. The core bounded, sticky-following viewport still works with
no props.
2026-07-05 16:09:09 +08:00
..