Skip to content

Conversation

gabe565-renovate[bot]
Copy link
Contributor

@gabe565-renovate gabe565-renovate bot commented Jul 10, 2024

This PR contains the following updates:

Package Type Update Change
github.com/charmbracelet/lipgloss require minor v0.11.0 -> v0.12.1

Release Notes

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

v0.12.1

Compare Source

This release fixes a regression with regard to border calculations introduced in Lip Gloss v0.11.1.


The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.

v0.12.0

Compare Source

Lists, Check ✓

This release adds a new sub-package for rendering trees and lists.

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

Define a new list.

l := list.New("A", "B", "C")

Print the list.

fmt.Println(l)

// • A
// • B
// • C

Lists have the ability to nest.

l := list.New(
  "A", list.New("Artichoke"),
  "B", list.New("Baking Flour", "Bananas", "Barley", "Bean Sprouts"),
  "C", list.New("Cashew Apple", "Cashews", "Coconut Milk", "Curry Paste", "Currywurst"),
  "D", list.New("Dill", "Dragonfruit", "Dried Shrimp"),
  "E", list.New("Eggs"),
  "F", list.New("Fish Cake", "Furikake"),
  "J", list.New("Jicama"),
  "K", list.New("Kohlrabi"),
  "L", list.New("Leeks", "Lentils", "Licorice Root"),
)

Print the list.

fmt.Println(l)

image

Lists can be customized via their enumeration function as well as using
lipgloss.Styles.

enumeratorStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("99")).MarginRight(1)
itemStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("212")).MarginRight(1)

l := list.New(
  "Glossier",
  "Claire’s Boutique",
  "Nyx",
  "Mac",
  "Milk",
).
  Enumerator(list.Roman).
  EnumeratorStyle(enumeratorStyle).
  ItemStyle(itemStyle)

Print the list.

List example

In addition to the predefined enumerators (Arabic, Alphabet, Roman, Bullet, Tree),
you may also define your own custom enumerator:

l := list.New("Duck", "Duck", "Duck", "Duck", "Goose", "Duck", "Duck")

func DuckDuckGooseEnumerator(l list.Items, i int) string {
    if l.At(i).Value() == "Goose" {
        return "Honk →"
    }
    return ""
}

l = l.Enumerator(DuckDuckGooseEnumerator)

Print the list:

image

If you need, you can also build lists incrementally:

l := list.New()

for i := 0; i < repeat; i++ {
    l.Item("Lip Gloss")
}

The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.

v0.11.1

Compare Source

This release is a small patch release to fix text truncation in table cells. For details see: https://github.com/charmbracelet/lipgloss/issues/324.

Other stuff

Full Changelog: charmbracelet/lipgloss@v0.11.0...v0.11.1


The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or Discord.


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.

@gabe565-renovate
Copy link
Contributor Author

gabe565-renovate bot commented Jul 10, 2024

ℹ Artifact update notice

File name: go.mod

In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):

  • 1 additional dependency was updated

Details:

Package Change
github.com/charmbracelet/x/ansi v0.1.2 -> v0.1.4

@gabe565-renovate gabe565-renovate bot force-pushed the renovate/github.com-charmbracelet-lipgloss-0.x branch from 6fa8a2c to 3dfaead Compare July 12, 2024 00:26
@gabe565-renovate gabe565-renovate bot added minor and removed patch labels Jul 12, 2024
@gabe565-renovate gabe565-renovate bot changed the title chore(deps): update module github.com/charmbracelet/lipgloss to v0.11.1 chore(deps): update module github.com/charmbracelet/lipgloss to v0.12.0 Jul 12, 2024
@gabe565-renovate gabe565-renovate bot force-pushed the renovate/github.com-charmbracelet-lipgloss-0.x branch from 3dfaead to 4168122 Compare July 12, 2024 16:27
@gabe565-renovate gabe565-renovate bot changed the title chore(deps): update module github.com/charmbracelet/lipgloss to v0.12.0 chore(deps): update module github.com/charmbracelet/lipgloss to v0.12.1 Jul 12, 2024
@gabe565-renovate gabe565-renovate bot force-pushed the renovate/github.com-charmbracelet-lipgloss-0.x branch from 4168122 to adf8988 Compare July 28, 2024 09:53
@gabe565-renovate gabe565-renovate bot force-pushed the renovate/github.com-charmbracelet-lipgloss-0.x branch from adf8988 to 4dc25c8 Compare July 28, 2024 09:54
Copy link

@gabe565 gabe565 merged commit e5edf4c into main Jul 28, 2024
7 checks passed
@gabe565 gabe565 deleted the renovate/github.com-charmbracelet-lipgloss-0.x branch July 28, 2024 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant