Ultrafast visualization of phase transitions in nonequilibrium warm dense matter