UNPKG

1.13 kBTypeScriptView Raw
1import { Node as PMNode } from 'prosemirror-model';
2import { Mappable, ReplaceStep, Step, StepMap, StepResult } from 'prosemirror-transform';
3export declare const insertTypeAheadStepType = "atlaskit-insert-type-ahead";
4export declare enum InsertTypeAheadStages {
5 DELETING_RAW_QUERY = "DELETING_RAW_QUERY",
6 INSERTING_ITEM = "INSERTING_ITEM"
7}
8declare type Config = {
9 selectedIndex: number;
10 stage: InsertTypeAheadStages;
11 query: string;
12 trigger: string;
13};
14export declare class InsertTypeAheadStep extends Step {
15 private isInvertStep;
16 selectedIndex: number;
17 stage: InsertTypeAheadStages;
18 query: string;
19 trigger: string;
20 constructor({ stage, query, trigger, selectedIndex }: Config, isInvertStep?: boolean);
21 invert(): InsertTypeAheadStep;
22 apply(doc: PMNode): StepResult<any>;
23 merge(): null;
24 isInsertionStep(): boolean;
25 isUndoingStep(): boolean;
26 map(mapping: Mappable): InsertTypeAheadStep;
27 getMap(): StepMap;
28 toJSON(): {
29 stepType: string;
30 from: number;
31 to: number;
32 };
33 static fromJSON(): ReplaceStep<any>;
34}
35export {};