MCPcopy Create free account

hub / github.com/charmbracelet/lipgloss / functions

Functions746 in github.com/charmbracelet/lipgloss

↓ 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:663
↓ 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
↓ 1 callersMethodapplyMargins
(str string, inline bool)
style.go:571
↓ 1 callersFunctionbackgroundColor
(in term.File, out term.File)
query.go:12
↓ 1 callersMethodborderBlend
(width, height int, colors ...color.Color)
borders.go:288
↓ 1 callersMethodboundsWithOffset
boundsWithOffset calculates bounds with parent offset applied.
layer.go:133
↓ 1 callersFunctionbton
bton converts a boolean to a specific integer, n if true, 0 if false.
table/util.go:16
↓ 1 callersFunctionclamp
(v, low, high T)
examples/blending/linear-2d/bubbletea/main.go:205
↓ 1 callersFunctioncolorGrid
colorGrid blends colors from 4 corner quadrants, into a box region.
examples/layout/main.go:397
↓ 1 callersFunctioncolorOrNil
(c any)
set.go:187
↓ 1 callersMethodcolumnCount
columnCount returns the column count.
table/resizing.go:386
↓ 1 callersMethodcomputeHeight
computeHeight computes the height of the table in its current configuration.
table/table.go:387
↓ 1 callersMethodconstructBottomBorder
constructBottomBorder constructs the bottom border for the table given it's current border configuration and data.
table/table.go:420
↓ 1 callersMethodconstructHeaders
constructHeaders constructs the headers for the table given it's current header configuration and data.
table/table.go:439
↓ 1 callersMethodconstructRow
constructRow constructs the row for the table given an index and row data based on the current configuration. If isOverflow is true, the row is render
table/table.go:500
↓ 1 callersMethodconstructTopBorder
constructTopBorder constructs the top border for the table given it's current border configuration and data.
table/table.go:401
↓ 1 callersFunctiondefaultStyles
()
examples/tree/toggle/main.go:17
↓ 1 callersMethoddetectContentHeight
detectContentHeight detects the content height.
table/resizing.go:445
↓ 1 callersMethoddetectTableWidth
detectTableWidth detects the table width.
table/resizing.go:204
↓ 1 callersFunctionensureParent
(nodes Children, item *Tree)
tree/tree.go:214
↓ 1 callersMethodexpandTableWidth
expandTableWidth expands the table width.
table/resizing.go:209
↓ 1 callersMethodflattenRecursive
flattenRecursive recursively collects all layers with their absolute positions.
layer.go:245
↓ 1 callersMethodhas
has checks if a property is set.
style.go:107
↓ 1 callersFunctionisSpaceSequence
isSpaceSequence reports whether the given grapheme consists solely of whitespace runes.
style.go:547
↓ 1 callersFunctionmakeEmptyRow
()
examples/table/mindy/main.go:61
↓ 1 callersFunctionmakeStyles
Create new styles.
examples/ssh/main.go:37
↓ 1 callersMethodmaxCharCount
maxCharCount returns the maximum character count.
table/resizing.go:391
↓ 1 callersFunctionmaxRuneWidthOld
(str string)
borders_test.go:211
↓ 1 callersMethodmaxTotal
maxTotal returns the maximum total width.
table/resizing.go:404
↓ 1 callersMethodmaybeConvertTabs
(str string)
style.go:556
↓ 1 callersFunctionmedian
median returns the median of a slice of integers.
table/util.go:33
↓ 1 callersMethodminWidth
minWidth returns the minimum width floor for a column: horizontal padding plus at least 1 to ensure the "…" truncation marker or one character is alwa
table/resizing.go:242
↓ 1 callersFunctionnewCard
newCard creates a little card with rounded borders and a text label.
examples/canvas/main.go:28
↓ 1 callersFunctionnewField
newField fills a rectangular area with a given character in a given color.
examples/canvas/main.go:13
↓ 1 callersFunctionnewRenderer
newRenderer returns the renderer used to render a tree.
tree/renderer.go:21
↓ 1 callersFunctionnewResizer
newResizer creates a new resizer.
table/resizing.go:151
↓ 1 callersFunctionnewStyles
Styles are initialized based on the background color of the terminal.
examples/compat/bubbletea/main.go:31
↓ 1 callersFunctionnewStyles
Styles are initialized based on the background color of the terminal.
examples/color/bubbletea/main.go:22
↓ 1 callersMethodoptimizedWidths
optimizedWidths returns the optimized column widths and row heights.
table/resizing.go:196
↓ 1 callersFunctionqueryBackgroundColor
queryBackgroundColor queries the terminal for the background color. If the terminal does not support querying the background color, nil is returned.
terminal.go:25
↓ 1 callersFunctionqueryTerminal
queryTerminal queries the terminal for support of various features and returns a list of response events. Most of the time, you will need to set stdin
terminal.go:63
↓ 1 callersMethodrender
render is responsible for actually rendering the tree.
tree/renderer.go:47
↓ 1 callersFunctionrenderHorizontalEdge
Render the horizontal (top or bottom) portion of a border.
borders.go:498
↓ 1 callersMethodresize
resize resizes the table to fit the specified width. Given a user defined table width, we must ensure the table is exactly that width. This must acco
table/resizing.go:47
↓ 1 callersFunctionrgbaString
(t *testing.T, c color.Color)
color_test.go:42
↓ 1 callersMethodsetFrom
setFrom sets the property from another style.
set.go:111
↓ 1 callersMethodshrinkTableWidth
shrinkTableWidth shrinks the table width.
table/resizing.go:247
↓ 1 callersMethodstyleBorder
styleBorder applies foreground and background styling to a border.
borders.go:531
↓ 1 callersMethodstyleBorderBlend
styleBorderBlend applies foreground and background styling to a border, using blending.
borders.go:546
↓ 1 callersMethodtotalHorizontalPadding
totalHorizontalPadding returns the total padding.
table/resizing.go:416
↓ 1 callersFunctiontrimSpace
(s string)
list/list_test.go:367
↓ 1 callersMethodupdateGradient
()
examples/blending/linear-2d/bubbletea/main.go:139
↓ 1 callersMethodvisibleRowIndexes
visibleRowIndexes calculates the indexes of the first and last visible rows according to the current yOffset and tableHeight. If the table height is n
table/resizing.go:463
↓ 1 callersFunctionwhichSidesBool
whichSidesBool is like whichSidesInt, except it operates on a series of boolean values. See the comment on whichSidesInt for details on how this works
set.go:871
FunctionASCIIBorder
ASCIIBorder returns a table border with ASCII characters.
borders.go:277
MethodAddLayers
AddLayers adds layers to the compositor's root and refreshes the internal state.
layer.go:218
FunctionAlphabet
Alphabet is the enumeration for alphabetical listing. Example: a. Foo b. Bar c. Baz d. Qux.
list/enumerator.go:51
FunctionArabic
Arabic is the enumeration for arabic numerals listing. Example: 1. Foo 2. Bar 3. Baz 4. Qux.
list/enumerator.go:77
FunctionAsterisk
Asterisk is an enumeration using asterisks. Example: * Foo * Bar * Baz * Qux.
list/enumerator.go:122
MethodAt
At returns the row at the given index.
table/rows.go:83
MethodAt
At returns the child at the given index.
tree/children.go:38
MethodAt
At returns the item at the given index. The index is relative to the filtered results.
tree/children.go:71
FunctionBenchmarkBlend1D
(b *testing.B)
blending_test.go:328
FunctionBenchmarkBlend2D
(b *testing.B)
blending_test.go:342
FunctionBenchmarkBorderBlend
(b *testing.B)
borders_test.go:40
FunctionBenchmarkBorderRendering
(b *testing.B)
borders_test.go:9
FunctionBenchmarkBorderRenderingNoColors
(b *testing.B)
borders_test.go:74
FunctionBenchmarkGetFirstRuneAsString
(b *testing.B)
borders_test.go:146
FunctionBenchmarkMaxRuneWidth
(b *testing.B)
borders_test.go:180
FunctionBenchmarkPad
(b *testing.B)
style_test.go:697
FunctionBenchmarkStyleRender
(b *testing.B)
style_test.go:717
FunctionBenchmarkWidthMultiLine
(b *testing.B)
size_test.go:24
FunctionBenchmarkWidthSimple
(b *testing.B)
size_test.go:8
FunctionBlockBorder
BlockBorder returns a border that takes the whole block.
borders.go:233
MethodBorderBackground
BorderBackground is a shorthand function for setting all of the background colors of the borders at once. The arguments work as follows: With one arg
set.go:675
MethodBorderBottomBackground
BorderBottomBackground sets the background color of the bottom of the border.
set.go:707
MethodBorderBottomForeground
BorderBottomForeground sets the foreground color for the bottom of the border.
set.go:600
MethodBorderLeftBackground
BorderLeftBackground set the background color of the left side of the border.
set.go:714
MethodBorderLeftForeground
BorderLeftForeground sets the foreground color for the left side of the border.
set.go:607
MethodBorderRightBackground
BorderRightBackground sets the background color of right side the border.
set.go:700
MethodBorderRightForeground
BorderRightForeground sets the foreground color for the right side of the border.
set.go:593
MethodBorderTopBackground
BorderTopBackground sets the background color of the top of the border.
set.go:694
MethodBorderTopForeground
BorderTopForeground set the foreground color for the top of the border.
set.go:586
MethodBounds
Bounds returns the bounds of the LayerHit.
layer.go:181
MethodBounds
Bounds returns the overall bounds of all layers in the compositor.
layer.go:273
FunctionBullet
Bullet is the enumeration for bullet listing. Example: • Foo • Bar • Baz • Qux.
list/enumerator.go:111
MethodChildren
()
examples/tree/selection/main.go:71
MethodChildren
Children of a Leaf node are always empty.
tree/tree.go:60
MethodChildren
Children returns the children of a node.
tree/tree.go:372
MethodClear
Clear clears the canvas.
canvas.go:37
MethodColorWhitespace
ColorWhitespace determines whether or not the background color should be applied to the padding. This is true by default as it's more than likely the
set.go:396
MethodColumns
Columns returns the number of columns in the table.
table/rows.go:49
MethodColumns
Columns returns the number of columns in the table.
table/rows.go:99
FunctionComplete
Complete returns a function that will return the appropriate color based on the given color profile. Example usage: p := colorprofile.Detect(os.Std
color.go:260
MethodCopy
Copy returns a copy of this style, including any underlying string values. Deprecated: to copy just use assignment (i.e. a := b). All methods also re
style.go:229
← previousnext →301–400 of 746, ranked by callers