@atlaskit/editor-plugin-card
Version:
Card plugin for @atlaskit/editor-core
23 lines (22 loc) • 2.42 kB
TypeScript
import type { IntlShape } from 'react-intl';
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics/api';
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
import type { CardOptions } from '@atlaskit/editor-common/card/cardOptions';
import type { Command } from '@atlaskit/editor-common/types/command';
import type { FloatingToolbarHandler, FloatingToolbarItem } from '@atlaskit/editor-common/types/floating-toolbar';
import type { LinkPickerOptions } from '@atlaskit/editor-common/types/hyperlink';
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
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>[];