use real API for diagram, expose hooks for mousedown and tooltip