@fluentui/global-context 9.0.0-beta.3 → 9.0.0-beta.30

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.md CHANGED
@@ -1,19 +1,294 @@
1
1
  # Change Log - @fluentui/global-context
2
2
 
3
- This log was last generated on Thu, 14 Jul 2022 21:18:42 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 20 Jun 2023 12:34:51 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.0-beta.30](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.30)
8
+
9
+ Tue, 20 Jun 2023 12:34:51 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.29..@fluentui/global-context_v9.0.0-beta.30)
11
+
12
+ ### Changes
13
+
14
+ - Bump @fluentui/react-context-selector to v9.1.23 ([PR #28229](https://github.com/microsoft/fluentui/pull/28229) by beachball)
15
+ - Bump @fluentui/react-utilities to v9.9.3 ([PR #28229](https://github.com/microsoft/fluentui/pull/28229) by beachball)
16
+
17
+ ## [9.0.0-beta.29](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.29)
18
+
19
+ Wed, 31 May 2023 06:46:08 GMT
20
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.28..@fluentui/global-context_v9.0.0-beta.29)
21
+
22
+ ### Changes
23
+
24
+ - Bump @fluentui/react-context-selector to v9.1.22 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
25
+ - Bump @fluentui/react-utilities to v9.9.2 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
26
+
27
+ ## [9.0.0-beta.28](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.28)
28
+
29
+ Thu, 25 May 2023 10:00:48 GMT
30
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.27..@fluentui/global-context_v9.0.0-beta.28)
31
+
32
+ ### Changes
33
+
34
+ - Bump @fluentui/react-context-selector to v9.1.21 ([PR #27988](https://github.com/microsoft/fluentui/pull/27988) by beachball)
35
+ - Bump @fluentui/react-utilities to v9.9.1 ([PR #27988](https://github.com/microsoft/fluentui/pull/27988) by beachball)
36
+
37
+ ## [9.0.0-beta.27](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.27)
38
+
39
+ Thu, 18 May 2023 00:39:00 GMT
40
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.26..@fluentui/global-context_v9.0.0-beta.27)
41
+
42
+ ### Changes
43
+
44
+ - Bump @fluentui/react-context-selector to v9.1.20 ([PR #27834](https://github.com/microsoft/fluentui/pull/27834) by beachball)
45
+ - Bump @fluentui/react-utilities to v9.9.0 ([PR #27834](https://github.com/microsoft/fluentui/pull/27834) by beachball)
46
+
47
+ ## [9.0.0-beta.26](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.26)
48
+
49
+ Fri, 12 May 2023 20:28:08 GMT
50
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.25..@fluentui/global-context_v9.0.0-beta.26)
51
+
52
+ ### Changes
53
+
54
+ - chore: exclude .swcrc from being published ([PR #27740](https://github.com/microsoft/fluentui/pull/27740) by olfedias@microsoft.com)
55
+ - Bump @fluentui/react-context-selector to v9.1.19 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
56
+ - Bump @fluentui/react-utilities to v9.8.1 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
57
+
58
+ ## [9.0.0-beta.25](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.25)
59
+
60
+ Mon, 17 Apr 2023 17:54:02 GMT
61
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.24..@fluentui/global-context_v9.0.0-beta.25)
62
+
63
+ ### Changes
64
+
65
+ - Bump @fluentui/react-context-selector to v9.1.18 ([PR #27564](https://github.com/microsoft/fluentui/pull/27564) by beachball)
66
+ - Bump @fluentui/react-utilities to v9.8.0 ([PR #27564](https://github.com/microsoft/fluentui/pull/27564) by beachball)
67
+
68
+ ## [9.0.0-beta.24](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.24)
69
+
70
+ Wed, 12 Apr 2023 09:31:45 GMT
71
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.23..@fluentui/global-context_v9.0.0-beta.24)
72
+
73
+ ### Changes
74
+
75
+ - Bump @fluentui/react-context-selector to v9.1.17 ([PR #27274](https://github.com/microsoft/fluentui/pull/27274) by beachball)
76
+ - Bump @fluentui/react-utilities to v9.7.4 ([PR #27274](https://github.com/microsoft/fluentui/pull/27274) by beachball)
77
+
78
+ ## [9.0.0-beta.23](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.23)
79
+
80
+ Tue, 04 Apr 2023 18:44:50 GMT
81
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.22..@fluentui/global-context_v9.0.0-beta.23)
82
+
83
+ ### Changes
84
+
85
+ - Bump @fluentui/react-context-selector to v9.1.16 ([PR #27434](https://github.com/microsoft/fluentui/pull/27434) by beachball)
86
+ - Bump @fluentui/react-utilities to v9.7.3 ([PR #27434](https://github.com/microsoft/fluentui/pull/27434) by beachball)
87
+
88
+ ## [9.0.0-beta.22](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.22)
89
+
90
+ Tue, 21 Mar 2023 21:23:18 GMT
91
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.21..@fluentui/global-context_v9.0.0-beta.22)
92
+
93
+ ### Changes
94
+
95
+ - chore: migrate to swc transpilation approach. ([PR #27250](https://github.com/microsoft/fluentui/pull/27250) by tristan.watanabe@gmail.com)
96
+ - fix: add node field to package.json exports map. ([PR #27154](https://github.com/microsoft/fluentui/pull/27154) by tristan.watanabe@gmail.com)
97
+ - Bump @fluentui/react-context-selector to v9.1.15 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
98
+ - Bump @fluentui/react-utilities to v9.7.2 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
99
+
100
+ ## [9.0.0-beta.21](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.21)
101
+
102
+ Thu, 16 Mar 2023 14:36:59 GMT
103
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.20..@fluentui/global-context_v9.0.0-beta.21)
104
+
105
+ ### Changes
106
+
107
+ - Bump @fluentui/react-context-selector to v9.1.14 ([PR #27229](https://github.com/microsoft/fluentui/pull/27229) by beachball)
108
+ - Bump @fluentui/react-utilities to v9.7.1 ([PR #27229](https://github.com/microsoft/fluentui/pull/27229) by beachball)
109
+
110
+ ## [9.0.0-beta.20](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.20)
111
+
112
+ Mon, 13 Mar 2023 08:58:26 GMT
113
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.19..@fluentui/global-context_v9.0.0-beta.20)
114
+
115
+ ### Changes
116
+
117
+ - Bump @fluentui/react-context-selector to v9.1.13 ([PR #27161](https://github.com/microsoft/fluentui/pull/27161) by beachball)
118
+ - Bump @fluentui/react-utilities to v9.7.0 ([PR #27161](https://github.com/microsoft/fluentui/pull/27161) by beachball)
119
+
120
+ ## [9.0.0-beta.19](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.19)
121
+
122
+ Fri, 10 Mar 2023 07:14:01 GMT
123
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.18..@fluentui/global-context_v9.0.0-beta.19)
124
+
125
+ ### Changes
126
+
127
+ - Bump @fluentui/react-context-selector to v9.1.12 ([PR #27157](https://github.com/microsoft/fluentui/pull/27157) by beachball)
128
+ - Bump @fluentui/react-utilities to v9.6.2 ([PR #27157](https://github.com/microsoft/fluentui/pull/27157) by beachball)
129
+
130
+ ## [9.0.0-beta.18](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.18)
131
+
132
+ Wed, 08 Mar 2023 17:42:51 GMT
133
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.17..@fluentui/global-context_v9.0.0-beta.18)
134
+
135
+ ### Changes
136
+
137
+ - Bump @fluentui/react-context-selector to v9.1.11 ([PR #27127](https://github.com/microsoft/fluentui/pull/27127) by beachball)
138
+ - Bump @fluentui/react-utilities to v9.6.1 ([PR #27127](https://github.com/microsoft/fluentui/pull/27127) by beachball)
139
+
140
+ ## [9.0.0-beta.17](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.17)
141
+
142
+ Wed, 15 Feb 2023 11:44:52 GMT
143
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.16..@fluentui/global-context_v9.0.0-beta.17)
144
+
145
+ ### Changes
146
+
147
+ - Bump @fluentui/react-context-selector to v9.1.10 ([PR #26845](https://github.com/microsoft/fluentui/pull/26845) by beachball)
148
+ - Bump @fluentui/react-utilities to v9.6.0 ([PR #26845](https://github.com/microsoft/fluentui/pull/26845) by beachball)
149
+
150
+ ## [9.0.0-beta.16](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.16)
151
+
152
+ Mon, 13 Feb 2023 23:43:14 GMT
153
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.15..@fluentui/global-context_v9.0.0-beta.16)
154
+
155
+ ### Changes
156
+
157
+ - Bump @fluentui/react-context-selector to v9.1.9 ([PR #26814](https://github.com/microsoft/fluentui/pull/26814) by beachball)
158
+ - Bump @fluentui/react-utilities to v9.5.3 ([PR #26814](https://github.com/microsoft/fluentui/pull/26814) by beachball)
159
+
160
+ ## [9.0.0-beta.15](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.15)
161
+
162
+ Fri, 10 Feb 2023 08:50:02 GMT
163
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.14..@fluentui/global-context_v9.0.0-beta.15)
164
+
165
+ ### Changes
166
+
167
+ - Bump @fluentui/react-context-selector to v9.1.8 ([commit](https://github.com/microsoft/fluentui/commit/cc62f050f8231e8f21a2cf7dddf33003e0ba3931) by beachball)
168
+ - Bump @fluentui/react-utilities to v9.5.2 ([commit](https://github.com/microsoft/fluentui/commit/cc62f050f8231e8f21a2cf7dddf33003e0ba3931) by beachball)
169
+
170
+ ## [9.0.0-beta.14](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.14)
171
+
172
+ Tue, 31 Jan 2023 19:53:58 GMT
173
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.13..@fluentui/global-context_v9.0.0-beta.14)
174
+
175
+ ### Changes
176
+
177
+ - Bump @fluentui/react-context-selector to v9.1.7 ([PR #26557](https://github.com/microsoft/fluentui/pull/26557) by beachball)
178
+ - Bump @fluentui/react-utilities to v9.5.1 ([PR #26557](https://github.com/microsoft/fluentui/pull/26557) by beachball)
179
+
180
+ ## [9.0.0-beta.13](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.13)
181
+
182
+ Thu, 26 Jan 2023 13:31:03 GMT
183
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.12..@fluentui/global-context_v9.0.0-beta.13)
184
+
185
+ ### Changes
186
+
187
+ - Bump @fluentui/react-context-selector to v9.1.6 ([PR #26496](https://github.com/microsoft/fluentui/pull/26496) by beachball)
188
+ - Bump @fluentui/react-utilities to v9.5.0 ([PR #26496](https://github.com/microsoft/fluentui/pull/26496) by beachball)
189
+
190
+ ## [9.0.0-beta.12](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.12)
191
+
192
+ Mon, 09 Jan 2023 14:34:54 GMT
193
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.11..@fluentui/global-context_v9.0.0-beta.12)
194
+
195
+ ### Changes
196
+
197
+ - Bump @fluentui/react-context-selector to v9.1.5 ([PR #26255](https://github.com/microsoft/fluentui/pull/26255) by beachball)
198
+ - Bump @fluentui/react-utilities to v9.4.0 ([PR #26255](https://github.com/microsoft/fluentui/pull/26255) by beachball)
199
+
200
+ ## [9.0.0-beta.11](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.11)
201
+
202
+ Wed, 04 Jan 2023 01:40:46 GMT
203
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.10..@fluentui/global-context_v9.0.0-beta.11)
204
+
205
+ ### Changes
206
+
207
+ - Bump @fluentui/react-context-selector to v9.1.4 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
208
+ - Bump @fluentui/react-utilities to v9.3.1 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
209
+
210
+ ## [9.0.0-beta.10](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.10)
211
+
212
+ Tue, 20 Dec 2022 14:59:34 GMT
213
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.9..@fluentui/global-context_v9.0.0-beta.10)
214
+
215
+ ### Changes
216
+
217
+ - Bump @fluentui/react-context-selector to v9.1.3 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
218
+ - Bump @fluentui/react-utilities to v9.3.0 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
219
+
220
+ ## [9.0.0-beta.9](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.9)
221
+
222
+ Thu, 17 Nov 2022 23:05:31 GMT
223
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.8..@fluentui/global-context_v9.0.0-beta.9)
224
+
225
+ ### Changes
226
+
227
+ - Bump @fluentui/react-context-selector to v9.1.2 ([PR #25683](https://github.com/microsoft/fluentui/pull/25683) by beachball)
228
+ - Bump @fluentui/react-utilities to v9.2.2 ([PR #25683](https://github.com/microsoft/fluentui/pull/25683) by beachball)
229
+
230
+ ## [9.0.0-beta.8](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.8)
231
+
232
+ Fri, 11 Nov 2022 14:57:50 GMT
233
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.7..@fluentui/global-context_v9.0.0-beta.8)
234
+
235
+ ### Changes
236
+
237
+ - fix: create valid export maps ([PR #25558](https://github.com/microsoft/fluentui/pull/25558) by martinhochel@microsoft.com)
238
+ - Bump @fluentui/react-context-selector to v9.1.1 ([PR #25615](https://github.com/microsoft/fluentui/pull/25615) by beachball)
239
+ - Bump @fluentui/react-utilities to v9.2.1 ([PR #25615](https://github.com/microsoft/fluentui/pull/25615) by beachball)
240
+
241
+ ## [9.0.0-beta.7](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.7)
242
+
243
+ Wed, 02 Nov 2022 11:58:07 GMT
244
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.6..@fluentui/global-context_v9.0.0-beta.7)
245
+
246
+ ### Changes
247
+
248
+ - Bump @fluentui/react-context-selector to v9.1.0 ([PR #25456](https://github.com/microsoft/fluentui/pull/25456) by beachball)
249
+ - Bump @fluentui/react-utilities to v9.2.0 ([PR #25456](https://github.com/microsoft/fluentui/pull/25456) by beachball)
250
+
251
+ ## [9.0.0-beta.6](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.6)
252
+
253
+ Thu, 20 Oct 2022 08:39:56 GMT
254
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.5..@fluentui/global-context_v9.0.0-beta.6)
255
+
256
+ ### Changes
257
+
258
+ - chore: Bump peer deps to support React 18 ([PR #24972](https://github.com/microsoft/fluentui/pull/24972) by mgodbolt@microsoft.com)
259
+ - Bump @fluentui/react-context-selector to v9.0.5 ([PR #25265](https://github.com/microsoft/fluentui/pull/25265) by beachball)
260
+ - Bump @fluentui/react-utilities to v9.1.2 ([PR #25265](https://github.com/microsoft/fluentui/pull/25265) by beachball)
261
+
262
+ ## [9.0.0-beta.5](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.5)
263
+
264
+ Thu, 13 Oct 2022 11:03:06 GMT
265
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.4..@fluentui/global-context_v9.0.0-beta.5)
266
+
267
+ ### Changes
268
+
269
+ - Bump @fluentui/react-context-selector to v9.0.4 ([PR #25181](https://github.com/microsoft/fluentui/pull/25181) by beachball)
270
+ - Bump @fluentui/react-utilities to v9.1.1 ([PR #25181](https://github.com/microsoft/fluentui/pull/25181) by beachball)
271
+
272
+ ## [9.0.0-beta.4](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.4)
273
+
274
+ Thu, 15 Sep 2022 09:49:44 GMT
275
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.3..@fluentui/global-context_v9.0.0-beta.4)
276
+
277
+ ### Changes
278
+
279
+ - Bump @fluentui/react-context-selector to v9.0.3 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
280
+ - Bump @fluentui/react-utilities to v9.1.0 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
281
+
7
282
  ## [9.0.0-beta.3](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.3)
8
283
 
9
- Thu, 14 Jul 2022 21:18:42 GMT
284
+ Thu, 14 Jul 2022 21:21:07 GMT
10
285
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.2..@fluentui/global-context_v9.0.0-beta.3)
11
286
 
12
287
  ### Changes
13
288
 
14
289
  - fix: Fixing bad version bump of @fluentui/react-utilities. ([PR #23920](https://github.com/microsoft/fluentui/pull/23920) by Humberto.Morimoto@microsoft.com)
15
- - Bump @fluentui/react-context-selector to v9.0.2 ([PR #23920](https://github.com/microsoft/fluentui/pull/23920) by beachball)
16
- - Bump @fluentui/react-utilities to v9.0.2 ([PR #23920](https://github.com/microsoft/fluentui/pull/23920) by beachball)
290
+ - Bump @fluentui/react-context-selector to v9.0.2 ([PR #23918](https://github.com/microsoft/fluentui/pull/23918) by beachball)
291
+ - Bump @fluentui/react-utilities to v9.0.2 ([PR #23918](https://github.com/microsoft/fluentui/pull/23918) by beachball)
17
292
 
18
293
  ## [9.0.0-beta.2](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.2)
19
294
 
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.
@@ -1,23 +1,22 @@
1
+ import * as React from 'react';
1
2
  import { createContext as baseCreateContext } from '@fluentui/react-context-selector';
2
3
  import { canUseDOM } from '@fluentui/react-utilities';
3
4
  import { getMajorVersion } from './utils';
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 isBrowser = canUseDOM();
6
+ const globalObject = isBrowser ? window : global;
7
+ // Identifier for the symbol, for easy idenfitifaction of symbols created by this util
6
8
  // 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
9
+ export const SYMBOL_NAMESPACE = 'global-context-selector:';
10
+ // During SSR the global object persists with the server process
9
11
  // Clean out the global object during server reload during development
10
-
11
12
  if (!isBrowser && process.env.NODE_ENV !== 'production') {
12
- const globalSymbols = /*#__PURE__*/Object.getOwnPropertySymbols(globalObject);
13
- globalSymbols.forEach(sym => {
14
- var _a;
15
-
16
- if ((_a = Symbol.keyFor(sym)) === null || _a === void 0 ? void 0 : _a.startsWith(SYMBOL_NAMESPACE)) {
17
- // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
18
- delete globalObject[sym];
19
- }
20
- });
13
+ const globalSymbols = Object.getOwnPropertySymbols(globalObject);
14
+ globalSymbols.forEach((sym)=>{
15
+ var _Symbol_keyFor;
16
+ if ((_Symbol_keyFor = Symbol.keyFor(sym)) === null || _Symbol_keyFor === void 0 ? void 0 : _Symbol_keyFor.startsWith(SYMBOL_NAMESPACE)) {
17
+ delete globalObject[sym];
18
+ }
19
+ });
21
20
  }
22
21
  /**
23
22
  * Wrapper around @see createContext from \@fluentui/react-context-selector that implements context registration
@@ -31,22 +30,15 @@ if (!isBrowser && process.env.NODE_ENV !== 'production') {
31
30
  * @param packageName - name of the npm package where the module is used
32
31
  * @param packageVersion - version of the npm package where the module is used
33
32
  * @returns @see React.createContext
34
- */
35
-
36
-
37
- export const createContext = (defaultValue, name, packageName, packageVersion) => {
38
- // 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
40
- // Object symbol properties can't be iterated with `for` or `Object.keys`
41
-
42
- const globalSymbols = Object.getOwnPropertySymbols(globalObject);
43
-
44
- if (!globalSymbols.includes(sym)) {
45
- // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
46
- globalObject[sym] = baseCreateContext(defaultValue);
47
- } // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
48
-
49
-
50
- return globalObject[sym];
33
+ */ export const createContext = (defaultValue, name, packageName, packageVersion)=>{
34
+ // Symbol guaranteed to be unique for the entire runtime
35
+ const sym = Symbol.for(`${SYMBOL_NAMESPACE}${packageName}/${name}/@${getMajorVersion(packageVersion)}`);
36
+ // Objects keyed with symbols are not visible with console.log
37
+ // Object symbol properties can't be iterated with `for` or `Object.keys`
38
+ const globalSymbols = Object.getOwnPropertySymbols(globalObject);
39
+ if (!globalSymbols.includes(sym)) {
40
+ // eslint-disable-next-line @fluentui/no-context-default-value
41
+ globalObject[sym] = baseCreateContext(defaultValue);
42
+ }
43
+ return globalObject[sym];
51
44
  };
52
- //# 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,"sources":["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 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 // eslint-disable-next-line @fluentui/no-context-default-value\n globalObject[sym] = baseCreateContext<unknown>(defaultValue);\n }\n\n return globalObject[sym] as React.Context<T>;\n};\n"],"names":["React","createContext","baseCreateContext","canUseDOM","getMajorVersion","isBrowser","globalObject","window","global","SYMBOL_NAMESPACE","process","env","NODE_ENV","globalSymbols","Object","getOwnPropertySymbols","forEach","sym","Symbol","keyFor","startsWith","defaultValue","name","packageName","packageVersion","for","includes"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,iBAAiBC,iBAAiB,QAAQ,mCAAmC;AACtF,SAASC,SAAS,QAAQ,4BAA4B;AACtD,SAASC,eAAe,QAAQ,UAAU;AAG1C,MAAMC,YAAYF;AAClB,MAAMG,eAA6BD,YAAYE,SAASC,MAAM;AAE9D,sFAAsF;AACtF,wDAAwD;AACxD,OAAO,MAAMC,mBAAmB,2BAA2B;AAE3D,gEAAgE;AAChE,sEAAsE;AACtE,IAAI,CAACJ,aAAaK,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACvD,MAAMC,gBAAgBC,OAAOC,qBAAqB,CAACT;IACnDO,cAAcG,OAAO,CAACC,CAAAA,MAAO;YACvBC;QAAJ,IAAIA,CAAAA,iBAAAA,OAAOC,MAAM,CAACF,kBAAdC,4BAAAA,KAAAA,IAAAA,eAAoBE,WAAWX,mBAAmB;YACpD,OAAOH,YAAY,CAACW,IAAI;QAC1B,CAAC;IACH;AACF,CAAC;AAED;;;;;;;;;;;;CAYC,GACD,OAAO,MAAMhB,gBAAgB,CAAIoB,cAAiBC,MAAcC,aAAqBC,iBAA2B;IAC9G,wDAAwD;IACxD,MAAMP,MAAMC,OAAOO,GAAG,CAAC,CAAC,EAAEhB,iBAAiB,EAAEc,YAAY,CAAC,EAAED,KAAK,EAAE,EAAElB,gBAAgBoB,gBAAgB,CAAC;IAEtG,8DAA8D;IAC9D,yEAAyE;IACzE,MAAMX,gBAAgBC,OAAOC,qBAAqB,CAACT;IACnD,IAAI,CAACO,cAAca,QAAQ,CAACT,MAAM;QAChC,8DAA8D;QAC9DX,YAAY,CAACW,IAAI,GAAGf,kBAA2BmB;IACjD,CAAC;IAED,OAAOf,YAAY,CAACW,IAAI;AAC1B,EAAE"}
@@ -1,23 +1,21 @@
1
1
  import * as React from 'react';
2
2
  import { canUseDOM } from '@fluentui/react-utilities';
3
3
  import { getMajorVersion } from './utils';
4
- const isBrowser = /*#__PURE__*/canUseDOM();
5
- const globalObject = isBrowser ? window : global; // Identifier for the symbol, for easy idenfitifaction of symbols created by this util
4
+ const isBrowser = canUseDOM();
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
- const globalSymbols = /*#__PURE__*/Object.getOwnPropertySymbols(globalObject);
13
- globalSymbols.forEach(sym => {
14
- var _a;
15
-
16
- if ((_a = Symbol.keyFor(sym)) === null || _a === void 0 ? void 0 : _a.startsWith(SYMBOL_NAMESPACE)) {
17
- // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
18
- delete globalObject[sym];
19
- }
20
- });
12
+ const globalSymbols = Object.getOwnPropertySymbols(globalObject);
13
+ globalSymbols.forEach((sym)=>{
14
+ var _Symbol_keyFor;
15
+ if ((_Symbol_keyFor = Symbol.keyFor(sym)) === null || _Symbol_keyFor === void 0 ? void 0 : _Symbol_keyFor.startsWith(SYMBOL_NAMESPACE)) {
16
+ delete globalObject[sym];
17
+ }
18
+ });
21
19
  }
22
20
  /**
23
21
  * Wrapper around @see React.createContext that implements context registration
@@ -31,22 +29,15 @@ if (!isBrowser && process.env.NODE_ENV !== 'production') {
31
29
  * @param packageName - name of the npm package where the module is used
32
30
  * @param packageVersion - version of the npm package where the module is used
33
31
  * @returns @see React.createContext
34
- */
35
-
36
-
37
- export const createContext = (defaultValue, name, packageName, packageVersion) => {
38
- // 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
40
- // Object symbol properties can't be iterated with `for` or `Object.keys`
41
-
42
- const globalSymbols = Object.getOwnPropertySymbols(globalObject);
43
-
44
- if (!globalSymbols.includes(sym)) {
45
- // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
46
- globalObject[sym] = /*#__PURE__*/React.createContext(defaultValue);
47
- } // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
48
-
49
-
50
- return globalObject[sym];
32
+ */ export const createContext = (defaultValue, name, packageName, packageVersion)=>{
33
+ // Symbol guaranteed to be unique for the entire runtime
34
+ const sym = Symbol.for(`${SYMBOL_NAMESPACE}${packageName}/${name}/@${getMajorVersion(packageVersion)}`);
35
+ // Objects keyed with symbols are not visible with console.log
36
+ // Object symbol properties can't be iterated with `for` or `Object.keys`
37
+ const globalSymbols = Object.getOwnPropertySymbols(globalObject);
38
+ if (!globalSymbols.includes(sym)) {
39
+ // eslint-disable-next-line @fluentui/no-context-default-value
40
+ globalObject[sym] = React.createContext(defaultValue);
41
+ }
42
+ return globalObject[sym];
51
43
  };
52
- //# 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,"sources":["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 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 // eslint-disable-next-line @fluentui/no-context-default-value\n globalObject[sym] = React.createContext<unknown>(defaultValue);\n }\n\n return globalObject[sym] as React.Context<T>;\n};\n"],"names":["React","canUseDOM","getMajorVersion","isBrowser","globalObject","window","global","SYMBOL_NAMESPACE","process","env","NODE_ENV","globalSymbols","Object","getOwnPropertySymbols","forEach","sym","Symbol","keyFor","startsWith","createContext","defaultValue","name","packageName","packageVersion","for","includes"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,SAAS,QAAQ,4BAA4B;AAEtD,SAASC,eAAe,QAAQ,UAAU;AAE1C,MAAMC,YAAYF;AAClB,MAAMG,eAA6BD,YAAYE,SAASC,MAAM;AAE9D,sFAAsF;AACtF,wDAAwD;AACxD,OAAO,MAAMC,mBAAmB,kBAAkB;AAElD,gEAAgE;AAChE,sEAAsE;AACtE,IAAI,CAACJ,aAAaK,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACvD,MAAMC,gBAAgBC,OAAOC,qBAAqB,CAACT;IACnDO,cAAcG,OAAO,CAACC,CAAAA,MAAO;YACvBC;QAAJ,IAAIA,CAAAA,iBAAAA,OAAOC,MAAM,CAACF,kBAAdC,4BAAAA,KAAAA,IAAAA,eAAoBE,WAAWX,mBAAmB;YACpD,OAAOH,YAAY,CAACW,IAAI;QAC1B,CAAC;IACH;AACF,CAAC;AAED;;;;;;;;;;;;CAYC,GACD,OAAO,MAAMI,gBAAgB,CAAIC,cAAiBC,MAAcC,aAAqBC,iBAA2B;IAC9G,wDAAwD;IACxD,MAAMR,MAAMC,OAAOQ,GAAG,CAAC,CAAC,EAAEjB,iBAAiB,EAAEe,YAAY,CAAC,EAAED,KAAK,EAAE,EAAEnB,gBAAgBqB,gBAAgB,CAAC;IAEtG,8DAA8D;IAC9D,yEAAyE;IACzE,MAAMZ,gBAAgBC,OAAOC,qBAAqB,CAACT;IACnD,IAAI,CAACO,cAAcc,QAAQ,CAACV,MAAM;QAChC,8DAA8D;QAC9DX,YAAY,CAACW,IAAI,GAAGf,MAAMmB,aAAa,CAAUC;IACnD,CAAC;IAED,OAAOhB,YAAY,CAACW,IAAI;AAC1B,EAAE"}
package/lib/index.js CHANGED
@@ -1,3 +1,2 @@
1
1
  export { createContext } from './global-context';
2
2
  export { createContext as createContextSelector } from './global-context-selector';
3
- //# sourceMappingURL=index.js.map
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,"sources":["index.ts"],"sourcesContent":["export { createContext } from './global-context';\nexport { createContext as createContextSelector } from './global-context-selector';\n"],"names":["createContext","createContextSelector"],"mappings":"AAAA,SAASA,aAAa,QAAQ,mBAAmB;AACjD,SAASA,iBAAiBC,qBAAqB,QAAQ,4BAA4B"}
package/lib/types.js CHANGED
@@ -1,2 +1 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
1
+ import * as React from 'react';
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,"sources":["types.ts"],"sourcesContent":["import * as React from 'react';\n\nexport type GlobalObject = typeof globalThis & Record<symbol, React.Context<unknown>>;\n"],"names":["React"],"mappings":"AAAA,YAAYA,WAAW,QAAQ"}
package/lib/utils.js CHANGED
@@ -1,8 +1,6 @@
1
1
  /**
2
2
  * @param version - semver version string
3
3
  * @returns The major version number
4
- */
5
- export function getMajorVersion(version) {
6
- return Number(version.split('.')[0]);
4
+ */ export function getMajorVersion(version) {
5
+ return Number(version.split('.')[0]);
7
6
  }
8
- //# sourceMappingURL=utils.js.map
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,"sources":["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"],"names":["getMajorVersion","version","Number","split"],"mappings":"AAAA;;;CAGC,GACD,OAAO,SAASA,gBAAgBC,OAAe,EAAE;IAC/C,OAAOC,OAAOD,QAAQE,KAAK,CAAC,IAAI,CAAC,EAAE;AACrC,CAAC"}