495 Commits
Author SHA1 Message Date
Ayman BagabasandGitHub cb09c4cf6e chore: merge pull request #558 from charmbracelet/beta-update
Update Beta Branch
2024-07-18 10:02:14 -04:00
Christian Rocha 1f980e08c0 chore: merge branch 'master' into beta-update 2024-07-17 19:42:03 -04:00
Christian Rocha a9344b5953 chore(textarea): lift an if condition into a parent loop 2024-07-17 09:26:38 -04:00
Christian Rocha c30c185b93 feat(textarea): end of buffer lines span the full block
This is for styling purposes, particularly when you want to apply
a background to the entire textarea.
2024-07-17 09:26:38 -04:00
Christian Rocha 95d338b099 feat(textarea): dynamically determine line number integer padding 2024-07-17 09:26:38 -04:00
Christian Rocha 1a3627eb98 feat(textarea): inherit styles from base (and elsewhere)
This reduces the amount of styling needed for what's likely more common
use cases, such as using Styles.Base to apply a background color to the
entire field.
2024-07-17 09:26:38 -04:00
bashbunniandGitHub bd3a206c13 fix: make DefaultDelegate satisfy ItemDelegate interface (#541) 2024-07-08 12:59:40 -07:00
Christian Rocha 64a67d1670 chore: update CODEOWNERS 2024-06-18 16:15:15 -04:00
Gabriel FuandGitHub 36baf3d64e Update table.go (#539) 2024-06-18 11:45:04 -04:00
Florian ReyandChristian Rocha c3e07c9b36 fix: progress default spring option 2024-06-17 09:03:35 -04:00
Ayman Bagabas adab1903b6 Merge branch 'master' into beta 2024-06-05 11:53:51 -04:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
0b15a9fad1 feat(deps): bump github.com/charmbracelet/bubbletea (#533)
Bumps [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea) from 0.26.3 to 0.26.4.
- [Release notes](https://github.com/charmbracelet/bubbletea/releases)
- [Commits](https://github.com/charmbracelet/bubbletea/compare/v0.26.3...v0.26.4)

---
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>
2024-05-31 17:02:51 -04:00
Ayman BagabasandGitHub 11a9fccd58 chore: fix lint issues (#534) 2024-05-31 16:48:29 -04:00
Michael LorantandGitHub 296fcf77fa feat(textarea) Add multiline placeholder (#302)
Add the capability to show a multiline placeholder. Some refactoring was
required to improve readability and improve logic.

End of line buffer character was only shown when line numbers were
displayed which requires some verification whether this is the intended
outcome. This change resolves this issue.
2024-05-30 20:28:20 -04:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
bd562f9d85 feat(deps): bump github.com/charmbracelet/x/ansi from 0.1.1 to 0.1.2 (#529)
Bumps [github.com/charmbracelet/x/ansi](https://github.com/charmbracelet/x) from 0.1.1 to 0.1.2.
- [Release notes](https://github.com/charmbracelet/x/releases)
- [Commits](https://github.com/charmbracelet/x/compare/ansi/v0.1.1...ansi/v0.1.2)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/x/ansi
  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>
2024-05-28 13:38:11 -04:00
Ayman Bagabas 12ae3c128e chore: upgrade deps 2024-05-28 13:30:05 -04:00
Garrett MartinandGitHub 620ca7dfa9 fix: default textarea EndOfBufferCharacter should be ' ' (#510) 2024-05-23 17:37:59 -04:00
Gabe CookandChristian Rocha 613d1cb46e fix(help): Fix help bubble not centering correctly 2024-05-23 16:50:38 -04:00
Ayman Bagabas 5b33bdbff6 chore: upgrade dependencies 2024-05-23 15:21:20 -04:00
Ayman BagabasandGitHub e1ea5dc528 refactor: switch to x/ansi for text manipulation (#505)
Need to be consistent with Lipgloss and https://github.com/charmbracelet/lipgloss/pull/279
2024-05-23 15:13:44 -04:00
Ayman Bagabas 3e827603f3 chore: upgrade dependencies 2024-05-23 15:01:52 -04:00
Ayman Bagabas 14a62710fc fix(textarea): use x/ansi to strip ansi sequences 2024-05-23 15:01:44 -04:00
Ayman Bagabas e84ce79497 chore(ci): enable gofumpt 2024-05-22 11:49:10 -04:00
Ayman Bagabas 815f47433b chore: update deps 2024-05-15 16:20:12 -04:00
Carlos Alexandro Becker 50b0bb0f3b docs: fix typo
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-05-14 22:21:14 -03:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3b92457170 feat(deps): bump github.com/charmbracelet/bubbletea (#525)
Bumps [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea) from 0.25.0 to 0.26.2.
- [Release notes](https://github.com/charmbracelet/bubbletea/releases)
- [Commits](https://github.com/charmbracelet/bubbletea/compare/v0.25.0...v0.26.2)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-14 22:18:47 -03:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3ec7fd4fe4 chore(deps): bump golangci/golangci-lint-action from 5 to 6 (#522)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 5 to 6.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-14 22:18:12 -03:00
Ayman Bagabas 74118858e1 fix(cursor): revert ctx change 2024-05-14 16:13:35 -04:00
Ayman Bagabas 4491293fd1 chore: update deps 2024-05-14 13:24:44 -04:00
Ayman Bagabas c87a626aa3 chore: update deps 2024-05-14 13:22:35 -04:00
Ayman Bagabas 37cf1dd8cd chore: update deps 2024-05-14 12:54:35 -04:00
Ayman Bagabas dab412b45a chore: update deps 2024-05-13 16:56:29 -04:00
Ayman Bagabas 56c40cbccc fix: use background ctx 2024-05-13 16:32:35 -04:00
Ayman Bagabas d115a6d4d6 chore: conform to the proposed bubble tea API 2024-05-13 14:39:34 -04:00
Ayman Bagabas f4f674440a Merge branch 'master' into term/input 2024-05-13 13:15:22 -04:00
Ayman Bagabas de54be6e06 chore: use lipgloss@proposal-v2-exp 2024-05-13 13:14:49 -04:00
Christian Rocha 65933b4ef6 chore(lint): drop deprecated 'ifshort' linter directive 2024-05-08 14:02:15 -04:00
Christian RochaandGitHub de18ed2891 chore(readme): add kevm/bubbleo to 'additional bubbles' 2024-05-08 12:21:36 -04:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
c6bfeb0e6c chore(deps): bump golangci/golangci-lint-action from 4 to 5 (#514)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 4 to 5.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-01 10:26:29 -04:00
Maas Lalani 68a68a472d fix(table): inherit SelectedStyle for StyleFunc 2024-04-24 13:50:10 -04:00
Kevin MillerandMaas Lalani 04658fed8e Add support fo style func to table bubble 2024-04-24 13:37:52 -04:00
Ayman Bagabas 075dd25792 refactor!: use term/input
feat: update bubbletea & term/input

refactor!: use term/input for input handling

Reference: https://github.com/charmbracelet/x/tree/main/exp/term
2024-04-22 16:24:27 -04:00
Kevin MillerandMaas Lalani 63b0917193 fix textinput.CurrentSuggestion() panic
When suggestions are not yet set CurrentSuggestion() will panic. This change fixes that with a guard and returns an empty string when there is no current suggestion.
2024-04-22 14:20:02 -04:00
Michael LorantandMaas Lalani 48dffdd97e refactor(textarea): Improve setting width
When setting the width of the textarea there were some issues
preventing this from working correctly. These problems included:

- If the maximum width needed to be used, the width of the textarea did
  not take into account the prompt and line number width.
- The viewport width did not take into account the style width.

The entire function was confusing to understand and a refactor was
warranted.

As part of this refactor, the bugs mentioned above were fixed and the
code was simplified.

To verify that the logic works as expected, unit tests were expanded to
validate that setting the width works as expected.

Signed-off-by: Michael Lorant <michael.lorant@nine.com.au>
2024-04-06 01:37:46 -04:00
9030d22eec feat(textinput): do not block input on validation (#185)
* feat(textinput): do not block input on validation

This PR builds upon the excellent work in #167 and #114 and makes a
breaking change to the validation API.

Currently, validation will completely block text input if the Validate
function returns an error. This is now changed so the function no longer
blocks input if this is the case, thus handing this responsibility to
the clients.

This is helpful for cases where the user is requested to type an
existing system path, and the Validate function keeps asserting the
existence of the path. With the current implementation such a validation
is not possible.

For example:

    > /
    Err: nil

    > /t
    Err: /t: No such file or directory

    > /tm
    Err: /tm: No such file or directory

    > /tmp
    Err: nil

* fix: change name

---------

Co-authored-by: Maas Lalani <maas@lalani.dev>
2024-03-13 21:22:49 -04:00
bashbunniandGitHub 2b22d5293f docs: update custom bubbles requirements (#495) 2024-03-13 13:21:30 -07:00
David ZeleniakandGitHub e726cbfb5c fix(table): table scrolls before selected reaches top/bottom (#429)
* Fix bug in moving up in table

* fix

* Fix table viewport scroll down too early
2024-03-13 14:39:10 -04:00
6dbfc8284d fix(table): substract headers Y size from the total table size (#434)
* fix(table): substract headers Y size from the total table size

* fix: change GetFrameSize to GetVerticalFrameSize and calc header height

* fix: remove GetVerticalFrameSize at all

* fix: account for headers in height WithHeight, SetHeight

---------

Co-authored-by: Maas Lalani <maas@lalani.dev>
2024-03-13 14:31:42 -04:00
Moritz BieringandChristian Rocha 961c081347 Fix division by zero in viewport scrollpercentage calculation 2024-03-11 09:32:23 -04:00
Michael LorantandGitHub b9e62cbfe1 Improve textarea tests (#490) 2024-03-08 19:23:05 -05:00