1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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>,
/// Topbar locale dropdown visibility signal.
#[get(type(copy))]
pub(crate) locale_menu_open: Signal<bool>,
/// Topbar 17-scheme theme color dropdown visibility signal.
#[get(type(copy))]
pub(crate) scheme_menu_open: Signal<bool>,
/// Most recently selected locale navigation href (recorded across all targets for deterministic verification).
#[get(type(copy))]
pub(crate) last_locale_href: Signal<String>,
/// Most recently opened external or new-tab URL (recorded across all targets for deterministic verification).
#[get(type(copy))]
pub(crate) last_opened_url: Signal<String>,
/// Unlocked directory/page password secrets entered by the user during this session.
#[get(type(copy))]
pub(crate) unlocked_passwords: Signal<Vec<String>>,
/// Monotonic scroll tick signal pulsed whenever the active documentation viewport scrolls.
#[get(type(copy))]
pub(crate) scroll_tick: Signal<u64>,
/// Cached recursive filesystem catalog tree computed once from `site`.
pub(crate) catalog_tree: Rc<Vec<DocCatalogNode>>,
/// 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>>,
}