UNPKG

alien-dom

Version:

Next-generation JSX client renderer with observable data primitives, immediate DOM references, and more.

56 lines (54 loc) 2.81 kB
import { A as AlienElementList, F as FromElementProxy, a as AlienTag, b as AlienSelect, c as AlienElement, d as AnimationsParam, J as JSX, H as HTMLAttributesByTagName, S as SVGAttributesByTagName } from './animate-b617067e.js'; import '@alloc/types'; import 'csstype'; type AnyElement = Element; declare global { interface Element { readonly childNodes: AlienElementList<Element>; cloneNode(deep?: boolean): FromElementProxy<this>; matches(selectors: string): boolean; matches<Element extends AlienTag>(selectors: string): this is AlienSelect<Element>; } interface HTMLElement extends AlienElement<HTMLElement> { readonly firstElementChild: HTMLElement | SVGElement | null; readonly lastElementChild: HTMLElement | SVGElement | null; readonly childNodes: AlienElementList; spring(animations: AnimationsParam<HTMLElement>): this; } interface SVGElement extends AlienElement<SVGElement> { readonly firstElementChild: SVGElement | null; readonly lastElementChild: SVGElement | null; readonly childNodes: AlienElementList<SVGElement>; spring(animations: AnimationsParam<SVGElement>): this; } namespace JSX { type Element = JSX.Element; type ElementKey = JSX.ElementKey; type ElementRef<Element extends AnyElement = AnyElement> = JSX.ElementRef<Element>; type ElementLike = JSX.ElementLike; type ElementProp = JSX.ElementProp; type ElementsProp = JSX.ElementsProp; type ElementType = JSX.ElementType; type RefProp<Element extends AnyElement = AnyElement> = JSX.RefProp<Element>; type Children = JSX.Children; type ChildrenProp = JSX.ChildrenProp; type HTMLClassArrayProp = JSX.HTMLClassArrayProp; type HTMLClassMapProp = JSX.HTMLClassMapProp; type HTMLClassProp = JSX.HTMLClassProp; type HTMLStyleArrayProp = JSX.HTMLStyleArrayProp; type HTMLStyleProp = JSX.HTMLStyleProp; type HTMLDatasetProp = JSX.HTMLDatasetProp; type CSSProps = JSX.CSSProps; type HTMLProps<T extends keyof HTMLAttributesByTagName> = JSX.HTMLProps<T>; type SVGProps<T extends keyof SVGAttributesByTagName> = JSX.SVGProps<T>; type ObservableProps<Props extends object> = JSX.ObservableProps<Props>; type TagName = JSX.TagName; type InferTagName<T extends AnyElement> = JSX.InferTagName<T>; type InferDOMElement<T> = JSX.InferDOMElement<T>; type InferAttributes<T> = JSX.InferAttributes<T>; type InferProps<T> = JSX.InferProps<T>; type IntrinsicAttributes = JSX.IntrinsicAttributes; type IntrinsicElements = JSX.IntrinsicElements; type ElementChildrenAttribute = JSX.ElementChildrenAttribute; } }