feat: implement chroma key operation and related keybinds, update workspace panel management
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
export type { AppState, EditorState, SelectionState, ViewportState } from "./state";
|
||||
export type { BrushSettings, ChromaKeySettings, MagicWandSettings, InteractionMode, ToolId, ToolState } from "./tools";
|
||||
export type { BrushSettings, ChromaKeySettings, MagicWandSettings, InteractionMode, OperationId, ToolId, ToolState } from "./tools";
|
||||
export { initialToolState } from "./tools";
|
||||
export { createInitialAppState, initialEditorState } from "./initial-state";
|
||||
export type { AppStore, StateListener } from "./store";
|
||||
|
||||
@@ -26,7 +26,6 @@ export const initialEditorState: EditorState = {
|
||||
},
|
||||
workspace: {
|
||||
panel: "none",
|
||||
previousNonGenerateTool: "select",
|
||||
},
|
||||
transformSession: undefined,
|
||||
maskEdit: undefined,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { ImageDocument } from "@core/document";
|
||||
import type { Angle, Rect, Size, Transform, Vec2D } from "@core/geometry";
|
||||
import type { ArtboardId, AssetId, GenerationCandidateId, GenerationJobId, LayerId } from "@core/id";
|
||||
import type { GenerateArchitecture, GenerateMode, GenerateSettings, ToolId, ToolState } from "./tools";
|
||||
import type { GenerateArchitecture, GenerateMode, GenerateSettings, ToolState } from "./tools";
|
||||
import type { TransformSession } from "./transform";
|
||||
|
||||
export type ViewportState = {
|
||||
@@ -127,11 +127,10 @@ export type CommandPaletteState = {
|
||||
selectedIndex: number;
|
||||
};
|
||||
|
||||
export type WorkspacePanel = "none" | "generate" | "layers";
|
||||
export type WorkspacePanel = "none" | "generate" | "chromaKey" | "layers";
|
||||
|
||||
export type WorkspaceState = {
|
||||
panel: WorkspacePanel;
|
||||
previousNonGenerateTool: ToolId;
|
||||
};
|
||||
|
||||
export type EditorState = {
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
export const availableToolIds = ["select", "generate", "brush", "eraser", "chromaKey", "magicWand", "pan"] as const;
|
||||
export const availableToolIds = ["select", "brush", "eraser", "magicWand", "pan"] as const;
|
||||
|
||||
export const availableOperationIds = ["generate", "chromaKey"] as const;
|
||||
|
||||
export type ToolId = (typeof availableToolIds)[number];
|
||||
export type OperationId = (typeof availableOperationIds)[number];
|
||||
|
||||
export type InteractionMode =
|
||||
| { type: "tool"; tool: ToolId }
|
||||
|
||||
Reference in New Issue
Block a user