Releases: Im-Beast/deno_tui
Releases · Im-Beast/deno_tui
Deno TUI 2.1.1
Release 2.1.1 🎉
Changelog
- This patch release removes unnecessary code that was in
flusher.ts
which logged some numbers to the console
Full Changelog: 2.1.0...2.1.1
Deno TUI 2.1.0
Release 2.1.0 🎉
BREAKING CHANGES
- Views properties (
rectangle
,offset
andmaxOffset
) are now a signals.
Changelog
- Added Layouts, which simplify creation of apps that require more complex positioning or responsivness.
VerticalLayout
,HorizontalLayout
andGridLayout
are available.examples/calculator.ts
andexamples/layout.ts
showcase how to useGridLayout
- additional documentation is available as JSDoc of these classes.
- A lot of functionality has been added to signals
Effect
andComputed
now track causes of their updates- These causes are passed to their
update
method as an optionnew Computed((cause) => { ... })
,new Effect((cause) => { ... })
- These causes are passed to their
- Properties which take either object or signal of that object now have better typings
SignalOfObject
type has been added, which provides that functionality
- New
when
anddrop
Signal
methods- They are here for easier state management over your signals
drop
is basicallyunsubscribe
forwhen
when
usage:
// Basically this
button.state.when("active", () => {
++counter;
});
// Is equivalent to this
button.state.subscribe((state) => {
if (state === "active") {
++counter;
}
});
- Fixed bug whereas some keypresses could lag behind actual component state
- Canvas has received a number of performance optimizations, which visibly reduced CPU usage
- It only updates objects that actually need to be updated
- It loops over objects only once, instead of twice like before
- If object's rectangle hasn't changed it doesn't try to update its intersections
- When object gets erased its subscriptions and effects are hang until it gets drawn again
- TextObject should update a bit more efficiently
textWidth
,stripStyles
andcropToWidth
string utility functions have been highly optimized
- Keypresses are now read at the same rate as
Tui
'srefreshRate
- This significantly lowers CPU usage when object is reactive to mouse or keypresses without introducing visible latency
- Fixed a bug where resizing wouldn't update elements at last row and/or column of the terminal
- Fixed
smooth
option not being properly respected inProgressBar
component - Tui has now
rectangle
property
calculator_showcase.webm
demo_showcase.webm
layout_showcase.webm
Full Changelog: 2.0.0...2.1.0
Deno TUI 2.0.0
Release 2.0.0 🎉
Changelog
- Fixed
Computed
being able to be directly modified - Added the most important missing docs
Full Changelog: 2.0.0-RC4...2.0.0
Deno TUI 2.0.0-RC4
Release 2.0.0-RC4
BREAKING CHANGES
- Signals have been rewritten, it doesn't change the way you should use them however:
BaseSignal
doesn't exist anymore- Each concept got its own module, meaning taht instead of just one
src/signals.ts
there's now multiple modules located insrc/signals/
, there's alsomod.ts
which re-exports everything. - Signal typing is now stricter, which could potentially break your code if it doesn't use proper types
Changelog
- Basically this whole release is about rewritten signals which fixes some bugs and is better in general
- Also added more tests for signals to prevent future breakage
Full Changelog: 2.0.0-RC3...2.0.0-RC4
Deno TUI 2.0.0-RC3
Release 2.0.0-RC3
Changelog
- Huge performance improvements
Canvas
now updates intersections of objects that actually need to be recomputed- >50% improvement in demo with Frame enabled (6-9% -> 2-4% cpu usage)1
Effect
now runs once per root signal (less unnecessary updates)
- Enabled Frame's around objects in demo by default
Text
component now re-usesTextRectangle
type fromTextObject
- Input reader now properly handles multiple sequence sent at once
- This fixes moving cursor diagonally in
Windows Terminal
,alacritty
,kitty
and more
- This fixes moving cursor diagonally in
- Fixed table spacing being too wide
- Fixed multiple bugs with Signals
- Added
jink
method to Signals which allow to change value insideEffect
orComputed
without being appended as dependency. - Fixed
Button
compoent creating unnecessary label component each time its value changed - Fixed
Label
component being sometimes one update back
1 – Read from htop
on mine Ryzen 7 5700G, your mileage may vary, however relative performance should be around the same
Full Changelog: 2.0.0-RC2...2.0.0-RC3
Deno TUI 2.0.0-RC2
Release 2.0.0-RC2
Changelog
- Updated demo
- Fixed
src/signals.ts
andsrc/view.ts
not being exported inmod.ts
Full Changelog: 2.0.0-RC...2.0.0-RC2
Deno TUI 2.0.0-RC
Release 2.0.0-RC
Changelog
This major change breaks almost all of the older code.
It is easy to migrate older code to new one.
Most important changes include:
- Huge performance improvements
- Canvas now tracks drawn objects and calculates what cells need to get rerendered each frame
- This can be further optimized in consecutive updates
- Canvas now tracks drawn objects and calculates what cells need to get rerendered each frame
- Components no longer have
Component
suffix, e.g.BoxComponent
is now just aBox
Signal
's are now used to smoothen development of reactive UI- Components no longer have
update()
method, instead they calculate changes usingSignal
's key_reader.ts
is split to multiple modules inside `input_reader/``.input_reader/decoders
contains logic for decoding given buffer/character code to events.- Replaced
readKeypresses()
withemitInputEvents()
which directly emits input from given stdin with parsed events. key_reader.ts
related types have been moved fromsrc/types.ts
tosrc/input_reader/types.ts
."mousePress"
event has been split to three different events: "mouseEvent", "mousePress", "mouseScroll".- mouse and keyboard decoders now re-use objects instead of creating new ones constantly
Full Changelog: 1.3.4...2.0.0-RC
Deno TUI 1.3.4
Release 1.3.4
Changelog
- Added
TableComponent
tosrc/components/mod.ts
(#20)
Full Changelog: 1.3.3...1.3.4
Deno TUI 1.3.3
Release 1.3.3
Changelog
- Fixed Keyboard-contol related issues
- Fixed interacting with slider
- Switching from mouse<->keyboard on the fly should work properly now
- View is now properly respected after interacting with component
- Off-screen components are no longer drawn
- Highly refactored
key_reader.ts
- If you've exported any of the types from
src/key_reader.ts
update the path to eithersrc/types.ts
orsrc/key_reader/types.ts
! - It has been split into multiple functions and modules for readability that are in
src/key_reader/
unix/
contains functions that are supported on macOS/Linux and other unix-like systemswindows/
contains functions that are supported only on Windowstypes.ts
contains types specific forkey_reader.ts
however they're reexported insrc/types.ts
- Entry point is still in
src/key_reader.ts
- If you've exported any of the types from
Full Changelog: 1.3.2...1.3.3
Deno TUI 1.3.2
Release 1.3.2
Changelog
- Fixed invalid type for
keyboardHandler
property inTextboxComponent
(#15) - Fixed invisible text input on bash after exiting (#14)
- Fixed
TextboxComponent
recapturing return (enter) keystroke (#13) - Fixed invalid reduce type in
TableComponent
- Fixed
Canvas
'sdraw()
performance/crashing issues under some circumstances
Full Changelog: 1.3.1...1.3.2