Skip to main content

euv_example/
lib.rs

1//! euv-example
2//!
3//! Cross-platform native showcase application built with euv and euv-ui,
4//! demonstrating fine-grained reactivity, multi-mode rendering, window settings,
5//! 17 design schemes, virtualized lists, and overlays.
6
7mod app;
8mod pages;
9mod state;
10
11#[cfg(test)]
12#[path = "../tests/mod.rs"]
13mod tests;
14
15pub use {app::*, pages::*, state::*};
16
17#[cfg(debug_assertions)]
18use euv_automation::AI_SCHEMA_PROTOCOL_VERSION;
19#[cfg(test)]
20use euv_automation::{
21    AiAction, AiAnomalyKind, AiLayoutAnomaly, AiRuntimeSnapshot, AiSchemaRequest, AiSchemaResponse,
22    UiAnomalyAuditConfig, UiAnomalyAuditor, UiAnomalyFinding, UiAnomalyReport, UiAnomalySeverity,
23};
24#[cfg(any(debug_assertions, test))]
25use euv_automation::{AiAppHooks, AiSchemaProtocol, Value};
26use std::{
27    cell::{Cell, RefCell},
28    f32::consts::PI,
29    path::{Path, PathBuf},
30    rc::Rc,
31    sync::Arc,
32};
33#[cfg(target_arch = "wasm32")]
34use std::{
35    cell::{Ref, RefMut},
36    collections::BTreeMap,
37    mem::take,
38};
39#[cfg(not(target_arch = "wasm32"))]
40use std::{
41    env, fs,
42    io::{Error, Read, Write},
43    net::{SocketAddr, TcpListener},
44    thread::spawn,
45    time::Instant,
46};
47use {
48    euv::{PointerEvent, *},
49    euv_automation::DevAutomationBridge,
50    euv_ui::*,
51    lombok_macros::{Data, Getter},
52};
53#[cfg(target_arch = "wasm32")]
54use {
55    js_sys::{Function, Object, Promise, Reflect, Uint8Array, global},
56    wasm_bindgen::{JsCast, JsValue, closure::Closure, prelude::wasm_bindgen},
57    wasm_bindgen_futures::{JsFuture, spawn_local},
58    web_sys::{
59        Document, DomRect, Element, Event, EventSource, EventTarget, HtmlCanvasElement,
60        HtmlElement, KeyboardEvent, MediaQueryList, MessageEvent, Performance, RequestInit,
61        RequestMode, Response, Storage, WheelEvent, Window, window,
62    },
63};