@octanejs/stylex 0.1.0 → 0.1.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 +7 -1
- package/package.json +9 -2
- package/src/vite.js +10 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @octanejs/stylex
|
|
2
2
|
|
|
3
|
-
[StyleX](https://stylexjs.com) for the [octane](https://github.com/octanejs/octane)
|
|
3
|
+
[StyleX](https://stylexjs.com) for the [octane](https://github.com/octanejs/octane) UI framework.
|
|
4
4
|
|
|
5
5
|
StyleX is a **build-time** CSS-in-JS system: a compiler turns `stylex.create({...})`
|
|
6
6
|
into atomic class names and extracts the CSS, and `stylex.props(...)` merges those at
|
|
@@ -87,3 +87,9 @@ contains every rule regardless of module/transform order.
|
|
|
87
87
|
(which is also StyleX's own recommended pattern).
|
|
88
88
|
- The plugin runs the StyleX compiler on octane's _output_, so StyleX's own
|
|
89
89
|
source-scanning tools (the PostCSS plugin) are not used and not needed.
|
|
90
|
+
|
|
91
|
+
## Status
|
|
92
|
+
|
|
93
|
+
Current scope, known divergences, and verification status are tracked in the
|
|
94
|
+
generated [bindings status table](../../docs/bindings-status.md), sourced from
|
|
95
|
+
this package's [`status.json`](./status.json).
|
package/package.json
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octanejs/stylex",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"octane": {
|
|
7
|
+
"hookSlots": {
|
|
8
|
+
"manual": [
|
|
9
|
+
"src"
|
|
10
|
+
]
|
|
11
|
+
}
|
|
12
|
+
},
|
|
6
13
|
"description": "StyleX bindings for the octane renderer — reuses StyleX's framework-agnostic compiler core and routes the generated atomic CSS through octane's stylesheet channel (client dedupe + SSR render().css).",
|
|
7
14
|
"author": {
|
|
8
15
|
"name": "Dominic Gannaway",
|
|
@@ -31,7 +38,7 @@
|
|
|
31
38
|
"@babel/core": "7.29.7",
|
|
32
39
|
"@stylexjs/babel-plugin": "0.19.0",
|
|
33
40
|
"@stylexjs/stylex": "0.19.0",
|
|
34
|
-
"octane": "0.1.
|
|
41
|
+
"octane": "0.1.4"
|
|
35
42
|
},
|
|
36
43
|
"devDependencies": {
|
|
37
44
|
"@types/babel__core": "7.20.5",
|
package/src/vite.js
CHANGED
|
@@ -69,6 +69,16 @@ export function stylex(options = {}) {
|
|
|
69
69
|
// Run after octane's `.tsrx` -> JS transform, where `stylex.*` calls survive.
|
|
70
70
|
enforce: 'post',
|
|
71
71
|
|
|
72
|
+
// Exposed for SSR: a dev SSR server can inline the collected sheet into the
|
|
73
|
+
// server-rendered `<head>` so the first paint is styled (no flash of unstyled
|
|
74
|
+
// content) — in dev, `virtual:stylex.css` is served as JS that only injects
|
|
75
|
+
// styles AFTER the client runs. Call after the route's modules have been
|
|
76
|
+
// transformed (e.g. after `render()`), when the aggregate is complete for the
|
|
77
|
+
// current route. A production build instead extracts the sheet to a `<link>`.
|
|
78
|
+
api: {
|
|
79
|
+
getCss: () => aggregate(),
|
|
80
|
+
},
|
|
81
|
+
|
|
72
82
|
configResolved(config) {
|
|
73
83
|
isDev = options.dev ?? config.command === 'serve';
|
|
74
84
|
isBuild = config.command === 'build';
|