@fluentui/global-context 9.0.0-beta.1 → 9.0.0-beta.10

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,272 @@
2
2
  "name": "@fluentui/global-context",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 28 Jun 2022 15:09:20 GMT",
5
+ "date": "Tue, 20 Dec 2022 14:55:58 GMT",
6
+ "tag": "@fluentui/global-context_v9.0.0-beta.10",
7
+ "version": "9.0.0-beta.10",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "beachball",
12
+ "package": "@fluentui/global-context",
13
+ "comment": "Bump @fluentui/react-context-selector to v9.1.3",
14
+ "commit": "e7530bc179fd0e303448083c76a4af41a0e15322"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/global-context",
19
+ "comment": "Bump @fluentui/react-utilities to v9.3.0",
20
+ "commit": "e7530bc179fd0e303448083c76a4af41a0e15322"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ {
26
+ "date": "Thu, 17 Nov 2022 23:05:31 GMT",
27
+ "tag": "@fluentui/global-context_v9.0.0-beta.9",
28
+ "version": "9.0.0-beta.9",
29
+ "comments": {
30
+ "none": [
31
+ {
32
+ "author": "martinhochel@microsoft.com",
33
+ "package": "@fluentui/global-context",
34
+ "commit": "ea768501802d65d63ddc63fff3816fb6b5008ae4",
35
+ "comment": "chore: update package scaffold"
36
+ }
37
+ ],
38
+ "prerelease": [
39
+ {
40
+ "author": "beachball",
41
+ "package": "@fluentui/global-context",
42
+ "comment": "Bump @fluentui/react-context-selector to v9.1.2",
43
+ "commit": "94e156be5d3b5790d82dccf08c32672733fb9335"
44
+ },
45
+ {
46
+ "author": "beachball",
47
+ "package": "@fluentui/global-context",
48
+ "comment": "Bump @fluentui/react-utilities to v9.2.2",
49
+ "commit": "94e156be5d3b5790d82dccf08c32672733fb9335"
50
+ }
51
+ ]
52
+ }
53
+ },
54
+ {
55
+ "date": "Fri, 11 Nov 2022 14:57:50 GMT",
56
+ "tag": "@fluentui/global-context_v9.0.0-beta.8",
57
+ "version": "9.0.0-beta.8",
58
+ "comments": {
59
+ "prerelease": [
60
+ {
61
+ "author": "martinhochel@microsoft.com",
62
+ "package": "@fluentui/global-context",
63
+ "commit": "b3907043bd8d7b650c55e8e7c3119b14f2606c38",
64
+ "comment": "fix: create valid export maps"
65
+ },
66
+ {
67
+ "author": "beachball",
68
+ "package": "@fluentui/global-context",
69
+ "comment": "Bump @fluentui/react-context-selector to v9.1.1",
70
+ "commit": "b4c9a0ae8d7444bf746f1307ab01e2dc16310720"
71
+ },
72
+ {
73
+ "author": "beachball",
74
+ "package": "@fluentui/global-context",
75
+ "comment": "Bump @fluentui/react-utilities to v9.2.1",
76
+ "commit": "b4c9a0ae8d7444bf746f1307ab01e2dc16310720"
77
+ }
78
+ ]
79
+ }
80
+ },
81
+ {
82
+ "date": "Wed, 02 Nov 2022 11:58:07 GMT",
83
+ "tag": "@fluentui/global-context_v9.0.0-beta.7",
84
+ "version": "9.0.0-beta.7",
85
+ "comments": {
86
+ "prerelease": [
87
+ {
88
+ "author": "beachball",
89
+ "package": "@fluentui/global-context",
90
+ "comment": "Bump @fluentui/react-context-selector to v9.1.0",
91
+ "commit": "393a7b169155997a97a6ce1ad36ee3eafc6f461b"
92
+ },
93
+ {
94
+ "author": "beachball",
95
+ "package": "@fluentui/global-context",
96
+ "comment": "Bump @fluentui/react-utilities to v9.2.0",
97
+ "commit": "393a7b169155997a97a6ce1ad36ee3eafc6f461b"
98
+ }
99
+ ]
100
+ }
101
+ },
102
+ {
103
+ "date": "Tue, 25 Oct 2022 00:35:27 GMT",
104
+ "tag": "@fluentui/global-context_v9.0.0-beta.6",
105
+ "version": "9.0.0-beta.6",
106
+ "comments": {
107
+ "none": [
108
+ {
109
+ "author": "miroslav.stastny@microsoft.com",
110
+ "package": "@fluentui/global-context",
111
+ "commit": "6ced976a8d0e6a0e2e207da8fe0eb810e2bd19bc",
112
+ "comment": "Update package readme"
113
+ },
114
+ {
115
+ "author": "tristan.watanabe@gmail.com",
116
+ "package": "@fluentui/global-context",
117
+ "commit": "07141711530bbdba82fd5198fe4bcef462403f40",
118
+ "comment": "chore: Migrate to new package structure."
119
+ }
120
+ ]
121
+ }
122
+ },
123
+ {
124
+ "date": "Thu, 20 Oct 2022 08:39:56 GMT",
125
+ "tag": "@fluentui/global-context_v9.0.0-beta.6",
126
+ "version": "9.0.0-beta.6",
127
+ "comments": {
128
+ "prerelease": [
129
+ {
130
+ "author": "mgodbolt@microsoft.com",
131
+ "package": "@fluentui/global-context",
132
+ "commit": "17096b3137d9d3e7c7443ddc3ce0738b2910a334",
133
+ "comment": "chore: Bump peer deps to support React 18"
134
+ },
135
+ {
136
+ "author": "beachball",
137
+ "package": "@fluentui/global-context",
138
+ "comment": "Bump @fluentui/react-context-selector to v9.0.5",
139
+ "commit": "5ea1372675d910d76cf1b9cbd74d05b7c4e8fcbc"
140
+ },
141
+ {
142
+ "author": "beachball",
143
+ "package": "@fluentui/global-context",
144
+ "comment": "Bump @fluentui/react-utilities to v9.1.2",
145
+ "commit": "5ea1372675d910d76cf1b9cbd74d05b7c4e8fcbc"
146
+ }
147
+ ]
148
+ }
149
+ },
150
+ {
151
+ "date": "Thu, 13 Oct 2022 11:03:06 GMT",
152
+ "tag": "@fluentui/global-context_v9.0.0-beta.5",
153
+ "version": "9.0.0-beta.5",
154
+ "comments": {
155
+ "prerelease": [
156
+ {
157
+ "author": "beachball",
158
+ "package": "@fluentui/global-context",
159
+ "comment": "Bump @fluentui/react-context-selector to v9.0.4",
160
+ "commit": "cd05c21e62ff37812d614330eb70f97fd978c97a"
161
+ },
162
+ {
163
+ "author": "beachball",
164
+ "package": "@fluentui/global-context",
165
+ "comment": "Bump @fluentui/react-utilities to v9.1.1",
166
+ "commit": "cd05c21e62ff37812d614330eb70f97fd978c97a"
167
+ }
168
+ ]
169
+ }
170
+ },
171
+ {
172
+ "date": "Thu, 15 Sep 2022 09:49:44 GMT",
173
+ "tag": "@fluentui/global-context_v9.0.0-beta.4",
174
+ "version": "9.0.0-beta.4",
175
+ "comments": {
176
+ "none": [
177
+ {
178
+ "author": "martinhochel@microsoft.com",
179
+ "package": "@fluentui/global-context",
180
+ "commit": "e6cf183695d6d67a24e038c49a876224e5ed35e5",
181
+ "comment": "chore: update package scaffold"
182
+ },
183
+ {
184
+ "author": "martinhochel@microsoft.com",
185
+ "package": "@fluentui/global-context",
186
+ "commit": "ba9444d594f3a960cc590eae5237c08bf7c5a07f",
187
+ "comment": "chore: consume cypress.config from it's package boundary"
188
+ }
189
+ ],
190
+ "prerelease": [
191
+ {
192
+ "author": "beachball",
193
+ "package": "@fluentui/global-context",
194
+ "comment": "Bump @fluentui/react-context-selector to v9.0.3",
195
+ "commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
196
+ },
197
+ {
198
+ "author": "beachball",
199
+ "package": "@fluentui/global-context",
200
+ "comment": "Bump @fluentui/react-utilities to v9.1.0",
201
+ "commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
202
+ }
203
+ ]
204
+ }
205
+ },
206
+ {
207
+ "date": "Wed, 03 Aug 2022 16:03:35 GMT",
208
+ "tag": "@fluentui/global-context_v9.0.0-beta.3",
209
+ "version": "9.0.0-beta.3",
210
+ "comments": {
211
+ "none": [
212
+ {
213
+ "author": "bernardo.sunderhus@gmail.com",
214
+ "package": "@fluentui/global-context",
215
+ "commit": "d966ea3d9169f2e8d69f0d2a4daf86fe4ca328d6",
216
+ "comment": "disables eslint rule @fluentui/no-context-default-value for local component context"
217
+ }
218
+ ]
219
+ }
220
+ },
221
+ {
222
+ "date": "Thu, 14 Jul 2022 21:21:07 GMT",
223
+ "tag": "@fluentui/global-context_v9.0.0-beta.3",
224
+ "version": "9.0.0-beta.3",
225
+ "comments": {
226
+ "prerelease": [
227
+ {
228
+ "author": "Humberto.Morimoto@microsoft.com",
229
+ "package": "@fluentui/global-context",
230
+ "commit": "802bc4e3730a88b0fc61b5bf42ef7fc6b6543fe2",
231
+ "comment": "fix: Fixing bad version bump of @fluentui/react-utilities."
232
+ },
233
+ {
234
+ "author": "beachball",
235
+ "package": "@fluentui/global-context",
236
+ "comment": "Bump @fluentui/react-context-selector to v9.0.2",
237
+ "commit": "79b513146194367544160f364b0a7dd749ed93e4"
238
+ },
239
+ {
240
+ "author": "beachball",
241
+ "package": "@fluentui/global-context",
242
+ "comment": "Bump @fluentui/react-utilities to v9.0.2",
243
+ "commit": "79b513146194367544160f364b0a7dd749ed93e4"
244
+ }
245
+ ]
246
+ }
247
+ },
248
+ {
249
+ "date": "Thu, 14 Jul 2022 17:06:26 GMT",
250
+ "tag": "@fluentui/global-context_v9.0.0-beta.2",
251
+ "version": "9.0.0-beta.2",
252
+ "comments": {
253
+ "prerelease": [
254
+ {
255
+ "author": "beachball",
256
+ "package": "@fluentui/global-context",
257
+ "comment": "Bump @fluentui/react-context-selector to v9.0.1",
258
+ "commit": "35237381e941c8935b1892c9217096cea3e5601f"
259
+ },
260
+ {
261
+ "author": "beachball",
262
+ "package": "@fluentui/global-context",
263
+ "comment": "Bump @fluentui/react-utilities to v9.0.1-0",
264
+ "commit": "35237381e941c8935b1892c9217096cea3e5601f"
265
+ }
266
+ ]
267
+ }
268
+ },
269
+ {
270
+ "date": "Tue, 28 Jun 2022 15:14:09 GMT",
6
271
  "tag": "@fluentui/global-context_v9.0.0-beta.1",
7
272
  "version": "9.0.0-beta.1",
8
273
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,105 @@
1
1
  # Change Log - @fluentui/global-context
2
2
 
3
- This log was last generated on Tue, 28 Jun 2022 15:09:20 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 20 Dec 2022 14:55:58 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.0-beta.10](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.10)
8
+
9
+ Tue, 20 Dec 2022 14:55:58 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.9..@fluentui/global-context_v9.0.0-beta.10)
11
+
12
+ ### Changes
13
+
14
+ - Bump @fluentui/react-context-selector to v9.1.3 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
15
+ - Bump @fluentui/react-utilities to v9.3.0 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
16
+
17
+ ## [9.0.0-beta.9](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.9)
18
+
19
+ Thu, 17 Nov 2022 23:05:31 GMT
20
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.8..@fluentui/global-context_v9.0.0-beta.9)
21
+
22
+ ### Changes
23
+
24
+ - Bump @fluentui/react-context-selector to v9.1.2 ([PR #25683](https://github.com/microsoft/fluentui/pull/25683) by beachball)
25
+ - Bump @fluentui/react-utilities to v9.2.2 ([PR #25683](https://github.com/microsoft/fluentui/pull/25683) by beachball)
26
+
27
+ ## [9.0.0-beta.8](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.8)
28
+
29
+ Fri, 11 Nov 2022 14:57:50 GMT
30
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.7..@fluentui/global-context_v9.0.0-beta.8)
31
+
32
+ ### Changes
33
+
34
+ - fix: create valid export maps ([PR #25558](https://github.com/microsoft/fluentui/pull/25558) by martinhochel@microsoft.com)
35
+ - Bump @fluentui/react-context-selector to v9.1.1 ([PR #25615](https://github.com/microsoft/fluentui/pull/25615) by beachball)
36
+ - Bump @fluentui/react-utilities to v9.2.1 ([PR #25615](https://github.com/microsoft/fluentui/pull/25615) by beachball)
37
+
38
+ ## [9.0.0-beta.7](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.7)
39
+
40
+ Wed, 02 Nov 2022 11:58:07 GMT
41
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.6..@fluentui/global-context_v9.0.0-beta.7)
42
+
43
+ ### Changes
44
+
45
+ - Bump @fluentui/react-context-selector to v9.1.0 ([PR #25456](https://github.com/microsoft/fluentui/pull/25456) by beachball)
46
+ - Bump @fluentui/react-utilities to v9.2.0 ([PR #25456](https://github.com/microsoft/fluentui/pull/25456) by beachball)
47
+
48
+ ## [9.0.0-beta.6](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.6)
49
+
50
+ Thu, 20 Oct 2022 08:39:56 GMT
51
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.5..@fluentui/global-context_v9.0.0-beta.6)
52
+
53
+ ### Changes
54
+
55
+ - chore: Bump peer deps to support React 18 ([PR #24972](https://github.com/microsoft/fluentui/pull/24972) by mgodbolt@microsoft.com)
56
+ - Bump @fluentui/react-context-selector to v9.0.5 ([PR #25265](https://github.com/microsoft/fluentui/pull/25265) by beachball)
57
+ - Bump @fluentui/react-utilities to v9.1.2 ([PR #25265](https://github.com/microsoft/fluentui/pull/25265) by beachball)
58
+
59
+ ## [9.0.0-beta.5](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.5)
60
+
61
+ Thu, 13 Oct 2022 11:03:06 GMT
62
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.4..@fluentui/global-context_v9.0.0-beta.5)
63
+
64
+ ### Changes
65
+
66
+ - Bump @fluentui/react-context-selector to v9.0.4 ([PR #25181](https://github.com/microsoft/fluentui/pull/25181) by beachball)
67
+ - Bump @fluentui/react-utilities to v9.1.1 ([PR #25181](https://github.com/microsoft/fluentui/pull/25181) by beachball)
68
+
69
+ ## [9.0.0-beta.4](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.4)
70
+
71
+ Thu, 15 Sep 2022 09:49:44 GMT
72
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.3..@fluentui/global-context_v9.0.0-beta.4)
73
+
74
+ ### Changes
75
+
76
+ - Bump @fluentui/react-context-selector to v9.0.3 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
77
+ - Bump @fluentui/react-utilities to v9.1.0 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
78
+
79
+ ## [9.0.0-beta.3](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.3)
80
+
81
+ Thu, 14 Jul 2022 21:21:07 GMT
82
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.2..@fluentui/global-context_v9.0.0-beta.3)
83
+
84
+ ### Changes
85
+
86
+ - fix: Fixing bad version bump of @fluentui/react-utilities. ([PR #23920](https://github.com/microsoft/fluentui/pull/23920) by Humberto.Morimoto@microsoft.com)
87
+ - Bump @fluentui/react-context-selector to v9.0.2 ([PR #23918](https://github.com/microsoft/fluentui/pull/23918) by beachball)
88
+ - Bump @fluentui/react-utilities to v9.0.2 ([PR #23918](https://github.com/microsoft/fluentui/pull/23918) by beachball)
89
+
90
+ ## [9.0.0-beta.2](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.2)
91
+
92
+ Thu, 14 Jul 2022 17:06:26 GMT
93
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-beta.1..@fluentui/global-context_v9.0.0-beta.2)
94
+
95
+ ### Changes
96
+
97
+ - Bump @fluentui/react-context-selector to v9.0.1 ([PR #23897](https://github.com/microsoft/fluentui/pull/23897) by beachball)
98
+ - Bump @fluentui/react-utilities to v9.0.1-0 ([PR #23897](https://github.com/microsoft/fluentui/pull/23897) by beachball)
99
+
7
100
  ## [9.0.0-beta.1](https://github.com/microsoft/fluentui/tree/@fluentui/global-context_v9.0.0-beta.1)
8
101
 
9
- Tue, 28 Jun 2022 15:09:20 GMT
102
+ Tue, 28 Jun 2022 15:14:09 GMT
10
103
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/global-context_v9.0.0-alpha.0..@fluentui/global-context_v9.0.0-beta.1)
11
104
 
12
105
  ### Changes
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.
@@ -43,6 +43,7 @@ export const createContext = (defaultValue, name, packageName, packageVersion) =
43
43
 
44
44
  if (!globalSymbols.includes(sym)) {
45
45
  // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
46
+ // eslint-disable-next-line @fluentui/no-context-default-value
46
47
  globalObject[sym] = baseCreateContext(defaultValue);
47
48
  } // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
48
49
 
@@ -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":["packages/react-components/global-context/src/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;IACA,YAAY,CAAC,GAAD,CAAZ,GAAoB,iBAAiB,CAAC,YAAD,CAArC;EACD,CAX4G,CAa7G;;;EACA,OAAO,YAAY,CAAC,GAAD,CAAnB;AACD,CAfM","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"],"sourceRoot":"../src/"}
@@ -43,6 +43,7 @@ export const createContext = (defaultValue, name, packageName, packageVersion) =
43
43
 
44
44
  if (!globalSymbols.includes(sym)) {
45
45
  // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
46
+ // eslint-disable-next-line @fluentui/no-context-default-value
46
47
  globalObject[sym] = /*#__PURE__*/React.createContext(defaultValue);
47
48
  } // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
48
49
 
@@ -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":["packages/react-components/global-context/src/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;IACA,YAAY,CAAC,GAAD,CAAZ,gBAAoB,KAAK,CAAC,aAAN,CAAoB,YAApB,CAApB;EACD,CAX4G,CAa7G;;;EACA,OAAO,YAAY,CAAC,GAAD,CAAnB;AACD,CAfM","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"],"sourceRoot":"../src/"}
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,"sources":["packages/react-components/global-context/src/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/"}
@@ -53,6 +53,7 @@ const createContext = (defaultValue, name, packageName, packageVersion) => {
53
53
 
54
54
  if (!globalSymbols.includes(sym)) {
55
55
  // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
56
+ // eslint-disable-next-line @fluentui/no-context-default-value
56
57
  globalObject[sym] = react_context_selector_1.createContext(defaultValue);
57
58
  } // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
58
59
 
@@ -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,"sources":["packages/react-components/global-context/src/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;IACA,YAAY,CAAC,GAAD,CAAZ,GAAoB,wBAAA,CAAA,aAAA,CAAkB,YAAlB,CAApB;EACD,CAX4G,CAa7G;;;EACA,OAAO,YAAY,CAAC,GAAD,CAAnB;AACD,CAfM;;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 // 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"],"sourceRoot":"../src/"}
@@ -53,6 +53,7 @@ const createContext = (defaultValue, name, packageName, packageVersion) => {
53
53
 
54
54
  if (!globalSymbols.includes(sym)) {
55
55
  // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
56
+ // eslint-disable-next-line @fluentui/no-context-default-value
56
57
  globalObject[sym] = React.createContext(defaultValue);
57
58
  } // @ts-expect-error - Indexing object with symbols not supported until TS 4.4
58
59
 
@@ -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,"sources":["packages/react-components/global-context/src/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;IACA,YAAY,CAAC,GAAD,CAAZ,GAAoB,KAAK,CAAC,aAAN,CAAoB,YAApB,CAApB;EACD,CAX4G,CAa7G;;;EACA,OAAO,YAAY,CAAC,GAAD,CAAnB;AACD,CAfM;;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 // 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"],"sourceRoot":"../src/"}
@@ -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,"sources":["packages/react-components/global-context/src/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 +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,"sources":["packages/react-components/global-context/src/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/"}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@fluentui/global-context",
3
- "version": "9.0.0-beta.1",
3
+ "version": "9.0.0-beta.10",
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,28 @@
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
29
  "@fluentui/scripts": "^1.0.0"
33
30
  },
34
31
  "dependencies": {
35
- "@fluentui/react-context-selector": "^9.0.0",
36
- "@fluentui/react-utilities": "^9.0.0",
32
+ "@fluentui/react-context-selector": "^9.1.3",
33
+ "@fluentui/react-utilities": "^9.3.0",
37
34
  "tslib": "^2.1.0"
38
35
  },
39
36
  "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",
37
+ "@types/react": ">=16.8.0 <19.0.0",
38
+ "@types/react-dom": ">=16.8.0 <19.0.0",
39
+ "react": ">=16.8.0 <19.0.0",
40
+ "react-dom": ">=16.8.0 <19.0.0",
44
41
  "scheduler": "^0.19.0 || ^0.20.0"
45
42
  },
46
43
  "beachball": {
@@ -49,5 +46,13 @@
49
46
  "minor",
50
47
  "patch"
51
48
  ]
49
+ },
50
+ "exports": {
51
+ ".": {
52
+ "types": "./dist/index.d.ts",
53
+ "import": "./lib/index.js",
54
+ "require": "./lib-commonjs/index.js"
55
+ },
56
+ "./package.json": "./package.json"
52
57
  }
53
58
  }
@@ -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
- }