vasille 2.2.2 → 2.3.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 +34 -28
- package/cdn/es2015.js +18 -724
- package/cdn/es5.js +687 -957
- package/flow-typed/vasille.js +14 -59
- package/lib/core/core.js +3 -3
- package/lib/index.js +5 -4
- package/lib/models/array-model.js +6 -9
- package/lib/models/object-model.js +3 -17
- package/lib/node/node.js +6 -3
- package/lib/views/object-view.js +1 -1
- package/lib-node/binding/attribute.js +35 -0
- package/lib-node/binding/binding.js +33 -0
- package/lib-node/binding/class.js +48 -0
- package/lib-node/binding/style.js +27 -0
- package/lib-node/core/core.js +243 -0
- package/lib-node/core/destroyable.js +49 -0
- package/lib-node/core/errors.js +23 -0
- package/lib-node/core/ivalue.js +63 -0
- package/lib-node/functional/options.js +2 -0
- package/lib-node/index.js +54 -0
- package/lib-node/models/array-model.js +218 -0
- package/lib-node/models/listener.js +134 -0
- package/lib-node/models/map-model.js +70 -0
- package/lib-node/models/model.js +2 -0
- package/lib-node/models/object-model.js +82 -0
- package/lib-node/models/set-model.js +66 -0
- package/lib-node/node/app.js +54 -0
- package/lib-node/node/node.js +885 -0
- package/lib-node/node/watch.js +23 -0
- package/lib-node/spec/html.js +2 -0
- package/lib-node/spec/react.js +2 -0
- package/lib-node/spec/svg.js +2 -0
- package/lib-node/value/expression.js +90 -0
- package/lib-node/value/mirror.js +60 -0
- package/lib-node/value/pointer.js +30 -0
- package/lib-node/value/reference.js +55 -0
- package/lib-node/views/array-view.js +21 -0
- package/lib-node/views/base-view.js +43 -0
- package/lib-node/views/map-view.js +18 -0
- package/lib-node/views/object-view.js +20 -0
- package/lib-node/views/repeat-node.js +71 -0
- package/lib-node/views/set-view.js +19 -0
- package/package.json +21 -17
- package/types/core/core.d.ts +4 -4
- package/types/functional/options.d.ts +2 -2
- package/types/index.d.ts +10 -7
- package/types/models/array-model.d.ts +1 -1
- package/types/models/object-model.d.ts +1 -1
- package/types/node/node.d.ts +5 -4
- package/types/node/watch.d.ts +2 -2
- package/types/views/repeat-node.d.ts +2 -2
- package/lib/core/executor.js +0 -154
- package/lib/core/signal.js +0 -50
- package/lib/core/slot.js +0 -47
- package/lib/functional/components.js +0 -17
- package/lib/functional/merge.js +0 -41
- package/lib/functional/models.js +0 -26
- package/lib/functional/reactivity.js +0 -33
- package/lib/functional/stack.js +0 -127
- package/lib/node/interceptor.js +0 -83
- package/lib/v/index.js +0 -23
- package/lib/views/repeater.js +0 -63
- package/types/functional/components.d.ts +0 -4
- package/types/functional/merge.d.ts +0 -1
- package/types/functional/models.d.ts +0 -10
- package/types/functional/reactivity.d.ts +0 -11
- package/types/functional/stack.d.ts +0 -24
- package/types/v/index.d.ts +0 -36
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Vasille
|
|
1
|
+
# Vasille Core Library
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
## Table of content
|
|
11
11
|
|
|
12
12
|
* [Installation](#installation)
|
|
13
|
+
* [How to use Vasille](#how-to-use-vasille)
|
|
13
14
|
* [How SAFE is Vasille](#how-safe-is-vasille)
|
|
14
15
|
* [How FAST is Vasille](#how-fast-is-vasille)
|
|
15
16
|
* [How POWERFUL is Vasille](#how-powerful-is-vasille)
|
|
16
|
-
* [How to use Vasille](#how-to-use-vasille)
|
|
17
17
|
* [Best Practices](#best-practices)
|
|
18
18
|
|
|
19
19
|
|
|
@@ -23,31 +23,28 @@
|
|
|
23
23
|
|
|
24
24
|
```
|
|
25
25
|
npm install vasille --save
|
|
26
|
+
npm install vasille-less --save
|
|
27
|
+
npm install vasille-magic --save
|
|
26
28
|
```
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
## How to use Vasille
|
|
29
31
|
|
|
30
|
-
|
|
32
|
+
There are several modes to use Vasille.
|
|
31
33
|
|
|
32
|
-
###
|
|
34
|
+
### Documentation for beginners (how to create the first project step by step):
|
|
35
|
+
* [`Vasille Core Library` - the hard way - `low-level`](https://gitlab.com/vasille-js/vasille-js/-/blob/v2/pages/GetStarted.md)
|
|
36
|
+
* [`Vasille Less Library` - perfect for me - `high-level`](https://gitlab.com/vasille-js/vasille-less/-/blob/v2/pages/GetStarted.md)
|
|
37
|
+
* [`Vasille Magic` - perfect for you - `highest-level`](https://gitlab.com/vasille-js/vcc/-/blob/master/pages/GetStarted.md)
|
|
33
38
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<script src="https://unpkg.com/vasille/cdn/es5.js"></script>
|
|
39
|
-
```
|
|
39
|
+
### Full documentation:
|
|
40
|
+
* [`Vasille Core Library API`- write anything - `low-level`](https://gitlab.com/vasille-js/vasille-js/-/blob/v2/pages/Vasille-Core-Library-API.md)
|
|
41
|
+
* [`Vasille Less Library API`- write less do more - `high-level`](https://gitlab.com/vasille-js/vasille-less/-/blob/v2/pages/Vasille-Less-Library-API.md)
|
|
42
|
+
* [`Vasille Magic API`- compiler writes for you - `highest-level`](https://gitlab.com/vasille-js/vasille-js/-/blob/v2/pages/API.md)
|
|
40
43
|
|
|
41
44
|
### Getting ready be example
|
|
42
|
-
* [JavaScript Example](https://gitlab.com/vasille-js/learning/vasille-js-example)
|
|
43
45
|
* [TypeScript Example](https://gitlab.com/vasille-js/learning/vasille-ts-example)
|
|
44
|
-
* [
|
|
45
|
-
|
|
46
|
-
### Flow.js typedef
|
|
47
|
-
Add the next line to `[libs]` section in your `.flowconfig` file
|
|
48
|
-
```
|
|
49
|
-
node_modules/vasille/flow-typed
|
|
50
|
-
```
|
|
46
|
+
* [JavaScript Example (Vasille Magic not supported)](https://gitlab.com/vasille-js/learning/vasille-js-example)
|
|
47
|
+
* [Flow.js Example (Vasille Magic not supported)](https://gitlab.com/vasille-js/learning/vasille-flow-js-example)
|
|
51
48
|
|
|
52
49
|
<hr>
|
|
53
50
|
|
|
@@ -168,23 +165,32 @@ which will be reflected into a browser DOM and keep up to date it.
|
|
|
168
165
|
* `DebugNode` reflects a `Comment` node, useful for debug.
|
|
169
166
|
* `Watch` recompose children nodes on model value change.
|
|
170
167
|
* `RepeatNode` creates multiples children nodes using the same code multiple time.
|
|
171
|
-
* `Repeater` repeat slot content `n` times.
|
|
172
168
|
* `BaseView` represent a view in context of MVC (Model-View-Controller).
|
|
173
169
|
* `ObjectView` repeats slot content for each value of `ObjectModel`.
|
|
174
170
|
* `MapView` repeats slot content for each `MapModel` value.
|
|
175
171
|
* `SetView` repeats slot content for each `SetModel` value.
|
|
176
172
|
* `ArrayView` repeats slot content for each `ArrayModel` value respecting its order.
|
|
177
|
-
* `InterceptorNode` is used to send an event/signal from one child to other
|
|
178
|
-
without manually creating of interceptors.
|
|
179
173
|
|
|
180
|
-
|
|
174
|
+
<hr>
|
|
175
|
+
|
|
176
|
+
### CDN
|
|
181
177
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
178
|
+
```html
|
|
179
|
+
ES2015 version
|
|
180
|
+
<script src="https://unpkg.com/vasille"></script>
|
|
181
|
+
ES5 Compatible version
|
|
182
|
+
<script src="https://unpkg.com/vasille/cdn/es5.js"></script>
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Flow.js typedef
|
|
186
|
+
Add the next lines to `[libs]` section in your `.flowconfig` file
|
|
187
|
+
```
|
|
188
|
+
node_modules/vasille/flow-typed
|
|
189
|
+
node_modules/vasille-less/flow-typed
|
|
190
|
+
node_modules/vasille-magic/flow-typed
|
|
191
|
+
```
|
|
186
192
|
|
|
187
|
-
## Best Practices
|
|
193
|
+
## Best Practices applicable to Vasille Core Library
|
|
188
194
|
|
|
189
195
|
* [Reactive Object Practice](https://gitlab.com/vasille-js/vasille-practices/-/blob/main/practices/reactive-object.ts)
|
|
190
196
|
* [Application](https://gitlab.com/vasille-js/vasille-practices/-/blob/main/practices/application.ts)
|