PluginProbe
Gutenberg / trunk
Gutenberg vtrunk
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
← All changes | build/scripts/vendors/react-19.js +52 -27 24.0.0 → trunk View file →
@@ -133,8 +133,10 @@
133 133 case REACT_SUSPENSE_LIST_TYPE:
134 134 return "SuspenseList";
135 135 case REACT_ACTIVITY_TYPE:
136 136 return "Activity";
137 + case REACT_VIEW_TRANSITION_TYPE:
138 + return "ViewTransition";
137 139 }
138 140 if ("object" === typeof type)
139 141 switch ("number" === typeof type.tag && console.error(
140 142 "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
@@ -389,10 +391,13 @@
389 391 return result;
390 392 }
391 393 function lazyInitializer(payload) {
392 394 if (-1 === payload._status) {
393 - var ioInfo = payload._ioInfo;
394 - null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());
395 + var resolveDebugValue = null, rejectDebugValue = null, ioInfo = payload._ioInfo;
396 + null != ioInfo && (ioInfo.start = ioInfo.end = performance.now(), ioInfo.value = new Promise(function(resolve, reject) {
397 + resolveDebugValue = resolve;
398 + rejectDebugValue = reject;
399 + }));
395 400 ioInfo = payload._result;
396 401 var thenable = ioInfo();
397 402 thenable.then(
398 403 function(moduleObject) {
@@ -399,9 +404,15 @@
399 404 if (0 === payload._status || -1 === payload._status) {
400 405 payload._status = 1;
401 406 payload._result = moduleObject;
402 407 var _ioInfo = payload._ioInfo;
403 - null != _ioInfo && (_ioInfo.end = performance.now());
408 + if (null != _ioInfo) {
409 + _ioInfo.end = performance.now();
410 + var debugValue = null == moduleObject ? void 0 : moduleObject.default;
411 + resolveDebugValue(debugValue);
412 + _ioInfo.value.status = "fulfilled";
413 + _ioInfo.value.value = debugValue;
414 + }
404 415 void 0 === thenable.status && (thenable.status = "fulfilled", thenable.value = moduleObject);
405 416 }
406 417 },
407 418 function(error) {
@@ -408,9 +419,9 @@
408 419 if (0 === payload._status || -1 === payload._status) {
409 420 payload._status = 2;
410 421 payload._result = error;
411 422 var _ioInfo2 = payload._ioInfo;
412 - null != _ioInfo2 && (_ioInfo2.end = performance.now());
423 + null != _ioInfo2 && (_ioInfo2.end = performance.now(), _ioInfo2.value.then(noop, noop), rejectDebugValue(error), _ioInfo2.value.status = "rejected", _ioInfo2.value.reason = error);
413 424 void 0 === thenable.status && (thenable.status = "rejected", thenable.reason = error);
414 425 }
415 426 }
416 427 );
@@ -415,9 +426,8 @@
415 426 }
416 427 );
417 428 ioInfo = payload._ioInfo;
418 429 if (null != ioInfo) {
419 - ioInfo.value = thenable;
420 430 var displayName = thenable.displayName;
421 431 "string" === typeof displayName && (ioInfo.name = displayName);
422 432 }
423 433 -1 === payload._status && (payload._status = 0, payload._result = thenable);
@@ -441,8 +451,37 @@
441 451 }
442 452 function releaseAsyncTransition() {
443 453 ReactSharedInternals.asyncTransitions--;
444 454 }
455 + function startTransition(scope) {
456 + var prevTransition = ReactSharedInternals.T, currentTransition = {};
457 + currentTransition.types = null !== prevTransition ? prevTransition.types : null;
458 + currentTransition._updatedFibers = /* @__PURE__ */ new Set();
459 + ReactSharedInternals.T = currentTransition;
460 + try {
461 + var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
462 + null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
463 + "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(noop, reportGlobalError));
464 + } catch (error) {
465 + reportGlobalError(error);
466 + } finally {
467 + null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn(
468 + "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
469 + )), null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error(
470 + "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
471 + ), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
472 + }
473 + }
474 + function addTransitionType(type) {
475 + var transition = ReactSharedInternals.T;
476 + if (null !== transition) {
477 + var transitionTypes = transition.types;
478 + null === transitionTypes ? transition.types = [type] : -1 === transitionTypes.indexOf(type) && transitionTypes.push(type);
479 + } else
480 + 0 === ReactSharedInternals.asyncTransitions && console.error(
481 + "addTransitionType can only be called inside a `startTransition()` callback. It must be associated with a specific Transition."
482 + ), startTransition(addTransitionType.bind(null, type));
483 + }
445 484 function enqueueTask(task) {
446 485 if (null === enqueueTaskImpl)
447 486 try {
448 487 var requireString = ("require" + Math.random()).slice(0, 7);
@@ -515,9 +554,9 @@
515 554 }
516 555 }
517 556 }
518 557 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
519 - var REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = {
558 + var REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), REACT_VIEW_TRANSITION_TYPE = /* @__PURE__ */ Symbol.for("react.view_transition"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = {
520 559 isMounted: function() {
521 560 return false;
522 561 },
523 562 enqueueForceUpdate: function(publicInstance) {
@@ -650,8 +689,9 @@
650 689 exports.Profiler = REACT_PROFILER_TYPE;
651 690 exports.PureComponent = PureComponent;
652 691 exports.StrictMode = REACT_STRICT_MODE_TYPE;
653 692 exports.Suspense = REACT_SUSPENSE_TYPE;
693 + exports.ViewTransition = REACT_VIEW_TRANSITION_TYPE;
654 694 exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
655 695 exports.__COMPILER_RUNTIME = deprecatedAPIs;
656 696 exports.act = function(callback) {
657 697 var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth;
@@ -729,8 +769,9 @@
729 769 })) : resolve(returnValue$jscomp$0);
730 770 }
731 771 };
732 772 };
773 + exports.addTransitionType = addTransitionType;
733 774 exports.cache = function(fn) {
734 775 return function() {
735 776 return fn.apply(null, arguments);
736 777 };
@@ -805,8 +846,9 @@
805 846 };
806 847 exports.createElement = function(type, config, children) {
807 848 for (var i = 2; i < arguments.length; i++)
808 849 validateChildKeys(arguments[i]);
850 + var propName;
809 851 i = {};
810 852 var key = null;
811 853 if (null != config)
812 854 for (propName in didWarnAboutOldJSXRuntime || !("__self" in config) || "key" in config || (didWarnAboutOldJSXRuntime = true, console.warn(
@@ -827,15 +869,15 @@
827 869 key && defineKeyPropWarningGetter(
828 870 i,
829 871 "function" === typeof type ? type.displayName || type.name || "Unknown" : type
830 872 );
831 - var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
873 + (propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++) ? (childArray = Error.stackTraceLimit, Error.stackTraceLimit = 10, childrenLength = Error("react-stack-top-frame"), Error.stackTraceLimit = childArray) : childrenLength = unknownOwnerDebugStack;
832 874 return ReactElement(
833 875 type,
834 876 key,
835 877 i,
836 878 getOwner(),
837 - propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
879 + childrenLength,
838 880 propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
839 881 );
840 882 };
841 883 exports.createRef = function() {
@@ -913,26 +955,9 @@
913 955 }
914 956 });
915 957 return compare;
916 958 };
917 - exports.startTransition = function(scope) {
918 - var prevTransition = ReactSharedInternals.T, currentTransition = {};
919 - currentTransition._updatedFibers = /* @__PURE__ */ new Set();
920 - ReactSharedInternals.T = currentTransition;
921 - try {
922 - var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
923 - null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
924 - "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(noop, reportGlobalError));
925 - } catch (error) {
926 - reportGlobalError(error);
927 - } finally {
928 - null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn(
929 - "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
930 - )), null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error(
931 - "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
932 - ), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
933 - }
934 - };
959 + exports.startTransition = startTransition;
935 960 exports.unstable_useCacheRefresh = function() {
936 961 return resolveDispatcher().useCacheRefresh();
937 962 };
938 963 exports.use = function(usable) {
@@ -1012,9 +1037,9 @@
1012 1037 };
1013 1038 exports.useTransition = function() {
1014 1039 return resolveDispatcher().useTransition();
1015 1040 };
1016 - exports.version = "19.2.8";
1041 + exports.version = "19.3.0";
1017 1042 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
1018 1043 })();
1019 1044 }
1020 1045 });