@stylexjs/stylex 0.11.0 → 0.12.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 +0 -27
- package/lib/StyleXTypes.js.flow +3 -3
- package/package.json +24 -4
package/README.md
CHANGED
|
@@ -26,33 +26,6 @@ For more information on working with the compiler, please see the documentation
|
|
|
26
26
|
for
|
|
27
27
|
[`@stylexjs/babel-plugin`](https://www.npmjs.com/package/@stylexjs/babel-plugin).
|
|
28
28
|
|
|
29
|
-
### Runtime compiler
|
|
30
|
-
|
|
31
|
-
The runtime compiler should only be used for development and testing purposes.
|
|
32
|
-
|
|
33
|
-
```sh
|
|
34
|
-
npm install --save-dev @stylexjs/dev-runtime
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Import `@stylexjs/dev-runtime` in your JS entry-point to set everything up.
|
|
38
|
-
|
|
39
|
-
```ts
|
|
40
|
-
import inject from '@stylexjs/dev-runtime';
|
|
41
|
-
|
|
42
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
43
|
-
inject({
|
|
44
|
-
// configuration options
|
|
45
|
-
classNamePrefix: 'x-',
|
|
46
|
-
dev: true,
|
|
47
|
-
test: false,
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
For more information on working with the compiler, please see the documentation
|
|
53
|
-
for
|
|
54
|
-
[`@stylexjs/dev-runtime`](https://www.npmjs.com/package/@stylexjs/dev-runtime).
|
|
55
|
-
|
|
56
29
|
## API
|
|
57
30
|
|
|
58
31
|
### stylex.create()
|
package/lib/StyleXTypes.js.flow
CHANGED
|
@@ -54,7 +54,7 @@ export type XStyle<+T = NestedCSSPropTypes> = StyleXArray<
|
|
|
54
54
|
false | ?$ReadOnly<{ ...T, $$css: true }>,
|
|
55
55
|
>;
|
|
56
56
|
export type XStyleWithout<+T: { +[string]: mixed }> = XStyle<
|
|
57
|
-
$ReadOnly<$
|
|
57
|
+
$ReadOnly<$Diff<NestedCSSPropTypes, $Exact<T>>>,
|
|
58
58
|
>;
|
|
59
59
|
|
|
60
60
|
export type Keyframes = $ReadOnly<{ [name: string]: CSSProperties, ... }>;
|
|
@@ -115,7 +115,7 @@ export type StaticStyles<+CSS: { +[string]: mixed } = CSSPropertiesWithExtras> =
|
|
|
115
115
|
StyleXArray<false | ?GenStylePropType<$ReadOnly<CSS>>>;
|
|
116
116
|
|
|
117
117
|
export type StaticStylesWithout<+CSS: { +[string]: mixed }> = StaticStyles<
|
|
118
|
-
|
|
118
|
+
Omit<CSSPropertiesWithExtras, $Keys<CSS>>,
|
|
119
119
|
>;
|
|
120
120
|
|
|
121
121
|
export type StyleXStyles<+CSS: { +[string]: mixed } = CSSPropertiesWithExtras> =
|
|
@@ -126,7 +126,7 @@ export type StyleXStyles<+CSS: { +[string]: mixed } = CSSPropertiesWithExtras> =
|
|
|
126
126
|
>;
|
|
127
127
|
|
|
128
128
|
export type StyleXStylesWithout<+CSS: { +[string]: mixed }> = StyleXStyles<
|
|
129
|
-
|
|
129
|
+
Omit<CSSPropertiesWithExtras, $Keys<CSS>>,
|
|
130
130
|
>;
|
|
131
131
|
|
|
132
132
|
export type VarGroup<+Tokens: { +[string]: mixed }, +_ID: string = string> = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stylexjs/stylex",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "A library for defining styles for optimized user interfaces.",
|
|
5
5
|
"main": "./lib/stylex.js",
|
|
6
6
|
"module": "./lib/es/stylex.mjs",
|
|
@@ -28,7 +28,10 @@
|
|
|
28
28
|
},
|
|
29
29
|
"./package.json": "./package.json"
|
|
30
30
|
},
|
|
31
|
-
"repository":
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+https://github.com/facebook/stylex.git"
|
|
34
|
+
},
|
|
32
35
|
"license": "MIT",
|
|
33
36
|
"scripts": {
|
|
34
37
|
"prebuild": "gen-types -i src/ -o lib/",
|
|
@@ -45,8 +48,25 @@
|
|
|
45
48
|
"styleq": "0.2.1"
|
|
46
49
|
},
|
|
47
50
|
"devDependencies": {
|
|
48
|
-
"@
|
|
49
|
-
"
|
|
51
|
+
"@babel/cli": "^7.26.4",
|
|
52
|
+
"@babel/core": "^7.26.8",
|
|
53
|
+
"@babel/eslint-parser": "^7.26.8",
|
|
54
|
+
"@babel/plugin-syntax-flow": "^7.26.0",
|
|
55
|
+
"@babel/preset-env": "^7.26.8",
|
|
56
|
+
"@babel/preset-flow": "^7.25.9",
|
|
57
|
+
"@babel/preset-react": "^7.26.3",
|
|
58
|
+
"@babel/preset-typescript": "^7.26.0",
|
|
59
|
+
"@babel/types": "^7.26.8",
|
|
60
|
+
"@rollup/plugin-alias": "^5.1.1",
|
|
61
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
62
|
+
"@rollup/plugin-commonjs": "^28.0.1",
|
|
63
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
64
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
65
|
+
"@rollup/plugin-replace": "^6.0.1",
|
|
66
|
+
"babel-plugin-syntax-hermes-parser": "^0.26.0",
|
|
67
|
+
"cross-env": "^7.0.3",
|
|
68
|
+
"rollup": "^4.24.0",
|
|
69
|
+
"scripts": "0.12.0"
|
|
50
70
|
},
|
|
51
71
|
"jest": {},
|
|
52
72
|
"files": [
|