euv-ui 0.48.3

Cross-platform UI component library and 17-scheme design system for the euv framework with pixel-consistent rendering across Web, Android, iOS, iPadOS, macOS, Windows, and Linux.
Documentation
use super::*;

/// Reactive UI state bundle shared across all `euv-ui` components.
#[derive(Clone, Data, Debug)]
pub struct UiThemeState {
    /// Reactive design scheme signal (supports live switching across all 17 schemes).
    #[get(type(copy))]
    pub(crate) scheme: Signal<DesignScheme>,
    /// Reactive light/dark mode signal.
    #[get(type(copy))]
    pub(crate) mode: Signal<ThemeMode>,
    /// Derived memoized `ThemeTokens` recomputed only when scheme or mode changes.
    #[get(type(copy))]
    pub(crate) tokens: Memo<ThemeTokens>,
}

/// Precomputed `(old, new)` semantic color lookup tables for one directed theme hop used by in-place remaps.
#[derive(Clone, Copy, Debug)]
pub(crate) struct ThemeRemapPairs {
    /// Background fill and gradient stop pairs in semantic priority order.
    pub(crate) surface: [(Color, Color); THEME_SURFACE_PAIR_COUNT],
    /// Border and focus ring stroke pairs in semantic priority order.
    pub(crate) border: [(Color, Color); THEME_BORDER_PAIR_COUNT],
    /// Text color pairs in semantic priority order.
    pub(crate) text: [(Color, Color); THEME_TEXT_PAIR_COUNT],
    /// Source theme geometry tokens.
    pub(crate) from_geometry: ThemeGeometry,
    /// Target theme geometry tokens.
    pub(crate) to_geometry: ThemeGeometry,
}

/// Lifetime guard deduplicating the root-attached external fullscreen exit observer per `Context` signal.
#[derive(Clone, Debug)]
pub(crate) struct FullscreenWatcherGuard {
    /// Watched `Context::immersive_fullscreen` signal identifier.
    pub(crate) signal_id: SignalId,
    /// Flag cleared by `on_cleanup` when the watched `SceneTree` root scope is disposed.
    pub(crate) alive: Rc<Cell<bool>>,
}