ssr-emotion-react 1.0.0-beta.2 → 1.0.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -56,9 +56,8 @@ While developing [Potate](https://github.com/uniho/potate), I discovered a way t
56
56
 
57
57
  * **Zero Runtime by default:** No `Emotion` library is shipped to the browser. It delivers a pure Zero-JS experience.
58
58
  * **Familiar DX:** Use the full expressive power of the [Emotion `css()` function](https://emotion.sh/docs/@emotion/css) that you already know.
59
- * **No Hydration Mismatch:** By adopting the Potate-born "Full DOM Replacement" strategy, it physically eliminates the dreaded React hydration errors.
60
- * **Static by Default:** Styles are automatically extracted into static CSS during the Astro build process.
61
- * **Performance:** No hydration overhead for styles and no Flash of Unstyled Content (FOUC).
59
+ * **Decoupled Asset Delivery:** Styles are moved to separate `.css` files to allow for flexible cache strategies. By using unique filenames (cache busting), we ensure that updates are immediately reflected even when long-term caching is enabled on the server.
60
+ * **Hydration Stability:** No overhead for style re-calculation. Interactive Islands remain stable and fully dynamic without visual flickering during the hydration process.
62
61
 
63
62
 
64
63
  ## 🛠 How it looks
@@ -235,7 +234,7 @@ export const styled = (Tag, options) => (style, ...values) => props => {
235
234
  const makeClassName = (style, ...values) =>
236
235
  typeof style == 'function' ? makeClassName(style(props)) : css(style, ...values);
237
236
 
238
- const {sx, 'class': _class, children, ...wosx} = props;
237
+ const {sx, className, 'class': _class, children, ...wosx} = props;
239
238
 
240
239
  Object.keys(wosx).forEach(key => {
241
240
  if (options && options.shouldForwardProp && !options.shouldForwardProp(key)) {
@@ -245,7 +244,7 @@ export const styled = (Tag, options) => (style, ...values) => props => {
245
244
 
246
245
  const newProps = {
247
246
  ...wosx,
248
- 'class': cx(makeClassName(style, ...values), makeClassName(sx), _class),
247
+ className: cx(makeClassName(style, ...values), makeClassName(sx), _class, className),
249
248
  };
250
249
 
251
250
  return (<Tag {...newProps}>{children}</Tag>);