Unverified Commit 5c18e9ac authored by Andrew Clark's avatar Andrew Clark Committed by GitHub

Update vendored React packages to next-41110021f (#46636)

Notable changes:

- https://github.com/facebook/react/pull/26275
- https://github.com/facebook/react/pull/26232
- https://github.com/facebook/react/pull/26239
- https://github.com/facebook/react/pull/26237

<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:
-->

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
Co-authored-by: 's avatarkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
parent 68a1d544
...@@ -189,11 +189,11 @@ ...@@ -189,11 +189,11 @@
"random-seed": "0.3.0", "random-seed": "0.3.0",
"react": "18.2.0", "react": "18.2.0",
"react-17": "npm:react@17.0.2", "react-17": "npm:react@17.0.2",
"react-builtin": "npm:react@18.3.0-next-bfb9cbd8c-20230223", "react-builtin": "npm:react@18.3.0-next-41110021f-20230301",
"react-dom": "18.2.0", "react-dom": "18.2.0",
"react-dom-17": "npm:react-dom@17.0.2", "react-dom-17": "npm:react-dom@17.0.2",
"react-dom-builtin": "npm:react-dom@18.3.0-next-bfb9cbd8c-20230223", "react-dom-builtin": "npm:react-dom@18.3.0-next-41110021f-20230301",
"react-server-dom-webpack": "18.3.0-next-bfb9cbd8c-20230223", "react-server-dom-webpack": "18.3.0-next-41110021f-20230301",
"react-ssr-prepass": "1.0.8", "react-ssr-prepass": "1.0.8",
"react-virtualized": "9.22.3", "react-virtualized": "9.22.3",
"relay-compiler": "13.0.2", "relay-compiler": "13.0.2",
......
...@@ -17,7 +17,7 @@ if (process.env.NODE_ENV !== "production") { ...@@ -17,7 +17,7 @@ if (process.env.NODE_ENV !== "production") {
var React = require('react'); var React = require('react');
var ReactDOM = require('react-dom'); var ReactDOM = require('react-dom');
var ReactVersion = '18.3.0-next-bfb9cbd8c-20230223'; var ReactVersion = '18.3.0-next-41110021f-20230301';
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
...@@ -2007,6 +2007,8 @@ var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL ...@@ -2007,6 +2007,8 @@ var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL
var ReactDOMCurrentDispatcher = ReactDOMSharedInternals.Dispatcher; var ReactDOMCurrentDispatcher = ReactDOMSharedInternals.Dispatcher;
var ReactDOMServerDispatcher = { var ReactDOMServerDispatcher = {
prefetchDNS: prefetchDNS,
preconnect: preconnect,
preload: preload, preload: preload,
preinit: preinit preinit: preinit
} ; } ;
...@@ -4551,7 +4553,10 @@ function writePreamble(destination, resources, responseState, willFlushAllSegmen ...@@ -4551,7 +4553,10 @@ function writePreamble(destination, resources, responseState, willFlushAllSegmen
writeChunk(destination, charsetChunks[i]); writeChunk(destination, charsetChunks[i]);
} }
charsetChunks.length = 0; charsetChunks.length = 0; // emit preconnect resources
resources.preconnects.forEach(flushResourceInPreamble, destination);
resources.preconnects.clear();
var preconnectChunks = responseState.preconnectChunks; var preconnectChunks = responseState.preconnectChunks;
for (i = 0; i < preconnectChunks.length; i++) { for (i = 0; i < preconnectChunks.length; i++) {
...@@ -4624,6 +4629,8 @@ function writeHoistables(destination, resources, responseState) { ...@@ -4624,6 +4629,8 @@ function writeHoistables(destination, resources, responseState) {
// We omit charsetChunks because we have already sent the shell and if it wasn't // We omit charsetChunks because we have already sent the shell and if it wasn't
// already sent it is too late now. // already sent it is too late now.
resources.preconnects.forEach(flushResourceLate, destination);
resources.preconnects.clear();
var preconnectChunks = responseState.preconnectChunks; var preconnectChunks = responseState.preconnectChunks;
for (i = 0; i < preconnectChunks.length; i++) { for (i = 0; i < preconnectChunks.length; i++) {
...@@ -4911,9 +4918,11 @@ function createResources() { ...@@ -4911,9 +4918,11 @@ function createResources() {
return { return {
// persistent // persistent
preloadsMap: new Map(), preloadsMap: new Map(),
preconnectsMap: new Map(),
stylesMap: new Map(), stylesMap: new Map(),
scriptsMap: new Map(), scriptsMap: new Map(),
// cleared on flush // cleared on flush
preconnects: new Set(),
fontPreloads: new Set(), fontPreloads: new Set(),
// usedImagePreloads: new Set(), // usedImagePreloads: new Set(),
precedences: new Map(), precedences: new Map(),
...@@ -4939,6 +4948,98 @@ function getResourceKey(as, href) { ...@@ -4939,6 +4948,98 @@ function getResourceKey(as, href) {
return "[" + as + "]" + href; return "[" + as + "]" + href;
} }
function prefetchDNS(href, options) {
if (!currentResources) {
// While we expect that preconnect calls are primarily going to be observed
// during render because effects and events don't run on the server it is
// still possible that these get called in module scope. This is valid on
// the client since there is still a document to interact with but on the
// server we need a request to associate the call to. Because of this we
// simply return and do not warn.
return;
}
var resources = currentResources;
{
if (typeof href !== 'string' || !href) {
error('ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href));
} else if (options != null) {
if (typeof options === 'object' && options.hasOwnProperty('crossOrigin')) {
error('ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.', getValueDescriptorExpectingEnumForWarning(options));
} else {
error('ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.', getValueDescriptorExpectingEnumForWarning(options));
}
}
}
if (typeof href === 'string' && href) {
var key = getResourceKey('prefetchDNS', href);
var resource = resources.preconnectsMap.get(key);
if (!resource) {
resource = {
type: 'preconnect',
chunks: [],
state: NoState,
props: null
};
resources.preconnectsMap.set(key, resource);
pushLinkImpl(resource.chunks, {
href: href,
rel: 'dns-prefetch'
});
}
resources.preconnects.add(resource);
}
}
function preconnect(href, options) {
if (!currentResources) {
// While we expect that preconnect calls are primarily going to be observed
// during render because effects and events don't run on the server it is
// still possible that these get called in module scope. This is valid on
// the client since there is still a document to interact with but on the
// server we need a request to associate the call to. Because of this we
// simply return and do not warn.
return;
}
var resources = currentResources;
{
if (typeof href !== 'string' || !href) {
error('ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href));
} else if (options != null && typeof options !== 'object') {
error('ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.', getValueDescriptorExpectingEnumForWarning(options));
} else if (options != null && typeof options.crossOrigin !== 'string') {
error('ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.', getValueDescriptorExpectingObjectForWarning(options.crossOrigin));
}
}
if (typeof href === 'string' && href) {
var crossOrigin = options == null || typeof options.crossOrigin !== 'string' ? null : options.crossOrigin === 'use-credentials' ? 'use-credentials' : '';
var key = "[preconnect][" + (crossOrigin === null ? 'null' : crossOrigin) + "]" + href;
var resource = resources.preconnectsMap.get(key);
if (!resource) {
resource = {
type: 'preconnect',
chunks: [],
state: NoState,
props: null
};
resources.preconnectsMap.set(key, resource);
pushLinkImpl(resource.chunks, {
rel: 'preconnect',
href: href,
crossOrigin: crossOrigin
});
}
resources.preconnects.add(resource);
}
}
function preload(href, options) { function preload(href, options) {
if (!currentResources) { if (!currentResources) {
// While we expect that preload calls are primarily going to be observed // While we expect that preload calls are primarily going to be observed
...@@ -5219,7 +5320,8 @@ function preloadPropsFromPreloadOptions(href, as, options) { ...@@ -5219,7 +5320,8 @@ function preloadPropsFromPreloadOptions(href, as, options) {
as: as, as: as,
href: href, href: href,
crossOrigin: as === 'font' ? '' : options.crossOrigin, crossOrigin: as === 'font' ? '' : options.crossOrigin,
integrity: options.integrity integrity: options.integrity,
type: options.type
}; };
} }
......
...@@ -18,7 +18,7 @@ var React = require('react'); ...@@ -18,7 +18,7 @@ var React = require('react');
var ReactDOM = require('react-dom'); var ReactDOM = require('react-dom');
var stream = require('stream'); var stream = require('stream');
var ReactVersion = '18.3.0-next-bfb9cbd8c-20230223'; var ReactVersion = '18.3.0-next-41110021f-20230301';
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
...@@ -2014,6 +2014,8 @@ var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL ...@@ -2014,6 +2014,8 @@ var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL
var ReactDOMCurrentDispatcher = ReactDOMSharedInternals.Dispatcher; var ReactDOMCurrentDispatcher = ReactDOMSharedInternals.Dispatcher;
var ReactDOMServerDispatcher = { var ReactDOMServerDispatcher = {
prefetchDNS: prefetchDNS,
preconnect: preconnect,
preload: preload, preload: preload,
preinit: preinit preinit: preinit
} ; } ;
...@@ -4558,7 +4560,10 @@ function writePreamble(destination, resources, responseState, willFlushAllSegmen ...@@ -4558,7 +4560,10 @@ function writePreamble(destination, resources, responseState, willFlushAllSegmen
writeChunk(destination, charsetChunks[i]); writeChunk(destination, charsetChunks[i]);
} }
charsetChunks.length = 0; charsetChunks.length = 0; // emit preconnect resources
resources.preconnects.forEach(flushResourceInPreamble, destination);
resources.preconnects.clear();
var preconnectChunks = responseState.preconnectChunks; var preconnectChunks = responseState.preconnectChunks;
for (i = 0; i < preconnectChunks.length; i++) { for (i = 0; i < preconnectChunks.length; i++) {
...@@ -4631,6 +4636,8 @@ function writeHoistables(destination, resources, responseState) { ...@@ -4631,6 +4636,8 @@ function writeHoistables(destination, resources, responseState) {
// We omit charsetChunks because we have already sent the shell and if it wasn't // We omit charsetChunks because we have already sent the shell and if it wasn't
// already sent it is too late now. // already sent it is too late now.
resources.preconnects.forEach(flushResourceLate, destination);
resources.preconnects.clear();
var preconnectChunks = responseState.preconnectChunks; var preconnectChunks = responseState.preconnectChunks;
for (i = 0; i < preconnectChunks.length; i++) { for (i = 0; i < preconnectChunks.length; i++) {
...@@ -4918,9 +4925,11 @@ function createResources() { ...@@ -4918,9 +4925,11 @@ function createResources() {
return { return {
// persistent // persistent
preloadsMap: new Map(), preloadsMap: new Map(),
preconnectsMap: new Map(),
stylesMap: new Map(), stylesMap: new Map(),
scriptsMap: new Map(), scriptsMap: new Map(),
// cleared on flush // cleared on flush
preconnects: new Set(),
fontPreloads: new Set(), fontPreloads: new Set(),
// usedImagePreloads: new Set(), // usedImagePreloads: new Set(),
precedences: new Map(), precedences: new Map(),
...@@ -4946,6 +4955,98 @@ function getResourceKey(as, href) { ...@@ -4946,6 +4955,98 @@ function getResourceKey(as, href) {
return "[" + as + "]" + href; return "[" + as + "]" + href;
} }
function prefetchDNS(href, options) {
if (!currentResources) {
// While we expect that preconnect calls are primarily going to be observed
// during render because effects and events don't run on the server it is
// still possible that these get called in module scope. This is valid on
// the client since there is still a document to interact with but on the
// server we need a request to associate the call to. Because of this we
// simply return and do not warn.
return;
}
var resources = currentResources;
{
if (typeof href !== 'string' || !href) {
error('ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href));
} else if (options != null) {
if (typeof options === 'object' && options.hasOwnProperty('crossOrigin')) {
error('ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.', getValueDescriptorExpectingEnumForWarning(options));
} else {
error('ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.', getValueDescriptorExpectingEnumForWarning(options));
}
}
}
if (typeof href === 'string' && href) {
var key = getResourceKey('prefetchDNS', href);
var resource = resources.preconnectsMap.get(key);
if (!resource) {
resource = {
type: 'preconnect',
chunks: [],
state: NoState,
props: null
};
resources.preconnectsMap.set(key, resource);
pushLinkImpl(resource.chunks, {
href: href,
rel: 'dns-prefetch'
});
}
resources.preconnects.add(resource);
}
}
function preconnect(href, options) {
if (!currentResources) {
// While we expect that preconnect calls are primarily going to be observed
// during render because effects and events don't run on the server it is
// still possible that these get called in module scope. This is valid on
// the client since there is still a document to interact with but on the
// server we need a request to associate the call to. Because of this we
// simply return and do not warn.
return;
}
var resources = currentResources;
{
if (typeof href !== 'string' || !href) {
error('ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href));
} else if (options != null && typeof options !== 'object') {
error('ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.', getValueDescriptorExpectingEnumForWarning(options));
} else if (options != null && typeof options.crossOrigin !== 'string') {
error('ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.', getValueDescriptorExpectingObjectForWarning(options.crossOrigin));
}
}
if (typeof href === 'string' && href) {
var crossOrigin = options == null || typeof options.crossOrigin !== 'string' ? null : options.crossOrigin === 'use-credentials' ? 'use-credentials' : '';
var key = "[preconnect][" + (crossOrigin === null ? 'null' : crossOrigin) + "]" + href;
var resource = resources.preconnectsMap.get(key);
if (!resource) {
resource = {
type: 'preconnect',
chunks: [],
state: NoState,
props: null
};
resources.preconnectsMap.set(key, resource);
pushLinkImpl(resource.chunks, {
rel: 'preconnect',
href: href,
crossOrigin: crossOrigin
});
}
resources.preconnects.add(resource);
}
}
function preload(href, options) { function preload(href, options) {
if (!currentResources) { if (!currentResources) {
// While we expect that preload calls are primarily going to be observed // While we expect that preload calls are primarily going to be observed
...@@ -5226,7 +5327,8 @@ function preloadPropsFromPreloadOptions(href, as, options) { ...@@ -5226,7 +5327,8 @@ function preloadPropsFromPreloadOptions(href, as, options) {
as: as, as: as,
href: href, href: href,
crossOrigin: as === 'font' ? '' : options.crossOrigin, crossOrigin: as === 'font' ? '' : options.crossOrigin,
integrity: options.integrity integrity: options.integrity,
type: options.type
}; };
} }
......
...@@ -14,7 +14,7 @@ if (process.env.NODE_ENV !== "production") { ...@@ -14,7 +14,7 @@ if (process.env.NODE_ENV !== "production") {
(function() { (function() {
'use strict'; 'use strict';
var ReactVersion = '18.3.0-next-bfb9cbd8c-20230223'; var ReactVersion = '18.3.0-next-41110021f-20230301';
var Internals = { var Internals = {
usingClientEntryPoint: false, usingClientEntryPoint: false,
...@@ -24,12 +24,22 @@ var Internals = { ...@@ -24,12 +24,22 @@ var Internals = {
} }
}; };
function preinit() { function prefetchDNS() {
var dispatcher = Internals.Dispatcher.current; var dispatcher = Internals.Dispatcher.current;
if (dispatcher) { if (dispatcher) {
dispatcher.preinit.apply(this, arguments); dispatcher.prefetchDNS.apply(this, arguments);
} // We don't error because preinit needs to be resilient to being called in a variety of scopes } // We don't error because preconnect needs to be resilient to being called in a variety of scopes
// and the runtime may not be capable of responding. The function is optimistic and not critical
// so we favor silent bailout over warning or erroring.
}
function preconnect() {
var dispatcher = Internals.Dispatcher.current;
if (dispatcher) {
dispatcher.preconnect.apply(this, arguments);
} // We don't error because preconnect needs to be resilient to being called in a variety of scopes
// and the runtime may not be capable of responding. The function is optimistic and not critical // and the runtime may not be capable of responding. The function is optimistic and not critical
// so we favor silent bailout over warning or erroring. // so we favor silent bailout over warning or erroring.
...@@ -43,6 +53,16 @@ function preload() { ...@@ -43,6 +53,16 @@ function preload() {
// and the runtime may not be capable of responding. The function is optimistic and not critical // and the runtime may not be capable of responding. The function is optimistic and not critical
// so we favor silent bailout over warning or erroring. // so we favor silent bailout over warning or erroring.
}
function preinit() {
var dispatcher = Internals.Dispatcher.current;
if (dispatcher) {
dispatcher.preinit.apply(this, arguments);
} // We don't error because preinit needs to be resilient to being called in a variety of scopes
// and the runtime may not be capable of responding. The function is optimistic and not critical
// so we favor silent bailout over warning or erroring.
} }
function createPortal() { function createPortal() {
...@@ -55,6 +75,8 @@ function flushSync() { ...@@ -55,6 +75,8 @@ function flushSync() {
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals; exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
exports.createPortal = createPortal; exports.createPortal = createPortal;
exports.flushSync = flushSync; exports.flushSync = flushSync;
exports.preconnect = preconnect;
exports.prefetchDNS = prefetchDNS;
exports.preinit = preinit; exports.preinit = preinit;
exports.preload = preload; exports.preload = preload;
exports.version = ReactVersion; exports.version = ReactVersion;
......
...@@ -8,4 +8,4 @@ ...@@ -8,4 +8,4 @@
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*/ */
'use strict';var b={usingClientEntryPoint:!1,Events:null,Dispatcher:{current:null}};function d(a){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)e+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=b; 'use strict';var b={usingClientEntryPoint:!1,Events:null,Dispatcher:{current:null}};function d(a){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)e+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=b;
exports.createPortal=function(){throw Error(d(448));};exports.flushSync=function(){throw Error(d(449));};exports.preinit=function(){var a=b.Dispatcher.current;a&&a.preinit.apply(this,arguments)};exports.preload=function(){var a=b.Dispatcher.current;a&&a.preload.apply(this,arguments)};exports.version="18.3.0-next-bfb9cbd8c-20230223"; exports.createPortal=function(){throw Error(d(448));};exports.flushSync=function(){throw Error(d(449));};exports.preconnect=function(){var a=b.Dispatcher.current;a&&a.preconnect.apply(this,arguments)};exports.prefetchDNS=function(){var a=b.Dispatcher.current;a&&a.prefetchDNS.apply(this,arguments)};exports.preinit=function(){var a=b.Dispatcher.current;a&&a.preinit.apply(this,arguments)};exports.preload=function(){var a=b.Dispatcher.current;a&&a.preload.apply(this,arguments)};exports.version="18.3.0-next-41110021f-20230301";
...@@ -17,7 +17,7 @@ if (process.env.NODE_ENV !== "production") { ...@@ -17,7 +17,7 @@ if (process.env.NODE_ENV !== "production") {
var React = require('react'); var React = require('react');
var ReactDOM = require('react-dom'); var ReactDOM = require('react-dom');
var ReactVersion = '18.3.0-next-bfb9cbd8c-20230223'; var ReactVersion = '18.3.0-next-41110021f-20230301';
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
...@@ -2087,6 +2087,8 @@ var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL ...@@ -2087,6 +2087,8 @@ var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL
var ReactDOMCurrentDispatcher = ReactDOMSharedInternals.Dispatcher; var ReactDOMCurrentDispatcher = ReactDOMSharedInternals.Dispatcher;
var ReactDOMServerDispatcher = { var ReactDOMServerDispatcher = {
prefetchDNS: prefetchDNS,
preconnect: preconnect,
preload: preload, preload: preload,
preinit: preinit preinit: preinit
} ; } ;
...@@ -4648,7 +4650,10 @@ function writePreamble(destination, resources, responseState, willFlushAllSegmen ...@@ -4648,7 +4650,10 @@ function writePreamble(destination, resources, responseState, willFlushAllSegmen
writeChunk(destination, charsetChunks[i]); writeChunk(destination, charsetChunks[i]);
} }
charsetChunks.length = 0; charsetChunks.length = 0; // emit preconnect resources
resources.preconnects.forEach(flushResourceInPreamble, destination);
resources.preconnects.clear();
var preconnectChunks = responseState.preconnectChunks; var preconnectChunks = responseState.preconnectChunks;
for (i = 0; i < preconnectChunks.length; i++) { for (i = 0; i < preconnectChunks.length; i++) {
...@@ -4721,6 +4726,8 @@ function writeHoistables(destination, resources, responseState) { ...@@ -4721,6 +4726,8 @@ function writeHoistables(destination, resources, responseState) {
// We omit charsetChunks because we have already sent the shell and if it wasn't // We omit charsetChunks because we have already sent the shell and if it wasn't
// already sent it is too late now. // already sent it is too late now.
resources.preconnects.forEach(flushResourceLate, destination);
resources.preconnects.clear();
var preconnectChunks = responseState.preconnectChunks; var preconnectChunks = responseState.preconnectChunks;
for (i = 0; i < preconnectChunks.length; i++) { for (i = 0; i < preconnectChunks.length; i++) {
...@@ -5008,9 +5015,11 @@ function createResources() { ...@@ -5008,9 +5015,11 @@ function createResources() {
return { return {
// persistent // persistent
preloadsMap: new Map(), preloadsMap: new Map(),
preconnectsMap: new Map(),
stylesMap: new Map(), stylesMap: new Map(),
scriptsMap: new Map(), scriptsMap: new Map(),
// cleared on flush // cleared on flush
preconnects: new Set(),
fontPreloads: new Set(), fontPreloads: new Set(),
// usedImagePreloads: new Set(), // usedImagePreloads: new Set(),
precedences: new Map(), precedences: new Map(),
...@@ -5036,6 +5045,98 @@ function getResourceKey(as, href) { ...@@ -5036,6 +5045,98 @@ function getResourceKey(as, href) {
return "[" + as + "]" + href; return "[" + as + "]" + href;
} }
function prefetchDNS(href, options) {
if (!currentResources) {
// While we expect that preconnect calls are primarily going to be observed
// during render because effects and events don't run on the server it is
// still possible that these get called in module scope. This is valid on
// the client since there is still a document to interact with but on the
// server we need a request to associate the call to. Because of this we
// simply return and do not warn.
return;
}
var resources = currentResources;
{
if (typeof href !== 'string' || !href) {
error('ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href));
} else if (options != null) {
if (typeof options === 'object' && options.hasOwnProperty('crossOrigin')) {
error('ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.', getValueDescriptorExpectingEnumForWarning(options));
} else {
error('ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.', getValueDescriptorExpectingEnumForWarning(options));
}
}
}
if (typeof href === 'string' && href) {
var key = getResourceKey('prefetchDNS', href);
var resource = resources.preconnectsMap.get(key);
if (!resource) {
resource = {
type: 'preconnect',
chunks: [],
state: NoState,
props: null
};
resources.preconnectsMap.set(key, resource);
pushLinkImpl(resource.chunks, {
href: href,
rel: 'dns-prefetch'
});
}
resources.preconnects.add(resource);
}
}
function preconnect(href, options) {
if (!currentResources) {
// While we expect that preconnect calls are primarily going to be observed
// during render because effects and events don't run on the server it is
// still possible that these get called in module scope. This is valid on
// the client since there is still a document to interact with but on the
// server we need a request to associate the call to. Because of this we
// simply return and do not warn.
return;
}
var resources = currentResources;
{
if (typeof href !== 'string' || !href) {
error('ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href));
} else if (options != null && typeof options !== 'object') {
error('ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.', getValueDescriptorExpectingEnumForWarning(options));
} else if (options != null && typeof options.crossOrigin !== 'string') {
error('ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.', getValueDescriptorExpectingObjectForWarning(options.crossOrigin));
}
}
if (typeof href === 'string' && href) {
var crossOrigin = options == null || typeof options.crossOrigin !== 'string' ? null : options.crossOrigin === 'use-credentials' ? 'use-credentials' : '';
var key = "[preconnect][" + (crossOrigin === null ? 'null' : crossOrigin) + "]" + href;
var resource = resources.preconnectsMap.get(key);
if (!resource) {
resource = {
type: 'preconnect',
chunks: [],
state: NoState,
props: null
};
resources.preconnectsMap.set(key, resource);
pushLinkImpl(resource.chunks, {
rel: 'preconnect',
href: href,
crossOrigin: crossOrigin
});
}
resources.preconnects.add(resource);
}
}
function preload(href, options) { function preload(href, options) {
if (!currentResources) { if (!currentResources) {
// While we expect that preload calls are primarily going to be observed // While we expect that preload calls are primarily going to be observed
...@@ -5316,7 +5417,8 @@ function preloadPropsFromPreloadOptions(href, as, options) { ...@@ -5316,7 +5417,8 @@ function preloadPropsFromPreloadOptions(href, as, options) {
as: as, as: as,
href: href, href: href,
crossOrigin: as === 'font' ? '' : options.crossOrigin, crossOrigin: as === 'font' ? '' : options.crossOrigin,
integrity: options.integrity integrity: options.integrity,
type: options.type
}; };
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -17,7 +17,7 @@ if (process.env.NODE_ENV !== "production") { ...@@ -17,7 +17,7 @@ if (process.env.NODE_ENV !== "production") {
var React = require('react'); var React = require('react');
var ReactDOM = require('react-dom'); var ReactDOM = require('react-dom');
var ReactVersion = '18.3.0-next-bfb9cbd8c-20230223'; var ReactVersion = '18.3.0-next-41110021f-20230301';
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
...@@ -2090,6 +2090,8 @@ var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL ...@@ -2090,6 +2090,8 @@ var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL
var ReactDOMCurrentDispatcher = ReactDOMSharedInternals.Dispatcher; var ReactDOMCurrentDispatcher = ReactDOMSharedInternals.Dispatcher;
var ReactDOMServerDispatcher = { var ReactDOMServerDispatcher = {
prefetchDNS: prefetchDNS,
preconnect: preconnect,
preload: preload, preload: preload,
preinit: preinit preinit: preinit
} ; } ;
...@@ -4651,7 +4653,10 @@ function writePreamble(destination, resources, responseState, willFlushAllSegmen ...@@ -4651,7 +4653,10 @@ function writePreamble(destination, resources, responseState, willFlushAllSegmen
writeChunk(destination, charsetChunks[i]); writeChunk(destination, charsetChunks[i]);
} }
charsetChunks.length = 0; charsetChunks.length = 0; // emit preconnect resources
resources.preconnects.forEach(flushResourceInPreamble, destination);
resources.preconnects.clear();
var preconnectChunks = responseState.preconnectChunks; var preconnectChunks = responseState.preconnectChunks;
for (i = 0; i < preconnectChunks.length; i++) { for (i = 0; i < preconnectChunks.length; i++) {
...@@ -4724,6 +4729,8 @@ function writeHoistables(destination, resources, responseState) { ...@@ -4724,6 +4729,8 @@ function writeHoistables(destination, resources, responseState) {
// We omit charsetChunks because we have already sent the shell and if it wasn't // We omit charsetChunks because we have already sent the shell and if it wasn't
// already sent it is too late now. // already sent it is too late now.
resources.preconnects.forEach(flushResourceLate, destination);
resources.preconnects.clear();
var preconnectChunks = responseState.preconnectChunks; var preconnectChunks = responseState.preconnectChunks;
for (i = 0; i < preconnectChunks.length; i++) { for (i = 0; i < preconnectChunks.length; i++) {
...@@ -5011,9 +5018,11 @@ function createResources() { ...@@ -5011,9 +5018,11 @@ function createResources() {
return { return {
// persistent // persistent
preloadsMap: new Map(), preloadsMap: new Map(),
preconnectsMap: new Map(),
stylesMap: new Map(), stylesMap: new Map(),
scriptsMap: new Map(), scriptsMap: new Map(),
// cleared on flush // cleared on flush
preconnects: new Set(),
fontPreloads: new Set(), fontPreloads: new Set(),
// usedImagePreloads: new Set(), // usedImagePreloads: new Set(),
precedences: new Map(), precedences: new Map(),
...@@ -5039,6 +5048,98 @@ function getResourceKey(as, href) { ...@@ -5039,6 +5048,98 @@ function getResourceKey(as, href) {
return "[" + as + "]" + href; return "[" + as + "]" + href;
} }
function prefetchDNS(href, options) {
if (!currentResources) {
// While we expect that preconnect calls are primarily going to be observed
// during render because effects and events don't run on the server it is
// still possible that these get called in module scope. This is valid on
// the client since there is still a document to interact with but on the
// server we need a request to associate the call to. Because of this we
// simply return and do not warn.
return;
}
var resources = currentResources;
{
if (typeof href !== 'string' || !href) {
error('ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href));
} else if (options != null) {
if (typeof options === 'object' && options.hasOwnProperty('crossOrigin')) {
error('ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.', getValueDescriptorExpectingEnumForWarning(options));
} else {
error('ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.', getValueDescriptorExpectingEnumForWarning(options));
}
}
}
if (typeof href === 'string' && href) {
var key = getResourceKey('prefetchDNS', href);
var resource = resources.preconnectsMap.get(key);
if (!resource) {
resource = {
type: 'preconnect',
chunks: [],
state: NoState,
props: null
};
resources.preconnectsMap.set(key, resource);
pushLinkImpl(resource.chunks, {
href: href,
rel: 'dns-prefetch'
});
}
resources.preconnects.add(resource);
}
}
function preconnect(href, options) {
if (!currentResources) {
// While we expect that preconnect calls are primarily going to be observed
// during render because effects and events don't run on the server it is
// still possible that these get called in module scope. This is valid on
// the client since there is still a document to interact with but on the
// server we need a request to associate the call to. Because of this we
// simply return and do not warn.
return;
}
var resources = currentResources;
{
if (typeof href !== 'string' || !href) {
error('ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href));
} else if (options != null && typeof options !== 'object') {
error('ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.', getValueDescriptorExpectingEnumForWarning(options));
} else if (options != null && typeof options.crossOrigin !== 'string') {
error('ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.', getValueDescriptorExpectingObjectForWarning(options.crossOrigin));
}
}
if (typeof href === 'string' && href) {
var crossOrigin = options == null || typeof options.crossOrigin !== 'string' ? null : options.crossOrigin === 'use-credentials' ? 'use-credentials' : '';
var key = "[preconnect][" + (crossOrigin === null ? 'null' : crossOrigin) + "]" + href;
var resource = resources.preconnectsMap.get(key);
if (!resource) {
resource = {
type: 'preconnect',
chunks: [],
state: NoState,
props: null
};
resources.preconnectsMap.set(key, resource);
pushLinkImpl(resource.chunks, {
rel: 'preconnect',
href: href,
crossOrigin: crossOrigin
});
}
resources.preconnects.add(resource);
}
}
function preload(href, options) { function preload(href, options) {
if (!currentResources) { if (!currentResources) {
// While we expect that preload calls are primarily going to be observed // While we expect that preload calls are primarily going to be observed
...@@ -5319,7 +5420,8 @@ function preloadPropsFromPreloadOptions(href, as, options) { ...@@ -5319,7 +5420,8 @@ function preloadPropsFromPreloadOptions(href, as, options) {
as: as, as: as,
href: href, href: href,
crossOrigin: as === 'font' ? '' : options.crossOrigin, crossOrigin: as === 'font' ? '' : options.crossOrigin,
integrity: options.integrity integrity: options.integrity,
type: options.type
}; };
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -19,7 +19,7 @@ var util = require('util'); ...@@ -19,7 +19,7 @@ var util = require('util');
var async_hooks = require('async_hooks'); var async_hooks = require('async_hooks');
var ReactDOM = require('react-dom'); var ReactDOM = require('react-dom');
var ReactVersion = '18.3.0-next-bfb9cbd8c-20230223'; var ReactVersion = '18.3.0-next-41110021f-20230301';
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
...@@ -129,10 +129,9 @@ function writeStringChunk(destination, stringChunk) { ...@@ -129,10 +129,9 @@ function writeStringChunk(destination, stringChunk) {
writtenBytes += written; writtenBytes += written;
if (read < stringChunk.length) { if (read < stringChunk.length) {
writeToDestination(destination, currentView); writeToDestination(destination, currentView.subarray(0, writtenBytes));
currentView = new Uint8Array(VIEW_SIZE); currentView = new Uint8Array(VIEW_SIZE);
writtenBytes = textEncoder.encodeInto(stringChunk.slice(read), // $FlowFixMe[incompatible-call] found when upgrading Flow writtenBytes = textEncoder.encodeInto(stringChunk.slice(read), currentView).written;
currentView).written;
} }
if (writtenBytes === VIEW_SIZE) { if (writtenBytes === VIEW_SIZE) {
...@@ -2157,6 +2156,8 @@ var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL ...@@ -2157,6 +2156,8 @@ var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL
var ReactDOMCurrentDispatcher = ReactDOMSharedInternals.Dispatcher; var ReactDOMCurrentDispatcher = ReactDOMSharedInternals.Dispatcher;
var ReactDOMServerDispatcher = { var ReactDOMServerDispatcher = {
prefetchDNS: prefetchDNS,
preconnect: preconnect,
preload: preload, preload: preload,
preinit: preinit preinit: preinit
} ; } ;
...@@ -4718,7 +4719,10 @@ function writePreamble(destination, resources, responseState, willFlushAllSegmen ...@@ -4718,7 +4719,10 @@ function writePreamble(destination, resources, responseState, willFlushAllSegmen
writeChunk(destination, charsetChunks[i]); writeChunk(destination, charsetChunks[i]);
} }
charsetChunks.length = 0; charsetChunks.length = 0; // emit preconnect resources
resources.preconnects.forEach(flushResourceInPreamble, destination);
resources.preconnects.clear();
var preconnectChunks = responseState.preconnectChunks; var preconnectChunks = responseState.preconnectChunks;
for (i = 0; i < preconnectChunks.length; i++) { for (i = 0; i < preconnectChunks.length; i++) {
...@@ -4791,6 +4795,8 @@ function writeHoistables(destination, resources, responseState) { ...@@ -4791,6 +4795,8 @@ function writeHoistables(destination, resources, responseState) {
// We omit charsetChunks because we have already sent the shell and if it wasn't // We omit charsetChunks because we have already sent the shell and if it wasn't
// already sent it is too late now. // already sent it is too late now.
resources.preconnects.forEach(flushResourceLate, destination);
resources.preconnects.clear();
var preconnectChunks = responseState.preconnectChunks; var preconnectChunks = responseState.preconnectChunks;
for (i = 0; i < preconnectChunks.length; i++) { for (i = 0; i < preconnectChunks.length; i++) {
...@@ -5078,9 +5084,11 @@ function createResources() { ...@@ -5078,9 +5084,11 @@ function createResources() {
return { return {
// persistent // persistent
preloadsMap: new Map(), preloadsMap: new Map(),
preconnectsMap: new Map(),
stylesMap: new Map(), stylesMap: new Map(),
scriptsMap: new Map(), scriptsMap: new Map(),
// cleared on flush // cleared on flush
preconnects: new Set(),
fontPreloads: new Set(), fontPreloads: new Set(),
// usedImagePreloads: new Set(), // usedImagePreloads: new Set(),
precedences: new Map(), precedences: new Map(),
...@@ -5106,6 +5114,98 @@ function getResourceKey(as, href) { ...@@ -5106,6 +5114,98 @@ function getResourceKey(as, href) {
return "[" + as + "]" + href; return "[" + as + "]" + href;
} }
function prefetchDNS(href, options) {
if (!currentResources) {
// While we expect that preconnect calls are primarily going to be observed
// during render because effects and events don't run on the server it is
// still possible that these get called in module scope. This is valid on
// the client since there is still a document to interact with but on the
// server we need a request to associate the call to. Because of this we
// simply return and do not warn.
return;
}
var resources = currentResources;
{
if (typeof href !== 'string' || !href) {
error('ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href));
} else if (options != null) {
if (typeof options === 'object' && options.hasOwnProperty('crossOrigin')) {
error('ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.', getValueDescriptorExpectingEnumForWarning(options));
} else {
error('ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.', getValueDescriptorExpectingEnumForWarning(options));
}
}
}
if (typeof href === 'string' && href) {
var key = getResourceKey('prefetchDNS', href);
var resource = resources.preconnectsMap.get(key);
if (!resource) {
resource = {
type: 'preconnect',
chunks: [],
state: NoState,
props: null
};
resources.preconnectsMap.set(key, resource);
pushLinkImpl(resource.chunks, {
href: href,
rel: 'dns-prefetch'
});
}
resources.preconnects.add(resource);
}
}
function preconnect(href, options) {
if (!currentResources) {
// While we expect that preconnect calls are primarily going to be observed
// during render because effects and events don't run on the server it is
// still possible that these get called in module scope. This is valid on
// the client since there is still a document to interact with but on the
// server we need a request to associate the call to. Because of this we
// simply return and do not warn.
return;
}
var resources = currentResources;
{
if (typeof href !== 'string' || !href) {
error('ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href));
} else if (options != null && typeof options !== 'object') {
error('ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.', getValueDescriptorExpectingEnumForWarning(options));
} else if (options != null && typeof options.crossOrigin !== 'string') {
error('ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.', getValueDescriptorExpectingObjectForWarning(options.crossOrigin));
}
}
if (typeof href === 'string' && href) {
var crossOrigin = options == null || typeof options.crossOrigin !== 'string' ? null : options.crossOrigin === 'use-credentials' ? 'use-credentials' : '';
var key = "[preconnect][" + (crossOrigin === null ? 'null' : crossOrigin) + "]" + href;
var resource = resources.preconnectsMap.get(key);
if (!resource) {
resource = {
type: 'preconnect',
chunks: [],
state: NoState,
props: null
};
resources.preconnectsMap.set(key, resource);
pushLinkImpl(resource.chunks, {
rel: 'preconnect',
href: href,
crossOrigin: crossOrigin
});
}
resources.preconnects.add(resource);
}
}
function preload(href, options) { function preload(href, options) {
if (!currentResources) { if (!currentResources) {
// While we expect that preload calls are primarily going to be observed // While we expect that preload calls are primarily going to be observed
...@@ -5386,7 +5486,8 @@ function preloadPropsFromPreloadOptions(href, as, options) { ...@@ -5386,7 +5486,8 @@ function preloadPropsFromPreloadOptions(href, as, options) {
as: as, as: as,
href: href, href: href,
crossOrigin: as === 'font' ? '' : options.crossOrigin, crossOrigin: as === 'font' ? '' : options.crossOrigin,
integrity: options.integrity integrity: options.integrity,
type: options.type
}; };
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{ {
"name": "react-dom", "name": "react-dom",
"version": "18.3.0-next-bfb9cbd8c-20230223", "version": "18.3.0-next-41110021f-20230301",
"description": "React package for working with the DOM.", "description": "React package for working with the DOM.",
"main": "index.js", "main": "index.js",
"repository": { "repository": {
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
"homepage": "https://reactjs.org/", "homepage": "https://reactjs.org/",
"dependencies": { "dependencies": {
"loose-envify": "^1.1.0", "loose-envify": "^1.1.0",
"scheduler": "0.24.0-next-bfb9cbd8c-20230223" "scheduler": "0.24.0-next-41110021f-20230301"
}, },
"peerDependencies": { "peerDependencies": {
"react": "18.3.0-next-bfb9cbd8c-20230223" "react": "18.3.0-next-41110021f-20230301"
}, },
"files": [ "files": [
"LICENSE", "LICENSE",
......
...@@ -10,12 +10,12 @@ ...@@ -10,12 +10,12 @@
'use strict'; 'use strict';
'use strict';const m=require("acorn"),n=require("url"),r=require("module"); 'use strict';const n=require("acorn"),p=require("url"),r=require("module");
module.exports=function(){const h=Symbol.for("react.client.reference"),k=Symbol.for("react.server.reference"),t=Promise.prototype,u=Function.prototype.bind;Function.prototype.bind=function(a){const c=u.apply(this,arguments);if(this.$$typeof===k){const b=Array.prototype.slice.call(arguments,1);c.$$typeof=k;c.$$filepath=this.$$filepath;c.$$name=this.$$name;c.$$bound=this.$$bound.concat(b)}return c};const v={get:function(a,c){switch(c){case "$$typeof":return a.$$typeof;case "filepath":return a.filepath; module.exports=function(){const h=Symbol.for("react.client.reference"),k=Symbol.for("react.server.reference"),t=Promise.prototype,u=Function.prototype.bind;Function.prototype.bind=function(a){const c=u.apply(this,arguments);if(this.$$typeof===k){const b=Array.prototype.slice.call(arguments,1);c.$$typeof=k;c.$$filepath=this.$$filepath;c.$$name=this.$$name;c.$$bound=this.$$bound.concat(b)}return c};const v={get:function(a,c){switch(c){case "$$typeof":return a.$$typeof;case "filepath":return a.filepath;
case "name":return a.name;case "displayName":return;case "async":return a.async;case "defaultProps":return;case "toJSON":return;case Symbol.toPrimitive:return Object.prototype[Symbol.toPrimitive];case "Provider":throw Error("Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider.");}switch(a.name){case "":a=String(c);break;case "*":a=String(c);break;default:a=String(a.name)+"."+String(c)}throw Error("Cannot access "+ case "name":return a.name;case "displayName":return;case "async":return a.async;case "defaultProps":return;case "toJSON":return;case Symbol.toPrimitive:return Object.prototype[Symbol.toPrimitive];case "Provider":throw Error("Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider.");}switch(a.name){case "":a=String(c);break;case "*":a=String(c);break;default:a=String(a.name)+"."+String(c)}throw Error("Cannot access "+
a+" on the server. You cannot dot into a client module from a server component. You can only pass the imported name through.");},set:function(){throw Error("Cannot assign to a client module from a server module.");}},p={get:function(a,c){switch(c){case "$$typeof":return a.$$typeof;case "filepath":return a.filepath;case "name":return a.name;case "async":return a.async;case "defaultProps":return;case "toJSON":return;case Symbol.toPrimitive:return Object.prototype[Symbol.toPrimitive];case "__esModule":const d= a+" on the server. You cannot dot into a client module from a server component. You can only pass the imported name through.");},set:function(){throw Error("Cannot assign to a client module from a server module.");}},q={get:function(a,c){switch(c){case "$$typeof":return a.$$typeof;case "filepath":return a.filepath;case "name":return a.name;case "async":return a.async;case "defaultProps":return;case "toJSON":return;case Symbol.toPrimitive:return Object.prototype[Symbol.toPrimitive];case "__esModule":const d=
a.filepath;a.default=Object.defineProperties(function(){throw Error("Attempted to call the default export of "+d+" from the server but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");},{name:{value:""},$$typeof:{value:h},filepath:{value:a.filepath},async:{value:a.async}});return!0;case "then":if(a.then)return a.then;if(a.async)return;var b=Object.defineProperties({},{name:{value:"*"}, a.filepath;a.default=Object.defineProperties(function(){throw Error("Attempted to call the default export of "+d+" from the server but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");},{name:{value:""},$$typeof:{value:h},filepath:{value:a.filepath},async:{value:a.async}});return!0;case "then":if(a.then)return a.then;if(a.async)return;var b=Object.defineProperties({},{name:{value:"*"},
$$typeof:{value:h},filepath:{value:a.filepath},async:{value:!0}});const e=new Proxy(b,p);a.status="fulfilled";a.value=e;return a.then=Object.defineProperties(function(f){return Promise.resolve(f(e))},{name:{value:"then"},$$typeof:{value:h},filepath:{value:a.filepath},async:{value:!1}})}b=a[c];b||(b=Object.defineProperties(function(){throw Error("Attempted to call "+String(c)+"() from the server but "+String(c)+" is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); $$typeof:{value:h},filepath:{value:a.filepath},async:{value:!0}});const e=new Proxy(b,q);a.status="fulfilled";a.value=e;return a.then=Object.defineProperties(function(f){return Promise.resolve(f(e))},{name:{value:"then"},$$typeof:{value:h},filepath:{value:a.filepath},async:{value:!1}})}b=a[c];b||(b=Object.defineProperties(function(){throw Error("Attempted to call "+String(c)+"() from the server but "+String(c)+" is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");
},{name:{value:c},$$typeof:{value:h},filepath:{value:a.filepath},async:{value:a.async}}),b=a[c]=new Proxy(b,v));return b},getPrototypeOf(){return t},set:function(){throw Error("Cannot assign to a client module from a server module.");}},l=r.prototype._compile;r.prototype._compile=function(a,c){if(-1===a.indexOf("use client")&&-1===a.indexOf("use server"))return l.apply(this,arguments);var b=m.parse(a,{ecmaVersion:"2019",sourceType:"source"}).body,d=!1,e=!1;for(var f=0;f<b.length;f++){var g=b[f];if("ExpressionStatement"!== },{name:{value:c},$$typeof:{value:h},filepath:{value:a.filepath},async:{value:a.async}}),b=a[c]=new Proxy(b,v));return b},getPrototypeOf(){return t},set:function(){throw Error("Cannot assign to a client module from a server module.");}},l=r.prototype._compile;r.prototype._compile=function(a,c){if(-1===a.indexOf("use client")&&-1===a.indexOf("use server"))return l.apply(this,arguments);try{var b=n.parse(a,{ecmaVersion:"2024",sourceType:"source"}).body}catch(m){return console.error("Error parsing %s %s",
g.type||!g.directive)break;"use client"===g.directive&&(d=!0);"use server"===g.directive&&(e=!0)}if(!d&&!e)return l.apply(this,arguments);if(d&&e)throw Error('Cannot have both "use client" and "use server" directives in the same file.');d&&(b=n.pathToFileURL(c).href,b=Object.defineProperties({},{name:{value:"*"},$$typeof:{value:h},filepath:{value:b},async:{value:!1}}),this.exports=new Proxy(b,p));if(e)if(l.apply(this,arguments),e=n.pathToFileURL(c).href,b=this.exports,"function"===typeof b)Object.defineProperties(b, p,m.message),l.apply(this,arguments)}var d=!1,e=!1;for(var f=0;f<b.length;f++){var g=b[f];if("ExpressionStatement"!==g.type||!g.directive)break;"use client"===g.directive&&(d=!0);"use server"===g.directive&&(e=!0)}if(!d&&!e)return l.apply(this,arguments);if(d&&e)throw Error('Cannot have both "use client" and "use server" directives in the same file.');d&&(b=p.pathToFileURL(c).href,b=Object.defineProperties({},{name:{value:"*"},$$typeof:{value:h},filepath:{value:b},async:{value:!1}}),this.exports=
{$$typeof:{value:k},$$filepath:{value:e},$$name:{value:"*"},$$bound:{value:[]}});else for(d=Object.keys(b),f=0;f<d.length;f++){g=d[f];const q=b[d[f]];"function"===typeof q&&Object.defineProperties(q,{$$typeof:{value:k},$$filepath:{value:e},$$name:{value:g},$$bound:{value:[]}})}}}; new Proxy(b,q));if(e)if(l.apply(this,arguments),e=p.pathToFileURL(c).href,b=this.exports,"function"===typeof b)Object.defineProperties(b,{$$typeof:{value:k},$$filepath:{value:e},$$name:{value:"*"},$$bound:{value:[]}});else for(d=Object.keys(b),f=0;f<d.length;f++){g=d[f];const m=b[d[f]];"function"===typeof m&&Object.defineProperties(m,{$$typeof:{value:k},$$filepath:{value:e},$$name:{value:g},$$bound:{value:[]}})}}};
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
'use strict'; 'use strict';
'use strict';var q=require("path"),r=require("url"),x=require("neo-async"),y=require("webpack/lib/dependencies/ModuleDependency"),z=require("webpack/lib/dependencies/NullDependency"),A=require("webpack/lib/Template"),B=require("webpack");const C=Array.isArray;class D extends y{constructor(b){super(b)}get type(){return"client-reference"}}const E=require.resolve("../client.browser.js"); 'use strict';var p=require("path"),r=require("url"),y=require("neo-async"),z=require("webpack/lib/dependencies/ModuleDependency"),A=require("webpack/lib/dependencies/NullDependency"),B=require("webpack/lib/Template"),C=require("webpack");const D=Array.isArray;class E extends z{constructor(b){super(b)}get type(){return"client-reference"}}const F=require.resolve("../client.browser.js");
class F{constructor(b){this.ssrManifestFilename=this.clientManifestFilename=this.chunkName=this.clientReferences=void 0;if(!b||"boolean"!==typeof b.isServer)throw Error("React Server Plugin: You must specify the isServer option as a boolean.");if(b.isServer)throw Error("TODO: Implement the server compiler.");b.clientReferences?"string"!==typeof b.clientReferences&&C(b.clientReferences)?this.clientReferences=b.clientReferences:this.clientReferences=[b.clientReferences]:this.clientReferences=[{directory:".", class G{constructor(b){this.ssrManifestFilename=this.clientManifestFilename=this.chunkName=this.clientReferences=void 0;if(!b||"boolean"!==typeof b.isServer)throw Error("React Server Plugin: You must specify the isServer option as a boolean.");if(b.isServer)throw Error("TODO: Implement the server compiler.");b.clientReferences?"string"!==typeof b.clientReferences&&D(b.clientReferences)?this.clientReferences=b.clientReferences:this.clientReferences=[b.clientReferences]:this.clientReferences=[{directory:".",
recursive:!0,include:/\.(js|ts|jsx|tsx)$/}];"string"===typeof b.chunkName?(this.chunkName=b.chunkName,/\[(index|request)\]/.test(this.chunkName)||(this.chunkName+="[index]")):this.chunkName="client[index]";this.clientManifestFilename=b.clientManifestFilename||"react-client-manifest.json";this.ssrManifestFilename=b.ssrManifestFilename||"react-ssr-manifest.json"}apply(b){const m=this;let p,t=!1;b.hooks.beforeCompile.tapAsync("React Server Plugin",(c,a)=>{c=c.contextModuleFactory;const d=b.resolverFactory.get("context", recursive:!0,include:/\.(js|ts|jsx|tsx)$/}];"string"===typeof b.chunkName?(this.chunkName=b.chunkName,/\[(index|request)\]/.test(this.chunkName)||(this.chunkName+="[index]")):this.chunkName="client[index]";this.clientManifestFilename=b.clientManifestFilename||"react-client-manifest.json";this.ssrManifestFilename=b.ssrManifestFilename||"react-ssr-manifest.json"}apply(b){const l=this;let n,t=!1;b.hooks.beforeCompile.tapAsync("React Server Plugin",(c,a)=>{c=c.contextModuleFactory;const e=b.resolverFactory.get("context",
{});m.resolveAllClientFiles(b.context,d,b.inputFileSystem,c,function(e,g){e?a(e):(p=g,a())})});b.hooks.thisCompilation.tap("React Server Plugin",(c,a)=>{a=a.normalModuleFactory;c.dependencyFactories.set(D,a);c.dependencyTemplates.set(D,new z.Template);c=d=>{d.hooks.program.tap("React Server Plugin",()=>{const e=d.state.module;if(e.resource===E&&(t=!0,p))for(let h=0;h<p.length;h++){const n=p[h];var g=m.chunkName.replace(/\[index\]/g,""+h).replace(/\[request\]/g,A.toPath(n.userRequest));g=new B.AsyncDependenciesBlock({name:g}, {});l.resolveAllClientFiles(b.context,e,b.inputFileSystem,c,function(d,g){d?a(d):(n=g,a())})});b.hooks.thisCompilation.tap("React Server Plugin",(c,a)=>{a=a.normalModuleFactory;c.dependencyFactories.set(E,a);c.dependencyTemplates.set(E,new A.Template);c=e=>{e.hooks.program.tap("React Server Plugin",()=>{const d=e.state.module;if(d.resource===F&&(t=!0,n))for(let h=0;h<n.length;h++){const m=n[h];var g=l.chunkName.replace(/\[index\]/g,""+h).replace(/\[request\]/g,B.toPath(m.userRequest));g=new C.AsyncDependenciesBlock({name:g},
null,n.request);g.addDependency(n);e.addBlock(g)}})};a.hooks.parser.for("javascript/auto").tap("HarmonyModulesPlugin",c);a.hooks.parser.for("javascript/esm").tap("HarmonyModulesPlugin",c);a.hooks.parser.for("javascript/dynamic").tap("HarmonyModulesPlugin",c)});b.hooks.make.tap("React Server Plugin",c=>{c.hooks.processAssets.tap({name:"React Server Plugin",stage:B.Compilation.PROCESS_ASSETS_STAGE_REPORT},function(){if(!1===t)c.warnings.push(new B.WebpackError("Client runtime at react-server-dom-webpack/client was not found. React Server Components module map file "+ null,m.request);g.addDependency(m);d.addBlock(g)}})};a.hooks.parser.for("javascript/auto").tap("HarmonyModulesPlugin",c);a.hooks.parser.for("javascript/esm").tap("HarmonyModulesPlugin",c);a.hooks.parser.for("javascript/dynamic").tap("HarmonyModulesPlugin",c)});b.hooks.make.tap("React Server Plugin",c=>{c.hooks.processAssets.tap({name:"React Server Plugin",stage:C.Compilation.PROCESS_ASSETS_STAGE_REPORT},function(){if(!1===t)c.warnings.push(new C.WebpackError("Client runtime at react-server-dom-webpack/client was not found. React Server Components module map file "+
m.clientManifestFilename+" was not created."));else{var a={},d={};c.chunkGroups.forEach(function(g){function h(k,f){if(/\.(js|ts)x?$/.test(f.resource)){var l=c.moduleGraph.getExportsInfo(f).getProvidedExports(),u={},w={};d[k]=w;["","*"].concat(Array.isArray(l)?l:[]).forEach(function(v){u[v]={id:k,chunks:n,name:v};w[v]={specifier:f.resource,name:v}});l=r.pathToFileURL(f.resource).href;void 0!==l&&(a[l]=u,d[l]=w)}}const n=g.chunks.map(function(k){return k.id});g.chunks.forEach(function(k){k=c.chunkGraph.getChunkModulesIterable(k); l.clientManifestFilename+" was not created."));else{var a={},e={};c.chunkGroups.forEach(function(g){function h(k,f){if(/\.(js|ts)x?$/.test(f.resource)){var q=c.moduleGraph.getExportsInfo(f).getProvidedExports(),u={},x={},w=r.pathToFileURL(f.resource).href;void 0!==w&&(["","*"].concat(Array.isArray(q)?q:[]).forEach(function(v){u[v]={id:k,chunks:m,name:v};x[v]={specifier:w,name:v}}),a[w]=u,e[k]=x)}}const m=g.chunks.map(function(k){return k.id});g.chunks.forEach(function(k){k=c.chunkGraph.getChunkModulesIterable(k);
Array.from(k).forEach(function(f){const l=c.chunkGraph.getModuleId(f);h(l,f);f.modules&&f.modules.forEach(u=>{h(l,u)})})})});var e=JSON.stringify(a,null,2);c.emitAsset(m.clientManifestFilename,new B.sources.RawSource(e,!1));e=JSON.stringify(d,null,2);c.emitAsset(m.ssrManifestFilename,new B.sources.RawSource(e,!1))}})})}resolveAllClientFiles(b,m,p,t,c){x.map(this.clientReferences,(a,d)=>{"string"===typeof a?d(null,[new D(a)]):m.resolve({},b,a.directory,{},(e,g)=>{if(e)return d(e);t.resolveDependencies(p, Array.from(k).forEach(function(f){const q=c.chunkGraph.getModuleId(f);h(q,f);f.modules&&f.modules.forEach(u=>{h(q,u)})})})});var d=JSON.stringify(a,null,2);c.emitAsset(l.clientManifestFilename,new C.sources.RawSource(d,!1));d=JSON.stringify(e,null,2);c.emitAsset(l.ssrManifestFilename,new C.sources.RawSource(d,!1))}})})}resolveAllClientFiles(b,l,n,t,c){y.map(this.clientReferences,(a,e)=>{"string"===typeof a?e(null,[new E(a)]):l.resolve({},b,a.directory,{},(d,g)=>{if(d)return e(d);t.resolveDependencies(n,
{resource:g,resourceQuery:"",recursive:void 0===a.recursive?!0:a.recursive,regExp:a.include,include:void 0,exclude:a.exclude},(h,n)=>{if(h)return d(h);h=n.map(k=>{var f=q.join(g,k.userRequest);f=new D(f);f.userRequest=k.userRequest;return f});d(null,h)})})},(a,d)=>{if(a)return c(a);a=[];for(let e=0;e<d.length;e++)a.push.apply(a,d[e]);c(null,a)})}}module.exports=F; {resource:g,resourceQuery:"",recursive:void 0===a.recursive?!0:a.recursive,regExp:a.include,include:void 0,exclude:a.exclude},(h,m)=>{if(h)return e(h);h=m.map(k=>{var f=p.join(g,k.userRequest);f=new E(f);f.userRequest=k.userRequest;return f});e(null,h)})})},(a,e)=>{if(a)return c(a);a=[];for(let d=0;d<e.length;d++)a.push.apply(a,e[d]);c(null,a)})}}module.exports=G;
...@@ -110,10 +110,9 @@ function writeStringChunk(destination, stringChunk) { ...@@ -110,10 +110,9 @@ function writeStringChunk(destination, stringChunk) {
writtenBytes += written; writtenBytes += written;
if (read < stringChunk.length) { if (read < stringChunk.length) {
writeToDestination(destination, currentView); writeToDestination(destination, currentView.subarray(0, writtenBytes));
currentView = new Uint8Array(VIEW_SIZE); currentView = new Uint8Array(VIEW_SIZE);
writtenBytes = textEncoder.encodeInto(stringChunk.slice(read), // $FlowFixMe[incompatible-call] found when upgrading Flow writtenBytes = textEncoder.encodeInto(stringChunk.slice(read), currentView).written;
currentView).written;
} }
if (writtenBytes === VIEW_SIZE) { if (writtenBytes === VIEW_SIZE) {
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*/ */
'use strict';var aa=require("util"),ba=require("async_hooks"),ca=require("react"),da=new ba.AsyncLocalStorage,f=null,m=0,n=!0;function p(a,b){a=a.write(b);n=n&&a} 'use strict';var aa=require("util"),ba=require("async_hooks"),ca=require("react"),da=new ba.AsyncLocalStorage,f=null,m=0,n=!0;function p(a,b){a=a.write(b);n=n&&a}
function q(a,b){if("string"===typeof b){if(0!==b.length)if(2048<3*b.length)0<m&&(p(a,f.subarray(0,m)),f=new Uint8Array(2048),m=0),p(a,r.encode(b));else{var c=f;0<m&&(c=f.subarray(m));c=r.encodeInto(b,c);var d=c.read;m+=c.written;d<b.length&&(p(a,f),f=new Uint8Array(2048),m=r.encodeInto(b.slice(d),f).written);2048===m&&(p(a,f),f=new Uint8Array(2048),m=0)}}else 0!==b.byteLength&&(2048<b.byteLength?(0<m&&(p(a,f.subarray(0,m)),f=new Uint8Array(2048),m=0),p(a,b)):(c=f.length-m,c<b.byteLength&&(0===c?p(a, function q(a,b){if("string"===typeof b){if(0!==b.length)if(2048<3*b.length)0<m&&(p(a,f.subarray(0,m)),f=new Uint8Array(2048),m=0),p(a,r.encode(b));else{var c=f;0<m&&(c=f.subarray(m));c=r.encodeInto(b,c);var d=c.read;m+=c.written;d<b.length&&(p(a,f.subarray(0,m)),f=new Uint8Array(2048),m=r.encodeInto(b.slice(d),f).written);2048===m&&(p(a,f),f=new Uint8Array(2048),m=0)}}else 0!==b.byteLength&&(2048<b.byteLength?(0<m&&(p(a,f.subarray(0,m)),f=new Uint8Array(2048),m=0),p(a,b)):(c=f.length-m,c<b.byteLength&&
f):(f.set(b.subarray(0,c),m),m+=c,p(a,f),b=b.subarray(c)),f=new Uint8Array(2048),m=0),f.set(b,m),m+=b.byteLength,2048===m&&(p(a,f),f=new Uint8Array(2048),m=0)));return n}var r=new aa.TextEncoder;function t(a){return r.encode(a)}var u=JSON.stringify;function fa(a,b,c){a=u(c,a.toJSON);return b.toString(16)+":"+a+"\n"}function v(a,b,c){a=u(c);return b.toString(16)+":"+a+"\n"} (0===c?p(a,f):(f.set(b.subarray(0,c),m),m+=c,p(a,f),b=b.subarray(c)),f=new Uint8Array(2048),m=0),f.set(b,m),m+=b.byteLength,2048===m&&(p(a,f),f=new Uint8Array(2048),m=0)));return n}var r=new aa.TextEncoder;function t(a){return r.encode(a)}var u=JSON.stringify;function fa(a,b,c){a=u(c,a.toJSON);return b.toString(16)+":"+a+"\n"}function v(a,b,c){a=u(c);return b.toString(16)+":"+a+"\n"}
var x=Symbol.for("react.client.reference"),ha=Symbol.for("react.server.reference"),z=Symbol.for("react.element"),ia=Symbol.for("react.fragment"),ja=Symbol.for("react.provider"),ka=Symbol.for("react.server_context"),la=Symbol.for("react.forward_ref"),ma=Symbol.for("react.suspense"),na=Symbol.for("react.suspense_list"),oa=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),pa=Symbol.for("react.default_value"),qa=Symbol.for("react.memo_cache_sentinel"); var x=Symbol.for("react.client.reference"),ha=Symbol.for("react.server.reference"),z=Symbol.for("react.element"),ia=Symbol.for("react.fragment"),ja=Symbol.for("react.provider"),ka=Symbol.for("react.server_context"),la=Symbol.for("react.forward_ref"),ma=Symbol.for("react.suspense"),na=Symbol.for("react.suspense_list"),oa=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),pa=Symbol.for("react.default_value"),qa=Symbol.for("react.memo_cache_sentinel");
function B(a,b,c,d,e,g,h){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=g;this.removeEmptyString=h}"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){new B(a,0,!1,a,null,!1,!1)}); function B(a,b,c,d,e,g,h){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=g;this.removeEmptyString=h}"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){new B(a,0,!1,a,null,!1,!1)});
[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){new B(a[0],1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){new B(a,2,!1,a.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){new B(a,2,!1,a,null,!1,!1)}); [["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){new B(a[0],1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){new B(a,2,!1,a.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){new B(a,2,!1,a,null,!1,!1)});
......
...@@ -110,10 +110,9 @@ function writeStringChunk(destination, stringChunk) { ...@@ -110,10 +110,9 @@ function writeStringChunk(destination, stringChunk) {
writtenBytes += written; writtenBytes += written;
if (read < stringChunk.length) { if (read < stringChunk.length) {
writeToDestination(destination, currentView); writeToDestination(destination, currentView.subarray(0, writtenBytes));
currentView = new Uint8Array(VIEW_SIZE); currentView = new Uint8Array(VIEW_SIZE);
writtenBytes = textEncoder.encodeInto(stringChunk.slice(read), // $FlowFixMe[incompatible-call] found when upgrading Flow writtenBytes = textEncoder.encodeInto(stringChunk.slice(read), currentView).written;
currentView).written;
} }
if (writtenBytes === VIEW_SIZE) { if (writtenBytes === VIEW_SIZE) {
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*/ */
'use strict';var aa=require("util"),ba=require("async_hooks"),ca=require("react"),da=new ba.AsyncLocalStorage,f=null,m=0,n=!0;function p(a,b){a=a.write(b);n=n&&a} 'use strict';var aa=require("util"),ba=require("async_hooks"),ca=require("react"),da=new ba.AsyncLocalStorage,f=null,m=0,n=!0;function p(a,b){a=a.write(b);n=n&&a}
function q(a,b){if("string"===typeof b){if(0!==b.length)if(2048<3*b.length)0<m&&(p(a,f.subarray(0,m)),f=new Uint8Array(2048),m=0),p(a,r.encode(b));else{var c=f;0<m&&(c=f.subarray(m));c=r.encodeInto(b,c);var d=c.read;m+=c.written;d<b.length&&(p(a,f),f=new Uint8Array(2048),m=r.encodeInto(b.slice(d),f).written);2048===m&&(p(a,f),f=new Uint8Array(2048),m=0)}}else 0!==b.byteLength&&(2048<b.byteLength?(0<m&&(p(a,f.subarray(0,m)),f=new Uint8Array(2048),m=0),p(a,b)):(c=f.length-m,c<b.byteLength&&(0===c?p(a, function q(a,b){if("string"===typeof b){if(0!==b.length)if(2048<3*b.length)0<m&&(p(a,f.subarray(0,m)),f=new Uint8Array(2048),m=0),p(a,r.encode(b));else{var c=f;0<m&&(c=f.subarray(m));c=r.encodeInto(b,c);var d=c.read;m+=c.written;d<b.length&&(p(a,f.subarray(0,m)),f=new Uint8Array(2048),m=r.encodeInto(b.slice(d),f).written);2048===m&&(p(a,f),f=new Uint8Array(2048),m=0)}}else 0!==b.byteLength&&(2048<b.byteLength?(0<m&&(p(a,f.subarray(0,m)),f=new Uint8Array(2048),m=0),p(a,b)):(c=f.length-m,c<b.byteLength&&
f):(f.set(b.subarray(0,c),m),m+=c,p(a,f),b=b.subarray(c)),f=new Uint8Array(2048),m=0),f.set(b,m),m+=b.byteLength,2048===m&&(p(a,f),f=new Uint8Array(2048),m=0)));return n}var r=new aa.TextEncoder;function t(a){return r.encode(a)}var u=JSON.stringify;function fa(a,b,c){a=u(c,a.toJSON);return b.toString(16)+":"+a+"\n"}function v(a,b,c){a=u(c);return b.toString(16)+":"+a+"\n"} (0===c?p(a,f):(f.set(b.subarray(0,c),m),m+=c,p(a,f),b=b.subarray(c)),f=new Uint8Array(2048),m=0),f.set(b,m),m+=b.byteLength,2048===m&&(p(a,f),f=new Uint8Array(2048),m=0)));return n}var r=new aa.TextEncoder;function t(a){return r.encode(a)}var u=JSON.stringify;function fa(a,b,c){a=u(c,a.toJSON);return b.toString(16)+":"+a+"\n"}function v(a,b,c){a=u(c);return b.toString(16)+":"+a+"\n"}
var x=Symbol.for("react.client.reference"),ha=Symbol.for("react.server.reference"),z=Symbol.for("react.element"),ia=Symbol.for("react.fragment"),ja=Symbol.for("react.provider"),ka=Symbol.for("react.server_context"),la=Symbol.for("react.forward_ref"),ma=Symbol.for("react.suspense"),na=Symbol.for("react.suspense_list"),oa=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),pa=Symbol.for("react.default_value"),qa=Symbol.for("react.memo_cache_sentinel"); var x=Symbol.for("react.client.reference"),ha=Symbol.for("react.server.reference"),z=Symbol.for("react.element"),ia=Symbol.for("react.fragment"),ja=Symbol.for("react.provider"),ka=Symbol.for("react.server_context"),la=Symbol.for("react.forward_ref"),ma=Symbol.for("react.suspense"),na=Symbol.for("react.suspense_list"),oa=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),pa=Symbol.for("react.default_value"),qa=Symbol.for("react.memo_cache_sentinel");
function B(a,b,c,d,e,g,h){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=g;this.removeEmptyString=h}"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){new B(a,0,!1,a,null,!1,!1)}); function B(a,b,c,d,e,g,h){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=g;this.removeEmptyString=h}"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){new B(a,0,!1,a,null,!1,!1)});
[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){new B(a[0],1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){new B(a,2,!1,a.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){new B(a,2,!1,a,null,!1,!1)}); [["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){new B(a[0],1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){new B(a,2,!1,a.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){new B(a,2,!1,a,null,!1,!1)});
......
{ {
"name": "react-server-dom-webpack", "name": "react-server-dom-webpack",
"description": "React Server Components bindings for DOM using Webpack. This is intended to be integrated into meta-frameworks. It is not intended to be imported directly.", "description": "React Server Components bindings for DOM using Webpack. This is intended to be integrated into meta-frameworks. It is not intended to be imported directly.",
"version": "18.3.0-next-bfb9cbd8c-20230223", "version": "18.3.0-next-41110021f-20230301",
"keywords": [ "keywords": [
"react" "react"
], ],
...@@ -78,8 +78,8 @@ ...@@ -78,8 +78,8 @@
"node": ">=0.10.0" "node": ">=0.10.0"
}, },
"peerDependencies": { "peerDependencies": {
"react": "18.3.0-next-bfb9cbd8c-20230223", "react": "18.3.0-next-41110021f-20230301",
"react-dom": "18.3.0-next-bfb9cbd8c-20230223", "react-dom": "18.3.0-next-41110021f-20230301",
"webpack": "^5.59.0" "webpack": "^5.59.0"
}, },
"dependencies": { "dependencies": {
......
...@@ -23,7 +23,7 @@ if ( ...@@ -23,7 +23,7 @@ if (
) { ) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
} }
var ReactVersion = '18.3.0-next-bfb9cbd8c-20230223'; var ReactVersion = '18.3.0-next-41110021f-20230301';
// ATTENTION // ATTENTION
// When adding new symbols to this file, // When adding new symbols to this file,
......
...@@ -27,4 +27,4 @@ exports.createServerContext=function(a,b){var c=!0;if(!Z[a]){c=!1;var d={$$typeo ...@@ -27,4 +27,4 @@ exports.createServerContext=function(a,b){var c=!0;if(!Z[a]){c=!1;var d={$$typeo
exports.isValidElement=P;exports.lazy=function(a){return{$$typeof:z,_payload:{_status:-1,_result:a},_init:ba}};exports.memo=function(a,b){return{$$typeof:y,type:a,compare:void 0===b?null:b}};exports.startTransition=function(a){var b=X.transition;X.transition={};try{a()}finally{X.transition=b}};exports.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.");};exports.unstable_useCacheRefresh=function(){return W.current.useCacheRefresh()};exports.use=function(a){return W.current.use(a)}; exports.isValidElement=P;exports.lazy=function(a){return{$$typeof:z,_payload:{_status:-1,_result:a},_init:ba}};exports.memo=function(a,b){return{$$typeof:y,type:a,compare:void 0===b?null:b}};exports.startTransition=function(a){var b=X.transition;X.transition={};try{a()}finally{X.transition=b}};exports.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.");};exports.unstable_useCacheRefresh=function(){return W.current.useCacheRefresh()};exports.use=function(a){return W.current.use(a)};
exports.useCallback=function(a,b){return W.current.useCallback(a,b)};exports.useContext=function(a){return W.current.useContext(a)};exports.useDebugValue=function(){};exports.useDeferredValue=function(a){return W.current.useDeferredValue(a)};exports.useEffect=function(a,b){return W.current.useEffect(a,b)};exports.useId=function(){return W.current.useId()};exports.useImperativeHandle=function(a,b,c){return W.current.useImperativeHandle(a,b,c)}; exports.useCallback=function(a,b){return W.current.useCallback(a,b)};exports.useContext=function(a){return W.current.useContext(a)};exports.useDebugValue=function(){};exports.useDeferredValue=function(a){return W.current.useDeferredValue(a)};exports.useEffect=function(a,b){return W.current.useEffect(a,b)};exports.useId=function(){return W.current.useId()};exports.useImperativeHandle=function(a,b,c){return W.current.useImperativeHandle(a,b,c)};
exports.useInsertionEffect=function(a,b){return W.current.useInsertionEffect(a,b)};exports.useLayoutEffect=function(a,b){return W.current.useLayoutEffect(a,b)};exports.useMemo=function(a,b){return W.current.useMemo(a,b)};exports.useReducer=function(a,b,c){return W.current.useReducer(a,b,c)};exports.useRef=function(a){return W.current.useRef(a)};exports.useState=function(a){return W.current.useState(a)};exports.useSyncExternalStore=function(a,b,c){return W.current.useSyncExternalStore(a,b,c)}; exports.useInsertionEffect=function(a,b){return W.current.useInsertionEffect(a,b)};exports.useLayoutEffect=function(a,b){return W.current.useLayoutEffect(a,b)};exports.useMemo=function(a,b){return W.current.useMemo(a,b)};exports.useReducer=function(a,b,c){return W.current.useReducer(a,b,c)};exports.useRef=function(a){return W.current.useRef(a)};exports.useState=function(a){return W.current.useState(a)};exports.useSyncExternalStore=function(a,b,c){return W.current.useSyncExternalStore(a,b,c)};
exports.useTransition=function(){return W.current.useTransition()};exports.version="18.3.0-next-bfb9cbd8c-20230223"; exports.useTransition=function(){return W.current.useTransition()};exports.version="18.3.0-next-41110021f-20230301";
...@@ -302,7 +302,7 @@ function generateCacheKey(request) { ...@@ -302,7 +302,7 @@ function generateCacheKey(request) {
} }
} }
var ReactVersion = '18.3.0-next-bfb9cbd8c-20230223'; var ReactVersion = '18.3.0-next-41110021f-20230301';
// ATTENTION // ATTENTION
// When adding new symbols to this file, // When adding new symbols to this file,
......
...@@ -26,4 +26,4 @@ exports.cloneElement=function(a,b,d){if(null===a||void 0===a)throw Error(F(267,a ...@@ -26,4 +26,4 @@ exports.cloneElement=function(a,b,d){if(null===a||void 0===a)throw Error(F(267,a
key:e,ref:f,props:c,_owner:h}};exports.createElement=function(a,b,d){var c,e={},f=null,h=null;if(null!=b)for(c in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(f=""+b.key),b)N.call(b,c)&&!P.hasOwnProperty(c)&&(e[c]=b[c]);var g=arguments.length-2;if(1===g)e.children=d;else if(1<g){for(var k=Array(g),l=0;l<g;l++)k[l]=arguments[l+2];e.children=k}if(a&&a.defaultProps)for(c in g=a.defaultProps,g)void 0===e[c]&&(e[c]=g[c]);return{$$typeof:t,type:a,key:f,ref:h,props:e,_owner:O.current}};exports.createRef=function(){return{current:null}}; key:e,ref:f,props:c,_owner:h}};exports.createElement=function(a,b,d){var c,e={},f=null,h=null;if(null!=b)for(c in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(f=""+b.key),b)N.call(b,c)&&!P.hasOwnProperty(c)&&(e[c]=b[c]);var g=arguments.length-2;if(1===g)e.children=d;else if(1<g){for(var k=Array(g),l=0;l<g;l++)k[l]=arguments[l+2];e.children=k}if(a&&a.defaultProps)for(c in g=a.defaultProps,g)void 0===e[c]&&(e[c]=g[c]);return{$$typeof:t,type:a,key:f,ref:h,props:e,_owner:O.current}};exports.createRef=function(){return{current:null}};
exports.createServerContext=function(a,b){var d=!0;if(!Z[a]){d=!1;var c={$$typeof:z,_currentValue:b,_currentValue2:b,_defaultValue:b,_threadCount:0,Provider:null,Consumer:null,_globalName:a};c.Provider={$$typeof:y,_context:c};Z[a]=c}c=Z[a];if(c._defaultValue===D)c._defaultValue=b,c._currentValue===D&&(c._currentValue=b),c._currentValue2===D&&(c._currentValue2=b);else if(d)throw Error(F(429,a));return c};exports.forwardRef=function(a){return{$$typeof:A,render:a}};exports.isValidElement=Q; exports.createServerContext=function(a,b){var d=!0;if(!Z[a]){d=!1;var c={$$typeof:z,_currentValue:b,_currentValue2:b,_defaultValue:b,_threadCount:0,Provider:null,Consumer:null,_globalName:a};c.Provider={$$typeof:y,_context:c};Z[a]=c}c=Z[a];if(c._defaultValue===D)c._defaultValue=b,c._currentValue===D&&(c._currentValue=b),c._currentValue2===D&&(c._currentValue2=b);else if(d)throw Error(F(429,a));return c};exports.forwardRef=function(a){return{$$typeof:A,render:a}};exports.isValidElement=Q;
exports.lazy=function(a){return{$$typeof:aa,_payload:{_status:-1,_result:a},_init:da}};exports.memo=function(a,b){return{$$typeof:C,type:a,compare:void 0===b?null:b}};exports.startTransition=function(a){var b=X.transition;X.transition={};try{a()}finally{X.transition=b}};exports.use=function(a){return W.current.use(a)};exports.useCallback=function(a,b){return W.current.useCallback(a,b)};exports.useContext=function(a){return W.current.useContext(a)};exports.useDebugValue=function(){}; exports.lazy=function(a){return{$$typeof:aa,_payload:{_status:-1,_result:a},_init:da}};exports.memo=function(a,b){return{$$typeof:C,type:a,compare:void 0===b?null:b}};exports.startTransition=function(a){var b=X.transition;X.transition={};try{a()}finally{X.transition=b}};exports.use=function(a){return W.current.use(a)};exports.useCallback=function(a,b){return W.current.useCallback(a,b)};exports.useContext=function(a){return W.current.useContext(a)};exports.useDebugValue=function(){};
exports.useId=function(){return W.current.useId()};exports.useMemo=function(a,b){return W.current.useMemo(a,b)};exports.version="18.3.0-next-bfb9cbd8c-20230223"; exports.useId=function(){return W.current.useId()};exports.useMemo=function(a,b){return W.current.useMemo(a,b)};exports.version="18.3.0-next-41110021f-20230301";
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"keywords": [ "keywords": [
"react" "react"
], ],
"version": "18.3.0-next-bfb9cbd8c-20230223", "version": "18.3.0-next-41110021f-20230301",
"homepage": "https://reactjs.org/", "homepage": "https://reactjs.org/",
"bugs": "https://github.com/facebook/react/issues", "bugs": "https://github.com/facebook/react/issues",
"license": "MIT", "license": "MIT",
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment