Documentation
¶
Overview ¶
Package kit holds the shared Bubble Tea widgets and rendering primitives used by the stats and links screens.
Index ¶
- func Bind(keys, desc string) key.Binding
- func Center(bg, fg string, width, height int) string
- func ISODate(s string) string
- func MiniSpark(pts []api.MetricPoint, width int) string
- func NewHelp() help.Model
- func NiceCeil(v float64) float64
- func OrNever(s string) string
- func PadToWidth(s string, w int) string
- func ParseBucketTime(label string) (time.Time, bool)
- func TruncateToWidth(s string, w int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Center ¶
Center composites fg over bg, centered. The background stays visible but drops to the backdrop gray so the dialog owns the eye.
func MiniSpark ¶
func MiniSpark(pts []api.MetricPoint, width int) string
MiniSpark draws a compact sparkline covering the WHOLE series: when there are more points than columns they are summed into buckets, so old activity is never silently cut off the left edge.
func NewHelp ¶
NewHelp builds a help bubble in the dashboard's palette: keys at hint gray, descriptions a step fainter.
func PadToWidth ¶
PadToWidth right-pads by display width (emoji-safe, unlike %-*s).
func ParseBucketTime ¶
ParseBucketTime parses a backend time-bucket label.
func TruncateToWidth ¶
TruncateToWidth trims a string to at most w display columns.
Types ¶
This section is empty.