feat: enhance canvas functionality with new node types and improved data handling

- Added support for a new "compare" node type to facilitate side-by-side image comparisons.
- Updated AI image and prompt nodes to include aspect ratio handling for better image generation.
- Enhanced canvas toolbar to include export functionality for canvas data.
- Improved data resolution for compare nodes by resolving incoming edges and updating node data accordingly.
- Refactored frame node to support dynamic resizing and exporting capabilities.
- Introduced debounced saving for prompt node to optimize performance during user input.
This commit is contained in:
Matthias
2026-03-25 21:33:22 +01:00
parent fffdae3a9c
commit da6529f263
19 changed files with 1801 additions and 122 deletions

View File

@@ -49,8 +49,9 @@ export const NODE_DEFAULTS: Record<
> = {
image: { width: 280, height: 200, data: {} },
text: { width: 256, height: 120, data: { content: "" } },
prompt: { width: 288, height: 140, data: { prompt: "" } },
"ai-image": { width: 280, height: 220, data: {} },
prompt: { width: 288, height: 220, data: { prompt: "", aspectRatio: "1:1" } },
// 1:1 viewport 320 + chrome 88 ≈ äußere Höhe (siehe lib/image-formats.ts)
"ai-image": { width: 320, height: 408, data: {} },
group: { width: 400, height: 300, data: { label: "Gruppe" } },
frame: {
width: 400,
@@ -58,5 +59,5 @@ export const NODE_DEFAULTS: Record<
data: { label: "Frame", resolution: "1080x1080" },
},
note: { width: 208, height: 100, data: { content: "" } },
compare: { width: 500, height: 220, data: {} },
compare: { width: 500, height: 380, data: {} },
};