vasille 2.0.3 → 2.2.0

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 (79) hide show
  1. package/README.md +7 -3
  2. package/cdn/es2015.js +939 -1009
  3. package/cdn/es5.js +1048 -1029
  4. package/flow-typed/vasille.js +2641 -832
  5. package/lib/binding/attribute.js +11 -12
  6. package/lib/binding/binding.js +9 -19
  7. package/lib/binding/class.js +34 -42
  8. package/lib/binding/style.js +5 -11
  9. package/lib/core/core.js +78 -32
  10. package/lib/core/destroyable.js +2 -2
  11. package/lib/core/ivalue.js +15 -13
  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 +23 -14
  22. package/lib/node/interceptor.js +3 -3
  23. package/lib/node/node.js +338 -684
  24. package/lib/node/watch.js +9 -17
  25. package/lib/spec/html.js +1 -0
  26. package/lib/spec/react.js +1 -0
  27. package/lib/spec/svg.js +1 -0
  28. package/lib/v/index.js +23 -0
  29. package/lib/value/expression.js +11 -8
  30. package/lib/value/mirror.js +6 -8
  31. package/lib/value/reference.js +3 -7
  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 +5 -8
  36. package/lib/views/repeat-node.js +20 -60
  37. package/lib/views/repeater.js +7 -7
  38. package/lib/views/set-view.js +4 -11
  39. package/package.json +7 -6
  40. package/types/binding/attribute.d.ts +2 -8
  41. package/types/binding/binding.d.ts +4 -13
  42. package/types/binding/class.d.ts +7 -19
  43. package/types/binding/style.d.ts +0 -6
  44. package/types/core/core.d.ts +40 -54
  45. package/types/core/destroyable.d.ts +2 -2
  46. package/types/core/ivalue.d.ts +13 -11
  47. package/types/functional/components.d.ts +4 -0
  48. package/types/functional/merge.d.ts +1 -0
  49. package/types/functional/models.d.ts +10 -0
  50. package/types/functional/options.d.ts +23 -0
  51. package/types/functional/reactivity.d.ts +11 -0
  52. package/types/functional/stack.d.ts +24 -0
  53. package/types/index.d.ts +3 -7
  54. package/types/models/array-model.d.ts +3 -2
  55. package/types/models/map-model.d.ts +2 -2
  56. package/types/models/model.d.ts +3 -1
  57. package/types/models/object-model.d.ts +4 -2
  58. package/types/models/set-model.d.ts +2 -2
  59. package/types/node/app.d.ts +21 -19
  60. package/types/node/node.d.ts +97 -422
  61. package/types/node/watch.d.ts +9 -15
  62. package/types/spec/html.d.ts +975 -0
  63. package/types/spec/react.d.ts +4 -0
  64. package/types/spec/svg.d.ts +314 -0
  65. package/types/v/index.d.ts +32 -0
  66. package/types/value/expression.d.ts +7 -20
  67. package/types/value/mirror.d.ts +3 -3
  68. package/types/value/reference.d.ts +5 -5
  69. package/types/views/array-view.d.ts +3 -4
  70. package/types/views/base-view.d.ts +9 -17
  71. package/types/views/map-view.d.ts +2 -3
  72. package/types/views/object-view.d.ts +2 -3
  73. package/types/views/repeat-node.d.ts +8 -9
  74. package/types/views/set-view.d.ts +2 -3
  75. package/types/core/executor.d.ts +0 -87
  76. package/types/core/signal.d.ts +0 -35
  77. package/types/core/slot.d.ts +0 -45
  78. package/types/node/interceptor.d.ts +0 -50
  79. package/types/views/repeater.d.ts +0 -38
@@ -1,35 +0,0 @@
1
- /**
2
- * Signal is an event generator
3
- * @class Signal
4
- */
5
- export declare class Signal<T1 = void, T2 = void, T3 = void, T4 = void, T5 = void, T6 = void, T7 = void, T8 = void, T9 = void> {
6
- /**
7
- * Handler of event
8
- * @type {Set}
9
- * @private
10
- */
11
- private handlers;
12
- /**
13
- * Emit event
14
- * @param a1 {*} argument
15
- * @param a2 {*} argument
16
- * @param a3 {*} argument
17
- * @param a4 {*} argument
18
- * @param a5 {*} argument
19
- * @param a6 {*} argument
20
- * @param a7 {*} argument
21
- * @param a8 {*} argument
22
- * @param a9 {*} argument
23
- */
24
- emit(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5, a6: T6, a7: T7, a8: T8, a9: T9): void;
25
- /**
26
- * Subscribe to event
27
- * @param func {function} handler
28
- */
29
- subscribe(func: (a1: T1, a2: T2, a3: T3, a4: T4, a5: T5, a6: T6, a7: T7, a8: T8, a9: T9) => void): void;
30
- /**
31
- * Unsubscribe from event
32
- * @param func {function} handler
33
- */
34
- unsubscribe(func: (a1: T1, a2: T2, a3: T3, a4: T4, a5: T5, a6: T6, a7: T7, a8: T8, a9: T9) => void): void;
35
- }
@@ -1,45 +0,0 @@
1
- import { Fragment } from "../node/node";
2
- /**
3
- * Component slot
4
- * @class Slot
5
- */
6
- export declare class Slot<t extends Fragment = Fragment, t1 = void, t2 = void, t3 = void, t4 = void, t5 = void, t6 = void, t7 = void, t8 = void, t9 = void> {
7
- /**
8
- * Function to run
9
- * @type {function(node : Fragment)}
10
- */
11
- private runner?;
12
- /**
13
- * Sets the runner
14
- * @param func {function} the function to run
15
- */
16
- insert(func: (a0: t, a1: t1, a2: t2, a3: t3, a4: t4, a5: t5, a6: t6, a7: t7, a8: t8, a9: t9) => void): void;
17
- /**
18
- * @param a0 {Fragment} node to paste content
19
- * @param a1 {*} 1st argument
20
- * @param a2 {*} 2nd argument
21
- * @param a3 {*} 3rd argument
22
- * @param a4 {*} 4th argument
23
- * @param a5 {*} 5th argument
24
- * @param a6 {*} 6th argument
25
- * @param a7 {*} 7th argument
26
- * @param a8 {*} 8th argument
27
- * @param a9 {*} 9th argument
28
- */
29
- release(a0: t, a1: t1, a2: t2, a3: t3, a4: t4, a5: t5, a6: t6, a7: t7, a8: t8, a9: t9): void;
30
- /**
31
- * Predefine a handler for a slot
32
- * @param func {function(node : Fragment)} Function to run if no handler specified
33
- * @param a0 {Fragment} node to paste content
34
- * @param a1 {*} 1st argument
35
- * @param a2 {*} 2nd argument
36
- * @param a3 {*} 3rd argument
37
- * @param a4 {*} 4th argument
38
- * @param a5 {*} 5th argument
39
- * @param a6 {*} 6th argument
40
- * @param a7 {*} 7th argument
41
- * @param a8 {*} 8th argument
42
- * @param a9 {*} 9th argument
43
- */
44
- predefine(func: (a0: t, a1: t1, a2: t2, a3: t3, a4: t4, a5: t5, a6: t6, a7: t7, a8: t8, a9: t9) => void, a0: t, a1: t1, a2: t2, a3: t3, a4: t4, a5: t5, a6: t6, a7: t7, a8: t8, a9: t9): void;
45
- }
@@ -1,50 +0,0 @@
1
- import { Fragment } from "./node";
2
- import { Destroyable } from "../core/destroyable";
3
- import { Signal } from "../core/signal";
4
- import { Slot } from "../core/slot";
5
- /**
6
- * Interceptor is designed to connect signals & methods of children elements
7
- * @class Interceptor
8
- * @extends Destroyable
9
- */
10
- export declare class Interceptor<t1 = void, t2 = void, t3 = void, t4 = void, t5 = void, t6 = void, t7 = void, t8 = void, t9 = void> extends Destroyable {
11
- /**
12
- * Set of signals
13
- * @type Set
14
- */
15
- signals: Set<Signal<t1, t2, t3, t4, t5, t6, t7, t8, t9>>;
16
- /**
17
- * Set of handlers
18
- * @type Set
19
- */
20
- handlers: Set<(a1: t1, a2: t2, a3: t3, a4: t4, a5: t5, a6: t6, a7: t7, a8: t8, a9: t9) => void>;
21
- /**
22
- * Connect a signal or a handler
23
- * @param thing {Signal | function}
24
- */
25
- connect(thing: Signal<t1, t2, t3, t4, t5, t6, t7, t8, t9> | ((a1: t1, a2: t2, a3: t3, a4: t4, a5: t5, a6: t6, a7: t7, a8: t8, a9: t9) => void)): void;
26
- /**
27
- * Disconnect a handler from signals
28
- * @param handler {function}
29
- */
30
- disconnect(handler: (a1: t1, a2: t2, a3: t3, a4: t4, a5: t5, a6: t6, a7: t7, a8: t8, a9: t9) => void): void;
31
- $destroy(): void;
32
- }
33
- /**
34
- * Interceptor node to implement directly to vasille DOM
35
- * @class InterceptorNode
36
- * @extends Extension
37
- */
38
- export declare class InterceptorNode<t1 = void, t2 = void, t3 = void, t4 = void, t5 = void, t6 = void, t7 = void, t8 = void, t9 = void> extends Fragment {
39
- /**
40
- * Internal interceptor
41
- * @type Interceptor
42
- */
43
- interceptor: Interceptor<t1, t2, t3, t4, t5, t6, t7, t8, t9>;
44
- /**
45
- * The default slot of node
46
- * @type Slot
47
- */
48
- slot: Slot<Fragment, Interceptor<t1, t2, t3, t4, t5, t6, t7, t8, t9>>;
49
- $compose(): void;
50
- }
@@ -1,38 +0,0 @@
1
- import { RepeatNode, RepeatNodePrivate } from "./repeat-node";
2
- import { IValue } from "../core/ivalue";
3
- /**
4
- * Private part of repeater
5
- * @class RepeaterPrivate
6
- * @extends RepeatNodePrivate
7
- */
8
- export declare class RepeaterPrivate<IdT> extends RepeatNodePrivate<IdT> {
9
- /**
10
- * Handler to catch count updates
11
- */
12
- updateHandler: (value: number) => void;
13
- /**
14
- * Current count of child nodes
15
- */
16
- currentCount: number;
17
- constructor();
18
- }
19
- /**
20
- * The simplest repeat node interpretation, repeat children pack a several times
21
- * @class Repeater
22
- * @extends RepeatNode
23
- */
24
- export declare class Repeater extends RepeatNode<number, number> {
25
- protected $: RepeaterPrivate<number>;
26
- /**
27
- * The count of children
28
- */
29
- count: IValue<number>;
30
- constructor($?: RepeaterPrivate<number>);
31
- /**
32
- * Changes the children count
33
- */
34
- changeCount(number: number): void;
35
- $created(): void;
36
- $ready(): void;
37
- $destroy(): void;
38
- }