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
11pub(crate) use {app::*, component::*, page::*, style::*};
12
13pub(crate) use std::{
14    cell::RefMut,
15    cmp::Ordering,
16    collections::HashSet,
17    f64::consts::{FRAC_PI_2, PI, TAU},
18    fmt::{self, Debug, Display, Formatter},
19    ops::Range,
20};
21
22use std::{
23    cell::{Cell, RefCell},
24    collections::HashMap,
25    iter::Iterator,
26    rc::Rc,
27};
28
29use {
30    compare_version::*,
31    euv::{
32        js_sys::*,
33        wasm_bindgen::{Clamped, prelude::*},
34        wasm_bindgen_futures::*,
35        *,
36    },
37    euv_engine::*,
38    euv_ui::*,
39};
40
41use {
42    qrcode::{QrCode, render::svg, types::QrError},
43    serde::{Deserialize, Serialize},
44};
45
46/// Mounts the demo application into the page.
47///
48/// This is the wasm entry point: the engine calls it on load, so it is
49/// never invoked by a test and is not a function anything can name.
50#[wasm_bindgen]
51pub fn main() {
52    console_error_panic_hook::set_once();
53    inject_app_global_css();
54    App::mount(APP_MOUNT_SELECTOR, app);
55}