Commit Graph
100 Commits
Author SHA1 Message Date
Christian Rocha 8827e48e1a chore(merge): branch 'master' into v2-tidy 2024-10-24 13:11:39 -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 0e006c7cdc fix(textarea): fix tests 2024-10-24 11:41:25 -04:00
Christian Rocha 5d1f237d28 chore(help): simplify ansi stripping in test 2024-10-24 11:39:04 -04:00
Christian Rocha 812b71c7d0 chore(textarea): make memoizer internal 2024-10-24 11:38:07 -04:00
Christian Rocha c0611f6c76 chore(list): fix v2 errors 2024-10-23 22:10:46 -04:00
Christian Rocha 89f2eef648 fix(help): fix test by downsampling color to NoTTY 2024-10-23 22:09:31 -04:00
Christian Rocha 4b2f72baa9 chore(help): fix help test errors 2024-10-23 22:00:39 -04:00
Christian Rocha d05ec83cbe docs(textarea): add simple GoDoc for memo package 2024-10-23 21:29:04 -04:00
Christian Rocha e1d891bfdb chore(deps): use current v2-exp Bubble Tea 2024-10-23 21:24:22 -04:00
Christian Rocha 39fb58b530 chore(progress): use getters/setters for width 2024-10-23 17:36:52 -04:00
Christian Rocha d514f3d2bf chore(runeutil): improve package description 2024-10-23 17:34:38 -04:00
Christian Rocha d487f7843f chore(runeutil): make package internal 2024-10-23 17:34:28 -04:00
Christian Rocha c4f0400a8b chore(textarea): remove keymap global in favor of a function 2024-10-23 17:11:36 -04:00
Christian Rocha f6eb94828d chore(textarea): focused/blurred styles now belong to one style struct 2024-10-23 17:02:44 -04:00
Christian Rocha a7b0c79ab4 chore(textarea): update for Lip Gloss v2 2024-10-23 17:02:44 -04:00
Christian Rocha 432972ae77 feat(textinput): add styles for focused and blurred states 2024-10-23 16:43:23 -04:00
Christian Rocha 30d7e7bd31 chore(textinput): use a getter and setter for width 2024-10-23 16:43:23 -04:00
Christian Rocha 17533b1286 chore(textinput): use getter and setter for width 2024-10-23 16:43:23 -04:00
Christian Rocha aa1fe05f2e chore(textinput): DefaultKeyMap is now a func that returns a KeyMap 2024-10-23 16:43:22 -04:00
Christian Rocha 49c9acaa03 chore(list): update for Lip Gloss v2 2024-10-23 16:43:22 -04:00
Christian Rocha 95e716e9ec docs(cursor): fix typo in comment 2024-10-23 16:43:22 -04:00
Christian Rocha 7d60fd1ebd chore(help): update for Lip Gloss v2 2024-10-23 16:43:22 -04:00
Christian Rocha 3fc226c136 feat(filepicker): make symlink symbol customizable 2024-10-23 16:43:22 -04:00
Christian Rocha 0892f86973 chore(filepicker): use Lip Gloss v2 2024-10-23 16:43:18 -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
Christian Rocha 20ead8fb7d Progress can now animate itself 2021-07-26 12:41:37 -04:00
Christian Rocha d06aa4aa48 Ensure that textinputs can only receive their own blink messages 2021-06-02 10:49:43 -04:00
Christian Rocha 10962af2f2 Textinput's focus method now returns a command to initiate cursor blink 2021-06-02 10:49:43 -04:00
Christian Rocha 5082ae6f31 Add API for blink, static and hidden cursor modes to textinput
Closes #53.
2021-06-02 10:49:43 -04:00