react 19.0.0-canary-e3ebcd54b-20240405 → 19.0.0-canary-adb717393-20240411
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/cjs/react-jsx-dev-runtime.development.js +53 -34
- package/cjs/react-jsx-runtime.development.js +53 -34
- package/cjs/react-jsx-runtime.production.js +27 -16
- package/cjs/react-jsx-runtime.production.min.js +1 -1
- package/cjs/react-jsx-runtime.production.min.js.map +1 -1
- package/cjs/react-jsx-runtime.profiling.js +27 -16
- package/cjs/react-jsx-runtime.profiling.min.js +1 -1
- package/cjs/react-jsx-runtime.profiling.min.js.map +1 -1
- package/cjs/react-jsx-runtime.react-server.development.js +58 -34
- package/cjs/react-jsx-runtime.react-server.production.js +31 -15
- package/cjs/react-jsx-runtime.react-server.production.min.js +2 -1
- package/cjs/react-jsx-runtime.react-server.production.min.js.map +1 -1
- package/cjs/react.development.js +118 -150
- package/cjs/react.production.js +13 -53
- package/cjs/react.production.min.js +17 -18
- package/cjs/react.production.min.js.map +1 -1
- package/cjs/react.react-server.development.js +83 -110
- package/cjs/react.react-server.production.js +14 -58
- package/cjs/react.react-server.production.min.js +17 -18
- package/cjs/react.react-server.production.min.js.map +1 -1
- package/package.json +1 -1
- package/umd/react.development.js +158 -159
- package/umd/react.production.min.js +23 -24
- package/umd/react.profiling.min.js +23 -24
@@ -51,7 +51,7 @@ function getIteratorFn(maybeIterable) {
|
|
51
51
|
return null;
|
52
52
|
}
|
53
53
|
|
54
|
-
var ReactSharedInternals = React.
|
54
|
+
var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
55
55
|
|
56
56
|
function error(format) {
|
57
57
|
{
|
@@ -69,8 +69,7 @@ function printWarning(level, format, args) {
|
|
69
69
|
// When changing this logic, you might want to also
|
70
70
|
// update consoleWithStackDev.www.js as well.
|
71
71
|
{
|
72
|
-
var
|
73
|
-
var stack = ReactDebugCurrentFrame.getStackAddendum();
|
72
|
+
var stack = ReactSharedInternals.getStackAddendum();
|
74
73
|
|
75
74
|
if (stack !== '') {
|
76
75
|
format += '%s';
|
@@ -419,9 +418,8 @@ function reenableLogs() {
|
|
419
418
|
}
|
420
419
|
}
|
421
420
|
|
422
|
-
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
|
423
421
|
var prefix;
|
424
|
-
function describeBuiltInComponentFrame(name
|
422
|
+
function describeBuiltInComponentFrame(name) {
|
425
423
|
{
|
426
424
|
if (prefix === undefined) {
|
427
425
|
// Extract the VM specific prefix used by each line.
|
@@ -475,13 +473,13 @@ function describeNativeComponentFrame(fn, construct) {
|
|
475
473
|
var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined.
|
476
474
|
|
477
475
|
Error.prepareStackTrace = undefined;
|
478
|
-
var previousDispatcher;
|
476
|
+
var previousDispatcher = null;
|
479
477
|
|
480
478
|
{
|
481
|
-
previousDispatcher =
|
479
|
+
previousDispatcher = ReactSharedInternals.H; // Set the dispatcher in DEV because this might be call in the render function
|
482
480
|
// for warnings.
|
483
481
|
|
484
|
-
|
482
|
+
ReactSharedInternals.H = null;
|
485
483
|
disableLogs();
|
486
484
|
}
|
487
485
|
/**
|
@@ -666,7 +664,7 @@ function describeNativeComponentFrame(fn, construct) {
|
|
666
664
|
reentry = false;
|
667
665
|
|
668
666
|
{
|
669
|
-
|
667
|
+
ReactSharedInternals.H = previousDispatcher;
|
670
668
|
reenableLogs();
|
671
669
|
}
|
672
670
|
|
@@ -685,7 +683,7 @@ function describeNativeComponentFrame(fn, construct) {
|
|
685
683
|
|
686
684
|
return syntheticFrame;
|
687
685
|
}
|
688
|
-
function describeFunctionComponentFrame(fn
|
686
|
+
function describeFunctionComponentFrame(fn) {
|
689
687
|
{
|
690
688
|
return describeNativeComponentFrame(fn, false);
|
691
689
|
}
|
@@ -696,7 +694,7 @@ function shouldConstruct(Component) {
|
|
696
694
|
return !!(prototype && prototype.isReactComponent);
|
697
695
|
}
|
698
696
|
|
699
|
-
function describeUnknownElementTypeFrameInDEV(type
|
697
|
+
function describeUnknownElementTypeFrameInDEV(type) {
|
700
698
|
|
701
699
|
if (type == null) {
|
702
700
|
return '';
|
@@ -727,7 +725,7 @@ function describeUnknownElementTypeFrameInDEV(type, ownerFn) {
|
|
727
725
|
|
728
726
|
case REACT_MEMO_TYPE:
|
729
727
|
// Memo may contain any component type so we recursively resolve it.
|
730
|
-
return describeUnknownElementTypeFrameInDEV(type.type
|
728
|
+
return describeUnknownElementTypeFrameInDEV(type.type);
|
731
729
|
|
732
730
|
case REACT_LAZY_TYPE:
|
733
731
|
{
|
@@ -737,7 +735,7 @@ function describeUnknownElementTypeFrameInDEV(type, ownerFn) {
|
|
737
735
|
|
738
736
|
try {
|
739
737
|
// Lazy may contain any component type so we recursively resolve it.
|
740
|
-
return describeUnknownElementTypeFrameInDEV(init(payload)
|
738
|
+
return describeUnknownElementTypeFrameInDEV(init(payload));
|
741
739
|
} catch (x) {}
|
742
740
|
}
|
743
741
|
}
|
@@ -746,8 +744,6 @@ function describeUnknownElementTypeFrameInDEV(type, ownerFn) {
|
|
746
744
|
return '';
|
747
745
|
}
|
748
746
|
|
749
|
-
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
750
|
-
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
751
747
|
var REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference');
|
752
748
|
var specialPropKeyWarningShown;
|
753
749
|
var didWarnAboutElementRef;
|
@@ -1012,9 +1008,6 @@ function jsxDEV$1(type, config, maybeKey, isStaticChildren, source, self) {
|
|
1012
1008
|
}
|
1013
1009
|
}
|
1014
1010
|
|
1015
|
-
var propName; // Reserved names are extracted
|
1016
|
-
|
1017
|
-
var props = {};
|
1018
1011
|
var key = null;
|
1019
1012
|
var ref = null; // Currently, key can be spread in as a prop. This causes a potential
|
1020
1013
|
// issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
|
@@ -1039,14 +1032,33 @@ function jsxDEV$1(type, config, maybeKey, isStaticChildren, source, self) {
|
|
1039
1032
|
key = '' + config.key;
|
1040
1033
|
}
|
1041
1034
|
|
1042
|
-
if (hasValidRef(config)) ;
|
1035
|
+
if (hasValidRef(config)) ;
|
1043
1036
|
|
1037
|
+
var props;
|
1044
1038
|
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1039
|
+
if (!('key' in config)) {
|
1040
|
+
// If key was not spread in, we can reuse the original props object. This
|
1041
|
+
// only works for `jsx`, not `createElement`, because `jsx` is a compiler
|
1042
|
+
// target and the compiler always passes a new object. For `createElement`,
|
1043
|
+
// we can't assume a new object is passed every time because it can be
|
1044
|
+
// called manually.
|
1045
|
+
//
|
1046
|
+
// Spreading key is a warning in dev. In a future release, we will not
|
1047
|
+
// remove a spread key from the props object. (But we'll still warn.) We'll
|
1048
|
+
// always pass the object straight through.
|
1049
|
+
props = config;
|
1050
|
+
} else {
|
1051
|
+
// We need to remove reserved props (key, prop, ref). Create a fresh props
|
1052
|
+
// object and copy over all the non-reserved props. We don't use `delete`
|
1053
|
+
// because in V8 it will deopt the object to dictionary mode.
|
1054
|
+
props = {};
|
1055
|
+
|
1056
|
+
for (var propName in config) {
|
1057
|
+
// Skip over reserved prop names
|
1058
|
+
if (propName !== 'key' && (enableRefAsProp )) {
|
1059
|
+
{
|
1060
|
+
props[propName] = config[propName];
|
1061
|
+
}
|
1050
1062
|
}
|
1051
1063
|
}
|
1052
1064
|
}
|
@@ -1059,7 +1071,7 @@ function jsxDEV$1(type, config, maybeKey, isStaticChildren, source, self) {
|
|
1059
1071
|
}
|
1060
1072
|
}
|
1061
1073
|
|
1062
|
-
var element = ReactElement(type, key, ref, self, source,
|
1074
|
+
var element = ReactElement(type, key, ref, self, source, ReactSharedInternals.owner, props);
|
1063
1075
|
|
1064
1076
|
if (type === REACT_FRAGMENT_TYPE) {
|
1065
1077
|
validateFragmentProps(element);
|
@@ -1071,8 +1083,8 @@ function jsxDEV$1(type, config, maybeKey, isStaticChildren, source, self) {
|
|
1071
1083
|
|
1072
1084
|
function getDeclarationErrorAddendum() {
|
1073
1085
|
{
|
1074
|
-
if (
|
1075
|
-
var name = getComponentNameFromType(
|
1086
|
+
if (ReactSharedInternals.owner) {
|
1087
|
+
var name = getComponentNameFromType(ReactSharedInternals.owner.type);
|
1076
1088
|
|
1077
1089
|
if (name) {
|
1078
1090
|
return '\n\nCheck the render method of `' + name + '`.';
|
@@ -1176,9 +1188,17 @@ function validateExplicitKey(element, parentType) {
|
|
1176
1188
|
|
1177
1189
|
var childOwner = '';
|
1178
1190
|
|
1179
|
-
if (element && element._owner && element._owner !==
|
1180
|
-
|
1181
|
-
|
1191
|
+
if (element && element._owner != null && element._owner !== ReactSharedInternals.owner) {
|
1192
|
+
var ownerName = null;
|
1193
|
+
|
1194
|
+
if (typeof element._owner.tag === 'number') {
|
1195
|
+
ownerName = getComponentNameFromType(element._owner.type);
|
1196
|
+
} else if (typeof element._owner.name === 'string') {
|
1197
|
+
ownerName = element._owner.name;
|
1198
|
+
} // Give the component that originally created this child.
|
1199
|
+
|
1200
|
+
|
1201
|
+
childOwner = " It was passed a child from " + ownerName + ".";
|
1182
1202
|
}
|
1183
1203
|
|
1184
1204
|
setCurrentlyValidatingElement(element);
|
@@ -1192,11 +1212,10 @@ function validateExplicitKey(element, parentType) {
|
|
1192
1212
|
function setCurrentlyValidatingElement(element) {
|
1193
1213
|
{
|
1194
1214
|
if (element) {
|
1195
|
-
var
|
1196
|
-
|
1197
|
-
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
1215
|
+
var stack = describeUnknownElementTypeFrameInDEV(element.type);
|
1216
|
+
ReactSharedInternals.setExtraStackFrame(stack);
|
1198
1217
|
} else {
|
1199
|
-
|
1218
|
+
ReactSharedInternals.setExtraStackFrame(null);
|
1200
1219
|
}
|
1201
1220
|
}
|
1202
1221
|
}
|
@@ -51,7 +51,7 @@ function getIteratorFn(maybeIterable) {
|
|
51
51
|
return null;
|
52
52
|
}
|
53
53
|
|
54
|
-
var ReactSharedInternals = React.
|
54
|
+
var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
55
55
|
|
56
56
|
function error(format) {
|
57
57
|
{
|
@@ -69,8 +69,7 @@ function printWarning(level, format, args) {
|
|
69
69
|
// When changing this logic, you might want to also
|
70
70
|
// update consoleWithStackDev.www.js as well.
|
71
71
|
{
|
72
|
-
var
|
73
|
-
var stack = ReactDebugCurrentFrame.getStackAddendum();
|
72
|
+
var stack = ReactSharedInternals.getStackAddendum();
|
74
73
|
|
75
74
|
if (stack !== '') {
|
76
75
|
format += '%s';
|
@@ -419,9 +418,8 @@ function reenableLogs() {
|
|
419
418
|
}
|
420
419
|
}
|
421
420
|
|
422
|
-
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
|
423
421
|
var prefix;
|
424
|
-
function describeBuiltInComponentFrame(name
|
422
|
+
function describeBuiltInComponentFrame(name) {
|
425
423
|
{
|
426
424
|
if (prefix === undefined) {
|
427
425
|
// Extract the VM specific prefix used by each line.
|
@@ -475,13 +473,13 @@ function describeNativeComponentFrame(fn, construct) {
|
|
475
473
|
var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined.
|
476
474
|
|
477
475
|
Error.prepareStackTrace = undefined;
|
478
|
-
var previousDispatcher;
|
476
|
+
var previousDispatcher = null;
|
479
477
|
|
480
478
|
{
|
481
|
-
previousDispatcher =
|
479
|
+
previousDispatcher = ReactSharedInternals.H; // Set the dispatcher in DEV because this might be call in the render function
|
482
480
|
// for warnings.
|
483
481
|
|
484
|
-
|
482
|
+
ReactSharedInternals.H = null;
|
485
483
|
disableLogs();
|
486
484
|
}
|
487
485
|
/**
|
@@ -666,7 +664,7 @@ function describeNativeComponentFrame(fn, construct) {
|
|
666
664
|
reentry = false;
|
667
665
|
|
668
666
|
{
|
669
|
-
|
667
|
+
ReactSharedInternals.H = previousDispatcher;
|
670
668
|
reenableLogs();
|
671
669
|
}
|
672
670
|
|
@@ -685,7 +683,7 @@ function describeNativeComponentFrame(fn, construct) {
|
|
685
683
|
|
686
684
|
return syntheticFrame;
|
687
685
|
}
|
688
|
-
function describeFunctionComponentFrame(fn
|
686
|
+
function describeFunctionComponentFrame(fn) {
|
689
687
|
{
|
690
688
|
return describeNativeComponentFrame(fn, false);
|
691
689
|
}
|
@@ -696,7 +694,7 @@ function shouldConstruct(Component) {
|
|
696
694
|
return !!(prototype && prototype.isReactComponent);
|
697
695
|
}
|
698
696
|
|
699
|
-
function describeUnknownElementTypeFrameInDEV(type
|
697
|
+
function describeUnknownElementTypeFrameInDEV(type) {
|
700
698
|
|
701
699
|
if (type == null) {
|
702
700
|
return '';
|
@@ -727,7 +725,7 @@ function describeUnknownElementTypeFrameInDEV(type, ownerFn) {
|
|
727
725
|
|
728
726
|
case REACT_MEMO_TYPE:
|
729
727
|
// Memo may contain any component type so we recursively resolve it.
|
730
|
-
return describeUnknownElementTypeFrameInDEV(type.type
|
728
|
+
return describeUnknownElementTypeFrameInDEV(type.type);
|
731
729
|
|
732
730
|
case REACT_LAZY_TYPE:
|
733
731
|
{
|
@@ -737,7 +735,7 @@ function describeUnknownElementTypeFrameInDEV(type, ownerFn) {
|
|
737
735
|
|
738
736
|
try {
|
739
737
|
// Lazy may contain any component type so we recursively resolve it.
|
740
|
-
return describeUnknownElementTypeFrameInDEV(init(payload)
|
738
|
+
return describeUnknownElementTypeFrameInDEV(init(payload));
|
741
739
|
} catch (x) {}
|
742
740
|
}
|
743
741
|
}
|
@@ -746,8 +744,6 @@ function describeUnknownElementTypeFrameInDEV(type, ownerFn) {
|
|
746
744
|
return '';
|
747
745
|
}
|
748
746
|
|
749
|
-
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
750
|
-
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
751
747
|
var REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference');
|
752
748
|
var specialPropKeyWarningShown;
|
753
749
|
var didWarnAboutElementRef;
|
@@ -1036,9 +1032,6 @@ function jsxDEV(type, config, maybeKey, isStaticChildren, source, self) {
|
|
1036
1032
|
}
|
1037
1033
|
}
|
1038
1034
|
|
1039
|
-
var propName; // Reserved names are extracted
|
1040
|
-
|
1041
|
-
var props = {};
|
1042
1035
|
var key = null;
|
1043
1036
|
var ref = null; // Currently, key can be spread in as a prop. This causes a potential
|
1044
1037
|
// issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
|
@@ -1063,14 +1056,33 @@ function jsxDEV(type, config, maybeKey, isStaticChildren, source, self) {
|
|
1063
1056
|
key = '' + config.key;
|
1064
1057
|
}
|
1065
1058
|
|
1066
|
-
if (hasValidRef(config)) ;
|
1059
|
+
if (hasValidRef(config)) ;
|
1067
1060
|
|
1061
|
+
var props;
|
1068
1062
|
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1063
|
+
if (!('key' in config)) {
|
1064
|
+
// If key was not spread in, we can reuse the original props object. This
|
1065
|
+
// only works for `jsx`, not `createElement`, because `jsx` is a compiler
|
1066
|
+
// target and the compiler always passes a new object. For `createElement`,
|
1067
|
+
// we can't assume a new object is passed every time because it can be
|
1068
|
+
// called manually.
|
1069
|
+
//
|
1070
|
+
// Spreading key is a warning in dev. In a future release, we will not
|
1071
|
+
// remove a spread key from the props object. (But we'll still warn.) We'll
|
1072
|
+
// always pass the object straight through.
|
1073
|
+
props = config;
|
1074
|
+
} else {
|
1075
|
+
// We need to remove reserved props (key, prop, ref). Create a fresh props
|
1076
|
+
// object and copy over all the non-reserved props. We don't use `delete`
|
1077
|
+
// because in V8 it will deopt the object to dictionary mode.
|
1078
|
+
props = {};
|
1079
|
+
|
1080
|
+
for (var propName in config) {
|
1081
|
+
// Skip over reserved prop names
|
1082
|
+
if (propName !== 'key' && (enableRefAsProp )) {
|
1083
|
+
{
|
1084
|
+
props[propName] = config[propName];
|
1085
|
+
}
|
1074
1086
|
}
|
1075
1087
|
}
|
1076
1088
|
}
|
@@ -1083,7 +1095,7 @@ function jsxDEV(type, config, maybeKey, isStaticChildren, source, self) {
|
|
1083
1095
|
}
|
1084
1096
|
}
|
1085
1097
|
|
1086
|
-
var element = ReactElement(type, key, ref, self, source,
|
1098
|
+
var element = ReactElement(type, key, ref, self, source, ReactSharedInternals.owner, props);
|
1087
1099
|
|
1088
1100
|
if (type === REACT_FRAGMENT_TYPE) {
|
1089
1101
|
validateFragmentProps(element);
|
@@ -1095,8 +1107,8 @@ function jsxDEV(type, config, maybeKey, isStaticChildren, source, self) {
|
|
1095
1107
|
|
1096
1108
|
function getDeclarationErrorAddendum() {
|
1097
1109
|
{
|
1098
|
-
if (
|
1099
|
-
var name = getComponentNameFromType(
|
1110
|
+
if (ReactSharedInternals.owner) {
|
1111
|
+
var name = getComponentNameFromType(ReactSharedInternals.owner.type);
|
1100
1112
|
|
1101
1113
|
if (name) {
|
1102
1114
|
return '\n\nCheck the render method of `' + name + '`.';
|
@@ -1200,9 +1212,17 @@ function validateExplicitKey(element, parentType) {
|
|
1200
1212
|
|
1201
1213
|
var childOwner = '';
|
1202
1214
|
|
1203
|
-
if (element && element._owner && element._owner !==
|
1204
|
-
|
1205
|
-
|
1215
|
+
if (element && element._owner != null && element._owner !== ReactSharedInternals.owner) {
|
1216
|
+
var ownerName = null;
|
1217
|
+
|
1218
|
+
if (typeof element._owner.tag === 'number') {
|
1219
|
+
ownerName = getComponentNameFromType(element._owner.type);
|
1220
|
+
} else if (typeof element._owner.name === 'string') {
|
1221
|
+
ownerName = element._owner.name;
|
1222
|
+
} // Give the component that originally created this child.
|
1223
|
+
|
1224
|
+
|
1225
|
+
childOwner = " It was passed a child from " + ownerName + ".";
|
1206
1226
|
}
|
1207
1227
|
|
1208
1228
|
setCurrentlyValidatingElement(element);
|
@@ -1216,11 +1236,10 @@ function validateExplicitKey(element, parentType) {
|
|
1216
1236
|
function setCurrentlyValidatingElement(element) {
|
1217
1237
|
{
|
1218
1238
|
if (element) {
|
1219
|
-
var
|
1220
|
-
|
1221
|
-
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
1239
|
+
var stack = describeUnknownElementTypeFrameInDEV(element.type);
|
1240
|
+
ReactSharedInternals.setExtraStackFrame(stack);
|
1222
1241
|
} else {
|
1223
|
-
|
1242
|
+
ReactSharedInternals.setExtraStackFrame(null);
|
1224
1243
|
}
|
1225
1244
|
}
|
1226
1245
|
}
|
@@ -26,12 +26,7 @@ const REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
|
|
26
26
|
|
27
27
|
const enableRefAsProp = true;
|
28
28
|
|
29
|
-
const ReactSharedInternals = React.
|
30
|
-
|
31
|
-
// $FlowFixMe[method-unbinding]
|
32
|
-
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
33
|
-
|
34
|
-
const ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
29
|
+
const ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
35
30
|
|
36
31
|
function hasValidKey(config) {
|
37
32
|
|
@@ -100,9 +95,6 @@ function ReactElement(type, key, _ref, self, source, owner, props) {
|
|
100
95
|
|
101
96
|
|
102
97
|
function jsxProd(type, config, maybeKey) {
|
103
|
-
let propName; // Reserved names are extracted
|
104
|
-
|
105
|
-
const props = {};
|
106
98
|
let key = null;
|
107
99
|
let ref = null; // Currently, key can be spread in as a prop. This causes a potential
|
108
100
|
// issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
|
@@ -121,17 +113,36 @@ function jsxProd(type, config, maybeKey) {
|
|
121
113
|
key = '' + config.key;
|
122
114
|
}
|
123
115
|
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
116
|
+
let props;
|
117
|
+
|
118
|
+
if (!('key' in config)) {
|
119
|
+
// If key was not spread in, we can reuse the original props object. This
|
120
|
+
// only works for `jsx`, not `createElement`, because `jsx` is a compiler
|
121
|
+
// target and the compiler always passes a new object. For `createElement`,
|
122
|
+
// we can't assume a new object is passed every time because it can be
|
123
|
+
// called manually.
|
124
|
+
//
|
125
|
+
// Spreading key is a warning in dev. In a future release, we will not
|
126
|
+
// remove a spread key from the props object. (But we'll still warn.) We'll
|
127
|
+
// always pass the object straight through.
|
128
|
+
props = config;
|
129
|
+
} else {
|
130
|
+
// We need to remove reserved props (key, prop, ref). Create a fresh props
|
131
|
+
// object and copy over all the non-reserved props. We don't use `delete`
|
132
|
+
// because in V8 it will deopt the object to dictionary mode.
|
133
|
+
props = {};
|
134
|
+
|
135
|
+
for (const propName in config) {
|
136
|
+
// Skip over reserved prop names
|
137
|
+
if (propName !== 'key' && (enableRefAsProp )) {
|
138
|
+
{
|
139
|
+
props[propName] = config[propName];
|
140
|
+
}
|
130
141
|
}
|
131
142
|
}
|
132
143
|
}
|
133
144
|
|
134
|
-
return ReactElement(type, key, ref, undefined, undefined,
|
145
|
+
return ReactElement(type, key, ref, undefined, undefined, ReactSharedInternals.owner, props);
|
135
146
|
} // While `jsxDEV` should never be called when running in production, we do
|
136
147
|
|
137
148
|
const jsx = jsxProd; // we may want to special case jsxs internally to take advantage of static children.
|
@@ -7,6 +7,6 @@
|
|
7
7
|
This source code is licensed under the MIT license found in the
|
8
8
|
LICENSE file in the root directory of this source tree.
|
9
9
|
*/
|
10
|
-
'use strict';require("react");var e=Symbol.for("react.element"),
|
10
|
+
'use strict';require("react");var e=Symbol.for("react.element"),f=Symbol.for("react.fragment");function g(h,a,b){var c=null;void 0!==b&&(c=""+b);void 0!==a.key&&(c=""+a.key);if("key"in a){b={};for(var d in a)"key"!==d&&(b[d]=a[d])}else b=a;a=b.ref;return{$$typeof:e,type:h,key:c,ref:void 0!==a?a:null,props:b}}exports.Fragment=f;exports.jsx=g;exports.jsxs=g;
|
11
11
|
|
12
12
|
//# sourceMappingURL=react-jsx-runtime.production.min.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"react-jsx-runtime.production.min.js","lineCount":10,"mappings":"A;;;;;;;;;aAYYA,OAAA,CAAQ,OAAR,CAMZ,KAAMC,EAAqBC,MAAOC,CAAAA,GAAP,CAAW,eAAX,CAA3B,CACMC,EAAsBF,MAAOC,CAAAA,GAAP,CAAW,gBAAX,
|
1
|
+
{"version":3,"file":"react-jsx-runtime.production.min.js","lineCount":10,"mappings":"A;;;;;;;;;aAYYA,OAAA,CAAQ,OAAR,CAMZ,KAAMC,EAAqBC,MAAOC,CAAAA,GAAP,CAAW,eAAX,CAA3B,CACMC,EAAsBF,MAAOC,CAAAA,GAAP,CAAW,gBAAX,CA6E5BE,SAASA,EAAO,CAACC,CAAD,CAAOC,CAAP,CAAeC,CAAf,CAAyB,CACvC,IAAIC,EAAM,IAQOC,KAAAA,EAAjB,GAAIF,CAAJ,GAEEC,CAFF,CAEQ,EAFR,CAEaD,CAFb,CAzEsBE,KAAAA,EA8EtB,GAAgBH,CA9EFE,CAAAA,GA8Ed,GAEEA,CAFF,CAEQ,EAFR,CAEaF,CAAOE,CAAAA,GAFpB,CAOA,IAAM,KAAN,EAAeF,EAAf,CAWO,CAILI,CAAA,CAAQ,EAER,KAAKC,IAAMA,CAAX,GAAuBL,EAAvB,CAEmB,KAAjB,GAAIK,CAAJ,GAEID,CAAA,CAAMC,CAAN,CAFJ,CAEsBL,CAAA,CAAOK,CAAP,CAFtB,CARG,CAXP,IAUED,EAAA,CAAQJ,CA9DFM,EAAAA,CA+E8EF,CA/E9DG,CAAAA,GA+ExB,OArEYC,CAERC,SAAUf,CAFFc,CAIRT,KAiEgBA,CArERS,CAKRN,IAgEsBA,CArEdM,CAMRD,IAbgBJ,IAAAA,EAAZI,GAAAD,CAAAC,CAAwBD,CAAxBC,CAAkC,IAO9BC,CAORJ,MA8DkFA,CArE1EI,CAqB2B,CAwDzCE,OAAQC,CAAAA,QAAR,CAAmBd,CACnBa,QAAQE,CAAAA,GAAR,CAAcA,CACdF,QAAQG,CAAAA,IAAR,CAAeA;","sources":["react-jsx-runtime.production.js"],"names":["require","REACT_ELEMENT_TYPE","Symbol","for","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","undefined","props","propName","refProp","ref","element","$$typeof","exports","Fragment","jsx","jsxs"],"ignoreList":[0]}
|
@@ -26,12 +26,7 @@ const REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
|
|
26
26
|
|
27
27
|
const enableRefAsProp = true;
|
28
28
|
|
29
|
-
const ReactSharedInternals = React.
|
30
|
-
|
31
|
-
// $FlowFixMe[method-unbinding]
|
32
|
-
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
33
|
-
|
34
|
-
const ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
29
|
+
const ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
35
30
|
|
36
31
|
function hasValidKey(config) {
|
37
32
|
|
@@ -100,9 +95,6 @@ function ReactElement(type, key, _ref, self, source, owner, props) {
|
|
100
95
|
|
101
96
|
|
102
97
|
function jsxProd(type, config, maybeKey) {
|
103
|
-
let propName; // Reserved names are extracted
|
104
|
-
|
105
|
-
const props = {};
|
106
98
|
let key = null;
|
107
99
|
let ref = null; // Currently, key can be spread in as a prop. This causes a potential
|
108
100
|
// issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
|
@@ -121,17 +113,36 @@ function jsxProd(type, config, maybeKey) {
|
|
121
113
|
key = '' + config.key;
|
122
114
|
}
|
123
115
|
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
116
|
+
let props;
|
117
|
+
|
118
|
+
if (!('key' in config)) {
|
119
|
+
// If key was not spread in, we can reuse the original props object. This
|
120
|
+
// only works for `jsx`, not `createElement`, because `jsx` is a compiler
|
121
|
+
// target and the compiler always passes a new object. For `createElement`,
|
122
|
+
// we can't assume a new object is passed every time because it can be
|
123
|
+
// called manually.
|
124
|
+
//
|
125
|
+
// Spreading key is a warning in dev. In a future release, we will not
|
126
|
+
// remove a spread key from the props object. (But we'll still warn.) We'll
|
127
|
+
// always pass the object straight through.
|
128
|
+
props = config;
|
129
|
+
} else {
|
130
|
+
// We need to remove reserved props (key, prop, ref). Create a fresh props
|
131
|
+
// object and copy over all the non-reserved props. We don't use `delete`
|
132
|
+
// because in V8 it will deopt the object to dictionary mode.
|
133
|
+
props = {};
|
134
|
+
|
135
|
+
for (const propName in config) {
|
136
|
+
// Skip over reserved prop names
|
137
|
+
if (propName !== 'key' && (enableRefAsProp )) {
|
138
|
+
{
|
139
|
+
props[propName] = config[propName];
|
140
|
+
}
|
130
141
|
}
|
131
142
|
}
|
132
143
|
}
|
133
144
|
|
134
|
-
return ReactElement(type, key, ref, undefined, undefined,
|
145
|
+
return ReactElement(type, key, ref, undefined, undefined, ReactSharedInternals.owner, props);
|
135
146
|
} // While `jsxDEV` should never be called when running in production, we do
|
136
147
|
|
137
148
|
const jsx = jsxProd; // we may want to special case jsxs internally to take advantage of static children.
|
@@ -7,6 +7,6 @@
|
|
7
7
|
This source code is licensed under the MIT license found in the
|
8
8
|
LICENSE file in the root directory of this source tree.
|
9
9
|
*/
|
10
|
-
'use strict';require("react");var e=Symbol.for("react.element"),
|
10
|
+
'use strict';require("react");var e=Symbol.for("react.element"),f=Symbol.for("react.fragment");function g(h,a,b){var c=null;void 0!==b&&(c=""+b);void 0!==a.key&&(c=""+a.key);if("key"in a){b={};for(var d in a)"key"!==d&&(b[d]=a[d])}else b=a;a=b.ref;return{$$typeof:e,type:h,key:c,ref:void 0!==a?a:null,props:b}}exports.Fragment=f;exports.jsx=g;exports.jsxs=g;
|
11
11
|
|
12
12
|
//# sourceMappingURL=react-jsx-runtime.profiling.min.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"react-jsx-runtime.profiling.min.js","lineCount":10,"mappings":"A;;;;;;;;;aAYYA,OAAA,CAAQ,OAAR,CAMZ,KAAMC,EAAqBC,MAAOC,CAAAA,GAAP,CAAW,eAAX,CAA3B,CACMC,EAAsBF,MAAOC,CAAAA,GAAP,CAAW,gBAAX,
|
1
|
+
{"version":3,"file":"react-jsx-runtime.profiling.min.js","lineCount":10,"mappings":"A;;;;;;;;;aAYYA,OAAA,CAAQ,OAAR,CAMZ,KAAMC,EAAqBC,MAAOC,CAAAA,GAAP,CAAW,eAAX,CAA3B,CACMC,EAAsBF,MAAOC,CAAAA,GAAP,CAAW,gBAAX,CA6E5BE,SAASA,EAAO,CAACC,CAAD,CAAOC,CAAP,CAAeC,CAAf,CAAyB,CACvC,IAAIC,EAAM,IAQOC,KAAAA,EAAjB,GAAIF,CAAJ,GAEEC,CAFF,CAEQ,EAFR,CAEaD,CAFb,CAzEsBE,KAAAA,EA8EtB,GAAgBH,CA9EFE,CAAAA,GA8Ed,GAEEA,CAFF,CAEQ,EAFR,CAEaF,CAAOE,CAAAA,GAFpB,CAOA,IAAM,KAAN,EAAeF,EAAf,CAWO,CAILI,CAAA,CAAQ,EAER,KAAKC,IAAMA,CAAX,GAAuBL,EAAvB,CAEmB,KAAjB,GAAIK,CAAJ,GAEID,CAAA,CAAMC,CAAN,CAFJ,CAEsBL,CAAA,CAAOK,CAAP,CAFtB,CARG,CAXP,IAUED,EAAA,CAAQJ,CA9DFM,EAAAA,CA+E8EF,CA/E9DG,CAAAA,GA+ExB,OArEYC,CAERC,SAAUf,CAFFc,CAIRT,KAiEgBA,CArERS,CAKRN,IAgEsBA,CArEdM,CAMRD,IAbgBJ,IAAAA,EAAZI,GAAAD,CAAAC,CAAwBD,CAAxBC,CAAkC,IAO9BC,CAORJ,MA8DkFA,CArE1EI,CAqB2B,CAwDzCE,OAAQC,CAAAA,QAAR,CAAmBd,CACnBa,QAAQE,CAAAA,GAAR,CAAcA,CACdF,QAAQG,CAAAA,IAAR,CAAeA;","sources":["react-jsx-runtime.profiling.js"],"names":["require","REACT_ELEMENT_TYPE","Symbol","for","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","undefined","props","propName","refProp","ref","element","$$typeof","exports","Fragment","jsx","jsxs"],"ignoreList":[0]}
|