import type { Action } from "sprotty-protocol"; import type { CommandExecutionContext, CommandReturn } from "sprotty"; import { Command } from "sprotty"; /** * Different types of resize cursers which can be fixed during a move transaction */ export type ResizeMoveCursor = `cursor-resize-${number}`; /** * Different types of cursers which can be fixed during a move transaction */ export type Cursor = `cursor-${"move" | "grab" | "grabbing" | "crosshair"}` | ResizeMoveCursor; /** * Provider for the current move cursor */ export declare class CursorProvider { /** * The cursor which should be displayed due to the currently selected tool. * If undefined, no specific cursor should be enforced on the root level */ toolCursor?: Cursor; /** * The cursor which should be displayed due to the current move operation. * Overwrites the tool cursor if set. */ moveCursor?: Cursor; } /** * Action to update the move/tool cursor */ export interface UpdateCursorAction extends Action { kind: typeof UpdateCursorAction.KIND; /** * The new tool cursor * If null, the tool cursor is unset */ toolCursor?: Cursor | null; /** * The new move cursor * If null, the move cursor is unset */ moveCursor?: Cursor | null; } export declare namespace UpdateCursorAction { /** * Kind of UpdateCursorAction */ const KIND = "updateCursor"; } /** * Command for UpdateCursorAction */ export declare class UpdateCursorCommand extends Command { static readonly KIND = "updateCursor"; /** * The action to execute */ private action; /** * The move cursor provider */ private moveCursorProvider; execute(context: CommandExecutionContext): CommandReturn; undo(_context: CommandExecutionContext): CommandReturn; redo(_context: CommandExecutionContext): CommandReturn; } //# sourceMappingURL=cursor.d.ts.map