export interface NodeDictator { Same(n: Node, m: Node): boolean; Changed(n: Node, m: Node): boolean; } export declare const DefaultNodeDictator: NodeDictator; export interface JSONDictator { Same(n: Node, m: JSONNode): boolean; Changed(n: Node, m: JSONNode): boolean; } export declare const DefaultJSONDictator: JSONDictator; export interface JSONAttr { Key: string; Value: any; } export interface JSONEvent { Name: string; PreventDefault: boolean; StopPropagation: boolean; } export interface JSONNode { id: string; tid: string; atid: string; ref: string; type: number; typeName: string; name: string; content: string; namespace: string; removed: boolean; attrs: Array; events: Array; children: Array; } export interface JSONNodeFunction { (n: JSONNode): void; } export declare function ToJSONNode(node: Node | string, shallow: boolean | false, parentNode: JSONNode | null): Array; export declare function NodeToJSONNode(node: Node, shallow: boolean | false, parentNode: JSONNode | null): JSONNode; export declare function JSONEvent(eventDesc: string): JSONEvent; export declare function applyJSONNodeFunction(node: JSONNode, fn: JSONNodeFunction): void; export declare function applyJSONNodeKidsFunction(node: JSONNode, fn: JSONNodeFunction): void; export declare function isJSONNode(n: any): n is JSONNode; export declare function findElement(desc: JSONNode, parent: Element): Element | null; export declare function findElementbyRef(ref: string, parent: Element): Element | null; export declare function findElementParentbyRef(ref: string, parent: Element): Element | null; export interface JSONMaker { Make(doc: Document, n: JSONNode, shallow: boolean, skipRemoved: boolean): Node; } export declare const DefaultJSONMaker: JSONMaker; export declare function jsonMaker(doc: Document, descNode: JSONNode, shallow: boolean | false, skipRemoved: boolean | true): Node; export declare function BuildEvent(events: Array): string; export declare type NodeMap = { [x: Node]: boolean; }; export declare type NodeTidMap = { [x: string]: boolean; }; export declare function PatchJSONNodeTree(fragment: JSONNode, mount: Element, dictator: JSONDictator, maker: JSONMaker): void; export declare function PatchJSONNode(fragment: JSONNode, targetNode: Element, dictator: JSONDictator, maker: JSONMaker): void; export declare function StreamJSONNodes(fragment: Array, mount: Element, dictator: JSONDictator, maker: JSONMaker): void; export declare function ApplyStreamNode(fragment: JSONNode, targetNode: Element, dictator: JSONDictator, maker: JSONMaker): void; export declare function PatchTextCommentWithJSON(fragment: JSONNode, target: Node): void; export declare function PatchJSONAttributes(node: JSONNode, target: Element): void; export declare function PatchDOMTree(newFragment: Node, oldNodeOrMount: Node, dictator: NodeDictator, isChildRecursion: boolean | false): null | undefined; export declare function PatchDOMAttributes(newElement: Element, oldElement: Element): void;