30 lines
670 B
TypeScript
30 lines
670 B
TypeScript
import type { ImageDocument } from "@core/document";
|
|
import type { Angle, Size, Vec2D } from "@core/geometry";
|
|
import type { ArtboardId, LayerId } from "@core/id";
|
|
import type { ToolState } from "./tools";
|
|
import type { TransformSession } from "./transform";
|
|
|
|
export type ViewportState = {
|
|
center: Vec2D;
|
|
zoom: number;
|
|
rotation: Angle;
|
|
size: Size;
|
|
};
|
|
|
|
export type SelectionState = {
|
|
artboardId?: ArtboardId;
|
|
layerIds: LayerId[];
|
|
};
|
|
|
|
export type EditorState = {
|
|
viewport: ViewportState;
|
|
selection: SelectionState;
|
|
tools: ToolState;
|
|
transformSession?: TransformSession;
|
|
};
|
|
|
|
export type AppState = {
|
|
document: ImageDocument;
|
|
editor: EditorState;
|
|
};
|