import * as React from 'react';
import { IPageAPI } from '../app/global-api';
export declare const widgetKeys: string[];
export declare const WIDGET_API_MAP: {};
export declare const WidgetsContext: React.Context<{
    parent: any;
}>;
export declare function checkVisible({ id, _visible }: {
    id: any;
    _visible?: any;
}): boolean;
export declare function checkDisplay({ id, _display }: {
    id?: string;
    _display?: any;
}): boolean;
interface MPNodesRefFields {
    id?: HTMLElement['id'];
    dataset?: HTMLElement['dataset'];
    left?: DOMRect['left'];
    right?: DOMRect['right'];
    top?: DOMRect['top'];
    bottom?: DOMRect['bottom'];
    width?: DOMRect['width'];
    height?: DOMRect['height'];
    scrollLeft?: HTMLElement['scrollLeft'];
    scrollTop?: HTMLElement['scrollTop'];
    [prop: string]: string | any;
}
export declare function getDom(element: HTMLElement, options: any): Promise<MPNodesRefFields>;
export declare function findWidgets(widget: any, parentType: any, filterFn: any, includeInvisibleDescendants: any): any;
export declare function retryDataBinds(tryTime?: number): void;
export declare function createWidgets(ctx: {
    /**
     * 为了之后和组件生成复用
     * 值为 $page 或 $comp
     */
    apiContext: IPageAPI;
    widgets?: any;
    widgetProps?: any;
    nodeMap?: any;
    globalCtx?: any;
}, widgetProps: any, dataBinds: any, controledDataContext: any, widgets?: {
    _disposers: [];
    [id: string]: any;
}): {
    widgets: {
        _disposers: any[];
    };
    nodeMap: Record<string, IWidgetNode>;
};
/**
 * Add parent, children to widget
 */
interface IWidgetNode {
    id: string;
    value: any;
    children: IWidgetNode[];
    parent: null | IWidgetNode;
    forCount: number;
    exist: boolean;
    changed: string[];
}
/**
 * 对外（用户）的 Widget
 */
export declare class UserWidget {
    _widget: any;
    get description(): string;
    constructor(widget: any);
    get sys(): {
        /**
         * 内置属性
         */
        readonly id: string;
        readonly module: string;
        readonly component: string;
        readonly name: string;
        readonly parent: UserWidget;
        readonly children: UserWidget[];
        /**
         * 内置方法
         */
        closest(filter: any): any;
    };
    get custom(): any;
}
export declare function generateWidgetAPIContext($w: {}, widget: any, forContext: any, scopeContext?: {}): {};
export declare function checkObserverInstanceRef(sourceKey?: string): boolean;
export {};
