feat: [US-061] - Choice option condition variable dropdown

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Gustavo Henrique Santos Souza de Miranda
2026-01-23 10:36:16 -03:00
co-authored by Claude Opus 4.5
parent b6cb0c703a
commit 92d892fb73
4 changed files with 470 additions and 69 deletions
+9 -8
View File
@@ -21,6 +21,14 @@ export type Variable = {
description?: string;
};
// Condition type for conditional edges and choice options
export type Condition = {
variableName: string;
variableId?: string;
operator: '>' | '<' | '==' | '>=' | '<=' | '!=';
value: number | string | boolean;
};
// DialogueNode type: represents character speech/dialogue
export type DialogueNodeData = {
speaker?: string;
@@ -39,6 +47,7 @@ export type DialogueNode = {
export type ChoiceOption = {
id: string;
label: string;
condition?: Condition;
};
// ChoiceNode type: represents branching decisions
@@ -70,14 +79,6 @@ export type VariableNode = {
// Union type for all node types
export type FlowchartNode = DialogueNode | ChoiceNode | VariableNode;
// Condition type for conditional edges
export type Condition = {
variableName: string;
variableId?: string;
operator: '>' | '<' | '==' | '>=' | '<=' | '!=';
value: number | string | boolean;
};
// FlowchartEdge type: represents connections between nodes
export type FlowchartEdge = {
id: string;