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

Update module github.com/charmbracelet/lipgloss to v0.13.0 #71

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Aug 21, 2024

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 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("macOS").
    Child(
        tree.New().
            Root("Linux").
            Child("NixOS").
            Child("Arch Linux (btw)").
            Child("Void Linux"),
        ).
    Child(
        tree.New().
            Root("BSD").
            Child("FreeBSD").
            Child("OpenBSD"),
    )

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("63")).MarginRight(1)
rootStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("35"))
itemStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("212"))

t := tree.
    Root("⁜ Makeup").
    Child(
        "Glossier",
        "Fenty Beauty",
        tree.New().Child(
            "Gloss Bomb Universal Lip Luminizer",
            "Hot Cheeks Velour Blushlighter",
        ),
        "Nyx",
        "Mac",
        "Milk",
    ).
    Enumerator(tree.RoundedEnumerator).
    EnumeratorStyle(enumeratorStyle).
    RootStyle(rootStyle).
    ItemStyle(itemStyle)

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.

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.

0 participants