Commit Graph

653 Commits

Author SHA1 Message Date
Christian Rocha 845a269706
Update pager example with resize listening + log to file 2020-05-25 20:24:17 -04:00
Christian Rocha 40332a36b3
Migrate components over to github.com/charmbracelet/bubbles 2020-05-25 20:10:15 -04:00
Christian Rocha 3b8b011b5a
Rename to Bubble Tea (with the import name tea) 2020-05-25 19:48:36 -04:00
Christian Rocha 200891b022
Update dependencies in examples 2020-05-25 14:22:32 -04:00
Christian Rocha dd79195e1b
Add alt+left/right and alt+b/f to jump between words in text input 2020-05-25 14:21:03 -04:00
Christian Muehlhaeuser bb85a886fd
Use consts for default values 2020-05-25 14:12:42 +02:00
Christian Muehlhaeuser cd4e02b1a8
Simplify code a bit 2020-05-25 14:12:30 +02:00
Christian Muehlhaeuser e8b7e510bb
Simplify key/sequence map 2020-05-25 14:03:59 +02:00
Christian Muehlhaeuser 0957c58e05
Make type documentation godoc-compliant 2020-05-25 14:02:46 +02:00
Christian Muehlhaeuser bb19d42cc0
Rename PaginatorType to Type
Type name would be used as paginator.PaginatorType by other packages,
and that stutters.
2020-05-25 13:55:37 +02:00
Christian Muehlhaeuser 6db7c48ba8
Use a buffered channel for signal.Notify 2020-05-25 13:43:02 +02:00
Christian Rocha 15e623358e
Bump dependencies, namely github.com/pkg/term 2020-05-21 22:31:39 -04:00
Christian Rocha bdf6f07c75
Resetting a text input also resets the cursor blink state 2020-05-21 22:31:07 -04:00
Christian Rocha 9d175b5ed7
Add ability to log directly to a file 2020-05-21 16:59:26 -04:00
Christian Rocha 6ceafa032c
Text input value getter/setter + cursor movement methods 2020-05-20 16:12:14 -04:00
Christian Rocha 826420a00e
Add method to text input model to reset the state 2020-05-20 15:03:29 -04:00
Christian Rocha 3868858947
Support bounded width in text input 2020-05-20 15:03:21 -04:00
Christian Rocha 9fc0d0ea82
Support background colors in textinput 2020-05-19 14:58:50 -04:00
Christian Rocha ee5f82579f
Don't treat the space character as a control character
There are drawbacks to both sides of this, but in the end, it seems to make
more sense to treat spaces as regular runes.
2020-05-19 14:41:55 -04:00
Christian Rocha dafb022fe5
Pager is now called viewport and allows for non-default keybindings 2020-05-19 13:18:32 -04:00
Christian Rocha 822c234a82
Use a mutual exclusion lock when writing to stdout 2020-05-19 13:16:02 -04:00
Christian Rocha 28deb6c543
Correct doc comment 2020-05-18 18:45:37 -04:00
Christian Rocha 61285e4e90
Disable OnResize command on Windows 2020-05-18 11:44:58 -04:00
Christian Rocha d2ae1b0fb7
Add command for listening for window resizes 2020-05-17 19:28:12 -04:00
Christian Rocha 25f8b8c99b
Simplify pager component and fix pager example 2020-05-15 16:08:58 -04:00
Christian Rocha 7562f29046
Use more idiomatic function name for content setter in pager 2020-05-15 14:14:17 -04:00
Christian Rocha 149579d584
Add helper method to paginator for determining if we're on the last page 2020-05-15 13:24:32 -04:00
Christian Rocha 5a1ee26a6b
Fix typo in comment 2020-05-14 20:59:03 -04:00
Christian Rocha 959b9c3a45
Cleanup pager 2020-05-14 17:56:54 -04:00
Christian Rocha 82e1aa81da
Fix percentage artithmetic in pager 2020-05-14 15:10:38 -04:00
Christian Rocha 3960657824
Pager: fill empty space with newlines 2020-05-14 15:04:39 -04:00
Christian Rocha 6176ad6f8e
Add method to pager model for getting percent scrolled 2020-05-14 15:04:18 -04:00
Christian Rocha db4600aeb2
Add a command and message for getting terminal size
There may be too much rigamarole around this (it's simpler to get the size
imperatively and synchronously) but adding it for now.
2020-05-14 10:49:08 -04:00
Christian Rocha 0e39761525
Strip down pager; the teminal size must now be fetched by the parent 2020-05-14 10:45:53 -04:00
Christian Rocha ffdaba08eb
Remove this extraneous type 2020-05-14 10:45:37 -04:00
Christian Rocha 254c098066
Pager: expose cmd for getting terminal size + bind pgup/pgdown 2020-05-13 22:06:35 -04:00
Christian Rocha 251f944f12
Spinner doc comments 2020-05-13 16:06:15 -04:00
Christian Rocha 82a40119b9
Spinner can now send custom messages 2020-05-13 15:55:53 -04:00
Christian Rocha ade8203c21
Remove entire subscription model
It was a valiant effort, and the implementation was solid and
dependable, but at the end of the day we can achieve the same
functionality in a much simpler fashion with commands, especially
because Go is not held to the same restrictions as Elm.
2020-05-12 18:00:50 -04:00
Christian Rocha 82ddbb8e12
Move components over and update examples 2020-05-12 17:06:00 -04:00
Christian Rocha 4bf40fbe62
Rename project to Boba 2020-05-12 16:39:08 -04:00
Christian Rocha 9dd9461dde
It's a safer bet not to render any extra newlines whatsoever 2020-05-11 23:07:48 -04:00
Christian Rocha 767f4bec2d
Built-in subscriptions are clearer without the extra type definition 2020-05-11 23:07:45 -04:00
Christian Rocha b6eeef2127
Pager example 2020-05-11 23:07:45 -04:00
Christian Rocha 5ae602953c
Fix bug where extra blank line was being adding to output 2020-05-11 23:07:00 -04:00
Christian Rocha 72c1a1c0ef
Treat space key as a control character (instead of a " ") 2020-05-11 19:56:46 -04:00
Christian Rocha 88e4df4055
Update spinner example so it works with the spinner version in master 2020-05-11 17:38:05 -04:00
Christian Rocha 2a82e2a75e
Add Tick to run timers independent of the system clock 2020-05-11 13:01:42 -04:00
Christian Rocha 7b887b0a05
Update example in README to use tea.Every 2020-05-11 12:54:44 -04:00
Christian Rocha d503d5dbf6
Every sends the time at which the timer ticked 2020-05-05 14:26:06 -04:00