@fluentui/global-context 9.0.0-beta.2 → 9.0.0-beta.21

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/CHANGELOG.json CHANGED
@@ -2,7 +2,519 @@
2
2
  "name": "@fluentui/global-context",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 14 Jul 2022 17:03:35 GMT",
5
+ "date": "Thu, 16 Mar 2023 14:33:33 GMT",
6
+ "tag": "@fluentui/global-context_v9.0.0-beta.21",
7
+ "version": "9.0.0-beta.21",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "beachball",
12
+ "package": "@fluentui/global-context",
13
+ "comment": "Bump @fluentui/react-context-selector to v9.1.14",
14
+ "commit": "e7dcadf7cabae6bc6811ca04a630e7d850388f81"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/global-context",
19
+ "comment": "Bump @fluentui/react-utilities to v9.7.1",
20
+ "commit": "e7dcadf7cabae6bc6811ca04a630e7d850388f81"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ {
26
+ "date": "Mon, 13 Mar 2023 08:58:26 GMT",
27
+ "tag": "@fluentui/global-context_v9.0.0-beta.20",
28
+ "version": "9.0.0-beta.20",
29
+ "comments": {
30
+ "prerelease": [
31
+ {
32
+ "author": "beachball",
33
+ "package": "@fluentui/global-context",
34
+ "comment": "Bump @fluentui/react-context-selector to v9.1.13",
35
+ "commit": "edf96a6b5d6f13843ada1400480e347b84384b8e"
36
+ },
37
+ {
38
+ "author": "beachball",
39
+ "package": "@fluentui/global-context",
40
+ "comment": "Bump @fluentui/react-utilities to v9.7.0",
41
+ "commit": "edf96a6b5d6f13843ada1400480e347b84384b8e"
42
+ }
43
+ ]
44
+ }
45
+ },
46
+ {
47
+ "date": "Fri, 10 Mar 2023 07:14:01 GMT",
48
+ "tag": "@fluentui/global-context_v9.0.0-beta.19",
49
+ "version": "9.0.0-beta.19",
50
+ "comments": {
51
+ "prerelease": [
52
+ {
53
+ "author": "beachball",
54
+ "package": "@fluentui/global-context",
55
+ "comment": "Bump @fluentui/react-context-selector to v9.1.12",
56
+ "commit": "3cefc38eed17e3f37cd38fca9099cc9d700cd584"
57
+ },
58
+ {
59
+ "author": "beachball",
60
+ "package": "@fluentui/global-context",
61
+ "comment": "Bump @fluentui/react-utilities to v9.6.2",
62
+ "commit": "3cefc38eed17e3f37cd38fca9099cc9d700cd584"
63
+ }
64
+ ]
65
+ }
66
+ },
67
+ {
68
+ "date": "Wed, 08 Mar 2023 17:42:51 GMT",
69
+ "tag": "@fluentui/global-context_v9.0.0-beta.18",
70
+ "version": "9.0.0-beta.18",
71
+ "comments": {
72
+ "prerelease": [
73
+ {
74
+ "author": "beachball",
75
+ "package": "@fluentui/global-context",
76
+ "comment": "Bump @fluentui/react-context-selector to v9.1.11",
77
+ "commit": "e0d11faf97f6466f4cd23ed18266cf1e80094f56"
78
+ },
79
+ {
80
+ "author": "beachball",
81
+ "package": "@fluentui/global-context",
82
+ "comment": "Bump @fluentui/react-utilities to v9.6.1",
83
+ "commit": "e0d11faf97f6466f4cd23ed18266cf1e80094f56"
84
+ }
85
+ ]
86
+ }
87
+ },
88
+ {
89
+ "date": "Wed, 15 Feb 2023 11:44:52 GMT",
90
+ "tag": "@fluentui/global-context_v9.0.0-beta.17",
91
+ "version": "9.0.0-beta.17",
92
+ "comments": {
93
+ "prerelease": [
94
+ {
95
+ "author": "beachball",
96
+ "package": "@fluentui/global-context",
97
+ "comment": "Bump @fluentui/react-context-selector to v9.1.10",
98
+ "commit": "087d981aab96bef2e332a373069a19bc702a7ca2"
99
+ },
100
+ {
101
+ "author": "beachball",
102
+ "package": "@fluentui/global-context",
103
+ "comment": "Bump @fluentui/react-utilities to v9.6.0",
104
+ "commit": "087d981aab96bef2e332a373069a19bc702a7ca2"
105
+ }
106
+ ]
107
+ }
108
+ },
109
+ {
110
+ "date": "Mon, 13 Feb 2023 23:43:14 GMT",
111
+ "tag": "@fluentui/global-context_v9.0.0-beta.16",
112
+ "version": "9.0.0-beta.16",
113
+ "comments": {
114
+ "prerelease": [
115
+ {
116
+ "author": "beachball",
117
+ "package": "@fluentui/global-context",
118
+ "comment": "Bump @fluentui/react-context-selector to v9.1.9",
119
+ "commit": "29e62b13706c2845b21d665d43cdacf1ef1b1513"
120
+ },
121
+ {
122
+ "author": "beachball",
123
+ "package": "@fluentui/global-context",
124
+ "comment": "Bump @fluentui/react-utilities to v9.5.3",
125
+ "commit": "29e62b13706c2845b21d665d43cdacf1ef1b1513"
126
+ }
127
+ ]
128
+ }
129
+ },
130
+ {
131
+ "date": "Fri, 10 Feb 2023 08:50:02 GMT",
132
+ "tag": "@fluentui/global-context_v9.0.0-beta.15",
133
+ "version": "9.0.0-beta.15",
134
+ "comments": {
135
+ "prerelease": [
136
+ {
137
+ "author": "beachball",
138
+ "package": "@fluentui/global-context",
139
+ "comment": "Bump @fluentui/react-context-selector to v9.1.8",
140
+ "commit": "cc62f050f8231e8f21a2cf7dddf33003e0ba3931"
141
+ },
142
+ {
143
+ "author": "beachball",
144
+ "package": "@fluentui/global-context",
145
+ "comment": "Bump @fluentui/react-utilities to v9.5.2",
146
+ "commit": "cc62f050f8231e8f21a2cf7dddf33003e0ba3931"
147
+ }
148
+ ]
149
+ }
150
+ },
151
+ {
152
+ "date": "Tue, 31 Jan 2023 19:53:58 GMT",
153
+ "tag": "@fluentui/global-context_v9.0.0-beta.14",
154
+ "version": "9.0.0-beta.14",
155
+ "comments": {
156
+ "prerelease": [
157
+ {
158
+ "author": "beachball",
159
+ "package": "@fluentui/global-context",
160
+ "comment": "Bump @fluentui/react-context-selector to v9.1.7",
161
+ "commit": "794d9e845cb952f597ba786e70cd8d248be62746"
162
+ },
163
+ {
164
+ "author": "beachball",
165
+ "package": "@fluentui/global-context",
166
+ "comment": "Bump @fluentui/react-utilities to v9.5.1",
167
+ "commit": "794d9e845cb952f597ba786e70cd8d248be62746"
168
+ }
169
+ ]
170
+ }
171
+ },
172
+ {
173
+ "date": "Thu, 26 Jan 2023 13:31:03 GMT",
174
+ "tag": "@fluentui/global-context_v9.0.0-beta.13",
175
+ "version": "9.0.0-beta.13",
176
+ "comments": {
177
+ "prerelease": [
178
+ {
179
+ "author": "beachball",
180
+ "package": "@fluentui/global-context",
181
+ "comment": "Bump @fluentui/react-context-selector to v9.1.6",
182
+ "commit": "403e1370f1effca7d3db131eda381abf31cf66b1"
183
+ },
184
+ {
185
+ "author": "beachball",
186
+ "package": "@fluentui/global-context",
187
+ "comment": "Bump @fluentui/react-utilities to v9.5.0",
188
+ "commit": "403e1370f1effca7d3db131eda381abf31cf66b1"
189
+ }
190
+ ]
191
+ }
192
+ },
193
+ {
194
+ "date": "Mon, 16 Jan 2023 08:38:53 GMT",
195
+ "tag": "@fluentui/global-context_v9.0.0-beta.12",
196
+ "version": "9.0.0-beta.12",
197
+ "comments": {
198
+ "none": [
199
+ {
200
+ "author": "martinhochel@microsoft.com",
201
+ "package": "@fluentui/global-context",
202
+ "commit": "64bb45980d68de1219c6b36a7db5363f0a9cff9f",
203
+ "comment": "chore: migrate to packaged scripts"
204
+ }
205
+ ]
206
+ }
207
+ },
208
+ {
209
+ "date": "Mon, 09 Jan 2023 14:34:54 GMT",
210
+ "tag": "@fluentui/global-context_v9.0.0-beta.12",
211
+ "version": "9.0.0-beta.12",
212
+ "comments": {
213
+ "none": [
214
+ {
215
+ "author": "martinhochel@microsoft.com",
216
+ "package": "@fluentui/global-context",
217
+ "commit": "abae9f7a10d544d8d6b530b974fff235cfd2f956",
218
+ "comment": "chore: introduce more barrel file api within /scripts"
219
+ }
220
+ ],
221
+ "prerelease": [
222
+ {
223
+ "author": "beachball",
224
+ "package": "@fluentui/global-context",
225
+ "comment": "Bump @fluentui/react-context-selector to v9.1.5",
226
+ "commit": "d246e70eba59a37ec311dbf933b0745d34cb700d"
227
+ },
228
+ {
229
+ "author": "beachball",
230
+ "package": "@fluentui/global-context",
231
+ "comment": "Bump @fluentui/react-utilities to v9.4.0",
232
+ "commit": "d246e70eba59a37ec311dbf933b0745d34cb700d"
233
+ }
234
+ ]
235
+ }
236
+ },
237
+ {
238
+ "date": "Wed, 04 Jan 2023 01:40:46 GMT",
239
+ "tag": "@fluentui/global-context_v9.0.0-beta.11",
240
+ "version": "9.0.0-beta.11",
241
+ "comments": {
242
+ "none": [
243
+ {
244
+ "author": "martinhochel@microsoft.com",
245
+ "package": "@fluentui/global-context",
246
+ "commit": "4ec2b998b294d6d9c3196d3d82893bdd97d0c105",
247
+ "comment": "chore(scripts): move index.ts to to follow sub-folder domain packaging"
248
+ },
249
+ {
250
+ "author": "martinhochel@microsoft.com",
251
+ "package": "@fluentui/global-context",
252
+ "commit": "194b0cf0cc27c1c1233aa945f09b3ad29778d8ca",
253
+ "comment": "chore(scripts): use for @fluentui/scripts version within all package.json"
254
+ }
255
+ ],
256
+ "prerelease": [
257
+ {
258
+ "author": "beachball",
259
+ "package": "@fluentui/global-context",
260
+ "comment": "Bump @fluentui/react-context-selector to v9.1.4",
261
+ "commit": "3e322d15529451be153e97298873253e21af4082"
262
+ },
263
+ {
264
+ "author": "beachball",
265
+ "package": "@fluentui/global-context",
266
+ "comment": "Bump @fluentui/react-utilities to v9.3.1",
267
+ "commit": "3e322d15529451be153e97298873253e21af4082"
268
+ }
269
+ ]
270
+ }
271
+ },
272
+ {
273
+ "date": "Tue, 20 Dec 2022 14:59:34 GMT",
274
+ "tag": "@fluentui/global-context_v9.0.0-beta.10",
275
+ "version": "9.0.0-beta.10",
276
+ "comments": {
277
+ "prerelease": [
278
+ {
279
+ "author": "beachball",
280
+ "package": "@fluentui/global-context",
281
+ "comment": "Bump @fluentui/react-context-selector to v9.1.3",
282
+ "commit": "e7530bc179fd0e303448083c76a4af41a0e15322"
283
+ },
284
+ {
285
+ "author": "beachball",
286
+ "package": "@fluentui/global-context",
287
+ "comment": "Bump @fluentui/react-utilities to v9.3.0",
288
+ "commit": "e7530bc179fd0e303448083c76a4af41a0e15322"
289
+ }
290
+ ]
291
+ }
292
+ },
293
+ {
294
+ "date": "Thu, 17 Nov 2022 23:05:31 GMT",
295
+ "tag": "@fluentui/global-context_v9.0.0-beta.9",
296
+ "version": "9.0.0-beta.9",
297
+ "comments": {
298
+ "none": [
299
+ {
300
+ "author": "martinhochel@microsoft.com",
301
+ "package": "@fluentui/global-context",
302
+ "commit": "ea768501802d65d63ddc63fff3816fb6b5008ae4",
303
+ "comment": "chore: update package scaffold"
304
+ }
305
+ ],
306
+ "prerelease": [
307
+ {
308
+ "author": "beachball",
309
+ "package": "@fluentui/global-context",
310
+ "comment": "Bump @fluentui/react-context-selector to v9.1.2",
311
+ "commit": "94e156be5d3b5790d82dccf08c32672733fb9335"
312
+ },
313
+ {
314
+ "author": "beachball",
315
+ "package": "@fluentui/global-context",
316
+ "comment": "Bump @fluentui/react-utilities to v9.2.2",
317
+ "commit": "94e156be5d3b5790d82dccf08c32672733fb9335"
318
+ }
319
+ ]
320
+ }
321
+ },
322
+ {
323
+ "date": "Fri, 11 Nov 2022 14:57:50 GMT",
324
+ "tag": "@fluentui/global-context_v9.0.0-beta.8",
325
+ "version": "9.0.0-beta.8",
326
+ "comments": {
327
+ "prerelease": [
328
+ {
329
+ "author": "martinhochel@microsoft.com",
330
+ "package": "@fluentui/global-context",
331
+ "commit": "b3907043bd8d7b650c55e8e7c3119b14f2606c38",
332
+ "comment": "fix: create valid export maps"
333
+ },
334
+ {
335
+ "author": "beachball",
336
+ "package": "@fluentui/global-context",
337
+ "comment": "Bump @fluentui/react-context-selector to v9.1.1",
338
+ "commit": "b4c9a0ae8d7444bf746f1307ab01e2dc16310720"
339
+ },
340
+ {
341
+ "author": "beachball",
342
+ "package": "@fluentui/global-context",
343
+ "comment": "Bump @fluentui/react-utilities to v9.2.1",
344
+ "commit": "b4c9a0ae8d7444bf746f1307ab01e2dc16310720"
345
+ }
346
+ ]
347
+ }
348
+ },
349
+ {
350
+ "date": "Wed, 02 Nov 2022 11:58:07 GMT",
351
+ "tag": "@fluentui/global-context_v9.0.0-beta.7",
352
+ "version": "9.0.0-beta.7",
353
+ "comments": {
354
+ "prerelease": [
355
+ {
356
+ "author": "beachball",
357
+ "package": "@fluentui/global-context",
358
+ "comment": "Bump @fluentui/react-context-selector to v9.1.0",
359
+ "commit": "393a7b169155997a97a6ce1ad36ee3eafc6f461b"
360
+ },
361
+ {
362
+ "author": "beachball",
363
+ "package": "@fluentui/global-context",
364
+ "comment": "Bump @fluentui/react-utilities to v9.2.0",
365
+ "commit": "393a7b169155997a97a6ce1ad36ee3eafc6f461b"
366
+ }
367
+ ]
368
+ }
369
+ },
370
+ {
371
+ "date": "Tue, 25 Oct 2022 00:35:27 GMT",
372
+ "tag": "@fluentui/global-context_v9.0.0-beta.6",
373
+ "version": "9.0.0-beta.6",
374
+ "comments": {
375
+ "none": [
376
+ {
377
+ "author": "miroslav.stastny@microsoft.com",
378
+ "package": "@fluentui/global-context",
379
+ "commit": "6ced976a8d0e6a0e2e207da8fe0eb810e2bd19bc",
380
+ "comment": "Update package readme"
381
+ },
382
+ {
383
+ "author": "tristan.watanabe@gmail.com",
384
+ "package": "@fluentui/global-context",
385
+ "commit": "07141711530bbdba82fd5198fe4bcef462403f40",
386
+ "comment": "chore: Migrate to new package structure."
387
+ }
388
+ ]
389
+ }
390
+ },
391
+ {
392
+ "date": "Thu, 20 Oct 2022 08:39:56 GMT",
393
+ "tag": "@fluentui/global-context_v9.0.0-beta.6",
394
+ "version": "9.0.0-beta.6",
395
+ "comments": {
396
+ "prerelease": [
397
+ {
398
+ "author": "mgodbolt@microsoft.com",
399
+ "package": "@fluentui/global-context",
400
+ "commit": "17096b3137d9d3e7c7443ddc3ce0738b2910a334",
401
+ "comment": "chore: Bump peer deps to support React 18"
402
+ },
403
+ {
404
+ "author": "beachball",
405
+ "package": "@fluentui/global-context",
406
+ "comment": "Bump @fluentui/react-context-selector to v9.0.5",
407
+ "commit": "5ea1372675d910d76cf1b9cbd74d05b7c4e8fcbc"
408
+ },
409
+ {
410
+ "author": "beachball",
411
+ "package": "@fluentui/global-context",
412
+ "comment": "Bump @fluentui/react-utilities to v9.1.2",
413
+ "commit": "5ea1372675d910d76cf1b9cbd74d05b7c4e8fcbc"
414
+ }
415
+ ]
416
+ }
417
+ },
418
+ {
419
+ "date": "Thu, 13 Oct 2022 11:03:06 GMT",
420
+ "tag": "@fluentui/global-context_v9.0.0-beta.5",
421
+ "version": "9.0.0-beta.5",
422
+ "comments": {
423
+ "prerelease": [
424
+ {
425
+ "author": "beachball",
426
+ "package": "@fluentui/global-context",
427
+ "comment": "Bump @fluentui/react-context-selector to v9.0.4",
428
+ "commit": "cd05c21e62ff37812d614330eb70f97fd978c97a"
429
+ },
430
+ {
431
+ "author": "beachball",
432
+ "package": "@fluentui/global-context",
433
+ "comment": "Bump @fluentui/react-utilities to v9.1.1",
434
+ "commit": "cd05c21e62ff37812d614330eb70f97fd978c97a"
435
+ }
436
+ ]
437
+ }
438
+ },
439
+ {
440
+ "date": "Thu, 15 Sep 2022 09:49:44 GMT",
441
+ "tag": "@fluentui/global-context_v9.0.0-beta.4",
442
+ "version": "9.0.0-beta.4",
443
+ "comments": {
444
+ "none": [
445
+ {
446
+ "author": "martinhochel@microsoft.com",
447
+ "package": "@fluentui/global-context",
448
+ "commit": "e6cf183695d6d67a24e038c49a876224e5ed35e5",
449
+ "comment": "chore: update package scaffold"
450
+ },
451
+ {
452
+ "author": "martinhochel@microsoft.com",
453
+ "package": "@fluentui/global-context",
454
+ "commit": "ba9444d594f3a960cc590eae5237c08bf7c5a07f",
455
+ "comment": "chore: consume cypress.config from it's package boundary"
456
+ }
457
+ ],
458
+ "prerelease": [
459
+ {
460
+ "author": "beachball",
461
+ "package": "@fluentui/global-context",
462
+ "comment": "Bump @fluentui/react-context-selector to v9.0.3",
463
+ "commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
464
+ },
465
+ {
466
+ "author": "beachball",
467
+ "package": "@fluentui/global-context",
468
+ "comment": "Bump @fluentui/react-utilities to v9.1.0",
469
+ "commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
470
+ }
471
+ ]
472
+ }
473
+ },
474
+ {
475
+ "date": "Wed, 03 Aug 2022 16:03:35 GMT",
476
+ "tag": "@fluentui/global-context_v9.0.0-beta.3",
477
+ "version": "9.0.0-beta.3",
478
+ "comments": {
479
+ "none": [
480
+ {
481
+ "author": "bernardo.sunderhus@gmail.com",
482
+ "package": "@fluentui/global-context",
483
+ "commit": "d966ea3d9169f2e8d69f0d2a4daf86fe4ca328d6",
484
+ "comment": "disables eslint rule @fluentui/no-context-default-value for local component context"
485
+ }
486
+ ]
487
+ }
488
+ },
489
+ {
490
+ "date": "Thu, 14 Jul 2022 21:21:07 GMT",
491
+ "tag": "@fluentui/global-context_v9.0.0-beta.3",
492
+ "version": "9.0.0-beta.3",
493
+ "comments": {
494
+ "prerelease": [
495
+ {
496
+ "author": "Humberto.Morimoto@microsoft.com",
497
+ "package": "@fluentui/global-context",
498
+ "commit": "802bc4e3730a88b0fc61b5bf42ef7fc6b6543fe2",
499
+ "comment": "fix: Fixing bad version bump of @fluentui/react-utilities."
500
+ },
501
+ {
502
+ "author": "beachball",
503
+ "package": "@fluentui/global-context",
504
+ "comment": "Bump @fluentui/react-context-selector to v9.0.2",
505
+ "commit": "79b513146194367544160f364b0a7dd749ed93e4"
506
+ },
507
+ {
508
+ "author": "beachball",
509
+ "package": "@fluentui/global-context",
510
+ "comment": "Bump @fluentui/react-utilities to v9.0.2",
511
+ "commit": "79b513146194367544160f364b0a7dd749ed93e4"
512
+ }
513
+ ]
514
+ }
515
+ },
516
+ {
517
+ "date": "Thu, 14 Jul 2022 17:06:26 GMT",
6
518
  "tag": "@fluentui/global-context_v9.0.0-beta.2",
7
519
  "version": "9.0.0-beta.2",
8
520
  "comments": {
@@ -11,13 +523,13 @@
11
523
  "author": "beachball",
12
524
  "package": "@fluentui/global-context",
13
525
  "comment": "Bump @fluentui/react-context-selector to v9.0.1",
14
- "commit": "fd9308f35ec9b2c7f7fdbfce62f9a94ca00d6536"
526
+ "commit": "35237381e941c8935b1892c9217096cea3e5601f"
15
527
  },
16
528
  {
17
529
  "author": "beachball",
18
530
  "package": "@fluentui/global-context",
19
531
  "comment": "Bump @fluentui/react-utilities to v9.0.1-0",
20
- "commit": "fd9308f35ec9b2c7f7fdbfce62f9a94ca00d6536"
532
+ "commit": "35237381e941c8935b1892c9217096cea3e5601f"
21
533
  }
22
534
  ]
23
535
  }
package/CHANGELOG.md CHANGED
@@ -1,18 +1,211 @@
1
1
  # Change Log - @fluentui/global-context
2
2
 
3
- This log was last generated on Thu, 14 Jul 2022 17:03:35 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 16 Mar 2023 14:33:33 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.0-beta.21](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.21)
8
+
9
+ Thu, 16 Mar 2023 14:33:33 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.20..@fluentui/global-context_v9.0.0-beta.21)
11
+
12
+ ### Changes
13
+
14
+ - Bump @fluentui/react-context-selector to v9.1.14 ([PR #27229](https://github.com/microsoft/fluentui/pull/27229) by beachball)
15
+ - Bump @fluentui/react-utilities to v9.7.1 ([PR #27229](https://github.com/microsoft/fluentui/pull/27229) by beachball)
16
+
17
+ ## [9.0.0-beta.20](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.20)
18
+
19
+ Mon, 13 Mar 2023 08:58:26 GMT
20
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.19..@fluentui/global-context_v9.0.0-beta.20)
21
+
22
+ ### Changes
23
+
24
+ - Bump @fluentui/react-context-selector to v9.1.13 ([PR #27161](https://github.com/microsoft/fluentui/pull/27161) by beachball)
25
+ - Bump @fluentui/react-utilities to v9.7.0 ([PR #27161](https://github.com/microsoft/fluentui/pull/27161) by beachball)
26
+
27
+ ## [9.0.0-beta.19](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.19)
28
+
29
+ Fri, 10 Mar 2023 07:14:01 GMT
30
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.18..@fluentui/global-context_v9.0.0-beta.19)
31
+
32
+ ### Changes
33
+
34
+ - Bump @fluentui/react-context-selector to v9.1.12 ([PR #27157](https://github.com/microsoft/fluentui/pull/27157) by beachball)
35
+ - Bump @fluentui/react-utilities to v9.6.2 ([PR #27157](https://github.com/microsoft/fluentui/pull/27157) by beachball)
36
+
37
+ ## [9.0.0-beta.18](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.18)
38
+
39
+ Wed, 08 Mar 2023 17:42:51 GMT
40
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.17..@fluentui/global-context_v9.0.0-beta.18)
41
+
42
+ ### Changes
43
+
44
+ - Bump @fluentui/react-context-selector to v9.1.11 ([PR #27127](https://github.com/microsoft/fluentui/pull/27127) by beachball)
45
+ - Bump @fluentui/react-utilities to v9.6.1 ([PR #27127](https://github.com/microsoft/fluentui/pull/27127) by beachball)
46
+
47
+ ## [9.0.0-beta.17](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.17)
48
+
49
+ Wed, 15 Feb 2023 11:44:52 GMT
50
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.16..@fluentui/global-context_v9.0.0-beta.17)
51
+
52
+ ### Changes
53
+
54
+ - Bump @fluentui/react-context-selector to v9.1.10 ([PR #26845](https://github.com/microsoft/fluentui/pull/26845) by beachball)
55
+ - Bump @fluentui/react-utilities to v9.6.0 ([PR #26845](https://github.com/microsoft/fluentui/pull/26845) by beachball)
56
+
57
+ ## [9.0.0-beta.16](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.16)
58
+
59
+ Mon, 13 Feb 2023 23:43:14 GMT
60
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.15..@fluentui/global-context_v9.0.0-beta.16)
61
+
62
+ ### Changes
63
+
64
+ - Bump @fluentui/react-context-selector to v9.1.9 ([PR #26814](https://github.com/microsoft/fluentui/pull/26814) by beachball)
65
+ - Bump @fluentui/react-utilities to v9.5.3 ([PR #26814](https://github.com/microsoft/fluentui/pull/26814) by beachball)
66
+
67
+ ## [9.0.0-beta.15](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.15)
68
+
69
+ Fri, 10 Feb 2023 08:50:02 GMT
70
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.14..@fluentui/global-context_v9.0.0-beta.15)
71
+
72
+ ### Changes
73
+
74
+ - Bump @fluentui/react-context-selector to v9.1.8 ([commit](https://github.com/microsoft/fluentui/commit/cc62f050f8231e8f21a2cf7dddf33003e0ba3931) by beachball)
75
+ - Bump @fluentui/react-utilities to v9.5.2 ([commit](https://github.com/microsoft/fluentui/commit/cc62f050f8231e8f21a2cf7dddf33003e0ba3931) by beachball)
76
+
77
+ ## [9.0.0-beta.14](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.14)
78
+
79
+ Tue, 31 Jan 2023 19:53:58 GMT
80
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.13..@fluentui/global-context_v9.0.0-beta.14)
81
+
82
+ ### Changes
83
+
84
+ - Bump @fluentui/react-context-selector to v9.1.7 ([PR #26557](https://github.com/microsoft/fluentui/pull/26557) by beachball)
85
+ - Bump @fluentui/react-utilities to v9.5.1 ([PR #26557](https://github.com/microsoft/fluentui/pull/26557) by beachball)
86
+
87
+ ## [9.0.0-beta.13](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.13)
88
+
89
+ Thu, 26 Jan 2023 13:31:03 GMT
90
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.12..@fluentui/global-context_v9.0.0-beta.13)
91
+
92
+ ### Changes
93
+
94
+ - Bump @fluentui/react-context-selector to v9.1.6 ([PR #26496](https://github.com/microsoft/fluentui/pull/26496) by beachball)
95
+ - Bump @fluentui/react-utilities to v9.5.0 ([PR #26496](https://github.com/microsoft/fluentui/pull/26496) by beachball)
96
+
97
+ ## [9.0.0-beta.12](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.12)
98
+
99
+ Mon, 09 Jan 2023 14:34:54 GMT
100
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.11..@fluentui/global-context_v9.0.0-beta.12)
101
+
102
+ ### Changes
103
+
104
+ - Bump @fluentui/react-context-selector to v9.1.5 ([PR #26255](https://github.com/microsoft/fluentui/pull/26255) by beachball)
105
+ - Bump @fluentui/react-utilities to v9.4.0 ([PR #26255](https://github.com/microsoft/fluentui/pull/26255) by beachball)
106
+
107
+ ## [9.0.0-beta.11](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.11)
108
+
109
+ Wed, 04 Jan 2023 01:40:46 GMT
110
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.10..@fluentui/global-context_v9.0.0-beta.11)
111
+
112
+ ### Changes
113
+
114
+ - Bump @fluentui/react-context-selector to v9.1.4 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
115
+ - Bump @fluentui/react-utilities to v9.3.1 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
116
+
117
+ ## [9.0.0-beta.10](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.10)
118
+
119
+ Tue, 20 Dec 2022 14:59:34 GMT
120
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.9..@fluentui/global-context_v9.0.0-beta.10)
121
+
122
+ ### Changes
123
+
124
+ - Bump @fluentui/react-context-selector to v9.1.3 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
125
+ - Bump @fluentui/react-utilities to v9.3.0 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
126
+
127
+ ## [9.0.0-beta.9](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.9)
128
+
129
+ Thu, 17 Nov 2022 23:05:31 GMT
130
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.8..@fluentui/global-context_v9.0.0-beta.9)
131
+
132
+ ### Changes
133
+
134
+ - Bump @fluentui/react-context-selector to v9.1.2 ([PR #25683](https://github.com/microsoft/fluentui/pull/25683) by beachball)
135
+ - Bump @fluentui/react-utilities to v9.2.2 ([PR #25683](https://github.com/microsoft/fluentui/pull/25683) by beachball)
136
+
137
+ ## [9.0.0-beta.8](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.8)
138
+
139
+ Fri, 11 Nov 2022 14:57:50 GMT
140
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.7..@fluentui/global-context_v9.0.0-beta.8)
141
+
142
+ ### Changes
143
+
144
+ - fix: create valid export maps ([PR #25558](https://github.com/microsoft/fluentui/pull/25558) by martinhochel@microsoft.com)
145
+ - Bump @fluentui/react-context-selector to v9.1.1 ([PR #25615](https://github.com/microsoft/fluentui/pull/25615) by beachball)
146
+ - Bump @fluentui/react-utilities to v9.2.1 ([PR #25615](https://github.com/microsoft/fluentui/pull/25615) by beachball)
147
+
148
+ ## [9.0.0-beta.7](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.7)
149
+
150
+ Wed, 02 Nov 2022 11:58:07 GMT
151
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.6..@fluentui/global-context_v9.0.0-beta.7)
152
+
153
+ ### Changes
154
+
155
+ - Bump @fluentui/react-context-selector to v9.1.0 ([PR #25456](https://github.com/microsoft/fluentui/pull/25456) by beachball)
156
+ - Bump @fluentui/react-utilities to v9.2.0 ([PR #25456](https://github.com/microsoft/fluentui/pull/25456) by beachball)
157
+
158
+ ## [9.0.0-beta.6](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.6)
159
+
160
+ Thu, 20 Oct 2022 08:39:56 GMT
161
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.5..@fluentui/global-context_v9.0.0-beta.6)
162
+
163
+ ### Changes
164
+
165
+ - chore: Bump peer deps to support React 18 ([PR #24972](https://github.com/microsoft/fluentui/pull/24972) by mgodbolt@microsoft.com)
166
+ - Bump @fluentui/react-context-selector to v9.0.5 ([PR #25265](https://github.com/microsoft/fluentui/pull/25265) by beachball)
167
+ - Bump @fluentui/react-utilities to v9.1.2 ([PR #25265](https://github.com/microsoft/fluentui/pull/25265) by beachball)
168
+
169
+ ## [9.0.0-beta.5](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.5)
170
+
171
+ Thu, 13 Oct 2022 11:03:06 GMT
172
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.4..@fluentui/global-context_v9.0.0-beta.5)
173
+
174
+ ### Changes
175
+
176
+ - Bump @fluentui/react-context-selector to v9.0.4 ([PR #25181](https://github.com/microsoft/fluentui/pull/25181) by beachball)
177
+ - Bump @fluentui/react-utilities to v9.1.1 ([PR #25181](https://github.com/microsoft/fluentui/pull/25181) by beachball)
178
+
179
+ ## [9.0.0-beta.4](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.4)
180
+
181
+ Thu, 15 Sep 2022 09:49:44 GMT
182
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.3..@fluentui/global-context_v9.0.0-beta.4)
183
+
184
+ ### Changes
185
+
186
+ - Bump @fluentui/react-context-selector to v9.0.3 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
187
+ - Bump @fluentui/react-utilities to v9.1.0 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
188
+
189
+ ## [9.0.0-beta.3](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.3)
190
+
191
+ Thu, 14 Jul 2022 21:21:07 GMT
192
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.2..@fluentui/global-context_v9.0.0-beta.3)
193
+
194
+ ### Changes
195
+
196
+ - fix: Fixing bad version bump of @fluentui/react-utilities. ([PR #23920](https://github.com/microsoft/fluentui/pull/23920) by Humberto.Morimoto@microsoft.com)
197
+ - Bump @fluentui/react-context-selector to v9.0.2 ([PR #23918](https://github.com/microsoft/fluentui/pull/23918) by beachball)
198
+ - Bump @fluentui/react-utilities to v9.0.2 ([PR #23918](https://github.com/microsoft/fluentui/pull/23918) by beachball)
199
+
7
200
  ## [9.0.0-beta.2](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.2)
8
201
 
9
- Thu, 14 Jul 2022 17:03:35 GMT
202
+ Thu, 14 Jul 2022 17:06:26 GMT
10
203
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.1..@fluentui/global-context_v9.0.0-beta.2)
11
204
 
12
205
  ### Changes
13
206
 
14
- - Bump @fluentui/react-context-selector to v9.0.1 ([PR #23909](https://github.com/microsoft/fluentui/pull/23909) by beachball)
15
- - Bump @fluentui/react-utilities to v9.0.1-0 ([PR #23909](https://github.com/microsoft/fluentui/pull/23909) by beachball)
207
+ - Bump @fluentui/react-context-selector to v9.0.1 ([PR #23897](https://github.com/microsoft/fluentui/pull/23897) by beachball)
208
+ - Bump @fluentui/react-utilities to v9.0.1-0 ([PR #23897](https://github.com/microsoft/fluentui/pull/23897) by beachball)
16
209
 
17
210
  ## [9.0.0-beta.1](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.1)
18
211
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @fluentui/global-context
2
2
 
3
- **Global Context for [Fluent UI React](https://developer.microsoft.com/en-us/fluentui)**
3
+ **Global Context for [Fluent UI React](https://react.fluentui.dev)**
4
4
 
5
5
  This package contains a shim for `React.createContext` API that will register the context object to the global
6
6
  scope (`window` for browsers, `global` for nodejs). This means that contexts will be real singletons.
@@ -2,17 +2,16 @@ import { createContext as baseCreateContext } from '@fluentui/react-context-sele
2
2
  import { canUseDOM } from '@fluentui/react-utilities';
3
3
  import { getMajorVersion } from './utils';
4
4
  const isBrowser = /*#__PURE__*/canUseDOM();
5
- const globalObject = isBrowser ? window : global; // Identifier for the symbol, for easy idenfitifaction of symbols created by this util
5
+ const globalObject = isBrowser ? window : global;
6
+ // Identifier for the symbol, for easy idenfitifaction of symbols created by this util
6
7
  // Useful for clearning global object during SSR reloads
7
-
8
- export const SYMBOL_NAMESPACE = 'global-context-selector:'; // During SSR the global object persists with the server process
8
+ export const SYMBOL_NAMESPACE = 'global-context-selector:';
9
+ // During SSR the global object persists with the server process
9
10
  // Clean out the global object during server reload during development
10
-
11
11
  if (!isBrowser && process.env.NODE_ENV !== 'production') {
12
12
  const globalSymbols = /*#__PURE__*/Object.getOwnPropertySymbols(globalObject);
13
13
  globalSymbols.forEach(sym => {
14
14
  var _a;
15
-
16
15
  if ((_a = Symbol.keyFor(sym)) === null || _a === void 0 ? void 0 : _a.startsWith(SYMBOL_NAMESPACE)) {
17
16
  // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
18
17
  delete globalObject[sym];
@@ -32,21 +31,18 @@ if (!isBrowser && process.env.NODE_ENV !== 'production') {
32
31
  * @param packageVersion - version of the npm package where the module is used
33
32
  * @returns @see React.createContext
34
33
  */
35
-
36
-
37
34
  export const createContext = (defaultValue, name, packageName, packageVersion) => {
38
35
  // Symbol guaranteed to be unique for the entire runtime
39
- const sym = Symbol.for(`${SYMBOL_NAMESPACE}${packageName}/${name}/@${getMajorVersion(packageVersion)}`); // Objects keyed with symbols are not visible with console.log
36
+ const sym = Symbol.for(`${SYMBOL_NAMESPACE}${packageName}/${name}/@${getMajorVersion(packageVersion)}`);
37
+ // Objects keyed with symbols are not visible with console.log
40
38
  // Object symbol properties can't be iterated with `for` or `Object.keys`
41
-
42
39
  const globalSymbols = Object.getOwnPropertySymbols(globalObject);
43
-
44
40
  if (!globalSymbols.includes(sym)) {
45
41
  // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
42
+ // eslint-disable-next-line @fluentui/no-context-default-value
46
43
  globalObject[sym] = baseCreateContext(defaultValue);
47
- } // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
48
-
49
-
44
+ }
45
+ // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
50
46
  return globalObject[sym];
51
47
  };
52
48
  //# sourceMappingURL=global-context-selector.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["global-context-selector.ts"],"names":[],"mappings":"AACA,SAAS,aAAa,IAAI,iBAA1B,QAAmD,kCAAnD;AACA,SAAS,SAAT,QAA0B,2BAA1B;AACA,SAAS,eAAT,QAAgC,SAAhC;AAGA,MAAM,SAAS,gBAAG,SAAS,EAA3B;AACA,MAAM,YAAY,GAAiB,SAAS,GAAG,MAAH,GAAY,MAAxD,C,CAEA;AACA;;AACA,OAAO,MAAM,gBAAgB,GAAG,0BAAzB,C,CAEP;AACA;;AACA,IAAI,CAAC,SAAD,IAAc,OAAO,CAAC,GAAR,CAAY,QAAZ,KAAyB,YAA3C,EAAyD;EACvD,MAAM,aAAa,gBAAG,MAAM,CAAC,qBAAP,CAA6B,YAA7B,CAAtB;EACA,aAAa,CAAC,OAAd,CAAsB,GAAG,IAAG;;;IAC1B,IAAI,CAAA,EAAA,GAAA,MAAM,CAAC,MAAP,CAAc,GAAd,CAAA,MAAkB,IAAlB,IAAkB,EAAA,KAAA,KAAA,CAAlB,GAAkB,KAAA,CAAlB,GAAkB,EAAA,CAAE,UAAF,CAAa,gBAAb,CAAtB,EAAsD;MACpD;MACA,OAAO,YAAY,CAAC,GAAD,CAAnB;IACD;EACF,CALD;AAMD;AAED;;;;;;;;;;;;AAYG;;;AACH,OAAO,MAAM,aAAa,GAAG,CAAI,YAAJ,EAAqB,IAArB,EAAmC,WAAnC,EAAwD,cAAxD,KAAkF;EAC7G;EACA,MAAM,GAAG,GAAG,MAAM,CAAC,GAAP,CAAW,GAAG,gBAAgB,GAAG,WAAW,IAAI,IAAI,KAAK,eAAe,CAAC,cAAD,CAAgB,EAAxF,CAAZ,CAF6G,CAI7G;EACA;;EACA,MAAM,aAAa,GAAG,MAAM,CAAC,qBAAP,CAA6B,YAA7B,CAAtB;;EACA,IAAI,CAAC,aAAa,CAAC,QAAd,CAAuB,GAAvB,CAAL,EAAkC;IAChC;IACA,YAAY,CAAC,GAAD,CAAZ,GAAoB,iBAAiB,CAAC,YAAD,CAArC;EACD,CAV4G,CAY7G;;;EACA,OAAO,YAAY,CAAC,GAAD,CAAnB;AACD,CAdM","sourcesContent":["import * as React from 'react';\nimport { createContext as baseCreateContext } from '@fluentui/react-context-selector';\nimport { canUseDOM } from '@fluentui/react-utilities';\nimport { getMajorVersion } from './utils';\nimport { GlobalObject } from './types';\n\nconst isBrowser = canUseDOM();\nconst globalObject: GlobalObject = isBrowser ? window : global;\n\n// Identifier for the symbol, for easy idenfitifaction of symbols created by this util\n// Useful for clearning global object during SSR reloads\nexport const SYMBOL_NAMESPACE = 'global-context-selector:';\n\n// During SSR the global object persists with the server process\n// Clean out the global object during server reload during development\nif (!isBrowser && process.env.NODE_ENV !== 'production') {\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n globalSymbols.forEach(sym => {\n if (Symbol.keyFor(sym)?.startsWith(SYMBOL_NAMESPACE)) {\n // @ts-expect-error - Indexing object with symbols not supported until TS 4.4\n delete globalObject[sym];\n }\n });\n}\n\n/**\n * Wrapper around @see createContext from \\@fluentui/react-context-selector that implements context registration\n * in the globalThis object to avoid duplicate contexts. Contexts are keyed with\n * a unique sybmol for the package name, version and name of the context.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol}\n *\n * @param defaultValue - @see React.createContext\n * @param name - name of the context\n * @param packageName - name of the npm package where the module is used\n * @param packageVersion - version of the npm package where the module is used\n * @returns @see React.createContext\n */\nexport const createContext = <T>(defaultValue: T, name: string, packageName: string, packageVersion: string) => {\n // Symbol guaranteed to be unique for the entire runtime\n const sym = Symbol.for(`${SYMBOL_NAMESPACE}${packageName}/${name}/@${getMajorVersion(packageVersion)}`);\n\n // Objects keyed with symbols are not visible with console.log\n // Object symbol properties can't be iterated with `for` or `Object.keys`\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n if (!globalSymbols.includes(sym)) {\n // @ts-expect-error - Indexing object with symbols not supported until TS 4.4\n globalObject[sym] = baseCreateContext(defaultValue);\n }\n\n // @ts-expect-error - Indexing object with symbols not supported until TS 4.4\n return globalObject[sym] as React.Context<T>;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"names":["createContext","baseCreateContext","canUseDOM","getMajorVersion","isBrowser","globalObject","window","global","SYMBOL_NAMESPACE","process","env","NODE_ENV","globalSymbols","Object","getOwnPropertySymbols","forEach","sym","_a","Symbol","keyFor","startsWith","defaultValue","name","packageName","packageVersion","for","includes"],"sources":["../src/packages/react-components/global-context/src/global-context-selector.ts"],"sourcesContent":["import * as React from 'react';\nimport { createContext as baseCreateContext } from '@fluentui/react-context-selector';\nimport { canUseDOM } from '@fluentui/react-utilities';\nimport { getMajorVersion } from './utils';\nimport { GlobalObject } from './types';\n\nconst isBrowser = canUseDOM();\nconst globalObject: GlobalObject = isBrowser ? window : global;\n\n// Identifier for the symbol, for easy idenfitifaction of symbols created by this util\n// Useful for clearning global object during SSR reloads\nexport const SYMBOL_NAMESPACE = 'global-context-selector:';\n\n// During SSR the global object persists with the server process\n// Clean out the global object during server reload during development\nif (!isBrowser && process.env.NODE_ENV !== 'production') {\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n globalSymbols.forEach(sym => {\n if (Symbol.keyFor(sym)?.startsWith(SYMBOL_NAMESPACE)) {\n // @ts-expect-error - Indexing object with symbols not supported until TS 4.4\n delete globalObject[sym];\n }\n });\n}\n\n/**\n * Wrapper around @see createContext from \\@fluentui/react-context-selector that implements context registration\n * in the globalThis object to avoid duplicate contexts. Contexts are keyed with\n * a unique sybmol for the package name, version and name of the context.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol}\n *\n * @param defaultValue - @see React.createContext\n * @param name - name of the context\n * @param packageName - name of the npm package where the module is used\n * @param packageVersion - version of the npm package where the module is used\n * @returns @see React.createContext\n */\nexport const createContext = <T>(defaultValue: T, name: string, packageName: string, packageVersion: string) => {\n // Symbol guaranteed to be unique for the entire runtime\n const sym = Symbol.for(`${SYMBOL_NAMESPACE}${packageName}/${name}/@${getMajorVersion(packageVersion)}`);\n\n // Objects keyed with symbols are not visible with console.log\n // Object symbol properties can't be iterated with `for` or `Object.keys`\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n if (!globalSymbols.includes(sym)) {\n // @ts-expect-error - Indexing object with symbols not supported until TS 4.4\n // eslint-disable-next-line @fluentui/no-context-default-value\n globalObject[sym] = baseCreateContext(defaultValue);\n }\n\n // @ts-expect-error - Indexing object with symbols not supported until TS 4.4\n return globalObject[sym] as React.Context<T>;\n};\n"],"mappings":"AACA,SAASA,aAAa,IAAIC,iBAAiB,QAAQ,kCAAkC;AACrF,SAASC,SAAS,QAAQ,2BAA2B;AACrD,SAASC,eAAe,QAAQ,SAAS;AAGzC,MAAMC,SAAS,gBAAGF,SAAS,EAAE;AAC7B,MAAMG,YAAY,GAAiBD,SAAS,GAAGE,MAAM,GAAGC,MAAM;AAE9D;AACA;AACA,OAAO,MAAMC,gBAAgB,GAAG,0BAA0B;AAE1D;AACA;AACA,IAAI,CAACJ,SAAS,IAAIK,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;EACvD,MAAMC,aAAa,gBAAGC,MAAM,CAACC,qBAAqB,CAACT,YAAY,CAAC;EAChEO,aAAa,CAACG,OAAO,CAACC,GAAG,IAAG;;IAC1B,IAAI,CAAAC,EAAA,GAAAC,MAAM,CAACC,MAAM,CAACH,GAAG,CAAC,cAAAC,EAAA,uBAAAA,EAAA,CAAEG,UAAU,CAACZ,gBAAgB,CAAC,EAAE;MACpD;MACA,OAAOH,YAAY,CAACW,GAAG,CAAC;;EAE5B,CAAC,CAAC;;AAGJ;;;;;;;;;;;;;AAaA,OAAO,MAAMhB,aAAa,GAAGA,CAAIqB,YAAe,EAAEC,IAAY,EAAEC,WAAmB,EAAEC,cAAsB,KAAI;EAC7G;EACA,MAAMR,GAAG,GAAGE,MAAM,CAACO,GAAG,CAAC,GAAGjB,gBAAgB,GAAGe,WAAW,IAAID,IAAI,KAAKnB,eAAe,CAACqB,cAAc,CAAC,EAAE,CAAC;EAEvG;EACA;EACA,MAAMZ,aAAa,GAAGC,MAAM,CAACC,qBAAqB,CAACT,YAAY,CAAC;EAChE,IAAI,CAACO,aAAa,CAACc,QAAQ,CAACV,GAAG,CAAC,EAAE;IAChC;IACA;IACAX,YAAY,CAACW,GAAG,CAAC,GAAGf,iBAAiB,CAACoB,YAAY,CAAC;;EAGrD;EACA,OAAOhB,YAAY,CAACW,GAAG,CAAqB;AAC9C,CAAC"}
@@ -2,17 +2,16 @@ import * as React from 'react';
2
2
  import { canUseDOM } from '@fluentui/react-utilities';
3
3
  import { getMajorVersion } from './utils';
4
4
  const isBrowser = /*#__PURE__*/canUseDOM();
5
- const globalObject = isBrowser ? window : global; // Identifier for the symbol, for easy idenfitifaction of symbols created by this util
5
+ const globalObject = isBrowser ? window : global;
6
+ // Identifier for the symbol, for easy idenfitifaction of symbols created by this util
6
7
  // Useful for clearning global object during SSR reloads
7
-
8
- export const SYMBOL_NAMESPACE = 'global-context:'; // During SSR the global object persists with the server process
8
+ export const SYMBOL_NAMESPACE = 'global-context:';
9
+ // During SSR the global object persists with the server process
9
10
  // Clean out the global object during server reload during development
10
-
11
11
  if (!isBrowser && process.env.NODE_ENV !== 'production') {
12
12
  const globalSymbols = /*#__PURE__*/Object.getOwnPropertySymbols(globalObject);
13
13
  globalSymbols.forEach(sym => {
14
14
  var _a;
15
-
16
15
  if ((_a = Symbol.keyFor(sym)) === null || _a === void 0 ? void 0 : _a.startsWith(SYMBOL_NAMESPACE)) {
17
16
  // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
18
17
  delete globalObject[sym];
@@ -32,21 +31,18 @@ if (!isBrowser && process.env.NODE_ENV !== 'production') {
32
31
  * @param packageVersion - version of the npm package where the module is used
33
32
  * @returns @see React.createContext
34
33
  */
35
-
36
-
37
34
  export const createContext = (defaultValue, name, packageName, packageVersion) => {
38
35
  // Symbol guaranteed to be unique for the entire runtime
39
- const sym = Symbol.for(`${SYMBOL_NAMESPACE}${packageName}/${name}/@${getMajorVersion(packageVersion)}`); // Objects keyed with symbols are not visible with console.log
36
+ const sym = Symbol.for(`${SYMBOL_NAMESPACE}${packageName}/${name}/@${getMajorVersion(packageVersion)}`);
37
+ // Objects keyed with symbols are not visible with console.log
40
38
  // Object symbol properties can't be iterated with `for` or `Object.keys`
41
-
42
39
  const globalSymbols = Object.getOwnPropertySymbols(globalObject);
43
-
44
40
  if (!globalSymbols.includes(sym)) {
45
41
  // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
42
+ // eslint-disable-next-line @fluentui/no-context-default-value
46
43
  globalObject[sym] = /*#__PURE__*/React.createContext(defaultValue);
47
- } // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
48
-
49
-
44
+ }
45
+ // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
50
46
  return globalObject[sym];
51
47
  };
52
48
  //# sourceMappingURL=global-context.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["global-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,SAAT,QAA0B,2BAA1B;AAEA,SAAS,eAAT,QAAgC,SAAhC;AAEA,MAAM,SAAS,gBAAG,SAAS,EAA3B;AACA,MAAM,YAAY,GAAiB,SAAS,GAAG,MAAH,GAAY,MAAxD,C,CAEA;AACA;;AACA,OAAO,MAAM,gBAAgB,GAAG,iBAAzB,C,CAEP;AACA;;AACA,IAAI,CAAC,SAAD,IAAc,OAAO,CAAC,GAAR,CAAY,QAAZ,KAAyB,YAA3C,EAAyD;EACvD,MAAM,aAAa,gBAAG,MAAM,CAAC,qBAAP,CAA6B,YAA7B,CAAtB;EACA,aAAa,CAAC,OAAd,CAAsB,GAAG,IAAG;;;IAC1B,IAAI,CAAA,EAAA,GAAA,MAAM,CAAC,MAAP,CAAc,GAAd,CAAA,MAAkB,IAAlB,IAAkB,EAAA,KAAA,KAAA,CAAlB,GAAkB,KAAA,CAAlB,GAAkB,EAAA,CAAE,UAAF,CAAa,gBAAb,CAAtB,EAAsD;MACpD;MACA,OAAO,YAAY,CAAC,GAAD,CAAnB;IACD;EACF,CALD;AAMD;AAED;;;;;;;;;;;;AAYG;;;AACH,OAAO,MAAM,aAAa,GAAG,CAAI,YAAJ,EAAqB,IAArB,EAAmC,WAAnC,EAAwD,cAAxD,KAAkF;EAC7G;EACA,MAAM,GAAG,GAAG,MAAM,CAAC,GAAP,CAAW,GAAG,gBAAgB,GAAG,WAAW,IAAI,IAAI,KAAK,eAAe,CAAC,cAAD,CAAgB,EAAxF,CAAZ,CAF6G,CAI7G;EACA;;EACA,MAAM,aAAa,GAAG,MAAM,CAAC,qBAAP,CAA6B,YAA7B,CAAtB;;EACA,IAAI,CAAC,aAAa,CAAC,QAAd,CAAuB,GAAvB,CAAL,EAAkC;IAChC;IACA,YAAY,CAAC,GAAD,CAAZ,gBAAoB,KAAK,CAAC,aAAN,CAAoB,YAApB,CAApB;EACD,CAV4G,CAY7G;;;EACA,OAAO,YAAY,CAAC,GAAD,CAAnB;AACD,CAdM","sourcesContent":["import * as React from 'react';\nimport { canUseDOM } from '@fluentui/react-utilities';\nimport { GlobalObject } from './types';\nimport { getMajorVersion } from './utils';\n\nconst isBrowser = canUseDOM();\nconst globalObject: GlobalObject = isBrowser ? window : global;\n\n// Identifier for the symbol, for easy idenfitifaction of symbols created by this util\n// Useful for clearning global object during SSR reloads\nexport const SYMBOL_NAMESPACE = 'global-context:';\n\n// During SSR the global object persists with the server process\n// Clean out the global object during server reload during development\nif (!isBrowser && process.env.NODE_ENV !== 'production') {\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n globalSymbols.forEach(sym => {\n if (Symbol.keyFor(sym)?.startsWith(SYMBOL_NAMESPACE)) {\n // @ts-expect-error - Indexing object with symbols not supported until TS 4.4\n delete globalObject[sym];\n }\n });\n}\n\n/**\n * Wrapper around @see React.createContext that implements context registration\n * in the globalThis object to avoid duplicate contexts. Contexts are keyed with\n * a unique sybmol for the package name, version and name of the context.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol}\n *\n * @param defaultValue - @see React.createContext\n * @param name - name of the context\n * @param packageName - name of the npm package where the module is used\n * @param packageVersion - version of the npm package where the module is used\n * @returns @see React.createContext\n */\nexport const createContext = <T>(defaultValue: T, name: string, packageName: string, packageVersion: string) => {\n // Symbol guaranteed to be unique for the entire runtime\n const sym = Symbol.for(`${SYMBOL_NAMESPACE}${packageName}/${name}/@${getMajorVersion(packageVersion)}`);\n\n // Objects keyed with symbols are not visible with console.log\n // Object symbol properties can't be iterated with `for` or `Object.keys`\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n if (!globalSymbols.includes(sym)) {\n // @ts-expect-error - Indexing object with symbols not supported until TS 4.4\n globalObject[sym] = React.createContext(defaultValue);\n }\n\n // @ts-expect-error - Indexing object with symbols not supported until TS 4.4\n return globalObject[sym] as React.Context<T>;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"names":["React","canUseDOM","getMajorVersion","isBrowser","globalObject","window","global","SYMBOL_NAMESPACE","process","env","NODE_ENV","globalSymbols","Object","getOwnPropertySymbols","forEach","sym","_a","Symbol","keyFor","startsWith","createContext","defaultValue","name","packageName","packageVersion","for","includes"],"sources":["../src/packages/react-components/global-context/src/global-context.ts"],"sourcesContent":["import * as React from 'react';\nimport { canUseDOM } from '@fluentui/react-utilities';\nimport { GlobalObject } from './types';\nimport { getMajorVersion } from './utils';\n\nconst isBrowser = canUseDOM();\nconst globalObject: GlobalObject = isBrowser ? window : global;\n\n// Identifier for the symbol, for easy idenfitifaction of symbols created by this util\n// Useful for clearning global object during SSR reloads\nexport const SYMBOL_NAMESPACE = 'global-context:';\n\n// During SSR the global object persists with the server process\n// Clean out the global object during server reload during development\nif (!isBrowser && process.env.NODE_ENV !== 'production') {\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n globalSymbols.forEach(sym => {\n if (Symbol.keyFor(sym)?.startsWith(SYMBOL_NAMESPACE)) {\n // @ts-expect-error - Indexing object with symbols not supported until TS 4.4\n delete globalObject[sym];\n }\n });\n}\n\n/**\n * Wrapper around @see React.createContext that implements context registration\n * in the globalThis object to avoid duplicate contexts. Contexts are keyed with\n * a unique sybmol for the package name, version and name of the context.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol}\n *\n * @param defaultValue - @see React.createContext\n * @param name - name of the context\n * @param packageName - name of the npm package where the module is used\n * @param packageVersion - version of the npm package where the module is used\n * @returns @see React.createContext\n */\nexport const createContext = <T>(defaultValue: T, name: string, packageName: string, packageVersion: string) => {\n // Symbol guaranteed to be unique for the entire runtime\n const sym = Symbol.for(`${SYMBOL_NAMESPACE}${packageName}/${name}/@${getMajorVersion(packageVersion)}`);\n\n // Objects keyed with symbols are not visible with console.log\n // Object symbol properties can't be iterated with `for` or `Object.keys`\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n if (!globalSymbols.includes(sym)) {\n // @ts-expect-error - Indexing object with symbols not supported until TS 4.4\n // eslint-disable-next-line @fluentui/no-context-default-value\n globalObject[sym] = React.createContext(defaultValue);\n }\n\n // @ts-expect-error - Indexing object with symbols not supported until TS 4.4\n return globalObject[sym] as React.Context<T>;\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,SAAS,QAAQ,2BAA2B;AAErD,SAASC,eAAe,QAAQ,SAAS;AAEzC,MAAMC,SAAS,gBAAGF,SAAS,EAAE;AAC7B,MAAMG,YAAY,GAAiBD,SAAS,GAAGE,MAAM,GAAGC,MAAM;AAE9D;AACA;AACA,OAAO,MAAMC,gBAAgB,GAAG,iBAAiB;AAEjD;AACA;AACA,IAAI,CAACJ,SAAS,IAAIK,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;EACvD,MAAMC,aAAa,gBAAGC,MAAM,CAACC,qBAAqB,CAACT,YAAY,CAAC;EAChEO,aAAa,CAACG,OAAO,CAACC,GAAG,IAAG;;IAC1B,IAAI,CAAAC,EAAA,GAAAC,MAAM,CAACC,MAAM,CAACH,GAAG,CAAC,cAAAC,EAAA,uBAAAA,EAAA,CAAEG,UAAU,CAACZ,gBAAgB,CAAC,EAAE;MACpD;MACA,OAAOH,YAAY,CAACW,GAAG,CAAC;;EAE5B,CAAC,CAAC;;AAGJ;;;;;;;;;;;;;AAaA,OAAO,MAAMK,aAAa,GAAGA,CAAIC,YAAe,EAAEC,IAAY,EAAEC,WAAmB,EAAEC,cAAsB,KAAI;EAC7G;EACA,MAAMT,GAAG,GAAGE,MAAM,CAACQ,GAAG,CAAC,GAAGlB,gBAAgB,GAAGgB,WAAW,IAAID,IAAI,KAAKpB,eAAe,CAACsB,cAAc,CAAC,EAAE,CAAC;EAEvG;EACA;EACA,MAAMb,aAAa,GAAGC,MAAM,CAACC,qBAAqB,CAACT,YAAY,CAAC;EAChE,IAAI,CAACO,aAAa,CAACe,QAAQ,CAACX,GAAG,CAAC,EAAE;IAChC;IACA;IACAX,YAAY,CAACW,GAAG,CAAC,gBAAGf,KAAK,CAACoB,aAAa,CAACC,YAAY,CAAC;;EAGvD;EACA,OAAOjB,YAAY,CAACW,GAAG,CAAqB;AAC9C,CAAC"}
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,aAAa,IAAI,qBAAqB,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["export { createContext } from './global-context';\nexport { createContext as createContextSelector } from './global-context-selector';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/global-context/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,aAAa,IAAI,qBAAqB,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["export { createContext } from './global-context';\nexport { createContext as createContextSelector } from './global-context-selector';\n"]}
package/lib/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"../src/","sources":["types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\n\nexport type GlobalObject = (typeof globalThis | NodeJS.Global) & Record<symbol, React.Context<unknown>>;\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"../src/","sources":["packages/react-components/global-context/src/types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\n\nexport type GlobalObject = (typeof globalThis | NodeJS.Global) & Record<symbol, React.Context<unknown>>;\n"]}
package/lib/utils.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["utils.ts"],"names":[],"mappings":"AAAA;;;AAGG;AACH,OAAM,SAAU,eAAV,CAA0B,OAA1B,EAAyC;EAC7C,OAAO,MAAM,CAAC,OAAO,CAAC,KAAR,CAAc,GAAd,EAAmB,CAAnB,CAAD,CAAb;AACD","sourcesContent":["/**\n * @param version - semver version string\n * @returns The major version number\n */\nexport function getMajorVersion(version: string) {\n return Number(version.split('.')[0]);\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"names":["getMajorVersion","version","Number","split"],"sources":["../src/packages/react-components/global-context/src/utils.ts"],"sourcesContent":["/**\n * @param version - semver version string\n * @returns The major version number\n */\nexport function getMajorVersion(version: string) {\n return Number(version.split('.')[0]);\n}\n"],"mappings":"AAAA;;;;AAIA,OAAM,SAAUA,eAAeA,CAACC,OAAe;EAC7C,OAAOC,MAAM,CAACD,OAAO,CAACE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACtC"}
@@ -4,25 +4,20 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.createContext = exports.SYMBOL_NAMESPACE = void 0;
7
-
8
7
  const react_context_selector_1 = /*#__PURE__*/require("@fluentui/react-context-selector");
9
-
10
8
  const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
-
12
9
  const utils_1 = /*#__PURE__*/require("./utils");
13
-
14
10
  const isBrowser = /*#__PURE__*/react_utilities_1.canUseDOM();
15
- const globalObject = isBrowser ? window : global; // Identifier for the symbol, for easy idenfitifaction of symbols created by this util
11
+ const globalObject = isBrowser ? window : global;
12
+ // Identifier for the symbol, for easy idenfitifaction of symbols created by this util
16
13
  // Useful for clearning global object during SSR reloads
17
-
18
- exports.SYMBOL_NAMESPACE = 'global-context-selector:'; // During SSR the global object persists with the server process
14
+ exports.SYMBOL_NAMESPACE = 'global-context-selector:';
15
+ // During SSR the global object persists with the server process
19
16
  // Clean out the global object during server reload during development
20
-
21
17
  if (!isBrowser && process.env.NODE_ENV !== 'production') {
22
18
  const globalSymbols = /*#__PURE__*/Object.getOwnPropertySymbols(globalObject);
23
19
  globalSymbols.forEach(sym => {
24
20
  var _a;
25
-
26
21
  if ((_a = Symbol.keyFor(sym)) === null || _a === void 0 ? void 0 : _a.startsWith(exports.SYMBOL_NAMESPACE)) {
27
22
  // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
28
23
  delete globalObject[sym];
@@ -42,23 +37,19 @@ if (!isBrowser && process.env.NODE_ENV !== 'production') {
42
37
  * @param packageVersion - version of the npm package where the module is used
43
38
  * @returns @see React.createContext
44
39
  */
45
-
46
-
47
40
  const createContext = (defaultValue, name, packageName, packageVersion) => {
48
41
  // Symbol guaranteed to be unique for the entire runtime
49
- const sym = Symbol.for(`${exports.SYMBOL_NAMESPACE}${packageName}/${name}/@${utils_1.getMajorVersion(packageVersion)}`); // Objects keyed with symbols are not visible with console.log
42
+ const sym = Symbol.for(`${exports.SYMBOL_NAMESPACE}${packageName}/${name}/@${utils_1.getMajorVersion(packageVersion)}`);
43
+ // Objects keyed with symbols are not visible with console.log
50
44
  // Object symbol properties can't be iterated with `for` or `Object.keys`
51
-
52
45
  const globalSymbols = Object.getOwnPropertySymbols(globalObject);
53
-
54
46
  if (!globalSymbols.includes(sym)) {
55
47
  // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
48
+ // eslint-disable-next-line @fluentui/no-context-default-value
56
49
  globalObject[sym] = react_context_selector_1.createContext(defaultValue);
57
- } // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
58
-
59
-
50
+ }
51
+ // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
60
52
  return globalObject[sym];
61
53
  };
62
-
63
54
  exports.createContext = createContext;
64
55
  //# sourceMappingURL=global-context-selector.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["global-context-selector.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,SAAA,CAAA;;AAGA,MAAM,SAAS,gBAAG,iBAAA,CAAA,SAAA,EAAlB;AACA,MAAM,YAAY,GAAiB,SAAS,GAAG,MAAH,GAAY,MAAxD,C,CAEA;AACA;;AACa,OAAA,CAAA,gBAAA,GAAmB,0BAAnB,C,CAEb;AACA;;AACA,IAAI,CAAC,SAAD,IAAc,OAAO,CAAC,GAAR,CAAY,QAAZ,KAAyB,YAA3C,EAAyD;EACvD,MAAM,aAAa,gBAAG,MAAM,CAAC,qBAAP,CAA6B,YAA7B,CAAtB;EACA,aAAa,CAAC,OAAd,CAAsB,GAAG,IAAG;;;IAC1B,IAAI,CAAA,EAAA,GAAA,MAAM,CAAC,MAAP,CAAc,GAAd,CAAA,MAAkB,IAAlB,IAAkB,EAAA,KAAA,KAAA,CAAlB,GAAkB,KAAA,CAAlB,GAAkB,EAAA,CAAE,UAAF,CAAa,OAAA,CAAA,gBAAb,CAAtB,EAAsD;MACpD;MACA,OAAO,YAAY,CAAC,GAAD,CAAnB;IACD;EACF,CALD;AAMD;AAED;;;;;;;;;;;;AAYG;;;AACI,MAAM,aAAa,GAAG,CAAI,YAAJ,EAAqB,IAArB,EAAmC,WAAnC,EAAwD,cAAxD,KAAkF;EAC7G;EACA,MAAM,GAAG,GAAG,MAAM,CAAC,GAAP,CAAW,GAAG,OAAA,CAAA,gBAAgB,GAAG,WAAW,IAAI,IAAI,KAAK,OAAA,CAAA,eAAA,CAAgB,cAAhB,CAA+B,EAAxF,CAAZ,CAF6G,CAI7G;EACA;;EACA,MAAM,aAAa,GAAG,MAAM,CAAC,qBAAP,CAA6B,YAA7B,CAAtB;;EACA,IAAI,CAAC,aAAa,CAAC,QAAd,CAAuB,GAAvB,CAAL,EAAkC;IAChC;IACA,YAAY,CAAC,GAAD,CAAZ,GAAoB,wBAAA,CAAA,aAAA,CAAkB,YAAlB,CAApB;EACD,CAV4G,CAY7G;;;EACA,OAAO,YAAY,CAAC,GAAD,CAAnB;AACD,CAdM;;AAAM,OAAA,CAAA,aAAA,GAAa,aAAb","sourcesContent":["import * as React from 'react';\nimport { createContext as baseCreateContext } from '@fluentui/react-context-selector';\nimport { canUseDOM } from '@fluentui/react-utilities';\nimport { getMajorVersion } from './utils';\nimport { GlobalObject } from './types';\n\nconst isBrowser = canUseDOM();\nconst globalObject: GlobalObject = isBrowser ? window : global;\n\n// Identifier for the symbol, for easy idenfitifaction of symbols created by this util\n// Useful for clearning global object during SSR reloads\nexport const SYMBOL_NAMESPACE = 'global-context-selector:';\n\n// During SSR the global object persists with the server process\n// Clean out the global object during server reload during development\nif (!isBrowser && process.env.NODE_ENV !== 'production') {\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n globalSymbols.forEach(sym => {\n if (Symbol.keyFor(sym)?.startsWith(SYMBOL_NAMESPACE)) {\n // @ts-expect-error - Indexing object with symbols not supported until TS 4.4\n delete globalObject[sym];\n }\n });\n}\n\n/**\n * Wrapper around @see createContext from \\@fluentui/react-context-selector that implements context registration\n * in the globalThis object to avoid duplicate contexts. Contexts are keyed with\n * a unique sybmol for the package name, version and name of the context.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol}\n *\n * @param defaultValue - @see React.createContext\n * @param name - name of the context\n * @param packageName - name of the npm package where the module is used\n * @param packageVersion - version of the npm package where the module is used\n * @returns @see React.createContext\n */\nexport const createContext = <T>(defaultValue: T, name: string, packageName: string, packageVersion: string) => {\n // Symbol guaranteed to be unique for the entire runtime\n const sym = Symbol.for(`${SYMBOL_NAMESPACE}${packageName}/${name}/@${getMajorVersion(packageVersion)}`);\n\n // Objects keyed with symbols are not visible with console.log\n // Object symbol properties can't be iterated with `for` or `Object.keys`\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n if (!globalSymbols.includes(sym)) {\n // @ts-expect-error - Indexing object with symbols not supported until TS 4.4\n globalObject[sym] = baseCreateContext(defaultValue);\n }\n\n // @ts-expect-error - Indexing object with symbols not supported until TS 4.4\n return globalObject[sym] as React.Context<T>;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"names":["react_context_selector_1","require","react_utilities_1","utils_1","isBrowser","canUseDOM","globalObject","window","global","exports","SYMBOL_NAMESPACE","process","env","NODE_ENV","globalSymbols","Object","getOwnPropertySymbols","forEach","sym","_a","Symbol","keyFor","startsWith","createContext","defaultValue","name","packageName","packageVersion","for","getMajorVersion","includes"],"sources":["../src/packages/react-components/global-context/src/global-context-selector.ts"],"sourcesContent":["import * as React from 'react';\nimport { createContext as baseCreateContext } from '@fluentui/react-context-selector';\nimport { canUseDOM } from '@fluentui/react-utilities';\nimport { getMajorVersion } from './utils';\nimport { GlobalObject } from './types';\n\nconst isBrowser = canUseDOM();\nconst globalObject: GlobalObject = isBrowser ? window : global;\n\n// Identifier for the symbol, for easy idenfitifaction of symbols created by this util\n// Useful for clearning global object during SSR reloads\nexport const SYMBOL_NAMESPACE = 'global-context-selector:';\n\n// During SSR the global object persists with the server process\n// Clean out the global object during server reload during development\nif (!isBrowser && process.env.NODE_ENV !== 'production') {\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n globalSymbols.forEach(sym => {\n if (Symbol.keyFor(sym)?.startsWith(SYMBOL_NAMESPACE)) {\n // @ts-expect-error - Indexing object with symbols not supported until TS 4.4\n delete globalObject[sym];\n }\n });\n}\n\n/**\n * Wrapper around @see createContext from \\@fluentui/react-context-selector that implements context registration\n * in the globalThis object to avoid duplicate contexts. Contexts are keyed with\n * a unique sybmol for the package name, version and name of the context.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol}\n *\n * @param defaultValue - @see React.createContext\n * @param name - name of the context\n * @param packageName - name of the npm package where the module is used\n * @param packageVersion - version of the npm package where the module is used\n * @returns @see React.createContext\n */\nexport const createContext = <T>(defaultValue: T, name: string, packageName: string, packageVersion: string) => {\n // Symbol guaranteed to be unique for the entire runtime\n const sym = Symbol.for(`${SYMBOL_NAMESPACE}${packageName}/${name}/@${getMajorVersion(packageVersion)}`);\n\n // Objects keyed with symbols are not visible with console.log\n // Object symbol properties can't be iterated with `for` or `Object.keys`\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n if (!globalSymbols.includes(sym)) {\n // @ts-expect-error - Indexing object with symbols not supported until TS 4.4\n // eslint-disable-next-line @fluentui/no-context-default-value\n globalObject[sym] = baseCreateContext(defaultValue);\n }\n\n // @ts-expect-error - Indexing object with symbols not supported until TS 4.4\n return globalObject[sym] as React.Context<T>;\n};\n"],"mappings":";;;;;;AACA,MAAAA,wBAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AACA,MAAAE,OAAA,gBAAAF,OAAA;AAGA,MAAMG,SAAS,gBAAGF,iBAAA,CAAAG,SAAS,EAAE;AAC7B,MAAMC,YAAY,GAAiBF,SAAS,GAAGG,MAAM,GAAGC,MAAM;AAE9D;AACA;AACaC,OAAA,CAAAC,gBAAgB,GAAG,0BAA0B;AAE1D;AACA;AACA,IAAI,CAACN,SAAS,IAAIO,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;EACvD,MAAMC,aAAa,gBAAGC,MAAM,CAACC,qBAAqB,CAACV,YAAY,CAAC;EAChEQ,aAAa,CAACG,OAAO,CAACC,GAAG,IAAG;;IAC1B,IAAI,CAAAC,EAAA,GAAAC,MAAM,CAACC,MAAM,CAACH,GAAG,CAAC,cAAAC,EAAA,uBAAAA,EAAA,CAAEG,UAAU,CAACb,OAAA,CAAAC,gBAAgB,CAAC,EAAE;MACpD;MACA,OAAOJ,YAAY,CAACY,GAAG,CAAC;;EAE5B,CAAC,CAAC;;AAGJ;;;;;;;;;;;;;AAaO,MAAMK,aAAa,GAAGA,CAAIC,YAAe,EAAEC,IAAY,EAAEC,WAAmB,EAAEC,cAAsB,KAAI;EAC7G;EACA,MAAMT,GAAG,GAAGE,MAAM,CAACQ,GAAG,CAAC,GAAGnB,OAAA,CAAAC,gBAAgB,GAAGgB,WAAW,IAAID,IAAI,KAAKtB,OAAA,CAAA0B,eAAe,CAACF,cAAc,CAAC,EAAE,CAAC;EAEvG;EACA;EACA,MAAMb,aAAa,GAAGC,MAAM,CAACC,qBAAqB,CAACV,YAAY,CAAC;EAChE,IAAI,CAACQ,aAAa,CAACgB,QAAQ,CAACZ,GAAG,CAAC,EAAE;IAChC;IACA;IACAZ,YAAY,CAACY,GAAG,CAAC,GAAGlB,wBAAA,CAAAuB,aAAiB,CAACC,YAAY,CAAC;;EAGrD;EACA,OAAOlB,YAAY,CAACY,GAAG,CAAqB;AAC9C,CAAC;AAfYT,OAAA,CAAAc,aAAa,GAAAA,aAAA"}
@@ -4,25 +4,20 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.createContext = exports.SYMBOL_NAMESPACE = void 0;
7
-
8
7
  const React = /*#__PURE__*/require("react");
9
-
10
8
  const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
-
12
9
  const utils_1 = /*#__PURE__*/require("./utils");
13
-
14
10
  const isBrowser = /*#__PURE__*/react_utilities_1.canUseDOM();
15
- const globalObject = isBrowser ? window : global; // Identifier for the symbol, for easy idenfitifaction of symbols created by this util
11
+ const globalObject = isBrowser ? window : global;
12
+ // Identifier for the symbol, for easy idenfitifaction of symbols created by this util
16
13
  // Useful for clearning global object during SSR reloads
17
-
18
- exports.SYMBOL_NAMESPACE = 'global-context:'; // During SSR the global object persists with the server process
14
+ exports.SYMBOL_NAMESPACE = 'global-context:';
15
+ // During SSR the global object persists with the server process
19
16
  // Clean out the global object during server reload during development
20
-
21
17
  if (!isBrowser && process.env.NODE_ENV !== 'production') {
22
18
  const globalSymbols = /*#__PURE__*/Object.getOwnPropertySymbols(globalObject);
23
19
  globalSymbols.forEach(sym => {
24
20
  var _a;
25
-
26
21
  if ((_a = Symbol.keyFor(sym)) === null || _a === void 0 ? void 0 : _a.startsWith(exports.SYMBOL_NAMESPACE)) {
27
22
  // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
28
23
  delete globalObject[sym];
@@ -42,23 +37,19 @@ if (!isBrowser && process.env.NODE_ENV !== 'production') {
42
37
  * @param packageVersion - version of the npm package where the module is used
43
38
  * @returns @see React.createContext
44
39
  */
45
-
46
-
47
40
  const createContext = (defaultValue, name, packageName, packageVersion) => {
48
41
  // Symbol guaranteed to be unique for the entire runtime
49
- const sym = Symbol.for(`${exports.SYMBOL_NAMESPACE}${packageName}/${name}/@${utils_1.getMajorVersion(packageVersion)}`); // Objects keyed with symbols are not visible with console.log
42
+ const sym = Symbol.for(`${exports.SYMBOL_NAMESPACE}${packageName}/${name}/@${utils_1.getMajorVersion(packageVersion)}`);
43
+ // Objects keyed with symbols are not visible with console.log
50
44
  // Object symbol properties can't be iterated with `for` or `Object.keys`
51
-
52
45
  const globalSymbols = Object.getOwnPropertySymbols(globalObject);
53
-
54
46
  if (!globalSymbols.includes(sym)) {
55
47
  // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
48
+ // eslint-disable-next-line @fluentui/no-context-default-value
56
49
  globalObject[sym] = React.createContext(defaultValue);
57
- } // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
58
-
59
-
50
+ }
51
+ // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
60
52
  return globalObject[sym];
61
53
  };
62
-
63
54
  exports.createContext = createContext;
64
55
  //# sourceMappingURL=global-context.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["global-context.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEA,MAAA,OAAA,gBAAA,OAAA,CAAA,SAAA,CAAA;;AAEA,MAAM,SAAS,gBAAG,iBAAA,CAAA,SAAA,EAAlB;AACA,MAAM,YAAY,GAAiB,SAAS,GAAG,MAAH,GAAY,MAAxD,C,CAEA;AACA;;AACa,OAAA,CAAA,gBAAA,GAAmB,iBAAnB,C,CAEb;AACA;;AACA,IAAI,CAAC,SAAD,IAAc,OAAO,CAAC,GAAR,CAAY,QAAZ,KAAyB,YAA3C,EAAyD;EACvD,MAAM,aAAa,gBAAG,MAAM,CAAC,qBAAP,CAA6B,YAA7B,CAAtB;EACA,aAAa,CAAC,OAAd,CAAsB,GAAG,IAAG;;;IAC1B,IAAI,CAAA,EAAA,GAAA,MAAM,CAAC,MAAP,CAAc,GAAd,CAAA,MAAkB,IAAlB,IAAkB,EAAA,KAAA,KAAA,CAAlB,GAAkB,KAAA,CAAlB,GAAkB,EAAA,CAAE,UAAF,CAAa,OAAA,CAAA,gBAAb,CAAtB,EAAsD;MACpD;MACA,OAAO,YAAY,CAAC,GAAD,CAAnB;IACD;EACF,CALD;AAMD;AAED;;;;;;;;;;;;AAYG;;;AACI,MAAM,aAAa,GAAG,CAAI,YAAJ,EAAqB,IAArB,EAAmC,WAAnC,EAAwD,cAAxD,KAAkF;EAC7G;EACA,MAAM,GAAG,GAAG,MAAM,CAAC,GAAP,CAAW,GAAG,OAAA,CAAA,gBAAgB,GAAG,WAAW,IAAI,IAAI,KAAK,OAAA,CAAA,eAAA,CAAgB,cAAhB,CAA+B,EAAxF,CAAZ,CAF6G,CAI7G;EACA;;EACA,MAAM,aAAa,GAAG,MAAM,CAAC,qBAAP,CAA6B,YAA7B,CAAtB;;EACA,IAAI,CAAC,aAAa,CAAC,QAAd,CAAuB,GAAvB,CAAL,EAAkC;IAChC;IACA,YAAY,CAAC,GAAD,CAAZ,GAAoB,KAAK,CAAC,aAAN,CAAoB,YAApB,CAApB;EACD,CAV4G,CAY7G;;;EACA,OAAO,YAAY,CAAC,GAAD,CAAnB;AACD,CAdM;;AAAM,OAAA,CAAA,aAAA,GAAa,aAAb","sourcesContent":["import * as React from 'react';\nimport { canUseDOM } from '@fluentui/react-utilities';\nimport { GlobalObject } from './types';\nimport { getMajorVersion } from './utils';\n\nconst isBrowser = canUseDOM();\nconst globalObject: GlobalObject = isBrowser ? window : global;\n\n// Identifier for the symbol, for easy idenfitifaction of symbols created by this util\n// Useful for clearning global object during SSR reloads\nexport const SYMBOL_NAMESPACE = 'global-context:';\n\n// During SSR the global object persists with the server process\n// Clean out the global object during server reload during development\nif (!isBrowser && process.env.NODE_ENV !== 'production') {\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n globalSymbols.forEach(sym => {\n if (Symbol.keyFor(sym)?.startsWith(SYMBOL_NAMESPACE)) {\n // @ts-expect-error - Indexing object with symbols not supported until TS 4.4\n delete globalObject[sym];\n }\n });\n}\n\n/**\n * Wrapper around @see React.createContext that implements context registration\n * in the globalThis object to avoid duplicate contexts. Contexts are keyed with\n * a unique sybmol for the package name, version and name of the context.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol}\n *\n * @param defaultValue - @see React.createContext\n * @param name - name of the context\n * @param packageName - name of the npm package where the module is used\n * @param packageVersion - version of the npm package where the module is used\n * @returns @see React.createContext\n */\nexport const createContext = <T>(defaultValue: T, name: string, packageName: string, packageVersion: string) => {\n // Symbol guaranteed to be unique for the entire runtime\n const sym = Symbol.for(`${SYMBOL_NAMESPACE}${packageName}/${name}/@${getMajorVersion(packageVersion)}`);\n\n // Objects keyed with symbols are not visible with console.log\n // Object symbol properties can't be iterated with `for` or `Object.keys`\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n if (!globalSymbols.includes(sym)) {\n // @ts-expect-error - Indexing object with symbols not supported until TS 4.4\n globalObject[sym] = React.createContext(defaultValue);\n }\n\n // @ts-expect-error - Indexing object with symbols not supported until TS 4.4\n return globalObject[sym] as React.Context<T>;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"names":["React","require","react_utilities_1","utils_1","isBrowser","canUseDOM","globalObject","window","global","exports","SYMBOL_NAMESPACE","process","env","NODE_ENV","globalSymbols","Object","getOwnPropertySymbols","forEach","sym","_a","Symbol","keyFor","startsWith","createContext","defaultValue","name","packageName","packageVersion","for","getMajorVersion","includes"],"sources":["../src/packages/react-components/global-context/src/global-context.ts"],"sourcesContent":["import * as React from 'react';\nimport { canUseDOM } from '@fluentui/react-utilities';\nimport { GlobalObject } from './types';\nimport { getMajorVersion } from './utils';\n\nconst isBrowser = canUseDOM();\nconst globalObject: GlobalObject = isBrowser ? window : global;\n\n// Identifier for the symbol, for easy idenfitifaction of symbols created by this util\n// Useful for clearning global object during SSR reloads\nexport const SYMBOL_NAMESPACE = 'global-context:';\n\n// During SSR the global object persists with the server process\n// Clean out the global object during server reload during development\nif (!isBrowser && process.env.NODE_ENV !== 'production') {\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n globalSymbols.forEach(sym => {\n if (Symbol.keyFor(sym)?.startsWith(SYMBOL_NAMESPACE)) {\n // @ts-expect-error - Indexing object with symbols not supported until TS 4.4\n delete globalObject[sym];\n }\n });\n}\n\n/**\n * Wrapper around @see React.createContext that implements context registration\n * in the globalThis object to avoid duplicate contexts. Contexts are keyed with\n * a unique sybmol for the package name, version and name of the context.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol}\n *\n * @param defaultValue - @see React.createContext\n * @param name - name of the context\n * @param packageName - name of the npm package where the module is used\n * @param packageVersion - version of the npm package where the module is used\n * @returns @see React.createContext\n */\nexport const createContext = <T>(defaultValue: T, name: string, packageName: string, packageVersion: string) => {\n // Symbol guaranteed to be unique for the entire runtime\n const sym = Symbol.for(`${SYMBOL_NAMESPACE}${packageName}/${name}/@${getMajorVersion(packageVersion)}`);\n\n // Objects keyed with symbols are not visible with console.log\n // Object symbol properties can't be iterated with `for` or `Object.keys`\n const globalSymbols = Object.getOwnPropertySymbols(globalObject);\n if (!globalSymbols.includes(sym)) {\n // @ts-expect-error - Indexing object with symbols not supported until TS 4.4\n // eslint-disable-next-line @fluentui/no-context-default-value\n globalObject[sym] = React.createContext(defaultValue);\n }\n\n // @ts-expect-error - Indexing object with symbols not supported until TS 4.4\n return globalObject[sym] as React.Context<T>;\n};\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AAEA,MAAAE,OAAA,gBAAAF,OAAA;AAEA,MAAMG,SAAS,gBAAGF,iBAAA,CAAAG,SAAS,EAAE;AAC7B,MAAMC,YAAY,GAAiBF,SAAS,GAAGG,MAAM,GAAGC,MAAM;AAE9D;AACA;AACaC,OAAA,CAAAC,gBAAgB,GAAG,iBAAiB;AAEjD;AACA;AACA,IAAI,CAACN,SAAS,IAAIO,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;EACvD,MAAMC,aAAa,gBAAGC,MAAM,CAACC,qBAAqB,CAACV,YAAY,CAAC;EAChEQ,aAAa,CAACG,OAAO,CAACC,GAAG,IAAG;;IAC1B,IAAI,CAAAC,EAAA,GAAAC,MAAM,CAACC,MAAM,CAACH,GAAG,CAAC,cAAAC,EAAA,uBAAAA,EAAA,CAAEG,UAAU,CAACb,OAAA,CAAAC,gBAAgB,CAAC,EAAE;MACpD;MACA,OAAOJ,YAAY,CAACY,GAAG,CAAC;;EAE5B,CAAC,CAAC;;AAGJ;;;;;;;;;;;;;AAaO,MAAMK,aAAa,GAAGA,CAAIC,YAAe,EAAEC,IAAY,EAAEC,WAAmB,EAAEC,cAAsB,KAAI;EAC7G;EACA,MAAMT,GAAG,GAAGE,MAAM,CAACQ,GAAG,CAAC,GAAGnB,OAAA,CAAAC,gBAAgB,GAAGgB,WAAW,IAAID,IAAI,KAAKtB,OAAA,CAAA0B,eAAe,CAACF,cAAc,CAAC,EAAE,CAAC;EAEvG;EACA;EACA,MAAMb,aAAa,GAAGC,MAAM,CAACC,qBAAqB,CAACV,YAAY,CAAC;EAChE,IAAI,CAACQ,aAAa,CAACgB,QAAQ,CAACZ,GAAG,CAAC,EAAE;IAChC;IACA;IACAZ,YAAY,CAACY,GAAG,CAAC,GAAGlB,KAAK,CAACuB,aAAa,CAACC,YAAY,CAAC;;EAGvD;EACA,OAAOlB,YAAY,CAACY,GAAG,CAAqB;AAC9C,CAAC;AAfYT,OAAA,CAAAc,aAAa,GAAAA,aAAA"}
@@ -4,18 +4,14 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.createContextSelector = exports.createContext = void 0;
7
-
8
7
  var global_context_1 = /*#__PURE__*/require("./global-context");
9
-
10
8
  Object.defineProperty(exports, "createContext", {
11
9
  enumerable: true,
12
10
  get: function () {
13
11
  return global_context_1.createContext;
14
12
  }
15
13
  });
16
-
17
14
  var global_context_selector_1 = /*#__PURE__*/require("./global-context-selector");
18
-
19
15
  Object.defineProperty(exports, "createContextSelector", {
20
16
  enumerable: true,
21
17
  get: function () {
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,eAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,gBAAA,CAAA,aAAA;EAAa;AAAb,CAAA;;AACT,IAAA,yBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,uBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,yBAAA,CAAA,aAAA;EAAa;AAAb,CAAA","sourcesContent":["export { createContext } from './global-context';\nexport { createContext as createContextSelector } from './global-context-selector';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"names":["global_context_1","require","Object","defineProperty","exports","enumerable","get","createContext","global_context_selector_1"],"sources":["../src/packages/react-components/global-context/src/index.ts"],"sourcesContent":["export { createContext } from './global-context';\nexport { createContext as createContextSelector } from './global-context-selector';\n"],"mappings":";;;;;;AAAA,IAAAA,gBAAA,gBAAAC,OAAA;AAASC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,gBAAA,CAAAO,aAAa;EAAA;AAAA;AACtB,IAAAC,yBAAA,gBAAAP,OAAA;AAASC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAE,yBAAA,CAAAD,aAAa;EAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
1
+ {"version":3,"names":[],"sources":["../src/packages/react-components/global-context/src/types.ts"],"sourcesContent":["import * as React from 'react';\n\nexport type GlobalObject = (typeof globalThis | NodeJS.Global) & Record<symbol, React.Context<unknown>>;\n"],"mappings":""}
@@ -8,10 +8,8 @@ exports.getMajorVersion = void 0;
8
8
  * @param version - semver version string
9
9
  * @returns The major version number
10
10
  */
11
-
12
11
  function getMajorVersion(version) {
13
12
  return Number(version.split('.')[0]);
14
13
  }
15
-
16
14
  exports.getMajorVersion = getMajorVersion;
17
15
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["utils.ts"],"names":[],"mappings":";;;;;;AAAA;;;AAGG;;AACH,SAAgB,eAAhB,CAAgC,OAAhC,EAA+C;EAC7C,OAAO,MAAM,CAAC,OAAO,CAAC,KAAR,CAAc,GAAd,EAAmB,CAAnB,CAAD,CAAb;AACD;;AAFD,OAAA,CAAA,eAAA,GAAA,eAAA","sourcesContent":["/**\n * @param version - semver version string\n * @returns The major version number\n */\nexport function getMajorVersion(version: string) {\n return Number(version.split('.')[0]);\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"names":["getMajorVersion","version","Number","split","exports"],"sources":["../src/packages/react-components/global-context/src/utils.ts"],"sourcesContent":["/**\n * @param version - semver version string\n * @returns The major version number\n */\nexport function getMajorVersion(version: string) {\n return Number(version.split('.')[0]);\n}\n"],"mappings":";;;;;;AAAA;;;;AAIA,SAAgBA,eAAeA,CAACC,OAAe;EAC7C,OAAOC,MAAM,CAACD,OAAO,CAACE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACtC;AAFAC,OAAA,CAAAJ,eAAA,GAAAA,eAAA"}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@fluentui/global-context",
3
- "version": "9.0.0-beta.2",
3
+ "version": "9.0.0-beta.21",
4
4
  "description": "Extension of React createContext to be a true singleton on the global scope",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
7
- "typings": "dist/index.d.ts",
7
+ "typings": "./dist/index.d.ts",
8
8
  "sideEffects": false,
9
9
  "repository": {
10
10
  "type": "git",
@@ -16,31 +16,30 @@
16
16
  "bundle-size": "bundle-size measure",
17
17
  "clean": "just-scripts clean",
18
18
  "code-style": "just-scripts code-style",
19
- "e2e": "yarn cypress run --component",
20
- "e2e:local": "yarn cypress open --component",
19
+ "e2e": "cypress run --component",
20
+ "e2e:local": "cypress open --component",
21
21
  "just": "just-scripts",
22
22
  "lint": "just-scripts lint",
23
- "start": "yarn storybook",
24
23
  "test": "jest --passWithNoTests",
25
- "docs": "api-extractor run --config=config/api-extractor.local.json --local",
26
- "build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../../scripts/typescript/normalize-import --output ./dist/types/packages/react-components/global-context/src && yarn docs",
27
- "storybook": "node ../../../scripts/storybook/runner",
28
- "type-check": "tsc -b tsconfig.json"
24
+ "type-check": "tsc -b tsconfig.json",
25
+ "generate-api": "tsc -p ./tsconfig.lib.json --emitDeclarationOnly && just-scripts api-extractor"
29
26
  },
30
27
  "devDependencies": {
31
28
  "@fluentui/eslint-plugin": "*",
32
- "@fluentui/scripts": "^1.0.0"
29
+ "@fluentui/scripts-api-extractor": "*",
30
+ "@fluentui/scripts-cypress": "*",
31
+ "@fluentui/scripts-tasks": "*"
33
32
  },
34
33
  "dependencies": {
35
- "@fluentui/react-context-selector": "^9.0.1",
36
- "@fluentui/react-utilities": "^9.0.1-0",
34
+ "@fluentui/react-context-selector": "^9.1.14",
35
+ "@fluentui/react-utilities": "^9.7.1",
37
36
  "tslib": "^2.1.0"
38
37
  },
39
38
  "peerDependencies": {
40
- "@types/react": ">=16.8.0 <18.0.0",
41
- "@types/react-dom": ">=16.8.0 <18.0.0",
42
- "react": ">=16.8.0 <18.0.0",
43
- "react-dom": ">=16.8.0 <18.0.0",
39
+ "@types/react": ">=16.8.0 <19.0.0",
40
+ "@types/react-dom": ">=16.8.0 <19.0.0",
41
+ "react": ">=16.8.0 <19.0.0",
42
+ "react-dom": ">=16.8.0 <19.0.0",
44
43
  "scheduler": "^0.19.0 || ^0.20.0"
45
44
  },
46
45
  "beachball": {
@@ -49,5 +48,13 @@
49
48
  "minor",
50
49
  "patch"
51
50
  ]
51
+ },
52
+ "exports": {
53
+ ".": {
54
+ "types": "./dist/index.d.ts",
55
+ "import": "./lib/index.js",
56
+ "require": "./lib-commonjs/index.js"
57
+ },
58
+ "./package.json": "./package.json"
52
59
  }
53
60
  }
@@ -1,11 +0,0 @@
1
- // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
- // It should be published with your NPM package. It should not be tracked by Git.
3
- {
4
- "tsdocVersion": "0.12",
5
- "toolPackages": [
6
- {
7
- "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.18.1"
9
- }
10
- ]
11
- }