From b18936efc197472aa0f30ec0a8feba66deb191da Mon Sep 17 00:00:00 2001 From: eps1lon Date: Wed, 13 Mar 2024 22:14:51 +0000 Subject: [PATCH] React DOM: Support boolean values for `inert` prop (#24730) DiffTrain build for [bbc571aee431d44799ae6a70832ea834325a5af9](https://github.com/facebook/react/commit/bbc571aee431d44799ae6a70832ea834325a5af9) --- compiled/facebook-www/REVISION | 2 +- compiled/facebook-www/React-prod.classic.js | 2 +- compiled/facebook-www/React-prod.modern.js | 2 +- .../facebook-www/React-profiling.classic.js | 2 +- compiled/facebook-www/ReactART-dev.modern.js | 2 +- compiled/facebook-www/ReactDOM-dev.classic.js | 24 ++++++++++++++++--- compiled/facebook-www/ReactDOM-dev.modern.js | 24 ++++++++++++++++--- .../facebook-www/ReactDOM-prod.classic.js | 9 ++++--- compiled/facebook-www/ReactDOM-prod.modern.js | 9 ++++--- .../ReactDOM-profiling.classic.js | 9 ++++--- .../facebook-www/ReactDOM-profiling.modern.js | 9 ++++--- .../ReactDOMServer-dev.classic.js | 16 ++++++++++--- .../facebook-www/ReactDOMServer-dev.modern.js | 16 ++++++++++--- .../ReactDOMServerStreaming-dev.modern.js | 14 +++++++++-- .../ReactDOMTesting-dev.classic.js | 24 ++++++++++++++++--- .../ReactDOMTesting-dev.modern.js | 24 ++++++++++++++++--- .../ReactDOMTesting-prod.classic.js | 9 ++++--- .../ReactDOMTesting-prod.modern.js | 9 ++++--- .../__test_utils__/ReactAllWarnings.js | 1 + 19 files changed, 164 insertions(+), 43 deletions(-) diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index 394e5bd22dd40..df5f985f94200 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -17eaacaac167addf0c4358b4983f054073a0626d +bbc571aee431d44799ae6a70832ea834325a5af9 diff --git a/compiled/facebook-www/React-prod.classic.js b/compiled/facebook-www/React-prod.classic.js index cd3a0a84bf5e6..78bd1fd6b96c3 100644 --- a/compiled/facebook-www/React-prod.classic.js +++ b/compiled/facebook-www/React-prod.classic.js @@ -633,4 +633,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactCurrentDispatcher.current.useTransition(); }; -exports.version = "18.3.0-www-classic-7c2abefb"; +exports.version = "18.3.0-www-classic-3035b16e"; diff --git a/compiled/facebook-www/React-prod.modern.js b/compiled/facebook-www/React-prod.modern.js index 6e1c9ef588097..176aa8ae2e815 100644 --- a/compiled/facebook-www/React-prod.modern.js +++ b/compiled/facebook-www/React-prod.modern.js @@ -625,4 +625,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactCurrentDispatcher.current.useTransition(); }; -exports.version = "18.3.0-www-modern-0337b6c3"; +exports.version = "18.3.0-www-modern-0c35550e"; diff --git a/compiled/facebook-www/React-profiling.classic.js b/compiled/facebook-www/React-profiling.classic.js index fa7f2e7e20972..63392e841f063 100644 --- a/compiled/facebook-www/React-profiling.classic.js +++ b/compiled/facebook-www/React-profiling.classic.js @@ -637,7 +637,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactCurrentDispatcher.current.useTransition(); }; -exports.version = "18.3.0-www-classic-9048e373"; +exports.version = "18.3.0-www-classic-bf936cd0"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-dev.modern.js b/compiled/facebook-www/ReactART-dev.modern.js index bbf84d4016070..d95ff544fd4e5 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -66,7 +66,7 @@ if (__DEV__) { return self; } - var ReactVersion = "18.3.0-www-modern-0c307366"; + var ReactVersion = "18.3.0-www-modern-6a870747"; var LegacyRoot = 0; var ConcurrentRoot = 1; diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index bf7eb6133a3be..4d60f36eac3c5 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -6218,9 +6218,9 @@ if (__DEV__) { return aliases.get(name) || name; } - // When adding attributes to the HTML or SVG allowed attribute list, be sure to // also add them to this module to ensure casing and incorrect name // warnings. + var possibleStandardNames = { // HTML accept: "accept", @@ -7153,6 +7153,10 @@ if (__DEV__) { // Boolean properties can accept boolean values return true; } + // fallthrough + + case "inert": + // fallthrough for new boolean props without the flag on default: { var prefix = name.toLowerCase().slice(0, 5); @@ -7235,6 +7239,9 @@ if (__DEV__) { break; } + case "inert": + // fallthrough for new boolean props without the flag on + default: { return true; } @@ -35764,7 +35771,7 @@ if (__DEV__) { return root; } - var ReactVersion = "18.3.0-www-classic-bdc658a4"; + var ReactVersion = "18.3.0-www-classic-ecd67585"; function createPortal$1( children, @@ -40274,7 +40281,6 @@ if (__DEV__) { var canDiffStyleForHydrationWarning; { - // IE 11 parses & normalizes the style attribute as opposed to other // browsers. It adds spaces and sorts the properties in some // non-alphabetical order. Handling that would require sorting CSS // properties in the client & server versions or applying @@ -40282,6 +40288,7 @@ if (__DEV__) { // normalized. Since it only affects IE, we're skipping style warnings // in that browser completely in favor of doing all that work. // See https://github.com/facebook/react/issues/11807 + canDiffStyleForHydrationWarning = disableIEWorkarounds || (canUseDOM && !document.documentMode); } @@ -40944,6 +40951,13 @@ if (__DEV__) { } // Boolean + case "inert": { + setValueForAttribute(domElement, key, value); + break; + } + + // fallthrough for new boolean props without the flag on + case "allowFullScreen": case "async": case "autoPlay": @@ -43186,6 +43200,10 @@ if (__DEV__) { ); continue; + case "inert": + + // fallthrough for new boolean props without the flag on + default: { if ( // shouldIgnoreAttribute diff --git a/compiled/facebook-www/ReactDOM-dev.modern.js b/compiled/facebook-www/ReactDOM-dev.modern.js index 576c31cfbc494..b0c6680fec6ef 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -6052,9 +6052,9 @@ if (__DEV__) { return aliases.get(name) || name; } - // When adding attributes to the HTML or SVG allowed attribute list, be sure to // also add them to this module to ensure casing and incorrect name // warnings. + var possibleStandardNames = { // HTML accept: "accept", @@ -6987,6 +6987,10 @@ if (__DEV__) { // Boolean properties can accept boolean values return true; } + // fallthrough + + case "inert": + // fallthrough for new boolean props without the flag on default: { var prefix = name.toLowerCase().slice(0, 5); @@ -7069,6 +7073,9 @@ if (__DEV__) { break; } + case "inert": + // fallthrough for new boolean props without the flag on + default: { return true; } @@ -35611,7 +35618,7 @@ if (__DEV__) { return root; } - var ReactVersion = "18.3.0-www-modern-36442b85"; + var ReactVersion = "18.3.0-www-modern-c4533c51"; function createPortal$1( children, @@ -40930,7 +40937,6 @@ if (__DEV__) { var canDiffStyleForHydrationWarning; { - // IE 11 parses & normalizes the style attribute as opposed to other // browsers. It adds spaces and sorts the properties in some // non-alphabetical order. Handling that would require sorting CSS // properties in the client & server versions or applying @@ -40938,6 +40944,7 @@ if (__DEV__) { // normalized. Since it only affects IE, we're skipping style warnings // in that browser completely in favor of doing all that work. // See https://github.com/facebook/react/issues/11807 + canDiffStyleForHydrationWarning = disableIEWorkarounds || (canUseDOM && !document.documentMode); } @@ -41600,6 +41607,13 @@ if (__DEV__) { } // Boolean + case "inert": { + setValueForAttribute(domElement, key, value); + break; + } + + // fallthrough for new boolean props without the flag on + case "allowFullScreen": case "async": case "autoPlay": @@ -43839,6 +43853,10 @@ if (__DEV__) { ); continue; + case "inert": + + // fallthrough for new boolean props without the flag on + default: { if ( // shouldIgnoreAttribute diff --git a/compiled/facebook-www/ReactDOM-prod.classic.js b/compiled/facebook-www/ReactDOM-prod.classic.js index 51b48e996037f..5da47a002afa7 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -14529,6 +14529,9 @@ function setProp(domElement, tag, key, value, props, prevValue) { ) : domElement.removeAttribute(key); break; + case "inert": + setValueForAttribute(domElement, key, value); + break; case "allowFullScreen": case "async": case "autoPlay": @@ -17228,7 +17231,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1817 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-classic-36e5e9c2", + version: "18.3.0-www-classic-73e9398a", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2176 = { @@ -17258,7 +17261,7 @@ var internals$jscomp$inline_2176 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-www-classic-36e5e9c2" + reconcilerVersion: "18.3.0-www-classic-73e9398a" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2177 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -17589,4 +17592,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); }; -exports.version = "18.3.0-www-classic-36e5e9c2"; +exports.version = "18.3.0-www-classic-73e9398a"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index 4f97eec6463da..8265acc173e04 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -14833,6 +14833,9 @@ function setProp(domElement, tag, key, value, props, prevValue) { ) : domElement.removeAttribute(key); break; + case "inert": + setValueForAttribute(domElement, key, value); + break; case "allowFullScreen": case "async": case "autoPlay": @@ -16744,7 +16747,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1776 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-modern-67f26aa2", + version: "18.3.0-www-modern-aea768af", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2140 = { @@ -16775,7 +16778,7 @@ var internals$jscomp$inline_2140 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-www-modern-67f26aa2" + reconcilerVersion: "18.3.0-www-modern-aea768af" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2141 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -17034,4 +17037,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); }; -exports.version = "18.3.0-www-modern-67f26aa2"; +exports.version = "18.3.0-www-modern-aea768af"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index 5269d3292151e..f786634262c5c 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -15276,6 +15276,9 @@ function setProp(domElement, tag, key, value, props, prevValue) { ) : domElement.removeAttribute(key); break; + case "inert": + setValueForAttribute(domElement, key, value); + break; case "allowFullScreen": case "async": case "autoPlay": @@ -17975,7 +17978,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1902 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-classic-b1962418", + version: "18.3.0-www-classic-5be4d00a", rendererPackageName: "react-dom" }; (function (internals) { @@ -18019,7 +18022,7 @@ var devToolsConfig$jscomp$inline_1902 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-www-classic-b1962418" + reconcilerVersion: "18.3.0-www-classic-5be4d00a" }); assign(Internals, { ReactBrowserEventEmitter: { @@ -18337,7 +18340,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); }; -exports.version = "18.3.0-www-classic-b1962418"; +exports.version = "18.3.0-www-classic-5be4d00a"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-profiling.modern.js b/compiled/facebook-www/ReactDOM-profiling.modern.js index c53025dd32f83..c089ac433ee30 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -15574,6 +15574,9 @@ function setProp(domElement, tag, key, value, props, prevValue) { ) : domElement.removeAttribute(key); break; + case "inert": + setValueForAttribute(domElement, key, value); + break; case "allowFullScreen": case "async": case "autoPlay": @@ -17485,7 +17488,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1861 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-modern-0c307366", + version: "18.3.0-www-modern-6a870747", rendererPackageName: "react-dom" }; (function (internals) { @@ -17530,7 +17533,7 @@ var devToolsConfig$jscomp$inline_1861 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-www-modern-0c307366" + reconcilerVersion: "18.3.0-www-modern-6a870747" }); exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals; exports.createPortal = function (children, container) { @@ -17776,7 +17779,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); }; -exports.version = "18.3.0-www-modern-0c307366"; +exports.version = "18.3.0-www-modern-6a870747"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOMServer-dev.classic.js b/compiled/facebook-www/ReactDOMServer-dev.classic.js index c9b8cd445491c..39304f55e8bf6 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-665182c7"; + var ReactVersion = "18.3.0-www-classic-8476b078"; // This refers to a WWW module. var warningWWW = require("warning"); @@ -1168,9 +1168,9 @@ if (__DEV__) { } } - // When adding attributes to the HTML or SVG allowed attribute list, be sure to // also add them to this module to ensure casing and incorrect name // warnings. + var possibleStandardNames = { // HTML accept: "accept", @@ -1906,6 +1906,10 @@ if (__DEV__) { // Boolean properties can accept boolean values return true; } + // fallthrough + + case "inert": + // fallthrough for new boolean props without the flag on default: { var prefix = name.toLowerCase().slice(0, 5); @@ -1988,6 +1992,9 @@ if (__DEV__) { break; } + case "inert": + // fallthrough for new boolean props without the flag on + default: { return true; } @@ -2476,7 +2483,7 @@ if (__DEV__) { // It should also be noted that this maximum is a soft maximum. we have not reached the limit we will // allow one more header to be captured which means in practice if the limit is approached it will be exceeded - var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. + var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) @@ -3553,6 +3560,9 @@ if (__DEV__) { pushStringAttribute(target, "xml:space", value); return; + case "inert": + // fallthrough for new boolean props without the flag on + default: if ( // shouldIgnoreAttribute diff --git a/compiled/facebook-www/ReactDOMServer-dev.modern.js b/compiled/facebook-www/ReactDOMServer-dev.modern.js index 9b3d4d22ebf7a..b75c4a2c66916 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServer-dev.modern.js @@ -19,7 +19,7 @@ if (__DEV__) { var React = require("react"); var ReactDOM = require("react-dom"); - var ReactVersion = "18.3.0-www-modern-130d9f5a"; + var ReactVersion = "18.3.0-www-modern-ac1a257c"; // This refers to a WWW module. var warningWWW = require("warning"); @@ -1168,9 +1168,9 @@ if (__DEV__) { } } - // When adding attributes to the HTML or SVG allowed attribute list, be sure to // also add them to this module to ensure casing and incorrect name // warnings. + var possibleStandardNames = { // HTML accept: "accept", @@ -1906,6 +1906,10 @@ if (__DEV__) { // Boolean properties can accept boolean values return true; } + // fallthrough + + case "inert": + // fallthrough for new boolean props without the flag on default: { var prefix = name.toLowerCase().slice(0, 5); @@ -1988,6 +1992,9 @@ if (__DEV__) { break; } + case "inert": + // fallthrough for new boolean props without the flag on + default: { return true; } @@ -2476,7 +2483,7 @@ if (__DEV__) { // It should also be noted that this maximum is a soft maximum. we have not reached the limit we will // allow one more header to be captured which means in practice if the limit is approached it will be exceeded - var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. + var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) @@ -3553,6 +3560,9 @@ if (__DEV__) { pushStringAttribute(target, "xml:space", value); return; + case "inert": + // fallthrough for new boolean props without the flag on + default: if ( // shouldIgnoreAttribute diff --git a/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js b/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js index 9d25e66679e66..0b7fa431847b5 100644 --- a/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js @@ -1165,9 +1165,9 @@ if (__DEV__) { } } - // When adding attributes to the HTML or SVG allowed attribute list, be sure to // also add them to this module to ensure casing and incorrect name // warnings. + var possibleStandardNames = { // HTML accept: "accept", @@ -1903,6 +1903,10 @@ if (__DEV__) { // Boolean properties can accept boolean values return true; } + // fallthrough + + case "inert": + // fallthrough for new boolean props without the flag on default: { var prefix = name.toLowerCase().slice(0, 5); @@ -1985,6 +1989,9 @@ if (__DEV__) { break; } + case "inert": + // fallthrough for new boolean props without the flag on + default: { return true; } @@ -2473,7 +2480,7 @@ if (__DEV__) { // It should also be noted that this maximum is a soft maximum. we have not reached the limit we will // allow one more header to be captured which means in practice if the limit is approached it will be exceeded - var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. + var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) @@ -3550,6 +3557,9 @@ if (__DEV__) { pushStringAttribute(target, "xml:space", value); return; + case "inert": + // fallthrough for new boolean props without the flag on + default: if ( // shouldIgnoreAttribute diff --git a/compiled/facebook-www/ReactDOMTesting-dev.classic.js b/compiled/facebook-www/ReactDOMTesting-dev.classic.js index 96945dc7cc112..7c886cf5e6d69 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.classic.js @@ -6355,9 +6355,9 @@ if (__DEV__) { return aliases.get(name) || name; } - // When adding attributes to the HTML or SVG allowed attribute list, be sure to // also add them to this module to ensure casing and incorrect name // warnings. + var possibleStandardNames = { // HTML accept: "accept", @@ -7290,6 +7290,10 @@ if (__DEV__) { // Boolean properties can accept boolean values return true; } + // fallthrough + + case "inert": + // fallthrough for new boolean props without the flag on default: { var prefix = name.toLowerCase().slice(0, 5); @@ -7372,6 +7376,9 @@ if (__DEV__) { break; } + case "inert": + // fallthrough for new boolean props without the flag on + default: { return true; } @@ -36388,7 +36395,7 @@ if (__DEV__) { return root; } - var ReactVersion = "18.3.0-www-classic-7c2abefb"; + var ReactVersion = "18.3.0-www-classic-3035b16e"; function createPortal$1( children, @@ -40898,7 +40905,6 @@ if (__DEV__) { var canDiffStyleForHydrationWarning; { - // IE 11 parses & normalizes the style attribute as opposed to other // browsers. It adds spaces and sorts the properties in some // non-alphabetical order. Handling that would require sorting CSS // properties in the client & server versions or applying @@ -40906,6 +40912,7 @@ if (__DEV__) { // normalized. Since it only affects IE, we're skipping style warnings // in that browser completely in favor of doing all that work. // See https://github.com/facebook/react/issues/11807 + canDiffStyleForHydrationWarning = disableIEWorkarounds || (canUseDOM && !document.documentMode); } @@ -41568,6 +41575,13 @@ if (__DEV__) { } // Boolean + case "inert": { + setValueForAttribute(domElement, key, value); + break; + } + + // fallthrough for new boolean props without the flag on + case "allowFullScreen": case "async": case "autoPlay": @@ -43810,6 +43824,10 @@ if (__DEV__) { ); continue; + case "inert": + + // fallthrough for new boolean props without the flag on + default: { if ( // shouldIgnoreAttribute diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js index 796e5adbaacd8..54906c9f0aafb 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js @@ -6189,9 +6189,9 @@ if (__DEV__) { return aliases.get(name) || name; } - // When adding attributes to the HTML or SVG allowed attribute list, be sure to // also add them to this module to ensure casing and incorrect name // warnings. + var possibleStandardNames = { // HTML accept: "accept", @@ -7124,6 +7124,10 @@ if (__DEV__) { // Boolean properties can accept boolean values return true; } + // fallthrough + + case "inert": + // fallthrough for new boolean props without the flag on default: { var prefix = name.toLowerCase().slice(0, 5); @@ -7206,6 +7210,9 @@ if (__DEV__) { break; } + case "inert": + // fallthrough for new boolean props without the flag on + default: { return true; } @@ -36235,7 +36242,7 @@ if (__DEV__) { return root; } - var ReactVersion = "18.3.0-www-modern-366ea630"; + var ReactVersion = "18.3.0-www-modern-179afb8c"; function createPortal$1( children, @@ -41554,7 +41561,6 @@ if (__DEV__) { var canDiffStyleForHydrationWarning; { - // IE 11 parses & normalizes the style attribute as opposed to other // browsers. It adds spaces and sorts the properties in some // non-alphabetical order. Handling that would require sorting CSS // properties in the client & server versions or applying @@ -41562,6 +41568,7 @@ if (__DEV__) { // normalized. Since it only affects IE, we're skipping style warnings // in that browser completely in favor of doing all that work. // See https://github.com/facebook/react/issues/11807 + canDiffStyleForHydrationWarning = disableIEWorkarounds || (canUseDOM && !document.documentMode); } @@ -42224,6 +42231,13 @@ if (__DEV__) { } // Boolean + case "inert": { + setValueForAttribute(domElement, key, value); + break; + } + + // fallthrough for new boolean props without the flag on + case "allowFullScreen": case "async": case "autoPlay": @@ -44463,6 +44477,10 @@ if (__DEV__) { ); continue; + case "inert": + + // fallthrough for new boolean props without the flag on + default: { if ( // shouldIgnoreAttribute diff --git a/compiled/facebook-www/ReactDOMTesting-prod.classic.js b/compiled/facebook-www/ReactDOMTesting-prod.classic.js index 844c65292721a..b993b51fe01aa 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.classic.js @@ -14801,6 +14801,9 @@ function setProp(domElement, tag, key, value, props, prevValue) { ) : domElement.removeAttribute(key); break; + case "inert": + setValueForAttribute(domElement, key, value); + break; case "allowFullScreen": case "async": case "autoPlay": @@ -17557,7 +17560,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1822 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-classic-9048e373", + version: "18.3.0-www-classic-bf936cd0", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2188 = { @@ -17587,7 +17590,7 @@ var internals$jscomp$inline_2188 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-www-classic-9048e373" + reconcilerVersion: "18.3.0-www-classic-bf936cd0" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2189 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -18069,4 +18072,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); }; -exports.version = "18.3.0-www-classic-9048e373"; +exports.version = "18.3.0-www-classic-bf936cd0"; diff --git a/compiled/facebook-www/ReactDOMTesting-prod.modern.js b/compiled/facebook-www/ReactDOMTesting-prod.modern.js index 4dc9d446f1e3b..c5d22b76e51cb 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.modern.js @@ -15166,6 +15166,9 @@ function setProp(domElement, tag, key, value, props, prevValue) { ) : domElement.removeAttribute(key); break; + case "inert": + setValueForAttribute(domElement, key, value); + break; case "allowFullScreen": case "async": case "autoPlay": @@ -17134,7 +17137,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1781 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-modern-ebda6e88", + version: "18.3.0-www-modern-f71df7ba", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2151 = { @@ -17165,7 +17168,7 @@ var internals$jscomp$inline_2151 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-www-modern-ebda6e88" + reconcilerVersion: "18.3.0-www-modern-f71df7ba" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2152 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -17574,4 +17577,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); }; -exports.version = "18.3.0-www-modern-ebda6e88"; +exports.version = "18.3.0-www-modern-f71df7ba"; diff --git a/compiled/facebook-www/__test_utils__/ReactAllWarnings.js b/compiled/facebook-www/__test_utils__/ReactAllWarnings.js index a53c9132b7c7d..d588102363f17 100644 --- a/compiled/facebook-www/__test_utils__/ReactAllWarnings.js +++ b/compiled/facebook-www/__test_utils__/ReactAllWarnings.js @@ -272,6 +272,7 @@ export default [ "Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s=\"%s\" or %s={value.toString()}.", "Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s=\"%s\" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.", "Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.", + "Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.", "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.", "Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?", "Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.\n\nCheck the render method of %s.",