Documentation
¶
Index ¶
- func BuildJSONChildren(v any, depth int, orderedKeys []string, rawJSON ...[]byte) []*line.LogLine
- func RenderExpanded(l *line.LogLine, width int, cursorPath []int, wrapMode bool, styles *Styles) ([]string, int)
- func RenderLine(l *line.LogLine, width int, isCursor bool, styles *Styles) string
- func RenderLineWrapped(l *line.LogLine, width int, isCursor bool, wrap bool, styles *Styles) []string
- func VisualHeight(l *line.LogLine, width int, wrap bool, styles *Styles) int
- func WrapLine(s string, width int) []string
- type Styles
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildJSONChildren ¶
BuildJSONChildren creates child LogLines for an expanded JSON value. orderedKeys provides the key order for objects. rawJSON is the original JSON bytes used to extract nested key order.
func RenderExpanded ¶
func RenderExpanded(l *line.LogLine, width int, cursorPath []int, wrapMode bool, styles *Styles) ([]string, int)
RenderExpanded renders a line and its children when expanded. When wrapMode is true, all children are wrapped. The cursor child (identified by cursorPath) always wraps regardless of wrapMode. Returns the rendered rows and the 0-based index of the cursor row (-1 if no cursor in this tree).
func RenderLine ¶
RenderLine renders a single LogLine to a string.
func RenderLineWrapped ¶
func RenderLineWrapped(l *line.LogLine, width int, isCursor bool, wrap bool, styles *Styles) []string
RenderLineWrapped renders a single LogLine, returning multiple visual rows if wrap is true. When isCursor is true, the line is always shown unwrapped (full content visible) regardless of the global wrap setting.
func VisualHeight ¶
VisualHeight returns how many terminal rows a line will occupy at the given width. If wrap is false, always returns 1. If wrap is true, computes based on content width.
Types ¶
type Styles ¶
type Styles struct {
CursorLine lipgloss.Style
JSONKey lipgloss.Style
JSONString lipgloss.Style
JSONNumber lipgloss.Style
JSONBool lipgloss.Style
JSONNull lipgloss.Style
JSONBrace lipgloss.Style
DiffAdd lipgloss.Style
DiffRemove lipgloss.Style
DiffHunk lipgloss.Style
DiffHeader lipgloss.Style
GoTestPass lipgloss.Style
GoTestFail lipgloss.Style
GoTestSkip lipgloss.Style
GoTestRun lipgloss.Style
GoTestDuration lipgloss.Style
WarnPrefix lipgloss.Style
ErrorPrefix lipgloss.Style
InfoPrefix lipgloss.Style
DebugPrefix lipgloss.Style
Timestamp lipgloss.Style
Datetime lipgloss.Style
SourceRef lipgloss.Style
K8sResource lipgloss.Style
K8sEventNormal lipgloss.Style
K8sEventWarning lipgloss.Style
LevelError lipgloss.Style
LevelWarn lipgloss.Style
LevelInfo lipgloss.Style
LevelDebug lipgloss.Style
NginxField lipgloss.Style
IPAddr lipgloss.Style
FailedStep lipgloss.Style
TableHeader lipgloss.Style
TableCell lipgloss.Style
TableSep lipgloss.Style
StderrGutter lipgloss.Style
ExpandIndicator lipgloss.Style
SearchMatch lipgloss.Style
Plain lipgloss.Style
}
Styles holds all style definitions used by renderers.