MCPcopy Create free account

hub / github.com/charmbracelet/lipgloss / functions

Functions731 in github.com/charmbracelet/lipgloss

↓ 2 callersFunctiongetFirstRuneAsStringOld
Old implementation using rune slice conversion
borders_test.go:104
↓ 2 callersFunctionisItemSelected
(children tree.Children, index int)
examples/tree/selection/main.go:87
↓ 2 callersFunctionjoinString
joinString joins a list of strings into a single string separated with a space.
style.go:199
↓ 2 callersFunctionmakeRow
(start, end int)
examples/table/mindy/main.go:49
↓ 2 callersMethodmaxColumnWidths
maxColumnWidths returns the maximum column widths.
table/resizing.go:367
↓ 2 callersFunctionnewStyles
(dark bool)
examples/blending/linear-1d/bubbletea/main.go:71
↓ 2 callersFunctionpadLeft
Apply left padding.
style.go:583
↓ 2 callersFunctionpadRight
Apply right padding.
style.go:588
↓ 2 callersFunctionrequireNotEqual
(tb testing.TB, a, b any)
style_test.go:512
↓ 2 callersMethodtruncateCell
(cell string, rowIndex, colIndex int)
table/table.go:555
↓ 2 callersFunctionwhichSidesColor
whichSidesColor is like whichSides, except it operates on a series of boolean values. See the comment on whichSidesInt for details on how this works.
set.go:904
↓ 2 callersFunctionwhichSidesInt
whichSidesInt is a helper method for setting values on sides of a block based on the number of arguments. It follows the CSS shorthand rules for block
set.go:838
↓ 2 callersMethodyPaddingForCell
yPaddingForCell returns the horizontal padding for a cell.
table/resizing.go:426
↓ 1 callersMethodAlignHorizontal
AlignHorizontal sets a horizontal text alignment rule.
set.go:316
↓ 1 callersMethodAlignVertical
AlignVertical sets a vertical text alignment rule.
set.go:322
↓ 1 callersMethodAppend
Append appends a child to the list of children.
tree/children.go:18
↓ 1 callersMethodAt
At returns the contents of the cell at the given index.
table/rows.go:40
↓ 1 callersFunctionBackgroundColor
BackgroundColor queries the terminal's background color. Typically, you'll want to query against stdin and either stdout or stderr, depending on what
query.go:34
↓ 1 callersMethodBaseStyle
BaseStyle sets the base style for the whole table. If you need to set a background color for the whole table, use this.
table/table.go:103
↓ 1 callersMethodBorderForegroundBlendOffset
BorderForegroundBlendOffset sets the border blend offset cells, starting from the top left corner. Value can be positive or negative, and does not nee
set.go:655
↓ 1 callersMethodBounds
Bounds implements [uv.Screen].
canvas.go:42
↓ 1 callersMethodClearRows
ClearRows clears the table rows.
table/table.go:96
↓ 1 callersFunctionComplementary
Complementary returns the complementary color (180° away on color wheel) of the given color. This is useful for creating a contrasting color.
color.go:308
↓ 1 callersMethodCompose
Compose composes a [Layer] or any [uv.Drawable] onto the [Canvas].
canvas.go:72
↓ 1 callersFunctionDarken
Darken takes a color and makes it darker by a specific percentage (0-1, clamped).
color.go:328
↓ 1 callersFunctionDataToMatrix
DataToMatrix is a helper function that converts an object that implements the Data interface into a table.
table/rows.go:117
↓ 1 callersMethodDraw
Draw draws the content of the layer on the screen at the specified area.
layer.go:153
↓ 1 callersMethodDraw
Draw draws the [Canvas] onto the given [uv.Screen] within the specified area. It implements [uv.Drawable].
canvas.go:81
↓ 1 callersMethodEnumeratorStyle
EnumeratorStyle sets a static style for all enumerators. Use EnumeratorStyleFunc to conditionally set styles based on the tree node.
tree/tree.go:234
↓ 1 callersMethodFilter
Filter uses a filter function to set a condition that all the data must satisfy to be in the Tree.
tree/children.go:86
↓ 1 callersMethodGetBorderBottom
GetBorderBottom returns the style's bottom border setting. If no value is set false is returned.
get.go:265
↓ 1 callersMethodGetBorderBottomSize
GetBorderBottomSize returns the width of the bottom border. If borders contain runes of varying widths, the widest rune is returned. If no border exis
get.go:373
↓ 1 callersMethodGetBorderLeft
GetBorderLeft returns the style's left border setting. If no value is set false is returned.
get.go:271
↓ 1 callersMethodGetBorderLeftSize
GetBorderLeftSize returns the width of the left border. If borders contain runes of varying widths, the widest rune is returned. If no border exists o
get.go:360
↓ 1 callersMethodGetBorderRight
GetBorderRight returns the style's right border setting. If no value is set false is returned.
get.go:259
↓ 1 callersMethodGetBorderRightSize
GetBorderRightSize returns the width of the right border. If borders contain runes of varying widths, the widest rune is returned. If no border exists
get.go:386
↓ 1 callersMethodGetBorderTop
GetBorderTop returns the style's top border setting. If no value is set false is returned.
get.go:253
↓ 1 callersMethodGetBottomSize
GetBottomSize returns the width of the bottom border. If borders contain runes of varying widths, the widest rune is returned. If no border exists on
borders.go:49
↓ 1 callersMethodGetHeight
GetHeight returns the height of the table.
table/table.go:270
↓ 1 callersMethodGetHyperlink
GetHyperlink returns the hyperlink along with its parameters. If no hyperlink is set, empty strings are returned.
get.go:476
↓ 1 callersMethodGetInline
GetInline returns the style's inline setting. If no value is set false is returned.
get.go:412
↓ 1 callersMethodGetLeftSize
GetLeftSize returns the width of the left border. If borders contain runes of varying widths, the widest rune is returned. If no border exists on the
borders.go:56
↓ 1 callersMethodGetPaddingChar
GetPaddingChar returns the style's padding character. If no value is set a space is returned.
get.go:152
↓ 1 callersMethodGetReverse
GetReverse returns the style's reverse value. If no value is set false is returned.
get.go:47
↓ 1 callersMethodGetRightSize
GetRightSize returns the width of the right border. If borders contain runes of varying widths, the widest rune is returned. If no border exists on th
borders.go:42
↓ 1 callersMethodGetTopSize
GetTopSize returns the width of the top border. If borders contain runes of varying widths, the widest rune is returned. If no border exists on the to
borders.go:35
↓ 1 callersMethodGetUnderlineColor
GetUnderlineColor returns the style's underline color. If no value is set NoColor{} is returned.
get.go:35
↓ 1 callersMethodGetVerticalPadding
GetVerticalPadding returns the style's top and bottom padding. Unset values are measured as 0.
get.go:168
↓ 1 callersMethodGetWidth
GetWidth returns the style's width setting. If no width is set 0 is returned.
get.go:77
↓ 1 callersMethodIndenterStyle
IndenterStyle sets a static style for all indenters. Use IndenterStyleFunc to conditionally set styles based on the tree node.
tree/tree.go:262
↓ 1 callersMethodIndenterStyleFunc
IndenterStyleFunc sets the enumerator style function for the list items. Use this to conditionally set different styles based on the current items, s
list/list.go:173
↓ 1 callersFunctionJoinHorizontal
JoinHorizontal is a utility function for horizontally joining two potentially multi-lined strings along a vertical axis. The first argument is the pos
join.go:28
↓ 1 callersFunctionJoinVertical
JoinVertical is a utility function for vertically joining two potentially multi-lined strings along a horizontal axis. The first argument is the posit
join.go:116
↓ 1 callersFunctionLighten
Lighten makes a color lighter by a specific percentage (0-1, clamped).
color.go:345
↓ 1 callersFunctionNewLayer
NewLayer creates a new [Layer] with the given content and optional child layers.
layer.go:22
↓ 1 callersFunctionNewLeaf
NewLeaf returns a new Leaf.
tree/tree.go:52
↓ 1 callersFunctionNewRange
NewRange returns a range and style that can be used with [StyleRanges].
ranges.go:39
↓ 1 callersMethodPaddingTop
PaddingTop adds padding to the top of the block.
set.go:367
↓ 1 callersFunctionPlaceHorizontal
PlaceHorizontal places a string or text block horizontally in an unstyled block of a given width. If the given width is shorter than the max width of
position.go:43
↓ 1 callersFunctionPlaceVertical
PlaceVertical places a string or text block vertically in an unstyled block of a given height. If the given height is shorter than the height of the s
position.go:90
↓ 1 callersMethodSetHidden
SetHidden hides a Leaf node.
tree/tree.go:87
↓ 1 callersMethodSetValue
(any)
tree/tree.go:42
↓ 1 callersMethodSetValue
SetValue sets the value of a Leaf node.
tree/tree.go:70
↓ 1 callersMethodString
()
examples/tree/selection/main.go:48
↓ 1 callersMethodString
()
examples/tree/selection/main.go:63
↓ 1 callersFunctionStyleRanges
StyleRanges applying styling to ranges in a string. Existing styles will be taken into account. Ranges should not overlap.
ranges.go:11
↓ 1 callersFunctionStyleRunes
StyleRunes apply a given style to runes at the given indices in the string. Note that you must provide styling options for both matched and unmatched
runes.go:10
↓ 1 callersMethodUnsetBackground
UnsetBackground removes the background style rule, if set.
unset.go:56
↓ 1 callersMethodUnsetBlink
UnsetBlink removes the blink style rule, if set.
unset.go:38
↓ 1 callersMethodUnsetBold
UnsetBold removes the bold style rule, if set.
unset.go:9
↓ 1 callersMethodUnsetBorderTopBackground
UnsetBorderTopBackground removes the top border background color rule, if set.
unset.go:280
↓ 1 callersMethodUnsetFaint
UnsetFaint removes the faint style rule, if set.
unset.go:44
↓ 1 callersMethodUnsetForeground
UnsetForeground removes the foreground style rule, if set.
unset.go:50
↓ 1 callersMethodUnsetHyperlink
UnsetHyperlink removes the value set by Hyperlink.
unset.go:348
↓ 1 callersMethodUnsetInline
UnsetInline removes the inline style rule, if set.
unset.go:306
↓ 1 callersMethodUnsetItalic
UnsetItalic removes the italic style rule, if set.
unset.go:15
↓ 1 callersMethodUnsetMarginBottom
UnsetMarginBottom removes the bottom margin style rule, if set.
unset.go:166
↓ 1 callersMethodUnsetMarginLeft
UnsetMarginLeft removes the left margin style rule, if set.
unset.go:148
↓ 1 callersMethodUnsetMarginRight
UnsetMarginRight removes the right margin style rule, if set.
unset.go:154
↓ 1 callersMethodUnsetMarginTop
UnsetMarginTop removes the top margin style rule, if set.
unset.go:160
↓ 1 callersMethodUnsetPaddingBottom
UnsetPaddingBottom removes the bottom padding style rule, if set.
unset.go:127
↓ 1 callersMethodUnsetPaddingChar
UnsetPaddingChar removes the padding character style rule, if set.
unset.go:103
↓ 1 callersMethodUnsetPaddingLeft
UnsetPaddingLeft removes the left padding style rule, if set.
unset.go:109
↓ 1 callersMethodUnsetPaddingRight
UnsetPaddingRight removes the right padding style rule, if set.
unset.go:115
↓ 1 callersMethodUnsetPaddingTop
UnsetPaddingTop removes the top padding style rule, if set.
unset.go:121
↓ 1 callersMethodUnsetReverse
UnsetReverse removes the reverse style rule, if set.
unset.go:32
↓ 1 callersMethodUnsetStrikethrough
UnsetStrikethrough removes the strikethrough style rule, if set.
unset.go:26
↓ 1 callersMethodUnsetStrikethroughSpaces
UnsetStrikethroughSpaces removes the value set by StrikethroughSpaces.
unset.go:336
↓ 1 callersMethodUnsetString
UnsetString sets the underlying string value to the empty string.
unset.go:356
↓ 1 callersMethodUnsetTabWidth
UnsetTabWidth removes the tab width style rule, if set.
unset.go:324
↓ 1 callersMethodUnsetUnderline
UnsetUnderline removes the underline style rule, if set.
unset.go:21
↓ 1 callersMethodUnsetUnderlineSpaces
UnsetUnderlineSpaces removes the value set by UnderlineSpaces.
unset.go:330
↓ 1 callersMethodValue
Value returns the value of a Leaf node.
tree/tree.go:65
↓ 1 callersFunctionWrap
Wrap wraps the given string to the given width, preserving ANSI styles and links.
wrap.go:12
↓ 1 callersMethodZ
Z sets the z-index of the Layer relative to its parent.
layer.go:69
↓ 1 callersFunctionabs
(a int)
style.go:631
↓ 1 callersFunctionaddBranches
(root *tree.Tree, path string)
examples/tree/files/main.go:13
↓ 1 callersFunctionalignTextHorizontal
Perform text alignment. If the string is multi-lined, we also make all lines the same width by padding them with spaces. If a style is passed, use tha
align.go:12
↓ 1 callersMethodapplyBorder
(str string)
borders.go:327
↓ 1 callersFunctionapplyGradient
applyGradient applies a gradient to the given string.
examples/layout/main.go:413
← previousnext →201–300 of 731, ranked by callers