tui

package
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package tui renders scan report in an interactive table

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLines added in v1.3.1

func GetLines(s string) (lines []string, widest int)

GetLines Split a string into lines, additionally returning the size of the widest line.

func PlaceOverlay added in v1.3.1

func PlaceOverlay(
	x, y int,
	fg, bg string,
	shadow bool, opts ...WhitespaceOption,
) string

PlaceOverlay places fg on top of bg.

func PlaceOverlayWithPosition added in v1.3.1

func PlaceOverlayWithPosition(
	position OverlayPosition,
	fullWidth, fullHeight int,
	fg, bg string,
	shadow bool, opts ...WhitespaceOption,
) string

PlaceOverlayWithPosition places fg on top of bg with overlay position

func ShowReportTUI

func ShowReportTUI(r report.ScanReport, colorSchemeName string) error

ShowReportTUI runs a Bubble Tea UI that renders the ScanReport in a table.

Types

type Keybinding added in v1.3.1

type Keybinding struct {
	Key         string
	Description string
	ShortDesc   string
}

type Model

type Model struct {
	// contains filtered or unexported fields
}

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

type OverlayPosition added in v1.3.1

type OverlayPosition string
const (
	OverlayPositionCenter      OverlayPosition = "center"
	OverlayPositionTopRight    OverlayPosition = "topRight"
	OverlayPositionTopLeft     OverlayPosition = "topLeft"
	OverlayPositionBottomRight OverlayPosition = "bottomright"
)

type WhitespaceOption added in v1.3.1

type WhitespaceOption func(*whitespace)

WhitespaceOption sets a styling rule for rendering whitespace.

func WithWhitespaceChars added in v1.3.1

func WithWhitespaceChars(s string) WhitespaceOption

WithWhitespaceChars sets the characters to be rendered in the whitespace.

Directories

Path Synopsis
Package repostable is a Model that renders git repo states in a table.
Package repostable is a Model that renders git repo states in a table.
Package repostableheader is a Model for repos table.
Package repostableheader is a Model for repos table.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL