fix(tui): reset styles per line

This commit is contained in:
Mario Zechner
2026-01-11 18:36:48 +01:00
parent 741262d89d
commit 6d495348c5
5 changed files with 37 additions and 0 deletions

View File

@@ -74,6 +74,8 @@ interface Component {
| `handleInput?(data)` | Called when the component has focus and receives keyboard input. The `data` string contains raw terminal input (may include ANSI escape sequences). |
| `invalidate?()` | Called to clear any cached render state. Components should re-render from scratch on the next `render()` call. |
The TUI appends a full SGR reset and OSC 8 reset at the end of each rendered line. Styles do not carry across lines. If you emit multi-line text with styling, reapply styles per line or use `wrapTextWithAnsi()` so styles are preserved for each wrapped line.
## Built-in Components
### Container