@stylexjs/stylex 0.11.1 → 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 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()
@@ -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<$Rest<NestedCSSPropTypes, $Exact<T>>>,
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
- $Rest<CSSPropertiesWithExtras, $ReadOnly<CSS>>,
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
- $Rest<CSSPropertiesWithExtras, $ReadOnly<CSS>>,
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.11.1",
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": "https://www.github.com/facebook/stylex",
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/",
@@ -60,10 +63,10 @@
60
63
  "@rollup/plugin-json": "^6.1.0",
61
64
  "@rollup/plugin-node-resolve": "^15.3.0",
62
65
  "@rollup/plugin-replace": "^6.0.1",
63
- "@stylexjs/scripts": "0.11.1",
64
66
  "babel-plugin-syntax-hermes-parser": "^0.26.0",
65
67
  "cross-env": "^7.0.3",
66
- "rollup": "^4.24.0"
68
+ "rollup": "^4.24.0",
69
+ "scripts": "0.12.0"
67
70
  },
68
71
  "jest": {},
69
72
  "files": [