react-dom
Advanced tools
Comparing version 0.0.0-experimental-8afa144bd-20240416 to 0.0.0-experimental-8b08e99e-20240713
@@ -11,61 +11,15 @@ /** | ||
'use strict'; | ||
if (process.env.NODE_ENV !== "production") { | ||
(function() { | ||
'use strict'; | ||
var React = require('react'); | ||
var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; | ||
function error(format) { | ||
{ | ||
{ | ||
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { | ||
args[_key2 - 1] = arguments[_key2]; | ||
} | ||
printWarning('error', format, args); | ||
} | ||
} | ||
} | ||
function printWarning(level, format, args) { | ||
// When changing this logic, you might want to also | ||
// update consoleWithStackDev.www.js as well. | ||
{ | ||
var stack = ReactSharedInternals.getStackAddendum(); | ||
if (stack !== '') { | ||
format += '%s'; | ||
args = args.concat([stack]); | ||
} // eslint-disable-next-line react-internal/safe-string-coercion | ||
var argsWithFormat = args.map(function (item) { | ||
return String(item); | ||
}); // Careful: RN currently depends on this prefix | ||
argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it | ||
// breaks IE9: https://github.com/facebook/react/issues/13610 | ||
// eslint-disable-next-line react-internal/no-production-logging | ||
Function.prototype.apply.call(console[level], console, argsWithFormat); | ||
} | ||
} | ||
var didWarnAboutUsingAct = false; | ||
function act(callback) { | ||
if (didWarnAboutUsingAct === false) { | ||
didWarnAboutUsingAct = true; | ||
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.'); | ||
} | ||
return React.act(callback); | ||
} | ||
exports.act = act; | ||
"use strict"; | ||
"production" !== process.env.NODE_ENV && | ||
(function () { | ||
var React = require("react"), | ||
didWarnAboutUsingAct = !1; | ||
exports.act = function (callback) { | ||
!1 === didWarnAboutUsingAct && | ||
((didWarnAboutUsingAct = !0), | ||
console.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." | ||
)); | ||
return React.act(callback); | ||
}; | ||
})(); | ||
} |
/** | ||
* @license React | ||
* react-dom-test-utils.production.min.js | ||
* react-dom-test-utils.production.js | ||
* | ||
@@ -11,16 +11,12 @@ * Copyright (c) Meta Platforms, Inc. and affiliates. | ||
'use strict'; | ||
var React = require('react'); | ||
let didWarnAboutUsingAct = false; | ||
function act(callback) { | ||
if (didWarnAboutUsingAct === false) { | ||
didWarnAboutUsingAct = true; | ||
console.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.'); | ||
} | ||
"use strict"; | ||
var React = require("react"), | ||
didWarnAboutUsingAct = !1; | ||
exports.act = function (callback) { | ||
!1 === didWarnAboutUsingAct && | ||
((didWarnAboutUsingAct = !0), | ||
console.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." | ||
)); | ||
return React.act(callback); | ||
} | ||
exports.act = act; | ||
}; |
@@ -11,382 +11,331 @@ /** | ||
'use strict'; | ||
if (process.env.NODE_ENV !== "production") { | ||
(function() { | ||
'use strict'; | ||
var React = require('react'); | ||
var ReactSharedInternalsServer = // $FlowFixMe: It's defined in the one we resolve to. | ||
React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; | ||
if (!ReactSharedInternalsServer) { | ||
throw new Error('The "react" package in this environment is not configured correctly. ' + 'The "react-server" condition must be enabled in any environment that ' + 'runs React Server Components.'); | ||
} | ||
function error(format) { | ||
{ | ||
{ | ||
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { | ||
args[_key2 - 1] = arguments[_key2]; | ||
} | ||
printWarning('error', format, args); | ||
"use strict"; | ||
"production" !== process.env.NODE_ENV && | ||
(function () { | ||
function noop() {} | ||
function getCrossOriginStringAs(as, input) { | ||
if ("font" === as) return ""; | ||
if ("string" === typeof input) | ||
return "use-credentials" === input ? input : ""; | ||
} | ||
} | ||
} | ||
function printWarning(level, format, args) { | ||
// When changing this logic, you might want to also | ||
// update consoleWithStackDev.www.js as well. | ||
{ | ||
var stack = ReactSharedInternalsServer.getStackAddendum(); | ||
if (stack !== '') { | ||
format += '%s'; | ||
args = args.concat([stack]); | ||
} // eslint-disable-next-line react-internal/safe-string-coercion | ||
var argsWithFormat = args.map(function (item) { | ||
return String(item); | ||
}); // Careful: RN currently depends on this prefix | ||
argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it | ||
// breaks IE9: https://github.com/facebook/react/issues/13610 | ||
// eslint-disable-next-line react-internal/no-production-logging | ||
Function.prototype.apply.call(console[level], console, argsWithFormat); | ||
} | ||
} | ||
var NoLane = | ||
/* */ | ||
0; | ||
var NoEventPriority = NoLane; | ||
function noop() {} | ||
function requestFormReset(element) { | ||
throw new Error('Invalid form element. requestFormReset must be passed a form that was ' + 'rendered by React.'); | ||
} | ||
var DefaultDispatcher = { | ||
f | ||
/* flushSyncWork */ | ||
: noop, | ||
r | ||
/* requestFormReset */ | ||
: requestFormReset, | ||
D | ||
/* prefetchDNS */ | ||
: noop, | ||
C | ||
/* preconnect */ | ||
: noop, | ||
L | ||
/* preload */ | ||
: noop, | ||
m | ||
/* preloadModule */ | ||
: noop, | ||
X | ||
/* preinitScript */ | ||
: noop, | ||
S | ||
/* preinitStyle */ | ||
: noop, | ||
M | ||
/* preinitModuleScript */ | ||
: noop | ||
}; | ||
var Internals = { | ||
d | ||
/* ReactDOMCurrentDispatcher */ | ||
: DefaultDispatcher, | ||
p | ||
/* currentUpdatePriority */ | ||
: NoEventPriority, | ||
findDOMNode: null, | ||
usingClientEntryPoint: false | ||
}; | ||
function getCrossOriginString(input) { | ||
if (typeof input === 'string') { | ||
return input === 'use-credentials' ? input : ''; | ||
} | ||
return undefined; | ||
} | ||
function getCrossOriginStringAs(as, input) { | ||
if (as === 'font') { | ||
return ''; | ||
} | ||
if (typeof input === 'string') { | ||
return input === 'use-credentials' ? input : ''; | ||
} | ||
return undefined; | ||
} | ||
function prefetchDNS(href) { | ||
{ | ||
if (typeof href !== 'string' || !href) { | ||
error('ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href)); | ||
} else if (arguments.length > 1) { | ||
var options = arguments[1]; | ||
if (typeof options === 'object' && options.hasOwnProperty('crossOrigin')) { | ||
error('ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.', getValueDescriptorExpectingEnumForWarning(options)); | ||
} else { | ||
error('ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.', getValueDescriptorExpectingEnumForWarning(options)); | ||
} | ||
function getValueDescriptorExpectingObjectForWarning(thing) { | ||
return null === thing | ||
? "`null`" | ||
: void 0 === thing | ||
? "`undefined`" | ||
: "" === thing | ||
? "an empty string" | ||
: 'something with type "' + typeof thing + '"'; | ||
} | ||
} | ||
if (typeof href === 'string') { | ||
Internals.d | ||
/* ReactDOMCurrentDispatcher */ | ||
.D( | ||
/* prefetchDNS */ | ||
href); | ||
} // We don't error because preconnect needs to be resilient to being called in a variety of scopes | ||
// and the runtime may not be capable of responding. The function is optimistic and not critical | ||
// so we favor silent bailout over warning or erroring. | ||
} | ||
function preconnect(href, options) { | ||
{ | ||
if (typeof href !== 'string' || !href) { | ||
error('ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href)); | ||
} else if (options != null && typeof options !== 'object') { | ||
error('ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.', getValueDescriptorExpectingEnumForWarning(options)); | ||
} else if (options != null && typeof options.crossOrigin !== 'string') { | ||
error('ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.', getValueDescriptorExpectingObjectForWarning(options.crossOrigin)); | ||
function getValueDescriptorExpectingEnumForWarning(thing) { | ||
return null === thing | ||
? "`null`" | ||
: void 0 === thing | ||
? "`undefined`" | ||
: "" === thing | ||
? "an empty string" | ||
: "string" === typeof thing | ||
? JSON.stringify(thing) | ||
: "number" === typeof thing | ||
? "`" + thing + "`" | ||
: 'something with type "' + typeof thing + '"'; | ||
} | ||
} | ||
if (typeof href === 'string') { | ||
var crossOrigin = options ? getCrossOriginString(options.crossOrigin) : null; | ||
Internals.d | ||
/* ReactDOMCurrentDispatcher */ | ||
.C( | ||
/* preconnect */ | ||
href, crossOrigin); | ||
} // We don't error because preconnect needs to be resilient to being called in a variety of scopes | ||
// and the runtime may not be capable of responding. The function is optimistic and not critical | ||
// so we favor silent bailout over warning or erroring. | ||
} | ||
function preload(href, options) { | ||
{ | ||
var encountered = ''; | ||
if (typeof href !== 'string' || !href) { | ||
encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + "."; | ||
} | ||
if (options == null || typeof options !== 'object') { | ||
encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "."; | ||
} else if (typeof options.as !== 'string' || !options.as) { | ||
encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + "."; | ||
} | ||
if (encountered) { | ||
error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s', encountered); | ||
} | ||
} | ||
if (typeof href === 'string' && // We check existence because we cannot enforce this function is actually called with the stated type | ||
typeof options === 'object' && options !== null && typeof options.as === 'string') { | ||
var as = options.as; | ||
var crossOrigin = getCrossOriginStringAs(as, options.crossOrigin); | ||
Internals.d | ||
/* ReactDOMCurrentDispatcher */ | ||
.L( | ||
/* preload */ | ||
href, as, { | ||
crossOrigin: crossOrigin, | ||
integrity: typeof options.integrity === 'string' ? options.integrity : undefined, | ||
nonce: typeof options.nonce === 'string' ? options.nonce : undefined, | ||
type: typeof options.type === 'string' ? options.type : undefined, | ||
fetchPriority: typeof options.fetchPriority === 'string' ? options.fetchPriority : undefined, | ||
referrerPolicy: typeof options.referrerPolicy === 'string' ? options.referrerPolicy : undefined, | ||
imageSrcSet: typeof options.imageSrcSet === 'string' ? options.imageSrcSet : undefined, | ||
imageSizes: typeof options.imageSizes === 'string' ? options.imageSizes : undefined, | ||
media: typeof options.media === 'string' ? options.media : undefined | ||
}); | ||
} // We don't error because preload needs to be resilient to being called in a variety of scopes | ||
// and the runtime may not be capable of responding. The function is optimistic and not critical | ||
// so we favor silent bailout over warning or erroring. | ||
} | ||
function preloadModule(href, options) { | ||
{ | ||
var encountered = ''; | ||
if (typeof href !== 'string' || !href) { | ||
encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + "."; | ||
} | ||
if (options !== undefined && typeof options !== 'object') { | ||
encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "."; | ||
} else if (options && 'as' in options && typeof options.as !== 'string') { | ||
encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + "."; | ||
} | ||
if (encountered) { | ||
error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s', encountered); | ||
} | ||
} | ||
if (typeof href === 'string') { | ||
if (options) { | ||
var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin); | ||
Internals.d | ||
/* ReactDOMCurrentDispatcher */ | ||
.m( | ||
/* preloadModule */ | ||
href, { | ||
as: typeof options.as === 'string' && options.as !== 'script' ? options.as : undefined, | ||
crossOrigin: crossOrigin, | ||
integrity: typeof options.integrity === 'string' ? options.integrity : undefined | ||
}); | ||
} else { | ||
Internals.d | ||
/* ReactDOMCurrentDispatcher */ | ||
.m( | ||
/* preloadModule */ | ||
href); | ||
} | ||
} // We don't error because preload needs to be resilient to being called in a variety of scopes | ||
// and the runtime may not be capable of responding. The function is optimistic and not critical | ||
// so we favor silent bailout over warning or erroring. | ||
} | ||
function preinit(href, options) { | ||
{ | ||
if (typeof href !== 'string' || !href) { | ||
error('ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href)); | ||
} else if (options == null || typeof options !== 'object') { | ||
error('ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.', getValueDescriptorExpectingEnumForWarning(options)); | ||
} else if (options.as !== 'style' && options.as !== 'script') { | ||
error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".', getValueDescriptorExpectingEnumForWarning(options.as)); | ||
} | ||
} | ||
if (typeof href === 'string' && options && typeof options.as === 'string') { | ||
var as = options.as; | ||
var crossOrigin = getCrossOriginStringAs(as, options.crossOrigin); | ||
var integrity = typeof options.integrity === 'string' ? options.integrity : undefined; | ||
var fetchPriority = typeof options.fetchPriority === 'string' ? options.fetchPriority : undefined; | ||
if (as === 'style') { | ||
Internals.d | ||
/* ReactDOMCurrentDispatcher */ | ||
.S( | ||
/* preinitStyle */ | ||
href, typeof options.precedence === 'string' ? options.precedence : undefined, { | ||
crossOrigin: crossOrigin, | ||
integrity: integrity, | ||
fetchPriority: fetchPriority | ||
}); | ||
} else if (as === 'script') { | ||
Internals.d | ||
/* ReactDOMCurrentDispatcher */ | ||
.X( | ||
/* preinitScript */ | ||
href, { | ||
crossOrigin: crossOrigin, | ||
integrity: integrity, | ||
fetchPriority: fetchPriority, | ||
nonce: typeof options.nonce === 'string' ? options.nonce : undefined | ||
}); | ||
} | ||
} // We don't error because preinit needs to be resilient to being called in a variety of scopes | ||
// and the runtime may not be capable of responding. The function is optimistic and not critical | ||
// so we favor silent bailout over warning or erroring. | ||
} | ||
function preinitModule(href, options) { | ||
{ | ||
var encountered = ''; | ||
if (typeof href !== 'string' || !href) { | ||
encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + "."; | ||
} | ||
if (options !== undefined && typeof options !== 'object') { | ||
encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "."; | ||
} else if (options && 'as' in options && options.as !== 'script') { | ||
encountered += " The `as` option encountered was " + getValueDescriptorExpectingEnumForWarning(options.as) + "."; | ||
} | ||
if (encountered) { | ||
error('ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s', encountered); | ||
} else { | ||
var as = options && typeof options.as === 'string' ? options.as : 'script'; | ||
switch (as) { | ||
case 'script': | ||
{ | ||
var React = require("react"), | ||
Internals = { | ||
d: { | ||
f: noop, | ||
r: function () { | ||
throw Error( | ||
"Invalid form element. requestFormReset must be passed a form that was rendered by React." | ||
); | ||
}, | ||
D: noop, | ||
C: noop, | ||
L: noop, | ||
m: noop, | ||
X: noop, | ||
S: noop, | ||
M: noop | ||
}, | ||
p: 0, | ||
findDOMNode: null | ||
}; | ||
if (!React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE) | ||
throw Error( | ||
'The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.' | ||
); | ||
("function" === typeof Map && | ||
null != Map.prototype && | ||
"function" === typeof Map.prototype.forEach && | ||
"function" === typeof Set && | ||
null != Set.prototype && | ||
"function" === typeof Set.prototype.clear && | ||
"function" === typeof Set.prototype.forEach) || | ||
console.error( | ||
"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills" | ||
); | ||
exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = | ||
Internals; | ||
exports.preconnect = function (href, options) { | ||
"string" === typeof href && href | ||
? null != options && "object" !== typeof options | ||
? console.error( | ||
"ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.", | ||
getValueDescriptorExpectingEnumForWarning(options) | ||
) | ||
: null != options && | ||
"string" !== typeof options.crossOrigin && | ||
console.error( | ||
"ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.", | ||
getValueDescriptorExpectingObjectForWarning(options.crossOrigin) | ||
) | ||
: console.error( | ||
"ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", | ||
getValueDescriptorExpectingObjectForWarning(href) | ||
); | ||
"string" === typeof href && | ||
(options | ||
? ((options = options.crossOrigin), | ||
(options = | ||
"string" === typeof options | ||
? "use-credentials" === options | ||
? options | ||
: "" | ||
: void 0)) | ||
: (options = null), | ||
Internals.d.C(href, options)); | ||
}; | ||
exports.prefetchDNS = function (href) { | ||
if ("string" !== typeof href || !href) | ||
console.error( | ||
"ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", | ||
getValueDescriptorExpectingObjectForWarning(href) | ||
); | ||
else if (1 < arguments.length) { | ||
var options = arguments[1]; | ||
"object" === typeof options && options.hasOwnProperty("crossOrigin") | ||
? console.error( | ||
"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.", | ||
getValueDescriptorExpectingEnumForWarning(options) | ||
) | ||
: console.error( | ||
"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.", | ||
getValueDescriptorExpectingEnumForWarning(options) | ||
); | ||
} | ||
"string" === typeof href && Internals.d.D(href); | ||
}; | ||
exports.preinit = function (href, options) { | ||
"string" === typeof href && href | ||
? null == options || "object" !== typeof options | ||
? console.error( | ||
"ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.", | ||
getValueDescriptorExpectingEnumForWarning(options) | ||
) | ||
: "style" !== options.as && | ||
"script" !== options.as && | ||
console.error( | ||
'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".', | ||
getValueDescriptorExpectingEnumForWarning(options.as) | ||
) | ||
: console.error( | ||
"ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", | ||
getValueDescriptorExpectingObjectForWarning(href) | ||
); | ||
if ( | ||
"string" === typeof href && | ||
options && | ||
"string" === typeof options.as | ||
) { | ||
var as = options.as, | ||
crossOrigin = getCrossOriginStringAs(as, options.crossOrigin), | ||
integrity = | ||
"string" === typeof options.integrity ? options.integrity : void 0, | ||
fetchPriority = | ||
"string" === typeof options.fetchPriority | ||
? options.fetchPriority | ||
: void 0; | ||
"style" === as | ||
? Internals.d.S( | ||
href, | ||
"string" === typeof options.precedence | ||
? options.precedence | ||
: void 0, | ||
{ | ||
crossOrigin: crossOrigin, | ||
integrity: integrity, | ||
fetchPriority: fetchPriority | ||
} | ||
) | ||
: "script" === as && | ||
Internals.d.X(href, { | ||
crossOrigin: crossOrigin, | ||
integrity: integrity, | ||
fetchPriority: fetchPriority, | ||
nonce: "string" === typeof options.nonce ? options.nonce : void 0 | ||
}); | ||
} | ||
}; | ||
exports.preinitModule = function (href, options) { | ||
var encountered = ""; | ||
("string" === typeof href && href) || | ||
(encountered += | ||
" The `href` argument encountered was " + | ||
getValueDescriptorExpectingObjectForWarning(href) + | ||
"."); | ||
void 0 !== options && "object" !== typeof options | ||
? (encountered += | ||
" The `options` argument encountered was " + | ||
getValueDescriptorExpectingObjectForWarning(options) + | ||
".") | ||
: options && | ||
"as" in options && | ||
"script" !== options.as && | ||
(encountered += | ||
" The `as` option encountered was " + | ||
getValueDescriptorExpectingEnumForWarning(options.as) + | ||
"."); | ||
if (encountered) | ||
console.error( | ||
"ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s", | ||
encountered | ||
); | ||
else | ||
switch ( | ||
((encountered = | ||
options && "string" === typeof options.as ? options.as : "script"), | ||
encountered) | ||
) { | ||
case "script": | ||
break; | ||
} | ||
// We have an invalid as type and need to warn | ||
default: | ||
{ | ||
var typeOfAs = getValueDescriptorExpectingEnumForWarning(as); | ||
error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script"' + ' but received "%s" instead. This warning was generated for `href` "%s". In the future other' + ' module types will be supported, aligning with the import-attributes proposal. Learn more here:' + ' (https://github.com/tc39/proposal-import-attributes)', typeOfAs, href); | ||
} | ||
} | ||
} | ||
} | ||
if (typeof href === 'string') { | ||
if (typeof options === 'object' && options !== null) { | ||
if (options.as == null || options.as === 'script') { | ||
var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin); | ||
Internals.d | ||
/* ReactDOMCurrentDispatcher */ | ||
.M( | ||
/* preinitModuleScript */ | ||
href, { | ||
default: | ||
(encountered = | ||
getValueDescriptorExpectingEnumForWarning(encountered)), | ||
console.error( | ||
'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)', | ||
encountered, | ||
href | ||
); | ||
} | ||
if ("string" === typeof href) | ||
if ("object" === typeof options && null !== options) { | ||
if (null == options.as || "script" === options.as) | ||
(encountered = getCrossOriginStringAs( | ||
options.as, | ||
options.crossOrigin | ||
)), | ||
Internals.d.M(href, { | ||
crossOrigin: encountered, | ||
integrity: | ||
"string" === typeof options.integrity | ||
? options.integrity | ||
: void 0, | ||
nonce: | ||
"string" === typeof options.nonce ? options.nonce : void 0 | ||
}); | ||
} else null == options && Internals.d.M(href); | ||
}; | ||
exports.preload = function (href, options) { | ||
var encountered = ""; | ||
("string" === typeof href && href) || | ||
(encountered += | ||
" The `href` argument encountered was " + | ||
getValueDescriptorExpectingObjectForWarning(href) + | ||
"."); | ||
null == options || "object" !== typeof options | ||
? (encountered += | ||
" The `options` argument encountered was " + | ||
getValueDescriptorExpectingObjectForWarning(options) + | ||
".") | ||
: ("string" === typeof options.as && options.as) || | ||
(encountered += | ||
" The `as` option encountered was " + | ||
getValueDescriptorExpectingObjectForWarning(options.as) + | ||
"."); | ||
encountered && | ||
console.error( | ||
'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s', | ||
encountered | ||
); | ||
if ( | ||
"string" === typeof href && | ||
"object" === typeof options && | ||
null !== options && | ||
"string" === typeof options.as | ||
) { | ||
encountered = options.as; | ||
var crossOrigin = getCrossOriginStringAs( | ||
encountered, | ||
options.crossOrigin | ||
); | ||
Internals.d.L(href, encountered, { | ||
crossOrigin: crossOrigin, | ||
integrity: typeof options.integrity === 'string' ? options.integrity : undefined, | ||
nonce: typeof options.nonce === 'string' ? options.nonce : undefined | ||
integrity: | ||
"string" === typeof options.integrity ? options.integrity : void 0, | ||
nonce: "string" === typeof options.nonce ? options.nonce : void 0, | ||
type: "string" === typeof options.type ? options.type : void 0, | ||
fetchPriority: | ||
"string" === typeof options.fetchPriority | ||
? options.fetchPriority | ||
: void 0, | ||
referrerPolicy: | ||
"string" === typeof options.referrerPolicy | ||
? options.referrerPolicy | ||
: void 0, | ||
imageSrcSet: | ||
"string" === typeof options.imageSrcSet | ||
? options.imageSrcSet | ||
: void 0, | ||
imageSizes: | ||
"string" === typeof options.imageSizes | ||
? options.imageSizes | ||
: void 0, | ||
media: "string" === typeof options.media ? options.media : void 0 | ||
}); | ||
} | ||
} else if (options == null) { | ||
Internals.d | ||
/* ReactDOMCurrentDispatcher */ | ||
.M( | ||
/* preinitModuleScript */ | ||
href); | ||
} | ||
} // We don't error because preinit needs to be resilient to being called in a variety of scopes | ||
// and the runtime may not be capable of responding. The function is optimistic and not critical | ||
// so we favor silent bailout over warning or erroring. | ||
} | ||
function getValueDescriptorExpectingObjectForWarning(thing) { | ||
return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : "something with type \"" + typeof thing + "\""; | ||
} | ||
function getValueDescriptorExpectingEnumForWarning(thing) { | ||
return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : typeof thing === 'string' ? JSON.stringify(thing) : typeof thing === 'number' ? '`' + thing + '`' : "something with type \"" + typeof thing + "\""; | ||
} | ||
exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Internals; | ||
exports.preconnect = preconnect; | ||
exports.prefetchDNS = prefetchDNS; | ||
exports.preinit = preinit; | ||
exports.preinitModule = preinitModule; | ||
exports.preload = preload; | ||
exports.preloadModule = preloadModule; | ||
}; | ||
exports.preloadModule = function (href, options) { | ||
var encountered = ""; | ||
("string" === typeof href && href) || | ||
(encountered += | ||
" The `href` argument encountered was " + | ||
getValueDescriptorExpectingObjectForWarning(href) + | ||
"."); | ||
void 0 !== options && "object" !== typeof options | ||
? (encountered += | ||
" The `options` argument encountered was " + | ||
getValueDescriptorExpectingObjectForWarning(options) + | ||
".") | ||
: options && | ||
"as" in options && | ||
"string" !== typeof options.as && | ||
(encountered += | ||
" The `as` option encountered was " + | ||
getValueDescriptorExpectingObjectForWarning(options.as) + | ||
"."); | ||
encountered && | ||
console.error( | ||
'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s', | ||
encountered | ||
); | ||
"string" === typeof href && | ||
(options | ||
? ((encountered = getCrossOriginStringAs( | ||
options.as, | ||
options.crossOrigin | ||
)), | ||
Internals.d.m(href, { | ||
as: | ||
"string" === typeof options.as && "script" !== options.as | ||
? options.as | ||
: void 0, | ||
crossOrigin: encountered, | ||
integrity: | ||
"string" === typeof options.integrity | ||
? options.integrity | ||
: void 0 | ||
})) | ||
: Internals.d.m(href)); | ||
}; | ||
exports.version = "19.0.0-experimental-8b08e99e-20240713"; | ||
})(); | ||
} |
/** | ||
* @license React | ||
* react-dom.react-server.production.min.js | ||
* react-dom.react-server.production.js | ||
* | ||
@@ -11,234 +11,143 @@ * Copyright (c) Meta Platforms, Inc. and affiliates. | ||
'use strict'; | ||
var React = require('react'); | ||
const ReactSharedInternalsServer = // $FlowFixMe: It's defined in the one we resolve to. | ||
React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; | ||
if (!ReactSharedInternalsServer) { | ||
throw new Error('The "react" package in this environment is not configured correctly. ' + 'The "react-server" condition must be enabled in any environment that ' + 'runs React Server Components.'); | ||
} | ||
// TODO: Ideally these types would be opaque but that doesn't work well with | ||
const NoLane = | ||
/* */ | ||
0b0000000000000000000000000000000; | ||
const NoEventPriority = NoLane; | ||
"use strict"; | ||
var React = require("react"); | ||
function noop() {} | ||
function requestFormReset(element) { | ||
throw new Error('Invalid form element. requestFormReset must be passed a form that was ' + 'rendered by React.'); | ||
var Internals = { | ||
d: { | ||
f: noop, | ||
r: function () { | ||
throw Error( | ||
"Invalid form element. requestFormReset must be passed a form that was rendered by React." | ||
); | ||
}, | ||
D: noop, | ||
C: noop, | ||
L: noop, | ||
m: noop, | ||
X: noop, | ||
S: noop, | ||
M: noop | ||
}, | ||
p: 0, | ||
findDOMNode: null | ||
}; | ||
if (!React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE) | ||
throw Error( | ||
'The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.' | ||
); | ||
function getCrossOriginStringAs(as, input) { | ||
if ("font" === as) return ""; | ||
if ("string" === typeof input) | ||
return "use-credentials" === input ? input : ""; | ||
} | ||
const DefaultDispatcher = { | ||
f | ||
/* flushSyncWork */ | ||
: noop, | ||
r | ||
/* requestFormReset */ | ||
: requestFormReset, | ||
D | ||
/* prefetchDNS */ | ||
: noop, | ||
C | ||
/* preconnect */ | ||
: noop, | ||
L | ||
/* preload */ | ||
: noop, | ||
m | ||
/* preloadModule */ | ||
: noop, | ||
X | ||
/* preinitScript */ | ||
: noop, | ||
S | ||
/* preinitStyle */ | ||
: noop, | ||
M | ||
/* preinitModuleScript */ | ||
: noop | ||
exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = | ||
Internals; | ||
exports.preconnect = function (href, options) { | ||
"string" === typeof href && | ||
(options | ||
? ((options = options.crossOrigin), | ||
(options = | ||
"string" === typeof options | ||
? "use-credentials" === options | ||
? options | ||
: "" | ||
: void 0)) | ||
: (options = null), | ||
Internals.d.C(href, options)); | ||
}; | ||
const Internals = { | ||
d | ||
/* ReactDOMCurrentDispatcher */ | ||
: DefaultDispatcher, | ||
p | ||
/* currentUpdatePriority */ | ||
: NoEventPriority, | ||
findDOMNode: null, | ||
usingClientEntryPoint: false | ||
exports.prefetchDNS = function (href) { | ||
"string" === typeof href && Internals.d.D(href); | ||
}; | ||
function getCrossOriginString(input) { | ||
if (typeof input === 'string') { | ||
return input === 'use-credentials' ? input : ''; | ||
exports.preinit = function (href, options) { | ||
if ("string" === typeof href && options && "string" === typeof options.as) { | ||
var as = options.as, | ||
crossOrigin = getCrossOriginStringAs(as, options.crossOrigin), | ||
integrity = | ||
"string" === typeof options.integrity ? options.integrity : void 0, | ||
fetchPriority = | ||
"string" === typeof options.fetchPriority | ||
? options.fetchPriority | ||
: void 0; | ||
"style" === as | ||
? Internals.d.S( | ||
href, | ||
"string" === typeof options.precedence ? options.precedence : void 0, | ||
{ | ||
crossOrigin: crossOrigin, | ||
integrity: integrity, | ||
fetchPriority: fetchPriority | ||
} | ||
) | ||
: "script" === as && | ||
Internals.d.X(href, { | ||
crossOrigin: crossOrigin, | ||
integrity: integrity, | ||
fetchPriority: fetchPriority, | ||
nonce: "string" === typeof options.nonce ? options.nonce : void 0 | ||
}); | ||
} | ||
return undefined; | ||
} | ||
function getCrossOriginStringAs(as, input) { | ||
if (as === 'font') { | ||
return ''; | ||
}; | ||
exports.preinitModule = function (href, options) { | ||
if ("string" === typeof href) | ||
if ("object" === typeof options && null !== options) { | ||
if (null == options.as || "script" === options.as) { | ||
var crossOrigin = getCrossOriginStringAs( | ||
options.as, | ||
options.crossOrigin | ||
); | ||
Internals.d.M(href, { | ||
crossOrigin: crossOrigin, | ||
integrity: | ||
"string" === typeof options.integrity ? options.integrity : void 0, | ||
nonce: "string" === typeof options.nonce ? options.nonce : void 0 | ||
}); | ||
} | ||
} else null == options && Internals.d.M(href); | ||
}; | ||
exports.preload = function (href, options) { | ||
if ( | ||
"string" === typeof href && | ||
"object" === typeof options && | ||
null !== options && | ||
"string" === typeof options.as | ||
) { | ||
var as = options.as, | ||
crossOrigin = getCrossOriginStringAs(as, options.crossOrigin); | ||
Internals.d.L(href, as, { | ||
crossOrigin: crossOrigin, | ||
integrity: | ||
"string" === typeof options.integrity ? options.integrity : void 0, | ||
nonce: "string" === typeof options.nonce ? options.nonce : void 0, | ||
type: "string" === typeof options.type ? options.type : void 0, | ||
fetchPriority: | ||
"string" === typeof options.fetchPriority | ||
? options.fetchPriority | ||
: void 0, | ||
referrerPolicy: | ||
"string" === typeof options.referrerPolicy | ||
? options.referrerPolicy | ||
: void 0, | ||
imageSrcSet: | ||
"string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0, | ||
imageSizes: | ||
"string" === typeof options.imageSizes ? options.imageSizes : void 0, | ||
media: "string" === typeof options.media ? options.media : void 0 | ||
}); | ||
} | ||
if (typeof input === 'string') { | ||
return input === 'use-credentials' ? input : ''; | ||
} | ||
return undefined; | ||
} | ||
function prefetchDNS(href) { | ||
if (typeof href === 'string') { | ||
Internals.d | ||
/* ReactDOMCurrentDispatcher */ | ||
.D( | ||
/* prefetchDNS */ | ||
href); | ||
} // We don't error because preconnect needs to be resilient to being called in a variety of scopes | ||
// and the runtime may not be capable of responding. The function is optimistic and not critical | ||
// so we favor silent bailout over warning or erroring. | ||
} | ||
function preconnect(href, options) { | ||
if (typeof href === 'string') { | ||
const crossOrigin = options ? getCrossOriginString(options.crossOrigin) : null; | ||
Internals.d | ||
/* ReactDOMCurrentDispatcher */ | ||
.C( | ||
/* preconnect */ | ||
href, crossOrigin); | ||
} // We don't error because preconnect needs to be resilient to being called in a variety of scopes | ||
// and the runtime may not be capable of responding. The function is optimistic and not critical | ||
// so we favor silent bailout over warning or erroring. | ||
} | ||
function preload(href, options) { | ||
if (typeof href === 'string' && // We check existence because we cannot enforce this function is actually called with the stated type | ||
typeof options === 'object' && options !== null && typeof options.as === 'string') { | ||
const as = options.as; | ||
const crossOrigin = getCrossOriginStringAs(as, options.crossOrigin); | ||
Internals.d | ||
/* ReactDOMCurrentDispatcher */ | ||
.L( | ||
/* preload */ | ||
href, as, { | ||
crossOrigin, | ||
integrity: typeof options.integrity === 'string' ? options.integrity : undefined, | ||
nonce: typeof options.nonce === 'string' ? options.nonce : undefined, | ||
type: typeof options.type === 'string' ? options.type : undefined, | ||
fetchPriority: typeof options.fetchPriority === 'string' ? options.fetchPriority : undefined, | ||
referrerPolicy: typeof options.referrerPolicy === 'string' ? options.referrerPolicy : undefined, | ||
imageSrcSet: typeof options.imageSrcSet === 'string' ? options.imageSrcSet : undefined, | ||
imageSizes: typeof options.imageSizes === 'string' ? options.imageSizes : undefined, | ||
media: typeof options.media === 'string' ? options.media : undefined | ||
}); | ||
} // We don't error because preload needs to be resilient to being called in a variety of scopes | ||
// and the runtime may not be capable of responding. The function is optimistic and not critical | ||
// so we favor silent bailout over warning or erroring. | ||
} | ||
function preloadModule(href, options) { | ||
if (typeof href === 'string') { | ||
}; | ||
exports.preloadModule = function (href, options) { | ||
if ("string" === typeof href) | ||
if (options) { | ||
const crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin); | ||
Internals.d | ||
/* ReactDOMCurrentDispatcher */ | ||
.m( | ||
/* preloadModule */ | ||
href, { | ||
as: typeof options.as === 'string' && options.as !== 'script' ? options.as : undefined, | ||
crossOrigin, | ||
integrity: typeof options.integrity === 'string' ? options.integrity : undefined | ||
var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin); | ||
Internals.d.m(href, { | ||
as: | ||
"string" === typeof options.as && "script" !== options.as | ||
? options.as | ||
: void 0, | ||
crossOrigin: crossOrigin, | ||
integrity: | ||
"string" === typeof options.integrity ? options.integrity : void 0 | ||
}); | ||
} else { | ||
Internals.d | ||
/* ReactDOMCurrentDispatcher */ | ||
.m( | ||
/* preloadModule */ | ||
href); | ||
} | ||
} // We don't error because preload needs to be resilient to being called in a variety of scopes | ||
// and the runtime may not be capable of responding. The function is optimistic and not critical | ||
// so we favor silent bailout over warning or erroring. | ||
} | ||
function preinit(href, options) { | ||
if (typeof href === 'string' && options && typeof options.as === 'string') { | ||
const as = options.as; | ||
const crossOrigin = getCrossOriginStringAs(as, options.crossOrigin); | ||
const integrity = typeof options.integrity === 'string' ? options.integrity : undefined; | ||
const fetchPriority = typeof options.fetchPriority === 'string' ? options.fetchPriority : undefined; | ||
if (as === 'style') { | ||
Internals.d | ||
/* ReactDOMCurrentDispatcher */ | ||
.S( | ||
/* preinitStyle */ | ||
href, typeof options.precedence === 'string' ? options.precedence : undefined, { | ||
crossOrigin, | ||
integrity, | ||
fetchPriority | ||
}); | ||
} else if (as === 'script') { | ||
Internals.d | ||
/* ReactDOMCurrentDispatcher */ | ||
.X( | ||
/* preinitScript */ | ||
href, { | ||
crossOrigin, | ||
integrity, | ||
fetchPriority, | ||
nonce: typeof options.nonce === 'string' ? options.nonce : undefined | ||
}); | ||
} | ||
} // We don't error because preinit needs to be resilient to being called in a variety of scopes | ||
// and the runtime may not be capable of responding. The function is optimistic and not critical | ||
// so we favor silent bailout over warning or erroring. | ||
} | ||
function preinitModule(href, options) { | ||
if (typeof href === 'string') { | ||
if (typeof options === 'object' && options !== null) { | ||
if (options.as == null || options.as === 'script') { | ||
const crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin); | ||
Internals.d | ||
/* ReactDOMCurrentDispatcher */ | ||
.M( | ||
/* preinitModuleScript */ | ||
href, { | ||
crossOrigin, | ||
integrity: typeof options.integrity === 'string' ? options.integrity : undefined, | ||
nonce: typeof options.nonce === 'string' ? options.nonce : undefined | ||
}); | ||
} | ||
} else if (options == null) { | ||
Internals.d | ||
/* ReactDOMCurrentDispatcher */ | ||
.M( | ||
/* preinitModuleScript */ | ||
href); | ||
} | ||
} // We don't error because preinit needs to be resilient to being called in a variety of scopes | ||
// and the runtime may not be capable of responding. The function is optimistic and not critical | ||
// so we favor silent bailout over warning or erroring. | ||
} | ||
exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Internals; | ||
exports.preconnect = preconnect; | ||
exports.prefetchDNS = prefetchDNS; | ||
exports.preinit = preinit; | ||
exports.preinitModule = preinitModule; | ||
exports.preload = preload; | ||
exports.preloadModule = preloadModule; | ||
} else Internals.d.m(href); | ||
}; | ||
exports.version = "19.0.0-experimental-8b08e99e-20240713"; |
'use strict'; | ||
var m = require('react-dom'); | ||
function checkDCE() { | ||
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ | ||
if ( | ||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' || | ||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function' | ||
) { | ||
return; | ||
} | ||
if (process.env.NODE_ENV !== 'production') { | ||
// This branch is unreachable because this function is only called | ||
// in production, but the condition is true only in development. | ||
// Therefore if the branch is still here, dead code elimination wasn't | ||
// properly applied. | ||
// Don't change the message. React DevTools relies on it. Also make sure | ||
// this message doesn't occur elsewhere in this function, or it will cause | ||
// a false positive. | ||
throw new Error('^_^'); | ||
} | ||
try { | ||
// Verify that the code above has been dead code eliminated (DCE'd). | ||
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE); | ||
} catch (err) { | ||
// DevTools shouldn't crash React, no matter what. | ||
// We should still report in case we break this code. | ||
console.error(err); | ||
} | ||
} | ||
if (process.env.NODE_ENV === 'production') { | ||
exports.createRoot = m.createRoot; | ||
exports.hydrateRoot = m.hydrateRoot; | ||
// DCE check should happen before ReactDOM bundle executes so that | ||
// DevTools can report bad minification during injection. | ||
checkDCE(); | ||
module.exports = require('./cjs/react-dom-client.production.js'); | ||
} else { | ||
var i = m.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; | ||
exports.createRoot = function (c, o) { | ||
i.usingClientEntryPoint = true; | ||
try { | ||
return m.createRoot(c, o); | ||
} finally { | ||
i.usingClientEntryPoint = false; | ||
} | ||
}; | ||
exports.hydrateRoot = function (c, h, o) { | ||
i.usingClientEntryPoint = true; | ||
try { | ||
return m.hydrateRoot(c, h, o); | ||
} finally { | ||
i.usingClientEntryPoint = false; | ||
} | ||
}; | ||
module.exports = require('./cjs/react-dom-client.development.js'); | ||
} |
@@ -35,5 +35,5 @@ 'use strict'; | ||
checkDCE(); | ||
module.exports = require('./cjs/react-dom.production.min.js'); | ||
module.exports = require('./cjs/react-dom.production.js'); | ||
} else { | ||
module.exports = require('./cjs/react-dom.development.js'); | ||
} |
{ | ||
"name": "react-dom", | ||
"version": "0.0.0-experimental-8afa144bd-20240416", | ||
"version": "0.0.0-experimental-8b08e99e-20240713", | ||
"description": "React package for working with the DOM.", | ||
@@ -20,6 +20,6 @@ "main": "index.js", | ||
"dependencies": { | ||
"scheduler": "0.0.0-experimental-8afa144bd-20240416" | ||
"scheduler": "0.0.0-experimental-8b08e99e-20240713" | ||
}, | ||
"peerDependencies": { | ||
"react": "0.0.0-experimental-8afa144bd-20240416" | ||
"react": "0.0.0-experimental-8b08e99e-20240713" | ||
}, | ||
@@ -35,3 +35,2 @@ "files": [ | ||
"react-dom.react-server.js", | ||
"server-rendering-stub.js", | ||
"server.browser.js", | ||
@@ -52,4 +51,3 @@ "server.bun.js", | ||
"unstable_server-external-runtime.js", | ||
"cjs/", | ||
"umd/" | ||
"cjs/" | ||
], | ||
@@ -71,5 +69,5 @@ "exports": { | ||
"worker": "./server.browser.js", | ||
"browser": "./server.browser.js", | ||
"node": "./server.node.js", | ||
"edge-light": "./server.edge.js", | ||
"browser": "./server.browser.js", | ||
"default": "./server.node.js" | ||
@@ -98,5 +96,5 @@ }, | ||
"worker": "./static.browser.js", | ||
"browser": "./static.browser.js", | ||
"node": "./static.node.js", | ||
"edge-light": "./static.edge.js", | ||
"browser": "./static.browser.js", | ||
"default": "./static.node.js" | ||
@@ -116,3 +114,2 @@ }, | ||
}, | ||
"./server-rendering-stub": "./server-rendering-stub.js", | ||
"./profiling": { | ||
@@ -119,0 +116,0 @@ "react-server": "./profiling.react-server.js", |
@@ -35,5 +35,5 @@ 'use strict'; | ||
checkDCE(); | ||
module.exports = require('./cjs/react-dom.profiling.min.js'); | ||
module.exports = require('./cjs/react-dom-profiling.profiling.js'); | ||
} else { | ||
module.exports = require('./cjs/react-dom.development.js'); | ||
module.exports = require('./cjs/react-dom-profiling.development.js'); | ||
} |
'use strict'; | ||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./cjs/react-dom.react-server.production.min.js'); | ||
module.exports = require('./cjs/react-dom.react-server.production.js'); | ||
} else { | ||
module.exports = require('./cjs/react-dom.react-server.development.js'); | ||
} |
@@ -5,4 +5,4 @@ 'use strict'; | ||
if (process.env.NODE_ENV === 'production') { | ||
l = require('./cjs/react-dom-server-legacy.browser.production.min.js'); | ||
s = require('./cjs/react-dom-server.browser.production.min.js'); | ||
l = require('./cjs/react-dom-server-legacy.browser.production.js'); | ||
s = require('./cjs/react-dom-server.browser.production.js'); | ||
} else { | ||
@@ -16,3 +16,2 @@ l = require('./cjs/react-dom-server-legacy.browser.development.js'); | ||
exports.renderToStaticMarkup = l.renderToStaticMarkup; | ||
exports.renderToStaticNodeStream = l.renderToStaticNodeStream; | ||
exports.renderToReadableStream = s.renderToReadableStream; | ||
@@ -19,0 +18,0 @@ if (s.resume) { |
@@ -6,4 +6,4 @@ 'use strict'; | ||
if (process.env.NODE_ENV === 'production') { | ||
b = require('./cjs/react-dom-server.bun.production.min.js'); | ||
l = require('./cjs/react-dom-server-legacy.browser.production.min.js'); | ||
b = require('./cjs/react-dom-server.bun.production.js'); | ||
l = require('./cjs/react-dom-server-legacy.browser.production.js'); | ||
} else { | ||
@@ -19,4 +19,3 @@ b = require('./cjs/react-dom-server.bun.development.js'); | ||
} | ||
exports.renderToStaticNodeStream = b.renderToStaticNodeStream; | ||
exports.renderToString = l.renderToString; | ||
exports.renderToStaticMarkup = l.renderToStaticMarkup; |
@@ -6,4 +6,4 @@ 'use strict'; | ||
if (process.env.NODE_ENV === 'production') { | ||
b = require('./cjs/react-dom-server.edge.production.min.js'); | ||
l = require('./cjs/react-dom-server-legacy.browser.production.min.js'); | ||
b = require('./cjs/react-dom-server.edge.production.js'); | ||
l = require('./cjs/react-dom-server-legacy.browser.production.js'); | ||
} else { | ||
@@ -16,3 +16,2 @@ b = require('./cjs/react-dom-server.edge.development.js'); | ||
exports.renderToReadableStream = b.renderToReadableStream; | ||
exports.renderToStaticNodeStream = b.renderToStaticNodeStream; | ||
exports.renderToString = l.renderToString; | ||
@@ -19,0 +18,0 @@ exports.renderToStaticMarkup = l.renderToStaticMarkup; |
@@ -5,4 +5,4 @@ 'use strict'; | ||
if (process.env.NODE_ENV === 'production') { | ||
l = require('./cjs/react-dom-server-legacy.node.production.min.js'); | ||
s = require('./cjs/react-dom-server.node.production.min.js'); | ||
l = require('./cjs/react-dom-server-legacy.node.production.js'); | ||
s = require('./cjs/react-dom-server.node.production.js'); | ||
} else { | ||
@@ -16,3 +16,2 @@ l = require('./cjs/react-dom-server-legacy.node.development.js'); | ||
exports.renderToStaticMarkup = l.renderToStaticMarkup; | ||
exports.renderToStaticNodeStream = l.renderToStaticNodeStream; | ||
exports.renderToPipeableStream = s.renderToPipeableStream; | ||
@@ -19,0 +18,0 @@ if (s.resumeToPipeableStream) { |
@@ -5,3 +5,3 @@ 'use strict'; | ||
if (process.env.NODE_ENV === 'production') { | ||
s = require('./cjs/react-dom-server.browser.production.min.js'); | ||
s = require('./cjs/react-dom-server.browser.production.js'); | ||
} else { | ||
@@ -8,0 +8,0 @@ s = require('./cjs/react-dom-server.browser.development.js'); |
@@ -5,3 +5,3 @@ 'use strict'; | ||
if (process.env.NODE_ENV === 'production') { | ||
s = require('./cjs/react-dom-server.edge.production.min.js'); | ||
s = require('./cjs/react-dom-server.edge.production.js'); | ||
} else { | ||
@@ -8,0 +8,0 @@ s = require('./cjs/react-dom-server.edge.development.js'); |
@@ -5,3 +5,3 @@ 'use strict'; | ||
if (process.env.NODE_ENV === 'production') { | ||
s = require('./cjs/react-dom-server.node.production.min.js'); | ||
s = require('./cjs/react-dom-server.node.production.js'); | ||
} else { | ||
@@ -8,0 +8,0 @@ s = require('./cjs/react-dom-server.node.development.js'); |
'use strict'; | ||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./cjs/react-dom-test-utils.production.min.js'); | ||
module.exports = require('./cjs/react-dom-test-utils.production.js'); | ||
} else { | ||
module.exports = require('./cjs/react-dom-test-utils.development.js'); | ||
} |
@@ -1,7 +0,236 @@ | ||
(function(){function p(b,a,d){a=document.getElementById(a);a.parentNode.removeChild(a);var c=document.getElementById(b);if(c){b=c.previousSibling;if(d)b.data="$!",c.setAttribute("data-dgst",d);else{d=b.parentNode;c=b.nextSibling;var f=0;do{if(c&&8===c.nodeType){var g=c.data;if("/$"===g)if(0===f)break;else f--;else"$"!==g&&"$?"!==g&&"$!"!==g||f++}g=c.nextSibling;d.removeChild(c);c=g}while(c);for(;a.firstChild;)d.insertBefore(a.firstChild,c);b.data="$"}b._reactRetry&&b._reactRetry()}}function B(b,a, | ||
d){for(var c=new Map,f=document,g,e,q=f.querySelectorAll("link[data-precedence],style[data-precedence]"),w=[],r=0;e=q[r++];)"not all"===e.getAttribute("media")?w.push(e):("LINK"===e.tagName&&v.set(e.getAttribute("href"),e),c.set(e.dataset.precedence,g=e));e=0;q=[];var t,h;for(r=!0;;){if(r){var n=d[e++];if(!n){r=!1;e=0;continue}var k=!1,u=0;var l=n[u++];if(h=v.get(l)){var m=h._p;k=!0}else{h=f.createElement("link");h.href=l;h.rel="stylesheet";for(h.dataset.precedence=t=n[u++];m=n[u++];)h.setAttribute(m, | ||
n[u++]);m=h._p=new Promise(function(C,D){h.onload=C;h.onerror=D});v.set(l,h)}l=h.getAttribute("media");!m||"l"===m.s||l&&!window.matchMedia(l).matches||q.push(m);if(k)continue}else{h=w[e++];if(!h)break;t=h.getAttribute("data-precedence");h.removeAttribute("media")}k=c.get(t)||g;k===g&&(g=h);c.set(t,h);k?k.parentNode.insertBefore(h,k.nextSibling):(k=f.head,k.insertBefore(h,k.firstChild))}Promise.all(q).then(p.bind(null,b,a,""),p.bind(null,b,a,"Resource failed to load"))}function x(b){b=b.querySelectorAll("template"); | ||
for(var a=0;a<b.length;a++)y(b[a])}function z(b){function a(c){for(var f=0;f<c.length;f++)for(var g=c[f].addedNodes,e=0;e<g.length;e++)g[e].parentNode&&y(g[e])}var d=new MutationObserver(a);d.observe(b,{childList:!0});window.addEventListener("DOMContentLoaded",function(){a(d.takeRecords());d.disconnect()})}function y(b){if(1===b.nodeType&&b.dataset){var a=b.dataset;if(null!=a.rxi){var d=a.dgst,c=a.msg,f=a.stck,g=a.cstck,e=document.getElementById(a.bid);e&&(a=e.previousSibling,a.data="$!",e=e.dataset, | ||
d&&(e.dgst=d),c&&(e.msg=c),f&&(e.stck=f),g&&(e.cstck=g),a._reactRetry&&a._reactRetry());b.remove()}else if(null!=a.rri)B(a.bid,a.sid,JSON.parse(a.sty)),b.remove();else if(null!=a.rci)p(a.bid,a.sid),b.remove();else if(null!=a.rsi){d=a.pid;c=document.getElementById(a.sid);d=document.getElementById(d);for(c.parentNode.removeChild(c);c.firstChild;)d.parentNode.insertBefore(c.firstChild,d);d.parentNode.removeChild(d);b.remove()}}}var v=new Map;(function(){addEventListener("submit",function(b){if(!b.defaultPrevented){var a= | ||
b.target,d=b.submitter,c=a.action,f=d;if(d){var g=d.getAttribute("formAction");null!=g&&(c=g,f=null)}"javascript:throw new Error('React form unexpectedly submitted.')"===c&&(b.preventDefault(),f?(b=document.createElement("input"),b.name=f.name,b.value=f.value,f.parentNode.insertBefore(b,f),f=new FormData(a),b.parentNode.removeChild(b)):f=new FormData(a),b=a.ownerDocument||a,(b.$$reactFormReplay=b.$$reactFormReplay||[]).push(a,d,f))}})})();window.$RC||(window.$RC=p,window.$RM=new Map);if(null!=document.body)"loading"=== | ||
document.readyState&&z(document.body),x(document.body);else{var A=new MutationObserver(function(){null!=document.body&&("loading"===document.readyState&&z(document.body),x(document.body),A.disconnect())});A.observe(document.documentElement,{childList:!0})}})(); | ||
(function () { | ||
function completeBoundary(suspenseBoundaryID, contentID, errorDigest) { | ||
contentID = document.getElementById(contentID); | ||
contentID.parentNode.removeChild(contentID); | ||
var suspenseIdNode = document.getElementById(suspenseBoundaryID); | ||
if (suspenseIdNode) { | ||
suspenseBoundaryID = suspenseIdNode.previousSibling; | ||
if (errorDigest) | ||
(suspenseBoundaryID.data = "$!"), | ||
suspenseIdNode.setAttribute("data-dgst", errorDigest); | ||
else { | ||
errorDigest = suspenseBoundaryID.parentNode; | ||
suspenseIdNode = suspenseBoundaryID.nextSibling; | ||
var depth = 0; | ||
do { | ||
if (suspenseIdNode && 8 === suspenseIdNode.nodeType) { | ||
var data = suspenseIdNode.data; | ||
if ("/$" === data) | ||
if (0 === depth) break; | ||
else depth--; | ||
else ("$" !== data && "$?" !== data && "$!" !== data) || depth++; | ||
} | ||
data = suspenseIdNode.nextSibling; | ||
errorDigest.removeChild(suspenseIdNode); | ||
suspenseIdNode = data; | ||
} while (suspenseIdNode); | ||
for (; contentID.firstChild; ) | ||
errorDigest.insertBefore(contentID.firstChild, suspenseIdNode); | ||
suspenseBoundaryID.data = "$"; | ||
} | ||
suspenseBoundaryID._reactRetry && suspenseBoundaryID._reactRetry(); | ||
} | ||
} | ||
function completeBoundaryWithStyles( | ||
suspenseBoundaryID, | ||
contentID, | ||
stylesheetDescriptors | ||
) { | ||
function cleanupWith(cb) { | ||
this._p = null; | ||
cb(); | ||
} | ||
for ( | ||
var precedences = new Map(), | ||
thisDocument = document, | ||
lastResource, | ||
node, | ||
nodes = thisDocument.querySelectorAll( | ||
"link[data-precedence],style[data-precedence]" | ||
), | ||
styleTagsToHoist = [], | ||
i$0 = 0; | ||
(node = nodes[i$0++]); | ||
) | ||
"not all" === node.getAttribute("media") | ||
? styleTagsToHoist.push(node) | ||
: ("LINK" === node.tagName && | ||
resourceMap.set(node.getAttribute("href"), node), | ||
precedences.set(node.dataset.precedence, (lastResource = node))); | ||
node = 0; | ||
nodes = []; | ||
var precedence, resourceEl; | ||
for (i$0 = !0; ; ) { | ||
if (i$0) { | ||
var stylesheetDescriptor = stylesheetDescriptors[node++]; | ||
if (!stylesheetDescriptor) { | ||
i$0 = !1; | ||
node = 0; | ||
continue; | ||
} | ||
var avoidInsert = !1, | ||
j = 0; | ||
var href = stylesheetDescriptor[j++]; | ||
if ((resourceEl = resourceMap.get(href))) { | ||
var attr = resourceEl._p; | ||
avoidInsert = !0; | ||
} else { | ||
resourceEl = thisDocument.createElement("link"); | ||
resourceEl.href = href; | ||
resourceEl.rel = "stylesheet"; | ||
for ( | ||
resourceEl.dataset.precedence = precedence = | ||
stylesheetDescriptor[j++]; | ||
(attr = stylesheetDescriptor[j++]); | ||
) | ||
resourceEl.setAttribute(attr, stylesheetDescriptor[j++]); | ||
attr = resourceEl._p = new Promise(function (resolve, reject) { | ||
resourceEl.onload = cleanupWith.bind(resourceEl, resolve); | ||
resourceEl.onerror = cleanupWith.bind(resourceEl, reject); | ||
}); | ||
resourceMap.set(href, resourceEl); | ||
} | ||
href = resourceEl.getAttribute("media"); | ||
!attr || (href && !window.matchMedia(href).matches) || nodes.push(attr); | ||
if (avoidInsert) continue; | ||
} else { | ||
resourceEl = styleTagsToHoist[node++]; | ||
if (!resourceEl) break; | ||
precedence = resourceEl.getAttribute("data-precedence"); | ||
resourceEl.removeAttribute("media"); | ||
} | ||
avoidInsert = precedences.get(precedence) || lastResource; | ||
avoidInsert === lastResource && (lastResource = resourceEl); | ||
precedences.set(precedence, resourceEl); | ||
avoidInsert | ||
? avoidInsert.parentNode.insertBefore( | ||
resourceEl, | ||
avoidInsert.nextSibling | ||
) | ||
: ((avoidInsert = thisDocument.head), | ||
avoidInsert.insertBefore(resourceEl, avoidInsert.firstChild)); | ||
} | ||
Promise.all(nodes).then( | ||
completeBoundary.bind(null, suspenseBoundaryID, contentID, ""), | ||
completeBoundary.bind( | ||
null, | ||
suspenseBoundaryID, | ||
contentID, | ||
"Resource failed to load" | ||
) | ||
); | ||
} | ||
function handleExistingNodes(target) { | ||
target = target.querySelectorAll("template"); | ||
for (var i = 0; i < target.length; i++) handleNode(target[i]); | ||
} | ||
function installFizzInstrObserver(target) { | ||
function handleMutations(mutations) { | ||
for (var i = 0; i < mutations.length; i++) | ||
for ( | ||
var addedNodes = mutations[i].addedNodes, j = 0; | ||
j < addedNodes.length; | ||
j++ | ||
) | ||
addedNodes[j].parentNode && handleNode(addedNodes[j]); | ||
} | ||
var fizzInstrObserver = new MutationObserver(handleMutations); | ||
fizzInstrObserver.observe(target, { childList: !0 }); | ||
window.addEventListener("DOMContentLoaded", function () { | ||
handleMutations(fizzInstrObserver.takeRecords()); | ||
fizzInstrObserver.disconnect(); | ||
}); | ||
} | ||
function handleNode(node_) { | ||
if (1 === node_.nodeType && node_.dataset) { | ||
var dataset = node_.dataset; | ||
if (null != dataset.rxi) { | ||
var errorDigest = dataset.dgst, | ||
errorMsg = dataset.msg, | ||
errorStack = dataset.stck, | ||
errorComponentStack = dataset.cstck, | ||
suspenseIdNode = document.getElementById(dataset.bid); | ||
suspenseIdNode && | ||
((dataset = suspenseIdNode.previousSibling), | ||
(dataset.data = "$!"), | ||
(suspenseIdNode = suspenseIdNode.dataset), | ||
errorDigest && (suspenseIdNode.dgst = errorDigest), | ||
errorMsg && (suspenseIdNode.msg = errorMsg), | ||
errorStack && (suspenseIdNode.stck = errorStack), | ||
errorComponentStack && (suspenseIdNode.cstck = errorComponentStack), | ||
dataset._reactRetry && dataset._reactRetry()); | ||
node_.remove(); | ||
} else if (null != dataset.rri) | ||
completeBoundaryWithStyles( | ||
dataset.bid, | ||
dataset.sid, | ||
JSON.parse(dataset.sty) | ||
), | ||
node_.remove(); | ||
else if (null != dataset.rci) | ||
completeBoundary(dataset.bid, dataset.sid), node_.remove(); | ||
else if (null != dataset.rsi) { | ||
errorDigest = dataset.pid; | ||
errorMsg = document.getElementById(dataset.sid); | ||
errorDigest = document.getElementById(errorDigest); | ||
for (errorMsg.parentNode.removeChild(errorMsg); errorMsg.firstChild; ) | ||
errorDigest.parentNode.insertBefore(errorMsg.firstChild, errorDigest); | ||
errorDigest.parentNode.removeChild(errorDigest); | ||
node_.remove(); | ||
} | ||
} | ||
} | ||
var resourceMap = new Map(); | ||
(function () { | ||
addEventListener("submit", function (event) { | ||
if (!event.defaultPrevented) { | ||
var form = event.target, | ||
submitter = event.submitter, | ||
action = form.action, | ||
formDataSubmitter = submitter; | ||
if (submitter) { | ||
var submitterAction = submitter.getAttribute("formAction"); | ||
null != submitterAction && | ||
((action = submitterAction), (formDataSubmitter = null)); | ||
} | ||
"javascript:throw new Error('React form unexpectedly submitted.')" === | ||
action && | ||
(event.preventDefault(), | ||
formDataSubmitter | ||
? ((event = document.createElement("input")), | ||
(event.name = formDataSubmitter.name), | ||
(event.value = formDataSubmitter.value), | ||
formDataSubmitter.parentNode.insertBefore( | ||
event, | ||
formDataSubmitter | ||
), | ||
(formDataSubmitter = new FormData(form)), | ||
event.parentNode.removeChild(event)) | ||
: (formDataSubmitter = new FormData(form)), | ||
(event = form.ownerDocument || form), | ||
(event.$$reactFormReplay = event.$$reactFormReplay || []).push( | ||
form, | ||
submitter, | ||
formDataSubmitter | ||
)); | ||
} | ||
}); | ||
})(); | ||
window.$RC || ((window.$RC = completeBoundary), (window.$RM = new Map())); | ||
if (null != document.body) | ||
"loading" === document.readyState && | ||
installFizzInstrObserver(document.body), | ||
handleExistingNodes(document.body); | ||
else { | ||
var domBodyObserver = new MutationObserver(function () { | ||
null != document.body && | ||
("loading" === document.readyState && | ||
installFizzInstrObserver(document.body), | ||
handleExistingNodes(document.body), | ||
domBodyObserver.disconnect()); | ||
}); | ||
domBodyObserver.observe(document.documentElement, { childList: !0 }); | ||
} | ||
})(); |
@@ -35,5 +35,5 @@ 'use strict'; | ||
checkDCE(); | ||
module.exports = require('./cjs/react-dom-unstable_testing.production.min.js'); | ||
module.exports = require('./cjs/react-dom-unstable_testing.production.js'); | ||
} else { | ||
module.exports = require('./cjs/react-dom-unstable_testing.development.js'); | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 7 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
0
8094018
48
217568
19
54
+ Addedreact@0.0.0-experimental-8b08e99e-20240713(transitive)
+ Addedscheduler@0.0.0-experimental-8b08e99e-20240713(transitive)
- Removedreact@0.0.0-experimental-8afa144bd-20240416(transitive)
- Removedscheduler@0.0.0-experimental-8afa144bd-20240416(transitive)