vasille-jsx 5.0.0 → 5.1.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.
- package/README.md +47 -23
- package/lib/dev/components.js +1 -1
- package/lib/dev/compose.js +1 -1
- package/lib/dev/index.js +2 -1
- package/lib/internal.js +0 -8
- package/package.json +2 -2
- package/types/internal.d.ts +1 -3
package/README.md
CHANGED
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
5
|
-
`SteelFrameKit` is a front-end development kit, which is developed to provide
|
|
5
|
+
`SteelFrameKit` is a front-end development kit, which is developed to provide fault tolerant web applications.
|
|
6
6
|
|
|
7
|
-
[](https://www.npmjs.com/package/steel-frame)
|
|
8
|
+
[](https://deepwiki.com/vasille-js/steel-frame)
|
|
9
|
+
[](https://coveralls.io/github/vasille-js/steel-frame?branch=v5)
|
|
8
10
|
|
|
9
11
|
## Table of content
|
|
10
12
|
|
|
@@ -19,11 +21,12 @@
|
|
|
19
21
|
- [How POWERFUL is SteelFrameKit](#how-powerful-is-steelframekit)
|
|
20
22
|
- [Road map](#road-map)
|
|
21
23
|
- [Change log](#change-log)
|
|
22
|
-
- [5.
|
|
23
|
-
- [
|
|
24
|
-
- [4.
|
|
25
|
-
- [
|
|
26
|
-
- [
|
|
24
|
+
- [5.1](#51)
|
|
25
|
+
- [5.0](#50)
|
|
26
|
+
- [4.0 - 4.3](#40---43)
|
|
27
|
+
- [3.0 - 3.2](#30---32)
|
|
28
|
+
- [2.0 - 2.3](#20---23)
|
|
29
|
+
- [1.0 - 1.2](#10---12)
|
|
27
30
|
- [Questions](#questions)
|
|
28
31
|
|
|
29
32
|
|
|
@@ -44,10 +47,10 @@ $ npm create steel-frame
|
|
|
44
47
|
```
|
|
45
48
|
|
|
46
49
|
### Full documentation:
|
|
47
|
-
* [Learn `SteelFrameKit` in 5 minutes](https://github.com/vasille-js/vasille-js/blob/
|
|
48
|
-
* [Router Documentation](https://github.com/vasille-js/vasille-js/blob/
|
|
49
|
-
* [Compostion functions](https://github.com/vasille-js/vasille-js/blob/
|
|
50
|
-
* [Dependency injection](https://github.com/vasille-js/vasille-js/blob/
|
|
50
|
+
* [Learn `SteelFrameKit` in 5 minutes](https://github.com/vasille-js/vasille-js/blob/v5/doc/V4-API.md)
|
|
51
|
+
* [Router Documentation](https://github.com/vasille-js/vasille-js/blob/v5/doc/Router-API.md)
|
|
52
|
+
* [Compostion functions](https://github.com/vasille-js/vasille-js/blob/v5/doc/Compositions.md)
|
|
53
|
+
* [Dependency injection](https://github.com/vasille-js/vasille-js/blob/v5/doc/Context.md)
|
|
51
54
|
|
|
52
55
|
### Examples
|
|
53
56
|
* [TypeScript Example](https://github.com/vasille-js/example-typescript)
|
|
@@ -92,7 +95,7 @@ All of these are supported:
|
|
|
92
95
|
* Reactive values (observables).
|
|
93
96
|
* Inline computed values.
|
|
94
97
|
* Multiline computed values.
|
|
95
|
-
* HTML
|
|
98
|
+
* HTML tags.
|
|
96
99
|
* Component custom slots.
|
|
97
100
|
* 2-way data binding in components.
|
|
98
101
|
* Logic block (if, else).
|
|
@@ -103,7 +106,6 @@ All of these are supported:
|
|
|
103
106
|
|
|
104
107
|
## Road map
|
|
105
108
|
|
|
106
|
-
* [x] Update the `core` library to version 3.0.
|
|
107
109
|
* [x] `100%` Test Coverage for core Library v3.
|
|
108
110
|
* [x] Develop the `JSX` library.
|
|
109
111
|
* [x] `100%` Test Coverage for the JSX library.
|
|
@@ -117,25 +119,47 @@ All of these are supported:
|
|
|
117
119
|
|
|
118
120
|
## Change log
|
|
119
121
|
|
|
120
|
-
|
|
122
|
+
We respect semantic versioning:
|
|
123
|
+
- A major version is increased when we make incompatible API changes.
|
|
124
|
+
- A minor version is increased when we add functionality.
|
|
125
|
+
- Patch version is increased when we fix bugs.
|
|
121
126
|
|
|
122
|
-
|
|
127
|
+
### 5.1
|
|
123
128
|
|
|
124
|
-
|
|
129
|
+
Add support for web components compile target `web build components`.
|
|
130
|
+
_Web components as custom tags are supported in any version._
|
|
125
131
|
|
|
126
|
-
|
|
132
|
+
### 5.0
|
|
127
133
|
|
|
128
|
-
|
|
134
|
+
- Add support for context and dependencies injection.
|
|
135
|
+
- New developement direction: `fault tolerant`.
|
|
136
|
+
- Renamed to `steel-frame`. **[API change]**
|
|
137
|
+
- Removed `forward` and `backward` functions. **[API change]**
|
|
138
|
+
- Removed `Debug` component. **[API change]**
|
|
129
139
|
|
|
130
|
-
|
|
140
|
+
### 4.0 - 4.3
|
|
131
141
|
|
|
132
|
-
|
|
142
|
+
- Initial version of the framework with file based routing and building scripts (`web dev` and `web build spa`).
|
|
143
|
+
- Reactive values naming switched to `$` prefix. **[API change]**
|
|
144
|
+
- `4.1` Added SSG (static site generation) as build option `web build static`.
|
|
145
|
+
- `4.2` Add support for inlined conditions in JSX, binary `&&` and ternary `?:` operator.
|
|
146
|
+
- `4.3` Add new function `safe` which make functions safe, errors are reported automatically.
|
|
133
147
|
|
|
134
|
-
|
|
148
|
+
### 3.0 - 3.2
|
|
135
149
|
|
|
136
|
-
|
|
150
|
+
- Switch to a babel plugin to compile components code. **[API change]**
|
|
151
|
+
- 100% of the code has been covered with unit tests.
|
|
152
|
+
- New developement direction: `keep it simple`.
|
|
137
153
|
|
|
138
|
-
|
|
154
|
+
### 2.0 - 2.3
|
|
155
|
+
|
|
156
|
+
- Introduces components compilation via a typescript plugin. **[API change]**
|
|
157
|
+
- New developement direction: `write less, do more`.
|
|
158
|
+
|
|
159
|
+
### 1.0 - 1.2
|
|
160
|
+
|
|
161
|
+
- Initial version of a core library.
|
|
162
|
+
- Developemnt direction: `performance-first`.
|
|
139
163
|
|
|
140
164
|
## Questions
|
|
141
165
|
|
package/lib/dev/components.js
CHANGED
|
@@ -15,7 +15,7 @@ export function DevSlot({ model, slot, ...options }, ctx, defaultSlot, usage) {
|
|
|
15
15
|
catch (e) {
|
|
16
16
|
ctx.runner.inspector.reportComponentSlotError({
|
|
17
17
|
targetId: "id" in ctx && typeof ctx.id === "number" ? ctx.id : 0,
|
|
18
|
-
error: e
|
|
18
|
+
error: e instanceof Error ? `${e.message}\n${e.stack}` : `${e}`,
|
|
19
19
|
usage: usage,
|
|
20
20
|
time: Date.now(),
|
|
21
21
|
});
|
package/lib/dev/compose.js
CHANGED
|
@@ -21,7 +21,7 @@ export function devView(renderer, declaration, name) {
|
|
|
21
21
|
catch (e) {
|
|
22
22
|
node.runner.inspector.reportComponentError({
|
|
23
23
|
targetId: frag.id,
|
|
24
|
-
error: e
|
|
24
|
+
error: e instanceof Error ? `${e.message}\n${e.stack}` : `${e}`,
|
|
25
25
|
time: Date.now(),
|
|
26
26
|
});
|
|
27
27
|
reportError(e);
|
package/lib/dev/index.js
CHANGED
|
@@ -8,9 +8,10 @@ export { AbstractInspector, EarlyInspector, earlyInspector } from "./early-inspe
|
|
|
8
8
|
function devErrorHandler(e) {
|
|
9
9
|
earlyInspector.reportError({
|
|
10
10
|
targetId: 0,
|
|
11
|
-
error: e instanceof Error ?
|
|
11
|
+
error: e instanceof Error ? `${e.message}\n${e.stack}` : `${e}`,
|
|
12
12
|
time: Date.now(),
|
|
13
13
|
});
|
|
14
|
+
console.error(e);
|
|
14
15
|
}
|
|
15
16
|
coreSetErrorHandler(devErrorHandler);
|
|
16
17
|
export function setErrorHandler(fn) {
|
package/lib/internal.js
CHANGED
|
@@ -73,11 +73,3 @@ export function set(o, key, value, createRef = ref) {
|
|
|
73
73
|
}
|
|
74
74
|
return value;
|
|
75
75
|
}
|
|
76
|
-
export function forward(value) {
|
|
77
|
-
return new Expression(v => v, [value]);
|
|
78
|
-
}
|
|
79
|
-
export function backward(value) {
|
|
80
|
-
const r = new Reference(value.V);
|
|
81
|
-
r.on(v => (value.V = v));
|
|
82
|
-
return r;
|
|
83
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vasille-jsx",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "The same framework which is designed to build bulletproof frontends (JSX components)",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -65,6 +65,6 @@
|
|
|
65
65
|
"typescript-eslint": "^8.39.1"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"vasille": "5.0.0"
|
|
68
|
+
"vasille": "^5.0.0"
|
|
69
69
|
}
|
|
70
70
|
}
|
package/types/internal.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IValue, Reactive, KindOfIValue, Expression,
|
|
1
|
+
import { IValue, Reactive, KindOfIValue, Expression, SetModel, MapModel, ArrayModel } from "vasille";
|
|
2
2
|
export declare function expr<T, Args extends unknown[]>(ctx: Reactive | undefined, func: (...args: Args) => T, values: KindOfIValue<Args>): Expression<T, Args>;
|
|
3
3
|
/**
|
|
4
4
|
* It transforms a non-reactive value to a reactive one.
|
|
@@ -37,5 +37,3 @@ export declare function match(name: string | number | symbol, data?: unknown, cr
|
|
|
37
37
|
* 2. `arr[0] = 23` to `set(arr, 0, 23)`
|
|
38
38
|
*/
|
|
39
39
|
export declare function set(o: object, key: string | symbol | number, value: unknown, createRef?: typeof ref): unknown;
|
|
40
|
-
export declare function forward<T>(value: IValue<T>): Expression<T, [v: T]>;
|
|
41
|
-
export declare function backward<T>(value: IValue<T>): Reference<T>;
|