Derived character maps of Lie representations and Chern--Simons forms