UNPKG

@atlaskit/editor-plugin-card

Version:

Card plugin for @atlaskit/editor-core

20 lines (19 loc) 2.18 kB
import type { IntlShape } from 'react-intl-next'; import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics'; import { INPUT_METHOD } from '@atlaskit/editor-common/analytics'; import type { CardOptions } from '@atlaskit/editor-common/card'; import type { Command, ExtractInjectionAPI, FloatingToolbarHandler, FloatingToolbarItem, LinkPickerOptions } from '@atlaskit/editor-common/types'; import type { EditorState } from '@atlaskit/editor-prosemirror/state'; import type { cardPlugin } from '../index'; import type { CardPluginOptions, ToolbarResolvedAttributes } from '../types'; export declare const removeCard: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command; export declare const visitCardLinkAnalytics: (editorAnalyticsApi: EditorAnalyticsAPI | undefined, inputMethod: INPUT_METHOD.FLOATING_TB | INPUT_METHOD.TOOLBAR | INPUT_METHOD.BUTTON | INPUT_METHOD.DOUBLE_CLICK | INPUT_METHOD.META_CLICK, resolvedAttributes?: Partial<ToolbarResolvedAttributes>) => Command; export declare const openLinkSettings: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command; export declare const floatingToolbar: (cardOptions: CardOptions, lpLinkPicker: boolean, linkPickerOptions?: LinkPickerOptions, pluginInjectionApi?: ExtractInjectionAPI<typeof cardPlugin>, disableFloatingToolbar?: boolean) => FloatingToolbarHandler; export declare const getSettingsButton: (intl: IntlShape, editorAnalyticsApi: EditorAnalyticsAPI | undefined, userPreferencesLink?: string) => FloatingToolbarItem<Command>; export declare const shouldRenderToolbarPulse: (embedEnabled: boolean, appearance: string, status: string, isDiscoverabilityEnabled: boolean) => boolean; export declare const getStartingToolbarItems: (options: CardPluginOptions, api?: ExtractInjectionAPI<typeof cardPlugin> | undefined) => (intl: IntlShape, link: string, onEditLink: Command, metadata: { title: string; url: string; }, _state?: EditorState) => FloatingToolbarItem<Command>[]; export declare const getEndingToolbarItems: (options: CardPluginOptions, api?: ExtractInjectionAPI<typeof cardPlugin> | undefined) => (intl: IntlShape, _link: string) => FloatingToolbarItem<Command>[];