Skip to main content

euv_example/
lib.rs

1//! euv-example
2//!
3//! A demonstration application showcasing the euv component system,
4//! reactive signals, routing, and HTML macros.
5
6mod app;
7mod component;
8mod page;
9mod style;
10
11#[cfg(test)]
12#[path = "../tests/mod.rs"]
13mod tests;
14
15pub(crate) use {app::*, component::*, page::*, style::*};
16
17pub(crate) use std::{
18    cell::RefMut,
19    cmp::Ordering,
20    collections::HashSet,
21    f64::consts::{FRAC_PI_2, PI, TAU},
22    fmt::{self, Debug, Display, Formatter},
23    ops::Range,
24};
25
26use std::{
27    cell::{Cell, RefCell},
28    collections::HashMap,
29    iter::Iterator,
30    rc::Rc,
31};
32
33use {
34    compare_version::*,
35    euv::{
36        js_sys::*,
37        wasm_bindgen::{Clamped, prelude::*},
38        wasm_bindgen_futures::*,
39        *,
40    },
41    euv_engine::*,
42    euv_ui::*,
43};
44
45use {
46    qrcode::{QrCode, render::svg, types::QrError},
47    serde::{Deserialize, Serialize},
48};
49
50/// Mounts the demo application into the page.
51///
52/// This is the wasm entry point: the engine calls it on load, so it is
53/// never invoked by a test and is not a function anything can name.
54#[wasm_bindgen]
55pub fn main() {
56    console_error_panic_hook::set_once();
57    inject_app_global_css();
58    App::mount(APP_MOUNT_SELECTOR, app);
59}