@solidjs/web 2.0.0-beta.12 → 2.0.0-beta.14
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 +225 -93
- package/dist/dev.js +221 -93
- package/dist/server.cjs +41 -1
- package/dist/server.js +32 -1
- package/dist/web.cjs +224 -92
- package/dist/web.js +220 -92
- package/package.json +3 -3
- package/types/client.d.ts +14 -11
- package/types/jsx-properties.d.ts +1 -0
- package/types/jsx.d.ts +21 -211
- package/types/server.d.ts +26 -7
- package/types-cjs/client.d.cts +14 -11
- package/types-cjs/jsx-properties.d.cts +1 -0
- package/types-cjs/jsx.d.cts +21 -211
- package/types-cjs/server.d.cts +26 -7
package/types-cjs/jsx.d.cts
CHANGED
|
@@ -35,10 +35,9 @@ import type { Element as SolidElement } from "solid-js";
|
|
|
35
35
|
*
|
|
36
36
|
* - Event handlers use `camelCase` such `onClick` and will be delegated when possible, bubbling
|
|
37
37
|
* through the component tree, not the dom tree.
|
|
38
|
-
* -
|
|
39
|
-
*
|
|
38
|
+
* - Event handlers use camelCase attributes; native listener options should be handled with `ref`
|
|
39
|
+
* callbacks that call `addEventListener` directly.
|
|
40
40
|
* - A global case-insensitive event handler can be added by extending `EventHandlersElement<T>`
|
|
41
|
-
* - A native `on:` event handler can be added by extending `CustomEvents<T>` interface
|
|
42
41
|
*
|
|
43
42
|
* ## Boolean Attributes (property setter that accepts `true | false`):
|
|
44
43
|
*
|
|
@@ -176,17 +175,6 @@ export namespace JSX {
|
|
|
176
175
|
EHandler extends EventHandler<T, any> = EventHandler<T, E>
|
|
177
176
|
> = EHandler | BoundEventHandler<T, E, EHandler>;
|
|
178
177
|
|
|
179
|
-
interface EventHandlerWithOptions<T, E extends Event, EHandler = EventHandler<T, E>>
|
|
180
|
-
extends AddEventListenerOptions, EventListenerOptions {
|
|
181
|
-
handleEvent: EHandler;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
type EventHandlerWithOptionsUnion<
|
|
185
|
-
T,
|
|
186
|
-
E extends Event,
|
|
187
|
-
EHandler extends EventHandler<T, any> = EventHandler<T, E>
|
|
188
|
-
> = EHandler | EventHandlerWithOptions<T, E, EHandler>;
|
|
189
|
-
|
|
190
178
|
interface InputEventHandler<T, E extends InputEvent> {
|
|
191
179
|
(
|
|
192
180
|
e: E & {
|
|
@@ -236,7 +224,8 @@ export namespace JSX {
|
|
|
236
224
|
>;
|
|
237
225
|
// end event handlers
|
|
238
226
|
|
|
239
|
-
type
|
|
227
|
+
export type ClassValue =
|
|
228
|
+
| string
|
|
240
229
|
| Record<string, boolean>
|
|
241
230
|
| Array<string | number | boolean | null | undefined | Record<string, boolean>>;
|
|
242
231
|
|
|
@@ -258,13 +247,9 @@ export namespace JSX {
|
|
|
258
247
|
$ServerOnly?: boolean | undefined;
|
|
259
248
|
}
|
|
260
249
|
interface ExplicitProperties {}
|
|
261
|
-
interface CustomEvents {}
|
|
262
250
|
type PropAttributes = {
|
|
263
251
|
[Key in keyof ExplicitProperties as `prop:${Key}`]?: ExplicitProperties[Key];
|
|
264
252
|
};
|
|
265
|
-
type OnAttributes<T> = {
|
|
266
|
-
[Key in keyof CustomEvents as `on:${Key}`]?: EventHandlerWithOptionsUnion<T, CustomEvents[Key]>;
|
|
267
|
-
};
|
|
268
253
|
|
|
269
254
|
/**
|
|
270
255
|
* Writable, element-specific DOM properties exposed as `prop:*` attributes, auto-derived
|
|
@@ -285,11 +270,6 @@ export namespace JSX {
|
|
|
285
270
|
|
|
286
271
|
// TODO: Should we allow this?
|
|
287
272
|
// type ClassKeys = `class:${string}`;
|
|
288
|
-
// type CSSKeys = Exclude<keyof csstype.PropertiesHyphen, `-${string}`>;
|
|
289
|
-
|
|
290
|
-
// type CSSAttributes = {
|
|
291
|
-
// [key in CSSKeys as `style:${key}`]: csstype.PropertiesHyphen[key];
|
|
292
|
-
// };
|
|
293
273
|
|
|
294
274
|
// BOOLEAN
|
|
295
275
|
|
|
@@ -732,33 +712,7 @@ export namespace JSX {
|
|
|
732
712
|
onUnhandledRejection?: EventHandlerUnion<T, PromiseRejectionEvent> | undefined;
|
|
733
713
|
onUnload?: EventHandlerUnion<T, Event> | undefined;
|
|
734
714
|
|
|
735
|
-
"on:afterprint"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
736
|
-
"on:beforeprint"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
737
|
-
"on:beforeunload"?: EventHandlerWithOptionsUnion<T, BeforeUnloadEvent> | undefined;
|
|
738
|
-
"on:devicemotion"?: EventHandlerWithOptionsUnion<T, DeviceMotionEvent> | undefined;
|
|
739
|
-
"on:deviceorientation"?: EventHandlerWithOptionsUnion<T, DeviceOrientationEvent> | undefined;
|
|
740
|
-
"on:deviceorientationabsolute"?:
|
|
741
|
-
| EventHandlerWithOptionsUnion<T, DeviceOrientationEvent>
|
|
742
|
-
| undefined;
|
|
743
|
-
"on:gamepadconnected"?: EventHandlerWithOptionsUnion<T, GamepadEvent> | undefined;
|
|
744
|
-
"on:gamepaddisconnected"?: EventHandlerWithOptionsUnion<T, GamepadEvent> | undefined;
|
|
745
|
-
"on:hashchange"?: EventHandlerWithOptionsUnion<T, HashChangeEvent> | undefined;
|
|
746
|
-
"on:languagechange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
747
|
-
"on:message"?: EventHandlerWithOptionsUnion<T, MessageEvent> | undefined;
|
|
748
|
-
"on:messageerror"?: EventHandlerWithOptionsUnion<T, MessageEvent> | undefined;
|
|
749
|
-
"on:offline"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
750
|
-
"on:online"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
751
715
|
/** @deprecated Use `screen.orientation` (`ScreenOrientation.change`) instead. */
|
|
752
|
-
"on:orientationchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
753
|
-
"on:pagehide"?: EventHandlerWithOptionsUnion<T, PageTransitionEvent> | undefined;
|
|
754
|
-
"on:pagereveal"?: EventHandlerWithOptionsUnion<T, PageRevealEvent> | undefined;
|
|
755
|
-
"on:pageshow"?: EventHandlerWithOptionsUnion<T, PageTransitionEvent> | undefined;
|
|
756
|
-
"on:pageswap"?: EventHandlerWithOptionsUnion<T, PageSwapEvent> | undefined;
|
|
757
|
-
"on:popstate"?: EventHandlerWithOptionsUnion<T, PopStateEvent> | undefined;
|
|
758
|
-
"on:rejectionhandled"?: EventHandlerWithOptionsUnion<T, PromiseRejectionEvent> | undefined;
|
|
759
|
-
"on:storage"?: EventHandlerWithOptionsUnion<T, StorageEvent> | undefined;
|
|
760
|
-
"on:unhandledrejection"?: EventHandlerWithOptionsUnion<T, PromiseRejectionEvent> | undefined;
|
|
761
|
-
"on:unload"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
762
716
|
}
|
|
763
717
|
|
|
764
718
|
/**
|
|
@@ -884,160 +838,30 @@ export namespace JSX {
|
|
|
884
838
|
onVolumeChange?: EventHandlerUnion<T, Event> | undefined;
|
|
885
839
|
onWaiting?: EventHandlerUnion<T, Event> | undefined;
|
|
886
840
|
onWheel?: EventHandlerUnion<T, WheelEvent> | undefined;
|
|
887
|
-
|
|
888
|
-
"on:abort"?: EventHandlerWithOptionsUnion<T, UIEvent> | undefined;
|
|
889
|
-
"on:animationcancel"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
|
|
890
|
-
"on:animationend"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
|
|
891
|
-
"on:animationiteration"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
|
|
892
|
-
"on:animationstart"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
|
|
893
|
-
"on:auxclick"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
894
|
-
"on:beforecopy"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
|
|
895
|
-
"on:beforecut"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
|
|
896
|
-
"on:beforeinput"?:
|
|
897
|
-
| EventHandlerWithOptionsUnion<T, InputEvent, InputEventHandler<T, InputEvent>>
|
|
898
|
-
| undefined;
|
|
899
|
-
"on:beforematch"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
900
|
-
"on:beforepaste"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
|
|
901
|
-
"on:beforetoggle"?: EventHandlerWithOptionsUnion<T, ToggleEvent> | undefined;
|
|
902
|
-
"on:beforexrselect"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
903
|
-
"on:blur"?:
|
|
904
|
-
| EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>>
|
|
905
|
-
| undefined;
|
|
906
|
-
"on:cancel"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
907
|
-
"on:canplay"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
908
|
-
"on:canplaythrough"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
909
|
-
"on:change"?: EventHandlerWithOptionsUnion<T, Event, ChangeEventHandler<T, Event>> | undefined;
|
|
910
|
-
"on:click"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
911
|
-
"on:close"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
912
|
-
"on:command"?: EventHandlerWithOptionsUnion<T, CommandEvent> | undefined;
|
|
913
|
-
"on:compositionend"?: EventHandlerWithOptionsUnion<T, CompositionEvent> | undefined;
|
|
914
|
-
"on:compositionstart"?: EventHandlerWithOptionsUnion<T, CompositionEvent> | undefined;
|
|
915
|
-
"on:compositionupdate"?: EventHandlerWithOptionsUnion<T, CompositionEvent> | undefined;
|
|
916
|
-
"on:contentvisibilityautostatechange"?:
|
|
917
|
-
| EventHandlerWithOptionsUnion<T, ContentVisibilityAutoStateChangeEvent>
|
|
918
|
-
| undefined;
|
|
919
|
-
"on:contextlost"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
920
|
-
"on:contextmenu"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
921
|
-
"on:contextrestored"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
922
|
-
"on:copy"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
|
|
923
|
-
"on:cuechange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
924
|
-
"on:cut"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
|
|
925
|
-
"on:dblclick"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
926
|
-
"on:drag"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
927
|
-
"on:dragend"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
928
|
-
"on:dragenter"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
929
|
-
"on:dragexit"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
930
|
-
"on:dragleave"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
931
|
-
"on:dragover"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
932
|
-
"on:dragstart"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
933
|
-
"on:drop"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
|
|
934
|
-
"on:durationchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
935
|
-
"on:emptied"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
936
|
-
"on:ended"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
937
|
-
"on:error"?: EventHandlerWithOptionsUnion<T, ErrorEvent> | undefined;
|
|
938
|
-
"on:focus"?:
|
|
939
|
-
| EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>>
|
|
940
|
-
| undefined;
|
|
941
|
-
"on:focusin"?:
|
|
942
|
-
| EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>>
|
|
943
|
-
| undefined;
|
|
944
|
-
"on:focusout"?:
|
|
945
|
-
| EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>>
|
|
946
|
-
| undefined;
|
|
947
|
-
"on:formdata"?: EventHandlerWithOptionsUnion<T, FormDataEvent> | undefined;
|
|
948
|
-
"on:fullscreenchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
949
|
-
"on:fullscreenerror"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
950
|
-
"on:gotpointercapture"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
951
|
-
"on:input"?:
|
|
952
|
-
| EventHandlerWithOptionsUnion<T, InputEvent, InputEventHandler<T, InputEvent>>
|
|
953
|
-
| undefined;
|
|
954
|
-
"on:invalid"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
955
|
-
"on:keydown"?: EventHandlerWithOptionsUnion<T, KeyboardEvent> | undefined;
|
|
956
|
-
"on:keypress"?: EventHandlerWithOptionsUnion<T, KeyboardEvent> | undefined;
|
|
957
|
-
"on:keyup"?: EventHandlerWithOptionsUnion<T, KeyboardEvent> | undefined;
|
|
958
|
-
"on:load"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
959
|
-
"on:loadeddata"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
960
|
-
"on:loadedmetadata"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
961
|
-
"on:loadstart"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
962
|
-
"on:lostpointercapture"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
963
|
-
"on:mousedown"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
964
|
-
"on:mouseenter"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
965
|
-
"on:mouseleave"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
966
|
-
"on:mousemove"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
967
|
-
"on:mouseout"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
968
|
-
"on:mouseover"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
969
|
-
"on:mouseup"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
|
|
970
|
-
"on:paste"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
|
|
971
|
-
"on:pause"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
972
|
-
"on:play"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
973
|
-
"on:playing"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
974
|
-
"on:pointercancel"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
975
|
-
"on:pointerdown"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
976
|
-
"on:pointerenter"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
977
|
-
"on:pointerleave"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
978
|
-
"on:pointermove"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
979
|
-
"on:pointerout"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
980
|
-
"on:pointerover"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
981
|
-
"on:pointerrawupdate"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
982
|
-
"on:pointerup"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
|
|
983
|
-
"on:progress"?: EventHandlerWithOptionsUnion<T, ProgressEvent> | undefined;
|
|
984
|
-
"on:ratechange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
985
|
-
"on:reset"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
986
|
-
"on:resize"?: EventHandlerWithOptionsUnion<T, UIEvent> | undefined;
|
|
987
|
-
"on:scroll"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
988
|
-
"on:scrollend"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
989
|
-
"on:scrollsnapchange"?: EventHandlerWithOptionsUnion<T, SnapEvent> | undefined;
|
|
990
|
-
"on:scrollsnapchanging"?: EventHandlerWithOptionsUnion<T, SnapEvent> | undefined;
|
|
991
|
-
"on:securitypolicyviolation"?:
|
|
992
|
-
| EventHandlerWithOptionsUnion<T, SecurityPolicyViolationEvent>
|
|
993
|
-
| undefined;
|
|
994
|
-
"on:seeked"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
995
|
-
"on:seeking"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
996
|
-
"on:select"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
997
|
-
"on:selectionchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
998
|
-
"on:selectstart"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
999
|
-
"on:slotchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
1000
|
-
"on:stalled"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
1001
|
-
"on:submit"?: EventHandlerWithOptionsUnion<T, SubmitEvent> | undefined;
|
|
1002
|
-
"on:suspend"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
1003
|
-
"on:timeupdate"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
1004
|
-
"on:toggle"?: EventHandlerWithOptionsUnion<T, ToggleEvent> | undefined;
|
|
1005
|
-
"on:touchcancel"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
|
|
1006
|
-
"on:touchend"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
|
|
1007
|
-
"on:touchmove"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
|
|
1008
|
-
"on:touchstart"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
|
|
1009
|
-
"on:transitioncancel"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
|
|
1010
|
-
"on:transitionend"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
|
|
1011
|
-
"on:transitionrun"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
|
|
1012
|
-
"on:transitionstart"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
|
|
1013
|
-
"on:volumechange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
1014
|
-
"on:waiting"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
1015
|
-
"on:wheel"?: EventHandlerWithOptionsUnion<T, WheelEvent> | undefined;
|
|
1016
841
|
}
|
|
1017
842
|
|
|
1018
843
|
// EventName = "click" | "mousedown" ...
|
|
1019
844
|
|
|
1020
845
|
type EventName =
|
|
1021
846
|
| (keyof EventHandlersWindow<any> extends infer K
|
|
1022
|
-
? K extends `on
|
|
1023
|
-
? T
|
|
1024
|
-
:
|
|
1025
|
-
? Lowercase<T>
|
|
1026
|
-
: never
|
|
847
|
+
? K extends `on${infer T}`
|
|
848
|
+
? Lowercase<T>
|
|
849
|
+
: never
|
|
1027
850
|
: never)
|
|
1028
851
|
| (keyof EventHandlersElement<any> extends infer K
|
|
1029
|
-
? K extends `on
|
|
1030
|
-
? T
|
|
1031
|
-
:
|
|
1032
|
-
? Lowercase<T>
|
|
1033
|
-
: never
|
|
852
|
+
? K extends `on${infer T}`
|
|
853
|
+
? Lowercase<T>
|
|
854
|
+
: never
|
|
1034
855
|
: never)
|
|
1035
856
|
| (string & {});
|
|
1036
857
|
|
|
1037
858
|
type ExtractEventType<T> = {
|
|
1038
|
-
[K in keyof T as K extends `on
|
|
1039
|
-
|
|
1040
|
-
|
|
859
|
+
[K in keyof T as K extends `on${infer Name}` ? Name : never]: T[K] extends EventHandlerUnion<
|
|
860
|
+
Element,
|
|
861
|
+
infer E
|
|
862
|
+
>
|
|
863
|
+
? E
|
|
864
|
+
: never;
|
|
1041
865
|
};
|
|
1042
866
|
|
|
1043
867
|
// EventType["click"] = MouseEvent
|
|
@@ -1054,12 +878,7 @@ export namespace JSX {
|
|
|
1054
878
|
* 2. Includes `keys` defined by `Element` and `Node` interfaces.
|
|
1055
879
|
*/
|
|
1056
880
|
interface ElementAttributes<T>
|
|
1057
|
-
extends
|
|
1058
|
-
CustomAttributes<T>,
|
|
1059
|
-
PropAttributes,
|
|
1060
|
-
OnAttributes<T>,
|
|
1061
|
-
EventHandlersElement<T>,
|
|
1062
|
-
AriaAttributes {
|
|
881
|
+
extends CustomAttributes<T>, PropAttributes, EventHandlersElement<T>, AriaAttributes {
|
|
1063
882
|
// [key: ClassKeys]: boolean;
|
|
1064
883
|
|
|
1065
884
|
// properties
|
|
@@ -1081,7 +900,7 @@ export namespace JSX {
|
|
|
1081
900
|
* with reactive values directly; manually-built strings re-run the whole
|
|
1082
901
|
* concatenation on every change instead of toggling the affected classes.
|
|
1083
902
|
*/
|
|
1084
|
-
class?:
|
|
903
|
+
class?: ClassValue | RemoveAttribute;
|
|
1085
904
|
elementtiming?: string | RemoveAttribute;
|
|
1086
905
|
id?: string | RemoveAttribute;
|
|
1087
906
|
nonce?: string | RemoveAttribute;
|
|
@@ -1723,10 +1542,7 @@ export namespace JSX {
|
|
|
1723
1542
|
src?: string | RemoveAttribute;
|
|
1724
1543
|
|
|
1725
1544
|
onEncrypted?: EventHandlerUnion<T, MediaEncryptedEvent> | undefined;
|
|
1726
|
-
"on:encrypted"?: EventHandlerWithOptionsUnion<T, MediaEncryptedEvent> | undefined;
|
|
1727
|
-
|
|
1728
1545
|
onWaitingForKey?: EventHandlerUnion<T, Event> | undefined;
|
|
1729
|
-
"on:waitingforkey"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
|
|
1730
1546
|
|
|
1731
1547
|
/** @deprecated */
|
|
1732
1548
|
mediagroup?: string | RemoveAttribute;
|
|
@@ -2064,10 +1880,7 @@ export namespace JSX {
|
|
|
2064
1880
|
width?: number | string | RemoveAttribute;
|
|
2065
1881
|
|
|
2066
1882
|
onEnterPictureInPicture?: EventHandlerUnion<T, PictureInPictureEvent> | undefined;
|
|
2067
|
-
"on:enterpictureinpicture"?: EventHandlerWithOptionsUnion<T, PictureInPictureEvent> | undefined;
|
|
2068
|
-
|
|
2069
1883
|
onLeavePictureInPicture?: EventHandlerUnion<T, PictureInPictureEvent> | undefined;
|
|
2070
|
-
"on:leavepictureinpicture"?: EventHandlerWithOptionsUnion<T, PictureInPictureEvent> | undefined;
|
|
2071
1884
|
}
|
|
2072
1885
|
|
|
2073
1886
|
interface WebViewHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
@@ -2174,7 +1987,7 @@ export namespace JSX {
|
|
|
2174
1987
|
* with reactive values directly; manually-built strings re-run the whole
|
|
2175
1988
|
* concatenation on every change instead of toggling the affected classes.
|
|
2176
1989
|
*/
|
|
2177
|
-
class?:
|
|
1990
|
+
class?: ClassValue | RemoveAttribute;
|
|
2178
1991
|
style?: CSSProperties | string | RemoveAttribute;
|
|
2179
1992
|
}
|
|
2180
1993
|
interface TransformableSVGAttributes {
|
|
@@ -2346,14 +2159,10 @@ export namespace JSX {
|
|
|
2346
2159
|
interface AnimationElementSVGAttributes<T>
|
|
2347
2160
|
extends SVGAttributes<T>, ExternalResourceSVGAttributes, ConditionalProcessingSVGAttributes {
|
|
2348
2161
|
onBegin?: EventHandlerUnion<T, TimeEvent> | undefined;
|
|
2349
|
-
"on:begin"?: EventHandlerWithOptionsUnion<T, TimeEvent> | undefined;
|
|
2350
|
-
|
|
2351
2162
|
onEnd?: EventHandlerUnion<T, TimeEvent> | undefined;
|
|
2352
|
-
"on:end"?: EventHandlerWithOptionsUnion<T, TimeEvent> | undefined;
|
|
2353
|
-
|
|
2354
2163
|
onRepeat?: EventHandlerUnion<T, TimeEvent> | undefined;
|
|
2355
|
-
"on:repeat"?: EventHandlerWithOptionsUnion<T, TimeEvent> | undefined;
|
|
2356
2164
|
}
|
|
2165
|
+
|
|
2357
2166
|
interface ContainerElementSVGAttributes<T>
|
|
2358
2167
|
extends
|
|
2359
2168
|
SVGAttributes<T>,
|
|
@@ -2369,6 +2178,7 @@ export namespace JSX {
|
|
|
2369
2178
|
| "color-interpolation"
|
|
2370
2179
|
| "color-rendering"
|
|
2371
2180
|
> {}
|
|
2181
|
+
|
|
2372
2182
|
interface FilterPrimitiveElementSVGAttributes<T>
|
|
2373
2183
|
extends SVGAttributes<T>, Pick<PresentationSVGAttributes, "color-interpolation-filters"> {
|
|
2374
2184
|
height?: number | string | RemoveAttribute;
|
package/types-cjs/server.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { JSX } from "./jsx.cjs";
|
|
2
|
+
export const DOMWithState: Record<string, Record<string, 1 | 2>>;
|
|
2
3
|
export const ChildProperties: Set<string>;
|
|
3
4
|
export const DelegatedEvents: Set<string>;
|
|
4
5
|
export const DOMElements: Set<string>;
|
|
@@ -124,7 +125,23 @@ export function insert<T>(
|
|
|
124
125
|
export function spread<T>(node: Element, accessor: T, skipChildren?: Boolean): void;
|
|
125
126
|
|
|
126
127
|
/** @deprecated not supported on the server side */
|
|
127
|
-
export function delegateEvents(eventNames: string[]
|
|
128
|
+
export function delegateEvents(eventNames: string[]): void;
|
|
129
|
+
/** @deprecated not supported on the server side */
|
|
130
|
+
export function registerDelegatedRoot(root: MountableElement): void;
|
|
131
|
+
/** @deprecated not supported on the server side */
|
|
132
|
+
export function unregisterDelegatedRoot(root: MountableElement): void;
|
|
133
|
+
/** @deprecated not supported on the server side */
|
|
134
|
+
export function registerDelegatedContainer(
|
|
135
|
+
container: MountableElement,
|
|
136
|
+
owner?: MountableElement
|
|
137
|
+
): void;
|
|
138
|
+
/** @deprecated not supported on the server side */
|
|
139
|
+
export function unregisterDelegatedContainer(
|
|
140
|
+
container: MountableElement,
|
|
141
|
+
owner?: MountableElement
|
|
142
|
+
): void;
|
|
143
|
+
/** @deprecated not supported on the server side */
|
|
144
|
+
export function getDelegatedRoot(node: MountableElement): MountableElement | undefined;
|
|
128
145
|
/** @deprecated not supported on the server side */
|
|
129
146
|
export function dynamicProperty(props: unknown, key: string): unknown;
|
|
130
147
|
/** @deprecated not supported on the server side */
|
|
@@ -133,12 +150,7 @@ export function setAttribute(node: Element, name: string, value: string): void;
|
|
|
133
150
|
export function setAttributeNS(node: Element, namespace: string, name: string, value: string): void;
|
|
134
151
|
|
|
135
152
|
/** @deprecated not supported on the server side */
|
|
136
|
-
export function
|
|
137
|
-
node: Element,
|
|
138
|
-
name: string,
|
|
139
|
-
handler: () => void,
|
|
140
|
-
delegate: boolean
|
|
141
|
-
): void;
|
|
153
|
+
export function addEvent(node: Element, name: string, handler: () => void, delegate: boolean): void;
|
|
142
154
|
|
|
143
155
|
/** @deprecated not supported on the server side */
|
|
144
156
|
export function render(code: () => JSX.Element, element: MountableElement): () => void;
|
|
@@ -172,3 +184,10 @@ export function getNextMatch(start: Node, elementName: string): Element;
|
|
|
172
184
|
export function getNextMarker(start: Node): [Node, Array<Node>];
|
|
173
185
|
/** @deprecated not supported on the server side */
|
|
174
186
|
export function runHydrationEvents(): void;
|
|
187
|
+
/** @deprecated not supported on the server side */
|
|
188
|
+
export function ref(
|
|
189
|
+
fn: () => ((element: Element) => void) | ((element: Element) => void)[],
|
|
190
|
+
element: Element
|
|
191
|
+
): void;
|
|
192
|
+
/** @deprecated not supported on the server side */
|
|
193
|
+
export function setStyleProperty(node: Element, name: string, value: any): void;
|