@fluentui/react-context-selector 9.0.0-rc.1 → 9.0.0-rc.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,194 @@
2
2
  "name": "@fluentui/react-context-selector",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 10 Feb 2022 08:44:22 GMT",
5
+ "date": "Tue, 31 May 2022 21:26:44 GMT",
6
+ "tag": "@fluentui/react-context-selector_v9.0.0-rc.10",
7
+ "version": "9.0.0-rc.10",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "beachball",
12
+ "package": "@fluentui/react-context-selector",
13
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-rc.10",
14
+ "commit": "335ebfcfd47005003901b5e319782bfe9ccd89fd"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Thu, 26 May 2022 21:01:25 GMT",
21
+ "tag": "@fluentui/react-context-selector_v9.0.0-rc.9",
22
+ "version": "9.0.0-rc.9",
23
+ "comments": {
24
+ "none": [
25
+ {
26
+ "author": "lingfangao@hotmail.com",
27
+ "package": "@fluentui/react-context-selector",
28
+ "commit": "fff6a012b8a3b165b364ef2c412b9edee0bc05a9",
29
+ "comment": "Add eslint ignore for context export"
30
+ }
31
+ ]
32
+ }
33
+ },
34
+ {
35
+ "date": "Mon, 23 May 2022 12:14:24 GMT",
36
+ "tag": "@fluentui/react-context-selector_v9.0.0-rc.9",
37
+ "version": "9.0.0-rc.9",
38
+ "comments": {
39
+ "prerelease": [
40
+ {
41
+ "author": "beachball",
42
+ "package": "@fluentui/react-context-selector",
43
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-rc.9",
44
+ "commit": "8d58f08997acf595e3eb7f628123e7fa7830c394"
45
+ }
46
+ ]
47
+ }
48
+ },
49
+ {
50
+ "date": "Thu, 05 May 2022 18:26:23 GMT",
51
+ "tag": "@fluentui/react-context-selector_v9.0.0-rc.8",
52
+ "version": "9.0.0-rc.8",
53
+ "comments": {
54
+ "prerelease": [
55
+ {
56
+ "author": "martinhochel@microsoft.com",
57
+ "package": "@fluentui/react-context-selector",
58
+ "commit": "e465622ca241f3dd0534da50823a51e7311fd9ef",
59
+ "comment": "feat: ship rolluped only dts"
60
+ },
61
+ {
62
+ "author": "humberto_makoto@hotmail.com",
63
+ "package": "@fluentui/react-context-selector",
64
+ "commit": "982f68bd9b216ed71dc5e4fb7e77b56e73a8a468",
65
+ "comment": "Removing star exports."
66
+ },
67
+ {
68
+ "author": "beachball",
69
+ "package": "@fluentui/react-context-selector",
70
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-rc.8",
71
+ "commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
72
+ }
73
+ ]
74
+ }
75
+ },
76
+ {
77
+ "date": "Wed, 04 May 2022 13:26:42 GMT",
78
+ "tag": "@fluentui/react-context-selector_v9.0.0-rc.7",
79
+ "version": "9.0.0-rc.7",
80
+ "comments": {
81
+ "none": [
82
+ {
83
+ "author": "tristan.watanabe@gmail.com",
84
+ "package": "@fluentui/react-context-selector",
85
+ "commit": "8997f88bdd280b6831338d6c231b387fd554046e",
86
+ "comment": "react-context-selector: Move to new common folder."
87
+ }
88
+ ],
89
+ "prerelease": [
90
+ {
91
+ "author": "beachball",
92
+ "package": "@fluentui/react-context-selector",
93
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-rc.7",
94
+ "commit": "65f94192ed3b2cde7e52b9c7e12d6f38b81965dd"
95
+ }
96
+ ]
97
+ }
98
+ },
99
+ {
100
+ "date": "Tue, 19 Apr 2022 19:17:22 GMT",
101
+ "tag": "@fluentui/react-context-selector_v9.0.0-rc.6",
102
+ "version": "9.0.0-rc.6",
103
+ "comments": {
104
+ "none": [
105
+ {
106
+ "author": "elcraig@microsoft.com",
107
+ "package": "@fluentui/react-context-selector",
108
+ "commit": "b48c03cff249019cf845af18a7f63dacf46d5218",
109
+ "comment": "Hoist react-is devDependencies to the repo root"
110
+ },
111
+ {
112
+ "author": "mgodbolt@microsoft.com",
113
+ "package": "@fluentui/react-context-selector",
114
+ "commit": "905e46db07ada986fd7885531f72a71b7bbaabdc",
115
+ "comment": "create v9 api extractor config and set all v9 packags to use it, suppress forgotten export"
116
+ }
117
+ ],
118
+ "prerelease": [
119
+ {
120
+ "author": "elcraig@microsoft.com",
121
+ "package": "@fluentui/react-context-selector",
122
+ "commit": "b7f17e976f9e058f39c9fce4f0f9bb6eb4dfa577",
123
+ "comment": "Move `scheduler` to a peer dependency and allow appropriate versions for React 16 or 17"
124
+ },
125
+ {
126
+ "author": "beachball",
127
+ "package": "@fluentui/react-context-selector",
128
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-rc.6",
129
+ "commit": "f94b48c825ca8c8b2e3b6755bdd29fe15c7d435d"
130
+ }
131
+ ]
132
+ }
133
+ },
134
+ {
135
+ "date": "Fri, 04 Mar 2022 05:17:36 GMT",
136
+ "tag": "@fluentui/react-context-selector_v9.0.0-rc.5",
137
+ "version": "9.0.0-rc.5",
138
+ "comments": {
139
+ "prerelease": [
140
+ {
141
+ "author": "dzearing@microsoft.com",
142
+ "package": "@fluentui/react-context-selector",
143
+ "commit": "f2f1c0ea948cc3517eeb442c05433eb0918def29",
144
+ "comment": "Adding explicit export maps on all consumer packages for FUIR 8 and 9."
145
+ },
146
+ {
147
+ "author": "beachball",
148
+ "package": "@fluentui/react-context-selector",
149
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-rc.5",
150
+ "commit": "1494f0b620f6d5aae7f0aef33fc9e8f6eb7f8749"
151
+ }
152
+ ]
153
+ }
154
+ },
155
+ {
156
+ "date": "Tue, 01 Mar 2022 02:17:40 GMT",
157
+ "tag": "@fluentui/react-context-selector_v9.0.0-rc.4",
158
+ "version": "9.0.0-rc.4",
159
+ "comments": {
160
+ "prerelease": [
161
+ {
162
+ "author": "beachball",
163
+ "package": "@fluentui/react-context-selector",
164
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-rc.4",
165
+ "commit": "0bc1e755543ed69443d5d03e1976c630583242f7"
166
+ }
167
+ ]
168
+ }
169
+ },
170
+ {
171
+ "date": "Fri, 18 Feb 2022 13:35:31 GMT",
172
+ "tag": "@fluentui/react-context-selector_v9.0.0-rc.3",
173
+ "version": "9.0.0-rc.3",
174
+ "comments": {
175
+ "prerelease": [
176
+ {
177
+ "author": "lingfangao@hotmail.com",
178
+ "package": "@fluentui/react-context-selector",
179
+ "commit": "1aa9e691fcccd9a64168cea7941c0f1e71fa1d14",
180
+ "comment": "fix: Source maps contain original source code"
181
+ },
182
+ {
183
+ "author": "beachball",
184
+ "package": "@fluentui/react-context-selector",
185
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-rc.3",
186
+ "commit": "3b9c1e931c23173da3d1af0c696cdc58516ce504"
187
+ }
188
+ ]
189
+ }
190
+ },
191
+ {
192
+ "date": "Thu, 10 Feb 2022 08:51:09 GMT",
6
193
  "tag": "@fluentui/react-context-selector_v9.0.0-rc.1",
7
194
  "version": "9.0.0-rc.1",
8
195
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,89 @@
1
1
  # Change Log - @fluentui/react-context-selector
2
2
 
3
- This log was last generated on Thu, 10 Feb 2022 08:44:22 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 31 May 2022 21:26:44 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.0-rc.10](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-rc.10)
8
+
9
+ Tue, 31 May 2022 21:26:44 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-rc.9..@fluentui/react-context-selector_v9.0.0-rc.10)
11
+
12
+ ### Changes
13
+
14
+ - Bump @fluentui/react-utilities to v9.0.0-rc.10 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
15
+
16
+ ## [9.0.0-rc.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-rc.9)
17
+
18
+ Mon, 23 May 2022 12:14:24 GMT
19
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-rc.8..@fluentui/react-context-selector_v9.0.0-rc.9)
20
+
21
+ ### Changes
22
+
23
+ - Bump @fluentui/react-utilities to v9.0.0-rc.9 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
24
+
25
+ ## [9.0.0-rc.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-rc.8)
26
+
27
+ Thu, 05 May 2022 18:26:23 GMT
28
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-rc.7..@fluentui/react-context-selector_v9.0.0-rc.8)
29
+
30
+ ### Changes
31
+
32
+ - feat: ship rolluped only dts ([PR #22823](https://github.com/microsoft/fluentui/pull/22823) by martinhochel@microsoft.com)
33
+ - Removing star exports. ([PR #22801](https://github.com/microsoft/fluentui/pull/22801) by humberto_makoto@hotmail.com)
34
+ - Bump @fluentui/react-utilities to v9.0.0-rc.8 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
35
+
36
+ ## [9.0.0-rc.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-rc.7)
37
+
38
+ Wed, 04 May 2022 13:26:42 GMT
39
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-rc.6..@fluentui/react-context-selector_v9.0.0-rc.7)
40
+
41
+ ### Changes
42
+
43
+ - Bump @fluentui/react-utilities to v9.0.0-rc.7 ([PR #22786](https://github.com/microsoft/fluentui/pull/22786) by beachball)
44
+
45
+ ## [9.0.0-rc.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-rc.6)
46
+
47
+ Tue, 19 Apr 2022 19:17:22 GMT
48
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-rc.5..@fluentui/react-context-selector_v9.0.0-rc.6)
49
+
50
+ ### Changes
51
+
52
+ - Move `scheduler` to a peer dependency and allow appropriate versions for React 16 or 17 ([PR #21769](https://github.com/microsoft/fluentui/pull/21769) by elcraig@microsoft.com)
53
+ - Bump @fluentui/react-utilities to v9.0.0-rc.6 ([PR #21995](https://github.com/microsoft/fluentui/pull/21995) by beachball)
54
+
55
+ ## [9.0.0-rc.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-rc.5)
56
+
57
+ Fri, 04 Mar 2022 05:17:36 GMT
58
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-rc.4..@fluentui/react-context-selector_v9.0.0-rc.5)
59
+
60
+ ### Changes
61
+
62
+ - Adding explicit export maps on all consumer packages for FUIR 8 and 9. ([PR #21508](https://github.com/microsoft/fluentui/pull/21508) by dzearing@microsoft.com)
63
+ - Bump @fluentui/react-utilities to v9.0.0-rc.5 ([PR #21947](https://github.com/microsoft/fluentui/pull/21947) by beachball)
64
+
65
+ ## [9.0.0-rc.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-rc.4)
66
+
67
+ Tue, 01 Mar 2022 02:17:40 GMT
68
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-rc.3..@fluentui/react-context-selector_v9.0.0-rc.4)
69
+
70
+ ### Changes
71
+
72
+ - Bump @fluentui/react-utilities to v9.0.0-rc.4 ([PR #21884](https://github.com/microsoft/fluentui/pull/21884) by beachball)
73
+
74
+ ## [9.0.0-rc.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-rc.3)
75
+
76
+ Fri, 18 Feb 2022 13:35:31 GMT
77
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-rc.1..@fluentui/react-context-selector_v9.0.0-rc.3)
78
+
79
+ ### Changes
80
+
81
+ - fix: Source maps contain original source code ([PR #21690](https://github.com/microsoft/fluentui/pull/21690) by lingfangao@hotmail.com)
82
+ - Bump @fluentui/react-utilities to v9.0.0-rc.3 ([PR #21800](https://github.com/microsoft/fluentui/pull/21800) by beachball)
83
+
7
84
  ## [9.0.0-rc.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-rc.1)
8
85
 
9
- Thu, 10 Feb 2022 08:44:22 GMT
86
+ Thu, 10 Feb 2022 08:51:09 GMT
10
87
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-beta.4..@fluentui/react-context-selector_v9.0.0-rc.1)
11
88
 
12
89
  ### Changes
@@ -17,7 +94,7 @@ Thu, 10 Feb 2022 08:44:22 GMT
17
94
 
18
95
  ## [9.0.0-beta.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-beta.4)
19
96
 
20
- Thu, 25 Nov 2021 08:34:13 GMT
97
+ Thu, 25 Nov 2021 08:34:13 GMT
21
98
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-beta.3..@fluentui/react-context-selector_v9.0.0-beta.4)
22
99
 
23
100
  ### Changes
@@ -26,7 +103,7 @@ Thu, 25 Nov 2021 08:34:13 GMT
26
103
 
27
104
  ## [9.0.0-beta.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-beta.3)
28
105
 
29
- Fri, 12 Nov 2021 13:25:22 GMT
106
+ Fri, 12 Nov 2021 13:25:22 GMT
30
107
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-beta.2..@fluentui/react-context-selector_v9.0.0-beta.3)
31
108
 
32
109
  ### Changes
@@ -36,7 +113,7 @@ Fri, 12 Nov 2021 13:25:22 GMT
36
113
 
37
114
  ## [9.0.0-beta.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-beta.2)
38
115
 
39
- Wed, 27 Oct 2021 12:14:24 GMT
116
+ Wed, 27 Oct 2021 12:14:24 GMT
40
117
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-beta.1..@fluentui/react-context-selector_v9.0.0-beta.2)
41
118
 
42
119
  ### Changes
@@ -45,7 +122,7 @@ Wed, 27 Oct 2021 12:14:24 GMT
45
122
 
46
123
  ## [9.0.0-beta.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-beta.1)
47
124
 
48
- Wed, 06 Oct 2021 10:37:22 GMT
125
+ Wed, 06 Oct 2021 10:37:22 GMT
49
126
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.39..@fluentui/react-context-selector_v9.0.0-beta.1)
50
127
 
51
128
  ### Changes
@@ -55,7 +132,7 @@ Wed, 06 Oct 2021 10:37:22 GMT
55
132
 
56
133
  ## [9.0.0-alpha.39](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.39)
57
134
 
58
- Tue, 05 Oct 2021 09:28:07 GMT
135
+ Tue, 05 Oct 2021 09:28:07 GMT
59
136
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.38..@fluentui/react-context-selector_v9.0.0-alpha.39)
60
137
 
61
138
  ### Changes
@@ -64,7 +141,7 @@ Tue, 05 Oct 2021 09:28:07 GMT
64
141
 
65
142
  ## [9.0.0-alpha.38](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.38)
66
143
 
67
- Fri, 01 Oct 2021 14:13:08 GMT
144
+ Fri, 01 Oct 2021 14:13:08 GMT
68
145
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.36..@fluentui/react-context-selector_v9.0.0-alpha.38)
69
146
 
70
147
  ### Changes
@@ -74,7 +151,7 @@ Fri, 01 Oct 2021 14:13:08 GMT
74
151
 
75
152
  ## [9.0.0-alpha.36](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.36)
76
153
 
77
- Mon, 27 Sep 2021 08:06:00 GMT
154
+ Mon, 27 Sep 2021 08:06:00 GMT
78
155
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.35..@fluentui/react-context-selector_v9.0.0-alpha.36)
79
156
 
80
157
  ### Changes
@@ -83,7 +160,7 @@ Mon, 27 Sep 2021 08:06:00 GMT
83
160
 
84
161
  ## [9.0.0-alpha.35](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.35)
85
162
 
86
- Fri, 24 Sep 2021 09:17:17 GMT
163
+ Fri, 24 Sep 2021 09:17:17 GMT
87
164
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.34..@fluentui/react-context-selector_v9.0.0-alpha.35)
88
165
 
89
166
  ### Changes
@@ -92,7 +169,7 @@ Fri, 24 Sep 2021 09:17:17 GMT
92
169
 
93
170
  ## [9.0.0-alpha.34](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.34)
94
171
 
95
- Thu, 23 Sep 2021 08:21:34 GMT
172
+ Thu, 23 Sep 2021 08:21:34 GMT
96
173
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.33..@fluentui/react-context-selector_v9.0.0-alpha.34)
97
174
 
98
175
  ### Changes
@@ -101,7 +178,7 @@ Thu, 23 Sep 2021 08:21:34 GMT
101
178
 
102
179
  ## [9.0.0-alpha.33](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.33)
103
180
 
104
- Wed, 22 Sep 2021 10:10:07 GMT
181
+ Wed, 22 Sep 2021 10:10:07 GMT
105
182
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.32..@fluentui/react-context-selector_v9.0.0-alpha.33)
106
183
 
107
184
  ### Changes
@@ -110,7 +187,7 @@ Wed, 22 Sep 2021 10:10:07 GMT
110
187
 
111
188
  ## [9.0.0-alpha.32](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.32)
112
189
 
113
- Fri, 17 Sep 2021 07:35:26 GMT
190
+ Fri, 17 Sep 2021 07:35:26 GMT
114
191
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.31..@fluentui/react-context-selector_v9.0.0-alpha.32)
115
192
 
116
193
  ### Changes
@@ -119,7 +196,7 @@ Fri, 17 Sep 2021 07:35:26 GMT
119
196
 
120
197
  ## [9.0.0-alpha.31](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.31)
121
198
 
122
- Thu, 16 Sep 2021 07:38:39 GMT
199
+ Thu, 16 Sep 2021 07:38:39 GMT
123
200
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.30..@fluentui/react-context-selector_v9.0.0-alpha.31)
124
201
 
125
202
  ### Changes
@@ -128,7 +205,7 @@ Thu, 16 Sep 2021 07:38:39 GMT
128
205
 
129
206
  ## [9.0.0-alpha.30](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.30)
130
207
 
131
- Tue, 14 Sep 2021 20:09:02 GMT
208
+ Tue, 14 Sep 2021 20:09:02 GMT
132
209
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.29..@fluentui/react-context-selector_v9.0.0-alpha.30)
133
210
 
134
211
  ### Changes
@@ -137,7 +214,7 @@ Tue, 14 Sep 2021 20:09:02 GMT
137
214
 
138
215
  ## [9.0.0-alpha.29](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.29)
139
216
 
140
- Fri, 10 Sep 2021 16:31:53 GMT
217
+ Fri, 10 Sep 2021 16:31:53 GMT
141
218
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.28..@fluentui/react-context-selector_v9.0.0-alpha.29)
142
219
 
143
220
  ### Changes
@@ -147,7 +224,7 @@ Fri, 10 Sep 2021 16:31:53 GMT
147
224
 
148
225
  ## [9.0.0-alpha.28](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.28)
149
226
 
150
- Fri, 10 Sep 2021 07:39:51 GMT
227
+ Fri, 10 Sep 2021 07:39:51 GMT
151
228
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.27..@fluentui/react-context-selector_v9.0.0-alpha.28)
152
229
 
153
230
  ### Changes
@@ -156,7 +233,7 @@ Fri, 10 Sep 2021 07:39:51 GMT
156
233
 
157
234
  ## [9.0.0-alpha.27](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.27)
158
235
 
159
- Mon, 06 Sep 2021 07:34:53 GMT
236
+ Mon, 06 Sep 2021 07:34:53 GMT
160
237
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.26..@fluentui/react-context-selector_v9.0.0-alpha.27)
161
238
 
162
239
  ### Changes
@@ -165,7 +242,7 @@ Mon, 06 Sep 2021 07:34:53 GMT
165
242
 
166
243
  ## [9.0.0-alpha.26](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.26)
167
244
 
168
- Wed, 01 Sep 2021 07:39:56 GMT
245
+ Wed, 01 Sep 2021 07:39:56 GMT
169
246
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.25..@fluentui/react-context-selector_v9.0.0-alpha.26)
170
247
 
171
248
  ### Changes
@@ -174,7 +251,7 @@ Wed, 01 Sep 2021 07:39:56 GMT
174
251
 
175
252
  ## [9.0.0-alpha.25](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.25)
176
253
 
177
- Tue, 31 Aug 2021 07:37:47 GMT
254
+ Tue, 31 Aug 2021 07:37:47 GMT
178
255
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.24..@fluentui/react-context-selector_v9.0.0-alpha.25)
179
256
 
180
257
  ### Changes
@@ -183,7 +260,7 @@ Tue, 31 Aug 2021 07:37:47 GMT
183
260
 
184
261
  ## [9.0.0-alpha.24](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.24)
185
262
 
186
- Fri, 20 Aug 2021 07:37:28 GMT
263
+ Fri, 20 Aug 2021 07:37:28 GMT
187
264
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.23..@fluentui/react-context-selector_v9.0.0-alpha.24)
188
265
 
189
266
  ### Changes
@@ -192,7 +269,7 @@ Fri, 20 Aug 2021 07:37:28 GMT
192
269
 
193
270
  ## [9.0.0-alpha.23](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.23)
194
271
 
195
- Thu, 19 Aug 2021 07:41:35 GMT
272
+ Thu, 19 Aug 2021 07:41:35 GMT
196
273
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.22..@fluentui/react-context-selector_v9.0.0-alpha.23)
197
274
 
198
275
  ### Changes
@@ -201,7 +278,7 @@ Thu, 19 Aug 2021 07:41:35 GMT
201
278
 
202
279
  ## [9.0.0-alpha.22](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.22)
203
280
 
204
- Fri, 06 Aug 2021 07:35:14 GMT
281
+ Fri, 06 Aug 2021 07:35:14 GMT
205
282
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.21..@fluentui/react-context-selector_v9.0.0-alpha.22)
206
283
 
207
284
  ### Changes
@@ -210,7 +287,7 @@ Fri, 06 Aug 2021 07:35:14 GMT
210
287
 
211
288
  ## [9.0.0-alpha.21](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.21)
212
289
 
213
- Tue, 03 Aug 2021 07:39:30 GMT
290
+ Tue, 03 Aug 2021 07:39:30 GMT
214
291
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.20..@fluentui/react-context-selector_v9.0.0-alpha.21)
215
292
 
216
293
  ### Patches
@@ -224,7 +301,7 @@ Tue, 03 Aug 2021 07:39:30 GMT
224
301
 
225
302
  ## [9.0.0-alpha.20](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.20)
226
303
 
227
- Mon, 02 Aug 2021 07:36:20 GMT
304
+ Mon, 02 Aug 2021 07:36:20 GMT
228
305
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.19..@fluentui/react-context-selector_v9.0.0-alpha.20)
229
306
 
230
307
  ### Changes
@@ -233,7 +310,7 @@ Mon, 02 Aug 2021 07:36:20 GMT
233
310
 
234
311
  ## [9.0.0-alpha.19](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.19)
235
312
 
236
- Fri, 23 Jul 2021 07:38:19 GMT
313
+ Fri, 23 Jul 2021 07:38:19 GMT
237
314
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.18..@fluentui/react-context-selector_v9.0.0-alpha.19)
238
315
 
239
316
  ### Changes
@@ -242,7 +319,7 @@ Fri, 23 Jul 2021 07:38:19 GMT
242
319
 
243
320
  ## [9.0.0-alpha.18](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.18)
244
321
 
245
- Thu, 22 Jul 2021 07:36:55 GMT
322
+ Thu, 22 Jul 2021 07:36:55 GMT
246
323
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.17..@fluentui/react-context-selector_v9.0.0-alpha.18)
247
324
 
248
325
  ### Changes
@@ -251,7 +328,7 @@ Thu, 22 Jul 2021 07:36:55 GMT
251
328
 
252
329
  ## [9.0.0-alpha.17](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.17)
253
330
 
254
- Thu, 15 Jul 2021 07:36:18 GMT
331
+ Thu, 15 Jul 2021 07:36:18 GMT
255
332
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.16..@fluentui/react-context-selector_v9.0.0-alpha.17)
256
333
 
257
334
  ### Changes
@@ -260,7 +337,7 @@ Thu, 15 Jul 2021 07:36:18 GMT
260
337
 
261
338
  ## [9.0.0-alpha.16](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.16)
262
339
 
263
- Fri, 09 Jul 2021 07:39:31 GMT
340
+ Fri, 09 Jul 2021 07:39:31 GMT
264
341
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.15..@fluentui/react-context-selector_v9.0.0-alpha.16)
265
342
 
266
343
  ### Patches
@@ -274,7 +351,7 @@ Fri, 09 Jul 2021 07:39:31 GMT
274
351
 
275
352
  ## [9.0.0-alpha.15](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.15)
276
353
 
277
- Fri, 02 Jul 2021 23:15:55 GMT
354
+ Fri, 02 Jul 2021 23:15:55 GMT
278
355
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.14..@fluentui/react-context-selector_v9.0.0-alpha.15)
279
356
 
280
357
  ### Changes
@@ -283,7 +360,7 @@ Fri, 02 Jul 2021 23:15:55 GMT
283
360
 
284
361
  ## [9.0.0-alpha.14](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.14)
285
362
 
286
- Fri, 02 Jul 2021 07:37:06 GMT
363
+ Fri, 02 Jul 2021 07:37:06 GMT
287
364
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.13..@fluentui/react-context-selector_v9.0.0-alpha.14)
288
365
 
289
366
  ### Changes
@@ -292,7 +369,7 @@ Fri, 02 Jul 2021 07:37:06 GMT
292
369
 
293
370
  ## [9.0.0-alpha.13](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.13)
294
371
 
295
- Tue, 15 Jun 2021 07:40:20 GMT
372
+ Tue, 15 Jun 2021 07:40:20 GMT
296
373
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.12..@fluentui/react-context-selector_v9.0.0-alpha.13)
297
374
 
298
375
  ### Changes
@@ -301,7 +378,7 @@ Tue, 15 Jun 2021 07:40:20 GMT
301
378
 
302
379
  ## [9.0.0-alpha.12](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.12)
303
380
 
304
- Mon, 07 Jun 2021 07:38:15 GMT
381
+ Mon, 07 Jun 2021 07:38:15 GMT
305
382
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.11..@fluentui/react-context-selector_v9.0.0-alpha.12)
306
383
 
307
384
  ### Patches
@@ -315,7 +392,7 @@ Mon, 07 Jun 2021 07:38:15 GMT
315
392
 
316
393
  ## [9.0.0-alpha.11](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.11)
317
394
 
318
- Fri, 04 Jun 2021 07:37:23 GMT
395
+ Fri, 04 Jun 2021 07:37:23 GMT
319
396
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.10..@fluentui/react-context-selector_v9.0.0-alpha.11)
320
397
 
321
398
  ### Changes
@@ -324,7 +401,7 @@ Fri, 04 Jun 2021 07:37:23 GMT
324
401
 
325
402
  ## [9.0.0-alpha.10](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.10)
326
403
 
327
- Wed, 26 May 2021 07:35:43 GMT
404
+ Wed, 26 May 2021 07:35:43 GMT
328
405
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.9..@fluentui/react-context-selector_v9.0.0-alpha.10)
329
406
 
330
407
  ### Changes
@@ -333,7 +410,7 @@ Wed, 26 May 2021 07:35:43 GMT
333
410
 
334
411
  ## [9.0.0-alpha.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.9)
335
412
 
336
- Fri, 21 May 2021 07:34:54 GMT
413
+ Fri, 21 May 2021 07:34:54 GMT
337
414
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.8..@fluentui/react-context-selector_v9.0.0-alpha.9)
338
415
 
339
416
  ### Changes
@@ -342,7 +419,7 @@ Fri, 21 May 2021 07:34:54 GMT
342
419
 
343
420
  ## [9.0.0-alpha.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.8)
344
421
 
345
- Thu, 20 May 2021 07:41:54 GMT
422
+ Thu, 20 May 2021 07:41:54 GMT
346
423
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.7..@fluentui/react-context-selector_v9.0.0-alpha.8)
347
424
 
348
425
  ### Patches
@@ -356,7 +433,7 @@ Thu, 20 May 2021 07:41:54 GMT
356
433
 
357
434
  ## [9.0.0-alpha.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.7)
358
435
 
359
- Wed, 19 May 2021 07:34:20 GMT
436
+ Wed, 19 May 2021 07:34:20 GMT
360
437
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.6..@fluentui/react-context-selector_v9.0.0-alpha.7)
361
438
 
362
439
  ### Changes
@@ -365,7 +442,7 @@ Wed, 19 May 2021 07:34:20 GMT
365
442
 
366
443
  ## [9.0.0-alpha.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.6)
367
444
 
368
- Mon, 03 May 2021 07:45:19 GMT
445
+ Mon, 03 May 2021 07:45:19 GMT
369
446
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.5..@fluentui/react-context-selector_v9.0.0-alpha.6)
370
447
 
371
448
  ### Changes
@@ -374,7 +451,7 @@ Mon, 03 May 2021 07:45:19 GMT
374
451
 
375
452
  ## [9.0.0-alpha.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.5)
376
453
 
377
- Fri, 30 Apr 2021 07:42:23 GMT
454
+ Fri, 30 Apr 2021 07:42:23 GMT
378
455
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.4..@fluentui/react-context-selector_v9.0.0-alpha.5)
379
456
 
380
457
  ### Patches
@@ -388,7 +465,7 @@ Fri, 30 Apr 2021 07:42:23 GMT
388
465
 
389
466
  ## [9.0.0-alpha.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.4)
390
467
 
391
- Fri, 23 Apr 2021 07:37:10 GMT
468
+ Fri, 23 Apr 2021 07:37:10 GMT
392
469
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.3..@fluentui/react-context-selector_v9.0.0-alpha.4)
393
470
 
394
471
  ### Patches
@@ -402,7 +479,7 @@ Fri, 23 Apr 2021 07:37:10 GMT
402
479
 
403
480
  ## [9.0.0-alpha.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.3)
404
481
 
405
- Thu, 22 Apr 2021 07:33:28 GMT
482
+ Thu, 22 Apr 2021 07:33:28 GMT
406
483
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.2..@fluentui/react-context-selector_v9.0.0-alpha.3)
407
484
 
408
485
  ### Changes
@@ -411,7 +488,7 @@ Thu, 22 Apr 2021 07:33:28 GMT
411
488
 
412
489
  ## [9.0.0-alpha.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.2)
413
490
 
414
- Wed, 31 Mar 2021 00:53:43 GMT
491
+ Wed, 31 Mar 2021 00:53:43 GMT
415
492
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.1..@fluentui/react-context-selector_v9.0.0-alpha.2)
416
493
 
417
494
  ### Patches
@@ -421,7 +498,7 @@ Wed, 31 Mar 2021 00:53:43 GMT
421
498
 
422
499
  ## [9.0.0-alpha.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.1)
423
500
 
424
- Tue, 30 Mar 2021 07:34:45 GMT
501
+ Tue, 30 Mar 2021 07:34:45 GMT
425
502
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v0.53.4..@fluentui/react-context-selector_v9.0.0-alpha.1)
426
503
 
427
504
  ### Changes
@@ -431,7 +508,7 @@ Tue, 30 Mar 2021 07:34:45 GMT
431
508
 
432
509
  ## [0.53.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v0.53.4)
433
510
 
434
- Mon, 15 Mar 2021 07:36:20 GMT
511
+ Mon, 15 Mar 2021 07:36:20 GMT
435
512
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v0.53.3..@fluentui/react-context-selector_v0.53.4)
436
513
 
437
514
  ### Patches
@@ -440,7 +517,7 @@ Mon, 15 Mar 2021 07:36:20 GMT
440
517
 
441
518
  ## [0.53.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v0.53.3)
442
519
 
443
- Fri, 26 Feb 2021 01:16:27 GMT
520
+ Fri, 26 Feb 2021 01:16:27 GMT
444
521
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v0.53.2..@fluentui/react-context-selector_v0.53.3)
445
522
 
446
523
  ### Patches
@@ -449,7 +526,7 @@ Fri, 26 Feb 2021 01:16:27 GMT
449
526
 
450
527
  ## [0.53.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v0.53.2)
451
528
 
452
- Mon, 22 Feb 2021 12:26:22 GMT
529
+ Mon, 22 Feb 2021 12:26:22 GMT
453
530
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v0.53.0..@fluentui/react-context-selector_v0.53.2)
454
531
 
455
532
  ### Patches
File without changes
File without changes
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/createContext.ts"],"names":[],"mappings":"AAAA,SAAS,yBAAT,QAA0C,2BAA1C;AACA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,uBAAuB,IAAI,cAApC,EAAoD,wBAAwB,IAAI,eAAhF,QAAuG,WAAvG;;AAIA,MAAM,cAAc,GAAW,QAAR,IAAyD;AAC9E,QAAM,QAAQ,GAAyC,KAAK,IAAG;AAC7D;AACA,UAAM,QAAQ,GAAG,KAAK,CAAC,MAAN,CAAa,KAAK,CAAC,KAAnB,CAAjB,CAF6D,CAG7D;;AACA,UAAM,UAAU,GAAG,KAAK,CAAC,MAAN,CAAa,CAAb,CAAnB,CAJ6D,CAM7D;;AACA,UAAM,YAAY,GAAG,KAAK,CAAC,MAAN,EAArB;;AAEA,QAAI,CAAC,YAAY,CAAC,OAAlB,EAA2B;AACzB,MAAA,YAAY,CAAC,OAAb,GAAuB;AACrB,QAAA,KAAK,EAAE,QADc;AAErB,QAAA,OAAO,EAAE,UAFY;AAGrB,QAAA,SAAS,EAAE;AAHU,OAAvB;AAKD;;AAED,IAAA,yBAAyB,CAAC,MAAK;AAC7B,MAAA,QAAQ,CAAC,OAAT,GAAmB,KAAK,CAAC,KAAzB;AACA,MAAA,UAAU,CAAC,OAAX,IAAsB,CAAtB;AAEA,MAAA,eAAe,CAAC,cAAD,EAAiB,MAAK;AAClC,QAAA,YAAY,CAAC,OAAb,CA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yC;AACvD,IAAA,KAAK,EAAE;AAAE,MAAA,OAAO,EAAE;AAAX,KADgD;AAEvD,IAAA,OAAO,EAAE;AAAE,MAAA,OAAO,EAAE,CAAC;AAAZ,KAF8C;AAGvD,IAAA,SAAS,EAAE;AAH4C,GAAzC,CAAhB;AAMA,EAAA,OAAO,CAAC,QAAR,GAAmB,cAAc,CAAQ,OAAO,CAAC,QAAhB,CAAjC,CAP0E,CAS1E;;AACA,SAAS,OAAsC,CAAC,QAAhD;AAEA,SAAQ,OAAR;AACD,CAbM","sourcesContent":["import { useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { unstable_NormalPriority as NormalPriority, unstable_runWithPriority as runWithPriority } from 'scheduler';\n\nimport { Context, ContextValue } from './types';\n\nconst createProvider = <Value>(Original: React.Provider<ContextValue<Value>>) => {\n const Provider: React.FC<React.ProviderProps<Value>> = props => {\n // Holds an actual \"props.value\"\n const valueRef = React.useRef(props.value);\n // Used to sync context updates and avoid stale values, can be considered as render/effect counter of Provider.\n const versionRef = React.useRef(0);\n\n // A stable object, is used to avoid context updates via mutation of its values.\n const contextValue = React.useRef<ContextValue<Value>>();\n\n if (!contextValue.current) {\n contextValue.current = {\n value: valueRef,\n version: versionRef,\n listeners: [],\n };\n }\n\n useIsomorphicLayoutEffect(() => {\n valueRef.current = props.value;\n versionRef.current += 1;\n\n runWithPriority(NormalPriority, () => {\n (contextValue.current as ContextValue<Value>).listeners.forEach(listener => {\n listener([versionRef.current, props.value]);\n });\n });\n }, [props.value]);\n\n return React.createElement(Original, { value: contextValue.current }, props.children);\n };\n\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== 'production') {\n Provider.displayName = 'ContextSelector.Provider';\n }\n\n return (Provider as unknown) as React.Provider<ContextValue<Value>>;\n};\n\nexport const createContext = <Value>(defaultValue: Value): Context<Value> => {\n const context = React.createContext<ContextValue<Value>>({\n value: { current: defaultValue },\n version: { current: -1 },\n listeners: [],\n });\n\n context.Provider = createProvider<Value>(context.Provider);\n\n // We don't support Consumer API\n delete ((context as unknown) as Context<Value>).Consumer;\n\n return (context as unknown) as Context<Value>;\n};\n"],"sourceRoot":"../src/"}
package/lib/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  export { createContext } from './createContext';
2
2
  export { useContextSelector } from './useContextSelector';
3
3
  export { useHasParentContext } from './useHasParentContext';
4
- export * from './types';
5
4
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC","sourcesContent":["export { createContext } from './createContext';\nexport { useContextSelector } from './useContextSelector';\nexport { useHasParentContext } from './useHasParentContext';\n// eslint-disable-next-line @fluentui/ban-context-export\nexport type { Context, ContextSelector, ContextValue, ContextValues, ContextVersion } from './types';\n"]}
package/lib/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"types.js","sourceRoot":"../src/","sources":["types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\n\nexport type Context<Value> = React.Context<Value> & {\n Provider: React.FC<React.ProviderProps<Value>>;\n Consumer: never;\n};\n\nexport type ContextSelector<Value, SelectedValue> = (value: Value) => SelectedValue;\n\nexport type ContextVersion = number;\n\nexport type ContextValue<Value> = {\n /** Holds a set of subscribers from components. */\n listeners: ((payload: readonly [ContextVersion, Value]) => void)[];\n\n /** Holds an actual value of React's context that will be propagated down for computations. */\n value: React.MutableRefObject<Value>;\n\n /** A version field is used to sync a context value and consumers. */\n version: React.MutableRefObject<ContextVersion>;\n};\n\nexport type ContextValues<Value> = ContextValue<Value> & {\n /** List of listners to publish changes */\n listeners: ((payload: readonly [ContextVersion, Record<string, Value>]) => void)[];\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/useContextSelector.ts"],"names":[],"mappings":"AAAA,SAAS,yBAAT,QAA0C,2BAA1C;AACA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAaA;;;;AAIG;;AACH,OAAO,MAAM,kBAAkB,GAAG,CAChC,OADgC,EAEhC,QAFgC,KAGf;AACjB,QAAM,YAAY,GAAG,KAAK,CAAC,UAAN,CAAkB,OAAlB,CAArB;AAEA,QAAM;AACJ,IAAA,KAAK,EAAE;AAAE,MAAA,OAAO,EAAE;AAAX,KADH;AAEJ,IAAA,OAAO,EAAE;AAAE,MAAA,OAAO,EAAE;AAAX,KAFL;AAGJ,IAAA;AAHI,MAIF,YAJJ;AAKA,QAAM,QAAQ,GAAG,QAAQ,CAAC,KAAD,CAAzB;AAEA,QAAM,CAAC,KAAD,EAAQ,QAAR,IAAoB,KAAK,CAAC,UAAN,CACxB,CACE,SADF,EAEE,OAFF,KAKqC;AACnC,QAAI,CAAC,OAAL,EAAc;AACZ;AACA,aAAO,CAAC,KAAD,EAAQ,QAAR,CAAP;AACD;;AAED,QAAI,OAAO,CAAC,CAAD,CAAP,IAAc,OAAlB,EAA2B;AACzB,UAAI,QAAQ,CAAC,SAAS,CAAC,CAAD,CAAV,EAAe,QAAf,CAAZ,EAAsC;AACpC,eAAO,SAAP,CADoC,CAClB;AACnB;;AAED,aAAO,CAAC,KAAD,EAAQ,QAAR,CAAP;AACD;;AAED,QAAI;AACF,UAAI,Q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ourcesContent":["import { useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport * as React from 'react';\n\nimport { Context, ContextSelector, ContextValue, ContextVersion } from './types';\n\n/**\n * Narrowing React.Reducer type to be more easily usable below.\n * No need to export this as it's for internal reducer usage.\n */\ntype ContextReducer<Value, SelectedValue> = React.Reducer<\n readonly [Value, SelectedValue],\n undefined | readonly [ContextVersion, Value]\n>;\n\n/**\n * This hook returns context selected value by selector.\n * It will only accept context created by `createContext`.\n * It will trigger re-render if only the selected value is referencially changed.\n */\nexport const useContextSelector = <Value, SelectedValue>(\n context: Context<Value>,\n selector: ContextSelector<Value, SelectedValue>,\n): SelectedValue => {\n const contextValue = React.useContext((context as unknown) as Context<ContextValue<Value>>);\n\n const {\n value: { current: value },\n version: { current: version },\n listeners,\n } = contextValue;\n const selected = selector(value);\n\n const [state, dispatch] = React.useReducer<ContextReducer<Value, SelectedValue>>(\n (\n prevState: readonly [Value /* contextValue */, SelectedValue /* selector(value) */],\n payload:\n | undefined // undefined from render below\n | readonly [ContextVersion, Value], // from provider effect\n ): readonly [Value, SelectedValue] => {\n if (!payload) {\n // early bail out when is dispatched during render\n return [value, selected] as const;\n }\n\n if (payload[0] <= version) {\n if (objectIs(prevState[1], selected)) {\n return prevState; // bail out\n }\n\n return [value, selected] as const;\n }\n\n try {\n if (objectIs(prevState[0], payload[1])) {\n return prevState; // do not update\n }\n\n const nextSelected = selector(payload[1]);\n\n if (objectIs(prevState[1], nextSelected)) {\n return prevState; // do not update\n }\n\n return [payload[1], nextSelected] as const;\n } catch (e) {\n // ignored (stale props or some other reason)\n }\n\n // explicitly spread to enforce typing\n return [prevState[0], prevState[1]] as const; // schedule update\n },\n [value, selected] as const,\n );\n\n if (!objectIs(state[1], selected)) {\n // schedule re-render\n // this is safe because it's self contained\n dispatch(undefined);\n }\n\n useIsomorphicLayoutEffect(() => {\n listeners.push(dispatch);\n\n return () => {\n const index = listeners.indexOf(dispatch);\n listeners.splice(index, 1);\n };\n }, [listeners]);\n\n return state[1] as SelectedValue;\n};\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction is(x: any, y: any) {\n return (\n (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y) // eslint-disable-line no-self-compare\n );\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst objectIs: (x: any, y: any) => boolean =\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore fallback to native if it exists (not in IE11)\n typeof Object.is === 'function' ? Object.is : is;\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/useHasParentContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA;;;;;;AAMG;;AACH,OAAM,SAAU,mBAAV,CAAqC,OAArC,EAA4D;AAChE,QAAM,YAAY,GAAG,KAAK,CAAC,UAAN,CAAkB,OAAlB,CAArB;;AAEA,MAAI,YAAY,CAAC,OAAjB,EAA0B;AACxB,WAAO,YAAY,CAAC,OAAb,CAAqB,OAArB,KAAiC,CAAC,CAAzC;AACD;;AAED,SAAO,KAAP;AACD","sourceRoot":""}
1
+ {"version":3,"sources":["useHasParentContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA;;;;;;AAMG;;AACH,OAAM,SAAU,mBAAV,CAAqC,OAArC,EAA4D;AAChE,QAAM,YAAY,GAAG,KAAK,CAAC,UAAN,CAAkB,OAAlB,CAArB;;AAEA,MAAI,YAAY,CAAC,OAAjB,EAA0B;AACxB,WAAO,YAAY,CAAC,OAAb,CAAqB,OAArB,KAAiC,CAAC,CAAzC;AACD;;AAED,SAAO,KAAP;AACD","sourcesContent":["import * as React from 'react';\nimport { Context, ContextValue } from './types';\n\n/**\n * Utility hook for contexts created by react-context-selector to determine if a parent context exists\n * WARNING: This hook will not work for native React contexts\n *\n * @param context - context created by react-context-selector\n * @returns whether the hook is wrapped by a parent context\n */\nexport function useHasParentContext<Value>(context: Context<Value>) {\n const contextValue = React.useContext((context as unknown) as Context<ContextValue<Value>>);\n\n if (contextValue.version) {\n return contextValue.version.current !== -1;\n }\n\n return false;\n}\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/createContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,WAAA,gBAAA,OAAA,CAAA,WAAA,CAAA;;AAIA,MAAM,cAAc,GAAW,QAAR,IAAyD;AAC9E,QAAM,QAAQ,GAAyC,KAAK,IAAG;AAC7D;AACA,UAAM,QAAQ,GAAG,KAAK,CAAC,MAAN,CAAa,KAAK,CAAC,KAAnB,CAAjB,CAF6D,CAG7D;;AACA,UAAM,UAAU,GAAG,KAAK,CAAC,MAAN,CAAa,CAAb,CAAnB,CAJ6D,CAM7D;;AACA,UAAM,YAAY,GAAG,KAAK,CAAC,MAAN,EAArB;;AAEA,QAAI,CAAC,YAAY,CAAC,OAAlB,EAA2B;AACzB,MAAA,YAAY,CAAC,OAAb,GAAuB;AACrB,QAAA,KAAK,EAAE,QADc;AAErB,QAAA,OAAO,EAAE,UAFY;AAGrB,QAAA,SAAS,EAAE;AAHU,OAAvB;AAKD;;AAED,IAAA,iBAAA,CAAA,yBAAA,CAA0B,MAAK;AAC7B,MAAA,QAAQ,CAAC,OAAT,GAAmB,KAAK,CAAC,KAAzB;AACA,MAAA,UAAU,CAAC,OAAX,IAAsB,CAAtB;AAEA,MAAA,WAAA,CAAA,wBAAA,CAAgB,WAAA,CAAA,uBAAhB,EAAgC,MAAK;AAClC,QAAA,YAAY,CAAC,OAAb,CAA6C,SAA7C,CAAuD,OAAvD,CAA+D,QAAQ,IAA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vD,IAAA,KAAK,EAAE;AAAE,MAAA,OAAO,EAAE;AAAX,KADgD;AAEvD,IAAA,OAAO,EAAE;AAAE,MAAA,OAAO,EAAE,CAAC;AAAZ,KAF8C;AAGvD,IAAA,SAAS,EAAE;AAH4C,GAAzC,CAAhB;AAMA,EAAA,OAAO,CAAC,QAAR,GAAmB,cAAc,CAAQ,OAAO,CAAC,QAAhB,CAAjC,CAP0E,CAS1E;;AACA,SAAS,OAAsC,CAAC,QAAhD;AAEA,SAAQ,OAAR;AACD,CAbM;;AAAM,OAAA,CAAA,aAAA,GAAa,aAAb","sourcesContent":["import { useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { unstable_NormalPriority as NormalPriority, unstable_runWithPriority as runWithPriority } from 'scheduler';\n\nimport { Context, ContextValue } from './types';\n\nconst createProvider = <Value>(Original: React.Provider<ContextValue<Value>>) => {\n const Provider: React.FC<React.ProviderProps<Value>> = props => {\n // Holds an actual \"props.value\"\n const valueRef = React.useRef(props.value);\n // Used to sync context updates and avoid stale values, can be considered as render/effect counter of Provider.\n const versionRef = React.useRef(0);\n\n // A stable object, is used to avoid context updates via mutation of its values.\n const contextValue = React.useRef<ContextValue<Value>>();\n\n if (!contextValue.current) {\n contextValue.current = {\n value: valueRef,\n version: versionRef,\n listeners: [],\n };\n }\n\n useIsomorphicLayoutEffect(() => {\n valueRef.current = props.value;\n versionRef.current += 1;\n\n runWithPriority(NormalPriority, () => {\n (contextValue.current as ContextValue<Value>).listeners.forEach(listener => {\n listener([versionRef.current, props.value]);\n });\n });\n }, [props.value]);\n\n return React.createElement(Original, { value: contextValue.current }, props.children);\n };\n\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== 'production') {\n Provider.displayName = 'ContextSelector.Provider';\n }\n\n return (Provider as unknown) as React.Provider<ContextValue<Value>>;\n};\n\nexport const createContext = <Value>(defaultValue: Value): Context<Value> => {\n const context = React.createContext<ContextValue<Value>>({\n value: { current: defaultValue },\n version: { current: -1 },\n listeners: [],\n });\n\n context.Provider = createProvider<Value>(context.Provider);\n\n // We don't support Consumer API\n delete ((context as unknown) as Context<Value>).Consumer;\n\n return (context as unknown) as Context<Value>;\n};\n"],"sourceRoot":"../src/"}
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useHasParentContext = exports.useContextSelector = exports.createContext = void 0;
7
7
 
8
- const tslib_1 = /*#__PURE__*/require("tslib");
9
-
10
8
  var createContext_1 = /*#__PURE__*/require("./createContext");
11
9
 
12
10
  Object.defineProperty(exports, "createContext", {
@@ -33,6 +31,4 @@ Object.defineProperty(exports, "useHasParentContext", {
33
31
  return useHasParentContext_1.useHasParentContext;
34
32
  }
35
33
  });
36
-
37
- tslib_1.__exportStar(require("./types"), exports);
38
34
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,IAAA,eAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,eAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,eAAA,CAAA,aAAA;AAAa;AAAb,CAAA;;AACT,IAAA,oBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,oBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,oBAAA,CAAA,kBAAA;AAAkB;AAAlB,CAAA;;AACT,IAAA,qBAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,qBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,qBAAA,CAAA,mBAAA;AAAmB;AAAnB,CAAA;;AACT,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,SAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,eAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,eAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,eAAA,CAAA,aAAA;AAAa;AAAb,CAAA;;AACT,IAAA,oBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,oBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,oBAAA,CAAA,kBAAA;AAAkB;AAAlB,CAAA;;AACT,IAAA,qBAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,qBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,qBAAA,CAAA,mBAAA;AAAmB;AAAnB,CAAA","sourcesContent":["export { createContext } from './createContext';\nexport { useContextSelector } from './useContextSelector';\nexport { useHasParentContext } from './useHasParentContext';\n// eslint-disable-next-line @fluentui/ban-context-export\nexport type { Context, ContextSelector, ContextValue, ContextValues, ContextVersion } from './types';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/useContextSelector.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,KAAA,gBAAA,OAAA,CAAA,O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,EAuCxB,CAAC,KAAD,EAAQ,QAAR,CAvCwB,CAA1B;;AA0CA,MAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAD,CAAN,EAAW,QAAX,CAAb,EAAmC;AACjC;AACA;AACA,IAAA,QAAQ,CAAC,SAAD,CAAR;AACD;;AAED,EAAA,iBAAA,CAAA,yBAAA,CAA0B,MAAK;AAC7B,IAAA,SAAS,CAAC,IAAV,CAAe,QAAf;AAEA,WAAO,MAAK;AACV,YAAM,KAAK,GAAG,SAAS,CAAC,OAAV,CAAkB,QAAlB,CAAd;AACA,MAAA,SAAS,CAAC,MAAV,CAAiB,KAAjB,EAAwB,CAAxB;AACD,KAHD;AAID,GAPD,EAOG,CAAC,SAAD,CAPH;AASA,SAAO,KAAK,CAAC,CAAD,CAAZ;AACD,CAvEM;;AAAM,OAAA,CAAA,kBAAA,GAAkB,kBAAlB;AAyEb;;;AAGG;AACH;;AACA,SAAS,EAAT,CAAY,CAAZ,EAAoB,CAApB,EAA0B;AACxB,SACG,CAAC,KAAK,CAAN,KAAY,CAAC,KAAK,CAAN,IAAW,IAAI,CAAJ,KAAU,IAAI,CAArC,CAAD,IAA8C,CAAC,KAAK,CAAN,IAAW,CAAC,KAAK,CADjE,CACoE;AADpE;AAGD,C,CAED;;;AACA,MAAM,QAAQ,GACZ;AACA;AACA,OAAO,MAAM,CAAC,EAAd,KAAqB,UAArB,GAAkC,MAAM,CAAC,EAAzC,GAA8C,EAHhD","sourcesContent":["import { useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport * as React from 'react';\n\nimport { Context, ContextSelector, ContextValue, ContextVersion } from './types';\n\n/**\n * Narrowing React.Reducer type to be more easily usable below.\n * No need to export this as it's for internal reducer usage.\n */\ntype ContextReducer<Value, SelectedValue> = React.Reducer<\n readonly [Value, SelectedValue],\n undefined | readonly [ContextVersion, Value]\n>;\n\n/**\n * This hook returns context selected value by selector.\n * It will only accept context created by `createContext`.\n * It will trigger re-render if only the selected value is referencially changed.\n */\nexport const useContextSelector = <Value, SelectedValue>(\n context: Context<Value>,\n selector: ContextSelector<Value, SelectedValue>,\n): SelectedValue => {\n const contextValue = React.useContext((context as unknown) as Context<ContextValue<Value>>);\n\n const {\n value: { current: value },\n version: { current: version },\n listeners,\n } = contextValue;\n const selected = selector(value);\n\n const [state, dispatch] = React.useReducer<ContextReducer<Value, SelectedValue>>(\n (\n prevState: readonly [Value /* contextValue */, SelectedValue /* selector(value) */],\n payload:\n | undefined // undefined from render below\n | readonly [ContextVersion, Value], // from provider effect\n ): readonly [Value, SelectedValue] => {\n if (!payload) {\n // early bail out when is dispatched during render\n return [value, selected] as const;\n }\n\n if (payload[0] <= version) {\n if (objectIs(prevState[1], selected)) {\n return prevState; // bail out\n }\n\n return [value, selected] as const;\n }\n\n try {\n if (objectIs(prevState[0], payload[1])) {\n return prevState; // do not update\n }\n\n const nextSelected = selector(payload[1]);\n\n if (objectIs(prevState[1], nextSelected)) {\n return prevState; // do not update\n }\n\n return [payload[1], nextSelected] as const;\n } catch (e) {\n // ignored (stale props or some other reason)\n }\n\n // explicitly spread to enforce typing\n return [prevState[0], prevState[1]] as const; // schedule update\n },\n [value, selected] as const,\n );\n\n if (!objectIs(state[1], selected)) {\n // schedule re-render\n // this is safe because it's self contained\n dispatch(undefined);\n }\n\n useIsomorphicLayoutEffect(() => {\n listeners.push(dispatch);\n\n return () => {\n const index = listeners.indexOf(dispatch);\n listeners.splice(index, 1);\n };\n }, [listeners]);\n\n return state[1] as SelectedValue;\n};\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction is(x: any, y: any) {\n return (\n (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y) // eslint-disable-line no-self-compare\n );\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst objectIs: (x: any, y: any) => boolean =\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore fallback to native if it exists (not in IE11)\n typeof Object.is === 'function' ? Object.is : is;\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/useHasParentContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;AAGA;;;;;;AAMG;;;AACH,SAAgB,mBAAhB,CAA2C,OAA3C,EAAkE;AAChE,QAAM,YAAY,GAAG,KAAK,CAAC,UAAN,CAAkB,OAAlB,CAArB;;AAEA,MAAI,YAAY,CAAC,OAAjB,EAA0B;AACxB,WAAO,YAAY,CAAC,OAAb,CAAqB,OAArB,KAAiC,CAAC,CAAzC;AACD;;AAED,SAAO,KAAP;AACD;;AARD,OAAA,CAAA,mBAAA,GAAA,mBAAA","sourceRoot":""}
1
+ {"version":3,"sources":["useHasParentContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;AAGA;;;;;;AAMG;;;AACH,SAAgB,mBAAhB,CAA2C,OAA3C,EAAkE;AAChE,QAAM,YAAY,GAAG,KAAK,CAAC,UAAN,CAAkB,OAAlB,CAArB;;AAEA,MAAI,YAAY,CAAC,OAAjB,EAA0B;AACxB,WAAO,YAAY,CAAC,OAAb,CAAqB,OAArB,KAAiC,CAAC,CAAzC;AACD;;AAED,SAAO,KAAP;AACD;;AARD,OAAA,CAAA,mBAAA,GAAA,mBAAA","sourcesContent":["import * as React from 'react';\nimport { Context, ContextValue } from './types';\n\n/**\n * Utility hook for contexts created by react-context-selector to determine if a parent context exists\n * WARNING: This hook will not work for native React contexts\n *\n * @param context - context created by react-context-selector\n * @returns whether the hook is wrapped by a parent context\n */\nexport function useHasParentContext<Value>(context: Context<Value>) {\n const contextValue = React.useContext((context as unknown) as Context<ContextValue<Value>>);\n\n if (contextValue.version) {\n return contextValue.version.current !== -1;\n }\n\n return false;\n}\n"],"sourceRoot":"../src/"}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@fluentui/react-context-selector",
3
- "version": "9.0.0-rc.1",
3
+ "version": "9.0.0-rc.10",
4
4
  "description": "React useContextSelector hook in userland",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
7
- "typings": "lib/index.d.ts",
7
+ "typings": "dist/index.d.ts",
8
8
  "sideEffects": false,
9
9
  "repository": {
10
10
  "type": "git",
@@ -19,31 +19,23 @@
19
19
  "lint": "just-scripts lint",
20
20
  "test": "jest --passWithNoTests",
21
21
  "docs": "api-extractor run --config=config/api-extractor.local.json --local",
22
- "build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output ./dist/packages/react-context-selector/src && yarn docs",
22
+ "build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../../scripts/typescript/normalize-import --output ./dist/packages/react-components/react-context-selector/src && yarn docs",
23
23
  "type-check": "tsc -b tsconfig.json"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@fluentui/eslint-plugin": "*",
27
- "@fluentui/scripts": "^1.0.0",
28
- "@types/scheduler": "^0.16.1",
29
- "@types/react": "16.9.42",
30
- "@types/react-dom": "16.9.10",
31
- "@types/react-test-renderer": "^16.0.0",
32
- "react": "16.8.6",
33
- "react-dom": "16.8.6",
34
- "react-is": "^16.6.3",
35
- "react-test-renderer": "^16.3.0"
27
+ "@fluentui/scripts": "^1.0.0"
36
28
  },
37
29
  "dependencies": {
38
- "@fluentui/react-utilities": "9.0.0-rc.1",
39
- "scheduler": "^0.20.1",
30
+ "@fluentui/react-utilities": "9.0.0-rc.10",
40
31
  "tslib": "^2.1.0"
41
32
  },
42
33
  "peerDependencies": {
43
34
  "@types/react": ">=16.8.0 <18.0.0",
44
35
  "@types/react-dom": ">=16.8.0 <18.0.0",
45
36
  "react": ">=16.8.0 <18.0.0",
46
- "react-dom": ">=16.8.0 <18.0.0"
37
+ "react-dom": ">=16.8.0 <18.0.0",
38
+ "scheduler": "^0.19.0 || ^0.20.0"
47
39
  },
48
40
  "beachball": {
49
41
  "disallowedChangeTypes": [
@@ -51,5 +43,12 @@
51
43
  "minor",
52
44
  "patch"
53
45
  ]
46
+ },
47
+ "exports": {
48
+ ".": {
49
+ "types": "./lib/index.d.ts",
50
+ "import": "./lib/index.js",
51
+ "require": "./lib-commonjs/index.js"
52
+ }
54
53
  }
55
54
  }
@@ -1,2 +0,0 @@
1
- import { Context } from './types';
2
- export declare const createContext: <Value>(defaultValue: Value) => Context<Value>;
package/lib/index.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export { createContext } from './createContext';
2
- export { useContextSelector } from './useContextSelector';
3
- export { useHasParentContext } from './useHasParentContext';
4
- export * from './types';
package/lib/types.d.ts DELETED
@@ -1,19 +0,0 @@
1
- import * as React from 'react';
2
- export declare type Context<Value> = React.Context<Value> & {
3
- Provider: React.FC<React.ProviderProps<Value>>;
4
- Consumer: never;
5
- };
6
- export declare type ContextSelector<Value, SelectedValue> = (value: Value) => SelectedValue;
7
- export declare type ContextVersion = number;
8
- export declare type ContextValue<Value> = {
9
- /** Holds a set of subscribers from components. */
10
- listeners: ((payload: readonly [ContextVersion, Value]) => void)[];
11
- /** Holds an actual value of React's context that will be propagated down for computations. */
12
- value: React.MutableRefObject<Value>;
13
- /** A version field is used to sync a context value and consumers. */
14
- version: React.MutableRefObject<ContextVersion>;
15
- };
16
- export declare type ContextValues<Value> = ContextValue<Value> & {
17
- /** List of listners to publish changes */
18
- listeners: ((payload: readonly [ContextVersion, Record<string, Value>]) => void)[];
19
- };
@@ -1,7 +0,0 @@
1
- import { Context, ContextSelector } from './types';
2
- /**
3
- * This hook returns context selected value by selector.
4
- * It will only accept context created by `createContext`.
5
- * It will trigger re-render if only the selected value is referencially changed.
6
- */
7
- export declare const useContextSelector: <Value, SelectedValue>(context: Context<Value>, selector: ContextSelector<Value, SelectedValue>) => SelectedValue;
@@ -1,9 +0,0 @@
1
- import { Context } from './types';
2
- /**
3
- * Utility hook for contexts created by react-context-selector to determine if a parent context exists
4
- * WARNING: This hook will not work for native React contexts
5
- *
6
- * @param context - context created by react-context-selector
7
- * @returns whether the hook is wrapped by a parent context
8
- */
9
- export declare function useHasParentContext<Value>(context: Context<Value>): boolean;
@@ -1,2 +0,0 @@
1
- import { Context } from './types';
2
- export declare const createContext: <Value>(defaultValue: Value) => Context<Value>;
@@ -1,4 +0,0 @@
1
- export { createContext } from './createContext';
2
- export { useContextSelector } from './useContextSelector';
3
- export { useHasParentContext } from './useHasParentContext';
4
- export * from './types';
@@ -1,19 +0,0 @@
1
- import * as React from 'react';
2
- export declare type Context<Value> = React.Context<Value> & {
3
- Provider: React.FC<React.ProviderProps<Value>>;
4
- Consumer: never;
5
- };
6
- export declare type ContextSelector<Value, SelectedValue> = (value: Value) => SelectedValue;
7
- export declare type ContextVersion = number;
8
- export declare type ContextValue<Value> = {
9
- /** Holds a set of subscribers from components. */
10
- listeners: ((payload: readonly [ContextVersion, Value]) => void)[];
11
- /** Holds an actual value of React's context that will be propagated down for computations. */
12
- value: React.MutableRefObject<Value>;
13
- /** A version field is used to sync a context value and consumers. */
14
- version: React.MutableRefObject<ContextVersion>;
15
- };
16
- export declare type ContextValues<Value> = ContextValue<Value> & {
17
- /** List of listners to publish changes */
18
- listeners: ((payload: readonly [ContextVersion, Record<string, Value>]) => void)[];
19
- };
@@ -1,7 +0,0 @@
1
- import { Context, ContextSelector } from './types';
2
- /**
3
- * This hook returns context selected value by selector.
4
- * It will only accept context created by `createContext`.
5
- * It will trigger re-render if only the selected value is referencially changed.
6
- */
7
- export declare const useContextSelector: <Value, SelectedValue>(context: Context<Value>, selector: ContextSelector<Value, SelectedValue>) => SelectedValue;
@@ -1,9 +0,0 @@
1
- import { Context } from './types';
2
- /**
3
- * Utility hook for contexts created by react-context-selector to determine if a parent context exists
4
- * WARNING: This hook will not work for native React contexts
5
- *
6
- * @param context - context created by react-context-selector
7
- * @returns whether the hook is wrapped by a parent context
8
- */
9
- export declare function useHasParentContext<Value>(context: Context<Value>): boolean;