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-jsx-runtime-19.js +63 -3 23.5.2 → trunk View file →
@@ -1,9 +1,28 @@
1 1 var ReactJSXRuntime = (() => {
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
7 26 // react-external:react
8 27 var require_react = __commonJS({
9 28 "react-external:react"(exports, module) {
@@ -33,8 +52,10 @@
33 52 case REACT_SUSPENSE_LIST_TYPE:
34 53 return "SuspenseList";
35 54 case REACT_ACTIVITY_TYPE:
36 55 return "Activity";
56 + case REACT_VIEW_TRANSITION_TYPE:
57 + return "ViewTransition";
37 58 }
38 59 if ("object" === typeof type)
39 60 switch ("number" === typeof type.tag && console.error(
40 61 "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
@@ -224,9 +245,9 @@
224 245 }
225 246 function isValidElement(object) {
226 247 return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
227 248 }
228 - var React = require_react(), 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_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
249 + var React = require_react(), 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"), REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
229 250 return null;
230 251 };
231 252 React = {
232 253 react_stack_bottom_frame: function(callStackForError) {
@@ -243,25 +264,37 @@
243 264 var didWarnAboutKeySpread = {};
244 265 exports.Fragment = REACT_FRAGMENT_TYPE;
245 266 exports.jsx = function(type, config, maybeKey) {
246 267 var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
268 + if (trackActualOwner) {
269 + var previousStackTraceLimit = Error.stackTraceLimit;
270 + Error.stackTraceLimit = 10;
271 + var debugStackDEV = Error("react-stack-top-frame");
272 + Error.stackTraceLimit = previousStackTraceLimit;
273 + } else debugStackDEV = unknownOwnerDebugStack;
247 274 return jsxDEVImpl(
248 275 type,
249 276 config,
250 277 maybeKey,
251 278 false,
252 - trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
279 + debugStackDEV,
253 280 trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
254 281 );
255 282 };
256 283 exports.jsxs = function(type, config, maybeKey) {
257 284 var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
285 + if (trackActualOwner) {
286 + var previousStackTraceLimit = Error.stackTraceLimit;
287 + Error.stackTraceLimit = 10;
288 + var debugStackDEV = Error("react-stack-top-frame");
289 + Error.stackTraceLimit = previousStackTraceLimit;
290 + } else debugStackDEV = unknownOwnerDebugStack;
258 291 return jsxDEVImpl(
259 292 type,
260 293 config,
261 294 maybeKey,
262 295 true,
263 - trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
296 + debugStackDEV,
264 297 trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
265 298 );
266 299 };
267 300 })();
@@ -279,16 +312,43 @@
279 312 }
280 313 }
281 314 });
282 315
316 + // ../react-19/warn-compat.js
317 + var warn_compat_exports = {};
318 + __export(warn_compat_exports, {
319 + warnCompat: () => warnCompat
320 + });
321 + function warnCompat(key, message) {
322 + if (warned.has(key)) {
323 + return;
324 + }
325 + warned.add(key);
326 + if (typeof console !== "undefined" && console.warn) {
327 + console.warn(`${PREFIX} ${message}`);
328 + }
329 + }
330 + var PREFIX, warned;
331 + var init_warn_compat = __esm({
332 + "../react-19/warn-compat.js"() {
333 + PREFIX = "[wordpress-react-19]";
334 + warned = /* @__PURE__ */ new Set();
335 + }
336 + });
337 +
283 338 // ../react-19/react-jsx-runtime.js
284 339 var require_react_jsx_runtime = __commonJS({
285 340 "../react-19/react-jsx-runtime.js"(exports, module) {
286 341 var jsxRuntime = require_jsx_runtime();
342 + var { warnCompat: warnCompat2 } = (init_warn_compat(), __toCommonJS(warn_compat_exports));
287 343 function applyDefaultProps(type, config) {
288 344 if (!type || !type.defaultProps) {
289 345 return config;
290 346 }
347 + warnCompat2(
348 + "jsx-default-props",
349 + "`defaultProps` on function components was removed in React 19 and is emulated by a compatibility polyfill. Use default parameters instead."
350 + );
291 351 const defaultProps = type.defaultProps;
292 352 let props = config;
293 353 for (const propName in defaultProps) {
294 354 if (props[propName] === void 0) {