import { RenderDom, VNode } from "./common"; import { ComponentInstance } from "./component"; export declare const _DOM_PRIVATE_LISTENERS_KEY = "_l"; /** * Get current component instance. */ export declare const getCurrentComponent: = ComponentInstance>() => GComponent; /** * Get current diffing node for atomic updates */ export declare const getCurrentDiffingNode: () => VNode; /** * Set dom attribute * @param dom dom element to set attributes on * @param name name of the attribute * @param value value of the attribute */ export declare function _setDomAttribute(dom: Element, name: string, value: any): void; /** * Diff an element node and create its attached dom element. * @param newNode New node, can be the only argument to create dom element. * @param oldNode Old node, for diffing. * @param element for hydration only, the corresponding node already in document. */ export declare function _diffElement(newNode: VNode, oldNode: VNode, element?: RenderDom): RenderDom; export declare function _diffAndMount(newNode: VNode, oldNode: VNode, element?: Element, forceUpdate?: boolean): void; /** * Recursively update mount state of components associated to node. * Will browse every component to update the mounting state in correct order. * Will call mount / unmount / render extensions. * @param node The starting node. * @param doMount Mount, or unmount. */ export declare function recursivelyUpdateMountState(node: VNode, doMount: boolean): void; /** * Diff all children, with or without keys. * @param newParentNode New parent node to diff * @param oldParentNode Old parent node to diff, can be null to create element with newParentNode * @param element Used for hydration only. If defined, will not diff but only hydrate. */ export declare function _diffChildren(newParentNode: VNode, oldParentNode: VNode, element: RenderDom): void; /** * Diff a node. * @param newNode New node, can be the only parameter to only add. * @param oldNode Old node, if diffing. * @param element Dom element for hydration only. * @param forceUpdate For update to bypass shouldUpdate on components. */ export declare function diffNode(newNode: VNode, oldNode?: VNode, element?: RenderDom, forceUpdate?: boolean): void;