refactor(transform): resolve target bounds

This commit is contained in:
syntaxbullet
2026-07-03 16:12:26 +02:00
parent ff5bb43382
commit a3b4a4a1b0
8 changed files with 151 additions and 39 deletions

View File

@@ -1,12 +1,17 @@
import type { Rect, Vec2D } from "@core/geometry";
import type { ArtboardId } from "@core/id";
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;
};
export type TransformTarget =
| {
type: "artboard";
id: ArtboardId;
}
| {
type: "layer";
id: LayerId;
};
export type TransformSession = {
target: TransformTarget;