vasille 2.0.5 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/cdn/es2015.js +827 -827
- package/cdn/es5.js +909 -829
- package/flow-typed/vasille.js +2647 -835
- package/lib/binding/attribute.js +8 -3
- package/lib/binding/binding.js +5 -5
- package/lib/binding/class.js +4 -4
- package/lib/binding/style.js +2 -2
- package/lib/core/core.js +73 -17
- package/lib/core/destroyable.js +2 -2
- package/lib/core/ivalue.js +4 -4
- package/lib/functional/components.js +17 -0
- package/lib/functional/merge.js +41 -0
- package/lib/functional/models.js +26 -0
- package/lib/functional/options.js +1 -0
- package/lib/functional/reactivity.js +33 -0
- package/lib/functional/stack.js +127 -0
- package/lib/index.js +2 -7
- package/lib/models/array-model.js +9 -0
- package/lib/models/object-model.js +28 -14
- package/lib/node/app.js +21 -12
- package/lib/node/node.js +229 -573
- package/lib/node/watch.js +6 -14
- package/lib/spec/html.js +1 -0
- package/lib/spec/react.js +1 -0
- package/lib/spec/svg.js +1 -0
- package/lib/v/index.js +23 -0
- package/lib/value/expression.js +21 -18
- package/lib/value/mirror.js +15 -15
- package/lib/value/pointer.js +5 -5
- package/lib/value/reference.js +18 -18
- package/lib/views/array-view.js +6 -10
- package/lib/views/base-view.js +12 -23
- package/lib/views/map-view.js +4 -9
- package/lib/views/object-view.js +4 -7
- package/lib/views/repeat-node.js +10 -22
- package/lib/views/set-view.js +4 -11
- package/package.json +3 -1
- package/types/binding/attribute.d.ts +2 -2
- package/types/binding/binding.d.ts +1 -1
- package/types/core/core.d.ts +31 -43
- package/types/core/destroyable.d.ts +2 -2
- package/types/core/ivalue.d.ts +4 -4
- package/types/functional/components.d.ts +4 -0
- package/types/functional/merge.d.ts +1 -0
- package/types/functional/models.d.ts +10 -0
- package/types/functional/options.d.ts +23 -0
- package/types/functional/reactivity.d.ts +11 -0
- package/types/functional/stack.d.ts +24 -0
- package/types/index.d.ts +3 -7
- package/types/models/array-model.d.ts +1 -0
- package/types/models/object-model.d.ts +2 -0
- package/types/node/app.d.ts +19 -17
- package/types/node/node.d.ts +67 -388
- package/types/node/watch.d.ts +9 -15
- package/types/spec/html.d.ts +975 -0
- package/types/spec/react.d.ts +4 -0
- package/types/spec/svg.d.ts +314 -0
- package/types/v/index.d.ts +36 -0
- package/types/value/expression.d.ts +11 -24
- package/types/value/mirror.d.ts +6 -6
- package/types/value/pointer.d.ts +1 -1
- package/types/value/reference.d.ts +7 -7
- package/types/views/array-view.d.ts +3 -4
- package/types/views/base-view.d.ts +8 -16
- package/types/views/map-view.d.ts +2 -3
- package/types/views/object-view.d.ts +2 -3
- package/types/views/repeat-node.d.ts +8 -9
- package/types/views/set-view.d.ts +2 -3
- package/types/core/executor.d.ts +0 -87
- package/types/core/signal.d.ts +0 -35
- package/types/core/slot.d.ts +0 -45
- package/types/node/interceptor.d.ts +0 -50
- package/types/views/repeater.d.ts +0 -38
package/lib/node/app.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { instantExecutor, timeoutExecutor } from "../core/executor";
|
|
2
1
|
import { INode } from "./node";
|
|
3
2
|
/**
|
|
4
3
|
* Application Node
|
|
@@ -7,12 +6,12 @@ import { INode } from "./node";
|
|
|
7
6
|
*/
|
|
8
7
|
export class AppNode extends INode {
|
|
9
8
|
/**
|
|
10
|
-
* @param
|
|
9
|
+
* @param input
|
|
11
10
|
*/
|
|
12
|
-
constructor(
|
|
13
|
-
super();
|
|
14
|
-
this.
|
|
15
|
-
this
|
|
11
|
+
constructor(input) {
|
|
12
|
+
super(input);
|
|
13
|
+
this.debugUi = input.debugUi || false;
|
|
14
|
+
this.$seal();
|
|
16
15
|
}
|
|
17
16
|
}
|
|
18
17
|
/**
|
|
@@ -24,16 +23,26 @@ export class App extends AppNode {
|
|
|
24
23
|
/**
|
|
25
24
|
* Constructs an app node
|
|
26
25
|
* @param node {Element} The root of application
|
|
27
|
-
* @param
|
|
26
|
+
* @param input
|
|
28
27
|
*/
|
|
29
|
-
constructor(node,
|
|
30
|
-
super(
|
|
28
|
+
constructor(node, input) {
|
|
29
|
+
super(input);
|
|
31
30
|
this.$.node = node;
|
|
32
31
|
this.preinit(this, this);
|
|
33
|
-
this.
|
|
32
|
+
this.init();
|
|
33
|
+
this.$seal();
|
|
34
34
|
}
|
|
35
35
|
appendNode(node) {
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
this.$.node.appendChild(node);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export class Portal extends AppNode {
|
|
40
|
+
constructor(input) {
|
|
41
|
+
super(input);
|
|
42
|
+
this.$.node = input.node;
|
|
43
|
+
this.$seal();
|
|
44
|
+
}
|
|
45
|
+
appendNode(node) {
|
|
46
|
+
this.$.node.appendChild(node);
|
|
38
47
|
}
|
|
39
48
|
}
|