@griffel/react 1.7.3 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +21 -0
- package/lib/RendererContext.cjs +46 -0
- package/lib/TextDirectionContext.cjs +33 -0
- package/lib/__css.cjs +22 -0
- package/lib/__resetCSS.cjs +22 -0
- package/lib/__resetStyles.cjs +26 -0
- package/lib/__staticCSS.cjs +18 -0
- package/lib/__staticStyles.cjs +23 -0
- package/lib/__styles.cjs +26 -0
- package/lib/index.cjs +78 -0
- package/lib/insertionFactory.cjs +33 -0
- package/lib/makeResetStyles.cjs +35 -0
- package/lib/makeStaticStyles.cjs +28 -0
- package/lib/makeStyles.cjs +35 -0
- package/lib/renderToStyleElements.cjs +50 -0
- package/lib/useInsertionEffect.cjs +20 -0
- package/lib/utils/canUseDOM.cjs +17 -0
- package/lib/utils/isInsideComponent.cjs +46 -0
- package/package.json +3 -3
- package/src/RendererContext.d.ts +24 -0
- package/src/RendererContext.js +32 -0
- package/src/RendererContext.js.map +1 -0
- package/src/TextDirectionContext.d.ts +19 -0
- package/src/TextDirectionContext.js +22 -0
- package/src/TextDirectionContext.js.map +1 -0
- package/src/__css.d.ts +7 -0
- package/src/__css.js +16 -0
- package/src/__css.js.map +1 -0
- package/src/__resetCSS.d.ts +6 -0
- package/src/{__resetCSS.ts → __resetCSS.js} +7 -10
- package/src/__resetCSS.js.map +1 -0
- package/src/__resetStyles.d.ts +7 -0
- package/src/__resetStyles.js +19 -0
- package/src/__resetStyles.js.map +1 -0
- package/src/__staticCSS.d.ts +6 -0
- package/src/{__staticCSS.ts → __staticCSS.js} +5 -7
- package/src/__staticCSS.js.map +1 -0
- package/src/__staticStyles.d.ts +7 -0
- package/src/{__staticStyles.ts → __staticStyles.js} +7 -12
- package/src/__staticStyles.js.map +1 -0
- package/src/__styles.d.ts +7 -0
- package/src/__styles.js +19 -0
- package/src/__styles.js.map +1 -0
- package/src/{index.ts → index.d.ts} +0 -6
- package/src/index.js +16 -0
- package/src/index.js.map +1 -0
- package/src/insertionFactory.d.ts +2 -0
- package/src/insertionFactory.js +21 -0
- package/src/insertionFactory.js.map +1 -0
- package/src/makeResetStyles.d.ts +2 -0
- package/src/makeResetStyles.js +23 -0
- package/src/makeResetStyles.js.map +1 -0
- package/src/makeStaticStyles.d.ts +2 -0
- package/src/makeStaticStyles.js +17 -0
- package/src/makeStaticStyles.js.map +1 -0
- package/src/makeStyles.d.ts +2 -0
- package/src/makeStyles.js +23 -0
- package/src/makeStyles.js.map +1 -0
- package/src/renderToStyleElements.d.ts +8 -0
- package/src/renderToStyleElements.js +51 -0
- package/src/renderToStyleElements.js.map +1 -0
- package/src/useInsertionEffect.d.ts +1 -0
- package/src/useInsertionEffect.js +10 -0
- package/src/useInsertionEffect.js.map +1 -0
- package/src/utils/canUseDOM.d.ts +1 -0
- package/src/utils/canUseDOM.js +9 -0
- package/src/utils/canUseDOM.js.map +1 -0
- package/src/utils/isInsideComponent.d.ts +1 -0
- package/src/utils/isInsideComponent.js +39 -0
- package/src/utils/isInsideComponent.js.map +1 -0
- package/.storybook/main.js +0 -20
- package/.storybook/preview.js +0 -1
- package/CHANGELOG.json +0 -1281
- package/CHANGELOG.md +0 -501
- package/bundle-size/__css.fixture.js +0 -7
- package/bundle-size/__styles.fixture.js +0 -7
- package/bundle-size/makeResetStyles.fixture.js +0 -7
- package/bundle-size/makeStaticStyles.fixture.js +0 -7
- package/bundle-size/makeStyles.fixture.js +0 -7
- package/eslint.config.mjs +0 -31
- package/project.json +0 -96
- package/src/RendererContext.tsx +0 -52
- package/src/TextDirectionContext.tsx +0 -34
- package/src/__css.ts +0 -21
- package/src/__resetStyles.ts +0 -28
- package/src/__styles.ts +0 -27
- package/src/createDOMRenderer.test.tsx +0 -133
- package/src/insertionFactory-node.test.ts +0 -31
- package/src/insertionFactory.test.ts +0 -29
- package/src/insertionFactory.ts +0 -27
- package/src/makeResetStyles.test.tsx +0 -27
- package/src/makeResetStyles.ts +0 -31
- package/src/makeStaticStyles.ts +0 -23
- package/src/makeStyles.test.tsx +0 -27
- package/src/makeStyles.ts +0 -31
- package/src/renderToStyleElements-node.test.tsx +0 -418
- package/src/renderToStyleElements.test.tsx +0 -103
- package/src/renderToStyleElements.ts +0 -61
- package/src/stories/ComponentStyles.stories.tsx +0 -55
- package/src/stories/DOMRendererFilter.stories.tsx +0 -76
- package/src/stories/FallbackValues.stories.tsx +0 -50
- package/src/stories/makeStyles.stories.tsx +0 -17
- package/src/useInsertionEffect.ts +0 -11
- package/src/utils/canUseDOM-node.test.ts +0 -14
- package/src/utils/canUseDOM.test.tsx +0 -8
- package/src/utils/canUseDOM.ts +0 -8
- package/src/utils/isInsideComponent.ts +0 -41
- package/tsconfig.json +0 -20
- package/tsconfig.lib.json +0 -28
- package/tsconfig.spec.json +0 -21
- package/tsconfig.storybook.json +0 -12
- package/vitest.config.ts +0 -21
package/CHANGELOG.md
DELETED
|
@@ -1,501 +0,0 @@
|
|
|
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/eslint.config.mjs
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
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/project.json
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
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
|
-
}
|
package/src/RendererContext.tsx
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { createDOMRenderer, rehydrateRendererCache } from '@griffel/core';
|
|
4
|
-
import type { GriffelRenderer } from '@griffel/core';
|
|
5
|
-
import { createContext, useContext, useMemo, type FC, type ReactNode } from 'react';
|
|
6
|
-
|
|
7
|
-
import { canUseDOM } from './utils/canUseDOM.js';
|
|
8
|
-
|
|
9
|
-
export interface RendererProviderProps {
|
|
10
|
-
/** An instance of Griffel renderer. */
|
|
11
|
-
renderer: GriffelRenderer;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Document used to insert CSS variables to head
|
|
15
|
-
*/
|
|
16
|
-
targetDocument?: Document;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Content wrapped by the RendererProvider
|
|
20
|
-
*/
|
|
21
|
-
children: ReactNode;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* @private
|
|
26
|
-
*/
|
|
27
|
-
const RendererContext = /*#__PURE__*/ createContext<GriffelRenderer>(/*#__PURE__*/ createDOMRenderer());
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* @public
|
|
31
|
-
*/
|
|
32
|
-
export const RendererProvider: FC<RendererProviderProps> = ({ children, renderer, targetDocument }) => {
|
|
33
|
-
// "rehydrateCache()" can't be called in effects as it needs to be called before any component will be rendered to
|
|
34
|
-
// avoid double insertion of classes — useMemo runs synchronously before render, useEffect would be too late.
|
|
35
|
-
// eslint-disable-next-line react-x/use-memo, react-hooks/void-use-memo
|
|
36
|
-
useMemo(() => {
|
|
37
|
-
if (canUseDOM()) {
|
|
38
|
-
rehydrateRendererCache(renderer, targetDocument);
|
|
39
|
-
}
|
|
40
|
-
}, [renderer, targetDocument]);
|
|
41
|
-
|
|
42
|
-
return <RendererContext.Provider value={renderer}>{children}</RendererContext.Provider>;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Returns an instance of current makeStyles() renderer.
|
|
47
|
-
*
|
|
48
|
-
* @private Exported as "useRenderer_unstable" use it on own risk. Can be changed or removed without a notice.
|
|
49
|
-
*/
|
|
50
|
-
export function useRenderer(): GriffelRenderer {
|
|
51
|
-
return useContext(RendererContext);
|
|
52
|
-
}
|