component

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HelpModes int = iota
	HelpActions
	HelpCommands
	HelpNavigate
)
View Source
const (
	RightBar rune = 0x2595
	LeftBar  rune = 0x258F
)
View Source
const Circle string = "\u29BF"
View Source
const HelpWidth int = 49

Variables

This section is empty.

Functions

func Help

func Help(page int) string

func JustifyBetween

func JustifyBetween(j Justify) string

func Notification

func Notification(content string, w int, h int, fg lipgloss.Color, bg lipgloss.Color) string

func Overlay

func Overlay(bg, overlay string, row, col int, ignoreMarginWhitespace bool) (string, error)

Overlay writes the overlay string onto the background string at the specified row and column. In this case, the row and column are zero indexed.

func OverlayCenter

func OverlayCenter(bg string, overlay string, ignoreMarginWhitespace bool) (string, error)

OverlayCenter writes the overlay string onto the background string such that the middle of the overlay string will be at the middle of the overlay will be at the middle of the background.

Types

type Justify

type Justify struct {
	Left   string
	Right  string
	Width  int
	Bg     *lipgloss.Color
	Offset int
}

type Keypair

type Keypair = [2]string
type Modal struct {
	Active bool
	Config ModalConfig
	Input  textinput.Model
}

func NewModal

func NewModal(config ModalConfig, initial string) Modal

func (Modal) IsActive

func (m Modal) IsActive() bool

func (Modal) Update

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

func (Modal) View

func (m Modal) View() string

type ModalConfig

type ModalConfig struct {
	Width       int
	XPadding    int
	Prompt      string
	Title       string
	Placeholder string
	CharLimit   int
	Id          int
}

type ModalSubmit

type ModalSubmit struct {
	Value  string
	Cancel bool
	Id     int
}

type Selection

type Selection struct {
	List []string
	Idx  int
}

type SltModal

type SltModal struct {
	Config  SltModalConfig
	Active  bool
	Current int
	Slt     Selection
	// contains filtered or unexported fields
}

func NewSltModal

func NewSltModal(config SltModalConfig) SltModal

func (SltModal) IsActive

func (m SltModal) IsActive() bool

func (SltModal) Update

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

func (SltModal) View

func (m SltModal) View() string

type SltModalConfig

type SltModalConfig struct {
	Width    int
	XPadding int
	Prompt   string
	Title    string
	Id       int
	IsDelete bool
}

type SltModalDelete

type SltModalDelete struct {
	Value string
	Id    int
	Idx   int
}

type SltModalSubmit

type SltModalSubmit struct {
	Value  string
	Cancel bool
	Id     int
	Idx    int
}

type SltModalToggle

type SltModalToggle struct {
	Id  int
	Idx int
}

Jump to

Keyboard shortcuts

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