import { Disposable } from '../core/types';
import type { PropsDefinition, SceneNode } from './compositor';
import type { Source } from './sources';
export type TransformDeclaration = {
    name: string;
    sourceType?: string;
    useSource?: (sources: Source[], nodeProps: any) => Source;
    tagName?: string;
    props?: PropsDefinition;
    create?: (context: TransformContext, initialProps: any) => TransformElementBase;
};
export type TransformElementBase = {
    root: HTMLElement;
};
export type TransformElement = TransformElementBase & {
    role: string;
    nodeId: string;
    sourceType: string;
    transformName: string;
    source?: Source;
    sourceValue?: any;
    _onNewSourceHandlers: Function[];
    _onUpdateHandlers: Function[];
    _onRemoveHandlers: Function[];
    _disposables: Disposable[];
};
export type TransformMap = {
    [name: string]: TransformDeclaration;
};
export type DefaultTransformMap = {
    [sourceType: string]: TransformDeclaration['name'];
};
export type TransformSettings = {
    defaultTransforms?: DefaultTransformMap;
};
export type TransformRegister = (declaration: TransformDeclaration | TransformDeclaration[]) => void;
export type TransformElementGetter = (node: SceneNode) => TransformElement;
export type TransformContext = {
    /** Listens for all events emitted by the compositor */
    onEvent?: (event: string, cb: (payload: any) => void, nodeId?: string) => Disposable;
    /** Called anytime the Source value returned by useSource is different */
    onNewSource?: (cb: (source: Source) => void) => void;
    /** Called anytime the Source value itself has been modified */
    onSourceModified?: (cb: (source: Source) => void) => void;
    /** Called anytime the Node associated with the element has been updated */
    onUpdate?: (cb: (nodeProps: any) => void) => void;
    /** Called when the Node associated with the element has been removed */
    onRemove?: (cb: (nodeProps: any) => void) => void;
};
export type Filter = (node: SceneNode) => SceneNode;
export declare const runFilters: (node: SceneNode, filters?: Filter[]) => SceneNode;
