Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
2a086d8
fix(layout): honor embedded \n in wrap_lines/wrap_segments
subinium May 29, 2026
67c24bd
feat(widgets-interactive): add type-to-filter to select dropdown
subinium May 29, 2026
88f0e74
feat(event): opt-in Kitty REPORT_ALL_KEYS + KeyCode::Modifier variant
subinium May 29, 2026
88597bd
feat(widgets): add standalone PaginatorState + paginator() widget
subinium May 29, 2026
66a572a
feat(keymap): add cross-frame key_chord, deprecate single-frame key_seq
subinium May 29, 2026
6d7fb2b
feat(buffer): reorder RTL text to visual order via UAX #9
subinium May 29, 2026
7f27072
feat(widgets): add interactive color picker widget
subinium May 29, 2026
462fa43
merge(wave1): #260 bidi RTL text reordering
subinium May 29, 2026
a475b12
merge(wave1): #261 Kitty REPORT_ALL_KEYS + KeyCode::Modifier
subinium May 29, 2026
2cd46d5
merge(wave1): #262 cross-frame key_chord sequence matching
subinium May 29, 2026
b2c92dc
merge(wave1): #256 standalone paginator widget
subinium May 29, 2026
1d0e809
merge(wave1): #257 interactive color picker widget
subinium May 29, 2026
86de71c
feat(calendar): add range-select mode + optional time-of-day
subinium May 29, 2026
11f60c8
feat(widgets-interactive): table per-column renderer, column constrai…
subinium May 29, 2026
3808236
fix(terminal): handle SIGTSTP/SIGCONT — restore terminal on Ctrl+Z, r…
subinium May 29, 2026
e77e402
feat(widgets-input): per-field validators with triggers, built-ins, a…
subinium May 29, 2026
19f633e
merge(wave2): #263 SIGTSTP/SIGCONT job-control suspend/resume
subinium May 29, 2026
cb17942
merge(wave2): #254 calendar range + time-of-day
subinium May 29, 2026
c906ded
merge(wave2): #251 table per-column renderer + constraint widths + mu…
subinium May 29, 2026
0cc365e
merge(wave2): #252 per-field form validators
subinium May 29, 2026
ecf7dcc
fix(wave2-integration): all-features compile + bidi proptest invariant
subinium May 29, 2026
f04c9da
feat(context): zero-dep frame-clock scheduler
subinium May 29, 2026
45c788b
feat(theme): external TOML theme files + serde hot-reload watcher
subinium May 29, 2026
ceda370
feat(widgets-input): add number_input stepper widget
subinium May 29, 2026
38999be
fix(layout): grapheme-cluster segmentation for wrap/truncate/cursor
subinium May 29, 2026
c0c8423
merge(wave3): #259 grapheme-cluster segmentation for wrap/truncate/cu…
subinium May 29, 2026
6f40e17
merge(wave3): #255 number stepper input widget
subinium May 29, 2026
f5a09e8
merge(wave3): #248 zero-dep frame-clock scheduler (timer/debounce/exc…
subinium May 29, 2026
723060c
merge(wave3): #267 external TOML theme + hot-reload
subinium May 29, 2026
15fa3e1
feat(widgets-interactive): variable-height virtual_list (per-item hei…
subinium May 29, 2026
8aee4d9
feat(lib): devtools inspector — focused-widget style panel + focus chain
subinium May 29, 2026
125af34
feat(style): add BLINK/OVERLINE modifiers, underline color/style, the…
subinium May 29, 2026
e3d70de
test(test-utils): VHS gallery CI gate + opt-in PtyBackend ANSI/image-…
subinium May 29, 2026
1b946b3
merge(wave4): #253 variable-height virtual_list
subinium May 29, 2026
9f63204
merge(wave4): #268 devtools inspector (resolved-style + focus-chain)
subinium May 29, 2026
37062bc
merge(wave4): #266 BLINK/OVERLINE + underline color/style + theme-awa…
subinium May 29, 2026
615fb20
merge(wave4): #274 VHS golden-file CI + PTY harness
subinium May 29, 2026
021bf3e
chore: stop tracking .claude/scheduled_tasks.lock session artifact
subinium May 29, 2026
7c08363
refactor(widgets): widen ScrollState::progress to f64 ratio surface
subinium May 29, 2026
68705ac
feat(context): in-frame async ctx.spawn / ctx.poll API (feature=async)
subinium May 29, 2026
ef90a7d
merge(wave5): #243 ScrollState::progress_ratio() f64 + deprecate prog…
subinium May 29, 2026
961d929
refactor(context): unify use_state_named hook family naming
subinium May 29, 2026
9f13093
perf(flush): eliminate per-frame allocations in the hot flush loop
subinium May 29, 2026
8a0d8af
feat(layout): add ContainerBuilder::gap_overlap for signed inter-chil…
subinium May 29, 2026
0d8e968
feat(widgets-display)!: scrollbar/separator return real Response
subinium May 29, 2026
e9e1f41
merge(wave6): #269 eliminate hot-path allocations in flush loop
subinium May 29, 2026
393a000
merge(wave6): #240 unify use_state_named hook family naming
subinium May 29, 2026
c62b43a
merge(wave6): #222 gap_overlap (signed inter-child gap for shared bor…
subinium May 29, 2026
8fb1b2b
merge(wave6): #241 scrollbar()/separator() return Response
subinium May 29, 2026
0d9bb84
refactor(context)!: use_memo returns a Memo<T> handle
subinium May 29, 2026
38fb335
feat(terminal): runtime capability probe + automatic blitter ladder
subinium May 29, 2026
6c1384b
feat(layout): add flex-wrap (multi-line row) and flex-basis
subinium May 29, 2026
4eed8e4
merge(wave7): #264 runtime capability probe + blitter ladder
subinium May 29, 2026
8d1641a
merge(wave7): #258 flex-wrap + flex-basis
subinium May 29, 2026
03cf833
merge(wave7): #272 use_memo returns Memo<T> handle
subinium May 29, 2026
2f8654d
feat(widgets-display)!: status family populates Response via interact…
subinium May 29, 2026
dec5090
feat(widgets-display): scrollbar() click-to-jump on track + drag-to-s…
subinium May 29, 2026
67e2456
perf(docs): commit measured criterion baselines + ratatui head-to-hea…
subinium May 29, 2026
a650b86
feat(terminal): iTerm2 OSC 1337 inline-image blitter + sprixel damage…
subinium May 29, 2026
ae3ba13
docs: reconcile API_DESIGN/NAMING with shipped surface + code_block b…
subinium May 29, 2026
450e3e1
feat(context): opt-in scoped cached region for token-streaming chrome
subinium May 29, 2026
460f2bb
feat(layout): horizontal scroll + fix scroll_row building a vertical …
subinium May 29, 2026
1740514
merge(wave8): #265 iTerm2 OSC 1337 image + sprixel damage matrix
subinium May 29, 2026
c3cd13b
merge(wave8): #242 status family populates Response via interaction()
subinium May 29, 2026
9b46633
merge(wave9): #271 reconcile API_DESIGN/NAMING + code_block builder
subinium May 29, 2026
c9914a2
merge(wave9): #270 committed criterion baselines + ratatui head-to-head
subinium May 29, 2026
2719b50
merge(wave9): #273 streaming overhead measurement + scoped-cache desi…
subinium May 29, 2026
9e25e3d
merge(wave9): #247 horizontal scrolling + fix scroll_row()
subinium May 29, 2026
43b0410
merge(wave8): #249 scrollbar click-to-jump + drag-to-scroll
subinium May 29, 2026
c843b1f
feat: v0.21.0 — competitive gap-closing release (35 issues vs ratatui…
subinium May 29, 2026
eedc9e9
ci: fix v0.21.0 release gate — MSRV pins, CC0-1.0 license, VHS advisory
subinium May 29, 2026
19b3a8d
ci: pin indexmap/unicode-segmentation in Cargo.toml for the MSRV 1.81…
subinium May 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
425 changes: 425 additions & 0 deletions .agents/skills/slt-migration/SKILL.md

Large diffs are not rendered by default.

148 changes: 148 additions & 0 deletions .agents/skills/slt/REFERENCES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
# SLT References — v0.20

Load this when the user asks about feature flags, version-specific APIs, or doc locations.

## Feature matrix (from `Cargo.toml`)

| Feature | Default? | Purpose | APIs / capabilities enabled |
|---|---|---|---|
| `crossterm` | yes | Terminal backend | `slt::run`, `slt::run_with`, `slt::run_inline`, `slt::run_static`, `detect_color_scheme`, `read_clipboard` |
| `async` | no | Tokio integration | `slt::run_async` (channel-based message pump) |
| `serde` | no | Serialize/Deserialize | derives on `Style`, `Color`, `Theme`, layout types |
| `image` | no | Image loading helpers | `ui.image(...)` halfblock/kitty/sixel decode paths |
| `qrcode` | no | QR widget | `ui.qr_code(...)` |
| `syntax-rust` / `syntax-python` / `syntax-javascript` / `syntax-typescript` / `syntax-go` / `syntax-bash` / `syntax-json` / `syntax-toml` / `syntax-c` / `syntax-cpp` / `syntax-java` / `syntax-ruby` / `syntax-css` / `syntax-html` / `syntax-yaml` | no | Per-language tree-sitter grammars | `ui.code_block(code, "rust")` etc. |
| `syntax` | no | All `syntax-*` combined | every language above |
| `kitty-compress` | no | zlib-compressed kitty protocol | larger images, smaller payloads |
| `full` | no | crossterm+async+serde+image+qrcode+kitty-compress | development / demos only |

## v0.20 API surface (highlights AI agents miss)

These shipped in v0.20 and are NOT in older docs. Every entry verified against `src/`.

### Builders (Rule 1)
- `ui.gauge(ratio: f64) -> Gauge<'_>` — `.label(s).width(n).color(c).show() -> GaugeResponse`. `src/context/widgets_display/gauge.rs:37`
- `ui.line_gauge(ratio: f64) -> LineGauge<'_>` — `.label(s).filled(c).empty(c).width(n).show()`. `gauge.rs:55`
- `ui.breadcrumb(&[&str]) -> Breadcrumb<'_>` — `.separator(s).color(c).show() -> BreadcrumbResponse`. `widgets_display/status.rs:200`

### Opts struct (Rule 3)
- `ui.scrollable_with_gutter(&mut ScrollState, GutterOpts<G>, body)` — `widgets_display/gutter.rs:115`
- `GutterOpts::line_numbers(total, viewport)` — 90% case smart constructor
- `GutterOpts::new(total, viewport, |i| label)` — custom labels
- `HighlightRange::line(i)` / `::span(start, len)` — replaces v0.19 `::single`

### Split panes
- `ui.split_pane(&mut SplitPaneState, left, right) -> SplitPaneResponse` — horizontal split, draggable
- `ui.vsplit_pane(&mut SplitPaneState, top, bottom) -> SplitPaneResponse` — vertical split
- `SplitPaneState::new(0.5)`, `.with_min_ratio(0.2)`

### Hooks (v0.19+ + v0.20 additions)
- `ui.use_state(\|\| init)` — order-based, `src/context/runtime.rs:632`
- `ui.use_state_named::<T>("id")` — `&'static str`, `T: Default`, `runtime.rs:690`
- `ui.use_state_named_with("id", \|\| init)` — `&'static str` + init fn, `runtime.rs:671`
- `ui.use_state_keyed("id-{i}", \|\| init)` — runtime `String`, `runtime.rs:978`
- `ui.use_state_keyed_default::<T>("id-{i}")` — runtime `String` + `T: Default`, `runtime.rs:1002`
- `ui.use_memo(&deps, \|d\| compute(d))` — cached compute, `runtime.rs:832`
- `ui.use_effect(\|d\| { ... }, &deps)` — side effect on deps change, `runtime.rs:1039`
- `ui.provide(value, \|ui\| ...)` — typed scoped injection, `runtime.rs:780`
- `ui.use_context::<T>()` — panics if missing, `runtime.rs:807`
- `ui.try_use_context::<T>()` — `Option<&T>`, `runtime.rs:818`

### Animation shorthand (v0.20)
- `ui.animate_value("id", target, duration_ticks) -> f64` — `runtime.rs:743`
- `ui.animate_bool("id", value) -> f64` — eased 0..1 toggle, `runtime.rs:716`

### Response signal fields (v0.20)
`Response { clicked, right_clicked, hovered, changed, focused, gained_focus, lost_focus, rect }`. `right_clicked`, `gained_focus`, `lost_focus` are new in v0.20. Older docs may show only the v0.19 set.
- `Response::on_hover(ui, "tooltip text")` — chained tooltip (`src/context/state.rs:221`)
- `Response::on_hover_ui(ui, |ui| { ... })` — chained tooltip with custom body

### Theme additions (v0.20)
- `Theme::compact()` / `Theme::comfortable()` / `Theme::spacious()` — density variants of dark
- `Theme::with_spacing(spacing)` — override Spacing on any theme
- `ContainerBuilder::theme(theme)` — per-subtree theme override (no ambient state)
- `ThemeBuilder` / `ThemeBuilder::builder_from(base)` — `const fn` since v0.19.2

### Layout / DX (v0.20)
- `ContainerBuilder::fill()` — equivalent to `.grow(1)`, more readable
- `Rect::center_in(outer)`, `center_horizontally_in`, `center_vertically_in` — `src/rect.rs`
- `Context::modal_with(ModalOptions { tab_trap: true }, \|ui\| ...)` — focus-trapped modal
- `Context::static_log(...)` / `take_static_log()` — for `slt::run_static` scrollback

### Keymap (v0.20)
- `WidgetKeyHelp` trait — implement on a state type to publish keybindings
- `Context::publish_keymap(...)` / `published_keymaps()` — collect + render help
- `Context::keymap_help_overlay()` — auto-rendered overlay
- `RunConfig::handle_ctrl_c(bool)` — opt-out of auto Ctrl-C quit

### Testing (v0.20)
- `TestBackend::record_frames()` + `tb.frames()[i]` — frame history
- `tb.sequence().tick(n).key(...).type_string(s, &mut value).run()`
- `Buffer::snapshot_format()` — readable snapshot dump
- `tb.assert_not_contains(s)`, `assert_line_not_contains`, `assert_empty_line(y)`, `assert_style_at(x, y, style)`

## v0.20 removed APIs (do NOT use)

These were either v0.19 preview or pre-1.0 mistakes consolidated by the v0.20 API consistency pass. AI training data may suggest them — don't.

| Removed | Replacement |
|---|---|
| `gauge_w(r, w)` | `gauge(r).width(w)` |
| `gauge_colored(r, c)` | `gauge(r).color(c)` |
| `line_gauge_with(r, opts)` | `line_gauge(r).<chain>` |
| `breadcrumb_sep(b, s)` | `breadcrumb(b).separator(s)` |
| `breadcrumb_response(b)` / `breadcrumb_response_with(b, s)` | `breadcrumb(b).show()` (returns `BreadcrumbResponse`) |
| `LineGaugeOpts` | `LineGauge<'_>` builder |
| `HighlightRange::single(i)` | `HighlightRange::line(i)` |
| `label_owned(s)` | `label(s)` (accepts `impl Into<String>`) |

## Doc pointers (cross-check before relying on)

These docs exist but several lag behind v0.20. When in doubt, grep source.

- `docs/COMPLETE_REFERENCE.md` — **partially stale** (header still says v0.19.2; missing gauge/line_gauge/scrollable_with_gutter/split_pane/Response signal fields/v0.19 hooks). Treat as supplementary, not authoritative.
- `docs/WIDGETS.md` — **partially stale** (breadcrumb 4-variant API, missing v0.20 builders).
- `docs/STATE_APIS.md` — current for state methods. Note `ScrollState::progress() -> f32` is a documented Rule 2 violation pending fix.
- `docs/PREVIOUS_FRAME_GUIDE.md` — current. Read for `Response.rect` timing.
- `docs/PATTERNS.md` — current. `provide`/`use_context`/`use_state_named`/`with_if` covered.
- `docs/QUICK_START.md` — current.
- `docs/COOKBOOK.md` — current. (Cargo dep line still says `superlighttui = "0.19"` — bump to `0.20` mentally.)
- `docs/THEMING.md` — current. `ThemeBuilder` `const fn` since v0.19.2.
- `docs/TESTING.md` — covers v0.19.1 EventBuilder additions. Read alongside `tests/v020_test_utils_demo.rs` for v0.20 helpers.
- `docs/ANIMATION.md` — current.
- `docs/AI_GUIDE.md` — concise overview, current.
- `docs/BACKENDS.md` — `Backend`, `AppState`, `frame()` low-level paths.
- `docs/ARCHITECTURE.md` — render pipeline.
- `docs/DEBUGGING.md` — F12 layout overlay, debug flags.
- `docs/MIGRATION.md` — **partially stale** for v0.19 → v0.20 (frames v0.20 as "next minor", but it shipped). Use this skill's "v0.20 removed APIs" table.
- `docs/llms.txt` — **partially stale** (v0.19.2 highlight list).
- `docs/RUSTDOC_GUIDE.md` — current. Doctest standards.
- `docs/NAMING.md` — current. The micro-tier rubric this skill encodes.
- `docs/API_DESIGN.md` — current. The 5 rules this skill encodes.
- `docs/DESIGN_PRINCIPLES.md` — current. North-star + audit matrix.

**Authoritative when docs disagree**: source code (`src/lib.rs` re-exports, `src/context/widgets_*.rs` signatures), `examples/v020_*.rs` runnable demos, `tests/v020_*.rs` regression tests.

## Examples (`examples/` — 59 files, 16 Cargo-listed)

The skill's `SKILL.md` lists the canonical reference example for each domain. Highlights:
- **v0.20 surface**: `v020_showcase.rs` (kitchen sink), `v020_tour.rs` (tabbed), `v020_dx_shortcuts.rs` (on_hover/animate_bool/fill)
- **Cookbook recipes**: `cookbook_login.rs`, `cookbook_table.rs`, `cookbook_modal_toast.rs`, `cookbook_dashboard.rs`, `cookbook_file_picker.rs`, `cookbook_tour.rs`
- **Composition**: `demo_website.rs` (provide/use_context), `tests/context_provider.rs` (8 unit tests)
- **CJK / wide chars**: `demo_cjk.rs`
- **All charts**: `demo_infoviz.rs`

## Release / deployment

`CLAUDE.md` at project root has the full 8-step checklist. Short:

Local PRE-CI → branch `release/vX.Y.Z` → atomic commit → push → PR → wait CI → merge (squash) → pull main → tag → push tag → wait `release.yml` → verify `gh release view` + crates.io + docs.rs → announce.

## MSRV

Rust 1.81. Verify with `cargo check --features async,serde` on a 1.81 toolchain (CI's MSRV job runs this exact command).

## Supported targets

- Native: macOS, Linux, Windows (terminal backend via `crossterm`)
- WASM: `wasm32-unknown-unknown` via `crates/slt-wasm` (no `crossterm`)
Loading
Loading