Documentation
¶
Index ¶
- Variables
- type FilterMode
- type KeyAction
- type KeyBindings
- type ListDisplayMode
- type MarketplaceItem
- type MarketplaceSortMode
- type MarketplaceStatus
- type Model
- func (m Model) AnimatedCursorOffset() float64
- func (m *Model) ApplyMarketplaceSort()
- func (m Model) ContentWidth() int
- func (m *Model) CycleTransitionStyle()
- func (m Model) DiscoverableCount() int
- func (m Model) DisplayModeName() string
- func (m Model) FilterModeName() string
- func (m Model) GetKeyAction(key string) KeyAction
- func (m Model) Init() tea.Cmd
- func (m Model) InstalledCount() int
- func (m Model) IsAnimating() bool
- func (m Model) IsViewTransitioning() bool
- func (m *Model) LoadMarketplaceItems() error
- func (m *Model) NextFilter()
- func (m *Model) NextMarketplaceSort()
- func (m *Model) PrevFilter()
- func (m *Model) PrevMarketplaceSort()
- func (m Model) ReadyCount() int
- func (m Model) ScrollOffset() int
- func (m *Model) SelectMarketplaceAutocomplete()
- func (m Model) SelectedPlugin() *plugin.Plugin
- func (m *Model) SetCursorTarget()
- func (m *Model) SnapCursorToTarget()
- func (m *Model) StartViewTransition(newView ViewState, direction int)
- func (m *Model) ToggleDisplayMode()
- func (m Model) TotalPlugins() int
- func (m Model) TransitionOffset() int
- func (m Model) TransitionStyleName() string
- func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m *Model) UpdateCursorAnimation()
- func (m *Model) UpdateMarketplaceAutocomplete(query string)
- func (m *Model) UpdateMarketplaceScroll()
- func (m *Model) UpdateScroll()
- func (m *Model) UpdateViewTransition()
- func (m Model) View() string
- func (m Model) VisibleMarketplaceItems() []MarketplaceItem
- func (m Model) VisibleResults() []search.RankedPlugin
- type PopularMarketplace
- type TransitionStyle
- type ViewState
Constants ¶
This section is empty.
Variables ¶
var ( // Brand / Primary (Orange Scale - Dark to Bright) PlumMedium = lipgloss.Color("#A0522D") // Deep burnt orange for selected borders PlumBright = lipgloss.Color("#E67E22") // Rich orange for active elements, highlights PlumGlow = lipgloss.Color("#FF8C42") // Bright orange for hover, glow states // Accent (Warm Peach) PeachSoft = lipgloss.Color("#FFAB91") // Notifications, discovery, headers // Semantic Success = lipgloss.Color("#10B981") // Teal-green complements orange Error = lipgloss.Color("#EF4444") // Red for errors // Text Hierarchy (Warm-tinted) TextPrimary = lipgloss.Color("#FFF5EE") // Warm white/seashell TextSecondary = lipgloss.Color("#D4C4B8") // Warm beige-gray for descriptions TextTertiary = lipgloss.Color("#A89888") // Warm mid-gray for de-emphasized TextMuted = lipgloss.Color("#6B5D54") // Warm dark gray for subtle text // UI Structure BorderSubtle = lipgloss.Color("#5C4033") // Warm brown for borders )
Colors - Orange/Peach themed semantic palette
var ( // App container AppStyle = lipgloss.NewStyle(). Padding(1, 2) // Title TitleStyle = lipgloss.NewStyle(). Foreground(PeachSoft). Bold(true). MarginBottom(1) // Update notification box with gradient border UpdateNotificationStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(PeachSoft). Foreground(PeachSoft). Bold(true). Padding(0, 1) // Search input SearchPromptStyle = lipgloss.NewStyle(). Foreground(PlumBright). Bold(true) SearchInputStyle = lipgloss.NewStyle(). Foreground(TextPrimary) // Plugin list item - installed InstalledIndicator = lipgloss.NewStyle(). Foreground(Success). SetString("●") // Plugin list item - available AvailableIndicator = lipgloss.NewStyle(). Foreground(TextTertiary). SetString("○") // Discover badge for plugins from uninstalled marketplaces DiscoverBadge = lipgloss.NewStyle(). Foreground(PeachSoft). Bold(true). SetString("[Discover]") // Plugin name PluginNameStyle = lipgloss.NewStyle(). Foreground(TextPrimary). Bold(true) // Plugin name when selected/highlighted PluginNameSelectedStyle = lipgloss.NewStyle(). Foreground(PlumGlow). Bold(true) // Plugin marketplace tag MarketplaceStyle = lipgloss.NewStyle(). Foreground(TextTertiary) // Plugin version VersionStyle = lipgloss.NewStyle(). Foreground(TextMuted) // Plugin description DescriptionStyle = lipgloss.NewStyle(). Foreground(TextSecondary) // Plugin card - normal state PluginCardStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(BorderSubtle). Padding(0, 1) // Plugin card - selected state PluginCardSelectedStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(PlumMedium). Padding(0, 1) // Status bar StatusBarStyle = lipgloss.NewStyle(). Foreground(TextTertiary). MarginTop(1) // Dim separator for tabs/status bar DimSeparator = lipgloss.NewStyle(). Foreground(TextMuted) // Help text HelpStyle = lipgloss.NewStyle(). Foreground(TextMuted) // Detail view styles DetailBoxStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(PlumBright). Padding(1, 2) DetailTitleStyle = lipgloss.NewStyle(). Foreground(TextPrimary). Bold(true). MarginBottom(1) DetailLabelStyle = lipgloss.NewStyle(). Foreground(TextTertiary). Width(12) DetailValueStyle = lipgloss.NewStyle(). Foreground(TextPrimary) DetailDescStyle = lipgloss.NewStyle(). Foreground(TextSecondary). MarginTop(1). MarginBottom(1) InstallCommandStyle = lipgloss.NewStyle(). Foreground(Success). Background(TextMuted). Padding(0, 1) // Discover message style for marketplace install instructions DiscoverMessageStyle = lipgloss.NewStyle(). Foreground(PeachSoft). Italic(true) KeyStyle = lipgloss.NewStyle(). Foreground(PlumBright). Bold(true) // Badge styles InstalledBadge = lipgloss.NewStyle(). Foreground(Success). Bold(true). SetString("[Installed]") AvailableBadge = lipgloss.NewStyle(). Foreground(TextTertiary). SetString("[Available]") // Not installable badge (for LSP/external plugins) NotInstallableBadge = lipgloss.NewStyle(). Foreground(TextMuted). Italic(true) // Help view styles HelpSectionStyle = lipgloss.NewStyle(). Foreground(PeachSoft). Bold(true) HelpTextStyle = lipgloss.NewStyle(). Foreground(TextSecondary) // Animation highlight bars - sliding selection indicator HighlightBarFull = lipgloss.NewStyle(). Foreground(PlumBright). Bold(true). SetString("▌ ") HighlightBarMedium = lipgloss.NewStyle(). Foreground(PlumGlow). SetString("▌ ") HighlightBarLight = lipgloss.NewStyle(). Foreground(TextTertiary). SetString("│ ") )
Styles
var DetailViewKeys = KeyBindings{ "q": ActionQuit, "esc": ActionBack, "backspace": ActionBack, "c": ActionCopyInstallCommand, "y": ActionCopyPluginCommand, "g": ActionOpenGitHub, "l": ActionCopyLink, "o": ActionOpenLocal, "p": ActionCopyPath, "shift+m": ActionOpenMarketplaceBrowser, "M": ActionOpenMarketplaceBrowser, "?": ActionToggleHelp, }
DetailViewKeys defines key bindings for the detail view
var FilterModeNames = []string{"All", "Discover", "Ready", "Installed"}
FilterModeNames for display
var HelpViewKeys = KeyBindings{ "q": ActionQuit, "esc": ActionBack, "?": ActionBack, "backspace": ActionBack, "enter": ActionBack, "shift+m": ActionOpenMarketplaceBrowser, "M": ActionOpenMarketplaceBrowser, }
HelpViewKeys defines key bindings for the help view
var ListViewKeys = KeyBindings{ "q": ActionQuit, "ctrl+c": ActionQuit, "?": ActionToggleHelp, "enter": ActionSelectItem, "shift+v": ActionToggleDisplayMode, "V": ActionToggleDisplayMode, "tab": ActionCycleFilterNext, "right": ActionCycleFilterNext, "shift+tab": ActionCycleFilterPrev, "left": ActionCycleFilterPrev, "shift+m": ActionOpenMarketplaceBrowser, "M": ActionOpenMarketplaceBrowser, "shift+u": ActionRefreshCache, "U": ActionRefreshCache, "esc": ActionClearSearch, "ctrl+g": ActionClearSearch, }
ListViewKeys defines key bindings for the list view
var MarketplaceDetailViewKeys = KeyBindings{ "q": ActionQuit, "esc": ActionBack, "backspace": ActionBack, "?": ActionToggleHelp, "f": ActionNone, "g": ActionOpenGitHub, "l": ActionCopyLink, }
MarketplaceDetailViewKeys defines key bindings for marketplace detail view
var MarketplaceListViewKeys = KeyBindings{ "q": ActionQuit, "esc": ActionBack, "backspace": ActionBack, "enter": ActionSelectItem, "?": ActionToggleHelp, }
MarketplaceListViewKeys defines key bindings for marketplace list view
var MarketplaceSortModeNames = []string{"Plugins", "Stars", "Name", "Updated"}
MarketplaceSortModeNames for display
var TransitionStyleNames = []string{"Instant", "Zoom", "Slide V"}
TransitionStyleNames for display
Functions ¶
This section is empty.
Types ¶
type FilterMode ¶
type FilterMode int
FilterMode represents which plugins to show
const ( FilterAll FilterMode = iota // Show all plugins (installed + ready + discoverable) FilterDiscover // Show only discoverable (from uninstalled marketplaces) FilterReady // Show only ready to install (marketplace installed, plugin not) FilterInstalled // Show only installed )
type KeyAction ¶ added in v0.3.2
type KeyAction int
KeyAction represents an action that can be triggered by a key press
const ( ActionNone KeyAction = iota // No action ActionQuit ActionBack ActionSelectItem ActionToggleHelp ActionToggleDisplayMode ActionCycleFilterNext ActionCycleFilterPrev ActionCopyInstallCommand ActionCopyMarketplaceCommand ActionCopyPluginCommand ActionCopyLink ActionCopyPath ActionOpenGitHub ActionOpenLocal ActionOpenMarketplaceBrowser ActionRefreshCache ActionCancelRefresh ActionClearSearch )
Key action constants define all possible user actions in the TUI
type KeyBindings ¶ added in v0.3.2
KeyBindings maps key strings to actions for each view
type ListDisplayMode ¶
type ListDisplayMode int
ListDisplayMode represents how plugin items are displayed
const ( DisplayCard ListDisplayMode = iota // Card view with borders and description DisplaySlim // Slim one-line view )
type MarketplaceItem ¶ added in v0.3.0
type MarketplaceItem struct {
Name string // Internal name
DisplayName string // User-facing name
Repo string // GitHub repo URL
Description string // One-line description
Status MarketplaceStatus // Installation status
InstalledPluginCount int // Plugins you have installed
TotalPluginCount int // Total plugins available
GitHubStats *marketplace.GitHubStats // GitHub repo stats (may be nil)
StatsLoading bool // True while fetching stats
StatsError error // Stats fetch error if any
}
MarketplaceItem represents a marketplace with enriched display data
func (MarketplaceItem) StatusBadge ¶ added in v0.3.0
func (m MarketplaceItem) StatusBadge() string
StatusBadge returns a display badge for marketplace status
type MarketplaceSortMode ¶ added in v0.3.0
type MarketplaceSortMode int
MarketplaceSortMode represents sorting options for marketplaces
const ( SortByPluginCount MarketplaceSortMode = iota // Most plugins first SortByStars // Most stars first SortByName // Alphabetical SortByLastUpdated // Most recently updated first )
type MarketplaceStatus ¶ added in v0.3.0
type MarketplaceStatus int
MarketplaceStatus represents the installation status of a marketplace
const ( MarketplaceInstalled MarketplaceStatus = iota // Added to Claude Code MarketplaceCached // Fetched but not installed MarketplaceAvailable // In registry, not cached MarketplaceNew // Recently added to registry )
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the main Bubble Tea application model for Plum TUI. It manages all UI state including plugins, search results, viewports, and marketplace data. Thread-safe for use in Bubble Tea's Update() loop.
func (Model) AnimatedCursorOffset ¶
AnimatedCursorOffset returns how far the animated cursor is from target (for glow effect)
func (*Model) ApplyMarketplaceSort ¶ added in v0.3.0
func (m *Model) ApplyMarketplaceSort()
ApplyMarketplaceSort sorts marketplace items based on current sort mode
func (Model) ContentWidth ¶
ContentWidth returns the effective content width (capped at max)
func (*Model) CycleTransitionStyle ¶
func (m *Model) CycleTransitionStyle()
CycleTransitionStyle cycles to the next transition style
func (Model) DiscoverableCount ¶
DiscoverableCount returns count of discoverable plugins
func (Model) DisplayModeName ¶
DisplayModeName returns the current display mode name
func (Model) FilterModeName ¶
FilterModeName returns the current filter mode name
func (Model) GetKeyAction ¶ added in v0.3.2
GetKeyAction returns the action for a given key in the current view
func (Model) InstalledCount ¶
InstalledCount returns count of installed plugins
func (Model) IsAnimating ¶
IsAnimating returns true if cursor animation is in progress
func (Model) IsViewTransitioning ¶
IsViewTransitioning returns true if a view transition is in progress
func (*Model) LoadMarketplaceItems ¶ added in v0.3.0
LoadMarketplaceItems loads and processes all marketplaces with status and stats
func (*Model) NextMarketplaceSort ¶ added in v0.3.0
func (m *Model) NextMarketplaceSort()
NextMarketplaceSort cycles to next sort mode
func (*Model) PrevFilter ¶
func (m *Model) PrevFilter()
PrevFilter cycles to the previous filter mode
func (*Model) PrevMarketplaceSort ¶ added in v0.3.0
func (m *Model) PrevMarketplaceSort()
PrevMarketplaceSort cycles to previous sort mode
func (Model) ReadyCount ¶
ReadyCount returns count of ready-to-install plugins
func (Model) ScrollOffset ¶
ScrollOffset returns the current scroll offset
func (*Model) SelectMarketplaceAutocomplete ¶ added in v0.4.3
func (m *Model) SelectMarketplaceAutocomplete()
SelectMarketplaceAutocomplete completes the marketplace name in the search box
func (Model) SelectedPlugin ¶
SelectedPlugin returns the currently selected plugin, if any
func (*Model) SetCursorTarget ¶
func (m *Model) SetCursorTarget()
SetCursorTarget updates the animation target immediately (call on cursor change)
func (*Model) SnapCursorToTarget ¶
func (m *Model) SnapCursorToTarget()
SnapCursorToTarget instantly moves cursor to target (no animation)
func (*Model) StartViewTransition ¶
StartViewTransition begins a transition to a new view
func (*Model) ToggleDisplayMode ¶
func (m *Model) ToggleDisplayMode()
ToggleDisplayMode switches between card and slim view
func (Model) TotalPlugins ¶
TotalPlugins returns total plugin count
func (Model) TransitionOffset ¶
TransitionOffset returns the horizontal offset for rendering during transition Returns a value from 0 to windowWidth based on progress and direction
func (Model) TransitionStyleName ¶
TransitionStyleName returns the current transition style name
func (*Model) UpdateCursorAnimation ¶
func (m *Model) UpdateCursorAnimation()
UpdateCursorAnimation advances the spring animation one frame
func (*Model) UpdateMarketplaceAutocomplete ¶ added in v0.4.3
UpdateMarketplaceAutocomplete updates the marketplace autocomplete list based on query
func (*Model) UpdateMarketplaceScroll ¶ added in v0.3.0
func (m *Model) UpdateMarketplaceScroll()
UpdateMarketplaceScroll adjusts scroll offset for marketplace view
func (*Model) UpdateScroll ¶
func (m *Model) UpdateScroll()
UpdateScroll adjusts scroll offset to keep cursor visible with buffer
func (*Model) UpdateViewTransition ¶
func (m *Model) UpdateViewTransition()
UpdateViewTransition advances the view transition animation
func (Model) VisibleMarketplaceItems ¶ added in v0.3.0
func (m Model) VisibleMarketplaceItems() []MarketplaceItem
VisibleMarketplaceItems returns visible marketplace items based on scroll
func (Model) VisibleResults ¶
func (m Model) VisibleResults() []search.RankedPlugin
VisibleResults returns the results that should be visible given the window size
type PopularMarketplace ¶
PopularMarketplace is re-exported to avoid import in function signature
type TransitionStyle ¶
type TransitionStyle int
TransitionStyle represents the animation style for view transitions
const ( TransitionInstant TransitionStyle = iota // No animation TransitionZoom // Center expand/contract TransitionSlideV // Vertical slide (push up/down) )