euv-docs 0.48.0

Cross-platform documentation viewer and static site generator powered by euv and euv-ui.
Documentation
use super::*;

/// Shared reactive state driving the showcase-parity `euv-docs` viewer across native desktop, headless, and WebAssembly targets.
#[derive(Clone, Data)]
pub struct DocsViewerState {
    /// Immutable documentation site data shared across routes.
    pub(crate) site: Rc<DocSite>,
    /// Reactive theme controller supporting all 17 `euv-ui` schemes and Light/Dark switching.
    pub(crate) theme: UiThemeState,
    /// Persistent `PageRetention::Freeze` router preserving scroll state per documentation page.
    pub(crate) router: EuvRouter,
    /// Active canonical route path signal.
    #[get(type(copy))]
    pub(crate) active_route: Signal<String>,
    /// Live sidebar search query signal.
    #[get(type(copy))]
    pub(crate) search_query: Signal<String>,
    /// Active table-of-contents heading anchor slug signal.
    #[get(type(copy))]
    pub(crate) active_toc_slug: Signal<String>,
    /// Quick-search command palette modal visibility signal.
    #[get(type(copy))]
    pub(crate) cmd_open: Signal<bool>,
    /// Quick-search command palette query signal.
    #[get(type(copy))]
    pub(crate) cmd_query: Signal<String>,
    /// Mobile catalog drawer visibility signal toggled by the bottom navigation `Catalog` (`目录`) tab.
    #[get(type(copy))]
    pub(crate) catalog_drawer_open: Signal<bool>,
    /// Loaded `/api/page-artifacts` catalog records rendered on `home: true` pages.
    #[get(type(copy))]
    pub(crate) catalog_items: Signal<Vec<DocsCatalogArtifact>>,
    /// Whether the `/api/page-artifacts` catalog request is currently loading.
    #[get(type(copy))]
    pub(crate) catalog_loading: Signal<bool>,
    /// Whether the latest `/api/page-artifacts` catalog request failed (enabling localized Retry).
    #[get(type(copy))]
    pub(crate) catalog_error: Signal<bool>,
    /// Guard preventing duplicate route registration on `router`.
    pub(crate) router_ready: Rc<Cell<bool>>,
}