Commit Graph

774 Commits

Author SHA1 Message Date
dependabot[bot] 6d07f4a410
chore(deps): bump golang.org/x/net from 0.7.0 to 0.17.0 in /examples (#840) 2023-10-13 12:37:21 +00:00
dependabot[bot] 365895d05d
chore(deps): bump github.com/charmbracelet/lipgloss in /examples (#842) 2023-10-13 12:32:22 +00:00
William Poussier 99d7d4bd17 docs(README): add wI2L/scrabbler to Bubble Tea in the Wild 2023-10-02 10:01:05 -04:00
David Dworken afcf498336 chore(docs): Add hiSHtory to Bubble Tea in the Wild 2023-09-23 21:10:13 -04:00
dependabot[bot] d55cfec13e
chore(deps): bump actions/checkout from 3 to 4 (#820) 2023-09-06 17:24:42 +00:00
Maas Lalani bf2ffaf840
chore: remove examples/mouse/README.md 2023-08-28 10:07:18 -04:00
Eng Zer Jun 12f405723d
refactor: remove redundant nil check in `flush` (#812)
From the Go docs:

  "If the map is nil, the number of iterations is 0." [1]

Therefore, an additional nil check for before the loop is unnecessary.

[1]: https://go.dev/ref/spec#For_range

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-08-24 09:17:44 -07:00
Christian Rocha b5e2519fea chore(docs): add walk to Bubble Tea in the Wild 2023-08-22 10:33:55 -04:00
Christian Rocha 5506e9a22e
chore: minor UX edits to autocomplete example (#807) 2023-08-21 13:27:53 -04:00
Maas Lalani 1ad127782c
feat(textinput): example for autocompletion with charmbracelet repositories (#803)
* feat: autocompletion with charmbracelet repositories

* chore(deps): bump bubbles
2023-08-21 11:41:38 -04:00
Gabriel Lopes f6f65aef20
Add storydb to 'Bubble Tea in the Wild' section (#804) 2023-08-21 11:28:06 -04:00
naglis 91dd120073 docs: fix `WithFPS` godoc 2023-07-24 12:37:31 -04:00
Christian Rocha c4c83ba757 chore: restrict logfile permissions to owner-only 2023-07-10 09:04:25 -04:00
Christian Rocha c284acad9f chore(lint): extract a magic number when parsing X10 mouse events 2023-07-10 09:04:25 -04:00
Christian Rocha 522659d798 chore(lint): wrap various errors 2023-07-10 09:04:25 -04:00
Christian Rocha ffad6555d5 chore(lint): add various nolint directives, where appropriate 2023-07-10 09:04:25 -04:00
Carlos Alexandro Becker b639c9bab2
Revert "build: group dependabot updates (#773)"
This reverts commit ea7ceb7f38.
2023-07-07 19:17:24 +00:00
Christian Rocha 5bc2504690 chore(lint): wrap various TTY-related errors 2023-07-07 16:30:57 +02:00
Carlos Alexandro Becker ea7ceb7f38
build: group dependabot updates (#773) 2023-07-06 13:42:53 -03:00
Roman Leonenkov c1b0b19d64
fix: index out of range in examples/credit-card-form when ccn is empty (#770) 2023-06-29 19:37:48 -04:00
Carlos Alexandro Becker cd63c32c73
feat(deps): update termenv (#768) 2023-06-28 16:40:08 +02:00
Christian Rocha f75684c986 chore: group handler type and methods together 2023-06-20 07:21:54 -04:00
Raphael 'kena' Poss b1e7f42ab0 fix(key): invert the control loop
Instead of reading messages in an array and then sending them into a
channel, this version of key.go writes to the channel directly.
2023-06-20 12:48:13 +02:00
Christian Rocha ed4f2ec1ca chore: go mod tidy to remove rogue bubbles dep 2023-06-19 19:08:37 -04:00
Raphael 'kena' Poss d9c675138c fix(key),test: simplify the input analysis code 2023-06-15 14:51:02 +02:00
Lukas Bloznelis c0cc6aa1fb
chore(docs): add typioca to Bubble Tea in the Wild (#763) 2023-06-14 10:25:09 -04:00
Carlos Alexandro Becker b80eb8303b
docs: fix lint issues in examples and tutorials (#759)
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-09 13:33:53 -03:00
Carlos Alexandro Becker b2d2ac6504
chore: update example tests, test on ci (#735)
* chore: update example tests, test on ci

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

* fix: mark *.golden as binary

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

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-09 09:17:15 -03:00
tomfeigin f3e1b67605
(feat): Add option to set max FPS (#578)
* (feat): add option for setting FPS on renderer

Co-authored-by: Christian Rocha <christian@rocha.is>
2023-06-06 17:49:11 +02:00
Christian Muehlhaeuser 44f17fa1c0 fix: stop renderer before acquiring renderer mutex 2023-06-05 10:05:38 +02:00
Maas Lalani 444e04bbb3
docs(examples): filepicker AllowedTypes example (#713) 2023-05-31 17:18:24 -04:00
Maas Lalani 8254e0e472
fix(examples/file-picker): use `CurrentDirectory` instead of Path 2023-05-31 14:20:18 -04:00
Maas Lalani 5f7a07b03c
chore(deps): bump bubbles to v0.16.1 2023-05-31 14:08:43 -04:00
Maas Lalani 26dc0b5b32
chore(deps): bump bubbles to v0.16.1 2023-05-31 14:08:34 -04:00
Christian Rocha c267762438
fix(regression): auto-open a TTY when stdin is not a TTY (#746)
The regression was introduced in precisely this revision:
fcc805f3da

Closes #745.
2023-05-24 12:31:00 -04:00
Ayman Bagabas d1a16bd883
fix(ci): remove soft-serve workflow 2023-05-12 14:15:17 -04:00
Carlos Alexandro Becker f5a91f0a59
docs: update license
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-11 12:37:50 +00:00
Carlos Alexandro Becker d9df8c3de6
chore: go mod tidy
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-08 17:47:01 +00:00
Carlos Alexandro Becker 326b0b2df9
chore: updates
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-08 17:46:37 +00:00
Christian Rocha fcc805f3da chore: make input options mutually exclusive 2023-05-05 15:41:46 -04:00
Carlos Alexandro Becker 25022e9789
example: using the x/exp/teatest package (#352)
teatest was originally designed in this PR, and was later moved into `github.com/charmbracelet/x`.

* docs: example test

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

* feat: teatest

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

* fix: improve api

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

* fix: improve api

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

* feat: goldenfiles

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

* chore: minor improvements

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

* feat: type text, diff

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

* fix: release terminal

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

* fix: lint

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

* fix: update cancelreader

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

* fix: make it safe

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

* feat: functional options

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

* feat: IsQuit and IsQuitMsg

* fix: save file

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

* fix: do not use deprecate func

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

* fix: make diff not complain about trailing whitespaces

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

* feat: with term size

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

* feat: RequireRegexOutput

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

* fix: update

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

* chore: rename

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

* fix: improve reliability

* fix: use returned model

* fix: making it more predictable, avoid sleeps

* fix: remove WithRequiredRegexpOutput

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

* fix: allow to assert within interactions

* feat: added wait for

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

* fix: optional

* feat: improve usage

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

* fix: use udiff

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

* feat: tea.Wait

wait for the underlying context to finish.

extract from #352

* fix: merge

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

* fix: wait til the end of shutdown

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

* fix: final output

* feat: use x/exp/teatest

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

* chore: go mod tidy

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

---------

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-05 16:14:26 -03:00
Carlos Alexandro Becker 5326d76c40
feat: allow to disable signals (#721)
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-05-04 16:33:25 -03:00
Carlos Alexandro Becker 9cc3861bab
feat: tea.Wait (#722)
* feat: tea.Wait

wait for the underlying context to finish.

extract from #352

* fix: wait til the end of shutdown

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

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-04 16:30:30 -03:00
Ayman Bagabas 29254a08f1
fix(output): reuse termenv output (#715)
If the passed io.Writer is a termenv.Output, use it instead of creating
a new termenv.Output.
2023-04-26 16:04:14 -04:00
Christian Muehlhaeuser c56884c0e2
feat: add generic event filter (#536)
`WithFilter` lets you supply an event filter that will be invoked
before Bubble Tea processes a `tea.Msg`. The event filter can return
any `tea.Msg` which will then get handled by Bubble Tea instead of
the original event. If the event filter returns nil, the event
will be ignored and Bubble Tea will not process it.

As an example, this could be used to prevent a program from
shutting down if there are unsaved changes.

Based on the fantastic work by @aschey and supersedes #521.

Resolves #472.
2023-04-17 22:02:55 +02:00
bashbunni 8514d90b9e
docs: remove british spelling (#719) 2023-04-11 12:48:34 -07:00
bashbunni 5b809a3da8
docs: update issue templates (#712)
* docs: update issue templates

* add source code instructions
2023-04-06 10:34:23 -07:00
Christian Muehlhaeuser 58c5e01d8c chore: fix linter warnings 2023-04-04 13:27:12 +02:00
Christian Muehlhaeuser 273f59bd11 fix: adapt to lipgloss API change 2023-04-04 13:27:12 +02:00
Christian Muehlhaeuser 6eb0209d13 chore: bump termenv, lipgloss, x/term 2023-04-04 13:27:12 +02:00