chore(deps): update module github.com/charmbracelet/lipgloss to v0.9.1 #51

Open
renovate wants to merge 1 commits from renovate/github.com-charmbracelet-lipgloss-0.x into master
Contributor

This PR contains the following updates:

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

Release Notes

charmbracelet/lipgloss (github.com/charmbracelet/lipgloss)

v0.9.1

Compare Source

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

Full Changelog: https://github.com/charmbracelet/lipgloss/compare/v0.9.0...v0.9.1

v0.9.0

Compare Source

My, how the tables have turned

Now you can draw Tables with Lip Gloss! 💅

image

View the source code.

Let's get started

import "github.com/charmbracelet/lipgloss/table"

Define some rows of data.

rows := [][]string{
    {"Chinese", "您好", "你好"},
    {"Japanese", "こんにちは", "やあ"},
    {"Arabic", "أهلين", "أهلا"},
    {"Russian", "Здравствуйте", "Привет"},
    {"Spanish", "Hola", "¿Qué tal?"},
}

Use the table package to style and render the table.

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.

fmt.Println(t)
Table example

For more on tables see the examples.

Additional Borders

Lip Gloss' Border now supports additional middle border separators.

type Border struct {
    // ...
    MiddleLeft   string
    MiddleRight  string
    Middle       string
    MiddleTop    string
    MiddleBottom string
}

v0.8.0

Compare Source

Predictable Tabs

At last: tabs that render the way you want ’em to. With the new 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.

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:


Full Changelog: https://github.com/charmbracelet/lipgloss/compare/v0.7.1...v0.8.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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/charmbracelet/lipgloss](https://github.com/charmbracelet/lipgloss) | require | minor | `v0.7.1` -> `v0.9.1` | --- ### Release Notes <details> <summary>charmbracelet/lipgloss (github.com/charmbracelet/lipgloss)</summary> ### [`v0.9.1`](https://github.com/charmbracelet/lipgloss/releases/tag/v0.9.1) [Compare Source](https://github.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 [@&#8203;maaslalani](https://github.com/maaslalani) in https://github.com/charmbracelet/lipgloss/pull/234 - Downgrade Lip Gloss to `v1.17` by [@&#8203;maaslalani](https://github.com/maaslalani) in https://github.com/charmbracelet/lipgloss/pull/234 **Full Changelog**: https://github.com/charmbracelet/lipgloss/compare/v0.9.0...v0.9.1 ### [`v0.9.0`](https://github.com/charmbracelet/lipgloss/releases/tag/v0.9.0) [Compare Source](https://github.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! 💅 <img width="1000" alt="image" src="https://github.com/charmbracelet/lipgloss/assets/42545625/932cf5b6-8332-4ae7-b432-f88e184bbbf2"> View [the source code](https://github.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) ``` <img width="973" alt="Table example" src="https://github.com/charmbracelet/lipgloss/assets/42545625/6e4b70c4-f494-45da-a467-bdd27df30d5d"> For more on tables see [the examples](https://github.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://github.com/charmbracelet/lipgloss/releases/tag/v0.8.0) [Compare Source](https://github.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 [@&#8203;mieubrisse](https://github.com/mieubrisse) in https://github.com/charmbracelet/lipgloss/pull/197 - fix: renderer race condition by [@&#8203;aymanbagabas](https://github.com/aymanbagabas) in https://github.com/charmbracelet/lipgloss/pull/210 - fix: cache color profile and background by [@&#8203;aymanbagabas](https://github.com/aymanbagabas) in https://github.com/charmbracelet/lipgloss/pull/212 *** **Full Changelog**: https://github.com/charmbracelet/lipgloss/compare/v0.7.1...v0.8.0 </details> --- ### 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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi40Mi40IiwidXBkYXRlZEluVmVyIjoiMzcuODkuNCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciJ9-->
renovate added 1 commit 2023-08-22 19:31:19 +00:00
renovate changed title from chore(deps): update module github.com/charmbracelet/lipgloss to v0.8.0 to chore(deps): update module github.com/charmbracelet/lipgloss to v0.9.0 2023-10-10 19:32:24 +00:00
renovate force-pushed renovate/github.com-charmbracelet-lipgloss-0.x from 58818eaa76 to 376f9d803b 2023-10-10 19:32:24 +00:00 Compare
renovate force-pushed renovate/github.com-charmbracelet-lipgloss-0.x from 376f9d803b to 28917eb285 2023-10-12 19:31:40 +00:00 Compare
renovate changed title from chore(deps): update module github.com/charmbracelet/lipgloss to v0.9.0 to chore(deps): update module github.com/charmbracelet/lipgloss to v0.9.1 2023-10-12 19:31:40 +00:00
renovate force-pushed renovate/github.com-charmbracelet-lipgloss-0.x from 28917eb285 to 77e93849dd 2023-12-03 06:01:48 +00:00 Compare
renovate force-pushed renovate/github.com-charmbracelet-lipgloss-0.x from 77e93849dd to 99ade9e037 2023-12-09 08:58:45 +00:00 Compare
renovate force-pushed renovate/github.com-charmbracelet-lipgloss-0.x from 99ade9e037 to 67ada4c752 2023-12-14 19:31:14 +00:00 Compare
This repo is archived. You cannot comment on pull requests.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Kichiyaki/gootp#51
No description provided.