import { Node as PMNode, Schema } from 'prosemirror-model'; import { ReplaceStep, Step, StepMap, StepResult, Mappable } from 'prosemirror-transform'; export declare const stepType = "editor-linking-meta"; export declare const invertStepType = "editor-linking-meta-invert"; export declare type LinkStepMetadata = { /** * Editor action performed */ action?: string; /** * Editor input method that triggered the transaction */ inputMethod?: string; /** * The applicable card action for this step * if is RESOLVE then the undo/redo steps should be considered "updates" of a link */ cardAction?: 'RESOLVE'; /** * Source UI that tiggered this step, if available/applicable */ sourceEvent?: unknown; }; /** * Custom Prosemirror Step to attach metadata about user interactions with links * Using a Step means that it will work with prosemirror-history and we get utilise when * firing events on history change */ export declare class LinkMetaStep extends Step { private pos; private metadata; private isInverted; constructor(pos: number | null, metadata: LinkStepMetadata, isInverted?: boolean); getMetadata(): LinkStepMetadata; /** * Generate new undo/redo analytics event when step is inverted */ invert(): LinkMetaStep; apply(doc: PMNode): StepResult; map(mapping: Mappable): LinkMetaStep; getMap(): StepMap; merge(): null; toJSON(): { stepType: string; from: number; to: number; }; static fromJSON(_: S, __: { [key: string]: any; }): ReplaceStep; }