CtrlK
BlogDocsLog inGet started
Tessl Logo

tpscloud/charmedimsure

Source-verified skills for the Charm terminal stack: Bubble Tea v2, Bubbles v2, Lip Gloss v2, Huh v2, Log v2, Glamour v2, plus the gum and vhs CLIs.

99

1.02x
Quality

98%

Does it follow best practices?

Impact

100%

1.02x

Average score across 9 eval scenarios

SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

small-widgets.mdskills/charmed-bubbles/references/

paginator, timer, and stopwatch in Bubbles v2

Small helpers for paging a slice and counting time. Return to the main skill for the shared component contract and focus rules.

paginator

paginator computes bounds; you slice (examples/charmed-bubbles/paginator/main.go):

// examples/charmed-bubbles/paginator/main.go
p := paginator.New(paginator.WithPerPage(8))
p.Type = paginator.Dots            // or paginator.Arabic
p.SetTotalPages(len(items))
start, end := m.pager.GetSliceBounds(len(m.items))
for _, it := range m.items[start:end] {
    b.WriteString("  " + it + "\n")
}

timer and stopwatch

timer counts down and emits timer.TimeoutMsg; stopwatch counts up. Both start from Init(), and Start, Stop, Toggle return commands (examples/charmed-bubbles/timer/main.go):

// examples/charmed-bubbles/timer/main.go
t := timer.New(10*time.Second, timer.WithInterval(time.Second))
sw := stopwatch.New(stopwatch.WithInterval(100 * time.Millisecond))

func (m model) Init() tea.Cmd { return tea.Batch(m.timer.Init(), m.stopwatch.Init()) }

case "space":
    return m, tea.Batch(m.timer.Toggle(), m.stopwatch.Toggle())
case timer.TimeoutMsg:
    m.expired = true

timer.Timedout(), timer.Running(), stopwatch.Elapsed(), stopwatch.Reset().

README.md

tile.json