Documentation
¶
Index ¶
- Variables
- func DrawChart(c model.Chart, width, height int, st Styles) string
- func GetHuhTheme(name string) *huh.Theme
- func GetLayout(totalW, totalH int, showPanel bool) (int, int)
- func LoadThemes(path string) error
- func RenderPanel(c model.Chart, w, h, offset int, tab PanelTab, st Styles) string
- func ResolveChart(f InputFlags, saved []model.Chart, storagePath string, themeName string) (model.Chart, bool, error)
- func RunWizard(saved []model.Chart, storagePath, themeName string) (model.Chart, bool, error)
- type Canvas
- type ChartGeometry
- type InputFlags
- type Keymap
- type PanelTab
- type PointRender
- type Styles
- type ThemeColor
- type ThemeName
- type ThemeSpec
- type ViewerModel
- type WizardModel
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultKeys = Keymap{ Quit: key.NewBinding( key.WithKeys("ctrl+c"), key.WithHelp("ctrl+c", "quit"), ), Help: key.NewBinding( key.WithKeys("?"), key.WithHelp("?", "help"), ), TogglePanel: key.NewBinding( key.WithKeys("tab"), key.WithHelp("tab", "toggle panel"), ), ToggleHouses: key.NewBinding( key.WithKeys("h"), key.WithHelp("h", "change house system"), ), Up: key.NewBinding( key.WithKeys("up"), key.WithHelp("↑", "up"), ), Down: key.NewBinding( key.WithKeys("down"), key.WithHelp("↓", "down"), ), Left: key.NewBinding( key.WithKeys("left"), key.WithHelp("←", "navigate panel"), ), Right: key.NewBinding( key.WithKeys("right"), key.WithHelp("→", "navigate panel"), ), Enter: key.NewBinding( key.WithKeys("enter"), key.WithHelp("enter", "select"), ), Delete: key.NewBinding( key.WithKeys("backspace"), key.WithHelp("⌫", "delete"), ), }
View Source
var Themes = make(map[string]ThemeSpec)
Functions ¶
func GetHuhTheme ¶
func LoadThemes ¶
func RenderPanel ¶
func ResolveChart ¶
Types ¶
type ChartGeometry ¶
func NewChartGeometry ¶
func NewChartGeometry(w, h int, startAngle engine.Degrees) ChartGeometry
type InputFlags ¶
type PointRender ¶
type Styles ¶
type Styles struct {
Bg lipgloss.Style
Header lipgloss.Style
Text lipgloss.Style
Dim lipgloss.Style
Highlight lipgloss.Style
Planet lipgloss.Style
House lipgloss.Style
Zodiac [12]lipgloss.Style
}
func DefaultStyles ¶
func DefaultStyles() Styles
type ThemeColor ¶
type ThemeSpec ¶
type ThemeSpec struct {
Name string `json:"name"`
Bg ThemeColor `json:"bg"`
Fg ThemeColor `json:"fg"`
Muted ThemeColor `json:"muted"`
Border ThemeColor `json:"border"`
Accent ThemeColor `json:"accent"`
Accent2 ThemeColor `json:"accent2"`
Danger ThemeColor `json:"danger"`
Planet ThemeColor `json:"planet"`
Signs []ThemeColor `json:"signs"`
}
type ViewerModel ¶
type ViewerModel struct {
Chart model.Chart
Styles Styles
ActiveTab PanelTab
ScrollOffset int
Width int
Height int
ShowPanel bool
Settings model.Settings
Ephe *engine.Ephe
SettingsPath string
}
func (ViewerModel) Init ¶
func (m ViewerModel) Init() tea.Cmd
func (ViewerModel) View ¶
func (m ViewerModel) View() string
type WizardModel ¶
type WizardModel struct {
SavedCharts []model.Chart
StoragePath string
ThemeName string
Mode int
ChartChoice int
Name string
Date string
TimeStr string
Timezone string
LatStr string
LonStr string
Result model.Chart
Completed bool
IsNew bool
// contains filtered or unexported fields
}
func NewWizardModel ¶
func NewWizardModel(saved []model.Chart, path, themeName string) *WizardModel
func (*WizardModel) Init ¶
func (m *WizardModel) Init() tea.Cmd
func (*WizardModel) View ¶
func (m *WizardModel) View() string
Click to show internal directories.
Click to hide internal directories.