Commit Graph
428 Commits
Author SHA1 Message Date
Christian Muehlhaeuser 85ef97fac6 Proposal: make renderer optional 2024-02-21 15:26:52 +01:00
Christian Muehlhaeuser 99593d6630 Proposal: provide tea.Context when initializing bubbles
This is a breaking API change as it changes the bubbles API.
2024-02-21 13:02:05 +01:00
Carlos Alexandro BeckerandGitHub eed309fb7d docs: fix list delegate et al links (#467) 2024-02-06 09:36:31 -05:00
Randall WinkhartandChristian Rocha 350d5e99d9 Rename WithCustomFillCharacters to WithFillCharacters 2024-02-06 09:06:12 -05:00
Randall WinkhartandChristian Rocha 7fe39190c8 feat(progress): make full/empty fill characters configurable 2024-02-06 09:06:12 -05:00
79cc9621d5 fix(textinput): out of range panic if no matched suggestions (#473)
* fix(textinput): out of range panic if no matched suggestions

* fix(textinput): out of bounds check

Co-authored-by: Maas Lalani <maas@lalani.dev>

---------

Co-authored-by: Maas Lalani <maas@lalani.dev>
2024-02-02 16:02:24 -05:00
Maas Lalani 364eac96a8 feat: remove space for filesize v0.18.0 2024-01-31 11:28:54 -05:00
dependabot[bot]andMaas Lalani a2e290966a feat(deps): bump github.com/rivo/uniseg from 0.4.4 to 0.4.6
Bumps [github.com/rivo/uniseg](https://github.com/rivo/uniseg) from 0.4.4 to 0.4.6.
- [Release notes](https://github.com/rivo/uniseg/releases)
- [Commits](https://github.com/rivo/uniseg/compare/v0.4.4...v0.4.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-30 10:44:18 -05:00
Maas Lalani 07e7bd4ee4 feat(filepicker): optional file permissions and file size 2024-01-29 17:13:36 -05:00
Maas Lalani 034ee8551e fix(filepicker): push / pop views 2024-01-29 15:59:11 -05:00
Maas Lalani 01d22a0ab1 fix(filepicker): height calculations 2024-01-29 15:00:43 -05:00
Christian MuehlhaeuserandMaas Lalani d98bf9db0a fix(textarea): correctly trim incoming paste 2024-01-28 12:11:46 -05:00
Maas Lalani fc18779a6a feat: add OnFirstPage method for consistency 2024-01-25 11:17:25 -05:00
Maas Lalani 6399027ab7 perf(textinput): use uniseg.StringWidth 2024-01-22 15:37:12 -05:00
6fe92f94b5 perf(textarea): implement wrapping memoization
* Improve textarea performance by caching the wrap results

* Add memoization utility

* Fix failing github jobs due to requirement for 1.18

* Address linting issues

* Fix redundant docstrings

* fix: minor changes to memoization

* fix: soft-wrapped hidden line numbers

* perf: switch to `uniseg.StringWidth`

---------

Co-authored-by: Maas Lalani <maas@lalani.dev>
2024-01-22 13:30:34 -05:00
naglisandMaas Lalani ec883029c8 refactor(textinput): reduce allocations
As the number of items in `suggestions` and `m.suggestions` is known,
we can use `make` with the expected size instead of appending, which
requires more allocations as the slice grows.
2024-01-08 12:07:49 -05:00
Ivan ValdesandMaas Lalani 1ba1200c31 fix(viewport): pad width to contentWidth 2024-01-08 11:43:20 -05:00
f36aa3c4b5 fix(textinput): Placeholder No Longer Changes Width + Paste Calculation (#451)
* Fix pasting calculations

Available length calculation now correctly trims pasted text.

* fix(textInput): Width padding added when placeholder is used

When `placeholder` is set, padding from `Width` was not added within the `placeholderView()` function.

* Adding missing 'm.'

* Maintain Width no matter placeholder size delta

* Fixed Math

* Added Comments

* fix: lint

---------

Co-authored-by: Donovan Hubbard <37090676+donovanhubbard@users.noreply.github.com>
Co-authored-by: Maas Lalani <maas@lalani.dev>
2023-12-23 16:02:26 -05:00
Maas LalaniandGitHub fc50558f4b Revert "fix: truncate textinput placeholder (#442)" (#450)
This reverts commit 9a0ff2ba4d.
2023-12-23 13:57:42 -05:00
9a0ff2ba4d fix: truncate textinput placeholder (#442)
Co-authored-by: Sean Banko <seanbanko@Seans-MacBook-Air.local>
2023-12-21 23:14:53 -05:00
dependabot[bot]andAyman Bagabas 15ea7f3754 chore(deps): bump actions/setup-go from 4 to 5
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v4...v5)

---
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>
v0.17.1
2023-12-13 10:38:31 -08:00
Ayman Bagabas 330dd3fa5d feat: upgrade bubbletea and remove deprecated code
Supersedes: https://github.com/charmbracelet/bubbles/pull/447
2023-12-13 10:37:00 -08:00
dependabot[bot]andGitHub 167e9067bc feat(deps): bump github.com/charmbracelet/lipgloss from 0.7.1 to 0.9.1 (#424) v0.17.0 2023-10-13 12:32:27 +00:00
lc-1010andChristian Rocha f53b3d9f61 fix: Unicode character encoding error 2023-09-28 10:29:30 -04:00
dependabot[bot]andGitHub 540c8ac803 chore(deps): bump actions/checkout from 3 to 4 (#416) 2023-09-05 11:58:27 +00:00
eda891258c Support suggestions and autocompletion in textinput (#407)
* migrate all autocomplete-work from old branch

* added support for multiple suggestions

* fix linter issues

* refactored to only offer matching suggestions for completion

* fix: SetSuggestions + Suggestions

* make: configuration behaviour configurable

* fix for double-width runes

* refactored all suggestions to be rune-arrays

also: accepting suggestions does not overwrite the already given input, rather appends

* fix: make suggestions and OnAcceptSuggestions unexported

* refactor: refreshingMatchingSuggestions -> updateSuggestions

---------

Co-authored-by: Maas Lalani <maas@lalani.dev>
2023-08-21 11:26:02 -04:00
naglisandGitHub 95d7be54d9 refactor(list): reduce allocations in filterItems (#396)
As the number of items in `targets` is known, use `make` with the
expected size instead of appending, which requires more allocations as
the `targets` slice grows.
2023-07-25 14:06:33 -07:00
Maas LalaniandGitHub 0bdcc628fb fix(list): No items found. -> No items. (#393) 2023-07-11 14:42:33 -04:00
naglisandGitHub fa8207d8d8 fix(list): typo in doc comment (#391) 2023-07-08 17:10:26 -07:00
dependabot[bot]andGitHub 23b97e3a77 feat(deps): bump github.com/muesli/termenv from 0.15.1 to 0.15.2 (#390) 2023-06-28 00:43:23 +00:00
Carlos Alexandro BeckerandGitHub 7053a7d757 feat(deps): update fuzzy library (#379) 2023-06-14 11:10:57 -03:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
07e6f5ab9d feat(deps): bump github.com/charmbracelet/bubbletea (#383)
Bumps [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea) from 0.24.1 to 0.24.2.
- [Release notes](https://github.com/charmbracelet/bubbletea/releases)
- [Commits](https://github.com/charmbracelet/bubbletea/compare/v0.24.1...v0.24.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-14 10:32:47 -03:00
Yurii RashkovskiiandChristian Rocha fe31dc0a97 Problem: can't determine if the progress bar stopped updating
This would be useful to know to stop displaying it after the user was shown
the progress bar to render to its end.

Solution: expose `IsComplete` method is based on what's been drawn
2023-06-13 12:48:00 -04:00
Christian RochaandGitHub afd7868712 chore: filepicker edits (#382)
* feat(filepicker): ignore messages from other filepicker instances

* feat(filepicker): initialize default styles against a lipgloss renderer

* chore(filepicker): swap global var for function with default keymap
v0.16.1
2023-05-31 14:04:43 -04:00
Maas Lalani 2eaa8e3df9 docs(readme): add file picker 2023-05-31 12:56:56 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Carlos Alexandro Becker
6034e68184 feat(deps): bump github.com/charmbracelet/bubbletea from 0.23.1 to 0.24.0 (#377)
* feat(deps): bump github.com/charmbracelet/bubbletea

Bumps [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea) from 0.23.1 to 0.24.0.
- [Release notes](https://github.com/charmbracelet/bubbletea/releases)
- [Commits](https://github.com/charmbracelet/bubbletea/compare/v0.23.1...v0.24.0)

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

Signed-off-by: dependabot[bot] <support@github.com>

* feat: go 1.17

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

* feat(deps): bubbleta v0.24.1

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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
v0.16.0
2023-05-25 10:35:59 -03:00
bashbunniandGitHub 25414a8c48 docs: add issue template (#367)
* docs: add issue template

* chore(template): add locale
2023-05-23 11:57:35 -07:00
remiposoandGitHub 9266653c39 Reset blink only when CursorBlink (#378) 2023-05-13 12:56:18 -04:00
Ayman Bagabas 39f4eeae2c fix(ci): remove soft-serve workflow 2023-05-12 14:14:41 -04:00
Carlos Alexandro Becker 7de306a57b docs: update license
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-11 12:37:25 +00:00
Christian Rocha e9dfea975f feat(spinner): periods of ellipsis
Handy for animating the three periods after a string, i.e. "Loading..."
2023-05-05 14:15:12 -04:00
Raphael 'kena' PossandMaas Lalani afb975b469 feat(textarea): make max width/height configurable 2023-05-01 13:06:34 -04:00
Maas Lalani dc58240609 chore(lint): help msg unused param 2023-05-01 12:56:08 -04:00
Carlos Alexandro BeckerandMaas Lalani 7590e13c2a fix: filepicker on empty directory
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-01 09:58:44 -04:00
Kirn KimandMaas Lalani 9bfe8185f1 fix: line freeze on dir open + var typo 2023-04-28 14:08:34 -04:00
Kirn KimandMaas Lalani 325fd48de7 fix: var name typo fix 2023-04-28 14:08:34 -04:00
Kirn KimandMaas Lalani a79567aa2c fix: scroll margain 2023-04-28 14:08:34 -04:00
Maas Lalani ab1f7134e4 fix: deprecate CursorStyle in favour of Cursor.Style 2023-04-08 14:19:53 -04:00
Maas Lalani 8865e0675a feat: add AllowedTypes to file picker to prevent selecting certain files 2023-04-05 13:17:50 -04:00
bashbunniandGitHub 1de5816ab4 docs(list): add FAQ (#359) 2023-03-24 11:57:13 -07:00