react-reconciler 0.22.2 → 0.23.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-reconciler-persistent.development.js +737 -671
- package/cjs/react-reconciler-persistent.production.min.js +164 -164
- package/cjs/react-reconciler-reflection.development.js +27 -55
- package/cjs/react-reconciler-reflection.production.min.js +5 -5
- package/cjs/react-reconciler.development.js +739 -679
- package/cjs/react-reconciler.production.min.js +164 -164
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v0.
|
|
1
|
+
/** @license React v0.23.0
|
|
2
2
|
* react-reconciler-reflection.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -20,16 +20,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
20
20
|
var React = require('react');
|
|
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
|
/**
|
|
35
27
|
* Use invariant() to assert state which your program assumes to be true.
|
|
@@ -301,9 +293,8 @@ var Hydrating =
|
|
|
301
293
|
|
|
302
294
|
// Trace which interactions trigger each commit.
|
|
303
295
|
|
|
304
|
-
//
|
|
296
|
+
// SSR experiments
|
|
305
297
|
|
|
306
|
-
// TODO: true? Here it might just be false.
|
|
307
298
|
|
|
308
299
|
// Only used in www builds.
|
|
309
300
|
|
|
@@ -318,9 +309,6 @@ var Hydrating =
|
|
|
318
309
|
// Control this behavior with a flag to support 16.6 minor releases in the meanwhile.
|
|
319
310
|
|
|
320
311
|
|
|
321
|
-
// See https://github.com/react-native-community/discussions-and-proposals/issues/72 for more information
|
|
322
|
-
// This is a flag so we can fix warnings in RN core before turning it on
|
|
323
|
-
|
|
324
312
|
// Experimental React Flare event system and event components support.
|
|
325
313
|
|
|
326
314
|
// Experimental Host Component support.
|
|
@@ -335,10 +323,6 @@ var enableFundamentalAPI = false; // Experimental Scope support.
|
|
|
335
323
|
// For tests, we flush suspense fallbacks in an act scope;
|
|
336
324
|
// *except* in some of our own tests, where we test incremental loading states.
|
|
337
325
|
|
|
338
|
-
// Changes priority of some events like mousemove to user-blocking priority,
|
|
339
|
-
// but without making them discrete. The flag exists in case it causes
|
|
340
|
-
// starvation problems.
|
|
341
|
-
|
|
342
326
|
// Add a callback property to suspense to notify which promises are currently
|
|
343
327
|
// in the update queue. This allows reporting and tracing of what is causing
|
|
344
328
|
// the user to see a loading state.
|
|
@@ -434,13 +418,11 @@ function isMounted(component) {
|
|
|
434
418
|
}
|
|
435
419
|
|
|
436
420
|
function assertIsMounted(fiber) {
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
throw ReactError(Error("Unable to find node on an unmounted component."));
|
|
441
|
-
}
|
|
421
|
+
if (!(getNearestMountedFiber(fiber) === fiber)) {
|
|
422
|
+
{
|
|
423
|
+
throw Error("Unable to find node on an unmounted component.");
|
|
442
424
|
}
|
|
443
|
-
}
|
|
425
|
+
}
|
|
444
426
|
}
|
|
445
427
|
|
|
446
428
|
function findCurrentFiberUsingSlowPath(fiber) {
|
|
@@ -450,13 +432,11 @@ function findCurrentFiberUsingSlowPath(fiber) {
|
|
|
450
432
|
// If there is no alternate, then we only need to check if it is mounted.
|
|
451
433
|
var nearestMounted = getNearestMountedFiber(fiber);
|
|
452
434
|
|
|
453
|
-
(
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
throw ReactError(Error("Unable to find node on an unmounted component."));
|
|
457
|
-
}
|
|
435
|
+
if (!(nearestMounted !== null)) {
|
|
436
|
+
{
|
|
437
|
+
throw Error("Unable to find node on an unmounted component.");
|
|
458
438
|
}
|
|
459
|
-
}
|
|
439
|
+
}
|
|
460
440
|
|
|
461
441
|
if (nearestMounted !== fiber) {
|
|
462
442
|
return null;
|
|
@@ -521,13 +501,11 @@ function findCurrentFiberUsingSlowPath(fiber) {
|
|
|
521
501
|
// way this could possibly happen is if this was unmounted, if at all.
|
|
522
502
|
|
|
523
503
|
|
|
524
|
-
|
|
504
|
+
{
|
|
525
505
|
{
|
|
526
|
-
|
|
527
|
-
throw ReactError(Error("Unable to find node on an unmounted component."));
|
|
528
|
-
}
|
|
506
|
+
throw Error("Unable to find node on an unmounted component.");
|
|
529
507
|
}
|
|
530
|
-
}
|
|
508
|
+
}
|
|
531
509
|
}
|
|
532
510
|
|
|
533
511
|
if (a.return !== b.return) {
|
|
@@ -586,34 +564,28 @@ function findCurrentFiberUsingSlowPath(fiber) {
|
|
|
586
564
|
_child = _child.sibling;
|
|
587
565
|
}
|
|
588
566
|
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
throw ReactError(Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue."));
|
|
593
|
-
}
|
|
567
|
+
if (!didFindChild) {
|
|
568
|
+
{
|
|
569
|
+
throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.");
|
|
594
570
|
}
|
|
595
|
-
}
|
|
571
|
+
}
|
|
596
572
|
}
|
|
597
573
|
}
|
|
598
574
|
|
|
599
|
-
(
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
throw ReactError(Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue."));
|
|
603
|
-
}
|
|
575
|
+
if (!(a.alternate === b)) {
|
|
576
|
+
{
|
|
577
|
+
throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.");
|
|
604
578
|
}
|
|
605
|
-
}
|
|
579
|
+
}
|
|
606
580
|
} // If the root is not a host container, we're in a disconnected tree. I.e.
|
|
607
581
|
// unmounted.
|
|
608
582
|
|
|
609
583
|
|
|
610
|
-
(
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
throw ReactError(Error("Unable to find node on an unmounted component."));
|
|
614
|
-
}
|
|
584
|
+
if (!(a.tag === HostRoot)) {
|
|
585
|
+
{
|
|
586
|
+
throw Error("Unable to find node on an unmounted component.");
|
|
615
587
|
}
|
|
616
|
-
}
|
|
588
|
+
}
|
|
617
589
|
|
|
618
590
|
if (a.stateNode.current === a) {
|
|
619
591
|
// We've determined that A is the current branch.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v0.
|
|
1
|
+
/** @license React v0.23.0
|
|
2
2
|
* react-reconciler-reflection.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
'use strict';Object.defineProperty(exports,"__esModule",{value:!0});function h(b){for(var a=
|
|
11
|
-
l.hasOwnProperty("ReactCurrentDispatcher")||(l.ReactCurrentDispatcher={current:null});l.hasOwnProperty("ReactCurrentBatchConfig")||(l.ReactCurrentBatchConfig={suspense:null});function m(b){var a=b,c=b;if(b.alternate)for(;a.return;)a=a.return;else{b=a;do a=b,0!==(a.effectTag&1026)&&(c=a.return),b=a.return;while(b)}return 3===a.tag?c:null}function n(b){if(m(b)!==b)throw h(
|
|
12
|
-
function p(b){var a=b.alternate;if(!a){a=m(b);if(null===a)throw h(
|
|
13
|
-
c){k=!0;c=e
|
|
10
|
+
'use strict';Object.defineProperty(exports,"__esModule",{value:!0});function h(b){for(var a="https://reactjs.org/docs/error-decoder.html?invariant="+b,c=1;c<arguments.length;c++)a+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+b+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=require("react").__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
11
|
+
l.hasOwnProperty("ReactCurrentDispatcher")||(l.ReactCurrentDispatcher={current:null});l.hasOwnProperty("ReactCurrentBatchConfig")||(l.ReactCurrentBatchConfig={suspense:null});function m(b){var a=b,c=b;if(b.alternate)for(;a.return;)a=a.return;else{b=a;do a=b,0!==(a.effectTag&1026)&&(c=a.return),b=a.return;while(b)}return 3===a.tag?c:null}function n(b){if(m(b)!==b)throw Error(h(188));}
|
|
12
|
+
function p(b){var a=b.alternate;if(!a){a=m(b);if(null===a)throw Error(h(188));return a!==b?null:b}for(var c=b,e=a;;){var f=c.return;if(null===f)break;var d=f.alternate;if(null===d){e=f.return;if(null!==e){c=e;continue}break}if(f.child===d.child){for(d=f.child;d;){if(d===c)return n(f),b;if(d===e)return n(f),a;d=d.sibling}throw Error(h(188));}if(c.return!==e.return)c=f,e=d;else{for(var k=!1,g=f.child;g;){if(g===c){k=!0;c=f;e=d;break}if(g===e){k=!0;e=f;c=d;break}g=g.sibling}if(!k){for(g=d.child;g;){if(g===
|
|
13
|
+
c){k=!0;c=d;e=f;break}if(g===e){k=!0;e=d;c=f;break}g=g.sibling}if(!k)throw Error(h(189));}}if(c.alternate!==e)throw Error(h(190));}if(3!==c.tag)throw Error(h(188));return c.stateNode.current===c?b:a}exports.getNearestMountedFiber=m;exports.getSuspenseInstanceFromFiber=function(b){if(13===b.tag){var a=b.memoizedState;null===a&&(b=b.alternate,null!==b&&(a=b.memoizedState));if(null!==a)return a.dehydrated}return null};
|
|
14
14
|
exports.getContainerFromFiber=function(b){return 3===b.tag?b.stateNode.containerInfo:null};exports.isFiberMounted=function(b){return m(b)===b};exports.isMounted=function(b){return(b=b._reactInternalFiber)?m(b)===b:!1};exports.findCurrentFiberUsingSlowPath=p;
|
|
15
15
|
exports.findCurrentHostFiber=function(b){b=p(b);if(!b)return null;for(var a=b;;){if(5===a.tag||6===a.tag)return a;if(a.child)a.child.return=a,a=a.child;else{if(a===b)break;for(;!a.sibling;){if(!a.return||a.return===b)return null;a=a.return}a.sibling.return=a.return;a=a.sibling}}return null};
|
|
16
16
|
exports.findCurrentHostFiberWithNoPortals=function(b){b=p(b);if(!b)return null;for(var a=b;;){if(5===a.tag||6===a.tag)return a;if(a.child&&4!==a.tag)a.child.return=a,a=a.child;else{if(a===b)break;for(;!a.sibling;){if(!a.return||a.return===b)return null;a=a.return}a.sibling.return=a.return;a=a.sibling}}return null};
|