Skip to content

Commit

Permalink
Revert "Remove *Capture type definitions"
Browse files Browse the repository at this point in the history
This reverts commit 43a20d1.
  • Loading branch information
alex-kinokon committed Nov 14, 2023
1 parent 2e8baab commit 17b9cdf
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 8.1.1
- Undo: Removes all `*Capture` event listener types. They were never supported.

# 8.1.0
- Fixes #97: support `disabled` on `<link>` element.
- Fixes #94: supports `forwardRef` and `useImperativeHandle`.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jsx-dom",
"version": "8.1.0",
"version": "8.1.1",
"description": "JSX to document.createElement.",
"main": "index.js",
"module": "index.js",
Expand Down
83 changes: 83 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,120 +497,203 @@ export interface DOMAttributes<T> {
dangerouslySetInnerHTML?: { __html: string } | undefined

on?: EventHandlers<T> | undefined
onCapture?: EventHandlers<T> | undefined

// Clipboard Events
onCopy?: ClipboardEventHandler<T> | undefined
onCopyCapture?: ClipboardEventHandler<T> | undefined
onCut?: ClipboardEventHandler<T> | undefined
onCutCapture?: ClipboardEventHandler<T> | undefined
onPaste?: ClipboardEventHandler<T> | undefined
onPasteCapture?: ClipboardEventHandler<T> | undefined

// Composition Events
onCompositionEnd?: CompositionEventHandler<T> | undefined
onCompositionEndCapture?: CompositionEventHandler<T> | undefined
onCompositionStart?: CompositionEventHandler<T> | undefined
onCompositionStartCapture?: CompositionEventHandler<T> | undefined
onCompositionUpdate?: CompositionEventHandler<T> | undefined
onCompositionUpdateCapture?: CompositionEventHandler<T> | undefined

// Focus Events
onFocus?: FocusEventHandler<T> | undefined
onFocusCapture?: FocusEventHandler<T> | undefined
onBlur?: FocusEventHandler<T> | undefined
onBlurCapture?: FocusEventHandler<T> | undefined

// Form Events
onChange?: FormEventHandler<T> | undefined
onChangeCapture?: FormEventHandler<T> | undefined
onBeforeInput?: FormEventHandler<T> | undefined
onBeforeInputCapture?: FormEventHandler<T> | undefined
onInput?: FormEventHandler<T> | undefined
onInputCapture?: FormEventHandler<T> | undefined
onReset?: FormEventHandler<T> | undefined
onResetCapture?: FormEventHandler<T> | undefined
onSubmit?: FormEventHandler<T> | undefined
onSubmitCapture?: FormEventHandler<T> | undefined
onInvalid?: FormEventHandler<T> | undefined
onInvalidCapture?: FormEventHandler<T> | undefined

// Image Events
onLoad?: ReactEventHandler<T> | undefined
onLoadCapture?: ReactEventHandler<T> | undefined
onError?: ReactEventHandler<T> | undefined // also a Media Event
onErrorCapture?: ReactEventHandler<T> | undefined // also a Media Event

// Keyboard Events
onKeyDown?: KeyboardEventHandler<T> | undefined
onKeyDownCapture?: KeyboardEventHandler<T> | undefined
/** @deprecated */
onKeyPress?: KeyboardEventHandler<T> | undefined
/** @deprecated */
onKeyPressCapture?: KeyboardEventHandler<T> | undefined
onKeyUp?: KeyboardEventHandler<T> | undefined
onKeyUpCapture?: KeyboardEventHandler<T> | undefined

// Media Events
onAbort?: ReactEventHandler<T> | undefined
onAbortCapture?: ReactEventHandler<T> | undefined
onCanPlay?: ReactEventHandler<T> | undefined
onCanPlayCapture?: ReactEventHandler<T> | undefined
onCanPlayThrough?: ReactEventHandler<T> | undefined
onCanPlayThroughCapture?: ReactEventHandler<T> | undefined
onDurationChange?: ReactEventHandler<T> | undefined
onDurationChangeCapture?: ReactEventHandler<T> | undefined
onEmptied?: ReactEventHandler<T> | undefined
onEmptiedCapture?: ReactEventHandler<T> | undefined
onEncrypted?: ReactEventHandler<T> | undefined
onEncryptedCapture?: ReactEventHandler<T> | undefined
onEnded?: ReactEventHandler<T> | undefined
onEndedCapture?: ReactEventHandler<T> | undefined
onLoadedData?: ReactEventHandler<T> | undefined
onLoadedDataCapture?: ReactEventHandler<T> | undefined
onLoadedMetadata?: ReactEventHandler<T> | undefined
onLoadedMetadataCapture?: ReactEventHandler<T> | undefined
onLoadStart?: ReactEventHandler<T> | undefined
onLoadStartCapture?: ReactEventHandler<T> | undefined
onPause?: ReactEventHandler<T> | undefined
onPauseCapture?: ReactEventHandler<T> | undefined
onPlay?: ReactEventHandler<T> | undefined
onPlayCapture?: ReactEventHandler<T> | undefined
onPlaying?: ReactEventHandler<T> | undefined
onPlayingCapture?: ReactEventHandler<T> | undefined
onProgress?: ReactEventHandler<T> | undefined
onProgressCapture?: ReactEventHandler<T> | undefined
onRateChange?: ReactEventHandler<T> | undefined
onRateChangeCapture?: ReactEventHandler<T> | undefined
onResize?: ReactEventHandler<T> | undefined
onResizeCapture?: ReactEventHandler<T> | undefined
onSeeked?: ReactEventHandler<T> | undefined
onSeekedCapture?: ReactEventHandler<T> | undefined
onSeeking?: ReactEventHandler<T> | undefined
onSeekingCapture?: ReactEventHandler<T> | undefined
onStalled?: ReactEventHandler<T> | undefined
onStalledCapture?: ReactEventHandler<T> | undefined
onSuspend?: ReactEventHandler<T> | undefined
onSuspendCapture?: ReactEventHandler<T> | undefined
onTimeUpdate?: ReactEventHandler<T> | undefined
onTimeUpdateCapture?: ReactEventHandler<T> | undefined
onVolumeChange?: ReactEventHandler<T> | undefined
onVolumeChangeCapture?: ReactEventHandler<T> | undefined
onWaiting?: ReactEventHandler<T> | undefined
onWaitingCapture?: ReactEventHandler<T> | undefined

// MouseEvents
onAuxClick?: MouseEventHandler<T> | undefined
onAuxClickCapture?: MouseEventHandler<T> | undefined
onClick?: MouseEventHandler<T> | undefined
onClickCapture?: MouseEventHandler<T> | undefined
onContextMenu?: MouseEventHandler<T> | undefined
onContextMenuCapture?: MouseEventHandler<T> | undefined
onDblClick?: MouseEventHandler<T> | undefined
onDblClickCapture?: MouseEventHandler<T> | undefined
onDoubleClick?: MouseEventHandler<T> | undefined
onDoubleClickCapture?: MouseEventHandler<T> | undefined
onDrag?: DragEventHandler<T> | undefined
onDragCapture?: DragEventHandler<T> | undefined
onDragEnd?: DragEventHandler<T> | undefined
onDragEndCapture?: DragEventHandler<T> | undefined
onDragEnter?: DragEventHandler<T> | undefined
onDragEnterCapture?: DragEventHandler<T> | undefined
onDragExit?: DragEventHandler<T> | undefined
onDragExitCapture?: DragEventHandler<T> | undefined
onDragLeave?: DragEventHandler<T> | undefined
onDragLeaveCapture?: DragEventHandler<T> | undefined
onDragOver?: DragEventHandler<T> | undefined
onDragOverCapture?: DragEventHandler<T> | undefined
onDragStart?: DragEventHandler<T> | undefined
onDragStartCapture?: DragEventHandler<T> | undefined
onDrop?: DragEventHandler<T> | undefined
onDropCapture?: DragEventHandler<T> | undefined
onMouseDown?: MouseEventHandler<T> | undefined
onMouseDownCapture?: MouseEventHandler<T> | undefined
onMouseEnter?: MouseEventHandler<T> | undefined
onMouseLeave?: MouseEventHandler<T> | undefined
onMouseMove?: MouseEventHandler<T> | undefined
onMouseMoveCapture?: MouseEventHandler<T> | undefined
onMouseOut?: MouseEventHandler<T> | undefined
onMouseOutCapture?: MouseEventHandler<T> | undefined
onMouseOver?: MouseEventHandler<T> | undefined
onMouseOverCapture?: MouseEventHandler<T> | undefined
onMouseUp?: MouseEventHandler<T> | undefined
onMouseUpCapture?: MouseEventHandler<T> | undefined

// Selection Events
onSelect?: ReactEventHandler<T> | undefined
onSelectCapture?: ReactEventHandler<T> | undefined

// Touch Events
onTouchCancel?: TouchEventHandler<T> | undefined
onTouchCancelCapture?: TouchEventHandler<T> | undefined
onTouchEnd?: TouchEventHandler<T> | undefined
onTouchEndCapture?: TouchEventHandler<T> | undefined
onTouchMove?: TouchEventHandler<T> | undefined
onTouchMoveCapture?: TouchEventHandler<T> | undefined
onTouchStart?: TouchEventHandler<T> | undefined
onTouchStartCapture?: TouchEventHandler<T> | undefined

// Pointer Events
onPointerDown?: PointerEventHandler<T> | undefined
onPointerDownCapture?: PointerEventHandler<T> | undefined
onPointerMove?: PointerEventHandler<T> | undefined
onPointerMoveCapture?: PointerEventHandler<T> | undefined
onPointerUp?: PointerEventHandler<T> | undefined
onPointerUpCapture?: PointerEventHandler<T> | undefined
onPointerCancel?: PointerEventHandler<T> | undefined
onPointerCancelCapture?: PointerEventHandler<T> | undefined
onPointerEnter?: PointerEventHandler<T> | undefined
onPointerEnterCapture?: PointerEventHandler<T> | undefined
onPointerLeave?: PointerEventHandler<T> | undefined
onPointerLeaveCapture?: PointerEventHandler<T> | undefined
onPointerOver?: PointerEventHandler<T> | undefined
onPointerOverCapture?: PointerEventHandler<T> | undefined
onPointerOut?: PointerEventHandler<T> | undefined
onPointerOutCapture?: PointerEventHandler<T> | undefined
onGotPointerCapture?: PointerEventHandler<T> | undefined
onGotPointerCaptureCapture?: PointerEventHandler<T> | undefined
onLostPointerCapture?: PointerEventHandler<T> | undefined
onLostPointerCaptureCapture?: PointerEventHandler<T> | undefined

// UI Events
onScroll?: UIEventHandler<T> | undefined
onScrollCapture?: UIEventHandler<T> | undefined

// Wheel Events
onWheel?: WheelEventHandler<T> | undefined
onWheelCapture?: WheelEventHandler<T> | undefined

// Animation Events
onAnimationStart?: AnimationEventHandler<T> | undefined
onAnimationStartCapture?: AnimationEventHandler<T> | undefined
onAnimationEnd?: AnimationEventHandler<T> | undefined
onAnimationEndCapture?: AnimationEventHandler<T> | undefined
onAnimationIteration?: AnimationEventHandler<T> | undefined
onAnimationIterationCapture?: AnimationEventHandler<T> | undefined

// Transition Events
onTransitionEnd?: TransitionEventHandler<T> | undefined
onTransitionEndCapture?: TransitionEventHandler<T> | undefined
}

export interface CSSProperties extends CSS.Properties<string | number> {
Expand Down

0 comments on commit 17b9cdf

Please sign in to comment.