Browse Source
Create models.ts with AspectRatio, Resolution, ModelType. Create workflow.ts with WorkflowEdge, WorkflowEdgeData, WorkflowSaveConfig, WorkflowCostData, NodeGroup, GroupColor. Update nodes.ts to import from domain files instead of index.ts to avoid circular dependencies. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>handoff-20260429-1057
3 changed files with 79 additions and 9 deletions
@ -0,0 +1,25 @@ |
|||
/** |
|||
* Model Types |
|||
* |
|||
* Types for image generation model configuration including |
|||
* aspect ratios, resolutions, and model identifiers. |
|||
*/ |
|||
|
|||
// Aspect Ratios (supported by both Nano Banana and Nano Banana Pro)
|
|||
export type AspectRatio = |
|||
| "1:1" |
|||
| "2:3" |
|||
| "3:2" |
|||
| "3:4" |
|||
| "4:3" |
|||
| "4:5" |
|||
| "5:4" |
|||
| "9:16" |
|||
| "16:9" |
|||
| "21:9"; |
|||
|
|||
// Resolution Options (only supported by Nano Banana Pro)
|
|||
export type Resolution = "1K" | "2K" | "4K"; |
|||
|
|||
// Image Generation Model Options
|
|||
export type ModelType = "nano-banana" | "nano-banana-pro"; |
|||
@ -0,0 +1,51 @@ |
|||
/** |
|||
* Workflow Types |
|||
* |
|||
* Types for workflow management including edges, save configuration, |
|||
* cost tracking, and node groups. |
|||
*/ |
|||
|
|||
import { Edge } from "@xyflow/react"; |
|||
|
|||
// Workflow Edge Data
|
|||
export interface WorkflowEdgeData extends Record<string, unknown> { |
|||
hasPause?: boolean; |
|||
} |
|||
|
|||
// Workflow Edge
|
|||
export type WorkflowEdge = Edge<WorkflowEdgeData>; |
|||
|
|||
// Auto-save configuration stored in localStorage
|
|||
export interface WorkflowSaveConfig { |
|||
workflowId: string; |
|||
name: string; |
|||
directoryPath: string; |
|||
generationsPath: string | null; |
|||
lastSavedAt: number | null; |
|||
} |
|||
|
|||
// Cost tracking data stored per-workflow in localStorage
|
|||
export interface WorkflowCostData { |
|||
workflowId: string; |
|||
incurredCost: number; |
|||
lastUpdated: number; |
|||
} |
|||
|
|||
// Group background color options (dark mode tints)
|
|||
export type GroupColor = |
|||
| "neutral" |
|||
| "blue" |
|||
| "green" |
|||
| "purple" |
|||
| "orange" |
|||
| "red"; |
|||
|
|||
// Group definition stored in workflow
|
|||
export interface NodeGroup { |
|||
id: string; |
|||
name: string; |
|||
color: GroupColor; |
|||
position: { x: number; y: number }; |
|||
size: { width: number; height: number }; |
|||
locked?: boolean; |
|||
} |
|||
Loading…
Reference in new issue