Skip to main content

euv_ui/component/browser/hook/
struct.rs

1use crate::*;
2
3/// Reactive state for the browser API features.
4///
5/// Aggregates all signals needed for the localStorage, sessionStorage,
6/// clipboard, window, navigator, location, and console sections.
7#[derive(Clone, Copy, Data, Debug, Eq, PartialEq)]
8pub struct UseEuvBrowser {
9    /// The localStorage key input.
10    #[get(type(copy))]
11    pub local_key: Signal<String>,
12    /// The localStorage value input.
13    #[get(type(copy))]
14    pub local_value: Signal<String>,
15    /// The localStorage operation result.
16    #[get(type(copy))]
17    pub local_result: Signal<String>,
18    /// The sessionStorage key input.
19    #[get(type(copy))]
20    pub session_key: Signal<String>,
21    /// The sessionStorage value input.
22    #[get(type(copy))]
23    pub session_value: Signal<String>,
24    /// The sessionStorage operation result.
25    #[get(type(copy))]
26    pub session_result: Signal<String>,
27    /// The clipboard text input.
28    #[get(type(copy))]
29    pub clipboard_text: Signal<String>,
30    /// The clipboard operation result.
31    #[get(type(copy))]
32    pub clipboard_result: Signal<String>,
33    /// The window size display.
34    #[get(type(copy))]
35    pub window_size: Signal<String>,
36    /// The user agent string.
37    #[get(type(copy))]
38    pub user_agent: Signal<String>,
39    /// The navigator language.
40    #[get(type(copy))]
41    pub language: Signal<String>,
42    /// The location href.
43    #[get(type(copy))]
44    pub location_url: Signal<String>,
45    /// The location origin.
46    #[get(type(copy))]
47    pub location_origin_val: Signal<String>,
48    /// The location pathname.
49    #[get(type(copy))]
50    pub location_pathname_val: Signal<String>,
51    /// The console message input.
52    #[get(type(copy))]
53    pub console_input: Signal<String>,
54}