Behind jackin❯ — crates
jackin-tui-lookbook
Interactive component lookbook for jackin-tui — the reference rendering of every shared TUI component in its real state. This is where a developer (or agent) copies the canonical API call for a component, and where SVG previews for the docs are generated.
What this crate owns
- A
story_*()per component variant, each calling the publicrender_*()helper orWidget::renderexactly as the real surfaces do. - Interactive
*Interactorstructs that drive a real component*Statethroughhandle_key, matching real-app usage. - The SVG preview generator that feeds
docs/public/tui-lookbook/.
Architecture tier and allowed dependencies
Presentation / dev-tool crate. Allowed workspace deps: jackin-tui. It depends on nothing else because it must call only jackin-tui's public API — that is its whole purpose.
Structure
| Module | Owns | Tests |
|---|---|---|
| lookbook runner + --check drift gate | — |
· | one story per component variant | |
| interactive state drivers | — |
| SVG preview rendering for the docs | — |
| tests | — |
Public API
None consumed; this crate is a consumer of jackin-tui. Its own surface is the lookbook binary (cargo run -p jackin-tui-lookbook -- docs/public/tui-lookbook to regenerate, -- --check … to verify no drift).
How to verify
cargo nextest run -p jackin-tui-lookbook
cargo run -p jackin-tui-lookbook -- --check docs/public/tui-lookbookThe hard rule — use only jackin-tui public API — applies to every story and interactor.