core

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiffFormatter

func DiffFormatter() *diffview.DiffView

func NewSimpleHelp

func NewSimpleHelp(shortList []key.Binding, fullList [][]key.Binding) help.KeyMap

func Section

func Section(text string, width int) string

func SectionWithInfo

func SectionWithInfo(text string, width int, info string) string

func SelectableButton

func SelectableButton(opts ButtonOpts) string

SelectableButton creates a button with an underlined character and selection state

func SelectableButtons

func SelectableButtons(buttons []ButtonOpts, spacing string) string

SelectableButtons creates a horizontal row of selectable buttons

func SelectableButtonsVertical

func SelectableButtonsVertical(buttons []ButtonOpts, spacing int) string

SelectableButtonsVertical creates a vertical row of selectable buttons

func Status

func Status(opts StatusOpts, width int) string

func Title

func Title(title string, width int) string

Types

type ButtonOpts

type ButtonOpts struct {
	Text           string
	UnderlineIndex int  // Index of character to underline (0-based)
	Selected       bool // Whether this button is selected
}

type KeyMapHelp

type KeyMapHelp interface {
	Help() help.KeyMap
}

type StatusOpts

type StatusOpts struct {
	Icon             string // if empty no icon will be shown
	Title            string
	TitleColor       color.Color
	Description      string
	DescriptionColor color.Color
	ExtraContent     string // additional content to append after the description
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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