feat(tools): add brush raster painting

This commit is contained in:
syntaxbullet
2026-07-03 17:37:43 +02:00
parent 665f4a5340
commit 9fc0c18114
11 changed files with 188 additions and 9 deletions

View File

@@ -18,6 +18,7 @@ import {
documentSetLayerClippingMaskCommand,
documentSetLayerLockedCommand,
documentSetLayerVisibleCommand,
documentUpdateAssetSourceCommand,
documentUngroupLayerCommand,
} from "./document";
@@ -52,6 +53,17 @@ describe("document commands", () => {
]);
});
test("updates asset sources", () => {
const state = documentAddAssetCommand.execute(
{ state: createInitialAppState("Test") },
{ asset: { id: "asset-1", name: "Image", mimeType: "image/png", source: "old", intrinsicSize: { w: 100, h: 50 } } },
);
const next = documentUpdateAssetSourceCommand.execute({ state }, { assetId: "asset-1", source: "new" });
expect(next.document.assets[0]?.source).toBe("new");
});
test("adds image layers to artboards", () => {
const state = documentAddArtboardCommand.execute(
{ state: createInitialAppState("Test") },