* doc(textarea): add border to focused textarea in split-editors example
* doc(textrea): tone down with border color in split-editors example
Co-authored-by: Christian Rocha <christian@rocha.is>
* chore: bump bubbles@master
* doc(textarea): Add example of `chat` application with textarea
* doc(textarea): Add example of `textarea` prompting the user to tell a story
* doc(textarea): Add example of `split-editors` on how to manage multiple textareas
* feat: update cancelreader
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: go mod tidy
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: go mod tidy
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: use stable
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* merge Adjective-Object/tea_log_renderer into standard renderer
* rename queuedMessages -> queuedMessageLines & break apart strings during message processing
* delete cursorDownBy
* += 1 -> ++ to make the linter happy
* add skipLines[] tracking back to standard renderer, and add rename skippedLines local to jumpedLines to clarify they are separate comments
* request repaint when a message is recieved
* Convert Println and Printf to commands
* Add package manager example demonstrating tea.Printf
* Use Unix instead of UnixMicro for Go 1.13 support in CI
* fix off by one in std renderer
* add Printf/Println to tea.go
* revert attempt at sequence compression + cursorUpBy
Co-authored-by: Maxwell Huang-Hobbs <mahuangh@microsoft.com>
Co-authored-by: Christian Rocha <christian@rocha.is>
* feat: add OSExec helper function for running exec.Cmds
* chore: for now, un-expose WrapExecCommand
* chore: move exec struff into its own file
* chore(exec): better name for Exec func that wraps exec.Cmd (thanks, @toby)
* add: program.ReleaseTerminal and RestoreTerminal to re-use input & terminal
* chore(examples): add altscreen toggling to exec demo
* chore: put low-level altscreen stuff alongside other screen funcs
* docs: edit GoDocs for ReleaseTerminal and RestoreTerminal
* feat(renderer): add internal Msg renderMsg to immediately repaint
* fix: repaint instantly on RestoreTerminal
* fix: restore the altscreen state when restoring the terminal
* feat: implement Cmd-based API for blocking *exec.Cmds
* feat: allow Exec to return custom messages
* feat: allow Exec to be run without a callback
* fix: separate parameters for exec.Command examples
* fix: error message would get printed over by prompt in exec example
* fix: ignore signals while child process is running
* feat: allow to execute other things besides exec.Commands (#280)
* feat: allow to execute other things besides exec.Commands.
* fix: lint issues
* fix: renames, examples
* fix: callback type should be exported
* docs(exce): tiny ExecCommand doc comment correction
* chore(exec): break out Cmd for clarity's sake in example
* fix(exec): give the terminal a moment to catch up if exiting altscreen
* docs(exec): tidy up doc comments
* chore(exec): disambiguate methods for restoring the terminal state vs input
Co-authored-by: Christian Rocha <christian@rocha.is>
Co-authored-by: Carlos A Becker <caarlos0@gmail.com>
* feat: update x/sys
current version breaks builds for windows/arm64
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: examples go.sum
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: tutorials go.sum
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
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".
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.
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.
* Add commands EnterAltScreen and ExitAltScreen for toggling the altscreen
* Add altscreen toggling example
* ignore .idea
Co-authored-by: Christian Rocha <christian@rocha.is>
The Nil Renderer essentially disables the Bubble Tea renderer sending
loggings and print statements to stdout. It can be enabled via the
ProgramOption WithoutRenderer.