UNPKG

@atlaskit/editor-plugin-extension

Version:

editor-plugin-extension plugin for @atlaskit/editor-core

29 lines (28 loc) • 2.39 kB
import type { IntlShape } from 'react-intl'; import type { PortalProviderAPI } from '@atlaskit/editor-common/common'; import type { Dispatch, EventDispatcher } from '@atlaskit/editor-common/event-dispatcher'; import type { GetPMNodeHeight } from '@atlaskit/editor-common/extensibility/types'; import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions/extension-handler'; import type { ExtensionProvider } from '@atlaskit/editor-common/extensions/extension-provider'; import type ProviderFactory from '@atlaskit/editor-common/provider-factory/provider-factory'; import { SafePlugin } from '@atlaskit/editor-common/safe-plugin'; import type { EditorAppearance } from '@atlaskit/editor-common/types/editor-appearance'; import type { FeatureFlags } from '@atlaskit/editor-common/types/feature-flags'; import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin'; import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel/types'; import type { EditorState } from '@atlaskit/editor-prosemirror/state'; import type { EditorView } from '@atlaskit/editor-prosemirror/view'; import type { ExtensionPlugin, ExtensionPluginOptions, ExtensionState } from '../extensionPluginType'; export declare const createExtensionProviderHandler: (view: EditorView, api?: ExtractInjectionAPI<ExtensionPlugin>) => (name: string, provider?: Promise<ExtensionProvider>) => Promise<void>; export declare const handleUpdate: ({ view, prevState, domAtPos, extensionHandlers, applyChange, }: { applyChange: ApplyChangeHandler | undefined; domAtPos: EditorView['domAtPos']; extensionHandlers: ExtensionHandlers; prevState: EditorState; view: EditorView; }) => true | undefined; export declare const createPlugin: (dispatch: Dispatch, providerFactory: ProviderFactory, extensionHandlers: ExtensionHandlers, extensionLoadingHandlers: ExtensionHandlers | undefined, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginInjectionApi: ExtractInjectionAPI<ExtensionPlugin> | undefined, useLongPressSelection?: boolean, options?: { allowAIGeneratedContentMotion?: boolean; appearance?: EditorAppearance; getExtensionHeight?: GetPMNodeHeight; }, featureFlags?: FeatureFlags, __rendererExtensionOptions?: ExtensionPluginOptions['__rendererExtensionOptions'], intl?: IntlShape) => SafePlugin<ExtensionState>;