Documentation
¶
Index ¶
- type FormKind
- type Mode
- type Model
- type Options
- type Styles
- func (s *Styles) AccentBold() lipgloss.Style
- func (s *Styles) AccentText() lipgloss.Style
- func (s *Styles) Base() lipgloss.Style
- func (s *Styles) Breadcrumb() lipgloss.Style
- func (s *Styles) BreadcrumbArrow() lipgloss.Style
- func (s *Styles) CalCursor() lipgloss.Style
- func (s *Styles) CalDayLabel() lipgloss.Style
- func (s *Styles) CalHeader() lipgloss.Style
- func (s *Styles) CalHintKey() lipgloss.Style
- func (s *Styles) CalSelected() lipgloss.Style
- func (s *Styles) CalToday() lipgloss.Style
- func (s *Styles) CellDim() lipgloss.Style
- func (s *Styles) ChatAssistant() lipgloss.Style
- func (s *Styles) ChatInterrupted() lipgloss.Style
- func (s *Styles) ChatNotice() lipgloss.Style
- func (s *Styles) ChatUser() lipgloss.Style
- func (s *Styles) ColActiveHeader() lipgloss.Style
- func (s *Styles) DashHouseValue() lipgloss.Style
- func (s *Styles) DashLabel() lipgloss.Style
- func (s *Styles) DashOverdue() lipgloss.Style
- func (s *Styles) DashRule() lipgloss.Style
- func (s *Styles) DashSection() lipgloss.Style
- func (s *Styles) DashSectionAlert() lipgloss.Style
- func (s *Styles) DashSectionWarn() lipgloss.Style
- func (s *Styles) DashSubtitle() lipgloss.Style
- func (s *Styles) DashUpcoming() lipgloss.Style
- func (s *Styles) DashValue() lipgloss.Style
- func (s *Styles) DeletedCell() lipgloss.Style
- func (s *Styles) DeletedLabel() lipgloss.Style
- func (s *Styles) DimPath() lipgloss.Style
- func (s *Styles) Drilldown() lipgloss.Style
- func (s *Styles) Empty() lipgloss.Style
- func (s *Styles) EntityKindStyle(letter byte) (lipgloss.Style, bool)
- func (s *Styles) Error() lipgloss.Style
- func (s *Styles) ExtCursor() lipgloss.Style
- func (s *Styles) ExtDone() lipgloss.Style
- func (s *Styles) ExtFail() lipgloss.Style
- func (s *Styles) ExtFailed() lipgloss.Style
- func (s *Styles) ExtOk() lipgloss.Style
- func (s *Styles) ExtPending() lipgloss.Style
- func (s *Styles) ExtRerun() lipgloss.Style
- func (s *Styles) ExtRunning() lipgloss.Style
- func (s *Styles) FilterMark() lipgloss.Style
- func (s *Styles) FormClean() lipgloss.Style
- func (s *Styles) FormDirty() lipgloss.Style
- func (s *Styles) Header() lipgloss.Style
- func (s *Styles) HeaderBadge() lipgloss.Style
- func (s *Styles) HeaderBox() lipgloss.Style
- func (s *Styles) HeaderHint() lipgloss.Style
- func (s *Styles) HeaderLabel() lipgloss.Style
- func (s *Styles) HeaderSection() lipgloss.Style
- func (s *Styles) HeaderTitle() lipgloss.Style
- func (s *Styles) HeaderValue() lipgloss.Style
- func (s *Styles) HiddenLeft() lipgloss.Style
- func (s *Styles) HiddenRight() lipgloss.Style
- func (s *Styles) HouseDoor() lipgloss.Style
- func (s *Styles) HouseRoof() lipgloss.Style
- func (s *Styles) HouseWall() lipgloss.Style
- func (s *Styles) HouseWindow() lipgloss.Style
- func (s *Styles) Info() lipgloss.Style
- func (s *Styles) Keycap() lipgloss.Style
- func (s *Styles) LinkIndicator() lipgloss.Style
- func (s *Styles) ModeEdit() lipgloss.Style
- func (s *Styles) ModeNormal() lipgloss.Style
- func (s *Styles) ModelActive() lipgloss.Style
- func (s *Styles) ModelActiveHL() lipgloss.Style
- func (s *Styles) ModelLocal() lipgloss.Style
- func (s *Styles) ModelLocalHL() lipgloss.Style
- func (s *Styles) ModelRemote() lipgloss.Style
- func (s *Styles) ModelRemoteHL() lipgloss.Style
- func (s *Styles) Money() lipgloss.Style
- func (s *Styles) Null() lipgloss.Style
- func (s *Styles) OverlayBox() lipgloss.Style
- func (s *Styles) Pinned() lipgloss.Style
- func (s *Styles) Readonly() lipgloss.Style
- func (s *Styles) Rule() lipgloss.Style
- func (s *Styles) SecondaryText() lipgloss.Style
- func (s *Styles) SortArrow() lipgloss.Style
- func (s *Styles) StatusStyle(key string) (lipgloss.Style, bool)
- func (s *Styles) TabActive() lipgloss.Style
- func (s *Styles) TabInactive() lipgloss.Style
- func (s *Styles) TabLocked() lipgloss.Style
- func (s *Styles) TabUnderline() lipgloss.Style
- func (s *Styles) TableHeader() lipgloss.Style
- func (s *Styles) TableSelected() lipgloss.Style
- func (s *Styles) TableSeparator() lipgloss.Style
- func (s *Styles) TextDim() lipgloss.Style
- func (s *Styles) UrgencyFar() lipgloss.Style
- func (s *Styles) UrgencyOverdue() lipgloss.Style
- func (s *Styles) UrgencySoon() lipgloss.Style
- func (s *Styles) UrgencyUpcoming() lipgloss.Style
- func (s *Styles) WarrantyActive() lipgloss.Style
- func (s *Styles) WarrantyExpired() lipgloss.Style
- type Tab
- type TabHandler
- type TabKind
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
DBPath string
ConfigPath string
LLMConfig *llmConfig // nil if LLM is not configured
ExtractionConfig extractionConfig
}
type Styles ¶
type Styles struct {
// contains filtered or unexported fields
}
Styles holds the application's pre-built lipgloss styles. Fields are private; use the public accessor methods to read them. Duplicate style definitions share a single backing field, cutting storage from 93 fields to 39.
func DefaultStyles ¶
func DefaultStyles() *Styles
func (*Styles) AccentBold ¶ added in v1.54.1
func (*Styles) AccentText ¶ added in v1.54.1
func (*Styles) Breadcrumb ¶
func (*Styles) BreadcrumbArrow ¶
func (*Styles) CalDayLabel ¶ added in v1.50.0
func (*Styles) CalHintKey ¶ added in v1.50.0
func (*Styles) CalSelected ¶ added in v1.6.0
func (*Styles) ChatAssistant ¶ added in v1.22.0
func (*Styles) ChatInterrupted ¶ added in v1.22.0
func (*Styles) ChatNotice ¶ added in v1.22.0
func (*Styles) ColActiveHeader ¶
func (*Styles) DashHouseValue ¶ added in v1.53.0
func (*Styles) DashOverdue ¶
func (*Styles) DashSection ¶
func (*Styles) DashSectionAlert ¶ added in v1.36.0
func (*Styles) DashSectionWarn ¶ added in v1.16.0
func (*Styles) DashSubtitle ¶ added in v1.5.0
func (*Styles) DashUpcoming ¶
func (*Styles) DeletedCell ¶ added in v1.50.0
func (*Styles) DeletedLabel ¶
func (*Styles) EntityKindStyle ¶ added in v1.54.1
func (*Styles) ExtPending ¶ added in v1.50.0
func (*Styles) ExtRunning ¶ added in v1.50.0
func (*Styles) FilterMark ¶ added in v1.25.0
func (*Styles) HeaderBadge ¶
func (*Styles) HeaderHint ¶
func (*Styles) HeaderLabel ¶
func (*Styles) HeaderSection ¶
func (*Styles) HeaderTitle ¶
func (*Styles) HeaderValue ¶
func (*Styles) HiddenLeft ¶
func (*Styles) HiddenRight ¶
func (*Styles) HouseWindow ¶ added in v1.50.0
func (*Styles) LinkIndicator ¶
func (*Styles) ModeNormal ¶
func (*Styles) ModelActive ¶ added in v1.50.0
func (*Styles) ModelActiveHL ¶ added in v1.50.0
func (*Styles) ModelLocal ¶ added in v1.50.0
func (*Styles) ModelLocalHL ¶ added in v1.50.0
func (*Styles) ModelRemote ¶ added in v1.50.0
func (*Styles) ModelRemoteHL ¶ added in v1.50.0
func (*Styles) OverlayBox ¶ added in v1.54.1
func (*Styles) SecondaryText ¶ added in v1.54.1
func (*Styles) StatusStyle ¶ added in v1.54.1
func (*Styles) TabInactive ¶
func (*Styles) TabUnderline ¶
func (*Styles) TableHeader ¶
func (*Styles) TableSelected ¶
func (*Styles) TableSeparator ¶
func (*Styles) UrgencyFar ¶ added in v1.54.1
func (*Styles) UrgencyOverdue ¶ added in v1.54.1
func (*Styles) UrgencySoon ¶ added in v1.54.1
func (*Styles) UrgencyUpcoming ¶ added in v1.54.1
func (*Styles) WarrantyActive ¶ added in v1.54.1
func (*Styles) WarrantyExpired ¶ added in v1.54.1
type Tab ¶
type Tab struct {
Kind TabKind
Name string
Handler TabHandler
Table table.Model
Rows []rowMeta
Specs []columnSpec
CellRows [][]cell
ColCursor int
ViewOffset int // first visible column in horizontal scroll viewport
LastDeleted *uint
ShowDeleted bool
Sorts []sortEntry
Stale bool // true when data may be outdated; cleared on reload
// Pin-and-filter state.
Pins []filterPin // active pins; AND across columns, OR within
FilterActive bool // true = non-matching rows hidden; false = preview only
FilterInverted bool // true = show rows that DON'T match instead of rows that do
// Full data (pre-row-filter). Populated by reloadTab after project status
// filtering. Row filter operates on these without hitting the DB.
FullRows []table.Row
FullMeta []rowMeta
FullCellRows [][]cell
}
type TabHandler ¶
type TabHandler interface {
// FormKind returns the FormKind that identifies this entity in forms and
// undo entries.
FormKind() FormKind
// Load fetches entities and converts them to table rows.
Load(store *data.Store, showDeleted bool) ([]table.Row, []rowMeta, [][]cell, error)
// Delete soft-deletes the entity with the given ID.
Delete(store *data.Store, id uint) error
// Restore reverses a soft-delete.
Restore(store *data.Store, id uint) error
// StartAddForm opens a "new entity" form on the model.
StartAddForm(m *Model) error
// StartEditForm opens an "edit entity" form for the given ID.
StartEditForm(m *Model, id uint) error
// InlineEdit opens a single-field editor for the given column.
InlineEdit(m *Model, id uint, col int) error
// SubmitForm persists the current form data (create or update).
SubmitForm(m *Model) error
// Snapshot captures the current DB state of an entity for undo/redo.
Snapshot(store *data.Store, id uint) (undoEntry, bool)
// SyncFixedValues updates column specs with values from dynamic lookup
// tables so column widths stay stable.
SyncFixedValues(m *Model, specs []columnSpec)
}
TabHandler encapsulates entity-specific operations for a tab, eliminating TabKind/FormKind switch dispatch scattered across the codebase. Each entity type (projects, quotes, maintenance, appliances) implements this interface.
Click to show internal directories.
Click to hide internal directories.