Documentation
¶
Index ¶
- func WriteThemePreviews(output io.Writer, themes []theme.Theme, version string)
- type Client
- type Options
- type ScreenRenderer
- type Style
- func (s *Style) AppHeader(section, host, version string, lines []string, width, height int) []string
- func (s *Style) AppTitle(host, version string, width, height int) []string
- func (s *Style) BarBox(title string, lines []string, width int) []string
- func (s *Style) Box(lines []string, width int) []string
- func (s *Style) HeaderBox(title string, lines []string, width int) []string
- func (s *Style) Liked(value string) string
- func (s *Style) ProgressBox(title string, current, total, width int, hovered ...bool) []string
- func (s *Style) Selected(value string) string
- func (s *Style) Text(value string, role textRole) string
- type Terminal
- func (t *Terminal) EnterRaw() error
- func (t *Terminal) Query(sequence string, accept func(any) bool, timeout time.Duration) (any, error)
- func (t *Terminal) Raw(sequence string)
- func (t *Terminal) ReadMsg(timeout time.Duration) (tea.Msg, error)
- func (t *Terminal) Restore()
- func (t *Terminal) Run(cmd tea.Cmd)
- func (t *Terminal) SetMouseEnabled(enabled bool)
- func (t *Terminal) Size() (int, int)
- type UI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client interface {
LatestTopics() (discourse.JSON, error)
ListTopics(filter, period, username string, params url.Values) (discourse.JSON, error)
Search(query string) (discourse.JSON, error)
Notifications(offset, limit int, filter string) (discourse.JSON, error)
MarkNotificationRead(id int) (discourse.JSON, error)
NotificationTotals() (discourse.JSON, error)
Topic(id int, nearPost int) (discourse.JSON, error)
TopicPosts(topicID int, postIDs []int, includeRaw bool) (discourse.JSON, error)
Post(id int) (discourse.JSON, error)
LikePost(id int) (discourse.JSON, error)
UnlikePost(id int) (discourse.JSON, error)
CreatePost(topicID int, raw string, replyToPostNumber int) (discourse.JSON, error)
CreateTopic(title, raw string, category *int) (discourse.JSON, error)
SiteInfo() (discourse.JSON, error)
UpdateTopicReadState(topicID, postNumber, topicTimeMS int) bool
CurrentUser() (discourse.JSON, error)
MessageBusHeaders() http.Header
GetURL(pathOrURL string) (discourse.JSON, error)
GetBytes(pathOrURL string, maxBytes int) ([]byte, error)
}
type ScreenRenderer ¶
type ScreenRenderer struct {
// contains filtered or unexported fields
}
ScreenRenderer prepares complete terminal frames. Bubble Tea v2 owns the actual diffing, synchronized output, cursor lifecycle, and resize repaint.
func NewScreenRenderer ¶
func NewScreenRenderer(terminal *Terminal) *ScreenRenderer
func (*ScreenRenderer) Clear ¶
func (r *ScreenRenderer) Clear()
func (*ScreenRenderer) Reset ¶
func (r *ScreenRenderer) Reset()
func (*ScreenRenderer) SetProgress ¶
func (r *ScreenRenderer) SetProgress(current, total int)
Click to show internal directories.
Click to hide internal directories.