fix(deps): update module github.com/charmbracelet/bubbles to v2 #7
Loading…
Reference in a new issue
No description provided.
Delete branch "renovate/github.com-charmbracelet-bubbles-2.x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
v0.21.1→v2.2.2Release Notes
charmbracelet/bubbles (github.com/charmbracelet/bubbles)
v2.2.2Compare Source
A big squash 🫧
A patch release with a whole lot of patches! Over 40 fixes across nearly every component, most of them from the community. Text inputs handle wide characters better, viewports respect their borders, and timers keep honest time.
Text Input
TextStyle.errors.Isworks.Text Area
CharLimitcounts characters, not screen width, so a CJK character no longer counts double.SetValue.MaxWidthis tiny.Viewport
ScrollPercentaccounts for borders and padding.Table
SetCursorscrolls to keep the selected row visible.SetRowswith no rows resets the cursor to the top.List
qandescare back as the default quit keys.Timer ⏱️
Startmore than once no longer makes the timer count down faster.Stopwatch
New()defaults to a one-second interval, just like the docs always said.Progress
File Picker
Help
Tree
SetValueupdates what's rendered.SetNodesaccepts anilroot.Paginator
Big thanks to everyone who contributed, and an extra big welcome to the huge crowd of first-time contributors! This release is mostly yours 🫶
Read the details below 👇🏻
Have a less buggy weekend,
Charm XX 🌊
Changelog
Fixed
c94fcfd: fix(filepicker): keep the selection valid while entries load (#1093) (@janearc)5bc76ae: fix(filepicker): remove loop iteration appending extra newline (#914) (@bntrtm)18dcd80: fix(help): keep the short help within its width (#1066) (@iainlane)48be6e2: fix(help): style full help column padding (#989) (@Yongcheng123)ed22992: fix(list): RemoveItem correctly updates the filtered list when a filter is active (#997) (@troclaux)74a6322: fix(list): avoid truncating titles without status (#1048) (@imshunsuke)3bf6c63: fix(list): convert fuzzy match indexes from byte to rune offsets (#1014) (@upuddu)19ed085: fix(list): restore the default quit keys (#1046) (@justadityaraj)5629869: fix(paginator): leave pagination unchanged when the page size is invalid (#1091) (@janearc)e04077d: fix(progress): eliminate race in nextFrame (#1077) (@rapropos)77c1de1: fix(progress): normalize percentages before animating and rendering (#1082) (@shayanxcyber)7887706: fix(stopwatch): derive elapsed from wall clock (#1069) (@TastyHeadphones)2dd9752: fix(table): adjust viewport offset in SetCursor to keep cursor row visible (#1064) (@AdamMagued)4f8ed71: fix(table): clamp cursor to 0 when SetRows is called with empty slice (#1003) (@LeSingh1)4c0b283: fix(table): ignore extra cells when rendering rows (#1092) (@janearc)96c3466: fix(table): keep the viewport in place when stepping across the last row (#1054) (@cabbagekobe)266927c: fix(textarea): count first inserted line once in content height (#1088) (@peterolkhov)62411cf: fix(textarea): count runes, not display width, for CharLimit (#1008) (@sueun-dev)273e7bd: fix(textarea): keep a last word that exactly fills the line (#1070) (@abdull-ah-med)b2b782e: fix(textarea): keep one column for text when MaxWidth is too small (#1095) (@janearc)b6938b6: fix(textarea): navigate and delete whole graphemes (#1067) (@rupayon123)a76b63e: fix(textarea): reach trailing wrapped cursor lines (#1051) (@LeulTew)eea953c: fix(textarea): remove double rendering in placeholder view (#911) (@spxzx)9f3f429: fix(textarea): reposition view after SetValue (#998) (@troclaux)43e4df9: fix(textinput): apply missing .TextStyle to virtualCursor (#967) (@marvinlanhenke)b371c6b: fix(textinput): cap suggestion completion to input width (#1055) (@timatigoogl3-code)a348bd7: fix(textinput): keep suggestion index non-negative (#1084) (@sameerihs)f9981e0: fix(textinput): keep the cursor position correct for wide characters and scrolled values (#1087) (@shounakjoshi88-a11y)bf6c054: fix(textinput): refresh suggestions when setting the value (#1096) (@janearc)2ffd48b: fix(textinput): show full placeholder when Width is not set (#988) (@troclaux)8f9db15: fix(textinput): stop forward word deletion at word boundary (#1058) (@rupayon123)bf2f980: fix(timer): make tag debounce actually reject stale ticks (#1012) (@momomuchu)ee29549: fix(timer): prevent Start() from spawning multiple tickers (#922) (@Aliexe-code)d4ae900: fix(tree): let SetNodes accept a nil root (#1094) (@janearc)65f99f0: fix(tree): update rendered node values in SetValue (#1052) (@jakezwang)01b9d49: fix(viewport): account for the style frame in ScrollPercent (#1086) (@yxshee)8add387: fix(viewport): correct highlight offsets on ANSI-styled content (#1050) (@rksharma-owg)8e65b5c: fix(viewport): page by the visible height when the style has a frame (#1085) (@yxshee)Other stuff
4e3dc76: ci: lint (#1099) (@andrinoff)3815b7b: feat(textinput,textarea): add shift+backspace support (#972) (@jabagawee)0511907: fix(textinput,textarea): implement Unwrap on clipboard error messages (#1063) (@AdamMagued)99653d3: textarea: keep first soft-wrapped row visible after autoresize (#913) (@yogirk)0c1a491: v2.2.2 (@andrinoff)Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.
v2.2.1Compare Source
Tiny Monday bugfix
Textarea element had a bug, where you used to be able to go 1 word backwards, even if there was nothing, which resulted in the whole TUI freezing. It was now fixed by @OxQuasar!
Changelog
Fixed
f613411: fix(textarea): stop word-left at input boundary (#1036) (@OxQuasar)Docs
87d4458: docs: update godoc link in readme to new package (@meowgorithm)Other stuff
10489b5: readme: drop tree section for now (@meowgorithm)4909481: v2.2.1 (@andrinoff)Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.
v2.2.0Compare Source
A new Bubble and some new Textarea stuff
There are a couple nice features in today's release. Let's check em out!
If a tree falls in the forest…
At last, the tree Bubble from all star contributor @dlvhdr’s is here! He built it for DiffNav and graciously contributed to Bubbles. We've been working with Dolev for a long time and were totally stoked when he offerd to contribute.
Select all, ctrl+c, ctrl+v…done!
Our own @andrinoff added a bunch of awesome stuff to Textarea, including the long awaited text selection. Select, copy, and cut your way into mini text editing.
For more info see the docs.
And special thanks to @zoriya for adding ctrl+left/right bindings.
xoxo,
Charm! 💌
Changelog
New!
8cea431: feat(textarea): support ctrl + left/right/backspace (#1020) (@zoriya)037ad37: feat: textarea selection (#1029) (@andrinoff)e97af08: feat: tree bubble (#893) (@dlvhdr)Fixed
6484e49: fix(filepicker): don't blank the view when height is unset (#1026) (@andrinoff)Other stuff
355f960: ci: sync dependabot config (#896) (@charmcli)ef8af03: v2.2.0 (@andrinoff)Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.
v2.1.1Compare Source
Lil’ Textarea Fix
This is a tiny patch to fix a bug in
textareawhere the prompt character could be missing styling on empty lines. That’s all for now!Thanks for using Bubbles,
Charm 🌞
Changelog
Fixed
d2b2217: fix(textarea): apply prompt style on all lines, including fillers (@meowgorithm)Docs
a13f110: docs: fix typo in README (#921) (@Rohan5commit)Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.
v2.1.0Compare Source
Shrink ’n’ grow your textareas
The update adds a new feature to automatically resize your
textareavertically as its content changes.Piece of cake, right?
Enjoy! 💘
Changelog
New!
f1daacf: feat(textarea): dynamic height (#910) (@meowgorithm)Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.
v2.0.0Compare Source
Bubbles v2 is here! 🫧
We're thrilled to share Bubbles v2 with you! This release accompanies Bubble Tea v2 and Lip Gloss v2 and brings a ton of consistency, new features, and quality-of-life improvements across every component. Catch 'em all:
You can also check the Upgrade Guide for more info.
There are a lot of changes in here, but we've found upgrading pretty easy, especially with a linter. Read on for the full breakdown!
🏠 New Home
Bubbles v2 now lives at
charm.land:All sub-packages follow the same pattern:
charm.land/bubbles/v2/viewport,charm.land/bubbles/v2/list, etc.🎨 Light and Dark Styles
Some Bubbles, like
help, offer default styles for both light and dark backgrounds. Since Lip Gloss v2 removesAdaptiveColor, choosing light or dark is now a manual process. You've got a couple of options.🎩 The Best Way
Have Bubble Tea query the background color for you. This properly queries the correct inputs and outputs, and happens in lockstep with your application:
If you're using Wish you must do it this way to get the background color of the client.
🤠 The Quick Way
Use the
compatpackage in Lip Gloss. It's less recommended because it contains blocking I/O that operates independently of Bubble Tea, and when used with Wish it won't detect the client's background:👀 Or Just Pick One
This pattern applies to
help,list,textarea, andtextinput.🔑 The Init You Know and Love is Back
After experimenting with a few different forms of
Initduring the alphas, we decided the v1 signature was the right call after all.Initwas a bit too redundant for our tastes given that initialization already happens inNew:✨ The Big Highlights
Getters and Setters Everywhere
All components now use getter/setter methods instead of exported
WidthandHeightfields. This lets us do internal bookkeeping when things change, and it makes the API consistent across every Bubble:Affected:
filepicker,help,progress,table,textinput,viewport.Functional Options
Constructors now use the functional options pattern instead of positional args or separate constructor functions:
DefaultKeyMap is a Function Now
All
DefaultKeyMappackage-level variables are now functions, so you get fresh values every time:Real Cursor Support 🖱️
Both
textareaandtextinputnow support real terminal cursors! The feature is opt-in, so by default your programs will continue to use the easy-breezy virtual cursor. SetVirtualCursortofalseand useModel.Cursor()for the real deal. Check out the textarea and textinput examples to see it in action.Cleaned House 🧹
All previously deprecated symbols have been removed:
NewModelvariants — just useNewspinner.Tick()— useModel.Tick()insteadpaginator.UsePgUpPgDownKeysand friends — customizeKeyMapdirectlyfilepicker.DefaultStylesWithRenderer()— Lip Gloss is pure now, useDefaultStyles()viewport.HighPerformanceRendering— no longer neededruneutilandmemoizationpackages moved tointernal/(they were never meant for public use anyway)What's Changed: the Laundry List
🔮 Cursor
Model.Blinkrenamed toModel.IsBlinkedfor clarityModel.BlinkCmd()renamed toModel.Blink()📂 Filepicker
DefaultStylesWithRenderer()removed — Lip Gloss is pure now, so just useDefaultStyles()Model.Heightbroken intoSetHeight(int)/Height() int❓ Help
Model.Widthbroken intoSetWidth(int)/Width() intDefaultStyles(isDark bool),DefaultDarkStyles(), andDefaultLightStyles()🥕 List
DefaultStyles()andNewDefaultItemStyles()now take anisDark boolparameterStyles.FilterPromptandStyles.FilterCursorhave been consolidated intoStyles.Filter(atextinput.Styles)GlobalIndexhelper added📄 Paginator
DefaultKeyMapvariable →DefaultKeyMap()functionUsePgUpPgDownKeys,UseLeftRightKeys, etc.) removed — customizeKeyMapdirectly🌈 Progress
This one got the biggest makeover!
WithGradient/WithScaledGradient→WithColors(...color.Color)— pass 2+ colors for blendingWithSolidFill(string)→WithColors(color)— pass a single color for a solid fillWithDefaultGradient()→WithDefaultBlend()WithScaled(bool)to scale the blend to fit only the filled portionWithColorFunc(func(total, current float64) color.Color)for fully dynamic coloringWithColorProfileremoved — Bubble Tea handles this automatically nowModel.FullColorandModel.EmptyColorchanged fromstringtoimage/color.ColorModel.Widthbroken intoSetWidth(int)/Width() intModel.Updatenow returnsModelinstead oftea.Model🌀 Spinner
Tick()package-level function removed — useModel.Tick()instead⏱️ Stopwatch
NewWithInterval(d)removed — useNew(WithInterval(d))instead🔢 Table
Model.Width/Model.Heightreplaced with getter/setter methodsansi.Truncateinstead ofrunewidth.Truncate✏️ Textarea
The big change here is real cursor support — but that's opt-in, so by default your programs will keep using the virtual cursor.
DefaultKeyMapvariable →DefaultKeyMap()functionPageUp/PageDownkey bindingsModel.FocusedStyle/Model.BlurredStyle→Model.Styles.Focused/Model.Styles.BlurredStyletype renamed toStyleState; newStylesstruct groupsFocused,Blurred, andCursorModel.SetCursorrenamed toModel.SetCursorColumnModel.Cursoris nowfunc() *tea.Cursorfor real cursor supportModel.VirtualCursorbool added — set tofalsewhen using a real cursorDefaultStyles(isDark bool),DefaultDarkStyles(),DefaultLightStyles()Column(),ScrollYOffset(),ScrollPosition(),MoveToBeginning(),MoveToEnd()SetPromptFunc📜 Textinput
Most of the changes here bring
textinputto parity withtextarea, including real cursor support. Styling has been consolidated into aStylesstruct withFocusedandBlurredstates:DefaultKeyMapvariable →DefaultKeyMap()functionModel.Widthbroken intoSetWidth(int)/Width() intModel.PromptStyle→StyleState.PromptModel.TextStyle→StyleState.TextModel.PlaceholderStyle→StyleState.PlaceholderModel.CompletionStyle→StyleState.SuggestionModel.Cursoris nowfunc() *tea.Cursorfor real cursor supportModel.VirtualCursor()/SetVirtualCursor(bool)addedModel.Styles()/SetStyles(Styles)addedDefaultStyles(isDark bool),DefaultDarkStyles(),DefaultLightStyles()⏲️ Timer
NewWithInterval(timeout, interval)removed — useNew(timeout, WithInterval(interval))📦 Viewport
viewportgot a ton of love in v2. Let's dive in!Breaking changes:
New(width, height int)→New(...Option)withWithWidth/WithHeightModel.Width,Model.Height,Model.YOffsetreplaced with getter/setter methodsHighPerformanceRenderingremovedShiny new features:
You can now scroll horizontally with the left and right arrow keys, and set up a custom gutter column for things like line numbers:
Highlight parts of what's being viewed with regex:
Let viewport handle soft wrapping for you:
Or, if you need fine control, use
SetContentLineswith "virtual lines" containing\n— they're treated as soft wraps automatically.Also new:
GetContent()to retrieve contentFillHeightto pad the viewport with empty linesStyleLineFuncfor per-line stylingHighlightStyleandSelectedHighlightStylefor highlight appearanceChangelog
Fixed
ansi.Truncateinstead ofrunewidth.Truncate(#884) (@jedevc)Docs
Other stuff
💝 That's a wrap!
Feel free to reach out, ask questions, give feedback, and let us know how it's going. We'd love to know what you think.
Part of Charm.
Charm热爱开源 • Charm loves open source • نحنُ نحب المصادر المفتوحة
v1.0.0Compare Source
This is just an honorary release of Bubbles v1. Stay tuned for the next major version 🫧
Changelog
Fixed
d016636: fix: changed 'recieve' to 'receive' for 100% quality of Go Report Card (#881) (@Atennop1)Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate CLI.
⚠️ Artifact update problem
Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.
♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
The artifact failure details are included below:
File name: go.sum
a260c960c20f584895efView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.