ui

package
v0.0.0-...-61efb41 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Colors = struct {
	Primary   lipgloss.Color
	Secondary lipgloss.Color

	Success lipgloss.Color
	Warning lipgloss.Color
	Error   lipgloss.Color
	Info    lipgloss.Color

	TextPrimary   lipgloss.Color
	TextSecondary lipgloss.Color
	TextMuted     lipgloss.Color
	TextDim       lipgloss.Color

	BgPrimary   lipgloss.Color
	BgSecondary lipgloss.Color
	BgMuted     lipgloss.Color

	BorderPrimary   lipgloss.Color
	BorderSecondary lipgloss.Color

	ProgressStart lipgloss.Color
	ProgressEnd   lipgloss.Color
}{

	Primary:   lipgloss.Color("#7C3AED"),
	Secondary: lipgloss.Color("#4ECDC4"),

	Success: lipgloss.Color("#10B981"),
	Warning: lipgloss.Color("#F59E0B"),
	Error:   lipgloss.Color("#EF4444"),
	Info:    lipgloss.Color("#3B82F6"),

	TextPrimary:   lipgloss.Color("#E5E7EB"),
	TextSecondary: lipgloss.Color("#9CA3AF"),
	TextMuted:     lipgloss.Color("#6B7280"),
	TextDim:       lipgloss.Color("#4B5563"),

	BgPrimary:   lipgloss.Color("#1F2937"),
	BgSecondary: lipgloss.Color("#374151"),
	BgMuted:     lipgloss.Color("#065F46"),

	BorderPrimary:   lipgloss.Color("#374151"),
	BorderSecondary: lipgloss.Color("#6B7280"),

	ProgressStart: lipgloss.Color("#FF6B6B"),
	ProgressEnd:   lipgloss.Color("#4ECDC4"),
}

Functions

func ErrorStyle

func ErrorStyle() lipgloss.Style

func HeaderContainerStyle

func HeaderContainerStyle() lipgloss.Style

func InfoStyle

func InfoStyle() lipgloss.Style

func MutedTextStyle

func MutedTextStyle() lipgloss.Style

func PrimaryTextStyle

func PrimaryTextStyle() lipgloss.Style

func SecondaryTextStyle

func SecondaryTextStyle() lipgloss.Style

func SuccessStyle

func SuccessStyle() lipgloss.Style

func WarningContainerStyle

func WarningContainerStyle() lipgloss.Style

func WarningStyle

func WarningStyle() lipgloss.Style

Types

type CleanupItem

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

func (CleanupItem) Description

func (i CleanupItem) Description() string

func (CleanupItem) FilterValue

func (i CleanupItem) FilterValue() string

func (CleanupItem) Title

func (i CleanupItem) Title() string

type DeleteProgress

type DeleteProgress struct {
	Target        scanner.CleanupTarget
	Progress      float64
	Done          bool
	Error         error
	OriginalIndex int
}

type InteractiveUI

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

func New

func New(targets []scanner.CleanupTarget) *InteractiveUI

func NewWithScanner

func NewWithScanner(targets []scanner.CleanupTarget, scannerInstance *scanner.Scanner) *InteractiveUI

func (*InteractiveUI) GetModel

func (ui *InteractiveUI) GetModel() *Model

func (*InteractiveUI) SelectTargets

func (ui *InteractiveUI) SelectTargets() ([]scanner.CleanupTarget, error)

func (*InteractiveUI) SetCleaner

func (ui *InteractiveUI) SetCleaner(c *cleaner.Cleaner)

type ItemDelegate

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

func (ItemDelegate) Height

func (d ItemDelegate) Height() int

func (ItemDelegate) Render

func (d ItemDelegate) Render(w io.Writer, m list.Model, index int, listItem list.Item)

func (ItemDelegate) Spacing

func (d ItemDelegate) Spacing() int

func (ItemDelegate) Update

func (d ItemDelegate) Update(_ tea.Msg, _ *list.Model) tea.Cmd

type Model

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

func (*Model) Init

func (m *Model) Init() tea.Cmd

func (*Model) Update

func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Model) View

func (m *Model) View() string

type PathDisplayMode

type PathDisplayMode int
const (
	PathDisplaySmart PathDisplayMode = iota
	PathDisplayCondensed
	PathDisplayFull
)

func (PathDisplayMode) String

func (pdm PathDisplayMode) String() string

type State

type State int
const (
	StateScanning State = iota
	StateSelectingTargets
	StateConfirming
	StateDeleting
	StateCompletionDelay
)

Jump to

Keyboard shortcuts

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