Documentation
¶
Index ¶
- type Calendar
- type CalendarResult
- type ClearStatusMsg
- type CustomCommand
- type DisplayMode
- type Filter
- func (f *Filter) AddToHistory(value string)
- func (f *Filter) Blur()
- func (f Filter) CursorPosition() int
- func (f *Filter) Focus() tea.Cmd
- func (f *Filter) NavigateHistoryDown()
- func (f *Filter) NavigateHistoryUp()
- func (f *Filter) ResetHistoryNavigation()
- func (f *Filter) SetCursor(pos int)
- func (f *Filter) SetHeight(height int)
- func (f *Filter) SetValue(value string)
- func (f *Filter) SetWidth(width int)
- func (f Filter) Update(msg tea.Msg) (Filter, tea.Cmd)
- func (f Filter) Value() string
- func (f Filter) View() string
- type FloatingWindow
- type FloatingWindowStyles
- type Help
- type HelpStyles
- type Keybinding
- type KeybindingGroup
- type ListPicker
- type MessageType
- type SectionChangedMsg
- type Sections
- type SectionsStyles
- type Sidebar
- type SidebarStyles
- type StatusBar
- func (s *StatusBar) ClearMessage()
- func (s *StatusBar) SetKeybindings(keys string)
- func (s *StatusBar) SetMessage(content string, msgType MessageType, duration time.Duration) tea.Cmd
- func (s *StatusBar) SetWidth(width int)
- func (s StatusBar) Update(msg tea.Msg) (StatusBar, tea.Cmd)
- func (s StatusBar) View() string
- type StatusBarStyles
- type StatusMessage
- type TaskList
- func (t *TaskList) ClearSelection()
- func (t TaskList) Cursor() int
- func (t TaskList) GetSelectedTasks() []core.Task
- func (t TaskList) HasSelections() bool
- func (t TaskList) IsSelected(uuid string) bool
- func (t TaskList) SelectedGroup() *core.TaskGroup
- func (t TaskList) SelectedIndex() int
- func (t TaskList) SelectedTask() *core.Task
- func (t *TaskList) SetEmptyMessage(message string)
- func (t *TaskList) SetForceSmallScreen(force bool)
- func (t *TaskList) SetGroups(groups []core.TaskGroup)
- func (t *TaskList) SetRelativeDates(enabled bool)
- func (t *TaskList) SetScrollBuffer(buffer int)
- func (t *TaskList) SetSize(width, height int)
- func (t *TaskList) SetTasks(tasks []core.Task)
- func (t *TaskList) SetTasksWithSort(tasks []core.Task, sortMethod string, reverse bool)
- func (t TaskList) TaskCount() int
- func (t *TaskList) ToggleSelection()
- func (t TaskList) Update(msg tea.Msg) (TaskList, tea.Cmd)
- func (t TaskList) View() string
- type TaskListStyles
- type TimePicker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Calendar ¶
type Calendar struct {
// contains filtered or unexported fields
}
Calendar is a date picker component that displays a month view calendar
func NewCalendar ¶
NewCalendar creates a new calendar picker
func (Calendar) GetSelectedDate ¶
GetSelectedDate returns the currently selected date
type CalendarResult ¶
CalendarResult is returned when a date is selected
type ClearStatusMsg ¶
type ClearStatusMsg struct{}
ClearStatusMsg is sent when the status message should be cleared
type CustomCommand ¶
CustomCommand represents a user-configured custom command (mirrors config.CustomCommand)
type DisplayMode ¶
type DisplayMode int
DisplayMode indicates what the task list is displaying
const ( DisplayModeTasks DisplayMode = iota DisplayModeGroups )
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
Filter is a component for entering task filter syntax
func (*Filter) AddToHistory ¶
AddToHistory adds a filter command to the history
func (Filter) CursorPosition ¶
CursorPosition returns the current cursor position as a byte offset from start For textarea, we return the length of the text (cursor assumed at end) This is a simplification since textarea doesn't expose cursor position publicly
func (*Filter) NavigateHistoryDown ¶
func (f *Filter) NavigateHistoryDown()
NavigateHistoryDown moves to the next command in history (or back to current input)
func (*Filter) NavigateHistoryUp ¶
func (f *Filter) NavigateHistoryUp()
NavigateHistoryUp moves to the previous command in history
func (*Filter) ResetHistoryNavigation ¶
func (f *Filter) ResetHistoryNavigation()
ResetHistoryNavigation resets the history navigation state
func (*Filter) SetCursor ¶
SetCursor sets the cursor position (moves to end for textarea) Note: textarea doesn't support arbitrary position setting like textinput, so we move to the end after inserting text
type FloatingWindow ¶
type FloatingWindow struct {
// contains filtered or unexported fields
}
FloatingWindow represents a centered overlay window
func NewFloatingWindow ¶
func NewFloatingWindow(title, hint string, styles FloatingWindowStyles) FloatingWindow
NewFloatingWindow creates a new floating window component
func (FloatingWindow) Render ¶
func (fw FloatingWindow) Render(content string, width, height int) string
Render renders the floating window with the given content at the center of the screen content is typically the input field view width and height are the dimensions of the terminal
func (*FloatingWindow) SetHint ¶
func (fw *FloatingWindow) SetHint(hint string)
SetHint updates the hint text
func (*FloatingWindow) SetTitle ¶
func (fw *FloatingWindow) SetTitle(title string)
SetTitle updates the window title
type FloatingWindowStyles ¶
FloatingWindowStyles contains styling for the floating window
type Help ¶
type Help struct {
// contains filtered or unexported fields
}
Help component displays the help screen with keybinding reference
func NewHelp ¶
func NewHelp(width, height int, styles HelpStyles) Help
NewHelp creates a new help component with default keybindings
func NewHelpWithCustomCommands ¶
func NewHelpWithCustomCommands(width, height int, styles HelpStyles, keybindings map[string]string, customCommands map[string]CustomCommand) Help
NewHelpWithCustomCommands creates a new help component with custom keybindings and custom commands
func NewHelpWithKeybindings ¶
func NewHelpWithKeybindings(width, height int, styles HelpStyles, keybindings map[string]string) Help
NewHelpWithKeybindings creates a new help component with custom keybindings from config
func (*Help) SetKeybindings ¶
func (h *Help) SetKeybindings(groups []KeybindingGroup)
SetKeybindings sets custom keybinding groups
type HelpStyles ¶
type HelpStyles struct {
Title lipgloss.Style
GroupTitle lipgloss.Style
Key lipgloss.Style
Description lipgloss.Style
Border lipgloss.Style
}
HelpStyles contains styling for the help component
func DefaultHelpStyles ¶
func DefaultHelpStyles() HelpStyles
DefaultHelpStyles returns the default help styles
type Keybinding ¶
type Keybinding struct {
Keys []string // Multiple keys that perform the same action (e.g., ["j", "↓"])
Description string
}
Keybinding represents a keyboard shortcut and its description
type KeybindingGroup ¶
type KeybindingGroup struct {
Title string
Bindings []Keybinding
}
KeybindingGroup represents a group of related keybindings
type ListPicker ¶
type ListPicker struct {
// contains filtered or unexported fields
}
ListPicker is a component for selecting from a filtered list of items
func NewListPicker ¶
func NewListPicker(title string, items []string, filter string) ListPicker
NewListPicker creates a new list picker with the given items
func (ListPicker) Filter ¶
func (lp ListPicker) Filter() string
Filter returns the current filter text
func (ListPicker) HasItems ¶
func (lp ListPicker) HasItems() bool
HasItems returns true if there are any filtered items to select from
func (ListPicker) SelectedIndex ¶
func (lp ListPicker) SelectedIndex() int
SelectedIndex returns the index of the currently selected item in the filtered list
func (ListPicker) SelectedItem ¶
func (lp ListPicker) SelectedItem() string
SelectedItem returns the currently selected item, or empty string if none
func (ListPicker) Update ¶
func (lp ListPicker) Update(msg tea.Msg) (ListPicker, tea.Cmd)
Update handles key presses for the list picker
type MessageType ¶
type MessageType int
MessageType represents the type of status message
const ( // MessageInfo is an informational message MessageInfo MessageType = iota // MessageSuccess is a success message MessageSuccess // MessageError is an error message MessageError // MessageWarning is a warning message MessageWarning )
type SectionChangedMsg ¶
SectionChangedMsg is sent when the active section changes
type Sections ¶
type Sections struct {
Items []core.Section
ActiveIndex int
TaskCount int
Width int
// contains filtered or unexported fields
}
Sections represents the section navigation component
func NewSections ¶
func NewSections(sections []core.Section, width int, styles SectionsStyles) Sections
NewSections creates a new Sections component
func NewSectionsWithIndex ¶
func NewSectionsWithIndex(sections []core.Section, width int, styles SectionsStyles, activeIndex int) Sections
NewSectionsWithIndex creates a new Sections component with a specific active index
func (Sections) GetActiveSection ¶
GetActiveSection returns the currently active section
func (Sections) IsProjectsView ¶
IsProjectsView returns true if the active section is the Projects view Note: The exact name "Projects" is required - renaming will disable grouped view
func (Sections) IsTagsView ¶
IsTagsView returns true if the active section is the Tags view Note: The exact name "Tags" is required - renaming will disable grouped view
func (*Sections) SetTaskCount ¶
SetTaskCount sets the task count for display
type SectionsStyles ¶
SectionsStyles holds the styles needed for rendering sections
type Sidebar ¶
type Sidebar struct {
// contains filtered or unexported fields
}
Sidebar displays detailed information about a task
func NewSidebar ¶
func NewSidebar(width, height int, styles SidebarStyles) Sidebar
NewSidebar creates a new sidebar component
func (*Sidebar) SetAllTasks ¶
SetAllTasks updates the list of all tasks for dependency lookups
type SidebarStyles ¶
type SidebarStyles struct {
Border lipgloss.Style
Title lipgloss.Style
Label lipgloss.Style
Value lipgloss.Style
Dim lipgloss.Style
PriorityHigh lipgloss.Color
PriorityMedium lipgloss.Color
PriorityLow lipgloss.Color
DueOverdue lipgloss.Color
StatusPending lipgloss.Color
StatusActive lipgloss.Color
StatusDone lipgloss.Color
StatusWaiting lipgloss.Color
Tag lipgloss.Color
}
SidebarStyles holds the styles needed for rendering the sidebar
type StatusBar ¶
type StatusBar struct {
// contains filtered or unexported fields
}
StatusBar component displays transient status messages
func NewStatusBar ¶
func NewStatusBar(width int, showKeybindings bool, styles StatusBarStyles) StatusBar
NewStatusBar creates a new status bar
func (*StatusBar) ClearMessage ¶
func (s *StatusBar) ClearMessage()
ClearMessage clears the current status message
func (*StatusBar) SetKeybindings ¶
SetKeybindings sets the keybindings text to display
func (*StatusBar) SetMessage ¶
SetMessage sets a new status message with a duration Returns a command that will clear the message after the duration
type StatusBarStyles ¶
type StatusBarStyles struct {
Normal lipgloss.Style
Success lipgloss.Style
Error lipgloss.Style
Warning lipgloss.Style
Keys lipgloss.Style
}
StatusBarStyles contains styling for the status bar
func DefaultStatusBarStyles ¶
func DefaultStatusBarStyles() StatusBarStyles
DefaultStatusBarStyles returns the default status bar styles
type StatusMessage ¶
type StatusMessage struct {
Content string
Type MessageType
Duration time.Duration
}
StatusMessage represents a transient message to display
type TaskList ¶
type TaskList struct {
// contains filtered or unexported fields
}
TaskList is a component for displaying and navigating a list of tasks or groups
func NewTaskList ¶
func NewTaskList(width, height int, columns config.Columns, narrowViewFields config.Columns, styles TaskListStyles) TaskList
NewTaskList creates a new task list component
func (*TaskList) ClearSelection ¶
func (t *TaskList) ClearSelection()
ClearSelection clears all selected tasks
func (TaskList) GetSelectedTasks ¶
GetSelectedTasks returns all currently selected tasks, or the cursor task if none selected
func (TaskList) HasSelections ¶
HasSelections returns true if any tasks are selected
func (TaskList) IsSelected ¶
IsSelected returns true if the given task UUID is selected
func (TaskList) SelectedGroup ¶
SelectedGroup returns the currently selected group, or nil if not in group mode
func (TaskList) SelectedIndex ¶
SelectedIndex returns the index of the currently selected task
func (TaskList) SelectedTask ¶
SelectedTask returns the currently selected task, or nil if no tasks
func (*TaskList) SetEmptyMessage ¶
SetEmptyMessage sets a custom message to display when the list is empty
func (*TaskList) SetForceSmallScreen ¶
SetForceSmallScreen forces the task list into small screen rendering mode. This is set by the model when the terminal width is below the threshold or when the user has configured force_small_screen in the config.
func (*TaskList) SetRelativeDates ¶
SetRelativeDates enables or disables relative date display in date columns
func (*TaskList) SetScrollBuffer ¶
SetScrollBuffer sets the number of tasks to keep visible above/below the cursor. A buffer of 1 means the selected task will have at least 1 task visible above and below it (when not at list boundaries). Set to 0 to disable buffering.
func (*TaskList) SetTasksWithSort ¶
SetTasksWithSort updates the task list with custom sorting
func (*TaskList) ToggleSelection ¶
func (t *TaskList) ToggleSelection()
ToggleSelection toggles the selection state of the current task
type TaskListStyles ¶
type TaskListStyles struct {
Header lipgloss.Style
Separator lipgloss.Style
Selection lipgloss.Style
PriorityHigh lipgloss.Color
PriorityMedium lipgloss.Color
PriorityLow lipgloss.Color
DueOverdue lipgloss.Color
TagColor lipgloss.Color
StatusCompleted lipgloss.Color
StatusWaiting lipgloss.Color
StatusActive lipgloss.Color
}
TaskListStyles holds the styles needed for rendering the task list
type TimePicker ¶
type TimePicker struct {
// contains filtered or unexported fields
}
TimePicker is a time selection component for HH:MM format
func NewTimePicker ¶
func NewTimePicker() TimePicker
NewTimePicker creates a new time picker with default to current hour, minute 00
func (TimePicker) GetFormattedTime ¶
func (t TimePicker) GetFormattedTime() string
GetFormattedTime returns the time in HH:MM format
func (TimePicker) GetMinute ¶
func (t TimePicker) GetMinute() int
GetMinute returns the selected minute
func (TimePicker) Update ¶
func (t TimePicker) Update(msg tea.Msg) (TimePicker, tea.Cmd)
Update handles keyboard input