steel-frame 5.1.1 → 5.1.3
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/fake-types/index.d.ts +27 -12
- package/package.json +3 -4
package/fake-types/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { TagOptions } from "vasille/web-runner";
|
|
|
3
3
|
import type { StyleSheetProps as StyleProps } from "vasille-web";
|
|
4
4
|
import type { ScreenProps } from "vasille-router";
|
|
5
5
|
import type { Router } from "vasille-router/web-router";
|
|
6
|
+
import type { VasilleSlot } from "vasille-web/jsx-runtime";
|
|
6
7
|
|
|
7
8
|
export type { StyleProps } from "vasille-web";
|
|
8
9
|
export type ClassItem = string | Record<string, boolean> | false;
|
|
@@ -18,12 +19,12 @@ declare interface Params {
|
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
declare type Composed<In extends object, Out> = (
|
|
21
|
-
$: (Required<In> extends Params ?
|
|
22
|
+
$: (Required<In> extends Params ? In & { "vasille:slot"?: VasilleSlot } : In) & {
|
|
22
23
|
callback?(data: Out): void;
|
|
23
24
|
},
|
|
24
25
|
) => void;
|
|
25
26
|
declare type ComposedNoCallback<In extends object, Out> = (
|
|
26
|
-
$: Required<In> extends Params ? Omit<In, "slot"> & { slot?:
|
|
27
|
+
$: Required<In> extends Params ? Omit<In, "slot"> & { "vasille:slot"?: VasilleSlot } : In,
|
|
27
28
|
) => void;
|
|
28
29
|
|
|
29
30
|
/** Composes a component (v3), which can receive external reactive values via props */
|
|
@@ -89,30 +90,44 @@ export declare function Slot<Props extends object>(
|
|
|
89
90
|
/** Renders content conditionally */
|
|
90
91
|
export declare function If<T>(props: {
|
|
91
92
|
$condition: T;
|
|
92
|
-
slot
|
|
93
|
+
slot?: (value: Exclude<T, false | 0 | "" | null | undefined>) => void;
|
|
94
|
+
"vasille:slot"?: VasilleSlot;
|
|
93
95
|
}): void;
|
|
94
|
-
export declare function If(props: { $condition: unknown; slot?:
|
|
96
|
+
export declare function If(props: { $condition: unknown; "vasille:slot"?: VasilleSlot }): void;
|
|
95
97
|
|
|
96
98
|
/** Renders content conditionally, use strict after `<If/>` */
|
|
97
99
|
export declare function ElseIf<T>(props: {
|
|
98
100
|
$condition: T;
|
|
99
|
-
slot
|
|
101
|
+
slot?: (value: Exclude<T, false | 0 | "" | null | undefined>) => void;
|
|
102
|
+
"vasille:slot"?: VasilleSlot;
|
|
100
103
|
}): void;
|
|
101
|
-
export declare function ElseIf(props: { $condition: unknown; slot?:
|
|
104
|
+
export declare function ElseIf(props: { $condition: unknown; "vasille:slot"?: VasilleSlot }): void;
|
|
102
105
|
|
|
103
106
|
/** Renders content conditionally, use strict after `<If/>` or `<ElseIf/>` */
|
|
104
|
-
export declare function Else(props: { slot?:
|
|
107
|
+
export declare function Else(props: { slot?: () => void; "vasille:slot"?: VasilleSlot }): void;
|
|
105
108
|
|
|
106
109
|
/** Renders content several times using a model (array, map or set) */
|
|
107
|
-
export declare function For<T>(props: {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
+
export declare function For<T>(props: {
|
|
111
|
+
of: ReadonlyArray<T>;
|
|
112
|
+
slot?: (value: T) => void;
|
|
113
|
+
"vasille:slot"?: VasilleSlot;
|
|
114
|
+
}): void;
|
|
115
|
+
export declare function For<T>(props: {
|
|
116
|
+
of: ReadonlySet<T>;
|
|
117
|
+
slot?: (value: T) => void;
|
|
118
|
+
"vasille:slot"?: VasilleSlot;
|
|
119
|
+
}): void;
|
|
120
|
+
export declare function For<K, T>(props: {
|
|
121
|
+
of: ReadonlyMap<K, T>;
|
|
122
|
+
slot?: (value: T, index: K) => void;
|
|
123
|
+
"vasille:slot"?: VasilleSlot;
|
|
124
|
+
}): void;
|
|
110
125
|
|
|
111
126
|
/** Refresh the content each time then the reactive model is updated */
|
|
112
|
-
export declare function Watch<T>(props: { $model: T; slot?: (value: T) => void }): void;
|
|
127
|
+
export declare function Watch<T>(props: { $model: T; slot?: (value: T) => void; "vasille:slot"?: VasilleSlot }): void;
|
|
113
128
|
|
|
114
129
|
/** Render content after a while */
|
|
115
|
-
export declare function Delay(props: { time?: number; slot?:
|
|
130
|
+
export declare function Delay(props: { time?: number; slot?: () => void; "vasille:slot"?: VasilleSlot }): void;
|
|
116
131
|
|
|
117
132
|
type ReadonlyState<T> =
|
|
118
133
|
T extends Map<infer K, infer V>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "steel-frame",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.3",
|
|
4
4
|
"description": "SteelFrame: Build Fault-Tolerant Web Applications Effortlessly.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -44,14 +44,13 @@
|
|
|
44
44
|
"homepage": "https://github.com/vasille-js/vasille-js#readme",
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"csstype": "^3.1.3",
|
|
47
|
-
"vasille": "^5.1.
|
|
47
|
+
"vasille": "^5.1.1",
|
|
48
48
|
"vasille-context": "^5.0.0",
|
|
49
49
|
"vasille-css": "^5.0.0",
|
|
50
50
|
"vasille-jsx": "^5.0.0",
|
|
51
51
|
"vasille-router": "^5.0.0",
|
|
52
52
|
"vasille-shadow": "^5.0.0",
|
|
53
|
-
"vasille-
|
|
54
|
-
"vasille-web": "^5.0.0"
|
|
53
|
+
"vasille-web": "^5.1.0"
|
|
55
54
|
},
|
|
56
55
|
"devDependencies": {
|
|
57
56
|
"@types/node": "^24.3.0",
|