import { ComponetizedCell } from '../../types/editable'; import { EditorState } from '../../types/editor'; import { ContentPlugin, LayoutPlugin, Plugin, Plugins, PluginsInternal } from './classes'; /** * Iterate through an editable content tree and generate ids where missing. */ export declare const generateMissingIds: (props: EditorState) => EditorState; /** * PluginService is a registry of all content and layout plugins known to the editor. */ export default class PluginService { plugins: PluginsInternal; /** * Instantiate a new PluginService instance. You can provide your own set of content and layout plugins here. */ constructor({ content, layout, native }?: Plugins); hasNativePlugin: () => boolean; getNativePlugin: () => import("../../types/editable").NativeFactory; createNativePlugin: (hover?: any, monitor?: any, component?: any) => ComponetizedCell; setLayoutPlugins: (plugins?: Pick, "Component" | "name" | "text" | "description" | "lang" | "version" | "IconComponent" | "hideInMenu" | "serialize" | "unserialize" | "handleRemoveHotKey" | "handleFocusNextHotKey" | "handleFocusPreviousHotKey" | "handleFocus" | "handleBlur" | "reducer" | "migrations" | "createInitialState" | "createInitialChildren">[]) => void; addLayoutPlugin: (config: Pick, "Component" | "name" | "text" | "description" | "lang" | "version" | "IconComponent" | "hideInMenu" | "serialize" | "unserialize" | "handleRemoveHotKey" | "handleFocusNextHotKey" | "handleFocusPreviousHotKey" | "handleFocus" | "handleBlur" | "reducer" | "migrations" | "createInitialState" | "createInitialChildren">) => void; removeLayoutPlugin: (name: string) => void; setContentPlugins: (plugins?: Pick, "allowInlineNeighbours" | "isInlineable" | "Component" | "name" | "text" | "description" | "lang" | "version" | "IconComponent" | "hideInMenu" | "serialize" | "unserialize" | "handleRemoveHotKey" | "handleFocusNextHotKey" | "handleFocusPreviousHotKey" | "handleFocus" | "handleBlur" | "reducer" | "migrations" | "createInitialState">[]) => void; addContentPlugin: (config: Pick, "allowInlineNeighbours" | "isInlineable" | "Component" | "name" | "text" | "description" | "lang" | "version" | "IconComponent" | "hideInMenu" | "serialize" | "unserialize" | "handleRemoveHotKey" | "handleFocusNextHotKey" | "handleFocusPreviousHotKey" | "handleFocus" | "handleBlur" | "reducer" | "migrations" | "createInitialState">) => void; removeContentPlugin: (name: string) => void; /** * Finds a layout plugin based on its name and version. */ findLayoutPlugin: (name: string, version: string) => { plugin: LayoutPlugin; pluginWrongVersion?: LayoutPlugin; }; /** * Finds a content plugin based on its name and version. */ findContentPlugin: (name: string, version: string) => { plugin: ContentPlugin; pluginWrongVersion?: ContentPlugin; }; /** * Returns a list of all known plugin names. */ getRegisteredNames: () => string[]; migratePluginState: (state: any, plugin: Plugin, dataVersion: string) => any; getNewPluginState: (found: { plugin: Plugin; pluginWrongVersion?: Plugin; }, state: unknown, stateI18n: { [lang: string]: unknown; }, version: string) => { plugin: Plugin; state: unknown; stateI18n: { [lang: string]: unknown; }; }; unserialize: (state: any) => any; serialize: (state: any) => import("../../types/editable").AbstractEditable>; } //# sourceMappingURL=index.d.ts.map