export declare const ELEMENT_NODE = 1; export declare const DOCUMENT_FRAGMENT_NODE = 11; export declare const DOCUMENT_NODE = 9; export declare const TEXT_NODE = 3; export declare const COMMENT_NODE = 8; export interface ElementConstructor { new (): HTMLElement; } export declare type AttrMutatorMap = { [x: string]: Mutator; }; export declare type Attributes = { [x: string]: string; }; export declare type Key = string; export declare type NameOrCtorDef = string | ElementConstructor; export declare type Mutator = (n: HTMLElement, nm: string, v: any) => void; export declare function isDocumentRoot(node: Node): node is Document | ShadowRoot; export declare function isElement(node: Node): node is Element; export declare function isText(node: Node): node is Text; export declare function getAncestry(node: Node, root: Node | null): Node[]; export interface NodeMatcher { (n: Node): boolean; } export declare function reverseCollectNodeWithBreadth(parent: Node, matcher: NodeMatcher, matches: Array): void; export declare function reverseFindNodeWithBreadth(parent: Node, matcher: NodeMatcher): Node | null; export declare function collectNodeWithBreadth(parent: Node, matcher: NodeMatcher, matches: Array): void; export declare function collectNodeWithDepth(parent: Node, matcher: NodeMatcher, matches: Array): void; export declare function findNodeWithBreadth(parent: Node, matcher: NodeMatcher): Node | null; export declare function findNodeWithDepth(parent: Node, matcher: NodeMatcher): Node | null; export declare function findDepthFirst(parent: Node, matcher: NodeMatcher): Node | null; export declare function collectDepthFirst(parent: Node, matcher: NodeMatcher, matches: Array): void; export declare function findBreadthFirst(parent: Node, matcher: NodeMatcher): Node | null; export interface NodeFunction { (n: Node): void; } export declare function applyChildNode(parent: Node, fn: NodeFunction): void; export declare function applyEachChildNode(parent: Node, fn: NodeFunction): void; export declare function applyEachNode(parent: Node, fn: NodeFunction): void; export declare function reverseApplyEachNode(parent: Node, fn: NodeFunction): void; export declare function eachChildAndNode(node: Node, fn: NodeFunction): void; export declare function nodeListToArray(items: NodeListOf): Array; export declare function eachNodeAndChild(node: Node, fn: NodeFunction): void; export declare function toHTML(node: Node, shallow: boolean | false): string; export declare function collectBreadthFirst(parent: Node, matcher: NodeMatcher, matches: Array): void; export declare function getActiveElement(node: Node): Element | null; export declare function getFocusedPath(node: Node, root: Node | null): Node[]; export declare function moveBefore(parentNode: Node, node: Node, referenceNode: Node | null): void; export declare function insertBefore(parentNode: Node, node: Node, referenceNode: Node | null): null; export declare function replaceNode(parentNode: Node, node: Node, replacement: Node): null; export declare function replaceNodeIf(targetNode: Node, replacement: Node): boolean; export declare function getNamespace(name: string): string | undefined; export declare function applyAttr(el: Element, name: string, value: any): void; export declare function applyAttrs(el: Element, values: Attributes): void; export declare function applyProp(el: Element, name: string, value: any): void; export declare function setStyleValue(style: CSSStyleDeclaration, prop: string, value: string): void; export declare function applySVGStyle(el: SVGElement, name: string, style: string | { [k: string]: string; }): void; export declare function applyStyle(el: HTMLElement, name: string, style: string | { [k: string]: string; }): void; export declare function applyStyles(el: HTMLElement, style: string | Attributes): void; export declare function applySVGStyles(el: SVGElement, style: string | Attributes): void; export declare function applyAttributeTyped(el: HTMLElement, name: string, value: {}): void; export declare function getNamespaceForTag(tag: string, parent: Node | null): string | null; export declare function recordAttributes(node: Element): Attributes; export declare function createElement(doc: Document, nameOrCtor: NameOrCtorDef, key: Key, content: string, attributes: Attributes | null, namespace: string | ''): Element; export declare function createText(doc: Document, text: string | '', key: Key | ''): Node; export declare function removeFromNode(fromNode: Node, endNode: Node | null): void; export declare function fromBlob(o: any): null | undefined; export declare function fromFile(o: any): null | undefined; export declare function toInputSourceCapability(o: any): { FiresTouchEvent: any; } | undefined; export declare function toMotionData(o: any): { X: number; Y: number; Z: number; }; export declare function toRotationData(o: any): {} | undefined; export declare function toMediaStream(o: any): { Audios: never[]; Videos: never[]; } | undefined; export declare function toTouches(o: any): never[] | undefined; export declare function toGamepad(o: any): {}; export declare function toDataTransfer(o: any): {} | undefined; export declare function getMatchingNode(matchNode: Node | null, matcher: NodeMatcher): Node | null;