Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update module github.com/charmbracelet/lipgloss to v0.13.0 #7049

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Aug 21, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
github.com/charmbracelet/lipgloss v0.12.1 -> v0.13.0 age adoption passing confidence

Release Notes

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

v0.13.0

Compare Source

Woodn’t you know, Lip Gloss has trees!

Lip Gloss now ships with a tree rendering sub-package!

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

Define a new tree.

t := tree.Root(".").
  Child("A", "B", "C")

Print the tree.

fmt.Println(t)

// .
// ├── A
// ├── B
// └── C

Trees have the ability to nest.

t := tree.Root(".").
  Child("Item 1").
  Child(
    tree.Root("Item 2").
      Child("Item 2.1").
      Child("Item 2.2").
      Child("Item 2.3"),
  ).
  Child(
    tree.Root("Item 3").
      Child("Item 3.1").
      Child("Item 3.2"),
  )

Print the tree.

fmt.Println(t)

Tree Example (simple)

Trees 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)

t := tree.Root("Makeup").
  Child(
    "Glossier",
    "Claire’s Boutique",
    "Nyx",
    "Mac",
    "Milk",
  ).
  Enumerator(tree.RoundedEnumerator).
  EnumeratorStyle(enumeratorStyle).
  ItemStyle(itemStyle).
  RootStyle(lipgloss.NewStyle().Foreground(lipgloss.Color("#​04B575")))

Print the tree.

Tree Example (makeup)

The predefined enumerators for trees are DefaultEnumerator and RoundedEnumerator.

If you need, you can also build trees incrementally:

t := tree.New()

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

There’s more where that came from

See all the tree examples.


Changelog

New Features
Bug fixes
Documentation updates

The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on 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 was generated by Mend Renovate. View the repository job log.

@xhofe xhofe merged commit d9a1809 into main Aug 21, 2024
3 checks passed
@xhofe xhofe deleted the renovate/github.com-charmbracelet-lipgloss-0.x branch August 21, 2024 16:42
Three-taile-dragon pushed a commit to loognsss/blist that referenced this pull request Sep 26, 2024
…AlistGo#7049)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant