« 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
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
2018-07-25New fitToParent functionFlorrie
2018-07-25Fix ListScrollForm.firstInput not having an effect immediatelyFlorrie
2018-07-05addChild(child, afterIndex)Florrie
2018-07-05ListScrollForm - fixLayout before checking dimensionsFlorrie
2018-07-04An assortment of changes to how selected/unselected worksFlorrie
2018-07-04Remove FocusElement.isFocused, add isSelectedFlorrie
FocusElement.isSelected behaves a little bit differently - basically it's true if the current selected element is that element, OR any of the ancestors of the current selected element is that element. It's also a getter, so you can't directly override it (assigning to el.isSelected won't work).
2018-07-03Handy functions on DialogFlorrie
2018-06-29Remove unused iac dependencyFlorrie
Also removed yarn.lock since I don't use yarn for this anymore.
2018-06-12Add WrapLabel UI elementFlorrie
2018-06-12Be a little careful in Form.updateSelectedElementFlorrie
2018-06-07Scroll bar for ListScrollFormFlorrie
2018-06-07Remove page up/down controls from ListScrollFormFlorrie
These are unfortunately based on the assumption that every input is exactly one character tall, and definitely don't work with horizontal scrollers, so I had to remove them.
2018-06-04Form.selectInput functionFlorrie
2018-06-04isCharacter telchar util functionFlorrie
2018-06-04ListScrollForm.scrollToBeginning functionFlorrie
2018-06-04ListScrollForm.scrollToEnd functionFlorrie
2018-06-04ListScrollForm - don't bubble key pressesFlorrie
E.g. if up is pressed in a ListScrollForm, don't tell the parent element that up was pressed.
2018-06-03Page up/down controls in ListScrollFormFlorrie
2018-06-03isPageUp / isPageDown functions, simpler combo detection codeFlorrie
2018-06-02CommandLineInterfacer/Flushable resize supportFlorrie
2018-06-01Add scrollSelectedElementIntoView functionFlorrie
2018-05-31fillParent utilFlorrie
2018-05-31Let-const nitpicksFlorrie
2018-05-30Un-selectable inputsFlorrie
2018-05-30Add isCaselessLetter util functionFlorrie
2018-05-30Better ANSI-interpret debug messagesFlorrie
* Show the number of KB saved * Make the percent-saved a little more precise * Don't update the debug message if absolutely nothing changed on the screen (although, it's still saving however much data it would have taken to render the entire screen!!) * Just draw a bar across the whole screen, instead of a few extra " " characters - technically this adds a whole bunch of data itself but it's assumed that you aren't on limited data if you're debugging how much data the interpreter saves
2018-05-30Shading characters, for funFlorrie
2018-01-19Pass false to firstInput to not select the form if it wasn't already selectedFlorrie
2018-01-18Rename to tui-lib :shrug:Florrie
2018-01-18Add license and readmeFlorrie
2018-01-18Add package.json and index.jsFlorrie
2017-12-10Show/hide cursor in ANSI interpreterFlorrie
2017-12-10Clean up old state code in ANSI interpreterFlorrie
2017-12-10Set the ANSI compressor on OVERLOAD (underload?)Florrie
2017-12-10Interpret 'off' SGR commands in ANSI interpreterFlorrie