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.
Files changed (74) hide show
  1. package/README.md +4 -0
  2. package/cdn/es2015.js +827 -827
  3. package/cdn/es5.js +909 -829
  4. package/flow-typed/vasille.js +2647 -835
  5. package/lib/binding/attribute.js +8 -3
  6. package/lib/binding/binding.js +5 -5
  7. package/lib/binding/class.js +4 -4
  8. package/lib/binding/style.js +2 -2
  9. package/lib/core/core.js +73 -17
  10. package/lib/core/destroyable.js +2 -2
  11. package/lib/core/ivalue.js +4 -4
  12. package/lib/functional/components.js +17 -0
  13. package/lib/functional/merge.js +41 -0
  14. package/lib/functional/models.js +26 -0
  15. package/lib/functional/options.js +1 -0
  16. package/lib/functional/reactivity.js +33 -0
  17. package/lib/functional/stack.js +127 -0
  18. package/lib/index.js +2 -7
  19. package/lib/models/array-model.js +9 -0
  20. package/lib/models/object-model.js +28 -14
  21. package/lib/node/app.js +21 -12
  22. package/lib/node/node.js +229 -573
  23. package/lib/node/watch.js +6 -14
  24. package/lib/spec/html.js +1 -0
  25. package/lib/spec/react.js +1 -0
  26. package/lib/spec/svg.js +1 -0
  27. package/lib/v/index.js +23 -0
  28. package/lib/value/expression.js +21 -18
  29. package/lib/value/mirror.js +15 -15
  30. package/lib/value/pointer.js +5 -5
  31. package/lib/value/reference.js +18 -18
  32. package/lib/views/array-view.js +6 -10
  33. package/lib/views/base-view.js +12 -23
  34. package/lib/views/map-view.js +4 -9
  35. package/lib/views/object-view.js +4 -7
  36. package/lib/views/repeat-node.js +10 -22
  37. package/lib/views/set-view.js +4 -11
  38. package/package.json +3 -1
  39. package/types/binding/attribute.d.ts +2 -2
  40. package/types/binding/binding.d.ts +1 -1
  41. package/types/core/core.d.ts +31 -43
  42. package/types/core/destroyable.d.ts +2 -2
  43. package/types/core/ivalue.d.ts +4 -4
  44. package/types/functional/components.d.ts +4 -0
  45. package/types/functional/merge.d.ts +1 -0
  46. package/types/functional/models.d.ts +10 -0
  47. package/types/functional/options.d.ts +23 -0
  48. package/types/functional/reactivity.d.ts +11 -0
  49. package/types/functional/stack.d.ts +24 -0
  50. package/types/index.d.ts +3 -7
  51. package/types/models/array-model.d.ts +1 -0
  52. package/types/models/object-model.d.ts +2 -0
  53. package/types/node/app.d.ts +19 -17
  54. package/types/node/node.d.ts +67 -388
  55. package/types/node/watch.d.ts +9 -15
  56. package/types/spec/html.d.ts +975 -0
  57. package/types/spec/react.d.ts +4 -0
  58. package/types/spec/svg.d.ts +314 -0
  59. package/types/v/index.d.ts +36 -0
  60. package/types/value/expression.d.ts +11 -24
  61. package/types/value/mirror.d.ts +6 -6
  62. package/types/value/pointer.d.ts +1 -1
  63. package/types/value/reference.d.ts +7 -7
  64. package/types/views/array-view.d.ts +3 -4
  65. package/types/views/base-view.d.ts +8 -16
  66. package/types/views/map-view.d.ts +2 -3
  67. package/types/views/object-view.d.ts +2 -3
  68. package/types/views/repeat-node.d.ts +8 -9
  69. package/types/views/set-view.d.ts +2 -3
  70. package/types/core/executor.d.ts +0 -87
  71. package/types/core/signal.d.ts +0 -35
  72. package/types/core/slot.d.ts +0 -45
  73. package/types/node/interceptor.d.ts +0 -50
  74. 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 options {Object} Application options
9
+ * @param input
11
10
  */
12
- constructor(options) {
13
- super();
14
- this.run = (options === null || options === void 0 ? void 0 : options.executor) || ((options === null || options === void 0 ? void 0 : options.freezeUi) === false ? timeoutExecutor : instantExecutor);
15
- this.debugUi = (options === null || options === void 0 ? void 0 : options.debugUi) || false;
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 options {Object} Application options
26
+ * @param input
28
27
  */
29
- constructor(node, options) {
30
- super(options);
28
+ constructor(node, input) {
29
+ super(input);
31
30
  this.$.node = node;
32
31
  this.preinit(this, this);
33
- this.seal();
32
+ this.init();
33
+ this.$seal();
34
34
  }
35
35
  appendNode(node) {
36
- const $ = this.$;
37
- this.run.appendChild($.node, node);
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
  }