Skip to main content

herogpui_theme/
lib.rs

1//! HeroUI design tokens and theming for GPUI.
2//!
3//! This crate is a faithful port of HeroUI v3's `packages/styles`: the semantic
4//! OKLCH color tokens for the light and dark appearances, the layout tokens
5//! (radius, border width, shadows), and a global [`ThemeProvider`] with an
6//! [`ActiveTheme`] accessor trait.
7
8#![warn(missing_docs)]
9
10mod components;
11mod layout;
12mod provider;
13mod semantic;
14mod theme;
15#[cfg(feature = "serde")]
16mod theme_document;
17#[cfg(feature = "serde")]
18mod theme_registry;
19#[cfg(feature = "watch")]
20mod theme_watch;
21
22pub use components::*;
23pub use layout::*;
24pub use provider::*;
25pub use semantic::*;
26pub use theme::*;
27#[cfg(feature = "serde")]
28pub use theme_document::{
29    ColorPair, RoleOverride, Roles, SurfaceLevels, ThemeDocument, ThemeDocumentError,
30};
31#[cfg(feature = "serde")]
32pub use theme_registry::{
33    load_themes_dir, presets, register_theme_json, ThemeLoadError, THEME_SCHEMA,
34};
35#[cfg(feature = "watch")]
36pub use theme_watch::{watch_themes_dir, ThemeReload, ThemeWatcher, THEME_WATCH_INTERVAL};