@@ -59,6 +59,22 @@ interface CommandEventInit extends EventInit {
5959 command : string ;
6060}
6161
62+ /** [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/SnapEvent) */
63+ interface SnapEvent extends Event {
64+ readonly snapTargetBlock : Element | null ;
65+ readonly snapTargetInline : Element | null ;
66+ }
67+
68+ declare var SnapEvent : {
69+ prototype : SnapEvent ;
70+ new ( type : string , eventInitDict ?: SnapEventInit ) : SnapEvent ;
71+ }
72+
73+ interface SnapEventInit extends EventInit {
74+ snapTargetBlock ?: Element | null ;
75+ snapTargetInline ?: Element | null ;
76+ }
77+
6278export namespace JSXInternal {
6379 export type LibraryManagedAttributes < Component , Props > = Component extends {
6480 defaultProps : infer Defaults ;
@@ -563,6 +579,11 @@ export namespace JSXInternal {
563579 PointerEvent
564580 > ;
565581 /** @deprecated Please import from the Preact namespace instead */
582+ export type TargetedSnapEvent < Target extends EventTarget > = TargetedEvent <
583+ Target ,
584+ SnapEvent
585+ > ;
586+ /** @deprecated Please import from the Preact namespace instead */
566587 export type TargetedSubmitEvent < Target extends EventTarget > = TargetedEvent <
567588 Target ,
568589 SubmitEvent
@@ -647,6 +668,10 @@ export namespace JSXInternal {
647668 TargetedPointerEvent < Target >
648669 > ;
649670 /** @deprecated Please import from the Preact namespace instead */
671+ export type SnapEventHandler < Target extends EventTarget > = EventHandler <
672+ TargetedSnapEvent < Target >
673+ > ;
674+ /** @deprecated Please import from the Preact namespace instead */
650675 export type SubmitEventHandler < Target extends EventTarget > = EventHandler <
651676 TargetedSubmitEvent < Target >
652677 > ;
@@ -869,6 +894,10 @@ export namespace JSXInternal {
869894 onScrollCapture ?: GenericEventHandler < Target > | undefined ;
870895 onScrollEnd ?: GenericEventHandler < Target > | undefined ;
871896 onScrollEndCapture ?: GenericEventHandler < Target > | undefined ;
897+ onScrollSnapChange ?: SnapEventHandler < Target > | undefined ;
898+ onScrollSnapChangeCapture ?: SnapEventHandler < Target > | undefined ;
899+ onScrollSnapChanging ?: SnapEventHandler < Target > | undefined ;
900+ onScrollSnapChangingCapture ?: SnapEventHandler < Target > | undefined ;
872901
873902 // Wheel Events
874903 onWheel ?: WheelEventHandler < Target > | undefined ;
0 commit comments