perf(history): batch transform drag undo
This commit is contained in:
@@ -4,8 +4,14 @@ export type CommandContext = {
|
||||
state: AppState;
|
||||
};
|
||||
|
||||
export type CommandHistoryPolicy =
|
||||
| { mode: "auto" }
|
||||
| { mode: "ignore" }
|
||||
| { mode: "deferred"; phase: "begin" | "update" | "commit" };
|
||||
|
||||
export type Command<TPayload = void> = {
|
||||
id: string;
|
||||
name: string;
|
||||
history?: CommandHistoryPolicy;
|
||||
execute(context: CommandContext, payload: TPayload): AppState;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user