react-dom 16.10.2 → 16.11.0
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-dom-server.browser.development.js +117 -170
- package/cjs/react-dom-server.browser.production.min.js +29 -29
- package/cjs/react-dom-server.node.development.js +111 -160
- package/cjs/react-dom-server.node.production.min.js +17 -17
- package/cjs/react-dom-test-utils.development.js +46 -84
- package/cjs/react-dom-test-utils.production.min.js +9 -9
- package/cjs/react-dom-unstable-fizz.browser.development.js +1 -1
- package/cjs/react-dom-unstable-fizz.browser.production.min.js +1 -1
- package/cjs/react-dom-unstable-fizz.node.development.js +1 -1
- package/cjs/react-dom-unstable-fizz.node.production.min.js +1 -1
- package/cjs/react-dom-unstable-native-dependencies.development.js +27 -47
- package/cjs/react-dom-unstable-native-dependencies.production.min.js +8 -8
- package/cjs/react-dom.development.js +1614 -1813
- package/cjs/react-dom.production.min.js +269 -272
- package/cjs/react-dom.profiling.min.js +252 -255
- package/package.json +2 -2
- package/umd/react-dom-server.browser.development.js +117 -170
- package/umd/react-dom-server.browser.production.min.js +36 -36
- package/umd/react-dom-test-utils.development.js +46 -84
- package/umd/react-dom-test-utils.production.min.js +9 -9
- package/umd/react-dom-unstable-fizz.browser.development.js +1 -1
- package/umd/react-dom-unstable-fizz.browser.production.min.js +1 -1
- package/umd/react-dom-unstable-native-dependencies.development.js +27 -47
- package/umd/react-dom-unstable-native-dependencies.production.min.js +10 -10
- package/umd/react-dom.development.js +1608 -1807
- package/umd/react-dom.production.min.js +229 -232
- package/umd/react-dom.profiling.min.js +237 -239
package/build-info.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"branch": "
|
|
3
|
-
"buildNumber": "
|
|
4
|
-
"checksum": "
|
|
5
|
-
"commit": "
|
|
2
|
+
"branch": "master",
|
|
3
|
+
"buildNumber": "54423",
|
|
4
|
+
"checksum": "3b849cc",
|
|
5
|
+
"commit": "5faf377df",
|
|
6
6
|
"environment": "ci",
|
|
7
|
-
"reactVersion": "16.10.
|
|
7
|
+
"reactVersion": "16.10.2-5faf377df"
|
|
8
8
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.
|
|
1
|
+
/** @license React v16.11.0
|
|
2
2
|
* react-dom-server.browser.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -20,20 +20,12 @@ var React = require('react');
|
|
|
20
20
|
var checkPropTypes = require('prop-types/checkPropTypes');
|
|
21
21
|
|
|
22
22
|
// Do not require this module directly! Use normal `invariant` calls with
|
|
23
|
-
// template literal strings. The messages will be
|
|
24
|
-
// build
|
|
25
|
-
|
|
26
|
-
// Do not require this module directly! Use normal `invariant` calls with
|
|
27
|
-
// template literal strings. The messages will be converted to ReactError during
|
|
28
|
-
// build, and in production they will be minified.
|
|
29
|
-
function ReactError(error) {
|
|
30
|
-
error.name = 'Invariant Violation';
|
|
31
|
-
return error;
|
|
32
|
-
}
|
|
23
|
+
// template literal strings. The messages will be replaced with error codes
|
|
24
|
+
// during build.
|
|
33
25
|
|
|
34
26
|
// TODO: this is special because it gets imported during build.
|
|
35
27
|
|
|
36
|
-
var ReactVersion = '16.
|
|
28
|
+
var ReactVersion = '16.11.0';
|
|
37
29
|
|
|
38
30
|
/**
|
|
39
31
|
* Use invariant() to assert state which your program assumes to be true.
|
|
@@ -380,10 +372,9 @@ var warnAboutDeprecatedLifecycles = true; // Gather advanced timing metrics for
|
|
|
380
372
|
|
|
381
373
|
// Trace which interactions trigger each commit.
|
|
382
374
|
|
|
383
|
-
//
|
|
384
|
-
|
|
385
|
-
var enableSuspenseServerRenderer = false; // TODO: true? Here it might just be false.
|
|
375
|
+
// SSR experiments
|
|
386
376
|
|
|
377
|
+
var enableSuspenseServerRenderer = false;
|
|
387
378
|
// Only used in www builds.
|
|
388
379
|
|
|
389
380
|
// Only used in www builds.
|
|
@@ -397,9 +388,6 @@ var disableJavaScriptURLs = false; // React Fire: prevent the value and checked
|
|
|
397
388
|
// Control this behavior with a flag to support 16.6 minor releases in the meanwhile.
|
|
398
389
|
|
|
399
390
|
|
|
400
|
-
// See https://github.com/react-native-community/discussions-and-proposals/issues/72 for more information
|
|
401
|
-
// This is a flag so we can fix warnings in RN core before turning it on
|
|
402
|
-
|
|
403
391
|
// Experimental React Flare event system and event components support.
|
|
404
392
|
|
|
405
393
|
var enableFlareAPI = false; // Experimental Host Component support.
|
|
@@ -414,10 +402,6 @@ var enableScopeAPI = false; // New API for JSX transforms to target - https://gi
|
|
|
414
402
|
// For tests, we flush suspense fallbacks in an act scope;
|
|
415
403
|
// *except* in some of our own tests, where we test incremental loading states.
|
|
416
404
|
|
|
417
|
-
// Changes priority of some events like mousemove to user-blocking priority,
|
|
418
|
-
// but without making them discrete. The flag exists in case it causes
|
|
419
|
-
// starvation problems.
|
|
420
|
-
|
|
421
405
|
// Add a callback property to suspense to notify which promises are currently
|
|
422
406
|
// in the update queue. This allows reporting and tracing of what is causing
|
|
423
407
|
// the user to see a loading state.
|
|
@@ -575,13 +559,11 @@ function growThreadCountAndReturnNextAvailable() {
|
|
|
575
559
|
var oldSize = oldArray.length;
|
|
576
560
|
var newSize = oldSize * 2;
|
|
577
561
|
|
|
578
|
-
(
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
throw ReactError(Error("Maximum number of concurrent React renderers exceeded. This can happen if you are not properly destroying the Readable provided by React. Ensure that you call .destroy() on it if you no longer want to read from it, and did not read to the end. If you use .pipe() this should be automatic."));
|
|
582
|
-
}
|
|
562
|
+
if (!(newSize <= 0x10000)) {
|
|
563
|
+
{
|
|
564
|
+
throw Error("Maximum number of concurrent React renderers exceeded. This can happen if you are not properly destroying the Readable provided by React. Ensure that you call .destroy() on it if you no longer want to read from it, and did not read to the end. If you use .pipe() this should be automatic.");
|
|
583
565
|
}
|
|
584
|
-
}
|
|
566
|
+
}
|
|
585
567
|
|
|
586
568
|
var newArray = new Uint16Array(newSize);
|
|
587
569
|
newArray.set(oldArray);
|
|
@@ -917,13 +899,11 @@ var didWarn = false;
|
|
|
917
899
|
|
|
918
900
|
function sanitizeURL(url) {
|
|
919
901
|
if (disableJavaScriptURLs) {
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
throw ReactError(Error("React has blocked a javascript: URL as a security precaution." + (ReactDebugCurrentFrame$2.getStackAddendum())));
|
|
924
|
-
}
|
|
902
|
+
if (!!isJavaScriptProtocol.test(url)) {
|
|
903
|
+
{
|
|
904
|
+
throw Error("React has blocked a javascript: URL as a security precaution." + (ReactDebugCurrentFrame$2.getStackAddendum()));
|
|
925
905
|
}
|
|
926
|
-
}
|
|
906
|
+
}
|
|
927
907
|
} else if (true && !didWarn && isJavaScriptProtocol.test(url)) {
|
|
928
908
|
didWarn = true;
|
|
929
909
|
warning$1(false, 'A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));
|
|
@@ -1129,13 +1109,11 @@ var isInHookUserCodeInDev = false; // In DEV, this is the name of the currently
|
|
|
1129
1109
|
var currentHookNameInDev;
|
|
1130
1110
|
|
|
1131
1111
|
function resolveCurrentlyRenderingComponent() {
|
|
1132
|
-
(
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
throw ReactError(Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem."));
|
|
1136
|
-
}
|
|
1112
|
+
if (!(currentlyRenderingComponent !== null)) {
|
|
1113
|
+
{
|
|
1114
|
+
throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.");
|
|
1137
1115
|
}
|
|
1138
|
-
}
|
|
1116
|
+
}
|
|
1139
1117
|
|
|
1140
1118
|
{
|
|
1141
1119
|
!!isInHookUserCodeInDev ? warning$1(false, 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://fb.me/rules-of-hooks') : void 0;
|
|
@@ -1174,13 +1152,11 @@ function areHookInputsEqual(nextDeps, prevDeps) {
|
|
|
1174
1152
|
|
|
1175
1153
|
function createHook() {
|
|
1176
1154
|
if (numberOfReRenders > 0) {
|
|
1177
|
-
|
|
1155
|
+
{
|
|
1178
1156
|
{
|
|
1179
|
-
|
|
1180
|
-
throw ReactError(Error("Rendered more hooks than during the previous render"));
|
|
1181
|
-
}
|
|
1157
|
+
throw Error("Rendered more hooks than during the previous render");
|
|
1182
1158
|
}
|
|
1183
|
-
}
|
|
1159
|
+
}
|
|
1184
1160
|
}
|
|
1185
1161
|
|
|
1186
1162
|
return {
|
|
@@ -1442,13 +1418,11 @@ function useLayoutEffect(create, inputs) {
|
|
|
1442
1418
|
}
|
|
1443
1419
|
|
|
1444
1420
|
function dispatchAction(componentIdentity, queue, action) {
|
|
1445
|
-
(
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
throw ReactError(Error("Too many re-renders. React limits the number of renders to prevent an infinite loop."));
|
|
1449
|
-
}
|
|
1421
|
+
if (!(numberOfReRenders < RE_RENDER_LIMIT)) {
|
|
1422
|
+
{
|
|
1423
|
+
throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");
|
|
1450
1424
|
}
|
|
1451
|
-
}
|
|
1425
|
+
}
|
|
1452
1426
|
|
|
1453
1427
|
if (componentIdentity === currentlyRenderingComponent) {
|
|
1454
1428
|
// This is a render phase update. Stash it in a lazily-created map of
|
|
@@ -1496,6 +1470,21 @@ function useResponder(responder, props) {
|
|
|
1496
1470
|
};
|
|
1497
1471
|
}
|
|
1498
1472
|
|
|
1473
|
+
function useDeferredValue(value, config) {
|
|
1474
|
+
resolveCurrentlyRenderingComponent();
|
|
1475
|
+
return value;
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1478
|
+
function useTransition(config) {
|
|
1479
|
+
resolveCurrentlyRenderingComponent();
|
|
1480
|
+
|
|
1481
|
+
var startTransition = function (callback) {
|
|
1482
|
+
callback();
|
|
1483
|
+
};
|
|
1484
|
+
|
|
1485
|
+
return [startTransition, false];
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1499
1488
|
function noop() {}
|
|
1500
1489
|
|
|
1501
1490
|
var currentThreadID = 0;
|
|
@@ -1517,7 +1506,9 @@ var Dispatcher = {
|
|
|
1517
1506
|
useEffect: noop,
|
|
1518
1507
|
// Debugging effect
|
|
1519
1508
|
useDebugValue: noop,
|
|
1520
|
-
useResponder: useResponder
|
|
1509
|
+
useResponder: useResponder,
|
|
1510
|
+
useDeferredValue: useDeferredValue,
|
|
1511
|
+
useTransition: useTransition
|
|
1521
1512
|
};
|
|
1522
1513
|
|
|
1523
1514
|
var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
|
|
@@ -1641,44 +1632,36 @@ function assertValidProps(tag, props) {
|
|
|
1641
1632
|
|
|
1642
1633
|
|
|
1643
1634
|
if (voidElementTags[tag]) {
|
|
1644
|
-
(
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
throw ReactError(Error(tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." + (ReactDebugCurrentFrame$4.getStackAddendum())));
|
|
1648
|
-
}
|
|
1635
|
+
if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
|
|
1636
|
+
{
|
|
1637
|
+
throw Error(tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." + (ReactDebugCurrentFrame$4.getStackAddendum()));
|
|
1649
1638
|
}
|
|
1650
|
-
}
|
|
1639
|
+
}
|
|
1651
1640
|
}
|
|
1652
1641
|
|
|
1653
1642
|
if (props.dangerouslySetInnerHTML != null) {
|
|
1654
|
-
(
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
throw ReactError(Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`."));
|
|
1658
|
-
}
|
|
1643
|
+
if (!(props.children == null)) {
|
|
1644
|
+
{
|
|
1645
|
+
throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");
|
|
1659
1646
|
}
|
|
1660
|
-
}
|
|
1647
|
+
}
|
|
1661
1648
|
|
|
1662
|
-
(
|
|
1663
|
-
|
|
1664
|
-
{
|
|
1665
|
-
throw ReactError(Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information."));
|
|
1666
|
-
}
|
|
1649
|
+
if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
|
|
1650
|
+
{
|
|
1651
|
+
throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.");
|
|
1667
1652
|
}
|
|
1668
|
-
}
|
|
1653
|
+
}
|
|
1669
1654
|
}
|
|
1670
1655
|
|
|
1671
1656
|
{
|
|
1672
1657
|
!(props.suppressContentEditableWarning || !props.contentEditable || props.children == null) ? warning$1(false, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : void 0;
|
|
1673
1658
|
}
|
|
1674
1659
|
|
|
1675
|
-
(
|
|
1676
|
-
|
|
1677
|
-
{
|
|
1678
|
-
throw ReactError(Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." + (ReactDebugCurrentFrame$4.getStackAddendum())));
|
|
1679
|
-
}
|
|
1660
|
+
if (!(props.style == null || typeof props.style === 'object')) {
|
|
1661
|
+
{
|
|
1662
|
+
throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." + (ReactDebugCurrentFrame$4.getStackAddendum()));
|
|
1680
1663
|
}
|
|
1681
|
-
}
|
|
1664
|
+
}
|
|
1682
1665
|
}
|
|
1683
1666
|
|
|
1684
1667
|
/**
|
|
@@ -2923,13 +2906,11 @@ var validatedTagCache = {};
|
|
|
2923
2906
|
|
|
2924
2907
|
function validateDangerousTag(tag) {
|
|
2925
2908
|
if (!validatedTagCache.hasOwnProperty(tag)) {
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
throw ReactError(Error("Invalid tag: " + tag));
|
|
2930
|
-
}
|
|
2909
|
+
if (!VALID_TAG_REGEX.test(tag)) {
|
|
2910
|
+
{
|
|
2911
|
+
throw Error("Invalid tag: " + tag);
|
|
2931
2912
|
}
|
|
2932
|
-
}
|
|
2913
|
+
}
|
|
2933
2914
|
|
|
2934
2915
|
validatedTagCache[tag] = true;
|
|
2935
2916
|
}
|
|
@@ -3119,13 +3100,11 @@ function createOpenTagMarkup(tagVerbatim, tagLowercase, props, namespace, makeSt
|
|
|
3119
3100
|
|
|
3120
3101
|
function validateRenderResult(child, type) {
|
|
3121
3102
|
if (child === undefined) {
|
|
3122
|
-
|
|
3103
|
+
{
|
|
3123
3104
|
{
|
|
3124
|
-
|
|
3125
|
-
throw ReactError(Error((getComponentName(type) || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null."));
|
|
3126
|
-
}
|
|
3105
|
+
throw Error((getComponentName(type) || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.");
|
|
3127
3106
|
}
|
|
3128
|
-
}
|
|
3107
|
+
}
|
|
3129
3108
|
}
|
|
3130
3109
|
}
|
|
3131
3110
|
|
|
@@ -3341,13 +3320,11 @@ function resolve(child, context, threadID) {
|
|
|
3341
3320
|
childContext = inst.getChildContext();
|
|
3342
3321
|
|
|
3343
3322
|
for (var contextKey in childContext) {
|
|
3344
|
-
(
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
throw ReactError(Error((getComponentName(Component) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes."));
|
|
3348
|
-
}
|
|
3323
|
+
if (!(contextKey in _childContextTypes)) {
|
|
3324
|
+
{
|
|
3325
|
+
throw Error((getComponentName(Component) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes.");
|
|
3349
3326
|
}
|
|
3350
|
-
}
|
|
3327
|
+
}
|
|
3351
3328
|
}
|
|
3352
3329
|
} else {
|
|
3353
3330
|
warningWithoutStack$1(false, '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', getComponentName(Component) || 'Unknown');
|
|
@@ -3480,8 +3457,6 @@ function () {
|
|
|
3480
3457
|
};
|
|
3481
3458
|
|
|
3482
3459
|
_proto.read = function read(bytes) {
|
|
3483
|
-
var _this = this;
|
|
3484
|
-
|
|
3485
3460
|
if (this.exhausted) {
|
|
3486
3461
|
return null;
|
|
3487
3462
|
}
|
|
@@ -3529,13 +3504,11 @@ function () {
|
|
|
3529
3504
|
|
|
3530
3505
|
var fallbackFrame = frame.fallbackFrame;
|
|
3531
3506
|
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
throw ReactError(Error("ReactDOMServer did not find an internal fallback frame for Suspense. This is a bug in React. Please file an issue."));
|
|
3536
|
-
}
|
|
3507
|
+
if (!fallbackFrame) {
|
|
3508
|
+
{
|
|
3509
|
+
throw Error("ReactDOMServer did not find an internal fallback frame for Suspense. This is a bug in React. Please file an issue.");
|
|
3537
3510
|
}
|
|
3538
|
-
}
|
|
3511
|
+
}
|
|
3539
3512
|
|
|
3540
3513
|
this.stack.push(fallbackFrame);
|
|
3541
3514
|
out[this.suspenseDepth] += '<!--$!-->'; // Skip flushing output since we're switching to the fallback
|
|
@@ -3565,23 +3538,19 @@ function () {
|
|
|
3565
3538
|
} catch (err) {
|
|
3566
3539
|
if (err != null && typeof err.then === 'function') {
|
|
3567
3540
|
if (enableSuspenseServerRenderer) {
|
|
3568
|
-
(
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
throw ReactError(Error("A React component suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."));
|
|
3572
|
-
}
|
|
3541
|
+
if (!(this.suspenseDepth > 0)) {
|
|
3542
|
+
{
|
|
3543
|
+
throw Error("A React component suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.");
|
|
3573
3544
|
}
|
|
3574
|
-
}
|
|
3545
|
+
}
|
|
3575
3546
|
|
|
3576
3547
|
suspended = true;
|
|
3577
3548
|
} else {
|
|
3578
|
-
|
|
3549
|
+
{
|
|
3579
3550
|
{
|
|
3580
|
-
|
|
3581
|
-
throw ReactError(Error("ReactDOMServer does not yet support Suspense."));
|
|
3582
|
-
}
|
|
3551
|
+
throw Error("ReactDOMServer does not yet support Suspense.");
|
|
3583
3552
|
}
|
|
3584
|
-
}
|
|
3553
|
+
}
|
|
3585
3554
|
}
|
|
3586
3555
|
} else {
|
|
3587
3556
|
throw err;
|
|
@@ -3639,22 +3608,18 @@ function () {
|
|
|
3639
3608
|
// Catch unexpected special types early.
|
|
3640
3609
|
var $$typeof = nextChild.$$typeof;
|
|
3641
3610
|
|
|
3642
|
-
(
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
throw ReactError(Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render."));
|
|
3646
|
-
}
|
|
3611
|
+
if (!($$typeof !== REACT_PORTAL_TYPE)) {
|
|
3612
|
+
{
|
|
3613
|
+
throw Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.");
|
|
3647
3614
|
}
|
|
3648
|
-
}
|
|
3615
|
+
} // Catch-all to prevent an infinite loop if React.Children.toArray() supports some new type.
|
|
3649
3616
|
|
|
3650
3617
|
|
|
3651
|
-
|
|
3618
|
+
{
|
|
3652
3619
|
{
|
|
3653
|
-
|
|
3654
|
-
throw ReactError(Error("Unknown element-like object type: " + $$typeof.toString() + ". This is likely a bug in React. Please file an issue."));
|
|
3655
|
-
}
|
|
3620
|
+
throw Error("Unknown element-like object type: " + $$typeof.toString() + ". This is likely a bug in React. Please file an issue.");
|
|
3656
3621
|
}
|
|
3657
|
-
}
|
|
3622
|
+
}
|
|
3658
3623
|
}
|
|
3659
3624
|
|
|
3660
3625
|
var nextChildren = toArray(nextChild);
|
|
@@ -3766,13 +3731,11 @@ function () {
|
|
|
3766
3731
|
this.suspenseDepth++;
|
|
3767
3732
|
return '<!--$-->';
|
|
3768
3733
|
} else {
|
|
3769
|
-
|
|
3734
|
+
{
|
|
3770
3735
|
{
|
|
3771
|
-
|
|
3772
|
-
throw ReactError(Error("ReactDOMServer does not yet support Suspense."));
|
|
3773
|
-
}
|
|
3736
|
+
throw Error("ReactDOMServer does not yet support Suspense.");
|
|
3774
3737
|
}
|
|
3775
|
-
}
|
|
3738
|
+
}
|
|
3776
3739
|
}
|
|
3777
3740
|
}
|
|
3778
3741
|
// eslint-disable-next-line-no-fallthrough
|
|
@@ -3937,13 +3900,11 @@ function () {
|
|
|
3937
3900
|
return open;
|
|
3938
3901
|
}
|
|
3939
3902
|
|
|
3940
|
-
|
|
3903
|
+
{
|
|
3941
3904
|
{
|
|
3942
|
-
|
|
3943
|
-
throw ReactError(Error("ReactDOMServer does not yet support the fundamental API."));
|
|
3944
|
-
}
|
|
3905
|
+
throw Error("ReactDOMServer does not yet support the fundamental API.");
|
|
3945
3906
|
}
|
|
3946
|
-
}
|
|
3907
|
+
}
|
|
3947
3908
|
}
|
|
3948
3909
|
// eslint-disable-next-line-no-fallthrough
|
|
3949
3910
|
|
|
@@ -3984,13 +3945,11 @@ function () {
|
|
|
3984
3945
|
|
|
3985
3946
|
case Pending:
|
|
3986
3947
|
default:
|
|
3987
|
-
|
|
3948
|
+
{
|
|
3988
3949
|
{
|
|
3989
|
-
|
|
3990
|
-
throw ReactError(Error("ReactDOMServer does not yet support lazy-loaded components."));
|
|
3991
|
-
}
|
|
3950
|
+
throw Error("ReactDOMServer does not yet support lazy-loaded components.");
|
|
3992
3951
|
}
|
|
3993
|
-
}
|
|
3952
|
+
}
|
|
3994
3953
|
|
|
3995
3954
|
}
|
|
3996
3955
|
}
|
|
@@ -4018,13 +3977,11 @@ function () {
|
|
|
4018
3977
|
return '';
|
|
4019
3978
|
}
|
|
4020
3979
|
|
|
4021
|
-
|
|
3980
|
+
{
|
|
4022
3981
|
{
|
|
4023
|
-
|
|
4024
|
-
throw ReactError(Error("ReactDOMServer does not yet support scope components."));
|
|
4025
|
-
}
|
|
3982
|
+
throw Error("ReactDOMServer does not yet support scope components.");
|
|
4026
3983
|
}
|
|
4027
|
-
}
|
|
3984
|
+
}
|
|
4028
3985
|
}
|
|
4029
3986
|
}
|
|
4030
3987
|
}
|
|
@@ -4045,13 +4002,11 @@ function () {
|
|
|
4045
4002
|
}
|
|
4046
4003
|
}
|
|
4047
4004
|
|
|
4048
|
-
|
|
4005
|
+
{
|
|
4049
4006
|
{
|
|
4050
|
-
|
|
4051
|
-
throw ReactError(Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + (elementType == null ? elementType : typeof elementType) + "." + info));
|
|
4052
|
-
}
|
|
4007
|
+
throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + (elementType == null ? elementType : typeof elementType) + "." + info);
|
|
4053
4008
|
}
|
|
4054
|
-
}
|
|
4009
|
+
}
|
|
4055
4010
|
}
|
|
4056
4011
|
};
|
|
4057
4012
|
|
|
@@ -4119,22 +4074,18 @@ function () {
|
|
|
4119
4074
|
warning$1(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
|
|
4120
4075
|
}
|
|
4121
4076
|
|
|
4122
|
-
(
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
throw ReactError(Error("If you supply `defaultValue` on a <textarea>, do not pass children."));
|
|
4126
|
-
}
|
|
4077
|
+
if (!(defaultValue == null)) {
|
|
4078
|
+
{
|
|
4079
|
+
throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");
|
|
4127
4080
|
}
|
|
4128
|
-
}
|
|
4081
|
+
}
|
|
4129
4082
|
|
|
4130
4083
|
if (Array.isArray(textareaChildren)) {
|
|
4131
|
-
(
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
throw ReactError(Error("<textarea> can only have at most one child."));
|
|
4135
|
-
}
|
|
4084
|
+
if (!(textareaChildren.length <= 1)) {
|
|
4085
|
+
{
|
|
4086
|
+
throw Error("<textarea> can only have at most one child.");
|
|
4136
4087
|
}
|
|
4137
|
-
}
|
|
4088
|
+
}
|
|
4138
4089
|
|
|
4139
4090
|
textareaChildren = textareaChildren[0];
|
|
4140
4091
|
}
|
|
@@ -4316,23 +4267,19 @@ function renderToStaticMarkup(element) {
|
|
|
4316
4267
|
}
|
|
4317
4268
|
|
|
4318
4269
|
function renderToNodeStream() {
|
|
4319
|
-
|
|
4270
|
+
{
|
|
4320
4271
|
{
|
|
4321
|
-
|
|
4322
|
-
throw ReactError(Error("ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead."));
|
|
4323
|
-
}
|
|
4272
|
+
throw Error("ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead.");
|
|
4324
4273
|
}
|
|
4325
|
-
}
|
|
4274
|
+
}
|
|
4326
4275
|
}
|
|
4327
4276
|
|
|
4328
4277
|
function renderToStaticNodeStream() {
|
|
4329
|
-
|
|
4278
|
+
{
|
|
4330
4279
|
{
|
|
4331
|
-
|
|
4332
|
-
throw ReactError(Error("ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead."));
|
|
4333
|
-
}
|
|
4280
|
+
throw Error("ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead.");
|
|
4334
4281
|
}
|
|
4335
|
-
}
|
|
4282
|
+
}
|
|
4336
4283
|
} // Note: when changing this, also consider https://github.com/facebook/react/issues/11526
|
|
4337
4284
|
|
|
4338
4285
|
|