Enhance canvas functionality with new node types and validation

- Added support for new canvas node types: curves, color-adjust, light-adjust, detail-adjust, and render.
- Implemented validation for adjustment nodes to restrict incoming edges to one.
- Updated canvas connection validation to improve user feedback on invalid connections.
- Enhanced node creation and rendering logic to accommodate new node types and their properties.
- Refactored related components and utilities for better maintainability and performance.
This commit is contained in:
Matthias
2026-04-02 11:39:05 +02:00
parent 9bab9bb93d
commit f3c5c2d8f1
52 changed files with 5755 additions and 44 deletions

View File

@@ -3,11 +3,15 @@
import {
FolderOpen,
Frame,
Focus,
GitCompare,
ImageDown,
Image,
Package,
Palette,
Sparkles,
StickyNote,
Sun,
Type,
Video,
type LucideIcon,
@@ -29,6 +33,11 @@ const NODE_ICONS: Record<CanvasNodeTemplate["type"], LucideIcon> = {
group: FolderOpen,
asset: Package,
video: Video,
curves: Sparkles,
"color-adjust": Palette,
"light-adjust": Sun,
"detail-adjust": Focus,
render: ImageDown,
};
const NODE_SEARCH_KEYWORDS: Partial<
@@ -43,6 +52,11 @@ const NODE_SEARCH_KEYWORDS: Partial<
group: ["group", "gruppe", "folder"],
asset: ["asset", "freepik", "stock"],
video: ["video", "pexels", "clip"],
curves: ["curves", "tone", "contrast"],
"color-adjust": ["color", "hue", "saturation"],
"light-adjust": ["light", "exposure", "brightness"],
"detail-adjust": ["detail", "sharp", "grain"],
render: ["render", "export", "download"],
};
export type CanvasNodeTemplatePickerProps = {