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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#![deny(
missing_docs,
bare_trait_objects,
anonymous_parameters,
elided_lifetimes_in_paths
)]
#![allow(macro_expanded_macro_exports_accessed_by_absolute_paths)]
#![recursion_limit = "512"]
extern crate self as yew;
use proc_macro_hack::proc_macro_hack;
#[proc_macro_hack(support_nested)]
pub use yew_macro::html;
pub mod macros {
pub use crate::html;
}
pub mod agent;
pub mod app;
pub mod callback;
pub mod components;
pub mod format;
pub mod html;
pub mod scheduler;
pub mod services;
pub mod utils;
pub mod virtual_dom;
pub mod events {
pub use crate::html::{ChangeData, InputData};
pub use stdweb::web::event::{
BlurEvent, ClickEvent, ContextMenuEvent, DoubleClickEvent, DragDropEvent, DragEndEvent,
DragEnterEvent, DragEvent, DragExitEvent, DragLeaveEvent, DragOverEvent, DragStartEvent,
FocusEvent, GotPointerCaptureEvent, IKeyboardEvent, IMouseEvent, IPointerEvent,
KeyDownEvent, KeyPressEvent, KeyUpEvent, LostPointerCaptureEvent, MouseDownEvent,
MouseEnterEvent, MouseLeaveEvent, MouseMoveEvent, MouseOutEvent, MouseOverEvent,
MouseUpEvent, MouseWheelEvent, PointerCancelEvent, PointerDownEvent, PointerEnterEvent,
PointerLeaveEvent, PointerMoveEvent, PointerOutEvent, PointerOverEvent, PointerUpEvent,
ScrollEvent, SubmitEvent,
};
}
pub fn initialize() {
stdweb::initialize();
}
pub fn run_loop() {
stdweb::event_loop();
}
pub fn start_app<COMP>()
where
COMP: Component + Renderable<COMP>,
{
initialize();
App::<COMP>::new().mount_to_body();
run_loop();
}
pub mod prelude {
pub use crate::agent::{Bridge, Bridged, Threaded};
pub use crate::app::App;
pub use crate::callback::Callback;
pub use crate::events::*;
pub use crate::html::{Component, ComponentLink, Href, Html, Renderable, ShouldRender};
pub use crate::macros::*;
pub mod worker {
pub use crate::agent::{
Agent, AgentLink, Bridge, Bridged, Context, Global, HandlerId, Job, Private, Public,
Transferable,
};
}
}
pub use self::prelude::*;