Skip to content

Commit 96e3f7d

Browse files
ncc-compiled
1 parent 6e08522 commit 96e3f7d

60 files changed

Lines changed: 1203 additions & 1059 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js

Lines changed: 253 additions & 229 deletions
Large diffs are not rendered by default.

packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js

Lines changed: 112 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -7819,23 +7819,29 @@ function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
78197819
if (5 === tag || 6 === tag)
78207820
(node = node.stateNode),
78217821
before
7822-
? (9 === parent.nodeType
7823-
? parent.body
7824-
: "HTML" === parent.nodeName
7825-
? parent.ownerDocument.body
7826-
: parent
7827-
).insertBefore(node, before)
7828-
: ((before =
7822+
? ((parent =
78297823
9 === parent.nodeType
78307824
? parent.body
78317825
: "HTML" === parent.nodeName
78327826
? parent.ownerDocument.body
78337827
: parent),
7834-
before.appendChild(node),
7835-
(parent = parent._reactRootContainer),
7836-
(null !== parent && void 0 !== parent) ||
7837-
null !== before.onclick ||
7838-
(before.onclick = noop$1)),
7828+
supportsMoveBefore && null !== node.parentNode
7829+
? parent.moveBefore(node, before)
7830+
: parent.insertBefore(node, before))
7831+
: ((before = parent),
7832+
(parent =
7833+
9 === before.nodeType
7834+
? before.body
7835+
: "HTML" === before.nodeName
7836+
? before.ownerDocument.body
7837+
: before),
7838+
supportsMoveBefore && null !== node.parentNode
7839+
? parent.moveBefore(node, null)
7840+
: parent.appendChild(node),
7841+
(before = before._reactRootContainer),
7842+
(null !== before && void 0 !== before) ||
7843+
null !== parent.onclick ||
7844+
(parent.onclick = noop$1)),
78397845
(viewTransitionMutationContext = !0);
78407846
else if (
78417847
4 !== tag &&
@@ -7858,7 +7864,11 @@ function insertOrAppendPlacementNode(node, before, parent) {
78587864
var tag = node.tag;
78597865
if (5 === tag || 6 === tag)
78607866
(node = node.stateNode),
7861-
before ? parent.insertBefore(node, before) : parent.appendChild(node),
7867+
before
7868+
? supportsMoveBefore && null !== node.parentNode
7869+
? parent.moveBefore(node, before)
7870+
: parent.insertBefore(node, before)
7871+
: appendChild(parent, node),
78627872
(viewTransitionMutationContext = !0);
78637873
else if (
78647874
4 !== tag &&
@@ -11309,14 +11319,14 @@ function recursivelyInsertClonesFromExistingTree(parentFiber, hostParentClone) {
1130911319
switch (parentFiber.tag) {
1131011320
case 5:
1131111321
var clone = parentFiber.stateNode.cloneNode(!0);
11312-
hostParentClone.appendChild(clone);
11322+
appendChild(hostParentClone, clone);
1131311323
unhideHostChildren && unhideInstance(clone, parentFiber.memoizedProps);
1131411324
break;
1131511325
case 6:
1131611326
clone = parentFiber.stateNode;
1131711327
if (null === clone) throw Error(formatProdErrorMessage(162));
1131811328
clone = clone.cloneNode(!1);
11319-
hostParentClone.appendChild(clone);
11329+
appendChild(hostParentClone, clone);
1132011330
unhideHostChildren && (clone.nodeValue = parentFiber.memoizedProps);
1132111331
break;
1132211332
case 4:
@@ -11355,7 +11365,7 @@ function recursivelyInsertClones(parentFiber, hostParentClone$jscomp$0) {
1135511365
break;
1135611366
case 5:
1135711367
var clone = finishedWork.stateNode;
11358-
if (null === current) hostParentClone.appendChild(clone);
11368+
if (null === current) appendChild(hostParentClone, clone);
1135911369
else {
1136011370
null === finishedWork.child
1136111371
? ((clone = clone.cloneNode(!0)),
@@ -11375,21 +11385,21 @@ function recursivelyInsertClones(parentFiber, hostParentClone$jscomp$0) {
1137511385
unhideHostChildren
1137611386
? ((unhideHostChildren = !1),
1137711387
recursivelyInsertClones(finishedWork, clone),
11378-
hostParentClone.appendChild(clone),
11388+
appendChild(hostParentClone, clone),
1137911389
(unhideHostChildren = !0),
1138011390
unhideInstance(clone, finishedWork.memoizedProps))
1138111391
: (recursivelyInsertClones(finishedWork, clone),
11382-
hostParentClone.appendChild(clone));
11392+
appendChild(hostParentClone, clone));
1138311393
}
1138411394
break;
1138511395
case 6:
1138611396
clone = finishedWork.stateNode;
1138711397
if (null === clone) throw Error(formatProdErrorMessage(162));
1138811398
null === current
11389-
? hostParentClone.appendChild(clone)
11399+
? appendChild(hostParentClone, clone)
1139011400
: ((clone = clone.cloneNode(!1)),
1139111401
flags & 4 && (clone.nodeValue = current.memoizedProps),
11392-
hostParentClone.appendChild(clone),
11402+
appendChild(hostParentClone, clone),
1139311403
unhideHostChildren &&
1139411404
(clone.nodeValue = finishedWork.memoizedProps));
1139511405
break;
@@ -15176,6 +15186,14 @@ function handleErrorInNextTick(error) {
1517615186
throw error;
1517715187
});
1517815188
}
15189+
var supportsMoveBefore =
15190+
"undefined" !== typeof window &&
15191+
"function" === typeof window.Element.prototype.moveBefore;
15192+
function appendChild(parentInstance, child) {
15193+
supportsMoveBefore && null !== child.parentNode
15194+
? parentInstance.moveBefore(child, null)
15195+
: parentInstance.appendChild(child);
15196+
}
1517915197
function isSingletonScope(type) {
1518015198
return "head" === type;
1518115199
}
@@ -15299,6 +15317,21 @@ function measureInstance(instance) {
1529915317
rect.left <= ownerWindow.innerWidth
1530015318
};
1530115319
}
15320+
function cancelAllViewTransitionAnimations(scope) {
15321+
for (
15322+
var animations = scope.getAnimations({ subtree: !0 }), i = 0;
15323+
i < animations.length;
15324+
i++
15325+
) {
15326+
var anim = animations[i],
15327+
effect = anim.effect,
15328+
pseudo = effect.pseudoElement;
15329+
null != pseudo &&
15330+
pseudo.startsWith("::view-transition") &&
15331+
effect.target === scope &&
15332+
anim.cancel();
15333+
}
15334+
}
1530215335
function startViewTransition(
1530315336
rootContainer,
1530415337
transitionTypes,
@@ -15351,6 +15384,7 @@ function startViewTransition(
1535115384
ownerDocument.__reactViewTransition = transition;
1535215385
transition.ready.then(spawnedWorkCallback, spawnedWorkCallback);
1535315386
transition.finished.then(function () {
15387+
cancelAllViewTransitionAnimations(ownerDocument.documentElement);
1535415388
ownerDocument.__reactViewTransition === transition &&
1535515389
(ownerDocument.__reactViewTransition = null);
1535615390
passiveCallback();
@@ -15463,49 +15497,52 @@ function startGestureTransition(
1546315497
}
1546415498
for (i = 0; i < animations.length; i++) {
1546515499
var anim = animations[i];
15466-
pseudoElement = anim.effect;
15467-
var pseudoElement$253 = pseudoElement.pseudoElement;
15468-
if (
15469-
null != pseudoElement$253 &&
15470-
pseudoElement$253.startsWith("::view-transition")
15471-
) {
15472-
anim.cancel();
15473-
var isGeneratedGroupAnim = !1,
15474-
isExitGroupAnim = !1;
15475-
if (pseudoElement$253.startsWith("::view-transition-group")) {
15476-
var groupName = pseudoElement$253.slice(23);
15477-
foundNews.has(groupName)
15478-
? ((anim = anim.animationName),
15479-
(isGeneratedGroupAnim =
15480-
null != anim &&
15481-
anim.startsWith("-ua-view-transition-group-anim-")))
15482-
: (isExitGroupAnim = !0);
15500+
if ("running" === anim.playState) {
15501+
pseudoElement = anim.effect;
15502+
var pseudoElement$253 = pseudoElement.pseudoElement;
15503+
if (
15504+
null != pseudoElement$253 &&
15505+
pseudoElement$253.startsWith("::view-transition") &&
15506+
pseudoElement.target === documentElement
15507+
) {
15508+
anim.cancel();
15509+
var isGeneratedGroupAnim = !1,
15510+
isExitGroupAnim = !1;
15511+
if (pseudoElement$253.startsWith("::view-transition-group")) {
15512+
var groupName = pseudoElement$253.slice(23);
15513+
foundNews.has(groupName)
15514+
? ((anim = anim.animationName),
15515+
(isGeneratedGroupAnim =
15516+
null != anim &&
15517+
anim.startsWith("-ua-view-transition-group-anim-")))
15518+
: (isExitGroupAnim = !0);
15519+
}
15520+
animateGesture(
15521+
pseudoElement.getKeyframes(),
15522+
pseudoElement.target,
15523+
pseudoElement$253,
15524+
timeline,
15525+
rangeStart,
15526+
rangeEnd,
15527+
isGeneratedGroupAnim,
15528+
isExitGroupAnim
15529+
);
15530+
pseudoElement$253.startsWith("::view-transition-old") &&
15531+
((pseudoElement$253 = pseudoElement$253.slice(21)),
15532+
foundGroups.has(pseudoElement$253) ||
15533+
foundNews.has(pseudoElement$253) ||
15534+
(foundGroups.add(pseudoElement$253),
15535+
animateGesture(
15536+
[{}, {}],
15537+
pseudoElement.target,
15538+
"::view-transition-group" + pseudoElement$253,
15539+
timeline,
15540+
rangeStart,
15541+
rangeEnd,
15542+
!1,
15543+
!0
15544+
)));
1548315545
}
15484-
animateGesture(
15485-
pseudoElement.getKeyframes(),
15486-
pseudoElement.target,
15487-
pseudoElement$253,
15488-
timeline,
15489-
rangeStart,
15490-
rangeEnd,
15491-
isGeneratedGroupAnim,
15492-
isExitGroupAnim
15493-
);
15494-
pseudoElement$253.startsWith("::view-transition-old") &&
15495-
((pseudoElement$253 = pseudoElement$253.slice(21)),
15496-
foundGroups.has(pseudoElement$253) ||
15497-
foundNews.has(pseudoElement$253) ||
15498-
(foundGroups.add(pseudoElement$253),
15499-
animateGesture(
15500-
[{}, {}],
15501-
pseudoElement.target,
15502-
"::view-transition-group" + pseudoElement$253,
15503-
timeline,
15504-
rangeStart,
15505-
rangeEnd,
15506-
!1,
15507-
!0
15508-
)));
1550915546
}
1551015547
}
1551115548
documentElement
@@ -15524,20 +15561,7 @@ function startGestureTransition(
1552415561
: readyCallback;
1552515562
transition.ready.then(readyForAnimations, readyCallback);
1552615563
transition.finished.then(function () {
15527-
for (
15528-
var animations = ownerDocument.documentElement.getAnimations({
15529-
subtree: !0
15530-
}),
15531-
i = 0;
15532-
i < animations.length;
15533-
i++
15534-
) {
15535-
var anim = animations[i],
15536-
pseudo = anim.effect.pseudoElement;
15537-
null != pseudo &&
15538-
pseudo.startsWith("::view-transition") &&
15539-
anim.cancel();
15540-
}
15564+
cancelAllViewTransitionAnimations(ownerDocument.documentElement);
1554115565
ownerDocument.__reactViewTransition === transition &&
1554215566
(ownerDocument.__reactViewTransition = null);
1554315567
});
@@ -17301,14 +17325,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1730117325
};
1730217326
var isomorphicReactPackageVersion$jscomp$inline_1909 = React.version;
1730317327
if (
17304-
"19.1.0-experimental-029e8bd6-20250306" !==
17328+
"19.1.0-experimental-0ca3deeb-20250311" !==
1730517329
isomorphicReactPackageVersion$jscomp$inline_1909
1730617330
)
1730717331
throw Error(
1730817332
formatProdErrorMessage(
1730917333
527,
1731017334
isomorphicReactPackageVersion$jscomp$inline_1909,
17311-
"19.1.0-experimental-029e8bd6-20250306"
17335+
"19.1.0-experimental-0ca3deeb-20250311"
1731217336
)
1731317337
);
1731417338
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17328,24 +17352,24 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1732817352
null === componentOrElement ? null : componentOrElement.stateNode;
1732917353
return componentOrElement;
1733017354
};
17331-
var internals$jscomp$inline_2526 = {
17355+
var internals$jscomp$inline_2501 = {
1733217356
bundleType: 0,
17333-
version: "19.1.0-experimental-029e8bd6-20250306",
17357+
version: "19.1.0-experimental-0ca3deeb-20250311",
1733417358
rendererPackageName: "react-dom",
1733517359
currentDispatcherRef: ReactSharedInternals,
17336-
reconcilerVersion: "19.1.0-experimental-029e8bd6-20250306"
17360+
reconcilerVersion: "19.1.0-experimental-0ca3deeb-20250311"
1733717361
};
1733817362
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
17339-
var hook$jscomp$inline_2527 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
17363+
var hook$jscomp$inline_2502 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
1734017364
if (
17341-
!hook$jscomp$inline_2527.isDisabled &&
17342-
hook$jscomp$inline_2527.supportsFiber
17365+
!hook$jscomp$inline_2502.isDisabled &&
17366+
hook$jscomp$inline_2502.supportsFiber
1734317367
)
1734417368
try {
17345-
(rendererID = hook$jscomp$inline_2527.inject(
17346-
internals$jscomp$inline_2526
17369+
(rendererID = hook$jscomp$inline_2502.inject(
17370+
internals$jscomp$inline_2501
1734717371
)),
17348-
(injectedHook = hook$jscomp$inline_2527);
17372+
(injectedHook = hook$jscomp$inline_2502);
1734917373
} catch (err) {}
1735017374
}
1735117375
exports.createRoot = function (container, options) {
@@ -17437,4 +17461,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1743717461
listenToAllSupportedEvents(container);
1743817462
return new ReactDOMHydrationRoot(initialChildren);
1743917463
};
17440-
exports.version = "19.1.0-experimental-029e8bd6-20250306";
17464+
exports.version = "19.1.0-experimental-0ca3deeb-20250311";

0 commit comments

Comments
 (0)