feat(editor): add tool interaction state

This commit is contained in:
syntaxbullet
2026-07-03 10:10:50 +02:00
parent ac2a156a1f
commit c23efeb397
4 changed files with 21 additions and 0 deletions

15
editor/tools.ts Normal file
View File

@@ -0,0 +1,15 @@
export type ToolId = "select" | "pan";
export type InteractionMode =
| { type: "tool"; tool: ToolId }
| { type: "temporary-pan"; previousTool: ToolId };
export type ToolState = {
activeTool: ToolId;
interactionMode: InteractionMode;
};
export const initialToolState: ToolState = {
activeTool: "select",
interactionMode: { type: "tool", tool: "select" },
};