frust_theme/lib.rs
1//! Design-token crate: the [`Theme`] aggregate and its token-group tables
2//! (color, typography, shape, elevation, motion, glass, status), plus the
3//! [`ThemeBuilder`] and [`ThemeExtensions`] seams a design system composes
4//! its own token set through.
5//!
6//! **No design language lives here.** The one baseline this crate constructs
7//! is [`Theme::neutral`](theme::Theme::neutral) — the language-free floor
8//! every shell falls back to when nothing was installed. Material, Cupertino,
9//! and Glyph each ship as their own plugin crate (`frust-material`,
10//! `frust-cupertino`, `frust-glyph`), building their tables over the same
11//! public constructors and attaching whatever they need through
12//! [`ThemeExtensions`]. A [`DesignLanguage`] tag records *which* system
13//! assembled a `Theme`; it never selects behaviour here.
14//!
15//! This crate is deliberately **pure data + constructors** — no
16//! `frust-scene`, no `reactive_graph`. It depends on `peniko` (for
17//! [`peniko::Color`], reused by [`color::ColorScheme`]), `frust-text` (for
18//! [`frust_text::TextStyle`], reused by [`typography::TypeScale`]), and
19//! `frust-core` (for the `PaintCtx`/`LayoutCtx` recovery helpers alone) — see
20//! `docs/ARCHITECTURE.md`'s Layer Dependencies.
21//!
22//! Every token table below carries its own source URL and retrieval date in
23//! its module's doc comments.
24
25pub mod builder;
26pub mod color;
27pub mod elevation;
28pub mod extensions;
29pub mod glass;
30pub mod motion;
31pub mod shape;
32pub mod status;
33pub mod theme;
34pub mod typefaces;
35pub mod typography;
36
37pub use builder::ThemeBuilder;
38pub use color::{Brightness, ColorScheme};
39pub use elevation::{Elevation, ElevationLevel, ShadowSpec, SurfaceRole};
40pub use extensions::ThemeExtensions;
41pub use glass::{GlassFill, GlassMaterial, GlassScale};
42pub use motion::{CosmeticLoopRate, EasingSet, MotionDurations, MotionScheme, MotionSpring};
43pub use shape::ShapeScale;
44pub use status::{StatusColors, StatusPalette};
45pub use theme::{DesignLanguage, Theme};
46pub use typefaces::{FontFace, NativeTypefaces};
47pub use typography::TypeScale;