UNPKG

@atlaskit/editor-plugin-status

Version:

Status plugin for @atlaskit/editor-core

21 lines (20 loc) 1.9 kB
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics'; import { INPUT_METHOD } from '@atlaskit/editor-common/analytics'; import type { Command, CommandDispatch, EditorCommand, TOOLBAR_MENU_TYPE } from '@atlaskit/editor-common/types'; import { type Mark } from '@atlaskit/editor-prosemirror/model'; import type { Node } from '@atlaskit/editor-prosemirror/model'; import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state'; import type { EditorView } from '@atlaskit/editor-prosemirror/view'; import type { ClosingPayload, StatusType } from '../types'; export declare const DEFAULT_STATUS: StatusType; export declare const DEFAULT_STATUS_NEW: StatusType; export declare const verifyAndInsertStatus: (statusNode: Node, tr: Transaction, annotationMarks?: Mark[] | undefined) => Transaction; export declare const createStatus: (tr: Transaction) => Transaction; export declare const insertStatus: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod?: INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR) => EditorCommand; export declare const updateStatus: (status?: StatusType) => Command; export type UpdateStatus = (inputMethod: TOOLBAR_MENU_TYPE, status?: StatusType) => Command; export declare const updateStatusWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod: TOOLBAR_MENU_TYPE, status?: StatusType) => Command; export declare const setStatusPickerAt: (showStatusPickerAt: number | null) => (state: EditorState, dispatch: (tr: Transaction) => void) => boolean; export declare const removeStatus: (showStatusPickerAt: number) => EditorCommand; export declare const setFocusOnStatusInput: () => (state: EditorState, dispatch: CommandDispatch | undefined) => boolean; export declare const commitStatusPicker: (closingPayload?: ClosingPayload) => (editorView: EditorView) => void;