react 19.0.0-canary-db913d8e17-20240422 → 19.0.0-canary-cb151849e1-20240424
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 +20 -24
- package/cjs/react-jsx-runtime.development.js +20 -24
- package/cjs/react-jsx-runtime.production.js +1 -1
- package/cjs/react-jsx-runtime.profiling.js +1 -1
- package/cjs/react-jsx-runtime.react-server.development.js +20 -24
- package/cjs/react-jsx-runtime.react-server.production.js +1 -1
- package/cjs/react.development.js +29 -41
- package/cjs/react.production.js +5 -6
- package/cjs/react.react-server.development.js +6 -135
- package/cjs/react.react-server.production.js +5 -72
- package/package.json +1 -1
@@ -16,11 +16,25 @@ if (process.env.NODE_ENV !== "production") {
|
|
16
16
|
|
17
17
|
var React = require('react');
|
18
18
|
|
19
|
-
//
|
20
|
-
|
21
|
-
//
|
22
|
-
//
|
23
|
-
|
19
|
+
// -----------------------------------------------------------------------------
|
20
|
+
|
21
|
+
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
22
|
+
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
23
|
+
|
24
|
+
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
25
|
+
// as a normal prop instead of stripping it from the props object.
|
26
|
+
// Passes `ref` as a normal prop instead of stripping it from the props object
|
27
|
+
// during element creation.
|
28
|
+
|
29
|
+
var enableRefAsProp = true;
|
30
|
+
|
31
|
+
var enableRenderableContext = true; // Enables the `initialValue` option for `useDeferredValue`
|
32
|
+
// stuff. Intended to enable React core members to more easily debug scheduling
|
33
|
+
// issues in DEV builds.
|
34
|
+
|
35
|
+
var enableDebugTracing = false;
|
36
|
+
|
37
|
+
var REACT_ELEMENT_TYPE = Symbol.for('react.transitional.element') ;
|
24
38
|
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
|
25
39
|
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
|
26
40
|
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
|
@@ -89,24 +103,6 @@ function printWarning(level, format, args) {
|
|
89
103
|
}
|
90
104
|
}
|
91
105
|
|
92
|
-
// -----------------------------------------------------------------------------
|
93
|
-
|
94
|
-
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
95
|
-
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
96
|
-
|
97
|
-
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
98
|
-
// as a normal prop instead of stripping it from the props object.
|
99
|
-
// Passes `ref` as a normal prop instead of stripping it from the props object
|
100
|
-
// during element creation.
|
101
|
-
|
102
|
-
var enableRefAsProp = true;
|
103
|
-
|
104
|
-
var enableRenderableContext = true; // Enables the `initialValue` option for `useDeferredValue`
|
105
|
-
// stuff. Intended to enable React core members to more easily debug scheduling
|
106
|
-
// issues in DEV builds.
|
107
|
-
|
108
|
-
var enableDebugTracing = false;
|
109
|
-
|
110
106
|
function getWrappedName(outerType, innerType, wrapperName) {
|
111
107
|
var displayName = outerType.displayName;
|
112
108
|
|
@@ -817,7 +813,7 @@ function elementRefGetterWithDeprecationWarning() {
|
|
817
813
|
/**
|
818
814
|
* Factory method to create a new React element. This no longer adheres to
|
819
815
|
* the class pattern, so do not use new to call it. Also, instanceof check
|
820
|
-
* will not work. Instead test $$typeof field against Symbol.for('react.element') to check
|
816
|
+
* will not work. Instead test $$typeof field against Symbol.for('react.transitional.element') to check
|
821
817
|
* if something is a React Element.
|
822
818
|
*
|
823
819
|
* @param {*} type
|
@@ -16,11 +16,25 @@ if (process.env.NODE_ENV !== "production") {
|
|
16
16
|
|
17
17
|
var React = require('react');
|
18
18
|
|
19
|
-
//
|
20
|
-
|
21
|
-
//
|
22
|
-
//
|
23
|
-
|
19
|
+
// -----------------------------------------------------------------------------
|
20
|
+
|
21
|
+
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
22
|
+
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
23
|
+
|
24
|
+
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
25
|
+
// as a normal prop instead of stripping it from the props object.
|
26
|
+
// Passes `ref` as a normal prop instead of stripping it from the props object
|
27
|
+
// during element creation.
|
28
|
+
|
29
|
+
var enableRefAsProp = true;
|
30
|
+
|
31
|
+
var enableRenderableContext = true; // Enables the `initialValue` option for `useDeferredValue`
|
32
|
+
// stuff. Intended to enable React core members to more easily debug scheduling
|
33
|
+
// issues in DEV builds.
|
34
|
+
|
35
|
+
var enableDebugTracing = false;
|
36
|
+
|
37
|
+
var REACT_ELEMENT_TYPE = Symbol.for('react.transitional.element') ;
|
24
38
|
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
|
25
39
|
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
|
26
40
|
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
|
@@ -89,24 +103,6 @@ function printWarning(level, format, args) {
|
|
89
103
|
}
|
90
104
|
}
|
91
105
|
|
92
|
-
// -----------------------------------------------------------------------------
|
93
|
-
|
94
|
-
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
95
|
-
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
96
|
-
|
97
|
-
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
98
|
-
// as a normal prop instead of stripping it from the props object.
|
99
|
-
// Passes `ref` as a normal prop instead of stripping it from the props object
|
100
|
-
// during element creation.
|
101
|
-
|
102
|
-
var enableRefAsProp = true;
|
103
|
-
|
104
|
-
var enableRenderableContext = true; // Enables the `initialValue` option for `useDeferredValue`
|
105
|
-
// stuff. Intended to enable React core members to more easily debug scheduling
|
106
|
-
// issues in DEV builds.
|
107
|
-
|
108
|
-
var enableDebugTracing = false;
|
109
|
-
|
110
106
|
function getWrappedName(outerType, innerType, wrapperName) {
|
111
107
|
var displayName = outerType.displayName;
|
112
108
|
|
@@ -817,7 +813,7 @@ function elementRefGetterWithDeprecationWarning() {
|
|
817
813
|
/**
|
818
814
|
* Factory method to create a new React element. This no longer adheres to
|
819
815
|
* the class pattern, so do not use new to call it. Also, instanceof check
|
820
|
-
* will not work. Instead test $$typeof field against Symbol.for('react.element') to check
|
816
|
+
* will not work. Instead test $$typeof field against Symbol.for('react.transitional.element') to check
|
821
817
|
* if something is a React Element.
|
822
818
|
*
|
823
819
|
* @param {*} type
|
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
"use strict";
|
12
12
|
require("react");
|
13
|
-
var REACT_ELEMENT_TYPE = Symbol.for("react.element"),
|
13
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
14
14
|
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
15
15
|
function jsxProd(type, config, maybeKey) {
|
16
16
|
var key = null;
|
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
"use strict";
|
12
12
|
require("react");
|
13
|
-
var REACT_ELEMENT_TYPE = Symbol.for("react.element"),
|
13
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
14
14
|
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
15
15
|
function jsxProd(type, config, maybeKey) {
|
16
16
|
var key = null;
|
@@ -16,11 +16,25 @@ if (process.env.NODE_ENV !== "production") {
|
|
16
16
|
|
17
17
|
var React = require('react');
|
18
18
|
|
19
|
-
//
|
20
|
-
|
21
|
-
//
|
22
|
-
//
|
23
|
-
|
19
|
+
// -----------------------------------------------------------------------------
|
20
|
+
|
21
|
+
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
22
|
+
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
23
|
+
|
24
|
+
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
25
|
+
// as a normal prop instead of stripping it from the props object.
|
26
|
+
// Passes `ref` as a normal prop instead of stripping it from the props object
|
27
|
+
// during element creation.
|
28
|
+
|
29
|
+
var enableRefAsProp = true;
|
30
|
+
|
31
|
+
var enableRenderableContext = true; // Enables the `initialValue` option for `useDeferredValue`
|
32
|
+
// stuff. Intended to enable React core members to more easily debug scheduling
|
33
|
+
// issues in DEV builds.
|
34
|
+
|
35
|
+
var enableDebugTracing = false;
|
36
|
+
|
37
|
+
var REACT_ELEMENT_TYPE = Symbol.for('react.transitional.element') ;
|
24
38
|
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
|
25
39
|
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
|
26
40
|
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
|
@@ -94,24 +108,6 @@ function printWarning(level, format, args) {
|
|
94
108
|
}
|
95
109
|
}
|
96
110
|
|
97
|
-
// -----------------------------------------------------------------------------
|
98
|
-
|
99
|
-
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
100
|
-
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
101
|
-
|
102
|
-
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
103
|
-
// as a normal prop instead of stripping it from the props object.
|
104
|
-
// Passes `ref` as a normal prop instead of stripping it from the props object
|
105
|
-
// during element creation.
|
106
|
-
|
107
|
-
var enableRefAsProp = true;
|
108
|
-
|
109
|
-
var enableRenderableContext = true; // Enables the `initialValue` option for `useDeferredValue`
|
110
|
-
// stuff. Intended to enable React core members to more easily debug scheduling
|
111
|
-
// issues in DEV builds.
|
112
|
-
|
113
|
-
var enableDebugTracing = false;
|
114
|
-
|
115
111
|
function getWrappedName(outerType, innerType, wrapperName) {
|
116
112
|
var displayName = outerType.displayName;
|
117
113
|
|
@@ -822,7 +818,7 @@ function elementRefGetterWithDeprecationWarning() {
|
|
822
818
|
/**
|
823
819
|
* Factory method to create a new React element. This no longer adheres to
|
824
820
|
* the class pattern, so do not use new to call it. Also, instanceof check
|
825
|
-
* will not work. Instead test $$typeof field against Symbol.for('react.element') to check
|
821
|
+
* will not work. Instead test $$typeof field against Symbol.for('react.transitional.element') to check
|
826
822
|
* if something is a React Element.
|
827
823
|
*
|
828
824
|
* @param {*} type
|
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
"use strict";
|
12
12
|
var React = require("react"),
|
13
|
-
REACT_ELEMENT_TYPE = Symbol.for("react.element"),
|
13
|
+
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
14
14
|
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
15
15
|
if (!React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)
|
16
16
|
throw Error(
|
package/cjs/react.development.js
CHANGED
@@ -23,13 +23,31 @@ if (
|
|
23
23
|
) {
|
24
24
|
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
25
25
|
}
|
26
|
-
var ReactVersion = '19.0.0-canary-
|
26
|
+
var ReactVersion = '19.0.0-canary-cb151849e1-20240424';
|
27
27
|
|
28
|
-
//
|
29
|
-
|
30
|
-
//
|
31
|
-
//
|
32
|
-
|
28
|
+
// -----------------------------------------------------------------------------
|
29
|
+
|
30
|
+
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
31
|
+
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
32
|
+
|
33
|
+
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
34
|
+
// as a normal prop instead of stripping it from the props object.
|
35
|
+
// Passes `ref` as a normal prop instead of stripping it from the props object
|
36
|
+
// during element creation.
|
37
|
+
|
38
|
+
var enableRefAsProp = true;
|
39
|
+
// This allows us to land breaking changes to remove legacy mode APIs in experimental builds
|
40
|
+
// before removing them in stable in the next Major
|
41
|
+
|
42
|
+
var disableLegacyMode = true;
|
43
|
+
|
44
|
+
var enableRenderableContext = true; // Enables the `initialValue` option for `useDeferredValue`
|
45
|
+
// stuff. Intended to enable React core members to more easily debug scheduling
|
46
|
+
// issues in DEV builds.
|
47
|
+
|
48
|
+
var enableDebugTracing = false;
|
49
|
+
|
50
|
+
var REACT_ELEMENT_TYPE = Symbol.for('react.transitional.element') ;
|
33
51
|
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
|
34
52
|
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
|
35
53
|
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
|
@@ -60,28 +78,6 @@ function getIteratorFn(maybeIterable) {
|
|
60
78
|
return null;
|
61
79
|
}
|
62
80
|
|
63
|
-
// -----------------------------------------------------------------------------
|
64
|
-
|
65
|
-
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
66
|
-
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
67
|
-
|
68
|
-
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
69
|
-
// as a normal prop instead of stripping it from the props object.
|
70
|
-
// Passes `ref` as a normal prop instead of stripping it from the props object
|
71
|
-
// during element creation.
|
72
|
-
|
73
|
-
var enableRefAsProp = true;
|
74
|
-
// This allows us to land breaking changes to remove legacy mode APIs in experimental builds
|
75
|
-
// before removing them in stable in the next Major
|
76
|
-
|
77
|
-
var disableLegacyMode = true;
|
78
|
-
|
79
|
-
var enableRenderableContext = true; // Enables the `initialValue` option for `useDeferredValue`
|
80
|
-
// stuff. Intended to enable React core members to more easily debug scheduling
|
81
|
-
// issues in DEV builds.
|
82
|
-
|
83
|
-
var enableDebugTracing = false;
|
84
|
-
|
85
81
|
var ReactSharedInternals = {
|
86
82
|
H: null,
|
87
83
|
C: null,
|
@@ -266,21 +262,14 @@ var ReactNoopUpdateQueue = {
|
|
266
262
|
|
267
263
|
var assign = Object.assign;
|
268
264
|
|
269
|
-
var emptyObject = {};
|
270
|
-
|
271
|
-
{
|
272
|
-
Object.freeze(emptyObject);
|
273
|
-
}
|
274
265
|
/**
|
275
266
|
* Base class helpers for the updating state of a component.
|
276
267
|
*/
|
277
268
|
|
278
|
-
|
279
269
|
function Component(props, context, updater) {
|
280
270
|
this.props = props;
|
281
|
-
this.context = context;
|
282
|
-
|
283
|
-
this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the
|
271
|
+
this.context = context;
|
272
|
+
this.refs = {}; // We initialize the default updater but the real one gets injected by the
|
284
273
|
// renderer.
|
285
274
|
|
286
275
|
this.updater = updater || ReactNoopUpdateQueue;
|
@@ -380,7 +369,7 @@ function PureComponent(props, context, updater) {
|
|
380
369
|
this.props = props;
|
381
370
|
this.context = context; // If a component has string refs, we will assign a different object later.
|
382
371
|
|
383
|
-
this.refs =
|
372
|
+
this.refs = {};
|
384
373
|
this.updater = updater || ReactNoopUpdateQueue;
|
385
374
|
}
|
386
375
|
|
@@ -1112,7 +1101,7 @@ function elementRefGetterWithDeprecationWarning() {
|
|
1112
1101
|
/**
|
1113
1102
|
* Factory method to create a new React element. This no longer adheres to
|
1114
1103
|
* the class pattern, so do not use new to call it. Also, instanceof check
|
1115
|
-
* will not work. Instead test $$typeof field against Symbol.for('react.element') to check
|
1104
|
+
* will not work. Instead test $$typeof field against Symbol.for('react.transitional.element') to check
|
1116
1105
|
* if something is a React Element.
|
1117
1106
|
*
|
1118
1107
|
* @param {*} type
|
@@ -1285,8 +1274,7 @@ function createElement(type, config, children) {
|
|
1285
1274
|
!('key' in config)) {
|
1286
1275
|
didWarnAboutOldJSXRuntime = true;
|
1287
1276
|
|
1288
|
-
warn('Your app (or one of its dependencies) is using an outdated JSX ' + 'transform. Update to the modern JSX transform for ' + 'faster performance: '
|
1289
|
-
'https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html');
|
1277
|
+
warn('Your app (or one of its dependencies) is using an outdated JSX ' + 'transform. Update to the modern JSX transform for ' + 'faster performance: https://react.dev/link/new-jsx-transform');
|
1290
1278
|
}
|
1291
1279
|
}
|
1292
1280
|
|
package/cjs/react.production.js
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
*/
|
10
10
|
|
11
11
|
"use strict";
|
12
|
-
var REACT_ELEMENT_TYPE = Symbol.for("react.element"),
|
12
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
13
13
|
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
14
14
|
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
15
15
|
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
@@ -36,12 +36,11 @@ var ReactNoopUpdateQueue = {
|
|
36
36
|
enqueueReplaceState: function () {},
|
37
37
|
enqueueSetState: function () {}
|
38
38
|
},
|
39
|
-
assign = Object.assign
|
40
|
-
emptyObject = {};
|
39
|
+
assign = Object.assign;
|
41
40
|
function Component(props, context, updater) {
|
42
41
|
this.props = props;
|
43
42
|
this.context = context;
|
44
|
-
this.refs =
|
43
|
+
this.refs = {};
|
45
44
|
this.updater = updater || ReactNoopUpdateQueue;
|
46
45
|
}
|
47
46
|
Component.prototype.isReactComponent = {};
|
@@ -64,7 +63,7 @@ ComponentDummy.prototype = Component.prototype;
|
|
64
63
|
function PureComponent(props, context, updater) {
|
65
64
|
this.props = props;
|
66
65
|
this.context = context;
|
67
|
-
this.refs =
|
66
|
+
this.refs = {};
|
68
67
|
this.updater = updater || ReactNoopUpdateQueue;
|
69
68
|
}
|
70
69
|
var pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());
|
@@ -545,4 +544,4 @@ exports.useSyncExternalStore = function (
|
|
545
544
|
exports.useTransition = function () {
|
546
545
|
return ReactSharedInternals.H.useTransition();
|
547
546
|
};
|
548
|
-
exports.version = "19.0.0-canary-
|
547
|
+
exports.version = "19.0.0-canary-cb151849e1-20240424";
|
@@ -121,142 +121,13 @@ function printWarning(level, format, args) {
|
|
121
121
|
}
|
122
122
|
}
|
123
123
|
|
124
|
-
var assign = Object.assign;
|
125
|
-
|
126
|
-
function createFetchCache() {
|
127
|
-
return new Map();
|
128
|
-
}
|
129
|
-
|
130
|
-
var simpleCacheKey = '["GET",[],null,"follow",null,null,null,null]'; // generateCacheKey(new Request('https://blank'));
|
131
|
-
|
132
|
-
function generateCacheKey(request) {
|
133
|
-
// We pick the fields that goes into the key used to dedupe requests.
|
134
|
-
// We don't include the `cache` field, because we end up using whatever
|
135
|
-
// caching resulted from the first request.
|
136
|
-
// Notably we currently don't consider non-standard (or future) options.
|
137
|
-
// This might not be safe. TODO: warn for non-standard extensions differing.
|
138
|
-
// IF YOU CHANGE THIS UPDATE THE simpleCacheKey ABOVE.
|
139
|
-
return JSON.stringify([request.method, Array.from(request.headers.entries()), request.mode, request.redirect, request.credentials, request.referrer, request.referrerPolicy, request.integrity]);
|
140
|
-
}
|
141
|
-
|
142
|
-
{
|
143
|
-
if (typeof fetch === 'function') {
|
144
|
-
var originalFetch = fetch;
|
145
|
-
|
146
|
-
var cachedFetch = function fetch(resource, options) {
|
147
|
-
var dispatcher = ReactSharedInternals.C;
|
148
|
-
|
149
|
-
if (!dispatcher) {
|
150
|
-
// We're outside a cached scope.
|
151
|
-
return originalFetch(resource, options);
|
152
|
-
}
|
153
|
-
|
154
|
-
if (options && options.signal) {
|
155
|
-
// If we're passed a signal, then we assume that
|
156
|
-
// someone else controls the lifetime of this object and opts out of
|
157
|
-
// caching. It's effectively the opt-out mechanism.
|
158
|
-
// Ideally we should be able to check this on the Request but
|
159
|
-
// it always gets initialized with its own signal so we don't
|
160
|
-
// know if it's supposed to override - unless we also override the
|
161
|
-
// Request constructor.
|
162
|
-
return originalFetch(resource, options);
|
163
|
-
} // Normalize the Request
|
164
|
-
|
165
|
-
|
166
|
-
var url;
|
167
|
-
var cacheKey;
|
168
|
-
|
169
|
-
if (typeof resource === 'string' && !options) {
|
170
|
-
// Fast path.
|
171
|
-
cacheKey = simpleCacheKey;
|
172
|
-
url = resource;
|
173
|
-
} else {
|
174
|
-
// Normalize the request.
|
175
|
-
// if resource is not a string or a URL (its an instance of Request)
|
176
|
-
// then do not instantiate a new Request but instead
|
177
|
-
// reuse the request as to not disturb the body in the event it's a ReadableStream.
|
178
|
-
var request = typeof resource === 'string' || resource instanceof URL ? new Request(resource, options) : resource;
|
179
|
-
|
180
|
-
if (request.method !== 'GET' && request.method !== 'HEAD' || // $FlowFixMe[prop-missing]: keepalive is real
|
181
|
-
request.keepalive) {
|
182
|
-
// We currently don't dedupe requests that might have side-effects. Those
|
183
|
-
// have to be explicitly cached. We assume that the request doesn't have a
|
184
|
-
// body if it's GET or HEAD.
|
185
|
-
// keepalive gets treated the same as if you passed a custom cache signal.
|
186
|
-
return originalFetch(resource, options);
|
187
|
-
}
|
188
|
-
|
189
|
-
cacheKey = generateCacheKey(request);
|
190
|
-
url = request.url;
|
191
|
-
}
|
192
|
-
|
193
|
-
var cache = dispatcher.getCacheForType(createFetchCache);
|
194
|
-
var cacheEntries = cache.get(url);
|
195
|
-
var match;
|
196
|
-
|
197
|
-
if (cacheEntries === undefined) {
|
198
|
-
// We pass the original arguments here in case normalizing the Request
|
199
|
-
// doesn't include all the options in this environment.
|
200
|
-
match = originalFetch(resource, options);
|
201
|
-
cache.set(url, [cacheKey, match]);
|
202
|
-
} else {
|
203
|
-
// We use an array as the inner data structure since it's lighter and
|
204
|
-
// we typically only expect to see one or two entries here.
|
205
|
-
for (var i = 0, l = cacheEntries.length; i < l; i += 2) {
|
206
|
-
var key = cacheEntries[i];
|
207
|
-
var value = cacheEntries[i + 1];
|
208
|
-
|
209
|
-
if (key === cacheKey) {
|
210
|
-
match = value; // I would've preferred a labelled break but lint says no.
|
211
|
-
|
212
|
-
return match.then(function (response) {
|
213
|
-
return response.clone();
|
214
|
-
});
|
215
|
-
}
|
216
|
-
}
|
217
|
-
|
218
|
-
match = originalFetch(resource, options);
|
219
|
-
cacheEntries.push(cacheKey, match);
|
220
|
-
} // We clone the response so that each time you call this you get a new read
|
221
|
-
// of the body so that it can be read multiple times.
|
222
|
-
|
223
|
-
|
224
|
-
return match.then(function (response) {
|
225
|
-
return response.clone();
|
226
|
-
});
|
227
|
-
}; // We don't expect to see any extra properties on fetch but if there are any,
|
228
|
-
// copy them over. Useful for extended fetch environments or mocks.
|
229
|
-
|
230
|
-
|
231
|
-
assign(cachedFetch, originalFetch);
|
232
|
-
|
233
|
-
try {
|
234
|
-
// eslint-disable-next-line no-native-reassign
|
235
|
-
fetch = cachedFetch;
|
236
|
-
} catch (error1) {
|
237
|
-
try {
|
238
|
-
// In case assigning it globally fails, try globalThis instead just in case it exists.
|
239
|
-
globalThis.fetch = cachedFetch;
|
240
|
-
} catch (error2) {
|
241
|
-
// Log even in production just to make sure this is seen if only prod is frozen.
|
242
|
-
// eslint-disable-next-line react-internal/no-production-logging
|
243
|
-
warn('React was unable to patch the fetch() function in this environment. ' + 'Suspensey APIs might not work correctly as a result.');
|
244
|
-
}
|
245
|
-
}
|
246
|
-
}
|
247
|
-
}
|
248
|
-
|
249
124
|
var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
|
250
125
|
|
251
126
|
function isArray(a) {
|
252
127
|
return isArrayImpl(a);
|
253
128
|
}
|
254
129
|
|
255
|
-
|
256
|
-
// When adding new symbols to this file,
|
257
|
-
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
|
258
|
-
// The Symbol used to tag the ReactElement-like types.
|
259
|
-
var REACT_ELEMENT_TYPE = Symbol.for('react.element');
|
130
|
+
var REACT_ELEMENT_TYPE = Symbol.for('react.transitional.element') ;
|
260
131
|
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
|
261
132
|
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
|
262
133
|
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
|
@@ -472,6 +343,8 @@ function getComponentNameFromType(type) {
|
|
472
343
|
// $FlowFixMe[method-unbinding]
|
473
344
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
474
345
|
|
346
|
+
var assign = Object.assign;
|
347
|
+
|
475
348
|
var REACT_CLIENT_REFERENCE$1 = Symbol.for('react.client.reference');
|
476
349
|
function isValidElementType(type) {
|
477
350
|
if (typeof type === 'string' || typeof type === 'function') {
|
@@ -990,7 +863,7 @@ function elementRefGetterWithDeprecationWarning() {
|
|
990
863
|
/**
|
991
864
|
* Factory method to create a new React element. This no longer adheres to
|
992
865
|
* the class pattern, so do not use new to call it. Also, instanceof check
|
993
|
-
* will not work. Instead test $$typeof field against Symbol.for('react.element') to check
|
866
|
+
* will not work. Instead test $$typeof field against Symbol.for('react.transitional.element') to check
|
994
867
|
* if something is a React Element.
|
995
868
|
*
|
996
869
|
* @param {*} type
|
@@ -1163,8 +1036,7 @@ function createElement(type, config, children) {
|
|
1163
1036
|
!('key' in config)) {
|
1164
1037
|
didWarnAboutOldJSXRuntime = true;
|
1165
1038
|
|
1166
|
-
warn('Your app (or one of its dependencies) is using an outdated JSX ' + 'transform. Update to the modern JSX transform for ' + 'faster performance: '
|
1167
|
-
'https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html');
|
1039
|
+
warn('Your app (or one of its dependencies) is using an outdated JSX ' + 'transform. Update to the modern JSX transform for ' + 'faster performance: https://react.dev/link/new-jsx-transform');
|
1168
1040
|
}
|
1169
1041
|
}
|
1170
1042
|
|
@@ -2275,9 +2147,8 @@ function warnAboutTransitionSubscriptions(prevTransition, currentTransition) {
|
|
2275
2147
|
|
2276
2148
|
function noop() {}
|
2277
2149
|
|
2278
|
-
var ReactVersion = '19.0.0-canary-
|
2150
|
+
var ReactVersion = '19.0.0-canary-cb151849e1-20240424';
|
2279
2151
|
|
2280
|
-
// Patch fetch
|
2281
2152
|
var Children = {
|
2282
2153
|
map: mapChildren,
|
2283
2154
|
forEach: forEachChildren,
|
@@ -9,75 +9,7 @@
|
|
9
9
|
*/
|
10
10
|
|
11
11
|
"use strict";
|
12
|
-
var
|
13
|
-
ReactSharedInternals = { H: null, C: null };
|
14
|
-
function createFetchCache() {
|
15
|
-
return new Map();
|
16
|
-
}
|
17
|
-
if ("function" === typeof fetch) {
|
18
|
-
var originalFetch = fetch,
|
19
|
-
cachedFetch = function (resource, options) {
|
20
|
-
var dispatcher = ReactSharedInternals.C;
|
21
|
-
if (!dispatcher || (options && options.signal))
|
22
|
-
return originalFetch(resource, options);
|
23
|
-
if ("string" !== typeof resource || options) {
|
24
|
-
var url =
|
25
|
-
"string" === typeof resource || resource instanceof URL
|
26
|
-
? new Request(resource, options)
|
27
|
-
: resource;
|
28
|
-
if (("GET" !== url.method && "HEAD" !== url.method) || url.keepalive)
|
29
|
-
return originalFetch(resource, options);
|
30
|
-
var cacheKey = JSON.stringify([
|
31
|
-
url.method,
|
32
|
-
Array.from(url.headers.entries()),
|
33
|
-
url.mode,
|
34
|
-
url.redirect,
|
35
|
-
url.credentials,
|
36
|
-
url.referrer,
|
37
|
-
url.referrerPolicy,
|
38
|
-
url.integrity
|
39
|
-
]);
|
40
|
-
url = url.url;
|
41
|
-
} else
|
42
|
-
(cacheKey = '["GET",[],null,"follow",null,null,null,null]'),
|
43
|
-
(url = resource);
|
44
|
-
var cache = dispatcher.getCacheForType(createFetchCache);
|
45
|
-
dispatcher = cache.get(url);
|
46
|
-
if (void 0 === dispatcher)
|
47
|
-
(resource = originalFetch(resource, options)),
|
48
|
-
cache.set(url, [cacheKey, resource]);
|
49
|
-
else {
|
50
|
-
url = 0;
|
51
|
-
for (cache = dispatcher.length; url < cache; url += 2) {
|
52
|
-
var value = dispatcher[url + 1];
|
53
|
-
if (dispatcher[url] === cacheKey)
|
54
|
-
return (
|
55
|
-
(resource = value),
|
56
|
-
resource.then(function (response) {
|
57
|
-
return response.clone();
|
58
|
-
})
|
59
|
-
);
|
60
|
-
}
|
61
|
-
resource = originalFetch(resource, options);
|
62
|
-
dispatcher.push(cacheKey, resource);
|
63
|
-
}
|
64
|
-
return resource.then(function (response) {
|
65
|
-
return response.clone();
|
66
|
-
});
|
67
|
-
};
|
68
|
-
assign(cachedFetch, originalFetch);
|
69
|
-
try {
|
70
|
-
fetch = cachedFetch;
|
71
|
-
} catch (error1) {
|
72
|
-
try {
|
73
|
-
globalThis.fetch = cachedFetch;
|
74
|
-
} catch (error2) {
|
75
|
-
console.warn(
|
76
|
-
"React was unable to patch the fetch() function in this environment. Suspensey APIs might not work correctly as a result."
|
77
|
-
);
|
78
|
-
}
|
79
|
-
}
|
80
|
-
}
|
12
|
+
var ReactSharedInternals = { H: null, C: null };
|
81
13
|
function formatProdErrorMessage(code) {
|
82
14
|
var url = "https://react.dev/errors/" + code;
|
83
15
|
if (1 < arguments.length) {
|
@@ -94,7 +26,7 @@ function formatProdErrorMessage(code) {
|
|
94
26
|
);
|
95
27
|
}
|
96
28
|
var isArrayImpl = Array.isArray,
|
97
|
-
REACT_ELEMENT_TYPE = Symbol.for("react.element"),
|
29
|
+
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
98
30
|
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
99
31
|
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
100
32
|
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
@@ -111,7 +43,8 @@ function getIteratorFn(maybeIterable) {
|
|
111
43
|
maybeIterable["@@iterator"];
|
112
44
|
return "function" === typeof maybeIterable ? maybeIterable : null;
|
113
45
|
}
|
114
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty
|
46
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty,
|
47
|
+
assign = Object.assign;
|
115
48
|
function ReactElement(type, key, _ref, self, source, owner, props) {
|
116
49
|
_ref = props.ref;
|
117
50
|
return {
|
@@ -552,4 +485,4 @@ exports.useId = function () {
|
|
552
485
|
exports.useMemo = function (create, deps) {
|
553
486
|
return ReactSharedInternals.H.useMemo(create, deps);
|
554
487
|
};
|
555
|
-
exports.version = "19.0.0-canary-
|
488
|
+
exports.version = "19.0.0-canary-cb151849e1-20240424";
|
package/package.json
CHANGED