diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index bdcb03c76c..7a9b3ded0e 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -5ad8ef57729fa4a57aeec3f9b0516325248dba85 +5ea1397b2b62875dfb521cf8de0efcc15d0df797 diff --git a/compiled/facebook-www/ReactDOMServer-dev.classic.js b/compiled/facebook-www/ReactDOMServer-dev.classic.js index 7903dded03..bfa68a7472 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.classic.js +++ b/compiled/facebook-www/ReactDOMServer-dev.classic.js @@ -19,7 +19,7 @@ if (__DEV__) { var React = require("react"); var ReactDOM = require("react-dom"); -var ReactVersion = "18.3.0-www-classic-339f6d9e"; +var ReactVersion = "18.3.0-www-classic-9ea6402e"; // This refers to a WWW module. var warningWWW = require("warning"); @@ -109,21 +109,6 @@ function closeWithError(destination, error) { destination.destroy(error); } -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; -} - var assign = Object.assign; /* @@ -1875,461 +1860,6 @@ function getValueDescriptorExpectingEnumForWarning(thing) { : 'something with type "' + typeof thing + '"'; } -function compareResourcePropsForWarning(newProps, currentProps) { - { - var propDiffs = null; - var allProps = Array.from( - new Set(Object.keys(currentProps).concat(Object.keys(newProps))) - ); - - for (var i = 0; i < allProps.length; i++) { - var propName = allProps[i]; - var newValue = newProps[propName]; - var currentValue = currentProps[propName]; - - if ( - newValue !== currentValue && - !(newValue == null && currentValue == null) - ) { - if (newValue == null) { - if (propDiffs === null) { - propDiffs = { - missing: {}, - extra: {}, - different: {} - }; - } - - propDiffs.missing[propName] = currentValue; - } else if (currentValue == null) { - if (propDiffs === null) { - propDiffs = { - missing: {}, - extra: {}, - different: {} - }; - } - - propDiffs.extra[propName] = newValue; - } else { - if (propDiffs === null) { - propDiffs = { - missing: {}, - extra: {}, - different: {} - }; - } - - propDiffs.different[propName] = { - original: currentValue, - latest: newValue - }; - } - } - } - - return propDiffs; - } -} - -function describeDifferencesForStylesheets(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ""; - var description = ""; - - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; - - if (propName === "media") { - description += - '\n "' + - propName + - '" missing for props, original value: ' + - getValueDescriptorExpectingEnumForWarning(propValue); - } - } - - for (var _propName in diff.extra) { - var _propValue = diff.extra[_propName]; - description += - '\n "' + - _propName + - '" prop value: ' + - getValueDescriptorExpectingEnumForWarning(_propValue) + - ", missing from original props"; - } - - for (var _propName2 in diff.different) { - var latestValue = diff.different[_propName2].latest; - var originalValue = diff.different[_propName2].original; - description += - '\n "' + - _propName2 + - '" prop value: ' + - getValueDescriptorExpectingEnumForWarning(latestValue) + - ", original value: " + - getValueDescriptorExpectingEnumForWarning(originalValue); - } - - return description; -} -function describeDifferencesForStylesheetOverPreinit(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ""; - var description = ""; - - for (var propName in diff.extra) { - var propValue = diff.extra[propName]; - - if ( - propName === "precedence" || - propName === "crossOrigin" || - propName === "integrity" - ) { - description += - '\n "' + - propName + - '" prop value: ' + - getValueDescriptorExpectingEnumForWarning(propValue) + - ", option missing"; - } else { - description += - '\n "' + - propName + - '" prop value: ' + - getValueDescriptorExpectingEnumForWarning(propValue) + - ", option not available with ReactDOM.preinit()"; - } - } - - for (var _propName3 in diff.different) { - var latestValue = diff.different[_propName3].latest; - var originalValue = diff.different[_propName3].original; - - if (_propName3 === "precedence" && originalValue === "default") { - description += - '\n "' + - _propName3 + - '" prop value: ' + - getValueDescriptorExpectingEnumForWarning(latestValue) + - ", missing from options"; - } else { - description += - '\n "' + - _propName3 + - '" prop value: ' + - getValueDescriptorExpectingEnumForWarning(latestValue) + - ", option value: " + - getValueDescriptorExpectingEnumForWarning(originalValue); - } - } - - return description; -} -function describeDifferencesForPreinitOverStylesheet(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ""; - var description = ""; - - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; - - if (propName === "precedence" && propValue !== "default") { - description += - '\n "' + - propName + - '" missing from options, prop value: ' + - getValueDescriptorExpectingEnumForWarning(propValue); - } - } - - for (var _propName4 in diff.extra) { - var _propValue2 = diff.extra[_propName4]; - - if ( - _propName4 === "precedence" || - _propName4 === "crossOrigin" || - _propName4 === "integrity" - ) { - description += - '\n "' + - _propName4 + - '" option value: ' + - getValueDescriptorExpectingEnumForWarning(_propValue2) + - ", missing from props"; - } - } - - for (var _propName5 in diff.different) { - var latestValue = diff.different[_propName5].latest; - var originalValue = diff.different[_propName5].original; - description += - '\n "' + - _propName5 + - '" option value: ' + - getValueDescriptorExpectingEnumForWarning(latestValue) + - ", prop value: " + - getValueDescriptorExpectingEnumForWarning(originalValue); - } - - return description; -} -function describeDifferencesForPreinits(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ""; - var description = ""; - - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; - - if (propName === "precedence" && propValue !== "default") { - description += - '\n "' + - propName + - '" missing from options, original option value: ' + - getValueDescriptorExpectingEnumForWarning(propValue); - } - } - - for (var _propName6 in diff.extra) { - var _propValue3 = diff.extra[_propName6]; - - if ( - (_propName6 === "precedence" && _propValue3 !== "default") || - _propName6 === "crossOrigin" || - _propName6 === "integrity" - ) { - description += - '\n "' + - _propName6 + - '" option value: ' + - getValueDescriptorExpectingEnumForWarning(_propValue3) + - ", missing from original options"; - } - } - - for (var _propName7 in diff.different) { - var latestValue = diff.different[_propName7].latest; - var originalValue = diff.different[_propName7].original; - description += - '\n "' + - _propName7 + - '" option value: ' + - getValueDescriptorExpectingEnumForWarning(latestValue) + - ", original option value: " + - getValueDescriptorExpectingEnumForWarning(originalValue); - } - - return description; -} -var preloadOptionsForComparison = ["as", "crossOrigin", "integrity", "media"]; -function describeDifferencesForPreloads(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ""; - var description = ""; - - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; - - if (preloadOptionsForComparison.includes(propName)) { - description += - '\n "' + - propName + - '" missing from options, original option value: ' + - getValueDescriptorExpectingEnumForWarning(propValue); - } - } - - for (var _propName8 in diff.extra) { - var _propValue4 = diff.extra[_propName8]; - - if (preloadOptionsForComparison.includes(_propName8)) { - description += - '\n "' + - _propName8 + - '" option value: ' + - getValueDescriptorExpectingEnumForWarning(_propValue4) + - ", missing from original options"; - } - } - - for (var _propName9 in diff.different) { - var latestValue = diff.different[_propName9].latest; - var originalValue = diff.different[_propName9].original; - - if (preloadOptionsForComparison.includes(_propName9)) { - description += - '\n "' + - _propName9 + - '" option value: ' + - getValueDescriptorExpectingEnumForWarning(latestValue) + - ", original option value: " + - getValueDescriptorExpectingEnumForWarning(originalValue); - } - } - - return description; -} -function describeDifferencesForPreloadOverImplicitPreload( - newProps, - currentProps -) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ""; - var description = ""; - - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; - - if (preloadOptionsForComparison.includes(propName)) { - description += - '\n "' + - propName + - '" missing from options, underlying prop value: ' + - getValueDescriptorExpectingEnumForWarning(propValue); - } - } - - for (var _propName10 in diff.extra) { - var _propValue5 = diff.extra[_propName10]; - - if (preloadOptionsForComparison.includes(_propName10)) { - description += - '\n "' + - _propName10 + - '" option value: ' + - getValueDescriptorExpectingEnumForWarning(_propValue5) + - ", missing from underlying props"; - } - } - - for (var _propName11 in diff.different) { - var latestValue = diff.different[_propName11].latest; - var originalValue = diff.different[_propName11].original; - - if (preloadOptionsForComparison.includes(_propName11)) { - description += - '\n "' + - _propName11 + - '" option value: ' + - getValueDescriptorExpectingEnumForWarning(latestValue) + - ", underlying prop value: " + - getValueDescriptorExpectingEnumForWarning(originalValue); - } - } - - return description; -} -function describeDifferencesForScripts(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ""; - var description = ""; - - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; - description += - '\n "' + - propName + - '" missing for props, original value: ' + - getValueDescriptorExpectingEnumForWarning(propValue); - } - - for (var _propName12 in diff.extra) { - var _propValue6 = diff.extra[_propName12]; - description += - '\n "' + - _propName12 + - '" prop value: ' + - getValueDescriptorExpectingEnumForWarning(_propValue6) + - ", missing from original props"; - } - - for (var _propName13 in diff.different) { - var latestValue = diff.different[_propName13].latest; - var originalValue = diff.different[_propName13].original; - description += - '\n "' + - _propName13 + - '" prop value: ' + - getValueDescriptorExpectingEnumForWarning(latestValue) + - ", original value: " + - getValueDescriptorExpectingEnumForWarning(originalValue); - } - - return description; -} -function describeDifferencesForScriptOverPreinit(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ""; - var description = ""; - - for (var propName in diff.extra) { - var propValue = diff.extra[propName]; - - if (propName === "crossOrigin" || propName === "integrity") { - description += - '\n "' + - propName + - '" prop value: ' + - getValueDescriptorExpectingEnumForWarning(propValue) + - ", option missing"; - } else { - description += - '\n "' + - propName + - '" prop value: ' + - getValueDescriptorExpectingEnumForWarning(propValue) + - ", option not available with ReactDOM.preinit()"; - } - } - - for (var _propName14 in diff.different) { - var latestValue = diff.different[_propName14].latest; - var originalValue = diff.different[_propName14].original; - description += - '\n "' + - _propName14 + - '" prop value: ' + - getValueDescriptorExpectingEnumForWarning(latestValue) + - ", option value: " + - getValueDescriptorExpectingEnumForWarning(originalValue); - } - - return description; -} -function describeDifferencesForPreinitOverScript(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ""; - var description = ""; - - for (var propName in diff.extra) { - var propValue = diff.extra[propName]; - - if (propName === "crossOrigin" || propName === "integrity") { - description += - '\n "' + - propName + - '" option value: ' + - getValueDescriptorExpectingEnumForWarning(propValue) + - ", missing from props"; - } - } - - for (var _propName15 in diff.different) { - var latestValue = diff.different[_propName15].latest; - var originalValue = diff.different[_propName15].original; - description += - '\n "' + - _propName15 + - '" option value: ' + - getValueDescriptorExpectingEnumForWarning(latestValue) + - ", prop value: " + - getValueDescriptorExpectingEnumForWarning(originalValue); - } - - return description; -} - var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; @@ -4103,62 +3633,6 @@ function pushLink( // This stylesheet refers to a Resource and we create a new one if necessary var resource = resources.stylesMap.get(key); - { - var devResource = getAsResourceDEV(resource); - - if (devResource) { - switch (devResource.__provenance) { - case "rendered": { - var differenceDescription = describeDifferencesForStylesheets( - // Diff the props from the JSX element, not the derived resource props - props, - devResource.__originalProps - ); - - if (differenceDescription) { - error( - 'React encountered a with a `precedence` prop that has props that conflict' + - ' with another hoistable stylesheet with the same `href`. When using `precedence` with ' + - " the props from the first encountered instance will be used and props from later instances will be ignored." + - ' Update the props on either instance so they agree.%s', - href, - differenceDescription - ); - } - - break; - } - - case "preinit": { - var _differenceDescription = - describeDifferencesForStylesheetOverPreinit( - // Diff the props from the JSX element, not the derived resource props - props, - devResource.__propsEquivalent - ); - - if (_differenceDescription) { - error( - 'React encountered a with props that conflict' + - ' with the options provided to `ReactDOM.preinit("%s", { as: "style", ... })`. React will use the first props or preinitialization' + - " options encountered when rendering a hoistable stylesheet with a particular `href` and will ignore any newer props or" + - " options. The first instance of this stylesheet resource was created using the `ReactDOM.preinit()` function." + - " Please note, `ReactDOM.preinit()` is modeled off of module import assertions capabilities and does not support" + - " arbitrary props. If you need to have props not included with the preinit options you will need to rely on rendering" + - " tags only.%s", - precedence, - href, - href, - _differenceDescription - ); - } - - break; - } - } - } - } - if (!resource) { var resourceProps = stylesheetPropsFromRawProps(props); var preloadResource = resources.preloadsMap.get(key); @@ -4185,11 +3659,6 @@ function pushLink( props: resourceProps }; resources.stylesMap.set(key, resource); - - { - markAsRenderedResourceDEV(resource, props); - } - var precedenceSet = resources.precedences.get(precedence); if (!precedenceSet) { @@ -4571,11 +4040,6 @@ function pushImg(target, props, resources) { } }; resources.preloadsMap.set(key, resource); - - { - markAsRenderedResourceDEV(resource, props); - } - pushLinkImpl(resource.chunks, resource.props); } @@ -4833,61 +4297,6 @@ function pushScript( var resource = resources.scriptsMap.get(key); - { - var devResource = getAsResourceDEV(resource); - - if (devResource) { - switch (devResource.__provenance) { - case "rendered": { - var differenceDescription = describeDifferencesForScripts( - // Diff the props from the JSX element, not the derived resource props - props, - devResource.__originalProps - ); - - if (differenceDescription) { - error( - 'React encountered a