Commit Graph

243 Commits

Author SHA1 Message Date
Carlos Alexandro Becker c6cb2b199e
feat(deps): update dependencies (#858)
* feat(deps): update dependencies

* chore(deps): update bubbles to v0.17.1 in examples

---------

Co-authored-by: Christian Rocha <christian@rocha.is>
2024-01-09 17:16:42 -05:00
Christian Rocha be51d73174 Revert "add: Projects & Configs Navigator to Examples"
This reverts commit 62cf473cb1.
2024-01-09 16:37:56 -05:00
Christian Rocha 26b9cbf8e5 Revert "edit: GIF URL"
This reverts commit 8956342094.
2024-01-09 16:37:56 -05:00
Pheon-Dev 8956342094 edit: GIF URL 2024-01-09 16:37:12 -05:00
Pheon-Dev 62cf473cb1 add: Projects & Configs Navigator to Examples 2024-01-09 16:37:12 -05:00
Maas Lalani 705292761d
chore: cleanup autocomplete example (#892) 2024-01-08 12:05:38 -05:00
Christian Rocha b6695477b4 chore(examples): bump the bubbles dep in the examples to v0.17.0
Closes #882
2023-12-13 12:42:12 -05:00
Ayman Bagabas a154847611
feat: extended Coordinates mouse reporting & additional buttons support (#594)
* feat(mouse): add extended mouse & shift key support

Support SGR(1006) mouse mode
Support parsing shift key press
Support additional mouse buttons
Report which button was released
Report button motion

* fix: key.go sgr len missing calculation (#841)

* chore(test): add sgr mouse msg detect test

---------

Co-authored-by: robinsamuel <96998379+robin-samuel@users.noreply.github.com>
2023-12-04 11:50:59 -05:00
Ayman Bagabas 2bcb0af2e2
feat: add set-window-title command (#611)
Set the terminal window title using termenv.

Fixes: https://github.com/charmbracelet/bubbletea/issues/610
2023-12-04 11:50:27 -05:00
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
Maas Lalani bf2ffaf840
chore: remove examples/mouse/README.md 2023-08-28 10:07:18 -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
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
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
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 26dc0b5b32
chore(deps): bump bubbles to v0.16.1 2023-05-31 14:08:34 -04: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
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
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
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
muesli 248eb83001 chore: go mod tidy tutorials and examples 2023-03-16 10:09:43 +00:00
Christian Muehlhaeuser 35c31f2168 chore: bump console dep 2023-03-13 18:09:44 +01:00
Maas Lalani 90c9124b0a
Filepicker Example (#683)
* feat: filepicker example

* fix: use new API

* docs(examples): update file selection comment in filepicker example

* chore: bump bubbles

---------

Co-authored-by: Christian Rocha <christian@rocha.is>
2023-03-06 11:54:26 -05:00
dependabot[bot] 388c67d573
feat(deps): bump golang.org/x/text from 0.3.7 to 0.3.8 (#674) 2023-02-23 16:29:25 +00:00
Ayman Bagabas c61e4fd291
chore: update deps
Fixes: CVE-2022-27664 https://github.com/advisories/GHSA-69cg-p879-7622
2023-02-21 12:43:58 -05:00
Glenn Gonda 4880cf2a09 docs: fix typos and clean up comments 2023-02-19 08:45:22 -05:00
Christian Rocha 1ad9f9c15c chore(deps): bump termenv and go-isatty
Also bump various deps in tutorials and examples
2023-02-08 10:04:56 -05:00
dependabot[bot] b30cca3906 chore(deps): bump github.com/muesli/termenv in /examples
Bumps [github.com/muesli/termenv](https://github.com/muesli/termenv) from 0.13.0 to 0.14.0.
- [Release notes](https://github.com/muesli/termenv/releases)
- [Commits](https://github.com/muesli/termenv/compare/v0.13.0...v0.14.0)

---
updated-dependencies:
- dependency-name: github.com/muesli/termenv
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-08 09:36:45 -05:00
Christoffer Åström e95e1a0db5 feat: `sequence` support `BatchMsg` 2023-02-07 10:06:46 -05:00
dependabot[bot] ede4aec24e chore(deps): bump github.com/mattn/go-isatty in /examples
Bumps [github.com/mattn/go-isatty](https://github.com/mattn/go-isatty) from 0.0.16 to 0.0.17.
- [Release notes](https://github.com/mattn/go-isatty/releases)
- [Commits](https://github.com/mattn/go-isatty/compare/v0.0.16...v0.0.17)

---
updated-dependencies:
- dependency-name: github.com/mattn/go-isatty
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-03 17:46:19 +01:00
Christian Rocha 3765727e65
docs(examples): add cellbuffer + harmonica example (#409) 2022-12-12 09:52:00 -05:00
Austin Vazquez e079831c31 Remove references to io/ioutil package
Package io/ioutil has been marked deprecated starting in Go 1.16.

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2022-11-10 13:51:29 +01:00
dependabot[bot] 7ba62d4987 chore(deps): bump github.com/charmbracelet/glamour in /examples
Bumps [github.com/charmbracelet/glamour](https://github.com/charmbracelet/glamour) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/charmbracelet/glamour/releases)
- [Commits](https://github.com/charmbracelet/glamour/compare/v0.5.0...v0.6.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-10 13:50:14 +01:00
Martin Dosch 2d10416631 [codespell]: Fix typos. 2022-11-03 12:55:31 -04:00
Josh Soref 4aa9ce489b
docs: fix spelling / various typos (#526) 2022-10-11 14:40:01 +02:00
Christian Muehlhaeuser 6b77c8fc10 chore: rename StartReturningModel to Run
Added aliases for the old functions, but deprecated them.
2022-10-08 01:34:17 +02:00
Christian Muehlhaeuser 22d15efad7 chore: clean up linter errors in examples 2022-10-08 00:56:56 +02:00
Maas Lalani d20732aaea docs: add examples/gifs locally to repository 2022-10-03 15:07:28 -04:00
Maas Lalani 70576bc9e0
examples/README.md GIFs (#470)
* docs(examples): Add `examples/README.md`

Adds `examples/README.md` with GIFs of examples

* docs(examples): Individual READMEs

* docs(examples): add short description to each example
2022-10-03 12:06:18 -04:00
Matt Joiner d79ebda5cf
Fixes for examples/progress-download (#444) 2022-09-27 06:42:43 +02:00
Scott Leggett 900a842f50 fix: off-by-one error in spinner example 2022-09-27 05:53:21 +02:00
Christian Muehlhaeuser 6c449e55bf feat: use Termenv.Output to write to tty 2022-09-27 02:49:36 +02:00
Maas Lalani e5cbc04f94 docs: use styled glamour markdown within viewport 2022-09-23 16:46:56 -04:00