feat(editor): add transient app state foundation
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import type { ImageDocument } from "@core/document";
|
||||
import type { AppState } from "@editor/state";
|
||||
|
||||
export type CommandContext = {
|
||||
document: ImageDocument;
|
||||
state: AppState;
|
||||
};
|
||||
|
||||
export type Command<TPayload = void> = {
|
||||
id: string;
|
||||
name: string;
|
||||
execute(context: CommandContext, payload: TPayload): ImageDocument;
|
||||
execute(context: CommandContext, payload: TPayload): AppState;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user