react-dom 16.10.0 → 16.12.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 +4 -4
- package/cjs/react-dom-server.browser.development.js +122 -177
- package/cjs/react-dom-server.browser.production.min.js +29 -29
- package/cjs/react-dom-server.node.development.js +116 -167
- package/cjs/react-dom-server.node.production.min.js +17 -17
- package/cjs/react-dom-test-utils.development.js +55 -91
- package/cjs/react-dom-test-utils.production.min.js +9 -9
- package/cjs/react-dom-unstable-fizz.browser.development.js +9 -5
- package/cjs/react-dom-unstable-fizz.browser.production.min.js +3 -3
- package/cjs/react-dom-unstable-fizz.node.development.js +23 -10
- package/cjs/react-dom-unstable-fizz.node.production.min.js +4 -3
- package/cjs/react-dom-unstable-flight-client.development.js +357 -0
- package/cjs/react-dom-unstable-flight-client.production.min.js +16 -0
- package/cjs/react-dom-unstable-flight-server.browser.development.js +392 -0
- package/cjs/react-dom-unstable-flight-server.browser.production.min.js +16 -0
- package/cjs/react-dom-unstable-flight-server.node.development.js +415 -0
- package/cjs/react-dom-unstable-flight-server.node.production.min.js +16 -0
- package/cjs/react-dom-unstable-native-dependencies.development.js +28 -48
- package/cjs/react-dom-unstable-native-dependencies.production.min.js +15 -15
- package/cjs/react-dom.development.js +1912 -2046
- package/cjs/react-dom.production.min.js +266 -269
- package/cjs/react-dom.profiling.min.js +252 -255
- package/package.json +8 -3
- package/umd/react-dom-server.browser.development.js +122 -177
- package/umd/react-dom-server.browser.production.min.js +36 -36
- package/umd/react-dom-test-utils.development.js +55 -91
- package/umd/react-dom-test-utils.production.min.js +9 -9
- package/umd/react-dom-unstable-fizz.browser.development.js +9 -5
- package/umd/react-dom-unstable-fizz.browser.production.min.js +3 -3
- package/umd/react-dom-unstable-flight-client.development.js +357 -0
- package/umd/react-dom-unstable-flight-client.production.min.js +14 -0
- package/umd/react-dom-unstable-flight-server.browser.development.js +390 -0
- package/umd/react-dom-unstable-flight-server.browser.production.min.js +14 -0
- package/umd/react-dom-unstable-native-dependencies.development.js +28 -48
- package/umd/react-dom-unstable-native-dependencies.production.min.js +22 -22
- package/umd/react-dom.development.js +1916 -2050
- package/umd/react-dom.production.min.js +230 -232
- package/umd/react-dom.profiling.min.js +237 -239
- package/unstable-flight-client.js +7 -0
- package/unstable-flight-server.browser.js +7 -0
- package/unstable-flight-server.js +3 -0
- package/unstable-flight-server.node.js +7 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-dom",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.12.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.18.0"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"react": "^16.0.0"
|
|
@@ -39,13 +39,18 @@
|
|
|
39
39
|
"unstable-fizz.js",
|
|
40
40
|
"unstable-fizz.browser.js",
|
|
41
41
|
"unstable-fizz.node.js",
|
|
42
|
+
"unstable-flight-client.js",
|
|
43
|
+
"unstable-flight-server.js",
|
|
44
|
+
"unstable-flight-server.browser.js",
|
|
45
|
+
"unstable-flight-server.node.js",
|
|
42
46
|
"unstable-native-dependencies.js",
|
|
43
47
|
"cjs/",
|
|
44
48
|
"umd/"
|
|
45
49
|
],
|
|
46
50
|
"browser": {
|
|
47
51
|
"./server.js": "./server.browser.js",
|
|
48
|
-
"./unstable-fizz.js": "./unstable-fizz.browser.js"
|
|
52
|
+
"./unstable-fizz.js": "./unstable-fizz.browser.js",
|
|
53
|
+
"./unstable-flight-server.js": "./unstable-flight-server.browser.js"
|
|
49
54
|
},
|
|
50
55
|
"browserify": {
|
|
51
56
|
"transform": [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.
|
|
1
|
+
/** @license React v16.12.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.12.0';
|
|
33
25
|
|
|
34
26
|
/**
|
|
35
27
|
* Use invariant() to assert state which your program assumes to be true.
|
|
@@ -363,12 +355,8 @@ var describeComponentFrame = function (name, source, ownerName) {
|
|
|
363
355
|
return '\n in ' + (name || 'Unknown') + sourceInfo;
|
|
364
356
|
};
|
|
365
357
|
|
|
366
|
-
// Helps identify side effects in
|
|
367
|
-
|
|
368
|
-
// In some cases, StrictMode should also double-render lifecycles.
|
|
369
|
-
// This can be confusing for tests though,
|
|
370
|
-
// And it can be bad for performance in production.
|
|
371
|
-
// This feature flag can be used to control the behavior:
|
|
358
|
+
// Helps identify side effects in render-phase lifecycle hooks and setState
|
|
359
|
+
// reducers by double invoking them in Strict Mode.
|
|
372
360
|
|
|
373
361
|
// To preserve the "Pause on caught exceptions" behavior of the debugger, we
|
|
374
362
|
// replay the begin phase of a failed component inside invokeGuardedCallback.
|
|
@@ -379,10 +367,9 @@ var warnAboutDeprecatedLifecycles = true; // Gather advanced timing metrics for
|
|
|
379
367
|
|
|
380
368
|
// Trace which interactions trigger each commit.
|
|
381
369
|
|
|
382
|
-
//
|
|
383
|
-
|
|
384
|
-
var enableSuspenseServerRenderer = false; // TODO: true? Here it might just be false.
|
|
370
|
+
// SSR experiments
|
|
385
371
|
|
|
372
|
+
var enableSuspenseServerRenderer = false;
|
|
386
373
|
// Only used in www builds.
|
|
387
374
|
|
|
388
375
|
// Only used in www builds.
|
|
@@ -396,9 +383,6 @@ var disableJavaScriptURLs = false; // React Fire: prevent the value and checked
|
|
|
396
383
|
// Control this behavior with a flag to support 16.6 minor releases in the meanwhile.
|
|
397
384
|
|
|
398
385
|
|
|
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
386
|
// Experimental React Flare event system and event components support.
|
|
403
387
|
|
|
404
388
|
var enableFlareAPI = false; // Experimental Host Component support.
|
|
@@ -408,15 +392,11 @@ var enableFundamentalAPI = false; // Experimental Scope support.
|
|
|
408
392
|
var enableScopeAPI = false; // New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107
|
|
409
393
|
|
|
410
394
|
// We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?)
|
|
411
|
-
// Till then, we warn about the missing mock, but still fallback to a
|
|
395
|
+
// Till then, we warn about the missing mock, but still fallback to a legacy mode compatible version
|
|
412
396
|
|
|
413
397
|
// For tests, we flush suspense fallbacks in an act scope;
|
|
414
398
|
// *except* in some of our own tests, where we test incremental loading states.
|
|
415
399
|
|
|
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
400
|
// Add a callback property to suspense to notify which promises are currently
|
|
421
401
|
// in the update queue. This allows reporting and tracing of what is causing
|
|
422
402
|
// the user to see a loading state.
|
|
@@ -431,6 +411,8 @@ var enableScopeAPI = false; // New API for JSX transforms to target - https://gi
|
|
|
431
411
|
|
|
432
412
|
var disableLegacyContext = false;
|
|
433
413
|
|
|
414
|
+
// Flag to turn event.target and event.currentTarget in ReactNative from a reactTag to a component instance
|
|
415
|
+
|
|
434
416
|
/**
|
|
435
417
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
436
418
|
*
|
|
@@ -690,13 +672,11 @@ function growThreadCountAndReturnNextAvailable() {
|
|
|
690
672
|
var oldSize = oldArray.length;
|
|
691
673
|
var newSize = oldSize * 2;
|
|
692
674
|
|
|
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
|
-
}
|
|
675
|
+
if (!(newSize <= 0x10000)) {
|
|
676
|
+
{
|
|
677
|
+
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
678
|
}
|
|
699
|
-
}
|
|
679
|
+
}
|
|
700
680
|
|
|
701
681
|
var newArray = new Uint16Array(newSize);
|
|
702
682
|
newArray.set(oldArray);
|
|
@@ -1032,13 +1012,11 @@ var didWarn = false;
|
|
|
1032
1012
|
|
|
1033
1013
|
function sanitizeURL(url) {
|
|
1034
1014
|
if (disableJavaScriptURLs) {
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
throw ReactError(Error("React has blocked a javascript: URL as a security precaution." + (ReactDebugCurrentFrame$2.getStackAddendum())));
|
|
1039
|
-
}
|
|
1015
|
+
if (!!isJavaScriptProtocol.test(url)) {
|
|
1016
|
+
{
|
|
1017
|
+
throw Error("React has blocked a javascript: URL as a security precaution." + (ReactDebugCurrentFrame$2.getStackAddendum()));
|
|
1040
1018
|
}
|
|
1041
|
-
}
|
|
1019
|
+
}
|
|
1042
1020
|
} else if (true && !didWarn && isJavaScriptProtocol.test(url)) {
|
|
1043
1021
|
didWarn = true;
|
|
1044
1022
|
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 +1222,11 @@ var isInHookUserCodeInDev = false; // In DEV, this is the name of the currently
|
|
|
1244
1222
|
var currentHookNameInDev;
|
|
1245
1223
|
|
|
1246
1224
|
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
|
-
}
|
|
1225
|
+
if (!(currentlyRenderingComponent !== null)) {
|
|
1226
|
+
{
|
|
1227
|
+
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
1228
|
}
|
|
1253
|
-
}
|
|
1229
|
+
}
|
|
1254
1230
|
|
|
1255
1231
|
{
|
|
1256
1232
|
!!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 +1265,11 @@ function areHookInputsEqual(nextDeps, prevDeps) {
|
|
|
1289
1265
|
|
|
1290
1266
|
function createHook() {
|
|
1291
1267
|
if (numberOfReRenders > 0) {
|
|
1292
|
-
|
|
1268
|
+
{
|
|
1293
1269
|
{
|
|
1294
|
-
|
|
1295
|
-
throw ReactError(Error("Rendered more hooks than during the previous render"));
|
|
1296
|
-
}
|
|
1270
|
+
throw Error("Rendered more hooks than during the previous render");
|
|
1297
1271
|
}
|
|
1298
|
-
}
|
|
1272
|
+
}
|
|
1299
1273
|
}
|
|
1300
1274
|
|
|
1301
1275
|
return {
|
|
@@ -1557,13 +1531,11 @@ function useLayoutEffect(create, inputs) {
|
|
|
1557
1531
|
}
|
|
1558
1532
|
|
|
1559
1533
|
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
|
-
}
|
|
1534
|
+
if (!(numberOfReRenders < RE_RENDER_LIMIT)) {
|
|
1535
|
+
{
|
|
1536
|
+
throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");
|
|
1565
1537
|
}
|
|
1566
|
-
}
|
|
1538
|
+
}
|
|
1567
1539
|
|
|
1568
1540
|
if (componentIdentity === currentlyRenderingComponent) {
|
|
1569
1541
|
// This is a render phase update. Stash it in a lazily-created map of
|
|
@@ -1611,6 +1583,21 @@ function useResponder(responder, props) {
|
|
|
1611
1583
|
};
|
|
1612
1584
|
}
|
|
1613
1585
|
|
|
1586
|
+
function useDeferredValue(value, config) {
|
|
1587
|
+
resolveCurrentlyRenderingComponent();
|
|
1588
|
+
return value;
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
function useTransition(config) {
|
|
1592
|
+
resolveCurrentlyRenderingComponent();
|
|
1593
|
+
|
|
1594
|
+
var startTransition = function (callback) {
|
|
1595
|
+
callback();
|
|
1596
|
+
};
|
|
1597
|
+
|
|
1598
|
+
return [startTransition, false];
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1614
1601
|
function noop() {}
|
|
1615
1602
|
|
|
1616
1603
|
var currentThreadID = 0;
|
|
@@ -1632,7 +1619,9 @@ var Dispatcher = {
|
|
|
1632
1619
|
useEffect: noop,
|
|
1633
1620
|
// Debugging effect
|
|
1634
1621
|
useDebugValue: noop,
|
|
1635
|
-
useResponder: useResponder
|
|
1622
|
+
useResponder: useResponder,
|
|
1623
|
+
useDeferredValue: useDeferredValue,
|
|
1624
|
+
useTransition: useTransition
|
|
1636
1625
|
};
|
|
1637
1626
|
|
|
1638
1627
|
var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
|
|
@@ -1756,44 +1745,36 @@ function assertValidProps(tag, props) {
|
|
|
1756
1745
|
|
|
1757
1746
|
|
|
1758
1747
|
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
|
-
}
|
|
1748
|
+
if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
|
|
1749
|
+
{
|
|
1750
|
+
throw Error(tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." + (ReactDebugCurrentFrame$4.getStackAddendum()));
|
|
1764
1751
|
}
|
|
1765
|
-
}
|
|
1752
|
+
}
|
|
1766
1753
|
}
|
|
1767
1754
|
|
|
1768
1755
|
if (props.dangerouslySetInnerHTML != null) {
|
|
1769
|
-
(
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
throw ReactError(Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`."));
|
|
1773
|
-
}
|
|
1756
|
+
if (!(props.children == null)) {
|
|
1757
|
+
{
|
|
1758
|
+
throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");
|
|
1774
1759
|
}
|
|
1775
|
-
}
|
|
1760
|
+
}
|
|
1776
1761
|
|
|
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
|
-
}
|
|
1762
|
+
if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
|
|
1763
|
+
{
|
|
1764
|
+
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
1765
|
}
|
|
1783
|
-
}
|
|
1766
|
+
}
|
|
1784
1767
|
}
|
|
1785
1768
|
|
|
1786
1769
|
{
|
|
1787
1770
|
!(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
1771
|
}
|
|
1789
1772
|
|
|
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
|
-
}
|
|
1773
|
+
if (!(props.style == null || typeof props.style === 'object')) {
|
|
1774
|
+
{
|
|
1775
|
+
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
1776
|
}
|
|
1796
|
-
}
|
|
1777
|
+
}
|
|
1797
1778
|
}
|
|
1798
1779
|
|
|
1799
1780
|
/**
|
|
@@ -3038,13 +3019,11 @@ var validatedTagCache = {};
|
|
|
3038
3019
|
|
|
3039
3020
|
function validateDangerousTag(tag) {
|
|
3040
3021
|
if (!validatedTagCache.hasOwnProperty(tag)) {
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
throw ReactError(Error("Invalid tag: " + tag));
|
|
3045
|
-
}
|
|
3022
|
+
if (!VALID_TAG_REGEX.test(tag)) {
|
|
3023
|
+
{
|
|
3024
|
+
throw Error("Invalid tag: " + tag);
|
|
3046
3025
|
}
|
|
3047
|
-
}
|
|
3026
|
+
}
|
|
3048
3027
|
|
|
3049
3028
|
validatedTagCache[tag] = true;
|
|
3050
3029
|
}
|
|
@@ -3234,13 +3213,11 @@ function createOpenTagMarkup(tagVerbatim, tagLowercase, props, namespace, makeSt
|
|
|
3234
3213
|
|
|
3235
3214
|
function validateRenderResult(child, type) {
|
|
3236
3215
|
if (child === undefined) {
|
|
3237
|
-
|
|
3216
|
+
{
|
|
3238
3217
|
{
|
|
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
|
-
}
|
|
3218
|
+
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
3219
|
}
|
|
3243
|
-
}
|
|
3220
|
+
}
|
|
3244
3221
|
}
|
|
3245
3222
|
}
|
|
3246
3223
|
|
|
@@ -3456,13 +3433,11 @@ function resolve(child, context, threadID) {
|
|
|
3456
3433
|
childContext = inst.getChildContext();
|
|
3457
3434
|
|
|
3458
3435
|
for (var contextKey in childContext) {
|
|
3459
|
-
(
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
throw ReactError(Error((getComponentName(Component) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes."));
|
|
3463
|
-
}
|
|
3436
|
+
if (!(contextKey in _childContextTypes)) {
|
|
3437
|
+
{
|
|
3438
|
+
throw Error((getComponentName(Component) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes.");
|
|
3464
3439
|
}
|
|
3465
|
-
}
|
|
3440
|
+
}
|
|
3466
3441
|
}
|
|
3467
3442
|
} else {
|
|
3468
3443
|
warningWithoutStack$1(false, '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', getComponentName(Component) || 'Unknown');
|
|
@@ -3595,8 +3570,6 @@ function () {
|
|
|
3595
3570
|
};
|
|
3596
3571
|
|
|
3597
3572
|
_proto.read = function read(bytes) {
|
|
3598
|
-
var _this = this;
|
|
3599
|
-
|
|
3600
3573
|
if (this.exhausted) {
|
|
3601
3574
|
return null;
|
|
3602
3575
|
}
|
|
@@ -3644,13 +3617,11 @@ function () {
|
|
|
3644
3617
|
|
|
3645
3618
|
var fallbackFrame = frame.fallbackFrame;
|
|
3646
3619
|
|
|
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
|
-
}
|
|
3620
|
+
if (!fallbackFrame) {
|
|
3621
|
+
{
|
|
3622
|
+
throw Error("ReactDOMServer did not find an internal fallback frame for Suspense. This is a bug in React. Please file an issue.");
|
|
3652
3623
|
}
|
|
3653
|
-
}
|
|
3624
|
+
}
|
|
3654
3625
|
|
|
3655
3626
|
this.stack.push(fallbackFrame);
|
|
3656
3627
|
out[this.suspenseDepth] += '<!--$!-->'; // Skip flushing output since we're switching to the fallback
|
|
@@ -3680,23 +3651,19 @@ function () {
|
|
|
3680
3651
|
} catch (err) {
|
|
3681
3652
|
if (err != null && typeof err.then === 'function') {
|
|
3682
3653
|
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
|
-
}
|
|
3654
|
+
if (!(this.suspenseDepth > 0)) {
|
|
3655
|
+
{
|
|
3656
|
+
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
3657
|
}
|
|
3689
|
-
}
|
|
3658
|
+
}
|
|
3690
3659
|
|
|
3691
3660
|
suspended = true;
|
|
3692
3661
|
} else {
|
|
3693
|
-
|
|
3662
|
+
{
|
|
3694
3663
|
{
|
|
3695
|
-
|
|
3696
|
-
throw ReactError(Error("ReactDOMServer does not yet support Suspense."));
|
|
3697
|
-
}
|
|
3664
|
+
throw Error("ReactDOMServer does not yet support Suspense.");
|
|
3698
3665
|
}
|
|
3699
|
-
}
|
|
3666
|
+
}
|
|
3700
3667
|
}
|
|
3701
3668
|
} else {
|
|
3702
3669
|
throw err;
|
|
@@ -3754,22 +3721,18 @@ function () {
|
|
|
3754
3721
|
// Catch unexpected special types early.
|
|
3755
3722
|
var $$typeof = nextChild.$$typeof;
|
|
3756
3723
|
|
|
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
|
-
}
|
|
3724
|
+
if (!($$typeof !== REACT_PORTAL_TYPE)) {
|
|
3725
|
+
{
|
|
3726
|
+
throw Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.");
|
|
3762
3727
|
}
|
|
3763
|
-
}
|
|
3728
|
+
} // Catch-all to prevent an infinite loop if React.Children.toArray() supports some new type.
|
|
3764
3729
|
|
|
3765
3730
|
|
|
3766
|
-
|
|
3731
|
+
{
|
|
3767
3732
|
{
|
|
3768
|
-
|
|
3769
|
-
throw ReactError(Error("Unknown element-like object type: " + $$typeof.toString() + ". This is likely a bug in React. Please file an issue."));
|
|
3770
|
-
}
|
|
3733
|
+
throw Error("Unknown element-like object type: " + $$typeof.toString() + ". This is likely a bug in React. Please file an issue.");
|
|
3771
3734
|
}
|
|
3772
|
-
}
|
|
3735
|
+
}
|
|
3773
3736
|
}
|
|
3774
3737
|
|
|
3775
3738
|
var nextChildren = toArray(nextChild);
|
|
@@ -3881,13 +3844,11 @@ function () {
|
|
|
3881
3844
|
this.suspenseDepth++;
|
|
3882
3845
|
return '<!--$-->';
|
|
3883
3846
|
} else {
|
|
3884
|
-
|
|
3847
|
+
{
|
|
3885
3848
|
{
|
|
3886
|
-
|
|
3887
|
-
throw ReactError(Error("ReactDOMServer does not yet support Suspense."));
|
|
3888
|
-
}
|
|
3849
|
+
throw Error("ReactDOMServer does not yet support Suspense.");
|
|
3889
3850
|
}
|
|
3890
|
-
}
|
|
3851
|
+
}
|
|
3891
3852
|
}
|
|
3892
3853
|
}
|
|
3893
3854
|
// eslint-disable-next-line-no-fallthrough
|
|
@@ -4052,13 +4013,11 @@ function () {
|
|
|
4052
4013
|
return open;
|
|
4053
4014
|
}
|
|
4054
4015
|
|
|
4055
|
-
|
|
4016
|
+
{
|
|
4056
4017
|
{
|
|
4057
|
-
|
|
4058
|
-
throw ReactError(Error("ReactDOMServer does not yet support the fundamental API."));
|
|
4059
|
-
}
|
|
4018
|
+
throw Error("ReactDOMServer does not yet support the fundamental API.");
|
|
4060
4019
|
}
|
|
4061
|
-
}
|
|
4020
|
+
}
|
|
4062
4021
|
}
|
|
4063
4022
|
// eslint-disable-next-line-no-fallthrough
|
|
4064
4023
|
|
|
@@ -4099,13 +4058,11 @@ function () {
|
|
|
4099
4058
|
|
|
4100
4059
|
case Pending:
|
|
4101
4060
|
default:
|
|
4102
|
-
|
|
4061
|
+
{
|
|
4103
4062
|
{
|
|
4104
|
-
|
|
4105
|
-
throw ReactError(Error("ReactDOMServer does not yet support lazy-loaded components."));
|
|
4106
|
-
}
|
|
4063
|
+
throw Error("ReactDOMServer does not yet support lazy-loaded components.");
|
|
4107
4064
|
}
|
|
4108
|
-
}
|
|
4065
|
+
}
|
|
4109
4066
|
|
|
4110
4067
|
}
|
|
4111
4068
|
}
|
|
@@ -4133,13 +4090,11 @@ function () {
|
|
|
4133
4090
|
return '';
|
|
4134
4091
|
}
|
|
4135
4092
|
|
|
4136
|
-
|
|
4093
|
+
{
|
|
4137
4094
|
{
|
|
4138
|
-
|
|
4139
|
-
throw ReactError(Error("ReactDOMServer does not yet support scope components."));
|
|
4140
|
-
}
|
|
4095
|
+
throw Error("ReactDOMServer does not yet support scope components.");
|
|
4141
4096
|
}
|
|
4142
|
-
}
|
|
4097
|
+
}
|
|
4143
4098
|
}
|
|
4144
4099
|
}
|
|
4145
4100
|
}
|
|
@@ -4160,13 +4115,11 @@ function () {
|
|
|
4160
4115
|
}
|
|
4161
4116
|
}
|
|
4162
4117
|
|
|
4163
|
-
|
|
4118
|
+
{
|
|
4164
4119
|
{
|
|
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
|
-
}
|
|
4120
|
+
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
4121
|
}
|
|
4169
|
-
}
|
|
4122
|
+
}
|
|
4170
4123
|
}
|
|
4171
4124
|
};
|
|
4172
4125
|
|
|
@@ -4234,22 +4187,18 @@ function () {
|
|
|
4234
4187
|
warning$1(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
|
|
4235
4188
|
}
|
|
4236
4189
|
|
|
4237
|
-
(
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
throw ReactError(Error("If you supply `defaultValue` on a <textarea>, do not pass children."));
|
|
4241
|
-
}
|
|
4190
|
+
if (!(defaultValue == null)) {
|
|
4191
|
+
{
|
|
4192
|
+
throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");
|
|
4242
4193
|
}
|
|
4243
|
-
}
|
|
4194
|
+
}
|
|
4244
4195
|
|
|
4245
4196
|
if (Array.isArray(textareaChildren)) {
|
|
4246
|
-
(
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
throw ReactError(Error("<textarea> can only have at most one child."));
|
|
4250
|
-
}
|
|
4197
|
+
if (!(textareaChildren.length <= 1)) {
|
|
4198
|
+
{
|
|
4199
|
+
throw Error("<textarea> can only have at most one child.");
|
|
4251
4200
|
}
|
|
4252
|
-
}
|
|
4201
|
+
}
|
|
4253
4202
|
|
|
4254
4203
|
textareaChildren = textareaChildren[0];
|
|
4255
4204
|
}
|
|
@@ -4431,23 +4380,19 @@ function renderToStaticMarkup(element) {
|
|
|
4431
4380
|
}
|
|
4432
4381
|
|
|
4433
4382
|
function renderToNodeStream() {
|
|
4434
|
-
|
|
4383
|
+
{
|
|
4435
4384
|
{
|
|
4436
|
-
|
|
4437
|
-
throw ReactError(Error("ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead."));
|
|
4438
|
-
}
|
|
4385
|
+
throw Error("ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead.");
|
|
4439
4386
|
}
|
|
4440
|
-
}
|
|
4387
|
+
}
|
|
4441
4388
|
}
|
|
4442
4389
|
|
|
4443
4390
|
function renderToStaticNodeStream() {
|
|
4444
|
-
|
|
4391
|
+
{
|
|
4445
4392
|
{
|
|
4446
|
-
|
|
4447
|
-
throw ReactError(Error("ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead."));
|
|
4448
|
-
}
|
|
4393
|
+
throw Error("ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead.");
|
|
4449
4394
|
}
|
|
4450
|
-
}
|
|
4395
|
+
}
|
|
4451
4396
|
} // Note: when changing this, also consider https://github.com/facebook/react/issues/11526
|
|
4452
4397
|
|
|
4453
4398
|
|