diff --git a/src/dom.d.ts b/src/dom.d.ts new file mode 100644 index 0000000000..b4394970f0 --- /dev/null +++ b/src/dom.d.ts @@ -0,0 +1,2448 @@ +// Most of our DOM-ish types + +import { ClassAttributes, PreactDOMAttributes } from 'preact'; + +// Implementations of some DOM events that are not available in TS 5.1 +interface ToggleEvent extends Event { + readonly newState: string; + readonly oldState: string; +} + +declare var ToggleEvent: { + prototype: ToggleEvent; + new (type: string, eventInitDict?: ToggleEventInit): ToggleEvent; +}; + +interface ToggleEventInit extends EventInit { + newState?: string; + oldState?: string; +} + +interface CommandEvent extends Event { + readonly source: Element | null; + readonly command: string; +} + +declare var CommandEvent: { + prototype: CommandEvent; + new (type: string, eventInitDict?: CommandEventInit): CommandEvent; +}; + +interface CommandEventInit extends EventInit { + source: Element | null; + command: string; +} + +type Booleanish = boolean | 'true' | 'false'; + +export interface SignalLike { + value: T; + peek(): T; + subscribe(fn: (value: T) => void): () => void; +} + +export type Signalish = T | SignalLike; + +export type UnpackSignal = T extends SignalLike ? V : T; + +export type DOMCSSProperties = { + [key in keyof Omit< + CSSStyleDeclaration, + | 'item' + | 'setProperty' + | 'removeProperty' + | 'getPropertyValue' + | 'getPropertyPriority' + >]?: string | number | null | undefined; +}; +export type AllCSSProperties = { + [key: string]: string | number | null | undefined; +}; +export interface CSSProperties extends AllCSSProperties, DOMCSSProperties { + cssText?: string | null; +} + +export interface SVGAttributes + extends HTMLAttributes { + accentHeight?: Signalish; + accumulate?: Signalish<'none' | 'sum' | undefined>; + additive?: Signalish<'replace' | 'sum' | undefined>; + alignmentBaseline?: Signalish< + | 'auto' + | 'baseline' + | 'before-edge' + | 'text-before-edge' + | 'middle' + | 'central' + | 'after-edge' + | 'text-after-edge' + | 'ideographic' + | 'alphabetic' + | 'hanging' + | 'mathematical' + | 'inherit' + | undefined + >; + 'alignment-baseline'?: Signalish< + | 'auto' + | 'baseline' + | 'before-edge' + | 'text-before-edge' + | 'middle' + | 'central' + | 'after-edge' + | 'text-after-edge' + | 'ideographic' + | 'alphabetic' + | 'hanging' + | 'mathematical' + | 'inherit' + | undefined + >; + allowReorder?: Signalish<'no' | 'yes' | undefined>; + 'allow-reorder'?: Signalish<'no' | 'yes' | undefined>; + alphabetic?: Signalish; + amplitude?: Signalish; + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/arabic-form */ + arabicForm?: Signalish< + 'initial' | 'medial' | 'terminal' | 'isolated' | undefined + >; + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/arabic-form */ + 'arabic-form'?: Signalish< + 'initial' | 'medial' | 'terminal' | 'isolated' | undefined + >; + ascent?: Signalish; + attributeName?: Signalish; + attributeType?: Signalish; + azimuth?: Signalish; + baseFrequency?: Signalish; + baselineShift?: Signalish; + 'baseline-shift'?: Signalish; + baseProfile?: Signalish; + bbox?: Signalish; + begin?: Signalish; + bias?: Signalish; + by?: Signalish; + calcMode?: Signalish; + capHeight?: Signalish; + 'cap-height'?: Signalish; + clip?: Signalish; + clipPath?: Signalish; + 'clip-path'?: Signalish; + clipPathUnits?: Signalish; + clipRule?: Signalish; + 'clip-rule'?: Signalish; + colorInterpolation?: Signalish; + 'color-interpolation'?: Signalish; + colorInterpolationFilters?: Signalish< + 'auto' | 'sRGB' | 'linearRGB' | 'inherit' | undefined + >; + 'color-interpolation-filters'?: Signalish< + 'auto' | 'sRGB' | 'linearRGB' | 'inherit' | undefined + >; + colorProfile?: Signalish; + 'color-profile'?: Signalish; + colorRendering?: Signalish; + 'color-rendering'?: Signalish; + contentScriptType?: Signalish; + 'content-script-type'?: Signalish; + contentStyleType?: Signalish; + 'content-style-type'?: Signalish; + cursor?: Signalish; + cx?: Signalish; + cy?: Signalish; + d?: Signalish; + decelerate?: Signalish; + descent?: Signalish; + diffuseConstant?: Signalish; + direction?: Signalish; + display?: Signalish; + divisor?: Signalish; + dominantBaseline?: Signalish; + 'dominant-baseline'?: Signalish; + dur?: Signalish; + dx?: Signalish; + dy?: Signalish; + edgeMode?: Signalish; + elevation?: Signalish; + enableBackground?: Signalish; + 'enable-background'?: Signalish; + end?: Signalish; + exponent?: Signalish; + externalResourcesRequired?: Signalish; + fill?: Signalish; + fillOpacity?: Signalish; + 'fill-opacity'?: Signalish; + fillRule?: Signalish<'nonzero' | 'evenodd' | 'inherit' | undefined>; + 'fill-rule'?: Signalish<'nonzero' | 'evenodd' | 'inherit' | undefined>; + filter?: Signalish; + filterRes?: Signalish; + filterUnits?: Signalish; + floodColor?: Signalish; + 'flood-color'?: Signalish; + floodOpacity?: Signalish; + 'flood-opacity'?: Signalish; + focusable?: Signalish; + fontFamily?: Signalish; + 'font-family'?: Signalish; + fontSize?: Signalish; + 'font-size'?: Signalish; + fontSizeAdjust?: Signalish; + 'font-size-adjust'?: Signalish; + fontStretch?: Signalish; + 'font-stretch'?: Signalish; + fontStyle?: Signalish; + 'font-style'?: Signalish; + fontVariant?: Signalish; + 'font-variant'?: Signalish; + fontWeight?: Signalish; + 'font-weight'?: Signalish; + format?: Signalish; + from?: Signalish; + fx?: Signalish; + fy?: Signalish; + g1?: Signalish; + g2?: Signalish; + glyphName?: Signalish; + 'glyph-name'?: Signalish; + glyphOrientationHorizontal?: Signalish; + 'glyph-orientation-horizontal'?: Signalish; + glyphOrientationVertical?: Signalish; + 'glyph-orientation-vertical'?: Signalish; + glyphRef?: Signalish; + gradientTransform?: Signalish; + gradientUnits?: Signalish; + hanging?: Signalish; + height?: Signalish; + horizAdvX?: Signalish; + 'horiz-adv-x'?: Signalish; + horizOriginX?: Signalish; + 'horiz-origin-x'?: Signalish; + href?: Signalish; + hreflang?: Signalish; + hrefLang?: Signalish; + ideographic?: Signalish; + imageRendering?: Signalish; + 'image-rendering'?: Signalish; + in2?: Signalish; + in?: Signalish; + intercept?: Signalish; + k1?: Signalish; + k2?: Signalish; + k3?: Signalish; + k4?: Signalish; + k?: Signalish; + kernelMatrix?: Signalish; + kernelUnitLength?: Signalish; + kerning?: Signalish; + keyPoints?: Signalish; + keySplines?: Signalish; + keyTimes?: Signalish; + lengthAdjust?: Signalish; + letterSpacing?: Signalish; + 'letter-spacing'?: Signalish; + lightingColor?: Signalish; + 'lighting-color'?: Signalish; + limitingConeAngle?: Signalish; + local?: Signalish; + markerEnd?: Signalish; + 'marker-end'?: Signalish; + markerHeight?: Signalish; + markerMid?: Signalish; + 'marker-mid'?: Signalish; + markerStart?: Signalish; + 'marker-start'?: Signalish; + markerUnits?: Signalish; + markerWidth?: Signalish; + mask?: Signalish; + maskContentUnits?: Signalish; + maskUnits?: Signalish; + mathematical?: Signalish; + mode?: Signalish; + numOctaves?: Signalish; + offset?: Signalish; + opacity?: Signalish; + operator?: Signalish; + order?: Signalish; + orient?: Signalish; + orientation?: Signalish; + origin?: Signalish; + overflow?: Signalish; + overlinePosition?: Signalish; + 'overline-position'?: Signalish; + overlineThickness?: Signalish; + 'overline-thickness'?: Signalish; + paintOrder?: Signalish; + 'paint-order'?: Signalish; + panose1?: Signalish; + 'panose-1'?: Signalish; + pathLength?: Signalish; + patternContentUnits?: Signalish; + patternTransform?: Signalish; + patternUnits?: Signalish; + pointerEvents?: Signalish; + 'pointer-events'?: Signalish; + points?: Signalish; + pointsAtX?: Signalish; + pointsAtY?: Signalish; + pointsAtZ?: Signalish; + preserveAlpha?: Signalish; + preserveAspectRatio?: Signalish; + primitiveUnits?: Signalish; + r?: Signalish; + radius?: Signalish; + refX?: Signalish; + refY?: Signalish; + renderingIntent?: Signalish; + 'rendering-intent'?: Signalish; + repeatCount?: Signalish; + 'repeat-count'?: Signalish; + repeatDur?: Signalish; + 'repeat-dur'?: Signalish; + requiredExtensions?: Signalish; + requiredFeatures?: Signalish; + restart?: Signalish; + result?: Signalish; + rotate?: Signalish; + rx?: Signalish; + ry?: Signalish; + scale?: Signalish; + seed?: Signalish; + shapeRendering?: Signalish; + 'shape-rendering'?: Signalish; + slope?: Signalish; + spacing?: Signalish; + specularConstant?: Signalish; + specularExponent?: Signalish; + speed?: Signalish; + spreadMethod?: Signalish; + startOffset?: Signalish; + stdDeviation?: Signalish; + stemh?: Signalish; + stemv?: Signalish; + stitchTiles?: Signalish; + stopColor?: Signalish; + 'stop-color'?: Signalish; + stopOpacity?: Signalish; + 'stop-opacity'?: Signalish; + strikethroughPosition?: Signalish; + 'strikethrough-position'?: Signalish; + strikethroughThickness?: Signalish; + 'strikethrough-thickness'?: Signalish; + string?: Signalish; + stroke?: Signalish; + strokeDasharray?: Signalish; + 'stroke-dasharray'?: Signalish; + strokeDashoffset?: Signalish; + 'stroke-dashoffset'?: Signalish; + strokeLinecap?: Signalish< + 'butt' | 'round' | 'square' | 'inherit' | undefined + >; + 'stroke-linecap'?: Signalish< + 'butt' | 'round' | 'square' | 'inherit' | undefined + >; + strokeLinejoin?: Signalish< + 'miter' | 'round' | 'bevel' | 'inherit' | undefined + >; + 'stroke-linejoin'?: Signalish< + 'miter' | 'round' | 'bevel' | 'inherit' | undefined + >; + strokeMiterlimit?: Signalish; + 'stroke-miterlimit'?: Signalish; + strokeOpacity?: Signalish; + 'stroke-opacity'?: Signalish; + strokeWidth?: Signalish; + 'stroke-width'?: Signalish; + surfaceScale?: Signalish; + systemLanguage?: Signalish; + tableValues?: Signalish; + targetX?: Signalish; + targetY?: Signalish; + textAnchor?: Signalish; + 'text-anchor'?: Signalish; + textDecoration?: Signalish; + 'text-decoration'?: Signalish; + textLength?: Signalish; + textRendering?: Signalish; + 'text-rendering'?: Signalish; + to?: Signalish; + transform?: Signalish; + transformOrigin?: Signalish; + 'transform-origin'?: Signalish; + type?: Signalish; + u1?: Signalish; + u2?: Signalish; + underlinePosition?: Signalish; + 'underline-position'?: Signalish; + underlineThickness?: Signalish; + 'underline-thickness'?: Signalish; + unicode?: Signalish; + unicodeBidi?: Signalish; + 'unicode-bidi'?: Signalish; + unicodeRange?: Signalish; + 'unicode-range'?: Signalish; + unitsPerEm?: Signalish; + 'units-per-em'?: Signalish; + vAlphabetic?: Signalish; + 'v-alphabetic'?: Signalish; + values?: Signalish; + vectorEffect?: Signalish; + 'vector-effect'?: Signalish; + version?: Signalish; + vertAdvY?: Signalish; + 'vert-adv-y'?: Signalish; + vertOriginX?: Signalish; + 'vert-origin-x'?: Signalish; + vertOriginY?: Signalish; + 'vert-origin-y'?: Signalish; + vHanging?: Signalish; + 'v-hanging'?: Signalish; + vIdeographic?: Signalish; + 'v-ideographic'?: Signalish; + viewBox?: Signalish; + viewTarget?: Signalish; + visibility?: Signalish; + vMathematical?: Signalish; + 'v-mathematical'?: Signalish; + width?: Signalish; + wordSpacing?: Signalish; + 'word-spacing'?: Signalish; + writingMode?: Signalish; + 'writing-mode'?: Signalish; + x1?: Signalish; + x2?: Signalish; + x?: Signalish; + xChannelSelector?: Signalish; + xHeight?: Signalish; + 'x-height'?: Signalish; + xlinkActuate?: Signalish; + 'xlink:actuate'?: Signalish; + xlinkArcrole?: Signalish; + 'xlink:arcrole'?: Signalish; + xlinkHref?: Signalish; + 'xlink:href'?: Signalish; + xlinkRole?: Signalish; + 'xlink:role'?: Signalish; + xlinkShow?: Signalish; + 'xlink:show'?: Signalish; + xlinkTitle?: Signalish; + 'xlink:title'?: Signalish; + xlinkType?: Signalish; + 'xlink:type'?: Signalish; + xmlBase?: Signalish; + 'xml:base'?: Signalish; + xmlLang?: Signalish; + 'xml:lang'?: Signalish; + xmlns?: Signalish; + xmlnsXlink?: Signalish; + xmlSpace?: Signalish; + 'xml:space'?: Signalish; + y1?: Signalish; + y2?: Signalish; + y?: Signalish; + yChannelSelector?: Signalish; + z?: Signalish; + zoomAndPan?: Signalish; +} + +export interface PathAttributes { + d: string; +} + +export type TargetedEvent< + Target extends EventTarget = EventTarget, + TypedEvent extends Event = Event +> = Omit & { + readonly currentTarget: Target; +}; + +export type TargetedAnimationEvent = TargetedEvent< + Target, + AnimationEvent +>; +export type TargetedClipboardEvent = TargetedEvent< + Target, + ClipboardEvent +>; +export type TargetedCommandEvent = TargetedEvent< + Target, + CommandEvent +>; +export type TargetedCompositionEvent = + TargetedEvent; +export type TargetedDragEvent = TargetedEvent< + Target, + DragEvent +>; +export type TargetedFocusEvent = TargetedEvent< + Target, + FocusEvent +>; +export type TargetedInputEvent = TargetedEvent< + Target, + InputEvent +>; +export type TargetedKeyboardEvent = TargetedEvent< + Target, + KeyboardEvent +>; +export type TargetedMouseEvent = TargetedEvent< + Target, + MouseEvent +>; +export type TargetedPointerEvent = TargetedEvent< + Target, + PointerEvent +>; +export type TargetedSubmitEvent = TargetedEvent< + Target, + SubmitEvent +>; +export type TargetedTouchEvent = TargetedEvent< + Target, + TouchEvent +>; +export type TargetedToggleEvent = TargetedEvent< + Target, + ToggleEvent +>; +export type TargetedTransitionEvent = TargetedEvent< + Target, + TransitionEvent +>; +export type TargetedUIEvent = TargetedEvent< + Target, + UIEvent +>; +export type TargetedWheelEvent = TargetedEvent< + Target, + WheelEvent +>; +export type TargetedPictureInPictureEvent = + TargetedEvent; + +export type EventHandler = { + bivarianceHack(event: E): void; +}['bivarianceHack']; + +export type AnimationEventHandler = EventHandler< + TargetedAnimationEvent +>; +export type ClipboardEventHandler = EventHandler< + TargetedClipboardEvent +>; +export type CommandEventHandler = EventHandler< + TargetedCommandEvent +>; +export type CompositionEventHandler = EventHandler< + TargetedCompositionEvent +>; +export type DragEventHandler = EventHandler< + TargetedDragEvent +>; +export type ToggleEventHandler = EventHandler< + TargetedToggleEvent +>; +export type FocusEventHandler = EventHandler< + TargetedFocusEvent +>; +export type GenericEventHandler = EventHandler< + TargetedEvent +>; +export type InputEventHandler = EventHandler< + TargetedInputEvent +>; +export type KeyboardEventHandler = EventHandler< + TargetedKeyboardEvent +>; +export type MouseEventHandler = EventHandler< + TargetedMouseEvent +>; +export type PointerEventHandler = EventHandler< + TargetedPointerEvent +>; +export type SubmitEventHandler = EventHandler< + TargetedSubmitEvent +>; +export type TouchEventHandler = EventHandler< + TargetedTouchEvent +>; +export type TransitionEventHandler = EventHandler< + TargetedTransitionEvent +>; +export type UIEventHandler = EventHandler< + TargetedUIEvent +>; +export type WheelEventHandler = EventHandler< + TargetedWheelEvent +>; +export type PictureInPictureEventHandler = + EventHandler>; + +export interface DOMAttributes + extends PreactDOMAttributes { + // Image Events + onLoad?: GenericEventHandler | undefined; + onLoadCapture?: GenericEventHandler | undefined; + onError?: GenericEventHandler | undefined; + onErrorCapture?: GenericEventHandler | 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; + + // Popover Events + onBeforeToggle?: ToggleEventHandler | undefined; + onToggle?: ToggleEventHandler | undefined; + + // Dialog Events + onClose?: GenericEventHandler | undefined; + onCancel?: GenericEventHandler | undefined; + + // Focus Events + onFocus?: FocusEventHandler | undefined; + onFocusCapture?: FocusEventHandler | undefined; + onFocusIn?: FocusEventHandler | undefined; + onFocusInCapture?: FocusEventHandler | undefined; + onFocusOut?: FocusEventHandler | undefined; + onFocusOutCapture?: FocusEventHandler | undefined; + onBlur?: FocusEventHandler | undefined; + onBlurCapture?: FocusEventHandler | undefined; + + // Form Events + onChange?: GenericEventHandler | undefined; + onChangeCapture?: GenericEventHandler | undefined; + onInput?: InputEventHandler | undefined; + onInputCapture?: InputEventHandler | undefined; + onBeforeInput?: InputEventHandler | undefined; + onBeforeInputCapture?: InputEventHandler | undefined; + onSearch?: GenericEventHandler | undefined; + onSearchCapture?: GenericEventHandler | undefined; + onSubmit?: SubmitEventHandler | undefined; + onSubmitCapture?: SubmitEventHandler | undefined; + onInvalid?: GenericEventHandler | undefined; + onInvalidCapture?: GenericEventHandler | undefined; + onReset?: GenericEventHandler | undefined; + onResetCapture?: GenericEventHandler | undefined; + onFormData?: GenericEventHandler | undefined; + onFormDataCapture?: GenericEventHandler | undefined; + + // Keyboard Events + onKeyDown?: KeyboardEventHandler | undefined; + onKeyDownCapture?: KeyboardEventHandler | undefined; + onKeyPress?: KeyboardEventHandler | undefined; + onKeyPressCapture?: KeyboardEventHandler | undefined; + onKeyUp?: KeyboardEventHandler | undefined; + onKeyUpCapture?: KeyboardEventHandler | undefined; + + // Media Events + onAbort?: GenericEventHandler | undefined; + onAbortCapture?: GenericEventHandler | undefined; + onCanPlay?: GenericEventHandler | undefined; + onCanPlayCapture?: GenericEventHandler | undefined; + onCanPlayThrough?: GenericEventHandler | undefined; + onCanPlayThroughCapture?: GenericEventHandler | undefined; + onDurationChange?: GenericEventHandler | undefined; + onDurationChangeCapture?: GenericEventHandler | undefined; + onEmptied?: GenericEventHandler | undefined; + onEmptiedCapture?: GenericEventHandler | undefined; + onEncrypted?: GenericEventHandler | undefined; + onEncryptedCapture?: GenericEventHandler | undefined; + onEnded?: GenericEventHandler | undefined; + onEndedCapture?: GenericEventHandler | undefined; + onLoadedData?: GenericEventHandler | undefined; + onLoadedDataCapture?: GenericEventHandler | undefined; + onLoadedMetadata?: GenericEventHandler | undefined; + onLoadedMetadataCapture?: GenericEventHandler | undefined; + onLoadStart?: GenericEventHandler | undefined; + onLoadStartCapture?: GenericEventHandler | undefined; + onPause?: GenericEventHandler | undefined; + onPauseCapture?: GenericEventHandler | undefined; + onPlay?: GenericEventHandler | undefined; + onPlayCapture?: GenericEventHandler | undefined; + onPlaying?: GenericEventHandler | undefined; + onPlayingCapture?: GenericEventHandler | undefined; + onProgress?: GenericEventHandler | undefined; + onProgressCapture?: GenericEventHandler | undefined; + onRateChange?: GenericEventHandler | undefined; + onRateChangeCapture?: GenericEventHandler | undefined; + onSeeked?: GenericEventHandler | undefined; + onSeekedCapture?: GenericEventHandler | undefined; + onSeeking?: GenericEventHandler | undefined; + onSeekingCapture?: GenericEventHandler | undefined; + onStalled?: GenericEventHandler | undefined; + onStalledCapture?: GenericEventHandler | undefined; + onSuspend?: GenericEventHandler | undefined; + onSuspendCapture?: GenericEventHandler | undefined; + onTimeUpdate?: GenericEventHandler | undefined; + onTimeUpdateCapture?: GenericEventHandler | undefined; + onVolumeChange?: GenericEventHandler | undefined; + onVolumeChangeCapture?: GenericEventHandler | undefined; + onWaiting?: GenericEventHandler | undefined; + onWaitingCapture?: GenericEventHandler | undefined; + + // MouseEvents + onClick?: MouseEventHandler | undefined; + onClickCapture?: MouseEventHandler | undefined; + onContextMenu?: MouseEventHandler | undefined; + onContextMenuCapture?: MouseEventHandler | undefined; + onDblClick?: MouseEventHandler | undefined; + onDblClickCapture?: 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; + onMouseEnterCapture?: MouseEventHandler | undefined; + onMouseLeave?: MouseEventHandler | undefined; + onMouseLeaveCapture?: 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; + // TODO: Spec for `auxclick` events was changed to make it a PointerEvent but only + // Chrome has support for it yet. When more browsers align we should change this. + // https://developer.mozilla.org/en-US/docs/Web/API/Element/auxclick_event#browser_compatibility + onAuxClick?: MouseEventHandler | undefined; + onAuxClickCapture?: MouseEventHandler | undefined; + + // Selection Events + onSelect?: GenericEventHandler | undefined; + onSelectCapture?: GenericEventHandler | 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 + onPointerOver?: PointerEventHandler | undefined; + onPointerOverCapture?: PointerEventHandler | undefined; + onPointerEnter?: PointerEventHandler | undefined; + onPointerEnterCapture?: PointerEventHandler | undefined; + onPointerDown?: PointerEventHandler | undefined; + onPointerDownCapture?: PointerEventHandler | undefined; + onPointerMove?: PointerEventHandler | undefined; + onPointerMoveCapture?: PointerEventHandler | undefined; + onPointerUp?: PointerEventHandler | undefined; + onPointerUpCapture?: PointerEventHandler | undefined; + onPointerCancel?: PointerEventHandler | undefined; + onPointerCancelCapture?: PointerEventHandler | undefined; + onPointerOut?: PointerEventHandler | undefined; + onPointerOutCapture?: PointerEventHandler | undefined; + onPointerLeave?: PointerEventHandler | undefined; + onPointerLeaveCapture?: PointerEventHandler | undefined; + onGotPointerCapture?: PointerEventHandler | undefined; + onGotPointerCaptureCapture?: PointerEventHandler | undefined; + onLostPointerCapture?: PointerEventHandler | undefined; + onLostPointerCaptureCapture?: PointerEventHandler | undefined; + + // UI Events + onScroll?: UIEventHandler | undefined; + onScrollEnd?: 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 + onTransitionCancel?: TransitionEventHandler; + onTransitionCancelCapture?: TransitionEventHandler; + onTransitionEnd?: TransitionEventHandler; + onTransitionEndCapture?: TransitionEventHandler; + onTransitionRun?: TransitionEventHandler; + onTransitionRunCapture?: TransitionEventHandler; + onTransitionStart?: TransitionEventHandler; + onTransitionStartCapture?: TransitionEventHandler; + + // PictureInPicture Events + onEnterPictureInPicture?: PictureInPictureEventHandler; + onEnterPictureInPictureCapture?: PictureInPictureEventHandler; + onLeavePictureInPicture?: PictureInPictureEventHandler; + onLeavePictureInPictureCapture?: PictureInPictureEventHandler; + onResize?: PictureInPictureEventHandler; + onResizeCapture?: PictureInPictureEventHandler; + + onCommand?: CommandEventHandler; +} + +// All the WAI-ARIA 1.1 attributes from https://www.w3.org/TR/wai-aria-1.1/ +export interface AriaAttributes { + /** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */ + 'aria-activedescendant'?: Signalish; + /** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */ + 'aria-atomic'?: Signalish; + /** + * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be + * presented if they are made. + */ + 'aria-autocomplete'?: Signalish< + 'none' | 'inline' | 'list' | 'both' | undefined + >; + /** + * Defines a string value that labels the current element, which is intended to be converted into Braille. + * @see aria-label. + */ + 'aria-braillelabel'?: Signalish; + /** + * Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille. + * @see aria-roledescription. + */ + 'aria-brailleroledescription'?: Signalish; + /** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. */ + 'aria-busy'?: Signalish; + /** + * Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. + * @see aria-pressed + * @see aria-selected. + */ + 'aria-checked'?: Signalish; + /** + * Defines the total number of columns in a table, grid, or treegrid. + * @see aria-colindex. + */ + 'aria-colcount'?: Signalish; + /** + * Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. + * @see aria-colcount + * @see aria-colspan. + */ + 'aria-colindex'?: Signalish; + /** + * Defines a human readable text alternative of aria-colindex. + * @see aria-rowindextext. + */ + 'aria-colindextext'?: Signalish; + /** + * Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. + * @see aria-colindex + * @see aria-rowspan. + */ + 'aria-colspan'?: Signalish; + /** + * Identifies the element (or elements) whose contents or presence are controlled by the current element. + * @see aria-owns. + */ + 'aria-controls'?: Signalish; + /** Indicates the element that represents the current item within a container or set of related elements. */ + 'aria-current'?: Signalish< + Booleanish | 'page' | 'step' | 'location' | 'date' | 'time' | undefined + >; + /** + * Identifies the element (or elements) that describes the object. + * @see aria-labelledby + */ + 'aria-describedby'?: Signalish; + /** + * Defines a string value that describes or annotates the current element. + * @see related aria-describedby. + */ + 'aria-description'?: Signalish; + /** + * Identifies the element that provides a detailed, extended description for the object. + * @see aria-describedby. + */ + 'aria-details'?: Signalish; + /** + * Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. + * @see aria-hidden + * @see aria-readonly. + */ + 'aria-disabled'?: Signalish; + /** + * Indicates what functions can be performed when a dragged object is released on the drop target. + * @deprecated in ARIA 1.1 + */ + 'aria-dropeffect'?: Signalish< + 'none' | 'copy' | 'execute' | 'link' | 'move' | 'popup' | undefined + >; + /** + * Identifies the element that provides an error message for the object. + * @see aria-invalid + * @see aria-describedby. + */ + 'aria-errormessage'?: Signalish; + /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */ + 'aria-expanded'?: Signalish; + /** + * Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, + * allows assistive technology to override the general default of reading in document source order. + */ + 'aria-flowto'?: Signalish; + /** + * Indicates an element's "grabbed" state in a drag-and-drop operation. + * @deprecated in ARIA 1.1 + */ + 'aria-grabbed'?: Signalish; + /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */ + 'aria-haspopup'?: Signalish< + Booleanish | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | undefined + >; + /** + * Indicates whether the element is exposed to an accessibility API. + * @see aria-disabled. + */ + 'aria-hidden'?: Signalish; + /** + * Indicates the entered value does not conform to the format expected by the application. + * @see aria-errormessage. + */ + 'aria-invalid'?: Signalish; + /** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */ + 'aria-keyshortcuts'?: Signalish; + /** + * Defines a string value that labels the current element. + * @see aria-labelledby. + */ + 'aria-label'?: Signalish; + /** + * Identifies the element (or elements) that labels the current element. + * @see aria-describedby. + */ + 'aria-labelledby'?: Signalish; + /** Defines the hierarchical level of an element within a structure. */ + 'aria-level'?: Signalish; + /** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. */ + 'aria-live'?: Signalish<'off' | 'assertive' | 'polite' | undefined>; + /** Indicates whether an element is modal when displayed. */ + 'aria-modal'?: Signalish; + /** Indicates whether a text box accepts multiple lines of input or only a single line. */ + 'aria-multiline'?: Signalish; + /** Indicates that the user may select more than one item from the current selectable descendants. */ + 'aria-multiselectable'?: Signalish; + /** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */ + 'aria-orientation'?: Signalish<'horizontal' | 'vertical' | undefined>; + /** + * Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship + * between DOM elements where the DOM hierarchy cannot be used to represent the relationship. + * @see aria-controls. + */ + 'aria-owns'?: Signalish; + /** + * Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. + * A hint could be a sample value or a brief description of the expected format. + */ + 'aria-placeholder'?: Signalish; + /** + * Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. + * @see aria-setsize. + */ + 'aria-posinset'?: Signalish; + /** + * Indicates the current "pressed" state of toggle buttons. + * @see aria-checked + * @see aria-selected. + */ + 'aria-pressed'?: Signalish; + /** + * Indicates that the element is not editable, but is otherwise operable. + * @see aria-disabled. + */ + 'aria-readonly'?: Signalish; + /** + * Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. + * @see aria-atomic. + */ + 'aria-relevant'?: Signalish< + | 'additions' + | 'additions removals' + | 'additions text' + | 'all' + | 'removals' + | 'removals additions' + | 'removals text' + | 'text' + | 'text additions' + | 'text removals' + | undefined + >; + /** Indicates that user input is required on the element before a form may be submitted. */ + 'aria-required'?: Signalish; + /** Defines a human-readable, author-localized description for the role of an element. */ + 'aria-roledescription'?: Signalish; + /** + * Defines the total number of rows in a table, grid, or treegrid. + * @see aria-rowindex. + */ + 'aria-rowcount'?: Signalish; + /** + * Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. + * @see aria-rowcount + * @see aria-rowspan. + */ + 'aria-rowindex'?: Signalish; + /** + * Defines a human readable text alternative of aria-rowindex. + * @see aria-colindextext. + */ + 'aria-rowindextext'?: Signalish; + /** + * Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. + * @see aria-rowindex + * @see aria-colspan. + */ + 'aria-rowspan'?: Signalish; + /** + * Indicates the current "selected" state of various widgets. + * @see aria-checked + * @see aria-pressed. + */ + 'aria-selected'?: Signalish; + /** + * Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. + * @see aria-posinset. + */ + 'aria-setsize'?: Signalish; + /** Indicates if items in a table or grid are sorted in ascending or descending order. */ + 'aria-sort'?: Signalish< + 'none' | 'ascending' | 'descending' | 'other' | undefined + >; + /** Defines the maximum allowed value for a range widget. */ + 'aria-valuemax'?: Signalish; + /** Defines the minimum allowed value for a range widget. */ + 'aria-valuemin'?: Signalish; + /** + * Defines the current value for a range widget. + * @see aria-valuetext. + */ + 'aria-valuenow'?: Signalish; + /** Defines the human readable text alternative of aria-valuenow for a range widget. */ + 'aria-valuetext'?: Signalish; +} + +// All the WAI-ARIA 1.2 role attribute values from https://www.w3.org/TR/wai-aria-1.2/#role_definitions +export type WAIAriaRole = + | 'alert' + | 'alertdialog' + | 'application' + | 'article' + | 'banner' + | 'blockquote' + | 'button' + | 'caption' + | 'cell' + | 'checkbox' + | 'code' + | 'columnheader' + | 'combobox' + | 'command' + | 'complementary' + | 'composite' + | 'contentinfo' + | 'definition' + | 'deletion' + | 'dialog' + | 'directory' + | 'document' + | 'emphasis' + | 'feed' + | 'figure' + | 'form' + | 'grid' + | 'gridcell' + | 'group' + | 'heading' + | 'img' + | 'input' + | 'insertion' + | 'landmark' + | 'link' + | 'list' + | 'listbox' + | 'listitem' + | 'log' + | 'main' + | 'marquee' + | 'math' + | 'meter' + | 'menu' + | 'menubar' + | 'menuitem' + | 'menuitemcheckbox' + | 'menuitemradio' + | 'navigation' + | 'none' + | 'note' + | 'option' + | 'paragraph' + | 'presentation' + | 'progressbar' + | 'radio' + | 'radiogroup' + | 'range' + | 'region' + | 'roletype' + | 'row' + | 'rowgroup' + | 'rowheader' + | 'scrollbar' + | 'search' + | 'searchbox' + | 'section' + | 'sectionhead' + | 'select' + | 'separator' + | 'slider' + | 'spinbutton' + | 'status' + | 'strong' + | 'structure' + | 'subscript' + | 'superscript' + | 'switch' + | 'tab' + | 'table' + | 'tablist' + | 'tabpanel' + | 'term' + | 'textbox' + | 'time' + | 'timer' + | 'toolbar' + | 'tooltip' + | 'tree' + | 'treegrid' + | 'treeitem' + | 'widget' + | 'window' + | 'none presentation'; + +// All the Digital Publishing WAI-ARIA 1.0 role attribute values from https://www.w3.org/TR/dpub-aria-1.0/#role_definitions +export type DPubAriaRole = + | 'doc-abstract' + | 'doc-acknowledgments' + | 'doc-afterword' + | 'doc-appendix' + | 'doc-backlink' + | 'doc-biblioentry' + | 'doc-bibliography' + | 'doc-biblioref' + | 'doc-chapter' + | 'doc-colophon' + | 'doc-conclusion' + | 'doc-cover' + | 'doc-credit' + | 'doc-credits' + | 'doc-dedication' + | 'doc-endnote' + | 'doc-endnotes' + | 'doc-epigraph' + | 'doc-epilogue' + | 'doc-errata' + | 'doc-example' + | 'doc-footnote' + | 'doc-foreword' + | 'doc-glossary' + | 'doc-glossref' + | 'doc-index' + | 'doc-introduction' + | 'doc-noteref' + | 'doc-notice' + | 'doc-pagebreak' + | 'doc-pagelist' + | 'doc-part' + | 'doc-preface' + | 'doc-prologue' + | 'doc-pullquote' + | 'doc-qna' + | 'doc-subtitle' + | 'doc-tip' + | 'doc-toc'; + +export type AriaRole = WAIAriaRole | DPubAriaRole; + +export interface AllHTMLAttributes + extends ClassAttributes, + DOMAttributes, + AriaAttributes { + // Standard HTML Attributes + accept?: Signalish; + acceptCharset?: Signalish; + 'accept-charset'?: Signalish; + accessKey?: Signalish; + accesskey?: Signalish; + action?: Signalish; + allow?: Signalish; + allowFullScreen?: Signalish; + allowTransparency?: Signalish; + alt?: Signalish; + as?: Signalish; + async?: Signalish; + autocomplete?: Signalish; + autoComplete?: Signalish; + autocorrect?: Signalish; + autoCorrect?: Signalish; + autofocus?: Signalish; + autoFocus?: Signalish; + autoPlay?: Signalish; + autoplay?: Signalish; + capture?: Signalish; + cellPadding?: Signalish; + cellSpacing?: Signalish; + charSet?: Signalish; + charset?: Signalish; + challenge?: Signalish; + checked?: Signalish; + cite?: Signalish; + class?: Signalish; + className?: Signalish; + cols?: Signalish; + colSpan?: Signalish; + colspan?: Signalish; + content?: Signalish; + contentEditable?: Signalish< + Booleanish | '' | 'plaintext-only' | 'inherit' | undefined + >; + contenteditable?: Signalish; + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contextmenu */ + contextMenu?: Signalish; + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contextmenu */ + contextmenu?: Signalish; + controls?: Signalish; + controlslist?: Signalish; + controlsList?: Signalish; + coords?: Signalish; + crossOrigin?: Signalish; + crossorigin?: Signalish; + currentTime?: Signalish; + data?: Signalish; + dateTime?: Signalish; + datetime?: Signalish; + default?: Signalish; + defaultChecked?: Signalish; + defaultMuted?: Signalish; + defaultPlaybackRate?: Signalish; + defaultValue?: Signalish; + defer?: Signalish; + dir?: Signalish<'auto' | 'rtl' | 'ltr' | undefined>; + disabled?: Signalish; + disableremoteplayback?: Signalish; + disableRemotePlayback?: Signalish; + download?: Signalish; + decoding?: Signalish<'sync' | 'async' | 'auto' | undefined>; + draggable?: Signalish; + encType?: Signalish; + enctype?: Signalish; + enterkeyhint?: Signalish< + | 'enter' + | 'done' + | 'go' + | 'next' + | 'previous' + | 'search' + | 'send' + | undefined + >; + elementTiming?: Signalish; + elementtiming?: Signalish; + exportparts?: Signalish; + for?: Signalish; + form?: Signalish; + formAction?: Signalish; + formaction?: Signalish; + formEncType?: Signalish; + formenctype?: Signalish; + formMethod?: Signalish; + formmethod?: Signalish; + formNoValidate?: Signalish; + formnovalidate?: Signalish; + formTarget?: Signalish; + formtarget?: Signalish; + frameBorder?: Signalish; + frameborder?: Signalish; + headers?: Signalish; + height?: Signalish; + hidden?: Signalish; + high?: Signalish; + href?: Signalish; + hrefLang?: Signalish; + hreflang?: Signalish; + htmlFor?: Signalish; + httpEquiv?: Signalish; + 'http-equiv'?: Signalish; + icon?: Signalish; + id?: Signalish; + indeterminate?: Signalish; + inert?: Signalish; + inputMode?: Signalish; + inputmode?: Signalish; + integrity?: Signalish; + is?: Signalish; + keyParams?: Signalish; + keyType?: Signalish; + kind?: Signalish; + label?: Signalish; + lang?: Signalish; + list?: Signalish; + loading?: Signalish<'eager' | 'lazy' | undefined>; + loop?: Signalish; + low?: Signalish; + manifest?: Signalish; + marginHeight?: Signalish; + marginWidth?: Signalish; + max?: Signalish; + maxLength?: Signalish; + maxlength?: Signalish; + media?: Signalish; + mediaGroup?: Signalish; + method?: Signalish; + min?: Signalish; + minLength?: Signalish; + minlength?: Signalish; + multiple?: Signalish; + muted?: Signalish; + name?: Signalish; + nomodule?: Signalish; + nonce?: Signalish; + noValidate?: Signalish; + novalidate?: Signalish; + open?: Signalish; + optimum?: Signalish; + part?: Signalish; + pattern?: Signalish; + ping?: Signalish; + placeholder?: Signalish; + playsInline?: Signalish; + playsinline?: Signalish; + playbackRate?: Signalish; + popover?: Signalish<'auto' | 'hint' | 'manual' | boolean | undefined>; + popovertarget?: Signalish; + popoverTarget?: Signalish; + popovertargetaction?: Signalish<'hide' | 'show' | 'toggle' | undefined>; + popoverTargetAction?: Signalish<'hide' | 'show' | 'toggle' | undefined>; + poster?: Signalish; + preload?: Signalish<'auto' | 'metadata' | 'none' | undefined>; + preservesPitch?: Signalish; + radioGroup?: Signalish; + readonly?: Signalish; + readOnly?: Signalish; + referrerpolicy?: Signalish< + | 'no-referrer' + | 'no-referrer-when-downgrade' + | 'origin' + | 'origin-when-cross-origin' + | 'same-origin' + | 'strict-origin' + | 'strict-origin-when-cross-origin' + | 'unsafe-url' + | undefined + >; + rel?: Signalish; + required?: Signalish; + reversed?: Signalish; + role?: Signalish; + rows?: Signalish; + rowSpan?: Signalish; + rowspan?: Signalish; + sandbox?: Signalish; + scope?: Signalish; + scoped?: Signalish; + scrolling?: Signalish; + seamless?: Signalish; + selected?: Signalish; + shape?: Signalish; + size?: Signalish; + sizes?: Signalish; + slot?: Signalish; + span?: Signalish; + spellcheck?: Signalish; + src?: Signalish; + srcDoc?: Signalish; + srcdoc?: Signalish; + srcLang?: Signalish; + srclang?: Signalish; + srcSet?: Signalish; + srcset?: Signalish; + srcObject?: Signalish; + start?: Signalish; + step?: Signalish; + style?: Signalish; + summary?: Signalish; + tabIndex?: Signalish; + tabindex?: Signalish; + target?: Signalish; + title?: Signalish; + type?: Signalish; + useMap?: Signalish; + usemap?: Signalish; + value?: Signalish; + volume?: Signalish; + width?: Signalish; + wmode?: Signalish; + wrap?: Signalish; + + // Non-standard Attributes + autocapitalize?: Signalish< + 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters' | undefined + >; + autoCapitalize?: Signalish< + 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters' | undefined + >; + disablePictureInPicture?: Signalish; + results?: Signalish; + translate?: Signalish; + + // RDFa Attributes + about?: Signalish; + datatype?: Signalish; + inlist?: Signalish; + prefix?: Signalish; + property?: Signalish; + resource?: Signalish; + typeof?: Signalish; + vocab?: Signalish; + + // Microdata Attributes + itemProp?: Signalish; + itemprop?: Signalish; + itemScope?: Signalish; + itemscope?: Signalish; + itemType?: Signalish; + itemtype?: Signalish; + itemID?: Signalish; + itemid?: Signalish; + itemRef?: Signalish; + itemref?: Signalish; +} + +export interface HTMLAttributes + extends ClassAttributes, + DOMAttributes, + AriaAttributes { + // Standard HTML Attributes + accesskey?: Signalish; + accessKey?: Signalish; + autocapitalize?: Signalish< + 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters' | undefined + >; + autoCapitalize?: Signalish< + 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters' | undefined + >; + autocorrect?: Signalish; + autoCorrect?: Signalish; + autofocus?: Signalish; + autoFocus?: Signalish; + class?: Signalish; + className?: Signalish; + contenteditable?: Signalish< + Booleanish | '' | 'plaintext-only' | 'inherit' | undefined + >; + contentEditable?: Signalish< + Booleanish | '' | 'plaintext-only' | 'inherit' | undefined + >; + dir?: Signalish<'auto' | 'rtl' | 'ltr' | undefined>; + draggable?: Signalish; + enterkeyhint?: Signalish< + | 'enter' + | 'done' + | 'go' + | 'next' + | 'previous' + | 'search' + | 'send' + | undefined + >; + exportparts?: Signalish; + hidden?: Signalish; + id?: Signalish; + inert?: Signalish; + inputmode?: Signalish; + inputMode?: Signalish; + is?: Signalish; + lang?: Signalish; + nonce?: Signalish; + part?: Signalish; + popover?: Signalish<'auto' | 'hint' | 'manual' | boolean | undefined>; + slot?: Signalish; + spellcheck?: Signalish; + style?: Signalish; + tabindex?: Signalish; + tabIndex?: Signalish; + title?: Signalish; + translate?: Signalish; + + // WAI-ARIA Attributes + role?: Signalish; + + // Non-standard Attributes + disablePictureInPicture?: Signalish; + elementtiming?: Signalish; + elementTiming?: Signalish; + results?: Signalish; + + // RDFa Attributes + about?: Signalish; + datatype?: Signalish; + inlist?: Signalish; + prefix?: Signalish; + property?: Signalish; + resource?: Signalish; + typeof?: Signalish; + vocab?: Signalish; + + // Microdata Attributes + itemid?: Signalish; + itemID?: Signalish; + itemprop?: Signalish; + itemProp?: Signalish; + itemref?: Signalish; + itemRef?: Signalish; + itemscope?: Signalish; + itemScope?: Signalish; + itemtype?: Signalish; + itemType?: Signalish; +} + +export type HTMLAttributeReferrerPolicy = + | '' + | 'no-referrer' + | 'no-referrer-when-downgrade' + | 'origin' + | 'origin-when-cross-origin' + | 'same-origin' + | 'strict-origin' + | 'strict-origin-when-cross-origin' + | 'unsafe-url'; + +export type HTMLAttributeAnchorTarget = + | '_self' + | '_blank' + | '_parent' + | '_top' + | (string & {}); + +export interface AnchorHTMLAttributes + extends HTMLAttributes { + download?: Signalish; + href?: Signalish; + hreflang?: Signalish; + hrefLang?: Signalish; + media?: Signalish; + ping?: Signalish; + rel?: Signalish; + target?: Signalish; + type?: Signalish; + referrerpolicy?: Signalish; + referrerPolicy?: Signalish; +} + +export interface AreaHTMLAttributes + extends HTMLAttributes { + alt?: Signalish; + coords?: Signalish; + download?: Signalish; + href?: Signalish; + hreflang?: Signalish; + hrefLang?: Signalish; + media?: Signalish; + referrerpolicy?: Signalish; + referrerPolicy?: Signalish; + rel?: Signalish; + shape?: Signalish; + target?: Signalish; +} + +export interface AudioHTMLAttributes + extends MediaHTMLAttributes {} + +export interface BaseHTMLAttributes + extends HTMLAttributes { + href?: Signalish; + target?: Signalish; +} + +export interface BlockquoteHTMLAttributes< + T extends EventTarget = HTMLQuoteElement +> extends HTMLAttributes { + cite?: Signalish; +} + +export interface ButtonHTMLAttributes + extends HTMLAttributes { + command?: Signalish; + commandfor?: Signalish; + commandFor?: Signalish; + disabled?: Signalish; + form?: Signalish; + formaction?: Signalish; + formAction?: Signalish; + formenctype?: Signalish; + formEncType?: Signalish; + formmethod?: Signalish; + formMethod?: Signalish; + formnovalidate?: Signalish; + formNoValidate?: Signalish; + formtarget?: Signalish; + formTarget?: Signalish; + name?: Signalish; + popovertarget?: Signalish; + popoverTarget?: Signalish; + popovertargetaction?: Signalish<'hide' | 'show' | 'toggle' | undefined>; + popoverTargetAction?: Signalish<'hide' | 'show' | 'toggle' | undefined>; + type?: Signalish<'submit' | 'reset' | 'button' | undefined>; + value?: Signalish; +} + +export interface CanvasHTMLAttributes + extends HTMLAttributes { + height?: Signalish; + width?: Signalish; +} + +export interface ColHTMLAttributes + extends HTMLAttributes { + span?: Signalish; + width?: Signalish; +} + +export interface ColgroupHTMLAttributes< + T extends EventTarget = HTMLTableColElement +> extends HTMLAttributes { + span?: Signalish; +} + +export interface DataHTMLAttributes + extends HTMLAttributes { + value?: Signalish; +} + +export interface DelHTMLAttributes + extends HTMLAttributes { + cite?: Signalish; + datetime?: Signalish; + dateTime?: Signalish; +} + +export interface DetailsHTMLAttributes< + T extends EventTarget = HTMLDetailsElement +> extends HTMLAttributes { + name?: Signalish; + open?: Signalish; +} + +export interface DialogHTMLAttributes + extends HTMLAttributes { + onCancel?: GenericEventHandler | undefined; + onClose?: GenericEventHandler | undefined; + open?: Signalish; + closedby?: Signalish<'none' | 'closerequest' | 'any' | undefined>; + closedBy?: Signalish<'none' | 'closerequest' | 'any' | undefined>; +} + +export interface EmbedHTMLAttributes + extends HTMLAttributes { + height?: Signalish; + src?: Signalish; + type?: Signalish; + width?: Signalish; +} + +export interface FieldsetHTMLAttributes< + T extends EventTarget = HTMLFieldSetElement +> extends HTMLAttributes { + disabled?: Signalish; + form?: Signalish; + name?: Signalish; +} + +export interface FormHTMLAttributes + extends HTMLAttributes { + 'accept-charset'?: Signalish; + acceptCharset?: Signalish; + action?: Signalish; + autocomplete?: Signalish; + autoComplete?: Signalish; + enctype?: Signalish; + encType?: Signalish; + method?: Signalish; + name?: Signalish; + novalidate?: Signalish; + noValidate?: Signalish; + rel?: Signalish; + target?: Signalish; +} + +export interface IframeHTMLAttributes + extends HTMLAttributes { + allow?: Signalish; + allowFullScreen?: Signalish; + allowTransparency?: Signalish; + /** @deprecated */ + frameborder?: Signalish; + /** @deprecated */ + frameBorder?: Signalish; + height?: Signalish; + loading?: Signalish<'eager' | 'lazy' | undefined>; + /** @deprecated */ + marginHeight?: Signalish; + /** @deprecated */ + marginWidth?: Signalish; + name?: Signalish; + referrerpolicy?: Signalish; + referrerPolicy?: Signalish; + sandbox?: Signalish; + /** @deprecated */ + scrolling?: Signalish; + seamless?: Signalish; + src?: Signalish; + srcdoc?: Signalish; + srcDoc?: Signalish; + width?: Signalish; +} + +export type HTMLAttributeCrossOrigin = 'anonymous' | 'use-credentials'; + +export interface ImgHTMLAttributes + extends HTMLAttributes { + alt?: Signalish; + crossorigin?: Signalish; + crossOrigin?: Signalish; + decoding?: Signalish<'async' | 'auto' | 'sync' | undefined>; + fetchpriority?: Signalish<'high' | 'auto' | 'low' | undefined>; + fetchPriority?: Signalish<'high' | 'auto' | 'low' | undefined>; + height?: Signalish; + loading?: Signalish<'eager' | 'lazy' | undefined>; + referrerpolicy?: Signalish; + referrerPolicy?: Signalish; + sizes?: Signalish; + src?: Signalish; + srcset?: Signalish; + srcSet?: Signalish; + usemap?: Signalish; + useMap?: Signalish; + width?: Signalish; +} + +export type HTMLInputTypeAttribute = + | 'button' + | 'checkbox' + | 'color' + | 'date' + | 'datetime-local' + | 'email' + | 'file' + | 'hidden' + | 'image' + | 'month' + | 'number' + | 'password' + | 'radio' + | 'range' + | 'reset' + | 'search' + | 'submit' + | 'tel' + | 'text' + | 'time' + | 'url' + | 'week' + | (string & {}); + +export interface InputHTMLAttributes + extends HTMLAttributes { + accept?: Signalish; + alt?: Signalish; + autocomplete?: Signalish; + autoComplete?: Signalish; + capture?: Signalish<'user' | 'environment' | undefined>; // https://www.w3.org/TR/html-media-capture/#the-capture-attribute + checked?: Signalish; + defaultChecked?: Signalish; + defaultValue?: Signalish; + disabled?: Signalish; + enterKeyHint?: Signalish< + | 'enter' + | 'done' + | 'go' + | 'next' + | 'previous' + | 'search' + | 'send' + | undefined + >; + form?: Signalish; + formaction?: Signalish; + formAction?: Signalish; + formenctype?: Signalish; + formEncType?: Signalish; + formmethod?: Signalish; + formMethod?: Signalish; + formnovalidate?: Signalish; + formNoValidate?: Signalish; + formtarget?: Signalish; + formTarget?: Signalish; + height?: Signalish; + indeterminate?: Signalish; + list?: Signalish; + max?: Signalish; + maxlength?: Signalish; + maxLength?: Signalish; + min?: Signalish; + minlength?: Signalish; + minLength?: Signalish; + multiple?: Signalish; + name?: Signalish; + pattern?: Signalish; + placeholder?: Signalish; + readonly?: Signalish; + readOnly?: Signalish; + required?: Signalish; + size?: Signalish; + src?: Signalish; + step?: Signalish; + type?: HTMLInputTypeAttribute | undefined; + value?: Signalish; + width?: Signalish; + onChange?: GenericEventHandler | undefined; +} + +export interface InsHTMLAttributes + extends HTMLAttributes { + cite?: Signalish; + datetime?: Signalish; + dateTime?: Signalish; +} + +export interface KeygenHTMLAttributes< + T extends EventTarget = HTMLUnknownElement +> extends HTMLAttributes { + challenge?: Signalish; + disabled?: Signalish; + form?: Signalish; + keyType?: Signalish; + keyParams?: Signalish; + name?: Signalish; +} + +export interface LabelHTMLAttributes + extends HTMLAttributes { + for?: Signalish; + form?: Signalish; + htmlFor?: Signalish; +} + +export interface LiHTMLAttributes + extends HTMLAttributes { + value?: Signalish; +} + +export interface LinkHTMLAttributes + extends HTMLAttributes { + as?: Signalish; + crossorigin?: Signalish; + crossOrigin?: Signalish; + fetchpriority?: Signalish<'high' | 'low' | 'auto' | undefined>; + fetchPriority?: Signalish<'high' | 'low' | 'auto' | undefined>; + href?: Signalish; + hreflang?: Signalish; + hrefLang?: Signalish; + integrity?: Signalish; + media?: Signalish; + imageSrcSet?: Signalish; + referrerpolicy?: Signalish; + referrerPolicy?: Signalish; + rel?: Signalish; + sizes?: Signalish; + type?: Signalish; + charset?: Signalish; + charSet?: Signalish; +} + +export interface MapHTMLAttributes + extends HTMLAttributes { + name?: Signalish; +} + +export interface MarqueeHTMLAttributes< + T extends EventTarget = HTMLMarqueeElement +> extends HTMLAttributes { + behavior?: Signalish<'scroll' | 'slide' | 'alternate' | undefined>; + bgColor?: Signalish; + direction?: Signalish<'left' | 'right' | 'up' | 'down' | undefined>; + height?: Signalish; + hspace?: Signalish; + loop?: Signalish; + scrollAmount?: Signalish; + scrollDelay?: Signalish; + trueSpeed?: Signalish; + vspace?: Signalish; + width?: Signalish; +} + +export interface MediaHTMLAttributes + extends HTMLAttributes { + autoplay?: Signalish; + autoPlay?: Signalish; + controls?: Signalish; + controlslist?: Signalish; + controlsList?: Signalish; + crossorigin?: Signalish; + crossOrigin?: Signalish; + currentTime?: Signalish; + defaultMuted?: Signalish; + defaultPlaybackRate?: Signalish; + disableremoteplayback?: Signalish; + disableRemotePlayback?: Signalish; + loop?: Signalish; + mediaGroup?: Signalish; + muted?: Signalish; + playbackRate?: Signalish; + preload?: Signalish<'auto' | 'metadata' | 'none' | undefined>; + preservesPitch?: Signalish; + src?: Signalish; + srcObject?: Signalish; + volume?: Signalish; +} + +export interface MenuHTMLAttributes + extends HTMLAttributes { + type?: Signalish; +} + +export interface MetaHTMLAttributes + extends HTMLAttributes { + charset?: Signalish; + charSet?: Signalish; + content?: Signalish; + 'http-equiv'?: Signalish; + httpEquiv?: Signalish; + name?: Signalish; + media?: Signalish; +} + +export interface MeterHTMLAttributes + extends HTMLAttributes { + form?: Signalish; + high?: Signalish; + low?: Signalish; + max?: Signalish; + min?: Signalish; + optimum?: Signalish; + value?: Signalish; +} + +export interface ObjectHTMLAttributes + extends HTMLAttributes { + classID?: Signalish; + data?: Signalish; + form?: Signalish; + height?: Signalish; + name?: Signalish; + type?: Signalish; + usemap?: Signalish; + useMap?: Signalish; + width?: Signalish; + wmode?: Signalish; +} + +export interface OlHTMLAttributes + extends HTMLAttributes { + reversed?: Signalish; + start?: Signalish; + type?: Signalish<'1' | 'a' | 'A' | 'i' | 'I' | undefined>; +} + +export interface OptgroupHTMLAttributes< + T extends EventTarget = HTMLOptGroupElement +> extends HTMLAttributes { + disabled?: Signalish; + label?: Signalish; +} + +export interface OptionHTMLAttributes + extends HTMLAttributes { + disabled?: Signalish; + label?: Signalish; + selected?: Signalish; + value?: Signalish; +} + +export interface OutputHTMLAttributes + extends HTMLAttributes { + for?: Signalish; + form?: Signalish; + htmlFor?: Signalish; + name?: Signalish; +} + +export interface ParamHTMLAttributes + extends HTMLAttributes { + name?: Signalish; + value?: Signalish; +} + +export interface ProgressHTMLAttributes< + T extends EventTarget = HTMLProgressElement +> extends HTMLAttributes { + max?: Signalish; + value?: Signalish; +} + +export interface QuoteHTMLAttributes + extends HTMLAttributes { + cite?: Signalish; +} + +export interface ScriptHTMLAttributes + extends HTMLAttributes { + async?: Signalish; + /** @deprecated */ + charset?: Signalish; + /** @deprecated */ + charSet?: Signalish; + crossorigin?: Signalish; + crossOrigin?: Signalish; + defer?: Signalish; + integrity?: Signalish; + nomodule?: Signalish; + noModule?: Signalish; + referrerpolicy?: Signalish; + referrerPolicy?: Signalish; + src?: Signalish; + type?: Signalish; +} + +export interface SelectHTMLAttributes + extends HTMLAttributes { + autocomplete?: Signalish; + autoComplete?: Signalish; + defaultValue?: Signalish; + disabled?: Signalish; + form?: Signalish; + multiple?: Signalish; + name?: Signalish; + required?: Signalish; + size?: Signalish; + value?: Signalish; + onChange?: GenericEventHandler | undefined; +} + +export interface SlotHTMLAttributes + extends HTMLAttributes { + name?: Signalish; +} + +export interface SourceHTMLAttributes + extends HTMLAttributes { + height?: Signalish; + media?: Signalish; + sizes?: Signalish; + src?: Signalish; + srcset?: Signalish; + srcSet?: Signalish; + type?: Signalish; + width?: Signalish; +} + +export interface StyleHTMLAttributes + extends HTMLAttributes { + media?: Signalish; + scoped?: Signalish; + type?: Signalish; +} + +export interface TableHTMLAttributes + extends HTMLAttributes { + cellPadding?: Signalish; + cellSpacing?: Signalish; + summary?: Signalish; + width?: Signalish; +} + +export interface TdHTMLAttributes + extends HTMLAttributes { + align?: Signalish< + 'left' | 'center' | 'right' | 'justify' | 'char' | undefined + >; + colspan?: Signalish; + colSpan?: Signalish; + headers?: Signalish; + rowspan?: Signalish; + rowSpan?: Signalish; + scope?: Signalish; + abbr?: Signalish; + height?: Signalish; + width?: Signalish; + valign?: Signalish<'top' | 'middle' | 'bottom' | 'baseline' | undefined>; +} + +export interface TextareaHTMLAttributes< + T extends EventTarget = HTMLTextAreaElement +> extends HTMLAttributes { + autocomplete?: Signalish; + autoComplete?: Signalish; + cols?: Signalish; + defaultValue?: Signalish; + dirName?: Signalish; + disabled?: Signalish; + form?: Signalish; + maxlength?: Signalish; + maxLength?: Signalish; + minlength?: Signalish; + minLength?: Signalish; + name?: Signalish; + placeholder?: Signalish; + readOnly?: Signalish; + required?: Signalish; + rows?: Signalish; + value?: Signalish; + wrap?: Signalish; + onChange?: GenericEventHandler | undefined; +} + +export interface ThHTMLAttributes + extends HTMLAttributes { + align?: Signalish< + 'left' | 'center' | 'right' | 'justify' | 'char' | undefined + >; + colspan?: Signalish; + colSpan?: Signalish; + headers?: Signalish; + rowspan?: Signalish; + rowSpan?: Signalish; + scope?: Signalish; + abbr?: Signalish; +} + +export interface TimeHTMLAttributes + extends HTMLAttributes { + datetime?: Signalish; + dateTime?: Signalish; +} + +export interface TrackHTMLAttributes + extends MediaHTMLAttributes { + default?: Signalish; + kind?: Signalish; + label?: Signalish; + srclang?: Signalish; + srcLang?: Signalish; +} + +export interface VideoHTMLAttributes + extends MediaHTMLAttributes { + disablePictureInPicture?: Signalish; + height?: Signalish; + playsinline?: Signalish; + playsInline?: Signalish; + poster?: Signalish; + width?: Signalish; +} + +export type DetailedHTMLProps< + HA extends HTMLAttributes, + RefType extends EventTarget = EventTarget +> = HA; + +export interface MathMLAttributes + extends HTMLAttributes { + dir?: Signalish<'ltr' | 'rtl' | undefined>; + displaystyle?: Signalish; + /** @deprecated This feature is non-standard. See https://developer.mozilla.org/en-US/docs/Web/MathML/Global_attributes/href */ + href?: Signalish; + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Global_attributes/mathbackground */ + mathbackground?: Signalish; + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Global_attributes/mathcolor */ + mathcolor?: Signalish; + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Global_attributes/mathsize */ + mathsize?: Signalish; + nonce?: Signalish; + scriptlevel?: Signalish; +} + +export interface AnnotationMathMLAttributes + extends MathMLAttributes { + encoding?: Signalish; + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/semantics#src */ + src?: Signalish; +} + +export interface AnnotationXmlMathMLAttributes + extends MathMLAttributes { + encoding?: Signalish; + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/semantics#src */ + src?: Signalish; +} + +export interface MActionMathMLAttributes + extends MathMLAttributes { + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/maction#actiontype */ + actiontype?: Signalish<'statusline' | 'toggle' | undefined>; + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/maction#selection */ + selection?: Signalish; +} + +export interface MathMathMLAttributes + extends MathMLAttributes { + display?: Signalish<'block' | 'inline' | undefined>; +} + +export interface MEncloseMathMLAttributes + extends MathMLAttributes { + notation?: Signalish; +} + +export interface MErrorMathMLAttributes + extends MathMLAttributes {} + +export interface MFencedMathMLAttributes + extends MathMLAttributes { + close?: Signalish; + open?: Signalish; + separators?: Signalish; +} + +export interface MFracMathMLAttributes + extends MathMLAttributes { + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mfrac#denomalign */ + denomalign?: Signalish<'center' | 'left' | 'right' | undefined>; + linethickness?: Signalish; + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mfrac#numalign */ + numalign?: Signalish<'center' | 'left' | 'right' | undefined>; +} + +export interface MiMathMLAttributes + extends MathMLAttributes { + /** The only value allowed in the current specification is normal (case insensitive) + * See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mi#mathvariant */ + mathvariant?: Signalish< + | 'normal' + | 'bold' + | 'italic' + | 'bold-italic' + | 'double-struck' + | 'bold-fraktur' + | 'script' + | 'bold-script' + | 'fraktur' + | 'sans-serif' + | 'bold-sans-serif' + | 'sans-serif-italic' + | 'sans-serif-bold-italic' + | 'monospace' + | 'initial' + | 'tailed' + | 'looped' + | 'stretched' + | undefined + >; +} + +export interface MmultiScriptsMathMLAttributes + extends MathMLAttributes { + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mmultiscripts#subscriptshift */ + subscriptshift?: Signalish; + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mmultiscripts#superscriptshift */ + superscriptshift?: Signalish; +} + +export interface MNMathMLAttributes + extends MathMLAttributes {} + +export interface MOMathMLAttributes + extends MathMLAttributes { + /** Non-standard attribute See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mo#accent */ + accent?: Signalish; + fence?: Signalish; + largeop?: Signalish; + lspace?: Signalish; + maxsize?: Signalish; + minsize?: Signalish; + movablelimits?: Signalish; + rspace?: Signalish; + separator?: Signalish; + stretchy?: Signalish; + symmetric?: Signalish; +} + +export interface MOverMathMLAttributes + extends MathMLAttributes { + accent?: Signalish; +} + +export interface MPaddedMathMLAttributes + extends MathMLAttributes { + depth?: Signalish; + height?: Signalish; + lspace?: Signalish; + voffset?: Signalish; + width?: Signalish; +} + +export interface MPhantomMathMLAttributes + extends MathMLAttributes {} + +export interface MPrescriptsMathMLAttributes + extends MathMLAttributes {} + +export interface MRootMathMLAttributes + extends MathMLAttributes {} + +export interface MRowMathMLAttributes + extends MathMLAttributes {} + +export interface MSMathMLAttributes + extends MathMLAttributes { + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/ms#browser_compatibility */ + lquote?: Signalish; + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/ms#browser_compatibility */ + rquote?: Signalish; +} + +export interface MSpaceMathMLAttributes + extends MathMLAttributes { + depth?: Signalish; + height?: Signalish; + width?: Signalish; +} + +export interface MSqrtMathMLAttributes + extends MathMLAttributes {} + +export interface MStyleMathMLAttributes + extends MathMLAttributes { + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mstyle#background */ + background?: Signalish; + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mstyle#color */ + color?: Signalish; + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mstyle#fontsize */ + fontsize?: Signalish; + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mstyle#fontstyle */ + fontstyle?: Signalish; + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mstyle#fontweight */ + fontweight?: Signalish; + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mstyle#scriptminsize */ + scriptminsize?: Signalish; + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mstyle#scriptsizemultiplier */ + scriptsizemultiplier?: Signalish; +} + +export interface MSubMathMLAttributes + extends MathMLAttributes { + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/msub#subscriptshift */ + subscriptshift?: Signalish; +} + +export interface MSubsupMathMLAttributes + extends MathMLAttributes { + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/msubsup#subscriptshift */ + subscriptshift?: Signalish; + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/msubsup#superscriptshift */ + superscriptshift?: Signalish; +} + +export interface MSupMathMLAttributes + extends MathMLAttributes { + /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/msup#superscriptshift */ + superscriptshift?: Signalish; +} + +export interface MTableMathMLAttributes + extends MathMLAttributes { + /** Non-standard attribute See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mtable#align */ + align?: Signalish< + 'axis' | 'baseline' | 'bottom' | 'center' | 'top' | undefined + >; + /** Non-standard attribute See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mtable#columnalign */ + columnalign?: Signalish<'center' | 'left' | 'right' | undefined>; + /** Non-standard attribute See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mtable#columnlines */ + columnlines?: Signalish<'dashed' | 'none' | 'solid' | undefined>; + /** Non-standard attribute See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mtable#columnspacing */ + columnspacing?: Signalish; + /** Non-standard attribute See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mtable#frame */ + frame?: Signalish<'dashed' | 'none' | 'solid' | undefined>; + /** Non-standard attribute See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mtable#framespacing */ + framespacing?: Signalish; + /** Non-standard attribute See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mtable#rowalign */ + rowalign?: Signalish< + 'axis' | 'baseline' | 'bottom' | 'center' | 'top' | undefined + >; + /** Non-standard attribute See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mtable#rowlines */ + rowlines?: Signalish<'dashed' | 'none' | 'solid' | undefined>; + /** Non-standard attribute See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mtable#rowspacing */ + rowspacing?: Signalish; + /** Non-standard attribute See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mtable#width */ + width?: Signalish; +} + +export interface MTdMathMLAttributes + extends MathMLAttributes { + columnspan?: Signalish; + rowspan?: Signalish; + /** Non-standard attribute See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mtd#columnalign */ + columnalign?: Signalish<'center' | 'left' | 'right' | undefined>; + /** Non-standard attribute See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mtd#rowalign */ + rowalign?: Signalish< + 'axis' | 'baseline' | 'bottom' | 'center' | 'top' | undefined + >; +} + +export interface MTextMathMLAttributes + extends MathMLAttributes {} + +export interface MTrMathMLAttributes + extends MathMLAttributes { + /** Non-standard attribute See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mtr#columnalign */ + columnalign?: Signalish<'center' | 'left' | 'right' | undefined>; + /** Non-standard attribute See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mtr#rowalign */ + rowalign?: Signalish< + 'axis' | 'baseline' | 'bottom' | 'center' | 'top' | undefined + >; +} + +export interface MUnderMathMLAttributes + extends MathMLAttributes { + accentunder?: Signalish; +} + +export interface MUnderoverMathMLAttributes + extends MathMLAttributes { + accent?: Signalish; + accentunder?: Signalish; +} + +export interface SemanticsMathMLAttributes + extends MathMLAttributes {} diff --git a/src/index.d.ts b/src/index.d.ts index 5ceb04c1b4..3764e45309 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -1,8 +1,10 @@ export as namespace preact; import { JSXInternal } from './jsx'; +import { DOMAttributes, HTMLAttributes, SVGAttributes } from './dom'; export import JSX = JSXInternal; +export * from './dom'; // // Preact Virtual DOM @@ -190,16 +192,16 @@ export abstract class Component { export function createElement( type: 'input', props: - | (JSXInternal.DOMAttributes & + | (DOMAttributes & ClassAttributes) | null, ...children: ComponentChildren[] ): VNode< - JSXInternal.DOMAttributes & + DOMAttributes & ClassAttributes >; export function createElement< - P extends JSXInternal.HTMLAttributes, + P extends HTMLAttributes, T extends HTMLElement >( type: keyof JSXInternal.IntrinsicElements, @@ -207,7 +209,7 @@ export function createElement< ...children: ComponentChildren[] ): VNode & P>; export function createElement< - P extends JSXInternal.SVGAttributes, + P extends SVGAttributes, T extends HTMLElement >( type: keyof JSXInternal.IntrinsicSVGElements, @@ -218,12 +220,12 @@ export function createElement( type: string, props: | (ClassAttributes & - JSXInternal.HTMLAttributes & - JSXInternal.SVGAttributes) + HTMLAttributes & + SVGAttributes) | null, ...children: ComponentChildren[] ): VNode< - ClassAttributes & JSXInternal.HTMLAttributes & JSXInternal.SVGAttributes + ClassAttributes & HTMLAttributes & SVGAttributes >; export function createElement

( type: ComponentType

| string, @@ -237,16 +239,16 @@ export namespace createElement { export function h( type: 'input', props: - | (JSXInternal.DOMAttributes & + | (DOMAttributes & ClassAttributes) | null, ...children: ComponentChildren[] ): VNode< - JSXInternal.DOMAttributes & + DOMAttributes & ClassAttributes >; export function h< - P extends JSXInternal.HTMLAttributes, + P extends HTMLAttributes, T extends HTMLElement >( type: keyof JSXInternal.IntrinsicElements, @@ -254,7 +256,7 @@ export function h< ...children: ComponentChildren[] ): VNode & P>; export function h< - P extends JSXInternal.SVGAttributes, + P extends SVGAttributes, T extends HTMLElement >( type: keyof JSXInternal.IntrinsicSVGElements, @@ -265,14 +267,14 @@ export function h( type: string, props: | (ClassAttributes & - JSXInternal.HTMLAttributes & - JSXInternal.SVGAttributes) + HTMLAttributes & + SVGAttributes) | null, ...children: ComponentChildren[] ): VNode< | (ClassAttributes & - JSXInternal.HTMLAttributes & - JSXInternal.SVGAttributes) + HTMLAttributes & + SVGAttributes) | null >; export function h

( @@ -287,7 +289,7 @@ export namespace h { // // Preact render // ----------------------------------- -interface ContainerNode { +export interface ContainerNode { readonly nodeType: number; readonly parentNode: ContainerNode | null; readonly firstChild: ContainerNode | null; diff --git a/src/jsx.d.ts b/src/jsx.d.ts index 0cf3c6a79b..7f8d26ead2 100644 --- a/src/jsx.d.ts +++ b/src/jsx.d.ts @@ -88,6 +88,7 @@ export namespace JSXInternal { children: any; } + /** @deprecated Please import from the Preact namespace instead */ export type DOMCSSProperties = { [key in keyof Omit< CSSStyleDeclaration, @@ -98,23 +99,29 @@ export namespace JSXInternal { | 'getPropertyPriority' >]?: string | number | null | undefined; }; + /** @deprecated Please import from the Preact namespace instead */ export type AllCSSProperties = { [key: string]: string | number | null | undefined; }; + /** @deprecated Please import from the Preact namespace instead */ export interface CSSProperties extends AllCSSProperties, DOMCSSProperties { cssText?: string | null; } + /** @deprecated Please import from the Preact namespace instead */ export interface SignalLike { value: T; peek(): T; subscribe(fn: (value: T) => void): () => void; } + /** @deprecated Please import from the Preact namespace instead */ export type Signalish = T | SignalLike; + /** @deprecated Please import from the Preact namespace instead */ export type UnpackSignal = T extends SignalLike ? V : T; + /** @deprecated Please import from the Preact namespace instead */ export interface SVGAttributes extends HTMLAttributes { accentHeight?: Signalish; @@ -498,10 +505,12 @@ export namespace JSXInternal { zoomAndPan?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ export interface PathAttributes { d: string; } + /** @deprecated Please import from the Preact namespace instead */ export type TargetedEvent< Target extends EventTarget = EventTarget, TypedEvent extends Event = Event @@ -509,122 +518,159 @@ export namespace JSXInternal { readonly currentTarget: Target; }; + /** @deprecated Please import from the Preact namespace instead */ export type TargetedAnimationEvent = TargetedEvent; + /** @deprecated Please import from the Preact namespace instead */ export type TargetedClipboardEvent = TargetedEvent; + /** @deprecated Please import from the Preact namespace instead */ export type TargetedCommandEvent = TargetedEvent< Target, CommandEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type TargetedCompositionEvent = TargetedEvent; + /** @deprecated Please import from the Preact namespace instead */ export type TargetedDragEvent = TargetedEvent< Target, DragEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type TargetedFocusEvent = TargetedEvent< Target, FocusEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type TargetedInputEvent = TargetedEvent< Target, InputEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type TargetedKeyboardEvent = TargetedEvent< Target, KeyboardEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type TargetedMouseEvent = TargetedEvent< Target, MouseEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type TargetedPointerEvent = TargetedEvent< Target, PointerEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type TargetedSubmitEvent = TargetedEvent< Target, SubmitEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type TargetedTouchEvent = TargetedEvent< Target, TouchEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type TargetedToggleEvent = TargetedEvent< Target, ToggleEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type TargetedTransitionEvent = TargetedEvent; + /** @deprecated Please import from the Preact namespace instead */ export type TargetedUIEvent = TargetedEvent< Target, UIEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type TargetedWheelEvent = TargetedEvent< Target, WheelEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type TargetedPictureInPictureEvent = TargetedEvent; + /** @deprecated Please import from the Preact namespace instead */ export type EventHandler = { bivarianceHack(event: E): void; }['bivarianceHack']; + /** @deprecated Please import from the Preact namespace instead */ export type AnimationEventHandler = EventHandler< TargetedAnimationEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type ClipboardEventHandler = EventHandler< TargetedClipboardEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type CommandEventHandler = EventHandler< TargetedCommandEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type CompositionEventHandler = EventHandler>; + /** @deprecated Please import from the Preact namespace instead */ export type DragEventHandler = EventHandler< TargetedDragEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type ToggleEventHandler = EventHandler< TargetedToggleEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type FocusEventHandler = EventHandler< TargetedFocusEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type GenericEventHandler = EventHandler< TargetedEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type InputEventHandler = EventHandler< TargetedInputEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type KeyboardEventHandler = EventHandler< TargetedKeyboardEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type MouseEventHandler = EventHandler< TargetedMouseEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type PointerEventHandler = EventHandler< TargetedPointerEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type SubmitEventHandler = EventHandler< TargetedSubmitEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type TouchEventHandler = EventHandler< TargetedTouchEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type TransitionEventHandler = EventHandler< TargetedTransitionEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type UIEventHandler = EventHandler< TargetedUIEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type WheelEventHandler = EventHandler< TargetedWheelEvent >; + /** @deprecated Please import from the Preact namespace instead */ export type PictureInPictureEventHandler = EventHandler>; + /** @deprecated Please import from the Preact namespace instead */ export interface DOMAttributes extends PreactDOMAttributes { // Image Events @@ -857,6 +903,7 @@ export namespace JSXInternal { } // All the WAI-ARIA 1.1 attributes from https://www.w3.org/TR/wai-aria-1.1/ + /** @deprecated Please import from the Preact namespace instead */ export interface AriaAttributes { /** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */ 'aria-activedescendant'?: Signalish; @@ -1101,6 +1148,7 @@ export namespace JSXInternal { } // All the WAI-ARIA 1.2 role attribute values from https://www.w3.org/TR/wai-aria-1.2/#role_definitions + /** @deprecated Please import from the Preact namespace instead */ export type WAIAriaRole = | 'alert' | 'alertdialog' @@ -1198,6 +1246,7 @@ export namespace JSXInternal { | 'none presentation'; // All the Digital Publishing WAI-ARIA 1.0 role attribute values from https://www.w3.org/TR/dpub-aria-1.0/#role_definitions + /** @deprecated Please import from the Preact namespace instead */ export type DPubAriaRole = | 'doc-abstract' | 'doc-acknowledgments' @@ -1239,8 +1288,10 @@ export namespace JSXInternal { | 'doc-tip' | 'doc-toc'; + /** @deprecated Please import from the Preact namespace instead */ export type AriaRole = WAIAriaRole | DPubAriaRole; + /** @deprecated Please import from the Preact namespace instead */ export interface AllHTMLAttributes extends ClassAttributes, DOMAttributes, @@ -1495,6 +1546,7 @@ export namespace JSXInternal { itemref?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ export interface HTMLAttributes extends ClassAttributes, DOMAttributes, @@ -1583,6 +1635,7 @@ export namespace JSXInternal { itemType?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ type HTMLAttributeReferrerPolicy = | '' | 'no-referrer' @@ -1594,6 +1647,7 @@ export namespace JSXInternal { | 'strict-origin-when-cross-origin' | 'unsafe-url'; + /** @deprecated Please import from the Preact namespace instead */ type HTMLAttributeAnchorTarget = | '_self' | '_blank' @@ -1601,6 +1655,7 @@ export namespace JSXInternal { | '_top' | (string & {}); + /** @deprecated Please import from the Preact namespace instead */ interface AnchorHTMLAttributes extends HTMLAttributes { download?: Signalish; @@ -1616,6 +1671,7 @@ export namespace JSXInternal { referrerPolicy?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface AreaHTMLAttributes extends HTMLAttributes { alt?: Signalish; @@ -1632,20 +1688,24 @@ export namespace JSXInternal { target?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface AudioHTMLAttributes extends MediaHTMLAttributes {} + /** @deprecated Please import from the Preact namespace instead */ interface BaseHTMLAttributes extends HTMLAttributes { href?: Signalish; target?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface BlockquoteHTMLAttributes extends HTMLAttributes { cite?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface ButtonHTMLAttributes extends HTMLAttributes { command?: Signalish; @@ -1672,28 +1732,33 @@ export namespace JSXInternal { value?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface CanvasHTMLAttributes extends HTMLAttributes { height?: Signalish; width?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface ColHTMLAttributes extends HTMLAttributes { span?: Signalish; width?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface ColgroupHTMLAttributes extends HTMLAttributes { span?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface DataHTMLAttributes extends HTMLAttributes { value?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface DelHTMLAttributes extends HTMLAttributes { cite?: Signalish; @@ -1701,12 +1766,14 @@ export namespace JSXInternal { dateTime?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface DetailsHTMLAttributes extends HTMLAttributes { name?: Signalish; open?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface DialogHTMLAttributes extends HTMLAttributes { onCancel?: GenericEventHandler | undefined; @@ -1716,6 +1783,7 @@ export namespace JSXInternal { closedBy?: Signalish<'none' | 'closerequest' | 'any' | undefined>; } + /** @deprecated Please import from the Preact namespace instead */ interface EmbedHTMLAttributes extends HTMLAttributes { height?: Signalish; @@ -1724,6 +1792,7 @@ export namespace JSXInternal { width?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface FieldsetHTMLAttributes extends HTMLAttributes { disabled?: Signalish; @@ -1731,6 +1800,7 @@ export namespace JSXInternal { name?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface FormHTMLAttributes extends HTMLAttributes { 'accept-charset'?: Signalish; @@ -1748,6 +1818,7 @@ export namespace JSXInternal { target?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface IframeHTMLAttributes extends HTMLAttributes { allow?: Signalish; @@ -1776,8 +1847,10 @@ export namespace JSXInternal { width?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ type HTMLAttributeCrossOrigin = 'anonymous' | 'use-credentials'; + /** @deprecated Please import from the Preact namespace instead */ interface ImgHTMLAttributes extends HTMLAttributes { alt?: Signalish; @@ -1799,6 +1872,7 @@ export namespace JSXInternal { width?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ type HTMLInputTypeAttribute = | 'button' | 'checkbox' @@ -1824,6 +1898,7 @@ export namespace JSXInternal { | 'week' | (string & {}); + /** @deprecated Please import from the Preact namespace instead */ interface InputHTMLAttributes extends HTMLAttributes { accept?: Signalish; @@ -1881,6 +1956,7 @@ export namespace JSXInternal { onChange?: GenericEventHandler | undefined; } + /** @deprecated Please import from the Preact namespace instead */ interface InsHTMLAttributes extends HTMLAttributes { cite?: Signalish; @@ -1888,6 +1964,7 @@ export namespace JSXInternal { dateTime?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface KeygenHTMLAttributes extends HTMLAttributes { challenge?: Signalish; @@ -1898,6 +1975,7 @@ export namespace JSXInternal { name?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface LabelHTMLAttributes extends HTMLAttributes { for?: Signalish; @@ -1905,11 +1983,13 @@ export namespace JSXInternal { htmlFor?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface LiHTMLAttributes extends HTMLAttributes { value?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface LinkHTMLAttributes extends HTMLAttributes { as?: Signalish; @@ -1932,11 +2012,13 @@ export namespace JSXInternal { charSet?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface MapHTMLAttributes extends HTMLAttributes { name?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface MarqueeHTMLAttributes extends HTMLAttributes { behavior?: Signalish<'scroll' | 'slide' | 'alternate' | undefined>; @@ -1952,6 +2034,7 @@ export namespace JSXInternal { width?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface MediaHTMLAttributes extends HTMLAttributes { autoplay?: Signalish; @@ -1977,11 +2060,13 @@ export namespace JSXInternal { volume?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface MenuHTMLAttributes extends HTMLAttributes { type?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface MetaHTMLAttributes extends HTMLAttributes { charset?: Signalish; @@ -1993,6 +2078,7 @@ export namespace JSXInternal { media?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface MeterHTMLAttributes extends HTMLAttributes { form?: Signalish; @@ -2004,6 +2090,7 @@ export namespace JSXInternal { value?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface ObjectHTMLAttributes extends HTMLAttributes { classID?: Signalish; @@ -2018,6 +2105,7 @@ export namespace JSXInternal { wmode?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface OlHTMLAttributes extends HTMLAttributes { reversed?: Signalish; @@ -2025,12 +2113,14 @@ export namespace JSXInternal { type?: Signalish<'1' | 'a' | 'A' | 'i' | 'I' | undefined>; } + /** @deprecated Please import from the Preact namespace instead */ interface OptgroupHTMLAttributes extends HTMLAttributes { disabled?: Signalish; label?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface OptionHTMLAttributes extends HTMLAttributes { disabled?: Signalish; @@ -2039,6 +2129,7 @@ export namespace JSXInternal { value?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface OutputHTMLAttributes extends HTMLAttributes { for?: Signalish; @@ -2047,23 +2138,27 @@ export namespace JSXInternal { name?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface ParamHTMLAttributes extends HTMLAttributes { name?: Signalish; value?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface ProgressHTMLAttributes extends HTMLAttributes { max?: Signalish; value?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface QuoteHTMLAttributes extends HTMLAttributes { cite?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface ScriptHTMLAttributes extends HTMLAttributes { async?: Signalish; @@ -2083,6 +2178,7 @@ export namespace JSXInternal { type?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface SelectHTMLAttributes extends HTMLAttributes { autocomplete?: Signalish; @@ -2098,11 +2194,13 @@ export namespace JSXInternal { onChange?: GenericEventHandler | undefined; } + /** @deprecated Please import from the Preact namespace instead */ interface SlotHTMLAttributes extends HTMLAttributes { name?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface SourceHTMLAttributes extends HTMLAttributes { height?: Signalish; @@ -2115,6 +2213,7 @@ export namespace JSXInternal { width?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface StyleHTMLAttributes extends HTMLAttributes { media?: Signalish; @@ -2122,6 +2221,7 @@ export namespace JSXInternal { type?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface TableHTMLAttributes extends HTMLAttributes { cellPadding?: Signalish; @@ -2130,6 +2230,7 @@ export namespace JSXInternal { width?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface TdHTMLAttributes extends HTMLAttributes { align?: Signalish< @@ -2147,6 +2248,7 @@ export namespace JSXInternal { valign?: Signalish<'top' | 'middle' | 'bottom' | 'baseline' | undefined>; } + /** @deprecated Please import from the Preact namespace instead */ interface TextareaHTMLAttributes extends HTMLAttributes { autocomplete?: Signalish; @@ -2170,6 +2272,7 @@ export namespace JSXInternal { onChange?: GenericEventHandler | undefined; } + /** @deprecated Please import from the Preact namespace instead */ interface ThHTMLAttributes extends HTMLAttributes { align?: Signalish< @@ -2184,12 +2287,14 @@ export namespace JSXInternal { abbr?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface TimeHTMLAttributes extends HTMLAttributes { datetime?: Signalish; dateTime?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface TrackHTMLAttributes extends MediaHTMLAttributes { default?: Signalish; @@ -2199,6 +2304,7 @@ export namespace JSXInternal { srcLang?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ interface VideoHTMLAttributes extends MediaHTMLAttributes { disablePictureInPicture?: Signalish; @@ -2209,11 +2315,13 @@ export namespace JSXInternal { width?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ export type DetailedHTMLProps< HA extends HTMLAttributes, RefType extends EventTarget = EventTarget > = HA; + /** @deprecated Please import from the Preact namespace instead */ export interface MathMLAttributes extends HTMLAttributes { dir?: Signalish<'ltr' | 'rtl' | undefined>; @@ -2230,6 +2338,7 @@ export namespace JSXInternal { scriptlevel?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ export interface AnnotationMathMLAttributes extends MathMLAttributes { encoding?: Signalish; @@ -2237,6 +2346,7 @@ export namespace JSXInternal { src?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ export interface AnnotationXmlMathMLAttributes extends MathMLAttributes { encoding?: Signalish; @@ -2244,6 +2354,7 @@ export namespace JSXInternal { src?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ export interface MActionMathMLAttributes extends MathMLAttributes { /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/maction#actiontype */ @@ -2252,19 +2363,23 @@ export namespace JSXInternal { selection?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ export interface MathMathMLAttributes extends MathMLAttributes { display?: Signalish<'block' | 'inline' | undefined>; } + /** @deprecated Please import from the Preact namespace instead */ export interface MEncloseMathMLAttributes extends MathMLAttributes { notation?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ export interface MErrorMathMLAttributes extends MathMLAttributes {} + /** @deprecated Please import from the Preact namespace instead */ export interface MFencedMathMLAttributes extends MathMLAttributes { close?: Signalish; @@ -2272,6 +2387,7 @@ export namespace JSXInternal { separators?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ export interface MFracMathMLAttributes extends MathMLAttributes { /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mfrac#denomalign */ @@ -2281,6 +2397,7 @@ export namespace JSXInternal { numalign?: Signalish<'center' | 'left' | 'right' | undefined>; } + /** @deprecated Please import from the Preact namespace instead */ export interface MiMathMLAttributes extends MathMLAttributes { /** The only value allowed in the current specification is normal (case insensitive) @@ -2308,6 +2425,7 @@ export namespace JSXInternal { >; } + /** @deprecated Please import from the Preact namespace instead */ export interface MmultiScriptsMathMLAttributes extends MathMLAttributes { /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mmultiscripts#subscriptshift */ @@ -2316,9 +2434,11 @@ export namespace JSXInternal { superscriptshift?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ export interface MNMathMLAttributes extends MathMLAttributes {} + /** @deprecated Please import from the Preact namespace instead */ export interface MOMathMLAttributes extends MathMLAttributes { /** Non-standard attribute See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mo#accent */ @@ -2335,11 +2455,13 @@ export namespace JSXInternal { symmetric?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ export interface MOverMathMLAttributes extends MathMLAttributes { accent?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ export interface MPaddedMathMLAttributes extends MathMLAttributes { depth?: Signalish; @@ -2349,18 +2471,23 @@ export namespace JSXInternal { width?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ export interface MPhantomMathMLAttributes extends MathMLAttributes {} + /** @deprecated Please import from the Preact namespace instead */ export interface MPrescriptsMathMLAttributes extends MathMLAttributes {} + /** @deprecated Please import from the Preact namespace instead */ export interface MRootMathMLAttributes extends MathMLAttributes {} + /** @deprecated Please import from the Preact namespace instead */ export interface MRowMathMLAttributes extends MathMLAttributes {} + /** @deprecated Please import from the Preact namespace instead */ export interface MSMathMLAttributes extends MathMLAttributes { /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/ms#browser_compatibility */ @@ -2369,6 +2496,7 @@ export namespace JSXInternal { rquote?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ export interface MSpaceMathMLAttributes extends MathMLAttributes { depth?: Signalish; @@ -2376,9 +2504,11 @@ export namespace JSXInternal { width?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ export interface MSqrtMathMLAttributes extends MathMLAttributes {} + /** @deprecated Please import from the Preact namespace instead */ export interface MStyleMathMLAttributes extends MathMLAttributes { /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mstyle#background */ @@ -2397,12 +2527,14 @@ export namespace JSXInternal { scriptsizemultiplier?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ export interface MSubMathMLAttributes extends MathMLAttributes { /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/msub#subscriptshift */ subscriptshift?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ export interface MSubsupMathMLAttributes extends MathMLAttributes { /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/msubsup#subscriptshift */ @@ -2411,12 +2543,14 @@ export namespace JSXInternal { superscriptshift?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ export interface MSupMathMLAttributes extends MathMLAttributes { /** @deprecated See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/msup#superscriptshift */ superscriptshift?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ export interface MTableMathMLAttributes extends MathMLAttributes { /** Non-standard attribute See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mtable#align */ @@ -2445,6 +2579,7 @@ export namespace JSXInternal { width?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ export interface MTdMathMLAttributes extends MathMLAttributes { columnspan?: Signalish; @@ -2457,9 +2592,11 @@ export namespace JSXInternal { >; } + /** @deprecated Please import from the Preact namespace instead */ export interface MTextMathMLAttributes extends MathMLAttributes {} + /** @deprecated Please import from the Preact namespace instead */ export interface MTrMathMLAttributes extends MathMLAttributes { /** Non-standard attribute See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mtr#columnalign */ @@ -2470,17 +2607,20 @@ export namespace JSXInternal { >; } + /** @deprecated Please import from the Preact namespace instead */ export interface MUnderMathMLAttributes extends MathMLAttributes { accentunder?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ export interface MUnderoverMathMLAttributes extends MathMLAttributes { accent?: Signalish; accentunder?: Signalish; } + /** @deprecated Please import from the Preact namespace instead */ export interface SemanticsMathMLAttributes extends MathMLAttributes {}