import { type Operation } from 'ot-json0'; import { type Element } from '@makeswift/controls'; import { type Action, type UnknownAction } from '../actions'; import { type Document } from './read-only-documents'; import { type DescriptorsByComponentType } from './prop-controllers'; export type ElementTree = { elements: Map; elementIds: Map; }; export type State = Map; export declare function getInitialState(documents?: Map, descriptors?: DescriptorsByComponentType): State; export declare function getElements(state: State, documentKey: string): Map; export declare function getElementIds(state: State, documentKey: string): Map; export declare function getElement(state: State, documentKey: string, elementKey: string): Element | null; export declare function getElementId(state: State, documentKey: string, elementKey: string): string | null; export declare function reducer(state: State | undefined, action: Action | UnknownAction): State; export declare function traverseElementTree(element: Element, descriptors: DescriptorsByComponentType): Generator; export declare function buildElementTree(rootElement: Element, descriptors: DescriptorsByComponentType): ElementTree; type OperationPath = Operation[number]['p']; type ElementOperationPath = { elementPath: OperationPath; propName: string | null; }; export declare function getChangedElementsPaths(path: OperationPath): [ElementOperationPath, ...ElementOperationPath[]]; export {}; //# sourceMappingURL=element-trees.d.ts.map