@stylexjs/rollup-plugin 0.2.0-beta.24 → 0.2.0-beta.26
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/__tests__/index-test.js
CHANGED
|
@@ -80,61 +80,76 @@ describe('rollup-plugin-stylex', () => {
|
|
|
80
80
|
`);
|
|
81
81
|
|
|
82
82
|
expect(js).toMatchInlineSnapshot(`
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
// otherStyles.js
|
|
86
|
-
|
|
87
|
-
var styles$2 = {
|
|
88
|
-
bar: {
|
|
89
|
-
display: "xntgbld",
|
|
90
|
-
width: "x6mlivy",
|
|
91
|
-
$$css: true
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
// npmStyles.js
|
|
96
|
-
|
|
97
|
-
const styles$1 = {
|
|
98
|
-
baz: {
|
|
99
|
-
display: "x1wdx05y",
|
|
100
|
-
height: "x1je5kxa",
|
|
101
|
-
width: "x1u78jha",
|
|
102
|
-
$$css: true
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
// index.js
|
|
107
|
-
|
|
108
|
-
var styles = {
|
|
109
|
-
foo: {
|
|
110
|
-
animationName: "x1nrqb13",
|
|
111
|
-
display: "x1c4r43l",
|
|
112
|
-
marginInlineStart: "xo3gju4",
|
|
113
|
-
marginLeft: null,
|
|
114
|
-
marginRight: null,
|
|
115
|
-
marginTop: "x1h9ru99",
|
|
116
|
-
height: "x1je5kxa",
|
|
117
|
-
":hover_background": "x1kflwvg",
|
|
118
|
-
":hover_backgroundAttachment": null,
|
|
119
|
-
":hover_backgroundClip": null,
|
|
120
|
-
":hover_backgroundColor": null,
|
|
121
|
-
":hover_backgroundImage": null,
|
|
122
|
-
":hover_backgroundOrigin": null,
|
|
123
|
-
":hover_backgroundPosition": null,
|
|
124
|
-
":hover_backgroundPositionX": null,
|
|
125
|
-
":hover_backgroundPositionY": null,
|
|
126
|
-
":hover_backgroundRepeat": null,
|
|
127
|
-
":hover_backgroundSize": null,
|
|
128
|
-
$$css: true
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
function App() {
|
|
132
|
-
return stylex(styles$2.bar, styles.foo, styles$1.baz);
|
|
133
|
-
}
|
|
83
|
+
"import stylex from 'stylex';
|
|
134
84
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
85
|
+
/**
|
|
86
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the MIT license found in the
|
|
89
|
+
* LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/
|
|
91
|
+
|
|
92
|
+
var styles$2 = {
|
|
93
|
+
bar: {
|
|
94
|
+
display: "xntgbld",
|
|
95
|
+
width: "x6mlivy",
|
|
96
|
+
$$css: true
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the MIT license found in the
|
|
104
|
+
* LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/
|
|
106
|
+
|
|
107
|
+
const styles$1 = {
|
|
108
|
+
baz: {
|
|
109
|
+
display: "x1wdx05y",
|
|
110
|
+
height: "x1je5kxa",
|
|
111
|
+
width: "x1u78jha",
|
|
112
|
+
$$css: true
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the MIT license found in the
|
|
120
|
+
* LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/
|
|
122
|
+
|
|
123
|
+
var styles = {
|
|
124
|
+
foo: {
|
|
125
|
+
animationName: "x1nrqb13",
|
|
126
|
+
display: "x1c4r43l",
|
|
127
|
+
marginInlineStart: "xo3gju4",
|
|
128
|
+
marginLeft: null,
|
|
129
|
+
marginRight: null,
|
|
130
|
+
marginTop: "x1h9ru99",
|
|
131
|
+
height: "x1je5kxa",
|
|
132
|
+
":hover_background": "x1kflwvg",
|
|
133
|
+
":hover_backgroundAttachment": null,
|
|
134
|
+
":hover_backgroundClip": null,
|
|
135
|
+
":hover_backgroundColor": null,
|
|
136
|
+
":hover_backgroundImage": null,
|
|
137
|
+
":hover_backgroundOrigin": null,
|
|
138
|
+
":hover_backgroundPosition": null,
|
|
139
|
+
":hover_backgroundPositionX": null,
|
|
140
|
+
":hover_backgroundPositionY": null,
|
|
141
|
+
":hover_backgroundRepeat": null,
|
|
142
|
+
":hover_backgroundSize": null,
|
|
143
|
+
$$css: true
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
function App() {
|
|
147
|
+
return stylex(styles$2.bar, styles.foo, styles$1.baz);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export { App as default };
|
|
151
|
+
"
|
|
152
|
+
`);
|
|
138
153
|
});
|
|
139
154
|
|
|
140
155
|
describe('when in dev mode', () => {
|
|
@@ -147,76 +162,91 @@ describe('rollup-plugin-stylex', () => {
|
|
|
147
162
|
expect(css).toBeUndefined();
|
|
148
163
|
|
|
149
164
|
expect(js).toMatchInlineSnapshot(`
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
165
|
+
"import stylex from 'stylex';
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
169
|
+
*
|
|
170
|
+
* This source code is licensed under the MIT license found in the
|
|
171
|
+
* LICENSE file in the root directory of this source tree.
|
|
172
|
+
*/
|
|
173
|
+
|
|
174
|
+
stylex.inject(".xntgbld{display:block}", 3000);
|
|
175
|
+
stylex.inject(".x6mlivy{width:100%}", 4000);
|
|
176
|
+
var styles$2 = {
|
|
177
|
+
bar: {
|
|
178
|
+
"otherStyles__styles.bar": "otherStyles__styles.bar",
|
|
179
|
+
display: "xntgbld",
|
|
180
|
+
width: "x6mlivy",
|
|
181
|
+
$$css: true
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the MIT license found in the
|
|
189
|
+
* LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/
|
|
191
|
+
|
|
192
|
+
stylex.inject(".x1wdx05y{display:inline}", 3000);
|
|
193
|
+
stylex.inject(".x1je5kxa{height:500px}", 4000);
|
|
194
|
+
stylex.inject(".x1u78jha{width:50%}", 4000);
|
|
195
|
+
const styles$1 = {
|
|
196
|
+
baz: {
|
|
197
|
+
"npmStyles__styles.baz": "npmStyles__styles.baz",
|
|
198
|
+
display: "x1wdx05y",
|
|
199
|
+
height: "x1je5kxa",
|
|
200
|
+
width: "x1u78jha",
|
|
201
|
+
$$css: true
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the MIT license found in the
|
|
209
|
+
* LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/
|
|
211
|
+
|
|
212
|
+
stylex.inject("@keyframes x11gtny7-B{0%{opacity:.25;}100%{opacity:1;}}", 1);
|
|
213
|
+
stylex.inject(".x1nrqb13{animation-name:x11gtny7-B}", 3000);
|
|
214
|
+
stylex.inject(".x1c4r43l{display:flex}", 3000);
|
|
215
|
+
stylex.inject(".xo3gju4{margin-inline-start:10px}", 3000);
|
|
216
|
+
stylex.inject(".x1h9ru99{margin-top:99px}", 4000);
|
|
217
|
+
stylex.inject(".x1je5kxa{height:500px}", 4000);
|
|
218
|
+
stylex.inject(".x1kflwvg:hover{background:red}", 1130);
|
|
219
|
+
var styles = {
|
|
220
|
+
foo: {
|
|
221
|
+
"index__styles.foo": "index__styles.foo",
|
|
222
|
+
animationName: "x1nrqb13",
|
|
223
|
+
display: "x1c4r43l",
|
|
224
|
+
marginInlineStart: "xo3gju4",
|
|
225
|
+
marginLeft: null,
|
|
226
|
+
marginRight: null,
|
|
227
|
+
marginTop: "x1h9ru99",
|
|
228
|
+
height: "x1je5kxa",
|
|
229
|
+
":hover_background": "x1kflwvg",
|
|
230
|
+
":hover_backgroundAttachment": null,
|
|
231
|
+
":hover_backgroundClip": null,
|
|
232
|
+
":hover_backgroundColor": null,
|
|
233
|
+
":hover_backgroundImage": null,
|
|
234
|
+
":hover_backgroundOrigin": null,
|
|
235
|
+
":hover_backgroundPosition": null,
|
|
236
|
+
":hover_backgroundPositionX": null,
|
|
237
|
+
":hover_backgroundPositionY": null,
|
|
238
|
+
":hover_backgroundRepeat": null,
|
|
239
|
+
":hover_backgroundSize": null,
|
|
240
|
+
$$css: true
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
function App() {
|
|
244
|
+
return stylex(styles$2.bar, styles.foo, styles$1.baz);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export { App as default };
|
|
248
|
+
"
|
|
249
|
+
`);
|
|
220
250
|
});
|
|
221
251
|
});
|
|
222
252
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stylexjs/rollup-plugin",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.26",
|
|
4
4
|
"description": "Rollup plugin for StyleX",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"repository": "https://www.github.com/facebook/stylex",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@babel/core": "^7.16.0",
|
|
22
|
-
"@stylexjs/babel-plugin": "0.2.0-beta.
|
|
22
|
+
"@stylexjs/babel-plugin": "0.2.0-beta.26"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@babel/preset-env": "^7.16.8",
|
|
@@ -27,6 +27,6 @@
|
|
|
27
27
|
"@rollup/plugin-commonjs": "^25.0.3",
|
|
28
28
|
"@rollup/plugin-node-resolve": "^15.0.0",
|
|
29
29
|
"rollup": "^3.26.3 || ^4.0.2",
|
|
30
|
-
"@stylexjs/stylex": "0.2.0-beta.
|
|
30
|
+
"@stylexjs/stylex": "0.2.0-beta.26"
|
|
31
31
|
}
|
|
32
32
|
}
|