Commit Graph

667 Commits

Author SHA1 Message Date
Maas Lalani 0a0182e55a
chore: Bump bubbles to v0.13.0 (#363) 2022-07-08 10:08:24 -04:00
Maas Lalani 27e356a779
Add border to split-editors example (#362)
* 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>
2022-07-05 14:31:32 -04:00
Christian Rocha a0680f8d85
Find a way to talk about Zeichenorientierte Benutzerschnittstelle (#122)
* Find a way to talk about Zeichenorientierte Benutzerschnittstelle

* Pluralization attempt
2022-07-01 22:17:02 -07:00
Maas Lalani 642d26a793
doc: Add `textarea` examples (#357)
* 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
2022-07-01 12:20:04 -04:00
Maas Lalani db4f6474c9
doc: Fix `Printf` typo (#358) 2022-06-28 15:34:22 -04:00
Carlos Alexandro Becker ca32c4c628
feat: update cancelreader (#353)
* 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>
2022-06-23 09:19:36 -03:00
Max ebabec7008
feat: print unmanaged output above the application (#249)
* 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>
2022-06-22 12:53:02 -04:00
bashbunni a2d0ac9d38
docs: add another progress bar example (#270)
* docs: add another progress bar example

* chore: copy edits

Co-authored-by: Christian Rocha <christian@rocha.is>
2022-06-15 11:55:47 -07:00
Maas Lalani d56d8ae854
Example: Credit Card Input Form (#338)
* feat(cc): Add Credit Card Input Form Example and `ValidatorFuncs` to ensure credit cards are valid
2022-06-13 09:39:01 -04:00
Christian Muehlhaeuser 21de41ac02 docs: fix deprecation notes 2022-06-08 15:02:12 +02:00
Christian Muehlhaeuser f27dfb52af fix: add tutorials dir to dependabot config 2022-06-08 14:37:53 +02:00
Maas Lalani af11a3b134 docs: rename gh-prs to gh-dash 2022-06-08 14:30:13 +02:00
João Pedro Magalhães 285d59bd47 docs: add gh-b to readme 2022-06-08 14:30:13 +02:00
Christian Muehlhaeuser e6dabb3c36 fix: handle batched key msgs 2022-06-08 14:03:28 +02:00
Georgi Dimitrov 958dc20024 fix: race condition on repaint with alt screen
I didn't realise at the time, but the tea.Program and the renderer share
the mutex. This make the code difficult to reason about - it turns out
the program sometimes acquires the lock and then calls the
`setAltScreen` method of the renderer which in turns calls `repaint`.
That causes a deadlock as `repaint` is trying to acquire the lock too.
2022-06-07 06:47:46 +02:00
Georgi Dimitrov 50a8461fbf fix: race condition on repaint 2022-06-04 15:35:59 +02:00
Christian Muehlhaeuser b237b7fbec test: fix error in custom input test 2022-06-04 15:21:08 +02:00
Christian Muehlhaeuser 4c9117df96 ci: run tests on all platforms 2022-06-04 15:20:28 +02:00
Carlos Alexandro Becker b566614c16
docs: default to vim if no EDITOR on exec example (#325)
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-06-02 15:12:31 -03:00
Christian Rocha 04d68b8e3e chore(examples): bump bubbles dependency 2022-06-01 18:47:09 -07:00
Christian Rocha 775dbfbeff
chore(exec): small API edits (#323)
* 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)
2022-06-01 17:12:21 -07:00
Carlos Alexandro Becker 97050569c9
docs: improve godoc on tick and every (#320)
* docs: improve godoc on tick and every

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* docs: small improvements

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* docs: add loop examples for Tick/Every in GoDocs

* docs: small wording adjustments

* docs: small copy edits

Co-authored-by: Christian Rocha <christian@rocha.is>
2022-05-29 21:40:57 -03:00
Carlos A Becker a5f28a3a04 docs: fixed mentions to exec.Command
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-05-16 16:46:27 +00:00
Christian Rocha d301ee0405
change(keys): spacebar sends a `KeySpace` (#315)
* Revert "fix: update tests for space input"

This reverts commit bfb166822e.

* Revert "feat: obliterate type KeySpace"

This reverts commit d3fb1b707a.
2022-05-13 13:24:16 -04:00
Christian Rocha bfb166822e fix: update tests for space input 2022-05-10 16:56:37 -04:00
Christian Rocha d3fb1b707a feat: obliterate type KeySpace
Treating a space differently from other runes was proving to cause more
confusion that clarity.
2022-05-10 16:56:37 -04:00
Christian Rocha 48cdc1e6c3
feat(keys): add support for shift/ctrl + arrow keys (#292)
* feat(keys): add support for shift/ctrl+arrow keys

* chore(keys): use sequences for shift/ctrl arrow keys

* feat(keys): support ctrl+shift+arrow keys

* chore(keys): use sequences for alt+arrows

* feat(keys): add support for arrow key combinations with alt modifiers

* fix(keys): remove an extreaneous check

* feat(keys): add support for urxvt arrow keys with modfiers

* feat(keys): add support for arrow keys in DECCKM mode

* docs(keys): expand on comment about ctrl+backtick

* chore(keys): migrate various bindings to sequences

* Minor comment improvements to the input parser

Co-authored-by: Bwahharharrr <yitang@tutanota.com>
2022-05-10 16:16:33 -04:00
bashbunni 14e58aa1f9
fix(keys): spacebar now sends a `KeySpace` (#289)
* fix: replace keySP with working KeySpace

* test: update test to meet new reqs

* fix: fix test looking for 'space'

* fix(keys): set type to KeySpace when sending a space

* docs(keys): comments

Co-authored-by: Christian Rocha <christian@rocha.is>
2022-04-12 11:14:35 -04:00
Christian Muehlhaeuser 3795c036c4
add: Exec, ReleaseTerminal and RestoreTerminal to re-use input and terminal (#237)
* 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>
2022-04-12 10:23:10 -04:00
dependabot[bot] ecba57e455 chore(deps): bump actions/setup-go from 2 to 3
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2 to 3.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-11 12:02:29 +02:00
Christian Muehlhaeuser 515ef02733 Move cancelreader into a separate package 2022-04-05 20:41:21 +02:00
Jared Walters 6b687e3257 docs: remove redundant 'of' 2022-04-03 16:08:36 -04:00
Christian Rocha 9a1310846c docs: Program#Send, Program#Quit, and Program#Kill no longer provisional 2022-03-31 14:38:13 -04:00
Christian Rocha 5c76027b36
feat: add support for function keys 2022-03-21 09:48:05 -04:00
Christian Rocha 442b8cde78 fix: use more bulletproof GetFrameSize() list examples 2022-03-17 16:33:21 -04:00
Christian Muehlhaeuser f80f0b1003 Fix typos in root README.md 2022-03-12 02:17:12 +01:00
Imran H 9bfdb9fb3f
Fix typos in README.md (#254) 2022-03-12 02:08:33 +01:00
dependabot[bot] 00e1e06468 chore(deps): bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-02 10:22:44 +01:00
Christopher Stingl a57af578f0 fix: minor `tea.Cmd` tutorial syntax typo
`errMsg(err)` -> `errMsg{err}`

Just noticed this while reading over the tutorial docs and figured I'd throw up a quick PR to address it.

Really enjoying the tooling so far, thank you for creating it!
2022-02-28 17:20:49 -05:00
Christian Rocha 3b83e703b5 docs: restore fm to its rightful place in the README 2022-02-25 15:16:16 -05:00
Christian Rocha a4ac134e0f docs: add delve instructions 2022-02-25 14:41:27 -05:00
Christian Rocha feeffca0a5 docs: add mergestat, portal, redis-viewer, Soft Serve to in-the-wild 2022-02-25 14:41:27 -05:00
Christian Rocha 572751ab24 docs: alphebetize in-the-wild-section 2022-02-25 14:41:27 -05:00
Roey Darwish Dror e81f6a0552 Add IDNT to Bubble Tea in the Wild 2022-02-25 14:05:01 -05:00
Christian Muehlhaeuser b12cdc3c28 ci: update golangci-lint-action to v3 2022-02-25 08:07:50 +01:00
Carlos Alexandro Becker 62259b72e5
feat: update x/sys (#235)
* 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>
2022-02-19 16:25:49 -03:00
dependabot[bot] c9bb51796d chore(deps): bump github.com/charmbracelet/bubbles in /examples
Bumps [github.com/charmbracelet/bubbles](https://github.com/charmbracelet/bubbles) from 0.10.2 to 0.10.3.
- [Release notes](https://github.com/charmbracelet/bubbles/releases)
- [Commits](https://github.com/charmbracelet/bubbles/compare/v0.10.2...v0.10.3)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/bubbles
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-17 07:41:26 -05:00
Christian Rocha 7241e910ec Bump containerd/console 2022-02-15 10:02:56 -05:00
Christian Muehlhaeuser 4d1d1ee021 chore: bump lipgloss and termenv 2022-02-14 23:20:51 +01:00
Christian Muehlhaeuser 2296184dc5 fix: don't check terminal size if we're not writing to a terminal 2022-02-14 17:00:40 -05:00