Allow access to metadata outside of render and resolveData
Description
Currently data passed to puck in the metadata object is only available within render and resolveData functions. It would be useful if this was available in the puck context through usePuck() so it can be used elsewhere like in the header override for example.
Considerations
The same data could be passed through custom context but since metadata already exists, surely it would make sense that this data can be accessed in the puck context as well.
Proposals
Proposal 1
Make metadata available within the usePuck hook
Somewhat related to https://github.com/puckeditor/puck/issues/1365
Hey @1benw!
Interesting! I do wonder if it might be better to provide a separate prop for this, since metadata, at least to me, feels tied to the Puck data and is also passed to the Render component. That could make people think they can use usePuck within it.
Just to make sure I understand the need: you're basically looking for a way to quickly provide your own context values to the Editor, right?
Yes the use case was the data to be available and used in the editor, specifically in overrides like the header so having the data in the override props could also be an option.