[FEATURE] Perspective - Add Dock open and close event handlers

Please add event handlers for when a dock is “opened” (shown) and “closed” (hidden).

I’m trying to open a different header dock based on the size of the screen as I want the smaller screen dock to have a shorter height, but I can’t do this without the dock actually known if it’s open or closed. I’ve tried with manual flags, but some page changes automatically close onDemand docks which I have no control over like the menu component.