dialogs

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloseCallback

type CloseCallback interface {
	Close() tea.Cmd
}

CloseCallback allows dialogs to perform cleanup when closed.

type CloseDialogMsg

type CloseDialogMsg struct{}

CloseDialogMsg is sent to close the topmost dialog.

type DialogCmp

type DialogCmp interface {
	util.Model

	Dialogs() []DialogModel
	HasDialogs() bool
	GetLayers() []*lipgloss.Layer
	ActiveModel() util.Model
	ActiveDialogID() DialogID
}

DialogCmp manages a stack of dialogs with keyboard navigation.

func NewDialogCmp

func NewDialogCmp() DialogCmp

NewDialogCmp creates a new dialog manager.

type DialogID

type DialogID string

type DialogModel

type DialogModel interface {
	util.Model
	Position() (int, int)
	ID() DialogID
}

DialogModel represents a dialog component that can be displayed.

type KeyMap

type KeyMap struct {
	Close key.Binding
}

KeyMap defines keyboard bindings for dialog management.

func DefaultKeyMap

func DefaultKeyMap() KeyMap

func (KeyMap) FullHelp

func (k KeyMap) FullHelp() [][]key.Binding

FullHelp implements help.KeyMap.

func (KeyMap) KeyBindings

func (k KeyMap) KeyBindings() []key.Binding

KeyBindings implements layout.KeyMapProvider

func (KeyMap) ShortHelp

func (k KeyMap) ShortHelp() []key.Binding

ShortHelp implements help.KeyMap.

type OpenDialogMsg

type OpenDialogMsg struct {
	Model DialogModel
}

OpenDialogMsg is sent to open a new dialog with specified dimensions.

Directories

Path Synopsis
Package copilot provides the dialog for Copilot device flow authentication.
Package copilot provides the dialog for Copilot device flow authentication.
Package hyper provides the dialog for Hyper device flow authentication.
Package hyper provides the dialog for Hyper device flow authentication.
Package models provides the model selection dialog for the TUI.
Package models provides the model selection dialog for the TUI.

Jump to

Keyboard shortcuts

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