vasille 2.3.5 → 2.3.8
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 +2480 -0
- package/flow-typed/vasille.js +13 -11
- package/lib/core/core.js +1 -4
- package/lib/node/node.js +6 -3
- package/lib/node/watch.js +1 -0
- package/lib/tsconfig-build.tsbuildinfo +1 -0
- package/lib/views/array-view.js +1 -0
- package/lib/views/base-view.js +1 -0
- package/lib/views/map-view.js +1 -0
- package/lib/views/object-view.js +1 -0
- package/lib/views/set-view.js +1 -0
- package/lib-node/core/core.js +4 -7
- package/lib-node/core/errors.js +4 -5
- package/lib-node/node/node.js +6 -3
- package/lib-node/node/watch.js +1 -0
- package/lib-node/tsconfig-build-node.tsbuildinfo +1 -0
- package/lib-node/views/array-view.js +1 -0
- package/lib-node/views/base-view.js +1 -0
- package/lib-node/views/map-view.js +1 -0
- package/lib-node/views/object-view.js +1 -0
- package/lib-node/views/set-view.js +1 -0
- package/package.json +20 -26
- package/types/core/core.d.ts +1 -1
- package/types/functional/options.d.ts +3 -1
- package/types/node/node.d.ts +3 -3
- package/types/node/watch.d.ts +1 -1
- package/types/tsconfig-types.tsbuildinfo +1 -0
- package/types/views/array-view.d.ts +1 -1
- package/types/views/base-view.d.ts +1 -1
- package/types/views/map-view.d.ts +1 -1
- package/types/views/object-view.d.ts +1 -1
- package/types/views/set-view.d.ts +1 -1
- package/LICENSE.md +0 -21
- package/README.md +0 -215
package/flow-typed/vasille.js
CHANGED
|
@@ -193,7 +193,7 @@ declare class Reactive<T> extends Destroyable {
|
|
|
193
193
|
applyOptions(input: T): void;
|
|
194
194
|
applyOptionsNow(): void;
|
|
195
195
|
compose(input: T): T['return'];
|
|
196
|
-
composeNow():
|
|
196
|
+
composeNow(): T['return'];
|
|
197
197
|
runFunctional<F>(f: F, ...args: Parameters<F>): ReturnType<F>;
|
|
198
198
|
runOnDestroy(func: () => void): void;
|
|
199
199
|
$destroy(): void;
|
|
@@ -2116,7 +2116,7 @@ declare class Fragment<T> extends Reactive {
|
|
|
2116
2116
|
*/
|
|
2117
2117
|
preinit(app: AppNode, parent: Fragment, data?: any): void;
|
|
2118
2118
|
init(): T['return'];
|
|
2119
|
-
compose(input: T):
|
|
2119
|
+
compose(input: T): T['return'];
|
|
2120
2120
|
/** To be overloaded: ready event handler */
|
|
2121
2121
|
ready(): void;
|
|
2122
2122
|
/**
|
|
@@ -2337,7 +2337,7 @@ declare interface TagOptionsWithSlot<K> extends TagOptions<K> {
|
|
|
2337
2337
|
declare class Tag<K> extends INode<TagOptionsWithSlot<K>> {
|
|
2338
2338
|
constructor(input: TagOptionsWithSlot<K>): void;
|
|
2339
2339
|
preinit(app: AppNode, parent: Fragment, tagName?: string): void;
|
|
2340
|
-
compose(input: TagOptionsWithSlot<K>):
|
|
2340
|
+
compose(input: TagOptionsWithSlot<K>): TagOptionsWithSlot<K>['return'];
|
|
2341
2341
|
findFirstChild(): Node;
|
|
2342
2342
|
insertAdjacent(node: Node): void;
|
|
2343
2343
|
appendNode(node: Node): void;
|
|
@@ -2367,7 +2367,7 @@ declare class Extension<T> extends INode<T> {
|
|
|
2367
2367
|
* @extends Extension
|
|
2368
2368
|
*/
|
|
2369
2369
|
declare class Component<T> extends Extension<T> {
|
|
2370
|
-
init():
|
|
2370
|
+
init(): T['return'];
|
|
2371
2371
|
ready(): void;
|
|
2372
2372
|
preinit(app: AppNode, parent: Fragment): void;
|
|
2373
2373
|
}
|
|
@@ -2471,14 +2471,16 @@ declare interface WatchOptions<T> extends FragmentOptions {
|
|
|
2471
2471
|
*/
|
|
2472
2472
|
declare class Watch<T> extends Fragment<WatchOptions<T>> {
|
|
2473
2473
|
input: WatchOptions<T>;
|
|
2474
|
-
compose(input: WatchOptions<T>):
|
|
2474
|
+
compose(input: WatchOptions<T>): WatchOptions<T>['return'];
|
|
2475
2475
|
}
|
|
2476
2476
|
|
|
2477
2477
|
|
|
2478
2478
|
|
|
2479
2479
|
declare interface FragmentOptions {
|
|
2480
2480
|
"v:is"?: Record<string, IValue<any>>;
|
|
2481
|
-
return?:
|
|
2481
|
+
return?: {
|
|
2482
|
+
[key: string]: any;
|
|
2483
|
+
};
|
|
2482
2484
|
slot?: (node: Fragment, ...args: any[]) => void;
|
|
2483
2485
|
}
|
|
2484
2486
|
export type AttrType<T> = IValue<T | string | null> | T | string | null | undefined;
|
|
@@ -2563,7 +2565,7 @@ declare class BaseView<K, T,Model> extends RepeatNode<K, T, BSO<K, T, Model>> {
|
|
|
2563
2565
|
$: BaseViewPrivate<K, T>;
|
|
2564
2566
|
input: BSO<K, T, Model>;
|
|
2565
2567
|
constructor(input: BSO<K, T, Model>, $?: BaseViewPrivate<K, T>): void;
|
|
2566
|
-
compose(input: BSO<K, T, Model>):
|
|
2568
|
+
compose(input: BSO<K, T, Model>): {};
|
|
2567
2569
|
}
|
|
2568
2570
|
|
|
2569
2571
|
|
|
@@ -2574,7 +2576,7 @@ declare class BaseView<K, T,Model> extends RepeatNode<K, T, BSO<K, T, Model>> {
|
|
|
2574
2576
|
*/
|
|
2575
2577
|
declare class ArrayView<T> extends BaseView<T, T, ArrayModel<T>> {
|
|
2576
2578
|
createChild(input: BSO<T, T, ArrayModel<T>>, id: T, item: T, before?: Fragment): any;
|
|
2577
|
-
compose(input: BSO<T, T, ArrayModel<T>>):
|
|
2579
|
+
compose(input: BSO<T, T, ArrayModel<T>>): {};
|
|
2578
2580
|
}
|
|
2579
2581
|
|
|
2580
2582
|
|
|
@@ -2584,7 +2586,7 @@ declare class ArrayView<T> extends BaseView<T, T, ArrayModel<T>> {
|
|
|
2584
2586
|
* @extends BaseView
|
|
2585
2587
|
*/
|
|
2586
2588
|
declare class MapView<K, T> extends BaseView<K, T, MapModel<K, T>> {
|
|
2587
|
-
compose(input: BSO<K, T, MapModel<K, T>>):
|
|
2589
|
+
compose(input: BSO<K, T, MapModel<K, T>>): {};
|
|
2588
2590
|
}
|
|
2589
2591
|
|
|
2590
2592
|
|
|
@@ -2594,7 +2596,7 @@ declare class MapView<K, T> extends BaseView<K, T, MapModel<K, T>> {
|
|
|
2594
2596
|
* @extends BaseView
|
|
2595
2597
|
*/
|
|
2596
2598
|
declare class ObjectView<T> extends BaseView<string, T, ObjectModel<T>> {
|
|
2597
|
-
compose(input: BSO<string, T, ObjectModel<T>>):
|
|
2599
|
+
compose(input: BSO<string, T, ObjectModel<T>>): {};
|
|
2598
2600
|
}
|
|
2599
2601
|
|
|
2600
2602
|
|
|
@@ -2604,7 +2606,7 @@ declare class ObjectView<T> extends BaseView<string, T, ObjectModel<T>> {
|
|
|
2604
2606
|
* @extends BaseView
|
|
2605
2607
|
*/
|
|
2606
2608
|
declare class SetView<T> extends BaseView<T, T, SetModel<T>> {
|
|
2607
|
-
compose(input: BSO<T, T, SetModel<T>>):
|
|
2609
|
+
compose(input: BSO<T, T, SetModel<T>>): {};
|
|
2608
2610
|
}
|
|
2609
2611
|
|
|
2610
2612
|
|
package/lib/core/core.js
CHANGED
|
@@ -216,13 +216,10 @@ export class Reactive extends Destroyable {
|
|
|
216
216
|
throw notOverwritten();
|
|
217
217
|
}
|
|
218
218
|
composeNow() {
|
|
219
|
-
this.compose(this.input);
|
|
219
|
+
return this.compose(this.input);
|
|
220
220
|
}
|
|
221
221
|
runFunctional(f, ...args) {
|
|
222
222
|
stack(this);
|
|
223
|
-
// yet another ts bug
|
|
224
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
225
|
-
// @ts-ignore
|
|
226
223
|
const result = f(...args);
|
|
227
224
|
unstack();
|
|
228
225
|
return result;
|
package/lib/node/node.js
CHANGED
|
@@ -76,6 +76,7 @@ export class Fragment extends Reactive {
|
|
|
76
76
|
}
|
|
77
77
|
compose(input) {
|
|
78
78
|
input.slot && input.slot(this);
|
|
79
|
+
return {};
|
|
79
80
|
}
|
|
80
81
|
/** To be overloaded: ready event handler */
|
|
81
82
|
ready() {
|
|
@@ -162,7 +163,7 @@ export class Fragment extends Reactive {
|
|
|
162
163
|
* @param cb {function(Tag, *)} callback
|
|
163
164
|
*/
|
|
164
165
|
tag(tagName, input, cb
|
|
165
|
-
// @ts-
|
|
166
|
+
// @ts-expect-error
|
|
166
167
|
) {
|
|
167
168
|
const $ = this.$;
|
|
168
169
|
const node = new Tag(input);
|
|
@@ -171,7 +172,7 @@ export class Fragment extends Reactive {
|
|
|
171
172
|
node.init();
|
|
172
173
|
this.pushNode(node);
|
|
173
174
|
node.ready();
|
|
174
|
-
// @ts-
|
|
175
|
+
// @ts-expect-error
|
|
175
176
|
return node.node;
|
|
176
177
|
}
|
|
177
178
|
/**
|
|
@@ -616,6 +617,7 @@ export class Tag extends INode {
|
|
|
616
617
|
}
|
|
617
618
|
compose(input) {
|
|
618
619
|
input.slot && input.slot(this);
|
|
620
|
+
return {};
|
|
619
621
|
}
|
|
620
622
|
findFirstChild() {
|
|
621
623
|
return this.$.unmounted ? null : this.$.node;
|
|
@@ -694,9 +696,10 @@ export class Extension extends INode {
|
|
|
694
696
|
*/
|
|
695
697
|
export class Component extends Extension {
|
|
696
698
|
init() {
|
|
697
|
-
super.composeNow();
|
|
699
|
+
const ret = super.composeNow();
|
|
698
700
|
this.ready();
|
|
699
701
|
super.applyOptionsNow();
|
|
702
|
+
return ret;
|
|
700
703
|
}
|
|
701
704
|
ready() {
|
|
702
705
|
super.ready();
|
package/lib/node/watch.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["../src/index.ts","../src/binding/attribute.ts","../src/binding/binding.ts","../src/binding/class.ts","../src/binding/style.ts","../src/core/core.ts","../src/core/destroyable.ts","../src/core/errors.ts","../src/core/ivalue.ts","../src/functional/options.ts","../src/models/array-model.ts","../src/models/listener.ts","../src/models/map-model.ts","../src/models/model.ts","../src/models/object-model.ts","../src/models/set-model.ts","../src/node/app.ts","../src/node/node.ts","../src/node/watch.ts","../src/spec/html.ts","../src/spec/react.ts","../src/spec/svg.ts","../src/value/expression.ts","../src/value/mirror.ts","../src/value/pointer.ts","../src/value/reference.ts","../src/views/array-view.ts","../src/views/base-view.ts","../src/views/map-view.ts","../src/views/object-view.ts","../src/views/repeat-node.ts","../src/views/set-view.ts"],"version":"5.6.2"}
|
package/lib/views/array-view.js
CHANGED
package/lib/views/base-view.js
CHANGED
package/lib/views/map-view.js
CHANGED
package/lib/views/object-view.js
CHANGED
package/lib/views/set-view.js
CHANGED
package/lib-node/core/core.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Reactive = exports.ReactivePrivate = exports.
|
|
3
|
+
exports.Reactive = exports.ReactivePrivate = exports.current = void 0;
|
|
4
|
+
exports.stack = stack;
|
|
5
|
+
exports.unstack = unstack;
|
|
4
6
|
const destroyable_js_1 = require("./destroyable.js");
|
|
5
7
|
const errors_1 = require("./errors");
|
|
6
8
|
const expression_1 = require("../value/expression");
|
|
@@ -13,11 +15,9 @@ function stack(node) {
|
|
|
13
15
|
currentStack.push(exports.current);
|
|
14
16
|
exports.current = node;
|
|
15
17
|
}
|
|
16
|
-
exports.stack = stack;
|
|
17
18
|
function unstack() {
|
|
18
19
|
exports.current = currentStack.pop();
|
|
19
20
|
}
|
|
20
|
-
exports.unstack = unstack;
|
|
21
21
|
/**
|
|
22
22
|
* Private stuff of a reactive object
|
|
23
23
|
* @class ReactivePrivate
|
|
@@ -222,13 +222,10 @@ class Reactive extends destroyable_js_1.Destroyable {
|
|
|
222
222
|
throw (0, errors_1.notOverwritten)();
|
|
223
223
|
}
|
|
224
224
|
composeNow() {
|
|
225
|
-
this.compose(this.input);
|
|
225
|
+
return this.compose(this.input);
|
|
226
226
|
}
|
|
227
227
|
runFunctional(f, ...args) {
|
|
228
228
|
stack(this);
|
|
229
|
-
// yet another ts bug
|
|
230
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
231
|
-
// @ts-ignore
|
|
232
229
|
const result = f(...args);
|
|
233
230
|
unstack();
|
|
234
231
|
return result;
|
package/lib-node/core/errors.js
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.notOverwritten = notOverwritten;
|
|
4
|
+
exports.internalError = internalError;
|
|
5
|
+
exports.userError = userError;
|
|
6
|
+
exports.wrongBinding = wrongBinding;
|
|
4
7
|
const reportIt = "Report it here: https://gitlab.com/vasille-js/vasille-js/-/issues";
|
|
5
8
|
function notOverwritten() {
|
|
6
9
|
console.error("Vasille-SFP: Internal error", "Must be overwritten", reportIt);
|
|
7
10
|
return "not-overwritten";
|
|
8
11
|
}
|
|
9
|
-
exports.notOverwritten = notOverwritten;
|
|
10
12
|
function internalError(msg) {
|
|
11
13
|
console.error("Vasille-SFP: Internal error", msg, reportIt);
|
|
12
14
|
return "internal-error";
|
|
13
15
|
}
|
|
14
|
-
exports.internalError = internalError;
|
|
15
16
|
function userError(msg, err) {
|
|
16
17
|
console.error("Vasille-SFP: User error", msg);
|
|
17
18
|
return err;
|
|
18
19
|
}
|
|
19
|
-
exports.userError = userError;
|
|
20
20
|
function wrongBinding(msg) {
|
|
21
21
|
return userError(msg, "wrong-binding");
|
|
22
22
|
}
|
|
23
|
-
exports.wrongBinding = wrongBinding;
|
package/lib-node/node/node.js
CHANGED
|
@@ -80,6 +80,7 @@ class Fragment extends core_1.Reactive {
|
|
|
80
80
|
}
|
|
81
81
|
compose(input) {
|
|
82
82
|
input.slot && input.slot(this);
|
|
83
|
+
return {};
|
|
83
84
|
}
|
|
84
85
|
/** To be overloaded: ready event handler */
|
|
85
86
|
ready() {
|
|
@@ -166,7 +167,7 @@ class Fragment extends core_1.Reactive {
|
|
|
166
167
|
* @param cb {function(Tag, *)} callback
|
|
167
168
|
*/
|
|
168
169
|
tag(tagName, input, cb
|
|
169
|
-
// @ts-
|
|
170
|
+
// @ts-expect-error
|
|
170
171
|
) {
|
|
171
172
|
const $ = this.$;
|
|
172
173
|
const node = new Tag(input);
|
|
@@ -175,7 +176,7 @@ class Fragment extends core_1.Reactive {
|
|
|
175
176
|
node.init();
|
|
176
177
|
this.pushNode(node);
|
|
177
178
|
node.ready();
|
|
178
|
-
// @ts-
|
|
179
|
+
// @ts-expect-error
|
|
179
180
|
return node.node;
|
|
180
181
|
}
|
|
181
182
|
/**
|
|
@@ -625,6 +626,7 @@ class Tag extends INode {
|
|
|
625
626
|
}
|
|
626
627
|
compose(input) {
|
|
627
628
|
input.slot && input.slot(this);
|
|
629
|
+
return {};
|
|
628
630
|
}
|
|
629
631
|
findFirstChild() {
|
|
630
632
|
return this.$.unmounted ? null : this.$.node;
|
|
@@ -705,9 +707,10 @@ exports.Extension = Extension;
|
|
|
705
707
|
*/
|
|
706
708
|
class Component extends Extension {
|
|
707
709
|
init() {
|
|
708
|
-
super.composeNow();
|
|
710
|
+
const ret = super.composeNow();
|
|
709
711
|
this.ready();
|
|
710
712
|
super.applyOptionsNow();
|
|
713
|
+
return ret;
|
|
711
714
|
}
|
|
712
715
|
ready() {
|
|
713
716
|
super.ready();
|
package/lib-node/node/watch.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["../src/index.ts","../src/binding/attribute.ts","../src/binding/binding.ts","../src/binding/class.ts","../src/binding/style.ts","../src/core/core.ts","../src/core/destroyable.ts","../src/core/errors.ts","../src/core/ivalue.ts","../src/functional/options.ts","../src/models/array-model.ts","../src/models/listener.ts","../src/models/map-model.ts","../src/models/model.ts","../src/models/object-model.ts","../src/models/set-model.ts","../src/node/app.ts","../src/node/node.ts","../src/node/watch.ts","../src/spec/html.ts","../src/spec/react.ts","../src/spec/svg.ts","../src/value/expression.ts","../src/value/mirror.ts","../src/value/pointer.ts","../src/value/reference.ts","../src/views/array-view.ts","../src/views/base-view.ts","../src/views/map-view.ts","../src/views/object-view.ts","../src/views/repeat-node.ts","../src/views/set-view.ts"],"version":"5.6.2"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vasille",
|
|
3
|
-
"description": "Vasille - Safe.
|
|
3
|
+
"description": "Vasille - Safe. Simple. Powerful.",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "types/index.d.ts",
|
|
6
|
-
"version": "2.3.
|
|
6
|
+
"version": "2.3.8",
|
|
7
7
|
"exports": {
|
|
8
8
|
"import": "./lib/index.js",
|
|
9
9
|
"browser": "./lib/index.js",
|
|
@@ -14,14 +14,11 @@
|
|
|
14
14
|
"scripts": {
|
|
15
15
|
"prettier": "npx prettier src test --check",
|
|
16
16
|
"build": "tsc --build tsconfig-build.json",
|
|
17
|
-
"build-es5": "tsc --build tsconfig-build-es5.json",
|
|
18
17
|
"build-node": "tsc --build tsconfig-build-node.json",
|
|
19
18
|
"test": "jest",
|
|
20
19
|
"test-coverage": "jest --coverage",
|
|
21
20
|
"update-types": "tsc --build tsconfig-types.json",
|
|
22
|
-
"
|
|
23
|
-
"cdn-create": "node cdn/create.cjs",
|
|
24
|
-
"es5-check": "es-check es5 cdn/*es5.js"
|
|
21
|
+
"cdn-create": "node cdn/create.cjs"
|
|
25
22
|
},
|
|
26
23
|
"repository": {
|
|
27
24
|
"type": "git",
|
|
@@ -33,30 +30,27 @@
|
|
|
33
30
|
"web",
|
|
34
31
|
"app",
|
|
35
32
|
"safe",
|
|
36
|
-
"
|
|
33
|
+
"simple",
|
|
37
34
|
"poweful"
|
|
38
35
|
],
|
|
39
36
|
"author": "Vasile Lixcode <lixcode@vivaldi.net> (https://t.me/lixcode)",
|
|
40
37
|
"license": "MIT",
|
|
41
38
|
"devDependencies": {
|
|
42
|
-
"@types/debug": "4.1.
|
|
43
|
-
"@types/eslint": "
|
|
44
|
-
"@types/eslint-scope": "3.7.
|
|
45
|
-
"@types/estree": "
|
|
46
|
-
"@types/events": "3.0.
|
|
47
|
-
"@types/jest": "
|
|
48
|
-
"@types/jsdom": "
|
|
49
|
-
"@
|
|
50
|
-
"@typescript-eslint/
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"jest": "
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"ts-jest": "27.1.4",
|
|
59
|
-
"tslint-config-prettier": "^1.18.0",
|
|
60
|
-
"typescript": "^4.9.5"
|
|
39
|
+
"@types/debug": "4.1.12",
|
|
40
|
+
"@types/eslint": "9.6.1",
|
|
41
|
+
"@types/eslint-scope": "3.7.7",
|
|
42
|
+
"@types/estree": "1.0.6",
|
|
43
|
+
"@types/events": "3.0.3",
|
|
44
|
+
"@types/jest": "29.5.13",
|
|
45
|
+
"@types/jsdom": "21.1.7",
|
|
46
|
+
"@typescript-eslint/eslint-plugin": "8.8.0",
|
|
47
|
+
"@typescript-eslint/parser": "8.8.0",
|
|
48
|
+
"eslint": "9.0.0",
|
|
49
|
+
"jest": "29.7.0",
|
|
50
|
+
"jsdom": "25.0.1",
|
|
51
|
+
"prettier": "3.3.3",
|
|
52
|
+
"ts-jest": "29.2.5",
|
|
53
|
+
"tslint-config-prettier": "1.18.0",
|
|
54
|
+
"typescript": "5.6.2"
|
|
61
55
|
}
|
|
62
56
|
}
|
package/types/core/core.d.ts
CHANGED
|
@@ -127,7 +127,7 @@ export declare class Reactive<T extends FragmentOptions = FragmentOptions> exten
|
|
|
127
127
|
protected applyOptions(input: T): void;
|
|
128
128
|
protected applyOptionsNow(): void;
|
|
129
129
|
protected compose(input: T): T['return'];
|
|
130
|
-
protected composeNow():
|
|
130
|
+
protected composeNow(): T['return'];
|
|
131
131
|
runFunctional<F extends (...args: any) => any>(f: F, ...args: Parameters<F>): ReturnType<F>;
|
|
132
132
|
runOnDestroy(func: () => void): void;
|
|
133
133
|
$destroy(): void;
|
|
@@ -3,7 +3,9 @@ import { AcceptedTagsMap, AcceptedTagsSpec } from "../spec/react";
|
|
|
3
3
|
import type { Fragment } from "../node/node";
|
|
4
4
|
export interface FragmentOptions {
|
|
5
5
|
"v:is"?: Record<string, IValue<any>>;
|
|
6
|
-
return?:
|
|
6
|
+
return?: {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
};
|
|
7
9
|
slot?: (node: Fragment, ...args: any[]) => void;
|
|
8
10
|
}
|
|
9
11
|
export type AttrType<T> = IValue<T | string | null> | T | string | null | undefined;
|
package/types/node/node.d.ts
CHANGED
|
@@ -75,7 +75,7 @@ export declare class Fragment<T extends FragmentOptions = FragmentOptions> exten
|
|
|
75
75
|
*/
|
|
76
76
|
preinit(app: AppNode, parent: Fragment, data?: unknown): void;
|
|
77
77
|
init(): T['return'];
|
|
78
|
-
protected compose(input: T):
|
|
78
|
+
protected compose(input: T): T['return'];
|
|
79
79
|
/** To be overloaded: ready event handler */
|
|
80
80
|
ready(): void;
|
|
81
81
|
/**
|
|
@@ -296,7 +296,7 @@ export interface TagOptionsWithSlot<K extends keyof AcceptedTagsMap> extends Tag
|
|
|
296
296
|
export declare class Tag<K extends keyof AcceptedTagsMap> extends INode<TagOptionsWithSlot<K>> {
|
|
297
297
|
constructor(input: TagOptionsWithSlot<K>);
|
|
298
298
|
preinit(app: AppNode, parent: Fragment, tagName?: string): void;
|
|
299
|
-
protected compose(input: TagOptionsWithSlot<K>):
|
|
299
|
+
protected compose(input: TagOptionsWithSlot<K>): TagOptionsWithSlot<K>['return'];
|
|
300
300
|
protected findFirstChild(): Node;
|
|
301
301
|
insertAdjacent(node: Node): void;
|
|
302
302
|
appendNode(node: Node): void;
|
|
@@ -326,7 +326,7 @@ export declare class Extension<T extends TagOptions<any> = TagOptions<any>> exte
|
|
|
326
326
|
* @extends Extension
|
|
327
327
|
*/
|
|
328
328
|
export declare class Component<T extends TagOptions<any>> extends Extension<T> {
|
|
329
|
-
init():
|
|
329
|
+
init(): T['return'];
|
|
330
330
|
ready(): void;
|
|
331
331
|
preinit(app: AppNode, parent: Fragment): void;
|
|
332
332
|
}
|
package/types/node/watch.d.ts
CHANGED
|
@@ -12,6 +12,6 @@ interface WatchOptions<T> extends FragmentOptions {
|
|
|
12
12
|
*/
|
|
13
13
|
export declare class Watch<T> extends Fragment<WatchOptions<T>> {
|
|
14
14
|
input: WatchOptions<T>;
|
|
15
|
-
compose(input: WatchOptions<T>):
|
|
15
|
+
compose(input: WatchOptions<T>): WatchOptions<T>['return'];
|
|
16
16
|
}
|
|
17
17
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["../src/index.ts","../src/binding/attribute.ts","../src/binding/binding.ts","../src/binding/class.ts","../src/binding/style.ts","../src/core/core.ts","../src/core/destroyable.ts","../src/core/errors.ts","../src/core/ivalue.ts","../src/functional/options.ts","../src/models/array-model.ts","../src/models/listener.ts","../src/models/map-model.ts","../src/models/model.ts","../src/models/object-model.ts","../src/models/set-model.ts","../src/node/app.ts","../src/node/node.ts","../src/node/watch.ts","../src/spec/html.ts","../src/spec/react.ts","../src/spec/svg.ts","../src/value/expression.ts","../src/value/mirror.ts","../src/value/pointer.ts","../src/value/reference.ts","../src/views/array-view.ts","../src/views/base-view.ts","../src/views/map-view.ts","../src/views/object-view.ts","../src/views/repeat-node.ts","../src/views/set-view.ts"],"version":"5.6.2"}
|
|
@@ -8,5 +8,5 @@ import { Fragment } from "../node/node";
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class ArrayView<T> extends BaseView<T, T, ArrayModel<T>> {
|
|
10
10
|
createChild(input: BSO<T, T, ArrayModel<T>>, id: T, item: T, before?: Fragment): any;
|
|
11
|
-
protected compose(input: BSO<T, T, ArrayModel<T>>):
|
|
11
|
+
protected compose(input: BSO<T, T, ArrayModel<T>>): {};
|
|
12
12
|
}
|
|
@@ -31,5 +31,5 @@ export declare class BaseView<K, T, Model extends ListenableModel<K, T>> extends
|
|
|
31
31
|
protected $: BaseViewPrivate<K, T>;
|
|
32
32
|
input: BSO<K, T, Model>;
|
|
33
33
|
constructor(input: BSO<K, T, Model>, $?: BaseViewPrivate<K, T>);
|
|
34
|
-
protected compose(input: BSO<K, T, Model>):
|
|
34
|
+
protected compose(input: BSO<K, T, Model>): {};
|
|
35
35
|
}
|
|
@@ -6,5 +6,5 @@ import { MapModel } from "../models/map-model";
|
|
|
6
6
|
* @extends BaseView
|
|
7
7
|
*/
|
|
8
8
|
export declare class MapView<K, T> extends BaseView<K, T, MapModel<K, T>> {
|
|
9
|
-
protected compose(input: BSO<K, T, MapModel<K, T>>):
|
|
9
|
+
protected compose(input: BSO<K, T, MapModel<K, T>>): {};
|
|
10
10
|
}
|
|
@@ -6,5 +6,5 @@ import { ObjectModel } from "../models/object-model";
|
|
|
6
6
|
* @extends BaseView
|
|
7
7
|
*/
|
|
8
8
|
export declare class ObjectView<T> extends BaseView<string, T, ObjectModel<T>> {
|
|
9
|
-
protected compose(input: BSO<string, T, ObjectModel<T>>):
|
|
9
|
+
protected compose(input: BSO<string, T, ObjectModel<T>>): {};
|
|
10
10
|
}
|
package/LICENSE.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2019 Vasile Lelițac
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|