UNPKG

@atlaskit/editor-plugin-card

Version:

Card plugin for @atlaskit/editor-core

54 lines (53 loc) 2.91 kB
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next'; import type { ACTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics'; import type { CardPluginActions, CardReplacementInputMethod } from '@atlaskit/editor-common/card'; import type { CardAppearance } from '@atlaskit/editor-common/provider-factory'; import type { Command, EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types'; import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics'; import type { InlineCommentPluginState } from '@atlaskit/editor-plugin-annotation'; import type { BasePlugin } from '@atlaskit/editor-plugin-base'; import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity'; import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations'; import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled'; import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode'; import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags'; import type { FloatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar'; import type { GridPlugin } from '@atlaskit/editor-plugin-grid'; import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection'; import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar'; import type { UiControlRegistryPlugin } from '@atlaskit/editor-plugin-ui-control-registry'; import type { WidthPlugin } from '@atlaskit/editor-plugin-width'; import type { CardPluginOptions, CardPluginState } from './types'; type DummyAnnotationPlugin = NextEditorPlugin<'annotation', { actions: { setInlineCommentDraftState: (isDraft: boolean, inputMethod: INPUT_METHOD) => Command; }; sharedState: InlineCommentPluginState; }>; export type CardPluginDependencies = [ OptionalPlugin<FeatureFlagsPlugin>, OptionalPlugin<AnalyticsPlugin>, OptionalPlugin<EditorViewModePlugin>, WidthPlugin, DecorationsPlugin, GridPlugin, FloatingToolbarPlugin, OptionalPlugin<EditorDisabledPlugin>, OptionalPlugin<SelectionPlugin>, OptionalPlugin<DummyAnnotationPlugin>, OptionalPlugin<ConnectivityPlugin>, OptionalPlugin<BasePlugin>, OptionalPlugin<ToolbarPlugin>, OptionalPlugin<UiControlRegistryPlugin> ]; export type CardPlugin = NextEditorPlugin<'card', { actions: CardPluginActions; commands: { /** EditorCommand form of `queueCardsFromRange`. Prefer over the action. */ queueCardsFromRange: (from: number, to: number, source: CardReplacementInputMethod, analyticsAction?: ACTION, normalizeLinkText?: boolean, sourceEvent?: UIAnalyticsEvent | null, appearance?: CardAppearance) => EditorCommand; }; dependencies: CardPluginDependencies; pluginConfiguration: CardPluginOptions | undefined; sharedState: CardPluginState | null; }>; export {};