ui_storybook/components/mod.rs
1//! UI components — Leptos `#[component]` definitions matching rust-ui's
2//! visual aesthetic (dark zinc palette, subtle borders, soft shadows).
3//!
4//! Organised into seven subgroups that mirror the recorder's product
5//! surfaces:
6//! - [`primitives`] — `Button`, `Card`, and reusable control primitives
7//! (UI-01 / UI-04).
8//! - [`shell`] — application chrome: `DropZone`, `StatusBar`,
9//! `NavigationRail`, `AppShell` (UI-02).
10//! - [`menus`] — popovers, dropdowns, command menus (UI-03 / UI-05 /
11//! UI-10).
12//! - [`recorder`] — tray recorder + capture mode + device pickers
13//! (UI-06 through UI-13).
14//! - [`library`] — recordings library sidebar + grid (UI-14 / UI-15).
15//! - [`editor`] — editor shell, Wisp canvas host, inspector, timeline,
16//! dope sheet, player controls (UI-16 through UI-19).
17//! - [`cursor`] — Cursor Studio shell + preview canvas (UI-20 / UI-21).
18//!
19//! Each subgroup re-exports its public types so
20//! `ui_storybook::components::Button` resolves identically to
21//! `ui_storybook::components::primitives::Button` — callers (notably
22//! `app_ui`) pin to the short path.
23//!
24//! Every component re-exported from here must have a story in
25//! [`crate::stories`]. The story drives the SSR snapshot test.
26
27// Leptos `#[component]` rewrites the function into a builder-pattern struct
28// plus a wrapper fn; clippy's `must_use_candidate` and `needless_pass_by_value`
29// fire on the rewritten code regardless of attribute placement on the source
30// fn. Allowing them at the module level keeps every component clean without
31// per-fn pragma noise.
32#![allow(
33 clippy::must_use_candidate,
34 clippy::needless_pass_by_value,
35 reason = "Leptos `#[component]` macro rewrites these patterns; lints fire on generated code"
36)]
37// UI components are documented via mdBook stories under `_docs/book/src/ui/`,
38// not via rustdoc — every visible variant has a screenshot + use case there.
39// `missing_docs` would otherwise fire on macro-generated builder structs we
40// don't author directly.
41#![allow(
42 missing_docs,
43 reason = "components documented in mdBook stories; rustdoc gate would fire on macro-generated builder structs"
44)]
45
46pub mod cursor;
47pub mod editor;
48pub mod library;
49pub mod menus;
50pub mod primitives;
51pub mod recorder;
52pub mod shell;
53
54// Re-export from each populated subgroup so callers can use the short
55// `ui_storybook::components::<Name>` path. Empty subgroups (menus, library,
56// cursor for now) have nothing to re-export until later tickets fill them in.
57pub use editor::{
58 DopeSheet, DopeSheetKeyframe, DopeSheetTrack, KeyframeKind, PlayState, PlayerControls,
59 TrackKind,
60};
61pub use menus::{
62 MenuBadgeView, MenuFooter, MenuList, MenuRow, MenuRowKind, MenuSection, PopoverPlacement,
63 PopoverSurface,
64};
65pub use primitives::{
66 Badge, BadgeKind, Button, ButtonSize, ButtonVariant, Card, CardBody, CardHeader, ColorSwatch,
67 Divider, DividerOrientation, IconButton, IconButtonVariant, IconTile, IconTileKind, Kbd, Meter,
68 Segment, SegmentedControl, SelectPill, Slider, Surface, SurfaceKind, ToggleSwitch,
69};
70pub use recorder::{
71 AppIconView, AudioAppView, AudioFilter, CaptureModeTabs, CaptureSourceKind, CaptureSourceRow,
72 CaptureSourceView, DeviceOptionView, DevicePickerMenu, DevicePickerState, DeviceThumb,
73 DisplayPreviewFrame, DisplayPreviewView, DisplaySourceCard, DisplaySourceView,
74 OnScreenOptionKind, OnScreenOptionView, OnScreenOptionsPopover, PreviewWindowChip,
75 RecordingState, RecordingToolbar, SaveFormat, SavePanel, SavePanelView, SystemAudioAppList,
76 SystemAudioRow, SystemAudioView, aspect_ratio_css, format_selection_count,
77};
78pub use shell::{
79 AppSection, AppShell, DropZone, DropZoneState, NavItemView, NavigationRail, StatusBar,
80 StatusKind, UserAvatar, UserAvatarView, WorkspaceBadge, WorkspaceBadgeView,
81 WorkspaceSwitcherMenu, WorkspaceView, format_member_count,
82};