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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//! # RoadMap
//!
//! | Plan              | Date                  |
//! |-------------------|-----------------------|
//! | Virtual-DOM       | 2020.1.28 - 2020.2.1  |
//! | Basic-Component   | 2020.2.5 - 2020.2.7   |
//! | Router            | 2020.2.7 - 2020.2.10  |
//! | Native Components | 2020.2.10 - 2020.2.11 |
//! | Benchmark         | 2020.2.11 - 2020.2.15 |
//! | Beta Versin       | 2020.2.15 - 2020.2.17 |
//!
//! # Calling Elvis
//!
//! Is anybody home?
//!
//! As we know, `Elvis` is a famous rock star, and both a famous rock song named `Calling Elvis` wrote by `Dire Straits` which inspired a unknown rock star to write down these chords(code || words).
//!
//! For now, Elvis, the rock star, will rise, once again, **beyond** the internet —— **truely your wasm web library**.
//!
//! [The Evlis Book][1] mainly talks about the usage of the npm package `calling-elvis`, and if you want to use `"low-level"` api rusting the web, plz check out [elvis' rust doc][2].
//!
//! ## Goals
//!
//! Writing web pages in **pure javascript** using wasm bindings, **without** `jsx` or `any other` complex syntax, **just javascript**, of course, **not** writing `html` nor `css` either.
//!
//! ## Roll up for the Magical Mystery Tour!
//!
//! Here we go! Roll up, roll up for the mystery tour, the magical mystery tour is waiting to take you away! Hoping to take you away! Coming to take you away! Dying to take you away, take you today!
//!
//! Let me take you down, cause I'm going to,
//!
//! ```js
//! /* javascript
//!
//! const Home = Text("Pink is the Pig!", {
//!   bold: true,
//!   italic: true,
//!   size: 10,
//!   color: Colors.PinkAccent(),
//! });
//!
//! new Elvis({
//!   home: Home,
//! }).calling();
//! ```
//!  **Strawberry Fields**.
//!
//!
//! ## LICENSE
//!
//! Heartbreak Hotel.
//!
//! [1]: https://clearloop.github.io/elvis
//! [2]: https://docs.rs/elvis
#![feature(try_trait)]
#![feature(box_syntax)]
#![feature(vec_remove_item)]
mod bridge;
mod err;
mod layout;
mod serde;
mod tree;
mod values;
mod widgets;

pub use crate::{
    err::Error,
    layout::*,
    serde::Serde,
    tree::Tree,
    values::{color::Colors, layout::*, unit::Unit},
    widgets::{Image, ImageSrc, Text, TextStyle},
};

// elvis platform features
/// Browser data bridge, as default feature.
#[cfg(feature = "web")]
mod web;