@atlaskit/adf-schema
Version:
Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs
36 lines (35 loc) • 1.13 kB
TypeScript
import { Node as PMNode } from 'prosemirror-model';
import { Mappable, ReplaceStep, Step, StepMap, StepResult } from 'prosemirror-transform';
export declare const insertTypeAheadStepType = "atlaskit-insert-type-ahead";
export declare enum InsertTypeAheadStages {
DELETING_RAW_QUERY = "DELETING_RAW_QUERY",
INSERTING_ITEM = "INSERTING_ITEM"
}
declare 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<any>;
merge(): null;
isInsertionStep(): boolean;
isUndoingStep(): boolean;
map(mapping: Mappable): InsertTypeAheadStep;
getMap(): StepMap;
toJSON(): {
stepType: string;
from: number;
to: number;
};
static fromJSON(): ReplaceStep<any>;
}
export {};