1
0
Fork 0
polaris-task-force/src/components/admin/narrative-flow/SequenceNode.tsx
Z8MB1E 06fb1ede75 feat: new blueprint node types for data flow and logic
New node types:
- GameData: reads runtime state (structure health, deliveries, resources, etc.)
- Flag: read/write persistent flags by name
- Compare: A [op] B → boolean (>, <, ==, !=, >=, <=)
- Math: A [op] B → number (+, -, *, /)
- Format: template string with {0}, {1} placeholders → string
- Logic: A [op] B → boolean (AND, OR, XOR)
- NOT: boolean → inverted boolean
- Branch: flow in + boolean condition → true/false flow out
- Sequence: flow in → 3 flow outs (executes in order)

Toolbar updated with categorized buttons (Story, Data, Logic).
MiniMap color-coded for all 18 node types.
NodeEditDialog handles all new types with operator/field selectors.
2026-07-28 18:16:20 -04:00

24 lines
823 B
TypeScript

"use client";
import { type NodeProps } from "@xyflow/react";
import { ListOrderedIcon } from "lucide-react";
import { NodeHandles } from "./NodeHandles";
export function SequenceNode(_props: NodeProps) {
return (
<div className="bg-fuchsia-950/80 border border-fuchsia-500/50 rounded-lg shadow-md min-w-32">
<NodeHandles nodeType="sequence" />
<div className="flex items-center gap-2 px-3 py-2 border-b border-fuchsia-500/30">
<ListOrderedIcon className="size-4 text-fuchsia-400 shrink-0" />
<span className="text-sm font-medium text-fuchsia-200 flex-1">
Sequence
</span>
</div>
<div className="px-3 py-2 flex justify-between text-xs text-fuchsia-300/80">
<span>1</span>
<span>2</span>
<span>3</span>
</div>
</div>
);
}