Since /edit and /new endpoints now have an `await` inside that could return an error (`getUsersBrewThemes()`), asyncHandler must be added to pass errors along instead of just crashing
`getBrew()` should do one thing only; retrieve a brew. UI elements like the list of themes available to the user are not part of a brew.
Moved into the handers for the `/edit/` and `/new/` endpoints
This removes the existing endpoints and replaces them with /theme.
/theme/:id - return a theme bundle containing all styling from this USER theme and any parents.
/theme/:engine/:id - return a theme bundle containing all styling from this STATIC theme and any parents
The theme bundle returns a marshalled JSON object containing:
styles - an array of strings representing the collected styles in loading order
snippets - an array ( currently empty ) of collected snippets.
The various bits of theme rendering code for <style> an style <link> have been swapped out with an 'onDidMount' call that loads the thendpoint and appends a series of <style> blocks to the brewRender's head.
This loses some caching advantages, but probably won't matter in the long run.
rename `getStaticTheme` to `getStaticThemeCSS`
rename `getBrewThemeWithCSS` to `getBrewThemeCSS`
rename `getBrewThemeParent` to `getBrewThemeParentCSS`
to avoid confusion with other "get" endpoints like `getBrew`, and unify naming for endpoint functions that return CSS.
Simplify `isStaticTheme` function (getting the parent theme is handled elsewhere)
This adds the User Brew themes, where applicible, to the /new path.
This adds a semi-graceful failure to the metadata panel when a Brew Theme is declared as used but is not present.
More gracefully handles loading with themes not present.
and destructure props at start of account page component.
`accountDetails` is more descriptive of what set of info is being passed through props to the account page, info which is only *then* displayed as UI items.
This updates the theme picker to include brews tagged as themes owned by
the user.
Some supporting functions were updated. User themes are loaded on /edit
and added to the request.
When the Homebrewery was first made, editIds and ShareIds only had 10 characters. We later increased this to 12.
However this means some old, old Google Drive links (in the form of `googleId + editId`) were being split incorrectly because they assumed the newer 12-char length, accidentally cutting the last 2 chars from the googleId.