Commit Graph

351 Commits

Author SHA1 Message Date
01abdf10c0 обновляет go.mod 2022-11-09 12:15:39 +00:00
d40721ef34 добавляет IsChanged() и ResetWithoutValue() 2022-11-09 11:39:49 +00:00
Adam Bull
fac7a01329
feat(viewport): line count getters (#283) 2022-11-07 10:05:03 -05:00
Christian Muehlhaeuser
0474e129b8 docs: picture tag is causing display issues 2022-10-25 03:23:29 +02:00
Christian Muehlhaeuser
405c3adc42 docs: new readme footer 2022-10-24 10:23:47 +02:00
Raphael 'kena' Poss
85da9addba feat: make the paginator key bindings customizable 2022-10-07 12:49:15 -04:00
Craig Wilson
aea42690e7 fix(help): full help renders fully when width is unset. 2022-10-07 12:36:11 -04:00
Raphael 'kena' Poss
9a48dca003 feat: support key bindings in textinput like textarea 2022-10-07 11:27:19 -04:00
hhe07
b2b7040ccf
fix(textarea): paste (#250) 2022-10-06 15:54:43 -04:00
Maas Lalani
d3aed22a41 Revert "chore: move cursor bubble to internal"
This reverts commit a4ed54327f.
2022-10-06 15:33:16 -04:00
Maas Lalani
d177512114 fix: set value moves cursor only when empty and at starting position 2022-10-06 11:42:29 -04:00
dependabot[bot]
e857875f2a feat(deps): bump github.com/charmbracelet/bubbletea
Bumps [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea) from 0.21.0 to 0.22.1.
- [Release notes](https://github.com/charmbracelet/bubbletea/releases)
- [Commits](https://github.com/charmbracelet/bubbletea/compare/v0.21.0...v0.22.1)

---
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>
2022-09-26 08:26:06 +02:00
dependabot[bot]
f531ca3055 feat(deps): bump github.com/charmbracelet/lipgloss from 0.5.0 to 0.6.0
Bumps [github.com/charmbracelet/lipgloss](https://github.com/charmbracelet/lipgloss) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/charmbracelet/lipgloss/releases)
- [Commits](https://github.com/charmbracelet/lipgloss/compare/v0.5.0...v0.6.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-26 08:22:33 +02:00
dependabot[bot]
ea21e3b359 feat(deps): bump github.com/mattn/go-runewidth from 0.0.13 to 0.0.14
Bumps [github.com/mattn/go-runewidth](https://github.com/mattn/go-runewidth) from 0.0.13 to 0.0.14.
- [Release notes](https://github.com/mattn/go-runewidth/releases)
- [Commits](https://github.com/mattn/go-runewidth/compare/v0.0.13...v0.0.14)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-26 08:19:30 +02:00
dependabot[bot]
f67537dca5 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-09-26 08:16:51 +02:00
dependabot[bot]
b7a4a1cd93 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-09-26 08:16:35 +02:00
Christian Muehlhaeuser
4ae575a4c5 chore: use latest gofmt 2022-09-26 08:13:03 +02:00
Christian Muehlhaeuser
bd074d2dbc ci: add separate sets of hard- and soft-enforced linters 2022-09-26 08:13:03 +02:00
Christian Muehlhaeuser
18909edafc chore: add dependabot config 2022-09-26 08:02:50 +02:00
Tom Payne
72d87e4513
chore: Miscellaneous minor fixes (#243)
* chore: remove internal use of deprecated NewModel

* chore: miscellaneous comment fixes
2022-09-15 10:51:42 -04:00
Maas Lalani
a4ed54327f chore: move cursor bubble to internal 2022-09-14 15:45:51 -04:00
Maas Lalani
a99b55cda1
Delegate Cursor Logic to cursor bubble (#181)
* refactor: remove cursor logic from textinput
* chore: Add Deprecated Fields to avoid breaking changes
* fix: Ctrl+A and typing moves to end bug
2022-09-14 10:44:10 -04:00
Raphael 'kena' Poss
062b257e8c
fix(cursor): apply TextStyle inline (#230)
Co-authored-by: Maas Lalani <maas@lalani.dev>
2022-09-07 16:05:25 -04:00
Maas Lalani
8b3bfee06d docs: add table bubble to README 2022-09-06 13:28:31 -04:00
Maas Lalani
ff77858511 docs: change tea{,party} to bubbletea 2022-09-06 13:28:31 -04:00
Bastian Winkler
13f52d678d fix(table): append headers/columns to zero sized string slice 2022-09-02 16:30:15 -04:00
Raphael 'kena' Poss
278edd1c2b
fix(viewport): properly truncate to size (#228)
There are many "interesting" cases:

- logical content is wider than display width (long lines).
  In this case, we truncate.
- logical content is smaller than display height (fewer lines
  than visible).
  In this case, we pad with empty lines up to the specified height.
- logical content is higher than display height (more lines than
  visible).
  In this case, we truncate.

- style specifies a width wider than the display width.
  In this case, we ignore the style width and
  fit in the display width.
- style specifies a height higher than the display height.
  Same as width, we ignore the style and fit in the display height.
- style specifies a narrower width or smaller height than the display.
  In this case we obey the style.
2022-09-02 12:50:33 -07:00
Raphael 'kena' Poss
09e1f00349 textarea: support dynamic prompts
The dynamic prompt can be different on every line.
See for example:
[![asciicast](https://asciinema.org/a/iFBPBwoDZOzcoRJOgfmPk8ObH.svg)](https://asciinema.org/a/iFBPBwoDZOzcoRJOgfmPk8ObH)
2022-09-02 14:31:26 -04:00
Raphael 'kena' Poss
c099d31570 textarea: add some comments 2022-09-02 14:31:26 -04:00
Raphael 'kena' Poss
db2a8b4e16 textarea: new bindings for "go to begin" / "go to end" 2022-09-02 13:44:52 -04:00
Nicolas Karolak
afd6f58c18
feat(table): add function to set cursor position (#219) 2022-08-30 20:54:25 -04:00
Christian Rocha
d44e242f37 fix(viewport): honor width and height settings 2022-08-29 21:05:16 -07:00
buz
776062e30c
fix(table): correct keybinding for page down (#220)
Co-authored-by: Bastian Winkler <buz@serious.im>
2022-08-21 09:56:58 -04:00
kena
1c26128786
textarea: add uppercase/lowercase/capitalize word right (#210)
* Extract char navigation in separate function.

* Make wordLeft/wordRight find words on the prev/next line

... if there's no word on the current line to find any more.

* Support uppercase/lowercase/capitalize commands.

* Add transpose
2022-08-19 11:17:36 -04:00
kena
649f78e1fd
fix(textarea): pre-allocation of value (#213)
The maximum slice size of m.value is the max number of rows,
which is the max height.
2022-08-15 10:25:20 -04:00
kena
e72e4a190b
perf(textarea): amortize heap allocs in Value (#212) 2022-08-15 10:24:54 -04:00
kena
9b67fb8724
perf: avoid recomputing the key representation in key.Matches 2022-08-12 16:07:31 -04:00
Maas Lalani
93e3c756c4 docs: responsive images for mobile 2022-08-08 17:35:57 -04:00
Maas Lalani
e200bf8c81 feat: LineCount method for counting number of lines in textarea 2022-08-05 16:37:05 -04:00
Maas Lalani
47eee84147 fix: include new line characters for Length() 2022-08-05 16:37:05 -04:00
Maas Lalani
84eacf535a fix: CharLimit <= 0 should be ignored 2022-08-04 14:52:50 -04:00
Maas Lalani
8f65160828 fix: add ctrl+h to backspace text 2022-07-31 13:20:02 -04:00
Weslei Juan Novaes Pereira
58a9d4c7ec
feat: table bubble (#173)
Add table Bubble for displaying tabular data

Co-authored-by: Maas Lalani <maas@lalani.dev>
Co-authored-by: Christian Rocha <christian@rocha.is>
2022-07-21 15:06:38 -04:00
Maas Lalani
e32dcde62a
fix(viewport): Guard against negative string repetitions (#196) 2022-07-21 14:39:17 -04:00
Hironao OTSUBO
e49b5573bc
fix(key): Unbound keys should be disabled
* fix condition for #188
This is a fix of https://github.com/charmbracelet/bubbles/pull/188
Unbound keys has nil keys and they are not Enabled
2022-07-11 10:45:18 -04:00
Maas Lalani
746ec595c3
fix(textarea): change placeholder color to match textinput (#192) 2022-07-07 22:34:48 -04:00
Hironao OTSUBO
d4eeb4f5be fix(key): unbound keys are not enabled 2022-07-06 17:01:28 -07:00
Jonah
b74f696cc8
feat(list): add IsFiltered method (#98) 2022-07-05 16:38:10 -04:00
Maas Lalani
3a34fc4ff8 fix(textarea): Add deleteWordRight 2022-07-05 14:26:22 -04:00
Maas Lalani
2a2fb10f5f fix(textarea): account for base styling frame when calculating width 2022-07-05 14:26:22 -04:00