Lipgloss Versions Save

Style definitions for nice terminal layouts đź‘„

v0.2.1

3 years ago

Border Fantasy

This PR adds support for fancier borders, fixes some bugs, and adds a helper function for measuring text blocks.

With the new border support, it's possible to construct borders from multiple runes, such as this:

A Rococo-style border constructed of multiple runes

New

  • Support for multi-rune borders
  • Added Size() (int, int) for returning the width and the height of a block in one go

Fixed

  • Bump go-runewidth to fix some emoji mis-measuring
  • Fix a panic that could happen in custom borders

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse or right here in GitHub Discussions.

The Charm logo

v0.2.0

3 years ago

Getters

This PR adds getters for all style rules, enabling you to query your style rules. This can be handy when building layouts, particularly when styles are variable, such as a component. For example:

if headerStyle.GetMarginLeft() > lipgloss.Width(spinner) + lipgloss.Width(gap) {
    // jam the spinner in the left gutter
} else {
   // just put the spinner on the right
}

For details on the getter API, check out the docs.


Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse or right here in GitHub Discussions.

The Charm logo

v0.1.3

3 years ago

Data Race

This bugfix fixes a potential data race when querying for the background color internally for the first time.


Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse or right here in GitHub Discussions.

The Charm logo

v0.1.2

3 years ago

Border Color API Adjustments

This update makes the border color API more consistent with the other color-related potions of the API by dropping the Color suffix in color-related border methods.

Changes to border foreground methods:

  • BorderForegroundColor is now BorderForeground
  • BorderTopForegroundColor is now BorderTopForeground
  • BorderRightForegroundColor is now BorderRightForeground
  • BorderBottomForegroundColor is now BorderBottomForeground
  • BorderLeftForegroundColor is now BorderLeftForeground

Changes to border background methods:

  • BorderBackgroundColor is now BorderBackground
  • BorderTopBackgroundColor is now BorderTopBackground
  • BorderRightBackgroundColor is now BorderRightBackground
  • BorderBottomBackgroundColor is now BorderBottomBackground
  • BorderLeftBackgroundColor is now BorderLeftBackground

Also:

  • UnsetBorderColor has been removed. To unset border colors use UnsetBorderForeground and UnsetBorderBackground.

We hope you’re enjoying Lip Gloss!


Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse or right here in GitHub Discussions.

The Charm logo

v0.1.1

3 years ago

Windows Legacy

This release includes support for the Windows 10 legacy command console, which includes cmd.exe and the standalone PowerShell application on Windows. Lip Gloss should now "just work" on those consoles.

Note that ANSI already works by default in Windows Terminal.

lipgloss.dll

Thoughts? Questions? Feel free to reach out on Twitter, The Fediverse or right here in GitHub Discussions. We love hearing from you.

The Charm logo

v0.1.0

3 years ago

Hello World

We’re excited to present Lip Gloss, a new declarative terminal styling library built with TUIs in mind. We made this library after seeing design patterns emerge while building Bubble Tea projects such as Glow.

Lip Gloss does not replace Bubble Tea. Rather, it is a Bubble Tea companion. It was designed to make building terminal user interfaces—and general terminal rendering—as simple and fun as possible, allowing you to focus on building your application rather than concerning yourself with the nuts and bolts of layout details.

Let us know what you think. Feel free to reach out on Twitter, The Fediverse or right here in GitHub Discussions. We love hearing from you.

The Charm logo