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

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,10 +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).
62
-
59
+ * **Static CSS Assets with Cache Busting:** All styles are extracted into static `.css` files with random-hash filenames, ensuring maximum delivery speed via browser caching.
60
+ * **Pure Performance:** No Emotion library or hydration overhead is shipped for static regions. You get a zero-JS experience by default, while interactive Islands remain fully dynamic without flickering.
63
61
 
64
62
  ## 🛠 How it looks
65
63
 
@@ -235,7 +233,7 @@ export const styled = (Tag, options) => (style, ...values) => props => {
235
233
  const makeClassName = (style, ...values) =>
236
234
  typeof style == 'function' ? makeClassName(style(props)) : css(style, ...values);
237
235
 
238
- const {sx, 'class': _class, children, ...wosx} = props;
236
+ const {sx, className, 'class': _class, children, ...wosx} = props;
239
237
 
240
238
  Object.keys(wosx).forEach(key => {
241
239
  if (options && options.shouldForwardProp && !options.shouldForwardProp(key)) {
@@ -245,7 +243,7 @@ export const styled = (Tag, options) => (style, ...values) => props => {
245
243
 
246
244
  const newProps = {
247
245
  ...wosx,
248
- 'class': cx(makeClassName(style, ...values), makeClassName(sx), _class),
246
+ className: cx(makeClassName(style, ...values), makeClassName(sx), _class, className),
249
247
  };
250
248
 
251
249
  return (<Tag {...newProps}>{children}</Tag>);