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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-dom",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.11.0",
|
|
4
4
|
"description": "React package for working with the DOM.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"loose-envify": "^1.1.0",
|
|
21
21
|
"object-assign": "^4.1.1",
|
|
22
22
|
"prop-types": "^15.6.2",
|
|
23
|
-
"scheduler": "^0.
|
|
23
|
+
"scheduler": "^0.17.0"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"react": "^16.0.0"
|
|
@@ -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.
|
|
@@ -16,20 +16,12 @@
|
|
|
16
16
|
}(this, (function (React) { 'use strict';
|
|
17
17
|
|
|
18
18
|
// Do not require this module directly! Use normal `invariant` calls with
|
|
19
|
-
// template literal strings. The messages will be
|
|
20
|
-
// build
|
|
21
|
-
|
|
22
|
-
// Do not require this module directly! Use normal `invariant` calls with
|
|
23
|
-
// template literal strings. The messages will be converted to ReactError during
|
|
24
|
-
// build, and in production they will be minified.
|
|
25
|
-
function ReactError(error) {
|
|
26
|
-
error.name = 'Invariant Violation';
|
|
27
|
-
return error;
|
|
28
|
-
}
|
|
19
|
+
// template literal strings. The messages will be replaced with error codes
|
|
20
|
+
// during build.
|
|
29
21
|
|
|
30
22
|
// TODO: this is special because it gets imported during build.
|
|
31
23
|
|
|
32
|
-
var ReactVersion = '16.
|
|
24
|
+
var ReactVersion = '16.11.0';
|
|
33
25
|
|
|
34
26
|
/**
|
|
35
27
|
* Use invariant() to assert state which your program assumes to be true.
|
|
@@ -379,10 +371,9 @@ var warnAboutDeprecatedLifecycles = true; // Gather advanced timing metrics for
|
|
|
379
371
|
|
|
380
372
|
// Trace which interactions trigger each commit.
|
|
381
373
|
|
|
382
|
-
//
|
|
383
|
-
|
|
384
|
-
var enableSuspenseServerRenderer = false; // TODO: true? Here it might just be false.
|
|
374
|
+
// SSR experiments
|
|
385
375
|
|
|
376
|
+
var enableSuspenseServerRenderer = false;
|
|
386
377
|
// Only used in www builds.
|
|
387
378
|
|
|
388
379
|
// Only used in www builds.
|
|
@@ -396,9 +387,6 @@ var disableJavaScriptURLs = false; // React Fire: prevent the value and checked
|
|
|
396
387
|
// Control this behavior with a flag to support 16.6 minor releases in the meanwhile.
|
|
397
388
|
|
|
398
389
|
|
|
399
|
-
// See https://github.com/react-native-community/discussions-and-proposals/issues/72 for more information
|
|
400
|
-
// This is a flag so we can fix warnings in RN core before turning it on
|
|
401
|
-
|
|
402
390
|
// Experimental React Flare event system and event components support.
|
|
403
391
|
|
|
404
392
|
var enableFlareAPI = false; // Experimental Host Component support.
|
|
@@ -413,10 +401,6 @@ var enableScopeAPI = false; // New API for JSX transforms to target - https://gi
|
|
|
413
401
|
// For tests, we flush suspense fallbacks in an act scope;
|
|
414
402
|
// *except* in some of our own tests, where we test incremental loading states.
|
|
415
403
|
|
|
416
|
-
// Changes priority of some events like mousemove to user-blocking priority,
|
|
417
|
-
// but without making them discrete. The flag exists in case it causes
|
|
418
|
-
// starvation problems.
|
|
419
|
-
|
|
420
404
|
// Add a callback property to suspense to notify which promises are currently
|
|
421
405
|
// in the update queue. This allows reporting and tracing of what is causing
|
|
422
406
|
// the user to see a loading state.
|
|
@@ -690,13 +674,11 @@ function growThreadCountAndReturnNextAvailable() {
|
|
|
690
674
|
var oldSize = oldArray.length;
|
|
691
675
|
var newSize = oldSize * 2;
|
|
692
676
|
|
|
693
|
-
(
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
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."));
|
|
697
|
-
}
|
|
677
|
+
if (!(newSize <= 0x10000)) {
|
|
678
|
+
{
|
|
679
|
+
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.");
|
|
698
680
|
}
|
|
699
|
-
}
|
|
681
|
+
}
|
|
700
682
|
|
|
701
683
|
var newArray = new Uint16Array(newSize);
|
|
702
684
|
newArray.set(oldArray);
|
|
@@ -1032,13 +1014,11 @@ var didWarn = false;
|
|
|
1032
1014
|
|
|
1033
1015
|
function sanitizeURL(url) {
|
|
1034
1016
|
if (disableJavaScriptURLs) {
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
throw ReactError(Error("React has blocked a javascript: URL as a security precaution." + (ReactDebugCurrentFrame$2.getStackAddendum())));
|
|
1039
|
-
}
|
|
1017
|
+
if (!!isJavaScriptProtocol.test(url)) {
|
|
1018
|
+
{
|
|
1019
|
+
throw Error("React has blocked a javascript: URL as a security precaution." + (ReactDebugCurrentFrame$2.getStackAddendum()));
|
|
1040
1020
|
}
|
|
1041
|
-
}
|
|
1021
|
+
}
|
|
1042
1022
|
} else if (true && !didWarn && isJavaScriptProtocol.test(url)) {
|
|
1043
1023
|
didWarn = true;
|
|
1044
1024
|
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));
|
|
@@ -1244,13 +1224,11 @@ var isInHookUserCodeInDev = false; // In DEV, this is the name of the currently
|
|
|
1244
1224
|
var currentHookNameInDev;
|
|
1245
1225
|
|
|
1246
1226
|
function resolveCurrentlyRenderingComponent() {
|
|
1247
|
-
(
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
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."));
|
|
1251
|
-
}
|
|
1227
|
+
if (!(currentlyRenderingComponent !== null)) {
|
|
1228
|
+
{
|
|
1229
|
+
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.");
|
|
1252
1230
|
}
|
|
1253
|
-
}
|
|
1231
|
+
}
|
|
1254
1232
|
|
|
1255
1233
|
{
|
|
1256
1234
|
!!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;
|
|
@@ -1289,13 +1267,11 @@ function areHookInputsEqual(nextDeps, prevDeps) {
|
|
|
1289
1267
|
|
|
1290
1268
|
function createHook() {
|
|
1291
1269
|
if (numberOfReRenders > 0) {
|
|
1292
|
-
|
|
1270
|
+
{
|
|
1293
1271
|
{
|
|
1294
|
-
|
|
1295
|
-
throw ReactError(Error("Rendered more hooks than during the previous render"));
|
|
1296
|
-
}
|
|
1272
|
+
throw Error("Rendered more hooks than during the previous render");
|
|
1297
1273
|
}
|
|
1298
|
-
}
|
|
1274
|
+
}
|
|
1299
1275
|
}
|
|
1300
1276
|
|
|
1301
1277
|
return {
|
|
@@ -1557,13 +1533,11 @@ function useLayoutEffect(create, inputs) {
|
|
|
1557
1533
|
}
|
|
1558
1534
|
|
|
1559
1535
|
function dispatchAction(componentIdentity, queue, action) {
|
|
1560
|
-
(
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
throw ReactError(Error("Too many re-renders. React limits the number of renders to prevent an infinite loop."));
|
|
1564
|
-
}
|
|
1536
|
+
if (!(numberOfReRenders < RE_RENDER_LIMIT)) {
|
|
1537
|
+
{
|
|
1538
|
+
throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");
|
|
1565
1539
|
}
|
|
1566
|
-
}
|
|
1540
|
+
}
|
|
1567
1541
|
|
|
1568
1542
|
if (componentIdentity === currentlyRenderingComponent) {
|
|
1569
1543
|
// This is a render phase update. Stash it in a lazily-created map of
|
|
@@ -1611,6 +1585,21 @@ function useResponder(responder, props) {
|
|
|
1611
1585
|
};
|
|
1612
1586
|
}
|
|
1613
1587
|
|
|
1588
|
+
function useDeferredValue(value, config) {
|
|
1589
|
+
resolveCurrentlyRenderingComponent();
|
|
1590
|
+
return value;
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
function useTransition(config) {
|
|
1594
|
+
resolveCurrentlyRenderingComponent();
|
|
1595
|
+
|
|
1596
|
+
var startTransition = function (callback) {
|
|
1597
|
+
callback();
|
|
1598
|
+
};
|
|
1599
|
+
|
|
1600
|
+
return [startTransition, false];
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1614
1603
|
function noop() {}
|
|
1615
1604
|
|
|
1616
1605
|
var currentThreadID = 0;
|
|
@@ -1632,7 +1621,9 @@ var Dispatcher = {
|
|
|
1632
1621
|
useEffect: noop,
|
|
1633
1622
|
// Debugging effect
|
|
1634
1623
|
useDebugValue: noop,
|
|
1635
|
-
useResponder: useResponder
|
|
1624
|
+
useResponder: useResponder,
|
|
1625
|
+
useDeferredValue: useDeferredValue,
|
|
1626
|
+
useTransition: useTransition
|
|
1636
1627
|
};
|
|
1637
1628
|
|
|
1638
1629
|
var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
|
|
@@ -1756,44 +1747,36 @@ function assertValidProps(tag, props) {
|
|
|
1756
1747
|
|
|
1757
1748
|
|
|
1758
1749
|
if (voidElementTags[tag]) {
|
|
1759
|
-
(
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
throw ReactError(Error(tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." + (ReactDebugCurrentFrame$4.getStackAddendum())));
|
|
1763
|
-
}
|
|
1750
|
+
if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
|
|
1751
|
+
{
|
|
1752
|
+
throw Error(tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." + (ReactDebugCurrentFrame$4.getStackAddendum()));
|
|
1764
1753
|
}
|
|
1765
|
-
}
|
|
1754
|
+
}
|
|
1766
1755
|
}
|
|
1767
1756
|
|
|
1768
1757
|
if (props.dangerouslySetInnerHTML != null) {
|
|
1769
|
-
(
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
throw ReactError(Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`."));
|
|
1773
|
-
}
|
|
1758
|
+
if (!(props.children == null)) {
|
|
1759
|
+
{
|
|
1760
|
+
throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");
|
|
1774
1761
|
}
|
|
1775
|
-
}
|
|
1762
|
+
}
|
|
1776
1763
|
|
|
1777
|
-
(
|
|
1778
|
-
|
|
1779
|
-
{
|
|
1780
|
-
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."));
|
|
1781
|
-
}
|
|
1764
|
+
if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
|
|
1765
|
+
{
|
|
1766
|
+
throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.");
|
|
1782
1767
|
}
|
|
1783
|
-
}
|
|
1768
|
+
}
|
|
1784
1769
|
}
|
|
1785
1770
|
|
|
1786
1771
|
{
|
|
1787
1772
|
!(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;
|
|
1788
1773
|
}
|
|
1789
1774
|
|
|
1790
|
-
(
|
|
1791
|
-
|
|
1792
|
-
{
|
|
1793
|
-
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())));
|
|
1794
|
-
}
|
|
1775
|
+
if (!(props.style == null || typeof props.style === 'object')) {
|
|
1776
|
+
{
|
|
1777
|
+
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()));
|
|
1795
1778
|
}
|
|
1796
|
-
}
|
|
1779
|
+
}
|
|
1797
1780
|
}
|
|
1798
1781
|
|
|
1799
1782
|
/**
|
|
@@ -3038,13 +3021,11 @@ var validatedTagCache = {};
|
|
|
3038
3021
|
|
|
3039
3022
|
function validateDangerousTag(tag) {
|
|
3040
3023
|
if (!validatedTagCache.hasOwnProperty(tag)) {
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
throw ReactError(Error("Invalid tag: " + tag));
|
|
3045
|
-
}
|
|
3024
|
+
if (!VALID_TAG_REGEX.test(tag)) {
|
|
3025
|
+
{
|
|
3026
|
+
throw Error("Invalid tag: " + tag);
|
|
3046
3027
|
}
|
|
3047
|
-
}
|
|
3028
|
+
}
|
|
3048
3029
|
|
|
3049
3030
|
validatedTagCache[tag] = true;
|
|
3050
3031
|
}
|
|
@@ -3234,13 +3215,11 @@ function createOpenTagMarkup(tagVerbatim, tagLowercase, props, namespace, makeSt
|
|
|
3234
3215
|
|
|
3235
3216
|
function validateRenderResult(child, type) {
|
|
3236
3217
|
if (child === undefined) {
|
|
3237
|
-
|
|
3218
|
+
{
|
|
3238
3219
|
{
|
|
3239
|
-
|
|
3240
|
-
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."));
|
|
3241
|
-
}
|
|
3220
|
+
throw Error((getComponentName(type) || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.");
|
|
3242
3221
|
}
|
|
3243
|
-
}
|
|
3222
|
+
}
|
|
3244
3223
|
}
|
|
3245
3224
|
}
|
|
3246
3225
|
|
|
@@ -3456,13 +3435,11 @@ function resolve(child, context, threadID) {
|
|
|
3456
3435
|
childContext = inst.getChildContext();
|
|
3457
3436
|
|
|
3458
3437
|
for (var contextKey in childContext) {
|
|
3459
|
-
(
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
throw ReactError(Error((getComponentName(Component) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes."));
|
|
3463
|
-
}
|
|
3438
|
+
if (!(contextKey in _childContextTypes)) {
|
|
3439
|
+
{
|
|
3440
|
+
throw Error((getComponentName(Component) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes.");
|
|
3464
3441
|
}
|
|
3465
|
-
}
|
|
3442
|
+
}
|
|
3466
3443
|
}
|
|
3467
3444
|
} else {
|
|
3468
3445
|
warningWithoutStack$1(false, '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', getComponentName(Component) || 'Unknown');
|
|
@@ -3595,8 +3572,6 @@ function () {
|
|
|
3595
3572
|
};
|
|
3596
3573
|
|
|
3597
3574
|
_proto.read = function read(bytes) {
|
|
3598
|
-
var _this = this;
|
|
3599
|
-
|
|
3600
3575
|
if (this.exhausted) {
|
|
3601
3576
|
return null;
|
|
3602
3577
|
}
|
|
@@ -3644,13 +3619,11 @@ function () {
|
|
|
3644
3619
|
|
|
3645
3620
|
var fallbackFrame = frame.fallbackFrame;
|
|
3646
3621
|
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
throw ReactError(Error("ReactDOMServer did not find an internal fallback frame for Suspense. This is a bug in React. Please file an issue."));
|
|
3651
|
-
}
|
|
3622
|
+
if (!fallbackFrame) {
|
|
3623
|
+
{
|
|
3624
|
+
throw Error("ReactDOMServer did not find an internal fallback frame for Suspense. This is a bug in React. Please file an issue.");
|
|
3652
3625
|
}
|
|
3653
|
-
}
|
|
3626
|
+
}
|
|
3654
3627
|
|
|
3655
3628
|
this.stack.push(fallbackFrame);
|
|
3656
3629
|
out[this.suspenseDepth] += '<!--$!-->'; // Skip flushing output since we're switching to the fallback
|
|
@@ -3680,23 +3653,19 @@ function () {
|
|
|
3680
3653
|
} catch (err) {
|
|
3681
3654
|
if (err != null && typeof err.then === 'function') {
|
|
3682
3655
|
if (enableSuspenseServerRenderer) {
|
|
3683
|
-
(
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
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."));
|
|
3687
|
-
}
|
|
3656
|
+
if (!(this.suspenseDepth > 0)) {
|
|
3657
|
+
{
|
|
3658
|
+
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.");
|
|
3688
3659
|
}
|
|
3689
|
-
}
|
|
3660
|
+
}
|
|
3690
3661
|
|
|
3691
3662
|
suspended = true;
|
|
3692
3663
|
} else {
|
|
3693
|
-
|
|
3664
|
+
{
|
|
3694
3665
|
{
|
|
3695
|
-
|
|
3696
|
-
throw ReactError(Error("ReactDOMServer does not yet support Suspense."));
|
|
3697
|
-
}
|
|
3666
|
+
throw Error("ReactDOMServer does not yet support Suspense.");
|
|
3698
3667
|
}
|
|
3699
|
-
}
|
|
3668
|
+
}
|
|
3700
3669
|
}
|
|
3701
3670
|
} else {
|
|
3702
3671
|
throw err;
|
|
@@ -3754,22 +3723,18 @@ function () {
|
|
|
3754
3723
|
// Catch unexpected special types early.
|
|
3755
3724
|
var $$typeof = nextChild.$$typeof;
|
|
3756
3725
|
|
|
3757
|
-
(
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
throw ReactError(Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render."));
|
|
3761
|
-
}
|
|
3726
|
+
if (!($$typeof !== REACT_PORTAL_TYPE)) {
|
|
3727
|
+
{
|
|
3728
|
+
throw Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.");
|
|
3762
3729
|
}
|
|
3763
|
-
}
|
|
3730
|
+
} // Catch-all to prevent an infinite loop if React.Children.toArray() supports some new type.
|
|
3764
3731
|
|
|
3765
3732
|
|
|
3766
|
-
|
|
3733
|
+
{
|
|
3767
3734
|
{
|
|
3768
|
-
|
|
3769
|
-
throw ReactError(Error("Unknown element-like object type: " + $$typeof.toString() + ". This is likely a bug in React. Please file an issue."));
|
|
3770
|
-
}
|
|
3735
|
+
throw Error("Unknown element-like object type: " + $$typeof.toString() + ". This is likely a bug in React. Please file an issue.");
|
|
3771
3736
|
}
|
|
3772
|
-
}
|
|
3737
|
+
}
|
|
3773
3738
|
}
|
|
3774
3739
|
|
|
3775
3740
|
var nextChildren = toArray(nextChild);
|
|
@@ -3881,13 +3846,11 @@ function () {
|
|
|
3881
3846
|
this.suspenseDepth++;
|
|
3882
3847
|
return '<!--$-->';
|
|
3883
3848
|
} else {
|
|
3884
|
-
|
|
3849
|
+
{
|
|
3885
3850
|
{
|
|
3886
|
-
|
|
3887
|
-
throw ReactError(Error("ReactDOMServer does not yet support Suspense."));
|
|
3888
|
-
}
|
|
3851
|
+
throw Error("ReactDOMServer does not yet support Suspense.");
|
|
3889
3852
|
}
|
|
3890
|
-
}
|
|
3853
|
+
}
|
|
3891
3854
|
}
|
|
3892
3855
|
}
|
|
3893
3856
|
// eslint-disable-next-line-no-fallthrough
|
|
@@ -4052,13 +4015,11 @@ function () {
|
|
|
4052
4015
|
return open;
|
|
4053
4016
|
}
|
|
4054
4017
|
|
|
4055
|
-
|
|
4018
|
+
{
|
|
4056
4019
|
{
|
|
4057
|
-
|
|
4058
|
-
throw ReactError(Error("ReactDOMServer does not yet support the fundamental API."));
|
|
4059
|
-
}
|
|
4020
|
+
throw Error("ReactDOMServer does not yet support the fundamental API.");
|
|
4060
4021
|
}
|
|
4061
|
-
}
|
|
4022
|
+
}
|
|
4062
4023
|
}
|
|
4063
4024
|
// eslint-disable-next-line-no-fallthrough
|
|
4064
4025
|
|
|
@@ -4099,13 +4060,11 @@ function () {
|
|
|
4099
4060
|
|
|
4100
4061
|
case Pending:
|
|
4101
4062
|
default:
|
|
4102
|
-
|
|
4063
|
+
{
|
|
4103
4064
|
{
|
|
4104
|
-
|
|
4105
|
-
throw ReactError(Error("ReactDOMServer does not yet support lazy-loaded components."));
|
|
4106
|
-
}
|
|
4065
|
+
throw Error("ReactDOMServer does not yet support lazy-loaded components.");
|
|
4107
4066
|
}
|
|
4108
|
-
}
|
|
4067
|
+
}
|
|
4109
4068
|
|
|
4110
4069
|
}
|
|
4111
4070
|
}
|
|
@@ -4133,13 +4092,11 @@ function () {
|
|
|
4133
4092
|
return '';
|
|
4134
4093
|
}
|
|
4135
4094
|
|
|
4136
|
-
|
|
4095
|
+
{
|
|
4137
4096
|
{
|
|
4138
|
-
|
|
4139
|
-
throw ReactError(Error("ReactDOMServer does not yet support scope components."));
|
|
4140
|
-
}
|
|
4097
|
+
throw Error("ReactDOMServer does not yet support scope components.");
|
|
4141
4098
|
}
|
|
4142
|
-
}
|
|
4099
|
+
}
|
|
4143
4100
|
}
|
|
4144
4101
|
}
|
|
4145
4102
|
}
|
|
@@ -4160,13 +4117,11 @@ function () {
|
|
|
4160
4117
|
}
|
|
4161
4118
|
}
|
|
4162
4119
|
|
|
4163
|
-
|
|
4120
|
+
{
|
|
4164
4121
|
{
|
|
4165
|
-
|
|
4166
|
-
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));
|
|
4167
|
-
}
|
|
4122
|
+
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);
|
|
4168
4123
|
}
|
|
4169
|
-
}
|
|
4124
|
+
}
|
|
4170
4125
|
}
|
|
4171
4126
|
};
|
|
4172
4127
|
|
|
@@ -4234,22 +4189,18 @@ function () {
|
|
|
4234
4189
|
warning$1(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
|
|
4235
4190
|
}
|
|
4236
4191
|
|
|
4237
|
-
(
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
throw ReactError(Error("If you supply `defaultValue` on a <textarea>, do not pass children."));
|
|
4241
|
-
}
|
|
4192
|
+
if (!(defaultValue == null)) {
|
|
4193
|
+
{
|
|
4194
|
+
throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");
|
|
4242
4195
|
}
|
|
4243
|
-
}
|
|
4196
|
+
}
|
|
4244
4197
|
|
|
4245
4198
|
if (Array.isArray(textareaChildren)) {
|
|
4246
|
-
(
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
throw ReactError(Error("<textarea> can only have at most one child."));
|
|
4250
|
-
}
|
|
4199
|
+
if (!(textareaChildren.length <= 1)) {
|
|
4200
|
+
{
|
|
4201
|
+
throw Error("<textarea> can only have at most one child.");
|
|
4251
4202
|
}
|
|
4252
|
-
}
|
|
4203
|
+
}
|
|
4253
4204
|
|
|
4254
4205
|
textareaChildren = textareaChildren[0];
|
|
4255
4206
|
}
|
|
@@ -4431,23 +4382,19 @@ function renderToStaticMarkup(element) {
|
|
|
4431
4382
|
}
|
|
4432
4383
|
|
|
4433
4384
|
function renderToNodeStream() {
|
|
4434
|
-
|
|
4385
|
+
{
|
|
4435
4386
|
{
|
|
4436
|
-
|
|
4437
|
-
throw ReactError(Error("ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead."));
|
|
4438
|
-
}
|
|
4387
|
+
throw Error("ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead.");
|
|
4439
4388
|
}
|
|
4440
|
-
}
|
|
4389
|
+
}
|
|
4441
4390
|
}
|
|
4442
4391
|
|
|
4443
4392
|
function renderToStaticNodeStream() {
|
|
4444
|
-
|
|
4393
|
+
{
|
|
4445
4394
|
{
|
|
4446
|
-
|
|
4447
|
-
throw ReactError(Error("ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead."));
|
|
4448
|
-
}
|
|
4395
|
+
throw Error("ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead.");
|
|
4449
4396
|
}
|
|
4450
|
-
}
|
|
4397
|
+
}
|
|
4451
4398
|
} // Note: when changing this, also consider https://github.com/facebook/react/issues/11526
|
|
4452
4399
|
|
|
4453
4400
|
|