@my-react/react-reconciler-compact 0.0.15 → 0.0.17
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/dist/cjs/index.development.js +214 -46
- package/dist/cjs/index.production.js +217 -45
- package/dist/esm/index.mjs +225 -57
- package/dist/types/feature.d.ts +48 -198
- package/dist/types/feature.d.ts.map +1 -1
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -1
- package/index.d.ts +3 -1
- package/package.json +6 -4
- package/preload.d.ts +1 -0
- package/preload.js +7 -0
package/dist/esm/index.mjs
CHANGED
|
@@ -808,12 +808,13 @@ function requireIndex_production () {
|
|
|
808
808
|
|
|
809
809
|
var currentRunningFiber$5 = typeExports.__my_react_internal__.currentRunningFiber, currentScheduler$h = typeExports.__my_react_internal__.currentScheduler, currentScopeFiber$1 = typeExports.__my_react_internal__.currentScopeFiber, currentError$1 = typeExports.__my_react_internal__.currentError, currentCallingFiber$1 = typeExports.__my_react_internal__.currentCallingFiber;
|
|
810
810
|
var safeCall = function (action) {
|
|
811
|
+
var _a;
|
|
811
812
|
var args = [];
|
|
812
813
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
813
814
|
args[_i - 1] = arguments[_i];
|
|
814
815
|
}
|
|
815
816
|
try {
|
|
816
|
-
return action.call.apply(
|
|
817
|
+
return (_a = action === null || action === void 0 ? void 0 : action.call) === null || _a === void 0 ? void 0 : _a.call.apply(_a, __spreadArray([action, null], args, false));
|
|
817
818
|
}
|
|
818
819
|
catch (e) {
|
|
819
820
|
var fiber = (currentCallingFiber$1 === null || currentCallingFiber$1 === void 0 ? void 0 : currentCallingFiber$1[(currentCallingFiber$1 === null || currentCallingFiber$1 === void 0 ? void 0 : currentCallingFiber$1.length) - 1]) || currentScopeFiber$1.current || currentRunningFiber$5.current;
|
|
@@ -823,6 +824,7 @@ function requireIndex_production () {
|
|
|
823
824
|
}
|
|
824
825
|
};
|
|
825
826
|
var safeCallWithCurrentFiber = function (_a) {
|
|
827
|
+
var _b;
|
|
826
828
|
var action = _a.action, fiber = _a.fiber, fallback = _a.fallback;
|
|
827
829
|
var args = [];
|
|
828
830
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
@@ -830,7 +832,7 @@ function requireIndex_production () {
|
|
|
830
832
|
}
|
|
831
833
|
currentCallingFiber$1.push(fiber);
|
|
832
834
|
try {
|
|
833
|
-
return action.call.apply(
|
|
835
|
+
return (_b = action === null || action === void 0 ? void 0 : action.call) === null || _b === void 0 ? void 0 : _b.call.apply(_b, __spreadArray([action, null], args, false));
|
|
834
836
|
}
|
|
835
837
|
catch (e) {
|
|
836
838
|
if (fallback) {
|
|
@@ -847,6 +849,7 @@ function requireIndex_production () {
|
|
|
847
849
|
}
|
|
848
850
|
};
|
|
849
851
|
var callWithFiber = function (_a) {
|
|
852
|
+
var _b;
|
|
850
853
|
var action = _a.action, fiber = _a.fiber;
|
|
851
854
|
var args = [];
|
|
852
855
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
@@ -854,20 +857,21 @@ function requireIndex_production () {
|
|
|
854
857
|
}
|
|
855
858
|
currentScopeFiber$1.current = fiber;
|
|
856
859
|
try {
|
|
857
|
-
return action.call.apply(
|
|
860
|
+
return (_b = action === null || action === void 0 ? void 0 : action.call) === null || _b === void 0 ? void 0 : _b.call.apply(_b, __spreadArray([action, null], args, false));
|
|
858
861
|
}
|
|
859
862
|
finally {
|
|
860
863
|
currentScopeFiber$1.current = null;
|
|
861
864
|
}
|
|
862
865
|
};
|
|
863
866
|
var safeCallWithSync = function (action) {
|
|
867
|
+
var _a;
|
|
864
868
|
var args = [];
|
|
865
869
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
866
870
|
args[_i - 1] = arguments[_i];
|
|
867
871
|
}
|
|
868
872
|
try {
|
|
869
873
|
beforeSyncUpdate();
|
|
870
|
-
return action.call.apply(
|
|
874
|
+
return (_a = action === null || action === void 0 ? void 0 : action.call) === null || _a === void 0 ? void 0 : _a.call.apply(_a, __spreadArray([action, null], args, false));
|
|
871
875
|
}
|
|
872
876
|
catch (e) {
|
|
873
877
|
var fiber = (currentCallingFiber$1 === null || currentCallingFiber$1 === void 0 ? void 0 : currentCallingFiber$1[(currentCallingFiber$1 === null || currentCallingFiber$1 === void 0 ? void 0 : currentCallingFiber$1.length) - 1]) || currentScopeFiber$1.current || currentRunningFiber$5.current;
|
|
@@ -3952,9 +3956,11 @@ function requireIndex_production () {
|
|
|
3952
3956
|
var renderScheduler = currentScheduler$7.current;
|
|
3953
3957
|
var currentHook = (_b = currentHookTreeNode$1.current) === null || _b === void 0 ? void 0 : _b.value;
|
|
3954
3958
|
if (!currentHook) {
|
|
3955
|
-
throw new Error(
|
|
3959
|
+
// throw new Error(`[@my-react/react] should have a hookList for current node, this is a bug for @my-react`);
|
|
3960
|
+
return createHookNode(renderDispatch, { type: type, value: value, reducer: reducer, deps: deps }, fiber);
|
|
3956
3961
|
}
|
|
3957
3962
|
if (type !== (currentHook === null || currentHook === void 0 ? void 0 : currentHook.type)) {
|
|
3963
|
+
// only throw error when type not match
|
|
3958
3964
|
throw new Error(getHookTree(currentHookTreeNode$1.current.prev, {
|
|
3959
3965
|
lastRender: currentHook === null || currentHook === void 0 ? void 0 : currentHook.type,
|
|
3960
3966
|
nextRender: type,
|
|
@@ -6420,7 +6426,7 @@ function requireIndex_production () {
|
|
|
6420
6426
|
_this.isAppMounted = false;
|
|
6421
6427
|
_this.isAppCrashed = false;
|
|
6422
6428
|
_this.isAppUnmounted = false;
|
|
6423
|
-
_this.version = "0.3.
|
|
6429
|
+
_this.version = "0.3.26";
|
|
6424
6430
|
_this.id = Math.random().toString(16).slice(2);
|
|
6425
6431
|
_this.mode = "production";
|
|
6426
6432
|
_this.renderMode = "render";
|
|
@@ -6466,9 +6472,7 @@ function requireIndex_production () {
|
|
|
6466
6472
|
if (include(_fiber.type, this.runtimeRef.typeForRef)) {
|
|
6467
6473
|
_fiber.patch = merge(_fiber.patch, PATCH_TYPE.__ref__);
|
|
6468
6474
|
}
|
|
6469
|
-
else if (exclude(_fiber.type, exports$1.NODE_TYPE.__forwardRef__))
|
|
6470
|
-
onceWarnWithKeyAndFiber(_fiber, "ref", "[@my-react/react] set ref for current element will be ignored");
|
|
6471
|
-
}
|
|
6475
|
+
else if (exclude(_fiber.type, exports$1.NODE_TYPE.__forwardRef__)) ;
|
|
6472
6476
|
}
|
|
6473
6477
|
};
|
|
6474
6478
|
CustomRenderDispatch.prototype.pendingUnmount = function (_fiber, _pendingUnmount) {
|
|
@@ -6658,7 +6662,7 @@ function requireIndex_production () {
|
|
|
6658
6662
|
});
|
|
6659
6663
|
}); };
|
|
6660
6664
|
|
|
6661
|
-
var version = "0.3.
|
|
6665
|
+
var version = "0.3.26";
|
|
6662
6666
|
|
|
6663
6667
|
exports$1.CustomRenderDispatch = CustomRenderDispatch;
|
|
6664
6668
|
exports$1.MyReactFiberNode = MyReactFiberNode;
|
|
@@ -7575,12 +7579,13 @@ function requireIndex_development () {
|
|
|
7575
7579
|
|
|
7576
7580
|
var currentRunningFiber$5 = typeExports.__my_react_internal__.currentRunningFiber, currentScheduler$h = typeExports.__my_react_internal__.currentScheduler, currentScopeFiber$1 = typeExports.__my_react_internal__.currentScopeFiber, currentError$1 = typeExports.__my_react_internal__.currentError, currentCallingFiber$1 = typeExports.__my_react_internal__.currentCallingFiber;
|
|
7577
7581
|
var safeCall = function (action) {
|
|
7582
|
+
var _a;
|
|
7578
7583
|
var args = [];
|
|
7579
7584
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
7580
7585
|
args[_i - 1] = arguments[_i];
|
|
7581
7586
|
}
|
|
7582
7587
|
try {
|
|
7583
|
-
return action.call.apply(
|
|
7588
|
+
return (_a = action === null || action === void 0 ? void 0 : action.call) === null || _a === void 0 ? void 0 : _a.call.apply(_a, __spreadArray([action, null], args, false));
|
|
7584
7589
|
}
|
|
7585
7590
|
catch (e) {
|
|
7586
7591
|
var fiber = (currentCallingFiber$1 === null || currentCallingFiber$1 === void 0 ? void 0 : currentCallingFiber$1[(currentCallingFiber$1 === null || currentCallingFiber$1 === void 0 ? void 0 : currentCallingFiber$1.length) - 1]) || currentScopeFiber$1.current || currentRunningFiber$5.current;
|
|
@@ -7590,6 +7595,7 @@ function requireIndex_development () {
|
|
|
7590
7595
|
}
|
|
7591
7596
|
};
|
|
7592
7597
|
var safeCallWithCurrentFiber = function (_a) {
|
|
7598
|
+
var _b;
|
|
7593
7599
|
var action = _a.action, fiber = _a.fiber, fallback = _a.fallback;
|
|
7594
7600
|
var args = [];
|
|
7595
7601
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
@@ -7597,7 +7603,7 @@ function requireIndex_development () {
|
|
|
7597
7603
|
}
|
|
7598
7604
|
currentCallingFiber$1.push(fiber);
|
|
7599
7605
|
try {
|
|
7600
|
-
return action.call.apply(
|
|
7606
|
+
return (_b = action === null || action === void 0 ? void 0 : action.call) === null || _b === void 0 ? void 0 : _b.call.apply(_b, __spreadArray([action, null], args, false));
|
|
7601
7607
|
}
|
|
7602
7608
|
catch (e) {
|
|
7603
7609
|
if (fallback) {
|
|
@@ -7614,6 +7620,7 @@ function requireIndex_development () {
|
|
|
7614
7620
|
}
|
|
7615
7621
|
};
|
|
7616
7622
|
var callWithFiber = function (_a) {
|
|
7623
|
+
var _b;
|
|
7617
7624
|
var action = _a.action, fiber = _a.fiber;
|
|
7618
7625
|
var args = [];
|
|
7619
7626
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
@@ -7621,20 +7628,21 @@ function requireIndex_development () {
|
|
|
7621
7628
|
}
|
|
7622
7629
|
currentScopeFiber$1.current = fiber;
|
|
7623
7630
|
try {
|
|
7624
|
-
return action.call.apply(
|
|
7631
|
+
return (_b = action === null || action === void 0 ? void 0 : action.call) === null || _b === void 0 ? void 0 : _b.call.apply(_b, __spreadArray([action, null], args, false));
|
|
7625
7632
|
}
|
|
7626
7633
|
finally {
|
|
7627
7634
|
currentScopeFiber$1.current = null;
|
|
7628
7635
|
}
|
|
7629
7636
|
};
|
|
7630
7637
|
var safeCallWithSync = function (action) {
|
|
7638
|
+
var _a;
|
|
7631
7639
|
var args = [];
|
|
7632
7640
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
7633
7641
|
args[_i - 1] = arguments[_i];
|
|
7634
7642
|
}
|
|
7635
7643
|
try {
|
|
7636
7644
|
beforeSyncUpdate();
|
|
7637
|
-
return action.call.apply(
|
|
7645
|
+
return (_a = action === null || action === void 0 ? void 0 : action.call) === null || _a === void 0 ? void 0 : _a.call.apply(_a, __spreadArray([action, null], args, false));
|
|
7638
7646
|
}
|
|
7639
7647
|
catch (e) {
|
|
7640
7648
|
var fiber = (currentCallingFiber$1 === null || currentCallingFiber$1 === void 0 ? void 0 : currentCallingFiber$1[(currentCallingFiber$1 === null || currentCallingFiber$1 === void 0 ? void 0 : currentCallingFiber$1.length) - 1]) || currentScopeFiber$1.current || currentRunningFiber$5.current;
|
|
@@ -11232,9 +11240,11 @@ function requireIndex_development () {
|
|
|
11232
11240
|
var renderScheduler = currentScheduler$7.current;
|
|
11233
11241
|
var currentHook = (_b = currentHookTreeNode$1.current) === null || _b === void 0 ? void 0 : _b.value;
|
|
11234
11242
|
if (!currentHook) {
|
|
11235
|
-
throw new Error(
|
|
11243
|
+
// throw new Error(`[@my-react/react] should have a hookList for current node, this is a bug for @my-react`);
|
|
11244
|
+
return createHookNode(renderDispatch, { type: type, value: value, reducer: reducer, deps: deps }, fiber);
|
|
11236
11245
|
}
|
|
11237
11246
|
if (type !== (currentHook === null || currentHook === void 0 ? void 0 : currentHook.type)) {
|
|
11247
|
+
// only throw error when type not match
|
|
11238
11248
|
throw new Error(getHookTree(currentHookTreeNode$1.current.prev, {
|
|
11239
11249
|
lastRender: currentHook === null || currentHook === void 0 ? void 0 : currentHook.type,
|
|
11240
11250
|
nextRender: type,
|
|
@@ -13863,7 +13873,7 @@ function requireIndex_development () {
|
|
|
13863
13873
|
_this.isAppMounted = false;
|
|
13864
13874
|
_this.isAppCrashed = false;
|
|
13865
13875
|
_this.isAppUnmounted = false;
|
|
13866
|
-
_this.version = "0.3.
|
|
13876
|
+
_this.version = "0.3.26";
|
|
13867
13877
|
_this.id = Math.random().toString(16).slice(2);
|
|
13868
13878
|
_this.mode = "development" ;
|
|
13869
13879
|
_this.renderMode = "render";
|
|
@@ -13909,9 +13919,7 @@ function requireIndex_development () {
|
|
|
13909
13919
|
if (include(_fiber.type, this.runtimeRef.typeForRef)) {
|
|
13910
13920
|
_fiber.patch = merge(_fiber.patch, PATCH_TYPE.__ref__);
|
|
13911
13921
|
}
|
|
13912
|
-
else if (exclude(_fiber.type, exports$1.NODE_TYPE.__forwardRef__))
|
|
13913
|
-
onceWarnWithKeyAndFiber(_fiber, "ref", "[@my-react/react] set ref for current element will be ignored");
|
|
13914
|
-
}
|
|
13922
|
+
else if (exclude(_fiber.type, exports$1.NODE_TYPE.__forwardRef__)) ;
|
|
13915
13923
|
}
|
|
13916
13924
|
};
|
|
13917
13925
|
CustomRenderDispatch.prototype.pendingUnmount = function (_fiber, _pendingUnmount) {
|
|
@@ -14121,7 +14129,7 @@ function requireIndex_development () {
|
|
|
14121
14129
|
});
|
|
14122
14130
|
}); };
|
|
14123
14131
|
|
|
14124
|
-
var version = "0.3.
|
|
14132
|
+
var version = "0.3.26";
|
|
14125
14133
|
|
|
14126
14134
|
exports$1.CustomRenderDispatch = CustomRenderDispatch;
|
|
14127
14135
|
exports$1.MyReactFiberNode = MyReactFiberNode;
|
|
@@ -15658,6 +15666,7 @@ var currentScheduler = typeExports.__my_react_internal__.currentScheduler;
|
|
|
15658
15666
|
// react-reconciler compat implementation
|
|
15659
15667
|
var Reconciler = function (_config) {
|
|
15660
15668
|
var rendererPackageName = "@my-react";
|
|
15669
|
+
var isRendering = false;
|
|
15661
15670
|
var ReconcilerSet = new Set();
|
|
15662
15671
|
if (process.env.NODE_ENV === "development" && enableKnownConfigLog.current) {
|
|
15663
15672
|
knownConfig(_config);
|
|
@@ -15665,11 +15674,9 @@ var Reconciler = function (_config) {
|
|
|
15665
15674
|
var createContainer = function (_container, flag) {
|
|
15666
15675
|
prepareScheduler();
|
|
15667
15676
|
if (flag === 0) {
|
|
15668
|
-
// legacy mode
|
|
15669
15677
|
_container.__flag__ = 0;
|
|
15670
15678
|
}
|
|
15671
15679
|
else {
|
|
15672
|
-
// concurrent mode
|
|
15673
15680
|
_container.__flag__ = 1;
|
|
15674
15681
|
}
|
|
15675
15682
|
enableDebugFiled.current = process.env.NODE_ENV === "development";
|
|
@@ -15678,49 +15685,60 @@ var Reconciler = function (_config) {
|
|
|
15678
15685
|
myreactReconcilerExports.enableFiberForLog.current = false;
|
|
15679
15686
|
return _container;
|
|
15680
15687
|
};
|
|
15688
|
+
var createHydrationContainer = function (_initialChildren, _callback, _container, flag, _hydrationCallbacks, _isStrictMode, _concurrentUpdatesByDefaultOverride, _identifierPrefix, _onRecoverableError, _transitionCallbacks) {
|
|
15689
|
+
var opaqueRoot = createContainer(_container, flag);
|
|
15690
|
+
updateContainer(_initialChildren, opaqueRoot, null, _callback !== null && _callback !== void 0 ? _callback : (function () { }));
|
|
15691
|
+
return opaqueRoot;
|
|
15692
|
+
};
|
|
15681
15693
|
var updateContainer = function (_element, _container, _ignore, _cb) {
|
|
15682
15694
|
var _a;
|
|
15683
15695
|
var renderDispatch = _container.__container__;
|
|
15684
15696
|
var renderScheduler = currentScheduler.current;
|
|
15685
|
-
|
|
15686
|
-
|
|
15687
|
-
if (renderDispatch
|
|
15688
|
-
|
|
15689
|
-
|
|
15690
|
-
|
|
15691
|
-
|
|
15692
|
-
|
|
15693
|
-
|
|
15694
|
-
|
|
15695
|
-
|
|
15696
|
-
|
|
15697
|
-
|
|
15697
|
+
isRendering = true;
|
|
15698
|
+
try {
|
|
15699
|
+
if (renderDispatch instanceof myreactReconcilerExports.CustomRenderDispatch) {
|
|
15700
|
+
var _fiber_1 = _container.__fiber__;
|
|
15701
|
+
if (renderDispatch.isAppCrashed || include(_fiber_1.state, STATE_TYPE.__unmount__)) {
|
|
15702
|
+
_container.__fiber__ = null;
|
|
15703
|
+
_container.__container__ = null;
|
|
15704
|
+
updateContainer(_element, _container, _config, _cb);
|
|
15705
|
+
return;
|
|
15706
|
+
}
|
|
15707
|
+
if (myreactReconcilerExports.checkIsSameType(_fiber_1, _element)) {
|
|
15708
|
+
_fiber_1._installElement(_element);
|
|
15709
|
+
myreactReconcilerExports.triggerUpdateOnFiber(_fiber_1, STATE_TYPE.__triggerSync__, _cb);
|
|
15710
|
+
return;
|
|
15711
|
+
}
|
|
15712
|
+
myreactReconcilerExports.unmountContainer(renderDispatch);
|
|
15713
|
+
(_a = _config === null || _config === void 0 ? void 0 : _config.clearContainer) === null || _a === void 0 ? void 0 : _a.call(_config, _container);
|
|
15714
|
+
ReconcilerSet.delete(renderDispatch);
|
|
15715
|
+
renderScheduler.dispatchSet.uniDelete(renderDispatch);
|
|
15716
|
+
delGlobalDispatch(renderDispatch);
|
|
15698
15717
|
}
|
|
15699
|
-
myreactReconcilerExports.
|
|
15700
|
-
|
|
15701
|
-
|
|
15702
|
-
|
|
15703
|
-
|
|
15718
|
+
var _fiber = new myreactReconcilerExports.MyReactFiberNode(_element);
|
|
15719
|
+
var _renderDispatch = createDispatch(_container, _fiber, _element, _config, _container.__flag__);
|
|
15720
|
+
_cb && _renderDispatch.pendingEffect(_fiber, _cb);
|
|
15721
|
+
ReconcilerSet.add(_renderDispatch);
|
|
15722
|
+
renderScheduler.dispatchSet.uniPush(_renderDispatch);
|
|
15723
|
+
_renderDispatch.renderPackage = rendererPackageName;
|
|
15724
|
+
_container.__fiber__ = _fiber;
|
|
15725
|
+
_container.__container__ = _renderDispatch;
|
|
15726
|
+
autoSetDevTools(_renderDispatch);
|
|
15727
|
+
autoSetDevHMR(_renderDispatch);
|
|
15728
|
+
myreactReconcilerExports.initialFiberNode(_renderDispatch, _fiber);
|
|
15729
|
+
myreactReconcilerExports.mountSync(_renderDispatch, _fiber);
|
|
15730
|
+
_renderDispatch.isAppMounted = true;
|
|
15731
|
+
}
|
|
15732
|
+
finally {
|
|
15733
|
+
isRendering = false;
|
|
15704
15734
|
}
|
|
15705
|
-
var _fiber = new myreactReconcilerExports.MyReactFiberNode(_element);
|
|
15706
|
-
var _renderDispatch = createDispatch(_container, _fiber, _element, _config, _container.__flag__);
|
|
15707
|
-
_cb && _renderDispatch.pendingEffect(_fiber, _cb);
|
|
15708
|
-
ReconcilerSet.add(_renderDispatch);
|
|
15709
|
-
renderScheduler.dispatchSet.uniPush(_renderDispatch);
|
|
15710
|
-
_renderDispatch.renderPackage = rendererPackageName;
|
|
15711
|
-
_container.__fiber__ = _fiber;
|
|
15712
|
-
_container.__container__ = _renderDispatch;
|
|
15713
|
-
autoSetDevTools(_renderDispatch);
|
|
15714
|
-
autoSetDevHMR(_renderDispatch);
|
|
15715
|
-
myreactReconcilerExports.initialFiberNode(_renderDispatch, _fiber);
|
|
15716
|
-
myreactReconcilerExports.mountSync(_renderDispatch, _fiber);
|
|
15717
|
-
_renderDispatch.isAppMounted = true;
|
|
15718
15735
|
};
|
|
15719
15736
|
var injectIntoDevTools = function (_config) {
|
|
15720
15737
|
rendererPackageName = _config.rendererPackageName || rendererPackageName;
|
|
15721
15738
|
ReconcilerSet.forEach(function (renderDispatch) { return (renderDispatch.renderPackage = rendererPackageName); });
|
|
15722
15739
|
if (globalThis["__MY_REACT_DEVTOOL_INTERNAL__"])
|
|
15723
|
-
return;
|
|
15740
|
+
return true;
|
|
15741
|
+
return false;
|
|
15724
15742
|
};
|
|
15725
15743
|
var injectIntoDevToolsAuto = function (url, _config) { return __awaiter(void 0, void 0, void 0, function () {
|
|
15726
15744
|
var init;
|
|
@@ -15746,22 +15764,172 @@ var Reconciler = function (_config) {
|
|
|
15746
15764
|
});
|
|
15747
15765
|
}); };
|
|
15748
15766
|
var getPublicRootInstance = function (_container) {
|
|
15749
|
-
|
|
15767
|
+
var fiber = _container.__fiber__;
|
|
15768
|
+
if (!fiber || !fiber.child) {
|
|
15769
|
+
return null;
|
|
15770
|
+
}
|
|
15771
|
+
return fiber.child.nativeNode;
|
|
15772
|
+
};
|
|
15773
|
+
var discreteUpdates = function (fn, a, b, c, d) {
|
|
15774
|
+
myreactReconcilerExports.beforeSyncUpdate();
|
|
15775
|
+
try {
|
|
15776
|
+
return fn(a, b, c, d);
|
|
15777
|
+
}
|
|
15778
|
+
finally {
|
|
15779
|
+
myreactReconcilerExports.afterSyncUpdate();
|
|
15780
|
+
}
|
|
15781
|
+
};
|
|
15782
|
+
var updateContainerSync = function (element, container, ignore, callback) {
|
|
15783
|
+
myreactReconcilerExports.beforeSyncUpdate();
|
|
15784
|
+
try {
|
|
15785
|
+
updateContainer(element, container, ignore, callback);
|
|
15786
|
+
}
|
|
15787
|
+
finally {
|
|
15788
|
+
myreactReconcilerExports.afterSyncUpdate();
|
|
15789
|
+
}
|
|
15790
|
+
};
|
|
15791
|
+
var flushPassiveEffects = function () {
|
|
15792
|
+
try {
|
|
15793
|
+
myreactReconcilerExports.flushEffectCallback();
|
|
15794
|
+
return true;
|
|
15795
|
+
}
|
|
15796
|
+
catch (_a) {
|
|
15797
|
+
return false;
|
|
15798
|
+
}
|
|
15799
|
+
};
|
|
15800
|
+
var isAlreadyRendering = function () {
|
|
15801
|
+
return isRendering;
|
|
15802
|
+
};
|
|
15803
|
+
var deferredUpdates = function (fn) {
|
|
15804
|
+
return fn();
|
|
15805
|
+
};
|
|
15806
|
+
var findHostInstance = function (component) {
|
|
15807
|
+
try {
|
|
15808
|
+
var fiber = myreactReconcilerExports.getInstanceOwnerFiber(component);
|
|
15809
|
+
if (!fiber)
|
|
15810
|
+
return null;
|
|
15811
|
+
var current = fiber;
|
|
15812
|
+
while (current) {
|
|
15813
|
+
if (current.nativeNode && typeof current.type === "string") {
|
|
15814
|
+
return (_config === null || _config === void 0 ? void 0 : _config.getPublicInstance) ? _config.getPublicInstance(current.nativeNode) : current.nativeNode;
|
|
15815
|
+
}
|
|
15816
|
+
current = current.child;
|
|
15817
|
+
}
|
|
15818
|
+
return null;
|
|
15819
|
+
}
|
|
15820
|
+
catch (_a) {
|
|
15821
|
+
return null;
|
|
15822
|
+
}
|
|
15823
|
+
};
|
|
15824
|
+
var findHostInstanceWithWarning = function (component, _methodName) {
|
|
15825
|
+
return findHostInstance(component);
|
|
15826
|
+
};
|
|
15827
|
+
var findHostInstanceWithNoPortals = function (fiber) {
|
|
15828
|
+
return findHostInstance(fiber);
|
|
15829
|
+
};
|
|
15830
|
+
var attemptSynchronousHydration = function (_fiber) {
|
|
15831
|
+
// no-op: hydration not yet supported in MyReact reconciler-compact
|
|
15832
|
+
};
|
|
15833
|
+
var attemptDiscreteHydration = function (_fiber) {
|
|
15834
|
+
// no-op
|
|
15835
|
+
};
|
|
15836
|
+
var attemptContinuousHydration = function (_fiber) {
|
|
15837
|
+
// no-op
|
|
15838
|
+
};
|
|
15839
|
+
var attemptHydrationAtCurrentPriority = function (_fiber) {
|
|
15840
|
+
// no-op
|
|
15841
|
+
};
|
|
15842
|
+
var getCurrentUpdatePriority = function () {
|
|
15843
|
+
return 0;
|
|
15844
|
+
};
|
|
15845
|
+
var runWithPriority = function (_priority, fn) {
|
|
15846
|
+
return fn();
|
|
15847
|
+
};
|
|
15848
|
+
var shouldErrorImpl = null;
|
|
15849
|
+
var shouldSuspendImpl = null;
|
|
15850
|
+
var shouldError = function (fiber) {
|
|
15851
|
+
return shouldErrorImpl ? shouldErrorImpl(fiber) : undefined;
|
|
15852
|
+
};
|
|
15853
|
+
var shouldSuspend = function (fiber) {
|
|
15854
|
+
return shouldSuspendImpl ? shouldSuspendImpl(fiber) : false;
|
|
15855
|
+
};
|
|
15856
|
+
var registerMutableSourceForHydration = function (_root, _mutableSource) {
|
|
15857
|
+
// no-op
|
|
15858
|
+
};
|
|
15859
|
+
var createComponentSelector = function (component) { return ({ $$typeof: Symbol.for("react.test.selector"), value: component }); };
|
|
15860
|
+
var createHasPseudoClassSelector = function (selectors) { return ({ $$typeof: Symbol.for("react.test.selector"), value: selectors }); };
|
|
15861
|
+
var createRoleSelector = function (role) { return ({ $$typeof: Symbol.for("react.test.selector"), value: role }); };
|
|
15862
|
+
var createTextSelector = function (text) { return ({ $$typeof: Symbol.for("react.test.selector"), value: text }); };
|
|
15863
|
+
var createTestNameSelector = function (id) { return ({ $$typeof: Symbol.for("react.test.selector"), value: id }); };
|
|
15864
|
+
var getFindAllNodesFailureDescription = function (_hostRoot, _selectors) {
|
|
15865
|
+
return null;
|
|
15866
|
+
};
|
|
15867
|
+
var findAllNodes = function (_hostRoot, _selectors) {
|
|
15868
|
+
return [];
|
|
15869
|
+
};
|
|
15870
|
+
var findBoundingRects = function (_hostRoot, _selectors) {
|
|
15871
|
+
return [];
|
|
15872
|
+
};
|
|
15873
|
+
var focusWithin = function (_hostRoot, _selectors) {
|
|
15874
|
+
return false;
|
|
15875
|
+
};
|
|
15876
|
+
var observeVisibleRects = function (_hostRoot, _selectors, _callback, _options) {
|
|
15877
|
+
return { disconnect: function () { } };
|
|
15750
15878
|
};
|
|
15751
15879
|
return {
|
|
15752
15880
|
createPortal: createPortal,
|
|
15753
15881
|
createContainer: createContainer,
|
|
15882
|
+
createHydrationContainer: createHydrationContainer,
|
|
15754
15883
|
updateContainer: updateContainer,
|
|
15884
|
+
updateContainerSync: updateContainerSync,
|
|
15755
15885
|
injectIntoDevTools: injectIntoDevTools,
|
|
15756
15886
|
getPublicRootInstance: getPublicRootInstance,
|
|
15757
15887
|
injectIntoDevToolsAuto: injectIntoDevToolsAuto,
|
|
15758
15888
|
flushSync: myreactReconcilerExports.safeCallWithSync,
|
|
15759
15889
|
flushSyncWork: myreactReconcilerExports.safeCallWithSync,
|
|
15760
15890
|
batchedUpdates: myreactReconcilerExports.safeCallWithSync,
|
|
15891
|
+
discreteUpdates: discreteUpdates,
|
|
15892
|
+
deferredUpdates: deferredUpdates,
|
|
15893
|
+
flushPassiveEffects: flushPassiveEffects,
|
|
15894
|
+
isAlreadyRendering: isAlreadyRendering,
|
|
15895
|
+
findHostInstance: findHostInstance,
|
|
15896
|
+
findHostInstanceWithWarning: findHostInstanceWithWarning,
|
|
15897
|
+
findHostInstanceWithNoPortals: findHostInstanceWithNoPortals,
|
|
15898
|
+
attemptSynchronousHydration: attemptSynchronousHydration,
|
|
15899
|
+
attemptDiscreteHydration: attemptDiscreteHydration,
|
|
15900
|
+
attemptContinuousHydration: attemptContinuousHydration,
|
|
15901
|
+
attemptHydrationAtCurrentPriority: attemptHydrationAtCurrentPriority,
|
|
15902
|
+
getCurrentUpdatePriority: getCurrentUpdatePriority,
|
|
15903
|
+
runWithPriority: runWithPriority,
|
|
15904
|
+
shouldError: shouldError,
|
|
15905
|
+
shouldSuspend: shouldSuspend,
|
|
15906
|
+
registerMutableSourceForHydration: registerMutableSourceForHydration,
|
|
15907
|
+
createComponentSelector: createComponentSelector,
|
|
15908
|
+
createHasPseudoClassSelector: createHasPseudoClassSelector,
|
|
15909
|
+
createRoleSelector: createRoleSelector,
|
|
15910
|
+
createTextSelector: createTextSelector,
|
|
15911
|
+
createTestNameSelector: createTestNameSelector,
|
|
15912
|
+
getFindAllNodesFailureDescription: getFindAllNodesFailureDescription,
|
|
15913
|
+
findAllNodes: findAllNodes,
|
|
15914
|
+
findBoundingRects: findBoundingRects,
|
|
15915
|
+
focusWithin: focusWithin,
|
|
15916
|
+
observeVisibleRects: observeVisibleRects,
|
|
15761
15917
|
};
|
|
15762
15918
|
};
|
|
15763
15919
|
|
|
15764
|
-
var version = "0.0.
|
|
15920
|
+
var version = "0.0.17";
|
|
15765
15921
|
var createReconciler = Reconciler;
|
|
15922
|
+
var defaultOnUncaughtError = function (error) {
|
|
15923
|
+
console.error("Uncaught", error);
|
|
15924
|
+
};
|
|
15925
|
+
var defaultOnCaughtError = function (error) {
|
|
15926
|
+
console.error("Caught", error);
|
|
15927
|
+
};
|
|
15928
|
+
var defaultOnRecoverableError = function (error) {
|
|
15929
|
+
console.error("Recoverable", error);
|
|
15930
|
+
};
|
|
15931
|
+
var startHostTransition = function () {
|
|
15932
|
+
// no-op
|
|
15933
|
+
};
|
|
15766
15934
|
|
|
15767
|
-
export { createReconciler, createReconciler as default, enableKnownConfigLog, version };
|
|
15935
|
+
export { createReconciler, createReconciler as default, defaultOnCaughtError, defaultOnRecoverableError, defaultOnUncaughtError, enableKnownConfigLog, startHostTransition, version };
|