react 16.14.0 → 17.0.0-rc.3
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 +5 -5
- package/cjs/react-jsx-dev-runtime.development.js +374 -60
- package/cjs/react-jsx-dev-runtime.production.min.js +2 -2
- package/cjs/react-jsx-dev-runtime.profiling.min.js +9 -0
- package/cjs/react-jsx-runtime.development.js +371 -61
- package/cjs/react-jsx-runtime.production.min.js +2 -2
- package/cjs/react-jsx-runtime.profiling.min.js +10 -0
- package/cjs/react.development.js +813 -392
- package/cjs/react.production.min.js +16 -18
- package/package.json +21 -26
- package/umd/react.development.js +865 -628
- package/umd/react.production.min.js +24 -25
- package/umd/react.profiling.min.js +31 -32
- package/cjs/.DS_Store +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React
|
|
1
|
+
/** @license React v17.0.0-rc.3
|
|
2
2
|
* react-jsx-dev-runtime.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
'use strict';require("react");exports.Fragment=60107;if("function"===typeof Symbol&&Symbol.for){var a=Symbol.for;exports.Fragment=a("react.fragment")}exports.jsxDEV=void 0;
|
|
9
|
+
'use strict';require("object-assign");require("react");exports.Fragment=60107;if("function"===typeof Symbol&&Symbol.for){var a=Symbol.for;exports.Fragment=a("react.fragment")}exports.jsxDEV=void 0;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** @license React v17.0.0-rc.3
|
|
2
|
+
* react-jsx-dev-runtime.profiling.min.js
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
'use strict';require("object-assign");require("react");exports.Fragment=60107;if("function"===typeof Symbol&&Symbol.for){var a=Symbol.for;exports.Fragment=a("react.fragment")}exports.jsxDEV=void 0;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React
|
|
1
|
+
/** @license React v17.0.0-rc.3
|
|
2
2
|
* react-jsx-runtime.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -14,6 +14,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
14
14
|
'use strict';
|
|
15
15
|
|
|
16
16
|
var React = require('react');
|
|
17
|
+
var _assign = require('object-assign');
|
|
17
18
|
|
|
18
19
|
// ATTENTION
|
|
19
20
|
// When adding new symbols to this file,
|
|
@@ -98,15 +99,7 @@ function printWarning(level, format, args) {
|
|
|
98
99
|
// update consoleWithStackDev.www.js as well.
|
|
99
100
|
{
|
|
100
101
|
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
101
|
-
var stack =
|
|
102
|
-
|
|
103
|
-
if (currentlyValidatingElement) {
|
|
104
|
-
var name = getComponentName(currentlyValidatingElement.type);
|
|
105
|
-
var owner = currentlyValidatingElement._owner;
|
|
106
|
-
stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
stack += ReactDebugCurrentFrame.getStackAddendum();
|
|
102
|
+
var stack = ReactDebugCurrentFrame.getStackAddendum();
|
|
110
103
|
|
|
111
104
|
if (stack !== '') {
|
|
112
105
|
format += '%s';
|
|
@@ -148,50 +141,15 @@ function isValidElementType(type) {
|
|
|
148
141
|
return false;
|
|
149
142
|
}
|
|
150
143
|
|
|
151
|
-
|
|
152
|
-
var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
|
|
153
|
-
function describeComponentFrame (name, source, ownerName) {
|
|
154
|
-
var sourceInfo = '';
|
|
155
|
-
|
|
156
|
-
if (source) {
|
|
157
|
-
var path = source.fileName;
|
|
158
|
-
var fileName = path.replace(BEFORE_SLASH_RE, '');
|
|
159
|
-
|
|
160
|
-
{
|
|
161
|
-
// In DEV, include code for a common special case:
|
|
162
|
-
// prefer "folder/index.js" instead of just "index.js".
|
|
163
|
-
if (/^index\./.test(fileName)) {
|
|
164
|
-
var match = path.match(BEFORE_SLASH_RE);
|
|
165
|
-
|
|
166
|
-
if (match) {
|
|
167
|
-
var pathBeforeSlash = match[1];
|
|
168
|
-
|
|
169
|
-
if (pathBeforeSlash) {
|
|
170
|
-
var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
|
|
171
|
-
fileName = folderName + '/' + fileName;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
|
|
178
|
-
} else if (ownerName) {
|
|
179
|
-
sourceInfo = ' (created by ' + ownerName + ')';
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
return '\n in ' + (name || 'Unknown') + sourceInfo;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
var Resolved = 1;
|
|
186
|
-
function refineResolvedLazyComponent(lazyComponent) {
|
|
187
|
-
return lazyComponent._status === Resolved ? lazyComponent._result : null;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
144
|
function getWrappedName(outerType, innerType, wrapperName) {
|
|
191
145
|
var functionName = innerType.displayName || innerType.name || '';
|
|
192
146
|
return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
|
|
193
147
|
}
|
|
194
148
|
|
|
149
|
+
function getContextName(type) {
|
|
150
|
+
return type.displayName || 'Context';
|
|
151
|
+
}
|
|
152
|
+
|
|
195
153
|
function getComponentName(type) {
|
|
196
154
|
if (type == null) {
|
|
197
155
|
// Host root, text node or just invalid type.
|
|
@@ -220,7 +178,7 @@ function getComponentName(type) {
|
|
|
220
178
|
return 'Portal';
|
|
221
179
|
|
|
222
180
|
case REACT_PROFILER_TYPE:
|
|
223
|
-
return
|
|
181
|
+
return 'Profiler';
|
|
224
182
|
|
|
225
183
|
case REACT_STRICT_MODE_TYPE:
|
|
226
184
|
return 'StrictMode';
|
|
@@ -235,10 +193,12 @@ function getComponentName(type) {
|
|
|
235
193
|
if (typeof type === 'object') {
|
|
236
194
|
switch (type.$$typeof) {
|
|
237
195
|
case REACT_CONTEXT_TYPE:
|
|
238
|
-
|
|
196
|
+
var context = type;
|
|
197
|
+
return getContextName(context) + '.Consumer';
|
|
239
198
|
|
|
240
199
|
case REACT_PROVIDER_TYPE:
|
|
241
|
-
|
|
200
|
+
var provider = type;
|
|
201
|
+
return getContextName(provider._context) + '.Provider';
|
|
242
202
|
|
|
243
203
|
case REACT_FORWARD_REF_TYPE:
|
|
244
204
|
return getWrappedName(type, type.render, 'ForwardRef');
|
|
@@ -247,32 +207,374 @@ function getComponentName(type) {
|
|
|
247
207
|
return getComponentName(type.type);
|
|
248
208
|
|
|
249
209
|
case REACT_BLOCK_TYPE:
|
|
250
|
-
return getComponentName(type.
|
|
210
|
+
return getComponentName(type._render);
|
|
251
211
|
|
|
252
212
|
case REACT_LAZY_TYPE:
|
|
253
213
|
{
|
|
254
|
-
var
|
|
255
|
-
var
|
|
214
|
+
var lazyComponent = type;
|
|
215
|
+
var payload = lazyComponent._payload;
|
|
216
|
+
var init = lazyComponent._init;
|
|
217
|
+
|
|
218
|
+
try {
|
|
219
|
+
return getComponentName(init(payload));
|
|
220
|
+
} catch (x) {
|
|
221
|
+
return null;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
return null;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// Helpers to patch console.logs to avoid logging during side-effect free
|
|
231
|
+
// replaying on render function. This currently only patches the object
|
|
232
|
+
// lazily which won't cover if the log function was extracted eagerly.
|
|
233
|
+
// We could also eagerly patch the method.
|
|
234
|
+
var disabledDepth = 0;
|
|
235
|
+
var prevLog;
|
|
236
|
+
var prevInfo;
|
|
237
|
+
var prevWarn;
|
|
238
|
+
var prevError;
|
|
239
|
+
var prevGroup;
|
|
240
|
+
var prevGroupCollapsed;
|
|
241
|
+
var prevGroupEnd;
|
|
242
|
+
|
|
243
|
+
function disabledLog() {}
|
|
244
|
+
|
|
245
|
+
disabledLog.__reactDisabledLog = true;
|
|
246
|
+
function disableLogs() {
|
|
247
|
+
{
|
|
248
|
+
if (disabledDepth === 0) {
|
|
249
|
+
/* eslint-disable react-internal/no-production-logging */
|
|
250
|
+
prevLog = console.log;
|
|
251
|
+
prevInfo = console.info;
|
|
252
|
+
prevWarn = console.warn;
|
|
253
|
+
prevError = console.error;
|
|
254
|
+
prevGroup = console.group;
|
|
255
|
+
prevGroupCollapsed = console.groupCollapsed;
|
|
256
|
+
prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
|
|
257
|
+
|
|
258
|
+
var props = {
|
|
259
|
+
configurable: true,
|
|
260
|
+
enumerable: true,
|
|
261
|
+
value: disabledLog,
|
|
262
|
+
writable: true
|
|
263
|
+
}; // $FlowFixMe Flow thinks console is immutable.
|
|
264
|
+
|
|
265
|
+
Object.defineProperties(console, {
|
|
266
|
+
info: props,
|
|
267
|
+
log: props,
|
|
268
|
+
warn: props,
|
|
269
|
+
error: props,
|
|
270
|
+
group: props,
|
|
271
|
+
groupCollapsed: props,
|
|
272
|
+
groupEnd: props
|
|
273
|
+
});
|
|
274
|
+
/* eslint-enable react-internal/no-production-logging */
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
disabledDepth++;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
function reenableLogs() {
|
|
281
|
+
{
|
|
282
|
+
disabledDepth--;
|
|
283
|
+
|
|
284
|
+
if (disabledDepth === 0) {
|
|
285
|
+
/* eslint-disable react-internal/no-production-logging */
|
|
286
|
+
var props = {
|
|
287
|
+
configurable: true,
|
|
288
|
+
enumerable: true,
|
|
289
|
+
writable: true
|
|
290
|
+
}; // $FlowFixMe Flow thinks console is immutable.
|
|
291
|
+
|
|
292
|
+
Object.defineProperties(console, {
|
|
293
|
+
log: _assign({}, props, {
|
|
294
|
+
value: prevLog
|
|
295
|
+
}),
|
|
296
|
+
info: _assign({}, props, {
|
|
297
|
+
value: prevInfo
|
|
298
|
+
}),
|
|
299
|
+
warn: _assign({}, props, {
|
|
300
|
+
value: prevWarn
|
|
301
|
+
}),
|
|
302
|
+
error: _assign({}, props, {
|
|
303
|
+
value: prevError
|
|
304
|
+
}),
|
|
305
|
+
group: _assign({}, props, {
|
|
306
|
+
value: prevGroup
|
|
307
|
+
}),
|
|
308
|
+
groupCollapsed: _assign({}, props, {
|
|
309
|
+
value: prevGroupCollapsed
|
|
310
|
+
}),
|
|
311
|
+
groupEnd: _assign({}, props, {
|
|
312
|
+
value: prevGroupEnd
|
|
313
|
+
})
|
|
314
|
+
});
|
|
315
|
+
/* eslint-enable react-internal/no-production-logging */
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
if (disabledDepth < 0) {
|
|
319
|
+
error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
|
|
325
|
+
var prefix;
|
|
326
|
+
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
|
327
|
+
{
|
|
328
|
+
if (prefix === undefined) {
|
|
329
|
+
// Extract the VM specific prefix used by each line.
|
|
330
|
+
try {
|
|
331
|
+
throw Error();
|
|
332
|
+
} catch (x) {
|
|
333
|
+
var match = x.stack.trim().match(/\n( *(at )?)/);
|
|
334
|
+
prefix = match && match[1] || '';
|
|
335
|
+
}
|
|
336
|
+
} // We use the prefix to ensure our stacks line up with native stack frames.
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
return '\n' + prefix + name;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
var reentry = false;
|
|
343
|
+
var componentFrameCache;
|
|
344
|
+
|
|
345
|
+
{
|
|
346
|
+
var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
|
|
347
|
+
componentFrameCache = new PossiblyWeakMap();
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
function describeNativeComponentFrame(fn, construct) {
|
|
351
|
+
// If something asked for a stack inside a fake render, it should get ignored.
|
|
352
|
+
if (!fn || reentry) {
|
|
353
|
+
return '';
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
{
|
|
357
|
+
var frame = componentFrameCache.get(fn);
|
|
358
|
+
|
|
359
|
+
if (frame !== undefined) {
|
|
360
|
+
return frame;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
var control;
|
|
365
|
+
reentry = true;
|
|
366
|
+
var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
|
|
367
|
+
|
|
368
|
+
Error.prepareStackTrace = undefined;
|
|
369
|
+
var previousDispatcher;
|
|
370
|
+
|
|
371
|
+
{
|
|
372
|
+
previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
|
|
373
|
+
// for warnings.
|
|
374
|
+
|
|
375
|
+
ReactCurrentDispatcher.current = null;
|
|
376
|
+
disableLogs();
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
try {
|
|
380
|
+
// This should throw.
|
|
381
|
+
if (construct) {
|
|
382
|
+
// Something should be setting the props in the constructor.
|
|
383
|
+
var Fake = function () {
|
|
384
|
+
throw Error();
|
|
385
|
+
}; // $FlowFixMe
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
Object.defineProperty(Fake.prototype, 'props', {
|
|
389
|
+
set: function () {
|
|
390
|
+
// We use a throwing setter instead of frozen or non-writable props
|
|
391
|
+
// because that won't throw in a non-strict mode function.
|
|
392
|
+
throw Error();
|
|
393
|
+
}
|
|
394
|
+
});
|
|
395
|
+
|
|
396
|
+
if (typeof Reflect === 'object' && Reflect.construct) {
|
|
397
|
+
// We construct a different control for this case to include any extra
|
|
398
|
+
// frames added by the construct call.
|
|
399
|
+
try {
|
|
400
|
+
Reflect.construct(Fake, []);
|
|
401
|
+
} catch (x) {
|
|
402
|
+
control = x;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
Reflect.construct(fn, [], Fake);
|
|
406
|
+
} else {
|
|
407
|
+
try {
|
|
408
|
+
Fake.call();
|
|
409
|
+
} catch (x) {
|
|
410
|
+
control = x;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
fn.call(Fake.prototype);
|
|
414
|
+
}
|
|
415
|
+
} else {
|
|
416
|
+
try {
|
|
417
|
+
throw Error();
|
|
418
|
+
} catch (x) {
|
|
419
|
+
control = x;
|
|
420
|
+
}
|
|
256
421
|
|
|
257
|
-
|
|
258
|
-
|
|
422
|
+
fn();
|
|
423
|
+
}
|
|
424
|
+
} catch (sample) {
|
|
425
|
+
// This is inlined manually because closure doesn't do it for us.
|
|
426
|
+
if (sample && control && typeof sample.stack === 'string') {
|
|
427
|
+
// This extracts the first frame from the sample that isn't also in the control.
|
|
428
|
+
// Skipping one frame that we assume is the frame that calls the two.
|
|
429
|
+
var sampleLines = sample.stack.split('\n');
|
|
430
|
+
var controlLines = control.stack.split('\n');
|
|
431
|
+
var s = sampleLines.length - 1;
|
|
432
|
+
var c = controlLines.length - 1;
|
|
433
|
+
|
|
434
|
+
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
|
435
|
+
// We expect at least one stack frame to be shared.
|
|
436
|
+
// Typically this will be the root most one. However, stack frames may be
|
|
437
|
+
// cut off due to maximum stack limits. In this case, one maybe cut off
|
|
438
|
+
// earlier than the other. We assume that the sample is longer or the same
|
|
439
|
+
// and there for cut off earlier. So we should find the root most frame in
|
|
440
|
+
// the sample somewhere in the control.
|
|
441
|
+
c--;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
for (; s >= 1 && c >= 0; s--, c--) {
|
|
445
|
+
// Next we find the first one that isn't the same which should be the
|
|
446
|
+
// frame that called our sample function and the control.
|
|
447
|
+
if (sampleLines[s] !== controlLines[c]) {
|
|
448
|
+
// In V8, the first line is describing the message but other VMs don't.
|
|
449
|
+
// If we're about to return the first line, and the control is also on the same
|
|
450
|
+
// line, that's a pretty good indicator that our sample threw at same line as
|
|
451
|
+
// the control. I.e. before we entered the sample frame. So we ignore this result.
|
|
452
|
+
// This can happen if you passed a class to function component, or non-function.
|
|
453
|
+
if (s !== 1 || c !== 1) {
|
|
454
|
+
do {
|
|
455
|
+
s--;
|
|
456
|
+
c--; // We may still have similar intermediate frames from the construct call.
|
|
457
|
+
// The next one that isn't the same should be our match though.
|
|
458
|
+
|
|
459
|
+
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
|
460
|
+
// V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
|
|
461
|
+
var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
|
|
462
|
+
|
|
463
|
+
{
|
|
464
|
+
if (typeof fn === 'function') {
|
|
465
|
+
componentFrameCache.set(fn, _frame);
|
|
466
|
+
}
|
|
467
|
+
} // Return the line we found.
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
return _frame;
|
|
471
|
+
}
|
|
472
|
+
} while (s >= 1 && c >= 0);
|
|
259
473
|
}
|
|
260
474
|
|
|
261
475
|
break;
|
|
262
476
|
}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
} finally {
|
|
480
|
+
reentry = false;
|
|
481
|
+
|
|
482
|
+
{
|
|
483
|
+
ReactCurrentDispatcher.current = previousDispatcher;
|
|
484
|
+
reenableLogs();
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
Error.prepareStackTrace = previousPrepareStackTrace;
|
|
488
|
+
} // Fallback to just using the name if we couldn't make it throw.
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
var name = fn ? fn.displayName || fn.name : '';
|
|
492
|
+
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
|
|
493
|
+
|
|
494
|
+
{
|
|
495
|
+
if (typeof fn === 'function') {
|
|
496
|
+
componentFrameCache.set(fn, syntheticFrame);
|
|
263
497
|
}
|
|
264
498
|
}
|
|
265
499
|
|
|
266
|
-
return
|
|
500
|
+
return syntheticFrame;
|
|
501
|
+
}
|
|
502
|
+
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
|
503
|
+
{
|
|
504
|
+
return describeNativeComponentFrame(fn, false);
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
function shouldConstruct(Component) {
|
|
509
|
+
var prototype = Component.prototype;
|
|
510
|
+
return !!(prototype && prototype.isReactComponent);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
|
514
|
+
|
|
515
|
+
if (type == null) {
|
|
516
|
+
return '';
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
if (typeof type === 'function') {
|
|
520
|
+
{
|
|
521
|
+
return describeNativeComponentFrame(type, shouldConstruct(type));
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
if (typeof type === 'string') {
|
|
526
|
+
return describeBuiltInComponentFrame(type);
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
switch (type) {
|
|
530
|
+
case REACT_SUSPENSE_TYPE:
|
|
531
|
+
return describeBuiltInComponentFrame('Suspense');
|
|
532
|
+
|
|
533
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
534
|
+
return describeBuiltInComponentFrame('SuspenseList');
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
if (typeof type === 'object') {
|
|
538
|
+
switch (type.$$typeof) {
|
|
539
|
+
case REACT_FORWARD_REF_TYPE:
|
|
540
|
+
return describeFunctionComponentFrame(type.render);
|
|
541
|
+
|
|
542
|
+
case REACT_MEMO_TYPE:
|
|
543
|
+
// Memo may contain any component type so we recursively resolve it.
|
|
544
|
+
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
|
545
|
+
|
|
546
|
+
case REACT_BLOCK_TYPE:
|
|
547
|
+
return describeFunctionComponentFrame(type._render);
|
|
548
|
+
|
|
549
|
+
case REACT_LAZY_TYPE:
|
|
550
|
+
{
|
|
551
|
+
var lazyComponent = type;
|
|
552
|
+
var payload = lazyComponent._payload;
|
|
553
|
+
var init = lazyComponent._init;
|
|
554
|
+
|
|
555
|
+
try {
|
|
556
|
+
// Lazy may contain any component type so we recursively resolve it.
|
|
557
|
+
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
|
558
|
+
} catch (x) {}
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
return '';
|
|
267
564
|
}
|
|
268
565
|
|
|
269
566
|
var loggedTypeFailures = {};
|
|
270
567
|
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
271
|
-
var currentlyValidatingElement = null;
|
|
272
568
|
|
|
273
569
|
function setCurrentlyValidatingElement(element) {
|
|
274
570
|
{
|
|
275
|
-
|
|
571
|
+
if (element) {
|
|
572
|
+
var owner = element._owner;
|
|
573
|
+
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
574
|
+
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
|
575
|
+
} else {
|
|
576
|
+
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
|
577
|
+
}
|
|
276
578
|
}
|
|
277
579
|
}
|
|
278
580
|
|
|
@@ -563,7 +865,15 @@ var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
|
|
563
865
|
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
564
866
|
|
|
565
867
|
function setCurrentlyValidatingElement$1(element) {
|
|
566
|
-
|
|
868
|
+
{
|
|
869
|
+
if (element) {
|
|
870
|
+
var owner = element._owner;
|
|
871
|
+
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
872
|
+
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
|
873
|
+
} else {
|
|
874
|
+
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
|
875
|
+
}
|
|
876
|
+
}
|
|
567
877
|
}
|
|
568
878
|
|
|
569
879
|
var propTypesMisspellWarningShown;
|