import * as React from 'react';
import type { CanvasWidgetDescription } from './canvasApi';
/**
 * Defines the React component to be a canvas widget.
 *
 * A component cannot be rendered by canvas as widget unless explicitly
 * defined as such using this function.
 *
 * **Example**:
 * ```jsx
 * function MyWidget(props) {
 *    ...
 * }
 *
 * defineCanvasWidget(MyWidget, element => ({
 *     element,
 *     attachment: 'viewport'
 * }));
 * ```
 *
 * @category Core
 */
export declare function defineCanvasWidget<P>(type: React.ComponentType<P>, metadataOf: (element: React.ReactElement<P>) => CanvasWidgetDescription): void;
export declare function extractCanvasWidget(element: React.ReactElement): CanvasWidgetDescription | undefined;
//# sourceMappingURL=canvasWidget.d.ts.map