declare const inspect: unique symbol; declare class VNode { static ELEMENT_NODE: number; static TEXT_NODE: number; static CDATA_SECTION_NODE: number; static PROCESSING_INSTRUCTION_NODE: number; static COMMENT_NODE: number; static DOCUMENT_NODE: number; static DOCUMENT_TYPE_NODE: number; static DOCUMENT_FRAGMENT_NODE: number; _parentNode: any; _childNodes: any[]; /** Cached position in the parent's `_childNodes`, only a hint, see `_indexInParent` */ _index: number; get nodeType(): number; get nodeName(): string; get nodeValue(): string | null; constructor(); cloneNode(deep?: boolean): this; _fixChildNodesParent(): void; /** Position of `node` in `_childNodes` or -1, uses the `_index` hint if valid */ _childIndex(node: VNode): number; /** * True, and a warning, if `node` is this node or one of its ancestors: * inserting it here would make a node its own ancestor, and walks over the * tree would never end. The DOM throws a HierarchyRequestError then. */ _rejectsChild(node: unknown, parent?: VNode): boolean; /** Detach all children, so they don't point to this node anymore */ _detachChildren(): void; /** * Like the DOM: `null` as reference node appends, a fragment inserts its * children. Without a reference node (`undefined`), which is a TypeError in * browsers, zeed-dom inserts at the start, as it always did. */ insertBefore(newNode: VNode, node?: VNode | null): void; appendChild(node: VNode | VNode[] | string | string[] | null | undefined): void; append: (node: VNode | VNode[] | string | string[] | null | undefined) => void; removeChild(child: { _parentNode: null; }): void; /** Remove node */ remove(): this; /** Replace content of node with text or nodes */ replaceChildren(...nodes: any[]): void; /** Replace node itself with nodes */ replaceWith(...nodes: any[]): void; /** * Position in the parent's child list. `_index` is only a hint: mutations * like `insertBefore` or `removeChild` shift siblings without updating it. * If the hint is stale, all siblings are re-indexed once, so walking the * children with `nextSibling` stays O(n) instead of O(n²). */ _indexInParent(): any; get parentNode(): any; get childNodes(): any[]; get children(): any[]; get firstChild(): any; get lastChild(): any; get nextSibling(): any; get previousSibling(): any; get childElementCount(): number; get firstElementChild(): any; get lastElementChild(): any; /** * Visit this node and all descendants in document order until `fn` returns * true. Iterative, so deeply nested trees don't overflow the call stack. */ _walk(fn: (node: VNode) => boolean | void): VNode | undefined; flatten(): VElement[]; flattenNodes(): VNode[]; render(): string; get textContent(): string | null; set textContent(text: string | null); contains(otherNode: VNode | null | undefined): boolean; get ownerDocument(): any; toString(): string; [inspect](): string; get parentElement(): any; } declare class VTextNode extends VNode { _text: string; get nodeType(): number; get nodeName(): string; get nodeValue(): string | null; set nodeValue(text: string | null); get textContent(): string | null; set textContent(text: string | null); get data(): string; set data(text: string); constructor(text?: string); render(): string; cloneNode(deep?: boolean): this; } declare class VNodeQuery extends VNode { /** First element in document order, including this one, for which `fn` is true */ _findElement(fn: (element: VElement) => boolean): VElement | undefined; getElementById(name: string): VElement | undefined; getElementsByClassName(name: any): VElement[]; matches(selector: string): boolean; querySelectorAll(selector: any): VElement[]; querySelector(selector: string): VElement | undefined; getElementsByName(name: string): VElement[]; parent(selector: string): any; handle(selector: any, handler: (arg0: VElement, arg1: number) => void): void; } interface Attr { name: string; value: string; } type VElementStyle = Record & { get length(): number; getPropertyValue: (name: string) => any; cssText: string; }; declare class VElement extends VNodeQuery { _originalTagName: string; _nodeName: string; _attributes: Record; _styles: VElementStyle | undefined; _dataset: Record | undefined; get nodeType(): number; get nodeName(): string; constructor(name?: string, attrs?: {}); cloneNode(deep?: boolean): this; get attributes(): Attr[]; get attributesObject(): { [x: string]: string; }; _findAttributeName(name: string): string | null; setAttribute(name: string, value: any): void; getAttribute(name: string): string | null; removeAttribute(name: string | number): void; hasAttribute(name: any): boolean; get style(): VElementStyle; get dataset(): Record; get tagName(): string; /** Private function to easily change the tagName */ setTagName(name: string): void; get id(): string | null; set id(value: string | null); get src(): string | null; set src(value: string | null); getElementsByTagName(name: string): VElement[]; setInnerHTML(_html: string): void; insertAdjacentHTML(position: 'beforebegin' | 'afterbegin' | 'beforeend' | 'afterend', text: string): void; get innerHTML(): string; set innerHTML(html: string); get outerHTML(): any; get className(): string; set className(name: string | string[]); get classList(): { readonly length: number; [Symbol.iterator](): ArrayIterator; contains(s: any): boolean; add: (s: any) => void; remove: (s: any) => void; }; render(h?: any): any; } declare class VDocType extends VNode { name: any; publicId: any; systemId: any; get nodeName(): string; get nodeValue(): string | null; get nodeType(): number; render(): string; } declare class VDocumentFragment extends VNodeQuery { docType?: VDocType; get nodeType(): number; get nodeName(): string; render(h?: (tag: string, attrs?: any, children?: string | any[] | undefined, strict?: boolean | undefined) => string): string; get innerHTML(): string; createElement(name: string, attrs?: {}): VElement; createDocumentFragment(): VDocumentFragment; createTextNode(text?: string): VTextNode; } declare class VDocument extends VDocumentFragment { get nodeType(): number; get nodeName(): string; get documentElement(): any; render(h?: (tag: string, attrs?: any, children?: string | any[] | undefined, strict?: boolean | undefined) => string): string; } declare class VHTMLDocument extends VDocument { constructor(empty?: boolean); get body(): VElement; get title(): string; set title(title: string); get head(): VElement; } declare function createDocument(): VDocument; declare function createHTMLDocument(): VHTMLDocument; declare const document: VDocument; declare const h$1: any; declare function isVElement(n: VNode): n is VElement; declare function isVTextElement(n: VNode): n is VTextNode; declare function isVDocument(n: VNode): n is VDocument; /** * Markup that is inserted as it is when used as a child of `html()` or the * JSX runtime. Returned by `htmlStrict()`, the strict JSX runtime and `raw()`. */ declare class HTMLString extends String {} declare const CDATA: (s: string) => string; declare function html(tag: string | ((props: any) => VDocumentFragment | VElement), attrs?: Record | unknown[] | null, ...children: unknown[]): string; declare namespace html { var firstLine: string; var html: boolean; } declare const h: typeof html; export { h$1 as _, VDocType as a, isVTextElement as b, VElement as c, VNode as d, VNodeQuery as f, document as g, createHTMLDocument as h, html as i, VElementStyle as l, createDocument as m, HTMLString as n, VDocument as o, VTextNode as p, h as r, VDocumentFragment as s, CDATA as t, VHTMLDocument as u, isVDocument as v, isVElement as y };