ui_storybook/lib.rs
1//! `ui-storybook` — Leptos UI component gallery, modelled on rust-ui's
2//! shadcn-style copy-paste components but living inside our workspace so we can
3//! put them under the same gate / story / test discipline as wisp.
4//!
5//! # Layers
6//!
7//! - [`components`] — the actual Leptos `#[component]`s (`Button`,
8//! `DopeSheet`, …), organised into product-surface subgroups
9//! (`primitives`, `shell`, `menus`, `recorder`, `library`, `editor`,
10//! `cursor`).
11//! - [`fixtures`] — owned mock data structs (devices, workspaces,
12//! recordings, timeline tracks, …) reused across stories so component
13//! stories never hand-roll inline mocks.
14//! - [`stories`] — the gallery registry. Every component re-exported from
15//! `components` must have at least one story; `stories::all_stories()`
16//! is the stable list consumed by `tests/snapshots.rs` and
17//! `ui-export-stories`.
18//!
19//! # Testing
20//!
21//! Components are exercised via SSR (`leptos::IntoView::into_view().to_html()`)
22//! in `tests/snapshots.rs`. Each story snapshots its rendered HTML through
23//! `insta` so any unintended structural change (class swaps, missing children,
24//! attribute drift) trips the gate before it can ship.
25//!
26//! Browser viewing comes via `trunk serve` once a `csr` entry-point is wired
27//! up — that's deliberately deferred so SSR + snapshots can land first.
28
29pub mod components;
30pub mod exporter;
31pub mod fixtures;
32pub mod stories;