The Draft react component would load the snippets that are part of our
plugin bundle. However, any additional snippets that are created by
plugins would not not get added to the `defs` section, and thus not
be rendered.
This changes the behavior by doing two things:
- in `core` it adds an SVG object to the renderProps, and makes
sure to run the `preRender` hook on this SVG object prior to
returning the renderProps. This way, svg.defs now holds all
defs, including any that may have been added by custom plugins
- in the `Draft` component, we no longer add a list of predefined
snippets to the defs section, but instead just use the svg.defs
section verbatim. This removes any discrepancies in how SVG
rendering and React rendering handles the defs section of the
SVG document, and thus displays snippets.
Plugins can pass a configuration object (or any
sort of data) when loaded with `pattern.use()`.
We use to set that parameter to `false` when loading, but
now we leave it `undefined`. This makes is easy for plugins
to use a default parameter for the configuration/data passed
to it.