Skip to content

Deno TUI 0.1.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@Im-Beast Im-Beast released this 24 Nov 21:53
· 704 commits to main since this release

Changelog

  • Massive rendering overhaul
    • New canvas and colors API
      • When smartRender in canvas is set only changed parts of the screen are redrawn
        • H u g e performance gain
      • Instead of using crayon.js TUI uses new colors module which precompiles styles
    • Drawing full-width characters is now supported
    • frame_buffer.ts module has been removed and replaced fully with canvas.ts
  • Reactivity improvements
    • styler property in TuiInstance and TuiComponent's can now be dynamic
      • Remember to use it only when reference to the object changes
  • Fixed broken key reader (missing setRaw line)
  • From this point on API changes shouldn't be that radical

Changes needed to make previous code work with this version

- const mainStyler: TuiStyler = {
- foreground: "white",
- ...
- };
- const componentStyler: TuiStyler = {
-  ...mainStyler,
-  background: "blue",
- };
+ const mainStyler = compileStyler<TuiStyler>({
+ foreground: "white",
+ ...
+ });
# You could potentially use compileStyler here too.
+ const componentStyler: TuiStyler = {
+ ...mainstyler,
+ background: keyword("bgBlue"),
+ });