components

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const ErrorDismissTimeout = 5 * time.Second

ErrorDismissTimeout is how long the error banner auto-dismisses after.

Variables

This section is empty.

Functions

func IsUnauthorized

func IsUnauthorized(err error) bool

IsUnauthorized returns true if the error message indicates HTTP 401.

Types

type ErrMsg

type ErrMsg struct {
	Err error
}

ErrMsg signals an application error to be displayed in the banner.

type ErrorBanner

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

ErrorBanner holds the state for the error banner overlay.

func NewErrorBanner

func NewErrorBanner(errStyle lipgloss.Style) ErrorBanner

NewErrorBanner creates a new error banner with the given error style.

func (*ErrorBanner) Dismiss

func (b *ErrorBanner) Dismiss()

Dismiss clears the error.

func (ErrorBanner) Error

func (b ErrorBanner) Error() error

Error returns the current error.

func (ErrorBanner) HasError

func (b ErrorBanner) HasError() bool

HasError returns true if there is an active error.

func (*ErrorBanner) SetError

func (b *ErrorBanner) SetError(err error) tea.Cmd

SetError sets the current error and returns a command to auto-dismiss.

func (*ErrorBanner) SetWidth

func (b *ErrorBanner) SetWidth(w int)

SetWidth updates the banner width.

func (ErrorBanner) View

func (b ErrorBanner) View() string

View renders the error banner. Returns "" if no error.

type ErrorDismissMsg

type ErrorDismissMsg struct{}

ErrorDismissMsg signals that the error banner should be dismissed.

type HelpBinding

type HelpBinding struct {
	Key  string
	Desc string
}

HelpBinding represents a single keybinding entry for the help overlay.

type HelpGroup

type HelpGroup struct {
	Title    string
	Bindings []HelpBinding
}

HelpGroup represents a named group of keybindings.

type HelpOverlay

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

HelpOverlay holds the state for the help overlay.

func NewHelpOverlay

func NewHelpOverlay(styles ui.Styles) HelpOverlay

NewHelpOverlay creates a new help overlay with all keybinding groups.

func (*HelpOverlay) Hide

func (h *HelpOverlay) Hide()

Hide dismisses the help overlay.

func (*HelpOverlay) SetSize

func (h *HelpOverlay) SetSize(w, h2 int)

SetSize updates the available dimensions for centering.

func (*HelpOverlay) Toggle

func (h *HelpOverlay) Toggle()

Toggle switches the help overlay on or off.

func (HelpOverlay) View

func (h HelpOverlay) View() string

View renders the help overlay as a centered bordered box. Returns "" if not visible.

func (HelpOverlay) Visible

func (h HelpOverlay) Visible() bool

Visible returns whether the overlay is currently shown.

Jump to

Keyboard shortcuts

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