react 19.0.0-rc-20b6f4c0e8-20240607 → 19.0.0-rc-a532d91d01-20240610
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-compiler-runtime.development.js +36 -81
- package/cjs/react-jsx-dev-runtime.development.js +643 -1225
- package/cjs/react-jsx-dev-runtime.react-server.development.js +654 -1260
- package/cjs/react-jsx-runtime.development.js +639 -1243
- package/cjs/react-jsx-runtime.react-server.development.js +654 -1260
- package/cjs/react.development.js +1507 -2761
- package/cjs/react.production.js +1 -1
- package/cjs/react.react-server.development.js +1093 -2047
- package/cjs/react.react-server.production.js +1 -1
- package/package.json +1 -1
@@ -8,88 +8,43 @@
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
9
9
|
*/
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
{
|
23
|
-
{
|
24
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
11
|
+
"use strict";
|
12
|
+
"production" !== process.env.NODE_ENV &&
|
13
|
+
(function () {
|
14
|
+
function error(format) {
|
15
|
+
for (
|
16
|
+
var _len2 = arguments.length,
|
17
|
+
args = Array(1 < _len2 ? _len2 - 1 : 0),
|
18
|
+
_key2 = 1;
|
19
|
+
_key2 < _len2;
|
20
|
+
_key2++
|
21
|
+
)
|
25
22
|
args[_key2 - 1] = arguments[_key2];
|
26
|
-
|
27
|
-
|
28
|
-
printWarning('error', format, args, new Error('react-stack-top-frame'));
|
29
|
-
}
|
30
|
-
}
|
31
|
-
} // eslint-disable-next-line react-internal/no-production-logging
|
32
|
-
|
33
|
-
function printWarning(level, format, args, currentStack) {
|
34
|
-
// When changing this logic, you might want to also
|
35
|
-
// update consoleWithStackDev.www.js as well.
|
36
|
-
{
|
37
|
-
var isErrorLogger = format === '%s\n\n%s\n' || format === '%o\n\n%s\n\n%s\n';
|
38
|
-
|
39
|
-
if (ReactSharedInternals.getCurrentStack) {
|
40
|
-
// We only add the current stack to the console when createTask is not supported.
|
41
|
-
// Since createTask requires DevTools to be open to work, this means that stacks
|
42
|
-
// can be lost while DevTools isn't open but we can't detect this.
|
43
|
-
var stack = ReactSharedInternals.getCurrentStack(currentStack);
|
44
|
-
|
45
|
-
if (stack !== '') {
|
46
|
-
format += '%s';
|
47
|
-
args = args.concat([stack]);
|
48
|
-
}
|
23
|
+
printWarning("error", format, args, Error("react-stack-top-frame"));
|
49
24
|
}
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
} // We intentionally don't use spread (or .apply) directly because it
|
65
|
-
// breaks IE9: https://github.com/facebook/react/issues/13610
|
66
|
-
// eslint-disable-next-line react-internal/no-production-logging
|
67
|
-
|
68
|
-
|
69
|
-
Function.prototype.apply.call(console[level], console, args);
|
70
|
-
}
|
71
|
-
}
|
72
|
-
|
73
|
-
function resolveDispatcher() {
|
74
|
-
var dispatcher = ReactSharedInternals.H;
|
75
|
-
|
76
|
-
{
|
77
|
-
if (dispatcher === null) {
|
78
|
-
error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.');
|
25
|
+
function printWarning(level, format, args, currentStack) {
|
26
|
+
var isErrorLogger =
|
27
|
+
"%s\n\n%s\n" === format || "%o\n\n%s\n\n%s\n" === format;
|
28
|
+
ReactSharedInternals.getCurrentStack &&
|
29
|
+
((currentStack = ReactSharedInternals.getCurrentStack(currentStack)),
|
30
|
+
"" !== currentStack &&
|
31
|
+
((format += "%s"), (args = args.concat([currentStack]))));
|
32
|
+
isErrorLogger
|
33
|
+
? args.unshift(format)
|
34
|
+
: ((args = args.map(function (item) {
|
35
|
+
return String(item);
|
36
|
+
})),
|
37
|
+
args.unshift("Warning: " + format));
|
38
|
+
Function.prototype.apply.call(console[level], console, args);
|
79
39
|
}
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
return dispatcher.useMemoCache(size);
|
91
|
-
}
|
92
|
-
|
93
|
-
exports.c = useMemoCache;
|
40
|
+
var ReactSharedInternals =
|
41
|
+
require("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
42
|
+
exports.c = function (size) {
|
43
|
+
var dispatcher = ReactSharedInternals.H;
|
44
|
+
null === dispatcher &&
|
45
|
+
error(
|
46
|
+
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
|
47
|
+
);
|
48
|
+
return dispatcher.useMemoCache(size);
|
49
|
+
};
|
94
50
|
})();
|
95
|
-
}
|