This PR changes the behavior of the randomize buttons for both ColorPicker and StonePicker:
Clicking the randomize button results, in an animation that gets previewed at each picker
Only on animation end (onRest) the changes get propagated to app state -> the SVGPreview gets thus updated only when the animation is done
At code level this PR also refactors and consolidates hook code:
Leave the original useDragRotate hook unchanged
Create a new useRotateAnimate hook that handles only animation
Create a hook called useDragRotateAnimate that coordinates the two above mentioned hooks, and provides a transparent api that is used by both StonePicker and ColorPicker
This PR changes the behavior of the randomize buttons for both ColorPicker and StonePicker:
At code level this PR also refactors and consolidates hook code: