Files
lemonspace_app/lib/canvas-node-templates.ts
Matthias f3c5c2d8f1 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.
2026-04-02 11:39:05 +02:00

107 lines
1.8 KiB
TypeScript

export const CANVAS_NODE_TEMPLATES = [
{
type: "image",
label: "Bild",
width: 280,
height: 180,
defaultData: {},
},
{
type: "text",
label: "Text",
width: 256,
height: 120,
defaultData: { content: "" },
},
{
type: "prompt",
label: "Prompt",
width: 320,
height: 220,
defaultData: { prompt: "", model: "", aspectRatio: "1:1" },
},
{
type: "note",
label: "Notiz",
width: 220,
height: 120,
defaultData: { content: "" },
},
{
type: "frame",
label: "Frame",
width: 360,
height: 240,
defaultData: { label: "Untitled", exportWidth: 1080, exportHeight: 1080 },
},
{
type: "compare",
label: "Vergleich",
width: 500,
height: 380,
defaultData: {},
},
{
type: "group",
label: "Gruppe",
width: 400,
height: 300,
defaultData: { label: "Gruppe" },
},
{
type: "asset",
label: "Asset (Stock)",
width: 260,
height: 240,
defaultData: {},
},
{
type: "video",
label: "Video",
width: 320,
height: 180,
defaultData: {},
},
{
type: "curves",
label: "Kurven",
width: 280,
height: 460,
defaultData: {},
},
{
type: "color-adjust",
label: "Farbe",
width: 280,
height: 560,
defaultData: {},
},
{
type: "light-adjust",
label: "Licht",
width: 280,
height: 620,
defaultData: {},
},
{
type: "detail-adjust",
label: "Detail",
width: 280,
height: 620,
defaultData: {},
},
{
type: "render",
label: "Render",
width: 300,
height: 420,
defaultData: {
outputResolution: "original",
format: "png",
jpegQuality: 90,
},
},
] as const;
export type CanvasNodeTemplate = (typeof CANVAS_NODE_TEMPLATES)[number];