react 19.0.0-canary-4c12339ce-20240408 → 19.0.0-canary-adb717393-20240411

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,7 +14,7 @@
14
14
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.React = {}));
15
15
  })(this, (function (exports) { 'use strict';
16
16
 
17
- var ReactVersion = '19.0.0-canary-4c12339ce-20240408';
17
+ var ReactVersion = '19.0.0-canary-adb717393-20240411';
18
18
 
19
19
  // ATTENTION
20
20
  // When adding new symbols to this file,
@@ -51,77 +51,62 @@
51
51
  return null;
52
52
  }
53
53
 
54
- /**
55
- * Keeps track of the current dispatcher.
56
- */
57
- var ReactCurrentDispatcher$1 = {
58
- current: null
59
- };
54
+ // -----------------------------------------------------------------------------
60
55
 
61
- /**
62
- * Keeps track of the current Cache dispatcher.
63
- */
64
- var ReactCurrentCache = {
65
- current: null
66
- };
56
+ var enableScopeAPI = false; // Experimental Create Event Handle API.
57
+ var enableTransitionTracing = false; // No known bugs, but needs performance testing
67
58
 
68
- /**
69
- * Keeps track of the current batch's configuration such as how long an update
70
- * should suspend for if it needs to.
71
- */
72
- var ReactCurrentBatchConfig = {
73
- transition: null
74
- };
59
+ var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
60
+ // as a normal prop instead of stripping it from the props object.
61
+ // Passes `ref` as a normal prop instead of stripping it from the props object
62
+ // during element creation.
75
63
 
76
- var ReactCurrentActQueue = {
77
- current: null,
78
- // Used to reproduce behavior of `batchedUpdates` in legacy mode.
79
- isBatchingLegacy: false,
80
- didScheduleLegacyUpdate: false,
81
- // Tracks whether something called `use` during the current batch of work.
82
- // Determines whether we should yield to microtasks to unwrap already resolved
83
- // promises without suspending.
84
- didUsePromise: false,
85
- // Track first uncaught error within this act
86
- thrownErrors: []
87
- };
64
+ var enableRefAsProp = true;
65
+ // This allows us to land breaking changes to remove legacy mode APIs in experimental builds
66
+ // before removing them in stable in the next Major
88
67
 
89
- /**
90
- * Keeps track of the current owner.
91
- *
92
- * The current owner is the component who should own any components that are
93
- * currently being constructed.
94
- */
95
- var ReactCurrentOwner$1 = {
96
- /**
97
- * @internal
98
- * @type {ReactComponent}
99
- */
100
- current: null
68
+ var disableLegacyMode = true;
69
+
70
+ var enableRenderableContext = true; // -----------------------------------------------------------------------------
71
+ // stuff. Intended to enable React core members to more easily debug scheduling
72
+ // issues in DEV builds.
73
+
74
+ var enableDebugTracing = false;
75
+
76
+ var ReactSharedInternals$1 = {
77
+ H: null,
78
+ C: null,
79
+ T: null
101
80
  };
102
81
 
103
- var ReactDebugCurrentFrame$1 = {};
104
- var currentExtraStackFrame = null;
82
+ {
83
+ ReactSharedInternals$1.owner = null;
84
+ }
105
85
 
106
86
  {
107
- ReactDebugCurrentFrame$1.setExtraStackFrame = function (stack) {
108
- {
109
- currentExtraStackFrame = stack;
110
- }
87
+ ReactSharedInternals$1.actQueue = null;
88
+ ReactSharedInternals$1.isBatchingLegacy = false;
89
+ ReactSharedInternals$1.didScheduleLegacyUpdate = false;
90
+ ReactSharedInternals$1.didUsePromise = false;
91
+ ReactSharedInternals$1.thrownErrors = [];
92
+ var currentExtraStackFrame$1 = null;
93
+
94
+ ReactSharedInternals$1.setExtraStackFrame = function (stack) {
95
+ currentExtraStackFrame$1 = stack;
111
96
  }; // Stack implementation injected by the current renderer.
112
97
 
113
98
 
114
- ReactDebugCurrentFrame$1.getCurrentStack = null;
99
+ ReactSharedInternals$1.getCurrentStack = null;
115
100
 
116
- ReactDebugCurrentFrame$1.getStackAddendum = function () {
101
+ ReactSharedInternals$1.getStackAddendum = function () {
117
102
  var stack = ''; // Add an extra top frame while an element is being validated
118
103
 
119
- if (currentExtraStackFrame) {
120
- stack += currentExtraStackFrame;
104
+ if (currentExtraStackFrame$1) {
105
+ stack += currentExtraStackFrame$1;
121
106
  } // Delegate to the injected renderer-specific implementation
122
107
 
123
108
 
124
- var impl = ReactDebugCurrentFrame$1.getCurrentStack;
109
+ var impl = ReactSharedInternals$1.getCurrentStack;
125
110
 
126
111
  if (impl) {
127
112
  stack += impl() || '';
@@ -131,18 +116,6 @@
131
116
  };
132
117
  }
133
118
 
134
- var ReactSharedInternals = {
135
- ReactCurrentDispatcher: ReactCurrentDispatcher$1,
136
- ReactCurrentCache: ReactCurrentCache,
137
- ReactCurrentBatchConfig: ReactCurrentBatchConfig,
138
- ReactCurrentOwner: ReactCurrentOwner$1
139
- };
140
-
141
- {
142
- ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame$1;
143
- ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
144
- }
145
-
146
119
  // by calls to these methods by a Babel plugin.
147
120
  //
148
121
  // In PROD (or in packages without access to React internals),
@@ -175,8 +148,7 @@
175
148
  // When changing this logic, you might want to also
176
149
  // update consoleWithStackDev.www.js as well.
177
150
  {
178
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
179
- var stack = ReactDebugCurrentFrame.getStackAddendum();
151
+ var stack = ReactSharedInternals$1.getStackAddendum();
180
152
 
181
153
  if (stack !== '') {
182
154
  format += '%s';
@@ -496,28 +468,6 @@
496
468
  }
497
469
  }
498
470
 
499
- // -----------------------------------------------------------------------------
500
-
501
- var enableScopeAPI = false; // Experimental Create Event Handle API.
502
- var enableTransitionTracing = false; // No known bugs, but needs performance testing
503
-
504
- var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
505
- // as a normal prop instead of stripping it from the props object.
506
- // Passes `ref` as a normal prop instead of stripping it from the props object
507
- // during element creation.
508
-
509
- var enableRefAsProp = true;
510
- // This allows us to land breaking changes to remove legacy mode APIs in experimental builds
511
- // before removing them in stable in the next Major
512
-
513
- var disableLegacyMode = true;
514
-
515
- var enableRenderableContext = true; // -----------------------------------------------------------------------------
516
- // stuff. Intended to enable React core members to more easily debug scheduling
517
- // issues in DEV builds.
518
-
519
- var enableDebugTracing = false;
520
-
521
471
  function getWrappedName(outerType, innerType, wrapperName) {
522
472
  var displayName = outerType.displayName;
523
473
 
@@ -753,7 +703,6 @@
753
703
  }
754
704
  }
755
705
 
756
- var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
757
706
  var prefix;
758
707
  function describeBuiltInComponentFrame(name) {
759
708
  {
@@ -809,13 +758,13 @@
809
758
  var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined.
810
759
 
811
760
  Error.prepareStackTrace = undefined;
812
- var previousDispatcher;
761
+ var previousDispatcher = null;
813
762
 
814
763
  {
815
- previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
764
+ previousDispatcher = ReactSharedInternals$1.H; // Set the dispatcher in DEV because this might be call in the render function
816
765
  // for warnings.
817
766
 
818
- ReactCurrentDispatcher.current = null;
767
+ ReactSharedInternals$1.H = null;
819
768
  disableLogs();
820
769
  }
821
770
  /**
@@ -1000,7 +949,7 @@
1000
949
  reentry = false;
1001
950
 
1002
951
  {
1003
- ReactCurrentDispatcher.current = previousDispatcher;
952
+ ReactSharedInternals$1.H = previousDispatcher;
1004
953
  reenableLogs();
1005
954
  }
1006
955
 
@@ -1080,11 +1029,10 @@
1080
1029
  return '';
1081
1030
  }
1082
1031
 
1083
- var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
1084
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
1085
1032
  var REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference');
1086
1033
  var specialPropKeyWarningShown;
1087
1034
  var didWarnAboutElementRef;
1035
+ var didWarnAboutOldJSXRuntime;
1088
1036
 
1089
1037
  {
1090
1038
  didWarnAboutElementRef = {};
@@ -1319,6 +1267,20 @@
1319
1267
  var ref = null;
1320
1268
 
1321
1269
  if (config != null) {
1270
+ {
1271
+ if (!didWarnAboutOldJSXRuntime && '__self' in config && // Do not assume this is the result of an oudated JSX transform if key
1272
+ // is present, because the modern JSX transform sometimes outputs
1273
+ // createElement to preserve precedence between a static key and a
1274
+ // spread key. To avoid false positive warnings, we never warn if
1275
+ // there's a key.
1276
+ !('key' in config)) {
1277
+ didWarnAboutOldJSXRuntime = true;
1278
+
1279
+ warn('Your app (or one of its dependencies) is using an outdated JSX ' + 'transform. Update to the modern JSX transform for ' + 'faster performance: ' + // TODO: Create a short link for this
1280
+ 'https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html');
1281
+ }
1282
+ }
1283
+
1322
1284
  if (hasValidRef(config)) ;
1323
1285
 
1324
1286
  if (hasValidKey(config)) {
@@ -1387,7 +1349,7 @@
1387
1349
  }
1388
1350
  }
1389
1351
 
1390
- var element = ReactElement(type, key, ref, undefined, undefined, ReactCurrentOwner.current, props);
1352
+ var element = ReactElement(type, key, ref, undefined, undefined, ReactSharedInternals$1.owner, props);
1391
1353
 
1392
1354
  if (type === REACT_FRAGMENT_TYPE) {
1393
1355
  validateFragmentProps(element);
@@ -1421,8 +1383,7 @@
1421
1383
 
1422
1384
  if (config != null) {
1423
1385
  if (hasValidRef(config)) {
1424
-
1425
- owner = ReactCurrentOwner.current;
1386
+ owner = ReactSharedInternals$1.owner;
1426
1387
  }
1427
1388
 
1428
1389
  if (hasValidKey(config)) {
@@ -1481,8 +1442,8 @@
1481
1442
 
1482
1443
  function getDeclarationErrorAddendum() {
1483
1444
  {
1484
- if (ReactCurrentOwner.current) {
1485
- var name = getComponentNameFromType(ReactCurrentOwner.current.type);
1445
+ if (ReactSharedInternals$1.owner) {
1446
+ var name = getComponentNameFromType(ReactSharedInternals$1.owner.type);
1486
1447
 
1487
1448
  if (name) {
1488
1449
  return '\n\nCheck the render method of `' + name + '`.';
@@ -1586,7 +1547,7 @@
1586
1547
 
1587
1548
  var childOwner = '';
1588
1549
 
1589
- if (element && element._owner != null && element._owner !== ReactCurrentOwner.current) {
1550
+ if (element && element._owner != null && element._owner !== ReactSharedInternals$1.owner) {
1590
1551
  var ownerName = null;
1591
1552
 
1592
1553
  if (typeof element._owner.tag === 'number') {
@@ -1611,9 +1572,9 @@
1611
1572
  {
1612
1573
  if (element) {
1613
1574
  var stack = describeUnknownElementTypeFrameInDEV(element.type);
1614
- ReactDebugCurrentFrame.setExtraStackFrame(stack);
1575
+ ReactSharedInternals$1.setExtraStackFrame(stack);
1615
1576
  } else {
1616
- ReactDebugCurrentFrame.setExtraStackFrame(null);
1577
+ ReactSharedInternals$1.setExtraStackFrame(null);
1617
1578
  }
1618
1579
  }
1619
1580
  }
@@ -2241,7 +2202,7 @@
2241
2202
 
2242
2203
  function cache$1(fn) {
2243
2204
  return function () {
2244
- var dispatcher = ReactCurrentCache.current;
2205
+ var dispatcher = ReactSharedInternals$1.C;
2245
2206
 
2246
2207
  if (!dispatcher) {
2247
2208
  // If there is no dispatcher, then we treat this as not being cached.
@@ -2326,7 +2287,7 @@
2326
2287
  var cache = cache$1;
2327
2288
 
2328
2289
  function resolveDispatcher() {
2329
- var dispatcher = ReactCurrentDispatcher$1.current;
2290
+ var dispatcher = ReactSharedInternals$1.H;
2330
2291
 
2331
2292
  {
2332
2293
  if (dispatcher === null) {
@@ -3024,11 +2985,10 @@
3024
2985
  unstable_wrapCallback: unstable_wrapCallback
3025
2986
  });
3026
2987
 
3027
- var ReactSharedInternalsClient = {
3028
- ReactCurrentDispatcher: ReactCurrentDispatcher$1,
3029
- ReactCurrentCache: ReactCurrentCache,
3030
- ReactCurrentOwner: ReactCurrentOwner$1,
3031
- ReactCurrentBatchConfig: ReactCurrentBatchConfig,
2988
+ var ReactSharedInternals = {
2989
+ H: null,
2990
+ C: null,
2991
+ T: null,
3032
2992
  // Re-export the schedule API(s) for UMD bundles.
3033
2993
  // This avoids introducing a dependency on a new UMD global in a minor update,
3034
2994
  // Since that would be a breaking change (e.g. for all existing CodeSandboxes).
@@ -3038,8 +2998,40 @@
3038
2998
  };
3039
2999
 
3040
3000
  {
3041
- ReactSharedInternalsClient.ReactCurrentActQueue = ReactCurrentActQueue;
3042
- ReactSharedInternalsClient.ReactDebugCurrentFrame = ReactDebugCurrentFrame$1;
3001
+ ReactSharedInternals.owner = null;
3002
+ }
3003
+
3004
+ {
3005
+ ReactSharedInternals.actQueue = null;
3006
+ ReactSharedInternals.isBatchingLegacy = false;
3007
+ ReactSharedInternals.didScheduleLegacyUpdate = false;
3008
+ ReactSharedInternals.didUsePromise = false;
3009
+ ReactSharedInternals.thrownErrors = [];
3010
+ var currentExtraStackFrame = null;
3011
+
3012
+ ReactSharedInternals.setExtraStackFrame = function (stack) {
3013
+ currentExtraStackFrame = stack;
3014
+ }; // Stack implementation injected by the current renderer.
3015
+
3016
+
3017
+ ReactSharedInternals.getCurrentStack = null;
3018
+
3019
+ ReactSharedInternals.getStackAddendum = function () {
3020
+ var stack = ''; // Add an extra top frame while an element is being validated
3021
+
3022
+ if (currentExtraStackFrame) {
3023
+ stack += currentExtraStackFrame;
3024
+ } // Delegate to the injected renderer-specific implementation
3025
+
3026
+
3027
+ var impl = ReactSharedInternals.getCurrentStack;
3028
+
3029
+ if (impl) {
3030
+ stack += impl() || '';
3031
+ }
3032
+
3033
+ return stack;
3034
+ };
3043
3035
  }
3044
3036
 
3045
3037
  var reportGlobalError = typeof reportError === 'function' ? // In modern browsers, reportError will dispatch an error event,
@@ -3073,18 +3065,18 @@
3073
3065
  };
3074
3066
 
3075
3067
  function startTransition(scope, options) {
3076
- var prevTransition = ReactCurrentBatchConfig.transition; // Each renderer registers a callback to receive the return value of
3068
+ var prevTransition = ReactSharedInternals$1.T; // Each renderer registers a callback to receive the return value of
3077
3069
  // the scope function. This is used to implement async actions.
3078
3070
 
3079
3071
  var callbacks = new Set();
3080
3072
  var transition = {
3081
3073
  _callbacks: callbacks
3082
3074
  };
3083
- ReactCurrentBatchConfig.transition = transition;
3084
- var currentTransition = ReactCurrentBatchConfig.transition;
3075
+ ReactSharedInternals$1.T = transition;
3076
+ var currentTransition = ReactSharedInternals$1.T;
3085
3077
 
3086
3078
  {
3087
- ReactCurrentBatchConfig.transition._updatedFibers = new Set();
3079
+ ReactSharedInternals$1.T._updatedFibers = new Set();
3088
3080
  }
3089
3081
 
3090
3082
  {
@@ -3101,7 +3093,7 @@
3101
3093
  reportGlobalError(error);
3102
3094
  } finally {
3103
3095
  warnAboutTransitionSubscriptions(prevTransition, currentTransition);
3104
- ReactCurrentBatchConfig.transition = prevTransition;
3096
+ ReactSharedInternals$1.T = prevTransition;
3105
3097
  }
3106
3098
  }
3107
3099
  }
@@ -3176,7 +3168,7 @@
3176
3168
 
3177
3169
  function act(callback) {
3178
3170
  {
3179
- // When ReactCurrentActQueue.current is not null, it signals to React that
3171
+ // When ReactSharedInternals.actQueue is not null, it signals to React that
3180
3172
  // we're currently inside an `act` scope. React will push all its tasks to
3181
3173
  // this queue instead of scheduling them with platform APIs.
3182
3174
  //
@@ -3186,10 +3178,10 @@
3186
3178
  //
3187
3179
  // If we're already inside an `act` scope, reuse the existing queue.
3188
3180
  var prevIsBatchingLegacy = false;
3189
- var prevActQueue = ReactCurrentActQueue.current;
3181
+ var prevActQueue = ReactSharedInternals.actQueue;
3190
3182
  var prevActScopeDepth = actScopeDepth;
3191
3183
  actScopeDepth++;
3192
- var queue = ReactCurrentActQueue.current = prevActQueue !== null ? prevActQueue : []; // Used to reproduce behavior of `batchedUpdates` in legacy mode. Only
3184
+ var queue = ReactSharedInternals.actQueue = prevActQueue !== null ? prevActQueue : []; // Used to reproduce behavior of `batchedUpdates` in legacy mode. Only
3193
3185
 
3194
3186
  var result; // This tracks whether the `act` call is awaited. In certain cases, not
3195
3187
  // awaiting it is a mistake, so we will detect that and warn.
@@ -3203,7 +3195,7 @@
3203
3195
  if (!disableLegacyMode) ;
3204
3196
 
3205
3197
  result = callback();
3206
- var didScheduleLegacyUpdate = !disableLegacyMode ? ReactCurrentActQueue.didScheduleLegacyUpdate : false; // Replicate behavior of original `act` implementation in legacy mode,
3198
+ var didScheduleLegacyUpdate = !disableLegacyMode ? ReactSharedInternals.didScheduleLegacyUpdate : false; // Replicate behavior of original `act` implementation in legacy mode,
3207
3199
  // which flushed updates immediately after the scope function exits, even
3208
3200
  // if it's an async function.
3209
3201
 
@@ -3221,14 +3213,14 @@
3221
3213
  // one used to track `act` scopes. Why, you may be wondering? Because
3222
3214
  // that's how it worked before version 18. Yes, it's confusing! We should
3223
3215
  // delete legacy mode!!
3224
- ReactCurrentActQueue.thrownErrors.push(error);
3216
+ ReactSharedInternals.thrownErrors.push(error);
3225
3217
  }
3226
3218
 
3227
- if (ReactCurrentActQueue.thrownErrors.length > 0) {
3219
+ if (ReactSharedInternals.thrownErrors.length > 0) {
3228
3220
 
3229
3221
  popActScope(prevActQueue, prevActScopeDepth);
3230
- var thrownError = aggregateErrors(ReactCurrentActQueue.thrownErrors);
3231
- ReactCurrentActQueue.thrownErrors.length = 0;
3222
+ var thrownError = aggregateErrors(ReactSharedInternals.thrownErrors);
3223
+ ReactSharedInternals.thrownErrors.length = 0;
3232
3224
  throw thrownError;
3233
3225
  }
3234
3226
 
@@ -3269,13 +3261,13 @@
3269
3261
  // `thenable` might not be a real promise, and `flushActQueue`
3270
3262
  // might throw, so we need to wrap `flushActQueue` in a
3271
3263
  // try/catch.
3272
- ReactCurrentActQueue.thrownErrors.push(error);
3264
+ ReactSharedInternals.thrownErrors.push(error);
3273
3265
  }
3274
3266
 
3275
- if (ReactCurrentActQueue.thrownErrors.length > 0) {
3276
- var _thrownError = aggregateErrors(ReactCurrentActQueue.thrownErrors);
3267
+ if (ReactSharedInternals.thrownErrors.length > 0) {
3268
+ var _thrownError = aggregateErrors(ReactSharedInternals.thrownErrors);
3277
3269
 
3278
- ReactCurrentActQueue.thrownErrors.length = 0;
3270
+ ReactSharedInternals.thrownErrors.length = 0;
3279
3271
  reject(_thrownError);
3280
3272
  }
3281
3273
  } else {
@@ -3284,10 +3276,10 @@
3284
3276
  }, function (error) {
3285
3277
  popActScope(prevActQueue, prevActScopeDepth);
3286
3278
 
3287
- if (ReactCurrentActQueue.thrownErrors.length > 0) {
3288
- var _thrownError2 = aggregateErrors(ReactCurrentActQueue.thrownErrors);
3279
+ if (ReactSharedInternals.thrownErrors.length > 0) {
3280
+ var _thrownError2 = aggregateErrors(ReactSharedInternals.thrownErrors);
3289
3281
 
3290
- ReactCurrentActQueue.thrownErrors.length = 0;
3282
+ ReactSharedInternals.thrownErrors.length = 0;
3291
3283
  reject(_thrownError2);
3292
3284
  } else {
3293
3285
  reject(error);
@@ -3335,13 +3327,13 @@
3335
3327
  // to be awaited, regardless of whether the callback is sync or async.
3336
3328
 
3337
3329
 
3338
- ReactCurrentActQueue.current = null;
3330
+ ReactSharedInternals.actQueue = null;
3339
3331
  }
3340
3332
 
3341
- if (ReactCurrentActQueue.thrownErrors.length > 0) {
3342
- var _thrownError3 = aggregateErrors(ReactCurrentActQueue.thrownErrors);
3333
+ if (ReactSharedInternals.thrownErrors.length > 0) {
3334
+ var _thrownError3 = aggregateErrors(ReactSharedInternals.thrownErrors);
3343
3335
 
3344
- ReactCurrentActQueue.thrownErrors.length = 0;
3336
+ ReactSharedInternals.thrownErrors.length = 0;
3345
3337
  throw _thrownError3;
3346
3338
  }
3347
3339
 
@@ -3352,7 +3344,7 @@
3352
3344
  if (prevActScopeDepth === 0) {
3353
3345
  // If the `act` call is awaited, restore the queue we were
3354
3346
  // using before (see long comment above) so we can flush it.
3355
- ReactCurrentActQueue.current = queue;
3347
+ ReactSharedInternals.actQueue = queue;
3356
3348
  enqueueTask(function () {
3357
3349
  return (// Recursively flush tasks scheduled by a microtask.
3358
3350
  recursivelyFlushAsyncActWork(returnValue, resolve, reject)
@@ -3380,7 +3372,7 @@
3380
3372
  function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
3381
3373
  {
3382
3374
  // Check if any tasks were scheduled asynchronously.
3383
- var queue = ReactCurrentActQueue.current;
3375
+ var queue = ReactSharedInternals.actQueue;
3384
3376
 
3385
3377
  if (queue !== null) {
3386
3378
  if (queue.length !== 0) {
@@ -3396,17 +3388,17 @@
3396
3388
  return;
3397
3389
  } catch (error) {
3398
3390
  // Leave remaining tasks on the queue if something throws.
3399
- ReactCurrentActQueue.thrownErrors.push(error);
3391
+ ReactSharedInternals.thrownErrors.push(error);
3400
3392
  }
3401
3393
  } else {
3402
3394
  // The queue is empty. We can finish.
3403
- ReactCurrentActQueue.current = null;
3395
+ ReactSharedInternals.actQueue = null;
3404
3396
  }
3405
3397
  }
3406
3398
 
3407
- if (ReactCurrentActQueue.thrownErrors.length > 0) {
3408
- var thrownError = aggregateErrors(ReactCurrentActQueue.thrownErrors);
3409
- ReactCurrentActQueue.thrownErrors.length = 0;
3399
+ if (ReactSharedInternals.thrownErrors.length > 0) {
3400
+ var thrownError = aggregateErrors(ReactSharedInternals.thrownErrors);
3401
+ ReactSharedInternals.thrownErrors.length = 0;
3410
3402
  reject(thrownError);
3411
3403
  } else {
3412
3404
  resolve(returnValue);
@@ -3428,11 +3420,11 @@
3428
3420
  var callback = queue[i];
3429
3421
 
3430
3422
  do {
3431
- ReactCurrentActQueue.didUsePromise = false;
3423
+ ReactSharedInternals.didUsePromise = false;
3432
3424
  var continuation = callback(false);
3433
3425
 
3434
3426
  if (continuation !== null) {
3435
- if (ReactCurrentActQueue.didUsePromise) {
3427
+ if (ReactSharedInternals.didUsePromise) {
3436
3428
  // The component just suspended. Yield to the main thread in
3437
3429
  // case the promise is already resolved. If so, it will ping in
3438
3430
  // a microtask and we can resume without unwinding the stack.
@@ -3453,7 +3445,7 @@
3453
3445
  } catch (error) {
3454
3446
  // If something throws, leave the remaining callbacks on the queue.
3455
3447
  queue.splice(0, i + 1);
3456
- ReactCurrentActQueue.thrownErrors.push(error);
3448
+ ReactSharedInternals.thrownErrors.push(error);
3457
3449
  } finally {
3458
3450
  isFlushing = false;
3459
3451
  }
@@ -3492,7 +3484,7 @@
3492
3484
  exports.PureComponent = PureComponent;
3493
3485
  exports.StrictMode = REACT_STRICT_MODE_TYPE;
3494
3486
  exports.Suspense = REACT_SUSPENSE_TYPE;
3495
- exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternalsClient;
3487
+ exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
3496
3488
  exports.act = act;
3497
3489
  exports.cache = cache;
3498
3490
  exports.cloneElement = cloneElement;