tui

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TitleStyle    = StderrRenderer.NewStyle().Bold(true)
	SubtitleStyle = StderrRenderer.NewStyle().Faint(true)
	SelectedStyle = StderrRenderer.NewStyle().Foreground(lipgloss.Color("2"))
	ErrorStyle    = StderrRenderer.NewStyle().Foreground(lipgloss.Color("1"))
)

Shared styles for consistent look across TUI components.

View Source
var StderrRenderer = lipgloss.NewRenderer(os.Stderr)

StderrRenderer is a lipgloss renderer targeting stderr. Using stderr avoids color profile mismatch when TUI output goes to stderr while data goes to stdout.

Functions

func Confirm

func Confirm(prompt string) (bool, error)

Confirm displays an interactive confirmation prompt on stderr. Returns (false, error) if stdin is not a TTY — callers should use --force in non-interactive mode.

func IsInteractive

func IsInteractive() bool

IsInteractive returns true when stdin is a terminal (not a pipe/redirect).

Types

type MeetingWizardResult

type MeetingWizardResult struct {
	Dates       []string // YYYY-MM-DD format
	TimeRanges  []string // "YYYY-MM-DD HH:MM-HH:MM" format
	Timezone    string   // IANA timezone name
	Location    string
	Description string
	AllowMaybe  bool
	Dupcheck    string
}

MeetingWizardResult holds the collected meeting wizard inputs.

func RunMeetingWizard

func RunMeetingWizard() (*MeetingWizardResult, error)

RunMeetingWizard launches the interactive meeting creation wizard. Renders on stderr; returns collected inputs for the meeting create flow.

type PollWizardResult

type PollWizardResult struct {
	Title            string
	Options          []string
	Dupcheck         string
	IsMultipleChoice bool
	IsPrivate        bool
	ResultsVis       string
	AllowComments    bool
}

PollWizardResult holds the collected values from the poll creation wizard.

func RunPollWizard

func RunPollWizard() (*PollWizardResult, error)

RunPollWizard launches a multi-step interactive form for poll creation. The form renders on stderr; stdout stays clean for data output.

Jump to

Keyboard shortcuts

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