import { EditorState, Plugin } from 'prosemirror-state'; import { EditorView } from 'prosemirror-view'; import { SylApi } from '../api'; import { ISylPluginConfig, ISylPluginProps } from '../libs'; import { BaseCard } from './card'; import { SylController } from './controller'; import { Formattable, SchemaMeta } from './schema'; interface ISylCommand { [key: string]: (state: EditorState, dispatch: EditorView['dispatch'], adapter: SylApi, ...args: any[]) => any; } declare type FormattableType = new (editor: SylApi, props: any) => Formattable; declare type ControllerType = new (editor: SylApi, props: any) => SylController; declare class SylPlugin { name: string; $controller: SylController | null; $schema: Formattable | BaseCard | null; $schemaMeta: SchemaMeta | null; $NodeView: Formattable['NodeView'] | null; Controller: ControllerType; asyncController: (() => Promise) | null; Schema: FormattableType | null; private editor; private props; private controllerUnmountEvent; private handleAsyncController; static getName(): string; constructor(props?: T); registerController: (Constructor?: ControllerType, props?: T | undefined) => void; unregisterController: () => void; init(editor: SylApi, options: ISylPluginProps): void; } declare class SylUnionPlugin { name: string; props: T | null; static getName(): string; constructor(props?: T); install(editor: SylApi, props: ISylPluginProps['controllerProps']): { nativePlugins?: Plugin[] | undefined; sylPlugins?: ISylPluginConfig[] | undefined; }; init(editor: SylApi, props: ISylPluginProps['controllerProps']): { nativePlugins?: Plugin[]; sylPlugins?: ISylPluginConfig[]; }; } export { ISylCommand, SylPlugin, SylUnionPlugin };