@griffel/react 1.7.1 → 1.7.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.
Files changed (115) hide show
  1. package/.storybook/main.js +20 -0
  2. package/.storybook/preview.js +1 -0
  3. package/CHANGELOG.json +1281 -0
  4. package/CHANGELOG.md +501 -0
  5. package/README.md +4 -0
  6. package/bundle-size/__css.fixture.js +7 -0
  7. package/bundle-size/__styles.fixture.js +7 -0
  8. package/bundle-size/makeResetStyles.fixture.js +7 -0
  9. package/bundle-size/makeStaticStyles.fixture.js +7 -0
  10. package/bundle-size/makeStyles.fixture.js +7 -0
  11. package/eslint.config.mjs +31 -0
  12. package/package.json +3 -3
  13. package/project.json +96 -0
  14. package/src/RendererContext.tsx +52 -0
  15. package/src/TextDirectionContext.tsx +34 -0
  16. package/src/__css.ts +21 -0
  17. package/src/__resetCSS.ts +19 -0
  18. package/src/__resetStyles.ts +28 -0
  19. package/src/{__staticCSS.js → __staticCSS.ts} +7 -6
  20. package/src/__staticStyles.ts +22 -0
  21. package/src/__styles.ts +27 -0
  22. package/src/createDOMRenderer.test.tsx +133 -0
  23. package/src/{index.d.ts → index.ts} +6 -0
  24. package/src/insertionFactory-node.test.ts +31 -0
  25. package/src/insertionFactory.test.ts +29 -0
  26. package/src/insertionFactory.ts +27 -0
  27. package/src/makeResetStyles.test.tsx +27 -0
  28. package/src/makeResetStyles.ts +31 -0
  29. package/src/makeStaticStyles.ts +23 -0
  30. package/src/makeStyles.test.tsx +27 -0
  31. package/src/makeStyles.ts +31 -0
  32. package/src/renderToStyleElements-node.test.tsx +418 -0
  33. package/src/renderToStyleElements.test.tsx +103 -0
  34. package/src/renderToStyleElements.ts +61 -0
  35. package/src/stories/ComponentStyles.stories.tsx +55 -0
  36. package/src/stories/DOMRendererFilter.stories.tsx +76 -0
  37. package/src/stories/FallbackValues.stories.tsx +50 -0
  38. package/src/stories/makeStyles.stories.tsx +17 -0
  39. package/src/useInsertionEffect.ts +11 -0
  40. package/src/utils/canUseDOM-node.test.ts +14 -0
  41. package/src/utils/canUseDOM.test.tsx +8 -0
  42. package/src/utils/canUseDOM.ts +8 -0
  43. package/src/utils/isInsideComponent.ts +41 -0
  44. package/tsconfig.json +20 -0
  45. package/tsconfig.lib.json +28 -0
  46. package/tsconfig.spec.json +21 -0
  47. package/tsconfig.storybook.json +12 -0
  48. package/vitest.config.ts +21 -0
  49. package/LICENSE.md +0 -21
  50. package/lib/RendererContext.cjs +0 -45
  51. package/lib/TextDirectionContext.cjs +0 -33
  52. package/lib/__css.cjs +0 -22
  53. package/lib/__resetCSS.cjs +0 -22
  54. package/lib/__resetStyles.cjs +0 -26
  55. package/lib/__staticCSS.cjs +0 -18
  56. package/lib/__staticStyles.cjs +0 -23
  57. package/lib/__styles.cjs +0 -26
  58. package/lib/index.cjs +0 -78
  59. package/lib/insertionFactory.cjs +0 -33
  60. package/lib/makeResetStyles.cjs +0 -35
  61. package/lib/makeStaticStyles.cjs +0 -28
  62. package/lib/makeStyles.cjs +0 -35
  63. package/lib/renderToStyleElements.cjs +0 -50
  64. package/lib/useInsertionEffect.cjs +0 -20
  65. package/lib/utils/canUseDOM.cjs +0 -17
  66. package/lib/utils/isInsideComponent.cjs +0 -46
  67. package/src/RendererContext.d.ts +0 -24
  68. package/src/RendererContext.js +0 -31
  69. package/src/RendererContext.js.map +0 -1
  70. package/src/TextDirectionContext.d.ts +0 -19
  71. package/src/TextDirectionContext.js +0 -22
  72. package/src/TextDirectionContext.js.map +0 -1
  73. package/src/__css.d.ts +0 -7
  74. package/src/__css.js +0 -17
  75. package/src/__css.js.map +0 -1
  76. package/src/__resetCSS.d.ts +0 -6
  77. package/src/__resetCSS.js +0 -17
  78. package/src/__resetCSS.js.map +0 -1
  79. package/src/__resetStyles.d.ts +0 -7
  80. package/src/__resetStyles.js +0 -20
  81. package/src/__resetStyles.js.map +0 -1
  82. package/src/__staticCSS.d.ts +0 -6
  83. package/src/__staticCSS.js.map +0 -1
  84. package/src/__staticStyles.d.ts +0 -7
  85. package/src/__staticStyles.js +0 -18
  86. package/src/__staticStyles.js.map +0 -1
  87. package/src/__styles.d.ts +0 -7
  88. package/src/__styles.js +0 -20
  89. package/src/__styles.js.map +0 -1
  90. package/src/index.js +0 -16
  91. package/src/index.js.map +0 -1
  92. package/src/insertionFactory.d.ts +0 -2
  93. package/src/insertionFactory.js +0 -21
  94. package/src/insertionFactory.js.map +0 -1
  95. package/src/makeResetStyles.d.ts +0 -2
  96. package/src/makeResetStyles.js +0 -23
  97. package/src/makeResetStyles.js.map +0 -1
  98. package/src/makeStaticStyles.d.ts +0 -2
  99. package/src/makeStaticStyles.js +0 -17
  100. package/src/makeStaticStyles.js.map +0 -1
  101. package/src/makeStyles.d.ts +0 -2
  102. package/src/makeStyles.js +0 -23
  103. package/src/makeStyles.js.map +0 -1
  104. package/src/renderToStyleElements.d.ts +0 -8
  105. package/src/renderToStyleElements.js +0 -51
  106. package/src/renderToStyleElements.js.map +0 -1
  107. package/src/useInsertionEffect.d.ts +0 -1
  108. package/src/useInsertionEffect.js +0 -10
  109. package/src/useInsertionEffect.js.map +0 -1
  110. package/src/utils/canUseDOM.d.ts +0 -1
  111. package/src/utils/canUseDOM.js +0 -9
  112. package/src/utils/canUseDOM.js.map +0 -1
  113. package/src/utils/isInsideComponent.d.ts +0 -1
  114. package/src/utils/isInsideComponent.js +0 -39
  115. package/src/utils/isInsideComponent.js.map +0 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,501 @@
1
+ # Change Log - @griffel/react
2
+
3
+ <!-- This log was last generated on Thu, 21 May 2026 08:10:29 GMT and should not be manually modified. -->
4
+
5
+ <!-- Start content -->
6
+
7
+ ## 1.7.3
8
+
9
+ Thu, 21 May 2026 08:10:29 GMT
10
+
11
+ ### Patches
12
+
13
+ - Bump @griffel/core to v1.21.1
14
+
15
+ ## 1.7.2
16
+
17
+ Mon, 04 May 2026 12:34:39 GMT
18
+
19
+ ### Patches
20
+
21
+ - Bump @griffel/core to v1.21.0
22
+
23
+ ## 1.7.1
24
+
25
+ Thu, 30 Apr 2026 08:33:37 GMT
26
+
27
+ ### Patches
28
+
29
+ - fix: tag babel-emitted helpers as @private not @internal so they survive stripInternal and remain re-exportable from index.d.ts (olfedias@microsoft.com)
30
+ - Bump @griffel/core to v1.20.3
31
+
32
+ ## 1.7.0
33
+
34
+ Wed, 29 Apr 2026 17:05:15 GMT
35
+
36
+ ### Minor changes
37
+
38
+ - feat(react): switch to modern JSX runtime, bump react peerDep to >=16.14.0 (olfedias@microsoft.com)
39
+
40
+ ### Patches
41
+
42
+ - fix(react): emit interop-free types so consumers without esModuleInterop can compile (olfedias@microsoft.com)
43
+
44
+ ## 1.6.2
45
+
46
+ Wed, 29 Apr 2026 08:41:14 GMT
47
+
48
+ ### Patches
49
+
50
+ - refactor(build): switch from rollup to tsc + SWC (olfedias@microsoft.com)
51
+ - Bump @griffel/core to v1.20.2
52
+
53
+ ## 1.6.1
54
+
55
+ Fri, 06 Mar 2026 15:56:28 GMT
56
+
57
+ ### Patches
58
+
59
+ - Bump @griffel/core to v1.20.1
60
+
61
+ ## 1.6.0
62
+
63
+ Fri, 06 Mar 2026 08:17:05 GMT
64
+
65
+ ### Minor changes
66
+
67
+ - feat: add makeStaticStyles AOT/CSS extraction support (hochelmartin@gmail.com)
68
+ - Bump @griffel/core to v1.20.0
69
+
70
+ ## 1.5.32
71
+
72
+ Thu, 06 Nov 2025 19:40:21 GMT
73
+
74
+ ### Patches
75
+
76
+ - fix: renderToStyleElements() should handle shorthands ordering (olfedias@microsoft.com)
77
+
78
+ ## 1.5.31
79
+
80
+ Mon, 03 Nov 2025 15:43:56 GMT
81
+
82
+ ### Patches
83
+
84
+ - feat(react): add 'use client' directives (dmytrokirpa@microsoft.com)
85
+ - fix: fix dev-only validation to work in React 19 (olfedias@microsoft.com)
86
+
87
+ ## 1.5.30
88
+
89
+ Tue, 22 Apr 2025 10:05:48 GMT
90
+
91
+ ### Patches
92
+
93
+ - chore: allow React 19 in "peerDependencies" (olfedias@microsoft.com)
94
+ - Bump @griffel/core to v1.19.2
95
+
96
+ ## 1.5.29
97
+
98
+ Thu, 23 Jan 2025 12:09:03 GMT
99
+
100
+ ### Patches
101
+
102
+ - Bump @griffel/core to v1.19.1
103
+
104
+ ## 1.5.28
105
+
106
+ Wed, 22 Jan 2025 13:44:43 GMT
107
+
108
+ ### Patches
109
+
110
+ - Bump @griffel/core to v1.19.0
111
+
112
+ ## 1.5.27
113
+
114
+ Tue, 12 Nov 2024 09:58:11 GMT
115
+
116
+ ### Patches
117
+
118
+ - Bump @griffel/core to v1.18.2
119
+
120
+ ## 1.5.26
121
+
122
+ Thu, 31 Oct 2024 16:16:50 GMT
123
+
124
+ ### Patches
125
+
126
+ - chore: add eslint-plugin-react-compiler and enable for React package. (seanmonahan@microsoft.com)
127
+ - fix: make RendererProvider compatible with React Compiler (olfedias@microsoft.com)
128
+ - Bump @griffel/core to v1.18.1
129
+
130
+ ## 1.5.25
131
+
132
+ Mon, 29 Jul 2024 07:31:53 GMT
133
+
134
+ ### Patches
135
+
136
+ - Bump @griffel/core to v1.18.0
137
+
138
+ ## 1.5.24
139
+
140
+ Wed, 10 Jul 2024 14:36:29 GMT
141
+
142
+ ### Patches
143
+
144
+ - Bump @griffel/core to v1.17.1
145
+
146
+ ## 1.5.23
147
+
148
+ Wed, 22 May 2024 08:24:17 GMT
149
+
150
+ ### Patches
151
+
152
+ - Bump @griffel/core to v1.17.0
153
+
154
+ ## 1.5.22
155
+
156
+ Thu, 02 May 2024 14:07:14 GMT
157
+
158
+ ### Patches
159
+
160
+ - feat: add support for `RESET` (olfedias@microsoft.com)
161
+ - Bump @griffel/core to v1.16.0
162
+
163
+ ## 1.5.21
164
+
165
+ Tue, 19 Mar 2024 11:33:53 GMT
166
+
167
+ ### Patches
168
+
169
+ - Bump @griffel/core to v1.15.3
170
+
171
+ ## 1.5.20
172
+
173
+ Fri, 12 Jan 2024 11:08:40 GMT
174
+
175
+ ### Patches
176
+
177
+ - chore: add "wyw-in-js" field for tag processor (olfedias@microsoft.com)
178
+ - Bump @griffel/core to v1.15.2
179
+
180
+ ## 1.5.19
181
+
182
+ Thu, 30 Nov 2023 16:42:15 GMT
183
+
184
+ ### Patches
185
+
186
+ - Bump @griffel/core to v1.15.1
187
+
188
+ ## 1.5.18
189
+
190
+ Thu, 09 Nov 2023 14:35:07 GMT
191
+
192
+ ### Patches
193
+
194
+ - Bump @griffel/core to v1.15.0
195
+
196
+ ## 1.5.17
197
+
198
+ Mon, 30 Oct 2023 14:08:55 GMT
199
+
200
+ ### Patches
201
+
202
+ - Bump @griffel/core to v1.14.4
203
+
204
+ ## 1.5.16
205
+
206
+ Tue, 03 Oct 2023 19:09:32 GMT
207
+
208
+ ### Patches
209
+
210
+ - Bump @griffel/core to v1.14.3
211
+
212
+ ## 1.5.15
213
+
214
+ Fri, 15 Sep 2023 08:08:43 GMT
215
+
216
+ ### Patches
217
+
218
+ - Bump @griffel/core to v1.14.2
219
+
220
+ ## 1.5.14
221
+
222
+ Mon, 31 Jul 2023 12:18:47 GMT
223
+
224
+ ### Patches
225
+
226
+ - Bump @griffel/core to v1.14.1
227
+
228
+ ## 1.5.13
229
+
230
+ Mon, 31 Jul 2023 09:05:33 GMT
231
+
232
+ ### Patches
233
+
234
+ - chore: improve React 18 support by using useInsertionEffect (olfedias@microsoft.com)
235
+ - chore: add support for different buckets in makeResetStyles (olfedias@microsoft.com)
236
+ - Bump @griffel/core to v1.14.0
237
+
238
+ ## 1.5.12
239
+
240
+ Wed, 19 Jul 2023 07:32:54 GMT
241
+
242
+ ### Patches
243
+
244
+ - Bump @griffel/core to v1.13.1
245
+
246
+ ## 1.5.11
247
+
248
+ Thu, 13 Jul 2023 11:31:22 GMT
249
+
250
+ ### Patches
251
+
252
+ - Bump @griffel/core to v1.13.0
253
+
254
+ ## 1.5.10
255
+
256
+ Thu, 29 Jun 2023 12:49:54 GMT
257
+
258
+ ### Patches
259
+
260
+ - Bump @griffel/core to v1.12.2
261
+
262
+ ## 1.5.9
263
+
264
+ Wed, 28 Jun 2023 16:07:13 GMT
265
+
266
+ ### Patches
267
+
268
+ - Bump @griffel/core to v1.12.1
269
+
270
+ ## 1.5.8
271
+
272
+ Tue, 27 Jun 2023 14:18:04 GMT
273
+
274
+ ### Patches
275
+
276
+ - Bump @griffel/core to v1.12.0
277
+
278
+ ## 1.5.7
279
+
280
+ Fri, 14 Apr 2023 07:58:49 GMT
281
+
282
+ ### Patches
283
+
284
+ - Bump @griffel/core to v1.11.0
285
+
286
+ ## 1.5.6
287
+
288
+ Wed, 29 Mar 2023 12:45:13 GMT
289
+
290
+ ### Patches
291
+
292
+ - Bump @griffel/core to v1.10.1
293
+
294
+ ## 1.5.5
295
+
296
+ Thu, 02 Mar 2023 14:51:11 GMT
297
+
298
+ ### Patches
299
+
300
+ - Bump @griffel/core to v1.10.0
301
+
302
+ ## 1.5.4
303
+
304
+ Fri, 10 Feb 2023 10:23:25 GMT
305
+
306
+ ### Patches
307
+
308
+ - Bump @griffel/core to v1.9.2
309
+
310
+ ## 1.5.3
311
+
312
+ Thu, 26 Jan 2023 14:06:28 GMT
313
+
314
+ ### Patches
315
+
316
+ - Bump @griffel/core to v1.9.1
317
+
318
+ ## 1.5.2
319
+
320
+ Tue, 20 Dec 2022 11:48:33 GMT
321
+
322
+ ### Patches
323
+
324
+ - Bump @griffel/core to v1.9.0
325
+
326
+ ## 1.5.1
327
+
328
+ Fri, 09 Dec 2022 11:15:19 GMT
329
+
330
+ ### Patches
331
+
332
+ - Bump @griffel/core to v1.8.3
333
+
334
+ ## 1.5.0
335
+
336
+ Wed, 30 Nov 2022 09:32:24 GMT
337
+
338
+ ### Minor changes
339
+
340
+ - feat: re-export GriffelResetStyle type (olfedias@microsoft.com)
341
+
342
+ ## 1.4.3
343
+
344
+ Thu, 24 Nov 2022 10:05:12 GMT
345
+
346
+ ### Patches
347
+
348
+ - Bump @griffel/core to v1.8.2
349
+
350
+ ## 1.4.2
351
+
352
+ Wed, 26 Oct 2022 11:06:03 GMT
353
+
354
+ ### Patches
355
+
356
+ - fix: add export for __resetCSS (olfedias@microsoft.com)
357
+ - chore: allow React 18 in peerDependencies (olfedias@microsoft.com)
358
+ - Bump @griffel/core to v1.8.1
359
+
360
+ ## 1.4.1
361
+
362
+ Thu, 13 Oct 2022 08:36:18 GMT
363
+
364
+ ### Patches
365
+
366
+ - chore: add __resetStyles (internal function) (olfedias@microsoft.com)
367
+ - chore: add __resetStyles (internal function) (olfedias@microsoft.com)
368
+ - Bump @griffel/core to v1.8.0
369
+
370
+ ## 1.4.0
371
+
372
+ Wed, 05 Oct 2022 14:28:43 GMT
373
+
374
+ ### Minor changes
375
+
376
+ - feat: add makeResetStyles to @griffel/react (olfedias@microsoft.com)
377
+ - Bump @griffel/core to v1.7.0
378
+
379
+ ## 1.3.2
380
+
381
+ Tue, 04 Oct 2022 08:44:33 GMT
382
+
383
+ ### Patches
384
+
385
+ - fix: Adding children to prop type definitions for React 18 (liukerry@microsoft.com)
386
+ - Bump @griffel/core to v1.6.1
387
+
388
+ ## 1.3.1
389
+
390
+ Tue, 16 Aug 2022 11:16:00 GMT
391
+
392
+ ### Patches
393
+
394
+ - Bump @griffel/core to v1.6.0
395
+
396
+ ## 1.3.0
397
+
398
+ Wed, 03 Aug 2022 15:28:36 GMT
399
+
400
+ ### Minor changes
401
+
402
+ - feat: re-export GriffelRenderer type (olfedias@microsoft.com)
403
+
404
+ ## 1.2.3
405
+
406
+ Wed, 27 Jul 2022 13:03:12 GMT
407
+
408
+ ### Patches
409
+
410
+ - Bump @griffel/core to v1.5.1
411
+
412
+ ## 1.2.2
413
+
414
+ Tue, 19 Jul 2022 10:20:09 GMT
415
+
416
+ ### Patches
417
+
418
+ - feat: export `CreateDOMRendererOptions` from `@griffel/react` (lingfangao@hotmail.com)
419
+ - Bump @griffel/core to v1.5.0
420
+
421
+ ## 1.2.1
422
+
423
+ Tue, 28 Jun 2022 09:50:50 GMT
424
+
425
+ ### Patches
426
+
427
+ - Bump @griffel/core to v1.4.1
428
+
429
+ ## 1.2.0
430
+
431
+ Thu, 23 Jun 2022 08:37:05 GMT
432
+
433
+ ### Minor changes
434
+
435
+ - feat: update renderToStyleElement to use isomorphic stylesheets from renderer (lingfangao@hotmail.com)
436
+ - feat: update style rehydration to sort media queries (lingfangao@hotmail.com)
437
+ - Bump @griffel/core to v1.4.0
438
+
439
+ ### Patches
440
+
441
+ - chore: add __css() functions for upcoming CSS extraction (olfedias@microsoft.com)
442
+ - chore: rename instances of styleElement to stylesheet where appropriate following [#137](https://github.com/microsoft/griffel/pull/137) (lingfangao@hotmail.com)
443
+
444
+ ## 1.1.0
445
+
446
+ Thu, 26 May 2022 15:06:34 GMT
447
+
448
+ ### Minor changes
449
+
450
+ - feat: export useRenderer_unstable (olfedias@microsoft.com)
451
+
452
+ ## 1.0.5
453
+
454
+ Tue, 17 May 2022 08:34:48 GMT
455
+
456
+ ### Patches
457
+
458
+ - Bump @griffel/core to v1.3.1
459
+
460
+ ## 1.0.4
461
+
462
+ Wed, 04 May 2022 16:15:22 GMT
463
+
464
+ ### Patches
465
+
466
+ - fix: avoid errors with React 18 (olfedias@microsoft.com)
467
+ - fix: update isInsideComponent() check (olfedias@microsoft.com)
468
+ - Bump @griffel/core to v1.3.0
469
+
470
+ ## 1.0.3
471
+
472
+ Wed, 06 Apr 2022 13:28:28 GMT
473
+
474
+ ### Patches
475
+
476
+ - Bump @griffel/core to v1.2.0
477
+
478
+ ## 1.0.2
479
+
480
+ Wed, 09 Mar 2022 13:56:06 GMT
481
+
482
+ ### Patches
483
+
484
+ - chore: add dependencies explicitly to package.json (olfedias@microsoft.com)
485
+ - Bump @griffel/core to v1.1.1
486
+
487
+ ## 1.0.1
488
+
489
+ Mon, 07 Mar 2022 09:08:08 GMT
490
+
491
+ ### Patches
492
+
493
+ - chore: add sourcemaps to dist files (olfedias@microsoft.com)
494
+
495
+ ## 1.0.0
496
+
497
+ Thu, 20 Jan 2022 09:31:57 GMT
498
+
499
+ ### Major changes
500
+
501
+ - initial release (olfedias@microsoft.com)
package/README.md CHANGED
@@ -79,6 +79,10 @@ const useClasses = makeStyles({
79
79
  '@container foo (max-width: 992px)': { color: 'orange' },
80
80
  '@supports (display: grid)': { color: 'red' },
81
81
  '@layer utility': { marginBottom: '1em' },
82
+ '@scope to (.boundary)': {
83
+ ':hover': { color: 'cyan' },
84
+ '& p': { color: 'red' },
85
+ },
82
86
  },
83
87
  });
84
88
  ```
@@ -0,0 +1,7 @@
1
+ import { __css } from '@griffel/react';
2
+
3
+ console.log(__css);
4
+
5
+ export default {
6
+ name: '__css',
7
+ };
@@ -0,0 +1,7 @@
1
+ import { __styles } from '@griffel/react';
2
+
3
+ console.log(__styles);
4
+
5
+ export default {
6
+ name: '__styles',
7
+ };
@@ -0,0 +1,7 @@
1
+ import { makeResetStyles } from '@griffel/react';
2
+
3
+ console.log(makeResetStyles);
4
+
5
+ export default {
6
+ name: 'makeResetStyles (runtime)',
7
+ };
@@ -0,0 +1,7 @@
1
+ import { makeStaticStyles } from '@griffel/react';
2
+
3
+ console.log(makeStaticStyles);
4
+
5
+ export default {
6
+ name: 'makeStaticStyles (runtime)',
7
+ };
@@ -0,0 +1,7 @@
1
+ import { makeStyles } from '@griffel/react';
2
+
3
+ console.log(makeStyles);
4
+
5
+ export default {
6
+ name: 'makeStyles (runtime)',
7
+ };
@@ -0,0 +1,31 @@
1
+ import baseConfig from '../../eslint.config.mjs';
2
+ import eslintPluginReactCompiler from 'eslint-plugin-react-compiler';
3
+ import eslintPluginReactHooks from 'eslint-plugin-react-hooks';
4
+ import eslintPluginReactX from 'eslint-plugin-react-x';
5
+
6
+ export default [
7
+ {
8
+ ignores: ['**/dist', '**/out-tsc'],
9
+ },
10
+ ...baseConfig,
11
+ {
12
+ files: ['**/__*.ts', '**/__*.tsx'],
13
+ rules: {
14
+ '@typescript-eslint/naming-convention': 'off',
15
+ },
16
+ },
17
+ eslintPluginReactX.configs['recommended-typescript'],
18
+ eslintPluginReactHooks.configs.flat['recommended-latest'],
19
+ eslintPluginReactX.configs['disable-conflict-eslint-plugin-react-hooks'],
20
+ eslintPluginReactCompiler.configs.recommended,
21
+ {
22
+ files: ['**/*.ts', '**/*.tsx'],
23
+ // Override or add rules here
24
+ rules: {},
25
+ },
26
+ {
27
+ files: ['**/*.js', '**/*.jsx'],
28
+ // Override or add rules here
29
+ rules: {},
30
+ },
31
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@griffel/react",
3
- "version": "1.7.1",
3
+ "version": "1.7.3",
4
4
  "description": "React implementation of Atomic CSS-in-JS",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -27,10 +27,10 @@
27
27
  }
28
28
  },
29
29
  "dependencies": {
30
- "@griffel/core": "^1.20.3",
30
+ "@griffel/core": "^1.21.1",
31
31
  "tslib": "^2.1.0"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "react": ">=16.14.0 <20.0.0"
35
35
  }
36
- }
36
+ }
package/project.json ADDED
@@ -0,0 +1,96 @@
1
+ {
2
+ "name": "@griffel/react",
3
+ "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
+ "sourceRoot": "packages/react/src",
5
+ "projectType": "library",
6
+ "tags": [],
7
+ "targets": {
8
+ "build": {
9
+ "executor": "@nx/js:tsc",
10
+ "outputs": ["{options.outputPath}"],
11
+ "options": {
12
+ "outputPath": "dist/packages/react",
13
+ "tsConfig": "packages/react/tsconfig.lib.json",
14
+ "skipTypeField": true,
15
+ "packageJson": "packages/react/package.json",
16
+ "main": "packages/react/src/index.ts",
17
+ "assets": [
18
+ "packages/react/README.md",
19
+ {
20
+ "glob": "LICENSE.md",
21
+ "input": ".",
22
+ "output": "."
23
+ }
24
+ ]
25
+ }
26
+ },
27
+ "build-cjs": {
28
+ "dependsOn": ["build"],
29
+ "executor": "nx:run-commands",
30
+ "outputs": ["{workspaceRoot}/dist/packages/react/lib"],
31
+ "options": {
32
+ "command": "node tools/build-cjs.mjs dist/packages/react/src dist/packages/react/lib"
33
+ }
34
+ },
35
+ "lint": {
36
+ "executor": "@nx/eslint:lint",
37
+ "outputs": ["{options.outputFile}"]
38
+ },
39
+ "test": {
40
+ "executor": "@nx/vitest:test",
41
+ "outputs": ["{options.reportsDirectory}"],
42
+ "options": {
43
+ "reportsDirectory": "{projectRoot}/../../coverage/packages/react"
44
+ }
45
+ },
46
+ "bundle-size": {
47
+ "executor": "nx:run-commands",
48
+ "dependsOn": ["build"],
49
+ "options": {
50
+ "cwd": "packages/react",
51
+ "commands": [
52
+ {
53
+ "command": "monosize measure"
54
+ }
55
+ ]
56
+ }
57
+ },
58
+ "storybook": {
59
+ "executor": "@nx/storybook:storybook",
60
+ "options": {
61
+ "port": 4400,
62
+ "configDir": "packages/react/.storybook"
63
+ },
64
+ "configurations": {
65
+ "ci": {
66
+ "quiet": true
67
+ }
68
+ }
69
+ },
70
+ "build-storybook": {
71
+ "executor": "@nx/storybook:build",
72
+ "outputs": ["{options.outputDir}"],
73
+ "options": {
74
+ "configDir": "packages/react/.storybook",
75
+ "outputDir": "dist/storybook/@griffel/react"
76
+ },
77
+ "configurations": {
78
+ "ci": {
79
+ "quiet": true
80
+ }
81
+ }
82
+ },
83
+ "type-check": {
84
+ "executor": "nx:run-commands",
85
+ "options": {
86
+ "cwd": "packages/react",
87
+ "commands": [
88
+ {
89
+ "command": "tsc -b --pretty"
90
+ }
91
+ ]
92
+ },
93
+ "outputs": []
94
+ }
95
+ }
96
+ }