@nersh/render 0.2.5 → 0.3.0
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 +7 -0
- package/dist/index.cjs +14032 -6611
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +364 -247
- package/dist/index.d.ts +364 -247
- package/dist/index.mjs +14379 -6944
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -94,6 +94,12 @@ Without this, styles from the render package will not appear.
|
|
|
94
94
|
|
|
95
95
|
---
|
|
96
96
|
|
|
97
|
+
## Node styles
|
|
98
|
+
|
|
99
|
+
A node in `site.json` may carry `styles`: CSS per breakpoint, keyed `desktop`, `tablet` (below 64rem) and `phone` (below 48rem), each a map of CSS longhands to values (`{ "desktop": { "min-height": "100vh" }, "phone": { "min-height": "80vh" } }`). `SiteRenderer` writes one scoped `<style data-node-styles>` with container queries against the surface, the same stylesheet the hosted site writes, and stamps `data-section` and `data-instance` on a nested wrapper only when that node declares styles. A site with no `styles` renders what 0.2.5 rendered; the surface stylesheet only loses two type rules (`data-text-color`, `data-text-align`) that no exported node ever set.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
97
103
|
## `SiteRenderer` props
|
|
98
104
|
|
|
99
105
|
| Prop | Type | Description |
|
|
@@ -126,4 +132,5 @@ A skin's dark values ship under a `.dark` class selector, the shadcn convention:
|
|
|
126
132
|
|
|
127
133
|
## Changelog
|
|
128
134
|
|
|
135
|
+
- 0.3.0: renders node `styles` (per-breakpoint CSS on any node) as one scoped stylesheet; unstyled sites render as before, the surface stylesheet less the unused `data-text-color` and `data-text-align` rules; a node's legacy `overrides` bag is not read (0.2.5 never read it either); importing an older `.nertia.json` into nertia.ai converts each bag to `styles`, so export it again from there to keep that look
|
|
129
136
|
- 0.2.5: declares `tailwind-merge`, `clsx`, and `embla-carousel-react`; 0.2.4 required installing them by hand
|