react-dom 18.2.0 → 18.3.1
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-dom-server-legacy.browser.development.js +12 -1
- package/cjs/react-dom-server-legacy.browser.production.min.js +1 -1
- package/cjs/react-dom-server-legacy.node.development.js +16 -1
- package/cjs/react-dom-server-legacy.node.production.min.js +1 -1
- package/cjs/react-dom-server.browser.development.js +12 -1
- package/cjs/react-dom-server.browser.production.min.js +1 -1
- package/cjs/react-dom-server.node.development.js +12 -1
- package/cjs/react-dom-server.node.production.min.js +1 -1
- package/cjs/react-dom-test-utils.development.js +23 -1
- package/cjs/react-dom.development.js +4591 -4536
- package/cjs/react-dom.production.min.js +177 -178
- package/cjs/react-dom.profiling.min.js +198 -199
- package/package.json +3 -3
- package/umd/react-dom-server-legacy.browser.development.js +12 -1
- package/umd/react-dom-server-legacy.browser.production.min.js +1 -1
- package/umd/react-dom-server.browser.development.js +12 -1
- package/umd/react-dom-server.browser.production.min.js +1 -1
- package/umd/react-dom-test-utils.development.js +23 -1
- package/umd/react-dom.development.js +4591 -4536
- package/umd/react-dom.production.min.js +225 -225
- package/umd/react-dom.profiling.min.js +265 -265
|
@@ -16,7 +16,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
16
16
|
|
|
17
17
|
var React = require('react');
|
|
18
18
|
|
|
19
|
-
var ReactVersion = '18.
|
|
19
|
+
var ReactVersion = '18.3.1';
|
|
20
20
|
|
|
21
21
|
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
22
22
|
|
|
@@ -5705,6 +5705,7 @@ var didWarnAboutModulePatternComponent = {};
|
|
|
5705
5705
|
var didWarnAboutContextTypeOnFunctionComponent = {};
|
|
5706
5706
|
var didWarnAboutGetDerivedStateOnFunctionComponent = {};
|
|
5707
5707
|
var didWarnAboutReassigningProps = false;
|
|
5708
|
+
var didWarnAboutDefaultPropsOnFunctionComponent = {};
|
|
5708
5709
|
var didWarnAboutGenerators = false;
|
|
5709
5710
|
var didWarnAboutMaps = false;
|
|
5710
5711
|
var hasWarnedAboutUsingContextAsConsumer = false; // This would typically be a function component but we still support module pattern
|
|
@@ -5800,6 +5801,16 @@ function validateFunctionComponentInDev(Component) {
|
|
|
5800
5801
|
}
|
|
5801
5802
|
}
|
|
5802
5803
|
|
|
5804
|
+
if ( Component.defaultProps !== undefined) {
|
|
5805
|
+
var componentName = getComponentNameFromType(Component) || 'Unknown';
|
|
5806
|
+
|
|
5807
|
+
if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) {
|
|
5808
|
+
error('%s: Support for defaultProps will be removed from function components ' + 'in a future major release. Use JavaScript default parameters instead.', componentName);
|
|
5809
|
+
|
|
5810
|
+
didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true;
|
|
5811
|
+
}
|
|
5812
|
+
}
|
|
5813
|
+
|
|
5803
5814
|
if (typeof Component.getDerivedStateFromProps === 'function') {
|
|
5804
5815
|
var _componentName3 = getComponentNameFromType(Component) || 'Unknown';
|
|
5805
5816
|
|
|
@@ -90,4 +90,4 @@ for(h=0;h<da.length;h++)if(!Qb(f,g,mb,da[h])){h++;da.splice(0,h);var nb=!1;break
|
|
|
90
90
|
function Rb(a,b){try{var c=a.abortableTasks;c.forEach(function(c){return Lb(c,a,b)});c.clear();null!==a.destination&&Mb(a,a.destination)}catch(d){V(a,d),W(a,d)}}function Sb(){}
|
|
91
91
|
function Tb(a,b,c,d){var f=!1,e=null,g="",h={push:function(a){null!==a&&(g+=a);return!0},destroy:function(a){f=!0;e=a}},k=!1;a=Ab(a,Ea(c,b?b.identifierPrefix:void 0),{insertionMode:1,selectedValue:null},Infinity,Sb,void 0,function(){k=!0},void 0,void 0);Cb(a);Rb(a,d);if(1===a.status)a.status=2,h.destroy(a.fatalError);else if(2!==a.status&&null===a.destination){a.destination=h;try{Mb(a,h)}catch(m){V(a,m),W(a,m)}}if(f)throw e;if(!k)throw Error(l(426));return g}
|
|
92
92
|
exports.renderToNodeStream=function(){throw Error(l(207));};exports.renderToStaticMarkup=function(a,b){return Tb(a,b,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')};exports.renderToStaticNodeStream=function(){throw Error(l(208));};exports.renderToString=function(a,b){return Tb(a,b,!1,'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')};
|
|
93
|
-
exports.version="18.
|
|
93
|
+
exports.version="18.3.1";
|
|
@@ -17,7 +17,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
17
17
|
var React = require('react');
|
|
18
18
|
var stream = require('stream');
|
|
19
19
|
|
|
20
|
-
var ReactVersion = '18.
|
|
20
|
+
var ReactVersion = '18.3.1';
|
|
21
21
|
|
|
22
22
|
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
23
23
|
|
|
@@ -5706,6 +5706,7 @@ var didWarnAboutModulePatternComponent = {};
|
|
|
5706
5706
|
var didWarnAboutContextTypeOnFunctionComponent = {};
|
|
5707
5707
|
var didWarnAboutGetDerivedStateOnFunctionComponent = {};
|
|
5708
5708
|
var didWarnAboutReassigningProps = false;
|
|
5709
|
+
var didWarnAboutDefaultPropsOnFunctionComponent = {};
|
|
5709
5710
|
var didWarnAboutGenerators = false;
|
|
5710
5711
|
var didWarnAboutMaps = false;
|
|
5711
5712
|
var hasWarnedAboutUsingContextAsConsumer = false; // This would typically be a function component but we still support module pattern
|
|
@@ -5801,6 +5802,16 @@ function validateFunctionComponentInDev(Component) {
|
|
|
5801
5802
|
}
|
|
5802
5803
|
}
|
|
5803
5804
|
|
|
5805
|
+
if ( Component.defaultProps !== undefined) {
|
|
5806
|
+
var componentName = getComponentNameFromType(Component) || 'Unknown';
|
|
5807
|
+
|
|
5808
|
+
if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) {
|
|
5809
|
+
error('%s: Support for defaultProps will be removed from function components ' + 'in a future major release. Use JavaScript default parameters instead.', componentName);
|
|
5810
|
+
|
|
5811
|
+
didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true;
|
|
5812
|
+
}
|
|
5813
|
+
}
|
|
5814
|
+
|
|
5804
5815
|
if (typeof Component.getDerivedStateFromProps === 'function') {
|
|
5805
5816
|
var _componentName3 = getComponentNameFromType(Component) || 'Unknown';
|
|
5806
5817
|
|
|
@@ -7058,6 +7069,10 @@ function renderToNodeStream(children, options) {
|
|
|
7058
7069
|
}
|
|
7059
7070
|
|
|
7060
7071
|
function renderToStaticNodeStream(children, options) {
|
|
7072
|
+
{
|
|
7073
|
+
error('ReactDOMServer.renderToStaticNodeStream() is deprecated.' + ' Use ReactDOMServer.renderToPipeableStream() and wait to `pipe` until the `onAllReady`' + ' callback has been called instead.');
|
|
7074
|
+
}
|
|
7075
|
+
|
|
7061
7076
|
return renderToNodeStreamImpl(children, options);
|
|
7062
7077
|
}
|
|
7063
7078
|
|
|
@@ -98,4 +98,4 @@ function Vb(a,b,c,d){var f=!1,e=null,g="",h=!1;a=Cb(a,Fa(c,b?b.identifierPrefix:
|
|
|
98
98
|
function Wb(a,b){a.prototype=Object.create(b.prototype);a.prototype.constructor=a;a.__proto__=b}var Xb=function(a){function b(){var b=a.call(this,{})||this;b.request=null;b.startedFlowing=!1;return b}Wb(b,a);var c=b.prototype;c._destroy=function(a,b){Tb(this.request);b(a)};c._read=function(){this.startedFlowing&&Sb(this.request,this)};return b}(fa.Readable);function Yb(){}
|
|
99
99
|
function Zb(a,b){var c=new Xb,d=Cb(a,Fa(!1,b?b.identifierPrefix:void 0),Ga(),Infinity,Yb,function(){c.startedFlowing=!0;Sb(d,c)},void 0,void 0);c.request=d;Eb(d);return c}exports.renderToNodeStream=function(a,b){return Zb(a,b)};exports.renderToStaticMarkup=function(a,b){return Vb(a,b,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server')};
|
|
100
100
|
exports.renderToStaticNodeStream=function(a,b){return Zb(a,b)};exports.renderToString=function(a,b){return Vb(a,b,!1,'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server')};
|
|
101
|
-
exports.version="18.
|
|
101
|
+
exports.version="18.3.1";
|
|
@@ -16,7 +16,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
16
16
|
|
|
17
17
|
var React = require('react');
|
|
18
18
|
|
|
19
|
-
var ReactVersion = '18.
|
|
19
|
+
var ReactVersion = '18.3.1';
|
|
20
20
|
|
|
21
21
|
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
22
22
|
|
|
@@ -5702,6 +5702,7 @@ var didWarnAboutModulePatternComponent = {};
|
|
|
5702
5702
|
var didWarnAboutContextTypeOnFunctionComponent = {};
|
|
5703
5703
|
var didWarnAboutGetDerivedStateOnFunctionComponent = {};
|
|
5704
5704
|
var didWarnAboutReassigningProps = false;
|
|
5705
|
+
var didWarnAboutDefaultPropsOnFunctionComponent = {};
|
|
5705
5706
|
var didWarnAboutGenerators = false;
|
|
5706
5707
|
var didWarnAboutMaps = false;
|
|
5707
5708
|
var hasWarnedAboutUsingContextAsConsumer = false; // This would typically be a function component but we still support module pattern
|
|
@@ -5797,6 +5798,16 @@ function validateFunctionComponentInDev(Component) {
|
|
|
5797
5798
|
}
|
|
5798
5799
|
}
|
|
5799
5800
|
|
|
5801
|
+
if ( Component.defaultProps !== undefined) {
|
|
5802
|
+
var componentName = getComponentNameFromType(Component) || 'Unknown';
|
|
5803
|
+
|
|
5804
|
+
if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) {
|
|
5805
|
+
error('%s: Support for defaultProps will be removed from function components ' + 'in a future major release. Use JavaScript default parameters instead.', componentName);
|
|
5806
|
+
|
|
5807
|
+
didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true;
|
|
5808
|
+
}
|
|
5809
|
+
}
|
|
5810
|
+
|
|
5800
5811
|
if (typeof Component.getDerivedStateFromProps === 'function') {
|
|
5801
5812
|
var _componentName3 = getComponentNameFromType(Component) || 'Unknown';
|
|
5802
5813
|
|
|
@@ -93,4 +93,4 @@ Mb));if(null===m)throw Error(k(395));p(d,m);p(d,Ob);if(q||r||v)p(d,Qb),p(d,u(Sb(
|
|
|
93
93
|
g,G,ma[h])){h++;ma.splice(0,h);var Fb=!1;break a}ma.splice(0,h);Fb=!0}if(!Fb){a.destination=null;e++;F.splice(0,e);return}}F.splice(0,e);var na=a.completedBoundaries;for(e=0;e<na.length;e++)if(!jd(a,b,na[e])){a.destination=null;e++;na.splice(0,e);return}na.splice(0,e)}finally{ba(b),0===a.allPendingTasks&&0===a.pingedTasks.length&&0===a.clientRenderedBoundaries.length&&0===a.completedBoundaries.length&&b.close()}}
|
|
94
94
|
function ld(a,b){try{var c=a.abortableTasks;c.forEach(function(c){return ed(c,a,b)});c.clear();null!==a.destination&&fd(a,a.destination)}catch(d){Y(a,d),Vc(a,d)}}
|
|
95
95
|
exports.renderToReadableStream=function(a,b){return new Promise(function(c,d){var f,e,g=new Promise(function(a,b){e=a;f=b}),h=Rc(a,za(b?b.identifierPrefix:void 0,b?b.nonce:void 0,b?b.bootstrapScriptContent:void 0,b?b.bootstrapScripts:void 0,b?b.bootstrapModules:void 0),Aa(b?b.namespaceURI:void 0),b?b.progressiveChunkSize:void 0,b?b.onError:void 0,e,function(){var a=new ReadableStream({type:"bytes",pull:function(a){if(1===h.status)h.status=2,da(a,h.fatalError);else if(2!==h.status&&null===h.destination){h.destination=
|
|
96
|
-
a;try{fd(h,a)}catch(A){Y(h,A),Vc(h,A)}}},cancel:function(){ld(h)}},{highWaterMark:0});a.allReady=g;c(a)},function(a){g.catch(function(){});d(a)},f);if(b&&b.signal){var m=b.signal,q=function(){ld(h,m.reason);m.removeEventListener("abort",q)};m.addEventListener("abort",q)}Uc(h)})};exports.version="18.
|
|
96
|
+
a;try{fd(h,a)}catch(A){Y(h,A),Vc(h,A)}}},cancel:function(){ld(h)}},{highWaterMark:0});a.allReady=g;c(a)},function(a){g.catch(function(){});d(a)},f);if(b&&b.signal){var m=b.signal,q=function(){ld(h,m.reason);m.removeEventListener("abort",q)};m.addEventListener("abort",q)}Uc(h)})};exports.version="18.3.1";
|
|
@@ -17,7 +17,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
17
17
|
var React = require('react');
|
|
18
18
|
var util = require('util');
|
|
19
19
|
|
|
20
|
-
var ReactVersion = '18.
|
|
20
|
+
var ReactVersion = '18.3.1';
|
|
21
21
|
|
|
22
22
|
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
23
23
|
|
|
@@ -5768,6 +5768,7 @@ var didWarnAboutModulePatternComponent = {};
|
|
|
5768
5768
|
var didWarnAboutContextTypeOnFunctionComponent = {};
|
|
5769
5769
|
var didWarnAboutGetDerivedStateOnFunctionComponent = {};
|
|
5770
5770
|
var didWarnAboutReassigningProps = false;
|
|
5771
|
+
var didWarnAboutDefaultPropsOnFunctionComponent = {};
|
|
5771
5772
|
var didWarnAboutGenerators = false;
|
|
5772
5773
|
var didWarnAboutMaps = false;
|
|
5773
5774
|
var hasWarnedAboutUsingContextAsConsumer = false; // This would typically be a function component but we still support module pattern
|
|
@@ -5863,6 +5864,16 @@ function validateFunctionComponentInDev(Component) {
|
|
|
5863
5864
|
}
|
|
5864
5865
|
}
|
|
5865
5866
|
|
|
5867
|
+
if ( Component.defaultProps !== undefined) {
|
|
5868
|
+
var componentName = getComponentNameFromType(Component) || 'Unknown';
|
|
5869
|
+
|
|
5870
|
+
if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) {
|
|
5871
|
+
error('%s: Support for defaultProps will be removed from function components ' + 'in a future major release. Use JavaScript default parameters instead.', componentName);
|
|
5872
|
+
|
|
5873
|
+
didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true;
|
|
5874
|
+
}
|
|
5875
|
+
}
|
|
5876
|
+
|
|
5866
5877
|
if (typeof Component.getDerivedStateFromProps === 'function') {
|
|
5867
5878
|
var _componentName3 = getComponentNameFromType(Component) || 'Unknown';
|
|
5868
5879
|
|
|
@@ -99,4 +99,4 @@ b.end()}}function jd(a){setImmediate(function(){return Qc(a)})}function kd(a,b){
|
|
|
99
99
|
function od(a,b){var c=b?b.identifierPrefix:void 0,d=b?b.nonce:void 0,f=b?b.bootstrapScriptContent:void 0,e=b?b.bootstrapScripts:void 0;var g=b?b.bootstrapModules:void 0;c=void 0===c?"":c;d=void 0===d?ra:x('<script nonce="'+F(d)+'">');var h=[];void 0!==f&&h.push(d,(""+f).replace(wa,xa),sa);if(void 0!==e)for(f=0;f<e.length;f++)h.push(ta,F(e[f]),va);if(void 0!==g)for(e=0;e<g.length;e++)h.push(ua,F(g[e]),va);g={bootstrapChunks:h,startInlineScript:d,placeholderPrefix:x(c+"P:"),segmentPrefix:x(c+"S:"),
|
|
100
100
|
boundaryPrefix:c+"B:",idPrefix:c,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1};e=b?b.namespaceURI:void 0;e=G("http://www.w3.org/2000/svg"===e?2:"http://www.w3.org/1998/Math/MathML"===e?3:0,null);f=b?b.progressiveChunkSize:void 0;d=b?b.onError:void 0;h=b?b.onAllReady:void 0;var m=b?b.onShellReady:void 0,n=b?b.onShellError:void 0;b=[];c=new Set;g={destination:null,responseState:g,progressiveChunkSize:void 0===f?12800:f,status:0,fatalError:null,
|
|
101
101
|
nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:c,pingedTasks:b,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:void 0===d?Oc:d,onAllReady:void 0===h?X:h,onShellReady:void 0===m?X:m,onShellError:void 0===n?X:n,onFatalError:X};e=Sc(g,0,null,e,!1,!1);e.parentFlushed=!0;a=Rc(g,a,null,e,c,hc,null,qc);b.push(a);return g}
|
|
102
|
-
exports.renderToPipeableStream=function(a,b){var c=od(a,b),d=!1;jd(c);return{pipe:function(a){if(d)throw Error("React currently only supports piping to one writable stream.");d=!0;kd(c,a);a.on("drain",md(a,c));a.on("error",nd(c,Error("The destination stream errored while writing data.")));a.on("close",nd(c,Error("The destination stream closed early.")));return a},abort:function(a){ld(c,a)}}};exports.version="18.
|
|
102
|
+
exports.renderToPipeableStream=function(a,b){var c=od(a,b),d=!1;jd(c);return{pipe:function(a){if(d)throw Error("React currently only supports piping to one writable stream.");d=!0;kd(c,a);a.on("drain",md(a,c));a.on("error",nd(c,Error("The destination stream errored while writing data.")));a.on("close",nd(c,Error("The destination stream closed early.")));return a},abort:function(a){ld(c,a)}}};exports.version="18.3.1";
|
|
@@ -1129,7 +1129,7 @@ var getNodeFromInstance = EventInternals[1];
|
|
|
1129
1129
|
var getFiberCurrentPropsFromNode = EventInternals[2];
|
|
1130
1130
|
var enqueueStateRestore = EventInternals[3];
|
|
1131
1131
|
var restoreStateIfNeeded = EventInternals[4];
|
|
1132
|
-
var
|
|
1132
|
+
var reactAct = React.unstable_act;
|
|
1133
1133
|
|
|
1134
1134
|
function Event(suffix) {}
|
|
1135
1135
|
|
|
@@ -1221,7 +1221,17 @@ function validateClassInstance(inst, methodName) {
|
|
|
1221
1221
|
*/
|
|
1222
1222
|
|
|
1223
1223
|
|
|
1224
|
+
var didWarnAboutReactTestUtilsDeprecation = false;
|
|
1225
|
+
|
|
1224
1226
|
function renderIntoDocument(element) {
|
|
1227
|
+
{
|
|
1228
|
+
if (!didWarnAboutReactTestUtilsDeprecation) {
|
|
1229
|
+
didWarnAboutReactTestUtilsDeprecation = true;
|
|
1230
|
+
|
|
1231
|
+
error('ReactDOMTestUtils is deprecated and will be removed in a future ' + 'major release, because it exposes internal implementation details ' + 'that are highly likely to change between releases. Upgrade to a ' + 'modern testing library, such as @testing-library/react. See ' + 'https://react.dev/warnings/react-dom-test-utils for more info.');
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1225
1235
|
var div = document.createElement('div'); // None of our tests actually require attaching the container to the
|
|
1226
1236
|
// DOM, and doing so creates a mess that we rely on test isolation to
|
|
1227
1237
|
// clean up, so we're going to stop honoring the name of this method
|
|
@@ -1717,6 +1727,18 @@ function buildSimulators() {
|
|
|
1717
1727
|
}
|
|
1718
1728
|
|
|
1719
1729
|
buildSimulators();
|
|
1730
|
+
var didWarnAboutUsingAct = false;
|
|
1731
|
+
var act = function actWithWarning(callback) {
|
|
1732
|
+
{
|
|
1733
|
+
if (!didWarnAboutUsingAct) {
|
|
1734
|
+
didWarnAboutUsingAct = true;
|
|
1735
|
+
|
|
1736
|
+
error('`ReactDOMTestUtils.act` is deprecated in favor of `React.act`. ' + 'Import `act` from `react` instead of `react-dom/test-utils`. ' + 'See https://react.dev/warnings/react-dom-test-utils for more info.');
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
return reactAct(callback);
|
|
1741
|
+
} ;
|
|
1720
1742
|
|
|
1721
1743
|
exports.Simulate = Simulate;
|
|
1722
1744
|
exports.act = act;
|