vasille 2.3.4 → 2.3.5

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 CHANGED
@@ -34,12 +34,12 @@ There are several modes to use Vasille.
34
34
  ### Documentation for beginners (how to create the first project step by step):
35
35
  * [`Vasille Core Library` - the hard way - `low-level`](https://gitlab.com/vasille-js/vasille-js/-/blob/v2/pages/GetStarted.md)
36
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)
37
+ * [`Vasille Magic` - perfect for you - `highest-level`](https://gitlab.com/vasille-js/vasille-magic/-/blob/master/pages/GetStarted.md)
38
38
 
39
39
  ### Full documentation:
40
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
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)
42
+ * [`Vasille Magic API`- compiler writes for you - `highest-level`](https://gitlab.com/vasille-js/vasille-magic/-/blob/master/pages/Vasille-Magic-API.md)
43
43
 
44
44
  ### Getting ready be example
45
45
  * [TypeScript Example](https://gitlab.com/vasille-js/learning/vasille-ts-example)
@@ -50,7 +50,7 @@ There are several modes to use Vasille.
50
50
 
51
51
  ## How SAFE is Vasille
52
52
 
53
- The safe of your application is ensured by
53
+ The safe of your application is ensured by
54
54
  * `100%` coverage of `vasille` code by unit tests.
55
55
  Each function, each branch are working as designed.
56
56
  * `strong typing` makes your javascript/typescript code safe as C++ code.
@@ -87,11 +87,11 @@ The test project was coded using the next frameworks:
87
87
  [Try Initial](https://vasille-js.gitlab.io/project-x32/vasille-js/) /
88
88
  [Try Optimized](https://vasille-js.gitlab.io/project-x32-if/vasille-js/).
89
89
 
90
- The result of test are demonstrated in figures 1 & 2.
90
+ The result of test are demonstrated in figures 1 & 2.
91
91
  The test result are measured in FPS (frames per second), which is calculated as `1000 / ft`,
92
92
  where `ft` is an average frame time in ms of 20 frames. All values are absolute. Higher is better.
93
93
 
94
- The initial version is updating all the page content in each frame.
94
+ The initial version is updating all the page content in each frame.
95
95
  The page reactivity connections are very complex, and we get poor results in Angular, React, Vue & Svelte.
96
96
 
97
97
  The optimized version disables the offscreen & non-actual content, which simplifies the
@@ -231,7 +231,9 @@ declare class Reference<T> extends IValue<T> {
231
231
  }
232
232
 
233
233
 
234
- declare type KindOfIValue<T> = any[];
234
+ export type KindOfIValue<T extends any[]> = {
235
+ [K : string]: IValue<T[K]>;
236
+ };
235
237
  /**
236
238
  * Bind some values to one expression
237
239
  * @class Expression
@@ -640,12 +642,12 @@ declare class SetModel<T> extends Set<T> implements ListenableModel<T, T> {
640
642
  }
641
643
 
642
644
 
643
- declare type EventHandler<T> = (ev: T) => any;
645
+ export type EventHandler<T> = (ev: T) => any;
644
646
  declare interface Tag<Attrs, Events> {
645
647
  attrs: Attrs;
646
648
  events: Events;
647
649
  }
648
- declare type TagEvents = {
650
+ type TagEvents = {
649
651
  [K : string]: EventHandler<HTMLElementEventMap[K]> | undefined;
650
652
  };
651
653
  declare interface TagAttrs {
@@ -682,10 +684,10 @@ declare interface MediaTagAttrs extends TagAttrs {
682
684
  muted: boolean;
683
685
  controls: boolean;
684
686
  }
685
- declare type MediaEvents = {
687
+ type MediaEvents = {
686
688
  [K : string]: EventHandler<HTMLMediaElementEventMap[K]> | undefined;
687
689
  };
688
- declare type VideoEvents = {
690
+ type VideoEvents = {
689
691
  [K : string]: EventHandler<HTMLVideoElementEventMap[K]> | undefined;
690
692
  };
691
693
  declare interface BaseAttrs extends TagAttrs {
@@ -719,7 +721,7 @@ declare interface StyleAttrs extends TagAttrs {
719
721
  media: string;
720
722
  blocking: string;
721
723
  }
722
- declare type BodyEvents = {
724
+ type BodyEvents = {
723
725
  [K : string]: EventHandler<HTMLBodyElementEventMap[K]> | undefined;
724
726
  };
725
727
  declare interface BlockQuoteAttrs extends TagAttrs {
@@ -1076,7 +1078,7 @@ declare interface HtmlTagMap {
1076
1078
  "wbr": Tag<TagAttrs, TagEvents>;
1077
1079
  [K: string]: Tag<TagAttrs, TagEvents>;
1078
1080
  }
1079
- declare type HtmlOrSvgTag = HTMLElement | SVGElement;
1081
+ type HtmlOrSvgTag = HTMLElement | SVGElement;
1080
1082
  declare interface HtmlAndSvgEvents {
1081
1083
  onabort?: ((this: HtmlOrSvgTag, ev: UIEvent) => any) | null;
1082
1084
  onanimationcancel?: ((this: HtmlOrSvgTag, ev: AnimationEvent) => any) | null;
@@ -1617,7 +1619,7 @@ declare interface TagNameMap {
1617
1619
 
1618
1620
 
1619
1621
 
1620
- declare type SvgEvents = {
1622
+ type SvgEvents = {
1621
1623
  [K : string]: EventHandler<SVGElementEventMap[K]> | undefined;
1622
1624
  };
1623
1625
  declare interface SvgAreaAttrs {
@@ -1857,7 +1859,7 @@ declare interface SvgTagMap {
1857
1859
  "use": Tag<SvgUseAttrs, SvgEvents>;
1858
1860
  "view": Tag<SvgViewAttrs, SvgEvents>;
1859
1861
  }
1860
- declare type SvgTag = HtmlAndSvgEvents;
1862
+ type SvgTag = HtmlAndSvgEvents;
1861
1863
  declare interface SvgATag extends SvgTag {
1862
1864
  rel: string;
1863
1865
  }
@@ -1932,8 +1934,8 @@ declare interface SvgTagNameMap {
1932
1934
 
1933
1935
 
1934
1936
 
1935
- declare type AcceptedTagsMap = TagNameMap & SvgTagNameMap;
1936
- declare type AcceptedTagsSpec = HtmlTagMap & SvgTagMap;
1937
+ export type AcceptedTagsMap = TagNameMap & SvgTagNameMap;
1938
+ export type AcceptedTagsSpec = HtmlTagMap & SvgTagMap;
1937
1939
 
1938
1940
 
1939
1941
  /**
@@ -2479,7 +2481,7 @@ declare interface FragmentOptions {
2479
2481
  return?: any;
2480
2482
  slot?: (node: Fragment, ...args: any[]) => void;
2481
2483
  }
2482
- declare type AttrType<T> = IValue<T | string | null> | T | string | null | undefined;
2484
+ export type AttrType<T> = IValue<T | string | null> | T | string | null | undefined;
2483
2485
  declare interface TagOptions<T> extends FragmentOptions {
2484
2486
  "v:attr"?: {
2485
2487
  [K : string]:? AttrType<AcceptedTagsSpec[T]['attrs'][K]>;
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.4",
6
+ "version": "2.3.5",
7
7
  "exports": {
8
8
  "import": "./lib/index.js",
9
9
  "browser": "./lib/index.js",
@@ -46,7 +46,7 @@
46
46
  "@types/events": "3.0.0",
47
47
  "@types/jest": "27.4.1",
48
48
  "@types/jsdom": "16.2.14",
49
- "@types/node": "17.0.23",
49
+ "@types/node": "^18.14.6",
50
50
  "@typescript-eslint/eslint-plugin": "5.18.0",
51
51
  "@typescript-eslint/parser": "5.18.0",
52
52
  "es-check": "latest",
@@ -57,6 +57,6 @@
57
57
  "prettier": "2.7.1",
58
58
  "ts-jest": "27.1.4",
59
59
  "tslint-config-prettier": "^1.18.0",
60
- "typescript": "latest"
60
+ "typescript": "^4.9.5"
61
61
  }
62
62
  }
@@ -6,7 +6,7 @@ export interface FragmentOptions {
6
6
  return?: any;
7
7
  slot?: (node: Fragment, ...args: any[]) => void;
8
8
  }
9
- export declare type AttrType<T> = IValue<T | string | null> | T | string | null | undefined;
9
+ export type AttrType<T> = IValue<T | string | null> | T | string | null | undefined;
10
10
  export interface TagOptions<T extends keyof AcceptedTagsMap> extends FragmentOptions {
11
11
  "v:attr"?: {
12
12
  [K in keyof AcceptedTagsSpec[T]['attrs']]?: AttrType<AcceptedTagsSpec[T]['attrs'][K]>;
@@ -1,9 +1,9 @@
1
- export declare type EventHandler<T> = (ev: T) => any;
1
+ export type EventHandler<T> = (ev: T) => any;
2
2
  export interface Tag<Attrs, Events> {
3
3
  attrs: Attrs;
4
4
  events: Events;
5
5
  }
6
- declare type TagEvents = {
6
+ type TagEvents = {
7
7
  [K in keyof HTMLElementEventMap]: EventHandler<HTMLElementEventMap[K]> | undefined;
8
8
  };
9
9
  interface TagAttrs {
@@ -40,10 +40,10 @@ interface MediaTagAttrs extends TagAttrs {
40
40
  muted: boolean;
41
41
  controls: boolean;
42
42
  }
43
- declare type MediaEvents = {
43
+ type MediaEvents = {
44
44
  [K in keyof HTMLMediaElementEventMap]: EventHandler<HTMLMediaElementEventMap[K]> | undefined;
45
45
  };
46
- declare type VideoEvents = {
46
+ type VideoEvents = {
47
47
  [K in keyof HTMLVideoElementEventMap]: EventHandler<HTMLVideoElementEventMap[K]> | undefined;
48
48
  };
49
49
  interface BaseAttrs extends TagAttrs {
@@ -77,7 +77,7 @@ interface StyleAttrs extends TagAttrs {
77
77
  media: string;
78
78
  blocking: string;
79
79
  }
80
- declare type BodyEvents = {
80
+ type BodyEvents = {
81
81
  [K in keyof HTMLBodyElementEventMap]: EventHandler<HTMLBodyElementEventMap[K]> | undefined;
82
82
  };
83
83
  interface BlockQuoteAttrs extends TagAttrs {
@@ -434,7 +434,7 @@ export interface HtmlTagMap {
434
434
  "wbr": Tag<TagAttrs, TagEvents>;
435
435
  [K: string]: Tag<TagAttrs, TagEvents>;
436
436
  }
437
- declare type HtmlOrSvgTag = HTMLElement | SVGElement;
437
+ type HtmlOrSvgTag = HTMLElement | SVGElement;
438
438
  export interface HtmlAndSvgEvents {
439
439
  onabort?: ((this: HtmlOrSvgTag, ev: UIEvent) => any) | null;
440
440
  onanimationcancel?: ((this: HtmlOrSvgTag, ev: AnimationEvent) => any) | null;
@@ -1,4 +1,4 @@
1
1
  import { SvgTagMap, SvgTagNameMap } from "./svg";
2
2
  import { HtmlTagMap, TagNameMap } from "./html";
3
- export declare type AcceptedTagsMap = TagNameMap & SvgTagNameMap;
4
- export declare type AcceptedTagsSpec = HtmlTagMap & SvgTagMap;
3
+ export type AcceptedTagsMap = TagNameMap & SvgTagNameMap;
4
+ export type AcceptedTagsSpec = HtmlTagMap & SvgTagMap;
@@ -1,5 +1,5 @@
1
1
  import { EventHandler, HtmlAndSvgEvents, Tag } from "./html";
2
- declare type SvgEvents = {
2
+ type SvgEvents = {
3
3
  [K in keyof SVGElementEventMap]: EventHandler<SVGElementEventMap[K]> | undefined;
4
4
  };
5
5
  interface SvgAreaAttrs {
@@ -239,7 +239,7 @@ export interface SvgTagMap {
239
239
  "use": Tag<SvgUseAttrs, SvgEvents>;
240
240
  "view": Tag<SvgViewAttrs, SvgEvents>;
241
241
  }
242
- declare type SvgTag = HtmlAndSvgEvents;
242
+ type SvgTag = HtmlAndSvgEvents;
243
243
  interface SvgATag extends SvgTag {
244
244
  rel: string;
245
245
  }
@@ -1,5 +1,5 @@
1
1
  import { IValue } from "../core/ivalue";
2
- export declare type KindOfIValue<T extends unknown[]> = {
2
+ export type KindOfIValue<T extends unknown[]> = {
3
3
  [K in keyof T]: IValue<T[K]>;
4
4
  };
5
5
  /**