solid-js 1.7.7 → 1.7.9
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/dist/dev.cjs +24 -13
- package/dist/dev.js +555 -306
- package/dist/server.cjs +3 -3
- package/dist/server.js +177 -79
- package/dist/solid.cjs +24 -13
- package/dist/solid.js +482 -264
- package/h/dist/h.cjs +2 -2
- package/h/dist/h.js +36 -10
- package/h/jsx-runtime/dist/jsx.js +1 -1
- package/h/jsx-runtime/types/index.d.ts +11 -8
- package/h/jsx-runtime/types/jsx.d.ts +130 -100
- package/h/types/hyperscript.d.ts +11 -11
- package/h/types/index.d.ts +3 -2
- package/html/dist/html.cjs +2 -2
- package/html/dist/html.js +218 -96
- package/html/types/index.d.ts +3 -2
- package/html/types/lit.d.ts +45 -31
- package/package.json +1 -1
- package/store/dist/dev.cjs +34 -32
- package/store/dist/dev.js +141 -67
- package/store/dist/server.js +19 -8
- package/store/dist/store.cjs +34 -32
- package/store/dist/store.js +132 -64
- package/store/types/index.d.ts +21 -7
- package/store/types/modifiers.d.ts +6 -3
- package/store/types/mutable.d.ts +5 -2
- package/store/types/server.d.ts +12 -4
- package/store/types/store.d.ts +217 -63
- package/types/index.d.ts +69 -9
- package/types/jsx.d.ts +10 -6
- package/types/reactive/array.d.ts +12 -4
- package/types/reactive/observable.d.ts +25 -17
- package/types/reactive/scheduler.d.ts +9 -6
- package/types/reactive/signal.d.ts +227 -136
- package/types/render/Suspense.d.ts +5 -5
- package/types/render/component.d.ts +62 -31
- package/types/render/flow.d.ts +43 -31
- package/types/render/hydration.d.ts +13 -10
- package/types/server/index.d.ts +55 -2
- package/types/server/reactive.d.ts +67 -40
- package/types/server/rendering.d.ts +171 -95
- package/universal/dist/dev.js +28 -12
- package/universal/dist/universal.js +28 -12
- package/universal/types/index.d.ts +3 -1
- package/universal/types/universal.d.ts +0 -1
- package/web/dist/dev.js +610 -79
- package/web/dist/server.cjs +4 -4
- package/web/dist/server.js +180 -81
- package/web/dist/web.js +610 -79
- package/web/types/client.d.ts +2 -2
- package/web/types/core.d.ts +10 -1
- package/web/types/index.d.ts +27 -10
- package/web/types/server-mock.d.ts +47 -32
package/store/types/store.d.ts
CHANGED
|
@@ -1,22 +1,35 @@
|
|
|
1
|
-
export declare const $RAW: unique symbol, $NODE: unique symbol;
|
|
1
|
+
export declare const $RAW: unique symbol, $NODE: unique symbol, $HAS: unique symbol;
|
|
2
2
|
export declare const DevHooks: {
|
|
3
|
-
|
|
3
|
+
onStoreNodeUpdate: OnStoreNodeUpdate | null;
|
|
4
4
|
};
|
|
5
5
|
type DataNode = {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
(): any;
|
|
7
|
+
$(value?: any): void;
|
|
8
8
|
};
|
|
9
9
|
type DataNodes = Record<PropertyKey, DataNode | undefined>;
|
|
10
|
-
export type OnStoreNodeUpdate = (
|
|
10
|
+
export type OnStoreNodeUpdate = (
|
|
11
|
+
state: StoreNode,
|
|
12
|
+
property: PropertyKey,
|
|
13
|
+
value: StoreNode | NotWrappable,
|
|
14
|
+
prev: StoreNode | NotWrappable
|
|
15
|
+
) => void;
|
|
11
16
|
export interface StoreNode {
|
|
12
|
-
|
|
13
|
-
|
|
17
|
+
[$NODE]?: DataNodes;
|
|
18
|
+
[key: PropertyKey]: any;
|
|
14
19
|
}
|
|
15
20
|
export declare namespace SolidStore {
|
|
16
|
-
|
|
17
|
-
}
|
|
21
|
+
interface Unwrappable {}
|
|
18
22
|
}
|
|
19
|
-
export type NotWrappable =
|
|
23
|
+
export type NotWrappable =
|
|
24
|
+
| string
|
|
25
|
+
| number
|
|
26
|
+
| bigint
|
|
27
|
+
| symbol
|
|
28
|
+
| boolean
|
|
29
|
+
| Function
|
|
30
|
+
| null
|
|
31
|
+
| undefined
|
|
32
|
+
| SolidStore.Unwrappable[keyof SolidStore.Unwrappable];
|
|
20
33
|
export type Store<T> = T;
|
|
21
34
|
export declare function isWrappable<T>(obj: T | NotWrappable): obj is T;
|
|
22
35
|
/**
|
|
@@ -31,76 +44,217 @@ export declare function isWrappable<T>(obj: T | NotWrappable): obj is T;
|
|
|
31
44
|
* ```
|
|
32
45
|
*/
|
|
33
46
|
export declare function unwrap<T>(item: T, set?: Set<unknown>): T;
|
|
34
|
-
export declare function
|
|
35
|
-
export declare function
|
|
36
|
-
export declare function proxyDescriptor(
|
|
47
|
+
export declare function getNodes(target: StoreNode, symbol: typeof $NODE | typeof $HAS): DataNodes;
|
|
48
|
+
export declare function getNode(nodes: DataNodes, property: PropertyKey, value?: any): DataNode;
|
|
49
|
+
export declare function proxyDescriptor(
|
|
50
|
+
target: StoreNode,
|
|
51
|
+
property: PropertyKey
|
|
52
|
+
): TypedPropertyDescriptor<any> | undefined;
|
|
37
53
|
export declare function trackSelf(target: StoreNode): void;
|
|
38
54
|
export declare function ownKeys(target: StoreNode): (string | symbol)[];
|
|
39
|
-
export declare function setProperty(
|
|
40
|
-
|
|
55
|
+
export declare function setProperty(
|
|
56
|
+
state: StoreNode,
|
|
57
|
+
property: PropertyKey,
|
|
58
|
+
value: any,
|
|
59
|
+
deleting?: boolean
|
|
60
|
+
): void;
|
|
61
|
+
export declare function updatePath(
|
|
62
|
+
current: StoreNode,
|
|
63
|
+
path: any[],
|
|
64
|
+
traversed?: PropertyKey[]
|
|
65
|
+
): void;
|
|
41
66
|
/** @deprecated */
|
|
42
|
-
export type DeepReadonly<T> = 0 extends 1 & T
|
|
43
|
-
|
|
44
|
-
|
|
67
|
+
export type DeepReadonly<T> = 0 extends 1 & T
|
|
68
|
+
? T
|
|
69
|
+
: T extends NotWrappable
|
|
70
|
+
? T
|
|
71
|
+
: {
|
|
72
|
+
readonly [K in keyof T]: DeepReadonly<T[K]>;
|
|
73
|
+
};
|
|
45
74
|
/** @deprecated */
|
|
46
|
-
export type DeepMutable<T> = 0 extends 1 & T
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
75
|
+
export type DeepMutable<T> = 0 extends 1 & T
|
|
76
|
+
? T
|
|
77
|
+
: T extends NotWrappable
|
|
78
|
+
? T
|
|
79
|
+
: {
|
|
80
|
+
-readonly [K in keyof T]: DeepMutable<T[K]>;
|
|
81
|
+
};
|
|
82
|
+
export type CustomPartial<T> = T extends readonly unknown[]
|
|
83
|
+
? "0" extends keyof T
|
|
84
|
+
? {
|
|
85
|
+
[K in Extract<keyof T, `${number}`>]?: T[K];
|
|
86
|
+
}
|
|
87
|
+
: {
|
|
88
|
+
[x: number]: T[number];
|
|
89
|
+
}
|
|
90
|
+
: Partial<T>;
|
|
54
91
|
export type PickMutable<T> = {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
92
|
+
[K in keyof T as (<U>() => U extends {
|
|
93
|
+
[V in K]: T[V];
|
|
94
|
+
}
|
|
95
|
+
? 1
|
|
96
|
+
: 2) extends <U>() => U extends {
|
|
97
|
+
-readonly [V in K]: T[V];
|
|
98
|
+
}
|
|
99
|
+
? 1
|
|
100
|
+
: 2
|
|
101
|
+
? K
|
|
102
|
+
: never]: T[K];
|
|
60
103
|
};
|
|
61
104
|
export type StorePathRange = {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
105
|
+
from?: number;
|
|
106
|
+
to?: number;
|
|
107
|
+
by?: number;
|
|
65
108
|
};
|
|
66
109
|
export type ArrayFilterFn<T> = (item: T, index: number) => boolean;
|
|
67
|
-
export type StoreSetter<T, U extends PropertyKey[] = []> =
|
|
68
|
-
|
|
110
|
+
export type StoreSetter<T, U extends PropertyKey[] = []> =
|
|
111
|
+
| T
|
|
112
|
+
| CustomPartial<T>
|
|
113
|
+
| ((prevState: T, traversed: U) => T | CustomPartial<T>);
|
|
114
|
+
export type Part<T, K extends KeyOf<T> = KeyOf<T>> =
|
|
115
|
+
| K
|
|
116
|
+
| ([K] extends [never] ? never : readonly K[])
|
|
117
|
+
| ([T] extends [readonly unknown[]] ? ArrayFilterFn<T[number]> | StorePathRange : never);
|
|
69
118
|
type W<T> = Exclude<T, NotWrappable>;
|
|
70
|
-
type KeyOf<T> = number extends keyof T
|
|
71
|
-
|
|
72
|
-
|
|
119
|
+
type KeyOf<T> = number extends keyof T
|
|
120
|
+
? 0 extends 1 & T
|
|
121
|
+
? keyof T
|
|
122
|
+
: [T] extends [never]
|
|
123
|
+
? never
|
|
124
|
+
: [T] extends [readonly unknown[]]
|
|
125
|
+
? number
|
|
126
|
+
: keyof T
|
|
127
|
+
: keyof T;
|
|
73
128
|
type MutableKeyOf<T> = KeyOf<T> & keyof PickMutable<T>;
|
|
74
|
-
type Rest<T, U extends PropertyKey[], K extends KeyOf<T> = KeyOf<T>> = [T] extends [never]
|
|
75
|
-
|
|
129
|
+
type Rest<T, U extends PropertyKey[], K extends KeyOf<T> = KeyOf<T>> = [T] extends [never]
|
|
130
|
+
? never
|
|
131
|
+
: K extends MutableKeyOf<T>
|
|
132
|
+
? [Part<T, K>, ...RestSetterOrContinue<T[K], [K, ...U]>]
|
|
133
|
+
: K extends KeyOf<T>
|
|
134
|
+
? [Part<T, K>, ...RestContinue<T[K], [K, ...U]>]
|
|
135
|
+
: never;
|
|
136
|
+
type RestContinue<T, U extends PropertyKey[]> = 0 extends 1 & T
|
|
137
|
+
? [...Part<any>[], StoreSetter<any, PropertyKey[]>]
|
|
138
|
+
: Rest<W<T>, U>;
|
|
76
139
|
type RestSetterOrContinue<T, U extends PropertyKey[]> = [StoreSetter<T, U>] | RestContinue<T, U>;
|
|
77
140
|
export interface SetStoreFunction<T> {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
141
|
+
<
|
|
142
|
+
K1 extends KeyOf<W<T>>,
|
|
143
|
+
K2 extends KeyOf<W<W<T>[K1]>>,
|
|
144
|
+
K3 extends KeyOf<W<W<W<T>[K1]>[K2]>>,
|
|
145
|
+
K4 extends KeyOf<W<W<W<W<T>[K1]>[K2]>[K3]>>,
|
|
146
|
+
K5 extends KeyOf<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>>,
|
|
147
|
+
K6 extends KeyOf<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>>,
|
|
148
|
+
K7 extends MutableKeyOf<W<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6]>>
|
|
149
|
+
>(
|
|
150
|
+
k1: Part<W<T>, K1>,
|
|
151
|
+
k2: Part<W<W<T>[K1]>, K2>,
|
|
152
|
+
k3: Part<W<W<W<T>[K1]>[K2]>, K3>,
|
|
153
|
+
k4: Part<W<W<W<W<T>[K1]>[K2]>[K3]>, K4>,
|
|
154
|
+
k5: Part<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>, K5>,
|
|
155
|
+
k6: Part<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>, K6>,
|
|
156
|
+
k7: Part<W<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6]>, K7>,
|
|
157
|
+
setter: StoreSetter<
|
|
158
|
+
W<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6]>[K7],
|
|
159
|
+
[K7, K6, K5, K4, K3, K2, K1]
|
|
160
|
+
>
|
|
161
|
+
): void;
|
|
162
|
+
<
|
|
163
|
+
K1 extends KeyOf<W<T>>,
|
|
164
|
+
K2 extends KeyOf<W<W<T>[K1]>>,
|
|
165
|
+
K3 extends KeyOf<W<W<W<T>[K1]>[K2]>>,
|
|
166
|
+
K4 extends KeyOf<W<W<W<W<T>[K1]>[K2]>[K3]>>,
|
|
167
|
+
K5 extends KeyOf<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>>,
|
|
168
|
+
K6 extends MutableKeyOf<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>>
|
|
169
|
+
>(
|
|
170
|
+
k1: Part<W<T>, K1>,
|
|
171
|
+
k2: Part<W<W<T>[K1]>, K2>,
|
|
172
|
+
k3: Part<W<W<W<T>[K1]>[K2]>, K3>,
|
|
173
|
+
k4: Part<W<W<W<W<T>[K1]>[K2]>[K3]>, K4>,
|
|
174
|
+
k5: Part<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>, K5>,
|
|
175
|
+
k6: Part<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>, K6>,
|
|
176
|
+
setter: StoreSetter<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6], [K6, K5, K4, K3, K2, K1]>
|
|
177
|
+
): void;
|
|
178
|
+
<
|
|
179
|
+
K1 extends KeyOf<W<T>>,
|
|
180
|
+
K2 extends KeyOf<W<W<T>[K1]>>,
|
|
181
|
+
K3 extends KeyOf<W<W<W<T>[K1]>[K2]>>,
|
|
182
|
+
K4 extends KeyOf<W<W<W<W<T>[K1]>[K2]>[K3]>>,
|
|
183
|
+
K5 extends MutableKeyOf<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>>
|
|
184
|
+
>(
|
|
185
|
+
k1: Part<W<T>, K1>,
|
|
186
|
+
k2: Part<W<W<T>[K1]>, K2>,
|
|
187
|
+
k3: Part<W<W<W<T>[K1]>[K2]>, K3>,
|
|
188
|
+
k4: Part<W<W<W<W<T>[K1]>[K2]>[K3]>, K4>,
|
|
189
|
+
k5: Part<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>, K5>,
|
|
190
|
+
setter: StoreSetter<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5], [K5, K4, K3, K2, K1]>
|
|
191
|
+
): void;
|
|
192
|
+
<
|
|
193
|
+
K1 extends KeyOf<W<T>>,
|
|
194
|
+
K2 extends KeyOf<W<W<T>[K1]>>,
|
|
195
|
+
K3 extends KeyOf<W<W<W<T>[K1]>[K2]>>,
|
|
196
|
+
K4 extends MutableKeyOf<W<W<W<W<T>[K1]>[K2]>[K3]>>
|
|
197
|
+
>(
|
|
198
|
+
k1: Part<W<T>, K1>,
|
|
199
|
+
k2: Part<W<W<T>[K1]>, K2>,
|
|
200
|
+
k3: Part<W<W<W<T>[K1]>[K2]>, K3>,
|
|
201
|
+
k4: Part<W<W<W<W<T>[K1]>[K2]>[K3]>, K4>,
|
|
202
|
+
setter: StoreSetter<W<W<W<W<T>[K1]>[K2]>[K3]>[K4], [K4, K3, K2, K1]>
|
|
203
|
+
): void;
|
|
204
|
+
<
|
|
205
|
+
K1 extends KeyOf<W<T>>,
|
|
206
|
+
K2 extends KeyOf<W<W<T>[K1]>>,
|
|
207
|
+
K3 extends MutableKeyOf<W<W<W<T>[K1]>[K2]>>
|
|
208
|
+
>(
|
|
209
|
+
k1: Part<W<T>, K1>,
|
|
210
|
+
k2: Part<W<W<T>[K1]>, K2>,
|
|
211
|
+
k3: Part<W<W<W<T>[K1]>[K2]>, K3>,
|
|
212
|
+
setter: StoreSetter<W<W<W<T>[K1]>[K2]>[K3], [K3, K2, K1]>
|
|
213
|
+
): void;
|
|
214
|
+
<K1 extends KeyOf<W<T>>, K2 extends MutableKeyOf<W<W<T>[K1]>>>(
|
|
215
|
+
k1: Part<W<T>, K1>,
|
|
216
|
+
k2: Part<W<W<T>[K1]>, K2>,
|
|
217
|
+
setter: StoreSetter<W<W<T>[K1]>[K2], [K2, K1]>
|
|
218
|
+
): void;
|
|
219
|
+
<K1 extends MutableKeyOf<W<T>>>(k1: Part<W<T>, K1>, setter: StoreSetter<W<T>[K1], [K1]>): void;
|
|
220
|
+
(setter: StoreSetter<T, []>): void;
|
|
221
|
+
<
|
|
222
|
+
K1 extends KeyOf<W<T>>,
|
|
223
|
+
K2 extends KeyOf<W<W<T>[K1]>>,
|
|
224
|
+
K3 extends KeyOf<W<W<W<T>[K1]>[K2]>>,
|
|
225
|
+
K4 extends KeyOf<W<W<W<W<T>[K1]>[K2]>[K3]>>,
|
|
226
|
+
K5 extends KeyOf<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>>,
|
|
227
|
+
K6 extends KeyOf<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>>,
|
|
228
|
+
K7 extends KeyOf<W<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6]>>
|
|
229
|
+
>(
|
|
230
|
+
k1: Part<W<T>, K1>,
|
|
231
|
+
k2: Part<W<W<T>[K1]>, K2>,
|
|
232
|
+
k3: Part<W<W<W<T>[K1]>[K2]>, K3>,
|
|
233
|
+
k4: Part<W<W<W<W<T>[K1]>[K2]>[K3]>, K4>,
|
|
234
|
+
k5: Part<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>, K5>,
|
|
235
|
+
k6: Part<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>, K6>,
|
|
236
|
+
k7: Part<W<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6]>, K7>,
|
|
237
|
+
...rest: Rest<W<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6]>[K7], [K7, K6, K5, K4, K3, K2, K1]>
|
|
238
|
+
): void;
|
|
95
239
|
}
|
|
96
240
|
/**
|
|
97
241
|
* creates a reactive store that can be read through a proxy object and written with a setter function
|
|
98
242
|
*
|
|
99
243
|
* @description https://www.solidjs.com/docs/latest/api#createstore
|
|
100
244
|
*/
|
|
101
|
-
export declare function createStore<T extends object = {}>(
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
245
|
+
export declare function createStore<T extends object = {}>(
|
|
246
|
+
...[store, options]: {} extends T
|
|
247
|
+
? [
|
|
248
|
+
store?: T | Store<T>,
|
|
249
|
+
options?: {
|
|
250
|
+
name?: string;
|
|
251
|
+
}
|
|
252
|
+
]
|
|
253
|
+
: [
|
|
254
|
+
store: T | Store<T>,
|
|
255
|
+
options?: {
|
|
256
|
+
name?: string;
|
|
257
|
+
}
|
|
258
|
+
]
|
|
259
|
+
): [get: Store<T>, set: SetStoreFunction<T>];
|
|
106
260
|
export {};
|
package/types/index.d.ts
CHANGED
|
@@ -1,5 +1,63 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
1
|
+
export {
|
|
2
|
+
$DEVCOMP,
|
|
3
|
+
$PROXY,
|
|
4
|
+
$TRACK,
|
|
5
|
+
batch,
|
|
6
|
+
children,
|
|
7
|
+
createComputed,
|
|
8
|
+
createContext,
|
|
9
|
+
createDeferred,
|
|
10
|
+
createEffect,
|
|
11
|
+
createMemo,
|
|
12
|
+
createReaction,
|
|
13
|
+
createRenderEffect,
|
|
14
|
+
createResource,
|
|
15
|
+
createRoot,
|
|
16
|
+
createSelector,
|
|
17
|
+
createSignal,
|
|
18
|
+
enableExternalSource,
|
|
19
|
+
enableScheduling,
|
|
20
|
+
equalFn,
|
|
21
|
+
getListener,
|
|
22
|
+
getOwner,
|
|
23
|
+
on,
|
|
24
|
+
onCleanup,
|
|
25
|
+
onError,
|
|
26
|
+
catchError,
|
|
27
|
+
onMount,
|
|
28
|
+
runWithOwner,
|
|
29
|
+
startTransition,
|
|
30
|
+
untrack,
|
|
31
|
+
useContext,
|
|
32
|
+
useTransition
|
|
33
|
+
} from "./reactive/signal.js";
|
|
34
|
+
export type {
|
|
35
|
+
Accessor,
|
|
36
|
+
AccessorArray,
|
|
37
|
+
ChildrenReturn,
|
|
38
|
+
Context,
|
|
39
|
+
EffectFunction,
|
|
40
|
+
EffectOptions,
|
|
41
|
+
InitializedResource,
|
|
42
|
+
InitializedResourceOptions,
|
|
43
|
+
InitializedResourceReturn,
|
|
44
|
+
MemoOptions,
|
|
45
|
+
NoInfer,
|
|
46
|
+
OnEffectFunction,
|
|
47
|
+
OnOptions,
|
|
48
|
+
Owner,
|
|
49
|
+
Resource,
|
|
50
|
+
ResourceActions,
|
|
51
|
+
ResourceFetcher,
|
|
52
|
+
ResourceFetcherInfo,
|
|
53
|
+
ResourceOptions,
|
|
54
|
+
ResourceReturn,
|
|
55
|
+
ResourceSource,
|
|
56
|
+
ReturnTypes,
|
|
57
|
+
Setter,
|
|
58
|
+
Signal,
|
|
59
|
+
SignalOptions
|
|
60
|
+
} from "./reactive/signal.js";
|
|
3
61
|
export * from "./reactive/observable.js";
|
|
4
62
|
export * from "./reactive/scheduler.js";
|
|
5
63
|
export * from "./reactive/array.js";
|
|
@@ -8,14 +66,16 @@ import type { JSX } from "./jsx.js";
|
|
|
8
66
|
type JSXElement = JSX.Element;
|
|
9
67
|
export type { JSXElement, JSX };
|
|
10
68
|
import { registerGraph, writeSignal } from "./reactive/signal.js";
|
|
11
|
-
export declare const DEV:
|
|
12
|
-
|
|
69
|
+
export declare const DEV:
|
|
70
|
+
| {
|
|
71
|
+
readonly hooks: {
|
|
13
72
|
afterUpdate: (() => void) | null;
|
|
14
73
|
afterCreateOwner: ((owner: import("./reactive/signal.js").Owner) => void) | null;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
74
|
+
};
|
|
75
|
+
readonly writeSignal: typeof writeSignal;
|
|
76
|
+
readonly registerGraph: typeof registerGraph;
|
|
77
|
+
}
|
|
78
|
+
| undefined;
|
|
19
79
|
declare global {
|
|
20
|
-
|
|
80
|
+
var Solid$$: boolean;
|
|
21
81
|
}
|
package/types/jsx.d.ts
CHANGED
|
@@ -266,7 +266,8 @@ export namespace JSX {
|
|
|
266
266
|
onProgress?: EventHandlerUnion<T, Event>;
|
|
267
267
|
onRateChange?: EventHandlerUnion<T, Event>;
|
|
268
268
|
onReset?: EventHandlerUnion<T, Event>;
|
|
269
|
-
onScroll?: EventHandlerUnion<T,
|
|
269
|
+
onScroll?: EventHandlerUnion<T, Event>;
|
|
270
|
+
onScrollEnd?: EventHandlerUnion<T, Event>;
|
|
270
271
|
onSeeked?: EventHandlerUnion<T, Event>;
|
|
271
272
|
onSeeking?: EventHandlerUnion<T, Event>;
|
|
272
273
|
onSelect?: EventHandlerUnion<T, UIEvent>;
|
|
@@ -352,7 +353,8 @@ export namespace JSX {
|
|
|
352
353
|
onprogress?: EventHandlerUnion<T, Event>;
|
|
353
354
|
onratechange?: EventHandlerUnion<T, Event>;
|
|
354
355
|
onreset?: EventHandlerUnion<T, Event>;
|
|
355
|
-
onscroll?: EventHandlerUnion<T,
|
|
356
|
+
onscroll?: EventHandlerUnion<T, Event>;
|
|
357
|
+
onscrollend?: EventHandlerUnion<T, Event>;
|
|
356
358
|
onseeked?: EventHandlerUnion<T, Event>;
|
|
357
359
|
onseeking?: EventHandlerUnion<T, Event>;
|
|
358
360
|
onselect?: EventHandlerUnion<T, UIEvent>;
|
|
@@ -839,7 +841,7 @@ export namespace JSX {
|
|
|
839
841
|
name?: string;
|
|
840
842
|
}
|
|
841
843
|
interface FormHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
842
|
-
|
|
844
|
+
"accept-charset"?: string;
|
|
843
845
|
action?: string;
|
|
844
846
|
autocomplete?: string;
|
|
845
847
|
encoding?: HTMLFormEncType;
|
|
@@ -848,7 +850,6 @@ export namespace JSX {
|
|
|
848
850
|
name?: string;
|
|
849
851
|
novalidate?: boolean;
|
|
850
852
|
target?: string;
|
|
851
|
-
acceptCharset?: string;
|
|
852
853
|
noValidate?: boolean;
|
|
853
854
|
}
|
|
854
855
|
interface IframeHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
@@ -956,8 +957,11 @@ export namespace JSX {
|
|
|
956
957
|
as?: HTMLLinkAs;
|
|
957
958
|
crossorigin?: HTMLCrossorigin;
|
|
958
959
|
disabled?: boolean;
|
|
960
|
+
fetchpriority?: "high" | "low" | "auto";
|
|
959
961
|
href?: string;
|
|
960
962
|
hreflang?: string;
|
|
963
|
+
imagesizes?: string;
|
|
964
|
+
imagesrcset?: string;
|
|
961
965
|
integrity?: string;
|
|
962
966
|
media?: string;
|
|
963
967
|
referrerpolicy?: HTMLReferrerPolicy;
|
|
@@ -989,9 +993,8 @@ export namespace JSX {
|
|
|
989
993
|
interface MetaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
990
994
|
charset?: string;
|
|
991
995
|
content?: string;
|
|
992
|
-
|
|
996
|
+
"http-equiv"?: string;
|
|
993
997
|
name?: string;
|
|
994
|
-
httpEquiv?: string;
|
|
995
998
|
}
|
|
996
999
|
interface MeterHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
997
1000
|
form?: string;
|
|
@@ -1101,6 +1104,7 @@ export namespace JSX {
|
|
|
1101
1104
|
cols?: number | string;
|
|
1102
1105
|
dirname?: string;
|
|
1103
1106
|
disabled?: boolean;
|
|
1107
|
+
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send";
|
|
1104
1108
|
form?: string;
|
|
1105
1109
|
maxlength?: number | string;
|
|
1106
1110
|
minlength?: number | string;
|
|
@@ -29,9 +29,13 @@ SOFTWARE.
|
|
|
29
29
|
*
|
|
30
30
|
* @description https://www.solidjs.com/docs/latest/api#maparray
|
|
31
31
|
*/
|
|
32
|
-
export declare function mapArray<T, U>(
|
|
32
|
+
export declare function mapArray<T, U>(
|
|
33
|
+
list: Accessor<readonly T[] | undefined | null | false>,
|
|
34
|
+
mapFn: (v: T, i: Accessor<number>) => U,
|
|
35
|
+
options?: {
|
|
33
36
|
fallback?: Accessor<any>;
|
|
34
|
-
}
|
|
37
|
+
}
|
|
38
|
+
): () => U[];
|
|
35
39
|
/**
|
|
36
40
|
* reactively maps arrays by index instead of value - underlying helper for the `<Index>` control flow
|
|
37
41
|
*
|
|
@@ -39,6 +43,10 @@ export declare function mapArray<T, U>(list: Accessor<readonly T[] | undefined |
|
|
|
39
43
|
*
|
|
40
44
|
* @description https://www.solidjs.com/docs/latest/api#indexarray
|
|
41
45
|
*/
|
|
42
|
-
export declare function indexArray<T, U>(
|
|
46
|
+
export declare function indexArray<T, U>(
|
|
47
|
+
list: Accessor<readonly T[] | undefined | null | false>,
|
|
48
|
+
mapFn: (v: Accessor<T>, i: number) => U,
|
|
49
|
+
options?: {
|
|
43
50
|
fallback?: Accessor<any>;
|
|
44
|
-
}
|
|
51
|
+
}
|
|
52
|
+
): () => U[];
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { Accessor, Setter } from "./signal.js";
|
|
2
2
|
declare global {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
interface SymbolConstructor {
|
|
4
|
+
readonly observable: symbol;
|
|
5
|
+
}
|
|
6
6
|
}
|
|
7
7
|
interface Observable<T> {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
subscribe(observer: ObservableObserver<T>): {
|
|
9
|
+
unsubscribe(): void;
|
|
10
|
+
};
|
|
11
|
+
[Symbol.observable](): Observable<T>;
|
|
12
12
|
}
|
|
13
|
-
export type ObservableObserver<T> =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
export type ObservableObserver<T> =
|
|
14
|
+
| ((v: T) => void)
|
|
15
|
+
| {
|
|
16
|
+
next?: (v: T) => void;
|
|
17
|
+
error?: (v: any) => void;
|
|
18
|
+
complete?: (v: boolean) => void;
|
|
19
|
+
};
|
|
18
20
|
/**
|
|
19
21
|
* creates a simple observable from a signal's accessor to be used with the `from` operator of observable libraries like e.g. rxjs
|
|
20
22
|
* ```typescript
|
|
@@ -26,9 +28,15 @@ export type ObservableObserver<T> = ((v: T) => void) | {
|
|
|
26
28
|
* description https://www.solidjs.com/docs/latest/api#observable
|
|
27
29
|
*/
|
|
28
30
|
export declare function observable<T>(input: Accessor<T>): Observable<T>;
|
|
29
|
-
export declare function from<T>(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
export declare function from<T>(
|
|
32
|
+
producer:
|
|
33
|
+
| ((setter: Setter<T | undefined>) => () => void)
|
|
34
|
+
| {
|
|
35
|
+
subscribe: (fn: (v: T) => void) =>
|
|
36
|
+
| (() => void)
|
|
37
|
+
| {
|
|
38
|
+
unsubscribe: () => void;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
): Accessor<T | undefined>;
|
|
34
42
|
export {};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
export interface Task {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
id: number;
|
|
3
|
+
fn: ((didTimeout: boolean) => void) | null;
|
|
4
|
+
startTime: number;
|
|
5
|
+
expirationTime: number;
|
|
6
6
|
}
|
|
7
|
-
export declare function requestCallback(
|
|
7
|
+
export declare function requestCallback(
|
|
8
|
+
fn: () => void,
|
|
9
|
+
options?: {
|
|
8
10
|
timeout: number;
|
|
9
|
-
}
|
|
11
|
+
}
|
|
12
|
+
): Task;
|
|
10
13
|
export declare function cancelCallback(task: Task): void;
|