UNPKG

@atlaskit/editor-plugin-mentions

Version:

Mentions plugin for @atlaskit/editor-core

36 lines (35 loc) 1.64 kB
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin'; import type { ExtractInjectionAPI, PMPluginFactoryParams } from '@atlaskit/editor-common/types'; import type { MentionsPlugin } from '../mentionsPluginType'; import type { FireElementsChannelEvent, MentionPluginOptions, MentionPluginState } from '../types'; export declare const ACTIONS: { COMMIT_PENDING_TYPED_AGENT_MENTION: string; DISCARD_PENDING_TYPED_AGENT_MENTION: string; SET_PENDING_TYPED_AGENT_MENTION: string; SET_PROVIDER: string; /** * Dispatched by the `setAgentMentionRunStates` action to push the product's run-state * map into plugin state, which drives the run-state node decorations. */ SET_AGENT_RUN_STATES: string; /** * Dispatched from view().update() when async resolveMentionName() resolves * for a pasted agent mention. * Updates lastInsertedAgentMentionName so the nudge shows the correct name. */ RESOLVE_PASTED_AGENT_MENTION_NAME: string; /** * Dispatched from view().update() when async resolveMentionName() resolves * with a non-OK status for a pasted agent mention. * Clears pendingPastedAgentMention so no retry loop occurs. */ CLEAR_PENDING_PASTED_AGENT_MENTION: string; }; interface CreateMentionPlugin { api?: ExtractInjectionAPI<MentionsPlugin>; fireEvent: FireElementsChannelEvent; options?: MentionPluginOptions; pmPluginFactoryParams: PMPluginFactoryParams; } export declare function createMentionPlugin({ pmPluginFactoryParams, fireEvent, options, api, }: CreateMentionPlugin): SafePlugin<MentionPluginState>; export {};