@swc/plugin-styled-jsx 7.0.0 → 7.0.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.
@@ -0,0 +1,1699 @@
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
+
3
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform .expressions correctly 1`] = `
4
+ "import _JSXStyle from "styled-jsx/style";
5
+ const darken = (c)=>c;
6
+ const color = "red";
7
+ const otherColor = "green";
8
+ const mediumScreen = "680px";
9
+ const animationDuration = "200ms";
10
+ const animationName = "my-cool-animation";
11
+ const obj = {
12
+ display: "block"
13
+ };
14
+ export default (({ display })=>/*#__PURE__*/ React.createElement("div", {
15
+ className: "jsx-7d790162c8ab53bf " + _JSXStyle.dynamic([
16
+ [
17
+ "f374bce66bf8bc53",
18
+ [
19
+ display ? "block" : "none"
20
+ ]
21
+ ],
22
+ [
23
+ "9ff947367eb295a9",
24
+ [
25
+ darken(color) + 2
26
+ ]
27
+ ],
28
+ [
29
+ "97031d45e1e1883c",
30
+ [
31
+ darken(color)
32
+ ]
33
+ ]
34
+ ])
35
+ }, /*#__PURE__*/ React.createElement("p", {
36
+ className: "jsx-7d790162c8ab53bf " + _JSXStyle.dynamic([
37
+ [
38
+ "f374bce66bf8bc53",
39
+ [
40
+ display ? "block" : "none"
41
+ ]
42
+ ],
43
+ [
44
+ "9ff947367eb295a9",
45
+ [
46
+ darken(color) + 2
47
+ ]
48
+ ],
49
+ [
50
+ "97031d45e1e1883c",
51
+ [
52
+ darken(color)
53
+ ]
54
+ ]
55
+ ])
56
+ }, "test"), /*#__PURE__*/ React.createElement(_JSXStyle, {
57
+ id: "b858211f1ae5f9a7"
58
+ }, \`p.\${color}.jsx-7d790162c8ab53bf{color:\${otherColor};display:\${obj.display}}\`), /*#__PURE__*/ React.createElement(_JSXStyle, {
59
+ id: "94239b6d6b42c9b5"
60
+ }, "p.jsx-7d790162c8ab53bf{color:red}"), /*#__PURE__*/ React.createElement(_JSXStyle, {
61
+ id: "bfe06f4e2e097633"
62
+ }, \`body{background:\${color}}\`), /*#__PURE__*/ React.createElement(_JSXStyle, {
63
+ id: "bfe06f4e2e097633"
64
+ }, \`body{background:\${color}}\`), "// TODO: the next two should have the same hash", /*#__PURE__*/ React.createElement(_JSXStyle, {
65
+ id: "73815d631c0fd05a"
66
+ }, \`p.jsx-7d790162c8ab53bf{color:\${color}}\`), /*#__PURE__*/ React.createElement(_JSXStyle, {
67
+ id: "73815d631c0fd05a"
68
+ }, \`p.jsx-7d790162c8ab53bf{color:\${color}}\`), /*#__PURE__*/ React.createElement(_JSXStyle, {
69
+ id: "97031d45e1e1883c",
70
+ dynamic: [
71
+ darken(color)
72
+ ]
73
+ }, \`p.__jsx-style-dynamic-selector{color:\${darken(color)}}\`), /*#__PURE__*/ React.createElement(_JSXStyle, {
74
+ id: "9ff947367eb295a9",
75
+ dynamic: [
76
+ darken(color) + 2
77
+ ]
78
+ }, \`p.__jsx-style-dynamic-selector{color:\${darken(color) + 2}}\`), /*#__PURE__*/ React.createElement(_JSXStyle, {
79
+ id: "df2e7ce1df099141"
80
+ }, \`@media(min-width:\${mediumScreen}){p.jsx-7d790162c8ab53bf{color:green}p.jsx-7d790162c8ab53bf{color:\${\`red\`}}}p.jsx-7d790162c8ab53bf{color:red}\`), /*#__PURE__*/ React.createElement(_JSXStyle, {
81
+ id: "a7e92eb9fe137ba9"
82
+ }, \`p.jsx-7d790162c8ab53bf{-webkit-animation-duration:\${animationDuration};-moz-animation-duration:\${animationDuration};-o-animation-duration:\${animationDuration};animation-duration:\${animationDuration}}\`), /*#__PURE__*/ React.createElement(_JSXStyle, {
83
+ id: "33b91b924c07e1e8"
84
+ }, \`p.jsx-7d790162c8ab53bf{-webkit-animation:\${animationDuration} forwards \${animationName};-moz-animation:\${animationDuration} forwards \${animationName};-o-animation:\${animationDuration} forwards \${animationName};animation:\${animationDuration} forwards \${animationName}}div.jsx-7d790162c8ab53bf{background:\${color}}\`), /*#__PURE__*/ React.createElement(_JSXStyle, {
85
+ id: "f374bce66bf8bc53",
86
+ dynamic: [
87
+ display ? "block" : "none"
88
+ ]
89
+ }, \`span.__jsx-style-dynamic-selector{display:\${display ? "block" : "none"}}\`), "// TODO: causes bad syntax"));
90
+ "
91
+ `;
92
+
93
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform absent correctly 1`] = `
94
+ "const a = ()=>/*#__PURE__*/ React.createElement("div", null, /*#__PURE__*/ React.createElement("p", null, "hi"), /*#__PURE__*/ React.createElement("style", null, "woot"));
95
+ "
96
+ `;
97
+
98
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform attribute-generation-classname-rewriting correctly 1`] = `
99
+ "import _JSXStyle from "styled-jsx/style";
100
+ export default (()=>{
101
+ const Element = "div";
102
+ return /*#__PURE__*/ React.createElement("div", {
103
+ className: "jsx-abb4c2202db1a207"
104
+ }, /*#__PURE__*/ React.createElement("div", {
105
+ ...test.test,
106
+ className: "jsx-abb4c2202db1a207" + " " + (test.test && test.test.className != null && test.test.className || "test")
107
+ }), /*#__PURE__*/ React.createElement("div", {
108
+ ...test.test.test,
109
+ className: "jsx-abb4c2202db1a207" + " " + (test.test.test && test.test.test.className != null && test.test.test.className || "test")
110
+ }), /*#__PURE__*/ React.createElement("div", {
111
+ ...this.test.test,
112
+ className: "jsx-abb4c2202db1a207" + " " + (this.test.test && this.test.test.className != null && this.test.test.className || "test")
113
+ }), /*#__PURE__*/ React.createElement("div", {
114
+ "data-test": "test",
115
+ className: "jsx-abb4c2202db1a207"
116
+ }), /*#__PURE__*/ React.createElement("div", {
117
+ className: "jsx-abb4c2202db1a207" + " " + "test"
118
+ }), /*#__PURE__*/ React.createElement("div", {
119
+ className: "jsx-abb4c2202db1a207" + " " + \`test\`
120
+ }), /*#__PURE__*/ React.createElement("div", {
121
+ className: "jsx-abb4c2202db1a207" + " " + \`test\${true ? " test2" : ""}\`
122
+ }), /*#__PURE__*/ React.createElement("div", {
123
+ className: "jsx-abb4c2202db1a207" + " " + ("test " + test || "")
124
+ }), /*#__PURE__*/ React.createElement("div", {
125
+ className: "jsx-abb4c2202db1a207" + " " + ([
126
+ "test",
127
+ "test2"
128
+ ].join(" ") || "")
129
+ }), /*#__PURE__*/ React.createElement("div", {
130
+ className: "jsx-abb4c2202db1a207" + " " + (true && "test" || "")
131
+ }), /*#__PURE__*/ React.createElement("div", {
132
+ className: "jsx-abb4c2202db1a207" + " " + ((test ? "test" : null) || "")
133
+ }), /*#__PURE__*/ React.createElement("div", {
134
+ className: "jsx-abb4c2202db1a207" + " " + (test || "")
135
+ }), /*#__PURE__*/ React.createElement("div", {
136
+ className: "jsx-abb4c2202db1a207" + " " + (test && "test" || "")
137
+ }), /*#__PURE__*/ React.createElement("div", {
138
+ className: "jsx-abb4c2202db1a207" + " " + (test && test("test") || "")
139
+ }), /*#__PURE__*/ React.createElement("div", {
140
+ className: "jsx-abb4c2202db1a207" + " " + (undefined || "")
141
+ }), /*#__PURE__*/ React.createElement("div", {
142
+ className: "jsx-abb4c2202db1a207" + " " + (null || "")
143
+ }), /*#__PURE__*/ React.createElement("div", {
144
+ className: "jsx-abb4c2202db1a207" + " " + (false || "")
145
+ }), /*#__PURE__*/ React.createElement("div", {
146
+ "data-test": true,
147
+ className: "jsx-abb4c2202db1a207" + " " + "test"
148
+ }), /*#__PURE__*/ React.createElement("div", {
149
+ "data-test": true,
150
+ className: "jsx-abb4c2202db1a207" + " " + "test"
151
+ }), /*#__PURE__*/ React.createElement("div", {
152
+ "data-test": "test",
153
+ className: "jsx-abb4c2202db1a207" + " " + "test"
154
+ }), /*#__PURE__*/ React.createElement("div", {
155
+ ...props,
156
+ className: "jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || "test")
157
+ }), /*#__PURE__*/ React.createElement("div", {
158
+ ...props,
159
+ ...rest,
160
+ className: "jsx-abb4c2202db1a207" + " " + (rest && rest.className != null && rest.className || props && props.className != null && props.className || "test")
161
+ }), /*#__PURE__*/ React.createElement("div", {
162
+ ...props,
163
+ className: "jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || \`test \${test ? "test" : ""}\`)
164
+ }), /*#__PURE__*/ React.createElement("div", {
165
+ ...props,
166
+ className: "jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || test && test("test") || "")
167
+ }), /*#__PURE__*/ React.createElement("div", {
168
+ ...props,
169
+ className: "jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || test && test("test") && "test" || "")
170
+ }), /*#__PURE__*/ React.createElement("div", {
171
+ ...props,
172
+ className: "jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || test && test("test") && test2("test") || "")
173
+ }), /*#__PURE__*/ React.createElement("div", {
174
+ ...props,
175
+ className: "jsx-abb4c2202db1a207" + " " + "test"
176
+ }), /*#__PURE__*/ React.createElement("div", {
177
+ ...props,
178
+ ...rest,
179
+ className: "jsx-abb4c2202db1a207" + " " + "test"
180
+ }), /*#__PURE__*/ React.createElement("div", {
181
+ ...props,
182
+ ...rest,
183
+ className: "jsx-abb4c2202db1a207" + " " + (rest && rest.className != null && rest.className || "test")
184
+ }), /*#__PURE__*/ React.createElement("div", {
185
+ ...props,
186
+ className: "jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || "")
187
+ }), /*#__PURE__*/ React.createElement("div", {
188
+ ...props,
189
+ ...rest,
190
+ className: "jsx-abb4c2202db1a207" + " " + (rest && rest.className != null && rest.className || props && props.className != null && props.className || "")
191
+ }), /*#__PURE__*/ React.createElement("div", {
192
+ ...props,
193
+ "data-foo": true,
194
+ ...rest,
195
+ className: "jsx-abb4c2202db1a207" + " " + (rest && rest.className != null && rest.className || props && props.className != null && props.className || "")
196
+ }), /*#__PURE__*/ React.createElement("div", {
197
+ ...props,
198
+ "data-foo": true,
199
+ ...rest,
200
+ className: "jsx-abb4c2202db1a207" + " " + (rest && rest.className != null && rest.className || "test")
201
+ }), /*#__PURE__*/ React.createElement("div", {
202
+ id: "foo",
203
+ className: "jsx-abb4c2202db1a207"
204
+ }), /*#__PURE__*/ React.createElement("div", {
205
+ className: "jsx-abb4c2202db1a207" + " " + "foo"
206
+ }), /*#__PURE__*/ React.createElement("div", {
207
+ className: "foo",
208
+ className: "jsx-abb4c2202db1a207" + " " + "test"
209
+ }), /*#__PURE__*/ React.createElement("div", {
210
+ className: "test",
211
+ className: "jsx-abb4c2202db1a207" + " " + "foo"
212
+ }), /*#__PURE__*/ React.createElement("div", {
213
+ ...bar,
214
+ className: "jsx-abb4c2202db1a207" + " " + (bar && bar.className != null && bar.className || "foo")
215
+ }), /*#__PURE__*/ React.createElement("div", {
216
+ className: "foo",
217
+ ...bar,
218
+ className: "jsx-abb4c2202db1a207" + " " + "test"
219
+ }), /*#__PURE__*/ React.createElement("div", {
220
+ className: "test",
221
+ ...bar,
222
+ className: "jsx-abb4c2202db1a207" + " " + (bar && bar.className != null && bar.className || "foo")
223
+ }), /*#__PURE__*/ React.createElement("div", {
224
+ className: "test",
225
+ className: "jsx-abb4c2202db1a207" + " " + (props.className || "")
226
+ }), /*#__PURE__*/ React.createElement("div", {
227
+ className: "test",
228
+ ...bar,
229
+ className: "jsx-abb4c2202db1a207" + " " + (bar && bar.className != null && bar.className || props.className || "")
230
+ }), /*#__PURE__*/ React.createElement("div", {
231
+ className: "test",
232
+ ...bar,
233
+ className: "jsx-abb4c2202db1a207" + " " + (props.className || "")
234
+ }), /*#__PURE__*/ React.createElement("div", {
235
+ ...bar(),
236
+ className: "jsx-abb4c2202db1a207" + " " + "test"
237
+ }), /*#__PURE__*/ React.createElement(Element, {
238
+ className: "jsx-abb4c2202db1a207"
239
+ }), /*#__PURE__*/ React.createElement(Element, {
240
+ className: "jsx-abb4c2202db1a207" + " " + "test"
241
+ }), /*#__PURE__*/ React.createElement(Element, {
242
+ ...props,
243
+ className: "jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || "")
244
+ }), /*#__PURE__*/ React.createElement(_JSXStyle, {
245
+ id: "abb4c2202db1a207"
246
+ }, "div.jsx-abb4c2202db1a207{color:red}"));
247
+ });
248
+ "
249
+ `;
250
+
251
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform attribute-generation-modes correctly 1`] = `
252
+ "import _JSXStyle from "styled-jsx/style";
253
+ import styles from "./styles";
254
+ const styles2 = require("./styles2");
255
+ // external only
256
+ export const Test1 = ()=>/*#__PURE__*/ React.createElement("div", {
257
+ className: \`jsx-\${styles2.__hash} jsx-\${styles.__hash}\`
258
+ }, /*#__PURE__*/ React.createElement("p", {
259
+ className: \`jsx-\${styles2.__hash} jsx-\${styles.__hash}\`
260
+ }, "external only"), /*#__PURE__*/ React.createElement(_JSXStyle, {
261
+ id: styles.__hash
262
+ }, styles), /*#__PURE__*/ React.createElement(_JSXStyle, {
263
+ id: styles2.__hash
264
+ }, styles2));
265
+ // external and static
266
+ export const Test2 = ()=>/*#__PURE__*/ React.createElement("div", {
267
+ className: "jsx-81a68341e430a972 " + \`jsx-\${styles.__hash}\`
268
+ }, /*#__PURE__*/ React.createElement("p", {
269
+ className: "jsx-81a68341e430a972 " + \`jsx-\${styles.__hash}\`
270
+ }, "external and static"), /*#__PURE__*/ React.createElement(_JSXStyle, {
271
+ id: "81a68341e430a972"
272
+ }, "p.jsx-81a68341e430a972{color:red}"), /*#__PURE__*/ React.createElement(_JSXStyle, {
273
+ id: styles.__hash
274
+ }, styles));
275
+ // external and dynamic
276
+ export const Test3 = ({ color })=>/*#__PURE__*/ React.createElement("div", {
277
+ className: \`jsx-\${styles.__hash}\` + " " + _JSXStyle.dynamic([
278
+ [
279
+ "ef5a1b863e7906fd",
280
+ [
281
+ color
282
+ ]
283
+ ]
284
+ ])
285
+ }, /*#__PURE__*/ React.createElement("p", {
286
+ className: \`jsx-\${styles.__hash}\` + " " + _JSXStyle.dynamic([
287
+ [
288
+ "ef5a1b863e7906fd",
289
+ [
290
+ color
291
+ ]
292
+ ]
293
+ ])
294
+ }, "external and dynamic"), /*#__PURE__*/ React.createElement(_JSXStyle, {
295
+ id: "ef5a1b863e7906fd",
296
+ dynamic: [
297
+ color
298
+ ]
299
+ }, \`p.__jsx-style-dynamic-selector{color:\${color}}\`), /*#__PURE__*/ React.createElement(_JSXStyle, {
300
+ id: styles.__hash
301
+ }, styles));
302
+ // external, static and dynamic
303
+ export const Test4 = ({ color })=>/*#__PURE__*/ React.createElement("div", {
304
+ className: \`jsx-\${styles.__hash}\` + " jsx-ceba8c9ce34e3d0c " + _JSXStyle.dynamic([
305
+ [
306
+ "76298716cb999a3b",
307
+ [
308
+ color
309
+ ]
310
+ ]
311
+ ])
312
+ }, /*#__PURE__*/ React.createElement("p", {
313
+ className: \`jsx-\${styles.__hash}\` + " jsx-ceba8c9ce34e3d0c " + _JSXStyle.dynamic([
314
+ [
315
+ "76298716cb999a3b",
316
+ [
317
+ color
318
+ ]
319
+ ]
320
+ ])
321
+ }, "external, static and dynamic"), /*#__PURE__*/ React.createElement(_JSXStyle, {
322
+ id: "ceba8c9ce34e3d0c"
323
+ }, "p.jsx-ceba8c9ce34e3d0c{display:inline-block}"), /*#__PURE__*/ React.createElement(_JSXStyle, {
324
+ id: "76298716cb999a3b",
325
+ dynamic: [
326
+ color
327
+ ]
328
+ }, \`p.__jsx-style-dynamic-selector{color:\${color}}\`), /*#__PURE__*/ React.createElement(_JSXStyle, {
329
+ id: styles.__hash
330
+ }, styles));
331
+ // static only
332
+ export const Test5 = ()=>/*#__PURE__*/ React.createElement("div", {
333
+ className: "jsx-df0159ebd3f9fb6f"
334
+ }, /*#__PURE__*/ React.createElement("p", {
335
+ className: "jsx-df0159ebd3f9fb6f"
336
+ }, "static only"), /*#__PURE__*/ React.createElement(_JSXStyle, {
337
+ id: "ceba8c9ce34e3d0c"
338
+ }, "p.jsx-df0159ebd3f9fb6f{display:inline-block}"), /*#__PURE__*/ React.createElement(_JSXStyle, {
339
+ id: "81a68341e430a972"
340
+ }, "p.jsx-df0159ebd3f9fb6f{color:red}"));
341
+ // static and dynamic
342
+ export const Test6 = ({ color })=>/*#__PURE__*/ React.createElement("div", {
343
+ className: "jsx-ceba8c9ce34e3d0c " + _JSXStyle.dynamic([
344
+ [
345
+ "3895e17ce77b69d1",
346
+ [
347
+ color
348
+ ]
349
+ ]
350
+ ])
351
+ }, /*#__PURE__*/ React.createElement("p", {
352
+ className: "jsx-ceba8c9ce34e3d0c " + _JSXStyle.dynamic([
353
+ [
354
+ "3895e17ce77b69d1",
355
+ [
356
+ color
357
+ ]
358
+ ]
359
+ ])
360
+ }, "static and dynamic"), /*#__PURE__*/ React.createElement(_JSXStyle, {
361
+ id: "ceba8c9ce34e3d0c"
362
+ }, "p.jsx-ceba8c9ce34e3d0c{display:inline-block}"), /*#__PURE__*/ React.createElement(_JSXStyle, {
363
+ id: "3895e17ce77b69d1",
364
+ dynamic: [
365
+ color
366
+ ]
367
+ }, \`p.__jsx-style-dynamic-selector{color:\${color}}\`));
368
+ // dynamic only
369
+ export const Test7 = ({ color })=>/*#__PURE__*/ React.createElement("div", {
370
+ className: _JSXStyle.dynamic([
371
+ [
372
+ "bd26d92615520db6",
373
+ [
374
+ color
375
+ ]
376
+ ]
377
+ ])
378
+ }, /*#__PURE__*/ React.createElement("p", {
379
+ className: _JSXStyle.dynamic([
380
+ [
381
+ "bd26d92615520db6",
382
+ [
383
+ color
384
+ ]
385
+ ]
386
+ ])
387
+ }, "dynamic only"), /*#__PURE__*/ React.createElement(_JSXStyle, {
388
+ id: "bd26d92615520db6",
389
+ dynamic: [
390
+ color
391
+ ]
392
+ }, \`p.__jsx-style-dynamic-selector{color:\${color}}\`));
393
+ // dynamic with scoped compound variable
394
+ export const Test8 = ({ color })=>{
395
+ if (color) {
396
+ const innerProps = {
397
+ color
398
+ };
399
+ return /*#__PURE__*/ React.createElement("div", {
400
+ className: _JSXStyle.dynamic([
401
+ [
402
+ "f0cf5707c4f40fc2",
403
+ [
404
+ innerProps.color
405
+ ]
406
+ ]
407
+ ])
408
+ }, /*#__PURE__*/ React.createElement("p", {
409
+ className: _JSXStyle.dynamic([
410
+ [
411
+ "f0cf5707c4f40fc2",
412
+ [
413
+ innerProps.color
414
+ ]
415
+ ]
416
+ ])
417
+ }, "dynamic with scoped compound variable"), /*#__PURE__*/ React.createElement(_JSXStyle, {
418
+ id: "f0cf5707c4f40fc2",
419
+ dynamic: [
420
+ innerProps.color
421
+ ]
422
+ }, \`p.__jsx-style-dynamic-selector{color:\${innerProps.color}}\`));
423
+ }
424
+ };
425
+ // dynamic with compound variable
426
+ export const Test9 = ({ color })=>{
427
+ const innerProps = {
428
+ color
429
+ };
430
+ return /*#__PURE__*/ React.createElement("div", {
431
+ className: _JSXStyle.dynamic([
432
+ [
433
+ "58ca1b812573d314",
434
+ [
435
+ innerProps.color
436
+ ]
437
+ ]
438
+ ])
439
+ }, /*#__PURE__*/ React.createElement("p", {
440
+ className: _JSXStyle.dynamic([
441
+ [
442
+ "58ca1b812573d314",
443
+ [
444
+ innerProps.color
445
+ ]
446
+ ]
447
+ ])
448
+ }, "dynamic with compound variable"), /*#__PURE__*/ React.createElement(_JSXStyle, {
449
+ id: "58ca1b812573d314",
450
+ dynamic: [
451
+ innerProps.color
452
+ ]
453
+ }, \`p.__jsx-style-dynamic-selector{color:\${innerProps.color}}\`));
454
+ };
455
+ const foo = "red";
456
+ // dynamic with constant variable
457
+ export const Test10 = ()=>/*#__PURE__*/ React.createElement("div", {
458
+ className: "jsx-563898a29d0c8d10"
459
+ }, /*#__PURE__*/ React.createElement("p", {
460
+ className: "jsx-563898a29d0c8d10"
461
+ }, "dynamic with constant variable"), /*#__PURE__*/ React.createElement(_JSXStyle, {
462
+ id: "563898a29d0c8d10"
463
+ }, \`p.jsx-563898a29d0c8d10{color:\${foo}}\`));
464
+ // dynamic with complex scope
465
+ export const Test11 = ({ color })=>{
466
+ const items = Array.from({
467
+ length: 5
468
+ }).map((item, i)=>/*#__PURE__*/ React.createElement("li", {
469
+ key: i,
470
+ className: _JSXStyle.dynamic([
471
+ [
472
+ "118434e743df3274",
473
+ [
474
+ color
475
+ ]
476
+ ]
477
+ ]) + " " + "item"
478
+ }, /*#__PURE__*/ React.createElement(_JSXStyle, {
479
+ id: "118434e743df3274",
480
+ dynamic: [
481
+ color
482
+ ]
483
+ }, \`.item.__jsx-style-dynamic-selector{color:\${color}}\`), "Item #", i + 1));
484
+ return /*#__PURE__*/ React.createElement("ul", {
485
+ className: "items"
486
+ }, items);
487
+ };
488
+ "
489
+ `;
490
+
491
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform class correctly 1`] = `
492
+ "import _JSXStyle from "styled-jsx/style";
493
+ class _class {
494
+ render() {
495
+ return /*#__PURE__*/ React.createElement("div", {
496
+ className: "jsx-b2b86d63f35d25ee"
497
+ }, /*#__PURE__*/ React.createElement("p", {
498
+ className: "jsx-b2b86d63f35d25ee"
499
+ }, "test"), /*#__PURE__*/ React.createElement(_JSXStyle, {
500
+ id: "b2b86d63f35d25ee"
501
+ }, "p.jsx-b2b86d63f35d25ee{color:red}"));
502
+ }
503
+ }
504
+ export { _class as default };
505
+ "
506
+ `;
507
+
508
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform component-attribute correctly 1`] = `
509
+ "import _JSXStyle from "styled-jsx/style";
510
+ const Test = ()=>/*#__PURE__*/ React.createElement("div", {
511
+ className: "jsx-a9535d7d5f32c3c4"
512
+ }, /*#__PURE__*/ React.createElement("span", {
513
+ className: "jsx-a9535d7d5f32c3c4"
514
+ }, "test"), /*#__PURE__*/ React.createElement(Component, null), /*#__PURE__*/ React.createElement(_JSXStyle, {
515
+ id: "a9535d7d5f32c3c4"
516
+ }, "span.jsx-a9535d7d5f32c3c4{color:red}"));
517
+ "
518
+ `;
519
+
520
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform conflicts correctly 1`] = `
521
+ "// TODO
522
+ // export const _JSXStyle = '_JSXStyle-literal'
523
+ // export default function() {
524
+ // return (
525
+ // <div>
526
+ // <p>test</p>
527
+ // <style jsx>{\`
528
+ // p {
529
+ // color: red;
530
+ // }
531
+ // \`}</style>
532
+ // </div>
533
+ // )
534
+ // }
535
+ "
536
+ `;
537
+
538
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform css-selector-after-pseudo correctly 1`] = `
539
+ "import _JSXStyle from "styled-jsx/style";
540
+ function NavigationItem({ active, className }) {
541
+ return /*#__PURE__*/ React.createElement("span", {
542
+ className: "jsx-e73bf96b356a8634" + " " + (cn({
543
+ active
544
+ }, className, "navigation-item") || "")
545
+ }, /*#__PURE__*/ React.createElement(_JSXStyle, {
546
+ id: "e73bf96b356a8634"
547
+ }, '.navigation-item.jsx-e73bf96b356a8634 a::after{content:attr(data-text);content:attr(data-text)/""}'));
548
+ }
549
+ export default NavigationItem;
550
+ "
551
+ `;
552
+
553
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform css-tag-same-file correctly 1`] = `
554
+ "import _JSXStyle from "styled-jsx/style";
555
+ export default (({ children })=>/*#__PURE__*/ React.createElement("div", {
556
+ className: \`jsx-\${styles.__hash}\`
557
+ }, /*#__PURE__*/ React.createElement("p", {
558
+ className: \`jsx-\${styles.__hash}\`
559
+ }, children), /*#__PURE__*/ React.createElement(_JSXStyle, {
560
+ id: styles.__hash
561
+ }, styles)));
562
+ const styles = new String("p.jsx-556239d258b6d66a{color:red}");
563
+ styles.__hash = "556239d258b6d66a";
564
+ class Test extends React.Component {
565
+ render() {
566
+ return /*#__PURE__*/ React.createElement("div", {
567
+ className: \`jsx-\${styles.__hash}\`
568
+ }, /*#__PURE__*/ React.createElement("p", {
569
+ className: \`jsx-\${styles.__hash}\`
570
+ }, this.props.children), /*#__PURE__*/ React.createElement(_JSXStyle, {
571
+ id: styles.__hash
572
+ }, styles));
573
+ }
574
+ }
575
+ "
576
+ `;
577
+
578
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform different-jsx-ids correctly 1`] = `
579
+ "import _JSXStyle from "styled-jsx/style";
580
+ const color = "red";
581
+ const otherColor = "green";
582
+ const A = ()=>/*#__PURE__*/ React.createElement("div", {
583
+ className: "jsx-73815d631c0fd05a"
584
+ }, /*#__PURE__*/ React.createElement("p", {
585
+ className: "jsx-73815d631c0fd05a"
586
+ }, "test"), /*#__PURE__*/ React.createElement(_JSXStyle, {
587
+ id: "73815d631c0fd05a"
588
+ }, \`p.jsx-73815d631c0fd05a{color:\${color}}\`));
589
+ const B = ()=>/*#__PURE__*/ React.createElement("div", {
590
+ className: "jsx-dd59f687949dba4a"
591
+ }, /*#__PURE__*/ React.createElement("p", {
592
+ className: "jsx-dd59f687949dba4a"
593
+ }, "test"), /*#__PURE__*/ React.createElement(_JSXStyle, {
594
+ id: "dd59f687949dba4a"
595
+ }, \`p.jsx-dd59f687949dba4a{color:\${otherColor}}\`));
596
+ export default (()=>/*#__PURE__*/ React.createElement("div", null, /*#__PURE__*/ React.createElement(A, null), /*#__PURE__*/ React.createElement(B, null)));
597
+ "
598
+ `;
599
+
600
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform dynamic-element correctly 1`] = `
601
+ "import _JSXStyle from "styled-jsx/style";
602
+ export default (({ level = 1 })=>{
603
+ const Element = \`h\${level}\`;
604
+ return /*#__PURE__*/ React.createElement(Element, {
605
+ className: "jsx-fca64cc3f069b519" + " " + "root"
606
+ }, /*#__PURE__*/ React.createElement("p", {
607
+ className: "jsx-fca64cc3f069b519"
608
+ }, "dynamic element"), /*#__PURE__*/ React.createElement(_JSXStyle, {
609
+ id: "fca64cc3f069b519"
610
+ }, ".root.jsx-fca64cc3f069b519{background:red}"));
611
+ });
612
+ export const TestLowerCase = ({ level = 1 })=>{
613
+ const element = \`h\${level}\`;
614
+ return /*#__PURE__*/ React.createElement("element", {
615
+ className: "jsx-fca64cc3f069b519" + " " + "root"
616
+ }, /*#__PURE__*/ React.createElement("p", {
617
+ className: "jsx-fca64cc3f069b519"
618
+ }, "dynamic element"), /*#__PURE__*/ React.createElement(_JSXStyle, {
619
+ id: "fca64cc3f069b519"
620
+ }, ".root.jsx-fca64cc3f069b519{background:red}"));
621
+ };
622
+ const Element2 = "div";
623
+ export const Test2 = ()=>{
624
+ return /*#__PURE__*/ React.createElement(Element2, {
625
+ className: "root"
626
+ }, /*#__PURE__*/ React.createElement("p", {
627
+ className: "jsx-fca64cc3f069b519"
628
+ }, "dynamic element"), /*#__PURE__*/ React.createElement(_JSXStyle, {
629
+ id: "fca64cc3f069b519"
630
+ }, ".root.jsx-fca64cc3f069b519{background:red}"));
631
+ };
632
+ export const Test3 = ({ Component = "div" })=>{
633
+ return /*#__PURE__*/ React.createElement(Component, {
634
+ className: "jsx-fca64cc3f069b519"
635
+ }, /*#__PURE__*/ React.createElement("p", {
636
+ className: "jsx-fca64cc3f069b519"
637
+ }, "dynamic element"), /*#__PURE__*/ React.createElement(_JSXStyle, {
638
+ id: "fca64cc3f069b519"
639
+ }, ".root.jsx-fca64cc3f069b519{background:red}"));
640
+ };
641
+ "
642
+ `;
643
+
644
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform dynamic-element-class correctly 1`] = `
645
+ "import _JSXStyle from "styled-jsx/style";
646
+ class _class {
647
+ render() {
648
+ const Element = "div";
649
+ return /*#__PURE__*/ React.createElement(Element, {
650
+ className: "jsx-f825b24bbab5b83b" + " " + "root"
651
+ }, /*#__PURE__*/ React.createElement("p", {
652
+ className: "jsx-f825b24bbab5b83b"
653
+ }, "dynamic element"), /*#__PURE__*/ React.createElement(_JSXStyle, {
654
+ id: "f825b24bbab5b83b"
655
+ }, ".root.jsx-f825b24bbab5b83b{background:red}"));
656
+ }
657
+ }
658
+ export { _class as default };
659
+ const Element2 = "div";
660
+ export const Test2 = class {
661
+ render() {
662
+ return /*#__PURE__*/ React.createElement(Element2, {
663
+ className: "root"
664
+ }, /*#__PURE__*/ React.createElement("p", {
665
+ className: "jsx-f825b24bbab5b83b"
666
+ }, "dynamic element"), /*#__PURE__*/ React.createElement(_JSXStyle, {
667
+ id: "f825b24bbab5b83b"
668
+ }, ".root.jsx-f825b24bbab5b83b{background:red}"));
669
+ }
670
+ };
671
+ "
672
+ `;
673
+
674
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform dynamic-element-external correctly 1`] = `
675
+ "import _JSXStyle from "styled-jsx/style";
676
+ import styles from "./styles2";
677
+ export default (({ level = 1 })=>{
678
+ const Element = \`h\${level}\`;
679
+ return /*#__PURE__*/ React.createElement(Element, {
680
+ className: \`jsx-\${styles.__hash}\` + " " + "root"
681
+ }, /*#__PURE__*/ React.createElement("p", {
682
+ className: \`jsx-\${styles.__hash}\`
683
+ }, "dynamic element"), /*#__PURE__*/ React.createElement(_JSXStyle, {
684
+ id: styles.__hash
685
+ }, styles));
686
+ });
687
+ "
688
+ `;
689
+
690
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform dynamic-this-in-arrow correctly 1`] = `
691
+ "// TODO
692
+ // import React, { Component } from 'react'
693
+ // export default class Index extends Component {
694
+ // static getInitialProps() {
695
+ // return { color: 'aquamarine' }
696
+ // }
697
+ // render() {
698
+ // return (
699
+ // <div>
700
+ // {[1, 2].map(idx => (
701
+ // <div key={idx}>
702
+ // {[3, 4].map(idx2 => (
703
+ // <div key={idx2}>{this.props.color}</div>
704
+ // ))}
705
+ // </div>
706
+ // ))}
707
+ // {[1, 2].map(idx => (
708
+ // <div key={idx}>
709
+ // <div>
710
+ // {this.props.color}
711
+ // <div className="something">
712
+ // <React.Fragment>
713
+ // <div>
714
+ // <div>{this.props.color} hello there</div>
715
+ // </div>
716
+ // </React.Fragment>
717
+ // </div>
718
+ // </div>
719
+ // </div>
720
+ // ))}
721
+ // <style jsx>{\`
722
+ // div {
723
+ // background: \${this.props.color};
724
+ // }
725
+ // \`}</style>
726
+ // </div>
727
+ // )
728
+ // }
729
+ // }
730
+ "
731
+ `;
732
+
733
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform exported-jsx-style correctly 1`] = `
734
+ "// module.exports = () => <p><style jsx>{\`p { color:red; }\`}</style></p>
735
+ "
736
+ `;
737
+
738
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform exported-non-jsx-style correctly 1`] = `
739
+ "// module.exports = () => <p><style>{\`p { color:red; }\`}</style></p>
740
+ "
741
+ `;
742
+
743
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform external-nested-scope correctly 1`] = `
744
+ "import _JSXStyle from "styled-jsx/style";
745
+ function test() {
746
+ ({
747
+ styles: /*#__PURE__*/ React.createElement(_JSXStyle, {
748
+ id: "7b844396f2efe2ef"
749
+ }, "div.jsx-7b844396f2efe2ef{color:red}"),
750
+ className: "jsx-7b844396f2efe2ef"
751
+ });
752
+ }
753
+ "
754
+ `;
755
+
756
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform external-stylesheet correctly 1`] = `
757
+ "import _JSXStyle from "styled-jsx/style";
758
+ import styles from "./styles";
759
+ const styles2 = require("./styles2");
760
+ import { foo as styles3 } from "./styles";
761
+ export default (()=>/*#__PURE__*/ React.createElement("div", {
762
+ className: "jsx-bee92b62eadf8a14 " + \`jsx-\${styles.__hash} jsx-\${styles3.__hash}\`
763
+ }, /*#__PURE__*/ React.createElement("p", {
764
+ className: "jsx-bee92b62eadf8a14 " + \`jsx-\${styles.__hash} jsx-\${styles3.__hash}\` + " " + "foo"
765
+ }, "test"), /*#__PURE__*/ React.createElement("p", {
766
+ className: "jsx-bee92b62eadf8a14 " + \`jsx-\${styles.__hash} jsx-\${styles3.__hash}\`
767
+ }, "woot"), /*#__PURE__*/ React.createElement(_JSXStyle, {
768
+ id: styles2.__hash
769
+ }, styles2), /*#__PURE__*/ React.createElement(_JSXStyle, {
770
+ id: styles3.__hash
771
+ }, styles3), /*#__PURE__*/ React.createElement("div", {
772
+ className: "jsx-bee92b62eadf8a14 " + \`jsx-\${styles.__hash} jsx-\${styles3.__hash}\`
773
+ }, "woot"), /*#__PURE__*/ React.createElement(_JSXStyle, {
774
+ id: "bee92b62eadf8a14"
775
+ }, "p.jsx-bee92b62eadf8a14{color:red}div.jsx-bee92b62eadf8a14{color:green}"), /*#__PURE__*/ React.createElement(_JSXStyle, {
776
+ id: styles.__hash
777
+ }, styles)));
778
+ export const Test = ()=>/*#__PURE__*/ React.createElement("div", {
779
+ className: "jsx-bee92b62eadf8a14 " + \`jsx-\${styles3.__hash}\`
780
+ }, /*#__PURE__*/ React.createElement("p", {
781
+ className: "jsx-bee92b62eadf8a14 " + \`jsx-\${styles3.__hash}\` + " " + "foo"
782
+ }, "test"), /*#__PURE__*/ React.createElement("p", {
783
+ className: "jsx-bee92b62eadf8a14 " + \`jsx-\${styles3.__hash}\`
784
+ }, "woot"), /*#__PURE__*/ React.createElement(_JSXStyle, {
785
+ id: styles3.__hash
786
+ }, styles3), /*#__PURE__*/ React.createElement("div", {
787
+ className: "jsx-bee92b62eadf8a14 " + \`jsx-\${styles3.__hash}\`
788
+ }, "woot"), /*#__PURE__*/ React.createElement(_JSXStyle, {
789
+ id: "bee92b62eadf8a14"
790
+ }, "p.jsx-bee92b62eadf8a14{color:red}div.jsx-bee92b62eadf8a14{color:green}"));
791
+ "
792
+ `;
793
+
794
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform external-stylesheet-global correctly 1`] = `
795
+ "import _JSXStyle from "styled-jsx/style";
796
+ import styles, { foo as styles3 } from "./styles";
797
+ const styles2 = require("./styles2");
798
+ export default (()=>/*#__PURE__*/ React.createElement("div", null, /*#__PURE__*/ React.createElement("p", null, "test"), /*#__PURE__*/ React.createElement("div", null, "woot"), /*#__PURE__*/ React.createElement("p", null, "woot"), /*#__PURE__*/ React.createElement(_JSXStyle, {
799
+ id: styles2.__hash
800
+ }, styles2), /*#__PURE__*/ React.createElement(_JSXStyle, {
801
+ id: styles3.__hash
802
+ }, styles3), /*#__PURE__*/ React.createElement(_JSXStyle, {
803
+ id: styles.__hash
804
+ }, styles)));
805
+ "
806
+ `;
807
+
808
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform external-stylesheet-multi-line correctly 1`] = `
809
+ "import _JSXStyle from "styled-jsx/style";
810
+ import styles from "./styles";
811
+ export default (()=>/*#__PURE__*/ React.createElement("div", {
812
+ className: \`jsx-\${styles.__hash}\`
813
+ }, /*#__PURE__*/ React.createElement("p", {
814
+ className: \`jsx-\${styles.__hash}\`
815
+ }, "test"), /*#__PURE__*/ React.createElement(_JSXStyle, {
816
+ id: styles.__hash
817
+ }, styles)));
818
+ "
819
+ `;
820
+
821
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform fragment correctly 1`] = `
822
+ "import _JSXStyle from "styled-jsx/style";
823
+ import React from "react";
824
+ export default (()=>/*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("p", {
825
+ className: "jsx-6dd5f97e085c0297"
826
+ }, "Testing!!!"), /*#__PURE__*/ React.createElement("p", {
827
+ className: "jsx-6dd5f97e085c0297" + " " + "foo"
828
+ }, "Bar"), /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("h3", {
829
+ id: "head",
830
+ className: "jsx-6dd5f97e085c0297"
831
+ }, "Title..."), /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("p", {
832
+ className: "jsx-6dd5f97e085c0297"
833
+ }, "hello"), /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("p", {
834
+ className: "jsx-6dd5f97e085c0297"
835
+ }, "foo"), /*#__PURE__*/ React.createElement("p", {
836
+ className: "jsx-6dd5f97e085c0297"
837
+ }, "bar")), /*#__PURE__*/ React.createElement("p", {
838
+ className: "jsx-6dd5f97e085c0297"
839
+ }, "world"))), /*#__PURE__*/ React.createElement(_JSXStyle, {
840
+ id: "6dd5f97e085c0297"
841
+ }, "p.jsx-6dd5f97e085c0297{color:cyan}.foo.jsx-6dd5f97e085c0297{font-size:18px;color:hotpink}#head.jsx-6dd5f97e085c0297{text-decoration:underline}")));
842
+ function Component1() {
843
+ return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("div", null, "test"));
844
+ }
845
+ function Component2() {
846
+ return /*#__PURE__*/ React.createElement("div", {
847
+ className: "jsx-678f41ca6d3b294b"
848
+ }, /*#__PURE__*/ React.createElement(_JSXStyle, {
849
+ id: "678f41ca6d3b294b"
850
+ }, "div.jsx-678f41ca6d3b294b{color:red}"));
851
+ }
852
+ "
853
+ `;
854
+
855
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform global correctly 1`] = `
856
+ "import _JSXStyle from "styled-jsx/style";
857
+ const Test = ()=>/*#__PURE__*/ React.createElement("div", {
858
+ className: "jsx-f84dd0db2f59ea88"
859
+ }, /*#__PURE__*/ React.createElement(_JSXStyle, {
860
+ id: "f84dd0db2f59ea88"
861
+ }, "body{color:red}:hover{color:red;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-animation:foo 1s ease-out;-moz-animation:foo 1s ease-out;-o-animation:foo 1s ease-out;animation:foo 1s ease-out}div a{display:none}[data-test]>div{color:red}"));
862
+ const Test2 = ()=>/*#__PURE__*/ React.createElement(_JSXStyle, {
863
+ id: "94239b6d6b42c9b5"
864
+ }, "p{color:red}");
865
+ "
866
+ `;
867
+
868
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform global-child-selector correctly 1`] = `
869
+ "import _JSXStyle from "styled-jsx/style";
870
+ const Test = ()=>/*#__PURE__*/ React.createElement("div", {
871
+ className: "jsx-5a206f122d1cb32e"
872
+ }, /*#__PURE__*/ React.createElement("span", {
873
+ className: "jsx-5a206f122d1cb32e"
874
+ }, "test"), /*#__PURE__*/ React.createElement(_JSXStyle, {
875
+ id: "5a206f122d1cb32e"
876
+ }, "div.jsx-5a206f122d1cb32e>span{color:red}"));
877
+ "
878
+ `;
879
+
880
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform global-redundant correctly 1`] = `
881
+ "import _JSXStyle from "styled-jsx/style";
882
+ export default function IndexPage() {
883
+ return /*#__PURE__*/ React.createElement("div", {
884
+ className: "jsx-b6abd0684ba81871"
885
+ }, "should be blue.", /*#__PURE__*/ React.createElement(_JSXStyle, {
886
+ id: "b6abd0684ba81871"
887
+ }, "div{color:blue}"));
888
+ }
889
+ "
890
+ `;
891
+
892
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform issue--317 correctly 1`] = `
893
+ "import _JSXStyle from "styled-jsx/style";
894
+ export const MyComponent = ()=>/*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("div", {
895
+ className: "jsx-98442910aac83b4a"
896
+ }), /*#__PURE__*/ React.createElement(_JSXStyle, {
897
+ id: "98442910aac83b4a"
898
+ }, "div.jsx-98442910aac83b4a{background-image:url(\\"data:image/svg+xml,%3Csvg stroke='currentColor' fill='currentColor' stroke-width='0' viewBox='0 0 24 24' height='1em' width='1em' xmlns='http://www.w3.org/2000/svg'%3E%3Cg%3E%3Cpath fill='none' d='M0 0h24v24H0z'%3E%3C/path%3E%3Cpath d='M17 3h4a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h4V1h2v2h6V1h2v2zm3 6V5h-3v2h-2V5H9v2H7V5H4v4h16zm0 2H4v8h16v-8zM6 13h5v4H6v-4z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E%0A\\")}"));
899
+ "
900
+ `;
901
+
902
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform issue-30480 correctly 1`] = `
903
+ "import _JSXStyle from "styled-jsx/style";
904
+ export default (({ breakPoint })=>/*#__PURE__*/ React.createElement("div", {
905
+ className: _JSXStyle.dynamic([
906
+ [
907
+ "5f9d9d6c208bf9e0",
908
+ [
909
+ breakPoint
910
+ ]
911
+ ]
912
+ ])
913
+ }, /*#__PURE__*/ React.createElement(_JSXStyle, {
914
+ id: "5f9d9d6c208bf9e0",
915
+ dynamic: [
916
+ breakPoint
917
+ ]
918
+ }, \`@media(\${breakPoint}){.test.__jsx-style-dynamic-selector{margin-bottom:1em}}\`)));
919
+ "
920
+ `;
921
+
922
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform issue-30570 correctly 1`] = `
923
+ "import _JSXStyle from "styled-jsx/style";
924
+ export default function IndexPage() {
925
+ return /*#__PURE__*/ React.createElement("div", {
926
+ className: "jsx-6226396a225d1c8b"
927
+ }, /*#__PURE__*/ React.createElement("h1", {
928
+ className: "jsx-6226396a225d1c8b"
929
+ }, "Hello World."), /*#__PURE__*/ React.createElement(_JSXStyle, {
930
+ id: "6226396a225d1c8b"
931
+ }, "@supports((display:flex)or (display:-webkit-box)or (display:-webkit-flex)or (display:-moz-box)or (display:-ms-flexbox)){h1{color:hotpink}}"));
932
+ }
933
+ "
934
+ `;
935
+
936
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform issue-31562-interpolation-in-mdea correctly 1`] = `
937
+ "import _JSXStyle from "styled-jsx/style";
938
+ class _class {
939
+ render() {
940
+ return /*#__PURE__*/ React.createElement("div", {
941
+ className: _JSXStyle.dynamic([
942
+ [
943
+ "8ef51f7b1531565",
944
+ [
945
+ Typography.base.size.default,
946
+ Typography.base.lineHeight,
947
+ Target.mediumPlus,
948
+ Typography.base.size.mediumPlus,
949
+ Target.largePlus,
950
+ Typography.base.size.largePlus
951
+ ]
952
+ ]
953
+ ])
954
+ }, /*#__PURE__*/ React.createElement("p", {
955
+ className: _JSXStyle.dynamic([
956
+ [
957
+ "8ef51f7b1531565",
958
+ [
959
+ Typography.base.size.default,
960
+ Typography.base.lineHeight,
961
+ Target.mediumPlus,
962
+ Typography.base.size.mediumPlus,
963
+ Target.largePlus,
964
+ Typography.base.size.largePlus
965
+ ]
966
+ ]
967
+ ])
968
+ }, "test"), /*#__PURE__*/ React.createElement(_JSXStyle, {
969
+ id: "8ef51f7b1531565",
970
+ dynamic: [
971
+ Typography.base.size.default,
972
+ Typography.base.lineHeight,
973
+ Target.mediumPlus,
974
+ Typography.base.size.mediumPlus,
975
+ Target.largePlus,
976
+ Typography.base.size.largePlus
977
+ ]
978
+ }, \`html{font-size:\${Typography.base.size.default};line-height:\${Typography.base.lineHeight}}@media \${Target.mediumPlus}{html{font-size:\${Typography.base.size.mediumPlus}}}@media \${Target.largePlus}{html{font-size:\${Typography.base.size.largePlus}}}\`));
979
+ }
980
+ }
981
+ export { _class as default };
982
+ "
983
+ `;
984
+
985
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform mixed-global-scoped correctly 1`] = `
986
+ "import _JSXStyle from "styled-jsx/style";
987
+ const Test = ()=>/*#__PURE__*/ React.createElement(_JSXStyle, {
988
+ id: "94239b6d6b42c9b5"
989
+ }, "p{color:red}");
990
+ export default (()=>/*#__PURE__*/ React.createElement("div", {
991
+ className: "jsx-8de09a4a01c37bbf"
992
+ }, /*#__PURE__*/ React.createElement("p", {
993
+ className: "jsx-8de09a4a01c37bbf"
994
+ }, "test"), /*#__PURE__*/ React.createElement(_JSXStyle, {
995
+ id: "80dff25115d29c0e"
996
+ }, "body{background:red}"), /*#__PURE__*/ React.createElement(_JSXStyle, {
997
+ id: "94239b6d6b42c9b5"
998
+ }, "p.jsx-8de09a4a01c37bbf{color:red}")));
999
+ "
1000
+ `;
1001
+
1002
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform multiple-jsx correctly 1`] = `
1003
+ "import _JSXStyle from "styled-jsx/style";
1004
+ const attrs = {
1005
+ id: "test"
1006
+ };
1007
+ const Test1 = ()=>/*#__PURE__*/ React.createElement("div", {
1008
+ className: "jsx-a9535d7d5f32c3c4"
1009
+ }, /*#__PURE__*/ React.createElement("span", {
1010
+ ...attrs,
1011
+ "data-test": "test",
1012
+ className: "jsx-a9535d7d5f32c3c4" + " " + (attrs && attrs.className != null && attrs.className || "")
1013
+ }, "test"), /*#__PURE__*/ React.createElement(Component, null), /*#__PURE__*/ React.createElement(_JSXStyle, {
1014
+ id: "a9535d7d5f32c3c4"
1015
+ }, "span.jsx-a9535d7d5f32c3c4{color:red}"));
1016
+ const Test2 = ()=>/*#__PURE__*/ React.createElement("span", null, "test");
1017
+ const Test3 = ()=>/*#__PURE__*/ React.createElement("div", {
1018
+ className: "jsx-a9535d7d5f32c3c4"
1019
+ }, /*#__PURE__*/ React.createElement("span", {
1020
+ className: "jsx-a9535d7d5f32c3c4"
1021
+ }, "test"), /*#__PURE__*/ React.createElement(_JSXStyle, {
1022
+ id: "a9535d7d5f32c3c4"
1023
+ }, "span.jsx-a9535d7d5f32c3c4{color:red}"));
1024
+ class _class {
1025
+ render() {
1026
+ return /*#__PURE__*/ React.createElement("div", {
1027
+ className: "jsx-b2b86d63f35d25ee"
1028
+ }, /*#__PURE__*/ React.createElement("p", {
1029
+ className: "jsx-b2b86d63f35d25ee"
1030
+ }, "test"), /*#__PURE__*/ React.createElement(_JSXStyle, {
1031
+ id: "b2b86d63f35d25ee"
1032
+ }, "p.jsx-b2b86d63f35d25ee{color:red}"));
1033
+ }
1034
+ }
1035
+ export { _class as default };
1036
+ "
1037
+ `;
1038
+
1039
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform next-54653 correctly 1`] = `
1040
+ "const _defaultExport = new String("@media(max-width:870px){th.expiration-date-cell,td.expiration-date-cell{display:none}}");
1041
+ _defaultExport.__hash = "fd71bf06ba8860bb";
1042
+ export default _defaultExport;
1043
+ "
1044
+ `;
1045
+
1046
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform next-55679 correctly 1`] = `
1047
+ "import _JSXStyle from "styled-jsx/style";
1048
+ import { AppProps } from "next/app";
1049
+ const someVar = "--var-1";
1050
+ export default function App({ Component, pageProps }) {
1051
+ return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(_JSXStyle, {
1052
+ id: "acc68473fe2ae892"
1053
+ }, \`:root{\${someVar}:red;background-color:var(\${someVar})}\`), /*#__PURE__*/ React.createElement(Component, {
1054
+ ...pageProps,
1055
+ className: "jsx-acc68473fe2ae892" + " " + (pageProps && pageProps.className != null && pageProps.className || "")
1056
+ }));
1057
+ }
1058
+ "
1059
+ `;
1060
+
1061
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform next-61788 correctly 1`] = `
1062
+ "import _JSXStyle from "styled-jsx/style";
1063
+ const MOBILE_MAX = 767;
1064
+ export default function Home() {
1065
+ return /*#__PURE__*/ React.createElement("div", {
1066
+ className: _JSXStyle.dynamic([
1067
+ [
1068
+ "cd44ce38d77d54f1",
1069
+ [
1070
+ MOBILE_MAX
1071
+ ]
1072
+ ]
1073
+ ])
1074
+ }, /*#__PURE__*/ React.createElement("h1", {
1075
+ className: _JSXStyle.dynamic([
1076
+ [
1077
+ "cd44ce38d77d54f1",
1078
+ [
1079
+ MOBILE_MAX
1080
+ ]
1081
+ ]
1082
+ ]) + " " + "header"
1083
+ }, "Hello"), /*#__PURE__*/ React.createElement(_JSXStyle, {
1084
+ id: "cd44ce38d77d54f1",
1085
+ dynamic: [
1086
+ MOBILE_MAX
1087
+ ]
1088
+ }, \`.header.__jsx-style-dynamic-selector{font-size:48px}@media screen and (max-width:\${MOBILE_MAX}px){.header.__jsx-style-dynamic-selector{font-size:12px}}\`));
1089
+ }
1090
+ "
1091
+ `;
1092
+
1093
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform next-64389 correctly 1`] = `
1094
+ ""use client";
1095
+ import _JSXStyle from "styled-jsx/style";
1096
+ const color = "color: red;";
1097
+ export default function RootLayout({ children }) {
1098
+ return /*#__PURE__*/ React.createElement("html", {
1099
+ className: "jsx-7813f497af86b7a2"
1100
+ }, /*#__PURE__*/ React.createElement("head", {
1101
+ className: "jsx-7813f497af86b7a2"
1102
+ }), /*#__PURE__*/ React.createElement("body", {
1103
+ className: "jsx-7813f497af86b7a2"
1104
+ }, children), /*#__PURE__*/ React.createElement(_JSXStyle, {
1105
+ id: "7813f497af86b7a2"
1106
+ }, \`body{\${color}}body p{font-size:72px}\`));
1107
+ }
1108
+ "
1109
+ `;
1110
+
1111
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform non-styled-jsx-style correctly 1`] = `
1112
+ "import _JSXStyle from "styled-jsx/style";
1113
+ export default (()=>/*#__PURE__*/ React.createElement("div", {
1114
+ className: "jsx-94239b6d6b42c9b5"
1115
+ }, /*#__PURE__*/ React.createElement("p", {
1116
+ className: "jsx-94239b6d6b42c9b5"
1117
+ }, "woot"), /*#__PURE__*/ React.createElement("style", {
1118
+ dangerouslySetInnerHTML: {
1119
+ __html: \`body { margin: 0; }\`
1120
+ }
1121
+ }), /*#__PURE__*/ React.createElement(_JSXStyle, {
1122
+ id: "94239b6d6b42c9b5"
1123
+ }, "p.jsx-94239b6d6b42c9b5{color:red}")));
1124
+ "
1125
+ `;
1126
+
1127
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform not-styled-jsx-tagged-templates correctly 1`] = `
1128
+ "import css from "hell";
1129
+ const color = "red";
1130
+ const bar = css\`
1131
+ div {
1132
+ font-size: 3em;
1133
+ }
1134
+ \`;
1135
+ export const uh = bar;
1136
+ export const foo = css\`
1137
+ div {
1138
+ color: \${color};
1139
+ }
1140
+ \`;
1141
+ export default css\`
1142
+ div {
1143
+ font-size: 3em;
1144
+ }
1145
+ p {
1146
+ color: \${color};
1147
+ }
1148
+ \`;
1149
+ const Title = styled.h1\`
1150
+ color: red;
1151
+ font-size: 50px;
1152
+ \`;
1153
+ const AnotherTitle = Title.extend\`
1154
+ color: blue;
1155
+ \`;
1156
+ export const Component = ()=>/*#__PURE__*/ React.createElement(AnotherTitle, null, "My page");
1157
+ "
1158
+ `;
1159
+
1160
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform number-after-placeholder correctly 1`] = `
1161
+ "import _JSXStyle from "styled-jsx/style";
1162
+ import Link from "next/link";
1163
+ export default function IndexPage() {
1164
+ return /*#__PURE__*/ React.createElement("div", {
1165
+ className: "jsx-c52d3257f955c0e4"
1166
+ }, "Hello World.", " ", /*#__PURE__*/ React.createElement(Link, {
1167
+ href: "/about"
1168
+ }, /*#__PURE__*/ React.createElement("a", {
1169
+ className: "jsx-c52d3257f955c0e4"
1170
+ }, "Abound")), /*#__PURE__*/ React.createElement(_JSXStyle, {
1171
+ id: "c52d3257f955c0e4"
1172
+ }, \`a.jsx-c52d3257f955c0e4{color:\${"#abcdef"}12}\`));
1173
+ }
1174
+ "
1175
+ `;
1176
+
1177
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform one-off-global-selectors correctly 1`] = `
1178
+ "import _JSXStyle from "styled-jsx/style";
1179
+ export default (()=>/*#__PURE__*/ React.createElement("div", {
1180
+ className: "jsx-c7c3a8e231c9215a"
1181
+ }, /*#__PURE__*/ React.createElement("p", {
1182
+ className: "jsx-c7c3a8e231c9215a"
1183
+ }, "test"), /*#__PURE__*/ React.createElement(_JSXStyle, {
1184
+ id: "c7c3a8e231c9215a"
1185
+ }, ".container.jsx-c7c3a8e231c9215a>*{color:red}")));
1186
+ "
1187
+ `;
1188
+
1189
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform pack-2714 correctly 1`] = `
1190
+ "import _JSXStyle from "styled-jsx/style";
1191
+ const { className: cardClassName, styles } = {
1192
+ styles: /*#__PURE__*/ React.createElement(_JSXStyle, {
1193
+ id: "764ef3f9149f0521"
1194
+ }, \`.jsx-764ef3f9149f0521:hover{z-index:\${hoverAnimation ? "1" : "auto"}}\`),
1195
+ className: "jsx-764ef3f9149f0521"
1196
+ };
1197
+ "
1198
+ `;
1199
+
1200
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform pack-2819 correctly 1`] = `
1201
+ "import _JSXStyle from "styled-jsx/style";
1202
+ export default (()=>/*#__PURE__*/ React.createElement("div", {
1203
+ className: "jsx-d3bc3634b8d1b3fb"
1204
+ }, /*#__PURE__*/ React.createElement("p", {
1205
+ className: "jsx-d3bc3634b8d1b3fb"
1206
+ }, "test"), /*#__PURE__*/ React.createElement("p", {
1207
+ className: "jsx-d3bc3634b8d1b3fb"
1208
+ }, "woot"), /*#__PURE__*/ React.createElement("p", {
1209
+ className: "jsx-d3bc3634b8d1b3fb"
1210
+ }, "woot"), /*#__PURE__*/ React.createElement(_JSXStyle, {
1211
+ id: "d3bc3634b8d1b3fb"
1212
+ }, ".container.jsx-d3bc3634b8d1b3fb{color:blue;padding:3rem}.container.jsx-d3bc3634b8d1b3fb.inner.jsx-d3bc3634b8d1b3fb{color:yellow}")));
1213
+ "
1214
+ `;
1215
+
1216
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform source-maps correctly 1`] = `
1217
+ "// TODO: needs sourcemaps
1218
+ // export default () => (
1219
+ // <div>
1220
+ // <p>test</p>
1221
+ // <p>woot</p>
1222
+ // <style jsx>{'p { color: red }'}</style>
1223
+ // </div>
1224
+ // )
1225
+ "
1226
+ `;
1227
+
1228
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform stateless correctly 1`] = `
1229
+ "import _JSXStyle from "styled-jsx/style";
1230
+ export default (()=>/*#__PURE__*/ React.createElement("div", {
1231
+ className: "jsx-94239b6d6b42c9b5"
1232
+ }, /*#__PURE__*/ React.createElement("p", {
1233
+ className: "jsx-94239b6d6b42c9b5"
1234
+ }, "test"), /*#__PURE__*/ React.createElement("p", {
1235
+ className: "jsx-94239b6d6b42c9b5"
1236
+ }, "woot"), /*#__PURE__*/ React.createElement("p", {
1237
+ className: "jsx-94239b6d6b42c9b5"
1238
+ }, "woot"), /*#__PURE__*/ React.createElement(_JSXStyle, {
1239
+ id: "94239b6d6b42c9b5"
1240
+ }, "p.jsx-94239b6d6b42c9b5{color:red}")));
1241
+ "
1242
+ `;
1243
+
1244
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform styles correctly 1`] = `
1245
+ "import _JSXStyle from "styled-jsx/style";
1246
+ import colors, { size } from "./constants";
1247
+ const color = "red";
1248
+ const bar = new String("div.jsx-aaed0341accea8f{font-size:3em}");
1249
+ bar.__hash = "aaed0341accea8f";
1250
+ const baz = new String("div{font-size:3em}");
1251
+ baz.__hash = "aaed0341accea8f";
1252
+ const a = new String(\`div{font-size:\${size}em}\`);
1253
+ a.__hash = "7c86155cabf5dc29";
1254
+ export const uh = bar;
1255
+ export const foo = new String(\`div.jsx-94c5b10770851b72{color:\${color}}\`);
1256
+ foo.__hash = "94c5b10770851b72";
1257
+ ({
1258
+ styles: /*#__PURE__*/ React.createElement(_JSXStyle, {
1259
+ id: "7cf3236ca7e1da12"
1260
+ }, \`div.jsx-7cf3236ca7e1da12{color:\${colors.green.light}}a.jsx-7cf3236ca7e1da12{color:red}\`),
1261
+ className: "jsx-7cf3236ca7e1da12"
1262
+ });
1263
+ const b = {
1264
+ styles: /*#__PURE__*/ React.createElement(_JSXStyle, {
1265
+ id: "5b414b974635264"
1266
+ }, \`div.jsx-5b414b974635264{color:\${colors.green.light}}a.jsx-5b414b974635264{color:red}\`),
1267
+ className: "jsx-5b414b974635264"
1268
+ };
1269
+ const dynamic = (colors)=>{
1270
+ const b = {
1271
+ styles: /*#__PURE__*/ React.createElement(_JSXStyle, {
1272
+ id: "b396cc7974579919",
1273
+ dynamic: [
1274
+ colors.green.light
1275
+ ]
1276
+ }, \`div.__jsx-style-dynamic-selector{color:\${colors.green.light}}a.__jsx-style-dynamic-selector{color:red}\`),
1277
+ className: _JSXStyle.dynamic([
1278
+ [
1279
+ "b396cc7974579919",
1280
+ [
1281
+ colors.green.light
1282
+ ]
1283
+ ]
1284
+ ])
1285
+ };
1286
+ };
1287
+ export default {
1288
+ styles: /*#__PURE__*/ React.createElement(_JSXStyle, {
1289
+ id: "b4488421eff98e80"
1290
+ }, \`div.jsx-b4488421eff98e80{font-size:3em}p.jsx-b4488421eff98e80{color:\${color}}\`),
1291
+ className: "jsx-b4488421eff98e80"
1292
+ };
1293
+ "
1294
+ `;
1295
+
1296
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform styles-external-invalid correctly 1`] = `
1297
+ "// TODO
1298
+ // import css from 'styled-jsx/css'
1299
+ // const color = 'red'
1300
+ // export const foo = css\`div { color: \${color}}\`
1301
+ // const props = { color: 'red ' }
1302
+ // export default css\`
1303
+ // div { font-size: 3em; color: \${props.color} }
1304
+ // p { color: \${this.props.color};}
1305
+ // \`
1306
+ "
1307
+ `;
1308
+
1309
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform styles-external-invalid2 correctly 1`] = `
1310
+ "// TODO
1311
+ // import css from 'styled-jsx/css'
1312
+ // const color = 'red'
1313
+ // export const foo = css\`div { color: \${color}}\`
1314
+ // export default css\`
1315
+ // div { font-size: 3em }
1316
+ // p { color: \${props.color};}
1317
+ // \`
1318
+ "
1319
+ `;
1320
+
1321
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform styles2 correctly 1`] = `
1322
+ "// TODO: support common js
1323
+ // import css from 'styled-jsx/css'
1324
+ // module.exports = css\`
1325
+ // div { font-size: 3em }
1326
+ // \`
1327
+ "
1328
+ `;
1329
+
1330
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform too-many correctly 1`] = `
1331
+ "import _JSXStyle from "styled-jsx/style";
1332
+ export const Red = ({ Component = "button" })=>{
1333
+ return /*#__PURE__*/ React.createElement(Component, {
1334
+ className: _JSXStyle.dynamic([
1335
+ [
1336
+ "5a2b0b6f23b33f9",
1337
+ [
1338
+ e1,
1339
+ e2,
1340
+ e3,
1341
+ e4,
1342
+ e5,
1343
+ e6,
1344
+ e7,
1345
+ e8,
1346
+ e9,
1347
+ e10,
1348
+ e11,
1349
+ e12,
1350
+ e13,
1351
+ e14,
1352
+ e15
1353
+ ]
1354
+ ]
1355
+ ])
1356
+ }, /*#__PURE__*/ React.createElement(_JSXStyle, {
1357
+ id: "5a2b0b6f23b33f9",
1358
+ dynamic: [
1359
+ e1,
1360
+ e2,
1361
+ e3,
1362
+ e4,
1363
+ e5,
1364
+ e6,
1365
+ e7,
1366
+ e8,
1367
+ e9,
1368
+ e10,
1369
+ e11,
1370
+ e12,
1371
+ e13,
1372
+ e14,
1373
+ e15
1374
+ ]
1375
+ }, \`.button.__jsx-style-dynamic-selector{--button-1:\${e1};--button-2:\${e2};--button-3:\${e3};--button-4:\${e4};--button-5:\${e5};--button-6:\${e6};--button-7:\${e7};--button-8:\${e8};--button-9:\${e9};--button-10:\${e10};--button-11:\${e11};--button-12:\${e12};--button-13:\${e13};--button-14:\${e14};--button-15:\${e15}}\`));
1376
+ };
1377
+ "
1378
+ `;
1379
+
1380
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform tpl-escape-1 correctly 1`] = `
1381
+ "import _JSXStyle from "styled-jsx/style";
1382
+ class _class {
1383
+ render() {
1384
+ return /*#__PURE__*/ React.createElement("div", {
1385
+ className: "jsx-71816f8e3c42a736"
1386
+ }, /*#__PURE__*/ React.createElement("p", {
1387
+ className: "jsx-71816f8e3c42a736"
1388
+ }, "test"), /*#__PURE__*/ React.createElement(_JSXStyle, {
1389
+ id: "71816f8e3c42a736"
1390
+ }, 'p.jsx-71816f8e3c42a736{content:"\`"}'));
1391
+ }
1392
+ }
1393
+ export { _class as default };
1394
+ "
1395
+ `;
1396
+
1397
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform tpl-escape-2 correctly 1`] = `
1398
+ "import _JSXStyle from "styled-jsx/style";
1399
+ export default function Home({ fontFamily }) {
1400
+ return /*#__PURE__*/ React.createElement("div", {
1401
+ className: _JSXStyle.dynamic([
1402
+ [
1403
+ "d3142704be9609d2",
1404
+ [
1405
+ fontFamily
1406
+ ]
1407
+ ]
1408
+ ])
1409
+ }, /*#__PURE__*/ React.createElement(_JSXStyle, {
1410
+ id: "d3142704be9609d2",
1411
+ dynamic: [
1412
+ fontFamily
1413
+ ]
1414
+ }, \`body{font-family:\${fontFamily}}code:before,code:after{content:"\\\`"}\`));
1415
+ }
1416
+ "
1417
+ `;
1418
+
1419
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform tpl-placeholder-1-as-property correctly 1`] = `
1420
+ "import _JSXStyle from "styled-jsx/style";
1421
+ class _class {
1422
+ render() {
1423
+ return /*#__PURE__*/ React.createElement("div", {
1424
+ className: _JSXStyle.dynamic([
1425
+ [
1426
+ "f9aa00e7cff3b4b",
1427
+ [
1428
+ inputSize ? "height: calc(2 * var(--a)) !important;" : ""
1429
+ ]
1430
+ ]
1431
+ ])
1432
+ }, /*#__PURE__*/ React.createElement("p", {
1433
+ className: _JSXStyle.dynamic([
1434
+ [
1435
+ "f9aa00e7cff3b4b",
1436
+ [
1437
+ inputSize ? "height: calc(2 * var(--a)) !important;" : ""
1438
+ ]
1439
+ ]
1440
+ ])
1441
+ }, "test"), /*#__PURE__*/ React.createElement(_JSXStyle, {
1442
+ id: "f9aa00e7cff3b4b",
1443
+ dynamic: [
1444
+ inputSize ? "height: calc(2 * var(--a)) !important;" : ""
1445
+ ]
1446
+ }, \`@media only screen{a.__jsx-style-dynamic-selector{\${inputSize ? "height: calc(2 * var(--a)) !important;" : ""}}}\`));
1447
+ }
1448
+ }
1449
+ export { _class as default };
1450
+ "
1451
+ `;
1452
+
1453
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform tpl-placeholder-2-as-part-of-value correctly 1`] = `
1454
+ "import _JSXStyle from "styled-jsx/style";
1455
+ class _class {
1456
+ render() {
1457
+ return /*#__PURE__*/ React.createElement("div", {
1458
+ className: _JSXStyle.dynamic([
1459
+ [
1460
+ "c78f5a8771ac2a3b",
1461
+ [
1462
+ a[b],
1463
+ -1 * (c || 0),
1464
+ d
1465
+ ]
1466
+ ]
1467
+ ])
1468
+ }, /*#__PURE__*/ React.createElement("p", {
1469
+ className: _JSXStyle.dynamic([
1470
+ [
1471
+ "c78f5a8771ac2a3b",
1472
+ [
1473
+ a[b],
1474
+ -1 * (c || 0),
1475
+ d
1476
+ ]
1477
+ ]
1478
+ ])
1479
+ }, "test"), /*#__PURE__*/ React.createElement(_JSXStyle, {
1480
+ id: "c78f5a8771ac2a3b",
1481
+ dynamic: [
1482
+ a[b],
1483
+ -1 * (c || 0),
1484
+ d
1485
+ ]
1486
+ }, \`.a:hover .b.__jsx-style-dynamic-selector{a:\${a[b]}px!important;b:translate3d(0,\${-1 * (c || 0)}px,-\${d}px)scale(1)!important}\`));
1487
+ }
1488
+ }
1489
+ export { _class as default };
1490
+ "
1491
+ `;
1492
+
1493
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform tpl-placeholder-3-as-value correctly 1`] = `
1494
+ "import _JSXStyle from "styled-jsx/style";
1495
+ class _class {
1496
+ render() {
1497
+ return /*#__PURE__*/ React.createElement("div", {
1498
+ className: _JSXStyle.dynamic([
1499
+ [
1500
+ "eee2d2bddf546a68",
1501
+ [
1502
+ a
1503
+ ]
1504
+ ]
1505
+ ])
1506
+ }, /*#__PURE__*/ React.createElement("p", {
1507
+ className: _JSXStyle.dynamic([
1508
+ [
1509
+ "eee2d2bddf546a68",
1510
+ [
1511
+ a
1512
+ ]
1513
+ ]
1514
+ ])
1515
+ }, "test"), /*#__PURE__*/ React.createElement(_JSXStyle, {
1516
+ id: "eee2d2bddf546a68",
1517
+ dynamic: [
1518
+ a
1519
+ ]
1520
+ }, \`@media only screen{a.__jsx-style-dynamic-selector{color:\${a}}}\`));
1521
+ }
1522
+ }
1523
+ export { _class as default };
1524
+ "
1525
+ `;
1526
+
1527
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform tpl-placeholder-4-as-part-of-value-in-multiple correctly 1`] = `
1528
+ "import _JSXStyle from "styled-jsx/style";
1529
+ class _class {
1530
+ render() {
1531
+ return /*#__PURE__*/ React.createElement("div", {
1532
+ className: _JSXStyle.dynamic([
1533
+ [
1534
+ "78e5427773a40a7d",
1535
+ [
1536
+ a || "var(--c)",
1537
+ b || "inherit"
1538
+ ]
1539
+ ]
1540
+ ])
1541
+ }, /*#__PURE__*/ React.createElement("p", {
1542
+ className: _JSXStyle.dynamic([
1543
+ [
1544
+ "78e5427773a40a7d",
1545
+ [
1546
+ a || "var(--c)",
1547
+ b || "inherit"
1548
+ ]
1549
+ ]
1550
+ ])
1551
+ }, "test"), /*#__PURE__*/ React.createElement(_JSXStyle, {
1552
+ id: "78e5427773a40a7d",
1553
+ dynamic: [
1554
+ a || "var(--c)",
1555
+ b || "inherit"
1556
+ ]
1557
+ }, \`.a:hover .b.__jsx-style-dynamic-selector{display:inline-block;padding:0 \${a || "var(--c)"};color:\${b || "inherit"}}\`));
1558
+ }
1559
+ }
1560
+ export { _class as default };
1561
+ "
1562
+ `;
1563
+
1564
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform tpl-placeholder-5-values-of-multiple-properties correctly 1`] = `
1565
+ "import _JSXStyle from "styled-jsx/style";
1566
+ class _class {
1567
+ render() {
1568
+ return /*#__PURE__*/ React.createElement("div", {
1569
+ className: _JSXStyle.dynamic([
1570
+ [
1571
+ "37d42e5b6f9d65f8",
1572
+ [
1573
+ a ? "100%" : "200px",
1574
+ b ? "0" : "8px 20px"
1575
+ ]
1576
+ ]
1577
+ ])
1578
+ }, /*#__PURE__*/ React.createElement("p", {
1579
+ className: _JSXStyle.dynamic([
1580
+ [
1581
+ "37d42e5b6f9d65f8",
1582
+ [
1583
+ a ? "100%" : "200px",
1584
+ b ? "0" : "8px 20px"
1585
+ ]
1586
+ ]
1587
+ ])
1588
+ }, "test"), /*#__PURE__*/ React.createElement(_JSXStyle, {
1589
+ id: "37d42e5b6f9d65f8",
1590
+ dynamic: [
1591
+ a ? "100%" : "200px",
1592
+ b ? "0" : "8px 20px"
1593
+ ]
1594
+ }, \`.item.__jsx-style-dynamic-selector{max-width:\${a ? "100%" : "200px"};padding:\${b ? "0" : "8px 20px"}}\`));
1595
+ }
1596
+ }
1597
+ export { _class as default };
1598
+ "
1599
+ `;
1600
+
1601
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform transform-css correctly 1`] = `
1602
+ "import _JSXStyle from "styled-jsx/style";
1603
+ export default (()=>/*#__PURE__*/ React.createElement("div", {
1604
+ className: "jsx-374655937fd2de40"
1605
+ }, /*#__PURE__*/ React.createElement("p", {
1606
+ className: "jsx-374655937fd2de40"
1607
+ }, "test"), /*#__PURE__*/ React.createElement(_JSXStyle, {
1608
+ id: "374655937fd2de40"
1609
+ }, 'html.jsx-374655937fd2de40{background-image:-webkit-linear-gradient(bottom,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg);background-image:-moz-linear-gradient(bottom,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg);background-image:-o-linear-gradient(bottom,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg);background-image:linear-gradient(0deg,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg)}p{color:#001}p{color:#002}p,a.jsx-374655937fd2de40{color:#003}.foo+a{color:#004}body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif}p.jsx-374655937fd2de40{color:#005}p.jsx-374655937fd2de40{color:#006}*.jsx-374655937fd2de40{color:#007}[href="woot"].jsx-374655937fd2de40{color:#008}p.jsx-374655937fd2de40 a.jsx-374655937fd2de40 span.jsx-374655937fd2de40{color:#009}p.jsx-374655937fd2de40 span{background:#00a}p.jsx-374655937fd2de40 a[title="\\'w \\' \\' t\\'"].jsx-374655937fd2de40{margin:auto}p.jsx-374655937fd2de40 span:not(.test){color:#00b}p.jsx-374655937fd2de40,h1.jsx-374655937fd2de40{color:#00c;-webkit-animation:hahaha 3s ease forwards infinite;-moz-animation:hahaha 3s ease forwards infinite;-o-animation:hahaha 3s ease forwards infinite;animation:hahaha 3s ease forwards infinite;-webkit-animation-name:hahaha;-moz-animation-name:hahaha;-o-animation-name:hahaha;animation-name:hahaha;-webkit-animation-delay:100ms;-moz-animation-delay:100ms;-o-animation-delay:100ms;animation-delay:100ms}p.jsx-374655937fd2de40{-webkit-animation:hahaha 1s,hehehe 2s;-moz-animation:hahaha 1s,hehehe 2s;-o-animation:hahaha 1s,hehehe 2s;animation:hahaha 1s,hehehe 2s}p.jsx-374655937fd2de40:hover{color:#00d}p.jsx-374655937fd2de40::before{color:#00e}.jsx-374655937fd2de40:hover{color:#00f}.jsx-374655937fd2de40::before{color:#010}.jsx-374655937fd2de40:hover p.jsx-374655937fd2de40{color:#011}p.jsx-374655937fd2de40+a.jsx-374655937fd2de40{color:#012}p.jsx-374655937fd2de40~a.jsx-374655937fd2de40{color:#013}p.jsx-374655937fd2de40>a.jsx-374655937fd2de40{color:#014}@-webkit-keyframes hahaha{from{top:0}to{top:100}}@-moz-keyframes hahaha{from{top:0}to{top:100}}@-o-keyframes hahaha{from{top:0}to{top:100}}@keyframes hahaha{from{top:0}to{top:100}}@-webkit-keyframes hehehe{from{left:0}to{left:100}}@-moz-keyframes hehehe{from{left:0}to{left:100}}@-o-keyframes hehehe{from{left:0}to{left:100}}@keyframes hehehe{from{left:0}to{left:100}}@media(min-width:500px){.test.jsx-374655937fd2de40{color:#015}}.test.jsx-374655937fd2de40{display:block}.inline-flex.jsx-374655937fd2de40{display:-webkit-inline-box;display:-webkit-inline-flex;display:-moz-inline-box;display:-ms-inline-flexbox;display:inline-flex}.flex.jsx-374655937fd2de40{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.test.jsx-374655937fd2de40{-webkit-box-shadow:0 0 10px black,inset 0 0 5px black;-moz-box-shadow:0 0 10px black,inset 0 0 5px black;box-shadow:0 0 10px black,inset 0 0 5px black}.test[title=","].jsx-374655937fd2de40{display:inline-block}.test.is-status.jsx-374655937fd2de40 .test.jsx-374655937fd2de40{color:#016}.a-selector.jsx-374655937fd2de40:hover,.a-selector.jsx-374655937fd2de40:focus{outline:none}@media(min-width:1px)and (max-width:768px){[class*="grid__col--"].jsx-374655937fd2de40{margin-top:12px;margin-bottom:12px}}@media(max-width:64em){.test.jsx-374655937fd2de40{margin-bottom:1em}@supports(-moz-appearance:none)and (display:contents){.test.jsx-374655937fd2de40{margin-bottom:2rem}}}')));
1610
+ "
1611
+ `;
1612
+
1613
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform transform-css-complex-selector correctly 1`] = `
1614
+ "import _JSXStyle from "styled-jsx/style";
1615
+ export default (()=>/*#__PURE__*/ React.createElement("div", {
1616
+ className: "jsx-2e0b2fdc9a904355"
1617
+ }, /*#__PURE__*/ React.createElement("p", {
1618
+ className: "jsx-2e0b2fdc9a904355"
1619
+ }, "test"), /*#__PURE__*/ React.createElement(_JSXStyle, {
1620
+ id: "2e0b2fdc9a904355"
1621
+ }, "p.jsx-2e0b2fdc9a904355 a.jsx-2e0b2fdc9a904355 span.jsx-2e0b2fdc9a904355{color:red}p.jsx-2e0b2fdc9a904355 span{background:blue}p.jsx-2e0b2fdc9a904355 a[title=\\"'w ' ' t'\\"].jsx-2e0b2fdc9a904355{margin:auto}p.jsx-2e0b2fdc9a904355 span:not(.test){color:green}p.jsx-2e0b2fdc9a904355,h1.jsx-2e0b2fdc9a904355{color:blue;-webkit-animation:hahaha 3s ease forwards infinite;-moz-animation:hahaha 3s ease forwards infinite;-o-animation:hahaha 3s ease forwards infinite;animation:hahaha 3s ease forwards infinite;-webkit-animation-name:hahaha;-moz-animation-name:hahaha;-o-animation-name:hahaha;animation-name:hahaha;-webkit-animation-delay:100ms;-moz-animation-delay:100ms;-o-animation-delay:100ms;animation-delay:100ms}p.jsx-2e0b2fdc9a904355{-webkit-animation:hahaha 1s,hehehe 2s;-moz-animation:hahaha 1s,hehehe 2s;-o-animation:hahaha 1s,hehehe 2s;animation:hahaha 1s,hehehe 2s}p.jsx-2e0b2fdc9a904355:hover{color:red}p.jsx-2e0b2fdc9a904355::before{color:red}.jsx-2e0b2fdc9a904355:hover{color:red}.jsx-2e0b2fdc9a904355::before{color:red}.jsx-2e0b2fdc9a904355:hover p.jsx-2e0b2fdc9a904355{color:red}p.jsx-2e0b2fdc9a904355+a.jsx-2e0b2fdc9a904355{color:red}p.jsx-2e0b2fdc9a904355~a.jsx-2e0b2fdc9a904355{color:red}p.jsx-2e0b2fdc9a904355>a.jsx-2e0b2fdc9a904355{color:red}@-webkit-keyframes hahaha{from{top:0}to{top:100}}@-moz-keyframes hahaha{from{top:0}to{top:100}}@-o-keyframes hahaha{from{top:0}to{top:100}}@keyframes hahaha{from{top:0}to{top:100}}@-webkit-keyframes hehehe{from{left:0}to{left:100}}@-moz-keyframes hehehe{from{left:0}to{left:100}}@-o-keyframes hehehe{from{left:0}to{left:100}}@keyframes hehehe{from{left:0}to{left:100}}@media(min-width:500px){.test.jsx-2e0b2fdc9a904355{color:red}}.test.jsx-2e0b2fdc9a904355{display:block}.inline-flex.jsx-2e0b2fdc9a904355{display:-webkit-inline-box;display:-webkit-inline-flex;display:-moz-inline-box;display:-ms-inline-flexbox;display:inline-flex}.flex.jsx-2e0b2fdc9a904355{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.test.jsx-2e0b2fdc9a904355{-webkit-box-shadow:0 0 10px black,inset 0 0 5px black;-moz-box-shadow:0 0 10px black,inset 0 0 5px black;box-shadow:0 0 10px black,inset 0 0 5px black}.test[title=\\",\\"].jsx-2e0b2fdc9a904355{display:inline-block}.test.is-status.jsx-2e0b2fdc9a904355 .test.jsx-2e0b2fdc9a904355{color:red}.a-selector.jsx-2e0b2fdc9a904355:hover,.a-selector.jsx-2e0b2fdc9a904355:focus{outline:none}")));
1622
+ "
1623
+ `;
1624
+
1625
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform transform-css-complex-selector-2 correctly 1`] = `
1626
+ "import _JSXStyle from "styled-jsx/style";
1627
+ export default (()=>/*#__PURE__*/ React.createElement("div", {
1628
+ className: "jsx-f12d8626937fd2c6"
1629
+ }, /*#__PURE__*/ React.createElement("p", {
1630
+ className: "jsx-f12d8626937fd2c6"
1631
+ }, "test"), /*#__PURE__*/ React.createElement(_JSXStyle, {
1632
+ id: "f12d8626937fd2c6"
1633
+ }, ".a-selector.jsx-f12d8626937fd2c6:hover,.a-selector.jsx-f12d8626937fd2c6:focus{outline:none}")));
1634
+ "
1635
+ `;
1636
+
1637
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform transform-css-global correctly 1`] = `
1638
+ "import _JSXStyle from "styled-jsx/style";
1639
+ export default (()=>/*#__PURE__*/ React.createElement("div", {
1640
+ className: "jsx-13e06bb770708a4c"
1641
+ }, /*#__PURE__*/ React.createElement("p", {
1642
+ className: "jsx-13e06bb770708a4c"
1643
+ }, "test"), /*#__PURE__*/ React.createElement(_JSXStyle, {
1644
+ id: "13e06bb770708a4c"
1645
+ }, 'html.jsx-13e06bb770708a4c{background-image:-webkit-linear-gradient(bottom,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg);background-image:-moz-linear-gradient(bottom,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg);background-image:-o-linear-gradient(bottom,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg);background-image:linear-gradient(0deg,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg)}p{color:#001}h1{color:#002}h2,a.jsx-13e06bb770708a4c{color:#003}.foo+a{color:#004}body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif}')));
1646
+ "
1647
+ `;
1648
+
1649
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform transform-css-media-query correctly 1`] = `
1650
+ "import _JSXStyle from "styled-jsx/style";
1651
+ export default (()=>/*#__PURE__*/ React.createElement("div", {
1652
+ className: "jsx-ec1bf2b940b30dc"
1653
+ }, /*#__PURE__*/ React.createElement("p", {
1654
+ className: "jsx-ec1bf2b940b30dc"
1655
+ }, "test"), /*#__PURE__*/ React.createElement(_JSXStyle, {
1656
+ id: "ec1bf2b940b30dc"
1657
+ }, '@media(min-width:1px)and (max-width:768px){[class*="grid__col--"].jsx-ec1bf2b940b30dc{margin-top:12px;margin-bottom:12px}}@media(max-width:64em){.test.jsx-ec1bf2b940b30dc{margin-bottom:1em}@supports(-moz-appearance:none)and (display:contents){.test.jsx-ec1bf2b940b30dc{margin-bottom:2rem}}}')));
1658
+ "
1659
+ `;
1660
+
1661
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform transform-css-normal correctly 1`] = `
1662
+ "import _JSXStyle from "styled-jsx/style";
1663
+ export default (()=>/*#__PURE__*/ React.createElement("div", {
1664
+ className: "jsx-292192d0348369b"
1665
+ }, /*#__PURE__*/ React.createElement("p", {
1666
+ className: "jsx-292192d0348369b"
1667
+ }, "test"), /*#__PURE__*/ React.createElement(_JSXStyle, {
1668
+ id: "292192d0348369b"
1669
+ }, 'p.jsx-292192d0348369b{color:red}p.jsx-292192d0348369b{color:red}*.jsx-292192d0348369b{color:blue}[href="woot"].jsx-292192d0348369b{color:red}')));
1670
+ "
1671
+ `;
1672
+
1673
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform transform-css-nth-1 correctly 1`] = `
1674
+ "import _JSXStyle from "styled-jsx/style";
1675
+ export default (()=>/*#__PURE__*/ React.createElement("div", {
1676
+ className: "jsx-d8153edfc80ef241"
1677
+ }, /*#__PURE__*/ React.createElement("p", {
1678
+ className: "jsx-d8153edfc80ef241"
1679
+ }, "test"), /*#__PURE__*/ React.createElement(_JSXStyle, {
1680
+ id: "d8153edfc80ef241"
1681
+ }, "li.jsx-d8153edfc80ef241:nth-child(2){color:lime}")));
1682
+ "
1683
+ `;
1684
+
1685
+ exports[`Should load swc-confidential wasm plugin correctly > Should transform whitespace correctly 1`] = `
1686
+ "import _JSXStyle from "styled-jsx/style";
1687
+ export default (()=>/*#__PURE__*/ React.createElement("div", {
1688
+ className: "jsx-94239b6d6b42c9b5"
1689
+ }, /*#__PURE__*/ React.createElement("p", {
1690
+ className: "jsx-94239b6d6b42c9b5"
1691
+ }, "test"), /*#__PURE__*/ React.createElement("p", {
1692
+ className: "jsx-94239b6d6b42c9b5"
1693
+ }, "woot"), /*#__PURE__*/ React.createElement("p", {
1694
+ className: "jsx-94239b6d6b42c9b5"
1695
+ }, "woot"), /*#__PURE__*/ React.createElement(_JSXStyle, {
1696
+ id: "94239b6d6b42c9b5"
1697
+ }, "p.jsx-94239b6d6b42c9b5{color:red}")));
1698
+ "
1699
+ `;