import { BaseCollection, CollectionNode } from './BaseCollection'; import { CollectionNodeClass } from './CollectionBuilder'; import { CSSProperties, ForwardedRef, ReactElement, ReactNode } from 'react'; import { Node } from '@react-types/shared'; /** * A mutable node in the fake DOM tree. When mutated, it marks itself as dirty * and queues an update with the owner document. */ export declare class BaseNode { private _firstChild; private _lastChild; private _previousSibling; private _nextSibling; private _parentNode; private _minInvalidChildIndex; ownerDocument: Document; constructor(ownerDocument: Document); [Symbol.iterator](): Iterator>; get firstChild(): ElementNode | null; set firstChild(firstChild: ElementNode | null); get lastChild(): ElementNode | null; set lastChild(lastChild: ElementNode | null); get previousSibling(): ElementNode | null; set previousSibling(previousSibling: ElementNode | null); get nextSibling(): ElementNode | null; set nextSibling(nextSibling: ElementNode | null); get parentNode(): BaseNode | null; set parentNode(parentNode: BaseNode | null); get isConnected(): boolean; private invalidateChildIndices; updateChildIndices(): void; appendChild(child: ElementNode): void; insertBefore(newNode: ElementNode, referenceNode: ElementNode): void; removeChild(child: ElementNode): void; addEventListener(): void; removeEventListener(): void; get previousVisibleSibling(): ElementNode | null; get nextVisibleSibling(): ElementNode | null; get firstVisibleChild(): ElementNode | null; get lastVisibleChild(): ElementNode | null; } /** * A mutable element node in the fake DOM tree. It owns an immutable * Collection Node which is copied on write. */ export declare class ElementNode extends BaseNode { nodeType: number; node: CollectionNode | null; isMutated: boolean; private _index; isHidden: boolean; constructor(type: string, ownerDocument: Document); get index(): number; set index(index: number); get level(): number; /** * Lazily gets a mutable instance of a Node. If the node has already * been cloned during this update cycle, it just returns the existing one. */ private getMutableNode; updateNode(): void; setProps(obj: { [key: string]: any; }, ref: ForwardedRef, CollectionNodeClass: CollectionNodeClass, rendered?: ReactNode, render?: (node: Node) => ReactElement): void; get style(): CSSProperties; hasAttribute(): void; setAttribute(): void; setAttributeNS(): void; removeAttribute(): void; } /** * A mutable Document in the fake DOM. It owns an immutable Collection instance, * which is lazily copied on write during updates. */ export declare class Document = BaseCollection> extends BaseNode { nodeType: number; ownerDocument: Document; dirtyNodes: Set>; isSSR: boolean; nodeId: number; nodesByProps: WeakMap>; private collection; private nextCollection; private subscriptions; private queuedRender; private inSubscription; constructor(collection: C); get isConnected(): boolean; createElement(type: string): ElementNode; private getMutableCollection; markDirty(node: BaseNode): void; private addNode; private removeNode; /** Finalizes the collection update, updating all nodes and freezing the collection. */ getCollection(): C; updateCollection(): void; queueUpdate(): void; subscribe(fn: () => void): () => boolean; resetAfterSSR(): void; }