From 17b9cdfa92b2f53e6f89d6ccbd0e03fd0d1c9a33 Mon Sep 17 00:00:00 2001 From: Alex <8125011+alex-kinokon@users.noreply.github.com> Date: Tue, 14 Nov 2023 04:09:17 -0500 Subject: [PATCH] Revert "Remove *Capture type definitions" This reverts commit 43a20d1e8febc0acee02fbd1e2bd5a0ec6c0ab86. --- CHANGELOG.md | 3 ++ package.json | 2 +- types/index.d.ts | 83 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc67024..3c1e4b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 `` element. - Fixes #94: supports `forwardRef` and `useImperativeHandle`. diff --git a/package.json b/package.json index fda626f..0be1840 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/types/index.d.ts b/types/index.d.ts index f401735..26489e0 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -497,120 +497,203 @@ export interface DOMAttributes { dangerouslySetInnerHTML?: { __html: string } | undefined on?: EventHandlers | undefined + onCapture?: EventHandlers | undefined // Clipboard Events onCopy?: ClipboardEventHandler | undefined + onCopyCapture?: ClipboardEventHandler | undefined onCut?: ClipboardEventHandler | undefined + onCutCapture?: ClipboardEventHandler | undefined onPaste?: ClipboardEventHandler | undefined + onPasteCapture?: ClipboardEventHandler | undefined // Composition Events onCompositionEnd?: CompositionEventHandler | undefined + onCompositionEndCapture?: CompositionEventHandler | undefined onCompositionStart?: CompositionEventHandler | undefined + onCompositionStartCapture?: CompositionEventHandler | undefined onCompositionUpdate?: CompositionEventHandler | undefined + onCompositionUpdateCapture?: CompositionEventHandler | undefined // Focus Events onFocus?: FocusEventHandler | undefined + onFocusCapture?: FocusEventHandler | undefined onBlur?: FocusEventHandler | undefined + onBlurCapture?: FocusEventHandler | undefined // Form Events onChange?: FormEventHandler | undefined + onChangeCapture?: FormEventHandler | undefined onBeforeInput?: FormEventHandler | undefined + onBeforeInputCapture?: FormEventHandler | undefined onInput?: FormEventHandler | undefined + onInputCapture?: FormEventHandler | undefined onReset?: FormEventHandler | undefined + onResetCapture?: FormEventHandler | undefined onSubmit?: FormEventHandler | undefined + onSubmitCapture?: FormEventHandler | undefined onInvalid?: FormEventHandler | undefined + onInvalidCapture?: FormEventHandler | undefined // Image Events onLoad?: ReactEventHandler | undefined + onLoadCapture?: ReactEventHandler | undefined onError?: ReactEventHandler | undefined // also a Media Event + onErrorCapture?: ReactEventHandler | undefined // also a Media Event // Keyboard Events onKeyDown?: KeyboardEventHandler | undefined + onKeyDownCapture?: KeyboardEventHandler | undefined /** @deprecated */ onKeyPress?: KeyboardEventHandler | undefined + /** @deprecated */ + onKeyPressCapture?: KeyboardEventHandler | undefined onKeyUp?: KeyboardEventHandler | undefined + onKeyUpCapture?: KeyboardEventHandler | undefined // Media Events onAbort?: ReactEventHandler | undefined + onAbortCapture?: ReactEventHandler | undefined onCanPlay?: ReactEventHandler | undefined + onCanPlayCapture?: ReactEventHandler | undefined onCanPlayThrough?: ReactEventHandler | undefined + onCanPlayThroughCapture?: ReactEventHandler | undefined onDurationChange?: ReactEventHandler | undefined + onDurationChangeCapture?: ReactEventHandler | undefined onEmptied?: ReactEventHandler | undefined + onEmptiedCapture?: ReactEventHandler | undefined onEncrypted?: ReactEventHandler | undefined + onEncryptedCapture?: ReactEventHandler | undefined onEnded?: ReactEventHandler | undefined + onEndedCapture?: ReactEventHandler | undefined onLoadedData?: ReactEventHandler | undefined + onLoadedDataCapture?: ReactEventHandler | undefined onLoadedMetadata?: ReactEventHandler | undefined + onLoadedMetadataCapture?: ReactEventHandler | undefined onLoadStart?: ReactEventHandler | undefined + onLoadStartCapture?: ReactEventHandler | undefined onPause?: ReactEventHandler | undefined + onPauseCapture?: ReactEventHandler | undefined onPlay?: ReactEventHandler | undefined + onPlayCapture?: ReactEventHandler | undefined onPlaying?: ReactEventHandler | undefined + onPlayingCapture?: ReactEventHandler | undefined onProgress?: ReactEventHandler | undefined + onProgressCapture?: ReactEventHandler | undefined onRateChange?: ReactEventHandler | undefined + onRateChangeCapture?: ReactEventHandler | undefined onResize?: ReactEventHandler | undefined + onResizeCapture?: ReactEventHandler | undefined onSeeked?: ReactEventHandler | undefined + onSeekedCapture?: ReactEventHandler | undefined onSeeking?: ReactEventHandler | undefined + onSeekingCapture?: ReactEventHandler | undefined onStalled?: ReactEventHandler | undefined + onStalledCapture?: ReactEventHandler | undefined onSuspend?: ReactEventHandler | undefined + onSuspendCapture?: ReactEventHandler | undefined onTimeUpdate?: ReactEventHandler | undefined + onTimeUpdateCapture?: ReactEventHandler | undefined onVolumeChange?: ReactEventHandler | undefined + onVolumeChangeCapture?: ReactEventHandler | undefined onWaiting?: ReactEventHandler | undefined + onWaitingCapture?: ReactEventHandler | undefined // MouseEvents onAuxClick?: MouseEventHandler | undefined + onAuxClickCapture?: MouseEventHandler | undefined onClick?: MouseEventHandler | undefined + onClickCapture?: MouseEventHandler | undefined onContextMenu?: MouseEventHandler | undefined + onContextMenuCapture?: MouseEventHandler | undefined onDblClick?: MouseEventHandler | undefined + onDblClickCapture?: MouseEventHandler | undefined onDoubleClick?: MouseEventHandler | undefined + onDoubleClickCapture?: MouseEventHandler | undefined onDrag?: DragEventHandler | undefined + onDragCapture?: DragEventHandler | undefined onDragEnd?: DragEventHandler | undefined + onDragEndCapture?: DragEventHandler | undefined onDragEnter?: DragEventHandler | undefined + onDragEnterCapture?: DragEventHandler | undefined onDragExit?: DragEventHandler | undefined + onDragExitCapture?: DragEventHandler | undefined onDragLeave?: DragEventHandler | undefined + onDragLeaveCapture?: DragEventHandler | undefined onDragOver?: DragEventHandler | undefined + onDragOverCapture?: DragEventHandler | undefined onDragStart?: DragEventHandler | undefined + onDragStartCapture?: DragEventHandler | undefined onDrop?: DragEventHandler | undefined + onDropCapture?: DragEventHandler | undefined onMouseDown?: MouseEventHandler | undefined + onMouseDownCapture?: MouseEventHandler | undefined onMouseEnter?: MouseEventHandler | undefined onMouseLeave?: MouseEventHandler | undefined onMouseMove?: MouseEventHandler | undefined + onMouseMoveCapture?: MouseEventHandler | undefined onMouseOut?: MouseEventHandler | undefined + onMouseOutCapture?: MouseEventHandler | undefined onMouseOver?: MouseEventHandler | undefined + onMouseOverCapture?: MouseEventHandler | undefined onMouseUp?: MouseEventHandler | undefined + onMouseUpCapture?: MouseEventHandler | undefined // Selection Events onSelect?: ReactEventHandler | undefined + onSelectCapture?: ReactEventHandler | undefined // Touch Events onTouchCancel?: TouchEventHandler | undefined + onTouchCancelCapture?: TouchEventHandler | undefined onTouchEnd?: TouchEventHandler | undefined + onTouchEndCapture?: TouchEventHandler | undefined onTouchMove?: TouchEventHandler | undefined + onTouchMoveCapture?: TouchEventHandler | undefined onTouchStart?: TouchEventHandler | undefined + onTouchStartCapture?: TouchEventHandler | undefined // Pointer Events onPointerDown?: PointerEventHandler | undefined + onPointerDownCapture?: PointerEventHandler | undefined onPointerMove?: PointerEventHandler | undefined + onPointerMoveCapture?: PointerEventHandler | undefined onPointerUp?: PointerEventHandler | undefined + onPointerUpCapture?: PointerEventHandler | undefined onPointerCancel?: PointerEventHandler | undefined + onPointerCancelCapture?: PointerEventHandler | undefined onPointerEnter?: PointerEventHandler | undefined + onPointerEnterCapture?: PointerEventHandler | undefined onPointerLeave?: PointerEventHandler | undefined + onPointerLeaveCapture?: PointerEventHandler | undefined onPointerOver?: PointerEventHandler | undefined + onPointerOverCapture?: PointerEventHandler | undefined onPointerOut?: PointerEventHandler | undefined + onPointerOutCapture?: PointerEventHandler | undefined onGotPointerCapture?: PointerEventHandler | undefined + onGotPointerCaptureCapture?: PointerEventHandler | undefined onLostPointerCapture?: PointerEventHandler | undefined + onLostPointerCaptureCapture?: PointerEventHandler | undefined // UI Events onScroll?: UIEventHandler | undefined + onScrollCapture?: UIEventHandler | undefined // Wheel Events onWheel?: WheelEventHandler | undefined + onWheelCapture?: WheelEventHandler | undefined // Animation Events onAnimationStart?: AnimationEventHandler | undefined + onAnimationStartCapture?: AnimationEventHandler | undefined onAnimationEnd?: AnimationEventHandler | undefined + onAnimationEndCapture?: AnimationEventHandler | undefined onAnimationIteration?: AnimationEventHandler | undefined + onAnimationIterationCapture?: AnimationEventHandler | undefined // Transition Events onTransitionEnd?: TransitionEventHandler | undefined + onTransitionEndCapture?: TransitionEventHandler | undefined } export interface CSSProperties extends CSS.Properties {