Skip to content

Commit

Permalink
Show file tree
Hide file tree
Showing 63 changed files with 8,376 additions and 1,926 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,12 @@
"react-dom": "19.0.0-beta-04b058868c-20240508",
"react-dom-17": "npm:[email protected]",
"react-dom-builtin": "npm:[email protected]",
"react-dom-experimental-builtin": "npm:[email protected]4508873393-20240430",
"react-experimental-builtin": "npm:[email protected]4508873393-20240430",
"react-dom-experimental-builtin": "npm:[email protected]04b058868c-20240508",
"react-experimental-builtin": "npm:[email protected]04b058868c-20240508",
"react-server-dom-turbopack": "19.0.0-beta-04b058868c-20240508",
"react-server-dom-turbopack-experimental": "npm:[email protected]4508873393-20240430",
"react-server-dom-turbopack-experimental": "npm:[email protected]04b058868c-20240508",
"react-server-dom-webpack": "19.0.0-beta-04b058868c-20240508",
"react-server-dom-webpack-experimental": "npm:[email protected]4508873393-20240430",
"react-server-dom-webpack-experimental": "npm:[email protected]04b058868c-20240508",
"react-ssr-prepass": "1.0.8",
"react-virtualized": "9.22.3",
"relay-compiler": "13.0.2",
Expand All @@ -218,8 +218,8 @@
"resolve-from": "5.0.0",
"sass": "1.54.0",
"satori": "0.10.9",
"scheduler-builtin": "npm:[email protected]4508873393-20240430",
"scheduler-experimental-builtin": "npm:[email protected]4508873393-20240430",
"scheduler-builtin": "npm:[email protected]04b058868c-20240508",
"scheduler-experimental-builtin": "npm:[email protected]04b058868c-20240508",
"seedrandom": "3.0.5",
"semver": "7.3.7",
"shell-quote": "1.7.3",
Expand Down Expand Up @@ -256,7 +256,7 @@
"react": "19.0.0-beta-04b058868c-20240508",
"react-dom": "19.0.0-beta-04b058868c-20240508",
"react-is": "19.0.0-beta-04b058868c-20240508",
"scheduler": "0.25.0-beta-94eed63c49-20240425"
"scheduler": "0.25.0-beta-04b058868c-20240508"
},
"engines": {
"node": ">=18.17.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@
"@opentelemetry/api": "^1.1.0",
"@playwright/test": "^1.41.2",
"babel-plugin-react-compiler": "*",
"react": "^19.0.0-0",
"react-dom": "^19.0.0-0",
"react": "19.0.0-beta-04b058868c-20240508",
"react-dom": "19.0.0-beta-04b058868c-20240508",
"sass": "^1.3.0"
},
"peerDependenciesMeta": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,15 @@

if (process.env.NODE_ENV !== "production") {
(function() {

'use strict';

/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
'use strict';
if (
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===
'function'
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
}
var React = require("next/dist/compiled/react-experimental");
var React = require("next/dist/compiled/react-experimental");
var Scheduler = require("next/dist/compiled/scheduler-experimental");
var ReactDOM = require('react-dom');

Expand Down Expand Up @@ -8784,6 +8781,11 @@ function extractEvents$1(dispatchQueue, domEventName, maybeTargetInst, nativeEve
var temp = submitter.ownerDocument.createElement('input');
temp.name = submitter.name;
temp.value = submitter.value;

if (form.id) {
temp.setAttribute('form', form.id);
}

submitter.parentNode.insertBefore(temp, submitter);
formData = new FormData(form);
temp.parentNode.removeChild(temp);
Expand Down Expand Up @@ -36167,7 +36169,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition
return root;
}

var ReactVersion = '19.0.0-experimental-4508873393-20240430';
var ReactVersion = '19.0.0-experimental-04b058868c-20240508';

// Might add PROFILE later.

Expand Down Expand Up @@ -37667,14 +37669,13 @@ var foundDevTools = injectIntoDevTools({
exports.createRoot = createRoot;
exports.hydrateRoot = hydrateRoot;
exports.version = ReactVersion;
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===
'function'
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
}

})();
}
Original file line number Diff line number Diff line change
Expand Up @@ -2292,6 +2292,8 @@ function extractEvents$1(
var temp = submitter.ownerDocument.createElement("input");
temp.name = submitter.name;
temp.value = submitter.value;
nativeEventTarget.id &&
temp.setAttribute("form", nativeEventTarget.id);
submitter.parentNode.insertBefore(temp, submitter);
var formData = new FormData(nativeEventTarget);
temp.parentNode.removeChild(temp);
Expand Down Expand Up @@ -14696,7 +14698,7 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
var devToolsConfig$jscomp$inline_1621 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-experimental-4508873393-20240430",
version: "19.0.0-experimental-04b058868c-20240508",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_1999 = {
Expand Down Expand Up @@ -14726,7 +14728,7 @@ var internals$jscomp$inline_1999 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-experimental-4508873393-20240430"
reconcilerVersion: "19.0.0-experimental-04b058868c-20240508"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2000 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -14832,4 +14834,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.0.0-experimental-4508873393-20240430";
exports.version = "19.0.0-experimental-04b058868c-20240508";
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,15 @@

if (process.env.NODE_ENV !== "production") {
(function() {

'use strict';

/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
'use strict';
if (
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===
'function'
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
}
var React = require("next/dist/compiled/react-experimental");
var React = require("next/dist/compiled/react-experimental");
var Scheduler = require("next/dist/compiled/scheduler-experimental");
var ReactDOM = require('react-dom');

Expand Down Expand Up @@ -8832,6 +8829,11 @@ function extractEvents$1(dispatchQueue, domEventName, maybeTargetInst, nativeEve
var temp = submitter.ownerDocument.createElement('input');
temp.name = submitter.name;
temp.value = submitter.value;

if (form.id) {
temp.setAttribute('form', form.id);
}

submitter.parentNode.insertBefore(temp, submitter);
formData = new FormData(form);
temp.parentNode.removeChild(temp);
Expand Down Expand Up @@ -36215,7 +36217,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition
return root;
}

var ReactVersion = '19.0.0-experimental-4508873393-20240430';
var ReactVersion = '19.0.0-experimental-04b058868c-20240508';

function createPortal$1(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.
implementation) {
Expand Down Expand Up @@ -38121,14 +38123,13 @@ exports.unstable_batchedUpdates = batchedUpdates;
exports.useFormState = useFormState;
exports.useFormStatus = useFormStatus;
exports.version = ReactVersion;
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===
'function'
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
}

})();
}
Original file line number Diff line number Diff line change
Expand Up @@ -2414,6 +2414,8 @@ function extractEvents$1(
var temp = submitter.ownerDocument.createElement("input");
temp.name = submitter.name;
temp.value = submitter.value;
nativeEventTarget.id &&
temp.setAttribute("form", nativeEventTarget.id);
submitter.parentNode.insertBefore(temp, submitter);
var formData = new FormData(nativeEventTarget);
temp.parentNode.removeChild(temp);
Expand Down Expand Up @@ -15407,7 +15409,7 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
var devToolsConfig$jscomp$inline_1708 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-experimental-4508873393-20240430",
version: "19.0.0-experimental-04b058868c-20240508",
rendererPackageName: "react-dom"
};
(function (internals) {
Expand Down Expand Up @@ -15450,7 +15452,7 @@ var devToolsConfig$jscomp$inline_1708 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-experimental-4508873393-20240430"
reconcilerVersion: "19.0.0-experimental-04b058868c-20240508"
});
function noop() {}
function getCrossOriginStringAs(as, input) {
Expand Down Expand Up @@ -15704,7 +15706,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-experimental-4508873393-20240430";
exports.version = "19.0.0-experimental-04b058868c-20240508";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '19.0.0-experimental-4508873393-20240430';
var ReactVersion = '19.0.0-experimental-04b058868c-20240508';

var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;

Expand Down Expand Up @@ -2565,11 +2565,7 @@ var startHiddenInputChunk = stringToPrecomputedChunk('<input type="hidden"');
function pushAdditionalFormField(value, key) {
var target = this;
target.push(startHiddenInputChunk);

if (typeof value !== 'string') {
throw new Error('File/Blob fields are not yet supported in progressive forms. ' + 'It probably means you are closing over binary data or FormData in a Server Action.');
}

validateAdditionalFormField(value);
pushStringAttribute(target, 'name', key);
pushStringAttribute(target, 'value', value);
target.push(endOfStartTagSelfClosing);
Expand All @@ -2582,14 +2578,35 @@ function pushAdditionalFormFields(target, formData) {
}
}

function validateAdditionalFormField(value, key) {
if (typeof value !== 'string') {
throw new Error('File/Blob fields are not yet supported in progressive forms. ' + 'Will fallback to client hydration.');
}
}

function validateAdditionalFormFields(formData) {
if (formData != null) {
// $FlowFixMe[prop-missing]: FormData has forEach.
formData.forEach(validateAdditionalFormField);
}

return formData;
}

function getCustomFormFields(resumableState, formAction) {
var customAction = formAction.$$FORM_ACTION;

if (typeof customAction === 'function') {
var prefix = makeFormFieldPrefix(resumableState);

try {
return formAction.$$FORM_ACTION(prefix);
var customFields = formAction.$$FORM_ACTION(prefix);

if (customFields) {
validateAdditionalFormFields(customFields.data);
}

return customFields;
} catch (x) {
if (typeof x === 'object' && x !== null && typeof x.then === 'function') {
// Rethrow suspense.
Expand Down
Loading

0 comments on commit 1539871

Please sign in to comment.