react-dom 19.2.0-canary-8bb7241f-20250926 → 19.2.0-canary-d15d7fd7-20250929

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.
@@ -5100,6 +5100,28 @@ function mountEffect(create, deps) {
5100
5100
  function updateEffect(create, deps) {
5101
5101
  updateEffectImpl(2048, 8, create, deps);
5102
5102
  }
5103
+ function useEffectEventImpl(payload) {
5104
+ currentlyRenderingFiber.flags |= 4;
5105
+ var componentUpdateQueue = currentlyRenderingFiber.updateQueue;
5106
+ if (null === componentUpdateQueue)
5107
+ (componentUpdateQueue = createFunctionComponentUpdateQueue()),
5108
+ (currentlyRenderingFiber.updateQueue = componentUpdateQueue),
5109
+ (componentUpdateQueue.events = [payload]);
5110
+ else {
5111
+ var events = componentUpdateQueue.events;
5112
+ null === events
5113
+ ? (componentUpdateQueue.events = [payload])
5114
+ : events.push(payload);
5115
+ }
5116
+ }
5117
+ function updateEvent(callback) {
5118
+ var ref = updateWorkInProgressHook().memoizedState;
5119
+ useEffectEventImpl({ ref: ref, nextImpl: callback });
5120
+ return function () {
5121
+ if (0 !== (executionContext & 2)) throw Error(formatProdErrorMessage(440));
5122
+ return ref.impl.apply(void 0, arguments);
5123
+ };
5124
+ }
5103
5125
  function updateInsertionEffect(create, deps) {
5104
5126
  return updateEffectImpl(4, 2, create, deps);
5105
5127
  }
@@ -5438,31 +5460,32 @@ function entangleTransitionUpdate(root, queue, lane) {
5438
5460
  }
5439
5461
  }
5440
5462
  var ContextOnlyDispatcher = {
5441
- readContext: readContext,
5442
- use: use,
5443
- useCallback: throwInvalidHookError,
5444
- useContext: throwInvalidHookError,
5445
- useEffect: throwInvalidHookError,
5446
- useImperativeHandle: throwInvalidHookError,
5447
- useLayoutEffect: throwInvalidHookError,
5448
- useInsertionEffect: throwInvalidHookError,
5449
- useMemo: throwInvalidHookError,
5450
- useReducer: throwInvalidHookError,
5451
- useRef: throwInvalidHookError,
5452
- useState: throwInvalidHookError,
5453
- useDebugValue: throwInvalidHookError,
5454
- useDeferredValue: throwInvalidHookError,
5455
- useTransition: throwInvalidHookError,
5456
- useSyncExternalStore: throwInvalidHookError,
5457
- useId: throwInvalidHookError,
5458
- useHostTransitionStatus: throwInvalidHookError,
5459
- useFormState: throwInvalidHookError,
5460
- useActionState: throwInvalidHookError,
5461
- useOptimistic: throwInvalidHookError,
5462
- useMemoCache: throwInvalidHookError,
5463
- useCacheRefresh: throwInvalidHookError
5464
- },
5465
- HooksDispatcherOnMount = {
5463
+ readContext: readContext,
5464
+ use: use,
5465
+ useCallback: throwInvalidHookError,
5466
+ useContext: throwInvalidHookError,
5467
+ useEffect: throwInvalidHookError,
5468
+ useImperativeHandle: throwInvalidHookError,
5469
+ useLayoutEffect: throwInvalidHookError,
5470
+ useInsertionEffect: throwInvalidHookError,
5471
+ useMemo: throwInvalidHookError,
5472
+ useReducer: throwInvalidHookError,
5473
+ useRef: throwInvalidHookError,
5474
+ useState: throwInvalidHookError,
5475
+ useDebugValue: throwInvalidHookError,
5476
+ useDeferredValue: throwInvalidHookError,
5477
+ useTransition: throwInvalidHookError,
5478
+ useSyncExternalStore: throwInvalidHookError,
5479
+ useId: throwInvalidHookError,
5480
+ useHostTransitionStatus: throwInvalidHookError,
5481
+ useFormState: throwInvalidHookError,
5482
+ useActionState: throwInvalidHookError,
5483
+ useOptimistic: throwInvalidHookError,
5484
+ useMemoCache: throwInvalidHookError,
5485
+ useCacheRefresh: throwInvalidHookError
5486
+ };
5487
+ ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;
5488
+ var HooksDispatcherOnMount = {
5466
5489
  readContext: readContext,
5467
5490
  use: use,
5468
5491
  useCallback: function (callback, deps) {
@@ -5652,6 +5675,16 @@ var ContextOnlyDispatcher = {
5652
5675
  null,
5653
5676
  currentlyRenderingFiber
5654
5677
  ));
5678
+ },
5679
+ useEffectEvent: function (callback) {
5680
+ var hook = mountWorkInProgressHook(),
5681
+ ref = { impl: callback };
5682
+ hook.memoizedState = ref;
5683
+ return function () {
5684
+ if (0 !== (executionContext & 2))
5685
+ throw Error(formatProdErrorMessage(440));
5686
+ return ref.impl.apply(void 0, arguments);
5687
+ };
5655
5688
  }
5656
5689
  },
5657
5690
  HooksDispatcherOnUpdate = {
@@ -5700,59 +5733,61 @@ var ContextOnlyDispatcher = {
5700
5733
  },
5701
5734
  useMemoCache: useMemoCache,
5702
5735
  useCacheRefresh: updateRefresh
5703
- },
5704
- HooksDispatcherOnRerender = {
5705
- readContext: readContext,
5706
- use: use,
5707
- useCallback: updateCallback,
5708
- useContext: readContext,
5709
- useEffect: updateEffect,
5710
- useImperativeHandle: updateImperativeHandle,
5711
- useInsertionEffect: updateInsertionEffect,
5712
- useLayoutEffect: updateLayoutEffect,
5713
- useMemo: updateMemo,
5714
- useReducer: rerenderReducer,
5715
- useRef: updateRef,
5716
- useState: function () {
5717
- return rerenderReducer(basicStateReducer);
5718
- },
5719
- useDebugValue: mountDebugValue,
5720
- useDeferredValue: function (value, initialValue) {
5721
- var hook = updateWorkInProgressHook();
5722
- return null === currentHook
5723
- ? mountDeferredValueImpl(hook, value, initialValue)
5724
- : updateDeferredValueImpl(
5725
- hook,
5726
- currentHook.memoizedState,
5727
- value,
5728
- initialValue
5729
- );
5730
- },
5731
- useTransition: function () {
5732
- var booleanOrThenable = rerenderReducer(basicStateReducer)[0],
5733
- start = updateWorkInProgressHook().memoizedState;
5734
- return [
5735
- "boolean" === typeof booleanOrThenable
5736
- ? booleanOrThenable
5737
- : useThenable(booleanOrThenable),
5738
- start
5739
- ];
5740
- },
5741
- useSyncExternalStore: updateSyncExternalStore,
5742
- useId: updateId,
5743
- useHostTransitionStatus: useHostTransitionStatus,
5744
- useFormState: rerenderActionState,
5745
- useActionState: rerenderActionState,
5746
- useOptimistic: function (passthrough, reducer) {
5747
- var hook = updateWorkInProgressHook();
5748
- if (null !== currentHook)
5749
- return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
5750
- hook.baseState = passthrough;
5751
- return [passthrough, hook.queue.dispatch];
5752
- },
5753
- useMemoCache: useMemoCache,
5754
- useCacheRefresh: updateRefresh
5755
5736
  };
5737
+ HooksDispatcherOnUpdate.useEffectEvent = updateEvent;
5738
+ var HooksDispatcherOnRerender = {
5739
+ readContext: readContext,
5740
+ use: use,
5741
+ useCallback: updateCallback,
5742
+ useContext: readContext,
5743
+ useEffect: updateEffect,
5744
+ useImperativeHandle: updateImperativeHandle,
5745
+ useInsertionEffect: updateInsertionEffect,
5746
+ useLayoutEffect: updateLayoutEffect,
5747
+ useMemo: updateMemo,
5748
+ useReducer: rerenderReducer,
5749
+ useRef: updateRef,
5750
+ useState: function () {
5751
+ return rerenderReducer(basicStateReducer);
5752
+ },
5753
+ useDebugValue: mountDebugValue,
5754
+ useDeferredValue: function (value, initialValue) {
5755
+ var hook = updateWorkInProgressHook();
5756
+ return null === currentHook
5757
+ ? mountDeferredValueImpl(hook, value, initialValue)
5758
+ : updateDeferredValueImpl(
5759
+ hook,
5760
+ currentHook.memoizedState,
5761
+ value,
5762
+ initialValue
5763
+ );
5764
+ },
5765
+ useTransition: function () {
5766
+ var booleanOrThenable = rerenderReducer(basicStateReducer)[0],
5767
+ start = updateWorkInProgressHook().memoizedState;
5768
+ return [
5769
+ "boolean" === typeof booleanOrThenable
5770
+ ? booleanOrThenable
5771
+ : useThenable(booleanOrThenable),
5772
+ start
5773
+ ];
5774
+ },
5775
+ useSyncExternalStore: updateSyncExternalStore,
5776
+ useId: updateId,
5777
+ useHostTransitionStatus: useHostTransitionStatus,
5778
+ useFormState: rerenderActionState,
5779
+ useActionState: rerenderActionState,
5780
+ useOptimistic: function (passthrough, reducer) {
5781
+ var hook = updateWorkInProgressHook();
5782
+ if (null !== currentHook)
5783
+ return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
5784
+ hook.baseState = passthrough;
5785
+ return [passthrough, hook.queue.dispatch];
5786
+ },
5787
+ useMemoCache: useMemoCache,
5788
+ useCacheRefresh: updateRefresh
5789
+ };
5790
+ HooksDispatcherOnRerender.useEffectEvent = updateEvent;
5756
5791
  function applyDerivedStateFromProps(
5757
5792
  workInProgress,
5758
5793
  ctor,
@@ -8875,7 +8910,7 @@ function commitBeforeMutationEffects(root, firstChild) {
8875
8910
  if (
8876
8911
  ((firstChild = nextEffect),
8877
8912
  (root = firstChild.child),
8878
- 0 !== (firstChild.subtreeFlags & 1024) && null !== root)
8913
+ 0 !== (firstChild.subtreeFlags & 1028) && null !== root)
8879
8914
  )
8880
8915
  (root.return = firstChild), (nextEffect = root);
8881
8916
  else
@@ -8885,6 +8920,19 @@ function commitBeforeMutationEffects(root, firstChild) {
8885
8920
  root = firstChild.flags;
8886
8921
  switch (firstChild.tag) {
8887
8922
  case 0:
8923
+ if (
8924
+ 0 !== (root & 4) &&
8925
+ ((root = firstChild.updateQueue),
8926
+ (root = null !== root ? root.events : null),
8927
+ null !== root)
8928
+ )
8929
+ for (
8930
+ JSCompiler_temp = 0;
8931
+ JSCompiler_temp < root.length;
8932
+ JSCompiler_temp++
8933
+ )
8934
+ (anchorOffset = root[JSCompiler_temp]),
8935
+ (anchorOffset.ref.impl = anchorOffset.nextImpl);
8888
8936
  break;
8889
8937
  case 11:
8890
8938
  case 15:
@@ -12150,20 +12198,20 @@ function extractEvents$1(
12150
12198
  }
12151
12199
  }
12152
12200
  for (
12153
- var i$jscomp$inline_1570 = 0;
12154
- i$jscomp$inline_1570 < simpleEventPluginEvents.length;
12155
- i$jscomp$inline_1570++
12201
+ var i$jscomp$inline_1576 = 0;
12202
+ i$jscomp$inline_1576 < simpleEventPluginEvents.length;
12203
+ i$jscomp$inline_1576++
12156
12204
  ) {
12157
- var eventName$jscomp$inline_1571 =
12158
- simpleEventPluginEvents[i$jscomp$inline_1570],
12159
- domEventName$jscomp$inline_1572 =
12160
- eventName$jscomp$inline_1571.toLowerCase(),
12161
- capitalizedEvent$jscomp$inline_1573 =
12162
- eventName$jscomp$inline_1571[0].toUpperCase() +
12163
- eventName$jscomp$inline_1571.slice(1);
12205
+ var eventName$jscomp$inline_1577 =
12206
+ simpleEventPluginEvents[i$jscomp$inline_1576],
12207
+ domEventName$jscomp$inline_1578 =
12208
+ eventName$jscomp$inline_1577.toLowerCase(),
12209
+ capitalizedEvent$jscomp$inline_1579 =
12210
+ eventName$jscomp$inline_1577[0].toUpperCase() +
12211
+ eventName$jscomp$inline_1577.slice(1);
12164
12212
  registerSimpleEvent(
12165
- domEventName$jscomp$inline_1572,
12166
- "on" + capitalizedEvent$jscomp$inline_1573
12213
+ domEventName$jscomp$inline_1578,
12214
+ "on" + capitalizedEvent$jscomp$inline_1579
12167
12215
  );
12168
12216
  }
12169
12217
  registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
@@ -15862,16 +15910,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
15862
15910
  0 === i && attemptExplicitHydrationTarget(target);
15863
15911
  }
15864
15912
  };
15865
- var isomorphicReactPackageVersion$jscomp$inline_1833 = React.version;
15913
+ var isomorphicReactPackageVersion$jscomp$inline_1839 = React.version;
15866
15914
  if (
15867
- "19.2.0-canary-8bb7241f-20250926" !==
15868
- isomorphicReactPackageVersion$jscomp$inline_1833
15915
+ "19.2.0-canary-d15d7fd7-20250929" !==
15916
+ isomorphicReactPackageVersion$jscomp$inline_1839
15869
15917
  )
15870
15918
  throw Error(
15871
15919
  formatProdErrorMessage(
15872
15920
  527,
15873
- isomorphicReactPackageVersion$jscomp$inline_1833,
15874
- "19.2.0-canary-8bb7241f-20250926"
15921
+ isomorphicReactPackageVersion$jscomp$inline_1839,
15922
+ "19.2.0-canary-d15d7fd7-20250929"
15875
15923
  )
15876
15924
  );
15877
15925
  ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -15891,24 +15939,24 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
15891
15939
  null === componentOrElement ? null : componentOrElement.stateNode;
15892
15940
  return componentOrElement;
15893
15941
  };
15894
- var internals$jscomp$inline_2336 = {
15942
+ var internals$jscomp$inline_2346 = {
15895
15943
  bundleType: 0,
15896
- version: "19.2.0-canary-8bb7241f-20250926",
15944
+ version: "19.2.0-canary-d15d7fd7-20250929",
15897
15945
  rendererPackageName: "react-dom",
15898
15946
  currentDispatcherRef: ReactSharedInternals,
15899
- reconcilerVersion: "19.2.0-canary-8bb7241f-20250926"
15947
+ reconcilerVersion: "19.2.0-canary-d15d7fd7-20250929"
15900
15948
  };
15901
15949
  if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
15902
- var hook$jscomp$inline_2337 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
15950
+ var hook$jscomp$inline_2347 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
15903
15951
  if (
15904
- !hook$jscomp$inline_2337.isDisabled &&
15905
- hook$jscomp$inline_2337.supportsFiber
15952
+ !hook$jscomp$inline_2347.isDisabled &&
15953
+ hook$jscomp$inline_2347.supportsFiber
15906
15954
  )
15907
15955
  try {
15908
- (rendererID = hook$jscomp$inline_2337.inject(
15909
- internals$jscomp$inline_2336
15956
+ (rendererID = hook$jscomp$inline_2347.inject(
15957
+ internals$jscomp$inline_2346
15910
15958
  )),
15911
- (injectedHook = hook$jscomp$inline_2337);
15959
+ (injectedHook = hook$jscomp$inline_2347);
15912
15960
  } catch (err) {}
15913
15961
  }
15914
15962
  exports.createRoot = function (container, options) {
@@ -15994,4 +16042,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
15994
16042
  listenToAllSupportedEvents(container);
15995
16043
  return new ReactDOMHydrationRoot(initialChildren);
15996
16044
  };
15997
- exports.version = "19.2.0-canary-8bb7241f-20250926";
16045
+ exports.version = "19.2.0-canary-d15d7fd7-20250929";