« get me outta code hell

tui-lib - Pure Node.js library for making visual command-line programs (ala vim, ncdu)
about summary refs log tree commit diff
AgeCommit message (Collapse)Author
2019-09-23Make textAttributes a draw dependencyFlorrie
2019-09-20Suppot meta up/down/left/right keysFlorrie
2019-09-18Make label text a draw dependencyFlorrie
This makes the screen be automatically redrawn whenever a label's text is updated.
2019-09-16WIP better renderingFlorrie
I think this'll take some serious attention before it even works and saves any performance.
2019-09-16Add basic Element classFlorrie
2019-09-15Keyboard functions for Home, Insert, Delete, EndFlorrie
2019-09-15Add lastInput function to formsFlorrie
2019-09-15Remove dead todo commentFlorrie
2019-09-15(!!) Only render when draw-dependency props changeFlorrie
This is a very large change and probably breaks most applications not built to work with it. (Obviously, I'm not really being that responsible with this sort of thing.) I've tested with mtui and it works fine, but some elements may need tweaks before being 100% adjusted to the new scheduled-render system we're using with this commit. Also, any elements which have custom draw behavior will likely need updating so that they appropriately schedule renders.
2019-08-25Add new property clickThrough to all elementsFlorrie
2019-08-25Add key detection functions for control+arrow keysFlorrie
2019-08-22Add setBackground ansi utility functionFlorrie
2019-08-22Add trimToColumns ansi utility functionFlorrie
2019-07-18Don't explode when no element is selected!Florrie
2019-07-18Mouse drag support; pass detailed data to handlersFlorrie
...for mouse events. Contains cursor position, modifier keys pressed, etc.
2019-07-07Emit 'resize' as well in TelnetInterfacerFlorrie
Same as 'screenSizeUpdated'.
2019-05-12Automatically show/hide ListScrollForm scrollbarFlorrie
...depending on whether there is enough content that it cannot all be displayed in the form's space or not.
2019-05-12Adjust the way the scrollbar handle is drawnFlorrie
Specifically, it now clearly represents how much of the scrollable form is visible and not visible at the moment. It also will never touch the top or bottom if it's possible to scroll further in the correspodning direction.
2019-04-02Merge branch 'master' of ssh://ed1.club/home/florrie/git/tui-libFlorrie
2019-04-02Avoid crashing when scrolled past end of formFlorrie
Usually this doesn't happen, but it may occur if the items of the ListScrollForm are regenerated (to a lesser length) before updating scrollItems.
2019-03-16Make tui-app boilerplate support ^Z/suspendFlorrie
2019-02-05App boilerplate codeFlorrie
2019-01-25Expose xterm alternate screenFlorrie
2018-12-22Bump versionFlorrie
2018-12-22Export WrapLabelFlorrie
"Oops"
2018-12-15Fix mistake in Form.addInputFlorrie
TL;DR afterIndex was not being set correctly.
2018-12-15Optimize the h*ck out of ListScrollFormFlorrie
2018-12-15Optimize getScrollPositionOfElementAtEndOfViewFlorrie
This actually drastically improves the performance of mtui when opening very, very large playlists.
2018-12-14Add options to not call fixLayout automaticallyFlorrie
2018-12-08Stop tracking mouse on cleanCursor()Florrie
This way when a program is exited, the mouse will go back to normal (so you can scroll the terminal log, etc).
2018-12-08Set VT200 mouse instead of X10 mouseFlorrie
Reference: http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking For some reason this works better with tmux than X10 mouse (and it still works in ordinary, non-tmux windows).
2018-12-08Mouse supportFlorrie
Not exactly the most elegant implementation, but it definitely works and isn't really difficult to code around!
2018-12-05Bump version for npm publish :shrug:Florrie
2018-12-05Use measureColumns in the appropriate placesFlorrie
TL;DR If you want to take into account the width of text, use measureColumns instead of just checking the length of the text!
2018-12-05Add utility measureColumns function to ansi.jsFlorrie
This way layouts can properly support wide characters.
2018-12-05Wide character support in ANSI compressorFlorrie
2018-12-04Optimize - don't do attributes.slice() as oftenFlorrie
If it makes sense to reuse an attributes array, do that.
2018-12-04Un-broken optimizationFlorrie
(reverted broken stuff; still a little optimization, i.e. cache cursorIndex)
2018-12-04Broken optimizationFlorrie
2018-11-23Fix (un)select calls re: consecutive root.select()Florrie
See code comments for explanation.
2018-09-15Don't bubble cancel in DialogFlorrie
2018-09-15Fix keyPressed call orderFlorrie
Before: <top>, <bottom>, <second to bottom>, <third to bottom>... Now: <top>, <second to top>, <third to top>, <fourth to top>...
2018-09-13Add TextInput events: confirm (= value), changeFlorrie
2018-09-12TextInput: Don't bubble backspace or arrow keysFlorrie
Like mentioned before, it's not too complicated to make these not bubble - just some added 'return false's. I wrapped the whole block in a try-finally so that keepCursorInRange could always be called at the end without any significant code structure change, so that means the git diff is a little wonky - best viewed with the -w (ignore whitespace changes) option.
2018-09-12Add 'cancel' event (on ESC) to TextInputFlorrie
2018-09-12(breaking, very) Fix how text inputs bubble eventsFlorrie
This is extremely super duper very breaking in that it reverses the order that keyboard events are bubbled. This fixes an issue in the following situation: You have a focus element which captures keyboard input. When the X key is pressed, a text input, which is a child (directly or indirectly) of it, is selected and has its value emptied. As the user types into that text input, if they press the X key, the handler on the focus element will detect this, and clear and select the text input - interrupting the user's typing. The situation is fixed in this commit by making the text input avoid bubbling events when text is entered. I'm not sure this is 100% complete, because arrow key events and the like are still bubbled, but those aren't difficult to change later. The breaking fundamental change here is that keyboard events are now bubbled from the top element down. Before, a parent element could deny child elements from responding to the event; now the child can deny the parent.
2018-08-15Save oldSelectedElement before calling Dialog.openedFlorrie
The main purpose of Dialog.opened is to select an input in any case (e.g. opened() { this.root.select(this.input) }) so it makes more sense to save whichever element was selected before calling that.
2018-08-15Save/restore selection on Dialog open/closeFlorrie
2018-08-05(perf) Cache scrollItemsLengthFlorrie
2018-08-05(perf) Make sizeProp not a getterFlorrie