react 19.2.4 → 19.3.1

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.
@@ -31,6 +31,8 @@
31
31
  return "SuspenseList";
32
32
  case REACT_ACTIVITY_TYPE:
33
33
  return "Activity";
34
+ case REACT_VIEW_TRANSITION_TYPE:
35
+ return "ViewTransition";
34
36
  }
35
37
  if ("object" === typeof type)
36
38
  switch (
@@ -297,6 +299,7 @@
297
299
  REACT_MEMO_TYPE = Symbol.for("react.memo"),
298
300
  REACT_LAZY_TYPE = Symbol.for("react.lazy"),
299
301
  REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
302
+ REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"),
300
303
  REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
301
304
  ReactSharedInternals =
302
305
  React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
@@ -324,14 +327,18 @@
324
327
  exports.jsxDEV = function (type, config, maybeKey, isStaticChildren) {
325
328
  var trackActualOwner =
326
329
  1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
330
+ if (trackActualOwner) {
331
+ var previousStackTraceLimit = Error.stackTraceLimit;
332
+ Error.stackTraceLimit = 10;
333
+ var debugStackDEV = Error("react-stack-top-frame");
334
+ Error.stackTraceLimit = previousStackTraceLimit;
335
+ } else debugStackDEV = unknownOwnerDebugStack;
327
336
  return jsxDEVImpl(
328
337
  type,
329
338
  config,
330
339
  maybeKey,
331
340
  isStaticChildren,
332
- trackActualOwner
333
- ? Error("react-stack-top-frame")
334
- : unknownOwnerDebugStack,
341
+ debugStackDEV,
335
342
  trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
336
343
  );
337
344
  };
@@ -31,6 +31,8 @@
31
31
  return "SuspenseList";
32
32
  case REACT_ACTIVITY_TYPE:
33
33
  return "Activity";
34
+ case REACT_VIEW_TRANSITION_TYPE:
35
+ return "ViewTransition";
34
36
  }
35
37
  if ("object" === typeof type)
36
38
  switch (
@@ -297,6 +299,7 @@
297
299
  REACT_MEMO_TYPE = Symbol.for("react.memo"),
298
300
  REACT_LAZY_TYPE = Symbol.for("react.lazy"),
299
301
  REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
302
+ REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"),
300
303
  REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
301
304
  ReactSharedInternalsServer =
302
305
  React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
@@ -328,42 +331,54 @@
328
331
  exports.jsx = function (type, config, maybeKey) {
329
332
  var trackActualOwner =
330
333
  1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;
334
+ if (trackActualOwner) {
335
+ var previousStackTraceLimit = Error.stackTraceLimit;
336
+ Error.stackTraceLimit = 10;
337
+ var debugStackDEV = Error("react-stack-top-frame");
338
+ Error.stackTraceLimit = previousStackTraceLimit;
339
+ } else debugStackDEV = unknownOwnerDebugStack;
331
340
  return jsxDEVImpl(
332
341
  type,
333
342
  config,
334
343
  maybeKey,
335
344
  !1,
336
- trackActualOwner
337
- ? Error("react-stack-top-frame")
338
- : unknownOwnerDebugStack,
345
+ debugStackDEV,
339
346
  trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
340
347
  );
341
348
  };
342
349
  exports.jsxDEV = function (type, config, maybeKey, isStaticChildren) {
343
350
  var trackActualOwner =
344
351
  1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;
352
+ if (trackActualOwner) {
353
+ var previousStackTraceLimit = Error.stackTraceLimit;
354
+ Error.stackTraceLimit = 10;
355
+ var debugStackDEV = Error("react-stack-top-frame");
356
+ Error.stackTraceLimit = previousStackTraceLimit;
357
+ } else debugStackDEV = unknownOwnerDebugStack;
345
358
  return jsxDEVImpl(
346
359
  type,
347
360
  config,
348
361
  maybeKey,
349
362
  isStaticChildren,
350
- trackActualOwner
351
- ? Error("react-stack-top-frame")
352
- : unknownOwnerDebugStack,
363
+ debugStackDEV,
353
364
  trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
354
365
  );
355
366
  };
356
367
  exports.jsxs = function (type, config, maybeKey) {
357
368
  var trackActualOwner =
358
369
  1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;
370
+ if (trackActualOwner) {
371
+ var previousStackTraceLimit = Error.stackTraceLimit;
372
+ Error.stackTraceLimit = 10;
373
+ var debugStackDEV = Error("react-stack-top-frame");
374
+ Error.stackTraceLimit = previousStackTraceLimit;
375
+ } else debugStackDEV = unknownOwnerDebugStack;
359
376
  return jsxDEVImpl(
360
377
  type,
361
378
  config,
362
379
  maybeKey,
363
380
  !0,
364
- trackActualOwner
365
- ? Error("react-stack-top-frame")
366
- : unknownOwnerDebugStack,
381
+ debugStackDEV,
367
382
  trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
368
383
  );
369
384
  };
@@ -31,6 +31,8 @@
31
31
  return "SuspenseList";
32
32
  case REACT_ACTIVITY_TYPE:
33
33
  return "Activity";
34
+ case REACT_VIEW_TRANSITION_TYPE:
35
+ return "ViewTransition";
34
36
  }
35
37
  if ("object" === typeof type)
36
38
  switch (
@@ -297,6 +299,7 @@
297
299
  REACT_MEMO_TYPE = Symbol.for("react.memo"),
298
300
  REACT_LAZY_TYPE = Symbol.for("react.lazy"),
299
301
  REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
302
+ REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"),
300
303
  REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
301
304
  ReactSharedInternals =
302
305
  React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
@@ -324,28 +327,36 @@
324
327
  exports.jsx = function (type, config, maybeKey) {
325
328
  var trackActualOwner =
326
329
  1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
330
+ if (trackActualOwner) {
331
+ var previousStackTraceLimit = Error.stackTraceLimit;
332
+ Error.stackTraceLimit = 10;
333
+ var debugStackDEV = Error("react-stack-top-frame");
334
+ Error.stackTraceLimit = previousStackTraceLimit;
335
+ } else debugStackDEV = unknownOwnerDebugStack;
327
336
  return jsxDEVImpl(
328
337
  type,
329
338
  config,
330
339
  maybeKey,
331
340
  !1,
332
- trackActualOwner
333
- ? Error("react-stack-top-frame")
334
- : unknownOwnerDebugStack,
341
+ debugStackDEV,
335
342
  trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
336
343
  );
337
344
  };
338
345
  exports.jsxs = function (type, config, maybeKey) {
339
346
  var trackActualOwner =
340
347
  1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
348
+ if (trackActualOwner) {
349
+ var previousStackTraceLimit = Error.stackTraceLimit;
350
+ Error.stackTraceLimit = 10;
351
+ var debugStackDEV = Error("react-stack-top-frame");
352
+ Error.stackTraceLimit = previousStackTraceLimit;
353
+ } else debugStackDEV = unknownOwnerDebugStack;
341
354
  return jsxDEVImpl(
342
355
  type,
343
356
  config,
344
357
  maybeKey,
345
358
  !0,
346
- trackActualOwner
347
- ? Error("react-stack-top-frame")
348
- : unknownOwnerDebugStack,
359
+ debugStackDEV,
349
360
  trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
350
361
  );
351
362
  };
@@ -31,6 +31,8 @@
31
31
  return "SuspenseList";
32
32
  case REACT_ACTIVITY_TYPE:
33
33
  return "Activity";
34
+ case REACT_VIEW_TRANSITION_TYPE:
35
+ return "ViewTransition";
34
36
  }
35
37
  if ("object" === typeof type)
36
38
  switch (
@@ -297,6 +299,7 @@
297
299
  REACT_MEMO_TYPE = Symbol.for("react.memo"),
298
300
  REACT_LAZY_TYPE = Symbol.for("react.lazy"),
299
301
  REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
302
+ REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"),
300
303
  REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
301
304
  ReactSharedInternalsServer =
302
305
  React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
@@ -328,42 +331,54 @@
328
331
  exports.jsx = function (type, config, maybeKey) {
329
332
  var trackActualOwner =
330
333
  1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;
334
+ if (trackActualOwner) {
335
+ var previousStackTraceLimit = Error.stackTraceLimit;
336
+ Error.stackTraceLimit = 10;
337
+ var debugStackDEV = Error("react-stack-top-frame");
338
+ Error.stackTraceLimit = previousStackTraceLimit;
339
+ } else debugStackDEV = unknownOwnerDebugStack;
331
340
  return jsxDEVImpl(
332
341
  type,
333
342
  config,
334
343
  maybeKey,
335
344
  !1,
336
- trackActualOwner
337
- ? Error("react-stack-top-frame")
338
- : unknownOwnerDebugStack,
345
+ debugStackDEV,
339
346
  trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
340
347
  );
341
348
  };
342
349
  exports.jsxDEV = function (type, config, maybeKey, isStaticChildren) {
343
350
  var trackActualOwner =
344
351
  1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;
352
+ if (trackActualOwner) {
353
+ var previousStackTraceLimit = Error.stackTraceLimit;
354
+ Error.stackTraceLimit = 10;
355
+ var debugStackDEV = Error("react-stack-top-frame");
356
+ Error.stackTraceLimit = previousStackTraceLimit;
357
+ } else debugStackDEV = unknownOwnerDebugStack;
345
358
  return jsxDEVImpl(
346
359
  type,
347
360
  config,
348
361
  maybeKey,
349
362
  isStaticChildren,
350
- trackActualOwner
351
- ? Error("react-stack-top-frame")
352
- : unknownOwnerDebugStack,
363
+ debugStackDEV,
353
364
  trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
354
365
  );
355
366
  };
356
367
  exports.jsxs = function (type, config, maybeKey) {
357
368
  var trackActualOwner =
358
369
  1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;
370
+ if (trackActualOwner) {
371
+ var previousStackTraceLimit = Error.stackTraceLimit;
372
+ Error.stackTraceLimit = 10;
373
+ var debugStackDEV = Error("react-stack-top-frame");
374
+ Error.stackTraceLimit = previousStackTraceLimit;
375
+ } else debugStackDEV = unknownOwnerDebugStack;
359
376
  return jsxDEVImpl(
360
377
  type,
361
378
  config,
362
379
  maybeKey,
363
380
  !0,
364
- trackActualOwner
365
- ? Error("react-stack-top-frame")
366
- : unknownOwnerDebugStack,
381
+ debugStackDEV,
367
382
  trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
368
383
  );
369
384
  };
@@ -105,6 +105,8 @@
105
105
  return "SuspenseList";
106
106
  case REACT_ACTIVITY_TYPE:
107
107
  return "Activity";
108
+ case REACT_VIEW_TRANSITION_TYPE:
109
+ return "ViewTransition";
108
110
  }
109
111
  if ("object" === typeof type)
110
112
  switch (
@@ -459,8 +461,15 @@
459
461
  }
460
462
  function lazyInitializer(payload) {
461
463
  if (-1 === payload._status) {
462
- var ioInfo = payload._ioInfo;
463
- null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());
464
+ var resolveDebugValue = null,
465
+ rejectDebugValue = null,
466
+ ioInfo = payload._ioInfo;
467
+ null != ioInfo &&
468
+ ((ioInfo.start = ioInfo.end = performance.now()),
469
+ (ioInfo.value = new Promise(function (resolve, reject) {
470
+ resolveDebugValue = resolve;
471
+ rejectDebugValue = reject;
472
+ })));
464
473
  ioInfo = payload._result;
465
474
  var thenable = ioInfo();
466
475
  thenable.then(
@@ -469,7 +478,14 @@
469
478
  payload._status = 1;
470
479
  payload._result = moduleObject;
471
480
  var _ioInfo = payload._ioInfo;
472
- null != _ioInfo && (_ioInfo.end = performance.now());
481
+ if (null != _ioInfo) {
482
+ _ioInfo.end = performance.now();
483
+ var debugValue =
484
+ null == moduleObject ? void 0 : moduleObject.default;
485
+ resolveDebugValue(debugValue);
486
+ _ioInfo.value.status = "fulfilled";
487
+ _ioInfo.value.value = debugValue;
488
+ }
473
489
  void 0 === thenable.status &&
474
490
  ((thenable.status = "fulfilled"),
475
491
  (thenable.value = moduleObject));
@@ -480,7 +496,12 @@
480
496
  payload._status = 2;
481
497
  payload._result = error;
482
498
  var _ioInfo2 = payload._ioInfo;
483
- null != _ioInfo2 && (_ioInfo2.end = performance.now());
499
+ null != _ioInfo2 &&
500
+ ((_ioInfo2.end = performance.now()),
501
+ _ioInfo2.value.then(noop, noop),
502
+ rejectDebugValue(error),
503
+ (_ioInfo2.value.status = "rejected"),
504
+ (_ioInfo2.value.reason = error));
484
505
  void 0 === thenable.status &&
485
506
  ((thenable.status = "rejected"), (thenable.reason = error));
486
507
  }
@@ -488,7 +509,6 @@
488
509
  );
489
510
  ioInfo = payload._ioInfo;
490
511
  if (null != ioInfo) {
491
- ioInfo.value = thenable;
492
512
  var displayName = thenable.displayName;
493
513
  "string" === typeof displayName && (ioInfo.name = displayName);
494
514
  }
@@ -523,6 +543,60 @@
523
543
  function releaseAsyncTransition() {
524
544
  ReactSharedInternals.asyncTransitions--;
525
545
  }
546
+ function startTransition(scope) {
547
+ var prevTransition = ReactSharedInternals.T,
548
+ currentTransition = {};
549
+ currentTransition.types =
550
+ null !== prevTransition ? prevTransition.types : null;
551
+ currentTransition._updatedFibers = new Set();
552
+ ReactSharedInternals.T = currentTransition;
553
+ try {
554
+ var returnValue = scope(),
555
+ onStartTransitionFinish = ReactSharedInternals.S;
556
+ null !== onStartTransitionFinish &&
557
+ onStartTransitionFinish(currentTransition, returnValue);
558
+ "object" === typeof returnValue &&
559
+ null !== returnValue &&
560
+ "function" === typeof returnValue.then &&
561
+ (ReactSharedInternals.asyncTransitions++,
562
+ returnValue.then(releaseAsyncTransition, releaseAsyncTransition),
563
+ returnValue.then(noop, reportGlobalError));
564
+ } catch (error) {
565
+ reportGlobalError(error);
566
+ } finally {
567
+ null === prevTransition &&
568
+ currentTransition._updatedFibers &&
569
+ ((scope = currentTransition._updatedFibers.size),
570
+ currentTransition._updatedFibers.clear(),
571
+ 10 < scope &&
572
+ console.warn(
573
+ "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."
574
+ )),
575
+ null !== prevTransition &&
576
+ null !== currentTransition.types &&
577
+ (null !== prevTransition.types &&
578
+ prevTransition.types !== currentTransition.types &&
579
+ console.error(
580
+ "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."
581
+ ),
582
+ (prevTransition.types = currentTransition.types)),
583
+ (ReactSharedInternals.T = prevTransition);
584
+ }
585
+ }
586
+ function addTransitionType(type) {
587
+ var transition = ReactSharedInternals.T;
588
+ if (null !== transition) {
589
+ var transitionTypes = transition.types;
590
+ null === transitionTypes
591
+ ? (transition.types = [type])
592
+ : -1 === transitionTypes.indexOf(type) && transitionTypes.push(type);
593
+ } else
594
+ 0 === ReactSharedInternals.asyncTransitions &&
595
+ console.error(
596
+ "addTransitionType can only be called inside a `startTransition()` callback. It must be associated with a specific Transition."
597
+ ),
598
+ startTransition(addTransitionType.bind(null, type));
599
+ }
526
600
  function enqueueTask(task) {
527
601
  if (null === enqueueTaskImpl)
528
602
  try {
@@ -623,6 +697,7 @@
623
697
  REACT_MEMO_TYPE = Symbol.for("react.memo"),
624
698
  REACT_LAZY_TYPE = Symbol.for("react.lazy"),
625
699
  REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
700
+ REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"),
626
701
  MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
627
702
  didWarnStateUpdateForUnmountedComponent = {},
628
703
  ReactNoopUpdateQueue = {
@@ -800,6 +875,7 @@
800
875
  exports.PureComponent = PureComponent;
801
876
  exports.StrictMode = REACT_STRICT_MODE_TYPE;
802
877
  exports.Suspense = REACT_SUSPENSE_TYPE;
878
+ exports.ViewTransition = REACT_VIEW_TRANSITION_TYPE;
803
879
  exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
804
880
  ReactSharedInternals;
805
881
  exports.__COMPILER_RUNTIME = deprecatedAPIs;
@@ -914,6 +990,7 @@
914
990
  }
915
991
  };
916
992
  };
993
+ exports.addTransitionType = addTransitionType;
917
994
  exports.cache = function (fn) {
918
995
  return function () {
919
996
  return fn.apply(null, arguments);
@@ -1004,6 +1081,7 @@
1004
1081
  exports.createElement = function (type, config, children) {
1005
1082
  for (var i = 2; i < arguments.length; i++)
1006
1083
  validateChildKeys(arguments[i]);
1084
+ var propName;
1007
1085
  i = {};
1008
1086
  var key = null;
1009
1087
  if (null != config)
@@ -1044,13 +1122,18 @@
1044
1122
  ? type.displayName || type.name || "Unknown"
1045
1123
  : type
1046
1124
  );
1047
- var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1125
+ (propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++)
1126
+ ? ((childArray = Error.stackTraceLimit),
1127
+ (Error.stackTraceLimit = 10),
1128
+ (childrenLength = Error("react-stack-top-frame")),
1129
+ (Error.stackTraceLimit = childArray))
1130
+ : (childrenLength = unknownOwnerDebugStack);
1048
1131
  return ReactElement(
1049
1132
  type,
1050
1133
  key,
1051
1134
  i,
1052
1135
  getOwner(),
1053
- propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
1136
+ childrenLength,
1054
1137
  propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
1055
1138
  );
1056
1139
  };
@@ -1149,44 +1232,7 @@
1149
1232
  });
1150
1233
  return compare;
1151
1234
  };
1152
- exports.startTransition = function (scope) {
1153
- var prevTransition = ReactSharedInternals.T,
1154
- currentTransition = {};
1155
- currentTransition._updatedFibers = new Set();
1156
- ReactSharedInternals.T = currentTransition;
1157
- try {
1158
- var returnValue = scope(),
1159
- onStartTransitionFinish = ReactSharedInternals.S;
1160
- null !== onStartTransitionFinish &&
1161
- onStartTransitionFinish(currentTransition, returnValue);
1162
- "object" === typeof returnValue &&
1163
- null !== returnValue &&
1164
- "function" === typeof returnValue.then &&
1165
- (ReactSharedInternals.asyncTransitions++,
1166
- returnValue.then(releaseAsyncTransition, releaseAsyncTransition),
1167
- returnValue.then(noop, reportGlobalError));
1168
- } catch (error) {
1169
- reportGlobalError(error);
1170
- } finally {
1171
- null === prevTransition &&
1172
- currentTransition._updatedFibers &&
1173
- ((scope = currentTransition._updatedFibers.size),
1174
- currentTransition._updatedFibers.clear(),
1175
- 10 < scope &&
1176
- console.warn(
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."
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)),
1187
- (ReactSharedInternals.T = prevTransition);
1188
- }
1189
- };
1235
+ exports.startTransition = startTransition;
1190
1236
  exports.unstable_useCacheRefresh = function () {
1191
1237
  return resolveDispatcher().useCacheRefresh();
1192
1238
  };
@@ -1276,7 +1322,7 @@
1276
1322
  exports.useTransition = function () {
1277
1323
  return resolveDispatcher().useTransition();
1278
1324
  };
1279
- exports.version = "19.2.4";
1325
+ exports.version = "19.3.1";
1280
1326
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1281
1327
  "function" ===
1282
1328
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -21,6 +21,7 @@ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
21
21
  REACT_MEMO_TYPE = Symbol.for("react.memo"),
22
22
  REACT_LAZY_TYPE = Symbol.for("react.lazy"),
23
23
  REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
24
+ REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"),
24
25
  MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
25
26
  function getIteratorFn(maybeIterable) {
26
27
  if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
@@ -263,85 +264,126 @@ function mapChildren(children, func, context) {
263
264
  }
264
265
  function lazyInitializer(payload) {
265
266
  if (-1 === payload._status) {
266
- var ctor = payload._result;
267
- ctor = ctor();
268
- ctor.then(
267
+ var ctor = payload._result,
268
+ thenable = ctor();
269
+ thenable.then(
269
270
  function (moduleObject) {
270
271
  if (0 === payload._status || -1 === payload._status)
271
- (payload._status = 1), (payload._result = moduleObject);
272
+ (payload._status = 1),
273
+ (payload._result = moduleObject),
274
+ void 0 === thenable.status &&
275
+ ((thenable.status = "fulfilled"),
276
+ (thenable.value = moduleObject));
272
277
  },
273
278
  function (error) {
274
279
  if (0 === payload._status || -1 === payload._status)
275
- (payload._status = 2), (payload._result = error);
280
+ (payload._status = 2),
281
+ (payload._result = error),
282
+ void 0 === thenable.status &&
283
+ ((thenable.status = "rejected"), (thenable.reason = error));
276
284
  }
277
285
  );
278
- -1 === payload._status && ((payload._status = 0), (payload._result = ctor));
286
+ -1 === payload._status &&
287
+ ((payload._status = 0), (payload._result = thenable));
279
288
  }
280
289
  if (1 === payload._status) return payload._result.default;
281
290
  throw payload._result;
282
291
  }
283
292
  var reportGlobalError =
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
321
- );
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
- }) || []
293
+ "function" === typeof reportError
294
+ ? reportError
295
+ : function (error) {
296
+ if (
297
+ "object" === typeof window &&
298
+ "function" === typeof window.ErrorEvent
299
+ ) {
300
+ var event = new window.ErrorEvent("error", {
301
+ bubbles: !0,
302
+ cancelable: !0,
303
+ message:
304
+ "object" === typeof error &&
305
+ null !== error &&
306
+ "string" === typeof error.message
307
+ ? String(error.message)
308
+ : String(error),
309
+ error: error
310
+ });
311
+ if (!window.dispatchEvent(event)) return;
312
+ } else if (
313
+ "object" === typeof process &&
314
+ "function" === typeof process.emit
315
+ ) {
316
+ process.emit("uncaughtException", error);
317
+ return;
318
+ }
319
+ console.error(error);
320
+ };
321
+ function startTransition(scope) {
322
+ var prevTransition = ReactSharedInternals.T,
323
+ currentTransition = {};
324
+ currentTransition.types =
325
+ null !== prevTransition ? prevTransition.types : null;
326
+ ReactSharedInternals.T = currentTransition;
327
+ try {
328
+ var returnValue = scope(),
329
+ onStartTransitionFinish = ReactSharedInternals.S;
330
+ null !== onStartTransitionFinish &&
331
+ onStartTransitionFinish(currentTransition, returnValue);
332
+ "object" === typeof returnValue &&
333
+ null !== returnValue &&
334
+ "function" === typeof returnValue.then &&
335
+ returnValue.then(noop, reportGlobalError);
336
+ } catch (error) {
337
+ reportGlobalError(error);
338
+ } finally {
339
+ null !== prevTransition &&
340
+ null !== currentTransition.types &&
341
+ (prevTransition.types = currentTransition.types),
342
+ (ReactSharedInternals.T = prevTransition);
343
+ }
344
+ }
345
+ function addTransitionType(type) {
346
+ var transition = ReactSharedInternals.T;
347
+ if (null !== transition) {
348
+ var transitionTypes = transition.types;
349
+ null === transitionTypes
350
+ ? (transition.types = [type])
351
+ : -1 === transitionTypes.indexOf(type) && transitionTypes.push(type);
352
+ } else startTransition(addTransitionType.bind(null, type));
353
+ }
354
+ var Children = {
355
+ map: mapChildren,
356
+ forEach: function (children, forEachFunc, forEachContext) {
357
+ mapChildren(
358
+ children,
359
+ function () {
360
+ forEachFunc.apply(this, arguments);
361
+ },
362
+ forEachContext
363
+ );
364
+ },
365
+ count: function (children) {
366
+ var n = 0;
367
+ mapChildren(children, function () {
368
+ n++;
369
+ });
370
+ return n;
371
+ },
372
+ toArray: function (children) {
373
+ return (
374
+ mapChildren(children, function (child) {
375
+ return child;
376
+ }) || []
377
+ );
378
+ },
379
+ only: function (children) {
380
+ if (!isValidElement(children))
381
+ throw Error(
382
+ "React.Children.only expected to receive a single React element child."
335
383
  );
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
- };
384
+ return children;
385
+ }
386
+ };
345
387
  exports.Activity = REACT_ACTIVITY_TYPE;
346
388
  exports.Children = Children;
347
389
  exports.Component = Component;
@@ -350,6 +392,7 @@ exports.Profiler = REACT_PROFILER_TYPE;
350
392
  exports.PureComponent = PureComponent;
351
393
  exports.StrictMode = REACT_STRICT_MODE_TYPE;
352
394
  exports.Suspense = REACT_SUSPENSE_TYPE;
395
+ exports.ViewTransition = REACT_VIEW_TRANSITION_TYPE;
353
396
  exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
354
397
  ReactSharedInternals;
355
398
  exports.__COMPILER_RUNTIME = {
@@ -358,6 +401,7 @@ exports.__COMPILER_RUNTIME = {
358
401
  return ReactSharedInternals.H.useMemoCache(size);
359
402
  }
360
403
  };
404
+ exports.addTransitionType = addTransitionType;
361
405
  exports.cache = function (fn) {
362
406
  return function () {
363
407
  return fn.apply(null, arguments);
@@ -451,28 +495,7 @@ exports.memo = function (type, compare) {
451
495
  compare: void 0 === compare ? null : compare
452
496
  };
453
497
  };
454
- exports.startTransition = function (scope) {
455
- var prevTransition = ReactSharedInternals.T,
456
- currentTransition = {};
457
- ReactSharedInternals.T = currentTransition;
458
- try {
459
- var returnValue = scope(),
460
- onStartTransitionFinish = ReactSharedInternals.S;
461
- null !== onStartTransitionFinish &&
462
- onStartTransitionFinish(currentTransition, returnValue);
463
- "object" === typeof returnValue &&
464
- null !== returnValue &&
465
- "function" === typeof returnValue.then &&
466
- returnValue.then(noop, reportGlobalError);
467
- } catch (error) {
468
- reportGlobalError(error);
469
- } finally {
470
- null !== prevTransition &&
471
- null !== currentTransition.types &&
472
- (prevTransition.types = currentTransition.types),
473
- (ReactSharedInternals.T = prevTransition);
474
- }
475
- };
498
+ exports.startTransition = startTransition;
476
499
  exports.unstable_useCacheRefresh = function () {
477
500
  return ReactSharedInternals.H.useCacheRefresh();
478
501
  };
@@ -539,4 +562,4 @@ exports.useSyncExternalStore = function (
539
562
  exports.useTransition = function () {
540
563
  return ReactSharedInternals.H.useTransition();
541
564
  };
542
- exports.version = "19.2.4";
565
+ exports.version = "19.3.1";
@@ -67,6 +67,8 @@
67
67
  return "SuspenseList";
68
68
  case REACT_ACTIVITY_TYPE:
69
69
  return "Activity";
70
+ case REACT_VIEW_TRANSITION_TYPE:
71
+ return "ViewTransition";
70
72
  }
71
73
  if ("object" === typeof type)
72
74
  switch (
@@ -429,8 +431,15 @@
429
431
  }
430
432
  function lazyInitializer(payload) {
431
433
  if (-1 === payload._status) {
432
- var ioInfo = payload._ioInfo;
433
- null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());
434
+ var resolveDebugValue = null,
435
+ rejectDebugValue = null,
436
+ ioInfo = payload._ioInfo;
437
+ null != ioInfo &&
438
+ ((ioInfo.start = ioInfo.end = performance.now()),
439
+ (ioInfo.value = new Promise(function (resolve, reject) {
440
+ resolveDebugValue = resolve;
441
+ rejectDebugValue = reject;
442
+ })));
434
443
  ioInfo = payload._result;
435
444
  var thenable = ioInfo();
436
445
  thenable.then(
@@ -439,7 +448,14 @@
439
448
  payload._status = 1;
440
449
  payload._result = moduleObject;
441
450
  var _ioInfo = payload._ioInfo;
442
- null != _ioInfo && (_ioInfo.end = performance.now());
451
+ if (null != _ioInfo) {
452
+ _ioInfo.end = performance.now();
453
+ var debugValue =
454
+ null == moduleObject ? void 0 : moduleObject.default;
455
+ resolveDebugValue(debugValue);
456
+ _ioInfo.value.status = "fulfilled";
457
+ _ioInfo.value.value = debugValue;
458
+ }
443
459
  void 0 === thenable.status &&
444
460
  ((thenable.status = "fulfilled"),
445
461
  (thenable.value = moduleObject));
@@ -450,7 +466,12 @@
450
466
  payload._status = 2;
451
467
  payload._result = error;
452
468
  var _ioInfo2 = payload._ioInfo;
453
- null != _ioInfo2 && (_ioInfo2.end = performance.now());
469
+ null != _ioInfo2 &&
470
+ ((_ioInfo2.end = performance.now()),
471
+ _ioInfo2.value.then(noop, noop),
472
+ rejectDebugValue(error),
473
+ (_ioInfo2.value.status = "rejected"),
474
+ (_ioInfo2.value.reason = error));
454
475
  void 0 === thenable.status &&
455
476
  ((thenable.status = "rejected"), (thenable.reason = error));
456
477
  }
@@ -458,7 +479,6 @@
458
479
  );
459
480
  ioInfo = payload._ioInfo;
460
481
  if (null != ioInfo) {
461
- ioInfo.value = thenable;
462
482
  var displayName = thenable.displayName;
463
483
  "string" === typeof displayName && (ioInfo.name = displayName);
464
484
  }
@@ -508,6 +528,7 @@
508
528
  REACT_MEMO_TYPE = Symbol.for("react.memo"),
509
529
  REACT_LAZY_TYPE = Symbol.for("react.lazy"),
510
530
  REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
531
+ REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"),
511
532
  MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
512
533
  REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
513
534
  hasOwnProperty = Object.prototype.hasOwnProperty,
@@ -533,7 +554,7 @@
533
554
  var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
534
555
  var didWarnAboutMaps = !1,
535
556
  userProvidedKeyEscapeRegex = /\/+/g;
536
- exports.Children = {
557
+ createFakeCallStack = {
537
558
  map: mapChildren,
538
559
  forEach: function (children, forEachFunc, forEachContext) {
539
560
  mapChildren(
@@ -566,10 +587,13 @@
566
587
  return children;
567
588
  }
568
589
  };
590
+ exports.Activity = REACT_ACTIVITY_TYPE;
591
+ exports.Children = createFakeCallStack;
569
592
  exports.Fragment = REACT_FRAGMENT_TYPE;
570
593
  exports.Profiler = REACT_PROFILER_TYPE;
571
594
  exports.StrictMode = REACT_STRICT_MODE_TYPE;
572
595
  exports.Suspense = REACT_SUSPENSE_TYPE;
596
+ exports.ViewTransition = REACT_VIEW_TRANSITION_TYPE;
573
597
  exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
574
598
  ReactSharedInternals;
575
599
  exports.cache = function (fn) {
@@ -684,6 +708,7 @@
684
708
  exports.createElement = function (type, config, children) {
685
709
  for (var i = 2; i < arguments.length; i++)
686
710
  validateChildKeys(arguments[i]);
711
+ var propName;
687
712
  i = {};
688
713
  var key = null;
689
714
  if (null != config)
@@ -724,13 +749,18 @@
724
749
  ? type.displayName || type.name || "Unknown"
725
750
  : type
726
751
  );
727
- var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
752
+ (propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++)
753
+ ? ((childArray = Error.stackTraceLimit),
754
+ (Error.stackTraceLimit = 10),
755
+ (childrenLength = Error("react-stack-top-frame")),
756
+ (Error.stackTraceLimit = childArray))
757
+ : (childrenLength = unknownOwnerDebugStack);
728
758
  return ReactElement(
729
759
  type,
730
760
  key,
731
761
  i,
732
762
  getOwner(),
733
- propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
763
+ childrenLength,
734
764
  propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
735
765
  );
736
766
  };
@@ -844,5 +874,5 @@
844
874
  exports.useMemo = function (create, deps) {
845
875
  return resolveDispatcher().useMemo(create, deps);
846
876
  };
847
- exports.version = "19.2.4";
877
+ exports.version = "19.3.1";
848
878
  })();
@@ -36,6 +36,8 @@ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
36
36
  REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
37
37
  REACT_MEMO_TYPE = Symbol.for("react.memo"),
38
38
  REACT_LAZY_TYPE = Symbol.for("react.lazy"),
39
+ REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
40
+ REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"),
39
41
  MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
40
42
  function getIteratorFn(maybeIterable) {
41
43
  if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
@@ -234,19 +236,27 @@ function mapChildren(children, func, context) {
234
236
  }
235
237
  function lazyInitializer(payload) {
236
238
  if (-1 === payload._status) {
237
- var ctor = payload._result;
238
- ctor = ctor();
239
- ctor.then(
239
+ var ctor = payload._result,
240
+ thenable = ctor();
241
+ thenable.then(
240
242
  function (moduleObject) {
241
243
  if (0 === payload._status || -1 === payload._status)
242
- (payload._status = 1), (payload._result = moduleObject);
244
+ (payload._status = 1),
245
+ (payload._result = moduleObject),
246
+ void 0 === thenable.status &&
247
+ ((thenable.status = "fulfilled"),
248
+ (thenable.value = moduleObject));
243
249
  },
244
250
  function (error) {
245
251
  if (0 === payload._status || -1 === payload._status)
246
- (payload._status = 2), (payload._result = error);
252
+ (payload._status = 2),
253
+ (payload._result = error),
254
+ void 0 === thenable.status &&
255
+ ((thenable.status = "rejected"), (thenable.reason = error));
247
256
  }
248
257
  );
249
- -1 === payload._status && ((payload._status = 0), (payload._result = ctor));
258
+ -1 === payload._status &&
259
+ ((payload._status = 0), (payload._result = thenable));
250
260
  }
251
261
  if (1 === payload._status) return payload._result.default;
252
262
  throw payload._result;
@@ -257,7 +267,7 @@ function createCacheRoot() {
257
267
  function createCacheNode() {
258
268
  return { s: 0, v: void 0, o: null, p: null };
259
269
  }
260
- exports.Children = {
270
+ var Children = {
261
271
  map: mapChildren,
262
272
  forEach: function (children, forEachFunc, forEachContext) {
263
273
  mapChildren(
@@ -287,10 +297,13 @@ exports.Children = {
287
297
  return children;
288
298
  }
289
299
  };
300
+ exports.Activity = REACT_ACTIVITY_TYPE;
301
+ exports.Children = Children;
290
302
  exports.Fragment = REACT_FRAGMENT_TYPE;
291
303
  exports.Profiler = REACT_PROFILER_TYPE;
292
304
  exports.StrictMode = REACT_STRICT_MODE_TYPE;
293
305
  exports.Suspense = REACT_SUSPENSE_TYPE;
306
+ exports.ViewTransition = REACT_VIEW_TRANSITION_TYPE;
294
307
  exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
295
308
  ReactSharedInternals;
296
309
  exports.cache = function (fn) {
@@ -420,4 +433,4 @@ exports.useId = function () {
420
433
  exports.useMemo = function (create, deps) {
421
434
  return ReactSharedInternals.H.useMemo(create, deps);
422
435
  };
423
- exports.version = "19.2.4";
436
+ exports.version = "19.3.1";
package/package.json CHANGED
@@ -4,9 +4,9 @@
4
4
  "keywords": [
5
5
  "react"
6
6
  ],
7
- "version": "19.2.4",
7
+ "version": "19.3.1",
8
8
  "homepage": "https://react.dev/",
9
- "bugs": "https://github.com/facebook/react/issues",
9
+ "bugs": "https://github.com/react/react/issues",
10
10
  "license": "MIT",
11
11
  "files": [
12
12
  "LICENSE",
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "repository": {
44
44
  "type": "git",
45
- "url": "https://github.com/facebook/react.git",
45
+ "url": "https://github.com/react/react.git",
46
46
  "directory": "packages/react"
47
47
  },
48
48
  "engines": {