diff options
Diffstat (limited to '')
-rw-r--r-- | wp-includes/js/dist/block-library.js | 12841 |
1 files changed, 7892 insertions, 4949 deletions
diff --git a/wp-includes/js/dist/block-library.js b/wp-includes/js/dist/block-library.js index 7a456aa..a83fe84 100644 --- a/wp-includes/js/dist/block-library.js +++ b/wp-includes/js/dist/block-library.js @@ -1,8 +1,8 @@ -/******/ (function() { // webpackBootstrap +/******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ 7078: -/***/ (function(module) { +/***/ 2321: +/***/ ((module) => { /** * Checks if the block is experimental based on the metadata loaded @@ -23,8 +23,8 @@ module.exports = function isBlockMetadataExperimental(metadata) { /***/ }), -/***/ 3827: -/***/ (function(module, exports) { +/***/ 1668: +/***/ ((module, exports) => { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! Copyright (c) 2018 Jed Watson. @@ -144,8 +144,8 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! /***/ }), -/***/ 4403: -/***/ (function(module, exports) { +/***/ 5755: +/***/ ((module, exports) => { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! Copyright (c) 2018 Jed Watson. @@ -210,8 +210,8 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! /***/ }), -/***/ 5619: -/***/ (function(module) { +/***/ 7734: +/***/ ((module) => { "use strict"; @@ -290,8 +290,8 @@ module.exports = function equal(a, b) { /***/ }), -/***/ 4793: -/***/ (function(module) { +/***/ 9681: +/***/ ((module) => { var characterMap = { "À": "A", @@ -806,1049 +806,1091 @@ module.exports.remove = removeAccents; /******/ /************************************************************************/ /******/ /* webpack/runtime/compat get default export */ -/******/ !function() { +/******/ (() => { /******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { +/******/ __webpack_require__.n = (module) => { /******/ var getter = module && module.__esModule ? -/******/ function() { return module['default']; } : -/******/ function() { return module; }; +/******/ () => (module['default']) : +/******/ () => (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__, { - __experimentalGetCoreBlocks: function() { return /* binding */ __experimentalGetCoreBlocks; }, - __experimentalRegisterExperimentalCoreBlocks: function() { return /* binding */ __experimentalRegisterExperimentalCoreBlocks; }, - registerCoreBlocks: function() { return /* binding */ registerCoreBlocks; } + __experimentalGetCoreBlocks: () => (/* binding */ __experimentalGetCoreBlocks), + __experimentalRegisterExperimentalCoreBlocks: () => (/* binding */ __experimentalRegisterExperimentalCoreBlocks), + registerCoreBlocks: () => (/* binding */ registerCoreBlocks) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/archives/index.js var archives_namespaceObject = {}; __webpack_require__.r(archives_namespaceObject); __webpack_require__.d(archives_namespaceObject, { - init: function() { return init; }, - metadata: function() { return metadata; }, - name: function() { return archives_name; }, - settings: function() { return settings; } + init: () => (init), + metadata: () => (metadata), + name: () => (archives_name), + settings: () => (settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/avatar/index.js var avatar_namespaceObject = {}; __webpack_require__.r(avatar_namespaceObject); __webpack_require__.d(avatar_namespaceObject, { - init: function() { return avatar_init; }, - metadata: function() { return avatar_metadata; }, - name: function() { return avatar_name; }, - settings: function() { return avatar_settings; } + init: () => (avatar_init), + metadata: () => (avatar_metadata), + name: () => (avatar_name), + settings: () => (avatar_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/audio/index.js var build_module_audio_namespaceObject = {}; __webpack_require__.r(build_module_audio_namespaceObject); __webpack_require__.d(build_module_audio_namespaceObject, { - init: function() { return audio_init; }, - metadata: function() { return audio_metadata; }, - name: function() { return audio_name; }, - settings: function() { return audio_settings; } + init: () => (audio_init), + metadata: () => (audio_metadata), + name: () => (audio_name), + settings: () => (audio_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/button/index.js var build_module_button_namespaceObject = {}; __webpack_require__.r(build_module_button_namespaceObject); __webpack_require__.d(build_module_button_namespaceObject, { - init: function() { return button_init; }, - metadata: function() { return button_metadata; }, - name: function() { return button_name; }, - settings: function() { return button_settings; } + init: () => (button_init), + metadata: () => (button_metadata), + name: () => (button_name), + settings: () => (button_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/buttons/index.js var build_module_buttons_namespaceObject = {}; __webpack_require__.r(build_module_buttons_namespaceObject); __webpack_require__.d(build_module_buttons_namespaceObject, { - init: function() { return buttons_init; }, - metadata: function() { return buttons_metadata; }, - name: function() { return buttons_name; }, - settings: function() { return buttons_settings; } + init: () => (buttons_init), + metadata: () => (buttons_metadata), + name: () => (buttons_name), + settings: () => (buttons_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/calendar/index.js var build_module_calendar_namespaceObject = {}; __webpack_require__.r(build_module_calendar_namespaceObject); __webpack_require__.d(build_module_calendar_namespaceObject, { - init: function() { return calendar_init; }, - metadata: function() { return calendar_metadata; }, - name: function() { return calendar_name; }, - settings: function() { return calendar_settings; } + init: () => (calendar_init), + metadata: () => (calendar_metadata), + name: () => (calendar_name), + settings: () => (calendar_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/categories/index.js var categories_namespaceObject = {}; __webpack_require__.r(categories_namespaceObject); __webpack_require__.d(categories_namespaceObject, { - init: function() { return categories_init; }, - metadata: function() { return categories_metadata; }, - name: function() { return categories_name; }, - settings: function() { return categories_settings; } + init: () => (categories_init), + metadata: () => (categories_metadata), + name: () => (categories_name), + settings: () => (categories_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/freeform/index.js var freeform_namespaceObject = {}; __webpack_require__.r(freeform_namespaceObject); __webpack_require__.d(freeform_namespaceObject, { - init: function() { return freeform_init; }, - metadata: function() { return freeform_metadata; }, - name: function() { return freeform_name; }, - settings: function() { return freeform_settings; } + init: () => (freeform_init), + metadata: () => (freeform_metadata), + name: () => (freeform_name), + settings: () => (freeform_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/code/index.js var build_module_code_namespaceObject = {}; __webpack_require__.r(build_module_code_namespaceObject); __webpack_require__.d(build_module_code_namespaceObject, { - init: function() { return code_init; }, - metadata: function() { return code_metadata; }, - name: function() { return code_name; }, - settings: function() { return code_settings; } + init: () => (code_init), + metadata: () => (code_metadata), + name: () => (code_name), + settings: () => (code_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/column/index.js var build_module_column_namespaceObject = {}; __webpack_require__.r(build_module_column_namespaceObject); __webpack_require__.d(build_module_column_namespaceObject, { - init: function() { return column_init; }, - metadata: function() { return column_metadata; }, - name: function() { return column_name; }, - settings: function() { return column_settings; } + init: () => (column_init), + metadata: () => (column_metadata), + name: () => (column_name), + settings: () => (column_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/columns/index.js var build_module_columns_namespaceObject = {}; __webpack_require__.r(build_module_columns_namespaceObject); __webpack_require__.d(build_module_columns_namespaceObject, { - init: function() { return columns_init; }, - metadata: function() { return columns_metadata; }, - name: function() { return columns_name; }, - settings: function() { return columns_settings; } + init: () => (columns_init), + metadata: () => (columns_metadata), + name: () => (columns_name), + settings: () => (columns_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comments/index.js var comments_namespaceObject = {}; __webpack_require__.r(comments_namespaceObject); __webpack_require__.d(comments_namespaceObject, { - init: function() { return comments_init; }, - metadata: function() { return comments_metadata; }, - name: function() { return comments_name; }, - settings: function() { return comments_settings; } + init: () => (comments_init), + metadata: () => (comments_metadata), + name: () => (comments_name), + settings: () => (comments_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-author-avatar/index.js var build_module_comment_author_avatar_namespaceObject = {}; __webpack_require__.r(build_module_comment_author_avatar_namespaceObject); __webpack_require__.d(build_module_comment_author_avatar_namespaceObject, { - init: function() { return comment_author_avatar_init; }, - metadata: function() { return comment_author_avatar_metadata; }, - name: function() { return comment_author_avatar_name; }, - settings: function() { return comment_author_avatar_settings; } + init: () => (comment_author_avatar_init), + metadata: () => (comment_author_avatar_metadata), + name: () => (comment_author_avatar_name), + settings: () => (comment_author_avatar_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-author-name/index.js var build_module_comment_author_name_namespaceObject = {}; __webpack_require__.r(build_module_comment_author_name_namespaceObject); __webpack_require__.d(build_module_comment_author_name_namespaceObject, { - init: function() { return comment_author_name_init; }, - metadata: function() { return comment_author_name_metadata; }, - name: function() { return comment_author_name_name; }, - settings: function() { return comment_author_name_settings; } + init: () => (comment_author_name_init), + metadata: () => (comment_author_name_metadata), + name: () => (comment_author_name_name), + settings: () => (comment_author_name_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-content/index.js var build_module_comment_content_namespaceObject = {}; __webpack_require__.r(build_module_comment_content_namespaceObject); __webpack_require__.d(build_module_comment_content_namespaceObject, { - init: function() { return comment_content_init; }, - metadata: function() { return comment_content_metadata; }, - name: function() { return comment_content_name; }, - settings: function() { return comment_content_settings; } + init: () => (comment_content_init), + metadata: () => (comment_content_metadata), + name: () => (comment_content_name), + settings: () => (comment_content_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-date/index.js var comment_date_namespaceObject = {}; __webpack_require__.r(comment_date_namespaceObject); __webpack_require__.d(comment_date_namespaceObject, { - init: function() { return comment_date_init; }, - metadata: function() { return comment_date_metadata; }, - name: function() { return comment_date_name; }, - settings: function() { return comment_date_settings; } + init: () => (comment_date_init), + metadata: () => (comment_date_metadata), + name: () => (comment_date_name), + settings: () => (comment_date_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-edit-link/index.js var build_module_comment_edit_link_namespaceObject = {}; __webpack_require__.r(build_module_comment_edit_link_namespaceObject); __webpack_require__.d(build_module_comment_edit_link_namespaceObject, { - init: function() { return comment_edit_link_init; }, - metadata: function() { return comment_edit_link_metadata; }, - name: function() { return comment_edit_link_name; }, - settings: function() { return comment_edit_link_settings; } + init: () => (comment_edit_link_init), + metadata: () => (comment_edit_link_metadata), + name: () => (comment_edit_link_name), + settings: () => (comment_edit_link_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-reply-link/index.js var build_module_comment_reply_link_namespaceObject = {}; __webpack_require__.r(build_module_comment_reply_link_namespaceObject); __webpack_require__.d(build_module_comment_reply_link_namespaceObject, { - init: function() { return comment_reply_link_init; }, - metadata: function() { return comment_reply_link_metadata; }, - name: function() { return comment_reply_link_name; }, - settings: function() { return comment_reply_link_settings; } + init: () => (comment_reply_link_init), + metadata: () => (comment_reply_link_metadata), + name: () => (comment_reply_link_name), + settings: () => (comment_reply_link_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-template/index.js var comment_template_namespaceObject = {}; __webpack_require__.r(comment_template_namespaceObject); __webpack_require__.d(comment_template_namespaceObject, { - init: function() { return comment_template_init; }, - metadata: function() { return comment_template_metadata; }, - name: function() { return comment_template_name; }, - settings: function() { return comment_template_settings; } + init: () => (comment_template_init), + metadata: () => (comment_template_metadata), + name: () => (comment_template_name), + settings: () => (comment_template_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comments-pagination-previous/index.js var comments_pagination_previous_namespaceObject = {}; __webpack_require__.r(comments_pagination_previous_namespaceObject); __webpack_require__.d(comments_pagination_previous_namespaceObject, { - init: function() { return comments_pagination_previous_init; }, - metadata: function() { return comments_pagination_previous_metadata; }, - name: function() { return comments_pagination_previous_name; }, - settings: function() { return comments_pagination_previous_settings; } + init: () => (comments_pagination_previous_init), + metadata: () => (comments_pagination_previous_metadata), + name: () => (comments_pagination_previous_name), + settings: () => (comments_pagination_previous_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comments-pagination/index.js var comments_pagination_namespaceObject = {}; __webpack_require__.r(comments_pagination_namespaceObject); __webpack_require__.d(comments_pagination_namespaceObject, { - init: function() { return comments_pagination_init; }, - metadata: function() { return comments_pagination_metadata; }, - name: function() { return comments_pagination_name; }, - settings: function() { return comments_pagination_settings; } + init: () => (comments_pagination_init), + metadata: () => (comments_pagination_metadata), + name: () => (comments_pagination_name), + settings: () => (comments_pagination_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comments-pagination-next/index.js var comments_pagination_next_namespaceObject = {}; __webpack_require__.r(comments_pagination_next_namespaceObject); __webpack_require__.d(comments_pagination_next_namespaceObject, { - init: function() { return comments_pagination_next_init; }, - metadata: function() { return comments_pagination_next_metadata; }, - name: function() { return comments_pagination_next_name; }, - settings: function() { return comments_pagination_next_settings; } + init: () => (comments_pagination_next_init), + metadata: () => (comments_pagination_next_metadata), + name: () => (comments_pagination_next_name), + settings: () => (comments_pagination_next_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comments-pagination-numbers/index.js var comments_pagination_numbers_namespaceObject = {}; __webpack_require__.r(comments_pagination_numbers_namespaceObject); __webpack_require__.d(comments_pagination_numbers_namespaceObject, { - init: function() { return comments_pagination_numbers_init; }, - metadata: function() { return comments_pagination_numbers_metadata; }, - name: function() { return comments_pagination_numbers_name; }, - settings: function() { return comments_pagination_numbers_settings; } + init: () => (comments_pagination_numbers_init), + metadata: () => (comments_pagination_numbers_metadata), + name: () => (comments_pagination_numbers_name), + settings: () => (comments_pagination_numbers_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comments-title/index.js var comments_title_namespaceObject = {}; __webpack_require__.r(comments_title_namespaceObject); __webpack_require__.d(comments_title_namespaceObject, { - init: function() { return comments_title_init; }, - metadata: function() { return comments_title_metadata; }, - name: function() { return comments_title_name; }, - settings: function() { return comments_title_settings; } + init: () => (comments_title_init), + metadata: () => (comments_title_metadata), + name: () => (comments_title_name), + settings: () => (comments_title_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/cover/index.js var build_module_cover_namespaceObject = {}; __webpack_require__.r(build_module_cover_namespaceObject); __webpack_require__.d(build_module_cover_namespaceObject, { - init: function() { return cover_init; }, - metadata: function() { return cover_metadata; }, - name: function() { return cover_name; }, - settings: function() { return cover_settings; } + init: () => (cover_init), + metadata: () => (cover_metadata), + name: () => (cover_name), + settings: () => (cover_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/details/index.js var build_module_details_namespaceObject = {}; __webpack_require__.r(build_module_details_namespaceObject); __webpack_require__.d(build_module_details_namespaceObject, { - init: function() { return details_init; }, - metadata: function() { return details_metadata; }, - name: function() { return details_name; }, - settings: function() { return details_settings; } + init: () => (details_init), + metadata: () => (details_metadata), + name: () => (details_name), + settings: () => (details_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/embed/index.js var embed_namespaceObject = {}; __webpack_require__.r(embed_namespaceObject); __webpack_require__.d(embed_namespaceObject, { - init: function() { return embed_init; }, - metadata: function() { return embed_metadata; }, - name: function() { return embed_name; }, - settings: function() { return embed_settings; } + init: () => (embed_init), + metadata: () => (embed_metadata), + name: () => (embed_name), + settings: () => (embed_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/file/index.js var build_module_file_namespaceObject = {}; __webpack_require__.r(build_module_file_namespaceObject); __webpack_require__.d(build_module_file_namespaceObject, { - init: function() { return file_init; }, - metadata: function() { return file_metadata; }, - name: function() { return file_name; }, - settings: function() { return file_settings; } + init: () => (file_init), + metadata: () => (file_metadata), + name: () => (file_name), + settings: () => (file_settings) +}); + +// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/form/index.js +var build_module_form_namespaceObject = {}; +__webpack_require__.r(build_module_form_namespaceObject); +__webpack_require__.d(build_module_form_namespaceObject, { + init: () => (form_init), + metadata: () => (form_metadata), + name: () => (form_name), + settings: () => (form_settings) +}); + +// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/form-input/index.js +var form_input_namespaceObject = {}; +__webpack_require__.r(form_input_namespaceObject); +__webpack_require__.d(form_input_namespaceObject, { + init: () => (form_input_init), + metadata: () => (form_input_metadata), + name: () => (form_input_name), + settings: () => (form_input_settings) +}); + +// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/form-submit-button/index.js +var form_submit_button_namespaceObject = {}; +__webpack_require__.r(form_submit_button_namespaceObject); +__webpack_require__.d(form_submit_button_namespaceObject, { + init: () => (form_submit_button_init), + metadata: () => (form_submit_button_metadata), + name: () => (form_submit_button_name), + settings: () => (form_submit_button_settings) +}); + +// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/form-submission-notification/index.js +var form_submission_notification_namespaceObject = {}; +__webpack_require__.r(form_submission_notification_namespaceObject); +__webpack_require__.d(form_submission_notification_namespaceObject, { + init: () => (form_submission_notification_init), + metadata: () => (form_submission_notification_metadata), + name: () => (form_submission_notification_name), + settings: () => (form_submission_notification_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/gallery/index.js var build_module_gallery_namespaceObject = {}; __webpack_require__.r(build_module_gallery_namespaceObject); __webpack_require__.d(build_module_gallery_namespaceObject, { - init: function() { return gallery_init; }, - metadata: function() { return gallery_metadata; }, - name: function() { return gallery_name; }, - settings: function() { return gallery_settings; } + init: () => (gallery_init), + metadata: () => (gallery_metadata), + name: () => (gallery_name), + settings: () => (gallery_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/group/index.js var build_module_group_namespaceObject = {}; __webpack_require__.r(build_module_group_namespaceObject); __webpack_require__.d(build_module_group_namespaceObject, { - init: function() { return group_init; }, - metadata: function() { return group_metadata; }, - name: function() { return group_name; }, - settings: function() { return group_settings; } + init: () => (group_init), + metadata: () => (group_metadata), + name: () => (group_name), + settings: () => (group_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/heading/index.js var build_module_heading_namespaceObject = {}; __webpack_require__.r(build_module_heading_namespaceObject); __webpack_require__.d(build_module_heading_namespaceObject, { - init: function() { return heading_init; }, - metadata: function() { return heading_metadata; }, - name: function() { return heading_name; }, - settings: function() { return heading_settings; } + init: () => (heading_init), + metadata: () => (heading_metadata), + name: () => (heading_name), + settings: () => (heading_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/home-link/index.js var home_link_namespaceObject = {}; __webpack_require__.r(home_link_namespaceObject); __webpack_require__.d(home_link_namespaceObject, { - init: function() { return home_link_init; }, - metadata: function() { return home_link_metadata; }, - name: function() { return home_link_name; }, - settings: function() { return home_link_settings; } + init: () => (home_link_init), + metadata: () => (home_link_metadata), + name: () => (home_link_name), + settings: () => (home_link_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/html/index.js var build_module_html_namespaceObject = {}; __webpack_require__.r(build_module_html_namespaceObject); __webpack_require__.d(build_module_html_namespaceObject, { - init: function() { return html_init; }, - metadata: function() { return html_metadata; }, - name: function() { return html_name; }, - settings: function() { return html_settings; } + init: () => (html_init), + metadata: () => (html_metadata), + name: () => (html_name), + settings: () => (html_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/image/index.js var build_module_image_namespaceObject = {}; __webpack_require__.r(build_module_image_namespaceObject); __webpack_require__.d(build_module_image_namespaceObject, { - init: function() { return image_init; }, - metadata: function() { return image_metadata; }, - name: function() { return image_name; }, - settings: function() { return image_settings; } + init: () => (image_init), + metadata: () => (image_metadata), + name: () => (image_name), + settings: () => (image_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/latest-comments/index.js var latest_comments_namespaceObject = {}; __webpack_require__.r(latest_comments_namespaceObject); __webpack_require__.d(latest_comments_namespaceObject, { - init: function() { return latest_comments_init; }, - metadata: function() { return latest_comments_metadata; }, - name: function() { return latest_comments_name; }, - settings: function() { return latest_comments_settings; } + init: () => (latest_comments_init), + metadata: () => (latest_comments_metadata), + name: () => (latest_comments_name), + settings: () => (latest_comments_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/latest-posts/index.js var latest_posts_namespaceObject = {}; __webpack_require__.r(latest_posts_namespaceObject); __webpack_require__.d(latest_posts_namespaceObject, { - init: function() { return latest_posts_init; }, - metadata: function() { return latest_posts_metadata; }, - name: function() { return latest_posts_name; }, - settings: function() { return latest_posts_settings; } + init: () => (latest_posts_init), + metadata: () => (latest_posts_metadata), + name: () => (latest_posts_name), + settings: () => (latest_posts_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/list/index.js var build_module_list_namespaceObject = {}; __webpack_require__.r(build_module_list_namespaceObject); __webpack_require__.d(build_module_list_namespaceObject, { - init: function() { return list_init; }, - metadata: function() { return list_metadata; }, - name: function() { return list_name; }, - settings: function() { return list_settings; } + init: () => (list_init), + metadata: () => (list_metadata), + name: () => (list_name), + settings: () => (list_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/list-item/index.js var build_module_list_item_namespaceObject = {}; __webpack_require__.r(build_module_list_item_namespaceObject); __webpack_require__.d(build_module_list_item_namespaceObject, { - init: function() { return list_item_init; }, - metadata: function() { return list_item_metadata; }, - name: function() { return list_item_name; }, - settings: function() { return list_item_settings; } + init: () => (list_item_init), + metadata: () => (list_item_metadata), + name: () => (list_item_name), + settings: () => (list_item_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/loginout/index.js var loginout_namespaceObject = {}; __webpack_require__.r(loginout_namespaceObject); __webpack_require__.d(loginout_namespaceObject, { - init: function() { return loginout_init; }, - metadata: function() { return loginout_metadata; }, - name: function() { return loginout_name; }, - settings: function() { return loginout_settings; } + init: () => (loginout_init), + metadata: () => (loginout_metadata), + name: () => (loginout_name), + settings: () => (loginout_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/media-text/index.js var media_text_namespaceObject = {}; __webpack_require__.r(media_text_namespaceObject); __webpack_require__.d(media_text_namespaceObject, { - init: function() { return media_text_init; }, - metadata: function() { return media_text_metadata; }, - name: function() { return media_text_name; }, - settings: function() { return media_text_settings; } + init: () => (media_text_init), + metadata: () => (media_text_metadata), + name: () => (media_text_name), + settings: () => (media_text_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/missing/index.js var missing_namespaceObject = {}; __webpack_require__.r(missing_namespaceObject); __webpack_require__.d(missing_namespaceObject, { - init: function() { return missing_init; }, - metadata: function() { return missing_metadata; }, - name: function() { return missing_name; }, - settings: function() { return missing_settings; } + init: () => (missing_init), + metadata: () => (missing_metadata), + name: () => (missing_name), + settings: () => (missing_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/more/index.js var build_module_more_namespaceObject = {}; __webpack_require__.r(build_module_more_namespaceObject); __webpack_require__.d(build_module_more_namespaceObject, { - init: function() { return more_init; }, - metadata: function() { return more_metadata; }, - name: function() { return more_name; }, - settings: function() { return more_settings; } + init: () => (more_init), + metadata: () => (more_metadata), + name: () => (more_name), + settings: () => (more_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/navigation/index.js var build_module_navigation_namespaceObject = {}; __webpack_require__.r(build_module_navigation_namespaceObject); __webpack_require__.d(build_module_navigation_namespaceObject, { - init: function() { return navigation_init; }, - metadata: function() { return navigation_metadata; }, - name: function() { return navigation_name; }, - settings: function() { return navigation_settings; } + init: () => (navigation_init), + metadata: () => (navigation_metadata), + name: () => (navigation_name), + settings: () => (navigation_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/navigation-link/index.js var navigation_link_namespaceObject = {}; __webpack_require__.r(navigation_link_namespaceObject); __webpack_require__.d(navigation_link_namespaceObject, { - init: function() { return navigation_link_init; }, - metadata: function() { return navigation_link_metadata; }, - name: function() { return navigation_link_name; }, - settings: function() { return navigation_link_settings; } + init: () => (navigation_link_init), + metadata: () => (navigation_link_metadata), + name: () => (navigation_link_name), + settings: () => (navigation_link_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/navigation-submenu/index.js var navigation_submenu_namespaceObject = {}; __webpack_require__.r(navigation_submenu_namespaceObject); __webpack_require__.d(navigation_submenu_namespaceObject, { - init: function() { return navigation_submenu_init; }, - metadata: function() { return navigation_submenu_metadata; }, - name: function() { return navigation_submenu_name; }, - settings: function() { return navigation_submenu_settings; } + init: () => (navigation_submenu_init), + metadata: () => (navigation_submenu_metadata), + name: () => (navigation_submenu_name), + settings: () => (navigation_submenu_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/nextpage/index.js var nextpage_namespaceObject = {}; __webpack_require__.r(nextpage_namespaceObject); __webpack_require__.d(nextpage_namespaceObject, { - init: function() { return nextpage_init; }, - metadata: function() { return nextpage_metadata; }, - name: function() { return nextpage_name; }, - settings: function() { return nextpage_settings; } + init: () => (nextpage_init), + metadata: () => (nextpage_metadata), + name: () => (nextpage_name), + settings: () => (nextpage_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/pattern/index.js var pattern_namespaceObject = {}; __webpack_require__.r(pattern_namespaceObject); __webpack_require__.d(pattern_namespaceObject, { - init: function() { return pattern_init; }, - metadata: function() { return pattern_metadata; }, - name: function() { return pattern_name; }, - settings: function() { return pattern_settings; } + init: () => (pattern_init), + metadata: () => (pattern_metadata), + name: () => (pattern_name), + settings: () => (pattern_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/page-list/index.js var page_list_namespaceObject = {}; __webpack_require__.r(page_list_namespaceObject); __webpack_require__.d(page_list_namespaceObject, { - init: function() { return page_list_init; }, - metadata: function() { return page_list_metadata; }, - name: function() { return page_list_name; }, - settings: function() { return page_list_settings; } + init: () => (page_list_init), + metadata: () => (page_list_metadata), + name: () => (page_list_name), + settings: () => (page_list_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/page-list-item/index.js var page_list_item_namespaceObject = {}; __webpack_require__.r(page_list_item_namespaceObject); __webpack_require__.d(page_list_item_namespaceObject, { - init: function() { return page_list_item_init; }, - metadata: function() { return page_list_item_metadata; }, - name: function() { return page_list_item_name; }, - settings: function() { return page_list_item_settings; } + init: () => (page_list_item_init), + metadata: () => (page_list_item_metadata), + name: () => (page_list_item_name), + settings: () => (page_list_item_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/paragraph/index.js var build_module_paragraph_namespaceObject = {}; __webpack_require__.r(build_module_paragraph_namespaceObject); __webpack_require__.d(build_module_paragraph_namespaceObject, { - init: function() { return paragraph_init; }, - metadata: function() { return paragraph_metadata; }, - name: function() { return paragraph_name; }, - settings: function() { return paragraph_settings; } + init: () => (paragraph_init), + metadata: () => (paragraph_metadata), + name: () => (paragraph_name), + settings: () => (paragraph_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-author/index.js var build_module_post_author_namespaceObject = {}; __webpack_require__.r(build_module_post_author_namespaceObject); __webpack_require__.d(build_module_post_author_namespaceObject, { - init: function() { return post_author_init; }, - metadata: function() { return post_author_metadata; }, - name: function() { return post_author_name; }, - settings: function() { return post_author_settings; } + init: () => (post_author_init), + metadata: () => (post_author_metadata), + name: () => (post_author_name), + settings: () => (post_author_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-author-name/index.js var post_author_name_namespaceObject = {}; __webpack_require__.r(post_author_name_namespaceObject); __webpack_require__.d(post_author_name_namespaceObject, { - init: function() { return post_author_name_init; }, - metadata: function() { return post_author_name_metadata; }, - name: function() { return post_author_name_name; }, - settings: function() { return post_author_name_settings; } + init: () => (post_author_name_init), + metadata: () => (post_author_name_metadata), + name: () => (post_author_name_name), + settings: () => (post_author_name_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-author-biography/index.js var post_author_biography_namespaceObject = {}; __webpack_require__.r(post_author_biography_namespaceObject); __webpack_require__.d(post_author_biography_namespaceObject, { - init: function() { return post_author_biography_init; }, - metadata: function() { return post_author_biography_metadata; }, - name: function() { return post_author_biography_name; }, - settings: function() { return post_author_biography_settings; } + init: () => (post_author_biography_init), + metadata: () => (post_author_biography_metadata), + name: () => (post_author_biography_name), + settings: () => (post_author_biography_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-comment/index.js var post_comment_namespaceObject = {}; __webpack_require__.r(post_comment_namespaceObject); __webpack_require__.d(post_comment_namespaceObject, { - init: function() { return post_comment_init; }, - metadata: function() { return post_comment_metadata; }, - name: function() { return post_comment_name; }, - settings: function() { return post_comment_settings; } + init: () => (post_comment_init), + metadata: () => (post_comment_metadata), + name: () => (post_comment_name), + settings: () => (post_comment_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-comments-count/index.js var build_module_post_comments_count_namespaceObject = {}; __webpack_require__.r(build_module_post_comments_count_namespaceObject); __webpack_require__.d(build_module_post_comments_count_namespaceObject, { - init: function() { return post_comments_count_init; }, - metadata: function() { return post_comments_count_metadata; }, - name: function() { return post_comments_count_name; }, - settings: function() { return post_comments_count_settings; } + init: () => (post_comments_count_init), + metadata: () => (post_comments_count_metadata), + name: () => (post_comments_count_name), + settings: () => (post_comments_count_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-comments-form/index.js var build_module_post_comments_form_namespaceObject = {}; __webpack_require__.r(build_module_post_comments_form_namespaceObject); __webpack_require__.d(build_module_post_comments_form_namespaceObject, { - init: function() { return post_comments_form_init; }, - metadata: function() { return post_comments_form_metadata; }, - name: function() { return post_comments_form_name; }, - settings: function() { return post_comments_form_settings; } + init: () => (post_comments_form_init), + metadata: () => (post_comments_form_metadata), + name: () => (post_comments_form_name), + settings: () => (post_comments_form_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-comments-link/index.js var post_comments_link_namespaceObject = {}; __webpack_require__.r(post_comments_link_namespaceObject); __webpack_require__.d(post_comments_link_namespaceObject, { - init: function() { return post_comments_link_init; }, - metadata: function() { return post_comments_link_metadata; }, - name: function() { return post_comments_link_name; }, - settings: function() { return post_comments_link_settings; } + init: () => (post_comments_link_init), + metadata: () => (post_comments_link_metadata), + name: () => (post_comments_link_name), + settings: () => (post_comments_link_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-content/index.js var build_module_post_content_namespaceObject = {}; __webpack_require__.r(build_module_post_content_namespaceObject); __webpack_require__.d(build_module_post_content_namespaceObject, { - init: function() { return post_content_init; }, - metadata: function() { return post_content_metadata; }, - name: function() { return post_content_name; }, - settings: function() { return post_content_settings; } + init: () => (post_content_init), + metadata: () => (post_content_metadata), + name: () => (post_content_name), + settings: () => (post_content_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-date/index.js var build_module_post_date_namespaceObject = {}; __webpack_require__.r(build_module_post_date_namespaceObject); __webpack_require__.d(build_module_post_date_namespaceObject, { - init: function() { return post_date_init; }, - metadata: function() { return post_date_metadata; }, - name: function() { return post_date_name; }, - settings: function() { return post_date_settings; } + init: () => (post_date_init), + metadata: () => (post_date_metadata), + name: () => (post_date_name), + settings: () => (post_date_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-excerpt/index.js var build_module_post_excerpt_namespaceObject = {}; __webpack_require__.r(build_module_post_excerpt_namespaceObject); __webpack_require__.d(build_module_post_excerpt_namespaceObject, { - init: function() { return post_excerpt_init; }, - metadata: function() { return post_excerpt_metadata; }, - name: function() { return post_excerpt_name; }, - settings: function() { return post_excerpt_settings; } + init: () => (post_excerpt_init), + metadata: () => (post_excerpt_metadata), + name: () => (post_excerpt_name), + settings: () => (post_excerpt_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-featured-image/index.js var build_module_post_featured_image_namespaceObject = {}; __webpack_require__.r(build_module_post_featured_image_namespaceObject); __webpack_require__.d(build_module_post_featured_image_namespaceObject, { - init: function() { return post_featured_image_init; }, - metadata: function() { return post_featured_image_metadata; }, - name: function() { return post_featured_image_name; }, - settings: function() { return post_featured_image_settings; } + init: () => (post_featured_image_init), + metadata: () => (post_featured_image_metadata), + name: () => (post_featured_image_name), + settings: () => (post_featured_image_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-navigation-link/index.js var post_navigation_link_namespaceObject = {}; __webpack_require__.r(post_navigation_link_namespaceObject); __webpack_require__.d(post_navigation_link_namespaceObject, { - init: function() { return post_navigation_link_init; }, - metadata: function() { return post_navigation_link_metadata; }, - name: function() { return post_navigation_link_name; }, - settings: function() { return post_navigation_link_settings; } + init: () => (post_navigation_link_init), + metadata: () => (post_navigation_link_metadata), + name: () => (post_navigation_link_name), + settings: () => (post_navigation_link_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-template/index.js var post_template_namespaceObject = {}; __webpack_require__.r(post_template_namespaceObject); __webpack_require__.d(post_template_namespaceObject, { - init: function() { return post_template_init; }, - metadata: function() { return post_template_metadata; }, - name: function() { return post_template_name; }, - settings: function() { return post_template_settings; } + init: () => (post_template_init), + metadata: () => (post_template_metadata), + name: () => (post_template_name), + settings: () => (post_template_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-terms/index.js var build_module_post_terms_namespaceObject = {}; __webpack_require__.r(build_module_post_terms_namespaceObject); __webpack_require__.d(build_module_post_terms_namespaceObject, { - init: function() { return post_terms_init; }, - metadata: function() { return post_terms_metadata; }, - name: function() { return post_terms_name; }, - settings: function() { return post_terms_settings; } + init: () => (post_terms_init), + metadata: () => (post_terms_metadata), + name: () => (post_terms_name), + settings: () => (post_terms_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-time-to-read/index.js var post_time_to_read_namespaceObject = {}; __webpack_require__.r(post_time_to_read_namespaceObject); __webpack_require__.d(post_time_to_read_namespaceObject, { - init: function() { return post_time_to_read_init; }, - metadata: function() { return post_time_to_read_metadata; }, - name: function() { return post_time_to_read_name; }, - settings: function() { return post_time_to_read_settings; } + init: () => (post_time_to_read_init), + metadata: () => (post_time_to_read_metadata), + name: () => (post_time_to_read_name), + settings: () => (post_time_to_read_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-title/index.js var post_title_namespaceObject = {}; __webpack_require__.r(post_title_namespaceObject); __webpack_require__.d(post_title_namespaceObject, { - init: function() { return post_title_init; }, - metadata: function() { return post_title_metadata; }, - name: function() { return post_title_name; }, - settings: function() { return post_title_settings; } + init: () => (post_title_init), + metadata: () => (post_title_metadata), + name: () => (post_title_name), + settings: () => (post_title_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/preformatted/index.js var build_module_preformatted_namespaceObject = {}; __webpack_require__.r(build_module_preformatted_namespaceObject); __webpack_require__.d(build_module_preformatted_namespaceObject, { - init: function() { return preformatted_init; }, - metadata: function() { return preformatted_metadata; }, - name: function() { return preformatted_name; }, - settings: function() { return preformatted_settings; } + init: () => (preformatted_init), + metadata: () => (preformatted_metadata), + name: () => (preformatted_name), + settings: () => (preformatted_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/pullquote/index.js var build_module_pullquote_namespaceObject = {}; __webpack_require__.r(build_module_pullquote_namespaceObject); __webpack_require__.d(build_module_pullquote_namespaceObject, { - init: function() { return pullquote_init; }, - metadata: function() { return pullquote_metadata; }, - name: function() { return pullquote_name; }, - settings: function() { return pullquote_settings; } + init: () => (pullquote_init), + metadata: () => (pullquote_metadata), + name: () => (pullquote_name), + settings: () => (pullquote_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query/index.js var query_namespaceObject = {}; __webpack_require__.r(query_namespaceObject); __webpack_require__.d(query_namespaceObject, { - init: function() { return query_init; }, - metadata: function() { return query_metadata; }, - name: function() { return query_name; }, - settings: function() { return query_settings; } + init: () => (query_init), + metadata: () => (query_metadata), + name: () => (query_name), + settings: () => (query_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-no-results/index.js var query_no_results_namespaceObject = {}; __webpack_require__.r(query_no_results_namespaceObject); __webpack_require__.d(query_no_results_namespaceObject, { - init: function() { return query_no_results_init; }, - metadata: function() { return query_no_results_metadata; }, - name: function() { return query_no_results_name; }, - settings: function() { return query_no_results_settings; } + init: () => (query_no_results_init), + metadata: () => (query_no_results_metadata), + name: () => (query_no_results_name), + settings: () => (query_no_results_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination/index.js var build_module_query_pagination_namespaceObject = {}; __webpack_require__.r(build_module_query_pagination_namespaceObject); __webpack_require__.d(build_module_query_pagination_namespaceObject, { - init: function() { return query_pagination_init; }, - metadata: function() { return query_pagination_metadata; }, - name: function() { return query_pagination_name; }, - settings: function() { return query_pagination_settings; } + init: () => (query_pagination_init), + metadata: () => (query_pagination_metadata), + name: () => (query_pagination_name), + settings: () => (query_pagination_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination-next/index.js var build_module_query_pagination_next_namespaceObject = {}; __webpack_require__.r(build_module_query_pagination_next_namespaceObject); __webpack_require__.d(build_module_query_pagination_next_namespaceObject, { - init: function() { return query_pagination_next_init; }, - metadata: function() { return query_pagination_next_metadata; }, - name: function() { return query_pagination_next_name; }, - settings: function() { return query_pagination_next_settings; } + init: () => (query_pagination_next_init), + metadata: () => (query_pagination_next_metadata), + name: () => (query_pagination_next_name), + settings: () => (query_pagination_next_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination-numbers/index.js var build_module_query_pagination_numbers_namespaceObject = {}; __webpack_require__.r(build_module_query_pagination_numbers_namespaceObject); __webpack_require__.d(build_module_query_pagination_numbers_namespaceObject, { - init: function() { return query_pagination_numbers_init; }, - metadata: function() { return query_pagination_numbers_metadata; }, - name: function() { return query_pagination_numbers_name; }, - settings: function() { return query_pagination_numbers_settings; } + init: () => (query_pagination_numbers_init), + metadata: () => (query_pagination_numbers_metadata), + name: () => (query_pagination_numbers_name), + settings: () => (query_pagination_numbers_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination-previous/index.js var build_module_query_pagination_previous_namespaceObject = {}; __webpack_require__.r(build_module_query_pagination_previous_namespaceObject); __webpack_require__.d(build_module_query_pagination_previous_namespaceObject, { - init: function() { return query_pagination_previous_init; }, - metadata: function() { return query_pagination_previous_metadata; }, - name: function() { return query_pagination_previous_name; }, - settings: function() { return query_pagination_previous_settings; } + init: () => (query_pagination_previous_init), + metadata: () => (query_pagination_previous_metadata), + name: () => (query_pagination_previous_name), + settings: () => (query_pagination_previous_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-title/index.js var query_title_namespaceObject = {}; __webpack_require__.r(query_title_namespaceObject); __webpack_require__.d(query_title_namespaceObject, { - init: function() { return query_title_init; }, - metadata: function() { return query_title_metadata; }, - name: function() { return query_title_name; }, - settings: function() { return query_title_settings; } + init: () => (query_title_init), + metadata: () => (query_title_metadata), + name: () => (query_title_name), + settings: () => (query_title_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/quote/index.js var build_module_quote_namespaceObject = {}; __webpack_require__.r(build_module_quote_namespaceObject); __webpack_require__.d(build_module_quote_namespaceObject, { - init: function() { return quote_init; }, - metadata: function() { return quote_metadata; }, - name: function() { return quote_name; }, - settings: function() { return quote_settings; } + init: () => (quote_init), + metadata: () => (quote_metadata), + name: () => (quote_name), + settings: () => (quote_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/block/index.js var block_namespaceObject = {}; __webpack_require__.r(block_namespaceObject); __webpack_require__.d(block_namespaceObject, { - init: function() { return block_init; }, - metadata: function() { return block_metadata; }, - name: function() { return block_name; }, - settings: function() { return block_settings; } + init: () => (block_init), + metadata: () => (block_metadata), + name: () => (block_name), + settings: () => (block_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/read-more/index.js var read_more_namespaceObject = {}; __webpack_require__.r(read_more_namespaceObject); __webpack_require__.d(read_more_namespaceObject, { - init: function() { return read_more_init; }, - metadata: function() { return read_more_metadata; }, - name: function() { return read_more_name; }, - settings: function() { return read_more_settings; } + init: () => (read_more_init), + metadata: () => (read_more_metadata), + name: () => (read_more_name), + settings: () => (read_more_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/rss/index.js var build_module_rss_namespaceObject = {}; __webpack_require__.r(build_module_rss_namespaceObject); __webpack_require__.d(build_module_rss_namespaceObject, { - init: function() { return rss_init; }, - metadata: function() { return rss_metadata; }, - name: function() { return rss_name; }, - settings: function() { return rss_settings; } + init: () => (rss_init), + metadata: () => (rss_metadata), + name: () => (rss_name), + settings: () => (rss_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/search/index.js var build_module_search_namespaceObject = {}; __webpack_require__.r(build_module_search_namespaceObject); __webpack_require__.d(build_module_search_namespaceObject, { - init: function() { return search_init; }, - metadata: function() { return search_metadata; }, - name: function() { return search_name; }, - settings: function() { return search_settings; } + init: () => (search_init), + metadata: () => (search_metadata), + name: () => (search_name), + settings: () => (search_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/separator/index.js var build_module_separator_namespaceObject = {}; __webpack_require__.r(build_module_separator_namespaceObject); __webpack_require__.d(build_module_separator_namespaceObject, { - init: function() { return separator_init; }, - metadata: function() { return separator_metadata; }, - name: function() { return separator_name; }, - settings: function() { return separator_settings; } + init: () => (separator_init), + metadata: () => (separator_metadata), + name: () => (separator_name), + settings: () => (separator_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/shortcode/index.js var build_module_shortcode_namespaceObject = {}; __webpack_require__.r(build_module_shortcode_namespaceObject); __webpack_require__.d(build_module_shortcode_namespaceObject, { - init: function() { return shortcode_init; }, - metadata: function() { return shortcode_metadata; }, - name: function() { return shortcode_name; }, - settings: function() { return shortcode_settings; } + init: () => (shortcode_init), + metadata: () => (shortcode_metadata), + name: () => (shortcode_name), + settings: () => (shortcode_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/site-logo/index.js var build_module_site_logo_namespaceObject = {}; __webpack_require__.r(build_module_site_logo_namespaceObject); __webpack_require__.d(build_module_site_logo_namespaceObject, { - init: function() { return site_logo_init; }, - metadata: function() { return site_logo_metadata; }, - name: function() { return site_logo_name; }, - settings: function() { return site_logo_settings; } + init: () => (site_logo_init), + metadata: () => (site_logo_metadata), + name: () => (site_logo_name), + settings: () => (site_logo_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/site-tagline/index.js var site_tagline_namespaceObject = {}; __webpack_require__.r(site_tagline_namespaceObject); __webpack_require__.d(site_tagline_namespaceObject, { - init: function() { return site_tagline_init; }, - metadata: function() { return site_tagline_metadata; }, - name: function() { return site_tagline_name; }, - settings: function() { return site_tagline_settings; } + init: () => (site_tagline_init), + metadata: () => (site_tagline_metadata), + name: () => (site_tagline_name), + settings: () => (site_tagline_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/site-title/index.js var site_title_namespaceObject = {}; __webpack_require__.r(site_title_namespaceObject); __webpack_require__.d(site_title_namespaceObject, { - init: function() { return site_title_init; }, - metadata: function() { return site_title_metadata; }, - name: function() { return site_title_name; }, - settings: function() { return site_title_settings; } + init: () => (site_title_init), + metadata: () => (site_title_metadata), + name: () => (site_title_name), + settings: () => (site_title_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/social-link/index.js var social_link_namespaceObject = {}; __webpack_require__.r(social_link_namespaceObject); __webpack_require__.d(social_link_namespaceObject, { - init: function() { return social_link_init; }, - metadata: function() { return social_link_metadata; }, - name: function() { return social_link_name; }, - settings: function() { return social_link_settings; } + init: () => (social_link_init), + metadata: () => (social_link_metadata), + name: () => (social_link_name), + settings: () => (social_link_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/social-links/index.js var social_links_namespaceObject = {}; __webpack_require__.r(social_links_namespaceObject); __webpack_require__.d(social_links_namespaceObject, { - init: function() { return social_links_init; }, - metadata: function() { return social_links_metadata; }, - name: function() { return social_links_name; }, - settings: function() { return social_links_settings; } + init: () => (social_links_init), + metadata: () => (social_links_metadata), + name: () => (social_links_name), + settings: () => (social_links_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/spacer/index.js var spacer_namespaceObject = {}; __webpack_require__.r(spacer_namespaceObject); __webpack_require__.d(spacer_namespaceObject, { - init: function() { return spacer_init; }, - metadata: function() { return spacer_metadata; }, - name: function() { return spacer_name; }, - settings: function() { return spacer_settings; } + init: () => (spacer_init), + metadata: () => (spacer_metadata), + name: () => (spacer_name), + settings: () => (spacer_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/table/index.js var build_module_table_namespaceObject = {}; __webpack_require__.r(build_module_table_namespaceObject); __webpack_require__.d(build_module_table_namespaceObject, { - init: function() { return table_init; }, - metadata: function() { return table_metadata; }, - name: function() { return table_name; }, - settings: function() { return table_settings; } + init: () => (table_init), + metadata: () => (table_metadata), + name: () => (table_name), + settings: () => (table_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/table-of-contents/index.js -var table_of_contents_namespaceObject = {}; -__webpack_require__.r(table_of_contents_namespaceObject); -__webpack_require__.d(table_of_contents_namespaceObject, { - init: function() { return table_of_contents_init; }, - metadata: function() { return table_of_contents_metadata; }, - name: function() { return table_of_contents_name; }, - settings: function() { return table_of_contents_settings; } +var build_module_table_of_contents_namespaceObject = {}; +__webpack_require__.r(build_module_table_of_contents_namespaceObject); +__webpack_require__.d(build_module_table_of_contents_namespaceObject, { + init: () => (table_of_contents_init), + metadata: () => (table_of_contents_metadata), + name: () => (table_of_contents_name), + settings: () => (table_of_contents_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/tag-cloud/index.js var tag_cloud_namespaceObject = {}; __webpack_require__.r(tag_cloud_namespaceObject); __webpack_require__.d(tag_cloud_namespaceObject, { - init: function() { return tag_cloud_init; }, - metadata: function() { return tag_cloud_metadata; }, - name: function() { return tag_cloud_name; }, - settings: function() { return tag_cloud_settings; } + init: () => (tag_cloud_init), + metadata: () => (tag_cloud_metadata), + name: () => (tag_cloud_name), + settings: () => (tag_cloud_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/template-part/index.js var template_part_namespaceObject = {}; __webpack_require__.r(template_part_namespaceObject); __webpack_require__.d(template_part_namespaceObject, { - init: function() { return template_part_init; }, - metadata: function() { return template_part_metadata; }, - name: function() { return template_part_name; }, - settings: function() { return template_part_settings; } + init: () => (template_part_init), + metadata: () => (template_part_metadata), + name: () => (template_part_name), + settings: () => (template_part_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/term-description/index.js var build_module_term_description_namespaceObject = {}; __webpack_require__.r(build_module_term_description_namespaceObject); __webpack_require__.d(build_module_term_description_namespaceObject, { - init: function() { return term_description_init; }, - metadata: function() { return term_description_metadata; }, - name: function() { return term_description_name; }, - settings: function() { return term_description_settings; } + init: () => (term_description_init), + metadata: () => (term_description_metadata), + name: () => (term_description_name), + settings: () => (term_description_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/text-columns/index.js var text_columns_namespaceObject = {}; __webpack_require__.r(text_columns_namespaceObject); __webpack_require__.d(text_columns_namespaceObject, { - init: function() { return text_columns_init; }, - metadata: function() { return text_columns_metadata; }, - name: function() { return text_columns_name; }, - settings: function() { return text_columns_settings; } + init: () => (text_columns_init), + metadata: () => (text_columns_metadata), + name: () => (text_columns_name), + settings: () => (text_columns_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/verse/index.js var build_module_verse_namespaceObject = {}; __webpack_require__.r(build_module_verse_namespaceObject); __webpack_require__.d(build_module_verse_namespaceObject, { - init: function() { return verse_init; }, - metadata: function() { return verse_metadata; }, - name: function() { return verse_name; }, - settings: function() { return verse_settings; } + init: () => (verse_init), + metadata: () => (verse_metadata), + name: () => (verse_name), + settings: () => (verse_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/video/index.js var build_module_video_namespaceObject = {}; __webpack_require__.r(build_module_video_namespaceObject); __webpack_require__.d(build_module_video_namespaceObject, { - init: function() { return video_init; }, - metadata: function() { return video_metadata; }, - name: function() { return video_name; }, - settings: function() { return video_settings; } + init: () => (video_init), + metadata: () => (video_metadata), + name: () => (video_name), + settings: () => (video_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/footnotes/index.js var footnotes_namespaceObject = {}; __webpack_require__.r(footnotes_namespaceObject); __webpack_require__.d(footnotes_namespaceObject, { - init: function() { return footnotes_init; }, - metadata: function() { return footnotes_metadata; }, - name: function() { return footnotes_name; }, - settings: function() { return footnotes_settings; } + init: () => (footnotes_init), + metadata: () => (footnotes_metadata), + name: () => (footnotes_name), + settings: () => (footnotes_settings) }); ;// CONCATENATED MODULE: external ["wp","blocks"] -var external_wp_blocks_namespaceObject = window["wp"]["blocks"]; -;// CONCATENATED MODULE: external ["wp","element"] -var external_wp_element_namespaceObject = window["wp"]["element"]; +const external_wp_blocks_namespaceObject = window["wp"]["blocks"]; +;// CONCATENATED MODULE: external "React" +const external_React_namespaceObject = window["React"]; ;// CONCATENATED MODULE: external ["wp","primitives"] -var external_wp_primitives_namespaceObject = window["wp"]["primitives"]; +const external_wp_primitives_namespaceObject = window["wp"]["primitives"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/archive.js /** * WordPress dependencies */ -const archive = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const archive = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { - d: "M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5zM8 12.8h8v-1.5H8v1.5zm0 3h8v-1.5H8v1.5z" +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M11.934 7.406a1 1 0 0 0 .914.594H19a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h5.764a.5.5 0 0 1 .447.276l.723 1.63Zm1.064-1.216a.5.5 0 0 0 .462.31H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.764a2 2 0 0 1 1.789 1.106l.445 1.084ZM8.5 10.5h7V12h-7v-1.5Zm7 3.5h-7v1.5h7V14Z" })); -/* harmony default export */ var library_archive = (archive); +/* harmony default export */ const library_archive = (archive); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/utils/init-block.js /** @@ -1880,13 +1922,13 @@ function initBlock(block) { } ;// CONCATENATED MODULE: external ["wp","components"] -var external_wp_components_namespaceObject = window["wp"]["components"]; +const external_wp_components_namespaceObject = window["wp"]["components"]; ;// CONCATENATED MODULE: external ["wp","i18n"] -var external_wp_i18n_namespaceObject = window["wp"]["i18n"]; +const external_wp_i18n_namespaceObject = window["wp"]["i18n"]; ;// CONCATENATED MODULE: external ["wp","blockEditor"] -var external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"]; +const external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"]; ;// CONCATENATED MODULE: external ["wp","serverSideRender"] -var external_wp_serverSideRender_namespaceObject = window["wp"]["serverSideRender"]; +const external_wp_serverSideRender_namespaceObject = window["wp"]["serverSideRender"]; var external_wp_serverSideRender_default = /*#__PURE__*/__webpack_require__.n(external_wp_serverSideRender_namespaceObject); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/archives/edit.js @@ -1907,30 +1949,30 @@ function ArchivesEdit({ displayAsDropdown, type } = attributes; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Display as dropdown'), checked: displayAsDropdown, onChange: () => setAttributes({ displayAsDropdown: !displayAsDropdown }) - }), displayAsDropdown && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), displayAsDropdown && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Show label'), checked: showLabel, onChange: () => setAttributes({ showLabel: !showLabel }) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Show post counts'), checked: showPostCounts, onChange: () => setAttributes({ showPostCounts: !showPostCounts }) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Group by:'), options: [{ @@ -1950,9 +1992,9 @@ function ArchivesEdit({ onChange: value => setAttributes({ type: value }) - }))), (0,external_wp_element_namespaceObject.createElement)("div", { + }))), (0,external_React_namespaceObject.createElement)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)() - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Disabled, null, (0,external_wp_element_namespaceObject.createElement)((external_wp_serverSideRender_default()), { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Disabled, null, (0,external_React_namespaceObject.createElement)((external_wp_serverSideRender_default()), { block: "core/archives", skipBlockSupportAttributes: true, attributes: attributes @@ -2018,6 +2060,9 @@ const metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-archives-editor" @@ -2044,25 +2089,25 @@ const init = () => initBlock({ * WordPress dependencies */ -const commentAuthorAvatar = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const commentAuthorAvatar = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { fillRule: "evenodd", d: "M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z", clipRule: "evenodd" })); -/* harmony default export */ var comment_author_avatar = (commentAuthorAvatar); +/* harmony default export */ const comment_author_avatar = (commentAuthorAvatar); // EXTERNAL MODULE: ./node_modules/classnames/index.js -var classnames = __webpack_require__(4403); +var classnames = __webpack_require__(5755); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); ;// CONCATENATED MODULE: external ["wp","url"] -var external_wp_url_namespaceObject = window["wp"]["url"]; +const external_wp_url_namespaceObject = window["wp"]["url"]; ;// CONCATENATED MODULE: external ["wp","coreData"] -var external_wp_coreData_namespaceObject = window["wp"]["coreData"]; +const external_wp_coreData_namespaceObject = window["wp"]["coreData"]; ;// CONCATENATED MODULE: external ["wp","data"] -var external_wp_data_namespaceObject = window["wp"]["data"]; +const external_wp_data_namespaceObject = window["wp"]["data"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/avatar/hooks.js /** * WordPress dependencies @@ -2155,6 +2200,8 @@ function useUserAvatar({ }; } +;// CONCATENATED MODULE: external ["wp","element"] +const external_wp_element_namespaceObject = window["wp"]["element"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/avatar/user-control.js /** @@ -2191,7 +2238,7 @@ function UserControl({ value: author.id }; }); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ComboboxControl, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ComboboxControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('User'), help: (0,external_wp_i18n_namespaceObject.__)('Select the avatar user to display, if it is blank it will use the post/page author.'), @@ -2201,7 +2248,7 @@ function UserControl({ onFilterValueChange: inputValue => setFilteredAuthorsList(options.filter(option => option.label.toLowerCase().startsWith(inputValue.toLowerCase()))) }); } -/* harmony default export */ var user_control = (UserControl); +/* harmony default export */ const user_control = (UserControl); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/avatar/edit.js @@ -2228,9 +2275,9 @@ const AvatarInspectorControls = ({ avatar, attributes, selectUser -}) => (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { +}) => (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)('Image size'), @@ -2241,20 +2288,20 @@ const AvatarInspectorControls = ({ max: avatar.maxSize, initialPosition: attributes?.size, value: attributes?.size -}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { +}), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Link to user profile'), onChange: () => setAttributes({ isLink: !attributes.isLink }), checked: attributes.isLink -}), attributes.isLink && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { +}), attributes.isLink && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { label: (0,external_wp_i18n_namespaceObject.__)('Open in new tab'), onChange: value => setAttributes({ linkTarget: value ? '_blank' : '_self' }), checked: attributes.linkTarget === '_blank' -}), selectUser && (0,external_wp_element_namespaceObject.createElement)(user_control, { +}), selectUser && (0,external_React_namespaceObject.createElement)(user_control, { value: attributes?.userId, onChange: value => { setAttributes({ @@ -2273,9 +2320,9 @@ const ResizableAvatar = ({ const doubledSizedSrc = (0,external_wp_url_namespaceObject.addQueryArgs)((0,external_wp_url_namespaceObject.removeQueryArgs)(avatar?.src, ['s']), { s: attributes?.size * 2 }); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ResizableBox, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ResizableBox, { size: { width: attributes.size, height: attributes.size @@ -2295,7 +2342,7 @@ const ResizableAvatar = ({ }, minWidth: avatar.minSize, maxWidth: avatar.maxSize - }, (0,external_wp_element_namespaceObject.createElement)("img", { + }, (0,external_React_namespaceObject.createElement)("img", { src: doubledSizedSrc, alt: avatar.alt, className: classnames_default()('avatar', 'avatar-' + attributes.size, 'photo', 'wp-block-avatar__image', borderProps.className), @@ -2315,22 +2362,22 @@ const CommentEdit = ({ const avatar = useCommentAvatar({ commentId }); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(AvatarInspectorControls, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(AvatarInspectorControls, { avatar: avatar, setAttributes: setAttributes, attributes: attributes, selectUser: false - }), attributes.isLink ? (0,external_wp_element_namespaceObject.createElement)("a", { + }), attributes.isLink ? (0,external_React_namespaceObject.createElement)("a", { href: "#avatar-pseudo-link", className: "wp-block-avatar__link", onClick: event => event.preventDefault() - }, (0,external_wp_element_namespaceObject.createElement)(ResizableAvatar, { + }, (0,external_React_namespaceObject.createElement)(ResizableAvatar, { attributes: attributes, avatar: avatar, blockProps: blockProps, isSelected: isSelected, setAttributes: setAttributes - })) : (0,external_wp_element_namespaceObject.createElement)(ResizableAvatar, { + })) : (0,external_React_namespaceObject.createElement)(ResizableAvatar, { attributes: attributes, avatar: avatar, blockProps: blockProps, @@ -2354,37 +2401,37 @@ const UserEdit = ({ postType }); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(AvatarInspectorControls, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(AvatarInspectorControls, { selectUser: true, attributes: attributes, avatar: avatar, setAttributes: setAttributes - }), (0,external_wp_element_namespaceObject.createElement)("div", null, attributes.isLink ? (0,external_wp_element_namespaceObject.createElement)("a", { + }), attributes.isLink ? (0,external_React_namespaceObject.createElement)("a", { href: "#avatar-pseudo-link", className: "wp-block-avatar__link", onClick: event => event.preventDefault() - }, (0,external_wp_element_namespaceObject.createElement)(ResizableAvatar, { + }, (0,external_React_namespaceObject.createElement)(ResizableAvatar, { attributes: attributes, avatar: avatar, blockProps: blockProps, isSelected: isSelected, setAttributes: setAttributes - })) : (0,external_wp_element_namespaceObject.createElement)(ResizableAvatar, { + })) : (0,external_React_namespaceObject.createElement)(ResizableAvatar, { attributes: attributes, avatar: avatar, blockProps: blockProps, isSelected: isSelected, setAttributes: setAttributes - }))); + })); }; function Edit(props) { // Don't show the Comment Edit controls if we have a comment ID set, or if we're in the Site Editor (where it is `null`). if (props?.context?.commentId || props?.context?.commentId === null) { - return (0,external_wp_element_namespaceObject.createElement)(CommentEdit, { + return (0,external_React_namespaceObject.createElement)(CommentEdit, { ...props }); } - return (0,external_wp_element_namespaceObject.createElement)(UserEdit, { + return (0,external_React_namespaceObject.createElement)(UserEdit, { ...props }); } @@ -2431,7 +2478,11 @@ const avatar_metadata = { alignWide: false, spacing: { margin: true, - padding: true + padding: true, + __experimentalDefaultControls: { + margin: false, + padding: false + } }, __experimentalBorder: { __experimentalSkipSerialization: true, @@ -2447,6 +2498,9 @@ const avatar_metadata = { text: false, background: false, __experimentalDuotone: "img" + }, + interactivity: { + clientNavigation: true } }, selectors: { @@ -2476,13 +2530,13 @@ const avatar_init = () => initBlock({ * WordPress dependencies */ -const audio = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const audio = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z" })); -/* harmony default export */ var library_audio = (audio); +/* harmony default export */ const library_audio = (audio); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/audio/deprecated.js @@ -2490,7 +2544,7 @@ const audio = (0,external_wp_element_namespaceObject.createElement)(external_wp_ * WordPress dependencies */ -/* harmony default export */ var deprecated = ([{ +/* harmony default export */ const deprecated = ([{ attributes: { src: { type: 'string', @@ -2538,13 +2592,13 @@ const audio = (0,external_wp_element_namespaceObject.createElement)(external_wp_ preload, src } = attributes; - return (0,external_wp_element_namespaceObject.createElement)("figure", null, (0,external_wp_element_namespaceObject.createElement)("audio", { + return (0,external_React_namespaceObject.createElement)("figure", null, (0,external_React_namespaceObject.createElement)("audio", { controls: "controls", src: src, autoPlay: autoplay, loop: loop, preload: preload - }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })); @@ -2552,29 +2606,11 @@ const audio = (0,external_wp_element_namespaceObject.createElement)(external_wp_ }]); ;// CONCATENATED MODULE: external ["wp","blob"] -var external_wp_blob_namespaceObject = window["wp"]["blob"]; -;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/caption.js - -/** - * WordPress dependencies - */ - -const caption = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { - viewBox: "0 0 24 24", - xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { - fillRule: "evenodd", - clipRule: "evenodd", - d: "M6 5.5h12a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5ZM4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6Zm4 10h2v-1.5H8V16Zm5 0h-2v-1.5h2V16Zm1 0h2v-1.5h-2V16Z" -})); -/* harmony default export */ var library_caption = (caption); - +const external_wp_blob_namespaceObject = window["wp"]["blob"]; ;// CONCATENATED MODULE: external ["wp","notices"] -var external_wp_notices_namespaceObject = window["wp"]["notices"]; -;// CONCATENATED MODULE: external ["wp","compose"] -var external_wp_compose_namespaceObject = window["wp"]["compose"]; +const external_wp_notices_namespaceObject = window["wp"]["notices"]; // EXTERNAL MODULE: ./node_modules/classnames/dedupe.js -var dedupe = __webpack_require__(3827); +var dedupe = __webpack_require__(1668); var dedupe_default = /*#__PURE__*/__webpack_require__.n(dedupe); ;// CONCATENATED MODULE: ./node_modules/memize/dist/index.js /** @@ -2768,7 +2804,7 @@ const ASPECT_RATIOS = [ const WP_EMBED_TYPE = 'wp-embed'; ;// CONCATENATED MODULE: external ["wp","privateApis"] -var external_wp_privateApis_namespaceObject = window["wp"]["privateApis"]; +const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/lock-unlock.js /** * WordPress dependencies @@ -2811,8 +2847,8 @@ const util_metadata = { __experimentalRole: "content" }, caption: { - type: "string", - source: "html", + type: "rich-text", + source: "rich-text", selector: "figcaption", __experimentalRole: "content" }, @@ -2843,6 +2879,9 @@ const util_metadata = { align: true, spacing: { margin: true + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-embed-editor", @@ -2853,9 +2892,6 @@ const util_metadata = { const { name: DEFAULT_EMBED_BLOCK } = util_metadata; -const { - kebabCase -} = unlock(external_wp_blockEditor_namespaceObject.privateApis); /** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */ @@ -2895,7 +2931,7 @@ const getPhotoHtml = photo => { // 100% width for the preview so it fits nicely into the document, some "thumbnails" are // actually the full size photo. - const photoPreview = (0,external_wp_element_namespaceObject.createElement)("p", null, (0,external_wp_element_namespaceObject.createElement)("img", { + const photoPreview = (0,external_React_namespaceObject.createElement)("p", null, (0,external_React_namespaceObject.createElement)("img", { src: imageUrl, alt: photo.title, width: "100%" @@ -3054,7 +3090,7 @@ function getClassNames(html, existingClassNames, allowResponsive = true) { * @param {Function} onReplace Function to call with the created fallback block. */ function fallback(url, onReplace) { - const link = (0,external_wp_element_namespaceObject.createElement)("a", { + const link = (0,external_React_namespaceObject.createElement)("a", { href: url }, url); onReplace((0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph', { @@ -3087,6 +3123,9 @@ const getAttributesFromPreview = memize((preview, title, currentClassNames, isRe html, provider_name: providerName } = preview; + const { + kebabCase + } = unlock(external_wp_components_namespaceObject.privateApis); const providerNameSlug = kebabCase((providerName || title).toLowerCase()); if (isFromWordPress(html)) { type = WP_EMBED_TYPE; @@ -3126,7 +3165,25 @@ const getMergedAttributesWithPreview = (currentAttributes, preview, title, isRes }; }; -;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/audio/edit.js +;// CONCATENATED MODULE: external ["wp","compose"] +const external_wp_compose_namespaceObject = window["wp"]["compose"]; +;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/caption.js + +/** + * WordPress dependencies + */ + +const caption = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { + viewBox: "0 0 24 24", + xmlns: "http://www.w3.org/2000/svg" +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M6 5.5h12a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5ZM4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6Zm4 10h2v-1.5H8V16Zm5 0h-2v-1.5h2V16Zm1 0h2v-1.5h-2V16Z" +})); +/* harmony default export */ const library_caption = (caption); + +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/utils/caption.js /** * External dependencies @@ -3144,6 +3201,97 @@ const getMergedAttributesWithPreview = (currentAttributes, preview, title, isRes +/** + * Internal dependencies + */ + +const { + PrivateRichText: RichText +} = unlock(external_wp_blockEditor_namespaceObject.privateApis); +function Caption({ + key = 'caption', + attributes, + setAttributes, + isSelected, + insertBlocksAfter, + placeholder = (0,external_wp_i18n_namespaceObject.__)('Add caption'), + label = (0,external_wp_i18n_namespaceObject.__)('Caption text'), + showToolbarButton = true, + className, + disableEditing +}) { + const caption = attributes[key]; + const prevCaption = (0,external_wp_compose_namespaceObject.usePrevious)(caption); + const isCaptionEmpty = RichText.isEmpty(caption); + const isPrevCaptionEmpty = RichText.isEmpty(prevCaption); + const [showCaption, setShowCaption] = (0,external_wp_element_namespaceObject.useState)(!isCaptionEmpty); + + // We need to show the caption when changes come from + // history navigation(undo/redo). + (0,external_wp_element_namespaceObject.useEffect)(() => { + if (!isCaptionEmpty && isPrevCaptionEmpty) { + setShowCaption(true); + } + }, [isCaptionEmpty, isPrevCaptionEmpty]); + (0,external_wp_element_namespaceObject.useEffect)(() => { + if (!isSelected && isCaptionEmpty) { + setShowCaption(false); + } + }, [isSelected, isCaptionEmpty]); + + // Focus the caption when we click to add one. + const ref = (0,external_wp_element_namespaceObject.useCallback)(node => { + if (node && isCaptionEmpty) { + node.focus(); + } + }, [isCaptionEmpty]); + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, showToolbarButton && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + group: "block" + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + onClick: () => { + setShowCaption(!showCaption); + if (showCaption && caption) { + setAttributes({ + caption: undefined + }); + } + }, + icon: library_caption, + isPressed: showCaption, + label: showCaption ? (0,external_wp_i18n_namespaceObject.__)('Remove caption') : (0,external_wp_i18n_namespaceObject.__)('Add caption') + })), showCaption && (!RichText.isEmpty(caption) || isSelected) && (0,external_React_namespaceObject.createElement)(RichText, { + identifier: key, + tagName: "figcaption", + className: classnames_default()(className, (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption')), + ref: ref, + "aria-label": label, + placeholder: placeholder, + value: caption, + onChange: value => setAttributes({ + caption: value + }), + inlineToolbar: true, + __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())), + disableEditing: disableEditing + })); +} + +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/audio/edit.js + +/** + * External dependencies + */ + + +/** + * WordPress dependencies + */ + + + + + + @@ -3151,37 +3299,32 @@ const getMergedAttributesWithPreview = (currentAttributes, preview, title, isRes * Internal dependencies */ + const ALLOWED_MEDIA_TYPES = ['audio']; function AudioEdit({ attributes, className, setAttributes, onReplace, - isSelected, + isSelected: isSingleSelected, insertBlocksAfter }) { const { id, autoplay, - caption, loop, preload, src } = attributes; - const prevCaption = (0,external_wp_compose_namespaceObject.usePrevious)(caption); - const [showCaption, setShowCaption] = (0,external_wp_element_namespaceObject.useState)(!!caption); const isTemporaryAudio = !id && (0,external_wp_blob_namespaceObject.isBlobURL)(src); - const mediaUpload = (0,external_wp_data_namespaceObject.useSelect)(select => { - const { - getSettings - } = select(external_wp_blockEditor_namespaceObject.store); - return getSettings().mediaUpload; - }, []); + const { + getSettings + } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store); (0,external_wp_element_namespaceObject.useEffect)(() => { if (!id && (0,external_wp_blob_namespaceObject.isBlobURL)(src)) { const file = (0,external_wp_blob_namespaceObject.getBlobByURL)(src); if (file) { - mediaUpload({ + getSettings().mediaUpload({ filesList: [file], onFileChange: ([media]) => onSelectAudio(media), onError: e => onUploadError(e), @@ -3190,26 +3333,6 @@ function AudioEdit({ } } }, []); - - // We need to show the caption when changes come from - // history navigation(undo/redo). - (0,external_wp_element_namespaceObject.useEffect)(() => { - if (caption && !prevCaption) { - setShowCaption(true); - } - }, [caption, prevCaption]); - - // Focus the caption when we click to add one. - const captionRef = (0,external_wp_element_namespaceObject.useCallback)(node => { - if (node && !caption) { - node.focus(); - } - }, [caption]); - (0,external_wp_element_namespaceObject.useEffect)(() => { - if (!isSelected && !caption) { - setShowCaption(false); - } - }, [isSelected, caption]); function toggleAttribute(attribute) { return newValue => { setAttributes({ @@ -3274,10 +3397,10 @@ function AudioEdit({ className: classes }); if (!src) { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, { - icon: (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, { + icon: (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: library_audio }), onSelect: onSelectAudio, @@ -3288,23 +3411,9 @@ function AudioEdit({ onError: onUploadError })); } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { - group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { - onClick: () => { - setShowCaption(!showCaption); - if (showCaption && caption) { - setAttributes({ - caption: undefined - }); - } - }, - icon: library_caption, - isPressed: showCaption, - label: showCaption ? (0,external_wp_i18n_namespaceObject.__)('Remove caption') : (0,external_wp_i18n_namespaceObject.__)('Add caption') - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, isSingleSelected && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, { mediaId: id, mediaURL: src, allowedTypes: ALLOWED_MEDIA_TYPES, @@ -3312,20 +3421,20 @@ function AudioEdit({ onSelect: onSelectAudio, onSelectURL: onSelectURL, onError: onUploadError - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Autoplay'), onChange: toggleAttribute('autoplay'), checked: autoplay, help: getAutoplayHelp - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Loop'), onChange: toggleAttribute('loop'), checked: loop - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject._x)('Preload', 'noun; Audio block parameter'), value: preload || '' @@ -3347,29 +3456,23 @@ function AudioEdit({ value: 'none', label: (0,external_wp_i18n_namespaceObject._x)('None', 'Preload value') }] - }))), (0,external_wp_element_namespaceObject.createElement)("figure", { + }))), (0,external_React_namespaceObject.createElement)("figure", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Disabled, { - isDisabled: !isSelected - }, (0,external_wp_element_namespaceObject.createElement)("audio", { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Disabled, { + isDisabled: !isSingleSelected + }, (0,external_React_namespaceObject.createElement)("audio", { controls: "controls", src: src - })), isTemporaryAudio && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null), showCaption && (!external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) || isSelected) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { - identifier: "caption", - tagName: "figcaption", - className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'), - ref: captionRef, - "aria-label": (0,external_wp_i18n_namespaceObject.__)('Audio caption text'), - placeholder: (0,external_wp_i18n_namespaceObject.__)('Add caption'), - value: caption, - onChange: value => setAttributes({ - caption: value - }), - inlineToolbar: true, - __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())) + })), isTemporaryAudio && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null), (0,external_React_namespaceObject.createElement)(Caption, { + attributes: attributes, + setAttributes: setAttributes, + isSelected: isSingleSelected, + insertBlocksAfter: insertBlocksAfter, + label: (0,external_wp_i18n_namespaceObject.__)('Audio caption text'), + showToolbarButton: isSingleSelected }))); } -/* harmony default export */ var edit = (AudioEdit); +/* harmony default export */ const edit = (AudioEdit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/audio/save.js @@ -3387,15 +3490,15 @@ function save({ preload, src } = attributes; - return src && (0,external_wp_element_namespaceObject.createElement)("figure", { + return src && (0,external_React_namespaceObject.createElement)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save() - }, (0,external_wp_element_namespaceObject.createElement)("audio", { + }, (0,external_React_namespaceObject.createElement)("audio", { controls: "controls", src: src, autoPlay: autoplay, loop: loop, preload: preload - }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption, className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption') @@ -3476,7 +3579,7 @@ const transforms = { } }] }; -/* harmony default export */ var audio_transforms = (transforms); +/* harmony default export */ const audio_transforms = (transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/audio/index.js /** @@ -3508,8 +3611,8 @@ const audio_metadata = { __experimentalRole: "content" }, caption: { - type: "string", - source: "html", + type: "rich-text", + source: "rich-text", selector: "figcaption", __experimentalRole: "content" }, @@ -3546,6 +3649,9 @@ const audio_metadata = { margin: false, padding: false } + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-audio-editor", @@ -3582,13 +3688,13 @@ const audio_init = () => initBlock({ * WordPress dependencies */ -const button_button = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const button_button = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M8 12.5h8V11H8v1.5Z M19 6.5H5a2 2 0 0 0-2 2V15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2ZM5 8h14a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8.5A.5.5 0 0 1 5 8Z" })); -/* harmony default export */ var library_button = (button_button); +/* harmony default export */ const library_button = (button_button); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/utils/migrate-font-family.js /** @@ -3864,11 +3970,11 @@ const v11 = { [`has-custom-width wp-block-button__width-${width}`]: width, [`has-custom-font-size`]: fontSize || style?.typography?.fontSize }); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: wrapperClasses }) - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "a", className: buttonClasses, href: url, @@ -3992,11 +4098,11 @@ const v10 = { [`has-custom-width wp-block-button__width-${width}`]: width, [`has-custom-font-size`]: fontSize || style?.typography?.fontSize }); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: wrapperClasses }) - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "a", className: buttonClasses, href: url, @@ -4100,11 +4206,11 @@ const deprecated_deprecated = [v11, v10, { [`has-custom-width wp-block-button__width-${width}`]: width, [`has-custom-font-size`]: fontSize || style?.typography?.fontSize }); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: wrapperClasses }) - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "a", className: buttonClasses, href: url, @@ -4192,11 +4298,11 @@ const deprecated_deprecated = [v11, v10, { const wrapperClasses = classnames_default()(className, { [`has-custom-width wp-block-button__width-${width}`]: width }); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: wrapperClasses }) - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "a", className: buttonClasses, href: url, @@ -4284,11 +4390,11 @@ const deprecated_deprecated = [v11, v10, { const wrapperClasses = classnames_default()(className, { [`has-custom-width wp-block-button__width-${width}`]: width }); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: wrapperClasses }) - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "a", className: buttonClasses, href: url, @@ -4358,7 +4464,7 @@ const deprecated_deprecated = [v11, v10, { const buttonStyle = { borderRadius: borderRadius ? borderRadius + 'px' : undefined }; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "a", className: buttonClasses, href: url, @@ -4455,7 +4561,7 @@ const deprecated_deprecated = [v11, v10, { // if it had already been assigned, for the sake of backward-compatibility. // A title will no longer be assigned for new or updated button block links. - return (0,external_wp_element_namespaceObject.createElement)("div", null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + return (0,external_React_namespaceObject.createElement)("div", null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "a", className: buttonClasses, href: url, @@ -4541,7 +4647,7 @@ const deprecated_deprecated = [v11, v10, { backgroundColor: backgroundClass ? undefined : customBackgroundColor, color: textClass ? undefined : customTextColor }; - return (0,external_wp_element_namespaceObject.createElement)("div", null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + return (0,external_React_namespaceObject.createElement)("div", null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "a", className: buttonClasses, href: url, @@ -4597,7 +4703,7 @@ const deprecated_deprecated = [v11, v10, { backgroundColor: backgroundClass ? undefined : customBackgroundColor, color: textClass ? undefined : customTextColor }; - return (0,external_wp_element_namespaceObject.createElement)("div", null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + return (0,external_React_namespaceObject.createElement)("div", null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "a", className: buttonClasses, href: url, @@ -4636,9 +4742,9 @@ const deprecated_deprecated = [v11, v10, { color: textColor }; const linkClass = 'wp-block-button__link'; - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: `align${align}` - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "a", className: linkClass, href: url, @@ -4673,12 +4779,12 @@ const deprecated_deprecated = [v11, v10, { color, textColor } = attributes; - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: `align${align}`, style: { backgroundColor: color } - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "a", href: url, title: title, @@ -4690,23 +4796,90 @@ const deprecated_deprecated = [v11, v10, { }, migrate: oldColorsMigration }]; -/* harmony default export */ var button_deprecated = (deprecated_deprecated); +/* harmony default export */ const button_deprecated = (deprecated_deprecated); + +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/button/constants.js +const NEW_TAB_REL = 'noreferrer noopener'; +const NEW_TAB_TARGET = '_blank'; +const NOFOLLOW_REL = 'nofollow'; + +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/button/get-updated-link-attributes.js +/** + * Internal dependencies + */ + + +/** + * WordPress dependencies + */ + + +/** + * Updates the link attributes. + * + * @param {Object} attributes The current block attributes. + * @param {string} attributes.rel The current link rel attribute. + * @param {string} attributes.url The current link url. + * @param {boolean} attributes.opensInNewTab Whether the link should open in a new window. + * @param {boolean} attributes.nofollow Whether the link should be marked as nofollow. + */ +function getUpdatedLinkAttributes({ + rel = '', + url = '', + opensInNewTab, + nofollow +}) { + let newLinkTarget; + // Since `rel` is editable attribute, we need to check for existing values and proceed accordingly. + let updatedRel = rel; + if (opensInNewTab) { + newLinkTarget = NEW_TAB_TARGET; + updatedRel = updatedRel?.includes(NEW_TAB_REL) ? updatedRel : updatedRel + ` ${NEW_TAB_REL}`; + } else { + const relRegex = new RegExp(`\\b${NEW_TAB_REL}\\s*`, 'g'); + updatedRel = updatedRel?.replace(relRegex, '').trim(); + } + if (nofollow) { + updatedRel = updatedRel?.includes(NOFOLLOW_REL) ? updatedRel : updatedRel + ` ${NOFOLLOW_REL}`; + } else { + const relRegex = new RegExp(`\\b${NOFOLLOW_REL}\\s*`, 'g'); + updatedRel = updatedRel?.replace(relRegex, '').trim(); + } + return { + url: (0,external_wp_url_namespaceObject.prependHTTP)(url), + linkTarget: newLinkTarget, + rel: updatedRel || undefined + }; +} + +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/utils/remove-anchor-tag.js +/** + * Removes anchor tags from a string. + * + * @param {string} value The value to remove anchor tags from. + * + * @return {string} The value with anchor tags removed. + */ +function removeAnchorTag(value) { + // To do: Refactor this to use rich text's removeFormat instead. + return value.toString().replace(/<\/?a[^>]*>/g, ''); +} ;// CONCATENATED MODULE: external ["wp","keycodes"] -var external_wp_keycodes_namespaceObject = window["wp"]["keycodes"]; +const external_wp_keycodes_namespaceObject = window["wp"]["keycodes"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/link.js /** * WordPress dependencies */ -const link_link = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const link_link = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z" })); -/* harmony default export */ var library_link = (link_link); +/* harmony default export */ const library_link = (link_link); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/link-off.js @@ -4714,13 +4887,13 @@ const link_link = (0,external_wp_element_namespaceObject.createElement)(external * WordPress dependencies */ -const linkOff = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const linkOff = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z" })); -/* harmony default export */ var link_off = (linkOff); +/* harmony default export */ const link_off = (linkOff); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/button/edit.js @@ -4730,6 +4903,14 @@ const linkOff = (0,external_wp_element_namespaceObject.createElement)(external_w /** + * Internal dependencies + */ + + + + + +/** * WordPress dependencies */ @@ -4741,7 +4922,58 @@ const linkOff = (0,external_wp_element_namespaceObject.createElement)(external_w -const NEW_TAB_REL = 'noreferrer noopener'; +const LINK_SETTINGS = [...external_wp_blockEditor_namespaceObject.__experimentalLinkControl.DEFAULT_LINK_SETTINGS, { + id: 'nofollow', + title: (0,external_wp_i18n_namespaceObject.__)('Mark as nofollow') +}]; +function useEnter(props) { + const { + replaceBlocks, + selectionChange + } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); + const { + getBlock, + getBlockRootClientId, + getBlockIndex + } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store); + const propsRef = (0,external_wp_element_namespaceObject.useRef)(props); + propsRef.current = props; + return (0,external_wp_compose_namespaceObject.useRefEffect)(element => { + function onKeyDown(event) { + if (event.defaultPrevented || event.keyCode !== external_wp_keycodes_namespaceObject.ENTER) { + return; + } + const { + content, + clientId + } = propsRef.current; + if (content.length) { + return; + } + event.preventDefault(); + const topParentListBlock = getBlock(getBlockRootClientId(clientId)); + const blockIndex = getBlockIndex(clientId); + const head = (0,external_wp_blocks_namespaceObject.cloneBlock)({ + ...topParentListBlock, + innerBlocks: topParentListBlock.innerBlocks.slice(0, blockIndex) + }); + const middle = (0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()); + const after = topParentListBlock.innerBlocks.slice(blockIndex + 1); + const tail = after.length ? [(0,external_wp_blocks_namespaceObject.cloneBlock)({ + ...topParentListBlock, + innerBlocks: after + })] : []; + replaceBlocks(topParentListBlock.clientId, [head, middle, ...tail], 1); + // We manually change the selection here because we are replacing + // a different block than the selected one. + selectionChange(middle.clientId); + } + element.addEventListener('keydown', onKeyDown); + return () => { + element.removeEventListener('keydown', onKeyDown); + }; + }, []); +} function WidthPanel({ selectedWidth, setAttributes @@ -4755,12 +4987,12 @@ function WidthPanel({ width }); } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Width settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ButtonGroup, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ButtonGroup, { "aria-label": (0,external_wp_i18n_namespaceObject.__)('Button width') }, [25, 50, 75, 100].map(widthValue => { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { key: widthValue, size: "small", variant: widthValue === selectedWidth ? 'primary' : undefined, @@ -4775,7 +5007,8 @@ function ButtonEdit(props) { className, isSelected, onReplace, - mergeBlocks + mergeBlocks, + clientId } = props; const { tagName, @@ -4786,28 +5019,10 @@ function ButtonEdit(props) { style, text, url, - width + width, + metadata } = attributes; const TagName = tagName || 'a'; - function onToggleOpenInNewTab(value) { - const newLinkTarget = value ? '_blank' : undefined; - let updatedRel = rel; - if (newLinkTarget && !rel) { - updatedRel = NEW_TAB_REL; - } else if (!newLinkTarget && rel === NEW_TAB_REL) { - updatedRel = undefined; - } - setAttributes({ - linkTarget: newLinkTarget, - rel: updatedRel - }); - } - function setButtonText(newText) { - // Remove anchor tags from button text content. - setAttributes({ - text: newText.replace(/<\/?a[^>]*>/g, '') - }); - } function onKeyDown(event) { if (external_wp_keycodes_namespaceObject.isKeyboardEvent.primary(event, 'k')) { startEditing(event); @@ -4823,15 +5038,18 @@ function ButtonEdit(props) { const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes); const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseColorProps)(attributes); const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes); + const shadowProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetShadowClassesAndStyles)(attributes); const ref = (0,external_wp_element_namespaceObject.useRef)(); const richTextRef = (0,external_wp_element_namespaceObject.useRef)(); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([setPopoverAnchor, ref]), onKeyDown }); + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)(); const [isEditingURL, setIsEditingURL] = (0,external_wp_element_namespaceObject.useState)(false); const isURLSet = !!url; - const opensInNewTab = linkTarget === '_blank'; + const opensInNewTab = linkTarget === NEW_TAB_TARGET; + const nofollow = !!rel?.includes(NOFOLLOW_REL); const isLinkTag = 'a' === TagName; function startEditing(event) { event.preventDefault(); @@ -4855,20 +5073,39 @@ function ButtonEdit(props) { // This is a temporary fix. See https://github.com/WordPress/gutenberg/issues/51256. const linkValue = (0,external_wp_element_namespaceObject.useMemo)(() => ({ url, - opensInNewTab - }), [url, opensInNewTab]); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("div", { + opensInNewTab, + nofollow + }), [url, opensInNewTab, nofollow]); + const useEnterRef = useEnter({ + content: text, + clientId + }); + const mergedRef = (0,external_wp_compose_namespaceObject.useMergeRefs)([useEnterRef, richTextRef]); + const { + lockUrlControls = false + } = (0,external_wp_data_namespaceObject.useSelect)(select => { + if (!isSelected) { + return {}; + } + const blockBindingsSource = unlock(select(external_wp_blocks_namespaceObject.store)).getBlockBindingsSource(metadata?.bindings?.url?.source); + return { + lockUrlControls: !!metadata?.bindings?.url && (!blockBindingsSource || blockBindingsSource?.lockAttributesEditing) + }; + }, [isSelected]); + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("div", { ...blockProps, className: classnames_default()(blockProps.className, { [`has-custom-width wp-block-button__width-${width}`]: width, [`has-custom-font-size`]: blockProps.style.fontSize }) - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { - ref: richTextRef, + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + ref: mergedRef, "aria-label": (0,external_wp_i18n_namespaceObject.__)('Button text'), placeholder: placeholder || (0,external_wp_i18n_namespaceObject.__)('Add text…'), value: text, - onChange: value => setButtonText(value), + onChange: value => setAttributes({ + text: removeAnchorTag(value) + }), withoutInteractiveFormatting: true, className: classnames_default()(className, 'wp-block-button__link', colorProps.className, borderProps.className, { [`has-text-align-${textAlign}`]: textAlign, @@ -4879,7 +5116,8 @@ function ButtonEdit(props) { style: { ...borderProps.style, ...colorProps.style, - ...spacingProps.style + ...spacingProps.style, + ...shadowProps.style }, onSplit: value => (0,external_wp_blocks_namespaceObject.createBlock)('core/button', { ...attributes, @@ -4888,29 +5126,29 @@ function ButtonEdit(props) { onReplace: onReplace, onMerge: mergeBlocks, identifier: "text" - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { + }, blockEditingMode === 'default' && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: nextAlign => { setAttributes({ textAlign: nextAlign }); } - }), !isURLSet && isLinkTag && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + }), !isURLSet && isLinkTag && !lockUrlControls && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { name: "link", icon: library_link, title: (0,external_wp_i18n_namespaceObject.__)('Link'), shortcut: external_wp_keycodes_namespaceObject.displayShortcut.primary('k'), onClick: startEditing - }), isURLSet && isLinkTag && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + }), isURLSet && isLinkTag && !lockUrlControls && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { name: "link", icon: link_off, title: (0,external_wp_i18n_namespaceObject.__)('Unlink'), shortcut: external_wp_keycodes_namespaceObject.displayShortcut.primaryShift('k'), onClick: unlink, isActive: true - })), isLinkTag && isSelected && (isEditingURL || isURLSet) && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Popover, { + })), isLinkTag && isSelected && (isEditingURL || isURLSet) && !lockUrlControls && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Popover, { placement: "bottom", onClose: () => { setIsEditingURL(false); @@ -4920,30 +5158,30 @@ function ButtonEdit(props) { focusOnMount: isEditingURL ? 'firstElement' : false, __unstableSlotName: '__unstable-block-tools-after', shift: true - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalLinkControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalLinkControl, { value: linkValue, onChange: ({ - url: newURL = '', - opensInNewTab: newOpensInNewTab - }) => { - setAttributes({ - url: (0,external_wp_url_namespaceObject.prependHTTP)(newURL) - }); - if (opensInNewTab !== newOpensInNewTab) { - onToggleOpenInNewTab(newOpensInNewTab); - } - }, + url: newURL, + opensInNewTab: newOpensInNewTab, + nofollow: newNofollow + }) => setAttributes(getUpdatedLinkAttributes({ + rel, + url: newURL, + opensInNewTab: newOpensInNewTab, + nofollow: newNofollow + })), onRemove: () => { unlink(); richTextRef.current?.focus(); }, - forceIsEditingLink: isEditingURL - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(WidthPanel, { + forceIsEditingLink: isEditingURL, + settings: LINK_SETTINGS + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(WidthPanel, { selectedWidth: width, setAttributes: setAttributes - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced" - }, isLinkTag && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + }, isLinkTag && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Link rel'), value: rel || '', @@ -4952,7 +5190,7 @@ function ButtonEdit(props) { }) }))); } -/* harmony default export */ var button_edit = (ButtonEdit); +/* harmony default export */ const button_edit = (ButtonEdit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/button/save.js @@ -4982,7 +5220,7 @@ function save_save({ url, width } = attributes; - if (!text) { + if (external_wp_blockEditor_namespaceObject.RichText.isEmpty(text)) { return null; } const TagName = tagName || 'a'; @@ -4991,6 +5229,7 @@ function save_save({ const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes); const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes); const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes); + const shadowProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetShadowClassesAndStyles)(attributes); const buttonClasses = classnames_default()('wp-block-button__link', colorProps.className, borderProps.className, { [`has-text-align-${textAlign}`]: textAlign, // For backwards compatibility add style that isn't provided via @@ -5000,7 +5239,8 @@ function save_save({ const buttonStyle = { ...borderProps.style, ...colorProps.style, - ...spacingProps.style + ...spacingProps.style, + ...shadowProps.style }; // The use of a `title` attribute here is soft-deprecated, but still applied @@ -5011,11 +5251,11 @@ function save_save({ [`has-custom-width wp-block-button__width-${width}`]: width, [`has-custom-font-size`]: fontSize || style?.typography?.fontSize }); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: wrapperClasses }) - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: TagName, type: isButtonTag ? buttonType : null, className: buttonClasses, @@ -5079,8 +5319,8 @@ const button_metadata = { __experimentalRole: "content" }, text: { - type: "string", - source: "html", + type: "rich-text", + source: "rich-text", selector: "a,button", __experimentalRole: "content" }, @@ -5140,7 +5380,9 @@ const button_metadata = { } }, reusable: false, - shadow: true, + shadow: { + __experimentalSkipSerialization: true + }, spacing: { __experimentalSkipSerialization: true, padding: ["horizontal", "vertical"], @@ -5161,7 +5403,10 @@ const button_metadata = { width: true } }, - __experimentalSelector: ".wp-block-button .wp-block-button__link" + __experimentalSelector: ".wp-block-button .wp-block-button__link", + interactivity: { + clientNavigation: true + } }, styles: [{ name: "fill", @@ -5209,13 +5454,13 @@ const button_init = () => initBlock({ * WordPress dependencies */ -const buttons = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const buttons = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M14.5 17.5H9.5V16H14.5V17.5Z M14.5 8H9.5V6.5H14.5V8Z M7 3.5H17C18.1046 3.5 19 4.39543 19 5.5V9C19 10.1046 18.1046 11 17 11H7C5.89543 11 5 10.1046 5 9V5.5C5 4.39543 5.89543 3.5 7 3.5ZM17 5H7C6.72386 5 6.5 5.22386 6.5 5.5V9C6.5 9.27614 6.72386 9.5 7 9.5H17C17.2761 9.5 17.5 9.27614 17.5 9V5.5C17.5 5.22386 17.2761 5 17 5Z M7 13H17C18.1046 13 19 13.8954 19 15V18.5C19 19.6046 18.1046 20.5 17 20.5H7C5.89543 20.5 5 19.6046 5 18.5V15C5 13.8954 5.89543 13 7 13ZM17 14.5H7C6.72386 14.5 6.5 14.7239 6.5 15V18.5C6.5 18.7761 6.72386 19 7 19H17C17.2761 19 17.5 18.7761 17.5 18.5V15C17.5 14.7239 17.2761 14.5 17 14.5Z" })); -/* harmony default export */ var library_buttons = (buttons); +/* harmony default export */ const library_buttons = (buttons); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/buttons/deprecated.js @@ -5288,14 +5533,14 @@ const buttons_deprecated_deprecated = [{ orientation } }) { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classnames_default()({ [`is-content-justification-${contentJustification}`]: contentJustification, 'is-vertical': orientation === 'vertical' }) }) - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); } }, { supports: { @@ -5303,7 +5548,7 @@ const buttons_deprecated_deprecated = [{ anchor: true }, save() { - return (0,external_wp_element_namespaceObject.createElement)("div", null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); + return (0,external_React_namespaceObject.createElement)("div", null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); }, isEligible({ align @@ -5324,16 +5569,73 @@ const buttons_deprecated_deprecated = [{ }); } }]; -/* harmony default export */ var buttons_deprecated = (buttons_deprecated_deprecated); +/* harmony default export */ const buttons_deprecated = (buttons_deprecated_deprecated); ;// CONCATENATED MODULE: external ["wp","richText"] -var external_wp_richText_namespaceObject = window["wp"]["richText"]; +const external_wp_richText_namespaceObject = window["wp"]["richText"]; +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/utils/get-transformed-metadata.js +/** + * WordPress dependencies + */ + + +/** + * Transform the metadata attribute with only the values and bindings specified by each transform. + * Returns `undefined` if the input metadata is falsy. + * + * @param {Object} metadata Original metadata attribute from the block that is being transformed. + * @param {Object} newBlockName Name of the final block after the transformation. + * @param {Function} bindingsCallback Optional callback to transform the `bindings` property object. + * @return {Object|undefined} New metadata object only with the relevant properties. + */ +function getTransformedMetadata(metadata, newBlockName, bindingsCallback) { + if (!metadata) { + return; + } + const { + supports + } = (0,external_wp_blocks_namespaceObject.getBlockType)(newBlockName); + // Fixed until an opt-in mechanism is implemented. + const BLOCK_BINDINGS_SUPPORTED_BLOCKS = ['core/paragraph', 'core/heading', 'core/image', 'core/button']; + // The metadata properties that should be preserved after the transform. + const transformSupportedProps = []; + // If it support bindings, and there is a transform bindings callback, add the `id` and `bindings` properties. + if (BLOCK_BINDINGS_SUPPORTED_BLOCKS.includes(newBlockName) && bindingsCallback) { + transformSupportedProps.push('id', 'bindings'); + } + // If it support block naming (true by default), add the `name` property. + if (supports.renaming !== false) { + transformSupportedProps.push('name'); + } + + // Return early if no supported properties. + if (!transformSupportedProps.length) { + return; + } + const newMetadata = Object.entries(metadata).reduce((obj, [prop, value]) => { + // If prop is not supported, don't add it to the new metadata object. + if (!transformSupportedProps.includes(prop)) { + return obj; + } + obj[prop] = prop === 'bindings' ? bindingsCallback(value) : value; + return obj; + }, {}); + + // Return undefined if object is empty. + return Object.keys(newMetadata).length ? newMetadata : undefined; +} + ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/buttons/transforms.js /** * WordPress dependencies */ + +/** + * Internal dependencies + */ + const transforms_transforms = { from: [{ type: 'block', @@ -5355,7 +5657,11 @@ const transforms_transforms = { (0,external_wp_blocks_namespaceObject.createBlock)('core/buttons', {}, // Loop the selected buttons. buttons.map(attributes => { - const element = (0,external_wp_richText_namespaceObject.__unstableCreateElement)(document, attributes.content); + const { + content, + metadata + } = attributes; + const element = (0,external_wp_richText_namespaceObject.__unstableCreateElement)(document, content); // Remove any HTML tags. const text = element.innerText || ''; // Get first url. @@ -5364,7 +5670,12 @@ const transforms_transforms = { // Create singular button in the buttons block. return (0,external_wp_blocks_namespaceObject.createBlock)('core/button', { text, - url + url, + metadata: getTransformedMetadata(metadata, 'core/button', ({ + content: contentBinding + }) => ({ + text: contentBinding + })) }); })), isMatch: paragraphs => { @@ -5377,7 +5688,7 @@ const transforms_transforms = { } }] }; -/* harmony default export */ var buttons_transforms = (transforms_transforms); +/* harmony default export */ const buttons_transforms = (transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/buttons/edit.js @@ -5392,14 +5703,8 @@ const transforms_transforms = { - -/** - * Internal dependencies - */ - -const ALLOWED_BLOCKS = [button_name]; const DEFAULT_BLOCK = { - name: button_name, + name: 'core/button', attributesToCopy: ['backgroundColor', 'border', 'className', 'fontFamily', 'fontSize', 'gradient', 'style', 'textColor', 'width'] }; function ButtonsEdit({ @@ -5422,28 +5727,27 @@ function ButtonsEdit({ hasButtonVariations } = (0,external_wp_data_namespaceObject.useSelect)(select => { const preferredStyleVariations = select(external_wp_blockEditor_namespaceObject.store).getSettings().__experimentalPreferredStyleVariations; - const buttonVariations = select(external_wp_blocks_namespaceObject.store).getBlockVariations(button_name, 'inserter'); + const buttonVariations = select(external_wp_blocks_namespaceObject.store).getBlockVariations('core/button', 'inserter'); return { - preferredStyle: preferredStyleVariations?.value?.[button_name], + preferredStyle: preferredStyleVariations?.value?.['core/button'], hasButtonVariations: buttonVariations.length > 0 }; }, []); const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, { - allowedBlocks: ALLOWED_BLOCKS, defaultBlock: DEFAULT_BLOCK, // This check should be handled by the `Inserter` internally to be consistent across all blocks that use it. directInsert: !hasButtonVariations, - template: [[button_name, { + template: [['core/button', { className: preferredStyle && `is-style-${preferredStyle}` }]], templateInsertUpdatesSelection: true, orientation: (_layout$orientation = layout?.orientation) !== null && _layout$orientation !== void 0 ? _layout$orientation : 'horizontal' }); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...innerBlocksProps }); } -/* harmony default export */ var buttons_edit = (ButtonsEdit); +/* harmony default export */ const buttons_edit = (ButtonsEdit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/buttons/save.js @@ -5470,7 +5774,7 @@ function buttons_save_save({ }) }); const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...innerBlocksProps }); } @@ -5495,6 +5799,7 @@ const buttons_metadata = { name: "core/buttons", title: "Buttons", category: "design", + allowedBlocks: ["core/button"], description: "Prompt visitors to take action with a group of button-style links.", keywords: ["link"], textdomain: "default", @@ -5529,6 +5834,9 @@ const buttons_metadata = { "default": { type: "flex" } + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-buttons-editor", @@ -5571,13 +5879,13 @@ const buttons_init = () => initBlock({ * WordPress dependencies */ -const calendar = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const calendar = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z" })); -/* harmony default export */ var library_calendar = (calendar); +/* harmony default export */ const library_calendar = (calendar); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/calendar/edit.js @@ -5656,16 +5964,16 @@ function CalendarEdit({ }; }, []); if (!hasPosts) { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { icon: library_calendar, label: (0,external_wp_i18n_namespaceObject.__)('Calendar') - }, !hasPostsResolved ? (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null) : (0,external_wp_i18n_namespaceObject.__)('No published posts found.'))); + }, !hasPostsResolved ? (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null) : (0,external_wp_i18n_namespaceObject.__)('No published posts found.'))); } - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Disabled, null, (0,external_wp_element_namespaceObject.createElement)((external_wp_serverSideRender_default()), { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Disabled, null, (0,external_React_namespaceObject.createElement)((external_wp_serverSideRender_default()), { block: "core/calendar", attributes: { ...attributes, @@ -5691,7 +5999,7 @@ const calendar_transforms_transforms = { transform: () => (0,external_wp_blocks_namespaceObject.createBlock)('core/archives') }] }; -/* harmony default export */ var calendar_transforms = (calendar_transforms_transforms); +/* harmony default export */ const calendar_transforms = (calendar_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/calendar/index.js /** @@ -5742,6 +6050,9 @@ const calendar_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } }, style: "wp-block-calendar" @@ -5770,31 +6081,31 @@ const calendar_init = () => initBlock({ * WordPress dependencies */ -const category = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const category = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z", fillRule: "evenodd", clipRule: "evenodd" })); -/* harmony default export */ var library_category = (category); +/* harmony default export */ const library_category = (category); ;// CONCATENATED MODULE: external ["wp","htmlEntities"] -var external_wp_htmlEntities_namespaceObject = window["wp"]["htmlEntities"]; +const external_wp_htmlEntities_namespaceObject = window["wp"]["htmlEntities"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pin.js /** * WordPress dependencies */ -const pin = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const pin = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "m21.5 9.1-6.6-6.6-4.2 5.6c-1.2-.1-2.4.1-3.6.7-.1 0-.1.1-.2.1-.5.3-.9.6-1.2.9l3.7 3.7-5.7 5.7v1.1h1.1l5.7-5.7 3.7 3.7c.4-.4.7-.8.9-1.2.1-.1.1-.2.2-.3.6-1.1.8-2.4.6-3.6l5.6-4.1zm-7.3 3.5.1.9c.1.9 0 1.8-.4 2.6l-6-6c.8-.4 1.7-.5 2.6-.4l.9.1L15 4.9 19.1 9l-4.9 3.6z" })); -/* harmony default export */ var library_pin = (pin); +/* harmony default export */ const library_pin = (pin); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/categories/edit.js @@ -5865,26 +6176,26 @@ function CategoriesEdit({ count, name } = category; - return (0,external_wp_element_namespaceObject.createElement)("li", { + return (0,external_React_namespaceObject.createElement)("li", { key: id, className: `cat-item cat-item-${id}` - }, (0,external_wp_element_namespaceObject.createElement)("a", { + }, (0,external_React_namespaceObject.createElement)("a", { href: link, target: "_blank", rel: "noreferrer noopener" - }, renderCategoryName(name)), showPostCounts && ` (${count})`, showHierarchy && !!childCategories.length && (0,external_wp_element_namespaceObject.createElement)("ul", { + }, renderCategoryName(name)), showPostCounts && ` (${count})`, showHierarchy && !!childCategories.length && (0,external_React_namespaceObject.createElement)("ul", { className: "children" }, childCategories.map(childCategory => renderCategoryListItem(childCategory)))); }; const renderCategoryDropdown = () => { const parentId = showHierarchy ? 0 : null; const categoriesList = getCategoriesList(parentId); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, { as: "label", htmlFor: selectId - }, (0,external_wp_i18n_namespaceObject.__)('Categories')), (0,external_wp_element_namespaceObject.createElement)("select", { + }, (0,external_wp_i18n_namespaceObject.__)('Categories')), (0,external_React_namespaceObject.createElement)("select", { id: selectId - }, (0,external_wp_element_namespaceObject.createElement)("option", null, (0,external_wp_i18n_namespaceObject.__)('Select Category')), categoriesList.map(category => renderCategoryDropdownItem(category, 0)))); + }, (0,external_React_namespaceObject.createElement)("option", null, (0,external_wp_i18n_namespaceObject.__)('Select Category')), categoriesList.map(category => renderCategoryDropdownItem(category, 0)))); }; const renderCategoryDropdownItem = (category, level) => { const { @@ -5893,7 +6204,7 @@ function CategoriesEdit({ name } = category; const childCategories = getCategoriesList(id); - return [(0,external_wp_element_namespaceObject.createElement)("option", { + return [(0,external_React_namespaceObject.createElement)("option", { key: id, className: `level-${level}` }, Array.from({ @@ -5908,39 +6219,39 @@ function CategoriesEdit({ const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: classes }); - return (0,external_wp_element_namespaceObject.createElement)(TagName, { + return (0,external_React_namespaceObject.createElement)(TagName, { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Display as dropdown'), checked: displayAsDropdown, onChange: toggleAttribute('displayAsDropdown') - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Show post counts'), checked: showPostCounts, onChange: toggleAttribute('showPostCounts') - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Show only top level categories'), checked: showOnlyTopLevel, onChange: toggleAttribute('showOnlyTopLevel') - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Show empty categories'), checked: showEmpty, onChange: toggleAttribute('showEmpty') - }), !showOnlyTopLevel && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), !showOnlyTopLevel && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Show hierarchy'), checked: showHierarchy, onChange: toggleAttribute('showHierarchy') - }))), isResolving && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { + }))), isResolving && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { icon: library_pin, label: (0,external_wp_i18n_namespaceObject.__)('Categories') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null)), !isResolving && categories?.length === 0 && (0,external_wp_element_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('Your site does not have any posts, so there is nothing to display here at the moment.')), !isResolving && categories?.length > 0 && (displayAsDropdown ? renderCategoryDropdown() : renderCategoryList())); + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null)), !isResolving && categories?.length === 0 && (0,external_React_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('Your site does not have any posts, so there is nothing to display here at the moment.')), !isResolving && categories?.length > 0 && (displayAsDropdown ? renderCategoryDropdown() : renderCategoryList())); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/categories/index.js @@ -6006,6 +6317,9 @@ const categories_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-categories-editor", @@ -6033,13 +6347,13 @@ const categories_init = () => initBlock({ * WordPress dependencies */ -const classic = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const classic = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M20 6H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H4c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h16c.3 0 .5.2.5.5v9zM10 10H8v2h2v-2zm-5 2h2v-2H5v2zm8-2h-2v2h2v-2zm-5 6h8v-2H8v2zm6-4h2v-2h-2v2zm3 0h2v-2h-2v2zm0 4h2v-2h-2v2zM5 16h2v-2H5v2z" })); -/* harmony default export */ var library_classic = (classic); +/* harmony default export */ const library_classic = (classic); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/freeform/convert-to-blocks-button.js @@ -6060,13 +6374,13 @@ const ConvertToBlocksButton = ({ const block = (0,external_wp_data_namespaceObject.useSelect)(select => { return select(external_wp_blockEditor_namespaceObject.store).getBlock(clientId); }, [clientId]); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { onClick: () => replaceBlocks(block.clientId, (0,external_wp_blocks_namespaceObject.rawHandler)({ HTML: (0,external_wp_blocks_namespaceObject.serialize)(block) })) }, (0,external_wp_i18n_namespaceObject.__)('Convert to blocks')); }; -/* harmony default export */ var convert_to_blocks_button = (ConvertToBlocksButton); +/* harmony default export */ const convert_to_blocks_button = (ConvertToBlocksButton); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/fullscreen.js @@ -6074,13 +6388,13 @@ const ConvertToBlocksButton = ({ * WordPress dependencies */ -const fullscreen = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const fullscreen = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z" })); -/* harmony default export */ var library_fullscreen = (fullscreen); +/* harmony default export */ const library_fullscreen = (fullscreen); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/freeform/modal.js @@ -6103,7 +6417,7 @@ function ModalAuxiliaryActions({ if (isMobileViewport) { return null; } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { onClick: onClick, icon: library_fullscreen, isPressed: isModalFullScreen, @@ -6143,7 +6457,7 @@ function ClassicEdit(props) { window.wp.oldEditor.remove(props.id); }; }, []); - return (0,external_wp_element_namespaceObject.createElement)("textarea", { + return (0,external_React_namespaceObject.createElement)("textarea", { ...props }); } @@ -6160,30 +6474,30 @@ function ModalEdit(props) { const [isModalFullScreen, setIsModalFullScreen] = (0,external_wp_element_namespaceObject.useState)(false); const id = `editor-${clientId}`; const onClose = () => content ? setOpen(false) : onReplace([]); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { onClick: () => setOpen(true) - }, (0,external_wp_i18n_namespaceObject.__)('Edit')))), content && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, null, content), (isOpen || !content) && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, { + }, (0,external_wp_i18n_namespaceObject.__)('Edit')))), content && (0,external_React_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, null, content), (isOpen || !content) && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, { title: (0,external_wp_i18n_namespaceObject.__)('Classic Editor'), onRequestClose: onClose, shouldCloseOnClickOutside: false, overlayClassName: "block-editor-freeform-modal", isFullScreen: isModalFullScreen, className: "block-editor-freeform-modal__content", - headerActions: (0,external_wp_element_namespaceObject.createElement)(ModalAuxiliaryActions, { + headerActions: (0,external_React_namespaceObject.createElement)(ModalAuxiliaryActions, { onClick: () => setIsModalFullScreen(!isModalFullScreen), isModalFullScreen: isModalFullScreen }) - }, (0,external_wp_element_namespaceObject.createElement)(ClassicEdit, { + }, (0,external_React_namespaceObject.createElement)(ClassicEdit, { id: id, defaultValue: content - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Flex, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Flex, { className: "block-editor-freeform-modal__actions", justify: "flex-end", expanded: false - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { variant: "tertiary", onClick: onClose - }, (0,external_wp_i18n_namespaceObject.__)('Cancel'))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, (0,external_wp_i18n_namespaceObject.__)('Cancel'))), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { variant: "primary", onClick: () => { setAttributes({ @@ -6239,15 +6553,15 @@ function FreeformEdit(props) { const ref = (0,external_wp_compose_namespaceObject.useRefEffect)(element => { setIsIframed(element.ownerDocument !== document); }, []); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, canRemove && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_wp_element_namespaceObject.createElement)(convert_to_blocks_button, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, canRemove && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_React_namespaceObject.createElement)(convert_to_blocks_button, { clientId: clientId - }))), (0,external_wp_element_namespaceObject.createElement)("div", { + }))), (0,external_React_namespaceObject.createElement)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({ ref }) - }, isIframed ? (0,external_wp_element_namespaceObject.createElement)(ModalEdit, { + }, isIframed ? (0,external_React_namespaceObject.createElement)(ModalEdit, { ...props - }) : (0,external_wp_element_namespaceObject.createElement)(edit_ClassicEdit, { + }) : (0,external_React_namespaceObject.createElement)(edit_ClassicEdit, { ...props }))); } @@ -6412,14 +6726,14 @@ function edit_ClassicEdit({ // from the KeyboardShortcuts component to stop their propagation. /* eslint-disable jsx-a11y/no-static-element-interactions */ - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("div", { key: "toolbar", id: `toolbar-${clientId}`, className: "block-library-classic__toolbar", onClick: focus, "data-placeholder": (0,external_wp_i18n_namespaceObject.__)('Classic'), onKeyDown: onToolbarKeyDown - }), (0,external_wp_element_namespaceObject.createElement)("div", { + }), (0,external_React_namespaceObject.createElement)("div", { key: "editor", id: `editor-${clientId}`, className: "wp-block-freeform block-library-rich-text__tinymce" @@ -6439,7 +6753,7 @@ function freeform_save_save({ const { content } = attributes; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, null, content); + return (0,external_React_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, null, content); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/freeform/index.js @@ -6496,13 +6810,13 @@ const freeform_init = () => initBlock({ * WordPress dependencies */ -const code = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const code = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z" })); -/* harmony default export */ var library_code = (code); +/* harmony default export */ const library_code = (code); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/code/edit.js @@ -6520,9 +6834,9 @@ function CodeEdit({ mergeBlocks }) { const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); - return (0,external_wp_element_namespaceObject.createElement)("pre", { + return (0,external_React_namespaceObject.createElement)("pre", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { tagName: "code", identifier: "content", value: attributes.content, @@ -6604,11 +6918,17 @@ function escapeProtocolInIsolatedUrls(content) { function code_save_save({ attributes }) { - return (0,external_wp_element_namespaceObject.createElement)("pre", { + return (0,external_React_namespaceObject.createElement)("pre", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save() - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { - tagName: "code", - value: utils_escape(attributes.content) + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + tagName: "code" + // To do: `escape` encodes characters in shortcodes and URLs to + // prevent embedding in PHP. Ideally checks for the code block, + // or pre/code tags, should be made on the PHP side? + , + value: utils_escape(typeof attributes.content === 'string' ? attributes.content : attributes.content.toHTMLString({ + preserveWhiteSpace: true + })) })); } @@ -6617,6 +6937,12 @@ function code_save_save({ * WordPress dependencies */ + + +/** + * Internal dependencies + */ + const code_transforms_transforms = { from: [{ type: 'enter', @@ -6624,12 +6950,30 @@ const code_transforms_transforms = { transform: () => (0,external_wp_blocks_namespaceObject.createBlock)('core/code') }, { type: 'block', - blocks: ['core/html', 'core/paragraph'], + blocks: ['core/paragraph'], transform: ({ - content + content, + metadata + }) => (0,external_wp_blocks_namespaceObject.createBlock)('core/code', { + content, + metadata: getTransformedMetadata(metadata, 'core/code') + }) + }, { + type: 'block', + blocks: ['core/html'], + transform: ({ + content: text, + metadata }) => { return (0,external_wp_blocks_namespaceObject.createBlock)('core/code', { - content + // The HTML is plain text (with plain line breaks), so + // convert it to rich text. + content: (0,external_wp_richText_namespaceObject.toHTMLString)({ + value: (0,external_wp_richText_namespaceObject.create)({ + text + }) + }), + metadata: getTransformedMetadata(metadata, 'core/code') }); } }, { @@ -6651,15 +6995,15 @@ const code_transforms_transforms = { type: 'block', blocks: ['core/paragraph'], transform: ({ - content - }) => { - return (0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph', { - content: content.replace(/\n/g, '<br>') - }); - } + content, + metadata + }) => (0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph', { + content, + metadata: getTransformedMetadata(metadata, 'core/paragraph') + }) }] }; -/* harmony default export */ var code_transforms = (code_transforms_transforms); +/* harmony default export */ const code_transforms = (code_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/code/index.js /** @@ -6683,8 +7027,8 @@ const code_metadata = { textdomain: "default", attributes: { content: { - type: "string", - source: "html", + type: "rich-text", + source: "rich-text", selector: "code", __unstablePreserveWhiteSpace: true } @@ -6731,6 +7075,9 @@ const code_metadata = { background: true, text: true } + }, + interactivity: { + clientNavigation: true } }, style: "wp-block-code" @@ -6751,7 +7098,6 @@ const code_settings = { /* eslint-enable @wordpress/i18n-no-collapsible-whitespace */ } }, - merge(attributes, attributesToMerge) { return { content: attributes.content + '\n\n' + attributesToMerge.content @@ -6773,13 +7119,13 @@ const code_init = () => initBlock({ * WordPress dependencies */ -const column = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const column = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zM6 17.5c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h3v10H6zm13.5-.5c0 .3-.2.5-.5.5h-3v-10h3c.3 0 .5.2.5.5v9z" })); -/* harmony default export */ var library_column = (column); +/* harmony default export */ const library_column = (column); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/column/deprecated.js @@ -6827,13 +7173,13 @@ const column_deprecated_deprecated = [{ const style = { flexBasis: width + '%' }; - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: wrapperClasses, style: style - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); } }]; -/* harmony default export */ var column_deprecated = (column_deprecated_deprecated); +/* harmony default export */ const column_deprecated = (column_deprecated_deprecated); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/column/edit.js @@ -6862,8 +7208,9 @@ function ColumnEdit({ const classes = classnames_default()('block-core-columns', { [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment }); + const [availableUnits] = (0,external_wp_blockEditor_namespaceObject.useSettings)('spacing.units'); const units = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({ - availableUnits: (0,external_wp_blockEditor_namespaceObject.useSetting)('spacing.units') || ['%', 'px', 'em', 'rem', 'vw'] + availableUnits: availableUnits || ['%', 'px', 'em', 'rem', 'vw'] }); const { columnsIds, @@ -6913,13 +7260,13 @@ function ColumnEdit({ allowedBlocks, renderAppender: hasChildBlocks ? undefined : external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender }); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockVerticalAlignmentToolbar, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockVerticalAlignmentToolbar, { onChange: updateAlignment, value: verticalAlignment, controls: ['top', 'center', 'bottom', 'stretch'] - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { - title: (0,external_wp_i18n_namespaceObject.__)('Column settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalUnitControl, { + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + title: (0,external_wp_i18n_namespaceObject.__)('Settings') + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalUnitControl, { label: (0,external_wp_i18n_namespaceObject.__)('Width'), labelPosition: "edge", __unstableInputWidth: "80px", @@ -6931,11 +7278,11 @@ function ColumnEdit({ }); }, units: units - }))), (0,external_wp_element_namespaceObject.createElement)("div", { + }))), (0,external_React_namespaceObject.createElement)("div", { ...innerBlocksProps })); } -/* harmony default export */ var column_edit = (ColumnEdit); +/* harmony default export */ const column_edit = (ColumnEdit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/column/save.js @@ -6977,7 +7324,7 @@ function column_save_save({ style }); const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...innerBlocksProps }); } @@ -7033,6 +7380,7 @@ const column_metadata = { text: true } }, + shadow: true, spacing: { blockGap: true, padding: true, @@ -7064,7 +7412,10 @@ const column_metadata = { fontSize: true } }, - layout: true + layout: true, + interactivity: { + clientNavigation: true + } } }; @@ -7090,13 +7441,15 @@ const column_init = () => initBlock({ * WordPress dependencies */ -const columns = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const columns = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { - d: "M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-4.1 1.5v10H10v-10h4.9zM5.5 17V8c0-.3.2-.5.5-.5h2.5v10H6c-.3 0-.5-.2-.5-.5zm14 0c0 .3-.2.5-.5.5h-2.6v-10H19c.3 0 .5.2.5.5v9z" +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M15 7.5h-5v10h5v-10Zm1.5 0v10H19a.5.5 0 0 0 .5-.5V8a.5.5 0 0 0-.5-.5h-2.5ZM6 7.5h2.5v10H6a.5.5 0 0 1-.5-.5V8a.5.5 0 0 1 .5-.5ZM6 6h13a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2Z" })); -/* harmony default export */ var library_columns = (columns); +/* harmony default export */ const library_columns = (columns); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/columns/deprecated.js @@ -7160,7 +7513,7 @@ const migrateCustomColors = attributes => { isStackedOnMobile: true }; }; -/* harmony default export */ var columns_deprecated = ([{ +/* harmony default export */ const columns_deprecated = ([{ attributes: { verticalAlignment: { type: 'string' @@ -7202,10 +7555,10 @@ const migrateCustomColors = attributes => { backgroundColor: backgroundClass ? undefined : customBackgroundColor, color: textClass ? undefined : customTextColor }; - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: className ? className : undefined, style: style - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); } }, { attributes: { @@ -7259,9 +7612,9 @@ const migrateCustomColors = attributes => { const { columns } = attributes; - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: `has-${columns}-columns` - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); } }, { attributes: { @@ -7291,9 +7644,9 @@ const migrateCustomColors = attributes => { const wrapperClasses = classnames_default()(`has-${columns}-columns`, { [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment }); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: wrapperClasses - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); } }]); @@ -7473,22 +7826,9 @@ function isPercentageUnit(unit) { * Internal dependencies */ - -/** - * Allowed blocks constant is passed to InnerBlocks precisely as specified here. - * The contents of the array should never change. - * The array should contain the name of each block that is allowed. - * In columns block, the only block we allow is 'core/column'. - * - * @constant - * @type {string[]} - */ -const edit_ALLOWED_BLOCKS = ['core/column']; function ColumnsEditContainer({ attributes, setAttributes, - updateAlignment, - updateColumns, clientId }) { const { @@ -7523,6 +7863,15 @@ function ColumnsEditContainer({ minCount: Math.max(...preventRemovalBlockIndexes) + 1 }; }, [clientId]); + const registry = (0,external_wp_data_namespaceObject.useRegistry)(); + const { + getBlocks, + getBlockOrder + } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store); + const { + updateBlockAttributes, + replaceInnerBlocks + } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); const classes = classnames_default()({ [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment, [`is-not-stacked-on-mobile`]: !isStackedOnMobile @@ -7531,69 +7880,33 @@ function ColumnsEditContainer({ className: classes }); const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, { - allowedBlocks: edit_ALLOWED_BLOCKS, orientation: 'horizontal', renderAppender: false, templateLock }); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockVerticalAlignmentToolbar, { - onChange: updateAlignment, - value: verticalAlignment - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, null, canInsertColumnBlock && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { - __nextHasNoMarginBottom: true, - __next40pxDefaultSize: true, - label: (0,external_wp_i18n_namespaceObject.__)('Columns'), - value: count, - onChange: value => updateColumns(count, Math.max(minCount, value)), - min: Math.max(1, minCount), - max: Math.max(6, count) - }), count > 6 && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Notice, { - status: "warning", - isDismissible: false - }, (0,external_wp_i18n_namespaceObject.__)('This column count exceeds the recommended amount and may cause visual breakage.'))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { - __nextHasNoMarginBottom: true, - label: (0,external_wp_i18n_namespaceObject.__)('Stack on mobile'), - checked: isStackedOnMobile, - onChange: () => setAttributes({ - isStackedOnMobile: !isStackedOnMobile - }) - }))), (0,external_wp_element_namespaceObject.createElement)("div", { - ...innerBlocksProps - })); -} -const ColumnsEditContainerWrapper = (0,external_wp_data_namespaceObject.withDispatch)((dispatch, ownProps, registry) => ({ + /** * Update all child Column blocks with a new vertical alignment setting * based on whatever alignment is passed in. This allows change to parent * to overide anything set on a individual column basis. * - * @param {string} verticalAlignment the vertical alignment setting + * @param {string} newVerticalAlignment The vertical alignment setting. */ - updateAlignment(verticalAlignment) { - const { - clientId, - setAttributes - } = ownProps; - const { - updateBlockAttributes - } = dispatch(external_wp_blockEditor_namespaceObject.store); - const { - getBlockOrder - } = registry.select(external_wp_blockEditor_namespaceObject.store); - - // Update own alignment. - setAttributes({ - verticalAlignment - }); - - // Update all child Column Blocks to match. + function updateAlignment(newVerticalAlignment) { const innerBlockClientIds = getBlockOrder(clientId); - innerBlockClientIds.forEach(innerBlockClientId => { - updateBlockAttributes(innerBlockClientId, { - verticalAlignment + + // Update own and child Column block vertical alignments. + // This is a single action; the batching prevents creating multiple history records. + registry.batch(() => { + setAttributes({ + verticalAlignment: newVerticalAlignment + }); + updateBlockAttributes(innerBlockClientIds, { + verticalAlignment: newVerticalAlignment }); }); - }, + } + /** * Updates the column count, including necessary revisions to child Column * blocks to grant required or redistribute available space. @@ -7601,16 +7914,7 @@ const ColumnsEditContainerWrapper = (0,external_wp_data_namespaceObject.withDisp * @param {number} previousColumns Previous column count. * @param {number} newColumns New column count. */ - updateColumns(previousColumns, newColumns) { - const { - clientId - } = ownProps; - const { - replaceInnerBlocks - } = dispatch(external_wp_blockEditor_namespaceObject.store); - const { - getBlocks - } = registry.select(external_wp_blockEditor_namespaceObject.store); + function updateColumns(previousColumns, newColumns) { let innerBlocks = getBlocks(clientId); const hasExplicitWidths = hasExplicitPercentColumnWidths(innerBlocks); @@ -7648,7 +7952,33 @@ const ColumnsEditContainerWrapper = (0,external_wp_data_namespaceObject.withDisp } replaceInnerBlocks(clientId, innerBlocks); } -}))(ColumnsEditContainer); + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockVerticalAlignmentToolbar, { + onChange: updateAlignment, + value: verticalAlignment + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + title: (0,external_wp_i18n_namespaceObject.__)('Settings') + }, canInsertColumnBlock && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { + __nextHasNoMarginBottom: true, + __next40pxDefaultSize: true, + label: (0,external_wp_i18n_namespaceObject.__)('Columns'), + value: count, + onChange: value => updateColumns(count, Math.max(minCount, value)), + min: Math.max(1, minCount), + max: Math.max(6, count) + }), count > 6 && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Notice, { + status: "warning", + isDismissible: false + }, (0,external_wp_i18n_namespaceObject.__)('This column count exceeds the recommended amount and may cause visual breakage.'))), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + __nextHasNoMarginBottom: true, + label: (0,external_wp_i18n_namespaceObject.__)('Stack on mobile'), + checked: isStackedOnMobile, + onChange: () => setAttributes({ + isStackedOnMobile: !isStackedOnMobile + }) + }))), (0,external_React_namespaceObject.createElement)("div", { + ...innerBlocksProps + })); +} function Placeholder({ clientId, name, @@ -7674,9 +8004,9 @@ function Placeholder({ replaceInnerBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalBlockVariationPicker, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalBlockVariationPicker, { icon: blockType?.icon?.src, label: blockType?.title, variations: variations, @@ -7696,12 +8026,12 @@ const ColumnsEdit = props => { clientId } = props; const hasInnerBlocks = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).getBlocks(clientId).length > 0, [clientId]); - const Component = hasInnerBlocks ? ColumnsEditContainerWrapper : Placeholder; - return (0,external_wp_element_namespaceObject.createElement)(Component, { + const Component = hasInnerBlocks ? ColumnsEditContainer : Placeholder; + return (0,external_React_namespaceObject.createElement)(Component, { ...props }); }; -/* harmony default export */ var columns_edit = (ColumnsEdit); +/* harmony default export */ const columns_edit = (ColumnsEdit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/columns/save.js @@ -7729,7 +8059,7 @@ function columns_save_save({ className }); const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...innerBlocksProps }); } @@ -7753,12 +8083,12 @@ const variations = [{ name: 'one-column-full', title: (0,external_wp_i18n_namespaceObject.__)('100'), description: (0,external_wp_i18n_namespaceObject.__)('One column'), - icon: (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { + icon: (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { width: "48", height: "48", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "m39.0625 14h-30.0625v20.0938h30.0625zm-30.0625-2c-1.10457 0-2 .8954-2 2v20.0938c0 1.1045.89543 2 2 2h30.0625c1.1046 0 2-.8955 2-2v-20.0938c0-1.1046-.8954-2-2-2z" @@ -7769,12 +8099,12 @@ const variations = [{ name: 'two-columns-equal', title: (0,external_wp_i18n_namespaceObject.__)('50 / 50'), description: (0,external_wp_i18n_namespaceObject.__)('Two columns; equal split'), - icon: (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { + icon: (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { width: "48", height: "48", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H25V34H39ZM23 34H9V14H23V34Z" @@ -7786,12 +8116,12 @@ const variations = [{ name: 'two-columns-one-third-two-thirds', title: (0,external_wp_i18n_namespaceObject.__)('33 / 66'), description: (0,external_wp_i18n_namespaceObject.__)('Two columns; one-third, two-thirds split'), - icon: (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { + icon: (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { width: "48", height: "48", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H20V34H39ZM18 34H9V14H18V34Z" @@ -7806,12 +8136,12 @@ const variations = [{ name: 'two-columns-two-thirds-one-third', title: (0,external_wp_i18n_namespaceObject.__)('66 / 33'), description: (0,external_wp_i18n_namespaceObject.__)('Two columns; two-thirds, one-third split'), - icon: (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { + icon: (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { width: "48", height: "48", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H30V34H39ZM28 34H9V14H28V34Z" @@ -7826,12 +8156,12 @@ const variations = [{ name: 'three-columns-equal', title: (0,external_wp_i18n_namespaceObject.__)('33 / 33 / 33'), description: (0,external_wp_i18n_namespaceObject.__)('Three columns; equal split'), - icon: (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { + icon: (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { width: "48", height: "48", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { fillRule: "evenodd", d: "M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM28.5 34h-9V14h9v20zm2 0V14H39v20h-8.5zm-13 0H9V14h8.5v20z" })), @@ -7841,12 +8171,12 @@ const variations = [{ name: 'three-columns-wider-center', title: (0,external_wp_i18n_namespaceObject.__)('25 / 50 / 25'), description: (0,external_wp_i18n_namespaceObject.__)('Three columns; wide center column'), - icon: (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { + icon: (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { width: "48", height: "48", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { fillRule: "evenodd", d: "M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM31 34H17V14h14v20zm2 0V14h6v20h-6zm-18 0H9V14h6v20z" })), @@ -7859,7 +8189,7 @@ const variations = [{ }]], scope: ['block'] }]; -/* harmony default export */ var columns_variations = (variations); +/* harmony default export */ const columns_variations = (variations); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/columns/transforms.js /** @@ -7960,7 +8290,7 @@ const columns_transforms_transforms = { }], ungroup: (attributes, innerBlocks) => innerBlocks.flatMap(innerBlock => innerBlock.innerBlocks) }; -/* harmony default export */ var columns_transforms = (columns_transforms_transforms); +/* harmony default export */ const columns_transforms = (columns_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/columns/index.js /** @@ -7981,6 +8311,7 @@ const columns_metadata = { name: "core/columns", title: "Columns", category: "design", + allowedBlocks: ["core/column"], description: "Display content in multiple columns, with blocks added to each column.", textdomain: "default", attributes: { @@ -8055,7 +8386,11 @@ const columns_metadata = { __experimentalDefaultControls: { fontSize: true } - } + }, + interactivity: { + clientNavigation: true + }, + shadow: true }, editorStyle: "wp-block-columns-editor", style: "wp-block-columns" @@ -8127,13 +8462,13 @@ const columns_init = () => initBlock({ * WordPress dependencies */ -const postComments = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const postComments = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M14 10.1V4c0-.6-.4-1-1-1H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1zm-1.5-.5H6.7l-1.2 1.2V4.5h7v5.1zM19 12h-8c-.6 0-1 .4-1 1v6.1c0 .6.4 1 1 1h5.7l1.8 1.8c.1.2.4.3.6.3.1 0 .2 0 .3-.1.4-.1.6-.5.6-.8V13c0-.6-.4-1-1-1zm-.5 7.8l-1.2-1.2h-5.8v-5.1h7v6.3z" })); -/* harmony default export */ var post_comments = (postComments); +/* harmony default export */ const post_comments = (postComments); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments/deprecated.js @@ -8184,12 +8519,12 @@ const v1 = { ...blockProps, className: newClasses.join(' ') }; - return (0,external_wp_element_namespaceObject.createElement)(Tag, { + return (0,external_React_namespaceObject.createElement)(Tag, { ...newBlockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); } }; -/* harmony default export */ var comments_deprecated = ([v1]); +/* harmony default export */ const comments_deprecated = ([v1]); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments/edit/comments-inspector-controls.js @@ -8209,10 +8544,11 @@ function CommentsInspectorControls({ section: (0,external_wp_i18n_namespaceObject.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element."), aside: (0,external_wp_i18n_namespaceObject.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content.") }; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, + __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)('HTML element'), options: [{ label: (0,external_wp_i18n_namespaceObject.__)('Default (<div>)'), @@ -8250,25 +8586,25 @@ function CommentsInspectorControls({ const CommentsFormPlaceholder = () => { const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(CommentsFormPlaceholder); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: "comment-respond" - }, (0,external_wp_element_namespaceObject.createElement)("h3", { + }, (0,external_React_namespaceObject.createElement)("h3", { className: "comment-reply-title" - }, (0,external_wp_i18n_namespaceObject.__)('Leave a Reply')), (0,external_wp_element_namespaceObject.createElement)("form", { + }, (0,external_wp_i18n_namespaceObject.__)('Leave a Reply')), (0,external_React_namespaceObject.createElement)("form", { noValidate: true, className: "comment-form", onSubmit: event => event.preventDefault() - }, (0,external_wp_element_namespaceObject.createElement)("p", null, (0,external_wp_element_namespaceObject.createElement)("label", { + }, (0,external_React_namespaceObject.createElement)("p", null, (0,external_React_namespaceObject.createElement)("label", { htmlFor: `comment-${instanceId}` - }, (0,external_wp_i18n_namespaceObject.__)('Comment')), (0,external_wp_element_namespaceObject.createElement)("textarea", { + }, (0,external_wp_i18n_namespaceObject.__)('Comment')), (0,external_React_namespaceObject.createElement)("textarea", { id: `comment-${instanceId}`, name: "comment", cols: "45", rows: "8", readOnly: true - })), (0,external_wp_element_namespaceObject.createElement)("p", { + })), (0,external_React_namespaceObject.createElement)("p", { className: "form-submit wp-block-button" - }, (0,external_wp_element_namespaceObject.createElement)("input", { + }, (0,external_React_namespaceObject.createElement)("input", { name: "submit", type: "submit", className: classnames_default()('wp-block-button__link', (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('button')), @@ -8289,24 +8625,24 @@ const CommentsForm = ({ const postTypeSupportsComments = (0,external_wp_data_namespaceObject.useSelect)(select => postType ? !!select(external_wp_coreData_namespaceObject.store).getPostType(postType)?.supports.comments : false); if (!isSiteEditor && 'open' !== commentStatus) { if ('closed' === commentStatus) { - const actions = [(0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + const actions = [(0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { key: "enableComments", onClick: () => setCommentStatus('open'), variant: "primary" }, (0,external_wp_i18n_namespaceObject._x)('Enable comments', 'action that affects the current post'))]; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, { actions: actions }, (0,external_wp_i18n_namespaceObject.__)('Post Comments Form block: Comments are not enabled for this item.')); } else if (!postTypeSupportsComments) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: 1: Post type (i.e. "post", "page") */ + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: 1: Post type (i.e. "post", "page") */ (0,external_wp_i18n_namespaceObject.__)('Post Comments Form block: Comments are not enabled for this post type (%s).'), postType)); } else if ('open' !== defaultCommentStatus) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Post Comments Form block: Comments are not enabled.')); + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Post Comments Form block: Comments are not enabled.')); } } - return (0,external_wp_element_namespaceObject.createElement)(CommentsFormPlaceholder, null); + return (0,external_React_namespaceObject.createElement)(CommentsFormPlaceholder, null); }; -/* harmony default export */ var post_comments_form_form = (CommentsForm); +/* harmony default export */ const post_comments_form_form = (CommentsForm); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments/edit/placeholder.js @@ -8332,80 +8668,80 @@ function PostCommentsPlaceholder({ const { avatarURL } = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).getSettings().__experimentalDiscussionSettings); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-comments__legacy-placeholder", inert: "true" - }, (0,external_wp_element_namespaceObject.createElement)("h3", null, /* translators: %s: Post title. */ - (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)('One response to %s'), postTitle)), (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("h3", null, /* translators: %s: Post title. */ + (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)('One response to %s'), postTitle)), (0,external_React_namespaceObject.createElement)("div", { className: "navigation" - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { className: "alignleft" - }, (0,external_wp_element_namespaceObject.createElement)("a", { + }, (0,external_React_namespaceObject.createElement)("a", { href: "#top" - }, "\xAB ", (0,external_wp_i18n_namespaceObject.__)('Older Comments'))), (0,external_wp_element_namespaceObject.createElement)("div", { + }, "\xAB ", (0,external_wp_i18n_namespaceObject.__)('Older Comments'))), (0,external_React_namespaceObject.createElement)("div", { className: "alignright" - }, (0,external_wp_element_namespaceObject.createElement)("a", { + }, (0,external_React_namespaceObject.createElement)("a", { href: "#top" - }, (0,external_wp_i18n_namespaceObject.__)('Newer Comments'), " \xBB"))), (0,external_wp_element_namespaceObject.createElement)("ol", { + }, (0,external_wp_i18n_namespaceObject.__)('Newer Comments'), " \xBB"))), (0,external_React_namespaceObject.createElement)("ol", { className: "commentlist" - }, (0,external_wp_element_namespaceObject.createElement)("li", { + }, (0,external_React_namespaceObject.createElement)("li", { className: "comment even thread-even depth-1" - }, (0,external_wp_element_namespaceObject.createElement)("article", { + }, (0,external_React_namespaceObject.createElement)("article", { className: "comment-body" - }, (0,external_wp_element_namespaceObject.createElement)("footer", { + }, (0,external_React_namespaceObject.createElement)("footer", { className: "comment-meta" - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { className: "comment-author vcard" - }, (0,external_wp_element_namespaceObject.createElement)("img", { + }, (0,external_React_namespaceObject.createElement)("img", { alt: (0,external_wp_i18n_namespaceObject.__)('Commenter Avatar'), src: avatarURL, className: "avatar avatar-32 photo", height: "32", width: "32", loading: "lazy" - }), (0,external_wp_element_namespaceObject.createElement)("b", { + }), (0,external_React_namespaceObject.createElement)("b", { className: "fn" - }, (0,external_wp_element_namespaceObject.createElement)("a", { + }, (0,external_React_namespaceObject.createElement)("a", { href: "#top", className: "url" - }, (0,external_wp_i18n_namespaceObject.__)('A WordPress Commenter'))), ' ', (0,external_wp_element_namespaceObject.createElement)("span", { + }, (0,external_wp_i18n_namespaceObject.__)('A WordPress Commenter'))), ' ', (0,external_React_namespaceObject.createElement)("span", { className: "says" - }, (0,external_wp_i18n_namespaceObject.__)('says'), ":")), (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_wp_i18n_namespaceObject.__)('says'), ":")), (0,external_React_namespaceObject.createElement)("div", { className: "comment-metadata" - }, (0,external_wp_element_namespaceObject.createElement)("a", { + }, (0,external_React_namespaceObject.createElement)("a", { href: "#top" - }, (0,external_wp_element_namespaceObject.createElement)("time", { + }, (0,external_React_namespaceObject.createElement)("time", { dateTime: "2000-01-01T00:00:00+00:00" - }, (0,external_wp_i18n_namespaceObject.__)('January 1, 2000 at 00:00 am'))), ' ', (0,external_wp_element_namespaceObject.createElement)("span", { + }, (0,external_wp_i18n_namespaceObject.__)('January 1, 2000 at 00:00 am'))), ' ', (0,external_React_namespaceObject.createElement)("span", { className: "edit-link" - }, (0,external_wp_element_namespaceObject.createElement)("a", { + }, (0,external_React_namespaceObject.createElement)("a", { className: "comment-edit-link", href: "#top" - }, (0,external_wp_i18n_namespaceObject.__)('Edit'))))), (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_wp_i18n_namespaceObject.__)('Edit'))))), (0,external_React_namespaceObject.createElement)("div", { className: "comment-content" - }, (0,external_wp_element_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('Hi, this is a comment.'), (0,external_wp_element_namespaceObject.createElement)("br", null), (0,external_wp_i18n_namespaceObject.__)('To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.'), (0,external_wp_element_namespaceObject.createElement)("br", null), (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.__)('Commenter avatars come from <a>Gravatar</a>.'), { + }, (0,external_React_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('Hi, this is a comment.'), (0,external_React_namespaceObject.createElement)("br", null), (0,external_wp_i18n_namespaceObject.__)('To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.'), (0,external_React_namespaceObject.createElement)("br", null), (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.__)('Commenter avatars come from <a>Gravatar</a>.'), { a: // eslint-disable-next-line jsx-a11y/anchor-has-content - (0,external_wp_element_namespaceObject.createElement)("a", { + (0,external_React_namespaceObject.createElement)("a", { href: "https://gravatar.com/" }) - }))), (0,external_wp_element_namespaceObject.createElement)("div", { + }))), (0,external_React_namespaceObject.createElement)("div", { className: "reply" - }, (0,external_wp_element_namespaceObject.createElement)("a", { + }, (0,external_React_namespaceObject.createElement)("a", { className: "comment-reply-link", href: "#top", "aria-label": (0,external_wp_i18n_namespaceObject.__)('Reply to A WordPress Commenter') - }, (0,external_wp_i18n_namespaceObject.__)('Reply')))))), (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_wp_i18n_namespaceObject.__)('Reply')))))), (0,external_React_namespaceObject.createElement)("div", { className: "navigation" - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { className: "alignleft" - }, (0,external_wp_element_namespaceObject.createElement)("a", { + }, (0,external_React_namespaceObject.createElement)("a", { href: "#top" - }, "\xAB ", (0,external_wp_i18n_namespaceObject.__)('Older Comments'))), (0,external_wp_element_namespaceObject.createElement)("div", { + }, "\xAB ", (0,external_wp_i18n_namespaceObject.__)('Older Comments'))), (0,external_React_namespaceObject.createElement)("div", { className: "alignright" - }, (0,external_wp_element_namespaceObject.createElement)("a", { + }, (0,external_React_namespaceObject.createElement)("a", { href: "#top" - }, (0,external_wp_i18n_namespaceObject.__)('Newer Comments'), " \xBB"))), (0,external_wp_element_namespaceObject.createElement)(post_comments_form_form, { + }, (0,external_wp_i18n_namespaceObject.__)('Newer Comments'), " \xBB"))), (0,external_React_namespaceObject.createElement)(post_comments_form_form, { postId: postId, postType: postType })); @@ -8440,7 +8776,7 @@ function CommentsLegacy({ const { textAlign } = attributes; - const actions = [(0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + const actions = [(0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { key: "convert", onClick: () => void setAttributes({ legacy: false @@ -8452,20 +8788,20 @@ function CommentsLegacy({ [`has-text-align-${textAlign}`]: textAlign }) }); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: nextAlign => { setAttributes({ textAlign: nextAlign }); } - })), (0,external_wp_element_namespaceObject.createElement)("div", { + })), (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, { actions: actions - }, (0,external_wp_i18n_namespaceObject.__)('Comments block: You’re currently using the legacy version of the block. ' + 'The following is just a placeholder - the final styling will likely look different. ' + 'For a better representation and more customization options, ' + 'switch the block to its editable mode.')), (0,external_wp_element_namespaceObject.createElement)(PostCommentsPlaceholder, { + }, (0,external_wp_i18n_namespaceObject.__)('Comments block: You’re currently using the legacy version of the block. ' + 'The following is just a placeholder - the final styling will likely look different. ' + 'For a better representation and more customization options, ' + 'switch the block to its editable mode.')), (0,external_React_namespaceObject.createElement)(PostCommentsPlaceholder, { postId: postId, postType: postType }))); @@ -8502,7 +8838,7 @@ const TEMPLATE = [['core/comments-title'], ['core/comment-template', {}, [['core }]]], ['core/comment-content'], ['core/comment-reply-link', { fontSize: 'small' }]]]]]]], ['core/comments-pagination'], ['core/post-comments-form']]; -/* harmony default export */ var template = (TEMPLATE); +/* harmony default export */ const template = (TEMPLATE); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments/edit/index.js @@ -8531,14 +8867,14 @@ function CommentsEdit(props) { template: template }); if (legacy) { - return (0,external_wp_element_namespaceObject.createElement)(CommentsLegacy, { + return (0,external_React_namespaceObject.createElement)(CommentsLegacy, { ...props }); } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(CommentsInspectorControls, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(CommentsInspectorControls, { attributes: attributes, setAttributes: setAttributes - }), (0,external_wp_element_namespaceObject.createElement)(TagName, { + }), (0,external_React_namespaceObject.createElement)(TagName, { ...innerBlocksProps })); } @@ -8560,7 +8896,7 @@ function comments_save_save({ // The legacy version is dynamic (i.e. PHP rendered) and doesn't allow inner // blocks, so nothing is saved in that case. - return legacy ? null : (0,external_wp_element_namespaceObject.createElement)(Tag, { + return legacy ? null : (0,external_React_namespaceObject.createElement)(Tag, { ...innerBlocksProps }); } @@ -8688,9 +9024,9 @@ function edit_Edit({ } = getSettings(); return __experimentalDiscussionSettings; }); - const inspectorControls = (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + const inspectorControls = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Avatar Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)('Image size'), @@ -8703,7 +9039,7 @@ function edit_Edit({ initialPosition: width, value: width }))); - const resizableAvatar = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ResizableBox, { + const resizableAvatar = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ResizableBox, { size: { width, height @@ -8724,12 +9060,12 @@ function edit_Edit({ }, minWidth: minSize, maxWidth: maxSizeBuffer - }, (0,external_wp_element_namespaceObject.createElement)("img", { + }, (0,external_React_namespaceObject.createElement)("img", { src: avatarUrls ? avatarUrls[avatarUrls.length - 1] : avatarURL, alt: `${authorName} ${(0,external_wp_i18n_namespaceObject.__)('Avatar')}`, ...blockProps })); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, inspectorControls, (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, inspectorControls, (0,external_React_namespaceObject.createElement)("div", { ...spacingProps }, resizableAvatar)); } @@ -8785,6 +9121,9 @@ const comment_author_avatar_metadata = { __experimentalSkipSerialization: true, margin: true, padding: true + }, + interactivity: { + clientNavigation: true } } }; @@ -8809,25 +9148,25 @@ const comment_author_avatar_init = () => initBlock({ * WordPress dependencies */ -const commentAuthorName = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const commentAuthorName = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z", fillRule: "evenodd", clipRule: "evenodd" -}), (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}), (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M15 15V15C15 13.8954 14.1046 13 13 13L11 13C9.89543 13 9 13.8954 9 15V15", fillRule: "evenodd", clipRule: "evenodd" -}), (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Circle, { +}), (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Circle, { cx: "12", cy: "9", r: "2", fillRule: "evenodd", clipRule: "evenodd" })); -/* harmony default export */ var comment_author_name = (commentAuthorName); +/* harmony default export */ const comment_author_name = (commentAuthorName); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comment-author-name/edit.js @@ -8889,24 +9228,24 @@ function comment_author_name_edit_Edit({ } return authorName !== null && authorName !== void 0 ? authorName : ''; }, [commentId]); - const blockControls = (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + const blockControls = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: newAlign => setAttributes({ textAlign: newAlign }) })); - const inspectorControls = (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + const inspectorControls = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Link to authors URL'), onChange: () => setAttributes({ isLink: !isLink }), checked: isLink - }), isLink && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), isLink && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Open in new tab'), onChange: value => setAttributes({ @@ -8917,11 +9256,11 @@ function comment_author_name_edit_Edit({ if (!commentId || !displayName) { displayName = (0,external_wp_i18n_namespaceObject._x)('Comment Author', 'block title'); } - const displayAuthor = isLink ? (0,external_wp_element_namespaceObject.createElement)("a", { + const displayAuthor = isLink ? (0,external_React_namespaceObject.createElement)("a", { href: "#comment-author-pseudo-link", onClick: event => event.preventDefault() }, displayName) : displayName; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, inspectorControls, blockControls, (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, inspectorControls, blockControls, (0,external_React_namespaceObject.createElement)("div", { ...blockProps }, displayAuthor)); } @@ -8977,7 +9316,7 @@ const deprecated_v1 = { * * See block-deprecation.md */ -/* harmony default export */ var comment_author_name_deprecated = ([deprecated_v1]); +/* harmony default export */ const comment_author_name_deprecated = ([deprecated_v1]); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comment-author-name/index.js /** @@ -9039,6 +9378,9 @@ const comment_author_name_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } } }; @@ -9065,15 +9407,15 @@ const comment_author_name_init = () => initBlock({ * WordPress dependencies */ -const commentContent = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const commentContent = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M6.68822 16.625L5.5 17.8145L5.5 5.5L18.5 5.5L18.5 16.625L6.68822 16.625ZM7.31 18.125L19 18.125C19.5523 18.125 20 17.6773 20 17.125L20 5C20 4.44772 19.5523 4 19 4H5C4.44772 4 4 4.44772 4 5V19.5247C4 19.8173 4.16123 20.086 4.41935 20.2237C4.72711 20.3878 5.10601 20.3313 5.35252 20.0845L7.31 18.125ZM16 9.99997H8V8.49997H16V9.99997ZM8 14H13V12.5H8V14Z" })); -/* harmony default export */ var comment_content = (commentContent); +/* harmony default export */ const comment_content = (commentContent); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comment-content/edit.js @@ -9118,22 +9460,22 @@ function comment_content_edit_Edit({ }) }); const [content] = (0,external_wp_coreData_namespaceObject.useEntityProp)('root', 'comment', 'content', commentId); - const blockControls = (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + const blockControls = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: newAlign => setAttributes({ textAlign: newAlign }) })); if (!commentId || !content) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, blockControls, (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, blockControls, (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject._x)('Comment Content', 'block title')))); + }, (0,external_React_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject._x)('Comment Content', 'block title')))); } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, blockControls, (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, blockControls, (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Disabled, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Disabled, null, (0,external_React_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, { key: "html" }, content.rendered)))); } @@ -9215,18 +9557,18 @@ const comment_content_init = () => initBlock({ * WordPress dependencies */ -const postDate = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const postDate = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M11.696 13.972c.356-.546.599-.958.728-1.235a1.79 1.79 0 00.203-.783c0-.264-.077-.47-.23-.618-.148-.153-.354-.23-.618-.23-.295 0-.569.07-.82.212a3.413 3.413 0 00-.738.571l-.147-1.188c.289-.234.59-.41.903-.526.313-.117.66-.175 1.041-.175.375 0 .695.08.959.24.264.153.46.362.59.626.135.265.203.556.203.876 0 .362-.08.734-.24 1.115-.154.381-.427.87-.82 1.466l-.756 1.152H14v1.106h-4l1.696-2.609z" -}), (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}), (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M19.5 7h-15v12a.5.5 0 00.5.5h14a.5.5 0 00.5-.5V7zM3 7V5a2 2 0 012-2h14a2 2 0 012 2v14a2 2 0 01-2 2H5a2 2 0 01-2-2V7z" })); -/* harmony default export */ var post_date = (postDate); +/* harmony default export */ const post_date = (postDate); ;// CONCATENATED MODULE: external ["wp","date"] -var external_wp_date_namespaceObject = window["wp"]["date"]; +const external_wp_date_namespaceObject = window["wp"]["date"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comment-date/edit.js /** @@ -9264,15 +9606,15 @@ function comment_date_edit_Edit({ const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); let [date] = (0,external_wp_coreData_namespaceObject.useEntityProp)('root', 'comment', 'date', commentId); const [siteFormat = (0,external_wp_date_namespaceObject.getSettings)().formats.date] = (0,external_wp_coreData_namespaceObject.useEntityProp)('root', 'site', 'date_format'); - const inspectorControls = (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + const inspectorControls = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalDateFormatPicker, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalDateFormatPicker, { format: format, defaultFormat: siteFormat, onChange: nextFormat => setAttributes({ format: nextFormat }) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Link to comment'), onChange: () => setAttributes({ @@ -9283,16 +9625,16 @@ function comment_date_edit_Edit({ if (!commentId || !date) { date = (0,external_wp_i18n_namespaceObject._x)('Comment Date', 'block title'); } - let commentDate = date instanceof Date ? (0,external_wp_element_namespaceObject.createElement)("time", { + let commentDate = date instanceof Date ? (0,external_React_namespaceObject.createElement)("time", { dateTime: (0,external_wp_date_namespaceObject.dateI18n)('c', date) - }, (0,external_wp_date_namespaceObject.dateI18n)(format || siteFormat, date)) : (0,external_wp_element_namespaceObject.createElement)("time", null, date); + }, (0,external_wp_date_namespaceObject.dateI18n)(format || siteFormat, date)) : (0,external_React_namespaceObject.createElement)("time", null, date); if (isLink) { - commentDate = (0,external_wp_element_namespaceObject.createElement)("a", { + commentDate = (0,external_React_namespaceObject.createElement)("a", { href: "#comment-date-pseudo-link", onClick: event => event.preventDefault() }, commentDate); } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, inspectorControls, (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, inspectorControls, (0,external_React_namespaceObject.createElement)("div", { ...blockProps }, commentDate)); } @@ -9347,7 +9689,7 @@ const comment_date_deprecated_v1 = { * * See block-deprecation.md */ -/* harmony default export */ var comment_date_deprecated = ([comment_date_deprecated_v1]); +/* harmony default export */ const comment_date_deprecated = ([comment_date_deprecated_v1]); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comment-date/index.js /** @@ -9405,6 +9747,9 @@ const comment_date_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } } }; @@ -9431,15 +9776,15 @@ const comment_date_init = () => initBlock({ * WordPress dependencies */ -const commentEditLink = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const commentEditLink = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "m6.249 11.065.44-.44h3.186l-1.5 1.5H7.31l-1.957 1.96A.792.792 0 0 1 4 13.524V5a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v1.5L12.5 8V5.5h-7v6.315l.749-.75ZM20 19.75H7v-1.5h13v1.5Zm0-12.653-8.967 9.064L8 17l.867-2.935L17.833 5 20 7.097Z" })); -/* harmony default export */ var comment_edit_link = (commentEditLink); +/* harmony default export */ const comment_edit_link = (commentEditLink); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comment-edit-link/edit.js @@ -9466,17 +9811,17 @@ function comment_edit_link_edit_Edit({ [`has-text-align-${textAlign}`]: textAlign }) }); - const blockControls = (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + const blockControls = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: newAlign => setAttributes({ textAlign: newAlign }) })); - const inspectorControls = (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + const inspectorControls = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Open in new tab'), onChange: value => setAttributes({ @@ -9484,9 +9829,9 @@ function comment_edit_link_edit_Edit({ }), checked: linkTarget === '_blank' }))); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, blockControls, inspectorControls, (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, blockControls, inspectorControls, (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)("a", { + }, (0,external_React_namespaceObject.createElement)("a", { href: "#edit-comment-pseudo-link", onClick: event => event.preventDefault() }, (0,external_wp_i18n_namespaceObject.__)('Edit')))); @@ -9548,6 +9893,9 @@ const comment_edit_link_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } } }; @@ -9572,15 +9920,15 @@ const comment_edit_link_init = () => initBlock({ * WordPress dependencies */ -const commentReplyLink = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const commentReplyLink = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M6.68822 10.625L6.24878 11.0649L5.5 11.8145L5.5 5.5L12.5 5.5V8L14 6.5V5C14 4.44772 13.5523 4 13 4H5C4.44772 4 4 4.44771 4 5V13.5247C4 13.8173 4.16123 14.086 4.41935 14.2237C4.72711 14.3878 5.10601 14.3313 5.35252 14.0845L7.31 12.125H8.375L9.875 10.625H7.31H6.68822ZM14.5605 10.4983L11.6701 13.75H16.9975C17.9963 13.75 18.7796 14.1104 19.3553 14.7048C19.9095 15.2771 20.2299 16.0224 20.4224 16.7443C20.7645 18.0276 20.7543 19.4618 20.7487 20.2544C20.7481 20.345 20.7475 20.4272 20.7475 20.4999L19.2475 20.5001C19.2475 20.4191 19.248 20.3319 19.2484 20.2394V20.2394C19.2526 19.4274 19.259 18.2035 18.973 17.1307C18.8156 16.5401 18.586 16.0666 18.2778 15.7483C17.9909 15.4521 17.5991 15.25 16.9975 15.25H11.8106L14.5303 17.9697L13.4696 19.0303L8.96956 14.5303L13.4394 9.50171L14.5605 10.4983Z" })); -/* harmony default export */ var comment_reply_link = (commentReplyLink); +/* harmony default export */ const comment_reply_link = (commentReplyLink); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comment-reply-link/edit.js @@ -9616,22 +9964,22 @@ function comment_reply_link_edit_Edit({ [`has-text-align-${textAlign}`]: textAlign }) }); - const blockControls = (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + const blockControls = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: newAlign => setAttributes({ textAlign: newAlign }) })); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, blockControls, (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, blockControls, (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)("a", { + }, (0,external_React_namespaceObject.createElement)("a", { href: "#comment-reply-pseudo-link", onClick: event => event.preventDefault() }, (0,external_wp_i18n_namespaceObject.__)('Reply')))); } -/* harmony default export */ var comment_reply_link_edit = (comment_reply_link_edit_Edit); +/* harmony default export */ const comment_reply_link_edit = (comment_reply_link_edit_Edit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comment-reply-link/index.js /** @@ -9709,16 +10057,16 @@ const comment_reply_link_init = () => initBlock({ * WordPress dependencies */ -const layout = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const layout = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z" })); -/* harmony default export */ var library_layout = (layout); +/* harmony default export */ const library_layout = (layout); ;// CONCATENATED MODULE: external ["wp","apiFetch"] -var external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"]; +const external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"]; var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comment-template/hooks.js /** @@ -9964,7 +10312,7 @@ const getCommentsPlaceholder = ({ * @param {Array} [props.firstCommentId] - ID of the first comment in the array. * @param {Array} [props.blocks] - Array of blocks returned from * getBlocks() in parent . - * @return {WPElement} Inner blocks of the Comment Template + * @return {Element} Inner blocks of the Comment Template */ function CommentTemplateInnerBlocks({ comment, @@ -9979,14 +10327,14 @@ function CommentTemplateInnerBlocks({ } = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)({}, { template: edit_TEMPLATE }); - return (0,external_wp_element_namespaceObject.createElement)("li", { + return (0,external_React_namespaceObject.createElement)("li", { ...innerBlocksProps - }, comment.commentId === (activeCommentId || firstCommentId) ? children : null, (0,external_wp_element_namespaceObject.createElement)(MemoizedCommentTemplatePreview, { + }, comment.commentId === (activeCommentId || firstCommentId) ? children : null, (0,external_React_namespaceObject.createElement)(MemoizedCommentTemplatePreview, { blocks: blocks, commentId: comment.commentId, setActiveCommentId: setActiveCommentId, isHidden: comment.commentId === (activeCommentId || firstCommentId) - }), comment?.children?.length > 0 ? (0,external_wp_element_namespaceObject.createElement)(CommentsList, { + }), comment?.children?.length > 0 ? (0,external_React_namespaceObject.createElement)(CommentsList, { comments: comment.children, activeCommentId: activeCommentId, setActiveCommentId: setActiveCommentId, @@ -10015,7 +10363,7 @@ const CommentTemplatePreview = ({ const style = { display: isHidden ? 'none' : undefined }; - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockPreviewProps, tabIndex: 0, role: "button", @@ -10039,7 +10387,7 @@ const MemoizedCommentTemplatePreview = (0,external_wp_element_namespaceObject.me * @param {Array} [props.blocks] - Array of blocks returned from getBlocks() in parent. * @param {Object} [props.firstCommentId] - The ID of the first comment in the array of * comment objects. - * @return {WPElement} List of comments. + * @return {Element} List of comments. */ const CommentsList = ({ comments, @@ -10048,12 +10396,12 @@ const CommentsList = ({ setActiveCommentId, blocks, firstCommentId -}) => (0,external_wp_element_namespaceObject.createElement)("ol", { +}) => (0,external_React_namespaceObject.createElement)("ol", { ...blockProps }, comments && comments.map(({ commentId, ...comment -}, index) => (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockContextProvider, { +}, index) => (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockContextProvider, { key: comment.commentId || index, value: { // If the commentId is negative it means that this comment is a @@ -10063,7 +10411,7 @@ const CommentsList = ({ // would be reqested from the REST API. commentId: commentId < 0 ? null : commentId } -}, (0,external_wp_element_namespaceObject.createElement)(CommentTemplateInnerBlocks, { +}, (0,external_React_namespaceObject.createElement)(CommentTemplateInnerBlocks, { comment: { commentId, ...comment @@ -10118,9 +10466,9 @@ function CommentTemplateEdit({ // Reverse the order of top comments if needed. commentOrder === 'desc' && topLevelComments ? [...topLevelComments].reverse() : topLevelComments); if (!topLevelComments) { - return (0,external_wp_element_namespaceObject.createElement)("p", { + return (0,external_React_namespaceObject.createElement)("p", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null)); + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null)); } if (!postId) { commentTree = getCommentsPlaceholder({ @@ -10131,11 +10479,11 @@ function CommentTemplateEdit({ }); } if (!commentTree.length) { - return (0,external_wp_element_namespaceObject.createElement)("p", { + return (0,external_React_namespaceObject.createElement)("p", { ...blockProps }, (0,external_wp_i18n_namespaceObject.__)('No results found.')); } - return (0,external_wp_element_namespaceObject.createElement)(CommentsList, { + return (0,external_React_namespaceObject.createElement)(CommentsList, { comments: commentTree, blockProps: blockProps, blocks: blocks, @@ -10152,7 +10500,7 @@ function CommentTemplateEdit({ */ function CommentTemplateSave() { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comment-template/index.js @@ -10195,6 +10543,9 @@ const comment_template_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } }, style: "wp-block-comment-template" @@ -10222,13 +10573,13 @@ const comment_template_init = () => initBlock({ * WordPress dependencies */ -const queryPaginationPrevious = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const queryPaginationPrevious = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M16 10.5v3h3v-3h-3zm-5 3h3v-3h-3v3zM7 9l-3 3 3 3 1-1-2-2 2-2-1-1z" })); -/* harmony default export */ var query_pagination_previous = (queryPaginationPrevious); +/* harmony default export */ const query_pagination_previous = (queryPaginationPrevious); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments-pagination-previous/edit.js @@ -10252,13 +10603,13 @@ function CommentsPaginationPreviousEdit({ } }) { const displayArrow = arrowMap[paginationArrow]; - return (0,external_wp_element_namespaceObject.createElement)("a", { + return (0,external_React_namespaceObject.createElement)("a", { href: "#comments-pagination-previous-pseudo-link", onClick: event => event.preventDefault(), ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)() - }, displayArrow && (0,external_wp_element_namespaceObject.createElement)("span", { + }, displayArrow && (0,external_React_namespaceObject.createElement)("span", { className: `wp-block-comments-pagination-previous-arrow is-arrow-${paginationArrow}` - }, displayArrow), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.PlainText, { + }, displayArrow), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.PlainText, { __experimentalVersion: 2, tagName: "span", "aria-label": (0,external_wp_i18n_namespaceObject.__)('Older comments page link'), @@ -10317,6 +10668,9 @@ const comments_pagination_previous_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } } }; @@ -10341,13 +10695,13 @@ const comments_pagination_previous_init = () => initBlock({ * WordPress dependencies */ -const queryPagination = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const queryPagination = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M4 13.5h6v-3H4v3zm8 0h3v-3h-3v3zm5-3v3h3v-3h-3z" })); -/* harmony default export */ var query_pagination = (queryPagination); +/* harmony default export */ const query_pagination = (queryPagination); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments-pagination/comments-pagination-arrow-controls.js @@ -10360,20 +10714,20 @@ function CommentsPaginationArrowControls({ value, onChange }) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControl, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Arrow'), value: value, onChange: onChange, help: (0,external_wp_i18n_namespaceObject.__)('A decorative arrow appended to the next and previous comments link.'), isBlock: true - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "none", label: (0,external_wp_i18n_namespaceObject._x)('None', 'Arrow option for Comments Pagination Next/Previous blocks') - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "arrow", label: (0,external_wp_i18n_namespaceObject._x)('Arrow', 'Arrow option for Comments Pagination Next/Previous blocks') - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "chevron", label: (0,external_wp_i18n_namespaceObject._x)('Chevron', 'Arrow option for Comments Pagination Next/Previous blocks') })); @@ -10394,7 +10748,6 @@ function CommentsPaginationArrowControls({ */ const comments_pagination_edit_TEMPLATE = [['core/comments-pagination-previous'], ['core/comments-pagination-numbers'], ['core/comments-pagination-next']]; -const comments_pagination_edit_ALLOWED_BLOCKS = ['core/comments-pagination-previous', 'core/comments-pagination-numbers', 'core/comments-pagination-next']; function QueryPaginationEdit({ attributes: { paginationArrow @@ -10418,8 +10771,7 @@ function QueryPaginationEdit({ }, []); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, { - template: comments_pagination_edit_TEMPLATE, - allowedBlocks: comments_pagination_edit_ALLOWED_BLOCKS + template: comments_pagination_edit_TEMPLATE }); // Get the Discussion settings @@ -10437,18 +10789,18 @@ function QueryPaginationEdit({ // controls. We don't want to remove them from the template so that when the user enables // paging comments, the controls will be visible. if (!pageComments) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Comments Pagination block: paging comments is disabled in the Discussion Settings')); + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Comments Pagination block: paging comments is disabled in the Discussion Settings')); } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, hasNextPreviousBlocks && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, hasNextPreviousBlocks && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(CommentsPaginationArrowControls, { + }, (0,external_React_namespaceObject.createElement)(CommentsPaginationArrowControls, { value: paginationArrow, onChange: value => { setAttributes({ paginationArrow: value }); } - }))), (0,external_wp_element_namespaceObject.createElement)("div", { + }))), (0,external_React_namespaceObject.createElement)("div", { ...innerBlocksProps })); } @@ -10460,7 +10812,7 @@ function QueryPaginationEdit({ */ function comments_pagination_save_save() { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments-pagination/index.js @@ -10480,6 +10832,7 @@ const comments_pagination_metadata = { title: "Comments Pagination", category: "theme", parent: ["core/comments"], + allowedBlocks: ["core/comments-pagination-previous", "core/comments-pagination-numbers", "core/comments-pagination-next"], description: "Displays a paginated navigation to next/previous set of comments, when applicable.", textdomain: "default", attributes: { @@ -10523,6 +10876,9 @@ const comments_pagination_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-comments-pagination-editor", @@ -10551,13 +10907,13 @@ const comments_pagination_init = () => initBlock({ * WordPress dependencies */ -const queryPaginationNext = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const queryPaginationNext = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M5 13.5h3v-3H5v3zm5 0h3v-3h-3v3zM17 9l-1 1 2 2-2 2 1 1 3-3-3-3z" })); -/* harmony default export */ var query_pagination_next = (queryPaginationNext); +/* harmony default export */ const query_pagination_next = (queryPaginationNext); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments-pagination-next/edit.js @@ -10581,11 +10937,11 @@ function CommentsPaginationNextEdit({ } }) { const displayArrow = edit_arrowMap[paginationArrow]; - return (0,external_wp_element_namespaceObject.createElement)("a", { + return (0,external_React_namespaceObject.createElement)("a", { href: "#comments-pagination-next-pseudo-link", onClick: event => event.preventDefault(), ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)() - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.PlainText, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.PlainText, { __experimentalVersion: 2, tagName: "span", "aria-label": (0,external_wp_i18n_namespaceObject.__)('Newer comments page link'), @@ -10594,7 +10950,7 @@ function CommentsPaginationNextEdit({ onChange: newLabel => setAttributes({ label: newLabel }) - }), displayArrow && (0,external_wp_element_namespaceObject.createElement)("span", { + }), displayArrow && (0,external_React_namespaceObject.createElement)("span", { className: `wp-block-comments-pagination-next-arrow is-arrow-${paginationArrow}` }, displayArrow)); } @@ -10646,6 +11002,9 @@ const comments_pagination_next_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } } }; @@ -10670,13 +11029,13 @@ const comments_pagination_next_init = () => initBlock({ * WordPress dependencies */ -const queryPaginationNumbers = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const queryPaginationNumbers = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M4 13.5h6v-3H4v3zm8.2-2.5.8-.3V14h1V9.3l-2.2.7.4 1zm7.1-1.2c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3-.1-.8-.3-1.1z" })); -/* harmony default export */ var query_pagination_numbers = (queryPaginationNumbers); +/* harmony default export */ const query_pagination_numbers = (queryPaginationNumbers); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments-pagination-numbers/edit.js @@ -10688,33 +11047,33 @@ const PaginationItem = ({ content, tag: Tag = 'a', extraClass = '' -}) => Tag === 'a' ? (0,external_wp_element_namespaceObject.createElement)(Tag, { +}) => Tag === 'a' ? (0,external_React_namespaceObject.createElement)(Tag, { className: `page-numbers ${extraClass}`, href: "#comments-pagination-numbers-pseudo-link", onClick: event => event.preventDefault() -}, content) : (0,external_wp_element_namespaceObject.createElement)(Tag, { +}, content) : (0,external_React_namespaceObject.createElement)(Tag, { className: `page-numbers ${extraClass}` }, content); function CommentsPaginationNumbersEdit() { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)() - }, (0,external_wp_element_namespaceObject.createElement)(PaginationItem, { + }, (0,external_React_namespaceObject.createElement)(PaginationItem, { content: "1" - }), (0,external_wp_element_namespaceObject.createElement)(PaginationItem, { + }), (0,external_React_namespaceObject.createElement)(PaginationItem, { content: "2" - }), (0,external_wp_element_namespaceObject.createElement)(PaginationItem, { + }), (0,external_React_namespaceObject.createElement)(PaginationItem, { content: "3", tag: "span", extraClass: "current" - }), (0,external_wp_element_namespaceObject.createElement)(PaginationItem, { + }), (0,external_React_namespaceObject.createElement)(PaginationItem, { content: "4" - }), (0,external_wp_element_namespaceObject.createElement)(PaginationItem, { + }), (0,external_React_namespaceObject.createElement)(PaginationItem, { content: "5" - }), (0,external_wp_element_namespaceObject.createElement)(PaginationItem, { + }), (0,external_React_namespaceObject.createElement)(PaginationItem, { content: "...", tag: "span", extraClass: "dots" - }), (0,external_wp_element_namespaceObject.createElement)(PaginationItem, { + }), (0,external_React_namespaceObject.createElement)(PaginationItem, { content: "8" })); } @@ -10761,6 +11120,9 @@ const comments_pagination_numbers_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } } }; @@ -10785,13 +11147,13 @@ const comments_pagination_numbers_init = () => initBlock({ * WordPress dependencies */ -const title = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const title = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "m4 5.5h2v6.5h1.5v-6.5h2v-1.5h-5.5zm16 10.5h-16v-1.5h16zm-7 4h-9v-1.5h9z" })); -/* harmony default export */ var library_title = (title); +/* harmony default export */ const library_title = (title); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments-title/edit.js @@ -10871,29 +11233,29 @@ function comments_title_edit_Edit({ setCommentsCount(0); }); }, [postId]); - const blockControls = (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + const blockControls = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: newAlign => setAttributes({ textAlign: newAlign }) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.HeadingLevelDropdown, { + }), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.HeadingLevelDropdown, { value: level, onChange: newLevel => setAttributes({ level: newLevel }) })); - const inspectorControls = (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + const inspectorControls = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Show post title'), checked: showPostTitle, onChange: value => setAttributes({ showPostTitle: value }) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Show comments count'), checked: showCommentsCount, @@ -10931,7 +11293,7 @@ function comments_title_edit_Edit({ } else { placeholder = (0,external_wp_i18n_namespaceObject.__)('Responses'); } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, blockControls, inspectorControls, (0,external_wp_element_namespaceObject.createElement)(TagName, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, blockControls, inspectorControls, (0,external_React_namespaceObject.createElement)(TagName, { ...blockProps }, placeholder)); } @@ -10947,7 +11309,7 @@ const deprecated_metadata = { title: "Comments Title", category: "theme", ancestor: ["core/comments"], - description: "Displays a title with the number of comments", + description: "Displays a title with the number of comments.", textdomain: "default", usesContext: ["postId", "postType"], attributes: { @@ -11003,6 +11365,9 @@ const deprecated_metadata = { __experimentalFontStyle: true, __experimentalFontWeight: true } + }, + interactivity: { + clientNavigation: true } } }; @@ -11010,7 +11375,7 @@ const { attributes, supports } = deprecated_metadata; -/* harmony default export */ var comments_title_deprecated = ([{ +/* harmony default export */ const comments_title_deprecated = ([{ attributes: { ...attributes, singleCommentLabel: { @@ -11053,7 +11418,7 @@ const comments_title_metadata = { title: "Comments Title", category: "theme", ancestor: ["core/comments"], - description: "Displays a title with the number of comments", + description: "Displays a title with the number of comments.", textdomain: "default", usesContext: ["postId", "postType"], attributes: { @@ -11109,6 +11474,9 @@ const comments_title_metadata = { __experimentalFontStyle: true, __experimentalFontWeight: true } + }, + interactivity: { + clientNavigation: true } } }; @@ -11135,543 +11503,19 @@ const comments_title_init = () => initBlock({ * WordPress dependencies */ -const cover = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const cover = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h6.2v8.9l2.5-3.1 2.5 3.1V4.5h2.2c.4 0 .8.4.8.8v13.4z" })); -/* harmony default export */ var library_cover = (cover); - -;// CONCATENATED MODULE: ./node_modules/fast-average-color/dist/index.esm.js -/*! Fast Average Color | © 2022 Denis Seleznev | MIT License | https://github.com/fast-average-color/fast-average-color */ -function toHex(num) { - var str = num.toString(16); - return str.length === 1 ? '0' + str : str; -} -function arrayToHex(arr) { - return '#' + arr.map(toHex).join(''); -} -function isDark(color) { - // http://www.w3.org/TR/AERT#color-contrast - var result = (color[0] * 299 + color[1] * 587 + color[2] * 114) / 1000; - return result < 128; -} -function prepareIgnoredColor(color) { - if (!color) { - return []; - } - return isRGBArray(color) ? color : [color]; -} -function isRGBArray(value) { - return Array.isArray(value[0]); -} -function isIgnoredColor(data, index, ignoredColor) { - for (var i = 0; i < ignoredColor.length; i++) { - if (isIgnoredColorAsNumbers(data, index, ignoredColor[i])) { - return true; - } - } - return false; -} -function isIgnoredColorAsNumbers(data, index, ignoredColor) { - switch (ignoredColor.length) { - case 3: - // [red, green, blue] - if (isIgnoredRGBColor(data, index, ignoredColor)) { - return true; - } - break; - case 4: - // [red, green, blue, alpha] - if (isIgnoredRGBAColor(data, index, ignoredColor)) { - return true; - } - break; - case 5: - // [red, green, blue, alpha, threshold] - if (isIgnoredRGBAColorWithThreshold(data, index, ignoredColor)) { - return true; - } - break; - default: - return false; - } -} -function isIgnoredRGBColor(data, index, ignoredColor) { - // Ignore if the pixel are transparent. - if (data[index + 3] !== 255) { - return true; - } - if (data[index] === ignoredColor[0] && - data[index + 1] === ignoredColor[1] && - data[index + 2] === ignoredColor[2]) { - return true; - } - return false; -} -function isIgnoredRGBAColor(data, index, ignoredColor) { - if (data[index + 3] && ignoredColor[3]) { - return data[index] === ignoredColor[0] && - data[index + 1] === ignoredColor[1] && - data[index + 2] === ignoredColor[2] && - data[index + 3] === ignoredColor[3]; - } - // Ignore rgb components if the pixel are fully transparent. - return data[index + 3] === ignoredColor[3]; -} -function inRange(colorComponent, ignoredColorComponent, value) { - return colorComponent >= (ignoredColorComponent - value) && - colorComponent <= (ignoredColorComponent + value); -} -function isIgnoredRGBAColorWithThreshold(data, index, ignoredColor) { - var redIgnored = ignoredColor[0]; - var greenIgnored = ignoredColor[1]; - var blueIgnored = ignoredColor[2]; - var alphaIgnored = ignoredColor[3]; - var threshold = ignoredColor[4]; - var alphaData = data[index + 3]; - var alphaInRange = inRange(alphaData, alphaIgnored, threshold); - if (!alphaIgnored) { - return alphaInRange; - } - if (!alphaData && alphaInRange) { - return true; - } - if (inRange(data[index], redIgnored, threshold) && - inRange(data[index + 1], greenIgnored, threshold) && - inRange(data[index + 2], blueIgnored, threshold) && - alphaInRange) { - return true; - } - return false; -} - -function dominantAlgorithm(arr, len, options) { - var colorHash = {}; - var divider = 24; - var ignoredColor = options.ignoredColor; - var step = options.step; - var max = [0, 0, 0, 0, 0]; - for (var i = 0; i < len; i += step) { - var red = arr[i]; - var green = arr[i + 1]; - var blue = arr[i + 2]; - var alpha = arr[i + 3]; - if (ignoredColor && isIgnoredColor(arr, i, ignoredColor)) { - continue; - } - var key = Math.round(red / divider) + ',' + - Math.round(green / divider) + ',' + - Math.round(blue / divider); - if (colorHash[key]) { - colorHash[key] = [ - colorHash[key][0] + red * alpha, - colorHash[key][1] + green * alpha, - colorHash[key][2] + blue * alpha, - colorHash[key][3] + alpha, - colorHash[key][4] + 1 - ]; - } - else { - colorHash[key] = [red * alpha, green * alpha, blue * alpha, alpha, 1]; - } - if (max[4] < colorHash[key][4]) { - max = colorHash[key]; - } - } - var redTotal = max[0]; - var greenTotal = max[1]; - var blueTotal = max[2]; - var alphaTotal = max[3]; - var count = max[4]; - return alphaTotal ? [ - Math.round(redTotal / alphaTotal), - Math.round(greenTotal / alphaTotal), - Math.round(blueTotal / alphaTotal), - Math.round(alphaTotal / count) - ] : options.defaultColor; -} - -function simpleAlgorithm(arr, len, options) { - var redTotal = 0; - var greenTotal = 0; - var blueTotal = 0; - var alphaTotal = 0; - var count = 0; - var ignoredColor = options.ignoredColor; - var step = options.step; - for (var i = 0; i < len; i += step) { - var alpha = arr[i + 3]; - var red = arr[i] * alpha; - var green = arr[i + 1] * alpha; - var blue = arr[i + 2] * alpha; - if (ignoredColor && isIgnoredColor(arr, i, ignoredColor)) { - continue; - } - redTotal += red; - greenTotal += green; - blueTotal += blue; - alphaTotal += alpha; - count++; - } - return alphaTotal ? [ - Math.round(redTotal / alphaTotal), - Math.round(greenTotal / alphaTotal), - Math.round(blueTotal / alphaTotal), - Math.round(alphaTotal / count) - ] : options.defaultColor; -} - -function sqrtAlgorithm(arr, len, options) { - var redTotal = 0; - var greenTotal = 0; - var blueTotal = 0; - var alphaTotal = 0; - var count = 0; - var ignoredColor = options.ignoredColor; - var step = options.step; - for (var i = 0; i < len; i += step) { - var red = arr[i]; - var green = arr[i + 1]; - var blue = arr[i + 2]; - var alpha = arr[i + 3]; - if (ignoredColor && isIgnoredColor(arr, i, ignoredColor)) { - continue; - } - redTotal += red * red * alpha; - greenTotal += green * green * alpha; - blueTotal += blue * blue * alpha; - alphaTotal += alpha; - count++; - } - return alphaTotal ? [ - Math.round(Math.sqrt(redTotal / alphaTotal)), - Math.round(Math.sqrt(greenTotal / alphaTotal)), - Math.round(Math.sqrt(blueTotal / alphaTotal)), - Math.round(alphaTotal / count) - ] : options.defaultColor; -} - -function getDefaultColor(options) { - return getOption(options, 'defaultColor', [0, 0, 0, 0]); -} -function getOption(options, name, defaultValue) { - return (options[name] === undefined ? defaultValue : options[name]); -} +/* harmony default export */ const library_cover = (cover); -var MIN_SIZE = 10; -var MAX_SIZE = 100; -function isSvg(filename) { - return filename.search(/\.svg(\?|$)/i) !== -1; -} -function getOriginalSize(resource) { - if (isInstanceOfHTMLImageElement(resource)) { - var width = resource.naturalWidth; - var height = resource.naturalHeight; - // For SVG images with only viewBox attribute - if (!resource.naturalWidth && isSvg(resource.src)) { - width = height = MAX_SIZE; - } - return { - width: width, - height: height, - }; - } - if (isInstanceOfHTMLVideoElement(resource)) { - return { - width: resource.videoWidth, - height: resource.videoHeight - }; - } - return { - width: resource.width, - height: resource.height - }; -} -function getSrc(resource) { - if (isInstanceOfHTMLCanvasElement(resource)) { - return 'canvas'; - } - if (isInstanceOfOffscreenCanvas(resource)) { - return 'offscreencanvas'; - } - if (isInstanceOfImageBitmap(resource)) { - return 'imagebitmap'; - } - return resource.src; -} -function isInstanceOfHTMLImageElement(resource) { - return typeof HTMLImageElement !== 'undefined' && resource instanceof HTMLImageElement; -} -var hasOffscreenCanvas = typeof OffscreenCanvas !== 'undefined'; -function isInstanceOfOffscreenCanvas(resource) { - return hasOffscreenCanvas && resource instanceof OffscreenCanvas; -} -function isInstanceOfHTMLVideoElement(resource) { - return typeof HTMLVideoElement !== 'undefined' && resource instanceof HTMLVideoElement; -} -function isInstanceOfHTMLCanvasElement(resource) { - return typeof HTMLCanvasElement !== 'undefined' && resource instanceof HTMLCanvasElement; -} -function isInstanceOfImageBitmap(resource) { - return typeof ImageBitmap !== 'undefined' && resource instanceof ImageBitmap; -} -function prepareSizeAndPosition(originalSize, options) { - var srcLeft = getOption(options, 'left', 0); - var srcTop = getOption(options, 'top', 0); - var srcWidth = getOption(options, 'width', originalSize.width); - var srcHeight = getOption(options, 'height', originalSize.height); - var destWidth = srcWidth; - var destHeight = srcHeight; - if (options.mode === 'precision') { - return { - srcLeft: srcLeft, - srcTop: srcTop, - srcWidth: srcWidth, - srcHeight: srcHeight, - destWidth: destWidth, - destHeight: destHeight - }; - } - var factor; - if (srcWidth > srcHeight) { - factor = srcWidth / srcHeight; - destWidth = MAX_SIZE; - destHeight = Math.round(destWidth / factor); - } - else { - factor = srcHeight / srcWidth; - destHeight = MAX_SIZE; - destWidth = Math.round(destHeight / factor); - } - if (destWidth > srcWidth || destHeight > srcHeight || - destWidth < MIN_SIZE || destHeight < MIN_SIZE) { - destWidth = srcWidth; - destHeight = srcHeight; - } - return { - srcLeft: srcLeft, - srcTop: srcTop, - srcWidth: srcWidth, - srcHeight: srcHeight, - destWidth: destWidth, - destHeight: destHeight - }; -} -var isWebWorkers = typeof window === 'undefined'; -function makeCanvas() { - if (isWebWorkers) { - return hasOffscreenCanvas ? new OffscreenCanvas(1, 1) : null; - } - return document.createElement('canvas'); -} - -var ERROR_PREFIX = 'FastAverageColor: '; -function getError(message) { - return Error(ERROR_PREFIX + message); -} -function outputError(error, silent) { - if (!silent) { - console.error(error); - } -} - -var FastAverageColor = /** @class */ (function () { - function FastAverageColor() { - this.canvas = null; - this.ctx = null; - } - /** - * Get asynchronously the average color from not loaded image. - */ - FastAverageColor.prototype.getColorAsync = function (resource, options) { - if (!resource) { - return Promise.reject(getError('call .getColorAsync() without resource.')); - } - if (typeof resource === 'string') { - // Web workers - if (typeof Image === 'undefined') { - return Promise.reject(getError('resource as string is not supported in this environment')); - } - var img = new Image(); - img.crossOrigin = options && options.crossOrigin || ''; - img.src = resource; - return this.bindImageEvents(img, options); - } - else if (isInstanceOfHTMLImageElement(resource) && !resource.complete) { - return this.bindImageEvents(resource, options); - } - else { - var result = this.getColor(resource, options); - return result.error ? Promise.reject(result.error) : Promise.resolve(result); - } - }; - /** - * Get the average color from images, videos and canvas. - */ - FastAverageColor.prototype.getColor = function (resource, options) { - options = options || {}; - var defaultColor = getDefaultColor(options); - if (!resource) { - var error = getError('call .getColor(null) without resource'); - outputError(error, options.silent); - return this.prepareResult(defaultColor, error); - } - var originalSize = getOriginalSize(resource); - var size = prepareSizeAndPosition(originalSize, options); - if (!size.srcWidth || !size.srcHeight || !size.destWidth || !size.destHeight) { - var error = getError("incorrect sizes for resource \"".concat(getSrc(resource), "\"")); - outputError(error, options.silent); - return this.prepareResult(defaultColor, error); - } - if (!this.canvas) { - this.canvas = makeCanvas(); - if (!this.canvas) { - var error = getError('OffscreenCanvas is not supported in this browser'); - outputError(error, options.silent); - return this.prepareResult(defaultColor, error); - } - } - if (!this.ctx) { - this.ctx = this.canvas.getContext('2d', { willReadFrequently: true }); - if (!this.ctx) { - var error = getError('Canvas Context 2D is not supported in this browser'); - outputError(error, options.silent); - return this.prepareResult(defaultColor); - } - this.ctx.imageSmoothingEnabled = false; - } - this.canvas.width = size.destWidth; - this.canvas.height = size.destHeight; - try { - this.ctx.clearRect(0, 0, size.destWidth, size.destHeight); - this.ctx.drawImage(resource, size.srcLeft, size.srcTop, size.srcWidth, size.srcHeight, 0, 0, size.destWidth, size.destHeight); - var bitmapData = this.ctx.getImageData(0, 0, size.destWidth, size.destHeight).data; - return this.prepareResult(this.getColorFromArray4(bitmapData, options)); - } - catch (originalError) { - var error = getError("security error (CORS) for resource ".concat(getSrc(resource), ".\nDetails: https://developer.mozilla.org/en/docs/Web/HTML/CORS_enabled_image")); - outputError(error, options.silent); - !options.silent && console.error(originalError); - return this.prepareResult(defaultColor, error); - } - }; - /** - * Get the average color from a array when 1 pixel is 4 bytes. - */ - FastAverageColor.prototype.getColorFromArray4 = function (arr, options) { - options = options || {}; - var bytesPerPixel = 4; - var arrLength = arr.length; - var defaultColor = getDefaultColor(options); - if (arrLength < bytesPerPixel) { - return defaultColor; - } - var len = arrLength - arrLength % bytesPerPixel; - var step = (options.step || 1) * bytesPerPixel; - var algorithm; - switch (options.algorithm || 'sqrt') { - case 'simple': - algorithm = simpleAlgorithm; - break; - case 'sqrt': - algorithm = sqrtAlgorithm; - break; - case 'dominant': - algorithm = dominantAlgorithm; - break; - default: - throw getError("".concat(options.algorithm, " is unknown algorithm")); - } - return algorithm(arr, len, { - defaultColor: defaultColor, - ignoredColor: prepareIgnoredColor(options.ignoredColor), - step: step - }); - }; - /** - * Get color data from value ([r, g, b, a]). - */ - FastAverageColor.prototype.prepareResult = function (value, error) { - var rgb = value.slice(0, 3); - var rgba = [value[0], value[1], value[2], value[3] / 255]; - var isDarkColor = isDark(value); - return { - value: [value[0], value[1], value[2], value[3]], - rgb: 'rgb(' + rgb.join(',') + ')', - rgba: 'rgba(' + rgba.join(',') + ')', - hex: arrayToHex(rgb), - hexa: arrayToHex(value), - isDark: isDarkColor, - isLight: !isDarkColor, - error: error, - }; - }; - /** - * Destroy the instance. - */ - FastAverageColor.prototype.destroy = function () { - if (this.canvas) { - this.canvas.width = 1; - this.canvas.height = 1; - this.canvas = null; - } - this.ctx = null; - }; - FastAverageColor.prototype.bindImageEvents = function (resource, options) { - var _this = this; - return new Promise(function (resolve, reject) { - var onload = function () { - unbindEvents(); - var result = _this.getColor(resource, options); - if (result.error) { - reject(result.error); - } - else { - resolve(result); - } - }; - var onerror = function () { - unbindEvents(); - reject(getError("Error loading image \"".concat(resource.src, "\"."))); - }; - var onabort = function () { - unbindEvents(); - reject(getError("Image \"".concat(resource.src, "\" loading aborted"))); - }; - var unbindEvents = function () { - resource.removeEventListener('load', onload); - resource.removeEventListener('error', onerror); - resource.removeEventListener('abort', onabort); - }; - resource.addEventListener('load', onload); - resource.addEventListener('error', onerror); - resource.addEventListener('abort', onabort); - }); - }; - return FastAverageColor; -}()); - - - -;// CONCATENATED MODULE: ./node_modules/colord/index.mjs -var r={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},n=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*r)/n+0},e=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),r>n?n:r>t?r:t},u=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},a=function(r){return{r:e(r.r,0,255),g:e(r.g,0,255),b:e(r.b,0,255),a:e(r.a)}},o=function(r){return{r:n(r.r),g:n(r.g),b:n(r.b),a:n(r.a,3)}},i=/^#([0-9a-f]{3,8})$/i,s=function(r){var t=r.toString(16);return t.length<2?"0"+t:t},h=function(r){var t=r.r,n=r.g,e=r.b,u=r.a,a=Math.max(t,n,e),o=a-Math.min(t,n,e),i=o?a===t?(n-e)/o:a===n?2+(e-t)/o:4+(t-n)/o:0;return{h:60*(i<0?i+6:i),s:a?o/a*100:0,v:a/255*100,a:u}},b=function(r){var t=r.h,n=r.s,e=r.v,u=r.a;t=t/360*6,n/=100,e/=100;var a=Math.floor(t),o=e*(1-n),i=e*(1-(t-a)*n),s=e*(1-(1-t+a)*n),h=a%6;return{r:255*[e,i,o,o,s,e][h],g:255*[s,e,e,i,o,o][h],b:255*[o,o,s,e,e,i][h],a:u}},g=function(r){return{h:u(r.h),s:e(r.s,0,100),l:e(r.l,0,100),a:e(r.a)}},d=function(r){return{h:n(r.h),s:n(r.s),l:n(r.l),a:n(r.a,3)}},f=function(r){return b((n=(t=r).s,{h:t.h,s:(n*=((e=t.l)<50?e:100-e)/100)>0?2*n/(e+n)*100:0,v:e+n,a:t.a}));var t,n,e},c=function(r){return{h:(t=h(r)).h,s:(u=(200-(n=t.s))*(e=t.v)/100)>0&&u<200?n*e/100/(u<=100?u:200-u)*100:0,l:u/2,a:t.a};var t,n,e,u},l=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,p=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,v=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,m=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y={string:[[function(r){var t=i.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:4===r.length?n(parseInt(r[3]+r[3],16)/255,2):1}:6===r.length||8===r.length?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:8===r.length?n(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var t=v.exec(r)||m.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:a({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(t){var n=l.exec(t)||p.exec(t);if(!n)return null;var e,u,a=g({h:(e=n[1],u=n[2],void 0===u&&(u="deg"),Number(e)*(r[u]||1)),s:Number(n[3]),l:Number(n[4]),a:void 0===n[5]?1:Number(n[5])/(n[6]?100:1)});return f(a)},"hsl"]],object:[[function(r){var n=r.r,e=r.g,u=r.b,o=r.a,i=void 0===o?1:o;return t(n)&&t(e)&&t(u)?a({r:Number(n),g:Number(e),b:Number(u),a:Number(i)}):null},"rgb"],[function(r){var n=r.h,e=r.s,u=r.l,a=r.a,o=void 0===a?1:a;if(!t(n)||!t(e)||!t(u))return null;var i=g({h:Number(n),s:Number(e),l:Number(u),a:Number(o)});return f(i)},"hsl"],[function(r){var n=r.h,a=r.s,o=r.v,i=r.a,s=void 0===i?1:i;if(!t(n)||!t(a)||!t(o))return null;var h=function(r){return{h:u(r.h),s:e(r.s,0,100),v:e(r.v,0,100),a:e(r.a)}}({h:Number(n),s:Number(a),v:Number(o),a:Number(s)});return b(h)},"hsv"]]},N=function(r,t){for(var n=0;n<t.length;n++){var e=t[n][0](r);if(e)return[e,t[n][1]]}return[null,void 0]},x=function(r){return"string"==typeof r?N(r.trim(),y.string):"object"==typeof r&&null!==r?N(r,y.object):[null,void 0]},I=function(r){return x(r)[1]},M=function(r,t){var n=c(r);return{h:n.h,s:e(n.s+100*t,0,100),l:n.l,a:n.a}},H=function(r){return(299*r.r+587*r.g+114*r.b)/1e3/255},$=function(r,t){var n=c(r);return{h:n.h,s:n.s,l:e(n.l+100*t,0,100),a:n.a}},j=function(){function r(r){this.parsed=x(r)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return r.prototype.isValid=function(){return null!==this.parsed},r.prototype.brightness=function(){return n(H(this.rgba),2)},r.prototype.isDark=function(){return H(this.rgba)<.5},r.prototype.isLight=function(){return H(this.rgba)>=.5},r.prototype.toHex=function(){return r=o(this.rgba),t=r.r,e=r.g,u=r.b,i=(a=r.a)<1?s(n(255*a)):"","#"+s(t)+s(e)+s(u)+i;var r,t,e,u,a,i},r.prototype.toRgb=function(){return o(this.rgba)},r.prototype.toRgbString=function(){return r=o(this.rgba),t=r.r,n=r.g,e=r.b,(u=r.a)<1?"rgba("+t+", "+n+", "+e+", "+u+")":"rgb("+t+", "+n+", "+e+")";var r,t,n,e,u},r.prototype.toHsl=function(){return d(c(this.rgba))},r.prototype.toHslString=function(){return r=d(c(this.rgba)),t=r.h,n=r.s,e=r.l,(u=r.a)<1?"hsla("+t+", "+n+"%, "+e+"%, "+u+")":"hsl("+t+", "+n+"%, "+e+"%)";var r,t,n,e,u},r.prototype.toHsv=function(){return r=h(this.rgba),{h:n(r.h),s:n(r.s),v:n(r.v),a:n(r.a,3)};var r},r.prototype.invert=function(){return w({r:255-(r=this.rgba).r,g:255-r.g,b:255-r.b,a:r.a});var r},r.prototype.saturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,r))},r.prototype.desaturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,-r))},r.prototype.grayscale=function(){return w(M(this.rgba,-1))},r.prototype.lighten=function(r){return void 0===r&&(r=.1),w($(this.rgba,r))},r.prototype.darken=function(r){return void 0===r&&(r=.1),w($(this.rgba,-r))},r.prototype.rotate=function(r){return void 0===r&&(r=15),this.hue(this.hue()+r)},r.prototype.alpha=function(r){return"number"==typeof r?w({r:(t=this.rgba).r,g:t.g,b:t.b,a:r}):n(this.rgba.a,3);var t},r.prototype.hue=function(r){var t=c(this.rgba);return"number"==typeof r?w({h:r,s:t.s,l:t.l,a:t.a}):n(t.h)},r.prototype.isEqual=function(r){return this.toHex()===w(r).toHex()},r}(),w=function(r){return r instanceof j?r:new j(r)},S=[],k=function(r){r.forEach(function(r){S.indexOf(r)<0&&(r(j,y),S.push(r))})},E=function(){return new j({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})}; - -;// CONCATENATED MODULE: external ["wp","hooks"] -var external_wp_hooks_namespaceObject = window["wp"]["hooks"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/shared.js /** - * External dependencies - */ - - - -/** * WordPress dependencies */ - const POSITION_CLASSNAMES = { 'top left': 'is-position-top-left', 'top center': 'is-position-top-center', @@ -11701,50 +11545,43 @@ function mediaPosition({ return `${Math.round(x * 100)}% ${Math.round(y * 100)}%`; } function dimRatioToClass(ratio) { - return ratio === 50 || !ratio === undefined ? null : 'has-background-dim-' + 10 * Math.round(ratio / 10); + return ratio === 50 || ratio === undefined ? null : 'has-background-dim-' + 10 * Math.round(ratio / 10); } -function attributesFromMedia(setAttributes, dimRatio) { - return (media, isDark) => { - if (!media || !media.url) { - setAttributes({ - url: undefined, - id: undefined, - isDark - }); - return; - } - if ((0,external_wp_blob_namespaceObject.isBlobURL)(media.url)) { - media.type = (0,external_wp_blob_namespaceObject.getBlobTypeByURL)(media.url); - } - let mediaType; - // For media selections originated from a file upload. - if (media.media_type) { - if (media.media_type === IMAGE_BACKGROUND_TYPE) { - mediaType = IMAGE_BACKGROUND_TYPE; - } else { - // only images and videos are accepted so if the media_type is not an image we can assume it is a video. - // Videos contain the media type of 'file' in the object returned from the rest api. - mediaType = VIDEO_BACKGROUND_TYPE; - } +function attributesFromMedia(media) { + if (!media || !media.url) { + return { + url: undefined, + id: undefined + }; + } + if ((0,external_wp_blob_namespaceObject.isBlobURL)(media.url)) { + media.type = (0,external_wp_blob_namespaceObject.getBlobTypeByURL)(media.url); + } + let mediaType; + // For media selections originated from a file upload. + if (media.media_type) { + if (media.media_type === IMAGE_BACKGROUND_TYPE) { + mediaType = IMAGE_BACKGROUND_TYPE; } else { - // For media selections originated from existing files in the media library. - if (media.type !== IMAGE_BACKGROUND_TYPE && media.type !== VIDEO_BACKGROUND_TYPE) { - return; - } - mediaType = media.type; + // only images and videos are accepted so if the media_type is not an image we can assume it is a video. + // Videos contain the media type of 'file' in the object returned from the rest api. + mediaType = VIDEO_BACKGROUND_TYPE; } - setAttributes({ - isDark, - dimRatio: dimRatio === 100 ? 50 : dimRatio, - url: media.url, - id: media.id, - alt: media?.alt, - backgroundType: mediaType, - focalPoint: undefined, - ...(mediaType === VIDEO_BACKGROUND_TYPE ? { - hasParallax: undefined - } : {}) - }); + } else { + // For media selections originated from existing files in the media library. + if (media.type !== IMAGE_BACKGROUND_TYPE && media.type !== VIDEO_BACKGROUND_TYPE) { + return; + } + mediaType = media.type; + } + return { + url: media.url, + id: media.id, + alt: media?.alt, + backgroundType: mediaType, + ...(mediaType === VIDEO_BACKGROUND_TYPE ? { + hasParallax: undefined + } : {}) }; } @@ -11773,91 +11610,6 @@ function getPositionClassName(contentPosition) { return POSITION_CLASSNAMES[contentPosition]; } -/** - * Performs a Porter Duff composite source over operation on two rgba colors. - * - * @see https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_srcover - * - * @param {import('colord').RgbaColor} source Source color. - * @param {import('colord').RgbaColor} dest Destination color. - * @return {import('colord').RgbaColor} Composite color. - */ -function compositeSourceOver(source, dest) { - return { - r: source.r * source.a + dest.r * dest.a * (1 - source.a), - g: source.g * source.a + dest.g * dest.a * (1 - source.a), - b: source.b * source.a + dest.b * dest.a * (1 - source.a), - a: source.a + dest.a * (1 - source.a) - }; -} -function retrieveFastAverageColor() { - if (!retrieveFastAverageColor.fastAverageColor) { - retrieveFastAverageColor.fastAverageColor = new FastAverageColor(); - } - return retrieveFastAverageColor.fastAverageColor; -} - -/** - * This method evaluates if the cover block's background is dark or not and this boolean - * can then be applied to the relevant attribute to help ensure that text is visible by default. - * This needs to be recalculated in all of the following Cover block scenarios: - * - When an overlay image is added, changed or removed - * - When the featured image is selected as the overlay image, or removed from the overlay - * - When the overlay color is changed - * - When the overlay color is removed - * - When the dimRatio is changed - * - * See the comments below for more details about which aspects take priority when - * calculating the relative darkness of the Cover. - * - * @param {string} url - * @param {number} dimRatio - * @param {string} overlayColor - * @return {Promise<boolean>} True if cover should be considered to be dark. - */ -async function getCoverIsDark(url, dimRatio = 50, overlayColor) { - const overlay = w(overlayColor).alpha(dimRatio / 100).toRgb(); - if (url) { - try { - const imgCrossOrigin = (0,external_wp_hooks_namespaceObject.applyFilters)('media.crossOrigin', undefined, url); - const { - value: [r, g, b, a] - } = await retrieveFastAverageColor().getColorAsync(url, { - // Previously the default color was white, but that changed - // in v6.0.0 so it has to be manually set now. - defaultColor: [255, 255, 255, 255], - // Errors that come up don't reject the promise, so error - // logging has to be silenced with this option. - silent: "production" === 'production', - crossOrigin: imgCrossOrigin - }); - // FAC uses 0-255 for alpha, but colord expects 0-1. - const media = { - r, - g, - b, - a: a / 255 - }; - const composite = compositeSourceOver(overlay, media); - return w(composite).isDark(); - } catch (error) { - // If there's an error, just assume the image is dark. - return true; - } - } - - // Assume a white background because it isn't easy to get the actual - // parent background color. - const background = { - r: 255, - g: 255, - b: 255, - a: 1 - }; - const composite = compositeSourceOver(overlay, background); - return w(composite).isDark(); -} - ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/deprecated.js /** @@ -11940,7 +11692,7 @@ const deprecated_blockAttributes = { type: 'object' } }; -const v8ToV10BlockAttributes = { +const v8ToV11BlockAttributes = { url: { type: 'string' }, @@ -12006,7 +11758,18 @@ const v8ToV10BlockAttributes = { enum: ['all', 'insert', false] } }; -const v7toV10BlockSupports = { +const v12BlockAttributes = { + ...v8ToV11BlockAttributes, + useFeaturedImage: { + type: 'boolean', + default: false + }, + tagName: { + type: 'string', + default: 'div' + } +}; +const v7toV11BlockSupports = { anchor: true, align: true, html: false, @@ -12022,11 +11785,286 @@ const v7toV10BlockSupports = { background: false } }; +const v12BlockSupports = { + ...v7toV11BlockSupports, + spacing: { + padding: true, + margin: ['top', 'bottom'], + blockGap: true, + __experimentalDefaultControls: { + padding: true, + blockGap: true + } + }, + __experimentalBorder: { + color: true, + radius: true, + style: true, + width: true, + __experimentalDefaultControls: { + color: true, + radius: true, + style: true, + width: true + } + }, + color: { + __experimentalDuotone: '> .wp-block-cover__image-background, > .wp-block-cover__video-background', + heading: true, + text: true, + background: false, + __experimentalSkipSerialization: ['gradients'], + enableContrastChecker: false + }, + typography: { + fontSize: true, + lineHeight: true, + __experimentalFontFamily: true, + __experimentalFontWeight: true, + __experimentalFontStyle: true, + __experimentalTextTransform: true, + __experimentalTextDecoration: true, + __experimentalLetterSpacing: true, + __experimentalDefaultControls: { + fontSize: true + } + }, + layout: { + allowJustification: false + } +}; + +// Deprecation for blocks that does not have the aria-label when the image background is fixed or repeated. +const v13 = { + attributes: v12BlockAttributes, + supports: v12BlockSupports, + save({ + attributes + }) { + const { + backgroundType, + gradient, + contentPosition, + customGradient, + customOverlayColor, + dimRatio, + focalPoint, + useFeaturedImage, + hasParallax, + isDark, + isRepeated, + overlayColor, + url, + alt, + id, + minHeight: minHeightProp, + minHeightUnit, + tagName: Tag + } = attributes; + const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('background-color', overlayColor); + const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient); + const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp; + const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType; + const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType; + const isImgElement = !(hasParallax || isRepeated); + const style = { + minHeight: minHeight || undefined + }; + const bgStyle = { + backgroundColor: !overlayColorClass ? customOverlayColor : undefined, + background: customGradient ? customGradient : undefined + }; + const objectPosition = + // prettier-ignore + focalPoint && isImgElement ? mediaPosition(focalPoint) : undefined; + const backgroundImage = url ? `url(${url})` : undefined; + const backgroundPosition = mediaPosition(focalPoint); + const classes = classnames_default()({ + 'is-light': !isDark, + 'has-parallax': hasParallax, + 'is-repeated': isRepeated, + 'has-custom-content-position': !isContentPositionCenter(contentPosition) + }, getPositionClassName(contentPosition)); + const imgClasses = classnames_default()('wp-block-cover__image-background', id ? `wp-image-${id}` : null, { + 'has-parallax': hasParallax, + 'is-repeated': isRepeated + }); + const gradientValue = gradient || customGradient; + return (0,external_React_namespaceObject.createElement)(Tag, { + ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ + className: classes, + style + }) + }, (0,external_React_namespaceObject.createElement)("span", { + "aria-hidden": "true", + className: classnames_default()('wp-block-cover__background', overlayColorClass, dimRatioToClass(dimRatio), { + 'has-background-dim': dimRatio !== undefined, + // For backwards compatibility. Former versions of the Cover Block applied + // `.wp-block-cover__gradient-background` in the presence of + // media, a gradient and a dim. + 'wp-block-cover__gradient-background': url && gradientValue && dimRatio !== 0, + 'has-background-gradient': gradientValue, + [gradientClass]: gradientClass + }), + style: bgStyle + }), !useFeaturedImage && isImageBackground && url && (isImgElement ? (0,external_React_namespaceObject.createElement)("img", { + className: imgClasses, + alt: alt, + src: url, + style: { + objectPosition + }, + "data-object-fit": "cover", + "data-object-position": objectPosition + }) : (0,external_React_namespaceObject.createElement)("div", { + role: "img", + className: imgClasses, + style: { + backgroundPosition, + backgroundImage + } + })), isVideoBackground && url && (0,external_React_namespaceObject.createElement)("video", { + className: classnames_default()('wp-block-cover__video-background', 'intrinsic-ignore'), + autoPlay: true, + muted: true, + loop: true, + playsInline: true, + src: url, + style: { + objectPosition + }, + "data-object-fit": "cover", + "data-object-position": objectPosition + }), (0,external_React_namespaceObject.createElement)("div", { + ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({ + className: 'wp-block-cover__inner-container' + }) + })); + } +}; + +// Deprecation for blocks to prevent auto overlay color from overriding previously set values. +const v12 = { + attributes: v12BlockAttributes, + supports: v12BlockSupports, + isEligible(attributes) { + return attributes.customOverlayColor !== undefined || attributes.overlayColor !== undefined; + }, + migrate(attributes) { + return { + ...attributes, + isUserOverlayColor: true + }; + }, + save({ + attributes + }) { + const { + backgroundType, + gradient, + contentPosition, + customGradient, + customOverlayColor, + dimRatio, + focalPoint, + useFeaturedImage, + hasParallax, + isDark, + isRepeated, + overlayColor, + url, + alt, + id, + minHeight: minHeightProp, + minHeightUnit, + tagName: Tag + } = attributes; + const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('background-color', overlayColor); + const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient); + const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp; + const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType; + const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType; + const isImgElement = !(hasParallax || isRepeated); + const style = { + minHeight: minHeight || undefined + }; + const bgStyle = { + backgroundColor: !overlayColorClass ? customOverlayColor : undefined, + background: customGradient ? customGradient : undefined + }; + const objectPosition = + // prettier-ignore + focalPoint && isImgElement ? mediaPosition(focalPoint) : undefined; + const backgroundImage = url ? `url(${url})` : undefined; + const backgroundPosition = mediaPosition(focalPoint); + const classes = classnames_default()({ + 'is-light': !isDark, + 'has-parallax': hasParallax, + 'is-repeated': isRepeated, + 'has-custom-content-position': !isContentPositionCenter(contentPosition) + }, getPositionClassName(contentPosition)); + const imgClasses = classnames_default()('wp-block-cover__image-background', id ? `wp-image-${id}` : null, { + 'has-parallax': hasParallax, + 'is-repeated': isRepeated + }); + const gradientValue = gradient || customGradient; + return (0,external_React_namespaceObject.createElement)(Tag, { + ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ + className: classes, + style + }) + }, (0,external_React_namespaceObject.createElement)("span", { + "aria-hidden": "true", + className: classnames_default()('wp-block-cover__background', overlayColorClass, dimRatioToClass(dimRatio), { + 'has-background-dim': dimRatio !== undefined, + // For backwards compatibility. Former versions of the Cover Block applied + // `.wp-block-cover__gradient-background` in the presence of + // media, a gradient and a dim. + 'wp-block-cover__gradient-background': url && gradientValue && dimRatio !== 0, + 'has-background-gradient': gradientValue, + [gradientClass]: gradientClass + }), + style: bgStyle + }), !useFeaturedImage && isImageBackground && url && (isImgElement ? (0,external_React_namespaceObject.createElement)("img", { + className: imgClasses, + alt: alt, + src: url, + style: { + objectPosition + }, + "data-object-fit": "cover", + "data-object-position": objectPosition + }) : (0,external_React_namespaceObject.createElement)("div", { + role: "img", + className: imgClasses, + style: { + backgroundPosition, + backgroundImage + } + })), isVideoBackground && url && (0,external_React_namespaceObject.createElement)("video", { + className: classnames_default()('wp-block-cover__video-background', 'intrinsic-ignore'), + autoPlay: true, + muted: true, + loop: true, + playsInline: true, + src: url, + style: { + objectPosition + }, + "data-object-fit": "cover", + "data-object-position": objectPosition + }), (0,external_React_namespaceObject.createElement)("div", { + ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({ + className: 'wp-block-cover__inner-container' + }) + })); + } +}; // Deprecation for blocks that does not have a HTML tag option. const deprecated_v11 = { - attributes: v8ToV10BlockAttributes, - supports: v7toV10BlockSupports, + attributes: v8ToV11BlockAttributes, + supports: v7toV11BlockSupports, save({ attributes }) { @@ -12078,12 +12116,12 @@ const deprecated_v11 = { 'is-repeated': isRepeated }); const gradientValue = gradient || customGradient; - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }) - }, (0,external_wp_element_namespaceObject.createElement)("span", { + }, (0,external_React_namespaceObject.createElement)("span", { "aria-hidden": "true", className: classnames_default()('wp-block-cover__background', overlayColorClass, dimRatioToClass(dimRatio), { 'has-background-dim': dimRatio !== undefined, @@ -12095,7 +12133,7 @@ const deprecated_v11 = { [gradientClass]: gradientClass }), style: bgStyle - }), !useFeaturedImage && isImageBackground && url && (isImgElement ? (0,external_wp_element_namespaceObject.createElement)("img", { + }), !useFeaturedImage && isImageBackground && url && (isImgElement ? (0,external_React_namespaceObject.createElement)("img", { className: imgClasses, alt: alt, src: url, @@ -12104,14 +12142,14 @@ const deprecated_v11 = { }, "data-object-fit": "cover", "data-object-position": objectPosition - }) : (0,external_wp_element_namespaceObject.createElement)("div", { + }) : (0,external_React_namespaceObject.createElement)("div", { role: "img", className: imgClasses, style: { backgroundPosition, backgroundImage } - })), isVideoBackground && url && (0,external_wp_element_namespaceObject.createElement)("video", { + })), isVideoBackground && url && (0,external_React_namespaceObject.createElement)("video", { className: classnames_default()('wp-block-cover__video-background', 'intrinsic-ignore'), autoPlay: true, muted: true, @@ -12123,7 +12161,7 @@ const deprecated_v11 = { }, "data-object-fit": "cover", "data-object-position": objectPosition - }), (0,external_wp_element_namespaceObject.createElement)("div", { + }), (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({ className: 'wp-block-cover__inner-container' }) @@ -12134,8 +12172,8 @@ const deprecated_v11 = { // Deprecation for blocks that renders fixed background as backgroud from the main block container. const deprecated_v10 = { - attributes: v8ToV10BlockAttributes, - supports: v7toV10BlockSupports, + attributes: v8ToV11BlockAttributes, + supports: v7toV11BlockSupports, save({ attributes }) { @@ -12182,12 +12220,12 @@ const deprecated_v10 = { 'has-custom-content-position': !isContentPositionCenter(contentPosition) }, getPositionClassName(contentPosition)); const gradientValue = gradient || customGradient; - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }) - }, (0,external_wp_element_namespaceObject.createElement)("span", { + }, (0,external_React_namespaceObject.createElement)("span", { "aria-hidden": "true", className: classnames_default()('wp-block-cover__background', overlayColorClass, dimRatioToClass(dimRatio), { 'has-background-dim': dimRatio !== undefined, @@ -12199,7 +12237,7 @@ const deprecated_v10 = { [gradientClass]: gradientClass }), style: bgStyle - }), !useFeaturedImage && isImageBackground && isImgElement && url && (0,external_wp_element_namespaceObject.createElement)("img", { + }), !useFeaturedImage && isImageBackground && isImgElement && url && (0,external_React_namespaceObject.createElement)("img", { className: classnames_default()('wp-block-cover__image-background', id ? `wp-image-${id}` : null), alt: alt, src: url, @@ -12208,7 +12246,7 @@ const deprecated_v10 = { }, "data-object-fit": "cover", "data-object-position": objectPosition - }), isVideoBackground && url && (0,external_wp_element_namespaceObject.createElement)("video", { + }), isVideoBackground && url && (0,external_React_namespaceObject.createElement)("video", { className: classnames_default()('wp-block-cover__video-background', 'intrinsic-ignore'), autoPlay: true, muted: true, @@ -12220,7 +12258,7 @@ const deprecated_v10 = { }, "data-object-fit": "cover", "data-object-position": objectPosition - }), (0,external_wp_element_namespaceObject.createElement)("div", { + }), (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({ className: 'wp-block-cover__inner-container' }) @@ -12231,8 +12269,8 @@ const deprecated_v10 = { // Deprecation for blocks with `minHeightUnit` set but no `minHeight`. const v9 = { - attributes: v8ToV10BlockAttributes, - supports: v7toV10BlockSupports, + attributes: v8ToV11BlockAttributes, + supports: v7toV11BlockSupports, save({ attributes }) { @@ -12278,12 +12316,12 @@ const v9 = { 'has-custom-content-position': !isContentPositionCenter(contentPosition) }, getPositionClassName(contentPosition)); const gradientValue = gradient || customGradient; - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }) - }, (0,external_wp_element_namespaceObject.createElement)("span", { + }, (0,external_React_namespaceObject.createElement)("span", { "aria-hidden": "true", className: classnames_default()('wp-block-cover__background', overlayColorClass, dimRatioToClass(dimRatio), { 'has-background-dim': dimRatio !== undefined, @@ -12295,7 +12333,7 @@ const v9 = { [gradientClass]: gradientClass }), style: bgStyle - }), isImageBackground && isImgElement && url && (0,external_wp_element_namespaceObject.createElement)("img", { + }), isImageBackground && isImgElement && url && (0,external_React_namespaceObject.createElement)("img", { className: classnames_default()('wp-block-cover__image-background', id ? `wp-image-${id}` : null), alt: alt, src: url, @@ -12304,7 +12342,7 @@ const v9 = { }, "data-object-fit": "cover", "data-object-position": objectPosition - }), isVideoBackground && url && (0,external_wp_element_namespaceObject.createElement)("video", { + }), isVideoBackground && url && (0,external_React_namespaceObject.createElement)("video", { className: classnames_default()('wp-block-cover__video-background', 'intrinsic-ignore'), autoPlay: true, muted: true, @@ -12316,7 +12354,7 @@ const v9 = { }, "data-object-fit": "cover", "data-object-position": objectPosition - }), (0,external_wp_element_namespaceObject.createElement)("div", { + }), (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({ className: 'wp-block-cover__inner-container' }) @@ -12327,8 +12365,8 @@ const v9 = { // v8: deprecated to remove duplicated gradient classes and swap `wp-block-cover__gradient-background` for `wp-block-cover__background`. const v8 = { - attributes: v8ToV10BlockAttributes, - supports: v7toV10BlockSupports, + attributes: v8ToV11BlockAttributes, + supports: v7toV11BlockSupports, save({ attributes }) { @@ -12373,12 +12411,12 @@ const v8 = { 'is-repeated': isRepeated, 'has-custom-content-position': !isContentPositionCenter(contentPosition) }, getPositionClassName(contentPosition)); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }) - }, (0,external_wp_element_namespaceObject.createElement)("span", { + }, (0,external_React_namespaceObject.createElement)("span", { "aria-hidden": "true", className: classnames_default()(overlayColorClass, dimRatioToClass(dimRatio), 'wp-block-cover__gradient-background', gradientClass, { 'has-background-dim': dimRatio !== undefined, @@ -12386,7 +12424,7 @@ const v8 = { [gradientClass]: !url && gradientClass }), style: bgStyle - }), isImageBackground && isImgElement && url && (0,external_wp_element_namespaceObject.createElement)("img", { + }), isImageBackground && isImgElement && url && (0,external_React_namespaceObject.createElement)("img", { className: classnames_default()('wp-block-cover__image-background', id ? `wp-image-${id}` : null), alt: alt, src: url, @@ -12395,7 +12433,7 @@ const v8 = { }, "data-object-fit": "cover", "data-object-position": objectPosition - }), isVideoBackground && url && (0,external_wp_element_namespaceObject.createElement)("video", { + }), isVideoBackground && url && (0,external_React_namespaceObject.createElement)("video", { className: classnames_default()('wp-block-cover__video-background', 'intrinsic-ignore'), autoPlay: true, muted: true, @@ -12407,7 +12445,7 @@ const v8 = { }, "data-object-fit": "cover", "data-object-position": objectPosition - }), (0,external_wp_element_namespaceObject.createElement)("div", { + }), (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({ className: 'wp-block-cover__inner-container' }) @@ -12445,7 +12483,7 @@ const v7 = { default: '' } }, - supports: v7toV10BlockSupports, + supports: v7toV11BlockSupports, save({ attributes }) { @@ -12489,18 +12527,18 @@ const v7 = { [gradientClass]: !url && gradientClass, 'has-custom-content-position': !isContentPositionCenter(contentPosition) }, getPositionClassName(contentPosition)); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }) - }, url && (gradient || customGradient) && dimRatio !== 0 && (0,external_wp_element_namespaceObject.createElement)("span", { + }, url && (gradient || customGradient) && dimRatio !== 0 && (0,external_React_namespaceObject.createElement)("span", { "aria-hidden": "true", className: classnames_default()('wp-block-cover__gradient-background', gradientClass), style: customGradient ? { background: customGradient } : undefined - }), isImageBackground && isImgElement && url && (0,external_wp_element_namespaceObject.createElement)("img", { + }), isImageBackground && isImgElement && url && (0,external_React_namespaceObject.createElement)("img", { className: classnames_default()('wp-block-cover__image-background', id ? `wp-image-${id}` : null), alt: alt, src: url, @@ -12509,7 +12547,7 @@ const v7 = { }, "data-object-fit": "cover", "data-object-position": objectPosition - }), isVideoBackground && url && (0,external_wp_element_namespaceObject.createElement)("video", { + }), isVideoBackground && url && (0,external_React_namespaceObject.createElement)("video", { className: classnames_default()('wp-block-cover__video-background', 'intrinsic-ignore'), autoPlay: true, muted: true, @@ -12521,9 +12559,9 @@ const v7 = { }, "data-object-fit": "cover", "data-object-position": objectPosition - }), (0,external_wp_element_namespaceObject.createElement)("div", { + }), (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-cover__inner-container" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null))); + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null))); }, migrate: (0,external_wp_compose_namespaceObject.compose)(migrateDimRatio, migrateTag) }; @@ -12603,18 +12641,18 @@ const v6 = { [gradientClass]: !url && gradientClass, 'has-custom-content-position': !isContentPositionCenter(contentPosition) }, getPositionClassName(contentPosition)); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }) - }, url && (gradient || customGradient) && dimRatio !== 0 && (0,external_wp_element_namespaceObject.createElement)("span", { + }, url && (gradient || customGradient) && dimRatio !== 0 && (0,external_React_namespaceObject.createElement)("span", { "aria-hidden": "true", className: classnames_default()('wp-block-cover__gradient-background', gradientClass), style: customGradient ? { background: customGradient } : undefined - }), isVideoBackground && url && (0,external_wp_element_namespaceObject.createElement)("video", { + }), isVideoBackground && url && (0,external_React_namespaceObject.createElement)("video", { className: "wp-block-cover__video-background", autoPlay: true, muted: true, @@ -12622,9 +12660,9 @@ const v6 = { playsInline: true, src: url, style: videoStyle - }), (0,external_wp_element_namespaceObject.createElement)("div", { + }), (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-cover__inner-container" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null))); + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null))); }, migrate: (0,external_wp_compose_namespaceObject.compose)(migrateDimRatio, migrateTag) }; @@ -12678,24 +12716,24 @@ const v5 = { 'has-background-gradient': customGradient, [gradientClass]: !url && gradientClass }); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: classes, style: style - }, url && (gradient || customGradient) && dimRatio !== 0 && (0,external_wp_element_namespaceObject.createElement)("span", { + }, url && (gradient || customGradient) && dimRatio !== 0 && (0,external_React_namespaceObject.createElement)("span", { "aria-hidden": "true", className: classnames_default()('wp-block-cover__gradient-background', gradientClass), style: customGradient ? { background: customGradient } : undefined - }), VIDEO_BACKGROUND_TYPE === backgroundType && url && (0,external_wp_element_namespaceObject.createElement)("video", { + }), VIDEO_BACKGROUND_TYPE === backgroundType && url && (0,external_React_namespaceObject.createElement)("video", { className: "wp-block-cover__video-background", autoPlay: true, muted: true, loop: true, src: url - }), (0,external_wp_element_namespaceObject.createElement)("div", { + }), (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-cover__inner-container" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null))); + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null))); }, migrate: (0,external_wp_compose_namespaceObject.compose)(migrateDimRatio, migrateTag) }; @@ -12749,24 +12787,24 @@ const v4 = { 'has-background-gradient': customGradient, [gradientClass]: !url && gradientClass }); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: classes, style: style - }, url && (gradient || customGradient) && dimRatio !== 0 && (0,external_wp_element_namespaceObject.createElement)("span", { + }, url && (gradient || customGradient) && dimRatio !== 0 && (0,external_React_namespaceObject.createElement)("span", { "aria-hidden": "true", className: classnames_default()('wp-block-cover__gradient-background', gradientClass), style: customGradient ? { background: customGradient } : undefined - }), VIDEO_BACKGROUND_TYPE === backgroundType && url && (0,external_wp_element_namespaceObject.createElement)("video", { + }), VIDEO_BACKGROUND_TYPE === backgroundType && url && (0,external_React_namespaceObject.createElement)("video", { className: "wp-block-cover__video-background", autoPlay: true, muted: true, loop: true, src: url - }), (0,external_wp_element_namespaceObject.createElement)("div", { + }), (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-cover__inner-container" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null))); + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null))); }, migrate: (0,external_wp_compose_namespaceObject.compose)(migrateDimRatio, migrateTag) }; @@ -12813,16 +12851,16 @@ const v3 = { 'has-parallax': hasParallax, [`has-${contentAlign}-content`]: contentAlign !== 'center' }); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: classes, style: style - }, VIDEO_BACKGROUND_TYPE === backgroundType && url && (0,external_wp_element_namespaceObject.createElement)("video", { + }, VIDEO_BACKGROUND_TYPE === backgroundType && url && (0,external_React_namespaceObject.createElement)("video", { className: "wp-block-cover__video-background", autoPlay: true, muted: true, loop: true, src: url - }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(title) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(title) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "p", className: "wp-block-cover-text", value: title @@ -12889,10 +12927,10 @@ const v2 = { 'has-parallax': hasParallax, [`has-${contentAlign}-content`]: contentAlign !== 'center' }, align ? `align${align}` : null); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: classes, style: style - }, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(title) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(title) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "p", className: "wp-block-cover-image-text", value: title @@ -12952,10 +12990,10 @@ const cover_deprecated_v1 = { 'has-background-dim': dimRatio !== 0, 'has-parallax': hasParallax }, align ? `align${align}` : null); - return (0,external_wp_element_namespaceObject.createElement)("section", { + return (0,external_React_namespaceObject.createElement)("section", { className: classes, style: style - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "h2", value: title })); @@ -12980,10 +13018,7 @@ const cover_deprecated_v1 = { })]]; } }; -/* harmony default export */ var cover_deprecated = ([deprecated_v11, deprecated_v10, v9, v8, v7, v6, v5, v4, v3, v2, cover_deprecated_v1]); - -;// CONCATENATED MODULE: ./node_modules/colord/plugins/names.mjs -/* harmony default export */ function names(e,f){var a={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var d in a)r[a[d]]=d;var l={};e.prototype.toName=function(f){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var d,i,n=r[this.toHex()];if(n)return n;if(null==f?void 0:f.closest){var o=this.toRgb(),t=1/0,b="black";if(!l.length)for(var c in a)l[c]=new e(a[c]).toRgb();for(var g in a){var u=(d=o,i=l[g],Math.pow(d.r-i.r,2)+Math.pow(d.g-i.g,2)+Math.pow(d.b-i.b,2));u<t&&(t=u,b=g)}return b}};f.string.push([function(f){var r=f.toLowerCase(),d="transparent"===r?"#0000":a[r];return d?new e(d).toRgb():null},"name"])} +/* harmony default export */ const cover_deprecated = ([v13, v12, deprecated_v11, deprecated_v10, v9, v8, v7, v6, v5, v4, v3, v2, cover_deprecated_v1]); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/edit/inspector-controls.js @@ -13000,6 +13035,10 @@ const cover_deprecated_v1 = { * Internal dependencies */ + +const { + cleanEmptyObject: inspector_controls_cleanEmptyObject +} = unlock(external_wp_blockEditor_namespaceObject.privateApis); function CoverHeightInput({ onChange, onUnitChange, @@ -13009,8 +13048,9 @@ function CoverHeightInput({ const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(external_wp_components_namespaceObject.__experimentalUnitControl); const inputId = `block-cover-height-input-${instanceId}`; const isPx = unit === 'px'; + const [availableUnits] = (0,external_wp_blockEditor_namespaceObject.useSettings)('spacing.units'); const units = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({ - availableUnits: (0,external_wp_blockEditor_namespaceObject.useSetting)('spacing.units') || ['px', 'em', 'rem', 'vw', 'vh'], + availableUnits: availableUnits || ['px', 'em', 'rem', 'vw', 'vh'], defaultValues: { px: 430, '%': 20, @@ -13032,7 +13072,7 @@ function CoverHeightInput({ return [parsedQuantity, unit].join(''); }, [unit, value]); const min = isPx ? COVER_MIN_HEIGHT : 0; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalUnitControl, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalUnitControl, { label: (0,external_wp_i18n_namespaceObject.__)('Minimum height of cover'), id: inputId, isResetValueOnUnitChange: true, @@ -13070,7 +13110,6 @@ function CoverInspectorControls({ isImageBackground, mediaElement, url, - isImgElement, overlayColor } = currentSettings; const { @@ -13104,21 +13143,22 @@ function CoverInspectorControls({ aside: (0,external_wp_i18n_namespaceObject.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."), footer: (0,external_wp_i18n_namespaceObject.__)('The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).') }; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, !!url && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { - title: (0,external_wp_i18n_namespaceObject.__)('Media settings') - }, isImageBackground && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, !!url && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + title: (0,external_wp_i18n_namespaceObject.__)('Settings') + }, isImageBackground && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Fixed background'), checked: hasParallax, onChange: toggleParallax - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Repeated background'), checked: isRepeated, onChange: toggleIsRepeated - })), showFocalPointPicker && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FocalPointPicker, { + })), showFocalPointPicker && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.FocalPointPicker, { __nextHasNoMarginBottom: true, - label: (0,external_wp_i18n_namespaceObject.__)('Focal point picker'), + __next40pxDefaultSize: true, + label: (0,external_wp_i18n_namespaceObject.__)('Focal point'), url: url, value: focalPoint, onDragStart: imperativeFocalPointPreview, @@ -13126,24 +13166,24 @@ function CoverInspectorControls({ onChange: newFocalPoint => setAttributes({ focalPoint: newFocalPoint }) - }), !useFeaturedImage && url && isImageBackground && isImgElement && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextareaControl, { + }), !useFeaturedImage && url && !isVideoBackground && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextareaControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Alternative text'), value: alt, onChange: newAlt => setAttributes({ alt: newAlt }), - help: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, { + help: (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, { href: "https://www.w3.org/WAI/tutorials/images/decision-tree" - }, (0,external_wp_i18n_namespaceObject.__)('Describe the purpose of the image.')), (0,external_wp_element_namespaceObject.createElement)("br", null), (0,external_wp_i18n_namespaceObject.__)('Leave empty if decorative.')) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelRow, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, (0,external_wp_i18n_namespaceObject.__)('Describe the purpose of the image.')), (0,external_React_namespaceObject.createElement)("br", null), (0,external_wp_i18n_namespaceObject.__)('Leave empty if decorative.')) + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelRow, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { variant: "secondary", - isSmall: true, + size: "small", className: "block-library-cover__reset-button", onClick: onClearMedia - }, (0,external_wp_i18n_namespaceObject.__)('Clear Media'))))), colorGradientSettings.hasColorsOrGradients && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { + }, (0,external_wp_i18n_namespaceObject.__)('Clear Media'))))), colorGradientSettings.hasColorsOrGradients && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "color" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown, { __experimentalIsRenderedInSidebar: true, settings: [{ colorValue: overlayColor.color, @@ -13161,7 +13201,7 @@ function CoverInspectorControls({ }], panelId: clientId, ...colorGradientSettings - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => { // If there's a media background the dimRatio will be // defaulted to 50 whereas it will be 100 for colors. @@ -13174,7 +13214,7 @@ function CoverInspectorControls({ }), isShownByDefault: true, panelId: clientId - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Overlay opacity'), value: dimRatio, @@ -13184,9 +13224,9 @@ function CoverInspectorControls({ step: 10, required: true, __next40pxDefaultSize: true - }))), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { + }))), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "dimensions" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => !!minHeight, label: (0,external_wp_i18n_namespaceObject.__)('Minimum height'), onDeselect: () => setAttributes({ @@ -13199,19 +13239,27 @@ function CoverInspectorControls({ }), isShownByDefault: true, panelId: clientId - }, (0,external_wp_element_namespaceObject.createElement)(CoverHeightInput, { - value: minHeight, + }, (0,external_React_namespaceObject.createElement)(CoverHeightInput, { + value: attributes?.style?.dimensions?.aspectRatio ? '' : minHeight, unit: minHeightUnit, onChange: newMinHeight => setAttributes({ - minHeight: newMinHeight + minHeight: newMinHeight, + style: inspector_controls_cleanEmptyObject({ + ...attributes?.style, + dimensions: { + ...attributes?.style?.dimensions, + aspectRatio: undefined // Reset aspect ratio when minHeight is set. + } + }) }), onUnitChange: nextUnit => setAttributes({ minHeightUnit: nextUnit }) - }))), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { + }))), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, + __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)('HTML element'), options: [{ label: (0,external_wp_i18n_namespaceObject.__)('Default (<div>)'), @@ -13256,6 +13304,10 @@ function CoverInspectorControls({ * Internal dependencies */ + +const { + cleanEmptyObject: block_controls_cleanEmptyObject +} = unlock(external_wp_blockEditor_namespaceObject.privateApis); function CoverBlockControls({ attributes, setAttributes, @@ -13276,7 +13328,7 @@ function CoverBlockControls({ } = currentSettings; const [prevMinHeightValue, setPrevMinHeightValue] = (0,external_wp_element_namespaceObject.useState)(minHeight); const [prevMinHeightUnit, setPrevMinHeightUnit] = (0,external_wp_element_namespaceObject.useState)(minHeightUnit); - const isMinFullHeight = minHeightUnit === 'vh' && minHeight === 100; + const isMinFullHeight = minHeightUnit === 'vh' && minHeight === 100 && !attributes?.style?.dimensions?.aspectRatio; const toggleMinFullHeight = () => { if (isMinFullHeight) { // If there aren't previous values, take the default ones. @@ -13296,28 +13348,35 @@ function CoverBlockControls({ setPrevMinHeightValue(minHeight); setPrevMinHeightUnit(minHeightUnit); - // Set full height. + // Set full height, and clear any aspect ratio value. return setAttributes({ minHeight: 100, - minHeightUnit: 'vh' + minHeightUnit: 'vh', + style: block_controls_cleanEmptyObject({ + ...attributes?.style, + dimensions: { + ...attributes?.style?.dimensions, + aspectRatio: undefined // Reset aspect ratio when minHeight is set. + } + }) }); }; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalBlockAlignmentMatrixControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalBlockAlignmentMatrixControl, { label: (0,external_wp_i18n_namespaceObject.__)('Change content position'), value: contentPosition, onChange: nextPosition => setAttributes({ contentPosition: nextPosition }), isDisabled: !hasInnerBlocks - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalBlockFullHeightAligmentControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalBlockFullHeightAligmentControl, { isActive: isMinFullHeight, onToggle: toggleMinFullHeight, isDisabled: !hasInnerBlocks - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, { mediaId: id, mediaURL: url, allowedTypes: shared_ALLOWED_MEDIA_TYPES, @@ -13350,8 +13409,8 @@ function CoverPlaceholder({ style, toggleUseFeaturedImage }) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, { - icon: (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, { + icon: (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: library_cover }), labels: { @@ -13444,7 +13503,7 @@ function ResizableCoverPopover({ isVisible: isResizing } }; - return (0,external_wp_element_namespaceObject.createElement)(ResizableBoxPopover, { + return (0,external_React_namespaceObject.createElement)(ResizableBoxPopover, { className: "block-library-cover__resizable-box-popover", __unstableRefreshSize: dimensions, resizableBoxProps: resizableBoxProps, @@ -13452,8 +13511,527 @@ function ResizableCoverPopover({ }); } -;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/edit/index.js +;// CONCATENATED MODULE: ./node_modules/colord/index.mjs +var r={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},n=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*r)/n+0},e=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),r>n?n:r>t?r:t},u=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},a=function(r){return{r:e(r.r,0,255),g:e(r.g,0,255),b:e(r.b,0,255),a:e(r.a)}},o=function(r){return{r:n(r.r),g:n(r.g),b:n(r.b),a:n(r.a,3)}},i=/^#([0-9a-f]{3,8})$/i,s=function(r){var t=r.toString(16);return t.length<2?"0"+t:t},h=function(r){var t=r.r,n=r.g,e=r.b,u=r.a,a=Math.max(t,n,e),o=a-Math.min(t,n,e),i=o?a===t?(n-e)/o:a===n?2+(e-t)/o:4+(t-n)/o:0;return{h:60*(i<0?i+6:i),s:a?o/a*100:0,v:a/255*100,a:u}},b=function(r){var t=r.h,n=r.s,e=r.v,u=r.a;t=t/360*6,n/=100,e/=100;var a=Math.floor(t),o=e*(1-n),i=e*(1-(t-a)*n),s=e*(1-(1-t+a)*n),h=a%6;return{r:255*[e,i,o,o,s,e][h],g:255*[s,e,e,i,o,o][h],b:255*[o,o,s,e,e,i][h],a:u}},g=function(r){return{h:u(r.h),s:e(r.s,0,100),l:e(r.l,0,100),a:e(r.a)}},d=function(r){return{h:n(r.h),s:n(r.s),l:n(r.l),a:n(r.a,3)}},f=function(r){return b((n=(t=r).s,{h:t.h,s:(n*=((e=t.l)<50?e:100-e)/100)>0?2*n/(e+n)*100:0,v:e+n,a:t.a}));var t,n,e},c=function(r){return{h:(t=h(r)).h,s:(u=(200-(n=t.s))*(e=t.v)/100)>0&&u<200?n*e/100/(u<=100?u:200-u)*100:0,l:u/2,a:t.a};var t,n,e,u},l=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,p=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,v=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,m=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y={string:[[function(r){var t=i.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:4===r.length?n(parseInt(r[3]+r[3],16)/255,2):1}:6===r.length||8===r.length?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:8===r.length?n(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var t=v.exec(r)||m.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:a({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(t){var n=l.exec(t)||p.exec(t);if(!n)return null;var e,u,a=g({h:(e=n[1],u=n[2],void 0===u&&(u="deg"),Number(e)*(r[u]||1)),s:Number(n[3]),l:Number(n[4]),a:void 0===n[5]?1:Number(n[5])/(n[6]?100:1)});return f(a)},"hsl"]],object:[[function(r){var n=r.r,e=r.g,u=r.b,o=r.a,i=void 0===o?1:o;return t(n)&&t(e)&&t(u)?a({r:Number(n),g:Number(e),b:Number(u),a:Number(i)}):null},"rgb"],[function(r){var n=r.h,e=r.s,u=r.l,a=r.a,o=void 0===a?1:a;if(!t(n)||!t(e)||!t(u))return null;var i=g({h:Number(n),s:Number(e),l:Number(u),a:Number(o)});return f(i)},"hsl"],[function(r){var n=r.h,a=r.s,o=r.v,i=r.a,s=void 0===i?1:i;if(!t(n)||!t(a)||!t(o))return null;var h=function(r){return{h:u(r.h),s:e(r.s,0,100),v:e(r.v,0,100),a:e(r.a)}}({h:Number(n),s:Number(a),v:Number(o),a:Number(s)});return b(h)},"hsv"]]},N=function(r,t){for(var n=0;n<t.length;n++){var e=t[n][0](r);if(e)return[e,t[n][1]]}return[null,void 0]},x=function(r){return"string"==typeof r?N(r.trim(),y.string):"object"==typeof r&&null!==r?N(r,y.object):[null,void 0]},I=function(r){return x(r)[1]},M=function(r,t){var n=c(r);return{h:n.h,s:e(n.s+100*t,0,100),l:n.l,a:n.a}},H=function(r){return(299*r.r+587*r.g+114*r.b)/1e3/255},$=function(r,t){var n=c(r);return{h:n.h,s:n.s,l:e(n.l+100*t,0,100),a:n.a}},j=function(){function r(r){this.parsed=x(r)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return r.prototype.isValid=function(){return null!==this.parsed},r.prototype.brightness=function(){return n(H(this.rgba),2)},r.prototype.isDark=function(){return H(this.rgba)<.5},r.prototype.isLight=function(){return H(this.rgba)>=.5},r.prototype.toHex=function(){return r=o(this.rgba),t=r.r,e=r.g,u=r.b,i=(a=r.a)<1?s(n(255*a)):"","#"+s(t)+s(e)+s(u)+i;var r,t,e,u,a,i},r.prototype.toRgb=function(){return o(this.rgba)},r.prototype.toRgbString=function(){return r=o(this.rgba),t=r.r,n=r.g,e=r.b,(u=r.a)<1?"rgba("+t+", "+n+", "+e+", "+u+")":"rgb("+t+", "+n+", "+e+")";var r,t,n,e,u},r.prototype.toHsl=function(){return d(c(this.rgba))},r.prototype.toHslString=function(){return r=d(c(this.rgba)),t=r.h,n=r.s,e=r.l,(u=r.a)<1?"hsla("+t+", "+n+"%, "+e+"%, "+u+")":"hsl("+t+", "+n+"%, "+e+"%)";var r,t,n,e,u},r.prototype.toHsv=function(){return r=h(this.rgba),{h:n(r.h),s:n(r.s),v:n(r.v),a:n(r.a,3)};var r},r.prototype.invert=function(){return w({r:255-(r=this.rgba).r,g:255-r.g,b:255-r.b,a:r.a});var r},r.prototype.saturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,r))},r.prototype.desaturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,-r))},r.prototype.grayscale=function(){return w(M(this.rgba,-1))},r.prototype.lighten=function(r){return void 0===r&&(r=.1),w($(this.rgba,r))},r.prototype.darken=function(r){return void 0===r&&(r=.1),w($(this.rgba,-r))},r.prototype.rotate=function(r){return void 0===r&&(r=15),this.hue(this.hue()+r)},r.prototype.alpha=function(r){return"number"==typeof r?w({r:(t=this.rgba).r,g:t.g,b:t.b,a:r}):n(this.rgba.a,3);var t},r.prototype.hue=function(r){var t=c(this.rgba);return"number"==typeof r?w({h:r,s:t.s,l:t.l,a:t.a}):n(t.h)},r.prototype.isEqual=function(r){return this.toHex()===w(r).toHex()},r}(),w=function(r){return r instanceof j?r:new j(r)},S=[],k=function(r){r.forEach(function(r){S.indexOf(r)<0&&(r(j,y),S.push(r))})},E=function(){return new j({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})}; + +;// CONCATENATED MODULE: ./node_modules/colord/plugins/names.mjs +/* harmony default export */ function names(e,f){var a={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var d in a)r[a[d]]=d;var l={};e.prototype.toName=function(f){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var d,i,n=r[this.toHex()];if(n)return n;if(null==f?void 0:f.closest){var o=this.toRgb(),t=1/0,b="black";if(!l.length)for(var c in a)l[c]=new e(a[c]).toRgb();for(var g in a){var u=(d=o,i=l[g],Math.pow(d.r-i.r,2)+Math.pow(d.g-i.g,2)+Math.pow(d.b-i.b,2));u<t&&(t=u,b=g)}return b}};f.string.push([function(f){var r=f.toLowerCase(),d="transparent"===r?"#0000":a[r];return d?new e(d).toRgb():null},"name"])} + +;// CONCATENATED MODULE: ./node_modules/fast-average-color/dist/index.esm.js +/*! Fast Average Color | © 2022 Denis Seleznev | MIT License | https://github.com/fast-average-color/fast-average-color */ +function toHex(num) { + var str = num.toString(16); + return str.length === 1 ? '0' + str : str; +} +function arrayToHex(arr) { + return '#' + arr.map(toHex).join(''); +} +function isDark(color) { + // http://www.w3.org/TR/AERT#color-contrast + var result = (color[0] * 299 + color[1] * 587 + color[2] * 114) / 1000; + return result < 128; +} +function prepareIgnoredColor(color) { + if (!color) { + return []; + } + return isRGBArray(color) ? color : [color]; +} +function isRGBArray(value) { + return Array.isArray(value[0]); +} +function isIgnoredColor(data, index, ignoredColor) { + for (var i = 0; i < ignoredColor.length; i++) { + if (isIgnoredColorAsNumbers(data, index, ignoredColor[i])) { + return true; + } + } + return false; +} +function isIgnoredColorAsNumbers(data, index, ignoredColor) { + switch (ignoredColor.length) { + case 3: + // [red, green, blue] + if (isIgnoredRGBColor(data, index, ignoredColor)) { + return true; + } + break; + case 4: + // [red, green, blue, alpha] + if (isIgnoredRGBAColor(data, index, ignoredColor)) { + return true; + } + break; + case 5: + // [red, green, blue, alpha, threshold] + if (isIgnoredRGBAColorWithThreshold(data, index, ignoredColor)) { + return true; + } + break; + default: + return false; + } +} +function isIgnoredRGBColor(data, index, ignoredColor) { + // Ignore if the pixel are transparent. + if (data[index + 3] !== 255) { + return true; + } + if (data[index] === ignoredColor[0] && + data[index + 1] === ignoredColor[1] && + data[index + 2] === ignoredColor[2]) { + return true; + } + return false; +} +function isIgnoredRGBAColor(data, index, ignoredColor) { + if (data[index + 3] && ignoredColor[3]) { + return data[index] === ignoredColor[0] && + data[index + 1] === ignoredColor[1] && + data[index + 2] === ignoredColor[2] && + data[index + 3] === ignoredColor[3]; + } + // Ignore rgb components if the pixel are fully transparent. + return data[index + 3] === ignoredColor[3]; +} +function inRange(colorComponent, ignoredColorComponent, value) { + return colorComponent >= (ignoredColorComponent - value) && + colorComponent <= (ignoredColorComponent + value); +} +function isIgnoredRGBAColorWithThreshold(data, index, ignoredColor) { + var redIgnored = ignoredColor[0]; + var greenIgnored = ignoredColor[1]; + var blueIgnored = ignoredColor[2]; + var alphaIgnored = ignoredColor[3]; + var threshold = ignoredColor[4]; + var alphaData = data[index + 3]; + var alphaInRange = inRange(alphaData, alphaIgnored, threshold); + if (!alphaIgnored) { + return alphaInRange; + } + if (!alphaData && alphaInRange) { + return true; + } + if (inRange(data[index], redIgnored, threshold) && + inRange(data[index + 1], greenIgnored, threshold) && + inRange(data[index + 2], blueIgnored, threshold) && + alphaInRange) { + return true; + } + return false; +} + +function dominantAlgorithm(arr, len, options) { + var colorHash = {}; + var divider = 24; + var ignoredColor = options.ignoredColor; + var step = options.step; + var max = [0, 0, 0, 0, 0]; + for (var i = 0; i < len; i += step) { + var red = arr[i]; + var green = arr[i + 1]; + var blue = arr[i + 2]; + var alpha = arr[i + 3]; + if (ignoredColor && isIgnoredColor(arr, i, ignoredColor)) { + continue; + } + var key = Math.round(red / divider) + ',' + + Math.round(green / divider) + ',' + + Math.round(blue / divider); + if (colorHash[key]) { + colorHash[key] = [ + colorHash[key][0] + red * alpha, + colorHash[key][1] + green * alpha, + colorHash[key][2] + blue * alpha, + colorHash[key][3] + alpha, + colorHash[key][4] + 1 + ]; + } + else { + colorHash[key] = [red * alpha, green * alpha, blue * alpha, alpha, 1]; + } + if (max[4] < colorHash[key][4]) { + max = colorHash[key]; + } + } + var redTotal = max[0]; + var greenTotal = max[1]; + var blueTotal = max[2]; + var alphaTotal = max[3]; + var count = max[4]; + return alphaTotal ? [ + Math.round(redTotal / alphaTotal), + Math.round(greenTotal / alphaTotal), + Math.round(blueTotal / alphaTotal), + Math.round(alphaTotal / count) + ] : options.defaultColor; +} + +function simpleAlgorithm(arr, len, options) { + var redTotal = 0; + var greenTotal = 0; + var blueTotal = 0; + var alphaTotal = 0; + var count = 0; + var ignoredColor = options.ignoredColor; + var step = options.step; + for (var i = 0; i < len; i += step) { + var alpha = arr[i + 3]; + var red = arr[i] * alpha; + var green = arr[i + 1] * alpha; + var blue = arr[i + 2] * alpha; + if (ignoredColor && isIgnoredColor(arr, i, ignoredColor)) { + continue; + } + redTotal += red; + greenTotal += green; + blueTotal += blue; + alphaTotal += alpha; + count++; + } + return alphaTotal ? [ + Math.round(redTotal / alphaTotal), + Math.round(greenTotal / alphaTotal), + Math.round(blueTotal / alphaTotal), + Math.round(alphaTotal / count) + ] : options.defaultColor; +} + +function sqrtAlgorithm(arr, len, options) { + var redTotal = 0; + var greenTotal = 0; + var blueTotal = 0; + var alphaTotal = 0; + var count = 0; + var ignoredColor = options.ignoredColor; + var step = options.step; + for (var i = 0; i < len; i += step) { + var red = arr[i]; + var green = arr[i + 1]; + var blue = arr[i + 2]; + var alpha = arr[i + 3]; + if (ignoredColor && isIgnoredColor(arr, i, ignoredColor)) { + continue; + } + redTotal += red * red * alpha; + greenTotal += green * green * alpha; + blueTotal += blue * blue * alpha; + alphaTotal += alpha; + count++; + } + return alphaTotal ? [ + Math.round(Math.sqrt(redTotal / alphaTotal)), + Math.round(Math.sqrt(greenTotal / alphaTotal)), + Math.round(Math.sqrt(blueTotal / alphaTotal)), + Math.round(alphaTotal / count) + ] : options.defaultColor; +} + +function getDefaultColor(options) { + return getOption(options, 'defaultColor', [0, 0, 0, 0]); +} +function getOption(options, name, defaultValue) { + return (options[name] === undefined ? defaultValue : options[name]); +} + +var MIN_SIZE = 10; +var MAX_SIZE = 100; +function isSvg(filename) { + return filename.search(/\.svg(\?|$)/i) !== -1; +} +function getOriginalSize(resource) { + if (isInstanceOfHTMLImageElement(resource)) { + var width = resource.naturalWidth; + var height = resource.naturalHeight; + // For SVG images with only viewBox attribute + if (!resource.naturalWidth && isSvg(resource.src)) { + width = height = MAX_SIZE; + } + return { + width: width, + height: height, + }; + } + if (isInstanceOfHTMLVideoElement(resource)) { + return { + width: resource.videoWidth, + height: resource.videoHeight + }; + } + return { + width: resource.width, + height: resource.height + }; +} +function getSrc(resource) { + if (isInstanceOfHTMLCanvasElement(resource)) { + return 'canvas'; + } + if (isInstanceOfOffscreenCanvas(resource)) { + return 'offscreencanvas'; + } + if (isInstanceOfImageBitmap(resource)) { + return 'imagebitmap'; + } + return resource.src; +} +function isInstanceOfHTMLImageElement(resource) { + return typeof HTMLImageElement !== 'undefined' && resource instanceof HTMLImageElement; +} +var hasOffscreenCanvas = typeof OffscreenCanvas !== 'undefined'; +function isInstanceOfOffscreenCanvas(resource) { + return hasOffscreenCanvas && resource instanceof OffscreenCanvas; +} +function isInstanceOfHTMLVideoElement(resource) { + return typeof HTMLVideoElement !== 'undefined' && resource instanceof HTMLVideoElement; +} +function isInstanceOfHTMLCanvasElement(resource) { + return typeof HTMLCanvasElement !== 'undefined' && resource instanceof HTMLCanvasElement; +} +function isInstanceOfImageBitmap(resource) { + return typeof ImageBitmap !== 'undefined' && resource instanceof ImageBitmap; +} +function prepareSizeAndPosition(originalSize, options) { + var srcLeft = getOption(options, 'left', 0); + var srcTop = getOption(options, 'top', 0); + var srcWidth = getOption(options, 'width', originalSize.width); + var srcHeight = getOption(options, 'height', originalSize.height); + var destWidth = srcWidth; + var destHeight = srcHeight; + if (options.mode === 'precision') { + return { + srcLeft: srcLeft, + srcTop: srcTop, + srcWidth: srcWidth, + srcHeight: srcHeight, + destWidth: destWidth, + destHeight: destHeight + }; + } + var factor; + if (srcWidth > srcHeight) { + factor = srcWidth / srcHeight; + destWidth = MAX_SIZE; + destHeight = Math.round(destWidth / factor); + } + else { + factor = srcHeight / srcWidth; + destHeight = MAX_SIZE; + destWidth = Math.round(destHeight / factor); + } + if (destWidth > srcWidth || destHeight > srcHeight || + destWidth < MIN_SIZE || destHeight < MIN_SIZE) { + destWidth = srcWidth; + destHeight = srcHeight; + } + return { + srcLeft: srcLeft, + srcTop: srcTop, + srcWidth: srcWidth, + srcHeight: srcHeight, + destWidth: destWidth, + destHeight: destHeight + }; +} +var isWebWorkers = typeof window === 'undefined'; +function makeCanvas() { + if (isWebWorkers) { + return hasOffscreenCanvas ? new OffscreenCanvas(1, 1) : null; + } + return document.createElement('canvas'); +} + +var ERROR_PREFIX = 'FastAverageColor: '; +function getError(message) { + return Error(ERROR_PREFIX + message); +} +function outputError(error, silent) { + if (!silent) { + console.error(error); + } +} +var FastAverageColor = /** @class */ (function () { + function FastAverageColor() { + this.canvas = null; + this.ctx = null; + } + /** + * Get asynchronously the average color from not loaded image. + */ + FastAverageColor.prototype.getColorAsync = function (resource, options) { + if (!resource) { + return Promise.reject(getError('call .getColorAsync() without resource.')); + } + if (typeof resource === 'string') { + // Web workers + if (typeof Image === 'undefined') { + return Promise.reject(getError('resource as string is not supported in this environment')); + } + var img = new Image(); + img.crossOrigin = options && options.crossOrigin || ''; + img.src = resource; + return this.bindImageEvents(img, options); + } + else if (isInstanceOfHTMLImageElement(resource) && !resource.complete) { + return this.bindImageEvents(resource, options); + } + else { + var result = this.getColor(resource, options); + return result.error ? Promise.reject(result.error) : Promise.resolve(result); + } + }; + /** + * Get the average color from images, videos and canvas. + */ + FastAverageColor.prototype.getColor = function (resource, options) { + options = options || {}; + var defaultColor = getDefaultColor(options); + if (!resource) { + var error = getError('call .getColor(null) without resource'); + outputError(error, options.silent); + return this.prepareResult(defaultColor, error); + } + var originalSize = getOriginalSize(resource); + var size = prepareSizeAndPosition(originalSize, options); + if (!size.srcWidth || !size.srcHeight || !size.destWidth || !size.destHeight) { + var error = getError("incorrect sizes for resource \"".concat(getSrc(resource), "\"")); + outputError(error, options.silent); + return this.prepareResult(defaultColor, error); + } + if (!this.canvas) { + this.canvas = makeCanvas(); + if (!this.canvas) { + var error = getError('OffscreenCanvas is not supported in this browser'); + outputError(error, options.silent); + return this.prepareResult(defaultColor, error); + } + } + if (!this.ctx) { + this.ctx = this.canvas.getContext('2d', { willReadFrequently: true }); + if (!this.ctx) { + var error = getError('Canvas Context 2D is not supported in this browser'); + outputError(error, options.silent); + return this.prepareResult(defaultColor); + } + this.ctx.imageSmoothingEnabled = false; + } + this.canvas.width = size.destWidth; + this.canvas.height = size.destHeight; + try { + this.ctx.clearRect(0, 0, size.destWidth, size.destHeight); + this.ctx.drawImage(resource, size.srcLeft, size.srcTop, size.srcWidth, size.srcHeight, 0, 0, size.destWidth, size.destHeight); + var bitmapData = this.ctx.getImageData(0, 0, size.destWidth, size.destHeight).data; + return this.prepareResult(this.getColorFromArray4(bitmapData, options)); + } + catch (originalError) { + var error = getError("security error (CORS) for resource ".concat(getSrc(resource), ".\nDetails: https://developer.mozilla.org/en/docs/Web/HTML/CORS_enabled_image")); + outputError(error, options.silent); + !options.silent && console.error(originalError); + return this.prepareResult(defaultColor, error); + } + }; + /** + * Get the average color from a array when 1 pixel is 4 bytes. + */ + FastAverageColor.prototype.getColorFromArray4 = function (arr, options) { + options = options || {}; + var bytesPerPixel = 4; + var arrLength = arr.length; + var defaultColor = getDefaultColor(options); + if (arrLength < bytesPerPixel) { + return defaultColor; + } + var len = arrLength - arrLength % bytesPerPixel; + var step = (options.step || 1) * bytesPerPixel; + var algorithm; + switch (options.algorithm || 'sqrt') { + case 'simple': + algorithm = simpleAlgorithm; + break; + case 'sqrt': + algorithm = sqrtAlgorithm; + break; + case 'dominant': + algorithm = dominantAlgorithm; + break; + default: + throw getError("".concat(options.algorithm, " is unknown algorithm")); + } + return algorithm(arr, len, { + defaultColor: defaultColor, + ignoredColor: prepareIgnoredColor(options.ignoredColor), + step: step + }); + }; + /** + * Get color data from value ([r, g, b, a]). + */ + FastAverageColor.prototype.prepareResult = function (value, error) { + var rgb = value.slice(0, 3); + var rgba = [value[0], value[1], value[2], value[3] / 255]; + var isDarkColor = isDark(value); + return { + value: [value[0], value[1], value[2], value[3]], + rgb: 'rgb(' + rgb.join(',') + ')', + rgba: 'rgba(' + rgba.join(',') + ')', + hex: arrayToHex(rgb), + hexa: arrayToHex(value), + isDark: isDarkColor, + isLight: !isDarkColor, + error: error, + }; + }; + /** + * Destroy the instance. + */ + FastAverageColor.prototype.destroy = function () { + if (this.canvas) { + this.canvas.width = 1; + this.canvas.height = 1; + this.canvas = null; + } + this.ctx = null; + }; + FastAverageColor.prototype.bindImageEvents = function (resource, options) { + var _this = this; + return new Promise(function (resolve, reject) { + var onload = function () { + unbindEvents(); + var result = _this.getColor(resource, options); + if (result.error) { + reject(result.error); + } + else { + resolve(result); + } + }; + var onerror = function () { + unbindEvents(); + reject(getError("Error loading image \"".concat(resource.src, "\"."))); + }; + var onabort = function () { + unbindEvents(); + reject(getError("Image \"".concat(resource.src, "\" loading aborted"))); + }; + var unbindEvents = function () { + resource.removeEventListener('load', onload); + resource.removeEventListener('error', onerror); + resource.removeEventListener('abort', onabort); + }; + resource.addEventListener('load', onload); + resource.addEventListener('error', onerror); + resource.addEventListener('abort', onabort); + }); + }; + return FastAverageColor; +}()); + + + +;// CONCATENATED MODULE: external ["wp","hooks"] +const external_wp_hooks_namespaceObject = window["wp"]["hooks"]; +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/edit/color-utils.js /** * External dependencies */ @@ -13461,6 +14039,127 @@ function ResizableCoverPopover({ + +/** + * WordPress dependencies + */ + + +/** + * @typedef {import('colord').RgbaColor} RgbaColor + */ + +k([names]); + +/** + * Fallback color when the average color can't be computed. The image may be + * rendering as transparent, and most sites have a light color background. + */ +const DEFAULT_BACKGROUND_COLOR = '#FFF'; + +/** + * Default dim color specified in style.css. + */ +const DEFAULT_OVERLAY_COLOR = '#000'; + +/** + * Performs a Porter Duff composite source over operation on two rgba colors. + * + * @see {@link https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_srcover} + * + * @param {RgbaColor} source Source color. + * @param {RgbaColor} dest Destination color. + * + * @return {RgbaColor} Composite color. + */ +function compositeSourceOver(source, dest) { + return { + r: source.r * source.a + dest.r * dest.a * (1 - source.a), + g: source.g * source.a + dest.g * dest.a * (1 - source.a), + b: source.b * source.a + dest.b * dest.a * (1 - source.a), + a: source.a + dest.a * (1 - source.a) + }; +} + +/** + * Retrieves the FastAverageColor singleton. + * + * @return {FastAverageColor} The FastAverageColor singleton. + */ +function retrieveFastAverageColor() { + if (!retrieveFastAverageColor.fastAverageColor) { + retrieveFastAverageColor.fastAverageColor = new FastAverageColor(); + } + return retrieveFastAverageColor.fastAverageColor; +} + +/** + * Computes the average color of an image. + * + * @param {string} url The url of the image. + * + * @return {Promise<string>} Promise of an average color as a hex string. + */ +const getMediaColor = memize(async url => { + if (!url) { + return DEFAULT_BACKGROUND_COLOR; + } + + // making the default color rgb for compat with FAC + const { + r, + g, + b, + a + } = w(DEFAULT_BACKGROUND_COLOR).toRgb(); + try { + const imgCrossOrigin = (0,external_wp_hooks_namespaceObject.applyFilters)('media.crossOrigin', undefined, url); + const color = await retrieveFastAverageColor().getColorAsync(url, { + // The default color is white, which is the color + // that is returned if there's an error. + // colord returns alpga 0-1, FAC needs 0-255 + defaultColor: [r, g, b, a * 255], + // Errors that come up don't reject the promise, + // so error logging has to be silenced + // with this option. + silent: "production" === 'production', + crossOrigin: imgCrossOrigin + }); + return color.hex; + } catch (error) { + // If there's an error return the fallback color. + return DEFAULT_BACKGROUND_COLOR; + } +}); + +/** + * Computes if the color combination of the overlay and background color is dark. + * + * @param {number} dimRatio Opacity of the overlay between 0 and 100. + * @param {string} overlayColor CSS color string for the overlay. + * @param {string} backgroundColor CSS color string for the background. + * + * @return {boolean} true if the color combination composite result is dark. + */ +function compositeIsDark(dimRatio, overlayColor, backgroundColor) { + // Opacity doesn't matter if you're overlaying the same color on top of itself. + // And background doesn't matter when overlay is fully opaque. + if (overlayColor === backgroundColor || dimRatio === 100) { + return w(overlayColor).isDark(); + } + const overlay = w(overlayColor).alpha(dimRatio / 100).toRgb(); + const background = w(backgroundColor).toRgb(); + const composite = compositeSourceOver(overlay, background); + return w(composite).isDark(); +} + +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/edit/index.js + +/** + * External dependencies + */ + + /** * WordPress dependencies */ @@ -13482,7 +14181,7 @@ function ResizableCoverPopover({ -k([names]); + function getInnerBlocksTemplate(attributes) { return [['core/paragraph', { align: 'center', @@ -13517,6 +14216,8 @@ function CoverEdit({ const { contentPosition, id, + url: originalUrl, + backgroundType: originalBackgroundType, useFeaturedImage, dimRatio, focalPoint, @@ -13528,7 +14229,8 @@ function CoverEdit({ alt, allowedBlocks, templateLock, - tagName: TagName = 'div' + tagName: TagName = 'div', + isUserOverlayColor } = attributes; const [featuredImage] = (0,external_wp_coreData_namespaceObject.useEntityProp)('postType', postType, 'featured_media', postId); const { @@ -13538,19 +14240,30 @@ function CoverEdit({ context: 'view' }), [featuredImage]); const mediaUrl = media?.source_url; + + // User can change the featured image outside of the block, but we still + // need to update the block when that happens. This effect should only + // run when the featured image changes in that case. All other cases are + // handled in their respective callbacks. (0,external_wp_element_namespaceObject.useEffect)(() => { - async function setIsDark() { + (async () => { + if (!useFeaturedImage) { + return; + } + const averageBackgroundColor = await getMediaColor(mediaUrl); + let newOverlayColor = overlayColor.color; + if (!isUserOverlayColor) { + newOverlayColor = averageBackgroundColor; + __unstableMarkNextChangeAsNotPersistent(); + setOverlayColor(newOverlayColor); + } + const newIsDark = compositeIsDark(dimRatio, newOverlayColor, averageBackgroundColor); __unstableMarkNextChangeAsNotPersistent(); - const isDarkSetting = await getCoverIsDark(mediaUrl, dimRatio, overlayColor.color); setAttributes({ - isDark: isDarkSetting + isDark: newIsDark }); - } - if (useFeaturedImage) { - setIsDark(); - } - // We only ever want to run this effect if the mediaUrl changes. - // All other changes to the isDark state are handled in the appropriate event handlers. + })(); + // Disable reason: Update the block only when the featured image changes. // eslint-disable-next-line react-hooks/exhaustive-deps }, [mediaUrl]); @@ -13560,8 +14273,8 @@ function CoverEdit({ // to preview in edit the dynamic featured image const url = useFeaturedImage ? mediaUrl : // Ensure the url is not malformed due to sanitization through `wp_kses`. - attributes.url?.replaceAll('&', '&'); - const backgroundType = useFeaturedImage ? IMAGE_BACKGROUND_TYPE : attributes.backgroundType; + originalUrl?.replaceAll('&', '&'); + const backgroundType = useFeaturedImage ? IMAGE_BACKGROUND_TYPE : originalBackgroundType; const { createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store); @@ -13569,15 +14282,42 @@ function CoverEdit({ gradientClass, gradientValue } = (0,external_wp_blockEditor_namespaceObject.__experimentalUseGradient)(); - const setMedia = attributesFromMedia(setAttributes, dimRatio); const onSelectMedia = async newMedia => { - // Only pass the url to getCoverIsDark if the media is an image as video is not handled. - const newUrl = newMedia?.type === 'image' ? newMedia.url : undefined; - const isDarkSetting = await getCoverIsDark(newUrl, dimRatio, overlayColor.color); - setMedia(newMedia, isDarkSetting); + const mediaAttributes = attributesFromMedia(newMedia); + const isImage = [newMedia?.type, newMedia?.media_type].includes(IMAGE_BACKGROUND_TYPE); + const averageBackgroundColor = await getMediaColor(isImage ? newMedia?.url : undefined); + let newOverlayColor = overlayColor.color; + if (!isUserOverlayColor) { + newOverlayColor = averageBackgroundColor; + setOverlayColor(newOverlayColor); + + // Make undo revert the next setAttributes and the previous setOverlayColor. + __unstableMarkNextChangeAsNotPersistent(); + } + + // Only set a new dimRatio if there was no previous media selected + // to avoid resetting to 50 if it has been explicitly set to 100. + // See issue #52835 for context. + const newDimRatio = originalUrl === undefined && dimRatio === 100 ? 50 : dimRatio; + const newIsDark = compositeIsDark(newDimRatio, newOverlayColor, averageBackgroundColor); + setAttributes({ + ...mediaAttributes, + focalPoint: undefined, + useFeaturedImage: undefined, + dimRatio: newDimRatio, + isDark: newIsDark + }); }; - const onClearMedia = async () => { - const isDarkSetting = await getCoverIsDark(undefined, dimRatio, overlayColor.color); + const onClearMedia = () => { + let newOverlayColor = overlayColor.color; + if (!isUserOverlayColor) { + newOverlayColor = DEFAULT_OVERLAY_COLOR; + setOverlayColor(undefined); + + // Make undo revert the next setAttributes and the previous setOverlayColor. + __unstableMarkNextChangeAsNotPersistent(); + } + const newIsDark = compositeIsDark(dimRatio, newOverlayColor, DEFAULT_BACKGROUND_COLOR); setAttributes({ url: undefined, id: undefined, @@ -13585,31 +14325,36 @@ function CoverEdit({ focalPoint: undefined, hasParallax: undefined, isRepeated: undefined, - useFeaturedImage: false, - isDark: isDarkSetting + useFeaturedImage: undefined, + isDark: newIsDark }); }; - const onSetOverlayColor = async colorValue => { - const isDarkSetting = await getCoverIsDark(url, dimRatio, colorValue); - setOverlayColor(colorValue); + const onSetOverlayColor = async newOverlayColor => { + const averageBackgroundColor = await getMediaColor(url); + const newIsDark = compositeIsDark(dimRatio, newOverlayColor, averageBackgroundColor); + setOverlayColor(newOverlayColor); + + // Make undo revert the next setAttributes and the previous setOverlayColor. __unstableMarkNextChangeAsNotPersistent(); setAttributes({ - isDark: isDarkSetting + isUserOverlayColor: true, + isDark: newIsDark }); }; const onUpdateDimRatio = async newDimRatio => { - const isDarkSetting = await getCoverIsDark(url, newDimRatio, overlayColor.color); + const averageBackgroundColor = await getMediaColor(url); + const newIsDark = compositeIsDark(newDimRatio, overlayColor.color, averageBackgroundColor); setAttributes({ dimRatio: newDimRatio, - isDark: isDarkSetting + isDark: newIsDark }); }; - const isUploadingMedia = isTemporaryMedia(id, url); const onUploadError = message => { createErrorNotice(message, { type: 'snackbar' }); }; + const isUploadingMedia = isTemporaryMedia(id, url); const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType; const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType; const [resizeListener, { @@ -13643,7 +14388,8 @@ function CoverEdit({ }); // Check for fontSize support before we pass a fontSize attribute to the innerBlocks. - const hasFontSizes = !!(0,external_wp_blockEditor_namespaceObject.useSetting)('typography.fontSizes')?.length; + const [fontSizes] = (0,external_wp_blockEditor_namespaceObject.useSettings)('typography.fontSizes'); + const hasFontSizes = fontSizes?.length > 0; const innerBlocksTemplate = getInnerBlocksTemplate({ fontSize: hasFontSizes ? 'large' : undefined }); @@ -13655,7 +14401,8 @@ function CoverEdit({ template: !hasInnerBlocks ? innerBlocksTemplate : undefined, templateInsertUpdatesSelection: true, allowedBlocks, - templateLock + templateLock, + dropZoneElement: ref.current }); const mediaElement = (0,external_wp_element_namespaceObject.useRef)(); const currentSettings = { @@ -13668,24 +14415,38 @@ function CoverEdit({ overlayColor }; const toggleUseFeaturedImage = async () => { - const isDarkSetting = await (useFeaturedImage ? getCoverIsDark(undefined, dimRatio, overlayColor.color) : getCoverIsDark(mediaUrl, dimRatio, overlayColor.color)); + const newUseFeaturedImage = !useFeaturedImage; + const averageBackgroundColor = newUseFeaturedImage ? await getMediaColor(mediaUrl) : DEFAULT_BACKGROUND_COLOR; + const newOverlayColor = !isUserOverlayColor ? averageBackgroundColor : overlayColor.color; + if (!isUserOverlayColor) { + if (newUseFeaturedImage) { + setOverlayColor(newOverlayColor); + } else { + setOverlayColor(undefined); + } + + // Make undo revert the next setAttributes and the previous setOverlayColor. + __unstableMarkNextChangeAsNotPersistent(); + } + const newDimRatio = dimRatio === 100 ? 50 : dimRatio; + const newIsDark = compositeIsDark(newDimRatio, newOverlayColor, averageBackgroundColor); setAttributes({ id: undefined, url: undefined, - useFeaturedImage: !useFeaturedImage, - dimRatio: dimRatio === 100 ? 50 : dimRatio, + useFeaturedImage: newUseFeaturedImage, + dimRatio: newDimRatio, backgroundType: useFeaturedImage ? IMAGE_BACKGROUND_TYPE : undefined, - isDark: isDarkSetting + isDark: newIsDark }); }; - const blockControls = (0,external_wp_element_namespaceObject.createElement)(CoverBlockControls, { + const blockControls = (0,external_React_namespaceObject.createElement)(CoverBlockControls, { attributes: attributes, setAttributes: setAttributes, onSelectMedia: onSelectMedia, currentSettings: currentSettings, toggleUseFeaturedImage: toggleUseFeaturedImage }); - const inspectorControls = (0,external_wp_element_namespaceObject.createElement)(CoverInspectorControls, { + const inspectorControls = (0,external_React_namespaceObject.createElement)(CoverInspectorControls, { attributes: attributes, setAttributes: setAttributes, clientId: clientId, @@ -13718,27 +14479,28 @@ function CoverEdit({ minHeight: newMinHeight }); }, - showHandle: true, + // Hide the resize handle if an aspect ratio is set, as the aspect ratio takes precedence. + showHandle: !attributes.style?.dimensions?.aspectRatio ? true : false, size: resizableBoxDimensions, width }; if (!useFeaturedImage && !hasInnerBlocks && !hasBackground) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, blockControls, inspectorControls, isSelected && (0,external_wp_element_namespaceObject.createElement)(ResizableCoverPopover, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, blockControls, inspectorControls, isSelected && (0,external_React_namespaceObject.createElement)(ResizableCoverPopover, { ...resizableCoverProps - }), (0,external_wp_element_namespaceObject.createElement)(TagName, { + }), (0,external_React_namespaceObject.createElement)(TagName, { ...blockProps, className: classnames_default()('is-placeholder', blockProps.className), style: { ...blockProps.style, minHeight: minHeightWithUnit || undefined } - }, resizeListener, (0,external_wp_element_namespaceObject.createElement)(CoverPlaceholder, { + }, resizeListener, (0,external_React_namespaceObject.createElement)(CoverPlaceholder, { onSelectMedia: onSelectMedia, onError: onUploadError, toggleUseFeaturedImage: toggleUseFeaturedImage - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-cover__placeholder-background-options" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.ColorPalette, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.ColorPalette, { disableCustomColors: true, value: overlayColor.color, onChange: onSetOverlayColor, @@ -13753,7 +14515,7 @@ function CoverEdit({ 'is-repeated': isRepeated, 'has-custom-content-position': !isContentPositionCenter(contentPosition) }, getPositionClassName(contentPosition)); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, blockControls, inspectorControls, (0,external_wp_element_namespaceObject.createElement)(TagName, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, blockControls, inspectorControls, (0,external_React_namespaceObject.createElement)(TagName, { ...blockProps, className: classnames_default()(classes, blockProps.className), style: { @@ -13761,7 +14523,7 @@ function CoverEdit({ ...blockProps.style }, "data-url": url - }, resizeListener, (!useFeaturedImage || url) && (0,external_wp_element_namespaceObject.createElement)("span", { + }, resizeListener, (!useFeaturedImage || url) && (0,external_React_namespaceObject.createElement)("span", { "aria-hidden": "true", className: classnames_default()('wp-block-cover__background', dimRatioToClass(dimRatio), { [overlayColor.class]: overlayColor.class, @@ -13777,24 +14539,25 @@ function CoverEdit({ backgroundImage: gradientValue, ...bgStyle } - }), !url && useFeaturedImage && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { + }), !url && useFeaturedImage && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { className: "wp-block-cover__image--placeholder-image", withIllustration: true - }), url && isImageBackground && (isImgElement ? (0,external_wp_element_namespaceObject.createElement)("img", { + }), url && isImageBackground && (isImgElement ? (0,external_React_namespaceObject.createElement)("img", { ref: mediaElement, className: "wp-block-cover__image-background", alt: alt, src: url, style: mediaStyle - }) : (0,external_wp_element_namespaceObject.createElement)("div", { + }) : (0,external_React_namespaceObject.createElement)("div", { ref: mediaElement, - role: "img", + role: alt ? 'img' : undefined, + "aria-label": alt ? alt : undefined, className: classnames_default()(classes, 'wp-block-cover__image-background'), style: { backgroundImage, backgroundPosition } - })), url && isVideoBackground && (0,external_wp_element_namespaceObject.createElement)("video", { + })), url && isVideoBackground && (0,external_React_namespaceObject.createElement)("video", { ref: mediaElement, className: "wp-block-cover__video-background", autoPlay: true, @@ -13802,18 +14565,18 @@ function CoverEdit({ loop: true, src: url, style: mediaStyle - }), isUploadingMedia && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null), (0,external_wp_element_namespaceObject.createElement)(CoverPlaceholder, { + }), isUploadingMedia && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null), (0,external_React_namespaceObject.createElement)(CoverPlaceholder, { disableMediaButtons: true, onSelectMedia: onSelectMedia, onError: onUploadError, toggleUseFeaturedImage: toggleUseFeaturedImage - }), (0,external_wp_element_namespaceObject.createElement)("div", { + }), (0,external_React_namespaceObject.createElement)("div", { ...innerBlocksProps - })), isSelected && (0,external_wp_element_namespaceObject.createElement)(ResizableCoverPopover, { + })), isSelected && (0,external_React_namespaceObject.createElement)(ResizableCoverPopover, { ...resizableCoverProps })); } -/* harmony default export */ var cover_edit = ((0,external_wp_compose_namespaceObject.compose)([(0,external_wp_blockEditor_namespaceObject.withColors)({ +/* harmony default export */ const cover_edit = ((0,external_wp_compose_namespaceObject.compose)([(0,external_wp_blockEditor_namespaceObject.withColors)({ overlayColor: 'background-color' })])(CoverEdit)); @@ -13885,12 +14648,12 @@ function cover_save_save({ 'is-repeated': isRepeated }); const gradientValue = gradient || customGradient; - return (0,external_wp_element_namespaceObject.createElement)(Tag, { + return (0,external_React_namespaceObject.createElement)(Tag, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }) - }, (0,external_wp_element_namespaceObject.createElement)("span", { + }, (0,external_React_namespaceObject.createElement)("span", { "aria-hidden": "true", className: classnames_default()('wp-block-cover__background', overlayColorClass, dimRatioToClass(dimRatio), { 'has-background-dim': dimRatio !== undefined, @@ -13902,7 +14665,7 @@ function cover_save_save({ [gradientClass]: gradientClass }), style: bgStyle - }), !useFeaturedImage && isImageBackground && url && (isImgElement ? (0,external_wp_element_namespaceObject.createElement)("img", { + }), !useFeaturedImage && isImageBackground && url && (isImgElement ? (0,external_React_namespaceObject.createElement)("img", { className: imgClasses, alt: alt, src: url, @@ -13911,14 +14674,15 @@ function cover_save_save({ }, "data-object-fit": "cover", "data-object-position": objectPosition - }) : (0,external_wp_element_namespaceObject.createElement)("div", { - role: "img", + }) : (0,external_React_namespaceObject.createElement)("div", { + role: alt ? 'img' : undefined, + "aria-label": alt ? alt : undefined, className: imgClasses, style: { backgroundPosition, backgroundImage } - })), isVideoBackground && url && (0,external_wp_element_namespaceObject.createElement)("video", { + })), isVideoBackground && url && (0,external_React_namespaceObject.createElement)("video", { className: classnames_default()('wp-block-cover__video-background', 'intrinsic-ignore'), autoPlay: true, muted: true, @@ -13930,7 +14694,7 @@ function cover_save_save({ }, "data-object-fit": "cover", "data-object-position": objectPosition - }), (0,external_wp_element_namespaceObject.createElement)("div", { + }), (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({ className: 'wp-block-cover__inner-container' }) @@ -14185,7 +14949,7 @@ const cover_transforms_transforms = { } }] }; -/* harmony default export */ var cover_transforms = (cover_transforms_transforms); +/* harmony default export */ const cover_transforms = (cover_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/variations.js /** @@ -14205,7 +14969,7 @@ const variations_variations = [{ isDefault: true, icon: library_cover }]; -/* harmony default export */ var cover_variations = (variations_variations); +/* harmony default export */ const cover_variations = (variations_variations); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/index.js /** @@ -14241,9 +15005,6 @@ const cover_metadata = { }, alt: { type: "string", - source: "attribute", - selector: "img", - attribute: "alt", "default": "" }, hasParallax: { @@ -14264,6 +15025,9 @@ const cover_metadata = { customOverlayColor: { type: "string" }, + isUserOverlayColor: { + type: "boolean" + }, backgroundType: { type: "string", "default": "image" @@ -14336,6 +15100,9 @@ const cover_metadata = { __experimentalSkipSerialization: ["gradients"], enableContrastChecker: false }, + dimensions: { + aspectRatio: true + }, typography: { fontSize: true, lineHeight: true, @@ -14351,6 +15118,9 @@ const cover_metadata = { }, layout: { allowJustification: false + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-cover-editor", @@ -14405,17 +15175,17 @@ const cover_init = () => initBlock({ * WordPress dependencies */ -const details = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const details = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M4 16h10v1.5H4V16Zm0-4.5h16V13H4v-1.5ZM10 7h10v1.5H10V7Z", fillRule: "evenodd", clipRule: "evenodd" -}), (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}), (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "m4 5.25 4 2.5-4 2.5v-5Z" })); -/* harmony default export */ var library_details = (details); +/* harmony default export */ const library_details = (details); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/details/edit.js @@ -14453,20 +15223,20 @@ function DetailsEdit({ /* Sets deep to true to also find blocks inside the details content block. */ return hasSelectedInnerBlock(clientId, true) || isBlockSelected(clientId); }, [clientId]); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { label: (0,external_wp_i18n_namespaceObject.__)('Open by default'), checked: showContent, onChange: () => setAttributes({ showContent: !showContent }) - }))), (0,external_wp_element_namespaceObject.createElement)("details", { + }))), (0,external_React_namespaceObject.createElement)("details", { ...innerBlocksProps, open: hasSelection || showContent - }, (0,external_wp_element_namespaceObject.createElement)("summary", { + }, (0,external_React_namespaceObject.createElement)("summary", { onClick: event => event.preventDefault() - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { "aria-label": (0,external_wp_i18n_namespaceObject.__)('Write summary'), placeholder: (0,external_wp_i18n_namespaceObject.__)('Write summary…'), allowedFormats: [], @@ -14474,11 +15244,10 @@ function DetailsEdit({ value: summary, onChange: newSummary => setAttributes({ summary: newSummary - }), - multiline: false + }) })), innerBlocksProps.children)); } -/* harmony default export */ var details_edit = (DetailsEdit); +/* harmony default export */ const details_edit = (DetailsEdit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/details/save.js @@ -14494,12 +15263,12 @@ function details_save_save({ } = attributes; const summary = attributes.summary ? attributes.summary : 'Details'; const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save(); - return (0,external_wp_element_namespaceObject.createElement)("details", { + return (0,external_React_namespaceObject.createElement)("details", { ...blockProps, open: showContent - }, (0,external_wp_element_namespaceObject.createElement)("summary", null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)("summary", null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: summary - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/details/index.js @@ -14528,8 +15297,8 @@ const details_metadata = { "default": false }, summary: { - type: "string", - source: "html", + type: "rich-text", + source: "rich-text", selector: "summary" } }, @@ -14573,6 +15342,9 @@ const details_metadata = { }, layout: { allowEditing: false + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-details-editor", @@ -14613,13 +15385,13 @@ const details_init = () => initBlock({ * WordPress dependencies */ -const pencil = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const pencil = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z" })); -/* harmony default export */ var library_pencil = (pencil); +/* harmony default export */ const library_pencil = (pencil); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/edit.js /** @@ -14627,7 +15399,7 @@ const pencil = (0,external_wp_element_namespaceObject.createElement)(external_wp */ -/* harmony default export */ var library_edit = (library_pencil); +/* harmony default export */ const library_edit = (library_pencil); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/embed-controls.js @@ -14648,22 +15420,22 @@ const EmbedControls = ({ allowResponsive, toggleResponsive, switchBackToURLInput -}) => (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, showEditButton && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { +}) => (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, showEditButton && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { className: "components-toolbar__control", label: (0,external_wp_i18n_namespaceObject.__)('Edit URL'), icon: library_edit, onClick: switchBackToURLInput -}))), themeSupportsResponsive && blockSupportsResponsive && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { +}))), themeSupportsResponsive && blockSupportsResponsive && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Media settings'), className: "blocks-responsive" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Resize for smaller devices'), checked: allowResponsive, help: getResponsiveHelp, onChange: toggleResponsive })))); -/* harmony default export */ var embed_controls = (EmbedControls); +/* harmony default export */ const embed_controls = (EmbedControls); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/icons.js @@ -14671,165 +15443,165 @@ const EmbedControls = ({ * WordPress dependencies */ -const embedContentIcon = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +const embedContentIcon = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zm-6-9.5L16 12l-2.5 2.8 1.1 1L18 12l-3.5-3.5-1 1zm-3 0l-1-1L6 12l3.5 3.8 1.1-1L8 12l2.5-2.5z" })); -const embedAudioIcon = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +const embedAudioIcon = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM13.2 7.7c-.4.4-.7 1.1-.7 1.9v3.7c-.4-.3-.8-.4-1.3-.4-1.2 0-2.2 1-2.2 2.2 0 1.2 1 2.2 2.2 2.2.5 0 1-.2 1.4-.5.9-.6 1.4-1.6 1.4-2.6V9.6c0-.4.1-.6.2-.8.3-.3 1-.3 1.6-.3h.2V7h-.2c-.7 0-1.8 0-2.6.7z" })); -const embedPhotoIcon = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +const embedPhotoIcon = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9.2 4.5H19c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V9.8l4.6-5.3zm9.8 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z" })); -const embedVideoIcon = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +const embedVideoIcon = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM10 15l5-3-5-3v6z" })); const embedTwitterIcon = { foreground: '#1da1f2', - src: (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { + src: (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.G, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.G, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M22.23 5.924c-.736.326-1.527.547-2.357.646.847-.508 1.498-1.312 1.804-2.27-.793.47-1.67.812-2.606.996C18.325 4.498 17.258 4 16.078 4c-2.266 0-4.103 1.837-4.103 4.103 0 .322.036.635.106.935-3.41-.17-6.433-1.804-8.457-4.287-.353.607-.556 1.312-.556 2.064 0 1.424.724 2.68 1.825 3.415-.673-.022-1.305-.207-1.86-.514v.052c0 1.988 1.415 3.647 3.293 4.023-.344.095-.707.145-1.08.145-.265 0-.522-.026-.773-.074.522 1.63 2.038 2.817 3.833 2.85-1.404 1.1-3.174 1.757-5.096 1.757-.332 0-.66-.02-.98-.057 1.816 1.164 3.973 1.843 6.29 1.843 7.547 0 11.675-6.252 11.675-11.675 0-.178-.004-.355-.012-.53.802-.578 1.497-1.3 2.047-2.124z" }))) }; const embedYouTubeIcon = { foreground: '#ff0000', - src: (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { + src: (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M21.8 8s-.195-1.377-.795-1.984c-.76-.797-1.613-.8-2.004-.847-2.798-.203-6.996-.203-6.996-.203h-.01s-4.197 0-6.996.202c-.39.046-1.242.05-2.003.846C2.395 6.623 2.2 8 2.2 8S2 9.62 2 11.24v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.76.797 1.76.77 2.205.855 1.6.153 6.8.2 6.8.2s4.203-.005 7-.208c.392-.047 1.244-.05 2.005-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517C22 9.62 21.8 8 21.8 8zM9.935 14.595v-5.62l5.403 2.82-5.403 2.8z" })) }; const embedFacebookIcon = { foreground: '#3b5998', - src: (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { + src: (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M20 3H4c-.6 0-1 .4-1 1v16c0 .5.4 1 1 1h8.6v-7h-2.3v-2.7h2.3v-2c0-2.3 1.4-3.6 3.5-3.6 1 0 1.8.1 2.1.1v2.4h-1.4c-1.1 0-1.3.5-1.3 1.3v1.7h2.7l-.4 2.8h-2.3v7H20c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1z" })) }; -const embedInstagramIcon = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +const embedInstagramIcon = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.G, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.G, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z" }))); const embedWordPressIcon = { foreground: '#0073AA', - src: (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { + src: (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.G, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.G, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M12.158 12.786l-2.698 7.84c.806.236 1.657.365 2.54.365 1.047 0 2.05-.18 2.986-.51-.024-.037-.046-.078-.065-.123l-2.762-7.57zM3.008 12c0 3.56 2.07 6.634 5.068 8.092L3.788 8.342c-.5 1.117-.78 2.354-.78 3.658zm15.06-.454c0-1.112-.398-1.88-.74-2.48-.456-.74-.883-1.368-.883-2.11 0-.825.627-1.595 1.51-1.595.04 0 .078.006.116.008-1.598-1.464-3.73-2.36-6.07-2.36-3.14 0-5.904 1.613-7.512 4.053.21.008.41.012.58.012.94 0 2.395-.114 2.395-.114.484-.028.54.684.057.74 0 0-.487.058-1.03.086l3.275 9.74 1.968-5.902-1.4-3.838c-.485-.028-.944-.085-.944-.085-.486-.03-.43-.77.056-.742 0 0 1.484.114 2.368.114.94 0 2.397-.114 2.397-.114.486-.028.543.684.058.74 0 0-.488.058-1.03.086l3.25 9.665.897-2.997c.456-1.17.684-2.137.684-2.907zm1.82-3.86c.04.286.06.593.06.924 0 .912-.17 1.938-.683 3.22l-2.746 7.94c2.672-1.558 4.47-4.454 4.47-7.77 0-1.564-.4-3.033-1.1-4.314zM12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10z" }))) }; const embedSpotifyIcon = { foreground: '#1db954', - src: (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { + src: (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m4.586 14.424c-.18.295-.563.387-.857.207-2.35-1.434-5.305-1.76-8.786-.963-.335.077-.67-.133-.746-.47-.077-.334.132-.67.47-.745 3.808-.87 7.076-.496 9.712 1.115.293.18.386.563.206.857M17.81 13.7c-.226.367-.706.482-1.072.257-2.687-1.652-6.785-2.13-9.965-1.166-.413.127-.848-.106-.973-.517-.125-.413.108-.848.52-.973 3.632-1.102 8.147-.568 11.234 1.328.366.226.48.707.256 1.072m.105-2.835C14.692 8.95 9.375 8.775 6.297 9.71c-.493.15-1.016-.13-1.166-.624-.148-.495.13-1.017.625-1.167 3.532-1.073 9.404-.866 13.115 1.337.445.264.59.838.327 1.282-.264.443-.838.59-1.282.325" })) }; -const embedFlickrIcon = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +const embedFlickrIcon = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "m6.5 7c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5zm11 0c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5z" })); const embedVimeoIcon = { foreground: '#1ab7ea', - src: (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { + src: (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.G, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.G, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M22.396 7.164c-.093 2.026-1.507 4.8-4.245 8.32C15.323 19.16 12.93 21 10.97 21c-1.214 0-2.24-1.12-3.08-3.36-.56-2.052-1.118-4.105-1.68-6.158-.622-2.24-1.29-3.36-2.004-3.36-.156 0-.7.328-1.634.98l-.978-1.26c1.027-.903 2.04-1.806 3.037-2.71C6 3.95 7.03 3.328 7.716 3.265c1.62-.156 2.616.95 2.99 3.32.404 2.558.685 4.148.84 4.77.468 2.12.982 3.18 1.543 3.18.435 0 1.09-.687 1.963-2.064.872-1.376 1.34-2.422 1.402-3.142.125-1.187-.343-1.782-1.4-1.782-.5 0-1.013.115-1.542.34 1.023-3.35 2.977-4.976 5.862-4.883 2.14.063 3.148 1.45 3.024 4.16z" }))) }; -const embedRedditIcon = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +const embedRedditIcon = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M22 12.068a2.184 2.184 0 0 0-2.186-2.186c-.592 0-1.13.233-1.524.609-1.505-1.075-3.566-1.774-5.86-1.864l1.004-4.695 3.261.699A1.56 1.56 0 1 0 18.255 3c-.61-.001-1.147.357-1.398.877l-3.638-.77a.382.382 0 0 0-.287.053.348.348 0 0 0-.161.251l-1.112 5.233c-2.33.072-4.426.77-5.95 1.864a2.201 2.201 0 0 0-1.523-.61 2.184 2.184 0 0 0-.896 4.176c-.036.215-.053.43-.053.663 0 3.37 3.924 6.111 8.763 6.111s8.763-2.724 8.763-6.11c0-.216-.017-.449-.053-.664A2.207 2.207 0 0 0 22 12.068Zm-15.018 1.56a1.56 1.56 0 0 1 3.118 0c0 .86-.699 1.558-1.559 1.558-.86.018-1.559-.699-1.559-1.559Zm8.728 4.139c-1.076 1.075-3.119 1.147-3.71 1.147-.61 0-2.652-.09-3.71-1.147a.4.4 0 0 1 0-.573.4.4 0 0 1 .574 0c.68.68 2.114.914 3.136.914 1.022 0 2.473-.233 3.136-.914a.4.4 0 0 1 .574 0 .436.436 0 0 1 0 .573Zm-.287-2.563a1.56 1.56 0 0 1 0-3.118c.86 0 1.56.699 1.56 1.56 0 .841-.7 1.558-1.56 1.558Z" })); const embedTumblrIcon = { foreground: '#35465c', - src: (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { + src: (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M19 3H5a2 2 0 00-2 2v14c0 1.1.9 2 2 2h14a2 2 0 002-2V5a2 2 0 00-2-2zm-5.69 14.66c-2.72 0-3.1-1.9-3.1-3.16v-3.56H8.49V8.99c1.7-.62 2.54-1.99 2.64-2.87 0-.06.06-.41.06-.58h1.9v3.1h2.17v2.3h-2.18v3.1c0 .47.13 1.3 1.2 1.26h1.1v2.36c-1.01.02-2.07 0-2.07 0z" })) }; -const embedAmazonIcon = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +const embedAmazonIcon = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M18.42 14.58c-.51-.66-1.05-1.23-1.05-2.5V7.87c0-1.8.15-3.45-1.2-4.68-1.05-1.02-2.79-1.35-4.14-1.35-2.6 0-5.52.96-6.12 4.14-.06.36.18.54.4.57l2.66.3c.24-.03.42-.27.48-.5.24-1.12 1.17-1.63 2.2-1.63.56 0 1.22.21 1.55.7.4.56.33 1.31.33 1.97v.36c-1.59.18-3.66.27-5.16.93a4.63 4.63 0 0 0-2.93 4.44c0 2.82 1.8 4.23 4.1 4.23 1.95 0 3.03-.45 4.53-1.98.51.72.66 1.08 1.59 1.83.18.09.45.09.63-.1v.04l2.1-1.8c.24-.21.2-.48.03-.75zm-5.4-1.2c-.45.75-1.14 1.23-1.92 1.23-1.05 0-1.65-.81-1.65-1.98 0-2.31 2.1-2.73 4.08-2.73v.6c0 1.05.03 1.92-.5 2.88z" -}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { +}), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M21.69 19.2a17.62 17.62 0 0 1-21.6-1.57c-.23-.2 0-.5.28-.33a23.88 23.88 0 0 0 20.93 1.3c.45-.19.84.3.39.6z" -}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { +}), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M22.8 17.96c-.36-.45-2.22-.2-3.1-.12-.23.03-.3-.18-.05-.36 1.5-1.05 3.96-.75 4.26-.39.3.36-.1 2.82-1.5 4.02-.21.18-.42.1-.3-.15.3-.8 1.02-2.58.69-3z" })); -const embedAnimotoIcon = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +const embedAnimotoIcon = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "m.0206909 21 19.8160091-13.07806 3.5831 6.20826z", fill: "#4bc7ee" -}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { +}), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "m23.7254 19.0205-10.1074-17.18468c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418h22.5655c1.279 0 1.8019-.8905 1.1599-1.9795z", fill: "#d4cdcb" -}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { +}), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "m.0206909 21 15.2439091-16.38571 4.3029 7.32271z", fill: "#c3d82e" -}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { +}), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "m13.618 1.83582c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418 15.2646-16.38573z", fill: "#e4ecb0" -}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { +}), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "m.0206909 21 19.5468091-9.063 1.6621 2.8344z", fill: "#209dbd" -}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { +}), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "m.0206909 21 17.9209091-11.82623 1.6259 2.76323z", fill: "#7cb3c9" })); -const embedDailymotionIcon = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +const embedDailymotionIcon = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { - d: "m12.1479 18.5957c-2.4949 0-4.28131-1.7558-4.28131-4.0658 0-2.2176 1.78641-4.0965 4.09651-4.0965 2.2793 0 4.0349 1.7864 4.0349 4.1581 0 2.2794-1.7556 4.0042-3.8501 4.0042zm8.3521-18.5957-4.5329 1v7c-1.1088-1.41691-2.8028-1.8787-4.8049-1.8787-2.09443 0-3.97329.76993-5.5133 2.27917-1.72483 1.66323-2.6489 3.78863-2.6489 6.16033 0 2.5873.98562 4.8049 2.89526 6.499 1.44763 1.2936 3.17251 1.9402 5.17454 1.9402 1.9713 0 3.4498-.5236 4.8973-1.9402v1.9402h4.5329c0-7.6359 0-15.3641 0-23z", +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { + d: "M11.903 16.568c-1.82 0-3.124-1.281-3.124-2.967a2.987 2.987 0 0 1 2.989-2.989c1.663 0 2.944 1.304 2.944 3.034 0 1.663-1.281 2.922-2.81 2.922ZM17.997 3l-3.308.73v5.107c-.809-1.034-2.045-1.37-3.505-1.37-1.529 0-2.9.561-4.023 1.662-1.259 1.214-1.933 2.764-1.933 4.495 0 1.888.72 3.506 2.113 4.742 1.056.944 2.314 1.415 3.775 1.415 1.438 0 2.517-.382 3.573-1.415v1.415h3.308V3Z", fill: "#333436" })); -const embedPinterestIcon = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +const embedPinterestIcon = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2" })); -const embedWolframIcon = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +const embedWolframIcon = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 44 44" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M32.59521,22.001l4.31885-4.84473-6.34131-1.38379.646-6.459-5.94336,2.61035L22,6.31934l-3.27344,5.60351L12.78418,9.3125l.645,6.458L7.08643,17.15234,11.40479,21.999,7.08594,26.84375l6.34131,1.38379-.64551,6.458,5.94287-2.60938L22,37.68066l3.27344-5.60351,5.94287,2.61035-.64551-6.458,6.34277-1.38183Zm.44385,2.75244L30.772,23.97827l-1.59558-2.07391,1.97888.735Zm-8.82147,6.1579L22.75,33.424V30.88977l1.52228-2.22168ZM18.56226,13.48816,19.819,15.09534l-2.49219-.88642L15.94037,12.337Zm6.87719.00116,2.62043-1.15027-1.38654,1.86981L24.183,15.0946Zm3.59357,2.6029-1.22546,1.7381.07525-2.73486,1.44507-1.94867ZM22,29.33008l-2.16406-3.15686L22,23.23688l2.16406,2.93634Zm-4.25458-9.582-.10528-3.836,3.60986,1.284v3.73242Zm5.00458-2.552,3.60986-1.284-.10528,3.836L22.75,20.92853Zm-7.78174-1.10559-.29352-2.94263,1.44245,1.94739.07519,2.73321Zm2.30982,5.08319,3.50817,1.18164-2.16247,2.9342-3.678-1.08447Zm2.4486,7.49285L21.25,30.88977v2.53485L19.78052,30.91Zm3.48707-6.31121,3.50817-1.18164,2.33228,3.03137-3.678,1.08447Zm10.87219-4.28113-2.714,3.04529L28.16418,19.928l1.92176-2.72565ZM24.06036,12.81769l-2.06012,2.6322-2.059-2.63318L22,9.292ZM9.91455,18.07227l4.00079-.87195,1.921,2.72735-3.20794,1.19019Zm2.93024,4.565,1.9801-.73462L13.228,23.97827l-2.26838.77429Zm-1.55591,3.58819L13.701,25.4021l2.64935.78058-2.14447.67853Zm3.64868,1.977L18.19,27.17334l.08313,3.46332L14.52979,32.2793Zm10.7876,2.43549.08447-3.464,3.25165,1.03052.407,4.07684Zm4.06824-3.77478-2.14545-.68,2.65063-.781,2.41266.825Z" })); const embedPocketCastsIcon = { foreground: '#f43e37', - src: (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { + src: (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M24,12A12,12,0,1,1,12,0,12,12,0,0,1,24,12Z" - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M2.67,12a9.33,9.33,0,0,1,18.66,0H19a7,7,0,1,0-7,7v2.33A9.33,9.33,0,0,1,2.67,12ZM12,17.6A5.6,5.6,0,1,1,17.6,12h-2A3.56,3.56,0,1,0,12,15.56Z", @@ -14843,10 +15615,10 @@ const embedPocketCastsIcon = { * WordPress dependencies */ -const EmbedLoading = () => (0,external_wp_element_namespaceObject.createElement)("div", { +const EmbedLoading = () => (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-embed is-loading" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null)); -/* harmony default export */ var embed_loading = (EmbedLoading); +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null)); +/* harmony default export */ const embed_loading = (EmbedLoading); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/embed-placeholder.js @@ -14866,43 +15638,43 @@ const EmbedPlaceholder = ({ fallback, tryAgain }) => { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { - icon: (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { + icon: (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: icon, showColors: true }), label: label, className: "wp-block-embed", instructions: (0,external_wp_i18n_namespaceObject.__)('Paste a link to the content you want to display on your site.') - }, (0,external_wp_element_namespaceObject.createElement)("form", { + }, (0,external_React_namespaceObject.createElement)("form", { onSubmit: onSubmit - }, (0,external_wp_element_namespaceObject.createElement)("input", { + }, (0,external_React_namespaceObject.createElement)("input", { type: "url", value: value || '', className: "components-placeholder__input", "aria-label": label, placeholder: (0,external_wp_i18n_namespaceObject.__)('Enter URL to embed here…'), onChange: onChange - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { variant: "primary", type: "submit" - }, (0,external_wp_i18n_namespaceObject._x)('Embed', 'button label'))), (0,external_wp_element_namespaceObject.createElement)("div", { - className: "components-placeholder__learn-more" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, { + }, (0,external_wp_i18n_namespaceObject._x)('Embed', 'button label'))), (0,external_React_namespaceObject.createElement)("div", { + className: "wp-block-embed__learn-more" + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, { href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/documentation/article/embeds/') - }, (0,external_wp_i18n_namespaceObject.__)('Learn more about embeds'))), cannotEmbed && (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_wp_i18n_namespaceObject.__)('Learn more about embeds'))), cannotEmbed && (0,external_React_namespaceObject.createElement)("div", { className: "components-placeholder__error" - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { className: "components-placeholder__instructions" - }, (0,external_wp_i18n_namespaceObject.__)('Sorry, this content could not be embedded.')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, (0,external_wp_i18n_namespaceObject.__)('Sorry, this content could not be embedded.')), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { variant: "secondary", onClick: tryAgain - }, (0,external_wp_i18n_namespaceObject._x)('Try again', 'button label')), ' ', (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, (0,external_wp_i18n_namespaceObject._x)('Try again', 'button label')), ' ', (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { variant: "secondary", onClick: fallback }, (0,external_wp_i18n_namespaceObject._x)('Convert to link', 'button label')))); }; -/* harmony default export */ var embed_placeholder = (EmbedPlaceholder); +/* harmony default export */ const embed_placeholder = (EmbedPlaceholder); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/wp-embed-preview.js @@ -14912,7 +15684,7 @@ const EmbedPlaceholder = ({ -/** @typedef {import('@wordpress/element').WPSyntheticEvent} WPSyntheticEvent */ +/** @typedef {import('react').SyntheticEvent} SyntheticEvent */ const attributeMap = { class: 'className', @@ -14978,9 +15750,9 @@ function WpEmbedPreview({ defaultView.removeEventListener('message', resizeWPembeds); }; }, []); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-embed__wrapper" - }, (0,external_wp_element_namespaceObject.createElement)("iframe", { + }, (0,external_React_namespaceObject.createElement)("iframe", { ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([ref, (0,external_wp_compose_namespaceObject.useFocusableIframe)()]), title: props.title, ...props @@ -15073,40 +15845,40 @@ class EmbedPreview extends external_wp_element_namespaceObject.Component { // as far as the user is concerned. We're just catching the first click so that // the block can be selected without interacting with the embed preview that the overlay covers. /* eslint-disable jsx-a11y/no-static-element-interactions */ - const embedWrapper = 'wp-embed' === type ? (0,external_wp_element_namespaceObject.createElement)(WpEmbedPreview, { + const embedWrapper = 'wp-embed' === type ? (0,external_React_namespaceObject.createElement)(WpEmbedPreview, { html: html - }) : (0,external_wp_element_namespaceObject.createElement)("div", { + }) : (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-embed__wrapper" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SandBox, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SandBox, { html: html, scripts: scripts, title: iframeTitle, type: sandboxClassnames, onFocus: this.hideOverlay - }), !interactive && (0,external_wp_element_namespaceObject.createElement)("div", { + }), !interactive && (0,external_React_namespaceObject.createElement)("div", { className: "block-library-embed__interactive-overlay", onMouseUp: this.hideOverlay })); /* eslint-enable jsx-a11y/no-static-element-interactions */ - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { className: dedupe_default()(className, 'wp-block-embed', { 'is-type-video': 'video' === type }) - }, previewable ? embedWrapper : (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { - icon: (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { + }, previewable ? embedWrapper : (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { + icon: (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: icon, showColors: true }), label: label - }, (0,external_wp_element_namespaceObject.createElement)("p", { + }, (0,external_React_namespaceObject.createElement)("p", { className: "components-placeholder__error" - }, (0,external_wp_element_namespaceObject.createElement)("a", { + }, (0,external_React_namespaceObject.createElement)("a", { href: url - }, url)), (0,external_wp_element_namespaceObject.createElement)("p", { + }, url)), (0,external_React_namespaceObject.createElement)("p", { className: "components-placeholder__error" }, (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: host providing embed content e.g: www.youtube.com */ - (0,external_wp_i18n_namespaceObject.__)("Embedded content from %s can't be previewed in the editor."), parsedHostBaseUrl))), (!external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) || isSelected) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + (0,external_wp_i18n_namespaceObject.__)("Embedded content from %s can't be previewed in the editor."), parsedHostBaseUrl))), (!external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) || isSelected) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { identifier: "caption", tagName: "figcaption", className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'), @@ -15118,7 +15890,7 @@ class EmbedPreview extends external_wp_element_namespaceObject.Component { })); } } -/* harmony default export */ var embed_preview = (EmbedPreview); +/* harmony default export */ const embed_preview = (EmbedPreview); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/edit.js @@ -15232,9 +16004,10 @@ const EmbedEdit = props => { }); }; (0,external_wp_element_namespaceObject.useEffect)(() => { - if (!preview?.html || !cannotEmbed || fetching) { + if (preview?.html || !cannotEmbed || fetching) { return; } + // At this stage, we're not fetching the preview and know it can't be embedded, // so try removing any trailing slash, and resubmit. const newURL = attributesUrl.replace(/\/$/, ''); @@ -15243,7 +16016,7 @@ const EmbedEdit = props => { setAttributes({ url: newURL }); - }, [preview?.html, attributesUrl, cannotEmbed, fetching]); + }, [preview?.html, attributesUrl, cannotEmbed, fetching, setAttributes]); // Try a different provider in case the embed url is not supported. (0,external_wp_element_namespaceObject.useEffect)(() => { @@ -15278,9 +16051,9 @@ const EmbedEdit = props => { }, [preview, isEditingURL]); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); if (fetching) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, { + return (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(embed_loading, null)); + }, (0,external_React_namespaceObject.createElement)(embed_loading, null)); } // translators: %s: type of embed e.g: "YouTube", "Twitter", etc. "Embed" is used when no specific type exists @@ -15289,9 +16062,9 @@ const EmbedEdit = props => { // No preview, or we can't embed the current URL, or we've clicked the edit button. const showEmbedPlaceholder = !preview || cannotEmbed || isEditingURL; if (showEmbedPlaceholder) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, { + return (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(embed_placeholder, { + }, (0,external_React_namespaceObject.createElement)(embed_placeholder, { icon: icon, label: label, onFocus: onFocus, @@ -15334,16 +16107,16 @@ const EmbedEdit = props => { className: classFromPreview } = getMergedAttributes(); const className = classnames_default()(classFromPreview, props.className); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(embed_controls, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(embed_controls, { showEditButton: preview && !cannotEmbed, themeSupportsResponsive: themeSupportsResponsive, blockSupportsResponsive: responsive, allowResponsive: allowResponsive, toggleResponsive: toggleResponsive, switchBackToURLInput: () => setIsEditingURL(true) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, { + }), (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(embed_preview, { + }, (0,external_React_namespaceObject.createElement)(embed_preview, { preview: preview, previewable: previewable, className: className, @@ -15359,7 +16132,7 @@ const EmbedEdit = props => { insertBlocksAfter: insertBlocksAfter }))); }; -/* harmony default export */ var embed_edit = (EmbedEdit); +/* harmony default export */ const embed_edit = (EmbedEdit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/save.js @@ -15389,13 +16162,13 @@ function embed_save_save({ [`is-provider-${providerNameSlug}`]: providerNameSlug, [`wp-block-embed-${providerNameSlug}`]: providerNameSlug }); - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }) - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-embed__wrapper" - }, `\n${url}\n` /* URL needs to be on its own line. */), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, `\n${url}\n` /* URL needs to be on its own line. */), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'), tagName: "figcaption", value: caption @@ -15425,8 +16198,8 @@ const transforms_metadata = { __experimentalRole: "content" }, caption: { - type: "string", - source: "html", + type: "rich-text", + source: "rich-text", selector: "figcaption", __experimentalRole: "content" }, @@ -15457,6 +16230,9 @@ const transforms_metadata = { align: true, spacing: { margin: true + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-embed-editor", @@ -15499,7 +16275,7 @@ const embed_transforms_transforms = { } }] }; -/* harmony default export */ var embed_transforms = (embed_transforms_transforms); +/* harmony default export */ const embed_transforms = (embed_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/variations.js /** @@ -15894,7 +16670,7 @@ embed_variations_variations.forEach(variation => { if (variation.isActive) return; variation.isActive = (blockAttributes, variationAttributes) => blockAttributes.providerNameSlug === variationAttributes.providerNameSlug; }); -/* harmony default export */ var embed_variations = (embed_variations_variations); +/* harmony default export */ const embed_variations = (embed_variations_variations); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/deprecated.js @@ -15920,8 +16696,8 @@ const embed_deprecated_metadata = { __experimentalRole: "content" }, caption: { - type: "string", - source: "html", + type: "rich-text", + source: "rich-text", selector: "figcaption", __experimentalRole: "content" }, @@ -15952,6 +16728,9 @@ const embed_deprecated_metadata = { align: true, spacing: { margin: true + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-embed-editor", @@ -15986,13 +16765,13 @@ const deprecated_v2 = { [`is-provider-${providerNameSlug}`]: providerNameSlug, [`wp-block-embed-${providerNameSlug}`]: providerNameSlug }); - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }) - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-embed__wrapper" - }, `\n${url}\n` /* URL needs to be on its own line. */), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, `\n${url}\n` /* URL needs to be on its own line. */), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })); @@ -16015,16 +16794,16 @@ const embed_deprecated_v1 = { [`is-type-${type}`]: type, [`is-provider-${providerNameSlug}`]: providerNameSlug }); - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { className: embedClassName - }, `\n${url}\n` /* URL needs to be on its own line. */, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, `\n${url}\n` /* URL needs to be on its own line. */, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })); } }; const embed_deprecated_deprecated = [deprecated_v2, embed_deprecated_v1]; -/* harmony default export */ var embed_deprecated = (embed_deprecated_deprecated); +/* harmony default export */ const embed_deprecated = (embed_deprecated_deprecated); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/index.js /** @@ -16047,8 +16826,8 @@ const embed_metadata = { __experimentalRole: "content" }, caption: { - type: "string", - source: "html", + type: "rich-text", + source: "rich-text", selector: "figcaption", __experimentalRole: "content" }, @@ -16079,6 +16858,9 @@ const embed_metadata = { align: true, spacing: { margin: true + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-embed-editor", @@ -16112,13 +16894,15 @@ const embed_init = () => initBlock({ * WordPress dependencies */ -const file = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const file = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { - d: "M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5z" +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z" })); -/* harmony default export */ var library_file = (file); +/* harmony default export */ const library_file = (file); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/deprecated.js @@ -16207,9 +16991,9 @@ const deprecated_v3 = { // Only output an `aria-describedby` when the element it's referring to is // actually rendered. const describedById = hasFilename ? fileId : undefined; - return href && (0,external_wp_element_namespaceObject.createElement)("div", { + return href && (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save() - }, displayPreview && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("object", { + }, displayPreview && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("object", { className: "wp-block-file__embed", data: href, type: "application/pdf", @@ -16218,19 +17002,19 @@ const deprecated_v3 = { height: `${previewHeight}px` }, "aria-label": pdfEmbedLabel - })), hasFilename && (0,external_wp_element_namespaceObject.createElement)("a", { + })), hasFilename && (0,external_React_namespaceObject.createElement)("a", { id: describedById, href: textLinkHref, target: textLinkTarget, rel: textLinkTarget ? 'noreferrer noopener' : undefined - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: fileName - })), showDownloadButton && (0,external_wp_element_namespaceObject.createElement)("a", { + })), showDownloadButton && (0,external_React_namespaceObject.createElement)("a", { href: href, className: classnames_default()('wp-block-file__button', (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('button')), download: true, "aria-describedby": describedById - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: downloadButtonText }))); } @@ -16311,9 +17095,9 @@ const file_deprecated_v2 = { // Only output an `aria-describedby` when the element it's referring to is // actually rendered. const describedById = hasFilename ? fileId : undefined; - return href && (0,external_wp_element_namespaceObject.createElement)("div", { + return href && (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save() - }, displayPreview && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("object", { + }, displayPreview && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("object", { className: "wp-block-file__embed", data: href, type: "application/pdf", @@ -16322,19 +17106,19 @@ const file_deprecated_v2 = { height: `${previewHeight}px` }, "aria-label": pdfEmbedLabel - })), hasFilename && (0,external_wp_element_namespaceObject.createElement)("a", { + })), hasFilename && (0,external_React_namespaceObject.createElement)("a", { id: describedById, href: textLinkHref, target: textLinkTarget, rel: textLinkTarget ? 'noreferrer noopener' : undefined - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: fileName - })), showDownloadButton && (0,external_wp_element_namespaceObject.createElement)("a", { + })), showDownloadButton && (0,external_React_namespaceObject.createElement)("a", { href: href, className: "wp-block-file__button", download: true, "aria-describedby": describedById - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: downloadButtonText }))); } @@ -16402,9 +17186,9 @@ const file_deprecated_v1 = { } = attributes; const pdfEmbedLabel = external_wp_blockEditor_namespaceObject.RichText.isEmpty(fileName) ? (0,external_wp_i18n_namespaceObject.__)('PDF embed') : (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: filename. */ (0,external_wp_i18n_namespaceObject.__)('Embed of %s.'), fileName); - return href && (0,external_wp_element_namespaceObject.createElement)("div", { + return href && (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save() - }, displayPreview && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("object", { + }, displayPreview && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("object", { className: "wp-block-file__embed", data: href, type: "application/pdf", @@ -16413,23 +17197,23 @@ const file_deprecated_v1 = { height: `${previewHeight}px` }, "aria-label": pdfEmbedLabel - })), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(fileName) && (0,external_wp_element_namespaceObject.createElement)("a", { + })), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(fileName) && (0,external_React_namespaceObject.createElement)("a", { href: textLinkHref, target: textLinkTarget, rel: textLinkTarget ? 'noreferrer noopener' : undefined - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: fileName - })), showDownloadButton && (0,external_wp_element_namespaceObject.createElement)("a", { + })), showDownloadButton && (0,external_React_namespaceObject.createElement)("a", { href: href, className: "wp-block-file__button", download: true - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: downloadButtonText }))); } }; const file_deprecated_deprecated = [deprecated_v3, file_deprecated_v2, file_deprecated_v1]; -/* harmony default export */ var file_deprecated = (file_deprecated_deprecated); +/* harmony default export */ const file_deprecated = (file_deprecated_deprecated); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/inspector.js @@ -16474,15 +17258,15 @@ function FileBlockInspector({ label: (0,external_wp_i18n_namespaceObject.__)('Attachment page') }]; } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, href.endsWith('.pdf') && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, href.endsWith('.pdf') && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('PDF settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Show inline embed'), help: displayPreview ? (0,external_wp_i18n_namespaceObject.__)("Note: Most phone and tablet browsers won't display embedded PDFs.") : null, checked: !!displayPreview, onChange: changeDisplayPreview - }), displayPreview && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { + }), displayPreview && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)('Height in pixels'), @@ -16490,20 +17274,20 @@ function FileBlockInspector({ max: Math.max(MAX_PREVIEW_HEIGHT, previewHeight), value: previewHeight, onChange: changePreviewHeight - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + })), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Link to'), value: textLinkHref, options: linkDestinationOptions, onChange: changeLinkDestinationOption - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Open in new tab'), checked: openInNewWindow, onChange: changeOpenInNewWindow - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Show download button'), checked: showDownloadButton, @@ -16584,6 +17368,7 @@ const createActiveXObject = type => { */ + const MIN_PREVIEW_HEIGHT = 200; const MAX_PREVIEW_HEIGHT = 2000; function ClipboardToolbarButton({ @@ -16599,7 +17384,7 @@ function ClipboardToolbarButton({ type: 'snackbar' }); }); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { className: "components-clipboard-toolbar-button", ref: ref, disabled: disabled @@ -16613,7 +17398,6 @@ function FileEdit({ }) { const { id, - fileId, fileName, href, textLinkHref, @@ -16624,55 +17408,50 @@ function FileEdit({ previewHeight } = attributes; const { - media, - mediaUpload + getSettings + } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store); + const { + media } = (0,external_wp_data_namespaceObject.useSelect)(select => ({ - media: id === undefined ? undefined : select(external_wp_coreData_namespaceObject.store).getMedia(id), - mediaUpload: select(external_wp_blockEditor_namespaceObject.store).getSettings().mediaUpload + media: id === undefined ? undefined : select(external_wp_coreData_namespaceObject.store).getMedia(id) }), [id]); const { createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store); const { - toggleSelection, - __unstableMarkNextChangeAsNotPersistent + toggleSelection } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); (0,external_wp_element_namespaceObject.useEffect)(() => { // Upload a file drag-and-dropped into the editor. if ((0,external_wp_blob_namespaceObject.isBlobURL)(href)) { const file = (0,external_wp_blob_namespaceObject.getBlobByURL)(href); - mediaUpload({ + getSettings().mediaUpload({ filesList: [file], onFileChange: ([newMedia]) => onSelectFile(newMedia), onError: onUploadError }); (0,external_wp_blob_namespaceObject.revokeBlobURL)(href); } - if (downloadButtonText === undefined) { - changeDownloadButtonText((0,external_wp_i18n_namespaceObject._x)('Download', 'button label')); - } - }, []); - (0,external_wp_element_namespaceObject.useEffect)(() => { - if (!fileId && href) { - // Add a unique fileId to each file block. - __unstableMarkNextChangeAsNotPersistent(); + if (external_wp_blockEditor_namespaceObject.RichText.isEmpty(downloadButtonText)) { setAttributes({ - fileId: `wp-block-file--media-${clientId}` + downloadButtonText: (0,external_wp_i18n_namespaceObject._x)('Download', 'button label') }); } - }, [href, fileId, clientId]); + }, []); function onSelectFile(newMedia) { - if (newMedia && newMedia.url) { - const isPdf = newMedia.url.endsWith('.pdf'); - setAttributes({ - href: newMedia.url, - fileName: newMedia.title, - textLinkHref: newMedia.url, - id: newMedia.id, - displayPreview: isPdf ? true : undefined, - previewHeight: isPdf ? 600 : undefined - }); + if (!newMedia || !newMedia.url) { + return; } + const isPdf = newMedia.url.endsWith('.pdf'); + setAttributes({ + href: newMedia.url, + fileName: newMedia.title, + textLinkHref: newMedia.url, + id: newMedia.id, + displayPreview: isPdf ? true : undefined, + previewHeight: isPdf ? 600 : undefined, + fileId: `wp-block-file--media-${clientId}` + }); } function onUploadError(message) { setAttributes({ @@ -16698,12 +17477,6 @@ function FileEdit({ showDownloadButton: newValue }); } - function changeDownloadButtonText(newValue) { - // Remove anchor tags from button text content. - setAttributes({ - downloadButtonText: newValue.replace(/<\/?a[^>]*>/g, '') - }); - } function changeDisplayPreview(newValue) { setAttributes({ displayPreview: newValue @@ -16732,10 +17505,10 @@ function FileEdit({ }); const displayPreviewInEditor = browserSupportsPdfs() && displayPreview; if (!href) { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, { - icon: (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, { + icon: (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: library_file }), labels: { @@ -16747,7 +17520,7 @@ function FileEdit({ accept: "*" })); } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(FileBlockInspector, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(FileBlockInspector, { hrefs: { href, textLinkHref, @@ -16762,20 +17535,20 @@ function FileEdit({ changeDisplayPreview, previewHeight, changePreviewHeight - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + }), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, { mediaId: id, mediaURL: href, accept: "*", onSelect: onSelectFile, onError: onUploadError - }), (0,external_wp_element_namespaceObject.createElement)(ClipboardToolbarButton, { + }), (0,external_React_namespaceObject.createElement)(ClipboardToolbarButton, { text: href, disabled: (0,external_wp_blob_namespaceObject.isBlobURL)(href) - })), (0,external_wp_element_namespaceObject.createElement)("div", { + })), (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, displayPreviewInEditor && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ResizableBox, { + }, displayPreviewInEditor && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ResizableBox, { size: { height: previewHeight }, @@ -16796,27 +17569,27 @@ function FileEdit({ onResizeStart: () => toggleSelection(false), onResizeStop: handleOnResizeStop, showHandle: isSelected - }, (0,external_wp_element_namespaceObject.createElement)("object", { + }, (0,external_React_namespaceObject.createElement)("object", { className: "wp-block-file__preview", data: href, type: "application/pdf", "aria-label": (0,external_wp_i18n_namespaceObject.__)('Embed of the selected PDF file.') - }), !isSelected && (0,external_wp_element_namespaceObject.createElement)("div", { + }), !isSelected && (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-file__preview-overlay" - })), (0,external_wp_element_namespaceObject.createElement)("div", { + })), (0,external_React_namespaceObject.createElement)("div", { className: 'wp-block-file__content-wrapper' - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { tagName: "a", value: fileName, placeholder: (0,external_wp_i18n_namespaceObject.__)('Write file name…'), withoutInteractiveFormatting: true, onChange: text => setAttributes({ - fileName: text + fileName: removeAnchorTag(text) }), href: textLinkHref - }), showDownloadButton && (0,external_wp_element_namespaceObject.createElement)("div", { + }), showDownloadButton && (0,external_React_namespaceObject.createElement)("div", { className: 'wp-block-file__button-richtext-wrapper' - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { tagName: "div" // Must be block-level or else cursor disappears. , "aria-label": (0,external_wp_i18n_namespaceObject.__)('Download button text'), @@ -16824,10 +17597,12 @@ function FileEdit({ value: downloadButtonText, withoutInteractiveFormatting: true, placeholder: (0,external_wp_i18n_namespaceObject.__)('Add text…'), - onChange: text => changeDownloadButtonText(text) + onChange: text => setAttributes({ + downloadButtonText: removeAnchorTag(text) + }) }))))); } -/* harmony default export */ var file_edit = (FileEdit); +/* harmony default export */ const file_edit = (FileEdit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/save.js @@ -16854,15 +17629,18 @@ function file_save_save({ displayPreview, previewHeight } = attributes; - const pdfEmbedLabel = external_wp_blockEditor_namespaceObject.RichText.isEmpty(fileName) ? 'PDF embed' : fileName; + const pdfEmbedLabel = external_wp_blockEditor_namespaceObject.RichText.isEmpty(fileName) ? 'PDF embed' : + // To do: use toPlainText, but we need ensure it's RichTextData. See + // https://github.com/WordPress/gutenberg/pull/56710. + fileName.toString(); const hasFilename = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(fileName); // Only output an `aria-describedby` when the element it's referring to is // actually rendered. const describedById = hasFilename ? fileId : undefined; - return href && (0,external_wp_element_namespaceObject.createElement)("div", { + return href && (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save() - }, displayPreview && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("object", { + }, displayPreview && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("object", { className: "wp-block-file__embed", data: href, type: "application/pdf", @@ -16871,19 +17649,19 @@ function file_save_save({ height: `${previewHeight}px` }, "aria-label": pdfEmbedLabel - })), hasFilename && (0,external_wp_element_namespaceObject.createElement)("a", { + })), hasFilename && (0,external_React_namespaceObject.createElement)("a", { id: describedById, href: textLinkHref, target: textLinkTarget, rel: textLinkTarget ? 'noreferrer noopener' : undefined - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: fileName - })), showDownloadButton && (0,external_wp_element_namespaceObject.createElement)("a", { + })), showDownloadButton && (0,external_React_namespaceObject.createElement)("a", { href: href, className: classnames_default()('wp-block-file__button', (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('button')), download: true, "aria-describedby": describedById - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: downloadButtonText }))); } @@ -17028,7 +17806,7 @@ const file_transforms_transforms = { } }] }; -/* harmony default export */ var file_transforms = (file_transforms_transforms); +/* harmony default export */ const file_transforms = (file_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/index.js /** @@ -17066,8 +17844,8 @@ const file_metadata = { attribute: "id" }, fileName: { - type: "string", - source: "html", + type: "rich-text", + source: "rich-text", selector: "a:not([download])" }, textLinkHref: { @@ -17087,8 +17865,8 @@ const file_metadata = { "default": true }, downloadButtonText: { - type: "string", - source: "html", + type: "rich-text", + source: "rich-text", selector: "a[download]" }, displayPreview: { @@ -17117,7 +17895,6 @@ const file_metadata = { }, interactivity: true }, - viewScript: "file:./view.min.js", editorStyle: "wp-block-file-editor", style: "wp-block-file" }; @@ -17146,21 +17923,1175 @@ const file_init = () => initBlock({ settings: file_settings }); +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/form/utils.js +/** + * WordPress dependencies + */ + +const formSubmissionNotificationSuccess = ['core/form-submission-notification', { + type: 'success' +}, [['core/paragraph', { + content: '<mark style="background-color:rgba(0, 0, 0, 0);color:#345C00" class="has-inline-color">' + (0,external_wp_i18n_namespaceObject.__)('Your form has been submitted successfully') + '</mark>' +}]]]; +const formSubmissionNotificationError = ['core/form-submission-notification', { + type: 'error' +}, [['core/paragraph', { + content: '<mark style="background-color:rgba(0, 0, 0, 0);color:#CF2E2E" class="has-inline-color">' + (0,external_wp_i18n_namespaceObject.__)('There was an error submitting your form.') + '</mark>' +}]]]; + +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/form/edit.js + +/** + * WordPress dependencies + */ + + + + + +/** + * Internal dependencies + */ + +const form_edit_TEMPLATE = [formSubmissionNotificationSuccess, formSubmissionNotificationError, ['core/form-input', { + type: 'text', + label: (0,external_wp_i18n_namespaceObject.__)('Name'), + required: true +}], ['core/form-input', { + type: 'email', + label: (0,external_wp_i18n_namespaceObject.__)('Email'), + required: true +}], ['core/form-input', { + type: 'textarea', + label: (0,external_wp_i18n_namespaceObject.__)('Comment'), + required: true +}], ['core/form-submit-button', {}]]; +const form_edit_Edit = ({ + attributes, + setAttributes, + clientId +}) => { + const { + action, + method, + email, + submissionMethod + } = attributes; + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); + const { + hasInnerBlocks + } = (0,external_wp_data_namespaceObject.useSelect)(select => { + const { + getBlock + } = select(external_wp_blockEditor_namespaceObject.store); + const block = getBlock(clientId); + return { + hasInnerBlocks: !!(block && block.innerBlocks.length) + }; + }, [clientId]); + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, { + template: form_edit_TEMPLATE, + renderAppender: hasInnerBlocks ? undefined : external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender + }); + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + title: (0,external_wp_i18n_namespaceObject.__)('Settings') + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl + // __nextHasNoMarginBottom + // size={ '__unstable-large' } + , { + label: (0,external_wp_i18n_namespaceObject.__)('Submissions method'), + options: [ + // TODO: Allow plugins to add their own submission methods. + { + label: (0,external_wp_i18n_namespaceObject.__)('Send email'), + value: 'email' + }, { + label: (0,external_wp_i18n_namespaceObject.__)('- Custom -'), + value: 'custom' + }], + value: submissionMethod, + onChange: value => setAttributes({ + submissionMethod: value + }), + help: submissionMethod === 'custom' ? (0,external_wp_i18n_namespaceObject.__)('Select the method to use for form submissions. Additional options for the "custom" mode can be found in the "Advanced" section.') : (0,external_wp_i18n_namespaceObject.__)('Select the method to use for form submissions.') + }), submissionMethod === 'email' && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + __nextHasNoMarginBottom: true, + autoComplete: "off", + label: (0,external_wp_i18n_namespaceObject.__)('Email for form submissions'), + value: email, + required: true, + onChange: value => { + setAttributes({ + email: value + }); + setAttributes({ + action: `mailto:${value}` + }); + setAttributes({ + method: 'post' + }); + }, + help: (0,external_wp_i18n_namespaceObject.__)('The email address where form submissions will be sent. Separate multiple email addresses with a comma.') + }))), submissionMethod !== 'email' && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { + group: "advanced" + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { + __nextHasNoMarginBottom: true, + label: (0,external_wp_i18n_namespaceObject.__)('Method'), + options: [{ + label: 'Get', + value: 'get' + }, { + label: 'Post', + value: 'post' + }], + value: method, + onChange: value => setAttributes({ + method: value + }), + help: (0,external_wp_i18n_namespaceObject.__)('Select the method to use for form submissions.') + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + __nextHasNoMarginBottom: true, + autoComplete: "off", + label: (0,external_wp_i18n_namespaceObject.__)('Form action'), + value: action, + onChange: newVal => { + setAttributes({ + action: newVal + }); + }, + help: (0,external_wp_i18n_namespaceObject.__)('The URL where the form should be submitted.') + })), (0,external_React_namespaceObject.createElement)("form", { + ...innerBlocksProps, + className: "wp-block-form", + encType: submissionMethod === 'email' ? 'text/plain' : null + })); +}; +/* harmony default export */ const form_edit = (form_edit_Edit); + +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/form/save.js + +/** + * WordPress dependencies + */ + +const Save = ({ + attributes +}) => { + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save(); + const { + submissionMethod + } = attributes; + return (0,external_React_namespaceObject.createElement)("form", { + ...blockProps, + className: "wp-block-form", + encType: submissionMethod === 'email' ? 'text/plain' : null + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); +}; +/* harmony default export */ const form_save = (Save); + +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/form/variations.js +/** + * WordPress dependencies + */ + +/** + * Internal dependencies + */ + +const form_variations_variations = [{ + name: 'comment-form', + title: (0,external_wp_i18n_namespaceObject.__)('Experimental Comment form'), + description: (0,external_wp_i18n_namespaceObject.__)('A comment form for posts and pages.'), + attributes: { + submissionMethod: 'custom', + action: '{SITE_URL}/wp-comments-post.php', + method: 'post', + anchor: 'comment-form' + }, + isDefault: false, + innerBlocks: [['core/form-input', { + type: 'text', + name: 'author', + label: (0,external_wp_i18n_namespaceObject.__)('Name'), + required: true, + visibilityPermissions: 'logged-out' + }], ['core/form-input', { + type: 'email', + name: 'email', + label: (0,external_wp_i18n_namespaceObject.__)('Email'), + required: true, + visibilityPermissions: 'logged-out' + }], ['core/form-input', { + type: 'textarea', + name: 'comment', + label: (0,external_wp_i18n_namespaceObject.__)('Comment'), + required: true, + visibilityPermissions: 'all' + }], ['core/form-submit-button', {}]], + scope: ['inserter', 'transform'], + isActive: blockAttributes => !blockAttributes?.type || blockAttributes?.type === 'text' +}, { + name: 'wp-privacy-form', + title: (0,external_wp_i18n_namespaceObject.__)('Experimental privacy request form'), + keywords: ['GDPR'], + description: (0,external_wp_i18n_namespaceObject.__)('A form to request data exports and/or deletion.'), + attributes: { + submissionMethod: 'custom', + action: '', + method: 'post', + anchor: 'gdpr-form' + }, + isDefault: false, + innerBlocks: [formSubmissionNotificationSuccess, formSubmissionNotificationError, ['core/paragraph', { + content: (0,external_wp_i18n_namespaceObject.__)('To request an export or deletion of your personal data on this site, please fill-in the form below. You can define the type of request you wish to perform, and your email address. Once the form is submitted, you will receive a confirmation email with instructions on the next steps.') + }], ['core/form-input', { + type: 'email', + name: 'email', + label: (0,external_wp_i18n_namespaceObject.__)('Enter your email address.'), + required: true, + visibilityPermissions: 'all' + }], ['core/form-input', { + type: 'checkbox', + name: 'export_personal_data', + label: (0,external_wp_i18n_namespaceObject.__)('Request data export'), + required: false, + visibilityPermissions: 'all' + }], ['core/form-input', { + type: 'checkbox', + name: 'remove_personal_data', + label: (0,external_wp_i18n_namespaceObject.__)('Request data deletion'), + required: false, + visibilityPermissions: 'all' + }], ['core/form-submit-button', {}], ['core/form-input', { + type: 'hidden', + name: 'wp-action', + value: 'wp_privacy_send_request' + }], ['core/form-input', { + type: 'hidden', + name: 'wp-privacy-request', + value: '1' + }]], + scope: ['inserter', 'transform'], + isActive: blockAttributes => !blockAttributes?.type || blockAttributes?.type === 'text' +}]; +/* harmony default export */ const form_variations = (form_variations_variations); + +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/form/index.js +/** + * Internal dependencies + */ + + +const form_metadata = { + $schema: "https://schemas.wp.org/trunk/block.json", + apiVersion: 3, + __experimental: true, + name: "core/form", + title: "Form", + category: "common", + allowedBlocks: ["core/paragraph", "core/heading", "core/form-input", "core/form-submit-button", "core/form-submission-notification", "core/group", "core/columns"], + description: "A form.", + keywords: ["container", "wrapper", "row", "section"], + textdomain: "default", + icon: "feedback", + attributes: { + submissionMethod: { + type: "string", + "default": "email" + }, + method: { + type: "string", + "default": "post" + }, + action: { + type: "string" + }, + email: { + type: "string" + } + }, + supports: { + anchor: true, + className: false, + color: { + gradients: true, + link: true, + __experimentalDefaultControls: { + background: true, + text: true, + link: true + } + }, + spacing: { + margin: true, + padding: true + }, + typography: { + fontSize: true, + lineHeight: true, + __experimentalFontFamily: true, + __experimentalTextDecoration: true, + __experimentalFontStyle: true, + __experimentalFontWeight: true, + __experimentalLetterSpacing: true, + __experimentalTextTransform: true, + __experimentalDefaultControls: { + fontSize: true + } + }, + __experimentalSelector: "form" + }, + viewScript: "file:./view.min.js" +}; + + + +/** + * WordPress dependencies + */ + +const { + name: form_name +} = form_metadata; + +const form_settings = { + edit: form_edit, + save: form_save, + variations: form_variations +}; +const form_init = () => { + // Prevent adding forms inside forms. + const DISALLOWED_PARENTS = ['core/form']; + (0,external_wp_hooks_namespaceObject.addFilter)('blockEditor.__unstableCanInsertBlockType', 'core/block-library/preventInsertingFormIntoAnotherForm', (canInsert, blockType, rootClientId, { + getBlock, + getBlockParentsByBlockName + }) => { + if (blockType.name !== 'core/form') { + return canInsert; + } + for (const disallowedParentType of DISALLOWED_PARENTS) { + const hasDisallowedParent = getBlock(rootClientId)?.name === disallowedParentType || getBlockParentsByBlockName(rootClientId, disallowedParentType).length; + if (hasDisallowedParent) { + return false; + } + } + return true; + }); + return initBlock({ + name: form_name, + metadata: form_metadata, + settings: form_settings + }); +}; + +// EXTERNAL MODULE: ./node_modules/remove-accents/index.js +var remove_accents = __webpack_require__(9681); +var remove_accents_default = /*#__PURE__*/__webpack_require__.n(remove_accents); +;// CONCATENATED MODULE: external ["wp","dom"] +const external_wp_dom_namespaceObject = window["wp"]["dom"]; +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/form-input/deprecated.js + +/** + * External dependencies + */ + + + +/** + * WordPress dependencies + */ + + +const getNameFromLabelV1 = content => { + return remove_accents_default()((0,external_wp_dom_namespaceObject.__unstableStripHTML)(content)) + // Convert anything that's not a letter or number to a hyphen. + .replace(/[^\p{L}\p{N}]+/gu, '-') + // Convert to lowercase + .toLowerCase() + // Remove any remaining leading or trailing hyphens. + .replace(/(^-+)|(-+$)/g, ''); +}; + +// Version without wrapper div in saved markup +// See: https://github.com/WordPress/gutenberg/pull/56507 +const form_input_deprecated_v1 = { + attributes: { + type: { + type: 'string', + default: 'text' + }, + name: { + type: 'string' + }, + label: { + type: 'string', + default: 'Label', + selector: '.wp-block-form-input__label-content', + source: 'html', + __experimentalRole: 'content' + }, + inlineLabel: { + type: 'boolean', + default: false + }, + required: { + type: 'boolean', + default: false, + selector: '.wp-block-form-input__input', + source: 'attribute', + attribute: 'required' + }, + placeholder: { + type: 'string', + selector: '.wp-block-form-input__input', + source: 'attribute', + attribute: 'placeholder', + __experimentalRole: 'content' + }, + value: { + type: 'string', + default: '', + selector: 'input', + source: 'attribute', + attribute: 'value' + }, + visibilityPermissions: { + type: 'string', + default: 'all' + } + }, + supports: { + className: false, + anchor: true, + reusable: false, + spacing: { + margin: ['top', 'bottom'] + }, + __experimentalBorder: { + radius: true, + __experimentalSkipSerialization: true, + __experimentalDefaultControls: { + radius: true + } + } + }, + save({ + attributes + }) { + const { + type, + name, + label, + inlineLabel, + required, + placeholder, + value + } = attributes; + const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes); + const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes); + const inputStyle = { + ...borderProps.style, + ...colorProps.style + }; + const inputClasses = classnames_default()('wp-block-form-input__input', colorProps.className, borderProps.className); + const TagName = type === 'textarea' ? 'textarea' : 'input'; + if ('hidden' === type) { + return (0,external_React_namespaceObject.createElement)("input", { + type: type, + name: name, + value: value + }); + } + + /* eslint-disable jsx-a11y/label-has-associated-control */ + return (0,external_React_namespaceObject.createElement)("label", { + className: classnames_default()('wp-block-form-input__label', { + 'is-label-inline': inlineLabel + }) + }, (0,external_React_namespaceObject.createElement)("span", { + className: "wp-block-form-input__label-content" + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + value: label + })), (0,external_React_namespaceObject.createElement)(TagName, { + className: inputClasses, + type: 'textarea' === type ? undefined : type, + name: name || getNameFromLabelV1(label), + required: required, + "aria-required": required, + placeholder: placeholder || undefined, + style: inputStyle + })); + /* eslint-enable jsx-a11y/label-has-associated-control */ + } +}; +const form_input_deprecated_deprecated = [form_input_deprecated_v1]; +/* harmony default export */ const form_input_deprecated = (form_input_deprecated_deprecated); + +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/form-input/edit.js + +/** + * External dependencies + */ + + +/** + * WordPress dependencies + */ + + + + +function InputFieldBlock({ + attributes, + setAttributes, + className +}) { + const { + type, + name, + label, + inlineLabel, + required, + placeholder, + value + } = attributes; + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); + const ref = (0,external_wp_element_namespaceObject.useRef)(); + const TagName = type === 'textarea' ? 'textarea' : 'input'; + const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes); + const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseColorProps)(attributes); + if (ref.current) { + ref.current.focus(); + } + const controls = (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, 'hidden' !== type && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + title: (0,external_wp_i18n_namespaceObject.__)('Input settings') + }, 'checkbox' !== type && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.CheckboxControl, { + label: (0,external_wp_i18n_namespaceObject.__)('Inline label'), + checked: inlineLabel, + onChange: newVal => { + setAttributes({ + inlineLabel: newVal + }); + } + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.CheckboxControl, { + label: (0,external_wp_i18n_namespaceObject.__)('Required'), + checked: required, + onChange: newVal => { + setAttributes({ + required: newVal + }); + } + }))), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { + group: "advanced" + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + autoComplete: "off", + label: (0,external_wp_i18n_namespaceObject.__)('Name'), + value: name, + onChange: newVal => { + setAttributes({ + name: newVal + }); + }, + help: (0,external_wp_i18n_namespaceObject.__)('Affects the "name" atribute of the input element, and is used as a name for the form submission results.') + }))); + if ('hidden' === type) { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, controls, (0,external_React_namespaceObject.createElement)("input", { + type: "hidden", + className: classnames_default()(className, 'wp-block-form-input__input', colorProps.className, borderProps.className), + "aria-label": (0,external_wp_i18n_namespaceObject.__)('Value'), + value: value, + onChange: event => setAttributes({ + value: event.target.value + }) + })); + } + return (0,external_React_namespaceObject.createElement)("div", { + ...blockProps + }, controls, (0,external_React_namespaceObject.createElement)("span", { + className: classnames_default()('wp-block-form-input__label', { + 'is-label-inline': inlineLabel || 'checkbox' === type + }) + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + tagName: "span", + className: "wp-block-form-input__label-content", + value: label, + onChange: newLabel => setAttributes({ + label: newLabel + }), + "aria-label": label ? (0,external_wp_i18n_namespaceObject.__)('Label') : (0,external_wp_i18n_namespaceObject.__)('Empty label'), + "data-empty": label ? false : true, + placeholder: (0,external_wp_i18n_namespaceObject.__)('Type the label for this input') + }), (0,external_React_namespaceObject.createElement)(TagName, { + type: 'textarea' === type ? undefined : type, + className: classnames_default()(className, 'wp-block-form-input__input', colorProps.className, borderProps.className), + "aria-label": (0,external_wp_i18n_namespaceObject.__)('Optional placeholder text') + // We hide the placeholder field's placeholder when there is a value. This + // stops screen readers from reading the placeholder field's placeholder + // which is confusing. + , + placeholder: placeholder ? undefined : (0,external_wp_i18n_namespaceObject.__)('Optional placeholder…'), + value: placeholder, + onChange: event => setAttributes({ + placeholder: event.target.value + }), + "aria-required": required, + style: { + ...borderProps.style, + ...colorProps.style + } + }))); +} +/* harmony default export */ const form_input_edit = (InputFieldBlock); + +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/form-input/save.js + +/** + * External dependencies + */ + + + +/** + * WordPress dependencies + */ + + + +/** + * Get the name attribute from a content string. + * + * @param {string} content The block content. + * + * @return {string} Returns the slug. + */ +const getNameFromLabel = content => { + return remove_accents_default()((0,external_wp_dom_namespaceObject.__unstableStripHTML)(content)) + // Convert anything that's not a letter or number to a hyphen. + .replace(/[^\p{L}\p{N}]+/gu, '-') + // Convert to lowercase + .toLowerCase() + // Remove any remaining leading or trailing hyphens. + .replace(/(^-+)|(-+$)/g, ''); +}; +function form_input_save_save({ + attributes +}) { + const { + type, + name, + label, + inlineLabel, + required, + placeholder, + value + } = attributes; + const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes); + const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes); + const inputStyle = { + ...borderProps.style, + ...colorProps.style + }; + const inputClasses = classnames_default()('wp-block-form-input__input', colorProps.className, borderProps.className); + const TagName = type === 'textarea' ? 'textarea' : 'input'; + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save(); + if ('hidden' === type) { + return (0,external_React_namespaceObject.createElement)("input", { + type: type, + name: name, + value: value + }); + } + return (0,external_React_namespaceObject.createElement)("div", { + ...blockProps + }, (0,external_React_namespaceObject.createElement)("label", { + className: classnames_default()('wp-block-form-input__label', { + 'is-label-inline': inlineLabel + }) + }, (0,external_React_namespaceObject.createElement)("span", { + className: "wp-block-form-input__label-content" + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + value: label + })), (0,external_React_namespaceObject.createElement)(TagName, { + className: inputClasses, + type: 'textarea' === type ? undefined : type, + name: name || getNameFromLabel(label), + required: required, + "aria-required": required, + placeholder: placeholder || undefined, + style: inputStyle + }))); +} + +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/form-input/variations.js +/** + * WordPress dependencies + */ + +const form_input_variations_variations = [{ + name: 'text', + title: (0,external_wp_i18n_namespaceObject.__)('Text Input'), + icon: 'edit-page', + description: (0,external_wp_i18n_namespaceObject.__)('A generic text input.'), + attributes: { + type: 'text' + }, + isDefault: true, + scope: ['inserter', 'transform'], + isActive: blockAttributes => !blockAttributes?.type || blockAttributes?.type === 'text' +}, { + name: 'textarea', + title: (0,external_wp_i18n_namespaceObject.__)('Textarea Input'), + icon: 'testimonial', + description: (0,external_wp_i18n_namespaceObject.__)('A textarea input to allow entering multiple lines of text.'), + attributes: { + type: 'textarea' + }, + isDefault: true, + scope: ['inserter', 'transform'], + isActive: blockAttributes => blockAttributes?.type === 'textarea' +}, { + name: 'checkbox', + title: (0,external_wp_i18n_namespaceObject.__)('Checkbox Input'), + description: (0,external_wp_i18n_namespaceObject.__)('A simple checkbox input.'), + icon: 'forms', + attributes: { + type: 'checkbox', + inlineLabel: true + }, + isDefault: true, + scope: ['inserter', 'transform'], + isActive: blockAttributes => blockAttributes?.type === 'checkbox' +}, { + name: 'email', + title: (0,external_wp_i18n_namespaceObject.__)('Email Input'), + icon: 'email', + description: (0,external_wp_i18n_namespaceObject.__)('Used for email addresses.'), + attributes: { + type: 'email' + }, + isDefault: true, + scope: ['inserter', 'transform'], + isActive: blockAttributes => blockAttributes?.type === 'email' +}, { + name: 'url', + title: (0,external_wp_i18n_namespaceObject.__)('URL Input'), + icon: 'admin-site', + description: (0,external_wp_i18n_namespaceObject.__)('Used for URLs.'), + attributes: { + type: 'url' + }, + isDefault: true, + scope: ['inserter', 'transform'], + isActive: blockAttributes => blockAttributes?.type === 'url' +}, { + name: 'tel', + title: (0,external_wp_i18n_namespaceObject.__)('Telephone Input'), + icon: 'phone', + description: (0,external_wp_i18n_namespaceObject.__)('Used for phone numbers.'), + attributes: { + type: 'tel' + }, + isDefault: true, + scope: ['inserter', 'transform'], + isActive: blockAttributes => blockAttributes?.type === 'tel' +}, { + name: 'number', + title: (0,external_wp_i18n_namespaceObject.__)('Number Input'), + icon: 'edit-page', + description: (0,external_wp_i18n_namespaceObject.__)('A numeric input.'), + attributes: { + type: 'number' + }, + isDefault: true, + scope: ['inserter', 'transform'], + isActive: blockAttributes => blockAttributes?.type === 'number' +}]; +/* harmony default export */ const form_input_variations = (form_input_variations_variations); + +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/form-input/index.js +/** + * Internal dependencies + */ + + + +const form_input_metadata = { + $schema: "https://schemas.wp.org/trunk/block.json", + apiVersion: 3, + __experimental: true, + name: "core/form-input", + title: "Input Field", + category: "common", + ancestor: ["core/form"], + description: "The basic building block for forms.", + keywords: ["input", "form"], + textdomain: "default", + icon: "forms", + attributes: { + type: { + type: "string", + "default": "text" + }, + name: { + type: "string" + }, + label: { + type: "rich-text", + "default": "Label", + selector: ".wp-block-form-input__label-content", + source: "rich-text", + __experimentalRole: "content" + }, + inlineLabel: { + type: "boolean", + "default": false + }, + required: { + type: "boolean", + "default": false, + selector: ".wp-block-form-input__input", + source: "attribute", + attribute: "required" + }, + placeholder: { + type: "string", + selector: ".wp-block-form-input__input", + source: "attribute", + attribute: "placeholder", + __experimentalRole: "content" + }, + value: { + type: "string", + "default": "", + selector: "input", + source: "attribute", + attribute: "value" + }, + visibilityPermissions: { + type: "string", + "default": "all" + } + }, + supports: { + anchor: true, + reusable: false, + spacing: { + margin: ["top", "bottom"] + }, + __experimentalBorder: { + radius: true, + __experimentalSkipSerialization: true, + __experimentalDefaultControls: { + radius: true + } + } + }, + style: ["wp-block-form-input"] +}; + + +const { + name: form_input_name +} = form_input_metadata; + +const form_input_settings = { + deprecated: form_input_deprecated, + edit: form_input_edit, + save: form_input_save_save, + variations: form_input_variations +}; +const form_input_init = () => initBlock({ + name: form_input_name, + metadata: form_input_metadata, + settings: form_input_settings +}); + +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/form-submit-button/edit.js + +/** + * WordPress dependencies + */ + + +const form_submit_button_edit_TEMPLATE = [['core/buttons', {}, [['core/button', { + text: (0,external_wp_i18n_namespaceObject.__)('Submit'), + tagName: 'button', + type: 'submit' +}]]]]; +const form_submit_button_edit_Edit = () => { + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, { + template: form_submit_button_edit_TEMPLATE, + templateLock: 'all' + }); + return (0,external_React_namespaceObject.createElement)("div", { + className: "wp-block-form-submit-wrapper", + ...innerBlocksProps + }); +}; +/* harmony default export */ const form_submit_button_edit = (form_submit_button_edit_Edit); + +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/form-submit-button/save.js + +/** + * WordPress dependencies + */ + +const save_Save = () => { + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save(); + return (0,external_React_namespaceObject.createElement)("div", { + className: "wp-block-form-submit-wrapper", + ...blockProps + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); +}; +/* harmony default export */ const form_submit_button_save = (save_Save); + +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/form-submit-button/index.js +/** + * Internal dependencies + */ + + +const form_submit_button_metadata = { + $schema: "https://schemas.wp.org/trunk/block.json", + apiVersion: 3, + __experimental: true, + name: "core/form-submit-button", + title: "Form Submit Button", + category: "common", + icon: "button", + ancestor: ["core/form"], + allowedBlocks: ["core/buttons", "core/button"], + description: "A submission button for forms.", + keywords: ["submit", "button", "form"], + textdomain: "default", + style: ["wp-block-form-submit-button"] +}; + +const { + name: form_submit_button_name +} = form_submit_button_metadata; + +const form_submit_button_settings = { + edit: form_submit_button_edit, + save: form_submit_button_save +}; +const form_submit_button_init = () => initBlock({ + name: form_submit_button_name, + metadata: form_submit_button_metadata, + settings: form_submit_button_settings +}); + +;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/group.js + +/** + * WordPress dependencies + */ + +const group = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { + viewBox: "0 0 24 24", + xmlns: "http://www.w3.org/2000/svg" +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { + d: "M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z" +})); +/* harmony default export */ const library_group = (group); + +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/form-submission-notification/edit.js + +/** + * WordPress dependencies + */ + + + + +/** + * External dependencies + */ + +const form_submission_notification_edit_TEMPLATE = [['core/paragraph', { + content: (0,external_wp_i18n_namespaceObject.__)("Enter the message you wish displayed for form submission error/success, and select the type of the message (success/error) from the block's options.") +}]]; +const form_submission_notification_edit_Edit = ({ + attributes, + clientId +}) => { + const { + type + } = attributes; + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ + className: classnames_default()('wp-block-form-submission-notification', { + [`form-notification-type-${type}`]: type + }) + }); + const { + hasInnerBlocks + } = (0,external_wp_data_namespaceObject.useSelect)(select => { + const { + getBlock + } = select(external_wp_blockEditor_namespaceObject.store); + const block = getBlock(clientId); + return { + hasInnerBlocks: !!(block && block.innerBlocks.length) + }; + }, [clientId]); + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, { + template: form_submission_notification_edit_TEMPLATE, + renderAppender: hasInnerBlocks ? undefined : external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender + }); + return (0,external_React_namespaceObject.createElement)("div", { + ...innerBlocksProps, + "data-message-success": (0,external_wp_i18n_namespaceObject.__)('Submission success notification'), + "data-message-error": (0,external_wp_i18n_namespaceObject.__)('Submission error notification') + }); +}; +/* harmony default export */ const form_submission_notification_edit = (form_submission_notification_edit_Edit); + +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/form-submission-notification/save.js + +/** + * WordPress dependencies + */ + + +/** + * External dependencies + */ + +function form_submission_notification_save_save({ + attributes +}) { + const { + type + } = attributes; + return (0,external_React_namespaceObject.createElement)("div", { + ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(external_wp_blockEditor_namespaceObject.useBlockProps.save({ + className: classnames_default()('wp-block-form-submission-notification', { + [`form-notification-type-${type}`]: type + }) + })) + }); +} + +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/form-submission-notification/variations.js +/** + * WordPress dependencies + */ + +const form_submission_notification_variations_variations = [{ + name: 'form-submission-success', + title: (0,external_wp_i18n_namespaceObject.__)('Form Submission Success'), + description: (0,external_wp_i18n_namespaceObject.__)('Success message for form submissions.'), + attributes: { + type: 'success' + }, + isDefault: true, + innerBlocks: [['core/paragraph', { + content: (0,external_wp_i18n_namespaceObject.__)('Your form has been submitted successfully.'), + backgroundColor: '#00D084', + textColor: '#000000', + style: { + elements: { + link: { + color: { + text: '#000000' + } + } + } + } + }]], + scope: ['inserter', 'transform'], + isActive: blockAttributes => !blockAttributes?.type || blockAttributes?.type === 'success' +}, { + name: 'form-submission-error', + title: (0,external_wp_i18n_namespaceObject.__)('Form Submission Error'), + description: (0,external_wp_i18n_namespaceObject.__)('Error/failure message for form submissions.'), + attributes: { + type: 'error' + }, + isDefault: false, + innerBlocks: [['core/paragraph', { + content: (0,external_wp_i18n_namespaceObject.__)('There was an error submitting your form.'), + backgroundColor: '#CF2E2E', + textColor: '#FFFFFF', + style: { + elements: { + link: { + color: { + text: '#FFFFFF' + } + } + } + } + }]], + scope: ['inserter', 'transform'], + isActive: blockAttributes => !blockAttributes?.type || blockAttributes?.type === 'error' +}]; +/* harmony default export */ const form_submission_notification_variations = (form_submission_notification_variations_variations); + +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/form-submission-notification/index.js +/** + * WordPress dependencies + */ + + +/** + * Internal dependencies + */ + + +const form_submission_notification_metadata = { + $schema: "https://schemas.wp.org/trunk/block.json", + apiVersion: 3, + __experimental: true, + name: "core/form-submission-notification", + title: "Form Submission Notification", + category: "common", + ancestor: ["core/form"], + description: "Provide a notification message after the form has been submitted.", + keywords: ["form", "feedback", "notification", "message"], + textdomain: "default", + icon: "feedback", + attributes: { + type: { + type: "string", + "default": "success" + } + } +}; + + +const { + name: form_submission_notification_name +} = form_submission_notification_metadata; + +const form_submission_notification_settings = { + icon: library_group, + edit: form_submission_notification_edit, + save: form_submission_notification_save_save, + variations: form_submission_notification_variations +}; +const form_submission_notification_init = () => initBlock({ + name: form_submission_notification_name, + metadata: form_submission_notification_metadata, + settings: form_submission_notification_settings +}); + ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/gallery.js /** * WordPress dependencies */ -const gallery = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const gallery = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M16.375 4.5H4.625a.125.125 0 0 0-.125.125v8.254l2.859-1.54a.75.75 0 0 1 .68-.016l2.384 1.142 2.89-2.074a.75.75 0 0 1 .874 0l2.313 1.66V4.625a.125.125 0 0 0-.125-.125Zm.125 9.398-2.75-1.975-2.813 2.02a.75.75 0 0 1-.76.067l-2.444-1.17L4.5 14.583v1.792c0 .069.056.125.125.125h11.75a.125.125 0 0 0 .125-.125v-2.477ZM4.625 3C3.728 3 3 3.728 3 4.625v11.75C3 17.273 3.728 18 4.625 18h11.75c.898 0 1.625-.727 1.625-1.625V4.625C18 3.728 17.273 3 16.375 3H4.625ZM20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z", fillRule: "evenodd", clipRule: "evenodd" })); -/* harmony default export */ var library_gallery = (gallery); +/* harmony default export */ const library_gallery = (gallery); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/constants.js const LINK_DESTINATION_NONE = 'none'; @@ -17443,9 +19374,9 @@ const deprecated_v7 = { className }); const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps); - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { ...innerBlocksProps - }, innerBlocksProps.children, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, innerBlocksProps.children, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", className: "blocks-gallery-caption", value: caption @@ -17546,11 +19477,11 @@ const deprecated_v6 = { linkTo } = attributes; const className = `columns-${columns} ${imageCrop ? 'is-cropped' : ''}`; - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }) - }, (0,external_wp_element_namespaceObject.createElement)("ul", { + }, (0,external_React_namespaceObject.createElement)("ul", { className: "blocks-gallery-grid" }, images.map(image => { let href; @@ -17562,7 +19493,7 @@ const deprecated_v6 = { href = image.link; break; } - const img = (0,external_wp_element_namespaceObject.createElement)("img", { + const img = (0,external_React_namespaceObject.createElement)("img", { src: image.url, alt: image.alt, "data-id": image.id, @@ -17570,17 +19501,17 @@ const deprecated_v6 = { "data-link": image.link, className: image.id ? `wp-image-${image.id}` : null }); - return (0,external_wp_element_namespaceObject.createElement)("li", { + return (0,external_React_namespaceObject.createElement)("li", { key: image.id || image.url, className: "blocks-gallery-item" - }, (0,external_wp_element_namespaceObject.createElement)("figure", null, href ? (0,external_wp_element_namespaceObject.createElement)("a", { + }, (0,external_React_namespaceObject.createElement)("figure", null, href ? (0,external_React_namespaceObject.createElement)("a", { href: href - }, img) : img, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(image.caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, img) : img, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(image.caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", className: "blocks-gallery-item__caption", value: image.caption }))); - })), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + })), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", className: "blocks-gallery-caption", value: caption @@ -17704,9 +19635,9 @@ const deprecated_v5 = { caption, linkTo } = attributes; - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { className: `columns-${columns} ${imageCrop ? 'is-cropped' : ''}` - }, (0,external_wp_element_namespaceObject.createElement)("ul", { + }, (0,external_React_namespaceObject.createElement)("ul", { className: "blocks-gallery-grid" }, images.map(image => { let href; @@ -17718,7 +19649,7 @@ const deprecated_v5 = { href = image.link; break; } - const img = (0,external_wp_element_namespaceObject.createElement)("img", { + const img = (0,external_React_namespaceObject.createElement)("img", { src: image.url, alt: image.alt, "data-id": image.id, @@ -17726,17 +19657,17 @@ const deprecated_v5 = { "data-link": image.link, className: image.id ? `wp-image-${image.id}` : null }); - return (0,external_wp_element_namespaceObject.createElement)("li", { + return (0,external_React_namespaceObject.createElement)("li", { key: image.id || image.url, className: "blocks-gallery-item" - }, (0,external_wp_element_namespaceObject.createElement)("figure", null, href ? (0,external_wp_element_namespaceObject.createElement)("a", { + }, (0,external_React_namespaceObject.createElement)("figure", null, href ? (0,external_React_namespaceObject.createElement)("a", { href: href - }, img) : img, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(image.caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, img) : img, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(image.caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", className: "blocks-gallery-item__caption", value: image.caption }))); - })), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + })), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", className: "blocks-gallery-caption", value: caption @@ -17836,9 +19767,9 @@ const deprecated_v4 = { caption, linkTo } = attributes; - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { className: `columns-${columns} ${imageCrop ? 'is-cropped' : ''}` - }, (0,external_wp_element_namespaceObject.createElement)("ul", { + }, (0,external_React_namespaceObject.createElement)("ul", { className: "blocks-gallery-grid" }, images.map(image => { let href; @@ -17850,7 +19781,7 @@ const deprecated_v4 = { href = image.link; break; } - const img = (0,external_wp_element_namespaceObject.createElement)("img", { + const img = (0,external_React_namespaceObject.createElement)("img", { src: image.url, alt: image.alt, "data-id": image.id, @@ -17858,17 +19789,17 @@ const deprecated_v4 = { "data-link": image.link, className: image.id ? `wp-image-${image.id}` : null }); - return (0,external_wp_element_namespaceObject.createElement)("li", { + return (0,external_React_namespaceObject.createElement)("li", { key: image.id || image.url, className: "blocks-gallery-item" - }, (0,external_wp_element_namespaceObject.createElement)("figure", null, href ? (0,external_wp_element_namespaceObject.createElement)("a", { + }, (0,external_React_namespaceObject.createElement)("figure", null, href ? (0,external_React_namespaceObject.createElement)("a", { href: href - }, img) : img, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(image.caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, img) : img, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(image.caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", className: "blocks-gallery-item__caption", value: image.caption }))); - })), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + })), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", className: "blocks-gallery-caption", value: caption @@ -17944,7 +19875,7 @@ const gallery_deprecated_v3 = { imageCrop, linkTo } = attributes; - return (0,external_wp_element_namespaceObject.createElement)("ul", { + return (0,external_React_namespaceObject.createElement)("ul", { className: `columns-${columns} ${imageCrop ? 'is-cropped' : ''}` }, images.map(image => { let href; @@ -17956,7 +19887,7 @@ const gallery_deprecated_v3 = { href = image.link; break; } - const img = (0,external_wp_element_namespaceObject.createElement)("img", { + const img = (0,external_React_namespaceObject.createElement)("img", { src: image.url, alt: image.alt, "data-id": image.id, @@ -17964,12 +19895,12 @@ const gallery_deprecated_v3 = { "data-link": image.link, className: image.id ? `wp-image-${image.id}` : null }); - return (0,external_wp_element_namespaceObject.createElement)("li", { + return (0,external_React_namespaceObject.createElement)("li", { key: image.id || image.url, className: "blocks-gallery-item" - }, (0,external_wp_element_namespaceObject.createElement)("figure", null, href ? (0,external_wp_element_namespaceObject.createElement)("a", { + }, (0,external_React_namespaceObject.createElement)("figure", null, href ? (0,external_React_namespaceObject.createElement)("a", { href: href - }, img) : img, image.caption && image.caption.length > 0 && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, img) : img, image.caption && image.caption.length > 0 && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: image.caption }))); @@ -18070,7 +20001,7 @@ const gallery_deprecated_v2 = { imageCrop, linkTo } = attributes; - return (0,external_wp_element_namespaceObject.createElement)("ul", { + return (0,external_React_namespaceObject.createElement)("ul", { className: `columns-${columns} ${imageCrop ? 'is-cropped' : ''}` }, images.map(image => { let href; @@ -18082,19 +20013,19 @@ const gallery_deprecated_v2 = { href = image.link; break; } - const img = (0,external_wp_element_namespaceObject.createElement)("img", { + const img = (0,external_React_namespaceObject.createElement)("img", { src: image.url, alt: image.alt, "data-id": image.id, "data-link": image.link, className: image.id ? `wp-image-${image.id}` : null }); - return (0,external_wp_element_namespaceObject.createElement)("li", { + return (0,external_React_namespaceObject.createElement)("li", { key: image.id || image.url, className: "blocks-gallery-item" - }, (0,external_wp_element_namespaceObject.createElement)("figure", null, href ? (0,external_wp_element_namespaceObject.createElement)("a", { + }, (0,external_React_namespaceObject.createElement)("figure", null, href ? (0,external_React_namespaceObject.createElement)("a", { href: href - }, img) : img, image.caption && image.caption.length > 0 && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, img) : img, image.caption && image.caption.length > 0 && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: image.caption }))); @@ -18157,7 +20088,7 @@ const gallery_deprecated_v1 = { alignnone: align === 'none', 'is-cropped': imageCrop }); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: className }, images.map(image => { let href; @@ -18169,15 +20100,15 @@ const gallery_deprecated_v1 = { href = image.link; break; } - const img = (0,external_wp_element_namespaceObject.createElement)("img", { + const img = (0,external_React_namespaceObject.createElement)("img", { src: image.url, alt: image.alt, "data-id": image.id }); - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { key: image.id || image.url, className: "blocks-gallery-image" - }, href ? (0,external_wp_element_namespaceObject.createElement)("a", { + }, href ? (0,external_React_namespaceObject.createElement)("a", { href: href }, img) : img); })); @@ -18189,10 +20120,10 @@ const gallery_deprecated_v1 = { return attributes; } }; -/* harmony default export */ var gallery_deprecated = ([deprecated_v7, deprecated_v6, deprecated_v5, deprecated_v4, gallery_deprecated_v3, gallery_deprecated_v2, gallery_deprecated_v1]); +/* harmony default export */ const gallery_deprecated = ([deprecated_v7, deprecated_v6, deprecated_v5, deprecated_v4, gallery_deprecated_v3, gallery_deprecated_v2, gallery_deprecated_v1]); ;// CONCATENATED MODULE: external ["wp","viewport"] -var external_wp_viewport_namespaceObject = window["wp"]["viewport"]; +const external_wp_viewport_namespaceObject = window["wp"]["viewport"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/shared-icon.js /** @@ -18200,7 +20131,7 @@ var external_wp_viewport_namespaceObject = window["wp"]["viewport"]; */ -const sharedIcon = (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { +const sharedIcon = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: library_gallery }); @@ -18353,9 +20284,11 @@ function getImageSizeAttributes(image, size) { +/** + * Internal dependencies + */ - -const Gallery = (props, captionRef) => { +function Gallery(props) { const { attributes, isSelected, @@ -18364,15 +20297,15 @@ const Gallery = (props, captionRef) => { insertBlocksAfter, blockProps, __unstableLayoutClassNames: layoutClassNames, - showCaption + isContentLocked, + multiGallerySelection } = props; const { align, columns, - caption, imageCrop } = attributes; - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { ...blockProps, className: classnames_default()(blockProps.className, layoutClassNames, 'blocks-gallery-grid', { [`align${align}`]: align, @@ -18380,24 +20313,19 @@ const Gallery = (props, captionRef) => { [`columns-default`]: columns === undefined, 'is-cropped': imageCrop }) - }, blockProps.children, isSelected && !blockProps.children && (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, { + }, blockProps.children, isSelected && !blockProps.children && (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, { className: "blocks-gallery-media-placeholder-wrapper" - }, mediaPlaceholder), showCaption && (!external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) || isSelected) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { - identifier: "caption", - "aria-label": (0,external_wp_i18n_namespaceObject.__)('Gallery caption text'), - placeholder: (0,external_wp_i18n_namespaceObject.__)('Write gallery caption…'), - value: caption, - className: classnames_default()('blocks-gallery-caption', (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption')), - ref: captionRef, - tagName: "figcaption", - onChange: value => setAttributes({ - caption: value - }), - inlineToolbar: true, - __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())) + }, mediaPlaceholder), (0,external_React_namespaceObject.createElement)(Caption, { + attributes: attributes, + setAttributes: setAttributes, + isSelected: isSelected, + insertBlocksAfter: insertBlocksAfter, + showToolbarButton: !multiGallerySelection && !isContentLocked, + className: "blocks-gallery-caption", + label: (0,external_wp_i18n_namespaceObject.__)('Gallery caption text'), + placeholder: (0,external_wp_i18n_namespaceObject.__)('Add gallery caption') })); -}; -/* harmony default export */ var gallery_gallery = ((0,external_wp_element_namespaceObject.forwardRef)(Gallery)); +} ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/use-image-sizes.js /** @@ -18538,17 +20466,22 @@ function useGetMedia(innerBlockImages) { } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/gap-styles.js - /** * WordPress dependencies */ +/** + * Internal dependencies + */ + +const { + useStyleOverride +} = unlock(external_wp_blockEditor_namespaceObject.privateApis); function GapStyles({ blockGap, clientId }) { - const styleElement = (0,external_wp_element_namespaceObject.useContext)(external_wp_blockEditor_namespaceObject.BlockList.__unstableElementContext); // --gallery-block--gutter-size is deprecated. --wp--style--gallery-gap-default should be used by themes that want to set a default // gap on the gallery. const fallbackValue = `var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) )`; @@ -18568,10 +20501,10 @@ function GapStyles({ --wp--style--unstable-gallery-gap: ${column === '0' ? '0px' : column}; gap: ${gapValue} }`; - const GapStyle = () => { - return (0,external_wp_element_namespaceObject.createElement)("style", null, gap); - }; - return gap && styleElement ? (0,external_wp_element_namespaceObject.createPortal)((0,external_wp_element_namespaceObject.createElement)(GapStyle, null), styleElement) : null; + useStyleOverride({ + css: gap + }); + return null; } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/edit.js @@ -18596,7 +20529,6 @@ function GapStyles({ - /** * Internal dependencies */ @@ -18622,11 +20554,11 @@ const linkOptions = [{ label: (0,external_wp_i18n_namespaceObject._x)('None', 'Media item link option') }]; const edit_ALLOWED_MEDIA_TYPES = ['image']; -const allowedBlocks = ['core/image']; const PLACEHOLDER_TEXT = external_wp_element_namespaceObject.Platform.isNative ? (0,external_wp_i18n_namespaceObject.__)('Add media') : (0,external_wp_i18n_namespaceObject.__)('Drag images, upload new ones or select files from your library.'); const MOBILE_CONTROL_PROPS_RANGE_CONTROL = external_wp_element_namespaceObject.Platform.isNative ? { type: 'stepper' } : {}; +const EMPTY_ARRAY = []; function GalleryEdit(props) { const { setAttributes, @@ -18641,33 +20573,11 @@ function GalleryEdit(props) { const { columns, imageCrop, + randomOrder, linkTarget, linkTo, - sizeSlug, - caption + sizeSlug } = attributes; - const [showCaption, setShowCaption] = (0,external_wp_element_namespaceObject.useState)(!!caption); - const prevCaption = (0,external_wp_compose_namespaceObject.usePrevious)(caption); - - // We need to show the caption when changes come from - // history navigation(undo/redo). - (0,external_wp_element_namespaceObject.useEffect)(() => { - if (caption && !prevCaption) { - setShowCaption(true); - } - }, [caption, prevCaption]); - (0,external_wp_element_namespaceObject.useEffect)(() => { - if (!isSelected && !caption) { - setShowCaption(false); - } - }, [isSelected, caption]); - - // Focus the caption when we click to add one. - const captionRef = (0,external_wp_element_namespaceObject.useCallback)(node => { - if (node && !caption) { - node.focus(); - } - }, [caption]); const { __unstableMarkNextChangeAsNotPersistent, replaceInnerBlocks, @@ -18681,23 +20591,29 @@ function GalleryEdit(props) { const { getBlock, getSettings, - preferredStyle + preferredStyle, + innerBlockImages, + blockWasJustInserted, + multiGallerySelection } = (0,external_wp_data_namespaceObject.useSelect)(select => { - const settings = select(external_wp_blockEditor_namespaceObject.store).getSettings(); - const preferredStyleVariations = settings.__experimentalPreferredStyleVariations; + var _getBlock$innerBlocks; + const { + getBlockName, + getMultiSelectedBlockClientIds, + getSettings: _getSettings, + getBlock: _getBlock, + wasBlockJustInserted + } = select(external_wp_blockEditor_namespaceObject.store); + const preferredStyleVariations = _getSettings().__experimentalPreferredStyleVariations; + const multiSelectedClientIds = getMultiSelectedBlockClientIds(); return { - getBlock: select(external_wp_blockEditor_namespaceObject.store).getBlock, - getSettings: select(external_wp_blockEditor_namespaceObject.store).getSettings, - preferredStyle: preferredStyleVariations?.value?.['core/image'] + getBlock: _getBlock, + getSettings: _getSettings, + preferredStyle: preferredStyleVariations?.value?.['core/image'], + innerBlockImages: (_getBlock$innerBlocks = _getBlock(clientId)?.innerBlocks) !== null && _getBlock$innerBlocks !== void 0 ? _getBlock$innerBlocks : EMPTY_ARRAY, + blockWasJustInserted: wasBlockJustInserted(clientId, 'inserter_menu'), + multiGallerySelection: multiSelectedClientIds.length && multiSelectedClientIds.every(_clientId => getBlockName(_clientId) === 'core/gallery') }; - }, []); - const innerBlockImages = (0,external_wp_data_namespaceObject.useSelect)(select => { - var _select$getBlock$inne; - const innerBlocks = (_select$getBlock$inne = select(external_wp_blockEditor_namespaceObject.store).getBlock(clientId)?.innerBlocks) !== null && _select$getBlock$inne !== void 0 ? _select$getBlock$inne : []; - return innerBlocks; - }, [clientId]); - const wasBlockJustInserted = (0,external_wp_data_namespaceObject.useSelect)(select => { - return select(external_wp_blockEditor_namespaceObject.store).wasBlockJustInserted(clientId, 'inserter_menu'); }, [clientId]); const images = (0,external_wp_element_namespaceObject.useMemo)(() => innerBlockImages?.map(block => ({ clientId: block.clientId, @@ -18854,8 +20770,10 @@ function GalleryEdit(props) { imageCrop: !imageCrop }); } - function getImageCropHelp(checked) { - return checked ? (0,external_wp_i18n_namespaceObject.__)('Thumbnails are cropped to align.') : (0,external_wp_i18n_namespaceObject.__)('Thumbnails are not cropped.'); + function toggleRandomOrder() { + setAttributes({ + randomOrder: !randomOrder + }); } function toggleOpenInNewTab(openInNewTab) { const newLinkTarget = openInNewTab ? '_blank' : undefined; @@ -18921,11 +20839,11 @@ function GalleryEdit(props) { isAppender: hasImages, disableMediaButtons: hasImages && !isSelected || imagesUploading, value: hasImageIds ? images : {}, - autoOpenMediaUpload: !hasImages && isSelected && wasBlockJustInserted, + autoOpenMediaUpload: !hasImages && isSelected && blockWasJustInserted, onFocus } }); - const mediaPlaceholder = (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, { + const mediaPlaceholder = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, { handleUpload: false, icon: sharedIcon, labels: { @@ -18947,20 +20865,19 @@ function GalleryEdit(props) { marginVertical: 0 }; const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, { - allowedBlocks, orientation: 'horizontal', renderAppender: false, ...nativeInnerBlockProps }); if (!hasImages) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, { + return (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, { ...innerBlocksProps }, innerBlocksProps.children, mediaPlaceholder); } const hasLinkTo = linkTo && linkTo !== 'none'; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, images.length > 1 && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { + }, images.length > 1 && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Columns'), value: columns ? columns : defaultColumnsNumber(images.length), @@ -18970,13 +20887,16 @@ function GalleryEdit(props) { ...MOBILE_CONTROL_PROPS_RANGE_CONTROL, required: true, __next40pxDefaultSize: true - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), imageSizeOptions?.length > 0 && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, - label: (0,external_wp_i18n_namespaceObject.__)('Crop images'), - checked: !!imageCrop, - onChange: toggleImageCrop, - help: getImageCropHelp - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { + label: (0,external_wp_i18n_namespaceObject.__)('Resolution'), + help: (0,external_wp_i18n_namespaceObject.__)('Select the size of the source images.'), + value: sizeSlug, + options: imageSizeOptions, + onChange: updateImagesSize, + hideCancelButton: true, + size: "__unstable-large" + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Link to'), value: linkTo, @@ -18984,41 +20904,28 @@ function GalleryEdit(props) { options: linkOptions, hideCancelButton: true, size: "__unstable-large" - }), hasLinkTo && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, - label: (0,external_wp_i18n_namespaceObject.__)('Open in new tab'), + label: (0,external_wp_i18n_namespaceObject.__)('Crop images to fit'), + checked: !!imageCrop, + onChange: toggleImageCrop + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + __nextHasNoMarginBottom: true, + label: (0,external_wp_i18n_namespaceObject.__)('Randomize order'), + checked: !!randomOrder, + onChange: toggleRandomOrder + }), hasLinkTo && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + __nextHasNoMarginBottom: true, + label: (0,external_wp_i18n_namespaceObject.__)('Open images in new tab'), checked: linkTarget === '_blank', onChange: toggleOpenInNewTab - }), imageSizeOptions?.length > 0 && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { - __nextHasNoMarginBottom: true, - label: (0,external_wp_i18n_namespaceObject.__)('Resolution'), - help: (0,external_wp_i18n_namespaceObject.__)('Select the size of the source images.'), - value: sizeSlug, - options: imageSizeOptions, - onChange: updateImagesSize, - hideCancelButton: true, - size: "__unstable-large" - }), external_wp_element_namespaceObject.Platform.isWeb && !imageSizeOptions && hasImageIds && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl, { + }), external_wp_element_namespaceObject.Platform.isWeb && !imageSizeOptions && hasImageIds && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl, { className: 'gallery-image-sizes' - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl.VisualLabel, null, (0,external_wp_i18n_namespaceObject.__)('Resolution')), (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl.VisualLabel, null, (0,external_wp_i18n_namespaceObject.__)('Resolution')), (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, { className: 'gallery-image-sizes__loading' - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null), (0,external_wp_i18n_namespaceObject.__)('Loading options…'))))), external_wp_element_namespaceObject.Platform.isWeb && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { - group: "block" - }, !isContentLocked && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { - onClick: () => { - setShowCaption(!showCaption); - if (showCaption && caption) { - setAttributes({ - caption: undefined - }); - } - }, - icon: library_caption, - isPressed: showCaption, - label: showCaption ? (0,external_wp_i18n_namespaceObject.__)('Remove caption') : (0,external_wp_i18n_namespaceObject.__)('Add caption') - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null), (0,external_wp_i18n_namespaceObject.__)('Loading options…'))))), external_wp_element_namespaceObject.Platform.isWeb && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, !multiGallerySelection && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, { allowedTypes: edit_ALLOWED_MEDIA_TYPES, accept: "image/*", handleUpload: false, @@ -19027,20 +20934,20 @@ function GalleryEdit(props) { multiple: true, mediaIds: images.filter(image => image.id).map(image => image.id), addToGallery: hasImageIds - })), (0,external_wp_element_namespaceObject.createElement)(GapStyles, { + })), (0,external_React_namespaceObject.createElement)(GapStyles, { blockGap: attributes.style?.spacing?.blockGap, clientId: clientId - })), (0,external_wp_element_namespaceObject.createElement)(gallery_gallery, { + })), (0,external_React_namespaceObject.createElement)(Gallery, { ...props, - showCaption: showCaption, - ref: external_wp_element_namespaceObject.Platform.isWeb ? captionRef : undefined, + isContentLocked: isContentLocked, images: images, mediaPlaceholder: !hasImages || external_wp_element_namespaceObject.Platform.isNative ? mediaPlaceholder : undefined, blockProps: innerBlocksProps, - insertBlocksAfter: insertBlocksAfter + insertBlocksAfter: insertBlocksAfter, + multiGallerySelection: multiGallerySelection })); } -/* harmony default export */ var gallery_edit = ((0,external_wp_compose_namespaceObject.compose)([(0,external_wp_viewport_namespaceObject.withViewportMatch)({ +/* harmony default export */ const gallery_edit = ((0,external_wp_compose_namespaceObject.compose)([(0,external_wp_viewport_namespaceObject.withViewportMatch)({ isNarrow: '< small' })])(GalleryEdit)); @@ -19061,13 +20968,13 @@ const shared_pickRelevantMediaFiles = (image, sizeSlug = 'large') => { * WordPress dependencies */ -const image_image = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const image_image = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z" })); -/* harmony default export */ var library_image = (image_image); +/* harmony default export */ const library_image = (image_image); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-left.js @@ -19075,13 +20982,13 @@ const image_image = (0,external_wp_element_namespaceObject.createElement)(extern * WordPress dependencies */ -const chevronLeft = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const chevronLeft = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z" })); -/* harmony default export */ var chevron_left = (chevronLeft); +/* harmony default export */ const chevron_left = (chevronLeft); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-right.js @@ -19089,13 +20996,13 @@ const chevronLeft = (0,external_wp_element_namespaceObject.createElement)(extern * WordPress dependencies */ -const chevronRight = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const chevronRight = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z" })); -/* harmony default export */ var chevron_right = (chevronRight); +/* harmony default export */ const chevron_right = (chevronRight); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js @@ -19103,13 +21010,13 @@ const chevronRight = (0,external_wp_element_namespaceObject.createElement)(exter * WordPress dependencies */ -const closeSmall = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const closeSmall = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z" })); -/* harmony default export */ var close_small = (closeSmall); +/* harmony default export */ const close_small = (closeSmall); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/v1/constants.js const v1_constants_LINK_DESTINATION_NONE = 'none'; @@ -19280,7 +21187,7 @@ class GalleryImage extends external_wp_element_namespaceObject.Component { // Disable reason: Image itself is not meant to be interactive, but should // direct image selection and unfocus caption fields. /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */ - (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("img", { + (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("img", { src: url, alt: alt, "data-id": id, @@ -19288,22 +21195,21 @@ class GalleryImage extends external_wp_element_namespaceObject.Component { tabIndex: "0", "aria-label": ariaLabel, ref: this.bindContainer - }), (0,external_wp_blob_namespaceObject.isBlobURL)(url) && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null)) + }), (0,external_wp_blob_namespaceObject.isBlobURL)(url) && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null)) /* eslint-enable jsx-a11y/no-noninteractive-element-interactions */; - const className = classnames_default()({ 'is-selected': isSelected, 'is-transient': (0,external_wp_blob_namespaceObject.isBlobURL)(url) }); return ( // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions - (0,external_wp_element_namespaceObject.createElement)("figure", { + (0,external_React_namespaceObject.createElement)("figure", { className: className, onClick: this.onSelectImage, onFocus: this.onSelectImage - }, !isEditing && (href ? (0,external_wp_element_namespaceObject.createElement)("a", { + }, !isEditing && (href ? (0,external_React_namespaceObject.createElement)("a", { href: href - }, img) : img), isEditing && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, { + }, img) : img), isEditing && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, { labels: { title: (0,external_wp_i18n_namespaceObject.__)('Edit gallery image') }, @@ -19316,33 +21222,33 @@ class GalleryImage extends external_wp_element_namespaceObject.Component { id, src: url } - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ButtonGroup, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ButtonGroup, { className: "block-library-gallery-item__inline-menu is-left" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { icon: chevron_left, onClick: isFirstItem ? undefined : onMoveBackward, label: (0,external_wp_i18n_namespaceObject.__)('Move image backward'), "aria-disabled": isFirstItem, disabled: !isSelected - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { icon: chevron_right, onClick: isLastItem ? undefined : onMoveForward, label: (0,external_wp_i18n_namespaceObject.__)('Move image forward'), "aria-disabled": isLastItem, disabled: !isSelected - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ButtonGroup, { + })), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ButtonGroup, { className: "block-library-gallery-item__inline-menu is-right" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { icon: library_edit, onClick: this.onEdit, label: (0,external_wp_i18n_namespaceObject.__)('Replace image'), disabled: !isSelected - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { icon: close_small, onClick: onRemove, label: (0,external_wp_i18n_namespaceObject.__)('Remove image'), disabled: !isSelected - })), !isEditing && (isSelected || caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + })), !isEditing && (isSelected || caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { tagName: "figcaption", className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'), "aria-label": (0,external_wp_i18n_namespaceObject.__)('Image caption text'), @@ -19356,7 +21262,7 @@ class GalleryImage extends external_wp_element_namespaceObject.Component { ); } } -/* harmony default export */ var gallery_image = ((0,external_wp_compose_namespaceObject.compose)([(0,external_wp_data_namespaceObject.withSelect)((select, ownProps) => { +/* harmony default export */ const gallery_image = ((0,external_wp_compose_namespaceObject.compose)([(0,external_wp_data_namespaceObject.withSelect)((select, ownProps) => { const { getMedia } = select(external_wp_coreData_namespaceObject.store); @@ -19418,22 +21324,22 @@ const gallery_Gallery = props => { imageCrop, images } = attributes; - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { ...blockProps, className: classnames_default()(blockProps.className, { [`align${align}`]: align, [`columns-${columns}`]: columns, 'is-cropped': imageCrop }) - }, (0,external_wp_element_namespaceObject.createElement)("ul", { + }, (0,external_React_namespaceObject.createElement)("ul", { className: "blocks-gallery-grid" }, images.map((img, index) => { const ariaLabel = (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: 1: the order number of the image. 2: the total number of images. */ (0,external_wp_i18n_namespaceObject.__)('image %1$d of %2$d in gallery'), index + 1, images.length); - return (0,external_wp_element_namespaceObject.createElement)("li", { + return (0,external_React_namespaceObject.createElement)("li", { className: "blocks-gallery-item", key: img.id ? `${img.id}-${index}` : img.url - }, (0,external_wp_element_namespaceObject.createElement)(gallery_image, { + }, (0,external_React_namespaceObject.createElement)(gallery_image, { url: img.url, alt: img.alt, id: img.id, @@ -19450,7 +21356,7 @@ const gallery_Gallery = props => { "aria-label": ariaLabel, sizeSlug: attributes.sizeSlug })); - })), mediaPlaceholder, (0,external_wp_element_namespaceObject.createElement)(RichTextVisibilityHelper, { + })), mediaPlaceholder, (0,external_React_namespaceObject.createElement)(RichTextVisibilityHelper, { isHidden: !isSelected && external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption), tagName: "figcaption", className: classnames_default()('blocks-gallery-caption', (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption')), @@ -19468,14 +21374,14 @@ function RichTextVisibilityHelper({ isHidden, ...richTextProps }) { - return isHidden ? (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, { + return isHidden ? (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, { as: external_wp_blockEditor_namespaceObject.RichText, ...richTextProps - }) : (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + }) : (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { ...richTextProps }); } -/* harmony default export */ var v1_gallery = (gallery_Gallery); +/* harmony default export */ const v1_gallery = (gallery_Gallery); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/v1/edit.js @@ -19785,7 +21691,7 @@ function edit_GalleryEdit(props) { }, [linkTo]); const hasImages = !!images.length; const hasImageIds = hasImages && images.some(image => !!image.id); - const mediaPlaceholder = (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, { + const mediaPlaceholder = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, { addToGallery: hasImageIds, isAppender: hasImages, disableMediaButtons: hasImages && !isSelected, @@ -19806,15 +21712,15 @@ function edit_GalleryEdit(props) { }); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); if (!hasImages) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, { + return (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, { ...blockProps }, mediaPlaceholder); } const imageSizeOptions = getImagesSizeOptions(); const shouldShowSizeOptions = hasImages && imageSizeOptions.length > 0; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, images.length > 1 && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { + }, images.length > 1 && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Columns'), value: columns, @@ -19823,27 +21729,27 @@ function edit_GalleryEdit(props) { max: Math.min(edit_MAX_COLUMNS, images.length), ...edit_MOBILE_CONTROL_PROPS_RANGE_CONTROL, required: true - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Crop images'), checked: !!imageCrop, onChange: toggleImageCrop, help: getImageCropHelp - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Link to'), value: linkTo, onChange: setLinkTo, options: edit_linkOptions, hideCancelButton: true - }), shouldShowSizeOptions && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { + }), shouldShowSizeOptions && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Image size'), value: sizeSlug, options: imageSizeOptions, onChange: updateImagesSize, hideCancelButton: true - }))), noticeUI, (0,external_wp_element_namespaceObject.createElement)(v1_gallery, { + }))), noticeUI, (0,external_React_namespaceObject.createElement)(v1_gallery, { ...props, selectedImage: selectedImage, mediaPlaceholder: mediaPlaceholder, @@ -19859,7 +21765,7 @@ function edit_GalleryEdit(props) { onFocusGalleryCaption: onFocusGalleryCaption })); } -/* harmony default export */ var v1_edit = ((0,external_wp_compose_namespaceObject.compose)([external_wp_components_namespaceObject.withNotices, (0,external_wp_viewport_namespaceObject.withViewportMatch)({ +/* harmony default export */ const v1_edit = ((0,external_wp_compose_namespaceObject.compose)([external_wp_components_namespaceObject.withNotices, (0,external_wp_viewport_namespaceObject.withViewportMatch)({ isNarrow: '< small' })])(edit_GalleryEdit)); @@ -19885,15 +21791,15 @@ function edit_GalleryEdit(props) { */ function GalleryEditWrapper(props) { if (!isGalleryV2Enabled()) { - return (0,external_wp_element_namespaceObject.createElement)(v1_edit, { + return (0,external_React_namespaceObject.createElement)(v1_edit, { ...props }); } - return (0,external_wp_element_namespaceObject.createElement)(gallery_edit, { + return (0,external_React_namespaceObject.createElement)(gallery_edit, { ...props }); } -/* harmony default export */ var edit_wrapper = ((0,external_wp_compose_namespaceObject.compose)([external_wp_components_namespaceObject.withNotices])(GalleryEditWrapper)); +/* harmony default export */ const edit_wrapper = ((0,external_wp_compose_namespaceObject.compose)([external_wp_components_namespaceObject.withNotices])(GalleryEditWrapper)); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/v1/save.js @@ -19923,11 +21829,11 @@ function saveV1({ linkTo } = attributes; const className = `columns-${columns} ${imageCrop ? 'is-cropped' : ''}`; - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }) - }, (0,external_wp_element_namespaceObject.createElement)("ul", { + }, (0,external_React_namespaceObject.createElement)("ul", { className: "blocks-gallery-grid" }, images.map(image => { let href; @@ -19939,7 +21845,7 @@ function saveV1({ href = image.link; break; } - const img = (0,external_wp_element_namespaceObject.createElement)("img", { + const img = (0,external_React_namespaceObject.createElement)("img", { src: image.url, alt: image.alt, "data-id": image.id, @@ -19947,17 +21853,17 @@ function saveV1({ "data-link": image.link, className: image.id ? `wp-image-${image.id}` : null }); - return (0,external_wp_element_namespaceObject.createElement)("li", { + return (0,external_React_namespaceObject.createElement)("li", { key: image.id || image.url, className: "blocks-gallery-item" - }, (0,external_wp_element_namespaceObject.createElement)("figure", null, href ? (0,external_wp_element_namespaceObject.createElement)("a", { + }, (0,external_React_namespaceObject.createElement)("figure", null, href ? (0,external_React_namespaceObject.createElement)("a", { href: href - }, img) : img, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(image.caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, img) : img, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(image.caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", className: classnames_default()('blocks-gallery-item__caption', (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption')), value: image.caption }))); - })), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + })), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", className: classnames_default()('blocks-gallery-caption', (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption')), value: caption @@ -20003,9 +21909,9 @@ function saveWithInnerBlocks({ className }); const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps); - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { ...innerBlocksProps - }, innerBlocksProps.children, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, innerBlocksProps.children, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", className: classnames_default()('blocks-gallery-caption', (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption')), value: caption @@ -20025,7 +21931,6 @@ function saveWithInnerBlocks({ */ - const parseShortcodeIds = ids => { if (!ids) { return []; @@ -20160,76 +22065,12 @@ const gallery_transforms_transforms = { }, { type: 'shortcode', tag: 'gallery', - attributes: { - images: { - type: 'array', - shortcode: ({ - named: { - ids - } - }) => { - if (!isGalleryV2Enabled()) { - return parseShortcodeIds(ids).map(id => ({ - id: id.toString() - })); - } - } - }, - ids: { - type: 'array', - shortcode: ({ - named: { - ids - } - }) => { - if (!isGalleryV2Enabled()) { - return parseShortcodeIds(ids); - } - } - }, - columns: { - type: 'number', - shortcode: ({ - named: { - columns = '3' - } - }) => { - return parseInt(columns, 10); - } - }, - linkTo: { - type: 'string', - shortcode: ({ - named: { - link - } - }) => { - if (!isGalleryV2Enabled()) { - switch (link) { - case 'post': - return v1_constants_LINK_DESTINATION_ATTACHMENT; - case 'file': - return v1_constants_LINK_DESTINATION_MEDIA; - default: - return v1_constants_LINK_DESTINATION_ATTACHMENT; - } - } - switch (link) { - case 'post': - return LINK_DESTINATION_ATTACHMENT; - case 'file': - return LINK_DESTINATION_MEDIA; - default: - return LINK_DESTINATION_NONE; - } - } - } - }, transform({ named: { ids, columns = 3, - link + link, + orderby } }) { const imageIds = parseShortcodeIds(ids).map(id => parseInt(id, 10)); @@ -20241,7 +22082,8 @@ const gallery_transforms_transforms = { } const galleryBlock = (0,external_wp_blocks_namespaceObject.createBlock)('core/gallery', { columns: parseInt(columns, 10), - linkTo + linkTo, + randomOrder: orderby === 'rand' }, imageIds.map(imageId => (0,external_wp_blocks_namespaceObject.createBlock)('core/image', { id: imageId }))); @@ -20346,7 +22188,7 @@ const gallery_transforms_transforms = { } }] }; -/* harmony default export */ var gallery_transforms = (gallery_transforms_transforms); +/* harmony default export */ const gallery_transforms = (gallery_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/index.js /** @@ -20366,6 +22208,7 @@ const gallery_metadata = { name: "core/gallery", title: "Gallery", category: "media", + allowedBlocks: ["core/image"], description: "Display multiple images in a rich gallery.", keywords: ["images", "photos"], textdomain: "default", @@ -20408,8 +22251,8 @@ const gallery_metadata = { attribute: "data-id" }, caption: { - type: "string", - source: "html", + type: "rich-text", + source: "rich-text", selector: ".blocks-gallery-item__caption" } } @@ -20434,14 +22277,18 @@ const gallery_metadata = { maximum: 8 }, caption: { - type: "string", - source: "html", + type: "rich-text", + source: "rich-text", selector: ".blocks-gallery-caption" }, imageCrop: { type: "boolean", "default": true }, + randomOrder: { + type: "boolean", + "default": false + }, fixedHeight: { type: "boolean", "default": true @@ -20494,6 +22341,9 @@ const gallery_metadata = { "default": { type: "flex" } + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-gallery-editor", @@ -20534,20 +22384,6 @@ const gallery_init = () => initBlock({ settings: gallery_settings }); -;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/group.js - -/** - * WordPress dependencies - */ - -const group = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { - viewBox: "0 0 24 24", - xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { - d: "M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z" -})); -/* harmony default export */ var library_group = (group); - ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/group/deprecated.js /** @@ -20655,7 +22491,7 @@ const group_deprecated_deprecated = [ tagName: Tag } }) { - return (0,external_wp_element_namespaceObject.createElement)(Tag, { + return (0,external_React_namespaceObject.createElement)(Tag, { ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(external_wp_blockEditor_namespaceObject.useBlockProps.save()) }); }, @@ -20712,11 +22548,11 @@ const group_deprecated_deprecated = [ const { tagName: Tag } = attributes; - return (0,external_wp_element_namespaceObject.createElement)(Tag, { + return (0,external_React_namespaceObject.createElement)(Tag, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save() - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-group__inner-container" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null))); + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null))); } }, // Version of the block without global styles support @@ -20760,12 +22596,12 @@ const group_deprecated_deprecated = [ backgroundColor: backgroundClass ? undefined : customBackgroundColor, color: textClass ? undefined : customTextColor }; - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: className, style: styles - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-group__inner-container" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null))); + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null))); } }, // Version of the group block with a bug that made text color class not applied. @@ -20809,12 +22645,12 @@ const group_deprecated_deprecated = [ backgroundColor: backgroundClass ? undefined : customBackgroundColor, color: textClass ? undefined : customTextColor }; - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: className, style: styles - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-group__inner-container" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null))); + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null))); } }, // v1 of group block. Deprecated to add an inner-container div around `InnerBlocks.Content`. @@ -20847,13 +22683,13 @@ const group_deprecated_deprecated = [ const styles = { backgroundColor: backgroundClass ? undefined : customBackgroundColor }; - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: className, style: styles - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); } }]; -/* harmony default export */ var group_deprecated = (group_deprecated_deprecated); +/* harmony default export */ const group_deprecated = (group_deprecated_deprecated); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/group/placeholder.js @@ -20876,38 +22712,38 @@ const group_deprecated_deprecated = [ */ const getGroupPlaceholderIcons = (name = 'group') => { const icons = { - group: (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { + group: (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", width: "44", height: "32", viewBox: "0 0 44 32" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M42 0H2C.9 0 0 .9 0 2v28c0 1.1.9 2 2 2h40c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2z" })), - 'group-row': (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { + 'group-row': (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", width: "44", height: "32", viewBox: "0 0 44 32" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M42 0H23.5c-.6 0-1 .4-1 1v30c0 .6.4 1 1 1H42c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2zM20.5 0H2C.9 0 0 .9 0 2v28c0 1.1.9 2 2 2h18.5c.6 0 1-.4 1-1V1c0-.6-.4-1-1-1z" })), - 'group-stack': (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { + 'group-stack': (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", width: "44", height: "32", viewBox: "0 0 44 32" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M42 0H2C.9 0 0 .9 0 2v12.5c0 .6.4 1 1 1h42c.6 0 1-.4 1-1V2c0-1.1-.9-2-2-2zm1 16.5H1c-.6 0-1 .4-1 1V30c0 1.1.9 2 2 2h40c1.1 0 2-.9 2-2V17.5c0-.6-.4-1-1-1z" })), - 'group-grid': (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { + 'group-grid': (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", width: "44", height: "32", viewBox: "0 0 44 32" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "m20.30137,-0.00025l-18.9728,0c-0.86524,0.07234 -1.41711,0.79149 -1.41711,1.89149l0,12.64468c0,0.6 0.73401,0.96383 1.0304,0.96383l19.67469,0.03617c0.29639,0 1.0304,-0.4 1.0304,-1l-0.03576,-12.7532c0,-1.1 -0.76644,-1.78297 -1.30983,-1.78297zm0.52975,16.60851l-19.99654,-0.03617c-0.29639,0 -0.92312,0.36383 -0.92312,0.96383l-0.03576,12.68085c0,1.1 0.8022,1.81915 1.34559,1.81915l19.00857,0c0.54339,0 1.45287,-0.71915 1.45287,-1.81915l0,-12.53617c0,-0.6 -0.5552,-1.07234 -0.8516,-1.07234z" - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "m42.73056,-0.03617l-18.59217,0c-0.84788,0.07234 -1.38868,0.79149 -1.38868,1.89149l0,12.64468c0,0.6 0.71928,0.96383 1.00973,0.96383l19.27997,0.03617c0.29045,0 1.00973,-0.4 1.00973,-1l-0.03504,-12.7532c0,-1.1 -0.75106,-1.78297 -1.28355,-1.78297zm0.51912,16.60851l-19.59537,-0.03617c-0.29045,0 -0.9046,0.36383 -0.9046,0.96383l-0.03504,12.68085c0,1.1 0.78611,1.81915 1.31859,1.81915l18.62721,0c0.53249,0 1.42372,-0.71915 1.42372,-1.81915l0,-12.53617c0,-0.6 -0.54407,-1.07234 -0.83451,-1.07234z" })) }; @@ -20973,17 +22809,17 @@ function GroupPlaceHolder({ const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: 'wp-block-group__placeholder' }); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { instructions: (0,external_wp_i18n_namespaceObject.__)('Group blocks together. Select a layout:') - }, (0,external_wp_element_namespaceObject.createElement)("ul", { + }, (0,external_React_namespaceObject.createElement)("ul", { role: "list", className: "wp-block-group-placeholder__variations", "aria-label": (0,external_wp_i18n_namespaceObject.__)('Block variations') - }, variations.map(variation => (0,external_wp_element_namespaceObject.createElement)("li", { + }, variations.map(variation => (0,external_React_namespaceObject.createElement)("li", { key: variation.name - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { variant: "tertiary", icon: getGroupPlaceholderIcons(variation.name), iconSize: 44, @@ -20992,7 +22828,7 @@ function GroupPlaceHolder({ label: `${variation.title}: ${variation.description}` })))))); } -/* harmony default export */ var placeholder = (GroupPlaceHolder); +/* harmony default export */ const placeholder = (GroupPlaceHolder); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/group/edit.js @@ -21005,6 +22841,7 @@ function GroupPlaceHolder({ + /** * Internal dependencies */ @@ -21031,10 +22868,11 @@ function GroupEditControls({ aside: (0,external_wp_i18n_namespaceObject.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."), footer: (0,external_wp_i18n_namespaceObject.__)('The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).') }; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, + __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)('HTML element'), options: [{ label: (0,external_wp_i18n_namespaceObject.__)('Default (<div>)'), @@ -21067,8 +22905,7 @@ function GroupEdit({ attributes, name, setAttributes, - clientId, - __unstableLayoutClassNames: layoutClassNames + clientId }) { const { hasInnerBlocks, @@ -21092,27 +22929,19 @@ function GroupEdit({ } = attributes; // Layout settings. - const defaultLayout = (0,external_wp_blockEditor_namespaceObject.useSetting)('layout') || {}; - const usedLayout = !layout?.type ? { - ...defaultLayout, - ...layout, - type: 'default' - } : { - ...defaultLayout, - ...layout - }; const { type = 'default' - } = usedLayout; + } = layout; const layoutSupportEnabled = themeSupportsLayout || type === 'flex' || type === 'grid'; // Hooks. + const ref = (0,external_wp_element_namespaceObject.useRef)(); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ - className: !layoutSupportEnabled ? layoutClassNames : null + ref }); const [showPlaceholder, setShowPlaceholder] = useShouldShowPlaceHolder({ attributes, - usedLayoutType: usedLayout?.type, + usedLayoutType: type, hasInnerBlocks }); @@ -21132,10 +22961,10 @@ function GroupEdit({ const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(layoutSupportEnabled ? blockProps : { className: 'wp-block-group__inner-container' }, { + dropZoneElement: ref.current, templateLock, allowedBlocks, - renderAppender, - __unstableDisableLayoutClassNames: !layoutSupportEnabled + renderAppender }); const { selectBlock @@ -21145,23 +22974,23 @@ function GroupEdit({ selectBlock(clientId, -1); setShowPlaceholder(false); }; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(GroupEditControls, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(GroupEditControls, { tagName: TagName, onSelectTagName: value => setAttributes({ tagName: value }) - }), showPlaceholder && (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, null, innerBlocksProps.children, (0,external_wp_element_namespaceObject.createElement)(placeholder, { + }), showPlaceholder && (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, null, innerBlocksProps.children, (0,external_React_namespaceObject.createElement)(placeholder, { name: name, onSelect: selectVariation - })), layoutSupportEnabled && !showPlaceholder && (0,external_wp_element_namespaceObject.createElement)(TagName, { + })), layoutSupportEnabled && !showPlaceholder && (0,external_React_namespaceObject.createElement)(TagName, { ...innerBlocksProps - }), !layoutSupportEnabled && !showPlaceholder && (0,external_wp_element_namespaceObject.createElement)(TagName, { + }), !layoutSupportEnabled && !showPlaceholder && (0,external_React_namespaceObject.createElement)(TagName, { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { ...innerBlocksProps }))); } -/* harmony default export */ var group_edit = (GroupEdit); +/* harmony default export */ const group_edit = (GroupEdit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/group/save.js @@ -21174,7 +23003,7 @@ function group_save_save({ tagName: Tag } }) { - return (0,external_wp_element_namespaceObject.createElement)(Tag, { + return (0,external_React_namespaceObject.createElement)(Tag, { ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(external_wp_blockEditor_namespaceObject.useBlockProps.save()) }); } @@ -21217,7 +23046,7 @@ const group_transforms_transforms = { } }] }; -/* harmony default export */ var group_transforms = (group_transforms_transforms); +/* harmony default export */ const group_transforms = (group_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/row.js @@ -21225,13 +23054,13 @@ const group_transforms_transforms = { * WordPress dependencies */ -const row = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const row = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M4 6.5h5a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H4V16h5a.5.5 0 0 0 .5-.5v-7A.5.5 0 0 0 9 8H4V6.5Zm16 0h-5a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h5V16h-5a.5.5 0 0 1-.5-.5v-7A.5.5 0 0 1 15 8h5V6.5Z" })); -/* harmony default export */ var library_row = (row); +/* harmony default export */ const library_row = (row); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/stack.js @@ -21239,13 +23068,13 @@ const row = (0,external_wp_element_namespaceObject.createElement)(external_wp_pr * WordPress dependencies */ -const stack = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const stack = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M17.5 4v5a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V4H8v5a.5.5 0 0 0 .5.5h7A.5.5 0 0 0 16 9V4h1.5Zm0 16v-5a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v5H8v-5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v5h1.5Z" })); -/* harmony default export */ var library_stack = (stack); +/* harmony default export */ const library_stack = (stack); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/grid.js @@ -21253,15 +23082,15 @@ const stack = (0,external_wp_element_namespaceObject.createElement)(external_wp_ * WordPress dependencies */ -const grid = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const grid = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z", fillRule: "evenodd", clipRule: "evenodd" })); -/* harmony default export */ var library_grid = (grid); +/* harmony default export */ const library_grid = (grid); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/group/variations.js /** @@ -21324,7 +23153,7 @@ if (window?.__experimentalEnableGroupGridVariation) { icon: library_grid }); } -/* harmony default export */ var group_variations = (group_variations_variations); +/* harmony default export */ const group_variations = (group_variations_variations); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/group/index.js /** @@ -21365,13 +23194,16 @@ const group_metadata = { __experimentalOnEnter: true, __experimentalOnMerge: true, __experimentalSettings: true, - __experimentalMetadata: true, align: ["wide", "full"], anchor: true, ariaLabel: true, html: false, background: { - backgroundImage: true + backgroundImage: true, + backgroundSize: true, + __experimentalDefaultControls: { + backgroundImage: true + } }, color: { gradients: true, @@ -21425,6 +23257,9 @@ const group_metadata = { }, layout: { allowSizingOnChildren: true + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-group-editor", @@ -21510,13 +23345,13 @@ const group_init = () => initBlock({ * WordPress dependencies */ -const heading = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const heading = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M6 5V18.5911L12 13.8473L18 18.5911V5H6Z" })); -/* harmony default export */ var library_heading = (heading); +/* harmony default export */ const library_heading = (heading); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/deprecated.js @@ -21607,7 +23442,7 @@ const heading_deprecated_v1 = { const className = classnames_default()({ [textClass]: textClass }); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { className: className ? className : undefined, tagName: tagName, style: { @@ -21645,7 +23480,7 @@ const heading_deprecated_v2 = { [textClass]: textClass, [`has-text-align-${align}`]: align }); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { className: className ? className : undefined, tagName: tagName, style: { @@ -21685,7 +23520,7 @@ const heading_deprecated_v3 = { 'has-text-color': textColor || customTextColor, [`has-text-align-${align}`]: align }); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { className: className ? className : undefined, tagName: tagName, style: { @@ -21732,11 +23567,11 @@ const heading_deprecated_v4 = { const className = classnames_default()({ [`has-text-align-${align}`]: align }); - return (0,external_wp_element_namespaceObject.createElement)(TagName, { + return (0,external_React_namespaceObject.createElement)(TagName, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }) - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content })); } @@ -21811,21 +23646,18 @@ const heading_deprecated_v5 = { const className = classnames_default()({ [`has-text-align-${textAlign}`]: textAlign }); - return (0,external_wp_element_namespaceObject.createElement)(TagName, { + return (0,external_React_namespaceObject.createElement)(TagName, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }) - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content })); } }; const heading_deprecated_deprecated = [heading_deprecated_v5, heading_deprecated_v4, heading_deprecated_v3, heading_deprecated_v2, heading_deprecated_v1]; -/* harmony default export */ var heading_deprecated = (heading_deprecated_deprecated); +/* harmony default export */ const heading_deprecated = (heading_deprecated_deprecated); -// EXTERNAL MODULE: ./node_modules/remove-accents/index.js -var remove_accents = __webpack_require__(4793); -var remove_accents_default = /*#__PURE__*/__webpack_require__.n(remove_accents); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/autogenerate-anchors.js /** * External dependencies @@ -21949,6 +23781,7 @@ function HeadingEdit({ }), style }); + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)(); const { canGenerateAnchors } = (0,external_wp_data_namespaceObject.useSelect)(select => { @@ -21992,21 +23825,21 @@ function HeadingEdit({ } setAttributes(newAttrs); }; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, blockEditingMode === 'default' && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.HeadingLevelDropdown, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.HeadingLevelDropdown, { value: level, onChange: newLevel => setAttributes({ level: newLevel }) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: nextAlign => { setAttributes({ textAlign: nextAlign }); } - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { identifier: "content", tagName: tagName, value: content, @@ -22038,7 +23871,7 @@ function HeadingEdit({ ...blockProps })); } -/* harmony default export */ var heading_edit = (HeadingEdit); +/* harmony default export */ const heading_edit = (HeadingEdit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/save.js @@ -22063,11 +23896,11 @@ function heading_save_save({ const className = classnames_default()({ [`has-text-align-${textAlign}`]: textAlign }); - return (0,external_wp_element_namespaceObject.createElement)(TagName, { + return (0,external_React_namespaceObject.createElement)(TagName, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }) - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content })); } @@ -22094,6 +23927,7 @@ function getLevelFromHeadingNodeName(nodeName) { * Internal dependencies */ + const heading_transforms_transforms = { from: [{ type: 'block', @@ -22102,11 +23936,17 @@ const heading_transforms_transforms = { transform: attributes => attributes.map(({ content, anchor, - align: textAlign + align: textAlign, + metadata }) => (0,external_wp_blocks_namespaceObject.createBlock)('core/heading', { content, anchor, - textAlign + textAlign, + metadata: getTransformedMetadata(metadata, 'core/heading', ({ + content: contentBinding + }) => ({ + content: contentBinding + })) })) }, { type: 'raw', @@ -22161,14 +24001,20 @@ const heading_transforms_transforms = { blocks: ['core/paragraph'], transform: attributes => attributes.map(({ content, - textAlign: align + textAlign: align, + metadata }) => (0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph', { content, - align + align, + metadata: getTransformedMetadata(metadata, 'core/paragraph', ({ + content: contentBinding + }) => ({ + content: contentBinding + })) })) }] }; -/* harmony default export */ var heading_transforms = (heading_transforms_transforms); +/* harmony default export */ const heading_transforms = (heading_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/index.js /** @@ -22197,10 +24043,9 @@ const heading_metadata = { type: "string" }, content: { - type: "string", - source: "html", + type: "rich-text", + source: "rich-text", selector: "h1,h2,h3,h4,h5,h6", - "default": "", __experimentalRole: "content" }, level: { @@ -22242,13 +24087,14 @@ const heading_metadata = { __experimentalTextDecoration: true, __experimentalWritingMode: true, __experimentalDefaultControls: { - fontSize: true, - fontAppearance: true, - textTransform: true + fontSize: true } }, __unstablePasteTextInline: true, - __experimentalSlashInserter: true + __experimentalSlashInserter: true, + interactivity: { + clientNavigation: true + } }, editorStyle: "wp-block-heading-editor", style: "wp-block-heading" @@ -22274,14 +24120,16 @@ const heading_settings = { content, level } = attributes; + const customName = attributes?.metadata?.name; + const hasContent = content?.length > 0; // In the list view, use the block's content as the label. // If the content is empty, fall back to the default label. - if (context === 'list-view' && content) { - return content; + if (context === 'list-view' && (customName || hasContent)) { + return customName || content; } if (context === 'accessibility') { - return !content || content.length === 0 ? (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: accessibility text. %s: heading level. */ + return !hasContent ? (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: accessibility text. %s: heading level. */ (0,external_wp_i18n_namespaceObject.__)('Level %s. Empty.'), level) : (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: accessibility text. 1: heading level. 2: heading content. */ (0,external_wp_i18n_namespaceObject.__)('Level %1$s. %2$s'), level, content); } @@ -22308,13 +24156,13 @@ const heading_init = () => initBlock({ * WordPress dependencies */ -const home = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const home = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z" })); -/* harmony default export */ var library_home = (home); +/* harmony default export */ const library_home = (home); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/home-link/edit.js @@ -22378,13 +24226,13 @@ function HomeEdit({ }); } }, [label]); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)("a", { + }, (0,external_React_namespaceObject.createElement)("a", { className: "wp-block-home-link__content wp-block-navigation-item__content", href: homeUrl, onClick: preventDefault - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { identifier: "label", className: "wp-block-home-link__label", value: label, @@ -22407,7 +24255,7 @@ function HomeEdit({ */ function home_link_save_save() { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/home-link/index.js @@ -22451,6 +24299,9 @@ const home_link_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-home-link-editor", @@ -22484,13 +24335,13 @@ const home_link_init = () => initBlock({ * WordPress dependencies */ -const html = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const html = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M4.8 11.4H2.1V9H1v6h1.1v-2.6h2.7V15h1.1V9H4.8v2.4zm1.9-1.3h1.7V15h1.1v-4.9h1.7V9H6.7v1.1zM16.2 9l-1.5 2.7L13.3 9h-.9l-.8 6h1.1l.5-4 1.5 2.8 1.5-2.8.5 4h1.1L17 9h-.8zm3.8 5V9h-1.1v6h3.6v-1H20z" })); -/* harmony default export */ var library_html = (html); +/* harmony default export */ const library_html = (html); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/html/preview.js @@ -22502,6 +24353,7 @@ const html = (0,external_wp_element_namespaceObject.createElement)(external_wp_p + // Default styles used to unset some of the styles // that might be inherited from the editor style. const DEFAULT_STYLES = ` @@ -22516,14 +24368,14 @@ function HTMLEditPreview({ content, isSelected }) { - const settingStyles = (0,external_wp_data_namespaceObject.useSelect)(select => { - return select(external_wp_blockEditor_namespaceObject.store).getSettings()?.styles; - }, []); - const styles = (0,external_wp_element_namespaceObject.useMemo)(() => [DEFAULT_STYLES, ...(0,external_wp_blockEditor_namespaceObject.transformStyles)(settingStyles)], [settingStyles]); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SandBox, { + const settingStyles = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).getSettings().styles); + const styles = (0,external_wp_element_namespaceObject.useMemo)(() => [DEFAULT_STYLES, ...(0,external_wp_blockEditor_namespaceObject.transformStyles)(settingStyles.filter(style => style.css))], [settingStyles]); + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SandBox, { html: content, - styles: styles - }), !isSelected && (0,external_wp_element_namespaceObject.createElement)("div", { + styles: styles, + title: (0,external_wp_i18n_namespaceObject.__)('Custom HTML Preview'), + tabIndex: -1 + }), !isSelected && (0,external_React_namespaceObject.createElement)("div", { className: "block-library-html__preview-overlay" })); } @@ -22538,6 +24390,7 @@ function HTMLEditPreview({ + /** * Internal dependencies */ @@ -22549,28 +24402,33 @@ function HTMLEdit({ }) { const [isPreview, setIsPreview] = (0,external_wp_element_namespaceObject.useState)(); const isDisabled = (0,external_wp_element_namespaceObject.useContext)(external_wp_components_namespaceObject.Disabled.Context); + const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(HTMLEdit, 'html-edit-desc'); function switchToPreview() { setIsPreview(true); } function switchToHTML() { setIsPreview(false); } - return (0,external_wp_element_namespaceObject.createElement)("div", { - ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({ - className: 'block-library-html__edit' - }) - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ + className: 'block-library-html__edit', + 'aria-describedby': isPreview ? instanceId : undefined + }); + return (0,external_React_namespaceObject.createElement)("div", { + ...blockProps + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { className: "components-tab-button", isPressed: !isPreview, onClick: switchToHTML - }, "HTML"), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + }, "HTML"), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { className: "components-tab-button", isPressed: isPreview, onClick: switchToPreview - }, (0,external_wp_i18n_namespaceObject.__)('Preview')))), isPreview || isDisabled ? (0,external_wp_element_namespaceObject.createElement)(HTMLEditPreview, { + }, (0,external_wp_i18n_namespaceObject.__)('Preview')))), isPreview || isDisabled ? (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(HTMLEditPreview, { content: attributes.content, isSelected: isSelected - }) : (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.PlainText, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, { + id: instanceId + }, (0,external_wp_i18n_namespaceObject.__)('HTML preview is not yet fully accessible. Please switch screen reader to virtualized mode to navigate the below iFrame.'))) : (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.PlainText, { value: attributes.content, onChange: content => setAttributes({ content @@ -22589,7 +24447,7 @@ function HTMLEdit({ function html_save_save({ attributes }) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, null, attributes.content); + return (0,external_React_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, null, attributes.content); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/html/transforms.js @@ -22597,20 +24455,25 @@ function html_save_save({ * WordPress dependencies */ + const html_transforms_transforms = { from: [{ type: 'block', blocks: ['core/code'], transform: ({ - content + content: html }) => { return (0,external_wp_blocks_namespaceObject.createBlock)('core/html', { - content + // The code block may output HTML formatting, so convert it + // to plain text. + content: (0,external_wp_richText_namespaceObject.create)({ + html + }).text }); } }] }; -/* harmony default export */ var html_transforms = (html_transforms_transforms); +/* harmony default export */ const html_transforms = (html_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/html/index.js /** @@ -22642,7 +24505,10 @@ const html_metadata = { supports: { customClassName: false, className: false, - html: false + html: false, + interactivity: { + clientNavigation: true + } }, editorStyle: "wp-block-html-editor" }; @@ -22742,7 +24608,7 @@ const image_deprecated_v1 = { width, height } : {}; - const image = (0,external_wp_element_namespaceObject.createElement)("img", { + const image = (0,external_React_namespaceObject.createElement)("img", { src: url, alt: alt, ...extraImageProps @@ -22757,12 +24623,12 @@ const image_deprecated_v1 = { maxWidth: '50%' }; } - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { className: align ? `align${align}` : null, style: figureStyle - }, href ? (0,external_wp_element_namespaceObject.createElement)("a", { + }, href ? (0,external_React_namespaceObject.createElement)("a", { href: href - }, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })); @@ -22827,18 +24693,18 @@ const image_deprecated_v2 = { height, id } = attributes; - const image = (0,external_wp_element_namespaceObject.createElement)("img", { + const image = (0,external_React_namespaceObject.createElement)("img", { src: url, alt: alt, className: id ? `wp-image-${id}` : null, width: width, height: height }); - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { className: align ? `align${align}` : null - }, href ? (0,external_wp_element_namespaceObject.createElement)("a", { + }, href ? (0,external_React_namespaceObject.createElement)("a", { href: href - }, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })); @@ -22910,18 +24776,18 @@ const image_deprecated_v3 = { [`align${align}`]: align, 'is-resized': width || height }); - const image = (0,external_wp_element_namespaceObject.createElement)("img", { + const image = (0,external_React_namespaceObject.createElement)("img", { src: url, alt: alt, className: id ? `wp-image-${id}` : null, width: width, height: height }); - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { className: classes - }, href ? (0,external_wp_element_namespaceObject.createElement)("a", { + }, href ? (0,external_React_namespaceObject.createElement)("a", { href: href - }, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })); @@ -23029,7 +24895,7 @@ const image_deprecated_v4 = { [`size-${sizeSlug}`]: sizeSlug, 'is-resized': width || height }); - const image = (0,external_wp_element_namespaceObject.createElement)("img", { + const image = (0,external_React_namespaceObject.createElement)("img", { src: url, alt: alt, className: id ? `wp-image-${id}` : null, @@ -23037,23 +24903,23 @@ const image_deprecated_v4 = { height: height, title: title }); - const figure = (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, href ? (0,external_wp_element_namespaceObject.createElement)("a", { + const figure = (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, href ? (0,external_React_namespaceObject.createElement)("a", { className: linkClass, href: href, target: linkTarget, rel: newRel - }, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })); if ('left' === align || 'right' === align || 'center' === align) { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save() - }, (0,external_wp_element_namespaceObject.createElement)("figure", { + }, (0,external_React_namespaceObject.createElement)("figure", { className: classes }, figure)); } - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes }) @@ -23183,7 +25049,7 @@ const image_deprecated_v5 = { [`size-${sizeSlug}`]: sizeSlug, 'is-resized': width || height }); - const image = (0,external_wp_element_namespaceObject.createElement)("img", { + const image = (0,external_React_namespaceObject.createElement)("img", { src: url, alt: alt, className: id ? `wp-image-${id}` : null, @@ -23191,16 +25057,16 @@ const image_deprecated_v5 = { height: height, title: title }); - const figure = (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, href ? (0,external_wp_element_namespaceObject.createElement)("a", { + const figure = (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, href ? (0,external_React_namespaceObject.createElement)("a", { className: linkClass, href: href, target: linkTarget, rel: newRel - }, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })); - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes }) @@ -23357,7 +25223,7 @@ const image_deprecated_v6 = { const imageClasses = classnames_default()(borderProps.className, { [`wp-image-${id}`]: !!id }); - const image = (0,external_wp_element_namespaceObject.createElement)("img", { + const image = (0,external_React_namespaceObject.createElement)("img", { src: url, alt: alt, className: imageClasses || undefined, @@ -23370,17 +25236,17 @@ const image_deprecated_v6 = { height: height, title: title }); - const figure = (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, href ? (0,external_wp_element_namespaceObject.createElement)("a", { + const figure = (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, href ? (0,external_React_namespaceObject.createElement)("a", { className: linkClass, href: href, target: linkTarget, rel: newRel - }, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'), tagName: "figcaption", value: caption })); - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes }) @@ -23539,7 +25405,7 @@ const image_deprecated_v7 = { const imageClasses = classnames_default()(borderProps.className, { [`wp-image-${id}`]: !!id }); - const image = (0,external_wp_element_namespaceObject.createElement)("img", { + const image = (0,external_React_namespaceObject.createElement)("img", { src: url, alt: alt, className: imageClasses || undefined, @@ -23554,17 +25420,17 @@ const image_deprecated_v7 = { height: height, title: title }); - const figure = (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, href ? (0,external_wp_element_namespaceObject.createElement)("a", { + const figure = (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, href ? (0,external_React_namespaceObject.createElement)("a", { className: linkClass, href: href, target: linkTarget, rel: newRel - }, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'), tagName: "figcaption", value: caption })); - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes }) @@ -23739,7 +25605,7 @@ const deprecated_v8 = { const imageClasses = classnames_default()(borderProps.className, { [`wp-image-${id}`]: !!id }); - const image = (0,external_wp_element_namespaceObject.createElement)("img", { + const image = (0,external_React_namespaceObject.createElement)("img", { src: url, alt: alt, className: imageClasses || undefined, @@ -23752,24 +25618,38 @@ const deprecated_v8 = { }, title: title }); - const figure = (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, href ? (0,external_wp_element_namespaceObject.createElement)("a", { + const figure = (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, href ? (0,external_React_namespaceObject.createElement)("a", { className: linkClass, href: href, target: linkTarget, rel: newRel - }, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'), tagName: "figcaption", value: caption })); - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes }) }, figure); } }; -/* harmony default export */ var image_deprecated = ([deprecated_v8, image_deprecated_v7, image_deprecated_v6, image_deprecated_v5, image_deprecated_v4, image_deprecated_v3, image_deprecated_v2, image_deprecated_v1]); +/* harmony default export */ const image_deprecated = ([deprecated_v8, image_deprecated_v7, image_deprecated_v6, image_deprecated_v5, image_deprecated_v4, image_deprecated_v3, image_deprecated_v2, image_deprecated_v1]); + +;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/plugins.js + +/** + * WordPress dependencies + */ + +const plugins = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 24 24" +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { + d: "M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z" +})); +/* harmony default export */ const library_plugins = (plugins); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/crop.js @@ -23777,13 +25657,13 @@ const deprecated_v8 = { * WordPress dependencies */ -const crop = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const crop = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { - d: "M16.5 7.8v7H18v-7c0-1-.8-1.8-1.8-1.8h-7v1.5h7c.2 0 .3.1.3.3zm-8.7 8.7c-.1 0-.2-.1-.2-.2V2H6v4H2v1.5h4v8.8c0 1 .8 1.8 1.8 1.8h8.8v4H18v-4h4v-1.5H7.8z" +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { + d: "M18 20v-2h2v-1.5H7.75a.25.25 0 0 1-.25-.25V4H6v2H4v1.5h2v8.75c0 .966.784 1.75 1.75 1.75h8.75v2H18ZM9.273 7.5h6.977a.25.25 0 0 1 .25.25v6.977H18V7.75A1.75 1.75 0 0 0 16.25 6H9.273v1.5Z" })); -/* harmony default export */ var library_crop = (crop); +/* harmony default export */ const library_crop = (crop); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/overlay-text.js @@ -23791,13 +25671,13 @@ const crop = (0,external_wp_element_namespaceObject.createElement)(external_wp_p * WordPress dependencies */ -const overlayText = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const overlayText = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12-9.8c.4 0 .8-.3.9-.7l1.1-3h3.6l.5 1.7h1.9L13 9h-2.2l-3.4 9.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12H20V6c0-1.1-.9-2-2-2zm-6 7l1.4 3.9h-2.7L12 11z" })); -/* harmony default export */ var overlay_text = (overlayText); +/* harmony default export */ const overlay_text = (overlayText); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/upload.js @@ -23805,13 +25685,13 @@ const overlayText = (0,external_wp_element_namespaceObject.createElement)(extern * WordPress dependencies */ -const upload = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const upload = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z" })); -/* harmony default export */ var library_upload = (upload); +/* harmony default export */ const library_upload = (upload); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/use-client-width.js /** @@ -23836,6 +25716,16 @@ function useClientWidth(ref, dependencies) { return clientWidth; } +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/utils/constants.js +// The following dropdown menu props aim to provide a consistent offset and +// placement for ToolsPanel menus for block controls to match color popovers. +const TOOLSPANEL_DROPDOWNMENU_PROPS = { + popoverProps: { + placement: 'left-start', + offset: 259 // Inner sidebar width (248px) - button width (24px) - border (1px) + padding (16px) + spacing (20px) + } +}; + ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image.js /** @@ -23854,6 +25744,7 @@ function useClientWidth(ref, dependencies) { + /** * Internal dependencies */ @@ -23862,11 +25753,13 @@ function useClientWidth(ref, dependencies) { + /** * Module constants */ + const { DimensionsTool, ResolutionTool @@ -23889,7 +25782,7 @@ const ImageWrapper = ({ if (!href) { return children; } - return (0,external_wp_element_namespaceObject.createElement)("a", { + return (0,external_React_namespaceObject.createElement)("a", { href: href, onClick: event => event.preventDefault(), "aria-disabled": true, @@ -23908,7 +25801,7 @@ function image_Image({ temporaryURL, attributes, setAttributes, - isSelected, + isSingleSelected, insertBlocksAfter, onReplace, onSelectImage, @@ -23922,7 +25815,6 @@ function image_Image({ const { url = '', alt, - caption, align, id, href, @@ -23936,50 +25828,32 @@ function image_Image({ scale, linkTarget, sizeSlug, - lightbox + lightbox, + metadata } = attributes; // The only supported unit is px, so we can parseInt to strip the px here. const numericWidth = width ? parseInt(width, 10) : undefined; const numericHeight = height ? parseInt(height, 10) : undefined; const imageRef = (0,external_wp_element_namespaceObject.useRef)(); - const prevCaption = (0,external_wp_compose_namespaceObject.usePrevious)(caption); - const [showCaption, setShowCaption] = (0,external_wp_element_namespaceObject.useState)(!!caption); const { allowResize = true } = context; const { - getBlock + getBlock, + getSettings } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store); - const { - image, - multiImageSelection - } = (0,external_wp_data_namespaceObject.useSelect)(select => { - const { - getMedia - } = select(external_wp_coreData_namespaceObject.store); - const { - getMultiSelectedBlockClientIds, - getBlockName - } = select(external_wp_blockEditor_namespaceObject.store); - const multiSelectedClientIds = getMultiSelectedBlockClientIds(); - return { - image: id && isSelected ? getMedia(id, { - context: 'view' - }) : null, - multiImageSelection: multiSelectedClientIds.length && multiSelectedClientIds.every(_clientId => getBlockName(_clientId) === 'core/image') - }; - }, [id, isSelected]); + const image = (0,external_wp_data_namespaceObject.useSelect)(select => id && isSingleSelected ? select(external_wp_coreData_namespaceObject.store).getMedia(id, { + context: 'view' + }) : null, [id, isSingleSelected]); const { canInsertCover, imageEditing, imageSizes, - maxWidth, - mediaUpload + maxWidth } = (0,external_wp_data_namespaceObject.useSelect)(select => { const { getBlockRootClientId, - getSettings, canInsertBlockType } = select(external_wp_blockEditor_namespaceObject.store); const rootClientId = getBlockRootClientId(clientId); @@ -23988,7 +25862,6 @@ function image_Image({ imageEditing: settings.imageEditing, imageSizes: settings.imageSizes, maxWidth: settings.maxWidth, - mediaUpload: settings.mediaUpload, canInsertCover: canInsertBlockType('core/cover', rootClientId) }; }, [clientId]); @@ -24010,7 +25883,8 @@ function image_Image({ const [externalBlob, setExternalBlob] = (0,external_wp_element_namespaceObject.useState)(); const clientWidth = useClientWidth(containerRef, [align]); const hasNonContentControls = blockEditingMode === 'default'; - const isResizable = allowResize && hasNonContentControls && !(isWideAligned && isLargeViewport); + const isContentOnlyMode = blockEditingMode === 'contentOnly'; + const isResizable = allowResize && hasNonContentControls && !isWideAligned && isLargeViewport; const imageSizeOptions = imageSizes.filter(({ slug }) => image?.media_details?.sizes?.[slug]?.source_url).map(({ @@ -24020,13 +25894,12 @@ function image_Image({ value: slug, label: name })); - const canUploadMedia = !!mediaUpload; // If an image is externally hosted, try to fetch the image data. This may // fail if the image host doesn't allow CORS with the domain. If it works, // we can enable a button in the toolbar to upload the image. (0,external_wp_element_namespaceObject.useEffect)(() => { - if (!isExternalImage(id, url) || !isSelected || !canUploadMedia) { + if (!isExternalImage(id, url) || !isSingleSelected || !getSettings().mediaUpload) { setExternalBlob(); return; } @@ -24036,22 +25909,7 @@ function image_Image({ .fetch(url.includes('?') ? url : url + '?').then(response => response.blob()).then(blob => setExternalBlob(blob)) // Do nothing, cannot upload. .catch(() => {}); - }, [id, url, isSelected, externalBlob, canUploadMedia]); - - // We need to show the caption when changes come from - // history navigation(undo/redo). - (0,external_wp_element_namespaceObject.useEffect)(() => { - if (caption && !prevCaption) { - setShowCaption(true); - } - }, [caption, prevCaption]); - - // Focus the caption when we click to add one. - const captionRef = (0,external_wp_element_namespaceObject.useCallback)(node => { - if (node && !caption) { - node.focus(); - } - }, [caption]); + }, [id, url, isSingleSelected, externalBlob]); // Get naturalWidth and naturalHeight from image ref, and fall back to loaded natural // width and height. This resolves an issue in Safari where the loaded natural @@ -24087,6 +25945,25 @@ function image_Image({ function onSetHref(props) { setAttributes(props); } + function onSetLightbox(enable) { + if (enable && !lightboxSetting?.enabled) { + setAttributes({ + lightbox: { + enabled: true + } + }); + } else if (!enable && lightboxSetting?.enabled) { + setAttributes({ + lightbox: { + enabled: false + } + }); + } else { + setAttributes({ + lightbox: undefined + }); + } + } function onSetTitle(value) { // This is the HTML title attribute, separate from the media object // title. @@ -24110,6 +25987,12 @@ function image_Image({ }); } function uploadExternal() { + const { + mediaUpload + } = getSettings(); + if (!mediaUpload) { + return; + } mediaUpload({ filesList: [externalBlob], onFileChange([img]) { @@ -24130,28 +26013,13 @@ function image_Image({ } }); } - function updateAlignment(nextAlign) { - const extraUpdatedAttributes = ['wide', 'full'].includes(nextAlign) ? { - width: undefined, - height: undefined, - aspectRatio: undefined, - scale: undefined - } : {}; - setAttributes({ - ...extraUpdatedAttributes, - align: nextAlign - }); - } (0,external_wp_element_namespaceObject.useEffect)(() => { - if (!isSelected) { + if (!isSingleSelected) { setIsEditingImage(false); - if (!caption) { - setShowCaption(false); - } } - }, [isSelected, caption]); + }, [isSingleSelected]); const canEditImage = id && naturalWidth && naturalHeight && imageEditing; - const allowCrop = !multiImageSelection && canEditImage && !isEditingImage; + const allowCrop = isSingleSelected && canEditImage && !isEditingImage; function switchToCover() { replaceBlocks(clientId, (0,external_wp_blocks_namespaceObject.switchToBlockType)(getBlock(clientId), 'core/cover')); } @@ -24162,11 +26030,10 @@ function image_Image({ const dimensionsUnitsOptions = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({ availableUnits: ['px'] }); - const lightboxSetting = (0,external_wp_blockEditor_namespaceObject.useSetting)('lightbox'); - const showLightboxToggle = !!lightbox || lightboxSetting?.allowEditing === true; + const [lightboxSetting] = (0,external_wp_blockEditor_namespaceObject.useSettings)('lightbox'); + const showLightboxSetting = !!lightbox || lightboxSetting?.allowEditing === true; const lightboxChecked = !!lightbox?.enabled || !lightbox && !!lightboxSetting?.enabled; - const lightboxToggleDisabled = linkDestination !== 'none'; - const dimensionsControl = (0,external_wp_element_namespaceObject.createElement)(DimensionsTool, { + const dimensionsControl = (0,external_React_namespaceObject.createElement)(DimensionsTool, { value: { width, height, @@ -24200,6 +26067,7 @@ function image_Image({ }); const resetAll = () => { setAttributes({ + alt: undefined, width: undefined, height: undefined, scale: undefined, @@ -24207,28 +26075,59 @@ function image_Image({ lightbox: undefined }); }; - const sizeControls = (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanel, { + const sizeControls = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanel, { label: (0,external_wp_i18n_namespaceObject.__)('Settings'), - resetAll: resetAll + resetAll: resetAll, + dropdownMenuProps: TOOLSPANEL_DROPDOWNMENU_PROPS }, isResizable && dimensionsControl)); - const controls = (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + const { + lockUrlControls = false, + lockHrefControls = false, + lockAltControls = false, + lockAltControlsMessage, + lockTitleControls = false, + lockTitleControlsMessage, + lockCaption = false + } = (0,external_wp_data_namespaceObject.useSelect)(select => { + if (!isSingleSelected) { + return {}; + } + const { + getBlockBindingsSource + } = unlock(select(external_wp_blocks_namespaceObject.store)); + const { + getBlockParentsByBlockName + } = unlock(select(external_wp_blockEditor_namespaceObject.store)); + const { + url: urlBinding, + alt: altBinding, + title: titleBinding + } = metadata?.bindings || {}; + const hasParentPattern = getBlockParentsByBlockName(clientId, 'core/block').length > 0; + const urlBindingSource = getBlockBindingsSource(urlBinding?.source); + const altBindingSource = getBlockBindingsSource(altBinding?.source); + const titleBindingSource = getBlockBindingsSource(titleBinding?.source); + return { + lockUrlControls: !!urlBinding && (!urlBindingSource || urlBindingSource?.lockAttributesEditing), + lockHrefControls: + // Disable editing the link of the URL if the image is inside a pattern instance. + // This is a temporary solution until we support overriding the link on the frontend. + hasParentPattern, + lockCaption: + // Disable editing the caption if the image is inside a pattern instance. + // This is a temporary solution until we support overriding the caption on the frontend. + hasParentPattern, + lockAltControls: !!altBinding && (!altBindingSource || altBindingSource?.lockAttributesEditing), + lockAltControlsMessage: altBindingSource?.label ? (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: Label of the bindings source. */ + (0,external_wp_i18n_namespaceObject.__)('Connected to %s'), altBindingSource.label) : (0,external_wp_i18n_namespaceObject.__)('Connected to dynamic data'), + lockTitleControls: !!titleBinding && (!titleBindingSource || titleBindingSource?.lockAttributesEditing), + lockTitleControlsMessage: titleBindingSource?.label ? (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: Label of the bindings source. */ + (0,external_wp_i18n_namespaceObject.__)('Connected to %s'), titleBindingSource.label) : (0,external_wp_i18n_namespaceObject.__)('Connected to dynamic data') + }; + }, [clientId, isSingleSelected, metadata?.bindings]); + const controls = (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, hasNonContentControls && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockAlignmentControl, { - value: align, - onChange: updateAlignment - }), hasNonContentControls && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { - onClick: () => { - setShowCaption(!showCaption); - if (showCaption && caption) { - setAttributes({ - caption: undefined - }); - } - }, - icon: library_caption, - isPressed: showCaption, - label: showCaption ? (0,external_wp_i18n_namespaceObject.__)('Remove caption') : (0,external_wp_i18n_namespaceObject.__)('Add caption') - }), !multiImageSelection && !isEditingImage && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalImageURLInputUI, { + }, isSingleSelected && !isEditingImage && !lockHrefControls && !lockUrlControls && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalImageURLInputUI, { url: href || '', onChangeUrl: onSetHref, linkDestination: linkDestination, @@ -24236,18 +26135,21 @@ function image_Image({ mediaLink: image && image.link, linkTarget: linkTarget, linkClass: linkClass, - rel: rel - }), allowCrop && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + rel: rel, + showLightboxSetting: showLightboxSetting, + lightboxEnabled: lightboxChecked, + onSetLightbox: onSetLightbox + }), allowCrop && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { onClick: () => setIsEditingImage(true), icon: library_crop, label: (0,external_wp_i18n_namespaceObject.__)('Crop') - }), !multiImageSelection && canInsertCover && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + }), isSingleSelected && canInsertCover && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { icon: overlay_text, label: (0,external_wp_i18n_namespaceObject.__)('Add text over image'), onClick: switchToCover - })), !multiImageSelection && !isEditingImage && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + })), isSingleSelected && !isEditingImage && !lockUrlControls && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, { mediaId: id, mediaURL: url, allowedTypes: constants_ALLOWED_MEDIA_TYPES, @@ -24255,61 +26157,107 @@ function image_Image({ onSelect: onSelectImage, onSelectURL: onSelectURL, onError: onUploadError - })), !multiImageSelection && externalBlob && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + })), isSingleSelected && externalBlob && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { onClick: uploadExternal, icon: library_upload, - label: (0,external_wp_i18n_namespaceObject.__)('Upload external image') - }))), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanel, { + label: (0,external_wp_i18n_namespaceObject.__)('Upload to Media Library') + }))), isContentOnlyMode && + // Add some extra controls for content attributes when content only mode is active. + // With content only mode active, the inspector is hidden, so users need another way + // to edit these attributes. + (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + group: "other" + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Dropdown, { + popoverProps: { + position: 'bottom right' + }, + renderToggle: ({ + isOpen, + onToggle + }) => (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + onClick: onToggle, + "aria-haspopup": "true", + "aria-expanded": isOpen, + onKeyDown: event => { + if (!isOpen && event.keyCode === external_wp_keycodes_namespaceObject.DOWN) { + event.preventDefault(); + onToggle(); + } + } + }, (0,external_wp_i18n_namespaceObject._x)('Alt', 'Alternative text for an image. Block toolbar label, a low character count is preferred.')), + renderContent: () => (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextareaControl, { + className: "wp-block-image__toolbar_content_textarea", + label: (0,external_wp_i18n_namespaceObject.__)('Alternative text'), + value: alt || '', + onChange: updateAlt, + disabled: lockAltControls, + help: lockAltControls ? (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, lockAltControlsMessage) : (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, { + href: "https://www.w3.org/WAI/tutorials/images/decision-tree" + }, (0,external_wp_i18n_namespaceObject.__)('Describe the purpose of the image.')), (0,external_React_namespaceObject.createElement)("br", null), (0,external_wp_i18n_namespaceObject.__)('Leave empty if decorative.')), + __nextHasNoMarginBottom: true + }) + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Dropdown, { + popoverProps: { + position: 'bottom right' + }, + renderToggle: ({ + isOpen, + onToggle + }) => (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + onClick: onToggle, + "aria-haspopup": "true", + "aria-expanded": isOpen, + onKeyDown: event => { + if (!isOpen && event.keyCode === external_wp_keycodes_namespaceObject.DOWN) { + event.preventDefault(); + onToggle(); + } + } + }, (0,external_wp_i18n_namespaceObject.__)('Title')), + renderContent: () => (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + className: "wp-block-image__toolbar_content_textarea", + __nextHasNoMarginBottom: true, + label: (0,external_wp_i18n_namespaceObject.__)('Title attribute'), + value: title || '', + onChange: onSetTitle, + disabled: lockTitleControls, + help: lockTitleControls ? (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, lockTitleControlsMessage) : (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_wp_i18n_namespaceObject.__)('Describe the role of this image on the page.'), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, { + href: "https://www.w3.org/TR/html52/dom.html#the-title-attribute" + }, (0,external_wp_i18n_namespaceObject.__)('(Note: many devices and browsers do not display this text.)'))) + }) + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanel, { label: (0,external_wp_i18n_namespaceObject.__)('Settings'), - resetAll: resetAll - }, !multiImageSelection && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { + resetAll: resetAll, + dropdownMenuProps: TOOLSPANEL_DROPDOWNMENU_PROPS + }, isSingleSelected && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)('Alternative text'), isShownByDefault: true, - hasValue: () => alt !== '', + hasValue: () => !!alt, onDeselect: () => setAttributes({ alt: undefined }) - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextareaControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextareaControl, { label: (0,external_wp_i18n_namespaceObject.__)('Alternative text'), - value: alt, + value: alt || '', onChange: updateAlt, - help: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, { + readOnly: lockAltControls, + help: lockAltControls ? (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, lockAltControlsMessage) : (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, { href: "https://www.w3.org/WAI/tutorials/images/decision-tree" - }, (0,external_wp_i18n_namespaceObject.__)('Describe the purpose of the image.')), (0,external_wp_element_namespaceObject.createElement)("br", null), (0,external_wp_i18n_namespaceObject.__)('Leave empty if decorative.')), + }, (0,external_wp_i18n_namespaceObject.__)('Describe the purpose of the image.')), (0,external_React_namespaceObject.createElement)("br", null), (0,external_wp_i18n_namespaceObject.__)('Leave empty if decorative.')), __nextHasNoMarginBottom: true - })), isResizable && dimensionsControl, (0,external_wp_element_namespaceObject.createElement)(ResolutionTool, { + })), isResizable && dimensionsControl, !!imageSizeOptions.length && (0,external_React_namespaceObject.createElement)(ResolutionTool, { value: sizeSlug, onChange: updateImage, options: imageSizeOptions - }), showLightboxToggle && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { - hasValue: () => !!lightbox, - label: (0,external_wp_i18n_namespaceObject.__)('Expand on click'), - onDeselect: () => { - setAttributes({ - lightbox: undefined - }); - }, - isShownByDefault: true - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { - label: (0,external_wp_i18n_namespaceObject.__)('Expand on click'), - checked: lightboxChecked, - onChange: newValue => { - setAttributes({ - lightbox: { - enabled: newValue - } - }); - }, - disabled: lightboxToggleDisabled, - help: lightboxToggleDisabled ? (0,external_wp_i18n_namespaceObject.__)('“Expand on click” scales the image up, and can’t be combined with a link.') : '' - })))), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { + }))), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Title attribute'), value: title || '', onChange: onSetTitle, - help: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_i18n_namespaceObject.__)('Describe the role of this image on the page.'), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, { + readOnly: lockTitleControls, + help: lockTitleControls ? (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, lockTitleControlsMessage) : (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_wp_i18n_namespaceObject.__)('Describe the role of this image on the page.'), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, { href: "https://www.w3.org/TR/html52/dom.html#the-title-attribute" }, (0,external_wp_i18n_namespaceObject.__)('(Note: many devices and browsers do not display this text.)'))) }))); @@ -24324,12 +26272,13 @@ function image_Image({ defaultedAlt = (0,external_wp_i18n_namespaceObject.__)('This image has an empty alt attribute'); } const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes); + const shadowProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetShadowClassesAndStyles)(attributes); const isRounded = attributes.className?.includes('is-style-rounded'); let img = // Disable reason: Image itself is not meant to be interactive, but // should direct focus to block. /* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */ - (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("img", { + (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("img", { src: temporaryURL || url, alt: defaultedAlt, onError: () => onImageError(), @@ -24345,18 +26294,19 @@ function image_Image({ width: width && height || aspectRatio ? '100%' : undefined, height: width && height || aspectRatio ? '100%' : undefined, objectFit: scale, - ...borderProps.style + ...borderProps.style, + ...shadowProps.style } - }), temporaryURL && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null)) + }), temporaryURL && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null)) /* eslint-enable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */; // clientWidth needs to be a number for the image Cropper to work, but sometimes it's 0 // So we try using the imageRef width first and fallback to clientWidth. const fallbackClientWidth = imageRef.current?.width || clientWidth; if (canEditImage && isEditingImage) { - img = (0,external_wp_element_namespaceObject.createElement)(ImageWrapper, { + img = (0,external_React_namespaceObject.createElement)(ImageWrapper, { href: href - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalImageEditor, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalImageEditor, { id: id, url: url, width: numericWidth, @@ -24371,13 +26321,13 @@ function image_Image({ borderProps: isRounded ? undefined : borderProps })); } else if (!isResizable) { - img = (0,external_wp_element_namespaceObject.createElement)("div", { + img = (0,external_React_namespaceObject.createElement)("div", { style: { width, height, aspectRatio } - }, (0,external_wp_element_namespaceObject.createElement)(ImageWrapper, { + }, (0,external_React_namespaceObject.createElement)(ImageWrapper, { href: href }, img)); } else { @@ -24428,7 +26378,7 @@ function image_Image({ } } /* eslint-enable no-lonely-if */ - img = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ResizableBox, { + img = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ResizableBox, { style: { display: 'block', objectFit: scale, @@ -24438,7 +26388,7 @@ function image_Image({ width: currentWidth !== null && currentWidth !== void 0 ? currentWidth : 'auto', height: currentHeight !== null && currentHeight !== void 0 ? currentHeight : 'auto' }, - showHandle: isSelected, + showHandle: isSingleSelected, minWidth: minWidth, maxWidth: maxWidthBuffer, minHeight: minHeight, @@ -24464,26 +26414,22 @@ function image_Image({ }); }, resizeRatio: align === 'center' ? 2 : 1 - }, (0,external_wp_element_namespaceObject.createElement)(ImageWrapper, { + }, (0,external_React_namespaceObject.createElement)(ImageWrapper, { href: href }, img)); } if (!url && !temporaryURL) { - return sizeControls; + // Add all controls if the image attributes are connected. + return metadata?.bindings ? controls : sizeControls; } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, !temporaryURL && controls, img, showCaption && (!external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) || isSelected) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { - identifier: "caption", - className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'), - ref: captionRef, - tagName: "figcaption", - "aria-label": (0,external_wp_i18n_namespaceObject.__)('Image caption text'), - placeholder: (0,external_wp_i18n_namespaceObject.__)('Add caption'), - value: caption, - onChange: value => setAttributes({ - caption: value - }), - inlineToolbar: true, - __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())) + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, !temporaryURL && controls, img, (0,external_React_namespaceObject.createElement)(Caption, { + attributes: attributes, + setAttributes: setAttributes, + isSelected: isSingleSelected, + insertBlocksAfter: insertBlocksAfter, + label: (0,external_wp_i18n_namespaceObject.__)('Image caption text'), + showToolbarButton: isSingleSelected && hasNonContentControls, + disableEditing: lockCaption })); } @@ -24506,11 +26452,13 @@ function image_Image({ + /** * Internal dependencies */ + /** * Module constants */ @@ -24559,7 +26507,7 @@ function hasSize(image, size) { function ImageEdit({ attributes, setAttributes, - isSelected, + isSelected: isSingleSelected, className, insertBlocksAfter, onReplace, @@ -24570,13 +26518,14 @@ function ImageEdit({ url = '', alt, caption, - align, id, width, height, sizeSlug, aspectRatio, - scale + scale, + align, + metadata } = attributes; const [temporaryURL, setTemporaryURL] = (0,external_wp_element_namespaceObject.useState)(); const altRef = (0,external_wp_element_namespaceObject.useRef)(); @@ -24587,20 +26536,24 @@ function ImageEdit({ (0,external_wp_element_namespaceObject.useEffect)(() => { captionRef.current = caption; }, [caption]); + const { + __unstableMarkNextChangeAsNotPersistent + } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); + (0,external_wp_element_namespaceObject.useEffect)(() => { + if (['wide', 'full'].includes(align)) { + __unstableMarkNextChangeAsNotPersistent(); + setAttributes({ + width: undefined, + height: undefined, + aspectRatio: undefined, + scale: undefined + }); + } + }, [align]); const ref = (0,external_wp_element_namespaceObject.useRef)(); const { - imageDefaultSize, - mediaUpload - } = (0,external_wp_data_namespaceObject.useSelect)(select => { - const { - getSettings - } = select(external_wp_blockEditor_namespaceObject.store); - const settings = getSettings(); - return { - imageDefaultSize: settings.imageDefaultSize, - mediaUpload: settings.mediaUpload - }; - }, []); + getSettings + } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store); const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)(); const { createErrorNotice @@ -24632,6 +26585,9 @@ function ImageEdit({ return; } setTemporaryURL(); + const { + imageDefaultSize + } = getSettings(); // Try to use the previous selected image size if its available // otherwise try the default image size or fallback to "full" @@ -24712,20 +26668,10 @@ function ImageEdit({ setAttributes({ url: newURL, id: undefined, - sizeSlug: imageDefaultSize + sizeSlug: getSettings().imageDefaultSize }); } } - function updateAlignment(nextAlign) { - const extraUpdatedAttributes = ['wide', 'full'].includes(nextAlign) ? { - width: undefined, - height: undefined - } : {}; - setAttributes({ - ...extraUpdatedAttributes, - align: nextAlign - }); - } let isTemp = edit_isTemporaryImage(id, url); // Upload a temporary image on mount. @@ -24735,6 +26681,12 @@ function ImageEdit({ } const file = (0,external_wp_blob_namespaceObject.getBlobByURL)(url); if (file) { + const { + mediaUpload + } = getSettings(); + if (!mediaUpload) { + return; + } mediaUpload({ filesList: [file], onFileChange: ([img]) => { @@ -24760,13 +26712,14 @@ function ImageEdit({ }, [isTemp, url]); const isExternal = isExternalImage(id, url); const src = isExternal ? url : undefined; - const mediaPreview = !!url && (0,external_wp_element_namespaceObject.createElement)("img", { + const mediaPreview = !!url && (0,external_React_namespaceObject.createElement)("img", { alt: (0,external_wp_i18n_namespaceObject.__)('Edit image'), title: (0,external_wp_i18n_namespaceObject.__)('Edit image'), className: 'edit-image-preview', src: url }); const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes); + const shadowProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetShadowClassesAndStyles)(attributes); const classes = classnames_default()(className, { 'is-transient': temporaryURL, 'is-resized': !!width || !!height, @@ -24779,31 +26732,48 @@ function ImageEdit({ }); // Much of this description is duplicated from MediaPlaceholder. + const { + lockUrlControls = false, + lockUrlControlsMessage + } = (0,external_wp_data_namespaceObject.useSelect)(select => { + if (!isSingleSelected) { + return {}; + } + const blockBindingsSource = unlock(select(external_wp_blocks_namespaceObject.store)).getBlockBindingsSource(metadata?.bindings?.url?.source); + return { + lockUrlControls: !!metadata?.bindings?.url && (!blockBindingsSource || blockBindingsSource?.lockAttributesEditing), + lockUrlControlsMessage: blockBindingsSource?.label ? (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: Label of the bindings source. */ + (0,external_wp_i18n_namespaceObject.__)('Connected to %s'), blockBindingsSource.label) : (0,external_wp_i18n_namespaceObject.__)('Connected to dynamic data') + }; + }, [isSingleSelected]); const placeholder = content => { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { className: classnames_default()('block-editor-media-placeholder', { - [borderProps.className]: !!borderProps.className && !isSelected + [borderProps.className]: !!borderProps.className && !isSingleSelected }), withIllustration: true, - icon: library_image, + icon: lockUrlControls ? library_plugins : library_image, label: (0,external_wp_i18n_namespaceObject.__)('Image'), - instructions: (0,external_wp_i18n_namespaceObject.__)('Upload an image file, pick one from your media library, or add one with a URL.'), + instructions: !lockUrlControls && (0,external_wp_i18n_namespaceObject.__)('Upload an image file, pick one from your media library, or add one with a URL.'), style: { aspectRatio: !(width && height) && aspectRatio ? aspectRatio : undefined, width: height && aspectRatio ? '100%' : width, height: width && aspectRatio ? '100%' : height, objectFit: scale, - ...borderProps.style + ...borderProps.style, + ...shadowProps.style } - }, content); + }, lockUrlControls ? (0,external_React_namespaceObject.createElement)("span", { + className: 'block-bindings-media-placeholder-message' + }, lockUrlControlsMessage) : content); }; - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(image_Image, { + }, (0,external_React_namespaceObject.createElement)(image_Image, { temporaryURL: temporaryURL, attributes: attributes, setAttributes: setAttributes, - isSelected: isSelected, + isSingleSelected: isSingleSelected, insertBlocksAfter: insertBlocksAfter, onReplace: onReplace, onSelectImage: onSelectImage, @@ -24813,13 +26783,8 @@ function ImageEdit({ context: context, clientId: clientId, blockEditingMode: blockEditingMode - }), !url && blockEditingMode === 'default' && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { - group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockAlignmentControl, { - value: align, - onChange: updateAlignment - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, { - icon: (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { + }), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, { + icon: (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: library_image }), onSelect: onSelectImage, @@ -24836,7 +26801,7 @@ function ImageEdit({ disableMediaButtons: temporaryURL || url })); } -/* harmony default export */ var image_edit = (ImageEdit); +/* harmony default export */ const image_edit = (ImageEdit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/save.js @@ -24871,8 +26836,11 @@ function image_save_save({ } = attributes; const newRel = !rel ? undefined : rel; const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes); + const shadowProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetShadowClassesAndStyles)(attributes); const classes = classnames_default()({ - [`align${align}`]: align, + // All other align classes are handled by block supports. + // `{ align: 'none' }` is unique to transforms for the image block. + alignnone: 'none' === align, [`size-${sizeSlug}`]: sizeSlug, 'is-resized': width || height, 'has-custom-border': !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0 @@ -24880,12 +26848,13 @@ function image_save_save({ const imageClasses = classnames_default()(borderProps.className, { [`wp-image-${id}`]: !!id }); - const image = (0,external_wp_element_namespaceObject.createElement)("img", { + const image = (0,external_React_namespaceObject.createElement)("img", { src: url, alt: alt, className: imageClasses || undefined, style: { ...borderProps.style, + ...shadowProps.style, aspectRatio, objectFit: scale, width, @@ -24893,17 +26862,17 @@ function image_save_save({ }, title: title }); - const figure = (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, href ? (0,external_wp_element_namespaceObject.createElement)("a", { + const figure = (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, href ? (0,external_React_namespaceObject.createElement)("a", { className: linkClass, href: href, target: linkTarget, rel: newRel - }, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'), tagName: "figcaption", value: caption })); - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes }) @@ -25094,7 +27063,7 @@ const image_transforms_transforms = { } }] }; -/* harmony default export */ var image_transforms = (image_transforms_transforms); +/* harmony default export */ const image_transforms = (image_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/index.js /** @@ -25120,9 +27089,6 @@ const image_metadata = { keywords: ["img", "photo", "picture"], textdomain: "default", attributes: { - align: { - type: "string" - }, url: { type: "string", source: "attribute", @@ -25139,8 +27105,8 @@ const image_metadata = { __experimentalRole: "content" }, caption: { - type: "string", - source: "html", + type: "rich-text", + source: "rich-text", selector: "figcaption", __experimentalRole: "content" }, @@ -25206,6 +27172,8 @@ const image_metadata = { } }, supports: { + interactivity: true, + align: ["left", "center", "right", "wide", "full"], anchor: true, color: { text: false, @@ -25224,10 +27192,14 @@ const image_metadata = { radius: true, width: true } + }, + shadow: { + __experimentalSkipSerialization: true } }, selectors: { border: ".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder", + shadow: ".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder", filter: { duotone: ".wp-block-image img, .wp-block-image .components-placeholder" } @@ -25241,8 +27213,7 @@ const image_metadata = { label: "Rounded" }], editorStyle: "wp-block-image-editor", - style: "wp-block-image", - viewScript: "file:./view.min.js" + style: "wp-block-image" }; @@ -25263,6 +27234,10 @@ const image_settings = { __experimentalLabel(attributes, { context }) { + const customName = attributes?.metadata?.name; + if (context === 'list-view' && customName) { + return customName; + } if (context === 'accessibility') { const { caption, @@ -25303,13 +27278,13 @@ const image_init = () => initBlock({ * WordPress dependencies */ -const comment = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const comment = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z" })); -/* harmony default export */ var library_comment = (comment); +/* harmony default export */ const library_comment = (comment); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/latest-comments/edit.js @@ -25350,32 +27325,32 @@ function LatestComments({ spacing: undefined } }; - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)() - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Display avatar'), checked: displayAvatar, onChange: () => setAttributes({ displayAvatar: !displayAvatar }) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Display date'), checked: displayDate, onChange: () => setAttributes({ displayDate: !displayDate }) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Display excerpt'), checked: displayExcerpt, onChange: () => setAttributes({ displayExcerpt: !displayExcerpt }) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)('Number of comments'), @@ -25386,7 +27361,7 @@ function LatestComments({ min: MIN_COMMENTS, max: MAX_COMMENTS, required: true - }))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Disabled, null, (0,external_wp_element_namespaceObject.createElement)((external_wp_serverSideRender_default()), { + }))), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Disabled, null, (0,external_React_namespaceObject.createElement)((external_wp_serverSideRender_default()), { block: "core/latest-comments", attributes: serverSideAttributes // The preview uses the site's locale to make it more true to how @@ -25457,6 +27432,9 @@ const latest_comments_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-latest-comments-editor", @@ -25484,13 +27462,13 @@ const latest_comments_init = () => initBlock({ * WordPress dependencies */ -const postList = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const postList = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { - d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 11h2V9H7v2zm0 4h2v-2H7v2zm3-4h7V9h-7v2zm0 4h7v-2h-7v2z" +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { + d: "M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z" })); -/* harmony default export */ var post_list = (postList); +/* harmony default export */ const post_list = (postList); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/latest-posts/deprecated.js /** @@ -25608,6 +27586,9 @@ const latest_posts_deprecated_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-latest-posts-editor", @@ -25616,7 +27597,7 @@ const latest_posts_deprecated_metadata = { const { attributes: deprecated_attributes } = latest_posts_deprecated_metadata; -/* harmony default export */ var latest_posts_deprecated = ([{ +/* harmony default export */ const latest_posts_deprecated = ([{ attributes: { ...deprecated_attributes, categories: { @@ -25648,13 +27629,13 @@ const { * WordPress dependencies */ -const list = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const list = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z" })); -/* harmony default export */ var library_list = (list); +/* harmony default export */ const library_list = (list); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/latest-posts/constants.js const MIN_EXCERPT_LENGTH = 10; @@ -25815,15 +27796,15 @@ function LatestPostsEdit({ }); }; const hasPosts = !!latestPosts?.length; - const inspectorControls = (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + const inspectorControls = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Post content') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { label: (0,external_wp_i18n_namespaceObject.__)('Post content'), checked: displayPostContent, onChange: value => setAttributes({ displayPostContent: value }) - }), displayPostContent && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.RadioControl, { + }), displayPostContent && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RadioControl, { label: (0,external_wp_i18n_namespaceObject.__)('Show:'), selected: displayPostContentRadio, options: [{ @@ -25836,7 +27817,7 @@ function LatestPostsEdit({ onChange: value => setAttributes({ displayPostContentRadio: value }) - }), displayPostContent && displayPostContentRadio === 'excerpt' && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { + }), displayPostContent && displayPostContentRadio === 'excerpt' && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)('Max number of words'), @@ -25846,32 +27827,32 @@ function LatestPostsEdit({ }), min: MIN_EXCERPT_LENGTH, max: MAX_EXCERPT_LENGTH - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + })), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Post meta') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Display author name'), checked: displayAuthor, onChange: value => setAttributes({ displayAuthor: value }) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Display post date'), checked: displayPostDate, onChange: value => setAttributes({ displayPostDate: value }) - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + })), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Featured image') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Display featured image'), checked: displayFeaturedImage, onChange: value => setAttributes({ displayFeaturedImage: value }) - }), displayFeaturedImage && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalImageSizeControl, { + }), displayFeaturedImage && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalImageSizeControl, { onChange: value => { const newAttrs = {}; if (value.hasOwnProperty('width')) { @@ -25894,25 +27875,25 @@ function LatestPostsEdit({ featuredImageSizeWidth: undefined, featuredImageSizeHeight: undefined }) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl, { className: "editor-latest-posts-image-alignment-control" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl.VisualLabel, null, (0,external_wp_i18n_namespaceObject.__)('Image alignment')), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockAlignmentToolbar, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl.VisualLabel, null, (0,external_wp_i18n_namespaceObject.__)('Image alignment')), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockAlignmentToolbar, { value: featuredImageAlign, onChange: value => setAttributes({ featuredImageAlign: value }), controls: ['left', 'center', 'right'], isCollapsed: false - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + })), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Add link to featured image'), checked: addLinkToFeaturedImage, onChange: value => setAttributes({ addLinkToFeaturedImage: value }) - }))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + }))), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Sorting and filtering') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.QueryControls, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.QueryControls, { order, orderBy, numberOfItems: postsToShow, @@ -25933,7 +27914,7 @@ function LatestPostsEdit({ }), authorList: authorList !== null && authorList !== void 0 ? authorList : [], selectedAuthorId: selectedAuthor - }), postLayout === 'grid' && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { + }), postLayout === 'grid' && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)('Columns'), @@ -25955,12 +27936,12 @@ function LatestPostsEdit({ }) }); if (!hasPosts) { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, inspectorControls, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { + }, inspectorControls, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { icon: library_pin, label: (0,external_wp_i18n_namespaceObject.__)('Latest Posts') - }, !Array.isArray(latestPosts) ? (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null) : (0,external_wp_i18n_namespaceObject.__)('No posts found.'))); + }, !Array.isArray(latestPosts) ? (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null) : (0,external_wp_i18n_namespaceObject.__)('No posts found.'))); } // Removing posts from display should be instant. @@ -25981,9 +27962,9 @@ function LatestPostsEdit({ isActive: postLayout === 'grid' }]; const dateFormat = (0,external_wp_date_namespaceObject.getSettings)().formats.date; - return (0,external_wp_element_namespaceObject.createElement)("div", null, inspectorControls, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, { + return (0,external_React_namespaceObject.createElement)("div", null, inspectorControls, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, { controls: layoutControls - })), (0,external_wp_element_namespaceObject.createElement)("ul", { + })), (0,external_React_namespaceObject.createElement)("ul", { ...blockProps }, displayPosts.map(post => { const titleTrimmed = post.title.rendered.trim(); @@ -26001,7 +27982,7 @@ function LatestPostsEdit({ [`align${featuredImageAlign}`]: !!featuredImageAlign }); const renderFeaturedImage = displayFeaturedImage && imageSourceUrl; - const featuredImage = renderFeaturedImage && (0,external_wp_element_namespaceObject.createElement)("img", { + const featuredImage = renderFeaturedImage && (0,external_React_namespaceObject.createElement)("img", { src: imageSourceUrl, alt: featuredImageAlt, style: { @@ -26010,45 +27991,45 @@ function LatestPostsEdit({ } }); const needsReadMore = excerptLength < excerpt.trim().split(' ').length && post.excerpt.raw === ''; - const postExcerpt = needsReadMore ? (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, excerpt.trim().split(' ', excerptLength).join(' '), (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: 1: Hidden accessibility text: Post title */ + const postExcerpt = needsReadMore ? (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, excerpt.trim().split(' ', excerptLength).join(' '), (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: 1: Hidden accessibility text: Post title */ (0,external_wp_i18n_namespaceObject.__)('… <a>Read more<span>: %1$s</span></a>'), titleTrimmed || (0,external_wp_i18n_namespaceObject.__)('(no title)')), { a: // eslint-disable-next-line jsx-a11y/anchor-has-content - (0,external_wp_element_namespaceObject.createElement)("a", { + (0,external_React_namespaceObject.createElement)("a", { className: "wp-block-latest-posts__read-more", href: post.link, rel: "noopener noreferrer", onClick: showRedirectionPreventedNotice }), - span: (0,external_wp_element_namespaceObject.createElement)("span", { + span: (0,external_React_namespaceObject.createElement)("span", { className: "screen-reader-text" }) })) : excerpt; - return (0,external_wp_element_namespaceObject.createElement)("li", { + return (0,external_React_namespaceObject.createElement)("li", { key: post.id - }, renderFeaturedImage && (0,external_wp_element_namespaceObject.createElement)("div", { + }, renderFeaturedImage && (0,external_React_namespaceObject.createElement)("div", { className: imageClasses - }, addLinkToFeaturedImage ? (0,external_wp_element_namespaceObject.createElement)("a", { + }, addLinkToFeaturedImage ? (0,external_React_namespaceObject.createElement)("a", { className: "wp-block-latest-posts__post-title", href: post.link, rel: "noreferrer noopener", onClick: showRedirectionPreventedNotice - }, featuredImage) : featuredImage), (0,external_wp_element_namespaceObject.createElement)("a", { + }, featuredImage) : featuredImage), (0,external_React_namespaceObject.createElement)("a", { href: post.link, rel: "noreferrer noopener", dangerouslySetInnerHTML: !!titleTrimmed ? { __html: titleTrimmed } : undefined, onClick: showRedirectionPreventedNotice - }, !titleTrimmed ? (0,external_wp_i18n_namespaceObject.__)('(no title)') : null), displayAuthor && currentAuthor && (0,external_wp_element_namespaceObject.createElement)("div", { + }, !titleTrimmed ? (0,external_wp_i18n_namespaceObject.__)('(no title)') : null), displayAuthor && currentAuthor && (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-latest-posts__post-author" }, (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: byline. %s: current author. */ - (0,external_wp_i18n_namespaceObject.__)('by %s'), currentAuthor.name)), displayPostDate && post.date_gmt && (0,external_wp_element_namespaceObject.createElement)("time", { + (0,external_wp_i18n_namespaceObject.__)('by %s'), currentAuthor.name)), displayPostDate && post.date_gmt && (0,external_React_namespaceObject.createElement)("time", { dateTime: (0,external_wp_date_namespaceObject.format)('c', post.date_gmt), className: "wp-block-latest-posts__post-date" - }, (0,external_wp_date_namespaceObject.dateI18n)(dateFormat, post.date_gmt)), displayPostContent && displayPostContentRadio === 'excerpt' && (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_wp_date_namespaceObject.dateI18n)(dateFormat, post.date_gmt)), displayPostContent && displayPostContentRadio === 'excerpt' && (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-latest-posts__post-excerpt" - }, postExcerpt), displayPostContent && displayPostContentRadio === 'full_post' && (0,external_wp_element_namespaceObject.createElement)("div", { + }, postExcerpt), displayPostContent && displayPostContentRadio === 'full_post' && (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-latest-posts__post-full-content", dangerouslySetInnerHTML: { __html: post.content.raw.trim() @@ -26181,6 +28162,9 @@ const latest_posts_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-latest-posts-editor", @@ -26355,13 +28339,13 @@ const v0 = { start } = attributes; const TagName = ordered ? 'ol' : 'ul'; - return (0,external_wp_element_namespaceObject.createElement)(TagName, { + return (0,external_React_namespaceObject.createElement)(TagName, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ type, reversed, start }) - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: values, multiline: "li" })); @@ -26440,13 +28424,13 @@ const list_deprecated_v1 = { start } = attributes; const TagName = ordered ? 'ol' : 'ul'; - return (0,external_wp_element_namespaceObject.createElement)(TagName, { + return (0,external_React_namespaceObject.createElement)(TagName, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ type, reversed, start }) - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: values, multiline: "li" })); @@ -26535,13 +28519,13 @@ const list_deprecated_v2 = { start } = attributes; const TagName = ordered ? 'ol' : 'ul'; - return (0,external_wp_element_namespaceObject.createElement)(TagName, { + return (0,external_React_namespaceObject.createElement)(TagName, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ type, reversed, start }) - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); }, migrate: migrateTypeToInlineStyle }; @@ -26554,7 +28538,7 @@ const list_deprecated_v2 = { * * See block-deprecation.md */ -/* harmony default export */ var list_deprecated = ([list_deprecated_v2, list_deprecated_v1, v0]); +/* harmony default export */ const list_deprecated = ([list_deprecated_v2, list_deprecated_v1, v0]); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-outdent-rtl.js @@ -26562,13 +28546,13 @@ const list_deprecated_v2 = { * WordPress dependencies */ -const formatOutdentRTL = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const formatOutdentRTL = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM15.4697 14.9697L18.4393 12L15.4697 9.03033L16.5303 7.96967L20.0303 11.4697L20.5607 12L20.0303 12.5303L16.5303 16.0303L15.4697 14.9697Z" })); -/* harmony default export */ var format_outdent_rtl = (formatOutdentRTL); +/* harmony default export */ const format_outdent_rtl = (formatOutdentRTL); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-outdent.js @@ -26576,13 +28560,13 @@ const formatOutdentRTL = (0,external_wp_element_namespaceObject.createElement)(e * WordPress dependencies */ -const formatOutdent = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const formatOutdent = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-4-4.6l-4 4 4 4 1-1-3-3 3-3-1-1z" })); -/* harmony default export */ var format_outdent = (formatOutdent); +/* harmony default export */ const format_outdent = (formatOutdent); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-list-bullets-rtl.js @@ -26590,13 +28574,13 @@ const formatOutdent = (0,external_wp_element_namespaceObject.createElement)(exte * WordPress dependencies */ -const formatListBulletsRTL = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const formatListBulletsRTL = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z" })); -/* harmony default export */ var format_list_bullets_rtl = (formatListBulletsRTL); +/* harmony default export */ const format_list_bullets_rtl = (formatListBulletsRTL); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-list-bullets.js @@ -26604,13 +28588,13 @@ const formatListBulletsRTL = (0,external_wp_element_namespaceObject.createElemen * WordPress dependencies */ -const formatListBullets = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const formatListBullets = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" })); -/* harmony default export */ var format_list_bullets = (formatListBullets); +/* harmony default export */ const format_list_bullets = (formatListBullets); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-list-numbered-rtl.js @@ -26618,13 +28602,13 @@ const formatListBullets = (0,external_wp_element_namespaceObject.createElement)( * WordPress dependencies */ -const formatListNumberedRTL = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const formatListNumberedRTL = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M3.8 15.8h8.9v-1.5H3.8v1.5zm0-7h8.9V7.2H3.8v1.6zm14.7-2.1V10h1V5.3l-2.2.7.3 1 .9-.3zm1.2 6.1c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5H20v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3 0-.8-.3-1.1z" })); -/* harmony default export */ var format_list_numbered_rtl = (formatListNumberedRTL); +/* harmony default export */ const format_list_numbered_rtl = (formatListNumberedRTL); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-list-numbered.js @@ -26632,16 +28616,16 @@ const formatListNumberedRTL = (0,external_wp_element_namespaceObject.createEleme * WordPress dependencies */ -const formatListNumbered = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const formatListNumbered = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM5 6.7V10h1V5.3L3.8 6l.4 1 .8-.3zm-.4 5.7c-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-1c.3-.6.8-1.4.9-2.1.1-.3 0-.8-.2-1.1-.5-.6-1.3-.5-1.7-.4z" })); -/* harmony default export */ var format_list_numbered = (formatListNumbered); +/* harmony default export */ const format_list_numbered = (formatListNumbered); ;// CONCATENATED MODULE: external ["wp","deprecated"] -var external_wp_deprecated_namespaceObject = window["wp"]["deprecated"]; +const external_wp_deprecated_namespaceObject = window["wp"]["deprecated"]; var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list/ordered-list-settings.js @@ -26656,9 +28640,9 @@ const OrderedListSettings = ({ reversed, start, type -}) => (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { +}) => (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Ordered list settings') -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Start value'), type: "number", @@ -26672,7 +28656,7 @@ const OrderedListSettings = ({ }, value: Number.isInteger(start) ? start.toString(10) : '', step: "1" -}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { +}), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Numbering style'), options: [{ @@ -26695,7 +28679,7 @@ const OrderedListSettings = ({ onChange: newValue => setAttributes({ type: newValue }) -}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { +}), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Reverse list numbering'), checked: reversed || false, @@ -26706,7 +28690,7 @@ const OrderedListSettings = ({ }); } }))); -/* harmony default export */ var ordered_list_settings = (OrderedListSettings); +/* harmony default export */ const ordered_list_settings = (OrderedListSettings); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list/tag-name.js @@ -26720,12 +28704,12 @@ function TagName(props, ref) { ...extraProps } = props; const Tag = ordered ? 'ol' : 'ul'; - return (0,external_wp_element_namespaceObject.createElement)(Tag, { + return (0,external_React_namespaceObject.createElement)(Tag, { ref: ref, ...extraProps }); } -/* harmony default export */ var tag_name = ((0,external_wp_element_namespaceObject.forwardRef)(TagName)); +/* harmony default export */ const tag_name = ((0,external_wp_element_namespaceObject.forwardRef)(TagName)); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list/edit.js @@ -26784,18 +28768,6 @@ function useMigrateOnLoad(attributes, clientId) { } function useOutdentList(clientId) { const { - canOutdent - } = (0,external_wp_data_namespaceObject.useSelect)(innerSelect => { - const { - getBlockRootClientId, - getBlock - } = innerSelect(external_wp_blockEditor_namespaceObject.store); - const parentId = getBlockRootClientId(clientId); - return { - canOutdent: !!parentId && getBlock(parentId).name === 'core/list-item' - }; - }, [clientId]); - const { replaceBlocks, selectionChange } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); @@ -26804,7 +28776,7 @@ function useOutdentList(clientId) { getBlockAttributes, getBlock } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store); - return [canOutdent, (0,external_wp_element_namespaceObject.useCallback)(() => { + return (0,external_wp_element_namespaceObject.useCallback)(() => { const parentBlockId = getBlockRootClientId(clientId); const parentBlockAttributes = getBlockAttributes(parentBlockId); // Create a new parent block without the inner blocks. @@ -26817,13 +28789,20 @@ function useOutdentList(clientId) { replaceBlocks([parentBlockId], [newParentBlock, ...innerBlocks]); // Select the last child of the list being outdent. selectionChange(innerBlocks[innerBlocks.length - 1].clientId); - }, [clientId])]; + }, [clientId]); } function IndentUI({ clientId }) { - const [canOutdent, outdentList] = useOutdentList(clientId); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + const outdentList = useOutdentList(clientId); + const canOutdent = (0,external_wp_data_namespaceObject.useSelect)(select => { + const { + getBlockRootClientId, + getBlockName + } = select(external_wp_blockEditor_namespaceObject.store); + return getBlockName(getBlockRootClientId(clientId)) === 'core/list-item'; + }, [clientId]); + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? format_outdent_rtl : format_outdent, title: (0,external_wp_i18n_namespaceObject.__)('Outdent'), describedBy: (0,external_wp_i18n_namespaceObject.__)('Outdent list item'), @@ -26850,7 +28829,6 @@ function list_edit_Edit({ } }); const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, { - allowedBlocks: ['core/list-item'], template: list_edit_TEMPLATE, templateLock: false, templateInsertUpdatesSelection: true, @@ -26862,9 +28840,9 @@ function list_edit_Edit({ __experimentalCaptureToolbars: true }); useMigrateOnLoad(attributes, clientId); - const controls = (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + const controls = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? format_list_bullets_rtl : format_list_bullets, title: (0,external_wp_i18n_namespaceObject.__)('Unordered'), describedBy: (0,external_wp_i18n_namespaceObject.__)('Convert to unordered list'), @@ -26874,7 +28852,7 @@ function list_edit_Edit({ ordered: false }); } - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? format_list_numbered_rtl : format_list_numbered, title: (0,external_wp_i18n_namespaceObject.__)('Ordered'), describedBy: (0,external_wp_i18n_namespaceObject.__)('Convert to ordered list'), @@ -26884,15 +28862,15 @@ function list_edit_Edit({ ordered: true }); } - }), (0,external_wp_element_namespaceObject.createElement)(IndentUI, { + }), (0,external_React_namespaceObject.createElement)(IndentUI, { clientId: clientId })); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(tag_name, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(tag_name, { ordered: ordered, reversed: reversed, start: start, ...innerBlocksProps - }), controls, ordered && (0,external_wp_element_namespaceObject.createElement)(ordered_list_settings, { + }), controls, ordered && (0,external_React_namespaceObject.createElement)(ordered_list_settings, { setAttributes, reversed, start, @@ -26916,7 +28894,7 @@ function list_save_save({ start } = attributes; const TagName = ordered ? 'ol' : 'ul'; - return (0,external_wp_element_namespaceObject.createElement)(TagName, { + return (0,external_React_namespaceObject.createElement)(TagName, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ reversed, start, @@ -26924,7 +28902,7 @@ function list_save_save({ listStyleType: ordered && type !== 'decimal' ? type : undefined } }) - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list/transforms.js @@ -27041,7 +29019,7 @@ const list_transforms_transforms = { } }))] }; -/* harmony default export */ var list_transforms = (list_transforms_transforms); +/* harmony default export */ const list_transforms = (list_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list/index.js /** @@ -27062,6 +29040,7 @@ const list_metadata = { name: "core/list", title: "List", category: "text", + allowedBlocks: ["core/list-item"], description: "Create a bulleted or numbered list.", keywords: ["bullet list", "ordered list", "numbered list"], textdomain: "default", @@ -27128,7 +29107,10 @@ const list_metadata = { __unstablePasteTextInline: true, __experimentalSelector: "ol,ul", __experimentalOnMerge: true, - __experimentalSlashInserter: true + __experimentalSlashInserter: true, + interactivity: { + clientNavigation: true + } }, editorStyle: "wp-block-list-editor", style: "wp-block-list" @@ -27187,13 +29169,13 @@ const list_init = () => initBlock({ * WordPress dependencies */ -const listItem = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const listItem = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M12 11v1.5h8V11h-8zm-6-1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" })); -/* harmony default export */ var list_item = (listItem); +/* harmony default export */ const list_item = (listItem); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-indent-rtl.js @@ -27201,13 +29183,13 @@ const listItem = (0,external_wp_element_namespaceObject.createElement)(external_ * WordPress dependencies */ -const formatIndentRTL = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const formatIndentRTL = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM20.0303 9.03033L17.0607 12L20.0303 14.9697L18.9697 16.0303L15.4697 12.5303L14.9393 12L15.4697 11.4697L18.9697 7.96967L20.0303 9.03033Z" })); -/* harmony default export */ var format_indent_rtl = (formatIndentRTL); +/* harmony default export */ const format_indent_rtl = (formatIndentRTL); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-indent.js @@ -27215,13 +29197,13 @@ const formatIndentRTL = (0,external_wp_element_namespaceObject.createElement)(ex * WordPress dependencies */ -const formatIndent = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const formatIndent = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-8-3.5l3 3-3 3 1 1 4-4-4-4-1 1z" })); -/* harmony default export */ var format_indent = (formatIndent); +/* harmony default export */ const format_indent = (formatIndent); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list-item/hooks/use-indent-list-item.js /** @@ -27232,7 +29214,6 @@ const formatIndent = (0,external_wp_element_namespaceObject.createElement)(exter function useIndentListItem(clientId) { - const canIndent = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).getBlockIndex(clientId) > 0, [clientId]); const { replaceBlocks, selectionChange, @@ -27246,7 +29227,7 @@ function useIndentListItem(clientId) { hasMultiSelection, getMultiSelectedBlockClientIds } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store); - return [canIndent, (0,external_wp_element_namespaceObject.useCallback)(() => { + return (0,external_wp_element_namespaceObject.useCallback)(() => { const _hasMultiSelection = hasMultiSelection(); const clientIds = _hasMultiSelection ? getMultiSelectedBlockClientIds() : [clientId]; const clonedBlocks = clientIds.map(_clientId => (0,external_wp_blocks_namespaceObject.cloneBlock)(getBlock(_clientId))); @@ -27274,7 +29255,7 @@ function useIndentListItem(clientId) { } else { multiSelect(clonedBlocks[0].clientId, clonedBlocks[clonedBlocks.length - 1].clientId); } - }, [clientId])]; + }, [clientId]); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list-item/hooks/use-outdent-list-item.js @@ -27285,23 +29266,9 @@ function useIndentListItem(clientId) { -function useOutdentListItem(clientId) { +function useOutdentListItem() { const registry = (0,external_wp_data_namespaceObject.useRegistry)(); const { - canOutdent - } = (0,external_wp_data_namespaceObject.useSelect)(innerSelect => { - const { - getBlockRootClientId, - getBlockName - } = innerSelect(external_wp_blockEditor_namespaceObject.store); - const grandParentId = getBlockRootClientId(getBlockRootClientId(clientId)); - const grandParentName = getBlockName(grandParentId); - const isListItem = grandParentName === 'core/list-item'; - return { - canOutdent: isListItem - }; - }, [clientId]); - const { moveBlocksToPosition, removeBlock, insertBlock, @@ -27323,7 +29290,7 @@ function useOutdentListItem(clientId) { if (getBlockName(parentListItemId) !== 'core/list-item') return; return parentListItemId; } - return [canOutdent, (0,external_wp_element_namespaceObject.useCallback)((clientIds = getSelectedBlockClientIds()) => { + return (0,external_wp_element_namespaceObject.useCallback)((clientIds = getSelectedBlockClientIds()) => { if (!Array.isArray(clientIds)) { clientIds = [clientIds]; } @@ -27359,39 +29326,6 @@ function useOutdentListItem(clientId) { removeBlock(parentListId, shouldSelectParent); } }); - }, [])]; -} - -;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list-item/hooks/use-copy.js -/** - * WordPress dependencies - */ - - - -function useCopy(clientId) { - const { - getBlockRootClientId, - getBlockName, - getBlockAttributes - } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store); - return (0,external_wp_compose_namespaceObject.useRefEffect)(node => { - function onCopy(event) { - // The event propagates through all nested lists, so don't override - // when copying nested list items. - if (event.clipboardData.getData('__unstableWrapperBlockName')) { - return; - } - const rootClientId = getBlockRootClientId(clientId); - event.clipboardData.setData('__unstableWrapperBlockName', getBlockName(rootClientId)); - event.clipboardData.setData('__unstableWrapperBlockAttributes', JSON.stringify(getBlockAttributes(rootClientId))); - } - node.addEventListener('copy', onCopy); - node.addEventListener('cut', onCopy); - return () => { - node.removeEventListener('copy', onCopy); - node.removeEventListener('cut', onCopy); - }; }, []); } @@ -27410,7 +29344,7 @@ function useCopy(clientId) { * Internal dependencies */ -function useEnter(props) { +function use_enter_useEnter(props) { const { replaceBlocks, selectionChange @@ -27418,11 +29352,12 @@ function useEnter(props) { const { getBlock, getBlockRootClientId, - getBlockIndex + getBlockIndex, + getBlockName } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store); const propsRef = (0,external_wp_element_namespaceObject.useRef)(props); propsRef.current = props; - const [canOutdent, outdentListItem] = useOutdentListItem(propsRef.current.clientId); + const outdentListItem = useOutdentListItem(); return (0,external_wp_compose_namespaceObject.useRefEffect)(element => { function onKeyDown(event) { if (event.defaultPrevented || event.keyCode !== external_wp_keycodes_namespaceObject.ENTER) { @@ -27436,6 +29371,7 @@ function useEnter(props) { return; } event.preventDefault(); + const canOutdent = getBlockName(getBlockRootClientId(getBlockRootClientId(propsRef.current.clientId))) === 'core/list-item'; if (canOutdent) { outdentListItem(); return; @@ -27464,7 +29400,7 @@ function useEnter(props) { return () => { element.removeEventListener('keydown', onKeyDown); }; - }, [canOutdent]); + }, []); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list-item/hooks/use-space.js @@ -27483,9 +29419,10 @@ function useEnter(props) { function useSpace(clientId) { const { getSelectionStart, - getSelectionEnd + getSelectionEnd, + getBlockIndex } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store); - const [canIndent, indentListItem] = useIndentListItem(clientId); + const indentListItem = useIndentListItem(clientId); return (0,external_wp_compose_namespaceObject.useRefEffect)(element => { function onKeyDown(event) { const { @@ -27495,11 +29432,14 @@ function useSpace(clientId) { metaKey, ctrlKey } = event; - if (event.defaultPrevented || !canIndent || keyCode !== external_wp_keycodes_namespaceObject.SPACE || + if (event.defaultPrevented || keyCode !== external_wp_keycodes_namespaceObject.SPACE || // Only override when no modifiers are pressed. shiftKey || altKey || metaKey || ctrlKey) { return; } + if (getBlockIndex(clientId) === 0) { + return; + } const selectionStart = getSelectionStart(); const selectionEnd = getSelectionEnd(); if (selectionStart.offset === 0 && selectionEnd.offset === 0) { @@ -27511,7 +29451,7 @@ function useSpace(clientId) { return () => { element.removeEventListener('keydown', onKeyDown); }; - }, [canIndent, indentListItem]); + }, [clientId, indentListItem]); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list-item/hooks/use-split.js @@ -27571,7 +29511,7 @@ function useMerge(clientId, onMerge) { mergeBlocks, moveBlocksToPosition } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); - const [, outdentListItem] = useOutdentListItem(clientId); + const outdentListItem = useOutdentListItem(); function getTrailingId(id) { const order = getBlockOrder(id); if (!order.length) { @@ -27707,6 +29647,7 @@ function convertToListItems(blocks) { + /** * Internal dependencies */ @@ -27715,15 +29656,29 @@ function convertToListItems(blocks) { function edit_IndentUI({ clientId }) { - const [canIndent, indentListItem] = useIndentListItem(clientId); - const [canOutdent, outdentListItem] = useOutdentListItem(clientId); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + const indentListItem = useIndentListItem(clientId); + const outdentListItem = useOutdentListItem(); + const { + canIndent, + canOutdent + } = (0,external_wp_data_namespaceObject.useSelect)(select => { + const { + getBlockIndex, + getBlockRootClientId, + getBlockName + } = select(external_wp_blockEditor_namespaceObject.store); + return { + canIndent: getBlockIndex(clientId) > 0, + canOutdent: getBlockName(getBlockRootClientId(getBlockRootClientId(clientId))) === 'core/list-item' + }; + }, [clientId]); + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? format_outdent_rtl : format_outdent, title: (0,external_wp_i18n_namespaceObject.__)('Outdent'), describedBy: (0,external_wp_i18n_namespaceObject.__)('Outdent list item'), disabled: !canOutdent, onClick: () => outdentListItem() - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? format_indent_rtl : format_indent, title: (0,external_wp_i18n_namespaceObject.__)('Indent'), describedBy: (0,external_wp_i18n_namespaceObject.__)('Indent list item'), @@ -27742,24 +29697,21 @@ function ListItemEdit({ placeholder, content } = attributes; - const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ - ref: useCopy(clientId) - }); + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, { - allowedBlocks: ['core/list'], renderAppender: false, __unstableDisableDropZone: true }); - const useEnterRef = useEnter({ + const useEnterRef = use_enter_useEnter({ content, clientId }); const useSpaceRef = useSpace(clientId); const onSplit = useSplit(clientId); const onMerge = useMerge(clientId, mergeBlocks); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("li", { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("li", { ...innerBlocksProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([useEnterRef, useSpaceRef]), identifier: "content", tagName: "div", @@ -27774,9 +29726,9 @@ function ListItemEdit({ onReplace: onReplace ? (blocks, ...args) => { onReplace(convertToListItems(blocks), ...args); } : undefined - }), innerBlocksProps.children), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + }), innerBlocksProps.children), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(edit_IndentUI, { + }, (0,external_React_namespaceObject.createElement)(edit_IndentUI, { clientId: clientId }))); } @@ -27790,11 +29742,11 @@ function ListItemEdit({ function list_item_save_save({ attributes }) { - return (0,external_wp_element_namespaceObject.createElement)("li", { + return (0,external_React_namespaceObject.createElement)("li", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save() - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: attributes.content - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); + }), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list-item/transforms.js @@ -27809,7 +29761,7 @@ const list_item_transforms_transforms = { transform: (attributes, innerBlocks = []) => [(0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph', attributes), ...innerBlocks.map(block => (0,external_wp_blocks_namespaceObject.cloneBlock)(block))] }] }; -/* harmony default export */ var list_item_transforms = (list_item_transforms_transforms); +/* harmony default export */ const list_item_transforms = (list_item_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list-item/index.js /** @@ -27817,6 +29769,7 @@ const list_item_transforms_transforms = { */ + /** * Internal dependencies */ @@ -27828,6 +29781,7 @@ const list_item_metadata = { title: "List item", category: "text", parent: ["core/list"], + allowedBlocks: ["core/list"], description: "Create a list item.", textdomain: "default", attributes: { @@ -27835,16 +29789,23 @@ const list_item_metadata = { type: "string" }, content: { - type: "string", - source: "html", + type: "rich-text", + source: "rich-text", selector: "li", - "default": "", __experimentalRole: "content" } }, supports: { className: false, __experimentalSelector: "li", + spacing: { + margin: true, + padding: true, + __experimentalDefaultControls: { + margin: false, + padding: false + } + }, typography: { fontSize: true, lineHeight: true, @@ -27857,12 +29818,16 @@ const list_item_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } } }; + const { name: list_item_name } = list_item_metadata; @@ -27877,7 +29842,8 @@ const list_item_settings = { content: attributes.content + attributesToMerge.content }; }, - transforms: list_item_transforms + transforms: list_item_transforms, + [unlock(external_wp_blockEditor_namespaceObject.privateApis).requiresWrapperOnCopy]: true }; const list_item_init = () => initBlock({ name: list_item_name, @@ -27891,13 +29857,13 @@ const list_item_init = () => initBlock({ * WordPress dependencies */ -const login = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const login = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M11 14.5l1.1 1.1 3-3 .5-.5-.6-.6-3-3-1 1 1.7 1.7H5v1.5h7.7L11 14.5zM16.8 5h-7c-1.1 0-2 .9-2 2v1.5h1.5V7c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v10c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5v-1.5H7.8V17c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2z" })); -/* harmony default export */ var library_login = (login); +/* harmony default export */ const library_login = (login); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/loginout/edit.js @@ -27915,27 +29881,27 @@ function LoginOutEdit({ displayLoginAsForm, redirectToCurrent } = attributes; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Display login as form'), checked: displayLoginAsForm, onChange: () => setAttributes({ displayLoginAsForm: !displayLoginAsForm }) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Redirect to current URL'), checked: redirectToCurrent, onChange: () => setAttributes({ redirectToCurrent: !redirectToCurrent }) - }))), (0,external_wp_element_namespaceObject.createElement)("div", { + }))), (0,external_React_namespaceObject.createElement)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: 'logged-in' }) - }, (0,external_wp_element_namespaceObject.createElement)("a", { + }, (0,external_React_namespaceObject.createElement)("a", { href: "#login-pseudo-link" }, (0,external_wp_i18n_namespaceObject.__)('Log out')))); } @@ -27972,6 +29938,14 @@ const loginout_metadata = { }, supports: { className: true, + spacing: { + margin: true, + padding: true, + __experimentalDefaultControls: { + margin: false, + padding: false + } + }, typography: { fontSize: true, lineHeight: true, @@ -27984,6 +29958,9 @@ const loginout_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } } }; @@ -28007,13 +29984,13 @@ const loginout_init = () => initBlock({ * WordPress dependencies */ -const mediaAndText = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const mediaAndText = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M3 6v11.5h8V6H3Zm11 3h7V7.5h-7V9Zm7 3.5h-7V11h7v1.5ZM14 16h7v-1.5h-7V16Z" })); -/* harmony default export */ var media_and_text = (mediaAndText); +/* harmony default export */ const media_and_text = (mediaAndText); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/media-text/constants.js /** @@ -28277,13 +30254,13 @@ const media_text_deprecated_v6 = { [`wp-image-${mediaId}`]: mediaId && mediaType === 'image', [`size-${mediaSizeSlug}`]: mediaId && mediaType === 'image' }); - let image = (0,external_wp_element_namespaceObject.createElement)("img", { + let image = (0,external_React_namespaceObject.createElement)("img", { src: mediaUrl, alt: mediaAlt, className: imageClasses || null }); if (href) { - image = (0,external_wp_element_namespaceObject.createElement)("a", { + image = (0,external_React_namespaceObject.createElement)("a", { className: linkClass, href: href, target: linkTarget, @@ -28292,7 +30269,7 @@ const media_text_deprecated_v6 = { } const mediaTypeRenders = { image: () => image, - video: () => (0,external_wp_element_namespaceObject.createElement)("video", { + video: () => (0,external_React_namespaceObject.createElement)("video", { controls: true, src: mediaUrl }) @@ -28312,29 +30289,29 @@ const media_text_deprecated_v6 = { gridTemplateColumns }; if ('right' === mediaPosition) { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }) - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({ className: 'wp-block-media-text__content' }) - }), (0,external_wp_element_namespaceObject.createElement)("figure", { + }), (0,external_React_namespaceObject.createElement)("figure", { className: "wp-block-media-text__media", style: backgroundStyles }, (mediaTypeRenders[mediaType] || noop)())); } - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }) - }, (0,external_wp_element_namespaceObject.createElement)("figure", { + }, (0,external_React_namespaceObject.createElement)("figure", { className: "wp-block-media-text__media", style: backgroundStyles - }, (mediaTypeRenders[mediaType] || noop)()), (0,external_wp_element_namespaceObject.createElement)("div", { + }, (mediaTypeRenders[mediaType] || noop)()), (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({ className: 'wp-block-media-text__content' }) @@ -28389,13 +30366,13 @@ const media_text_deprecated_v5 = { [`wp-image-${mediaId}`]: mediaId && mediaType === 'image', [`size-${mediaSizeSlug}`]: mediaId && mediaType === 'image' }); - let image = (0,external_wp_element_namespaceObject.createElement)("img", { + let image = (0,external_React_namespaceObject.createElement)("img", { src: mediaUrl, alt: mediaAlt, className: imageClasses || null }); if (href) { - image = (0,external_wp_element_namespaceObject.createElement)("a", { + image = (0,external_React_namespaceObject.createElement)("a", { className: linkClass, href: href, target: linkTarget, @@ -28404,7 +30381,7 @@ const media_text_deprecated_v5 = { } const mediaTypeRenders = { image: () => image, - video: () => (0,external_wp_element_namespaceObject.createElement)("video", { + video: () => (0,external_React_namespaceObject.createElement)("video", { controls: true, src: mediaUrl }) @@ -28424,29 +30401,29 @@ const media_text_deprecated_v5 = { gridTemplateColumns }; if ('right' === mediaPosition) { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }) - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({ className: 'wp-block-media-text__content' }) - }), (0,external_wp_element_namespaceObject.createElement)("figure", { + }), (0,external_React_namespaceObject.createElement)("figure", { className: "wp-block-media-text__media", style: backgroundStyles }, (mediaTypeRenders[mediaType] || noop)())); } - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }) - }, (0,external_wp_element_namespaceObject.createElement)("figure", { + }, (0,external_React_namespaceObject.createElement)("figure", { className: "wp-block-media-text__media", style: backgroundStyles - }, (mediaTypeRenders[mediaType] || noop)()), (0,external_wp_element_namespaceObject.createElement)("div", { + }, (mediaTypeRenders[mediaType] || noop)()), (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({ className: 'wp-block-media-text__content' }) @@ -28485,13 +30462,13 @@ const media_text_deprecated_v4 = { [`wp-image-${mediaId}`]: mediaId && mediaType === 'image', [`size-${mediaSizeSlug}`]: mediaId && mediaType === 'image' }); - let image = (0,external_wp_element_namespaceObject.createElement)("img", { + let image = (0,external_React_namespaceObject.createElement)("img", { src: mediaUrl, alt: mediaAlt, className: imageClasses || null }); if (href) { - image = (0,external_wp_element_namespaceObject.createElement)("a", { + image = (0,external_React_namespaceObject.createElement)("a", { className: linkClass, href: href, target: linkTarget, @@ -28500,7 +30477,7 @@ const media_text_deprecated_v4 = { } const mediaTypeRenders = { image: () => image, - video: () => (0,external_wp_element_namespaceObject.createElement)("video", { + video: () => (0,external_React_namespaceObject.createElement)("video", { controls: true, src: mediaUrl }) @@ -28519,15 +30496,15 @@ const media_text_deprecated_v4 = { const style = { gridTemplateColumns }; - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }) - }, (0,external_wp_element_namespaceObject.createElement)("figure", { + }, (0,external_React_namespaceObject.createElement)("figure", { className: "wp-block-media-text__media", style: backgroundStyles - }, (mediaTypeRenders[mediaType] || noop)()), (0,external_wp_element_namespaceObject.createElement)("div", { + }, (mediaTypeRenders[mediaType] || noop)()), (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({ className: 'wp-block-media-text__content' }) @@ -28614,13 +30591,13 @@ const media_text_deprecated_v3 = { rel } = attributes; const newRel = !rel ? undefined : rel; - let image = (0,external_wp_element_namespaceObject.createElement)("img", { + let image = (0,external_React_namespaceObject.createElement)("img", { src: mediaUrl, alt: mediaAlt, className: mediaId && mediaType === 'image' ? `wp-image-${mediaId}` : null }); if (href) { - image = (0,external_wp_element_namespaceObject.createElement)("a", { + image = (0,external_React_namespaceObject.createElement)("a", { className: linkClass, href: href, target: linkTarget, @@ -28629,7 +30606,7 @@ const media_text_deprecated_v3 = { } const mediaTypeRenders = { image: () => image, - video: () => (0,external_wp_element_namespaceObject.createElement)("video", { + video: () => (0,external_React_namespaceObject.createElement)("video", { controls: true, src: mediaUrl }) @@ -28652,15 +30629,15 @@ const media_text_deprecated_v3 = { backgroundColor: backgroundClass ? undefined : customBackgroundColor, gridTemplateColumns }; - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: className, style: style - }, (0,external_wp_element_namespaceObject.createElement)("figure", { + }, (0,external_React_namespaceObject.createElement)("figure", { className: "wp-block-media-text__media", style: backgroundStyles - }, (mediaTypeRenders[mediaType] || noop)()), (0,external_wp_element_namespaceObject.createElement)("div", { + }, (mediaTypeRenders[mediaType] || noop)()), (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-media-text__content" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null))); + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null))); } }; @@ -28710,12 +30687,12 @@ const media_text_deprecated_v2 = { focalPoint } = attributes; const mediaTypeRenders = { - image: () => (0,external_wp_element_namespaceObject.createElement)("img", { + image: () => (0,external_React_namespaceObject.createElement)("img", { src: mediaUrl, alt: mediaAlt, className: mediaId && mediaType === 'image' ? `wp-image-${mediaId}` : null }), - video: () => (0,external_wp_element_namespaceObject.createElement)("video", { + video: () => (0,external_React_namespaceObject.createElement)("video", { controls: true, src: mediaUrl }) @@ -28737,15 +30714,15 @@ const media_text_deprecated_v2 = { backgroundColor: backgroundClass ? undefined : customBackgroundColor, gridTemplateColumns }; - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: className, style: style - }, (0,external_wp_element_namespaceObject.createElement)("figure", { + }, (0,external_React_namespaceObject.createElement)("figure", { className: "wp-block-media-text__media", style: backgroundStyles - }, (mediaTypeRenders[mediaType] || noop)()), (0,external_wp_element_namespaceObject.createElement)("div", { + }, (mediaTypeRenders[mediaType] || noop)()), (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-media-text__content" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null))); + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null))); } }; @@ -28782,11 +30759,11 @@ const media_text_deprecated_v1 = { mediaWidth } = attributes; const mediaTypeRenders = { - image: () => (0,external_wp_element_namespaceObject.createElement)("img", { + image: () => (0,external_React_namespaceObject.createElement)("img", { src: mediaUrl, alt: mediaAlt }), - video: () => (0,external_wp_element_namespaceObject.createElement)("video", { + video: () => (0,external_React_namespaceObject.createElement)("video", { controls: true, src: mediaUrl }) @@ -28805,17 +30782,17 @@ const media_text_deprecated_v1 = { backgroundColor: backgroundClass ? undefined : customBackgroundColor, gridTemplateColumns }; - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: className, style: style - }, (0,external_wp_element_namespaceObject.createElement)("figure", { + }, (0,external_React_namespaceObject.createElement)("figure", { className: "wp-block-media-text__media" - }, (mediaTypeRenders[mediaType] || noop)()), (0,external_wp_element_namespaceObject.createElement)("div", { + }, (mediaTypeRenders[mediaType] || noop)()), (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-media-text__content" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null))); + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null))); } }; -/* harmony default export */ var media_text_deprecated = ([media_text_deprecated_v6, media_text_deprecated_v5, media_text_deprecated_v4, media_text_deprecated_v3, media_text_deprecated_v2, media_text_deprecated_v1]); +/* harmony default export */ const media_text_deprecated = ([media_text_deprecated_v6, media_text_deprecated_v5, media_text_deprecated_v4, media_text_deprecated_v3, media_text_deprecated_v2, media_text_deprecated_v1]); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pull-left.js @@ -28823,13 +30800,13 @@ const media_text_deprecated_v1 = { * WordPress dependencies */ -const pullLeft = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const pullLeft = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z" })); -/* harmony default export */ var pull_left = (pullLeft); +/* harmony default export */ const pull_left = (pullLeft); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pull-right.js @@ -28837,13 +30814,13 @@ const pullLeft = (0,external_wp_element_namespaceObject.createElement)(external_ * WordPress dependencies */ -const pullRight = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const pullRight = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z" })); -/* harmony default export */ var pull_right = (pullRight); +/* harmony default export */ const pull_right = (pullRight); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/media.js @@ -28851,17 +30828,17 @@ const pullRight = (0,external_wp_element_namespaceObject.createElement)(external * WordPress dependencies */ -const media = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const media = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "m7 6.5 4 2.5-4 2.5z" -}), (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}), (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z" })); -/* harmony default export */ var library_media = (media); +/* harmony default export */ const library_media = (media); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/media-text/media-container.js @@ -28900,7 +30877,7 @@ const ResizableBoxContainer = (0,external_wp_element_namespaceObject.forwardRef) ...props }, ref) => { const isMobile = (0,external_wp_compose_namespaceObject.useViewportMatch)('small', '<'); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ResizableBox, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ResizableBox, { ref: ref, showHandle: isSelected && (!isMobile || !isStackedOnMobile), ...props @@ -28911,9 +30888,9 @@ function ToolbarEditButton({ mediaUrl, onSelectMedia }) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, { mediaId: mediaId, mediaURL: mediaUrl, allowedTypes: media_container_ALLOWED_MEDIA_TYPES, @@ -28934,8 +30911,8 @@ function PlaceholderContainer({ type: 'snackbar' }); }; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, { - icon: (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, { + icon: (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: library_media }), labels: { @@ -28988,16 +30965,16 @@ function MediaContainer(props, ref) { }; const backgroundStyles = mediaType === 'image' && imageFill ? imageFillStyles(mediaUrl, focalPoint) : {}; const mediaTypeRenderers = { - image: () => (0,external_wp_element_namespaceObject.createElement)("img", { + image: () => (0,external_React_namespaceObject.createElement)("img", { src: mediaUrl, alt: mediaAlt }), - video: () => (0,external_wp_element_namespaceObject.createElement)("video", { + video: () => (0,external_React_namespaceObject.createElement)("video", { controls: true, src: mediaUrl }) }; - return (0,external_wp_element_namespaceObject.createElement)(ResizableBoxContainer, { + return (0,external_React_namespaceObject.createElement)(ResizableBoxContainer, { as: "figure", className: classnames_default()(className, 'editor-media-container__resizer', { 'is-transient': isTemporaryMedia @@ -29016,19 +30993,19 @@ function MediaContainer(props, ref) { isSelected: isSelected, isStackedOnMobile: isStackedOnMobile, ref: ref - }, (0,external_wp_element_namespaceObject.createElement)(ToolbarEditButton, { + }, (0,external_React_namespaceObject.createElement)(ToolbarEditButton, { onSelectMedia: onSelectMedia, mediaUrl: mediaUrl, mediaId: mediaId - }), (mediaTypeRenderers[mediaType] || media_container_noop)(), isTemporaryMedia && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null), (0,external_wp_element_namespaceObject.createElement)(PlaceholderContainer, { + }), (mediaTypeRenderers[mediaType] || media_container_noop)(), isTemporaryMedia && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null), (0,external_React_namespaceObject.createElement)(PlaceholderContainer, { ...props })); } - return (0,external_wp_element_namespaceObject.createElement)(PlaceholderContainer, { + return (0,external_React_namespaceObject.createElement)(PlaceholderContainer, { ...props }); } -/* harmony default export */ var media_container = ((0,external_wp_element_namespaceObject.forwardRef)(MediaContainer)); +/* harmony default export */ const media_container = ((0,external_wp_element_namespaceObject.forwardRef)(MediaContainer)); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/media-text/edit.js @@ -29235,25 +31212,34 @@ function MediaTextEdit({ mediaSizeSlug: newMediaSizeSlug }); }; - const mediaTextGeneralSettings = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + const mediaTextGeneralSettings = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { + __nextHasNoMarginBottom: true, + __next40pxDefaultSize: true, + label: (0,external_wp_i18n_namespaceObject.__)('Media width'), + value: temporaryMediaWidth || mediaWidth, + onChange: commitWidthChange, + min: WIDTH_CONSTRAINT_PERCENTAGE, + max: 100 - WIDTH_CONSTRAINT_PERCENTAGE + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Stack on mobile'), checked: isStackedOnMobile, onChange: () => setAttributes({ isStackedOnMobile: !isStackedOnMobile }) - }), mediaType === 'image' && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), mediaType === 'image' && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, - label: (0,external_wp_i18n_namespaceObject.__)('Crop image to fill entire column'), + label: (0,external_wp_i18n_namespaceObject.__)('Crop image to fill'), checked: !!imageFill, onChange: () => setAttributes({ imageFill: !imageFill }) - }), imageFill && mediaUrl && mediaType === 'image' && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FocalPointPicker, { + }), imageFill && mediaUrl && mediaType === 'image' && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.FocalPointPicker, { __nextHasNoMarginBottom: true, - label: (0,external_wp_i18n_namespaceObject.__)('Focal point picker'), + __next40pxDefaultSize: true, + label: (0,external_wp_i18n_namespaceObject.__)('Focal point'), url: mediaUrl, value: focalPoint, onChange: value => setAttributes({ @@ -29261,27 +31247,20 @@ function MediaTextEdit({ }), onDragStart: imperativeFocalPointPreview, onDrag: imperativeFocalPointPreview - }), mediaType === 'image' && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextareaControl, { + }), mediaType === 'image' && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextareaControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Alternative text'), value: mediaAlt, onChange: onMediaAltChange, - help: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, { + help: (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, { href: "https://www.w3.org/WAI/tutorials/images/decision-tree" - }, (0,external_wp_i18n_namespaceObject.__)('Describe the purpose of the image.')), (0,external_wp_element_namespaceObject.createElement)("br", null), (0,external_wp_i18n_namespaceObject.__)('Leave empty if decorative.')) - }), mediaType === 'image' && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalImageSizeControl, { + }, (0,external_wp_i18n_namespaceObject.__)('Describe the purpose of the image.')), (0,external_React_namespaceObject.createElement)("br", null), (0,external_wp_i18n_namespaceObject.__)('Leave empty if decorative.')) + }), mediaType === 'image' && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalImageSizeControl, { onChangeImage: updateImage, slug: mediaSizeSlug, imageSizeOptions: imageSizeOptions, isResizable: false, imageSizeHelp: (0,external_wp_i18n_namespaceObject.__)('Select the size of the source image.') - }), mediaUrl && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { - __nextHasNoMarginBottom: true, - label: (0,external_wp_i18n_namespaceObject.__)('Media width'), - value: temporaryMediaWidth || mediaWidth, - onChange: commitWidthChange, - min: WIDTH_CONSTRAINT_PERCENTAGE, - max: 100 - WIDTH_CONSTRAINT_PERCENTAGE })); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: classNames, @@ -29294,26 +31273,26 @@ function MediaTextEdit({ allowedBlocks }); const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)(); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, mediaTextGeneralSettings), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, mediaTextGeneralSettings), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, blockEditingMode === 'default' && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockVerticalAlignmentControl, { + }, blockEditingMode === 'default' && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockVerticalAlignmentControl, { onChange: onVerticalAlignmentChange, value: verticalAlignment - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { icon: pull_left, title: (0,external_wp_i18n_namespaceObject.__)('Show media on left'), isActive: mediaPosition === 'left', onClick: () => setAttributes({ mediaPosition: 'left' }) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { icon: pull_right, title: (0,external_wp_i18n_namespaceObject.__)('Show media on right'), isActive: mediaPosition === 'right', onClick: () => setAttributes({ mediaPosition: 'right' }) - })), mediaType === 'image' && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalImageURLInputUI, { + })), mediaType === 'image' && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalImageURLInputUI, { url: href || '', onChangeUrl: onSetHref, linkDestination: linkDestination, @@ -29323,11 +31302,11 @@ function MediaTextEdit({ linkTarget: linkTarget, linkClass: linkClass, rel: rel - })), (0,external_wp_element_namespaceObject.createElement)("div", { + })), (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, mediaPosition === 'right' && (0,external_wp_element_namespaceObject.createElement)("div", { + }, mediaPosition === 'right' && (0,external_React_namespaceObject.createElement)("div", { ...innerBlocksProps - }), (0,external_wp_element_namespaceObject.createElement)(media_container, { + }), (0,external_React_namespaceObject.createElement)(media_container, { className: "wp-block-media-text__media", onSelectMedia: onSelectMedia, onWidthChange: onWidthChange, @@ -29344,11 +31323,11 @@ function MediaTextEdit({ mediaType, mediaUrl, mediaWidth - }), mediaPosition !== 'right' && (0,external_wp_element_namespaceObject.createElement)("div", { + }), mediaPosition !== 'right' && (0,external_React_namespaceObject.createElement)("div", { ...innerBlocksProps }))); } -/* harmony default export */ var media_text_edit = (MediaTextEdit); +/* harmony default export */ const media_text_edit = (MediaTextEdit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/media-text/save.js @@ -29394,13 +31373,13 @@ function media_text_save_save({ [`wp-image-${mediaId}`]: mediaId && mediaType === 'image', [`size-${mediaSizeSlug}`]: mediaId && mediaType === 'image' }); - let image = (0,external_wp_element_namespaceObject.createElement)("img", { + let image = (0,external_React_namespaceObject.createElement)("img", { src: mediaUrl, alt: mediaAlt, className: imageClasses || null }); if (href) { - image = (0,external_wp_element_namespaceObject.createElement)("a", { + image = (0,external_React_namespaceObject.createElement)("a", { className: linkClass, href: href, target: linkTarget, @@ -29409,7 +31388,7 @@ function media_text_save_save({ } const mediaTypeRenders = { image: () => image, - video: () => (0,external_wp_element_namespaceObject.createElement)("video", { + video: () => (0,external_React_namespaceObject.createElement)("video", { controls: true, src: mediaUrl }) @@ -29429,29 +31408,29 @@ function media_text_save_save({ gridTemplateColumns }; if ('right' === mediaPosition) { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }) - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({ className: 'wp-block-media-text__content' }) - }), (0,external_wp_element_namespaceObject.createElement)("figure", { + }), (0,external_React_namespaceObject.createElement)("figure", { className: "wp-block-media-text__media", style: backgroundStyles }, (mediaTypeRenders[mediaType] || save_noop)())); } - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }) - }, (0,external_wp_element_namespaceObject.createElement)("figure", { + }, (0,external_React_namespaceObject.createElement)("figure", { className: "wp-block-media-text__media", style: backgroundStyles - }, (mediaTypeRenders[mediaType] || save_noop)()), (0,external_wp_element_namespaceObject.createElement)("div", { + }, (mediaTypeRenders[mediaType] || save_noop)()), (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({ className: 'wp-block-media-text__content' }) @@ -29645,7 +31624,7 @@ const media_text_transforms_transforms = { } }] }; -/* harmony default export */ var media_text_transforms = (media_text_transforms_transforms); +/* harmony default export */ const media_text_transforms = (media_text_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/media-text/index.js /** @@ -29785,6 +31764,9 @@ const media_text_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-media-text-editor", @@ -29828,8 +31810,6 @@ const media_text_init = () => initBlock({ settings: media_text_settings }); -;// CONCATENATED MODULE: external ["wp","dom"] -var external_wp_dom_namespaceObject = window["wp"]["dom"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/missing/edit.js /** @@ -29867,7 +31847,7 @@ function MissingBlockWarning({ }, [clientId]); const actions = []; let messageHTML; - const convertToHtmlButton = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + const convertToHtmlButton = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { key: "convert", onClick: convertToHTML, variant: "primary" @@ -29887,13 +31867,13 @@ function MissingBlockWarning({ messageHTML = (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: block name */ (0,external_wp_i18n_namespaceObject.__)('Your site doesn’t include support for the "%s" block. You can leave this block intact or remove it entirely.'), originalName); } - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: 'has-warning' }) - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, { actions: actions - }, messageHTML), (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, null, (0,external_wp_dom_namespaceObject.safeHTML)(originalUndelimitedContent))); + }, messageHTML), (0,external_React_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, null, (0,external_wp_dom_namespaceObject.safeHTML)(originalUndelimitedContent))); } const MissingEdit = (0,external_wp_data_namespaceObject.withDispatch)((dispatch, { clientId, @@ -29910,7 +31890,7 @@ const MissingEdit = (0,external_wp_data_namespaceObject.withDispatch)((dispatch, } }; })(MissingBlockWarning); -/* harmony default export */ var missing_edit = (MissingEdit); +/* harmony default export */ const missing_edit = (MissingEdit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/missing/save.js @@ -29922,7 +31902,7 @@ function missing_save_save({ attributes }) { // Preserve the missing block's content. - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, null, attributes.originalContent); + return (0,external_React_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, null, attributes.originalContent); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/missing/index.js @@ -29953,7 +31933,7 @@ const missing_metadata = { }, originalContent: { type: "string", - source: "html" + source: "raw" } }, supports: { @@ -29961,7 +31941,10 @@ const missing_metadata = { customClassName: false, inserter: false, html: false, - reusable: false + reusable: false, + interactivity: { + clientNavigation: true + } } }; @@ -30000,13 +31983,13 @@ const missing_init = () => initBlock({ * WordPress dependencies */ -const more = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const more = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M4 9v1.5h16V9H4zm12 5.5h4V13h-4v1.5zm-6 0h4V13h-4v1.5zm-6 0h4V13H4v1.5z" })); -/* harmony default export */ var library_more = (more); +/* harmony default export */ const library_more = (more); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/more/edit.js @@ -30046,15 +32029,15 @@ function MoreEdit({ const style = { width: `${(customText ? customText : DEFAULT_TEXT).length + 1.2}em` }; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Hide the excerpt on the full content page'), checked: !!noTeaser, onChange: toggleHideExcerpt, help: getHideExcerptHelp - }))), (0,external_wp_element_namespaceObject.createElement)("div", { + }))), (0,external_React_namespaceObject.createElement)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)() - }, (0,external_wp_element_namespaceObject.createElement)("input", { + }, (0,external_React_namespaceObject.createElement)("input", { "aria-label": (0,external_wp_i18n_namespaceObject.__)('“Read more” link text'), type: "text", value: customText, @@ -30079,7 +32062,7 @@ function more_save_save({ }) { const moreTag = customText ? `<!--more ${customText}-->` : '<!--more-->'; const noTeaserTag = noTeaser ? '<!--noteaser-->' : ''; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, null, [moreTag, noTeaserTag].filter(Boolean).join('\n')); + return (0,external_React_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, null, [moreTag, noTeaserTag].filter(Boolean).join('\n')); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/more/transforms.js @@ -30114,7 +32097,7 @@ const more_transforms_transforms = { } }] }; -/* harmony default export */ var more_transforms = (more_transforms_transforms); +/* harmony default export */ const more_transforms = (more_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/more/index.js /** @@ -30149,7 +32132,10 @@ const more_metadata = { customClassName: false, className: false, html: false, - multiple: false + multiple: false, + interactivity: { + clientNavigation: true + } }, editorStyle: "wp-block-more-editor" }; @@ -30165,6 +32151,10 @@ const more_settings = { __experimentalLabel(attributes, { context }) { + const customName = attributes?.metadata?.name; + if (context === 'list-view' && customName) { + return customName; + } if (context === 'accessibility') { return attributes.customText; } @@ -30185,16 +32175,16 @@ const more_init = () => initBlock({ * WordPress dependencies */ -const navigation = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const navigation = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z" })); -/* harmony default export */ var library_navigation = (navigation); +/* harmony default export */ const library_navigation = (navigation); ;// CONCATENATED MODULE: external ["wp","a11y"] -var external_wp_a11y_namespaceObject = window["wp"]["a11y"]; +const external_wp_a11y_namespaceObject = window["wp"]["a11y"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js /** * WordPress dependencies @@ -30225,7 +32215,7 @@ function Icon({ ref }); } -/* harmony default export */ var build_module_icon = ((0,external_wp_element_namespaceObject.forwardRef)(Icon)); +/* harmony default export */ const build_module_icon = ((0,external_wp_element_namespaceObject.forwardRef)(Icon)); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js @@ -30233,19 +32223,18 @@ function Icon({ * WordPress dependencies */ -const close_close = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const close_close = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z" })); -/* harmony default export */ var library_close = (close_close); +/* harmony default export */ const library_close = (close_close); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/constants.js const constants_DEFAULT_BLOCK = { name: 'core/navigation-link' }; -const constants_ALLOWED_BLOCKS = ['core/navigation-link', 'core/search', 'core/social-links', 'core/page-list', 'core/spacer', 'core/home-link', 'core/site-title', 'core/site-logo', 'core/navigation-submenu', 'core/loginout', 'core/buttons']; const PRIORITIZED_INSERTER_BLOCKS = ['core/navigation-link/page', 'core/navigation-link']; // These parameters must be kept aligned with those in @@ -30422,16 +32411,16 @@ function useNavigationEntities(menuId) { const PlaceholderPreview = ({ isVisible = true }) => { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { "aria-hidden": !isVisible ? true : undefined, className: "wp-block-navigation-placeholder__preview" - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-navigation-placeholder__actions__indicator" - }, (0,external_wp_element_namespaceObject.createElement)(build_module_icon, { + }, (0,external_React_namespaceObject.createElement)(build_module_icon, { icon: library_navigation }), (0,external_wp_i18n_namespaceObject.__)('Navigation'))); }; -/* harmony default export */ var placeholder_preview = (PlaceholderPreview); +/* harmony default export */ const placeholder_preview = (PlaceholderPreview); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/more-vertical.js @@ -30439,13 +32428,13 @@ const PlaceholderPreview = ({ * WordPress dependencies */ -const moreVertical = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const moreVertical = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z" })); -/* harmony default export */ var more_vertical = (moreVertical); +/* harmony default export */ const more_vertical = (moreVertical); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/edit/navigation-menu-selector.js @@ -30487,7 +32476,7 @@ function NavigationMenuSelector({ }) { /* translators: %s: The name of a menu. */ const createActionLabel = (0,external_wp_i18n_namespaceObject.__)("Create from '%s'"); - const [isCreatingMenu, setIsCreatingMenu] = (0,external_wp_element_namespaceObject.useState)(false); + const [isUpdatingMenuRef, setIsUpdatingMenuRef] = (0,external_wp_element_namespaceObject.useState)(false); actionLabel = actionLabel || createActionLabel; const { menus: classicMenus @@ -30510,10 +32499,11 @@ function NavigationMenuSelector({ return { value: id, label, - ariaLabel: (0,external_wp_i18n_namespaceObject.sprintf)(actionLabel, label) + ariaLabel: (0,external_wp_i18n_namespaceObject.sprintf)(actionLabel, label), + disabled: isUpdatingMenuRef || isResolvingNavigationMenus || !hasResolvedNavigationMenus }; }) || []; - }, [navigationMenus, actionLabel]); + }, [navigationMenus, actionLabel, isResolvingNavigationMenus, hasResolvedNavigationMenus, isUpdatingMenuRef]); const hasNavigationMenus = !!navigationMenus?.length; const hasClassicMenus = !!classicMenus?.length; const showNavigationMenus = !!canSwitchNavigationMenu; @@ -30522,7 +32512,7 @@ function NavigationMenuSelector({ const noBlockMenus = !hasNavigationMenus && hasResolvedNavigationMenus; const menuUnavailable = hasResolvedNavigationMenus && currentMenuId === null; let selectorLabel = ''; - if (isCreatingMenu || isResolvingNavigationMenus) { + if (isResolvingNavigationMenus) { selectorLabel = (0,external_wp_i18n_namespaceObject.__)('Loading…'); } else if (noMenuSelected || noBlockMenus || menuUnavailable) { // Note: classic Menus may be available. @@ -30532,11 +32522,11 @@ function NavigationMenuSelector({ selectorLabel = currentTitle; } (0,external_wp_element_namespaceObject.useEffect)(() => { - if (isCreatingMenu && (createNavigationMenuIsSuccess || createNavigationMenuIsError)) { - setIsCreatingMenu(false); + if (isUpdatingMenuRef && (createNavigationMenuIsSuccess || createNavigationMenuIsError)) { + setIsUpdatingMenuRef(false); } - }, [hasResolvedNavigationMenus, createNavigationMenuIsSuccess, canUserCreateNavigationMenu, createNavigationMenuIsError, isCreatingMenu, menuUnavailable, noBlockMenus, noMenuSelected]); - const NavigationMenuSelectorDropdown = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.DropdownMenu, { + }, [hasResolvedNavigationMenus, createNavigationMenuIsSuccess, canUserCreateNavigationMenu, createNavigationMenuIsError, isUpdatingMenuRef, menuUnavailable, noBlockMenus, noMenuSelected]); + const NavigationMenuSelectorDropdown = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.DropdownMenu, { label: selectorLabel, icon: more_vertical, toggleProps: { @@ -30544,44 +32534,44 @@ function NavigationMenuSelector({ } }, ({ onClose - }) => (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, showNavigationMenus && hasNavigationMenus && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, { + }) => (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, showNavigationMenus && hasNavigationMenus && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, { label: (0,external_wp_i18n_namespaceObject.__)('Menus') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItemsChoice, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItemsChoice, { value: currentMenuId, onSelect: menuId => { - setIsCreatingMenu(true); onSelectNavigationMenu(menuId); onClose(); }, - choices: menuChoices, - disabled: isCreatingMenu - })), showClassicMenus && hasClassicMenus && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, { + choices: menuChoices + })), showClassicMenus && hasClassicMenus && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, { label: (0,external_wp_i18n_namespaceObject.__)('Import Classic Menus') }, classicMenus?.map(menu => { const label = (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(menu.name); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { - onClick: () => { - setIsCreatingMenu(true); - onSelectClassicMenu(menu); + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { + onClick: async () => { + setIsUpdatingMenuRef(true); + await onSelectClassicMenu(menu); + setIsUpdatingMenuRef(false); onClose(); }, key: menu.id, "aria-label": (0,external_wp_i18n_namespaceObject.sprintf)(createActionLabel, label), - disabled: isCreatingMenu + disabled: isUpdatingMenuRef || isResolvingNavigationMenus || !hasResolvedNavigationMenus }, label); - })), canUserCreateNavigationMenu && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, { + })), canUserCreateNavigationMenu && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, { label: (0,external_wp_i18n_namespaceObject.__)('Tools') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { - disabled: isCreatingMenu, - onClick: () => { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { + onClick: async () => { + setIsUpdatingMenuRef(true); + await onCreateNew(); + setIsUpdatingMenuRef(false); onClose(); - onCreateNew(); - setIsCreatingMenu(true); - } + }, + disabled: isUpdatingMenuRef || isResolvingNavigationMenus || !hasResolvedNavigationMenus }, (0,external_wp_i18n_namespaceObject.__)('Create new menu'))))); return NavigationMenuSelectorDropdown; } -/* harmony default export */ var navigation_menu_selector = (NavigationMenuSelector); +/* harmony default export */ const navigation_menu_selector = (NavigationMenuSelector); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/edit/placeholder/index.js @@ -30626,25 +32616,25 @@ function NavigationPlaceholder({ } }, [hasResolvedMenus, isResolvingMenus, isSelected]); const isResolvingActions = isResolvingMenus && isResolvingCanUserCreateNavigationMenu; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { className: "wp-block-navigation-placeholder" - }, (0,external_wp_element_namespaceObject.createElement)(placeholder_preview, { + }, (0,external_React_namespaceObject.createElement)(placeholder_preview, { isVisible: !isSelected - }), (0,external_wp_element_namespaceObject.createElement)("div", { + }), (0,external_React_namespaceObject.createElement)("div", { "aria-hidden": !isSelected ? true : undefined, className: "wp-block-navigation-placeholder__controls" - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-navigation-placeholder__actions" - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-navigation-placeholder__actions__indicator" - }, (0,external_wp_element_namespaceObject.createElement)(build_module_icon, { + }, (0,external_React_namespaceObject.createElement)(build_module_icon, { icon: library_navigation - }), " ", (0,external_wp_i18n_namespaceObject.__)('Navigation')), (0,external_wp_element_namespaceObject.createElement)("hr", null), isResolvingActions && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null), (0,external_wp_element_namespaceObject.createElement)(navigation_menu_selector, { + }), " ", (0,external_wp_i18n_namespaceObject.__)('Navigation')), (0,external_React_namespaceObject.createElement)("hr", null), isResolvingActions && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null), (0,external_React_namespaceObject.createElement)(navigation_menu_selector, { currentMenuId: currentMenuId, clientId: clientId, onSelectNavigationMenu: onSelectNavigationMenu, onSelectClassicMenu: onSelectClassicMenu - }), (0,external_wp_element_namespaceObject.createElement)("hr", null), canUserCreateNavigationMenu && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }), (0,external_React_namespaceObject.createElement)("hr", null), canUserCreateNavigationMenu && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { variant: "tertiary", onClick: onCreateEmpty }, (0,external_wp_i18n_namespaceObject.__)('Start empty')))))); @@ -30656,13 +32646,13 @@ function NavigationPlaceholder({ * WordPress dependencies */ -const menu = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const menu = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z" })); -/* harmony default export */ var library_menu = (menu); +/* harmony default export */ const library_menu = (menu); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/edit/overlay-menu-icon.js @@ -30675,23 +32665,23 @@ function OverlayMenuIcon({ icon }) { if (icon === 'menu') { - return (0,external_wp_element_namespaceObject.createElement)(build_module_icon, { + return (0,external_React_namespaceObject.createElement)(build_module_icon, { icon: library_menu }); } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { + return (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "24", height: "24", "aria-hidden": "true", focusable: "false" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Rect, { + }, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Rect, { x: "4", y: "7.5", width: "16", height: "1.5" - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Rect, { + }), (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Rect, { x: "4", y: "15", width: "16", @@ -30757,29 +32747,29 @@ function ResponsiveWrapper({ 'aria-label': (0,external_wp_i18n_namespaceObject.__)('Menu') }) }; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, !isOpen && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, !isOpen && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { "aria-haspopup": "true", "aria-label": hasIcon && (0,external_wp_i18n_namespaceObject.__)('Open menu'), className: openButtonClasses, onClick: () => onToggle(true) - }, hasIcon && (0,external_wp_element_namespaceObject.createElement)(OverlayMenuIcon, { + }, hasIcon && (0,external_React_namespaceObject.createElement)(OverlayMenuIcon, { icon: icon - }), !hasIcon && (0,external_wp_i18n_namespaceObject.__)('Menu')), (0,external_wp_element_namespaceObject.createElement)("div", { + }), !hasIcon && (0,external_wp_i18n_namespaceObject.__)('Menu')), (0,external_React_namespaceObject.createElement)("div", { className: responsiveContainerClasses, style: styles, id: modalId - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-navigation__responsive-close", tabIndex: "-1" - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { ...dialogProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { className: "wp-block-navigation__responsive-container-close", "aria-label": hasIcon && (0,external_wp_i18n_namespaceObject.__)('Close menu'), onClick: () => onToggle(false) - }, hasIcon && (0,external_wp_element_namespaceObject.createElement)(build_module_icon, { + }, hasIcon && (0,external_React_namespaceObject.createElement)(build_module_icon, { icon: library_close - }), !hasIcon && (0,external_wp_i18n_namespaceObject.__)('Close')), (0,external_wp_element_namespaceObject.createElement)("div", { + }), !hasIcon && (0,external_wp_i18n_namespaceObject.__)('Close')), (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-navigation__responsive-container-content", id: `${modalId}-content` }, children))))); @@ -30826,15 +32816,12 @@ function NavigationInnerBlocks({ }; }, [clientId]); const [blocks, onInput, onChange] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)('postType', 'wp_navigation'); - const shouldDirectInsert = (0,external_wp_element_namespaceObject.useMemo)(() => blocks.every(({ - name - }) => name === 'core/navigation-link' || name === 'core/navigation-submenu' || name === 'core/page-list'), [blocks]); // When the block is selected itself or has a top level item selected that // doesn't itself have children, show the standard appender. Else show no // appender. const parentOrChildHasSelection = isSelected || isImmediateParentOfSelectedBlock && !selectedBlockHasChildren; - const placeholder = (0,external_wp_element_namespaceObject.useMemo)(() => (0,external_wp_element_namespaceObject.createElement)(placeholder_preview, null), []); + const placeholder = (0,external_wp_element_namespaceObject.useMemo)(() => (0,external_React_namespaceObject.createElement)(placeholder_preview, null), []); const hasMenuItems = !!blocks?.length; // If there is a `ref` attribute pointing to a `wp_navigation` but @@ -30848,10 +32835,9 @@ function NavigationInnerBlocks({ value: blocks, onInput, onChange, - allowedBlocks: constants_ALLOWED_BLOCKS, prioritizedInserterBlocks: PRIORITIZED_INSERTER_BLOCKS, defaultBlock: constants_DEFAULT_BLOCK, - directInsert: shouldDirectInsert, + directInsert: true, orientation, templateLock, // As an exception to other blocks which feature nesting, show @@ -30866,7 +32852,7 @@ function NavigationInnerBlocks({ __experimentalCaptureToolbars: true, __unstableDisableLayoutClassNames: true }); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...innerBlocksProps }); } @@ -30881,7 +32867,7 @@ function NavigationInnerBlocks({ function NavigationMenuNameControl() { const [title, updateTitle] = (0,external_wp_coreData_namespaceObject.useEntityProp)('postType', 'wp_navigation', 'title'); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Menu name'), value: title, @@ -30969,9 +32955,6 @@ function UnsavedInnerBlocks({ // entity records. As a result we need to perform a deep equality check skipping // the page list's inner blocks. const innerBlocksAreDirty = areBlocksDirty(originalBlocks?.current, blocks); - const shouldDirectInsert = (0,external_wp_element_namespaceObject.useMemo)(() => blocks.every(({ - name - }) => name === 'core/navigation-link' || name === 'core/navigation-submenu' || name === 'core/page-list'), [blocks]); // The block will be disabled in a block preview, use this as a way of // avoiding the side-effects of this component for block previews. @@ -30980,9 +32963,8 @@ function UnsavedInnerBlocks({ className: 'wp-block-navigation__container' }, { renderAppender: hasSelection ? undefined : false, - allowedBlocks: constants_ALLOWED_BLOCKS, defaultBlock: constants_DEFAULT_BLOCK, - directInsert: shouldDirectInsert + directInsert: true }); const { isSaving, @@ -31021,7 +33003,7 @@ function UnsavedInnerBlocks({ createNavigationMenu(null, blocks); }, [blocks, createNavigationMenu, isDisabled, isSaving, hasResolvedAllNavigationMenus, innerBlocksAreDirty, hasSelection]); const Wrapper = isSaving ? external_wp_components_namespaceObject.Disabled : 'div'; - return (0,external_wp_element_namespaceObject.createElement)(Wrapper, { + return (0,external_React_namespaceObject.createElement)(Wrapper, { ...innerBlocksProps }); } @@ -31045,25 +33027,25 @@ function NavigationMenuDeleteControl({ const { deleteEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { className: "wp-block-navigation-delete-menu-button", variant: "secondary", isDestructive: true, onClick: () => { setIsConfirmModalVisible(true); } - }, (0,external_wp_i18n_namespaceObject.__)('Delete menu')), isConfirmModalVisible && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, { + }, (0,external_wp_i18n_namespaceObject.__)('Delete menu')), isConfirmModalVisible && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, { title: (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: the name of a menu to delete */ (0,external_wp_i18n_namespaceObject.__)('Delete %s'), title), onRequestClose: () => setIsConfirmModalVisible(false) - }, (0,external_wp_element_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('Are you sure you want to delete this navigation menu?')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, { + }, (0,external_React_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('Are you sure you want to delete this navigation menu?')), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, { justify: "right" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { variant: "tertiary", onClick: () => { setIsConfirmModalVisible(false); } - }, (0,external_wp_i18n_namespaceObject.__)('Cancel')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, (0,external_wp_i18n_namespaceObject.__)('Cancel')), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { variant: "primary", onClick: () => { deleteEntityRecord('postType', 'wp_navigation', id, { @@ -31109,7 +33091,7 @@ function useNavigationNotice({ }, [noticeRef, removeNotice]); return [showNotice, hideNotice]; } -/* harmony default export */ var use_navigation_notice = (useNavigationNotice); +/* harmony default export */ const use_navigation_notice = (useNavigationNotice); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/edit/overlay-menu-preview.js @@ -31128,15 +33110,15 @@ function OverlayMenuPreview({ hasIcon, icon }) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Show icon button'), - help: (0,external_wp_i18n_namespaceObject.__)('Configure the visual appearance of the button opening the overlay menu.'), + help: (0,external_wp_i18n_namespaceObject.__)('Configure the visual appearance of the button that toggles the overlay menu.'), onChange: value => setAttributes({ hasIcon: value }), checked: hasIcon - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Icon'), value: icon, @@ -31144,16 +33126,16 @@ function OverlayMenuPreview({ icon: value }), isBlock: true - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "handle", "aria-label": (0,external_wp_i18n_namespaceObject.__)('handle'), - label: (0,external_wp_element_namespaceObject.createElement)(OverlayMenuIcon, { + label: (0,external_React_namespaceObject.createElement)(OverlayMenuIcon, { icon: "handle" }) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "menu", "aria-label": (0,external_wp_i18n_namespaceObject.__)('menu'), - label: (0,external_wp_element_namespaceObject.createElement)(OverlayMenuIcon, { + label: (0,external_React_namespaceObject.createElement)(OverlayMenuIcon, { icon: "menu" }) }))); @@ -31481,7 +33463,7 @@ function useConvertClassicToBlockMenu(createNavigationMenu, { error }; } -/* harmony default export */ var use_convert_classic_menu_to_block_menu = (useConvertClassicToBlockMenu); +/* harmony default export */ const use_convert_classic_menu_to_block_menu = (useConvertClassicToBlockMenu); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/template-part/edit/utils/create-template-part-id.js /** @@ -31534,6 +33516,7 @@ function useTemplatePartAreaLabel(clientId) { const definedAreas = select('core/editor').__experimentalGetDefaultTemplatePartAreas(); /* eslint-enable @wordpress/data-no-store-string-literals */ const { + getCurrentTheme, getEditedEntityRecord } = select(external_wp_coreData_namespaceObject.store); for (const templatePartClientId of parentTemplatePartClientIds) { @@ -31542,7 +33525,7 @@ function useTemplatePartAreaLabel(clientId) { // The 'area' usually isn't stored on the block, but instead // on the entity. const { - theme, + theme = getCurrentTheme()?.stylesheet, slug } = templatePartBlock.attributes; const templatePartEntityId = createTemplatePartId(theme, slug); @@ -31710,7 +33693,7 @@ function useCreateNavigationMenu(clientId) { */ -const EMPTY_ARRAY = []; +const use_inner_blocks_EMPTY_ARRAY = []; function useInnerBlocks(clientId) { return (0,external_wp_data_namespaceObject.useSelect)(select => { const { @@ -31725,7 +33708,7 @@ function useInnerBlocks(clientId) { // case `getBlock` is fixed. const _uncontrolledInnerBlocks = getBlock(clientId).innerBlocks; const _hasUncontrolledInnerBlocks = !!_uncontrolledInnerBlocks?.length; - const _controlledInnerBlocks = _hasUncontrolledInnerBlocks ? EMPTY_ARRAY : getBlocks(clientId); + const _controlledInnerBlocks = _hasUncontrolledInnerBlocks ? use_inner_blocks_EMPTY_ARRAY : getBlocks(clientId); return { innerBlocks: _hasUncontrolledInnerBlocks ? _uncontrolledInnerBlocks : _controlledInnerBlocks, hasUncontrolledInnerBlocks: _hasUncontrolledInnerBlocks, @@ -31840,7 +33823,7 @@ const ManageMenusButton = ({ if (isMenuItem) { ComponentName = external_wp_components_namespaceObject.MenuItem; } - return (0,external_wp_element_namespaceObject.createElement)(ComponentName, { + return (0,external_React_namespaceObject.createElement)(ComponentName, { variant: "link", disabled: disabled, className: className, @@ -31849,7 +33832,7 @@ const ManageMenusButton = ({ }) }, (0,external_wp_i18n_namespaceObject.__)('Manage menus')); }; -/* harmony default export */ var manage_menus_button = (ManageMenusButton); +/* harmony default export */ const manage_menus_button = (ManageMenusButton); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/edit/deleted-navigation-warning.js @@ -31863,14 +33846,14 @@ const ManageMenusButton = ({ function DeletedNavigationWarning({ onCreateNew }) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.__)('Navigation menu has been deleted or is unavailable. <button>Create a new menu?</button>'), { - button: (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.__)('Navigation menu has been deleted or is unavailable. <button>Create a new menu?</button>'), { + button: (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { onClick: onCreateNew, variant: "link" }) })); } -/* harmony default export */ var deleted_navigation_warning = (DeletedNavigationWarning); +/* harmony default export */ const deleted_navigation_warning = (DeletedNavigationWarning); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/add-submenu.js @@ -31878,13 +33861,13 @@ function DeletedNavigationWarning({ * WordPress dependencies */ -const addSubmenu = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const addSubmenu = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M2 12c0 3.6 2.4 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.5 0-4.5-1.5-4.5-4s2-4.5 4.5-4.5h3.5V6H8c-3.6 0-6 2.4-6 6zm19.5-1h-8v1.5h8V11zm0 5h-8v1.5h8V16zm0-10h-8v1.5h8V6z" })); -/* harmony default export */ var add_submenu = (addSubmenu); +/* harmony default export */ const add_submenu = (addSubmenu); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-up.js @@ -31892,13 +33875,13 @@ const addSubmenu = (0,external_wp_element_namespaceObject.createElement)(externa * WordPress dependencies */ -const chevronUp = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const chevronUp = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z" })); -/* harmony default export */ var chevron_up = (chevronUp); +/* harmony default export */ const chevron_up = (chevronUp); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-down.js @@ -31906,13 +33889,13 @@ const chevronUp = (0,external_wp_element_namespaceObject.createElement)(external * WordPress dependencies */ -const chevronDown = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const chevronDown = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z" })); -/* harmony default export */ var chevron_down = (chevronDown); +/* harmony default export */ const chevron_down = (chevronDown); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/edit/leaf-more-menu.js @@ -31944,7 +33927,7 @@ function AddSubmenuItem({ } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); const clientId = block.clientId; const isDisabled = !BLOCKS_THAT_CAN_BE_CONVERTED_TO_SUBMENU.includes(block.name); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { icon: add_submenu, disabled: isDisabled, onClick: () => { @@ -32000,7 +33983,7 @@ function LeafMoreMenu(props) { } = select(external_wp_blockEditor_namespaceObject.store); return getBlockRootClientId(clientId); }, [clientId]); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.DropdownMenu, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.DropdownMenu, { icon: more_vertical, label: (0,external_wp_i18n_namespaceObject.__)('Options'), className: "block-editor-block-settings-menu", @@ -32009,26 +33992,26 @@ function LeafMoreMenu(props) { ...props }, ({ onClose - }) => (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { + }) => (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { icon: chevron_up, onClick: () => { moveBlocksUp([clientId], rootClientId); onClose(); } - }, (0,external_wp_i18n_namespaceObject.__)('Move up')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { + }, (0,external_wp_i18n_namespaceObject.__)('Move up')), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { icon: chevron_down, onClick: () => { moveBlocksDown([clientId], rootClientId); onClose(); } - }, (0,external_wp_i18n_namespaceObject.__)('Move down')), (0,external_wp_element_namespaceObject.createElement)(AddSubmenuItem, { + }, (0,external_wp_i18n_namespaceObject.__)('Move down')), (0,external_React_namespaceObject.createElement)(AddSubmenuItem, { block: block, onClose: onClose, expanded: true, expandedState: props.expandedState, expand: props.expand, setInsertedBlock: props.setInsertedBlock - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { + })), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { onClick: () => { removeBlocks([clientId], false); onClose(); @@ -32037,7 +34020,7 @@ function LeafMoreMenu(props) { } ;// CONCATENATED MODULE: external ["wp","escapeHtml"] -var external_wp_escapeHtml_namespaceObject = window["wp"]["escapeHtml"]; +const external_wp_escapeHtml_namespaceObject = window["wp"]["escapeHtml"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation-link/update-attributes.js /** * WordPress dependencies @@ -32135,6 +34118,34 @@ const updateAttributes = (updatedValue = {}, setAttributes, blockAttributes = {} }); }; +;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-left-small.js + +/** + * WordPress dependencies + */ + +const chevronLeftSmall = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 24 24" +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { + d: "m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z" +})); +/* harmony default export */ const chevron_left_small = (chevronLeftSmall); + +;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/plus.js + +/** + * WordPress dependencies + */ + +const plus = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 24 24" +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { + d: "M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z" +})); +/* harmony default export */ const library_plus = (plus); + ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation-link/link-ui.js /** @@ -32150,6 +34161,15 @@ const updateAttributes = (updatedValue = {}, setAttributes, blockAttributes = {} + +/** + * Internal dependencies + */ + +const { + PrivateQuickInserter: QuickInserter +} = unlock(external_wp_blockEditor_namespaceObject.privateApis); + /** * Given the Link block's type attribute, return the query params to give to * /wp/v2/search. @@ -32193,63 +34213,70 @@ function getSuggestionsQuery(type, kind) { subtype: type }; } - return {}; + return { + // for custom link which has no type + // always show pages as initial suggestions + initialSuggestionsSearchOptions: { + type: 'post', + subtype: 'page', + perPage: 20 + } + }; } } - -/** - * Add transforms to Link Control - * - * @param {Object} props Component props. - * @param {string} props.clientId Block client ID. - */ -function LinkControlTransforms({ - clientId +function LinkUIBlockInserter({ + clientId, + onBack, + onSelectBlock }) { const { - getBlock, - blockTransforms + rootBlockClientId } = (0,external_wp_data_namespaceObject.useSelect)(select => { const { - getBlock: _getBlock, - getBlockRootClientId, - getBlockTransformItems + getBlockRootClientId } = select(external_wp_blockEditor_namespaceObject.store); return { - getBlock: _getBlock, - blockTransforms: getBlockTransformItems(_getBlock(clientId), getBlockRootClientId(clientId)) + rootBlockClientId: getBlockRootClientId(clientId) }; }, [clientId]); - const { - replaceBlock - } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); - const featuredBlocks = ['core/page-list', 'core/site-logo', 'core/social-links', 'core/search']; - const transforms = blockTransforms.filter(item => { - return featuredBlocks.includes(item.name); - }); - if (!transforms?.length) { - return null; - } + const focusOnMountRef = (0,external_wp_compose_namespaceObject.useFocusOnMount)('firstElement'); + const dialogTitleId = (0,external_wp_compose_namespaceObject.useInstanceId)(external_wp_blockEditor_namespaceObject.__experimentalLinkControl, `link-ui-block-inserter__title`); + const dialogDescritionId = (0,external_wp_compose_namespaceObject.useInstanceId)(external_wp_blockEditor_namespaceObject.__experimentalLinkControl, `link-ui-block-inserter__description`); if (!clientId) { return null; } - return (0,external_wp_element_namespaceObject.createElement)("div", { - className: "link-control-transform" - }, (0,external_wp_element_namespaceObject.createElement)("h3", { - className: "link-control-transform__subheading" - }, (0,external_wp_i18n_namespaceObject.__)('Transform')), (0,external_wp_element_namespaceObject.createElement)("div", { - className: "link-control-transform__items" - }, transforms.map((item, index) => { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { - key: `transform-${index}`, - onClick: () => replaceBlock(clientId, (0,external_wp_blocks_namespaceObject.switchToBlockType)(getBlock(clientId), item.name)), - className: "link-control-transform__item" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { - icon: item.icon - }), item.title); - }))); + return (0,external_React_namespaceObject.createElement)("div", { + className: "link-ui-block-inserter", + role: "dialog", + "aria-labelledby": dialogTitleId, + "aria-describedby": dialogDescritionId, + ref: focusOnMountRef + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, null, (0,external_React_namespaceObject.createElement)("h2", { + id: dialogTitleId + }, (0,external_wp_i18n_namespaceObject.__)('Add block')), (0,external_React_namespaceObject.createElement)("p", { + id: dialogDescritionId + }, (0,external_wp_i18n_namespaceObject.__)('Choose a block to add to your Navigation.'))), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + className: "link-ui-block-inserter__back", + icon: chevron_left_small, + onClick: e => { + e.preventDefault(); + onBack(); + }, + size: "small" + }, (0,external_wp_i18n_namespaceObject.__)('Back')), (0,external_React_namespaceObject.createElement)(QuickInserter, { + rootClientId: rootBlockClientId, + clientId: clientId, + isAppender: false, + prioritizePatterns: false, + selectBlockOnInsert: true, + hasSearch: false, + onSelect: onSelectBlock + })); } function LinkUI(props) { + const [addingBlock, setAddingBlock] = (0,external_wp_element_namespaceObject.useState)(false); + const [focusAddBlockButton, setFocusAddBlockButton] = (0,external_wp_element_namespaceObject.useState)(false); + const [showBackdrop, setShowBackdrop] = (0,external_wp_element_namespaceObject.useState)(true); const { saveEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store); @@ -32300,12 +34327,32 @@ function LinkUI(props) { opensInNewTab, title: label && (0,external_wp_dom_namespaceObject.__unstableStripHTML)(label) }), [label, opensInNewTab, url]); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Popover, { + const dialogTitleId = (0,external_wp_compose_namespaceObject.useInstanceId)(LinkUI, `link-ui-link-control__title`); + const dialogDescritionId = (0,external_wp_compose_namespaceObject.useInstanceId)(LinkUI, `link-ui-link-control__description`); + + // Selecting a block should close the popover and also remove the (previously) automatically inserted + // link block so that the newly selected block can be inserted in its place. + const { + onClose: onSelectBlock + } = props; + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, showBackdrop && (0,external_React_namespaceObject.createElement)("div", { + className: "components-popover-pointer-events-trap", + "aria-hidden": "true", + onClick: () => setShowBackdrop(false) + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Popover, { placement: "bottom", onClose: props.onClose, anchor: props.anchor, shift: true - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalLinkControl, { + }, !addingBlock && (0,external_React_namespaceObject.createElement)("div", { + role: "dialog", + "aria-labelledby": dialogTitleId, + "aria-describedby": dialogDescritionId + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, null, (0,external_React_namespaceObject.createElement)("h2", { + id: dialogTitleId + }, (0,external_wp_i18n_namespaceObject.__)('Add link')), (0,external_React_namespaceObject.createElement)("p", { + id: dialogDescritionId + }, (0,external_wp_i18n_namespaceObject.__)('Search for and add a link to your Navigation.'))), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalLinkControl, { hasTextControl: true, hasRichPreviews: true, value: link, @@ -32322,7 +34369,7 @@ function LinkUI(props) { format = (0,external_wp_i18n_namespaceObject.__)('Create draft page: <mark>%s</mark>'); } return (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.sprintf)(format, searchTerm), { - mark: (0,external_wp_element_namespaceObject.createElement)("mark", null) + mark: (0,external_React_namespaceObject.createElement)("mark", null) }); }, noDirectEntry: !!type, @@ -32331,11 +34378,48 @@ function LinkUI(props) { onChange: props.onChange, onRemove: props.onRemove, onCancel: props.onCancel, - renderControlBottom: !url ? () => (0,external_wp_element_namespaceObject.createElement)(LinkControlTransforms, { - clientId: props.clientId - }) : null - })); + renderControlBottom: () => !link?.url?.length && (0,external_React_namespaceObject.createElement)(LinkUITools, { + focusAddBlockButton: focusAddBlockButton, + setAddingBlock: () => { + setAddingBlock(true); + setFocusAddBlockButton(false); + } + }) + })), addingBlock && (0,external_React_namespaceObject.createElement)(LinkUIBlockInserter, { + clientId: props.clientId, + onBack: () => { + setAddingBlock(false); + setFocusAddBlockButton(true); + }, + onSelectBlock: onSelectBlock + }))); } +const LinkUITools = ({ + setAddingBlock, + focusAddBlockButton +}) => { + const blockInserterAriaRole = 'listbox'; + const addBlockButtonRef = (0,external_wp_element_namespaceObject.useRef)(); + + // Focus the add block button when the popover is opened. + (0,external_wp_element_namespaceObject.useEffect)(() => { + if (focusAddBlockButton) { + addBlockButtonRef.current?.focus(); + } + }, [focusAddBlockButton]); + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, { + className: "link-ui-tools" + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + ref: addBlockButtonRef, + icon: library_plus, + onClick: e => { + e.preventDefault(); + setAddingBlock(true); + }, + "aria-haspopup": blockInserterAriaRole + }, (0,external_wp_i18n_namespaceObject.__)('Add block'))); +}; +/* harmony default export */ const link_ui = ((/* unused pure expression or super */ null && (LinkUITools))); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/edit/menu-inspector-controls.js @@ -32382,7 +34466,7 @@ function AdditionalBlockContent({ if (!_insertedBlockClientId) return; updateBlockAttributes(_insertedBlockClientId, _updatedAttributes); }; - return (0,external_wp_element_namespaceObject.createElement)(LinkUI, { + return (0,external_React_namespaceObject.createElement)(LinkUI, { clientId: insertedBlock?.clientId, link: insertedBlock?.attributes, onClose: () => { @@ -32411,20 +34495,20 @@ const MainContent = ({ navigationMenu } = useNavigationMenu(currentMenuId); if (currentMenuId && isNavigationMenuMissing) { - return (0,external_wp_element_namespaceObject.createElement)(deleted_navigation_warning, { + return (0,external_React_namespaceObject.createElement)(deleted_navigation_warning, { onCreateNew: onCreateNew }); } if (isLoading) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null); + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null); } const description = navigationMenu ? (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: The name of a menu. */ (0,external_wp_i18n_namespaceObject.__)('Structure for navigation menu: %s'), navigationMenu?.title || (0,external_wp_i18n_namespaceObject.__)('Untitled menu')) : (0,external_wp_i18n_namespaceObject.__)('You have not yet created any menus. Displaying a list of your Pages'); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-navigation__menu-inspector-controls" - }, !hasChildren && (0,external_wp_element_namespaceObject.createElement)("p", { + }, !hasChildren && (0,external_React_namespaceObject.createElement)("p", { className: "wp-block-navigation__menu-inspector-controls__empty-message" - }, (0,external_wp_i18n_namespaceObject.__)('This navigation menu is empty.')), (0,external_wp_element_namespaceObject.createElement)(PrivateListView, { + }, (0,external_wp_i18n_namespaceObject.__)('This navigation menu is empty.')), (0,external_React_namespaceObject.createElement)(PrivateListView, { rootClientId: clientId, isExpanded: true, description: description, @@ -32444,16 +34528,16 @@ const MenuInspectorControls = props => { isManageMenusButtonDisabled, blockEditingMode } = props; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "list" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: null - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, { className: "wp-block-navigation-off-canvas-editor__header" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHeading, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHeading, { className: "wp-block-navigation-off-canvas-editor__title", level: 2 - }, (0,external_wp_i18n_namespaceObject.__)('Menu')), blockEditingMode === 'default' && (0,external_wp_element_namespaceObject.createElement)(navigation_menu_selector, { + }, (0,external_wp_i18n_namespaceObject.__)('Menu')), blockEditingMode === 'default' && (0,external_React_namespaceObject.createElement)(navigation_menu_selector, { currentMenuId: currentMenuId, onSelectClassicMenu: onSelectClassicMenu, onSelectNavigationMenu: onSelectNavigationMenu, @@ -32462,11 +34546,11 @@ const MenuInspectorControls = props => { createNavigationMenuIsError: createNavigationMenuIsError, actionLabel: actionLabel, isManageMenusButtonDisabled: isManageMenusButtonDisabled - })), (0,external_wp_element_namespaceObject.createElement)(MainContent, { + })), (0,external_React_namespaceObject.createElement)(MainContent, { ...props }))); }; -/* harmony default export */ var menu_inspector_controls = (MenuInspectorControls); +/* harmony default export */ const menu_inspector_controls = (MenuInspectorControls); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/edit/accessible-description.js @@ -32478,7 +34562,7 @@ function AccessibleDescription({ id, children }) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, null, (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, null, (0,external_React_namespaceObject.createElement)("div", { id: id, className: "wp-block-navigation__description" }, children)); @@ -32502,7 +34586,7 @@ function AccessibleMenuDescription({ const [menuTitle] = (0,external_wp_coreData_namespaceObject.useEntityProp)('postType', 'wp_navigation', 'title'); /* translators: %s: Title of a Navigation Menu post. */ const description = (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)(`Navigation menu: "%s"`), menuTitle); - return (0,external_wp_element_namespaceObject.createElement)(AccessibleDescription, { + return (0,external_React_namespaceObject.createElement)(AccessibleDescription, { id: id }, description); } @@ -32591,7 +34675,7 @@ function Navigation({ }); }, [setAttributes]); const recursionId = `navigationMenu/${ref}`; - const hasAlreadyRendered = (0,external_wp_blockEditor_namespaceObject.__experimentalUseHasRecursion)(recursionId); + const hasAlreadyRendered = (0,external_wp_blockEditor_namespaceObject.useHasRecursion)(recursionId); const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)(); // Preload classic menus, so that they don't suddenly pop-in when viewing @@ -32617,8 +34701,8 @@ function Navigation({ isSuccess: createNavigationMenuIsSuccess, isError: createNavigationMenuIsError } = useCreateNavigationMenu(clientId); - const createUntitledEmptyNavigationMenu = () => { - createNavigationMenu(''); + const createUntitledEmptyNavigationMenu = async () => { + await createNavigationMenu(''); }; const { hasUncontrolledInnerBlocks, @@ -32715,7 +34799,7 @@ function Navigation({ // - the Navigation Post isn't available (hasn't resolved) yet. const isLoading = !hasResolvedNavigationMenus || isCreatingNavigationMenu || isConvertingClassicMenu || !!(ref && !isEntityAvailable && !isConvertingClassicMenu); const textDecoration = attributes.style?.typography?.textDecoration; - const hasBlockOverlay = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBlockOverlayActive)(clientId); + const hasBlockOverlay = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).__unstableHasActiveBlockOverlayActive(clientId), [clientId]); const isResponsive = 'never' !== overlayMenu; const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ ref: navRef, @@ -32747,12 +34831,7 @@ function Navigation({ const [detectedOverlayBackgroundColor, setDetectedOverlayBackgroundColor] = (0,external_wp_element_namespaceObject.useState)(); const [detectedOverlayColor, setDetectedOverlayColor] = (0,external_wp_element_namespaceObject.useState)(); const onSelectClassicMenu = async classicMenu => { - const navMenu = await convertClassicMenu(classicMenu.id, classicMenu.name, 'draft'); - if (navMenu) { - handleUpdateMenu(navMenu.id, { - focusNavigationBlock: true - }); - } + return convertClassicMenu(classicMenu.id, classicMenu.name, 'draft'); }; const onSelectNavigationMenu = menuId => { handleUpdateMenu(menuId); @@ -32779,11 +34858,14 @@ function Navigation({ } if (classicMenuConversionStatus === CLASSIC_MENU_CONVERSION_SUCCESS) { showClassicMenuConversionNotice((0,external_wp_i18n_namespaceObject.__)('Classic menu imported successfully.')); + handleUpdateMenu(createNavigationMenuPost?.id, { + focusNavigationBlock: true + }); } if (classicMenuConversionStatus === CLASSIC_MENU_CONVERSION_ERROR) { showClassicMenuConversionNotice((0,external_wp_i18n_namespaceObject.__)('Classic menu import failed.')); } - }, [classicMenuConversionStatus, classicMenuConversionError, hideClassicMenuConversionNotice, showClassicMenuConversionNotice]); + }, [classicMenuConversionStatus, classicMenuConversionError, hideClassicMenuConversionNotice, showClassicMenuConversionNotice, createNavigationMenuPost?.id, handleUpdateMenu]); (0,external_wp_element_namespaceObject.useEffect)(() => { if (!enableContrastChecking) { return; @@ -32828,9 +34910,9 @@ function Navigation({ }, [submenuAccessibilityNotice]); const overlayMenuPreviewId = (0,external_wp_compose_namespaceObject.useInstanceId)(OverlayMenuPreview, `overlay-menu-preview`); const colorGradientSettings = (0,external_wp_blockEditor_namespaceObject.__experimentalUseMultipleOriginColorsAndGradients)(); - const stylingInspectorControls = (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, hasSubmenuIndicatorSetting && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + const stylingInspectorControls = (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, hasSubmenuIndicatorSetting && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Display') - }, isResponsive && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, isResponsive && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { className: overlayMenuPreviewClasses, onClick: () => { setOverlayMenuPreview(!overlayMenuPreview); @@ -32838,18 +34920,18 @@ function Navigation({ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Overlay menu controls'), "aria-controls": overlayMenuPreviewId, "aria-expanded": overlayMenuPreview - }, hasIcon && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(OverlayMenuIcon, { + }, hasIcon && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(OverlayMenuIcon, { icon: icon - }), (0,external_wp_element_namespaceObject.createElement)(build_module_icon, { + }), (0,external_React_namespaceObject.createElement)(build_module_icon, { icon: library_close - })), !hasIcon && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("span", null, (0,external_wp_i18n_namespaceObject.__)('Menu')), (0,external_wp_element_namespaceObject.createElement)("span", null, (0,external_wp_i18n_namespaceObject.__)('Close')))), (0,external_wp_element_namespaceObject.createElement)("div", { + })), !hasIcon && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("span", null, (0,external_wp_i18n_namespaceObject.__)('Menu')), (0,external_React_namespaceObject.createElement)("span", null, (0,external_wp_i18n_namespaceObject.__)('Close')))), (0,external_React_namespaceObject.createElement)("div", { id: overlayMenuPreviewId - }, overlayMenuPreview && (0,external_wp_element_namespaceObject.createElement)(OverlayMenuPreview, { + }, overlayMenuPreview && (0,external_React_namespaceObject.createElement)(OverlayMenuPreview, { setAttributes: setAttributes, hasIcon: hasIcon, icon: icon, hidden: !overlayMenuPreview - }))), (0,external_wp_element_namespaceObject.createElement)("h3", null, (0,external_wp_i18n_namespaceObject.__)('Overlay Menu')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControl, { + }))), (0,external_React_namespaceObject.createElement)("h3", null, (0,external_wp_i18n_namespaceObject.__)('Overlay Menu')), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Configure overlay menu'), value: overlayMenu, @@ -32859,16 +34941,16 @@ function Navigation({ }), isBlock: true, hideLabelFromVision: true - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "never", label: (0,external_wp_i18n_namespaceObject.__)('Off') - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "mobile", label: (0,external_wp_i18n_namespaceObject.__)('Mobile') - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "always", label: (0,external_wp_i18n_namespaceObject.__)('Always') - })), hasSubmenus && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("h3", null, (0,external_wp_i18n_namespaceObject.__)('Submenus')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + })), hasSubmenus && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("h3", null, (0,external_wp_i18n_namespaceObject.__)('Submenus')), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, checked: openSubmenusOnClick, onChange: value => { @@ -32879,9 +34961,8 @@ function Navigation({ }) // Make sure arrows are shown when we toggle this on. }); }, - label: (0,external_wp_i18n_namespaceObject.__)('Open on click') - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, checked: showSubmenuIcon, onChange: value => { @@ -32891,13 +34972,13 @@ function Navigation({ }, disabled: attributes.openSubmenusOnClick, label: (0,external_wp_i18n_namespaceObject.__)('Show arrow') - }), submenuAccessibilityNotice && (0,external_wp_element_namespaceObject.createElement)("div", null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Notice, { + }), submenuAccessibilityNotice && (0,external_React_namespaceObject.createElement)("div", null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Notice, { spokenMessage: null, status: "warning", isDismissible: false - }, submenuAccessibilityNotice))))), colorGradientSettings.hasColorsOrGradients && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { + }, submenuAccessibilityNotice))))), colorGradientSettings.hasColorsOrGradients && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "color" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown, { __experimentalIsRenderedInSidebar: true, settings: [{ colorValue: textColor.color, @@ -32924,22 +35005,22 @@ function Navigation({ ...colorGradientSettings, gradients: [], disableCustomGradients: true - }), enableContrastChecking && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.ContrastChecker, { + }), enableContrastChecking && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.ContrastChecker, { backgroundColor: detectedBackgroundColor, textColor: detectedColor - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.ContrastChecker, { + }), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.ContrastChecker, { backgroundColor: detectedOverlayBackgroundColor, textColor: detectedOverlayColor })))); const accessibleDescriptionId = `${clientId}-desc`; const isManageMenusButtonDisabled = !hasManagePermissions || !hasResolvedNavigationMenus; if (hasUnsavedBlocks && !isCreatingNavigationMenu) { - return (0,external_wp_element_namespaceObject.createElement)(TagName, { + return (0,external_React_namespaceObject.createElement)(TagName, { ...blockProps, "aria-describedby": !isPlaceholder ? accessibleDescriptionId : undefined - }, (0,external_wp_element_namespaceObject.createElement)(AccessibleDescription, { + }, (0,external_React_namespaceObject.createElement)(AccessibleDescription, { id: accessibleDescriptionId - }, (0,external_wp_i18n_namespaceObject.__)('Unsaved Navigation Menu.')), (0,external_wp_element_namespaceObject.createElement)(menu_inspector_controls, { + }, (0,external_wp_i18n_namespaceObject.__)('Unsaved Navigation Menu.')), (0,external_React_namespaceObject.createElement)(menu_inspector_controls, { clientId: clientId, createNavigationMenuIsSuccess: createNavigationMenuIsSuccess, createNavigationMenuIsError: createNavigationMenuIsError, @@ -32951,7 +35032,7 @@ function Navigation({ onSelectNavigationMenu: onSelectNavigationMenu, isLoading: isLoading, blockEditingMode: blockEditingMode - }), blockEditingMode === 'default' && stylingInspectorControls, (0,external_wp_element_namespaceObject.createElement)(ResponsiveWrapper, { + }), blockEditingMode === 'default' && stylingInspectorControls, (0,external_React_namespaceObject.createElement)(ResponsiveWrapper, { id: clientId, onToggle: setResponsiveMenuVisibility, isOpen: isResponsiveMenuOpen, @@ -32961,7 +35042,7 @@ function Navigation({ isHiddenByDefault: 'always' === overlayMenu, overlayBackgroundColor: overlayBackgroundColor, overlayTextColor: overlayTextColor - }, (0,external_wp_element_namespaceObject.createElement)(UnsavedInnerBlocks, { + }, (0,external_React_namespaceObject.createElement)(UnsavedInnerBlocks, { createNavigationMenu: createNavigationMenu, blocks: uncontrolledInnerBlocks, hasSelection: isSelected || isInnerBlockSelected @@ -32971,9 +35052,9 @@ function Navigation({ // Show a warning if the selected menu is no longer available. // TODO - the user should be able to select a new one? if (ref && isNavigationMenuMissing) { - return (0,external_wp_element_namespaceObject.createElement)(TagName, { + return (0,external_React_namespaceObject.createElement)(TagName, { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(menu_inspector_controls, { + }, (0,external_React_namespaceObject.createElement)(menu_inspector_controls, { clientId: clientId, createNavigationMenuIsSuccess: createNavigationMenuIsSuccess, createNavigationMenuIsError: createNavigationMenuIsError, @@ -32985,14 +35066,14 @@ function Navigation({ onSelectNavigationMenu: onSelectNavigationMenu, isLoading: isLoading, blockEditingMode: blockEditingMode - }), (0,external_wp_element_namespaceObject.createElement)(deleted_navigation_warning, { + }), (0,external_React_namespaceObject.createElement)(deleted_navigation_warning, { onCreateNew: createUntitledEmptyNavigationMenu })); } if (isEntityAvailable && hasAlreadyRendered) { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Block cannot be rendered inside itself.'))); + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Block cannot be rendered inside itself.'))); } const PlaceholderComponent = CustomPlaceholder ? CustomPlaceholder : NavigationPlaceholder; @@ -33007,9 +35088,9 @@ function Navigation({ */ if (isPlaceholder && CustomPlaceholder) { - return (0,external_wp_element_namespaceObject.createElement)(TagName, { + return (0,external_React_namespaceObject.createElement)(TagName, { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(PlaceholderComponent, { + }, (0,external_React_namespaceObject.createElement)(PlaceholderComponent, { isSelected: isSelected, currentMenuId: ref, clientId: clientId, @@ -33020,13 +35101,13 @@ function Navigation({ onCreateEmpty: createUntitledEmptyNavigationMenu })); } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_coreData_namespaceObject.EntityProvider, { + return (0,external_React_namespaceObject.createElement)(external_wp_coreData_namespaceObject.EntityProvider, { kind: "postType", type: "wp_navigation", id: ref - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalRecursionProvider, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RecursionProvider, { uniqueId: recursionId - }, (0,external_wp_element_namespaceObject.createElement)(menu_inspector_controls, { + }, (0,external_React_namespaceObject.createElement)(menu_inspector_controls, { clientId: clientId, createNavigationMenuIsSuccess: createNavigationMenuIsSuccess, createNavigationMenuIsError: createNavigationMenuIsError, @@ -33038,30 +35119,28 @@ function Navigation({ onSelectNavigationMenu: onSelectNavigationMenu, isLoading: isLoading, blockEditingMode: blockEditingMode - }), blockEditingMode === 'default' && stylingInspectorControls, blockEditingMode === 'default' && isEntityAvailable && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { + }), blockEditingMode === 'default' && stylingInspectorControls, blockEditingMode === 'default' && isEntityAvailable && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced" - }, hasResolvedCanUserUpdateNavigationMenu && canUserUpdateNavigationMenu && (0,external_wp_element_namespaceObject.createElement)(NavigationMenuNameControl, null), hasResolvedCanUserDeleteNavigationMenu && canUserDeleteNavigationMenu && (0,external_wp_element_namespaceObject.createElement)(NavigationMenuDeleteControl, { + }, hasResolvedCanUserUpdateNavigationMenu && canUserUpdateNavigationMenu && (0,external_React_namespaceObject.createElement)(NavigationMenuNameControl, null), hasResolvedCanUserDeleteNavigationMenu && canUserDeleteNavigationMenu && (0,external_React_namespaceObject.createElement)(NavigationMenuDeleteControl, { onDelete: (deletedMenuTitle = '') => { replaceInnerBlocks(clientId, []); showNavigationMenuStatusNotice((0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: the name of a menu (e.g. Header navigation). (0,external_wp_i18n_namespaceObject.__)('Navigation menu %s successfully deleted.'), deletedMenuTitle)); } - }), (0,external_wp_element_namespaceObject.createElement)(manage_menus_button, { + }), (0,external_React_namespaceObject.createElement)(manage_menus_button, { disabled: isManageMenusButtonDisabled, className: "wp-block-navigation-manage-menus-button" - })), isLoading && (0,external_wp_element_namespaceObject.createElement)(TagName, { - ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)("div", { + })), (0,external_React_namespaceObject.createElement)(TagName, { + ...blockProps, + "aria-describedby": !isPlaceholder && !isLoading ? accessibleDescriptionId : undefined + }, isLoading && (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-navigation__loading-indicator-container" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, { className: "wp-block-navigation__loading-indicator" - }))), !isLoading && (0,external_wp_element_namespaceObject.createElement)(TagName, { - ...blockProps, - "aria-describedby": !isPlaceholder ? accessibleDescriptionId : undefined - }, (0,external_wp_element_namespaceObject.createElement)(AccessibleMenuDescription, { + })), !isLoading && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(AccessibleMenuDescription, { id: accessibleDescriptionId - }), (0,external_wp_element_namespaceObject.createElement)(ResponsiveWrapper, { + }), (0,external_React_namespaceObject.createElement)(ResponsiveWrapper, { id: clientId, onToggle: setResponsiveMenuVisibility, hasIcon: hasIcon, @@ -33071,14 +35150,14 @@ function Navigation({ isHiddenByDefault: 'always' === overlayMenu, overlayBackgroundColor: overlayBackgroundColor, overlayTextColor: overlayTextColor - }, isEntityAvailable && (0,external_wp_element_namespaceObject.createElement)(NavigationInnerBlocks, { + }, isEntityAvailable && (0,external_React_namespaceObject.createElement)(NavigationInnerBlocks, { clientId: clientId, hasCustomPlaceholder: !!CustomPlaceholder, templateLock: templateLock, orientation: orientation - }))))); + })))))); } -/* harmony default export */ var navigation_edit = ((0,external_wp_blockEditor_namespaceObject.withColors)({ +/* harmony default export */ const navigation_edit = ((0,external_wp_blockEditor_namespaceObject.withColors)({ textColor: 'color' }, { backgroundColor: 'color' @@ -33103,7 +35182,7 @@ function navigation_save_save({ // `wp_navigation` entity rather than the hard-coded block html. return; } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/deprecated.js @@ -33241,7 +35320,7 @@ const navigation_deprecated_v6 = { } }, save() { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); }, isEligible: ({ navigationMenuId @@ -33332,7 +35411,7 @@ const navigation_deprecated_v5 = { } }, save() { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); }, isEligible: ({ itemsJustification, @@ -33418,7 +35497,7 @@ const navigation_deprecated_v4 = { } }, save() { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); }, migrate: (0,external_wp_compose_namespaceObject.compose)(migrateIdToRef, deprecated_migrateWithLayout, migrate_font_family), isEligible({ @@ -33531,7 +35610,7 @@ const navigation_deprecated_deprecated = [navigation_deprecated_v6, navigation_d }, migrate: (0,external_wp_compose_namespaceObject.compose)(migrateIdToRef, deprecated_migrateWithLayout, migrate_font_family, migrateIsResponsive), save() { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); } }, { attributes: { @@ -33578,7 +35657,7 @@ const navigation_deprecated_deprecated = [navigation_deprecated_v6, navigation_d __experimentalTextDecoration: true }, save() { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); }, isEligible(attributes) { if (!attributes.style || !attributes.style.typography) { @@ -33645,10 +35724,10 @@ const navigation_deprecated_deprecated = [navigation_deprecated_v6, navigation_d }; }), save() { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); } }]; -/* harmony default export */ var navigation_deprecated = (navigation_deprecated_deprecated); +/* harmony default export */ const navigation_deprecated = (navigation_deprecated_deprecated); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/index.js /** @@ -33667,6 +35746,7 @@ const navigation_metadata = { name: "core/navigation", title: "Navigation", category: "theme", + allowedBlocks: ["core/navigation-link", "core/search", "core/social-links", "core/page-list", "core/spacer", "core/home-link", "core/site-title", "core/site-logo", "core/navigation-submenu", "core/loginout", "core/buttons"], description: "A collection of blocks that allow visitors to get around your site.", keywords: ["menu", "navigation", "links"], textdomain: "default", @@ -33796,9 +35876,9 @@ const navigation_metadata = { } } }, - interactivity: true + interactivity: true, + renaming: false }, - viewScript: "file:./view.min.js", editorStyle: "wp-block-navigation-editor", style: "wp-block-navigation" }; @@ -33854,13 +35934,13 @@ const navigation_init = () => initBlock({ * WordPress dependencies */ -const customLink = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const customLink = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M12.5 14.5h-1V16h1c2.2 0 4-1.8 4-4s-1.8-4-4-4h-1v1.5h1c1.4 0 2.5 1.1 2.5 2.5s-1.1 2.5-2.5 2.5zm-4 1.5v-1.5h-1C6.1 14.5 5 13.4 5 12s1.1-2.5 2.5-2.5h1V8h-1c-2.2 0-4 1.8-4 4s1.8 4 4 4h1zm-1-3.2h5v-1.5h-5v1.5zM18 4H9c-1.1 0-2 .9-2 2v.5h1.5V6c0-.3.2-.5.5-.5h9c.3 0 .5.2.5.5v12c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5v-.5H7v.5c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2z" })); -/* harmony default export */ var custom_link = (customLink); +/* harmony default export */ const custom_link = (customLink); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation-link/edit.js @@ -33892,6 +35972,9 @@ const customLink = (0,external_wp_element_namespaceObject.createElement)(externa +const edit_DEFAULT_BLOCK = { + name: 'core/navigation-link' +}; /** * A React hook to determine if it's dragging within the target element. @@ -34152,6 +36235,7 @@ function NavigationLinkEdit({ } = getColors(context, !isTopLevelLink); function onKeyDown(event) { if (external_wp_keycodes_namespaceObject.isKeyboardEvent.primary(event, 'k') || (!url || isDraft || isInvalid) && event.keyCode === external_wp_keycodes_namespaceObject.ENTER) { + event.preventDefault(); setIsLinkOpen(true); } } @@ -34173,16 +36257,11 @@ function NavigationLinkEdit({ }, onKeyDown }); - const ALLOWED_BLOCKS = ['core/navigation-link', 'core/navigation-submenu', 'core/page-list']; - const DEFAULT_BLOCK = { - name: 'core/navigation-link' - }; const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)({ ...blockProps, className: 'remove-outline' // Remove the outline from the inner blocks container. }, { - allowedBlocks: ALLOWED_BLOCKS, - defaultBlock: DEFAULT_BLOCK, + defaultBlock: edit_DEFAULT_BLOCK, directInsert: true, renderAppender: false }); @@ -34196,20 +36275,20 @@ function NavigationLinkEdit({ /* translators: Whether the navigation link is Invalid or a Draft. */ const placeholderText = `(${isInvalid ? (0,external_wp_i18n_namespaceObject.__)('Invalid') : (0,external_wp_i18n_namespaceObject.__)('Draft')})`; const tooltipText = isInvalid || isDraft ? (0,external_wp_i18n_namespaceObject.__)('This item has been deleted, or is a draft') : (0,external_wp_i18n_namespaceObject.__)('This item is missing a link'); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { name: "link", icon: library_link, title: (0,external_wp_i18n_namespaceObject.__)('Link'), shortcut: external_wp_keycodes_namespaceObject.displayShortcut.primary('k'), onClick: () => setIsLinkOpen(true) - }), !isAtMaxNesting && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + }), !isAtMaxNesting && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { name: "submenu", icon: add_submenu, title: (0,external_wp_i18n_namespaceObject.__)('Add submenu'), onClick: transformToSubmenu - }))), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + }))), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, value: label ? (0,external_wp_dom_namespaceObject.__unstableStripHTML)(label) : '', onChange: labelValue => { @@ -34221,9 +36300,9 @@ function NavigationLinkEdit({ autoComplete: "off", onFocus: () => setIsLabelFieldFocused(true), onBlur: () => setIsLabelFieldFocused(false) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, - value: url || '', + value: url ? (0,external_wp_url_namespaceObject.safeDecodeURI)(url) : '', onChange: urlValue => { updateAttributes({ url: urlValue @@ -34231,7 +36310,7 @@ function NavigationLinkEdit({ }, label: (0,external_wp_i18n_namespaceObject.__)('URL'), autoComplete: "off" - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextareaControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextareaControl, { __nextHasNoMarginBottom: true, value: description || '', onChange: descriptionValue => { @@ -34241,7 +36320,7 @@ function NavigationLinkEdit({ }, label: (0,external_wp_i18n_namespaceObject.__)('Description'), help: (0,external_wp_i18n_namespaceObject.__)('The description will be displayed in the menu if the current theme supports it.') - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, value: title || '', onChange: titleValue => { @@ -34252,7 +36331,7 @@ function NavigationLinkEdit({ label: (0,external_wp_i18n_namespaceObject.__)('Title attribute'), autoComplete: "off", help: (0,external_wp_i18n_namespaceObject.__)('Additional information to help clarify the purpose of the link.') - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, value: rel || '', onChange: relValue => { @@ -34263,15 +36342,15 @@ function NavigationLinkEdit({ label: (0,external_wp_i18n_namespaceObject.__)('Rel attribute'), autoComplete: "off", help: (0,external_wp_i18n_namespaceObject.__)('The relationship of the linked URL as space-separated link types.') - }))), (0,external_wp_element_namespaceObject.createElement)("div", { + }))), (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)("a", { + }, (0,external_React_namespaceObject.createElement)("a", { className: classes - }, !url ? (0,external_wp_element_namespaceObject.createElement)("div", { + }, !url ? (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-navigation-link__placeholder-text" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Tooltip, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Tooltip, { text: tooltipText - }, (0,external_wp_element_namespaceObject.createElement)("span", null, missingText))) : (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, !isInvalid && !isDraft && !isLabelFieldFocused && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + }, (0,external_React_namespaceObject.createElement)("span", null, missingText))) : (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, !isInvalid && !isDraft && !isLabelFieldFocused && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { ref: ref, identifier: "label", className: "wp-block-navigation-item__label", @@ -34291,13 +36370,13 @@ function NavigationLinkEdit({ setIsLinkOpen(true); } } - }), description && (0,external_wp_element_namespaceObject.createElement)("span", { + }), description && (0,external_React_namespaceObject.createElement)("span", { className: "wp-block-navigation-item__description" - }, description)), (isInvalid || isDraft || isLabelFieldFocused) && (0,external_wp_element_namespaceObject.createElement)("div", { + }, description)), (isInvalid || isDraft || isLabelFieldFocused) && (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-navigation-link__placeholder-text wp-block-navigation-link__label" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Tooltip, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Tooltip, { text: tooltipText - }, (0,external_wp_element_namespaceObject.createElement)("span", { + }, (0,external_React_namespaceObject.createElement)("span", { "aria-label": (0,external_wp_i18n_namespaceObject.__)('Navigation link text') }, // Some attributes are stored in an escaped form. It's a legacy issue. @@ -34305,16 +36384,23 @@ function NavigationLinkEdit({ // Unescape is used here to "recover" the escaped characters // so they display without encoding. // See `updateAttributes` for more details. - `${(0,external_wp_htmlEntities_namespaceObject.decodeEntities)(label)} ${isInvalid || isDraft ? placeholderText : ''}`.trim())))), isLinkOpen && (0,external_wp_element_namespaceObject.createElement)(LinkUI, { + `${(0,external_wp_htmlEntities_namespaceObject.decodeEntities)(label)} ${isInvalid || isDraft ? placeholderText : ''}`.trim())))), isLinkOpen && (0,external_React_namespaceObject.createElement)(LinkUI, { clientId: clientId, link: attributes, - onClose: () => setIsLinkOpen(false), + onClose: () => { + // If there is no link then remove the auto-inserted block. + // This avoids empty blocks which can provided a poor UX. + if (!url) { + // Need to handle refocusing the Nav block or the inserter? + onReplace([]); + } + }, anchor: popoverAnchor, onRemove: removeLink, onChange: updatedValue => { updateAttributes(updatedValue, setAttributes, attributes); } - })), (0,external_wp_element_namespaceObject.createElement)("div", { + })), (0,external_React_namespaceObject.createElement)("div", { ...innerBlocksProps }))); } @@ -34326,7 +36412,7 @@ function NavigationLinkEdit({ */ function navigation_link_save_save() { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/page.js @@ -34335,13 +36421,15 @@ function navigation_link_save_save() { * WordPress dependencies */ -const page = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const page = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { - d: "M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z" +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { + d: "M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z" +}), (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { + d: "M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z" })); -/* harmony default export */ var library_page = (page); +/* harmony default export */ const library_page = (page); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/tag.js @@ -34349,13 +36437,13 @@ const page = (0,external_wp_element_namespaceObject.createElement)(external_wp_p * WordPress dependencies */ -const tag = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const tag = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { - d: "M20.1 11.2l-6.7-6.7c-.1-.1-.3-.2-.5-.2H5c-.4-.1-.8.3-.8.7v7.8c0 .2.1.4.2.5l6.7 6.7c.2.2.5.4.7.5s.6.2.9.2c.3 0 .6-.1.9-.2.3-.1.5-.3.8-.5l5.6-5.6c.4-.4.7-1 .7-1.6.1-.6-.2-1.2-.6-1.6zM19 13.4L13.4 19c-.1.1-.2.1-.3.2-.2.1-.4.1-.6 0-.1 0-.2-.1-.3-.2l-6.5-6.5V5.8h6.8l6.5 6.5c.2.2.2.4.2.6 0 .1 0 .3-.2.5zM9 8c-.6 0-1 .4-1 1s.4 1 1 1 1-.4 1-1-.4-1-1-1z" +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { + d: "M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" })); -/* harmony default export */ var library_tag = (tag); +/* harmony default export */ const library_tag = (tag); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/custom-post-type.js @@ -34363,13 +36451,13 @@ const tag = (0,external_wp_element_namespaceObject.createElement)(external_wp_pr * WordPress dependencies */ -const customPostType = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const customPostType = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4zm.8-4l.7.7 2-2V12h1V9.2l2 2 .7-.7-2-2H12v-1H9.2l2-2-.7-.7-2 2V4h-1v2.8l-2-2-.7.7 2 2H4v1h2.8l-2 2z" })); -/* harmony default export */ var custom_post_type = (customPostType); +/* harmony default export */ const custom_post_type = (customPostType); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation-link/hooks.js /** @@ -34532,7 +36620,7 @@ const navigation_link_transforms_transforms = { } }] }; -/* harmony default export */ var navigation_link_transforms = (navigation_link_transforms_transforms); +/* harmony default export */ const navigation_link_transforms = (navigation_link_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation-link/index.js @@ -34555,6 +36643,7 @@ const navigation_link_metadata = { title: "Custom Link", category: "design", parent: ["core/navigation"], + allowedBlocks: ["core/navigation-link", "core/navigation-submenu", "core/page-list"], description: "Add a page, link, or another item to your navigation.", textdomain: "default", attributes: { @@ -34607,6 +36696,10 @@ const navigation_link_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + renaming: false, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-navigation-link-editor", @@ -34679,7 +36772,7 @@ const navigation_link_settings = { }; }, save() { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); } }], transforms: navigation_link_transforms @@ -34699,15 +36792,15 @@ const navigation_link_init = () => { * WordPress dependencies */ -const removeSubmenu = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const removeSubmenu = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "m13.955 20.748 8-17.5-.91-.416L19.597 6H13.5v1.5h5.411l-1.6 3.5H13.5v1.5h3.126l-1.6 3.5H13.5l.028 1.5h.812l-1.295 2.832.91.416ZM17.675 16l-.686 1.5h4.539L21.5 16h-3.825Zm2.286-5-.686 1.5H21.5V11h-1.54ZM2 12c0 3.58 2.42 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.48 0-4.5-1.52-4.5-4S5.52 7.5 8 7.5h3.5V6H8c-3.58 0-6 2.42-6 6Z" })); -/* harmony default export */ var remove_submenu = (removeSubmenu); +/* harmony default export */ const remove_submenu = (removeSubmenu); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation-submenu/icons.js @@ -34715,13 +36808,13 @@ const removeSubmenu = (0,external_wp_element_namespaceObject.createElement)(exte * WordPress dependencies */ -const ItemSubmenuIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +const ItemSubmenuIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 12 12", fill: "none" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M1.50002 4L6.00002 8L10.5 4", strokeWidth: "1.5" })); @@ -34757,8 +36850,8 @@ const ItemSubmenuIcon = () => (0,external_wp_element_namespaceObject.createEleme -const navigation_submenu_edit_ALLOWED_BLOCKS = ['core/navigation-link', 'core/navigation-submenu', 'core/page-list']; -const edit_DEFAULT_BLOCK = { +const ALLOWED_BLOCKS = ['core/navigation-link', 'core/navigation-submenu', 'core/page-list']; +const navigation_submenu_edit_DEFAULT_BLOCK = { name: 'core/navigation-link' }; @@ -34969,6 +37062,7 @@ function NavigationSubmenuEdit({ } = getColors(context, parentCount > 0); function onKeyDown(event) { if (external_wp_keycodes_namespaceObject.isKeyboardEvent.primary(event, 'k')) { + event.preventDefault(); setIsLinkOpen(true); } } @@ -34994,11 +37088,11 @@ function NavigationSubmenuEdit({ // Always use overlay colors for submenus. const innerBlocksColors = getColors(context, true); - const allowedBlocks = parentCount >= maxNestingLevel ? navigation_submenu_edit_ALLOWED_BLOCKS.filter(blockName => blockName !== 'core/navigation-submenu') : navigation_submenu_edit_ALLOWED_BLOCKS; + const allowedBlocks = parentCount >= maxNestingLevel ? ALLOWED_BLOCKS.filter(blockName => blockName !== 'core/navigation-submenu') : ALLOWED_BLOCKS; const navigationChildBlockProps = getNavigationChildBlockProps(innerBlocksColors); const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(navigationChildBlockProps, { allowedBlocks, - defaultBlock: edit_DEFAULT_BLOCK, + defaultBlock: navigation_submenu_edit_DEFAULT_BLOCK, directInsert: true, // Ensure block toolbar is not too far removed from item // being edited. @@ -35023,22 +37117,22 @@ function NavigationSubmenuEdit({ } }, [hasChildren, prevHasChildren]); const canConvertToLink = !selectedBlockHasChildren || onlyDescendantIsEmptyLink; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, !openSubmenusOnClick && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, !openSubmenusOnClick && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { name: "link", icon: library_link, title: (0,external_wp_i18n_namespaceObject.__)('Link'), shortcut: external_wp_keycodes_namespaceObject.displayShortcut.primary('k'), onClick: () => setIsLinkOpen(true) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { name: "revert", icon: remove_submenu, title: (0,external_wp_i18n_namespaceObject.__)('Convert to Link'), onClick: transformToLink, className: "wp-block-navigation__submenu__revert", isDisabled: !canConvertToLink - }))), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + }))), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, value: label || '', onChange: labelValue => { @@ -35048,7 +37142,7 @@ function NavigationSubmenuEdit({ }, label: (0,external_wp_i18n_namespaceObject.__)('Label'), autoComplete: "off" - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, value: url || '', onChange: urlValue => { @@ -35058,7 +37152,7 @@ function NavigationSubmenuEdit({ }, label: (0,external_wp_i18n_namespaceObject.__)('URL'), autoComplete: "off" - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextareaControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextareaControl, { __nextHasNoMarginBottom: true, value: description || '', onChange: descriptionValue => { @@ -35068,7 +37162,7 @@ function NavigationSubmenuEdit({ }, label: (0,external_wp_i18n_namespaceObject.__)('Description'), help: (0,external_wp_i18n_namespaceObject.__)('The description will be displayed in the menu if the current theme supports it.') - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, value: title || '', onChange: titleValue => { @@ -35079,7 +37173,7 @@ function NavigationSubmenuEdit({ label: (0,external_wp_i18n_namespaceObject.__)('Title attribute'), autoComplete: "off", help: (0,external_wp_i18n_namespaceObject.__)('Additional information to help clarify the purpose of the link.') - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, value: rel || '', onChange: relValue => { @@ -35090,11 +37184,11 @@ function NavigationSubmenuEdit({ label: (0,external_wp_i18n_namespaceObject.__)('Rel attribute'), autoComplete: "off", help: (0,external_wp_i18n_namespaceObject.__)('The relationship of the linked URL as space-separated link types.') - }))), (0,external_wp_element_namespaceObject.createElement)("div", { + }))), (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(ParentElement, { + }, (0,external_React_namespaceObject.createElement)(ParentElement, { className: "wp-block-navigation-item__content" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { ref: ref, identifier: "label", className: "wp-block-navigation-item__label", @@ -35113,7 +37207,7 @@ function NavigationSubmenuEdit({ setIsLinkOpen(true); } } - }), !openSubmenusOnClick && isLinkOpen && (0,external_wp_element_namespaceObject.createElement)(LinkUI, { + }), !openSubmenusOnClick && isLinkOpen && (0,external_React_namespaceObject.createElement)(LinkUI, { clientId: clientId, link: attributes, onClose: () => setIsLinkOpen(false), @@ -35128,9 +37222,9 @@ function NavigationSubmenuEdit({ onChange: updatedValue => { updateAttributes(updatedValue, setAttributes, attributes); } - })), (showSubmenuIcon || openSubmenusOnClick) && (0,external_wp_element_namespaceObject.createElement)("span", { + })), (showSubmenuIcon || openSubmenusOnClick) && (0,external_React_namespaceObject.createElement)("span", { className: "wp-block-navigation__submenu-icon" - }, (0,external_wp_element_namespaceObject.createElement)(ItemSubmenuIcon, null)), (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)(ItemSubmenuIcon, null)), (0,external_React_namespaceObject.createElement)("div", { ...innerBlocksProps }))); } @@ -35142,7 +37236,7 @@ function NavigationSubmenuEdit({ */ function navigation_submenu_save_save() { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation-submenu/transforms.js @@ -35193,7 +37287,7 @@ const navigation_submenu_transforms_transforms = { } }] }; -/* harmony default export */ var navigation_submenu_transforms = (navigation_submenu_transforms_transforms); +/* harmony default export */ const navigation_submenu_transforms = (navigation_submenu_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation-submenu/index.js /** @@ -35250,7 +37344,10 @@ const navigation_submenu_metadata = { usesContext: ["textColor", "customTextColor", "backgroundColor", "customBackgroundColor", "overlayTextColor", "customOverlayTextColor", "overlayBackgroundColor", "customOverlayBackgroundColor", "fontSize", "customFontSize", "showSubmenuIcon", "maxNestingLevel", "openSubmenusOnClick", "style"], supports: { reusable: false, - html: false + html: false, + interactivity: { + clientNavigation: true + } }, editorStyle: "wp-block-navigation-submenu-editor", style: "wp-block-navigation-submenu" @@ -35271,9 +37368,21 @@ const navigation_submenu_settings = { } return add_submenu; }, - __experimentalLabel: ({ - label - }) => label, + __experimentalLabel(attributes, { + context + }) { + const { + label + } = attributes; + const customName = attributes?.metadata?.name; + + // In the list view, use the block's menu label as the label. + // If the menu label is empty, fall back to the default label. + if (context === 'list-view' && (customName || label)) { + return attributes?.metadata?.name || label; + } + return label; + }, edit: NavigationSubmenuEdit, save: navigation_submenu_save_save, transforms: navigation_submenu_transforms @@ -35290,13 +37399,13 @@ const navigation_submenu_init = () => initBlock({ * WordPress dependencies */ -const pageBreak = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const pageBreak = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M17.5 9V6a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v3H8V6a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v3h1.5Zm0 6.5V18a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2v-2.5H8V18a.5.5 0 0 0 .5.5h7a.5.5 0 0 0 .5-.5v-2.5h1.5ZM4 13h16v-1.5H4V13Z" })); -/* harmony default export */ var page_break = (pageBreak); +/* harmony default export */ const page_break = (pageBreak); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/nextpage/edit.js @@ -35306,9 +37415,9 @@ const pageBreak = (0,external_wp_element_namespaceObject.createElement)(external function NextPageEdit() { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)() - }, (0,external_wp_element_namespaceObject.createElement)("span", null, (0,external_wp_i18n_namespaceObject.__)('Page break'))); + }, (0,external_React_namespaceObject.createElement)("span", null, (0,external_wp_i18n_namespaceObject.__)('Page break'))); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/nextpage/save.js @@ -35318,7 +37427,7 @@ function NextPageEdit() { */ function nextpage_save_save() { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, null, '<!--nextpage-->'); + return (0,external_React_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, null, '<!--nextpage-->'); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/nextpage/transforms.js @@ -35340,7 +37449,7 @@ const nextpage_transforms_transforms = { } }] }; -/* harmony default export */ var nextpage_transforms = (nextpage_transforms_transforms); +/* harmony default export */ const nextpage_transforms = (nextpage_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/nextpage/index.js /** @@ -35366,7 +37475,10 @@ const nextpage_metadata = { supports: { customClassName: false, className: false, - html: false + html: false, + interactivity: { + clientNavigation: true + } }, editorStyle: "wp-block-nextpage-editor" }; @@ -35389,6 +37501,146 @@ const nextpage_init = () => initBlock({ settings: nextpage_settings }); +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/pattern/recursion-detector.js +/** + * THIS MODULE IS INTENTIONALLY KEPT WITHIN THE PATTERN BLOCK'S SOURCE. + * + * This is because this approach for preventing infinite loops due to + * recursively rendering blocks is specific to the way that the `core/pattern` + * block behaves in the editor. Any other block types that deal with recursion + * SHOULD USE THE STANDARD METHOD for avoiding loops: + * + * @see https://github.com/WordPress/gutenberg/pull/31455 + * @see packages/block-editor/src/components/recursion-provider/README.md + */ + +/** + * WordPress dependencies + */ + + +/** + * Naming is hard. + * + * @see useParsePatternDependencies + * + * @type {WeakMap<Object, Function>} + */ +const cachedParsers = new WeakMap(); + +/** + * Hook used by PatternEdit to parse block patterns. It returns a function that + * takes a pattern and returns nothing but throws an error if the pattern is + * recursive. + * + * @example + * ```js + * const parsePatternDependencies = useParsePatternDependencies(); + * parsePatternDependencies( selectedPattern ); + * ``` + * + * @see parsePatternDependencies + * + * @return {Function} A function to parse block patterns. + */ +function useParsePatternDependencies() { + const registry = (0,external_wp_data_namespaceObject.useRegistry)(); + + // Instead of caching maps, go straight to the point and cache bound + // functions. Each of those functions is bound to a different Map that will + // keep track of patterns in the context of the given registry. + if (!cachedParsers.has(registry)) { + const deps = new Map(); + cachedParsers.set(registry, parsePatternDependencies.bind(null, deps)); + } + return cachedParsers.get(registry); +} + +/** + * Parse a given pattern and traverse its contents to detect any subsequent + * patterns on which it may depend. Such occurrences will be added to an + * internal dependency graph. If a circular dependency is detected, an + * error will be thrown. + * + * EXPORTED FOR TESTING PURPOSES ONLY. + * + * @param {Map<string, Set<string>>} deps Map of pattern dependencies. + * @param {Object} pattern Pattern. + * @param {string} pattern.name Pattern name. + * @param {Array} pattern.blocks Pattern's block list. + * + * @throws {Error} If a circular dependency is detected. + */ +function parsePatternDependencies(deps, { + name, + blocks +}) { + const queue = [...blocks]; + while (queue.length) { + const block = queue.shift(); + for (const innerBlock of (_block$innerBlocks = block.innerBlocks) !== null && _block$innerBlocks !== void 0 ? _block$innerBlocks : []) { + var _block$innerBlocks; + queue.unshift(innerBlock); + } + if (block.name === 'core/pattern') { + registerDependency(deps, name, block.attributes.slug); + } + } +} + +/** + * Declare that pattern `a` depends on pattern `b`. If a circular + * dependency is detected, an error will be thrown. + * + * EXPORTED FOR TESTING PURPOSES ONLY. + * + * @param {Map<string, Set<string>>} deps Map of pattern dependencies. + * @param {string} a Slug for pattern A. + * @param {string} b Slug for pattern B. + * + * @throws {Error} If a circular dependency is detected. + */ +function registerDependency(deps, a, b) { + if (!deps.has(a)) { + deps.set(a, new Set()); + } + deps.get(a).add(b); + if (hasCycle(deps, a)) { + throw new TypeError(`Pattern ${a} has a circular dependency and cannot be rendered.`); + } +} + +/** + * Determine if a given pattern has circular dependencies on other patterns. + * This will be determined by running a depth-first search on the current state + * of the graph represented by `patternDependencies`. + * + * @param {Map<string, Set<string>>} deps Map of pattern dependencies. + * @param {string} slug Pattern slug. + * @param {Set<string>} [visitedNodes] Set to track visited nodes in the graph. + * @param {Set<string>} [currentPath] Set to track and backtrack graph paths. + * @return {boolean} Whether any cycle was found. + */ +function hasCycle(deps, slug, visitedNodes = new Set(), currentPath = new Set()) { + var _deps$get; + visitedNodes.add(slug); + currentPath.add(slug); + const dependencies = (_deps$get = deps.get(slug)) !== null && _deps$get !== void 0 ? _deps$get : new Set(); + for (const dependency of dependencies) { + if (!visitedNodes.has(dependency)) { + if (hasCycle(deps, dependency, visitedNodes, currentPath)) { + return true; + } + } else if (currentPath.has(dependency)) { + return true; + } + } + + // Remove the current node from the current path when backtracking + currentPath.delete(slug); + return false; +} + ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/pattern/edit.js /** @@ -35399,23 +37651,29 @@ const nextpage_init = () => initBlock({ + + +/** + * Internal dependencies + */ + const PatternEdit = ({ attributes, clientId }) => { const selectedPattern = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).__experimentalGetParsedPattern(attributes.slug), [attributes.slug]); - const currentThemeStylesheet = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).getCurrentTheme()?.stylesheet); + const currentThemeStylesheet = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).getCurrentTheme()?.stylesheet, []); const { replaceBlocks, + setBlockEditingMode, __unstableMarkNextChangeAsNotPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); const { - setBlockEditingMode - } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); - const { getBlockRootClientId, getBlockEditingMode } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store); + const [hasRecursionError, setHasRecursionError] = (0,external_wp_element_namespaceObject.useState)(false); + const parsePatternDependencies = useParsePatternDependencies(); // Duplicated in packages/edit-site/src/components/start-template-options/index.js. function injectThemeAttributeInBlockTemplateContent(block) { @@ -35438,7 +37696,14 @@ const PatternEdit = ({ // This change won't be saved. // It will continue to pull from the pattern file unless changes are made to its respective template part. (0,external_wp_element_namespaceObject.useEffect)(() => { - if (selectedPattern?.blocks) { + if (!hasRecursionError && selectedPattern?.blocks) { + try { + parsePatternDependencies(selectedPattern); + } catch (error) { + setHasRecursionError(true); + return; + } + // We batch updates to block list settings to avoid triggering cascading renders // for each container block included in a tree and optimize initial render. // Since the above uses microtasks, we need to use a microtask here as well, @@ -35461,13 +37726,20 @@ const PatternEdit = ({ setBlockEditingMode(rootClientId, rootEditingMode); }); } - }, [clientId, selectedPattern?.blocks, __unstableMarkNextChangeAsNotPersistent, replaceBlocks, getBlockEditingMode, setBlockEditingMode, getBlockRootClientId]); + }, [clientId, hasRecursionError, selectedPattern, __unstableMarkNextChangeAsNotPersistent, replaceBlocks, getBlockEditingMode, setBlockEditingMode, getBlockRootClientId]); const props = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); - return (0,external_wp_element_namespaceObject.createElement)("div", { + if (hasRecursionError) { + return (0,external_React_namespaceObject.createElement)("div", { + ...props + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.sprintf)( + // translators: A warning in which %s is the name of a pattern. + (0,external_wp_i18n_namespaceObject.__)('Pattern "%s" cannot be rendered inside itself.'), selectedPattern?.name))); + } + return (0,external_React_namespaceObject.createElement)("div", { ...props }); }; -/* harmony default export */ var pattern_edit = (PatternEdit); +/* harmony default export */ const pattern_edit = (PatternEdit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/pattern/index.js /** @@ -35483,7 +37755,11 @@ const pattern_metadata = { description: "Show a block pattern.", supports: { html: false, - inserter: false + inserter: false, + renaming: false, + interactivity: { + clientNavigation: true + } }, textdomain: "default", attributes: { @@ -35512,13 +37788,17 @@ const pattern_init = () => initBlock({ * WordPress dependencies */ -const pages = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const pages = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { - d: "M7 13.8h6v-1.5H7v1.5zM18 16V4c0-1.1-.9-2-2-2H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2zM5.5 16V4c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zM7 10.5h8V9H7v1.5zm0-3.3h8V5.8H7v1.4zM20.2 6v13c0 .7-.6 1.2-1.2 1.2H8v1.5h11c1.5 0 2.7-1.2 2.7-2.8V6h-1.5z" +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { + d: "M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z" +}), (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { + d: "M16 2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2ZM6 3.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5Z" +}), (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { + d: "M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z" })); -/* harmony default export */ var library_pages = (pages); +/* harmony default export */ const library_pages = (pages); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/page-list/use-convert-to-navigation-links.js /** @@ -35655,31 +37935,31 @@ function useConvertToNavigationLinks({ */ -const convertDescription = (0,external_wp_i18n_namespaceObject.__)('This page list is synced with the published pages on your site. Detach the page list to add, delete, or reorder pages yourself.'); +const convertDescription = (0,external_wp_i18n_namespaceObject.__)("This navigation menu displays your website's pages. Editing it will enable you to add, delete, or reorder pages. However, new pages will no longer be added automatically."); function ConvertToLinksModal({ onClick, onClose, disabled }) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, { onRequestClose: onClose, title: (0,external_wp_i18n_namespaceObject.__)('Edit Page List'), className: 'wp-block-page-list-modal', aria: { describedby: 'wp-block-page-list-modal__description' } - }, (0,external_wp_element_namespaceObject.createElement)("p", { + }, (0,external_React_namespaceObject.createElement)("p", { id: 'wp-block-page-list-modal__description' - }, convertDescription), (0,external_wp_element_namespaceObject.createElement)("div", { + }, convertDescription), (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-page-list-modal-buttons" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { variant: "tertiary", onClick: onClose - }, (0,external_wp_i18n_namespaceObject.__)('Cancel')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, (0,external_wp_i18n_namespaceObject.__)('Cancel')), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { variant: "primary", disabled: disabled, onClick: onClick - }, (0,external_wp_i18n_namespaceObject.__)('Detach')))); + }, (0,external_wp_i18n_namespaceObject.__)('Edit')))); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/page-list/edit.js @@ -35719,26 +37999,26 @@ function BlockContent({ parentPageID }) { if (!hasResolvedPages) { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-page-list__loading-indicator-container" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, { className: "wp-block-page-list__loading-indicator" }))); } if (pages === null) { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Notice, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Notice, { status: 'warning', isDismissible: false }, (0,external_wp_i18n_namespaceObject.__)('Page List: Cannot retrieve Pages.'))); } if (pages.length === 0) { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Notice, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Notice, { status: 'info', isDismissible: false }, (0,external_wp_i18n_namespaceObject.__)('Page List: Cannot retrieve Pages.'))); @@ -35746,21 +38026,21 @@ function BlockContent({ if (blockList.length === 0) { const parentPageDetails = pages.find(page => page.id === parentPageID); if (parentPageDetails?.title?.rendered) { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.sprintf)( + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: Page title. (0,external_wp_i18n_namespaceObject.__)('Page List: "%s" page has no children.'), parentPageDetails.title.rendered))); } - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Notice, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Notice, { status: 'warning', isDismissible: false }, (0,external_wp_i18n_namespaceObject.__)('Page List: Cannot retrieve Pages.'))); } if (pages.length > 0) { - return (0,external_wp_element_namespaceObject.createElement)("ul", { + return (0,external_React_namespaceObject.createElement)("ul", { ...innerBlocksProps }); } @@ -35898,7 +38178,6 @@ function PageListEdit({ parentPageID }); const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, { - allowedBlocks: ['core/page-list-item'], renderAppender: false, __unstableDisableDropZone: true, templateLock: isChildOfNavigation ? false : 'all', @@ -35920,7 +38199,7 @@ function PageListEdit({ isNested }); }, [isNested, setAttributes]); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, pagesTree.length > 0 && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ComboboxControl, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, pagesTree.length > 0 && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ComboboxControl, { __next40pxDefaultSize: true, className: "editor-page-attributes__parent", label: (0,external_wp_i18n_namespaceObject.__)('Parent'), @@ -35930,22 +38209,22 @@ function PageListEdit({ parentPageID: value !== null && value !== void 0 ? value : 0 }), help: (0,external_wp_i18n_namespaceObject.__)('Choose a page to show only its subpages.') - })), allowConvertToLinks && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + })), allowConvertToLinks && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Edit this menu') - }, (0,external_wp_element_namespaceObject.createElement)("p", null, convertDescription), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, (0,external_React_namespaceObject.createElement)("p", null, convertDescription), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { variant: "primary", disabled: !hasResolvedPages, onClick: convertToNavigationLinks - }, (0,external_wp_i18n_namespaceObject.__)('Edit')))), allowConvertToLinks && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + }, (0,external_wp_i18n_namespaceObject.__)('Edit')))), allowConvertToLinks && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { title: (0,external_wp_i18n_namespaceObject.__)('Edit'), onClick: openModal - }, (0,external_wp_i18n_namespaceObject.__)('Edit'))), isOpen && (0,external_wp_element_namespaceObject.createElement)(ConvertToLinksModal, { + }, (0,external_wp_i18n_namespaceObject.__)('Edit'))), isOpen && (0,external_React_namespaceObject.createElement)(ConvertToLinksModal, { onClick: convertToNavigationLinks, onClose: closeModal, disabled: !hasResolvedPages - })), (0,external_wp_element_namespaceObject.createElement)(BlockContent, { + })), (0,external_React_namespaceObject.createElement)(BlockContent, { blockProps: blockProps, innerBlocksProps: innerBlocksProps, hasResolvedPages: hasResolvedPages, @@ -35971,6 +38250,7 @@ const page_list_metadata = { name: "core/page-list", title: "Page List", category: "widgets", + allowedBlocks: ["core/page-list-item"], description: "Display a list of all pages.", keywords: ["menu", "navigation"], textdomain: "default", @@ -36000,6 +38280,9 @@ const page_list_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-page-list-editor", @@ -36027,13 +38310,13 @@ const page_list_init = () => initBlock({ * WordPress dependencies */ -const icons_ItemSubmenuIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +const icons_ItemSubmenuIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 12 12", fill: "none" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M1.50002 4L6.00002 8L10.5 4", strokeWidth: "1.5" })); @@ -36086,7 +38369,7 @@ function PageListItemEdit({ className: 'wp-block-pages-list__item' }); const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps); - return (0,external_wp_element_namespaceObject.createElement)("li", { + return (0,external_React_namespaceObject.createElement)("li", { key: id, className: classnames_default()('wp-block-pages-list__item', { 'has-child': hasChildren, @@ -36095,20 +38378,22 @@ function PageListItemEdit({ 'open-on-hover-click': !context.openSubmenusOnClick && context.showSubmenuIcon, 'menu-item-home': id === frontPageId }) - }, hasChildren && context.openSubmenusOnClick ? (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("button", { + }, hasChildren && context.openSubmenusOnClick ? (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("button", { + type: "button", className: "wp-block-navigation-item__content wp-block-navigation-submenu__toggle", "aria-expanded": "false" - }, (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(label)), (0,external_wp_element_namespaceObject.createElement)("span", { + }, (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(label)), (0,external_React_namespaceObject.createElement)("span", { className: "wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon" - }, (0,external_wp_element_namespaceObject.createElement)(icons_ItemSubmenuIcon, null))) : (0,external_wp_element_namespaceObject.createElement)("a", { + }, (0,external_React_namespaceObject.createElement)(icons_ItemSubmenuIcon, null))) : (0,external_React_namespaceObject.createElement)("a", { className: classnames_default()('wp-block-pages-list__item__link', { 'wp-block-navigation-item__content': isNavigationChild }), href: link - }, (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title)), hasChildren && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, !context.openSubmenusOnClick && context.showSubmenuIcon && (0,external_wp_element_namespaceObject.createElement)("button", { + }, (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title)), hasChildren && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, !context.openSubmenusOnClick && context.showSubmenuIcon && (0,external_React_namespaceObject.createElement)("button", { className: "wp-block-navigation-item__content wp-block-navigation-submenu__toggle wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon", - "aria-expanded": "false" - }, (0,external_wp_element_namespaceObject.createElement)(icons_ItemSubmenuIcon, null)), (0,external_wp_element_namespaceObject.createElement)("ul", { + "aria-expanded": "false", + type: "button" + }, (0,external_React_namespaceObject.createElement)(icons_ItemSubmenuIcon, null)), (0,external_React_namespaceObject.createElement)("ul", { ...innerBlocksProps }))); } @@ -36156,7 +38441,10 @@ const page_list_item_metadata = { html: false, lock: false, inserter: false, - __experimentalToolbar: false + __experimentalToolbar: false, + interactivity: { + clientNavigation: true + } }, editorStyle: "wp-block-page-list-editor", style: "wp-block-page-list" @@ -36186,13 +38474,13 @@ const page_list_item_init = () => initBlock({ * WordPress dependencies */ -const paragraph = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const paragraph = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z" })); -/* harmony default export */ var library_paragraph = (paragraph); +/* harmony default export */ const library_paragraph = (paragraph); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/deprecated.js @@ -36307,12 +38595,12 @@ const paragraph_deprecated_deprecated = [ 'has-drop-cap': align === ((0,external_wp_i18n_namespaceObject.isRTL)() ? 'left' : 'right') || align === 'center' ? false : dropCap, [`has-text-align-${align}`]: align }); - return (0,external_wp_element_namespaceObject.createElement)("p", { + return (0,external_React_namespaceObject.createElement)("p", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, dir: direction }) - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content })); } @@ -36363,7 +38651,7 @@ const paragraph_deprecated_deprecated = [ color: textClass ? undefined : customTextColor, fontSize: fontSizeClass ? undefined : customFontSize }; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "p", style: styles, className: className ? className : undefined, @@ -36418,7 +38706,7 @@ const paragraph_deprecated_deprecated = [ fontSize: fontSizeClass ? undefined : customFontSize, textAlign: align }; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "p", style: styles, className: className ? className : undefined, @@ -36476,7 +38764,7 @@ const paragraph_deprecated_deprecated = [ fontSize: fontSizeClass ? undefined : customFontSize, textAlign: align }; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "p", style: styles, className: className ? className : undefined, @@ -36514,7 +38802,7 @@ const paragraph_deprecated_deprecated = [ fontSize, textAlign: align }; - return (0,external_wp_element_namespaceObject.createElement)("p", { + return (0,external_React_namespaceObject.createElement)("p", { style: styles, className: className ? className : undefined }, content); @@ -36540,13 +38828,13 @@ const paragraph_deprecated_deprecated = [ save({ attributes }) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, null, attributes.content); + return (0,external_React_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, null, attributes.content); }, migrate(attributes) { return attributes; } }]; -/* harmony default export */ var paragraph_deprecated = (paragraph_deprecated_deprecated); +/* harmony default export */ const paragraph_deprecated = (paragraph_deprecated_deprecated); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-ltr.js @@ -36554,13 +38842,13 @@ const paragraph_deprecated_deprecated = [ * WordPress dependencies */ -const formatLtr = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const formatLtr = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M5.52 2h7.43c.55 0 1 .45 1 1s-.45 1-1 1h-1v13c0 .55-.45 1-1 1s-1-.45-1-1V5c0-.55-.45-1-1-1s-1 .45-1 1v12c0 .55-.45 1-1 1s-1-.45-1-1v-5.96h-.43C3.02 11.04 1 9.02 1 6.52S3.02 2 5.52 2zM14 14l5-4-5-4v8z" })); -/* harmony default export */ var format_ltr = (formatLtr); +/* harmony default export */ const format_ltr = (formatLtr); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/use-enter.js /** @@ -36677,7 +38965,7 @@ function ParagraphRTLControl({ direction, setDirection }) { - return (0,external_wp_i18n_namespaceObject.isRTL)() && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + return (0,external_wp_i18n_namespaceObject.isRTL)() && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { icon: format_ltr, title: (0,external_wp_i18n_namespaceObject._x)('Left to right', 'editor button'), isActive: direction === 'ltr', @@ -36689,6 +38977,52 @@ function ParagraphRTLControl({ function hasDropCapDisabled(align) { return align === ((0,external_wp_i18n_namespaceObject.isRTL)() ? 'left' : 'right') || align === 'center'; } +function DropCapControl({ + clientId, + attributes, + setAttributes +}) { + // Please do not add a useSelect call to the paragraph block unconditionally. + // Every useSelect added to a (frequently used) block will degrade load + // and type performance. By moving it within InspectorControls, the subscription is + // now only added for the selected block(s). + const [isDropCapFeatureEnabled] = (0,external_wp_blockEditor_namespaceObject.useSettings)('typography.dropCap'); + if (!isDropCapFeatureEnabled) { + return null; + } + const { + align, + dropCap + } = attributes; + let helpText; + if (hasDropCapDisabled(align)) { + helpText = (0,external_wp_i18n_namespaceObject.__)('Not available for aligned text.'); + } else if (dropCap) { + helpText = (0,external_wp_i18n_namespaceObject.__)('Showing large initial letter.'); + } else { + helpText = (0,external_wp_i18n_namespaceObject.__)('Toggle to show a large initial letter.'); + } + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { + hasValue: () => !!dropCap, + label: (0,external_wp_i18n_namespaceObject.__)('Drop cap'), + onDeselect: () => setAttributes({ + dropCap: undefined + }), + resetAllFilter: () => ({ + dropCap: undefined + }), + panelId: clientId + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + __nextHasNoMarginBottom: true, + label: (0,external_wp_i18n_namespaceObject.__)('Drop cap'), + checked: !!dropCap, + onChange: () => setAttributes({ + dropCap: !dropCap + }), + help: helpText, + disabled: hasDropCapDisabled(align) ? true : false + })); +} function ParagraphBlock({ attributes, mergeBlocks, @@ -36704,7 +39038,6 @@ function ParagraphBlock({ dropCap, placeholder } = attributes; - const isDropCapFeatureEnabled = (0,external_wp_blockEditor_namespaceObject.useSetting)('typography.dropCap'); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ ref: useOnEnter({ clientId, @@ -36718,49 +39051,27 @@ function ParagraphBlock({ direction } }); - let helpText; - if (hasDropCapDisabled(align)) { - helpText = (0,external_wp_i18n_namespaceObject.__)('Not available for aligned text.'); - } else if (dropCap) { - helpText = (0,external_wp_i18n_namespaceObject.__)('Showing large initial letter.'); - } else { - helpText = (0,external_wp_i18n_namespaceObject.__)('Toggle to show a large initial letter.'); - } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)(); + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, blockEditingMode === 'default' && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { value: align, onChange: newAlign => setAttributes({ align: newAlign, dropCap: hasDropCapDisabled(newAlign) ? false : dropCap }) - }), (0,external_wp_element_namespaceObject.createElement)(ParagraphRTLControl, { + }), (0,external_React_namespaceObject.createElement)(ParagraphRTLControl, { direction: direction, setDirection: newDirection => setAttributes({ direction: newDirection }) - })), isDropCapFeatureEnabled && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "typography" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { - hasValue: () => !!dropCap, - label: (0,external_wp_i18n_namespaceObject.__)('Drop cap'), - onDeselect: () => setAttributes({ - dropCap: undefined - }), - resetAllFilter: () => ({ - dropCap: undefined - }), - panelId: clientId - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { - __nextHasNoMarginBottom: true, - label: (0,external_wp_i18n_namespaceObject.__)('Drop cap'), - checked: !!dropCap, - onChange: () => setAttributes({ - dropCap: !dropCap - }), - help: helpText, - disabled: hasDropCapDisabled(align) ? true : false - }))), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + }, (0,external_React_namespaceObject.createElement)(DropCapControl, { + clientId: clientId, + attributes: attributes, + setAttributes: setAttributes + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { identifier: "content", tagName: "p", ...blockProps, @@ -36785,15 +39096,15 @@ function ParagraphBlock({ onMerge: mergeBlocks, onReplace: onReplace, onRemove: onRemove, - "aria-label": content ? (0,external_wp_i18n_namespaceObject.__)('Block: Paragraph') : (0,external_wp_i18n_namespaceObject.__)('Empty block; start writing or type forward slash to choose a block'), - "data-empty": content ? false : true, + "aria-label": external_wp_blockEditor_namespaceObject.RichText.isEmpty(content) ? (0,external_wp_i18n_namespaceObject.__)('Empty block; start writing or type forward slash to choose a block') : (0,external_wp_i18n_namespaceObject.__)('Block: Paragraph'), + "data-empty": external_wp_blockEditor_namespaceObject.RichText.isEmpty(content), placeholder: placeholder || (0,external_wp_i18n_namespaceObject.__)('Type / to choose a block'), "data-custom-placeholder": placeholder ? true : undefined, __unstableEmbedURLOnPaste: true, __unstableAllowPrefixTransformations: true })); } -/* harmony default export */ var paragraph_edit = (ParagraphBlock); +/* harmony default export */ const paragraph_edit = (ParagraphBlock); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/save.js @@ -36820,12 +39131,12 @@ function paragraph_save_save({ 'has-drop-cap': align === ((0,external_wp_i18n_namespaceObject.isRTL)() ? 'left' : 'right') || align === 'center' ? false : dropCap, [`has-text-align-${align}`]: align }); - return (0,external_wp_element_namespaceObject.createElement)("p", { + return (0,external_React_namespaceObject.createElement)("p", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, dir: direction }) - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content })); } @@ -36856,10 +39167,9 @@ const { type: "string" }, content: { - type: "string", - source: "html", + type: "rich-text", + source: "rich-text", selector: "p", - "default": "", __experimentalRole: "content" }, dropCap: { @@ -36885,7 +39195,6 @@ const { text: true } }, - __experimentalConnections: true, spacing: { margin: true, padding: true, @@ -36909,7 +39218,10 @@ const { } }, __experimentalSelector: "p", - __unstablePasteTextInline: true + __unstablePasteTextInline: true, + interactivity: { + clientNavigation: true + } }, editorStyle: "wp-block-paragraph-editor", style: "wp-block-paragraph" @@ -36941,7 +39253,7 @@ const paragraph_transforms_transforms = { } }] }; -/* harmony default export */ var paragraph_transforms = (paragraph_transforms_transforms); +/* harmony default export */ const paragraph_transforms = (paragraph_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/index.js /** @@ -36971,10 +39283,9 @@ const paragraph_metadata = { type: "string" }, content: { - type: "string", - source: "html", + type: "rich-text", + source: "rich-text", selector: "p", - "default": "", __experimentalRole: "content" }, dropCap: { @@ -37000,7 +39311,6 @@ const paragraph_metadata = { text: true } }, - __experimentalConnections: true, spacing: { margin: true, padding: true, @@ -37024,7 +39334,10 @@ const paragraph_metadata = { } }, __experimentalSelector: "p", - __unstablePasteTextInline: true + __unstablePasteTextInline: true, + interactivity: { + clientNavigation: true + } }, editorStyle: "wp-block-paragraph-editor", style: "wp-block-paragraph" @@ -37045,7 +39358,14 @@ const paragraph_settings = { __experimentalLabel(attributes, { context }) { + const customName = attributes?.metadata?.name; + if (context === 'list-view' && customName) { + return customName; + } if (context === 'accessibility') { + if (customName) { + return customName; + } const { content } = attributes; @@ -37074,15 +39394,15 @@ const paragraph_init = () => initBlock({ * WordPress dependencies */ -const postAuthor = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const postAuthor = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M10 4.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm2.25 7.5v-1A2.75 2.75 0 0011 8.25H7A2.75 2.75 0 004.25 11v1h1.5v-1c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v1h1.5zM4 20h9v-1.5H4V20zm16-4H4v-1.5h16V16z", fillRule: "evenodd", clipRule: "evenodd" })); -/* harmony default export */ var post_author = (postAuthor); +/* harmony default export */ const post_author = (postAuthor); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-author/edit.js @@ -37174,29 +39494,29 @@ function PostAuthorEdit({ }; const showCombobox = authorOptions.length >= minimumUsersForCombobox; const showAuthorControl = !!postId && !isDescendentOfQueryLoop && authorOptions.length > 0; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, showAuthorControl && (showCombobox && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ComboboxControl, { + }, showAuthorControl && (showCombobox && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ComboboxControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Author'), options: authorOptions, value: authorId, onChange: handleSelect, allowReset: false - }) || (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { + }) || (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Author'), value: authorId, options: authorOptions, onChange: handleSelect - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + })), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Show avatar'), checked: showAvatar, onChange: () => setAttributes({ showAvatar: !showAvatar }) - }), showAvatar && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { + }), showAvatar && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Avatar size'), value: attributes.avatarSize, @@ -37206,68 +39526,67 @@ function PostAuthorEdit({ avatarSize: Number(size) }); } - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Show bio'), checked: showBio, onChange: () => setAttributes({ showBio: !showBio }) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Link author name to author page'), checked: isLink, onChange: () => setAttributes({ isLink: !isLink }) - }), isLink && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), isLink && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Open in new tab'), onChange: value => setAttributes({ linkTarget: value ? '_blank' : '_self' }), checked: linkTarget === '_blank' - }))), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + }))), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: nextAlign => { setAttributes({ textAlign: nextAlign }); } - })), (0,external_wp_element_namespaceObject.createElement)("div", { + })), (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, showAvatar && authorDetails?.avatar_urls && (0,external_wp_element_namespaceObject.createElement)("div", { + }, showAvatar && authorDetails?.avatar_urls && (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-post-author__avatar" - }, (0,external_wp_element_namespaceObject.createElement)("img", { + }, (0,external_React_namespaceObject.createElement)("img", { width: attributes.avatarSize, src: authorDetails.avatar_urls[attributes.avatarSize], alt: authorDetails.name - })), (0,external_wp_element_namespaceObject.createElement)("div", { + })), (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-post-author__content" - }, (!external_wp_blockEditor_namespaceObject.RichText.isEmpty(byline) || isSelected) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + }, (!external_wp_blockEditor_namespaceObject.RichText.isEmpty(byline) || isSelected) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { className: "wp-block-post-author__byline", - multiline: false, "aria-label": (0,external_wp_i18n_namespaceObject.__)('Post author byline text'), placeholder: (0,external_wp_i18n_namespaceObject.__)('Write byline…'), value: byline, onChange: value => setAttributes({ byline: value }) - }), (0,external_wp_element_namespaceObject.createElement)("p", { + }), (0,external_React_namespaceObject.createElement)("p", { className: "wp-block-post-author__name" - }, isLink ? (0,external_wp_element_namespaceObject.createElement)("a", { + }, isLink ? (0,external_React_namespaceObject.createElement)("a", { href: "#post-author-pseudo-link", onClick: event => event.preventDefault() - }, authorName) : authorName), showBio && (0,external_wp_element_namespaceObject.createElement)("p", { + }, authorName) : authorName), showBio && (0,external_React_namespaceObject.createElement)("p", { className: "wp-block-post-author__bio", dangerouslySetInnerHTML: { __html: authorDetails?.description } })))); } -/* harmony default export */ var post_author_edit = (PostAuthorEdit); +/* harmony default export */ const post_author_edit = (PostAuthorEdit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-author/index.js /** @@ -37342,6 +39661,9 @@ const post_author_metadata = { background: true, text: true } + }, + interactivity: { + clientNavigation: true } }, style: "wp-block-post-author" @@ -37406,41 +39728,41 @@ function PostAuthorNameEdit({ }) }); const displayName = authorName?.name || (0,external_wp_i18n_namespaceObject.__)('Author Name'); - const displayAuthor = isLink ? (0,external_wp_element_namespaceObject.createElement)("a", { + const displayAuthor = isLink ? (0,external_React_namespaceObject.createElement)("a", { href: "#author-pseudo-link", onClick: event => event.preventDefault(), className: "wp-block-post-author-name__link" }, displayName) : displayName; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: nextAlign => { setAttributes({ textAlign: nextAlign }); } - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Link to author archive'), onChange: () => setAttributes({ isLink: !isLink }), checked: isLink - }), isLink && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), isLink && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Open in new tab'), onChange: value => setAttributes({ linkTarget: value ? '_blank' : '_self' }), checked: linkTarget === '_blank' - }))), (0,external_wp_element_namespaceObject.createElement)("div", { + }))), (0,external_React_namespaceObject.createElement)("div", { ...blockProps }, " ", displayAuthor, " ")); } -/* harmony default export */ var post_author_name_edit = (PostAuthorNameEdit); +/* harmony default export */ const post_author_name_edit = (PostAuthorNameEdit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-author-name/transforms.js /** @@ -37467,7 +39789,7 @@ const post_author_name_transforms_transforms = { }) }] }; -/* harmony default export */ var post_author_name_transforms = (post_author_name_transforms_transforms); +/* harmony default export */ const post_author_name_transforms = (post_author_name_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-author-name/index.js /** @@ -37528,6 +39850,9 @@ const post_author_name_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } } }; @@ -37590,23 +39915,23 @@ function PostAuthorBiographyEdit({ }) }); const displayAuthorBiography = authorDetails?.description || (0,external_wp_i18n_namespaceObject.__)('Author Biography'); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: nextAlign => { setAttributes({ textAlign: nextAlign }); } - })), (0,external_wp_element_namespaceObject.createElement)("div", { + })), (0,external_React_namespaceObject.createElement)("div", { ...blockProps, dangerouslySetInnerHTML: { __html: displayAuthorBiography } })); } -/* harmony default export */ var post_author_biography_edit = (PostAuthorBiographyEdit); +/* harmony default export */ const post_author_biography_edit = (PostAuthorBiographyEdit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-author-biography/index.js /** @@ -37657,6 +39982,9 @@ const post_author_biography_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } } }; @@ -37681,13 +40009,13 @@ const post_author_biography_init = () => initBlock({ * WordPress dependencies */ -const blockDefault = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const blockDefault = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z" })); -/* harmony default export */ var block_default = (blockDefault); +/* harmony default export */ const block_default = (blockDefault); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-comment/edit.js @@ -37699,7 +40027,6 @@ const blockDefault = (0,external_wp_element_namespaceObject.createElement)(exter -const post_comment_edit_ALLOWED_BLOCKS = ['core/avatar', 'core/comment-author-name', 'core/comment-content', 'core/comment-date', 'core/comment-edit-link', 'core/comment-reply-link']; const post_comment_edit_TEMPLATE = [['core/avatar'], ['core/comment-author-name'], ['core/comment-date'], ['core/comment-content'], ['core/comment-reply-link'], ['core/comment-edit-link']]; function post_comment_edit_Edit({ attributes: { @@ -37710,21 +40037,20 @@ function post_comment_edit_Edit({ const [commentIdInput, setCommentIdInput] = (0,external_wp_element_namespaceObject.useState)(commentId); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, { - template: post_comment_edit_TEMPLATE, - allowedBlocks: post_comment_edit_ALLOWED_BLOCKS + template: post_comment_edit_TEMPLATE }); if (!commentId) { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { icon: block_default, label: (0,external_wp_i18n_namespaceObject._x)('Post Comment', 'block title'), instructions: (0,external_wp_i18n_namespaceObject.__)('To show a comment, input the comment ID.') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, value: commentId, onChange: val => setCommentIdInput(parseInt(val)) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { variant: "primary", onClick: () => { setAttributes({ @@ -37733,7 +40059,7 @@ function post_comment_edit_Edit({ } }, (0,external_wp_i18n_namespaceObject.__)('Save')))); } - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...innerBlocksProps }); } @@ -37747,7 +40073,7 @@ function post_comment_edit_Edit({ function post_comment_save_save() { const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save(); const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...innerBlocksProps }); } @@ -37769,6 +40095,7 @@ const post_comment_metadata = { name: "core/post-comment", title: "Comment (deprecated)", category: "theme", + allowedBlocks: ["core/avatar", "core/comment-author-name", "core/comment-content", "core/comment-date", "core/comment-edit-link", "core/comment-reply-link"], description: "This block is deprecated. Please use the Comments block instead.", textdomain: "default", attributes: { @@ -37781,7 +40108,10 @@ const post_comment_metadata = { }, supports: { html: false, - inserter: false + inserter: false, + interactivity: { + clientNavigation: true + } } }; @@ -37807,13 +40137,13 @@ const post_comment_init = () => initBlock({ * WordPress dependencies */ -const postCommentsCount = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const postCommentsCount = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1V13c0-.6-.4-1-1-1zm-2.2 6.6H7l1.6-2.2c.3-.4.5-.7.6-.9.1-.2.2-.4.2-.5 0-.2-.1-.3-.1-.4-.1-.1-.2-.1-.4-.1s-.4 0-.6.1c-.3.1-.5.3-.7.4l-.2.2-.2-1.2.1-.1c.3-.2.5-.3.8-.4.3-.1.6-.1.9-.1.3 0 .6.1.9.2.2.1.4.3.6.5.1.2.2.5.2.7 0 .3-.1.6-.2.9-.1.3-.4.7-.7 1.1l-.5.6h1.6v1.2z" })); -/* harmony default export */ var post_comments_count = (postCommentsCount); +/* harmony default export */ const post_comments_count = (postCommentsCount); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-comments-count/edit.js @@ -37869,19 +40199,19 @@ function PostCommentsCountEdit({ ...blockProps.style, textDecoration: hasPostAndComments ? blockProps.style?.textDecoration : undefined }; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: nextAlign => { setAttributes({ textAlign: nextAlign }); } - })), (0,external_wp_element_namespaceObject.createElement)("div", { + })), (0,external_React_namespaceObject.createElement)("div", { ...blockProps, style: blockStyles - }, hasPostAndComments ? commentsCount : (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Post Comments Count block: post not found.')))); + }, hasPostAndComments ? commentsCount : (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Post Comments Count block: post not found.')))); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-comments-count/index.js @@ -37934,6 +40264,9 @@ const post_comments_count_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } } }; @@ -37958,13 +40291,13 @@ const post_comments_count_init = () => initBlock({ * WordPress dependencies */ -const postCommentsForm = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const postCommentsForm = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1V13c0-.6-.4-1-1-1zm-.5 6.6H6.7l-1.2 1.2v-6.3h7v5.1z" })); -/* harmony default export */ var post_comments_form = (postCommentsForm); +/* harmony default export */ const post_comments_form = (postCommentsForm); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-comments-form/edit.js @@ -38005,21 +40338,21 @@ function PostCommentsFormEdit({ }), 'aria-describedby': instanceIdDesc }); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: nextAlign => { setAttributes({ textAlign: nextAlign }); } - })), (0,external_wp_element_namespaceObject.createElement)("div", { + })), (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(post_comments_form_form, { + }, (0,external_React_namespaceObject.createElement)(post_comments_form_form, { postId: postId, postType: postType - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, { id: instanceIdDesc }, (0,external_wp_i18n_namespaceObject.__)('Comments form disabled in editor.')))); } @@ -38162,23 +40495,23 @@ function PostCommentsLinkEdit({ (0,external_wp_i18n_namespaceObject._n)('%s comment', '%s comments', commentsNumber), commentsNumber.toLocaleString()); } } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: nextAlign => { setAttributes({ textAlign: nextAlign }); } - })), (0,external_wp_element_namespaceObject.createElement)("div", { + })), (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, link && commentsText !== undefined ? (0,external_wp_element_namespaceObject.createElement)("a", { + }, link && commentsText !== undefined ? (0,external_React_namespaceObject.createElement)("a", { href: link + '#comments', onClick: event => event.preventDefault() - }, commentsText) : (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Post Comments Link block: post not found.')))); + }, commentsText) : (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Post Comments Link block: post not found.')))); } -/* harmony default export */ var post_comments_link_edit = (PostCommentsLinkEdit); +/* harmony default export */ const post_comments_link_edit = (PostCommentsLinkEdit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-comments-link/index.js /** @@ -38231,6 +40564,9 @@ const post_comments_link_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } } }; @@ -38255,13 +40591,13 @@ const post_comments_link_init = () => initBlock({ * WordPress dependencies */ -const postContent = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const postContent = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z" })); -/* harmony default export */ var post_content = (postContent); +/* harmony default export */ const post_content = (postContent); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/utils/hooks.js /** @@ -38280,7 +40616,7 @@ const postContent = (0,external_wp_element_namespaceObject.createElement)(extern function useCanEditEntity(kind, name, recordId) { return (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).canUserEditEntityRecord(kind, name, recordId), [kind, name, recordId]); } -/* harmony default export */ var hooks = ({ +/* harmony default export */ const hooks = ({ useCanEditEntity }); @@ -38307,9 +40643,9 @@ function ReadOnlyContent({ const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: layoutClassNames }); - return content?.protected && !userCanEdit ? (0,external_wp_element_namespaceObject.createElement)("div", { + return content?.protected && !userCanEdit ? (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('This content is password protected.'))) : (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('This content is password protected.'))) : (0,external_React_namespaceObject.createElement)("div", { ...blockProps, dangerouslySetInnerHTML: { __html: content?.rendered @@ -38339,7 +40675,7 @@ function EditableContent({ onChange, template: !hasInnerBlocks ? initialInnerBlocks : undefined }); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...props }); } @@ -38358,9 +40694,9 @@ function Content(props) { } const isDescendentOfQueryLoop = Number.isFinite(queryId); const isEditable = userCanEdit && !isDescendentOfQueryLoop; - return isEditable ? (0,external_wp_element_namespaceObject.createElement)(EditableContent, { + return isEditable ? (0,external_React_namespaceObject.createElement)(EditableContent, { ...props - }) : (0,external_wp_element_namespaceObject.createElement)(ReadOnlyContent, { + }) : (0,external_React_namespaceObject.createElement)(ReadOnlyContent, { layoutClassNames: layoutClassNames, userCanEdit: userCanEdit, postType: postType, @@ -38373,15 +40709,15 @@ function edit_Placeholder({ const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: layoutClassNames }); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('This is the Content block, it will display all the blocks in any single post or page.')), (0,external_wp_element_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('That might be a simple arrangement like consecutive paragraphs in a blog post, or a more elaborate composition that includes image galleries, videos, tables, columns, and any other block types.')), (0,external_wp_element_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('If there are any Custom Post Types registered at your site, the Content block can display the contents of those entries as well.'))); + }, (0,external_React_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('This is the Content block, it will display all the blocks in any single post or page.')), (0,external_React_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('That might be a simple arrangement like consecutive paragraphs in a blog post, or a more elaborate composition that includes image galleries, videos, tables, columns, and any other block types.')), (0,external_React_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('If there are any Custom Post Types registered at your site, the Content block can display the contents of those entries as well.'))); } function RecursionError() { const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Block cannot be rendered inside itself.'))); + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Block cannot be rendered inside itself.'))); } function PostContentEdit({ context, @@ -38391,16 +40727,16 @@ function PostContentEdit({ postId: contextPostId, postType: contextPostType } = context; - const hasAlreadyRendered = (0,external_wp_blockEditor_namespaceObject.__experimentalUseHasRecursion)(contextPostId); + const hasAlreadyRendered = (0,external_wp_blockEditor_namespaceObject.useHasRecursion)(contextPostId); if (contextPostId && contextPostType && hasAlreadyRendered) { - return (0,external_wp_element_namespaceObject.createElement)(RecursionError, null); + return (0,external_React_namespaceObject.createElement)(RecursionError, null); } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalRecursionProvider, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RecursionProvider, { uniqueId: contextPostId - }, contextPostId && contextPostType ? (0,external_wp_element_namespaceObject.createElement)(Content, { + }, contextPostId && contextPostType ? (0,external_React_namespaceObject.createElement)(Content, { context: context, layoutClassNames: layoutClassNames - }) : (0,external_wp_element_namespaceObject.createElement)(edit_Placeholder, { + }) : (0,external_React_namespaceObject.createElement)(edit_Placeholder, { layoutClassNames: layoutClassNames })); } @@ -38527,30 +40863,30 @@ function PostDateEdit({ const [date, setDate] = (0,external_wp_coreData_namespaceObject.useEntityProp)('postType', postTypeSlug, displayType, postId); const postType = (0,external_wp_data_namespaceObject.useSelect)(select => postTypeSlug ? select(external_wp_coreData_namespaceObject.store).getPostType(postTypeSlug) : null, [postTypeSlug]); const dateLabel = displayType === 'date' ? (0,external_wp_i18n_namespaceObject.__)('Post Date') : (0,external_wp_i18n_namespaceObject.__)('Post Modified Date'); - let postDate = date ? (0,external_wp_element_namespaceObject.createElement)("time", { + let postDate = date ? (0,external_React_namespaceObject.createElement)("time", { dateTime: (0,external_wp_date_namespaceObject.dateI18n)('c', date), ref: setPopoverAnchor }, (0,external_wp_date_namespaceObject.dateI18n)(format || siteFormat, date)) : dateLabel; if (isLink && date) { - postDate = (0,external_wp_element_namespaceObject.createElement)("a", { + postDate = (0,external_React_namespaceObject.createElement)("a", { href: "#post-date-pseudo-link", onClick: event => event.preventDefault() }, postDate); } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: nextAlign => { setAttributes({ textAlign: nextAlign }); } - }), date && !isDescendentOfQueryLoop && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Dropdown, { + }), date && displayType === 'date' && !isDescendentOfQueryLoop && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Dropdown, { popoverProps: popoverProps, renderContent: ({ onClose - }) => (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalPublishDateTimePicker, { + }) => (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalPublishDateTimePicker, { currentDate: date, onChange: setDate, is12Hour: is12HourFormat(siteTimeFormat), @@ -38566,7 +40902,7 @@ function PostDateEdit({ onToggle(); } }; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { "aria-expanded": isOpen, icon: library_edit, title: (0,external_wp_i18n_namespaceObject.__)('Change Date'), @@ -38574,15 +40910,15 @@ function PostDateEdit({ onKeyDown: openOnArrowDown }); } - }))), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + }))), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalDateFormatPicker, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalDateFormatPicker, { format: format, defaultFormat: siteFormat, onChange: nextFormat => setAttributes({ format: nextFormat }) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: postType?.labels.singular_name ? (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: Name of the post type e.g: "post". @@ -38591,7 +40927,7 @@ function PostDateEdit({ isLink: !isLink }), checked: isLink - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Display last modified date'), onChange: value => setAttributes({ @@ -38599,7 +40935,7 @@ function PostDateEdit({ }), checked: displayType === 'modified', help: (0,external_wp_i18n_namespaceObject.__)('Only shows if the post has been modified') - }))), (0,external_wp_element_namespaceObject.createElement)("div", { + }))), (0,external_React_namespaceObject.createElement)("div", { ...blockProps }, postDate)); } @@ -38665,7 +41001,7 @@ const post_date_deprecated_v1 = { * * See block-deprecation.md */ -/* harmony default export */ var post_date_deprecated = ([post_date_deprecated_v1]); +/* harmony default export */ const post_date_deprecated = ([post_date_deprecated_v1]); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-date/variations.js /** @@ -38684,7 +41020,7 @@ const post_date_variations_variations = [{ isActive: blockAttributes => blockAttributes.displayType === 'modified', icon: post_date }]; -/* harmony default export */ var post_date_variations = (post_date_variations_variations); +/* harmony default export */ const post_date_variations = (post_date_variations_variations); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-date/index.js /** @@ -38748,6 +41084,9 @@ const post_date_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } } }; @@ -38776,13 +41115,13 @@ const post_date_init = () => initBlock({ * WordPress dependencies */ -const postExcerpt = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const postExcerpt = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { - d: "M12.75 9.333c0 .521-.102.977-.327 1.354-.23.386-.555.628-.893.774-.545.234-1.183.227-1.544.222l-.12-.001v-1.5h.123c.414.001.715.002.948-.099a.395.395 0 00.199-.166c.05-.083.114-.253.114-.584V7.2H8.8V4h3.95v5.333zM7.95 9.333c0 .521-.102.977-.327 1.354-.23.386-.555.628-.893.774-.545.234-1.183.227-1.544.222l-.12-.001v-1.5h.123c.414.001.715.002.948-.099a.394.394 0 00.198-.166c.05-.083.115-.253.115-.584V7.2H4V4h3.95v5.333zM13 20H4v-1.5h9V20zM20 16H4v-1.5h16V16z" +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { + d: "M8.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H4v-3h4.001ZM4 20h9v-1.5H4V20Zm16-4H4v-1.5h16V16ZM13.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H9v-3h4.001Z" })); -/* harmony default export */ var post_excerpt = (postExcerpt); +/* harmony default export */ const post_excerpt = (postExcerpt); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-excerpt/edit.js @@ -38875,21 +41214,21 @@ function PostExcerptEditor({ return document.body.textContent || document.body.innerText || ''; }, [renderedExcerpt]); if (!postType || !postId) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentToolbar, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentToolbar, { value: textAlign, onChange: newAlign => setAttributes({ textAlign: newAlign }) - })), (0,external_wp_element_namespaceObject.createElement)("div", { + })), (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('This block will display the excerpt.')))); + }, (0,external_React_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('This block will display the excerpt.')))); } if (isProtected && !userCanEdit) { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('The content is currently protected and does not have the available excerpt.'))); + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('The content is currently protected and does not have the available excerpt.'))); } - const readMoreLink = (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + const readMoreLink = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { className: "wp-block-post-excerpt__more-link", tagName: "a", "aria-label": (0,external_wp_i18n_namespaceObject.__)('“Read more” link text'), @@ -38928,30 +41267,30 @@ function PostExcerptEditor({ trimmedExcerpt = rawOrRenderedExcerpt.split('', excerptLength).join(''); } const isTrimmed = trimmedExcerpt !== rawOrRenderedExcerpt; - const excerptContent = isEditable ? (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + const excerptContent = isEditable ? (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { className: excerptClassName, "aria-label": (0,external_wp_i18n_namespaceObject.__)('Excerpt text'), value: isSelected ? rawOrRenderedExcerpt : (!isTrimmed ? rawOrRenderedExcerpt : trimmedExcerpt + ELLIPSIS) || (0,external_wp_i18n_namespaceObject.__)('No excerpt found'), onChange: setExcerpt, tagName: "p" - }) : (0,external_wp_element_namespaceObject.createElement)("p", { + }) : (0,external_React_namespaceObject.createElement)("p", { className: excerptClassName }, !isTrimmed ? rawOrRenderedExcerpt || (0,external_wp_i18n_namespaceObject.__)('No excerpt found') : trimmedExcerpt + ELLIPSIS); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentToolbar, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentToolbar, { value: textAlign, onChange: newAlign => setAttributes({ textAlign: newAlign }) - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Show link on new line'), checked: showMoreOnNewLine, onChange: newShowMoreOnNewLine => setAttributes({ showMoreOnNewLine: newShowMoreOnNewLine }) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { label: (0,external_wp_i18n_namespaceObject.__)('Max number of words'), value: excerptLength, onChange: value => { @@ -38961,9 +41300,9 @@ function PostExcerptEditor({ }, min: "10", max: "100" - }))), (0,external_wp_element_namespaceObject.createElement)("div", { + }))), (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, excerptContent, !showMoreOnNewLine && ' ', showMoreOnNewLine ? (0,external_wp_element_namespaceObject.createElement)("p", { + }, excerptContent, !showMoreOnNewLine && ' ', showMoreOnNewLine ? (0,external_React_namespaceObject.createElement)("p", { className: "wp-block-post-excerpt__more-text" }, readMoreLink) : readMoreLink)); } @@ -38985,7 +41324,7 @@ const post_excerpt_transforms_transforms = { transform: () => (0,external_wp_blocks_namespaceObject.createBlock)('core/post-content') }] }; -/* harmony default export */ var post_excerpt_transforms = (post_excerpt_transforms_transforms); +/* harmony default export */ const post_excerpt_transforms = (post_excerpt_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-excerpt/index.js /** @@ -39049,6 +41388,9 @@ const post_excerpt_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-post-excerpt-editor", @@ -39077,13 +41419,13 @@ const post_excerpt_init = () => initBlock({ * WordPress dependencies */ -const postFeaturedImage = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const postFeaturedImage = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z" })); -/* harmony default export */ var post_featured_image = (postFeaturedImage); +/* harmony default export */ const post_featured_image = (postFeaturedImage); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-featured-image/dimension-controls.js @@ -39093,13 +41435,13 @@ const postFeaturedImage = (0,external_wp_element_namespaceObject.createElement)( -const SCALE_OPTIONS = (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { +const SCALE_OPTIONS = (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "cover", label: (0,external_wp_i18n_namespaceObject._x)('Cover', 'Scale option for Image dimension control') -}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { +}), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "contain", label: (0,external_wp_i18n_namespaceObject._x)('Contain', 'Scale option for Image dimension control') -}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { +}), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "fill", label: (0,external_wp_i18n_namespaceObject._x)('Fill', 'Scale option for Image dimension control') })); @@ -39122,9 +41464,9 @@ const DimensionControls = ({ setAttributes, imageSizeOptions = [] }) => { - const defaultUnits = ['px', '%', 'vw', 'em', 'rem']; + const [availableUnits] = (0,external_wp_blockEditor_namespaceObject.useSettings)('spacing.units'); const units = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({ - availableUnits: (0,external_wp_blockEditor_namespaceObject.useSetting)('spacing.units') || defaultUnits + availableUnits: availableUnits || ['px', '%', 'vw', 'em', 'rem'] }); const onDimensionChange = (dimension, nextValue) => { const parsedValue = parseFloat(nextValue); @@ -39140,9 +41482,9 @@ const DimensionControls = ({ }; const scaleLabel = (0,external_wp_i18n_namespaceObject._x)('Scale', 'Image scaling options'); const showScaleControl = height || aspectRatio && aspectRatio !== 'auto'; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "dimensions" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => !!aspectRatio, label: (0,external_wp_i18n_namespaceObject.__)('Aspect ratio'), onDeselect: () => setAttributes({ @@ -39153,7 +41495,7 @@ const DimensionControls = ({ }), isShownByDefault: true, panelId: clientId - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Aspect ratio'), value: aspectRatio, @@ -39187,7 +41529,7 @@ const DimensionControls = ({ onChange: nextAspectRatio => setAttributes({ aspectRatio: nextAspectRatio }) - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { + })), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { className: "single-column", hasValue: () => !!height, label: (0,external_wp_i18n_namespaceObject.__)('Height'), @@ -39199,14 +41541,14 @@ const DimensionControls = ({ }), isShownByDefault: true, panelId: clientId - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalUnitControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalUnitControl, { label: (0,external_wp_i18n_namespaceObject.__)('Height'), labelPosition: "top", value: height || '', min: 0, onChange: nextHeight => onDimensionChange('height', nextHeight), units: units - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { + })), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { className: "single-column", hasValue: () => !!width, label: (0,external_wp_i18n_namespaceObject.__)('Width'), @@ -39218,14 +41560,14 @@ const DimensionControls = ({ }), isShownByDefault: true, panelId: clientId - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalUnitControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalUnitControl, { label: (0,external_wp_i18n_namespaceObject.__)('Width'), labelPosition: "top", value: width || '', min: 0, onChange: nextWidth => onDimensionChange('width', nextWidth), units: units - })), showScaleControl && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { + })), showScaleControl && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => !!scale && scale !== DEFAULT_SCALE, label: scaleLabel, onDeselect: () => setAttributes({ @@ -39236,7 +41578,7 @@ const DimensionControls = ({ }), isShownByDefault: true, panelId: clientId - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControl, { __nextHasNoMarginBottom: true, label: scaleLabel, value: scale, @@ -39245,7 +41587,7 @@ const DimensionControls = ({ scale: value }), isBlock: true - }, SCALE_OPTIONS)), !!imageSizeOptions.length && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { + }, SCALE_OPTIONS)), !!imageSizeOptions.length && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => !!sizeSlug, label: (0,external_wp_i18n_namespaceObject.__)('Resolution'), onDeselect: () => setAttributes({ @@ -39256,7 +41598,7 @@ const DimensionControls = ({ }), isShownByDefault: false, panelId: clientId - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Resolution'), value: sizeSlug || DEFAULT_SIZE, @@ -39267,7 +41609,7 @@ const DimensionControls = ({ help: (0,external_wp_i18n_namespaceObject.__)('Select the size of the source image.') }))); }; -/* harmony default export */ var dimension_controls = (DimensionControls); +/* harmony default export */ const dimension_controls = (DimensionControls); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-featured-image/utils.js /** @@ -39325,7 +41667,7 @@ const Overlay = ({ if (!colorGradientSettings.hasColorsOrGradients) { return null; } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, !!dimRatio && (0,external_wp_element_namespaceObject.createElement)("span", { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, !!dimRatio && (0,external_React_namespaceObject.createElement)("span", { "aria-hidden": "true", className: classnames_default()('wp-block-post-featured-image__overlay', utils_dimRatioToClass(dimRatio), { [overlayColor.class]: overlayColor.class, @@ -39334,9 +41676,9 @@ const Overlay = ({ [gradientClass]: gradientClass }, borderProps.className), style: overlayStyles - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { + }), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "color" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown, { __experimentalIsRenderedInSidebar: true, settings: [{ colorValue: overlayColor.color, @@ -39354,7 +41696,7 @@ const Overlay = ({ }], panelId: clientId, ...colorGradientSettings - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => dimRatio !== undefined, label: (0,external_wp_i18n_namespaceObject.__)('Overlay opacity'), onDeselect: () => setAttributes({ @@ -39365,7 +41707,7 @@ const Overlay = ({ }), isShownByDefault: true, panelId: clientId - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Overlay opacity'), value: dimRatio, @@ -39379,7 +41721,7 @@ const Overlay = ({ __next40pxDefaultSize: true })))); }; -/* harmony default export */ var overlay = ((0,external_wp_compose_namespaceObject.compose)([(0,external_wp_blockEditor_namespaceObject.withColors)({ +/* harmony default export */ const overlay = ((0,external_wp_compose_namespaceObject.compose)([(0,external_wp_blockEditor_namespaceObject.withColors)({ overlayColor: 'background-color' })])(Overlay)); @@ -39401,6 +41743,7 @@ const Overlay = ({ + /** * Internal dependencies */ @@ -39410,6 +41753,10 @@ const post_featured_image_edit_ALLOWED_MEDIA_TYPES = ['image']; function getMediaSourceUrlBySizeSlug(media, slug) { return media?.media_details?.sizes?.[slug]?.source_url || media?.source_url; } +const disabledClickProps = { + onClick: event => event.preventDefault(), + 'aria-disabled': true +}; function PostFeaturedImageEdit({ clientId, attributes, @@ -39429,24 +41776,43 @@ function PostFeaturedImageEdit({ scale, sizeSlug, rel, - linkTarget + linkTarget, + useFirstImageFromPost } = attributes; - const [featuredImage, setFeaturedImage] = (0,external_wp_coreData_namespaceObject.useEntityProp)('postType', postTypeSlug, 'featured_media', postId); + const [storedFeaturedImage, setFeaturedImage] = (0,external_wp_coreData_namespaceObject.useEntityProp)('postType', postTypeSlug, 'featured_media', postId); + + // Fallback to post content if no featured image is set. + // This is needed for the "Use first image from post" option. + const [postContent] = (0,external_wp_coreData_namespaceObject.useEntityProp)('postType', postTypeSlug, 'content', postId); + const featuredImage = (0,external_wp_element_namespaceObject.useMemo)(() => { + if (storedFeaturedImage) { + return storedFeaturedImage; + } + if (!useFirstImageFromPost) { + return; + } + const imageOpener = /<!--\s+wp:(?:core\/)?image\s+(?<attrs>{(?:(?:[^}]+|}+(?=})|(?!}\s+\/?-->).)*)?}\s+)?-->/.exec(postContent); + const imageId = imageOpener?.groups?.attrs && JSON.parse(imageOpener.groups.attrs)?.id; + return imageId; + }, [storedFeaturedImage, useFirstImageFromPost, postContent]); const { media, - postType + postType, + postPermalink } = (0,external_wp_data_namespaceObject.useSelect)(select => { const { getMedia, - getPostType + getPostType, + getEditedEntityRecord } = select(external_wp_coreData_namespaceObject.store); return { media: featuredImage && getMedia(featuredImage, { context: 'view' }), - postType: postTypeSlug && getPostType(postTypeSlug) + postType: postTypeSlug && getPostType(postTypeSlug), + postPermalink: getEditedEntityRecord('postType', postTypeSlug, postId)?.link }; - }, [featuredImage, postTypeSlug]); + }, [featuredImage, postTypeSlug, postId]); const mediaUrl = getMediaSourceUrlBySizeSlug(media, sizeSlug); const imageSizes = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).getSettings().imageSizes, []); const imageSizeOptions = imageSizes.filter(({ @@ -39468,8 +41834,9 @@ function PostFeaturedImageEdit({ } }); const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes); + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)(); const placeholder = content => { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { className: classnames_default()('block-editor-media-placeholder', borderProps.className), withIllustration: true, style: { @@ -39492,14 +41859,18 @@ function PostFeaturedImageEdit({ type: 'snackbar' }); }; - const controls = (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(dimension_controls, { + const controls = blockEditingMode === 'default' && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(overlay, { + attributes: attributes, + setAttributes: setAttributes, + clientId: clientId + }), (0,external_React_namespaceObject.createElement)(dimension_controls, { clientId: clientId, attributes: attributes, setAttributes: setAttributes, imageSizeOptions: imageSizeOptions - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + }), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: postType?.labels.singular_name ? (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: Name of the post type e.g: "Page". @@ -39508,14 +41879,14 @@ function PostFeaturedImageEdit({ isLink: !isLink }), checked: isLink - }), isLink && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), isLink && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Open in new tab'), onChange: value => setAttributes({ linkTarget: value ? '_blank' : '_self' }), checked: linkTarget === '_blank' - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Link rel'), value: rel, @@ -39535,13 +41906,13 @@ function PostFeaturedImageEdit({ * in a template or template part). */ if (!featuredImage && (isDescendentOfQueryLoop || !postId)) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, controls, (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, controls, (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, placeholder(), (0,external_wp_element_namespaceObject.createElement)(overlay, { - attributes: attributes, - setAttributes: setAttributes, - clientId: clientId - }))); + }, !!isLink ? (0,external_React_namespaceObject.createElement)("a", { + href: postPermalink, + target: linkTarget, + ...disabledClickProps + }, placeholder()) : placeholder())); } const label = (0,external_wp_i18n_namespaceObject.__)('Add a featured image'); const imageStyles = { @@ -39559,7 +41930,7 @@ function PostFeaturedImageEdit({ * Then display the placeholder with the image upload option. */ if (!featuredImage) { - image = (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, { + image = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, { onSelect: onSelectImage, accept: "image/*", allowedTypes: post_featured_image_edit_ALLOWED_MEDIA_TYPES, @@ -39568,7 +41939,7 @@ function PostFeaturedImageEdit({ mediaLibraryButton: ({ open }) => { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { icon: library_upload, variant: "primary", label: label, @@ -39582,7 +41953,7 @@ function PostFeaturedImageEdit({ }); } else { // We have a Featured image so show a Placeholder if is loading. - image = !media ? placeholder() : (0,external_wp_element_namespaceObject.createElement)("img", { + image = !media ? placeholder() : (0,external_React_namespaceObject.createElement)("img", { className: borderProps.className, src: mediaUrl, alt: media.alt_text ? (0,external_wp_i18n_namespaceObject.sprintf)( @@ -39598,24 +41969,24 @@ function PostFeaturedImageEdit({ * - Is not inside a query loop * Then display the image and the image replacement option. */ - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, controls, !!media && !isDescendentOfQueryLoop && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, controls, !!media && !isDescendentOfQueryLoop && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, { mediaId: featuredImage, mediaURL: mediaUrl, allowedTypes: post_featured_image_edit_ALLOWED_MEDIA_TYPES, accept: "image/*", onSelect: onSelectImage, onError: onUploadError - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { onClick: () => setFeaturedImage(0) - }, (0,external_wp_i18n_namespaceObject.__)('Reset')))), (0,external_wp_element_namespaceObject.createElement)("figure", { + }, (0,external_wp_i18n_namespaceObject.__)('Reset')))), (0,external_React_namespaceObject.createElement)("figure", { ...blockProps - }, image, (0,external_wp_element_namespaceObject.createElement)(overlay, { - attributes: attributes, - setAttributes: setAttributes, - clientId: clientId - }))); + }, !!isLink ? (0,external_React_namespaceObject.createElement)("a", { + href: postPermalink, + target: linkTarget, + ...disabledClickProps + }, image) : image)); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-featured-image/index.js @@ -39681,6 +42052,10 @@ const post_featured_image_metadata = { }, customGradient: { type: "string" + }, + useFirstImageFromPost: { + type: "boolean", + "default": false } }, usesContext: ["postId", "postType", "queryId"], @@ -39707,6 +42082,9 @@ const post_featured_image_metadata = { spacing: { margin: true, padding: true + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-post-featured-image-editor", @@ -39740,14 +42118,20 @@ const post_featured_image_init = () => initBlock({ + + function PostNavigationLinkEdit({ + context: { + postType + }, attributes: { type, label, showTitle, textAlign, linkLabel, - arrow + arrow, + taxonomy }, setAttributes }) { @@ -39769,7 +42153,32 @@ function PostNavigationLinkEdit({ [`has-text-align-${textAlign}`]: textAlign }) }); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + const taxonomies = (0,external_wp_data_namespaceObject.useSelect)(select => { + const { + getTaxonomies + } = select(external_wp_coreData_namespaceObject.store); + const filteredTaxonomies = getTaxonomies({ + type: postType, + per_page: -1 + }); + return filteredTaxonomies; + }, [postType]); + const getTaxonomyOptions = () => { + const selectOption = { + label: (0,external_wp_i18n_namespaceObject.__)('Unfiltered'), + value: '' + }; + const taxonomyOptions = (taxonomies !== null && taxonomies !== void 0 ? taxonomies : []).filter(({ + visibility + }) => !!visibility?.publicly_queryable).map(item => { + return { + value: item.slug, + label: item.name + }; + }); + return [selectOption, ...taxonomyOptions]; + }; + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Display the title as a link'), help: (0,external_wp_i18n_namespaceObject.__)('If you have entered a custom label, it will be prepended before the title.'), @@ -39777,14 +42186,14 @@ function PostNavigationLinkEdit({ onChange: () => setAttributes({ showTitle: !showTitle }) - }), showTitle && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), showTitle && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Include the label as part of the link'), checked: !!linkLabel, onChange: () => setAttributes({ linkLabel: !linkLabel }) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Arrow'), value: arrow, @@ -39795,27 +42204,37 @@ function PostNavigationLinkEdit({ }, help: (0,external_wp_i18n_namespaceObject.__)('A decorative arrow for the next and previous link.'), isBlock: true - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "none", label: (0,external_wp_i18n_namespaceObject._x)('None', 'Arrow option for Next/Previous link') - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "arrow", label: (0,external_wp_i18n_namespaceObject._x)('Arrow', 'Arrow option for Next/Previous link') - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "chevron", label: (0,external_wp_i18n_namespaceObject._x)('Chevron', 'Arrow option for Next/Previous link') - })))), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentToolbar, { + })))), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { + group: "advanced" + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { + label: (0,external_wp_i18n_namespaceObject.__)('Filter by taxonomy'), + value: taxonomy, + options: getTaxonomyOptions(), + onChange: value => setAttributes({ + taxonomy: value + }), + help: (0,external_wp_i18n_namespaceObject.__)('Only link to posts that have the same taxonomy terms as the current post. For example the same tags or categories.') + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentToolbar, { value: textAlign, onChange: nextAlign => { setAttributes({ textAlign: nextAlign }); } - })), (0,external_wp_element_namespaceObject.createElement)("div", { + })), (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, !isNext && displayArrow && (0,external_wp_element_namespaceObject.createElement)("span", { + }, !isNext && displayArrow && (0,external_React_namespaceObject.createElement)("span", { className: `wp-block-post-navigation-link__arrow-previous is-arrow-${arrow}` - }, displayArrow), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + }, displayArrow), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { tagName: "a", "aria-label": ariaLabel, placeholder: placeholder, @@ -39824,10 +42243,10 @@ function PostNavigationLinkEdit({ onChange: newLabel => setAttributes({ label: newLabel }) - }), showTitle && (0,external_wp_element_namespaceObject.createElement)("a", { + }), showTitle && (0,external_React_namespaceObject.createElement)("a", { href: "#post-navigation-pseudo-link", onClick: event => event.preventDefault() - }, (0,external_wp_i18n_namespaceObject.__)('An example title')), isNext && displayArrow && (0,external_wp_element_namespaceObject.createElement)("span", { + }, (0,external_wp_i18n_namespaceObject.__)('An example title')), isNext && displayArrow && (0,external_React_namespaceObject.createElement)("span", { className: `wp-block-post-navigation-link__arrow-next is-arrow-${arrow}`, "aria-hidden": true }, displayArrow))); @@ -39839,13 +42258,13 @@ function PostNavigationLinkEdit({ * WordPress dependencies */ -const next = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const next = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z" })); -/* harmony default export */ var library_next = (next); +/* harmony default export */ const library_next = (next); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/previous.js @@ -39853,13 +42272,13 @@ const next = (0,external_wp_element_namespaceObject.createElement)(external_wp_p * WordPress dependencies */ -const previous = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const previous = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z" })); -/* harmony default export */ var library_previous = (previous); +/* harmony default export */ const library_previous = (previous); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-navigation-link/variations.js /** @@ -39897,7 +42316,7 @@ post_navigation_link_variations_variations.forEach(variation => { if (variation.isActive) return; variation.isActive = (blockAttributes, variationAttributes) => blockAttributes.type === variationAttributes.type; }); -/* harmony default export */ var post_navigation_link_variations = (post_navigation_link_variations_variations); +/* harmony default export */ const post_navigation_link_variations = (post_navigation_link_variations_variations); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-navigation-link/index.js /** @@ -39934,8 +42353,13 @@ const post_navigation_link_metadata = { arrow: { type: "string", "default": "none" + }, + taxonomy: { + type: "string", + "default": "" } }, + usesContext: ["postType"], supports: { reusable: false, html: false, @@ -39955,6 +42379,9 @@ const post_navigation_link_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } }, style: "wp-block-post-navigation-link" @@ -40000,7 +42427,7 @@ function PostTemplateInnerBlocks() { template: post_template_edit_TEMPLATE, __unstableDisableLayoutClassNames: true }); - return (0,external_wp_element_namespaceObject.createElement)("li", { + return (0,external_React_namespaceObject.createElement)("li", { ...innerBlocksProps }); } @@ -40022,7 +42449,7 @@ function PostTemplateBlockPreview({ const style = { display: isHidden ? 'none' : undefined }; - return (0,external_wp_element_namespaceObject.createElement)("li", { + return (0,external_React_namespaceObject.createElement)("li", { ...blockPreviewProps, tabIndex: 0 // eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role @@ -40059,9 +42486,6 @@ function PostTemplateEdit({ // REST API or be handled by custom REST filters like `rest_{$this->post_type}_query`. ...restQueryArgs } = {}, - queryContext = [{ - page: 1 - }], templateSlug, previewPostType }, @@ -40074,9 +42498,6 @@ function PostTemplateEdit({ type: layoutType, columnCount = 3 } = layout || {}; - const [{ - page - }] = queryContext; const [activeBlockContextId, setActiveBlockContextId] = (0,external_wp_element_namespaceObject.useState)(); const { posts, @@ -40089,11 +42510,6 @@ function PostTemplateEdit({ const { getBlocks } = select(external_wp_blockEditor_namespaceObject.store); - const taxonomies = getTaxonomies({ - type: postType, - per_page: -1, - context: 'view' - }); const templateCategory = inherit && templateSlug?.startsWith('category-') && getEntityRecords('taxonomy', 'category', { context: 'view', per_page: 1, @@ -40101,12 +42517,17 @@ function PostTemplateEdit({ slug: templateSlug.replace('category-', '') }); const query = { - offset: perPage ? perPage * (page - 1) + offset : 0, + offset: offset || 0, order, orderby: orderBy }; // There is no need to build the taxQuery if we inherit. if (taxQuery && !inherit) { + const taxonomies = getTaxonomies({ + type: postType, + per_page: -1, + context: 'view' + }); // We have to build the tax query for the REST API and use as // keys the taxonomies `rest_base` with the `term ids` as values. const builtTaxQuery = Object.entries(taxQuery).reduce((accumulator, [taxonomySlug, terms]) => { @@ -40163,7 +42584,7 @@ function PostTemplateEdit({ }), blocks: getBlocks(clientId) }; - }, [perPage, page, offset, order, orderBy, clientId, author, search, postType, exclude, sticky, inherit, templateSlug, taxQuery, parents, restQueryArgs, previewPostType]); + }, [perPage, offset, order, orderBy, clientId, author, search, postType, exclude, sticky, inherit, templateSlug, taxQuery, parents, restQueryArgs, previewPostType]); const blockContexts = (0,external_wp_element_namespaceObject.useMemo)(() => posts?.map(post => ({ postType: post.type, postId: post.id @@ -40173,14 +42594,13 @@ function PostTemplateEdit({ [`columns-${columnCount}`]: layoutType === 'grid' && columnCount // Ensure column count is flagged via classname for backwards compatibility. }) }); - if (!posts) { - return (0,external_wp_element_namespaceObject.createElement)("p", { + return (0,external_React_namespaceObject.createElement)("p", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null)); + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null)); } if (!posts.length) { - return (0,external_wp_element_namespaceObject.createElement)("p", { + return (0,external_React_namespaceObject.createElement)("p", { ...blockProps }, " ", (0,external_wp_i18n_namespaceObject.__)('No results found.')); } @@ -40211,14 +42631,14 @@ function PostTemplateEdit({ // for each block context, but the preview for the active block context is hidden. // This ensures that when it is displayed again, the cached rendering of the // block preview is used, instead of having to re-render the preview from scratch. - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, { controls: displayLayoutControls - })), (0,external_wp_element_namespaceObject.createElement)("ul", { + })), (0,external_React_namespaceObject.createElement)("ul", { ...blockProps - }, blockContexts && blockContexts.map(blockContext => (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockContextProvider, { + }, blockContexts && blockContexts.map(blockContext => (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockContextProvider, { key: blockContext.postId, value: blockContext - }, blockContext.postId === (activeBlockContextId || blockContexts[0]?.postId) ? (0,external_wp_element_namespaceObject.createElement)(PostTemplateInnerBlocks, null) : null, (0,external_wp_element_namespaceObject.createElement)(MemoizedPostTemplateBlockPreview, { + }, blockContext.postId === (activeBlockContextId || blockContexts[0]?.postId) ? (0,external_React_namespaceObject.createElement)(PostTemplateInnerBlocks, null) : null, (0,external_React_namespaceObject.createElement)(MemoizedPostTemplateBlockPreview, { blocks: blocks, blockContextId: blockContext.postId, setActiveBlockContextId: setActiveBlockContextId, @@ -40233,7 +42653,7 @@ function PostTemplateEdit({ */ function PostTemplateSave() { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-template/index.js @@ -40255,7 +42675,7 @@ const post_template_metadata = { parent: ["core/query"], description: "Contains the block elements used to render a post, like the title, date, featured image, content or excerpt, and more.", textdomain: "default", - usesContext: ["queryId", "query", "queryContext", "displayLayout", "templateSlug", "previewPostType", "enhancedPagination"], + usesContext: ["queryId", "query", "displayLayout", "templateSlug", "previewPostType", "enhancedPagination"], supports: { reusable: false, html: false, @@ -40289,6 +42709,9 @@ const post_template_metadata = { __experimentalDefaultControls: { blockGap: true } + }, + interactivity: { + clientNavigation: true } }, style: "wp-block-post-template", @@ -40317,15 +42740,15 @@ const post_template_init = () => initBlock({ * WordPress dependencies */ -const postCategories = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const postCategories = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M20 4H4v1.5h16V4zm-2 9h-3c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3zM4 9.5h9V8H4v1.5zM9 13H6c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3z", fillRule: "evenodd", clipRule: "evenodd" })); -/* harmony default export */ var post_categories = (postCategories); +/* harmony default export */ const post_categories = (postCategories); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-terms/use-post-terms.js /** @@ -40436,16 +42859,16 @@ function PostTermsEdit({ [`taxonomy-${term}`]: term }) }); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentToolbar, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentToolbar, { value: textAlign, onChange: nextAlign => { setAttributes({ textAlign: nextAlign }); } - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, autoComplete: "off", label: (0,external_wp_i18n_namespaceObject.__)('Separator'), @@ -40456,12 +42879,11 @@ function PostTermsEdit({ }); }, help: (0,external_wp_i18n_namespaceObject.__)('Enter character(s) used to separate terms.') - })), (0,external_wp_element_namespaceObject.createElement)("div", { + })), (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, isLoading && hasPost && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null), !isLoading && hasPostTerms && (isSelected || prefix) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + }, isLoading && hasPost && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null), !isLoading && (isSelected || prefix) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { allowedFormats: ALLOWED_FORMATS, className: "wp-block-post-terms__prefix", - multiline: false, "aria-label": (0,external_wp_i18n_namespaceObject.__)('Prefix'), placeholder: (0,external_wp_i18n_namespaceObject.__)('Prefix') + ' ', value: prefix, @@ -40469,16 +42891,15 @@ function PostTermsEdit({ prefix: value }), tagName: "span" - }), (!hasPost || !term) && (0,external_wp_element_namespaceObject.createElement)("span", null, blockInformation.title), hasPost && !isLoading && hasPostTerms && postTerms.map(postTerm => (0,external_wp_element_namespaceObject.createElement)("a", { + }), (!hasPost || !term) && (0,external_React_namespaceObject.createElement)("span", null, blockInformation.title), hasPost && !isLoading && hasPostTerms && postTerms.map(postTerm => (0,external_React_namespaceObject.createElement)("a", { key: postTerm.id, href: postTerm.link, onClick: event => event.preventDefault() - }, (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(postTerm.name))).reduce((prev, curr) => (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, prev, (0,external_wp_element_namespaceObject.createElement)("span", { + }, (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(postTerm.name))).reduce((prev, curr) => (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, prev, (0,external_React_namespaceObject.createElement)("span", { className: "wp-block-post-terms__separator" - }, separator || ' '), curr)), hasPost && !isLoading && !hasPostTerms && (selectedTerm?.labels?.no_terms || (0,external_wp_i18n_namespaceObject.__)('Term items not found.')), !isLoading && hasPostTerms && (isSelected || suffix) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + }, separator || ' '), curr)), hasPost && !isLoading && !hasPostTerms && (selectedTerm?.labels?.no_terms || (0,external_wp_i18n_namespaceObject.__)('Term items not found.')), !isLoading && (isSelected || suffix) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { allowedFormats: ALLOWED_FORMATS, className: "wp-block-post-terms__suffix", - multiline: false, "aria-label": (0,external_wp_i18n_namespaceObject.__)('Suffix'), placeholder: ' ' + (0,external_wp_i18n_namespaceObject.__)('Suffix'), value: suffix, @@ -40496,13 +42917,13 @@ function PostTermsEdit({ * WordPress dependencies */ -const postTerms = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const postTerms = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M8.1 12.3c.1.1.3.3.5.3.2.1.4.1.6.1.2 0 .4 0 .6-.1.2-.1.4-.2.5-.3l3-3c.3-.3.5-.7.5-1.1 0-.4-.2-.8-.5-1.1L9.7 3.5c-.1-.2-.3-.3-.5-.3H5c-.4 0-.8.4-.8.8v4.2c0 .2.1.4.2.5l3.7 3.6zM5.8 4.8h3.1l3.4 3.4v.1l-3 3 .5.5-.7-.5-3.3-3.4V4.8zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z" })); -/* harmony default export */ var post_terms = (postTerms); +/* harmony default export */ const post_terms = (postTerms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-terms/hooks.js /** @@ -40602,6 +43023,9 @@ const post_terms_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } }, style: "wp-block-post-terms" @@ -40626,7 +43050,7 @@ const post_terms_init = () => { }; ;// CONCATENATED MODULE: external ["wp","wordcount"] -var external_wp_wordcount_namespaceObject = window["wp"]["wordcount"]; +const external_wp_wordcount_namespaceObject = window["wp"]["wordcount"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-time-to-read/edit.js /** @@ -40697,20 +43121,20 @@ function PostTimeToReadEdit({ [`has-text-align-${textAlign}`]: textAlign }) }); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: nextAlign => { setAttributes({ textAlign: nextAlign }); } - })), (0,external_wp_element_namespaceObject.createElement)("div", { + })), (0,external_React_namespaceObject.createElement)("div", { ...blockProps }, minutesToReadString)); } -/* harmony default export */ var post_time_to_read_edit = (PostTimeToReadEdit); +/* harmony default export */ const post_time_to_read_edit = (PostTimeToReadEdit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-time-to-read/icon.js @@ -40718,12 +43142,12 @@ function PostTimeToReadEdit({ * WordPress dependencies */ -/* harmony default export */ var icon = ((0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +/* harmony default export */ const icon = ((0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M12 3c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16.5c-4.1 0-7.5-3.4-7.5-7.5S7.9 4.5 12 4.5s7.5 3.4 7.5 7.5-3.4 7.5-7.5 7.5zM12 7l-1 5c0 .3.2.6.4.8l4.2 2.8-2.7-4.1L12 7z" }))); @@ -40776,6 +43200,9 @@ const post_time_to_read_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } } }; @@ -40851,11 +43278,11 @@ function PostTitleEdit({ }) }); const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)(); - let titleElement = (0,external_wp_element_namespaceObject.createElement)(TagName, { + let titleElement = (0,external_React_namespaceObject.createElement)(TagName, { ...blockProps }, (0,external_wp_i18n_namespaceObject.__)('Title')); if (postType && postId) { - titleElement = userCanEdit ? (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.PlainText, { + titleElement = userCanEdit ? (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.PlainText, { tagName: TagName, placeholder: (0,external_wp_i18n_namespaceObject.__)('No Title'), value: rawTitle, @@ -40863,7 +43290,7 @@ function PostTitleEdit({ __experimentalVersion: 2, __unstableOnSplitAtEnd: onSplitAtEnd, ...blockProps - }) : (0,external_wp_element_namespaceObject.createElement)(TagName, { + }) : (0,external_React_namespaceObject.createElement)(TagName, { ...blockProps, dangerouslySetInnerHTML: { __html: fullTitle?.rendered @@ -40871,9 +43298,9 @@ function PostTitleEdit({ }); } if (isLink && postType && postId) { - titleElement = userCanEdit ? (0,external_wp_element_namespaceObject.createElement)(TagName, { + titleElement = userCanEdit ? (0,external_React_namespaceObject.createElement)(TagName, { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.PlainText, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.PlainText, { tagName: "a", href: link, target: linkTarget, @@ -40883,9 +43310,9 @@ function PostTitleEdit({ onChange: setTitle, __experimentalVersion: 2, __unstableOnSplitAtEnd: onSplitAtEnd - })) : (0,external_wp_element_namespaceObject.createElement)(TagName, { + })) : (0,external_React_namespaceObject.createElement)(TagName, { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)("a", { + }, (0,external_React_namespaceObject.createElement)("a", { href: link, target: linkTarget, rel: rel, @@ -40895,44 +43322,44 @@ function PostTitleEdit({ } })); } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, blockEditingMode === 'default' && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, blockEditingMode === 'default' && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.HeadingLevelDropdown, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.HeadingLevelDropdown, { value: level, onChange: newLevel => setAttributes({ level: newLevel }) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: nextAlign => { setAttributes({ textAlign: nextAlign }); } - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Make title a link'), onChange: () => setAttributes({ isLink: !isLink }), checked: isLink - }), isLink && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), isLink && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Open in new tab'), onChange: value => setAttributes({ linkTarget: value ? '_blank' : '_self' }), checked: linkTarget === '_blank' - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Link rel'), value: rel, onChange: newRel => setAttributes({ rel: newRel }) - })))), titleElement); + }))))), titleElement); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-title/deprecated.js @@ -41001,7 +43428,7 @@ const post_title_deprecated_v1 = { * * See block-deprecation.md */ -/* harmony default export */ var post_title_deprecated = ([post_title_deprecated_v1]); +/* harmony default export */ const post_title_deprecated = ([post_title_deprecated_v1]); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-title/index.js /** @@ -41070,10 +43497,11 @@ const post_title_metadata = { __experimentalTextDecoration: true, __experimentalLetterSpacing: true, __experimentalDefaultControls: { - fontSize: true, - fontAppearance: true, - textTransform: true + fontSize: true } + }, + interactivity: { + clientNavigation: true } }, style: "wp-block-post-title" @@ -41101,13 +43529,13 @@ const post_title_init = () => initBlock({ * WordPress dependencies */ -const preformatted = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const preformatted = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 16.5h6V15H7v1.5zm4-4h6V11h-6v1.5zM9 11H7v1.5h2V11zm6 5.5h2V15h-2v1.5z" })); -/* harmony default export */ var library_preformatted = (preformatted); +/* harmony default export */ const library_preformatted = (preformatted); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/preformatted/edit.js @@ -41131,7 +43559,7 @@ function PreformattedEdit({ const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ style }); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { tagName: "pre", identifier: "content", preserveWhiteSpace: true, @@ -41163,9 +43591,9 @@ function preformatted_save_save({ const { content } = attributes; - return (0,external_wp_element_namespaceObject.createElement)("pre", { + return (0,external_React_namespaceObject.createElement)("pre", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save() - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content })); } @@ -41200,17 +43628,14 @@ const preformatted_transforms_transforms = { to: [{ type: 'block', blocks: ['core/paragraph'], - transform: attributes => (0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph', { - ...attributes, - content: attributes.content.replace(/\n/g, '<br>') - }) + transform: attributes => (0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph', attributes) }, { type: 'block', blocks: ['core/code'], transform: attributes => (0,external_wp_blocks_namespaceObject.createBlock)('core/code', attributes) }] }; -/* harmony default export */ var preformatted_transforms = (preformatted_transforms_transforms); +/* harmony default export */ const preformatted_transforms = (preformatted_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/preformatted/index.js /** @@ -41234,10 +43659,9 @@ const preformatted_metadata = { textdomain: "default", attributes: { content: { - type: "string", - source: "html", + type: "rich-text", + source: "rich-text", selector: "pre", - "default": "", __unstablePreserveWhiteSpace: true, __experimentalRole: "content" } @@ -41267,6 +43691,9 @@ const preformatted_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } }, style: "wp-block-preformatted" @@ -41287,7 +43714,6 @@ const preformatted_settings = { /* eslint-enable @wordpress/i18n-no-collapsible-whitespace */ } }, - transforms: preformatted_transforms, edit: PreformattedEdit, save: preformatted_save_save, @@ -41309,13 +43735,13 @@ const preformatted_init = () => initBlock({ * WordPress dependencies */ -const pullquote = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const pullquote = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M18 8H6c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v4zM4 4v1.5h16V4H4zm0 16h16v-1.5H4V20z" })); -/* harmony default export */ var library_pullquote = (pullquote); +/* harmony default export */ const library_pullquote = (pullquote); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/pullquote/shared.js const SOLID_COLOR_CLASS = `is-style-solid-color`; @@ -41409,16 +43835,16 @@ const pullquote_deprecated_v5 = { value } = attributes; const shouldShowCitation = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation); - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classnames_default()({ [`has-text-align-${textAlign}`]: textAlign }) }) - }, (0,external_wp_element_namespaceObject.createElement)("blockquote", null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)("blockquote", null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: value, multiline: true - }), shouldShowCitation && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }), shouldShowCitation && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation }))); @@ -41479,18 +43905,18 @@ const pullquote_deprecated_v4 = { const blockquoteStyles = blockquoteTextColorClass ? undefined : { color: customTextColor }; - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: figureClasses, style: figureStyles }) - }, (0,external_wp_element_namespaceObject.createElement)("blockquote", { + }, (0,external_React_namespaceObject.createElement)("blockquote", { className: blockquoteClasses, style: blockquoteStyles - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: value, multiline: true - }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation }))); @@ -41603,16 +44029,16 @@ const pullquote_deprecated_v3 = { const blockquoteStyles = blockquoteTextColorClass ? undefined : { color: customTextColor }; - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { className: figureClasses, style: figureStyles - }, (0,external_wp_element_namespaceObject.createElement)("blockquote", { + }, (0,external_React_namespaceObject.createElement)("blockquote", { className: blockquoteClasses, style: blockquoteStyles - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: value, multiline: true - }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation }))); @@ -41729,16 +44155,16 @@ const pullquote_deprecated_v2 = { const blockquoteStyle = blockquoteTextColorClass ? undefined : { color: customTextColor }; - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { className: figureClass, style: figureStyles - }, (0,external_wp_element_namespaceObject.createElement)("blockquote", { + }, (0,external_React_namespaceObject.createElement)("blockquote", { className: blockquoteClasses, style: blockquoteStyle - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: value, multiline: true - }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation }))); @@ -41800,10 +44226,10 @@ const pullquote_deprecated_v1 = { value, citation } = attributes; - return (0,external_wp_element_namespaceObject.createElement)("blockquote", null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + return (0,external_React_namespaceObject.createElement)("blockquote", null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: value, multiline: true - }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })); @@ -41839,12 +44265,12 @@ const deprecated_v0 = { citation, align } = attributes; - return (0,external_wp_element_namespaceObject.createElement)("blockquote", { + return (0,external_React_namespaceObject.createElement)("blockquote", { className: `align${align}` - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: value, multiline: true - }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "footer", value: citation })); @@ -41868,7 +44294,7 @@ const deprecated_v0 = { * * See block-deprecation.md */ -/* harmony default export */ var pullquote_deprecated = ([pullquote_deprecated_v5, pullquote_deprecated_v4, pullquote_deprecated_v3, pullquote_deprecated_v2, pullquote_deprecated_v1, deprecated_v0]); +/* harmony default export */ const pullquote_deprecated = ([pullquote_deprecated_v5, pullquote_deprecated_v4, pullquote_deprecated_v3, pullquote_deprecated_v2, pullquote_deprecated_v1, deprecated_v0]); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/pullquote/figure.js const Figure = 'figure'; @@ -41914,18 +44340,18 @@ function PullQuoteEdit({ }) }); const shouldShowCitation = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) || isSelected; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: nextAlign => { setAttributes({ textAlign: nextAlign }); } - })), (0,external_wp_element_namespaceObject.createElement)(Figure, { + })), (0,external_React_namespaceObject.createElement)(Figure, { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(BlockQuote, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + }, (0,external_React_namespaceObject.createElement)(BlockQuote, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { identifier: "value", tagName: "p", value: value, @@ -41937,7 +44363,7 @@ function PullQuoteEdit({ // translators: placeholder text used for the quote (0,external_wp_i18n_namespaceObject.__)('Add quote'), textAlign: "center" - }), shouldShowCitation && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + }), shouldShowCitation && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { identifier: "citation", tagName: isWebPlatform ? 'cite' : undefined, style: { @@ -41957,7 +44383,7 @@ function PullQuoteEdit({ __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())) })))); } -/* harmony default export */ var pullquote_edit = (PullQuoteEdit); +/* harmony default export */ const pullquote_edit = (PullQuoteEdit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/pullquote/save.js @@ -41979,16 +44405,16 @@ function pullquote_save_save({ value } = attributes; const shouldShowCitation = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation); - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classnames_default()({ [`has-text-align-${textAlign}`]: textAlign }) }) - }, (0,external_wp_element_namespaceObject.createElement)("blockquote", null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)("blockquote", null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "p", value: value - }), shouldShowCitation && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }), shouldShowCitation && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation }))); @@ -42082,7 +44508,7 @@ const pullquote_transforms_transforms = { } }] }; -/* harmony default export */ var pullquote_transforms = (pullquote_transforms_transforms); +/* harmony default export */ const pullquote_transforms = (pullquote_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/pullquote/index.js /** @@ -42107,16 +44533,15 @@ const pullquote_metadata = { textdomain: "default", attributes: { value: { - type: "string", - source: "html", + type: "rich-text", + source: "rich-text", selector: "p", __experimentalRole: "content" }, citation: { - type: "string", - source: "html", + type: "rich-text", + source: "rich-text", selector: "cite", - "default": "", __experimentalRole: "content" }, textAlign: { @@ -42135,6 +44560,10 @@ const pullquote_metadata = { text: true } }, + spacing: { + margin: true, + padding: true + }, typography: { fontSize: true, lineHeight: true, @@ -42145,8 +44574,7 @@ const pullquote_metadata = { __experimentalTextDecoration: true, __experimentalLetterSpacing: true, __experimentalDefaultControls: { - fontSize: true, - fontAppearance: true + fontSize: true } }, __experimentalBorder: { @@ -42166,6 +44594,9 @@ const pullquote_metadata = { fontSize: "1.5em", lineHeight: "1.6" } + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-pullquote-editor", @@ -42204,13 +44635,13 @@ const pullquote_init = () => initBlock({ * WordPress dependencies */ -const loop = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const loop = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M18.1823 11.6392C18.1823 13.0804 17.0139 14.2487 15.5727 14.2487C14.3579 14.2487 13.335 13.4179 13.0453 12.2922L13.0377 12.2625L13.0278 12.2335L12.3985 10.377L12.3942 10.3785C11.8571 8.64997 10.246 7.39405 8.33961 7.39405C5.99509 7.39405 4.09448 9.29465 4.09448 11.6392C4.09448 13.9837 5.99509 15.8843 8.33961 15.8843C8.88499 15.8843 9.40822 15.781 9.88943 15.5923L9.29212 14.0697C8.99812 14.185 8.67729 14.2487 8.33961 14.2487C6.89838 14.2487 5.73003 13.0804 5.73003 11.6392C5.73003 10.1979 6.89838 9.02959 8.33961 9.02959C9.55444 9.02959 10.5773 9.86046 10.867 10.9862L10.8772 10.9836L11.4695 12.7311C11.9515 14.546 13.6048 15.8843 15.5727 15.8843C17.9172 15.8843 19.8178 13.9837 19.8178 11.6392C19.8178 9.29465 17.9172 7.39404 15.5727 7.39404C15.0287 7.39404 14.5066 7.4968 14.0264 7.6847L14.6223 9.20781C14.9158 9.093 15.2358 9.02959 15.5727 9.02959C17.0139 9.02959 18.1823 10.1979 18.1823 11.6392Z" })); -/* harmony default export */ var library_loop = (loop); +/* harmony default export */ const library_loop = (loop); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/settings.js @@ -42218,15 +44649,15 @@ const loop = (0,external_wp_element_namespaceObject.createElement)(external_wp_p * WordPress dependencies */ -const settings_settings = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const settings_settings = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z" -}), (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}), (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z" })); -/* harmony default export */ var library_settings = (settings_settings); +/* harmony default export */ const library_settings = (settings_settings); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/utils.js /** @@ -42626,16 +45057,16 @@ function QueryToolbar({ }) { const hasPatterns = !!usePatterns(clientId, name).length; const maxPageInputId = (0,external_wp_compose_namespaceObject.useInstanceId)(QueryToolbar, 'blocks-query-pagination-max-page-input'); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, !query.inherit && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Dropdown, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, !query.inherit && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Dropdown, { contentClassName: "block-library-query-toolbar__popover", renderToggle: ({ onToggle - }) => (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + }) => (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { icon: library_settings, label: (0,external_wp_i18n_namespaceObject.__)('Display settings'), onClick: onToggle }), - renderContent: () => (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalNumberControl, { + renderContent: () => (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalNumberControl, { __unstableInputWidth: "60px", label: (0,external_wp_i18n_namespaceObject.__)('Items per Page'), labelPosition: "edge", @@ -42652,7 +45083,7 @@ function QueryToolbar({ step: "1", value: query.perPage, isDragEnabled: false - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalNumberControl, { + })), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalNumberControl, { __unstableInputWidth: "60px", label: (0,external_wp_i18n_namespaceObject.__)('Offset'), labelPosition: "edge", @@ -42669,10 +45100,10 @@ function QueryToolbar({ step: "1", value: query.offset, isDragEnabled: false - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl, { + })), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl, { id: maxPageInputId, help: (0,external_wp_i18n_namespaceObject.__)('Limit the pages you want to show, even if the query has more results. To show all pages use 0 (zero).') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalNumberControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalNumberControl, { id: maxPageInputId, __unstableInputWidth: "60px", label: (0,external_wp_i18n_namespaceObject.__)('Max page to show'), @@ -42690,9 +45121,9 @@ function QueryToolbar({ value: query.pages, isDragEnabled: false }))) - })), hasPatterns && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, { + })), hasPatterns && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, { className: "wp-block-template-part__block-control-group" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { onClick: openPatternSelectionModal }, (0,external_wp_i18n_namespaceObject.__)('Replace')))); } @@ -42724,7 +45155,7 @@ function OrderControl({ orderBy, onChange }) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Order by'), value: `${orderBy}/${order}`, @@ -42738,7 +45169,7 @@ function OrderControl({ } }); } -/* harmony default export */ var order_control = (OrderControl); +/* harmony default export */ const order_control = (OrderControl); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/author-control.js @@ -42807,7 +45238,7 @@ function AuthorControl({ author: ids.join(',') }); }; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FormTokenField, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.FormTokenField, { label: (0,external_wp_i18n_namespaceObject.__)('Authors'), value: sanitizedValue, suggestions: authorsInfo.names, @@ -42815,7 +45246,7 @@ function AuthorControl({ __experimentalShowHowTo: false }); } -/* harmony default export */ var author_control = (AuthorControl); +/* harmony default export */ const author_control = (AuthorControl); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/parent-control.js @@ -42932,7 +45363,7 @@ function ParentControl({ parents: ids }); }; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FormTokenField, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.FormTokenField, { label: (0,external_wp_i18n_namespaceObject.__)('Parents'), value: value, onInputChange: debouncedSearch, @@ -42941,7 +45372,7 @@ function ParentControl({ __experimentalShowHowTo: false }); } -/* harmony default export */ var parent_control = (ParentControl); +/* harmony default export */ const parent_control = (ParentControl); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/taxonomy-controls.js @@ -42954,6 +45385,7 @@ function ParentControl({ + /** * Internal dependencies */ @@ -42997,7 +45429,7 @@ function TaxonomyControls({ if (!taxonomies || taxonomies.length === 0) { return null; } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, taxonomies.map(taxonomy => { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, taxonomies.map(taxonomy => { const termIds = taxQuery?.[taxonomy.slug] || []; const handleChange = newTermIds => onChange({ taxQuery: { @@ -43005,7 +45437,7 @@ function TaxonomyControls({ [taxonomy.slug]: newTermIds } }); - return (0,external_wp_element_namespaceObject.createElement)(TaxonomyItem, { + return (0,external_React_namespaceObject.createElement)(TaxonomyItem, { key: taxonomy.slug, taxonomy: taxonomy, termIds: termIds, @@ -43109,13 +45541,14 @@ function TaxonomyItem({ setSuggestions(taxonomy_controls_EMPTY_ARRAY); onChange(Array.from(newTermIds)); }; - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: "block-library-query-inspector__taxonomy-control" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FormTokenField, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.FormTokenField, { label: taxonomy.name, value: value, onInputChange: debouncedSearch, suggestions: suggestions, + displayTransform: external_wp_htmlEntities_namespaceObject.decodeEntities, onChange: onTermsChange, __experimentalShowHowTo: false })); @@ -43142,7 +45575,7 @@ function StickyControl({ value, onChange }) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Sticky posts'), options: stickyOptions, @@ -43178,7 +45611,7 @@ function EnhancedPaginationControl({ } else if (hasUnsupportedBlocks) { help = (0,external_wp_i18n_namespaceObject.__)("Force page reload can't be disabled because there are non-compatible blocks inside the Query block."); } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { label: (0,external_wp_i18n_namespaceObject.__)('Force page reload'), help: help, checked: !enhancedPagination, @@ -43210,17 +45643,17 @@ const CreateNewPostLink = ({ const newPostUrl = (0,external_wp_url_namespaceObject.addQueryArgs)('post-new.php', { post_type: postType }); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-query__create-new-link" }, (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.__)('<a>Add new post</a>'), // eslint-disable-next-line jsx-a11y/anchor-has-content { - a: (0,external_wp_element_namespaceObject.createElement)("a", { + a: (0,external_React_namespaceObject.createElement)("a", { href: newPostUrl }) })); }; -/* harmony default export */ var create_new_post_link = (CreateNewPostLink); +/* harmony default export */ const create_new_post_link = (CreateNewPostLink); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/index.js @@ -43245,6 +45678,7 @@ const CreateNewPostLink = ({ + const { BlockInfo } = unlock(external_wp_blockEditor_namespaceObject.privateApis); @@ -43326,11 +45760,11 @@ function QueryInspectorControls(props) { const showSearchControl = isControlAllowed(allowedControls, 'search'); const showParentControl = isControlAllowed(allowedControls, 'parents') && isPostTypeHierarchical; const showFiltersPanel = showTaxControl || showAuthorControl || showSearchControl || showParentControl; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(BlockInfo, null, (0,external_wp_element_namespaceObject.createElement)(create_new_post_link, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(BlockInfo, null, (0,external_React_namespaceObject.createElement)(create_new_post_link, { ...props - })), showSettingsPanel && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + })), showSettingsPanel && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, showInheritControl && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }, showInheritControl && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Inherit query from template'), help: (0,external_wp_i18n_namespaceObject.__)('Toggle to use the global query context that is set with the current template, such as an archive or search. Disable to customize the settings independently.'), @@ -43338,14 +45772,14 @@ function QueryInspectorControls(props) { onChange: value => setQuery({ inherit: !!value }) - }), showPostTypeControl && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { + }), showPostTypeControl && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, options: postTypesSelectOptions, value: postType, label: (0,external_wp_i18n_namespaceObject.__)('Post type'), onChange: onPostTypeChange, help: (0,external_wp_i18n_namespaceObject.__)('WordPress contains different types of content and they are divided into collections called “Post types”. By default there are a few different ones such as blog posts and pages, but plugins could add more.') - }), showColumnsControl && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { + }), showColumnsControl && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Columns'), value: displayLayout.columns, @@ -43354,23 +45788,23 @@ function QueryInspectorControls(props) { }), min: 2, max: Math.max(6, displayLayout.columns) - }), displayLayout.columns > 6 && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Notice, { + }), displayLayout.columns > 6 && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Notice, { status: "warning", isDismissible: false - }, (0,external_wp_i18n_namespaceObject.__)('This column count exceeds the recommended amount and may cause visual breakage.'))), showOrderControl && (0,external_wp_element_namespaceObject.createElement)(order_control, { + }, (0,external_wp_i18n_namespaceObject.__)('This column count exceeds the recommended amount and may cause visual breakage.'))), showOrderControl && (0,external_React_namespaceObject.createElement)(order_control, { order, orderBy, onChange: setQuery - }), showStickyControl && (0,external_wp_element_namespaceObject.createElement)(StickyControl, { + }), showStickyControl && (0,external_React_namespaceObject.createElement)(StickyControl, { value: sticky, onChange: value => setQuery({ sticky: value }) - }), (0,external_wp_element_namespaceObject.createElement)(EnhancedPaginationControl, { + }), (0,external_React_namespaceObject.createElement)(EnhancedPaginationControl, { enhancedPagination: enhancedPagination, setAttributes: setAttributes, clientId: clientId - }))), !inherit && showFiltersPanel && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanel, { + })), !inherit && showFiltersPanel && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanel, { className: "block-library-query-toolspanel__filters", label: (0,external_wp_i18n_namespaceObject.__)('Filters'), resetAll: () => { @@ -43381,45 +45815,46 @@ function QueryInspectorControls(props) { taxQuery: null }); setQuerySearch(''); - } - }, showTaxControl && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { + }, + dropdownMenuProps: TOOLSPANEL_DROPDOWNMENU_PROPS + }, showTaxControl && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)('Taxonomies'), hasValue: () => Object.values(taxQuery || {}).some(terms => !!terms.length), onDeselect: () => setQuery({ taxQuery: null }) - }, (0,external_wp_element_namespaceObject.createElement)(TaxonomyControls, { + }, (0,external_React_namespaceObject.createElement)(TaxonomyControls, { onChange: setQuery, query: query - })), showAuthorControl && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { + })), showAuthorControl && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => !!authorIds, label: (0,external_wp_i18n_namespaceObject.__)('Authors'), onDeselect: () => setQuery({ author: '' }) - }, (0,external_wp_element_namespaceObject.createElement)(author_control, { + }, (0,external_React_namespaceObject.createElement)(author_control, { value: authorIds, onChange: setQuery - })), showSearchControl && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { + })), showSearchControl && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => !!querySearch, label: (0,external_wp_i18n_namespaceObject.__)('Keyword'), onDeselect: () => setQuerySearch('') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Keyword'), value: querySearch, onChange: setQuerySearch - })), showParentControl && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { + })), showParentControl && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => !!parents?.length, label: (0,external_wp_i18n_namespaceObject.__)('Parents'), onDeselect: () => setQuery({ parents: [] }) - }, (0,external_wp_element_namespaceObject.createElement)(parent_control, { + }, (0,external_React_namespaceObject.createElement)(parent_control, { parents: parents, postType: postType, onChange: setQuery - }))))); + })))); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/edit/enhanced-pagination-modal.js @@ -43466,20 +45901,22 @@ function EnhancedPaginationModal({ } else if (hasPostContentBlock) { notice = (0,external_wp_i18n_namespaceObject.__)('Currently, avoiding full page reloads is not possible when a Content block is present inside the Query block.') + ' ' + notice; } - return isOpen && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, { + return isOpen && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, { title: (0,external_wp_i18n_namespaceObject.__)('Query block: Force page reload enabled'), className: "wp-block-query__enhanced-pagination-modal", aria: { describedby: modalDescriptionId }, + role: "alertdialog", + focusOnMount: "firstElement", isDismissible: false, onRequestClose: closeModal - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, { alignment: "right", spacing: 5 - }, (0,external_wp_element_namespaceObject.createElement)("span", { + }, (0,external_React_namespaceObject.createElement)("span", { id: modalDescriptionId - }, notice), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, notice), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { variant: "primary", onClick: closeModal }, (0,external_wp_i18n_namespaceObject.__)('OK')))); @@ -43595,26 +46032,27 @@ function QueryContent({ section: (0,external_wp_i18n_namespaceObject.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element."), aside: (0,external_wp_i18n_namespaceObject.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content.") }; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(EnhancedPaginationModal, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(EnhancedPaginationModal, { attributes: attributes, setAttributes: setAttributes, clientId: clientId - }), (0,external_wp_element_namespaceObject.createElement)(QueryInspectorControls, { + }), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(QueryInspectorControls, { attributes: attributes, setQuery: updateQuery, setDisplayLayout: updateDisplayLayout, setAttributes: setAttributes, clientId: clientId - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(QueryToolbar, { + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(QueryToolbar, { name: name, clientId: clientId, attributes: attributes, setQuery: updateQuery, openPatternSelectionModal: openPatternSelectionModal - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, + __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)('HTML element'), options: [{ label: (0,external_wp_i18n_namespaceObject.__)('Default (<div>)'), @@ -43634,7 +46072,7 @@ function QueryContent({ tagName: value }), help: htmlElementMessages[TagName] - })), (0,external_wp_element_namespaceObject.createElement)(TagName, { + })), (0,external_React_namespaceObject.createElement)(TagName, { ...innerBlocksProps })); } @@ -43667,11 +46105,11 @@ function QueryPlaceholder({ const blockNameForPatterns = useBlockNameForPatterns(clientId, attributes); const { blockType, - allVariations, + activeBlockVariation, hasPatterns } = (0,external_wp_data_namespaceObject.useSelect)(select => { const { - getBlockVariations, + getActiveBlockVariation, getBlockType } = select(external_wp_blocks_namespaceObject.store); const { @@ -43681,15 +46119,14 @@ function QueryPlaceholder({ const rootClientId = getBlockRootClientId(clientId); return { blockType: getBlockType(name), - allVariations: getBlockVariations(name), + activeBlockVariation: getActiveBlockVariation(name, attributes), hasPatterns: !!getPatternsByBlockTypes(blockNameForPatterns, rootClientId).length }; - }, [name, blockNameForPatterns, clientId]); - const matchingVariation = (0,external_wp_blockEditor_namespaceObject.__experimentalGetMatchingVariation)(attributes, allVariations); - const icon = matchingVariation?.icon?.src || matchingVariation?.icon || blockType?.icon?.src; - const label = matchingVariation?.title || blockType?.title; + }, [name, blockNameForPatterns, clientId, attributes]); + const icon = activeBlockVariation?.icon?.src || activeBlockVariation?.icon || blockType?.icon?.src; + const label = activeBlockVariation?.title || blockType?.title; if (isStartingBlank) { - return (0,external_wp_element_namespaceObject.createElement)(QueryVariationPicker, { + return (0,external_React_namespaceObject.createElement)(QueryVariationPicker, { clientId: clientId, attributes: attributes, setAttributes: setAttributes, @@ -43697,16 +46134,16 @@ function QueryPlaceholder({ label: label }); } - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { icon: icon, label: label, instructions: (0,external_wp_i18n_namespaceObject.__)('Choose a pattern for the query loop or start blank.') - }, !!hasPatterns && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, !!hasPatterns && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { variant: "primary", onClick: openPatternSelectionModal - }, (0,external_wp_i18n_namespaceObject.__)('Choose')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, (0,external_wp_i18n_namespaceObject.__)('Choose')), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { variant: "secondary", onClick: () => { setIsStartingBlank(true); @@ -43725,9 +46162,9 @@ function QueryVariationPicker({ replaceInnerBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalBlockVariationPicker, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalBlockVariationPicker, { icon: icon, label: label, variations: scopeVariations, @@ -43865,24 +46302,24 @@ function PatternSelectionModal({ return searchPatterns(blockPatterns, searchValue); }, [blockPatterns, searchValue]); const shownBlockPatterns = (0,external_wp_compose_namespaceObject.useAsyncList)(filteredBlockPatterns); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, { overlayClassName: "block-library-query-pattern__selection-modal", title: (0,external_wp_i18n_namespaceObject.__)('Choose a pattern'), onRequestClose: () => setIsPatternSelectionModalOpen(false), isFullScreen: true - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { className: "block-library-query-pattern__selection-content" - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { className: "block-library-query-pattern__selection-search" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SearchControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SearchControl, { __nextHasNoMarginBottom: true, onChange: setSearchValue, value: searchValue, label: (0,external_wp_i18n_namespaceObject.__)('Search for patterns'), placeholder: (0,external_wp_i18n_namespaceObject.__)('Search') - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockContextProvider, { + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockContextProvider, { value: blockPreviewContext - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalBlockPatternsList, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalBlockPatternsList, { blockPatterns: filteredBlockPatterns, shownPatterns: shownBlockPatterns, onClickPattern: onBlockPatternSelect @@ -43912,16 +46349,16 @@ const QueryEdit = props => { const [isPatternSelectionModalOpen, setIsPatternSelectionModalOpen] = (0,external_wp_element_namespaceObject.useState)(false); const hasInnerBlocks = (0,external_wp_data_namespaceObject.useSelect)(select => !!select(external_wp_blockEditor_namespaceObject.store).getBlocks(clientId).length, [clientId]); const Component = hasInnerBlocks ? QueryContent : QueryPlaceholder; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(Component, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(Component, { ...props, openPatternSelectionModal: () => setIsPatternSelectionModalOpen(true) - }), isPatternSelectionModalOpen && (0,external_wp_element_namespaceObject.createElement)(PatternSelectionModal, { + }), isPatternSelectionModalOpen && (0,external_React_namespaceObject.createElement)(PatternSelectionModal, { clientId: clientId, attributes: attributes, setIsPatternSelectionModalOpen: setIsPatternSelectionModalOpen })); }; -/* harmony default export */ var query_edit = (QueryEdit); +/* harmony default export */ const query_edit = (QueryEdit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/save.js @@ -43936,7 +46373,7 @@ function QuerySave({ }) { const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save(); const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps); - return (0,external_wp_element_namespaceObject.createElement)(Tag, { + return (0,external_React_namespaceObject.createElement)(Tag, { ...innerBlocksProps }); } @@ -43947,28 +46384,28 @@ function QuerySave({ * WordPress dependencies */ -const titleDate = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +const titleDate = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M41 9H7v3h34V9zm-22 5H7v1h12v-1zM7 26h12v1H7v-1zm34-5H7v3h34v-3zM7 38h12v1H7v-1zm34-5H7v3h34v-3z" })); -const titleExcerpt = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +const titleExcerpt = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M41 9H7v3h34V9zm-4 5H7v1h30v-1zm4 3H7v1h34v-1zM7 20h30v1H7v-1zm0 12h30v1H7v-1zm34 3H7v1h34v-1zM7 38h30v1H7v-1zm34-11H7v3h34v-3z" })); -const titleDateExcerpt = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +const titleDateExcerpt = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M41 9H7v3h34V9zm-22 5H7v1h12v-1zm22 3H7v1h34v-1zM7 20h34v1H7v-1zm0 12h12v1H7v-1zm34 3H7v1h34v-1zM7 38h34v1H7v-1zm34-11H7v3h34v-3z" })); -const imageDateTitle = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +const imageDateTitle = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M7 9h34v6H7V9zm12 8H7v1h12v-1zm18 3H7v1h30v-1zm0 18H7v1h30v-1zM7 35h12v1H7v-1zm34-8H7v6h34v-6z" })); @@ -44004,6 +46441,7 @@ const query_variations_variations = [{ description: (0,external_wp_i18n_namespaceObject.__)('Display a list of your most recent posts, excluding sticky posts.'), icon: post_list, attributes: { + namespace: 'core/posts-list', query: { perPage: 4, pages: 1, @@ -44017,7 +46455,13 @@ const query_variations_variations = [{ inherit: false } }, - scope: ['inserter'] + scope: ['inserter'], + isActive: ({ + namespace, + query + }) => { + return namespace === 'core/posts-list' && query.postType === 'post'; + } }, { name: 'title-date', title: (0,external_wp_i18n_namespaceObject.__)('Title & Date'), @@ -44055,7 +46499,7 @@ const query_variations_variations = [{ innerBlocks: [['core/post-template', {}, [['core/post-featured-image'], ['core/post-date'], ['core/post-title']]], ['core/query-pagination'], ['core/query-no-results']], scope: ['block'] }]; -/* harmony default export */ var query_variations = (query_variations_variations); +/* harmony default export */ const query_variations = (query_variations_variations); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/deprecated.js @@ -44288,7 +46732,7 @@ const query_deprecated_v1 = { return migrateDisplayLayout(newAttributes, innerBlocks); }, save() { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); } }; @@ -44355,7 +46799,7 @@ const query_deprecated_v2 = { }) { const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save(); const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps); - return (0,external_wp_element_namespaceObject.createElement)(Tag, { + return (0,external_React_namespaceObject.createElement)(Tag, { ...innerBlocksProps }); } @@ -44433,7 +46877,7 @@ const query_deprecated_v3 = { }) { const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save(); const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps); - return (0,external_wp_element_namespaceObject.createElement)(Tag, { + return (0,external_React_namespaceObject.createElement)(Tag, { ...innerBlocksProps }); } @@ -44495,7 +46939,7 @@ const query_deprecated_v4 = { }) { const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save(); const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps); - return (0,external_wp_element_namespaceObject.createElement)(Tag, { + return (0,external_React_namespaceObject.createElement)(Tag, { ...innerBlocksProps }); }, @@ -44557,7 +47001,7 @@ const query_deprecated_v5 = { }) { const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save(); const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps); - return (0,external_wp_element_namespaceObject.createElement)(Tag, { + return (0,external_React_namespaceObject.createElement)(Tag, { ...innerBlocksProps }); }, @@ -44569,7 +47013,7 @@ const query_deprecated_v5 = { migrate: migrateDisplayLayout }; const query_deprecated_deprecated = [query_deprecated_v5, query_deprecated_v4, query_deprecated_v3, query_deprecated_v2, query_deprecated_v1]; -/* harmony default export */ var query_deprecated = (query_deprecated_deprecated); +/* harmony default export */ const query_deprecated = (query_deprecated_deprecated); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/index.js /** @@ -44632,11 +47076,10 @@ const query_metadata = { supports: { align: ["wide", "full"], html: false, - layout: true + layout: true, + interactivity: true }, - editorStyle: "wp-block-query-editor", - style: "wp-block-query", - viewScript: "file:./view.min.js" + editorStyle: "wp-block-query-editor" }; @@ -44674,7 +47117,7 @@ function QueryNoResultsEdit() { const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, { template: query_no_results_edit_TEMPLATE }); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...innerBlocksProps }); } @@ -44686,7 +47129,7 @@ function QueryNoResultsEdit() { */ function QueryNoResultsSave() { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-no-results/index.js @@ -44729,6 +47172,9 @@ const query_no_results_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } } }; @@ -44760,20 +47206,20 @@ function QueryPaginationArrowControls({ value, onChange }) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControl, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Arrow'), value: value, onChange: onChange, help: (0,external_wp_i18n_namespaceObject.__)('A decorative arrow appended to the next and previous page link.'), isBlock: true - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "none", label: (0,external_wp_i18n_namespaceObject._x)('None', 'Arrow option for Query Pagination Next/Previous blocks') - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "arrow", label: (0,external_wp_i18n_namespaceObject._x)('Arrow', 'Arrow option for Query Pagination Next/Previous blocks') - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "chevron", label: (0,external_wp_i18n_namespaceObject._x)('Chevron', 'Arrow option for Query Pagination Next/Previous blocks') })); @@ -44790,7 +47236,7 @@ function QueryPaginationLabelControl({ value, onChange }) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Show label text'), help: (0,external_wp_i18n_namespaceObject.__)('Toggle off to hide the label text, e.g. "Next Page".'), @@ -44816,7 +47262,6 @@ function QueryPaginationLabelControl({ const query_pagination_edit_TEMPLATE = [['core/query-pagination-previous'], ['core/query-pagination-numbers'], ['core/query-pagination-next']]; -const query_pagination_edit_ALLOWED_BLOCKS = ['core/query-pagination-previous', 'core/query-pagination-numbers', 'core/query-pagination-next']; function edit_QueryPaginationEdit({ attributes: { paginationArrow, @@ -44840,8 +47285,7 @@ function edit_QueryPaginationEdit({ }, [clientId]); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, { - template: query_pagination_edit_TEMPLATE, - allowedBlocks: query_pagination_edit_ALLOWED_BLOCKS + template: query_pagination_edit_TEMPLATE }); // Always show label text if paginationArrow is set to 'none'. (0,external_wp_element_namespaceObject.useEffect)(() => { @@ -44851,23 +47295,23 @@ function edit_QueryPaginationEdit({ }); } }, [paginationArrow, setAttributes, showLabel]); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, hasNextPreviousBlocks && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, hasNextPreviousBlocks && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(QueryPaginationArrowControls, { + }, (0,external_React_namespaceObject.createElement)(QueryPaginationArrowControls, { value: paginationArrow, onChange: value => { setAttributes({ paginationArrow: value }); } - }), paginationArrow !== 'none' && (0,external_wp_element_namespaceObject.createElement)(QueryPaginationLabelControl, { + }), paginationArrow !== 'none' && (0,external_React_namespaceObject.createElement)(QueryPaginationLabelControl, { value: showLabel, onChange: value => { setAttributes({ showLabel: value }); } - }))), (0,external_wp_element_namespaceObject.createElement)("nav", { + }))), (0,external_React_namespaceObject.createElement)("nav", { ...innerBlocksProps })); } @@ -44879,7 +47323,7 @@ function edit_QueryPaginationEdit({ */ function query_pagination_save_save() { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-pagination/deprecated.js @@ -44892,12 +47336,12 @@ const query_pagination_deprecated_deprecated = [ // Version with wrapper `div` element. { save() { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save() - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); } }]; -/* harmony default export */ var query_pagination_deprecated = (query_pagination_deprecated_deprecated); +/* harmony default export */ const query_pagination_deprecated = (query_pagination_deprecated_deprecated); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-pagination/index.js /** @@ -44915,7 +47359,8 @@ const query_pagination_metadata = { name: "core/query-pagination", title: "Pagination", category: "theme", - parent: ["core/query"], + ancestor: ["core/query"], + allowedBlocks: ["core/query-pagination-previous", "core/query-pagination-numbers", "core/query-pagination-next"], description: "Displays a paginated navigation to next/previous set of posts, when applicable.", textdomain: "default", attributes: { @@ -44965,6 +47410,9 @@ const query_pagination_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-query-pagination-editor", @@ -45012,11 +47460,11 @@ function QueryPaginationNextEdit({ } }) { const displayArrow = query_pagination_next_edit_arrowMap[paginationArrow]; - return (0,external_wp_element_namespaceObject.createElement)("a", { + return (0,external_React_namespaceObject.createElement)("a", { href: "#pagination-next-pseudo-link", onClick: event => event.preventDefault(), ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)() - }, showLabel && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.PlainText, { + }, showLabel && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.PlainText, { __experimentalVersion: 2, tagName: "span", "aria-label": (0,external_wp_i18n_namespaceObject.__)('Next page link'), @@ -45025,7 +47473,7 @@ function QueryPaginationNextEdit({ onChange: newLabel => setAttributes({ label: newLabel }) - }), displayArrow && (0,external_wp_element_namespaceObject.createElement)("span", { + }), displayArrow && (0,external_React_namespaceObject.createElement)("span", { className: `wp-block-query-pagination-next-arrow is-arrow-${paginationArrow}`, "aria-hidden": true }, displayArrow)); @@ -45078,6 +47526,9 @@ const query_pagination_next_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } } }; @@ -45104,7 +47555,7 @@ const query_pagination_next_init = () => initBlock({ -const createPaginationItem = (content, Tag = 'a', extraClass = '') => (0,external_wp_element_namespaceObject.createElement)(Tag, { +const createPaginationItem = (content, Tag = 'a', extraClass = '') => (0,external_React_namespaceObject.createElement)(Tag, { key: content, className: `page-numbers ${extraClass}` }, content); @@ -45129,7 +47580,7 @@ const previewPaginationNumbers = midSize => { // Last pagination item. paginationItems.push(createPaginationItem(midSize * 2 + 3)); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, paginationItems); + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, paginationItems); }; function QueryPaginationNumbersEdit({ attributes, @@ -45139,9 +47590,9 @@ function QueryPaginationNumbersEdit({ midSize } = attributes; const paginationNumbers = previewPaginationNumbers(parseInt(midSize, 10)); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { label: (0,external_wp_i18n_namespaceObject.__)('Number of links'), help: (0,external_wp_i18n_namespaceObject.__)('Specify how many links can appear before and after the current page number. Links to the first, current and last page are always visible.'), value: midSize, @@ -45153,7 +47604,7 @@ function QueryPaginationNumbersEdit({ min: 0, max: 5, withInputField: false - }))), (0,external_wp_element_namespaceObject.createElement)("div", { + }))), (0,external_React_namespaceObject.createElement)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)() }, paginationNumbers)); } @@ -45175,7 +47626,7 @@ const query_pagination_numbers_metadata = { title: "Page Numbers", category: "theme", parent: ["core/query-pagination"], - description: "Displays a list of page numbers for pagination", + description: "Displays a list of page numbers for pagination.", textdomain: "default", attributes: { midSize: { @@ -45206,6 +47657,9 @@ const query_pagination_numbers_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-query-pagination-numbers-editor" @@ -45248,14 +47702,14 @@ function QueryPaginationPreviousEdit({ } }) { const displayArrow = query_pagination_previous_edit_arrowMap[paginationArrow]; - return (0,external_wp_element_namespaceObject.createElement)("a", { + return (0,external_React_namespaceObject.createElement)("a", { href: "#pagination-previous-pseudo-link", onClick: event => event.preventDefault(), ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)() - }, displayArrow && (0,external_wp_element_namespaceObject.createElement)("span", { + }, displayArrow && (0,external_React_namespaceObject.createElement)("span", { className: `wp-block-query-pagination-previous-arrow is-arrow-${paginationArrow}`, "aria-hidden": true - }, displayArrow), showLabel && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.PlainText, { + }, displayArrow), showLabel && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.PlainText, { __experimentalVersion: 2, tagName: "span", "aria-label": (0,external_wp_i18n_namespaceObject.__)('Previous page link'), @@ -45314,6 +47768,9 @@ const query_pagination_previous_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } } }; @@ -45380,9 +47837,9 @@ function QueryTitleEdit({ }) }); if (!SUPPORTED_TYPES.includes(type)) { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Provided type is not supported.'))); + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Provided type is not supported.'))); } let titleElement; if (type === 'archive') { @@ -45405,41 +47862,41 @@ function QueryTitleEdit({ } else { title = showPrefix ? (0,external_wp_i18n_namespaceObject.__)('Archive type: Name') : (0,external_wp_i18n_namespaceObject.__)('Archive title'); } - titleElement = (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + titleElement = (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Show archive type in title'), onChange: () => setAttributes({ showPrefix: !showPrefix }), checked: showPrefix - }))), (0,external_wp_element_namespaceObject.createElement)(TagName, { + }))), (0,external_React_namespaceObject.createElement)(TagName, { ...blockProps }, title)); } if (type === 'search') { - titleElement = (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + titleElement = (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Show search term in title'), onChange: () => setAttributes({ showSearchTerm: !showSearchTerm }), checked: showSearchTerm - }))), (0,external_wp_element_namespaceObject.createElement)(TagName, { + }))), (0,external_React_namespaceObject.createElement)(TagName, { ...blockProps }, showSearchTerm ? (0,external_wp_i18n_namespaceObject.__)('Search results for: “search term”') : (0,external_wp_i18n_namespaceObject.__)('Search results'))); } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.HeadingLevelDropdown, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.HeadingLevelDropdown, { value: level, onChange: newLevel => setAttributes({ level: newLevel }) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: nextAlign => { setAttributes({ @@ -45486,7 +47943,7 @@ query_title_variations_variations.forEach(variation => { if (variation.isActive) return; variation.isActive = (blockAttributes, variationAttributes) => blockAttributes.type === variationAttributes.type; }); -/* harmony default export */ var query_title_variations = (query_title_variations_variations); +/* harmony default export */ const query_title_variations = (query_title_variations_variations); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-title/deprecated.js /** @@ -45540,7 +47997,7 @@ const query_title_deprecated_v1 = { * * See block-deprecation.md */ -/* harmony default export */ var query_title_deprecated = ([query_title_deprecated_v1]); +/* harmony default export */ const query_title_deprecated = ([query_title_deprecated_v1]); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-title/index.js /** @@ -45604,10 +48061,11 @@ const query_title_metadata = { __experimentalTextTransform: true, __experimentalTextDecoration: true, __experimentalDefaultControls: { - fontSize: true, - fontAppearance: true, - textTransform: true + fontSize: true } + }, + interactivity: { + clientNavigation: true } }, style: "wp-block-query-title" @@ -45637,13 +48095,13 @@ const query_title_init = () => initBlock({ * WordPress dependencies */ -const quote = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const quote = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M13 6v6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H13zm-9 6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H4v6z" })); -/* harmony default export */ var library_quote = (quote); +/* harmony default export */ const library_quote = (quote); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/deprecated.js @@ -45728,14 +48186,14 @@ const quote_deprecated_v3 = { const className = classnames_default()({ [`has-text-align-${align}`]: align }); - return (0,external_wp_element_namespaceObject.createElement)("blockquote", { + return (0,external_React_namespaceObject.createElement)("blockquote", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }) - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { multiline: true, value: value - }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })); @@ -45770,14 +48228,14 @@ const quote_deprecated_v2 = { value, citation } = attributes; - return (0,external_wp_element_namespaceObject.createElement)("blockquote", { + return (0,external_React_namespaceObject.createElement)("blockquote", { style: { textAlign: align ? align : null } - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { multiline: true, value: value - }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })); @@ -45828,15 +48286,15 @@ const quote_deprecated_v1 = { citation, style } = attributes; - return (0,external_wp_element_namespaceObject.createElement)("blockquote", { + return (0,external_React_namespaceObject.createElement)("blockquote", { className: style === 2 ? 'is-large' : '', style: { textAlign: align ? align : null } - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { multiline: true, value: value - }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })); @@ -45886,15 +48344,15 @@ const quote_deprecated_v0 = { citation, style } = attributes; - return (0,external_wp_element_namespaceObject.createElement)("blockquote", { + return (0,external_React_namespaceObject.createElement)("blockquote", { className: `blocks-quote-style-${style}`, style: { textAlign: align ? align : null } - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { multiline: true, value: value - }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "footer", value: citation })); @@ -45909,7 +48367,7 @@ const quote_deprecated_v0 = { * * See block-deprecation.md */ -/* harmony default export */ var quote_deprecated = ([quote_deprecated_v3, quote_deprecated_v2, quote_deprecated_v1, quote_deprecated_v0]); +/* harmony default export */ const quote_deprecated = ([quote_deprecated_v3, quote_deprecated_v2, quote_deprecated_v1, quote_deprecated_v0]); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/edit.js @@ -46002,18 +48460,18 @@ function QuoteEdit({ templateInsertUpdatesSelection: true, __experimentalCaptureToolbars: true }); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { value: align, onChange: nextAlign => { setAttributes({ align: nextAlign }); } - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.BlockQuotation, { + })), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.BlockQuotation, { ...innerBlocksProps - }, innerBlocksProps.children, (!external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) || hasSelection) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + }, innerBlocksProps.children, (!external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) || hasSelection) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { identifier: "citation", tagName: edit_isWebPlatform ? 'cite' : undefined, style: { @@ -46060,11 +48518,11 @@ function quote_save_save({ const className = classnames_default()({ [`has-text-align-${align}`]: align }); - return (0,external_wp_element_namespaceObject.createElement)("blockquote", { + return (0,external_React_namespaceObject.createElement)("blockquote", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }) - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })); @@ -46075,6 +48533,7 @@ function quote_save_save({ * WordPress dependencies */ + const quote_transforms_transforms = { from: [{ type: 'block', @@ -46167,9 +48626,9 @@ const quote_transforms_transforms = { blocks: ['core/paragraph'], transform: ({ citation - }, innerBlocks) => citation ? [...innerBlocks, (0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph', { + }, innerBlocks) => external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) ? innerBlocks : [...innerBlocks, (0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph', { content: citation - })] : innerBlocks + })] }, { type: 'block', blocks: ['core/group'], @@ -46178,17 +48637,17 @@ const quote_transforms_transforms = { anchor }, innerBlocks) => (0,external_wp_blocks_namespaceObject.createBlock)('core/group', { anchor - }, citation ? [...innerBlocks, (0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph', { + }, external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) ? innerBlocks : [...innerBlocks, (0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph', { content: citation - })] : innerBlocks) + })]) }], ungroup: ({ citation - }, innerBlocks) => citation ? [...innerBlocks, (0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph', { + }, innerBlocks) => external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) ? innerBlocks : [...innerBlocks, (0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph', { content: citation - })] : innerBlocks + })] }; -/* harmony default export */ var quote_transforms = (quote_transforms_transforms); +/* harmony default export */ const quote_transforms = (quote_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/index.js /** @@ -46222,10 +48681,9 @@ const quote_metadata = { __experimentalRole: "content" }, citation: { - type: "string", - source: "html", + type: "rich-text", + source: "rich-text", selector: "cite", - "default": "", __experimentalRole: "content" }, align: { @@ -46247,8 +48705,7 @@ const quote_metadata = { __experimentalTextDecoration: true, __experimentalLetterSpacing: true, __experimentalDefaultControls: { - fontSize: true, - fontAppearance: true + fontSize: true } }, color: { @@ -46259,6 +48716,15 @@ const quote_metadata = { background: true, text: true } + }, + layout: { + allowEditing: false + }, + spacing: { + blockGap: true + }, + interactivity: { + clientNavigation: true } }, styles: [{ @@ -46308,14 +48774,16 @@ const quote_init = () => initBlock({ * WordPress dependencies */ -const symbol = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const symbol = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z" })); -/* harmony default export */ var library_symbol = (symbol); +/* harmony default export */ const library_symbol = (symbol); +;// CONCATENATED MODULE: external ["wp","patterns"] +const external_wp_patterns_namespaceObject = window["wp"]["patterns"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/block/edit.js /** @@ -46332,11 +48800,39 @@ const symbol = (0,external_wp_element_namespaceObject.createElement)(external_wp + + + + /** * Internal dependencies */ + +const { + useLayoutClasses +} = unlock(external_wp_blockEditor_namespaceObject.privateApis); +const { + PARTIAL_SYNCING_SUPPORTED_BLOCKS +} = unlock(external_wp_patterns_namespaceObject.privateApis); const fullAlignments = ['full', 'wide', 'left', 'right']; +function getLegacyIdMap(blocks, content, nameCount = {}) { + let idToClientIdMap = {}; + for (const block of blocks) { + if (block?.innerBlocks?.length) { + idToClientIdMap = { + ...idToClientIdMap, + ...getLegacyIdMap(block.innerBlocks, content, nameCount) + }; + } + const id = block.attributes.metadata?.id; + const clientId = block.clientId; + if (id && content?.[id]) { + idToClientIdMap[clientId] = id; + } + } + return idToClientIdMap; +} const useInferredLayout = (blocks, parentLayout) => { const initialInferredAlignmentRef = (0,external_wp_element_namespaceObject.useRef)(); return (0,external_wp_element_namespaceObject.useMemo)(() => { @@ -46361,30 +48857,195 @@ const useInferredLayout = (blocks, parentLayout) => { }; }, [blocks, parentLayout]); }; +function hasOverridableAttributes(block) { + return Object.keys(PARTIAL_SYNCING_SUPPORTED_BLOCKS).includes(block.name) && !!block.attributes.metadata?.bindings && Object.values(block.attributes.metadata.bindings).some(binding => binding.source === 'core/pattern-overrides'); +} +function hasOverridableBlocks(blocks) { + return blocks.some(block => { + if (hasOverridableAttributes(block)) return true; + return hasOverridableBlocks(block.innerBlocks); + }); +} +function getOverridableAttributes(block) { + return Object.entries(block.attributes.metadata.bindings).filter(([, binding]) => binding.source === 'core/pattern-overrides').map(([attributeKey]) => attributeKey); +} +function applyInitialContentValuesToInnerBlocks(blocks, content = {}, defaultValues, legacyIdMap) { + return blocks.map(block => { + var _legacyIdMap$block$cl; + const innerBlocks = applyInitialContentValuesToInnerBlocks(block.innerBlocks, content, defaultValues, legacyIdMap); + const metadataName = (_legacyIdMap$block$cl = legacyIdMap?.[block.clientId]) !== null && _legacyIdMap$block$cl !== void 0 ? _legacyIdMap$block$cl : block.attributes.metadata?.name; + if (!metadataName || !hasOverridableAttributes(block)) { + return { + ...block, + innerBlocks + }; + } + const attributes = getOverridableAttributes(block); + const newAttributes = { + ...block.attributes + }; + for (const attributeKey of attributes) { + var _defaultValues$metada; + (_defaultValues$metada = defaultValues[metadataName]) !== null && _defaultValues$metada !== void 0 ? _defaultValues$metada : defaultValues[metadataName] = {}; + defaultValues[metadataName][attributeKey] = block.attributes[attributeKey]; + const contentValues = content[metadataName]; + if (contentValues?.[attributeKey] !== undefined) { + newAttributes[attributeKey] = contentValues[attributeKey]; + } + } + return { + ...block, + attributes: newAttributes, + innerBlocks + }; + }); +} +function isAttributeEqual(attribute1, attribute2) { + if (attribute1 instanceof external_wp_richText_namespaceObject.RichTextData && attribute2 instanceof external_wp_richText_namespaceObject.RichTextData) { + return attribute1.toString() === attribute2.toString(); + } + return attribute1 === attribute2; +} +function getContentValuesFromInnerBlocks(blocks, defaultValues, legacyIdMap) { + /** @type {Record<string, { values: Record<string, unknown>}>} */ + const content = {}; + for (const block of blocks) { + var _legacyIdMap$block$cl2; + if (block.name === block_name) continue; + if (block.innerBlocks.length) { + Object.assign(content, getContentValuesFromInnerBlocks(block.innerBlocks, defaultValues, legacyIdMap)); + } + const metadataName = (_legacyIdMap$block$cl2 = legacyIdMap?.[block.clientId]) !== null && _legacyIdMap$block$cl2 !== void 0 ? _legacyIdMap$block$cl2 : block.attributes.metadata?.name; + if (!metadataName || !hasOverridableAttributes(block)) { + continue; + } + const attributes = getOverridableAttributes(block); + for (const attributeKey of attributes) { + if (!isAttributeEqual(block.attributes[attributeKey], defaultValues?.[metadataName]?.[attributeKey])) { + var _content$metadataName; + (_content$metadataName = content[metadataName]) !== null && _content$metadataName !== void 0 ? _content$metadataName : content[metadataName] = {}; + // TODO: We need a way to represent `undefined` in the serialized overrides. + // Also see: https://github.com/WordPress/gutenberg/pull/57249#discussion_r1452987871 + content[metadataName][attributeKey] = block.attributes[attributeKey] === undefined ? + // TODO: We use an empty string to represent undefined for now until + // we support a richer format for overrides and the block binding API. + // Currently only the `linkTarget` attribute of `core/button` is affected. + '' : block.attributes[attributeKey]; + } + } + } + return Object.keys(content).length > 0 ? content : undefined; +} +function setBlockEditMode(setEditMode, blocks, mode) { + blocks.forEach(block => { + const editMode = mode || (hasOverridableAttributes(block) ? 'contentOnly' : 'disabled'); + setEditMode(block.clientId, editMode); + setBlockEditMode(setEditMode, block.innerBlocks, + // Disable editing for nested patterns. + block.name === block_name ? 'disabled' : mode); + }); +} function ReusableBlockEdit({ name, attributes: { - ref + ref, + content }, - __unstableParentLayout: parentLayout + __unstableParentLayout: parentLayout, + clientId: patternClientId, + setAttributes }) { - const { - useLayoutClasses - } = unlock(external_wp_blockEditor_namespaceObject.privateApis); - const hasAlreadyRendered = (0,external_wp_blockEditor_namespaceObject.__experimentalUseHasRecursion)(ref); + const registry = (0,external_wp_data_namespaceObject.useRegistry)(); + const hasAlreadyRendered = (0,external_wp_blockEditor_namespaceObject.useHasRecursion)(ref); const { record, + editedRecord, hasResolved } = (0,external_wp_coreData_namespaceObject.useEntityRecord)('postType', 'wp_block', ref); const isMissing = hasResolved && !record; - const [blocks, onInput, onChange] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)('postType', 'wp_block', { - id: ref - }); - const [title, setTitle] = (0,external_wp_coreData_namespaceObject.useEntityProp)('postType', 'wp_block', 'title', ref); + + // The initial value of the `content` attribute. + const initialContent = (0,external_wp_element_namespaceObject.useRef)(content); + + // The default content values from the original pattern for overridable attributes. + // Set by the `applyInitialContentValuesToInnerBlocks` function. + const defaultContent = (0,external_wp_element_namespaceObject.useRef)({}); + const { + replaceInnerBlocks, + __unstableMarkNextChangeAsNotPersistent, + setBlockEditingMode + } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); + const { + syncDerivedUpdates + } = unlock((0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store)); + const { + innerBlocks, + userCanEdit, + getBlockEditingMode, + onNavigateToEntityRecord, + editingMode, + hasPatternOverridesSource + } = (0,external_wp_data_namespaceObject.useSelect)(select => { + const { + canUser + } = select(external_wp_coreData_namespaceObject.store); + const { + getBlocks, + getSettings, + getBlockEditingMode: _getBlockEditingMode + } = select(external_wp_blockEditor_namespaceObject.store); + const { + getBlockBindingsSource + } = unlock(select(external_wp_blocks_namespaceObject.store)); + const blocks = getBlocks(patternClientId); + const canEdit = canUser('update', 'blocks', ref); + + // For editing link to the site editor if the theme and user permissions support it. + return { + innerBlocks: blocks, + userCanEdit: canEdit, + getBlockEditingMode: _getBlockEditingMode, + onNavigateToEntityRecord: getSettings().onNavigateToEntityRecord, + editingMode: _getBlockEditingMode(patternClientId), + hasPatternOverridesSource: !!getBlockBindingsSource('core/pattern-overrides') + }; + }, [patternClientId, ref]); + + // Sync the editing mode of the pattern block with the inner blocks. + (0,external_wp_element_namespaceObject.useEffect)(() => { + setBlockEditMode(setBlockEditingMode, innerBlocks, + // Disable editing if the pattern itself is disabled. + editingMode === 'disabled' || !hasPatternOverridesSource ? 'disabled' : undefined); + }, [editingMode, innerBlocks, setBlockEditingMode, hasPatternOverridesSource]); + const canOverrideBlocks = (0,external_wp_element_namespaceObject.useMemo)(() => hasPatternOverridesSource && hasOverridableBlocks(innerBlocks), [hasPatternOverridesSource, innerBlocks]); + const initialBlocks = (0,external_wp_element_namespaceObject.useMemo)(() => { + var _editedRecord$blocks$; + return (// Clone the blocks to generate new client IDs. + (_editedRecord$blocks$ = editedRecord.blocks?.map(block => (0,external_wp_blocks_namespaceObject.cloneBlock)(block))) !== null && _editedRecord$blocks$ !== void 0 ? _editedRecord$blocks$ : editedRecord.content && typeof editedRecord.content !== 'function' ? (0,external_wp_blocks_namespaceObject.parse)(editedRecord.content) : [] + ); + }, [editedRecord.blocks, editedRecord.content]); + const legacyIdMap = (0,external_wp_element_namespaceObject.useRef)({}); + + // Apply the initial overrides from the pattern block to the inner blocks. + (0,external_wp_element_namespaceObject.useEffect)(() => { + // Build a map of clientIds to the old nano id system to provide back compat. + legacyIdMap.current = getLegacyIdMap(initialBlocks, initialContent.current); + defaultContent.current = {}; + const originalEditingMode = getBlockEditingMode(patternClientId); + // Replace the contents of the blocks with the overrides. + registry.batch(() => { + setBlockEditingMode(patternClientId, 'default'); + syncDerivedUpdates(() => { + const blocks = hasPatternOverridesSource ? applyInitialContentValuesToInnerBlocks(initialBlocks, initialContent.current, defaultContent.current, legacyIdMap.current) : initialBlocks; + replaceInnerBlocks(patternClientId, blocks); + }); + setBlockEditingMode(patternClientId, originalEditingMode); + }); + }, [hasPatternOverridesSource, __unstableMarkNextChangeAsNotPersistent, patternClientId, initialBlocks, replaceInnerBlocks, registry, getBlockEditingMode, setBlockEditingMode, syncDerivedUpdates]); const { alignment, layout - } = useInferredLayout(blocks, parentLayout); + } = useInferredLayout(innerBlocks, parentLayout); const layoutClasses = useLayoutClasses({ layout }, name); @@ -46394,45 +49055,198 @@ function ReusableBlockEdit({ }) }); const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, { - value: blocks, + templateLock: 'all', layout, - onInput, - onChange, - renderAppender: blocks?.length ? undefined : external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender + renderAppender: innerBlocks?.length ? undefined : external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender }); + + // Sync the `content` attribute from the updated blocks to the pattern block. + // `syncDerivedUpdates` is used here to avoid creating an additional undo level. + (0,external_wp_element_namespaceObject.useEffect)(() => { + if (!hasPatternOverridesSource) { + return; + } + const { + getBlocks + } = registry.select(external_wp_blockEditor_namespaceObject.store); + let prevBlocks = getBlocks(patternClientId); + return registry.subscribe(() => { + const blocks = getBlocks(patternClientId); + if (blocks !== prevBlocks) { + prevBlocks = blocks; + syncDerivedUpdates(() => { + setAttributes({ + content: getContentValuesFromInnerBlocks(blocks, defaultContent.current, legacyIdMap.current) + }); + }); + } + }, external_wp_blockEditor_namespaceObject.store); + }, [hasPatternOverridesSource, syncDerivedUpdates, patternClientId, registry, setAttributes]); + const handleEditOriginal = () => { + onNavigateToEntityRecord({ + postId: ref, + postType: 'wp_block' + }); + }; + const resetContent = () => { + if (content) { + replaceInnerBlocks(patternClientId, initialBlocks); + } + }; + let children = null; if (hasAlreadyRendered) { - return (0,external_wp_element_namespaceObject.createElement)("div", { - ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Block cannot be rendered inside itself.'))); + children = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Block cannot be rendered inside itself.')); } if (isMissing) { - return (0,external_wp_element_namespaceObject.createElement)("div", { - ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Block has been deleted or is unavailable.'))); + children = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Block has been deleted or is unavailable.')); } if (!hasResolved) { - return (0,external_wp_element_namespaceObject.createElement)("div", { - ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null))); + children = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null)); } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalRecursionProvider, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RecursionProvider, { uniqueId: ref - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { - __nextHasNoMarginBottom: true, - label: (0,external_wp_i18n_namespaceObject.__)('Name'), - value: title, - onChange: setTitle - }))), (0,external_wp_element_namespaceObject.createElement)("div", { + }, userCanEdit && onNavigateToEntityRecord && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + onClick: handleEditOriginal + }, (0,external_wp_i18n_namespaceObject.__)('Edit original')))), canOverrideBlocks && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + onClick: resetContent, + disabled: !content, + __experimentalIsFocusable: true + }, (0,external_wp_i18n_namespaceObject.__)('Reset')))), children === null ? (0,external_React_namespaceObject.createElement)("div", { ...innerBlocksProps - })); + }) : (0,external_React_namespaceObject.createElement)("div", { + ...blockProps + }, children)); } +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/block/deprecated.js +const isObject = obj => typeof obj === 'object' && !Array.isArray(obj) && obj !== null; + +// v2: Migrate to a more condensed version of the 'content' attribute attribute. +const block_deprecated_v2 = { + attributes: { + ref: { + type: 'number' + }, + content: { + type: 'object' + } + }, + supports: { + customClassName: false, + html: false, + inserter: false, + renaming: false + }, + // Force this deprecation to run whenever there's a values sub-property that's an object. + // + // This could fail in the future if a block ever has binding to a `values` attribute. + // Some extra protection is added to ensure `values` is an object, but this only reduces + // the likelihood, it doesn't solve it completely. + isEligible({ + content + }) { + return !!content && Object.keys(content).every(contentKey => content[contentKey].values && isObject(content[contentKey].values)); + }, + /* + * Old attribute format: + * content: { + * "V98q_x": { + * // The attribute values are now stored as a 'values' sub-property. + * values: { content: 'My content value' }, + * // ... additional metadata, like the block name can be stored here. + * } + * } + * + * New attribute format: + * content: { + * "V98q_x": { + * content: 'My content value', + * } + * } + */ + migrate(attributes) { + const { + content, + ...retainedAttributes + } = attributes; + if (content && Object.keys(content).length) { + const updatedContent = { + ...content + }; + for (const contentKey in content) { + updatedContent[contentKey] = content[contentKey].values; + } + return { + ...retainedAttributes, + content: updatedContent + }; + } + return attributes; + } +}; + +// v1: Rename the `overrides` attribute to the `content` attribute. +const block_deprecated_v1 = { + attributes: { + ref: { + type: 'number' + }, + overrides: { + type: 'object' + } + }, + supports: { + customClassName: false, + html: false, + inserter: false, + renaming: false + }, + // Force this deprecation to run whenever there's an `overrides` object. + isEligible({ + overrides + }) { + return !!overrides; + }, + /* + * Old attribute format: + * overrides: { + * // An key is an id that represents a block. + * // The values are the attribute values of the block. + * "V98q_x": { content: 'My content value' } + * } + * + * New attribute format: + * content: { + * "V98q_x": { content: 'My content value' } + * } + * + */ + migrate(attributes) { + const { + overrides, + ...retainedAttributes + } = attributes; + const content = {}; + Object.keys(overrides).forEach(id => { + content[id] = overrides[id]; + }); + return { + ...retainedAttributes, + content + }; + } +}; +/* harmony default export */ const block_deprecated = ([block_deprecated_v2, block_deprecated_v1]); + ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/block/index.js /** * WordPress dependencies */ + + + /** * Internal dependencies */ @@ -46443,28 +49257,49 @@ const block_metadata = { name: "core/block", title: "Pattern", category: "reusable", - description: "Create and save content to reuse across your site. Update the pattern, and the changes apply everywhere it\u2019s used.", + description: "Reuse this design across your site.", keywords: ["reusable"], textdomain: "default", attributes: { ref: { type: "number" + }, + content: { + type: "object" } }, supports: { customClassName: false, html: false, - inserter: false + inserter: false, + renaming: false, + interactivity: { + clientNavigation: true + } } }; + const { name: block_name } = block_metadata; const block_settings = { + deprecated: block_deprecated, edit: ReusableBlockEdit, - icon: library_symbol + icon: library_symbol, + __experimentalLabel: ({ + ref + }) => { + if (!ref) { + return; + } + const entity = (0,external_wp_data_namespaceObject.select)(external_wp_coreData_namespaceObject.store).getEditedEntityRecord('postType', 'wp_block', ref); + if (!entity?.title) { + return; + } + return (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(entity.title); + } }; const block_init = () => initBlock({ name: block_name, @@ -46490,16 +49325,16 @@ function ReadMore({ insertBlocksAfter }) { const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Open in new tab'), onChange: value => setAttributes({ linkTarget: value ? '_blank' : '_self' }), checked: linkTarget === '_blank' - }))), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + }))), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { tagName: "a", "aria-label": (0,external_wp_i18n_namespaceObject.__)('“Read more” link text'), placeholder: (0,external_wp_i18n_namespaceObject.__)('Read more'), @@ -46575,6 +49410,9 @@ const read_more_metadata = { __experimentalDefaultControls: { width: true } + }, + interactivity: { + clientNavigation: true } }, style: "wp-block-read-more" @@ -46600,13 +49438,13 @@ const read_more_init = () => initBlock({ * WordPress dependencies */ -const rss = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const rss = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M5 10.2h-.8v1.5H5c1.9 0 3.8.8 5.1 2.1 1.4 1.4 2.1 3.2 2.1 5.1v.8h1.5V19c0-2.3-.9-4.5-2.6-6.2-1.6-1.6-3.8-2.6-6.1-2.6zm10.4-1.6C12.6 5.8 8.9 4.2 5 4.2h-.8v1.5H5c3.5 0 6.9 1.4 9.4 3.9s3.9 5.8 3.9 9.4v.8h1.5V19c0-3.9-1.6-7.6-4.4-10.4zM4 20h3v-3H4v3z" })); -/* harmony default export */ var library_rss = (rss); +/* harmony default export */ const library_rss = (rss); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/rss/edit.js @@ -46656,25 +49494,26 @@ function RSSEdit({ } const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); if (isEditing) { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { icon: library_rss, label: "RSS" - }, (0,external_wp_element_namespaceObject.createElement)("form", { + }, (0,external_React_namespaceObject.createElement)("form", { onSubmit: onSubmitURL, className: "wp-block-rss__placeholder-form" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, { wrap: true - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalInputControl, { - __next36pxDefaultSize: true, + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalInputControl, { + __next40pxDefaultSize: true, placeholder: (0,external_wp_i18n_namespaceObject.__)('Enter URL here…'), value: feedURL, onChange: value => setAttributes({ feedURL: value }), className: "wp-block-rss__placeholder-input" - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + __next40pxDefaultSize: true, variant: "primary", type: "submit" }, (0,external_wp_i18n_namespaceObject.__)('Use URL')))))); @@ -46698,11 +49537,11 @@ function RSSEdit({ }), isActive: blockLayout === 'grid' }]; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, { controls: toolbarControls - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)('Number of items'), @@ -46713,22 +49552,22 @@ function RSSEdit({ min: DEFAULT_MIN_ITEMS, max: DEFAULT_MAX_ITEMS, required: true - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Display author'), checked: displayAuthor, onChange: toggleAttribute('displayAuthor') - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Display date'), checked: displayDate, onChange: toggleAttribute('displayDate') - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Display excerpt'), checked: displayExcerpt, onChange: toggleAttribute('displayExcerpt') - }), displayExcerpt && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { + }), displayExcerpt && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)('Max number of words in excerpt'), @@ -46739,7 +49578,7 @@ function RSSEdit({ min: 10, max: 100, required: true - }), blockLayout === 'grid' && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { + }), blockLayout === 'grid' && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)('Columns'), @@ -46750,9 +49589,9 @@ function RSSEdit({ min: 2, max: 6, required: true - }))), (0,external_wp_element_namespaceObject.createElement)("div", { + }))), (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Disabled, null, (0,external_wp_element_namespaceObject.createElement)((external_wp_serverSideRender_default()), { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Disabled, null, (0,external_React_namespaceObject.createElement)((external_wp_serverSideRender_default()), { block: "core/rss", attributes: attributes })))); @@ -46813,7 +49652,10 @@ const rss_metadata = { }, supports: { align: true, - html: false + html: false, + interactivity: { + clientNavigation: true + } }, editorStyle: "wp-block-rss-editor", style: "wp-block-rss" @@ -46844,13 +49686,13 @@ const rss_init = () => initBlock({ * WordPress dependencies */ -const search = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const search = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z" })); -/* harmony default export */ var library_search = (search); +/* harmony default export */ const library_search = (search); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/search/icons.js @@ -46858,10 +49700,10 @@ const search = (0,external_wp_element_namespaceObject.createElement)(external_wp * WordPress dependencies */ -const buttonOnly = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +const buttonOnly = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, { x: "7", y: "10", width: "10", @@ -46869,10 +49711,10 @@ const buttonOnly = (0,external_wp_element_namespaceObject.createElement)(externa rx: "1", fill: "currentColor" })); -const buttonOutside = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +const buttonOutside = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, { x: "4.75", y: "15.25", width: "6.5", @@ -46881,7 +49723,7 @@ const buttonOutside = (0,external_wp_element_namespaceObject.createElement)(exte stroke: "currentColor", strokeWidth: "1.5", fill: "none" -}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, { +}), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, { x: "16", y: "10", width: "4", @@ -46889,10 +49731,10 @@ const buttonOutside = (0,external_wp_element_namespaceObject.createElement)(exte rx: "1", fill: "currentColor" })); -const buttonInside = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +const buttonInside = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, { x: "4.75", y: "15.25", width: "6.5", @@ -46901,7 +49743,7 @@ const buttonInside = (0,external_wp_element_namespaceObject.createElement)(exter stroke: "currentColor", strokeWidth: "1.5", fill: "none" -}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, { +}), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, { x: "14", y: "10", width: "4", @@ -46909,10 +49751,10 @@ const buttonInside = (0,external_wp_element_namespaceObject.createElement)(exter rx: "1", fill: "currentColor" })); -const noButton = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +const noButton = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, { x: "4.75", y: "15.25", width: "6.5", @@ -46922,10 +49764,10 @@ const noButton = (0,external_wp_element_namespaceObject.createElement)(external_ fill: "none", strokeWidth: "1.5" })); -const buttonWithIcon = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +const buttonWithIcon = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, { x: "4.75", y: "7.75", width: "14.5", @@ -46934,17 +49776,17 @@ const buttonWithIcon = (0,external_wp_element_namespaceObject.createElement)(ext stroke: "currentColor", fill: "none", strokeWidth: "1.5" -}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, { +}), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, { x: "8", y: "11", width: "8", height: "2", fill: "currentColor" })); -const toggleLabel = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +const toggleLabel = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, { x: "4.75", y: "17.25", width: "5.5", @@ -46953,7 +49795,7 @@ const toggleLabel = (0,external_wp_element_namespaceObject.createElement)(extern stroke: "currentColor", fill: "none", strokeWidth: "1.5" -}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, { +}), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, { x: "4", y: "7", width: "10", @@ -47008,7 +49850,6 @@ function utils_isPercentageUnit(unit) { // Used to calculate border radius adjustment to avoid "fat" corners when // button is placed inside wrapper. const DEFAULT_INNER_PADDING = '4px'; -const BUTTON_BEHAVIOR_EXPAND = 'expand-searchfield'; function SearchEdit({ className, attributes, @@ -47027,7 +49868,6 @@ function SearchEdit({ buttonText, buttonPosition, buttonUseIcon, - buttonBehavior, isSearchFieldHidden, style } = attributes; @@ -47062,8 +49902,7 @@ function SearchEdit({ borderProps.style.borderRadius = `${borderRadius}px`; } const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseColorProps)(attributes); - const fluidTypographySettings = (0,external_wp_blockEditor_namespaceObject.useSetting)('typography.fluid'); - const layout = (0,external_wp_blockEditor_namespaceObject.useSetting)('layout'); + const [fluidTypographySettings, layout] = (0,external_wp_blockEditor_namespaceObject.useSettings)('typography.fluid', 'layout'); const typographyProps = (0,external_wp_blockEditor_namespaceObject.getTypographyClassesAndStyles)(attributes, { typography: { fluid: fluidTypographySettings @@ -47105,7 +49944,7 @@ function SearchEdit({ }); }, [hasOnlyButton, isSelected, setAttributes, width]); const getBlockClassNames = () => { - return classnames_default()(className, isButtonPositionInside ? 'wp-block-search__button-inside' : undefined, isButtonPositionOutside ? 'wp-block-search__button-outside' : undefined, hasNoButton ? 'wp-block-search__no-button' : undefined, hasOnlyButton ? 'wp-block-search__button-only' : undefined, !buttonUseIcon && !hasNoButton ? 'wp-block-search__text-button' : undefined, buttonUseIcon && !hasNoButton ? 'wp-block-search__icon-button' : undefined, hasOnlyButton && BUTTON_BEHAVIOR_EXPAND === buttonBehavior ? 'wp-block-search__button-behavior-expand' : undefined, hasOnlyButton && isSearchFieldHidden ? 'wp-block-search__searchfield-hidden' : undefined); + return classnames_default()(className, isButtonPositionInside ? 'wp-block-search__button-inside' : undefined, isButtonPositionOutside ? 'wp-block-search__button-outside' : undefined, hasNoButton ? 'wp-block-search__no-button' : undefined, hasOnlyButton ? 'wp-block-search__button-only' : undefined, !buttonUseIcon && !hasNoButton ? 'wp-block-search__text-button' : undefined, buttonUseIcon && !hasNoButton ? 'wp-block-search__icon-button' : undefined, hasOnlyButton && isSearchFieldHidden ? 'wp-block-search__searchfield-hidden' : undefined); }; const buttonPositionControls = [{ role: 'menuitemradio', @@ -47183,7 +50022,7 @@ function SearchEdit({ ...typographyProps.style, textDecoration: undefined }; - return (0,external_wp_element_namespaceObject.createElement)("input", { + return (0,external_React_namespaceObject.createElement)("input", { type: "search", className: textFieldClasses, style: textFieldStyles, @@ -47211,22 +50050,22 @@ function SearchEdit({ } : borderProps.style) }; const handleButtonClick = () => { - if (hasOnlyButton && BUTTON_BEHAVIOR_EXPAND === buttonBehavior) { + if (hasOnlyButton) { setAttributes({ isSearchFieldHidden: !isSearchFieldHidden }); } }; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, buttonUseIcon && (0,external_wp_element_namespaceObject.createElement)("button", { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, buttonUseIcon && (0,external_React_namespaceObject.createElement)("button", { type: "button", className: buttonClasses, style: buttonStyles, "aria-label": buttonText ? (0,external_wp_dom_namespaceObject.__unstableStripHTML)(buttonText) : (0,external_wp_i18n_namespaceObject.__)('Search'), onClick: handleButtonClick, ref: buttonRef - }, (0,external_wp_element_namespaceObject.createElement)(build_module_icon, { + }, (0,external_React_namespaceObject.createElement)(build_module_icon, { icon: library_search - })), !buttonUseIcon && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + })), !buttonUseIcon && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { className: buttonClasses, style: buttonStyles, "aria-label": (0,external_wp_i18n_namespaceObject.__)('Button text'), @@ -47239,7 +50078,7 @@ function SearchEdit({ onClick: handleButtonClick })); }; - const controls = (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + const controls = (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { title: (0,external_wp_i18n_namespaceObject.__)('Toggle search label'), icon: toggleLabel, onClick: () => { @@ -47248,11 +50087,11 @@ function SearchEdit({ }); }, className: showLabel ? 'is-pressed' : undefined - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarDropdownMenu, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarDropdownMenu, { icon: getButtonPositionIcon(), label: (0,external_wp_i18n_namespaceObject.__)('Change button position'), controls: buttonPositionControls - }), !hasNoButton && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + }), !hasNoButton && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { title: (0,external_wp_i18n_namespaceObject.__)('Use button with icon'), icon: buttonWithIcon, onClick: () => { @@ -47261,12 +50100,12 @@ function SearchEdit({ }); }, className: buttonUseIcon ? 'is-pressed' : undefined - }))), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + }))), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Display Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl, { label: (0,external_wp_i18n_namespaceObject.__)('Width'), id: unitControlInputId - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalUnitControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalUnitControl, { id: unitControlInputId, min: utils_isPercentageUnit(widthUnit) ? 0 : MIN_WIDTH, max: utils_isPercentageUnit(widthUnit) ? 100 : undefined, @@ -47286,13 +50125,13 @@ function SearchEdit({ __unstableInputWidth: '80px', value: `${width}${widthUnit}`, units: units - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ButtonGroup, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ButtonGroup, { className: "wp-block-search__components-button-group", "aria-label": (0,external_wp_i18n_namespaceObject.__)('Percentage Width') }, [25, 50, 75, 100].map(widthValue => { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { key: widthValue, - isSmall: true, + size: "small", variant: widthValue === width && widthUnit === '%' ? 'primary' : undefined, onClick: () => setAttributes({ width: widthValue, @@ -47351,9 +50190,9 @@ function SearchEdit({ } }); const labelClassnames = classnames_default()('wp-block-search__label', typographyProps.className); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, controls, showLabel && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + }, controls, showLabel && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { className: labelClassnames, "aria-label": (0,external_wp_i18n_namespaceObject.__)('Label text'), placeholder: (0,external_wp_i18n_namespaceObject.__)('Add label…'), @@ -47363,7 +50202,7 @@ function SearchEdit({ label: html }), style: typographyProps.style - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ResizableBox, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ResizableBox, { size: { width: `${width}${widthUnit}` }, @@ -47385,7 +50224,7 @@ function SearchEdit({ toggleSelection(true); }, showHandle: isSelected - }, (isButtonPositionInside || isButtonPositionOutside || hasOnlyButton) && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, renderTextField(), renderButton()), hasNoButton && renderTextField())); + }, (isButtonPositionInside || isButtonPositionOutside || hasOnlyButton) && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, renderTextField(), renderButton()), hasNoButton && renderTextField())); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/search/variations.js @@ -47401,7 +50240,7 @@ const search_variations_variations = [{ label: (0,external_wp_i18n_namespaceObject.__)('Search') } }]; -/* harmony default export */ var search_variations = (search_variations_variations); +/* harmony default export */ const search_variations = (search_variations_variations); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/search/index.js /** @@ -47459,10 +50298,6 @@ const search_metadata = { type: "object", "default": {} }, - buttonBehavior: { - type: "string", - "default": "expand-searchfield" - }, isSearchFieldHidden: { type: "boolean", "default": false @@ -47507,7 +50342,6 @@ const search_metadata = { }, html: false }, - viewScript: "file:./view.min.js", editorStyle: "wp-block-search-editor", style: "wp-block-search" }; @@ -47541,13 +50375,13 @@ const search_init = () => initBlock({ * WordPress dependencies */ -const separator = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const separator = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M4.5 12.5v4H3V7h1.5v3.987h15V7H21v9.5h-1.5v-4h-15Z" })); -/* harmony default export */ var library_separator = (separator); +/* harmony default export */ const library_separator = (separator); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/separator/use-deprecated-opacity.js /** @@ -47626,7 +50460,7 @@ function SeparatorEdit({ color: currentColor, backgroundColor: currentColor }; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.HorizontalRule, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.HorizontalRule, { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className, style: hasCustomColor ? styles : undefined @@ -47671,7 +50505,7 @@ function separatorSave({ backgroundColor: colorProps?.style?.backgroundColor, color: colorClass ? undefined : customColor }; - return (0,external_wp_element_namespaceObject.createElement)("hr", { + return (0,external_React_namespaceObject.createElement)("hr", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style: styles @@ -47697,7 +50531,7 @@ const separator_transforms_transforms = { } }] }; -/* harmony default export */ var separator_transforms = (separator_transforms_transforms); +/* harmony default export */ const separator_transforms = (separator_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/separator/deprecated.js @@ -47742,7 +50576,7 @@ const separator_deprecated_v1 = { backgroundColor: backgroundClass ? undefined : customColor, color: colorClass ? undefined : customColor }; - return (0,external_wp_element_namespaceObject.createElement)("hr", { + return (0,external_React_namespaceObject.createElement)("hr", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style @@ -47767,7 +50601,7 @@ const separator_deprecated_v1 = { }; } }; -/* harmony default export */ var separator_deprecated = ([separator_deprecated_v1]); +/* harmony default export */ const separator_deprecated = ([separator_deprecated_v1]); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/separator/index.js /** @@ -47810,6 +50644,9 @@ const separator_metadata = { }, spacing: { margin: ["top", "bottom"] + }, + interactivity: { + clientNavigation: true } }, styles: [{ @@ -47858,13 +50695,13 @@ const separator_init = () => initBlock({ * WordPress dependencies */ -const shortcode = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const shortcode = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M16 4.2v1.5h2.5v12.5H16v1.5h4V4.2h-4zM4.2 19.8h4v-1.5H5.8V5.8h2.5V4.2h-4l-.1 15.6zm5.1-3.1l1.4.6 4-10-1.4-.6-4 10z" })); -/* harmony default export */ var library_shortcode = (shortcode); +/* harmony default export */ const library_shortcode = (shortcode); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/shortcode/edit.js @@ -47881,16 +50718,16 @@ function ShortcodeEdit({ }) { const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(ShortcodeEdit); const inputId = `blocks-shortcode-input-${instanceId}`; - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: 'components-placeholder' }) - }, (0,external_wp_element_namespaceObject.createElement)("label", { + }, (0,external_React_namespaceObject.createElement)("label", { htmlFor: inputId, className: "components-placeholder__label" - }, (0,external_wp_element_namespaceObject.createElement)(build_module_icon, { + }, (0,external_React_namespaceObject.createElement)(build_module_icon, { icon: library_shortcode - }), (0,external_wp_i18n_namespaceObject.__)('Shortcode')), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.PlainText, { + }), (0,external_wp_i18n_namespaceObject.__)('Shortcode')), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.PlainText, { className: "blocks-shortcode__textarea", id: inputId, value: attributes.text, @@ -47911,11 +50748,11 @@ function ShortcodeEdit({ function shortcode_save_save({ attributes }) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, null, attributes.text); + return (0,external_React_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, null, attributes.text); } ;// CONCATENATED MODULE: external ["wp","autop"] -var external_wp_autop_namespaceObject = window["wp"]["autop"]; +const external_wp_autop_namespaceObject = window["wp"]["autop"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/shortcode/transforms.js /** * WordPress dependencies @@ -47945,7 +50782,7 @@ const shortcode_transforms_transforms = { priority: 20 }] }; -/* harmony default export */ var shortcode_transforms = (shortcode_transforms_transforms); +/* harmony default export */ const shortcode_transforms = (shortcode_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/shortcode/index.js /** @@ -48003,13 +50840,13 @@ const shortcode_init = () => initBlock({ * WordPress dependencies */ -const siteLogo = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const siteLogo = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M12 3c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 1.5c4.1 0 7.5 3.4 7.5 7.5v.1c-1.4-.8-3.3-1.7-3.4-1.8-.2-.1-.5-.1-.8.1l-2.9 2.1L9 11.3c-.2-.1-.4 0-.6.1l-3.7 2.2c-.1-.5-.2-1-.2-1.5 0-4.2 3.4-7.6 7.5-7.6zm0 15c-3.1 0-5.7-1.9-6.9-4.5l3.7-2.2 3.5 1.2c.2.1.5 0 .7-.1l2.9-2.1c.8.4 2.5 1.2 3.5 1.9-.9 3.3-3.9 5.8-7.4 5.8z" })); -/* harmony default export */ var site_logo = (siteLogo); +/* harmony default export */ const site_logo = (siteLogo); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/site-logo/edit.js @@ -48113,7 +50950,7 @@ const SiteLogo = ({ function onResizeStop() { toggleSelection(true); } - const img = (0,external_wp_element_namespaceObject.createElement)("img", { + const img = (0,external_React_namespaceObject.createElement)("img", { className: "custom-logo", src: logoUrl, alt: alt, @@ -48130,7 +50967,7 @@ const SiteLogo = ({ // should direct focus to block. if (isLink) { imgWrapper = /* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */ - (0,external_wp_element_namespaceObject.createElement)("a", { + (0,external_React_namespaceObject.createElement)("a", { href: siteUrl, className: classes, rel: "home", @@ -48139,14 +50976,13 @@ const SiteLogo = ({ }, img) /* eslint-enable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */; } - let imageWidthWithinContainer; if (clientWidth && naturalWidth && naturalHeight) { const exceedMaxWidth = naturalWidth > clientWidth; imageWidthWithinContainer = exceedMaxWidth ? clientWidth : naturalWidth; } if (!isResizable || !imageWidthWithinContainer) { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { style: { width, height @@ -48203,7 +51039,7 @@ const SiteLogo = ({ /* eslint-enable no-lonely-if */ const canEditImage = logoId && naturalWidth && naturalHeight && imageEditing; - const imgEdit = canEditImage && isEditingImage ? (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalImageEditor, { + const imgEdit = canEditImage && isEditingImage ? (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalImageEditor, { id: logoId, url: logoUrl, width: currentWidth, @@ -48217,7 +51053,7 @@ const SiteLogo = ({ onFinishEditing: () => { setIsEditingImage(false); } - }) : (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ResizableBox, { + }) : (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ResizableBox, { size: { width: currentWidth, height: currentHeight @@ -48243,18 +51079,23 @@ const SiteLogo = ({ }); } }, imgWrapper); + + // Support the previous location for the Site Icon settings. To be removed + // when the required WP core version for Gutenberg is >= 6.5.0. + const shouldUseNewUrl = !window?.__experimentalUseCustomizerSiteLogoUrl; + const siteIconSettingsUrl = shouldUseNewUrl ? siteUrl + '/wp-admin/options-general.php' : siteUrl + '/wp-admin/customize.php?autofocus[section]=title_tagline'; const syncSiteIconHelpText = (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.__)('Site Icons are what you see in browser tabs, bookmark bars, and within the WordPress mobile apps. To use a custom icon that is different from your site logo, use the <a>Site Icon settings</a>.'), { a: // eslint-disable-next-line jsx-a11y/anchor-has-content - (0,external_wp_element_namespaceObject.createElement)("a", { - href: siteUrl + '/wp-admin/customize.php?autofocus[section]=title_tagline', + (0,external_React_namespaceObject.createElement)("a", { + href: siteIconSettingsUrl, target: "_blank", rel: "noopener noreferrer" }) }); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)('Image width'), @@ -48266,23 +51107,23 @@ const SiteLogo = ({ initialPosition: Math.min(defaultWidth, maxWidthBuffer), value: width || '', disabled: !isResizable - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Link image to home'), onChange: () => setAttributes({ isLink: !isLink }), checked: isLink - }), isLink && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), isLink && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Open in new tab'), onChange: value => setAttributes({ linkTarget: value ? '_blank' : '_self' }), checked: linkTarget === '_blank' - })), canUserEdit && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + })), canUserEdit && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, - label: (0,external_wp_i18n_namespaceObject.__)('Use as site icon'), + label: (0,external_wp_i18n_namespaceObject.__)('Use as Site Icon'), onChange: value => { setAttributes({ shouldSyncIcon: value @@ -48291,9 +51132,9 @@ const SiteLogo = ({ }, checked: !!shouldSyncIcon, help: syncSiteIconHelpText - })))), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + })))), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, canEditImage && !isEditingImage && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + }, canEditImage && !isEditingImage && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { onClick: () => setIsEditingImage(true), icon: library_crop, label: (0,external_wp_i18n_namespaceObject.__)('Crop') @@ -48306,11 +51147,11 @@ function SiteLogoReplaceFlow({ onRemoveLogo, ...mediaReplaceProps }) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, { ...mediaReplaceProps, allowedTypes: site_logo_edit_ALLOWED_MEDIA_TYPES, accept: ACCEPT_MEDIA_STRING - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { onClick: onRemoveLogo }, (0,external_wp_i18n_namespaceObject.__)('Reset'))); } @@ -48325,18 +51166,18 @@ const InspectorLogoPreview = ({ media_details: logoMediaDetails } = mediaItemData; const logoLabel = logoMediaDetails?.sizes?.full?.file || logoSlug; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalItemGroup, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalItemGroup, { ...itemGroupProps, as: "span" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, { justify: "flex-start", as: "span" - }, (0,external_wp_element_namespaceObject.createElement)("img", { + }, (0,external_React_namespaceObject.createElement)("img", { src: logoUrl, alt: alt - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, { as: "span" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalTruncate, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalTruncate, { numberOfLines: 1, className: "block-library-site-logo__inspector-media-replace-title" }, logoLabel)))); @@ -48358,8 +51199,7 @@ function LogoEdit({ url, siteIconId, mediaItemData, - isRequestingMediaItem, - mediaUpload + isRequestingMediaItem } = (0,external_wp_data_namespaceObject.useSelect)(select => { const { canUser, @@ -48383,11 +51223,13 @@ function LogoEdit({ url: siteData?.home, mediaItemData: mediaItem, isRequestingMediaItem: _isRequestingMediaItem, - siteIconId: _siteIconId, - mediaUpload: select(external_wp_blockEditor_namespaceObject.store).getSettings().mediaUpload + siteIconId: _siteIconId }; }, []); const { + getSettings + } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store); + const { editEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store); const setLogo = (newValue, shouldForceSync = false) => { @@ -48451,8 +51293,8 @@ function LogoEdit({ }); }; const onFilesDrop = filesList => { - mediaUpload({ - allowedTypes: ['image'], + getSettings().mediaUpload({ + allowedTypes: site_logo_edit_ALLOWED_MEDIA_TYPES, filesList, onFileChange([image]) { if ((0,external_wp_blob_namespaceObject.isBlobURL)(image?.url)) { @@ -48469,18 +51311,18 @@ function LogoEdit({ onError: onUploadError, onRemoveLogo }; - const controls = canUserEdit && logoUrl && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + const controls = canUserEdit && logoUrl && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other" - }, (0,external_wp_element_namespaceObject.createElement)(SiteLogoReplaceFlow, { + }, (0,external_React_namespaceObject.createElement)(SiteLogoReplaceFlow, { ...mediaReplaceFlowProps })); let logoImage; const isLoading = siteLogoId === undefined || isRequestingMediaItem; if (isLoading) { - logoImage = (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null); + logoImage = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null); } if (!!logoUrl) { - logoImage = (0,external_wp_element_namespaceObject.createElement)(SiteLogo, { + logoImage = (0,external_React_namespaceObject.createElement)(SiteLogo, { alt: alt, attributes: attributes, className: className, @@ -48498,7 +51340,7 @@ function LogoEdit({ } const placeholder = content => { const placeholderClassName = classnames_default()('block-editor-media-placeholder', className); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { className: placeholderClassName, preview: logoImage, withIllustration: true, @@ -48515,43 +51357,43 @@ function LogoEdit({ className: classes }); const label = (0,external_wp_i18n_namespaceObject.__)('Add a site logo'); - const mediaInspectorPanel = (canUserEdit || logoUrl) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + const mediaInspectorPanel = (canUserEdit || logoUrl) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Media') - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { className: "block-library-site-logo__inspector-media-replace-container" - }, !canUserEdit && !!logoUrl && (0,external_wp_element_namespaceObject.createElement)(InspectorLogoPreview, { + }, !canUserEdit && !!logoUrl && (0,external_React_namespaceObject.createElement)(InspectorLogoPreview, { mediaItemData: mediaItemData, itemGroupProps: { isBordered: true, className: 'block-library-site-logo__inspector-readonly-logo-preview' } - }), canUserEdit && !!logoUrl && (0,external_wp_element_namespaceObject.createElement)(SiteLogoReplaceFlow, { + }), canUserEdit && !!logoUrl && (0,external_React_namespaceObject.createElement)(SiteLogoReplaceFlow, { ...mediaReplaceFlowProps, - name: (0,external_wp_element_namespaceObject.createElement)(InspectorLogoPreview, { + name: (0,external_React_namespaceObject.createElement)(InspectorLogoPreview, { mediaItemData: mediaItemData }), popoverProps: {} - }), canUserEdit && !logoUrl && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaUploadCheck, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaUpload, { + }), canUserEdit && !logoUrl && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaUploadCheck, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaUpload, { onSelect: onInitialSelectLogo, allowedTypes: site_logo_edit_ALLOWED_MEDIA_TYPES, render: ({ open - }) => (0,external_wp_element_namespaceObject.createElement)("div", { + }) => (0,external_React_namespaceObject.createElement)("div", { className: "block-library-site-logo__inspector-upload-container" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { onClick: open, variant: "secondary" - }, isLoading ? (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null) : (0,external_wp_i18n_namespaceObject.__)('Add media')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.DropZone, { + }, isLoading ? (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null) : (0,external_wp_i18n_namespaceObject.__)('Add media')), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.DropZone, { onFilesDrop: onFilesDrop })) }))))); - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, controls, mediaInspectorPanel, !!logoUrl && logoImage, !logoUrl && !canUserEdit && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { + }, controls, mediaInspectorPanel, !!logoUrl && logoImage, !logoUrl && !canUserEdit && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { className: "site-logo_placeholder" - }, !!isLoading && (0,external_wp_element_namespaceObject.createElement)("span", { + }, !!isLoading && (0,external_React_namespaceObject.createElement)("span", { className: "components-placeholder__preview" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null))), !logoUrl && canUserEdit && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null))), !logoUrl && canUserEdit && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, { onSelect: onInitialSelectLogo, accept: ACCEPT_MEDIA_STRING, allowedTypes: site_logo_edit_ALLOWED_MEDIA_TYPES, @@ -48560,7 +51402,7 @@ function LogoEdit({ mediaLibraryButton: ({ open }) => { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { icon: library_upload, variant: "primary", label: label, @@ -48594,7 +51436,7 @@ const site_logo_transforms_transforms = { } }] }; -/* harmony default export */ var site_logo_transforms = (site_logo_transforms_transforms); +/* harmony default export */ const site_logo_transforms = (site_logo_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/site-logo/index.js /** @@ -48653,6 +51495,9 @@ const site_logo_metadata = { margin: false, padding: false } + }, + interactivity: { + clientNavigation: true } }, styles: [{ @@ -48738,7 +51583,7 @@ function SiteTaglineEdit({ 'wp-block-site-tagline__placeholder': !canUserEdit && !tagline }) }); - const siteTaglineContent = canUserEdit ? (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + const siteTaglineContent = canUserEdit ? (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { allowedFormats: [], onChange: setTagline, "aria-label": (0,external_wp_i18n_namespaceObject.__)('Site tagline text'), @@ -48748,12 +51593,12 @@ function SiteTaglineEdit({ disableLineBreaks: true, __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())), ...blockProps - }) : (0,external_wp_element_namespaceObject.createElement)("p", { + }) : (0,external_React_namespaceObject.createElement)("p", { ...blockProps }, tagline || (0,external_wp_i18n_namespaceObject.__)('Site Tagline placeholder')); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { onChange: newAlign => setAttributes({ textAlign: newAlign }), @@ -48767,11 +51612,11 @@ function SiteTaglineEdit({ * WordPress dependencies */ -/* harmony default export */ var site_tagline_icon = ((0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +/* harmony default export */ const site_tagline_icon = ((0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { d: "M4 10.5h16V9H4v1.5ZM4 15h9v-1.5H4V15Z" }))); @@ -48825,7 +51670,7 @@ const site_tagline_deprecated_v1 = { * * See block-deprecation.md */ -/* harmony default export */ var site_tagline_deprecated = ([site_tagline_deprecated_v1]); +/* harmony default export */ const site_tagline_deprecated = ([site_tagline_deprecated_v1]); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/site-tagline/index.js /** @@ -48877,6 +51722,9 @@ const site_tagline_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-site-tagline-editor" @@ -48905,13 +51753,13 @@ const site_tagline_init = () => initBlock({ * WordPress dependencies */ -const mapMarker = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const mapMarker = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M12 9c-.8 0-1.5.7-1.5 1.5S11.2 12 12 12s1.5-.7 1.5-1.5S12.8 9 12 9zm0-5c-3.6 0-6.5 2.8-6.5 6.2 0 .8.3 1.8.9 3.1.5 1.1 1.2 2.3 2 3.6.7 1 3 3.8 3.2 3.9l.4.5.4-.5c.2-.2 2.6-2.9 3.2-3.9.8-1.2 1.5-2.5 2-3.6.6-1.3.9-2.3.9-3.1C18.5 6.8 15.6 4 12 4zm4.3 8.7c-.5 1-1.1 2.2-1.9 3.4-.5.7-1.7 2.2-2.4 3-.7-.8-1.9-2.3-2.4-3-.8-1.2-1.4-2.3-1.9-3.3-.6-1.4-.7-2.2-.7-2.5 0-2.6 2.2-4.7 5-4.7s5 2.1 5 4.7c0 .2-.1 1-.7 2.4z" })); -/* harmony default export */ var map_marker = (mapMarker); +/* harmony default export */ const map_marker = (mapMarker); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/site-title/edit/index.js @@ -48974,9 +51822,9 @@ function SiteTitleEdit({ 'wp-block-site-title__placeholder': !canUserEdit && !title }) }); - const siteTitleContent = canUserEdit ? (0,external_wp_element_namespaceObject.createElement)(TagName, { + const siteTitleContent = canUserEdit ? (0,external_React_namespaceObject.createElement)(TagName, { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { tagName: isLink ? 'a' : 'span', href: isLink ? '#site-title-pseudo-link' : undefined, "aria-label": (0,external_wp_i18n_namespaceObject.__)('Site title text'), @@ -48986,37 +51834,37 @@ function SiteTitleEdit({ allowedFormats: [], disableLineBreaks: true, __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())) - })) : (0,external_wp_element_namespaceObject.createElement)(TagName, { + })) : (0,external_React_namespaceObject.createElement)(TagName, { ...blockProps - }, isLink ? (0,external_wp_element_namespaceObject.createElement)("a", { + }, isLink ? (0,external_React_namespaceObject.createElement)("a", { href: "#site-title-pseudo-link", onClick: event => event.preventDefault() - }, (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title) || (0,external_wp_i18n_namespaceObject.__)('Site Title placeholder')) : (0,external_wp_element_namespaceObject.createElement)("span", null, (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title) || (0,external_wp_i18n_namespaceObject.__)('Site Title placeholder'))); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + }, (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title) || (0,external_wp_i18n_namespaceObject.__)('Site Title placeholder')) : (0,external_React_namespaceObject.createElement)("span", null, (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title) || (0,external_wp_i18n_namespaceObject.__)('Site Title placeholder'))); + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.HeadingLevelDropdown, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.HeadingLevelDropdown, { options: HEADING_LEVELS, value: level, onChange: newLevel => setAttributes({ level: newLevel }) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: nextAlign => { setAttributes({ textAlign: nextAlign }); } - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Make title link to home'), onChange: () => setAttributes({ isLink: !isLink }), checked: isLink - }), isLink && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), isLink && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Open in new tab'), onChange: value => setAttributes({ @@ -49089,7 +51937,7 @@ const site_title_deprecated_v1 = { * * See block-deprecation.md */ -/* harmony default export */ var site_title_deprecated = ([site_title_deprecated_v1]); +/* harmony default export */ const site_title_deprecated = ([site_title_deprecated_v1]); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/site-title/transforms.js /** @@ -49111,7 +51959,7 @@ const site_title_transforms_transforms = { } }] }; -/* harmony default export */ var site_title_transforms = (site_title_transforms_transforms); +/* harmony default export */ const site_title_transforms = (site_title_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/site-title/index.js /** @@ -49181,12 +52029,11 @@ const site_title_metadata = { __experimentalFontWeight: true, __experimentalLetterSpacing: true, __experimentalDefaultControls: { - fontSize: true, - lineHeight: true, - fontAppearance: true, - letterSpacing: true, - textTransform: true + fontSize: true } + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-site-title-editor", @@ -49218,13 +52065,13 @@ const site_title_init = () => initBlock({ * WordPress dependencies */ -const share = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const share = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M9 11.8l6.1-4.5c.1.4.4.7.9.7h2c.6 0 1-.4 1-1V5c0-.6-.4-1-1-1h-2c-.6 0-1 .4-1 1v.4l-6.4 4.8c-.2-.1-.4-.2-.6-.2H6c-.6 0-1 .4-1 1v2c0 .6.4 1 1 1h2c.2 0 .4-.1.6-.2l6.4 4.8v.4c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-2c0-.6-.4-1-1-1h-2c-.5 0-.8.3-.9.7L9 12.2v-.4z" })); -/* harmony default export */ var library_share = (share); +/* harmony default export */ const library_share = (share); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/keyboard-return.js @@ -49232,13 +52079,13 @@ const share = (0,external_wp_element_namespaceObject.createElement)(external_wp_ * WordPress dependencies */ -const keyboardReturn = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const keyboardReturn = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z" })); -/* harmony default export */ var keyboard_return = (keyboardReturn); +/* harmony default export */ const keyboard_return = (keyboardReturn); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/wordpress.js @@ -49246,13 +52093,13 @@ const keyboardReturn = (0,external_wp_element_namespaceObject.createElement)(ext * WordPress dependencies */ -const WordPressIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const WordPressIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M12.158,12.786L9.46,20.625c0.806,0.237,1.657,0.366,2.54,0.366c1.047,0,2.051-0.181,2.986-0.51 c-0.024-0.038-0.046-0.079-0.065-0.124L12.158,12.786z M3.009,12c0,3.559,2.068,6.634,5.067,8.092L3.788,8.341 C3.289,9.459,3.009,10.696,3.009,12z M18.069,11.546c0-1.112-0.399-1.881-0.741-2.48c-0.456-0.741-0.883-1.368-0.883-2.109 c0-0.826,0.627-1.596,1.51-1.596c0.04,0,0.078,0.005,0.116,0.007C16.472,3.904,14.34,3.009,12,3.009 c-3.141,0-5.904,1.612-7.512,4.052c0.211,0.007,0.41,0.011,0.579,0.011c0.94,0,2.396-0.114,2.396-0.114 C7.947,6.93,8.004,7.642,7.52,7.699c0,0-0.487,0.057-1.029,0.085l3.274,9.739l1.968-5.901l-1.401-3.838 C9.848,7.756,9.389,7.699,9.389,7.699C8.904,7.67,8.961,6.93,9.446,6.958c0,0,1.484,0.114,2.368,0.114 c0.94,0,2.397-0.114,2.397-0.114c0.485-0.028,0.542,0.684,0.057,0.741c0,0-0.488,0.057-1.029,0.085l3.249,9.665l0.897-2.996 C17.841,13.284,18.069,12.316,18.069,11.546z M19.889,7.686c0.039,0.286,0.06,0.593,0.06,0.924c0,0.912-0.171,1.938-0.684,3.22 l-2.746,7.94c2.673-1.558,4.47-4.454,4.47-7.771C20.991,10.436,20.591,8.967,19.889,7.686z M12,22C6.486,22,2,17.514,2,12 C2,6.486,6.486,2,12,2c5.514,0,10,4.486,10,10C22,17.514,17.514,22,12,22z" })); @@ -49262,12 +52109,12 @@ const WordPressIcon = () => (0,external_wp_element_namespaceObject.createElement * WordPress dependencies */ -const FivehundredpxIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const FivehundredpxIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M6.94026,15.1412c.00437.01213.108.29862.168.44064a6.55008,6.55008,0,1,0,6.03191-9.09557,6.68654,6.68654,0,0,0-2.58357.51467A8.53914,8.53914,0,0,0,8.21268,8.61344L8.209,8.61725V3.22948l9.0504-.00008c.32934-.0036.32934-.46353.32934-.61466s0-.61091-.33035-.61467L7.47248,2a.43.43,0,0,0-.43131.42692v7.58355c0,.24466.30476.42131.58793.4819.553.11812.68074-.05864.81617-.2457l.018-.02481A10.52673,10.52673,0,0,1,9.32258,9.258a5.35268,5.35268,0,1,1,7.58985,7.54976,5.417,5.417,0,0,1-3.80867,1.56365,5.17483,5.17483,0,0,1-2.69822-.74478l.00342-4.61111a2.79372,2.79372,0,0,1,.71372-1.78792,2.61611,2.61611,0,0,1,1.98282-.89477,2.75683,2.75683,0,0,1,1.95525.79477,2.66867,2.66867,0,0,1,.79656,1.909,2.724,2.724,0,0,1-2.75849,2.748,4.94651,4.94651,0,0,1-.86254-.13719c-.31234-.093-.44519.34058-.48892.48349-.16811.54966.08453.65862.13687.67489a3.75751,3.75751,0,0,0,1.25234.18375,3.94634,3.94634,0,1,0-2.82444-6.742,3.67478,3.67478,0,0,0-1.13028,2.584l-.00041.02323c-.0035.11667-.00579,2.881-.00644,3.78811l-.00407-.00451a6.18521,6.18521,0,0,1-1.0851-1.86092c-.10544-.27856-.34358-.22925-.66857-.12917-.14192.04372-.57386.17677-.47833.489Zm4.65165-1.08338a.51346.51346,0,0,0,.19513.31818l.02276.022a.52945.52945,0,0,0,.3517.18416.24242.24242,0,0,0,.16577-.0611c.05473-.05082.67382-.67812.73287-.738l.69041.68819a.28978.28978,0,0,0,.21437.11032.53239.53239,0,0,0,.35708-.19486c.29792-.30419.14885-.46821.07676-.54751l-.69954-.69975.72952-.73469c.16-.17311.01874-.35708-.12218-.498-.20461-.20461-.402-.25742-.52855-.14083l-.7254.72665-.73354-.73375a.20128.20128,0,0,0-.14179-.05695.54135.54135,0,0,0-.34379.19648c-.22561.22555-.274.38149-.15656.5059l.73374.7315-.72942.73072A.26589.26589,0,0,0,11.59191,14.05782Zm1.59866-9.915A8.86081,8.86081,0,0,0,9.854,4.776a.26169.26169,0,0,0-.16938.22759.92978.92978,0,0,0,.08619.42094c.05682.14524.20779.531.50006.41955a8.40969,8.40969,0,0,1,2.91968-.55484,7.87875,7.87875,0,0,1,3.086.62286,8.61817,8.61817,0,0,1,2.30562,1.49315.2781.2781,0,0,0,.18318.07586c.15529,0,.30425-.15253.43167-.29551.21268-.23861.35873-.4369.1492-.63538a8.50425,8.50425,0,0,0-2.62312-1.694A9.0177,9.0177,0,0,0,13.19058,4.14283ZM19.50945,18.6236h0a.93171.93171,0,0,0-.36642-.25406.26589.26589,0,0,0-.27613.06613l-.06943.06929A7.90606,7.90606,0,0,1,7.60639,18.505a7.57284,7.57284,0,0,1-1.696-2.51537,8.58715,8.58715,0,0,1-.5147-1.77754l-.00871-.04864c-.04939-.25873-.28755-.27684-.62981-.22448-.14234.02178-.5755.088-.53426.39969l.001.00712a9.08807,9.08807,0,0,0,15.406,4.99094c.00193-.00192.04753-.04718.0725-.07436C19.79425,19.16234,19.87422,18.98728,19.50945,18.6236Z" })); @@ -49277,12 +52124,12 @@ const FivehundredpxIcon = () => (0,external_wp_element_namespaceObject.createEle * WordPress dependencies */ -const AmazonIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const AmazonIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M13.582,8.182C11.934,8.367,9.78,8.49,8.238,9.166c-1.781,0.769-3.03,2.337-3.03,4.644 c0,2.953,1.86,4.429,4.253,4.429c2.02,0,3.125-0.477,4.685-2.065c0.516,0.747,0.685,1.109,1.629,1.894 c0.212,0.114,0.483,0.103,0.672-0.066l0.006,0.006c0.567-0.505,1.599-1.401,2.18-1.888c0.231-0.188,0.19-0.496,0.009-0.754 c-0.52-0.718-1.072-1.303-1.072-2.634V8.305c0-1.876,0.133-3.599-1.249-4.891C15.23,2.369,13.422,2,12.04,2 C9.336,2,6.318,3.01,5.686,6.351C5.618,6.706,5.877,6.893,6.109,6.945l2.754,0.298C9.121,7.23,9.308,6.977,9.357,6.72 c0.236-1.151,1.2-1.706,2.284-1.706c0.584,0,1.249,0.215,1.595,0.738c0.398,0.584,0.346,1.384,0.346,2.061V8.182z M13.049,14.088 c-0.451,0.8-1.169,1.291-1.967,1.291c-1.09,0-1.728-0.83-1.728-2.061c0-2.42,2.171-2.86,4.227-2.86v0.615 C13.582,12.181,13.608,13.104,13.049,14.088z M20.683,19.339C18.329,21.076,14.917,22,11.979,22c-4.118,0-7.826-1.522-10.632-4.057 c-0.22-0.199-0.024-0.471,0.241-0.317c3.027,1.762,6.771,2.823,10.639,2.823c2.608,0,5.476-0.541,8.115-1.66 C20.739,18.62,21.072,19.051,20.683,19.339z M21.336,21.043c-0.194,0.163-0.379,0.076-0.293-0.139 c0.284-0.71,0.92-2.298,0.619-2.684c-0.301-0.386-1.99-0.183-2.749-0.092c-0.23,0.027-0.266-0.173-0.059-0.319 c1.348-0.946,3.555-0.673,3.811-0.356C22.925,17.773,22.599,19.986,21.336,21.043z" })); @@ -49293,12 +52140,12 @@ const AmazonIcon = () => (0,external_wp_element_namespaceObject.createElement)(e */ -const BandcampIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const BandcampIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M15.27 17.289 3 17.289 8.73 6.711 21 6.711 15.27 17.289" })); @@ -49308,12 +52155,12 @@ const BandcampIcon = () => (0,external_wp_element_namespaceObject.createElement) * WordPress dependencies */ -const BehanceIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const BehanceIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M7.799,5.698c0.589,0,1.12,0.051,1.606,0.156c0.482,0.102,0.894,0.273,1.241,0.507c0.344,0.235,0.612,0.546,0.804,0.938 c0.188,0.387,0.281,0.871,0.281,1.443c0,0.619-0.141,1.137-0.421,1.551c-0.284,0.413-0.7,0.751-1.255,1.014 c0.756,0.218,1.317,0.601,1.689,1.146c0.374,0.549,0.557,1.205,0.557,1.975c0,0.623-0.12,1.161-0.359,1.612 c-0.241,0.457-0.569,0.828-0.973,1.114c-0.408,0.288-0.876,0.5-1.399,0.637C9.052,17.931,8.514,18,7.963,18H2V5.698H7.799 M7.449,10.668c0.481,0,0.878-0.114,1.192-0.345c0.311-0.228,0.463-0.603,0.463-1.119c0-0.286-0.051-0.523-0.152-0.707 C8.848,8.315,8.711,8.171,8.536,8.07C8.362,7.966,8.166,7.894,7.94,7.854c-0.224-0.044-0.457-0.06-0.697-0.06H4.709v2.874H7.449z M7.6,15.905c0.267,0,0.521-0.024,0.759-0.077c0.243-0.053,0.457-0.137,0.637-0.261c0.182-0.12,0.332-0.283,0.441-0.491 C9.547,14.87,9.6,14.602,9.6,14.278c0-0.633-0.18-1.084-0.533-1.357c-0.356-0.27-0.83-0.404-1.413-0.404H4.709v3.388L7.6,15.905z M16.162,15.864c0.367,0.358,0.897,0.538,1.583,0.538c0.493,0,0.92-0.125,1.277-0.374c0.354-0.248,0.571-0.514,0.654-0.79h2.155 c-0.347,1.072-0.872,1.838-1.589,2.299C19.534,18,18.67,18.23,17.662,18.23c-0.701,0-1.332-0.113-1.899-0.337 c-0.567-0.227-1.041-0.544-1.439-0.958c-0.389-0.415-0.689-0.907-0.904-1.484c-0.213-0.574-0.32-1.21-0.32-1.899 c0-0.666,0.11-1.288,0.329-1.863c0.222-0.577,0.529-1.075,0.933-1.492c0.406-0.42,0.885-0.751,1.444-0.994 c0.558-0.241,1.175-0.363,1.857-0.363c0.754,0,1.414,0.145,1.98,0.44c0.563,0.291,1.026,0.686,1.389,1.181 c0.363,0.493,0.622,1.057,0.783,1.69c0.16,0.632,0.217,1.292,0.171,1.983h-6.428C15.557,14.84,15.795,15.506,16.162,15.864 M18.973,11.184c-0.291-0.321-0.783-0.496-1.384-0.496c-0.39,0-0.714,0.066-0.973,0.2c-0.254,0.132-0.461,0.297-0.621,0.491 c-0.157,0.197-0.265,0.405-0.328,0.628c-0.063,0.217-0.101,0.413-0.111,0.587h3.98C19.478,11.969,19.265,11.509,18.973,11.184z M15.057,7.738h4.985V6.524h-4.985L15.057,7.738z" })); @@ -49323,12 +52170,12 @@ const BehanceIcon = () => (0,external_wp_element_namespaceObject.createElement)( * WordPress dependencies */ -const ChainIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const ChainIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z" })); @@ -49338,12 +52185,12 @@ const ChainIcon = () => (0,external_wp_element_namespaceObject.createElement)(ex * WordPress dependencies */ -const CodepenIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const CodepenIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M22.016,8.84c-0.002-0.013-0.005-0.025-0.007-0.037c-0.005-0.025-0.008-0.048-0.015-0.072 c-0.003-0.015-0.01-0.028-0.013-0.042c-0.008-0.02-0.015-0.04-0.023-0.062c-0.007-0.015-0.013-0.028-0.02-0.042 c-0.008-0.02-0.018-0.037-0.03-0.057c-0.007-0.013-0.017-0.027-0.025-0.038c-0.012-0.018-0.023-0.035-0.035-0.052 c-0.01-0.013-0.02-0.025-0.03-0.037c-0.015-0.017-0.028-0.032-0.043-0.045c-0.01-0.012-0.022-0.023-0.035-0.035 c-0.015-0.015-0.032-0.028-0.048-0.04c-0.012-0.01-0.025-0.02-0.037-0.03c-0.005-0.003-0.01-0.008-0.015-0.012l-9.161-6.096 c-0.289-0.192-0.666-0.192-0.955,0L2.359,8.237C2.354,8.24,2.349,8.245,2.344,8.249L2.306,8.277 c-0.017,0.013-0.033,0.027-0.048,0.04C2.246,8.331,2.234,8.342,2.222,8.352c-0.015,0.015-0.028,0.03-0.042,0.047 c-0.012,0.013-0.022,0.023-0.03,0.037C2.139,8.453,2.125,8.471,2.115,8.488C2.107,8.501,2.099,8.514,2.09,8.526 C2.079,8.548,2.069,8.565,2.06,8.585C2.054,8.6,2.047,8.613,2.04,8.626C2.032,8.648,2.025,8.67,2.019,8.69 c-0.005,0.013-0.01,0.027-0.013,0.042C1.999,8.755,1.995,8.778,1.99,8.803C1.989,8.817,1.985,8.828,1.984,8.84 C1.978,8.879,1.975,8.915,1.975,8.954v6.093c0,0.037,0.003,0.075,0.008,0.112c0.002,0.012,0.005,0.025,0.007,0.038 c0.005,0.023,0.008,0.047,0.015,0.072c0.003,0.015,0.008,0.028,0.013,0.04c0.007,0.022,0.013,0.042,0.022,0.063 c0.007,0.015,0.013,0.028,0.02,0.04c0.008,0.02,0.018,0.038,0.03,0.058c0.007,0.013,0.015,0.027,0.025,0.038 c0.012,0.018,0.023,0.035,0.035,0.052c0.01,0.013,0.02,0.025,0.03,0.037c0.013,0.015,0.028,0.032,0.042,0.045 c0.012,0.012,0.023,0.023,0.035,0.035c0.015,0.013,0.032,0.028,0.048,0.04l0.038,0.03c0.005,0.003,0.01,0.007,0.013,0.01 l9.163,6.095C11.668,21.953,11.833,22,12,22c0.167,0,0.332-0.047,0.478-0.144l9.163-6.095l0.015-0.01 c0.013-0.01,0.027-0.02,0.037-0.03c0.018-0.013,0.035-0.028,0.048-0.04c0.013-0.012,0.025-0.023,0.035-0.035 c0.017-0.015,0.03-0.032,0.043-0.045c0.01-0.013,0.02-0.025,0.03-0.037c0.013-0.018,0.025-0.035,0.035-0.052 c0.008-0.013,0.018-0.027,0.025-0.038c0.012-0.02,0.022-0.038,0.03-0.058c0.007-0.013,0.013-0.027,0.02-0.04 c0.008-0.022,0.015-0.042,0.023-0.063c0.003-0.013,0.01-0.027,0.013-0.04c0.007-0.025,0.01-0.048,0.015-0.072 c0.002-0.013,0.005-0.027,0.007-0.037c0.003-0.042,0.007-0.079,0.007-0.117V8.954C22.025,8.915,22.022,8.879,22.016,8.84z M12.862,4.464l6.751,4.49l-3.016,2.013l-3.735-2.492V4.464z M11.138,4.464v4.009l-3.735,2.494L4.389,8.954L11.138,4.464z M3.699,10.562L5.853,12l-2.155,1.438V10.562z M11.138,19.536l-6.749-4.491l3.015-2.011l3.735,2.492V19.536z M12,14.035L8.953,12 L12,9.966L15.047,12L12,14.035z M12.862,19.536v-4.009l3.735-2.492l3.016,2.011L12.862,19.536z M20.303,13.438L18.147,12 l2.156-1.438L20.303,13.438z" })); @@ -49353,12 +52200,12 @@ const CodepenIcon = () => (0,external_wp_element_namespaceObject.createElement)( * WordPress dependencies */ -const DeviantArtIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const DeviantArtIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M 18.19 5.636 18.19 2 18.188 2 14.553 2 14.19 2.366 12.474 5.636 11.935 6 5.81 6 5.81 10.994 9.177 10.994 9.477 11.357 5.81 18.363 5.81 22 5.811 22 9.447 22 9.81 21.634 11.526 18.364 12.065 18 18.19 18 18.19 13.006 14.823 13.006 14.523 12.641 18.19 5.636z" })); @@ -49368,12 +52215,12 @@ const DeviantArtIcon = () => (0,external_wp_element_namespaceObject.createElemen * WordPress dependencies */ -const DribbbleIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const DribbbleIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M12,22C6.486,22,2,17.514,2,12S6.486,2,12,2c5.514,0,10,4.486,10,10S17.514,22,12,22z M20.434,13.369 c-0.292-0.092-2.644-0.794-5.32-0.365c1.117,3.07,1.572,5.57,1.659,6.09C18.689,17.798,20.053,15.745,20.434,13.369z M15.336,19.876c-0.127-0.749-0.623-3.361-1.822-6.477c-0.019,0.006-0.038,0.013-0.056,0.019c-4.818,1.679-6.547,5.02-6.701,5.334 c1.448,1.129,3.268,1.803,5.243,1.803C13.183,20.555,14.311,20.313,15.336,19.876z M5.654,17.724 c0.193-0.331,2.538-4.213,6.943-5.637c0.111-0.036,0.224-0.07,0.337-0.102c-0.214-0.485-0.448-0.971-0.692-1.45 c-4.266,1.277-8.405,1.223-8.778,1.216c-0.003,0.087-0.004,0.174-0.004,0.261C3.458,14.207,4.29,16.21,5.654,17.724z M3.639,10.264 c0.382,0.005,3.901,0.02,7.897-1.041c-1.415-2.516-2.942-4.631-3.167-4.94C5.979,5.41,4.193,7.613,3.639,10.264z M9.998,3.709 c0.236,0.316,1.787,2.429,3.187,5c3.037-1.138,4.323-2.867,4.477-3.085C16.154,4.286,14.17,3.471,12,3.471 C11.311,3.471,10.641,3.554,9.998,3.709z M18.612,6.612C18.432,6.855,17,8.69,13.842,9.979c0.199,0.407,0.389,0.821,0.567,1.237 c0.063,0.148,0.124,0.295,0.184,0.441c2.842-0.357,5.666,0.215,5.948,0.275C20.522,9.916,19.801,8.065,18.612,6.612z" })); @@ -49383,12 +52230,12 @@ const DribbbleIcon = () => (0,external_wp_element_namespaceObject.createElement) * WordPress dependencies */ -const DropboxIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const DropboxIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M12,6.134L6.069,9.797L2,6.54l5.883-3.843L12,6.134z M2,13.054l5.883,3.843L12,13.459L6.069,9.797L2,13.054z M12,13.459 l4.116,3.439L22,13.054l-4.069-3.257L12,13.459z M22,6.54l-5.884-3.843L12,6.134l5.931,3.663L22,6.54z M12.011,14.2l-4.129,3.426 l-1.767-1.153v1.291l5.896,3.539l5.897-3.539v-1.291l-1.769,1.153L12.011,14.2z" })); @@ -49398,12 +52245,12 @@ const DropboxIcon = () => (0,external_wp_element_namespaceObject.createElement)( * WordPress dependencies */ -const EtsyIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const EtsyIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M9.16033,4.038c0-.27174.02717-.43478.48913-.43478h6.22283c1.087,0,1.68478.92391,2.11957,2.663l.35326,1.38587h1.05978C19.59511,3.712,19.75815,2,19.75815,2s-2.663.29891-4.23913.29891h-7.962L3.29076,2.163v1.1413L4.731,3.57609c1.00543.19022,1.25.40761,1.33152,1.33152,0,0,.08152,2.71739.08152,7.20109s-.08152,7.17391-.08152,7.17391c0,.81522-.32609,1.11413-1.33152,1.30435l-1.44022.27174V22l4.2663-.13587h7.11957c1.60326,0,5.32609.13587,5.32609.13587.08152-.97826.625-5.40761.70652-5.89674H19.7038L18.644,18.52174c-.84239,1.90217-2.06522,2.038-3.42391,2.038H11.1712c-1.3587,0-2.01087-.54348-2.01087-1.712V12.65217s3.0163,0,3.99457.08152c.76087.05435,1.22283.27174,1.46739,1.33152l.32609,1.413h1.16848l-.08152-3.55978.163-3.587H15.02989l-.38043,1.57609c-.24457,1.03261-.40761,1.22283-1.46739,1.33152-1.38587.13587-4.02174.1087-4.02174.1087Z" })); @@ -49413,12 +52260,12 @@ const EtsyIcon = () => (0,external_wp_element_namespaceObject.createElement)(ext * WordPress dependencies */ -const FacebookIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const FacebookIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z" })); @@ -49428,12 +52275,12 @@ const FacebookIcon = () => (0,external_wp_element_namespaceObject.createElement) * WordPress dependencies */ -const FeedIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const FeedIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M2,8.667V12c5.515,0,10,4.485,10,10h3.333C15.333,14.637,9.363,8.667,2,8.667z M2,2v3.333 c9.19,0,16.667,7.477,16.667,16.667H22C22,10.955,13.045,2,2,2z M4.5,17C3.118,17,2,18.12,2,19.5S3.118,22,4.5,22S7,20.88,7,19.5 S5.882,17,4.5,17z" })); @@ -49443,12 +52290,12 @@ const FeedIcon = () => (0,external_wp_element_namespaceObject.createElement)(ext * WordPress dependencies */ -const FlickrIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const FlickrIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M6.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5S9.25,7,6.5,7z M17.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5 S20.25,7,17.5,7z" })); @@ -49458,12 +52305,12 @@ const FlickrIcon = () => (0,external_wp_element_namespaceObject.createElement)(e * WordPress dependencies */ -const FoursquareIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const FoursquareIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M17.573,2c0,0-9.197,0-10.668,0S5,3.107,5,3.805s0,16.948,0,16.948c0,0.785,0.422,1.077,0.66,1.172 c0.238,0.097,0.892,0.177,1.285-0.275c0,0,5.035-5.843,5.122-5.93c0.132-0.132,0.132-0.132,0.262-0.132h3.26 c1.368,0,1.588-0.977,1.732-1.552c0.078-0.318,0.692-3.428,1.225-6.122l0.675-3.368C19.56,2.893,19.14,2,17.573,2z M16.495,7.22 c-0.053,0.252-0.372,0.518-0.665,0.518c-0.293,0-4.157,0-4.157,0c-0.467,0-0.802,0.318-0.802,0.787v0.508 c0,0.467,0.337,0.798,0.805,0.798c0,0,3.197,0,3.528,0s0.655,0.362,0.583,0.715c-0.072,0.353-0.407,2.102-0.448,2.295 c-0.04,0.193-0.262,0.523-0.655,0.523c-0.33,0-2.88,0-2.88,0c-0.523,0-0.683,0.068-1.033,0.503 c-0.35,0.437-3.505,4.223-3.505,4.223c-0.032,0.035-0.063,0.027-0.063-0.015V4.852c0-0.298,0.26-0.648,0.648-0.648 c0,0,8.228,0,8.562,0c0.315,0,0.61,0.297,0.528,0.683L16.495,7.22z" })); @@ -49473,12 +52320,12 @@ const FoursquareIcon = () => (0,external_wp_element_namespaceObject.createElemen * WordPress dependencies */ -const GoodreadsIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const GoodreadsIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M17.3,17.5c-0.2,0.8-0.5,1.4-1,1.9c-0.4,0.5-1,0.9-1.7,1.2C13.9,20.9,13.1,21,12,21c-0.6,0-1.3-0.1-1.9-0.2 c-0.6-0.1-1.1-0.4-1.6-0.7c-0.5-0.3-0.9-0.7-1.2-1.2c-0.3-0.5-0.5-1.1-0.5-1.7h1.5c0.1,0.5,0.2,0.9,0.5,1.2 c0.2,0.3,0.5,0.6,0.9,0.8c0.3,0.2,0.7,0.3,1.1,0.4c0.4,0.1,0.8,0.1,1.2,0.1c1.4,0,2.5-0.4,3.1-1.2c0.6-0.8,1-2,1-3.5v-1.7h0 c-0.4,0.8-0.9,1.4-1.6,1.9c-0.7,0.5-1.5,0.7-2.4,0.7c-1,0-1.9-0.2-2.6-0.5C8.7,15,8.1,14.5,7.7,14c-0.5-0.6-0.8-1.3-1-2.1 c-0.2-0.8-0.3-1.6-0.3-2.5c0-0.9,0.1-1.7,0.4-2.5c0.3-0.8,0.6-1.5,1.1-2c0.5-0.6,1.1-1,1.8-1.4C10.3,3.2,11.1,3,12,3 c0.5,0,0.9,0.1,1.3,0.2c0.4,0.1,0.8,0.3,1.1,0.5c0.3,0.2,0.6,0.5,0.9,0.8c0.3,0.3,0.5,0.6,0.6,1h0V3.4h1.5V15 C17.6,15.9,17.5,16.7,17.3,17.5z M13.8,14.1c0.5-0.3,0.9-0.7,1.3-1.1c0.3-0.5,0.6-1,0.8-1.6c0.2-0.6,0.3-1.2,0.3-1.9 c0-0.6-0.1-1.2-0.2-1.9c-0.1-0.6-0.4-1.2-0.7-1.7c-0.3-0.5-0.7-0.9-1.3-1.2c-0.5-0.3-1.1-0.5-1.9-0.5s-1.4,0.2-1.9,0.5 c-0.5,0.3-1,0.7-1.3,1.2C8.5,6.4,8.3,7,8.1,7.6C8,8.2,7.9,8.9,7.9,9.5c0,0.6,0.1,1.3,0.2,1.9C8.3,12,8.6,12.5,8.9,13 c0.3,0.5,0.8,0.8,1.3,1.1c0.5,0.3,1.1,0.4,1.9,0.4C12.7,14.5,13.3,14.4,13.8,14.1z" })); @@ -49488,12 +52335,12 @@ const GoodreadsIcon = () => (0,external_wp_element_namespaceObject.createElement * WordPress dependencies */ -const GoogleIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const GoogleIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M12.02,10.18v3.72v0.01h5.51c-0.26,1.57-1.67,4.22-5.5,4.22c-3.31,0-6.01-2.75-6.01-6.12s2.7-6.12,6.01-6.12 c1.87,0,3.13,0.8,3.85,1.48l2.84-2.76C16.99,2.99,14.73,2,12.03,2c-5.52,0-10,4.48-10,10s4.48,10,10,10c5.77,0,9.6-4.06,9.6-9.77 c0-0.83-0.11-1.42-0.25-2.05H12.02z" })); @@ -49503,27 +52350,42 @@ const GoogleIcon = () => (0,external_wp_element_namespaceObject.createElement)(e * WordPress dependencies */ -const GitHubIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const GitHubIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z" })); +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/gravatar.js + +/** + * WordPress dependencies + */ + +const GravatarIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { + width: "24", + height: "24", + viewBox: "0 0 24 24", + version: "1.1" +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { + d: "M10.8001 4.69937V10.6494C10.8001 11.1001 10.9791 11.5323 11.2978 11.851C11.6165 12.1697 12.0487 12.3487 12.4994 12.3487C12.9501 12.3487 13.3824 12.1697 13.7011 11.851C14.0198 11.5323 14.1988 11.1001 14.1988 10.6494V6.69089C15.2418 7.05861 16.1371 7.75537 16.7496 8.67617C17.3622 9.59698 17.6589 10.6919 17.595 11.796C17.5311 12.9001 17.1101 13.9535 16.3954 14.7975C15.6807 15.6415 14.711 16.2303 13.6325 16.4753C12.5541 16.7202 11.4252 16.608 10.4161 16.1555C9.40691 15.703 8.57217 14.9348 8.03763 13.9667C7.50308 12.9985 7.29769 11.8828 7.45242 10.7877C7.60714 9.69266 8.11359 8.67755 8.89545 7.89537C9.20904 7.57521 9.38364 7.14426 9.38132 6.69611C9.37899 6.24797 9.19994 5.81884 8.88305 5.50195C8.56616 5.18506 8.13704 5.00601 7.68889 5.00369C7.24075 5.00137 6.80979 5.17597 6.48964 5.48956C5.09907 6.8801 4.23369 8.7098 4.04094 10.6669C3.84819 12.624 4.34 14.5873 5.43257 16.2224C6.52515 17.8575 8.15088 19.0632 10.0328 19.634C11.9146 20.2049 13.9362 20.1055 15.753 19.3529C17.5699 18.6003 19.0695 17.241 19.9965 15.5066C20.9234 13.7722 21.2203 11.7701 20.8366 9.84133C20.4528 7.91259 19.4122 6.17658 17.892 4.92911C16.3717 3.68163 14.466 2.99987 12.4994 3C12.0487 3 11.6165 3.17904 11.2978 3.49773C10.9791 3.81643 10.8001 4.24867 10.8001 4.69937Z" +})); + ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/instagram.js /** * WordPress dependencies */ -const InstagramIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const InstagramIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M12,4.622c2.403,0,2.688,0.009,3.637,0.052c0.877,0.04,1.354,0.187,1.671,0.31c0.42,0.163,0.72,0.358,1.035,0.673 c0.315,0.315,0.51,0.615,0.673,1.035c0.123,0.317,0.27,0.794,0.31,1.671c0.043,0.949,0.052,1.234,0.052,3.637 s-0.009,2.688-0.052,3.637c-0.04,0.877-0.187,1.354-0.31,1.671c-0.163,0.42-0.358,0.72-0.673,1.035 c-0.315,0.315-0.615,0.51-1.035,0.673c-0.317,0.123-0.794,0.27-1.671,0.31c-0.949,0.043-1.233,0.052-3.637,0.052 s-2.688-0.009-3.637-0.052c-0.877-0.04-1.354-0.187-1.671-0.31c-0.42-0.163-0.72-0.358-1.035-0.673 c-0.315-0.315-0.51-0.615-0.673-1.035c-0.123-0.317-0.27-0.794-0.31-1.671C4.631,14.688,4.622,14.403,4.622,12 s0.009-2.688,0.052-3.637c0.04-0.877,0.187-1.354,0.31-1.671c0.163-0.42,0.358-0.72,0.673-1.035 c0.315-0.315,0.615-0.51,1.035-0.673c0.317-0.123,0.794-0.27,1.671-0.31C9.312,4.631,9.597,4.622,12,4.622 M12,3 C9.556,3,9.249,3.01,8.289,3.054C7.331,3.098,6.677,3.25,6.105,3.472C5.513,3.702,5.011,4.01,4.511,4.511 c-0.5,0.5-0.808,1.002-1.038,1.594C3.25,6.677,3.098,7.331,3.054,8.289C3.01,9.249,3,9.556,3,12c0,2.444,0.01,2.751,0.054,3.711 c0.044,0.958,0.196,1.612,0.418,2.185c0.23,0.592,0.538,1.094,1.038,1.594c0.5,0.5,1.002,0.808,1.594,1.038 c0.572,0.222,1.227,0.375,2.185,0.418C9.249,20.99,9.556,21,12,21s2.751-0.01,3.711-0.054c0.958-0.044,1.612-0.196,2.185-0.418 c0.592-0.23,1.094-0.538,1.594-1.038c0.5-0.5,0.808-1.002,1.038-1.594c0.222-0.572,0.375-1.227,0.418-2.185 C20.99,14.751,21,14.444,21,12s-0.01-2.751-0.054-3.711c-0.044-0.958-0.196-1.612-0.418-2.185c-0.23-0.592-0.538-1.094-1.038-1.594 c-0.5-0.5-1.002-0.808-1.594-1.038c-0.572-0.222-1.227-0.375-2.185-0.418C14.751,3.01,14.444,3,12,3L12,3z M12,7.378 c-2.552,0-4.622,2.069-4.622,4.622S9.448,16.622,12,16.622s4.622-2.069,4.622-4.622S14.552,7.378,12,7.378z M12,15 c-1.657,0-3-1.343-3-3s1.343-3,3-3s3,1.343,3,3S13.657,15,12,15z M16.804,6.116c-0.596,0-1.08,0.484-1.08,1.08 s0.484,1.08,1.08,1.08c0.596,0,1.08-0.484,1.08-1.08S17.401,6.116,16.804,6.116z" })); @@ -49533,12 +52395,12 @@ const InstagramIcon = () => (0,external_wp_element_namespaceObject.createElement * WordPress dependencies */ -const LastfmIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const LastfmIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M 12.0002 1.5 C 6.2006 1.5 1.5 6.2011 1.5 11.9998 C 1.5 17.799 6.2006 22.5 12.0002 22.5 C 17.799 22.5 22.5 17.799 22.5 11.9998 C 22.5 6.2011 17.799 1.5 12.0002 1.5 Z M 16.1974 16.2204 C 14.8164 16.2152 13.9346 15.587 13.3345 14.1859 L 13.1816 13.8451 L 11.8541 10.8101 C 11.4271 9.7688 10.3526 9.0712 9.1801 9.0712 C 7.5695 9.0712 6.2593 10.3851 6.2593 12.001 C 6.2593 13.6165 7.5695 14.9303 9.1801 14.9303 C 10.272 14.9303 11.2651 14.3275 11.772 13.3567 C 11.7893 13.3235 11.8239 13.302 11.863 13.3038 C 11.9007 13.3054 11.9353 13.3288 11.9504 13.3632 L 12.4865 14.6046 C 12.5016 14.639 12.4956 14.6778 12.4723 14.7069 C 11.6605 15.6995 10.4602 16.2683 9.1801 16.2683 C 6.8331 16.2683 4.9234 14.3536 4.9234 12.001 C 4.9234 9.6468 6.833 7.732 9.1801 7.732 C 10.9572 7.732 12.3909 8.6907 13.1138 10.3636 C 13.1206 10.3802 13.8412 12.0708 14.4744 13.5191 C 14.8486 14.374 15.1462 14.896 16.1288 14.9292 C 17.0663 14.9613 17.7538 14.4122 17.7538 13.6485 C 17.7538 12.9691 17.3321 12.8004 16.3803 12.4822 C 14.7365 11.9398 13.845 11.3861 13.845 10.0182 C 13.845 8.6809 14.7667 7.8162 16.192 7.8162 C 17.1288 7.8162 17.8155 8.2287 18.2921 9.0768 C 18.305 9.1006 18.3079 9.1281 18.3004 9.1542 C 18.2929 9.1803 18.2748 9.2021 18.2507 9.2138 L 17.3614 9.669 C 17.3178 9.692 17.2643 9.6781 17.2356 9.6385 C 16.9329 9.2135 16.5956 9.0251 16.1423 9.0251 C 15.5512 9.0251 15.122 9.429 15.122 9.9865 C 15.122 10.6738 15.6529 10.8414 16.5339 11.1192 C 16.6491 11.1558 16.7696 11.194 16.8939 11.2343 C 18.2763 11.6865 19.0768 12.2311 19.0768 13.6836 C 19.0769 15.1297 17.8389 16.2204 16.1974 16.2204 Z" })); @@ -49548,12 +52410,12 @@ const LastfmIcon = () => (0,external_wp_element_namespaceObject.createElement)(e * WordPress dependencies */ -const LinkedInIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const LinkedInIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z" })); @@ -49563,12 +52425,12 @@ const LinkedInIcon = () => (0,external_wp_element_namespaceObject.createElement) * WordPress dependencies */ -const MailIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const MailIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm.5 12c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l7.5 5.6 7.5-5.6V17zm0-9.1L12 13.6 4.5 7.9V7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v.9z" })); @@ -49578,12 +52440,12 @@ const MailIcon = () => (0,external_wp_element_namespaceObject.createElement)(ext * WordPress dependencies */ -const MastodonIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const MastodonIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M23.193 7.879c0-5.206-3.411-6.732-3.411-6.732C18.062.357 15.108.025 12.041 0h-.076c-3.068.025-6.02.357-7.74 1.147 0 0-3.411 1.526-3.411 6.732 0 1.192-.023 2.618.015 4.129.124 5.092.934 10.109 5.641 11.355 2.17.574 4.034.695 5.535.612 2.722-.15 4.25-.972 4.25-.972l-.09-1.975s-1.945.613-4.129.539c-2.165-.074-4.449-.233-4.799-2.891a5.499 5.499 0 0 1-.048-.745s2.125.52 4.817.643c1.646.075 3.19-.097 4.758-.283 3.007-.359 5.625-2.212 5.954-3.905.517-2.665.475-6.507.475-6.507zm-4.024 6.709h-2.497V8.469c0-1.29-.543-1.944-1.628-1.944-1.2 0-1.802.776-1.802 2.312v3.349h-2.483v-3.35c0-1.536-.602-2.312-1.802-2.312-1.085 0-1.628.655-1.628 1.944v6.119H4.832V8.284c0-1.289.328-2.313.987-3.07.68-.758 1.569-1.146 2.674-1.146 1.278 0 2.246.491 2.886 1.474L12 6.585l.622-1.043c.64-.983 1.608-1.474 2.886-1.474 1.104 0 1.994.388 2.674 1.146.658.757.986 1.781.986 3.07v6.304z" })); @@ -49593,12 +52455,12 @@ const MastodonIcon = () => (0,external_wp_element_namespaceObject.createElement) * WordPress dependencies */ -const MeetupIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const MeetupIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M19.24775,14.722a3.57032,3.57032,0,0,1-2.94457,3.52073,3.61886,3.61886,0,0,1-.64652.05634c-.07314-.0008-.10187.02846-.12507.09547A2.38881,2.38881,0,0,1,13.49453,20.094a2.33092,2.33092,0,0,1-1.827-.50716.13635.13635,0,0,0-.19878-.00408,3.191,3.191,0,0,1-2.104.60248,3.26309,3.26309,0,0,1-3.00324-2.71993,2.19076,2.19076,0,0,1-.03512-.30865c-.00156-.08579-.03413-.1189-.11608-.13493a2.86421,2.86421,0,0,1-1.23189-.56111,2.945,2.945,0,0,1-1.166-2.05749,2.97484,2.97484,0,0,1,.87524-2.50774.112.112,0,0,0,.02091-.16107,2.7213,2.7213,0,0,1-.36648-1.48A2.81256,2.81256,0,0,1,6.57673,7.58838a.35764.35764,0,0,0,.28869-.22819,4.2208,4.2208,0,0,1,6.02892-1.90111.25161.25161,0,0,0,.22023.0243,3.65608,3.65608,0,0,1,3.76031.90678A3.57244,3.57244,0,0,1,17.95918,8.626a2.97339,2.97339,0,0,1,.01829.57356.10637.10637,0,0,0,.0853.12792,1.97669,1.97669,0,0,1,1.27939,1.33733,2.00266,2.00266,0,0,1-.57112,2.12652c-.05284.05166-.04168.08328-.01173.13489A3.51189,3.51189,0,0,1,19.24775,14.722Zm-6.35959-.27836a1.6984,1.6984,0,0,0,1.14556,1.61113,3.82039,3.82039,0,0,0,1.036.17935,1.46888,1.46888,0,0,0,.73509-.12255.44082.44082,0,0,0,.26057-.44274.45312.45312,0,0,0-.29211-.43375.97191.97191,0,0,0-.20678-.063c-.21326-.03806-.42754-.0701-.63973-.11215a.54787.54787,0,0,1-.50172-.60926,2.75864,2.75864,0,0,1,.1773-.901c.1763-.535.414-1.045.64183-1.55913A12.686,12.686,0,0,0,15.85,10.47863a1.58461,1.58461,0,0,0,.04861-.87208,1.04531,1.04531,0,0,0-.85432-.83981,1.60658,1.60658,0,0,0-1.23654.16594.27593.27593,0,0,1-.36286-.03413c-.085-.0747-.16594-.15379-.24918-.23055a.98682.98682,0,0,0-1.33577-.04933,6.1468,6.1468,0,0,1-.4989.41615.47762.47762,0,0,1-.51535.03566c-.17448-.09307-.35512-.175-.53531-.25665a1.74949,1.74949,0,0,0-.56476-.2016,1.69943,1.69943,0,0,0-1.61654.91787,8.05815,8.05815,0,0,0-.32952.80126c-.45471,1.2557-.82507,2.53825-1.20838,3.81639a1.24151,1.24151,0,0,0,.51532,1.44389,1.42659,1.42659,0,0,0,1.22008.17166,1.09728,1.09728,0,0,0,.66994-.69764c.44145-1.04111.839-2.09989,1.25981-3.14926.11581-.28876.22792-.57874.35078-.86438a.44548.44548,0,0,1,.69189-.19539.50521.50521,0,0,1,.15044.43836,1.75625,1.75625,0,0,1-.14731.50453c-.27379.69219-.55265,1.38236-.82766,2.074a2.0836,2.0836,0,0,0-.14038.42876.50719.50719,0,0,0,.27082.57722.87236.87236,0,0,0,.66145.02739.99137.99137,0,0,0,.53406-.532q.61571-1.20914,1.228-2.42031.28423-.55863.57585-1.1133a.87189.87189,0,0,1,.29055-.35253.34987.34987,0,0,1,.37634-.01265.30291.30291,0,0,1,.12434.31459.56716.56716,0,0,1-.04655.1915c-.05318.12739-.10286.25669-.16183.38156-.34118.71775-.68754,1.43273-1.02568,2.152A2.00213,2.00213,0,0,0,12.88816,14.44366Zm4.78568,5.28972a.88573.88573,0,0,0-1.77139.00465.8857.8857,0,0,0,1.77139-.00465Zm-14.83838-7.296a.84329.84329,0,1,0,.00827-1.68655.8433.8433,0,0,0-.00827,1.68655Zm10.366-9.43673a.83506.83506,0,1,0-.0091,1.67.83505.83505,0,0,0,.0091-1.67Zm6.85014,5.22a.71651.71651,0,0,0-1.433.0093.71656.71656,0,0,0,1.433-.0093ZM5.37528,6.17908A.63823.63823,0,1,0,6.015,5.54483.62292.62292,0,0,0,5.37528,6.17908Zm6.68214,14.80843a.54949.54949,0,1,0-.55052.541A.54556.54556,0,0,0,12.05742,20.98752Zm8.53235-8.49689a.54777.54777,0,0,0-.54027.54023.53327.53327,0,0,0,.532.52293.51548.51548,0,0,0,.53272-.5237A.53187.53187,0,0,0,20.58977,12.49063ZM7.82846,2.4715a.44927.44927,0,1,0,.44484.44766A.43821.43821,0,0,0,7.82846,2.4715Zm13.775,7.60492a.41186.41186,0,0,0-.40065.39623.40178.40178,0,0,0,.40168.40168A.38994.38994,0,0,0,22,10.48172.39946.39946,0,0,0,21.60349,10.07642ZM5.79193,17.96207a.40469.40469,0,0,0-.397-.39646.399.399,0,0,0-.396.405.39234.39234,0,0,0,.39939.389A.39857.39857,0,0,0,5.79193,17.96207Z" })); @@ -49608,12 +52470,12 @@ const MeetupIcon = () => (0,external_wp_element_namespaceObject.createElement)(e * WordPress dependencies */ -const MediumIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const MediumIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M20.962,7.257l-5.457,8.867l-3.923-6.375l3.126-5.08c0.112-0.182,0.319-0.286,0.527-0.286c0.05,0,0.1,0.008,0.149,0.02 c0.039,0.01,0.078,0.023,0.114,0.041l5.43,2.715l0.006,0.003c0.004,0.002,0.007,0.006,0.011,0.008 C20.971,7.191,20.98,7.227,20.962,7.257z M9.86,8.592v5.783l5.14,2.57L9.86,8.592z M15.772,17.331l4.231,2.115 C20.554,19.721,21,19.529,21,19.016V8.835L15.772,17.331z M8.968,7.178L3.665,4.527C3.569,4.479,3.478,4.456,3.395,4.456 C3.163,4.456,3,4.636,3,4.938v11.45c0,0.306,0.224,0.669,0.498,0.806l4.671,2.335c0.12,0.06,0.234,0.088,0.337,0.088 c0.29,0,0.494-0.225,0.494-0.602V7.231C9,7.208,8.988,7.188,8.968,7.178z" })); @@ -49623,20 +52485,13 @@ const MediumIcon = () => (0,external_wp_element_namespaceObject.createElement)(e * WordPress dependencies */ -const PatreonIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const PatreonIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", - viewBox: "0 0 569 546", + viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Circle, { - cx: "363", - cy: "205", - r: "205" -}), (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Rect, { - width: "100", - height: "546", - x: "0", - y: "0" +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { + d: "M20 8.40755C19.9969 6.10922 18.2543 4.22555 16.2097 3.54588C13.6708 2.70188 10.3222 2.82421 7.89775 3.99921C4.95932 5.42355 4.03626 8.54355 4.00186 11.6552C3.97363 14.2136 4.2222 20.9517 7.92225 20.9997C10.6715 21.0356 11.0809 17.3967 12.3529 15.6442C13.258 14.3974 14.4233 14.0452 15.8578 13.6806C18.3233 13.0537 20.0036 11.0551 20 8.40755Z" })); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/pinterest.js @@ -49645,12 +52500,12 @@ const PatreonIcon = () => (0,external_wp_element_namespaceObject.createElement)( * WordPress dependencies */ -const PinterestIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const PinterestIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2" })); @@ -49660,12 +52515,12 @@ const PinterestIcon = () => (0,external_wp_element_namespaceObject.createElement * WordPress dependencies */ -const PocketIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const PocketIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M21.927,4.194C21.667,3.48,20.982,3,20.222,3h-0.01h-1.721H3.839C3.092,3,2.411,3.47,2.145,4.17 C2.066,4.378,2.026,4.594,2.026,4.814v6.035l0.069,1.2c0.29,2.73,1.707,5.115,3.899,6.778c0.039,0.03,0.079,0.059,0.119,0.089 l0.025,0.018c1.175,0.859,2.491,1.441,3.91,1.727c0.655,0.132,1.325,0.2,1.991,0.2c0.615,0,1.232-0.057,1.839-0.17 c0.073-0.014,0.145-0.028,0.219-0.044c0.02-0.004,0.042-0.012,0.064-0.023c1.359-0.297,2.621-0.864,3.753-1.691l0.025-0.018 c0.04-0.029,0.08-0.058,0.119-0.089c2.192-1.664,3.609-4.049,3.898-6.778l0.069-1.2V4.814C22.026,4.605,22,4.398,21.927,4.194z M17.692,10.481l-4.704,4.512c-0.266,0.254-0.608,0.382-0.949,0.382c-0.342,0-0.684-0.128-0.949-0.382l-4.705-4.512 C5.838,9.957,5.82,9.089,6.344,8.542c0.524-0.547,1.392-0.565,1.939-0.04l3.756,3.601l3.755-3.601 c0.547-0.524,1.415-0.506,1.939,0.04C18.256,9.089,18.238,9.956,17.692,10.481z" })); @@ -49675,12 +52530,12 @@ const PocketIcon = () => (0,external_wp_element_namespaceObject.createElement)(e * WordPress dependencies */ -const RedditIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const RedditIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M22 12.068a2.184 2.184 0 0 0-2.186-2.186c-.592 0-1.13.233-1.524.609-1.505-1.075-3.566-1.774-5.86-1.864l1.004-4.695 3.261.699A1.56 1.56 0 1 0 18.255 3c-.61-.001-1.147.357-1.398.877l-3.638-.77a.382.382 0 0 0-.287.053.348.348 0 0 0-.161.251l-1.112 5.233c-2.33.072-4.426.77-5.95 1.864a2.201 2.201 0 0 0-1.523-.61 2.184 2.184 0 0 0-.896 4.176c-.036.215-.053.43-.053.663 0 3.37 3.924 6.111 8.763 6.111s8.763-2.724 8.763-6.11c0-.216-.017-.449-.053-.664A2.207 2.207 0 0 0 22 12.068Zm-15.018 1.56a1.56 1.56 0 0 1 3.118 0c0 .86-.699 1.558-1.559 1.558-.86.018-1.559-.699-1.559-1.559Zm8.728 4.139c-1.076 1.075-3.119 1.147-3.71 1.147-.61 0-2.652-.09-3.71-1.147a.4.4 0 0 1 0-.573.4.4 0 0 1 .574 0c.68.68 2.114.914 3.136.914 1.022 0 2.473-.233 3.136-.914a.4.4 0 0 1 .574 0 .436.436 0 0 1 0 .573Zm-.287-2.563a1.56 1.56 0 0 1 0-3.118c.86 0 1.56.699 1.56 1.56 0 .841-.7 1.558-1.56 1.558Z" })); @@ -49690,12 +52545,12 @@ const RedditIcon = () => (0,external_wp_element_namespaceObject.createElement)(e * WordPress dependencies */ -const SkypeIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const SkypeIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M10.113,2.699c0.033-0.006,0.067-0.013,0.1-0.02c0.033,0.017,0.066,0.033,0.098,0.051L10.113,2.699z M2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223z M21.275,13.771 c0.007-0.035,0.011-0.071,0.018-0.106c-0.018-0.031-0.033-0.064-0.052-0.095L21.275,13.771z M13.563,21.199 c0.032,0.019,0.065,0.035,0.096,0.053c0.036-0.006,0.071-0.011,0.105-0.017L13.563,21.199z M22,16.386 c0,1.494-0.581,2.898-1.637,3.953c-1.056,1.057-2.459,1.637-3.953,1.637c-0.967,0-1.914-0.251-2.75-0.725 c0.036-0.006,0.071-0.011,0.105-0.017l-0.202-0.035c0.032,0.019,0.065,0.035,0.096,0.053c-0.543,0.096-1.099,0.147-1.654,0.147 c-1.275,0-2.512-0.25-3.676-0.743c-1.125-0.474-2.135-1.156-3.002-2.023c-0.867-0.867-1.548-1.877-2.023-3.002 c-0.493-1.164-0.743-2.401-0.743-3.676c0-0.546,0.049-1.093,0.142-1.628c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103C2.244,9.5,2,8.566,2,7.615c0-1.493,0.582-2.898,1.637-3.953 c1.056-1.056,2.46-1.638,3.953-1.638c0.915,0,1.818,0.228,2.622,0.655c-0.033,0.007-0.067,0.013-0.1,0.02l0.199,0.031 c-0.032-0.018-0.066-0.034-0.098-0.051c0.002,0,0.003-0.001,0.004-0.001c0.586-0.112,1.187-0.169,1.788-0.169 c1.275,0,2.512,0.249,3.676,0.742c1.124,0.476,2.135,1.156,3.002,2.024c0.868,0.867,1.548,1.877,2.024,3.002 c0.493,1.164,0.743,2.401,0.743,3.676c0,0.575-0.054,1.15-0.157,1.712c-0.018-0.031-0.033-0.064-0.052-0.095l0.034,0.201 c0.007-0.035,0.011-0.071,0.018-0.106C21.754,14.494,22,15.432,22,16.386z M16.817,14.138c0-1.331-0.613-2.743-3.033-3.282 l-2.209-0.49c-0.84-0.192-1.807-0.444-1.807-1.237c0-0.794,0.679-1.348,1.903-1.348c2.468,0,2.243,1.696,3.468,1.696 c0.645,0,1.209-0.379,1.209-1.031c0-1.521-2.435-2.663-4.5-2.663c-2.242,0-4.63,0.952-4.63,3.488c0,1.221,0.436,2.521,2.839,3.123 l2.984,0.745c0.903,0.223,1.129,0.731,1.129,1.189c0,0.762-0.758,1.507-2.129,1.507c-2.679,0-2.307-2.062-3.743-2.062 c-0.645,0-1.113,0.444-1.113,1.078c0,1.236,1.501,2.886,4.856,2.886C15.236,17.737,16.817,16.199,16.817,14.138z" })); @@ -49705,12 +52560,12 @@ const SkypeIcon = () => (0,external_wp_element_namespaceObject.createElement)(ex * WordPress dependencies */ -const SnapchatIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const SnapchatIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M12.065,2a5.526,5.526,0,0,1,3.132.892A5.854,5.854,0,0,1,17.326,5.4a5.821,5.821,0,0,1,.351,2.33q0,.612-.117,2.487a.809.809,0,0,0,.365.091,1.93,1.93,0,0,0,.664-.176,1.93,1.93,0,0,1,.664-.176,1.3,1.3,0,0,1,.729.234.7.7,0,0,1,.351.6.839.839,0,0,1-.41.7,2.732,2.732,0,0,1-.9.41,3.192,3.192,0,0,0-.9.378.728.728,0,0,0-.41.618,1.575,1.575,0,0,0,.156.56,6.9,6.9,0,0,0,1.334,1.953,5.6,5.6,0,0,0,1.881,1.315,5.875,5.875,0,0,0,1.042.3.42.42,0,0,1,.365.456q0,.911-2.852,1.341a1.379,1.379,0,0,0-.143.507,1.8,1.8,0,0,1-.182.605.451.451,0,0,1-.429.241,5.878,5.878,0,0,1-.807-.085,5.917,5.917,0,0,0-.833-.085,4.217,4.217,0,0,0-.807.065,2.42,2.42,0,0,0-.82.293,6.682,6.682,0,0,0-.755.5q-.351.267-.755.527a3.886,3.886,0,0,1-.989.436A4.471,4.471,0,0,1,11.831,22a4.307,4.307,0,0,1-1.256-.176,3.784,3.784,0,0,1-.976-.436q-.4-.26-.749-.527a6.682,6.682,0,0,0-.755-.5,2.422,2.422,0,0,0-.807-.293,4.432,4.432,0,0,0-.82-.065,5.089,5.089,0,0,0-.853.1,5,5,0,0,1-.762.1.474.474,0,0,1-.456-.241,1.819,1.819,0,0,1-.182-.618,1.411,1.411,0,0,0-.143-.521q-2.852-.429-2.852-1.341a.42.42,0,0,1,.365-.456,5.793,5.793,0,0,0,1.042-.3,5.524,5.524,0,0,0,1.881-1.315,6.789,6.789,0,0,0,1.334-1.953A1.575,1.575,0,0,0,6,12.9a.728.728,0,0,0-.41-.618,3.323,3.323,0,0,0-.9-.384,2.912,2.912,0,0,1-.9-.41.814.814,0,0,1-.41-.684.71.71,0,0,1,.338-.593,1.208,1.208,0,0,1,.716-.241,1.976,1.976,0,0,1,.625.169,2.008,2.008,0,0,0,.69.169.919.919,0,0,0,.416-.091q-.117-1.849-.117-2.474A5.861,5.861,0,0,1,6.385,5.4,5.516,5.516,0,0,1,8.625,2.819,7.075,7.075,0,0,1,12.062,2Z" })); @@ -49720,12 +52575,12 @@ const SnapchatIcon = () => (0,external_wp_element_namespaceObject.createElement) * WordPress dependencies */ -const SoundCloudIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const SoundCloudIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M8.9,16.1L9,14L8.9,9.5c0-0.1,0-0.1-0.1-0.1c0,0-0.1-0.1-0.1-0.1c-0.1,0-0.1,0-0.1,0.1c0,0-0.1,0.1-0.1,0.1L8.3,14l0.1,2.1 c0,0.1,0,0.1,0.1,0.1c0,0,0.1,0.1,0.1,0.1C8.8,16.3,8.9,16.3,8.9,16.1z M11.4,15.9l0.1-1.8L11.4,9c0-0.1,0-0.2-0.1-0.2 c0,0-0.1,0-0.1,0s-0.1,0-0.1,0c-0.1,0-0.1,0.1-0.1,0.2l0,0.1l-0.1,5c0,0,0,0.7,0.1,2v0c0,0.1,0,0.1,0.1,0.1c0.1,0.1,0.1,0.1,0.2,0.1 c0.1,0,0.1,0,0.2-0.1c0.1,0,0.1-0.1,0.1-0.2L11.4,15.9z M2.4,12.9L2.5,14l-0.2,1.1c0,0.1,0,0.1-0.1,0.1c0,0-0.1,0-0.1-0.1L2.1,14 l0.1-1.1C2.2,12.9,2.3,12.9,2.4,12.9C2.3,12.9,2.4,12.9,2.4,12.9z M3.1,12.2L3.3,14l-0.2,1.8c0,0.1,0,0.1-0.1,0.1 c-0.1,0-0.1,0-0.1-0.1L2.8,14L3,12.2C3,12.2,3,12.2,3.1,12.2C3.1,12.2,3.1,12.2,3.1,12.2z M3.9,11.9L4.1,14l-0.2,2.1 c0,0.1,0,0.1-0.1,0.1c-0.1,0-0.1,0-0.1-0.1L3.5,14l0.2-2.1c0-0.1,0-0.1,0.1-0.1C3.9,11.8,3.9,11.8,3.9,11.9z M4.7,11.9L4.9,14 l-0.2,2.1c0,0.1-0.1,0.1-0.1,0.1c-0.1,0-0.1,0-0.1-0.1L4.3,14l0.2-2.2c0-0.1,0-0.1,0.1-0.1C4.7,11.7,4.7,11.8,4.7,11.9z M5.6,12 l0.2,2l-0.2,2.1c0,0.1-0.1,0.1-0.1,0.1c0,0-0.1,0-0.1,0c0,0,0-0.1,0-0.1L5.1,14l0.2-2c0,0,0-0.1,0-0.1s0.1,0,0.1,0 C5.5,11.9,5.5,11.9,5.6,12L5.6,12z M6.4,10.7L6.6,14l-0.2,2.1c0,0,0,0.1,0,0.1c0,0-0.1,0-0.1,0c-0.1,0-0.1-0.1-0.2-0.2L5.9,14 l0.2-3.3c0-0.1,0.1-0.2,0.2-0.2c0,0,0.1,0,0.1,0C6.4,10.7,6.4,10.7,6.4,10.7z M7.2,10l0.2,4.1l-0.2,2.1c0,0,0,0.1,0,0.1 c0,0-0.1,0-0.1,0c-0.1,0-0.2-0.1-0.2-0.2l-0.1-2.1L6.8,10c0-0.1,0.1-0.2,0.2-0.2c0,0,0.1,0,0.1,0S7.2,9.9,7.2,10z M8,9.6L8.2,14 L8,16.1c0,0.1-0.1,0.2-0.2,0.2c-0.1,0-0.2-0.1-0.2-0.2L7.5,14l0.1-4.4c0-0.1,0-0.1,0.1-0.1c0,0,0.1-0.1,0.1-0.1c0.1,0,0.1,0,0.1,0.1 C8,9.6,8,9.6,8,9.6z M11.4,16.1L11.4,16.1L11.4,16.1z M9.7,9.6L9.8,14l-0.1,2.1c0,0.1,0,0.1-0.1,0.2s-0.1,0.1-0.2,0.1 c-0.1,0-0.1,0-0.1-0.1s-0.1-0.1-0.1-0.2L9.2,14l0.1-4.4c0-0.1,0-0.1,0.1-0.2s0.1-0.1,0.2-0.1c0.1,0,0.1,0,0.2,0.1S9.7,9.5,9.7,9.6 L9.7,9.6z M10.6,9.8l0.1,4.3l-0.1,2c0,0.1,0,0.1-0.1,0.2c0,0-0.1,0.1-0.2,0.1c-0.1,0-0.1,0-0.2-0.1c0,0-0.1-0.1-0.1-0.2L10,14 l0.1-4.3c0-0.1,0-0.1,0.1-0.2c0,0,0.1-0.1,0.2-0.1c0.1,0,0.1,0,0.2,0.1S10.6,9.7,10.6,9.8z M12.4,14l-0.1,2c0,0.1,0,0.1-0.1,0.2 c-0.1,0.1-0.1,0.1-0.2,0.1c-0.1,0-0.1,0-0.2-0.1c-0.1-0.1-0.1-0.1-0.1-0.2l-0.1-1l-0.1-1l0.1-5.5v0c0-0.1,0-0.2,0.1-0.2 c0.1,0,0.1-0.1,0.2-0.1c0,0,0.1,0,0.1,0c0.1,0,0.1,0.1,0.1,0.2L12.4,14z M22.1,13.9c0,0.7-0.2,1.3-0.7,1.7c-0.5,0.5-1.1,0.7-1.7,0.7 h-6.8c-0.1,0-0.1,0-0.2-0.1c-0.1-0.1-0.1-0.1-0.1-0.2V8.2c0-0.1,0.1-0.2,0.2-0.3c0.5-0.2,1-0.3,1.6-0.3c1.1,0,2.1,0.4,2.9,1.1 c0.8,0.8,1.3,1.7,1.4,2.8c0.3-0.1,0.6-0.2,1-0.2c0.7,0,1.3,0.2,1.7,0.7C21.8,12.6,22.1,13.2,22.1,13.9L22.1,13.9z" })); @@ -49735,12 +52590,12 @@ const SoundCloudIcon = () => (0,external_wp_element_namespaceObject.createElemen * WordPress dependencies */ -const SpotifyIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const SpotifyIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M12,2C6.477,2,2,6.477,2,12c0,5.523,4.477,10,10,10c5.523,0,10-4.477,10-10C22,6.477,17.523,2,12,2 M16.586,16.424 c-0.18,0.295-0.563,0.387-0.857,0.207c-2.348-1.435-5.304-1.76-8.785-0.964c-0.335,0.077-0.67-0.133-0.746-0.469 c-0.077-0.335,0.132-0.67,0.469-0.746c3.809-0.871,7.077-0.496,9.713,1.115C16.673,15.746,16.766,16.13,16.586,16.424 M17.81,13.7 c-0.226,0.367-0.706,0.482-1.072,0.257c-2.687-1.652-6.785-2.131-9.965-1.166C6.36,12.917,5.925,12.684,5.8,12.273 C5.675,11.86,5.908,11.425,6.32,11.3c3.632-1.102,8.147-0.568,11.234,1.328C17.92,12.854,18.035,13.335,17.81,13.7 M17.915,10.865 c-3.223-1.914-8.54-2.09-11.618-1.156C5.804,9.859,5.281,9.58,5.131,9.086C4.982,8.591,5.26,8.069,5.755,7.919 c3.532-1.072,9.404-0.865,13.115,1.338c0.445,0.264,0.59,0.838,0.327,1.282C18.933,10.983,18.359,11.129,17.915,10.865" })); @@ -49750,12 +52605,12 @@ const SpotifyIcon = () => (0,external_wp_element_namespaceObject.createElement)( * WordPress dependencies */ -const TelegramIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const TelegramIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 128 128", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M28.9700376,63.3244248 C47.6273373,55.1957357 60.0684594,49.8368063 66.2934036,47.2476366 C84.0668845,39.855031 87.7600616,38.5708563 90.1672227,38.528 C90.6966555,38.5191258 91.8804274,38.6503351 92.6472251,39.2725385 C93.294694,39.7979149 93.4728387,40.5076237 93.5580865,41.0057381 C93.6433345,41.5038525 93.7494885,42.63857 93.6651041,43.5252052 C92.7019529,53.6451182 88.5344133,78.2034783 86.4142057,89.5379542 C85.5170662,94.3339958 83.750571,95.9420841 82.0403991,96.0994568 C78.3237996,96.4414641 75.5015827,93.6432685 71.9018743,91.2836143 C66.2690414,87.5912212 63.0868492,85.2926952 57.6192095,81.6896017 C51.3004058,77.5256038 55.3966232,75.2369981 58.9976911,71.4967761 C59.9401076,70.5179421 76.3155302,55.6232293 76.6324771,54.2720454 C76.6721165,54.1030573 76.7089039,53.4731496 76.3346867,53.1405352 C75.9604695,52.8079208 75.4081573,52.921662 75.0095933,53.0121213 C74.444641,53.1403447 65.4461175,59.0880351 48.0140228,70.8551922 C45.4598218,72.6091037 43.1463059,73.4636682 41.0734751,73.4188859 C38.7883453,73.3695169 34.3926725,72.1268388 31.1249416,71.0646282 C27.1169366,69.7617838 23.931454,69.0729605 24.208838,66.8603276 C24.3533167,65.7078514 25.9403832,64.5292172 28.9700376,63.3244248 Z" })); @@ -49765,12 +52620,12 @@ const TelegramIcon = () => (0,external_wp_element_namespaceObject.createElement) * WordPress dependencies */ -const ThreadsIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const ThreadsIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M16.3 11.3c-.1 0-.2-.1-.2-.1-.1-2.6-1.5-4-3.9-4-1.4 0-2.6.6-3.3 1.7l1.3.9c.5-.8 1.4-1 2-1 .8 0 1.4.2 1.7.7.3.3.5.8.5 1.3-.7-.1-1.4-.2-2.2-.1-2.2.1-3.7 1.4-3.6 3.2 0 .9.5 1.7 1.3 2.2.7.4 1.5.6 2.4.6 1.2-.1 2.1-.5 2.7-1.3.5-.6.8-1.4.9-2.4.6.3 1 .8 1.2 1.3.4.9.4 2.4-.8 3.6-1.1 1.1-2.3 1.5-4.3 1.5-2.1 0-3.8-.7-4.8-2S5.7 14.3 5.7 12c0-2.3.5-4.1 1.5-5.4 1.1-1.3 2.7-2 4.8-2 2.2 0 3.8.7 4.9 2 .5.7.9 1.5 1.2 2.5l1.5-.4c-.3-1.2-.8-2.2-1.5-3.1-1.3-1.7-3.3-2.6-6-2.6-2.6 0-4.7.9-6 2.6C4.9 7.2 4.3 9.3 4.3 12s.6 4.8 1.9 6.4c1.4 1.7 3.4 2.6 6 2.6 2.3 0 4-.6 5.3-2 1.8-1.8 1.7-4 1.1-5.4-.4-.9-1.2-1.7-2.3-2.3zm-4 3.8c-1 .1-2-.4-2-1.3 0-.7.5-1.5 2.1-1.6h.5c.6 0 1.1.1 1.6.2-.2 2.3-1.3 2.7-2.2 2.7z" })); @@ -49780,12 +52635,12 @@ const ThreadsIcon = () => (0,external_wp_element_namespaceObject.createElement)( * WordPress dependencies */ -const TiktokIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const TiktokIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 32 32", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M16.708 0.027c1.745-0.027 3.48-0.011 5.213-0.027 0.105 2.041 0.839 4.12 2.333 5.563 1.491 1.479 3.6 2.156 5.652 2.385v5.369c-1.923-0.063-3.855-0.463-5.6-1.291-0.76-0.344-1.468-0.787-2.161-1.24-0.009 3.896 0.016 7.787-0.025 11.667-0.104 1.864-0.719 3.719-1.803 5.255-1.744 2.557-4.771 4.224-7.88 4.276-1.907 0.109-3.812-0.411-5.437-1.369-2.693-1.588-4.588-4.495-4.864-7.615-0.032-0.667-0.043-1.333-0.016-1.984 0.24-2.537 1.495-4.964 3.443-6.615 2.208-1.923 5.301-2.839 8.197-2.297 0.027 1.975-0.052 3.948-0.052 5.923-1.323-0.428-2.869-0.308-4.025 0.495-0.844 0.547-1.485 1.385-1.819 2.333-0.276 0.676-0.197 1.427-0.181 2.145 0.317 2.188 2.421 4.027 4.667 3.828 1.489-0.016 2.916-0.88 3.692-2.145 0.251-0.443 0.532-0.896 0.547-1.417 0.131-2.385 0.079-4.76 0.095-7.145 0.011-5.375-0.016-10.735 0.025-16.093z" })); @@ -49795,12 +52650,12 @@ const TiktokIcon = () => (0,external_wp_element_namespaceObject.createElement)(e * WordPress dependencies */ -const TumblrIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const TumblrIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M17.04 21.28h-3.28c-2.84 0-4.94-1.37-4.94-5.02v-5.67H6.08V7.5c2.93-.73 4.11-3.3 4.3-5.48h3.01v4.93h3.47v3.65H13.4v4.93c0 1.47.73 2.01 1.92 2.01h1.73v3.75z" })); @@ -49810,12 +52665,12 @@ const TumblrIcon = () => (0,external_wp_element_namespaceObject.createElement)(e * WordPress dependencies */ -const TwitchIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const TwitchIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M16.499,8.089h-1.636v4.91h1.636V8.089z M12,8.089h-1.637v4.91H12V8.089z M4.228,3.178L3,6.451v13.092h4.499V22h2.456 l2.454-2.456h3.681L21,14.636V3.178H4.228z M19.364,13.816l-2.864,2.865H12l-2.453,2.453V16.68H5.863V4.814h13.501V13.816z" })); @@ -49825,12 +52680,12 @@ const TwitchIcon = () => (0,external_wp_element_namespaceObject.createElement)(e * WordPress dependencies */ -const TwitterIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const TwitterIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M22.23,5.924c-0.736,0.326-1.527,0.547-2.357,0.646c0.847-0.508,1.498-1.312,1.804-2.27 c-0.793,0.47-1.671,0.812-2.606,0.996C18.324,4.498,17.257,4,16.077,4c-2.266,0-4.103,1.837-4.103,4.103 c0,0.322,0.036,0.635,0.106,0.935C8.67,8.867,5.647,7.234,3.623,4.751C3.27,5.357,3.067,6.062,3.067,6.814 c0,1.424,0.724,2.679,1.825,3.415c-0.673-0.021-1.305-0.206-1.859-0.513c0,0.017,0,0.034,0,0.052c0,1.988,1.414,3.647,3.292,4.023 c-0.344,0.094-0.707,0.144-1.081,0.144c-0.264,0-0.521-0.026-0.772-0.074c0.522,1.63,2.038,2.816,3.833,2.85 c-1.404,1.1-3.174,1.756-5.096,1.756c-0.331,0-0.658-0.019-0.979-0.057c1.816,1.164,3.973,1.843,6.29,1.843 c7.547,0,11.675-6.252,11.675-11.675c0-0.178-0.004-0.355-0.012-0.531C20.985,7.47,21.68,6.747,22.23,5.924z" })); @@ -49840,12 +52695,12 @@ const TwitterIcon = () => (0,external_wp_element_namespaceObject.createElement)( * WordPress dependencies */ -const VimeoIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const VimeoIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M22.396,7.164c-0.093,2.026-1.507,4.799-4.245,8.32C15.322,19.161,12.928,21,10.97,21c-1.214,0-2.24-1.119-3.079-3.359 c-0.56-2.053-1.119-4.106-1.68-6.159C5.588,9.243,4.921,8.122,4.206,8.122c-0.156,0-0.701,0.328-1.634,0.98L1.594,7.841 c1.027-0.902,2.04-1.805,3.037-2.708C6.001,3.95,7.03,3.327,7.715,3.264c1.619-0.156,2.616,0.951,2.99,3.321 c0.404,2.557,0.685,4.147,0.841,4.769c0.467,2.121,0.981,3.181,1.542,3.181c0.435,0,1.09-0.688,1.963-2.065 c0.871-1.376,1.338-2.422,1.401-3.142c0.125-1.187-0.343-1.782-1.401-1.782c-0.498,0-1.012,0.115-1.541,0.341 c1.023-3.35,2.977-4.977,5.862-4.884C21.511,3.066,22.52,4.453,22.396,7.164z" })); @@ -49855,12 +52710,12 @@ const VimeoIcon = () => (0,external_wp_element_namespaceObject.createElement)(ex * WordPress dependencies */ -const VkIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const VkIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M22,7.1c0.2,0.4-0.4,1.5-1.6,3.1c-0.2,0.2-0.4,0.5-0.7,0.9c-0.5,0.7-0.9,1.1-0.9,1.4c-0.1,0.3-0.1,0.6,0.1,0.8 c0.1,0.1,0.4,0.4,0.8,0.9h0l0,0c1,0.9,1.6,1.7,2,2.3c0,0,0,0.1,0.1,0.1c0,0.1,0,0.1,0.1,0.3c0,0.1,0,0.2,0,0.4 c0,0.1-0.1,0.2-0.3,0.3c-0.1,0.1-0.4,0.1-0.6,0.1l-2.7,0c-0.2,0-0.4,0-0.6-0.1c-0.2-0.1-0.4-0.1-0.5-0.2l-0.2-0.1 c-0.2-0.1-0.5-0.4-0.7-0.7s-0.5-0.6-0.7-0.8c-0.2-0.2-0.4-0.4-0.6-0.6C14.8,15,14.6,15,14.4,15c0,0,0,0-0.1,0c0,0-0.1,0.1-0.2,0.2 c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.1-0.1,0.3-0.2,0.5c-0.1,0.2-0.1,0.5-0.1,0.8c0,0.1,0,0.2,0,0.3c0,0.1-0.1,0.2-0.1,0.2l0,0.1 c-0.1,0.1-0.3,0.2-0.6,0.2h-1.2c-0.5,0-1,0-1.5-0.2c-0.5-0.1-1-0.3-1.4-0.6s-0.7-0.5-1.1-0.7s-0.6-0.4-0.7-0.6l-0.3-0.3 c-0.1-0.1-0.2-0.2-0.3-0.3s-0.4-0.5-0.7-0.9s-0.7-1-1.1-1.6c-0.4-0.6-0.8-1.3-1.3-2.2C2.9,9.4,2.5,8.5,2.1,7.5C2,7.4,2,7.3,2,7.2 c0-0.1,0-0.1,0-0.2l0-0.1c0.1-0.1,0.3-0.2,0.6-0.2l2.9,0c0.1,0,0.2,0,0.2,0.1S5.9,6.9,5.9,7L6,7c0.1,0.1,0.2,0.2,0.3,0.3 C6.4,7.7,6.5,8,6.7,8.4C6.9,8.8,7,9,7.1,9.2l0.2,0.3c0.2,0.4,0.4,0.8,0.6,1.1c0.2,0.3,0.4,0.5,0.5,0.7s0.3,0.3,0.4,0.4 c0.1,0.1,0.3,0.1,0.4,0.1c0.1,0,0.2,0,0.3-0.1c0,0,0,0,0.1-0.1c0,0,0.1-0.1,0.1-0.2c0.1-0.1,0.1-0.3,0.1-0.5c0-0.2,0.1-0.5,0.1-0.8 c0-0.4,0-0.8,0-1.3c0-0.3,0-0.5-0.1-0.8c0-0.2-0.1-0.4-0.1-0.5L9.6,7.6C9.4,7.3,9.1,7.2,8.7,7.1C8.6,7.1,8.6,7,8.7,6.9 C8.9,6.7,9,6.6,9.1,6.5c0.4-0.2,1.2-0.3,2.5-0.3c0.6,0,1,0.1,1.4,0.1c0.1,0,0.3,0.1,0.3,0.1c0.1,0.1,0.2,0.1,0.2,0.3 c0,0.1,0.1,0.2,0.1,0.3s0,0.3,0,0.5c0,0.2,0,0.4,0,0.6c0,0.2,0,0.4,0,0.7c0,0.3,0,0.6,0,0.9c0,0.1,0,0.2,0,0.4c0,0.2,0,0.4,0,0.5 c0,0.1,0,0.3,0,0.4s0.1,0.3,0.1,0.4c0.1,0.1,0.1,0.2,0.2,0.3c0.1,0,0.1,0,0.2,0c0.1,0,0.2,0,0.3-0.1c0.1-0.1,0.2-0.2,0.4-0.4 s0.3-0.4,0.5-0.7c0.2-0.3,0.5-0.7,0.7-1.1c0.4-0.7,0.8-1.5,1.1-2.3c0-0.1,0.1-0.1,0.1-0.2c0-0.1,0.1-0.1,0.1-0.1l0,0l0.1,0 c0,0,0,0,0.1,0s0.2,0,0.2,0l3,0c0.3,0,0.5,0,0.7,0S21.9,7,21.9,7L22,7.1z" })); @@ -49870,12 +52725,12 @@ const VkIcon = () => (0,external_wp_element_namespaceObject.createElement)(exter * WordPress dependencies */ -const WhatsAppIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const WhatsAppIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M 12.011719 2 C 6.5057187 2 2.0234844 6.478375 2.0214844 11.984375 C 2.0204844 13.744375 2.4814687 15.462563 3.3554688 16.976562 L 2 22 L 7.2324219 20.763672 C 8.6914219 21.559672 10.333859 21.977516 12.005859 21.978516 L 12.009766 21.978516 C 17.514766 21.978516 21.995047 17.499141 21.998047 11.994141 C 22.000047 9.3251406 20.962172 6.8157344 19.076172 4.9277344 C 17.190172 3.0407344 14.683719 2.001 12.011719 2 z M 12.009766 4 C 14.145766 4.001 16.153109 4.8337969 17.662109 6.3417969 C 19.171109 7.8517969 20.000047 9.8581875 19.998047 11.992188 C 19.996047 16.396187 16.413812 19.978516 12.007812 19.978516 C 10.674812 19.977516 9.3544062 19.642812 8.1914062 19.007812 L 7.5175781 18.640625 L 6.7734375 18.816406 L 4.8046875 19.28125 L 5.2851562 17.496094 L 5.5019531 16.695312 L 5.0878906 15.976562 C 4.3898906 14.768562 4.0204844 13.387375 4.0214844 11.984375 C 4.0234844 7.582375 7.6067656 4 12.009766 4 z M 8.4765625 7.375 C 8.3095625 7.375 8.0395469 7.4375 7.8105469 7.6875 C 7.5815469 7.9365 6.9355469 8.5395781 6.9355469 9.7675781 C 6.9355469 10.995578 7.8300781 12.182609 7.9550781 12.349609 C 8.0790781 12.515609 9.68175 15.115234 12.21875 16.115234 C 14.32675 16.946234 14.754891 16.782234 15.212891 16.740234 C 15.670891 16.699234 16.690438 16.137687 16.898438 15.554688 C 17.106437 14.971687 17.106922 14.470187 17.044922 14.367188 C 16.982922 14.263188 16.816406 14.201172 16.566406 14.076172 C 16.317406 13.951172 15.090328 13.348625 14.861328 13.265625 C 14.632328 13.182625 14.464828 13.140625 14.298828 13.390625 C 14.132828 13.640625 13.655766 14.201187 13.509766 14.367188 C 13.363766 14.534188 13.21875 14.556641 12.96875 14.431641 C 12.71875 14.305641 11.914938 14.041406 10.960938 13.191406 C 10.218937 12.530406 9.7182656 11.714844 9.5722656 11.464844 C 9.4272656 11.215844 9.5585938 11.079078 9.6835938 10.955078 C 9.7955938 10.843078 9.9316406 10.663578 10.056641 10.517578 C 10.180641 10.371578 10.223641 10.267562 10.306641 10.101562 C 10.389641 9.9355625 10.347156 9.7890625 10.285156 9.6640625 C 10.223156 9.5390625 9.737625 8.3065 9.515625 7.8125 C 9.328625 7.3975 9.131125 7.3878594 8.953125 7.3808594 C 8.808125 7.3748594 8.6425625 7.375 8.4765625 7.375 z" })); @@ -49885,12 +52740,12 @@ const WhatsAppIcon = () => (0,external_wp_element_namespaceObject.createElement) * WordPress dependencies */ -const XIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const XIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" })); @@ -49900,12 +52755,12 @@ const XIcon = () => (0,external_wp_element_namespaceObject.createElement)(extern * WordPress dependencies */ -const YelpIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const YelpIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M12.271,16.718v1.417q-.011,3.257-.067,3.4a.707.707,0,0,1-.569.446,4.637,4.637,0,0,1-2.024-.424A4.609,4.609,0,0,1,7.8,20.565a.844.844,0,0,1-.19-.4.692.692,0,0,1,.044-.29,3.181,3.181,0,0,1,.379-.524q.335-.412,2.019-2.409.011,0,.669-.781a.757.757,0,0,1,.44-.274.965.965,0,0,1,.552.039.945.945,0,0,1,.418.324.732.732,0,0,1,.139.468Zm-1.662-2.8a.783.783,0,0,1-.58.781l-1.339.435q-3.067.981-3.257.981a.711.711,0,0,1-.6-.4,2.636,2.636,0,0,1-.19-.836,9.134,9.134,0,0,1,.011-1.857,3.559,3.559,0,0,1,.335-1.389.659.659,0,0,1,.625-.357,22.629,22.629,0,0,1,2.253.859q.781.324,1.283.524l.937.379a.771.771,0,0,1,.4.34A.982.982,0,0,1,10.609,13.917Zm9.213,3.313a4.467,4.467,0,0,1-1.021,1.8,4.559,4.559,0,0,1-1.512,1.417.671.671,0,0,1-.7-.078q-.156-.112-2.052-3.2l-.524-.859a.761.761,0,0,1-.128-.513.957.957,0,0,1,.217-.513.774.774,0,0,1,.926-.29q.011.011,1.327.446,2.264.736,2.7.887a2.082,2.082,0,0,1,.524.229.673.673,0,0,1,.245.68Zm-7.5-7.049q.056,1.137-.6,1.361-.647.19-1.272-.792L6.237,4.08a.7.7,0,0,1,.212-.691,5.788,5.788,0,0,1,2.314-1,5.928,5.928,0,0,1,2.5-.352.681.681,0,0,1,.547.5q.034.2.245,3.407T12.327,10.181Zm7.384,1.2a.679.679,0,0,1-.29.658q-.167.112-3.67.959-.747.167-1.015.257l.011-.022a.769.769,0,0,1-.513-.044.914.914,0,0,1-.413-.357.786.786,0,0,1,0-.971q.011-.011.836-1.137,1.394-1.908,1.673-2.275a2.423,2.423,0,0,1,.379-.435A.7.7,0,0,1,17.435,8a4.482,4.482,0,0,1,1.372,1.489,4.81,4.81,0,0,1,.9,1.868v.034Z" })); @@ -49915,12 +52770,12 @@ const YelpIcon = () => (0,external_wp_element_namespaceObject.createElement)(ext * WordPress dependencies */ -const YouTubeIcon = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const YouTubeIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z" })); @@ -50057,6 +52912,13 @@ const social_link_variations_variations = [{ title: 'GitHub', icon: GitHubIcon }, { + name: 'gravatar', + attributes: { + service: 'gravatar' + }, + title: 'Gravatar', + icon: GravatarIcon +}, { name: 'instagram', attributes: { service: 'instagram' @@ -50258,7 +53120,7 @@ social_link_variations_variations.forEach(variation => { if (variation.isActive) return; variation.isActive = (blockAttributes, variationAttributes) => blockAttributes.service === variationAttributes.service; }); -/* harmony default export */ var social_link_variations = (social_link_variations_variations); +/* harmony default export */ const social_link_variations = (social_link_variations_variations); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/social-list.js /** @@ -50277,7 +53139,7 @@ social_link_variations_variations.forEach(variation => { * * @param {string} name key for a social service (lowercase slug) * - * @return {WPComponent} Icon component for social service. + * @return {Component} Icon component for social service. */ const getIconBySite = name => { const variation = social_link_variations.find(v => v.name === name); @@ -50328,18 +53190,18 @@ const SocialLinkURLPopover = ({ const { removeBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.URLPopover, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.URLPopover, { anchor: popoverAnchor, onClose: () => setPopover(false) - }, (0,external_wp_element_namespaceObject.createElement)("form", { + }, (0,external_React_namespaceObject.createElement)("form", { className: "block-editor-url-popover__link-editor", onSubmit: event => { event.preventDefault(); setPopover(false); } - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { className: "block-editor-url-input" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.URLInput, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.URLInput, { __nextHasNoMarginBottom: true, value: url, onChange: nextURL => setAttributes({ @@ -50353,7 +53215,7 @@ const SocialLinkURLPopover = ({ } removeBlock(clientId); } - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + })), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { icon: keyboard_return, label: (0,external_wp_i18n_namespaceObject.__)('Apply'), type: "submit" @@ -50399,11 +53261,11 @@ const SocialLinkEdit = ({ backgroundColor: iconBackgroundColorValue } }); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: name of the social service. */ (0,external_wp_i18n_namespaceObject.__)('%s label'), socialLinkName), initialOpen: false - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelRow, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelRow, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Link label'), help: (0,external_wp_i18n_namespaceObject.__)('Briefly describe the link to help screen reader users.'), @@ -50411,26 +53273,26 @@ const SocialLinkEdit = ({ onChange: value => setAttributes({ label: value }) - })))), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { + })))), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Link rel'), value: rel || '', onChange: value => setAttributes({ rel: value }) - })), (0,external_wp_element_namespaceObject.createElement)("li", { + })), (0,external_React_namespaceObject.createElement)("li", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { className: "wp-block-social-link-anchor", ref: setPopoverAnchor, onClick: () => setPopover(true) - }, (0,external_wp_element_namespaceObject.createElement)(IconComponent, null), (0,external_wp_element_namespaceObject.createElement)("span", { + }, (0,external_React_namespaceObject.createElement)(IconComponent, null), (0,external_React_namespaceObject.createElement)("span", { className: classnames_default()('wp-block-social-link-label', { 'screen-reader-text': !showLabels }) - }, socialLinkLabel), isSelected && showURLPopover && (0,external_wp_element_namespaceObject.createElement)(SocialLinkURLPopover, { + }, socialLinkLabel), isSelected && showURLPopover && (0,external_React_namespaceObject.createElement)(SocialLinkURLPopover, { url: url, setAttributes: setAttributes, setPopover: setPopover, @@ -50438,7 +53300,7 @@ const SocialLinkEdit = ({ clientId: clientId })))); }; -/* harmony default export */ var social_link_edit = (SocialLinkEdit); +/* harmony default export */ const social_link_edit = (SocialLinkEdit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/index.js /** @@ -50477,7 +53339,10 @@ const social_link_metadata = { usesContext: ["openInNewTab", "showLabels", "iconColor", "iconColorValue", "iconBackgroundColor", "iconBackgroundColorValue"], supports: { reusable: false, - html: false + html: false, + interactivity: { + clientNavigation: true + } }, editorStyle: "wp-block-social-link-editor" }; @@ -50605,15 +53470,15 @@ const social_links_deprecated_deprecated = [ '--wp--social-links--icon-color': iconColorValue, '--wp--social-links--icon-background-color': iconBackgroundColorValue }; - return (0,external_wp_element_namespaceObject.createElement)("ul", { + return (0,external_React_namespaceObject.createElement)("ul", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }) - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)); } }]; -/* harmony default export */ var social_links_deprecated = (social_links_deprecated_deprecated); +/* harmony default export */ const social_links_deprecated = (social_links_deprecated_deprecated); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/check.js @@ -50621,13 +53486,13 @@ const social_links_deprecated_deprecated = [ * WordPress dependencies */ -const check = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const check = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z" })); -/* harmony default export */ var library_check = (check); +/* harmony default export */ const library_check = (check); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-links/edit.js @@ -50644,7 +53509,6 @@ const check = (0,external_wp_element_namespaceObject.createElement)(external_wp_ -const social_links_edit_ALLOWED_BLOCKS = ['core/social-link']; const sizeOptions = [{ name: (0,external_wp_i18n_namespaceObject.__)('Small'), value: 'has-small-icon-size' @@ -50701,18 +53565,18 @@ function SocialLinksEdit(props) { }); } }, [logosOnly]); - const SocialPlaceholder = (0,external_wp_element_namespaceObject.createElement)("li", { + const SocialPlaceholder = (0,external_React_namespaceObject.createElement)("li", { className: "wp-block-social-links__social-placeholder" - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-social-links__social-placeholder-icons" - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { className: "wp-social-link wp-social-link-twitter" - }), (0,external_wp_element_namespaceObject.createElement)("div", { + }), (0,external_React_namespaceObject.createElement)("div", { className: "wp-social-link wp-social-link-facebook" - }), (0,external_wp_element_namespaceObject.createElement)("div", { + }), (0,external_React_namespaceObject.createElement)("div", { className: "wp-social-link wp-social-link-instagram" }))); - const SelectedSocialPlaceholder = (0,external_wp_element_namespaceObject.createElement)("li", { + const SelectedSocialPlaceholder = (0,external_React_namespaceObject.createElement)("li", { className: "wp-block-social-links__social-prompt" }, (0,external_wp_i18n_namespaceObject.__)('Click plus to add')); @@ -50727,7 +53591,6 @@ function SocialLinksEdit(props) { className }); const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, { - allowedBlocks: social_links_edit_ALLOWED_BLOCKS, placeholder: isSelected ? SelectedSocialPlaceholder : SocialPlaceholder, templateLock: false, orientation: (_attributes$layout$or = attributes.layout?.orientation) !== null && _attributes$layout$or !== void 0 ? _attributes$layout$or : 'horizontal', @@ -50775,17 +53638,17 @@ function SocialLinksEdit(props) { }); } const colorGradientSettings = (0,external_wp_blockEditor_namespaceObject.__experimentalUseMultipleOriginColorsAndGradients)(); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarDropdownMenu, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarDropdownMenu, { label: (0,external_wp_i18n_namespaceObject.__)('Size'), text: (0,external_wp_i18n_namespaceObject.__)('Size'), icon: null, popoverProps: POPOVER_PROPS }, ({ onClose - }) => (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, null, sizeOptions.map(entry => { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { + }) => (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, null, sizeOptions.map(entry => { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { icon: (size === entry.value || !size && entry.value === 'has-normal-icon-size') && library_check, isSelected: size === entry.value, key: entry.value, @@ -50797,30 +53660,30 @@ function SocialLinksEdit(props) { onClose: onClose, role: "menuitemradio" }, entry.name); - })))), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + })))), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Open links in new tab'), checked: openInNewTab, onChange: () => setAttributes({ openInNewTab: !openInNewTab }) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Show labels'), checked: showLabels, onChange: () => setAttributes({ showLabels: !showLabels }) - }))), colorGradientSettings.hasColorsOrGradients && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { + }))), colorGradientSettings.hasColorsOrGradients && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "color" }, colorSettings.map(({ onChange, label, value, resetAllFilter - }) => (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown, { + }) => (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown, { key: `social-links-color-${label}`, __experimentalIsRenderedInSidebar: true, settings: [{ @@ -50833,11 +53696,11 @@ function SocialLinksEdit(props) { }], panelId: clientId, ...colorGradientSettings - })), !logosOnly && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.ContrastChecker, { + })), !logosOnly && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.ContrastChecker, { textColor: iconColorValue, backgroundColor: iconBackgroundColorValue, isLargeText: false - })), (0,external_wp_element_namespaceObject.createElement)("ul", { + })), (0,external_React_namespaceObject.createElement)("ul", { ...innerBlocksProps })); } @@ -50845,7 +53708,7 @@ const iconColorAttributes = { iconColor: 'icon-color', iconBackgroundColor: 'icon-background-color' }; -/* harmony default export */ var social_links_edit = ((0,external_wp_blockEditor_namespaceObject.withColors)(iconColorAttributes)(SocialLinksEdit)); +/* harmony default export */ const social_links_edit = ((0,external_wp_blockEditor_namespaceObject.withColors)(iconColorAttributes)(SocialLinksEdit)); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-links/save.js @@ -50876,7 +53739,7 @@ function social_links_save_save(props) { className }); const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps); - return (0,external_wp_element_namespaceObject.createElement)("ul", { + return (0,external_React_namespaceObject.createElement)("ul", { ...innerBlocksProps }); } @@ -50899,6 +53762,7 @@ const social_links_metadata = { name: "core/social-links", title: "Social Icons", category: "widgets", + allowedBlocks: ["core/social-link"], description: "Display icons linking to your social media profiles or sites.", keywords: ["links"], textdomain: "default", @@ -50972,6 +53836,9 @@ const social_links_metadata = { margin: true, padding: false } + }, + interactivity: { + clientNavigation: true } }, styles: [{ @@ -51032,13 +53899,13 @@ const social_links_init = () => initBlock({ * WordPress dependencies */ -const resizeCornerNE = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const resizeCornerNE = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M7 18h4.5v1.5h-7v-7H6V17L17 6h-4.5V4.5h7v7H18V7L7 18Z" })); -/* harmony default export */ var resize_corner_n_e = (resizeCornerNE); +/* harmony default export */ const resize_corner_n_e = (resizeCornerNE); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/spacer/deprecated.js @@ -51070,7 +53937,7 @@ const spacer_deprecated_deprecated = [{ save({ attributes }) { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ style: { height: attributes.height, @@ -51081,7 +53948,7 @@ const spacer_deprecated_deprecated = [{ }); } }]; -/* harmony default export */ var spacer_deprecated = (spacer_deprecated_deprecated); +/* harmony default export */ const spacer_deprecated = (spacer_deprecated_deprecated); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/spacer/constants.js const MIN_SPACER_SIZE = 0; @@ -51108,13 +53975,13 @@ function DimensionInput({ value = '' }) { const inputId = (0,external_wp_compose_namespaceObject.useInstanceId)(external_wp_components_namespaceObject.__experimentalUnitControl, 'block-spacer-height-input'); - const spacingSizes = (0,external_wp_blockEditor_namespaceObject.useSetting)('spacing.spacingSizes'); + const [spacingSizes, spacingUnits] = (0,external_wp_blockEditor_namespaceObject.useSettings)('spacing.spacingSizes', 'spacing.units'); // In most contexts the spacer size cannot meaningfully be set to a // percentage, since this is relative to the parent container. This // unit is disabled from the UI. - const availableUnitSettings = ((0,external_wp_blockEditor_namespaceObject.useSetting)('spacing.units') || undefined)?.filter(availableUnit => availableUnit !== '%'); + const availableUnits = spacingUnits ? spacingUnits.filter(unit => unit !== '%') : ['px', 'em', 'rem', 'vw', 'vh']; const units = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({ - availableUnits: availableUnitSettings || ['px', 'em', 'rem', 'vw', 'vh'], + availableUnits, defaultValues: { px: 100, em: 10, @@ -51130,10 +53997,10 @@ function DimensionInput({ // Force the unit to update to `px` when the Spacer is being resized. const [parsedQuantity, parsedUnit] = (0,external_wp_components_namespaceObject.__experimentalParseQuantityAndUnitFromRawValue)(value); const computedValue = (0,external_wp_blockEditor_namespaceObject.isValueSpacingPreset)(value) ? value : [parsedQuantity, isResizing ? 'px' : parsedUnit].join(''); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (!spacingSizes || spacingSizes?.length === 0) && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (!spacingSizes || spacingSizes?.length === 0) && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl, { label: label, id: inputId - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalUnitControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalUnitControl, { id: inputId, isResetValueOnUnitChange: true, min: MIN_SPACER_SIZE, @@ -51143,9 +54010,9 @@ function DimensionInput({ }, value: computedValue, units: units - })), spacingSizes?.length > 0 && (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, { + })), spacingSizes?.length > 0 && (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, { className: "tools-panel-item-spacing" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalSpacingSizesControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalSpacingSizesControl, { values: { all: computedValue }, @@ -51165,16 +54032,16 @@ function SpacerControls({ width, isResizing }) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, orientation === 'horizontal' && (0,external_wp_element_namespaceObject.createElement)(DimensionInput, { + }, orientation === 'horizontal' && (0,external_React_namespaceObject.createElement)(DimensionInput, { label: (0,external_wp_i18n_namespaceObject.__)('Width'), value: width, onChange: nextWidth => setAttributes({ width: nextWidth }), isResizing: isResizing - }), orientation !== 'horizontal' && (0,external_wp_element_namespaceObject.createElement)(DimensionInput, { + }), orientation !== 'horizontal' && (0,external_React_namespaceObject.createElement)(DimensionInput, { label: (0,external_wp_i18n_namespaceObject.__)('Height'), value: height, onChange: nextHeight => setAttributes({ @@ -51221,7 +54088,7 @@ const ResizableSpacer = ({ const getNextVal = elt => { return `${getCurrentSize(elt)}px`; }; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ResizableBox, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ResizableBox, { className: classnames_default()('block-library-spacer__resize-container', { 'resize-horizontal': orientation === 'horizontal', 'is-resizing': isResizing, @@ -51271,10 +54138,13 @@ const SpacerEdit = ({ } = context; const { orientation: parentOrientation, - type + type, + default: { + type: defaultType + } = {} } = parentLayout || {}; // Check if the spacer is inside a flex container. - const isFlexLayout = type === 'flex'; + const isFlexLayout = type === 'flex' || !type && defaultType === 'flex'; // If the spacer is inside a flex container, it should either inherit the orientation // of the parent or use the flex default orientation. const inheritedOrientation = !parentOrientation && isFlexLayout ? 'horizontal' : parentOrientation || orientation; @@ -51290,7 +54160,7 @@ const SpacerEdit = ({ selfStretch, flexSize } = layout; - const spacingSizes = (0,external_wp_blockEditor_namespaceObject.useSetting)('spacing.spacingSizes'); + const [spacingSizes] = (0,external_wp_blockEditor_namespaceObject.useSettings)('spacing.spacingSizes'); const [isResizing, setIsResizing] = (0,external_wp_element_namespaceObject.useState)(false); const [temporaryHeight, setTemporaryHeight] = (0,external_wp_element_namespaceObject.useState)(null); const [temporaryWidth, setTemporaryWidth] = (0,external_wp_element_namespaceObject.useState)(null); @@ -51359,7 +54229,7 @@ const SpacerEdit = ({ }; const resizableBoxWithOrientation = blockOrientation => { if (blockOrientation === 'horizontal') { - return (0,external_wp_element_namespaceObject.createElement)(ResizableSpacer, { + return (0,external_React_namespaceObject.createElement)(ResizableSpacer, { minWidth: MIN_SPACER_SIZE, enable: { top: false, @@ -51380,7 +54250,7 @@ const SpacerEdit = ({ setIsResizing: setIsResizing }); } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(ResizableSpacer, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(ResizableSpacer, { minHeight: MIN_SPACER_SIZE, enable: { top: false, @@ -51464,14 +54334,14 @@ const SpacerEdit = ({ }); } }, [blockStyle, flexSize, height, inheritedOrientation, isFlexLayout, layout, selfStretch, setAttributes, spacingSizes, width]); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({ style, className: classnames_default()(className, { 'custom-sizes-disabled': disableCustomSpacingSizes }) }) - }, resizableBoxWithOrientation(inheritedOrientation)), !isFlexLayout && (0,external_wp_element_namespaceObject.createElement)(SpacerControls, { + }, resizableBoxWithOrientation(inheritedOrientation)), !isFlexLayout && (0,external_React_namespaceObject.createElement)(SpacerControls, { setAttributes: setAttributes, height: temporaryHeight || height, width: temporaryWidth || width, @@ -51479,7 +54349,7 @@ const SpacerEdit = ({ isResizing: isResizing })); }; -/* harmony default export */ var spacer_edit = (SpacerEdit); +/* harmony default export */ const spacer_edit = (SpacerEdit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/spacer/save.js @@ -51502,7 +54372,7 @@ function spacer_save_save({ } = style || {}; // If selfStretch is set to 'fill' or 'fit', don't set default height. const finalHeight = selfStretch === 'fill' || selfStretch === 'fit' ? undefined : height; - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ style: { height: (0,external_wp_blockEditor_namespaceObject.getSpacingPresetCssVar)(finalHeight), @@ -51550,6 +54420,9 @@ const spacer_metadata = { __experimentalDefaultControls: { margin: true } + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-spacer-editor", @@ -51578,13 +54451,13 @@ const spacer_init = () => initBlock({ * WordPress dependencies */ -const blockTable = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const blockTable = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z" })); -/* harmony default export */ var block_table = (blockTable); +/* harmony default export */ const block_table = (blockTable); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table/deprecated.js @@ -51797,9 +54670,9 @@ const table_deprecated_v3 = { return null; } const Tag = `t${type}`; - return (0,external_wp_element_namespaceObject.createElement)(Tag, null, rows.map(({ + return (0,external_React_namespaceObject.createElement)(Tag, null, rows.map(({ cells - }, rowIndex) => (0,external_wp_element_namespaceObject.createElement)("tr", { + }, rowIndex) => (0,external_React_namespaceObject.createElement)("tr", { key: rowIndex }, cells.map(({ content, @@ -51810,7 +54683,7 @@ const table_deprecated_v3 = { const cellClasses = classnames_default()({ [`has-text-align-${align}`]: align }); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { className: cellClasses ? cellClasses : undefined, "data-align": align, tagName: tag, @@ -51820,24 +54693,24 @@ const table_deprecated_v3 = { }); })))); }; - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save() - }, (0,external_wp_element_namespaceObject.createElement)("table", { + }, (0,external_React_namespaceObject.createElement)("table", { className: classes === '' ? undefined : classes, style: { ...colorProps.style, ...borderProps.style } - }, (0,external_wp_element_namespaceObject.createElement)(Section, { + }, (0,external_React_namespaceObject.createElement)(Section, { type: "head", rows: head - }), (0,external_wp_element_namespaceObject.createElement)(Section, { + }), (0,external_React_namespaceObject.createElement)(Section, { type: "body", rows: body - }), (0,external_wp_element_namespaceObject.createElement)(Section, { + }), (0,external_React_namespaceObject.createElement)(Section, { type: "foot", rows: foot - })), hasCaption && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + })), hasCaption && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })); @@ -52000,9 +54873,9 @@ const table_deprecated_v2 = { return null; } const Tag = `t${type}`; - return (0,external_wp_element_namespaceObject.createElement)(Tag, null, rows.map(({ + return (0,external_React_namespaceObject.createElement)(Tag, null, rows.map(({ cells - }, rowIndex) => (0,external_wp_element_namespaceObject.createElement)("tr", { + }, rowIndex) => (0,external_React_namespaceObject.createElement)("tr", { key: rowIndex }, cells.map(({ content, @@ -52013,7 +54886,7 @@ const table_deprecated_v2 = { const cellClasses = classnames_default()({ [`has-text-align-${align}`]: align }); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { className: cellClasses ? cellClasses : undefined, "data-align": align, tagName: tag, @@ -52023,20 +54896,20 @@ const table_deprecated_v2 = { }); })))); }; - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save() - }, (0,external_wp_element_namespaceObject.createElement)("table", { + }, (0,external_React_namespaceObject.createElement)("table", { className: classes === '' ? undefined : classes - }, (0,external_wp_element_namespaceObject.createElement)(Section, { + }, (0,external_React_namespaceObject.createElement)(Section, { type: "head", rows: head - }), (0,external_wp_element_namespaceObject.createElement)(Section, { + }), (0,external_React_namespaceObject.createElement)(Section, { type: "body", rows: body - }), (0,external_wp_element_namespaceObject.createElement)(Section, { + }), (0,external_React_namespaceObject.createElement)(Section, { type: "foot", rows: foot - })), hasCaption && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + })), hasCaption && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })); @@ -52188,30 +55061,30 @@ const table_deprecated_v1 = { return null; } const Tag = `t${type}`; - return (0,external_wp_element_namespaceObject.createElement)(Tag, null, rows.map(({ + return (0,external_React_namespaceObject.createElement)(Tag, null, rows.map(({ cells - }, rowIndex) => (0,external_wp_element_namespaceObject.createElement)("tr", { + }, rowIndex) => (0,external_React_namespaceObject.createElement)("tr", { key: rowIndex }, cells.map(({ content, tag, scope - }, cellIndex) => (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, cellIndex) => (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: tag, value: content, key: cellIndex, scope: tag === 'th' ? scope : undefined }))))); }; - return (0,external_wp_element_namespaceObject.createElement)("table", { + return (0,external_React_namespaceObject.createElement)("table", { className: classes - }, (0,external_wp_element_namespaceObject.createElement)(Section, { + }, (0,external_React_namespaceObject.createElement)(Section, { type: "head", rows: head - }), (0,external_wp_element_namespaceObject.createElement)(Section, { + }), (0,external_React_namespaceObject.createElement)(Section, { type: "body", rows: body - }), (0,external_wp_element_namespaceObject.createElement)(Section, { + }), (0,external_React_namespaceObject.createElement)(Section, { type: "foot", rows: foot })); @@ -52226,7 +55099,7 @@ const table_deprecated_v1 = { * * See block-deprecation.md */ -/* harmony default export */ var table_deprecated = ([table_deprecated_v3, table_deprecated_v2, table_deprecated_v1]); +/* harmony default export */ const table_deprecated = ([table_deprecated_v3, table_deprecated_v2, table_deprecated_v1]); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/align-left.js @@ -52234,13 +55107,13 @@ const table_deprecated_v1 = { * WordPress dependencies */ -const alignLeft = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const alignLeft = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z" })); -/* harmony default export */ var align_left = (alignLeft); +/* harmony default export */ const align_left = (alignLeft); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/align-center.js @@ -52248,13 +55121,13 @@ const alignLeft = (0,external_wp_element_namespaceObject.createElement)(external * WordPress dependencies */ -const alignCenter = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const alignCenter = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z" })); -/* harmony default export */ var align_center = (alignCenter); +/* harmony default export */ const align_center = (alignCenter); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/align-right.js @@ -52262,13 +55135,13 @@ const alignCenter = (0,external_wp_element_namespaceObject.createElement)(extern * WordPress dependencies */ -const alignRight = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const alignRight = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z" })); -/* harmony default export */ var align_right = (alignRight); +/* harmony default export */ const align_right = (alignRight); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table-row-before.js @@ -52276,13 +55149,13 @@ const alignRight = (0,external_wp_element_namespaceObject.createElement)(externa * WordPress dependencies */ -const tableRowBefore = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const tableRowBefore = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M6.656 6.464h2.88v2.88h1.408v-2.88h2.88V5.12h-2.88V2.24H9.536v2.88h-2.88zM0 17.92V0h20.48v17.92H0zm7.68-2.56h5.12v-3.84H7.68v3.84zm-6.4 0H6.4v-3.84H1.28v3.84zM19.2 1.28H1.28v9.024H19.2V1.28zm0 10.24h-5.12v3.84h5.12v-3.84zM6.656 6.464h2.88v2.88h1.408v-2.88h2.88V5.12h-2.88V2.24H9.536v2.88h-2.88zM0 17.92V0h20.48v17.92H0zm7.68-2.56h5.12v-3.84H7.68v3.84zm-6.4 0H6.4v-3.84H1.28v3.84zM19.2 1.28H1.28v9.024H19.2V1.28zm0 10.24h-5.12v3.84h5.12v-3.84z" })); -/* harmony default export */ var table_row_before = (tableRowBefore); +/* harmony default export */ const table_row_before = (tableRowBefore); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table-row-after.js @@ -52290,13 +55163,13 @@ const tableRowBefore = (0,external_wp_element_namespaceObject.createElement)(ext * WordPress dependencies */ -const tableRowAfter = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const tableRowAfter = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M13.824 10.176h-2.88v-2.88H9.536v2.88h-2.88v1.344h2.88v2.88h1.408v-2.88h2.88zM0 17.92V0h20.48v17.92H0zM6.4 1.28H1.28v3.84H6.4V1.28zm6.4 0H7.68v3.84h5.12V1.28zm6.4 0h-5.12v3.84h5.12V1.28zm0 5.056H1.28v9.024H19.2V6.336z" })); -/* harmony default export */ var table_row_after = (tableRowAfter); +/* harmony default export */ const table_row_after = (tableRowAfter); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table-row-delete.js @@ -52304,13 +55177,13 @@ const tableRowAfter = (0,external_wp_element_namespaceObject.createElement)(exte * WordPress dependencies */ -const tableRowDelete = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const tableRowDelete = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M17.728 11.456L14.592 8.32l3.2-3.2-1.536-1.536-3.2 3.2L9.92 3.648 8.384 5.12l3.2 3.2-3.264 3.264 1.536 1.536 3.264-3.264 3.136 3.136 1.472-1.536zM0 17.92V0h20.48v17.92H0zm19.2-6.4h-.448l-1.28-1.28H19.2V6.4h-1.792l1.28-1.28h.512V1.28H1.28v3.84h6.208l1.28 1.28H1.28v3.84h7.424l-1.28 1.28H1.28v3.84H19.2v-3.84z" })); -/* harmony default export */ var table_row_delete = (tableRowDelete); +/* harmony default export */ const table_row_delete = (tableRowDelete); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table-column-before.js @@ -52318,13 +55191,13 @@ const tableRowDelete = (0,external_wp_element_namespaceObject.createElement)(ext * WordPress dependencies */ -const tableColumnBefore = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const tableColumnBefore = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M6.4 3.776v3.648H2.752v1.792H6.4v3.648h1.728V9.216h3.712V7.424H8.128V3.776zM0 17.92V0h20.48v17.92H0zM12.8 1.28H1.28v14.08H12.8V1.28zm6.4 0h-5.12v3.84h5.12V1.28zm0 5.12h-5.12v3.84h5.12V6.4zm0 5.12h-5.12v3.84h5.12v-3.84z" })); -/* harmony default export */ var table_column_before = (tableColumnBefore); +/* harmony default export */ const table_column_before = (tableColumnBefore); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table-column-after.js @@ -52332,13 +55205,13 @@ const tableColumnBefore = (0,external_wp_element_namespaceObject.createElement)( * WordPress dependencies */ -const tableColumnAfter = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const tableColumnAfter = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M14.08 12.864V9.216h3.648V7.424H14.08V3.776h-1.728v3.648H8.64v1.792h3.712v3.648zM0 17.92V0h20.48v17.92H0zM6.4 1.28H1.28v3.84H6.4V1.28zm0 5.12H1.28v3.84H6.4V6.4zm0 5.12H1.28v3.84H6.4v-3.84zM19.2 1.28H7.68v14.08H19.2V1.28z" })); -/* harmony default export */ var table_column_after = (tableColumnAfter); +/* harmony default export */ const table_column_after = (tableColumnAfter); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table-column-delete.js @@ -52346,13 +55219,13 @@ const tableColumnAfter = (0,external_wp_element_namespaceObject.createElement)(e * WordPress dependencies */ -const tableColumnDelete = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const tableColumnDelete = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M6.4 9.98L7.68 8.7v-.256L6.4 7.164V9.98zm6.4-1.532l1.28-1.28V9.92L12.8 8.64v-.192zm7.68 9.472V0H0v17.92h20.48zm-1.28-2.56h-5.12v-1.024l-.256.256-1.024-1.024v1.792H7.68v-1.792l-1.024 1.024-.256-.256v1.024H1.28V1.28H6.4v2.368l.704-.704.576.576V1.216h5.12V3.52l.96-.96.32.32V1.216h5.12V15.36zm-5.76-2.112l-3.136-3.136-3.264 3.264-1.536-1.536 3.264-3.264L5.632 5.44l1.536-1.536 3.136 3.136 3.2-3.2 1.536 1.536-3.2 3.2 3.136 3.136-1.536 1.536z" })); -/* harmony default export */ var table_column_delete = (tableColumnDelete); +/* harmony default export */ const table_column_delete = (tableColumnDelete); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table.js @@ -52360,13 +55233,13 @@ const tableColumnDelete = (0,external_wp_element_namespaceObject.createElement)( * WordPress dependencies */ -const table = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const table = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M4 6v11.5h16V6H4zm1.5 1.5h6V11h-6V7.5zm0 8.5v-3.5h6V16h-6zm13 0H13v-3.5h5.5V16zM13 11V7.5h5.5V11H13z" })); -/* harmony default export */ var library_table = (table); +/* harmony default export */ const library_table = (table); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table/state.js const INHERITED_COLUMN_ATTRIBUTES = ['align']; @@ -52714,7 +55587,7 @@ function TSection({ ...props }) { const TagName = `t${name}`; - return (0,external_wp_element_namespaceObject.createElement)(TagName, { + return (0,external_React_namespaceObject.createElement)(TagName, { ...props }); } @@ -53000,12 +55873,12 @@ function TableEdit({ isDisabled: !selectedCell, onClick: onDeleteColumn }]; - const renderedSections = sections.map(name => (0,external_wp_element_namespaceObject.createElement)(TSection, { + const renderedSections = sections.map(name => (0,external_React_namespaceObject.createElement)(TSection, { name: name, key: name }, attributes[name].map(({ cells - }, rowIndex) => (0,external_wp_element_namespaceObject.createElement)("tr", { + }, rowIndex) => (0,external_React_namespaceObject.createElement)("tr", { key: rowIndex }, cells.map(({ content, @@ -53014,7 +55887,7 @@ function TableEdit({ align, colspan, rowspan - }, columnIndex) => (0,external_wp_element_namespaceObject.createElement)(CellTag, { + }, columnIndex) => (0,external_React_namespaceObject.createElement)(CellTag, { key: columnIndex, scope: CellTag === 'th' ? scope : undefined, colSpan: colspan, @@ -53022,7 +55895,7 @@ function TableEdit({ className: classnames_default()({ [`has-text-align-${align}`]: align }, 'wp-block-table__cell-content') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { value: content, onChange: onChange, onFocus: () => { @@ -53037,43 +55910,43 @@ function TableEdit({ placeholder: edit_placeholder[name] }))))))); const isEmpty = !sections.length; - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({ ref: tableRef }) - }, !isEmpty && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + }, !isEmpty && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { label: (0,external_wp_i18n_namespaceObject.__)('Change column alignment'), alignmentControls: ALIGNMENT_CONTROLS, value: getCellAlignment(), onChange: nextAlign => onChangeColumnAlignment(nextAlign) - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarDropdownMenu, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarDropdownMenu, { hasArrowIndicator: true, icon: library_table, label: (0,external_wp_i18n_namespaceObject.__)('Edit table'), controls: tableControls - }))), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + }))), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings'), className: "blocks-table-settings" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Fixed width table cells'), checked: !!hasFixedLayout, onChange: onChangeFixedLayout - }), !isEmpty && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), !isEmpty && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Header section'), checked: !!(head && head.length), onChange: onToggleHeaderSection - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Footer section'), checked: !!(foot && foot.length), onChange: onToggleFooterSection - })))), !isEmpty && (0,external_wp_element_namespaceObject.createElement)("table", { + })))), !isEmpty && (0,external_React_namespaceObject.createElement)("table", { className: classnames_default()(colorProps.className, borderProps.className, { 'has-fixed-layout': hasFixedLayout, // This is required in the editor only to overcome @@ -53085,7 +55958,7 @@ function TableEdit({ ...colorProps.style, ...borderProps.style } - }, renderedSections), !isEmpty && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + }, renderedSections), !isEmpty && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { identifier: "caption", tagName: "figcaption", className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'), @@ -53099,39 +55972,41 @@ function TableEdit({ , onFocus: () => setSelectedCell(), __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())) - }), isEmpty && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { + }), isEmpty && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { label: (0,external_wp_i18n_namespaceObject.__)('Table'), - icon: (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { + icon: (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: block_table, showColors: true }), instructions: (0,external_wp_i18n_namespaceObject.__)('Insert a table for sharing data.') - }, (0,external_wp_element_namespaceObject.createElement)("form", { + }, (0,external_React_namespaceObject.createElement)("form", { className: "blocks-table__placeholder-form", onSubmit: onCreateTable - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, + __next40pxDefaultSize: true, type: "number", label: (0,external_wp_i18n_namespaceObject.__)('Column count'), value: initialColumnCount, onChange: onChangeInitialColumnCount, min: "1", className: "blocks-table__placeholder-input" - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, + __next40pxDefaultSize: true, type: "number", label: (0,external_wp_i18n_namespaceObject.__)('Row count'), value: initialRowCount, onChange: onChangeInitialRowCount, min: "1", className: "blocks-table__placeholder-input" - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { - className: "blocks-table__placeholder-button", + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + __next40pxDefaultSize: true, variant: "primary", type: "submit" }, (0,external_wp_i18n_namespaceObject.__)('Create Table'))))); } -/* harmony default export */ var table_edit = (TableEdit); +/* harmony default export */ const table_edit = (TableEdit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table/save.js @@ -53172,9 +56047,9 @@ function table_save_save({ return null; } const Tag = `t${type}`; - return (0,external_wp_element_namespaceObject.createElement)(Tag, null, rows.map(({ + return (0,external_React_namespaceObject.createElement)(Tag, null, rows.map(({ cells - }, rowIndex) => (0,external_wp_element_namespaceObject.createElement)("tr", { + }, rowIndex) => (0,external_React_namespaceObject.createElement)("tr", { key: rowIndex }, cells.map(({ content, @@ -53187,7 +56062,7 @@ function table_save_save({ const cellClasses = classnames_default()({ [`has-text-align-${align}`]: align }); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { className: cellClasses ? cellClasses : undefined, "data-align": align, tagName: tag, @@ -53199,24 +56074,24 @@ function table_save_save({ }); })))); }; - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save() - }, (0,external_wp_element_namespaceObject.createElement)("table", { + }, (0,external_React_namespaceObject.createElement)("table", { className: classes === '' ? undefined : classes, style: { ...colorProps.style, ...borderProps.style } - }, (0,external_wp_element_namespaceObject.createElement)(Section, { + }, (0,external_React_namespaceObject.createElement)(Section, { type: "head", rows: head - }), (0,external_wp_element_namespaceObject.createElement)(Section, { + }), (0,external_React_namespaceObject.createElement)(Section, { type: "body", rows: body - }), (0,external_wp_element_namespaceObject.createElement)(Section, { + }), (0,external_React_namespaceObject.createElement)(Section, { type: "foot", rows: foot - })), hasCaption && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + })), hasCaption && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption, className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption') @@ -53326,7 +56201,7 @@ const table_transforms_transforms = { } }] }; -/* harmony default export */ var table_transforms = (table_transforms_transforms); +/* harmony default export */ const table_transforms = (table_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table/index.js /** @@ -53355,10 +56230,9 @@ const table_metadata = { "default": false }, caption: { - type: "string", - source: "html", - selector: "figcaption", - "default": "" + type: "rich-text", + source: "rich-text", + selector: "figcaption" }, head: { type: "array", @@ -53373,8 +56247,8 @@ const table_metadata = { selector: "td,th", query: { content: { - type: "string", - source: "html" + type: "rich-text", + source: "rich-text" }, tag: { type: "string", @@ -53418,8 +56292,8 @@ const table_metadata = { selector: "td,th", query: { content: { - type: "string", - source: "html" + type: "rich-text", + source: "rich-text" }, tag: { type: "string", @@ -53463,8 +56337,8 @@ const table_metadata = { selector: "td,th", query: { content: { - type: "string", - source: "html" + type: "rich-text", + source: "rich-text" }, tag: { type: "string", @@ -53539,7 +56413,10 @@ const table_metadata = { width: true } }, - __experimentalSelector: ".wp-block-table > table" + __experimentalSelector: ".wp-block-table > table", + interactivity: { + clientNavigation: true + } }, styles: [{ name: "regular", @@ -53622,26 +56499,28 @@ const table_init = () => initBlock({ settings: table_settings }); -;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table-of-contents/icon.js +;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table-of-contents.js /** * WordPress dependencies */ -/* harmony default export */ var table_of_contents_icon = ((0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { +const tableOfContents = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", - width: "24", - height: "24", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { - d: "M15.1 15.8H20v-1.5h-4.9v1.5zm-4-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 3c-.6 0-1-.4-1-1s.4-1 1-1 1 .4 1 1-.4 1-1 1zm5-3c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zM6 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z", - fill: "#1e1e1e" -}))); +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M20 9.484h-8.889v-1.5H20v1.5Zm0 7h-4.889v-1.5H20v1.5Zm-14 .032a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 1a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z" +}), (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { + d: "M13 15.516a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM8 8.484a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z" +})); +/* harmony default export */ const table_of_contents = (tableOfContents); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table-of-contents/list.js /** - * WordPress dependencies + * External dependencies */ /** @@ -53650,23 +56529,29 @@ const table_init = () => initBlock({ const ENTRY_CLASS_NAME = 'wp-block-table-of-contents__entry'; function TableOfContentsList({ - nestedHeadingList + nestedHeadingList, + disableLinkActivation, + onClick }) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, nestedHeadingList.map((node, index) => { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, nestedHeadingList.map((node, index) => { const { content, link } = node.heading; - const entry = link ? (0,external_wp_element_namespaceObject.createElement)("a", { + const entry = link ? (0,external_React_namespaceObject.createElement)("a", { className: ENTRY_CLASS_NAME, - href: link - }, content) : (0,external_wp_element_namespaceObject.createElement)("span", { + href: link, + "aria-disabled": disableLinkActivation || undefined, + onClick: disableLinkActivation && 'function' === typeof onClick ? onClick : undefined + }, content) : (0,external_React_namespaceObject.createElement)("span", { className: ENTRY_CLASS_NAME }, content); - return (0,external_wp_element_namespaceObject.createElement)("li", { + return (0,external_React_namespaceObject.createElement)("li", { key: index - }, entry, node.children ? (0,external_wp_element_namespaceObject.createElement)("ol", null, (0,external_wp_element_namespaceObject.createElement)(TableOfContentsList, { - nestedHeadingList: node.children + }, entry, node.children ? (0,external_React_namespaceObject.createElement)("ol", null, (0,external_React_namespaceObject.createElement)(TableOfContentsList, { + nestedHeadingList: node.children, + disableLinkActivation: disableLinkActivation, + onClick: disableLinkActivation && 'function' === typeof onClick ? onClick : undefined })) : null); })); } @@ -53723,7 +56608,7 @@ function linearToNestedHeadingList(headingList) { } // EXTERNAL MODULE: ./node_modules/fast-deep-equal/es6/index.js -var es6 = __webpack_require__(5619); +var es6 = __webpack_require__(7734); var es6_default = /*#__PURE__*/__webpack_require__.n(es6); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table-of-contents/hooks.js /** @@ -53745,7 +56630,7 @@ function getLatestHeadings(select, clientId) { getBlockAttributes, getBlockName, getClientIdsWithDescendants, - __experimentalGetGlobalBlocksByName: getGlobalBlocksByName + getBlocksByName } = select(external_wp_blockEditor_namespaceObject.store); // FIXME: @wordpress/block-library should not depend on @wordpress/editor. @@ -53755,7 +56640,7 @@ function getLatestHeadings(select, clientId) { // will be null, and the block's saved markup will lack permalinks. // eslint-disable-next-line @wordpress/data-no-store-string-literals const permalink = (_select$getPermalink = select('core/editor').getPermalink()) !== null && _select$getPermalink !== void 0 ? _select$getPermalink : null; - const isPaginated = getGlobalBlocksByName('core/nextpage').length !== 0; + const isPaginated = getBlocksByName('core/nextpage').length !== 0; const { onlyIncludeCurrentPage } = (_getBlockAttributes = getBlockAttributes(clientId)) !== null && _getBlockAttributes !== void 0 ? _getBlockAttributes : {}; @@ -53875,6 +56760,9 @@ function useObserveHeadings(clientId) { + + + /** * Internal dependencies */ @@ -53882,7 +56770,6 @@ function useObserveHeadings(clientId) { - /** @typedef {import('./utils').HeadingData} HeadingData */ /** @@ -53895,7 +56782,7 @@ function useObserveHeadings(clientId) { * @param {string} props.clientId * @param {(attributes: Object) => void} props.setAttributes * - * @return {WPComponent} The component. + * @return {Component} The component. */ function TableOfContentsEdit({ attributes: { @@ -53907,6 +56794,24 @@ function TableOfContentsEdit({ }) { useObserveHeadings(clientId); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); + const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(TableOfContentsEdit, 'table-of-contents'); + + // If a user clicks to a link prevent redirection and show a warning. + const { + createWarningNotice, + removeNotice + } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store); + let noticeId; + const showRedirectionPreventedNotice = event => { + event.preventDefault(); + // Remove previous warning if any, to show one at a time per block. + removeNotice(noticeId); + noticeId = `block-library/core/table-of-contents/redirection-prevented/${instanceId}`; + createWarningNotice((0,external_wp_i18n_namespaceObject.__)('Links are disabled in the editor.'), { + id: noticeId, + type: 'snackbar' + }); + }; const canInsertList = (0,external_wp_data_namespaceObject.useSelect)(select => { const { getBlockRootClientId, @@ -53919,17 +56824,17 @@ function TableOfContentsEdit({ replaceBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); const headingTree = linearToNestedHeadingList(headings); - const toolbarControls = canInsertList && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + const toolbarControls = canInsertList && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { onClick: () => replaceBlocks(clientId, (0,external_wp_blocks_namespaceObject.createBlock)('core/list', { ordered: true, - values: (0,external_wp_element_namespaceObject.renderToString)((0,external_wp_element_namespaceObject.createElement)(TableOfContentsList, { + values: (0,external_wp_element_namespaceObject.renderToString)((0,external_React_namespaceObject.createElement)(TableOfContentsList, { nestedHeadingList: headingTree })) })) }, (0,external_wp_i18n_namespaceObject.__)('Convert to static list')))); - const inspectorControls = (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + const inspectorControls = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Only include current page'), checked: onlyIncludeCurrentPage, @@ -53943,22 +56848,22 @@ function TableOfContentsEdit({ // Note that the toolbar controls are intentionally omitted since the // "Convert to static list" option is useless to the placeholder state. if (headings.length === 0) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { - icon: (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { - icon: table_of_contents_icon + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { + icon: (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { + icon: table_of_contents }), label: (0,external_wp_i18n_namespaceObject.__)('Table of Contents'), instructions: (0,external_wp_i18n_namespaceObject.__)('Start adding Heading blocks to create a table of contents. Headings with HTML anchors will be linked here.') })), inspectorControls); } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("nav", { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("nav", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)("ol", { - inert: "true" - }, (0,external_wp_element_namespaceObject.createElement)(TableOfContentsList, { - nestedHeadingList: headingTree + }, (0,external_React_namespaceObject.createElement)("ol", null, (0,external_React_namespaceObject.createElement)(TableOfContentsList, { + nestedHeadingList: headingTree, + disableLinkActivation: true, + onClick: showRedirectionPreventedNotice }))), toolbarControls, inspectorControls); } @@ -53982,15 +56887,20 @@ function table_of_contents_save_save({ if (headings.length === 0) { return null; } - return (0,external_wp_element_namespaceObject.createElement)("nav", { + return (0,external_React_namespaceObject.createElement)("nav", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save() - }, (0,external_wp_element_namespaceObject.createElement)("ol", null, (0,external_wp_element_namespaceObject.createElement)(TableOfContentsList, { + }, (0,external_React_namespaceObject.createElement)("ol", null, (0,external_React_namespaceObject.createElement)(TableOfContentsList, { nestedHeadingList: linearToNestedHeadingList(headings) }))); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table-of-contents/index.js /** + * WordPress dependencies + */ + + +/** * Internal dependencies */ @@ -54041,19 +56951,21 @@ const table_of_contents_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } }, example: {} }; - const { name: table_of_contents_name } = table_of_contents_metadata; const table_of_contents_settings = { - icon: table_of_contents_icon, + icon: table_of_contents, edit: TableOfContentsEdit, save: table_of_contents_save_save }; @@ -54080,7 +56992,7 @@ const tag_cloud_transforms_transforms = { transform: () => (0,external_wp_blocks_namespaceObject.createBlock)('core/categories') }] }; -/* harmony default export */ var tag_cloud_transforms = (tag_cloud_transforms_transforms); +/* harmony default export */ const tag_cloud_transforms = (tag_cloud_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/tag-cloud/edit.js @@ -54111,8 +57023,7 @@ const MIN_FONT_SIZE = 0.1; const MAX_FONT_SIZE = 100; function TagCloudEdit({ attributes, - setAttributes, - taxonomies + setAttributes }) { const { taxonomy, @@ -54121,9 +57032,13 @@ function TagCloudEdit({ smallestFontSize, largestFontSize } = attributes; + const [availableUnits] = (0,external_wp_blockEditor_namespaceObject.useSettings)('spacing.units'); const units = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({ - availableUnits: (0,external_wp_blockEditor_namespaceObject.useSetting)('spacing.units') || ['%', 'px', 'em', 'rem'] + availableUnits: availableUnits || ['%', 'px', 'em', 'rem'] }); + const taxonomies = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).getTaxonomies({ + per_page: -1 + }), []); const getTaxonomyOptions = () => { const selectOption = { label: (0,external_wp_i18n_namespaceObject.__)('- Select -'), @@ -54161,9 +57076,9 @@ function TagCloudEdit({ }); setAttributes(updateObj); }; - const inspectorControls = (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + const inspectorControls = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Taxonomy'), options: getTaxonomyOptions(), @@ -54171,14 +57086,14 @@ function TagCloudEdit({ onChange: selectedTaxonomy => setAttributes({ taxonomy: selectedTaxonomy }) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Show post counts'), checked: showTagCounts, onChange: () => setAttributes({ showTagCounts: !showTagCounts }) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)('Number of tags'), @@ -54189,9 +57104,9 @@ function TagCloudEdit({ min: MIN_TAGS, max: MAX_TAGS, required: true - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Flex, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Flex, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, { isBlock: true - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalUnitControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalUnitControl, { label: (0,external_wp_i18n_namespaceObject.__)('Smallest size'), value: smallestFontSize, onChange: value => { @@ -54200,9 +57115,9 @@ function TagCloudEdit({ units: units, min: MIN_FONT_SIZE, max: MAX_FONT_SIZE - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, { + })), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, { isBlock: true - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalUnitControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalUnitControl, { label: (0,external_wp_i18n_namespaceObject.__)('Largest size'), value: largestFontSize, onChange: value => { @@ -54212,21 +57127,15 @@ function TagCloudEdit({ min: MIN_FONT_SIZE, max: MAX_FONT_SIZE }))))); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, inspectorControls, (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, inspectorControls, (0,external_React_namespaceObject.createElement)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)() - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Disabled, null, (0,external_wp_element_namespaceObject.createElement)((external_wp_serverSideRender_default()), { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Disabled, null, (0,external_React_namespaceObject.createElement)((external_wp_serverSideRender_default()), { skipBlockSupportAttributes: true, block: "core/tag-cloud", attributes: attributes })))); } -/* harmony default export */ var tag_cloud_edit = ((0,external_wp_data_namespaceObject.withSelect)(select => { - return { - taxonomies: select(external_wp_coreData_namespaceObject.store).getTaxonomies({ - per_page: -1 - }) - }; -})(TagCloudEdit)); +/* harmony default export */ const tag_cloud_edit = (TagCloudEdit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/tag-cloud/index.js /** @@ -54293,6 +57202,9 @@ const tag_cloud_metadata = { __experimentalFontStyle: true, __experimentalTextTransform: true, __experimentalLetterSpacing: true + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-tag-cloud-editor" @@ -54656,7 +57568,7 @@ function __disposeResources(env) { return next(); } -/* harmony default export */ var tslib_es6 = ({ +/* harmony default export */ const tslib_es6 = ({ __extends, __assign, __rest, @@ -54793,13 +57705,13 @@ function capitalCase(input, options) { * WordPress dependencies */ -const symbolFilled = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const symbolFilled = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z" })); -/* harmony default export */ var symbol_filled = (symbolFilled); +/* harmony default export */ const symbol_filled = (symbolFilled); ;// CONCATENATED MODULE: ./node_modules/dot-case/dist.es2015/index.js @@ -54970,24 +57882,24 @@ function TitleModal({ event.preventDefault(); onSubmit(title); }; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, { title: (0,external_wp_i18n_namespaceObject.sprintf)( // Translators: %s as template part area title ("Header", "Footer", etc.). (0,external_wp_i18n_namespaceObject.__)('Name and create your new %s'), areaLabel.toLowerCase()), overlayClassName: "wp-block-template-part__placeholder-create-new__title-form", onRequestClose: onClose - }, (0,external_wp_element_namespaceObject.createElement)("form", { + }, (0,external_React_namespaceObject.createElement)("form", { onSubmit: submitForCreation - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: "5" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Name'), value: title, onChange: setTitle - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, { justify: "right" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { variant: "primary", type: "submit", disabled: !title.length, @@ -55024,21 +57936,21 @@ function TemplatePartPlaceholder({ const [showTitleModal, setShowTitleModal] = (0,external_wp_element_namespaceObject.useState)(false); const areaObject = useTemplatePartArea(area); const createFromBlocks = useCreateTemplatePartFromBlocks(area, setAttributes); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { icon: areaObject.icon, label: areaObject.label, instructions: (0,external_wp_i18n_namespaceObject.sprintf)( // Translators: %s as template part area title ("Header", "Footer", etc.). (0,external_wp_i18n_namespaceObject.__)('Choose an existing %s or create a new one.'), areaObject.label.toLowerCase()) - }, isResolving && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null), !isResolving && !!(templateParts.length || blockPatterns.length) && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, isResolving && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null), !isResolving && !!(templateParts.length || blockPatterns.length) && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { variant: "primary", onClick: onOpenSelectionModal - }, (0,external_wp_i18n_namespaceObject.__)('Choose')), !isResolving && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, (0,external_wp_i18n_namespaceObject.__)('Choose')), !isResolving && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { variant: "secondary", onClick: () => { setShowTitleModal(true); } - }, (0,external_wp_i18n_namespaceObject.__)('Start blank')), showTitleModal && (0,external_wp_element_namespaceObject.createElement)(TitleModal, { + }, (0,external_wp_i18n_namespaceObject.__)('Start blank')), showTitleModal && (0,external_React_namespaceObject.createElement)(TitleModal, { areaLabel: areaObject.label, onClose: () => setShowTitleModal(false), onSubmit: title => { @@ -55112,32 +58024,32 @@ function TemplatePartSelectionModal({ const createFromBlocks = useCreateTemplatePartFromBlocks(area, setAttributes); const hasTemplateParts = !!filteredTemplateParts.length; const hasBlockPatterns = !!filteredBlockPatterns.length; - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: "block-library-template-part__selection-content" - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { className: "block-library-template-part__selection-search" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SearchControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SearchControl, { __nextHasNoMarginBottom: true, onChange: setSearchValue, value: searchValue, label: (0,external_wp_i18n_namespaceObject.__)('Search for replacements'), placeholder: (0,external_wp_i18n_namespaceObject.__)('Search') - })), hasTemplateParts && (0,external_wp_element_namespaceObject.createElement)("div", null, (0,external_wp_element_namespaceObject.createElement)("h2", null, (0,external_wp_i18n_namespaceObject.__)('Existing template parts')), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalBlockPatternsList, { + })), hasTemplateParts && (0,external_React_namespaceObject.createElement)("div", null, (0,external_React_namespaceObject.createElement)("h2", null, (0,external_wp_i18n_namespaceObject.__)('Existing template parts')), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalBlockPatternsList, { blockPatterns: filteredTemplateParts, shownPatterns: shownTemplateParts, onClickPattern: pattern => { onTemplatePartSelect(pattern.templatePart); } - })), hasBlockPatterns && (0,external_wp_element_namespaceObject.createElement)("div", null, (0,external_wp_element_namespaceObject.createElement)("h2", null, (0,external_wp_i18n_namespaceObject.__)('Patterns')), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalBlockPatternsList, { + })), hasBlockPatterns && (0,external_React_namespaceObject.createElement)("div", null, (0,external_React_namespaceObject.createElement)("h2", null, (0,external_wp_i18n_namespaceObject.__)('Patterns')), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalBlockPatternsList, { blockPatterns: filteredBlockPatterns, shownPatterns: shownBlockPatterns, onClickPattern: (pattern, blocks) => { createFromBlocks(blocks, pattern.title); onClose(); } - })), !hasTemplateParts && !hasBlockPatterns && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, { + })), !hasTemplateParts && !hasBlockPatterns && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, { alignment: "center" - }, (0,external_wp_element_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('No results found.')))); + }, (0,external_React_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('No results found.')))); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/template-part/edit/utils/transformers.js @@ -55279,7 +58191,7 @@ function TemplatePartImportControls({ // Render an empty node while data is loading to avoid SlotFill re-positioning bug. // See: https://github.com/WordPress/gutenberg/issues/15641. if (!hasResolved) { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalSpacer, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalSpacer, { marginBottom: "0" }); } @@ -55325,25 +58237,26 @@ function TemplatePartImportControls({ } setIsBusy(false); } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalSpacer, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalSpacer, { marginBottom: "4" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, { as: "form", onSubmit: createFromWidgets - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexBlock, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexBlock, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { label: (0,external_wp_i18n_namespaceObject.__)('Import widget area'), value: selectedSidebar, options: options, onChange: value => setSelectedSidebar(value), disabled: !options.length, - __next36pxDefaultSize: true, + __next40pxDefaultSize: true, __nextHasNoMarginBottom: true - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, { + })), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, { style: { marginBottom: '8px', marginTop: 'auto' } - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + __next40pxDefaultSize: true, variant: "primary", type: "submit", isBusy: isBusy, @@ -55361,7 +58274,6 @@ function TemplatePartImportControls({ - /** * Internal dependencies */ @@ -55397,9 +58309,7 @@ function TemplatePartAdvancedControls({ label, value: _area })); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { - group: "advanced" - }, isEntityAvailable && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, isEntityAvailable && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Title'), value: title, @@ -55407,15 +58317,16 @@ function TemplatePartAdvancedControls({ setTitle(value); }, onFocus: event => event.target.select() - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Area'), labelPosition: "top", options: areaOptions, value: area, onChange: setArea - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { + })), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, + __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)('HTML element'), options: [{ label: (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: HTML tag based on area. */ @@ -55448,7 +58359,7 @@ function TemplatePartAdvancedControls({ tagName: value }), help: htmlElementMessages[tagName] - }), !hasInnerBlocks && (0,external_wp_element_namespaceObject.createElement)(TemplatePartImportControls, { + }), !hasInnerBlocks && (0,external_React_namespaceObject.createElement)(TemplatePartImportControls, { area: area, setAttributes: setAttributes })); @@ -55475,8 +58386,8 @@ function TemplatePartInnerBlocks({ } = select(external_wp_blockEditor_namespaceObject.store); return getSettings()?.supportsLayout; }, []); - const defaultLayout = (0,external_wp_blockEditor_namespaceObject.useSetting)('layout') || {}; - const usedLayout = !!layout && layout.inherit ? defaultLayout : layout; + const [defaultLayout] = (0,external_wp_blockEditor_namespaceObject.useSettings)('layout'); + const usedLayout = layout?.inherit ? defaultLayout || {} : layout; const [blocks, onInput, onChange] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)('postType', 'wp_template_part', { id }); @@ -55487,7 +58398,7 @@ function TemplatePartInnerBlocks({ renderAppender: hasInnerBlocks ? undefined : external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender, layout: themeSupportsLayout ? usedLayout : undefined }); - return (0,external_wp_element_namespaceObject.createElement)(TagName, { + return (0,external_React_namespaceObject.createElement)(TagName, { ...innerBlocksProps }); } @@ -55513,27 +58424,49 @@ function TemplatePartInnerBlocks({ +function ReplaceButton({ + isEntityAvailable, + area, + clientId, + templatePartId, + isTemplatePartSelectionOpen, + setIsTemplatePartSelectionOpen +}) { + const { + templateParts + } = useAlternativeTemplateParts(area, templatePartId); + const blockPatterns = useAlternativeBlockPatterns(area, clientId); + const hasReplacements = !!templateParts.length || !!blockPatterns.length; + const canReplace = isEntityAvailable && hasReplacements && (area === 'header' || area === 'footer'); + if (!canReplace) { + return null; + } + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { + onClick: () => { + setIsTemplatePartSelectionOpen(true); + }, + "aria-expanded": isTemplatePartSelectionOpen, + "aria-haspopup": "dialog" + }, (0,external_wp_i18n_namespaceObject.__)('Replace')); +} function TemplatePartEdit({ attributes, setAttributes, clientId }) { + const currentTheme = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).getCurrentTheme()?.stylesheet, []); const { slug, - theme, + theme = currentTheme, tagName, layout = {} } = attributes; const templatePartId = createTemplatePartId(theme, slug); - const hasAlreadyRendered = (0,external_wp_blockEditor_namespaceObject.__experimentalUseHasRecursion)(templatePartId); + const hasAlreadyRendered = (0,external_wp_blockEditor_namespaceObject.useHasRecursion)(templatePartId); const [isTemplatePartSelectionOpen, setIsTemplatePartSelectionOpen] = (0,external_wp_element_namespaceObject.useState)(false); - - // Set the postId block attribute if it did not exist, - // but wait until the inner blocks have loaded to allow - // new edits to trigger this. const { isResolved, - innerBlocks, + hasInnerBlocks, isMissing, area } = (0,external_wp_data_namespaceObject.useSelect)(select => { @@ -55542,62 +58475,58 @@ function TemplatePartEdit({ hasFinishedResolution } = select(external_wp_coreData_namespaceObject.store); const { - getBlocks + getBlockCount } = select(external_wp_blockEditor_namespaceObject.store); const getEntityArgs = ['postType', 'wp_template_part', templatePartId]; const entityRecord = templatePartId ? getEditedEntityRecord(...getEntityArgs) : null; const _area = entityRecord?.area || attributes.area; const hasResolvedEntity = templatePartId ? hasFinishedResolution('getEditedEntityRecord', getEntityArgs) : false; return { - innerBlocks: getBlocks(clientId), + hasInnerBlocks: getBlockCount(clientId) > 0, isResolved: hasResolvedEntity, isMissing: hasResolvedEntity && (!entityRecord || Object.keys(entityRecord).length === 0), area: _area }; }, [templatePartId, attributes.area, clientId]); - const { - templateParts - } = useAlternativeTemplateParts(area, templatePartId); - const blockPatterns = useAlternativeBlockPatterns(area, clientId); - const hasReplacements = !!templateParts.length || !!blockPatterns.length; const areaObject = useTemplatePartArea(area); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); const isPlaceholder = !slug; const isEntityAvailable = !isPlaceholder && !isMissing && isResolved; const TagName = tagName || areaObject.tagName; - const canReplace = isEntityAvailable && hasReplacements && (area === 'header' || area === 'footer'); // We don't want to render a missing state if we have any inner blocks. // A new template part is automatically created if we have any inner blocks but no entity. - if (innerBlocks.length === 0 && (slug && !theme || slug && isMissing)) { - return (0,external_wp_element_namespaceObject.createElement)(TagName, { + if (!hasInnerBlocks && (slug && !theme || slug && isMissing)) { + return (0,external_React_namespaceObject.createElement)(TagName, { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: Template part slug */ + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: Template part slug */ (0,external_wp_i18n_namespaceObject.__)('Template part has been deleted or is unavailable: %s'), slug))); } if (isEntityAvailable && hasAlreadyRendered) { - return (0,external_wp_element_namespaceObject.createElement)(TagName, { + return (0,external_React_namespaceObject.createElement)(TagName, { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Block cannot be rendered inside itself.'))); + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Block cannot be rendered inside itself.'))); } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalRecursionProvider, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RecursionProvider, { uniqueId: templatePartId - }, (0,external_wp_element_namespaceObject.createElement)(TemplatePartAdvancedControls, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, { + group: "advanced" + }, (0,external_React_namespaceObject.createElement)(TemplatePartAdvancedControls, { tagName: tagName, setAttributes: setAttributes, isEntityAvailable: isEntityAvailable, templatePartId: templatePartId, defaultWrapper: areaObject.tagName, - hasInnerBlocks: innerBlocks.length > 0 - }), isPlaceholder && (0,external_wp_element_namespaceObject.createElement)(TagName, { + hasInnerBlocks: hasInnerBlocks + })), isPlaceholder && (0,external_React_namespaceObject.createElement)(TagName, { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(TemplatePartPlaceholder, { + }, (0,external_React_namespaceObject.createElement)(TemplatePartPlaceholder, { area: attributes.area, templatePartId: templatePartId, clientId: clientId, setAttributes: setAttributes, onOpenSelectionModal: () => setIsTemplatePartSelectionOpen(true) - })), canReplace && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockSettingsMenuControls, null, ({ + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockSettingsMenuControls, null, ({ selectedClientIds }) => { // Only enable for single selection that matches the current block. @@ -55605,34 +58534,30 @@ function TemplatePartEdit({ if (!(selectedClientIds.length === 1 && clientId === selectedClientIds[0])) { return null; } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { - onClick: () => { - setIsTemplatePartSelectionOpen(true); - }, - "aria-expanded": isTemplatePartSelectionOpen, - "aria-haspopup": "dialog" - }, (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.__)('Replace <BlockTitle />'), { - BlockTitle: (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockTitle, { - clientId: clientId, - maximumLength: 25 - }) - })); - }), isEntityAvailable && (0,external_wp_element_namespaceObject.createElement)(TemplatePartInnerBlocks, { + return (0,external_React_namespaceObject.createElement)(ReplaceButton, { + isEntityAvailable, + area, + clientId, + templatePartId, + isTemplatePartSelectionOpen, + setIsTemplatePartSelectionOpen + }); + }), isEntityAvailable && (0,external_React_namespaceObject.createElement)(TemplatePartInnerBlocks, { tagName: TagName, blockProps: blockProps, postId: templatePartId, - hasInnerBlocks: innerBlocks.length > 0, + hasInnerBlocks: hasInnerBlocks, layout: layout - }), !isPlaceholder && !isResolved && (0,external_wp_element_namespaceObject.createElement)(TagName, { + }), !isPlaceholder && !isResolved && (0,external_React_namespaceObject.createElement)(TagName, { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null))), isTemplatePartSelectionOpen && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null))), isTemplatePartSelectionOpen && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, { overlayClassName: "block-editor-template-part__selection-modal", title: (0,external_wp_i18n_namespaceObject.sprintf)( // Translators: %s as template part area title ("Header", "Footer", etc.). (0,external_wp_i18n_namespaceObject.__)('Choose a %s'), areaObject.label.toLowerCase()), onRequestClose: () => setIsTemplatePartSelectionOpen(false), isFullScreen: true - }, (0,external_wp_element_namespaceObject.createElement)(TemplatePartSelectionModal, { + }, (0,external_React_namespaceObject.createElement)(TemplatePartSelectionModal, { templatePartId: templatePartId, clientId: clientId, area: area, @@ -55647,13 +58572,13 @@ function TemplatePartEdit({ * WordPress dependencies */ -const header = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const header = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M18.5 10.5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z" })); -/* harmony default export */ var library_header = (header); +/* harmony default export */ const library_header = (header); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/footer.js @@ -55661,14 +58586,14 @@ const header = (0,external_wp_element_namespaceObject.createElement)(external_wp * WordPress dependencies */ -const footer = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const footer = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { fillRule: "evenodd", d: "M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z" })); -/* harmony default export */ var library_footer = (footer); +/* harmony default export */ const library_footer = (footer); ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/sidebar.js @@ -55676,13 +58601,13 @@ const footer = (0,external_wp_element_namespaceObject.createElement)(external_wp * WordPress dependencies */ -const sidebar = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const sidebar = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z" })); -/* harmony default export */ var library_sidebar = (sidebar); +/* harmony default export */ const library_sidebar = (sidebar); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/template-part/variations.js /** @@ -55718,7 +58643,11 @@ function enhanceTemplatePartVariations(settings, name) { // Find a matching variation from the created template part // by checking the entity's `area` property. if (!slug) return false; - const entity = (0,external_wp_data_namespaceObject.select)(external_wp_coreData_namespaceObject.store).getEntityRecord('postType', 'wp_template_part', `${theme}//${slug}`); + const { + getCurrentTheme, + getEntityRecord + } = (0,external_wp_data_namespaceObject.select)(external_wp_coreData_namespaceObject.store); + const entity = getEntityRecord('postType', 'wp_template_part', `${theme || getCurrentTheme()?.stylesheet}//${slug}`); if (entity?.slug) { return entity.slug === variationAttributes.slug; } @@ -55787,7 +58716,11 @@ const template_part_metadata = { supports: { align: true, html: false, - reusable: false + reusable: false, + renaming: false, + interactivity: { + clientNavigation: true + } }, editorStyle: "wp-block-template-part-editor" }; @@ -55808,11 +58741,15 @@ const template_part_settings = { if (!slug) { return; } - const entity = (0,external_wp_data_namespaceObject.select)(external_wp_coreData_namespaceObject.store).getEntityRecord('postType', 'wp_template_part', theme + '//' + slug); + const { + getCurrentTheme, + getEditedEntityRecord + } = (0,external_wp_data_namespaceObject.select)(external_wp_coreData_namespaceObject.store); + const entity = getEditedEntityRecord('postType', 'wp_template_part', (theme || getCurrentTheme()?.stylesheet) + '//' + slug); if (!entity) { return; } - return (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(entity.title?.rendered) || capitalCase(entity.slug); + return (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(entity.title) || capitalCase(entity.slug || ''); }, edit: TemplatePartEdit }; @@ -55821,7 +58758,7 @@ const template_part_init = () => { // Prevent adding template parts inside post templates. const DISALLOWED_PARENTS = ['core/post-template', 'core/post-content']; - (0,external_wp_hooks_namespaceObject.addFilter)('blockEditor.__unstableCanInsertBlockType', 'removeTemplatePartsFromPostTemplates', (canInsert, blockType, rootClientId, { + (0,external_wp_hooks_namespaceObject.addFilter)('blockEditor.__unstableCanInsertBlockType', 'core/block-library/removeTemplatePartsFromPostTemplates', (canInsert, blockType, rootClientId, { getBlock, getBlockParentsByBlockName }) => { @@ -55849,13 +58786,13 @@ const template_part_init = () => { * WordPress dependencies */ -const term_description_tag = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const term_description_tag = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M6.08 10.103h2.914L9.657 12h1.417L8.23 4H6.846L4 12h1.417l.663-1.897Zm1.463-4.137.994 2.857h-2l1.006-2.857ZM11 16H4v-1.5h7V16Zm1 0h8v-1.5h-8V16Zm-4 4H4v-1.5h4V20Zm7-1.5V20H9v-1.5h6Z" })); -/* harmony default export */ var term_description = (term_description_tag); +/* harmony default export */ const term_description = (term_description_tag); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/term-description/edit.js @@ -55883,20 +58820,20 @@ function TermDescriptionEdit({ }), style: mergedStyle }); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: nextAlign => { setAttributes({ textAlign: nextAlign }); } - })), (0,external_wp_element_namespaceObject.createElement)("div", { + })), (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)("div", { + }, (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-term-description__placeholder" - }, (0,external_wp_element_namespaceObject.createElement)("span", null, (0,external_wp_i18n_namespaceObject.__)('Term Description'))))); + }, (0,external_React_namespaceObject.createElement)("span", null, (0,external_wp_i18n_namespaceObject.__)('Term Description'))))); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/term-description/index.js @@ -55948,6 +58885,9 @@ const term_description_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } } }; @@ -55988,13 +58928,13 @@ function TextColumnsEdit({ since: '5.3', alternative: 'the Columns block' }); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockAlignmentToolbar, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockAlignmentToolbar, { value: width, onChange: nextWidth => setAttributes({ width: nextWidth }), controls: ['center', 'wide', 'full'] - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, { __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)('Columns'), @@ -56005,17 +58945,17 @@ function TextColumnsEdit({ min: 2, max: 4, required: true - }))), (0,external_wp_element_namespaceObject.createElement)("div", { + }))), (0,external_React_namespaceObject.createElement)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: `align${width} columns-${columns}` }) }, Array.from({ length: columns }).map((_, index) => { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-column", key: `column-${index}` - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { tagName: "p", value: content?.[index]?.children, onChange: nextContent => { @@ -56047,16 +58987,16 @@ function text_columns_save_save({ content, columns } = attributes; - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: `align${width} columns-${columns}` }) }, Array.from({ length: columns - }).map((_, index) => (0,external_wp_element_namespaceObject.createElement)("div", { + }).map((_, index) => (0,external_React_namespaceObject.createElement)("div", { className: "wp-block-column", key: `column-${index}` - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "p", value: content?.[index]?.children })))); @@ -56087,7 +59027,7 @@ const text_columns_transforms_transforms = { })]))) }] }; -/* harmony default export */ var text_columns_transforms = (text_columns_transforms_transforms); +/* harmony default export */ const text_columns_transforms = (text_columns_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/text-columns/index.js /** @@ -56126,7 +59066,10 @@ const text_columns_metadata = { } }, supports: { - inserter: false + inserter: false, + interactivity: { + clientNavigation: true + } }, editorStyle: "wp-block-text-columns-editor", style: "wp-block-text-columns" @@ -56164,13 +59107,13 @@ const text_columns_init = () => initBlock({ * WordPress dependencies */ -const verse = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const verse = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z" })); -/* harmony default export */ var library_verse = (verse); +/* harmony default export */ const library_verse = (verse); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/verse/deprecated.js @@ -56207,7 +59150,7 @@ const verse_deprecated_v1 = { textAlign, content } = attributes; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "pre", style: { textAlign @@ -56254,11 +59197,11 @@ const verse_deprecated_v2 = { const className = classnames_default()({ [`has-text-align-${textAlign}`]: textAlign }); - return (0,external_wp_element_namespaceObject.createElement)("pre", { + return (0,external_React_namespaceObject.createElement)("pre", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }) - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content })); }, @@ -56278,7 +59221,7 @@ const verse_deprecated_v2 = { * * See block-deprecation.md */ -/* harmony default export */ var verse_deprecated = ([verse_deprecated_v2, verse_deprecated_v1]); +/* harmony default export */ const verse_deprecated = ([verse_deprecated_v2, verse_deprecated_v1]); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/verse/edit.js @@ -56311,14 +59254,14 @@ function VerseEdit({ }), style }); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentToolbar, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentToolbar, { value: textAlign, onChange: nextAlign => { setAttributes({ textAlign: nextAlign }); } - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { tagName: "pre", identifier: "content", preserveWhiteSpace: true, @@ -56360,11 +59303,11 @@ function verse_save_save({ const className = classnames_default()({ [`has-text-align-${textAlign}`]: textAlign }); - return (0,external_wp_element_namespaceObject.createElement)("pre", { + return (0,external_React_namespaceObject.createElement)("pre", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }) - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content })); } @@ -56386,7 +59329,7 @@ const verse_transforms_transforms = { transform: attributes => (0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph', attributes) }] }; -/* harmony default export */ var verse_transforms = (verse_transforms_transforms); +/* harmony default export */ const verse_transforms = (verse_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/verse/index.js /** @@ -56412,10 +59355,9 @@ const verse_metadata = { textdomain: "default", attributes: { content: { - type: "string", - source: "html", + type: "rich-text", + source: "rich-text", selector: "pre", - "default": "", __unstablePreserveWhiteSpace: true, __experimentalRole: "content" }, @@ -56443,8 +59385,7 @@ const verse_metadata = { __experimentalTextTransform: true, __experimentalTextDecoration: true, __experimentalDefaultControls: { - fontSize: true, - fontAppearance: true + fontSize: true } }, spacing: { @@ -56460,6 +59401,9 @@ const verse_metadata = { width: true, color: true, style: true + }, + interactivity: { + clientNavigation: true } }, style: "wp-block-verse", @@ -56481,7 +59425,6 @@ const verse_settings = { /* eslint-enable @wordpress/i18n-no-collapsible-whitespace */ } }, - transforms: verse_transforms, deprecated: verse_deprecated, merge(attributes, attributesToMerge) { @@ -56504,13 +59447,13 @@ const verse_init = () => initBlock({ * WordPress dependencies */ -const video = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { +const video = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { +}, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z" })); -/* harmony default export */ var library_video = (video); +/* harmony default export */ const library_video = (video); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/video/tracks.js @@ -56518,7 +59461,7 @@ function Tracks({ tracks = [] }) { return tracks.map(track => { - return (0,external_wp_element_namespaceObject.createElement)("track", { + return (0,external_React_namespaceObject.createElement)("track", { key: track.src, ...track }); @@ -56552,8 +59495,8 @@ const video_deprecated_metadata = { attribute: "autoplay" }, caption: { - type: "string", - source: "html", + type: "rich-text", + source: "rich-text", selector: "figcaption", __experimentalRole: "content" }, @@ -56625,6 +59568,9 @@ const video_deprecated_metadata = { margin: false, padding: false } + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-video-editor", @@ -56654,9 +59600,9 @@ const video_deprecated_v1 = { playsInline, tracks } = attributes; - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save() - }, src && (0,external_wp_element_namespaceObject.createElement)("video", { + }, src && (0,external_React_namespaceObject.createElement)("video", { autoPlay: autoplay, controls: controls, loop: loop, @@ -56665,16 +59611,16 @@ const video_deprecated_v1 = { preload: preload !== 'metadata' ? preload : undefined, src: src, playsInline: playsInline - }, (0,external_wp_element_namespaceObject.createElement)(Tracks, { + }, (0,external_React_namespaceObject.createElement)(Tracks, { tracks: tracks - })), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + })), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })); } }; const video_deprecated_deprecated = [video_deprecated_v1]; -/* harmony default export */ var video_deprecated = (video_deprecated_deprecated); +/* harmony default export */ const video_deprecated = (video_deprecated_deprecated); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/video/edit-common-settings.js @@ -56734,33 +59680,33 @@ const VideoSettings = ({ preload: value }); }, []); - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Autoplay'), onChange: toggleFactory.autoplay, checked: !!autoplay, help: getAutoplayHelp - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Loop'), onChange: toggleFactory.loop, checked: !!loop - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Muted'), onChange: toggleFactory.muted, checked: !!muted - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Playback controls'), onChange: toggleFactory.controls, checked: !!controls - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Play inline'), onChange: toggleFactory.playsInline, checked: !!playsInline - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)('Preload'), value: preload, @@ -56769,7 +59715,7 @@ const VideoSettings = ({ hideCancelButton: true })); }; -/* harmony default export */ var edit_common_settings = (VideoSettings); +/* harmony default export */ const edit_common_settings = (VideoSettings); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/video/tracks-editor.js @@ -56807,15 +59753,15 @@ function TrackList({ }) { let content; if (tracks.length === 0) { - content = (0,external_wp_element_namespaceObject.createElement)("p", { + content = (0,external_React_namespaceObject.createElement)("p", { className: "block-library-video-tracks-editor__tracks-informative-message" }, (0,external_wp_i18n_namespaceObject.__)('Tracks can be subtitles, captions, chapters, or descriptions. They help make your content more accessible to a wider range of users.')); } else { content = tracks.map((track, index) => { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, { key: index, className: "block-library-video-tracks-editor__track-list-track" - }, (0,external_wp_element_namespaceObject.createElement)("span", null, track.label, " "), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, (0,external_React_namespaceObject.createElement)("span", null, track.label, " "), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { variant: "tertiary", onClick: () => onEditPress(index), "aria-label": (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: Label of the video text track e.g: "French subtitles" */ @@ -56823,7 +59769,7 @@ function TrackList({ }, (0,external_wp_i18n_namespaceObject.__)('Edit'))); }); } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, { label: (0,external_wp_i18n_namespaceObject.__)('Text tracks'), className: "block-library-video-tracks-editor__track-list" }, content); @@ -56841,15 +59787,15 @@ function SingleTrackEditor({ kind = DEFAULT_KIND } = track; const fileName = src.startsWith('blob:') ? '' : (0,external_wp_url_namespaceObject.getFilename)(src) || ''; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.NavigableMenu, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.NavigableMenu, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, { className: "block-library-video-tracks-editor__single-track-editor", spacing: "4" - }, (0,external_wp_element_namespaceObject.createElement)("span", { + }, (0,external_React_namespaceObject.createElement)("span", { className: "block-library-video-tracks-editor__single-track-editor-edit-track-label" - }, (0,external_wp_i18n_namespaceObject.__)('Edit track')), (0,external_wp_element_namespaceObject.createElement)("span", null, (0,external_wp_i18n_namespaceObject.__)('File'), ": ", (0,external_wp_element_namespaceObject.createElement)("b", null, fileName)), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalGrid, { + }, (0,external_wp_i18n_namespaceObject.__)('Edit track')), (0,external_React_namespaceObject.createElement)("span", null, (0,external_wp_i18n_namespaceObject.__)('File'), ": ", (0,external_React_namespaceObject.createElement)("b", null, fileName)), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalGrid, { columns: 2, gap: 4 - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true /* eslint-disable jsx-a11y/no-autofocus */, autoFocus: true @@ -56861,7 +59807,7 @@ function SingleTrackEditor({ label: (0,external_wp_i18n_namespaceObject.__)('Label'), value: label, help: (0,external_wp_i18n_namespaceObject.__)('Title of track') - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, onChange: newSrcLang => onChange({ ...track, @@ -56870,9 +59816,9 @@ function SingleTrackEditor({ label: (0,external_wp_i18n_namespaceObject.__)('Source language'), value: srcLang, help: (0,external_wp_i18n_namespaceObject.__)('Language tag (en, fr, etc.)') - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, { + })), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: "8" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, className: "block-library-video-tracks-editor__single-track-editor-kind-select", options: KIND_OPTIONS, @@ -56884,9 +59830,9 @@ function SingleTrackEditor({ kind: newKind }); } - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, { className: "block-library-video-tracks-editor__single-track-editor-buttons-container" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { variant: "secondary", onClick: () => { const changes = {}; @@ -56911,7 +59857,7 @@ function SingleTrackEditor({ } onClose(); } - }, (0,external_wp_i18n_namespaceObject.__)('Close')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, (0,external_wp_i18n_namespaceObject.__)('Close')), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { isDestructive: true, variant: "link", onClick: onRemove @@ -56928,12 +59874,12 @@ function TracksEditor({ if (!mediaUpload) { return null; } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Dropdown, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Dropdown, { contentClassName: "block-library-video-tracks-editor", renderToggle: ({ isOpen, onToggle - }) => (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { + }) => (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { label: (0,external_wp_i18n_namespaceObject.__)('Text tracks'), showTooltip: true, "aria-expanded": isOpen, @@ -56942,7 +59888,7 @@ function TracksEditor({ }, (0,external_wp_i18n_namespaceObject.__)('Text tracks'))), renderContent: () => { if (trackBeingEdited !== null) { - return (0,external_wp_element_namespaceObject.createElement)(SingleTrackEditor, { + return (0,external_React_namespaceObject.createElement)(SingleTrackEditor, { track: tracks[trackBeingEdited], onChange: newTrack => { const newTracks = [...tracks]; @@ -56956,13 +59902,13 @@ function TracksEditor({ } }); } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.NavigableMenu, null, (0,external_wp_element_namespaceObject.createElement)(TrackList, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.NavigableMenu, null, (0,external_React_namespaceObject.createElement)(TrackList, { tracks: tracks, onEditPress: setTrackBeingEdited - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, { + }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, { className: "block-library-video-tracks-editor__add-tracks-container", label: (0,external_wp_i18n_namespaceObject.__)('Add tracks') - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaUpload, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaUpload, { onSelect: ({ url }) => { @@ -56975,11 +59921,11 @@ function TracksEditor({ allowedTypes: ALLOWED_TYPES, render: ({ open - }) => (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { + }) => (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { icon: library_media, onClick: open }, (0,external_wp_i18n_namespaceObject.__)('Open Media Library')) - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaUploadCheck, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FormFileUpload, { + }), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaUploadCheck, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.FormFileUpload, { onChange: event => { const files = event.target.files; const trackIndex = tracks.length; @@ -57006,7 +59952,7 @@ function TracksEditor({ render: ({ openFileDialog }) => { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { icon: library_upload, onClick: () => { openFileDialog(); @@ -57038,7 +59984,6 @@ function TracksEditor({ - /** * Internal dependencies */ @@ -57047,9 +59992,10 @@ function TracksEditor({ + // Much of this description is duplicated from MediaPlaceholder. const video_edit_placeholder = content => { - return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { + return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { className: "block-editor-media-placeholder", withIllustration: true, icon: library_video, @@ -57060,7 +60006,7 @@ const video_edit_placeholder = content => { const video_edit_ALLOWED_MEDIA_TYPES = ['video']; const VIDEO_POSTER_ALLOWED_MEDIA_TYPES = ['image']; function VideoEdit({ - isSelected, + isSelected: isSingleSelected, attributes, className, setAttributes, @@ -57072,21 +60018,20 @@ function VideoEdit({ const posterImageButton = (0,external_wp_element_namespaceObject.useRef)(); const { id, - caption, controls, poster, src, tracks } = attributes; - const prevCaption = (0,external_wp_compose_namespaceObject.usePrevious)(caption); - const [showCaption, setShowCaption] = (0,external_wp_element_namespaceObject.useState)(!!caption); const isTemporaryVideo = !id && (0,external_wp_blob_namespaceObject.isBlobURL)(src); - const mediaUpload = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).getSettings().mediaUpload, []); + const { + getSettings + } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store); (0,external_wp_element_namespaceObject.useEffect)(() => { if (!id && (0,external_wp_blob_namespaceObject.isBlobURL)(src)) { const file = (0,external_wp_blob_namespaceObject.getBlobByURL)(src); if (file) { - mediaUpload({ + getSettings().mediaUpload({ filesList: [file], onFileChange: ([media]) => onSelectVideo(media), onError: onUploadError, @@ -57101,26 +60046,6 @@ function VideoEdit({ videoPlayer.current.load(); } }, [poster]); - - // We need to show the caption when changes come from - // history navigation(undo/redo). - (0,external_wp_element_namespaceObject.useEffect)(() => { - if (caption && !prevCaption) { - setShowCaption(true); - } - }, [caption, prevCaption]); - - // Focus the caption when we click to add one. - const captionRef = (0,external_wp_element_namespaceObject.useCallback)(node => { - if (node && !caption) { - node.focus(); - } - }, [caption]); - (0,external_wp_element_namespaceObject.useEffect)(() => { - if (!isSelected && !caption) { - setShowCaption(false); - } - }, [isSelected, caption]); function onSelectVideo(media) { if (!media || !media.url) { // In this case there was an error @@ -57178,10 +60103,10 @@ function VideoEdit({ className: classes }); if (!src) { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, { - icon: (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, { + icon: (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: library_video }), onSelect: onSelectVideo, @@ -57207,30 +60132,16 @@ function VideoEdit({ posterImageButton.current.focus(); } const videoPosterDescription = `video-block__poster-image-description-${instanceId}`; - return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { - group: "block" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, { - onClick: () => { - setShowCaption(!showCaption); - if (showCaption && caption) { - setAttributes({ - caption: undefined - }); - } - }, - icon: library_caption, - isPressed: showCaption, - label: showCaption ? (0,external_wp_i18n_namespaceObject.__)('Remove caption') : (0,external_wp_i18n_namespaceObject.__)('Add caption') - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(TracksEditor, { + return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, isSingleSelected && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(TracksEditor, { tracks: tracks, onChange: newTracks => { setAttributes({ tracks: newTracks }); } - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { + })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, { mediaId: id, mediaURL: src, allowedTypes: video_edit_ALLOWED_MEDIA_TYPES, @@ -57238,59 +60149,53 @@ function VideoEdit({ onSelect: onSelectVideo, onSelectURL: onSelectURL, onError: onUploadError - })), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { + }))), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)('Settings') - }, (0,external_wp_element_namespaceObject.createElement)(edit_common_settings, { + }, (0,external_React_namespaceObject.createElement)(edit_common_settings, { setAttributes: setAttributes, attributes: attributes - }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaUploadCheck, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl, { + }), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaUploadCheck, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl, { className: "editor-video-poster-control" - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl.VisualLabel, null, (0,external_wp_i18n_namespaceObject.__)('Poster image')), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaUpload, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl.VisualLabel, null, (0,external_wp_i18n_namespaceObject.__)('Poster image')), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaUpload, { title: (0,external_wp_i18n_namespaceObject.__)('Select poster image'), onSelect: onSelectPoster, allowedTypes: VIDEO_POSTER_ALLOWED_MEDIA_TYPES, render: ({ open - }) => (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }) => (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { variant: "primary", onClick: open, ref: posterImageButton, "aria-describedby": videoPosterDescription }, !poster ? (0,external_wp_i18n_namespaceObject.__)('Select') : (0,external_wp_i18n_namespaceObject.__)('Replace')) - }), (0,external_wp_element_namespaceObject.createElement)("p", { + }), (0,external_React_namespaceObject.createElement)("p", { id: videoPosterDescription, hidden: true }, poster ? (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: poster image URL. */ - (0,external_wp_i18n_namespaceObject.__)('The current poster image url is %s'), poster) : (0,external_wp_i18n_namespaceObject.__)('There is no poster image currently selected')), !!poster && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + (0,external_wp_i18n_namespaceObject.__)('The current poster image url is %s'), poster) : (0,external_wp_i18n_namespaceObject.__)('There is no poster image currently selected')), !!poster && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { onClick: onRemovePoster, variant: "tertiary" - }, (0,external_wp_i18n_namespaceObject.__)('Remove')))))), (0,external_wp_element_namespaceObject.createElement)("figure", { + }, (0,external_wp_i18n_namespaceObject.__)('Remove')))))), (0,external_React_namespaceObject.createElement)("figure", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Disabled, { - isDisabled: !isSelected - }, (0,external_wp_element_namespaceObject.createElement)("video", { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Disabled, { + isDisabled: !isSingleSelected + }, (0,external_React_namespaceObject.createElement)("video", { controls: controls, poster: poster, src: src, ref: videoPlayer - }, (0,external_wp_element_namespaceObject.createElement)(Tracks, { + }, (0,external_React_namespaceObject.createElement)(Tracks, { tracks: tracks - }))), isTemporaryVideo && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null), showCaption && (!external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) || isSelected) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { - identifier: "caption", - tagName: "figcaption", - className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'), - "aria-label": (0,external_wp_i18n_namespaceObject.__)('Video caption text'), - ref: captionRef, - placeholder: (0,external_wp_i18n_namespaceObject.__)('Add caption'), - value: caption, - onChange: value => setAttributes({ - caption: value - }), - inlineToolbar: true, - __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())) + }))), isTemporaryVideo && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null), (0,external_React_namespaceObject.createElement)(Caption, { + attributes: attributes, + setAttributes: setAttributes, + isSelected: isSingleSelected, + insertBlocksAfter: insertBlocksAfter, + label: (0,external_wp_i18n_namespaceObject.__)('Video caption text'), + showToolbarButton: isSingleSelected }))); } -/* harmony default export */ var video_edit = (VideoEdit); +/* harmony default export */ const video_edit = (VideoEdit); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/video/save.js @@ -57318,9 +60223,9 @@ function video_save_save({ playsInline, tracks } = attributes; - return (0,external_wp_element_namespaceObject.createElement)("figure", { + return (0,external_React_namespaceObject.createElement)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save() - }, src && (0,external_wp_element_namespaceObject.createElement)("video", { + }, src && (0,external_React_namespaceObject.createElement)("video", { autoPlay: autoplay, controls: controls, loop: loop, @@ -57329,9 +60234,9 @@ function video_save_save({ preload: preload !== 'metadata' ? preload : undefined, src: src, playsInline: playsInline - }, (0,external_wp_element_namespaceObject.createElement)(Tracks, { + }, (0,external_React_namespaceObject.createElement)(Tracks, { tracks: tracks - })), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { + })), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'), tagName: "figcaption", value: caption @@ -57420,9 +60325,26 @@ const video_transforms_transforms = { } } } + }, { + type: 'raw', + isMatch: node => node.nodeName === 'P' && node.children.length === 1 && node.firstChild.nodeName === 'VIDEO', + transform: node => { + const videoElement = node.firstChild; + const attributes = { + autoplay: videoElement.hasAttribute('autoplay') ? true : undefined, + controls: videoElement.hasAttribute('controls') ? undefined : false, + loop: videoElement.hasAttribute('loop') ? true : undefined, + muted: videoElement.hasAttribute('muted') ? true : undefined, + preload: videoElement.getAttribute('preload') || undefined, + playsInline: videoElement.hasAttribute('playsinline') ? true : undefined, + poster: videoElement.getAttribute('poster') || undefined, + src: videoElement.getAttribute('src') || undefined + }; + return (0,external_wp_blocks_namespaceObject.createBlock)('core/video', attributes); + } }] }; -/* harmony default export */ var video_transforms = (video_transforms_transforms); +/* harmony default export */ const video_transforms = (video_transforms_transforms); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/video/index.js /** @@ -57454,8 +60376,8 @@ const video_metadata = { attribute: "autoplay" }, caption: { - type: "string", - source: "html", + type: "rich-text", + source: "rich-text", selector: "figcaption", __experimentalRole: "content" }, @@ -57527,6 +60449,9 @@ const video_metadata = { margin: false, padding: false } + }, + interactivity: { + clientNavigation: true } }, editorStyle: "wp-block-video-editor", @@ -57575,13 +60500,14 @@ function FootnotesEdit({ } }) { const [meta, updateMeta] = (0,external_wp_coreData_namespaceObject.useEntityProp)('postType', postType, 'meta', postId); + const footnotesSupported = 'string' === typeof meta?.footnotes; const footnotes = meta?.footnotes ? JSON.parse(meta.footnotes) : []; const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); - if (postType !== 'post' && postType !== 'page') { - return (0,external_wp_element_namespaceObject.createElement)("div", { + if (!footnotesSupported) { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { - icon: (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { + icon: (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: format_list_numbered }), label: (0,external_wp_i18n_namespaceObject.__)('Footnotes'), @@ -57589,23 +60515,23 @@ function FootnotesEdit({ })); } if (!footnotes.length) { - return (0,external_wp_element_namespaceObject.createElement)("div", { + return (0,external_React_namespaceObject.createElement)("div", { ...blockProps - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { - icon: (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { + }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { + icon: (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: format_list_numbered }), label: (0,external_wp_i18n_namespaceObject.__)('Footnotes'), instructions: (0,external_wp_i18n_namespaceObject.__)('Footnotes found in blocks within this document will be displayed here.') })); } - return (0,external_wp_element_namespaceObject.createElement)("ol", { + return (0,external_React_namespaceObject.createElement)("ol", { ...blockProps }, footnotes.map(({ id, content }) => /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */ - (0,external_wp_element_namespaceObject.createElement)("li", { + (0,external_React_namespaceObject.createElement)("li", { key: id, onMouseDown: event => { // When clicking on the list item (not on descendants), @@ -57616,7 +60542,7 @@ function FootnotesEdit({ event.preventDefault(); } } - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { + }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { id: id, tagName: "span", value: content, @@ -57640,14 +60566,14 @@ function FootnotesEdit({ })) }); } - }), ' ', (0,external_wp_element_namespaceObject.createElement)("a", { + }), ' ', (0,external_React_namespaceObject.createElement)("a", { href: `#${id}-link` }, "\u21A9\uFE0E")))); } ;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/native.js const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto); -/* harmony default export */ var esm_browser_native = ({ +/* harmony default export */ const esm_browser_native = ({ randomUUID }); ;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/rng.js @@ -57702,7 +60628,7 @@ function stringify(arr, offset = 0) { return uuid; } -/* harmony default export */ var esm_browser_stringify = ((/* unused pure expression or super */ null && (stringify))); +/* harmony default export */ const esm_browser_stringify = ((/* unused pure expression or super */ null && (stringify))); ;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/v4.js @@ -57732,7 +60658,7 @@ function v4_v4(options, buf, offset) { return unsafeStringify(rnds); } -/* harmony default export */ var esm_browser_v4 = (v4_v4); +/* harmony default export */ const esm_browser_v4 = (v4_v4); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/footnotes/format.js /** @@ -57750,6 +60676,7 @@ function v4_v4(options, buf, offset) { + /** * Internal dependencies */ @@ -57769,13 +60696,14 @@ const format = { }, interactive: true, contentEditable: false, - [usesContextKey]: ['postType'], + [usesContextKey]: ['postType', 'postId'], edit: function Edit({ value, onChange, isObjectActive, context: { - postType + postType, + postId } }) { const registry = (0,external_wp_data_namespaceObject.useRegistry)(); @@ -57786,32 +60714,32 @@ const format = { getBlockName, getBlockParentsByBlockName } = registry.select(external_wp_blockEditor_namespaceObject.store); - const hasFootnotesBlockType = (0,external_wp_data_namespaceObject.useSelect)(select => !!select(external_wp_blocks_namespaceObject.store).getBlockType('core/footnotes'), []); - /* - * This useSelect exists because we need to use its return value - * outside the event callback. - */ - const isBlockWithinPattern = (0,external_wp_data_namespaceObject.useSelect)(select => { + const isFootnotesSupported = (0,external_wp_data_namespaceObject.useSelect)(select => { + if (!select(external_wp_blocks_namespaceObject.store).getBlockType('core/footnotes')) { + return false; + } + const allowedBlocks = select(external_wp_blockEditor_namespaceObject.store).getSettings().allowedBlockTypes; + if (allowedBlocks === false || Array.isArray(allowedBlocks) && !allowedBlocks.includes('core/footnotes')) { + return false; + } + const entityRecord = select(external_wp_coreData_namespaceObject.store).getEntityRecord('postType', postType, postId); + if ('string' !== typeof entityRecord?.meta?.footnotes) { + return false; + } + + // Checks if the selected block lives within a pattern. const { getBlockParentsByBlockName: _getBlockParentsByBlockName, getSelectedBlockClientId: _getSelectedBlockClientId } = select(external_wp_blockEditor_namespaceObject.store); const parentCoreBlocks = _getBlockParentsByBlockName(_getSelectedBlockClientId(), SYNCED_PATTERN_BLOCK_NAME); - return parentCoreBlocks && parentCoreBlocks.length > 0; - }, []); + return !parentCoreBlocks || parentCoreBlocks.length === 0; + }, [postType, postId]); const { selectionChange, insertBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); - if (!hasFootnotesBlockType) { - return null; - } - if (postType !== 'post' && postType !== 'page') { - return null; - } - - // Checks if the selected block lives within a pattern. - if (isBlockWithinPattern) { + if (!isFootnotesSupported) { return null; } function onClick() { @@ -57872,7 +60800,7 @@ const format = { selectionChange(fnBlock.clientId, id, 0, 0); }); } - return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichTextToolbarButton, { + return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichTextToolbarButton, { icon: format_list_numbered, title: (0,external_wp_i18n_namespaceObject.__)('Footnote'), onClick: onClick, @@ -57899,7 +60827,7 @@ const footnotes_metadata = { name: "core/footnotes", title: "Footnotes", category: "text", - description: "", + description: "Display footnotes added to the page.", keywords: ["references"], textdomain: "default", usesContext: ["postId", "postType"], @@ -57928,6 +60856,7 @@ const footnotes_metadata = { html: false, multiple: false, reusable: false, + inserter: false, spacing: { margin: true, padding: true, @@ -57949,6 +60878,9 @@ const footnotes_metadata = { __experimentalDefaultControls: { fontSize: true } + }, + interactivity: { + clientNavigation: true } }, style: "wp-block-footnotes" @@ -57972,7 +60904,7 @@ const footnotes_init = () => { }; // EXTERNAL MODULE: ./node_modules/@wordpress/block-library/build-module/utils/is-block-metadata-experimental.js -var is_block_metadata_experimental = __webpack_require__(7078); +var is_block_metadata_experimental = __webpack_require__(2321); var is_block_metadata_experimental_default = /*#__PURE__*/__webpack_require__.n(is_block_metadata_experimental); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/index.js /** @@ -58091,6 +61023,10 @@ var is_block_metadata_experimental_default = /*#__PURE__*/__webpack_require__.n( + + + + /** * Function to get all the block-library blocks in an array */ @@ -58102,7 +61038,13 @@ const getAllBlocks = () => { // Register all remaining core blocks. archives_namespaceObject, build_module_audio_namespaceObject, build_module_button_namespaceObject, build_module_buttons_namespaceObject, build_module_calendar_namespaceObject, categories_namespaceObject, build_module_code_namespaceObject, build_module_column_namespaceObject, build_module_columns_namespaceObject, build_module_comment_author_avatar_namespaceObject, build_module_cover_namespaceObject, build_module_details_namespaceObject, embed_namespaceObject, build_module_file_namespaceObject, build_module_group_namespaceObject, build_module_html_namespaceObject, latest_comments_namespaceObject, latest_posts_namespaceObject, media_text_namespaceObject, missing_namespaceObject, build_module_more_namespaceObject, nextpage_namespaceObject, page_list_namespaceObject, page_list_item_namespaceObject, pattern_namespaceObject, build_module_preformatted_namespaceObject, build_module_pullquote_namespaceObject, block_namespaceObject, build_module_rss_namespaceObject, build_module_search_namespaceObject, build_module_separator_namespaceObject, build_module_shortcode_namespaceObject, social_link_namespaceObject, social_links_namespaceObject, spacer_namespaceObject, build_module_table_namespaceObject, tag_cloud_namespaceObject, text_columns_namespaceObject, build_module_verse_namespaceObject, build_module_video_namespaceObject, footnotes_namespaceObject, // theme blocks - build_module_navigation_namespaceObject, navigation_link_namespaceObject, navigation_submenu_namespaceObject, build_module_site_logo_namespaceObject, site_title_namespaceObject, site_tagline_namespaceObject, query_namespaceObject, template_part_namespaceObject, avatar_namespaceObject, post_title_namespaceObject, build_module_post_excerpt_namespaceObject, build_module_post_featured_image_namespaceObject, build_module_post_content_namespaceObject, build_module_post_author_namespaceObject, post_author_name_namespaceObject, post_comment_namespaceObject, build_module_post_comments_count_namespaceObject, post_comments_link_namespaceObject, build_module_post_date_namespaceObject, build_module_post_terms_namespaceObject, post_navigation_link_namespaceObject, post_template_namespaceObject, post_time_to_read_namespaceObject, build_module_query_pagination_namespaceObject, build_module_query_pagination_next_namespaceObject, build_module_query_pagination_numbers_namespaceObject, build_module_query_pagination_previous_namespaceObject, query_no_results_namespaceObject, read_more_namespaceObject, comments_namespaceObject, build_module_comment_author_name_namespaceObject, build_module_comment_content_namespaceObject, comment_date_namespaceObject, build_module_comment_edit_link_namespaceObject, build_module_comment_reply_link_namespaceObject, comment_template_namespaceObject, comments_title_namespaceObject, comments_pagination_namespaceObject, comments_pagination_next_namespaceObject, comments_pagination_numbers_namespaceObject, comments_pagination_previous_namespaceObject, build_module_post_comments_form_namespaceObject, table_of_contents_namespaceObject, home_link_namespaceObject, loginout_namespaceObject, build_module_term_description_namespaceObject, query_title_namespaceObject, post_author_biography_namespaceObject]; + build_module_navigation_namespaceObject, navigation_link_namespaceObject, navigation_submenu_namespaceObject, build_module_site_logo_namespaceObject, site_title_namespaceObject, site_tagline_namespaceObject, query_namespaceObject, template_part_namespaceObject, avatar_namespaceObject, post_title_namespaceObject, build_module_post_excerpt_namespaceObject, build_module_post_featured_image_namespaceObject, build_module_post_content_namespaceObject, build_module_post_author_namespaceObject, post_author_name_namespaceObject, post_comment_namespaceObject, build_module_post_comments_count_namespaceObject, post_comments_link_namespaceObject, build_module_post_date_namespaceObject, build_module_post_terms_namespaceObject, post_navigation_link_namespaceObject, post_template_namespaceObject, post_time_to_read_namespaceObject, build_module_query_pagination_namespaceObject, build_module_query_pagination_next_namespaceObject, build_module_query_pagination_numbers_namespaceObject, build_module_query_pagination_previous_namespaceObject, query_no_results_namespaceObject, read_more_namespaceObject, comments_namespaceObject, build_module_comment_author_name_namespaceObject, build_module_comment_content_namespaceObject, comment_date_namespaceObject, build_module_comment_edit_link_namespaceObject, build_module_comment_reply_link_namespaceObject, comment_template_namespaceObject, comments_title_namespaceObject, comments_pagination_namespaceObject, comments_pagination_next_namespaceObject, comments_pagination_numbers_namespaceObject, comments_pagination_previous_namespaceObject, build_module_post_comments_form_namespaceObject, build_module_table_of_contents_namespaceObject, home_link_namespaceObject, loginout_namespaceObject, build_module_term_description_namespaceObject, query_title_namespaceObject, post_author_biography_namespaceObject]; + if (window?.__experimentalEnableFormBlocks) { + blocks.push(build_module_form_namespaceObject); + blocks.push(form_input_namespaceObject); + blocks.push(form_submit_button_namespaceObject); + blocks.push(form_submission_notification_namespaceObject); + } // When in a WordPress context, conditionally // add the classic block and TinyMCE editor @@ -58169,7 +61111,8 @@ const registerCoreBlocks = (blocks = __experimentalGetCoreBlocks()) => { */ const __experimentalRegisterExperimentalCoreBlocks = false ? 0 : undefined; -}(); +})(); + (window.wp = window.wp || {}).blockLibrary = __webpack_exports__; /******/ })() ;
\ No newline at end of file |