// Gate dimensions and rendering constants export const GATE_W = 100; export const GATE_H = 60; export const PORT_R = 7; export const GATE_COLORS = { AND: '#00e599', OR: '#3388ff', NOT: '#ff6644', NAND: '#e5cc00', NOR: '#cc44ff', XOR: '#ff44aa', INPUT: '#3388ff', CLOCK: '#ff44aa', OUTPUT: '#ff8833' }; export const SIGNAL_COLORS = [ '#00e599', '#3388ff', '#ff6644', '#e5cc00', '#cc44ff', '#ff44aa', '#ff8833', '#44ddff', '#88ff44', '#ff4488', '#44ffaa', '#ffaa44' ]; export function gateInputCount(type) { if (type === 'CLOCK' || type === 'INPUT') return 0; if (type === 'NOT' || type === 'OUTPUT') return 1; return 2; } export function gateOutputCount(type) { return type === 'OUTPUT' ? 0 : 1; }