Commit Graph
100 Commits
Author SHA1 Message Date
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 RochaandGitHub 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 RochaandGitHub de18ed2891 chore(readme): add kevm/bubbleo to 'additional bubbles' 2024-05-08 12:21:36 -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
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 RochaandGitHub 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 RochaandAyman 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 RochaandGitHub 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 RochaandGitHub 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 RochaandGitHub 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
Christian Rocha 94b84b6120 Make spinners ignore tick messsages send by other spinners 2022-01-10 14:52:35 -05:00
Christian RochaandGitHub f09987549a Various timer improvements (#83)
* Add IDs to timers
* Add IDs to timer-related messages
* Ignore messages from other timers
* Add `Timeout` property to `TickMsg`
* Add `Start()`, `Stop()`, and `Toggle()` commands to timer
* Add `Timedout()` method to timer model
* Add `Running()` method to timer model
2022-01-10 13:55:54 -05:00
Christian Rocha 7b20f4fe24 Expose stopwatch StartStopMsg and ResetMsg and bind them to IDs 2022-01-10 13:37:34 -05:00
Christian Rocha 86e0c53e88 Add support for multiple stopwatches
In short, stopwatches will now ignore messages sent by other
stopwatches.
2022-01-10 13:37:34 -05:00
Christian Rocha 8d3cfdf380 key.Matches now accepts multiple binding arguments 2022-01-10 12:32:37 -05:00
Christian Rocha 0ac5ecdf81 Fix bug where performance rendering could render one line too many 2021-09-17 16:25:25 -04:00
Christian Rocha 8c03905dbe Fix bug where viewport wouldn't render final lines
This previously went unnoticed because we all seemed to have newlines at
the end of our viewport input.

This update introduces the Model.SetYOffset method.
2021-09-17 16:25:25 -04:00
Christian Rocha da9248f877 Update progress bar description and example links 2021-09-07 14:31:40 -04:00
Christian Rocha b691d7f07e Progress bars now statisfy the tea.Model interface 2021-09-07 13:57:46 -04:00
Christian Rocha 8ad268837a Add image and example link for Help bubble 2021-09-07 13:16:26 -04:00
Christian Rocha 0f290114f5 Add mritd/bubbles to "additional bubbles" in the README 2021-09-02 16:39:17 -04:00
Christian Rocha 500d7989e1 Fix keybinding examples 2021-09-01 11:33:41 -04:00
Christian RochaandChristian Muehlhaeuser 0be588365e Add simple helper package for making user-definable keymappings and help bubble 2021-08-23 17:00:29 +02:00
Christian Rocha 4c32a64d65 Add info about promptkit to README 2021-08-02 12:23:25 -04:00
Christian Rocha e723cfd15e Add WithSpringOptions to customize spring in NewModel 2021-07-26 12:41:37 -04:00
Christian Rocha 90d8eaffeb Update progress bar with public harmonica release 2021-07-26 12:41:37 -04:00
Christian Rocha 202d5a9f9d Progress's NewModel no longer returns an error for better usability
To that end, bad hex colors also default to black. This is also how we
handle bad hex notation in Lip Gloss.
2021-07-26 12:41:37 -04:00
Christian Rocha 446433d680 Use Lip Gloss to style percentage in progress bubble 2021-07-26 12:41:37 -04:00
Christian Rocha 2cd3b16343 Use Harmonica to animate progress bar 2021-07-26 12:41:37 -04:00
Christian Rocha 5ae3b7b822 Update go-runewidth to v0.0.13 2021-07-26 12:41:37 -04:00