22 lines
472 B
TypeScript
22 lines
472 B
TypeScript
import type { Rect, Vec2D } from "@core/geometry";
|
|
import type { ArtboardId, LayerId } from "@core/id";
|
|
|
|
export type TransformHandle = "body" | "n" | "ne" | "e" | "se" | "s" | "sw" | "w" | "nw";
|
|
|
|
export type TransformTarget =
|
|
| {
|
|
type: "artboard";
|
|
id: ArtboardId;
|
|
}
|
|
| {
|
|
type: "layer";
|
|
id: LayerId;
|
|
};
|
|
|
|
export type TransformSession = {
|
|
target: TransformTarget;
|
|
handle: TransformHandle;
|
|
startPoint: Vec2D;
|
|
initialBounds: Rect;
|
|
};
|