react 19.0.0-canary-e3ebcd54b-20240405 → 19.0.0-canary-adb717393-20240411
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.
- package/cjs/react-jsx-dev-runtime.development.js +53 -34
- package/cjs/react-jsx-runtime.development.js +53 -34
- package/cjs/react-jsx-runtime.production.js +27 -16
- package/cjs/react-jsx-runtime.production.min.js +1 -1
- package/cjs/react-jsx-runtime.production.min.js.map +1 -1
- package/cjs/react-jsx-runtime.profiling.js +27 -16
- package/cjs/react-jsx-runtime.profiling.min.js +1 -1
- package/cjs/react-jsx-runtime.profiling.min.js.map +1 -1
- package/cjs/react-jsx-runtime.react-server.development.js +58 -34
- package/cjs/react-jsx-runtime.react-server.production.js +31 -15
- package/cjs/react-jsx-runtime.react-server.production.min.js +2 -1
- package/cjs/react-jsx-runtime.react-server.production.min.js.map +1 -1
- package/cjs/react.development.js +118 -150
- package/cjs/react.production.js +13 -53
- package/cjs/react.production.min.js +17 -18
- package/cjs/react.production.min.js.map +1 -1
- package/cjs/react.react-server.development.js +83 -110
- package/cjs/react.react-server.production.js +14 -58
- package/cjs/react.react-server.production.min.js +17 -18
- package/cjs/react.react-server.production.min.js.map +1 -1
- package/package.json +1 -1
- package/umd/react.development.js +158 -159
- package/umd/react.production.min.js +23 -24
- package/umd/react.profiling.min.js +23 -24
@@ -14,41 +14,44 @@ if (process.env.NODE_ENV !== "production") {
|
|
14
14
|
(function() {
|
15
15
|
'use strict';
|
16
16
|
|
17
|
-
|
18
|
-
* Keeps track of the current dispatcher.
|
19
|
-
*/
|
20
|
-
var ReactCurrentDispatcher$1 = {
|
21
|
-
current: null
|
22
|
-
};
|
17
|
+
// -----------------------------------------------------------------------------
|
23
18
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
19
|
+
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
20
|
+
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
21
|
+
|
22
|
+
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
23
|
+
// as a normal prop instead of stripping it from the props object.
|
24
|
+
// Passes `ref` as a normal prop instead of stripping it from the props object
|
25
|
+
// during element creation.
|
26
|
+
|
27
|
+
var enableRefAsProp = true;
|
28
|
+
|
29
|
+
var enableRenderableContext = true; // -----------------------------------------------------------------------------
|
30
|
+
// stuff. Intended to enable React core members to more easily debug scheduling
|
31
|
+
// issues in DEV builds.
|
32
|
+
|
33
|
+
var enableDebugTracing = false;
|
34
|
+
|
35
|
+
var ReactSharedInternals = {
|
36
|
+
H: null,
|
37
|
+
C: null
|
36
38
|
};
|
37
39
|
|
38
|
-
|
39
|
-
|
40
|
+
{
|
41
|
+
ReactSharedInternals.owner = null;
|
42
|
+
}
|
40
43
|
|
41
44
|
{
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
45
|
+
var currentExtraStackFrame = null;
|
46
|
+
|
47
|
+
ReactSharedInternals.setExtraStackFrame = function (stack) {
|
48
|
+
currentExtraStackFrame = stack;
|
46
49
|
}; // Stack implementation injected by the current renderer.
|
47
50
|
|
48
51
|
|
49
|
-
|
52
|
+
ReactSharedInternals.getCurrentStack = null;
|
50
53
|
|
51
|
-
|
54
|
+
ReactSharedInternals.getStackAddendum = function () {
|
52
55
|
var stack = ''; // Add an extra top frame while an element is being validated
|
53
56
|
|
54
57
|
if (currentExtraStackFrame) {
|
@@ -56,7 +59,7 @@ var currentExtraStackFrame = null;
|
|
56
59
|
} // Delegate to the injected renderer-specific implementation
|
57
60
|
|
58
61
|
|
59
|
-
var impl =
|
62
|
+
var impl = ReactSharedInternals.getCurrentStack;
|
60
63
|
|
61
64
|
if (impl) {
|
62
65
|
stack += impl() || '';
|
@@ -66,15 +69,6 @@ var currentExtraStackFrame = null;
|
|
66
69
|
};
|
67
70
|
}
|
68
71
|
|
69
|
-
var ReactSharedInternals = {
|
70
|
-
ReactCurrentDispatcher: ReactCurrentDispatcher$1,
|
71
|
-
ReactCurrentOwner: ReactCurrentOwner$1
|
72
|
-
};
|
73
|
-
|
74
|
-
{
|
75
|
-
ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame$1;
|
76
|
-
}
|
77
|
-
|
78
72
|
// by calls to these methods by a Babel plugin.
|
79
73
|
//
|
80
74
|
// In PROD (or in packages without access to React internals),
|
@@ -107,8 +101,7 @@ function printWarning(level, format, args) {
|
|
107
101
|
// When changing this logic, you might want to also
|
108
102
|
// update consoleWithStackDev.www.js as well.
|
109
103
|
{
|
110
|
-
var
|
111
|
-
var stack = ReactDebugCurrentFrame.getStackAddendum();
|
104
|
+
var stack = ReactSharedInternals.getStackAddendum();
|
112
105
|
|
113
106
|
if (stack !== '') {
|
114
107
|
format += '%s';
|
@@ -130,31 +123,6 @@ function printWarning(level, format, args) {
|
|
130
123
|
|
131
124
|
var assign = Object.assign;
|
132
125
|
|
133
|
-
// -----------------------------------------------------------------------------
|
134
|
-
|
135
|
-
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
136
|
-
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
137
|
-
|
138
|
-
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
139
|
-
// as a normal prop instead of stripping it from the props object.
|
140
|
-
// Passes `ref` as a normal prop instead of stripping it from the props object
|
141
|
-
// during element creation.
|
142
|
-
|
143
|
-
var enableRefAsProp = true;
|
144
|
-
|
145
|
-
var enableRenderableContext = true; // -----------------------------------------------------------------------------
|
146
|
-
// stuff. Intended to enable React core members to more easily debug scheduling
|
147
|
-
// issues in DEV builds.
|
148
|
-
|
149
|
-
var enableDebugTracing = false;
|
150
|
-
|
151
|
-
/**
|
152
|
-
* Keeps track of the current Cache dispatcher.
|
153
|
-
*/
|
154
|
-
var ReactCurrentCache = {
|
155
|
-
current: null
|
156
|
-
};
|
157
|
-
|
158
126
|
function createFetchCache() {
|
159
127
|
return new Map();
|
160
128
|
}
|
@@ -176,7 +144,7 @@ function generateCacheKey(request) {
|
|
176
144
|
var originalFetch = fetch;
|
177
145
|
|
178
146
|
var cachedFetch = function fetch(resource, options) {
|
179
|
-
var dispatcher =
|
147
|
+
var dispatcher = ReactSharedInternals.C;
|
180
148
|
|
181
149
|
if (!dispatcher) {
|
182
150
|
// We're outside a cached scope.
|
@@ -278,10 +246,6 @@ function generateCacheKey(request) {
|
|
278
246
|
}
|
279
247
|
}
|
280
248
|
|
281
|
-
var ReactServerSharedInternals = {
|
282
|
-
ReactCurrentCache: ReactCurrentCache
|
283
|
-
};
|
284
|
-
|
285
249
|
var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
|
286
250
|
|
287
251
|
function isArray(a) {
|
@@ -626,9 +590,8 @@ function reenableLogs() {
|
|
626
590
|
}
|
627
591
|
}
|
628
592
|
|
629
|
-
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
|
630
593
|
var prefix;
|
631
|
-
function describeBuiltInComponentFrame(name
|
594
|
+
function describeBuiltInComponentFrame(name) {
|
632
595
|
{
|
633
596
|
if (prefix === undefined) {
|
634
597
|
// Extract the VM specific prefix used by each line.
|
@@ -682,13 +645,13 @@ function describeNativeComponentFrame(fn, construct) {
|
|
682
645
|
var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined.
|
683
646
|
|
684
647
|
Error.prepareStackTrace = undefined;
|
685
|
-
var previousDispatcher;
|
648
|
+
var previousDispatcher = null;
|
686
649
|
|
687
650
|
{
|
688
|
-
previousDispatcher =
|
651
|
+
previousDispatcher = ReactSharedInternals.H; // Set the dispatcher in DEV because this might be call in the render function
|
689
652
|
// for warnings.
|
690
653
|
|
691
|
-
|
654
|
+
ReactSharedInternals.H = null;
|
692
655
|
disableLogs();
|
693
656
|
}
|
694
657
|
/**
|
@@ -873,7 +836,7 @@ function describeNativeComponentFrame(fn, construct) {
|
|
873
836
|
reentry = false;
|
874
837
|
|
875
838
|
{
|
876
|
-
|
839
|
+
ReactSharedInternals.H = previousDispatcher;
|
877
840
|
reenableLogs();
|
878
841
|
}
|
879
842
|
|
@@ -892,7 +855,7 @@ function describeNativeComponentFrame(fn, construct) {
|
|
892
855
|
|
893
856
|
return syntheticFrame;
|
894
857
|
}
|
895
|
-
function describeFunctionComponentFrame(fn
|
858
|
+
function describeFunctionComponentFrame(fn) {
|
896
859
|
{
|
897
860
|
return describeNativeComponentFrame(fn, false);
|
898
861
|
}
|
@@ -903,7 +866,7 @@ function shouldConstruct(Component) {
|
|
903
866
|
return !!(prototype && prototype.isReactComponent);
|
904
867
|
}
|
905
868
|
|
906
|
-
function describeUnknownElementTypeFrameInDEV(type
|
869
|
+
function describeUnknownElementTypeFrameInDEV(type) {
|
907
870
|
|
908
871
|
if (type == null) {
|
909
872
|
return '';
|
@@ -934,7 +897,7 @@ function describeUnknownElementTypeFrameInDEV(type, ownerFn) {
|
|
934
897
|
|
935
898
|
case REACT_MEMO_TYPE:
|
936
899
|
// Memo may contain any component type so we recursively resolve it.
|
937
|
-
return describeUnknownElementTypeFrameInDEV(type.type
|
900
|
+
return describeUnknownElementTypeFrameInDEV(type.type);
|
938
901
|
|
939
902
|
case REACT_LAZY_TYPE:
|
940
903
|
{
|
@@ -944,7 +907,7 @@ function describeUnknownElementTypeFrameInDEV(type, ownerFn) {
|
|
944
907
|
|
945
908
|
try {
|
946
909
|
// Lazy may contain any component type so we recursively resolve it.
|
947
|
-
return describeUnknownElementTypeFrameInDEV(init(payload)
|
910
|
+
return describeUnknownElementTypeFrameInDEV(init(payload));
|
948
911
|
} catch (x) {}
|
949
912
|
}
|
950
913
|
}
|
@@ -953,11 +916,10 @@ function describeUnknownElementTypeFrameInDEV(type, ownerFn) {
|
|
953
916
|
return '';
|
954
917
|
}
|
955
918
|
|
956
|
-
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
957
|
-
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
958
919
|
var REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference');
|
959
920
|
var specialPropKeyWarningShown;
|
960
921
|
var didWarnAboutElementRef;
|
922
|
+
var didWarnAboutOldJSXRuntime;
|
961
923
|
|
962
924
|
{
|
963
925
|
didWarnAboutElementRef = {};
|
@@ -1192,6 +1154,20 @@ function createElement(type, config, children) {
|
|
1192
1154
|
var ref = null;
|
1193
1155
|
|
1194
1156
|
if (config != null) {
|
1157
|
+
{
|
1158
|
+
if (!didWarnAboutOldJSXRuntime && '__self' in config && // Do not assume this is the result of an oudated JSX transform if key
|
1159
|
+
// is present, because the modern JSX transform sometimes outputs
|
1160
|
+
// createElement to preserve precedence between a static key and a
|
1161
|
+
// spread key. To avoid false positive warnings, we never warn if
|
1162
|
+
// there's a key.
|
1163
|
+
!('key' in config)) {
|
1164
|
+
didWarnAboutOldJSXRuntime = true;
|
1165
|
+
|
1166
|
+
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
|
1167
|
+
'https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html');
|
1168
|
+
}
|
1169
|
+
}
|
1170
|
+
|
1195
1171
|
if (hasValidRef(config)) ;
|
1196
1172
|
|
1197
1173
|
if (hasValidKey(config)) {
|
@@ -1260,7 +1236,7 @@ function createElement(type, config, children) {
|
|
1260
1236
|
}
|
1261
1237
|
}
|
1262
1238
|
|
1263
|
-
var element = ReactElement(type, key, ref, undefined, undefined,
|
1239
|
+
var element = ReactElement(type, key, ref, undefined, undefined, ReactSharedInternals.owner, props);
|
1264
1240
|
|
1265
1241
|
if (type === REACT_FRAGMENT_TYPE) {
|
1266
1242
|
validateFragmentProps(element);
|
@@ -1294,8 +1270,7 @@ function cloneElement(element, config, children) {
|
|
1294
1270
|
|
1295
1271
|
if (config != null) {
|
1296
1272
|
if (hasValidRef(config)) {
|
1297
|
-
|
1298
|
-
owner = ReactCurrentOwner.current;
|
1273
|
+
owner = ReactSharedInternals.owner;
|
1299
1274
|
}
|
1300
1275
|
|
1301
1276
|
if (hasValidKey(config)) {
|
@@ -1354,8 +1329,8 @@ function cloneElement(element, config, children) {
|
|
1354
1329
|
|
1355
1330
|
function getDeclarationErrorAddendum() {
|
1356
1331
|
{
|
1357
|
-
if (
|
1358
|
-
var name = getComponentNameFromType(
|
1332
|
+
if (ReactSharedInternals.owner) {
|
1333
|
+
var name = getComponentNameFromType(ReactSharedInternals.owner.type);
|
1359
1334
|
|
1360
1335
|
if (name) {
|
1361
1336
|
return '\n\nCheck the render method of `' + name + '`.';
|
@@ -1459,9 +1434,17 @@ function validateExplicitKey(element, parentType) {
|
|
1459
1434
|
|
1460
1435
|
var childOwner = '';
|
1461
1436
|
|
1462
|
-
if (element && element._owner && element._owner !==
|
1463
|
-
|
1464
|
-
|
1437
|
+
if (element && element._owner != null && element._owner !== ReactSharedInternals.owner) {
|
1438
|
+
var ownerName = null;
|
1439
|
+
|
1440
|
+
if (typeof element._owner.tag === 'number') {
|
1441
|
+
ownerName = getComponentNameFromType(element._owner.type);
|
1442
|
+
} else if (typeof element._owner.name === 'string') {
|
1443
|
+
ownerName = element._owner.name;
|
1444
|
+
} // Give the component that originally created this child.
|
1445
|
+
|
1446
|
+
|
1447
|
+
childOwner = " It was passed a child from " + ownerName + ".";
|
1465
1448
|
}
|
1466
1449
|
|
1467
1450
|
setCurrentlyValidatingElement(element);
|
@@ -1475,11 +1458,10 @@ function validateExplicitKey(element, parentType) {
|
|
1475
1458
|
function setCurrentlyValidatingElement(element) {
|
1476
1459
|
{
|
1477
1460
|
if (element) {
|
1478
|
-
var
|
1479
|
-
|
1480
|
-
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
1461
|
+
var stack = describeUnknownElementTypeFrameInDEV(element.type);
|
1462
|
+
ReactSharedInternals.setExtraStackFrame(stack);
|
1481
1463
|
} else {
|
1482
|
-
|
1464
|
+
ReactSharedInternals.setExtraStackFrame(null);
|
1483
1465
|
}
|
1484
1466
|
}
|
1485
1467
|
}
|
@@ -1894,7 +1876,7 @@ function createRef() {
|
|
1894
1876
|
}
|
1895
1877
|
|
1896
1878
|
function resolveDispatcher() {
|
1897
|
-
var dispatcher =
|
1879
|
+
var dispatcher = ReactSharedInternals.H;
|
1898
1880
|
|
1899
1881
|
{
|
1900
1882
|
if (dispatcher === null) {
|
@@ -2128,7 +2110,7 @@ function createCacheNode() {
|
|
2128
2110
|
|
2129
2111
|
function cache(fn) {
|
2130
2112
|
return function () {
|
2131
|
-
var dispatcher =
|
2113
|
+
var dispatcher = ReactSharedInternals.C;
|
2132
2114
|
|
2133
2115
|
if (!dispatcher) {
|
2134
2116
|
// If there is no dispatcher, then we treat this as not being cached.
|
@@ -2210,14 +2192,6 @@ function cache(fn) {
|
|
2210
2192
|
};
|
2211
2193
|
}
|
2212
2194
|
|
2213
|
-
/**
|
2214
|
-
* Keeps track of the current batch's configuration such as how long an update
|
2215
|
-
* should suspend for if it needs to.
|
2216
|
-
*/
|
2217
|
-
var ReactCurrentBatchConfig = {
|
2218
|
-
transition: null
|
2219
|
-
};
|
2220
|
-
|
2221
2195
|
var reportGlobalError = typeof reportError === 'function' ? // In modern browsers, reportError will dispatch an error event,
|
2222
2196
|
// emulating an uncaught JavaScript error.
|
2223
2197
|
reportError : function (error) {
|
@@ -2249,18 +2223,18 @@ reportError : function (error) {
|
|
2249
2223
|
};
|
2250
2224
|
|
2251
2225
|
function startTransition(scope, options) {
|
2252
|
-
var prevTransition =
|
2226
|
+
var prevTransition = ReactSharedInternals.T; // Each renderer registers a callback to receive the return value of
|
2253
2227
|
// the scope function. This is used to implement async actions.
|
2254
2228
|
|
2255
2229
|
var callbacks = new Set();
|
2256
2230
|
var transition = {
|
2257
2231
|
_callbacks: callbacks
|
2258
2232
|
};
|
2259
|
-
|
2260
|
-
var currentTransition =
|
2233
|
+
ReactSharedInternals.T = transition;
|
2234
|
+
var currentTransition = ReactSharedInternals.T;
|
2261
2235
|
|
2262
2236
|
{
|
2263
|
-
|
2237
|
+
ReactSharedInternals.T._updatedFibers = new Set();
|
2264
2238
|
}
|
2265
2239
|
|
2266
2240
|
{
|
@@ -2277,7 +2251,7 @@ function startTransition(scope, options) {
|
|
2277
2251
|
reportGlobalError(error);
|
2278
2252
|
} finally {
|
2279
2253
|
warnAboutTransitionSubscriptions(prevTransition, currentTransition);
|
2280
|
-
|
2254
|
+
ReactSharedInternals.T = prevTransition;
|
2281
2255
|
}
|
2282
2256
|
}
|
2283
2257
|
}
|
@@ -2298,7 +2272,7 @@ function warnAboutTransitionSubscriptions(prevTransition, currentTransition) {
|
|
2298
2272
|
|
2299
2273
|
function noop() {}
|
2300
2274
|
|
2301
|
-
var ReactVersion = '19.0.0-canary-
|
2275
|
+
var ReactVersion = '19.0.0-canary-adb717393-20240411';
|
2302
2276
|
|
2303
2277
|
// Patch fetch
|
2304
2278
|
var Children = {
|
@@ -2314,8 +2288,7 @@ exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
2314
2288
|
exports.Profiler = REACT_PROFILER_TYPE;
|
2315
2289
|
exports.StrictMode = REACT_STRICT_MODE_TYPE;
|
2316
2290
|
exports.Suspense = REACT_SUSPENSE_TYPE;
|
2317
|
-
exports.
|
2318
|
-
exports.__SECRET_SERVER_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactServerSharedInternals;
|
2291
|
+
exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
|
2319
2292
|
exports.cache = cache;
|
2320
2293
|
exports.cloneElement = cloneElement;
|
2321
2294
|
exports.createElement = createElement;
|
@@ -19,11 +19,9 @@ const assign = Object.assign;
|
|
19
19
|
|
20
20
|
const enableRefAsProp = true;
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
const ReactCurrentCache = {
|
26
|
-
current: null
|
22
|
+
const ReactSharedInternals = {
|
23
|
+
H: null,
|
24
|
+
C: null
|
27
25
|
};
|
28
26
|
|
29
27
|
function createFetchCache() {
|
@@ -47,7 +45,7 @@ function generateCacheKey(request) {
|
|
47
45
|
const originalFetch = fetch;
|
48
46
|
|
49
47
|
const cachedFetch = function fetch(resource, options) {
|
50
|
-
const dispatcher =
|
48
|
+
const dispatcher = ReactSharedInternals.C;
|
51
49
|
|
52
50
|
if (!dispatcher) {
|
53
51
|
// We're outside a cached scope.
|
@@ -145,36 +143,6 @@ function generateCacheKey(request) {
|
|
145
143
|
}
|
146
144
|
}
|
147
145
|
|
148
|
-
/**
|
149
|
-
* Keeps track of the current dispatcher.
|
150
|
-
*/
|
151
|
-
const ReactCurrentDispatcher = {
|
152
|
-
current: null
|
153
|
-
};
|
154
|
-
|
155
|
-
/**
|
156
|
-
* Keeps track of the current owner.
|
157
|
-
*
|
158
|
-
* The current owner is the component who should own any components that are
|
159
|
-
* currently being constructed.
|
160
|
-
*/
|
161
|
-
const ReactCurrentOwner$1 = {
|
162
|
-
/**
|
163
|
-
* @internal
|
164
|
-
* @type {ReactComponent}
|
165
|
-
*/
|
166
|
-
current: null
|
167
|
-
};
|
168
|
-
|
169
|
-
const ReactSharedInternals = {
|
170
|
-
ReactCurrentDispatcher,
|
171
|
-
ReactCurrentOwner: ReactCurrentOwner$1
|
172
|
-
};
|
173
|
-
|
174
|
-
const ReactServerSharedInternals = {
|
175
|
-
ReactCurrentCache
|
176
|
-
};
|
177
|
-
|
178
146
|
// Do not require this module directly! Use normal `invariant` calls with
|
179
147
|
// template literal strings. The messages will be replaced with error codes
|
180
148
|
// during build.
|
@@ -230,8 +198,6 @@ function getIteratorFn(maybeIterable) {
|
|
230
198
|
// $FlowFixMe[method-unbinding]
|
231
199
|
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
232
200
|
|
233
|
-
const ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
234
|
-
|
235
201
|
function hasValidRef(config) {
|
236
202
|
|
237
203
|
return config.ref !== undefined;
|
@@ -357,7 +323,7 @@ function createElement(type, config, children) {
|
|
357
323
|
}
|
358
324
|
}
|
359
325
|
|
360
|
-
const element = ReactElement(type, key, ref, undefined, undefined,
|
326
|
+
const element = ReactElement(type, key, ref, undefined, undefined, ReactSharedInternals.owner, props);
|
361
327
|
|
362
328
|
return element;
|
363
329
|
}
|
@@ -387,8 +353,7 @@ function cloneElement(element, config, children) {
|
|
387
353
|
|
388
354
|
if (config != null) {
|
389
355
|
if (hasValidRef(config)) {
|
390
|
-
|
391
|
-
owner = ReactCurrentOwner.current;
|
356
|
+
owner = ReactSharedInternals.owner;
|
392
357
|
}
|
393
358
|
|
394
359
|
if (hasValidKey(config)) {
|
@@ -781,7 +746,7 @@ function createRef() {
|
|
781
746
|
}
|
782
747
|
|
783
748
|
function resolveDispatcher() {
|
784
|
-
const dispatcher =
|
749
|
+
const dispatcher = ReactSharedInternals.H;
|
785
750
|
// intentionally don't throw our own error because this is in a hot path.
|
786
751
|
// Also helps ensure this is inlined.
|
787
752
|
|
@@ -921,7 +886,7 @@ function createCacheNode() {
|
|
921
886
|
|
922
887
|
function cache(fn) {
|
923
888
|
return function () {
|
924
|
-
const dispatcher =
|
889
|
+
const dispatcher = ReactSharedInternals.C;
|
925
890
|
|
926
891
|
if (!dispatcher) {
|
927
892
|
// If there is no dispatcher, then we treat this as not being cached.
|
@@ -1003,14 +968,6 @@ function cache(fn) {
|
|
1003
968
|
};
|
1004
969
|
}
|
1005
970
|
|
1006
|
-
/**
|
1007
|
-
* Keeps track of the current batch's configuration such as how long an update
|
1008
|
-
* should suspend for if it needs to.
|
1009
|
-
*/
|
1010
|
-
const ReactCurrentBatchConfig = {
|
1011
|
-
transition: null
|
1012
|
-
};
|
1013
|
-
|
1014
971
|
const reportGlobalError = typeof reportError === 'function' ? // In modern browsers, reportError will dispatch an error event,
|
1015
972
|
// emulating an uncaught JavaScript error.
|
1016
973
|
reportError : error => {
|
@@ -1042,15 +999,15 @@ reportError : error => {
|
|
1042
999
|
};
|
1043
1000
|
|
1044
1001
|
function startTransition(scope, options) {
|
1045
|
-
const prevTransition =
|
1002
|
+
const prevTransition = ReactSharedInternals.T; // Each renderer registers a callback to receive the return value of
|
1046
1003
|
// the scope function. This is used to implement async actions.
|
1047
1004
|
|
1048
1005
|
const callbacks = new Set();
|
1049
1006
|
const transition = {
|
1050
1007
|
_callbacks: callbacks
|
1051
1008
|
};
|
1052
|
-
|
1053
|
-
const currentTransition =
|
1009
|
+
ReactSharedInternals.T = transition;
|
1010
|
+
const currentTransition = ReactSharedInternals.T;
|
1054
1011
|
|
1055
1012
|
{
|
1056
1013
|
try {
|
@@ -1063,14 +1020,14 @@ function startTransition(scope, options) {
|
|
1063
1020
|
} catch (error) {
|
1064
1021
|
reportGlobalError(error);
|
1065
1022
|
} finally {
|
1066
|
-
|
1023
|
+
ReactSharedInternals.T = prevTransition;
|
1067
1024
|
}
|
1068
1025
|
}
|
1069
1026
|
}
|
1070
1027
|
|
1071
1028
|
function noop() {}
|
1072
1029
|
|
1073
|
-
var ReactVersion = '19.0.0-canary-
|
1030
|
+
var ReactVersion = '19.0.0-canary-adb717393-20240411';
|
1074
1031
|
|
1075
1032
|
// Patch fetch
|
1076
1033
|
const Children = {
|
@@ -1086,8 +1043,7 @@ exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
1086
1043
|
exports.Profiler = REACT_PROFILER_TYPE;
|
1087
1044
|
exports.StrictMode = REACT_STRICT_MODE_TYPE;
|
1088
1045
|
exports.Suspense = REACT_SUSPENSE_TYPE;
|
1089
|
-
exports.
|
1090
|
-
exports.__SECRET_SERVER_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactServerSharedInternals;
|
1046
|
+
exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
|
1091
1047
|
exports.cache = cache;
|
1092
1048
|
exports.cloneElement = cloneElement;
|
1093
1049
|
exports.createElement = createElement;
|
@@ -7,24 +7,23 @@
|
|
7
7
|
This source code is licensed under the MIT license found in the
|
8
8
|
LICENSE file in the root directory of this source tree.
|
9
9
|
*/
|
10
|
-
'use strict';var l=Object.assign,m={
|
11
|
-
if("function"===typeof fetch){var p=fetch,q=function(a,b){var d=m.
|
12
|
-
|
13
|
-
function
|
14
|
-
var
|
15
|
-
function
|
16
|
-
function
|
17
|
-
function
|
18
|
-
1;f=0;var k=""===c?".":c+":";if(
|
19
|
-
function
|
20
|
-
var
|
21
|
-
exports.Children={map:
|
22
|
-
exports.cache=function(a){return function(){var b=m.
|
10
|
+
'use strict';var l=Object.assign,m={H:null,C:null};function n(){return new Map}
|
11
|
+
if("function"===typeof fetch){var p=fetch,q=function(a,b){var d=m.C;if(!d||b&&b.signal)return p(a,b);if("string"!==typeof a||b){var c="string"===typeof a||a instanceof URL?new Request(a,b):a;if("GET"!==c.method&&"HEAD"!==c.method||c.keepalive)return p(a,b);var e=JSON.stringify([c.method,Array.from(c.headers.entries()),c.mode,c.redirect,c.credentials,c.referrer,c.referrerPolicy,c.integrity]);c=c.url}else e='["GET",[],null,"follow",null,null,null,null]',c=a;var g=d.getCacheForType(n);d=g.get(c);if(void 0===
|
12
|
+
d)a=p(a,b),g.set(c,[e,a]);else{c=0;for(g=d.length;c<g;c+=2){var f=d[c+1];if(d[c]===e)return a=f,a.then(function(k){return k.clone()})}a=p(a,b);d.push(e,a)}return a.then(function(k){return k.clone()})};l(q,p);try{fetch=q}catch(a){try{globalThis.fetch=q}catch(b){console.warn("React was unable to patch the fetch() function in this environment. Suspensey APIs might not work correctly as a result.")}}}
|
13
|
+
function r(a){var b="https://react.dev/errors/"+a;if(1<arguments.length){b+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)b+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
|
14
|
+
var t=Array.isArray,u=Symbol.for("react.element"),v=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),z=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),B=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),D=Symbol.iterator;function E(a){if(null===a||"object"!==typeof a)return null;a=D&&a[D]||a["@@iterator"];return"function"===typeof a?a:null}var F=Object.prototype.hasOwnProperty;
|
15
|
+
function G(a,b,d,c,e,g,f){d=f.ref;return{$$typeof:u,type:a,key:b,ref:void 0!==d?d:null,props:f}}function H(a,b){return G(a.type,b,null,void 0,void 0,void 0,a.props)}function I(a){return"object"===typeof a&&null!==a&&a.$$typeof===u}function escape(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(d){return b[d]})}var J=/\/+/g;function K(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(""+a.key):b.toString(36)}function L(){}
|
16
|
+
function M(a){switch(a.status){case "fulfilled":return a.value;case "rejected":throw a.reason;default:switch("string"===typeof a.status?a.then(L,L):(a.status="pending",a.then(function(b){"pending"===a.status&&(a.status="fulfilled",a.value=b)},function(b){"pending"===a.status&&(a.status="rejected",a.reason=b)})),a.status){case "fulfilled":return a.value;case "rejected":throw a.reason;}}throw a;}
|
17
|
+
function N(a,b,d,c,e){var g=typeof a;if("undefined"===g||"boolean"===g)a=null;var f=!1;if(null===a)f=!0;else switch(g){case "bigint":case "string":case "number":f=!0;break;case "object":switch(a.$$typeof){case u:case v:f=!0;break;case C:return f=a._init,N(f(a._payload),b,d,c,e)}}if(f)return e=e(a),f=""===c?"."+K(a,0):c,t(e)?(d="",null!=f&&(d=f.replace(J,"$&/")+"/"),N(e,b,d,"",function(R){return R})):null!=e&&(I(e)&&(e=H(e,d+(!e.key||a&&a.key===e.key?"":(""+e.key).replace(J,"$&/")+"/")+f)),b.push(e)),
|
18
|
+
1;f=0;var k=""===c?".":c+":";if(t(a))for(var h=0;h<a.length;h++)c=a[h],g=k+K(c,h),f+=N(c,b,d,g,e);else if(h=E(a),"function"===typeof h)for(a=h.call(a),h=0;!(c=a.next()).done;)c=c.value,g=k+K(c,h++),f+=N(c,b,d,g,e);else if("object"===g){if("function"===typeof a.then)return N(M(a),b,d,c,e);b=String(a);throw Error(r(31,"[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b));}return f}
|
19
|
+
function O(a,b,d){if(null==a)return a;var c=[],e=0;N(a,c,"","",function(g){return b.call(d,g,e++)});return c}function P(a){if(-1===a._status){var b=a._result;b=b();b.then(function(d){if(0===a._status||-1===a._status)a._status=1,a._result=d},function(d){if(0===a._status||-1===a._status)a._status=2,a._result=d});-1===a._status&&(a._status=0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;}function Q(){return new WeakMap}function S(){return{s:0,v:void 0,o:null,p:null}}
|
20
|
+
var T="function"===typeof reportError?reportError:function(a){if("object"===typeof window&&"function"===typeof window.ErrorEvent){var b=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"===typeof a&&null!==a&&"string"===typeof a.message?String(a.message):String(a),error:a});if(!window.dispatchEvent(b))return}else if("object"===typeof process&&"function"===typeof process.emit){process.emit("uncaughtException",a);return}console.error(a)};function U(){}
|
21
|
+
exports.Children={map:O,forEach:function(a,b,d){O(a,function(){b.apply(this,arguments)},d)},count:function(a){var b=0;O(a,function(){b++});return b},toArray:function(a){return O(a,function(b){return b})||[]},only:function(a){if(!I(a))throw Error(r(143));return a}};exports.Fragment=w;exports.Profiler=y;exports.StrictMode=x;exports.Suspense=A;exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=m;
|
22
|
+
exports.cache=function(a){return function(){var b=m.C;if(!b)return a.apply(null,arguments);var d=b.getCacheForType(Q);b=d.get(a);void 0===b&&(b=S(),d.set(a,b));d=0;for(var c=arguments.length;d<c;d++){var e=arguments[d];if("function"===typeof e||"object"===typeof e&&null!==e){var g=b.o;null===g&&(b.o=g=new WeakMap);b=g.get(e);void 0===b&&(b=S(),g.set(e,b))}else g=b.p,null===g&&(b.p=g=new Map),b=g.get(e),void 0===b&&(b=S(),g.set(e,b))}if(1===b.s)return b.v;if(2===b.s)throw b.v;try{var f=a.apply(null,
|
23
23
|
arguments);d=b;d.s=1;return d.v=f}catch(k){throw f=b,f.s=2,f.v=k,k;}}};
|
24
|
-
exports.cloneElement=function(a,b,d){if(null===a||void 0===a)throw Error(
|
25
|
-
exports.createElement=function(a,b,d){var c,e={},g=null;if(null!=b)for(c in void 0!==b.key&&(g=""+b.key),b)
|
26
|
-
exports.forwardRef=function(a){return{$$typeof:
|
27
|
-
exports.
|
28
|
-
exports.useId=function(){return r.current.useId()};exports.useMemo=function(a,b){return r.current.useMemo(a,b)};exports.version="19.0.0-canary-e3ebcd54b-20240405";
|
24
|
+
exports.cloneElement=function(a,b,d){if(null===a||void 0===a)throw Error(r(267,a));var c=l({},a.props),e=a.key,g=void 0;if(null!=b)for(f in void 0!==b.ref&&(g=m.owner),void 0!==b.key&&(e=""+b.key),b)!F.call(b,f)||"key"===f||"__self"===f||"__source"===f||"ref"===f&&void 0===b.ref||(c[f]=b[f]);var f=arguments.length-2;if(1===f)c.children=d;else if(1<f){for(var k=Array(f),h=0;h<f;h++)k[h]=arguments[h+2];c.children=k}return G(a.type,e,null,void 0,void 0,g,c)};
|
25
|
+
exports.createElement=function(a,b,d){var c,e={},g=null;if(null!=b)for(c in void 0!==b.key&&(g=""+b.key),b)F.call(b,c)&&"key"!==c&&"__self"!==c&&"__source"!==c&&(e[c]=b[c]);var f=arguments.length-2;if(1===f)e.children=d;else if(1<f){for(var k=Array(f),h=0;h<f;h++)k[h]=arguments[h+2];e.children=k}if(a&&a.defaultProps)for(c in f=a.defaultProps,f)void 0===e[c]&&(e[c]=f[c]);return G(a,g,null,void 0,void 0,m.owner,e)};exports.createRef=function(){return{current:null}};
|
26
|
+
exports.forwardRef=function(a){return{$$typeof:z,render:a}};exports.isValidElement=I;exports.lazy=function(a){return{$$typeof:C,_payload:{_status:-1,_result:a},_init:P}};exports.memo=function(a,b){return{$$typeof:B,type:a,compare:void 0===b?null:b}};exports.startTransition=function(a){var b=m.T,d=new Set;m.T={_callbacks:d};var c=m.T;try{var e=a();"object"===typeof e&&null!==e&&"function"===typeof e.then&&(d.forEach(function(g){return g(c,e)}),e.then(U,T))}catch(g){T(g)}finally{m.T=b}};
|
27
|
+
exports.use=function(a){return m.H.use(a)};exports.useActionState=function(a,b,d){return m.H.useActionState(a,b,d)};exports.useCallback=function(a,b){return m.H.useCallback(a,b)};exports.useDebugValue=function(){};exports.useId=function(){return m.H.useId()};exports.useMemo=function(a,b){return m.H.useMemo(a,b)};exports.version="19.0.0-canary-adb717393-20240411";
|
29
28
|
|
30
29
|
//# sourceMappingURL=react.react-server.production.min.js.map
|