react 0.0.0-experimental-d7382b6c4 → 0.0.0-experimental-e5d06e34b
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/build-info.json +4 -4
- package/cjs/react-jsx-dev-runtime.development.js +45 -24
- package/cjs/react-jsx-dev-runtime.production.min.js +2 -2
- package/cjs/react-jsx-dev-runtime.profiling.min.js +2 -2
- package/cjs/react-jsx-runtime.development.js +45 -24
- package/cjs/react-jsx-runtime.production.min.js +3 -3
- package/cjs/react-jsx-runtime.profiling.min.js +3 -3
- package/cjs/react.development.js +242 -96
- package/cjs/react.production.min.js +18 -18
- package/package.json +1 -1
- package/umd/react.development.js +242 -96
- package/umd/react.production.min.js +25 -26
- package/umd/react.profiling.min.js +32 -32
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v0.0.0-experimental-
|
|
1
|
+
/** @license React v0.0.0-experimental-e5d06e34b
|
|
2
2
|
* react.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -7,20 +7,20 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
'use strict';var l=require("object-assign"),m=
|
|
11
|
-
|
|
12
|
-
function
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
function
|
|
16
|
-
function
|
|
17
|
-
function
|
|
18
|
-
0;g<a.length;g++){k=a[g];var f=e+
|
|
19
|
-
function
|
|
20
|
-
var
|
|
21
|
-
exports.
|
|
22
|
-
exports.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error(
|
|
23
|
-
key:d,ref:k,props:e,_owner:h}};exports.createContext=function(a,b){void 0===b&&(b=null);a={$$typeof:
|
|
24
|
-
exports.createRef=function(){return{current:null}};exports.forwardRef=function(a){return{$$typeof:
|
|
25
|
-
exports.
|
|
26
|
-
exports.useMutableSource=function(a,b,c){return
|
|
10
|
+
'use strict';var l=require("object-assign"),m=60103,p=60106;exports.Fragment=60107;exports.StrictMode=60108;exports.Profiler=60114;var q=60109,r=60110,t=60112;exports.Suspense=60113;exports.SuspenseList=60120;var u=60115,v=60116,w=60121;
|
|
11
|
+
if("function"===typeof Symbol&&Symbol.for){var x=Symbol.for;m=x("react.element");p=x("react.portal");exports.Fragment=x("react.fragment");exports.StrictMode=x("react.strict_mode");exports.Profiler=x("react.profiler");q=x("react.provider");r=x("react.context");t=x("react.forward_ref");exports.Suspense=x("react.suspense");exports.SuspenseList=x("react.suspense_list");u=x("react.memo");v=x("react.lazy");w=x("react.block")}var y="function"===typeof Symbol&&Symbol.iterator;
|
|
12
|
+
function z(a){if(null===a||"object"!==typeof a)return null;a=y&&a[y]||a["@@iterator"];return"function"===typeof a?a:null}function A(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
|
|
13
|
+
var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C={};function D(a,b,c){this.props=a;this.context=b;this.refs=C;this.updater=c||B}D.prototype.isReactComponent={};D.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error(A(85));this.updater.enqueueSetState(this,a,b,"setState")};D.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};
|
|
14
|
+
function E(){}E.prototype=D.prototype;function F(a,b,c){this.props=a;this.context=b;this.refs=C;this.updater=c||B}var G=F.prototype=new E;G.constructor=F;l(G,D.prototype);G.isPureReactComponent=!0;var H={current:null},I=Object.prototype.hasOwnProperty,J={key:!0,ref:!0,__self:!0,__source:!0};
|
|
15
|
+
function K(a,b,c){var e,d={},k=null,h=null;if(null!=b)for(e in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=""+b.key),b)I.call(b,e)&&!J.hasOwnProperty(e)&&(d[e]=b[e]);var g=arguments.length-2;if(1===g)d.children=c;else if(1<g){for(var f=Array(g),n=0;n<g;n++)f[n]=arguments[n+2];d.children=f}if(a&&a.defaultProps)for(e in g=a.defaultProps,g)void 0===d[e]&&(d[e]=g[e]);return{$$typeof:m,type:a,key:k,ref:h,props:d,_owner:H.current}}
|
|
16
|
+
function L(a,b){return{$$typeof:m,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function M(a){return"object"===typeof a&&null!==a&&a.$$typeof===m}function escape(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(a){return b[a]})}var N=/\/+/g;function O(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(""+a.key):b.toString(36)}
|
|
17
|
+
function P(a,b,c,e,d){var k=typeof a;if("undefined"===k||"boolean"===k)a=null;var h=!1;if(null===a)h=!0;else switch(k){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case m:case p:h=!0}}if(h)return h=a,d=d(h),a=""===e?"."+O(h,0):e,Array.isArray(d)?(c="",null!=a&&(c=a.replace(N,"$&/")+"/"),P(d,b,c,"",function(a){return a})):null!=d&&(M(d)&&(d=L(d,c+(!d.key||h&&h.key===d.key?"":(""+d.key).replace(N,"$&/")+"/")+a)),b.push(d)),1;h=0;e=""===e?".":e+":";if(Array.isArray(a))for(var g=
|
|
18
|
+
0;g<a.length;g++){k=a[g];var f=e+O(k,g);h+=P(k,b,c,f,d)}else if(f=z(a),"function"===typeof f)for(a=f.call(a),g=0;!(k=a.next()).done;)k=k.value,f=e+O(k,g++),h+=P(k,b,c,f,d);else if("object"===k)throw b=""+a,Error(A(31,"[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b,""));return h}function Q(a,b,c){if(null==a)return a;var e=[],d=0;P(a,e,"","",function(a){return b.call(c,a,d++)});return e}
|
|
19
|
+
function R(a){if(-1===a._status){var b=a._result;b=b();a._status=0;a._result=b;b.then(function(b){0===a._status&&(b=b.default,a._status=1,a._result=b)},function(b){0===a._status&&(a._status=2,a._result=b)})}if(1===a._status)return a._result;throw a._result;}function S(a){return{$$typeof:w,_data:a.load.apply(null,a.args),_render:a.render}}var T={current:null};function U(){var a=T.current;if(null===a)throw Error(A(321));return a}
|
|
20
|
+
var V={suspense:null},W={ReactCurrentDispatcher:T,ReactCurrentBatchConfig:V,ReactCurrentOwner:H,IsSomeRendererActing:{current:!1},assign:l};exports.Children={map:Q,forEach:function(a,b,c){Q(a,function(){b.apply(this,arguments)},c)},count:function(a){var b=0;Q(a,function(){b++});return b},toArray:function(a){return Q(a,function(a){return a})||[]},only:function(a){if(!M(a))throw Error(A(143));return a}};exports.Component=D;exports.PureComponent=F;
|
|
21
|
+
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W;exports.block=function(a,b){return void 0===b?function(){return{$$typeof:w,_data:void 0,_render:a}}:function(){return{$$typeof:v,_payload:{load:b,args:arguments,render:a},_init:S}}};
|
|
22
|
+
exports.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error(A(267,a));var e=l({},a.props),d=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=H.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(f in b)I.call(b,f)&&!J.hasOwnProperty(f)&&(e[f]=void 0===b[f]&&void 0!==g?g[f]:b[f])}var f=arguments.length-2;if(1===f)e.children=c;else if(1<f){g=Array(f);for(var n=0;n<f;n++)g[n]=arguments[n+2];e.children=g}return{$$typeof:m,type:a.type,
|
|
23
|
+
key:d,ref:k,props:e,_owner:h}};exports.createContext=function(a,b){void 0===b&&(b=null);a={$$typeof:r,_calculateChangedBits:b,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:q,_context:a};return a.Consumer=a};exports.createElement=K;exports.createFactory=function(a){var b=K.bind(null,a);b.type=a;return b};exports.createMutableSource=function(a,b){return{_getVersion:b,_source:a,_workInProgressVersionPrimary:null,_workInProgressVersionSecondary:null}};
|
|
24
|
+
exports.createRef=function(){return{current:null}};exports.forwardRef=function(a){return{$$typeof:t,render:a}};exports.isValidElement=M;exports.lazy=function(a){return{$$typeof:v,_payload:{_status:-1,_result:a},_init:R}};exports.memo=function(a,b){return{$$typeof:u,type:a,compare:void 0===b?null:b}};exports.unstable_useOpaqueIdentifier=function(){return U().useOpaqueIdentifier()};
|
|
25
|
+
exports.unstable_withSuspenseConfig=function(a,b){var c=V.suspense;V.suspense=void 0===b?null:b;try{a()}finally{V.suspense=c}};exports.useCallback=function(a,b){return U().useCallback(a,b)};exports.useContext=function(a,b){return U().useContext(a,b)};exports.useDebugValue=function(){};exports.useDeferredValue=function(a,b){return U().useDeferredValue(a,b)};exports.useEffect=function(a,b){return U().useEffect(a,b)};exports.useImperativeHandle=function(a,b,c){return U().useImperativeHandle(a,b,c)};
|
|
26
|
+
exports.useLayoutEffect=function(a,b){return U().useLayoutEffect(a,b)};exports.useMemo=function(a,b){return U().useMemo(a,b)};exports.useMutableSource=function(a,b,c){return U().useMutableSource(a,b,c)};exports.useReducer=function(a,b,c){return U().useReducer(a,b,c)};exports.useRef=function(a){return U().useRef(a)};exports.useState=function(a){return U().useState(a)};exports.useTransition=function(a){return U().useTransition(a)};exports.version="16.13.1-experimental-e5d06e34b";
|
package/package.json
CHANGED
package/umd/react.development.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v0.0.0-experimental-
|
|
1
|
+
/** @license React v0.0.0-experimental-e5d06e34b
|
|
2
2
|
* react.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -16,29 +16,51 @@
|
|
|
16
16
|
}(this, (function (exports) { 'use strict';
|
|
17
17
|
|
|
18
18
|
// TODO: this is special because it gets imported during build.
|
|
19
|
-
var ReactVersion = '16.13.1-experimental-
|
|
19
|
+
var ReactVersion = '16.13.1-experimental-e5d06e34b';
|
|
20
20
|
|
|
21
21
|
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
22
22
|
// nor polyfill, then a plain number is used for performance.
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
var
|
|
29
|
-
var
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
var
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
|
|
23
|
+
var REACT_ELEMENT_TYPE = 0xeac7;
|
|
24
|
+
var REACT_PORTAL_TYPE = 0xeaca;
|
|
25
|
+
exports.Fragment = 0xeacb;
|
|
26
|
+
exports.StrictMode = 0xeacc;
|
|
27
|
+
exports.Profiler = 0xead2;
|
|
28
|
+
var REACT_PROVIDER_TYPE = 0xeacd;
|
|
29
|
+
var REACT_CONTEXT_TYPE = 0xeace;
|
|
30
|
+
var REACT_FORWARD_REF_TYPE = 0xead0;
|
|
31
|
+
exports.Suspense = 0xead1;
|
|
32
|
+
exports.SuspenseList = 0xead8;
|
|
33
|
+
var REACT_MEMO_TYPE = 0xead3;
|
|
34
|
+
var REACT_LAZY_TYPE = 0xead4;
|
|
35
|
+
var REACT_BLOCK_TYPE = 0xead9;
|
|
36
|
+
var REACT_SERVER_BLOCK_TYPE = 0xeada;
|
|
37
|
+
var REACT_FUNDAMENTAL_TYPE = 0xead5;
|
|
38
|
+
var REACT_RESPONDER_TYPE = 0xead6;
|
|
39
|
+
var REACT_SCOPE_TYPE = 0xead7;
|
|
40
|
+
var REACT_OPAQUE_ID_TYPE = 0xeae0;
|
|
41
|
+
|
|
42
|
+
if (typeof Symbol === 'function' && Symbol.for) {
|
|
43
|
+
var symbolFor = Symbol.for;
|
|
44
|
+
REACT_ELEMENT_TYPE = symbolFor('react.element');
|
|
45
|
+
REACT_PORTAL_TYPE = symbolFor('react.portal');
|
|
46
|
+
exports.Fragment = symbolFor('react.fragment');
|
|
47
|
+
exports.StrictMode = symbolFor('react.strict_mode');
|
|
48
|
+
exports.Profiler = symbolFor('react.profiler');
|
|
49
|
+
REACT_PROVIDER_TYPE = symbolFor('react.provider');
|
|
50
|
+
REACT_CONTEXT_TYPE = symbolFor('react.context');
|
|
51
|
+
REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
|
|
52
|
+
exports.Suspense = symbolFor('react.suspense');
|
|
53
|
+
exports.SuspenseList = symbolFor('react.suspense_list');
|
|
54
|
+
REACT_MEMO_TYPE = symbolFor('react.memo');
|
|
55
|
+
REACT_LAZY_TYPE = symbolFor('react.lazy');
|
|
56
|
+
REACT_BLOCK_TYPE = symbolFor('react.block');
|
|
57
|
+
REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
|
|
58
|
+
REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
|
|
59
|
+
REACT_RESPONDER_TYPE = symbolFor('react.responder');
|
|
60
|
+
REACT_SCOPE_TYPE = symbolFor('react.scope');
|
|
61
|
+
REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
|
|
62
|
+
}
|
|
63
|
+
|
|
42
64
|
var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
43
65
|
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
|
44
66
|
function getIteratorFn(maybeIterable) {
|
|
@@ -117,26 +139,24 @@
|
|
|
117
139
|
};
|
|
118
140
|
|
|
119
141
|
var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
|
|
120
|
-
|
|
142
|
+
|
|
143
|
+
function describeComponentFrame(name, source, ownerName) {
|
|
121
144
|
var sourceInfo = '';
|
|
122
145
|
|
|
123
|
-
if (source) {
|
|
146
|
+
if ( source) {
|
|
124
147
|
var path = source.fileName;
|
|
125
|
-
var fileName = path.replace(BEFORE_SLASH_RE, '');
|
|
148
|
+
var fileName = path.replace(BEFORE_SLASH_RE, ''); // In DEV, include code for a common special case:
|
|
149
|
+
// prefer "folder/index.js" instead of just "index.js".
|
|
126
150
|
|
|
127
|
-
{
|
|
128
|
-
|
|
129
|
-
// prefer "folder/index.js" instead of just "index.js".
|
|
130
|
-
if (/^index\./.test(fileName)) {
|
|
131
|
-
var match = path.match(BEFORE_SLASH_RE);
|
|
151
|
+
if (/^index\./.test(fileName)) {
|
|
152
|
+
var match = path.match(BEFORE_SLASH_RE);
|
|
132
153
|
|
|
133
|
-
|
|
134
|
-
|
|
154
|
+
if (match) {
|
|
155
|
+
var pathBeforeSlash = match[1];
|
|
135
156
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
157
|
+
if (pathBeforeSlash) {
|
|
158
|
+
var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
|
|
159
|
+
fileName = folderName + '/' + fileName;
|
|
140
160
|
}
|
|
141
161
|
}
|
|
142
162
|
}
|
|
@@ -149,73 +169,75 @@
|
|
|
149
169
|
return '\n in ' + (name || 'Unknown') + sourceInfo;
|
|
150
170
|
}
|
|
151
171
|
|
|
152
|
-
function
|
|
153
|
-
var
|
|
154
|
-
|
|
172
|
+
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
|
173
|
+
var ownerName = null;
|
|
174
|
+
|
|
175
|
+
if ( ownerFn) {
|
|
176
|
+
ownerName = ownerFn.displayName || ownerFn.name || null;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return describeComponentFrame(name, source, ownerName);
|
|
155
180
|
}
|
|
181
|
+
function describeClassComponentFrame(ctor, source, ownerFn) {
|
|
182
|
+
return describeFunctionComponentFrame(ctor, source, ownerFn);
|
|
183
|
+
}
|
|
184
|
+
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
|
185
|
+
if (!fn) {
|
|
186
|
+
return '';
|
|
187
|
+
}
|
|
156
188
|
|
|
157
|
-
|
|
158
|
-
|
|
189
|
+
var name = fn.displayName || fn.name || null;
|
|
190
|
+
var ownerName = null;
|
|
191
|
+
|
|
192
|
+
if ( ownerFn) {
|
|
193
|
+
ownerName = ownerFn.displayName || ownerFn.name || null;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return describeComponentFrame(name, source, ownerName);
|
|
159
197
|
}
|
|
160
198
|
|
|
161
|
-
function
|
|
199
|
+
function shouldConstruct(Component) {
|
|
200
|
+
var prototype = Component.prototype;
|
|
201
|
+
return !!(prototype && prototype.isReactComponent);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
|
205
|
+
|
|
162
206
|
if (type == null) {
|
|
163
|
-
|
|
164
|
-
return null;
|
|
207
|
+
return '';
|
|
165
208
|
}
|
|
166
209
|
|
|
167
|
-
{
|
|
168
|
-
if (
|
|
169
|
-
|
|
210
|
+
if (typeof type === 'function') {
|
|
211
|
+
if (shouldConstruct(type)) {
|
|
212
|
+
return describeClassComponentFrame(type, source, ownerFn);
|
|
170
213
|
}
|
|
171
|
-
}
|
|
172
214
|
|
|
173
|
-
|
|
174
|
-
return type.displayName || type.name || null;
|
|
215
|
+
return describeFunctionComponentFrame(type, source, ownerFn);
|
|
175
216
|
}
|
|
176
217
|
|
|
177
218
|
if (typeof type === 'string') {
|
|
178
|
-
return type;
|
|
219
|
+
return describeBuiltInComponentFrame(type, source, ownerFn);
|
|
179
220
|
}
|
|
180
221
|
|
|
181
222
|
switch (type) {
|
|
182
|
-
case
|
|
183
|
-
return '
|
|
184
|
-
|
|
185
|
-
case REACT_PORTAL_TYPE:
|
|
186
|
-
return 'Portal';
|
|
187
|
-
|
|
188
|
-
case REACT_PROFILER_TYPE:
|
|
189
|
-
return "Profiler";
|
|
190
|
-
|
|
191
|
-
case REACT_STRICT_MODE_TYPE:
|
|
192
|
-
return 'StrictMode';
|
|
193
|
-
|
|
194
|
-
case REACT_SUSPENSE_TYPE:
|
|
195
|
-
return 'Suspense';
|
|
223
|
+
case exports.Suspense:
|
|
224
|
+
return describeBuiltInComponentFrame('Suspense', source, ownerFn);
|
|
196
225
|
|
|
197
|
-
case
|
|
198
|
-
return 'SuspenseList';
|
|
226
|
+
case exports.SuspenseList:
|
|
227
|
+
return describeBuiltInComponentFrame('SuspenseList', source, ownerFn);
|
|
199
228
|
}
|
|
200
229
|
|
|
201
230
|
if (typeof type === 'object') {
|
|
202
231
|
switch (type.$$typeof) {
|
|
203
|
-
case REACT_CONTEXT_TYPE:
|
|
204
|
-
var context = type;
|
|
205
|
-
return getContextName(context) + '.Consumer';
|
|
206
|
-
|
|
207
|
-
case REACT_PROVIDER_TYPE:
|
|
208
|
-
var provider = type;
|
|
209
|
-
return getContextName(provider._context) + '.Provider';
|
|
210
|
-
|
|
211
232
|
case REACT_FORWARD_REF_TYPE:
|
|
212
|
-
return
|
|
233
|
+
return describeFunctionComponentFrame(type.render, source, ownerFn);
|
|
213
234
|
|
|
214
235
|
case REACT_MEMO_TYPE:
|
|
215
|
-
|
|
236
|
+
// Memo may contain any component type so we recursively resolve it.
|
|
237
|
+
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
|
216
238
|
|
|
217
239
|
case REACT_BLOCK_TYPE:
|
|
218
|
-
return
|
|
240
|
+
return describeFunctionComponentFrame(type._render, source, ownerFn);
|
|
219
241
|
|
|
220
242
|
case REACT_LAZY_TYPE:
|
|
221
243
|
{
|
|
@@ -224,15 +246,14 @@
|
|
|
224
246
|
var init = lazyComponent._init;
|
|
225
247
|
|
|
226
248
|
try {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}
|
|
249
|
+
// Lazy may contain any component type so we recursively resolve it.
|
|
250
|
+
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
|
251
|
+
} catch (x) {}
|
|
231
252
|
}
|
|
232
253
|
}
|
|
233
254
|
}
|
|
234
255
|
|
|
235
|
-
return
|
|
256
|
+
return '';
|
|
236
257
|
}
|
|
237
258
|
|
|
238
259
|
var ReactDebugCurrentFrame = {};
|
|
@@ -257,9 +278,8 @@
|
|
|
257
278
|
var stack = ''; // Add an extra top frame while an element is being validated
|
|
258
279
|
|
|
259
280
|
if (currentlyValidatingElement) {
|
|
260
|
-
var name = getComponentName(currentlyValidatingElement.type);
|
|
261
281
|
var owner = currentlyValidatingElement._owner;
|
|
262
|
-
stack +=
|
|
282
|
+
stack += describeUnknownElementTypeFrameInDEV(currentlyValidatingElement.type, currentlyValidatingElement._source, owner ? owner.type : null);
|
|
263
283
|
} // Delegate to the injected renderer-specific implementation
|
|
264
284
|
|
|
265
285
|
|
|
@@ -589,6 +609,92 @@
|
|
|
589
609
|
return refObject;
|
|
590
610
|
}
|
|
591
611
|
|
|
612
|
+
function getWrappedName(outerType, innerType, wrapperName) {
|
|
613
|
+
var functionName = innerType.displayName || innerType.name || '';
|
|
614
|
+
return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
function getContextName(type) {
|
|
618
|
+
return type.displayName || 'Context';
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
function getComponentName(type) {
|
|
622
|
+
if (type == null) {
|
|
623
|
+
// Host root, text node or just invalid type.
|
|
624
|
+
return null;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
{
|
|
628
|
+
if (typeof type.tag === 'number') {
|
|
629
|
+
error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
if (typeof type === 'function') {
|
|
634
|
+
return type.displayName || type.name || null;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
if (typeof type === 'string') {
|
|
638
|
+
return type;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
switch (type) {
|
|
642
|
+
case exports.Fragment:
|
|
643
|
+
return 'Fragment';
|
|
644
|
+
|
|
645
|
+
case REACT_PORTAL_TYPE:
|
|
646
|
+
return 'Portal';
|
|
647
|
+
|
|
648
|
+
case exports.Profiler:
|
|
649
|
+
return "Profiler";
|
|
650
|
+
|
|
651
|
+
case exports.StrictMode:
|
|
652
|
+
return 'StrictMode';
|
|
653
|
+
|
|
654
|
+
case exports.Suspense:
|
|
655
|
+
return 'Suspense';
|
|
656
|
+
|
|
657
|
+
case exports.SuspenseList:
|
|
658
|
+
return 'SuspenseList';
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
if (typeof type === 'object') {
|
|
662
|
+
switch (type.$$typeof) {
|
|
663
|
+
case REACT_CONTEXT_TYPE:
|
|
664
|
+
var context = type;
|
|
665
|
+
return getContextName(context) + '.Consumer';
|
|
666
|
+
|
|
667
|
+
case REACT_PROVIDER_TYPE:
|
|
668
|
+
var provider = type;
|
|
669
|
+
return getContextName(provider._context) + '.Provider';
|
|
670
|
+
|
|
671
|
+
case REACT_FORWARD_REF_TYPE:
|
|
672
|
+
return getWrappedName(type, type.render, 'ForwardRef');
|
|
673
|
+
|
|
674
|
+
case REACT_MEMO_TYPE:
|
|
675
|
+
return getComponentName(type.type);
|
|
676
|
+
|
|
677
|
+
case REACT_BLOCK_TYPE:
|
|
678
|
+
return getComponentName(type._render);
|
|
679
|
+
|
|
680
|
+
case REACT_LAZY_TYPE:
|
|
681
|
+
{
|
|
682
|
+
var lazyComponent = type;
|
|
683
|
+
var payload = lazyComponent._payload;
|
|
684
|
+
var init = lazyComponent._init;
|
|
685
|
+
|
|
686
|
+
try {
|
|
687
|
+
return getComponentName(init(payload));
|
|
688
|
+
} catch (x) {
|
|
689
|
+
return null;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
return null;
|
|
696
|
+
}
|
|
697
|
+
|
|
592
698
|
var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
593
699
|
var RESERVED_PROPS = {
|
|
594
700
|
key: true,
|
|
@@ -1068,7 +1174,7 @@
|
|
|
1068
1174
|
// Warn about using Maps as children
|
|
1069
1175
|
if (iteratorFn === iterableChildren.entries) {
|
|
1070
1176
|
if (!didWarnAboutMaps) {
|
|
1071
|
-
warn('Using Maps as children is
|
|
1177
|
+
warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
|
|
1072
1178
|
}
|
|
1073
1179
|
|
|
1074
1180
|
didWarnAboutMaps = true;
|
|
@@ -1304,9 +1410,9 @@
|
|
|
1304
1410
|
get: function () {
|
|
1305
1411
|
return context.displayName;
|
|
1306
1412
|
},
|
|
1307
|
-
set: function () {
|
|
1413
|
+
set: function (displayName) {
|
|
1308
1414
|
if (!hasWarnedAboutDisplayNameOnConsumer) {
|
|
1309
|
-
warn('Setting `displayName` on Context.Consumer has no effect. ' + "You should set it directly on the context with Context.displayName = '
|
|
1415
|
+
warn('Setting `displayName` on Context.Consumer has no effect. ' + "You should set it directly on the context with Context.displayName = '%s'.", displayName);
|
|
1310
1416
|
|
|
1311
1417
|
hasWarnedAboutDisplayNameOnConsumer = true;
|
|
1312
1418
|
}
|
|
@@ -1446,15 +1552,35 @@
|
|
|
1446
1552
|
}
|
|
1447
1553
|
}
|
|
1448
1554
|
|
|
1449
|
-
|
|
1555
|
+
var elementType = {
|
|
1450
1556
|
$$typeof: REACT_FORWARD_REF_TYPE,
|
|
1451
1557
|
render: render
|
|
1452
1558
|
};
|
|
1559
|
+
|
|
1560
|
+
{
|
|
1561
|
+
var ownName;
|
|
1562
|
+
Object.defineProperty(elementType, 'displayName', {
|
|
1563
|
+
enumerable: false,
|
|
1564
|
+
configurable: true,
|
|
1565
|
+
get: function () {
|
|
1566
|
+
return ownName;
|
|
1567
|
+
},
|
|
1568
|
+
set: function (name) {
|
|
1569
|
+
ownName = name;
|
|
1570
|
+
|
|
1571
|
+
if (render.displayName == null) {
|
|
1572
|
+
render.displayName = name;
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
});
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
return elementType;
|
|
1453
1579
|
}
|
|
1454
1580
|
|
|
1455
1581
|
function isValidElementType(type) {
|
|
1456
1582
|
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1457
|
-
type ===
|
|
1583
|
+
type === exports.Fragment || type === exports.Profiler || type === exports.StrictMode || type === exports.Suspense || type === exports.SuspenseList || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE);
|
|
1458
1584
|
}
|
|
1459
1585
|
|
|
1460
1586
|
function memo(type, compare) {
|
|
@@ -1464,11 +1590,31 @@
|
|
|
1464
1590
|
}
|
|
1465
1591
|
}
|
|
1466
1592
|
|
|
1467
|
-
|
|
1593
|
+
var elementType = {
|
|
1468
1594
|
$$typeof: REACT_MEMO_TYPE,
|
|
1469
1595
|
type: type,
|
|
1470
1596
|
compare: compare === undefined ? null : compare
|
|
1471
1597
|
};
|
|
1598
|
+
|
|
1599
|
+
{
|
|
1600
|
+
var ownName;
|
|
1601
|
+
Object.defineProperty(elementType, 'displayName', {
|
|
1602
|
+
enumerable: false,
|
|
1603
|
+
configurable: true,
|
|
1604
|
+
get: function () {
|
|
1605
|
+
return ownName;
|
|
1606
|
+
},
|
|
1607
|
+
set: function (name) {
|
|
1608
|
+
ownName = name;
|
|
1609
|
+
|
|
1610
|
+
if (type.displayName == null) {
|
|
1611
|
+
type.displayName = name;
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
});
|
|
1615
|
+
}
|
|
1616
|
+
|
|
1617
|
+
return elementType;
|
|
1472
1618
|
}
|
|
1473
1619
|
|
|
1474
1620
|
function lazyInitializer$1(payload) {
|
|
@@ -1615,6 +1761,10 @@
|
|
|
1615
1761
|
var dispatcher = resolveDispatcher();
|
|
1616
1762
|
return dispatcher.useDeferredValue(value, config);
|
|
1617
1763
|
}
|
|
1764
|
+
function useOpaqueIdentifier() {
|
|
1765
|
+
var dispatcher = resolveDispatcher();
|
|
1766
|
+
return dispatcher.useOpaqueIdentifier();
|
|
1767
|
+
}
|
|
1618
1768
|
function useMutableSource(source, getSnapshot, subscribe) {
|
|
1619
1769
|
var dispatcher = resolveDispatcher();
|
|
1620
1770
|
return dispatcher.useMutableSource(source, getSnapshot, subscribe);
|
|
@@ -1949,7 +2099,7 @@
|
|
|
1949
2099
|
}
|
|
1950
2100
|
}
|
|
1951
2101
|
|
|
1952
|
-
if (type ===
|
|
2102
|
+
if (type === exports.Fragment) {
|
|
1953
2103
|
validateFragmentProps(element);
|
|
1954
2104
|
} else {
|
|
1955
2105
|
validatePropTypes(element);
|
|
@@ -3254,12 +3404,7 @@
|
|
|
3254
3404
|
|
|
3255
3405
|
exports.Children = Children;
|
|
3256
3406
|
exports.Component = Component;
|
|
3257
|
-
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
3258
|
-
exports.Profiler = REACT_PROFILER_TYPE;
|
|
3259
3407
|
exports.PureComponent = PureComponent;
|
|
3260
|
-
exports.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
3261
|
-
exports.Suspense = REACT_SUSPENSE_TYPE;
|
|
3262
|
-
exports.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
|
3263
3408
|
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals$1;
|
|
3264
3409
|
exports.block = block;
|
|
3265
3410
|
exports.cloneElement = cloneElement$1;
|
|
@@ -3272,6 +3417,7 @@
|
|
|
3272
3417
|
exports.isValidElement = isValidElement;
|
|
3273
3418
|
exports.lazy = lazy;
|
|
3274
3419
|
exports.memo = memo;
|
|
3420
|
+
exports.unstable_useOpaqueIdentifier = useOpaqueIdentifier;
|
|
3275
3421
|
exports.unstable_withSuspenseConfig = withSuspenseConfig;
|
|
3276
3422
|
exports.useCallback = useCallback;
|
|
3277
3423
|
exports.useContext = useContext;
|