solid-js 1.8.0-beta.1 → 1.8.0-beta.2

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.
Files changed (45) hide show
  1. package/dist/dev.js +297 -532
  2. package/dist/server.js +74 -168
  3. package/dist/solid.js +255 -459
  4. package/h/dist/h.js +8 -34
  5. package/h/jsx-runtime/dist/jsx.js +1 -1
  6. package/h/jsx-runtime/types/index.d.ts +8 -11
  7. package/h/jsx-runtime/types/jsx.d.ts +19 -5
  8. package/h/types/hyperscript.d.ts +11 -11
  9. package/html/dist/html.js +94 -216
  10. package/html/types/lit.d.ts +31 -45
  11. package/package.json +1 -1
  12. package/store/dist/dev.js +42 -114
  13. package/store/dist/server.js +8 -19
  14. package/store/dist/store.js +39 -105
  15. package/store/types/index.d.ts +7 -21
  16. package/store/types/modifiers.d.ts +3 -6
  17. package/store/types/mutable.d.ts +2 -5
  18. package/store/types/server.d.ts +4 -12
  19. package/store/types/store.d.ts +61 -218
  20. package/types/index.d.ts +9 -72
  21. package/types/jsx.d.ts +19 -5
  22. package/types/reactive/array.d.ts +4 -12
  23. package/types/reactive/observable.d.ts +17 -25
  24. package/types/reactive/scheduler.d.ts +6 -9
  25. package/types/reactive/signal.d.ts +140 -228
  26. package/types/render/Suspense.d.ts +5 -5
  27. package/types/render/component.d.ts +31 -62
  28. package/types/render/flow.d.ts +31 -43
  29. package/types/render/hydration.d.ts +13 -13
  30. package/types/server/index.d.ts +2 -56
  31. package/types/server/reactive.d.ts +40 -67
  32. package/types/server/rendering.d.ts +95 -166
  33. package/universal/dist/dev.js +12 -28
  34. package/universal/dist/universal.js +12 -28
  35. package/universal/types/index.d.ts +1 -3
  36. package/universal/types/universal.d.ts +1 -0
  37. package/web/dist/dev.cjs +11 -4
  38. package/web/dist/dev.js +89 -614
  39. package/web/dist/server.js +92 -175
  40. package/web/dist/web.cjs +11 -4
  41. package/web/dist/web.js +89 -614
  42. package/web/types/client.d.ts +3 -3
  43. package/web/types/core.d.ts +1 -10
  44. package/web/types/index.d.ts +10 -27
  45. package/web/types/server-mock.d.ts +32 -47
@@ -1,26 +1,12 @@
1
1
  export { $RAW, createStore, unwrap } from "./store.js";
2
- export type {
3
- ArrayFilterFn,
4
- DeepMutable,
5
- DeepReadonly,
6
- NotWrappable,
7
- Part,
8
- SetStoreFunction,
9
- SolidStore,
10
- Store,
11
- StoreNode,
12
- StorePathRange,
13
- StoreSetter
14
- } from "./store.js";
2
+ export type { ArrayFilterFn, DeepMutable, DeepReadonly, NotWrappable, Part, SetStoreFunction, SolidStore, Store, StoreNode, StorePathRange, StoreSetter } from "./store.js";
15
3
  export * from "./mutable.js";
16
4
  export * from "./modifiers.js";
17
5
  import { $NODE, isWrappable } from "./store.js";
18
- export declare const DEV:
19
- | {
20
- readonly $NODE: typeof $NODE;
21
- readonly isWrappable: typeof isWrappable;
22
- readonly hooks: {
6
+ export declare const DEV: {
7
+ readonly $NODE: typeof $NODE;
8
+ readonly isWrappable: typeof isWrappable;
9
+ readonly hooks: {
23
10
  onStoreNodeUpdate: import("./store.js").OnStoreNodeUpdate | null;
24
- };
25
- }
26
- | undefined;
11
+ };
12
+ } | undefined;
@@ -1,9 +1,6 @@
1
1
  export type ReconcileOptions = {
2
- key?: string | null;
3
- merge?: boolean;
2
+ key?: string | null;
3
+ merge?: boolean;
4
4
  };
5
- export declare function reconcile<T extends U, U>(
6
- value: T,
7
- options?: ReconcileOptions
8
- ): (state: U) => T;
5
+ export declare function reconcile<T extends U, U>(value: T, options?: ReconcileOptions): (state: U) => T;
9
6
  export declare function produce<T>(fn: (state: T) => void): (state: T) => T;
@@ -1,8 +1,5 @@
1
1
  import { StoreNode } from "./store.js";
2
- export declare function createMutable<T extends StoreNode>(
3
- state: T,
4
- options?: {
2
+ export declare function createMutable<T extends StoreNode>(state: T, options?: {
5
3
  name?: string;
6
- }
7
- ): T;
4
+ }): T;
8
5
  export declare function modifyMutable<T>(state: T, modifier: (state: T) => T): void;
@@ -2,23 +2,15 @@ import type { SetStoreFunction, Store } from "./store.js";
2
2
  export declare const $RAW: unique symbol;
3
3
  export declare function isWrappable(obj: any): boolean;
4
4
  export declare function unwrap<T>(item: T): T;
5
- export declare function setProperty(
6
- state: any,
7
- property: PropertyKey,
8
- value: any,
9
- force?: boolean
10
- ): void;
5
+ export declare function setProperty(state: any, property: PropertyKey, value: any, force?: boolean): void;
11
6
  export declare function updatePath(current: any, path: any[], traversed?: PropertyKey[]): void;
12
7
  export declare function createStore<T>(state: T | Store<T>): [Store<T>, SetStoreFunction<T>];
13
8
  export declare function createMutable<T>(state: T | Store<T>): T;
14
9
  type ReconcileOptions = {
15
- key?: string | null;
16
- merge?: boolean;
10
+ key?: string | null;
11
+ merge?: boolean;
17
12
  };
18
- export declare function reconcile<T extends U, U extends object>(
19
- value: T,
20
- options?: ReconcileOptions
21
- ): (state: U) => T;
13
+ export declare function reconcile<T extends U, U extends object>(value: T, options?: ReconcileOptions): (state: U) => T;
22
14
  export declare function produce<T>(fn: (state: T) => void): (state: T) => T;
23
15
  export declare const DEV: undefined;
24
16
  export {};
@@ -1,38 +1,22 @@
1
- export declare const $RAW: unique symbol,
2
- $NODE: unique symbol,
3
- $HAS: unique symbol,
4
- $SELF: unique symbol;
1
+ export declare const $RAW: unique symbol, $NODE: unique symbol, $HAS: unique symbol, $SELF: unique symbol;
5
2
  export declare const DevHooks: {
6
- onStoreNodeUpdate: OnStoreNodeUpdate | null;
3
+ onStoreNodeUpdate: OnStoreNodeUpdate | null;
7
4
  };
8
5
  type DataNode = {
9
- (): any;
10
- $(value?: any): void;
6
+ (): any;
7
+ $(value?: any): void;
11
8
  };
12
9
  type DataNodes = Record<PropertyKey, DataNode | undefined>;
13
- export type OnStoreNodeUpdate = (
14
- state: StoreNode,
15
- property: PropertyKey,
16
- value: StoreNode | NotWrappable,
17
- prev: StoreNode | NotWrappable
18
- ) => void;
10
+ export type OnStoreNodeUpdate = (state: StoreNode, property: PropertyKey, value: StoreNode | NotWrappable, prev: StoreNode | NotWrappable) => void;
19
11
  export interface StoreNode {
20
- [$NODE]?: DataNodes;
21
- [key: PropertyKey]: any;
12
+ [$NODE]?: DataNodes;
13
+ [key: PropertyKey]: any;
22
14
  }
23
15
  export declare namespace SolidStore {
24
- interface Unwrappable {}
16
+ interface Unwrappable {
17
+ }
25
18
  }
26
- export type NotWrappable =
27
- | string
28
- | number
29
- | bigint
30
- | symbol
31
- | boolean
32
- | Function
33
- | null
34
- | undefined
35
- | SolidStore.Unwrappable[keyof SolidStore.Unwrappable];
19
+ export type NotWrappable = string | number | bigint | symbol | boolean | Function | null | undefined | SolidStore.Unwrappable[keyof SolidStore.Unwrappable];
36
20
  export type Store<T> = T;
37
21
  export declare function isWrappable<T>(obj: T | NotWrappable): obj is T;
38
22
  /**
@@ -49,215 +33,74 @@ export declare function isWrappable<T>(obj: T | NotWrappable): obj is T;
49
33
  export declare function unwrap<T>(item: T, set?: Set<unknown>): T;
50
34
  export declare function getNodes(target: StoreNode, symbol: typeof $NODE | typeof $HAS): DataNodes;
51
35
  export declare function getNode(nodes: DataNodes, property: PropertyKey, value?: any): DataNode;
52
- export declare function proxyDescriptor(
53
- target: StoreNode,
54
- property: PropertyKey
55
- ): TypedPropertyDescriptor<any> | undefined;
36
+ export declare function proxyDescriptor(target: StoreNode, property: PropertyKey): TypedPropertyDescriptor<any> | undefined;
56
37
  export declare function trackSelf(target: StoreNode): void;
57
38
  export declare function ownKeys(target: StoreNode): (string | symbol)[];
58
- export declare function setProperty(
59
- state: StoreNode,
60
- property: PropertyKey,
61
- value: any,
62
- deleting?: boolean
63
- ): void;
64
- export declare function updatePath(
65
- current: StoreNode,
66
- path: any[],
67
- traversed?: PropertyKey[]
68
- ): void;
39
+ export declare function setProperty(state: StoreNode, property: PropertyKey, value: any, deleting?: boolean): void;
40
+ export declare function updatePath(current: StoreNode, path: any[], traversed?: PropertyKey[]): void;
69
41
  /** @deprecated */
70
- export type DeepReadonly<T> = 0 extends 1 & T
71
- ? T
72
- : T extends NotWrappable
73
- ? T
74
- : {
75
- readonly [K in keyof T]: DeepReadonly<T[K]>;
76
- };
42
+ export type DeepReadonly<T> = 0 extends 1 & T ? T : T extends NotWrappable ? T : {
43
+ readonly [K in keyof T]: DeepReadonly<T[K]>;
44
+ };
77
45
  /** @deprecated */
78
- export type DeepMutable<T> = 0 extends 1 & T
79
- ? T
80
- : T extends NotWrappable
81
- ? T
82
- : {
83
- -readonly [K in keyof T]: DeepMutable<T[K]>;
84
- };
85
- export type CustomPartial<T> = T extends readonly unknown[]
86
- ? "0" extends keyof T
87
- ? {
88
- [K in Extract<keyof T, `${number}`>]?: T[K];
89
- }
90
- : {
91
- [x: number]: T[number];
92
- }
93
- : Partial<T>;
46
+ export type DeepMutable<T> = 0 extends 1 & T ? T : T extends NotWrappable ? T : {
47
+ -readonly [K in keyof T]: DeepMutable<T[K]>;
48
+ };
49
+ export type CustomPartial<T> = T extends readonly unknown[] ? "0" extends keyof T ? {
50
+ [K in Extract<keyof T, `${number}`>]?: T[K];
51
+ } : {
52
+ [x: number]: T[number];
53
+ } : Partial<T>;
94
54
  export type PickMutable<T> = {
95
- [K in keyof T as (<U>() => U extends {
96
- [V in K]: T[V];
97
- }
98
- ? 1
99
- : 2) extends <U>() => U extends {
100
- -readonly [V in K]: T[V];
101
- }
102
- ? 1
103
- : 2
104
- ? K
105
- : never]: T[K];
55
+ [K in keyof T as (<U>() => U extends {
56
+ [V in K]: T[V];
57
+ } ? 1 : 2) extends <U>() => U extends {
58
+ -readonly [V in K]: T[V];
59
+ } ? 1 : 2 ? K : never]: T[K];
106
60
  };
107
61
  export type StorePathRange = {
108
- from?: number;
109
- to?: number;
110
- by?: number;
62
+ from?: number;
63
+ to?: number;
64
+ by?: number;
111
65
  };
112
66
  export type ArrayFilterFn<T> = (item: T, index: number) => boolean;
113
- export type StoreSetter<T, U extends PropertyKey[] = []> =
114
- | T
115
- | CustomPartial<T>
116
- | ((prevState: T, traversed: U) => T | CustomPartial<T>);
117
- export type Part<T, K extends KeyOf<T> = KeyOf<T>> =
118
- | K
119
- | ([K] extends [never] ? never : readonly K[])
120
- | ([T] extends [readonly unknown[]] ? ArrayFilterFn<T[number]> | StorePathRange : never);
67
+ export type StoreSetter<T, U extends PropertyKey[] = []> = T | CustomPartial<T> | ((prevState: T, traversed: U) => T | CustomPartial<T>);
68
+ export type Part<T, K extends KeyOf<T> = KeyOf<T>> = K | ([K] extends [never] ? never : readonly K[]) | ([T] extends [readonly unknown[]] ? ArrayFilterFn<T[number]> | StorePathRange : never);
121
69
  type W<T> = Exclude<T, NotWrappable>;
122
- type KeyOf<T> = number extends keyof T
123
- ? 0 extends 1 & T
124
- ? keyof T
125
- : [T] extends [never]
126
- ? never
127
- : [T] extends [readonly unknown[]]
128
- ? number
129
- : keyof T
130
- : keyof T;
70
+ type KeyOf<T> = number extends keyof T ? 0 extends 1 & T ? keyof T : [T] extends [never] ? never : [
71
+ T
72
+ ] extends [readonly unknown[]] ? number : keyof T : keyof T;
131
73
  type MutableKeyOf<T> = KeyOf<T> & keyof PickMutable<T>;
132
- type Rest<T, U extends PropertyKey[], K extends KeyOf<T> = KeyOf<T>> = [T] extends [never]
133
- ? never
134
- : K extends MutableKeyOf<T>
135
- ? [Part<T, K>, ...RestSetterOrContinue<T[K], [K, ...U]>]
136
- : K extends KeyOf<T>
137
- ? [Part<T, K>, ...RestContinue<T[K], [K, ...U]>]
138
- : never;
139
- type RestContinue<T, U extends PropertyKey[]> = 0 extends 1 & T
140
- ? [...Part<any>[], StoreSetter<any, PropertyKey[]>]
141
- : Rest<W<T>, U>;
74
+ type Rest<T, U extends PropertyKey[], K extends KeyOf<T> = KeyOf<T>> = [T] extends [never] ? never : K extends MutableKeyOf<T> ? [Part<T, K>, ...RestSetterOrContinue<T[K], [K, ...U]>] : K extends KeyOf<T> ? [Part<T, K>, ...RestContinue<T[K], [K, ...U]>] : never;
75
+ type RestContinue<T, U extends PropertyKey[]> = 0 extends 1 & T ? [...Part<any>[], StoreSetter<any, PropertyKey[]>] : Rest<W<T>, U>;
142
76
  type RestSetterOrContinue<T, U extends PropertyKey[]> = [StoreSetter<T, U>] | RestContinue<T, U>;
143
77
  export interface SetStoreFunction<T> {
144
- <
145
- K1 extends KeyOf<W<T>>,
146
- K2 extends KeyOf<W<W<T>[K1]>>,
147
- K3 extends KeyOf<W<W<W<T>[K1]>[K2]>>,
148
- K4 extends KeyOf<W<W<W<W<T>[K1]>[K2]>[K3]>>,
149
- K5 extends KeyOf<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>>,
150
- K6 extends KeyOf<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>>,
151
- K7 extends MutableKeyOf<W<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6]>>
152
- >(
153
- k1: Part<W<T>, K1>,
154
- k2: Part<W<W<T>[K1]>, K2>,
155
- k3: Part<W<W<W<T>[K1]>[K2]>, K3>,
156
- k4: Part<W<W<W<W<T>[K1]>[K2]>[K3]>, K4>,
157
- k5: Part<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>, K5>,
158
- k6: Part<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>, K6>,
159
- k7: Part<W<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6]>, K7>,
160
- setter: StoreSetter<
161
- W<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6]>[K7],
162
- [K7, K6, K5, K4, K3, K2, K1]
163
- >
164
- ): void;
165
- <
166
- K1 extends KeyOf<W<T>>,
167
- K2 extends KeyOf<W<W<T>[K1]>>,
168
- K3 extends KeyOf<W<W<W<T>[K1]>[K2]>>,
169
- K4 extends KeyOf<W<W<W<W<T>[K1]>[K2]>[K3]>>,
170
- K5 extends KeyOf<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>>,
171
- K6 extends MutableKeyOf<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>>
172
- >(
173
- k1: Part<W<T>, K1>,
174
- k2: Part<W<W<T>[K1]>, K2>,
175
- k3: Part<W<W<W<T>[K1]>[K2]>, K3>,
176
- k4: Part<W<W<W<W<T>[K1]>[K2]>[K3]>, K4>,
177
- k5: Part<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>, K5>,
178
- k6: Part<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>, K6>,
179
- setter: StoreSetter<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6], [K6, K5, K4, K3, K2, K1]>
180
- ): void;
181
- <
182
- K1 extends KeyOf<W<T>>,
183
- K2 extends KeyOf<W<W<T>[K1]>>,
184
- K3 extends KeyOf<W<W<W<T>[K1]>[K2]>>,
185
- K4 extends KeyOf<W<W<W<W<T>[K1]>[K2]>[K3]>>,
186
- K5 extends MutableKeyOf<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>>
187
- >(
188
- k1: Part<W<T>, K1>,
189
- k2: Part<W<W<T>[K1]>, K2>,
190
- k3: Part<W<W<W<T>[K1]>[K2]>, K3>,
191
- k4: Part<W<W<W<W<T>[K1]>[K2]>[K3]>, K4>,
192
- k5: Part<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>, K5>,
193
- setter: StoreSetter<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5], [K5, K4, K3, K2, K1]>
194
- ): void;
195
- <
196
- K1 extends KeyOf<W<T>>,
197
- K2 extends KeyOf<W<W<T>[K1]>>,
198
- K3 extends KeyOf<W<W<W<T>[K1]>[K2]>>,
199
- K4 extends MutableKeyOf<W<W<W<W<T>[K1]>[K2]>[K3]>>
200
- >(
201
- k1: Part<W<T>, K1>,
202
- k2: Part<W<W<T>[K1]>, K2>,
203
- k3: Part<W<W<W<T>[K1]>[K2]>, K3>,
204
- k4: Part<W<W<W<W<T>[K1]>[K2]>[K3]>, K4>,
205
- setter: StoreSetter<W<W<W<W<T>[K1]>[K2]>[K3]>[K4], [K4, K3, K2, K1]>
206
- ): void;
207
- <
208
- K1 extends KeyOf<W<T>>,
209
- K2 extends KeyOf<W<W<T>[K1]>>,
210
- K3 extends MutableKeyOf<W<W<W<T>[K1]>[K2]>>
211
- >(
212
- k1: Part<W<T>, K1>,
213
- k2: Part<W<W<T>[K1]>, K2>,
214
- k3: Part<W<W<W<T>[K1]>[K2]>, K3>,
215
- setter: StoreSetter<W<W<W<T>[K1]>[K2]>[K3], [K3, K2, K1]>
216
- ): void;
217
- <K1 extends KeyOf<W<T>>, K2 extends MutableKeyOf<W<W<T>[K1]>>>(
218
- k1: Part<W<T>, K1>,
219
- k2: Part<W<W<T>[K1]>, K2>,
220
- setter: StoreSetter<W<W<T>[K1]>[K2], [K2, K1]>
221
- ): void;
222
- <K1 extends MutableKeyOf<W<T>>>(k1: Part<W<T>, K1>, setter: StoreSetter<W<T>[K1], [K1]>): void;
223
- (setter: StoreSetter<T, []>): void;
224
- <
225
- K1 extends KeyOf<W<T>>,
226
- K2 extends KeyOf<W<W<T>[K1]>>,
227
- K3 extends KeyOf<W<W<W<T>[K1]>[K2]>>,
228
- K4 extends KeyOf<W<W<W<W<T>[K1]>[K2]>[K3]>>,
229
- K5 extends KeyOf<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>>,
230
- K6 extends KeyOf<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>>,
231
- K7 extends KeyOf<W<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6]>>
232
- >(
233
- k1: Part<W<T>, K1>,
234
- k2: Part<W<W<T>[K1]>, K2>,
235
- k3: Part<W<W<W<T>[K1]>[K2]>, K3>,
236
- k4: Part<W<W<W<W<T>[K1]>[K2]>[K3]>, K4>,
237
- k5: Part<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>, K5>,
238
- k6: Part<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>, K6>,
239
- k7: Part<W<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6]>, K7>,
240
- ...rest: Rest<W<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6]>[K7], [K7, K6, K5, K4, K3, K2, K1]>
241
- ): void;
78
+ <K1 extends KeyOf<W<T>>, K2 extends KeyOf<W<W<T>[K1]>>, K3 extends KeyOf<W<W<W<T>[K1]>[K2]>>, K4 extends KeyOf<W<W<W<W<T>[K1]>[K2]>[K3]>>, K5 extends KeyOf<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>>, K6 extends KeyOf<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>>, K7 extends MutableKeyOf<W<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6]>>>(k1: Part<W<T>, K1>, k2: Part<W<W<T>[K1]>, K2>, k3: Part<W<W<W<T>[K1]>[K2]>, K3>, k4: Part<W<W<W<W<T>[K1]>[K2]>[K3]>, K4>, k5: Part<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>, K5>, k6: Part<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>, K6>, k7: Part<W<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6]>, K7>, setter: StoreSetter<W<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6]>[K7], [
79
+ K7,
80
+ K6,
81
+ K5,
82
+ K4,
83
+ K3,
84
+ K2,
85
+ K1
86
+ ]>): void;
87
+ <K1 extends KeyOf<W<T>>, K2 extends KeyOf<W<W<T>[K1]>>, K3 extends KeyOf<W<W<W<T>[K1]>[K2]>>, K4 extends KeyOf<W<W<W<W<T>[K1]>[K2]>[K3]>>, K5 extends KeyOf<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>>, K6 extends MutableKeyOf<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>>>(k1: Part<W<T>, K1>, k2: Part<W<W<T>[K1]>, K2>, k3: Part<W<W<W<T>[K1]>[K2]>, K3>, k4: Part<W<W<W<W<T>[K1]>[K2]>[K3]>, K4>, k5: Part<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>, K5>, k6: Part<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>, K6>, setter: StoreSetter<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6], [K6, K5, K4, K3, K2, K1]>): void;
88
+ <K1 extends KeyOf<W<T>>, K2 extends KeyOf<W<W<T>[K1]>>, K3 extends KeyOf<W<W<W<T>[K1]>[K2]>>, K4 extends KeyOf<W<W<W<W<T>[K1]>[K2]>[K3]>>, K5 extends MutableKeyOf<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>>>(k1: Part<W<T>, K1>, k2: Part<W<W<T>[K1]>, K2>, k3: Part<W<W<W<T>[K1]>[K2]>, K3>, k4: Part<W<W<W<W<T>[K1]>[K2]>[K3]>, K4>, k5: Part<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>, K5>, setter: StoreSetter<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5], [K5, K4, K3, K2, K1]>): void;
89
+ <K1 extends KeyOf<W<T>>, K2 extends KeyOf<W<W<T>[K1]>>, K3 extends KeyOf<W<W<W<T>[K1]>[K2]>>, K4 extends MutableKeyOf<W<W<W<W<T>[K1]>[K2]>[K3]>>>(k1: Part<W<T>, K1>, k2: Part<W<W<T>[K1]>, K2>, k3: Part<W<W<W<T>[K1]>[K2]>, K3>, k4: Part<W<W<W<W<T>[K1]>[K2]>[K3]>, K4>, setter: StoreSetter<W<W<W<W<T>[K1]>[K2]>[K3]>[K4], [K4, K3, K2, K1]>): void;
90
+ <K1 extends KeyOf<W<T>>, K2 extends KeyOf<W<W<T>[K1]>>, K3 extends MutableKeyOf<W<W<W<T>[K1]>[K2]>>>(k1: Part<W<T>, K1>, k2: Part<W<W<T>[K1]>, K2>, k3: Part<W<W<W<T>[K1]>[K2]>, K3>, setter: StoreSetter<W<W<W<T>[K1]>[K2]>[K3], [K3, K2, K1]>): void;
91
+ <K1 extends KeyOf<W<T>>, K2 extends MutableKeyOf<W<W<T>[K1]>>>(k1: Part<W<T>, K1>, k2: Part<W<W<T>[K1]>, K2>, setter: StoreSetter<W<W<T>[K1]>[K2], [K2, K1]>): void;
92
+ <K1 extends MutableKeyOf<W<T>>>(k1: Part<W<T>, K1>, setter: StoreSetter<W<T>[K1], [K1]>): void;
93
+ (setter: StoreSetter<T, []>): void;
94
+ <K1 extends KeyOf<W<T>>, K2 extends KeyOf<W<W<T>[K1]>>, K3 extends KeyOf<W<W<W<T>[K1]>[K2]>>, K4 extends KeyOf<W<W<W<W<T>[K1]>[K2]>[K3]>>, K5 extends KeyOf<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>>, K6 extends KeyOf<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>>, K7 extends KeyOf<W<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6]>>>(k1: Part<W<T>, K1>, k2: Part<W<W<T>[K1]>, K2>, k3: Part<W<W<W<T>[K1]>[K2]>, K3>, k4: Part<W<W<W<W<T>[K1]>[K2]>[K3]>, K4>, k5: Part<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>, K5>, k6: Part<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>, K6>, k7: Part<W<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6]>, K7>, ...rest: Rest<W<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6]>[K7], [K7, K6, K5, K4, K3, K2, K1]>): void;
242
95
  }
243
96
  /**
244
97
  * creates a reactive store that can be read through a proxy object and written with a setter function
245
98
  *
246
99
  * @description https://www.solidjs.com/docs/latest/api#createstore
247
100
  */
248
- export declare function createStore<T extends object = {}>(
249
- ...[store, options]: {} extends T
250
- ? [
251
- store?: T | Store<T>,
252
- options?: {
253
- name?: string;
254
- }
255
- ]
256
- : [
257
- store: T | Store<T>,
258
- options?: {
259
- name?: string;
260
- }
261
- ]
262
- ): [get: Store<T>, set: SetStoreFunction<T>];
101
+ export declare function createStore<T extends object = {}>(...[store, options]: {} extends T ? [store?: T | Store<T>, options?: {
102
+ name?: string;
103
+ }] : [store: T | Store<T>, options?: {
104
+ name?: string;
105
+ }]): [get: Store<T>, set: SetStoreFunction<T>];
263
106
  export {};
package/types/index.d.ts CHANGED
@@ -1,66 +1,5 @@
1
- export {
2
- $DEVCOMP,
3
- $PROXY,
4
- $TRACK,
5
- batch,
6
- catchError,
7
- children,
8
- createComputed,
9
- createContext,
10
- createDeferred,
11
- createEffect,
12
- createMemo,
13
- createReaction,
14
- createRenderEffect,
15
- createResource,
16
- createRoot,
17
- createSelector,
18
- createSignal,
19
- enableExternalSource,
20
- enableScheduling,
21
- equalFn,
22
- getListener,
23
- getOwner,
24
- on,
25
- onCleanup,
26
- onError,
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
- ContextProviderComponent,
40
- EffectFunction,
41
- EffectOptions,
42
- InitializedResource,
43
- InitializedResourceOptions,
44
- InitializedResourceReturn,
45
- MemoOptions,
46
- NoInfer,
47
- OnEffectFunction,
48
- OnOptions,
49
- Owner,
50
- ResolvedChildren,
51
- ResolvedJSXElement,
52
- Resource,
53
- ResourceActions,
54
- ResourceFetcher,
55
- ResourceFetcherInfo,
56
- ResourceOptions,
57
- ResourceReturn,
58
- ResourceSource,
59
- ReturnTypes,
60
- Setter,
61
- Signal,
62
- SignalOptions
63
- } from "./reactive/signal.js";
1
+ export { $DEVCOMP, $PROXY, $TRACK, batch, catchError, children, createComputed, createContext, createDeferred, createEffect, createMemo, createReaction, createRenderEffect, createResource, createRoot, createSelector, createSignal, enableExternalSource, enableScheduling, equalFn, getListener, getOwner, on, onCleanup, onError, onMount, runWithOwner, startTransition, untrack, useContext, useTransition } from "./reactive/signal.js";
2
+ export type { Accessor, AccessorArray, ChildrenReturn, Context, ContextProviderComponent, EffectFunction, EffectOptions, InitializedResource, InitializedResourceOptions, InitializedResourceReturn, MemoOptions, NoInfer, OnEffectFunction, OnOptions, Owner, ResolvedChildren, ResolvedJSXElement, Resource, ResourceActions, ResourceFetcher, ResourceFetcherInfo, ResourceOptions, ResourceReturn, ResourceSource, ReturnTypes, Setter, Signal, SignalOptions } from "./reactive/signal.js";
64
3
  export * from "./reactive/observable.js";
65
4
  export * from "./reactive/scheduler.js";
66
5
  export * from "./reactive/array.js";
@@ -69,16 +8,14 @@ import type { JSX } from "./jsx.js";
69
8
  type JSXElement = JSX.Element;
70
9
  export type { JSXElement, JSX };
71
10
  import { registerGraph, writeSignal } from "./reactive/signal.js";
72
- export declare const DEV:
73
- | {
74
- readonly hooks: {
11
+ export declare const DEV: {
12
+ readonly hooks: {
75
13
  afterUpdate: (() => void) | null;
76
14
  afterCreateOwner: ((owner: import("./reactive/signal.js").Owner) => void) | null;
77
- };
78
- readonly writeSignal: typeof writeSignal;
79
- readonly registerGraph: typeof registerGraph;
80
- }
81
- | undefined;
15
+ };
16
+ readonly writeSignal: typeof writeSignal;
17
+ readonly registerGraph: typeof registerGraph;
18
+ } | undefined;
82
19
  declare global {
83
- var Solid$$: boolean;
20
+ var Solid$$: boolean;
84
21
  }
package/types/jsx.d.ts CHANGED
@@ -710,7 +710,7 @@ export namespace JSX {
710
710
  // [key: ClassKeys]: boolean;
711
711
  accessKey?: string;
712
712
  class?: string | undefined;
713
- contenteditable?: boolean | "inherit";
713
+ contenteditable?: boolean | "plaintext-only" | "inherit";
714
714
  contextmenu?: string;
715
715
  dir?: HTMLDir;
716
716
  draggable?: boolean | "false" | "true";
@@ -742,7 +742,7 @@ export namespace JSX {
742
742
  part?: string;
743
743
  exportparts?: string;
744
744
  inputmode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search";
745
- contentEditable?: boolean | "inherit";
745
+ contentEditable?: boolean | "plaintext-only" | "inherit";
746
746
  contextMenu?: string;
747
747
  tabIndex?: number | string;
748
748
  autoCapitalize?: HTMLAutocapitalize;
@@ -1606,6 +1606,15 @@ export namespace JSX {
1606
1606
  azimuth?: number | string;
1607
1607
  elevation?: number | string;
1608
1608
  }
1609
+ interface FeDropShadowSVGAttributes<T>
1610
+ extends CoreSVGAttributes<T>,
1611
+ FilterPrimitiveElementSVGAttributes<T>,
1612
+ StylableSVGAttributes,
1613
+ Pick<PresentationSVGAttributes, "color" | "flood-color" | "flood-opacity"> {
1614
+ dx?: number | string;
1615
+ dy?: number | string;
1616
+ stdDeviation?: number | string;
1617
+ }
1609
1618
  interface FeFloodSVGAttributes<T>
1610
1619
  extends FilterPrimitiveElementSVGAttributes<T>,
1611
1620
  StylableSVGAttributes,
@@ -1780,6 +1789,7 @@ export namespace JSX {
1780
1789
  height?: number | string;
1781
1790
  }
1782
1791
  interface MetadataSVGAttributes<T> extends CoreSVGAttributes<T> {}
1792
+ interface MPathSVGAttributes<T> extends CoreSVGAttributes<T> {}
1783
1793
  interface PathSVGAttributes<T>
1784
1794
  extends GraphicsElementSVGAttributes<T>,
1785
1795
  ShapeElementSVGAttributes<T>,
@@ -1848,6 +1858,10 @@ export namespace JSX {
1848
1858
  rx?: number | string;
1849
1859
  ry?: number | string;
1850
1860
  }
1861
+ interface SetSVGAttributes<T>
1862
+ extends CoreSVGAttributes<T>,
1863
+ StylableSVGAttributes,
1864
+ AnimationTimingSVGAttributes {}
1851
1865
  interface StopSVGAttributes<T>
1852
1866
  extends CoreSVGAttributes<T>,
1853
1867
  StylableSVGAttributes,
@@ -2098,7 +2112,7 @@ export namespace JSX {
2098
2112
  feDiffuseLighting: FeDiffuseLightingSVGAttributes<SVGFEDiffuseLightingElement>;
2099
2113
  feDisplacementMap: FeDisplacementMapSVGAttributes<SVGFEDisplacementMapElement>;
2100
2114
  feDistantLight: FeDistantLightSVGAttributes<SVGFEDistantLightElement>;
2101
- feDropShadow: Partial<SVGFEDropShadowElement>;
2115
+ feDropShadow: FeDropShadowSVGAttributes<SVGFEDropShadowElement>;
2102
2116
  feFlood: FeFloodSVGAttributes<SVGFEFloodElement>;
2103
2117
  feFuncA: FeFuncSVGAttributes<SVGFEFuncAElement>;
2104
2118
  feFuncB: FeFuncSVGAttributes<SVGFEFuncBElement>;
@@ -2124,14 +2138,14 @@ export namespace JSX {
2124
2138
  marker: MarkerSVGAttributes<SVGMarkerElement>;
2125
2139
  mask: MaskSVGAttributes<SVGMaskElement>;
2126
2140
  metadata: MetadataSVGAttributes<SVGMetadataElement>;
2127
- mpath: Partial<SVGMPathElement>;
2141
+ mpath: MPathSVGAttributes<SVGMPathElement>;
2128
2142
  path: PathSVGAttributes<SVGPathElement>;
2129
2143
  pattern: PatternSVGAttributes<SVGPatternElement>;
2130
2144
  polygon: PolygonSVGAttributes<SVGPolygonElement>;
2131
2145
  polyline: PolylineSVGAttributes<SVGPolylineElement>;
2132
2146
  radialGradient: RadialGradientSVGAttributes<SVGRadialGradientElement>;
2133
2147
  rect: RectSVGAttributes<SVGRectElement>;
2134
- set: Partial<SVGSetElement>;
2148
+ set: SetSVGAttributes<SVGSetElement>;
2135
2149
  stop: StopSVGAttributes<SVGStopElement>;
2136
2150
  svg: SvgSVGAttributes<SVGSVGElement>;
2137
2151
  switch: SwitchSVGAttributes<SVGSwitchElement>;
@@ -29,13 +29,9 @@ SOFTWARE.
29
29
  *
30
30
  * @description https://www.solidjs.com/docs/latest/api#maparray
31
31
  */
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?: {
32
+ export declare function mapArray<T, U>(list: Accessor<readonly T[] | undefined | null | false>, mapFn: (v: T, i: Accessor<number>) => U, options?: {
36
33
  fallback?: Accessor<any>;
37
- }
38
- ): () => U[];
34
+ }): () => U[];
39
35
  /**
40
36
  * reactively maps arrays by index instead of value - underlying helper for the `<Index>` control flow
41
37
  *
@@ -43,10 +39,6 @@ export declare function mapArray<T, U>(
43
39
  *
44
40
  * @description https://www.solidjs.com/docs/latest/api#indexarray
45
41
  */
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?: {
42
+ export declare function indexArray<T, U>(list: Accessor<readonly T[] | undefined | null | false>, mapFn: (v: Accessor<T>, i: number) => U, options?: {
50
43
  fallback?: Accessor<any>;
51
- }
52
- ): () => U[];
44
+ }): () => U[];
@@ -1,22 +1,20 @@
1
1
  import { Accessor, Setter } from "./signal.js";
2
2
  declare global {
3
- interface SymbolConstructor {
4
- readonly observable: symbol;
5
- }
3
+ interface SymbolConstructor {
4
+ readonly observable: symbol;
5
+ }
6
6
  }
7
7
  interface Observable<T> {
8
- subscribe(observer: ObservableObserver<T>): {
9
- unsubscribe(): void;
10
- };
11
- [Symbol.observable](): Observable<T>;
12
- }
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;
8
+ subscribe(observer: ObservableObserver<T>): {
9
+ unsubscribe(): void;
19
10
  };
11
+ [Symbol.observable](): Observable<T>;
12
+ }
13
+ export type ObservableObserver<T> = ((v: T) => void) | {
14
+ next?: (v: T) => void;
15
+ error?: (v: any) => void;
16
+ complete?: (v: boolean) => void;
17
+ };
20
18
  /**
21
19
  * creates a simple observable from a signal's accessor to be used with the `from` operator of observable libraries like e.g. rxjs
22
20
  * ```typescript
@@ -28,15 +26,9 @@ export type ObservableObserver<T> =
28
26
  * description https://www.solidjs.com/docs/latest/api#observable
29
27
  */
30
28
  export declare function observable<T>(input: Accessor<T>): Observable<T>;
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>;
29
+ export declare function from<T>(producer: ((setter: Setter<T | undefined>) => () => void) | {
30
+ subscribe: (fn: (v: T) => void) => (() => void) | {
31
+ unsubscribe: () => void;
32
+ };
33
+ }): Accessor<T | undefined>;
42
34
  export {};