react-dom 19.2.0-canary-c4676e72-20250520 → 19.2.0-canary-8ce15b0f-20250522

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.
@@ -684,8 +684,8 @@ function getSuspenseViewTransition(parentViewTransition) {
684
684
  ? null
685
685
  : {
686
686
  update: parentViewTransition.update,
687
- enter: null,
688
- exit: null,
687
+ enter: "none",
688
+ exit: "none",
689
689
  share: parentViewTransition.update,
690
690
  name: parentViewTransition.autoName,
691
691
  autoName: parentViewTransition.autoName,
@@ -2537,10 +2537,10 @@ var completeSegmentScript1Full = stringToPrecomputedChunk(
2537
2537
  stringToPrecomputedChunk('<template data-rsi="" data-sid="');
2538
2538
  stringToPrecomputedChunk('" data-pid="');
2539
2539
  var completeBoundaryScriptFunctionOnly = stringToPrecomputedChunk(
2540
- '$RB=[];$RV=function(){$RT=performance.now();var d=$RB;$RB=[];for(var a=0;a<d.length;a+=2){var b=d[a],h=d[a+1],e=b.parentNode;if(e){var f=b.previousSibling,g=0;do{if(b&&8===b.nodeType){var c=b.data;if("/$"===c||"/&"===c)if(0===g)break;else g--;else"$"!==c&&"$?"!==c&&"$~"!==c&&"$!"!==c&&"&"!==c||g++}c=b.nextSibling;e.removeChild(b);b=c}while(b);for(;h.firstChild;)e.insertBefore(h.firstChild,b);f.data="$";f._reactRetry&&f._reactRetry()}}};$RC=function(d,a){if(a=document.getElementById(a))if(a.parentNode.removeChild(a),d=document.getElementById(d))d.previousSibling.data="$~",$RB.push(d,a),2===$RB.length&&setTimeout($RV,("number"!==typeof $RT?0:$RT)+300-performance.now())};'
2540
+ '$RB=[];$RV=function(c){$RT=performance.now();for(var a=0;a<c.length;a+=2){var b=c[a],h=c[a+1],e=b.parentNode;if(e){var f=b.previousSibling,g=0;do{if(b&&8===b.nodeType){var d=b.data;if("/$"===d||"/&"===d)if(0===g)break;else g--;else"$"!==d&&"$?"!==d&&"$~"!==d&&"$!"!==d&&"&"!==d||g++}d=b.nextSibling;e.removeChild(b);b=d}while(b);for(;h.firstChild;)e.insertBefore(h.firstChild,b);f.data="$";f._reactRetry&&f._reactRetry()}}c.length=0};$RC=function(c,a){if(a=document.getElementById(a))if(a.parentNode.removeChild(a),c=document.getElementById(c))c.previousSibling.data="$~",$RB.push(c,a),2===$RB.length&&setTimeout($RV.bind(null,$RB),("number"!==typeof $RT?0:$RT)+300-performance.now())};'
2541
2541
  );
2542
2542
  stringToPrecomputedChunk(
2543
- "$RV=function(a){try{var b=document.__reactViewTransition;if(b){b.finished.then($RV,$RV);return}if(window._useVT){var c=document.__reactViewTransition=document.startViewTransition({update:a,types:[]});c.finished.finally(function(){document.__reactViewTransition===c&&(document.__reactViewTransition=null)});return}}catch(d){}a()}.bind(null,$RV);"
2543
+ '$RV=function(w,f){function h(b,d){var k=b.getAttribute(d);k&&(d=b.style,l.push(b,d.viewTransitionName,d.viewTransitionClass),"auto"!==k&&(d.viewTransitionClass=k),(b=b.getAttribute("vt-name"))||(b="\\u00abT"+F++ +"\\u00bb"),d.viewTransitionName=b,x=!0)}var x=!1,F=0,l=[];try{var e=document.__reactViewTransition;if(e){e.finished.finally($RV.bind(null,f));return}var m=new Map;for(e=1;e<f.length;e+=2)for(var g=f[e].querySelectorAll("[vt-share]"),c=0;c<g.length;c++){var a=g[c];m.set(a.getAttribute("vt-name"),a)}for(g=0;g<f.length;g+=2){var y=f[g],t=y.parentNode;if(t){var r=t.getBoundingClientRect();if(r.left||r.top||r.width||r.height){a=y;for(e=0;a;){if(8===a.nodeType){var p=a.data;if("/$"===p)if(0===e)break;else e--;else"$"!==p&&"$?"!==p&&"$~"!==p&&"$!"!==p||e++}else if(1===a.nodeType){c=a;var z=c.getAttribute("vt-name"),u=m.get(z);h(c,u?"vt-share":"vt-exit");u&&(h(u,"vt-share"),m.set(z,null));var A=c.querySelectorAll("[vt-share]");for(c=0;c<A.length;c++){var B=A[c],C=B.getAttribute("vt-name"),D=m.get(C);\nD&&(h(B,"vt-share"),h(D,"vt-share"),m.set(C,null))}}a=a.nextSibling}for(var q=f[g+1].firstElementChild;q;)null!==m.get(q.getAttribute("vt-name"))&&h(q,"vt-enter"),q=q.nextElementSibling;a=t;do for(var n=a.firstElementChild;n;){var E=n.getAttribute("vt-update");E&&"none"!==E&&!l.includes(n)&&h(n,"vt-update");n=n.nextElementSibling}while((a=a.parentNode)&&1===a.nodeType&&"none"!==a.getAttribute("vt-update"))}}}if(x){var v=document.__reactViewTransition=document.startViewTransition({update:w.bind(null,\nf),types:[]});v.ready.finally(function(){for(var b=l.length-3;0<=b;b-=3){var d=l[b],k=d.style;k.viewTransitionName=l[b+1];k.viewTransitionClass=l[b+1];""===d.getAttribute("style")&&d.removeAttribute("style")}});v.finished.finally(function(){document.__reactViewTransition===v&&(document.__reactViewTransition=null)});$RB=[];return}}catch(b){}w(f)}.bind(null,$RV);'
2544
2544
  );
2545
2545
  var completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'),
2546
2546
  completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(
@@ -3264,6 +3264,10 @@ function hoistStyleQueueDependency(styleQueue) {
3264
3264
  function hoistStylesheetDependency(stylesheet) {
3265
3265
  this.stylesheets.add(stylesheet);
3266
3266
  }
3267
+ function hoistHoistables(parentState, childState) {
3268
+ childState.styles.forEach(hoistStyleQueueDependency, parentState);
3269
+ childState.stylesheets.forEach(hoistStylesheetDependency, parentState);
3270
+ }
3267
3271
  var bind = Function.prototype.bind,
3268
3272
  supportsRequestStorage = "function" === typeof AsyncLocalStorage,
3269
3273
  requestStorage = supportsRequestStorage ? new AsyncLocalStorage() : null,
@@ -4213,11 +4217,14 @@ function createSuspenseBoundary(
4213
4217
  };
4214
4218
  null !== row &&
4215
4219
  (row.pendingTasks++,
4216
- (row = row.boundaries),
4217
- null !== row &&
4220
+ (contentPreamble = row.boundaries),
4221
+ null !== contentPreamble &&
4218
4222
  (request.allPendingTasks++,
4219
4223
  fallbackAbortableTasks.pendingTasks++,
4220
- row.push(fallbackAbortableTasks)));
4224
+ contentPreamble.push(fallbackAbortableTasks)),
4225
+ (request = row.inheritedHoistables),
4226
+ null !== request &&
4227
+ hoistHoistables(fallbackAbortableTasks.contentState, request));
4221
4228
  return fallbackAbortableTasks;
4222
4229
  }
4223
4230
  function createRenderTask(
@@ -4382,20 +4389,56 @@ function fatalError(request, error) {
4382
4389
  : ((request.status = 13), (request.fatalError = error));
4383
4390
  }
4384
4391
  function finishSuspenseListRow(request, row) {
4385
- for (row = row.next; null !== row; ) {
4386
- var unblockedBoundaries = row.boundaries;
4392
+ unblockSuspenseListRow(request, row.next, row.hoistables);
4393
+ }
4394
+ function unblockSuspenseListRow(request, unblockedRow, inheritedHoistables) {
4395
+ for (; null !== unblockedRow; ) {
4396
+ null !== inheritedHoistables &&
4397
+ (hoistHoistables(unblockedRow.hoistables, inheritedHoistables),
4398
+ (unblockedRow.inheritedHoistables = inheritedHoistables));
4399
+ var unblockedBoundaries = unblockedRow.boundaries;
4387
4400
  if (null !== unblockedBoundaries) {
4388
- row.boundaries = null;
4389
- for (var i = 0; i < unblockedBoundaries.length; i++)
4390
- finishedTask(request, unblockedBoundaries[i], null, null);
4401
+ unblockedRow.boundaries = null;
4402
+ for (var i = 0; i < unblockedBoundaries.length; i++) {
4403
+ var unblockedBoundary = unblockedBoundaries[i];
4404
+ null !== inheritedHoistables &&
4405
+ hoistHoistables(unblockedBoundary.contentState, inheritedHoistables);
4406
+ finishedTask(request, unblockedBoundary, null, null);
4407
+ }
4408
+ }
4409
+ unblockedRow.pendingTasks--;
4410
+ if (0 < unblockedRow.pendingTasks) break;
4411
+ inheritedHoistables = unblockedRow.hoistables;
4412
+ unblockedRow = unblockedRow.next;
4413
+ }
4414
+ }
4415
+ function tryToResolveTogetherRow(request, togetherRow) {
4416
+ var boundaries = togetherRow.boundaries;
4417
+ if (null !== boundaries && togetherRow.pendingTasks === boundaries.length) {
4418
+ for (var allCompleteAndInlinable = !0, i = 0; i < boundaries.length; i++) {
4419
+ var rowBoundary = boundaries[i];
4420
+ if (
4421
+ 1 !== rowBoundary.pendingTasks ||
4422
+ rowBoundary.parentFlushed ||
4423
+ 500 < rowBoundary.byteSize
4424
+ ) {
4425
+ allCompleteAndInlinable = !1;
4426
+ break;
4427
+ }
4391
4428
  }
4392
- row.pendingTasks--;
4393
- if (0 < row.pendingTasks) break;
4394
- row = row.next;
4429
+ allCompleteAndInlinable &&
4430
+ unblockSuspenseListRow(request, togetherRow, togetherRow.hoistables);
4395
4431
  }
4396
4432
  }
4397
4433
  function createSuspenseListRow(previousRow) {
4398
- var newRow = { pendingTasks: 1, boundaries: null, next: null };
4434
+ var newRow = {
4435
+ pendingTasks: 1,
4436
+ boundaries: null,
4437
+ hoistables: createHoistableState(),
4438
+ inheritedHoistables: null,
4439
+ together: !1,
4440
+ next: null
4441
+ };
4399
4442
  null !== previousRow &&
4400
4443
  0 < previousRow.pendingTasks &&
4401
4444
  (newRow.pendingTasks++,
@@ -4404,21 +4447,22 @@ function createSuspenseListRow(previousRow) {
4404
4447
  return newRow;
4405
4448
  }
4406
4449
  function renderSuspenseListRows(request, task, keyPath, rows, revealOrder) {
4407
- keyPath = task.keyPath;
4408
- var prevTreeContext = task.treeContext,
4409
- prevRow = task.row,
4410
- totalChildren = rows.length,
4411
- previousSuspenseListRow = null;
4450
+ var prevKeyPath = task.keyPath,
4451
+ prevTreeContext = task.treeContext,
4452
+ prevRow = task.row;
4453
+ task.keyPath = keyPath;
4454
+ keyPath = rows.length;
4455
+ var previousSuspenseListRow = null;
4412
4456
  if (null !== task.replay) {
4413
4457
  var resumeSlots = task.replay.slots;
4414
4458
  if (null !== resumeSlots && "object" === typeof resumeSlots)
4415
- for (var n = 0; n < totalChildren; n++) {
4416
- var i = "backwards" !== revealOrder ? n : totalChildren - 1 - n,
4459
+ for (var n = 0; n < keyPath; n++) {
4460
+ var i = "backwards" !== revealOrder ? n : keyPath - 1 - n,
4417
4461
  node = rows[i];
4418
4462
  task.row = previousSuspenseListRow = createSuspenseListRow(
4419
4463
  previousSuspenseListRow
4420
4464
  );
4421
- task.treeContext = pushTreeContext(prevTreeContext, totalChildren, i);
4465
+ task.treeContext = pushTreeContext(prevTreeContext, keyPath, i);
4422
4466
  var resumeSegmentID = resumeSlots[i];
4423
4467
  "number" === typeof resumeSegmentID
4424
4468
  ? (resumeNode(request, task, resumeSegmentID, node, i),
@@ -4428,30 +4472,26 @@ function renderSuspenseListRows(request, task, keyPath, rows, revealOrder) {
4428
4472
  finishSuspenseListRow(request, previousSuspenseListRow);
4429
4473
  }
4430
4474
  else
4431
- for (resumeSlots = 0; resumeSlots < totalChildren; resumeSlots++)
4475
+ for (resumeSlots = 0; resumeSlots < keyPath; resumeSlots++)
4432
4476
  (n =
4433
4477
  "backwards" !== revealOrder
4434
4478
  ? resumeSlots
4435
- : totalChildren - 1 - resumeSlots),
4479
+ : keyPath - 1 - resumeSlots),
4436
4480
  (i = rows[n]),
4437
4481
  (task.row = previousSuspenseListRow =
4438
4482
  createSuspenseListRow(previousSuspenseListRow)),
4439
- (task.treeContext = pushTreeContext(
4440
- prevTreeContext,
4441
- totalChildren,
4442
- n
4443
- )),
4483
+ (task.treeContext = pushTreeContext(prevTreeContext, keyPath, n)),
4444
4484
  renderNode(request, task, i, n),
4445
4485
  0 === --previousSuspenseListRow.pendingTasks &&
4446
4486
  finishSuspenseListRow(request, previousSuspenseListRow);
4447
4487
  } else if ("backwards" !== revealOrder)
4448
- for (revealOrder = 0; revealOrder < totalChildren; revealOrder++)
4488
+ for (revealOrder = 0; revealOrder < keyPath; revealOrder++)
4449
4489
  (resumeSlots = rows[revealOrder]),
4450
4490
  (task.row = previousSuspenseListRow =
4451
4491
  createSuspenseListRow(previousSuspenseListRow)),
4452
4492
  (task.treeContext = pushTreeContext(
4453
4493
  prevTreeContext,
4454
- totalChildren,
4494
+ keyPath,
4455
4495
  revealOrder
4456
4496
  )),
4457
4497
  renderNode(request, task, resumeSlots, revealOrder),
@@ -4461,12 +4501,12 @@ function renderSuspenseListRows(request, task, keyPath, rows, revealOrder) {
4461
4501
  revealOrder = task.blockedSegment;
4462
4502
  resumeSlots = revealOrder.children.length;
4463
4503
  n = revealOrder.chunks.length;
4464
- for (i = totalChildren - 1; 0 <= i; i--) {
4504
+ for (i = keyPath - 1; 0 <= i; i--) {
4465
4505
  node = rows[i];
4466
4506
  task.row = previousSuspenseListRow = createSuspenseListRow(
4467
4507
  previousSuspenseListRow
4468
4508
  );
4469
- task.treeContext = pushTreeContext(prevTreeContext, totalChildren, i);
4509
+ task.treeContext = pushTreeContext(prevTreeContext, keyPath, i);
4470
4510
  resumeSegmentID = createPendingSegment(
4471
4511
  request,
4472
4512
  n,
@@ -4502,7 +4542,7 @@ function renderSuspenseListRows(request, task, keyPath, rows, revealOrder) {
4502
4542
  (prevRow.pendingTasks++, (previousSuspenseListRow.next = prevRow));
4503
4543
  task.treeContext = prevTreeContext;
4504
4544
  task.row = prevRow;
4505
- task.keyPath = keyPath;
4545
+ task.keyPath = prevKeyPath;
4506
4546
  }
4507
4547
  function renderWithHooks(request, task, keyPath, Component, props, secondArg) {
4508
4548
  var prevThenableState = task.thenableState;
@@ -4571,9 +4611,9 @@ function renderElement(request, task, keyPath, type, props, ref) {
4571
4611
  var defaultProps = type.defaultProps;
4572
4612
  if (defaultProps) {
4573
4613
  newProps === props && (newProps = assign({}, newProps, props));
4574
- for (var propName$42 in defaultProps)
4575
- void 0 === newProps[propName$42] &&
4576
- (newProps[propName$42] = defaultProps[propName$42]);
4614
+ for (var propName$43 in defaultProps)
4615
+ void 0 === newProps[propName$43] &&
4616
+ (newProps[propName$43] = defaultProps[propName$43]);
4577
4617
  }
4578
4618
  props = newProps;
4579
4619
  newProps = emptyContextObject;
@@ -4633,16 +4673,16 @@ function renderElement(request, task, keyPath, type, props, ref) {
4633
4673
  defaultProps = ref ? type[0] : newProps.state;
4634
4674
  initialState = !0;
4635
4675
  for (ref = ref ? 1 : 0; ref < type.length; ref++)
4636
- (propName$42 = type[ref]),
4637
- (propName$42 =
4638
- "function" === typeof propName$42
4639
- ? propName$42.call(newProps, defaultProps, props, void 0)
4640
- : propName$42),
4641
- null != propName$42 &&
4676
+ (propName$43 = type[ref]),
4677
+ (propName$43 =
4678
+ "function" === typeof propName$43
4679
+ ? propName$43.call(newProps, defaultProps, props, void 0)
4680
+ : propName$43),
4681
+ null != propName$43 &&
4642
4682
  (initialState
4643
4683
  ? ((initialState = !1),
4644
- (defaultProps = assign({}, defaultProps, propName$42)))
4645
- : assign(defaultProps, propName$42));
4684
+ (defaultProps = assign({}, defaultProps, propName$43)))
4685
+ : assign(defaultProps, propName$43));
4646
4686
  newProps.state = defaultProps;
4647
4687
  }
4648
4688
  else defaultProps.queue = null;
@@ -4816,10 +4856,25 @@ function renderElement(request, task, keyPath, type, props, ref) {
4816
4856
  break a;
4817
4857
  }
4818
4858
  }
4819
- props = task.keyPath;
4820
- task.keyPath = keyPath;
4821
- renderNodeDestructive(request, task, type, -1);
4822
- task.keyPath = props;
4859
+ "together" === props
4860
+ ? ((props = task.keyPath),
4861
+ (newProps = task.row),
4862
+ (defaultProps = task.row = createSuspenseListRow(null)),
4863
+ (defaultProps.boundaries = []),
4864
+ (defaultProps.together = !0),
4865
+ (task.keyPath = keyPath),
4866
+ renderNodeDestructive(request, task, type, -1),
4867
+ 0 === --defaultProps.pendingTasks &&
4868
+ finishSuspenseListRow(request, defaultProps),
4869
+ (task.keyPath = props),
4870
+ (task.row = newProps),
4871
+ null !== newProps &&
4872
+ 0 < defaultProps.pendingTasks &&
4873
+ (newProps.pendingTasks++, (defaultProps.next = newProps)))
4874
+ : ((props = task.keyPath),
4875
+ (task.keyPath = keyPath),
4876
+ renderNodeDestructive(request, task, type, -1),
4877
+ (task.keyPath = props));
4823
4878
  }
4824
4879
  return;
4825
4880
  case REACT_VIEW_TRANSITION_TYPE:
@@ -4848,7 +4903,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
4848
4903
  type = task.keyPath;
4849
4904
  ref = task.formatContext;
4850
4905
  var prevRow = task.row;
4851
- propName$42 = task.blockedBoundary;
4906
+ propName$43 = task.blockedBoundary;
4852
4907
  propName = task.blockedPreamble;
4853
4908
  var parentHoistableState = task.hoistableState,
4854
4909
  parentSegment = task.blockedSegment,
@@ -4911,7 +4966,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
4911
4966
  boundarySegment.textEmbedded &&
4912
4967
  boundarySegment.chunks.push(textSeparator),
4913
4968
  (boundarySegment.status = 1),
4914
- finishedSegment(request, propName$42, boundarySegment);
4969
+ finishedSegment(request, propName$43, boundarySegment);
4915
4970
  } catch (thrownValue) {
4916
4971
  throw (
4917
4972
  ((boundarySegment.status = 12 === request.status ? 3 : 4),
@@ -4966,18 +5021,21 @@ function renderElement(request, task, keyPath, type, props, ref) {
4966
5021
  (contentRootSegment.status = 1),
4967
5022
  finishedSegment(request, newBoundary, contentRootSegment),
4968
5023
  queueCompletedSegment(newBoundary, contentRootSegment),
4969
- 0 === newBoundary.pendingTasks &&
4970
- 0 === newBoundary.status &&
4971
- ((newBoundary.status = 1), !(500 < newBoundary.byteSize)))
5024
+ 0 === newBoundary.pendingTasks && 0 === newBoundary.status)
4972
5025
  ) {
5026
+ if (((newBoundary.status = 1), !(500 < newBoundary.byteSize))) {
5027
+ null !== prevRow &&
5028
+ 0 === --prevRow.pendingTasks &&
5029
+ finishSuspenseListRow(request, prevRow);
5030
+ 0 === request.pendingRootTasks &&
5031
+ task.blockedPreamble &&
5032
+ preparePreamble(request);
5033
+ break a;
5034
+ }
5035
+ } else
4973
5036
  null !== prevRow &&
4974
- 0 === --prevRow.pendingTasks &&
4975
- finishSuspenseListRow(request, prevRow);
4976
- 0 === request.pendingRootTasks &&
4977
- task.blockedPreamble &&
4978
- preparePreamble(request);
4979
- break a;
4980
- }
5037
+ prevRow.together &&
5038
+ tryToResolveTogetherRow(request, prevRow);
4981
5039
  } catch (thrownValue$30) {
4982
5040
  (newBoundary.status = 4),
4983
5041
  12 === request.status
@@ -4994,7 +5052,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
4994
5052
  (newBoundary.errorDigest = initialState),
4995
5053
  untrackBoundary(request, newBoundary);
4996
5054
  } finally {
4997
- (task.blockedBoundary = propName$42),
5055
+ (task.blockedBoundary = propName$43),
4998
5056
  (task.blockedPreamble = propName),
4999
5057
  (task.hoistableState = parentHoistableState),
5000
5058
  (task.blockedSegment = parentSegment),
@@ -5007,7 +5065,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
5007
5065
  null,
5008
5066
  fallback,
5009
5067
  -1,
5010
- propName$42,
5068
+ propName$43,
5011
5069
  boundarySegment,
5012
5070
  newBoundary.fallbackPreamble,
5013
5071
  newBoundary.fallbackState,
@@ -5597,15 +5655,15 @@ function renderNode(request, task, node, childIndex) {
5597
5655
  chunkLength = segment.chunks.length;
5598
5656
  try {
5599
5657
  return renderNodeDestructive(request, task, node, childIndex);
5600
- } catch (thrownValue$58) {
5658
+ } catch (thrownValue$60) {
5601
5659
  if (
5602
5660
  (resetHooksState(),
5603
5661
  (segment.children.length = childrenLength),
5604
5662
  (segment.chunks.length = chunkLength),
5605
5663
  (node =
5606
- thrownValue$58 === SuspenseException
5664
+ thrownValue$60 === SuspenseException
5607
5665
  ? getSuspendedThenable()
5608
- : thrownValue$58),
5666
+ : thrownValue$60),
5609
5667
  "object" === typeof node && null !== node)
5610
5668
  ) {
5611
5669
  if ("function" === typeof node.then) {
@@ -5707,10 +5765,6 @@ function abortTask(task, request, error) {
5707
5765
  if (6 === segment.status) return;
5708
5766
  segment.status = 3;
5709
5767
  }
5710
- segment = task.row;
5711
- null !== segment &&
5712
- 0 === --segment.pendingTasks &&
5713
- finishSuspenseListRow(request, segment);
5714
5768
  segment = getThrownInfo(task.componentStack);
5715
5769
  if (null === boundary) {
5716
5770
  if (13 !== request.status && 14 !== request.status) {
@@ -5723,32 +5777,40 @@ function abortTask(task, request, error) {
5723
5777
  boundary.pendingTasks--;
5724
5778
  0 === boundary.pendingTasks &&
5725
5779
  0 < boundary.nodes.length &&
5726
- ((task = logRecoverableError(request, error, segment)),
5780
+ ((segment = logRecoverableError(request, error, segment)),
5727
5781
  abortRemainingReplayNodes(
5728
5782
  request,
5729
5783
  null,
5730
5784
  boundary.nodes,
5731
5785
  boundary.slots,
5732
5786
  error,
5733
- task
5787
+ segment
5734
5788
  ));
5735
5789
  request.pendingRootTasks--;
5736
5790
  0 === request.pendingRootTasks && completeShell(request);
5737
5791
  }
5738
5792
  } else
5739
- boundary.pendingTasks--,
5740
- 4 !== boundary.status &&
5741
- ((boundary.status = 4),
5742
- (task = logRecoverableError(request, error, segment)),
5743
- (boundary.status = 4),
5744
- (boundary.errorDigest = task),
5745
- untrackBoundary(request, boundary),
5746
- boundary.parentFlushed &&
5747
- request.clientRenderedBoundaries.push(boundary)),
5793
+ 4 !== boundary.status &&
5794
+ ((boundary.status = 4),
5795
+ (segment = logRecoverableError(request, error, segment)),
5796
+ (boundary.status = 4),
5797
+ (boundary.errorDigest = segment),
5798
+ untrackBoundary(request, boundary),
5799
+ boundary.parentFlushed &&
5800
+ request.clientRenderedBoundaries.push(boundary)),
5801
+ boundary.pendingTasks--,
5802
+ (segment = boundary.row),
5803
+ null !== segment &&
5804
+ 0 === --segment.pendingTasks &&
5805
+ finishSuspenseListRow(request, segment),
5748
5806
  boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {
5749
5807
  return abortTask(fallbackTask, request, error);
5750
5808
  }),
5751
5809
  boundary.fallbackAbortableTasks.clear();
5810
+ task = task.row;
5811
+ null !== task &&
5812
+ 0 === --task.pendingTasks &&
5813
+ finishSuspenseListRow(request, task);
5752
5814
  request.allPendingTasks--;
5753
5815
  0 === request.allPendingTasks && completeAll(request);
5754
5816
  }
@@ -5855,55 +5917,120 @@ function finishedSegment(request, boundary, segment) {
5855
5917
  : (boundary.byteSize += segmentByteSize);
5856
5918
  }
5857
5919
  }
5858
- function finishedTask(request, boundary, row, segment) {
5920
+ function finishedTask(request$jscomp$0, boundary, row, segment) {
5859
5921
  null !== row &&
5860
- 0 === --row.pendingTasks &&
5861
- finishSuspenseListRow(request, row);
5862
- request.allPendingTasks--;
5922
+ (0 === --row.pendingTasks
5923
+ ? finishSuspenseListRow(request$jscomp$0, row)
5924
+ : row.together && tryToResolveTogetherRow(request$jscomp$0, row));
5925
+ request$jscomp$0.allPendingTasks--;
5863
5926
  if (null === boundary) {
5864
5927
  if (null !== segment && segment.parentFlushed) {
5865
- if (null !== request.completedRootSegment)
5928
+ if (null !== request$jscomp$0.completedRootSegment)
5866
5929
  throw Error(
5867
5930
  "There can only be one root segment. This is a bug in React."
5868
5931
  );
5869
- request.completedRootSegment = segment;
5932
+ request$jscomp$0.completedRootSegment = segment;
5870
5933
  }
5871
- request.pendingRootTasks--;
5872
- 0 === request.pendingRootTasks && completeShell(request);
5873
- } else
5874
- boundary.pendingTasks--,
5875
- 4 !== boundary.status &&
5876
- (0 === boundary.pendingTasks
5877
- ? (0 === boundary.status && (boundary.status = 1),
5878
- null !== segment &&
5879
- segment.parentFlushed &&
5880
- 1 === segment.status &&
5881
- queueCompletedSegment(boundary, segment),
5882
- boundary.parentFlushed &&
5883
- request.completedBoundaries.push(boundary),
5884
- 1 === boundary.status &&
5885
- (500 < boundary.byteSize ||
5886
- (boundary.fallbackAbortableTasks.forEach(
5887
- abortTaskSoft,
5888
- request
5889
- ),
5890
- boundary.fallbackAbortableTasks.clear(),
5891
- (row = boundary.row),
5892
- null !== row &&
5893
- 0 === --row.pendingTasks &&
5894
- finishSuspenseListRow(request, row)),
5895
- 0 === request.pendingRootTasks &&
5896
- null === request.trackedPostpones &&
5897
- null !== boundary.contentPreamble &&
5898
- preparePreamble(request)))
5899
- : null !== segment &&
5900
- segment.parentFlushed &&
5901
- 1 === segment.status &&
5902
- (queueCompletedSegment(boundary, segment),
5903
- 1 === boundary.completedSegments.length &&
5904
- boundary.parentFlushed &&
5905
- request.partialBoundaries.push(boundary)));
5906
- 0 === request.allPendingTasks && completeAll(request);
5934
+ request$jscomp$0.pendingRootTasks--;
5935
+ 0 === request$jscomp$0.pendingRootTasks && completeShell(request$jscomp$0);
5936
+ } else if ((boundary.pendingTasks--, 4 !== boundary.status))
5937
+ if (0 === boundary.pendingTasks)
5938
+ if (
5939
+ (0 === boundary.status && (boundary.status = 1),
5940
+ null !== segment &&
5941
+ segment.parentFlushed &&
5942
+ 1 === segment.status &&
5943
+ queueCompletedSegment(boundary, segment),
5944
+ boundary.parentFlushed &&
5945
+ request$jscomp$0.completedBoundaries.push(boundary),
5946
+ 1 === boundary.status)
5947
+ )
5948
+ (row = boundary.row),
5949
+ null !== row &&
5950
+ hoistHoistables(row.hoistables, boundary.contentState),
5951
+ 500 < boundary.byteSize ||
5952
+ (boundary.fallbackAbortableTasks.forEach(
5953
+ abortTaskSoft,
5954
+ request$jscomp$0
5955
+ ),
5956
+ boundary.fallbackAbortableTasks.clear(),
5957
+ null !== row &&
5958
+ 0 === --row.pendingTasks &&
5959
+ finishSuspenseListRow(request$jscomp$0, row)),
5960
+ 0 === request$jscomp$0.pendingRootTasks &&
5961
+ null === request$jscomp$0.trackedPostpones &&
5962
+ null !== boundary.contentPreamble &&
5963
+ preparePreamble(request$jscomp$0);
5964
+ else {
5965
+ if (
5966
+ 5 === boundary.status &&
5967
+ ((boundary = boundary.row), null !== boundary)
5968
+ ) {
5969
+ if (null !== request$jscomp$0.trackedPostpones) {
5970
+ row = request$jscomp$0.trackedPostpones;
5971
+ var postponedRow = boundary.next;
5972
+ if (
5973
+ null !== postponedRow &&
5974
+ ((segment = postponedRow.boundaries), null !== segment)
5975
+ )
5976
+ for (
5977
+ postponedRow.boundaries = null, postponedRow = 0;
5978
+ postponedRow < segment.length;
5979
+ postponedRow++
5980
+ ) {
5981
+ var postponedBoundary = segment[postponedRow];
5982
+ var request = request$jscomp$0,
5983
+ trackedPostpones = row;
5984
+ postponedBoundary.status = 5;
5985
+ postponedBoundary.rootSegmentID = request.nextSegmentId++;
5986
+ request = postponedBoundary.trackedContentKeyPath;
5987
+ if (null === request)
5988
+ throw Error(
5989
+ "It should not be possible to postpone at the root. This is a bug in React."
5990
+ );
5991
+ var fallbackReplayNode = postponedBoundary.trackedFallbackNode,
5992
+ children = [],
5993
+ boundaryNode = trackedPostpones.workingMap.get(request);
5994
+ void 0 === boundaryNode
5995
+ ? ((fallbackReplayNode = [
5996
+ request[1],
5997
+ request[2],
5998
+ children,
5999
+ null,
6000
+ fallbackReplayNode,
6001
+ postponedBoundary.rootSegmentID
6002
+ ]),
6003
+ trackedPostpones.workingMap.set(
6004
+ request,
6005
+ fallbackReplayNode
6006
+ ),
6007
+ addToReplayParent(
6008
+ fallbackReplayNode,
6009
+ request[0],
6010
+ trackedPostpones
6011
+ ))
6012
+ : ((boundaryNode[4] = fallbackReplayNode),
6013
+ (boundaryNode[5] = postponedBoundary.rootSegmentID));
6014
+ finishedTask(request$jscomp$0, postponedBoundary, null, null);
6015
+ }
6016
+ }
6017
+ 0 === --boundary.pendingTasks &&
6018
+ finishSuspenseListRow(request$jscomp$0, boundary);
6019
+ }
6020
+ }
6021
+ else
6022
+ null !== segment &&
6023
+ segment.parentFlushed &&
6024
+ 1 === segment.status &&
6025
+ (queueCompletedSegment(boundary, segment),
6026
+ 1 === boundary.completedSegments.length &&
6027
+ boundary.parentFlushed &&
6028
+ request$jscomp$0.partialBoundaries.push(boundary)),
6029
+ (boundary = boundary.row),
6030
+ null !== boundary &&
6031
+ boundary.together &&
6032
+ tryToResolveTogetherRow(request$jscomp$0, boundary);
6033
+ 0 === request$jscomp$0.allPendingTasks && completeAll(request$jscomp$0);
5907
6034
  }
5908
6035
  function performWork(request$jscomp$2) {
5909
6036
  if (14 !== request$jscomp$2.status && 13 !== request$jscomp$2.status) {
@@ -6059,19 +6186,25 @@ function performWork(request$jscomp$2) {
6059
6186
  x$jscomp$0,
6060
6187
  errorInfo$jscomp$0
6061
6188
  );
6062
- null === boundary$jscomp$0
6063
- ? fatalError(request, x$jscomp$0)
6064
- : (boundary$jscomp$0.pendingTasks--,
6065
- 4 !== boundary$jscomp$0.status &&
6066
- ((boundary$jscomp$0.status = 4),
6067
- (boundary$jscomp$0.errorDigest = request$jscomp$0),
6068
- untrackBoundary(request, boundary$jscomp$0),
6069
- boundary$jscomp$0.parentFlushed &&
6070
- request.clientRenderedBoundaries.push(boundary$jscomp$0),
6071
- 0 === request.pendingRootTasks &&
6072
- null === request.trackedPostpones &&
6073
- null !== boundary$jscomp$0.contentPreamble &&
6074
- preparePreamble(request)));
6189
+ if (null === boundary$jscomp$0) fatalError(request, x$jscomp$0);
6190
+ else if (
6191
+ (boundary$jscomp$0.pendingTasks--,
6192
+ 4 !== boundary$jscomp$0.status)
6193
+ ) {
6194
+ boundary$jscomp$0.status = 4;
6195
+ boundary$jscomp$0.errorDigest = request$jscomp$0;
6196
+ untrackBoundary(request, boundary$jscomp$0);
6197
+ var boundaryRow = boundary$jscomp$0.row;
6198
+ null !== boundaryRow &&
6199
+ 0 === --boundaryRow.pendingTasks &&
6200
+ finishSuspenseListRow(request, boundaryRow);
6201
+ boundary$jscomp$0.parentFlushed &&
6202
+ request.clientRenderedBoundaries.push(boundary$jscomp$0);
6203
+ 0 === request.pendingRootTasks &&
6204
+ null === request.trackedPostpones &&
6205
+ null !== boundary$jscomp$0.contentPreamble &&
6206
+ preparePreamble(request);
6207
+ }
6075
6208
  0 === request.allPendingTasks && completeAll(request);
6076
6209
  }
6077
6210
  } finally {
@@ -6243,13 +6376,7 @@ function flushSegment(request, destination, segment, hoistableState) {
6243
6376
  request.renderState,
6244
6377
  boundary.rootSegmentID
6245
6378
  ),
6246
- hoistableState &&
6247
- ((boundary = boundary.fallbackState),
6248
- boundary.styles.forEach(hoistStyleQueueDependency, hoistableState),
6249
- boundary.stylesheets.forEach(
6250
- hoistStylesheetDependency,
6251
- hoistableState
6252
- )),
6379
+ hoistableState && hoistHoistables(hoistableState, boundary.fallbackState),
6253
6380
  flushSubtree(request, destination, segment, hoistableState);
6254
6381
  else if (
6255
6382
  500 < boundary.byteSize &&
@@ -6265,10 +6392,7 @@ function flushSegment(request, destination, segment, hoistableState) {
6265
6392
  flushSubtree(request, destination, segment, hoistableState);
6266
6393
  else {
6267
6394
  flushedByteSize += boundary.byteSize;
6268
- hoistableState &&
6269
- ((segment = boundary.contentState),
6270
- segment.styles.forEach(hoistStyleQueueDependency, hoistableState),
6271
- segment.stylesheets.forEach(hoistStylesheetDependency, hoistableState));
6395
+ hoistableState && hoistHoistables(hoistableState, boundary.contentState);
6272
6396
  segment = boundary.row;
6273
6397
  null !== segment &&
6274
6398
  500 < boundary.byteSize &&
@@ -6590,12 +6714,12 @@ function flushCompletedQueues(request, destination) {
6590
6714
  writtenBytes = 0;
6591
6715
  var partialBoundaries = request.partialBoundaries;
6592
6716
  for (i = 0; i < partialBoundaries.length; i++) {
6593
- var boundary$62 = partialBoundaries[i];
6717
+ var boundary$66 = partialBoundaries[i];
6594
6718
  a: {
6595
6719
  clientRenderedBoundaries = request;
6596
6720
  boundary = destination;
6597
- flushedByteSize = boundary$62.byteSize;
6598
- var completedSegments = boundary$62.completedSegments;
6721
+ flushedByteSize = boundary$66.byteSize;
6722
+ var completedSegments = boundary$66.completedSegments;
6599
6723
  for (
6600
6724
  JSCompiler_inline_result = 0;
6601
6725
  JSCompiler_inline_result < completedSegments.length;
@@ -6605,7 +6729,7 @@ function flushCompletedQueues(request, destination) {
6605
6729
  !flushPartiallyCompletedSegment(
6606
6730
  clientRenderedBoundaries,
6607
6731
  boundary,
6608
- boundary$62,
6732
+ boundary$66,
6609
6733
  completedSegments[JSCompiler_inline_result]
6610
6734
  )
6611
6735
  ) {
@@ -6615,9 +6739,20 @@ function flushCompletedQueues(request, destination) {
6615
6739
  break a;
6616
6740
  }
6617
6741
  completedSegments.splice(0, JSCompiler_inline_result);
6742
+ var row = boundary$66.row;
6743
+ null !== row &&
6744
+ row.together &&
6745
+ 1 === boundary$66.pendingTasks &&
6746
+ (1 === row.pendingTasks
6747
+ ? unblockSuspenseListRow(
6748
+ clientRenderedBoundaries,
6749
+ row,
6750
+ row.hoistables
6751
+ )
6752
+ : row.pendingTasks--);
6618
6753
  JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(
6619
6754
  boundary,
6620
- boundary$62.contentState,
6755
+ boundary$66.contentState,
6621
6756
  clientRenderedBoundaries.renderState
6622
6757
  );
6623
6758
  }
@@ -6723,17 +6858,29 @@ function abort(request, reason) {
6723
6858
  }
6724
6859
  null !== request.destination &&
6725
6860
  flushCompletedQueues(request, request.destination);
6726
- } catch (error$64) {
6727
- logRecoverableError(request, error$64, {}), fatalError(request, error$64);
6861
+ } catch (error$68) {
6862
+ logRecoverableError(request, error$68, {}), fatalError(request, error$68);
6863
+ }
6864
+ }
6865
+ function addToReplayParent(node, parentKeyPath, trackedPostpones) {
6866
+ if (null === parentKeyPath) trackedPostpones.rootNodes.push(node);
6867
+ else {
6868
+ var workingMap = trackedPostpones.workingMap,
6869
+ parentNode = workingMap.get(parentKeyPath);
6870
+ void 0 === parentNode &&
6871
+ ((parentNode = [parentKeyPath[1], parentKeyPath[2], [], null]),
6872
+ workingMap.set(parentKeyPath, parentNode),
6873
+ addToReplayParent(parentNode, parentKeyPath[0], trackedPostpones));
6874
+ parentNode[2].push(node);
6728
6875
  }
6729
6876
  }
6730
6877
  function ensureCorrectIsomorphicReactVersion() {
6731
6878
  var isomorphicReactPackageVersion = React.version;
6732
- if ("19.2.0-canary-c4676e72-20250520" !== isomorphicReactPackageVersion)
6879
+ if ("19.2.0-canary-8ce15b0f-20250522" !== isomorphicReactPackageVersion)
6733
6880
  throw Error(
6734
6881
  'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
6735
6882
  (isomorphicReactPackageVersion +
6736
- "\n - react-dom: 19.2.0-canary-c4676e72-20250520\nLearn more: https://react.dev/warnings/version-mismatch")
6883
+ "\n - react-dom: 19.2.0-canary-8ce15b0f-20250522\nLearn more: https://react.dev/warnings/version-mismatch")
6737
6884
  );
6738
6885
  }
6739
6886
  ensureCorrectIsomorphicReactVersion();
@@ -6879,4 +7026,4 @@ exports.renderToReadableStream = function (children, options) {
6879
7026
  startWork(request);
6880
7027
  });
6881
7028
  };
6882
- exports.version = "19.2.0-canary-c4676e72-20250520";
7029
+ exports.version = "19.2.0-canary-8ce15b0f-20250522";