Browse Source

fix(42-02): add easeCurve to dimension records and validation defaults

- Add easeCurve (340x480) to WorkflowCanvas keyboard shortcut dimensions
- Add easeCurve (340x480) to quickstart validation DEFAULT_DIMENSIONS
- Add easeCurve case to createDefaultNodeData switch (fixes exhaustive return)
- Required for NodeType union exhaustiveness after adding easeCurve type

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
handoff-20260429-1057
shrimbly 5 months ago
parent
commit
0d54078bab
  1. 1
      src/components/WorkflowCanvas.tsx
  2. 12
      src/lib/quickstart/validation.ts

1
src/components/WorkflowCanvas.tsx

@ -982,6 +982,7 @@ export function WorkflowCanvas() {
outputGallery: { width: 320, height: 360 },
imageCompare: { width: 400, height: 360 },
videoStitch: { width: 400, height: 280 },
easeCurve: { width: 340, height: 480 },
};
const dims = defaultDimensions[nodeType];
addNode(nodeType, { x: centerX - dims.width / 2, y: centerY - dims.height / 2 });

12
src/lib/quickstart/validation.ts

@ -39,6 +39,7 @@ const DEFAULT_DIMENSIONS: Record<NodeType, { width: number; height: number }> =
outputGallery: { width: 320, height: 360 },
imageCompare: { width: 400, height: 360 },
videoStitch: { width: 400, height: 280 },
easeCurve: { width: 340, height: 480 },
};
/**
@ -301,6 +302,17 @@ function createDefaultNodeData(type: NodeType): WorkflowNodeData {
progress: 0,
encoderSupported: null,
};
case "easeCurve":
return {
bezierHandles: [0.445, 0.05, 0.55, 0.95] as [number, number, number, number],
easingPreset: "easeInOutSine",
outputDuration: 1.5,
outputVideo: null,
status: "idle",
error: null,
progress: 0,
encoderSupported: null,
};
}
}

Loading…
Cancel
Save