import { Handle, type NodeProps, Position, type Node, } from '@xyflow/react'; import { Toolbar } from '../components/NodeComponents'; import styles from '../../VisProg.module.css'; export type StartNodeData = { label: string; droppable: boolean; hasReduce: boolean; }; export type StartNode = Node export default function StartNode(props: NodeProps) { return ( <>
Start
); } export function StartReduce(node: Node, nodes: Node[]) { // Replace this for nodes functionality if (nodes.length <= -1) { console.warn("Impossible nodes length in StartReduce") } return { id: node.id } } export function StartConnects(thisNode: Node, otherNode: Node, isThisSource: boolean) { // Replace this for connection logic if (thisNode == undefined && otherNode == undefined && isThisSource == false) { console.warn("Impossible node connection called in EndConnects") } }