Skip to content

Commit 204d73a

Browse files
committed
Add "auto" class to mean the built-in should run (#32761)
Stacked on #32734 In React a ViewTransition class of `"none"` doesn't just mean that it has no class but also that it has no ViewTransition name. The default (`null | undefined`) means that it has no specific class but should run with the default built-in animation. This adds this as an explicit string called `"auto"` as well. That way you can do `<ViewTransition default="foo" enter="auto">` to override the "foo" just for the "enter" trigger to be the default built-in animation. Where as if you just specified `null` it would be like not specifying enter at all which would trigger "foo". DiffTrain build for [fceb0f8](fceb0f8)
1 parent 86c53b4 commit 204d73a

34 files changed

+212
-104
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e0c99c4ea1cae566ad8040180cf180ae058cb8bf
1+
fceb0f80bc729d061bcb5031801cfc824adc07a9
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e0c99c4ea1cae566ad8040180cf180ae058cb8bf
1+
fceb0f80bc729d061bcb5031801cfc824adc07a9

compiled/facebook-www/React-dev.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1511,7 +1511,7 @@ __DEV__ &&
15111511
exports.useTransition = function () {
15121512
return resolveDispatcher().useTransition();
15131513
};
1514-
exports.version = "19.1.0-www-classic-e0c99c4e-20250326";
1514+
exports.version = "19.1.0-www-classic-fceb0f80-20250326";
15151515
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15161516
"function" ===
15171517
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1511,7 +1511,7 @@ __DEV__ &&
15111511
exports.useTransition = function () {
15121512
return resolveDispatcher().useTransition();
15131513
};
1514-
exports.version = "19.1.0-www-modern-e0c99c4e-20250326";
1514+
exports.version = "19.1.0-www-modern-fceb0f80-20250326";
15151515
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15161516
"function" ===
15171517
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-prod.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,4 +624,4 @@ exports.useSyncExternalStore = function (
624624
exports.useTransition = function () {
625625
return ReactSharedInternals.H.useTransition();
626626
};
627-
exports.version = "19.1.0-www-classic-e0c99c4e-20250326";
627+
exports.version = "19.1.0-www-classic-fceb0f80-20250326";

compiled/facebook-www/React-prod.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,4 +624,4 @@ exports.useSyncExternalStore = function (
624624
exports.useTransition = function () {
625625
return ReactSharedInternals.H.useTransition();
626626
};
627-
exports.version = "19.1.0-www-modern-e0c99c4e-20250326";
627+
exports.version = "19.1.0-www-modern-fceb0f80-20250326";

compiled/facebook-www/React-profiling.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ exports.useSyncExternalStore = function (
628628
exports.useTransition = function () {
629629
return ReactSharedInternals.H.useTransition();
630630
};
631-
exports.version = "19.1.0-www-classic-e0c99c4e-20250326";
631+
exports.version = "19.1.0-www-classic-fceb0f80-20250326";
632632
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
633633
"function" ===
634634
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-profiling.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ exports.useSyncExternalStore = function (
628628
exports.useTransition = function () {
629629
return ReactSharedInternals.H.useTransition();
630630
};
631-
exports.version = "19.1.0-www-modern-e0c99c4e-20250326";
631+
exports.version = "19.1.0-www-modern-fceb0f80-20250326";
632632
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
633633
"function" ===
634634
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.classic.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1974,7 +1974,13 @@ __DEV__ &&
19741974
function getViewTransitionClassName(defaultClass, eventClass) {
19751975
defaultClass = getClassNameByType(defaultClass);
19761976
eventClass = getClassNameByType(eventClass);
1977-
return null == eventClass ? defaultClass : eventClass;
1977+
return null == eventClass
1978+
? "auto" === defaultClass
1979+
? null
1980+
: defaultClass
1981+
: "auto" === eventClass
1982+
? null
1983+
: eventClass;
19781984
}
19791985
function is(x, y) {
19801986
return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
@@ -18188,10 +18194,10 @@ __DEV__ &&
1818818194
(function () {
1818918195
var internals = {
1819018196
bundleType: 1,
18191-
version: "19.1.0-www-classic-e0c99c4e-20250326",
18197+
version: "19.1.0-www-classic-fceb0f80-20250326",
1819218198
rendererPackageName: "react-art",
1819318199
currentDispatcherRef: ReactSharedInternals,
18194-
reconcilerVersion: "19.1.0-www-classic-e0c99c4e-20250326"
18200+
reconcilerVersion: "19.1.0-www-classic-fceb0f80-20250326"
1819518201
};
1819618202
internals.overrideHookState = overrideHookState;
1819718203
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -18225,7 +18231,7 @@ __DEV__ &&
1822518231
exports.Shape = Shape;
1822618232
exports.Surface = Surface;
1822718233
exports.Text = Text;
18228-
exports.version = "19.1.0-www-classic-e0c99c4e-20250326";
18234+
exports.version = "19.1.0-www-classic-fceb0f80-20250326";
1822918235
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1823018236
"function" ===
1823118237
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.modern.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1880,7 +1880,13 @@ __DEV__ &&
18801880
function getViewTransitionClassName(defaultClass, eventClass) {
18811881
defaultClass = getClassNameByType(defaultClass);
18821882
eventClass = getClassNameByType(eventClass);
1883-
return null == eventClass ? defaultClass : eventClass;
1883+
return null == eventClass
1884+
? "auto" === defaultClass
1885+
? null
1886+
: defaultClass
1887+
: "auto" === eventClass
1888+
? null
1889+
: eventClass;
18841890
}
18851891
function is(x, y) {
18861892
return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
@@ -17960,10 +17966,10 @@ __DEV__ &&
1796017966
(function () {
1796117967
var internals = {
1796217968
bundleType: 1,
17963-
version: "19.1.0-www-modern-e0c99c4e-20250326",
17969+
version: "19.1.0-www-modern-fceb0f80-20250326",
1796417970
rendererPackageName: "react-art",
1796517971
currentDispatcherRef: ReactSharedInternals,
17966-
reconcilerVersion: "19.1.0-www-modern-e0c99c4e-20250326"
17972+
reconcilerVersion: "19.1.0-www-modern-fceb0f80-20250326"
1796717973
};
1796817974
internals.overrideHookState = overrideHookState;
1796917975
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -17997,7 +18003,7 @@ __DEV__ &&
1799718003
exports.Shape = Shape;
1799818004
exports.Surface = Surface;
1799918005
exports.Text = Text;
18000-
exports.version = "19.1.0-www-modern-e0c99c4e-20250326";
18006+
exports.version = "19.1.0-www-modern-fceb0f80-20250326";
1800118007
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1800218008
"function" ===
1800318009
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)