@barocss/browser 0.7.0 → 0.8.1
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 +4 -0
- package/dist/cdn/barocss.js +518 -268
- package/dist/cdn/barocss.js.map +1 -1
- package/dist/cdn/barocss.umd.cjs +1 -1
- package/dist/cdn/barocss.umd.cjs.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
@barocss/browser provides a browser-specific runtime that automatically detects DOM changes and generates CSS in real-time. It includes DOM change detection, style injection, and performance optimizations for browser environments.
|
|
10
10
|
|
|
11
|
+
> **Need styled first paint on server-rendered pages?** Use the [`@barocss/server` recipe](../barocss-server/README.md#recipe-ssr-with-a-tailwind-build-nextjs-app-router-astro) (Astro: [docs guide](../../apps/barocss-docs/docs/guide/integration/astro.md)). The recipe below is client-only.
|
|
12
|
+
|
|
11
13
|
## Recipe: BaroCSS next to a Tailwind/shadcn build (json-render)
|
|
12
14
|
|
|
13
15
|
Use this when the page already links a Tailwind 4 / shadcn build and a model sends json-render specs whose `className` values the build never saw. Copy it as is:
|
|
@@ -131,6 +133,8 @@ The helper reads literal `props.className` strings in the flat `spec.elements` m
|
|
|
131
133
|
|
|
132
134
|
### CDN Usage
|
|
133
135
|
|
|
136
|
+
> **CDN global is browser-only.** The CDN UMD script's `window.BaroCSS` exposes only `@barocss/browser`: `BrowserRuntime`, `getRuntime`, `baroBoot`/`baroStart`, `ChangeDetector`, `StylePartitionManager`, `shadcnTheme`, `preloadJsonRenderClasses`, `collectJsonRenderClassNames`, `normalizeClassName(List)`, `SSR_STYLE_SELECTOR`, `LAYER_ORDER`. There is no `generateCss`/`generateCssForHtml`/`ServerRuntime` in it: server-side generation needs `@barocss/server` in Node.
|
|
137
|
+
|
|
134
138
|
```html
|
|
135
139
|
<!DOCTYPE html>
|
|
136
140
|
<html>
|