steel-frame 7.1.2 → 7.2.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 +4 -6
- package/build/export/index.d.ts +10 -8
- package/build/export/models.d.ts +44 -0
- package/build/export/models.js +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ but it hasn't changed what it cost to be wrong, `Steel Frame` do it.
|
|
|
23
23
|
- [How POWERFUL is Steel Frame](#how-powerful-is-steel-frame)
|
|
24
24
|
- [Road map](#road-map)
|
|
25
25
|
- [Change log](#change-log)
|
|
26
|
-
- [7.0](#70)
|
|
26
|
+
- [7.0 - 7.2](#70---72)
|
|
27
27
|
- [6.0 RC (never released)](#60-rc-never-released)
|
|
28
28
|
- [5.0 - 5.1](#50---51)
|
|
29
29
|
- [4.0 - 4.3](#40---43)
|
|
@@ -133,12 +133,10 @@ We respect semantic versioning:
|
|
|
133
133
|
- A minor version is increased when we add functionality.
|
|
134
134
|
- Patch version is increased when we fix bugs.
|
|
135
135
|
|
|
136
|
-
### 7.
|
|
137
|
-
|
|
138
|
-
- Add support for ARIA attributtes.
|
|
139
|
-
|
|
140
|
-
### 7.0
|
|
136
|
+
### 7.0 - 7.2
|
|
141
137
|
|
|
138
|
+
- **7.2**: Add models to reactive conversion of buildin models.
|
|
139
|
+
- **7.1**: Add support for ARIA attributtes.
|
|
142
140
|
- Add `debounced` and `field` functions, which extend the reativity system.
|
|
143
141
|
- Add `Zombie` component, it keeps HTML elements alive some time after destruction.
|
|
144
142
|
- Add `abortSignal` to cancel fetch requests and timers when component is destroyed.
|
package/build/export/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { AppNode,
|
|
1
|
+
import { AppNode, ScreenProps } from "vasille";
|
|
2
2
|
import type { VasilleSlot } from "vasille-web/jsx-runtime";
|
|
3
3
|
import { WebRouter, WebTagOptions, CssStyleInjector, StyleSheetProps } from "vasille-web/types";
|
|
4
|
+
import { ArrayModel, MapModel, SetModel } from "./models.js";
|
|
4
5
|
export { safe } from "vasille";
|
|
5
6
|
/** Set a handler for component errors */
|
|
6
7
|
export declare function setErrorHandler(handler: (e: unknown) => void): void;
|
|
@@ -171,19 +172,19 @@ export declare function Else(props: {
|
|
|
171
172
|
slot?: () => void;
|
|
172
173
|
"vasille:slot"?: VasilleSlot;
|
|
173
174
|
}): void;
|
|
174
|
-
/** Renders content several times using a model (array, map or set) */
|
|
175
|
+
/** Renders content several times using a model (array, map, or set) */
|
|
175
176
|
export declare function For<T>(props: {
|
|
176
|
-
of: ReadonlyArray<T>;
|
|
177
|
+
of: ReadonlyArray<T> | ArrayModel<T>;
|
|
177
178
|
slot?: (value: T) => void;
|
|
178
179
|
"vasille:slot"?: VasilleSlot;
|
|
179
180
|
}): void;
|
|
180
181
|
export declare function For<T>(props: {
|
|
181
|
-
of: ReadonlySet<T>;
|
|
182
|
+
of: ReadonlySet<T> | SetModel<T>;
|
|
182
183
|
slot?: (value: T) => void;
|
|
183
184
|
"vasille:slot"?: VasilleSlot;
|
|
184
185
|
}): void;
|
|
185
186
|
export declare function For<K, T>(props: {
|
|
186
|
-
of: ReadonlyMap<K, T>;
|
|
187
|
+
of: ReadonlyMap<K, T> | MapModel<K, T>;
|
|
187
188
|
slot?: (value: T, index: K) => void;
|
|
188
189
|
"vasille:slot"?: VasilleSlot;
|
|
189
190
|
}): void;
|
|
@@ -201,17 +202,17 @@ export declare function ArrayView<T>(props: {
|
|
|
201
202
|
}): void;
|
|
202
203
|
/** Renders content of an `array model`, which can be updated via `push`, `pull`, ... */
|
|
203
204
|
export declare function ArrayModelView<T>(props: {
|
|
204
|
-
of:
|
|
205
|
+
of: ArrayModel<T>;
|
|
205
206
|
slot: (value: T, r_index: number) => void;
|
|
206
207
|
}): void;
|
|
207
208
|
/** Renders content of a `map model`, which can be updated via `set`, `delete`, ... */
|
|
208
209
|
export declare function MapModelView<K, T>(props: {
|
|
209
|
-
of:
|
|
210
|
+
of: MapModel<K, T>;
|
|
210
211
|
slot: (r_value: T, key: K) => void;
|
|
211
212
|
}): void;
|
|
212
213
|
/** Renders content of a `set model`, which can be updated via `add`, `delete`, ... */
|
|
213
214
|
export declare function SetModelView<T>(props: {
|
|
214
|
-
of:
|
|
215
|
+
of: SetModel<T>;
|
|
215
216
|
slot: (value: T) => void;
|
|
216
217
|
}): void;
|
|
217
218
|
/** Will be translated to for (let value of value) { slot(item) } */
|
|
@@ -389,3 +390,4 @@ export declare function impute<Class>(className: abstract new (...args: unknown[
|
|
|
389
390
|
/** Share a setting value when it is missing */
|
|
390
391
|
export declare function impute(key: string, value: string): string;
|
|
391
392
|
export type { WebComponent, WebComponentAdapter, WebComponentAttributes, WebComponentEventHandler, WebComponentProps, WebComponentEvents, WebTagOptions, AttrType, StyleType, WebRouter, ElementStyleProps, IdeSide, AppSide, SsgRouterMode, NavigationMode, ClassItem, WebRouterInitialization, CssStyleInjector, StyleSheetProps, } from "vasille-web/types";
|
|
393
|
+
export type { ArrayModel, MapModel, SetModel } from "./models.js";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/** Encapsulate an array for more comfortable editing */
|
|
2
|
+
export declare class ArrayModel<T> {
|
|
3
|
+
private constructor();
|
|
4
|
+
/** Give read access to the encapsulated array */
|
|
5
|
+
get array(): readonly T[];
|
|
6
|
+
/** Pop the last item of the array */
|
|
7
|
+
pop(): T | undefined;
|
|
8
|
+
/** Append items to the end of the array */
|
|
9
|
+
push(...items: Array<T>): number;
|
|
10
|
+
/** Shift the first item of the array */
|
|
11
|
+
shift(): T | undefined;
|
|
12
|
+
/** Sort items inside the array */
|
|
13
|
+
sort(compareFn?: (a: T, b: T) => number): this;
|
|
14
|
+
/** Splice calls `Array.splice` */
|
|
15
|
+
splice(start: number, deleteCount?: number, ...items: T[]): T[];
|
|
16
|
+
/** Prepend items to the array */
|
|
17
|
+
unshift(...items: T[]): number;
|
|
18
|
+
/** Replace an item of the array */
|
|
19
|
+
replace(at: number, with_: T): this;
|
|
20
|
+
}
|
|
21
|
+
/** Encapsulate an array for more comfortable editing */
|
|
22
|
+
export declare class SetModel<T> {
|
|
23
|
+
private constructor();
|
|
24
|
+
/** Give read access to the encapsulated data */
|
|
25
|
+
get set(): ReadonlySet<T>;
|
|
26
|
+
/** Add a new value to the set */
|
|
27
|
+
add(value: T): this;
|
|
28
|
+
/** Clear the set */
|
|
29
|
+
clear(): void;
|
|
30
|
+
/** Delete a value from the set, return true if the value was deleted */
|
|
31
|
+
delete(value: T): boolean;
|
|
32
|
+
}
|
|
33
|
+
/** Encapsulate an array for more comfortable editing */
|
|
34
|
+
export declare class MapModel<K, T> {
|
|
35
|
+
private constructor();
|
|
36
|
+
/** Give read access to the encapsulated data */
|
|
37
|
+
get map(): ReadonlyMap<K, T>;
|
|
38
|
+
/** Clear the map */
|
|
39
|
+
clear(): void;
|
|
40
|
+
/** Delete a value from the map, return true if the value was deleted */
|
|
41
|
+
delete(key: K): boolean;
|
|
42
|
+
/** Set a new value to the map at a given key */
|
|
43
|
+
set(key: K, value: T): this;
|
|
44
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "steel-frame",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"description": "SteelFrame: Build Fault-Tolerant Web Applications Effortlessly.",
|
|
5
5
|
"main": "build/cli/run.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@inquirer/select": "^5.2.6",
|
|
61
61
|
"csstype": "^3.1.3",
|
|
62
62
|
"esbuild": "^0.28.2",
|
|
63
|
-
"vasille-web": "7.
|
|
63
|
+
"vasille-web": "7.2.0",
|
|
64
64
|
"vite": "^8.3.4",
|
|
65
65
|
"vite-plugin-babel": "^1.7.3",
|
|
66
66
|
"vite-plugin-inspect": "^12.1.0",
|