From b84bd7db63c29aede9a63940e2e7dbdc7eca28db Mon Sep 17 00:00:00 2001 From: Erika <3019731+Princesseuh@users.noreply.github.com> Date: Thu, 7 Jul 2022 14:44:15 -0400 Subject: [PATCH] Improve JSX definitions (#3801) --- .changeset/rare-news-confess.md | 5 + packages/astro/astro-jsx.d.ts | 1336 ++++++++++++++++++++----------- 2 files changed, 861 insertions(+), 480 deletions(-) create mode 100644 .changeset/rare-news-confess.md diff --git a/.changeset/rare-news-confess.md b/.changeset/rare-news-confess.md new file mode 100644 index 0000000000..d28a7511d8 --- /dev/null +++ b/.changeset/rare-news-confess.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Update JSX definitions with element specific types and added some missing attributes diff --git a/packages/astro/astro-jsx.d.ts b/packages/astro/astro-jsx.d.ts index c9cfd9e17b..81d3d1f92a 100644 --- a/packages/astro/astro-jsx.d.ts +++ b/packages/astro/astro-jsx.d.ts @@ -1,10 +1,10 @@ /// /* eslint @typescript-eslint/no-unused-vars: off */ /** - * Adapted from jsx-dom - * @see https://github.com/proteriax/jsx-dom/blob/be06937ba16908d87bf8aa4372a3583133e02b8a/index.d.ts + * Adapted from babel-plugin-react-html-attrs's TypeScript definition from DefinitelyTyped. + * @see https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/babel-plugin-react-html-attrs/index.d.ts * - * which was adapted from + * and * * Adapted from React’s TypeScript definition from DefinitelyTyped. * @see https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react/index.d.ts @@ -36,164 +36,141 @@ declare namespace astroHTML.JSX { type AstroComponent = import('astro').AstroComponentFactory; type Element = HTMLElement | AstroComponent; - // - // Event Handler Types - // ---------------------------------------------------------------------- - type EventHandler = ( - event: E & { currentTarget: EventTarget & T } - ) => any; - - type ClipboardEventHandler = EventHandler; - type CompositionEventHandler = EventHandler; - type DragEventHandler = EventHandler; - type FocusEventHandler = EventHandler; - type FormEventHandler = EventHandler; - type ChangeEventHandler = EventHandler; - type KeyboardEventHandler = EventHandler; - type MouseEventHandler = EventHandler; - type TouchEventHandler = EventHandler; - type PointerEventHandler = EventHandler; - type UIEventHandler = EventHandler; - type WheelEventHandler = EventHandler; - type AnimationEventHandler = EventHandler; - type TransitionEventHandler = EventHandler; - type MessageEventHandler = EventHandler; - - interface DOMAttributes { + interface DOMAttributes { children?: Children; // Clipboard Events - oncopy?: ClipboardEventHandler | string | undefined | null; - oncut?: ClipboardEventHandler | string | undefined | null; - onpaste?: ClipboardEventHandler | string | undefined | null; + oncopy?: string | undefined | null; + oncut?: string | undefined | null; + onpaste?: string | undefined | null; // Composition Events - oncompositionend?: CompositionEventHandler | string | undefined | null; - oncompositionstart?: CompositionEventHandler | string | undefined | null; - oncompositionupdate?: CompositionEventHandler | string | undefined | null; + oncompositionend?: string | undefined | null; + oncompositionstart?: string | undefined | null; + oncompositionupdate?: string | undefined | null; // Focus Events - onfocus?: FocusEventHandler | string | undefined | null; - onfocusin?: FocusEventHandler | string | undefined | null; - onfocusout?: FocusEventHandler | string | undefined | null; - onblur?: FocusEventHandler | string | undefined | null; + onfocus?: string | undefined | null; + onfocusin?: string | undefined | null; + onfocusout?: string | undefined | null; + onblur?: string | undefined | null; // Form Events - onchange?: FormEventHandler | string | undefined | null; - oninput?: FormEventHandler | string | undefined | null; - onreset?: FormEventHandler | string | undefined | null; - onsubmit?: EventHandler | string | undefined | null; - oninvalid?: EventHandler | string | undefined | null; - onbeforeinput?: EventHandler | string | undefined | null; + onchange?: string | undefined | null; + oninput?: string | undefined | null; + onreset?: string | undefined | null; + onsubmit?: string | undefined | null; + oninvalid?: string | undefined | null; + onbeforeinput?: string | undefined | null; // Image Events - onload?: EventHandler | string | undefined | null; - onerror?: EventHandler | string | undefined | null; // also a Media Event + onload?: string | undefined | null; + onerror?: string | undefined | null; // also a Media Event // Detail Events - ontoggle?: EventHandler | string | undefined | null; + ontoggle?: string | undefined | null; // Keyboard Events - onkeydown?: KeyboardEventHandler | string | undefined | null; - onkeypress?: KeyboardEventHandler | string | undefined | null; - onkeyup?: KeyboardEventHandler | string | undefined | null; + onkeydown?: string | undefined | null; + onkeypress?: string | undefined | null; + onkeyup?: string | undefined | null; // Media Events - onabort?: EventHandler | string | undefined | null; - oncanplay?: EventHandler | string | undefined | null; - oncanplaythrough?: EventHandler | string | undefined | null; - oncuechange?: EventHandler | string | undefined | null; - ondurationchange?: EventHandler | string | undefined | null; - onemptied?: EventHandler | string | undefined | null; - onencrypted?: EventHandler | string | undefined | null; - onended?: EventHandler | string | undefined | null; - onloadeddata?: EventHandler | string | undefined | null; - onloadedmetadata?: EventHandler | string | undefined | null; - onloadstart?: EventHandler | string | undefined | null; - onpause?: EventHandler | string | undefined | null; - onplay?: EventHandler | string | undefined | null; - onplaying?: EventHandler | string | undefined | null; - onprogress?: EventHandler | string | undefined | null; - onratechange?: EventHandler | string | undefined | null; - onseeked?: EventHandler | string | undefined | null; - onseeking?: EventHandler | string | undefined | null; - onstalled?: EventHandler | string | undefined | null; - onsuspend?: EventHandler | string | undefined | null; - ontimeupdate?: EventHandler | string | undefined | null; - onvolumechange?: EventHandler | string | undefined | null; - onwaiting?: EventHandler | string | undefined | null; + onabort?: string | undefined | null; + oncanplay?: string | undefined | null; + oncanplaythrough?: string | undefined | null; + oncuechange?: string | undefined | null; + ondurationchange?: string | undefined | null; + onemptied?: string | undefined | null; + onencrypted?: string | undefined | null; + onended?: string | undefined | null; + onloadeddata?: string | undefined | null; + onloadedmetadata?: string | undefined | null; + onloadstart?: string | undefined | null; + onpause?: string | undefined | null; + onplay?: string | undefined | null; + onplaying?: string | undefined | null; + onprogress?: string | undefined | null; + onratechange?: string | undefined | null; + onseeked?: string | undefined | null; + onseeking?: string | undefined | null; + onstalled?: string | undefined | null; + onsuspend?: string | undefined | null; + ontimeupdate?: string | undefined | null; + onvolumechange?: string | undefined | null; + onwaiting?: string | undefined | null; // MouseEvents - onauxclick?: MouseEventHandler | string | undefined | null; - onclick?: MouseEventHandler | string | undefined | null; - oncontextmenu?: MouseEventHandler | string | undefined | null; - ondblclick?: MouseEventHandler | string | undefined | null; - ondrag?: DragEventHandler | string | undefined | null; - ondragend?: DragEventHandler | string | undefined | null; - ondragenter?: DragEventHandler | string | undefined | null; - ondragexit?: DragEventHandler | string | undefined | null; - ondragleave?: DragEventHandler | string | undefined | null; - ondragover?: DragEventHandler | string | undefined | null; - ondragstart?: DragEventHandler | string | undefined | null; - ondrop?: DragEventHandler | string | undefined | null; - onmousedown?: MouseEventHandler | string | undefined | null; - onmouseenter?: MouseEventHandler | string | undefined | null; - onmouseleave?: MouseEventHandler | string | undefined | null; - onmousemove?: MouseEventHandler | string | undefined | null; - onmouseout?: MouseEventHandler | string | undefined | null; - onmouseover?: MouseEventHandler | string | undefined | null; - onmouseup?: MouseEventHandler | string | undefined | null; + onauxclick?: string | undefined | null; + onclick?: string | undefined | null; + oncontextmenu?: string | undefined | null; + ondblclick?: string | undefined | null; + ondrag?: string | undefined | null; + ondragend?: string | undefined | null; + ondragenter?: string | undefined | null; + ondragexit?: string | undefined | null; + ondragleave?: string | undefined | null; + ondragover?: string | undefined | null; + ondragstart?: string | undefined | null; + ondrop?: string | undefined | null; + onmousedown?: string | undefined | null; + onmouseenter?: string | undefined | null; + onmouseleave?: string | undefined | null; + onmousemove?: string | undefined | null; + onmouseout?: string | undefined | null; + onmouseover?: string | undefined | null; + onmouseup?: string | undefined | null; // Selection Events - onselect?: EventHandler | string | undefined | null; - onselectionchange?: EventHandler | string | undefined | null; - onselectstart?: EventHandler | string | undefined | null; + onselect?: string | undefined | null; + onselectionchange?: string | undefined | null; + onselectstart?: string | undefined | null; // Touch Events - ontouchcancel?: TouchEventHandler | string | undefined | null; - ontouchend?: TouchEventHandler | string | undefined | null; - ontouchmove?: TouchEventHandler | string | undefined | null; - ontouchstart?: TouchEventHandler | string | undefined | null; + ontouchcancel?: string | undefined | null; + ontouchend?: string | undefined | null; + ontouchmove?: string | undefined | null; + ontouchstart?: string | undefined | null; // Pointer Events - ongotpointercapture?: PointerEventHandler | string | undefined | null; - onpointercancel?: PointerEventHandler | string | undefined | null; - onpointerdown?: PointerEventHandler | string | undefined | null; - onpointerenter?: PointerEventHandler | string | undefined | null; - onpointerleave?: PointerEventHandler | string | undefined | null; - onpointermove?: PointerEventHandler | string | undefined | null; - onpointerout?: PointerEventHandler | string | undefined | null; - onpointerover?: PointerEventHandler | string | undefined | null; - onpointerup?: PointerEventHandler | string | undefined | null; - onlostpointercapture?: PointerEventHandler | string | undefined | null; + ongotpointercapture?: string | undefined | null; + onpointercancel?: string | undefined | null; + onpointerdown?: string | undefined | null; + onpointerenter?: string | undefined | null; + onpointerleave?: string | undefined | null; + onpointermove?: string | undefined | null; + onpointerout?: string | undefined | null; + onpointerover?: string | undefined | null; + onpointerup?: string | undefined | null; + onlostpointercapture?: string | undefined | null; // UI Events - onscroll?: UIEventHandler | string | undefined | null; - onresize?: UIEventHandler | string | undefined | null; + onscroll?: string | undefined | null; + onresize?: string | undefined | null; // Wheel Events - onwheel?: WheelEventHandler | string | undefined | null; + onwheel?: string | undefined | null; // Animation Events - onanimationstart?: AnimationEventHandler | string | undefined | null; - onanimationend?: AnimationEventHandler | string | undefined | null; - onanimationiteration?: AnimationEventHandler | string | undefined | null; + onanimationstart?: string | undefined | null; + onanimationend?: string | undefined | null; + onanimationiteration?: string | undefined | null; // Transition Events - ontransitionstart?: TransitionEventHandler | string | undefined | null; - ontransitionrun?: TransitionEventHandler | string | undefined | null; - ontransitionend?: TransitionEventHandler | string | undefined | null; - ontransitioncancel?: TransitionEventHandler | string | undefined | null; + ontransitionstart?: string | undefined | null; + ontransitionrun?: string | undefined | null; + ontransitionend?: string | undefined | null; + ontransitioncancel?: string | undefined | null; // Message Events - onmessage?: MessageEventHandler | string | undefined | null; - onmessageerror?: MessageEventHandler | string | undefined | null; + onmessage?: string | undefined | null; + onmessageerror?: string | undefined | null; // Global Events - oncancel?: EventHandler | string | undefined | null; - onclose?: EventHandler | string | undefined | null; - onfullscreenchange?: EventHandler | string | undefined | null; - onfullscreenerror?: EventHandler | string | undefined | null; + oncancel?: string | undefined | null; + onclose?: string | undefined | null; + onfullscreenchange?: string | undefined | null; + onfullscreenerror?: string | undefined | null; } // All the WAI-ARIA 1.1 attributes from https://www.w3.org/TR/wai-aria-1.1/ @@ -218,17 +195,17 @@ declare namespace astroHTML.JSX { * Defines the total number of columns in a table, grid, or treegrid. * @see aria-colindex. */ - 'aria-colcount'?: number | undefined | null; + 'aria-colcount'?: number | string | undefined | null; /** * 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'?: number | undefined | null; + 'aria-colindex'?: number | string | undefined | null; /** * 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'?: number | undefined | null; + 'aria-colspan'?: number | string | undefined | null; /** * Identifies the element (or elements) whose contents or presence are controlled by the current element. * @see aria-owns. @@ -318,7 +295,7 @@ declare namespace astroHTML.JSX { */ 'aria-labelledby'?: string | undefined | null; /** Defines the hierarchical level of an element within a structure. */ - 'aria-level'?: number | undefined | null; + 'aria-level'?: number | string | undefined | null; /** 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'?: 'off' | 'assertive' | 'polite' | undefined | null; /** Indicates whether an element is modal when displayed. */ @@ -344,7 +321,7 @@ declare namespace astroHTML.JSX { * 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'?: number | undefined | null; + 'aria-posinset'?: number | string | undefined | null; /** * Indicates the current "pressed" state of toggle buttons. * @see aria-checked @see aria-selected. @@ -380,17 +357,17 @@ declare namespace astroHTML.JSX { * Defines the total number of rows in a table, grid, or treegrid. * @see aria-rowindex. */ - 'aria-rowcount'?: number | undefined | null; + 'aria-rowcount'?: number | string | undefined | null; /** * 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'?: number | undefined | null; + 'aria-rowindex'?: number | string | undefined | null; /** * 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'?: number | undefined | null; + 'aria-rowspan'?: number | string | undefined | null; /** * Indicates the current "selected" state of various widgets. * @see aria-checked @see aria-pressed. @@ -400,86 +377,103 @@ declare namespace astroHTML.JSX { * 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'?: number | undefined | null; + 'aria-setsize'?: number | string | undefined | null; /** Indicates if items in a table or grid are sorted in ascending or descending order. */ 'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other' | undefined | null; /** Defines the maximum allowed value for a range widget. */ - 'aria-valuemax'?: number | undefined | null; + 'aria-valuemax'?: number | string | undefined | null; /** Defines the minimum allowed value for a range widget. */ - 'aria-valuemin'?: number | undefined | null; + 'aria-valuemin'?: number | string | undefined | null; /** * Defines the current value for a range widget. * @see aria-valuetext. */ - 'aria-valuenow'?: number | undefined | null; + 'aria-valuenow'?: number | string | undefined | null; /** Defines the human readable text alternative of aria-valuenow for a range widget. */ 'aria-valuetext'?: string | undefined | null; } - interface HTMLAttributes - extends AriaAttributes, - DOMAttributes, - AstroBuiltinAttributes { + // All the WAI-ARIA 1.1 role attribute values from https://www.w3.org/TR/wai-aria-1.1/#role_definitions + type AriaRole = + | 'alert' + | 'alertdialog' + | 'application' + | 'article' + | 'banner' + | 'button' + | 'cell' + | 'checkbox' + | 'columnheader' + | 'combobox' + | 'complementary' + | 'contentinfo' + | 'definition' + | 'dialog' + | 'directory' + | 'document' + | 'feed' + | 'figure' + | 'form' + | 'grid' + | 'gridcell' + | 'group' + | 'heading' + | 'img' + | 'link' + | 'list' + | 'listbox' + | 'listitem' + | 'log' + | 'main' + | 'marquee' + | 'math' + | 'menu' + | 'menubar' + | 'menuitem' + | 'menuitemcheckbox' + | 'menuitemradio' + | 'navigation' + | 'none' + | 'note' + | 'option' + | 'presentation' + | 'progressbar' + | 'radio' + | 'radiogroup' + | 'region' + | 'row' + | 'rowgroup' + | 'rowheader' + | 'scrollbar' + | 'search' + | 'searchbox' + | 'separator' + | 'slider' + | 'spinbutton' + | 'status' + | 'switch' + | 'tab' + | 'table' + | 'tablist' + | 'tabpanel' + | 'term' + | 'textbox' + | 'timer' + | 'toolbar' + | 'tooltip' + | 'tree' + | 'treegrid' + | 'treeitem'; + + interface HTMLAttributes extends AriaAttributes, DOMAttributes, AstroBuiltinAttributes { // Standard HTML Attributes - class?: string | undefined | null; - dataset?: object | undefined | null; // eslint-disable-line - accept?: string | undefined | null; - acceptcharset?: string | undefined | null; accesskey?: string | undefined | null; - action?: string | undefined | null; - allow?: string | undefined | null; - allowfullscreen?: boolean | undefined | null; - allowtransparency?: boolean | undefined | null; - allowpaymentrequest?: boolean | undefined | null; - alt?: string | undefined | null; - as?: string | undefined | null; - async?: boolean | undefined | null; - autocomplete?: string | undefined | null; - autofocus?: boolean | undefined | null; - autoplay?: boolean | undefined | null; - capture?: 'environment' | 'user' | boolean | undefined | null; - cellpadding?: number | string | undefined | null; - cellspacing?: number | string | undefined | null; - charset?: string | undefined | null; - challenge?: string | undefined | null; - checked?: boolean | undefined | null; - cite?: string | undefined | null; - classid?: string | undefined | null; - cols?: number | undefined | null; - colspan?: number | undefined | null; - content?: string | URL | undefined | null; - contenteditable?: 'true' | 'false' | boolean | undefined | null; - - // Doesn't work when used as HTML attribute - /** - * Elements with the contenteditable attribute support innerHTML and textContent bindings. - */ - innerHTML?: string | undefined | null; - // Doesn't work when used as HTML attribute - /** - * Elements with the contenteditable attribute support innerHTML and textContent bindings. - */ - - textContent?: string | undefined | null; - - contextmenu?: string | undefined | null; - controls?: boolean | undefined | null; - coords?: string | undefined | null; - crossorigin?: string | boolean | undefined | null; - currenttime?: number | undefined | null; - decoding?: 'async' | 'sync' | 'auto' | undefined | null; - data?: string | undefined | null; - datetime?: string | undefined | null; - default?: boolean | undefined | null; - defaultmuted?: boolean | undefined | null; - defaultplaybackrate?: number | undefined | null; - defer?: boolean | undefined | null; + autocapitalize?: string | undefined | null; + autofocus?: boolean | string | undefined | null; + class?: string | undefined | null; + contenteditable?: 'true' | 'false' | boolean | 'inherit' | string | undefined | null; dir?: string | undefined | null; - dirname?: string | undefined | null; - disabled?: boolean | undefined | null; - download?: any | undefined | null; - draggable?: boolean | 'true' | 'false' | undefined | null; - enctype?: string | undefined | null; + draggable?: 'true' | 'false' | boolean | undefined | null; enterkeyhint?: | 'enter' | 'done' @@ -490,107 +484,44 @@ declare namespace astroHTML.JSX { | 'send' | undefined | null; - for?: string | undefined | null; - form?: string | undefined | null; - formaction?: string | undefined | null; - formenctype?: string | undefined | null; - formmethod?: string | undefined | null; - formnovalidate?: boolean | undefined | null; - formtarget?: string | undefined | null; - frameborder?: number | string | undefined | null; - headers?: string | undefined | null; - height?: number | string | undefined | null; - hidden?: boolean | undefined | null; - high?: number | undefined | null; - href?: string | URL | undefined | null; - hreflang?: string | undefined | null; - htmlfor?: string | undefined | null; - httpequiv?: string | undefined | null; + hidden?: boolean | string | undefined | null; id?: string | undefined | null; - inputmode?: string | undefined | null; - integrity?: string | undefined | null; + inert?: boolean | string | undefined | null; + inputmode?: + | 'none' + | 'text' + | 'tel' + | 'url' + | 'email' + | 'numeric' + | 'decimal' + | 'search' + | undefined + | null; is?: string | undefined | null; - ismap?: boolean | undefined | null; - keyparams?: string | undefined | null; - keytype?: string | undefined | null; - kind?: string | undefined | null; - label?: string | undefined | null; + itemid?: string | undefined | null; + itemprop?: string | undefined | null; + itemref?: string | undefined | null; + itemscope?: boolean | string | undefined | null; + itemtype?: string | undefined | null; lang?: string | undefined | null; - list?: string | undefined | null; - loading?: string | undefined | null; - loop?: boolean | undefined | null; - low?: number | undefined | null; - manifest?: string | undefined | null; - marginheight?: number | undefined | null; - marginwidth?: number | undefined | null; - max?: number | string | undefined | null; - maxlength?: number | undefined | null; - media?: string | undefined | null; - mediagroup?: string | undefined | null; - method?: string | undefined | null; - min?: number | string | undefined | null; - minlength?: number | undefined | null; - multiple?: boolean | undefined | null; - muted?: boolean | undefined | null; - name?: string | undefined | null; - nonce?: string | undefined | null; - novalidate?: boolean | undefined | null; - open?: boolean | undefined | null; - optimum?: number | undefined | null; - part?: string | undefined | null; - pattern?: string | undefined | null; - placeholder?: string | undefined | null; - playsinline?: boolean | undefined | null; - poster?: string | undefined | null; - preload?: string | undefined | null; - radiogroup?: string | undefined | null; - readonly?: boolean | undefined | null; - referrerpolicy?: string | undefined | null; - rel?: string | undefined | null; - required?: boolean | undefined | null; - reversed?: boolean | undefined | null; - role?: string | undefined | null; - rows?: number | undefined | null; - rowspan?: number | undefined | null; - sandbox?: string | undefined | null; - scope?: string | undefined | null; - scoped?: boolean | undefined | null; - scrolling?: string | undefined | null; - seamless?: boolean | undefined | null; - selected?: boolean | undefined | null; - shape?: string | undefined | null; - size?: number | undefined | null; - sizes?: string | undefined | null; slot?: string | undefined | null; - span?: number | undefined | null; - spellcheck?: boolean | 'true' | 'false' | undefined | null; - src?: string | undefined | null; - srcdoc?: string | undefined | null; - srclang?: string | undefined | null; - srcset?: string | undefined | null; - start?: number | undefined | null; - step?: number | string | undefined | null; + spellcheck?: 'true' | 'false' | boolean | undefined | null; style?: string | undefined | null; - summary?: string | undefined | null; - tabindex?: number | undefined | null; - target?: string | undefined | null; + tabindex?: number | string | undefined | null; title?: string | undefined | null; - translate?: 'yes' | 'no' | '' | undefined | null; - type?: string | undefined | null; - usemap?: string | undefined | null; - value?: any | undefined | null; - /** - * a value between 0 and 1 - */ - volume?: number | undefined | null; - width?: number | string | undefined | null; - wmode?: string | undefined | null; - wrap?: string | undefined | null; + translate?: 'yes' | 'no' | undefined | null; + + // , + radiogroup?: string | undefined | null; + + // WAI-ARIA + role?: AriaRole | undefined | null; // RDFa Attributes about?: string | undefined | null; datatype?: string | undefined | null; - inlist?: any | undefined | null; + inlist?: any; prefix?: string | undefined | null; property?: string | undefined | null; resource?: string | undefined | null; @@ -598,19 +529,471 @@ declare namespace astroHTML.JSX { vocab?: string | undefined | null; // Non-standard Attributes - autocapitalize?: string | undefined | null; - autocorrect?: string | undefined | null; - autosave?: string | undefined | null; + contextmenu?: string | undefined | null; // Obsolete + autosave?: string | undefined | null; // Apple exclusive color?: string | undefined | null; - controlslist?: 'nodownload' | 'nofullscreen' | 'noplaybackrate' | 'noremoteplayback'; - itemprop?: string | undefined | null; - itemscope?: boolean | undefined | null; - itemtype?: string | undefined | null; - itemid?: string | undefined | null; - itemref?: string | undefined | null; - results?: number | undefined | null; + results?: number | string | undefined | null; security?: string | undefined | null; - unselectable?: boolean | undefined | null; + unselectable?: 'on' | 'off' | undefined | null; // Internet Explorer + } + + type HTMLAttributeReferrerPolicy = + | '' + | 'no-referrer' + | 'no-referrer-when-downgrade' + | 'origin' + | 'origin-when-cross-origin' + | 'same-origin' + | 'strict-origin' + | 'strict-origin-when-cross-origin' + | 'unsafe-url'; + + type HTMLAttributeAnchorTarget = '_self' | '_blank' | '_parent' | '_top'; + + interface AnchorHTMLAttributes extends HTMLAttributes { + download?: string | boolean | undefined | null; + href?: string | URL | undefined | null; + hreflang?: string | undefined | null; + media?: string | undefined | null; + ping?: string | undefined | null; + rel?: string | undefined | null; + target?: HTMLAttributeAnchorTarget | undefined | null; + type?: string | undefined | null; + referrerpolicy?: HTMLAttributeReferrerPolicy | undefined | null; + } + + interface AudioHTMLAttributes extends MediaHTMLAttributes {} + + interface AreaHTMLAttributes extends HTMLAttributes { + alt?: string | undefined | null; + coords?: string | undefined | null; + download?: any; + href?: string | undefined | null; + hreflang?: string | undefined | null; + media?: string | undefined | null; + referrerpolicy?: HTMLAttributeReferrerPolicy | undefined | null; + rel?: string | undefined | null; + shape?: string | undefined | null; + target?: string | undefined | null; + } + + interface BaseHTMLAttributes extends HTMLAttributes { + href?: string | undefined | null; + target?: string | undefined | null; + } + + interface BlockquoteHTMLAttributes extends HTMLAttributes { + cite?: string | undefined | null; + } + + interface ButtonHTMLAttributes extends HTMLAttributes { + disabled?: boolean | string | undefined | null; + form?: string | undefined | null; + formaction?: string | undefined | null; + formenctype?: string | undefined | null; + formmethod?: string | undefined | null; + formnovalidate?: boolean | string | undefined | null; + formtarget?: string | undefined | null; + name?: string | undefined | null; + type?: 'submit' | 'reset' | 'button' | undefined | null; + value?: string | string[] | number | undefined | null; + } + + interface CanvasHTMLAttributes extends HTMLAttributes { + height?: number | string | undefined | null; + width?: number | string | undefined | null; + } + + interface ColHTMLAttributes extends HTMLAttributes { + span?: number | string | undefined | null; + width?: number | string | undefined | null; + } + + interface ColgroupHTMLAttributes extends HTMLAttributes { + span?: number | string | undefined | null; + } + + interface DataHTMLAttributes extends HTMLAttributes { + value?: string | string[] | number | undefined | null; + } + + interface DetailsHTMLAttributes extends HTMLAttributes { + open?: boolean | string | undefined | null; + } + + interface DelHTMLAttributes extends HTMLAttributes { + cite?: string | undefined | null; + datetime?: string | undefined | null; + } + + interface DialogHTMLAttributes extends HTMLAttributes { + open?: boolean | string | undefined | null; + } + + interface EmbedHTMLAttributes extends HTMLAttributes { + height?: number | string | undefined | null; + src?: string | undefined | null; + type?: string | undefined | null; + width?: number | string | undefined | null; + } + + interface FieldsetHTMLAttributes extends HTMLAttributes { + disabled?: boolean | string | undefined | null; + form?: string | undefined | null; + name?: string | undefined | null; + } + + interface FormHTMLAttributes extends HTMLAttributes { + 'accept-charset'?: string | undefined | null; + action?: string | undefined | null; + autocomplete?: string | undefined | null; + autocorrect?: string | undefined | null; + enctype?: string | undefined | null; + method?: string | undefined | null; + name?: string | undefined | null; + novalidate?: boolean | string | undefined | null; + target?: string | undefined | null; + } + + interface HtmlHTMLAttributes extends HTMLAttributes { + manifest?: string | undefined | null; + } + + interface IframeHTMLAttributes extends HTMLAttributes { + allow?: string | undefined | null; + allowfullscreen?: boolean | string | undefined | null; + allowtransparency?: boolean | string | undefined | null; + /** @deprecated */ + frameborder?: number | string | undefined | null; + height?: number | string | undefined | null; + /** @deprecated */ + marginheight?: number | string | undefined | null; + /** @deprecated */ + marginwidth?: number | string | undefined | null; + name?: string | undefined | null; + referrerpolicy?: HTMLAttributeReferrerPolicy | undefined | null; + sandbox?: string | undefined | null; + /** @deprecated */ + scrolling?: string | undefined | null; + seamless?: boolean | string | undefined | null; + src?: string | undefined | null; + srcdoc?: string | undefined | null; + width?: number | string | undefined | null; + } + + interface ImgHTMLAttributes extends HTMLAttributes { + alt?: string | undefined | null; + crossorigin?: 'anonymous' | 'use-credentials' | '' | undefined | null; + decoding?: 'async' | 'auto' | 'sync' | undefined | null; + height?: number | string | undefined | null; + loading?: 'eager' | 'lazy' | undefined | null; + referrerpolicy?: HTMLAttributeReferrerPolicy | undefined | null; + sizes?: string | undefined | null; + src?: string | undefined | null; + srcset?: string | undefined | null; + usemap?: string | undefined | null; + width?: number | string | undefined | null; + } + + interface InsHTMLAttributes extends HTMLAttributes { + cite?: string | undefined | null; + datetime?: string | undefined | null; + } + + 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'; + + interface InputHTMLAttributes extends HTMLAttributes { + accept?: string | undefined | null; + alt?: string | undefined | null; + autocomplete?: string | undefined | null; + autocorrect?: string | undefined | null; + capture?: boolean | string | undefined | null; + checked?: boolean | string | undefined | null; + crossorigin?: string | undefined | null; + dirname?: string | undefined | null; + disabled?: boolean | string | undefined | null; + form?: string | undefined | null; + formaction?: string | undefined | null; + formenctype?: string | undefined | null; + formmethod?: string | undefined | null; + formnovalidate?: boolean | string | undefined | null; + formtarget?: string | undefined | null; + height?: number | string | undefined | null; + list?: string | undefined | null; + max?: number | string | undefined | null; + maxlength?: number | string | undefined | null; + min?: number | string | undefined | null; + minlength?: number | string | undefined | null; + multiple?: boolean | string | undefined | null; + name?: string | undefined | null; + pattern?: string | undefined | null; + placeholder?: string | undefined | null; + readonly?: boolean | string | undefined | null; + required?: boolean | string | undefined | null; + size?: number | string | undefined | null; + src?: string | undefined | null; + step?: number | string | undefined | null; + type?: HTMLInputTypeAttribute | string | undefined | null; + value?: string | string[] | number | undefined | null; + width?: number | string | undefined | null; + } + + interface KeygenHTMLAttributes extends HTMLAttributes { + challenge?: string | undefined | null; + disabled?: boolean | string | undefined | null; + form?: string | undefined | null; + keytype?: string | undefined | null; + keyparams?: string | undefined | null; + name?: string | undefined | null; + } + + interface LabelHTMLAttributes extends HTMLAttributes { + form?: string | undefined | null; + for?: string | undefined | null; + } + + interface LiHTMLAttributes extends HTMLAttributes { + value?: string | number | undefined | null; + } + + interface LinkHTMLAttributes extends HTMLAttributes { + as?: string | undefined | null; + crossorigin?: boolean | string | undefined | null; + href?: string | URL | undefined | null; + hreflang?: string | undefined | null; + integrity?: string | undefined | null; + media?: string | undefined | null; + imageSrcSet?: string | undefined | null; + imageSizes?: string | undefined | null; + referrerPolicy?: HTMLAttributeReferrerPolicy | undefined | null; + rel?: string | undefined | null; + sizes?: string | undefined | null; + type?: string | undefined | null; + charset?: string | undefined | null; + } + + interface MapHTMLAttributes extends HTMLAttributes { + name?: string | undefined | null; + } + + interface MenuHTMLAttributes extends HTMLAttributes { + type?: string | undefined | null; + } + + interface MediaHTMLAttributes extends HTMLAttributes { + autoplay?: boolean | string | undefined | null; + controls?: boolean | string | undefined | null; + controlslist?: string | undefined | null; + crossorigin?: string | undefined | null; + loop?: boolean | string | undefined | null; + mediagroup?: string | undefined | null; + muted?: boolean | string | undefined | null; + playsinline?: boolean | string | undefined | null; + preload?: string | undefined | null; + src?: string | undefined | null; + } + + interface MetaHTMLAttributes extends HTMLAttributes { + charset?: string | undefined | null; + content?: string | URL | undefined | null; + 'http-equiv'?: string | undefined | null; + name?: string | undefined | null; + } + + interface MeterHTMLAttributes extends HTMLAttributes { + form?: string | undefined | null; + high?: number | string | undefined | null; + low?: number | string | undefined | null; + max?: number | string | undefined | null; + min?: number | string | undefined | null; + optimum?: number | string | undefined | null; + value?: string | string[] | number | undefined | null; + } + + interface QuoteHTMLAttributes extends HTMLAttributes { + cite?: string | undefined | null; + } + + interface ObjectHTMLAttributes extends HTMLAttributes { + classid?: string | undefined | null; + data?: string | undefined | null; + form?: string | undefined | null; + height?: number | string | undefined | null; + name?: string | undefined | null; + type?: string | undefined | null; + usemap?: string | undefined | null; + width?: number | string | undefined | null; + wmode?: string | undefined | null; + } + + interface OlHTMLAttributes extends HTMLAttributes { + reversed?: boolean | string | undefined | null; + start?: number | string | undefined | null; + type?: '1' | 'a' | 'A' | 'i' | 'I' | undefined | null; + } + + interface OptgroupHTMLAttributes extends HTMLAttributes { + disabled?: boolean | string | undefined | null; + label?: string | undefined | null; + } + + interface OptionHTMLAttributes extends HTMLAttributes { + disabled?: boolean | string | undefined | null; + label?: string | undefined | null; + selected?: boolean | string | undefined | null; + value?: string | string[] | number | undefined | null; + } + + interface OutputHTMLAttributes extends HTMLAttributes { + form?: string | undefined | null; + for?: string | undefined | null; + name?: string | undefined | null; + } + + interface ParamHTMLAttributes extends HTMLAttributes { + name?: string | undefined | null; + value?: string | string[] | number | undefined | null; + } + + interface ProgressHTMLAttributes extends HTMLAttributes { + max?: number | string | undefined | null; + value?: string | string[] | number | undefined | null; + } + + interface SlotHTMLAttributes extends HTMLAttributes { + name?: string | undefined | null; + } + + interface ScriptHTMLAttributes extends HTMLAttributes { + async?: boolean | string | undefined | null; + charset?: string | undefined | null; + crossorigin?: string | undefined | null; + defer?: boolean | string | undefined | null; + integrity?: string | undefined | null; + nomodule?: boolean | string | undefined | null; + nonce?: string | undefined | null; + src?: string | undefined | null; + type?: string | undefined | null; + } + + interface SelectHTMLAttributes extends HTMLAttributes { + autocomplete?: string | undefined | null; + autocorrect?: string | undefined | null; + disabled?: boolean | string | undefined | null; + form?: string | undefined | null; + multiple?: boolean | string | undefined | null; + name?: string | undefined | null; + required?: boolean | string | undefined | null; + size?: number | string | undefined | null; + value?: string | string[] | number | undefined | null; + } + + interface SourceHTMLAttributes extends HTMLAttributes { + height?: number | string | undefined | null; + media?: string | undefined | null; + sizes?: string | undefined | null; + src?: string | undefined | null; + srcset?: string | undefined | null; + type?: string | undefined | null; + width?: number | string | undefined | null; + } + + interface StyleHTMLAttributes extends HTMLAttributes { + media?: string | undefined | null; + nonce?: string | undefined | null; + scoped?: boolean | string | undefined | null; + type?: string | undefined | null; + } + + interface TableHTMLAttributes extends HTMLAttributes { + align?: 'left' | 'center' | 'right' | undefined | null; + bgcolor?: string | undefined | null; + border?: number | undefined | null; + cellpadding?: number | string | undefined | null; + cellspacing?: number | string | undefined | null; + frame?: boolean | undefined | null; + rules?: 'none' | 'groups' | 'rows' | 'columns' | 'all' | undefined | null; + summary?: string | undefined | null; + width?: number | string | undefined | null; + } + + interface TextareaHTMLAttributes extends HTMLAttributes { + autocomplete?: string | undefined | null; + autocorrect?: string | undefined | null; + cols?: number | string | undefined | null; + dirname?: string | undefined | null; + disabled?: boolean | string | undefined | null; + form?: string | undefined | null; + maxlength?: number | string | undefined | null; + minlength?: number | string | undefined | null; + name?: string | undefined | null; + placeholder?: string | undefined | null; + readonly?: boolean | string | undefined | null; + required?: boolean | string | undefined | null; + rows?: number | string | undefined | null; + value?: string | string[] | number | undefined | null; + wrap?: string | undefined | null; + } + + interface TdHTMLAttributes extends HTMLAttributes { + align?: 'left' | 'center' | 'right' | 'justify' | 'char' | undefined | null; + colspan?: number | string | undefined | null; + headers?: string | undefined | null; + rowspan?: number | string | undefined | null; + scope?: string | undefined | null; + abbr?: string | undefined | null; + valign?: 'top' | 'middle' | 'bottom' | 'baseline' | undefined | null; + } + + interface ThHTMLAttributes extends HTMLAttributes { + align?: 'left' | 'center' | 'right' | 'justify' | 'char' | undefined | null; + colspan?: number | string | undefined | null; + headers?: string | undefined | null; + rowspan?: number | string | undefined | null; + scope?: string | undefined | null; + abbr?: string | undefined | null; + } + + interface TimeHTMLAttributes extends HTMLAttributes { + datetime?: string | undefined | null; + } + + interface TrackHTMLAttributes extends HTMLAttributes { + default?: boolean | string | undefined | null; + kind?: string | undefined | null; + label?: string | undefined | null; + src?: string | undefined | null; + srclang?: string | undefined | null; + } + + interface VideoHTMLAttributes extends MediaHTMLAttributes { + height?: number | string | undefined | null; + playsinline?: boolean | string | undefined | null; + poster?: string | undefined | null; + width?: number | string | undefined | null; + disablepictureinpicture?: boolean | string | undefined | null; } // this list is "complete" in that it contains every SVG attribute @@ -621,12 +1004,8 @@ declare namespace astroHTML.JSX { // - "number | string" // - "string" // - union of string literals - interface SVGAttributes - extends AriaAttributes, - DOMAttributes, - AstroBuiltinAttributes { + interface SVGAttributes extends AriaAttributes, DOMAttributes, AstroBuiltinAttributes { // Attributes which also defined in HTMLAttributes - className?: string | undefined | null; class?: string | undefined | null; color?: string | undefined | null; height?: number | string | undefined | null; @@ -643,8 +1022,8 @@ declare namespace astroHTML.JSX { width?: number | string | undefined | null; // Other HTML properties supported by SVG elements in browsers - role?: string | undefined | null; - tabindex?: number | undefined | null; + role?: AriaRole | undefined | null; + tabindex?: number | string | undefined | null; crossorigin?: 'anonymous' | 'use-credentials' | '' | undefined | null; // SVG Specific attributes @@ -906,184 +1285,181 @@ declare namespace astroHTML.JSX { zoomAndPan?: string | undefined | null; } - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface HTMLProps extends HTMLAttributes {} - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface SVGProps extends SVGAttributes {} - interface IntrinsicElements { // HTML - a: HTMLProps; - abbr: HTMLProps; - address: HTMLProps; - area: HTMLProps; - article: HTMLProps; - aside: HTMLProps; - audio: HTMLProps; - b: HTMLProps; - base: HTMLProps; - bdi: HTMLProps; - bdo: HTMLProps; - big: HTMLProps; - blockquote: HTMLProps; - body: HTMLProps; - br: HTMLProps; - button: HTMLProps; - canvas: HTMLProps; - caption: HTMLProps; - cite: HTMLProps; - code: HTMLProps; - col: HTMLProps; - colgroup: HTMLProps; - data: HTMLProps; - datalist: HTMLProps; - dd: HTMLProps; - del: HTMLProps; - details: HTMLProps; - dfn: HTMLProps; - dialog: HTMLProps; - div: HTMLProps; - dl: HTMLProps; - dt: HTMLProps; - em: HTMLProps; - embed: HTMLProps; - fieldset: HTMLProps; - figcaption: HTMLProps; - figure: HTMLProps; - footer: HTMLProps; - form: HTMLProps; - h1: HTMLProps; - h2: HTMLProps; - h3: HTMLProps; - h4: HTMLProps; - h5: HTMLProps; - h6: HTMLProps; - head: HTMLProps; - header: HTMLProps; - hgroup: HTMLProps; - hr: HTMLProps; - html: HTMLProps; - i: HTMLProps; - iframe: HTMLProps; - img: HTMLProps; - input: HTMLProps; - ins: HTMLProps; - kbd: HTMLProps; - keygen: HTMLProps; - label: HTMLProps; - legend: HTMLProps; - li: HTMLProps; - link: HTMLProps; - main: HTMLProps; - map: HTMLProps; - mark: HTMLProps; - menu: HTMLProps; - menuitem: HTMLProps; - meta: HTMLProps; - meter: HTMLProps; - nav: HTMLProps; - noindex: HTMLProps; - noscript: HTMLProps; - object: HTMLProps; - ol: HTMLProps; - optgroup: HTMLProps; - option: HTMLProps; - output: HTMLProps; - p: HTMLProps; - param: HTMLProps; - picture: HTMLProps; - pre: HTMLProps; - progress: HTMLProps; - q: HTMLProps; - rp: HTMLProps; - rt: HTMLProps; - ruby: HTMLProps; - s: HTMLProps; - samp: HTMLProps; - script: HTMLProps & AstroScriptAttributes; - section: HTMLProps; - select: HTMLProps; - small: HTMLProps; - source: HTMLProps; - span: HTMLProps; - strong: HTMLProps; - style: HTMLProps & AstroStyleAttributes; - sub: HTMLProps; - summary: HTMLProps; - sup: HTMLProps; - table: HTMLProps; - tbody: HTMLProps; - td: HTMLProps; - textarea: HTMLProps; - tfoot: HTMLProps; - th: HTMLProps; - thead: HTMLProps; - time: HTMLProps; - title: HTMLProps; - tr: HTMLProps; - track: HTMLProps; - u: HTMLProps; - ul: HTMLProps; - var: HTMLProps; - video: HTMLProps; - wbr: HTMLProps; + a: AnchorHTMLAttributes; + abbr: HTMLAttributes; + address: HTMLAttributes; + area: AreaHTMLAttributes; + article: HTMLAttributes; + aside: HTMLAttributes; + audio: AudioHTMLAttributes; + b: HTMLAttributes; + base: BaseHTMLAttributes; + bdi: HTMLAttributes; + bdo: HTMLAttributes; + big: HTMLAttributes; + blockquote: BlockquoteHTMLAttributes; + body: HTMLAttributes; + br: HTMLAttributes; + button: ButtonHTMLAttributes; + canvas: CanvasHTMLAttributes; + caption: HTMLAttributes; + cite: HTMLAttributes; + code: HTMLAttributes; + col: ColHTMLAttributes; + colgroup: ColgroupHTMLAttributes; + data: DataHTMLAttributes; + datalist: HTMLAttributes; + dd: HTMLAttributes; + del: DelHTMLAttributes; + details: DetailsHTMLAttributes; + dfn: HTMLAttributes; + dialog: DialogHTMLAttributes; + div: HTMLAttributes; + dl: HTMLAttributes; + dt: HTMLAttributes; + em: HTMLAttributes; + embed: EmbedHTMLAttributes; + fieldset: FieldsetHTMLAttributes; + figcaption: HTMLAttributes; + figure: HTMLAttributes; + footer: HTMLAttributes; + form: FormHTMLAttributes; + h1: HTMLAttributes; + h2: HTMLAttributes; + h3: HTMLAttributes; + h4: HTMLAttributes; + h5: HTMLAttributes; + h6: HTMLAttributes; + head: HTMLAttributes; + header: HTMLAttributes; + hgroup: HTMLAttributes; + hr: HTMLAttributes; + html: HtmlHTMLAttributes; + i: HTMLAttributes; + iframe: IframeHTMLAttributes; + img: ImgHTMLAttributes; + input: InputHTMLAttributes; + ins: InsHTMLAttributes; + kbd: HTMLAttributes; + keygen: KeygenHTMLAttributes; + label: LabelHTMLAttributes; + legend: HTMLAttributes; + li: LiHTMLAttributes; + link: LinkHTMLAttributes; + main: HTMLAttributes; + map: MapHTMLAttributes; + mark: HTMLAttributes; + menu: MenuHTMLAttributes; + menuitem: HTMLAttributes; + meta: MetaHTMLAttributes; + meter: MeterHTMLAttributes; + nav: HTMLAttributes; + noindex: HTMLAttributes; // https://en.wikipedia.org/wiki/Noindex#%3Cnoindex%3E_tag + noscript: HTMLAttributes; + object: ObjectHTMLAttributes; + ol: OlHTMLAttributes; + optgroup: OptgroupHTMLAttributes; + option: OptionHTMLAttributes; + output: OutputHTMLAttributes; + p: HTMLAttributes; + param: ParamHTMLAttributes; + picture: HTMLAttributes; + pre: HTMLAttributes; + progress: ProgressHTMLAttributes; + q: QuoteHTMLAttributes; + rp: HTMLAttributes; + rt: HTMLAttributes; + ruby: HTMLAttributes; + s: HTMLAttributes; + samp: HTMLAttributes; + slot: SlotHTMLAttributes; + script: ScriptHTMLAttributes & AstroScriptAttributes; + section: HTMLAttributes; + select: SelectHTMLAttributes; + small: HTMLAttributes; + source: SourceHTMLAttributes; + span: HTMLAttributes; + strong: HTMLAttributes; + style: StyleHTMLAttributes & AstroStyleAttributes; + sub: HTMLAttributes; + summary: HTMLAttributes; + sup: HTMLAttributes; + table: TableHTMLAttributes; + tbody: HTMLAttributes; + td: TdHTMLAttributes; + textarea: TextareaHTMLAttributes; + tfoot: HTMLAttributes; + th: ThHTMLAttributes; + thead: HTMLAttributes; + time: TimeHTMLAttributes; + title: HTMLAttributes; + tr: HTMLAttributes; + track: TrackHTMLAttributes; + u: HTMLAttributes; + ul: HTMLAttributes; + var: HTMLAttributes; + video: VideoHTMLAttributes; + wbr: HTMLAttributes; - svg: SVGProps; - - animate: SVGProps; - circle: SVGProps; - clipPath: SVGProps; - defs: SVGProps; - desc: SVGProps; - ellipse: SVGProps; - feBlend: SVGProps; - feColorMatrix: SVGProps; - feComponentTransfer: SVGProps; - feComposite: SVGProps; - feConvolveMatrix: SVGProps; - feDiffuseLighting: SVGProps; - feDisplacementMap: SVGProps; - feDistantLight: SVGProps; - feFlood: SVGProps; - feFuncA: SVGProps; - feFuncB: SVGProps; - feFuncG: SVGProps; - feFuncR: SVGProps; - feGaussianBlur: SVGProps; - feImage: SVGProps; - feMerge: SVGProps; - feMergeNode: SVGProps; - feMorphology: SVGProps; - feOffset: SVGProps; - fePointLight: SVGProps; - feSpecularLighting: SVGProps; - feSpotLight: SVGProps; - feTile: SVGProps; - feTurbulence: SVGProps; - filter: SVGProps; - foreignObject: SVGProps; - g: SVGProps; - image: SVGProps; - line: SVGProps; - linearGradient: SVGProps; - marker: SVGProps; - mask: SVGProps; - metadata: SVGProps; - path: SVGProps; - pattern: SVGProps; - polygon: SVGProps; - polyline: SVGProps; - radialGradient: SVGProps; - rect: SVGProps; - stop: SVGProps; - switch: SVGProps; - symbol: SVGProps; - text: SVGProps; - textPath: SVGProps; - tspan: SVGProps; - use: SVGProps; - view: SVGProps; + // SVG + svg: SVGAttributes; + animate: SVGAttributes; + circle: SVGAttributes; + clipPath: SVGAttributes; + defs: SVGAttributes; + desc: SVGAttributes; + ellipse: SVGAttributes; + feBlend: SVGAttributes; + feColorMatrix: SVGAttributes; + feComponentTransfer: SVGAttributes; + feComposite: SVGAttributes; + feConvolveMatrix: SVGAttributes; + feDiffuseLighting: SVGAttributes; + feDisplacementMap: SVGAttributes; + feDistantLight: SVGAttributes; + feFlood: SVGAttributes; + feFuncA: SVGAttributes; + feFuncB: SVGAttributes; + feFuncG: SVGAttributes; + feFuncR: SVGAttributes; + feGaussianBlur: SVGAttributes; + feImage: SVGAttributes; + feMerge: SVGAttributes; + feMergeNode: SVGAttributes; + feMorphology: SVGAttributes; + feOffset: SVGAttributes; + fePointLight: SVGAttributes; + feSpecularLighting: SVGAttributes; + feSpotLight: SVGAttributes; + feTile: SVGAttributes; + feTurbulence: SVGAttributes; + filter: SVGAttributes; + foreignObject: SVGAttributes; + g: SVGAttributes; + image: SVGAttributes; + line: SVGAttributes; + linearGradient: SVGAttributes; + marker: SVGAttributes; + mask: SVGAttributes; + metadata: SVGAttributes; + path: SVGAttributes; + pattern: SVGAttributes; + polygon: SVGAttributes; + polyline: SVGAttributes; + radialGradient: SVGAttributes; + rect: SVGAttributes; + stop: SVGAttributes; + switch: SVGAttributes; + symbol: SVGAttributes; + text: SVGAttributes; + textPath: SVGAttributes; + tspan: SVGAttributes; + use: SVGAttributes; + view: SVGAttributes; + // Allow for arbitrary elements [name: string]: { [name: string]: any }; } }