import type { Node, PropsMap } from '../document';
import type { Editor } from '../editor';
import type { ProjectSchema, TRANSFORM_STAGE } from '../types';
import type { ComponentMetaManager } from './component-meta';
import type { DragObject } from './dragon';
import type { LocateEvent, LocationData } from './location';
import { Project } from '../project';
import { Detecting } from './detecting';
import { Dragon } from './dragon';
import { DropLocation } from './location';
import { type NodeSelector, type OffsetObserver } from './offset-observer';
import { Selection } from './selection';
import { SettingsManager } from './setting';
import { SettingTopEntry } from './setting/setting-top-entry';
export type PropsTransducer = (props: PropsMap, node: Node, ctx?: {
    stage: TRANSFORM_STAGE;
}) => PropsMap;
export interface DesignerProps {
    editor: Editor;
    defaultSchema?: ProjectSchema;
    onDragstart?: (e: LocateEvent) => void;
    onDrag?: (e: LocateEvent) => void;
    onDragend?: (e: {
        dragObject: DragObject;
        copy: boolean;
    }, loc?: DropLocation) => void;
    [key: string]: any;
}
export declare enum DESIGNER_EVENT {
    INIT = "designer:init",
    DRAG_START = "designer:dragstart",
    DRAG = "designer:drag",
    DRAG_END = "designer:dragend",
    CURRENT_DOCUMENT_CHANGE = "designer:current-document.change",
    CURRENT_HISTORY_CHANGE = "designer:current-history.change",
    DROP_LOCATION_CHANGE = "designer:dropLocation.change",
    DOCUMENT_DROP_LOCATION_CHANGE = "designer:document.dropLocation.change",
    INSERT_NODE_BEFORE = "designer:node.insert.before",
    INSERT_NODE_AFTER = "designer:node.insert.after",
    NODE_VISIBLE_CHANGE = "designer:node.visible.change",
    NODE_LOCK_CHANGE = "designer:node.lock.change",
    NODE_CHILDREN_CHANGE = "designer:node.children.change",
    NODE_PROPS_CHANGE = "designer:node.props.change",
    NODE_REMOVE = "designer:node.remove",
    NODE_RENDER = "designer:node.render",
    SETTING_TOP_ENTRY_VALUE_CHANGE = "designer:setting.top-entry.value.change",
    SELECTION_CHANGE = "designer:selection.change",
    SIMULATOR_SELECT = "designer:simulator.select",
    VIEWPORT_MOUNT = "simulator:viewport.mount"
}
export declare class Designer {
    private emitter;
    readonly editor: Editor;
    readonly dragon: Dragon;
    readonly detecting: Detecting;
    readonly project: Project;
    readonly selection: Selection;
    readonly settingsManager: SettingsManager;
    private _dropLocation?;
    get componentMetaManager(): ComponentMetaManager;
    private props?;
    private propsReducers;
    private oobxList;
    get currentDocument(): import("..").Document | undefined;
    get currentHistory(): import("..").History<import("..").RootSchema> | undefined;
    constructor(props: DesignerProps);
    /**
     * 该函数用于 Designer constructor 的插件扩展，因为 Object.defineProperty 无法修改 constructor
     */
    init(): void;
    setProps(nextProps: DesignerProps): void;
    get(key: string): any;
    postEvent(event: string, ...args: any[]): void;
    onEvent(event: string, listener: (...args: any[]) => void): () => void;
    createLocation(locationData: LocationData<Node>): DropLocation;
    clearLocation(): void;
    createOffsetObserver(nodeInstance: NodeSelector): OffsetObserver | null;
    private clearOobxList;
    touchOffsetObserver(): void;
    onInit(listener: (designer: Designer) => void): void;
    get schema(): ProjectSchema<import("..").RootSchema>;
    setSchema(schema: ProjectSchema): void;
    transformProps(props: PropsMap, node: Node, stage: TRANSFORM_STAGE): PropsMap;
    addPropsReducer(reducer: PropsTransducer, stage: TRANSFORM_STAGE): void;
    createSettingEntry(nodes: Node[]): SettingTopEntry;
}
