MCPcopy Create free account

hub / github.com/charmbracelet/lipgloss / functions

Functions731 in github.com/charmbracelet/lipgloss

↓ 1 callersMethodapplyMargins
(str string, inline bool)
style.go:543
↓ 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:380
↓ 1 callersMethodcomputeHeight
computeHeight computes the height of the table in its current configuration.
table/table.go:371
↓ 1 callersMethodconstructBottomBorder
constructBottomBorder constructs the bottom border for the table given it's current border configuration and data.
table/table.go:404
↓ 1 callersMethodconstructHeaders
constructHeaders constructs the headers for the table given it's current header configuration and data.
table/table.go:423
↓ 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:484
↓ 1 callersMethodconstructTopBorder
constructTopBorder constructs the top border for the table given it's current border configuration and data.
table/table.go:385
↓ 1 callersFunctiondefaultStyles
()
examples/tree/toggle/main.go:17
↓ 1 callersMethoddetectContentHeight
detectContentHeight detects the content height.
table/resizing.go:439
↓ 1 callersMethoddetectTableWidth
detectTableWidth detects the table width.
table/resizing.go:198
↓ 1 callersFunctionensureParent
(nodes Children, item *Tree)
tree/tree.go:207
↓ 1 callersMethodexpandTableWidth
expandTableWidth expands the table width.
table/resizing.go:203
↓ 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 callersFunctionisDarkColor
isDarkColor returns whether the given color is dark (based on the luminance portion of the color as interpreted as HSL). Example usage: color := li
color.go:225
↓ 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:385
↓ 1 callersFunctionmaxRuneWidthOld
(str string)
borders_test.go:211
↓ 1 callersMethodmaxTotal
maxTotal returns the maximum total width.
table/resizing.go:398
↓ 1 callersMethodmaybeConvertTabs
(str string)
style.go:528
↓ 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:236
↓ 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:145
↓ 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:190
↓ 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 callersFunctionrequireFalse
(tb testing.TB, b bool)
style_test.go:499
↓ 1 callersFunctionrequireTrue
(tb testing.TB, b bool)
style_test.go:494
↓ 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:40
↓ 1 callersMethodsetFrom
setFrom sets the property from another style.
set.go:111
↓ 1 callersMethodshrinkTableWidth
shrinkTableWidth shrinks the table width.
table/resizing.go:241
↓ 1 callersMethodstyleBorder
styleBorder applies foreground and background styling to a border.
borders.go:527
↓ 1 callersMethodstyleBorderBlend
styleBorderBlend applies foreground and background styling to a border, using blending.
borders.go:542
↓ 1 callersMethodtotalHorizontalPadding
totalHorizontalPadding returns the total padding.
table/resizing.go:410
↓ 1 callersFunctiontrimSpace
(s string)
list/list_test.go:361
↓ 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:457
↓ 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:70
FunctionAsterisk
Asterisk is an enumeration using asterisks. Example: * Foo * Bar * Baz * Qux.
list/enumerator.go:115
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:647
FunctionBenchmarkStyleRender
(b *testing.B)
style_test.go:667
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:104
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:365
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:265
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
FunctionDash
Dash is an enumeration using dashes. Example: - Foo - Bar - Baz - Qux.
list/enumerator.go:126
FunctionDefaultEnumerator
DefaultEnumerator enumerates a tree. ├── Foo ├── Bar ├── Baz └── Qux.
tree/enumerator.go:23
FunctionDefaultIndenter
DefaultIndenter indents a tree for nested trees and multiline content. ├── Foo ├── Bar │ ├── Qux │ ├── Quux │ │ ├── Foo │ │ └── Bar │ └
tree/enumerator.go:69
FunctionDefaultStyles
DefaultStyles is a TableStyleFunc that returns a new Style with no attributes.
table/table.go:40
FunctionDoubleBorder
DoubleBorder returns a border comprised of two thin strokes.
borders.go:254
← previousnext →301–400 of 731, ranked by callers