Deno TUI 1.1.0
Release 1.1.0
BREAKING CHANGES
TypedEventTarget
andCombinedAsyncIterator
has been removed- Tui now uses custom implementation of
EventEmitter
instead ofAsyncIterator
's andEventTarget
Tui.run()
now starts application and returns nothing- Use
Tui.on()
to intercept events
- Use
Tui.render()
,Tui.update()
andCanvas.render()
now return functions that allow to stop them- Tui no longer automatically exits after CTRL+C'ing
- To return to previous behaviour call
Tui.dispatch()
after creating Tui - You can manually call
Tui.remove()
to stop Tui (doesn't exit deno app)
- To return to previous behaviour call
- Tui's
close
has been renamed todispatch
Component
's now use stricter typings soComponent
without specifying literal type doesn't mean Any Component, useComponent<EventRecord>
instead.
Changelog
- Added custom
EventEmitter
andDeffered
implementation - Switching to custom
EventEmitter
indirectly caused many things to improve:- Changing size of the Tui caused by resizing terminal is now smooth as butter
- Tui is now way more stable when it's time to
unload
it (in watch) and on closing- There were cases where it could still run in the background after closing, no longer the case
updateRate
andrefreshRate
is now way more stable,CombinedAsyncIterator
caused it to overshoot previously- frametimes are now way more consistent
- Previously, some small (but existent) CPU spikes were happening, it's no longer the case
- Component's can now intercept more events, specifically
remove
,keyPress
,multiKeyPress
andmousePress
- Theoritically Tui should now be more memory efficient in the long run,
Tui.remove()
andComponent.remove()
"clean" more after themselfs
Tip
- Take a look at changelog and/or demo diff to see how to adapt to these changes
Full Changelog: 1.0.3...1.1.0