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
Christian Rocha
d3267e8ce0
Remove logging in text input example
2021-02-06 19:21:40 +00:00
Christian Rocha
133a315b2c
Remove double import in textinput example + make a var name less weird
2021-02-06 19:21:40 +00:00
Christian Rocha
cb8e9023eb
Update Bubble dependecy in examples
2021-01-13 18:27:49 -05:00
Christian Rocha
df0da42954
Add progressbar example
2021-01-12 18:13:29 -05:00
Christian Rocha
bc06e8d2e0
Fix wording in, and generally improve, a comment
2020-12-14 20:24:17 -05:00
Christian Rocha
01cb02ddd1
Correct help in spinners demo (see #38 )
2020-12-07 17:38:44 -05:00
Christian Rocha
ec67f23001
Add spinner browser to examples
2020-11-12 11:35:23 -05:00
Christian Rocha
fce5ce7782
Update spinner demo for Bubbles v0.7.5
2020-11-12 11:35:23 -05:00
Christian Rocha
454d198b0a
Update examples for Bubbles v0.7.4
2020-11-08 21:29:04 -05:00
Christian Rocha
28db8b465a
The q key also quits in the pager example
2020-11-08 21:25:52 -05:00
Christian Rocha
5d34c88692
Update examples for Bubbles v0.8.0
2020-11-08 21:22:39 -05:00
SuperPaintman
216b195175
Update `go.mod` in examples and tutorial
2020-11-03 20:19:53 -05:00
SuperPaintman
892bebd617
Fix a mouse example
2020-11-03 20:19:53 -05:00
Christian Muehlhaeuser
eae4d66917
Remove duped import
2020-10-30 08:37:58 +01:00
Christian Rocha
1e0283511e
Update textinputs for next Bubbles release
2020-10-28 22:30:55 -04:00
Christian Rocha
30e88cb04e
Bump reflow to v0.2.0 in examples
2020-10-26 21:23:25 -04:00
Christian Rocha
93adce2131
Minor simplification to countdown example
2020-10-25 17:08:58 -04:00
Christian Rocha
9a3a101244
Add timer countdown example
2020-10-25 16:57:11 -04:00
Christian Rocha
a0e3bcaa61
Bump Bubble Tea and Bubbles dependencies in examples
2020-10-22 16:43:22 -04:00
Christian Rocha
ae771304df
Add Glamour + Viewport example
2020-10-21 15:49:04 -04:00
Christian Rocha
9e9e05774c
Set character limits on text input examples
2020-10-21 10:19:34 -04:00
Christian Rocha
b8bc66ed6f
Bump Bubble Tea dependency in examples
2020-10-20 14:10:15 -04:00
Christian Rocha
141fc86ad0
Update wording in simple example
2020-10-15 20:51:28 -04:00
Christian Rocha
c72ee756dd
Bump Bubbles dependency to current master
2020-10-15 20:23:30 -04:00
Christian Rocha
847787e46d
Convert remaining examples to Model interface-based structure
2020-10-15 19:48:42 -04:00
Christian Rocha
7530fb0112
Update mouse example to use new Model interface-based structure
2020-10-15 16:33:37 -04:00
Christian Rocha
7507f3d805
Update views example to use new Model interface-based structure
2020-10-15 16:30:34 -04:00
Christian Rocha
816428c135
Add comment for Init() in simple example
2020-10-15 16:19:13 -04:00
Christian Rocha
7af3e0e9de
Update simple example to use new Model interface-based structure
2020-10-15 16:08:42 -04:00
Christian Rocha
71bd542320
Add Treilik-inspired example for sending value along on exit
2020-10-14 16:51:15 -04:00
Christian Rocha
51e97bb959
Add descriptions to example programs and bump deps in examples
2020-10-14 11:51:32 -04:00
Nikhil Prabhu
a588b61db4
Fix incorrect program description comment
...
This commit fixes an incorrect program description comment that is actually used for the /examples/simple/main.go program.
2020-10-14 13:18:20 +00:00
Christian Rocha
9c9a92c349
Add Windows support
2020-10-12 23:14:55 -04:00
Christian Muehlhaeuser
7b645a9910
Remove replace declaration in go.mod for examples
2020-10-13 04:18:07 +02:00
Christian Rocha
5a26d39072
Remove replace declaration in go.mod for examples
2020-10-12 22:11:17 -04:00
Christian Rocha
1dda8ac639
Color and formatting for "views" demo
2020-10-02 20:17:19 -04:00
Christian Rocha
4390b305ef
Update dependencies
2020-10-02 13:19:59 -04:00
Christian Rocha
a4f26594b2
Rename MouseButton type to more accurate MouseEventType
2020-09-28 16:42:39 -04:00
Christian Muehlhaeuser
82e641ef63
go mod tidy
2020-08-22 12:33:48 +02:00
Christian Muehlhaeuser
fdd1007b27
Fix fullscreen example
2020-08-22 12:32:12 +02:00
Christian Rocha
e202d499a5
Cleanup textinputs example
2020-07-30 12:40:37 -04:00
Christian Rocha
43bcbfc84b
Clean up 'views' example
2020-07-30 12:32:24 -04:00
Christian Rocha
a784aa32ca
Bump bubbles in examples and remove NewModel function in pager example
2020-07-29 20:07:26 -04:00
Christian Rocha
6d919a9213
Bump termenv in example
2020-07-29 20:07:26 -04:00
Christian Rocha
fe15629c9a
Bump bubbles dependency in examples
2020-07-23 12:48:22 -04:00
Christian Rocha
97ae9c6974
Update spinner example for Bubbles 0.4.0
2020-07-14 18:31:55 -04:00
Christian Rocha
8d26b4ebd7
Use mouse consts in termenv
2020-06-25 12:42:31 -04:00
Christian Rocha
de147c5061
Add mouse wheel support to pager example
2020-06-23 12:01:23 -04:00
Christian Rocha
d86cb562f0
Add basic mouse support
2020-06-22 20:41:26 -04:00
Christian Rocha
719d246edd
Bump dependencies
2020-06-22 13:54:16 -04:00
Christian Rocha
673752658f
Comments and cleanup
2020-06-22 13:40:32 -04:00
Christian Rocha
468b98d2eb
Comments in the pager example
2020-06-19 13:22:08 -04:00
Christian Rocha
9cf57efe5f
Fix pager footer positioning
2020-06-19 12:29:59 -04:00
Christian Rocha
603eaa27a6
Update pager example to use high performance renderer
2020-06-18 21:09:08 -04:00
Christian Rocha
8e616c4c0c
Just listen for tea.WindowSizeMsg to get terminal dimensions
2020-06-18 13:54:12 -04:00
Christian Rocha
116ab34eb8
Sync pager viewport when starting up and resizing
2020-06-18 12:33:58 -04:00
Christian Rocha
2110a923ab
Use high performance rendering in pager example
2020-06-17 19:43:33 -04:00
Christian Rocha
4d68ed07ef
Add header and footer to pager example
2020-06-17 15:00:13 -04:00
Christian Rocha
217c506a49
Add logging option in simple example
2020-06-16 22:32:06 -04:00
Christian Rocha
87434a2569
Buffer/ticker-based renderer
2020-06-08 12:48:57 -04:00
Christian Rocha
4ce9b4ea83
Fix broken logic in original "views" example
2020-06-05 14:12:02 -04:00
Christian Rocha
e79ee747c9
Fix import in simple example
2020-05-27 14:47:31 -04:00
Christian Rocha
847c8b88a0
Implement resize handling in pager example
2020-05-26 09:53:15 -04:00
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
6ceafa032c
Text input value getter/setter + cursor movement methods
2020-05-20 16:12:14 -04:00
Christian Rocha
25f8b8c99b
Simplify pager component and fix pager example
2020-05-15 16:08:58 -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
b6eeef2127
Pager example
2020-05-11 23:07:45 -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
d503d5dbf6
Every sends the time at which the timer ticked
2020-05-05 14:26:06 -04:00
Christian Rocha
ac67237eab
Add 'Every' subscription for ticking with the system clock
2020-05-05 13:38:46 -04:00
Christian Rocha
b50ee76165
Subs shouldn't take a model as an argument
...
This also nullifies the need for SubMap
2020-05-04 18:52:44 -04:00
Christian Rocha
dada718393
Fix and improve spinner example
2020-05-04 18:33:17 -04:00
Christian Rocha
39ec5b5233
Bump termenv with fix for redraws on mosh, konsole
2020-04-30 19:29:59 -04:00
Christian Rocha
f93b752fcc
Remove ErrMsg and ModelAssertionErr
2020-04-22 11:00:30 -04:00
Christian Rocha
4351c9f903
Cmds no longer takes a Model as an argument, CmdMap no longer needed
2020-04-22 10:15:04 -04:00
Christian Rocha
5612c85b72
Bump termenv for examples
2020-04-22 10:11:31 -04:00
Christian Rocha
82af5a5cb5
Update example modules
2020-02-12 17:48:32 -05:00
Christian Rocha
5b001ee17f
Spinner example
2020-02-10 16:35:29 -05:00
Christian Rocha
2e6babae9e
Add placeholder text to input example
2020-02-01 22:28:31 -05:00
Christian Rocha
5383f5a61e
Wrap termenv altscreen functions to make things simpler for the end user
2020-02-01 21:07:35 -05:00
Christian Rocha
f94701aff3
I think the cursor move to 1,1 is implicit via altscreen
2020-02-01 21:07:35 -05:00
Christian Muehlhaeuser
f382f4db4a
Move ansi helpers to termenv
2020-01-31 13:52:20 +01:00
Christian Rocha
91271cacab
Fill out constants and strings for control keys
2020-01-26 16:46:30 -05:00
Christian Rocha
651b881a02
Update examples to use new subscription model
2020-01-25 21:28:16 -05:00
Christian Rocha
8c9360ec24
Use local copy of Tea when building examples
2020-01-22 16:08:44 -08:00
Christian Rocha
1e39676087
Update example go.mod/sum
2020-01-20 11:07:04 -08:00
Christian Rocha
e1d4a14345
Commands should probably receive the model as an arg, right?
2020-01-20 10:35:03 -08:00
Christian Rocha
5156905c3e
Add HTTP example demonstrating I/O
2020-01-19 19:52:28 -08:00
Christian Rocha
6a0489592f
Programs should take an init type/function as the first argument
...
This is in line with the way Elm works. Also update examples.
2020-01-18 22:22:04 -05:00
Christian Rocha
068c7291fb
Document simple example to hopefully explain how things work
2020-01-18 11:44:28 -05:00
Christian Rocha
768462afb3
Update tea imports in examples
2020-01-18 11:15:55 -05:00
Christian Rocha
1695d9682b
Remove input module (moved to another repo) and update input example
...
The input module is now in github.com/charmbracelet/teaparty/input
2020-01-18 11:04:09 -05:00
Christian Rocha
d976902768
Okay, I think that's how error handling should work
2020-01-18 10:27:02 -05:00
Christian Rocha
4b64a7cbde
Blink cursor
2020-01-17 23:27:54 -05:00
Christian Rocha
d8b3dcd05f
First pass at text input
2020-01-17 22:21:51 -05:00
Christian Rocha
208f421470
Refactor the keybinding stuff + add backspace
2020-01-17 20:46:34 -05:00
Christian Rocha
4f42c502ed
Fullscreen mode via altscreen + fullscreen example
2020-01-17 15:37:04 -05:00
Christian Rocha
c1b4d6a515
Remove an extraneous argument and auto-add a trailing newline to views
2020-01-16 14:47:44 -05:00
Christian Rocha
fe42b5c4a7
Clear necessary lines before rendering
2020-01-15 22:41:45 -05:00
Christian Rocha
c15b863c39
Add simple, minimal example
2020-01-15 16:44:11 -05:00
Christian Rocha
7f3506eedc
Whoops, fix framerate in example so it running at 60fps
2020-01-15 16:06:14 -05:00