components

package
v0.0.0-...-56f785d Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PreviewFile

func PreviewFile(filename string) tea.Cmd

PreviewFile generates a preview for a file

Types

type Animation

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

Animation represents a UI animation

func CreateErrorAnimation

func CreateErrorAnimation(id string) *Animation

CreateErrorAnimation creates an error highlight animation

func CreateLoadingAnimation

func CreateLoadingAnimation(id string) *Animation

CreateLoadingAnimation creates a loading animation

func CreateViewTransition

func CreateViewTransition(id string, fromContent, toContent string, duration time.Duration) *Animation

CreateViewTransition creates a smooth transition between views

type AnimationManager

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

AnimationManager manages multiple animations

func NewAnimationManager

func NewAnimationManager() *AnimationManager

NewAnimationManager creates a new animation manager

func (*AnimationManager) ApplyAnimationStyle

func (am *AnimationManager) ApplyAnimationStyle(id string, baseStyle lipgloss.Style, content string) string

ApplyAnimationStyle applies animation effects to a style

func (*AnimationManager) CreateBounceAnimation

func (am *AnimationManager) CreateBounceAnimation(id string, duration time.Duration) *Animation

CreateBounceAnimation creates a bounce animation

func (*AnimationManager) CreateFadeInAnimation

func (am *AnimationManager) CreateFadeInAnimation(id string, duration time.Duration) *Animation

CreateFadeInAnimation creates a fade-in animation

func (*AnimationManager) CreateFadeOutAnimation

func (am *AnimationManager) CreateFadeOutAnimation(id string, duration time.Duration) *Animation

CreateFadeOutAnimation creates a fade-out animation

func (*AnimationManager) CreatePulseAnimation

func (am *AnimationManager) CreatePulseAnimation(id string, duration time.Duration) *Animation

CreatePulseAnimation creates a pulse animation

func (*AnimationManager) CreateSlideInAnimation

func (am *AnimationManager) CreateSlideInAnimation(id string, duration time.Duration, startOffset int) *Animation

CreateSlideInAnimation creates a slide-in animation

func (*AnimationManager) CreateSlideOutAnimation

func (am *AnimationManager) CreateSlideOutAnimation(id string, duration time.Duration, endOffset int) *Animation

CreateSlideOutAnimation creates a slide-out animation

func (*AnimationManager) GetProgress

func (am *AnimationManager) GetProgress(id string) float64

GetProgress returns the current progress of an animation

func (*AnimationManager) IsRunning

func (am *AnimationManager) IsRunning(id string) bool

IsRunning checks if an animation is running

func (*AnimationManager) SetOnComplete

func (am *AnimationManager) SetOnComplete(id string, callback func())

SetOnComplete sets a callback for when the animation completes

func (*AnimationManager) StartAnimation

func (am *AnimationManager) StartAnimation(id string) tea.Cmd

StartAnimation starts an animation

func (*AnimationManager) StopAnimation

func (am *AnimationManager) StopAnimation(id string)

StopAnimation stops an animation

func (*AnimationManager) Update

func (am *AnimationManager) Update(msg tea.Msg) tea.Cmd

Update handles animation updates

type AnimationState

type AnimationState int

AnimationState represents the current state of an animation

const (
	AnimationStateIdle AnimationState = iota
	AnimationStateRunning
	AnimationStateCompleted
)

type AnimationTickMsg

type AnimationTickMsg struct {
	AnimationID string
	Frame       int
	Progress    float64
}

AnimationTickMsg represents an animation tick message

type AnimationType

type AnimationType int

AnimationType represents different types of animations

const (
	AnimationFadeIn AnimationType = iota
	AnimationFadeOut
	AnimationSlideIn
	AnimationSlideOut
	AnimationBounce
	AnimationPulse
)

type CompletedMsg

type CompletedMsg struct {
	Success bool
	Message string
}

CompletedMsg represents a completion message

type ContextualHelp

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

ContextualHelp manages contextual help and hints

func NewContextualHelp

func NewContextualHelp() *ContextualHelp

NewContextualHelp creates a new contextual help system

func (*ContextualHelp) AddConditionalHint

func (ch *ContextualHelp) AddConditionalHint(context HelpContext, key, action, description string, priority int, showWhen func() bool)

AddConditionalHint adds a help hint that only shows when a condition is met

func (*ContextualHelp) AddHint

func (ch *ContextualHelp) AddHint(context HelpContext, key, action, description string, priority int)

AddHint adds a help hint for a specific context

func (*ContextualHelp) GetContext

func (ch *ContextualHelp) GetContext() HelpContext

GetContext returns the current help context

func (*ContextualHelp) GetContextualTips

func (ch *ContextualHelp) GetContextualTips() []string

GetContextualTips returns tips for the current context

func (*ContextualHelp) HideTooltip

func (ch *ContextualHelp) HideTooltip()

HideTooltip hides the current tooltip

func (*ContextualHelp) SetCompactMode

func (ch *ContextualHelp) SetCompactMode(compact bool)

SetCompactMode sets whether to use compact hint display

func (*ContextualHelp) SetContext

func (ch *ContextualHelp) SetContext(context HelpContext)

SetContext changes the current help context

func (*ContextualHelp) ShowContextualTooltip

func (ch *ContextualHelp) ShowContextualTooltip(title, content string, tips []string, timeout time.Duration)

ShowContextualTooltip shows a tooltip with context-specific shortcuts and tips

func (*ContextualHelp) ShowTooltip

func (ch *ContextualHelp) ShowTooltip(title, content string, timeout time.Duration)

ShowTooltip displays a contextual tooltip

func (*ContextualHelp) ToggleHints

func (ch *ContextualHelp) ToggleHints()

ToggleHints toggles the visibility of contextual hints

func (*ContextualHelp) Update

func (ch *ContextualHelp) Update(msg tea.Msg) tea.Cmd

Update handles messages for the contextual help system

func (*ContextualHelp) View

func (ch *ContextualHelp) View() string

View renders the contextual help display

type EnhancedProgress

type EnhancedProgress struct {
	*Progress // Embed base progress
	// contains filtered or unexported fields
}

EnhancedProgress represents an enhanced progress component with multiple visual styles

func NewEnhancedProgress

func NewEnhancedProgress(title string, total int64, config ProgressVisualConfig) *EnhancedProgress

NewEnhancedProgress creates a new enhanced progress component

func (*EnhancedProgress) Update

func (ep *EnhancedProgress) Update(msg tea.Msg) (*EnhancedProgress, tea.Cmd)

Update updates the enhanced progress component

func (*EnhancedProgress) View

func (ep *EnhancedProgress) View() string

View renders the enhanced progress component

type ErrorDisplay

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

ErrorDisplay represents an enhanced error display component

func NewErrorDisplay

func NewErrorDisplay() *ErrorDisplay

NewErrorDisplay creates a new ErrorDisplay component

func (*ErrorDisplay) AddAWSError

func (e *ErrorDisplay) AddAWSError(err error)

AddAWSError adds an AWS-specific error with intelligent suggestions

func (*ErrorDisplay) AddError

func (e *ErrorDisplay) AddError(level ErrorLevel, title, message, suggestion, technical string, recoverable bool)

AddError adds a new error to the display

func (*ErrorDisplay) AddErrorWithActions

func (e *ErrorDisplay) AddErrorWithActions(level ErrorLevel, title, message, suggestion, technical string, recoverable bool, actions []RecoveryAction)

AddErrorWithActions adds an error with recovery actions

func (*ErrorDisplay) AddNetworkError

func (e *ErrorDisplay) AddNetworkError(operation string, err error)

AddNetworkError adds a network-specific error

func (*ErrorDisplay) AddValidationError

func (e *ErrorDisplay) AddValidationError(field, value, requirement string)

AddValidationError adds a validation error

func (*ErrorDisplay) ClearErrors

func (e *ErrorDisplay) ClearErrors()

ClearErrors removes all errors

func (*ErrorDisplay) GetErrorCount

func (e *ErrorDisplay) GetErrorCount() int

GetErrorCount returns the number of active errors

func (*ErrorDisplay) GetLatestError

func (e *ErrorDisplay) GetLatestError() *ErrorMsg

GetLatestError returns the most recent error

func (*ErrorDisplay) HasCriticalErrors

func (e *ErrorDisplay) HasCriticalErrors() bool

HasCriticalErrors returns true if any critical errors are present

func (*ErrorDisplay) SetAutoHide

func (e *ErrorDisplay) SetAutoHide(autoHide bool, duration time.Duration)

func (*ErrorDisplay) SetMaxErrors

func (e *ErrorDisplay) SetMaxErrors(max int)

func (*ErrorDisplay) SetShowTechnical

func (e *ErrorDisplay) SetShowTechnical(show bool)

Configuration methods

func (*ErrorDisplay) Update

func (e *ErrorDisplay) Update(msg tea.Msg) (*ErrorDisplay, tea.Cmd)

Update handles messages for the error display

func (*ErrorDisplay) View

func (e *ErrorDisplay) View() string

View renders the error display

type ErrorLevel

type ErrorLevel int

ErrorLevel represents the severity of an error

const (
	ErrorLevelInfo ErrorLevel = iota
	ErrorLevelWarning
	ErrorLevelError
	ErrorLevelCritical
)

type ErrorMsg

type ErrorMsg struct {
	Level           ErrorLevel
	Title           string
	Message         string
	Suggestion      string
	Technical       string
	Timestamp       time.Time
	Recoverable     bool
	RecoveryActions []RecoveryAction
}

ErrorMsg represents an error message with context

type FrameRateMsg

type FrameRateMsg struct {
	Timestamp time.Time
}

FrameRateMsg represents a 60fps frame rate message

type HelpContext

type HelpContext string

HelpContext represents different contexts where help can be shown

const (
	HelpContextMain      HelpContext = "main"
	HelpContextBucket    HelpContext = "bucket"
	HelpContextObject    HelpContext = "object"
	HelpContextOperation HelpContext = "operation"
	HelpContextUpload    HelpContext = "upload"
	HelpContextDownload  HelpContext = "download"
	HelpContextSettings  HelpContext = "settings"
	HelpContextError     HelpContext = "error"
	HelpContextLogs      HelpContext = "logs"
)

type HelpHint

type HelpHint struct {
	Context     HelpContext
	Key         string
	Action      string
	Description string
	Priority    int         // Higher priority hints show first
	ShowWhen    func() bool // Optional condition to show hint
}

HelpHint represents a contextual help hint

type HelpSystem

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

HelpSystem manages contextual help display

type HelpTooltip

type HelpTooltip struct {
	Title     string
	Content   string
	Context   HelpContext
	Shortcuts []HelpHint
	Tips      []string
	Visible   bool
	Timeout   time.Duration
	ShowTime  time.Time
}

HelpTooltip represents a tooltip with contextual information

type KeyBinding

type KeyBinding struct {
	Key         string
	Description string
	Action      string
	Context     ViewType
	Category    string
	Enabled     bool
	Global      bool // Available in all contexts
}

KeyBinding represents a keyboard shortcut

type KeyCategory

type KeyCategory struct {
	Name        string
	Description string
	Shortcuts   []KeyBinding
}

KeyCategory groups related shortcuts

type KeyboardManager

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

KeyboardManager manages keyboard navigation and shortcuts

func NewKeyboardManager

func NewKeyboardManager() *KeyboardManager

NewKeyboardManager creates a new keyboard navigation manager

func (*KeyboardManager) AddCustomShortcut

func (km *KeyboardManager) AddCustomShortcut(context ViewType, binding KeyBinding)

AddCustomShortcut allows users to define custom shortcuts

func (*KeyboardManager) AddGlobalShortcut

func (km *KeyboardManager) AddGlobalShortcut(binding KeyBinding)

AddGlobalShortcut adds a global keyboard shortcut

func (*KeyboardManager) AddShortcut

func (km *KeyboardManager) AddShortcut(binding KeyBinding)

AddShortcut adds a context-specific keyboard shortcut

func (*KeyboardManager) Disable

func (km *KeyboardManager) Disable()

Disable disables keyboard navigation

func (*KeyboardManager) Enable

func (km *KeyboardManager) Enable()

Enable enables keyboard navigation

func (*KeyboardManager) GetContextualHelp

func (km *KeyboardManager) GetContextualHelp() []KeyBinding

GetContextualHelp returns help for the current context

func (*KeyboardManager) GetKeyPressStats

func (km *KeyboardManager) GetKeyPressStats() map[string]int

GetKeyPressStats returns statistics about key usage

func (*KeyboardManager) GetMostUsedShortcuts

func (km *KeyboardManager) GetMostUsedShortcuts(limit int) []string

GetMostUsedShortcuts returns the most frequently used shortcuts

func (*KeyboardManager) GetShortcutsByCategory

func (km *KeyboardManager) GetShortcutsByCategory() map[string][]KeyBinding

GetShortcutsByCategory returns shortcuts organized by category

func (*KeyboardManager) HandleKeyPress

func (km *KeyboardManager) HandleKeyPress(key string) (string, bool)

HandleKeyPress processes keyboard input and returns appropriate action

func (*KeyboardManager) IsEnabled

func (km *KeyboardManager) IsEnabled() bool

IsEnabled returns whether keyboard navigation is enabled

func (*KeyboardManager) IsHelpVisible

func (km *KeyboardManager) IsHelpVisible() bool

IsHelpVisible returns whether help is currently displayed

func (*KeyboardManager) RenderHelp

func (km *KeyboardManager) RenderHelp() string

RenderHelp generates the help display

func (*KeyboardManager) SetCurrentView

func (km *KeyboardManager) SetCurrentView(view ViewType)

SetCurrentView updates the current view context

func (*KeyboardManager) ToggleHelp

func (km *KeyboardManager) ToggleHelp()

ToggleHelp toggles the help display

func (*KeyboardManager) Update

func (km *KeyboardManager) Update(msg tea.Msg) (*KeyboardManager, tea.Cmd)

Update handles messages for the keyboard manager

type List

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

List represents a selectable list component with virtual scrolling and async rendering

func NewList

func NewList(title string, items []ListItem) *List

NewList creates a new List component with performance optimizations

func (*List) Close

func (l *List) Close()

Close properly shuts down the list component and cleans up resources

func (*List) GetCurrentItem

func (l *List) GetCurrentItem() *ListItem

GetCurrentItem returns the item at cursor position

func (*List) GetCursor

func (l *List) GetCursor() int

GetCursor returns the current cursor position

func (*List) GetPerformanceStats

func (l *List) GetPerformanceStats() map[string]interface{}

GetPerformanceStats returns performance statistics for monitoring

func (*List) GetSelected

func (l *List) GetSelected() int

GetSelected returns the selected item index (-1 if none selected)

func (*List) GetSelectedItem

func (l *List) GetSelectedItem() *ListItem

GetSelectedItem returns the selected item (nil if none selected)

func (*List) OptimizeForLargeList

func (l *List) OptimizeForLargeList()

OptimizeForLargeList configures the list for optimal performance with large datasets

func (*List) Reset

func (l *List) Reset()

Reset resets the list state with performance optimizations

func (*List) SetItems

func (l *List) SetItems(items []ListItem)

SetItems updates the list items with performance optimizations

func (*List) SetShowHelp

func (l *List) SetShowHelp(show bool)

SetShowHelp sets whether to show help text

func (*List) Update

func (l *List) Update(msg tea.Msg) (*List, tea.Cmd)

Update handles messages for the list component

func (*List) View

func (l *List) View() string

View renders the list component with simplified synchronous rendering

type ListItem

type ListItem struct {
	Title       string
	Description string
	Tag         string
	Data        interface{} // Additional data for the item
}

ListItem represents a selectable item in a list

type Preview

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

Preview represents a file preview component

func NewPreview

func NewPreview() *Preview

NewPreview creates a new preview component

func (*Preview) Update

func (p *Preview) Update(msg tea.Msg) (*Preview, tea.Cmd)

Update updates the preview component

func (*Preview) View

func (p *Preview) View() string

View renders the preview component

type PreviewMsg

type PreviewMsg struct {
	Content     string
	PreviewType PreviewType
	Error       error
}

PreviewMsg represents a preview update message

type PreviewType

type PreviewType int

PreviewType represents different file types for preview

const (
	PreviewTypeUnsupported PreviewType = iota
	PreviewTypeText
	PreviewTypeImage
	PreviewTypePDF
	PreviewTypeBinary
)

type Progress

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

Progress represents a progress bar component with real-time updates

func NewProgress

func NewProgress(title string, total int64) *Progress

NewProgress creates a new Progress component with enhanced real-time tracking

func (*Progress) Complete

func (p *Progress) Complete(success bool, message string)

Complete marks the progress as completed

func (*Progress) GetAverageSpeed

func (p *Progress) GetAverageSpeed() float64

GetAverageSpeed returns the average speed over recent samples

func (*Progress) GetCurrentSpeed

func (p *Progress) GetCurrentSpeed() float64

GetCurrentSpeed returns the current instantaneous speed

func (*Progress) IsCompleted

func (p *Progress) IsCompleted() bool

IsCompleted returns whether the progress is completed

func (*Progress) IsSuccess

func (p *Progress) IsSuccess() bool

IsSuccess returns whether the completed operation was successful

func (*Progress) SetProgress

func (p *Progress) SetProgress(current, total int64, message string)

SetProgress updates the progress with real-time speed calculation

func (*Progress) Update

func (p *Progress) Update(msg tea.Msg) (*Progress, tea.Cmd)

Update handles messages for the progress component

func (*Progress) View

func (p *Progress) View() string

View renders the progress component

type ProgressBarStyle

type ProgressBarStyle int

ProgressBarStyle represents different progress bar visual styles

const (
	ProgressStyleDefault ProgressBarStyle = iota
	ProgressStyleMinimal
	ProgressStyleDetailed
	ProgressStyleGraphical
	ProgressStyleRainbow
)

type ProgressCharacters

type ProgressCharacters struct {
	Complete   string
	Incomplete string
	Edges      [2]string // [left, right]
}

ProgressCharacters represents characters used in progress bars

type ProgressColors

type ProgressColors struct {
	Complete   lipgloss.Color
	Incomplete lipgloss.Color
	Background lipgloss.Color
	Text       lipgloss.Color
	Speed      lipgloss.Color
	ETA        lipgloss.Color
}

ProgressColors represents color scheme for progress bars

type ProgressMsg

type ProgressMsg struct {
	Current int64
	Total   int64
	Message string
}

ProgressMsg represents a progress update message

type ProgressVisualConfig

type ProgressVisualConfig struct {
	Style       ProgressBarStyle
	ShowSpeed   bool
	ShowETA     bool
	ShowPercent bool
	ShowBytes   bool
	Animated    bool
	Colors      ProgressColors
	Characters  ProgressCharacters
}

ProgressVisualConfig represents visual configuration for progress bars

type RecoveryAction

type RecoveryAction struct {
	Label       string
	Description string
	Shortcut    string
	Action      func() error
}

RecoveryAction represents a possible recovery action

type RenderRequest

type RenderRequest struct {
	Index    int
	Item     ListItem
	IsCursor bool
	Style    lipgloss.Style
}

RenderRequest represents an async render request

type RenderResult

type RenderResult struct {
	Index        int
	RenderedItem string
	Error        error
}

RenderResult represents an async render result

type ShortcutAction

type ShortcutAction string

ShortcutAction represents a keyboard shortcut action

const (
	ActionQuit     ShortcutAction = "quit"
	ActionBack     ShortcutAction = "back"
	ActionRefresh  ShortcutAction = "refresh"
	ActionHelp     ShortcutAction = "help"
	ActionSettings ShortcutAction = "settings"
	ActionLogs     ShortcutAction = "logs"
	ActionPreview  ShortcutAction = "preview"
	ActionConfirm  ShortcutAction = "confirm"
	ActionCancel   ShortcutAction = "cancel"
	ActionDownload ShortcutAction = "download"
	ActionUpload   ShortcutAction = "upload"
	ActionDelete   ShortcutAction = "delete"
	ActionSelect   ShortcutAction = "select"
	ActionToggle   ShortcutAction = "toggle"
	ActionNext     ShortcutAction = "next"
	ActionPrevious ShortcutAction = "previous"
	ActionFirst    ShortcutAction = "first"
	ActionLast     ShortcutAction = "last"
)

type ShortcutExecutedMsg

type ShortcutExecutedMsg struct {
	Key     string
	Action  string
	Context ViewType
}

ShortcutExecutedMsg represents a shortcut execution event

type ShortcutKey

type ShortcutKey struct {
	Key         string         `json:"key"`
	Alt         bool           `json:"alt,omitempty"`
	Ctrl        bool           `json:"ctrl,omitempty"`
	Shift       bool           `json:"shift,omitempty"`
	Action      ShortcutAction `json:"action"`
	Description string         `json:"description"`
	Context     string         `json:"context,omitempty"` // Which view/context this applies to
}

ShortcutKey represents a keyboard shortcut

type ShortcutManager

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

ShortcutManager manages keyboard shortcuts

func NewShortcutManager

func NewShortcutManager() *ShortcutManager

NewShortcutManager creates a new shortcut manager

func (*ShortcutManager) GetAction

func (sm *ShortcutManager) GetAction(keyMsg tea.KeyMsg) (ShortcutAction, bool)

GetAction returns the action for a given key combination

func (*ShortcutManager) GetShortcutsForContext

func (sm *ShortcutManager) GetShortcutsForContext(context string) []ShortcutKey

GetShortcutsForContext returns shortcuts for a specific context

func (*ShortcutManager) RenderFooterShortcuts

func (sm *ShortcutManager) RenderFooterShortcuts(context string) string

RenderFooterShortcuts renders a compact footer with common shortcuts

func (*ShortcutManager) RenderShortcutHelp

func (sm *ShortcutManager) RenderShortcutHelp(context string) string

RenderShortcutHelp renders a help display for shortcuts

func (*ShortcutManager) SaveCustomShortcuts

func (sm *ShortcutManager) SaveCustomShortcuts(customShortcuts []ShortcutKey) error

SaveCustomShortcuts saves custom shortcuts to config file

type Spinner

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

Spinner represents a loading spinner component with 60fps optimization

func NewDotSpinner

func NewDotSpinner(message string) *Spinner

NewDotSpinner creates a spinner with dot animation optimized for 60fps

func NewSpinner

func NewSpinner(message string) *Spinner

NewSpinner creates a new Spinner component optimized for 60fps

func (*Spinner) GetFrameRate

func (s *Spinner) GetFrameRate() int

GetFrameRate returns the current target frame rate

func (*Spinner) GetPerformanceInfo

func (s *Spinner) GetPerformanceInfo() map[string]interface{}

GetPerformanceInfo returns performance statistics

func (*Spinner) IsActive

func (s *Spinner) IsActive() bool

IsActive returns whether the spinner is active

func (*Spinner) SetFrameRate

func (s *Spinner) SetFrameRate(fps int)

SetFrameRate adjusts the target frame rate for performance tuning

func (*Spinner) SetMessage

func (s *Spinner) SetMessage(message string)

SetMessage updates the spinner message

func (*Spinner) Start

func (s *Spinner) Start() tea.Cmd

Start starts the spinner animation

func (*Spinner) Stop

func (s *Spinner) Stop()

Stop stops the spinner animation

func (*Spinner) Update

func (s *Spinner) Update(msg tea.Msg) (*Spinner, tea.Cmd)

Update handles messages for the spinner component with 60fps optimization

func (*Spinner) View

func (s *Spinner) View() string

View renders the spinner component

type SpinnerTickMsg

type SpinnerTickMsg time.Time

SpinnerTickMsg represents a spinner tick message

type Theme

type Theme struct {
	Name        string            `json:"name"`
	Description string            `json:"description"`
	Colors      ThemeColors       `json:"colors"`
	Styles      ThemeStyles       `json:"styles"`
	Custom      map[string]string `json:"custom,omitempty"`
}

Theme represents a UI theme

type ThemeColors

type ThemeColors struct {
	// Primary colors
	Primary   lipgloss.Color `json:"primary"`
	Secondary lipgloss.Color `json:"secondary"`
	Accent    lipgloss.Color `json:"accent"`

	// Background colors
	Background lipgloss.Color `json:"background"`
	Surface    lipgloss.Color `json:"surface"`

	// Text colors
	Text        lipgloss.Color `json:"text"`
	TextMuted   lipgloss.Color `json:"text_muted"`
	TextInverse lipgloss.Color `json:"text_inverse"`

	// Status colors
	Success lipgloss.Color `json:"success"`
	Warning lipgloss.Color `json:"warning"`
	Error   lipgloss.Color `json:"error"`
	Info    lipgloss.Color `json:"info"`

	// Interactive colors
	Border      lipgloss.Color `json:"border"`
	BorderFocus lipgloss.Color `json:"border_focus"`
	Selection   lipgloss.Color `json:"selection"`
	Hover       lipgloss.Color `json:"hover"`
}

ThemeColors represents the color palette for a theme

type ThemeManager

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

ThemeManager manages application themes

func NewThemeManager

func NewThemeManager() *ThemeManager

NewThemeManager creates a new theme manager

func (*ThemeManager) AddCustomTheme

func (tm *ThemeManager) AddCustomTheme(theme *Theme) error

AddCustomTheme adds a custom theme

func (*ThemeManager) CreateThemedStyle

func (tm *ThemeManager) CreateThemedStyle(styleType string) lipgloss.Style

CreateThemedStyle creates a lipgloss style using current theme

func (*ThemeManager) GetAvailableThemes

func (tm *ThemeManager) GetAvailableThemes() []string

GetAvailableThemes returns a list of available theme names

func (*ThemeManager) GetTheme

func (tm *ThemeManager) GetTheme() *Theme

GetTheme returns the current theme

func (*ThemeManager) GetThemePreview

func (tm *ThemeManager) GetThemePreview(themeName string) string

GetThemePreview returns a preview string of the theme

func (*ThemeManager) RemoveCustomTheme

func (tm *ThemeManager) RemoveCustomTheme(name string) error

RemoveCustomTheme removes a custom theme

func (*ThemeManager) SaveCustomThemes

func (tm *ThemeManager) SaveCustomThemes() error

SaveCustomThemes saves custom themes to config file

func (*ThemeManager) SetTheme

func (tm *ThemeManager) SetTheme(name string) error

SetTheme sets the current theme by name

type ThemeStyles

type ThemeStyles struct {
	BorderRadius int    `json:"border_radius"`
	BorderWidth  int    `json:"border_width"`
	Padding      int    `json:"padding"`
	Margin       int    `json:"margin"`
	FontWeight   string `json:"font_weight"`
}

ThemeStyles represents style configurations

type ToggleHelpMsg

type ToggleHelpMsg struct{}

ToggleHelpMsg toggles help display

type ViewType

type ViewType int

ViewType represents different application views

const (
	WelcomeView ViewType = iota
	ListBucketsView
	ListObjectsView
	UploadView
	DownloadView
	ErrorView
	SettingsView
	HelpView
)

Jump to

Keyboard shortcuts

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