Commit Graph

157 Commits

Author SHA1 Message Date
Christian Rocha 66cea095eb Migrate from NewModel() to New() in examples for Bubbles-related stuff 2022-01-13 13:20:18 -05:00
Christian Rocha 843b6a5249 Use model-based Tick commands in spinner examples 2022-01-13 13:05:27 -05:00
Christian Rocha ee92bed288 Cleanup header/footer rendering in pager example with Lip Gloss 2022-01-13 12:49:20 -05:00
Christian Rocha 7517c1b1bd Add a border to the Glamour example per the viewport API update 2022-01-13 12:49:20 -05:00
Christian Rocha 7514ac937a Update glamour example per viewport API update 2022-01-13 12:49:20 -05:00
Christian Rocha 1ca2b1cd40 Update pager example per viewport API update 2022-01-13 12:49:20 -05:00
Christian Rocha bdb04767ff Add stopwatch example 2022-01-13 11:53:46 -05:00
Christian Rocha 03d1aa6c08 Rename 'countdown' example to 'timer' and use timer Bubble 2022-01-13 11:53:14 -05:00
Christian Rocha 99ba63fe8a
Bump main, example, and tutorial dependencies 2022-01-13 11:41:09 -05:00
Max Brauer 4ac566c1f7 Remove unused func from send-msg example
‘randomEmoji()’ is redundant
2022-01-10 21:15:47 -05:00
Christian Rocha d266bc1616 Update result example to use StartReturningModel 2022-01-10 21:00:29 -05:00
Kyosuke Fujimoto 3a1b9fbe9f Fix list-default to use tea.WithAltScreen option 2022-01-08 14:36:37 -05:00
Kyosuke Fujimoto 14478e2a3c Fix list-default to be able to exit with ctrl+c 2022-01-08 14:36:37 -05:00
Christian Rocha ab89603d28 Remove unused filtering stuff from simple list example 2021-11-09 17:30:15 -05:00
Christian Rocha 6dc000bdbd Examples and tutorials: update dependencies and go mod tidy 2021-10-28 09:45:43 -04:00
Christian Muehlhaeuser c29912c179 Enable ANSI compressor
With this change all ANSI output will be piped through an ANSI compressor that
eliminates redundant ANSI sequences. As such the compressor can be considered
"lossless".
2021-10-28 09:45:43 -04:00
Christian Rocha 7396e37f3f Fix a performance rendering size miscalculation in the pager example 2021-09-17 16:39:02 -04:00
Christian Rocha 749e48df11 Update animated progress bar example per its current API 2021-09-07 14:16:55 -04:00
Christian Muehlhaeuser 27ba7e7aa1 Add list examples 2021-08-23 22:18:28 +02:00
Christian Rocha 1b8495ed21 Add help bubble example 2021-08-23 22:05:20 +02:00
Christian Rocha 8574b87a44 Bump containerd/console in examples 2021-08-02 10:50:04 -04:00
Christian Rocha 8f03848f54 Split progress bar example into static and animated versions 2021-07-26 12:50:53 -04:00
Christian Rocha 0886ee26b0 Msgs can now be sent to Programs with Program.Send(Msg) 2021-07-01 11:06:21 -04:00
Christian Rocha 85ab476698 Add ProgramOptions for entering the altscreen and enabling the mouse
Because they run ansyncronously, the analogous commands, when run in
a Model's Init() function, could fire after the renderer has starting
writing to output, rendering artifacts to the commandline.
2021-06-02 14:49:54 -04:00
Christian Rocha ec2fbf024b Cycle through cursor modes in textinputs example per Bubbles v0.8.0 2021-06-02 12:44:32 -04:00
Ilya Revenko 29b7de4b7c
Fix more typos in examples (#102) 2021-05-28 19:45:17 +02:00
irevenko da9e8ee75a Fix typo in examples/result 2021-05-26 16:47:01 -04:00
Christian Rocha 6eabfd726e Cleanup styling spinner and tui-daemon-combo examples 2021-05-14 22:30:46 -04:00
Christian Rocha 65df16238d Fix coloring glitch in Glamour example 2021-05-14 22:30:46 -04:00
Christian Rocha 5c150ebf38 Add cmds for toggling mouse mode + deprecate equivalent Program methods
Also automatically disable mouse mode on exit.
2021-05-05 18:11:56 -04:00
Christian Rocha 7c0bbc7d32 Clean up and normalize examples 2021-05-01 09:33:13 -04:00
Elio Esteves Duarte 64ae19f37e Add paginator example 2021-05-01 08:54:57 -04:00
Tobias Klauser 295f7bd246 Use golang.org/x/term
The golang.org/x/crypto/ssh/terminal package is deprecated and merely a
wrapper around golang.org/x/term. Use the latter directly and avoid the
dependency on the former altogether.
2021-04-29 15:05:50 +02:00
Christian Rocha 42f02edf29 Update spinner, textinput and pipe examples for Bubbles v0.7.7 2021-04-13 22:21:09 -04:00
sora233 ebf80ebf89 Fix stack overflow in examples/http 2021-04-09 10:02:40 +02:00
Christian Muehlhaeuser ab65f2391f
Bump bubbletea dependency for examples & tutorials 2021-04-03 02:03:23 +02:00
Christian Muehlhaeuser 72ce94f47d
Bump termenv to v0.8.1 2021-04-03 01:43:33 +02:00
Christian Rocha 9e9020afce Fix typo in Glamour example 2021-03-18 13:10:15 -04:00
Christian Muehlhaeuser f981b991c0 Fix ineffectual assignment in spinner example 2021-03-12 02:17:27 +01:00
Christian Muehlhaeuser b6c7f93d9a Fix various typos in examples 2021-03-12 02:16:41 +01:00
Christian Rocha 231fa2cb73
Make altscreen demo slightly fancier 2021-03-11 15:15:08 -05:00
Christian Rocha 01878b5650
Make tui-daemon-combo demo look a little more enticing 2021-03-11 15:03:52 -05:00
Christian Rocha a87e82a3e8
Bump Bubble Tea and Termenv dependencies in examples 2021-03-11 15:03:25 -05:00
kiyon 86b93a31c0
Add commands for toggling the altscreen (#62)
* Add commands EnterAltScreen and ExitAltScreen for toggling the altscreen
* Add altscreen toggling example
* ignore .idea

Co-authored-by: Christian Rocha <christian@rocha.is>
2021-03-08 12:48:34 -05:00
Christian Rocha b3f62af8b5 Add nil renderer and combination TUI-daemon program example
The Nil Renderer essentially disables the Bubble Tea renderer sending
loggings and print statements to stdout. It can be enabled via the
ProgramOption WithoutRenderer.
2021-03-07 13:01:54 -05:00
Christian Rocha 2b8b95d8f8 Fix spinners not spinning in spinners examples (fixes #58) 2021-03-03 16:07:35 -05:00
Christian Rocha 0780601791 Open a TTY if input is not a TTY, unless the user has spec'd otherwise 2021-02-27 16:03:34 -05:00
Christian Muehlhaeuser 92a795256a go mod tidy 2021-02-25 10:49:33 -05:00
Christian Rocha 91bd232fe2 Add example illustrating how to send messages via channels in realtime 2021-02-10 00:01:37 +00:00
Christian Rocha dd6a0a092e Bump deps in examples 2021-02-06 19:21:40 +00:00