zoriya
0483021485
feat(textarea): support ctrl + left/right/backspace
2026-07-26 13:03:40 +02:00
Ayman Bagabas
5fdd73f350
chore: format file imports with gofumpt
2025-11-10 15:49:13 -05:00
Ayman Bagabas
da0b892d17
refactor: migrate imports to charm.land/lipgloss
2025-11-04 15:02:23 -05:00
Ayman Bagabas
a10cfddef9
chore: update import paths from github.com/charmbracelet/bubbles/v2 to charm.land/bubbles/v2
2025-11-04 14:57:00 -05:00
Ayman Bagabas
84fd71dae6
fix: use charm.land import path for bubbletea
2025-11-04 14:54:08 -05:00
Ayman Bagabas
e8fcfc5ff7
refactor: use msg.Content for PasteMsg in textinput and textarea
2025-11-04 14:25:01 -05:00
Carlos Alexandro Becker
f03bfcc799
Merge remote-tracking branch 'origin/master' into v2-exp
...
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com >
2025-10-01 17:29:32 -03:00
Carlos Alexandro Becker and GitHub
49ff5c03b7
fix(textinput): improve placeholder ( #768 )
...
similar to #767 but for textinputs
2025-10-01 10:22:53 -03:00
Christian Rocha
56bbc4a1ba
fix(textinput,textarea): don't draw real cusor when blurred
2025-06-03 08:37:20 -04:00
Christian Rocha
e89dc94c85
chore!(cursor): improve naming around 'blinking'
2025-05-26 09:15:38 -04:00
Christian Rocha
0f113d10c4
chore(textarea,textinput/lint): use slices.Delete()
2025-05-26 09:15:38 -04:00
Christian Rocha
3cbcdd9249
chore(textinput): minor logic improvement with regard to cursors
2025-05-26 09:15:38 -04:00
Christian Rocha
8e84f33a49
fix!(textinput): cursor fixes and improvements
...
* Fix virtual cursor blinking
* Use getter and setter for styles
* Use getter and setter for virtual-real cursor management
2025-05-26 09:15:38 -04:00
Carlos Alexandro Becker
bb6a2a461d
Merge remote-tracking branch 'origin/master' into v2-exp
2025-04-14 11:07:20 -03:00
Andrey Nering
3e2a8caedb
chore: fix lint warning
2025-04-10 10:33:29 -03:00
Carlos Alexandro Becker
9d2d5dfc71
Merge remote-tracking branch 'origin/master' into v2-exp
2025-03-31 14:20:56 -03:00
Carlos Alexandro Becker and GitHub
bd2a5b0c6a
fix: golangci-lint 2 fixes ( #769 )
2025-03-31 14:18:18 -03:00
Carlos Alexandro Becker
d5bc1ac332
Merge remote-tracking branch 'origin/master' into v2-exp-update
...
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com >
2025-03-25 11:31:38 -03:00
bashbunni and GitHub
9e5365e0ec
docs: add example for ValidateFunc ( #705 )
...
* docs(textinput): add ValidateFunc example
* chore: remove print statement
* chore: rename the -> this anonymous func
2025-03-25 10:51:14 -03:00
Andrey Nering
fff86382cc
chore(lint): remove custom min and max functions
...
These are now available as builtins.
2025-03-20 10:42:52 -03:00
Carlos Alexandro Becker
71493456d9
Merge remote-tracking branch 'origin/master' into v2-exp
2025-03-13 16:55:11 -03:00
Ayman Bagabas
59511a71e0
fix(textinput): account for width when calculating cursor position
2025-03-10 15:18:55 -04:00
Christian Rocha
739fec5f64
chore(input,textarea): return nil for cursors when using virtual cursors
2025-03-01 10:10:36 -05:00
Carlos Alexandro Becker and GitHub
605d06c42b
feat: real cursor in textinput ( #727 )
2025-02-07 10:48:26 -03:00
Carlos Alexandro Becker and GitHub
64c16e990e
feat(v2)!: update to go 1.22 ( #724 )
...
* feat(v2)!: update to go 1.22
* fix: ci
* fix: more
2025-02-05 10:00:01 -03:00
Christian Rocha
1fd9c2666a
chore(textarea,cursor): simplify cursor API
2025-01-31 16:21:17 -05:00
Christian Rocha
9d5d140b3c
chore(textarea,cursor): flesh out real cursor API
2025-01-31 16:21:17 -05:00
Pierre Rossi and Christian Rocha
0f9e38c9a7
Don't render suggestions when textinput is not focused.
...
This can look confusing in forms otherwise.
2025-01-28 09:24:43 -05:00
Carlos Alexandro Becker
fbe642df17
chore(deps): update
2025-01-14 15:34:37 -03:00
Carlos Alexandro Becker
f28e78e6ab
Merge remote-tracking branch 'origin/master' into v2-exp
2025-01-14 14:22:36 -03:00
8624776d45
fix(textinput): slicing outside cap ( #532 )
...
* textinput: fix slicing outside cap
* textinput: add test that makes slicing outside cap occur
* chore: tidy with gofmt
---------
Co-authored-by: bashbunni <bunni@bashbunni.dev >
2024-12-05 13:40:33 -08:00
Christian Rocha
591dfd528e
chore(textinput): use a getter and setter for width
2024-10-31 15:02:05 -04:00
Christian Rocha
73fe314cc6
feat!(textinput): DefaultKeyMap is now a function; was formerly a global
2024-10-31 15:02:05 -04:00
Ayman Bagabas
db64e3cd78
feat: update lipgloss to v2
2024-10-29 15:54:24 -04:00
Christian Rocha
57ac102802
chore(merge): branch 'master' into v2-mini-tidy
2024-10-24 15:22:16 -04:00
Christian Rocha
4e05c24fc4
chore: move runeutil and memoization into internal
2024-10-24 15:21:20 -04:00
Christian Rocha
358a6c58c8
chore(lint): fix and suppress all soft lint issues; update directives
2024-10-24 12:35:42 -04:00
Ayman Bagabas
287c9c4ffd
chore: merge branch 'master' into v2-exp
2024-10-21 14:16:22 -04:00
David Luevano Alvarado and Christian Rocha
4382fdf1c6
feat(textinput): expose matched suggestions and index
2024-09-19 14:16:51 -04:00
Ayman Bagabas
09242fdf67
refactor!: remove deprecated references
...
This removes all the `NewModel` functions from all the bubbles and any
deprecated fields and types.
2024-09-19 13:44:03 -04:00
Ayman Bagabas
a2602f8509
feat!: v2: move to v2 module
2024-09-18 14:12:55 -04:00
Ayman Bagabas
0fdf5f5be5
feat: use bubbletea/v2
2024-09-18 14:09:58 -04:00
Ayman Bagabas
a93bfef532
feat!: use bubbletea@v2-exp
2024-09-09 14:12:52 -04:00
Ayman Bagabas and GitHub
11a9fccd58
chore: fix lint issues ( #534 )
2024-05-31 16:48:29 -04:00
Kevin Miller and Maas 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
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
Maas Lalani and GitHub
8a6f531287
feat: add ctrl+right and ctrl+left to perform WordBackward and WordForward actions ( #387 )
2024-03-04 11:00:05 -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
6399027ab7
perf(textinput): use uniseg.StringWidth
2024-01-22 15:37:12 -05:00
naglis and Maas 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