diff --git a/package.json b/package.json index 3f94012915c174..0873d1ef98220e 100644 --- a/package.json +++ b/package.json @@ -194,14 +194,14 @@ "random-seed": "0.3.0", "react": "18.2.0", "react-17": "npm:react@17.0.2", - "react-builtin": "npm:react@18.3.0-canary-dd480ef92-20230822", + "react-builtin": "npm:react@18.3.0-canary-d6dcad6a8-20230914", "react-dom": "18.2.0", "react-dom-17": "npm:react-dom@17.0.2", - "react-dom-builtin": "npm:react-dom@18.3.0-canary-dd480ef92-20230822", - "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-dd480ef92-20230822", - "react-experimental-builtin": "npm:react@0.0.0-experimental-dd480ef92-20230822", - "react-server-dom-webpack": "18.3.0-canary-dd480ef92-20230822", - "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-dd480ef92-20230822", + "react-dom-builtin": "npm:react-dom@18.3.0-canary-d6dcad6a8-20230914", + "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-d6dcad6a8-20230914", + "react-experimental-builtin": "npm:react@0.0.0-experimental-d6dcad6a8-20230914", + "react-server-dom-webpack": "18.3.0-canary-d6dcad6a8-20230914", + "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-d6dcad6a8-20230914", "react-ssr-prepass": "1.0.8", "react-virtualized": "9.22.3", "relay-compiler": "13.0.2", @@ -211,8 +211,8 @@ "resolve-from": "5.0.0", "sass": "1.54.0", "satori": "0.10.3", - "scheduler-builtin": "npm:scheduler@0.24.0-canary-dd480ef92-20230822", - "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-dd480ef92-20230822", + "scheduler-builtin": "npm:scheduler@0.24.0-canary-d6dcad6a8-20230914", + "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-d6dcad6a8-20230914", "seedrandom": "3.0.5", "selenium-webdriver": "4.0.0-beta.4", "semver": "7.3.7", diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js index 15a3a5bd195b25..38cec9357cd237 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js @@ -17,7 +17,7 @@ if (process.env.NODE_ENV !== "production") { var React = require("next/dist/compiled/react-experimental"); var ReactDOM = require('react-dom'); -var ReactVersion = '18.3.0-experimental-dd480ef92-20230822'; +var ReactVersion = '18.3.0-experimental-d6dcad6a8-20230914'; var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; @@ -1511,9 +1511,6 @@ var formReplaying = 'addEventListener("submit",function(a){if(!a.defaultPrevente function getValueDescriptorExpectingObjectForWarning(thing) { return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : "something with type \"" + typeof thing + "\""; } -function getValueDescriptorExpectingEnumForWarning(thing) { - return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : typeof thing === 'string' ? JSON.stringify(thing) : "something with type \"" + typeof thing + "\""; -} // same object across all transitions. @@ -1533,8 +1530,9 @@ var ReactDOMServerDispatcher = { preconnect: preconnect, preload: preload, preloadModule: preloadModule, - preinit: preinit, - preinitModule: preinitModule + preinitStyle: preinitStyle, + preinitScript: preinitScript, + preinitModuleScript: preinitModuleScript }; function prepareHostDispatcher() { ReactDOMCurrentDispatcher.current = ReactDOMServerDispatcher; @@ -1558,7 +1556,11 @@ var SentStyleInsertionFunction = 8; var SentFormReplayingRuntime /* */ -= 16; // Per response, global state that is not contextual to the rendering subtree. += 16; // Per request, global state that is not contextual to the rendering subtree. +// This cannot be resumed and therefore should only contain things that are +// temporary working state or are never used in the prerender pass. +// Per response, global state that is not contextual to the rendering subtree. +// This is resumable and therefore should be serializable. var dataElementQuotedEnd = stringToPrecomputedChunk('">'); var startInlineScript = stringToPrecomputedChunk(''); /** - * This escaping function is designed to work with bootstrapScriptContent only. + * This escaping function is designed to work with bootstrapScriptContent and importMap only. * because we know we are escaping the entire script. We can avoid for instance * escaping html comment string sequences that are valid javascript as well because * if there are no sebsequent '); * ensure that the script cannot be early terminated or never terminated state */ -function escapeBootstrapScriptContent(scriptText) { +function escapeBootstrapAndImportMapScriptContent(scriptText) { { checkHtmlStringCoercion(scriptText); } @@ -1592,20 +1594,52 @@ var scriptRegex = /(<\/|<)(s)(cript)/gi; var scriptReplacer = function (match, prefix, s, suffix) { return "" + prefix + (s === 's' ? "\\u0073" : "\\u0053") + suffix; -}; // Allows us to keep track of what we've already written so we can refer back to it. +}; + +var importMapScriptStart = stringToPrecomputedChunk(''); // Allows us to keep track of what we've already written so we can refer back to it. // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) +function createRenderState$1(resumableState, nonce, importMap) { + var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); var completeSegmentData1 = stringToPrecomputedChunk('')} -function Nb(a,b,c,d){switch(c.insertionMode){case 0:case 1:case 2:return a.push('