From 0820ee12d6f471bff675245ac1ffee18b22a6725 Mon Sep 17 00:00:00 2001 From: eric thul Date: Sun, 15 Apr 2018 08:50:12 -0400 Subject: [PATCH 1/4] Refactor events --- .gitignore | 1 + src/React.purs | 2 +- src/React/DOM/Props.purs | 285 +++++++++++++++-------------- src/React/SyntheticEvent.js | 34 +--- src/React/SyntheticEvent.purs | 335 ++++++++++++++++++++++++++++------ 5 files changed, 440 insertions(+), 217 deletions(-) diff --git a/.gitignore b/.gitignore index da6c2f6..e284bdc 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,6 @@ bower_components/ node_modules/ output/ +yarn-error.log .psc-package .psc-ide-port diff --git a/src/React.purs b/src/React.purs index 2fec580..571f6ba 100644 --- a/src/React.purs +++ b/src/React.purs @@ -71,7 +71,7 @@ import Control.Monad.Eff.Uncurried (EffFn2, runEffFn2) import Data.Nullable (Nullable) -import React.SyntheticEvent (preventDefault, isDefaultPrevented, stopPropagation, isPropagationStopped, persist) as SyntheticEvent +import React.SyntheticEvent as SyntheticEvent import Unsafe.Coerce (unsafeCoerce) diff --git a/src/React/DOM/Props.purs b/src/React/DOM/Props.purs index 8024314..79d14c8 100644 --- a/src/React/DOM/Props.purs +++ b/src/React/DOM/Props.purs @@ -2,10 +2,13 @@ module React.DOM.Props where import Data.Nullable (Nullable) -import React (SyntheticEventHandlerContext, Ref, handle) +import React + ( Ref + , handle -import React.SyntheticEvent - ( SyntheticEvent + , SyntheticEventHandlerContext + + , SyntheticEvent , SyntheticAnimationEvent , SyntheticClipboardEvent , SyntheticCompositionEvent @@ -479,555 +482,555 @@ unselectable :: Boolean -> Props unselectable = unsafeMkProps "unselectable" onAnimationStart :: forall eff props state result. - (SyntheticAnimationEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticAnimationEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onAnimationStart f = unsafeMkProps "onAnimationStart" (handle f) onAnimationEnd :: forall eff props state result. - (SyntheticAnimationEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticAnimationEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onAnimationEnd f = unsafeMkProps "onAnimationEnd" (handle f) onAnimationIteration :: forall eff props state result. - (SyntheticAnimationEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticAnimationEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onAnimationIteration f = unsafeMkProps "onAnimationIteration" (handle f) onTransitionEnd :: forall eff props state result. - (SyntheticTransitionEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTransitionEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onTransitionEnd f = unsafeMkProps "onTransitionEnd" (handle f) onToggle :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onToggle f = unsafeMkProps "onToggle" (handle f) onError :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onError f = unsafeMkProps "onError" (handle f) onLoad :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onLoad f = unsafeMkProps "onLoad" (handle f) onAbort :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onAbort f = unsafeMkProps "onAbort" (handle f) onCanPlay :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onCanPlay f = unsafeMkProps "onCanPlay" (handle f) onCanPlayThrough :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onCanPlayThrough f = unsafeMkProps "onCanPlayThrough" (handle f) onDurationChange :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onDurationChange f = unsafeMkProps "onDurationChange" (handle f) onEmptied :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onEmptied f = unsafeMkProps "onEmptied" (handle f) onEncrypted :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onEncrypted f = unsafeMkProps "onEncrypted" (handle f) onEnded :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onEnded f = unsafeMkProps "onEnded" (handle f) onLoadedData :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onLoadedData f = unsafeMkProps "onLoadedData" (handle f) onLoadedMetadata :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onLoadedMetadata f = unsafeMkProps "onLoadedMetadata" (handle f) onLoadStart :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onLoadStart f = unsafeMkProps "onLoadStart" (handle f) onPause :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onPause f = unsafeMkProps "onPause" (handle f) onPlay :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onPlay f = unsafeMkProps "onPlay" (handle f) onPlaying :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onPlaying f = unsafeMkProps "onPlaying" (handle f) onProgress :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onProgress f = unsafeMkProps "onProgress" (handle f) onRateChange :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onRateChange f = unsafeMkProps "onRateChange" (handle f) onSeeked :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onSeeked f = unsafeMkProps "onSeeked" (handle f) onSeeking :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onSeeking f = unsafeMkProps "onSeeking" (handle f) onStalled :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onStalled f = unsafeMkProps "onStalled" (handle f) onSuspend :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onSuspend f = unsafeMkProps "onSuspend" (handle f) onTimeUpdate :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onTimeUpdate f = unsafeMkProps "onTimeUpdate" (handle f) onVolumeChange :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onVolumeChange f = unsafeMkProps "onVolumeChange" (handle f) onWaiting :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onWaiting f = unsafeMkProps "onWaiting" (handle f) onCopy :: forall eff props state result. - (SyntheticClipboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticClipboardEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onCopy f = unsafeMkProps "onCopy" (handle f) onCut :: forall eff props state result. - (SyntheticClipboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticClipboardEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onCut f = unsafeMkProps "onCut" (handle f) onPaste :: forall eff props state result. - (SyntheticClipboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticClipboardEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onPaste f = unsafeMkProps "onPaste" (handle f) onCompositionEnd :: forall eff props state result. - (SyntheticCompositionEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticCompositionEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onCompositionEnd f = unsafeMkProps "onCompositionEnd" (handle f) onCompositionStart :: forall eff props state result. - (SyntheticCompositionEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticCompositionEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onCompositionStart f = unsafeMkProps "onCompositionStart" (handle f) onCompositionUpdate :: forall eff props state result. - (SyntheticCompositionEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticCompositionEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onCompositionUpdate f = unsafeMkProps "onCompositionUpdate" (handle f) onKeyDown :: forall eff props state result. - (SyntheticKeyboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticKeyboardEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onKeyDown f = unsafeMkProps "onKeyDown" (handle f) onKeyPress :: forall eff props state result. - (SyntheticKeyboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticKeyboardEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onKeyPress f = unsafeMkProps "onKeyPress" (handle f) onKeyUp :: forall eff props state result. - (SyntheticKeyboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticKeyboardEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onKeyUp f = unsafeMkProps "onKeyUp" (handle f) onFocus :: forall eff props state result. - (SyntheticFocusEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticFocusEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onFocus f = unsafeMkProps "onFocus" (handle f) onBlur :: forall eff props state result. - (SyntheticFocusEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticFocusEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onBlur f = unsafeMkProps "onBlur" (handle f) onChange :: forall eff props state result. - (SyntheticInputEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticInputEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onChange f = unsafeMkProps "onChange" (handle f) onInput :: forall eff props state result. - (SyntheticInputEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticInputEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onInput f = unsafeMkProps "onInput" (handle f) onInvalid :: forall eff props state result. - (SyntheticInputEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticInputEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onInvalid f = unsafeMkProps "onInvalid" (handle f) onSubmit :: forall eff props state result. - (SyntheticInputEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticInputEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onSubmit f = unsafeMkProps "onSubmit" (handle f) onClick :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onClick f = unsafeMkProps "onClick" (handle f) onContextMenu :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onContextMenu f = unsafeMkProps "onContextMenu" (handle f) onDoubleClick :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onDoubleClick f = unsafeMkProps "onDoubleClick" (handle f) onDrag :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onDrag f = unsafeMkProps "onDrag" (handle f) onDragEnd :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onDragEnd f = unsafeMkProps "onDragEnd" (handle f) onDragEnter :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onDragEnter f = unsafeMkProps "onDragEnter" (handle f) onDragExit :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onDragExit f = unsafeMkProps "onDragExit" (handle f) onDragLeave :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onDragLeave f = unsafeMkProps "onDragLeave" (handle f) onDragOver :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onDragOver f = unsafeMkProps "onDragOver" (handle f) onDragStart :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onDragStart f = unsafeMkProps "onDragStart" (handle f) onDrop :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onDrop f = unsafeMkProps "onDrop" (handle f) onMouseDown :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseDown f = unsafeMkProps "onMouseDown" (handle f) onMouseEnter :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseEnter f = unsafeMkProps "onMouseEnter" (handle f) onMouseLeave :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseLeave f = unsafeMkProps "onMouseLeave" (handle f) onMouseMove :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseMove f = unsafeMkProps "onMouseMove" (handle f) onMouseOut :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseOut f = unsafeMkProps "onMouseOut" (handle f) onMouseOver :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseOver f = unsafeMkProps "onMouseOver" (handle f) onMouseUp :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseUp f = unsafeMkProps "onMouseUp" (handle f) onSelect :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onSelect f = unsafeMkProps "onSelect" (handle f) onTouchCancel :: forall eff props state result. - (SyntheticTouchEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTouchEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onTouchCancel f = unsafeMkProps "onTouchCancel" (handle f) onTouchEnd :: forall eff props state result. - (SyntheticTouchEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTouchEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onTouchEnd f = unsafeMkProps "onTouchEnd" (handle f) onTouchMove :: forall eff props state result. - (SyntheticTouchEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTouchEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onTouchMove f = unsafeMkProps "onTouchMove" (handle f) onTouchStart :: forall eff props state result. - (SyntheticTouchEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTouchEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onTouchStart f = unsafeMkProps "onTouchStart" (handle f) onScroll :: forall eff props state result. - (SyntheticUIEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticUIEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onScroll f = unsafeMkProps "onScroll" (handle f) onWheel :: forall eff props state result. - (SyntheticWheelEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticWheelEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onWheel f = unsafeMkProps "onWheel" (handle f) onAnimationStartCapture :: forall eff props state result. - (SyntheticAnimationEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticAnimationEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onAnimationStartCapture f = unsafeMkProps "onAnimationStartCapture" (handle f) onAnimationEndCapture :: forall eff props state result. - (SyntheticAnimationEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticAnimationEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onAnimationEndCapture f = unsafeMkProps "onAnimationEndCapture" (handle f) onAnimationIterationCapture :: forall eff props state result. - (SyntheticAnimationEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticAnimationEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onAnimationIterationCapture f = unsafeMkProps "onAnimationIterationCapture" (handle f) onTransitionEndCapture :: forall eff props state result. - (SyntheticTransitionEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTransitionEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onTransitionEndCapture f = unsafeMkProps "onTransitionEndCapture" (handle f) onToggleCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onToggleCapture f = unsafeMkProps "onToggleCapture" (handle f) onErrorCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onErrorCapture f = unsafeMkProps "onErrorCapture" (handle f) onLoadCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onLoadCapture f = unsafeMkProps "onLoadCapture" (handle f) onAbortCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onAbortCapture f = unsafeMkProps "onAbortCapture" (handle f) onCanPlayCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onCanPlayCapture f = unsafeMkProps "onCanPlayCapture" (handle f) onCanPlayThroughCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onCanPlayThroughCapture f = unsafeMkProps "onCanPlayThroughCapture" (handle f) onDurationChangeCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onDurationChangeCapture f = unsafeMkProps "onDurationChangeCapture" (handle f) onEmptiedCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onEmptiedCapture f = unsafeMkProps "onEmptiedCapture" (handle f) onEncryptedCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onEncryptedCapture f = unsafeMkProps "onEncryptedCapture" (handle f) onEndedCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onEndedCapture f = unsafeMkProps "onEndedCapture" (handle f) onLoadedDataCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onLoadedDataCapture f = unsafeMkProps "onLoadedDataCapture" (handle f) onLoadedMetadataCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onLoadedMetadataCapture f = unsafeMkProps "onLoadedMetadataCapture" (handle f) onLoadStartCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onLoadStartCapture f = unsafeMkProps "onLoadStartCapture" (handle f) onPauseCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onPauseCapture f = unsafeMkProps "onPauseCapture" (handle f) onPlayCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onPlayCapture f = unsafeMkProps "onPlayCapture" (handle f) onPlayingCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onPlayingCapture f = unsafeMkProps "onPlayingCapture" (handle f) onProgressCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onProgressCapture f = unsafeMkProps "onProgressCapture" (handle f) onRateChangeCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onRateChangeCapture f = unsafeMkProps "onRateChangeCapture" (handle f) onSeekedCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onSeekedCapture f = unsafeMkProps "onSeekedCapture" (handle f) onSeekingCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onSeekingCapture f = unsafeMkProps "onSeekingCapture" (handle f) onStalledCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onStalledCapture f = unsafeMkProps "onStalledCapture" (handle f) onSuspendCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onSuspendCapture f = unsafeMkProps "onSuspendCapture" (handle f) onTimeUpdateCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onTimeUpdateCapture f = unsafeMkProps "onTimeUpdateCapture" (handle f) onVolumeChangeCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onVolumeChangeCapture f = unsafeMkProps "onVolumeChangeCapture" (handle f) onWaitingCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onWaitingCapture f = unsafeMkProps "onWaitingCapture" (handle f) onCopyCapture :: forall eff props state result. - (SyntheticClipboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticClipboardEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onCopyCapture f = unsafeMkProps "onCopyCapture" (handle f) onCutCapture :: forall eff props state result. - (SyntheticClipboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticClipboardEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onCutCapture f = unsafeMkProps "onCutCapture" (handle f) onPasteCapture :: forall eff props state result. - (SyntheticClipboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticClipboardEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onPasteCapture f = unsafeMkProps "onPasteCapture" (handle f) onCompositionEndCapture :: forall eff props state result. - (SyntheticCompositionEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticCompositionEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onCompositionEndCapture f = unsafeMkProps "onCompositionEndCapture" (handle f) onCompositionStartCapture :: forall eff props state result. - (SyntheticCompositionEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticCompositionEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onCompositionStartCapture f = unsafeMkProps "onCompositionStartCapture" (handle f) onCompositionUpdateCapture :: forall eff props state result. - (SyntheticCompositionEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticCompositionEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onCompositionUpdateCapture f = unsafeMkProps "onCompositionUpdateCapture" (handle f) onKeyDownCapture :: forall eff props state result. - (SyntheticKeyboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticKeyboardEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onKeyDownCapture f = unsafeMkProps "onKeyDownCapture" (handle f) onKeyPressCapture :: forall eff props state result. - (SyntheticKeyboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticKeyboardEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onKeyPressCapture f = unsafeMkProps "onKeyPressCapture" (handle f) onKeyUpCapture :: forall eff props state result. - (SyntheticKeyboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticKeyboardEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onKeyUpCapture f = unsafeMkProps "onKeyUpCapture" (handle f) onFocusCapture :: forall eff props state result. - (SyntheticFocusEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticFocusEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onFocusCapture f = unsafeMkProps "onFocusCapture" (handle f) onBlurCapture :: forall eff props state result. - (SyntheticFocusEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticFocusEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onBlurCapture f = unsafeMkProps "onBlurCapture" (handle f) onChangeCapture :: forall eff props state result. - (SyntheticInputEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticInputEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onChangeCapture f = unsafeMkProps "onChangeCapture" (handle f) onInputCapture :: forall eff props state result. - (SyntheticInputEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticInputEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onInputCapture f = unsafeMkProps "onInputCapture" (handle f) onInvalidCapture :: forall eff props state result. - (SyntheticInputEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticInputEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onInvalidCapture f = unsafeMkProps "onInvalidCapture" (handle f) onSubmitCapture :: forall eff props state result. - (SyntheticInputEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticInputEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onSubmitCapture f = unsafeMkProps "onSubmitCapture" (handle f) onClickCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onClickCapture f = unsafeMkProps "onClickCapture" (handle f) onContextMenuCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onContextMenuCapture f = unsafeMkProps "onContextMenuCapture" (handle f) onDoubleClickCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onDoubleClickCapture f = unsafeMkProps "onDoubleClickCapture" (handle f) onDragCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onDragCapture f = unsafeMkProps "onDragCapture" (handle f) onDragEndCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onDragEndCapture f = unsafeMkProps "onDragEndCapture" (handle f) onDragEnterCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onDragEnterCapture f = unsafeMkProps "onDragEnterCapture" (handle f) onDragExitCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onDragExitCapture f = unsafeMkProps "onDragExitCapture" (handle f) onDragLeaveCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onDragLeaveCapture f = unsafeMkProps "onDragLeaveCapture" (handle f) onDragOverCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onDragOverCapture f = unsafeMkProps "onDragOverCapture" (handle f) onDragStartCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onDragStartCapture f = unsafeMkProps "onDragStartCapture" (handle f) onDropCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onDropCapture f = unsafeMkProps "onDropCapture" (handle f) onMouseDownCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseDownCapture f = unsafeMkProps "onMouseDownCapture" (handle f) onMouseEnterCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseEnterCapture f = unsafeMkProps "onMouseEnterCapture" (handle f) onMouseLeaveCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseLeaveCapture f = unsafeMkProps "onMouseLeaveCapture" (handle f) onMouseMoveCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseMoveCapture f = unsafeMkProps "onMouseMoveCapture" (handle f) onMouseOutCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseOutCapture f = unsafeMkProps "onMouseOutCapture" (handle f) onMouseOverCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseOverCapture f = unsafeMkProps "onMouseOverCapture" (handle f) onMouseUpCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseUpCapture f = unsafeMkProps "onMouseUpCapture" (handle f) onSelectCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onSelectCapture f = unsafeMkProps "onSelectCapture" (handle f) onTouchCancelCapture :: forall eff props state result. - (SyntheticTouchEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTouchEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onTouchCancelCapture f = unsafeMkProps "onTouchCancelCapture" (handle f) onTouchEndCapture :: forall eff props state result. - (SyntheticTouchEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTouchEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onTouchEndCapture f = unsafeMkProps "onTouchEndCapture" (handle f) onTouchMoveCapture :: forall eff props state result. - (SyntheticTouchEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTouchEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onTouchMoveCapture f = unsafeMkProps "onTouchMoveCapture" (handle f) onTouchStartCapture :: forall eff props state result. - (SyntheticTouchEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTouchEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onTouchStartCapture f = unsafeMkProps "onTouchStartCapture" (handle f) onScrollCapture :: forall eff props state result. - (SyntheticUIEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticUIEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onScrollCapture f = unsafeMkProps "onScrollCapture" (handle f) onWheelCapture :: forall eff props state result. - (SyntheticWheelEvent -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticWheelEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props onWheelCapture f = unsafeMkProps "onWheelCapture" (handle f) ref :: forall eff props state result. diff --git a/src/React/SyntheticEvent.js b/src/React/SyntheticEvent.js index 4384b90..8d57c93 100644 --- a/src/React/SyntheticEvent.js +++ b/src/React/SyntheticEvent.js @@ -1,31 +1,17 @@ 'use strict'; -exports.preventDefault = function preventDefault(event) { - return function() { - return event.preventDefault(); +exports.unsafeGet = function unsafeGet(key) { + return function (event) { + return function () { + return event[key]; + }; }; }; -exports.isDefaultPrevented = function isDefaultPrevented(event) { - return function() { - return event.isDefaultPrevented(); - }; -}; - -exports.stopPropagation = function stopPropagation(event) { - return function() { - return event.stopPropagation(); - }; -}; - -exports.isPropagationStopped = function isPropagationStopped(event) { - return function() { - return event.isPropagationStopped(); - }; -}; - -exports.persist = function persist(event) { - return function() { - return event.persist(); +exports.unsafeGetFn = function unsafeGetFn(key) { + return function (event) { + return function () { + return event[key].bind(event); + }; }; }; diff --git a/src/React/SyntheticEvent.purs b/src/React/SyntheticEvent.purs index d4650e3..eeb35ce 100644 --- a/src/React/SyntheticEvent.purs +++ b/src/React/SyntheticEvent.purs @@ -23,53 +23,120 @@ module React.SyntheticEvent , SyntheticClipboardEvent' , SyntheticCompositionEvent' , SyntheticKeyboardEvent' - , SyntheticFocusEvent' , SyntheticMouseEvent' , SyntheticTouchEvent' , SyntheticTransitionEvent' , SyntheticUIEvent' , SyntheticWheelEvent' + , SyntheticAnimationTransitionEvent' + , SyntheticKeyboardMouseTouchEvent' + , SyntheticFocusMouseEvent' + + , SyntheticEvent_ + , NativeEventTarget , NativeEvent , NativeDataTransfer , NativeAbstractView , NativeTouchList + , bubbles + , cancelable + , currentTarget + , defaultPrevented + , eventPhase + , isTrusted + , nativeEvent , preventDefault , isDefaultPrevented , stopPropagation , isPropagationStopped + , target + , timeStamp + , type_ , persist + , animationName + , clipboardData + , data_ + , relatedTarget + , charCode + , key + , keyCode + , locale + , location + , repeat + , which + , button + , buttons + , clientX + , clientY + , pageX + , pageY + , screenX + , screenY + , changedTouches + , targetTouches + , touches + , altKey + , ctrlKey + , getModifierState + , metaKey + , shiftKey + , propertyName + , pseudoElement + , elapsedTime + , detail + , view + , deltaMode + , deltaX + , deltaY + , deltaZ ) where import Prelude import Control.Monad.Eff (Eff) -type SyntheticEvent = Record (SyntheticEvent' ()) +import Data.Symbol (class IsSymbol, SProxy(..), reflectSymbol) + +type SyntheticEvent eff r + = SyntheticEvent_ (SyntheticEvent' eff r) + +type SyntheticAnimationEvent eff r + = SyntheticEvent_ (SyntheticAnimationEvent' (SyntheticAnimationTransitionEvent' (SyntheticEvent' eff r))) -type SyntheticAnimationEvent = Record (SyntheticAnimationEvent' (SyntheticEvent' ())) +type SyntheticClipboardEvent eff r + = SyntheticEvent_ (SyntheticClipboardEvent' (SyntheticEvent' eff r)) -type SyntheticClipboardEvent = Record (SyntheticClipboardEvent' (SyntheticEvent' ())) +type SyntheticCompositionEvent eff r + = SyntheticEvent_ (SyntheticCompositionEvent' (SyntheticUIEvent' (SyntheticEvent' eff r))) -type SyntheticCompositionEvent = Record (SyntheticCompositionEvent' (SyntheticUIEvent' (SyntheticEvent' ()))) +type SyntheticInputEvent eff r + = SyntheticEvent_ (SyntheticUIEvent' (SyntheticEvent' eff r)) -type SyntheticInputEvent = Record (SyntheticUIEvent' (SyntheticEvent' ())) +type SyntheticKeyboardEvent eff r + = SyntheticEvent_ (SyntheticKeyboardEvent' (SyntheticKeyboardMouseTouchEvent' (SyntheticUIEvent' (SyntheticEvent' eff r)))) -type SyntheticKeyboardEvent = Record (SyntheticKeyboardEvent' (SyntheticUIEvent' (SyntheticEvent' ()))) +type SyntheticFocusEvent eff r + = SyntheticEvent_ (SyntheticFocusMouseEvent' (SyntheticUIEvent' (SyntheticEvent' eff r))) -type SyntheticFocusEvent = Record (SyntheticFocusEvent' (SyntheticUIEvent' (SyntheticEvent' ()))) +type SyntheticMouseEvent eff r + = SyntheticEvent_ (SyntheticMouseEvent' (SyntheticFocusMouseEvent' (SyntheticKeyboardMouseTouchEvent' (SyntheticUIEvent' (SyntheticEvent' eff r))))) -type SyntheticMouseEvent = Record (SyntheticMouseEvent' (SyntheticUIEvent' (SyntheticEvent' ()))) +type SyntheticTouchEvent eff r + = SyntheticEvent_ (SyntheticTouchEvent' (SyntheticKeyboardMouseTouchEvent' (SyntheticUIEvent' (SyntheticEvent' eff r)))) -type SyntheticTouchEvent = Record (SyntheticTouchEvent' (SyntheticUIEvent' (SyntheticEvent' ()))) +type SyntheticTransitionEvent eff r + = SyntheticEvent_ (SyntheticTransitionEvent' (SyntheticAnimationTransitionEvent' (SyntheticEvent' eff r))) -type SyntheticTransitionEvent = Record (SyntheticTransitionEvent' (SyntheticEvent' ())) +type SyntheticUIEvent eff r + = SyntheticEvent_ (SyntheticUIEvent' (SyntheticEvent' eff r)) -type SyntheticUIEvent = Record (SyntheticUIEvent' (SyntheticEvent' ())) +type SyntheticWheelEvent eff r + = SyntheticEvent_ (SyntheticWheelEvent' (SyntheticMouseEvent' (SyntheticEvent' eff r))) -type SyntheticWheelEvent = Record (SyntheticWheelEvent' (SyntheticMouseEvent' (SyntheticEvent' ()))) +foreign import data SyntheticEvent_ :: # Type -> Type foreign import data NativeEventTarget :: Type @@ -81,17 +148,7 @@ foreign import data NativeAbstractView :: Type foreign import data NativeTouchList :: Type -foreign import preventDefault :: forall eff r. Record (SyntheticEvent' r) -> Eff eff Unit - -foreign import isDefaultPrevented :: forall eff r. Record (SyntheticEvent' r) -> Eff eff Boolean - -foreign import stopPropagation :: forall eff r. Record (SyntheticEvent' r) -> Eff eff Unit - -foreign import isPropagationStopped :: forall eff r. Record (SyntheticEvent' r) -> Eff eff Boolean - -foreign import persist :: forall eff r. Record (SyntheticEvent' r) -> Eff eff Unit - -type SyntheticEvent' r +type SyntheticEvent' eff r = ( bubbles :: Boolean , cancelable :: Boolean , currentTarget :: NativeEventTarget @@ -99,16 +156,19 @@ type SyntheticEvent' r , eventPhase :: Number , isTrusted :: Boolean , nativeEvent :: NativeEvent + , preventDefault :: Eff eff Unit + , isDefaultPrevented :: Eff eff Boolean + , stopPropagation :: Eff eff Unit + , isPropagationStopped :: Eff eff Boolean , target :: NativeEventTarget , timeStamp :: Number , type :: String + , persist :: Eff eff Unit | r ) type SyntheticAnimationEvent' r = ( animationName :: String - , pseudoElement :: String - , elapsedTime :: Number | r ) @@ -122,52 +182,32 @@ type SyntheticCompositionEvent' r | r ) -type SyntheticFocusEvent' r - = ( relatedTarget :: NativeEventTarget - | r - ) - type SyntheticKeyboardEvent' r - = ( altKey :: Boolean - , charCode :: Int - , ctrlKey :: Boolean - , getModifierState :: String -> Boolean + = ( charCode :: Int , key :: String , keyCode :: Number , locale :: String , location :: Number - , metaKey :: Boolean , repeat :: Boolean - , shiftKey :: Boolean , which :: Number | r ) type SyntheticMouseEvent' r - = ( altKey :: Boolean - , button :: Number + = ( button :: Number , buttons :: Number , clientX :: Number , clientY :: Number - , ctrlKey :: Boolean - , getModifierState :: String -> Boolean - , metaKey :: Boolean , pageX :: Number , pageY :: Number , relatedTarget :: NativeEventTarget , screenX :: Number , screenY :: Number - , shiftKey :: Boolean | r ) type SyntheticTouchEvent' r - = ( altKey :: Boolean - , changedTouches :: NativeTouchList - , ctrlKey :: Boolean - , getModifierState :: String -> Boolean - , metaKey :: Boolean - , shiftKey :: Boolean + = ( changedTouches :: NativeTouchList , targetTouches :: NativeTouchList , touches :: NativeTouchList | r @@ -175,8 +215,6 @@ type SyntheticTouchEvent' r type SyntheticTransitionEvent' r = ( propertyName :: String - , pseudoElement :: String - , elapsedTime :: Number | r ) @@ -193,3 +231,198 @@ type SyntheticWheelEvent' r , deltaZ :: Number | r ) + +type SyntheticAnimationTransitionEvent' r + = ( pseudoElement :: String + , elapsedTime :: Number + | r + ) + +type SyntheticFocusMouseEvent' r + = ( relatedTarget :: NativeEventTarget + | r + ) + +type SyntheticKeyboardMouseTouchEvent' r + = ( altKey :: Boolean + , ctrlKey :: Boolean + , getModifierState :: String -> Boolean + , metaKey :: Boolean + , shiftKey :: Boolean + | r + ) + +bubbles :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff Boolean +bubbles = get (SProxy :: SProxy "bubbles") + +cancelable :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff Boolean +cancelable = get (SProxy :: SProxy "cancelable") + +currentTarget :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff NativeEventTarget +currentTarget = get (SProxy :: SProxy "currentTarget") + +defaultPrevented :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff Boolean +defaultPrevented = get (SProxy :: SProxy "defaultPrevented") + +eventPhase :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff Number +eventPhase = get (SProxy :: SProxy "eventPhase") + +isTrusted :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff Boolean +isTrusted = get (SProxy :: SProxy "isTrusted") + +nativeEvent :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff NativeEvent +nativeEvent = get (SProxy :: SProxy "nativeEvent") + +preventDefault :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff Unit +preventDefault = join <<< getFn (SProxy :: SProxy "preventDefault") + +isDefaultPrevented :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff Boolean +isDefaultPrevented = join <<< getFn (SProxy :: SProxy "isDefaultPrevented") + +stopPropagation :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff Unit +stopPropagation = join <<< getFn (SProxy :: SProxy "stopPropagation") + +isPropagationStopped :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff Boolean +isPropagationStopped = join <<< getFn (SProxy :: SProxy "isPropagationStopped") + +target :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff NativeEventTarget +target = get (SProxy :: SProxy "target") + +timeStamp :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff Number +timeStamp = get (SProxy :: SProxy "timeStamp") + +type_ :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff String +type_ = get (SProxy :: SProxy "type") + +persist :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff Unit +persist = join <<< get (SProxy :: SProxy "persist") + +animationName :: forall eff r. SyntheticEvent_ (SyntheticAnimationEvent' r) -> Eff eff String +animationName = get (SProxy :: SProxy "animationName") + +clipboardData :: forall eff r. SyntheticEvent_ (SyntheticClipboardEvent' r) -> Eff eff NativeDataTransfer +clipboardData = get (SProxy :: SProxy "clipboardData") + +data_ :: forall eff r. SyntheticEvent_ (SyntheticCompositionEvent' r) -> Eff eff String +data_ = get (SProxy :: SProxy "data") + +relatedTarget :: forall eff r. SyntheticEvent_ (SyntheticFocusMouseEvent' r) -> Eff eff NativeEventTarget +relatedTarget = get (SProxy :: SProxy "relatedTarget") + +charCode :: forall eff r. SyntheticEvent_ (SyntheticKeyboardEvent' r) -> Eff eff Int +charCode = get (SProxy :: SProxy "charCode") + +key :: forall eff r. SyntheticEvent_ (SyntheticKeyboardEvent' r) -> Eff eff String +key = get (SProxy :: SProxy "key") + +keyCode :: forall eff r. SyntheticEvent_ (SyntheticKeyboardEvent' r) -> Eff eff Number +keyCode = get (SProxy :: SProxy "keyCode") + +locale :: forall eff r. SyntheticEvent_ (SyntheticKeyboardEvent' r) -> Eff eff String +locale = get (SProxy :: SProxy "locale") + +location :: forall eff r. SyntheticEvent_ (SyntheticKeyboardEvent' r) -> Eff eff Number +location = get (SProxy :: SProxy "location") + +repeat :: forall eff r. SyntheticEvent_ (SyntheticKeyboardEvent' r) -> Eff eff Boolean +repeat = get (SProxy :: SProxy "repeat") + +which :: forall eff r. SyntheticEvent_ (SyntheticKeyboardEvent' r) -> Eff eff Number +which = get (SProxy :: SProxy "which") + +button :: forall eff r. SyntheticEvent_ (SyntheticMouseEvent' r) -> Eff eff Number +button = get (SProxy :: SProxy "button") + +buttons :: forall eff r. SyntheticEvent_ (SyntheticMouseEvent' r) -> Eff eff Number +buttons = get (SProxy :: SProxy "buttons") + +clientX :: forall eff r. SyntheticEvent_ (SyntheticMouseEvent' r) -> Eff eff Number +clientX = get (SProxy :: SProxy "clientX") + +clientY :: forall eff r. SyntheticEvent_ (SyntheticMouseEvent' r) -> Eff eff Number +clientY = get (SProxy :: SProxy "clientY") + +pageX :: forall eff r. SyntheticEvent_ (SyntheticMouseEvent' r) -> Eff eff Number +pageX = get (SProxy :: SProxy "pageX") + +pageY :: forall eff r. SyntheticEvent_ (SyntheticMouseEvent' r) -> Eff eff Number +pageY = get (SProxy :: SProxy "pageY") + +screenX :: forall eff r. SyntheticEvent_ (SyntheticMouseEvent' r) -> Eff eff Number +screenX = get (SProxy :: SProxy "screenX") + +screenY :: forall eff r. SyntheticEvent_ (SyntheticMouseEvent' r) -> Eff eff Number +screenY = get (SProxy :: SProxy "screenY") + +changedTouches :: forall eff r. SyntheticEvent_ (SyntheticTouchEvent' r) -> Eff eff NativeTouchList +changedTouches = get (SProxy :: SProxy "changedTouches") + +targetTouches :: forall eff r. SyntheticEvent_ (SyntheticTouchEvent' r) -> Eff eff NativeTouchList +targetTouches = get (SProxy :: SProxy "targetTouches") + +touches :: forall eff r. SyntheticEvent_ (SyntheticTouchEvent' r) -> Eff eff NativeTouchList +touches = get (SProxy :: SProxy "touches") + +altKey :: forall eff r. SyntheticEvent_ (SyntheticKeyboardMouseTouchEvent' r) -> Eff eff Boolean +altKey = get (SProxy :: SProxy "altKey") + +ctrlKey :: forall eff r. SyntheticEvent_ (SyntheticKeyboardMouseTouchEvent' r) -> Eff eff Boolean +ctrlKey = get (SProxy :: SProxy "ctrlKey") + +getModifierState :: forall eff r. String -> SyntheticEvent_ (SyntheticKeyboardMouseTouchEvent' r) -> Eff eff Boolean +getModifierState a = map ((#) a) <<< getFn (SProxy :: SProxy "getModifierState") + +metaKey :: forall eff r. SyntheticEvent_ (SyntheticKeyboardMouseTouchEvent' r) -> Eff eff Boolean +metaKey = get (SProxy :: SProxy "metaKey") + +shiftKey :: forall eff r. SyntheticEvent_ (SyntheticKeyboardMouseTouchEvent' r) -> Eff eff Boolean +shiftKey = get (SProxy :: SProxy "shiftKey") + +propertyName :: forall eff r. SyntheticEvent_ (SyntheticTransitionEvent' r) -> Eff eff String +propertyName = get (SProxy :: SProxy "propertyName") + +pseudoElement :: forall eff r. SyntheticEvent_ (SyntheticAnimationTransitionEvent' r) -> Eff eff String +pseudoElement = get (SProxy :: SProxy "pseudoElement") + +elapsedTime :: forall eff r. SyntheticEvent_ (SyntheticAnimationTransitionEvent' r) -> Eff eff Number +elapsedTime = get (SProxy :: SProxy "elapsedTime") + +detail :: forall eff r. SyntheticEvent_ (SyntheticUIEvent' r) -> Eff eff Number +detail = get (SProxy :: SProxy "detail") + +view :: forall eff r. SyntheticEvent_ (SyntheticUIEvent' r) -> Eff eff NativeAbstractView +view = get (SProxy :: SProxy "view") + +deltaMode :: forall eff r. SyntheticEvent_ (SyntheticWheelEvent' r) -> Eff eff Number +deltaMode = get (SProxy :: SProxy "deltaMode") + +deltaX :: forall eff r. SyntheticEvent_ (SyntheticWheelEvent' r) -> Eff eff Number +deltaX = get (SProxy :: SProxy "deltaX") + +deltaY :: forall eff r. SyntheticEvent_ (SyntheticWheelEvent' r) -> Eff eff Number +deltaY = get (SProxy :: SProxy "deltaY") + +deltaZ :: forall eff r. SyntheticEvent_ (SyntheticWheelEvent' r) -> Eff eff Number +deltaZ = get (SProxy :: SProxy "deltaZ") + +get + :: forall eff l r s a + . RowCons l a r s + => IsSymbol l + => SProxy l + -> SyntheticEvent_ s + -> Eff eff a +get l r = unsafeGet (reflectSymbol l) r + +getFn + :: forall eff l r s a + . RowCons l a r s + => IsSymbol l + => SProxy l + -> SyntheticEvent_ s + -> Eff eff a +getFn l r = unsafeGet (reflectSymbol l) r + +foreign import unsafeGet :: forall eff r a. String -> SyntheticEvent_ r -> Eff eff a + +foreign import unsafeGetFn :: forall eff r a. String -> SyntheticEvent_ r -> Eff eff a From 5596b8cd09e6c97062995b343633fdee5a436765 Mon Sep 17 00:00:00 2001 From: eric thul Date: Sun, 15 Apr 2018 09:02:38 -0400 Subject: [PATCH 2/4] Fix getFn function --- src/React/SyntheticEvent.purs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/React/SyntheticEvent.purs b/src/React/SyntheticEvent.purs index eeb35ce..3d183be 100644 --- a/src/React/SyntheticEvent.purs +++ b/src/React/SyntheticEvent.purs @@ -421,7 +421,7 @@ getFn => SProxy l -> SyntheticEvent_ s -> Eff eff a -getFn l r = unsafeGet (reflectSymbol l) r +getFn l r = unsafeGetFn (reflectSymbol l) r foreign import unsafeGet :: forall eff r a. String -> SyntheticEvent_ r -> Eff eff a From 9b4515933d9d87cdbcc079d130f48cff9db3a076 Mon Sep 17 00:00:00 2001 From: eric thul Date: Sun, 15 Apr 2018 14:17:56 -0400 Subject: [PATCH 3/4] Remove eff from SyntheticEvent --- src/React/DOM/Props.purs | 276 +++++++++++++++++----------------- src/React/SyntheticEvent.js | 42 +++++- src/React/SyntheticEvent.purs | 117 ++++++-------- 3 files changed, 221 insertions(+), 214 deletions(-) diff --git a/src/React/DOM/Props.purs b/src/React/DOM/Props.purs index 79d14c8..0cf48af 100644 --- a/src/React/DOM/Props.purs +++ b/src/React/DOM/Props.purs @@ -482,555 +482,555 @@ unselectable :: Boolean -> Props unselectable = unsafeMkProps "unselectable" onAnimationStart :: forall eff props state result. - (SyntheticAnimationEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticAnimationEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onAnimationStart f = unsafeMkProps "onAnimationStart" (handle f) onAnimationEnd :: forall eff props state result. - (SyntheticAnimationEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticAnimationEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onAnimationEnd f = unsafeMkProps "onAnimationEnd" (handle f) onAnimationIteration :: forall eff props state result. - (SyntheticAnimationEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticAnimationEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onAnimationIteration f = unsafeMkProps "onAnimationIteration" (handle f) onTransitionEnd :: forall eff props state result. - (SyntheticTransitionEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTransitionEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onTransitionEnd f = unsafeMkProps "onTransitionEnd" (handle f) onToggle :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onToggle f = unsafeMkProps "onToggle" (handle f) onError :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onError f = unsafeMkProps "onError" (handle f) onLoad :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onLoad f = unsafeMkProps "onLoad" (handle f) onAbort :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onAbort f = unsafeMkProps "onAbort" (handle f) onCanPlay :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onCanPlay f = unsafeMkProps "onCanPlay" (handle f) onCanPlayThrough :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onCanPlayThrough f = unsafeMkProps "onCanPlayThrough" (handle f) onDurationChange :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onDurationChange f = unsafeMkProps "onDurationChange" (handle f) onEmptied :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onEmptied f = unsafeMkProps "onEmptied" (handle f) onEncrypted :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onEncrypted f = unsafeMkProps "onEncrypted" (handle f) onEnded :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onEnded f = unsafeMkProps "onEnded" (handle f) onLoadedData :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onLoadedData f = unsafeMkProps "onLoadedData" (handle f) onLoadedMetadata :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onLoadedMetadata f = unsafeMkProps "onLoadedMetadata" (handle f) onLoadStart :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onLoadStart f = unsafeMkProps "onLoadStart" (handle f) onPause :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onPause f = unsafeMkProps "onPause" (handle f) onPlay :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onPlay f = unsafeMkProps "onPlay" (handle f) onPlaying :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onPlaying f = unsafeMkProps "onPlaying" (handle f) onProgress :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onProgress f = unsafeMkProps "onProgress" (handle f) onRateChange :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onRateChange f = unsafeMkProps "onRateChange" (handle f) onSeeked :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onSeeked f = unsafeMkProps "onSeeked" (handle f) onSeeking :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onSeeking f = unsafeMkProps "onSeeking" (handle f) onStalled :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onStalled f = unsafeMkProps "onStalled" (handle f) onSuspend :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onSuspend f = unsafeMkProps "onSuspend" (handle f) onTimeUpdate :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onTimeUpdate f = unsafeMkProps "onTimeUpdate" (handle f) onVolumeChange :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onVolumeChange f = unsafeMkProps "onVolumeChange" (handle f) onWaiting :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onWaiting f = unsafeMkProps "onWaiting" (handle f) onCopy :: forall eff props state result. - (SyntheticClipboardEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticClipboardEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onCopy f = unsafeMkProps "onCopy" (handle f) onCut :: forall eff props state result. - (SyntheticClipboardEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticClipboardEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onCut f = unsafeMkProps "onCut" (handle f) onPaste :: forall eff props state result. - (SyntheticClipboardEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticClipboardEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onPaste f = unsafeMkProps "onPaste" (handle f) onCompositionEnd :: forall eff props state result. - (SyntheticCompositionEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticCompositionEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onCompositionEnd f = unsafeMkProps "onCompositionEnd" (handle f) onCompositionStart :: forall eff props state result. - (SyntheticCompositionEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticCompositionEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onCompositionStart f = unsafeMkProps "onCompositionStart" (handle f) onCompositionUpdate :: forall eff props state result. - (SyntheticCompositionEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticCompositionEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onCompositionUpdate f = unsafeMkProps "onCompositionUpdate" (handle f) onKeyDown :: forall eff props state result. - (SyntheticKeyboardEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticKeyboardEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onKeyDown f = unsafeMkProps "onKeyDown" (handle f) onKeyPress :: forall eff props state result. - (SyntheticKeyboardEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticKeyboardEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onKeyPress f = unsafeMkProps "onKeyPress" (handle f) onKeyUp :: forall eff props state result. - (SyntheticKeyboardEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticKeyboardEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onKeyUp f = unsafeMkProps "onKeyUp" (handle f) onFocus :: forall eff props state result. - (SyntheticFocusEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticFocusEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onFocus f = unsafeMkProps "onFocus" (handle f) onBlur :: forall eff props state result. - (SyntheticFocusEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticFocusEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onBlur f = unsafeMkProps "onBlur" (handle f) onChange :: forall eff props state result. - (SyntheticInputEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticInputEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onChange f = unsafeMkProps "onChange" (handle f) onInput :: forall eff props state result. - (SyntheticInputEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticInputEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onInput f = unsafeMkProps "onInput" (handle f) onInvalid :: forall eff props state result. - (SyntheticInputEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticInputEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onInvalid f = unsafeMkProps "onInvalid" (handle f) onSubmit :: forall eff props state result. - (SyntheticInputEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticInputEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onSubmit f = unsafeMkProps "onSubmit" (handle f) onClick :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onClick f = unsafeMkProps "onClick" (handle f) onContextMenu :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onContextMenu f = unsafeMkProps "onContextMenu" (handle f) onDoubleClick :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onDoubleClick f = unsafeMkProps "onDoubleClick" (handle f) onDrag :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onDrag f = unsafeMkProps "onDrag" (handle f) onDragEnd :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onDragEnd f = unsafeMkProps "onDragEnd" (handle f) onDragEnter :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onDragEnter f = unsafeMkProps "onDragEnter" (handle f) onDragExit :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onDragExit f = unsafeMkProps "onDragExit" (handle f) onDragLeave :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onDragLeave f = unsafeMkProps "onDragLeave" (handle f) onDragOver :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onDragOver f = unsafeMkProps "onDragOver" (handle f) onDragStart :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onDragStart f = unsafeMkProps "onDragStart" (handle f) onDrop :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onDrop f = unsafeMkProps "onDrop" (handle f) onMouseDown :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseDown f = unsafeMkProps "onMouseDown" (handle f) onMouseEnter :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseEnter f = unsafeMkProps "onMouseEnter" (handle f) onMouseLeave :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseLeave f = unsafeMkProps "onMouseLeave" (handle f) onMouseMove :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseMove f = unsafeMkProps "onMouseMove" (handle f) onMouseOut :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseOut f = unsafeMkProps "onMouseOut" (handle f) onMouseOver :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseOver f = unsafeMkProps "onMouseOver" (handle f) onMouseUp :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseUp f = unsafeMkProps "onMouseUp" (handle f) onSelect :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onSelect f = unsafeMkProps "onSelect" (handle f) onTouchCancel :: forall eff props state result. - (SyntheticTouchEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTouchEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onTouchCancel f = unsafeMkProps "onTouchCancel" (handle f) onTouchEnd :: forall eff props state result. - (SyntheticTouchEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTouchEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onTouchEnd f = unsafeMkProps "onTouchEnd" (handle f) onTouchMove :: forall eff props state result. - (SyntheticTouchEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTouchEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onTouchMove f = unsafeMkProps "onTouchMove" (handle f) onTouchStart :: forall eff props state result. - (SyntheticTouchEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTouchEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onTouchStart f = unsafeMkProps "onTouchStart" (handle f) onScroll :: forall eff props state result. - (SyntheticUIEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticUIEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onScroll f = unsafeMkProps "onScroll" (handle f) onWheel :: forall eff props state result. - (SyntheticWheelEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticWheelEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onWheel f = unsafeMkProps "onWheel" (handle f) onAnimationStartCapture :: forall eff props state result. - (SyntheticAnimationEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticAnimationEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onAnimationStartCapture f = unsafeMkProps "onAnimationStartCapture" (handle f) onAnimationEndCapture :: forall eff props state result. - (SyntheticAnimationEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticAnimationEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onAnimationEndCapture f = unsafeMkProps "onAnimationEndCapture" (handle f) onAnimationIterationCapture :: forall eff props state result. - (SyntheticAnimationEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticAnimationEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onAnimationIterationCapture f = unsafeMkProps "onAnimationIterationCapture" (handle f) onTransitionEndCapture :: forall eff props state result. - (SyntheticTransitionEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTransitionEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onTransitionEndCapture f = unsafeMkProps "onTransitionEndCapture" (handle f) onToggleCapture :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onToggleCapture f = unsafeMkProps "onToggleCapture" (handle f) onErrorCapture :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onErrorCapture f = unsafeMkProps "onErrorCapture" (handle f) onLoadCapture :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onLoadCapture f = unsafeMkProps "onLoadCapture" (handle f) onAbortCapture :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onAbortCapture f = unsafeMkProps "onAbortCapture" (handle f) onCanPlayCapture :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onCanPlayCapture f = unsafeMkProps "onCanPlayCapture" (handle f) onCanPlayThroughCapture :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onCanPlayThroughCapture f = unsafeMkProps "onCanPlayThroughCapture" (handle f) onDurationChangeCapture :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onDurationChangeCapture f = unsafeMkProps "onDurationChangeCapture" (handle f) onEmptiedCapture :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onEmptiedCapture f = unsafeMkProps "onEmptiedCapture" (handle f) onEncryptedCapture :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onEncryptedCapture f = unsafeMkProps "onEncryptedCapture" (handle f) onEndedCapture :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onEndedCapture f = unsafeMkProps "onEndedCapture" (handle f) onLoadedDataCapture :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onLoadedDataCapture f = unsafeMkProps "onLoadedDataCapture" (handle f) onLoadedMetadataCapture :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onLoadedMetadataCapture f = unsafeMkProps "onLoadedMetadataCapture" (handle f) onLoadStartCapture :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onLoadStartCapture f = unsafeMkProps "onLoadStartCapture" (handle f) onPauseCapture :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onPauseCapture f = unsafeMkProps "onPauseCapture" (handle f) onPlayCapture :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onPlayCapture f = unsafeMkProps "onPlayCapture" (handle f) onPlayingCapture :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onPlayingCapture f = unsafeMkProps "onPlayingCapture" (handle f) onProgressCapture :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onProgressCapture f = unsafeMkProps "onProgressCapture" (handle f) onRateChangeCapture :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onRateChangeCapture f = unsafeMkProps "onRateChangeCapture" (handle f) onSeekedCapture :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onSeekedCapture f = unsafeMkProps "onSeekedCapture" (handle f) onSeekingCapture :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onSeekingCapture f = unsafeMkProps "onSeekingCapture" (handle f) onStalledCapture :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onStalledCapture f = unsafeMkProps "onStalledCapture" (handle f) onSuspendCapture :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onSuspendCapture f = unsafeMkProps "onSuspendCapture" (handle f) onTimeUpdateCapture :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onTimeUpdateCapture f = unsafeMkProps "onTimeUpdateCapture" (handle f) onVolumeChangeCapture :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onVolumeChangeCapture f = unsafeMkProps "onVolumeChangeCapture" (handle f) onWaitingCapture :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onWaitingCapture f = unsafeMkProps "onWaitingCapture" (handle f) onCopyCapture :: forall eff props state result. - (SyntheticClipboardEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticClipboardEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onCopyCapture f = unsafeMkProps "onCopyCapture" (handle f) onCutCapture :: forall eff props state result. - (SyntheticClipboardEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticClipboardEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onCutCapture f = unsafeMkProps "onCutCapture" (handle f) onPasteCapture :: forall eff props state result. - (SyntheticClipboardEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticClipboardEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onPasteCapture f = unsafeMkProps "onPasteCapture" (handle f) onCompositionEndCapture :: forall eff props state result. - (SyntheticCompositionEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticCompositionEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onCompositionEndCapture f = unsafeMkProps "onCompositionEndCapture" (handle f) onCompositionStartCapture :: forall eff props state result. - (SyntheticCompositionEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticCompositionEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onCompositionStartCapture f = unsafeMkProps "onCompositionStartCapture" (handle f) onCompositionUpdateCapture :: forall eff props state result. - (SyntheticCompositionEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticCompositionEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onCompositionUpdateCapture f = unsafeMkProps "onCompositionUpdateCapture" (handle f) onKeyDownCapture :: forall eff props state result. - (SyntheticKeyboardEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticKeyboardEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onKeyDownCapture f = unsafeMkProps "onKeyDownCapture" (handle f) onKeyPressCapture :: forall eff props state result. - (SyntheticKeyboardEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticKeyboardEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onKeyPressCapture f = unsafeMkProps "onKeyPressCapture" (handle f) onKeyUpCapture :: forall eff props state result. - (SyntheticKeyboardEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticKeyboardEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onKeyUpCapture f = unsafeMkProps "onKeyUpCapture" (handle f) onFocusCapture :: forall eff props state result. - (SyntheticFocusEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticFocusEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onFocusCapture f = unsafeMkProps "onFocusCapture" (handle f) onBlurCapture :: forall eff props state result. - (SyntheticFocusEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticFocusEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onBlurCapture f = unsafeMkProps "onBlurCapture" (handle f) onChangeCapture :: forall eff props state result. - (SyntheticInputEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticInputEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onChangeCapture f = unsafeMkProps "onChangeCapture" (handle f) onInputCapture :: forall eff props state result. - (SyntheticInputEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticInputEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onInputCapture f = unsafeMkProps "onInputCapture" (handle f) onInvalidCapture :: forall eff props state result. - (SyntheticInputEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticInputEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onInvalidCapture f = unsafeMkProps "onInvalidCapture" (handle f) onSubmitCapture :: forall eff props state result. - (SyntheticInputEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticInputEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onSubmitCapture f = unsafeMkProps "onSubmitCapture" (handle f) onClickCapture :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onClickCapture f = unsafeMkProps "onClickCapture" (handle f) onContextMenuCapture :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onContextMenuCapture f = unsafeMkProps "onContextMenuCapture" (handle f) onDoubleClickCapture :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onDoubleClickCapture f = unsafeMkProps "onDoubleClickCapture" (handle f) onDragCapture :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onDragCapture f = unsafeMkProps "onDragCapture" (handle f) onDragEndCapture :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onDragEndCapture f = unsafeMkProps "onDragEndCapture" (handle f) onDragEnterCapture :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onDragEnterCapture f = unsafeMkProps "onDragEnterCapture" (handle f) onDragExitCapture :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onDragExitCapture f = unsafeMkProps "onDragExitCapture" (handle f) onDragLeaveCapture :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onDragLeaveCapture f = unsafeMkProps "onDragLeaveCapture" (handle f) onDragOverCapture :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onDragOverCapture f = unsafeMkProps "onDragOverCapture" (handle f) onDragStartCapture :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onDragStartCapture f = unsafeMkProps "onDragStartCapture" (handle f) onDropCapture :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onDropCapture f = unsafeMkProps "onDropCapture" (handle f) onMouseDownCapture :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseDownCapture f = unsafeMkProps "onMouseDownCapture" (handle f) onMouseEnterCapture :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseEnterCapture f = unsafeMkProps "onMouseEnterCapture" (handle f) onMouseLeaveCapture :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseLeaveCapture f = unsafeMkProps "onMouseLeaveCapture" (handle f) onMouseMoveCapture :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseMoveCapture f = unsafeMkProps "onMouseMoveCapture" (handle f) onMouseOutCapture :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseOutCapture f = unsafeMkProps "onMouseOutCapture" (handle f) onMouseOverCapture :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseOverCapture f = unsafeMkProps "onMouseOverCapture" (handle f) onMouseUpCapture :: forall eff props state result. - (SyntheticMouseEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onMouseUpCapture f = unsafeMkProps "onMouseUpCapture" (handle f) onSelectCapture :: forall eff props state result. - (SyntheticEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onSelectCapture f = unsafeMkProps "onSelectCapture" (handle f) onTouchCancelCapture :: forall eff props state result. - (SyntheticTouchEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTouchEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onTouchCancelCapture f = unsafeMkProps "onTouchCancelCapture" (handle f) onTouchEndCapture :: forall eff props state result. - (SyntheticTouchEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTouchEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onTouchEndCapture f = unsafeMkProps "onTouchEndCapture" (handle f) onTouchMoveCapture :: forall eff props state result. - (SyntheticTouchEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTouchEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onTouchMoveCapture f = unsafeMkProps "onTouchMoveCapture" (handle f) onTouchStartCapture :: forall eff props state result. - (SyntheticTouchEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTouchEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onTouchStartCapture f = unsafeMkProps "onTouchStartCapture" (handle f) onScrollCapture :: forall eff props state result. - (SyntheticUIEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticUIEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onScrollCapture f = unsafeMkProps "onScrollCapture" (handle f) onWheelCapture :: forall eff props state result. - (SyntheticWheelEvent eff () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticWheelEvent () -> SyntheticEventHandlerContext eff props state result) -> Props onWheelCapture f = unsafeMkProps "onWheelCapture" (handle f) ref :: forall eff props state result. diff --git a/src/React/SyntheticEvent.js b/src/React/SyntheticEvent.js index 8d57c93..6d39ee0 100644 --- a/src/React/SyntheticEvent.js +++ b/src/React/SyntheticEvent.js @@ -1,17 +1,47 @@ 'use strict'; -exports.unsafeGet = function unsafeGet(key) { - return function (event) { - return function () { - return event[key]; +exports.preventDefault = function preventDefault(event) { + return function() { + return event.preventDefault(); + }; +}; + +exports.isDefaultPrevented = function isDefaultPrevented(event) { + return function() { + return event.isDefaultPrevented(); + }; +}; + +exports.stopPropagation = function stopPropagation(event) { + return function() { + return event.stopPropagation(); + }; +}; + +exports.isPropagationStopped = function isPropagationStopped(event) { + return function() { + return event.isPropagationStopped(); + }; +}; + +exports.persist = function persist(event) { + return function() { + return event.persist(); + }; +}; + +exports.getModifierState = function getModifierState(key) { + return function(event) { + return function() { + return event.getModifierState(key); }; }; }; -exports.unsafeGetFn = function unsafeGetFn(key) { +exports.unsafeGet = function unsafeGet(key) { return function (event) { return function () { - return event[key].bind(event); + return event[key]; }; }; }; diff --git a/src/React/SyntheticEvent.purs b/src/React/SyntheticEvent.purs index 3d183be..4e259bc 100644 --- a/src/React/SyntheticEvent.purs +++ b/src/React/SyntheticEvent.purs @@ -100,41 +100,41 @@ import Control.Monad.Eff (Eff) import Data.Symbol (class IsSymbol, SProxy(..), reflectSymbol) -type SyntheticEvent eff r - = SyntheticEvent_ (SyntheticEvent' eff r) +type SyntheticEvent r + = SyntheticEvent_ (SyntheticEvent' r) -type SyntheticAnimationEvent eff r - = SyntheticEvent_ (SyntheticAnimationEvent' (SyntheticAnimationTransitionEvent' (SyntheticEvent' eff r))) +type SyntheticAnimationEvent r + = SyntheticEvent_ (SyntheticAnimationEvent' (SyntheticAnimationTransitionEvent' (SyntheticEvent' r))) -type SyntheticClipboardEvent eff r - = SyntheticEvent_ (SyntheticClipboardEvent' (SyntheticEvent' eff r)) +type SyntheticClipboardEvent r + = SyntheticEvent_ (SyntheticClipboardEvent' (SyntheticEvent' r)) -type SyntheticCompositionEvent eff r - = SyntheticEvent_ (SyntheticCompositionEvent' (SyntheticUIEvent' (SyntheticEvent' eff r))) +type SyntheticCompositionEvent r + = SyntheticEvent_ (SyntheticCompositionEvent' (SyntheticUIEvent' (SyntheticEvent' r))) -type SyntheticInputEvent eff r - = SyntheticEvent_ (SyntheticUIEvent' (SyntheticEvent' eff r)) +type SyntheticInputEvent r + = SyntheticEvent_ (SyntheticUIEvent' (SyntheticEvent' r)) -type SyntheticKeyboardEvent eff r - = SyntheticEvent_ (SyntheticKeyboardEvent' (SyntheticKeyboardMouseTouchEvent' (SyntheticUIEvent' (SyntheticEvent' eff r)))) +type SyntheticKeyboardEvent r + = SyntheticEvent_ (SyntheticKeyboardEvent' (SyntheticKeyboardMouseTouchEvent' (SyntheticUIEvent' (SyntheticEvent' r)))) -type SyntheticFocusEvent eff r - = SyntheticEvent_ (SyntheticFocusMouseEvent' (SyntheticUIEvent' (SyntheticEvent' eff r))) +type SyntheticFocusEvent r + = SyntheticEvent_ (SyntheticFocusMouseEvent' (SyntheticUIEvent' (SyntheticEvent' r))) -type SyntheticMouseEvent eff r - = SyntheticEvent_ (SyntheticMouseEvent' (SyntheticFocusMouseEvent' (SyntheticKeyboardMouseTouchEvent' (SyntheticUIEvent' (SyntheticEvent' eff r))))) +type SyntheticMouseEvent r + = SyntheticEvent_ (SyntheticMouseEvent' (SyntheticFocusMouseEvent' (SyntheticKeyboardMouseTouchEvent' (SyntheticUIEvent' (SyntheticEvent' r))))) -type SyntheticTouchEvent eff r - = SyntheticEvent_ (SyntheticTouchEvent' (SyntheticKeyboardMouseTouchEvent' (SyntheticUIEvent' (SyntheticEvent' eff r)))) +type SyntheticTouchEvent r + = SyntheticEvent_ (SyntheticTouchEvent' (SyntheticKeyboardMouseTouchEvent' (SyntheticUIEvent' (SyntheticEvent' r)))) -type SyntheticTransitionEvent eff r - = SyntheticEvent_ (SyntheticTransitionEvent' (SyntheticAnimationTransitionEvent' (SyntheticEvent' eff r))) +type SyntheticTransitionEvent r + = SyntheticEvent_ (SyntheticTransitionEvent' (SyntheticAnimationTransitionEvent' (SyntheticEvent' r))) -type SyntheticUIEvent eff r - = SyntheticEvent_ (SyntheticUIEvent' (SyntheticEvent' eff r)) +type SyntheticUIEvent r + = SyntheticEvent_ (SyntheticUIEvent' (SyntheticEvent' r)) -type SyntheticWheelEvent eff r - = SyntheticEvent_ (SyntheticWheelEvent' (SyntheticMouseEvent' (SyntheticEvent' eff r))) +type SyntheticWheelEvent r + = SyntheticEvent_ (SyntheticWheelEvent' (SyntheticMouseEvent' (SyntheticEvent' r))) foreign import data SyntheticEvent_ :: # Type -> Type @@ -148,7 +148,7 @@ foreign import data NativeAbstractView :: Type foreign import data NativeTouchList :: Type -type SyntheticEvent' eff r +type SyntheticEvent' r = ( bubbles :: Boolean , cancelable :: Boolean , currentTarget :: NativeEventTarget @@ -156,14 +156,9 @@ type SyntheticEvent' eff r , eventPhase :: Number , isTrusted :: Boolean , nativeEvent :: NativeEvent - , preventDefault :: Eff eff Unit - , isDefaultPrevented :: Eff eff Boolean - , stopPropagation :: Eff eff Unit - , isPropagationStopped :: Eff eff Boolean , target :: NativeEventTarget , timeStamp :: Number , type :: String - , persist :: Eff eff Unit | r ) @@ -246,57 +241,41 @@ type SyntheticFocusMouseEvent' r type SyntheticKeyboardMouseTouchEvent' r = ( altKey :: Boolean , ctrlKey :: Boolean - , getModifierState :: String -> Boolean , metaKey :: Boolean , shiftKey :: Boolean | r ) -bubbles :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff Boolean +bubbles :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff Boolean bubbles = get (SProxy :: SProxy "bubbles") -cancelable :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff Boolean +cancelable :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff Boolean cancelable = get (SProxy :: SProxy "cancelable") -currentTarget :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff NativeEventTarget +currentTarget :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff NativeEventTarget currentTarget = get (SProxy :: SProxy "currentTarget") -defaultPrevented :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff Boolean +defaultPrevented :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff Boolean defaultPrevented = get (SProxy :: SProxy "defaultPrevented") -eventPhase :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff Number +eventPhase :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff Number eventPhase = get (SProxy :: SProxy "eventPhase") -isTrusted :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff Boolean +isTrusted :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff Boolean isTrusted = get (SProxy :: SProxy "isTrusted") -nativeEvent :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff NativeEvent +nativeEvent :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff NativeEvent nativeEvent = get (SProxy :: SProxy "nativeEvent") -preventDefault :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff Unit -preventDefault = join <<< getFn (SProxy :: SProxy "preventDefault") - -isDefaultPrevented :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff Boolean -isDefaultPrevented = join <<< getFn (SProxy :: SProxy "isDefaultPrevented") - -stopPropagation :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff Unit -stopPropagation = join <<< getFn (SProxy :: SProxy "stopPropagation") - -isPropagationStopped :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff Boolean -isPropagationStopped = join <<< getFn (SProxy :: SProxy "isPropagationStopped") - -target :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff NativeEventTarget +target :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff NativeEventTarget target = get (SProxy :: SProxy "target") -timeStamp :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff Number +timeStamp :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff Number timeStamp = get (SProxy :: SProxy "timeStamp") -type_ :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff String +type_ :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff String type_ = get (SProxy :: SProxy "type") -persist :: forall eff r. SyntheticEvent_ (SyntheticEvent' eff r) -> Eff eff Unit -persist = join <<< get (SProxy :: SProxy "persist") - animationName :: forall eff r. SyntheticEvent_ (SyntheticAnimationEvent' r) -> Eff eff String animationName = get (SProxy :: SProxy "animationName") @@ -369,9 +348,6 @@ altKey = get (SProxy :: SProxy "altKey") ctrlKey :: forall eff r. SyntheticEvent_ (SyntheticKeyboardMouseTouchEvent' r) -> Eff eff Boolean ctrlKey = get (SProxy :: SProxy "ctrlKey") -getModifierState :: forall eff r. String -> SyntheticEvent_ (SyntheticKeyboardMouseTouchEvent' r) -> Eff eff Boolean -getModifierState a = map ((#) a) <<< getFn (SProxy :: SProxy "getModifierState") - metaKey :: forall eff r. SyntheticEvent_ (SyntheticKeyboardMouseTouchEvent' r) -> Eff eff Boolean metaKey = get (SProxy :: SProxy "metaKey") @@ -405,6 +381,18 @@ deltaY = get (SProxy :: SProxy "deltaY") deltaZ :: forall eff r. SyntheticEvent_ (SyntheticWheelEvent' r) -> Eff eff Number deltaZ = get (SProxy :: SProxy "deltaZ") +foreign import preventDefault :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff Unit + +foreign import isDefaultPrevented :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff Boolean + +foreign import stopPropagation :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff Unit + +foreign import isPropagationStopped :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff Boolean + +foreign import persist :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff Unit + +foreign import getModifierState :: forall eff r. String -> SyntheticEvent_ (SyntheticKeyboardMouseTouchEvent' r) -> Eff eff Boolean + get :: forall eff l r s a . RowCons l a r s @@ -414,15 +402,4 @@ get -> Eff eff a get l r = unsafeGet (reflectSymbol l) r -getFn - :: forall eff l r s a - . RowCons l a r s - => IsSymbol l - => SProxy l - -> SyntheticEvent_ s - -> Eff eff a -getFn l r = unsafeGetFn (reflectSymbol l) r - foreign import unsafeGet :: forall eff r a. String -> SyntheticEvent_ r -> Eff eff a - -foreign import unsafeGetFn :: forall eff r a. String -> SyntheticEvent_ r -> Eff eff a From 30856cb3a48e76ad15ca918ebdd441dd9abb655a Mon Sep 17 00:00:00 2001 From: eric thul Date: Sun, 15 Apr 2018 14:59:12 -0400 Subject: [PATCH 4/4] Update rows --- src/React/DOM/Props.purs | 276 +++++++++++++++++----------------- src/React/SyntheticEvent.purs | 204 ++++++++++++------------- 2 files changed, 241 insertions(+), 239 deletions(-) diff --git a/src/React/DOM/Props.purs b/src/React/DOM/Props.purs index 0cf48af..167ca73 100644 --- a/src/React/DOM/Props.purs +++ b/src/React/DOM/Props.purs @@ -482,555 +482,555 @@ unselectable :: Boolean -> Props unselectable = unsafeMkProps "unselectable" onAnimationStart :: forall eff props state result. - (SyntheticAnimationEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticAnimationEvent -> SyntheticEventHandlerContext eff props state result) -> Props onAnimationStart f = unsafeMkProps "onAnimationStart" (handle f) onAnimationEnd :: forall eff props state result. - (SyntheticAnimationEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticAnimationEvent -> SyntheticEventHandlerContext eff props state result) -> Props onAnimationEnd f = unsafeMkProps "onAnimationEnd" (handle f) onAnimationIteration :: forall eff props state result. - (SyntheticAnimationEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticAnimationEvent -> SyntheticEventHandlerContext eff props state result) -> Props onAnimationIteration f = unsafeMkProps "onAnimationIteration" (handle f) onTransitionEnd :: forall eff props state result. - (SyntheticTransitionEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTransitionEvent -> SyntheticEventHandlerContext eff props state result) -> Props onTransitionEnd f = unsafeMkProps "onTransitionEnd" (handle f) onToggle :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onToggle f = unsafeMkProps "onToggle" (handle f) onError :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onError f = unsafeMkProps "onError" (handle f) onLoad :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onLoad f = unsafeMkProps "onLoad" (handle f) onAbort :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onAbort f = unsafeMkProps "onAbort" (handle f) onCanPlay :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onCanPlay f = unsafeMkProps "onCanPlay" (handle f) onCanPlayThrough :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onCanPlayThrough f = unsafeMkProps "onCanPlayThrough" (handle f) onDurationChange :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onDurationChange f = unsafeMkProps "onDurationChange" (handle f) onEmptied :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onEmptied f = unsafeMkProps "onEmptied" (handle f) onEncrypted :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onEncrypted f = unsafeMkProps "onEncrypted" (handle f) onEnded :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onEnded f = unsafeMkProps "onEnded" (handle f) onLoadedData :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onLoadedData f = unsafeMkProps "onLoadedData" (handle f) onLoadedMetadata :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onLoadedMetadata f = unsafeMkProps "onLoadedMetadata" (handle f) onLoadStart :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onLoadStart f = unsafeMkProps "onLoadStart" (handle f) onPause :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onPause f = unsafeMkProps "onPause" (handle f) onPlay :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onPlay f = unsafeMkProps "onPlay" (handle f) onPlaying :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onPlaying f = unsafeMkProps "onPlaying" (handle f) onProgress :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onProgress f = unsafeMkProps "onProgress" (handle f) onRateChange :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onRateChange f = unsafeMkProps "onRateChange" (handle f) onSeeked :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onSeeked f = unsafeMkProps "onSeeked" (handle f) onSeeking :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onSeeking f = unsafeMkProps "onSeeking" (handle f) onStalled :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onStalled f = unsafeMkProps "onStalled" (handle f) onSuspend :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onSuspend f = unsafeMkProps "onSuspend" (handle f) onTimeUpdate :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onTimeUpdate f = unsafeMkProps "onTimeUpdate" (handle f) onVolumeChange :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onVolumeChange f = unsafeMkProps "onVolumeChange" (handle f) onWaiting :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onWaiting f = unsafeMkProps "onWaiting" (handle f) onCopy :: forall eff props state result. - (SyntheticClipboardEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticClipboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props onCopy f = unsafeMkProps "onCopy" (handle f) onCut :: forall eff props state result. - (SyntheticClipboardEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticClipboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props onCut f = unsafeMkProps "onCut" (handle f) onPaste :: forall eff props state result. - (SyntheticClipboardEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticClipboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props onPaste f = unsafeMkProps "onPaste" (handle f) onCompositionEnd :: forall eff props state result. - (SyntheticCompositionEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticCompositionEvent -> SyntheticEventHandlerContext eff props state result) -> Props onCompositionEnd f = unsafeMkProps "onCompositionEnd" (handle f) onCompositionStart :: forall eff props state result. - (SyntheticCompositionEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticCompositionEvent -> SyntheticEventHandlerContext eff props state result) -> Props onCompositionStart f = unsafeMkProps "onCompositionStart" (handle f) onCompositionUpdate :: forall eff props state result. - (SyntheticCompositionEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticCompositionEvent -> SyntheticEventHandlerContext eff props state result) -> Props onCompositionUpdate f = unsafeMkProps "onCompositionUpdate" (handle f) onKeyDown :: forall eff props state result. - (SyntheticKeyboardEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticKeyboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props onKeyDown f = unsafeMkProps "onKeyDown" (handle f) onKeyPress :: forall eff props state result. - (SyntheticKeyboardEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticKeyboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props onKeyPress f = unsafeMkProps "onKeyPress" (handle f) onKeyUp :: forall eff props state result. - (SyntheticKeyboardEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticKeyboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props onKeyUp f = unsafeMkProps "onKeyUp" (handle f) onFocus :: forall eff props state result. - (SyntheticFocusEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticFocusEvent -> SyntheticEventHandlerContext eff props state result) -> Props onFocus f = unsafeMkProps "onFocus" (handle f) onBlur :: forall eff props state result. - (SyntheticFocusEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticFocusEvent -> SyntheticEventHandlerContext eff props state result) -> Props onBlur f = unsafeMkProps "onBlur" (handle f) onChange :: forall eff props state result. - (SyntheticInputEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticInputEvent -> SyntheticEventHandlerContext eff props state result) -> Props onChange f = unsafeMkProps "onChange" (handle f) onInput :: forall eff props state result. - (SyntheticInputEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticInputEvent -> SyntheticEventHandlerContext eff props state result) -> Props onInput f = unsafeMkProps "onInput" (handle f) onInvalid :: forall eff props state result. - (SyntheticInputEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticInputEvent -> SyntheticEventHandlerContext eff props state result) -> Props onInvalid f = unsafeMkProps "onInvalid" (handle f) onSubmit :: forall eff props state result. - (SyntheticInputEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticInputEvent -> SyntheticEventHandlerContext eff props state result) -> Props onSubmit f = unsafeMkProps "onSubmit" (handle f) onClick :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onClick f = unsafeMkProps "onClick" (handle f) onContextMenu :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onContextMenu f = unsafeMkProps "onContextMenu" (handle f) onDoubleClick :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onDoubleClick f = unsafeMkProps "onDoubleClick" (handle f) onDrag :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onDrag f = unsafeMkProps "onDrag" (handle f) onDragEnd :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onDragEnd f = unsafeMkProps "onDragEnd" (handle f) onDragEnter :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onDragEnter f = unsafeMkProps "onDragEnter" (handle f) onDragExit :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onDragExit f = unsafeMkProps "onDragExit" (handle f) onDragLeave :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onDragLeave f = unsafeMkProps "onDragLeave" (handle f) onDragOver :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onDragOver f = unsafeMkProps "onDragOver" (handle f) onDragStart :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onDragStart f = unsafeMkProps "onDragStart" (handle f) onDrop :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onDrop f = unsafeMkProps "onDrop" (handle f) onMouseDown :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onMouseDown f = unsafeMkProps "onMouseDown" (handle f) onMouseEnter :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onMouseEnter f = unsafeMkProps "onMouseEnter" (handle f) onMouseLeave :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onMouseLeave f = unsafeMkProps "onMouseLeave" (handle f) onMouseMove :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onMouseMove f = unsafeMkProps "onMouseMove" (handle f) onMouseOut :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onMouseOut f = unsafeMkProps "onMouseOut" (handle f) onMouseOver :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onMouseOver f = unsafeMkProps "onMouseOver" (handle f) onMouseUp :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onMouseUp f = unsafeMkProps "onMouseUp" (handle f) onSelect :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onSelect f = unsafeMkProps "onSelect" (handle f) onTouchCancel :: forall eff props state result. - (SyntheticTouchEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTouchEvent -> SyntheticEventHandlerContext eff props state result) -> Props onTouchCancel f = unsafeMkProps "onTouchCancel" (handle f) onTouchEnd :: forall eff props state result. - (SyntheticTouchEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTouchEvent -> SyntheticEventHandlerContext eff props state result) -> Props onTouchEnd f = unsafeMkProps "onTouchEnd" (handle f) onTouchMove :: forall eff props state result. - (SyntheticTouchEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTouchEvent -> SyntheticEventHandlerContext eff props state result) -> Props onTouchMove f = unsafeMkProps "onTouchMove" (handle f) onTouchStart :: forall eff props state result. - (SyntheticTouchEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTouchEvent -> SyntheticEventHandlerContext eff props state result) -> Props onTouchStart f = unsafeMkProps "onTouchStart" (handle f) onScroll :: forall eff props state result. - (SyntheticUIEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticUIEvent -> SyntheticEventHandlerContext eff props state result) -> Props onScroll f = unsafeMkProps "onScroll" (handle f) onWheel :: forall eff props state result. - (SyntheticWheelEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticWheelEvent -> SyntheticEventHandlerContext eff props state result) -> Props onWheel f = unsafeMkProps "onWheel" (handle f) onAnimationStartCapture :: forall eff props state result. - (SyntheticAnimationEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticAnimationEvent -> SyntheticEventHandlerContext eff props state result) -> Props onAnimationStartCapture f = unsafeMkProps "onAnimationStartCapture" (handle f) onAnimationEndCapture :: forall eff props state result. - (SyntheticAnimationEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticAnimationEvent -> SyntheticEventHandlerContext eff props state result) -> Props onAnimationEndCapture f = unsafeMkProps "onAnimationEndCapture" (handle f) onAnimationIterationCapture :: forall eff props state result. - (SyntheticAnimationEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticAnimationEvent -> SyntheticEventHandlerContext eff props state result) -> Props onAnimationIterationCapture f = unsafeMkProps "onAnimationIterationCapture" (handle f) onTransitionEndCapture :: forall eff props state result. - (SyntheticTransitionEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTransitionEvent -> SyntheticEventHandlerContext eff props state result) -> Props onTransitionEndCapture f = unsafeMkProps "onTransitionEndCapture" (handle f) onToggleCapture :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onToggleCapture f = unsafeMkProps "onToggleCapture" (handle f) onErrorCapture :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onErrorCapture f = unsafeMkProps "onErrorCapture" (handle f) onLoadCapture :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onLoadCapture f = unsafeMkProps "onLoadCapture" (handle f) onAbortCapture :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onAbortCapture f = unsafeMkProps "onAbortCapture" (handle f) onCanPlayCapture :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onCanPlayCapture f = unsafeMkProps "onCanPlayCapture" (handle f) onCanPlayThroughCapture :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onCanPlayThroughCapture f = unsafeMkProps "onCanPlayThroughCapture" (handle f) onDurationChangeCapture :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onDurationChangeCapture f = unsafeMkProps "onDurationChangeCapture" (handle f) onEmptiedCapture :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onEmptiedCapture f = unsafeMkProps "onEmptiedCapture" (handle f) onEncryptedCapture :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onEncryptedCapture f = unsafeMkProps "onEncryptedCapture" (handle f) onEndedCapture :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onEndedCapture f = unsafeMkProps "onEndedCapture" (handle f) onLoadedDataCapture :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onLoadedDataCapture f = unsafeMkProps "onLoadedDataCapture" (handle f) onLoadedMetadataCapture :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onLoadedMetadataCapture f = unsafeMkProps "onLoadedMetadataCapture" (handle f) onLoadStartCapture :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onLoadStartCapture f = unsafeMkProps "onLoadStartCapture" (handle f) onPauseCapture :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onPauseCapture f = unsafeMkProps "onPauseCapture" (handle f) onPlayCapture :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onPlayCapture f = unsafeMkProps "onPlayCapture" (handle f) onPlayingCapture :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onPlayingCapture f = unsafeMkProps "onPlayingCapture" (handle f) onProgressCapture :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onProgressCapture f = unsafeMkProps "onProgressCapture" (handle f) onRateChangeCapture :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onRateChangeCapture f = unsafeMkProps "onRateChangeCapture" (handle f) onSeekedCapture :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onSeekedCapture f = unsafeMkProps "onSeekedCapture" (handle f) onSeekingCapture :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onSeekingCapture f = unsafeMkProps "onSeekingCapture" (handle f) onStalledCapture :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onStalledCapture f = unsafeMkProps "onStalledCapture" (handle f) onSuspendCapture :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onSuspendCapture f = unsafeMkProps "onSuspendCapture" (handle f) onTimeUpdateCapture :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onTimeUpdateCapture f = unsafeMkProps "onTimeUpdateCapture" (handle f) onVolumeChangeCapture :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onVolumeChangeCapture f = unsafeMkProps "onVolumeChangeCapture" (handle f) onWaitingCapture :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onWaitingCapture f = unsafeMkProps "onWaitingCapture" (handle f) onCopyCapture :: forall eff props state result. - (SyntheticClipboardEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticClipboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props onCopyCapture f = unsafeMkProps "onCopyCapture" (handle f) onCutCapture :: forall eff props state result. - (SyntheticClipboardEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticClipboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props onCutCapture f = unsafeMkProps "onCutCapture" (handle f) onPasteCapture :: forall eff props state result. - (SyntheticClipboardEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticClipboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props onPasteCapture f = unsafeMkProps "onPasteCapture" (handle f) onCompositionEndCapture :: forall eff props state result. - (SyntheticCompositionEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticCompositionEvent -> SyntheticEventHandlerContext eff props state result) -> Props onCompositionEndCapture f = unsafeMkProps "onCompositionEndCapture" (handle f) onCompositionStartCapture :: forall eff props state result. - (SyntheticCompositionEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticCompositionEvent -> SyntheticEventHandlerContext eff props state result) -> Props onCompositionStartCapture f = unsafeMkProps "onCompositionStartCapture" (handle f) onCompositionUpdateCapture :: forall eff props state result. - (SyntheticCompositionEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticCompositionEvent -> SyntheticEventHandlerContext eff props state result) -> Props onCompositionUpdateCapture f = unsafeMkProps "onCompositionUpdateCapture" (handle f) onKeyDownCapture :: forall eff props state result. - (SyntheticKeyboardEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticKeyboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props onKeyDownCapture f = unsafeMkProps "onKeyDownCapture" (handle f) onKeyPressCapture :: forall eff props state result. - (SyntheticKeyboardEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticKeyboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props onKeyPressCapture f = unsafeMkProps "onKeyPressCapture" (handle f) onKeyUpCapture :: forall eff props state result. - (SyntheticKeyboardEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticKeyboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props onKeyUpCapture f = unsafeMkProps "onKeyUpCapture" (handle f) onFocusCapture :: forall eff props state result. - (SyntheticFocusEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticFocusEvent -> SyntheticEventHandlerContext eff props state result) -> Props onFocusCapture f = unsafeMkProps "onFocusCapture" (handle f) onBlurCapture :: forall eff props state result. - (SyntheticFocusEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticFocusEvent -> SyntheticEventHandlerContext eff props state result) -> Props onBlurCapture f = unsafeMkProps "onBlurCapture" (handle f) onChangeCapture :: forall eff props state result. - (SyntheticInputEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticInputEvent -> SyntheticEventHandlerContext eff props state result) -> Props onChangeCapture f = unsafeMkProps "onChangeCapture" (handle f) onInputCapture :: forall eff props state result. - (SyntheticInputEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticInputEvent -> SyntheticEventHandlerContext eff props state result) -> Props onInputCapture f = unsafeMkProps "onInputCapture" (handle f) onInvalidCapture :: forall eff props state result. - (SyntheticInputEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticInputEvent -> SyntheticEventHandlerContext eff props state result) -> Props onInvalidCapture f = unsafeMkProps "onInvalidCapture" (handle f) onSubmitCapture :: forall eff props state result. - (SyntheticInputEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticInputEvent -> SyntheticEventHandlerContext eff props state result) -> Props onSubmitCapture f = unsafeMkProps "onSubmitCapture" (handle f) onClickCapture :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onClickCapture f = unsafeMkProps "onClickCapture" (handle f) onContextMenuCapture :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onContextMenuCapture f = unsafeMkProps "onContextMenuCapture" (handle f) onDoubleClickCapture :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onDoubleClickCapture f = unsafeMkProps "onDoubleClickCapture" (handle f) onDragCapture :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onDragCapture f = unsafeMkProps "onDragCapture" (handle f) onDragEndCapture :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onDragEndCapture f = unsafeMkProps "onDragEndCapture" (handle f) onDragEnterCapture :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onDragEnterCapture f = unsafeMkProps "onDragEnterCapture" (handle f) onDragExitCapture :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onDragExitCapture f = unsafeMkProps "onDragExitCapture" (handle f) onDragLeaveCapture :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onDragLeaveCapture f = unsafeMkProps "onDragLeaveCapture" (handle f) onDragOverCapture :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onDragOverCapture f = unsafeMkProps "onDragOverCapture" (handle f) onDragStartCapture :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onDragStartCapture f = unsafeMkProps "onDragStartCapture" (handle f) onDropCapture :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onDropCapture f = unsafeMkProps "onDropCapture" (handle f) onMouseDownCapture :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onMouseDownCapture f = unsafeMkProps "onMouseDownCapture" (handle f) onMouseEnterCapture :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onMouseEnterCapture f = unsafeMkProps "onMouseEnterCapture" (handle f) onMouseLeaveCapture :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onMouseLeaveCapture f = unsafeMkProps "onMouseLeaveCapture" (handle f) onMouseMoveCapture :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onMouseMoveCapture f = unsafeMkProps "onMouseMoveCapture" (handle f) onMouseOutCapture :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onMouseOutCapture f = unsafeMkProps "onMouseOutCapture" (handle f) onMouseOverCapture :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onMouseOverCapture f = unsafeMkProps "onMouseOverCapture" (handle f) onMouseUpCapture :: forall eff props state result. - (SyntheticMouseEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props onMouseUpCapture f = unsafeMkProps "onMouseUpCapture" (handle f) onSelectCapture :: forall eff props state result. - (SyntheticEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props onSelectCapture f = unsafeMkProps "onSelectCapture" (handle f) onTouchCancelCapture :: forall eff props state result. - (SyntheticTouchEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTouchEvent -> SyntheticEventHandlerContext eff props state result) -> Props onTouchCancelCapture f = unsafeMkProps "onTouchCancelCapture" (handle f) onTouchEndCapture :: forall eff props state result. - (SyntheticTouchEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTouchEvent -> SyntheticEventHandlerContext eff props state result) -> Props onTouchEndCapture f = unsafeMkProps "onTouchEndCapture" (handle f) onTouchMoveCapture :: forall eff props state result. - (SyntheticTouchEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTouchEvent -> SyntheticEventHandlerContext eff props state result) -> Props onTouchMoveCapture f = unsafeMkProps "onTouchMoveCapture" (handle f) onTouchStartCapture :: forall eff props state result. - (SyntheticTouchEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticTouchEvent -> SyntheticEventHandlerContext eff props state result) -> Props onTouchStartCapture f = unsafeMkProps "onTouchStartCapture" (handle f) onScrollCapture :: forall eff props state result. - (SyntheticUIEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticUIEvent -> SyntheticEventHandlerContext eff props state result) -> Props onScrollCapture f = unsafeMkProps "onScrollCapture" (handle f) onWheelCapture :: forall eff props state result. - (SyntheticWheelEvent () -> SyntheticEventHandlerContext eff props state result) -> Props + (SyntheticWheelEvent -> SyntheticEventHandlerContext eff props state result) -> Props onWheelCapture f = unsafeMkProps "onWheelCapture" (handle f) ref :: forall eff props state result. diff --git a/src/React/SyntheticEvent.purs b/src/React/SyntheticEvent.purs index 4e259bc..92d7a48 100644 --- a/src/React/SyntheticEvent.purs +++ b/src/React/SyntheticEvent.purs @@ -22,6 +22,7 @@ module React.SyntheticEvent , SyntheticAnimationEvent' , SyntheticClipboardEvent' , SyntheticCompositionEvent' + , SyntheticFocusEvent' , SyntheticKeyboardEvent' , SyntheticMouseEvent' , SyntheticTouchEvent' @@ -29,10 +30,6 @@ module React.SyntheticEvent , SyntheticUIEvent' , SyntheticWheelEvent' - , SyntheticAnimationTransitionEvent' - , SyntheticKeyboardMouseTouchEvent' - , SyntheticFocusMouseEvent' - , SyntheticEvent_ , NativeEventTarget @@ -100,41 +97,41 @@ import Control.Monad.Eff (Eff) import Data.Symbol (class IsSymbol, SProxy(..), reflectSymbol) -type SyntheticEvent r - = SyntheticEvent_ (SyntheticEvent' r) +type SyntheticEvent + = SyntheticEvent_ (SyntheticEvent' ()) -type SyntheticAnimationEvent r - = SyntheticEvent_ (SyntheticAnimationEvent' (SyntheticAnimationTransitionEvent' (SyntheticEvent' r))) +type SyntheticAnimationEvent + = SyntheticEvent_ (SyntheticAnimationEvent' (SyntheticEvent' ())) -type SyntheticClipboardEvent r - = SyntheticEvent_ (SyntheticClipboardEvent' (SyntheticEvent' r)) +type SyntheticClipboardEvent + = SyntheticEvent_ (SyntheticClipboardEvent' (SyntheticEvent' ())) -type SyntheticCompositionEvent r - = SyntheticEvent_ (SyntheticCompositionEvent' (SyntheticUIEvent' (SyntheticEvent' r))) +type SyntheticCompositionEvent + = SyntheticEvent_ (SyntheticCompositionEvent' (SyntheticUIEvent' (SyntheticEvent' ()))) -type SyntheticInputEvent r - = SyntheticEvent_ (SyntheticUIEvent' (SyntheticEvent' r)) +type SyntheticInputEvent + = SyntheticEvent_ (SyntheticUIEvent' (SyntheticEvent' ())) -type SyntheticKeyboardEvent r - = SyntheticEvent_ (SyntheticKeyboardEvent' (SyntheticKeyboardMouseTouchEvent' (SyntheticUIEvent' (SyntheticEvent' r)))) +type SyntheticKeyboardEvent + = SyntheticEvent_ (SyntheticKeyboardEvent' (SyntheticUIEvent' (SyntheticEvent' ()))) -type SyntheticFocusEvent r - = SyntheticEvent_ (SyntheticFocusMouseEvent' (SyntheticUIEvent' (SyntheticEvent' r))) +type SyntheticFocusEvent + = SyntheticEvent_ (SyntheticFocusEvent' (SyntheticUIEvent' (SyntheticEvent' ()))) -type SyntheticMouseEvent r - = SyntheticEvent_ (SyntheticMouseEvent' (SyntheticFocusMouseEvent' (SyntheticKeyboardMouseTouchEvent' (SyntheticUIEvent' (SyntheticEvent' r))))) +type SyntheticMouseEvent + = SyntheticEvent_ (SyntheticMouseEvent' (SyntheticUIEvent' (SyntheticEvent' ()))) -type SyntheticTouchEvent r - = SyntheticEvent_ (SyntheticTouchEvent' (SyntheticKeyboardMouseTouchEvent' (SyntheticUIEvent' (SyntheticEvent' r)))) +type SyntheticTouchEvent + = SyntheticEvent_ (SyntheticTouchEvent' (SyntheticUIEvent' (SyntheticEvent' ()))) -type SyntheticTransitionEvent r - = SyntheticEvent_ (SyntheticTransitionEvent' (SyntheticAnimationTransitionEvent' (SyntheticEvent' r))) +type SyntheticTransitionEvent + = SyntheticEvent_ (SyntheticTransitionEvent' (SyntheticEvent' ())) -type SyntheticUIEvent r - = SyntheticEvent_ (SyntheticUIEvent' (SyntheticEvent' r)) +type SyntheticUIEvent + = SyntheticEvent_ (SyntheticUIEvent' (SyntheticEvent' ())) -type SyntheticWheelEvent r - = SyntheticEvent_ (SyntheticWheelEvent' (SyntheticMouseEvent' (SyntheticEvent' r))) +type SyntheticWheelEvent + = SyntheticEvent_ (SyntheticWheelEvent' (SyntheticMouseEvent' (SyntheticEvent' ()))) foreign import data SyntheticEvent_ :: # Type -> Type @@ -164,6 +161,8 @@ type SyntheticEvent' r type SyntheticAnimationEvent' r = ( animationName :: String + , pseudoElement :: String + , elapsedTime :: Number | r ) @@ -177,39 +176,61 @@ type SyntheticCompositionEvent' r | r ) +type SyntheticFocusEvent' r + = ( relatedTarget :: NativeEventTarget + | r + ) + type SyntheticKeyboardEvent' r - = ( charCode :: Int + = ( altKey :: Boolean + , ctrlKey :: Boolean + , getModifierState :: String -> Boolean + , charCode :: Int , key :: String , keyCode :: Number , locale :: String , location :: Number + , metaKey :: Boolean , repeat :: Boolean + , shiftKey :: Boolean , which :: Number | r ) type SyntheticMouseEvent' r - = ( button :: Number + = ( altKey :: Boolean + , button :: Number , buttons :: Number , clientX :: Number , clientY :: Number + , ctrlKey :: Boolean + , getModifierState :: String -> Boolean + , metaKey :: Boolean , pageX :: Number , pageY :: Number , relatedTarget :: NativeEventTarget , screenX :: Number , screenY :: Number + , shiftKey :: Boolean | r ) type SyntheticTouchEvent' r - = ( changedTouches :: NativeTouchList + = ( altKey :: Boolean + , changedTouches :: NativeTouchList + , ctrlKey :: Boolean + , getModifierState :: String -> Boolean + , metaKey :: Boolean , targetTouches :: NativeTouchList + , shiftKey :: Boolean , touches :: NativeTouchList | r ) type SyntheticTransitionEvent' r = ( propertyName :: String + , pseudoElement :: String + , elapsedTime :: Number | r ) @@ -227,171 +248,152 @@ type SyntheticWheelEvent' r | r ) -type SyntheticAnimationTransitionEvent' r - = ( pseudoElement :: String - , elapsedTime :: Number - | r - ) - -type SyntheticFocusMouseEvent' r - = ( relatedTarget :: NativeEventTarget - | r - ) - -type SyntheticKeyboardMouseTouchEvent' r - = ( altKey :: Boolean - , ctrlKey :: Boolean - , metaKey :: Boolean - , shiftKey :: Boolean - | r - ) - -bubbles :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff Boolean +bubbles :: forall eff r. SyntheticEvent_ (bubbles :: Boolean | r) -> Eff eff Boolean bubbles = get (SProxy :: SProxy "bubbles") -cancelable :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff Boolean +cancelable :: forall eff r. SyntheticEvent_ (cancelable :: Boolean | r) -> Eff eff Boolean cancelable = get (SProxy :: SProxy "cancelable") -currentTarget :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff NativeEventTarget +currentTarget :: forall eff r. SyntheticEvent_ (currentTarget :: NativeEventTarget | r) -> Eff eff NativeEventTarget currentTarget = get (SProxy :: SProxy "currentTarget") -defaultPrevented :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff Boolean +defaultPrevented :: forall eff r. SyntheticEvent_ (defaultPrevented :: Boolean | r) -> Eff eff Boolean defaultPrevented = get (SProxy :: SProxy "defaultPrevented") -eventPhase :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff Number +eventPhase :: forall eff r. SyntheticEvent_ (eventPhase :: Number | r) -> Eff eff Number eventPhase = get (SProxy :: SProxy "eventPhase") -isTrusted :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff Boolean +isTrusted :: forall eff r. SyntheticEvent_ (isTrusted :: Boolean | r) -> Eff eff Boolean isTrusted = get (SProxy :: SProxy "isTrusted") -nativeEvent :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff NativeEvent +nativeEvent :: forall eff r. SyntheticEvent_ (nativeEvent :: NativeEvent | r) -> Eff eff NativeEvent nativeEvent = get (SProxy :: SProxy "nativeEvent") -target :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff NativeEventTarget +target :: forall eff r. SyntheticEvent_ (target :: NativeEventTarget | r) -> Eff eff NativeEventTarget target = get (SProxy :: SProxy "target") -timeStamp :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff Number +timeStamp :: forall eff r. SyntheticEvent_ (timeStamp :: Number | r) -> Eff eff Number timeStamp = get (SProxy :: SProxy "timeStamp") -type_ :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff String +type_ :: forall eff r. SyntheticEvent_ (type :: String | r) -> Eff eff String type_ = get (SProxy :: SProxy "type") -animationName :: forall eff r. SyntheticEvent_ (SyntheticAnimationEvent' r) -> Eff eff String +animationName :: forall eff r. SyntheticEvent_ (animationName :: String | r) -> Eff eff String animationName = get (SProxy :: SProxy "animationName") -clipboardData :: forall eff r. SyntheticEvent_ (SyntheticClipboardEvent' r) -> Eff eff NativeDataTransfer +clipboardData :: forall eff r. SyntheticEvent_ (clipboardData :: NativeDataTransfer | r) -> Eff eff NativeDataTransfer clipboardData = get (SProxy :: SProxy "clipboardData") -data_ :: forall eff r. SyntheticEvent_ (SyntheticCompositionEvent' r) -> Eff eff String +data_ :: forall eff r. SyntheticEvent_ (data :: String | r) -> Eff eff String data_ = get (SProxy :: SProxy "data") -relatedTarget :: forall eff r. SyntheticEvent_ (SyntheticFocusMouseEvent' r) -> Eff eff NativeEventTarget +relatedTarget :: forall eff r. SyntheticEvent_ (relatedTarget :: NativeEventTarget | r) -> Eff eff NativeEventTarget relatedTarget = get (SProxy :: SProxy "relatedTarget") -charCode :: forall eff r. SyntheticEvent_ (SyntheticKeyboardEvent' r) -> Eff eff Int +charCode :: forall eff r. SyntheticEvent_ (charCode :: Int | r) -> Eff eff Int charCode = get (SProxy :: SProxy "charCode") -key :: forall eff r. SyntheticEvent_ (SyntheticKeyboardEvent' r) -> Eff eff String +key :: forall eff r. SyntheticEvent_ (key :: String | r) -> Eff eff String key = get (SProxy :: SProxy "key") -keyCode :: forall eff r. SyntheticEvent_ (SyntheticKeyboardEvent' r) -> Eff eff Number +keyCode :: forall eff r. SyntheticEvent_ (keyCode :: Number | r) -> Eff eff Number keyCode = get (SProxy :: SProxy "keyCode") -locale :: forall eff r. SyntheticEvent_ (SyntheticKeyboardEvent' r) -> Eff eff String +locale :: forall eff r. SyntheticEvent_ (locale :: String | r) -> Eff eff String locale = get (SProxy :: SProxy "locale") -location :: forall eff r. SyntheticEvent_ (SyntheticKeyboardEvent' r) -> Eff eff Number +location :: forall eff r. SyntheticEvent_ (location :: Number | r) -> Eff eff Number location = get (SProxy :: SProxy "location") -repeat :: forall eff r. SyntheticEvent_ (SyntheticKeyboardEvent' r) -> Eff eff Boolean +repeat :: forall eff r. SyntheticEvent_ (repeat :: Boolean | r) -> Eff eff Boolean repeat = get (SProxy :: SProxy "repeat") -which :: forall eff r. SyntheticEvent_ (SyntheticKeyboardEvent' r) -> Eff eff Number +which :: forall eff r. SyntheticEvent_ (which :: Number | r) -> Eff eff Number which = get (SProxy :: SProxy "which") -button :: forall eff r. SyntheticEvent_ (SyntheticMouseEvent' r) -> Eff eff Number +button :: forall eff r. SyntheticEvent_ (button :: Number | r) -> Eff eff Number button = get (SProxy :: SProxy "button") -buttons :: forall eff r. SyntheticEvent_ (SyntheticMouseEvent' r) -> Eff eff Number +buttons :: forall eff r. SyntheticEvent_ (buttons :: Number | r) -> Eff eff Number buttons = get (SProxy :: SProxy "buttons") -clientX :: forall eff r. SyntheticEvent_ (SyntheticMouseEvent' r) -> Eff eff Number +clientX :: forall eff r. SyntheticEvent_ (clientX :: Number | r) -> Eff eff Number clientX = get (SProxy :: SProxy "clientX") -clientY :: forall eff r. SyntheticEvent_ (SyntheticMouseEvent' r) -> Eff eff Number +clientY :: forall eff r. SyntheticEvent_ (clientY :: Number | r) -> Eff eff Number clientY = get (SProxy :: SProxy "clientY") -pageX :: forall eff r. SyntheticEvent_ (SyntheticMouseEvent' r) -> Eff eff Number +pageX :: forall eff r. SyntheticEvent_ (pageX :: Number | r) -> Eff eff Number pageX = get (SProxy :: SProxy "pageX") -pageY :: forall eff r. SyntheticEvent_ (SyntheticMouseEvent' r) -> Eff eff Number +pageY :: forall eff r. SyntheticEvent_ (pageY :: Number | r) -> Eff eff Number pageY = get (SProxy :: SProxy "pageY") -screenX :: forall eff r. SyntheticEvent_ (SyntheticMouseEvent' r) -> Eff eff Number +screenX :: forall eff r. SyntheticEvent_ (screenX :: Number | r) -> Eff eff Number screenX = get (SProxy :: SProxy "screenX") -screenY :: forall eff r. SyntheticEvent_ (SyntheticMouseEvent' r) -> Eff eff Number +screenY :: forall eff r. SyntheticEvent_ (screenY :: Number | r) -> Eff eff Number screenY = get (SProxy :: SProxy "screenY") -changedTouches :: forall eff r. SyntheticEvent_ (SyntheticTouchEvent' r) -> Eff eff NativeTouchList +changedTouches :: forall eff r. SyntheticEvent_ (changedTouches :: NativeTouchList | r) -> Eff eff NativeTouchList changedTouches = get (SProxy :: SProxy "changedTouches") -targetTouches :: forall eff r. SyntheticEvent_ (SyntheticTouchEvent' r) -> Eff eff NativeTouchList +targetTouches :: forall eff r. SyntheticEvent_ (targetTouches :: NativeTouchList | r) -> Eff eff NativeTouchList targetTouches = get (SProxy :: SProxy "targetTouches") -touches :: forall eff r. SyntheticEvent_ (SyntheticTouchEvent' r) -> Eff eff NativeTouchList +touches :: forall eff r. SyntheticEvent_ (touches :: NativeTouchList | r) -> Eff eff NativeTouchList touches = get (SProxy :: SProxy "touches") -altKey :: forall eff r. SyntheticEvent_ (SyntheticKeyboardMouseTouchEvent' r) -> Eff eff Boolean +altKey :: forall eff r. SyntheticEvent_ (altKey :: Boolean | r) -> Eff eff Boolean altKey = get (SProxy :: SProxy "altKey") -ctrlKey :: forall eff r. SyntheticEvent_ (SyntheticKeyboardMouseTouchEvent' r) -> Eff eff Boolean +ctrlKey :: forall eff r. SyntheticEvent_ (ctrlKey :: Boolean | r) -> Eff eff Boolean ctrlKey = get (SProxy :: SProxy "ctrlKey") -metaKey :: forall eff r. SyntheticEvent_ (SyntheticKeyboardMouseTouchEvent' r) -> Eff eff Boolean +metaKey :: forall eff r. SyntheticEvent_ (metaKey :: Boolean | r) -> Eff eff Boolean metaKey = get (SProxy :: SProxy "metaKey") -shiftKey :: forall eff r. SyntheticEvent_ (SyntheticKeyboardMouseTouchEvent' r) -> Eff eff Boolean +shiftKey :: forall eff r. SyntheticEvent_ (shiftKey :: Boolean | r) -> Eff eff Boolean shiftKey = get (SProxy :: SProxy "shiftKey") -propertyName :: forall eff r. SyntheticEvent_ (SyntheticTransitionEvent' r) -> Eff eff String +propertyName :: forall eff r. SyntheticEvent_ (propertyName :: String | r) -> Eff eff String propertyName = get (SProxy :: SProxy "propertyName") -pseudoElement :: forall eff r. SyntheticEvent_ (SyntheticAnimationTransitionEvent' r) -> Eff eff String +pseudoElement :: forall eff r. SyntheticEvent_ (pseudoElement :: String | r) -> Eff eff String pseudoElement = get (SProxy :: SProxy "pseudoElement") -elapsedTime :: forall eff r. SyntheticEvent_ (SyntheticAnimationTransitionEvent' r) -> Eff eff Number +elapsedTime :: forall eff r. SyntheticEvent_ (elapsedTime :: Number | r) -> Eff eff Number elapsedTime = get (SProxy :: SProxy "elapsedTime") -detail :: forall eff r. SyntheticEvent_ (SyntheticUIEvent' r) -> Eff eff Number +detail :: forall eff r. SyntheticEvent_ (detail :: Number | r) -> Eff eff Number detail = get (SProxy :: SProxy "detail") -view :: forall eff r. SyntheticEvent_ (SyntheticUIEvent' r) -> Eff eff NativeAbstractView +view :: forall eff r. SyntheticEvent_ (view :: NativeAbstractView | r) -> Eff eff NativeAbstractView view = get (SProxy :: SProxy "view") -deltaMode :: forall eff r. SyntheticEvent_ (SyntheticWheelEvent' r) -> Eff eff Number +deltaMode :: forall eff r. SyntheticEvent_ (deltaMode :: Number | r) -> Eff eff Number deltaMode = get (SProxy :: SProxy "deltaMode") -deltaX :: forall eff r. SyntheticEvent_ (SyntheticWheelEvent' r) -> Eff eff Number +deltaX :: forall eff r. SyntheticEvent_ (deltaX :: Number | r) -> Eff eff Number deltaX = get (SProxy :: SProxy "deltaX") -deltaY :: forall eff r. SyntheticEvent_ (SyntheticWheelEvent' r) -> Eff eff Number +deltaY :: forall eff r. SyntheticEvent_ (deltaY :: Number | r) -> Eff eff Number deltaY = get (SProxy :: SProxy "deltaY") -deltaZ :: forall eff r. SyntheticEvent_ (SyntheticWheelEvent' r) -> Eff eff Number +deltaZ :: forall eff r. SyntheticEvent_ (deltaZ :: Number | r) -> Eff eff Number deltaZ = get (SProxy :: SProxy "deltaZ") -foreign import preventDefault :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff Unit +foreign import preventDefault :: forall eff r. SyntheticEvent_ r -> Eff eff Unit -foreign import isDefaultPrevented :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff Boolean +foreign import isDefaultPrevented :: forall eff r. SyntheticEvent_ r -> Eff eff Boolean -foreign import stopPropagation :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff Unit +foreign import stopPropagation :: forall eff r. SyntheticEvent_ r -> Eff eff Unit -foreign import isPropagationStopped :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff Boolean +foreign import isPropagationStopped :: forall eff r. SyntheticEvent_ r -> Eff eff Boolean -foreign import persist :: forall eff r. SyntheticEvent_ (SyntheticEvent' r) -> Eff eff Unit +foreign import persist :: forall eff r. SyntheticEvent_ r -> Eff eff Unit -foreign import getModifierState :: forall eff r. String -> SyntheticEvent_ (SyntheticKeyboardMouseTouchEvent' r) -> Eff eff Boolean +foreign import getModifierState :: forall eff r. String -> SyntheticEvent_ (getModifierState :: String -> Boolean | r) -> Eff eff Boolean get :: forall eff l r s a