ce335cabd6
Stream/cards toggle with 1/2 keys. Cards view with intent filtering (tab cycles grab/read/fill/all), sort cycling (s key), pinned-first ordering, and affordance badges. Promote picker (p key) with card type selection and auto-detection from body content. Detail view renders card_data per type: checklist steps, template slots, decision fields, link URLs. Extracts generateCardData to internal/carddata for reuse across cmd and tui packages.
105 lines
2.4 KiB
Go
105 lines
2.4 KiB
Go
package tui
|
||
|
||
import "github.com/charmbracelet/lipgloss"
|
||
|
||
var (
|
||
subtle = lipgloss.AdaptiveColor{Light: "#D9DCCF", Dark: "#383838"}
|
||
highlight = lipgloss.AdaptiveColor{Light: "#874BFD", Dark: "#7D56F4"}
|
||
dim = lipgloss.AdaptiveColor{Light: "#A49FA5", Dark: "#777777"}
|
||
|
||
titleStyle = lipgloss.NewStyle().
|
||
Bold(true).
|
||
Foreground(highlight).
|
||
PaddingLeft(1)
|
||
|
||
statusStyle = lipgloss.NewStyle().
|
||
Foreground(dim).
|
||
PaddingLeft(1)
|
||
|
||
listItemStyle = lipgloss.NewStyle().
|
||
PaddingLeft(2)
|
||
|
||
selectedItemStyle = lipgloss.NewStyle().
|
||
PaddingLeft(1).
|
||
Bold(true).
|
||
Foreground(highlight).
|
||
SetString("›")
|
||
|
||
glyphStyle = lipgloss.NewStyle().
|
||
Width(2)
|
||
|
||
completedGlyphStyle = lipgloss.NewStyle().
|
||
Width(2).
|
||
Foreground(dim)
|
||
|
||
tagStyle = lipgloss.NewStyle().
|
||
Foreground(lipgloss.AdaptiveColor{Light: "#43BF6D", Dark: "#73F59F"})
|
||
|
||
idStyle = lipgloss.NewStyle().
|
||
Foreground(dim)
|
||
|
||
inputPromptStyle = lipgloss.NewStyle().
|
||
Foreground(highlight).
|
||
Bold(true)
|
||
|
||
detailHeaderStyle = lipgloss.NewStyle().
|
||
Bold(true).
|
||
Foreground(highlight).
|
||
MarginBottom(1)
|
||
|
||
detailBodyStyle = lipgloss.NewStyle().
|
||
PaddingLeft(2).
|
||
PaddingTop(1)
|
||
|
||
helpStyle = lipgloss.NewStyle().
|
||
Foreground(dim).
|
||
PaddingLeft(1)
|
||
|
||
errorStyle = lipgloss.NewStyle().
|
||
Foreground(lipgloss.Color("#FF0000")).
|
||
PaddingLeft(1)
|
||
|
||
dateHeaderStyle = lipgloss.NewStyle().
|
||
Foreground(dim).
|
||
PaddingLeft(1)
|
||
|
||
pinnedStyle = lipgloss.NewStyle().
|
||
Foreground(lipgloss.AdaptiveColor{Light: "#D4A017", Dark: "#FFD700"})
|
||
|
||
filterPillStyle = lipgloss.NewStyle().
|
||
Foreground(lipgloss.AdaptiveColor{Light: "#43BF6D", Dark: "#73F59F"}).
|
||
Bold(true)
|
||
|
||
helpKeyStyle = lipgloss.NewStyle().
|
||
Foreground(highlight).
|
||
Bold(true).
|
||
Width(18)
|
||
|
||
helpDescStyle = lipgloss.NewStyle().
|
||
Foreground(dim)
|
||
|
||
affordanceStyle = lipgloss.NewStyle().
|
||
Foreground(lipgloss.AdaptiveColor{Light: "#5B8EF0", Dark: "#7AAFFF"}).
|
||
Bold(true)
|
||
|
||
useCountStyle = lipgloss.NewStyle().
|
||
Foreground(lipgloss.AdaptiveColor{Light: "#B07D3A", Dark: "#D4A54A"})
|
||
|
||
modeStyle = lipgloss.NewStyle().
|
||
Foreground(dim).
|
||
Bold(true)
|
||
|
||
detailLabelStyle = lipgloss.NewStyle().
|
||
Foreground(highlight).
|
||
Bold(true)
|
||
|
||
detailValueStyle = lipgloss.NewStyle().
|
||
Foreground(lipgloss.AdaptiveColor{Light: "#555555", Dark: "#BBBBBB"})
|
||
|
||
checkDoneStyle = lipgloss.NewStyle().
|
||
Foreground(lipgloss.AdaptiveColor{Light: "#43BF6D", Dark: "#73F59F"})
|
||
|
||
checkPendingStyle = lipgloss.NewStyle().
|
||
Foreground(dim)
|
||
)
|