solid-js 1.9.2 → 1.9.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/dist/dev.js +559 -318
- package/dist/server.js +168 -74
- package/dist/solid.js +486 -276
- package/h/dist/h.js +40 -9
- 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 +93 -91
- package/h/types/hyperscript.d.ts +11 -11
- package/html/dist/html.js +219 -94
- package/html/types/lit.d.ts +52 -33
- package/package.json +1 -1
- package/store/dist/dev.js +123 -43
- package/store/dist/server.js +20 -8
- package/store/dist/store.js +114 -40
- 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 +25 -5
- package/store/types/store.d.ts +218 -61
- package/types/index.d.ts +75 -10
- package/types/jsx.d.ts +143 -157
- 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 +233 -142
- package/types/render/Suspense.d.ts +5 -5
- package/types/render/component.d.ts +71 -35
- package/types/render/flow.d.ts +43 -31
- package/types/render/hydration.d.ts +15 -15
- package/types/server/index.d.ts +57 -2
- package/types/server/reactive.d.ts +73 -42
- package/types/server/rendering.d.ts +169 -98
- 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 +639 -89
- package/web/dist/server.cjs +13 -10
- package/web/dist/server.js +653 -118
- package/web/dist/web.js +627 -87
- package/web/storage/dist/storage.js +3 -3
- package/web/types/client.d.ts +1 -1
- 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/web/types/server.d.ts +1 -1
package/types/jsx.d.ts
CHANGED
|
@@ -29,30 +29,30 @@ export namespace JSX {
|
|
|
29
29
|
): void;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
interface BoundEventHandler<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
) => void;
|
|
32
|
+
interface BoundEventHandler<
|
|
33
|
+
T,
|
|
34
|
+
E extends Event,
|
|
35
|
+
EHandler extends EventHandler<T, any> = EventHandler<T, E>
|
|
36
|
+
> {
|
|
37
|
+
0: (data: any, ...e: Parameters<EHandler>) => void;
|
|
40
38
|
1: any;
|
|
41
39
|
}
|
|
42
|
-
type EventHandlerUnion<
|
|
40
|
+
type EventHandlerUnion<
|
|
41
|
+
T,
|
|
42
|
+
E extends Event,
|
|
43
|
+
EHandler extends EventHandler<T, any> = EventHandler<T, E>
|
|
44
|
+
> = EHandler | BoundEventHandler<T, E, EHandler>;
|
|
43
45
|
|
|
44
|
-
interface EventHandlerWithOptions<T, E extends Event
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
currentTarget: T;
|
|
48
|
-
target: Element;
|
|
49
|
-
}
|
|
50
|
-
) => void;
|
|
46
|
+
interface EventHandlerWithOptions<T, E extends Event, EHandler = EventHandler<T, E>>
|
|
47
|
+
extends AddEventListenerOptions {
|
|
48
|
+
handleEvent: EHandler;
|
|
51
49
|
}
|
|
52
50
|
|
|
53
|
-
type
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
type EventHandlerWithOptionsUnion<
|
|
52
|
+
T,
|
|
53
|
+
E extends Event,
|
|
54
|
+
EHandler extends EventHandler<T, any> = EventHandler<T, E>
|
|
55
|
+
> = EHandler | EventHandlerWithOptions<T, E, EHandler>;
|
|
56
56
|
|
|
57
57
|
interface InputEventHandler<T, E extends InputEvent> {
|
|
58
58
|
(
|
|
@@ -64,21 +64,11 @@ export namespace JSX {
|
|
|
64
64
|
}
|
|
65
65
|
): void;
|
|
66
66
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
target: T extends HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement
|
|
73
|
-
? T
|
|
74
|
-
: DOMElement;
|
|
75
|
-
}
|
|
76
|
-
) => void;
|
|
77
|
-
1: any;
|
|
78
|
-
}
|
|
79
|
-
type InputEventHandlerUnion<T, E extends InputEvent> =
|
|
80
|
-
| InputEventHandler<T, E>
|
|
81
|
-
| BoundInputEventHandler<T, E>;
|
|
67
|
+
type InputEventHandlerUnion<T, E extends InputEvent> = EventHandlerUnion<
|
|
68
|
+
T,
|
|
69
|
+
E,
|
|
70
|
+
InputEventHandler<T, E>
|
|
71
|
+
>;
|
|
82
72
|
|
|
83
73
|
interface ChangeEventHandler<T, E extends Event> {
|
|
84
74
|
(
|
|
@@ -90,21 +80,11 @@ export namespace JSX {
|
|
|
90
80
|
}
|
|
91
81
|
): void;
|
|
92
82
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
target: T extends HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement
|
|
99
|
-
? T
|
|
100
|
-
: DOMElement;
|
|
101
|
-
}
|
|
102
|
-
) => void;
|
|
103
|
-
1: any;
|
|
104
|
-
}
|
|
105
|
-
type ChangeEventHandlerUnion<T, E extends Event> =
|
|
106
|
-
| ChangeEventHandler<T, E>
|
|
107
|
-
| BoundChangeEventHandler<T, E>;
|
|
83
|
+
type ChangeEventHandlerUnion<T, E extends Event> = EventHandlerUnion<
|
|
84
|
+
T,
|
|
85
|
+
E,
|
|
86
|
+
ChangeEventHandler<T, E>
|
|
87
|
+
>;
|
|
108
88
|
|
|
109
89
|
interface FocusEventHandler<T, E extends FocusEvent> {
|
|
110
90
|
(
|
|
@@ -116,21 +96,11 @@ export namespace JSX {
|
|
|
116
96
|
}
|
|
117
97
|
): void;
|
|
118
98
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
target: T extends HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement
|
|
125
|
-
? T
|
|
126
|
-
: DOMElement;
|
|
127
|
-
}
|
|
128
|
-
) => void;
|
|
129
|
-
1: any;
|
|
130
|
-
}
|
|
131
|
-
type FocusEventHandlerUnion<T, E extends FocusEvent> =
|
|
132
|
-
| FocusEventHandler<T, E>
|
|
133
|
-
| BoundFocusEventHandler<T, E>;
|
|
99
|
+
type FocusEventHandlerUnion<T, E extends FocusEvent> = EventHandlerUnion<
|
|
100
|
+
T,
|
|
101
|
+
E,
|
|
102
|
+
FocusEventHandler<T, E>
|
|
103
|
+
>;
|
|
134
104
|
|
|
135
105
|
const SERIALIZABLE: unique symbol;
|
|
136
106
|
interface SerializableAttributeValue {
|
|
@@ -143,9 +113,11 @@ export namespace JSX {
|
|
|
143
113
|
}
|
|
144
114
|
interface CustomAttributes<T> {
|
|
145
115
|
ref?: T | ((el: T) => void) | undefined;
|
|
146
|
-
classList?:
|
|
147
|
-
|
|
148
|
-
|
|
116
|
+
classList?:
|
|
117
|
+
| {
|
|
118
|
+
[k: string]: boolean | undefined;
|
|
119
|
+
}
|
|
120
|
+
| undefined;
|
|
149
121
|
$ServerOnly?: boolean | undefined;
|
|
150
122
|
}
|
|
151
123
|
type Accessor<T> = () => T;
|
|
@@ -188,7 +160,7 @@ export namespace JSX {
|
|
|
188
160
|
[Key in keyof ExplicitBoolAttributes as `bool:${Key}`]?: ExplicitBoolAttributes[Key];
|
|
189
161
|
};
|
|
190
162
|
type OnAttributes<T> = {
|
|
191
|
-
[Key in keyof CustomEvents as `on:${Key}`]?:
|
|
163
|
+
[Key in keyof CustomEvents as `on:${Key}`]?: EventHandlerWithOptionsUnion<T, CustomEvents[Key]>;
|
|
192
164
|
};
|
|
193
165
|
type OnCaptureAttributes<T> = {
|
|
194
166
|
[Key in keyof CustomCaptureEvents as `oncapture:${Key}`]?: EventHandler<
|
|
@@ -202,6 +174,7 @@ export namespace JSX {
|
|
|
202
174
|
DirectiveFunctionAttributes<T>,
|
|
203
175
|
PropAttributes,
|
|
204
176
|
AttrAttributes,
|
|
177
|
+
BoolAttributes,
|
|
205
178
|
OnAttributes<T>,
|
|
206
179
|
OnCaptureAttributes<T>,
|
|
207
180
|
CustomEventHandlersCamelCase<T>,
|
|
@@ -234,16 +207,20 @@ export namespace JSX {
|
|
|
234
207
|
onencrypted?: EventHandlerUnion<T, Event> | undefined;
|
|
235
208
|
ondragexit?: EventHandlerUnion<T, DragEvent> | undefined;
|
|
236
209
|
// lower case events
|
|
237
|
-
"on:copy"?:
|
|
238
|
-
"on:cut"?:
|
|
239
|
-
"on:paste"?:
|
|
240
|
-
"on:compositionend"?:
|
|
241
|
-
"on:compositionstart"?:
|
|
242
|
-
"on:compositionupdate"?:
|
|
243
|
-
"on:focusout"?:
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
"on:
|
|
210
|
+
"on:copy"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
|
|
211
|
+
"on:cut"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
|
|
212
|
+
"on:paste"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
|
|
213
|
+
"on:compositionend"?: EventHandlerWithOptionsUnion<T, CompositionEvent> | undefined;
|
|
214
|
+
"on:compositionstart"?: EventHandlerWithOptionsUnion<T, CompositionEvent> | undefined;
|
|
215
|
+
"on:compositionupdate"?: EventHandlerWithOptionsUnion<T, CompositionEvent> | undefined;
|
|
216
|
+
"on:focusout"?:
|
|
217
|
+
| EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>>
|
|
218
|
+
| undefined;
|
|
219
|
+
"on:focusin"?:
|
|
220
|
+
| EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>>
|
|
221
|
+
| undefined;
|
|
222
|
+
"on:encrypted"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
223
|
+
"on:dragexit"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
247
224
|
}
|
|
248
225
|
interface CustomEventHandlersCamelCase<T> {
|
|
249
226
|
onAbort?: EventHandlerUnion<T, Event> | undefined;
|
|
@@ -409,85 +386,93 @@ export namespace JSX {
|
|
|
409
386
|
onwheel?: EventHandlerUnion<T, WheelEvent> | undefined;
|
|
410
387
|
}
|
|
411
388
|
interface CustomEventHandlersNamespaced<T> {
|
|
412
|
-
"on:abort"?:
|
|
413
|
-
"on:animationend"?:
|
|
414
|
-
"on:animationiteration"?:
|
|
415
|
-
"on:animationstart"?:
|
|
416
|
-
"on:auxclick"?:
|
|
417
|
-
"on:beforeinput"?:
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
"on:
|
|
421
|
-
"on:
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
"on:
|
|
425
|
-
"on:
|
|
426
|
-
"on:
|
|
427
|
-
"on:
|
|
428
|
-
"on:
|
|
429
|
-
"on:
|
|
430
|
-
"on:
|
|
431
|
-
"on:
|
|
432
|
-
"on:
|
|
433
|
-
"on:
|
|
434
|
-
"on:
|
|
435
|
-
"on:
|
|
436
|
-
"on:
|
|
437
|
-
"on:
|
|
438
|
-
"on:
|
|
439
|
-
"on:
|
|
440
|
-
"on:
|
|
441
|
-
"on:
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
"on:
|
|
445
|
-
"on:
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
"on:
|
|
449
|
-
"on:
|
|
450
|
-
"on:
|
|
451
|
-
"on:
|
|
452
|
-
"on:
|
|
453
|
-
"on:
|
|
454
|
-
"on:
|
|
455
|
-
"on:
|
|
456
|
-
"on:
|
|
457
|
-
"on:
|
|
458
|
-
"on:
|
|
459
|
-
"on:
|
|
460
|
-
"on:
|
|
461
|
-
"on:
|
|
462
|
-
"on:
|
|
463
|
-
"on:
|
|
464
|
-
"on:
|
|
465
|
-
"on:
|
|
466
|
-
"on:
|
|
467
|
-
"on:
|
|
468
|
-
"on:
|
|
469
|
-
"on:
|
|
470
|
-
"on:
|
|
471
|
-
"on:
|
|
472
|
-
"on:
|
|
473
|
-
"on:
|
|
474
|
-
"on:
|
|
475
|
-
"on:
|
|
476
|
-
"on:
|
|
477
|
-
"on:
|
|
478
|
-
"on:
|
|
479
|
-
"on:
|
|
480
|
-
"on:
|
|
481
|
-
"on:
|
|
482
|
-
"on:
|
|
483
|
-
"on:
|
|
484
|
-
"on:
|
|
485
|
-
"on:
|
|
486
|
-
"on:
|
|
487
|
-
"on:
|
|
488
|
-
"on:
|
|
489
|
-
"on:
|
|
490
|
-
"on:
|
|
389
|
+
"on:abort"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
390
|
+
"on:animationend"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
|
|
391
|
+
"on:animationiteration"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
|
|
392
|
+
"on:animationstart"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
|
|
393
|
+
"on:auxclick"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
394
|
+
"on:beforeinput"?:
|
|
395
|
+
| EventHandlerWithOptionsUnion<T, InputEvent, InputEventHandler<T, InputEvent>>
|
|
396
|
+
| undefined;
|
|
397
|
+
"on:beforetoggle"?: EventHandlerWithOptionsUnion<T, ToggleEvent> | undefined;
|
|
398
|
+
"on:blur"?:
|
|
399
|
+
| EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>>
|
|
400
|
+
| undefined;
|
|
401
|
+
"on:canplay"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
402
|
+
"on:canplaythrough"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
403
|
+
"on:change"?: EventHandlerWithOptionsUnion<T, Event, ChangeEventHandler<T, Event>> | undefined;
|
|
404
|
+
"on:click"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
405
|
+
"on:contextmenu"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
406
|
+
"on:dblclick"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
407
|
+
"on:drag"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
408
|
+
"on:dragend"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
409
|
+
"on:dragenter"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
410
|
+
"on:dragleave"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
411
|
+
"on:dragover"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
412
|
+
"on:dragstart"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
413
|
+
"on:drop"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
414
|
+
"on:durationchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
415
|
+
"on:emptied"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
416
|
+
"on:ended"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
417
|
+
"on:error"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
418
|
+
"on:focus"?:
|
|
419
|
+
| EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>>
|
|
420
|
+
| undefined;
|
|
421
|
+
"on:gotpointercapture"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
422
|
+
"on:input"?:
|
|
423
|
+
| EventHandlerWithOptionsUnion<T, InputEvent, InputEventHandler<T, InputEvent>>
|
|
424
|
+
| undefined;
|
|
425
|
+
"on:invalid"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
426
|
+
"on:keydown"?: EventHandlerWithOptionsUnion<T, KeyboardEvent> | undefined;
|
|
427
|
+
"on:keypress"?: EventHandlerWithOptionsUnion<T, KeyboardEvent> | undefined;
|
|
428
|
+
"on:keyup"?: EventHandlerWithOptionsUnion<T, KeyboardEvent> | undefined;
|
|
429
|
+
"on:load"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
430
|
+
"on:loadeddata"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
431
|
+
"on:loadedmetadata"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
432
|
+
"on:loadstart"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
433
|
+
"on:lostpointercapture"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
434
|
+
"on:mousedown"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
435
|
+
"on:mouseenter"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
436
|
+
"on:mouseleave"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
437
|
+
"on:mousemove"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
438
|
+
"on:mouseout"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
439
|
+
"on:mouseover"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
440
|
+
"on:mouseup"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
441
|
+
"on:pause"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
442
|
+
"on:play"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
443
|
+
"on:playing"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
444
|
+
"on:pointercancel"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
445
|
+
"on:pointerdown"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
446
|
+
"on:pointerenter"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
447
|
+
"on:pointerleave"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
448
|
+
"on:pointermove"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
449
|
+
"on:pointerout"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
450
|
+
"on:pointerover"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
451
|
+
"on:pointerup"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
452
|
+
"on:progress"?: EventHandlerWithOptionsUnion<T, ProgressEvent> | undefined;
|
|
453
|
+
"on:ratechange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
454
|
+
"on:reset"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
455
|
+
"on:scroll"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
456
|
+
"on:scrollend"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
457
|
+
"on:seeked"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
458
|
+
"on:seeking"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
459
|
+
"on:select"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
460
|
+
"on:stalled"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
461
|
+
"on:submit"?: EventHandlerWithOptionsUnion<T, SubmitEvent> | undefined;
|
|
462
|
+
"on:suspend"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
463
|
+
"on:timeupdate"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
464
|
+
"on:toggle"?: EventHandlerWithOptionsUnion<T, ToggleEvent> | undefined;
|
|
465
|
+
"on:touchcancel"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
|
|
466
|
+
"on:touchend"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
|
|
467
|
+
"on:touchmove"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
|
|
468
|
+
"on:touchstart"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
|
|
469
|
+
"on:transitionstart"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
|
|
470
|
+
"on:transitionend"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
|
|
471
|
+
"on:transitionrun"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
|
|
472
|
+
"on:transitioncancel"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
|
|
473
|
+
"on:volumechange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
474
|
+
"on:waiting"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
475
|
+
"on:wheel"?: EventHandlerWithOptionsUnion<T, WheelEvent> | undefined;
|
|
491
476
|
}
|
|
492
477
|
|
|
493
478
|
interface CSSProperties extends csstype.PropertiesHyphen {
|
|
@@ -1366,6 +1351,7 @@ export namespace JSX {
|
|
|
1366
1351
|
playsinline?: boolean | undefined;
|
|
1367
1352
|
poster?: string | undefined;
|
|
1368
1353
|
width?: number | string | undefined;
|
|
1354
|
+
disablepictureinpicture?: boolean;
|
|
1369
1355
|
}
|
|
1370
1356
|
type SVGPreserveAspectRatio =
|
|
1371
1357
|
| "none"
|
|
@@ -29,9 +29,13 @@ SOFTWARE.
|
|
|
29
29
|
*
|
|
30
30
|
* @description https://docs.solidjs.com/reference/reactive-utilities/map-array
|
|
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://docs.solidjs.com/reference/reactive-utilities/index-array
|
|
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://docs.solidjs.com/reference/reactive-utilities/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;
|