PluginProbe
Gutenberg / 24.1.0
Gutenberg v24.1.0
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-orig.js +124 -37 23.5.2 → 24.1.0 View file →
@@ -1,10 +1,51 @@
1 1 var React = (() => {
2 + var __defProp = Object.defineProperty;
3 + var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
2 4 var __getOwnPropNames = Object.getOwnPropertyNames;
5 + var __hasOwnProp = Object.prototype.hasOwnProperty;
6 + var __esm = (fn, res) => function __init() {
7 + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
8 + };
3 9 var __commonJS = (cb, mod) => function __require() {
4 10 return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
5 11 };
12 + var __export = (target, all) => {
13 + for (var name in all)
14 + __defProp(target, name, { get: all[name], enumerable: true });
15 + };
16 + var __copyProps = (to, from, except, desc) => {
17 + if (from && typeof from === "object" || typeof from === "function") {
18 + for (let key of __getOwnPropNames(from))
19 + if (!__hasOwnProp.call(to, key) && key !== except)
20 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
21 + }
22 + return to;
23 + };
24 + var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6 25
26 + // ../react-19/warn-compat.js
27 + var warn_compat_exports = {};
28 + __export(warn_compat_exports, {
29 + warnCompat: () => warnCompat
30 + });
31 + function warnCompat(key, message) {
32 + if (warned.has(key)) {
33 + return;
34 + }
35 + warned.add(key);
36 + if (typeof console !== "undefined" && console.warn) {
37 + console.warn(`${PREFIX} ${message}`);
38 + }
39 + }
40 + var PREFIX, warned;
41 + var init_warn_compat = __esm({
42 + "../react-19/warn-compat.js"() {
43 + PREFIX = "[wordpress-react-19]";
44 + warned = /* @__PURE__ */ new Set();
45 + }
46 + });
47 +
7 48 // ../react-19/node_modules/react/cjs/react.development.js
8 49 var require_react_development = __commonJS({
9 50 "../react-19/node_modules/react/cjs/react.development.js"(exports, module) {
10 51 "use strict";
@@ -90,8 +131,10 @@
90 131 case REACT_SUSPENSE_LIST_TYPE:
91 132 return "SuspenseList";
92 133 case REACT_ACTIVITY_TYPE:
93 134 return "Activity";
135 + case REACT_VIEW_TRANSITION_TYPE:
136 + return "ViewTransition";
94 137 }
95 138 if ("object" === typeof type)
96 139 switch ("number" === typeof type.tag && console.error(
97 140 "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
@@ -346,10 +389,13 @@
346 389 return result;
347 390 }
348 391 function lazyInitializer(payload) {
349 392 if (-1 === payload._status) {
350 - var ioInfo = payload._ioInfo;
351 - null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());
393 + var resolveDebugValue = null, rejectDebugValue = null, ioInfo = payload._ioInfo;
394 + null != ioInfo && (ioInfo.start = ioInfo.end = performance.now(), ioInfo.value = new Promise(function(resolve, reject) {
395 + resolveDebugValue = resolve;
396 + rejectDebugValue = reject;
397 + }));
352 398 ioInfo = payload._result;
353 399 var thenable = ioInfo();
354 400 thenable.then(
355 401 function(moduleObject) {
@@ -356,9 +402,15 @@
356 402 if (0 === payload._status || -1 === payload._status) {
357 403 payload._status = 1;
358 404 payload._result = moduleObject;
359 405 var _ioInfo = payload._ioInfo;
360 - null != _ioInfo && (_ioInfo.end = performance.now());
406 + if (null != _ioInfo) {
407 + _ioInfo.end = performance.now();
408 + var debugValue = null == moduleObject ? void 0 : moduleObject.default;
409 + resolveDebugValue(debugValue);
410 + _ioInfo.value.status = "fulfilled";
411 + _ioInfo.value.value = debugValue;
412 + }
361 413 void 0 === thenable.status && (thenable.status = "fulfilled", thenable.value = moduleObject);
362 414 }
363 415 },
364 416 function(error) {
@@ -365,9 +417,9 @@
365 417 if (0 === payload._status || -1 === payload._status) {
366 418 payload._status = 2;
367 419 payload._result = error;
368 420 var _ioInfo2 = payload._ioInfo;
369 - null != _ioInfo2 && (_ioInfo2.end = performance.now());
421 + null != _ioInfo2 && (_ioInfo2.end = performance.now(), _ioInfo2.value.then(noop, noop), rejectDebugValue(error), _ioInfo2.value.status = "rejected", _ioInfo2.value.reason = error);
370 422 void 0 === thenable.status && (thenable.status = "rejected", thenable.reason = error);
371 423 }
372 424 }
373 425 );
@@ -372,9 +424,8 @@
372 424 }
373 425 );
374 426 ioInfo = payload._ioInfo;
375 427 if (null != ioInfo) {
376 - ioInfo.value = thenable;
377 428 var displayName = thenable.displayName;
378 429 "string" === typeof displayName && (ioInfo.name = displayName);
379 430 }
380 431 -1 === payload._status && (payload._status = 0, payload._result = thenable);
@@ -398,8 +449,37 @@
398 449 }
399 450 function releaseAsyncTransition() {
400 451 ReactSharedInternals.asyncTransitions--;
401 452 }
453 + function startTransition(scope) {
454 + var prevTransition = ReactSharedInternals.T, currentTransition = {};
455 + currentTransition.types = null !== prevTransition ? prevTransition.types : null;
456 + currentTransition._updatedFibers = /* @__PURE__ */ new Set();
457 + ReactSharedInternals.T = currentTransition;
458 + try {
459 + var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
460 + null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
461 + "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(noop, reportGlobalError));
462 + } catch (error) {
463 + reportGlobalError(error);
464 + } finally {
465 + null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn(
466 + "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."
467 + )), null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error(
468 + "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."
469 + ), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
470 + }
471 + }
472 + function addTransitionType(type) {
473 + var transition = ReactSharedInternals.T;
474 + if (null !== transition) {
475 + var transitionTypes = transition.types;
476 + null === transitionTypes ? transition.types = [type] : -1 === transitionTypes.indexOf(type) && transitionTypes.push(type);
477 + } else
478 + 0 === ReactSharedInternals.asyncTransitions && console.error(
479 + "addTransitionType can only be called inside a `startTransition()` callback. It must be associated with a specific Transition."
480 + ), startTransition(addTransitionType.bind(null, type));
481 + }
402 482 function enqueueTask(task) {
403 483 if (null === enqueueTaskImpl)
404 484 try {
405 485 var requireString = ("require" + Math.random()).slice(0, 7);
@@ -472,9 +552,9 @@
472 552 }
473 553 }
474 554 }
475 555 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
476 - var 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 = {
556 + var 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 = {
477 557 isMounted: function() {
478 558 return false;
479 559 },
480 560 enqueueForceUpdate: function(publicInstance) {
@@ -607,8 +687,9 @@
607 687 exports.Profiler = REACT_PROFILER_TYPE;
608 688 exports.PureComponent = PureComponent;
609 689 exports.StrictMode = REACT_STRICT_MODE_TYPE;
610 690 exports.Suspense = REACT_SUSPENSE_TYPE;
691 + exports.ViewTransition = REACT_VIEW_TRANSITION_TYPE;
611 692 exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
612 693 exports.__COMPILER_RUNTIME = deprecatedAPIs;
613 694 exports.act = function(callback) {
614 695 var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth;
@@ -686,8 +767,9 @@
686 767 })) : resolve(returnValue$jscomp$0);
687 768 }
688 769 };
689 770 };
771 + exports.addTransitionType = addTransitionType;
690 772 exports.cache = function(fn) {
691 773 return function() {
692 774 return fn.apply(null, arguments);
693 775 };
@@ -762,8 +844,9 @@
762 844 };
763 845 exports.createElement = function(type, config, children) {
764 846 for (var i = 2; i < arguments.length; i++)
765 847 validateChildKeys(arguments[i]);
848 + var propName;
766 849 i = {};
767 850 var key = null;
768 851 if (null != config)
769 852 for (propName in didWarnAboutOldJSXRuntime || !("__self" in config) || "key" in config || (didWarnAboutOldJSXRuntime = true, console.warn(
@@ -784,15 +867,15 @@
784 867 key && defineKeyPropWarningGetter(
785 868 i,
786 869 "function" === typeof type ? type.displayName || type.name || "Unknown" : type
787 870 );
788 - var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
871 + (propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++) ? (childArray = Error.stackTraceLimit, Error.stackTraceLimit = 10, childrenLength = Error("react-stack-top-frame"), Error.stackTraceLimit = childArray) : childrenLength = unknownOwnerDebugStack;
789 872 return ReactElement(
790 873 type,
791 874 key,
792 875 i,
793 876 getOwner(),
794 - propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
877 + childrenLength,
795 878 propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
796 879 );
797 880 };
798 881 exports.createRef = function() {
@@ -870,26 +953,9 @@
870 953 }
871 954 });
872 955 return compare;
873 956 };
874 - exports.startTransition = function(scope) {
875 - var prevTransition = ReactSharedInternals.T, currentTransition = {};
876 - currentTransition._updatedFibers = /* @__PURE__ */ new Set();
877 - ReactSharedInternals.T = currentTransition;
878 - try {
879 - var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
880 - null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
881 - "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(noop, reportGlobalError));
882 - } catch (error) {
883 - reportGlobalError(error);
884 - } finally {
885 - null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn(
886 - "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."
887 - )), null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error(
888 - "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."
889 - ), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
890 - }
891 - };
957 + exports.startTransition = startTransition;
892 958 exports.unstable_useCacheRefresh = function() {
893 959 return resolveDispatcher().useCacheRefresh();
894 960 };
895 961 exports.use = function(usable) {
@@ -969,9 +1035,9 @@
969 1035 };
970 1036 exports.useTransition = function() {
971 1037 return resolveDispatcher().useTransition();
972 1038 };
973 - exports.version = "19.2.7";
1039 + exports.version = "19.3.0";
974 1040 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
975 1041 })();
976 1042 }
977 1043 });
@@ -990,21 +1056,42 @@
990 1056
991 1057 // ../react-19/react.js
992 1058 var require_react2 = __commonJS({
993 1059 "../react-19/react.js"(exports, module) {
994 - module.exports = {
995 - ...require_react(),
996 - // Polyfill React 18 internals for older versions of `react/jsx-runtime`.
997 - __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
998 - ReactCurrentOwner: { current: null },
999 - ReactCurrentDispatcher: { current: null },
1000 - ReactDebugCurrentFrame: {
1001 - setExtraStackFrame: () => {
1002 - },
1003 - getStackAddendum: () => ""
1060 + var { warnCompat: warnCompat2 } = (init_warn_compat(), __toCommonJS(warn_compat_exports));
1061 + var SECRET_INTERNALS_KEY = "__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED";
1062 + var secretInternals = {
1063 + ReactCurrentOwner: { current: null },
1064 + ReactCurrentDispatcher: { current: null },
1065 + ReactDebugCurrentFrame: {
1066 + setExtraStackFrame() {
1067 + warnCompat2(
1068 + "react-secret-internals-setExtraStackFrame",
1069 + `\`${SECRET_INTERNALS_KEY}.ReactDebugCurrentFrame.setExtraStackFrame\` was removed in React 19 and is a no-op compatibility shim.`
1070 + );
1071 + },
1072 + getStackAddendum() {
1073 + warnCompat2(
1074 + "react-secret-internals-getStackAddendum",
1075 + `\`${SECRET_INTERNALS_KEY}.ReactDebugCurrentFrame.getStackAddendum\` was removed in React 19 and is a no-op compatibility shim.`
1076 + );
1077 + return "";
1004 1078 }
1005 1079 }
1006 1080 };
1081 + var react = { ...require_react() };
1082 + Object.defineProperty(react, SECRET_INTERNALS_KEY, {
1083 + enumerable: true,
1084 + configurable: true,
1085 + get() {
1086 + warnCompat2(
1087 + "react-secret-internals",
1088 + `Accessing \`${SECRET_INTERNALS_KEY}\` was removed in React 19 and is provided by a compatibility shim.`
1089 + );
1090 + return secretInternals;
1091 + }
1092 + });
1093 + module.exports = react;
1007 1094 }
1008 1095 });
1009 1096 return require_react2();
1010 1097 })();