Skip to content

Releases: Im-Beast/deno_tui

Deno TUI 2.1.1

02 Aug 13:33
Compare
Choose a tag to compare

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

01 Aug 18:53
Compare
Choose a tag to compare

Release 2.1.0 🎉

BREAKING CHANGES

  • Views properties (rectangle, offset and maxOffset) are now a signals.

Changelog

  • Added Layouts, which simplify creation of apps that require more complex positioning or responsivness.
    • VerticalLayout, HorizontalLayout and GridLayout are available.
    • examples/calculator.ts and examples/layout.ts showcase how to use GridLayout
    • additional documentation is available as JSDoc of these classes.
  • A lot of functionality has been added to signals
    • Effect and Computed now track causes of their updates
      • These causes are passed to their update method as an option
        • new Computed((cause) => { ... }), new Effect((cause) => { ... })
    • 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 and drop Signal methods
      • They are here for easier state management over your signals
      • drop is basically unsubscribe for when
      • 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 and cropToWidth string utility functions have been highly optimized
  • Keypresses are now read at the same rate as Tui's refreshRate
    • 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 in ProgressBar 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

09 Jun 12:51
626bced
Compare
Choose a tag to compare

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

30 May 15:41
cabf6ea
Compare
Choose a tag to compare
Deno TUI 2.0.0-RC4 Pre-release
Pre-release

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 in src/signals/, there's also mod.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

28 May 16:13
Compare
Choose a tag to compare
Deno TUI 2.0.0-RC3 Pre-release
Pre-release

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-uses TextRectangle type from TextObject
  • Input reader now properly handles multiple sequence sent at once
    • This fixes moving cursor diagonally in Windows Terminal, alacritty, kitty and more
  • Fixed table spacing being too wide
  • Fixed multiple bugs with Signals
  • Added jink method to Signals which allow to change value inside Effect or Computed 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

04 May 16:28
1ea5795
Compare
Choose a tag to compare
Deno TUI 2.0.0-RC2 Pre-release
Pre-release

Release 2.0.0-RC2

Changelog

  • Updated demo
  • Fixed src/signals.ts and src/view.ts not being exported in mod.ts

Full Changelog: 2.0.0-RC...2.0.0-RC2

Deno TUI 2.0.0-RC

04 May 14:42
2c1bed9
Compare
Choose a tag to compare
Deno TUI 2.0.0-RC Pre-release
Pre-release

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
  • Components no longer have Component suffix, e.g. BoxComponent is now just a Box
  • Signal's are now used to smoothen development of reactive UI
  • Components no longer have update() method, instead they calculate changes using Signal'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() with emitInputEvents() which directly emits input from given stdin with parsed events.
    • key_reader.ts related types have been moved from src/types.ts to src/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

14 Nov 15:01
f8967e1
Compare
Choose a tag to compare

Release 1.3.4

Changelog

  • Added TableComponent to src/components/mod.ts (#20)

Full Changelog: 1.3.3...1.3.4

Deno TUI 1.3.3

06 Nov 13:17
06a31c1
Compare
Choose a tag to compare

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 either src/types.ts or src/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 systems
      • windows/ contains functions that are supported only on Windows
      • types.ts contains types specific for key_reader.ts however they're reexported in src/types.ts
    • Entry point is still in src/key_reader.ts

Full Changelog: 1.3.2...1.3.3

Deno TUI 1.3.2

04 Nov 17:11
f6fa684
Compare
Choose a tag to compare

Release 1.3.2

Changelog

  • Fixed invalid type for keyboardHandler property in TextboxComponent (#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's draw() performance/crashing issues under some circumstances

Full Changelog: 1.3.1...1.3.2