react 19.1.1 → 19.2.0

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.
@@ -57,6 +57,7 @@
57
57
  this.refs = emptyObject;
58
58
  this.updater = updater || ReactNoopUpdateQueue;
59
59
  }
60
+ function noop() {}
60
61
  function testStringCoercion(value) {
61
62
  return "" + value;
62
63
  }
@@ -116,7 +117,7 @@
116
117
  case REACT_PORTAL_TYPE:
117
118
  return "Portal";
118
119
  case REACT_CONTEXT_TYPE:
119
- return (type.displayName || "Context") + ".Provider";
120
+ return type.displayName || "Context";
120
121
  case REACT_CONSUMER_TYPE:
121
122
  return (type._context.displayName || "Context") + ".Consumer";
122
123
  case REACT_FORWARD_REF_TYPE:
@@ -196,17 +197,8 @@
196
197
  componentName = this.props.ref;
197
198
  return void 0 !== componentName ? componentName : null;
198
199
  }
199
- function ReactElement(
200
- type,
201
- key,
202
- self,
203
- source,
204
- owner,
205
- props,
206
- debugStack,
207
- debugTask
208
- ) {
209
- self = props.ref;
200
+ function ReactElement(type, key, props, owner, debugStack, debugTask) {
201
+ var refProp = props.ref;
210
202
  type = {
211
203
  $$typeof: REACT_ELEMENT_TYPE,
212
204
  type: type,
@@ -214,7 +206,7 @@
214
206
  props: props,
215
207
  _owner: owner
216
208
  };
217
- null !== (void 0 !== self ? self : null)
209
+ null !== (void 0 !== refProp ? refProp : null)
218
210
  ? Object.defineProperty(type, "ref", {
219
211
  enumerable: !1,
220
212
  get: elementRefGetterWithDeprecationWarning
@@ -252,10 +244,8 @@
252
244
  newKey = ReactElement(
253
245
  oldElement.type,
254
246
  newKey,
255
- void 0,
256
- void 0,
257
- oldElement._owner,
258
247
  oldElement.props,
248
+ oldElement._owner,
259
249
  oldElement._debugStack,
260
250
  oldElement._debugTask
261
251
  );
@@ -263,6 +253,18 @@
263
253
  (newKey._store.validated = oldElement._store.validated);
264
254
  return newKey;
265
255
  }
256
+ function validateChildKeys(node) {
257
+ isValidElement(node)
258
+ ? node._store && (node._store.validated = 1)
259
+ : "object" === typeof node &&
260
+ null !== node &&
261
+ node.$$typeof === REACT_LAZY_TYPE &&
262
+ ("fulfilled" === node._payload.status
263
+ ? isValidElement(node._payload.value) &&
264
+ node._payload.value._store &&
265
+ (node._payload.value._store.validated = 1)
266
+ : node._store && (node._store.validated = 1));
267
+ }
266
268
  function isValidElement(object) {
267
269
  return (
268
270
  "object" === typeof object &&
@@ -286,7 +288,6 @@
286
288
  ? (checkKeyStringCoercion(element.key), escape("" + element.key))
287
289
  : index.toString(36);
288
290
  }
289
- function noop$1() {}
290
291
  function resolveThenable(thenable) {
291
292
  switch (thenable.status) {
292
293
  case "fulfilled":
@@ -296,7 +297,7 @@
296
297
  default:
297
298
  switch (
298
299
  ("string" === typeof thenable.status
299
- ? thenable.then(noop$1, noop$1)
300
+ ? thenable.then(noop, noop)
300
301
  : ((thenable.status = "pending"),
301
302
  thenable.then(
302
303
  function (fulfilledValue) {
@@ -458,35 +459,56 @@
458
459
  }
459
460
  function lazyInitializer(payload) {
460
461
  if (-1 === payload._status) {
461
- var ctor = payload._result;
462
- ctor = ctor();
463
- ctor.then(
462
+ var ioInfo = payload._ioInfo;
463
+ null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());
464
+ ioInfo = payload._result;
465
+ var thenable = ioInfo();
466
+ thenable.then(
464
467
  function (moduleObject) {
465
- if (0 === payload._status || -1 === payload._status)
466
- (payload._status = 1), (payload._result = moduleObject);
468
+ if (0 === payload._status || -1 === payload._status) {
469
+ payload._status = 1;
470
+ payload._result = moduleObject;
471
+ var _ioInfo = payload._ioInfo;
472
+ null != _ioInfo && (_ioInfo.end = performance.now());
473
+ void 0 === thenable.status &&
474
+ ((thenable.status = "fulfilled"),
475
+ (thenable.value = moduleObject));
476
+ }
467
477
  },
468
478
  function (error) {
469
- if (0 === payload._status || -1 === payload._status)
470
- (payload._status = 2), (payload._result = error);
479
+ if (0 === payload._status || -1 === payload._status) {
480
+ payload._status = 2;
481
+ payload._result = error;
482
+ var _ioInfo2 = payload._ioInfo;
483
+ null != _ioInfo2 && (_ioInfo2.end = performance.now());
484
+ void 0 === thenable.status &&
485
+ ((thenable.status = "rejected"), (thenable.reason = error));
486
+ }
471
487
  }
472
488
  );
489
+ ioInfo = payload._ioInfo;
490
+ if (null != ioInfo) {
491
+ ioInfo.value = thenable;
492
+ var displayName = thenable.displayName;
493
+ "string" === typeof displayName && (ioInfo.name = displayName);
494
+ }
473
495
  -1 === payload._status &&
474
- ((payload._status = 0), (payload._result = ctor));
496
+ ((payload._status = 0), (payload._result = thenable));
475
497
  }
476
498
  if (1 === payload._status)
477
499
  return (
478
- (ctor = payload._result),
479
- void 0 === ctor &&
500
+ (ioInfo = payload._result),
501
+ void 0 === ioInfo &&
480
502
  console.error(
481
503
  "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",
482
- ctor
504
+ ioInfo
483
505
  ),
484
- "default" in ctor ||
506
+ "default" in ioInfo ||
485
507
  console.error(
486
508
  "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
487
- ctor
509
+ ioInfo
488
510
  ),
489
- ctor.default
511
+ ioInfo.default
490
512
  );
491
513
  throw payload._result;
492
514
  }
@@ -498,7 +520,9 @@
498
520
  );
499
521
  return dispatcher;
500
522
  }
501
- function noop() {}
523
+ function releaseAsyncTransition() {
524
+ ReactSharedInternals.asyncTransitions--;
525
+ }
502
526
  function enqueueTask(task) {
503
527
  if (null === enqueueTaskImpl)
504
528
  try {
@@ -590,9 +614,8 @@
590
614
  REACT_PORTAL_TYPE = Symbol.for("react.portal"),
591
615
  REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
592
616
  REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
593
- REACT_PROFILER_TYPE = Symbol.for("react.profiler");
594
- Symbol.for("react.provider");
595
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
617
+ REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
618
+ REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
596
619
  REACT_CONTEXT_TYPE = Symbol.for("react.context"),
597
620
  REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
598
621
  REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
@@ -635,16 +658,15 @@
635
658
  this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
636
659
  };
637
660
  var deprecatedAPIs = {
638
- isMounted: [
639
- "isMounted",
640
- "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
641
- ],
642
- replaceState: [
643
- "replaceState",
644
- "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
645
- ]
646
- },
647
- fnName;
661
+ isMounted: [
662
+ "isMounted",
663
+ "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
664
+ ],
665
+ replaceState: [
666
+ "replaceState",
667
+ "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
668
+ ]
669
+ };
648
670
  for (fnName in deprecatedAPIs)
649
671
  deprecatedAPIs.hasOwnProperty(fnName) &&
650
672
  defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
@@ -660,8 +682,8 @@
660
682
  A: null,
661
683
  T: null,
662
684
  S: null,
663
- V: null,
664
685
  actQueue: null,
686
+ asyncTransitions: 0,
665
687
  isBatchingLegacy: !1,
666
688
  didScheduleLegacyUpdate: !1,
667
689
  didUsePromise: !1,
@@ -737,7 +759,7 @@
737
759
  return resolveDispatcher().useMemoCache(size);
738
760
  }
739
761
  });
740
- exports.Children = {
762
+ var fnName = {
741
763
  map: mapChildren,
742
764
  forEach: function (children, forEachFunc, forEachContext) {
743
765
  mapChildren(
@@ -770,6 +792,8 @@
770
792
  return children;
771
793
  }
772
794
  };
795
+ exports.Activity = REACT_ACTIVITY_TYPE;
796
+ exports.Children = fnName;
773
797
  exports.Component = Component;
774
798
  exports.Fragment = REACT_FRAGMENT_TYPE;
775
799
  exports.Profiler = REACT_PROFILER_TYPE;
@@ -895,6 +919,9 @@
895
919
  return fn.apply(null, arguments);
896
920
  };
897
921
  };
922
+ exports.cacheSignal = function () {
923
+ return null;
924
+ };
898
925
  exports.captureOwnerStack = function () {
899
926
  var getCurrentStack = ReactSharedInternals.getCurrentStack;
900
927
  return null === getCurrentStack ? null : getCurrentStack();
@@ -947,16 +974,13 @@
947
974
  props = ReactElement(
948
975
  element.type,
949
976
  key,
950
- void 0,
951
- void 0,
952
- owner,
953
977
  props,
978
+ owner,
954
979
  element._debugStack,
955
980
  element._debugTask
956
981
  );
957
982
  for (key = 2; key < arguments.length; key++)
958
- (owner = arguments[key]),
959
- isValidElement(owner) && owner._store && (owner._store.validated = 1);
983
+ validateChildKeys(arguments[key]);
960
984
  return props;
961
985
  };
962
986
  exports.createContext = function (defaultValue) {
@@ -978,12 +1002,10 @@
978
1002
  return defaultValue;
979
1003
  };
980
1004
  exports.createElement = function (type, config, children) {
981
- for (var i = 2; i < arguments.length; i++) {
982
- var node = arguments[i];
983
- isValidElement(node) && node._store && (node._store.validated = 1);
984
- }
1005
+ for (var i = 2; i < arguments.length; i++)
1006
+ validateChildKeys(arguments[i]);
985
1007
  i = {};
986
- node = null;
1008
+ var key = null;
987
1009
  if (null != config)
988
1010
  for (propName in (didWarnAboutOldJSXRuntime ||
989
1011
  !("__self" in config) ||
@@ -993,7 +1015,7 @@
993
1015
  "Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform"
994
1016
  )),
995
1017
  hasValidKey(config) &&
996
- (checkKeyStringCoercion(config.key), (node = "" + config.key)),
1018
+ (checkKeyStringCoercion(config.key), (key = "" + config.key)),
997
1019
  config))
998
1020
  hasOwnProperty.call(config, propName) &&
999
1021
  "key" !== propName &&
@@ -1015,7 +1037,7 @@
1015
1037
  if (type && type.defaultProps)
1016
1038
  for (propName in ((childrenLength = type.defaultProps), childrenLength))
1017
1039
  void 0 === i[propName] && (i[propName] = childrenLength[propName]);
1018
- node &&
1040
+ key &&
1019
1041
  defineKeyPropWarningGetter(
1020
1042
  i,
1021
1043
  "function" === typeof type
@@ -1025,11 +1047,9 @@
1025
1047
  var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1026
1048
  return ReactElement(
1027
1049
  type,
1028
- node,
1029
- void 0,
1030
- void 0,
1031
- getOwner(),
1050
+ key,
1032
1051
  i,
1052
+ getOwner(),
1033
1053
  propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
1034
1054
  propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
1035
1055
  );
@@ -1082,11 +1102,24 @@
1082
1102
  };
1083
1103
  exports.isValidElement = isValidElement;
1084
1104
  exports.lazy = function (ctor) {
1085
- return {
1086
- $$typeof: REACT_LAZY_TYPE,
1087
- _payload: { _status: -1, _result: ctor },
1088
- _init: lazyInitializer
1089
- };
1105
+ ctor = { _status: -1, _result: ctor };
1106
+ var lazyType = {
1107
+ $$typeof: REACT_LAZY_TYPE,
1108
+ _payload: ctor,
1109
+ _init: lazyInitializer
1110
+ },
1111
+ ioInfo = {
1112
+ name: "lazy",
1113
+ start: -1,
1114
+ end: -1,
1115
+ value: null,
1116
+ owner: null,
1117
+ debugStack: Error("react-stack-top-frame"),
1118
+ debugTask: console.createTask ? console.createTask("lazy()") : null
1119
+ };
1120
+ ctor._ioInfo = ioInfo;
1121
+ lazyType._debugInfo = [{ awaited: ioInfo }];
1122
+ return lazyType;
1090
1123
  };
1091
1124
  exports.memo = function (type, compare) {
1092
1125
  null == type &&
@@ -1119,8 +1152,8 @@
1119
1152
  exports.startTransition = function (scope) {
1120
1153
  var prevTransition = ReactSharedInternals.T,
1121
1154
  currentTransition = {};
1122
- ReactSharedInternals.T = currentTransition;
1123
1155
  currentTransition._updatedFibers = new Set();
1156
+ ReactSharedInternals.T = currentTransition;
1124
1157
  try {
1125
1158
  var returnValue = scope(),
1126
1159
  onStartTransitionFinish = ReactSharedInternals.S;
@@ -1129,7 +1162,9 @@
1129
1162
  "object" === typeof returnValue &&
1130
1163
  null !== returnValue &&
1131
1164
  "function" === typeof returnValue.then &&
1132
- returnValue.then(noop, reportGlobalError);
1165
+ (ReactSharedInternals.asyncTransitions++,
1166
+ returnValue.then(releaseAsyncTransition, releaseAsyncTransition),
1167
+ returnValue.then(noop, reportGlobalError));
1133
1168
  } catch (error) {
1134
1169
  reportGlobalError(error);
1135
1170
  } finally {
@@ -1141,6 +1176,14 @@
1141
1176
  console.warn(
1142
1177
  "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
1143
1178
  )),
1179
+ null !== prevTransition &&
1180
+ null !== currentTransition.types &&
1181
+ (null !== prevTransition.types &&
1182
+ prevTransition.types !== currentTransition.types &&
1183
+ console.error(
1184
+ "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
1185
+ ),
1186
+ (prevTransition.types = currentTransition.types)),
1144
1187
  (ReactSharedInternals.T = prevTransition);
1145
1188
  }
1146
1189
  };
@@ -1174,17 +1217,15 @@
1174
1217
  exports.useDeferredValue = function (value, initialValue) {
1175
1218
  return resolveDispatcher().useDeferredValue(value, initialValue);
1176
1219
  };
1177
- exports.useEffect = function (create, createDeps, update) {
1220
+ exports.useEffect = function (create, deps) {
1178
1221
  null == create &&
1179
1222
  console.warn(
1180
1223
  "React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1181
1224
  );
1182
- var dispatcher = resolveDispatcher();
1183
- if ("function" === typeof update)
1184
- throw Error(
1185
- "useEffect CRUD overload is not enabled in this build of React."
1186
- );
1187
- return dispatcher.useEffect(create, createDeps);
1225
+ return resolveDispatcher().useEffect(create, deps);
1226
+ };
1227
+ exports.useEffectEvent = function (callback) {
1228
+ return resolveDispatcher().useEffectEvent(callback);
1188
1229
  };
1189
1230
  exports.useId = function () {
1190
1231
  return resolveDispatcher().useId();
@@ -1235,7 +1276,7 @@
1235
1276
  exports.useTransition = function () {
1236
1277
  return resolveDispatcher().useTransition();
1237
1278
  };
1238
- exports.version = "19.1.1";
1279
+ exports.version = "19.2.0";
1239
1280
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1240
1281
  "function" ===
1241
1282
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -20,6 +20,7 @@ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
20
20
  REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
21
21
  REACT_MEMO_TYPE = Symbol.for("react.memo"),
22
22
  REACT_LAZY_TYPE = Symbol.for("react.lazy"),
23
+ REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
23
24
  MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
24
25
  function getIteratorFn(maybeIterable) {
25
26
  if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
@@ -71,28 +72,22 @@ var pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());
71
72
  pureComponentPrototype.constructor = PureComponent;
72
73
  assign(pureComponentPrototype, Component.prototype);
73
74
  pureComponentPrototype.isPureReactComponent = !0;
74
- var isArrayImpl = Array.isArray,
75
- ReactSharedInternals = { H: null, A: null, T: null, S: null, V: null },
75
+ var isArrayImpl = Array.isArray;
76
+ function noop() {}
77
+ var ReactSharedInternals = { H: null, A: null, T: null, S: null },
76
78
  hasOwnProperty = Object.prototype.hasOwnProperty;
77
- function ReactElement(type, key, self, source, owner, props) {
78
- self = props.ref;
79
+ function ReactElement(type, key, props) {
80
+ var refProp = props.ref;
79
81
  return {
80
82
  $$typeof: REACT_ELEMENT_TYPE,
81
83
  type: type,
82
84
  key: key,
83
- ref: void 0 !== self ? self : null,
85
+ ref: void 0 !== refProp ? refProp : null,
84
86
  props: props
85
87
  };
86
88
  }
87
89
  function cloneAndReplaceKey(oldElement, newKey) {
88
- return ReactElement(
89
- oldElement.type,
90
- newKey,
91
- void 0,
92
- void 0,
93
- void 0,
94
- oldElement.props
95
- );
90
+ return ReactElement(oldElement.type, newKey, oldElement.props);
96
91
  }
97
92
  function isValidElement(object) {
98
93
  return (
@@ -116,7 +111,6 @@ function getElementKey(element, index) {
116
111
  ? escape("" + element.key)
117
112
  : index.toString(36);
118
113
  }
119
- function noop$1() {}
120
114
  function resolveThenable(thenable) {
121
115
  switch (thenable.status) {
122
116
  case "fulfilled":
@@ -126,7 +120,7 @@ function resolveThenable(thenable) {
126
120
  default:
127
121
  switch (
128
122
  ("string" === typeof thenable.status
129
- ? thenable.then(noop$1, noop$1)
123
+ ? thenable.then(noop, noop)
130
124
  : ((thenable.status = "pending"),
131
125
  thenable.then(
132
126
  function (fulfilledValue) {
@@ -287,68 +281,69 @@ function lazyInitializer(payload) {
287
281
  throw payload._result;
288
282
  }
289
283
  var reportGlobalError =
290
- "function" === typeof reportError
291
- ? reportError
292
- : function (error) {
293
- if (
294
- "object" === typeof window &&
295
- "function" === typeof window.ErrorEvent
296
- ) {
297
- var event = new window.ErrorEvent("error", {
298
- bubbles: !0,
299
- cancelable: !0,
300
- message:
301
- "object" === typeof error &&
302
- null !== error &&
303
- "string" === typeof error.message
304
- ? String(error.message)
305
- : String(error),
306
- error: error
307
- });
308
- if (!window.dispatchEvent(event)) return;
309
- } else if (
310
- "object" === typeof process &&
311
- "function" === typeof process.emit
312
- ) {
313
- process.emit("uncaughtException", error);
314
- return;
315
- }
316
- console.error(error);
317
- };
318
- function noop() {}
319
- exports.Children = {
320
- map: mapChildren,
321
- forEach: function (children, forEachFunc, forEachContext) {
322
- mapChildren(
323
- children,
324
- function () {
325
- forEachFunc.apply(this, arguments);
326
- },
327
- forEachContext
328
- );
329
- },
330
- count: function (children) {
331
- var n = 0;
332
- mapChildren(children, function () {
333
- n++;
334
- });
335
- return n;
336
- },
337
- toArray: function (children) {
338
- return (
339
- mapChildren(children, function (child) {
340
- return child;
341
- }) || []
342
- );
343
- },
344
- only: function (children) {
345
- if (!isValidElement(children))
346
- throw Error(
347
- "React.Children.only expected to receive a single React element child."
284
+ "function" === typeof reportError
285
+ ? reportError
286
+ : function (error) {
287
+ if (
288
+ "object" === typeof window &&
289
+ "function" === typeof window.ErrorEvent
290
+ ) {
291
+ var event = new window.ErrorEvent("error", {
292
+ bubbles: !0,
293
+ cancelable: !0,
294
+ message:
295
+ "object" === typeof error &&
296
+ null !== error &&
297
+ "string" === typeof error.message
298
+ ? String(error.message)
299
+ : String(error),
300
+ error: error
301
+ });
302
+ if (!window.dispatchEvent(event)) return;
303
+ } else if (
304
+ "object" === typeof process &&
305
+ "function" === typeof process.emit
306
+ ) {
307
+ process.emit("uncaughtException", error);
308
+ return;
309
+ }
310
+ console.error(error);
311
+ },
312
+ Children = {
313
+ map: mapChildren,
314
+ forEach: function (children, forEachFunc, forEachContext) {
315
+ mapChildren(
316
+ children,
317
+ function () {
318
+ forEachFunc.apply(this, arguments);
319
+ },
320
+ forEachContext
348
321
  );
349
- return children;
350
- }
351
- };
322
+ },
323
+ count: function (children) {
324
+ var n = 0;
325
+ mapChildren(children, function () {
326
+ n++;
327
+ });
328
+ return n;
329
+ },
330
+ toArray: function (children) {
331
+ return (
332
+ mapChildren(children, function (child) {
333
+ return child;
334
+ }) || []
335
+ );
336
+ },
337
+ only: function (children) {
338
+ if (!isValidElement(children))
339
+ throw Error(
340
+ "React.Children.only expected to receive a single React element child."
341
+ );
342
+ return children;
343
+ }
344
+ };
345
+ exports.Activity = REACT_ACTIVITY_TYPE;
346
+ exports.Children = Children;
352
347
  exports.Component = Component;
353
348
  exports.Fragment = REACT_FRAGMENT_TYPE;
354
349
  exports.Profiler = REACT_PROFILER_TYPE;
@@ -368,18 +363,18 @@ exports.cache = function (fn) {
368
363
  return fn.apply(null, arguments);
369
364
  };
370
365
  };
366
+ exports.cacheSignal = function () {
367
+ return null;
368
+ };
371
369
  exports.cloneElement = function (element, config, children) {
372
370
  if (null === element || void 0 === element)
373
371
  throw Error(
374
372
  "The argument must be a React element, but you passed " + element + "."
375
373
  );
376
374
  var props = assign({}, element.props),
377
- key = element.key,
378
- owner = void 0;
375
+ key = element.key;
379
376
  if (null != config)
380
- for (propName in (void 0 !== config.ref && (owner = void 0),
381
- void 0 !== config.key && (key = "" + config.key),
382
- config))
377
+ for (propName in (void 0 !== config.key && (key = "" + config.key), config))
383
378
  !hasOwnProperty.call(config, propName) ||
384
379
  "key" === propName ||
385
380
  "__self" === propName ||
@@ -393,7 +388,7 @@ exports.cloneElement = function (element, config, children) {
393
388
  childArray[i] = arguments[i + 2];
394
389
  props.children = childArray;
395
390
  }
396
- return ReactElement(element.type, key, void 0, void 0, owner, props);
391
+ return ReactElement(element.type, key, props);
397
392
  };
398
393
  exports.createContext = function (defaultValue) {
399
394
  defaultValue = {
@@ -433,7 +428,7 @@ exports.createElement = function (type, config, children) {
433
428
  for (propName in ((childrenLength = type.defaultProps), childrenLength))
434
429
  void 0 === props[propName] &&
435
430
  (props[propName] = childrenLength[propName]);
436
- return ReactElement(type, key, void 0, void 0, null, props);
431
+ return ReactElement(type, key, props);
437
432
  };
438
433
  exports.createRef = function () {
439
434
  return { current: null };
@@ -472,7 +467,10 @@ exports.startTransition = function (scope) {
472
467
  } catch (error) {
473
468
  reportGlobalError(error);
474
469
  } finally {
475
- ReactSharedInternals.T = prevTransition;
470
+ null !== prevTransition &&
471
+ null !== currentTransition.types &&
472
+ (prevTransition.types = currentTransition.types),
473
+ (ReactSharedInternals.T = prevTransition);
476
474
  }
477
475
  };
478
476
  exports.unstable_useCacheRefresh = function () {
@@ -494,13 +492,11 @@ exports.useDebugValue = function () {};
494
492
  exports.useDeferredValue = function (value, initialValue) {
495
493
  return ReactSharedInternals.H.useDeferredValue(value, initialValue);
496
494
  };
497
- exports.useEffect = function (create, createDeps, update) {
498
- var dispatcher = ReactSharedInternals.H;
499
- if ("function" === typeof update)
500
- throw Error(
501
- "useEffect CRUD overload is not enabled in this build of React."
502
- );
503
- return dispatcher.useEffect(create, createDeps);
495
+ exports.useEffect = function (create, deps) {
496
+ return ReactSharedInternals.H.useEffect(create, deps);
497
+ };
498
+ exports.useEffectEvent = function (callback) {
499
+ return ReactSharedInternals.H.useEffectEvent(callback);
504
500
  };
505
501
  exports.useId = function () {
506
502
  return ReactSharedInternals.H.useId();
@@ -543,4 +539,4 @@ exports.useSyncExternalStore = function (
543
539
  exports.useTransition = function () {
544
540
  return ReactSharedInternals.H.useTransition();
545
541
  };
546
- exports.version = "19.1.1";
542
+ exports.version = "19.2.0";