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
Christian Rocha
94b84b6120
Make spinners ignore tick messsages send by other spinners
2022-01-10 14:52:35 -05:00
Christian Rocha and GitHub
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 Rocha and Christian 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
Christian Rocha
4365990396
Fix typo in a spinner comment
2021-06-02 10:49:43 -04:00
Christian Rocha
1405b09ec8
Update footer in README for consistency with newer Charm repos
2021-06-02 10:49:43 -04:00
Christian Rocha
9449cc7e41
Don't allow word-based deletion when input is masked in textinput
...
alt+d and ctrl+w will now delete all the way to the beginning and end,
respectively, if EchoMode is not EchoNormal.
2021-04-26 12:03:57 -04:00
Christian Rocha
58a177394e
Don't allow word-to-word movement when input is masked in textinput
...
When EchoMode is not set to EchoNormal, alt+left/alt+b and
alt+right/alt+b jumps to the beginning and the end, respectively, so as
not to reveal word breaks in the masked text.
2021-04-26 12:03:57 -04:00
Christian Rocha
f016c31d83
Add method for returning cursor position in textinput
...
Previously, Cursor was a member on the model that did absolutely
nothing.
2021-04-26 12:03:57 -04:00
Christian Rocha
74436326b9
Public cursor movement functions no longer return values in textinput
...
Previously, textinput.SetCursor, textinput.CursotStart, and
textinput.CursorEnd returned bools used interally for managing cursor
blinking. Those methods have been replaced with private counterparts.
2021-04-26 12:03:57 -04:00
Christian Rocha
158097df66
Keep y-offset in bounds when setting content
2021-04-19 19:47:50 -04:00
Christian Rocha
0d5d7e5acd
Remove deadcode + small comment on Lip Gloss
2021-04-13 17:09:23 -04:00
Christian Rocha
ddd48d9ab7
TextInput now uses Lip Gloss for styling
2021-04-13 17:09:23 -04:00
Christian Rocha
7242bbe8dc
Spinner now uses Lip Gloss for styling
2021-04-13 17:09:23 -04:00
Christian Rocha
c8f4855d20
Fix typo in README
2021-01-12 18:19:20 -05:00
Christian Rocha
43d43d14ae
A external link to progress example and remove local example
2021-01-12 18:17:42 -05:00
Christian Rocha and GitHub
de359c53bb
README: improve wording + image update for dark backgrounds
2021-01-12 17:53:56 -05:00
Christian Rocha and GitHub
c7d69b61f0
Add progressbar info and GIF to README
2021-01-12 17:27:14 -05:00
Christian Rocha and Christian Rocha
11f56f9b6b
If using advanced settings, draw empty spinner when appropriate
...
When model.HideFor or model.MinimumLifetime is present, we won't draw
the spinner in cases where model.Visibe() returns false.
2020-12-11 19:37:37 -05:00
Christian Rocha and Christian Rocha
3be2d0585b
Prevent spinner from responding to extra, unintentional tick messages
2020-12-11 19:37:37 -05:00
Christian Rocha
37a85afcd1
Fix a typo in a comment
2020-12-10 11:36:22 -05:00
Christian Rocha and Christian Rocha
f9c79eef64
Slightly more subtle default gradient
2020-12-01 17:03:48 -05:00
Christian Rocha and Christian Rocha
c303de1e85
Replace "ramp" with "gradient" on exposed functions
2020-12-01 17:03:48 -05:00
Christian Rocha and Christian Rocha
7e5ef42924
Add ability to style percentage readout
2020-12-01 17:03:48 -05:00
Christian Rocha and Christian Rocha
79ca4d09d1
Fix doc comments and remove magic number
2020-12-01 17:03:48 -05:00
Christian Rocha and Christian Rocha
f48e53556a
Return an error if we could not initialize a new gradient ramp
2020-12-01 17:03:48 -05:00
Christian Rocha and Christian Rocha
5d6d8cb0fb
Add functional argument for setting the width of the progress bar
2020-12-01 17:03:48 -05:00
Christian Rocha and Christian Rocha
47b8d9c6a8
Doc comments, optimizations, and magic number removal
2020-12-01 17:03:48 -05:00
Christian Rocha and Christian Rocha
b78277e7ec
Add progress bar example
2020-12-01 17:03:48 -05:00
Christian Rocha and Christian Rocha
6a768905a6
Add initialization options for scaled ramps
2020-12-01 17:03:48 -05:00
Christian Rocha and Christian Rocha
0f06d78b92
Support for solid (non-gradient) fills too
2020-12-01 17:03:48 -05:00
Christian Rocha and Christian Rocha
1e16eca939
Set ramp in NewModel via functional argument
2020-12-01 17:03:48 -05:00
Christian Rocha and Christian Rocha
d81e5713d4
Cache termenv color profile lookup
2020-12-01 17:03:48 -05:00
Christian Rocha and Christian Rocha
b10dbcb4dd
Add option to show percent
2020-12-01 17:03:48 -05:00
Christian Rocha and Christian Rocha
a2e0a2e72e
Remove initial width argument; add default width
2020-12-01 17:03:48 -05:00
Christian Rocha and Christian Rocha
3dea7d036e
Reduce progress component to (more or less) a pure view function
...
We really only need the View function in this case since the progress
value will come from the program that implements this.
2020-12-01 17:03:48 -05:00
Christian Rocha and Christian Rocha
9cb8e8d90a
Remove spaces after emoji spinners
2020-11-11 15:39:42 -05:00
Christian Rocha and Christian Rocha
e6219572e5
Add points spinner
2020-11-11 15:39:42 -05:00
Christian Rocha and Christian Rocha
81feaacf5b
Remove bit8 spinner
2020-11-11 15:39:42 -05:00