Skip to content

Commit 3953289

Browse files
committed
Add plumbing for onDefaultTransitionIndicator (#33150)
This just adds the options at the root and wire it up to the root but it doesn't do anything yet. DiffTrain build for [9b79292](9b79292)
1 parent 3c4769e commit 3953289

34 files changed

+1176
-890
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ac06829246287751e6b74bd99cd1b39d1aeba06a
1+
9b79292ae7c2980acb531f1dff3cf1ca2d2f40b7
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ac06829246287751e6b74bd99cd1b39d1aeba06a
1+
9b79292ae7c2980acb531f1dff3cf1ca2d2f40b7

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,7 @@ __DEV__ &&
15381538
exports.useTransition = function () {
15391539
return resolveDispatcher().useTransition();
15401540
};
1541-
exports.version = "19.2.0-www-classic-ac068292-20250508";
1541+
exports.version = "19.2.0-www-classic-9b79292a-20250508";
15421542
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15431543
"function" ===
15441544
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
@@ -1538,7 +1538,7 @@ __DEV__ &&
15381538
exports.useTransition = function () {
15391539
return resolveDispatcher().useTransition();
15401540
};
1541-
exports.version = "19.2.0-www-modern-ac068292-20250508";
1541+
exports.version = "19.2.0-www-modern-9b79292a-20250508";
15421542
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15431543
"function" ===
15441544
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
@@ -636,4 +636,4 @@ exports.useSyncExternalStore = function (
636636
exports.useTransition = function () {
637637
return ReactSharedInternals.H.useTransition();
638638
};
639-
exports.version = "19.2.0-www-classic-ac068292-20250508";
639+
exports.version = "19.2.0-www-classic-9b79292a-20250508";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,4 +636,4 @@ exports.useSyncExternalStore = function (
636636
exports.useTransition = function () {
637637
return ReactSharedInternals.H.useTransition();
638638
};
639-
exports.version = "19.2.0-www-modern-ac068292-20250508";
639+
exports.version = "19.2.0-www-modern-9b79292a-20250508";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ exports.useSyncExternalStore = function (
640640
exports.useTransition = function () {
641641
return ReactSharedInternals.H.useTransition();
642642
};
643-
exports.version = "19.2.0-www-classic-ac068292-20250508";
643+
exports.version = "19.2.0-www-classic-9b79292a-20250508";
644644
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
645645
"function" ===
646646
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
@@ -640,7 +640,7 @@ exports.useSyncExternalStore = function (
640640
exports.useTransition = function () {
641641
return ReactSharedInternals.H.useTransition();
642642
};
643-
exports.version = "19.2.0-www-modern-ac068292-20250508";
643+
exports.version = "19.2.0-www-modern-9b79292a-20250508";
644644
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
645645
"function" ===
646646
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

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

Lines changed: 161 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -6430,9 +6430,72 @@ __DEV__ &&
64306430
}
64316431
return baseProps;
64326432
}
6433+
function defaultOnUncaughtError(error) {
6434+
reportGlobalError(error);
6435+
console.warn(
6436+
"%s\n\n%s\n",
6437+
componentName
6438+
? "An error occurred in the <" + componentName + "> component."
6439+
: "An error occurred in one of your React components.",
6440+
"Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://react.dev/link/error-boundaries to learn more about error boundaries."
6441+
);
6442+
}
6443+
function defaultOnCaughtError(error) {
6444+
var componentNameMessage = componentName
6445+
? "The above error occurred in the <" + componentName + "> component."
6446+
: "The above error occurred in one of your React components.",
6447+
recreateMessage =
6448+
"React will try to recreate this component tree from scratch using the error boundary you provided, " +
6449+
((errorBoundaryName || "Anonymous") + ".");
6450+
if (
6451+
"object" === typeof error &&
6452+
null !== error &&
6453+
"string" === typeof error.environmentName
6454+
) {
6455+
var JSCompiler_inline_result = error.environmentName;
6456+
error = [
6457+
"%o\n\n%s\n\n%s\n",
6458+
error,
6459+
componentNameMessage,
6460+
recreateMessage
6461+
].slice(0);
6462+
"string" === typeof error[0]
6463+
? error.splice(
6464+
0,
6465+
1,
6466+
"%c%s%c " + error[0],
6467+
"background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",
6468+
" " + JSCompiler_inline_result + " ",
6469+
""
6470+
)
6471+
: error.splice(
6472+
0,
6473+
0,
6474+
"%c%s%c ",
6475+
"background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",
6476+
" " + JSCompiler_inline_result + " ",
6477+
""
6478+
);
6479+
error.unshift(console);
6480+
JSCompiler_inline_result = bind.apply(console.error, error);
6481+
JSCompiler_inline_result();
6482+
} else
6483+
console.error(
6484+
"%o\n\n%s\n\n%s\n",
6485+
error,
6486+
componentNameMessage,
6487+
recreateMessage
6488+
);
6489+
}
6490+
function defaultOnRecoverableError(error) {
6491+
reportGlobalError(error);
6492+
}
64336493
function logUncaughtError(root, errorInfo) {
64346494
try {
6435-
errorInfo.source && getComponentNameFromFiber(errorInfo.source);
6495+
componentName = errorInfo.source
6496+
? getComponentNameFromFiber(errorInfo.source)
6497+
: null;
6498+
errorBoundaryName = null;
64366499
var error = errorInfo.value;
64376500
if (null !== ReactSharedInternals.actQueue)
64386501
ReactSharedInternals.thrownErrors.push(error);
@@ -6448,8 +6511,10 @@ __DEV__ &&
64486511
}
64496512
function logCaughtError(root, boundary, errorInfo) {
64506513
try {
6451-
errorInfo.source && getComponentNameFromFiber(errorInfo.source);
6452-
getComponentNameFromFiber(boundary);
6514+
componentName = errorInfo.source
6515+
? getComponentNameFromFiber(errorInfo.source)
6516+
: null;
6517+
errorBoundaryName = getComponentNameFromFiber(boundary);
64536518
var onCaughtError = root.onCaughtError;
64546519
onCaughtError(errorInfo.value, {
64556520
componentStack: errorInfo.stack,
@@ -16678,6 +16743,7 @@ __DEV__ &&
1667816743
onUncaughtError,
1667916744
onCaughtError,
1668016745
onRecoverableError,
16746+
onDefaultTransitionIndicator,
1668116747
formState
1668216748
) {
1668316749
this.tag = 1;
@@ -16826,6 +16892,7 @@ __DEV__ &&
1682616892
}
1682716893
return null;
1682816894
}
16895+
function defaultOnDefaultTransitionIndicator() {}
1682916896
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1683016897
"function" ===
1683116898
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
@@ -16959,6 +17026,7 @@ __DEV__ &&
1695917026
_currentValue2: null,
1696017027
_threadCount: 0
1696117028
},
17029+
bind = Function.prototype.bind,
1696217030
valueStack = [];
1696317031
var fiberStack = [];
1696417032
var index$jscomp$0 = -1;
@@ -18584,87 +18652,90 @@ __DEV__ &&
1858418652
var didWarnOnInvalidCallback = new Set();
1858518653
Object.freeze(fakeInternalInstance);
1858618654
var classComponentUpdater = {
18587-
enqueueSetState: function (inst, payload, callback) {
18588-
inst = inst._reactInternals;
18589-
var lane = requestUpdateLane(inst),
18590-
update = createUpdate(lane);
18591-
update.payload = payload;
18592-
void 0 !== callback &&
18593-
null !== callback &&
18594-
(warnOnInvalidCallback(callback), (update.callback = callback));
18595-
payload = enqueueUpdate(inst, update, lane);
18596-
null !== payload &&
18597-
(startUpdateTimerByLane(lane, "this.setState()"),
18598-
scheduleUpdateOnFiber(payload, inst, lane),
18599-
entangleTransitions(payload, inst, lane));
18600-
enableSchedulingProfiler && markStateUpdateScheduled(inst, lane);
18601-
},
18602-
enqueueReplaceState: function (inst, payload, callback) {
18603-
inst = inst._reactInternals;
18604-
var lane = requestUpdateLane(inst),
18605-
update = createUpdate(lane);
18606-
update.tag = ReplaceState;
18607-
update.payload = payload;
18608-
void 0 !== callback &&
18609-
null !== callback &&
18610-
(warnOnInvalidCallback(callback), (update.callback = callback));
18611-
payload = enqueueUpdate(inst, update, lane);
18612-
null !== payload &&
18613-
(startUpdateTimerByLane(lane, "this.replaceState()"),
18614-
scheduleUpdateOnFiber(payload, inst, lane),
18615-
entangleTransitions(payload, inst, lane));
18616-
enableSchedulingProfiler && markStateUpdateScheduled(inst, lane);
18617-
},
18618-
enqueueForceUpdate: function (inst, callback) {
18619-
inst = inst._reactInternals;
18620-
var lane = requestUpdateLane(inst),
18621-
update = createUpdate(lane);
18622-
update.tag = ForceUpdate;
18623-
void 0 !== callback &&
18655+
enqueueSetState: function (inst, payload, callback) {
18656+
inst = inst._reactInternals;
18657+
var lane = requestUpdateLane(inst),
18658+
update = createUpdate(lane);
18659+
update.payload = payload;
18660+
void 0 !== callback &&
18661+
null !== callback &&
18662+
(warnOnInvalidCallback(callback), (update.callback = callback));
18663+
payload = enqueueUpdate(inst, update, lane);
18664+
null !== payload &&
18665+
(startUpdateTimerByLane(lane, "this.setState()"),
18666+
scheduleUpdateOnFiber(payload, inst, lane),
18667+
entangleTransitions(payload, inst, lane));
18668+
enableSchedulingProfiler && markStateUpdateScheduled(inst, lane);
18669+
},
18670+
enqueueReplaceState: function (inst, payload, callback) {
18671+
inst = inst._reactInternals;
18672+
var lane = requestUpdateLane(inst),
18673+
update = createUpdate(lane);
18674+
update.tag = ReplaceState;
18675+
update.payload = payload;
18676+
void 0 !== callback &&
18677+
null !== callback &&
18678+
(warnOnInvalidCallback(callback), (update.callback = callback));
18679+
payload = enqueueUpdate(inst, update, lane);
18680+
null !== payload &&
18681+
(startUpdateTimerByLane(lane, "this.replaceState()"),
18682+
scheduleUpdateOnFiber(payload, inst, lane),
18683+
entangleTransitions(payload, inst, lane));
18684+
enableSchedulingProfiler && markStateUpdateScheduled(inst, lane);
18685+
},
18686+
enqueueForceUpdate: function (inst, callback) {
18687+
inst = inst._reactInternals;
18688+
var lane = requestUpdateLane(inst),
18689+
update = createUpdate(lane);
18690+
update.tag = ForceUpdate;
18691+
void 0 !== callback &&
18692+
null !== callback &&
18693+
(warnOnInvalidCallback(callback), (update.callback = callback));
18694+
callback = enqueueUpdate(inst, update, lane);
1862418695
null !== callback &&
18625-
(warnOnInvalidCallback(callback), (update.callback = callback));
18626-
callback = enqueueUpdate(inst, update, lane);
18627-
null !== callback &&
18628-
(startUpdateTimerByLane(lane, "this.forceUpdate()"),
18629-
scheduleUpdateOnFiber(callback, inst, lane),
18630-
entangleTransitions(callback, inst, lane));
18631-
enableSchedulingProfiler &&
18696+
(startUpdateTimerByLane(lane, "this.forceUpdate()"),
18697+
scheduleUpdateOnFiber(callback, inst, lane),
18698+
entangleTransitions(callback, inst, lane));
1863218699
enableSchedulingProfiler &&
18633-
null !== injectedProfilingHooks &&
18634-
"function" ===
18635-
typeof injectedProfilingHooks.markForceUpdateScheduled &&
18636-
injectedProfilingHooks.markForceUpdateScheduled(inst, lane);
18637-
}
18638-
};
18639-
"function" === typeof reportError
18640-
? reportError
18641-
: function (error) {
18642-
if (
18643-
"object" === typeof window &&
18644-
"function" === typeof window.ErrorEvent
18645-
) {
18646-
var event = new window.ErrorEvent("error", {
18647-
bubbles: !0,
18648-
cancelable: !0,
18649-
message:
18650-
"object" === typeof error &&
18651-
null !== error &&
18652-
"string" === typeof error.message
18653-
? String(error.message)
18654-
: String(error),
18655-
error: error
18656-
});
18657-
if (!window.dispatchEvent(event)) return;
18658-
} else if (
18659-
"object" === typeof process &&
18660-
"function" === typeof process.emit
18661-
) {
18662-
process.emit("uncaughtException", error);
18663-
return;
18664-
}
18665-
console.error(error);
18666-
};
18667-
var TransitionRoot = 0,
18700+
enableSchedulingProfiler &&
18701+
null !== injectedProfilingHooks &&
18702+
"function" ===
18703+
typeof injectedProfilingHooks.markForceUpdateScheduled &&
18704+
injectedProfilingHooks.markForceUpdateScheduled(inst, lane);
18705+
}
18706+
},
18707+
reportGlobalError =
18708+
"function" === typeof reportError
18709+
? reportError
18710+
: function (error) {
18711+
if (
18712+
"object" === typeof window &&
18713+
"function" === typeof window.ErrorEvent
18714+
) {
18715+
var event = new window.ErrorEvent("error", {
18716+
bubbles: !0,
18717+
cancelable: !0,
18718+
message:
18719+
"object" === typeof error &&
18720+
null !== error &&
18721+
"string" === typeof error.message
18722+
? String(error.message)
18723+
: String(error),
18724+
error: error
18725+
});
18726+
if (!window.dispatchEvent(event)) return;
18727+
} else if (
18728+
"object" === typeof process &&
18729+
"function" === typeof process.emit
18730+
) {
18731+
process.emit("uncaughtException", error);
18732+
return;
18733+
}
18734+
console.error(error);
18735+
},
18736+
componentName = null,
18737+
errorBoundaryName = null,
18738+
TransitionRoot = 0,
1866818739
TransitionTracingMarker = 1,
1866918740
markerInstanceStack = createCursor(null),
1867018741
SelectiveHydrationException = Error(
@@ -18945,13 +19016,14 @@ __DEV__ &&
1894519016
1,
1894619017
!1,
1894719018
"",
18948-
void 0,
18949-
void 0,
18950-
void 0,
19019+
defaultOnUncaughtError,
19020+
defaultOnCaughtError,
19021+
defaultOnRecoverableError,
19022+
defaultOnDefaultTransitionIndicator,
1895119023
null
1895219024
);
1895319025
_this$props.hydrationCallbacks = null;
18954-
enableTransitionTracing && (_this$props.transitionCallbacks = void 0);
19026+
enableTransitionTracing && (_this$props.transitionCallbacks = null);
1895519027
var uninitializedFiber = 1;
1895619028
isDevToolsPresent && (uninitializedFiber |= 2);
1895719029
uninitializedFiber = createFiber(3, null, null, uninitializedFiber);
@@ -19032,10 +19104,10 @@ __DEV__ &&
1903219104
(function () {
1903319105
var internals = {
1903419106
bundleType: 1,
19035-
version: "19.2.0-www-classic-ac068292-20250508",
19107+
version: "19.2.0-www-classic-9b79292a-20250508",
1903619108
rendererPackageName: "react-art",
1903719109
currentDispatcherRef: ReactSharedInternals,
19038-
reconcilerVersion: "19.2.0-www-classic-ac068292-20250508"
19110+
reconcilerVersion: "19.2.0-www-classic-9b79292a-20250508"
1903919111
};
1904019112
internals.overrideHookState = overrideHookState;
1904119113
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -19069,7 +19141,7 @@ __DEV__ &&
1906919141
exports.Shape = Shape;
1907019142
exports.Surface = Surface;
1907119143
exports.Text = Text;
19072-
exports.version = "19.2.0-www-classic-ac068292-20250508";
19144+
exports.version = "19.2.0-www-classic-9b79292a-20250508";
1907319145
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1907419146
"function" ===
1907519147
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)