diff -r 7b1b88e27a20 -r 48c4eec2b7e6 wp/wp-includes/js/dist/primitives.js --- a/wp/wp-includes/js/dist/primitives.js Thu Sep 29 08:06:27 2022 +0200 +++ b/wp/wp-includes/js/dist/primitives.js Fri Sep 05 18:40:08 2025 +0200 @@ -1,172 +1,72 @@ -/******/ (function() { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ 4403: -/***/ (function(module, exports) { - -var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/ -/* global define */ - -(function () { - 'use strict'; - - var hasOwn = {}.hasOwnProperty; - - function classNames() { - var classes = []; - - for (var i = 0; i < arguments.length; i++) { - var arg = arguments[i]; - if (!arg) continue; - - var argType = typeof arg; - - if (argType === 'string' || argType === 'number') { - classes.push(arg); - } else if (Array.isArray(arg)) { - if (arg.length) { - var inner = classNames.apply(null, arg); - if (inner) { - classes.push(inner); - } - } - } else if (argType === 'object') { - if (arg.toString === Object.prototype.toString) { - for (var key in arg) { - if (hasOwn.call(arg, key) && arg[key]) { - classes.push(key); - } - } - } else { - classes.push(arg.toString()); - } - } - } - - return classes.join(' '); - } - - if ( true && module.exports) { - classNames.default = classNames; - module.exports = classNames; - } else if (true) { - // register as 'classnames', consistent with npm package name - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { - return classNames; - }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} -}()); - - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ // The require scope +/******/ var __webpack_require__ = {}; /******/ /************************************************************************/ -/******/ /* webpack/runtime/compat get default export */ -/******/ !function() { -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function() { return module['default']; } : -/******/ function() { return module; }; -/******/ __webpack_require__.d(getter, { a: getter }); -/******/ return getter; -/******/ }; -/******/ }(); -/******/ /******/ /* webpack/runtime/define property getters */ -/******/ !function() { +/******/ (() => { /******/ // define getter functions for harmony exports -/******/ __webpack_require__.d = function(exports, definition) { +/******/ __webpack_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; -/******/ }(); +/******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ !function() { -/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } -/******/ }(); +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); /******/ /******/ /* webpack/runtime/make namespace object */ -/******/ !function() { +/******/ (() => { /******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { +/******/ __webpack_require__.r = (exports) => { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; -/******/ }(); +/******/ })(); /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. -!function() { -"use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { - "BlockQuotation": function() { return /* reexport */ BlockQuotation; }, - "Circle": function() { return /* reexport */ Circle; }, - "Defs": function() { return /* reexport */ Defs; }, - "G": function() { return /* reexport */ G; }, - "HorizontalRule": function() { return /* reexport */ HorizontalRule; }, - "LinearGradient": function() { return /* reexport */ LinearGradient; }, - "Path": function() { return /* reexport */ Path; }, - "Polygon": function() { return /* reexport */ Polygon; }, - "RadialGradient": function() { return /* reexport */ RadialGradient; }, - "Rect": function() { return /* reexport */ Rect; }, - "SVG": function() { return /* reexport */ SVG; }, - "Stop": function() { return /* reexport */ Stop; }, - "View": function() { return /* reexport */ View; } + BlockQuotation: () => (/* reexport */ BlockQuotation), + Circle: () => (/* reexport */ Circle), + Defs: () => (/* reexport */ Defs), + G: () => (/* reexport */ G), + HorizontalRule: () => (/* reexport */ HorizontalRule), + Line: () => (/* reexport */ Line), + LinearGradient: () => (/* reexport */ LinearGradient), + Path: () => (/* reexport */ Path), + Polygon: () => (/* reexport */ Polygon), + RadialGradient: () => (/* reexport */ RadialGradient), + Rect: () => (/* reexport */ Rect), + SVG: () => (/* reexport */ SVG), + Stop: () => (/* reexport */ Stop), + View: () => (/* reexport */ View) }); -// EXTERNAL MODULE: ./node_modules/classnames/index.js -var classnames = __webpack_require__(4403); -var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); +;// CONCATENATED MODULE: ./node_modules/clsx/dist/clsx.mjs +function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t (0,external_wp_element_namespaceObject.createElement)('circle', props); + /** * @param {import('react').ComponentPropsWithoutRef<'g'>} props * * @return {JSX.Element} G component */ +const G = props => (0,external_wp_element_namespaceObject.createElement)('g', props); -const G = props => (0,external_wp_element_namespaceObject.createElement)('g', props); +/** + * @param {import('react').ComponentPropsWithoutRef<'line'>} props + * + * @return {JSX.Element} Path component + */ +const Line = props => (0,external_wp_element_namespaceObject.createElement)('line', props); + /** * @param {import('react').ComponentPropsWithoutRef<'path'>} props * * @return {JSX.Element} Path component */ +const Path = props => (0,external_wp_element_namespaceObject.createElement)('path', props); -const Path = props => (0,external_wp_element_namespaceObject.createElement)('path', props); /** * @param {import('react').ComponentPropsWithoutRef<'polygon'>} props * * @return {JSX.Element} Polygon component */ +const Polygon = props => (0,external_wp_element_namespaceObject.createElement)('polygon', props); -const Polygon = props => (0,external_wp_element_namespaceObject.createElement)('polygon', props); /** * @param {import('react').ComponentPropsWithoutRef<'rect'>} props * * @return {JSX.Element} Rect component */ +const Rect = props => (0,external_wp_element_namespaceObject.createElement)('rect', props); -const Rect = props => (0,external_wp_element_namespaceObject.createElement)('rect', props); /** * @param {import('react').ComponentPropsWithoutRef<'defs'>} props * * @return {JSX.Element} Defs component */ +const Defs = props => (0,external_wp_element_namespaceObject.createElement)('defs', props); -const Defs = props => (0,external_wp_element_namespaceObject.createElement)('defs', props); /** * @param {import('react').ComponentPropsWithoutRef<'radialGradient'>} props * * @return {JSX.Element} RadialGradient component */ +const RadialGradient = props => (0,external_wp_element_namespaceObject.createElement)('radialGradient', props); -const RadialGradient = props => (0,external_wp_element_namespaceObject.createElement)('radialGradient', props); /** * @param {import('react').ComponentPropsWithoutRef<'linearGradient'>} props * * @return {JSX.Element} LinearGradient component */ +const LinearGradient = props => (0,external_wp_element_namespaceObject.createElement)('linearGradient', props); -const LinearGradient = props => (0,external_wp_element_namespaceObject.createElement)('linearGradient', props); /** * @param {import('react').ComponentPropsWithoutRef<'stop'>} props * * @return {JSX.Element} Stop component */ - const Stop = props => (0,external_wp_element_namespaceObject.createElement)('stop', props); +const SVG = (0,external_wp_element_namespaceObject.forwardRef)( /** - * - * @param {SVGProps} props isPressed indicates whether the SVG should appear as pressed. - * Other props will be passed through to svg component. + * @param {SVGProps} props isPressed indicates whether the SVG should appear as pressed. + * Other props will be passed through to svg component. + * @param {import('react').ForwardedRef} ref The forwarded ref to the SVG element. * * @return {JSX.Element} Stop component */ - -const SVG = _ref => { - let { - className, - isPressed, - ...props - } = _ref; - const appliedProps = { ...props, - className: classnames_default()(className, { +({ + className, + isPressed, + ...props +}, ref) => { + const appliedProps = { + ...props, + className: dist_clsx(className, { 'is-pressed': isPressed }) || undefined, 'aria-hidden': true, focusable: false - }; // Disable reason: We need to have a way to render HTML tag for web. - // eslint-disable-next-line react/forbid-elements + }; - return (0,external_wp_element_namespaceObject.createElement)("svg", appliedProps); -}; + // Disable reason: We need to have a way to render HTML tag for web. + // eslint-disable-next-line react/forbid-elements + return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("svg", { + ...appliedProps, + ref: ref + }); +}); +SVG.displayName = 'SVG'; ;// CONCATENATED MODULE: ./node_modules/@wordpress/primitives/build-module/horizontal-rule/index.js const HorizontalRule = 'hr'; @@ -278,7 +190,6 @@ -}(); (window.wp = window.wp || {}).primitives = __webpack_exports__; /******/ })() ; \ No newline at end of file