import { Command } from "../../../undoRedo/Command"; import { Resource } from "../../../undoRedo/dependencies/Resource"; import { ITextField } from "../../_types/ITextField"; import { ITextAlteration } from "./_types/ITextAlteration"; import { ITextEditCommand } from "./_types/ITextEditCommand"; import { ITextEditData } from "./_types/ITextEditData"; import { ITextFieldChangeRetriever } from "./_types/ITextFieldChangeRetriever"; /** A base command that can be used to edit textfields */ export declare class TextEditCommand extends Command implements ITextEditCommand { metadata: { name: string; }; protected readonly dependencies: Resource[]; protected target: ITextField; protected change: ITextFieldChangeRetriever; protected data?: ITextEditData; protected addedText?: string; protected selectionChange: boolean; /** * Creates a new text edit command * @param target The field of which to alter the text * @param change The function to retrieve the new contents of the text field * @param type The type of the command, used for undo/redo merging */ constructor(target: ITextField, change: ITextFieldChangeRetriever, type?: { addedText?: string; isSelectionChange?: boolean; }); /** * Uses the change function to compute the new text and selection for the field */ protected computeChange(): ITextEditData; /** @override */ protected onExecute(): void; /** @override */ protected onRevert(): void; /** @override */ getAddedText(): string | undefined; /** @override */ isSelectionChange(): boolean; /** @override */ getAlterations(): ITextAlteration[]; } /** A standard resource for text editing */ export declare const standardTextResource: Resource; //# sourceMappingURL=TextEditCommand.d.ts.map