import type { Body, Meta } from '@uppy/utils'; import type { PluginOpts } from './BasePlugin.js'; import BasePlugin from './BasePlugin.js'; import type { State } from './Uppy.js'; /** * UIPlugin is the extended version of BasePlugin to incorporate rendering with Preact. * Use this for plugins that need a user interface. * * For plugins without an user interface, see BasePlugin. */ declare class UIPlugin = Record> extends BasePlugin { #private; isTargetDOMEl: boolean; el: HTMLElement | null; parent: unknown; title: string; getTargetPlugin(target: PluginTarget): UIPlugin | undefined; /** * Check if supplied `target` is a DOM element or an `object`. * If it’s an object — target is a plugin, and we search `plugins` * for a plugin with same name and return its target. */ mount(target: PluginTarget, plugin: UIPlugin): HTMLElement; /** * Called when plugin is mounted, whether in DOM or into another plugin. * Needed because sometimes plugins are mounted separately/after `install`, * so this.el and this.parent might not be available in `install`. * This is the case with @uppy/react plugins, for example. */ render(state: Record, container?: HTMLElement): any; update(state: Partial>): void; unmount(): void; onMount(): void; onUnmount(): void; } export default UIPlugin; export type PluginTarget = string | Element | typeof BasePlugin | typeof UIPlugin | BasePlugin; export interface UIPluginOptions extends PluginOpts { target?: PluginTarget; replaceTargetContent?: boolean; direction?: 'ltr' | 'rtl'; } //# sourceMappingURL=UIPlugin.d.ts.map