react-reconciler 0.22.0 → 0.24.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-reconciler-persistent.development.js +804 -718
- package/cjs/react-reconciler-persistent.production.min.js +164 -164
- package/cjs/react-reconciler-reflection.development.js +36 -62
- package/cjs/react-reconciler-reflection.production.min.js +5 -5
- package/cjs/react-reconciler.development.js +809 -732
- 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.24.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.
|
|
@@ -285,12 +277,8 @@ var Hydrating =
|
|
|
285
277
|
|
|
286
278
|
// Union of all host effects
|
|
287
279
|
|
|
288
|
-
// Helps identify side effects in
|
|
289
|
-
|
|
290
|
-
// In some cases, StrictMode should also double-render lifecycles.
|
|
291
|
-
// This can be confusing for tests though,
|
|
292
|
-
// And it can be bad for performance in production.
|
|
293
|
-
// This feature flag can be used to control the behavior:
|
|
280
|
+
// Helps identify side effects in render-phase lifecycle hooks and setState
|
|
281
|
+
// reducers by double invoking them in Strict Mode.
|
|
294
282
|
|
|
295
283
|
// To preserve the "Pause on caught exceptions" behavior of the debugger, we
|
|
296
284
|
// replay the begin phase of a failed component inside invokeGuardedCallback.
|
|
@@ -301,9 +289,8 @@ var Hydrating =
|
|
|
301
289
|
|
|
302
290
|
// Trace which interactions trigger each commit.
|
|
303
291
|
|
|
304
|
-
//
|
|
292
|
+
// SSR experiments
|
|
305
293
|
|
|
306
|
-
// TODO: true? Here it might just be false.
|
|
307
294
|
|
|
308
295
|
// Only used in www builds.
|
|
309
296
|
|
|
@@ -318,9 +305,6 @@ var Hydrating =
|
|
|
318
305
|
// Control this behavior with a flag to support 16.6 minor releases in the meanwhile.
|
|
319
306
|
|
|
320
307
|
|
|
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
308
|
// Experimental React Flare event system and event components support.
|
|
325
309
|
|
|
326
310
|
// Experimental Host Component support.
|
|
@@ -330,15 +314,11 @@ var enableFundamentalAPI = false; // Experimental Scope support.
|
|
|
330
314
|
// New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107
|
|
331
315
|
|
|
332
316
|
// We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?)
|
|
333
|
-
// Till then, we warn about the missing mock, but still fallback to a
|
|
317
|
+
// Till then, we warn about the missing mock, but still fallback to a legacy mode compatible version
|
|
334
318
|
|
|
335
319
|
// For tests, we flush suspense fallbacks in an act scope;
|
|
336
320
|
// *except* in some of our own tests, where we test incremental loading states.
|
|
337
321
|
|
|
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
322
|
// Add a callback property to suspense to notify which promises are currently
|
|
343
323
|
// in the update queue. This allows reporting and tracing of what is causing
|
|
344
324
|
// the user to see a loading state.
|
|
@@ -349,6 +329,12 @@ var enableFundamentalAPI = false; // Experimental Scope support.
|
|
|
349
329
|
// from React.createElement to React.jsx
|
|
350
330
|
// https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md
|
|
351
331
|
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
// Flag to turn event.target and event.currentTarget in ReactNative from a reactTag to a component instance
|
|
337
|
+
|
|
352
338
|
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
|
353
339
|
function getNearestMountedFiber(fiber) {
|
|
354
340
|
var node = fiber;
|
|
@@ -434,13 +420,11 @@ function isMounted(component) {
|
|
|
434
420
|
}
|
|
435
421
|
|
|
436
422
|
function assertIsMounted(fiber) {
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
throw ReactError(Error("Unable to find node on an unmounted component."));
|
|
441
|
-
}
|
|
423
|
+
if (!(getNearestMountedFiber(fiber) === fiber)) {
|
|
424
|
+
{
|
|
425
|
+
throw Error("Unable to find node on an unmounted component.");
|
|
442
426
|
}
|
|
443
|
-
}
|
|
427
|
+
}
|
|
444
428
|
}
|
|
445
429
|
|
|
446
430
|
function findCurrentFiberUsingSlowPath(fiber) {
|
|
@@ -450,13 +434,11 @@ function findCurrentFiberUsingSlowPath(fiber) {
|
|
|
450
434
|
// If there is no alternate, then we only need to check if it is mounted.
|
|
451
435
|
var nearestMounted = getNearestMountedFiber(fiber);
|
|
452
436
|
|
|
453
|
-
(
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
throw ReactError(Error("Unable to find node on an unmounted component."));
|
|
457
|
-
}
|
|
437
|
+
if (!(nearestMounted !== null)) {
|
|
438
|
+
{
|
|
439
|
+
throw Error("Unable to find node on an unmounted component.");
|
|
458
440
|
}
|
|
459
|
-
}
|
|
441
|
+
}
|
|
460
442
|
|
|
461
443
|
if (nearestMounted !== fiber) {
|
|
462
444
|
return null;
|
|
@@ -521,13 +503,11 @@ function findCurrentFiberUsingSlowPath(fiber) {
|
|
|
521
503
|
// way this could possibly happen is if this was unmounted, if at all.
|
|
522
504
|
|
|
523
505
|
|
|
524
|
-
|
|
506
|
+
{
|
|
525
507
|
{
|
|
526
|
-
|
|
527
|
-
throw ReactError(Error("Unable to find node on an unmounted component."));
|
|
528
|
-
}
|
|
508
|
+
throw Error("Unable to find node on an unmounted component.");
|
|
529
509
|
}
|
|
530
|
-
}
|
|
510
|
+
}
|
|
531
511
|
}
|
|
532
512
|
|
|
533
513
|
if (a.return !== b.return) {
|
|
@@ -586,34 +566,28 @@ function findCurrentFiberUsingSlowPath(fiber) {
|
|
|
586
566
|
_child = _child.sibling;
|
|
587
567
|
}
|
|
588
568
|
|
|
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
|
-
}
|
|
569
|
+
if (!didFindChild) {
|
|
570
|
+
{
|
|
571
|
+
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
572
|
}
|
|
595
|
-
}
|
|
573
|
+
}
|
|
596
574
|
}
|
|
597
575
|
}
|
|
598
576
|
|
|
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
|
-
}
|
|
577
|
+
if (!(a.alternate === b)) {
|
|
578
|
+
{
|
|
579
|
+
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
580
|
}
|
|
605
|
-
}
|
|
581
|
+
}
|
|
606
582
|
} // If the root is not a host container, we're in a disconnected tree. I.e.
|
|
607
583
|
// unmounted.
|
|
608
584
|
|
|
609
585
|
|
|
610
|
-
(
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
throw ReactError(Error("Unable to find node on an unmounted component."));
|
|
614
|
-
}
|
|
586
|
+
if (!(a.tag === HostRoot)) {
|
|
587
|
+
{
|
|
588
|
+
throw Error("Unable to find node on an unmounted component.");
|
|
615
589
|
}
|
|
616
|
-
}
|
|
590
|
+
}
|
|
617
591
|
|
|
618
592
|
if (a.stateNode.current === a) {
|
|
619
593
|
// We've determined that A is the current branch.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v0.
|
|
1
|
+
/** @license React v0.24.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};
|