react-dom 19.3.0-canary-4fdf7cf2-20251003 → 19.3.0-canary-a4eb2dfa-20251006

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -76,6 +76,8 @@ function describeElementType(type) {
76
76
  return "Suspense";
77
77
  case REACT_SUSPENSE_LIST_TYPE:
78
78
  return "SuspenseList";
79
+ case REACT_VIEW_TRANSITION_TYPE:
80
+ return "ViewTransition";
79
81
  }
80
82
  if ("object" === typeof type)
81
83
  switch (type.$$typeof) {
@@ -1383,6 +1385,8 @@ var NothingSent = 0,
1383
1385
  SentStyleInsertionFunction = 8,
1384
1386
  SentCompletedShellId = 32,
1385
1387
  SentMarkShellTime = 64,
1388
+ NeedUpgradeToViewTransitions = 128,
1389
+ SentUpgradeToViewTransitions = 256,
1386
1390
  EXISTS = null,
1387
1391
  PRELOAD_NO_CREDS = [];
1388
1392
  Object.freeze(PRELOAD_NO_CREDS);
@@ -1714,7 +1718,8 @@ function getChildFormatContext(parentContext, type, props) {
1714
1718
  return parentContext.insertionMode >= HTML_TABLE_MODE ||
1715
1719
  parentContext.insertionMode < HTML_MODE
1716
1720
  ? createFormatContext(HTML_MODE, null, subtreeScope, null)
1717
- : parentContext.tagScope !== subtreeScope
1721
+ : null !== parentContext.viewTransition ||
1722
+ parentContext.tagScope !== subtreeScope
1718
1723
  ? createFormatContext(
1719
1724
  parentContext.insertionMode,
1720
1725
  parentContext.selectedValue,
@@ -1737,7 +1742,8 @@ function getSuspenseViewTransition(parentViewTransition) {
1737
1742
  };
1738
1743
  }
1739
1744
  function getSuspenseFallbackFormatContext(resumableState, parentContext) {
1740
- parentContext.tagScope & 32 && (resumableState.instructions |= 128);
1745
+ parentContext.tagScope & 32 &&
1746
+ (resumableState.instructions |= NeedUpgradeToViewTransitions);
1741
1747
  return createFormatContext(
1742
1748
  parentContext.insertionMode,
1743
1749
  parentContext.selectedValue,
@@ -1758,6 +1764,11 @@ function getSuspenseContentFormatContext(resumableState, parentContext) {
1758
1764
  resumableState
1759
1765
  );
1760
1766
  }
1767
+ function makeId(resumableState, treeId, localId) {
1768
+ resumableState = "_" + resumableState.idPrefix + "R_" + treeId;
1769
+ 0 < localId && (resumableState += "H" + localId.toString(32));
1770
+ return resumableState + "_";
1771
+ }
1761
1772
  function pushTextInstance(target, text, renderState, textEmbedded) {
1762
1773
  if ("" === text) return textEmbedded;
1763
1774
  textEmbedded && target.push("\x3c!-- --\x3e");
@@ -1767,6 +1778,26 @@ function pushTextInstance(target, text, renderState, textEmbedded) {
1767
1778
  function pushSegmentFinale(target, renderState, lastPushedText, textEmbedded) {
1768
1779
  lastPushedText && textEmbedded && target.push("\x3c!-- --\x3e");
1769
1780
  }
1781
+ function pushViewTransitionAttributes(target, formatContext) {
1782
+ formatContext = formatContext.viewTransition;
1783
+ null !== formatContext &&
1784
+ ("auto" !== formatContext.name &&
1785
+ (pushStringAttribute(
1786
+ target,
1787
+ "vt-name",
1788
+ 0 === formatContext.nameIdx
1789
+ ? formatContext.name
1790
+ : formatContext.name + "_" + formatContext.nameIdx
1791
+ ),
1792
+ formatContext.nameIdx++),
1793
+ pushStringAttribute(target, "vt-update", formatContext.update),
1794
+ "none" !== formatContext.enter &&
1795
+ pushStringAttribute(target, "vt-enter", formatContext.enter),
1796
+ "none" !== formatContext.exit &&
1797
+ pushStringAttribute(target, "vt-exit", formatContext.exit),
1798
+ "none" !== formatContext.share &&
1799
+ pushStringAttribute(target, "vt-share", formatContext.share));
1800
+ }
1770
1801
  var styleNameCache = new Map(),
1771
1802
  styleAttributeStart = ' style="',
1772
1803
  styleAssign = ":",
@@ -2329,7 +2360,7 @@ var styleRegex = /(<\/|<)(s)(tyle)/gi;
2329
2360
  function styleReplacer(match, prefix, s, suffix) {
2330
2361
  return "" + prefix + ("s" === s ? "\\73 " : "\\53 ") + suffix;
2331
2362
  }
2332
- function pushSelfClosing(target, props, tag) {
2363
+ function pushSelfClosing(target, props, tag, formatContext) {
2333
2364
  target.push(startChunkForTag(tag));
2334
2365
  for (var propKey in props)
2335
2366
  if (hasOwnProperty.call(props, propKey)) {
@@ -2346,6 +2377,7 @@ function pushSelfClosing(target, props, tag) {
2346
2377
  pushAttribute(target, propKey, propValue);
2347
2378
  }
2348
2379
  }
2380
+ pushViewTransitionAttributes(target, formatContext);
2349
2381
  target.push(endOfStartTagSelfClosing);
2350
2382
  return null;
2351
2383
  }
@@ -2423,7 +2455,7 @@ function pushScriptImpl(target, props) {
2423
2455
  target.push(endChunkForTag("script"));
2424
2456
  return null;
2425
2457
  }
2426
- function pushStartSingletonElement(target, props, tag) {
2458
+ function pushStartSingletonElement(target, props, tag, formatContext) {
2427
2459
  target.push(startChunkForTag(tag));
2428
2460
  var innerHTML = (tag = null),
2429
2461
  propKey;
@@ -2442,11 +2474,12 @@ function pushStartSingletonElement(target, props, tag) {
2442
2474
  pushAttribute(target, propKey, propValue);
2443
2475
  }
2444
2476
  }
2477
+ pushViewTransitionAttributes(target, formatContext);
2445
2478
  target.push(endOfStartTag);
2446
2479
  pushInnerHTML(target, innerHTML, tag);
2447
2480
  return tag;
2448
2481
  }
2449
- function pushStartGenericElement(target, props, tag) {
2482
+ function pushStartGenericElement(target, props, tag, formatContext) {
2450
2483
  target.push(startChunkForTag(tag));
2451
2484
  var innerHTML = (tag = null),
2452
2485
  propKey;
@@ -2465,6 +2498,7 @@ function pushStartGenericElement(target, props, tag) {
2465
2498
  pushAttribute(target, propKey, propValue);
2466
2499
  }
2467
2500
  }
2501
+ pushViewTransitionAttributes(target, formatContext);
2468
2502
  target.push(endOfStartTag);
2469
2503
  pushInnerHTML(target, innerHTML, tag);
2470
2504
  return "string" === typeof tag
@@ -2572,6 +2606,7 @@ function pushStartInstance(
2572
2606
  pushAttribute(target$jscomp$0, propKey, propValue);
2573
2607
  }
2574
2608
  }
2609
+ pushViewTransitionAttributes(target$jscomp$0, formatContext);
2575
2610
  target$jscomp$0.push(endOfStartTag);
2576
2611
  pushInnerHTML(target$jscomp$0, innerHTML, children);
2577
2612
  if ("string" === typeof children) {
@@ -2620,6 +2655,7 @@ function pushStartInstance(
2620
2655
  );
2621
2656
  }
2622
2657
  }
2658
+ pushViewTransitionAttributes(target$jscomp$0, formatContext);
2623
2659
  target$jscomp$0.push(endOfStartTag);
2624
2660
  pushInnerHTML(target$jscomp$0, innerHTML$jscomp$0, children$jscomp$0);
2625
2661
  return children$jscomp$0;
@@ -2733,6 +2769,7 @@ function pushStartInstance(
2733
2769
  null === value$jscomp$0 &&
2734
2770
  null !== defaultValue &&
2735
2771
  (value$jscomp$0 = defaultValue);
2772
+ pushViewTransitionAttributes(target$jscomp$0, formatContext);
2736
2773
  target$jscomp$0.push(endOfStartTag);
2737
2774
  if (null != children$jscomp$2) {
2738
2775
  console.error(
@@ -2860,6 +2897,7 @@ function pushStartInstance(
2860
2897
  ? pushAttribute(target$jscomp$0, "value", value$jscomp$1)
2861
2898
  : null !== defaultValue$jscomp$0 &&
2862
2899
  pushAttribute(target$jscomp$0, "value", defaultValue$jscomp$0);
2900
+ pushViewTransitionAttributes(target$jscomp$0, formatContext);
2863
2901
  target$jscomp$0.push(endOfStartTagSelfClosing);
2864
2902
  null != formData &&
2865
2903
  formData.forEach(pushAdditionalFormField, target$jscomp$0);
@@ -2926,6 +2964,7 @@ function pushStartInstance(
2926
2964
  formTarget$jscomp$0,
2927
2965
  name$jscomp$0
2928
2966
  );
2967
+ pushViewTransitionAttributes(target$jscomp$0, formatContext);
2929
2968
  target$jscomp$0.push(endOfStartTag);
2930
2969
  null != formData$jscomp$0 &&
2931
2970
  formData$jscomp$0.forEach(pushAdditionalFormField, target$jscomp$0);
@@ -3023,6 +3062,7 @@ function pushStartInstance(
3023
3062
  pushAttribute(target$jscomp$0, "method", formMethod$jscomp$1);
3024
3063
  null != formTarget$jscomp$1 &&
3025
3064
  pushAttribute(target$jscomp$0, "target", formTarget$jscomp$1);
3065
+ pushViewTransitionAttributes(target$jscomp$0, formatContext);
3026
3066
  target$jscomp$0.push(endOfStartTag);
3027
3067
  null !== formActionName &&
3028
3068
  (target$jscomp$0.push('<input type="hidden"'),
@@ -3056,6 +3096,7 @@ function pushStartInstance(
3056
3096
  );
3057
3097
  }
3058
3098
  }
3099
+ pushViewTransitionAttributes(target$jscomp$0, formatContext);
3059
3100
  target$jscomp$0.push(endOfStartTag);
3060
3101
  return null;
3061
3102
  case "object":
@@ -3101,6 +3142,7 @@ function pushStartInstance(
3101
3142
  );
3102
3143
  }
3103
3144
  }
3145
+ pushViewTransitionAttributes(target$jscomp$0, formatContext);
3104
3146
  target$jscomp$0.push(endOfStartTag);
3105
3147
  pushInnerHTML(target$jscomp$0, innerHTML$jscomp$4, children$jscomp$5);
3106
3148
  if ("string" === typeof children$jscomp$5) {
@@ -3471,17 +3513,33 @@ function pushStartInstance(
3471
3513
  var JSCompiler_inline_result$jscomp$8 = pushSelfClosing(
3472
3514
  target$jscomp$0,
3473
3515
  props,
3474
- "meta"
3516
+ "meta",
3517
+ formatContext
3475
3518
  );
3476
3519
  else
3477
3520
  textEmbedded && target$jscomp$0.push("\x3c!-- --\x3e"),
3478
3521
  (JSCompiler_inline_result$jscomp$8 = isFallback$jscomp$1
3479
3522
  ? null
3480
3523
  : "string" === typeof props.charSet
3481
- ? pushSelfClosing(renderState.charsetChunks, props, "meta")
3524
+ ? pushSelfClosing(
3525
+ renderState.charsetChunks,
3526
+ props,
3527
+ "meta",
3528
+ formatContext
3529
+ )
3482
3530
  : "viewport" === props.name
3483
- ? pushSelfClosing(renderState.viewportChunks, props, "meta")
3484
- : pushSelfClosing(renderState.hoistableChunks, props, "meta"));
3531
+ ? pushSelfClosing(
3532
+ renderState.viewportChunks,
3533
+ props,
3534
+ "meta",
3535
+ formatContext
3536
+ )
3537
+ : pushSelfClosing(
3538
+ renderState.hoistableChunks,
3539
+ props,
3540
+ "meta",
3541
+ formatContext
3542
+ ));
3485
3543
  return JSCompiler_inline_result$jscomp$8;
3486
3544
  case "listing":
3487
3545
  case "pre":
@@ -3508,6 +3566,7 @@ function pushStartInstance(
3508
3566
  );
3509
3567
  }
3510
3568
  }
3569
+ pushViewTransitionAttributes(target$jscomp$0, formatContext);
3511
3570
  target$jscomp$0.push(endOfStartTag);
3512
3571
  if (null != innerHTML$jscomp$7) {
3513
3572
  if (null != children$jscomp$10)
@@ -3624,7 +3683,7 @@ function pushStartInstance(
3624
3683
  promotablePreloads.set(key$jscomp$0, resource$jscomp$1)));
3625
3684
  }
3626
3685
  }
3627
- return pushSelfClosing(target$jscomp$0, props, "img");
3686
+ return pushSelfClosing(target$jscomp$0, props, "img", formatContext);
3628
3687
  case "base":
3629
3688
  case "area":
3630
3689
  case "br":
@@ -3636,7 +3695,7 @@ function pushStartInstance(
3636
3695
  case "source":
3637
3696
  case "track":
3638
3697
  case "wbr":
3639
- return pushSelfClosing(target$jscomp$0, props, type);
3698
+ return pushSelfClosing(target$jscomp$0, props, type, formatContext);
3640
3699
  case "annotation-xml":
3641
3700
  case "color-profile":
3642
3701
  case "font-face":
@@ -3656,13 +3715,15 @@ function pushStartInstance(
3656
3715
  var JSCompiler_inline_result$jscomp$9 = pushStartSingletonElement(
3657
3716
  preamble.headChunks,
3658
3717
  props,
3659
- "head"
3718
+ "head",
3719
+ formatContext
3660
3720
  );
3661
3721
  } else
3662
3722
  JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
3663
3723
  target$jscomp$0,
3664
3724
  props,
3665
- "head"
3725
+ "head",
3726
+ formatContext
3666
3727
  );
3667
3728
  return JSCompiler_inline_result$jscomp$9;
3668
3729
  case "body":
@@ -3675,13 +3736,15 @@ function pushStartInstance(
3675
3736
  var JSCompiler_inline_result$jscomp$10 = pushStartSingletonElement(
3676
3737
  preamble$jscomp$0.bodyChunks,
3677
3738
  props,
3678
- "body"
3739
+ "body",
3740
+ formatContext
3679
3741
  );
3680
3742
  } else
3681
3743
  JSCompiler_inline_result$jscomp$10 = pushStartGenericElement(
3682
3744
  target$jscomp$0,
3683
3745
  props,
3684
- "body"
3746
+ "body",
3747
+ formatContext
3685
3748
  );
3686
3749
  return JSCompiler_inline_result$jscomp$10;
3687
3750
  case "html":
@@ -3694,13 +3757,15 @@ function pushStartInstance(
3694
3757
  var JSCompiler_inline_result$jscomp$11 = pushStartSingletonElement(
3695
3758
  preamble$jscomp$1.htmlChunks,
3696
3759
  props,
3697
- "html"
3760
+ "html",
3761
+ formatContext
3698
3762
  );
3699
3763
  } else
3700
3764
  JSCompiler_inline_result$jscomp$11 = pushStartGenericElement(
3701
3765
  target$jscomp$0,
3702
3766
  props,
3703
- "html"
3767
+ "html",
3768
+ formatContext
3704
3769
  );
3705
3770
  return JSCompiler_inline_result$jscomp$11;
3706
3771
  default:
@@ -3750,12 +3815,13 @@ function pushStartInstance(
3750
3815
  }
3751
3816
  }
3752
3817
  }
3818
+ pushViewTransitionAttributes(target$jscomp$0, formatContext);
3753
3819
  target$jscomp$0.push(endOfStartTag);
3754
3820
  pushInnerHTML(target$jscomp$0, innerHTML$jscomp$8, children$jscomp$11);
3755
3821
  return children$jscomp$11;
3756
3822
  }
3757
3823
  }
3758
- return pushStartGenericElement(target$jscomp$0, props, type);
3824
+ return pushStartGenericElement(target$jscomp$0, props, type, formatContext);
3759
3825
  }
3760
3826
  var endTagCache = new Map();
3761
3827
  function endChunkForTag(tag) {
@@ -3918,6 +3984,8 @@ var completeSegmentScript1Full =
3918
3984
  completeSegmentScriptEnd = '")\x3c/script>',
3919
3985
  completeBoundaryScriptFunctionOnly =
3920
3986
  '$RB=[];$RV=function(a){$RT=performance.now();for(var b=0;b<a.length;b+=2){var c=a[b],e=a[b+1];null!==e.parentNode&&e.parentNode.removeChild(e);var f=c.parentNode;if(f){var g=c.previousSibling,h=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d||"/&"===d)if(0===h)break;else h--;else"$"!==d&&"$?"!==d&&"$~"!==d&&"$!"!==d&&"&"!==d||h++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;e.firstChild;)f.insertBefore(e.firstChild,c);g.data="$";g._reactRetry&&requestAnimationFrame(g._reactRetry)}}a.length=0};\n$RC=function(a,b){if(b=document.getElementById(b))(a=document.getElementById(a))?(a.previousSibling.data="$~",$RB.push(a,b),2===$RB.length&&("number"!==typeof $RT?requestAnimationFrame($RV.bind(null,$RB)):(a=performance.now(),setTimeout($RV.bind(null,$RB),2300>a&&2E3<a?2300-a:$RT+300-a)))):b.parentNode.removeChild(b)};',
3987
+ completeBoundaryUpgradeToViewTransitionsInstruction =
3988
+ '$RV=function(A,g){function k(a,b){var e=a.getAttribute(b);e&&(b=a.style,l.push(a,b.viewTransitionName,b.viewTransitionClass),"auto"!==e&&(b.viewTransitionClass=e),(a=a.getAttribute("vt-name"))||(a="_T_"+K++ +"_"),b.viewTransitionName=a,B=!0)}var B=!1,K=0,l=[];try{var f=document.__reactViewTransition;if(f){f.finished.finally($RV.bind(null,g));return}var m=new Map;for(f=1;f<g.length;f+=2)for(var h=g[f].querySelectorAll("[vt-share]"),d=0;d<h.length;d++){var c=h[d];m.set(c.getAttribute("vt-name"),c)}var u=[];for(h=0;h<g.length;h+=2){var C=g[h],x=C.parentNode;if(x){var v=x.getBoundingClientRect();if(v.left||v.top||v.width||v.height){c=C;for(f=0;c;){if(8===c.nodeType){var r=c.data;if("/$"===r)if(0===f)break;else f--;else"$"!==r&&"$?"!==r&&"$~"!==r&&"$!"!==r||f++}else if(1===c.nodeType){d=c;var D=d.getAttribute("vt-name"),y=m.get(D);k(d,y?"vt-share":"vt-exit");y&&(k(y,"vt-share"),m.set(D,null));var E=d.querySelectorAll("[vt-share]");for(d=0;d<E.length;d++){var F=E[d],G=F.getAttribute("vt-name"),\nH=m.get(G);H&&(k(F,"vt-share"),k(H,"vt-share"),m.set(G,null))}}c=c.nextSibling}for(var I=g[h+1],t=I.firstElementChild;t;)null!==m.get(t.getAttribute("vt-name"))&&k(t,"vt-enter"),t=t.nextElementSibling;c=x;do for(var n=c.firstElementChild;n;){var J=n.getAttribute("vt-update");J&&"none"!==J&&!l.includes(n)&&k(n,"vt-update");n=n.nextElementSibling}while((c=c.parentNode)&&1===c.nodeType&&"none"!==c.getAttribute("vt-update"));u.push.apply(u,I.querySelectorAll(\'img[src]:not([loading="lazy"])\'))}}}if(B){var z=\ndocument.__reactViewTransition=document.startViewTransition({update:function(){A(g);for(var a=[document.documentElement.clientHeight,document.fonts.ready],b={},e=0;e<u.length;b={g:b.g},e++)if(b.g=u[e],!b.g.complete){var p=b.g.getBoundingClientRect();0<p.bottom&&0<p.right&&p.top<window.innerHeight&&p.left<window.innerWidth&&(p=new Promise(function(w){return function(q){w.g.addEventListener("load",q);w.g.addEventListener("error",q)}}(b)),a.push(p))}return Promise.race([Promise.all(a),new Promise(function(w){var q=\nperformance.now();setTimeout(w,2300>q&&2E3<q?2300-q:500)})])},types:[]});z.ready.finally(function(){for(var a=l.length-3;0<=a;a-=3){var b=l[a],e=b.style;e.viewTransitionName=l[a+1];e.viewTransitionClass=l[a+1];""===b.getAttribute("style")&&b.removeAttribute("style")}});z.finished.finally(function(){document.__reactViewTransition===z&&(document.__reactViewTransition=null)});$RB=[];return}}catch(a){}A(g)}.bind(null,$RV);',
3921
3989
  completeBoundaryScript1Partial = '$RC("',
3922
3990
  completeBoundaryWithStylesScript1FullPartial =
3923
3991
  '$RM=new Map;$RR=function(n,w,p){function u(q){this._p=null;q()}for(var r=new Map,t=document,h,b,e=t.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=e[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&$RM.set(b.getAttribute("href"),b),r.set(b.dataset.precedence,h=b));e=0;b=[];var l,a;for(k=!0;;){if(k){var f=p[e++];if(!f){k=!1;e=0;continue}var c=!1,m=0;var d=f[m++];if(a=$RM.get(d)){var g=a._p;c=!0}else{a=t.createElement("link");a.href=d;a.rel=\n"stylesheet";for(a.dataset.precedence=l=f[m++];g=f[m++];)a.setAttribute(g,f[m++]);g=a._p=new Promise(function(q,x){a.onload=u.bind(a,q);a.onerror=u.bind(a,x)});$RM.set(d,a)}d=a.getAttribute("media");!g||d&&!matchMedia(d).matches||b.push(g);if(c)continue}else{a=v[e++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=r.get(l)||h;c===h&&(h=a);r.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=t.head,c.insertBefore(a,c.firstChild))}if(p=document.getElementById(n))p.previousSibling.data=\n"$~";Promise.all(b).then($RC.bind(null,n,w),$RX.bind(null,n,"CSS failed to load"))};$RR("',
@@ -4680,6 +4748,8 @@ function getComponentNameFromType(type) {
4680
4748
  return "SuspenseList";
4681
4749
  case REACT_ACTIVITY_TYPE:
4682
4750
  return "Activity";
4751
+ case REACT_VIEW_TRANSITION_TYPE:
4752
+ return "ViewTransition";
4683
4753
  }
4684
4754
  if ("object" === typeof type)
4685
4755
  switch (
@@ -4861,6 +4931,11 @@ var classComponentUpdater = {
4861
4931
  }
4862
4932
  },
4863
4933
  emptyTreeContext = { id: 1, overflow: "" };
4934
+ function getTreeId(context) {
4935
+ var overflow = context.overflow;
4936
+ context = context.id;
4937
+ return (context & ~(1 << (32 - clz32(context) - 1))).toString(32) + overflow;
4938
+ }
4864
4939
  function pushTreeContext(baseContext, totalChildren, index) {
4865
4940
  var baseIdWithLeadingBit = baseContext.id;
4866
4941
  baseContext = baseContext.overflow;
@@ -5265,20 +5340,14 @@ var HooksDispatcher = {
5265
5340
  return [!1, unsupportedStartTransition];
5266
5341
  },
5267
5342
  useId: function () {
5268
- var treeId = currentlyRenderingTask.treeContext;
5269
- var overflow = treeId.overflow;
5270
- treeId = treeId.id;
5271
- treeId =
5272
- (treeId & ~(1 << (32 - clz32(treeId) - 1))).toString(32) + overflow;
5273
- var resumableState = currentResumableState;
5343
+ var treeId = getTreeId(currentlyRenderingTask.treeContext),
5344
+ resumableState = currentResumableState;
5274
5345
  if (null === resumableState)
5275
5346
  throw Error(
5276
5347
  "Invalid hook call. Hooks can only be called inside of the body of a function component."
5277
5348
  );
5278
- overflow = localIdCounter++;
5279
- treeId = "_" + resumableState.idPrefix + "R_" + treeId;
5280
- 0 < overflow && (treeId += "H" + overflow.toString(32));
5281
- return treeId + "_";
5349
+ var localId = localIdCounter++;
5350
+ return makeId(resumableState, treeId, localId);
5282
5351
  },
5283
5352
  useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
5284
5353
  if (void 0 === getServerSnapshot)
@@ -5616,6 +5685,8 @@ function describeComponentStackByType(type) {
5616
5685
  return describeBuiltInComponentFrame("SuspenseList");
5617
5686
  case REACT_SUSPENSE_TYPE:
5618
5687
  return describeBuiltInComponentFrame("Suspense");
5688
+ case REACT_VIEW_TRANSITION_TYPE:
5689
+ return describeBuiltInComponentFrame("ViewTransition");
5619
5690
  }
5620
5691
  return "";
5621
5692
  }
@@ -5638,8 +5709,25 @@ var callComponent = {
5638
5709
  return init(lazy._payload);
5639
5710
  }
5640
5711
  },
5641
- callLazyInitInDEV = callLazyInit.react_stack_bottom_frame.bind(callLazyInit),
5642
- lastResetTime = 0,
5712
+ callLazyInitInDEV = callLazyInit.react_stack_bottom_frame.bind(callLazyInit);
5713
+ function getViewTransitionClassName(defaultClass, eventClass) {
5714
+ defaultClass =
5715
+ null == defaultClass || "string" === typeof defaultClass
5716
+ ? defaultClass
5717
+ : defaultClass.default;
5718
+ eventClass =
5719
+ null == eventClass || "string" === typeof eventClass
5720
+ ? eventClass
5721
+ : eventClass.default;
5722
+ return null == eventClass
5723
+ ? "auto" === defaultClass
5724
+ ? null
5725
+ : defaultClass
5726
+ : "auto" === eventClass
5727
+ ? null
5728
+ : eventClass;
5729
+ }
5730
+ var lastResetTime = 0,
5643
5731
  getCurrentTime;
5644
5732
  if ("object" === typeof performance && "function" === typeof performance.now) {
5645
5733
  var localPerformance = performance;
@@ -7019,6 +7107,76 @@ function renderElement(request, task, keyPath, type, props, ref) {
7019
7107
  }
7020
7108
  return;
7021
7109
  case REACT_VIEW_TRANSITION_TYPE:
7110
+ var prevContext$jscomp$0 = task.formatContext,
7111
+ prevKeyPath$jscomp$4 = task.keyPath;
7112
+ var resumableState$jscomp$0 = request.resumableState;
7113
+ if (null != props.name && "auto" !== props.name)
7114
+ var autoName = props.name;
7115
+ else {
7116
+ var treeId = getTreeId(task.treeContext);
7117
+ autoName = makeId(resumableState$jscomp$0, treeId, 0);
7118
+ }
7119
+ var resumableState$jscomp$1 = request.resumableState,
7120
+ update = getViewTransitionClassName(props.default, props.update),
7121
+ enter = getViewTransitionClassName(props.default, props.enter),
7122
+ exit = getViewTransitionClassName(props.default, props.exit),
7123
+ share = getViewTransitionClassName(props.default, props.share),
7124
+ name$jscomp$0 = props.name,
7125
+ autoName$jscomp$0 = autoName;
7126
+ null == update && (update = "auto");
7127
+ null == enter && (enter = "auto");
7128
+ null == exit && (exit = "auto");
7129
+ if (null == name$jscomp$0) {
7130
+ var parentViewTransition = prevContext$jscomp$0.viewTransition;
7131
+ null !== parentViewTransition
7132
+ ? ((name$jscomp$0 = parentViewTransition.name),
7133
+ (share = parentViewTransition.share))
7134
+ : ((name$jscomp$0 = "auto"), (share = "none"));
7135
+ } else
7136
+ null == share && (share = "auto"),
7137
+ prevContext$jscomp$0.tagScope & 4 &&
7138
+ (resumableState$jscomp$1.instructions |=
7139
+ NeedUpgradeToViewTransitions);
7140
+ prevContext$jscomp$0.tagScope & 8
7141
+ ? (resumableState$jscomp$1.instructions |=
7142
+ NeedUpgradeToViewTransitions)
7143
+ : (exit = "none");
7144
+ prevContext$jscomp$0.tagScope & 16
7145
+ ? (resumableState$jscomp$1.instructions |=
7146
+ NeedUpgradeToViewTransitions)
7147
+ : (enter = "none");
7148
+ var viewTransition = {
7149
+ update: update,
7150
+ enter: enter,
7151
+ exit: exit,
7152
+ share: share,
7153
+ name: name$jscomp$0,
7154
+ autoName: autoName$jscomp$0,
7155
+ nameIdx: 0
7156
+ },
7157
+ subtreeScope = prevContext$jscomp$0.tagScope & -25;
7158
+ subtreeScope =
7159
+ "none" !== update ? subtreeScope | 32 : subtreeScope & -33;
7160
+ "none" !== enter && (subtreeScope |= 64);
7161
+ var JSCompiler_inline_result$jscomp$0 = createFormatContext(
7162
+ prevContext$jscomp$0.insertionMode,
7163
+ prevContext$jscomp$0.selectedValue,
7164
+ subtreeScope,
7165
+ viewTransition
7166
+ );
7167
+ task.formatContext = JSCompiler_inline_result$jscomp$0;
7168
+ task.keyPath = keyPath;
7169
+ if (null != props.name && "auto" !== props.name)
7170
+ renderNodeDestructive(request, task, props.children, -1);
7171
+ else {
7172
+ var prevTreeContext = task.treeContext;
7173
+ task.treeContext = pushTreeContext(prevTreeContext, 1, 0);
7174
+ renderNode(request, task, props.children, -1);
7175
+ task.treeContext = prevTreeContext;
7176
+ }
7177
+ task.formatContext = prevContext$jscomp$0;
7178
+ task.keyPath = prevKeyPath$jscomp$4;
7179
+ return;
7022
7180
  case REACT_SCOPE_TYPE:
7023
7181
  throw Error("ReactDOMServer does not yet support scope components.");
7024
7182
  case REACT_SUSPENSE_TYPE:
@@ -7041,8 +7199,8 @@ function renderElement(request, task, keyPath, type, props, ref) {
7041
7199
  (task.row = _prevRow);
7042
7200
  }
7043
7201
  } else {
7044
- var prevKeyPath$jscomp$4 = task.keyPath,
7045
- prevContext$jscomp$0 = task.formatContext,
7202
+ var prevKeyPath$jscomp$5 = task.keyPath,
7203
+ prevContext$jscomp$1 = task.formatContext,
7046
7204
  prevRow$jscomp$0 = task.row,
7047
7205
  parentBoundary = task.blockedBoundary,
7048
7206
  parentPreamble = task.blockedPreamble,
@@ -7107,7 +7265,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
7107
7265
  task.keyPath = fallbackKeyPath;
7108
7266
  task.formatContext = getSuspenseFallbackFormatContext(
7109
7267
  request.resumableState,
7110
- prevContext$jscomp$0
7268
+ prevContext$jscomp$1
7111
7269
  );
7112
7270
  task.componentStack =
7113
7271
  replaceSuspenseComponentStackWithSuspenseFallbackStack(
@@ -7133,8 +7291,8 @@ function renderElement(request, task, keyPath, type, props, ref) {
7133
7291
  } finally {
7134
7292
  (task.blockedSegment = parentSegment),
7135
7293
  (task.blockedPreamble = parentPreamble),
7136
- (task.keyPath = prevKeyPath$jscomp$4),
7137
- (task.formatContext = prevContext$jscomp$0);
7294
+ (task.keyPath = prevKeyPath$jscomp$5),
7295
+ (task.formatContext = prevContext$jscomp$1);
7138
7296
  }
7139
7297
  var suspendedPrimaryTask = createRenderTask(
7140
7298
  request,
@@ -7168,7 +7326,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
7168
7326
  task.keyPath = keyPath;
7169
7327
  task.formatContext = getSuspenseContentFormatContext(
7170
7328
  request.resumableState,
7171
- prevContext$jscomp$0
7329
+ prevContext$jscomp$1
7172
7330
  );
7173
7331
  task.row = null;
7174
7332
  contentRootSegment.status = 6;
@@ -7230,8 +7388,8 @@ function renderElement(request, task, keyPath, type, props, ref) {
7230
7388
  (task.blockedPreamble = parentPreamble),
7231
7389
  (task.hoistableState = parentHoistableState),
7232
7390
  (task.blockedSegment = parentSegment),
7233
- (task.keyPath = prevKeyPath$jscomp$4),
7234
- (task.formatContext = prevContext$jscomp$0),
7391
+ (task.keyPath = prevKeyPath$jscomp$5),
7392
+ (task.formatContext = prevContext$jscomp$1),
7235
7393
  (task.row = prevRow$jscomp$0);
7236
7394
  }
7237
7395
  var suspendedFallbackTask = createRenderTask(
@@ -7297,7 +7455,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
7297
7455
  var value$jscomp$0 = props.value,
7298
7456
  children$jscomp$2 = props.children;
7299
7457
  var prevSnapshot = task.context;
7300
- var prevKeyPath$jscomp$5 = task.keyPath;
7458
+ var prevKeyPath$jscomp$6 = task.keyPath;
7301
7459
  var prevValue = type._currentValue;
7302
7460
  type._currentValue = value$jscomp$0;
7303
7461
  void 0 !== type._currentRenderer &&
@@ -7337,10 +7495,10 @@ function renderElement(request, task, keyPath, type, props, ref) {
7337
7495
  "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."
7338
7496
  );
7339
7497
  type._currentRenderer = rendererSigil;
7340
- var JSCompiler_inline_result$jscomp$0 = (currentActiveSnapshot =
7498
+ var JSCompiler_inline_result$jscomp$1 = (currentActiveSnapshot =
7341
7499
  prevSnapshot$jscomp$0.parent);
7342
- task.context = JSCompiler_inline_result$jscomp$0;
7343
- task.keyPath = prevKeyPath$jscomp$5;
7500
+ task.context = JSCompiler_inline_result$jscomp$1;
7501
+ task.keyPath = prevKeyPath$jscomp$6;
7344
7502
  prevSnapshot !== task.context &&
7345
7503
  console.error(
7346
7504
  "Popping the context provider did not return back to the original snapshot. This is a bug in React."
@@ -7354,10 +7512,10 @@ function renderElement(request, task, keyPath, type, props, ref) {
7354
7512
  "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."
7355
7513
  );
7356
7514
  var newChildren = render(context$jscomp$0._currentValue),
7357
- prevKeyPath$jscomp$6 = task.keyPath;
7515
+ prevKeyPath$jscomp$7 = task.keyPath;
7358
7516
  task.keyPath = keyPath;
7359
7517
  renderNodeDestructive(request, task, newChildren, -1);
7360
- task.keyPath = prevKeyPath$jscomp$6;
7518
+ task.keyPath = prevKeyPath$jscomp$7;
7361
7519
  return;
7362
7520
  case REACT_LAZY_TYPE:
7363
7521
  var Component = callLazyInitInDEV(type);
@@ -9044,7 +9202,10 @@ function flushCompletedBoundary(request, destination, boundary) {
9044
9202
  request = request.renderState;
9045
9203
  i = boundary.rootSegmentID;
9046
9204
  boundary = boundary.contentState;
9047
- var requiresStyleInsertion = request.stylesToHoist;
9205
+ var requiresStyleInsertion = request.stylesToHoist,
9206
+ requiresViewTransitions =
9207
+ (completedSegments.instructions & NeedUpgradeToViewTransitions) !==
9208
+ NothingSent;
9048
9209
  request.stylesToHoist = !1;
9049
9210
  writeChunk(destination, request.startInlineScript);
9050
9211
  writeChunk(destination, endOfStartTag);
@@ -9057,6 +9218,14 @@ function flushCompletedBoundary(request, destination, boundary) {
9057
9218
  NothingSent &&
9058
9219
  ((completedSegments.instructions |= SentCompleteBoundaryFunction),
9059
9220
  writeChunk(destination, completeBoundaryScriptFunctionOnly)),
9221
+ requiresViewTransitions &&
9222
+ (completedSegments.instructions & SentUpgradeToViewTransitions) ===
9223
+ NothingSent &&
9224
+ ((completedSegments.instructions |= SentUpgradeToViewTransitions),
9225
+ writeChunk(
9226
+ destination,
9227
+ completeBoundaryUpgradeToViewTransitionsInstruction
9228
+ )),
9060
9229
  (completedSegments.instructions & SentStyleInsertionFunction) ===
9061
9230
  NothingSent
9062
9231
  ? ((completedSegments.instructions |= SentStyleInsertionFunction),
@@ -9066,6 +9235,14 @@ function flushCompletedBoundary(request, destination, boundary) {
9066
9235
  NothingSent &&
9067
9236
  ((completedSegments.instructions |= SentCompleteBoundaryFunction),
9068
9237
  writeChunk(destination, completeBoundaryScriptFunctionOnly)),
9238
+ requiresViewTransitions &&
9239
+ (completedSegments.instructions & SentUpgradeToViewTransitions) ===
9240
+ NothingSent &&
9241
+ ((completedSegments.instructions |= SentUpgradeToViewTransitions),
9242
+ writeChunk(
9243
+ destination,
9244
+ completeBoundaryUpgradeToViewTransitionsInstruction
9245
+ )),
9069
9246
  writeChunk(destination, completeBoundaryScript1Partial));
9070
9247
  completedSegments = i.toString(16);
9071
9248
  writeChunk(destination, request.boundaryPrefix);
@@ -9504,13 +9681,13 @@ function addToReplayParent(node, parentKeyPath, trackedPostpones) {
9504
9681
  }
9505
9682
  var isomorphicReactPackageVersion$jscomp$inline_766 = React.version;
9506
9683
  if (
9507
- "19.3.0-canary-4fdf7cf2-20251003" !==
9684
+ "19.3.0-canary-a4eb2dfa-20251006" !==
9508
9685
  isomorphicReactPackageVersion$jscomp$inline_766
9509
9686
  )
9510
9687
  throw Error(
9511
9688
  'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
9512
9689
  (isomorphicReactPackageVersion$jscomp$inline_766 +
9513
- "\n - react-dom: 19.3.0-canary-4fdf7cf2-20251003\nLearn more: https://react.dev/warnings/version-mismatch")
9690
+ "\n - react-dom: 19.3.0-canary-a4eb2dfa-20251006\nLearn more: https://react.dev/warnings/version-mismatch")
9514
9691
  );
9515
9692
  exports.renderToReadableStream = function (children, options) {
9516
9693
  return new Promise(function (resolve, reject) {
@@ -9603,4 +9780,4 @@ exports.renderToReadableStream = function (children, options) {
9603
9780
  startWork(request$jscomp$0);
9604
9781
  });
9605
9782
  };
9606
- exports.version = "19.3.0-canary-4fdf7cf2-20251003";
9783
+ exports.version = "19.3.0-canary-a4eb2dfa-20251006";