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

viewport.mdskills/charmed-bubbles/references/

viewport in Bubbles v2

A scrollable window over a block of text. Return to the main skill for the shared component contract and focus rules.

Create it on the first tea.WindowSizeMsg and resize it on later ones (examples/charmed-bubbles/viewport/main.go):

// examples/charmed-bubbles/viewport/main.go
case tea.WindowSizeMsg:
    if !m.ready {
        m.vp = viewport.New(viewport.WithWidth(msg.Width), viewport.WithHeight(msg.Height-headerHeight))
        m.vp.MouseWheelEnabled = true
        m.vp.SoftWrap = true
        m.vp.SetContent(content)
        m.ready = true
    } else {
        m.vp.SetWidth(msg.Width)
        m.vp.SetHeight(msg.Height - headerHeight)
    }

// View needs v.MouseMode set for the wheel to reach the viewport.

ScrollPercent(), AtTop(), AtBottom(), GotoTop(), GotoBottom(), SetYOffset(n), ScrollDown(n). SoftWrap wraps long lines; with it off the viewport scrolls horizontally (ScrollLeft, ScrollRight). SetHighlights([][]int) plus HighlightNext and HighlightPrevious implement search hits. LeftGutterFunc draws line numbers or markers. FillHeight pads short content to the full height.

README.md

tile.json