Christian Rocha
644c7b3398
chore(textarea): move completion check
2025-02-01 07:19:54 -05:00
Christian Rocha
88778ca59d
chore(merge): branch 'v2-exp' into v2-area-textarea-api-updates
2025-01-31 16:50:34 -05:00
Christian Rocha
b2e3cc5371
chore(textarea): account for margins and padding in cursor offsets
2025-01-31 16:21:17 -05:00
Christian Rocha
841c9ce98c
chore(textarea): comments and cleanup
2025-01-31 16:21:17 -05:00
Christian Rocha
2824966855
feat(textarea): auto-calculate inner X/Y cursor offset
2025-01-31 16:21:17 -05:00
Christian Rocha
78262b85c3
chore(textarea): make placeholder rendering more readable
2025-01-31 16:21:17 -05:00
Christian Rocha
a6b8a4559c
chore(textarea): consolidate prompt rendering in a method
2025-01-31 16:21:17 -05:00
Christian Rocha
63fb8c67e7
fix(textarea): don't hardcode line number gutter width
2025-01-31 16:21:17 -05:00
Christian Rocha
de97754f09
fix(textarea): infer if we should use focused or blurred styles
2025-01-31 16:21:17 -05:00
Christian Rocha
24016e6ce4
chore(textarea): consolidate line number rendering into a method
2025-01-31 16:21:17 -05:00
Christian Rocha
ad8e4bf480
chore(textarea): improve comments, note ares that need attention
2025-01-31 16:21:17 -05:00
Christian Rocha
1fd9c2666a
chore(textarea,cursor): simplify cursor API
2025-01-31 16:21:17 -05:00
Christian Rocha
eb985a2f81
chore(textarea): improve cursor styling API
2025-01-31 16:21:17 -05:00
Christian Rocha
0e5ff3c5c3
chore(textarea): rename Model.SetCursor to Model.SetCursorColumn
...
Set.CursorColumn sets the cursor column position. This change was made
for clarity.
2025-01-31 16:21:17 -05:00
Christian Rocha and Ayman Bagabas
58b94b31e8
fix(textarea): doc comment typo
...
Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com >
2025-01-31 16:21:17 -05:00
Christian Rocha and Ayman Bagabas
0b3c0a2653
fix(textarea): doc comment
...
Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com >
2025-01-31 16:21:17 -05:00
Christian Rocha
7cdd5f37fe
chore(textarea,cursor): use textarea to manage virtual cursor styling
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
Christian Rocha
421843b83b
chore(merge): branch 'master' into v2-exp
2025-01-28 09:31:01 -05:00
Christian Rocha
6abd576e36
chore(merge): branch 'v2-exp' into v2-area
2025-01-22 09:11:21 -05:00
Christian Rocha
0a6b6e6fd7
chore(merge): branch 'master' into v2-exp
2024-11-15 08:38:55 -05:00
Christian Rocha
398e92c5ae
fix: remove default character limit
2024-11-15 08:30:03 -05:00
Christian Rocha
f439d83043
fix(textarea): max height should not determine max lines
...
Fixes #671 .
2024-11-15 08:30:03 -05:00
Christian Rocha
730f5a29e2
fix: debounce stopwatch and timer
...
This keeps them from ticking too fast.
Fixes #661 .
2024-11-05 22:06:53 -05:00
Christian Rocha
fc0fa7807e
feat(textarea): add helpers for default light and dark styles
2024-11-05 21:38:29 -05:00
Christian Rocha
148439f15d
feat(help): expose function for choosing light or dark styles
2024-11-05 13:46:33 -05:00
Christian Rocha
cc9a727028
fix(timer): restore 1s default interval
2024-10-31 15:58:35 -04:00
Christian Rocha
591dfd528e
chore(textinput): use a getter and setter for width
2024-10-31 15:02:05 -04:00
Christian Rocha
52bd03ed5b
feat!(viewport): use getters and setters for width and height
2024-10-31 15:02:05 -04:00
Christian Rocha
3b879e7694
feat!(viewport): width and height are now optional args in New()
2024-10-31 15:02:05 -04:00
Christian Rocha
241db06b4a
feat!(paginator): DefaultKeyMap is now a func instead of a global
2024-10-31 15:02:05 -04:00
Christian Rocha
4b0f9c8282
feat!(progress): width now uses getters and setters
2024-10-31 15:02:05 -04:00
Christian Rocha
e8ba813a88
feat!(filepicker): use getters and setters for height
2024-10-31 15:02:05 -04:00
Christian Rocha
6415ecbfef
feat!(stopwatch): add WithInterval(duration) option, drop NewWithInterval()
...
This also adds an Option type for arguments to New()
2024-10-31 15:02:05 -04:00
Christian Rocha
4ce3faadcf
feat!(textarea): DefaultKeyMap is now a func instead of a global
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
Christian Rocha
c560f6a021
feat!(timer): add WithInterval(duration) option, drop NewWithInterval()
...
This also adds an Option type for arguments to New()
2024-10-31 15:02:05 -04:00
Christian Rocha
12271df027
chore(textarea): nest focused and blurred styles in a parent struct
2024-10-24 17:29:41 -04:00
Christian Rocha
9f3b67a0ef
fix(help): fix tests
2024-10-24 16:44:30 -04:00
Christian Rocha
1efec1505f
chore(textarea): minimal updates for Lip Gloss v2
2024-10-24 16:44:30 -04:00
Christian Rocha
ef6a3d2483
chore(list): minimal updates for Lip Gloss v2
2024-10-24 16:44:30 -04:00
Christian Rocha
c8d49eae0f
chore(filepicker): minimal updates for Lip Gloss v2
2024-10-24 16:44:30 -04:00
Christian Rocha
fadc27c4bf
chore(help): minimal updates for Lip Gloss v2
2024-10-24 16:44:30 -04:00
Christian Rocha
2ecd1418ec
chore(deps): use Lip Gloss v2 (v2-exp); bump Bubble Tea to latest v2-exp
2024-10-24 16:44:30 -04:00
Christian Rocha and GitHub
046e4456a9
chore(merge): pull request #649 from charmbracelet/v2-mini-tidy
2024-10-24 15:43:47 -04:00
Christian Rocha
4070e9cc1f
chore(help): fix tests
2024-10-24 15:24:20 -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
Christian Rocha
60796500b2
chore(help): add full help test to support #554
2024-10-11 11:17:18 -04:00
Christian Rocha
64cc034014
chore(lint): update deprecated directive
2024-09-12 10:43:36 -04:00
Christian Rocha
2caa9d4bdf
chore(viewport): deprecate performance rendering stuff
2024-09-12 10:43:36 -04:00
Christian Rocha
a163c6c59d
chore(lint): disable predeclared due to false positives
2024-09-02 11:46:35 -04:00
Christian Rocha
72de4f47dc
chore(lint): update mnd name, remove deprecated directives
...
Linter output for this change:
* The linter "deadcode" is deprecated (step 2) and deactivated. It should be removed from the list of disabled linters. https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle
* The linter "structcheck" is deprecated (step 2) and deactivated. It should be removed from the list of disabled linters. https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle
* The linter "varcheck" is deprecated (step 2) and deactivated. It should be removed from the list of disabled linters. https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle
* The linter 'gomnd' is deprecated (since v1.58.0) due to: The linter has been renamed. Replaced by mnd.
2024-09-02 11:46:35 -04:00
Christian Rocha
f25096d1b6
chore(lint): disable 'predeclared' linter
...
It seems to always run on the latest version of Go and we're finding
false positives with its suggestions.
2024-08-20 15:22:27 -04:00
Christian Rocha
235075af49
feat: add HelpView to table as a convenience
2024-08-20 15:22:27 -04:00
Christian Rocha
0368f4300e
chore: update CODEOWNERS
2024-08-06 10:18:43 -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
Christian Rocha
64a67d1670
chore: update CODEOWNERS
2024-06-18 16:15:15 -04:00
Christian Rocha
65933b4ef6
chore(lint): drop deprecated 'ifshort' linter directive
2024-05-08 14:02:15 -04:00
Christian Rocha and GitHub
de18ed2891
chore(readme): add kevm/bubbleo to 'additional bubbles'
2024-05-08 12:21:36 -04:00
Christian Rocha and GitHub
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
2023-05-31 14:04:43 -04: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
Christian Rocha and GitHub
4a71cee5a1
fix(viewport): performance scrolling ( #312 )
...
* fix(viewport): performance scroll behavior for line up/down
* fix(viewport): performance scrolling in multi-line operations
2023-01-20 10:51:00 -05:00
Christian Rocha
2b5b8624d6
fix: use non-deprecated spinner tick command in list
2022-11-17 10:41:13 -05:00
Christian Rocha
30c01cabdc
chore: apply appropriate GoDoc syntax to deprecated items
2022-11-17 10:41:13 -05:00
Christian Rocha
d44e242f37
fix(viewport): honor width and height settings
2022-08-29 21:05:16 -07:00
Christian Rocha
fd03b6195d
chore: bump bubbletea, harmonica, lipgloss and termenv deps
2022-06-01 17:53:14 -07:00
Christian Rocha
a1e1b461b6
fix(textinput): support KeySpace in both present and future Bubble Tea versions
...
Closes #144
2022-05-29 08:25:34 -07:00
Christian Rocha and Ayman Bagabas
2a8d463bd1
chore: shorten half page up/down help widths
2022-04-29 12:20:18 -04:00
Christian Rocha
292a1dd7ba
fix(spinner): remove unused member in model
2022-04-12 10:12:14 -04:00
Christian Rocha
154cdbc53a
docs: add Tyler's Teacup library to resources
2022-04-12 10:11:59 -04:00
Christian Rocha
430b7b5d36
Remove provisional spinner lifetime stuff
...
The design was overly complicated, especially for such subtle benefits.
2022-03-31 10:59:39 -04:00
Christian Rocha
00ec90b59f
docs(list): fix typo in doc comment
2022-03-30 15:24:24 -04:00
Christian Rocha
d897463138
chore(progress): Percent() now return progress as presented visually
...
Prior to this change Percent() returned the target progress to which the
progress bar was animating.
2022-03-30 14:48:46 -04:00
Christian Rocha
64b9e0582f
docs: add more libs to Additional Bubbles in the README
2022-02-25 14:47:11 -05:00
Christian Rocha and GitHub
057f7b9a4d
Add evertras/bubble-table to 'Additional Bubbles' section in README
...
Items in that section are now organized alphabetically.
2022-02-17 10:35:07 -05:00
Christian Rocha
7ecce3fb97
Ignore width/height settings in viewport's style settings
...
The Lip Gloss width and height settings compete with the main
width/height settings and can result in funny rendering and generally
cause confusion.
2022-01-20 13:23:58 -05:00
Christian Rocha
746834a7ce
Add safety check in textinput's clamp
2022-01-20 13:23:58 -05:00
Christian Rocha
fd306528f9
Rename var in deleteWordRight in textinput for additional clarity
2022-01-20 13:23:58 -05:00
Christian Rocha
a4dc540f3d
Re-add panic guard in deleteWordLeft in textinput, just in case
2022-01-20 13:23:58 -05:00
Christian Rocha
daba232df4
Fix a bug where viewport y-offset could be negative
2022-01-19 12:32:05 -05:00
Christian Rocha
7a6d306889
Fix off-by-one error in viewport's GotoBottom()
...
This was most likely introduced by the fix for rendering final lines in
0ac5ecdf81 .
2022-01-19 12:32:05 -05:00
Christian Rocha
6c015a2aa8
Remove an unused method
2022-01-19 12:31:50 -05:00
Christian Rocha
764fd321f6
Cleanup an old var
2022-01-19 12:31:50 -05:00
Christian Rocha
091c915462
Fix various godoc comments
2022-01-19 12:31:50 -05:00
Christian Rocha
505a16d057
Bump lipgloss and atotto/clipboard to their latest versions
2022-01-14 13:40:18 -05:00
Christian Rocha and GitHub
465a66e963
Add timer and stopwatch info to README
2022-01-13 11:30:10 -05:00
Christian Rocha
48e3f85baf
Update keybindings after calling InsertItem on the list model
...
Specifically, if the list was emtpy prior to inserting an item the
up/down keybindings would be hidden and disabled.
2022-01-11 12:08:33 -05:00
Christian Rocha
b35f96cd2d
Deprecate NewModel() constructors; use New() instead
2022-01-11 11:26:13 -05:00
Christian Rocha
9401ebbb83
Viewport New() is now optional to ease the upgrade process
2022-01-10 21:21:04 -05:00
Christian Rocha
add13c8028
Add a lipgloss style to the viewport for borders, margins, and padding
2022-01-10 21:21:04 -05:00
Christian Rocha
4aed4e0a88
Viewport now has customizable keybindings
2022-01-10 21:21:04 -05:00
Christian Rocha
9c70b6a216
Bump bubbletea dep
2022-01-10 15:01:52 -05:00
Christian Rocha and GitHub
9d74635ea3
Update footer image in README
2022-01-10 14:57:12 -05:00
Christian Rocha
e01ee1d17e
Expose IDs on spinners and spinner tick messages
2022-01-10 14:52:35 -05:00
Christian Rocha
e83c113d06
Add spinner.Model.Tick method, deprecate spinner.Tick method.
2022-01-10 14:52:35 -05:00