UNPKG

784 BTypeScriptView Raw
1import { FunctionComponent } from 'preact';
2export declare enum PluginPosition {
3 Header = 0,
4 Footer = 1,
5 Cell = 2
6}
7export interface Plugin<T extends FunctionComponent> {
8 id: string;
9 position: PluginPosition;
10 component: T;
11 order?: number;
12}
13export declare class PluginManager {
14 private readonly plugins;
15 constructor();
16 get<T extends FunctionComponent>(id: string): Plugin<T> | undefined;
17 add<T extends FunctionComponent<any>>(plugin: Plugin<T>): this;
18 remove(id: string): this;
19 list<T extends FunctionComponent>(position?: PluginPosition): Plugin<T>[];
20}
21export declare function PluginRenderer(props: {
22 props?: any;
23 pluginId?: string;
24 position?: PluginPosition;
25}): import("preact").VNode<any>;