The following changes were made in version 1.0.0 of Thunderous:
Added SSR support using onServerDefine() and insertTemplates().
This also prompted clientOnlyCallback() to handle code that would throw errors in a
server environment.
Read more about server-side rendering.
Added the
scoped custom element registry polyfill
directly to the library, instead of relying on a peer dependency.
This was done to ensure that the polyfill does not
interfere with server-side rendering . The polyfill is only loaded when the library is imported in a browser environment.
Updated the methods returned by createRegistry().
Previously, RegistryResult exposed a register() method that was mostly
unnecessary (and undocumented.) This method has been removed, and the return type now only exposes a
define() method to better reflect the native behavior of custom elements.
Read more about registries.
Added support for
ElementDefinitionOptions
in ElementResult.define(). This is also reflected in the new
RegistryResult.define() method.
The html and css template tags no longer stringify all interpolated
values. If a non-primitive is found, an error is logged to the console, and the value is replaced by an
empty string.
This change should help sniff out bugs in your code, as it's likely that you didn't intend to pass a
non-primitive value to the template tag. This may happen when you forget to destructure a signal, for
example.
Removed the DOMPurify dependency.
A bug was preventing it from working properly, and upon fixing it, custom elements and slot tags were being
stripped from the DOM. While not impossible to fix, it may not have been the best approach anyway, as
sanitization is only necessary when rendering user-generated content.
It was determined that the concern should instead lie with the component author, as is normally the case for
native web components.