basic nodes
This commit is contained in:
parent
1a5937229e
commit
4cbfd3c251
6 changed files with 42 additions and 2 deletions
|
@ -1,3 +1,3 @@
|
|||
import 'package:jael_web/jael_web.dart';
|
||||
|
||||
void main() {}
|
||||
void main() {}
|
|
@ -1 +1,5 @@
|
|||
export 'src/dom_builder.dart';
|
||||
export 'src/builder_node.dart';
|
||||
export 'src/component.dart';
|
||||
export 'src/dom_builder.dart';
|
||||
export 'src/dom_node.dart';
|
||||
export 'src/fn.dart';
|
||||
|
|
8
jael_web/lib/src/builder_node.dart
Normal file
8
jael_web/lib/src/builder_node.dart
Normal file
|
@ -0,0 +1,8 @@
|
|||
import 'dom_builder.dart';
|
||||
import 'dom_node.dart';
|
||||
|
||||
abstract class BuilderNode extends DomNode {
|
||||
DomBuilderElement<T> build<T>(DomBuilder<T> dom);
|
||||
|
||||
void destroy<T>(DomBuilderElement<T> el);
|
||||
}
|
15
jael_web/lib/src/component.dart
Normal file
15
jael_web/lib/src/component.dart
Normal file
|
@ -0,0 +1,15 @@
|
|||
import 'dom_node.dart';
|
||||
|
||||
abstract class Component<State> {
|
||||
State state;
|
||||
|
||||
DomNode render();
|
||||
|
||||
void afterMount() {}
|
||||
|
||||
void beforeDestroy() {}
|
||||
|
||||
void setState(State newState) {
|
||||
// TODO:
|
||||
}
|
||||
}
|
3
jael_web/lib/src/dom_node.dart
Normal file
3
jael_web/lib/src/dom_node.dart
Normal file
|
@ -0,0 +1,3 @@
|
|||
abstract class DomNode {
|
||||
|
||||
}
|
10
jael_web/lib/src/fn.dart
Normal file
10
jael_web/lib/src/fn.dart
Normal file
|
@ -0,0 +1,10 @@
|
|||
// TODO: Lambda/anonymous component
|
||||
//
|
||||
// import 'component.dart';
|
||||
// import 'dom_node.dart';
|
||||
|
||||
// class Fn<T> extends Component {
|
||||
// final DomNode Function(T) f;
|
||||
|
||||
// Fn(this.f);
|
||||
// }
|
Loading…
Reference in a new issue