import * as tui from "https://deno.land/x/tui@1.3.4/mod.ts";
Classes
Canvas implementation that can be drawn onto and then rendered on terminal screen | |
Base Component that should be used as base for creating other components | |
Promise with | |
Custom implementation of event emitter | |
Component that definitely has it's rectangle set | |
Creates array that automatically sorts elements using | |
c Tui | Main object of Tui that contains everything keeping it running |
Enums
Type describing time of something happening
|
Variables
ANSI escape code to clear screen | |
ANSI escape code to disable mouse handling | |
ANSI escape code to enable mouse handling | |
ANSI escape code to hide terminal cursor | |
ANSI escape code to show terminal cursor | |
Regexp that allows for extracting unicode sequences that are supposed to represent single character | |
ANSI escape code to tell terminal to switch back to primary buffer | |
ANSI escape code to tell terminal to use secondary buffer |
Functions
Clamp {number} between {min} and {max} | |
Used as placeholder style when one is not supplied, returns the input | |
f fits | Check whether {number} fits in <{min}, {max}> range |
Check whether {column} and {row} fit in {rectangle} boundaries | |
Returns component that's the closest to top left corner of tui's canvas | |
| |
Intercepts keypresses from | |
| |
Applies default values to properties (lower one hierarchy or | |
Inserts string into string on given index | |
Check whether character is full width | |
Get ANSI escape code for moving cursor to given location | |
Normalize {value} between 0 and 1 | |
Read keypresses from given stdin (except for Windows) and then parse them.
On Windows keys are read by calling | |
Returns {replacement} if {style} is an {emptyStyle} otherwise returns {style} back | |
Asynchronously sleep for {time} milliseconds | |
Strips string of all styles | |
Returns real text width |
Interfaces
Interface defining object that {Canvas}'s constructor can interpret | |
Interface defining object that {Component}'s constructor can interpret | |
Interface defining what's accessible in {Component} class | |
Interface defining key press issued to stdin | |
Type that describes empty edge around Rectangle | |
Interface defining key press issued to stdin using a mouse | |
Interface defining multiple key presses (both {KeyPress} and {MousePress}) that have been issued to stdin at once | |
Type that describes offset | |
Interface defining object that {Component}'s constructor can interpret | |
Type that describes position and size | |
Base theme used to style components, can be expanded upon | |
Interface defining object that {Tui}'s constructor can interpret | |
Interface defining what's accessible in {Tui} class |
Type Aliases
Type defining letters from the latin alphabet | |
Type defining any {Component}, even inherited ones | |
Map that contains events that {Canvas} can dispatch | |
Type defining interpunction characters | |
Default EventMap that every component should use | |
Implementation for {Component} class | |
Interactivity states that components should use | |
Type defining terminal's (console) available size measured in columns and rows | |
Partial that makes all properties optional, even those within other object properties | |
Type for creating new arguments
| |
Type for event listener function | |
T Key | Type defining keys that |
Generates number types that range from {From} to {To} | |
Type defining special keys | |
Type for Standard Input - from where data is read | |
Type for Standard Output – where data gets written | |
Function that's supposed to return styled text given string as parameter | |
EventMap that {Tui} uses | |
Implementation for {Tui} class |