Documentation
¶
Overview ¶
Package static renders JSON node trees to the terminal with syntax highlighting and optional annotation overlays (stats, merkle hashes).
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cyber = Theme{ ObjectKey: lipgloss.NewStyle().Foreground(lipgloss.Color("#00D4FF")), ArrayIndex: lipgloss.NewStyle().Foreground(lipgloss.Color("#FF6B6B")), StringVal: lipgloss.NewStyle().Foreground(lipgloss.Color("#98C379")), NumberVal: lipgloss.NewStyle().Foreground(lipgloss.Color("#E5C07B")), BoolVal: lipgloss.NewStyle().Foreground(lipgloss.Color("#56B6C2")), NullVal: lipgloss.NewStyle().Foreground(lipgloss.Color("#5C6370")), Punctuation: lipgloss.NewStyle().Foreground(lipgloss.Color("#3A3A3A")), LineNumber: lipgloss.NewStyle().Foreground(lipgloss.Color("#3A3A3A")), HashTag: lipgloss.NewStyle().Foreground(lipgloss.Color("#C678DD")), StatTag: lipgloss.NewStyle().Foreground(lipgloss.Color("#FFD700")), ErrorStyle: lipgloss.NewStyle().Foreground(lipgloss.Color("#E06C75")), Banner: lipgloss.NewStyle().Foreground(lipgloss.Color("#00FF41")), BannerOK: lipgloss.NewStyle().Foreground(lipgloss.Color("#00D4FF")), }
Cyber is the default cyber/neural-interface theme.
View Source
var Dracula = Theme{ ObjectKey: lipgloss.NewStyle().Foreground(lipgloss.Color("#BD93F9")), ArrayIndex: lipgloss.NewStyle().Foreground(lipgloss.Color("#FF5555")), StringVal: lipgloss.NewStyle().Foreground(lipgloss.Color("#50FA7B")), NumberVal: lipgloss.NewStyle().Foreground(lipgloss.Color("#F1FA8C")), BoolVal: lipgloss.NewStyle().Foreground(lipgloss.Color("#8BE9FD")), NullVal: lipgloss.NewStyle().Foreground(lipgloss.Color("#6272A4")), Punctuation: lipgloss.NewStyle().Foreground(lipgloss.Color("#44475A")), LineNumber: lipgloss.NewStyle().Foreground(lipgloss.Color("#6272A4")), HashTag: lipgloss.NewStyle().Foreground(lipgloss.Color("#FF79C6")), StatTag: lipgloss.NewStyle().Foreground(lipgloss.Color("#F1FA8C")), ErrorStyle: lipgloss.NewStyle().Foreground(lipgloss.Color("#FF5555")), Banner: lipgloss.NewStyle().Foreground(lipgloss.Color("#50FA7B")), BannerOK: lipgloss.NewStyle().Foreground(lipgloss.Color("#BD93F9")).Bold(true), }
Dracula theme.
View Source
var Matrix = Theme{ ObjectKey: lipgloss.NewStyle().Foreground(lipgloss.Color("#00FF41")), ArrayIndex: lipgloss.NewStyle().Foreground(lipgloss.Color("#00CC33")), StringVal: lipgloss.NewStyle().Foreground(lipgloss.Color("#00BB2D")), NumberVal: lipgloss.NewStyle().Foreground(lipgloss.Color("#00FF41")), BoolVal: lipgloss.NewStyle().Foreground(lipgloss.Color("#00AA26")), NullVal: lipgloss.NewStyle().Foreground(lipgloss.Color("#005510")), Punctuation: lipgloss.NewStyle().Foreground(lipgloss.Color("#003308")), LineNumber: lipgloss.NewStyle().Foreground(lipgloss.Color("#003308")), HashTag: lipgloss.NewStyle().Foreground(lipgloss.Color("#00AA26")), StatTag: lipgloss.NewStyle().Foreground(lipgloss.Color("#00FF41")).Bold(true), ErrorStyle: lipgloss.NewStyle().Foreground(lipgloss.Color("#FF0000")), Banner: lipgloss.NewStyle().Foreground(lipgloss.Color("#00FF41")), BannerOK: lipgloss.NewStyle().Foreground(lipgloss.Color("#00FF41")).Bold(true), }
Matrix theme: green on black.
View Source
var Nord = Theme{ ObjectKey: lipgloss.NewStyle().Foreground(lipgloss.Color("#88C0D0")), ArrayIndex: lipgloss.NewStyle().Foreground(lipgloss.Color("#BF616A")), StringVal: lipgloss.NewStyle().Foreground(lipgloss.Color("#A3BE8C")), NumberVal: lipgloss.NewStyle().Foreground(lipgloss.Color("#EBCB8B")), BoolVal: lipgloss.NewStyle().Foreground(lipgloss.Color("#81A1C1")), NullVal: lipgloss.NewStyle().Foreground(lipgloss.Color("#4C566A")), Punctuation: lipgloss.NewStyle().Foreground(lipgloss.Color("#434C5E")), LineNumber: lipgloss.NewStyle().Foreground(lipgloss.Color("#4C566A")), HashTag: lipgloss.NewStyle().Foreground(lipgloss.Color("#B48EAD")), StatTag: lipgloss.NewStyle().Foreground(lipgloss.Color("#EBCB8B")), ErrorStyle: lipgloss.NewStyle().Foreground(lipgloss.Color("#BF616A")), Banner: lipgloss.NewStyle().Foreground(lipgloss.Color("#A3BE8C")), BannerOK: lipgloss.NewStyle().Foreground(lipgloss.Color("#88C0D0")).Bold(true), }
Nord theme.
Functions ¶
func Boot ¶
Boot prints the neural-interface boot sequence to stderr. Call before Render. Suppressed when opts.Quiet is true.
Types ¶
type Options ¶
type Options struct {
Theme Theme
ShowStats bool
ShowMerkle bool
ShowLineNums bool
Compact bool
Quiet bool
NoColor bool
Filename string
}
Options controls rendering behaviour.
type Theme ¶
type Theme struct {
ObjectKey lipgloss.Style
ArrayIndex lipgloss.Style
StringVal lipgloss.Style
NumberVal lipgloss.Style
BoolVal lipgloss.Style
NullVal lipgloss.Style
Punctuation lipgloss.Style
LineNumber lipgloss.Style
HashTag lipgloss.Style
StatTag lipgloss.Style
ErrorStyle lipgloss.Style
Banner lipgloss.Style
BannerOK lipgloss.Style
}
Theme holds the color palette for static rendering.
func ResolveTheme ¶ added in v1.0.0
ResolveTheme returns the named theme, defaulting to Cyber.
Click to show internal directories.
Click to hide internal directories.