Norwik / Goenv

🐺 Manage Your Applications Go Environment.
MIT License
33 stars 2 forks source link

Update module github.com/charmbracelet/lipgloss to v0.9.1 #40

Closed renovate[bot] closed 8 months ago

renovate[bot] commented 8 months ago

Mend Renovate

This PR contains the following updates:

Package Type Update Change
github.com/charmbracelet/lipgloss require minor v0.6.0 -> v0.9.1

Release Notes

charmbracelet/lipgloss (github.com/charmbracelet/lipgloss) ### [`v0.9.1`](https://togithub.com/charmbracelet/lipgloss/releases/tag/v0.9.1) [Compare Source](https://togithub.com/charmbracelet/lipgloss/compare/v0.9.0...v0.9.1) This bugfix release changes the Table `Headers` API to accept `[]string` for consistency with `Row` / `Rows` and downgrades Lip Gloss to Go version `v1.17`. #### What's Changed - Table Headers type from `[]any` → `[]string` by [@​maaslalani](https://togithub.com/maaslalani) in [https://github.com/charmbracelet/lipgloss/pull/234](https://togithub.com/charmbracelet/lipgloss/pull/234) - Downgrade Lip Gloss to `v1.17` by [@​maaslalani](https://togithub.com/maaslalani) in [https://github.com/charmbracelet/lipgloss/pull/234](https://togithub.com/charmbracelet/lipgloss/pull/234) **Full Changelog**: https://github.com/charmbracelet/lipgloss/compare/v0.9.0...v0.9.1 ### [`v0.9.0`](https://togithub.com/charmbracelet/lipgloss/releases/tag/v0.9.0) [Compare Source](https://togithub.com/charmbracelet/lipgloss/compare/v0.8.0...v0.9.0) ### My, how the tables have turned Now you can draw `Table`s with Lip Gloss! 💅 image View [the source code](https://togithub.com/charmbracelet/lipgloss/tree/master/examples/table/pokemon/main.go). #### Let's get started ```go import "github.com/charmbracelet/lipgloss/table" ``` Define some rows of data. ```go rows := [][]string{ {"Chinese", "您好", "你好"}, {"Japanese", "こんにちは", "やあ"}, {"Arabic", "أهلين", "أهلا"}, {"Russian", "Здравствуйте", "Привет"}, {"Spanish", "Hola", "¿Qué tal?"}, } ``` Use the table package to style and render the table. ```go t := table.New(). Border(lipgloss.NormalBorder()). BorderStyle(lipgloss.NewStyle().Foreground(lipgloss.Color("99"))). StyleFunc(func(row, col int) lipgloss.Style { switch { case row == 0: return HeaderStyle case row%2 == 0: return EvenRowStyle default: return OddRowStyle } }). Headers("LANGUAGE", "FORMAL", "INFORMAL"). Rows(rows...) // You can also add tables row-by-row t.Row("English", "You look absolutely fabulous.", "How's it going?") ``` Print the table. ```go fmt.Println(t) ``` Table example For more on tables see [the examples](https://togithub.com/charmbracelet/lipgloss/tree/master/examples/table). #### Additional Borders Lip Gloss' `Border` now supports additional middle border separators. ```go type Border struct { // ... MiddleLeft string MiddleRight string Middle string MiddleTop string MiddleBottom string } ``` ### [`v0.8.0`](https://togithub.com/charmbracelet/lipgloss/releases/tag/v0.8.0) [Compare Source](https://togithub.com/charmbracelet/lipgloss/compare/v0.7.1...v0.8.0) ### Predictable Tabs At last: tabs that render the way you want ’em to. With the new [`Style.TabWidth()`](https://pkg.go.dev/github.com/charmbracelet/lipgloss@v0.8.0#Style.TabWidth) method, you can determine exactly how a `\t` will render. Before this release, Lip Gloss used to mis-measure a tab (i.e. a `\t`) at 0 cells wide when they actually render at different widths in different terminals (usually 8 cells, sometimes 4 cells). For these reasons, tabs are almost never what you want when designing layouts for TUIs. With this release, a tab will get converted to 4 spaces by default—so this is a behavioral change—but you can customize the behavior as well as disable it entirely. ```go s := lipgloss.NewStyle() // 4 spaces per tab, the default s = s.TabWidth(2) // 2 spaces per tab s = s.TabWidth(0) // remove tabs s = s.TabWidth(-1) // don't convert tabs to spaces s = s.TabWidth(NoTabConversion) // alias of the above ``` You can disable the feature with `Style.TabWidth(NoTabConversion)` (or `Style.TabWidth(-1)`, if you're the pedantic type). ### Bug Fixes This release also includes a bunch of bug fixes. This includes: - fix: border size calculation by [@​mieubrisse](https://togithub.com/mieubrisse) in [https://github.com/charmbracelet/lipgloss/pull/197](https://togithub.com/charmbracelet/lipgloss/pull/197) - fix: renderer race condition by [@​aymanbagabas](https://togithub.com/aymanbagabas) in [https://github.com/charmbracelet/lipgloss/pull/210](https://togithub.com/charmbracelet/lipgloss/pull/210) - fix: cache color profile and background by [@​aymanbagabas](https://togithub.com/aymanbagabas) in [https://github.com/charmbracelet/lipgloss/pull/212](https://togithub.com/charmbracelet/lipgloss/pull/212) *** **Full Changelog**: https://github.com/charmbracelet/lipgloss/compare/v0.7.1...v0.8.0 ### [`v0.7.1`](https://togithub.com/charmbracelet/lipgloss/releases/tag/v0.7.1) [Compare Source](https://togithub.com/charmbracelet/lipgloss/compare/v0.7.0...v0.7.1) This bugfix release fixes a problem introduced in v0.7.0 where applications could freeze or hang on start-up. #### What's Changed - fix(renderer): use termenv default renderer by [@​aymanbagabas](https://togithub.com/aymanbagabas) in [https://github.com/charmbracelet/lipgloss/pull/179](https://togithub.com/charmbracelet/lipgloss/pull/179) - chore: bump termenv to v0.15.1 by [@​muesli](https://togithub.com/muesli) in [https://github.com/charmbracelet/lipgloss/pull/180](https://togithub.com/charmbracelet/lipgloss/pull/180) **Full Changelog**: https://github.com/charmbracelet/lipgloss/compare/v0.7.0...v0.7.1 ### [`v0.7.0`](https://togithub.com/charmbracelet/lipgloss/releases/tag/v0.7.0) [Compare Source](https://togithub.com/charmbracelet/lipgloss/compare/v0.6.0...v0.7.0) ### Custom Renderers We're pleased to introduce custom renders for Lip Gloss! Custom renderers allow you to render to a specific outputs, which is particularly important when you want to detect the color profile and dark background status for multiple different outputs at runtime, such as in a server-client situation. Here's what it looks like: ```go func myLittleHandler(sess ssh.Session) { // Create a renderer for the client. renderer := lipgloss.NewRenderer(sess) // Create a new style on the renderer. style := renderer.NewStyle().Background(lipgloss.AdaptiveColor{Light: "63", Dark: "228"}) // Render. The color profile and dark background state will be correctly detected. io.WriteString(sess, style.Render("Heyyyyyyy")) } ``` For a full example on using a custom renderer over SSH with [Wish](https://togithub.com/charmbracelet/wish) see the [SSH example](https://togithub.com/charmbracelet/lipgloss/blob/master/examples/ssh). #### New API Stuff - `type Renderer struct` - `NewRenderer(io.Writer)` - `DefaultRenderer()` - `SetDefaultRenderer(*lipgloss.Renderer)` - `style.Renderer(*lipgloss.Renderer) Style` #### What's Changed ##### New - lipgloss renderer by [@​aymanbagabas](https://togithub.com/aymanbagabas) in [https://github.com/charmbracelet/lipgloss/pull/140](https://togithub.com/charmbracelet/lipgloss/pull/140) and [https://github.com/charmbracelet/lipgloss/pull/174](https://togithub.com/charmbracelet/lipgloss/pull/174) - add BlockBorder, OuterHalfBlockBorder, and InnerHalfBlockBorder border styles by [@​VictorBersy](https://togithub.com/VictorBersy) in [https://github.com/charmbracelet/lipgloss/pull/120](https://togithub.com/charmbracelet/lipgloss/pull/120) ##### Fixed - RGBA implementations for non-hex color values by [@​muesli](https://togithub.com/muesli) in [https://github.com/charmbracelet/lipgloss/pull/126](https://togithub.com/charmbracelet/lipgloss/pull/126) - unify get border size function names by [@​nerg4l](https://togithub.com/nerg4l) in [https://github.com/charmbracelet/lipgloss/pull/148](https://togithub.com/charmbracelet/lipgloss/pull/148) - reduce dependencies by [@​caarlos0](https://togithub.com/caarlos0) in [https://github.com/charmbracelet/lipgloss/pull/146](https://togithub.com/charmbracelet/lipgloss/pull/146) - don't concurrently change output profiles by [@​muesli](https://togithub.com/muesli) in [https://github.com/charmbracelet/lipgloss/pull/172](https://togithub.com/charmbracelet/lipgloss/pull/172) #### New Contributors - [@​dependabot](https://togithub.com/dependabot) made their first contribution in [https://github.com/charmbracelet/lipgloss/pull/133](https://togithub.com/charmbracelet/lipgloss/pull/133) - [@​winder](https://togithub.com/winder) made their first contribution in [https://github.com/charmbracelet/lipgloss/pull/147](https://togithub.com/charmbracelet/lipgloss/pull/147) - [@​VictorBersy](https://togithub.com/VictorBersy) made their first contribution in [https://github.com/charmbracelet/lipgloss/pull/120](https://togithub.com/charmbracelet/lipgloss/pull/120) - [@​nervo](https://togithub.com/nervo) made their first contribution in [https://github.com/charmbracelet/lipgloss/pull/156](https://togithub.com/charmbracelet/lipgloss/pull/156) - [@​caarlos0](https://togithub.com/caarlos0) made their first contribution in [https://github.com/charmbracelet/lipgloss/pull/146](https://togithub.com/charmbracelet/lipgloss/pull/146) - [@​Isti115](https://togithub.com/Isti115) made their first contribution in [https://github.com/charmbracelet/lipgloss/pull/170](https://togithub.com/charmbracelet/lipgloss/pull/170) - [@​nerg4l](https://togithub.com/nerg4l) made their first contribution in [https://github.com/charmbracelet/lipgloss/pull/148](https://togithub.com/charmbracelet/lipgloss/pull/148) **Full Changelog**: https://github.com/charmbracelet/lipgloss/compare/v0.6.0...v0.7.0

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, 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. View repository job log here.

renovate[bot] commented 8 months ago

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update (v0.9.1). You will get a PR once a newer version is released. To ignore this dependency forever, add it to the ignoreDeps array of your Renovate config.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.