vasille 2.3.2 → 2.3.4
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/cdn/es2015.js +1077 -1072
- package/cdn/es5.js +1726 -1719
- package/flow-typed/vasille.js +2170 -2168
- package/lib/core/core.js +2 -2
- package/lib/index.js +2 -2
- package/lib/node/node.js +4 -1
- package/lib-node/core/core.js +3 -1
- package/lib-node/index.js +3 -1
- package/lib-node/node/node.js +4 -1
- package/package.json +4 -1
- package/types/core/core.d.ts +2 -0
- package/types/index.d.ts +2 -2
package/lib/core/core.js
CHANGED
|
@@ -6,11 +6,11 @@ import { Pointer } from "../value/pointer";
|
|
|
6
6
|
import { Mirror } from "../value/mirror";
|
|
7
7
|
export let current = null;
|
|
8
8
|
const currentStack = [];
|
|
9
|
-
function stack(node) {
|
|
9
|
+
export function stack(node) {
|
|
10
10
|
currentStack.push(current);
|
|
11
11
|
current = node;
|
|
12
12
|
}
|
|
13
|
-
function unstack() {
|
|
13
|
+
export function unstack() {
|
|
14
14
|
current = currentStack.pop();
|
|
15
15
|
}
|
|
16
16
|
/**
|
package/lib/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Destroyable } from "./core/destroyable";
|
|
2
|
-
import { current, Reactive } from "./core/core";
|
|
2
|
+
import { current, Reactive, stack, unstack } from "./core/core";
|
|
3
3
|
import { IValue } from "./core/ivalue";
|
|
4
4
|
import { ArrayModel } from "./models/array-model";
|
|
5
5
|
import { Listener } from "./models/listener";
|
|
@@ -20,4 +20,4 @@ import { SetView } from "./views/set-view";
|
|
|
20
20
|
import { Binding } from "./binding/binding";
|
|
21
21
|
import { userError } from "./core/errors";
|
|
22
22
|
import { Watch } from "./node/watch";
|
|
23
|
-
export { Destroyable, IValue, Reference, Mirror, Pointer, ArrayModel, MapModel, ObjectModel, SetModel, BaseView, Listener, ArrayView, MapView, ObjectView, SetView, Fragment, INode, Tag, Component, Extension, AppNode, App, Portal, Expression, Binding, Reactive, Watch, userError, current, };
|
|
23
|
+
export { Destroyable, IValue, Reference, Mirror, Pointer, ArrayModel, MapModel, ObjectModel, SetModel, BaseView, Listener, ArrayView, MapView, ObjectView, SetView, Fragment, INode, Tag, Component, Extension, AppNode, App, Portal, Expression, Binding, Reactive, Watch, stack, unstack, userError, current, };
|
package/lib/node/node.js
CHANGED
|
@@ -161,7 +161,9 @@ export class Fragment extends Reactive {
|
|
|
161
161
|
* @param input
|
|
162
162
|
* @param cb {function(Tag, *)} callback
|
|
163
163
|
*/
|
|
164
|
-
tag(tagName, input, cb
|
|
164
|
+
tag(tagName, input, cb
|
|
165
|
+
// @ts-ignore
|
|
166
|
+
) {
|
|
165
167
|
const $ = this.$;
|
|
166
168
|
const node = new Tag(input);
|
|
167
169
|
input.slot = cb || input.slot;
|
|
@@ -169,6 +171,7 @@ export class Fragment extends Reactive {
|
|
|
169
171
|
node.init();
|
|
170
172
|
this.pushNode(node);
|
|
171
173
|
node.ready();
|
|
174
|
+
// @ts-ignore
|
|
172
175
|
return node.node;
|
|
173
176
|
}
|
|
174
177
|
/**
|
package/lib-node/core/core.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Reactive = exports.ReactivePrivate = exports.current = void 0;
|
|
3
|
+
exports.Reactive = exports.ReactivePrivate = exports.unstack = exports.stack = exports.current = void 0;
|
|
4
4
|
const destroyable_js_1 = require("./destroyable.js");
|
|
5
5
|
const errors_1 = require("./errors");
|
|
6
6
|
const expression_1 = require("../value/expression");
|
|
@@ -13,9 +13,11 @@ function stack(node) {
|
|
|
13
13
|
currentStack.push(exports.current);
|
|
14
14
|
exports.current = node;
|
|
15
15
|
}
|
|
16
|
+
exports.stack = stack;
|
|
16
17
|
function unstack() {
|
|
17
18
|
exports.current = currentStack.pop();
|
|
18
19
|
}
|
|
20
|
+
exports.unstack = unstack;
|
|
19
21
|
/**
|
|
20
22
|
* Private stuff of a reactive object
|
|
21
23
|
* @class ReactivePrivate
|
package/lib-node/index.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.current = exports.userError = exports.Watch = exports.Reactive = exports.Binding = exports.Expression = exports.Portal = exports.App = exports.AppNode = exports.Extension = exports.Component = exports.Tag = exports.INode = exports.Fragment = exports.SetView = exports.ObjectView = exports.MapView = exports.ArrayView = exports.Listener = exports.BaseView = exports.SetModel = exports.ObjectModel = exports.MapModel = exports.ArrayModel = exports.Pointer = exports.Mirror = exports.Reference = exports.IValue = exports.Destroyable = void 0;
|
|
3
|
+
exports.current = exports.userError = exports.unstack = exports.stack = exports.Watch = exports.Reactive = exports.Binding = exports.Expression = exports.Portal = exports.App = exports.AppNode = exports.Extension = exports.Component = exports.Tag = exports.INode = exports.Fragment = exports.SetView = exports.ObjectView = exports.MapView = exports.ArrayView = exports.Listener = exports.BaseView = exports.SetModel = exports.ObjectModel = exports.MapModel = exports.ArrayModel = exports.Pointer = exports.Mirror = exports.Reference = exports.IValue = exports.Destroyable = void 0;
|
|
4
4
|
const destroyable_1 = require("./core/destroyable");
|
|
5
5
|
Object.defineProperty(exports, "Destroyable", { enumerable: true, get: function () { return destroyable_1.Destroyable; } });
|
|
6
6
|
const core_1 = require("./core/core");
|
|
7
7
|
Object.defineProperty(exports, "current", { enumerable: true, get: function () { return core_1.current; } });
|
|
8
8
|
Object.defineProperty(exports, "Reactive", { enumerable: true, get: function () { return core_1.Reactive; } });
|
|
9
|
+
Object.defineProperty(exports, "stack", { enumerable: true, get: function () { return core_1.stack; } });
|
|
10
|
+
Object.defineProperty(exports, "unstack", { enumerable: true, get: function () { return core_1.unstack; } });
|
|
9
11
|
const ivalue_1 = require("./core/ivalue");
|
|
10
12
|
Object.defineProperty(exports, "IValue", { enumerable: true, get: function () { return ivalue_1.IValue; } });
|
|
11
13
|
const array_model_1 = require("./models/array-model");
|
package/lib-node/node/node.js
CHANGED
|
@@ -165,7 +165,9 @@ class Fragment extends core_1.Reactive {
|
|
|
165
165
|
* @param input
|
|
166
166
|
* @param cb {function(Tag, *)} callback
|
|
167
167
|
*/
|
|
168
|
-
tag(tagName, input, cb
|
|
168
|
+
tag(tagName, input, cb
|
|
169
|
+
// @ts-ignore
|
|
170
|
+
) {
|
|
169
171
|
const $ = this.$;
|
|
170
172
|
const node = new Tag(input);
|
|
171
173
|
input.slot = cb || input.slot;
|
|
@@ -173,6 +175,7 @@ class Fragment extends core_1.Reactive {
|
|
|
173
175
|
node.init();
|
|
174
176
|
this.pushNode(node);
|
|
175
177
|
node.ready();
|
|
178
|
+
// @ts-ignore
|
|
176
179
|
return node.node;
|
|
177
180
|
}
|
|
178
181
|
/**
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Vasille - Safe. Fast. Powerful.",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "types/index.d.ts",
|
|
6
|
-
"version": "2.3.
|
|
6
|
+
"version": "2.3.4",
|
|
7
7
|
"exports": {
|
|
8
8
|
"import": "./lib/index.js",
|
|
9
9
|
"browser": "./lib/index.js",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"unpkg": "./cdn/es2015.js",
|
|
14
14
|
"scripts": {
|
|
15
|
+
"prettier": "npx prettier src test --check",
|
|
15
16
|
"build": "tsc --build tsconfig-build.json",
|
|
16
17
|
"build-es5": "tsc --build tsconfig-build-es5.json",
|
|
17
18
|
"build-node": "tsc --build tsconfig-build-node.json",
|
|
@@ -53,7 +54,9 @@
|
|
|
53
54
|
"flow-bin": "latest",
|
|
54
55
|
"jest": "27.5.1",
|
|
55
56
|
"jsdom": "19.0.0",
|
|
57
|
+
"prettier": "2.7.1",
|
|
56
58
|
"ts-jest": "27.1.4",
|
|
59
|
+
"tslint-config-prettier": "^1.18.0",
|
|
57
60
|
"typescript": "latest"
|
|
58
61
|
}
|
|
59
62
|
}
|
package/types/core/core.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ import { Mirror } from "../value/mirror";
|
|
|
6
6
|
import { IModel } from "../models/model";
|
|
7
7
|
import { FragmentOptions } from "../functional/options";
|
|
8
8
|
export declare let current: Reactive | null;
|
|
9
|
+
export declare function stack(node: Reactive): void;
|
|
10
|
+
export declare function unstack(): void;
|
|
9
11
|
/**
|
|
10
12
|
* Private stuff of a reactive object
|
|
11
13
|
* @class ReactivePrivate
|
package/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Destroyable } from "./core/destroyable";
|
|
2
|
-
import { current, Reactive } from "./core/core";
|
|
2
|
+
import { current, Reactive, stack, unstack } from "./core/core";
|
|
3
3
|
import { IValue } from "./core/ivalue";
|
|
4
4
|
import { ArrayModel } from "./models/array-model";
|
|
5
5
|
import { Listener } from "./models/listener";
|
|
@@ -23,4 +23,4 @@ import { AcceptedTagsMap, AcceptedTagsSpec } from "./spec/react";
|
|
|
23
23
|
import { userError } from "./core/errors";
|
|
24
24
|
import { ListenableModel } from "./models/model";
|
|
25
25
|
import { Watch } from "./node/watch";
|
|
26
|
-
export { Destroyable, IValue, Reference, Mirror, Pointer, ArrayModel, MapModel, ObjectModel, SetModel, BaseView, Listener, ArrayView, MapView, ObjectView, SetView, Fragment, INode, Tag, Component, Extension, AppNode, App, Portal, Expression, Binding, Reactive, Watch, FragmentOptions, TagOptions, AppOptions, AcceptedTagsSpec, AcceptedTagsMap,
|
|
26
|
+
export { Destroyable, IValue, Reference, Mirror, Pointer, ArrayModel, MapModel, ObjectModel, SetModel, BaseView, Listener, ArrayView, MapView, ObjectView, SetView, Fragment, INode, Tag, Component, Extension, AppNode, App, Portal, Expression, Binding, Reactive, Watch, FragmentOptions, TagOptions, AppOptions, AcceptedTagsSpec, AcceptedTagsMap, KindOfIValue, ListenableModel, TagOptionsWithSlot, stack, unstack, userError, current, };
|