UNPKG

@atlaskit/adf-schema

Version:

Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs

36 lines (35 loc) 1.11 kB
import { Node as PMNode } from '@atlaskit/editor-prosemirror/model'; import { ReplaceStep, Step, StepMap, StepResult } from '@atlaskit/editor-prosemirror/transform'; export declare const insertTypeAheadStepType = "atlaskit-insert-type-ahead"; export declare enum InsertTypeAheadStages { DELETING_RAW_QUERY = "DELETING_RAW_QUERY", INSERTING_ITEM = "INSERTING_ITEM" } type Config = { selectedIndex: number; stage: InsertTypeAheadStages; query: string; trigger: string; }; export declare class InsertTypeAheadStep extends Step { private isInvertStep; selectedIndex: number; stage: InsertTypeAheadStages; query: string; trigger: string; constructor({ stage, query, trigger, selectedIndex }: Config, isInvertStep?: boolean); invert(): InsertTypeAheadStep; apply(doc: PMNode): StepResult; merge(): null; isInsertionStep(): boolean; isUndoingStep(): boolean; map(): InsertTypeAheadStep; getMap(): StepMap; toJSON(): { stepType: string; from: number; to: number; }; static fromJSON(): ReplaceStep; } export {};