Skip to content

Commit 4ec6d32

Browse files
add preview actions
1 parent 544c956 commit 4ec6d32

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

editor/core/actions/index.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { FrameworkConfig } from "@designto/config";
2-
import type { EditorState } from "core/states";
2+
import type { EditorState, ScenePreviewData } from "core/states";
33

44
export type WorkspaceAction =
55
//
@@ -19,6 +19,7 @@ export type Action =
1919
| SelectNodeAction
2020
| HighlightLayerAction
2121
| CanvasModeAction
22+
| PreviewAction
2223
| CodeEditorAction;
2324

2425
export type ActionType = Action["type"];
@@ -52,6 +53,18 @@ export interface CanvasModeGobackAction {
5253
fallback?: EditorState["canvasMode"];
5354
}
5455

56+
export type PreviewAction = PreviewSetAction | PreviewBuildingStateUpdateAction;
57+
58+
export interface PreviewSetAction {
59+
type: "preview-set";
60+
data: ScenePreviewData;
61+
}
62+
63+
export interface PreviewBuildingStateUpdateAction {
64+
type: "preview-update-building-state";
65+
isBuilding: boolean;
66+
}
67+
5568
export type CodeEditorAction = CodeEditorEditComponentCodeAction;
5669

5770
export interface CodeEditorEditComponentCodeAction {

0 commit comments

Comments
 (0)