summaryrefslogtreecommitdiffstats
path: root/wp-includes/js/dist/block-library.js
diff options
context:
space:
mode:
Diffstat (limited to 'wp-includes/js/dist/block-library.js')
-rw-r--r--wp-includes/js/dist/block-library.js26165
1 files changed, 14435 insertions, 11730 deletions
diff --git a/wp-includes/js/dist/block-library.js b/wp-includes/js/dist/block-library.js
index a60f80c..47f3943 100644
--- a/wp-includes/js/dist/block-library.js
+++ b/wp-includes/js/dist/block-library.js
@@ -23,193 +23,6 @@ module.exports = function isBlockMetadataExperimental(metadata) {
/***/ }),
-/***/ 1668:
-/***/ ((module, exports) => {
-
-var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
- Copyright (c) 2018 Jed Watson.
- Licensed under the MIT License (MIT), see
- http://jedwatson.github.io/classnames
-*/
-/* global define */
-
-(function () {
- 'use strict';
-
- var classNames = (function () {
- // don't inherit from Object so we can skip hasOwnProperty check later
- // http://stackoverflow.com/questions/15518328/creating-js-object-with-object-createnull#answer-21079232
- function StorageObject() {}
- StorageObject.prototype = Object.create(null);
-
- function _parseArray (resultSet, array) {
- var length = array.length;
-
- for (var i = 0; i < length; ++i) {
- _parse(resultSet, array[i]);
- }
- }
-
- var hasOwn = {}.hasOwnProperty;
-
- function _parseNumber (resultSet, num) {
- resultSet[num] = true;
- }
-
- function _parseObject (resultSet, object) {
- if (object.toString !== Object.prototype.toString && !object.toString.toString().includes('[native code]')) {
- resultSet[object.toString()] = true;
- return;
- }
-
- for (var k in object) {
- if (hasOwn.call(object, k)) {
- // set value to false instead of deleting it to avoid changing object structure
- // https://www.smashingmagazine.com/2012/11/writing-fast-memory-efficient-javascript/#de-referencing-misconceptions
- resultSet[k] = !!object[k];
- }
- }
- }
-
- var SPACE = /\s+/;
- function _parseString (resultSet, str) {
- var array = str.split(SPACE);
- var length = array.length;
-
- for (var i = 0; i < length; ++i) {
- resultSet[array[i]] = true;
- }
- }
-
- function _parse (resultSet, arg) {
- if (!arg) return;
- var argType = typeof arg;
-
- // 'foo bar'
- if (argType === 'string') {
- _parseString(resultSet, arg);
-
- // ['foo', 'bar', ...]
- } else if (Array.isArray(arg)) {
- _parseArray(resultSet, arg);
-
- // { 'foo': true, ... }
- } else if (argType === 'object') {
- _parseObject(resultSet, arg);
-
- // '130'
- } else if (argType === 'number') {
- _parseNumber(resultSet, arg);
- }
- }
-
- function _classNames () {
- // don't leak arguments
- // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
- var len = arguments.length;
- var args = Array(len);
- for (var i = 0; i < len; i++) {
- args[i] = arguments[i];
- }
-
- var classSet = new StorageObject();
- _parseArray(classSet, args);
-
- var list = [];
-
- for (var k in classSet) {
- if (classSet[k]) {
- list.push(k)
- }
- }
-
- return list.join(' ');
- }
-
- return _classNames;
- })();
-
- if ( true && module.exports) {
- classNames.default = classNames;
- module.exports = classNames;
- } else if (true) {
- // register as 'classnames', consistent with npm package name
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
- return classNames;
- }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
- } else {}
-}());
-
-
-/***/ }),
-
-/***/ 5755:
-/***/ ((module, exports) => {
-
-var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
- Copyright (c) 2018 Jed Watson.
- Licensed under the MIT License (MIT), see
- http://jedwatson.github.io/classnames
-*/
-/* global define */
-
-(function () {
- 'use strict';
-
- var hasOwn = {}.hasOwnProperty;
- var nativeCodeString = '[native code]';
-
- function classNames() {
- var classes = [];
-
- for (var i = 0; i < arguments.length; i++) {
- var arg = arguments[i];
- if (!arg) continue;
-
- var argType = typeof arg;
-
- if (argType === 'string' || argType === 'number') {
- classes.push(arg);
- } else if (Array.isArray(arg)) {
- if (arg.length) {
- var inner = classNames.apply(null, arg);
- if (inner) {
- classes.push(inner);
- }
- }
- } else if (argType === 'object') {
- if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
- classes.push(arg.toString());
- continue;
- }
-
- for (var key in arg) {
- if (hasOwn.call(arg, key) && arg[key]) {
- classes.push(key);
- }
- }
- }
- }
-
- return classes.join(' ');
- }
-
- if ( true && module.exports) {
- classNames.default = classNames;
- module.exports = classNames;
- } else if (true) {
- // register as 'classnames', consistent with npm package name
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
- return classNames;
- }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
- } else {}
-}());
-
-
-/***/ }),
-
/***/ 7734:
/***/ ((module) => {
@@ -857,6 +670,7 @@ __webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
__experimentalGetCoreBlocks: () => (/* binding */ __experimentalGetCoreBlocks),
__experimentalRegisterExperimentalCoreBlocks: () => (/* binding */ __experimentalRegisterExperimentalCoreBlocks),
+ privateApis: () => (/* reexport */ privateApis),
registerCoreBlocks: () => (/* binding */ registerCoreBlocks)
});
@@ -1872,24 +1686,25 @@ __webpack_require__.d(footnotes_namespaceObject, {
;// CONCATENATED MODULE: external ["wp","blocks"]
const external_wp_blocks_namespaceObject = window["wp"]["blocks"];
-;// CONCATENATED MODULE: external "React"
-const external_React_namespaceObject = window["React"];
;// CONCATENATED MODULE: external ["wp","primitives"]
const external_wp_primitives_namespaceObject = window["wp"]["primitives"];
+;// CONCATENATED MODULE: external "ReactJSXRuntime"
+const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/archive.js
-
/**
* WordPress dependencies
*/
-const archive = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const archive = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_archive = (archive);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/utils/init-block.js
@@ -1931,7 +1746,6 @@ const external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"];
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
-
/**
* WordPress dependencies
*/
@@ -1939,6 +1753,9 @@ var external_wp_serverSideRender_default = /*#__PURE__*/__webpack_require__.n(ex
+
+
+
function ArchivesEdit({
attributes,
setAttributes
@@ -1949,56 +1766,64 @@ function ArchivesEdit({
displayAsDropdown,
type
} = attributes;
- 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.ToggleControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Display as dropdown'),
- checked: displayAsDropdown,
- onChange: () => setAttributes({
- displayAsDropdown: !displayAsDropdown
- })
- }), 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_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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Group by:'),
- options: [{
- label: (0,external_wp_i18n_namespaceObject.__)('Year'),
- value: 'yearly'
- }, {
- label: (0,external_wp_i18n_namespaceObject.__)('Month'),
- value: 'monthly'
- }, {
- label: (0,external_wp_i18n_namespaceObject.__)('Week'),
- value: 'weekly'
- }, {
- label: (0,external_wp_i18n_namespaceObject.__)('Day'),
- value: 'daily'
- }],
- value: type,
- onChange: value => setAttributes({
- type: value
- })
- }))), (0,external_React_namespaceObject.createElement)("div", {
- ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)()
- }, (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
- }))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Display as dropdown'),
+ checked: displayAsDropdown,
+ onChange: () => setAttributes({
+ displayAsDropdown: !displayAsDropdown
+ })
+ }), displayAsDropdown && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Show label'),
+ checked: showLabel,
+ onChange: () => setAttributes({
+ showLabel: !showLabel
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Show post counts'),
+ checked: showPostCounts,
+ onChange: () => setAttributes({
+ showPostCounts: !showPostCounts
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SelectControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Group by:'),
+ options: [{
+ label: (0,external_wp_i18n_namespaceObject.__)('Year'),
+ value: 'yearly'
+ }, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Month'),
+ value: 'monthly'
+ }, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Week'),
+ value: 'weekly'
+ }, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Day'),
+ value: 'daily'
+ }],
+ value: type,
+ onChange: value => setAttributes({
+ type: value
+ })
+ })]
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)((external_wp_serverSideRender_default()), {
+ block: "core/archives",
+ skipBlockSupportAttributes: true,
+ attributes: attributes
+ })
+ })
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/archives/index.js
@@ -2084,24 +1909,24 @@ const init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/comment-author-avatar.js
-
/**
* WordPress dependencies
*/
-const commentAuthorAvatar = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const commentAuthorAvatar = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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, {
- 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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const comment_author_avatar = (commentAuthorAvatar);
-// EXTERNAL MODULE: ./node_modules/classnames/index.js
-var classnames = __webpack_require__(5755);
-var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
+;// CONCATENATED MODULE: ./node_modules/clsx/dist/clsx.mjs
+function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const dist_clsx = (clsx);
;// CONCATENATED MODULE: external ["wp","url"]
const external_wp_url_namespaceObject = window["wp"]["url"];
;// CONCATENATED MODULE: external ["wp","coreData"]
@@ -2203,7 +2028,6 @@ 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
-
/**
* WordPress dependencies
*/
@@ -2212,6 +2036,7 @@ const external_wp_element_namespaceObject = window["wp"]["element"];
+
const AUTHORS_QUERY = {
who: 'authors',
per_page: -1,
@@ -2238,7 +2063,7 @@ function UserControl({
value: author.id
};
});
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ComboboxControl, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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.'),
@@ -2251,7 +2076,6 @@ function UserControl({
/* harmony default export */ const user_control = (UserControl);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/avatar/edit.js
-
/**
* External dependencies
*/
@@ -2270,45 +2094,51 @@ function UserControl({
*/
+
+
+
const AvatarInspectorControls = ({
setAttributes,
avatar,
attributes,
selectUser
-}) => (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.RangeControl, {
- __nextHasNoMarginBottom: true,
- __next40pxDefaultSize: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Image size'),
- onChange: newSize => setAttributes({
- size: newSize
- }),
- min: avatar.minSize,
- max: avatar.maxSize,
- initialPosition: attributes?.size,
- value: attributes?.size
-}), (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_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_React_namespaceObject.createElement)(user_control, {
- value: attributes?.userId,
- onChange: value => {
- setAttributes({
- userId: value
- });
- }
-})));
+}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.RangeControl, {
+ __nextHasNoMarginBottom: true,
+ __next40pxDefaultSize: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Image size'),
+ onChange: newSize => setAttributes({
+ size: newSize
+ }),
+ min: avatar.minSize,
+ max: avatar.maxSize,
+ initialPosition: attributes?.size,
+ value: attributes?.size
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(user_control, {
+ value: attributes?.userId,
+ onChange: value => {
+ setAttributes({
+ userId: value
+ });
+ }
+ })]
+ })
+});
const ResizableAvatar = ({
setAttributes,
attributes,
@@ -2320,34 +2150,36 @@ 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_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ResizableBox, {
- size: {
- width: attributes.size,
- height: attributes.size
- },
- showHandle: isSelected,
- onResizeStop: (event, direction, elt, delta) => {
- setAttributes({
- size: parseInt(attributes.size + (delta.height || delta.width), 10)
- });
- },
- lockAspectRatio: true,
- enable: {
- top: false,
- right: !(0,external_wp_i18n_namespaceObject.isRTL)(),
- bottom: true,
- left: (0,external_wp_i18n_namespaceObject.isRTL)()
- },
- minWidth: avatar.minSize,
- maxWidth: avatar.maxSize
- }, (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),
- style: borderProps.style
- })));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ResizableBox, {
+ size: {
+ width: attributes.size,
+ height: attributes.size
+ },
+ showHandle: isSelected,
+ onResizeStop: (event, direction, elt, delta) => {
+ setAttributes({
+ size: parseInt(attributes.size + (delta.height || delta.width), 10)
+ });
+ },
+ lockAspectRatio: true,
+ enable: {
+ top: false,
+ right: !(0,external_wp_i18n_namespaceObject.isRTL)(),
+ bottom: true,
+ left: (0,external_wp_i18n_namespaceObject.isRTL)()
+ },
+ minWidth: avatar.minSize,
+ maxWidth: avatar.maxSize,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ src: doubledSizedSrc,
+ alt: avatar.alt,
+ className: dist_clsx('avatar', 'avatar-' + attributes.size, 'photo', 'wp-block-avatar__image', borderProps.className),
+ style: borderProps.style
+ })
+ })
+ });
};
const CommentEdit = ({
attributes,
@@ -2362,28 +2194,31 @@ const CommentEdit = ({
const avatar = useCommentAvatar({
commentId
});
- 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_React_namespaceObject.createElement)("a", {
- href: "#avatar-pseudo-link",
- className: "wp-block-avatar__link",
- onClick: event => event.preventDefault()
- }, (0,external_React_namespaceObject.createElement)(ResizableAvatar, {
- attributes: attributes,
- avatar: avatar,
- blockProps: blockProps,
- isSelected: isSelected,
- setAttributes: setAttributes
- })) : (0,external_React_namespaceObject.createElement)(ResizableAvatar, {
- attributes: attributes,
- avatar: avatar,
- blockProps: blockProps,
- isSelected: isSelected,
- setAttributes: setAttributes
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(AvatarInspectorControls, {
+ avatar: avatar,
+ setAttributes: setAttributes,
+ attributes: attributes,
+ selectUser: false
+ }), attributes.isLink ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: "#avatar-pseudo-link",
+ className: "wp-block-avatar__link",
+ onClick: event => event.preventDefault(),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ResizableAvatar, {
+ attributes: attributes,
+ avatar: avatar,
+ blockProps: blockProps,
+ isSelected: isSelected,
+ setAttributes: setAttributes
+ })
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ResizableAvatar, {
+ attributes: attributes,
+ avatar: avatar,
+ blockProps: blockProps,
+ isSelected: isSelected,
+ setAttributes: setAttributes
+ })]
+ });
};
const UserEdit = ({
attributes,
@@ -2401,37 +2236,40 @@ const UserEdit = ({
postType
});
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
- 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
- }), attributes.isLink ? (0,external_React_namespaceObject.createElement)("a", {
- href: "#avatar-pseudo-link",
- className: "wp-block-avatar__link",
- onClick: event => event.preventDefault()
- }, (0,external_React_namespaceObject.createElement)(ResizableAvatar, {
- attributes: attributes,
- avatar: avatar,
- blockProps: blockProps,
- isSelected: isSelected,
- setAttributes: setAttributes
- })) : (0,external_React_namespaceObject.createElement)(ResizableAvatar, {
- attributes: attributes,
- avatar: avatar,
- blockProps: blockProps,
- isSelected: isSelected,
- setAttributes: setAttributes
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(AvatarInspectorControls, {
+ selectUser: true,
+ attributes: attributes,
+ avatar: avatar,
+ setAttributes: setAttributes
+ }), attributes.isLink ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: "#avatar-pseudo-link",
+ className: "wp-block-avatar__link",
+ onClick: event => event.preventDefault(),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ResizableAvatar, {
+ attributes: attributes,
+ avatar: avatar,
+ blockProps: blockProps,
+ isSelected: isSelected,
+ setAttributes: setAttributes
+ })
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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_React_namespaceObject.createElement)(CommentEdit, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CommentEdit, {
...props
});
}
- return (0,external_React_namespaceObject.createElement)(UserEdit, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(UserEdit, {
...props
});
}
@@ -2525,25 +2363,27 @@ const avatar_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/audio.js
-
/**
* WordPress dependencies
*/
-const audio = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const audio = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_audio = (audio);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/audio/deprecated.js
-
/**
* WordPress dependencies
*/
+
+
/* harmony default export */ const deprecated = ([{
attributes: {
src: {
@@ -2592,16 +2432,18 @@ const audio = (0,external_React_namespaceObject.createElement)(external_wp_primi
preload,
src
} = attributes;
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "figcaption",
- value: caption
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("audio", {
+ controls: "controls",
+ src: src,
+ autoPlay: autoplay,
+ loop: loop,
+ preload: preload
+ }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "figcaption",
+ value: caption
+ })]
+ });
}
}]);
@@ -2609,9 +2451,6 @@ const audio = (0,external_React_namespaceObject.createElement)(external_wp_primi
const external_wp_blob_namespaceObject = window["wp"]["blob"];
;// CONCATENATED MODULE: external ["wp","notices"]
const external_wp_notices_namespaceObject = window["wp"]["notices"];
-// EXTERNAL MODULE: ./node_modules/classnames/dedupe.js
-var dedupe = __webpack_require__(1668);
-var dedupe_default = /*#__PURE__*/__webpack_require__.n(dedupe);
;// CONCATENATED MODULE: ./node_modules/memize/dist/index.js
/**
* Memize options object.
@@ -2813,10 +2652,9 @@ const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"];
const {
lock,
unlock
-} = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.', '@wordpress/block-library');
+} = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', '@wordpress/block-library');
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/util.js
-
/**
* External dependencies
*/
@@ -2889,9 +2727,13 @@ const util_metadata = {
};
+
const {
name: DEFAULT_EMBED_BLOCK
} = util_metadata;
+const {
+ kebabCase
+} = unlock(external_wp_components_namespaceObject.privateApis);
/** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */
@@ -2931,11 +2773,13 @@ 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_React_namespaceObject.createElement)("p", null, (0,external_React_namespaceObject.createElement)("img", {
- src: imageUrl,
- alt: photo.title,
- width: "100%"
- }));
+ const photoPreview = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ src: imageUrl,
+ alt: photo.title,
+ width: "100%"
+ })
+ });
return (0,external_wp_element_namespaceObject.renderToString)(photoPreview);
};
@@ -2964,7 +2808,9 @@ const createUpgradedEmbedBlock = (props, attributesFromPreview = {}) => {
type,
...restAttributes
} = attributes;
- if (!url || !(0,external_wp_blocks_namespaceObject.getBlockType)(DEFAULT_EMBED_BLOCK)) return;
+ if (!url || !(0,external_wp_blocks_namespaceObject.getBlockType)(DEFAULT_EMBED_BLOCK)) {
+ return;
+ }
const matchedBlock = findMoreSuitableBlock(url);
// WordPress blocks can work on multiple sites, and so don't have patterns,
@@ -3030,18 +2876,20 @@ const removeAspectRatioClasses = existingClassNames => {
if (!existingClassNames) {
// Avoids extraneous work and also, by returning the same value as
// received, ensures the post is not dirtied by a change of the block
- // attribute from `undefined` to an emtpy string.
+ // attribute from `undefined` to an empty string.
return existingClassNames;
}
const aspectRatioClassNames = ASPECT_RATIOS.reduce((accumulator, {
className
}) => {
- accumulator[className] = false;
+ accumulator.push(className);
return accumulator;
- }, {
- 'wp-has-aspect-ratio': false
- });
- return dedupe_default()(existingClassNames, aspectRatioClassNames);
+ }, ['wp-has-aspect-ratio']);
+ let outputClassNames = existingClassNames;
+ for (const className of aspectRatioClassNames) {
+ outputClassNames = outputClassNames.replace(className, '');
+ }
+ return outputClassNames.trim();
};
/**
@@ -3075,7 +2923,7 @@ function getClassNames(html, existingClassNames, allowResponsive = true) {
return removeAspectRatioClasses(existingClassNames);
}
// Close aspect ratio match found.
- return dedupe_default()(removeAspectRatioClasses(existingClassNames), potentialRatio.className, 'wp-has-aspect-ratio');
+ return dist_clsx(removeAspectRatioClasses(existingClassNames), potentialRatio.className, 'wp-has-aspect-ratio');
}
}
}
@@ -3090,9 +2938,10 @@ 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_React_namespaceObject.createElement)("a", {
- href: url
- }, url);
+ const link = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: url,
+ children: url
+ });
onReplace((0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph', {
content: (0,external_wp_element_namespaceObject.renderToString)(link)
}));
@@ -3123,9 +2972,6 @@ 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;
@@ -3167,24 +3013,117 @@ const getMergedAttributesWithPreview = (currentAttributes, preview, title, isRes
;// CONCATENATED MODULE: external ["wp","compose"]
const external_wp_compose_namespaceObject = window["wp"]["compose"];
-;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/caption.js
+;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/utils/hooks.js
+/**
+ * WordPress dependencies
+ */
+
+
+
+
+
+
+
+/**
+ * Returns whether the current user can edit the given entity.
+ *
+ * @param {string} kind Entity kind.
+ * @param {string} name Entity name.
+ * @param {string} recordId Record's id.
+ */
+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]);
+}
+
+/**
+ * Handles uploading a media file from a blob URL on mount.
+ *
+ * @param {Object} args Upload media arguments.
+ * @param {string} args.url Blob URL.
+ * @param {?Array} args.allowedTypes Array of allowed media types.
+ * @param {Function} args.onChange Function called when the media is uploaded.
+ * @param {Function} args.onError Function called when an error happens.
+ */
+function useUploadMediaFromBlobURL(args = {}) {
+ const latestArgs = (0,external_wp_element_namespaceObject.useRef)(args);
+ const hasUploadStarted = (0,external_wp_element_namespaceObject.useRef)(false);
+ const {
+ getSettings
+ } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
+ (0,external_wp_element_namespaceObject.useLayoutEffect)(() => {
+ latestArgs.current = args;
+ });
+ (0,external_wp_element_namespaceObject.useEffect)(() => {
+ // Uploading is a special effect that can't be canceled via the cleanup method.
+ // The extra check avoids duplicate uploads in development mode (React.StrictMode).
+ if (hasUploadStarted.current) {
+ return;
+ }
+ if (!latestArgs.current.url || !(0,external_wp_blob_namespaceObject.isBlobURL)(latestArgs.current.url)) {
+ return;
+ }
+ const file = (0,external_wp_blob_namespaceObject.getBlobByURL)(latestArgs.current.url);
+ if (!file) {
+ return;
+ }
+ const {
+ url,
+ allowedTypes,
+ onChange,
+ onError
+ } = latestArgs.current;
+ const {
+ mediaUpload
+ } = getSettings();
+ hasUploadStarted.current = true;
+ mediaUpload({
+ filesList: [file],
+ allowedTypes,
+ onFileChange: ([media]) => {
+ if ((0,external_wp_blob_namespaceObject.isBlobURL)(media?.url)) {
+ return;
+ }
+ (0,external_wp_blob_namespaceObject.revokeBlobURL)(url);
+ onChange(media);
+ hasUploadStarted.current = false;
+ },
+ onError: message => {
+ (0,external_wp_blob_namespaceObject.revokeBlobURL)(url);
+ onError(message);
+ hasUploadStarted.current = false;
+ }
+ });
+ }, [getSettings]);
+}
+function useToolsPanelDropdownMenuProps() {
+ const isMobile = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium', '<');
+ return !isMobile ? {
+ popoverProps: {
+ placement: 'left-start',
+ // For non-mobile, inner sidebar width (248px) - button width (24px) - border (1px) + padding (16px) + spacing (20px)
+ offset: 259
+ }
+ } : {};
+}
+;// 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, {
+
+const caption = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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
*/
@@ -3205,11 +3144,11 @@ const caption = (0,external_React_namespaceObject.createElement)(external_wp_pri
* Internal dependencies
*/
-const {
- PrivateRichText: RichText
-} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
+
+
+
function Caption({
- key = 'caption',
+ attributeKey = 'caption',
attributes,
setAttributes,
isSelected,
@@ -3217,11 +3156,20 @@ function Caption({
placeholder = (0,external_wp_i18n_namespaceObject.__)('Add caption'),
label = (0,external_wp_i18n_namespaceObject.__)('Caption text'),
showToolbarButton = true,
+ excludeElementClassName,
className,
- disableEditing
+ readOnly,
+ tagName = 'figcaption',
+ addLabel = (0,external_wp_i18n_namespaceObject.__)('Add caption'),
+ removeLabel = (0,external_wp_i18n_namespaceObject.__)('Remove caption'),
+ icon = library_caption,
+ ...props
}) {
- const caption = attributes[key];
+ const caption = attributes[attributeKey];
const prevCaption = (0,external_wp_compose_namespaceObject.usePrevious)(caption);
+ const {
+ PrivateRichText: RichText
+ } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
const isCaptionEmpty = RichText.isEmpty(caption);
const isPrevCaptionEmpty = RichText.isEmpty(prevCaption);
const [showCaption, setShowCaption] = (0,external_wp_element_namespaceObject.useState)(!isCaptionEmpty);
@@ -3245,39 +3193,42 @@ function Caption({
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
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [showToolbarButton && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
+ onClick: () => {
+ setShowCaption(!showCaption);
+ if (showCaption && caption) {
+ setAttributes({
+ [attributeKey]: undefined
+ });
+ }
+ },
+ icon: icon,
+ isPressed: showCaption,
+ label: showCaption ? removeLabel : addLabel
+ })
+ }), showCaption && (!RichText.isEmpty(caption) || isSelected) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(RichText, {
+ identifier: attributeKey,
+ tagName: tagName,
+ className: dist_clsx(className, excludeElementClassName ? '' : (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption')),
+ ref: ref,
+ "aria-label": label,
+ placeholder: placeholder,
+ value: caption,
+ onChange: value => setAttributes({
+ [attributeKey]: value
+ }),
+ inlineToolbar: true,
+ __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())),
+ readOnly: readOnly,
+ ...props
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/audio/edit.js
-
/**
* External dependencies
*/
@@ -3294,12 +3245,15 @@ function Caption({
-
/**
* Internal dependencies
*/
+
+
+
+
const ALLOWED_MEDIA_TYPES = ['audio'];
function AudioEdit({
attributes,
@@ -3317,22 +3271,12 @@ function AudioEdit({
src
} = attributes;
const isTemporaryAudio = !id && (0,external_wp_blob_namespaceObject.isBlobURL)(src);
- 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) {
- getSettings().mediaUpload({
- filesList: [file],
- onFileChange: ([media]) => onSelectAudio(media),
- onError: e => onUploadError(e),
- allowedTypes: ALLOWED_MEDIA_TYPES
- });
- }
- }
- }, []);
+ useUploadMediaFromBlobURL({
+ url: src,
+ allowedTypes: ALLOWED_MEDIA_TYPES,
+ onChange: onSelectAudio,
+ onError: onUploadError
+ });
function toggleAttribute(attribute) {
return newValue => {
setAttributes({
@@ -3390,96 +3334,106 @@ function AudioEdit({
caption: media.caption
});
}
- const classes = classnames_default()(className, {
+ const classes = dist_clsx(className, {
'is-transient': isTemporaryAudio
});
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
className: classes
});
if (!src) {
- return (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (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,
- onSelectURL: onSelectURL,
- accept: "audio/*",
- allowedTypes: ALLOWED_MEDIA_TYPES,
- value: attributes,
- onError: onUploadError
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, {
+ icon: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, {
+ icon: library_audio
+ }),
+ onSelect: onSelectAudio,
+ onSelectURL: onSelectURL,
+ accept: "audio/*",
+ allowedTypes: ALLOWED_MEDIA_TYPES,
+ value: attributes,
+ onError: onUploadError
+ })
+ });
}
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, {
- mediaId: id,
- mediaURL: src,
- allowedTypes: ALLOWED_MEDIA_TYPES,
- accept: "audio/*",
- onSelect: onSelectAudio,
- onSelectURL: onSelectURL,
- onError: onUploadError
- })), (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.ToggleControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Autoplay'),
- onChange: toggleAttribute('autoplay'),
- checked: autoplay,
- help: getAutoplayHelp
- }), (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject._x)('Preload', 'noun; Audio block parameter'),
- value: preload || ''
- // `undefined` is required for the preload attribute to be unset.
- ,
- onChange: value => setAttributes({
- preload: value || undefined
- }),
- options: [{
- value: '',
- label: (0,external_wp_i18n_namespaceObject.__)('Browser default')
- }, {
- value: 'auto',
- label: (0,external_wp_i18n_namespaceObject.__)('Auto')
- }, {
- value: 'metadata',
- label: (0,external_wp_i18n_namespaceObject.__)('Metadata')
- }, {
- value: 'none',
- label: (0,external_wp_i18n_namespaceObject._x)('None', 'Preload value')
- }]
- }))), (0,external_React_namespaceObject.createElement)("figure", {
- ...blockProps
- }, (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_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
- })));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [isSingleSelected && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "other",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, {
+ mediaId: id,
+ mediaURL: src,
+ allowedTypes: ALLOWED_MEDIA_TYPES,
+ accept: "audio/*",
+ onSelect: onSelectAudio,
+ onSelectURL: onSelectURL,
+ onError: onUploadError
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Autoplay'),
+ onChange: toggleAttribute('autoplay'),
+ checked: autoplay,
+ help: getAutoplayHelp
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Loop'),
+ onChange: toggleAttribute('loop'),
+ checked: loop
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SelectControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject._x)('Preload', 'noun; Audio block parameter'),
+ value: preload || ''
+ // `undefined` is required for the preload attribute to be unset.
+ ,
+ onChange: value => setAttributes({
+ preload: value || undefined
+ }),
+ options: [{
+ value: '',
+ label: (0,external_wp_i18n_namespaceObject.__)('Browser default')
+ }, {
+ value: 'auto',
+ label: (0,external_wp_i18n_namespaceObject.__)('Auto')
+ }, {
+ value: 'metadata',
+ label: (0,external_wp_i18n_namespaceObject.__)('Metadata')
+ }, {
+ value: 'none',
+ label: (0,external_wp_i18n_namespaceObject._x)('None', 'Preload value')
+ }]
+ })]
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
+ ...blockProps,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, {
+ isDisabled: !isSingleSelected,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("audio", {
+ controls: "controls",
+ src: src
+ })
+ }), isTemporaryAudio && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Caption, {
+ attributes: attributes,
+ setAttributes: setAttributes,
+ isSelected: isSingleSelected,
+ insertBlocksAfter: insertBlocksAfter,
+ label: (0,external_wp_i18n_namespaceObject.__)('Audio caption text'),
+ showToolbarButton: isSingleSelected
+ })]
+ })]
+ });
}
/* harmony default export */ const edit = (AudioEdit);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/audio/save.js
-
/**
* WordPress dependencies
*/
+
+
function save({
attributes
}) {
@@ -3490,19 +3444,20 @@ function save({
preload,
src
} = attributes;
- return src && (0,external_React_namespaceObject.createElement)("figure", {
- ...external_wp_blockEditor_namespaceObject.useBlockProps.save()
- }, (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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "figcaption",
- value: caption,
- className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption')
- }));
+ return src && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
+ ...external_wp_blockEditor_namespaceObject.useBlockProps.save(),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("audio", {
+ controls: "controls",
+ src: src,
+ autoPlay: autoplay,
+ loop: loop,
+ preload: preload
+ }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "figcaption",
+ value: caption,
+ className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption')
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/audio/transforms.js
@@ -3683,17 +3638,18 @@ const audio_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/button.js
-
/**
* WordPress dependencies
*/
-const button_button = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const button_button = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_button = (button_button);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/utils/migrate-font-family.js
@@ -3737,7 +3693,6 @@ const {
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/button/deprecated.js
-
/**
* External dependencies
*/
@@ -3753,6 +3708,7 @@ const {
* Internal dependencies
*/
+
const migrateBorderRadius = attributes => {
const {
borderRadius,
@@ -3787,7 +3743,7 @@ function migrateAlign(attributes) {
} = attributes;
return {
...otherAttributes,
- className: classnames_default()(otherAttributes.className, `align${attributes.align}`)
+ className: dist_clsx(otherAttributes.className, `align${attributes.align}`)
};
}
const migrateCustomColorsAndGradients = attributes => {
@@ -3951,7 +3907,7 @@ const v11 = {
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 buttonClasses = classnames_default()('wp-block-button__link', colorProps.className, borderProps.className, {
+ const buttonClasses = dist_clsx('wp-block-button__link', colorProps.className, borderProps.className, {
// For backwards compatibility add style that isn't provided via
// block support.
'no-border-radius': style?.border?.radius === 0
@@ -3966,24 +3922,25 @@ const v11 = {
// 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.
- const wrapperClasses = classnames_default()(className, {
+ const wrapperClasses = dist_clsx(className, {
[`has-custom-width wp-block-button__width-${width}`]: width,
[`has-custom-font-size`]: fontSize || style?.typography?.fontSize
});
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className: wrapperClasses
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "a",
+ className: buttonClasses,
+ href: url,
+ title: title,
+ style: buttonStyle,
+ value: text,
+ target: linkTarget,
+ rel: rel
})
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "a",
- className: buttonClasses,
- href: url,
- title: title,
- style: buttonStyle,
- value: text,
- target: linkTarget,
- rel: rel
- }));
+ });
}
};
const v10 = {
@@ -4079,7 +4036,7 @@ const v10 = {
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 buttonClasses = classnames_default()('wp-block-button__link', colorProps.className, borderProps.className, {
+ const buttonClasses = dist_clsx('wp-block-button__link', colorProps.className, borderProps.className, {
// For backwards compatibility add style that isn't provided via
// block support.
'no-border-radius': style?.border?.radius === 0
@@ -4094,24 +4051,25 @@ const 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.
- const wrapperClasses = classnames_default()(className, {
+ const wrapperClasses = dist_clsx(className, {
[`has-custom-width wp-block-button__width-${width}`]: width,
[`has-custom-font-size`]: fontSize || style?.typography?.fontSize
});
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className: wrapperClasses
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "a",
+ className: buttonClasses,
+ href: url,
+ title: title,
+ style: buttonStyle,
+ value: text,
+ target: linkTarget,
+ rel: rel
})
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "a",
- className: buttonClasses,
- href: url,
- title: title,
- style: buttonStyle,
- value: text,
- target: linkTarget,
- rel: rel
- }));
+ });
},
migrate: migrate_font_family,
isEligible({
@@ -4190,7 +4148,7 @@ const deprecated_deprecated = [v11, v10, {
}
const borderRadius = style?.border?.radius;
const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
- const buttonClasses = classnames_default()('wp-block-button__link', colorProps.className, {
+ const buttonClasses = dist_clsx('wp-block-button__link', colorProps.className, {
'no-border-radius': style?.border?.radius === 0
});
const buttonStyle = {
@@ -4202,24 +4160,25 @@ 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.
- const wrapperClasses = classnames_default()(className, {
+ const wrapperClasses = dist_clsx(className, {
[`has-custom-width wp-block-button__width-${width}`]: width,
[`has-custom-font-size`]: fontSize || style?.typography?.fontSize
});
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className: wrapperClasses
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "a",
+ className: buttonClasses,
+ href: url,
+ title: title,
+ style: buttonStyle,
+ value: text,
+ target: linkTarget,
+ rel: rel
})
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "a",
- className: buttonClasses,
- href: url,
- title: title,
- style: buttonStyle,
- value: text,
- target: linkTarget,
- rel: rel
- }));
+ });
},
migrate: (0,external_wp_compose_namespaceObject.compose)(migrate_font_family, migrateBorderRadius)
}, {
@@ -4283,7 +4242,7 @@ const deprecated_deprecated = [v11, v10, {
width
} = attributes;
const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
- const buttonClasses = classnames_default()('wp-block-button__link', colorProps.className, {
+ const buttonClasses = dist_clsx('wp-block-button__link', colorProps.className, {
'no-border-radius': borderRadius === 0
});
const buttonStyle = {
@@ -4295,23 +4254,24 @@ 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.
- const wrapperClasses = classnames_default()(className, {
+ const wrapperClasses = dist_clsx(className, {
[`has-custom-width wp-block-button__width-${width}`]: width
});
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className: wrapperClasses
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "a",
+ className: buttonClasses,
+ href: url,
+ title: title,
+ style: buttonStyle,
+ value: text,
+ target: linkTarget,
+ rel: rel
})
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "a",
- className: buttonClasses,
- href: url,
- title: title,
- style: buttonStyle,
- value: text,
- target: linkTarget,
- rel: rel
- }));
+ });
},
migrate: (0,external_wp_compose_namespaceObject.compose)(migrate_font_family, migrateBorderRadius)
}, {
@@ -4375,7 +4335,7 @@ const deprecated_deprecated = [v11, v10, {
width
} = attributes;
const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
- const buttonClasses = classnames_default()('wp-block-button__link', colorProps.className, {
+ const buttonClasses = dist_clsx('wp-block-button__link', colorProps.className, {
'no-border-radius': borderRadius === 0
});
const buttonStyle = {
@@ -4387,23 +4347,24 @@ 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.
- const wrapperClasses = classnames_default()(className, {
+ const wrapperClasses = dist_clsx(className, {
[`has-custom-width wp-block-button__width-${width}`]: width
});
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className: wrapperClasses
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "a",
+ className: buttonClasses,
+ href: url,
+ title: title,
+ style: buttonStyle,
+ value: text,
+ target: linkTarget,
+ rel: rel
})
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "a",
- className: buttonClasses,
- href: url,
- title: title,
- style: buttonStyle,
- value: text,
- target: linkTarget,
- rel: rel
- }));
+ });
},
migrate: (0,external_wp_compose_namespaceObject.compose)(migrate_font_family, migrateBorderRadius)
}, {
@@ -4458,13 +4419,13 @@ const deprecated_deprecated = [v11, v10, {
title,
url
} = attributes;
- const buttonClasses = classnames_default()('wp-block-button__link', {
+ const buttonClasses = dist_clsx('wp-block-button__link', {
'no-border-radius': borderRadius === 0
});
const buttonStyle = {
borderRadius: borderRadius ? borderRadius + 'px' : undefined
};
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
tagName: "a",
className: buttonClasses,
href: url,
@@ -4542,7 +4503,7 @@ const deprecated_deprecated = [v11, v10, {
const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('color', textColor);
const backgroundClass = !customGradient && (0,external_wp_blockEditor_namespaceObject.getColorClassName)('background-color', backgroundColor);
const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
- const buttonClasses = classnames_default()('wp-block-button__link', {
+ const buttonClasses = dist_clsx('wp-block-button__link', {
'has-text-color': textColor || customTextColor,
[textClass]: textClass,
'has-background': backgroundColor || customBackgroundColor || customGradient || gradient,
@@ -4561,16 +4522,18 @@ 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_React_namespaceObject.createElement)("div", null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "a",
- className: buttonClasses,
- href: url,
- title: title,
- style: buttonStyle,
- value: text,
- target: linkTarget,
- rel: rel
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "a",
+ className: buttonClasses,
+ href: url,
+ title: title,
+ style: buttonStyle,
+ value: text,
+ target: linkTarget,
+ rel: rel
+ })
+ });
}
}, {
attributes: {
@@ -4637,7 +4600,7 @@ const deprecated_deprecated = [v11, v10, {
} = attributes;
const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('color', textColor);
const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('background-color', backgroundColor);
- const buttonClasses = classnames_default()('wp-block-button__link', {
+ const buttonClasses = dist_clsx('wp-block-button__link', {
'has-text-color': textColor || customTextColor,
[textClass]: textClass,
'has-background': backgroundColor || customBackgroundColor,
@@ -4647,16 +4610,18 @@ const deprecated_deprecated = [v11, v10, {
backgroundColor: backgroundClass ? undefined : customBackgroundColor,
color: textClass ? undefined : customTextColor
};
- 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,
- title: title,
- style: buttonStyle,
- value: text,
- target: linkTarget,
- rel: rel
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "a",
+ className: buttonClasses,
+ href: url,
+ title: title,
+ style: buttonStyle,
+ value: text,
+ target: linkTarget,
+ rel: rel
+ })
+ });
}
}, {
attributes: {
@@ -4693,7 +4658,7 @@ const deprecated_deprecated = [v11, v10, {
} = attributes;
const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('color', textColor);
const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('background-color', backgroundColor);
- const buttonClasses = classnames_default()('wp-block-button__link', {
+ const buttonClasses = dist_clsx('wp-block-button__link', {
'has-text-color': textColor || customTextColor,
[textClass]: textClass,
'has-background': backgroundColor || customBackgroundColor,
@@ -4703,14 +4668,16 @@ const deprecated_deprecated = [v11, v10, {
backgroundColor: backgroundClass ? undefined : customBackgroundColor,
color: textClass ? undefined : customTextColor
};
- 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,
- title: title,
- style: buttonStyle,
- value: text
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "a",
+ className: buttonClasses,
+ href: url,
+ title: title,
+ style: buttonStyle,
+ value: text
+ })
+ });
}
}, {
attributes: {
@@ -4742,16 +4709,17 @@ const deprecated_deprecated = [v11, v10, {
color: textColor
};
const linkClass = 'wp-block-button__link';
- return (0,external_React_namespaceObject.createElement)("div", {
- className: `align${align}`
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "a",
- className: linkClass,
- href: url,
- title: title,
- style: buttonStyle,
- value: text
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: `align${align}`,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "a",
+ className: linkClass,
+ href: url,
+ title: title,
+ style: buttonStyle,
+ value: text
+ })
+ });
},
migrate: oldColorsMigration
}, {
@@ -4779,20 +4747,21 @@ const deprecated_deprecated = [v11, v10, {
color,
textColor
} = attributes;
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
className: `align${align}`,
style: {
backgroundColor: color
- }
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "a",
- href: url,
- title: title,
- style: {
- color: textColor
},
- value: text
- }));
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "a",
+ href: url,
+ title: title,
+ style: {
+ color: textColor
+ },
+ value: text
+ })
+ });
},
migrate: oldColorsMigration
}];
@@ -4868,35 +4837,36 @@ function removeAnchorTag(value) {
;// CONCATENATED MODULE: external ["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_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const link_link = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_link = (link_link);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/link-off.js
-
/**
* WordPress dependencies
*/
-const linkOff = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const linkOff = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const link_off = (linkOff);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/button/edit.js
-
/**
* External dependencies
*/
@@ -4922,6 +4892,9 @@ const linkOff = (0,external_React_namespaceObject.createElement)(external_wp_pri
+
+
+
const LINK_SETTINGS = [...external_wp_blockEditor_namespaceObject.__experimentalLinkControl.DEFAULT_LINK_SETTINGS, {
id: 'nofollow',
title: (0,external_wp_i18n_namespaceObject.__)('Mark as nofollow')
@@ -4987,18 +4960,20 @@ function WidthPanel({
width
});
}
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, {
- title: (0,external_wp_i18n_namespaceObject.__)('Width settings')
- }, (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- key: widthValue,
- size: "small",
- variant: widthValue === selectedWidth ? 'primary' : undefined,
- onClick: () => handleChange(widthValue)
- }, widthValue, "%");
- })));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ButtonGroup, {
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Button width'),
+ children: [25, 50, 75, 100].map(widthValue => {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Button, {
+ size: "small",
+ variant: widthValue === selectedWidth ? 'primary' : undefined,
+ onClick: () => handleChange(widthValue),
+ children: [widthValue, "%"]
+ }, widthValue);
+ })
+ })
+ });
}
function ButtonEdit(props) {
const {
@@ -5008,7 +4983,8 @@ function ButtonEdit(props) {
isSelected,
onReplace,
mergeBlocks,
- clientId
+ clientId,
+ context
} = props;
const {
tagName,
@@ -5089,111 +5065,118 @@ function ButtonEdit(props) {
}
const blockBindingsSource = unlock(select(external_wp_blocks_namespaceObject.store)).getBlockBindingsSource(metadata?.bindings?.url?.source);
return {
- lockUrlControls: !!metadata?.bindings?.url && (!blockBindingsSource || blockBindingsSource?.lockAttributesEditing)
+ lockUrlControls: !!metadata?.bindings?.url && !blockBindingsSource?.canUserEditValue({
+ select,
+ context,
+ args: metadata?.bindings?.url?.args
+ })
};
- }, [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_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 => setAttributes({
- text: removeAnchorTag(value)
- }),
- withoutInteractiveFormatting: true,
- className: classnames_default()(className, 'wp-block-button__link', colorProps.className, borderProps.className, {
- [`has-text-align-${textAlign}`]: textAlign,
- // For backwards compatibility add style that isn't
- // provided via block support.
- 'no-border-radius': style?.border?.radius === 0
- }, (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('button')),
- style: {
- ...borderProps.style,
- ...colorProps.style,
- ...spacingProps.style,
- ...shadowProps.style
- },
- onSplit: value => (0,external_wp_blocks_namespaceObject.createBlock)('core/button', {
- ...attributes,
- text: value
- }),
- onReplace: onReplace,
- onMerge: mergeBlocks,
- identifier: "text"
- })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, {
- group: "block"
- }, blockEditingMode === 'default' && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
- value: textAlign,
- onChange: nextAlign => {
- setAttributes({
- textAlign: nextAlign
- });
- }
- }), !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 && !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) && !lockUrlControls && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Popover, {
- placement: "bottom",
- onClose: () => {
- setIsEditingURL(false);
- richTextRef.current?.focus();
- },
- anchor: popoverAnchor,
- focusOnMount: isEditingURL ? 'firstElement' : false,
- __unstableSlotName: '__unstable-block-tools-after',
- shift: true
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalLinkControl, {
- value: linkValue,
- onChange: ({
- url: newURL,
- opensInNewTab: newOpensInNewTab,
- nofollow: newNofollow
- }) => setAttributes(getUpdatedLinkAttributes({
- rel,
- url: newURL,
- opensInNewTab: newOpensInNewTab,
- nofollow: newNofollow
- })),
- onRemove: () => {
- unlink();
- richTextRef.current?.focus();
- },
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, {
- group: "advanced"
- }, isLinkTag && (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
- })
- })));
+ }, [isSelected, metadata?.bindings?.url]);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ className: dist_clsx(blockProps.className, {
+ [`has-custom-width wp-block-button__width-${width}`]: width,
+ [`has-custom-font-size`]: blockProps.style.fontSize
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 => setAttributes({
+ text: removeAnchorTag(value)
+ }),
+ withoutInteractiveFormatting: true,
+ className: dist_clsx(className, 'wp-block-button__link', colorProps.className, borderProps.className, {
+ [`has-text-align-${textAlign}`]: textAlign,
+ // For backwards compatibility add style that isn't
+ // provided via block support.
+ 'no-border-radius': style?.border?.radius === 0
+ }, (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('button')),
+ style: {
+ ...borderProps.style,
+ ...colorProps.style,
+ ...spacingProps.style,
+ ...shadowProps.style
+ },
+ onReplace: onReplace,
+ onMerge: mergeBlocks,
+ identifier: "text"
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: [blockEditingMode === 'default' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
+ value: textAlign,
+ onChange: nextAlign => {
+ setAttributes({
+ textAlign: nextAlign
+ });
+ }
+ }), !isURLSet && isLinkTag && !lockUrlControls && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 && !lockUrlControls && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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) && !lockUrlControls && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Popover, {
+ placement: "bottom",
+ onClose: () => {
+ setIsEditingURL(false);
+ richTextRef.current?.focus();
+ },
+ anchor: popoverAnchor,
+ focusOnMount: isEditingURL ? 'firstElement' : false,
+ __unstableSlotName: "__unstable-block-tools-after",
+ shift: true,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalLinkControl, {
+ value: linkValue,
+ onChange: ({
+ url: newURL,
+ opensInNewTab: newOpensInNewTab,
+ nofollow: newNofollow
+ }) => setAttributes(getUpdatedLinkAttributes({
+ rel,
+ url: newURL,
+ opensInNewTab: newOpensInNewTab,
+ nofollow: newNofollow
+ })),
+ onRemove: () => {
+ unlink();
+ richTextRef.current?.focus();
+ },
+ forceIsEditingLink: isEditingURL,
+ settings: LINK_SETTINGS
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WidthPanel, {
+ selectedWidth: width,
+ setAttributes: setAttributes
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ group: "advanced",
+ children: isLinkTag && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Link rel'),
+ value: rel || '',
+ onChange: newRel => setAttributes({
+ rel: newRel
+ })
+ })
+ })]
+ });
}
/* harmony default export */ const button_edit = (ButtonEdit);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/button/save.js
-
/**
* External dependencies
*/
@@ -5203,6 +5186,7 @@ function ButtonEdit(props) {
* WordPress dependencies
*/
+
function save_save({
attributes,
className
@@ -5220,9 +5204,6 @@ function save_save({
url,
width
} = attributes;
- if (external_wp_blockEditor_namespaceObject.RichText.isEmpty(text)) {
- return null;
- }
const TagName = tagName || 'a';
const isButtonTag = 'button' === TagName;
const buttonType = type || 'button';
@@ -5230,7 +5211,7 @@ function save_save({
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, {
+ const buttonClasses = dist_clsx('wp-block-button__link', colorProps.className, borderProps.className, {
[`has-text-align-${textAlign}`]: textAlign,
// For backwards compatibility add style that isn't provided via
// block support.
@@ -5247,25 +5228,26 @@ function save_save({
// 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.
- const wrapperClasses = classnames_default()(className, {
+ const wrapperClasses = dist_clsx(className, {
[`has-custom-width wp-block-button__width-${width}`]: width,
[`has-custom-font-size`]: fontSize || style?.typography?.fontSize
});
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className: wrapperClasses
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: TagName,
+ type: isButtonTag ? buttonType : null,
+ className: buttonClasses,
+ href: isButtonTag ? null : url,
+ title: title,
+ style: buttonStyle,
+ value: text,
+ target: isButtonTag ? null : linkTarget,
+ rel: isButtonTag ? null : rel
})
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: TagName,
- type: isButtonTag ? buttonType : null,
- className: buttonClasses,
- href: isButtonTag ? null : url,
- title: title,
- style: buttonStyle,
- value: text,
- target: isButtonTag ? null : linkTarget,
- rel: isButtonTag ? null : rel
- }));
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/button/index.js
@@ -5356,6 +5338,7 @@ const button_metadata = {
},
supports: {
anchor: true,
+ splitting: true,
align: false,
alignWide: false,
color: {
@@ -5449,21 +5432,21 @@ const button_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/buttons.js
-
/**
* WordPress dependencies
*/
-const buttons = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const buttons = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_buttons = (buttons);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/buttons/deprecated.js
-
/**
* External dependencies
*/
@@ -5476,6 +5459,7 @@ const buttons = (0,external_React_namespaceObject.createElement)(external_wp_pri
/**
* @param {Object} attributes Block's attributes.
*/
+
const migrateWithLayout = attributes => {
if (!!attributes.layout) {
return attributes;
@@ -5533,14 +5517,15 @@ const buttons_deprecated_deprecated = [{
orientation
}
}) {
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
- className: classnames_default()({
+ className: dist_clsx({
[`is-content-justification-${contentJustification}`]: contentJustification,
'is-vertical': orientation === 'vertical'
})
- })
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null));
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
+ });
}
}, {
supports: {
@@ -5548,7 +5533,9 @@ const buttons_deprecated_deprecated = [{
anchor: true
},
save() {
- return (0,external_React_namespaceObject.createElement)("div", null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
+ });
},
isEligible({
align
@@ -5691,7 +5678,6 @@ const transforms_transforms = {
/* harmony default export */ const buttons_transforms = (transforms_transforms);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/buttons/edit.js
-
/**
* External dependencies
*/
@@ -5703,6 +5689,7 @@ const transforms_transforms = {
+
const DEFAULT_BLOCK = {
name: 'core/button',
attributesToCopy: ['backgroundColor', 'border', 'className', 'fontFamily', 'fontSize', 'gradient', 'style', 'textColor', 'width']
@@ -5718,18 +5705,15 @@ function ButtonsEdit({
style
} = attributes;
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()(className, {
+ className: dist_clsx(className, {
'has-custom-font-size': fontSize || style?.typography?.fontSize
})
});
const {
- preferredStyle,
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('core/button', 'inserter');
return {
- preferredStyle: preferredStyleVariations?.value?.['core/button'],
hasButtonVariations: buttonVariations.length > 0
};
}, []);
@@ -5737,20 +5721,17 @@ function ButtonsEdit({
defaultBlock: DEFAULT_BLOCK,
// This check should be handled by the `Inserter` internally to be consistent across all blocks that use it.
directInsert: !hasButtonVariations,
- template: [['core/button', {
- className: preferredStyle && `is-style-${preferredStyle}`
- }]],
+ template: [['core/button']],
templateInsertUpdatesSelection: true,
orientation: (_layout$orientation = layout?.orientation) !== null && _layout$orientation !== void 0 ? _layout$orientation : 'horizontal'
});
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
...innerBlocksProps
});
}
/* harmony default export */ const buttons_edit = (ButtonsEdit);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/buttons/save.js
-
/**
* External dependencies
*/
@@ -5760,6 +5741,7 @@ function ButtonsEdit({
* WordPress dependencies
*/
+
function buttons_save_save({
attributes,
className
@@ -5769,12 +5751,12 @@ function buttons_save_save({
style
} = attributes;
const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save({
- className: classnames_default()(className, {
+ className: dist_clsx(className, {
'has-custom-font-size': fontSize || style?.typography?.fontSize
})
});
const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
...innerBlocksProps
});
}
@@ -5874,21 +5856,21 @@ const buttons_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/calendar.js
-
/**
* WordPress dependencies
*/
-const calendar = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const calendar = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_calendar = (calendar);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/calendar/edit.js
-
/**
* External dependencies
*/
@@ -5913,6 +5895,7 @@ const calendar = (0,external_React_namespaceObject.createElement)(external_wp_pr
* @param {string} date Date in `ISO8601/RFC3339` format.
* @return {Object} Year and date of the specified date.
*/
+
const getYearMonth = memize(date => {
if (!date) {
return {};
@@ -5964,22 +5947,27 @@ function CalendarEdit({
};
}, []);
if (!hasPosts) {
- return (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, {
- icon: library_calendar,
- label: (0,external_wp_i18n_namespaceObject.__)('Calendar')
- }, !hasPostsResolved ? (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null) : (0,external_wp_i18n_namespaceObject.__)('No published posts found.')));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, {
+ icon: library_calendar,
+ label: (0,external_wp_i18n_namespaceObject.__)('Calendar'),
+ children: !hasPostsResolved ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) : (0,external_wp_i18n_namespaceObject.__)('No published posts found.')
+ })
+ });
}
- return (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (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,
- ...getYearMonth(date)
- }
- })));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)((external_wp_serverSideRender_default()), {
+ block: "core/calendar",
+ attributes: {
+ ...attributes,
+ ...getYearMonth(date)
+ }
+ })
+ })
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/calendar/transforms.js
@@ -6076,39 +6064,40 @@ const calendar_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/category.js
-
/**
* WordPress dependencies
*/
-const category = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const category = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_category = (category);
;// CONCATENATED MODULE: external ["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_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const pin = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_pin = (pin);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/categories/edit.js
-
/**
* External dependencies
*/
@@ -6124,6 +6113,9 @@ const pin = (0,external_React_namespaceObject.createElement)(external_wp_primiti
+
+
+
function CategoriesEdit({
attributes: {
displayAsDropdown,
@@ -6176,26 +6168,34 @@ function CategoriesEdit({
count,
name
} = category;
- return (0,external_React_namespaceObject.createElement)("li", {
- key: id,
- className: `cat-item cat-item-${id}`
- }, (0,external_React_namespaceObject.createElement)("a", {
- href: link,
- target: "_blank",
- rel: "noreferrer noopener"
- }, renderCategoryName(name)), showPostCounts && ` (${count})`, showHierarchy && !!childCategories.length && (0,external_React_namespaceObject.createElement)("ul", {
- className: "children"
- }, childCategories.map(childCategory => renderCategoryListItem(childCategory))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", {
+ className: `cat-item cat-item-${id}`,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: link,
+ target: "_blank",
+ rel: "noreferrer noopener",
+ children: renderCategoryName(name)
+ }), showPostCounts && ` (${count})`, showHierarchy && !!childCategories.length && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
+ className: "children",
+ children: childCategories.map(childCategory => renderCategoryListItem(childCategory))
+ })]
+ }, id);
};
const renderCategoryDropdown = () => {
const parentId = showHierarchy ? 0 : null;
const categoriesList = getCategoriesList(parentId);
- 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_React_namespaceObject.createElement)("select", {
- id: selectId
- }, (0,external_React_namespaceObject.createElement)("option", null, (0,external_wp_i18n_namespaceObject.__)('Select Category')), categoriesList.map(category => renderCategoryDropdownItem(category, 0))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, {
+ as: "label",
+ htmlFor: selectId,
+ children: (0,external_wp_i18n_namespaceObject.__)('Categories')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("select", {
+ id: selectId,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("option", {
+ children: (0,external_wp_i18n_namespaceObject.__)('Select Category')
+ }), categoriesList.map(category => renderCategoryDropdownItem(category, 0))]
+ })]
+ });
};
const renderCategoryDropdownItem = (category, level) => {
const {
@@ -6204,54 +6204,61 @@ function CategoriesEdit({
name
} = category;
const childCategories = getCategoriesList(id);
- return [(0,external_React_namespaceObject.createElement)("option", {
- key: id,
- className: `level-${level}`
- }, Array.from({
- length: level * 3
- }).map(() => '\xa0'), renderCategoryName(name), showPostCounts && ` (${count})`), showHierarchy && !!childCategories.length && childCategories.map(childCategory => renderCategoryDropdownItem(childCategory, level + 1))];
+ return [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("option", {
+ className: `level-${level}`,
+ children: [Array.from({
+ length: level * 3
+ }).map(() => '\xa0'), renderCategoryName(name), showPostCounts && ` (${count})`]
+ }, id), showHierarchy && !!childCategories.length && childCategories.map(childCategory => renderCategoryDropdownItem(childCategory, level + 1))];
};
const TagName = !!categories?.length && !displayAsDropdown && !isResolving ? 'ul' : 'div';
- const classes = classnames_default()(className, {
+ const classes = dist_clsx(className, {
'wp-block-categories-list': !!categories?.length && !displayAsDropdown && !isResolving,
'wp-block-categories-dropdown': !!categories?.length && displayAsDropdown && !isResolving
});
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
className: classes
});
- return (0,external_React_namespaceObject.createElement)(TagName, {
- ...blockProps
- }, (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.ToggleControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Display as dropdown'),
- checked: displayAsDropdown,
- onChange: toggleAttribute('displayAsDropdown')
- }), (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_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_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_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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, {
- icon: library_pin,
- label: (0,external_wp_i18n_namespaceObject.__)('Categories')
- }, (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()));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(TagName, {
+ ...blockProps,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Display as dropdown'),
+ checked: displayAsDropdown,
+ onChange: toggleAttribute('displayAsDropdown')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Show post counts'),
+ checked: showPostCounts,
+ onChange: toggleAttribute('showPostCounts')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Show only top level categories'),
+ checked: showOnlyTopLevel,
+ onChange: toggleAttribute('showOnlyTopLevel')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Show empty categories'),
+ checked: showEmpty,
+ onChange: toggleAttribute('showEmpty')
+ }), !showOnlyTopLevel && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Show hierarchy'),
+ checked: showHierarchy,
+ onChange: toggleAttribute('showHierarchy')
+ })]
+ })
+ }), isResolving && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, {
+ icon: library_pin,
+ label: (0,external_wp_i18n_namespaceObject.__)('Categories'),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {})
+ }), !isResolving && categories?.length === 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
+ children: (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
@@ -6342,21 +6349,21 @@ const categories_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/classic.js
-
/**
* WordPress dependencies
*/
-const classic = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const classic = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_classic = (classic);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/freeform/convert-to-blocks-button.js
-
/**
* WordPress dependencies
*/
@@ -6365,6 +6372,7 @@ const classic = (0,external_React_namespaceObject.createElement)(external_wp_pri
+
const ConvertToBlocksButton = ({
clientId
}) => {
@@ -6374,30 +6382,31 @@ const ConvertToBlocksButton = ({
const block = (0,external_wp_data_namespaceObject.useSelect)(select => {
return select(external_wp_blockEditor_namespaceObject.store).getBlock(clientId);
}, [clientId]);
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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'));
+ })),
+ children: (0,external_wp_i18n_namespaceObject.__)('Convert to blocks')
+ });
};
/* harmony default export */ const convert_to_blocks_button = (ConvertToBlocksButton);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/fullscreen.js
-
/**
* WordPress dependencies
*/
-const fullscreen = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const fullscreen = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_fullscreen = (fullscreen);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/freeform/modal.js
-
/**
* WordPress dependencies
*/
@@ -6408,6 +6417,9 @@ const fullscreen = (0,external_React_namespaceObject.createElement)(external_wp_
+
+
+
function ModalAuxiliaryActions({
onClick,
isModalFullScreen
@@ -6417,7 +6429,7 @@ function ModalAuxiliaryActions({
if (isMobileViewport) {
return null;
}
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
onClick: onClick,
icon: library_fullscreen,
isPressed: isModalFullScreen,
@@ -6457,7 +6469,7 @@ function ClassicEdit(props) {
window.wp.oldEditor.remove(props.id);
};
}, []);
- return (0,external_React_namespaceObject.createElement)("textarea", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("textarea", {
...props
});
}
@@ -6474,42 +6486,58 @@ 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_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_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_React_namespaceObject.createElement)(ModalAuxiliaryActions, {
- onClick: () => setIsModalFullScreen(!isModalFullScreen),
- isModalFullScreen: isModalFullScreen
- })
- }, (0,external_React_namespaceObject.createElement)(ClassicEdit, {
- id: id,
- defaultValue: content
- }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Flex, {
- className: "block-editor-freeform-modal__actions",
- justify: "flex-end",
- expanded: false
- }, (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- variant: "primary",
- onClick: () => {
- setAttributes({
- content: window.wp.oldEditor.getContent(id)
- });
- setOpen(false);
- }
- }, (0,external_wp_i18n_namespaceObject.__)('Save'))))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
+ onClick: () => setOpen(true),
+ children: (0,external_wp_i18n_namespaceObject.__)('Edit')
+ })
+ })
+ }), content && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, {
+ children: content
+ }), (isOpen || !content) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(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: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ModalAuxiliaryActions, {
+ onClick: () => setIsModalFullScreen(!isModalFullScreen),
+ isModalFullScreen: isModalFullScreen
+ }),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ClassicEdit, {
+ id: id,
+ defaultValue: content
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Flex, {
+ className: "block-editor-freeform-modal__actions",
+ justify: "flex-end",
+ expanded: false,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ variant: "tertiary",
+ onClick: onClose,
+ children: (0,external_wp_i18n_namespaceObject.__)('Cancel')
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ variant: "primary",
+ onClick: () => {
+ setAttributes({
+ content: window.wp.oldEditor.getContent(id)
+ });
+ setOpen(false);
+ },
+ children: (0,external_wp_i18n_namespaceObject.__)('Save')
+ })
+ })]
+ })]
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/freeform/edit.js
-
/**
* WordPress dependencies
*/
@@ -6526,6 +6554,9 @@ function ModalEdit(props) {
*/
+
+
+
const {
wp
} = window;
@@ -6553,17 +6584,24 @@ function FreeformEdit(props) {
const ref = (0,external_wp_compose_namespaceObject.useRefEffect)(element => {
setIsIframed(element.ownerDocument !== document);
}, []);
- 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_React_namespaceObject.createElement)("div", {
- ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- ref
- })
- }, isIframed ? (0,external_React_namespaceObject.createElement)(ModalEdit, {
- ...props
- }) : (0,external_React_namespaceObject.createElement)(edit_ClassicEdit, {
- ...props
- })));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [canRemove && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(convert_to_blocks_button, {
+ clientId: clientId
+ })
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({
+ ref
+ }),
+ children: isIframed ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ModalEdit, {
+ ...props
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(edit_ClassicEdit, {
+ ...props
+ })
+ })]
+ });
}
function edit_ClassicEdit({
clientId,
@@ -6582,11 +6620,14 @@ function edit_ClassicEdit({
return;
}
const editor = window.tinymce.get(`editor-${clientId}`);
- const currentContent = editor?.getContent();
+ if (!editor) {
+ return;
+ }
+ const currentContent = editor.getContent();
if (currentContent !== content) {
editor.setContent(content || '');
}
- }, [content]);
+ }, [clientId, content]);
(0,external_wp_element_namespaceObject.useEffect)(() => {
const {
baseURL,
@@ -6704,6 +6745,7 @@ function edit_ClassicEdit({
return () => {
document.removeEventListener('readystatechange', onReadyStateChange);
wp.oldEditor.remove(`editor-${clientId}`);
+ didMount.current = false;
};
}, []);
function focus() {
@@ -6726,34 +6768,36 @@ function edit_ClassicEdit({
// from the KeyboardShortcuts component to stop their propagation.
/* eslint-disable jsx-a11y/no-static-element-interactions */
- 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_React_namespaceObject.createElement)("div", {
- key: "editor",
- id: `editor-${clientId}`,
- className: "wp-block-freeform block-library-rich-text__tinymce"
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ id: `toolbar-${clientId}`,
+ className: "block-library-classic__toolbar",
+ onClick: focus,
+ "data-placeholder": (0,external_wp_i18n_namespaceObject.__)('Classic'),
+ onKeyDown: onToolbarKeyDown
+ }, "toolbar"), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ id: `editor-${clientId}`,
+ className: "wp-block-freeform block-library-rich-text__tinymce"
+ }, "editor")]
+ });
/* eslint-enable jsx-a11y/no-static-element-interactions */
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/freeform/save.js
-
/**
* WordPress dependencies
*/
+
function freeform_save_save({
attributes
}) {
const {
content
} = attributes;
- return (0,external_React_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, null, content);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, {
+ children: content
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/freeform/index.js
@@ -6805,27 +6849,28 @@ const freeform_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/code.js
-
/**
* WordPress dependencies
*/
-const code = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const code = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_code = (code);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/code/edit.js
-
/**
* WordPress dependencies
*/
+
function CodeEdit({
attributes,
setAttributes,
@@ -6834,23 +6879,24 @@ function CodeEdit({
mergeBlocks
}) {
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
- return (0,external_React_namespaceObject.createElement)("pre", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, {
- tagName: "code",
- identifier: "content",
- value: attributes.content,
- onChange: content => setAttributes({
- content
- }),
- onRemove: onRemove,
- onMerge: mergeBlocks,
- placeholder: (0,external_wp_i18n_namespaceObject.__)('Write code…'),
- "aria-label": (0,external_wp_i18n_namespaceObject.__)('Code'),
- preserveWhiteSpace: true,
- __unstablePastePlainText: true,
- __unstableOnSplitAtDoubleLineEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()))
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("pre", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
+ tagName: "code",
+ identifier: "content",
+ value: attributes.content,
+ onChange: content => setAttributes({
+ content
+ }),
+ onRemove: onRemove,
+ onMerge: mergeBlocks,
+ placeholder: (0,external_wp_i18n_namespaceObject.__)('Write code…'),
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Code'),
+ preserveWhiteSpace: true,
+ __unstablePastePlainText: true,
+ __unstableOnSplitAtDoubleLineEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()))
+ })
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/code/utils.js
@@ -6905,7 +6951,6 @@ function escapeProtocolInIsolatedUrls(content) {
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/code/save.js
-
/**
* WordPress dependencies
*/
@@ -6915,21 +6960,23 @@ function escapeProtocolInIsolatedUrls(content) {
* Internal dependencies
*/
+
function code_save_save({
attributes
}) {
- return (0,external_React_namespaceObject.createElement)("pre", {
- ...external_wp_blockEditor_namespaceObject.useBlockProps.save()
- }, (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
- }))
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("pre", {
+ ...external_wp_blockEditor_namespaceObject.useBlockProps.save(),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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
+ }))
+ })
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/code/transforms.js
@@ -7114,21 +7161,21 @@ const code_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/column.js
-
/**
* WordPress dependencies
*/
-const column = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const column = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_column = (column);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/column/deprecated.js
-
/**
* External dependencies
*/
@@ -7138,6 +7185,7 @@ const column = (0,external_React_namespaceObject.createElement)(external_wp_prim
* WordPress dependencies
*/
+
const column_deprecated_deprecated = [{
attributes: {
verticalAlignment: {
@@ -7167,22 +7215,22 @@ const column_deprecated_deprecated = [{
verticalAlignment,
width
} = attributes;
- const wrapperClasses = classnames_default()({
+ const wrapperClasses = dist_clsx({
[`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment
});
const style = {
flexBasis: width + '%'
};
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
className: wrapperClasses,
- style: style
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null));
+ style: style,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
+ });
}
}];
/* harmony default export */ const column_deprecated = (column_deprecated_deprecated);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/column/edit.js
-
/**
* External dependencies
*/
@@ -7195,6 +7243,34 @@ const column_deprecated_deprecated = [{
+
+
+
+function ColumnInspectorControls({
+ width,
+ setAttributes
+}) {
+ const [availableUnits] = (0,external_wp_blockEditor_namespaceObject.useSettings)('spacing.units');
+ const units = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({
+ availableUnits: availableUnits || ['%', 'px', 'em', 'rem', 'vw']
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalUnitControl, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Width'),
+ labelPosition: "edge",
+ __unstableInputWidth: "80px",
+ value: width || '',
+ onChange: nextWidth => {
+ nextWidth = 0 > parseFloat(nextWidth) ? '0' : nextWidth;
+ setAttributes({
+ width: nextWidth
+ });
+ },
+ units: units
+ })
+ });
+}
function ColumnEdit({
attributes: {
verticalAlignment,
@@ -7205,13 +7281,9 @@ function ColumnEdit({
setAttributes,
clientId
}) {
- const classes = classnames_default()('block-core-columns', {
+ const classes = dist_clsx('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: availableUnits || ['%', 'px', 'em', 'rem', 'vw']
- });
const {
columnsIds,
hasChildBlocks,
@@ -7260,32 +7332,26 @@ function ColumnEdit({
allowedBlocks,
renderAppender: hasChildBlocks ? 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.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockVerticalAlignmentToolbar, {
- onChange: updateAlignment,
- value: verticalAlignment,
- controls: ['top', 'center', 'bottom', 'stretch']
- })), (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",
- value: width || '',
- onChange: nextWidth => {
- nextWidth = 0 > parseFloat(nextWidth) ? '0' : nextWidth;
- setAttributes({
- width: nextWidth
- });
- },
- units: units
- }))), (0,external_React_namespaceObject.createElement)("div", {
- ...innerBlocksProps
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockVerticalAlignmentToolbar, {
+ onChange: updateAlignment,
+ value: verticalAlignment,
+ controls: ['top', 'center', 'bottom', 'stretch']
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ColumnInspectorControls, {
+ width: width,
+ setAttributes: setAttributes
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...innerBlocksProps
+ })]
+ });
}
/* harmony default export */ const column_edit = (ColumnEdit);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/column/save.js
-
/**
* External dependencies
*/
@@ -7295,6 +7361,7 @@ function ColumnEdit({
* WordPress dependencies
*/
+
function column_save_save({
attributes
}) {
@@ -7302,7 +7369,7 @@ function column_save_save({
verticalAlignment,
width
} = attributes;
- const wrapperClasses = classnames_default()({
+ const wrapperClasses = dist_clsx({
[`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment
});
let style;
@@ -7324,7 +7391,7 @@ function column_save_save({
style
});
const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
...innerBlocksProps
});
}
@@ -7436,23 +7503,23 @@ const column_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/columns.js
-
/**
* WordPress dependencies
*/
-const columns = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const columns = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_columns = (columns);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/columns/deprecated.js
-
/**
* External dependencies
*/
@@ -7473,6 +7540,7 @@ const columns = (0,external_React_namespaceObject.createElement)(external_wp_pri
*
* @return {number | undefined} Column to which inner block is to be assigned.
*/
+
function getDeprecatedLayoutColumn(originalContent) {
let {
doc
@@ -7544,7 +7612,7 @@ const migrateCustomColors = attributes => {
} = attributes;
const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('background-color', backgroundColor);
const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('color', textColor);
- const className = classnames_default()({
+ const className = dist_clsx({
'has-background': backgroundColor || customBackgroundColor,
'has-text-color': textColor || customTextColor,
[backgroundClass]: backgroundClass,
@@ -7555,10 +7623,11 @@ const migrateCustomColors = attributes => {
backgroundColor: backgroundClass ? undefined : customBackgroundColor,
color: textClass ? undefined : customTextColor
};
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
className: className ? className : undefined,
- style: style
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null));
+ style: style,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
+ });
}
}, {
attributes: {
@@ -7612,9 +7681,10 @@ const migrateCustomColors = attributes => {
const {
columns
} = attributes;
- return (0,external_React_namespaceObject.createElement)("div", {
- className: `has-${columns}-columns`
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: `has-${columns}-columns`,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
+ });
}
}, {
attributes: {
@@ -7641,12 +7711,13 @@ const migrateCustomColors = attributes => {
verticalAlignment,
columns
} = attributes;
- const wrapperClasses = classnames_default()(`has-${columns}-columns`, {
+ const wrapperClasses = dist_clsx(`has-${columns}-columns`, {
[`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment
});
- return (0,external_React_namespaceObject.createElement)("div", {
- className: wrapperClasses
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: wrapperClasses,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
+ });
}
}]);
@@ -7807,7 +7878,6 @@ function isPercentageUnit(unit) {
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/columns/edit.js
-
/**
* External dependencies
*/
@@ -7826,17 +7896,18 @@ function isPercentageUnit(unit) {
* Internal dependencies
*/
-function ColumnsEditContainer({
- attributes,
+
+
+
+const edit_DEFAULT_BLOCK = {
+ name: 'core/column'
+};
+function edit_ColumnInspectorControls({
+ clientId,
setAttributes,
- clientId
+ isStackedOnMobile
}) {
const {
- isStackedOnMobile,
- verticalAlignment,
- templateLock
- } = attributes;
- const {
count,
canInsertColumnBlock,
minCount
@@ -7863,49 +7934,12 @@ function ColumnsEditContainer({
minCount: Math.max(...preventRemovalBlockIndexes) + 1
};
}, [clientId]);
- const registry = (0,external_wp_data_namespaceObject.useRegistry)();
const {
- getBlocks,
- getBlockOrder
+ getBlocks
} = (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
- });
- const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classes
- });
- const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
- orientation: 'horizontal',
- renderAppender: false,
- templateLock
- });
-
- /**
- * 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} newVerticalAlignment The vertical alignment setting.
- */
- function updateAlignment(newVerticalAlignment) {
- const innerBlockClientIds = getBlockOrder(clientId);
-
- // 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
@@ -7924,12 +7958,13 @@ function ColumnsEditContainer({
// If adding a new column, assign width to the new column equal to
// as if it were `1 / columns` of the total available space.
const newColumnWidth = toWidthPrecision(100 / newColumns);
+ const newlyAddedColumns = newColumns - previousColumns;
// Redistribute in consideration of pending block insertion as
// constraining the available working width.
- const widths = getRedistributedColumnWidths(innerBlocks, 100 - newColumnWidth);
+ const widths = getRedistributedColumnWidths(innerBlocks, 100 - newColumnWidth * newlyAddedColumns);
innerBlocks = [...getMappedColumnWidths(innerBlocks, widths), ...Array.from({
- length: newColumns - previousColumns
+ length: newlyAddedColumns
}).map(() => {
return (0,external_wp_blocks_namespaceObject.createBlock)('core/column', {
width: `${newColumnWidth}%`
@@ -7952,32 +7987,101 @@ function ColumnsEditContainer({
}
replaceInnerBlocks(clientId, innerBlocks);
}
- 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
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [canInsertColumnBlock && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, {
+ status: "warning",
+ isDismissible: false,
+ children: (0,external_wp_i18n_namespaceObject.__)('This column count exceeds the recommended amount and may cause visual breakage.')
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Stack on mobile'),
+ checked: isStackedOnMobile,
+ onChange: () => setAttributes({
+ isStackedOnMobile: !isStackedOnMobile
+ })
+ })]
+ });
+}
+function ColumnsEditContainer({
+ attributes,
+ setAttributes,
+ clientId
+}) {
+ const {
+ isStackedOnMobile,
+ verticalAlignment,
+ templateLock
+ } = attributes;
+ const registry = (0,external_wp_data_namespaceObject.useRegistry)();
+ const {
+ getBlockOrder
+ } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
+ const {
+ updateBlockAttributes
+ } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
+ const classes = dist_clsx({
+ [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
+ [`is-not-stacked-on-mobile`]: !isStackedOnMobile
+ });
+ const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
+ className: classes
+ });
+ const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
+ defaultBlock: edit_DEFAULT_BLOCK,
+ directInsert: true,
+ orientation: 'horizontal',
+ renderAppender: false,
+ templateLock
+ });
+
+ /**
+ * 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} newVerticalAlignment The vertical alignment setting.
+ */
+ function updateAlignment(newVerticalAlignment) {
+ const innerBlockClientIds = getBlockOrder(clientId);
+
+ // 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
+ });
+ });
+ }
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockVerticalAlignmentToolbar, {
+ onChange: updateAlignment,
+ value: verticalAlignment
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(edit_ColumnInspectorControls, {
+ clientId: clientId,
+ setAttributes: setAttributes,
+ isStackedOnMobile: isStackedOnMobile
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...innerBlocksProps
+ })]
+ });
}
function Placeholder({
clientId,
@@ -8004,22 +8108,24 @@ 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_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalBlockVariationPicker, {
- icon: blockType?.icon?.src,
- label: blockType?.title,
- variations: variations,
- onSelect: (nextVariation = defaultVariation) => {
- if (nextVariation.attributes) {
- setAttributes(nextVariation.attributes);
- }
- if (nextVariation.innerBlocks) {
- replaceInnerBlocks(clientId, (0,external_wp_blocks_namespaceObject.createBlocksFromInnerBlocksTemplate)(nextVariation.innerBlocks), true);
- }
- },
- allowSkip: true
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalBlockVariationPicker, {
+ icon: blockType?.icon?.src,
+ label: blockType?.title,
+ variations: variations,
+ instructions: (0,external_wp_i18n_namespaceObject.__)('Divide into columns. Select a layout:'),
+ onSelect: (nextVariation = defaultVariation) => {
+ if (nextVariation.attributes) {
+ setAttributes(nextVariation.attributes);
+ }
+ if (nextVariation.innerBlocks) {
+ replaceInnerBlocks(clientId, (0,external_wp_blocks_namespaceObject.createBlocksFromInnerBlocksTemplate)(nextVariation.innerBlocks), true);
+ }
+ },
+ allowSkip: true
+ })
+ });
}
const ColumnsEdit = props => {
const {
@@ -8027,14 +8133,13 @@ const ColumnsEdit = props => {
} = props;
const hasInnerBlocks = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).getBlocks(clientId).length > 0, [clientId]);
const Component = hasInnerBlocks ? ColumnsEditContainer : Placeholder;
- return (0,external_React_namespaceObject.createElement)(Component, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Component, {
...props
});
};
/* harmony default export */ const columns_edit = (ColumnsEdit);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/columns/save.js
-
/**
* External dependencies
*/
@@ -8044,6 +8149,7 @@ const ColumnsEdit = props => {
* WordPress dependencies
*/
+
function columns_save_save({
attributes
}) {
@@ -8051,7 +8157,7 @@ function columns_save_save({
isStackedOnMobile,
verticalAlignment
} = attributes;
- const className = classnames_default()({
+ const className = dist_clsx({
[`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
[`is-not-stacked-on-mobile`]: !isStackedOnMobile
});
@@ -8059,13 +8165,12 @@ function columns_save_save({
className
});
const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
...innerBlocksProps
});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/columns/variations.js
-
/**
* WordPress dependencies
*/
@@ -8079,36 +8184,35 @@ function columns_save_save({
*
* @type {WPBlockVariation[]}
*/
+
const variations = [{
name: 'one-column-full',
title: (0,external_wp_i18n_namespaceObject.__)('100'),
description: (0,external_wp_i18n_namespaceObject.__)('One column'),
- icon: (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+ icon: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
+ xmlns: "http://www.w3.org/2000/svg",
width: "48",
height: "48",
viewBox: "0 0 48 48",
- xmlns: "http://www.w3.org/2000/svg"
- }, (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"
- })),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
+ d: "M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Z"
+ })
+ }),
innerBlocks: [['core/column']],
scope: ['block']
}, {
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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+ icon: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
+ xmlns: "http://www.w3.org/2000/svg",
width: "48",
height: "48",
viewBox: "0 0 48 48",
- xmlns: "http://www.w3.org/2000/svg"
- }, (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"
- })),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
+ d: "M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10Z"
+ })
+ }),
isDefault: true,
innerBlocks: [['core/column'], ['core/column']],
scope: ['block']
@@ -8116,16 +8220,15 @@ 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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+ icon: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
+ xmlns: "http://www.w3.org/2000/svg",
width: "48",
height: "48",
viewBox: "0 0 48 48",
- xmlns: "http://www.w3.org/2000/svg"
- }, (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"
- })),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
+ d: "M0 10a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm17 0a2 2 0 0 1 2-2h27a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H19a2 2 0 0 1-2-2V10Z"
+ })
+ }),
innerBlocks: [['core/column', {
width: '33.33%'
}], ['core/column', {
@@ -8136,16 +8239,15 @@ 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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+ icon: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
+ xmlns: "http://www.w3.org/2000/svg",
width: "48",
height: "48",
viewBox: "0 0 48 48",
- xmlns: "http://www.w3.org/2000/svg"
- }, (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"
- })),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
+ d: "M0 10a2 2 0 0 1 2-2h27a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm33 0a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H35a2 2 0 0 1-2-2V10Z"
+ })
+ }),
innerBlocks: [['core/column', {
width: '66.66%'
}], ['core/column', {
@@ -8156,30 +8258,30 @@ 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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+ icon: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
+ xmlns: "http://www.w3.org/2000/svg",
width: "48",
height: "48",
viewBox: "0 0 48 48",
- xmlns: "http://www.w3.org/2000/svg"
- }, (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"
- })),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
+ d: "M0 10a2 2 0 0 1 2-2h10.531c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H2a2 2 0 0 1-2-2V10Zm16.5 0c0-1.105.864-2 1.969-2H29.53c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H18.47c-1.105 0-1.969-.895-1.969-2V10Zm17 0c0-1.105.864-2 1.969-2H46a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H35.469c-1.105 0-1.969-.895-1.969-2V10Z"
+ })
+ }),
innerBlocks: [['core/column'], ['core/column'], ['core/column']],
scope: ['block']
}, {
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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+ icon: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
+ xmlns: "http://www.w3.org/2000/svg",
width: "48",
height: "48",
viewBox: "0 0 48 48",
- xmlns: "http://www.w3.org/2000/svg"
- }, (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"
- })),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
+ d: "M0 10a2 2 0 0 1 2-2h7.531c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H2a2 2 0 0 1-2-2V10Zm13.5 0c0-1.105.864-2 1.969-2H32.53c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H15.47c-1.105 0-1.969-.895-1.969-2V10Zm23 0c0-1.105.864-2 1.969-2H46a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2h-7.531c-1.105 0-1.969-.895-1.969-2V10Z"
+ })
+ }),
innerBlocks: [['core/column', {
width: '25%'
}], ['core/column', {
@@ -8457,21 +8559,21 @@ const columns_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/post-comments.js
-
/**
* WordPress dependencies
*/
-const postComments = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const postComments = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const post_comments = (postComments);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments/deprecated.js
-
/**
* WordPress dependencies
*/
@@ -8479,6 +8581,7 @@ const postComments = (0,external_React_namespaceObject.createElement)(external_w
// v1: Deprecate the initial version of the block which was called "Comments
// Query Loop" instead of "Comments".
+
const v1 = {
attributes: {
tagName: {
@@ -8519,21 +8622,22 @@ const v1 = {
...blockProps,
className: newClasses.join(' ')
};
- return (0,external_React_namespaceObject.createElement)(Tag, {
- ...newBlockProps
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, {
+ ...newBlockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
+ });
}
};
/* harmony default export */ const comments_deprecated = ([v1]);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments/edit/comments-inspector-controls.js
-
/**
* WordPress dependencies
*/
+
function CommentsInspectorControls({
attributes: {
tagName
@@ -8544,32 +8648,34 @@ 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, {
- group: "advanced"
- }, (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>)'),
- value: 'div'
- }, {
- label: '<section>',
- value: 'section'
- }, {
- label: '<aside>',
- value: 'aside'
- }],
- value: tagName,
- onChange: value => setAttributes({
- tagName: value
- }),
- help: htmlElementMessages[tagName]
- })));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ group: "advanced",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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>)'),
+ value: 'div'
+ }, {
+ label: '<section>',
+ value: 'section'
+ }, {
+ label: '<aside>',
+ value: 'aside'
+ }],
+ value: tagName,
+ onChange: value => setAttributes({
+ tagName: value
+ }),
+ help: htmlElementMessages[tagName]
+ })
+ })
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-comments-form/form.js
-
/**
* External dependencies
*/
@@ -8584,34 +8690,43 @@ function CommentsInspectorControls({
+
+
const CommentsFormPlaceholder = () => {
const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(CommentsFormPlaceholder);
- return (0,external_React_namespaceObject.createElement)("div", {
- className: "comment-respond"
- }, (0,external_React_namespaceObject.createElement)("h3", {
- className: "comment-reply-title"
- }, (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_React_namespaceObject.createElement)("p", null, (0,external_React_namespaceObject.createElement)("label", {
- htmlFor: `comment-${instanceId}`
- }, (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_React_namespaceObject.createElement)("p", {
- className: "form-submit wp-block-button"
- }, (0,external_React_namespaceObject.createElement)("input", {
- name: "submit",
- type: "submit",
- className: classnames_default()('wp-block-button__link', (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('button')),
- label: (0,external_wp_i18n_namespaceObject.__)('Post Comment'),
- value: (0,external_wp_i18n_namespaceObject.__)('Post Comment'),
- "aria-disabled": "true"
- }))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ className: "comment-respond",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h3", {
+ className: "comment-reply-title",
+ children: (0,external_wp_i18n_namespaceObject.__)('Leave a Reply')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("form", {
+ noValidate: true,
+ className: "comment-form",
+ onSubmit: event => event.preventDefault(),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("p", {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("label", {
+ htmlFor: `comment-${instanceId}`,
+ children: (0,external_wp_i18n_namespaceObject.__)('Comment')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("textarea", {
+ id: `comment-${instanceId}`,
+ name: "comment",
+ cols: "45",
+ rows: "8",
+ readOnly: true
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
+ className: "form-submit wp-block-button",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("input", {
+ name: "submit",
+ type: "submit",
+ className: dist_clsx('wp-block-button__link', (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('button')),
+ label: (0,external_wp_i18n_namespaceObject.__)('Post Comment'),
+ value: (0,external_wp_i18n_namespaceObject.__)('Post Comment'),
+ "aria-disabled": "true"
+ })
+ })]
+ })]
+ });
};
const CommentsForm = ({
postId,
@@ -8625,27 +8740,31 @@ 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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- key: "enableComments",
+ const actions = [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
onClick: () => setCommentStatus('open'),
- variant: "primary"
- }, (0,external_wp_i18n_namespaceObject._x)('Enable comments', 'action that affects the current post'))];
- 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.'));
+ variant: "primary",
+ children: (0,external_wp_i18n_namespaceObject._x)('Enable comments', 'action that affects the current post')
+ }, "enableComments")];
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, {
+ actions: actions,
+ children: (0,external_wp_i18n_namespaceObject.__)('Post Comments Form block: Comments are not enabled for this item.')
+ });
} else if (!postTypeSupportsComments) {
- 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));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, {
+ children: (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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Post Comments Form block: Comments are not enabled.'));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, {
+ children: (0,external_wp_i18n_namespaceObject.__)('Post Comments Form block: Comments are not enabled.')
+ });
}
}
- return (0,external_React_namespaceObject.createElement)(CommentsFormPlaceholder, null);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CommentsFormPlaceholder, {});
};
/* harmony default export */ const post_comments_form_form = (CommentsForm);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments/edit/placeholder.js
-
/**
* WordPress dependencies
*/
@@ -8659,6 +8778,8 @@ const CommentsForm = ({
* Internal dependencies
*/
+
+
function PostCommentsPlaceholder({
postType,
postId
@@ -8668,87 +8789,118 @@ function PostCommentsPlaceholder({
const {
avatarURL
} = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).getSettings().__experimentalDiscussionSettings);
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: "wp-block-comments__legacy-placeholder",
- inert: "true"
- }, (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_React_namespaceObject.createElement)("div", {
- className: "alignleft"
- }, (0,external_React_namespaceObject.createElement)("a", {
- href: "#top"
- }, "\xAB ", (0,external_wp_i18n_namespaceObject.__)('Older Comments'))), (0,external_React_namespaceObject.createElement)("div", {
- className: "alignright"
- }, (0,external_React_namespaceObject.createElement)("a", {
- href: "#top"
- }, (0,external_wp_i18n_namespaceObject.__)('Newer Comments'), " \xBB"))), (0,external_React_namespaceObject.createElement)("ol", {
- className: "commentlist"
- }, (0,external_React_namespaceObject.createElement)("li", {
- className: "comment even thread-even depth-1"
- }, (0,external_React_namespaceObject.createElement)("article", {
- className: "comment-body"
- }, (0,external_React_namespaceObject.createElement)("footer", {
- className: "comment-meta"
- }, (0,external_React_namespaceObject.createElement)("div", {
- className: "comment-author vcard"
- }, (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_React_namespaceObject.createElement)("b", {
- className: "fn"
- }, (0,external_React_namespaceObject.createElement)("a", {
- href: "#top",
- className: "url"
- }, (0,external_wp_i18n_namespaceObject.__)('A WordPress Commenter'))), ' ', (0,external_React_namespaceObject.createElement)("span", {
- className: "says"
- }, (0,external_wp_i18n_namespaceObject.__)('says'), ":")), (0,external_React_namespaceObject.createElement)("div", {
- className: "comment-metadata"
- }, (0,external_React_namespaceObject.createElement)("a", {
- href: "#top"
- }, (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_React_namespaceObject.createElement)("span", {
- className: "edit-link"
- }, (0,external_React_namespaceObject.createElement)("a", {
- className: "comment-edit-link",
- href: "#top"
- }, (0,external_wp_i18n_namespaceObject.__)('Edit'))))), (0,external_React_namespaceObject.createElement)("div", {
- className: "comment-content"
- }, (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_React_namespaceObject.createElement)("a", {
- href: "https://gravatar.com/"
- })
- }))), (0,external_React_namespaceObject.createElement)("div", {
- className: "reply"
- }, (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_React_namespaceObject.createElement)("div", {
- className: "navigation"
- }, (0,external_React_namespaceObject.createElement)("div", {
- className: "alignleft"
- }, (0,external_React_namespaceObject.createElement)("a", {
- href: "#top"
- }, "\xAB ", (0,external_wp_i18n_namespaceObject.__)('Older Comments'))), (0,external_React_namespaceObject.createElement)("div", {
- className: "alignright"
- }, (0,external_React_namespaceObject.createElement)("a", {
- href: "#top"
- }, (0,external_wp_i18n_namespaceObject.__)('Newer Comments'), " \xBB"))), (0,external_React_namespaceObject.createElement)(post_comments_form_form, {
- postId: postId,
- postType: postType
- }));
+ inert: "true",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h3", {
+ children: /* translators: %s: Post title. */
+ (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)('One response to %s'), postTitle)
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ className: "navigation",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "alignleft",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("a", {
+ href: "#top",
+ children: ["\xAB ", (0,external_wp_i18n_namespaceObject.__)('Older Comments')]
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "alignright",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("a", {
+ href: "#top",
+ children: [(0,external_wp_i18n_namespaceObject.__)('Newer Comments'), " \xBB"]
+ })
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ol", {
+ className: "commentlist",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", {
+ className: "comment even thread-even depth-1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("article", {
+ className: "comment-body",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("footer", {
+ className: "comment-meta",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ className: "comment-author vcard",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ alt: (0,external_wp_i18n_namespaceObject.__)('Commenter Avatar'),
+ src: avatarURL,
+ className: "avatar avatar-32 photo",
+ height: "32",
+ width: "32",
+ loading: "lazy"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("b", {
+ className: "fn",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: "#top",
+ className: "url",
+ children: (0,external_wp_i18n_namespaceObject.__)('A WordPress Commenter')
+ })
+ }), ' ', /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("span", {
+ className: "says",
+ children: [(0,external_wp_i18n_namespaceObject.__)('says'), ":"]
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ className: "comment-metadata",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: "#top",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("time", {
+ dateTime: "2000-01-01T00:00:00+00:00",
+ children: (0,external_wp_i18n_namespaceObject.__)('January 1, 2000 at 00:00 am')
+ })
+ }), ' ', /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ className: "edit-link",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ className: "comment-edit-link",
+ href: "#top",
+ children: (0,external_wp_i18n_namespaceObject.__)('Edit')
+ })
+ })]
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "comment-content",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("p", {
+ children: [(0,external_wp_i18n_namespaceObject.__)('Hi, this is a comment.'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}), (0,external_wp_i18n_namespaceObject.__)('To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}), (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.__)('Commenter avatars come from <a>Gravatar</a>.'), {
+ a:
+ /*#__PURE__*/
+ // eslint-disable-next-line jsx-a11y/anchor-has-content
+ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: "https://gravatar.com/"
+ })
+ })]
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "reply",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ className: "comment-reply-link",
+ href: "#top",
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Reply to A WordPress Commenter'),
+ children: (0,external_wp_i18n_namespaceObject.__)('Reply')
+ })
+ })]
+ })
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ className: "navigation",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "alignleft",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("a", {
+ href: "#top",
+ children: ["\xAB ", (0,external_wp_i18n_namespaceObject.__)('Older Comments')]
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "alignright",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("a", {
+ href: "#top",
+ children: [(0,external_wp_i18n_namespaceObject.__)('Newer Comments'), " \xBB"]
+ })
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(post_comments_form_form, {
+ postId: postId,
+ postType: postType
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments/edit/comments-legacy.js
-
/**
* External dependencies
*/
@@ -8765,6 +8917,9 @@ function PostCommentsPlaceholder({
* Internal dependencies
*/
+
+
+
function CommentsLegacy({
attributes,
setAttributes,
@@ -8776,35 +8931,40 @@ function CommentsLegacy({
const {
textAlign
} = attributes;
- const actions = [(0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- key: "convert",
+ const actions = [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
onClick: () => void setAttributes({
legacy: false
}),
- variant: "primary"
- }, (0,external_wp_i18n_namespaceObject.__)('Switch to editable mode'))];
+ variant: "primary",
+ children: (0,external_wp_i18n_namespaceObject.__)('Switch to editable mode')
+ }, "convert")];
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()({
+ className: dist_clsx({
[`has-text-align-${textAlign}`]: textAlign
})
});
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
- value: textAlign,
- onChange: nextAlign => {
- setAttributes({
- textAlign: nextAlign
- });
- }
- })), (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (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_React_namespaceObject.createElement)(PostCommentsPlaceholder, {
- postId: postId,
- postType: postType
- })));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
+ value: textAlign,
+ onChange: nextAlign => {
+ setAttributes({
+ textAlign: nextAlign
+ });
+ }
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ ...blockProps,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, {
+ actions: actions,
+ children: (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.')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostCommentsPlaceholder, {
+ postId: postId,
+ postType: postType
+ })]
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments/edit/template.js
@@ -8841,7 +9001,6 @@ const TEMPLATE = [['core/comments-title'], ['core/comment-template', {}, [['core
/* harmony default export */ const template = (TEMPLATE);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments/edit/index.js
-
/**
* WordPress dependencies
*/
@@ -8853,6 +9012,9 @@ const TEMPLATE = [['core/comments-title'], ['core/comment-template', {}, [['core
+
+
+
function CommentsEdit(props) {
const {
attributes,
@@ -8867,24 +9029,26 @@ function CommentsEdit(props) {
template: template
});
if (legacy) {
- return (0,external_React_namespaceObject.createElement)(CommentsLegacy, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CommentsLegacy, {
...props
});
}
- return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(CommentsInspectorControls, {
- attributes: attributes,
- setAttributes: setAttributes
- }), (0,external_React_namespaceObject.createElement)(TagName, {
- ...innerBlocksProps
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CommentsInspectorControls, {
+ attributes: attributes,
+ setAttributes: setAttributes
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
+ ...innerBlocksProps
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments/save.js
-
/**
* WordPress dependencies
*/
+
function comments_save_save({
attributes: {
tagName: Tag,
@@ -8896,7 +9060,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_React_namespaceObject.createElement)(Tag, {
+ return legacy ? null : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, {
...innerBlocksProps
});
}
@@ -8983,7 +9147,6 @@ const comments_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comment-author-avatar/edit.js
-
/**
* WordPress dependencies
*/
@@ -8992,6 +9155,9 @@ const comments_init = () => initBlock({
+
+
+
function edit_Edit({
attributes,
context: {
@@ -9024,22 +9190,25 @@ function edit_Edit({
} = getSettings();
return __experimentalDiscussionSettings;
});
- 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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, {
- __nextHasNoMarginBottom: true,
- __next40pxDefaultSize: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Image size'),
- onChange: newWidth => setAttributes({
- width: newWidth,
- height: newWidth
- }),
- min: minSize,
- max: maxSizeBuffer,
- initialPosition: width,
- value: width
- })));
- const resizableAvatar = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ResizableBox, {
+ const inspectorControls = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.RangeControl, {
+ __nextHasNoMarginBottom: true,
+ __next40pxDefaultSize: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Image size'),
+ onChange: newWidth => setAttributes({
+ width: newWidth,
+ height: newWidth
+ }),
+ min: minSize,
+ max: maxSizeBuffer,
+ initialPosition: width,
+ value: width
+ })
+ })
+ });
+ const resizableAvatar = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ResizableBox, {
size: {
width,
height
@@ -9059,15 +9228,19 @@ function edit_Edit({
left: (0,external_wp_i18n_namespaceObject.isRTL)()
},
minWidth: minSize,
- maxWidth: maxSizeBuffer
- }, (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_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, inspectorControls, (0,external_React_namespaceObject.createElement)("div", {
- ...spacingProps
- }, resizableAvatar));
+ maxWidth: maxSizeBuffer,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ src: avatarUrls ? avatarUrls[avatarUrls.length - 1] : avatarURL,
+ alt: `${authorName} ${(0,external_wp_i18n_namespaceObject.__)('Avatar')}`,
+ ...blockProps
+ })
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [inspectorControls, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...spacingProps,
+ children: resizableAvatar
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comment-author-avatar/index.js
@@ -9143,33 +9316,34 @@ const comment_author_avatar_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/comment-author-name.js
-
/**
* WordPress dependencies
*/
-const commentAuthorName = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+
+const commentAuthorName = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(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 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_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_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Circle, {
- cx: "12",
- cy: "9",
- r: "2",
- fillRule: "evenodd",
- clipRule: "evenodd"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Circle, {
+ cx: "12",
+ cy: "9",
+ r: "2",
+ fillRule: "evenodd",
+ clipRule: "evenodd"
+ })]
+});
/* harmony default export */ const comment_author_name = (commentAuthorName);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comment-author-name/edit.js
-
/**
* External dependencies
*/
@@ -9198,6 +9372,9 @@ const commentAuthorName = (0,external_React_namespaceObject.createElement)(exter
*
* @return {JSX.Element} React element.
*/
+
+
+
function comment_author_name_edit_Edit({
attributes: {
isLink,
@@ -9210,7 +9387,7 @@ function comment_author_name_edit_Edit({
setAttributes
}) {
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()({
+ className: dist_clsx({
[`has-text-align-${textAlign}`]: textAlign
})
});
@@ -9228,41 +9405,49 @@ function comment_author_name_edit_Edit({
}
return authorName !== null && authorName !== void 0 ? authorName : '';
}, [commentId]);
- const blockControls = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, {
- group: "block"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
- value: textAlign,
- onChange: newAlign => setAttributes({
- textAlign: newAlign
+ const blockControls = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
+ value: textAlign,
+ onChange: newAlign => setAttributes({
+ textAlign: newAlign
+ })
})
- }));
- 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_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_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'
- })));
+ });
+ const inspectorControls = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Link to authors URL'),
+ onChange: () => setAttributes({
+ isLink: !isLink
+ }),
+ checked: isLink
+ }), isLink && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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'
+ })]
+ })
+ });
if (!commentId || !displayName) {
displayName = (0,external_wp_i18n_namespaceObject._x)('Comment Author', 'block title');
}
- const displayAuthor = isLink ? (0,external_React_namespaceObject.createElement)("a", {
+ const displayAuthor = isLink ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
href: "#comment-author-pseudo-link",
- onClick: event => event.preventDefault()
- }, displayName) : displayName;
- return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, inspectorControls, blockControls, (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, displayAuthor));
+ onClick: event => event.preventDefault(),
+ children: displayName
+ }) : displayName;
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [inspectorControls, blockControls, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: displayAuthor
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comment-author-name/deprecated.js
@@ -9402,23 +9587,23 @@ const comment_author_name_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/comment-content.js
-
/**
* WordPress dependencies
*/
-const commentContent = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const commentContent = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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.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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const comment_content = (commentContent);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comment-content/edit.js
-
/**
* External dependencies
*/
@@ -9445,6 +9630,9 @@ const commentContent = (0,external_React_namespaceObject.createElement)(external
*
* @return {JSX.Element} React element.
*/
+
+
+
function comment_content_edit_Edit({
setAttributes,
attributes: {
@@ -9455,29 +9643,40 @@ function comment_content_edit_Edit({
}
}) {
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()({
+ className: dist_clsx({
[`has-text-align-${textAlign}`]: textAlign
})
});
const [content] = (0,external_wp_coreData_namespaceObject.useEntityProp)('root', 'comment', 'content', commentId);
- const blockControls = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, {
- group: "block"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
- value: textAlign,
- onChange: newAlign => setAttributes({
- textAlign: newAlign
+ const blockControls = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
+ value: textAlign,
+ onChange: newAlign => setAttributes({
+ textAlign: newAlign
+ })
})
- }));
+ });
if (!commentId || !content) {
- return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, blockControls, (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject._x)('Comment Content', 'block title'))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [blockControls, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
+ children: (0,external_wp_i18n_namespaceObject._x)('Comment Content', 'block title')
+ })
+ })]
+ });
}
- return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, blockControls, (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (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))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [blockControls, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, {
+ children: content.rendered
+ }, "html")
+ })
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comment-content/index.js
@@ -9552,25 +9751,26 @@ const comment_content_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/post-date.js
-
/**
* WordPress dependencies
*/
-const postDate = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+
+const postDate = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(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.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_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"
-}));
+ viewBox: "0 0 24 24",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const post_date = (postDate);
;// CONCATENATED MODULE: external ["wp","date"]
const external_wp_date_namespaceObject = window["wp"]["date"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comment-date/edit.js
-
/**
* WordPress dependencies
*/
@@ -9593,6 +9793,9 @@ const external_wp_date_namespaceObject = window["wp"]["date"];
*
* @return {JSX.Element} React element.
*/
+
+
+
function comment_date_edit_Edit({
attributes: {
format,
@@ -9606,37 +9809,47 @@ 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_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_blockEditor_namespaceObject.__experimentalDateFormatPicker, {
- format: format,
- defaultFormat: siteFormat,
- onChange: nextFormat => setAttributes({
- format: nextFormat
+ const inspectorControls = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalDateFormatPicker, {
+ format: format,
+ defaultFormat: siteFormat,
+ onChange: nextFormat => setAttributes({
+ format: nextFormat
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Link to comment'),
+ onChange: () => setAttributes({
+ isLink: !isLink
+ }),
+ checked: isLink
+ })]
})
- }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Link to comment'),
- onChange: () => setAttributes({
- isLink: !isLink
- }),
- checked: isLink
- })));
+ });
if (!commentId || !date) {
date = (0,external_wp_i18n_namespaceObject._x)('Comment Date', 'block title');
}
- 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_React_namespaceObject.createElement)("time", null, date);
+ let commentDate = date instanceof Date ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("time", {
+ dateTime: (0,external_wp_date_namespaceObject.dateI18n)('c', date),
+ children: (0,external_wp_date_namespaceObject.dateI18n)(format || siteFormat, date)
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("time", {
+ children: date
+ });
if (isLink) {
- commentDate = (0,external_React_namespaceObject.createElement)("a", {
+ commentDate = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
href: "#comment-date-pseudo-link",
- onClick: event => event.preventDefault()
- }, commentDate);
+ onClick: event => event.preventDefault(),
+ children: commentDate
+ });
}
- return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, inspectorControls, (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, commentDate));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [inspectorControls, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: commentDate
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comment-date/deprecated.js
@@ -9771,23 +9984,23 @@ const comment_date_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/comment-edit-link.js
-
/**
* WordPress dependencies
*/
-const commentEditLink = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const commentEditLink = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
width: "24",
height: "24",
viewBox: "0 0 24 24",
- xmlns: "http://www.w3.org/2000/svg"
-}, (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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const comment_edit_link = (commentEditLink);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comment-edit-link/edit.js
-
/**
* External dependencies
*/
@@ -9799,6 +10012,9 @@ const commentEditLink = (0,external_React_namespaceObject.createElement)(externa
+
+
+
function comment_edit_link_edit_Edit({
attributes: {
linkTarget,
@@ -9807,34 +10023,42 @@ function comment_edit_link_edit_Edit({
setAttributes
}) {
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()({
+ className: dist_clsx({
[`has-text-align-${textAlign}`]: textAlign
})
});
- const blockControls = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, {
- group: "block"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
- value: textAlign,
- onChange: newAlign => setAttributes({
- textAlign: newAlign
+ const blockControls = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
+ value: textAlign,
+ onChange: newAlign => setAttributes({
+ textAlign: newAlign
+ })
+ })
+ });
+ const inspectorControls = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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'
+ })
})
- }));
- 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_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'
- })));
- return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, blockControls, inspectorControls, (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)("a", {
- href: "#edit-comment-pseudo-link",
- onClick: event => event.preventDefault()
- }, (0,external_wp_i18n_namespaceObject.__)('Edit'))));
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [blockControls, inspectorControls, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: "#edit-comment-pseudo-link",
+ onClick: event => event.preventDefault(),
+ children: (0,external_wp_i18n_namespaceObject.__)('Edit')
+ })
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comment-edit-link/index.js
@@ -9915,23 +10139,23 @@ const comment_edit_link_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/comment-reply-link.js
-
/**
* WordPress dependencies
*/
-const commentReplyLink = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const commentReplyLink = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
width: "24",
height: "24",
viewBox: "0 0 24 24",
- xmlns: "http://www.w3.org/2000/svg"
-}, (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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const comment_reply_link = (commentReplyLink);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comment-reply-link/edit.js
-
/**
* External dependencies
*/
@@ -9953,6 +10177,9 @@ const commentReplyLink = (0,external_React_namespaceObject.createElement)(extern
*
* @return {JSX.Element} React element.
*/
+
+
+
function comment_reply_link_edit_Edit({
setAttributes,
attributes: {
@@ -9960,24 +10187,29 @@ function comment_reply_link_edit_Edit({
}
}) {
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()({
+ className: dist_clsx({
[`has-text-align-${textAlign}`]: textAlign
})
});
- const blockControls = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, {
- group: "block"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
- value: textAlign,
- onChange: newAlign => setAttributes({
- textAlign: newAlign
+ const blockControls = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
+ value: textAlign,
+ onChange: newAlign => setAttributes({
+ textAlign: newAlign
+ })
})
- }));
- return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, blockControls, (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)("a", {
- href: "#comment-reply-pseudo-link",
- onClick: event => event.preventDefault()
- }, (0,external_wp_i18n_namespaceObject.__)('Reply'))));
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [blockControls, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: "#comment-reply-pseudo-link",
+ onClick: event => event.preventDefault(),
+ children: (0,external_wp_i18n_namespaceObject.__)('Reply')
+ })
+ })]
+ });
}
/* harmony default export */ const comment_reply_link_edit = (comment_reply_link_edit_Edit);
@@ -10052,17 +10284,18 @@ const comment_reply_link_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/layout.js
-
/**
* WordPress dependencies
*/
-const layout = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const layout = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_layout = (layout);
;// CONCATENATED MODULE: external ["wp","apiFetch"]
@@ -10223,7 +10456,6 @@ const useCommentTree = topLevelComments => {
};
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comment-template/edit.js
-
/**
* WordPress dependencies
*/
@@ -10238,6 +10470,8 @@ const useCommentTree = topLevelComments => {
* Internal dependencies
*/
+
+
const edit_TEMPLATE = [['core/avatar'], ['core/comment-author-name'], ['core/comment-date'], ['core/comment-content'], ['core/comment-reply-link'], ['core/comment-edit-link']];
/**
@@ -10327,20 +10561,21 @@ function CommentTemplateInnerBlocks({
} = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)({}, {
template: edit_TEMPLATE
});
- return (0,external_React_namespaceObject.createElement)("li", {
- ...innerBlocksProps
- }, 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_React_namespaceObject.createElement)(CommentsList, {
- comments: comment.children,
- activeCommentId: activeCommentId,
- setActiveCommentId: setActiveCommentId,
- blocks: blocks,
- firstCommentId: firstCommentId
- }) : null);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", {
+ ...innerBlocksProps,
+ children: [comment.commentId === (activeCommentId || firstCommentId) ? children : null, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MemoizedCommentTemplatePreview, {
+ blocks: blocks,
+ commentId: comment.commentId,
+ setActiveCommentId: setActiveCommentId,
+ isHidden: comment.commentId === (activeCommentId || firstCommentId)
+ }), comment?.children?.length > 0 ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CommentsList, {
+ comments: comment.children,
+ activeCommentId: activeCommentId,
+ setActiveCommentId: setActiveCommentId,
+ blocks: blocks,
+ firstCommentId: firstCommentId
+ }) : null]
+ });
}
const CommentTemplatePreview = ({
blocks,
@@ -10363,7 +10598,7 @@ const CommentTemplatePreview = ({
const style = {
display: isHidden ? 'none' : undefined
};
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
...blockPreviewProps,
tabIndex: 0,
role: "button",
@@ -10396,31 +10631,32 @@ const CommentsList = ({
setActiveCommentId,
blocks,
firstCommentId
-}) => (0,external_React_namespaceObject.createElement)("ol", {
- ...blockProps
-}, comments && comments.map(({
- commentId,
- ...comment
-}, 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
- // "placeholder" and that the block is most likely being used in the
- // site editor. In this case, we have to set the commentId to `null`
- // because otherwise the (non-existent) comment with a negative ID
- // would be reqested from the REST API.
- commentId: commentId < 0 ? null : commentId
- }
-}, (0,external_React_namespaceObject.createElement)(CommentTemplateInnerBlocks, {
- comment: {
+}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ol", {
+ ...blockProps,
+ children: comments && comments.map(({
commentId,
...comment
- },
- activeCommentId: activeCommentId,
- setActiveCommentId: setActiveCommentId,
- blocks: blocks,
- firstCommentId: firstCommentId
-}))));
+ }, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockContextProvider, {
+ value: {
+ // If the commentId is negative it means that this comment is a
+ // "placeholder" and that the block is most likely being used in the
+ // site editor. In this case, we have to set the commentId to `null`
+ // because otherwise the (non-existent) comment with a negative ID
+ // would be reqested from the REST API.
+ commentId: commentId < 0 ? null : commentId
+ },
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CommentTemplateInnerBlocks, {
+ comment: {
+ commentId,
+ ...comment
+ },
+ activeCommentId: activeCommentId,
+ setActiveCommentId: setActiveCommentId,
+ blocks: blocks,
+ firstCommentId: firstCommentId
+ })
+ }, comment.commentId || index))
+});
function CommentTemplateEdit({
clientId,
context: {
@@ -10466,9 +10702,10 @@ function CommentTemplateEdit({
// Reverse the order of top comments if needed.
commentOrder === 'desc' && topLevelComments ? [...topLevelComments].reverse() : topLevelComments);
if (!topLevelComments) {
- return (0,external_React_namespaceObject.createElement)("p", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {})
+ });
}
if (!postId) {
commentTree = getCommentsPlaceholder({
@@ -10479,11 +10716,12 @@ function CommentTemplateEdit({
});
}
if (!commentTree.length) {
- return (0,external_React_namespaceObject.createElement)("p", {
- ...blockProps
- }, (0,external_wp_i18n_namespaceObject.__)('No results found.'));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
+ ...blockProps,
+ children: (0,external_wp_i18n_namespaceObject.__)('No results found.')
+ });
}
- return (0,external_React_namespaceObject.createElement)(CommentsList, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CommentsList, {
comments: commentTree,
blockProps: blockProps,
blocks: blocks,
@@ -10494,13 +10732,13 @@ function CommentTemplateEdit({
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comment-template/save.js
-
/**
* WordPress dependencies
*/
+
function CommentTemplateSave() {
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comment-template/index.js
@@ -10568,26 +10806,28 @@ const comment_template_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/query-pagination-previous.js
-
/**
* WordPress dependencies
*/
-const queryPaginationPrevious = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const queryPaginationPrevious = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "M16 10.5v3h3v-3h-3zm-5 3h3v-3h-3v3zM7 9l-3 3 3 3 1-1-2-2 2-2-1-1z"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const query_pagination_previous = (queryPaginationPrevious);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments-pagination-previous/edit.js
-
/**
* WordPress dependencies
*/
+
+
const arrowMap = {
none: '',
arrow: '←',
@@ -10603,22 +10843,24 @@ function CommentsPaginationPreviousEdit({
}
}) {
const displayArrow = arrowMap[paginationArrow];
- return (0,external_React_namespaceObject.createElement)("a", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("a", {
href: "#comments-pagination-previous-pseudo-link",
onClick: event => event.preventDefault(),
- ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)()
- }, displayArrow && (0,external_React_namespaceObject.createElement)("span", {
- className: `wp-block-comments-pagination-previous-arrow is-arrow-${paginationArrow}`
- }, 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'),
- placeholder: (0,external_wp_i18n_namespaceObject.__)('Older Comments'),
- value: label,
- onChange: newLabel => setAttributes({
- label: newLabel
- })
- }));
+ ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(),
+ children: [displayArrow && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ className: `wp-block-comments-pagination-previous-arrow is-arrow-${paginationArrow}`,
+ children: displayArrow
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.PlainText, {
+ __experimentalVersion: 2,
+ tagName: "span",
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Older comments page link'),
+ placeholder: (0,external_wp_i18n_namespaceObject.__)('Older Comments'),
+ value: label,
+ onChange: newLabel => setAttributes({
+ label: newLabel
+ })
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments-pagination-previous/index.js
@@ -10690,51 +10932,53 @@ const comments_pagination_previous_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/query-pagination.js
-
/**
* WordPress dependencies
*/
-const queryPagination = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const queryPagination = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "M4 13.5h6v-3H4v3zm8 0h3v-3h-3v3zm5-3v3h3v-3h-3z"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
+ d: "M4 13.5h6v-3H4v3zm8 0h3v-3h-3v3zm5-3v3h3v-3h-3z"
+ })
+});
/* harmony default export */ const query_pagination = (queryPagination);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments-pagination/comments-pagination-arrow-controls.js
-
/**
* WordPress dependencies
*/
+
+
function CommentsPaginationArrowControls({
value,
onChange
}) {
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControl, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(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_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_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_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')
- }));
+ isBlock: true,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
+ value: "none",
+ label: (0,external_wp_i18n_namespaceObject._x)('None', 'Arrow option for Comments Pagination Next/Previous blocks')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
+ value: "arrow",
+ label: (0,external_wp_i18n_namespaceObject._x)('Arrow', 'Arrow option for Comments Pagination Next/Previous blocks')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
+ value: "chevron",
+ label: (0,external_wp_i18n_namespaceObject._x)('Chevron', 'Arrow option for Comments Pagination Next/Previous blocks')
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments-pagination/edit.js
-
/**
* WordPress dependencies
*/
@@ -10747,6 +10991,9 @@ function CommentsPaginationArrowControls({
* Internal dependencies
*/
+
+
+
const comments_pagination_edit_TEMPLATE = [['core/comments-pagination-previous'], ['core/comments-pagination-numbers'], ['core/comments-pagination-next']];
function QueryPaginationEdit({
attributes: {
@@ -10789,30 +11036,37 @@ 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_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_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_React_namespaceObject.createElement)(CommentsPaginationArrowControls, {
- value: paginationArrow,
- onChange: value => {
- setAttributes({
- paginationArrow: value
- });
- }
- }))), (0,external_React_namespaceObject.createElement)("div", {
- ...innerBlocksProps
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, {
+ children: (0,external_wp_i18n_namespaceObject.__)('Comments Pagination block: paging comments is disabled in the Discussion Settings')
+ });
+ }
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [hasNextPreviousBlocks && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CommentsPaginationArrowControls, {
+ value: paginationArrow,
+ onChange: value => {
+ setAttributes({
+ paginationArrow: value
+ });
+ }
+ })
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...innerBlocksProps
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments-pagination/save.js
-
/**
* WordPress dependencies
*/
+
function comments_pagination_save_save() {
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments-pagination/index.js
@@ -10902,26 +11156,28 @@ const comments_pagination_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/query-pagination-next.js
-
/**
* WordPress dependencies
*/
-const queryPaginationNext = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const queryPaginationNext = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "M5 13.5h3v-3H5v3zm5 0h3v-3h-3v3zM17 9l-1 1 2 2-2 2 1 1 3-3-3-3z"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const query_pagination_next = (queryPaginationNext);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments-pagination-next/edit.js
-
/**
* WordPress dependencies
*/
+
+
const edit_arrowMap = {
none: '',
arrow: '→',
@@ -10937,22 +11193,24 @@ function CommentsPaginationNextEdit({
}
}) {
const displayArrow = edit_arrowMap[paginationArrow];
- return (0,external_React_namespaceObject.createElement)("a", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("a", {
href: "#comments-pagination-next-pseudo-link",
onClick: event => event.preventDefault(),
- ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)()
- }, (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'),
- placeholder: (0,external_wp_i18n_namespaceObject.__)('Newer Comments'),
- value: label,
- onChange: newLabel => setAttributes({
- label: newLabel
- })
- }), displayArrow && (0,external_React_namespaceObject.createElement)("span", {
- className: `wp-block-comments-pagination-next-arrow is-arrow-${paginationArrow}`
- }, displayArrow));
+ ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.PlainText, {
+ __experimentalVersion: 2,
+ tagName: "span",
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Newer comments page link'),
+ placeholder: (0,external_wp_i18n_namespaceObject.__)('Newer Comments'),
+ value: label,
+ onChange: newLabel => setAttributes({
+ label: newLabel
+ })
+ }), displayArrow && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ className: `wp-block-comments-pagination-next-arrow is-arrow-${paginationArrow}`,
+ children: displayArrow
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments-pagination-next/index.js
@@ -11024,58 +11282,63 @@ const comments_pagination_next_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/query-pagination-numbers.js
-
/**
* WordPress dependencies
*/
-const queryPaginationNumbers = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const queryPaginationNumbers = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const query_pagination_numbers = (queryPaginationNumbers);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments-pagination-numbers/edit.js
-
/**
* WordPress dependencies
*/
+
+
const PaginationItem = ({
content,
tag: Tag = 'a',
extraClass = ''
-}) => Tag === 'a' ? (0,external_React_namespaceObject.createElement)(Tag, {
+}) => Tag === 'a' ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, {
className: `page-numbers ${extraClass}`,
href: "#comments-pagination-numbers-pseudo-link",
- onClick: event => event.preventDefault()
-}, content) : (0,external_React_namespaceObject.createElement)(Tag, {
- className: `page-numbers ${extraClass}`
-}, content);
+ onClick: event => event.preventDefault(),
+ children: content
+}) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, {
+ className: `page-numbers ${extraClass}`,
+ children: content
+});
function CommentsPaginationNumbersEdit() {
- return (0,external_React_namespaceObject.createElement)("div", {
- ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)()
- }, (0,external_React_namespaceObject.createElement)(PaginationItem, {
- content: "1"
- }), (0,external_React_namespaceObject.createElement)(PaginationItem, {
- content: "2"
- }), (0,external_React_namespaceObject.createElement)(PaginationItem, {
- content: "3",
- tag: "span",
- extraClass: "current"
- }), (0,external_React_namespaceObject.createElement)(PaginationItem, {
- content: "4"
- }), (0,external_React_namespaceObject.createElement)(PaginationItem, {
- content: "5"
- }), (0,external_React_namespaceObject.createElement)(PaginationItem, {
- content: "...",
- tag: "span",
- extraClass: "dots"
- }), (0,external_React_namespaceObject.createElement)(PaginationItem, {
- content: "8"
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PaginationItem, {
+ content: "1"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PaginationItem, {
+ content: "2"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PaginationItem, {
+ content: "3",
+ tag: "span",
+ extraClass: "current"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PaginationItem, {
+ content: "4"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PaginationItem, {
+ content: "5"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PaginationItem, {
+ content: "...",
+ tag: "span",
+ extraClass: "dots"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PaginationItem, {
+ content: "8"
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments-pagination-numbers/index.js
@@ -11142,21 +11405,21 @@ const comments_pagination_numbers_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/title.js
-
/**
* WordPress dependencies
*/
-const title = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const title = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "m4 5.5h2v6.5h1.5v-6.5h2v-1.5h-5.5zm16 10.5h-16v-1.5h16zm-7 4h-9v-1.5h9z"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_title = (title);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments-title/edit.js
-
/**
* External dependencies
*/
@@ -11173,6 +11436,9 @@ const title = (0,external_React_namespaceObject.createElement)(external_wp_primi
+
+
+
function comments_title_edit_Edit({
attributes: {
textAlign,
@@ -11191,7 +11457,7 @@ function comments_title_edit_Edit({
const [rawTitle] = (0,external_wp_coreData_namespaceObject.useEntityProp)('postType', postType, 'title', postId);
const isSiteEditor = typeof postId === 'undefined';
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()({
+ className: dist_clsx({
[`has-text-align-${textAlign}`]: textAlign
})
});
@@ -11233,36 +11499,40 @@ function comments_title_edit_Edit({
setCommentsCount(0);
});
}, [postId]);
- const blockControls = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, {
- group: "block"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
- value: textAlign,
- onChange: newAlign => setAttributes({
- textAlign: newAlign
- })
- }), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.HeadingLevelDropdown, {
- value: level,
- onChange: newLevel => setAttributes({
- level: newLevel
- })
- }));
- 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_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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Show comments count'),
- checked: showCommentsCount,
- onChange: value => setAttributes({
- showCommentsCount: value
+ const blockControls = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
+ value: textAlign,
+ onChange: newAlign => setAttributes({
+ textAlign: newAlign
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.HeadingLevelDropdown, {
+ value: level,
+ onChange: newLevel => setAttributes({
+ level: newLevel
+ })
+ })]
+ });
+ const inspectorControls = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Show post title'),
+ checked: showPostTitle,
+ onChange: value => setAttributes({
+ showPostTitle: value
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Show comments count'),
+ checked: showCommentsCount,
+ onChange: value => setAttributes({
+ showCommentsCount: value
+ })
+ })]
})
- })));
+ });
const postTitle = isSiteEditor ? (0,external_wp_i18n_namespaceObject.__)('“Post Title”') : `"${rawTitle}"`;
let placeholder;
if (showCommentsCount && commentsCount !== undefined) {
@@ -11293,9 +11563,12 @@ function comments_title_edit_Edit({
} else {
placeholder = (0,external_wp_i18n_namespaceObject.__)('Responses');
}
- return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, blockControls, inspectorControls, (0,external_React_namespaceObject.createElement)(TagName, {
- ...blockProps
- }, placeholder));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [blockControls, inspectorControls, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
+ ...blockProps,
+ children: placeholder
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/comments-title/deprecated.js
@@ -11498,17 +11771,18 @@ const comments_title_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/cover.js
-
/**
* WordPress dependencies
*/
-const cover = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const cover = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_cover = (cover);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/shared.js
@@ -11606,12 +11880,13 @@ function getPositionClassName(contentPosition) {
/*
* Only render a className if the contentPosition is not center (the default).
*/
- if (isContentPositionCenter(contentPosition)) return '';
+ if (isContentPositionCenter(contentPosition)) {
+ return '';
+ }
return POSITION_CLASSNAMES[contentPosition];
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/deprecated.js
-
/**
* External dependencies
*/
@@ -11629,6 +11904,8 @@ function getPositionClassName(contentPosition) {
* Internal dependencies
*/
+
+
function backgroundImageStyles(url) {
return url ? {
backgroundImage: `url(${url})`
@@ -11879,67 +12156,68 @@ const v13 = {
focalPoint && isImgElement ? mediaPosition(focalPoint) : undefined;
const backgroundImage = url ? `url(${url})` : undefined;
const backgroundPosition = mediaPosition(focalPoint);
- const classes = classnames_default()({
+ const classes = dist_clsx({
'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, {
+ const imgClasses = dist_clsx('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, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(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'
- })
- }));
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ "aria-hidden": "true",
+ className: dist_clsx('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 ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ className: imgClasses,
+ alt: alt,
+ src: url,
+ style: {
+ objectPosition
+ },
+ "data-object-fit": "cover",
+ "data-object-position": objectPosition
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ role: "img",
+ className: imgClasses,
+ style: {
+ backgroundPosition,
+ backgroundImage
+ }
+ })), isVideoBackground && url && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
+ className: dist_clsx('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
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
+ className: 'wp-block-cover__inner-container'
+ })
+ })]
+ });
}
};
@@ -11997,67 +12275,68 @@ const v12 = {
focalPoint && isImgElement ? mediaPosition(focalPoint) : undefined;
const backgroundImage = url ? `url(${url})` : undefined;
const backgroundPosition = mediaPosition(focalPoint);
- const classes = classnames_default()({
+ const classes = dist_clsx({
'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, {
+ const imgClasses = dist_clsx('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, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(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'
- })
- }));
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ "aria-hidden": "true",
+ className: dist_clsx('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 ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ className: imgClasses,
+ alt: alt,
+ src: url,
+ style: {
+ objectPosition
+ },
+ "data-object-fit": "cover",
+ "data-object-position": objectPosition
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ role: "img",
+ className: imgClasses,
+ style: {
+ backgroundPosition,
+ backgroundImage
+ }
+ })), isVideoBackground && url && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
+ className: dist_clsx('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
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
+ className: 'wp-block-cover__inner-container'
+ })
+ })]
+ });
}
};
@@ -12105,67 +12384,68 @@ const deprecated_v11 = {
focalPoint && isImgElement ? mediaPosition(focalPoint) : undefined;
const backgroundImage = url ? `url(${url})` : undefined;
const backgroundPosition = mediaPosition(focalPoint);
- const classes = classnames_default()({
+ const classes = dist_clsx({
'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, {
+ const imgClasses = dist_clsx('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)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
...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'
- })
- }));
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ "aria-hidden": "true",
+ className: dist_clsx('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 ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ className: imgClasses,
+ alt: alt,
+ src: url,
+ style: {
+ objectPosition
+ },
+ "data-object-fit": "cover",
+ "data-object-position": objectPosition
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ role: "img",
+ className: imgClasses,
+ style: {
+ backgroundPosition,
+ backgroundImage
+ }
+ })), isVideoBackground && url && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
+ className: dist_clsx('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
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
+ className: 'wp-block-cover__inner-container'
+ })
+ })]
+ });
},
migrate: migrateTag
};
@@ -12213,56 +12493,57 @@ const deprecated_v10 = {
const objectPosition =
// prettier-ignore
focalPoint && isImgElement ? `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%` : undefined;
- const classes = classnames_default()({
+ const classes = dist_clsx({
'is-light': !isDark,
'has-parallax': hasParallax,
'is-repeated': isRepeated,
'has-custom-content-position': !isContentPositionCenter(contentPosition)
}, getPositionClassName(contentPosition));
const gradientValue = gradient || customGradient;
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
...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 && 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,
- style: {
- objectPosition
- },
- "data-object-fit": "cover",
- "data-object-position": objectPosition
- }), 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'
- })
- }));
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ "aria-hidden": "true",
+ className: dist_clsx('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 && isImgElement && url && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ className: dist_clsx('wp-block-cover__image-background', id ? `wp-image-${id}` : null),
+ alt: alt,
+ src: url,
+ style: {
+ objectPosition
+ },
+ "data-object-fit": "cover",
+ "data-object-position": objectPosition
+ }), isVideoBackground && url && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
+ className: dist_clsx('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
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
+ className: 'wp-block-cover__inner-container'
+ })
+ })]
+ });
},
migrate: migrateTag
};
@@ -12309,56 +12590,57 @@ const v9 = {
const objectPosition =
// prettier-ignore
focalPoint && isImgElement ? `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%` : undefined;
- const classes = classnames_default()({
+ const classes = dist_clsx({
'is-light': !isDark,
'has-parallax': hasParallax,
'is-repeated': isRepeated,
'has-custom-content-position': !isContentPositionCenter(contentPosition)
}, getPositionClassName(contentPosition));
const gradientValue = gradient || customGradient;
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
...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
- }), 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,
- style: {
- objectPosition
- },
- "data-object-fit": "cover",
- "data-object-position": objectPosition
- }), 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'
- })
- }));
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ "aria-hidden": "true",
+ className: dist_clsx('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
+ }), isImageBackground && isImgElement && url && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ className: dist_clsx('wp-block-cover__image-background', id ? `wp-image-${id}` : null),
+ alt: alt,
+ src: url,
+ style: {
+ objectPosition
+ },
+ "data-object-fit": "cover",
+ "data-object-position": objectPosition
+ }), isVideoBackground && url && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
+ className: dist_clsx('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
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
+ className: 'wp-block-cover__inner-container'
+ })
+ })]
+ });
},
migrate: migrateTag
};
@@ -12405,51 +12687,52 @@ const v8 = {
const objectPosition =
// prettier-ignore
focalPoint && isImgElement ? `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%` : undefined;
- const classes = classnames_default()({
+ const classes = dist_clsx({
'is-light': !isDark,
'has-parallax': hasParallax,
'is-repeated': isRepeated,
'has-custom-content-position': !isContentPositionCenter(contentPosition)
}, getPositionClassName(contentPosition));
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className: classes,
style
- })
- }, (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,
- 'has-background-gradient': gradient || customGradient,
- [gradientClass]: !url && gradientClass
}),
- style: bgStyle
- }), 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,
- style: {
- objectPosition
- },
- "data-object-fit": "cover",
- "data-object-position": objectPosition
- }), 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'
- })
- }));
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ "aria-hidden": "true",
+ className: dist_clsx(overlayColorClass, dimRatioToClass(dimRatio), 'wp-block-cover__gradient-background', gradientClass, {
+ 'has-background-dim': dimRatio !== undefined,
+ 'has-background-gradient': gradient || customGradient,
+ [gradientClass]: !url && gradientClass
+ }),
+ style: bgStyle
+ }), isImageBackground && isImgElement && url && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ className: dist_clsx('wp-block-cover__image-background', id ? `wp-image-${id}` : null),
+ alt: alt,
+ src: url,
+ style: {
+ objectPosition
+ },
+ "data-object-fit": "cover",
+ "data-object-position": objectPosition
+ }), isVideoBackground && url && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
+ className: dist_clsx('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
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
+ className: 'wp-block-cover__inner-container'
+ })
+ })]
+ });
},
migrate: migrateTag
};
@@ -12519,7 +12802,7 @@ const v7 = {
const objectPosition =
// prettier-ignore
focalPoint && isImgElement ? `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%` : undefined;
- const classes = classnames_default()(dimRatioToClassV1(dimRatio), overlayColorClass, {
+ const classes = dist_clsx(dimRatioToClassV1(dimRatio), overlayColorClass, {
'has-background-dim': dimRatio !== 0,
'has-parallax': hasParallax,
'is-repeated': isRepeated,
@@ -12527,41 +12810,43 @@ const v7 = {
[gradientClass]: !url && gradientClass,
'has-custom-content-position': !isContentPositionCenter(contentPosition)
}, getPositionClassName(contentPosition));
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className: classes,
style
- })
- }, 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_React_namespaceObject.createElement)("img", {
- className: classnames_default()('wp-block-cover__image-background', id ? `wp-image-${id}` : null),
- alt: alt,
- src: url,
- style: {
- objectPosition
- },
- "data-object-fit": "cover",
- "data-object-position": objectPosition
- }), 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", {
- className: "wp-block-cover__inner-container"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)));
+ }),
+ children: [url && (gradient || customGradient) && dimRatio !== 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ "aria-hidden": "true",
+ className: dist_clsx('wp-block-cover__gradient-background', gradientClass),
+ style: customGradient ? {
+ background: customGradient
+ } : undefined
+ }), isImageBackground && isImgElement && url && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ className: dist_clsx('wp-block-cover__image-background', id ? `wp-image-${id}` : null),
+ alt: alt,
+ src: url,
+ style: {
+ objectPosition
+ },
+ "data-object-fit": "cover",
+ "data-object-position": objectPosition
+ }), isVideoBackground && url && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
+ className: dist_clsx('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
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-cover__inner-container",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
+ })]
+ });
},
migrate: (0,external_wp_compose_namespaceObject.compose)(migrateDimRatio, migrateTag)
};
@@ -12633,7 +12918,7 @@ const v6 = {
videoStyle.objectPosition = positionValue;
}
}
- const classes = classnames_default()(dimRatioToClassV1(dimRatio), overlayColorClass, {
+ const classes = dist_clsx(dimRatioToClassV1(dimRatio), overlayColorClass, {
'has-background-dim': dimRatio !== 0,
'has-parallax': hasParallax,
'is-repeated': isRepeated,
@@ -12641,28 +12926,30 @@ const v6 = {
[gradientClass]: !url && gradientClass,
'has-custom-content-position': !isContentPositionCenter(contentPosition)
}, getPositionClassName(contentPosition));
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className: classes,
style
- })
- }, 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_React_namespaceObject.createElement)("video", {
- className: "wp-block-cover__video-background",
- autoPlay: true,
- muted: true,
- loop: true,
- playsInline: true,
- src: url,
- style: videoStyle
- }), (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-cover__inner-container"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)));
+ }),
+ children: [url && (gradient || customGradient) && dimRatio !== 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ "aria-hidden": "true",
+ className: dist_clsx('wp-block-cover__gradient-background', gradientClass),
+ style: customGradient ? {
+ background: customGradient
+ } : undefined
+ }), isVideoBackground && url && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
+ className: "wp-block-cover__video-background",
+ autoPlay: true,
+ muted: true,
+ loop: true,
+ playsInline: true,
+ src: url,
+ style: videoStyle
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-cover__inner-container",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
+ })]
+ });
},
migrate: (0,external_wp_compose_namespaceObject.compose)(migrateDimRatio, migrateTag)
};
@@ -12710,30 +12997,32 @@ const v5 = {
style.background = customGradient;
}
style.minHeight = minHeight || undefined;
- const classes = classnames_default()(dimRatioToClassV1(dimRatio), overlayColorClass, {
+ const classes = dist_clsx(dimRatioToClassV1(dimRatio), overlayColorClass, {
'has-background-dim': dimRatio !== 0,
'has-parallax': hasParallax,
'has-background-gradient': customGradient,
[gradientClass]: !url && gradientClass
});
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: classes,
- style: style
- }, 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_React_namespaceObject.createElement)("video", {
- className: "wp-block-cover__video-background",
- autoPlay: true,
- muted: true,
- loop: true,
- src: url
- }), (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-cover__inner-container"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)));
+ style: style,
+ children: [url && (gradient || customGradient) && dimRatio !== 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ "aria-hidden": "true",
+ className: dist_clsx('wp-block-cover__gradient-background', gradientClass),
+ style: customGradient ? {
+ background: customGradient
+ } : undefined
+ }), VIDEO_BACKGROUND_TYPE === backgroundType && url && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
+ className: "wp-block-cover__video-background",
+ autoPlay: true,
+ muted: true,
+ loop: true,
+ src: url
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-cover__inner-container",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
+ })]
+ });
},
migrate: (0,external_wp_compose_namespaceObject.compose)(migrateDimRatio, migrateTag)
};
@@ -12781,30 +13070,32 @@ const v4 = {
style.background = customGradient;
}
style.minHeight = minHeight || undefined;
- const classes = classnames_default()(dimRatioToClassV1(dimRatio), overlayColorClass, {
+ const classes = dist_clsx(dimRatioToClassV1(dimRatio), overlayColorClass, {
'has-background-dim': dimRatio !== 0,
'has-parallax': hasParallax,
'has-background-gradient': customGradient,
[gradientClass]: !url && gradientClass
});
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: classes,
- style: style
- }, 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_React_namespaceObject.createElement)("video", {
- className: "wp-block-cover__video-background",
- autoPlay: true,
- muted: true,
- loop: true,
- src: url
- }), (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-cover__inner-container"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)));
+ style: style,
+ children: [url && (gradient || customGradient) && dimRatio !== 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ "aria-hidden": "true",
+ className: dist_clsx('wp-block-cover__gradient-background', gradientClass),
+ style: customGradient ? {
+ background: customGradient
+ } : undefined
+ }), VIDEO_BACKGROUND_TYPE === backgroundType && url && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
+ className: "wp-block-cover__video-background",
+ autoPlay: true,
+ muted: true,
+ loop: true,
+ src: url
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-cover__inner-container",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
+ })]
+ });
},
migrate: (0,external_wp_compose_namespaceObject.compose)(migrateDimRatio, migrateTag)
};
@@ -12846,25 +13137,26 @@ const v3 = {
if (focalPoint && !hasParallax) {
style.backgroundPosition = `${focalPoint.x * 100}% ${focalPoint.y * 100}%`;
}
- const classes = classnames_default()(dimRatioToClassV1(dimRatio), overlayColorClass, {
+ const classes = dist_clsx(dimRatioToClassV1(dimRatio), overlayColorClass, {
'has-background-dim': dimRatio !== 0,
'has-parallax': hasParallax,
[`has-${contentAlign}-content`]: contentAlign !== 'center'
});
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: classes,
- style: style
- }, 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "p",
- className: "wp-block-cover-text",
- value: title
- }));
+ style: style,
+ children: [VIDEO_BACKGROUND_TYPE === backgroundType && url && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
+ className: "wp-block-cover__video-background",
+ autoPlay: true,
+ muted: true,
+ loop: true,
+ src: url
+ }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(title) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "p",
+ className: "wp-block-cover-text",
+ value: title
+ })]
+ });
},
migrate(attributes) {
const newAttribs = {
@@ -12922,19 +13214,20 @@ const v2 = {
if (!overlayColorClass) {
style.backgroundColor = customOverlayColor;
}
- const classes = classnames_default()('wp-block-cover-image', dimRatioToClassV1(dimRatio), overlayColorClass, {
+ const classes = dist_clsx('wp-block-cover-image', dimRatioToClassV1(dimRatio), overlayColorClass, {
'has-background-dim': dimRatio !== 0,
'has-parallax': hasParallax,
[`has-${contentAlign}-content`]: contentAlign !== 'center'
}, align ? `align${align}` : null);
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
className: classes,
- style: style
- }, !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
- }));
+ style: style,
+ children: !external_wp_blockEditor_namespaceObject.RichText.isEmpty(title) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "p",
+ className: "wp-block-cover-image-text",
+ value: title
+ })
+ });
},
migrate(attributes) {
const newAttribs = {
@@ -12986,17 +13279,18 @@ const cover_deprecated_v1 = {
align
} = attributes;
const style = backgroundImageStyles(url);
- const classes = classnames_default()('wp-block-cover-image', dimRatioToClassV1(dimRatio), {
+ const classes = dist_clsx('wp-block-cover-image', dimRatioToClassV1(dimRatio), {
'has-background-dim': dimRatio !== 0,
'has-parallax': hasParallax
}, align ? `align${align}` : null);
- return (0,external_React_namespaceObject.createElement)("section", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("section", {
className: classes,
- style: style
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "h2",
- value: title
- }));
+ style: style,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "h2",
+ value: title
+ })
+ });
},
migrate(attributes) {
const newAttribs = {
@@ -13021,7 +13315,6 @@ const cover_deprecated_v1 = {
/* 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
-
/**
* WordPress dependencies
*/
@@ -13036,6 +13329,9 @@ const cover_deprecated_v1 = {
*/
+
+
+
const {
cleanEmptyObject: inspector_controls_cleanEmptyObject
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
@@ -13072,14 +13368,14 @@ function CoverHeightInput({
return [parsedQuantity, unit].join('');
}, [unit, value]);
const min = isPx ? COVER_MIN_HEIGHT : 0;
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalUnitControl, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalUnitControl, {
label: (0,external_wp_i18n_namespaceObject.__)('Minimum height of cover'),
id: inputId,
isResetValueOnUnitChange: true,
min: min,
onChange: handleOnChange,
onUnitChange: onUnitChange,
- __unstableInputWidth: '80px',
+ __unstableInputWidth: "80px",
units: units,
value: computedValue
});
@@ -13143,156 +13439,175 @@ 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_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_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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.FocalPointPicker, {
- __nextHasNoMarginBottom: true,
- __next40pxDefaultSize: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Focal point'),
- url: url,
- value: focalPoint,
- onDragStart: imperativeFocalPointPreview,
- onDrag: imperativeFocalPointPreview,
- onChange: newFocalPoint => setAttributes({
- focalPoint: newFocalPoint
- })
- }), !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_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.'))
- }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelRow, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- variant: "secondary",
- size: "small",
- className: "block-library-cover__reset-button",
- onClick: onClearMedia
- }, (0,external_wp_i18n_namespaceObject.__)('Clear Media'))))), colorGradientSettings.hasColorsOrGradients && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, {
- group: "color"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown, {
- __experimentalIsRenderedInSidebar: true,
- settings: [{
- colorValue: overlayColor.color,
- gradientValue,
- label: (0,external_wp_i18n_namespaceObject.__)('Overlay'),
- onColorChange: setOverlayColor,
- onGradientChange: setGradient,
- isShownByDefault: true,
- resetAllFilter: () => ({
- overlayColor: undefined,
- customOverlayColor: undefined,
- gradient: undefined,
- customGradient: undefined
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: !!url && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [isImageBackground && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Fixed background'),
+ checked: hasParallax,
+ onChange: toggleParallax
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Repeated background'),
+ checked: isRepeated,
+ onChange: toggleIsRepeated
+ })]
+ }), showFocalPointPicker && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FocalPointPicker, {
+ __nextHasNoMarginBottom: true,
+ __next40pxDefaultSize: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Focal point'),
+ url: url,
+ value: focalPoint,
+ onDragStart: imperativeFocalPointPreview,
+ onDrag: imperativeFocalPointPreview,
+ onChange: newFocalPoint => setAttributes({
+ focalPoint: newFocalPoint
+ })
+ }), !useFeaturedImage && url && !isVideoBackground && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextareaControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Alternative text'),
+ value: alt,
+ onChange: newAlt => setAttributes({
+ alt: newAlt
+ }),
+ help: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, {
+ href:
+ // translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
+ (0,external_wp_i18n_namespaceObject.__)('https://www.w3.org/WAI/tutorials/images/decision-tree/'),
+ children: (0,external_wp_i18n_namespaceObject.__)('Describe the purpose of the image.')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}), (0,external_wp_i18n_namespaceObject.__)('Leave empty if decorative.')]
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelRow, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ variant: "secondary",
+ size: "small",
+ className: "block-library-cover__reset-button",
+ onClick: onClearMedia,
+ children: (0,external_wp_i18n_namespaceObject.__)('Clear Media')
+ })
+ })]
})
- }],
- panelId: clientId,
- ...colorGradientSettings
- }), (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.
- return dimRatio === undefined ? false : dimRatio !== (url ? 50 : 100);
- },
- label: (0,external_wp_i18n_namespaceObject.__)('Overlay opacity'),
- onDeselect: () => updateDimRatio(url ? 50 : 100),
- resetAllFilter: () => ({
- dimRatio: url ? 50 : 100
- }),
- isShownByDefault: true,
- panelId: clientId
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Overlay opacity'),
- value: dimRatio,
- onChange: newDimRatio => updateDimRatio(newDimRatio),
- min: 0,
- max: 100,
- step: 10,
- required: true,
- __next40pxDefaultSize: true
- }))), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, {
- group: "dimensions"
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
- hasValue: () => !!minHeight,
- label: (0,external_wp_i18n_namespaceObject.__)('Minimum height'),
- onDeselect: () => setAttributes({
- minHeight: undefined,
- minHeightUnit: undefined
- }),
- resetAllFilter: () => ({
- minHeight: undefined,
- minHeightUnit: undefined
- }),
- isShownByDefault: true,
- panelId: clientId
- }, (0,external_React_namespaceObject.createElement)(CoverHeightInput, {
- value: attributes?.style?.dimensions?.aspectRatio ? '' : minHeight,
- unit: minHeightUnit,
- onChange: newMinHeight => setAttributes({
- minHeight: newMinHeight,
- style: inspector_controls_cleanEmptyObject({
- ...attributes?.style,
- dimensions: {
- ...attributes?.style?.dimensions,
- aspectRatio: undefined // Reset aspect ratio when minHeight is set.
- }
+ }), colorGradientSettings.hasColorsOrGradients && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ group: "color",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown, {
+ __experimentalIsRenderedInSidebar: true,
+ settings: [{
+ colorValue: overlayColor.color,
+ gradientValue,
+ label: (0,external_wp_i18n_namespaceObject.__)('Overlay'),
+ onColorChange: setOverlayColor,
+ onGradientChange: setGradient,
+ isShownByDefault: true,
+ resetAllFilter: () => ({
+ overlayColor: undefined,
+ customOverlayColor: undefined,
+ gradient: undefined,
+ customGradient: undefined
+ })
+ }],
+ panelId: clientId,
+ ...colorGradientSettings
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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.
+ return dimRatio === undefined ? false : dimRatio !== (url ? 50 : 100);
+ },
+ label: (0,external_wp_i18n_namespaceObject.__)('Overlay opacity'),
+ onDeselect: () => updateDimRatio(url ? 50 : 100),
+ resetAllFilter: () => ({
+ dimRatio: url ? 50 : 100
+ }),
+ isShownByDefault: true,
+ panelId: clientId,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.RangeControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Overlay opacity'),
+ value: dimRatio,
+ onChange: newDimRatio => updateDimRatio(newDimRatio),
+ min: 0,
+ max: 100,
+ step: 10,
+ required: true,
+ __next40pxDefaultSize: true
+ })
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ group: "dimensions",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
+ hasValue: () => !!minHeight,
+ label: (0,external_wp_i18n_namespaceObject.__)('Minimum height'),
+ onDeselect: () => setAttributes({
+ minHeight: undefined,
+ minHeightUnit: undefined
+ }),
+ resetAllFilter: () => ({
+ minHeight: undefined,
+ minHeightUnit: undefined
+ }),
+ isShownByDefault: true,
+ panelId: clientId,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CoverHeightInput, {
+ value: attributes?.style?.dimensions?.aspectRatio ? '' : minHeight,
+ unit: minHeightUnit,
+ onChange: newMinHeight => setAttributes({
+ 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
+ })
+ })
})
- }),
- onUnitChange: nextUnit => setAttributes({
- minHeightUnit: nextUnit
- })
- }))), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, {
- group: "advanced"
- }, (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>)'),
- value: 'div'
- }, {
- label: '<header>',
- value: 'header'
- }, {
- label: '<main>',
- value: 'main'
- }, {
- label: '<section>',
- value: 'section'
- }, {
- label: '<article>',
- value: 'article'
- }, {
- label: '<aside>',
- value: 'aside'
- }, {
- label: '<footer>',
- value: 'footer'
- }],
- value: tagName,
- onChange: value => setAttributes({
- tagName: value
- }),
- help: htmlElementMessages[tagName]
- })));
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ group: "advanced",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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>)'),
+ value: 'div'
+ }, {
+ label: '<header>',
+ value: 'header'
+ }, {
+ label: '<main>',
+ value: 'main'
+ }, {
+ label: '<section>',
+ value: 'section'
+ }, {
+ label: '<article>',
+ value: 'article'
+ }, {
+ label: '<aside>',
+ value: 'aside'
+ }, {
+ label: '<footer>',
+ value: 'footer'
+ }],
+ value: tagName,
+ onChange: value => setAttributes({
+ tagName: value
+ }),
+ help: htmlElementMessages[tagName]
+ })
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/edit/block-controls.js
-
/**
* WordPress dependencies
*/
@@ -13305,6 +13620,9 @@ function CoverInspectorControls({
*/
+
+
+
const {
cleanEmptyObject: block_controls_cleanEmptyObject
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
@@ -13361,35 +13679,38 @@ function CoverBlockControls({
})
});
};
- 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_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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalBlockFullHeightAligmentControl, {
- isActive: isMinFullHeight,
- onToggle: toggleMinFullHeight,
- isDisabled: !hasInnerBlocks
- })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, {
- group: "other"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, {
- mediaId: id,
- mediaURL: url,
- allowedTypes: shared_ALLOWED_MEDIA_TYPES,
- accept: "image/*,video/*",
- onSelect: onSelectMedia,
- onToggleFeaturedImage: toggleUseFeaturedImage,
- useFeaturedImage: useFeaturedImage,
- name: !url ? (0,external_wp_i18n_namespaceObject.__)('Add Media') : (0,external_wp_i18n_namespaceObject.__)('Replace')
- })));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalBlockAlignmentMatrixControl, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Change content position'),
+ value: contentPosition,
+ onChange: nextPosition => setAttributes({
+ contentPosition: nextPosition
+ }),
+ isDisabled: !hasInnerBlocks
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalBlockFullHeightAligmentControl, {
+ isActive: isMinFullHeight,
+ onToggle: toggleMinFullHeight,
+ isDisabled: !hasInnerBlocks
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "other",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, {
+ mediaId: id,
+ mediaURL: url,
+ allowedTypes: shared_ALLOWED_MEDIA_TYPES,
+ accept: "image/*,video/*",
+ onSelect: onSelectMedia,
+ onToggleFeaturedImage: toggleUseFeaturedImage,
+ useFeaturedImage: useFeaturedImage,
+ name: !url ? (0,external_wp_i18n_namespaceObject.__)('Add Media') : (0,external_wp_i18n_namespaceObject.__)('Replace')
+ })
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/edit/cover-placeholder.js
-
/**
* WordPress dependencies
*/
@@ -13401,6 +13722,7 @@ function CoverBlockControls({
* Internal dependencies
*/
+
function CoverPlaceholder({
disableMediaButtons = false,
children,
@@ -13409,8 +13731,8 @@ function CoverPlaceholder({
style,
toggleUseFeaturedImage
}) {
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, {
- icon: (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, {
+ icon: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, {
icon: library_cover
}),
labels: {
@@ -13423,12 +13745,12 @@ function CoverPlaceholder({
disableMediaButtons: disableMediaButtons,
onToggleFeaturedImage: toggleUseFeaturedImage,
onError: onError,
- style: style
- }, children);
+ style: style,
+ children: children
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/edit/resizable-cover-popover.js
-
/**
* External dependencies
*/
@@ -13444,6 +13766,7 @@ function CoverPlaceholder({
* Internal dependencies
*/
+
const RESIZABLE_BOX_ENABLE_OPTION = {
top: false,
right: false,
@@ -13470,13 +13793,8 @@ function ResizableCoverPopover({
...props
}) {
const [isResizing, setIsResizing] = (0,external_wp_element_namespaceObject.useState)(false);
- const dimensions = (0,external_wp_element_namespaceObject.useMemo)(() => ({
- height,
- minHeight,
- width
- }), [minHeight, height, width]);
const resizableBoxProps = {
- className: classnames_default()(className, {
+ className: dist_clsx(className, {
'is-resizing': isResizing
}),
enable: RESIZABLE_BOX_ENABLE_OPTION,
@@ -13503,16 +13821,15 @@ function ResizableCoverPopover({
isVisible: isResizing
}
};
- return (0,external_React_namespaceObject.createElement)(ResizableBoxPopover, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ResizableBoxPopover, {
className: "block-library-cover__resizable-box-popover",
- __unstableRefreshSize: dimensions,
resizableBoxProps: resizableBoxProps,
...props
});
}
;// 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()})};
+var colord_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)*(colord_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"])}
@@ -14154,7 +14471,6 @@ function compositeIsDark(dimRatio, overlayColor, backgroundColor) {
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/edit/index.js
-
/**
* External dependencies
*/
@@ -14182,6 +14498,9 @@ function compositeIsDark(dimRatio, overlayColor, backgroundColor) {
+
+
+
function getInnerBlocksTemplate(attributes) {
return [['core/paragraph', {
align: 'center',
@@ -14439,14 +14758,14 @@ function CoverEdit({
isDark: newIsDark
});
};
- const blockControls = (0,external_React_namespaceObject.createElement)(CoverBlockControls, {
+ const blockControls = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CoverBlockControls, {
attributes: attributes,
setAttributes: setAttributes,
onSelectMedia: onSelectMedia,
currentSettings: currentSettings,
toggleUseFeaturedImage: toggleUseFeaturedImage
});
- const inspectorControls = (0,external_React_namespaceObject.createElement)(CoverInspectorControls, {
+ const inspectorControls = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CoverInspectorControls, {
attributes: attributes,
setAttributes: setAttributes,
clientId: clientId,
@@ -14485,29 +14804,34 @@ function CoverEdit({
width
};
if (!useFeaturedImage && !hasInnerBlocks && !hasBackground) {
- return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, blockControls, inspectorControls, isSelected && (0,external_React_namespaceObject.createElement)(ResizableCoverPopover, {
- ...resizableCoverProps
- }), (0,external_React_namespaceObject.createElement)(TagName, {
- ...blockProps,
- className: classnames_default()('is-placeholder', blockProps.className),
- style: {
- ...blockProps.style,
- minHeight: minHeightWithUnit || undefined
- }
- }, resizeListener, (0,external_React_namespaceObject.createElement)(CoverPlaceholder, {
- onSelectMedia: onSelectMedia,
- onError: onUploadError,
- toggleUseFeaturedImage: toggleUseFeaturedImage
- }, (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-cover__placeholder-background-options"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.ColorPalette, {
- disableCustomColors: true,
- value: overlayColor.color,
- onChange: onSetOverlayColor,
- clearable: false
- })))));
- }
- const classes = classnames_default()({
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [blockControls, inspectorControls, isSelected && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ResizableCoverPopover, {
+ ...resizableCoverProps
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(TagName, {
+ ...blockProps,
+ className: dist_clsx('is-placeholder', blockProps.className),
+ style: {
+ ...blockProps.style,
+ minHeight: minHeightWithUnit || undefined
+ },
+ children: [resizeListener, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CoverPlaceholder, {
+ onSelectMedia: onSelectMedia,
+ onError: onUploadError,
+ toggleUseFeaturedImage: toggleUseFeaturedImage,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-cover__placeholder-background-options",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.ColorPalette, {
+ disableCustomColors: true,
+ value: overlayColor.color,
+ onChange: onSetOverlayColor,
+ clearable: false
+ })
+ })
+ })]
+ })]
+ });
+ }
+ const classes = dist_clsx({
'is-dark-theme': isDark,
'is-light': !isDark,
'is-transient': isUploadingMedia,
@@ -14515,73 +14839,76 @@ function CoverEdit({
'is-repeated': isRepeated,
'has-custom-content-position': !isContentPositionCenter(contentPosition)
}, getPositionClassName(contentPosition));
- 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: {
- ...style,
- ...blockProps.style
- },
- "data-url": url
- }, 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,
- '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: {
- backgroundImage: gradientValue,
- ...bgStyle
- }
- }), !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_React_namespaceObject.createElement)("img", {
- ref: mediaElement,
- className: "wp-block-cover__image-background",
- alt: alt,
- src: url,
- style: mediaStyle
- }) : (0,external_React_namespaceObject.createElement)("div", {
- ref: mediaElement,
- 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_React_namespaceObject.createElement)("video", {
- ref: mediaElement,
- className: "wp-block-cover__video-background",
- autoPlay: true,
- muted: true,
- loop: true,
- src: url,
- style: mediaStyle
- }), 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_React_namespaceObject.createElement)("div", {
- ...innerBlocksProps
- })), isSelected && (0,external_React_namespaceObject.createElement)(ResizableCoverPopover, {
- ...resizableCoverProps
- }));
+ const showOverlay = url || !useFeaturedImage || useFeaturedImage && !url;
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [blockControls, inspectorControls, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(TagName, {
+ ...blockProps,
+ className: dist_clsx(classes, blockProps.className),
+ style: {
+ ...style,
+ ...blockProps.style
+ },
+ "data-url": url,
+ children: [resizeListener, showOverlay && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ "aria-hidden": "true",
+ className: dist_clsx('wp-block-cover__background', dimRatioToClass(dimRatio), {
+ [overlayColor.class]: overlayColor.class,
+ '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: {
+ backgroundImage: gradientValue,
+ ...bgStyle
+ }
+ }), !url && useFeaturedImage && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, {
+ className: "wp-block-cover__image--placeholder-image",
+ withIllustration: true
+ }), url && isImageBackground && (isImgElement ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ ref: mediaElement,
+ className: "wp-block-cover__image-background",
+ alt: alt,
+ src: url,
+ style: mediaStyle
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ref: mediaElement,
+ role: alt ? 'img' : undefined,
+ "aria-label": alt ? alt : undefined,
+ className: dist_clsx(classes, 'wp-block-cover__image-background'),
+ style: {
+ backgroundImage,
+ backgroundPosition
+ }
+ })), url && isVideoBackground && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
+ ref: mediaElement,
+ className: "wp-block-cover__video-background",
+ autoPlay: true,
+ muted: true,
+ loop: true,
+ src: url,
+ style: mediaStyle
+ }), isUploadingMedia && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CoverPlaceholder, {
+ disableMediaButtons: true,
+ onSelectMedia: onSelectMedia,
+ onError: onUploadError,
+ toggleUseFeaturedImage: toggleUseFeaturedImage
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...innerBlocksProps
+ })]
+ }), isSelected && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ResizableCoverPopover, {
+ ...resizableCoverProps
+ })]
+ });
}
/* harmony default export */ const cover_edit = ((0,external_wp_compose_namespaceObject.compose)([(0,external_wp_blockEditor_namespaceObject.withColors)({
overlayColor: 'background-color'
})])(CoverEdit));
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/save.js
-
/**
* External dependencies
*/
@@ -14596,6 +14923,8 @@ function CoverEdit({
* Internal dependencies
*/
+
+
function cover_save_save({
attributes
}) {
@@ -14637,68 +14966,69 @@ function cover_save_save({
focalPoint && isImgElement ? mediaPosition(focalPoint) : undefined;
const backgroundImage = url ? `url(${url})` : undefined;
const backgroundPosition = mediaPosition(focalPoint);
- const classes = classnames_default()({
+ const classes = dist_clsx({
'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, {
+ const imgClasses = dist_clsx('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, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(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: alt ? 'img' : undefined,
- "aria-label": alt ? alt : undefined,
- 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'
- })
- }));
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ "aria-hidden": "true",
+ className: dist_clsx('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 ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ className: imgClasses,
+ alt: alt,
+ src: url,
+ style: {
+ objectPosition
+ },
+ "data-object-fit": "cover",
+ "data-object-position": objectPosition
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ role: alt ? 'img' : undefined,
+ "aria-label": alt ? alt : undefined,
+ className: imgClasses,
+ style: {
+ backgroundPosition,
+ backgroundImage
+ }
+ })), isVideoBackground && url && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
+ className: dist_clsx('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
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
+ className: 'wp-block-cover__inner-container'
+ })
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/transforms.js
@@ -15071,6 +15401,7 @@ const cover_metadata = {
anchor: true,
align: true,
html: false,
+ shadow: true,
spacing: {
padding: true,
margin: ["top", "bottom"],
@@ -15170,25 +15501,26 @@ const cover_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/details.js
-
/**
* WordPress dependencies
*/
-const details = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+
+const details = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(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: "M4 16h10v1.5H4V16Zm0-4.5h16V13H4v-1.5ZM10 7h10v1.5H10V7Z",
- fillRule: "evenodd",
- clipRule: "evenodd"
-}), (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
- d: "m4 5.25 4 2.5-4 2.5v-5Z"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
+ d: "M4 16h10v1.5H4V16Zm0-4.5h16V13H4v-1.5ZM10 7h10v1.5H10V7Z",
+ fillRule: "evenodd",
+ clipRule: "evenodd"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
+ d: "m4 5.25 4 2.5-4 2.5v-5Z"
+ })]
+});
/* harmony default export */ const library_details = (details);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/details/edit.js
-
/**
* WordPress dependencies
*/
@@ -15196,6 +15528,9 @@ const details = (0,external_React_namespaceObject.createElement)(external_wp_pri
+
+
+
const details_edit_TEMPLATE = [['core/paragraph', {
placeholder: (0,external_wp_i18n_namespaceObject.__)('Type / to add a hidden block')
}]];
@@ -15223,38 +15558,47 @@ 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_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.ToggleControl, {
- label: (0,external_wp_i18n_namespaceObject.__)('Open by default'),
- checked: showContent,
- onChange: () => setAttributes({
- showContent: !showContent
- })
- }))), (0,external_React_namespaceObject.createElement)("details", {
- ...innerBlocksProps,
- open: hasSelection || showContent
- }, (0,external_React_namespaceObject.createElement)("summary", {
- onClick: event => event.preventDefault()
- }, (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: [],
- withoutInteractiveFormatting: true,
- value: summary,
- onChange: newSummary => setAttributes({
- summary: newSummary
- })
- })), innerBlocksProps.children));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Open by default'),
+ checked: showContent,
+ onChange: () => setAttributes({
+ showContent: !showContent
+ })
+ })
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("details", {
+ ...innerBlocksProps,
+ open: hasSelection || showContent,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("summary", {
+ onClick: event => event.preventDefault(),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
+ identifier: "summary",
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Write summary'),
+ placeholder: (0,external_wp_i18n_namespaceObject.__)('Write summary…'),
+ allowedFormats: [],
+ withoutInteractiveFormatting: true,
+ value: summary,
+ onChange: newSummary => setAttributes({
+ summary: newSummary
+ })
+ })
+ }), innerBlocksProps.children]
+ })]
+ });
}
/* harmony default export */ const details_edit = (DetailsEdit);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/details/save.js
-
/**
* WordPress dependencies
*/
+
+
function details_save_save({
attributes
}) {
@@ -15263,12 +15607,15 @@ function details_save_save({
} = attributes;
const summary = attributes.summary ? attributes.summary : 'Details';
const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
- return (0,external_React_namespaceObject.createElement)("details", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("details", {
...blockProps,
- open: showContent
- }, (0,external_React_namespaceObject.createElement)("summary", null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- value: summary
- })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null));
+ open: showContent,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("summary", {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: summary
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/details/index.js
@@ -15303,6 +15650,7 @@ const details_metadata = {
}
},
supports: {
+ __experimentalOnEnter: true,
align: ["wide", "full"],
color: {
gradients: true,
@@ -15380,17 +15728,18 @@ const details_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pencil.js
-
/**
* WordPress dependencies
*/
-const pencil = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const pencil = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_pencil = (pencil);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/edit.js
@@ -15402,7 +15751,6 @@ const pencil = (0,external_React_namespaceObject.createElement)(external_wp_prim
/* harmony default export */ const library_edit = (library_pencil);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/embed-controls.js
-
/**
* WordPress dependencies
*/
@@ -15410,6 +15758,9 @@ const pencil = (0,external_React_namespaceObject.createElement)(external_wp_prim
+
+
+
function getResponsiveHelp(checked) {
return checked ? (0,external_wp_i18n_namespaceObject.__)('This embed will preserve its aspect ratio when the browser is resized.') : (0,external_wp_i18n_namespaceObject.__)('This embed may not preserve its aspect ratio when the browser is resized.');
}
@@ -15420,214 +15771,261 @@ const EmbedControls = ({
allowResponsive,
toggleResponsive,
switchBackToURLInput
-}) => (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_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_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
-}))));
+}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, {
+ children: showEditButton && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
+ className: "components-toolbar__control",
+ label: (0,external_wp_i18n_namespaceObject.__)('Edit URL'),
+ icon: library_edit,
+ onClick: switchBackToURLInput
+ })
+ })
+ }), themeSupportsResponsive && blockSupportsResponsive && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Media settings'),
+ className: "blocks-responsive",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const embed_controls = (EmbedControls);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/icons.js
-
/**
* WordPress dependencies
*/
-const embedContentIcon = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+
+
+const embedContentIcon = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
viewBox: "0 0 24 24",
- xmlns: "http://www.w3.org/2000/svg"
-}, (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
viewBox: "0 0 24 24",
- xmlns: "http://www.w3.org/2000/svg"
-}, (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
viewBox: "0 0 24 24",
- xmlns: "http://www.w3.org/2000/svg"
-}, (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
viewBox: "0 0 24 24",
- xmlns: "http://www.w3.org/2000/svg"
-}, (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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+ src: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 24 24"
- }, (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"
- })))
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.G, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
- viewBox: "0 0 24 24"
- }, (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"
- }))
+ src: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
- viewBox: "0 0 24 24"
- }, (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
- viewBox: "0 0 24 24"
-}, (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"
-})));
+ src: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.G, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
- viewBox: "0 0 24 24"
- }, (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"
- })))
+ src: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.G, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
- viewBox: "0 0 24 24"
- }, (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
- viewBox: "0 0 24 24"
-}, (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"
-}));
+ src: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+ src: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 24 24"
- }, (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
- viewBox: "0 0 24 24"
-}, (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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.G, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
- viewBox: "0 0 24 24"
- }, (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
- viewBox: "0 0 24 24"
-}, (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_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_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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
- viewBox: "0 0 24 24"
-}, (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_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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, {
- d: "m.0206909 21 15.2439091-16.38571 4.3029 7.32271z",
- fill: "#c3d82e"
-}), (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, {
- d: "m.0206909 21 19.5468091-9.063 1.6621 2.8344z",
- fill: "#209dbd"
-}), (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
- viewBox: "0 0 24 24"
-}, (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+ src: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.SVG, {
+ viewBox: "0 0 24 24",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.SVG, {
+ viewBox: "0 0 24 24",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
+ d: "m.0206909 21 19.8160091-13.07806 3.5831 6.20826z",
+ fill: "#4bc7ee"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
+ d: "m.0206909 21 15.2439091-16.38571 4.3029 7.32271z",
+ fill: "#c3d82e"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
+ d: "m.0206909 21 19.5468091-9.063 1.6621 2.8344z",
+ fill: "#209dbd"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
+ d: "m.0206909 21 17.9209091-11.82623 1.6259 2.76323z",
+ fill: "#7cb3c9"
+ })]
+});
+const embedDailymotionIcon = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
width: "24",
height: "24",
viewBox: "0 0 24 24",
- version: "1.1"
-}, (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
- viewBox: "0 0 44 44"
-}, (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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
+ viewBox: "0 0 44 44",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+ src: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(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_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_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",
- fill: "#fff"
- }))
+ xmlns: "http://www.w3.org/2000/svg",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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",
+ fill: "#fff"
+ })]
+ })
};
+const embedBlueskyIcon = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
+ fill: "#0a7aff",
+ d: "M6.3,4.2c2.3,1.7,4.8,5.3,5.7,7.2.9-1.9,3.4-5.4,5.7-7.2,1.7-1.3,4.3-2.2,4.3.9s-.4,5.2-.6,5.9c-.7,2.6-3.3,3.2-5.6,2.8,4,.7,5.1,3,2.9,5.3-5,5.2-6.7-2.8-6.7-2.8,0,0-1.7,8-6.7,2.8-2.2-2.3-1.2-4.6,2.9-5.3-2.3.4-4.9-.3-5.6-2.8-.2-.7-.6-5.3-.6-5.9,0-3.1,2.7-2.1,4.3-.9h0Z"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/embed-loading.js
-
/**
* WordPress dependencies
*/
-const EmbedLoading = () => (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-embed is-loading"
-}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null));
+
+const EmbedLoading = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-embed is-loading",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {})
+});
/* harmony default export */ const embed_loading = (EmbedLoading);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/embed-placeholder.js
-
/**
* WordPress dependencies
*/
+
+
const EmbedPlaceholder = ({
icon,
label,
@@ -15638,46 +16036,60 @@ const EmbedPlaceholder = ({
fallback,
tryAgain
}) => {
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, {
- icon: (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Placeholder, {
+ icon: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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_React_namespaceObject.createElement)("form", {
- onSubmit: onSubmit
- }, (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- variant: "primary",
- type: "submit"
- }, (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_React_namespaceObject.createElement)("div", {
- className: "components-placeholder__error"
- }, (0,external_React_namespaceObject.createElement)("div", {
- className: "components-placeholder__instructions"
- }, (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- variant: "secondary",
- onClick: fallback
- }, (0,external_wp_i18n_namespaceObject._x)('Convert to link', 'button label'))));
+ instructions: (0,external_wp_i18n_namespaceObject.__)('Paste a link to the content you want to display on your site.'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("form", {
+ onSubmit: onSubmit,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("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
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ variant: "primary",
+ type: "submit",
+ children: (0,external_wp_i18n_namespaceObject._x)('Embed', 'button label')
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-embed__learn-more",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, {
+ href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/documentation/article/embeds/'),
+ children: (0,external_wp_i18n_namespaceObject.__)('Learn more about embeds')
+ })
+ }), cannotEmbed && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
+ spacing: 3,
+ className: "components-placeholder__error",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "components-placeholder__instructions",
+ children: (0,external_wp_i18n_namespaceObject.__)('Sorry, this content could not be embedded.')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
+ expanded: false,
+ spacing: 3,
+ justify: "flex-start",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ variant: "secondary",
+ onClick: tryAgain,
+ children: (0,external_wp_i18n_namespaceObject._x)('Try again', 'button label')
+ }), ' ', /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ variant: "secondary",
+ onClick: fallback,
+ children: (0,external_wp_i18n_namespaceObject._x)('Convert to link', 'button label')
+ })]
+ })]
+ })]
+ });
};
/* harmony default export */ const embed_placeholder = (EmbedPlaceholder);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/wp-embed-preview.js
-
/**
* WordPress dependencies
*/
@@ -15700,12 +16112,16 @@ function WpEmbedPreview({
const doc = new window.DOMParser().parseFromString(html, 'text/html');
const iframe = doc.querySelector('iframe');
const iframeProps = {};
- if (!iframe) return iframeProps;
+ if (!iframe) {
+ return iframeProps;
+ }
Array.from(iframe.attributes).forEach(({
name,
value
}) => {
- if (name === 'style') return;
+ if (name === 'style') {
+ return;
+ }
iframeProps[attributeMap[name] || name] = value;
});
return iframeProps;
@@ -15750,17 +16166,17 @@ function WpEmbedPreview({
defaultView.removeEventListener('message', resizeWPembeds);
};
}, []);
- return (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-embed__wrapper"
- }, (0,external_React_namespaceObject.createElement)("iframe", {
- ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([ref, (0,external_wp_compose_namespaceObject.useFocusableIframe)()]),
- title: props.title,
- ...props
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-embed__wrapper",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("iframe", {
+ ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([ref, (0,external_wp_compose_namespaceObject.useFocusableIframe)()]),
+ title: props.title,
+ ...props
+ })
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/embed-preview.js
-
/**
* Internal dependencies
*/
@@ -15784,6 +16200,8 @@ function WpEmbedPreview({
* Internal dependencies
*/
+
+
class EmbedPreview extends external_wp_element_namespaceObject.Component {
constructor() {
super(...arguments);
@@ -15839,61 +16257,66 @@ class EmbedPreview extends external_wp_element_namespaceObject.Component {
const iframeTitle = (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'), parsedHostBaseUrl);
- const sandboxClassnames = dedupe_default()(type, className, 'wp-block-embed__wrapper');
+ const sandboxClassnames = dist_clsx(type, className, 'wp-block-embed__wrapper');
// Disabled because the overlay div doesn't actually have a role or functionality
// 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_React_namespaceObject.createElement)(WpEmbedPreview, {
+ const embedWrapper = 'wp-embed' === type ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WpEmbedPreview, {
html: html
- }) : (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-embed__wrapper"
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SandBox, {
- html: html,
- scripts: scripts,
- title: iframeTitle,
- type: sandboxClassnames,
- onFocus: this.hideOverlay
- }), !interactive && (0,external_React_namespaceObject.createElement)("div", {
- className: "block-library-embed__interactive-overlay",
- onMouseUp: this.hideOverlay
- }));
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ className: "wp-block-embed__wrapper",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SandBox, {
+ html: html,
+ scripts: scripts,
+ title: iframeTitle,
+ type: sandboxClassnames,
+ onFocus: this.hideOverlay
+ }), !interactive && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "block-library-embed__interactive-overlay",
+ onMouseUp: this.hideOverlay
+ })]
+ });
/* eslint-enable jsx-a11y/no-static-element-interactions */
- return (0,external_React_namespaceObject.createElement)("figure", {
- className: dedupe_default()(className, 'wp-block-embed', {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
+ className: dist_clsx(className, 'wp-block-embed', {
'is-type-video': 'video' === type
- })
- }, 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_React_namespaceObject.createElement)("p", {
- className: "components-placeholder__error"
- }, (0,external_React_namespaceObject.createElement)("a", {
- href: url
- }, 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, {
- identifier: "caption",
- tagName: "figcaption",
- className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'),
- placeholder: (0,external_wp_i18n_namespaceObject.__)('Add caption'),
- value: caption,
- onChange: onCaptionChange,
- inlineToolbar: true,
- __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()))
- }));
+ children: [previewable ? embedWrapper : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Placeholder, {
+ icon: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, {
+ icon: icon,
+ showColors: true
+ }),
+ label: label,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
+ className: "components-placeholder__error",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: url,
+ children: url
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
+ className: "components-placeholder__error",
+ children: (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) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
+ identifier: "caption",
+ tagName: "figcaption",
+ className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'),
+ placeholder: (0,external_wp_i18n_namespaceObject.__)('Add caption'),
+ value: caption,
+ onChange: onCaptionChange,
+ inlineToolbar: true,
+ __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()))
+ })]
+ });
}
}
/* harmony default export */ const embed_preview = (EmbedPreview);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/edit.js
-
/**
* Internal dependencies
*/
@@ -15919,6 +16342,9 @@ class EmbedPreview extends external_wp_element_namespaceObject.Component {
+
+
+
const EmbedEdit = props => {
const {
attributes: {
@@ -15951,13 +16377,15 @@ const EmbedEdit = props => {
preview,
fetching,
themeSupportsResponsive,
- cannotEmbed
+ cannotEmbed,
+ hasResolved
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
const {
getEmbedPreview,
isPreviewEmbedFallback,
isRequestingEmbedPreview,
- getThemeSupports
+ getThemeSupports,
+ hasFinishedResolution
} = select(external_wp_coreData_namespaceObject.store);
if (!attributesUrl) {
return {
@@ -15979,7 +16407,8 @@ const EmbedEdit = props => {
preview: validPreview ? embedPreview : undefined,
fetching: isRequestingEmbedPreview(attributesUrl),
themeSupportsResponsive: getThemeSupports()['responsive-embeds'],
- cannotEmbed: !validPreview || previewIsFallback
+ cannotEmbed: !validPreview || previewIsFallback,
+ hasResolved: hasFinishedResolution('getEmbedPreview', [attributesUrl])
};
}, [attributesUrl]);
@@ -16004,7 +16433,7 @@ const EmbedEdit = props => {
});
};
(0,external_wp_element_namespaceObject.useEffect)(() => {
- if (preview?.html || !cannotEmbed || fetching) {
+ if (preview?.html || !cannotEmbed || !hasResolved) {
return;
}
@@ -16016,7 +16445,7 @@ const EmbedEdit = props => {
setAttributes({
url: newURL
});
- }, [preview?.html, attributesUrl, cannotEmbed, fetching, setAttributes]);
+ }, [preview?.html, attributesUrl, cannotEmbed, hasResolved, setAttributes]);
// Try a different provider in case the embed url is not supported.
(0,external_wp_element_namespaceObject.useEffect)(() => {
@@ -16051,9 +16480,10 @@ const EmbedEdit = props => {
}, [preview, isEditingURL]);
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
if (fetching) {
- return (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(embed_loading, null));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.View, {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(embed_loading, {})
+ });
}
// translators: %s: type of embed e.g: "YouTube", "Twitter", etc. "Embed" is used when no specific type exists
@@ -16062,34 +16492,35 @@ 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_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(embed_placeholder, {
- icon: icon,
- label: label,
- onFocus: onFocus,
- onSubmit: event => {
- if (event) {
- event.preventDefault();
- }
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.View, {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(embed_placeholder, {
+ icon: icon,
+ label: label,
+ onFocus: onFocus,
+ onSubmit: event => {
+ if (event) {
+ event.preventDefault();
+ }
- // If the embed URL was changed, we need to reset the aspect ratio class.
- // To do this we have to remove the existing ratio class so it can be recalculated.
- const blockClass = removeAspectRatioClasses(attributes.className);
- setIsEditingURL(false);
- setAttributes({
- url,
- className: blockClass
- });
- },
- value: url,
- cannotEmbed: cannotEmbed,
- onChange: event => setURL(event.target.value),
- fallback: () => fallback(url, onReplace),
- tryAgain: () => {
- invalidateResolution('getEmbedPreview', [url]);
- }
- }));
+ // If the embed URL was changed, we need to reset the aspect ratio class.
+ // To do this we have to remove the existing ratio class so it can be recalculated.
+ const blockClass = removeAspectRatioClasses(attributes.className);
+ setIsEditingURL(false);
+ setAttributes({
+ url,
+ className: blockClass
+ });
+ },
+ value: url,
+ cannotEmbed: cannotEmbed,
+ onChange: event => setURL(event.target.value),
+ fallback: () => fallback(url, onReplace),
+ tryAgain: () => {
+ invalidateResolution('getEmbedPreview', [url]);
+ }
+ })
+ });
}
// Even though we set attributes that get derived from the preview,
@@ -16106,36 +16537,38 @@ const EmbedEdit = props => {
allowResponsive,
className: classFromPreview
} = getMergedAttributes();
- const className = classnames_default()(classFromPreview, props.className);
- 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_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(embed_preview, {
- preview: preview,
- previewable: previewable,
- className: className,
- url: url,
- type: type,
- caption: caption,
- onCaptionChange: value => setAttributes({
- caption: value
- }),
- isSelected: isSelected,
- icon: icon,
- label: label,
- insertBlocksAfter: insertBlocksAfter
- })));
+ const className = dist_clsx(classFromPreview, props.className);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(embed_controls, {
+ showEditButton: preview && !cannotEmbed,
+ themeSupportsResponsive: themeSupportsResponsive,
+ blockSupportsResponsive: responsive,
+ allowResponsive: allowResponsive,
+ toggleResponsive: toggleResponsive,
+ switchBackToURLInput: () => setIsEditingURL(true)
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.View, {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(embed_preview, {
+ preview: preview,
+ previewable: previewable,
+ className: className,
+ url: url,
+ type: type,
+ caption: caption,
+ onCaptionChange: value => setAttributes({
+ caption: value
+ }),
+ isSelected: isSelected,
+ icon: icon,
+ label: label,
+ insertBlocksAfter: insertBlocksAfter
+ })
+ })]
+ });
};
/* harmony default export */ const embed_edit = (EmbedEdit);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/save.js
-
/**
* External dependencies
*/
@@ -16145,6 +16578,8 @@ const EmbedEdit = props => {
* WordPress dependencies
*/
+
+
function embed_save_save({
attributes
}) {
@@ -16157,22 +16592,24 @@ function embed_save_save({
if (!url) {
return null;
}
- const className = dedupe_default()('wp-block-embed', {
+ const className = dist_clsx('wp-block-embed', {
[`is-type-${type}`]: type,
[`is-provider-${providerNameSlug}`]: providerNameSlug,
[`wp-block-embed-${providerNameSlug}`]: providerNameSlug
});
- return (0,external_React_namespaceObject.createElement)("figure", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className
- })
- }, (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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'),
- tagName: "figcaption",
- value: caption
- }));
+ }),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-embed__wrapper",
+ children: `\n${url}\n` /* URL needs to be on its own line. */
+ }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'),
+ tagName: "figcaption",
+ value: caption
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/transforms.js
@@ -16546,16 +16983,6 @@ const embed_variations_variations = [{
responsive: true
}
}, {
- name: 'slideshare',
- title: 'Slideshare',
- icon: embedContentIcon,
- description: (0,external_wp_i18n_namespaceObject.__)('Embed Slideshare content.'),
- patterns: [/^https?:\/\/(.+?\.)?slideshare\.net\/.+/i],
- attributes: {
- providerNameSlug: 'slideshare',
- responsive: true
- }
-}, {
name: 'smugmug',
title: 'SmugMug',
icon: embedPhotoIcon,
@@ -16659,6 +17086,15 @@ const embed_variations_variations = [{
providerNameSlug: 'wolfram-cloud',
responsive: true
}
+}, {
+ name: 'bluesky',
+ title: 'Bluesky',
+ icon: embedBlueskyIcon,
+ description: (0,external_wp_i18n_namespaceObject.__)('Embed a Bluesky post.'),
+ patterns: [/^https?:\/\/bsky\.app\/profile\/.+\/post\/.+/i],
+ attributes: {
+ providerNameSlug: 'bluesky'
+ }
}];
/**
@@ -16667,13 +17103,14 @@ const embed_variations_variations = [{
* Block by providing its attributes.
*/
embed_variations_variations.forEach(variation => {
- if (variation.isActive) return;
+ if (variation.isActive) {
+ return;
+ }
variation.isActive = (blockAttributes, variationAttributes) => blockAttributes.providerNameSlug === variationAttributes.providerNameSlug;
});
/* harmony default export */ const embed_variations = (embed_variations_variations);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/deprecated.js
-
/**
* External dependencies
*/
@@ -16740,6 +17177,8 @@ const embed_deprecated_metadata = {
* WordPress dependencies
*/
+
+
const {
attributes: embed_deprecated_blockAttributes
} = embed_deprecated_metadata;
@@ -16760,21 +17199,23 @@ const deprecated_v2 = {
if (!url) {
return null;
}
- const className = classnames_default()('wp-block-embed', {
+ const className = dist_clsx('wp-block-embed', {
[`is-type-${type}`]: type,
[`is-provider-${providerNameSlug}`]: providerNameSlug,
[`wp-block-embed-${providerNameSlug}`]: providerNameSlug
});
- return (0,external_React_namespaceObject.createElement)("figure", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className
- })
- }, (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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "figcaption",
- value: caption
- }));
+ }),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-embed__wrapper",
+ children: `\n${url}\n` /* URL needs to be on its own line. */
+ }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "figcaption",
+ value: caption
+ })]
+ });
}
};
const embed_deprecated_v1 = {
@@ -16790,16 +17231,17 @@ const embed_deprecated_v1 = {
if (!url) {
return null;
}
- const embedClassName = classnames_default()('wp-block-embed', {
+ const embedClassName = dist_clsx('wp-block-embed', {
[`is-type-${type}`]: type,
[`is-provider-${providerNameSlug}`]: providerNameSlug
});
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "figcaption",
- value: caption
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
+ className: embedClassName,
+ children: [`\n${url}\n` /* URL needs to be on its own line. */, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "figcaption",
+ value: caption
+ })]
+ });
}
};
const embed_deprecated_deprecated = [deprecated_v2, embed_deprecated_v1];
@@ -16889,23 +17331,23 @@ const embed_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/file.js
-
/**
* WordPress dependencies
*/
-const file = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const file = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_file = (file);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/deprecated.js
-
/**
* External dependencies
*/
@@ -16918,6 +17360,9 @@ const file = (0,external_React_namespaceObject.createElement)(external_wp_primit
// Version of the file block without PR#43050 removing the translated aria-label.
+
+
+
const deprecated_v3 = {
attributes: {
id: {
@@ -16991,32 +17436,37 @@ 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_React_namespaceObject.createElement)("div", {
- ...external_wp_blockEditor_namespaceObject.useBlockProps.save()
- }, 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",
- style: {
- width: '100%',
- height: `${previewHeight}px`
- },
- "aria-label": pdfEmbedLabel
- })), hasFilename && (0,external_React_namespaceObject.createElement)("a", {
- id: describedById,
- href: textLinkHref,
- target: textLinkTarget,
- rel: textLinkTarget ? 'noreferrer noopener' : undefined
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- value: fileName
- })), 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- value: downloadButtonText
- })));
+ return href && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ ...external_wp_blockEditor_namespaceObject.useBlockProps.save(),
+ children: [displayPreview && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("object", {
+ className: "wp-block-file__embed",
+ data: href,
+ type: "application/pdf",
+ style: {
+ width: '100%',
+ height: `${previewHeight}px`
+ },
+ "aria-label": pdfEmbedLabel
+ })
+ }), hasFilename && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ id: describedById,
+ href: textLinkHref,
+ target: textLinkTarget,
+ rel: textLinkTarget ? 'noreferrer noopener' : undefined,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: fileName
+ })
+ }), showDownloadButton && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: href,
+ className: dist_clsx('wp-block-file__button', (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('button')),
+ download: true,
+ "aria-describedby": describedById,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: downloadButtonText
+ })
+ })]
+ });
}
};
@@ -17095,32 +17545,37 @@ 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_React_namespaceObject.createElement)("div", {
- ...external_wp_blockEditor_namespaceObject.useBlockProps.save()
- }, 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",
- style: {
- width: '100%',
- height: `${previewHeight}px`
- },
- "aria-label": pdfEmbedLabel
- })), hasFilename && (0,external_React_namespaceObject.createElement)("a", {
- id: describedById,
- href: textLinkHref,
- target: textLinkTarget,
- rel: textLinkTarget ? 'noreferrer noopener' : undefined
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- value: fileName
- })), showDownloadButton && (0,external_React_namespaceObject.createElement)("a", {
- href: href,
- className: "wp-block-file__button",
- download: true,
- "aria-describedby": describedById
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- value: downloadButtonText
- })));
+ return href && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ ...external_wp_blockEditor_namespaceObject.useBlockProps.save(),
+ children: [displayPreview && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("object", {
+ className: "wp-block-file__embed",
+ data: href,
+ type: "application/pdf",
+ style: {
+ width: '100%',
+ height: `${previewHeight}px`
+ },
+ "aria-label": pdfEmbedLabel
+ })
+ }), hasFilename && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ id: describedById,
+ href: textLinkHref,
+ target: textLinkTarget,
+ rel: textLinkTarget ? 'noreferrer noopener' : undefined,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: fileName
+ })
+ }), showDownloadButton && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: href,
+ className: "wp-block-file__button",
+ download: true,
+ "aria-describedby": describedById,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: downloadButtonText
+ })
+ })]
+ });
}
};
@@ -17186,37 +17641,41 @@ 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_React_namespaceObject.createElement)("div", {
- ...external_wp_blockEditor_namespaceObject.useBlockProps.save()
- }, 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",
- style: {
- width: '100%',
- height: `${previewHeight}px`
- },
- "aria-label": pdfEmbedLabel
- })), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(fileName) && (0,external_React_namespaceObject.createElement)("a", {
- href: textLinkHref,
- target: textLinkTarget,
- rel: textLinkTarget ? 'noreferrer noopener' : undefined
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- value: fileName
- })), showDownloadButton && (0,external_React_namespaceObject.createElement)("a", {
- href: href,
- className: "wp-block-file__button",
- download: true
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- value: downloadButtonText
- })));
+ return href && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ ...external_wp_blockEditor_namespaceObject.useBlockProps.save(),
+ children: [displayPreview && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("object", {
+ className: "wp-block-file__embed",
+ data: href,
+ type: "application/pdf",
+ style: {
+ width: '100%',
+ height: `${previewHeight}px`
+ },
+ "aria-label": pdfEmbedLabel
+ })
+ }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(fileName) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: textLinkHref,
+ target: textLinkTarget,
+ rel: textLinkTarget ? 'noreferrer noopener' : undefined,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: fileName
+ })
+ }), showDownloadButton && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: href,
+ className: "wp-block-file__button",
+ download: true,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: downloadButtonText
+ })
+ })]
+ });
}
};
const file_deprecated_deprecated = [deprecated_v3, file_deprecated_v2, file_deprecated_v1];
/* harmony default export */ const file_deprecated = (file_deprecated_deprecated);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/inspector.js
-
/**
* WordPress dependencies
*/
@@ -17228,6 +17687,9 @@ const file_deprecated_deprecated = [deprecated_v3, file_deprecated_v2, file_depr
* Internal dependencies
*/
+
+
+
function FileBlockInspector({
hrefs,
openInNewWindow,
@@ -17258,41 +17720,47 @@ function FileBlockInspector({
label: (0,external_wp_i18n_namespaceObject.__)('Attachment page')
}];
}
- 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_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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, {
- __nextHasNoMarginBottom: true,
- __next40pxDefaultSize: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Height in pixels'),
- min: MIN_PREVIEW_HEIGHT,
- max: Math.max(MAX_PREVIEW_HEIGHT, previewHeight),
- value: previewHeight,
- onChange: changePreviewHeight
- })), (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: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Link to'),
- value: textLinkHref,
- options: linkDestinationOptions,
- onChange: changeLinkDestinationOption
- }), (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Show download button'),
- checked: showDownloadButton,
- onChange: changeShowDownloadButton
- }))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: [href.endsWith('.pdf') && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('PDF settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.RangeControl, {
+ __nextHasNoMarginBottom: true,
+ __next40pxDefaultSize: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Height in pixels'),
+ min: MIN_PREVIEW_HEIGHT,
+ max: Math.max(MAX_PREVIEW_HEIGHT, previewHeight),
+ value: previewHeight,
+ onChange: changePreviewHeight
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SelectControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Link to'),
+ value: textLinkHref,
+ options: linkDestinationOptions,
+ onChange: changeLinkDestinationOption
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Open in new tab'),
+ checked: openInNewWindow,
+ onChange: changeOpenInNewWindow
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Show download button'),
+ checked: showDownloadButton,
+ onChange: changeShowDownloadButton
+ })]
+ })]
+ })
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/utils/index.js
@@ -17343,7 +17811,6 @@ const createActiveXObject = type => {
};
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/edit.js
-
/**
* External dependencies
*/
@@ -17369,6 +17836,10 @@ const createActiveXObject = type => {
+
+
+
+
const MIN_PREVIEW_HEIGHT = 200;
const MAX_PREVIEW_HEIGHT = 2000;
function ClipboardToolbarButton({
@@ -17384,11 +17855,12 @@ function ClipboardToolbarButton({
type: 'snackbar'
});
});
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
className: "components-clipboard-toolbar-button",
ref: ref,
- disabled: disabled
- }, (0,external_wp_i18n_namespaceObject.__)('Copy URL'));
+ disabled: disabled,
+ children: (0,external_wp_i18n_namespaceObject.__)('Copy URL')
+ });
}
function FileEdit({
attributes,
@@ -17408,9 +17880,6 @@ function FileEdit({
previewHeight
} = attributes;
const {
- 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)
@@ -17419,24 +17888,26 @@ function FileEdit({
createErrorNotice
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
const {
- toggleSelection
+ toggleSelection,
+ __unstableMarkNextChangeAsNotPersistent
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
+ useUploadMediaFromBlobURL({
+ url: href,
+ onChange: onSelectFile,
+ onError: onUploadError
+ });
+
+ // Note: Handle setting a default value for `downloadButtonText` via HTML API
+ // when it supports replacing text content for HTML tags.
(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);
- getSettings().mediaUpload({
- filesList: [file],
- onFileChange: ([newMedia]) => onSelectFile(newMedia),
- onError: onUploadError
- });
- (0,external_wp_blob_namespaceObject.revokeBlobURL)(href);
- }
if (external_wp_blockEditor_namespaceObject.RichText.isEmpty(downloadButtonText)) {
+ __unstableMarkNextChangeAsNotPersistent();
setAttributes({
downloadButtonText: (0,external_wp_i18n_namespaceObject._x)('Download', 'button label')
});
}
+ // Reason: This effect should only run on mount.
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
function onSelectFile(newMedia) {
if (!newMedia || !newMedia.url) {
@@ -17497,7 +17968,7 @@ function FileEdit({
}
const attachmentPage = media && media.link;
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()((0,external_wp_blob_namespaceObject.isBlobURL)(href) && (0,external_wp_components_namespaceObject.__unstableGetAnimateClassName)({
+ className: dist_clsx((0,external_wp_blob_namespaceObject.isBlobURL)(href) && (0,external_wp_components_namespaceObject.__unstableGetAnimateClassName)({
type: 'loading'
}), {
'is-transient': (0,external_wp_blob_namespaceObject.isBlobURL)(href)
@@ -17505,107 +17976,116 @@ function FileEdit({
});
const displayPreviewInEditor = browserSupportsPdfs() && displayPreview;
if (!href) {
- return (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (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: {
- title: (0,external_wp_i18n_namespaceObject.__)('File'),
- instructions: (0,external_wp_i18n_namespaceObject.__)('Upload a file or pick one from your media library.')
- },
- onSelect: onSelectFile,
- onError: onUploadError,
- accept: "*"
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, {
+ icon: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, {
+ icon: library_file
+ }),
+ labels: {
+ title: (0,external_wp_i18n_namespaceObject.__)('File'),
+ instructions: (0,external_wp_i18n_namespaceObject.__)('Upload a file or pick one from your media library.')
+ },
+ onSelect: onSelectFile,
+ onError: onUploadError,
+ accept: "*"
+ })
+ });
}
- return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(FileBlockInspector, {
- hrefs: {
- href,
- textLinkHref,
- attachmentPage
- },
- openInNewWindow: !!textLinkTarget,
- showDownloadButton,
- changeLinkDestinationOption,
- changeOpenInNewWindow,
- changeShowDownloadButton,
- displayPreview,
- changeDisplayPreview,
- previewHeight,
- changePreviewHeight
- }), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, {
- group: "other"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, {
- mediaId: id,
- mediaURL: href,
- accept: "*",
- onSelect: onSelectFile,
- onError: onUploadError
- }), (0,external_React_namespaceObject.createElement)(ClipboardToolbarButton, {
- text: href,
- disabled: (0,external_wp_blob_namespaceObject.isBlobURL)(href)
- })), (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, displayPreviewInEditor && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ResizableBox, {
- size: {
- height: previewHeight
- },
- minHeight: MIN_PREVIEW_HEIGHT,
- maxHeight: MAX_PREVIEW_HEIGHT,
- minWidth: "100%",
- grid: [10, 10],
- enable: {
- top: false,
- right: false,
- bottom: true,
- left: false,
- topRight: false,
- bottomRight: false,
- bottomLeft: false,
- topLeft: false
- },
- onResizeStart: () => toggleSelection(false),
- onResizeStop: handleOnResizeStop,
- showHandle: isSelected
- }, (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_React_namespaceObject.createElement)("div", {
- className: "wp-block-file__preview-overlay"
- })), (0,external_React_namespaceObject.createElement)("div", {
- className: 'wp-block-file__content-wrapper'
- }, (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: removeAnchorTag(text)
- }),
- href: textLinkHref
- }), showDownloadButton && (0,external_React_namespaceObject.createElement)("div", {
- className: 'wp-block-file__button-richtext-wrapper'
- }, (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'),
- className: classnames_default()('wp-block-file__button', (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('button')),
- value: downloadButtonText,
- withoutInteractiveFormatting: true,
- placeholder: (0,external_wp_i18n_namespaceObject.__)('Add text…'),
- onChange: text => setAttributes({
- downloadButtonText: removeAnchorTag(text)
- })
- })))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(FileBlockInspector, {
+ hrefs: {
+ href,
+ textLinkHref,
+ attachmentPage
+ },
+ openInNewWindow: !!textLinkTarget,
+ showDownloadButton,
+ changeLinkDestinationOption,
+ changeOpenInNewWindow,
+ changeShowDownloadButton,
+ displayPreview,
+ changeDisplayPreview,
+ previewHeight,
+ changePreviewHeight
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "other",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, {
+ mediaId: id,
+ mediaURL: href,
+ accept: "*",
+ onSelect: onSelectFile,
+ onError: onUploadError
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ClipboardToolbarButton, {
+ text: href,
+ disabled: (0,external_wp_blob_namespaceObject.isBlobURL)(href)
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ ...blockProps,
+ children: [displayPreviewInEditor && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.ResizableBox, {
+ size: {
+ height: previewHeight
+ },
+ minHeight: MIN_PREVIEW_HEIGHT,
+ maxHeight: MAX_PREVIEW_HEIGHT,
+ minWidth: "100%",
+ grid: [10, 10],
+ enable: {
+ top: false,
+ right: false,
+ bottom: true,
+ left: false,
+ topRight: false,
+ bottomRight: false,
+ bottomLeft: false,
+ topLeft: false
+ },
+ onResizeStart: () => toggleSelection(false),
+ onResizeStop: handleOnResizeStop,
+ showHandle: isSelected,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("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 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-file__preview-overlay"
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ className: "wp-block-file__content-wrapper",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
+ identifier: "fileName",
+ tagName: "a",
+ value: fileName,
+ placeholder: (0,external_wp_i18n_namespaceObject.__)('Write file name…'),
+ withoutInteractiveFormatting: true,
+ onChange: text => setAttributes({
+ fileName: removeAnchorTag(text)
+ }),
+ href: textLinkHref
+ }), showDownloadButton && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-file__button-richtext-wrapper",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
+ identifier: "downloadButtonText",
+ tagName: "div" // Must be block-level or else cursor disappears.
+ ,
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Download button text'),
+ className: dist_clsx('wp-block-file__button', (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('button')),
+ value: downloadButtonText,
+ withoutInteractiveFormatting: true,
+ placeholder: (0,external_wp_i18n_namespaceObject.__)('Add text…'),
+ onChange: text => setAttributes({
+ downloadButtonText: removeAnchorTag(text)
+ })
+ })
+ })]
+ })]
+ })]
+ });
}
/* harmony default export */ const file_edit = (FileEdit);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/save.js
-
/**
* External dependencies
*/
@@ -17615,6 +18095,9 @@ function FileEdit({
* WordPress dependencies
*/
+
+
+
function file_save_save({
attributes
}) {
@@ -17638,32 +18121,37 @@ function file_save_save({
// Only output an `aria-describedby` when the element it's referring to is
// actually rendered.
const describedById = hasFilename ? fileId : undefined;
- return href && (0,external_React_namespaceObject.createElement)("div", {
- ...external_wp_blockEditor_namespaceObject.useBlockProps.save()
- }, 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",
- style: {
- width: '100%',
- height: `${previewHeight}px`
- },
- "aria-label": pdfEmbedLabel
- })), hasFilename && (0,external_React_namespaceObject.createElement)("a", {
- id: describedById,
- href: textLinkHref,
- target: textLinkTarget,
- rel: textLinkTarget ? 'noreferrer noopener' : undefined
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- value: fileName
- })), 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- value: downloadButtonText
- })));
+ return href && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ ...external_wp_blockEditor_namespaceObject.useBlockProps.save(),
+ children: [displayPreview && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("object", {
+ className: "wp-block-file__embed",
+ data: href,
+ type: "application/pdf",
+ style: {
+ width: '100%',
+ height: `${previewHeight}px`
+ },
+ "aria-label": pdfEmbedLabel
+ })
+ }), hasFilename && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ id: describedById,
+ href: textLinkHref,
+ target: textLinkTarget,
+ rel: textLinkTarget ? 'noreferrer noopener' : undefined,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: fileName
+ })
+ }), showDownloadButton && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: href,
+ className: dist_clsx('wp-block-file__button', (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('button')),
+ download: true,
+ "aria-describedby": describedById,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: downloadButtonText
+ })
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/transforms.js
@@ -17940,7 +18428,6 @@ const formSubmissionNotificationError = ['core/form-submission-notification', {
}]]];
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/form/edit.js
-
/**
* WordPress dependencies
*/
@@ -17953,6 +18440,9 @@ const formSubmissionNotificationError = ['core/form-submission-notification', {
* Internal dependencies
*/
+
+
+
const form_edit_TEMPLATE = [formSubmissionNotificationSuccess, formSubmissionNotificationError, ['core/form-input', {
type: 'text',
label: (0,external_wp_i18n_namespaceObject.__)('Name'),
@@ -17993,101 +18483,107 @@ const form_edit_Edit = ({
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
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ group: "advanced",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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.')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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.')
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("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 = ({
+
+function form_save_save({
attributes
-}) => {
+}) {
const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
const {
submissionMethod
} = attributes;
- return (0,external_React_namespaceObject.createElement)("form", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("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);
+ encType: submissionMethod === 'email' ? 'text/plain' : null,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
+ });
+}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/form/variations.js
/**
@@ -18256,7 +18752,7 @@ const {
const form_settings = {
edit: form_edit,
- save: form_save,
+ save: form_save_save,
variations: form_variations
};
const form_init = () => {
@@ -18290,7 +18786,6 @@ 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
*/
@@ -18302,6 +18797,8 @@ const external_wp_dom_namespaceObject = window["wp"]["dom"];
*/
+
+
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.
@@ -18393,10 +18890,10 @@ const form_input_deprecated_v1 = {
...borderProps.style,
...colorProps.style
};
- const inputClasses = classnames_default()('wp-block-form-input__input', colorProps.className, borderProps.className);
+ const inputClasses = dist_clsx('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", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("input", {
type: type,
name: name,
value: value
@@ -18404,23 +18901,25 @@ const form_input_deprecated_v1 = {
}
/* eslint-disable jsx-a11y/label-has-associated-control */
- return (0,external_React_namespaceObject.createElement)("label", {
- className: classnames_default()('wp-block-form-input__label', {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("label", {
+ className: dist_clsx('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
- }));
+ }),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ className: "wp-block-form-input__label-content",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: label
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */
}
};
@@ -18428,7 +18927,6 @@ 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
*/
@@ -18441,6 +18939,9 @@ const form_input_deprecated_deprecated = [form_input_deprecated_v1];
+
+
+
function InputFieldBlock({
attributes,
setAttributes,
@@ -18463,88 +18964,97 @@ function InputFieldBlock({
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
+ const controls = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: ['hidden' !== type && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: ['checkbox' !== type && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.CheckboxControl, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Inline label'),
+ checked: inlineLabel,
+ onChange: newVal => {
+ setAttributes({
+ inlineLabel: newVal
+ });
+ }
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.CheckboxControl, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Required'),
+ checked: required,
+ onChange: newVal => {
+ setAttributes({
+ required: newVal
+ });
+ }
+ })]
})
- }));
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ group: "advanced",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [controls, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("input", {
+ type: "hidden",
+ className: dist_clsx(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
- }
- })));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ ...blockProps,
+ children: [controls, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("span", {
+ className: dist_clsx('wp-block-form-input__label', {
+ 'is-label-inline': inlineLabel || 'checkbox' === type
+ }),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
+ type: 'textarea' === type ? undefined : type,
+ className: dist_clsx(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
*/
@@ -18564,6 +19074,8 @@ function InputFieldBlock({
*
* @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.
@@ -18591,35 +19103,38 @@ function form_input_save_save({
...borderProps.style,
...colorProps.style
};
- const inputClasses = classnames_default()('wp-block-form-input__input', colorProps.className, borderProps.className);
+ const inputClasses = dist_clsx('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", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("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
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("label", {
+ className: dist_clsx('wp-block-form-input__label', {
+ 'is-label-inline': inlineLabel
+ }),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ className: "wp-block-form-input__label-content",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: label
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
+ className: inputClasses,
+ type: 'textarea' === type ? undefined : type,
+ name: name || getNameFromLabel(label),
+ required: required,
+ "aria-required": required,
+ placeholder: placeholder || undefined,
+ style: inputStyle
+ })]
})
- }, (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
@@ -18807,12 +19322,12 @@ const form_input_init = () => initBlock({
});
;// 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',
@@ -18824,7 +19339,7 @@ const form_submit_button_edit_Edit = () => {
template: form_submit_button_edit_TEMPLATE,
templateLock: 'all'
});
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
className: "wp-block-form-submit-wrapper",
...innerBlocksProps
});
@@ -18832,19 +19347,19 @@ const form_submit_button_edit_Edit = () => {
/* 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 = () => {
+
+function form_submit_button_save_save() {
const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("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);
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
+ });
+}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/form-submit-button/index.js
/**
@@ -18874,7 +19389,7 @@ const {
const form_submit_button_settings = {
edit: form_submit_button_edit,
- save: form_submit_button_save
+ save: form_submit_button_save_save
};
const form_submit_button_init = () => initBlock({
name: form_submit_button_name,
@@ -18883,21 +19398,21 @@ const form_submit_button_init = () => initBlock({
});
;// 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, {
+
+const group = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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
*/
@@ -18909,6 +19424,7 @@ const group = (0,external_React_namespaceObject.createElement)(external_wp_primi
* 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.")
}]];
@@ -18920,7 +19436,7 @@ const form_submission_notification_edit_Edit = ({
type
} = attributes;
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()('wp-block-form-submission-notification', {
+ className: dist_clsx('wp-block-form-submission-notification', {
[`form-notification-type-${type}`]: type
})
});
@@ -18939,7 +19455,7 @@ const form_submission_notification_edit_Edit = ({
template: form_submission_notification_edit_TEMPLATE,
renderAppender: hasInnerBlocks ? undefined : external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender
});
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
...innerBlocksProps,
"data-message-success": (0,external_wp_i18n_namespaceObject.__)('Submission success notification'),
"data-message-error": (0,external_wp_i18n_namespaceObject.__)('Submission error notification')
@@ -18948,7 +19464,6 @@ const form_submission_notification_edit_Edit = ({
/* 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
*/
@@ -18958,15 +19473,16 @@ const form_submission_notification_edit_Edit = ({
* External dependencies
*/
+
function form_submission_notification_save_save({
attributes
}) {
const {
type
} = attributes;
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(external_wp_blockEditor_namespaceObject.useBlockProps.save({
- className: classnames_default()('wp-block-form-submission-notification', {
+ className: dist_clsx('wp-block-form-submission-notification', {
[`form-notification-type-${type}`]: type
})
}))
@@ -19078,19 +19594,20 @@ const form_submission_notification_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/gallery.js
-
/**
* WordPress dependencies
*/
-const gallery = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const gallery = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_gallery = (gallery);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/constants.js
@@ -19140,7 +19657,6 @@ function isGalleryV2Enabled() {
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/deprecated.js
-
/**
* External dependencies
*/
@@ -19157,6 +19673,8 @@ function isGalleryV2Enabled() {
*/
+
+
const DEPRECATED_LINK_DESTINATION_MEDIA = 'file';
const DEPRECATED_LINK_DESTINATION_ATTACHMENT = 'post';
@@ -19365,7 +19883,7 @@ const deprecated_v7 = {
columns,
imageCrop
} = attributes;
- const className = classnames_default()('has-nested-images', {
+ const className = dist_clsx('has-nested-images', {
[`columns-${columns}`]: columns !== undefined,
[`columns-default`]: columns === undefined,
'is-cropped': imageCrop
@@ -19374,13 +19892,14 @@ const deprecated_v7 = {
className
});
const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
- return (0,external_React_namespaceObject.createElement)("figure", {
- ...innerBlocksProps
- }, 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
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
+ ...innerBlocksProps,
+ children: [innerBlocksProps.children, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "figcaption",
+ className: "blocks-gallery-caption",
+ value: caption
+ })]
+ });
}
};
const deprecated_v6 = {
@@ -19477,45 +19996,50 @@ const deprecated_v6 = {
linkTo
} = attributes;
const className = `columns-${columns} ${imageCrop ? 'is-cropped' : ''}`;
- return (0,external_React_namespaceObject.createElement)("figure", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className
- })
- }, (0,external_React_namespaceObject.createElement)("ul", {
- className: "blocks-gallery-grid"
- }, images.map(image => {
- let href;
- switch (linkTo) {
- case DEPRECATED_LINK_DESTINATION_MEDIA:
- href = image.fullUrl || image.url;
- break;
- case DEPRECATED_LINK_DESTINATION_ATTACHMENT:
- href = image.link;
- break;
- }
- const img = (0,external_React_namespaceObject.createElement)("img", {
- src: image.url,
- alt: image.alt,
- "data-id": image.id,
- "data-full-url": image.fullUrl,
- "data-link": image.link,
- className: image.id ? `wp-image-${image.id}` : null
- });
- return (0,external_React_namespaceObject.createElement)("li", {
- key: image.id || image.url,
- className: "blocks-gallery-item"
- }, (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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ }),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
+ className: "blocks-gallery-grid",
+ children: images.map(image => {
+ let href;
+ switch (linkTo) {
+ case DEPRECATED_LINK_DESTINATION_MEDIA:
+ href = image.fullUrl || image.url;
+ break;
+ case DEPRECATED_LINK_DESTINATION_ATTACHMENT:
+ href = image.link;
+ break;
+ }
+ const img = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ src: image.url,
+ alt: image.alt,
+ "data-id": image.id,
+ "data-full-url": image.fullUrl,
+ "data-link": image.link,
+ className: image.id ? `wp-image-${image.id}` : null
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", {
+ className: "blocks-gallery-item",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
+ children: [href ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: href,
+ children: img
+ }) : img, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(image.caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "figcaption",
+ className: "blocks-gallery-item__caption",
+ value: image.caption
+ })]
+ })
+ }, image.id || image.url);
+ })
+ }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "figcaption",
- className: "blocks-gallery-caption",
- value: caption
- }));
+ className: "blocks-gallery-caption",
+ value: caption
+ })]
+ });
},
migrate(attributes) {
if (isGalleryV2Enabled()) {
@@ -19635,43 +20159,48 @@ const deprecated_v5 = {
caption,
linkTo
} = attributes;
- return (0,external_React_namespaceObject.createElement)("figure", {
- className: `columns-${columns} ${imageCrop ? 'is-cropped' : ''}`
- }, (0,external_React_namespaceObject.createElement)("ul", {
- className: "blocks-gallery-grid"
- }, images.map(image => {
- let href;
- switch (linkTo) {
- case 'media':
- href = image.fullUrl || image.url;
- break;
- case 'attachment':
- href = image.link;
- break;
- }
- const img = (0,external_React_namespaceObject.createElement)("img", {
- src: image.url,
- alt: image.alt,
- "data-id": image.id,
- "data-full-url": image.fullUrl,
- "data-link": image.link,
- className: image.id ? `wp-image-${image.id}` : null
- });
- return (0,external_React_namespaceObject.createElement)("li", {
- key: image.id || image.url,
- className: "blocks-gallery-item"
- }, (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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
+ className: `columns-${columns} ${imageCrop ? 'is-cropped' : ''}`,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
+ className: "blocks-gallery-grid",
+ children: images.map(image => {
+ let href;
+ switch (linkTo) {
+ case 'media':
+ href = image.fullUrl || image.url;
+ break;
+ case 'attachment':
+ href = image.link;
+ break;
+ }
+ const img = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ src: image.url,
+ alt: image.alt,
+ "data-id": image.id,
+ "data-full-url": image.fullUrl,
+ "data-link": image.link,
+ className: image.id ? `wp-image-${image.id}` : null
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", {
+ className: "blocks-gallery-item",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
+ children: [href ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: href,
+ children: img
+ }) : img, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(image.caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "figcaption",
+ className: "blocks-gallery-item__caption",
+ value: image.caption
+ })]
+ })
+ }, image.id || image.url);
+ })
+ }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "figcaption",
- className: "blocks-gallery-caption",
- value: caption
- }));
+ className: "blocks-gallery-caption",
+ value: caption
+ })]
+ });
}
};
const deprecated_v4 = {
@@ -19767,43 +20296,48 @@ const deprecated_v4 = {
caption,
linkTo
} = attributes;
- return (0,external_React_namespaceObject.createElement)("figure", {
- className: `columns-${columns} ${imageCrop ? 'is-cropped' : ''}`
- }, (0,external_React_namespaceObject.createElement)("ul", {
- className: "blocks-gallery-grid"
- }, images.map(image => {
- let href;
- switch (linkTo) {
- case 'media':
- href = image.fullUrl || image.url;
- break;
- case 'attachment':
- href = image.link;
- break;
- }
- const img = (0,external_React_namespaceObject.createElement)("img", {
- src: image.url,
- alt: image.alt,
- "data-id": image.id,
- "data-full-url": image.fullUrl,
- "data-link": image.link,
- className: image.id ? `wp-image-${image.id}` : null
- });
- return (0,external_React_namespaceObject.createElement)("li", {
- key: image.id || image.url,
- className: "blocks-gallery-item"
- }, (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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
+ className: `columns-${columns} ${imageCrop ? 'is-cropped' : ''}`,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
+ className: "blocks-gallery-grid",
+ children: images.map(image => {
+ let href;
+ switch (linkTo) {
+ case 'media':
+ href = image.fullUrl || image.url;
+ break;
+ case 'attachment':
+ href = image.link;
+ break;
+ }
+ const img = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ src: image.url,
+ alt: image.alt,
+ "data-id": image.id,
+ "data-full-url": image.fullUrl,
+ "data-link": image.link,
+ className: image.id ? `wp-image-${image.id}` : null
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", {
+ className: "blocks-gallery-item",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
+ children: [href ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: href,
+ children: img
+ }) : img, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(image.caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "figcaption",
+ className: "blocks-gallery-item__caption",
+ value: image.caption
+ })]
+ })
+ }, image.id || image.url);
+ })
+ }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "figcaption",
- className: "blocks-gallery-caption",
- value: caption
- }));
+ className: "blocks-gallery-caption",
+ value: caption
+ })]
+ });
}
};
const gallery_deprecated_v3 = {
@@ -19875,36 +20409,40 @@ const gallery_deprecated_v3 = {
imageCrop,
linkTo
} = attributes;
- return (0,external_React_namespaceObject.createElement)("ul", {
- className: `columns-${columns} ${imageCrop ? 'is-cropped' : ''}`
- }, images.map(image => {
- let href;
- switch (linkTo) {
- case 'media':
- href = image.fullUrl || image.url;
- break;
- case 'attachment':
- href = image.link;
- break;
- }
- const img = (0,external_React_namespaceObject.createElement)("img", {
- src: image.url,
- alt: image.alt,
- "data-id": image.id,
- "data-full-url": image.fullUrl,
- "data-link": image.link,
- className: image.id ? `wp-image-${image.id}` : null
- });
- return (0,external_React_namespaceObject.createElement)("li", {
- key: image.id || image.url,
- className: "blocks-gallery-item"
- }, (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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "figcaption",
- value: image.caption
- })));
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
+ className: `columns-${columns} ${imageCrop ? 'is-cropped' : ''}`,
+ children: images.map(image => {
+ let href;
+ switch (linkTo) {
+ case 'media':
+ href = image.fullUrl || image.url;
+ break;
+ case 'attachment':
+ href = image.link;
+ break;
+ }
+ const img = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ src: image.url,
+ alt: image.alt,
+ "data-id": image.id,
+ "data-full-url": image.fullUrl,
+ "data-link": image.link,
+ className: image.id ? `wp-image-${image.id}` : null
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", {
+ className: "blocks-gallery-item",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
+ children: [href ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: href,
+ children: img
+ }) : img, image.caption && image.caption.length > 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "figcaption",
+ value: image.caption
+ })]
+ })
+ }, image.id || image.url);
+ })
+ });
},
migrate(attributes) {
if (isGalleryV2Enabled()) {
@@ -20001,35 +20539,39 @@ const gallery_deprecated_v2 = {
imageCrop,
linkTo
} = attributes;
- return (0,external_React_namespaceObject.createElement)("ul", {
- className: `columns-${columns} ${imageCrop ? 'is-cropped' : ''}`
- }, images.map(image => {
- let href;
- switch (linkTo) {
- case 'media':
- href = image.url;
- break;
- case 'attachment':
- href = image.link;
- break;
- }
- 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_React_namespaceObject.createElement)("li", {
- key: image.id || image.url,
- className: "blocks-gallery-item"
- }, (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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "figcaption",
- value: image.caption
- })));
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
+ className: `columns-${columns} ${imageCrop ? 'is-cropped' : ''}`,
+ children: images.map(image => {
+ let href;
+ switch (linkTo) {
+ case 'media':
+ href = image.url;
+ break;
+ case 'attachment':
+ href = image.link;
+ break;
+ }
+ const img = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ src: image.url,
+ alt: image.alt,
+ "data-id": image.id,
+ "data-link": image.link,
+ className: image.id ? `wp-image-${image.id}` : null
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", {
+ className: "blocks-gallery-item",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
+ children: [href ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: href,
+ children: img
+ }) : img, image.caption && image.caption.length > 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "figcaption",
+ value: image.caption
+ })]
+ })
+ }, image.id || image.url);
+ })
+ });
}
};
const gallery_deprecated_v1 = {
@@ -20084,34 +20626,36 @@ const gallery_deprecated_v1 = {
imageCrop,
linkTo
} = attributes;
- const className = classnames_default()(`columns-${columns}`, {
+ const className = dist_clsx(`columns-${columns}`, {
alignnone: align === 'none',
'is-cropped': imageCrop
});
- return (0,external_React_namespaceObject.createElement)("div", {
- className: className
- }, images.map(image => {
- let href;
- switch (linkTo) {
- case 'media':
- href = image.url;
- break;
- case 'attachment':
- href = image.link;
- break;
- }
- const img = (0,external_React_namespaceObject.createElement)("img", {
- src: image.url,
- alt: image.alt,
- "data-id": image.id
- });
- return (0,external_React_namespaceObject.createElement)("figure", {
- key: image.id || image.url,
- className: "blocks-gallery-image"
- }, href ? (0,external_React_namespaceObject.createElement)("a", {
- href: href
- }, img) : img);
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: className,
+ children: images.map(image => {
+ let href;
+ switch (linkTo) {
+ case 'media':
+ href = image.url;
+ break;
+ case 'attachment':
+ href = image.link;
+ break;
+ }
+ const img = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ src: image.url,
+ alt: image.alt,
+ "data-id": image.id
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", {
+ className: "blocks-gallery-image",
+ children: href ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: href,
+ children: img
+ }) : img
+ }, image.id || image.url);
+ })
+ });
},
migrate(attributes) {
if (isGalleryV2Enabled()) {
@@ -20125,13 +20669,13 @@ const gallery_deprecated_v1 = {
;// CONCATENATED MODULE: external ["wp","viewport"]
const external_wp_viewport_namespaceObject = window["wp"]["viewport"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/shared-icon.js
-
/**
* WordPress dependencies
*/
-const sharedIcon = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, {
+
+const sharedIcon = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, {
icon: library_gallery
});
@@ -20272,7 +20816,6 @@ function getImageSizeAttributes(image, size) {
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/gallery.js
-
/**
* External dependencies
*/
@@ -20288,6 +20831,8 @@ function getImageSizeAttributes(image, size) {
* Internal dependencies
*/
+
+
function Gallery(props) {
const {
attributes,
@@ -20305,26 +20850,28 @@ function Gallery(props) {
columns,
imageCrop
} = attributes;
- return (0,external_React_namespaceObject.createElement)("figure", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
...blockProps,
- className: classnames_default()(blockProps.className, layoutClassNames, 'blocks-gallery-grid', {
+ className: dist_clsx(blockProps.className, layoutClassNames, 'blocks-gallery-grid', {
[`align${align}`]: align,
[`columns-${columns}`]: columns !== undefined,
[`columns-default`]: columns === undefined,
'is-cropped': imageCrop
- })
- }, blockProps.children, isSelected && !blockProps.children && (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, {
- className: "blocks-gallery-media-placeholder-wrapper"
- }, 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')
- }));
+ }),
+ children: [blockProps.children, isSelected && !blockProps.children && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.View, {
+ className: "blocks-gallery-media-placeholder-wrapper",
+ children: mediaPlaceholder
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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')
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/use-image-sizes.js
@@ -20508,7 +21055,6 @@ function GapStyles({
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/edit.js
-
/**
* External dependencies
*/
@@ -20542,6 +21088,9 @@ function GapStyles({
+
+
+
const MAX_COLUMNS = 8;
const linkOptions = [{
value: LINK_DESTINATION_ATTACHMENT,
@@ -20558,6 +21107,9 @@ const PLACEHOLDER_TEXT = external_wp_element_namespaceObject.Platform.isNative ?
const MOBILE_CONTROL_PROPS_RANGE_CONTROL = external_wp_element_namespaceObject.Platform.isNative ? {
type: 'stepper'
} : {};
+const gallery_edit_DEFAULT_BLOCK = {
+ name: 'core/image'
+};
const EMPTY_ARRAY = [];
function GalleryEdit(props) {
const {
@@ -20591,7 +21143,6 @@ function GalleryEdit(props) {
const {
getBlock,
getSettings,
- preferredStyle,
innerBlockImages,
blockWasJustInserted,
multiGallerySelection
@@ -20604,12 +21155,10 @@ function GalleryEdit(props) {
getBlock: _getBlock,
wasBlockJustInserted
} = select(external_wp_blockEditor_namespaceObject.store);
- const preferredStyleVariations = _getSettings().__experimentalPreferredStyleVariations;
const multiSelectedClientIds = getMultiSelectedBlockClientIds();
return {
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')
@@ -20656,8 +21205,6 @@ function GalleryEdit(props) {
let newClassName;
if (imageAttributes.className && imageAttributes.className !== '') {
newClassName = imageAttributes.className;
- } else {
- newClassName = preferredStyle ? `is-style-${preferredStyle}` : undefined;
}
let newLinkTarget;
if (imageAttributes.linkTarget || imageAttributes.rel) {
@@ -20843,7 +21390,7 @@ function GalleryEdit(props) {
onFocus
}
});
- const mediaPlaceholder = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, {
+ const mediaPlaceholder = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, {
handleUpload: false,
icon: sharedIcon,
labels: {
@@ -20858,94 +21405,109 @@ function GalleryEdit(props) {
...mediaPlaceholderProps
});
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()(className, 'has-nested-images')
+ className: dist_clsx(className, 'has-nested-images')
});
const nativeInnerBlockProps = external_wp_element_namespaceObject.Platform.isNative && {
marginHorizontal: 0,
marginVertical: 0
};
const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
+ defaultBlock: gallery_edit_DEFAULT_BLOCK,
+ directInsert: true,
orientation: 'horizontal',
renderAppender: false,
...nativeInnerBlockProps
});
if (!hasImages) {
- return (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, {
- ...innerBlocksProps
- }, innerBlocksProps.children, mediaPlaceholder);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.View, {
+ ...innerBlocksProps,
+ children: [innerBlocksProps.children, mediaPlaceholder]
+ });
}
const hasLinkTo = linkTo && linkTo !== 'none';
- 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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Columns'),
- value: columns ? columns : defaultColumnsNumber(images.length),
- onChange: setColumnsNumber,
- min: 1,
- max: Math.min(MAX_COLUMNS, images.length),
- ...MOBILE_CONTROL_PROPS_RANGE_CONTROL,
- required: true,
- __next40pxDefaultSize: true
- }), imageSizeOptions?.length > 0 && (0,external_React_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"
- }), (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: linkOptions,
- hideCancelButton: true,
- size: "__unstable-large"
- }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, {
- __nextHasNoMarginBottom: true,
- 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
- }), external_wp_element_namespaceObject.Platform.isWeb && !imageSizeOptions && hasImageIds && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl, {
- className: 'gallery-image-sizes'
- }, (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_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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, {
- allowedTypes: edit_ALLOWED_MEDIA_TYPES,
- accept: "image/*",
- handleUpload: false,
- onSelect: updateImages,
- name: (0,external_wp_i18n_namespaceObject.__)('Add'),
- multiple: true,
- mediaIds: images.filter(image => image.id).map(image => image.id),
- addToGallery: hasImageIds
- })), (0,external_React_namespaceObject.createElement)(GapStyles, {
- blockGap: attributes.style?.spacing?.blockGap,
- clientId: clientId
- })), (0,external_React_namespaceObject.createElement)(Gallery, {
- ...props,
- isContentLocked: isContentLocked,
- images: images,
- mediaPlaceholder: !hasImages || external_wp_element_namespaceObject.Platform.isNative ? mediaPlaceholder : undefined,
- blockProps: innerBlocksProps,
- insertBlocksAfter: insertBlocksAfter,
- multiGallerySelection: multiGallerySelection
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [images.length > 1 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.RangeControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Columns'),
+ value: columns ? columns : defaultColumnsNumber(images.length),
+ onChange: setColumnsNumber,
+ min: 1,
+ max: Math.min(MAX_COLUMNS, images.length),
+ ...MOBILE_CONTROL_PROPS_RANGE_CONTROL,
+ required: true,
+ __next40pxDefaultSize: true
+ }), imageSizeOptions?.length > 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SelectControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Link to'),
+ value: linkTo,
+ onChange: setLinkTo,
+ options: linkOptions,
+ hideCancelButton: true,
+ size: "__unstable-large"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Crop images to fit'),
+ checked: !!imageCrop,
+ onChange: toggleImageCrop
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Randomize order'),
+ checked: !!randomOrder,
+ onChange: toggleRandomOrder
+ }), hasLinkTo && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Open images in new tab'),
+ checked: linkTarget === '_blank',
+ onChange: toggleOpenInNewTab
+ }), external_wp_element_namespaceObject.Platform.isWeb && !imageSizeOptions && hasImageIds && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.BaseControl, {
+ className: "gallery-image-sizes",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.BaseControl.VisualLabel, {
+ children: (0,external_wp_i18n_namespaceObject.__)('Resolution')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.View, {
+ className: "gallery-image-sizes__loading",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}), (0,external_wp_i18n_namespaceObject.__)('Loading options…')]
+ })]
+ })]
+ })
+ }), external_wp_element_namespaceObject.Platform.isWeb && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [!multiGallerySelection && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "other",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, {
+ allowedTypes: edit_ALLOWED_MEDIA_TYPES,
+ accept: "image/*",
+ handleUpload: false,
+ onSelect: updateImages,
+ name: (0,external_wp_i18n_namespaceObject.__)('Add'),
+ multiple: true,
+ mediaIds: images.filter(image => image.id).map(image => image.id),
+ addToGallery: hasImageIds
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GapStyles, {
+ blockGap: attributes.style?.spacing?.blockGap,
+ clientId: clientId
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Gallery, {
+ ...props,
+ isContentLocked: isContentLocked,
+ images: images,
+ mediaPlaceholder: !hasImages || external_wp_element_namespaceObject.Platform.isNative ? mediaPlaceholder : undefined,
+ blockProps: innerBlocksProps,
+ insertBlocksAfter: insertBlocksAfter,
+ multiGallerySelection: multiGallerySelection
+ })]
+ });
}
/* harmony default export */ const gallery_edit = ((0,external_wp_compose_namespaceObject.compose)([(0,external_wp_viewport_namespaceObject.withViewportMatch)({
isNarrow: '< small'
@@ -20963,59 +21525,63 @@ const shared_pickRelevantMediaFiles = (image, sizeSlug = 'large') => {
};
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/image.js
-
/**
* WordPress dependencies
*/
-const image_image = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const image_image = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_image = (image_image);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-left.js
-
/**
* WordPress dependencies
*/
-const chevronLeft = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const chevronLeft = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
+ d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"
+ })
+});
/* harmony default export */ const chevron_left = (chevronLeft);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-right.js
-
/**
* WordPress dependencies
*/
-const chevronRight = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const chevronRight = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const chevron_right = (chevronRight);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js
-
/**
* WordPress dependencies
*/
-const closeSmall = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const closeSmall = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const close_small = (closeSmall);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/v1/constants.js
@@ -21024,7 +21590,6 @@ const v1_constants_LINK_DESTINATION_MEDIA = 'file';
const v1_constants_LINK_DESTINATION_ATTACHMENT = 'post';
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/v1/gallery-image.js
-
/**
* External dependencies
*/
@@ -21049,6 +21614,9 @@ const v1_constants_LINK_DESTINATION_ATTACHMENT = 'post';
*/
+
+
+
const isTemporaryImage = (id, url) => !id && (0,external_wp_blob_namespaceObject.isBlobURL)(url);
class GalleryImage extends external_wp_element_namespaceObject.Component {
constructor() {
@@ -21184,81 +21752,101 @@ class GalleryImage extends external_wp_element_namespaceObject.Component {
break;
}
const img =
+ /*#__PURE__*/
// 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_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("img", {
- src: url,
- alt: alt,
- "data-id": id,
- onKeyDown: this.onRemoveImage,
- tabIndex: "0",
- "aria-label": ariaLabel,
- ref: this.bindContainer
- }), (0,external_wp_blob_namespaceObject.isBlobURL)(url) && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null))
+ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ src: url,
+ alt: alt,
+ "data-id": id,
+ onKeyDown: this.onRemoveImage,
+ tabIndex: "0",
+ "aria-label": ariaLabel,
+ ref: this.bindContainer
+ }), (0,external_wp_blob_namespaceObject.isBlobURL)(url) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {})]
+ })
/* eslint-enable jsx-a11y/no-noninteractive-element-interactions */;
- const className = classnames_default()({
+ const className = dist_clsx({
'is-selected': isSelected,
'is-transient': (0,external_wp_blob_namespaceObject.isBlobURL)(url)
});
return (
+ /*#__PURE__*/
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
- (0,external_React_namespaceObject.createElement)("figure", {
+ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
className: className,
onClick: this.onSelectImage,
- onFocus: this.onSelectImage
- }, !isEditing && (href ? (0,external_React_namespaceObject.createElement)("a", {
- href: href
- }, img) : img), isEditing && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, {
- labels: {
- title: (0,external_wp_i18n_namespaceObject.__)('Edit gallery image')
- },
- icon: library_image,
- onSelect: this.onSelectImageFromLibrary,
- onSelectURL: this.onSelectCustomURL,
- accept: "image/*",
- allowedTypes: ['image'],
- value: {
- id,
- src: url
- }
- }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ButtonGroup, {
- className: "block-library-gallery-item__inline-menu is-left"
- }, (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_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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ButtonGroup, {
- className: "block-library-gallery-item__inline-menu is-right"
- }, (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_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_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'),
- placeholder: isSelected ? (0,external_wp_i18n_namespaceObject.__)('Add caption') : null,
- value: caption,
- onChange: newCaption => setAttributes({
- caption: newCaption
- }),
- inlineToolbar: true
- }))
+ onFocus: this.onSelectImage,
+ children: [!isEditing && (href ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: href,
+ children: img
+ }) : img), isEditing && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, {
+ labels: {
+ title: (0,external_wp_i18n_namespaceObject.__)('Edit gallery image')
+ },
+ icon: library_image,
+ onSelect: this.onSelectImageFromLibrary,
+ onSelectURL: this.onSelectCustomURL,
+ accept: "image/*",
+ allowedTypes: ['image'],
+ value: {
+ id,
+ src: url
+ }
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.ButtonGroup, {
+ className: "block-library-gallery-item__inline-menu is-left",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ icon: chevron_left,
+ onClick: isFirstItem ? undefined : onMoveBackward,
+ label: (0,external_wp_i18n_namespaceObject.__)('Move image backward'),
+ "aria-disabled": isFirstItem
+ // Disable reason: Truly disable when image is not selected.
+ // eslint-disable-next-line no-restricted-syntax
+ ,
+ disabled: !isSelected
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ icon: chevron_right,
+ onClick: isLastItem ? undefined : onMoveForward,
+ label: (0,external_wp_i18n_namespaceObject.__)('Move image forward'),
+ "aria-disabled": isLastItem
+ // Disable reason: Truly disable when image is not selected.
+ // eslint-disable-next-line no-restricted-syntax
+ ,
+ disabled: !isSelected
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.ButtonGroup, {
+ className: "block-library-gallery-item__inline-menu is-right",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ icon: library_edit,
+ onClick: this.onEdit,
+ label: (0,external_wp_i18n_namespaceObject.__)('Replace image')
+ // Disable reason: Truly disable when image is not selected.
+ // eslint-disable-next-line no-restricted-syntax
+ ,
+ disabled: !isSelected
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ icon: close_small,
+ onClick: onRemove,
+ label: (0,external_wp_i18n_namespaceObject.__)('Remove image')
+ // Disable reason: Truly disable when image is not selected.
+ // eslint-disable-next-line no-restricted-syntax
+ ,
+ disabled: !isSelected
+ })]
+ }), !isEditing && (isSelected || caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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'),
+ placeholder: isSelected ? (0,external_wp_i18n_namespaceObject.__)('Add caption') : null,
+ value: caption,
+ onChange: newCaption => setAttributes({
+ caption: newCaption
+ }),
+ inlineToolbar: true
+ })]
+ })
);
}
}
@@ -21282,7 +21870,6 @@ class GalleryImage extends external_wp_element_namespaceObject.Component {
})])(GalleryImage));
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/v1/gallery.js
-
/**
* External dependencies
*/
@@ -21301,6 +21888,8 @@ class GalleryImage extends external_wp_element_namespaceObject.Component {
*/
+
+
const gallery_Gallery = props => {
const {
attributes,
@@ -21324,67 +21913,68 @@ const gallery_Gallery = props => {
imageCrop,
images
} = attributes;
- return (0,external_React_namespaceObject.createElement)("figure", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
...blockProps,
- className: classnames_default()(blockProps.className, {
+ className: dist_clsx(blockProps.className, {
[`align${align}`]: align,
[`columns-${columns}`]: columns,
'is-cropped': imageCrop
- })
- }, (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_React_namespaceObject.createElement)("li", {
- className: "blocks-gallery-item",
- key: img.id ? `${img.id}-${index}` : img.url
- }, (0,external_React_namespaceObject.createElement)(gallery_image, {
- url: img.url,
- alt: img.alt,
- id: img.id,
- isFirstItem: index === 0,
- isLastItem: index + 1 === images.length,
- isSelected: isSelected && selectedImage === index,
- onMoveBackward: onMoveBackward(index),
- onMoveForward: onMoveForward(index),
- onRemove: onRemoveImage(index),
- onSelect: onSelectImage(index),
- onDeselect: onDeselectImage(index),
- setAttributes: attrs => onSetImageAttributes(index, attrs),
- caption: img.caption,
- "aria-label": ariaLabel,
- sizeSlug: attributes.sizeSlug
- }));
- })), 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')),
- "aria-label": (0,external_wp_i18n_namespaceObject.__)('Gallery caption text'),
- placeholder: (0,external_wp_i18n_namespaceObject.__)('Write gallery caption…'),
- value: caption,
- onChange: value => setAttributes({
- caption: value
}),
- inlineToolbar: true,
- __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()))
- }));
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
+ className: "blocks-gallery-grid",
+ children: 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 /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", {
+ className: "blocks-gallery-item",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(gallery_image, {
+ url: img.url,
+ alt: img.alt,
+ id: img.id,
+ isFirstItem: index === 0,
+ isLastItem: index + 1 === images.length,
+ isSelected: isSelected && selectedImage === index,
+ onMoveBackward: onMoveBackward(index),
+ onMoveForward: onMoveForward(index),
+ onRemove: onRemoveImage(index),
+ onSelect: onSelectImage(index),
+ onDeselect: onDeselectImage(index),
+ setAttributes: attrs => onSetImageAttributes(index, attrs),
+ caption: img.caption,
+ "aria-label": ariaLabel,
+ sizeSlug: attributes.sizeSlug
+ })
+ }, img.id ? `${img.id}-${index}` : img.url);
+ })
+ }), mediaPlaceholder, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(RichTextVisibilityHelper, {
+ isHidden: !isSelected && external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption),
+ tagName: "figcaption",
+ className: dist_clsx('blocks-gallery-caption', (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption')),
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Gallery caption text'),
+ placeholder: (0,external_wp_i18n_namespaceObject.__)('Write gallery caption…'),
+ value: caption,
+ onChange: value => setAttributes({
+ caption: value
+ }),
+ inlineToolbar: true,
+ __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()))
+ })]
+ });
};
function RichTextVisibilityHelper({
isHidden,
...richTextProps
}) {
- return isHidden ? (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, {
+ return isHidden ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, {
as: external_wp_blockEditor_namespaceObject.RichText,
...richTextProps
- }) : (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, {
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
...richTextProps
});
}
/* harmony default export */ const v1_gallery = (gallery_Gallery);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/v1/edit.js
-
/**
* WordPress dependencies
*/
@@ -21407,6 +21997,9 @@ function RichTextVisibilityHelper({
+
+
+
const edit_MAX_COLUMNS = 8;
const edit_linkOptions = [{
value: v1_constants_LINK_DESTINATION_ATTACHMENT,
@@ -21691,7 +22284,7 @@ function edit_GalleryEdit(props) {
}, [linkTo]);
const hasImages = !!images.length;
const hasImageIds = hasImages && images.some(image => !!image.id);
- const mediaPlaceholder = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, {
+ const mediaPlaceholder = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, {
addToGallery: hasImageIds,
isAppender: hasImages,
disableMediaButtons: hasImages && !isSelected,
@@ -21712,65 +22305,70 @@ function edit_GalleryEdit(props) {
});
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
if (!hasImages) {
- return (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, {
- ...blockProps
- }, mediaPlaceholder);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.View, {
+ ...blockProps,
+ children: mediaPlaceholder
+ });
}
const imageSizeOptions = getImagesSizeOptions();
const shouldShowSizeOptions = hasImages && imageSizeOptions.length > 0;
- 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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Columns'),
- value: columns,
- onChange: setColumnsNumber,
- min: 1,
- max: Math.min(edit_MAX_COLUMNS, images.length),
- ...edit_MOBILE_CONTROL_PROPS_RANGE_CONTROL,
- required: true
- }), (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_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_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_React_namespaceObject.createElement)(v1_gallery, {
- ...props,
- selectedImage: selectedImage,
- mediaPlaceholder: mediaPlaceholder,
- onMoveBackward: onMoveBackward,
- onMoveForward: onMoveForward,
- onRemoveImage: onRemoveImage,
- onSelectImage: onSelectImage,
- onDeselectImage: onDeselectImage,
- onSetImageAttributes: setImageAttributes,
- blockProps: blockProps
- // This prop is used by gallery.native.js.
- ,
- onFocusGalleryCaption: onFocusGalleryCaption
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [images.length > 1 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.RangeControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Columns'),
+ value: columns,
+ onChange: setColumnsNumber,
+ min: 1,
+ max: Math.min(edit_MAX_COLUMNS, images.length),
+ ...edit_MOBILE_CONTROL_PROPS_RANGE_CONTROL,
+ required: true
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Crop images'),
+ checked: !!imageCrop,
+ onChange: toggleImageCrop,
+ help: getImageCropHelp
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SelectControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Image size'),
+ value: sizeSlug,
+ options: imageSizeOptions,
+ onChange: updateImagesSize,
+ hideCancelButton: true
+ })]
+ })
+ }), noticeUI, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(v1_gallery, {
+ ...props,
+ selectedImage: selectedImage,
+ mediaPlaceholder: mediaPlaceholder,
+ onMoveBackward: onMoveBackward,
+ onMoveForward: onMoveForward,
+ onRemoveImage: onRemoveImage,
+ onSelectImage: onSelectImage,
+ onDeselectImage: onDeselectImage,
+ onSetImageAttributes: setImageAttributes,
+ blockProps: blockProps
+ // This prop is used by gallery.native.js.
+ ,
+ onFocusGalleryCaption: onFocusGalleryCaption
+ })]
+ });
}
/* 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));
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/edit-wrapper.js
-
/**
* WordPress dependencies
*/
@@ -21789,20 +22387,20 @@ function edit_GalleryEdit(props) {
* or the refactored version with InnerBlocks. This is to prevent conditional
* use of hooks lint errors if adding this logic to the top of the edit component.
*/
+
function GalleryEditWrapper(props) {
if (!isGalleryV2Enabled()) {
- return (0,external_React_namespaceObject.createElement)(v1_edit, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(v1_edit, {
...props
});
}
- return (0,external_React_namespaceObject.createElement)(gallery_edit, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(gallery_edit, {
...props
});
}
/* 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
-
/**
* External dependencies
*/
@@ -21818,6 +22416,8 @@ function GalleryEditWrapper(props) {
*/
+
+
function saveV1({
attributes
}) {
@@ -21829,49 +22429,53 @@ function saveV1({
linkTo
} = attributes;
const className = `columns-${columns} ${imageCrop ? 'is-cropped' : ''}`;
- return (0,external_React_namespaceObject.createElement)("figure", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className
- })
- }, (0,external_React_namespaceObject.createElement)("ul", {
- className: "blocks-gallery-grid"
- }, images.map(image => {
- let href;
- switch (linkTo) {
- case v1_constants_LINK_DESTINATION_MEDIA:
- href = image.fullUrl || image.url;
- break;
- case v1_constants_LINK_DESTINATION_ATTACHMENT:
- href = image.link;
- break;
- }
- const img = (0,external_React_namespaceObject.createElement)("img", {
- src: image.url,
- alt: image.alt,
- "data-id": image.id,
- "data-full-url": image.fullUrl,
- "data-link": image.link,
- className: image.id ? `wp-image-${image.id}` : null
- });
- return (0,external_React_namespaceObject.createElement)("li", {
- key: image.id || image.url,
- className: "blocks-gallery-item"
- }, (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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ }),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
+ className: "blocks-gallery-grid",
+ children: images.map(image => {
+ let href;
+ switch (linkTo) {
+ case v1_constants_LINK_DESTINATION_MEDIA:
+ href = image.fullUrl || image.url;
+ break;
+ case v1_constants_LINK_DESTINATION_ATTACHMENT:
+ href = image.link;
+ break;
+ }
+ const img = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ src: image.url,
+ alt: image.alt,
+ "data-id": image.id,
+ "data-full-url": image.fullUrl,
+ "data-link": image.link,
+ className: image.id ? `wp-image-${image.id}` : null
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", {
+ className: "blocks-gallery-item",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
+ children: [href ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: href,
+ children: img
+ }) : img, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(image.caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "figcaption",
+ className: dist_clsx('blocks-gallery-item__caption', (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption')),
+ value: image.caption
+ })]
+ })
+ }, image.id || image.url);
+ })
+ }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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_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
- }));
+ className: dist_clsx('blocks-gallery-caption', (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption')),
+ value: caption
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/save.js
-
/**
* External dependencies
*/
@@ -21887,6 +22491,8 @@ function saveV1({
*/
+
+
function saveWithInnerBlocks({
attributes
}) {
@@ -21900,7 +22506,7 @@ function saveWithInnerBlocks({
columns,
imageCrop
} = attributes;
- const className = classnames_default()('has-nested-images', {
+ const className = dist_clsx('has-nested-images', {
[`columns-${columns}`]: columns !== undefined,
[`columns-default`]: columns === undefined,
'is-cropped': imageCrop
@@ -21909,13 +22515,14 @@ function saveWithInnerBlocks({
className
});
const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
- return (0,external_React_namespaceObject.createElement)("figure", {
- ...innerBlocksProps
- }, 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
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
+ ...innerBlocksProps,
+ children: [innerBlocksProps.children, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "figcaption",
+ className: dist_clsx('blocks-gallery-caption', (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption')),
+ value: caption
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/transforms.js
@@ -22385,7 +22992,6 @@ const gallery_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/group/deprecated.js
-
/**
* External dependencies
*/
@@ -22395,6 +23001,7 @@ const gallery_init = () => initBlock({
* WordPress dependencies
*/
+
const migrateAttributes = attributes => {
if (!attributes.tagName) {
attributes = {
@@ -22491,7 +23098,7 @@ const group_deprecated_deprecated = [
tagName: Tag
}
}) {
- return (0,external_React_namespaceObject.createElement)(Tag, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, {
...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(external_wp_blockEditor_namespaceObject.useBlockProps.save())
});
},
@@ -22548,11 +23155,13 @@ const group_deprecated_deprecated = [
const {
tagName: Tag
} = attributes;
- return (0,external_React_namespaceObject.createElement)(Tag, {
- ...external_wp_blockEditor_namespaceObject.useBlockProps.save()
- }, (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-group__inner-container"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, {
+ ...external_wp_blockEditor_namespaceObject.useBlockProps.save(),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-group__inner-container",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
+ })
+ });
}
},
// Version of the block without global styles support
@@ -22588,7 +23197,7 @@ const group_deprecated_deprecated = [
} = attributes;
const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('background-color', backgroundColor);
const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('color', textColor);
- const className = classnames_default()(backgroundClass, textClass, {
+ const className = dist_clsx(backgroundClass, textClass, {
'has-text-color': textColor || customTextColor,
'has-background': backgroundColor || customBackgroundColor
});
@@ -22596,12 +23205,14 @@ const group_deprecated_deprecated = [
backgroundColor: backgroundClass ? undefined : customBackgroundColor,
color: textClass ? undefined : customTextColor
};
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
className: className,
- style: styles
- }, (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-group__inner-container"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)));
+ style: styles,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-group__inner-container",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
+ })
+ });
}
},
// Version of the group block with a bug that made text color class not applied.
@@ -22637,7 +23248,7 @@ const group_deprecated_deprecated = [
} = attributes;
const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('background-color', backgroundColor);
const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('color', textColor);
- const className = classnames_default()(backgroundClass, {
+ const className = dist_clsx(backgroundClass, {
'has-text-color': textColor || customTextColor,
'has-background': backgroundColor || customBackgroundColor
});
@@ -22645,12 +23256,14 @@ const group_deprecated_deprecated = [
backgroundColor: backgroundClass ? undefined : customBackgroundColor,
color: textClass ? undefined : customTextColor
};
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
className: className,
- style: styles
- }, (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-group__inner-container"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)));
+ style: styles,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-group__inner-container",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
+ })
+ });
}
},
// v1 of group block. Deprecated to add an inner-container div around `InnerBlocks.Content`.
@@ -22677,22 +23290,22 @@ const group_deprecated_deprecated = [
customBackgroundColor
} = attributes;
const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('background-color', backgroundColor);
- const className = classnames_default()(backgroundClass, {
+ const className = dist_clsx(backgroundClass, {
'has-background': backgroundColor || customBackgroundColor
});
const styles = {
backgroundColor: backgroundClass ? undefined : customBackgroundColor
};
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
className: className,
- style: styles
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null));
+ style: styles,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
+ });
}
}];
/* harmony default export */ const group_deprecated = (group_deprecated_deprecated);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/group/placeholder.js
-
/**
* WordPress dependencies
*/
@@ -22710,42 +23323,45 @@ const group_deprecated_deprecated = [
*
* @return {JSX.Element} The SVG element.
*/
+
const getGroupPlaceholderIcons = (name = 'group') => {
const icons = {
- group: (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+ group: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
- width: "44",
- height: "32",
- viewBox: "0 0 44 32"
- }, (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+ width: "48",
+ height: "48",
+ viewBox: "0 0 48 48",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
+ d: "M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Z"
+ })
+ }),
+ 'group-row': /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
- width: "44",
- height: "32",
- viewBox: "0 0 44 32"
- }, (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+ width: "48",
+ height: "48",
+ viewBox: "0 0 48 48",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
+ d: "M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10Z"
+ })
+ }),
+ 'group-stack': /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
- width: "44",
- height: "32",
- viewBox: "0 0 44 32"
- }, (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+ width: "48",
+ height: "48",
+ viewBox: "0 0 48 48",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
+ d: "M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm0 17a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V27Z"
+ })
+ }),
+ 'group-grid': /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
- width: "44",
- height: "32",
- viewBox: "0 0 44 32"
- }, (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_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"
- }))
+ width: "48",
+ height: "48",
+ viewBox: "0 0 48 48",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
+ d: "M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10ZM0 27a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V27Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V27Z"
+ })
+ })
};
return icons?.[name];
};
@@ -22809,29 +23425,32 @@ function GroupPlaceHolder({
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
className: 'wp-block-group__placeholder'
});
- return (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, {
- instructions: (0,external_wp_i18n_namespaceObject.__)('Group blocks together. Select a layout:')
- }, (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_React_namespaceObject.createElement)("li", {
- key: variation.name
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- variant: "tertiary",
- icon: getGroupPlaceholderIcons(variation.name),
- iconSize: 44,
- onClick: () => onSelect(variation),
- className: "wp-block-group-placeholder__variation-button",
- label: `${variation.title}: ${variation.description}`
- }))))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, {
+ instructions: (0,external_wp_i18n_namespaceObject.__)('Group blocks together. Select a layout:'),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
+ role: "list",
+ className: "wp-block-group-placeholder__variations",
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Block variations'),
+ children: variations.map(variation => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ __next40pxDefaultSize: true,
+ variant: "tertiary",
+ icon: getGroupPlaceholderIcons(variation.name),
+ iconSize: 48,
+ onClick: () => onSelect(variation),
+ className: "wp-block-group-placeholder__variation-button",
+ label: `${variation.title}: ${variation.description}`
+ })
+ }, variation.name))
+ })
+ })
+ });
}
/* harmony default export */ const placeholder = (GroupPlaceHolder);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/group/edit.js
-
/**
* WordPress dependencies
*/
@@ -22856,6 +23475,9 @@ function GroupPlaceHolder({
*
* @return {JSX.Element} The control group.
*/
+
+
+
function GroupEditControls({
tagName,
onSelectTagName
@@ -22868,38 +23490,39 @@ 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, {
- group: "advanced"
- }, (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>)'),
- value: 'div'
- }, {
- label: '<header>',
- value: 'header'
- }, {
- label: '<main>',
- value: 'main'
- }, {
- label: '<section>',
- value: 'section'
- }, {
- label: '<article>',
- value: 'article'
- }, {
- label: '<aside>',
- value: 'aside'
- }, {
- label: '<footer>',
- value: 'footer'
- }],
- value: tagName,
- onChange: onSelectTagName,
- help: htmlElementMessages[tagName]
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ group: "advanced",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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>)'),
+ value: 'div'
+ }, {
+ label: '<header>',
+ value: 'header'
+ }, {
+ label: '<main>',
+ value: 'main'
+ }, {
+ label: '<section>',
+ value: 'section'
+ }, {
+ label: '<article>',
+ value: 'article'
+ }, {
+ label: '<aside>',
+ value: 'aside'
+ }, {
+ label: '<footer>',
+ value: 'footer'
+ }],
+ value: tagName,
+ onChange: onSelectTagName,
+ help: htmlElementMessages[tagName]
+ })
+ });
}
function GroupEdit({
attributes,
@@ -22974,36 +23597,41 @@ function GroupEdit({
selectBlock(clientId, -1);
setShowPlaceholder(false);
};
- 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_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_React_namespaceObject.createElement)(TagName, {
- ...innerBlocksProps
- }), !layoutSupportEnabled && !showPlaceholder && (0,external_React_namespaceObject.createElement)(TagName, {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)("div", {
- ...innerBlocksProps
- })));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GroupEditControls, {
+ tagName: TagName,
+ onSelectTagName: value => setAttributes({
+ tagName: value
+ })
+ }), showPlaceholder && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.View, {
+ children: [innerBlocksProps.children, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(placeholder, {
+ name: name,
+ onSelect: selectVariation
+ })]
+ }), layoutSupportEnabled && !showPlaceholder && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
+ ...innerBlocksProps
+ }), !layoutSupportEnabled && !showPlaceholder && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...innerBlocksProps
+ })
+ })]
+ });
}
/* harmony default export */ const group_edit = (GroupEdit);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/group/save.js
-
/**
* WordPress dependencies
*/
+
function group_save_save({
attributes: {
tagName: Tag
}
}) {
- return (0,external_React_namespaceObject.createElement)(Tag, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, {
...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(external_wp_blockEditor_namespaceObject.useBlockProps.save())
});
}
@@ -23049,47 +23677,50 @@ const group_transforms_transforms = {
/* harmony default export */ const group_transforms = (group_transforms_transforms);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/row.js
-
/**
* WordPress dependencies
*/
-const row = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const row = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_row = (row);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/stack.js
-
/**
* WordPress dependencies
*/
-const stack = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const stack = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_stack = (stack);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/grid.js
-
/**
* WordPress dependencies
*/
-const grid = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const grid = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_grid = (grid);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/group/variations.js
@@ -23137,22 +23768,19 @@ const group_variations_variations = [{
scope: ['block', 'inserter', 'transform'],
isActive: blockAttributes => blockAttributes.layout?.type === 'flex' && blockAttributes.layout?.orientation === 'vertical',
icon: library_stack
+}, {
+ name: 'group-grid',
+ title: (0,external_wp_i18n_namespaceObject.__)('Grid'),
+ description: (0,external_wp_i18n_namespaceObject.__)('Arrange blocks in a grid.'),
+ attributes: {
+ layout: {
+ type: 'grid'
+ }
+ },
+ scope: ['block', 'inserter', 'transform'],
+ isActive: blockAttributes => blockAttributes.layout?.type === 'grid',
+ icon: library_grid
}];
-if (window?.__experimentalEnableGroupGridVariation) {
- group_variations_variations.push({
- name: 'group-grid',
- title: (0,external_wp_i18n_namespaceObject.__)('Grid'),
- description: (0,external_wp_i18n_namespaceObject.__)('Arrange blocks in a grid.'),
- attributes: {
- layout: {
- type: 'grid'
- }
- },
- scope: ['block', 'inserter', 'transform'],
- isActive: blockAttributes => blockAttributes.layout?.type === 'grid',
- icon: library_grid
- });
-}
/* harmony default export */ const group_variations = (group_variations_variations);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/group/index.js
@@ -23275,14 +23903,6 @@ const {
const group_settings = {
icon: library_group,
example: {
- attributes: {
- style: {
- color: {
- text: '#000000',
- background: '#ffffff'
- }
- }
- },
innerBlocks: [{
name: 'core/paragraph',
attributes: {
@@ -23340,21 +23960,21 @@ const group_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/heading.js
-
/**
* WordPress dependencies
*/
-const heading = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const heading = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "M6 5V18.5911L12 13.8473L18 18.5911V5H6Z"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
+ d: "M6 5V18.5911L12 13.8473L18 18.5911V5H6Z"
+ })
+});
/* harmony default export */ const library_heading = (heading);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/deprecated.js
-
/**
* External dependencies
*/
@@ -23364,6 +23984,7 @@ const heading = (0,external_React_namespaceObject.createElement)(external_wp_pri
* WordPress dependencies
*/
+
const blockSupports = {
className: false,
anchor: true
@@ -23439,10 +24060,10 @@ const heading_deprecated_v1 = {
} = attributes;
const tagName = 'h' + level;
const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('color', textColor);
- const className = classnames_default()({
+ const className = dist_clsx({
[textClass]: textClass
});
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
className: className ? className : undefined,
tagName: tagName,
style: {
@@ -23476,11 +24097,11 @@ const heading_deprecated_v2 = {
} = attributes;
const tagName = 'h' + level;
const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('color', textColor);
- const className = classnames_default()({
+ const className = dist_clsx({
[textClass]: textClass,
[`has-text-align-${align}`]: align
});
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
className: className ? className : undefined,
tagName: tagName,
style: {
@@ -23515,12 +24136,12 @@ const heading_deprecated_v3 = {
} = attributes;
const tagName = 'h' + level;
const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('color', textColor);
- const className = classnames_default()({
+ const className = dist_clsx({
[textClass]: textClass,
'has-text-color': textColor || customTextColor,
[`has-text-align-${align}`]: align
});
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
className: className ? className : undefined,
tagName: tagName,
style: {
@@ -23564,16 +24185,17 @@ const heading_deprecated_v4 = {
level
} = attributes;
const TagName = 'h' + level;
- const className = classnames_default()({
+ const className = dist_clsx({
[`has-text-align-${align}`]: align
});
- return (0,external_React_namespaceObject.createElement)(TagName, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: content
})
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- value: content
- }));
+ });
}
};
@@ -23643,16 +24265,17 @@ const heading_deprecated_v5 = {
level
} = attributes;
const TagName = 'h' + level;
- const className = classnames_default()({
+ const className = dist_clsx({
[`has-text-align-${textAlign}`]: textAlign
});
- return (0,external_React_namespaceObject.createElement)(TagName, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: 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];
@@ -23740,7 +24363,6 @@ const setAnchor = (clientId, anchor) => {
};
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/edit.js
-
/**
* External dependencies
*/
@@ -23754,11 +24376,13 @@ const setAnchor = (clientId, anchor) => {
-
/**
* Internal dependencies
*/
+
+
+
function HeadingEdit({
attributes,
setAttributes,
@@ -23776,7 +24400,7 @@ function HeadingEdit({
} = attributes;
const tagName = 'h' + level;
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()({
+ className: dist_clsx({
[`has-text-align-${textAlign}`]: textAlign
}),
style
@@ -23825,56 +24449,42 @@ function HeadingEdit({
}
setAttributes(newAttrs);
};
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.HeadingLevelDropdown, {
- value: level,
- onChange: newLevel => setAttributes({
- level: newLevel
- })
- }), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
- value: textAlign,
- onChange: nextAlign => {
- setAttributes({
- textAlign: nextAlign
- });
- }
- })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, {
- identifier: "content",
- tagName: tagName,
- value: content,
- onChange: onContentChange,
- onMerge: mergeBlocks,
- onSplit: (value, isOriginal) => {
- let block;
- if (isOriginal || value) {
- block = (0,external_wp_blocks_namespaceObject.createBlock)('core/heading', {
- ...attributes,
- content: value
- });
- } else {
- var _getDefaultBlockName;
- block = (0,external_wp_blocks_namespaceObject.createBlock)((_getDefaultBlockName = (0,external_wp_blocks_namespaceObject.getDefaultBlockName)()) !== null && _getDefaultBlockName !== void 0 ? _getDefaultBlockName : 'core/heading');
- }
- if (isOriginal) {
- block.clientId = clientId;
- }
- return block;
- },
- onReplace: onReplace,
- onRemove: () => onReplace([]),
- placeholder: placeholder || (0,external_wp_i18n_namespaceObject.__)('Heading'),
- textAlign: textAlign,
- ...(external_wp_element_namespaceObject.Platform.isNative && {
- deleteEnter: true
- }),
- ...blockProps
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [blockEditingMode === 'default' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.HeadingLevelDropdown, {
+ value: level,
+ onChange: newLevel => setAttributes({
+ level: newLevel
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
+ value: textAlign,
+ onChange: nextAlign => {
+ setAttributes({
+ textAlign: nextAlign
+ });
+ }
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
+ identifier: "content",
+ tagName: tagName,
+ value: content,
+ onChange: onContentChange,
+ onMerge: mergeBlocks,
+ onReplace: onReplace,
+ onRemove: () => onReplace([]),
+ placeholder: placeholder || (0,external_wp_i18n_namespaceObject.__)('Heading'),
+ textAlign: textAlign,
+ ...(external_wp_element_namespaceObject.Platform.isNative && {
+ deleteEnter: true
+ }),
+ ...blockProps
+ })]
+ });
}
/* harmony default export */ const heading_edit = (HeadingEdit);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/save.js
-
/**
* External dependencies
*/
@@ -23884,6 +24494,7 @@ function HeadingEdit({
* WordPress dependencies
*/
+
function heading_save_save({
attributes
}) {
@@ -23893,16 +24504,17 @@ function heading_save_save({
level
} = attributes;
const TagName = 'h' + level;
- const className = classnames_default()({
+ const className = dist_clsx({
[`has-text-align-${textAlign}`]: textAlign
});
- return (0,external_React_namespaceObject.createElement)(TagName, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: content
})
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- value: content
- }));
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/shared.js
@@ -24060,6 +24672,7 @@ const heading_metadata = {
align: ["wide", "full"],
anchor: true,
className: true,
+ splitting: true,
color: {
gradients: true,
link: true,
@@ -24121,7 +24734,7 @@ const heading_settings = {
level
} = attributes;
const customName = attributes?.metadata?.name;
- const hasContent = content?.length > 0;
+ const hasContent = content?.trim().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.
@@ -24151,21 +24764,21 @@ const heading_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/home.js
-
/**
* WordPress dependencies
*/
-const home = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const home = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_home = (home);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/home-link/edit.js
-
/**
* External dependencies
*/
@@ -24179,6 +24792,8 @@ const home = (0,external_React_namespaceObject.createElement)(external_wp_primit
+
+
const preventDefault = event => event.preventDefault();
function HomeEdit({
attributes,
@@ -24204,7 +24819,7 @@ function HomeEdit({
style
} = context;
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()('wp-block-navigation-item', {
+ className: dist_clsx('wp-block-navigation-item', {
'has-text-color': !!textColor || !!style?.color?.text,
[`has-${textColor}-color`]: !!textColor,
'has-background': !!backgroundColor || !!style?.color?.background,
@@ -24226,36 +24841,40 @@ function HomeEdit({
});
}
}, [label]);
- return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)("a", {
- className: "wp-block-home-link__content wp-block-navigation-item__content",
- href: homeUrl,
- onClick: preventDefault
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, {
- identifier: "label",
- className: "wp-block-home-link__label",
- value: label,
- onChange: labelValue => {
- setAttributes({
- label: labelValue
- });
- },
- "aria-label": (0,external_wp_i18n_namespaceObject.__)('Home link text'),
- placeholder: (0,external_wp_i18n_namespaceObject.__)('Add home link'),
- withoutInteractiveFormatting: true,
- allowedFormats: ['core/bold', 'core/italic', 'core/image', 'core/strikethrough']
- }))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ className: "wp-block-home-link__content wp-block-navigation-item__content",
+ href: homeUrl,
+ onClick: preventDefault,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
+ identifier: "label",
+ className: "wp-block-home-link__label",
+ value: label,
+ onChange: labelValue => {
+ setAttributes({
+ label: labelValue
+ });
+ },
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Home link text'),
+ placeholder: (0,external_wp_i18n_namespaceObject.__)('Add home link'),
+ withoutInteractiveFormatting: true,
+ allowedFormats: ['core/bold', 'core/italic', 'core/image', 'core/strikethrough']
+ })
+ })
+ })
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/home-link/save.js
-
/**
* WordPress dependencies
*/
+
function home_link_save_save() {
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/home-link/index.js
@@ -24330,21 +24949,21 @@ const home_link_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/html.js
-
/**
* WordPress dependencies
*/
-const html = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const html = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_html = (html);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/html/preview.js
-
/**
* WordPress dependencies
*/
@@ -24356,6 +24975,9 @@ const html = (0,external_React_namespaceObject.createElement)(external_wp_primit
// Default styles used to unset some of the styles
// that might be inherited from the editor style.
+
+
+
const DEFAULT_STYLES = `
html,body,:root {
margin: 0 !important;
@@ -24370,18 +24992,19 @@ function HTMLEditPreview({
}) {
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,
- title: (0,external_wp_i18n_namespaceObject.__)('Custom HTML Preview'),
- tabIndex: -1
- }), !isSelected && (0,external_React_namespaceObject.createElement)("div", {
- className: "block-library-html__preview-overlay"
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SandBox, {
+ html: content,
+ styles: styles,
+ title: (0,external_wp_i18n_namespaceObject.__)('Custom HTML Preview'),
+ tabIndex: -1
+ }), !isSelected && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "block-library-html__preview-overlay"
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/html/edit.js
-
/**
* WordPress dependencies
*/
@@ -24395,6 +25018,9 @@ function HTMLEditPreview({
* Internal dependencies
*/
+
+
+
function HTMLEdit({
attributes,
setAttributes,
@@ -24413,41 +25039,51 @@ function HTMLEdit({
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_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_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(HTMLEditPreview, {
- content: attributes.content,
- isSelected: isSelected
- }), (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
- }),
- placeholder: (0,external_wp_i18n_namespaceObject.__)('Write HTML…'),
- "aria-label": (0,external_wp_i18n_namespaceObject.__)('HTML')
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ ...blockProps,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.ToolbarGroup, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
+ isPressed: !isPreview,
+ onClick: switchToHTML,
+ children: "HTML"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
+ isPressed: isPreview,
+ onClick: switchToPreview,
+ children: (0,external_wp_i18n_namespaceObject.__)('Preview')
+ })]
+ })
+ }), isPreview || isDisabled ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(HTMLEditPreview, {
+ content: attributes.content,
+ isSelected: isSelected
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, {
+ id: instanceId,
+ children: (0,external_wp_i18n_namespaceObject.__)('HTML preview is not yet fully accessible. Please switch screen reader to virtualized mode to navigate the below iFrame.')
+ })]
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.PlainText, {
+ value: attributes.content,
+ onChange: content => setAttributes({
+ content
+ }),
+ placeholder: (0,external_wp_i18n_namespaceObject.__)('Write HTML…'),
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('HTML')
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/html/save.js
-
/**
* WordPress dependencies
*/
+
function html_save_save({
attributes
}) {
- return (0,external_React_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, null, attributes.content);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, {
+ children: attributes.content
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/html/transforms.js
@@ -24536,7 +25172,6 @@ const html_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/deprecated.js
-
/**
* External dependencies
*/
@@ -24553,6 +25188,9 @@ const html_init = () => initBlock({
*
* @see https://github.com/WordPress/gutenberg/pull/4898
*/
+
+
+
const image_deprecated_v1 = {
attributes: {
url: {
@@ -24608,7 +25246,7 @@ const image_deprecated_v1 = {
width,
height
} : {};
- const image = (0,external_React_namespaceObject.createElement)("img", {
+ const image = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
src: url,
alt: alt,
...extraImageProps
@@ -24623,15 +25261,17 @@ const image_deprecated_v1 = {
maxWidth: '50%'
};
}
- return (0,external_React_namespaceObject.createElement)("figure", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
className: align ? `align${align}` : null,
- style: figureStyle
- }, href ? (0,external_React_namespaceObject.createElement)("a", {
- href: href
- }, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "figcaption",
- value: caption
- }));
+ style: figureStyle,
+ children: [href ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: href,
+ children: image
+ }) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "figcaption",
+ value: caption
+ })]
+ });
}
};
@@ -24693,21 +25333,23 @@ const image_deprecated_v2 = {
height,
id
} = attributes;
- const image = (0,external_React_namespaceObject.createElement)("img", {
+ const image = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
src: url,
alt: alt,
className: id ? `wp-image-${id}` : null,
width: width,
height: height
});
- return (0,external_React_namespaceObject.createElement)("figure", {
- className: align ? `align${align}` : null
- }, href ? (0,external_React_namespaceObject.createElement)("a", {
- href: href
- }, 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 /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
+ className: align ? `align${align}` : null,
+ children: [href ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: href,
+ children: image
+ }) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "figcaption",
+ value: caption
+ })]
+ });
}
};
@@ -24772,25 +25414,27 @@ const image_deprecated_v3 = {
height,
id
} = attributes;
- const classes = classnames_default()({
+ const classes = dist_clsx({
[`align${align}`]: align,
'is-resized': width || height
});
- const image = (0,external_React_namespaceObject.createElement)("img", {
+ const image = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
src: url,
alt: alt,
className: id ? `wp-image-${id}` : null,
width: width,
height: height
});
- return (0,external_React_namespaceObject.createElement)("figure", {
- className: classes
- }, href ? (0,external_React_namespaceObject.createElement)("a", {
- href: href
- }, 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 /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
+ className: classes,
+ children: [href ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: href,
+ children: image
+ }) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "figcaption",
+ value: caption
+ })]
+ });
}
};
@@ -24890,12 +25534,12 @@ const image_deprecated_v4 = {
title
} = attributes;
const newRel = !rel ? undefined : rel;
- const classes = classnames_default()({
+ const classes = dist_clsx({
[`align${align}`]: align,
[`size-${sizeSlug}`]: sizeSlug,
'is-resized': width || height
});
- const image = (0,external_React_namespaceObject.createElement)("img", {
+ const image = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
src: url,
alt: alt,
className: id ? `wp-image-${id}` : null,
@@ -24903,27 +25547,33 @@ const image_deprecated_v4 = {
height: height,
title: title
});
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "figcaption",
- value: caption
- }));
+ const figure = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [href ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ className: linkClass,
+ href: href,
+ target: linkTarget,
+ rel: newRel,
+ children: image
+ }) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "figcaption",
+ value: caption
+ })]
+ });
if ('left' === align || 'right' === align || 'center' === align) {
- return (0,external_React_namespaceObject.createElement)("div", {
- ...external_wp_blockEditor_namespaceObject.useBlockProps.save()
- }, (0,external_React_namespaceObject.createElement)("figure", {
- className: classes
- }, figure));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...external_wp_blockEditor_namespaceObject.useBlockProps.save(),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", {
+ className: classes,
+ children: figure
+ })
+ });
}
- return (0,external_React_namespaceObject.createElement)("figure", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className: classes
- })
- }, figure);
+ }),
+ children: figure
+ });
}
};
@@ -25044,12 +25694,12 @@ const image_deprecated_v5 = {
title
} = attributes;
const newRel = !rel ? undefined : rel;
- const classes = classnames_default()({
+ const classes = dist_clsx({
[`align${align}`]: align,
[`size-${sizeSlug}`]: sizeSlug,
'is-resized': width || height
});
- const image = (0,external_React_namespaceObject.createElement)("img", {
+ const image = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
src: url,
alt: alt,
className: id ? `wp-image-${id}` : null,
@@ -25057,20 +25707,24 @@ const image_deprecated_v5 = {
height: height,
title: title
});
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "figcaption",
- value: caption
- }));
- return (0,external_React_namespaceObject.createElement)("figure", {
+ const figure = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [href ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ className: linkClass,
+ href: href,
+ target: linkTarget,
+ rel: newRel,
+ children: image
+ }) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "figcaption",
+ value: caption
+ })]
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className: classes
- })
- }, figure);
+ }),
+ children: figure
+ });
}
};
@@ -25214,16 +25868,16 @@ const image_deprecated_v6 = {
} = attributes;
const newRel = !rel ? undefined : rel;
const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
- const classes = classnames_default()({
+ const classes = dist_clsx({
[`align${align}`]: align,
[`size-${sizeSlug}`]: sizeSlug,
'is-resized': width || height,
'has-custom-border': !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
});
- const imageClasses = classnames_default()(borderProps.className, {
+ const imageClasses = dist_clsx(borderProps.className, {
[`wp-image-${id}`]: !!id
});
- const image = (0,external_React_namespaceObject.createElement)("img", {
+ const image = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
src: url,
alt: alt,
className: imageClasses || undefined,
@@ -25236,21 +25890,25 @@ const image_deprecated_v6 = {
height: height,
title: title
});
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'),
- tagName: "figcaption",
- value: caption
- }));
- return (0,external_React_namespaceObject.createElement)("figure", {
+ const figure = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [href ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ className: linkClass,
+ href: href,
+ target: linkTarget,
+ rel: newRel,
+ children: image
+ }) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'),
+ tagName: "figcaption",
+ value: caption
+ })]
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className: classes
- })
- }, figure);
+ }),
+ children: figure
+ });
}
};
@@ -25396,16 +26054,16 @@ const image_deprecated_v7 = {
} = attributes;
const newRel = !rel ? undefined : rel;
const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
- const classes = classnames_default()({
+ const classes = dist_clsx({
[`align${align}`]: align,
[`size-${sizeSlug}`]: sizeSlug,
'is-resized': width || height,
'has-custom-border': !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
});
- const imageClasses = classnames_default()(borderProps.className, {
+ const imageClasses = dist_clsx(borderProps.className, {
[`wp-image-${id}`]: !!id
});
- const image = (0,external_React_namespaceObject.createElement)("img", {
+ const image = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
src: url,
alt: alt,
className: imageClasses || undefined,
@@ -25420,21 +26078,25 @@ const image_deprecated_v7 = {
height: height,
title: title
});
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'),
- tagName: "figcaption",
- value: caption
- }));
- return (0,external_React_namespaceObject.createElement)("figure", {
+ const figure = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [href ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ className: linkClass,
+ href: href,
+ target: linkTarget,
+ rel: newRel,
+ children: image
+ }) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'),
+ tagName: "figcaption",
+ value: caption
+ })]
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className: classes
- })
- }, figure);
+ }),
+ children: figure
+ });
}
};
const deprecated_v8 = {
@@ -25596,16 +26258,16 @@ const deprecated_v8 = {
} = attributes;
const newRel = !rel ? undefined : rel;
const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
- const classes = classnames_default()({
+ const classes = dist_clsx({
[`align${align}`]: align,
[`size-${sizeSlug}`]: sizeSlug,
'is-resized': width || height,
'has-custom-border': !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
});
- const imageClasses = classnames_default()(borderProps.className, {
+ const imageClasses = dist_clsx(borderProps.className, {
[`wp-image-${id}`]: !!id
});
- const image = (0,external_React_namespaceObject.createElement)("img", {
+ const image = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
src: url,
alt: alt,
className: imageClasses || undefined,
@@ -25618,116 +26280,90 @@ const deprecated_v8 = {
},
title: title
});
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'),
- tagName: "figcaption",
- value: caption
- }));
- return (0,external_React_namespaceObject.createElement)("figure", {
+ const figure = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [href ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ className: linkClass,
+ href: href,
+ target: linkTarget,
+ rel: newRel,
+ children: image
+ }) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'),
+ tagName: "figcaption",
+ value: caption
+ })]
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className: classes
- })
- }, figure);
+ }),
+ children: figure
+ });
}
};
/* 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, {
+
+const plugins = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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
-
/**
* WordPress dependencies
*/
-const crop = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const crop = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_crop = (crop);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/overlay-text.js
-
/**
* WordPress dependencies
*/
-const overlayText = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const overlayText = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const overlay_text = (overlayText);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/upload.js
-
/**
* WordPress dependencies
*/
-const upload = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const upload = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_upload = (upload);
-;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/use-client-width.js
-/**
- * WordPress dependencies
- */
-
-function useClientWidth(ref, dependencies) {
- const [clientWidth, setClientWidth] = (0,external_wp_element_namespaceObject.useState)();
- function calculateClientWidth() {
- setClientWidth(ref.current?.clientWidth);
- }
- (0,external_wp_element_namespaceObject.useEffect)(calculateClientWidth, dependencies);
- (0,external_wp_element_namespaceObject.useEffect)(() => {
- const {
- defaultView
- } = ref.current.ownerDocument;
- defaultView.addEventListener('resize', calculateClientWidth);
- return () => {
- defaultView.removeEventListener('resize', calculateClientWidth);
- };
- }, []);
- 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
-
/**
* WordPress dependencies
*/
@@ -25753,13 +26389,15 @@ const TOOLSPANEL_DROPDOWNMENU_PROPS = {
-
/**
* Module constants
*/
+
+
+
const {
DimensionsTool,
ResolutionTool
@@ -25782,7 +26420,7 @@ const ImageWrapper = ({
if (!href) {
return children;
}
- return (0,external_React_namespaceObject.createElement)("a", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
href: href,
onClick: event => event.preventDefault(),
"aria-disabled": true,
@@ -25794,8 +26432,9 @@ const ImageWrapper = ({
pointerEvents: 'none',
cursor: 'default',
display: 'inline'
- }
- }, children);
+ },
+ children: children
+ });
};
function image_Image({
temporaryURL,
@@ -25807,10 +26446,10 @@ function image_Image({
onSelectImage,
onSelectURL,
onUploadError,
- containerRef,
context,
clientId,
- blockEditingMode
+ blockEditingMode,
+ parentLayoutType
}) {
const {
url = '',
@@ -25881,10 +26520,9 @@ function image_Image({
}, setLoadedNaturalSize] = (0,external_wp_element_namespaceObject.useState)({});
const [isEditingImage, setIsEditingImage] = (0,external_wp_element_namespaceObject.useState)(false);
const [externalBlob, setExternalBlob] = (0,external_wp_element_namespaceObject.useState)();
- const clientWidth = useClientWidth(containerRef, [align]);
const hasNonContentControls = blockEditingMode === 'default';
const isContentOnlyMode = blockEditingMode === 'contentOnly';
- const isResizable = allowResize && hasNonContentControls && !isWideAligned && isLargeViewport;
+ const isResizable = allowResize && hasNonContentControls && !isWideAligned && isLargeViewport && parentLayoutType !== 'grid';
const imageSizeOptions = imageSizes.filter(({
slug
}) => image?.media_details?.sizes?.[slug]?.source_url).map(({
@@ -25903,7 +26541,9 @@ function image_Image({
setExternalBlob();
return;
}
- if (externalBlob) return;
+ if (externalBlob) {
+ return;
+ }
window
// Avoid cache, which seems to help avoid CORS problems.
.fetch(url.includes('?') ? url : url + '?').then(response => response.blob()).then(blob => setExternalBlob(blob))
@@ -26053,7 +26693,8 @@ function image_Image({
// remove that override, even if the lightbox UI is disabled in the settings.
!!lightbox && lightbox?.enabled !== lightboxSetting?.enabled || lightboxSetting?.allowEditing;
const lightboxChecked = !!lightbox?.enabled || !lightbox && !!lightboxSetting?.enabled;
- const dimensionsControl = (0,external_React_namespaceObject.createElement)(DimensionsTool, {
+ const dropdownMenuProps = useToolsPanelDropdownMenuProps();
+ const dimensionsControl = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DimensionsTool, {
value: {
width,
height,
@@ -26095,11 +26736,15 @@ function image_Image({
lightbox: undefined
});
};
- 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,
- dropdownMenuProps: TOOLSPANEL_DROPDOWNMENU_PROPS
- }, isResizable && dimensionsControl));
+ const sizeControls = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanel, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ resetAll: resetAll,
+ dropdownMenuProps: dropdownMenuProps,
+ children: isResizable && dimensionsControl
+ })
+ });
+ const arePatternOverridesEnabled = metadata?.bindings?.__default?.source === 'core/pattern-overrides';
const {
lockUrlControls = false,
lockHrefControls = false,
@@ -26116,172 +26761,226 @@ function image_Image({
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 hasParentPattern = !!context['pattern/overrides'];
const urlBindingSource = getBlockBindingsSource(urlBinding?.source);
const altBindingSource = getBlockBindingsSource(altBinding?.source);
const titleBindingSource = getBlockBindingsSource(titleBinding?.source);
return {
- lockUrlControls: !!urlBinding && (!urlBindingSource || urlBindingSource?.lockAttributesEditing),
+ lockUrlControls: !!urlBinding && !urlBindingSource?.canUserEditValue({
+ select,
+ context,
+ args: urlBinding?.args
+ }),
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,
+ hasParentPattern || arePatternOverridesEnabled,
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),
+ lockAltControls: !!altBinding && !altBindingSource?.canUserEditValue({
+ select,
+ context,
+ args: altBinding?.args
+ }),
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),
+ lockTitleControls: !!titleBinding && !titleBindingSource?.canUserEditValue({
+ select,
+ context,
+ args: titleBinding?.args
+ }),
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"
- }, isSingleSelected && !isEditingImage && !lockHrefControls && !lockUrlControls && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalImageURLInputUI, {
- url: href || '',
- onChangeUrl: onSetHref,
- linkDestination: linkDestination,
- mediaUrl: image && image.source_url || url,
- mediaLink: image && image.link,
- linkTarget: linkTarget,
- linkClass: linkClass,
- rel: rel,
- showLightboxSetting: showLightboxSetting,
- lightboxEnabled: lightboxChecked,
- onSetLightbox: onSetLightbox,
- resetLightbox: resetLightbox
- }), allowCrop && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, {
- onClick: () => setIsEditingImage(true),
- icon: library_crop,
- label: (0,external_wp_i18n_namespaceObject.__)('Crop')
- }), 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
- })), isSingleSelected && !isEditingImage && !lockUrlControls && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, {
- group: "other"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, {
- mediaId: id,
- mediaURL: url,
- allowedTypes: constants_ALLOWED_MEDIA_TYPES,
- accept: "image/*",
- onSelect: onSelectImage,
- onSelectURL: onSelectURL,
- onError: onUploadError
- })), 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 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,
- 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,
- onDeselect: () => setAttributes({
- alt: undefined
- })
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextareaControl, {
- label: (0,external_wp_i18n_namespaceObject.__)('Alternative text'),
- value: alt || '',
- onChange: updateAlt,
- 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_React_namespaceObject.createElement)("br", null), (0,external_wp_i18n_namespaceObject.__)('Leave empty if decorative.')),
- __nextHasNoMarginBottom: true
- })), isResizable && dimensionsControl, !!imageSizeOptions.length && (0,external_React_namespaceObject.createElement)(ResolutionTool, {
- value: sizeSlug,
- onChange: updateImage,
- options: imageSizeOptions
- }))), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, {
- group: "advanced"
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Title attribute'),
- value: title || '',
- onChange: onSetTitle,
- 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.)')))
- })));
+ }, [arePatternOverridesEnabled, context, isSingleSelected, metadata?.bindings]);
+ const showUrlInput = isSingleSelected && !isEditingImage && !lockHrefControls && !lockUrlControls;
+ const showCoverControls = isSingleSelected && canInsertCover;
+ const showBlockControls = showUrlInput || allowCrop || showCoverControls;
+ const controls = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [showBlockControls && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: [showUrlInput && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalImageURLInputUI, {
+ url: href || '',
+ onChangeUrl: onSetHref,
+ linkDestination: linkDestination,
+ mediaUrl: image && image.source_url || url,
+ mediaLink: image && image.link,
+ linkTarget: linkTarget,
+ linkClass: linkClass,
+ rel: rel,
+ showLightboxSetting: showLightboxSetting,
+ lightboxEnabled: lightboxChecked,
+ onSetLightbox: onSetLightbox,
+ resetLightbox: resetLightbox
+ }), allowCrop && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
+ onClick: () => setIsEditingImage(true),
+ icon: library_crop,
+ label: (0,external_wp_i18n_namespaceObject.__)('Crop')
+ }), showCoverControls && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
+ icon: overlay_text,
+ label: (0,external_wp_i18n_namespaceObject.__)('Add text over image'),
+ onClick: switchToCover
+ })]
+ }), isSingleSelected && !isEditingImage && !lockUrlControls && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "other",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, {
+ mediaId: id,
+ mediaURL: url,
+ allowedTypes: constants_ALLOWED_MEDIA_TYPES,
+ accept: "image/*",
+ onSelect: onSelectImage,
+ onSelectURL: onSelectURL,
+ onError: onUploadError
+ })
+ }), isSingleSelected && externalBlob && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
+ onClick: uploadExternal,
+ icon: library_upload,
+ label: (0,external_wp_i18n_namespaceObject.__)('Upload to Media Library')
+ })
+ })
+ }), isContentOnlyMode &&
+ /*#__PURE__*/
+ // 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_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "other",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Dropdown, {
+ popoverProps: {
+ position: 'bottom right'
+ },
+ renderToggle: ({
+ isOpen,
+ onToggle
+ }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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();
+ }
+ },
+ children: (0,external_wp_i18n_namespaceObject._x)('Alt', 'Alternative text for an image. Block toolbar label, a low character count is preferred.')
+ }),
+ renderContent: () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: lockAltControlsMessage
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, {
+ href:
+ // translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
+ (0,external_wp_i18n_namespaceObject.__)('https://www.w3.org/WAI/tutorials/images/decision-tree/'),
+ children: (0,external_wp_i18n_namespaceObject.__)('Describe the purpose of the image.')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}), (0,external_wp_i18n_namespaceObject.__)('Leave empty if decorative.')]
+ }),
+ __nextHasNoMarginBottom: true
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Dropdown, {
+ popoverProps: {
+ position: 'bottom right'
+ },
+ renderToggle: ({
+ isOpen,
+ onToggle
+ }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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();
+ }
+ },
+ children: (0,external_wp_i18n_namespaceObject.__)('Title')
+ }),
+ renderContent: () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: lockTitleControlsMessage
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [(0,external_wp_i18n_namespaceObject.__)('Describe the role of this image on the page.'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, {
+ href: "https://www.w3.org/TR/html52/dom.html#the-title-attribute",
+ children: (0,external_wp_i18n_namespaceObject.__)('(Note: many devices and browsers do not display this text.)')
+ })]
+ })
+ })
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalToolsPanel, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ resetAll: resetAll,
+ dropdownMenuProps: dropdownMenuProps,
+ children: [isSingleSelected && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Alternative text'),
+ isShownByDefault: true,
+ hasValue: () => !!alt,
+ onDeselect: () => setAttributes({
+ alt: undefined
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextareaControl, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Alternative text'),
+ value: alt || '',
+ onChange: updateAlt,
+ readOnly: lockAltControls,
+ help: lockAltControls ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: lockAltControlsMessage
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, {
+ href:
+ // translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
+ (0,external_wp_i18n_namespaceObject.__)('https://www.w3.org/WAI/tutorials/images/decision-tree/'),
+ children: (0,external_wp_i18n_namespaceObject.__)('Describe the purpose of the image.')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}), (0,external_wp_i18n_namespaceObject.__)('Leave empty if decorative.')]
+ }),
+ __nextHasNoMarginBottom: true
+ })
+ }), isResizable && dimensionsControl, !!imageSizeOptions.length && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ResolutionTool, {
+ value: sizeSlug,
+ onChange: updateImage,
+ options: imageSizeOptions
+ })]
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ group: "advanced",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
+ __nextHasNoMarginBottom: true,
+ __next40pxDefaultSize: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Title attribute'),
+ value: title || '',
+ onChange: onSetTitle,
+ readOnly: lockTitleControls,
+ help: lockTitleControls ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: lockTitleControlsMessage
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [(0,external_wp_i18n_namespaceObject.__)('Describe the role of this image on the page.'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, {
+ href: "https://www.w3.org/TR/html52/dom.html#the-title-attribute",
+ children: (0,external_wp_i18n_namespaceObject.__)('(Note: many devices and browsers do not display this text.)')
+ })]
+ })
+ })
+ })]
+ });
const filename = (0,external_wp_url_namespaceObject.getFilename)(url);
let defaultedAlt;
if (alt) {
@@ -26296,61 +26995,62 @@ function image_Image({
const shadowProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetShadowClassesAndStyles)(attributes);
const isRounded = attributes.className?.includes('is-style-rounded');
let img =
+ /*#__PURE__*/
// 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_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("img", {
- src: temporaryURL || url,
- alt: defaultedAlt,
- onError: () => onImageError(),
- onLoad: event => {
- setLoadedNaturalSize({
- loadedNaturalWidth: event.target?.naturalWidth,
- loadedNaturalHeight: event.target?.naturalHeight
- });
- },
- ref: imageRef,
- className: borderProps.className,
- style: {
- width: width && height || aspectRatio ? '100%' : undefined,
- height: width && height || aspectRatio ? '100%' : undefined,
- objectFit: scale,
- ...borderProps.style,
- ...shadowProps.style
- }
- }), temporaryURL && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null))
+ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ src: temporaryURL || url,
+ alt: defaultedAlt,
+ onError: () => onImageError(),
+ onLoad: event => {
+ setLoadedNaturalSize({
+ loadedNaturalWidth: event.target?.naturalWidth,
+ loadedNaturalHeight: event.target?.naturalHeight
+ });
+ },
+ ref: imageRef,
+ className: borderProps.className,
+ style: {
+ width: width && height || aspectRatio ? '100%' : undefined,
+ height: width && height || aspectRatio ? '100%' : undefined,
+ objectFit: scale,
+ ...borderProps.style,
+ ...shadowProps.style
+ }
+ }), temporaryURL && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {})]
+ })
/* 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_React_namespaceObject.createElement)(ImageWrapper, {
- href: href
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalImageEditor, {
- id: id,
- url: url,
- width: numericWidth,
- height: numericHeight,
- clientWidth: fallbackClientWidth,
- naturalHeight: naturalHeight,
- naturalWidth: naturalWidth,
- onSaveImage: imageAttributes => setAttributes(imageAttributes),
- onFinishEditing: () => {
- setIsEditingImage(false);
- },
- borderProps: isRounded ? undefined : borderProps
- }));
+ img = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ImageWrapper, {
+ href: href,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalImageEditor, {
+ id: id,
+ url: url,
+ width: numericWidth,
+ height: numericHeight,
+ naturalHeight: naturalHeight,
+ naturalWidth: naturalWidth,
+ onSaveImage: imageAttributes => setAttributes(imageAttributes),
+ onFinishEditing: () => {
+ setIsEditingImage(false);
+ },
+ borderProps: isRounded ? undefined : borderProps
+ })
+ });
} else if (!isResizable) {
- img = (0,external_React_namespaceObject.createElement)("div", {
+ img = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
style: {
width,
height,
aspectRatio
- }
- }, (0,external_React_namespaceObject.createElement)(ImageWrapper, {
- href: href
- }, img));
+ },
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ImageWrapper, {
+ href: href,
+ children: img
+ })
+ });
} else {
const numericRatio = aspectRatio && evalAspectRatio(aspectRatio);
const customRatio = numericWidth / numericHeight;
@@ -26399,7 +27099,7 @@ function image_Image({
}
}
/* eslint-enable no-lonely-if */
- img = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ResizableBox, {
+ img = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ResizableBox, {
style: {
display: 'block',
objectFit: scale,
@@ -26434,28 +27134,31 @@ function image_Image({
aspectRatio: ratio === naturalRatio ? undefined : String(ratio)
});
},
- resizeRatio: align === 'center' ? 2 : 1
- }, (0,external_React_namespaceObject.createElement)(ImageWrapper, {
- href: href
- }, img));
+ resizeRatio: align === 'center' ? 2 : 1,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ImageWrapper, {
+ href: href,
+ children: img
+ })
+ });
}
if (!url && !temporaryURL) {
// Add all controls if the image attributes are connected.
return metadata?.bindings ? controls : sizeControls;
}
- 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
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [controls, img, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Caption, {
+ attributes: attributes,
+ setAttributes: setAttributes,
+ isSelected: isSingleSelected,
+ insertBlocksAfter: insertBlocksAfter,
+ label: (0,external_wp_i18n_namespaceObject.__)('Image caption text'),
+ showToolbarButton: isSingleSelected && hasNonContentControls && !arePatternOverridesEnabled,
+ readOnly: lockCaption
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/edit.js
-
/**
* External dependencies
*/
@@ -26480,10 +27183,13 @@ function image_Image({
+
/**
* Module constants
*/
+
+
const edit_pickRelevantMediaFiles = (image, size) => {
const imageProps = Object.fromEntries(Object.entries(image !== null && image !== void 0 ? image : {}).filter(([key]) => ['alt', 'id', 'link', 'caption'].includes(key)));
imageProps.url = image?.sizes?.[size]?.url || image?.media_details?.sizes?.[size]?.source_url || image.url;
@@ -26533,7 +27239,8 @@ function ImageEdit({
insertBlocksAfter,
onReplace,
context,
- clientId
+ clientId,
+ __unstableParentLayout: parentLayout
}) {
const {
url = '',
@@ -26548,7 +27255,9 @@ function ImageEdit({
align,
metadata
} = attributes;
- const [temporaryURL, setTemporaryURL] = (0,external_wp_element_namespaceObject.useState)();
+ const [temporaryURL, setTemporaryURL] = (0,external_wp_element_namespaceObject.useState)(() => {
+ return edit_isTemporaryImage(id, url) ? url : undefined;
+ });
const altRef = (0,external_wp_element_namespaceObject.useRef)();
(0,external_wp_element_namespaceObject.useEffect)(() => {
altRef.current = alt;
@@ -26570,8 +27279,7 @@ function ImageEdit({
scale: undefined
});
}
- }, [align]);
- const ref = (0,external_wp_element_namespaceObject.useRef)();
+ }, [__unstableMarkNextChangeAsNotPersistent, align, setAttributes]);
const {
getSettings
} = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
@@ -26693,62 +27401,29 @@ function ImageEdit({
});
}
}
- let isTemp = edit_isTemporaryImage(id, url);
-
- // Upload a temporary image on mount.
- (0,external_wp_element_namespaceObject.useEffect)(() => {
- if (!isTemp) {
- return;
- }
- const file = (0,external_wp_blob_namespaceObject.getBlobByURL)(url);
- if (file) {
- const {
- mediaUpload
- } = getSettings();
- if (!mediaUpload) {
- return;
- }
- mediaUpload({
- filesList: [file],
- onFileChange: ([img]) => {
- onSelectImage(img);
- },
- allowedTypes: constants_ALLOWED_MEDIA_TYPES,
- onError: message => {
- isTemp = false;
- onUploadError(message);
- }
- });
- }
- }, []);
-
- // If an image is temporary, revoke the Blob url when it is uploaded (and is
- // no longer temporary).
- (0,external_wp_element_namespaceObject.useEffect)(() => {
- if (isTemp) {
- setTemporaryURL(url);
- return;
- }
- (0,external_wp_blob_namespaceObject.revokeBlobURL)(temporaryURL);
- }, [isTemp, url]);
+ useUploadMediaFromBlobURL({
+ url,
+ allowedTypes: constants_ALLOWED_MEDIA_TYPES,
+ onChange: onSelectImage,
+ onError: onUploadError
+ });
const isExternal = isExternalImage(id, url);
const src = isExternal ? url : undefined;
- const mediaPreview = !!url && (0,external_React_namespaceObject.createElement)("img", {
+ const mediaPreview = !!url && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
alt: (0,external_wp_i18n_namespaceObject.__)('Edit image'),
title: (0,external_wp_i18n_namespaceObject.__)('Edit image'),
- className: 'edit-image-preview',
+ 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, {
+ const classes = dist_clsx(className, {
'is-transient': temporaryURL,
'is-resized': !!width || !!height,
[`size-${sizeSlug}`]: sizeSlug,
'has-custom-border': !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
});
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- ref,
className: classes
});
@@ -26762,14 +27437,18 @@ function ImageEdit({
}
const blockBindingsSource = unlock(select(external_wp_blocks_namespaceObject.store)).getBlockBindingsSource(metadata?.bindings?.url?.source);
return {
- lockUrlControls: !!metadata?.bindings?.url && (!blockBindingsSource || blockBindingsSource?.lockAttributesEditing),
+ lockUrlControls: !!metadata?.bindings?.url && !blockBindingsSource?.canUserEditValue({
+ select,
+ context,
+ args: metadata?.bindings?.url?.args
+ }),
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]);
+ }, [isSingleSelected, metadata?.bindings?.url]);
const placeholder = content => {
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, {
- className: classnames_default()('block-editor-media-placeholder', {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, {
+ className: dist_clsx('block-editor-media-placeholder', {
[borderProps.className]: !!borderProps.className && !isSingleSelected
}),
withIllustration: true,
@@ -26783,49 +27462,51 @@ function ImageEdit({
objectFit: scale,
...borderProps.style,
...shadowProps.style
- }
- }, lockUrlControls ? (0,external_React_namespaceObject.createElement)("span", {
- className: 'block-bindings-media-placeholder-message'
- }, lockUrlControlsMessage) : content);
+ },
+ children: lockUrlControls ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ className: "block-bindings-media-placeholder-message",
+ children: lockUrlControlsMessage
+ }) : content
+ });
};
- return (0,external_React_namespaceObject.createElement)("figure", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(image_Image, {
- temporaryURL: temporaryURL,
- attributes: attributes,
- setAttributes: setAttributes,
- isSingleSelected: isSingleSelected,
- insertBlocksAfter: insertBlocksAfter,
- onReplace: onReplace,
- onSelectImage: onSelectImage,
- onSelectURL: onSelectURL,
- onUploadError: onUploadError,
- containerRef: ref,
- context: context,
- clientId: clientId,
- blockEditingMode: blockEditingMode
- }), (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,
- onSelectURL: onSelectURL,
- onError: onUploadError,
- placeholder: placeholder,
- accept: "image/*",
- allowedTypes: constants_ALLOWED_MEDIA_TYPES,
- value: {
- id,
- src
- },
- mediaPreview: mediaPreview,
- disableMediaButtons: temporaryURL || url
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
+ ...blockProps,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(image_Image, {
+ temporaryURL: temporaryURL,
+ attributes: attributes,
+ setAttributes: setAttributes,
+ isSingleSelected: isSingleSelected,
+ insertBlocksAfter: insertBlocksAfter,
+ onReplace: onReplace,
+ onSelectImage: onSelectImage,
+ onSelectURL: onSelectURL,
+ onUploadError: onUploadError,
+ context: context,
+ clientId: clientId,
+ blockEditingMode: blockEditingMode,
+ parentLayoutType: parentLayout?.type
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, {
+ icon: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, {
+ icon: library_image
+ }),
+ onSelect: onSelectImage,
+ onSelectURL: onSelectURL,
+ onError: onUploadError,
+ placeholder: placeholder,
+ accept: "image/*",
+ allowedTypes: constants_ALLOWED_MEDIA_TYPES,
+ value: {
+ id,
+ src
+ },
+ mediaPreview: mediaPreview,
+ disableMediaButtons: temporaryURL || url
+ })]
+ });
}
/* harmony default export */ const image_edit = (ImageEdit);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/save.js
-
/**
* External dependencies
*/
@@ -26835,6 +27516,9 @@ function ImageEdit({
* WordPress dependencies
*/
+
+
+
function image_save_save({
attributes
}) {
@@ -26858,7 +27542,7 @@ function image_save_save({
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()({
+ const classes = dist_clsx({
// All other align classes are handled by block supports.
// `{ align: 'none' }` is unique to transforms for the image block.
alignnone: 'none' === align,
@@ -26866,10 +27550,10 @@ function image_save_save({
'is-resized': width || height,
'has-custom-border': !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
});
- const imageClasses = classnames_default()(borderProps.className, {
+ const imageClasses = dist_clsx(borderProps.className, {
[`wp-image-${id}`]: !!id
});
- const image = (0,external_React_namespaceObject.createElement)("img", {
+ const image = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
src: url,
alt: alt,
className: imageClasses || undefined,
@@ -26883,21 +27567,25 @@ function image_save_save({
},
title: title
});
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'),
- tagName: "figcaption",
- value: caption
- }));
- return (0,external_React_namespaceObject.createElement)("figure", {
+ const figure = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [href ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ className: linkClass,
+ href: href,
+ target: linkTarget,
+ rel: newRel,
+ children: image
+ }) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'),
+ tagName: "figcaption",
+ value: caption
+ })]
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className: classes
- })
- }, figure);
+ }),
+ children: figure
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/transforms.js
@@ -27294,21 +27982,21 @@ const image_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/comment.js
-
/**
* WordPress dependencies
*/
-const comment = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const comment = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_comment = (comment);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/latest-comments/edit.js
-
/**
* WordPress dependencies
*/
@@ -27322,6 +28010,8 @@ const comment = (0,external_React_namespaceObject.createElement)(external_wp_pri
*
* @type {number}
*/
+
+
const MIN_COMMENTS = 1;
/**
* Maximum number of comments a user can show using this block.
@@ -27346,53 +28036,59 @@ function LatestComments({
spacing: undefined
}
};
- return (0,external_React_namespaceObject.createElement)("div", {
- ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)()
- }, (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.ToggleControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Display avatar'),
- checked: displayAvatar,
- onChange: () => setAttributes({
- displayAvatar: !displayAvatar
- })
- }), (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_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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, {
- __nextHasNoMarginBottom: true,
- __next40pxDefaultSize: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Number of comments'),
- value: commentsToShow,
- onChange: value => setAttributes({
- commentsToShow: value
- }),
- min: MIN_COMMENTS,
- max: MAX_COMMENTS,
- required: true
- }))), (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
- // the block appears on the frontend. Setting the locale
- // explicitly prevents any middleware from setting it to 'user'.
- ,
- urlQueryArgs: {
- _locale: 'site'
- }
- })));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Display avatar'),
+ checked: displayAvatar,
+ onChange: () => setAttributes({
+ displayAvatar: !displayAvatar
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Display date'),
+ checked: displayDate,
+ onChange: () => setAttributes({
+ displayDate: !displayDate
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Display excerpt'),
+ checked: displayExcerpt,
+ onChange: () => setAttributes({
+ displayExcerpt: !displayExcerpt
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.RangeControl, {
+ __nextHasNoMarginBottom: true,
+ __next40pxDefaultSize: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Number of comments'),
+ value: commentsToShow,
+ onChange: value => setAttributes({
+ commentsToShow: value
+ }),
+ min: MIN_COMMENTS,
+ max: MAX_COMMENTS,
+ required: true
+ })]
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)((external_wp_serverSideRender_default()), {
+ block: "core/latest-comments",
+ attributes: serverSideAttributes
+ // The preview uses the site's locale to make it more true to how
+ // the block appears on the frontend. Setting the locale
+ // explicitly prevents any middleware from setting it to 'user'.
+ ,
+ urlQueryArgs: {
+ _locale: 'site'
+ }
+ })
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/latest-comments/index.js
@@ -27478,17 +28174,18 @@ const latest_comments_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/post-list.js
-
/**
* WordPress dependencies
*/
-const postList = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const postList = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const post_list = (postList);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/latest-posts/deprecated.js
@@ -27645,17 +28342,18 @@ const {
}]);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/list.js
-
/**
* WordPress dependencies
*/
-const list = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const list = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_list = (list);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/latest-posts/constants.js
@@ -27664,7 +28362,6 @@ const MAX_EXCERPT_LENGTH = 100;
const MAX_POSTS_COLUMNS = 6;
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/latest-posts/edit.js
-
/**
* External dependencies
*/
@@ -27692,6 +28389,9 @@ const MAX_POSTS_COLUMNS = 6;
/**
* Module Constants
*/
+
+
+
const CATEGORIES_LIST_QUERY = {
per_page: -1,
context: 'view'
@@ -27817,138 +28517,149 @@ function LatestPostsEdit({
});
};
const hasPosts = !!latestPosts?.length;
- 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_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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RadioControl, {
- label: (0,external_wp_i18n_namespaceObject.__)('Show:'),
- selected: displayPostContentRadio,
- options: [{
- label: (0,external_wp_i18n_namespaceObject.__)('Excerpt'),
- value: 'excerpt'
- }, {
- label: (0,external_wp_i18n_namespaceObject.__)('Full post'),
- value: 'full_post'
- }],
- onChange: value => setAttributes({
- displayPostContentRadio: value
- })
- }), 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'),
- value: excerptLength,
- onChange: value => setAttributes({
- excerptLength: value
- }),
- min: MIN_EXCERPT_LENGTH,
- max: MAX_EXCERPT_LENGTH
- })), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, {
- title: (0,external_wp_i18n_namespaceObject.__)('Post meta')
- }, (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_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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, {
- title: (0,external_wp_i18n_namespaceObject.__)('Featured image')
- }, (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_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')) {
- newAttrs.featuredImageSizeWidth = value.width;
- }
- if (value.hasOwnProperty('height')) {
- newAttrs.featuredImageSizeHeight = value.height;
- }
- setAttributes(newAttrs);
- },
- slug: featuredImageSizeSlug,
- width: featuredImageSizeWidth,
- height: featuredImageSizeHeight,
- imageWidth: defaultImageWidth,
- imageHeight: defaultImageHeight,
- imageSizeOptions: imageSizeOptions,
- imageSizeHelp: (0,external_wp_i18n_namespaceObject.__)('Select the size of the source image.'),
- onChangeImage: value => setAttributes({
- featuredImageSizeSlug: value,
- featuredImageSizeWidth: undefined,
- featuredImageSizeHeight: undefined
- })
- }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl, {
- className: "editor-latest-posts-image-alignment-control"
- }, (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_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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, {
- title: (0,external_wp_i18n_namespaceObject.__)('Sorting and filtering')
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.QueryControls, {
- order,
- orderBy,
- numberOfItems: postsToShow,
- onOrderChange: value => setAttributes({
- order: value
- }),
- onOrderByChange: value => setAttributes({
- orderBy: value
- }),
- onNumberOfItemsChange: value => setAttributes({
- postsToShow: value
- }),
- categorySuggestions: categorySuggestions,
- onCategoryChange: selectCategories,
- selectedCategories: categories,
- onAuthorChange: value => setAttributes({
- selectedAuthor: '' !== value ? Number(value) : undefined
- }),
- authorList: authorList !== null && authorList !== void 0 ? authorList : [],
- selectedAuthorId: selectedAuthor
- }), postLayout === 'grid' && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, {
- __nextHasNoMarginBottom: true,
- __next40pxDefaultSize: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Columns'),
- value: columns,
- onChange: value => setAttributes({
- columns: value
- }),
- min: 2,
- max: !hasPosts ? MAX_POSTS_COLUMNS : Math.min(MAX_POSTS_COLUMNS, latestPosts.length),
- required: true
- })));
+ const inspectorControls = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Post content'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Post content'),
+ checked: displayPostContent,
+ onChange: value => setAttributes({
+ displayPostContent: value
+ })
+ }), displayPostContent && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.RadioControl, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Show:'),
+ selected: displayPostContentRadio,
+ options: [{
+ label: (0,external_wp_i18n_namespaceObject.__)('Excerpt'),
+ value: 'excerpt'
+ }, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Full post'),
+ value: 'full_post'
+ }],
+ onChange: value => setAttributes({
+ displayPostContentRadio: value
+ })
+ }), displayPostContent && displayPostContentRadio === 'excerpt' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.RangeControl, {
+ __nextHasNoMarginBottom: true,
+ __next40pxDefaultSize: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Max number of words'),
+ value: excerptLength,
+ onChange: value => setAttributes({
+ excerptLength: value
+ }),
+ min: MIN_EXCERPT_LENGTH,
+ max: MAX_EXCERPT_LENGTH
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Post meta'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Display author name'),
+ checked: displayAuthor,
+ onChange: value => setAttributes({
+ displayAuthor: value
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Display post date'),
+ checked: displayPostDate,
+ onChange: value => setAttributes({
+ displayPostDate: value
+ })
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Featured image'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Display featured image'),
+ checked: displayFeaturedImage,
+ onChange: value => setAttributes({
+ displayFeaturedImage: value
+ })
+ }), displayFeaturedImage && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalImageSizeControl, {
+ onChange: value => {
+ const newAttrs = {};
+ if (value.hasOwnProperty('width')) {
+ newAttrs.featuredImageSizeWidth = value.width;
+ }
+ if (value.hasOwnProperty('height')) {
+ newAttrs.featuredImageSizeHeight = value.height;
+ }
+ setAttributes(newAttrs);
+ },
+ slug: featuredImageSizeSlug,
+ width: featuredImageSizeWidth,
+ height: featuredImageSizeHeight,
+ imageWidth: defaultImageWidth,
+ imageHeight: defaultImageHeight,
+ imageSizeOptions: imageSizeOptions,
+ imageSizeHelp: (0,external_wp_i18n_namespaceObject.__)('Select the size of the source image.'),
+ onChangeImage: value => setAttributes({
+ featuredImageSizeSlug: value,
+ featuredImageSizeWidth: undefined,
+ featuredImageSizeHeight: undefined
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.BaseControl, {
+ className: "editor-latest-posts-image-alignment-control",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.BaseControl.VisualLabel, {
+ children: (0,external_wp_i18n_namespaceObject.__)('Image alignment')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockAlignmentToolbar, {
+ value: featuredImageAlign,
+ onChange: value => setAttributes({
+ featuredImageAlign: value
+ }),
+ controls: ['left', 'center', 'right'],
+ isCollapsed: false
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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
+ })
+ })]
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Sorting and filtering'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.QueryControls, {
+ order,
+ orderBy,
+ numberOfItems: postsToShow,
+ onOrderChange: value => setAttributes({
+ order: value
+ }),
+ onOrderByChange: value => setAttributes({
+ orderBy: value
+ }),
+ onNumberOfItemsChange: value => setAttributes({
+ postsToShow: value
+ }),
+ categorySuggestions: categorySuggestions,
+ onCategoryChange: selectCategories,
+ selectedCategories: categories,
+ onAuthorChange: value => setAttributes({
+ selectedAuthor: '' !== value ? Number(value) : undefined
+ }),
+ authorList: authorList !== null && authorList !== void 0 ? authorList : [],
+ selectedAuthorId: selectedAuthor
+ }), postLayout === 'grid' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.RangeControl, {
+ __nextHasNoMarginBottom: true,
+ __next40pxDefaultSize: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Columns'),
+ value: columns,
+ onChange: value => setAttributes({
+ columns: value
+ }),
+ min: 2,
+ max: !hasPosts ? MAX_POSTS_COLUMNS : Math.min(MAX_POSTS_COLUMNS, latestPosts.length),
+ required: true
+ })]
+ })]
+ });
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()({
+ className: dist_clsx({
'wp-block-latest-posts__list': true,
'is-grid': postLayout === 'grid',
'has-dates': displayPostDate,
@@ -27957,106 +28668,122 @@ function LatestPostsEdit({
})
});
if (!hasPosts) {
- return (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, 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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null) : (0,external_wp_i18n_namespaceObject.__)('No posts found.')));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ ...blockProps,
+ children: [inspectorControls, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, {
+ icon: library_pin,
+ label: (0,external_wp_i18n_namespaceObject.__)('Latest Posts'),
+ children: !Array.isArray(latestPosts) ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) : (0,external_wp_i18n_namespaceObject.__)('No posts found.')
+ })]
+ });
}
// Removing posts from display should be instant.
const displayPosts = latestPosts.length > postsToShow ? latestPosts.slice(0, postsToShow) : latestPosts;
const layoutControls = [{
icon: library_list,
- title: (0,external_wp_i18n_namespaceObject.__)('List view'),
+ title: (0,external_wp_i18n_namespaceObject._x)('List view', 'Latest posts block display setting'),
onClick: () => setAttributes({
postLayout: 'list'
}),
isActive: postLayout === 'list'
}, {
icon: library_grid,
- title: (0,external_wp_i18n_namespaceObject.__)('Grid view'),
+ title: (0,external_wp_i18n_namespaceObject._x)('Grid view', 'Latest posts block display setting'),
onClick: () => setAttributes({
postLayout: 'grid'
}),
isActive: postLayout === 'grid'
}];
const dateFormat = (0,external_wp_date_namespaceObject.getSettings)().formats.date;
- 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_React_namespaceObject.createElement)("ul", {
- ...blockProps
- }, displayPosts.map(post => {
- const titleTrimmed = post.title.rendered.trim();
- let excerpt = post.excerpt.rendered;
- const currentAuthor = authorList?.find(author => author.id === post.author);
- const excerptElement = document.createElement('div');
- excerptElement.innerHTML = excerpt;
- excerpt = excerptElement.textContent || excerptElement.innerText || '';
- const {
- url: imageSourceUrl,
- alt: featuredImageAlt
- } = getFeaturedImageDetails(post, featuredImageSizeSlug);
- const imageClasses = classnames_default()({
- 'wp-block-latest-posts__featured-image': true,
- [`align${featuredImageAlign}`]: !!featuredImageAlign
- });
- const renderFeaturedImage = displayFeaturedImage && imageSourceUrl;
- const featuredImage = renderFeaturedImage && (0,external_React_namespaceObject.createElement)("img", {
- src: imageSourceUrl,
- alt: featuredImageAlt,
- style: {
- maxWidth: featuredImageSizeWidth,
- maxHeight: featuredImageSizeHeight
- }
- });
- const needsReadMore = excerptLength < excerpt.trim().split(' ').length && post.excerpt.raw === '';
- 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_React_namespaceObject.createElement)("a", {
- className: "wp-block-latest-posts__read-more",
- href: post.link,
- rel: "noopener noreferrer",
- onClick: showRedirectionPreventedNotice
- }),
- span: (0,external_React_namespaceObject.createElement)("span", {
- className: "screen-reader-text"
- })
- })) : excerpt;
- return (0,external_React_namespaceObject.createElement)("li", {
- key: post.id
- }, renderFeaturedImage && (0,external_React_namespaceObject.createElement)("div", {
- className: imageClasses
- }, 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_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_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_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_React_namespaceObject.createElement)("div", {
- className: "wp-block-latest-posts__post-excerpt"
- }, 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()
- }
- }));
- })));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [inspectorControls, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, {
+ controls: layoutControls
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
+ ...blockProps,
+ children: displayPosts.map(post => {
+ const titleTrimmed = post.title.rendered.trim();
+ let excerpt = post.excerpt.rendered;
+ const currentAuthor = authorList?.find(author => author.id === post.author);
+ const excerptElement = document.createElement('div');
+ excerptElement.innerHTML = excerpt;
+ excerpt = excerptElement.textContent || excerptElement.innerText || '';
+ const {
+ url: imageSourceUrl,
+ alt: featuredImageAlt
+ } = getFeaturedImageDetails(post, featuredImageSizeSlug);
+ const imageClasses = dist_clsx({
+ 'wp-block-latest-posts__featured-image': true,
+ [`align${featuredImageAlign}`]: !!featuredImageAlign
+ });
+ const renderFeaturedImage = displayFeaturedImage && imageSourceUrl;
+ const featuredImage = renderFeaturedImage && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ src: imageSourceUrl,
+ alt: featuredImageAlt,
+ style: {
+ maxWidth: featuredImageSizeWidth,
+ maxHeight: featuredImageSizeHeight
+ }
+ });
+ const needsReadMore = excerptLength < excerpt.trim().split(' ').length && post.excerpt.raw === '';
+ const postExcerpt = needsReadMore ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [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:
+ /*#__PURE__*/
+ // eslint-disable-next-line jsx-a11y/anchor-has-content
+ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ className: "wp-block-latest-posts__read-more",
+ href: post.link,
+ rel: "noopener noreferrer",
+ onClick: showRedirectionPreventedNotice
+ }),
+ span: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ className: "screen-reader-text"
+ })
+ })]
+ }) : excerpt;
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", {
+ children: [renderFeaturedImage && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: imageClasses,
+ children: addLinkToFeaturedImage ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: post.link,
+ rel: "noreferrer noopener",
+ onClick: showRedirectionPreventedNotice,
+ children: featuredImage
+ }) : featuredImage
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ className: "wp-block-latest-posts__post-title",
+ href: post.link,
+ rel: "noreferrer noopener",
+ dangerouslySetInnerHTML: !!titleTrimmed ? {
+ __html: titleTrimmed
+ } : undefined,
+ onClick: showRedirectionPreventedNotice,
+ children: !titleTrimmed ? (0,external_wp_i18n_namespaceObject.__)('(no title)') : null
+ }), displayAuthor && currentAuthor && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-latest-posts__post-author",
+ children: (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: byline. %s: current author. */
+ (0,external_wp_i18n_namespaceObject.__)('by %s'), currentAuthor.name)
+ }), displayPostDate && post.date_gmt && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("time", {
+ dateTime: (0,external_wp_date_namespaceObject.format)('c', post.date_gmt),
+ className: "wp-block-latest-posts__post-date",
+ children: (0,external_wp_date_namespaceObject.dateI18n)(dateFormat, post.date_gmt)
+ }), displayPostContent && displayPostContentRadio === 'excerpt' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-latest-posts__post-excerpt",
+ children: postExcerpt
+ }), displayPostContent && displayPostContentRadio === 'full_post' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-latest-posts__post-full-content",
+ dangerouslySetInnerHTML: {
+ __html: post.content.raw.trim()
+ }
+ })]
+ }, post.id);
+ })
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/latest-posts/index.js
@@ -28294,7 +29021,6 @@ function migrateTypeToInlineStyle(attributes) {
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list/deprecated.js
-
/**
* WordPress dependencies
*/
@@ -28305,6 +29031,7 @@ function migrateTypeToInlineStyle(attributes) {
*/
+
const v0 = {
attributes: {
ordered: {
@@ -28360,16 +29087,17 @@ const v0 = {
start
} = attributes;
const TagName = ordered ? 'ol' : 'ul';
- return (0,external_React_namespaceObject.createElement)(TagName, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
type,
reversed,
start
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: values,
+ multiline: "li"
})
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- value: values,
- multiline: "li"
- }));
+ });
},
migrate: migrate_font_family,
isEligible({
@@ -28445,16 +29173,17 @@ const list_deprecated_v1 = {
start
} = attributes;
const TagName = ordered ? 'ol' : 'ul';
- return (0,external_React_namespaceObject.createElement)(TagName, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
type,
reversed,
start
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: values,
+ multiline: "li"
})
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- value: values,
- multiline: "li"
- }));
+ });
},
migrate: migrateToListV2
};
@@ -28540,17 +29269,108 @@ const list_deprecated_v2 = {
start
} = attributes;
const TagName = ordered ? 'ol' : 'ul';
- return (0,external_React_namespaceObject.createElement)(TagName, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
type,
reversed,
start
- })
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null));
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
+ });
},
migrate: migrateTypeToInlineStyle
};
+// Version without block support 'className: true'.
+const list_deprecated_v3 = {
+ attributes: {
+ ordered: {
+ type: 'boolean',
+ default: false,
+ __experimentalRole: 'content'
+ },
+ values: {
+ type: 'string',
+ source: 'html',
+ selector: 'ol,ul',
+ multiline: 'li',
+ __unstableMultilineWrapperTags: ['ol', 'ul'],
+ default: '',
+ __experimentalRole: 'content'
+ },
+ type: {
+ type: 'string'
+ },
+ start: {
+ type: 'number'
+ },
+ reversed: {
+ type: 'boolean'
+ },
+ placeholder: {
+ type: 'string'
+ }
+ },
+ supports: {
+ anchor: true,
+ className: false,
+ typography: {
+ fontSize: true,
+ lineHeight: true,
+ __experimentalFontFamily: true,
+ __experimentalFontWeight: true,
+ __experimentalFontStyle: true,
+ __experimentalTextTransform: true,
+ __experimentalTextDecoration: true,
+ __experimentalLetterSpacing: true,
+ __experimentalDefaultControls: {
+ fontSize: true
+ }
+ },
+ color: {
+ gradients: true,
+ link: true,
+ __experimentalDefaultControls: {
+ background: true,
+ text: true
+ }
+ },
+ spacing: {
+ margin: true,
+ padding: true,
+ __experimentalDefaultControls: {
+ margin: false,
+ padding: false
+ }
+ },
+ __unstablePasteTextInline: true,
+ __experimentalSelector: 'ol,ul',
+ __experimentalOnMerge: 'true',
+ __experimentalSlashInserter: true
+ },
+ save({
+ attributes
+ }) {
+ const {
+ ordered,
+ type,
+ reversed,
+ start
+ } = attributes;
+ const TagName = ordered ? 'ol' : 'ul';
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
+ ...external_wp_blockEditor_namespaceObject.useBlockProps.save({
+ reversed,
+ start,
+ style: {
+ listStyleType: ordered && type !== 'decimal' ? type : undefined
+ }
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
+ });
+ }
+};
+
/**
* New deprecations need to be placed first
* for them to have higher priority.
@@ -28559,173 +29379,183 @@ const list_deprecated_v2 = {
*
* See block-deprecation.md
*/
-/* harmony default export */ const list_deprecated = ([list_deprecated_v2, list_deprecated_v1, v0]);
+/* harmony default export */ const list_deprecated = ([list_deprecated_v3, list_deprecated_v2, list_deprecated_v1, v0]);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-outdent-rtl.js
-
/**
* WordPress dependencies
*/
-const formatOutdentRTL = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const formatOutdentRTL = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const format_outdent_rtl = (formatOutdentRTL);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-outdent.js
-
/**
* WordPress dependencies
*/
-const formatOutdent = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const formatOutdent = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const format_outdent = (formatOutdent);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-list-bullets-rtl.js
-
/**
* WordPress dependencies
*/
-const formatListBulletsRTL = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const formatListBulletsRTL = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const format_list_bullets_rtl = (formatListBulletsRTL);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-list-bullets.js
-
/**
* WordPress dependencies
*/
-const formatListBullets = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const formatListBullets = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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.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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const format_list_bullets = (formatListBullets);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-list-numbered-rtl.js
-
/**
* WordPress dependencies
*/
-const formatListNumberedRTL = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const formatListNumberedRTL = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const format_list_numbered_rtl = (formatListNumberedRTL);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-list-numbered.js
-
/**
* WordPress dependencies
*/
-const formatListNumbered = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const formatListNumbered = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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.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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const format_list_numbered = (formatListNumbered);
;// CONCATENATED MODULE: external ["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
-
/**
* WordPress dependencies
*/
+
+
const OrderedListSettings = ({
setAttributes,
reversed,
start,
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.__)('Ordered list settings')
-}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Start value'),
- type: "number",
- onChange: value => {
- const int = parseInt(value, 10);
- setAttributes({
- // It should be possible to unset the value,
- // e.g. with an empty string.
- start: isNaN(int) ? undefined : int
- });
- },
- value: Number.isInteger(start) ? start.toString(10) : '',
- step: "1"
-}), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Numbering style'),
- options: [{
- label: (0,external_wp_i18n_namespaceObject.__)('Numbers'),
- value: 'decimal'
- }, {
- label: (0,external_wp_i18n_namespaceObject.__)('Uppercase letters'),
- value: 'upper-alpha'
- }, {
- label: (0,external_wp_i18n_namespaceObject.__)('Lowercase letters'),
- value: 'lower-alpha'
- }, {
- label: (0,external_wp_i18n_namespaceObject.__)('Uppercase Roman numerals'),
- value: 'upper-roman'
- }, {
- label: (0,external_wp_i18n_namespaceObject.__)('Lowercase Roman numerals'),
- value: 'lower-roman'
- }],
- value: type,
- onChange: newValue => setAttributes({
- type: newValue
+}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Start value'),
+ type: "number",
+ onChange: value => {
+ const int = parseInt(value, 10);
+ setAttributes({
+ // It should be possible to unset the value,
+ // e.g. with an empty string.
+ start: isNaN(int) ? undefined : int
+ });
+ },
+ value: Number.isInteger(start) ? start.toString(10) : '',
+ step: "1"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SelectControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Numbering style'),
+ options: [{
+ label: (0,external_wp_i18n_namespaceObject.__)('Numbers'),
+ value: 'decimal'
+ }, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Uppercase letters'),
+ value: 'upper-alpha'
+ }, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Lowercase letters'),
+ value: 'lower-alpha'
+ }, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Uppercase Roman numerals'),
+ value: 'upper-roman'
+ }, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Lowercase Roman numerals'),
+ value: 'lower-roman'
+ }],
+ value: type,
+ onChange: newValue => setAttributes({
+ type: newValue
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Reverse list numbering'),
+ checked: reversed || false,
+ onChange: value => {
+ setAttributes({
+ // Unset the attribute if not reversed.
+ reversed: value || undefined
+ });
+ }
+ })]
})
-}), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Reverse list numbering'),
- checked: reversed || false,
- onChange: value => {
- setAttributes({
- // Unset the attribute if not reversed.
- reversed: value || undefined
- });
- }
-})));
+});
/* harmony default export */ const ordered_list_settings = (OrderedListSettings);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list/tag-name.js
-
/**
* WordPress dependencies
*/
+
function TagName(props, ref) {
const {
ordered,
...extraProps
} = props;
const Tag = ordered ? 'ol' : 'ul';
- return (0,external_React_namespaceObject.createElement)(Tag, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, {
ref: ref,
...extraProps
});
@@ -28733,7 +29563,6 @@ function TagName(props, ref) {
/* 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
-
/**
* WordPress dependencies
*/
@@ -28752,6 +29581,12 @@ function TagName(props, ref) {
+
+
+
+const list_edit_DEFAULT_BLOCK = {
+ name: 'core/list-item'
+};
const list_edit_TEMPLATE = [['core/list-item']];
const NATIVE_MARGIN_SPACING = 8;
@@ -28823,13 +29658,15 @@ function IndentUI({
} = 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'),
- disabled: !canOutdent,
- onClick: outdentList
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: outdentList
+ })
+ });
}
function list_edit_Edit({
attributes,
@@ -28850,6 +29687,8 @@ function list_edit_Edit({
}
});
const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
+ defaultBlock: list_edit_DEFAULT_BLOCK,
+ directInsert: true,
template: list_edit_TEMPLATE,
templateLock: false,
templateInsertUpdatesSelection: true,
@@ -28861,50 +29700,53 @@ function list_edit_Edit({
__experimentalCaptureToolbars: true
});
useMigrateOnLoad(attributes, clientId);
- const controls = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, {
- group: "block"
- }, (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'),
- isActive: ordered === false,
- onClick: () => {
- setAttributes({
- ordered: false
- });
- }
- }), (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'),
- isActive: ordered === true,
- onClick: () => {
- setAttributes({
- ordered: true
- });
- }
- }), (0,external_React_namespaceObject.createElement)(IndentUI, {
- clientId: clientId
- }));
- 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_React_namespaceObject.createElement)(ordered_list_settings, {
- setAttributes,
- reversed,
- start,
- type
- }));
+ const controls = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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'),
+ isActive: ordered === false,
+ onClick: () => {
+ setAttributes({
+ ordered: false
+ });
+ }
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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'),
+ isActive: ordered === true,
+ onClick: () => {
+ setAttributes({
+ ordered: true
+ });
+ }
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(IndentUI, {
+ clientId: clientId
+ })]
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(tag_name, {
+ ordered: ordered,
+ reversed: reversed,
+ start: start,
+ ...innerBlocksProps
+ }), controls, ordered && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ordered_list_settings, {
+ setAttributes,
+ reversed,
+ start,
+ type
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list/save.js
-
/**
* WordPress dependencies
*/
+
function list_save_save({
attributes
}) {
@@ -28915,15 +29757,16 @@ function list_save_save({
start
} = attributes;
const TagName = ordered ? 'ol' : 'ul';
- return (0,external_React_namespaceObject.createElement)(TagName, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
reversed,
start,
style: {
listStyleType: ordered && type !== 'decimal' ? type : undefined
}
- })
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null));
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list/transforms.js
@@ -29095,7 +29938,7 @@ const list_metadata = {
},
supports: {
anchor: true,
- className: false,
+ html: false,
typography: {
fontSize: true,
lineHeight: true,
@@ -29126,7 +29969,6 @@ const list_metadata = {
}
},
__unstablePasteTextInline: true,
- __experimentalSelector: "ol,ul",
__experimentalOnMerge: true,
__experimentalSlashInserter: true,
interactivity: {
@@ -29185,45 +30027,48 @@ const list_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/list-item.js
-
/**
* WordPress dependencies
*/
-const listItem = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const listItem = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const list_item = (listItem);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-indent-rtl.js
-
/**
* WordPress dependencies
*/
-const formatIndentRTL = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const formatIndentRTL = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const format_indent_rtl = (formatIndentRTL);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-indent.js
-
/**
* WordPress dependencies
*/
-const formatIndent = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const formatIndent = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const format_indent = (formatIndent);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list-item/hooks/use-indent-list-item.js
@@ -29276,6 +30121,7 @@ function useIndentListItem(clientId) {
} else {
multiSelect(clonedBlocks[0].clientId, clonedBlocks[clonedBlocks.length - 1].clientId);
}
+ return true;
}, [clientId]);
}
@@ -29307,23 +30153,33 @@ function useOutdentListItem() {
function getParentListItemId(id) {
const listId = getBlockRootClientId(id);
const parentListItemId = getBlockRootClientId(listId);
- if (!parentListItemId) return;
- if (getBlockName(parentListItemId) !== 'core/list-item') return;
+ if (!parentListItemId) {
+ return;
+ }
+ if (getBlockName(parentListItemId) !== 'core/list-item') {
+ return;
+ }
return parentListItemId;
}
return (0,external_wp_element_namespaceObject.useCallback)((clientIds = getSelectedBlockClientIds()) => {
if (!Array.isArray(clientIds)) {
clientIds = [clientIds];
}
- if (!clientIds.length) return;
+ if (!clientIds.length) {
+ return;
+ }
const firstClientId = clientIds[0];
// Can't outdent if it's not a list item.
- if (getBlockName(firstClientId) !== 'core/list-item') return;
+ if (getBlockName(firstClientId) !== 'core/list-item') {
+ return;
+ }
const parentListItemId = getParentListItemId(firstClientId);
// Can't outdent if it's at the top level.
- if (!parentListItemId) return;
+ if (!parentListItemId) {
+ return;
+ }
const parentListId = getBlockRootClientId(firstClientId);
const lastClientId = clientIds[clientIds.length - 1];
const order = getBlockOrder(parentListId);
@@ -29347,6 +30203,7 @@ function useOutdentListItem() {
removeBlock(parentListId, shouldSelectParent);
}
});
+ return true;
}, []);
}
@@ -29437,6 +30294,7 @@ function use_enter_useEnter(props) {
* Internal dependencies
*/
+
function useSpace(clientId) {
const {
getSelectionStart,
@@ -29444,6 +30302,7 @@ function useSpace(clientId) {
getBlockIndex
} = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
const indentListItem = useIndentListItem(clientId);
+ const outdentListItem = useOutdentListItem();
return (0,external_wp_compose_namespaceObject.useRefEffect)(element => {
function onKeyDown(event) {
const {
@@ -29453,19 +30312,26 @@ function useSpace(clientId) {
metaKey,
ctrlKey
} = event;
- if (event.defaultPrevented || keyCode !== external_wp_keycodes_namespaceObject.SPACE ||
+ if (event.defaultPrevented || keyCode !== external_wp_keycodes_namespaceObject.SPACE && keyCode !== external_wp_keycodes_namespaceObject.TAB ||
// Only override when no modifiers are pressed.
- shiftKey || altKey || metaKey || ctrlKey) {
- return;
- }
- if (getBlockIndex(clientId) === 0) {
+ altKey || metaKey || ctrlKey) {
return;
}
const selectionStart = getSelectionStart();
const selectionEnd = getSelectionEnd();
if (selectionStart.offset === 0 && selectionEnd.offset === 0) {
- event.preventDefault();
- indentListItem();
+ if (shiftKey) {
+ // Note that backspace behaviour in defined in onMerge.
+ if (keyCode === external_wp_keycodes_namespaceObject.TAB) {
+ if (outdentListItem()) {
+ event.preventDefault();
+ }
+ }
+ } else if (getBlockIndex(clientId) !== 0) {
+ if (indentListItem()) {
+ event.preventDefault();
+ }
+ }
}
}
element.addEventListener('keydown', onKeyDown);
@@ -29475,39 +30341,6 @@ function useSpace(clientId) {
}, [clientId, indentListItem]);
}
-;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list-item/hooks/use-split.js
-/**
- * WordPress dependencies
- */
-
-
-
-
-function useSplit(clientId) {
- // We can not rely on the isAfterOriginal parameter of the callback,
- // because if the value after the split is empty isAfterOriginal is false
- // while the value is in fact after the original. So to avoid that issue we use
- // a flag where the first execution of the callback is false (it is the before value)
- // and the second execution is true, it is the after value.
- const isAfter = (0,external_wp_element_namespaceObject.useRef)(false);
- const {
- getBlock
- } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
- return (0,external_wp_element_namespaceObject.useCallback)(value => {
- const block = getBlock(clientId);
- if (isAfter.current) {
- return (0,external_wp_blocks_namespaceObject.cloneBlock)(block, {
- content: value
- });
- }
- isAfter.current = true;
- return (0,external_wp_blocks_namespaceObject.createBlock)(block.name, {
- ...block.attributes,
- content: value
- });
- }, [clientId, getBlock]);
-}
-
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list-item/hooks/use-merge.js
/**
* WordPress dependencies
@@ -29543,8 +30376,12 @@ function useMerge(clientId, onMerge) {
function getParentListItemId(id) {
const listId = getBlockRootClientId(id);
const parentListItemId = getBlockRootClientId(listId);
- if (!parentListItemId) return;
- if (getBlockName(parentListItemId) !== 'core/list-item') return;
+ if (!parentListItemId) {
+ return;
+ }
+ if (getBlockName(parentListItemId) !== 'core/list-item') {
+ return;
+ }
return parentListItemId;
}
@@ -29557,9 +30394,13 @@ function useMerge(clientId, onMerge) {
*/
function _getNextId(id) {
const next = getNextBlockClientId(id);
- if (next) return next;
+ if (next) {
+ return next;
+ }
const parentListItemId = getParentListItemId(id);
- if (!parentListItemId) return;
+ if (!parentListItemId) {
+ return;
+ }
return _getNextId(parentListItemId);
}
@@ -29591,7 +30432,14 @@ function useMerge(clientId, onMerge) {
// list.
const [nestedListClientId] = getBlockOrder(clientIdB);
if (nestedListClientId) {
- moveBlocksToPosition(getBlockOrder(nestedListClientId), nestedListClientId, getBlockRootClientId(clientIdA));
+ // If we are merging with the previous list item, and the
+ // previous list item does not have nested list, move the
+ // nested list to the previous list item.
+ if (getPreviousBlockClientId(clientIdB) === clientIdA && !getBlockOrder(clientIdA).length) {
+ moveBlocksToPosition([nestedListClientId], clientIdB, clientIdA);
+ } else {
+ moveBlocksToPosition(getBlockOrder(nestedListClientId), nestedListClientId, getBlockRootClientId(clientIdA));
+ }
}
mergeBlocks(clientIdA, clientIdB);
});
@@ -29623,42 +30471,7 @@ function useMerge(clientId, onMerge) {
};
}
-;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list-item/utils.js
-/**
- * WordPress dependencies
- */
-
-function convertBlockToList(block) {
- const list = (0,external_wp_blocks_namespaceObject.switchToBlockType)(block, 'core/list');
- if (list) {
- return list;
- }
- const paragraph = (0,external_wp_blocks_namespaceObject.switchToBlockType)(block, 'core/paragraph');
- if (!paragraph) {
- return null;
- }
- return (0,external_wp_blocks_namespaceObject.switchToBlockType)(paragraph, 'core/list');
-}
-function convertToListItems(blocks) {
- const listItems = [];
- for (let block of blocks) {
- if (block.name === 'core/list-item') {
- listItems.push(block);
- } else if (block.name === 'core/list') {
- listItems.push(...block.innerBlocks);
- } else if (block = convertBlockToList(block)) {
- for (const {
- innerBlocks
- } of block) {
- listItems.push(...innerBlocks);
- }
- }
- }
- return listItems;
-}
-
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list-item/edit.js
-
/**
* WordPress dependencies
*/
@@ -29674,6 +30487,8 @@ function convertToListItems(blocks) {
*/
+
+
function edit_IndentUI({
clientId
}) {
@@ -29693,24 +30508,25 @@ function edit_IndentUI({
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_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'),
- isDisabled: !canIndent,
- onClick: () => indentListItem()
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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()
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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'),
+ isDisabled: !canIndent,
+ onClick: () => indentListItem()
+ })]
+ });
}
function ListItemEdit({
attributes,
setAttributes,
- onReplace,
clientId,
mergeBlocks
}) {
@@ -29728,46 +30544,47 @@ function ListItemEdit({
clientId
});
const useSpaceRef = useSpace(clientId);
- const onSplit = useSplit(clientId);
const onMerge = useMerge(clientId, mergeBlocks);
- return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("li", {
- ...innerBlocksProps
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, {
- ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([useEnterRef, useSpaceRef]),
- identifier: "content",
- tagName: "div",
- onChange: nextContent => setAttributes({
- content: nextContent
- }),
- value: content,
- "aria-label": (0,external_wp_i18n_namespaceObject.__)('List text'),
- placeholder: placeholder || (0,external_wp_i18n_namespaceObject.__)('List'),
- onSplit: onSplit,
- onMerge: onMerge,
- onReplace: onReplace ? (blocks, ...args) => {
- onReplace(convertToListItems(blocks), ...args);
- } : undefined
- }), innerBlocksProps.children), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, {
- group: "block"
- }, (0,external_React_namespaceObject.createElement)(edit_IndentUI, {
- clientId: clientId
- })));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", {
+ ...innerBlocksProps,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
+ ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([useEnterRef, useSpaceRef]),
+ identifier: "content",
+ tagName: "div",
+ onChange: nextContent => setAttributes({
+ content: nextContent
+ }),
+ value: content,
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('List text'),
+ placeholder: placeholder || (0,external_wp_i18n_namespaceObject.__)('List'),
+ onMerge: onMerge
+ }), innerBlocksProps.children]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(edit_IndentUI, {
+ clientId: clientId
+ })
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list-item/save.js
-
/**
* WordPress dependencies
*/
+
+
function list_item_save_save({
attributes
}) {
- return (0,external_React_namespaceObject.createElement)("li", {
- ...external_wp_blockEditor_namespaceObject.useBlockProps.save()
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- value: attributes.content
- }), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", {
+ ...external_wp_blockEditor_namespaceObject.useBlockProps.save(),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: attributes.content
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/list-item/transforms.js
@@ -29818,7 +30635,8 @@ const list_item_metadata = {
},
supports: {
className: false,
- __experimentalSelector: "li",
+ __experimentalSelector: ".wp-block-list > li",
+ splitting: true,
spacing: {
margin: true,
padding: true,
@@ -29873,27 +30691,30 @@ const list_item_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/login.js
-
/**
* WordPress dependencies
*/
-const login = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const login = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_login = (login);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/loginout/edit.js
-
/**
* WordPress dependencies
*/
+
+
+
function LoginOutEdit({
attributes,
setAttributes
@@ -29902,29 +30723,36 @@ function LoginOutEdit({
displayLoginAsForm,
redirectToCurrent
} = attributes;
- 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.ToggleControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Display login as form'),
- checked: displayLoginAsForm,
- onChange: () => setAttributes({
- displayLoginAsForm: !displayLoginAsForm
- })
- }), (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_React_namespaceObject.createElement)("div", {
- ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: 'logged-in'
- })
- }, (0,external_React_namespaceObject.createElement)("a", {
- href: "#login-pseudo-link"
- }, (0,external_wp_i18n_namespaceObject.__)('Log out'))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Display login as form'),
+ checked: displayLoginAsForm,
+ onChange: () => setAttributes({
+ displayLoginAsForm: !displayLoginAsForm
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Redirect to current URL'),
+ checked: redirectToCurrent,
+ onChange: () => setAttributes({
+ redirectToCurrent: !redirectToCurrent
+ })
+ })]
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({
+ className: 'logged-in'
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: "#login-pseudo-link",
+ children: (0,external_wp_i18n_namespaceObject.__)('Log out')
+ })
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/loginout/index.js
@@ -30000,17 +30828,18 @@ const loginout_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/media-and-text.js
-
/**
* WordPress dependencies
*/
-const mediaAndText = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const mediaAndText = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "M3 6v11.5h8V6H3Zm11 3h7V7.5h-7V9Zm7 3.5h-7V11h7v1.5ZM14 16h7v-1.5h-7V16Z"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
+ d: "M3 6v11.5h8V6H3Zm11 3h7V7.5h-7V9Zm7 3.5h-7V11h7v1.5ZM14 16h7v-1.5h-7V16Z"
+ })
+});
/* harmony default export */ const media_and_text = (mediaAndText);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/media-text/constants.js
@@ -30027,7 +30856,6 @@ const constants_TEMPLATE = [['core/paragraph', {
}]];
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/media-text/deprecated.js
-
/**
* External dependencies
*/
@@ -30043,6 +30871,8 @@ const constants_TEMPLATE = [['core/paragraph', {
* Internal dependencies
*/
+
+
const v1ToV5ImageFillStyles = (url, focalPoint) => {
return url ? {
backgroundImage: `url(${url})`,
@@ -30271,31 +31101,32 @@ const media_text_deprecated_v6 = {
} = attributes;
const mediaSizeSlug = attributes.mediaSizeSlug || DEFAULT_MEDIA_SIZE_SLUG;
const newRel = !rel ? undefined : rel;
- const imageClasses = classnames_default()({
+ const imageClasses = dist_clsx({
[`wp-image-${mediaId}`]: mediaId && mediaType === 'image',
[`size-${mediaSizeSlug}`]: mediaId && mediaType === 'image'
});
- let image = (0,external_React_namespaceObject.createElement)("img", {
+ let image = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
src: mediaUrl,
alt: mediaAlt,
className: imageClasses || null
});
if (href) {
- image = (0,external_React_namespaceObject.createElement)("a", {
+ image = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
className: linkClass,
href: href,
target: linkTarget,
- rel: newRel
- }, image);
+ rel: newRel,
+ children: image
+ });
}
const mediaTypeRenders = {
image: () => image,
- video: () => (0,external_React_namespaceObject.createElement)("video", {
+ video: () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
controls: true,
src: mediaUrl
})
};
- const className = classnames_default()({
+ const className = dist_clsx({
'has-media-on-the-right': 'right' === mediaPosition,
'is-stacked-on-mobile': isStackedOnMobile,
[`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
@@ -30310,33 +31141,37 @@ const media_text_deprecated_v6 = {
gridTemplateColumns
};
if ('right' === mediaPosition) {
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className,
style
- })
- }, (0,external_React_namespaceObject.createElement)("div", {
- ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
- className: 'wp-block-media-text__content'
- })
- }), (0,external_React_namespaceObject.createElement)("figure", {
- className: "wp-block-media-text__media",
- style: backgroundStyles
- }, (mediaTypeRenders[mediaType] || noop)()));
+ }),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
+ className: 'wp-block-media-text__content'
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", {
+ className: "wp-block-media-text__media",
+ style: backgroundStyles,
+ children: (mediaTypeRenders[mediaType] || noop)()
+ })]
+ });
}
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className,
style
- })
- }, (0,external_React_namespaceObject.createElement)("figure", {
- className: "wp-block-media-text__media",
- style: backgroundStyles
- }, (mediaTypeRenders[mediaType] || noop)()), (0,external_React_namespaceObject.createElement)("div", {
- ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
- className: 'wp-block-media-text__content'
- })
- }));
+ }),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", {
+ className: "wp-block-media-text__media",
+ style: backgroundStyles,
+ children: (mediaTypeRenders[mediaType] || noop)()
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
+ className: 'wp-block-media-text__content'
+ })
+ })]
+ });
},
migrate: migrateDefaultAlign,
isEligible(attributes, innerBlocks, {
@@ -30383,31 +31218,32 @@ const media_text_deprecated_v5 = {
} = attributes;
const mediaSizeSlug = attributes.mediaSizeSlug || DEFAULT_MEDIA_SIZE_SLUG;
const newRel = !rel ? undefined : rel;
- const imageClasses = classnames_default()({
+ const imageClasses = dist_clsx({
[`wp-image-${mediaId}`]: mediaId && mediaType === 'image',
[`size-${mediaSizeSlug}`]: mediaId && mediaType === 'image'
});
- let image = (0,external_React_namespaceObject.createElement)("img", {
+ let image = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
src: mediaUrl,
alt: mediaAlt,
className: imageClasses || null
});
if (href) {
- image = (0,external_React_namespaceObject.createElement)("a", {
+ image = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
className: linkClass,
href: href,
target: linkTarget,
- rel: newRel
- }, image);
+ rel: newRel,
+ children: image
+ });
}
const mediaTypeRenders = {
image: () => image,
- video: () => (0,external_React_namespaceObject.createElement)("video", {
+ video: () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
controls: true,
src: mediaUrl
})
};
- const className = classnames_default()({
+ const className = dist_clsx({
'has-media-on-the-right': 'right' === mediaPosition,
'is-stacked-on-mobile': isStackedOnMobile,
[`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
@@ -30422,33 +31258,37 @@ const media_text_deprecated_v5 = {
gridTemplateColumns
};
if ('right' === mediaPosition) {
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className,
style
- })
- }, (0,external_React_namespaceObject.createElement)("div", {
- ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
- className: 'wp-block-media-text__content'
- })
- }), (0,external_React_namespaceObject.createElement)("figure", {
- className: "wp-block-media-text__media",
- style: backgroundStyles
- }, (mediaTypeRenders[mediaType] || noop)()));
+ }),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
+ className: 'wp-block-media-text__content'
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", {
+ className: "wp-block-media-text__media",
+ style: backgroundStyles,
+ children: (mediaTypeRenders[mediaType] || noop)()
+ })]
+ });
}
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className,
style
- })
- }, (0,external_React_namespaceObject.createElement)("figure", {
- className: "wp-block-media-text__media",
- style: backgroundStyles
- }, (mediaTypeRenders[mediaType] || noop)()), (0,external_React_namespaceObject.createElement)("div", {
- ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
- className: 'wp-block-media-text__content'
- })
- }));
+ }),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", {
+ className: "wp-block-media-text__media",
+ style: backgroundStyles,
+ children: (mediaTypeRenders[mediaType] || noop)()
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
+ className: 'wp-block-media-text__content'
+ })
+ })]
+ });
},
migrate: migrateDefaultAlign
};
@@ -30479,31 +31319,32 @@ const media_text_deprecated_v4 = {
} = attributes;
const mediaSizeSlug = attributes.mediaSizeSlug || DEFAULT_MEDIA_SIZE_SLUG;
const newRel = !rel ? undefined : rel;
- const imageClasses = classnames_default()({
+ const imageClasses = dist_clsx({
[`wp-image-${mediaId}`]: mediaId && mediaType === 'image',
[`size-${mediaSizeSlug}`]: mediaId && mediaType === 'image'
});
- let image = (0,external_React_namespaceObject.createElement)("img", {
+ let image = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
src: mediaUrl,
alt: mediaAlt,
className: imageClasses || null
});
if (href) {
- image = (0,external_React_namespaceObject.createElement)("a", {
+ image = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
className: linkClass,
href: href,
target: linkTarget,
- rel: newRel
- }, image);
+ rel: newRel,
+ children: image
+ });
}
const mediaTypeRenders = {
image: () => image,
- video: () => (0,external_React_namespaceObject.createElement)("video", {
+ video: () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
controls: true,
src: mediaUrl
})
};
- const className = classnames_default()({
+ const className = dist_clsx({
'has-media-on-the-right': 'right' === mediaPosition,
'is-stacked-on-mobile': isStackedOnMobile,
[`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
@@ -30517,19 +31358,21 @@ const media_text_deprecated_v4 = {
const style = {
gridTemplateColumns
};
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className,
style
- })
- }, (0,external_React_namespaceObject.createElement)("figure", {
- className: "wp-block-media-text__media",
- style: backgroundStyles
- }, (mediaTypeRenders[mediaType] || noop)()), (0,external_React_namespaceObject.createElement)("div", {
- ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
- className: 'wp-block-media-text__content'
- })
- }));
+ }),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", {
+ className: "wp-block-media-text__media",
+ style: backgroundStyles,
+ children: (mediaTypeRenders[mediaType] || noop)()
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
+ className: 'wp-block-media-text__content'
+ })
+ })]
+ });
},
migrate: migrateDefaultAlign
};
@@ -30612,28 +31455,29 @@ const media_text_deprecated_v3 = {
rel
} = attributes;
const newRel = !rel ? undefined : rel;
- let image = (0,external_React_namespaceObject.createElement)("img", {
+ let image = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
src: mediaUrl,
alt: mediaAlt,
className: mediaId && mediaType === 'image' ? `wp-image-${mediaId}` : null
});
if (href) {
- image = (0,external_React_namespaceObject.createElement)("a", {
+ image = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
className: linkClass,
href: href,
target: linkTarget,
- rel: newRel
- }, image);
+ rel: newRel,
+ children: image
+ });
}
const mediaTypeRenders = {
image: () => image,
- video: () => (0,external_React_namespaceObject.createElement)("video", {
+ video: () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
controls: true,
src: mediaUrl
})
};
const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('background-color', backgroundColor);
- const className = classnames_default()({
+ const className = dist_clsx({
'has-media-on-the-right': 'right' === mediaPosition,
'has-background': backgroundClass || customBackgroundColor,
[backgroundClass]: backgroundClass,
@@ -30650,15 +31494,18 @@ const media_text_deprecated_v3 = {
backgroundColor: backgroundClass ? undefined : customBackgroundColor,
gridTemplateColumns
};
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: className,
- style: style
- }, (0,external_React_namespaceObject.createElement)("figure", {
- className: "wp-block-media-text__media",
- style: backgroundStyles
- }, (mediaTypeRenders[mediaType] || noop)()), (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-media-text__content"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)));
+ style: style,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", {
+ className: "wp-block-media-text__media",
+ style: backgroundStyles,
+ children: (mediaTypeRenders[mediaType] || noop)()
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-media-text__content",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
+ })]
+ });
}
};
@@ -30708,18 +31555,18 @@ const media_text_deprecated_v2 = {
focalPoint
} = attributes;
const mediaTypeRenders = {
- image: () => (0,external_React_namespaceObject.createElement)("img", {
+ image: () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
src: mediaUrl,
alt: mediaAlt,
className: mediaId && mediaType === 'image' ? `wp-image-${mediaId}` : null
}),
- video: () => (0,external_React_namespaceObject.createElement)("video", {
+ video: () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
controls: true,
src: mediaUrl
})
};
const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('background-color', backgroundColor);
- const className = classnames_default()({
+ const className = dist_clsx({
'has-media-on-the-right': 'right' === mediaPosition,
[backgroundClass]: backgroundClass,
'is-stacked-on-mobile': isStackedOnMobile,
@@ -30735,15 +31582,18 @@ const media_text_deprecated_v2 = {
backgroundColor: backgroundClass ? undefined : customBackgroundColor,
gridTemplateColumns
};
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: className,
- style: style
- }, (0,external_React_namespaceObject.createElement)("figure", {
- className: "wp-block-media-text__media",
- style: backgroundStyles
- }, (mediaTypeRenders[mediaType] || noop)()), (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-media-text__content"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)));
+ style: style,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", {
+ className: "wp-block-media-text__media",
+ style: backgroundStyles,
+ children: (mediaTypeRenders[mediaType] || noop)()
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-media-text__content",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
+ })]
+ });
}
};
@@ -30780,17 +31630,17 @@ const media_text_deprecated_v1 = {
mediaWidth
} = attributes;
const mediaTypeRenders = {
- image: () => (0,external_React_namespaceObject.createElement)("img", {
+ image: () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
src: mediaUrl,
alt: mediaAlt
}),
- video: () => (0,external_React_namespaceObject.createElement)("video", {
+ video: () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
controls: true,
src: mediaUrl
})
};
const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('background-color', backgroundColor);
- const className = classnames_default()({
+ const className = dist_clsx({
'has-media-on-the-right': 'right' === mediaPosition,
[backgroundClass]: backgroundClass,
'is-stacked-on-mobile': isStackedOnMobile
@@ -30803,66 +31653,72 @@ const media_text_deprecated_v1 = {
backgroundColor: backgroundClass ? undefined : customBackgroundColor,
gridTemplateColumns
};
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: className,
- style: style
- }, (0,external_React_namespaceObject.createElement)("figure", {
- className: "wp-block-media-text__media"
- }, (mediaTypeRenders[mediaType] || noop)()), (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-media-text__content"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null)));
+ style: style,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", {
+ className: "wp-block-media-text__media",
+ children: (mediaTypeRenders[mediaType] || noop)()
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-media-text__content",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
+ })]
+ });
}
};
/* 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
-
/**
* WordPress dependencies
*/
-const pullLeft = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const pullLeft = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
+ d: "M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"
+ })
+});
/* harmony default export */ const pull_left = (pullLeft);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pull-right.js
-
/**
* WordPress dependencies
*/
-const pullRight = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const pullRight = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
+ d: "M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"
+ })
+});
/* harmony default export */ const pull_right = (pullRight);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/media.js
-
/**
* WordPress dependencies
*/
-const media = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+
+const media = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(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: "m7 6.5 4 2.5-4 2.5z"
-}), (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"
-}));
+ viewBox: "0 0 24 24",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
+ d: "m7 6.5 4 2.5-4 2.5z"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_media = (media);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/media-text/media-container.js
-
/**
* External dependencies
*/
@@ -30884,6 +31740,8 @@ const media = (0,external_React_namespaceObject.createElement)(external_wp_primi
/**
* Constants
*/
+
+
const media_container_ALLOWED_MEDIA_TYPES = ['image', 'video'];
const media_container_noop = () => {};
function imageFillStyles(url, focalPoint) {
@@ -30898,7 +31756,7 @@ const ResizableBoxContainer = (0,external_wp_element_namespaceObject.forwardRef)
...props
}, ref) => {
const isMobile = (0,external_wp_compose_namespaceObject.useViewportMatch)('small', '<');
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ResizableBox, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ResizableBox, {
ref: ref,
showHandle: isSelected && (!isMobile || !isStackedOnMobile),
...props
@@ -30907,22 +31765,29 @@ const ResizableBoxContainer = (0,external_wp_element_namespaceObject.forwardRef)
function ToolbarEditButton({
mediaId,
mediaUrl,
- onSelectMedia
+ onSelectMedia,
+ toggleUseFeaturedImage,
+ useFeaturedImage,
+ featuredImageURL
}) {
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, {
- group: "other"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, {
- mediaId: mediaId,
- mediaURL: mediaUrl,
- allowedTypes: media_container_ALLOWED_MEDIA_TYPES,
- accept: "image/*,video/*",
- onSelect: onSelectMedia
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "other",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, {
+ mediaId: mediaId,
+ mediaUrl: useFeaturedImage && featuredImageURL ? featuredImageURL : mediaUrl,
+ allowedTypes: media_container_ALLOWED_MEDIA_TYPES,
+ accept: "image/*,video/*",
+ onSelect: onSelectMedia,
+ onToggleFeaturedImage: toggleUseFeaturedImage,
+ useFeaturedImage: useFeaturedImage
+ })
+ });
}
function PlaceholderContainer({
className,
mediaUrl,
- onSelectMedia
+ onSelectMedia,
+ toggleUseFeaturedImage
}) {
const {
createErrorNotice
@@ -30932,8 +31797,8 @@ function PlaceholderContainer({
type: 'snackbar'
});
};
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, {
- icon: (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, {
+ icon: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, {
icon: library_media
}),
labels: {
@@ -30942,6 +31807,7 @@ function PlaceholderContainer({
className: className,
onSelect: onSelectMedia,
accept: "image/*,video/*",
+ onToggleFeaturedImage: toggleUseFeaturedImage,
allowedTypes: media_container_ALLOWED_MEDIA_TYPES,
onError: onUploadError,
disableMediaButtons: mediaUrl
@@ -30963,13 +31829,17 @@ function MediaContainer(props, ref) {
mediaWidth,
onSelectMedia,
onWidthChange,
- enableResize
+ enableResize,
+ toggleUseFeaturedImage,
+ useFeaturedImage,
+ featuredImageURL,
+ featuredImageAlt
} = props;
const isTemporaryMedia = !mediaId && (0,external_wp_blob_namespaceObject.isBlobURL)(mediaUrl);
const {
toggleSelection
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
- if (mediaUrl) {
+ if (mediaUrl || featuredImageURL || useFeaturedImage) {
const onResizeStart = () => {
toggleSelection(false);
};
@@ -30984,20 +31854,23 @@ function MediaContainer(props, ref) {
right: enableResize && mediaPosition === 'left',
left: enableResize && mediaPosition === 'right'
};
- const backgroundStyles = mediaType === 'image' && imageFill ? imageFillStyles(mediaUrl, focalPoint) : {};
+ const backgroundStyles = mediaType === 'image' && imageFill ? imageFillStyles(mediaUrl || featuredImageURL, focalPoint) : {};
const mediaTypeRenderers = {
- image: () => (0,external_React_namespaceObject.createElement)("img", {
+ image: () => useFeaturedImage && featuredImageURL ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ src: featuredImageURL,
+ alt: featuredImageAlt
+ }) : mediaUrl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
src: mediaUrl,
alt: mediaAlt
}),
- video: () => (0,external_React_namespaceObject.createElement)("video", {
+ video: () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
controls: true,
src: mediaUrl
})
};
- return (0,external_React_namespaceObject.createElement)(ResizableBoxContainer, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(ResizableBoxContainer, {
as: "figure",
- className: classnames_default()(className, 'editor-media-container__resizer', {
+ className: dist_clsx(className, 'editor-media-container__resizer', {
'is-transient': isTemporaryMedia
}),
style: backgroundStyles,
@@ -31013,23 +31886,28 @@ function MediaContainer(props, ref) {
axis: "x",
isSelected: isSelected,
isStackedOnMobile: isStackedOnMobile,
- ref: ref
- }, (0,external_React_namespaceObject.createElement)(ToolbarEditButton, {
- onSelectMedia: onSelectMedia,
- mediaUrl: mediaUrl,
- mediaId: mediaId
- }), (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_React_namespaceObject.createElement)(PlaceholderContainer, {
+ ref: ref,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ToolbarEditButton, {
+ onSelectMedia: onSelectMedia,
+ mediaUrl: useFeaturedImage && featuredImageURL ? featuredImageURL : mediaUrl,
+ mediaId: mediaId,
+ toggleUseFeaturedImage: toggleUseFeaturedImage,
+ useFeaturedImage: useFeaturedImage
+ }), (mediaTypeRenderers[mediaType] || media_container_noop)(), isTemporaryMedia && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}), !useFeaturedImage && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PlaceholderContainer, {
+ ...props
+ }), !featuredImageURL && useFeaturedImage && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, {
+ className: "wp-block-media-text--placeholder-image",
+ withIllustration: true
+ })]
+ });
+ }
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PlaceholderContainer, {
...props
});
}
/* 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
-
/**
* External dependencies
*/
@@ -31053,6 +31931,14 @@ function MediaContainer(props, ref) {
+
+
+
+
+const {
+ ResolutionTool: edit_ResolutionTool
+} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
+
// this limits the resize to a safe zone to avoid making broken layouts
const applyWidthConstraints = width => Math.max(WIDTH_CONSTRAINT_PERCENTAGE, Math.min(width, 100 - WIDTH_CONSTRAINT_PERCENTAGE));
function getImageSourceUrlBySizeSlug(image, slug) {
@@ -31128,7 +32014,11 @@ function edit_attributesFromMedia({
function MediaTextEdit({
attributes,
isSelected,
- setAttributes
+ setAttributes,
+ context: {
+ postId,
+ postType
+ }
}) {
const {
focalPoint,
@@ -31146,9 +32036,32 @@ function MediaTextEdit({
mediaWidth,
rel,
verticalAlignment,
- allowedBlocks
+ allowedBlocks,
+ useFeaturedImage
} = attributes;
const mediaSizeSlug = attributes.mediaSizeSlug || DEFAULT_MEDIA_SIZE_SLUG;
+ const [featuredImage] = (0,external_wp_coreData_namespaceObject.useEntityProp)('postType', postType, 'featured_media', postId);
+ const featuredImageMedia = (0,external_wp_data_namespaceObject.useSelect)(select => featuredImage && select(external_wp_coreData_namespaceObject.store).getMedia(featuredImage, {
+ context: 'view'
+ }), [featuredImage]);
+ const featuredImageURL = useFeaturedImage ? featuredImageMedia?.source_url : '';
+ const featuredImageAlt = useFeaturedImage ? featuredImageMedia?.alt_text : '';
+ const toggleUseFeaturedImage = () => {
+ setAttributes({
+ imageFill: false,
+ mediaType: 'image',
+ mediaId: undefined,
+ mediaUrl: undefined,
+ mediaAlt: undefined,
+ mediaLink: undefined,
+ linkDestination: undefined,
+ linkTarget: undefined,
+ linkClass: undefined,
+ rel: undefined,
+ href: undefined,
+ useFeaturedImage: !useFeaturedImage
+ });
+ };
const {
imageSizes,
image
@@ -31191,7 +32104,7 @@ function MediaTextEdit({
});
setTemporaryMediaWidth(null);
};
- const classNames = classnames_default()({
+ const classNames = dist_clsx({
'has-media-on-the-right': 'right' === mediaPosition,
'is-selected': isSelected,
'is-stacked-on-mobile': isStackedOnMobile,
@@ -31233,56 +32146,112 @@ function MediaTextEdit({
mediaSizeSlug: newMediaSizeSlug
});
};
- const mediaTextGeneralSettings = (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.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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Crop image to fill'),
- checked: !!imageFill,
- onChange: () => setAttributes({
- imageFill: !imageFill
- })
- }), imageFill && mediaUrl && mediaType === 'image' && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.FocalPointPicker, {
- __nextHasNoMarginBottom: true,
- __next40pxDefaultSize: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Focal point'),
- url: mediaUrl,
- value: focalPoint,
- onChange: value => setAttributes({
- focalPoint: value
- }),
- onDragStart: imperativeFocalPointPreview,
- onDrag: imperativeFocalPointPreview
- }), 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_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.'))
- }), 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.')
- }));
+ const dropdownMenuProps = useToolsPanelDropdownMenuProps();
+ const mediaTextGeneralSettings = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalToolsPanel, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ resetAll: () => {
+ setAttributes({
+ isStackedOnMobile: true,
+ imageFill: false,
+ mediaAlt: '',
+ focalPoint: undefined,
+ mediaWidth: 50,
+ mediaSizeSlug: undefined
+ });
+ },
+ dropdownMenuProps: dropdownMenuProps,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Media width'),
+ isShownByDefault: true,
+ hasValue: () => mediaWidth !== 50,
+ onDeselect: () => setAttributes({
+ mediaWidth: 50
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Stack on mobile'),
+ isShownByDefault: true,
+ hasValue: () => !isStackedOnMobile,
+ onDeselect: () => setAttributes({
+ isStackedOnMobile: true
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Stack on mobile'),
+ checked: isStackedOnMobile,
+ onChange: () => setAttributes({
+ isStackedOnMobile: !isStackedOnMobile
+ })
+ })
+ }), mediaType === 'image' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Crop image to fill'),
+ isShownByDefault: true,
+ hasValue: () => !!imageFill,
+ onDeselect: () => setAttributes({
+ imageFill: false
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Crop image to fill'),
+ checked: !!imageFill,
+ onChange: () => setAttributes({
+ imageFill: !imageFill
+ })
+ })
+ }), imageFill && (mediaUrl || featuredImageURL) && mediaType === 'image' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Focal point'),
+ isShownByDefault: true,
+ hasValue: () => !!focalPoint,
+ onDeselect: () => setAttributes({
+ focalPoint: undefined
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FocalPointPicker, {
+ __nextHasNoMarginBottom: true,
+ __next40pxDefaultSize: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Focal point'),
+ url: useFeaturedImage && featuredImageURL ? featuredImageURL : mediaUrl,
+ value: focalPoint,
+ onChange: value => setAttributes({
+ focalPoint: value
+ }),
+ onDragStart: imperativeFocalPointPreview,
+ onDrag: imperativeFocalPointPreview
+ })
+ }), mediaType === 'image' && mediaUrl && !useFeaturedImage && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Alternative text'),
+ isShownByDefault: true,
+ hasValue: () => !!mediaAlt,
+ onDeselect: () => setAttributes({
+ mediaAlt: ''
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextareaControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Alternative text'),
+ value: mediaAlt,
+ onChange: onMediaAltChange,
+ help: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, {
+ href:
+ // translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
+ (0,external_wp_i18n_namespaceObject.__)('https://www.w3.org/WAI/tutorials/images/decision-tree/'),
+ children: (0,external_wp_i18n_namespaceObject.__)('Describe the purpose of the image.')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}), (0,external_wp_i18n_namespaceObject.__)('Leave empty if decorative.')]
+ })
+ })
+ }), mediaType === 'image' && !useFeaturedImage && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(edit_ResolutionTool, {
+ value: mediaSizeSlug,
+ options: imageSizeOptions,
+ onChange: updateImage
+ })]
+ });
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
className: classNames,
style
@@ -31294,64 +32263,75 @@ function MediaTextEdit({
allowedBlocks
});
const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
- 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_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockVerticalAlignmentControl, {
- onChange: onVerticalAlignmentChange,
- value: verticalAlignment
- }), (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_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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalImageURLInputUI, {
- url: href || '',
- onChangeUrl: onSetHref,
- linkDestination: linkDestination,
- mediaType: mediaType,
- mediaUrl: image && image.source_url,
- mediaLink: image && image.link,
- linkTarget: linkTarget,
- linkClass: linkClass,
- rel: rel
- })), (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, mediaPosition === 'right' && (0,external_React_namespaceObject.createElement)("div", {
- ...innerBlocksProps
- }), (0,external_React_namespaceObject.createElement)(media_container, {
- className: "wp-block-media-text__media",
- onSelectMedia: onSelectMedia,
- onWidthChange: onWidthChange,
- commitWidthChange: commitWidthChange,
- ref: refMediaContainer,
- enableResize: blockEditingMode === 'default',
- focalPoint,
- imageFill,
- isSelected,
- isStackedOnMobile,
- mediaAlt,
- mediaId,
- mediaPosition,
- mediaType,
- mediaUrl,
- mediaWidth
- }), mediaPosition !== 'right' && (0,external_React_namespaceObject.createElement)("div", {
- ...innerBlocksProps
- })));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: mediaTextGeneralSettings
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: [blockEditingMode === 'default' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockVerticalAlignmentControl, {
+ onChange: onVerticalAlignmentChange,
+ value: verticalAlignment
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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'
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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' && !useFeaturedImage && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalImageURLInputUI, {
+ url: href || '',
+ onChangeUrl: onSetHref,
+ linkDestination: linkDestination,
+ mediaType: mediaType,
+ mediaUrl: image && image.source_url,
+ mediaLink: image && image.link,
+ linkTarget: linkTarget,
+ linkClass: linkClass,
+ rel: rel
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ ...blockProps,
+ children: [mediaPosition === 'right' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...innerBlocksProps
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(media_container, {
+ className: "wp-block-media-text__media",
+ onSelectMedia: onSelectMedia,
+ onWidthChange: onWidthChange,
+ commitWidthChange: commitWidthChange,
+ ref: refMediaContainer,
+ enableResize: blockEditingMode === 'default',
+ toggleUseFeaturedImage: toggleUseFeaturedImage,
+ focalPoint,
+ imageFill,
+ isSelected,
+ isStackedOnMobile,
+ mediaAlt,
+ mediaId,
+ mediaPosition,
+ mediaType,
+ mediaUrl,
+ mediaWidth,
+ useFeaturedImage,
+ featuredImageURL,
+ featuredImageAlt
+ }), mediaPosition !== 'right' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...innerBlocksProps
+ })]
+ })]
+ });
}
/* harmony default export */ const media_text_edit = (MediaTextEdit);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/media-text/save.js
-
/**
* External dependencies
*/
@@ -31367,6 +32347,8 @@ function MediaTextEdit({
*/
+
+
const save_DEFAULT_MEDIA_WIDTH = 50;
const save_noop = () => {};
function media_text_save_save({
@@ -31390,31 +32372,32 @@ function media_text_save_save({
} = attributes;
const mediaSizeSlug = attributes.mediaSizeSlug || DEFAULT_MEDIA_SIZE_SLUG;
const newRel = !rel ? undefined : rel;
- const imageClasses = classnames_default()({
+ const imageClasses = dist_clsx({
[`wp-image-${mediaId}`]: mediaId && mediaType === 'image',
[`size-${mediaSizeSlug}`]: mediaId && mediaType === 'image'
});
- let image = (0,external_React_namespaceObject.createElement)("img", {
+ let image = mediaUrl ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
src: mediaUrl,
alt: mediaAlt,
className: imageClasses || null
- });
+ }) : null;
if (href) {
- image = (0,external_React_namespaceObject.createElement)("a", {
+ image = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
className: linkClass,
href: href,
target: linkTarget,
- rel: newRel
- }, image);
+ rel: newRel,
+ children: image
+ });
}
const mediaTypeRenders = {
image: () => image,
- video: () => (0,external_React_namespaceObject.createElement)("video", {
+ video: () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
controls: true,
src: mediaUrl
})
};
- const className = classnames_default()({
+ const className = dist_clsx({
'has-media-on-the-right': 'right' === mediaPosition,
'is-stacked-on-mobile': isStackedOnMobile,
[`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
@@ -31429,33 +32412,37 @@ function media_text_save_save({
gridTemplateColumns
};
if ('right' === mediaPosition) {
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className,
style
- })
- }, (0,external_React_namespaceObject.createElement)("div", {
- ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
- className: 'wp-block-media-text__content'
- })
- }), (0,external_React_namespaceObject.createElement)("figure", {
- className: "wp-block-media-text__media",
- style: backgroundStyles
- }, (mediaTypeRenders[mediaType] || save_noop)()));
+ }),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
+ className: 'wp-block-media-text__content'
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", {
+ className: "wp-block-media-text__media",
+ style: backgroundStyles,
+ children: (mediaTypeRenders[mediaType] || save_noop)()
+ })]
+ });
}
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className,
style
- })
- }, (0,external_React_namespaceObject.createElement)("figure", {
- className: "wp-block-media-text__media",
- style: backgroundStyles
- }, (mediaTypeRenders[mediaType] || save_noop)()), (0,external_React_namespaceObject.createElement)("div", {
- ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
- className: 'wp-block-media-text__content'
- })
- }));
+ }),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", {
+ className: "wp-block-media-text__media",
+ style: backgroundStyles,
+ children: (mediaTypeRenders[mediaType] || save_noop)()
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
+ className: 'wp-block-media-text__content'
+ })
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/media-text/transforms.js
@@ -31754,8 +32741,13 @@ const media_text_metadata = {
},
allowedBlocks: {
type: "array"
+ },
+ useFeaturedImage: {
+ type: "boolean",
+ "default": false
}
},
+ usesContext: ["postId", "postType"],
supports: {
anchor: true,
align: ["wide", "full"],
@@ -31832,7 +32824,6 @@ const media_text_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/missing/edit.js
-
/**
* WordPress dependencies
*/
@@ -31843,6 +32834,8 @@ const media_text_init = () => initBlock({
+
+
function MissingBlockWarning({
attributes,
convertToHTML,
@@ -31868,11 +32861,11 @@ function MissingBlockWarning({
}, [clientId]);
const actions = [];
let messageHTML;
- const convertToHtmlButton = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- key: "convert",
+ const convertToHtmlButton = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
onClick: convertToHTML,
- variant: "primary"
- }, (0,external_wp_i18n_namespaceObject.__)('Keep as HTML'));
+ variant: "primary",
+ children: (0,external_wp_i18n_namespaceObject.__)('Keep as HTML')
+ }, "convert");
if (hasContent && !hasFreeformBlock && !originalName) {
if (hasHTMLBlock) {
messageHTML = (0,external_wp_i18n_namespaceObject.__)('It appears you are trying to use the deprecated Classic block. You can leave this block intact, convert its content to a Custom HTML block, or remove it entirely. Alternatively, you can refresh the page to use the Classic block.');
@@ -31888,13 +32881,17 @@ 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_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({
className: 'has-warning'
- })
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, {
- actions: actions
- }, messageHTML), (0,external_React_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, null, (0,external_wp_dom_namespaceObject.safeHTML)(originalUndelimitedContent)));
+ }),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, {
+ actions: actions,
+ children: messageHTML
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, {
+ children: (0,external_wp_dom_namespaceObject.safeHTML)(originalUndelimitedContent)
+ })]
+ });
}
const MissingEdit = (0,external_wp_data_namespaceObject.withDispatch)((dispatch, {
clientId,
@@ -31914,16 +32911,18 @@ const MissingEdit = (0,external_wp_data_namespaceObject.withDispatch)((dispatch,
/* harmony default export */ const missing_edit = (MissingEdit);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/missing/save.js
-
/**
* WordPress dependencies
*/
+
function missing_save_save({
attributes
}) {
// Preserve the missing block's content.
- return (0,external_React_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, null, attributes.originalContent);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, {
+ children: attributes.originalContent
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/missing/index.js
@@ -31999,21 +32998,21 @@ const missing_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/more.js
-
/**
* WordPress dependencies
*/
-const more = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const more = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "M4 9v1.5h16V9H4zm12 5.5h4V13h-4v1.5zm-6 0h4V13h-4v1.5zm-6 0h4V13H4v1.5z"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
+ d: "M4 9v1.5h16V9H4zm12 5.5h4V13h-4v1.5zm-6 0h4V13h-4v1.5zm-6 0h4V13H4v1.5z"
+ })
+});
/* harmony default export */ const library_more = (more);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/more/edit.js
-
/**
* WordPress dependencies
*/
@@ -32022,6 +33021,9 @@ const more = (0,external_React_namespaceObject.createElement)(external_wp_primit
+
+
+
const DEFAULT_TEXT = (0,external_wp_i18n_namespaceObject.__)('Read more');
function MoreEdit({
attributes: {
@@ -32033,7 +33035,7 @@ function MoreEdit({
}) {
const onChangeInput = event => {
setAttributes({
- customText: event.target.value !== '' ? event.target.value : undefined
+ customText: event.target.value
});
};
const onKeyDown = ({
@@ -32050,31 +33052,38 @@ function MoreEdit({
const style = {
width: `${(customText ? customText : DEFAULT_TEXT).length + 1.2}em`
};
- 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_React_namespaceObject.createElement)("div", {
- ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)()
- }, (0,external_React_namespaceObject.createElement)("input", {
- "aria-label": (0,external_wp_i18n_namespaceObject.__)('“Read more” link text'),
- type: "text",
- value: customText,
- placeholder: DEFAULT_TEXT,
- onChange: onChangeInput,
- onKeyDown: onKeyDown,
- style: style
- })));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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
+ })
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("input", {
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('“Read more” link text'),
+ type: "text",
+ value: customText,
+ placeholder: DEFAULT_TEXT,
+ onChange: onChangeInput,
+ onKeyDown: onKeyDown,
+ style: style
+ })
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/more/save.js
-
/**
* WordPress dependencies
*/
+
function more_save_save({
attributes: {
customText,
@@ -32083,7 +33092,9 @@ function more_save_save({
}) {
const moreTag = customText ? `<!--more ${customText}-->` : '<!--more-->';
const noTeaserTag = noTeaser ? '<!--noteaser-->' : '';
- return (0,external_React_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, null, [moreTag, noTeaserTag].filter(Boolean).join('\n'));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, {
+ children: [moreTag, noTeaserTag].filter(Boolean).join('\n')
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/more/transforms.js
@@ -32142,7 +33153,8 @@ const more_metadata = {
textdomain: "default",
attributes: {
customText: {
- type: "string"
+ type: "string",
+ "default": ""
},
noTeaser: {
type: "boolean",
@@ -32191,17 +33203,18 @@ const more_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/navigation.js
-
/**
* WordPress dependencies
*/
-const navigation = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const navigation = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_navigation = (navigation);
;// CONCATENATED MODULE: external ["wp","a11y"]
@@ -32239,17 +33252,18 @@ function 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
-
/**
* WordPress dependencies
*/
-const close_close = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const close_close = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_close = (close_close);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/constants.js
@@ -32291,11 +33305,14 @@ function useNavigationMenu(ref) {
return selectExistingMenu(select, ref);
}, [ref]);
const {
- canCreate,
- canUpdate,
- canDelete,
- isResolving,
- hasResolved
+ // Can the user create navigation menus?
+ canCreate: canCreateNavigationMenus,
+ // Can the user update the specific navigation menu with the given post ID?
+ canUpdate: canUpdateNavigationMenu,
+ // Can the user delete the specific navigation menu with the given post ID?
+ canDelete: canDeleteNavigationMenu,
+ isResolving: isResolvingPermissions,
+ hasResolved: hasResolvedPermissions
} = permissions;
const {
records: navigationMenus,
@@ -32311,13 +33328,13 @@ function useNavigationMenu(ref) {
isResolvingNavigationMenus,
hasResolvedNavigationMenus,
canSwitchNavigationMenu,
- canUserCreateNavigationMenu: canCreate,
- isResolvingCanUserCreateNavigationMenu: isResolving,
- hasResolvedCanUserCreateNavigationMenu: hasResolved,
- canUserUpdateNavigationMenu: canUpdate,
- hasResolvedCanUserUpdateNavigationMenu: ref ? hasResolved : undefined,
- canUserDeleteNavigationMenu: canDelete,
- hasResolvedCanUserDeleteNavigationMenu: ref ? hasResolved : undefined
+ canUserCreateNavigationMenus: canCreateNavigationMenus,
+ isResolvingCanUserCreateNavigationMenus: isResolvingPermissions,
+ hasResolvedCanUserCreateNavigationMenus: hasResolvedPermissions,
+ canUserUpdateNavigationMenu: canUpdateNavigationMenu,
+ hasResolvedCanUserUpdateNavigationMenu: ref ? hasResolvedPermissions : undefined,
+ canUserDeleteNavigationMenu: canDeleteNavigationMenu,
+ hasResolvedCanUserDeleteNavigationMenu: ref ? hasResolvedPermissions : undefined
};
}
function selectExistingMenu(select, ref) {
@@ -32423,42 +33440,45 @@ function useNavigationEntities(menuId) {
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/edit/placeholder/placeholder-preview.js
-
/**
* WordPress dependencies
*/
+
+
const PlaceholderPreview = ({
isVisible = true
}) => {
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
"aria-hidden": !isVisible ? true : undefined,
- className: "wp-block-navigation-placeholder__preview"
- }, (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-navigation-placeholder__actions__indicator"
- }, (0,external_React_namespaceObject.createElement)(build_module_icon, {
- icon: library_navigation
- }), (0,external_wp_i18n_namespaceObject.__)('Navigation')));
+ className: "wp-block-navigation-placeholder__preview",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ className: "wp-block-navigation-placeholder__actions__indicator",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, {
+ icon: library_navigation
+ }), (0,external_wp_i18n_namespaceObject.__)('Navigation')]
+ })
+ });
};
/* harmony default export */ const placeholder_preview = (PlaceholderPreview);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/more-vertical.js
-
/**
* WordPress dependencies
*/
-const moreVertical = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const moreVertical = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
+ d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"
+ })
+});
/* harmony default export */ const more_vertical = (moreVertical);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/edit/navigation-menu-selector.js
-
/**
* WordPress dependencies
*/
@@ -32474,6 +33494,9 @@ const moreVertical = (0,external_React_namespaceObject.createElement)(external_w
*/
+
+
+
function buildMenuLabel(title, id, status) {
if (!title) {
/* translators: %s is the index of the menu in the list of menus. */
@@ -32506,7 +33529,7 @@ function NavigationMenuSelector({
navigationMenus,
isResolvingNavigationMenus,
hasResolvedNavigationMenus,
- canUserCreateNavigationMenu,
+ canUserCreateNavigationMenus,
canSwitchNavigationMenu
} = useNavigationMenu();
const [currentTitle] = (0,external_wp_coreData_namespaceObject.useEntityProp)('postType', 'wp_navigation', 'title');
@@ -32528,7 +33551,7 @@ function NavigationMenuSelector({
const hasNavigationMenus = !!navigationMenus?.length;
const hasClassicMenus = !!classicMenus?.length;
const showNavigationMenus = !!canSwitchNavigationMenu;
- const showClassicMenus = !!canUserCreateNavigationMenu;
+ const showClassicMenus = !!canUserCreateNavigationMenus;
const noMenuSelected = hasNavigationMenus && !currentMenuId;
const noBlockMenus = !hasNavigationMenus && hasResolvedNavigationMenus;
const menuUnavailable = hasResolvedNavigationMenus && currentMenuId === null;
@@ -32537,7 +33560,7 @@ function NavigationMenuSelector({
selectorLabel = (0,external_wp_i18n_namespaceObject.__)('Loading…');
} else if (noMenuSelected || noBlockMenus || menuUnavailable) {
// Note: classic Menus may be available.
- selectorLabel = (0,external_wp_i18n_namespaceObject.__)('Choose or create a Navigation menu');
+ selectorLabel = (0,external_wp_i18n_namespaceObject.__)('Choose or create a Navigation Menu');
} else {
// Current Menu's title.
selectorLabel = currentTitle;
@@ -32546,56 +33569,62 @@ function NavigationMenuSelector({
if (isUpdatingMenuRef && (createNavigationMenuIsSuccess || createNavigationMenuIsError)) {
setIsUpdatingMenuRef(false);
}
- }, [hasResolvedNavigationMenus, createNavigationMenuIsSuccess, canUserCreateNavigationMenu, createNavigationMenuIsError, isUpdatingMenuRef, menuUnavailable, noBlockMenus, noMenuSelected]);
- const NavigationMenuSelectorDropdown = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.DropdownMenu, {
+ }, [hasResolvedNavigationMenus, createNavigationMenuIsSuccess, canUserCreateNavigationMenus, createNavigationMenuIsError, isUpdatingMenuRef, menuUnavailable, noBlockMenus, noMenuSelected]);
+ const NavigationMenuSelectorDropdown = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.DropdownMenu, {
label: selectorLabel,
icon: more_vertical,
toggleProps: {
- isSmall: true
- }
- }, ({
- onClose
- }) => (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItemsChoice, {
- value: currentMenuId,
- onSelect: menuId => {
- onSelectNavigationMenu(menuId);
- onClose();
- },
- 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_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: isUpdatingMenuRef || isResolvingNavigationMenus || !hasResolvedNavigationMenus
- }, label);
- })), canUserCreateNavigationMenu && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, {
- label: (0,external_wp_i18n_namespaceObject.__)('Tools')
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
- onClick: async () => {
- setIsUpdatingMenuRef(true);
- await onCreateNew();
- setIsUpdatingMenuRef(false);
- onClose();
+ size: 'small'
},
- disabled: isUpdatingMenuRef || isResolvingNavigationMenus || !hasResolvedNavigationMenus
- }, (0,external_wp_i18n_namespaceObject.__)('Create new menu')))));
+ children: ({
+ onClose
+ }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [showNavigationMenus && hasNavigationMenus && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Menus'),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItemsChoice, {
+ value: currentMenuId,
+ onSelect: menuId => {
+ onSelectNavigationMenu(menuId);
+ onClose();
+ },
+ choices: menuChoices
+ })
+ }), showClassicMenus && hasClassicMenus && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Import Classic Menus'),
+ children: classicMenus?.map(menu => {
+ const label = (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(menu.name);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
+ onClick: async () => {
+ setIsUpdatingMenuRef(true);
+ await onSelectClassicMenu(menu);
+ setIsUpdatingMenuRef(false);
+ onClose();
+ },
+ "aria-label": (0,external_wp_i18n_namespaceObject.sprintf)(createActionLabel, label),
+ disabled: isUpdatingMenuRef || isResolvingNavigationMenus || !hasResolvedNavigationMenus,
+ children: label
+ }, menu.id);
+ })
+ }), canUserCreateNavigationMenus && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Tools'),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
+ onClick: async () => {
+ setIsUpdatingMenuRef(true);
+ await onCreateNew();
+ setIsUpdatingMenuRef(false);
+ onClose();
+ },
+ disabled: isUpdatingMenuRef || isResolvingNavigationMenus || !hasResolvedNavigationMenus,
+ children: (0,external_wp_i18n_namespaceObject.__)('Create new Menu')
+ })
+ })]
+ })
+ });
return NavigationMenuSelectorDropdown;
}
/* harmony default export */ const navigation_menu_selector = (NavigationMenuSelector);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/edit/placeholder/index.js
-
/**
* WordPress dependencies
*/
@@ -32611,12 +33640,15 @@ function NavigationMenuSelector({
+
+
+
function NavigationPlaceholder({
isSelected,
currentMenuId,
clientId,
- canUserCreateNavigationMenu = false,
- isResolvingCanUserCreateNavigationMenu,
+ canUserCreateNavigationMenus = false,
+ isResolvingCanUserCreateNavigationMenus,
onSelectNavigationMenu,
onSelectClassicMenu,
onCreateEmpty
@@ -32636,82 +33668,91 @@ function NavigationPlaceholder({
(0,external_wp_a11y_namespaceObject.speak)((0,external_wp_i18n_namespaceObject.__)('Navigation block setup options ready.'));
}
}, [hasResolvedMenus, isResolvingMenus, isSelected]);
- const isResolvingActions = isResolvingMenus && isResolvingCanUserCreateNavigationMenu;
- 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_React_namespaceObject.createElement)(placeholder_preview, {
- isVisible: !isSelected
- }), (0,external_React_namespaceObject.createElement)("div", {
- "aria-hidden": !isSelected ? true : undefined,
- className: "wp-block-navigation-placeholder__controls"
- }, (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-navigation-placeholder__actions"
- }, (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-navigation-placeholder__actions__indicator"
- }, (0,external_React_namespaceObject.createElement)(build_module_icon, {
- icon: library_navigation
- }), " ", (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_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'))))));
+ const isResolvingActions = isResolvingMenus && isResolvingCanUserCreateNavigationMenus;
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Placeholder, {
+ className: "wp-block-navigation-placeholder",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(placeholder_preview, {
+ isVisible: !isSelected
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ "aria-hidden": !isSelected ? true : undefined,
+ className: "wp-block-navigation-placeholder__controls",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ className: "wp-block-navigation-placeholder__actions",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ className: "wp-block-navigation-placeholder__actions__indicator",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, {
+ icon: library_navigation
+ }), " ", (0,external_wp_i18n_namespaceObject.__)('Navigation')]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("hr", {}), isResolvingActions && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(navigation_menu_selector, {
+ currentMenuId: currentMenuId,
+ clientId: clientId,
+ onSelectNavigationMenu: onSelectNavigationMenu,
+ onSelectClassicMenu: onSelectClassicMenu
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("hr", {}), canUserCreateNavigationMenus && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ variant: "tertiary",
+ onClick: onCreateEmpty,
+ children: (0,external_wp_i18n_namespaceObject.__)('Start empty')
+ })]
+ })
+ })]
+ })
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/menu.js
-
/**
* WordPress dependencies
*/
-const menu = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const menu = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
+ d: "M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"
+ })
+});
/* harmony default export */ const library_menu = (menu);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/edit/overlay-menu-icon.js
-
/**
* WordPress dependencies
*/
+
+
function OverlayMenuIcon({
icon
}) {
if (icon === 'menu') {
- return (0,external_React_namespaceObject.createElement)(build_module_icon, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, {
icon: library_menu
});
}
- return (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(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_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Rect, {
- x: "4",
- y: "7.5",
- width: "16",
- height: "1.5"
- }), (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Rect, {
- x: "4",
- y: "15",
- width: "16",
- height: "1.5"
- }));
+ focusable: "false",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Rect, {
+ x: "4",
+ y: "7.5",
+ width: "16",
+ height: "1.5"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Rect, {
+ x: "4",
+ y: "15",
+ width: "16",
+ height: "1.5"
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/edit/responsive-wrapper.js
-
/**
* External dependencies
*/
@@ -32729,6 +33770,9 @@ function OverlayMenuIcon({
* Internal dependencies
*/
+
+
+
function ResponsiveWrapper({
children,
id,
@@ -32744,7 +33788,7 @@ function ResponsiveWrapper({
if (!isResponsive) {
return children;
}
- const responsiveContainerClasses = classnames_default()('wp-block-navigation__responsive-container', {
+ const responsiveContainerClasses = dist_clsx('wp-block-navigation__responsive-container', {
'has-text-color': !!overlayTextColor.color || !!overlayTextColor?.class,
[(0,external_wp_blockEditor_namespaceObject.getColorClassName)('color', overlayTextColor?.slug)]: !!overlayTextColor?.slug,
'has-background': !!overlayBackgroundColor.color || overlayBackgroundColor?.class,
@@ -32756,7 +33800,7 @@ function ResponsiveWrapper({
color: !overlayTextColor?.slug && overlayTextColor?.color,
backgroundColor: !overlayBackgroundColor?.slug && overlayBackgroundColor?.color && overlayBackgroundColor.color
};
- const openButtonClasses = classnames_default()('wp-block-navigation__responsive-container-open', {
+ const openButtonClasses = dist_clsx('wp-block-navigation__responsive-container-open', {
'always-shown': isHiddenByDefault
});
const modalId = `${id}-modal`;
@@ -32768,36 +33812,43 @@ function ResponsiveWrapper({
'aria-label': (0,external_wp_i18n_namespaceObject.__)('Menu')
})
};
- 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_React_namespaceObject.createElement)(OverlayMenuIcon, {
- icon: icon
- }), !hasIcon && (0,external_wp_i18n_namespaceObject.__)('Menu')), (0,external_React_namespaceObject.createElement)("div", {
- className: responsiveContainerClasses,
- style: styles,
- id: modalId
- }, (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-navigation__responsive-close",
- tabIndex: "-1"
- }, (0,external_React_namespaceObject.createElement)("div", {
- ...dialogProps
- }, (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_React_namespaceObject.createElement)(build_module_icon, {
- icon: library_close
- }), !hasIcon && (0,external_wp_i18n_namespaceObject.__)('Close')), (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-navigation__responsive-container-content",
- id: `${modalId}-content`
- }, children)))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [!isOpen && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Button, {
+ "aria-haspopup": "true",
+ "aria-label": hasIcon && (0,external_wp_i18n_namespaceObject.__)('Open menu'),
+ className: openButtonClasses,
+ onClick: () => onToggle(true),
+ children: [hasIcon && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(OverlayMenuIcon, {
+ icon: icon
+ }), !hasIcon && (0,external_wp_i18n_namespaceObject.__)('Menu')]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: responsiveContainerClasses,
+ style: styles,
+ id: modalId,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-navigation__responsive-close",
+ tabIndex: "-1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ ...dialogProps,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(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),
+ children: [hasIcon && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, {
+ icon: library_close
+ }), !hasIcon && (0,external_wp_i18n_namespaceObject.__)('Close')]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-navigation__responsive-container-content",
+ id: `${modalId}-content`,
+ children: children
+ })]
+ })
+ })
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/edit/inner-blocks.js
-
/**
* WordPress dependencies
*/
@@ -32811,6 +33862,7 @@ function ResponsiveWrapper({
*/
+
function NavigationInnerBlocks({
clientId,
hasCustomPlaceholder,
@@ -32842,7 +33894,7 @@ function NavigationInnerBlocks({
// 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_React_namespaceObject.createElement)(placeholder_preview, null), []);
+ const placeholder = (0,external_wp_element_namespaceObject.useMemo)(() => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(placeholder_preview, {}), []);
const hasMenuItems = !!blocks?.length;
// If there is a `ref` attribute pointing to a `wp_navigation` but
@@ -32873,22 +33925,22 @@ function NavigationInnerBlocks({
__experimentalCaptureToolbars: true,
__unstableDisableLayoutClassNames: true
});
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
...innerBlocksProps
});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/edit/navigation-menu-name-control.js
-
/**
* WordPress dependencies
*/
+
function NavigationMenuNameControl() {
const [title, updateTitle] = (0,external_wp_coreData_namespaceObject.useEntityProp)('postType', 'wp_navigation', 'title');
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
__nextHasNoMarginBottom: true,
label: (0,external_wp_i18n_namespaceObject.__)('Menu name'),
value: title,
@@ -32922,15 +33974,21 @@ const isDeepEqual = (x, y, shouldSkip) => {
if (x === y) {
return true;
} else if (typeof x === 'object' && x !== null && x !== undefined && typeof y === 'object' && y !== null && y !== undefined) {
- if (Object.keys(x).length !== Object.keys(y).length) return false;
+ if (Object.keys(x).length !== Object.keys(y).length) {
+ return false;
+ }
for (const prop in x) {
if (y.hasOwnProperty(prop)) {
// Afford skipping a given property of an object.
if (shouldSkip && shouldSkip(prop, x)) {
return true;
}
- if (!isDeepEqual(x[prop], y[prop], shouldSkip)) return false;
- } else return false;
+ if (!isDeepEqual(x[prop], y[prop], shouldSkip)) {
+ return false;
+ }
+ } else {
+ return false;
+ }
}
return true;
}
@@ -32938,7 +33996,6 @@ const isDeepEqual = (x, y, shouldSkip) => {
};
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/edit/unsaved-inner-blocks.js
-
/**
* WordPress dependencies
*/
@@ -32953,6 +34010,7 @@ const isDeepEqual = (x, y, shouldSkip) => {
*/
+
const EMPTY_OBJECT = {};
function UnsavedInnerBlocks({
blocks,
@@ -33024,13 +34082,12 @@ function UnsavedInnerBlocks({
createNavigationMenu(null, blocks);
}, [blocks, createNavigationMenu, isDisabled, isSaving, hasResolvedAllNavigationMenus, innerBlocksAreDirty, hasSelection]);
const Wrapper = isSaving ? external_wp_components_namespaceObject.Disabled : 'div';
- return (0,external_React_namespaceObject.createElement)(Wrapper, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Wrapper, {
...innerBlocksProps
});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/edit/navigation-menu-delete-control.js
-
/**
* WordPress dependencies
*/
@@ -33039,42 +34096,41 @@ function UnsavedInnerBlocks({
+
+
+
function NavigationMenuDeleteControl({
onDelete
}) {
- const [isConfirmModalVisible, setIsConfirmModalVisible] = (0,external_wp_element_namespaceObject.useState)(false);
+ const [isConfirmDialogVisible, setIsConfirmDialogVisible] = (0,external_wp_element_namespaceObject.useState)(false);
const id = (0,external_wp_coreData_namespaceObject.useEntityId)('postType', 'wp_navigation');
- const [title] = (0,external_wp_coreData_namespaceObject.useEntityProp)('postType', 'wp_navigation', 'title');
const {
deleteEntityRecord
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
- 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_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_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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- variant: "tertiary",
- onClick: () => {
- setIsConfirmModalVisible(false);
- }
- }, (0,external_wp_i18n_namespaceObject.__)('Cancel')), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- variant: "primary",
- onClick: () => {
- deleteEntityRecord('postType', 'wp_navigation', id, {
- force: true
- });
- onDelete(title);
- }
- }, (0,external_wp_i18n_namespaceObject.__)('Confirm')))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ className: "wp-block-navigation-delete-menu-button",
+ variant: "secondary",
+ isDestructive: true,
+ onClick: () => {
+ setIsConfirmDialogVisible(true);
+ },
+ children: (0,external_wp_i18n_namespaceObject.__)('Delete menu')
+ }), isConfirmDialogVisible && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalConfirmDialog, {
+ isOpen: true,
+ onConfirm: () => {
+ deleteEntityRecord('postType', 'wp_navigation', id, {
+ force: true
+ });
+ onDelete();
+ },
+ onCancel: () => {
+ setIsConfirmDialogVisible(false);
+ },
+ confirmButtonText: (0,external_wp_i18n_namespaceObject.__)('Delete'),
+ children: (0,external_wp_i18n_namespaceObject.__)('Are you sure you want to delete this Navigation Menu?')
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/edit/use-navigation-notice.js
@@ -33115,7 +34171,6 @@ function useNavigationNotice({
/* harmony default export */ const use_navigation_notice = (useNavigationNotice);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/edit/overlay-menu-preview.js
-
/**
* WordPress dependencies
*/
@@ -33126,40 +34181,46 @@ function useNavigationNotice({
* Internal dependencies
*/
+
+
+
function OverlayMenuPreview({
setAttributes,
hasIcon,
icon
}) {
- 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 that toggles the overlay menu.'),
- onChange: value => setAttributes({
- hasIcon: value
- }),
- checked: hasIcon
- }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Icon'),
- value: icon,
- onChange: value => setAttributes({
- icon: value
- }),
- isBlock: true
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
- value: "handle",
- "aria-label": (0,external_wp_i18n_namespaceObject.__)('handle'),
- label: (0,external_React_namespaceObject.createElement)(OverlayMenuIcon, {
- icon: "handle"
- })
- }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
- value: "menu",
- "aria-label": (0,external_wp_i18n_namespaceObject.__)('menu'),
- label: (0,external_React_namespaceObject.createElement)(OverlayMenuIcon, {
- icon: "menu"
- })
- })));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 that toggles the overlay menu.'),
+ onChange: value => setAttributes({
+ hasIcon: value
+ }),
+ checked: hasIcon
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalToggleGroupControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Icon'),
+ value: icon,
+ onChange: value => setAttributes({
+ icon: value
+ }),
+ isBlock: true,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
+ value: "handle",
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('handle'),
+ label: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(OverlayMenuIcon, {
+ icon: "handle"
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
+ value: "menu",
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('menu'),
+ label: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(OverlayMenuIcon, {
+ icon: "menu"
+ })
+ })]
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/menu-items-to-blocks.js
@@ -33814,7 +34875,7 @@ function getColors(context, isSubMenu) {
}
function getNavigationChildBlockProps(innerBlocksColors) {
return {
- className: classnames_default()('wp-block-navigation__submenu-container', {
+ className: dist_clsx('wp-block-navigation__submenu-container', {
'has-text-color': !!(innerBlocksColors.textColor || innerBlocksColors.customTextColor),
[`has-${innerBlocksColors.textColor}-color`]: !!innerBlocksColors.textColor,
'has-background': !!(innerBlocksColors.backgroundColor || innerBlocksColors.customBackgroundColor),
@@ -33828,13 +34889,13 @@ function getNavigationChildBlockProps(innerBlocksColors) {
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/edit/manage-menus-button.js
-
/**
* WordPress dependencies
*/
+
const ManageMenusButton = ({
className = '',
disabled,
@@ -33844,19 +34905,19 @@ const ManageMenusButton = ({
if (isMenuItem) {
ComponentName = external_wp_components_namespaceObject.MenuItem;
}
- return (0,external_React_namespaceObject.createElement)(ComponentName, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ComponentName, {
variant: "link",
disabled: disabled,
className: className,
href: (0,external_wp_url_namespaceObject.addQueryArgs)('edit.php', {
post_type: 'wp_navigation'
- })
- }, (0,external_wp_i18n_namespaceObject.__)('Manage menus'));
+ }),
+ children: (0,external_wp_i18n_namespaceObject.__)('Manage menus')
+ });
};
/* harmony default export */ const manage_menus_button = (ManageMenusButton);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/edit/deleted-navigation-warning.js
-
/**
* WordPress dependencies
*/
@@ -33864,62 +34925,67 @@ const ManageMenusButton = ({
+
function DeletedNavigationWarning({
onCreateNew
}) {
- 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"
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, {
+ children: (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: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ onClick: onCreateNew,
+ variant: "link"
+ })
})
- }));
+ });
}
/* harmony default export */ const deleted_navigation_warning = (DeletedNavigationWarning);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/add-submenu.js
-
/**
* WordPress dependencies
*/
-const addSubmenu = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const addSubmenu = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const add_submenu = (addSubmenu);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-up.js
-
/**
* WordPress dependencies
*/
-const chevronUp = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const chevronUp = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const chevron_up = (chevronUp);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-down.js
-
/**
* WordPress dependencies
*/
-const chevronDown = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const chevronDown = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const chevron_down = (chevronDown);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/edit/leaf-more-menu.js
-
/**
* WordPress dependencies
*/
@@ -33929,6 +34995,9 @@ const chevronDown = (0,external_React_namespaceObject.createElement)(external_wp
+
+
+
const POPOVER_PROPS = {
className: 'block-editor-block-settings-menu__popover',
placement: 'bottom-start'
@@ -33948,7 +35017,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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
icon: add_submenu,
disabled: isDisabled,
onClick: () => {
@@ -33978,8 +35047,9 @@ function AddSubmenuItem({
expand(block.clientId);
}
onClose();
- }
- }, (0,external_wp_i18n_namespaceObject.__)('Add submenu link'));
+ },
+ children: (0,external_wp_i18n_namespaceObject.__)('Add submenu link')
+ });
}
function LeafMoreMenu(props) {
const {
@@ -34004,40 +35074,50 @@ function LeafMoreMenu(props) {
} = select(external_wp_blockEditor_namespaceObject.store);
return getBlockRootClientId(clientId);
}, [clientId]);
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.DropdownMenu, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.DropdownMenu, {
icon: more_vertical,
label: (0,external_wp_i18n_namespaceObject.__)('Options'),
className: "block-editor-block-settings-menu",
popoverProps: POPOVER_PROPS,
noIcons: true,
- ...props
- }, ({
- onClose
- }) => (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_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_React_namespaceObject.createElement)(AddSubmenuItem, {
- block: block,
- onClose: onClose,
- expanded: true,
- expandedState: props.expandedState,
- expand: props.expand,
- setInsertedBlock: props.setInsertedBlock
- })), (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();
- }
- }, removeLabel))));
+ ...props,
+ children: ({
+ onClose
+ }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.MenuGroup, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
+ icon: chevron_up,
+ onClick: () => {
+ moveBlocksUp([clientId], rootClientId);
+ onClose();
+ },
+ children: (0,external_wp_i18n_namespaceObject.__)('Move up')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
+ icon: chevron_down,
+ onClick: () => {
+ moveBlocksDown([clientId], rootClientId);
+ onClose();
+ },
+ children: (0,external_wp_i18n_namespaceObject.__)('Move down')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(AddSubmenuItem, {
+ block: block,
+ onClose: onClose,
+ expanded: true,
+ expandedState: props.expandedState,
+ expand: props.expand,
+ setInsertedBlock: props.setInsertedBlock
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
+ onClick: () => {
+ removeBlocks([clientId], false);
+ onClose();
+ },
+ children: removeLabel
+ })
+ })]
+ })
+ });
}
;// CONCATENATED MODULE: external ["wp","escapeHtml"]
@@ -34140,35 +35220,36 @@ 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, {
+
+const chevronLeftSmall = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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, {
+
+const plus = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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
-
/**
* WordPress dependencies
*/
@@ -34187,6 +35268,8 @@ const plus = (0,external_React_namespaceObject.createElement)(external_wp_primit
* Internal dependencies
*/
+
+
const {
PrivateQuickInserter: QuickInserter
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
@@ -34266,38 +35349,43 @@ function LinkUIBlockInserter({
if (!clientId) {
return null;
}
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("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
- }));
+ ref: focusOnMountRef,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.VisuallyHidden, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", {
+ id: dialogTitleId,
+ children: (0,external_wp_i18n_namespaceObject.__)('Add block')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
+ id: dialogDescritionId,
+ children: (0,external_wp_i18n_namespaceObject.__)('Choose a block to add to your Navigation.')
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ className: "link-ui-block-inserter__back",
+ icon: chevron_left_small,
+ onClick: e => {
+ e.preventDefault();
+ onBack();
+ },
+ size: "small",
+ children: (0,external_wp_i18n_namespaceObject.__)('Back')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(QuickInserter, {
+ rootClientId: rootBlockClientId,
+ clientId: clientId,
+ isAppender: false,
+ prioritizePatterns: false,
+ selectBlockOnInsert: true,
+ hasSearch: false,
+ onSelect: onSelectBlock
+ })]
+ });
}
-function LinkUI(props) {
+function UnforwardedLinkUI(props, ref) {
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);
@@ -34356,65 +35444,69 @@ function LinkUI(props) {
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, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Popover, {
+ ref: ref,
placement: "bottom",
onClose: props.onClose,
anchor: props.anchor,
- shift: true
- }, !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,
- showInitialSuggestions: true,
- withCreateSuggestion: userCanCreate,
- createSuggestion: handleCreate,
- createSuggestionButtonText: searchTerm => {
- let format;
- if (type === 'post') {
- /* translators: %s: search term. */
- format = (0,external_wp_i18n_namespaceObject.__)('Create draft post: <mark>%s</mark>');
- } else {
- /* translators: %s: search term. */
- 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_React_namespaceObject.createElement)("mark", null)
- });
- },
- noDirectEntry: !!type,
- noURLSuggestion: !!type,
- suggestionsQuery: getSuggestionsQuery(type, kind),
- onChange: props.onChange,
- onRemove: props.onRemove,
- onCancel: props.onCancel,
- 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
- })));
+ shift: true,
+ children: [!addingBlock && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ role: "dialog",
+ "aria-labelledby": dialogTitleId,
+ "aria-describedby": dialogDescritionId,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.VisuallyHidden, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", {
+ id: dialogTitleId,
+ children: (0,external_wp_i18n_namespaceObject.__)('Add link')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
+ id: dialogDescritionId,
+ children: (0,external_wp_i18n_namespaceObject.__)('Search for and add a link to your Navigation.')
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalLinkControl, {
+ hasTextControl: true,
+ hasRichPreviews: true,
+ value: link,
+ showInitialSuggestions: true,
+ withCreateSuggestion: userCanCreate,
+ createSuggestion: handleCreate,
+ createSuggestionButtonText: searchTerm => {
+ let format;
+ if (type === 'post') {
+ /* translators: %s: search term. */
+ format = (0,external_wp_i18n_namespaceObject.__)('Create draft post: <mark>%s</mark>');
+ } else {
+ /* translators: %s: search term. */
+ 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: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("mark", {})
+ });
+ },
+ noDirectEntry: !!type,
+ noURLSuggestion: !!type,
+ suggestionsQuery: getSuggestionsQuery(type, kind),
+ onChange: props.onChange,
+ onRemove: props.onRemove,
+ onCancel: props.onCancel,
+ renderControlBottom: () => !link?.url?.length && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(LinkUITools, {
+ focusAddBlockButton: focusAddBlockButton,
+ setAddingBlock: () => {
+ setAddingBlock(true);
+ setFocusAddBlockButton(false);
+ }
+ })
+ })]
+ }), addingBlock && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(LinkUIBlockInserter, {
+ clientId: props.clientId,
+ onBack: () => {
+ setAddingBlock(false);
+ setFocusAddBlockButton(true);
+ },
+ onSelectBlock: onSelectBlock
+ })]
+ });
}
+const LinkUI = (0,external_wp_element_namespaceObject.forwardRef)(UnforwardedLinkUI);
const LinkUITools = ({
setAddingBlock,
focusAddBlockButton
@@ -34428,22 +35520,23 @@ const LinkUITools = ({
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')));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalVStack, {
+ className: "link-ui-tools",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ ref: addBlockButtonRef,
+ icon: library_plus,
+ onClick: e => {
+ e.preventDefault();
+ setAddingBlock(true);
+ },
+ "aria-haspopup": blockInserterAriaRole,
+ children: (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
-
/**
* WordPress dependencies
*/
@@ -34464,6 +35557,8 @@ const LinkUITools = ({
/* translators: %s: The name of a menu. */
+
+
const actionLabel = (0,external_wp_i18n_namespaceObject.__)("Switch to '%s'");
const BLOCKS_WITH_LINK_UI_SUPPORT = ['core/navigation-link', 'core/navigation-submenu'];
const {
@@ -34484,10 +35579,12 @@ function AdditionalBlockContent({
return null;
}
const setInsertedBlockAttributes = _insertedBlockClientId => _updatedAttributes => {
- if (!_insertedBlockClientId) return;
+ if (!_insertedBlockClientId) {
+ return;
+ }
updateBlockAttributes(_insertedBlockClientId, _updatedAttributes);
};
- return (0,external_React_namespaceObject.createElement)(LinkUI, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(LinkUI, {
clientId: insertedBlock?.clientId,
link: insertedBlock?.attributes,
onClose: () => {
@@ -34516,27 +35613,29 @@ const MainContent = ({
navigationMenu
} = useNavigationMenu(currentMenuId);
if (currentMenuId && isNavigationMenuMissing) {
- return (0,external_React_namespaceObject.createElement)(deleted_navigation_warning, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(deleted_navigation_warning, {
onCreateNew: onCreateNew
});
}
if (isLoading) {
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {});
}
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_React_namespaceObject.createElement)("div", {
- className: "wp-block-navigation__menu-inspector-controls"
- }, !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_React_namespaceObject.createElement)(PrivateListView, {
- rootClientId: clientId,
- isExpanded: true,
- description: description,
- showAppender: true,
- blockSettingsMenu: LeafMoreMenu,
- additionalBlockContent: AdditionalBlockContent
- }));
+ (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 /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ className: "wp-block-navigation__menu-inspector-controls",
+ children: [!hasChildren && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
+ className: "wp-block-navigation__menu-inspector-controls__empty-message",
+ children: (0,external_wp_i18n_namespaceObject.__)('This Navigation Menu is empty.')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PrivateListView, {
+ rootClientId: clientId,
+ isExpanded: true,
+ description: description,
+ showAppender: true,
+ blockSettingsMenu: LeafMoreMenu,
+ additionalBlockContent: AdditionalBlockContent
+ })]
+ });
};
const MenuInspectorControls = props => {
const {
@@ -34549,48 +35648,54 @@ const MenuInspectorControls = props => {
isManageMenusButtonDisabled,
blockEditingMode
} = props;
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, {
- group: "list"
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, {
- title: null
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
- className: "wp-block-navigation-off-canvas-editor__header"
- }, (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_React_namespaceObject.createElement)(navigation_menu_selector, {
- currentMenuId: currentMenuId,
- onSelectClassicMenu: onSelectClassicMenu,
- onSelectNavigationMenu: onSelectNavigationMenu,
- onCreateNew: onCreateNew,
- createNavigationMenuIsSuccess: createNavigationMenuIsSuccess,
- createNavigationMenuIsError: createNavigationMenuIsError,
- actionLabel: actionLabel,
- isManageMenusButtonDisabled: isManageMenusButtonDisabled
- })), (0,external_React_namespaceObject.createElement)(MainContent, {
- ...props
- })));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ group: "list",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: null,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
+ className: "wp-block-navigation-off-canvas-editor__header",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHeading, {
+ className: "wp-block-navigation-off-canvas-editor__title",
+ level: 2,
+ children: (0,external_wp_i18n_namespaceObject.__)('Menu')
+ }), blockEditingMode === 'default' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(navigation_menu_selector, {
+ currentMenuId: currentMenuId,
+ onSelectClassicMenu: onSelectClassicMenu,
+ onSelectNavigationMenu: onSelectNavigationMenu,
+ onCreateNew: onCreateNew,
+ createNavigationMenuIsSuccess: createNavigationMenuIsSuccess,
+ createNavigationMenuIsError: createNavigationMenuIsError,
+ actionLabel: actionLabel,
+ isManageMenusButtonDisabled: isManageMenusButtonDisabled
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MainContent, {
+ ...props
+ })]
+ })
+ });
};
/* harmony default export */ const menu_inspector_controls = (MenuInspectorControls);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/edit/accessible-description.js
-
/**
* WordPress dependencies
*/
+
function AccessibleDescription({
id,
children
}) {
- 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));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ id: id,
+ className: "wp-block-navigation__description",
+ children: children
+ })
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/edit/accessible-menu-description.js
-
/**
* WordPress dependencies
*/
@@ -34601,19 +35706,20 @@ function AccessibleDescription({
* Internal dependencies
*/
+
function AccessibleMenuDescription({
id
}) {
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_React_namespaceObject.createElement)(AccessibleDescription, {
- id: id
- }, description);
+ const description = (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)(`Navigation Menu: "%s"`), menuTitle);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(AccessibleDescription, {
+ id: id,
+ children: description
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/edit/index.js
-
/**
* External dependencies
*/
@@ -34656,6 +35762,87 @@ function AccessibleMenuDescription({
+
+
+
+function ColorTools({
+ textColor,
+ setTextColor,
+ backgroundColor,
+ setBackgroundColor,
+ overlayTextColor,
+ setOverlayTextColor,
+ overlayBackgroundColor,
+ setOverlayBackgroundColor,
+ clientId,
+ navRef
+}) {
+ const [detectedBackgroundColor, setDetectedBackgroundColor] = (0,external_wp_element_namespaceObject.useState)();
+ const [detectedColor, setDetectedColor] = (0,external_wp_element_namespaceObject.useState)();
+ const [detectedOverlayBackgroundColor, setDetectedOverlayBackgroundColor] = (0,external_wp_element_namespaceObject.useState)();
+ const [detectedOverlayColor, setDetectedOverlayColor] = (0,external_wp_element_namespaceObject.useState)();
+ // Turn on contrast checker for web only since it's not supported on mobile yet.
+ const enableContrastChecking = external_wp_element_namespaceObject.Platform.OS === 'web';
+ (0,external_wp_element_namespaceObject.useEffect)(() => {
+ if (!enableContrastChecking) {
+ return;
+ }
+ detectColors(navRef.current, setDetectedColor, setDetectedBackgroundColor);
+ const subMenuElement = navRef.current?.querySelector('[data-type="core/navigation-submenu"] [data-type="core/navigation-link"]');
+ if (!subMenuElement) {
+ return;
+ }
+
+ // Only detect submenu overlay colors if they have previously been explicitly set.
+ // This avoids the contrast checker from reporting on inherited submenu colors and
+ // showing the contrast warning twice.
+ if (overlayTextColor.color || overlayBackgroundColor.color) {
+ detectColors(subMenuElement, setDetectedOverlayColor, setDetectedOverlayBackgroundColor);
+ }
+ }, [enableContrastChecking, overlayTextColor.color, overlayBackgroundColor.color, navRef]);
+ const colorGradientSettings = (0,external_wp_blockEditor_namespaceObject.__experimentalUseMultipleOriginColorsAndGradients)();
+ if (!colorGradientSettings.hasColorsOrGradients) {
+ return null;
+ }
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown, {
+ __experimentalIsRenderedInSidebar: true,
+ settings: [{
+ colorValue: textColor.color,
+ label: (0,external_wp_i18n_namespaceObject.__)('Text'),
+ onColorChange: setTextColor,
+ resetAllFilter: () => setTextColor()
+ }, {
+ colorValue: backgroundColor.color,
+ label: (0,external_wp_i18n_namespaceObject.__)('Background'),
+ onColorChange: setBackgroundColor,
+ resetAllFilter: () => setBackgroundColor()
+ }, {
+ colorValue: overlayTextColor.color,
+ label: (0,external_wp_i18n_namespaceObject.__)('Submenu & overlay text'),
+ onColorChange: setOverlayTextColor,
+ resetAllFilter: () => setOverlayTextColor()
+ }, {
+ colorValue: overlayBackgroundColor.color,
+ label: (0,external_wp_i18n_namespaceObject.__)('Submenu & overlay background'),
+ onColorChange: setOverlayBackgroundColor,
+ resetAllFilter: () => setOverlayBackgroundColor()
+ }],
+ panelId: clientId,
+ ...colorGradientSettings,
+ gradients: [],
+ disableCustomGradients: true
+ }), enableContrastChecking && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.ContrastChecker, {
+ backgroundColor: detectedBackgroundColor,
+ textColor: detectedColor
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.ContrastChecker, {
+ backgroundColor: detectedOverlayBackgroundColor,
+ textColor: detectedOverlayColor
+ })]
+ })]
+ });
+}
function Navigation({
attributes,
setAttributes,
@@ -34747,9 +35934,9 @@ function Navigation({
hasResolvedCanUserUpdateNavigationMenu,
canUserDeleteNavigationMenu,
hasResolvedCanUserDeleteNavigationMenu,
- canUserCreateNavigationMenu,
- isResolvingCanUserCreateNavigationMenu,
- hasResolvedCanUserCreateNavigationMenu
+ canUserCreateNavigationMenus,
+ isResolvingCanUserCreateNavigationMenus,
+ hasResolvedCanUserCreateNavigationMenus
} = useNavigationMenu(ref);
const navMenuResolvedButMissing = hasResolvedNavigationMenus && isNavigationMenuMissing;
const {
@@ -34824,7 +36011,7 @@ function Navigation({
const isResponsive = 'never' !== overlayMenu;
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
ref: navRef,
- className: classnames_default()(className, {
+ className: dist_clsx(className, {
'items-justified-right': justifyContent === 'right',
'items-justified-space-between': justifyContent === 'space-between',
'items-justified-left': justifyContent === 'left',
@@ -34844,13 +36031,6 @@ function Navigation({
backgroundColor: !backgroundColor?.slug && backgroundColor?.color
}
});
-
- // Turn on contrast checker for web only since it's not supported on mobile yet.
- const enableContrastChecking = external_wp_element_namespaceObject.Platform.OS === 'web';
- const [detectedBackgroundColor, setDetectedBackgroundColor] = (0,external_wp_element_namespaceObject.useState)();
- const [detectedColor, setDetectedColor] = (0,external_wp_element_namespaceObject.useState)();
- const [detectedOverlayBackgroundColor, setDetectedOverlayBackgroundColor] = (0,external_wp_element_namespaceObject.useState)();
- const [detectedOverlayColor, setDetectedOverlayColor] = (0,external_wp_element_namespaceObject.useState)();
const onSelectClassicMenu = async classicMenu => {
return convertClassicMenu(classicMenu.id, classicMenu.name, 'draft');
};
@@ -34888,23 +36068,6 @@ function Navigation({
}
}, [classicMenuConversionStatus, classicMenuConversionError, hideClassicMenuConversionNotice, showClassicMenuConversionNotice, createNavigationMenuPost?.id, handleUpdateMenu]);
(0,external_wp_element_namespaceObject.useEffect)(() => {
- if (!enableContrastChecking) {
- return;
- }
- detectColors(navRef.current, setDetectedColor, setDetectedBackgroundColor);
- const subMenuElement = navRef.current?.querySelector('[data-type="core/navigation-submenu"] [data-type="core/navigation-link"]');
- if (!subMenuElement) {
- return;
- }
-
- // Only detect submenu overlay colors if they have previously been explicitly set.
- // This avoids the contrast checker from reporting on inherited submenu colors and
- // showing the contrast warning twice.
- if (overlayTextColor.color || overlayBackgroundColor.color) {
- detectColors(subMenuElement, setDetectedOverlayColor, setDetectedOverlayBackgroundColor);
- }
- }, [enableContrastChecking, overlayTextColor.color, overlayBackgroundColor.color]);
- (0,external_wp_element_namespaceObject.useEffect)(() => {
if (!isSelected && !isInnerBlockSelected) {
hideNavigationMenuPermissionsNotice();
}
@@ -34912,13 +36075,13 @@ function Navigation({
if (ref && !navMenuResolvedButMissing && hasResolvedCanUserUpdateNavigationMenu && !canUserUpdateNavigationMenu) {
showNavigationMenuPermissionsNotice((0,external_wp_i18n_namespaceObject.__)('You do not have permission to edit this Menu. Any changes made will not be saved.'));
}
- if (!ref && hasResolvedCanUserCreateNavigationMenu && !canUserCreateNavigationMenu) {
+ if (!ref && hasResolvedCanUserCreateNavigationMenus && !canUserCreateNavigationMenus) {
showNavigationMenuPermissionsNotice((0,external_wp_i18n_namespaceObject.__)('You do not have permission to create Navigation Menus.'));
}
}
- }, [isSelected, isInnerBlockSelected, canUserUpdateNavigationMenu, hasResolvedCanUserUpdateNavigationMenu, canUserCreateNavigationMenu, hasResolvedCanUserCreateNavigationMenu, ref, hideNavigationMenuPermissionsNotice, showNavigationMenuPermissionsNotice, navMenuResolvedButMissing]);
- const hasManagePermissions = canUserCreateNavigationMenu || canUserUpdateNavigationMenu;
- const overlayMenuPreviewClasses = classnames_default()('wp-block-navigation__overlay-menu-preview', {
+ }, [isSelected, isInnerBlockSelected, canUserUpdateNavigationMenu, hasResolvedCanUserUpdateNavigationMenu, canUserCreateNavigationMenus, hasResolvedCanUserCreateNavigationMenus, ref, hideNavigationMenuPermissionsNotice, showNavigationMenuPermissionsNotice, navMenuResolvedButMissing]);
+ const hasManagePermissions = canUserCreateNavigationMenus || canUserUpdateNavigationMenu;
+ const overlayMenuPreviewClasses = dist_clsx('wp-block-navigation__overlay-menu-preview', {
open: overlayMenuPreview
});
const submenuAccessibilityNotice = !showSubmenuIcon && !openSubmenusOnClick ? (0,external_wp_i18n_namespaceObject.__)('The current menu options offer reduced accessibility for users and are not recommended. Enabling either "Open on Click" or "Show arrow" offers enhanced accessibility by allowing keyboard users to browse submenus selectively.') : '';
@@ -34930,171 +36093,183 @@ function Navigation({
isFirstRender.current = false;
}, [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_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_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- className: overlayMenuPreviewClasses,
- onClick: () => {
- setOverlayMenuPreview(!overlayMenuPreview);
- },
- "aria-label": (0,external_wp_i18n_namespaceObject.__)('Overlay menu controls'),
- "aria-controls": overlayMenuPreviewId,
- "aria-expanded": overlayMenuPreview
- }, hasIcon && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(OverlayMenuIcon, {
- icon: icon
- }), (0,external_React_namespaceObject.createElement)(build_module_icon, {
- icon: library_close
- })), !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_React_namespaceObject.createElement)(OverlayMenuPreview, {
- setAttributes: setAttributes,
- hasIcon: hasIcon,
- icon: icon,
- hidden: !overlayMenuPreview
- }))), (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,
- help: (0,external_wp_i18n_namespaceObject.__)('Collapses the navigation options in a menu icon opening an overlay.'),
- onChange: value => setAttributes({
- overlayMenu: value
- }),
- isBlock: true,
- hideLabelFromVision: true
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
- value: "never",
- label: (0,external_wp_i18n_namespaceObject.__)('Off')
- }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
- value: "mobile",
- label: (0,external_wp_i18n_namespaceObject.__)('Mobile')
- }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
- value: "always",
- label: (0,external_wp_i18n_namespaceObject.__)('Always')
- })), 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 => {
- setAttributes({
- openSubmenusOnClick: value,
- ...(value && {
- showSubmenuIcon: true
- }) // Make sure arrows are shown when we toggle this on.
- });
- },
- label: (0,external_wp_i18n_namespaceObject.__)('Open on click')
- }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, {
- __nextHasNoMarginBottom: true,
- checked: showSubmenuIcon,
- onChange: value => {
- setAttributes({
- showSubmenuIcon: value
- });
- },
- disabled: attributes.openSubmenusOnClick,
- label: (0,external_wp_i18n_namespaceObject.__)('Show arrow')
- }), 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, {
- group: "color"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown, {
- __experimentalIsRenderedInSidebar: true,
- settings: [{
- colorValue: textColor.color,
- label: (0,external_wp_i18n_namespaceObject.__)('Text'),
- onColorChange: setTextColor,
- resetAllFilter: () => setTextColor()
- }, {
- colorValue: backgroundColor.color,
- label: (0,external_wp_i18n_namespaceObject.__)('Background'),
- onColorChange: setBackgroundColor,
- resetAllFilter: () => setBackgroundColor()
- }, {
- colorValue: overlayTextColor.color,
- label: (0,external_wp_i18n_namespaceObject.__)('Submenu & overlay text'),
- onColorChange: setOverlayTextColor,
- resetAllFilter: () => setOverlayTextColor()
- }, {
- colorValue: overlayBackgroundColor.color,
- label: (0,external_wp_i18n_namespaceObject.__)('Submenu & overlay background'),
- onColorChange: setOverlayBackgroundColor,
- resetAllFilter: () => setOverlayBackgroundColor()
- }],
- panelId: clientId,
- ...colorGradientSettings,
- gradients: [],
- disableCustomGradients: true
- }), 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.ContrastChecker, {
- backgroundColor: detectedOverlayBackgroundColor,
- textColor: detectedOverlayColor
- }))));
+ const stylingInspectorControls = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: hasSubmenuIndicatorSetting && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Display'),
+ children: [isResponsive && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Button, {
+ className: overlayMenuPreviewClasses,
+ onClick: () => {
+ setOverlayMenuPreview(!overlayMenuPreview);
+ },
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Overlay menu controls'),
+ "aria-controls": overlayMenuPreviewId,
+ "aria-expanded": overlayMenuPreview,
+ children: [hasIcon && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(OverlayMenuIcon, {
+ icon: icon
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, {
+ icon: library_close
+ })]
+ }), !hasIcon && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ children: (0,external_wp_i18n_namespaceObject.__)('Menu')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ children: (0,external_wp_i18n_namespaceObject.__)('Close')
+ })]
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ id: overlayMenuPreviewId,
+ children: overlayMenuPreview && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(OverlayMenuPreview, {
+ setAttributes: setAttributes,
+ hasIcon: hasIcon,
+ icon: icon,
+ hidden: !overlayMenuPreview
+ })
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h3", {
+ children: (0,external_wp_i18n_namespaceObject.__)('Overlay Menu')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalToggleGroupControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Configure overlay menu'),
+ value: overlayMenu,
+ help: (0,external_wp_i18n_namespaceObject.__)('Collapses the navigation options in a menu icon opening an overlay.'),
+ onChange: value => setAttributes({
+ overlayMenu: value
+ }),
+ isBlock: true,
+ hideLabelFromVision: true,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
+ value: "never",
+ label: (0,external_wp_i18n_namespaceObject.__)('Off')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
+ value: "mobile",
+ label: (0,external_wp_i18n_namespaceObject.__)('Mobile')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
+ value: "always",
+ label: (0,external_wp_i18n_namespaceObject.__)('Always')
+ })]
+ }), hasSubmenus && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h3", {
+ children: (0,external_wp_i18n_namespaceObject.__)('Submenus')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ checked: openSubmenusOnClick,
+ onChange: value => {
+ setAttributes({
+ openSubmenusOnClick: value,
+ ...(value && {
+ showSubmenuIcon: true
+ }) // Make sure arrows are shown when we toggle this on.
+ });
+ },
+ label: (0,external_wp_i18n_namespaceObject.__)('Open on click')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ checked: showSubmenuIcon,
+ onChange: value => {
+ setAttributes({
+ showSubmenuIcon: value
+ });
+ },
+ disabled: attributes.openSubmenusOnClick,
+ label: (0,external_wp_i18n_namespaceObject.__)('Show arrow')
+ }), submenuAccessibilityNotice && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, {
+ spokenMessage: null,
+ status: "warning",
+ isDismissible: false,
+ children: submenuAccessibilityNotice
+ })
+ })]
+ })]
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ group: "color",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ColorTools, {
+ textColor: textColor,
+ setTextColor: setTextColor,
+ backgroundColor: backgroundColor,
+ setBackgroundColor: setBackgroundColor,
+ overlayTextColor: overlayTextColor,
+ setOverlayTextColor: setOverlayTextColor,
+ overlayBackgroundColor: overlayBackgroundColor,
+ setOverlayBackgroundColor: setOverlayBackgroundColor,
+ clientId: clientId,
+ navRef: navRef
+ })
+ })]
+ });
const accessibleDescriptionId = `${clientId}-desc`;
const isManageMenusButtonDisabled = !hasManagePermissions || !hasResolvedNavigationMenus;
if (hasUnsavedBlocks && !isCreatingNavigationMenu) {
- return (0,external_React_namespaceObject.createElement)(TagName, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(TagName, {
...blockProps,
- "aria-describedby": !isPlaceholder ? accessibleDescriptionId : undefined
- }, (0,external_React_namespaceObject.createElement)(AccessibleDescription, {
- id: accessibleDescriptionId
- }, (0,external_wp_i18n_namespaceObject.__)('Unsaved Navigation Menu.')), (0,external_React_namespaceObject.createElement)(menu_inspector_controls, {
- clientId: clientId,
- createNavigationMenuIsSuccess: createNavigationMenuIsSuccess,
- createNavigationMenuIsError: createNavigationMenuIsError,
- currentMenuId: ref,
- isNavigationMenuMissing: isNavigationMenuMissing,
- isManageMenusButtonDisabled: isManageMenusButtonDisabled,
- onCreateNew: createUntitledEmptyNavigationMenu,
- onSelectClassicMenu: onSelectClassicMenu,
- onSelectNavigationMenu: onSelectNavigationMenu,
- isLoading: isLoading,
- blockEditingMode: blockEditingMode
- }), blockEditingMode === 'default' && stylingInspectorControls, (0,external_React_namespaceObject.createElement)(ResponsiveWrapper, {
- id: clientId,
- onToggle: setResponsiveMenuVisibility,
- isOpen: isResponsiveMenuOpen,
- hasIcon: hasIcon,
- icon: icon,
- isResponsive: isResponsive,
- isHiddenByDefault: 'always' === overlayMenu,
- overlayBackgroundColor: overlayBackgroundColor,
- overlayTextColor: overlayTextColor
- }, (0,external_React_namespaceObject.createElement)(UnsavedInnerBlocks, {
- createNavigationMenu: createNavigationMenu,
- blocks: uncontrolledInnerBlocks,
- hasSelection: isSelected || isInnerBlockSelected
- })));
+ "aria-describedby": !isPlaceholder ? accessibleDescriptionId : undefined,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(AccessibleDescription, {
+ id: accessibleDescriptionId,
+ children: (0,external_wp_i18n_namespaceObject.__)('Unsaved Navigation Menu.')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(menu_inspector_controls, {
+ clientId: clientId,
+ createNavigationMenuIsSuccess: createNavigationMenuIsSuccess,
+ createNavigationMenuIsError: createNavigationMenuIsError,
+ currentMenuId: ref,
+ isNavigationMenuMissing: isNavigationMenuMissing,
+ isManageMenusButtonDisabled: isManageMenusButtonDisabled,
+ onCreateNew: createUntitledEmptyNavigationMenu,
+ onSelectClassicMenu: onSelectClassicMenu,
+ onSelectNavigationMenu: onSelectNavigationMenu,
+ isLoading: isLoading,
+ blockEditingMode: blockEditingMode
+ }), blockEditingMode === 'default' && stylingInspectorControls, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ResponsiveWrapper, {
+ id: clientId,
+ onToggle: setResponsiveMenuVisibility,
+ isOpen: isResponsiveMenuOpen,
+ hasIcon: hasIcon,
+ icon: icon,
+ isResponsive: isResponsive,
+ isHiddenByDefault: 'always' === overlayMenu,
+ overlayBackgroundColor: overlayBackgroundColor,
+ overlayTextColor: overlayTextColor,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(UnsavedInnerBlocks, {
+ createNavigationMenu: createNavigationMenu,
+ blocks: uncontrolledInnerBlocks,
+ hasSelection: isSelected || isInnerBlockSelected
+ })
+ })]
+ });
}
// 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_React_namespaceObject.createElement)(TagName, {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(menu_inspector_controls, {
- clientId: clientId,
- createNavigationMenuIsSuccess: createNavigationMenuIsSuccess,
- createNavigationMenuIsError: createNavigationMenuIsError,
- currentMenuId: ref,
- isNavigationMenuMissing: isNavigationMenuMissing,
- isManageMenusButtonDisabled: isManageMenusButtonDisabled,
- onCreateNew: createUntitledEmptyNavigationMenu,
- onSelectClassicMenu: onSelectClassicMenu,
- onSelectNavigationMenu: onSelectNavigationMenu,
- isLoading: isLoading,
- blockEditingMode: blockEditingMode
- }), (0,external_React_namespaceObject.createElement)(deleted_navigation_warning, {
- onCreateNew: createUntitledEmptyNavigationMenu
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(TagName, {
+ ...blockProps,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(menu_inspector_controls, {
+ clientId: clientId,
+ createNavigationMenuIsSuccess: createNavigationMenuIsSuccess,
+ createNavigationMenuIsError: createNavigationMenuIsError,
+ currentMenuId: ref,
+ isNavigationMenuMissing: isNavigationMenuMissing,
+ isManageMenusButtonDisabled: isManageMenusButtonDisabled,
+ onCreateNew: createUntitledEmptyNavigationMenu,
+ onSelectClassicMenu: onSelectClassicMenu,
+ onSelectNavigationMenu: onSelectNavigationMenu,
+ isLoading: isLoading,
+ blockEditingMode: blockEditingMode
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(deleted_navigation_warning, {
+ onCreateNew: createUntitledEmptyNavigationMenu
+ })]
+ });
}
if (isEntityAvailable && hasAlreadyRendered) {
- return (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Block cannot be rendered inside itself.')));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, {
+ children: (0,external_wp_i18n_namespaceObject.__)('Block cannot be rendered inside itself.')
+ })
+ });
}
const PlaceholderComponent = CustomPlaceholder ? CustomPlaceholder : NavigationPlaceholder;
@@ -35109,74 +36284,81 @@ function Navigation({
*/
if (isPlaceholder && CustomPlaceholder) {
- return (0,external_React_namespaceObject.createElement)(TagName, {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(PlaceholderComponent, {
- isSelected: isSelected,
- currentMenuId: ref,
- clientId: clientId,
- canUserCreateNavigationMenu: canUserCreateNavigationMenu,
- isResolvingCanUserCreateNavigationMenu: isResolvingCanUserCreateNavigationMenu,
- onSelectNavigationMenu: onSelectNavigationMenu,
- onSelectClassicMenu: onSelectClassicMenu,
- onCreateEmpty: createUntitledEmptyNavigationMenu
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PlaceholderComponent, {
+ isSelected: isSelected,
+ currentMenuId: ref,
+ clientId: clientId,
+ canUserCreateNavigationMenus: canUserCreateNavigationMenus,
+ isResolvingCanUserCreateNavigationMenus: isResolvingCanUserCreateNavigationMenus,
+ onSelectNavigationMenu: onSelectNavigationMenu,
+ onSelectClassicMenu: onSelectClassicMenu,
+ onCreateEmpty: createUntitledEmptyNavigationMenu
+ })
+ });
}
- return (0,external_React_namespaceObject.createElement)(external_wp_coreData_namespaceObject.EntityProvider, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_coreData_namespaceObject.EntityProvider, {
kind: "postType",
type: "wp_navigation",
- id: ref
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RecursionProvider, {
- uniqueId: recursionId
- }, (0,external_React_namespaceObject.createElement)(menu_inspector_controls, {
- clientId: clientId,
- createNavigationMenuIsSuccess: createNavigationMenuIsSuccess,
- createNavigationMenuIsError: createNavigationMenuIsError,
- currentMenuId: ref,
- isNavigationMenuMissing: isNavigationMenuMissing,
- isManageMenusButtonDisabled: isManageMenusButtonDisabled,
- onCreateNew: createUntitledEmptyNavigationMenu,
- onSelectClassicMenu: onSelectClassicMenu,
- onSelectNavigationMenu: onSelectNavigationMenu,
- isLoading: isLoading,
- blockEditingMode: blockEditingMode
- }), blockEditingMode === 'default' && stylingInspectorControls, blockEditingMode === 'default' && isEntityAvailable && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, {
- group: "advanced"
- }, 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_React_namespaceObject.createElement)(manage_menus_button, {
- disabled: isManageMenusButtonDisabled,
- className: "wp-block-navigation-manage-menus-button"
- })), (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, {
- className: "wp-block-navigation__loading-indicator"
- })), !isLoading && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(AccessibleMenuDescription, {
- id: accessibleDescriptionId
- }), (0,external_React_namespaceObject.createElement)(ResponsiveWrapper, {
- id: clientId,
- onToggle: setResponsiveMenuVisibility,
- hasIcon: hasIcon,
- icon: icon,
- isOpen: isResponsiveMenuOpen,
- isResponsive: isResponsive,
- isHiddenByDefault: 'always' === overlayMenu,
- overlayBackgroundColor: overlayBackgroundColor,
- overlayTextColor: overlayTextColor
- }, isEntityAvailable && (0,external_React_namespaceObject.createElement)(NavigationInnerBlocks, {
- clientId: clientId,
- hasCustomPlaceholder: !!CustomPlaceholder,
- templateLock: templateLock,
- orientation: orientation
- }))))));
+ id: ref,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.RecursionProvider, {
+ uniqueId: recursionId,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(menu_inspector_controls, {
+ clientId: clientId,
+ createNavigationMenuIsSuccess: createNavigationMenuIsSuccess,
+ createNavigationMenuIsError: createNavigationMenuIsError,
+ currentMenuId: ref,
+ isNavigationMenuMissing: isNavigationMenuMissing,
+ isManageMenusButtonDisabled: isManageMenusButtonDisabled,
+ onCreateNew: createUntitledEmptyNavigationMenu,
+ onSelectClassicMenu: onSelectClassicMenu,
+ onSelectNavigationMenu: onSelectNavigationMenu,
+ isLoading: isLoading,
+ blockEditingMode: blockEditingMode
+ }), blockEditingMode === 'default' && stylingInspectorControls, blockEditingMode === 'default' && isEntityAvailable && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ group: "advanced",
+ children: [hasResolvedCanUserUpdateNavigationMenu && canUserUpdateNavigationMenu && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationMenuNameControl, {}), hasResolvedCanUserDeleteNavigationMenu && canUserDeleteNavigationMenu && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationMenuDeleteControl, {
+ onDelete: () => {
+ replaceInnerBlocks(clientId, []);
+ showNavigationMenuStatusNotice((0,external_wp_i18n_namespaceObject.__)('Navigation Menu successfully deleted.'));
+ }
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(manage_menus_button, {
+ disabled: isManageMenusButtonDisabled,
+ className: "wp-block-navigation-manage-menus-button"
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(TagName, {
+ ...blockProps,
+ "aria-describedby": !isPlaceholder && !isLoading ? accessibleDescriptionId : undefined,
+ children: [isLoading && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-navigation__loading-indicator-container",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {
+ className: "wp-block-navigation__loading-indicator"
+ })
+ }), !isLoading && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(AccessibleMenuDescription, {
+ id: accessibleDescriptionId
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ResponsiveWrapper, {
+ id: clientId,
+ onToggle: setResponsiveMenuVisibility,
+ hasIcon: hasIcon,
+ icon: icon,
+ isOpen: isResponsiveMenuOpen,
+ isResponsive: isResponsive,
+ isHiddenByDefault: 'always' === overlayMenu,
+ overlayBackgroundColor: overlayBackgroundColor,
+ overlayTextColor: overlayTextColor,
+ children: isEntityAvailable && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationInnerBlocks, {
+ clientId: clientId,
+ hasCustomPlaceholder: !!CustomPlaceholder,
+ templateLock: templateLock,
+ orientation: orientation
+ })
+ })]
+ })]
+ })]
+ })
+ });
}
/* harmony default export */ const navigation_edit = ((0,external_wp_blockEditor_namespaceObject.withColors)({
textColor: 'color'
@@ -35189,11 +36371,11 @@ function Navigation({
})(Navigation));
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/save.js
-
/**
* WordPress dependencies
*/
+
function navigation_save_save({
attributes
}) {
@@ -35203,11 +36385,10 @@ function navigation_save_save({
// `wp_navigation` entity rather than the hard-coded block html.
return;
}
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/deprecated.js
-
/**
* WordPress dependencies
*/
@@ -35218,6 +36399,7 @@ function navigation_save_save({
* Internal dependencies
*/
+
const TYPOGRAPHY_PRESET_DEPRECATION_MAP = {
fontStyle: 'var:preset|font-style|',
fontWeight: 'var:preset|font-weight|',
@@ -35341,7 +36523,7 @@ const navigation_deprecated_v6 = {
}
},
save() {
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
},
isEligible: ({
navigationMenuId
@@ -35432,7 +36614,7 @@ const navigation_deprecated_v5 = {
}
},
save() {
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
},
isEligible: ({
itemsJustification,
@@ -35518,7 +36700,7 @@ const navigation_deprecated_v4 = {
}
},
save() {
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
},
migrate: (0,external_wp_compose_namespaceObject.compose)(migrateIdToRef, deprecated_migrateWithLayout, migrate_font_family),
isEligible({
@@ -35631,7 +36813,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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
}
}, {
attributes: {
@@ -35678,7 +36860,7 @@ const navigation_deprecated_deprecated = [navigation_deprecated_v6, navigation_d
__experimentalTextDecoration: true
},
save() {
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
},
isEligible(attributes) {
if (!attributes.style || !attributes.style.typography) {
@@ -35745,7 +36927,7 @@ const navigation_deprecated_deprecated = [navigation_deprecated_v6, navigation_d
};
}),
save() {
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
}
}];
/* harmony default export */ const navigation_deprecated = (navigation_deprecated_deprecated);
@@ -35888,15 +37070,6 @@ const navigation_metadata = {
type: "flex"
}
},
- __experimentalStyle: {
- elements: {
- link: {
- color: {
- text: "inherit"
- }
- }
- }
- },
interactivity: true,
renaming: false
},
@@ -35950,21 +37123,21 @@ const navigation_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/custom-link.js
-
/**
* WordPress dependencies
*/
-const customLink = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const customLink = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const custom_link = (customLink);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation-link/edit.js
-
/**
* External dependencies
*/
@@ -35993,7 +37166,10 @@ const customLink = (0,external_React_namespaceObject.createElement)(external_wp_
-const edit_DEFAULT_BLOCK = {
+
+
+
+const navigation_link_edit_DEFAULT_BLOCK = {
name: 'core/navigation-link'
};
@@ -36041,7 +37217,7 @@ const useIsDraggingWithin = elementRef => {
ownerDocument.removeEventListener('dragend', handleDragEnd);
ownerDocument.removeEventListener('dragenter', handleDragEnter);
};
- }, []);
+ }, [elementRef]);
return isDraggingWithin;
};
const useIsInvalidLink = (kind, type, id) => {
@@ -36094,6 +37270,87 @@ function getMissingText(type) {
}
return missingText;
}
+
+/*
+ * Warning, this duplicated in
+ * packages/block-library/src/navigation-submenu/edit.js
+ * Consider reuseing this components for both blocks.
+ */
+function Controls({
+ attributes,
+ setAttributes,
+ setIsLabelFieldFocused
+}) {
+ const {
+ label,
+ url,
+ description,
+ title,
+ rel
+ } = attributes;
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
+ __nextHasNoMarginBottom: true,
+ __next40pxDefaultSize: true,
+ value: label ? (0,external_wp_dom_namespaceObject.__unstableStripHTML)(label) : '',
+ onChange: labelValue => {
+ setAttributes({
+ label: labelValue
+ });
+ },
+ label: (0,external_wp_i18n_namespaceObject.__)('Text'),
+ autoComplete: "off",
+ onFocus: () => setIsLabelFieldFocused(true),
+ onBlur: () => setIsLabelFieldFocused(false)
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
+ __nextHasNoMarginBottom: true,
+ __next40pxDefaultSize: true,
+ value: url ? (0,external_wp_url_namespaceObject.safeDecodeURI)(url) : '',
+ onChange: urlValue => {
+ updateAttributes({
+ url: urlValue
+ }, setAttributes, attributes);
+ },
+ label: (0,external_wp_i18n_namespaceObject.__)('Link'),
+ autoComplete: "off"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextareaControl, {
+ __nextHasNoMarginBottom: true,
+ value: description || '',
+ onChange: descriptionValue => {
+ setAttributes({
+ description: descriptionValue
+ });
+ },
+ 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.')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
+ __nextHasNoMarginBottom: true,
+ __next40pxDefaultSize: true,
+ value: title || '',
+ onChange: titleValue => {
+ setAttributes({
+ title: titleValue
+ });
+ },
+ 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.')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
+ __nextHasNoMarginBottom: true,
+ __next40pxDefaultSize: true,
+ value: rel || '',
+ onChange: relValue => {
+ setAttributes({
+ rel: relValue
+ });
+ },
+ 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.')
+ })]
+ });
+}
function NavigationLinkEdit({
attributes,
isSelected,
@@ -36110,8 +37367,6 @@ function NavigationLinkEdit({
type,
url,
description,
- rel,
- title,
kind
} = attributes;
const [isInvalid, isDraft] = useIsInvalidLink(kind, type, id);
@@ -36120,9 +37375,14 @@ function NavigationLinkEdit({
} = context;
const {
replaceBlock,
- __unstableMarkNextChangeAsNotPersistent
+ __unstableMarkNextChangeAsNotPersistent,
+ selectBlock,
+ selectPreviousBlock
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
- const [isLinkOpen, setIsLinkOpen] = (0,external_wp_element_namespaceObject.useState)(false);
+ // Have the link editing ui open on mount when lacking a url and selected.
+ const [isLinkOpen, setIsLinkOpen] = (0,external_wp_element_namespaceObject.useState)(isSelected && !url);
+ // Store what element opened the popover, so we know where to return focus to (toolbar button vs navigation link text)
+ const [openedBy, setOpenedBy] = (0,external_wp_element_namespaceObject.useState)(null);
// Use internal state instead of a ref to make sure that the component
// re-renders when the popover's anchor updates.
const [popoverAnchor, setPopoverAnchor] = (0,external_wp_element_namespaceObject.useState)(null);
@@ -36130,19 +37390,19 @@ function NavigationLinkEdit({
const isDraggingWithin = useIsDraggingWithin(listItemRef);
const itemLabelPlaceholder = (0,external_wp_i18n_namespaceObject.__)('Add label…');
const ref = (0,external_wp_element_namespaceObject.useRef)();
+ const linkUIref = (0,external_wp_element_namespaceObject.useRef)();
+ const prevUrl = (0,external_wp_compose_namespaceObject.usePrevious)(url);
// Change the label using inspector causes rich text to change focus on firefox.
// This is a workaround to keep the focus on the label field when label filed is focused we don't render the rich text.
const [isLabelFieldFocused, setIsLabelFieldFocused] = (0,external_wp_element_namespaceObject.useState)(false);
const {
- innerBlocks,
isAtMaxNesting,
isTopLevelLink,
isParentOfSelectedBlock,
hasChildren
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
const {
- getBlocks,
getBlockCount,
getBlockName,
getBlockRootClientId,
@@ -36150,30 +37410,28 @@ function NavigationLinkEdit({
getBlockParentsByBlockName
} = select(external_wp_blockEditor_namespaceObject.store);
return {
- innerBlocks: getBlocks(clientId),
isAtMaxNesting: getBlockParentsByBlockName(clientId, ['core/navigation-link', 'core/navigation-submenu']).length >= maxNestingLevel,
isTopLevelLink: getBlockName(getBlockRootClientId(clientId)) === 'core/navigation',
isParentOfSelectedBlock: hasSelectedInnerBlock(clientId, true),
hasChildren: !!getBlockCount(clientId)
};
- }, [clientId]);
+ }, [clientId, maxNestingLevel]);
+ const {
+ getBlocks
+ } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
/**
* Transform to submenu block.
*/
- function transformToSubmenu() {
- const newSubmenu = (0,external_wp_blocks_namespaceObject.createBlock)('core/navigation-submenu', attributes, innerBlocks.length > 0 ? innerBlocks : [(0,external_wp_blocks_namespaceObject.createBlock)('core/navigation-link')]);
- replaceBlock(clientId, newSubmenu);
- }
- (0,external_wp_element_namespaceObject.useEffect)(() => {
- // Show the LinkControl on mount if the URL is empty
- // ( When adding a new menu item)
- // This can't be done in the useState call because it conflicts
- // with the autofocus behavior of the BlockListBlock component.
- if (!url) {
- setIsLinkOpen(true);
+ const transformToSubmenu = () => {
+ let innerBlocks = getBlocks(clientId);
+ if (innerBlocks.length === 0) {
+ innerBlocks = [(0,external_wp_blocks_namespaceObject.createBlock)('core/navigation-link')];
+ selectBlock(innerBlocks[0].clientId);
}
- }, [url]);
+ const newSubmenu = (0,external_wp_blocks_namespaceObject.createBlock)('core/navigation-submenu', attributes, innerBlocks);
+ replaceBlock(clientId, newSubmenu);
+ };
(0,external_wp_element_namespaceObject.useEffect)(() => {
// If block has inner blocks, transform to Submenu.
if (hasChildren) {
@@ -36184,29 +37442,14 @@ function NavigationLinkEdit({
}
}, [hasChildren]);
- /**
- * The hook shouldn't be necessary but due to a focus loss happening
- * when selecting a suggestion in the link popover, we force close on block unselection.
- */
- (0,external_wp_element_namespaceObject.useEffect)(() => {
- if (!isSelected) {
- setIsLinkOpen(false);
- }
- }, [isSelected]);
-
// If the LinkControl popover is open and the URL has changed, close the LinkControl and focus the label text.
(0,external_wp_element_namespaceObject.useEffect)(() => {
- if (isLinkOpen && url) {
- // Does this look like a URL and have something TLD-ish?
- if ((0,external_wp_url_namespaceObject.isURL)((0,external_wp_url_namespaceObject.prependHTTP)(label)) && /^.+\.[a-z]+/.test(label)) {
- // Focus and select the label text.
- selectLabelText();
- } else {
- // Focus it (but do not select).
- (0,external_wp_dom_namespaceObject.placeCaretAtHorizontalEdge)(ref.current, true);
- }
+ // We only want to do this when the URL has gone from nothing to a new URL AND the label looks like a URL
+ if (!prevUrl && url && isLinkOpen && (0,external_wp_url_namespaceObject.isURL)((0,external_wp_url_namespaceObject.prependHTTP)(label)) && /^.+\.[a-z]+/.test(label)) {
+ // Focus and select the label text.
+ selectLabelText();
}
- }, [url]);
+ }, [prevUrl, url, isLinkOpen, label]);
/**
* Focus the Link label text and select it.
@@ -36255,14 +37498,20 @@ function NavigationLinkEdit({
customBackgroundColor
} = 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) {
+ if (external_wp_keycodes_namespaceObject.isKeyboardEvent.primary(event, 'k')) {
+ // Required to prevent the command center from opening,
+ // as it shares the CMD+K shortcut.
+ // See https://github.com/WordPress/gutenberg/pull/59845.
event.preventDefault();
+ // If this link is a child of a parent submenu item, the parent submenu item event will also open, closing this popover
+ event.stopPropagation();
setIsLinkOpen(true);
+ setOpenedBy(ref.current);
}
}
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([setPopoverAnchor, listItemRef]),
- className: classnames_default()('wp-block-navigation-item', {
+ className: dist_clsx('wp-block-navigation-item', {
'is-editing': isSelected || isParentOfSelectedBlock,
'is-dragging-within': isDraggingWithin,
'has-link': !!url,
@@ -36282,202 +37531,200 @@ function NavigationLinkEdit({
...blockProps,
className: 'remove-outline' // Remove the outline from the inner blocks container.
}, {
- defaultBlock: edit_DEFAULT_BLOCK,
+ defaultBlock: navigation_link_edit_DEFAULT_BLOCK,
directInsert: true,
renderAppender: false
});
if (!url || isInvalid || isDraft) {
- blockProps.onClick = () => setIsLinkOpen(true);
+ blockProps.onClick = () => {
+ setIsLinkOpen(true);
+ setOpenedBy(ref.current);
+ };
}
- const classes = classnames_default()('wp-block-navigation-item__content', {
+ const classes = dist_clsx('wp-block-navigation-item__content', {
'wp-block-navigation-link__placeholder': !url || isInvalid || isDraft
});
const missingText = getMissingText(type);
/* 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_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_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_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.TextControl, {
- __nextHasNoMarginBottom: true,
- value: label ? (0,external_wp_dom_namespaceObject.__unstableStripHTML)(label) : '',
- onChange: labelValue => {
- setAttributes({
- label: labelValue
- });
- },
- label: (0,external_wp_i18n_namespaceObject.__)('Label'),
- autoComplete: "off",
- onFocus: () => setIsLabelFieldFocused(true),
- onBlur: () => setIsLabelFieldFocused(false)
- }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
- __nextHasNoMarginBottom: true,
- value: url ? (0,external_wp_url_namespaceObject.safeDecodeURI)(url) : '',
- onChange: urlValue => {
- updateAttributes({
- url: urlValue
- }, setAttributes, attributes);
- },
- label: (0,external_wp_i18n_namespaceObject.__)('URL'),
- autoComplete: "off"
- }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextareaControl, {
- __nextHasNoMarginBottom: true,
- value: description || '',
- onChange: descriptionValue => {
- setAttributes({
- description: descriptionValue
- });
- },
- 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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
- __nextHasNoMarginBottom: true,
- value: title || '',
- onChange: titleValue => {
- setAttributes({
- title: titleValue
- });
- },
- 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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
- __nextHasNoMarginBottom: true,
- value: rel || '',
- onChange: relValue => {
- setAttributes({
- rel: relValue
- });
- },
- 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_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)("a", {
- className: classes
- }, !url ? (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-navigation-link__placeholder-text"
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Tooltip, {
- text: tooltipText
- }, (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",
- value: label,
- onChange: labelValue => setAttributes({
- label: labelValue
- }),
- onMerge: mergeBlocks,
- onReplace: onReplace,
- __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)('core/navigation-link')),
- "aria-label": (0,external_wp_i18n_namespaceObject.__)('Navigation link text'),
- placeholder: itemLabelPlaceholder,
- withoutInteractiveFormatting: true,
- allowedFormats: ['core/bold', 'core/italic', 'core/image', 'core/strikethrough'],
- onClick: () => {
- if (!url) {
- setIsLinkOpen(true);
- }
- }
- }), description && (0,external_React_namespaceObject.createElement)("span", {
- className: "wp-block-navigation-item__description"
- }, description)), (isInvalid || isDraft || isLabelFieldFocused) && (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-navigation-link__placeholder-text wp-block-navigation-link__label"
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Tooltip, {
- text: tooltipText
- }, (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.
- // Ideally they would be stored in a raw, unescaped form.
- // 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_React_namespaceObject.createElement)(LinkUI, {
- clientId: clientId,
- link: attributes,
- 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_React_namespaceObject.createElement)("div", {
- ...innerBlocksProps
- })));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.ToolbarGroup, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: event => {
+ setIsLinkOpen(true);
+ setOpenedBy(event.currentTarget);
+ }
+ }), !isAtMaxNesting && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
+ name: "submenu",
+ icon: add_submenu,
+ title: (0,external_wp_i18n_namespaceObject.__)('Add submenu'),
+ onClick: transformToSubmenu
+ })]
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Controls, {
+ attributes: attributes,
+ setAttributes: setAttributes,
+ setIsLabelFieldFocused: setIsLabelFieldFocused
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ ...blockProps,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("a", {
+ className: classes,
+ children: [!url ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-navigation-link__placeholder-text",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Tooltip, {
+ text: tooltipText,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ children: missingText
+ })
+ })
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [!isInvalid && !isDraft && !isLabelFieldFocused && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
+ ref: ref,
+ identifier: "label",
+ className: "wp-block-navigation-item__label",
+ value: label,
+ onChange: labelValue => setAttributes({
+ label: labelValue
+ }),
+ onMerge: mergeBlocks,
+ onReplace: onReplace,
+ __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)('core/navigation-link')),
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Navigation link text'),
+ placeholder: itemLabelPlaceholder,
+ withoutInteractiveFormatting: true,
+ allowedFormats: ['core/bold', 'core/italic', 'core/image', 'core/strikethrough']
+ }), description && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ className: "wp-block-navigation-item__description",
+ children: description
+ })]
+ }), (isInvalid || isDraft || isLabelFieldFocused) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-navigation-link__placeholder-text wp-block-navigation-link__label",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Tooltip, {
+ text: tooltipText,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Navigation link text'),
+ children:
+ // Some attributes are stored in an escaped form. It's a legacy issue.
+ // Ideally they would be stored in a raw, unescaped form.
+ // 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 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(LinkUI, {
+ ref: linkUIref,
+ clientId: clientId,
+ link: attributes,
+ onClose: () => {
+ // If there is no link then remove the auto-inserted block.
+ // This avoids empty blocks which can provided a poor UX.
+ if (!url) {
+ // Fixes https://github.com/WordPress/gutenberg/issues/61361
+ // There's a chance we're closing due to the user selecting the browse all button.
+ // Only move focus if the focus is still within the popover ui. If it's not within
+ // the popover, it's because something has taken the focus from the popover, and
+ // we don't want to steal it back.
+ if (linkUIref.current.contains(window.document.activeElement)) {
+ // Select the previous block to keep focus nearby
+ selectPreviousBlock(clientId, true);
+ }
+
+ // Remove the link.
+ onReplace([]);
+ return;
+ }
+ setIsLinkOpen(false);
+ if (openedBy) {
+ openedBy.focus();
+ setOpenedBy(null);
+ } else if (ref.current) {
+ // select the ref when adding a new link
+ ref.current.focus();
+ } else {
+ // Fallback
+ selectPreviousBlock(clientId, true);
+ }
+ },
+ anchor: popoverAnchor,
+ onRemove: removeLink,
+ onChange: updatedValue => {
+ updateAttributes(updatedValue, setAttributes, attributes);
+ }
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...innerBlocksProps
+ })]
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation-link/save.js
-
/**
* WordPress dependencies
*/
+
function navigation_link_save_save() {
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/page.js
-
/**
* WordPress dependencies
*/
-const page = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+
+const page = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
+ d: "M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_page = (page);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/tag.js
-
/**
* WordPress dependencies
*/
-const tag = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const tag = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_tag = (tag);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/custom-post-type.js
-
/**
* WordPress dependencies
*/
-const customPostType = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const customPostType = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const custom_post_type = (customPostType);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation-link/hooks.js
@@ -36644,7 +37891,6 @@ const 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
-
/**
* WordPress dependencies
*/
@@ -36730,6 +37976,7 @@ const navigation_link_metadata = {
+
const {
name: navigation_link_name
} = navigation_link_metadata;
@@ -36793,7 +38040,7 @@ const navigation_link_settings = {
};
},
save() {
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
}
}],
transforms: navigation_link_transforms
@@ -36808,40 +38055,41 @@ const navigation_link_init = () => {
};
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/remove-submenu.js
-
/**
* WordPress dependencies
*/
-const removeSubmenu = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const removeSubmenu = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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, {
- 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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const remove_submenu = (removeSubmenu);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation-submenu/icons.js
-
/**
* WordPress dependencies
*/
-const ItemSubmenuIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+
+const ItemSubmenuIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, {
- d: "M1.50002 4L6.00002 8L10.5 4",
- strokeWidth: "1.5"
-}));
+ fill: "none",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
+ d: "M1.50002 4L6.00002 8L10.5 4",
+ strokeWidth: "1.5"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation-submenu/edit.js
-
/**
* External dependencies
*/
@@ -36863,7 +38111,6 @@ const ItemSubmenuIcon = () => (0,external_React_namespaceObject.createElement)(e
-
/**
* Internal dependencies
*/
@@ -36871,6 +38118,9 @@ const ItemSubmenuIcon = () => (0,external_React_namespaceObject.createElement)(e
+
+
+
const ALLOWED_BLOCKS = ['core/navigation-link', 'core/navigation-submenu', 'core/page-list'];
const navigation_submenu_edit_DEFAULT_BLOCK = {
name: 'core/navigation-link'
@@ -36967,9 +38217,12 @@ function NavigationSubmenuEdit({
} = context;
const {
__unstableMarkNextChangeAsNotPersistent,
- replaceBlock
+ replaceBlock,
+ selectBlock
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
const [isLinkOpen, setIsLinkOpen] = (0,external_wp_element_namespaceObject.useState)(false);
+ // Store what element opened the popover, so we know where to return focus to (toolbar button vs navigation link text)
+ const [openedBy, setOpenedBy] = (0,external_wp_element_namespaceObject.useState)(null);
// Use internal state instead of a ref to make sure that the component
// re-renders when the popover's anchor updates.
const [popoverAnchor, setPopoverAnchor] = (0,external_wp_element_namespaceObject.useState)(null);
@@ -37044,9 +38297,6 @@ function NavigationSubmenuEdit({
if ((0,external_wp_url_namespaceObject.isURL)((0,external_wp_url_namespaceObject.prependHTTP)(label)) && /^.+\.[a-z]+/.test(label)) {
// Focus and select the label text.
selectLabelText();
- } else {
- // Focus it (but do not select).
- (0,external_wp_dom_namespaceObject.placeCaretAtHorizontalEdge)(ref.current, true);
}
}
}, [url]);
@@ -37083,13 +38333,19 @@ function NavigationSubmenuEdit({
} = getColors(context, parentCount > 0);
function onKeyDown(event) {
if (external_wp_keycodes_namespaceObject.isKeyboardEvent.primary(event, 'k')) {
+ // Required to prevent the command center from opening,
+ // as it shares the CMD+K shortcut.
+ // See https://github.com/WordPress/gutenberg/pull/59845.
event.preventDefault();
+ // If we don't stop propogation, this event bubbles up to the parent submenu item
+ event.stopPropagation();
setIsLinkOpen(true);
+ setOpenedBy(ref.current);
}
}
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([setPopoverAnchor, listItemRef]),
- className: classnames_default()('wp-block-navigation-item', {
+ className: dist_clsx('wp-block-navigation-item', {
'is-editing': isSelected || isParentOfSelectedBlock,
'is-dragging-within': isDraggingWithin,
'has-link': !!url,
@@ -37138,126 +38394,154 @@ function NavigationSubmenuEdit({
}
}, [hasChildren, prevHasChildren]);
const canConvertToLink = !selectedBlockHasChildren || onlyDescendantIsEmptyLink;
- 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_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_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.TextControl, {
- __nextHasNoMarginBottom: true,
- value: label || '',
- onChange: labelValue => {
- setAttributes({
- label: labelValue
- });
- },
- label: (0,external_wp_i18n_namespaceObject.__)('Label'),
- autoComplete: "off"
- }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
- __nextHasNoMarginBottom: true,
- value: url || '',
- onChange: urlValue => {
- setAttributes({
- url: urlValue
- });
- },
- label: (0,external_wp_i18n_namespaceObject.__)('URL'),
- autoComplete: "off"
- }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextareaControl, {
- __nextHasNoMarginBottom: true,
- value: description || '',
- onChange: descriptionValue => {
- setAttributes({
- description: descriptionValue
- });
- },
- 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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
- __nextHasNoMarginBottom: true,
- value: title || '',
- onChange: titleValue => {
- setAttributes({
- title: titleValue
- });
- },
- 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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
- __nextHasNoMarginBottom: true,
- value: rel || '',
- onChange: relValue => {
- setAttributes({
- rel: relValue
- });
- },
- 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_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(ParentElement, {
- className: "wp-block-navigation-item__content"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, {
- ref: ref,
- identifier: "label",
- className: "wp-block-navigation-item__label",
- value: label,
- onChange: labelValue => setAttributes({
- label: labelValue
- }),
- onMerge: mergeBlocks,
- onReplace: onReplace,
- "aria-label": (0,external_wp_i18n_namespaceObject.__)('Navigation link text'),
- placeholder: itemLabelPlaceholder,
- withoutInteractiveFormatting: true,
- allowedFormats: ['core/bold', 'core/italic', 'core/image', 'core/strikethrough'],
- onClick: () => {
- if (!openSubmenusOnClick && !url) {
- setIsLinkOpen(true);
- }
- }
- }), !openSubmenusOnClick && isLinkOpen && (0,external_React_namespaceObject.createElement)(LinkUI, {
- clientId: clientId,
- link: attributes,
- onClose: () => setIsLinkOpen(false),
- anchor: popoverAnchor,
- hasCreateSuggestion: userCanCreate,
- onRemove: () => {
- setAttributes({
- url: ''
- });
- (0,external_wp_a11y_namespaceObject.speak)((0,external_wp_i18n_namespaceObject.__)('Link removed.'), 'assertive');
- },
- onChange: updatedValue => {
- updateAttributes(updatedValue, setAttributes, attributes);
- }
- })), (showSubmenuIcon || openSubmenusOnClick) && (0,external_React_namespaceObject.createElement)("span", {
- className: "wp-block-navigation__submenu-icon"
- }, (0,external_React_namespaceObject.createElement)(ItemSubmenuIcon, null)), (0,external_React_namespaceObject.createElement)("div", {
- ...innerBlocksProps
- })));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.ToolbarGroup, {
+ children: [!openSubmenusOnClick && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: event => {
+ setIsLinkOpen(true);
+ setOpenedBy(event.currentTarget);
+ }
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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
+ })]
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
+ __nextHasNoMarginBottom: true,
+ __next40pxDefaultSize: true,
+ value: label || '',
+ onChange: labelValue => {
+ setAttributes({
+ label: labelValue
+ });
+ },
+ label: (0,external_wp_i18n_namespaceObject.__)('Text'),
+ autoComplete: "off"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
+ __nextHasNoMarginBottom: true,
+ __next40pxDefaultSize: true,
+ value: url || '',
+ onChange: urlValue => {
+ setAttributes({
+ url: urlValue
+ });
+ },
+ label: (0,external_wp_i18n_namespaceObject.__)('Link'),
+ autoComplete: "off"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextareaControl, {
+ __nextHasNoMarginBottom: true,
+ value: description || '',
+ onChange: descriptionValue => {
+ setAttributes({
+ description: descriptionValue
+ });
+ },
+ 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.')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
+ __nextHasNoMarginBottom: true,
+ __next40pxDefaultSize: true,
+ value: title || '',
+ onChange: titleValue => {
+ setAttributes({
+ title: titleValue
+ });
+ },
+ 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.')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
+ __nextHasNoMarginBottom: true,
+ __next40pxDefaultSize: true,
+ value: rel || '',
+ onChange: relValue => {
+ setAttributes({
+ rel: relValue
+ });
+ },
+ 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.')
+ })]
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ ...blockProps,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(ParentElement, {
+ className: "wp-block-navigation-item__content",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
+ ref: ref,
+ identifier: "label",
+ className: "wp-block-navigation-item__label",
+ value: label,
+ onChange: labelValue => setAttributes({
+ label: labelValue
+ }),
+ onMerge: mergeBlocks,
+ onReplace: onReplace,
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Navigation link text'),
+ placeholder: itemLabelPlaceholder,
+ withoutInteractiveFormatting: true,
+ allowedFormats: ['core/bold', 'core/italic', 'core/image', 'core/strikethrough'],
+ onClick: () => {
+ if (!openSubmenusOnClick && !url) {
+ setIsLinkOpen(true);
+ setOpenedBy(ref.current);
+ }
+ }
+ }), !openSubmenusOnClick && isLinkOpen && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(LinkUI, {
+ clientId: clientId,
+ link: attributes,
+ onClose: () => {
+ setIsLinkOpen(false);
+ if (openedBy) {
+ openedBy.focus();
+ setOpenedBy(null);
+ } else {
+ selectBlock(clientId);
+ }
+ },
+ anchor: popoverAnchor,
+ hasCreateSuggestion: userCanCreate,
+ onRemove: () => {
+ setAttributes({
+ url: ''
+ });
+ (0,external_wp_a11y_namespaceObject.speak)((0,external_wp_i18n_namespaceObject.__)('Link removed.'), 'assertive');
+ },
+ onChange: updatedValue => {
+ updateAttributes(updatedValue, setAttributes, attributes);
+ }
+ })]
+ }), (showSubmenuIcon || openSubmenusOnClick) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ className: "wp-block-navigation__submenu-icon",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ItemSubmenuIcon, {})
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...innerBlocksProps
+ })]
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation-submenu/save.js
-
/**
* WordPress dependencies
*/
+
function navigation_submenu_save_save() {
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation-submenu/transforms.js
@@ -37415,40 +38699,46 @@ const navigation_submenu_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/page-break.js
-
/**
* WordPress dependencies
*/
-const pageBreak = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const pageBreak = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const page_break = (pageBreak);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/nextpage/edit.js
-
/**
* WordPress dependencies
*/
+
function NextPageEdit() {
- return (0,external_React_namespaceObject.createElement)("div", {
- ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)()
- }, (0,external_React_namespaceObject.createElement)("span", null, (0,external_wp_i18n_namespaceObject.__)('Page break')));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ children: (0,external_wp_i18n_namespaceObject.__)('Page break')
+ })
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/nextpage/save.js
-
/**
* WordPress dependencies
*/
+
function nextpage_save_save() {
- return (0,external_React_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, null, '<!--nextpage-->');
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, {
+ children: '<!--nextpage-->'
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/nextpage/transforms.js
@@ -37663,7 +38953,6 @@ function hasCycle(deps, slug, visitedNodes = new Set(), currentPath = new Set())
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/pattern/edit.js
-
/**
* WordPress dependencies
*/
@@ -37678,10 +38967,12 @@ function hasCycle(deps, slug, visitedNodes = new Set(), currentPath = new Set())
* Internal dependencies
*/
+
const PatternEdit = ({
attributes,
clientId
}) => {
+ const registry = (0,external_wp_data_namespaceObject.useRegistry)();
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 {
@@ -37696,7 +38987,7 @@ const PatternEdit = ({
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.
+ // Duplicated in packages/editor/src/components/start-template-options/index.js.
function injectThemeAttributeInBlockTemplateContent(block) {
if (block.innerBlocks.find(innerBlock => innerBlock.name === 'core/template-part')) {
block.innerBlocks = block.innerBlocks.map(innerBlock => {
@@ -37735,28 +39026,46 @@ const PatternEdit = ({
// Clone blocks from the pattern before insertion to ensure they receive
// distinct client ids. See https://github.com/WordPress/gutenberg/issues/50628.
const clonedBlocks = selectedPattern.blocks.map(block => (0,external_wp_blocks_namespaceObject.cloneBlock)(injectThemeAttributeInBlockTemplateContent(block)));
+ // If the pattern has a single block and categories, we should add the
+ // categories of the pattern to the block's metadata.
+ if (clonedBlocks.length === 1 && selectedPattern.categories?.length > 0) {
+ clonedBlocks[0].attributes = {
+ ...clonedBlocks[0].attributes,
+ metadata: {
+ ...clonedBlocks[0].attributes.metadata,
+ categories: selectedPattern.categories,
+ patternName: selectedPattern.name,
+ name: clonedBlocks[0].attributes.metadata.name || selectedPattern.title
+ }
+ };
+ }
const rootEditingMode = getBlockEditingMode(rootClientId);
- // Temporarily set the root block to default mode to allow replacing the pattern.
- // This could happen when the page is disabling edits of non-content blocks.
- __unstableMarkNextChangeAsNotPersistent();
- setBlockEditingMode(rootClientId, 'default');
- __unstableMarkNextChangeAsNotPersistent();
- replaceBlocks(clientId, clonedBlocks);
- // Restore the root block's original mode.
- __unstableMarkNextChangeAsNotPersistent();
- setBlockEditingMode(rootClientId, rootEditingMode);
+ registry.batch(() => {
+ // Temporarily set the root block to default mode to allow replacing the pattern.
+ // This could happen when the page is disabling edits of non-content blocks.
+ __unstableMarkNextChangeAsNotPersistent();
+ setBlockEditingMode(rootClientId, 'default');
+ __unstableMarkNextChangeAsNotPersistent();
+ replaceBlocks(clientId, clonedBlocks);
+ // Restore the root block's original mode.
+ __unstableMarkNextChangeAsNotPersistent();
+ setBlockEditingMode(rootClientId, rootEditingMode);
+ });
});
}
}, [clientId, hasRecursionError, selectedPattern, __unstableMarkNextChangeAsNotPersistent, replaceBlocks, getBlockEditingMode, setBlockEditingMode, getBlockRootClientId]);
const props = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
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 /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...props,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, {
+ children: (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", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
...props
});
};
@@ -37804,21 +39113,23 @@ const pattern_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pages.js
-
/**
* WordPress dependencies
*/
-const pages = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+
+const pages = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
+ d: "M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_pages = (pages);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/page-list/use-convert-to-navigation-links.js
@@ -37950,41 +39261,48 @@ function useConvertToNavigationLinks({
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/page-list/convert-to-links-modal.js
-
/**
* WordPress dependencies
*/
-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.");
+
+
+
+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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Modal, {
onRequestClose: onClose,
title: (0,external_wp_i18n_namespaceObject.__)('Edit Page List'),
- className: 'wp-block-page-list-modal',
+ className: "wp-block-page-list-modal",
aria: {
- describedby: 'wp-block-page-list-modal__description'
- }
- }, (0,external_React_namespaceObject.createElement)("p", {
- id: 'wp-block-page-list-modal__description'
- }, convertDescription), (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-page-list-modal-buttons"
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- variant: "tertiary",
- onClick: onClose
- }, (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.__)('Edit'))));
+ describedby: (0,external_wp_compose_namespaceObject.useInstanceId)(ConvertToLinksModal, 'wp-block-page-list-modal__description')
+ },
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
+ id: (0,external_wp_compose_namespaceObject.useInstanceId)(ConvertToLinksModal, 'wp-block-page-list-modal__description'),
+ children: convertDescription
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ className: "wp-block-page-list-modal-buttons",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ variant: "tertiary",
+ onClick: onClose,
+ children: (0,external_wp_i18n_namespaceObject.__)('Cancel')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ variant: "primary",
+ __experimentalIsFocusable: true,
+ disabled: disabled,
+ onClick: onClick,
+ children: (0,external_wp_i18n_namespaceObject.__)('Edit')
+ })]
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/page-list/edit.js
-
/**
* External dependencies
*/
@@ -38009,6 +39327,9 @@ function ConvertToLinksModal({
// We only show the edit option when page count is <= MAX_PAGE_COUNT
// Performance of Navigation Links is not good past this value.
+
+
+
const MAX_PAGE_COUNT = 100;
const NOOP = () => {};
function BlockContent({
@@ -38020,48 +39341,59 @@ function BlockContent({
parentPageID
}) {
if (!hasResolvedPages) {
- return (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-page-list__loading-indicator-container"
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, {
- className: "wp-block-page-list__loading-indicator"
- })));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-page-list__loading-indicator-container",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {
+ className: "wp-block-page-list__loading-indicator"
+ })
+ })
+ });
}
if (pages === null) {
- return (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Notice, {
- status: 'warning',
- isDismissible: false
- }, (0,external_wp_i18n_namespaceObject.__)('Page List: Cannot retrieve Pages.')));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, {
+ status: "warning",
+ isDismissible: false,
+ children: (0,external_wp_i18n_namespaceObject.__)('Page List: Cannot retrieve Pages.')
+ })
+ });
}
if (pages.length === 0) {
- return (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Notice, {
- status: 'info',
- isDismissible: false
- }, (0,external_wp_i18n_namespaceObject.__)('Page List: Cannot retrieve Pages.')));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, {
+ status: "info",
+ isDismissible: false,
+ children: (0,external_wp_i18n_namespaceObject.__)('Page List: Cannot retrieve Pages.')
+ })
+ });
}
if (blockList.length === 0) {
const parentPageDetails = pages.find(page => page.id === parentPageID);
if (parentPageDetails?.title?.rendered) {
- return (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (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 /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, {
+ children: (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_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Notice, {
- status: 'warning',
- isDismissible: false
- }, (0,external_wp_i18n_namespaceObject.__)('Page List: Cannot retrieve Pages.')));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, {
+ status: "warning",
+ isDismissible: false,
+ children: (0,external_wp_i18n_namespaceObject.__)('Page List: Cannot retrieve Pages.')
+ })
+ });
}
if (pages.length > 0) {
- return (0,external_React_namespaceObject.createElement)("ul", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
...innerBlocksProps
});
}
@@ -38118,7 +39450,7 @@ function PageListEdit({
}, new Map());
}, [pages]);
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()('wp-block-page-list', {
+ className: dist_clsx('wp-block-page-list', {
'has-text-color': !!context.textColor,
[(0,external_wp_blockEditor_namespaceObject.getColorClassName)('color', context.textColor)]: !!context.textColor,
'has-background': !!context.backgroundColor,
@@ -38220,39 +39552,54 @@ function PageListEdit({
isNested
});
}, [isNested, setAttributes]);
- 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'),
- value: parentPageID,
- options: pagesTree,
- onChange: value => setAttributes({
- 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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, {
- title: (0,external_wp_i18n_namespaceObject.__)('Edit this menu')
- }, (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_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, {
- group: "other"
- }, (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_React_namespaceObject.createElement)(ConvertToLinksModal, {
- onClick: convertToNavigationLinks,
- onClose: closeModal,
- disabled: !hasResolvedPages
- })), (0,external_React_namespaceObject.createElement)(BlockContent, {
- blockProps: blockProps,
- innerBlocksProps: innerBlocksProps,
- hasResolvedPages: hasResolvedPages,
- blockList: blockList,
- pages: pages,
- parentPageID: parentPageID
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: [pagesTree.length > 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ComboboxControl, {
+ __next40pxDefaultSize: true,
+ className: "editor-page-attributes__parent",
+ label: (0,external_wp_i18n_namespaceObject.__)('Parent'),
+ value: parentPageID,
+ options: pagesTree,
+ onChange: value => setAttributes({
+ parentPageID: value !== null && value !== void 0 ? value : 0
+ }),
+ help: (0,external_wp_i18n_namespaceObject.__)('Choose a page to show only its subpages.')
+ })
+ }), allowConvertToLinks && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Edit this menu'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
+ children: convertDescription
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ variant: "primary",
+ __experimentalIsFocusable: true,
+ disabled: !hasResolvedPages,
+ onClick: convertToNavigationLinks,
+ children: (0,external_wp_i18n_namespaceObject.__)('Edit')
+ })]
+ })]
+ }), allowConvertToLinks && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "other",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Edit'),
+ onClick: openModal,
+ children: (0,external_wp_i18n_namespaceObject.__)('Edit')
+ })
+ }), isOpen && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ConvertToLinksModal, {
+ onClick: convertToNavigationLinks,
+ onClose: closeModal,
+ disabled: !hasResolvedPages
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockContent, {
+ blockProps: blockProps,
+ innerBlocksProps: innerBlocksProps,
+ hasResolvedPages: hasResolvedPages,
+ blockList: blockList,
+ pages: pages,
+ parentPageID: parentPageID
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/page-list/index.js
@@ -38326,24 +39673,24 @@ const page_list_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation-link/icons.js
-
/**
* WordPress dependencies
*/
-const icons_ItemSubmenuIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+
+const icons_ItemSubmenuIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, {
- d: "M1.50002 4L6.00002 8L10.5 4",
- strokeWidth: "1.5"
-}));
+ fill: "none",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
+ d: "M1.50002 4L6.00002 8L10.5 4",
+ strokeWidth: "1.5"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/page-list-item/edit.js
-
/**
* External dependencies
*/
@@ -38361,6 +39708,9 @@ const icons_ItemSubmenuIcon = () => (0,external_React_namespaceObject.createElem
*/
+
+
+
function useFrontPageId() {
return (0,external_wp_data_namespaceObject.useSelect)(select => {
const canReadSettings = select(external_wp_coreData_namespaceObject.store).canUser('read', 'settings');
@@ -38390,33 +39740,41 @@ function PageListItemEdit({
className: 'wp-block-pages-list__item'
});
const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps);
- return (0,external_React_namespaceObject.createElement)("li", {
- key: id,
- className: classnames_default()('wp-block-pages-list__item', {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", {
+ className: dist_clsx('wp-block-pages-list__item', {
'has-child': hasChildren,
'wp-block-navigation-item': isNavigationChild,
'open-on-click': context.openSubmenusOnClick,
'open-on-hover-click': !context.openSubmenusOnClick && context.showSubmenuIcon,
'menu-item-home': id === frontPageId
- })
- }, 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_React_namespaceObject.createElement)("span", {
- className: "wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon"
- }, (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_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",
- type: "button"
- }, (0,external_React_namespaceObject.createElement)(icons_ItemSubmenuIcon, null)), (0,external_React_namespaceObject.createElement)("ul", {
- ...innerBlocksProps
- })));
+ children: [hasChildren && context.openSubmenusOnClick ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("button", {
+ type: "button",
+ className: "wp-block-navigation-item__content wp-block-navigation-submenu__toggle",
+ "aria-expanded": "false",
+ children: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(label)
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ className: "wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(icons_ItemSubmenuIcon, {})
+ })]
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ className: dist_clsx('wp-block-pages-list__item__link', {
+ 'wp-block-navigation-item__content': isNavigationChild
+ }),
+ href: link,
+ children: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title)
+ }), hasChildren && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [!context.openSubmenusOnClick && context.showSubmenuIcon && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("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",
+ type: "button",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(icons_ItemSubmenuIcon, {})
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
+ ...innerBlocksProps
+ })]
+ })]
+ }, id);
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/page-list-item/index.js
@@ -38490,21 +39848,21 @@ const page_list_item_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/paragraph.js
-
/**
* WordPress dependencies
*/
-const paragraph = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const paragraph = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_paragraph = (paragraph);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/deprecated.js
-
/**
* External dependencies
*/
@@ -38516,6 +39874,7 @@ const paragraph = (0,external_React_namespaceObject.createElement)(external_wp_p
+
const deprecated_supports = {
className: false
};
@@ -38612,18 +39971,19 @@ const paragraph_deprecated_deprecated = [
dropCap,
direction
} = attributes;
- const className = classnames_default()({
+ const className = dist_clsx({
'has-drop-cap': align === ((0,external_wp_i18n_namespaceObject.isRTL)() ? 'left' : 'right') || align === 'center' ? false : dropCap,
[`has-text-align-${align}`]: align
});
- return (0,external_React_namespaceObject.createElement)("p", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className,
dir: direction
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: content
})
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- value: content
- }));
+ });
}
}, {
supports: deprecated_supports,
@@ -38658,7 +40018,7 @@ const paragraph_deprecated_deprecated = [
const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('color', textColor);
const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('background-color', backgroundColor);
const fontSizeClass = (0,external_wp_blockEditor_namespaceObject.getFontSizeClass)(fontSize);
- const className = classnames_default()({
+ const className = dist_clsx({
'has-text-color': textColor || customTextColor,
'has-background': backgroundColor || customBackgroundColor,
'has-drop-cap': dropCap,
@@ -38672,7 +40032,7 @@ const paragraph_deprecated_deprecated = [
color: textClass ? undefined : customTextColor,
fontSize: fontSizeClass ? undefined : customFontSize
};
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
tagName: "p",
style: styles,
className: className ? className : undefined,
@@ -38713,7 +40073,7 @@ const paragraph_deprecated_deprecated = [
const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('color', textColor);
const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('background-color', backgroundColor);
const fontSizeClass = (0,external_wp_blockEditor_namespaceObject.getFontSizeClass)(fontSize);
- const className = classnames_default()({
+ const className = dist_clsx({
'has-text-color': textColor || customTextColor,
'has-background': backgroundColor || customBackgroundColor,
'has-drop-cap': dropCap,
@@ -38727,7 +40087,7 @@ const paragraph_deprecated_deprecated = [
fontSize: fontSizeClass ? undefined : customFontSize,
textAlign: align
};
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
tagName: "p",
style: styles,
className: className ? className : undefined,
@@ -38771,7 +40131,7 @@ const paragraph_deprecated_deprecated = [
const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('color', textColor);
const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('background-color', backgroundColor);
const fontSizeClass = fontSize && `is-${fontSize}-text`;
- const className = classnames_default()({
+ const className = dist_clsx({
[`align${width}`]: width,
'has-background': backgroundColor || customBackgroundColor,
'has-drop-cap': dropCap,
@@ -38785,7 +40145,7 @@ const paragraph_deprecated_deprecated = [
fontSize: fontSizeClass ? undefined : customFontSize,
textAlign: align
};
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
tagName: "p",
style: styles,
className: className ? className : undefined,
@@ -38812,7 +40172,7 @@ const paragraph_deprecated_deprecated = [
textColor,
fontSize
} = attributes;
- const className = classnames_default()({
+ const className = dist_clsx({
[`align${width}`]: width,
'has-background': backgroundColor,
'has-drop-cap': dropCap
@@ -38823,10 +40183,11 @@ const paragraph_deprecated_deprecated = [
fontSize,
textAlign: align
};
- return (0,external_React_namespaceObject.createElement)("p", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
style: styles,
- className: className ? className : undefined
- }, content);
+ className: className ? className : undefined,
+ children: content
+ });
},
migrate(attributes) {
return migrateCustomColorsAndFontSizes({
@@ -38849,7 +40210,9 @@ const paragraph_deprecated_deprecated = [
save({
attributes
}) {
- return (0,external_React_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, null, attributes.content);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, {
+ children: attributes.content
+ });
},
migrate(attributes) {
return attributes;
@@ -38858,17 +40221,18 @@ const paragraph_deprecated_deprecated = [
/* harmony default export */ const paragraph_deprecated = (paragraph_deprecated_deprecated);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-ltr.js
-
/**
* WordPress dependencies
*/
-const formatLtr = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const formatLtr = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
- viewBox: "-2 -2 24 24"
-}, (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"
-}));
+ viewBox: "-2 -2 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const format_ltr = (formatLtr);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/use-enter.js
@@ -38962,7 +40326,6 @@ function useOnEnter(props) {
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/edit.js
-
/**
* External dependencies
*/
@@ -38976,17 +40339,18 @@ function useOnEnter(props) {
-
/**
* Internal dependencies
*/
-const edit_name = 'core/paragraph';
+
+
+
function ParagraphRTLControl({
direction,
setDirection
}) {
- return (0,external_wp_i18n_namespaceObject.isRTL)() && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, {
+ return (0,external_wp_i18n_namespaceObject.isRTL)() && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
icon: format_ltr,
title: (0,external_wp_i18n_namespaceObject._x)('Left to right', 'editor button'),
isActive: direction === 'ltr',
@@ -39023,7 +40387,7 @@ function DropCapControl({
} 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, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
hasValue: () => !!dropCap,
label: (0,external_wp_i18n_namespaceObject.__)('Drop cap'),
onDeselect: () => setAttributes({
@@ -39032,17 +40396,18 @@ function DropCapControl({
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
- }));
+ panelId: clientId,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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,
@@ -39064,7 +40429,7 @@ function ParagraphBlock({
clientId,
content
}),
- className: classnames_default()({
+ className: dist_clsx({
'has-drop-cap': hasDropCapDisabled(align) ? false : dropCap,
[`has-text-align-${align}`]: align
}),
@@ -39073,62 +40438,51 @@ function ParagraphBlock({
}
});
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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
- value: align,
- onChange: newAlign => setAttributes({
- align: newAlign,
- dropCap: hasDropCapDisabled(newAlign) ? false : dropCap
- })
- }), (0,external_React_namespaceObject.createElement)(ParagraphRTLControl, {
- direction: direction,
- setDirection: newDirection => setAttributes({
- direction: newDirection
- })
- })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, {
- group: "typography"
- }, (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,
- value: content,
- onChange: newContent => setAttributes({
- content: newContent
- }),
- onSplit: (value, isOriginal) => {
- let newAttributes;
- if (isOriginal || value) {
- newAttributes = {
- ...attributes,
- content: value
- };
- }
- const block = (0,external_wp_blocks_namespaceObject.createBlock)(edit_name, newAttributes);
- if (isOriginal) {
- block.clientId = clientId;
- }
- return block;
- },
- onMerge: mergeBlocks,
- onReplace: onReplace,
- onRemove: onRemove,
- "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
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [blockEditingMode === 'default' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
+ value: align,
+ onChange: newAlign => setAttributes({
+ align: newAlign,
+ dropCap: hasDropCapDisabled(newAlign) ? false : dropCap
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ParagraphRTLControl, {
+ direction: direction,
+ setDirection: newDirection => setAttributes({
+ direction: newDirection
+ })
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ group: "typography",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DropCapControl, {
+ clientId: clientId,
+ attributes: attributes,
+ setAttributes: setAttributes
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
+ identifier: "content",
+ tagName: "p",
+ ...blockProps,
+ value: content,
+ onChange: newContent => setAttributes({
+ content: newContent
+ }),
+ onMerge: mergeBlocks,
+ onReplace: onReplace,
+ onRemove: onRemove,
+ "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 */ const paragraph_edit = (ParagraphBlock);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/save.js
-
/**
* External dependencies
*/
@@ -39139,6 +40493,7 @@ function ParagraphBlock({
*/
+
function paragraph_save_save({
attributes
}) {
@@ -39148,18 +40503,19 @@ function paragraph_save_save({
dropCap,
direction
} = attributes;
- const className = classnames_default()({
+ const className = dist_clsx({
'has-drop-cap': align === ((0,external_wp_i18n_namespaceObject.isRTL)() ? 'left' : 'right') || align === 'center' ? false : dropCap,
[`has-text-align-${align}`]: align
});
- return (0,external_React_namespaceObject.createElement)("p", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className,
dir: direction
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: content
})
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- value: content
- }));
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/transforms.js
@@ -39182,7 +40538,6 @@ const {
description: "Start with the basic building block of all narrative.",
keywords: ["text"],
textdomain: "default",
- usesContext: ["postId"],
attributes: {
align: {
type: "string"
@@ -39206,6 +40561,7 @@ const {
}
},
supports: {
+ splitting: true,
anchor: true,
className: false,
color: {
@@ -39298,7 +40654,6 @@ const paragraph_metadata = {
description: "Start with the basic building block of all narrative.",
keywords: ["text"],
textdomain: "default",
- usesContext: ["postId"],
attributes: {
align: {
type: "string"
@@ -39322,6 +40677,7 @@ const paragraph_metadata = {
}
},
supports: {
+ splitting: true,
anchor: true,
className: false,
color: {
@@ -39410,23 +40766,23 @@ const paragraph_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/post-author.js
-
/**
* WordPress dependencies
*/
-const postAuthor = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const postAuthor = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const post_author = (postAuthor);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-author/edit.js
-
/**
* External dependencies
*/
@@ -39440,6 +40796,9 @@ const postAuthor = (0,external_React_namespaceObject.createElement)(external_wp_
+
+
+
const minimumUsersForCombobox = 25;
const edit_AUTHORS_QUERY = {
who: 'authors',
@@ -39495,7 +40854,7 @@ function PostAuthorEdit({
});
}
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()({
+ className: dist_clsx({
[`has-text-align-${textAlign}`]: textAlign
})
});
@@ -39515,97 +40874,109 @@ function PostAuthorEdit({
};
const showCombobox = authorOptions.length >= minimumUsersForCombobox;
const showAuthorControl = !!postId && !isDescendentOfQueryLoop && authorOptions.length > 0;
- 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_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_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_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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Avatar size'),
- value: attributes.avatarSize,
- options: avatarSizes,
- onChange: size => {
- setAttributes({
- avatarSize: Number(size)
- });
- }
- }), (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_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_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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, {
- group: "block"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
- value: textAlign,
- onChange: nextAlign => {
- setAttributes({
- textAlign: nextAlign
- });
- }
- })), (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, showAvatar && authorDetails?.avatar_urls && (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-post-author__avatar"
- }, (0,external_React_namespaceObject.createElement)("img", {
- width: attributes.avatarSize,
- src: authorDetails.avatar_urls[attributes.avatarSize],
- alt: authorDetails.name
- })), (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-post-author__content"
- }, (!external_wp_blockEditor_namespaceObject.RichText.isEmpty(byline) || isSelected) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, {
- className: "wp-block-post-author__byline",
- "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_React_namespaceObject.createElement)("p", {
- className: "wp-block-post-author__name"
- }, isLink ? (0,external_React_namespaceObject.createElement)("a", {
- href: "#post-author-pseudo-link",
- onClick: event => event.preventDefault()
- }, authorName) : authorName), showBio && (0,external_React_namespaceObject.createElement)("p", {
- className: "wp-block-post-author__bio",
- dangerouslySetInnerHTML: {
- __html: authorDetails?.description
- }
- }))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [showAuthorControl && (showCombobox && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ComboboxControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Author'),
+ options: authorOptions,
+ value: authorId,
+ onChange: handleSelect,
+ allowReset: false
+ }) || /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SelectControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Author'),
+ value: authorId,
+ options: authorOptions,
+ onChange: handleSelect
+ })), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Show avatar'),
+ checked: showAvatar,
+ onChange: () => setAttributes({
+ showAvatar: !showAvatar
+ })
+ }), showAvatar && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SelectControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Avatar size'),
+ value: attributes.avatarSize,
+ options: avatarSizes,
+ onChange: size => {
+ setAttributes({
+ avatarSize: Number(size)
+ });
+ }
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Show bio'),
+ checked: showBio,
+ onChange: () => setAttributes({
+ showBio: !showBio
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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'
+ })]
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
+ value: textAlign,
+ onChange: nextAlign => {
+ setAttributes({
+ textAlign: nextAlign
+ });
+ }
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ ...blockProps,
+ children: [showAvatar && authorDetails?.avatar_urls && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-post-author__avatar",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ width: attributes.avatarSize,
+ src: authorDetails.avatar_urls[attributes.avatarSize],
+ alt: authorDetails.name
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ className: "wp-block-post-author__content",
+ children: [(!external_wp_blockEditor_namespaceObject.RichText.isEmpty(byline) || isSelected) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
+ identifier: "byline",
+ className: "wp-block-post-author__byline",
+ "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
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
+ className: "wp-block-post-author__name",
+ children: isLink ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: "#post-author-pseudo-link",
+ onClick: event => event.preventDefault(),
+ children: authorName
+ }) : authorName
+ }), showBio && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
+ className: "wp-block-post-author__bio",
+ dangerouslySetInnerHTML: {
+ __html: authorDetails?.description
+ }
+ })]
+ })]
+ })]
+ });
}
/* harmony default export */ const post_author_edit = (PostAuthorEdit);
@@ -39705,7 +41076,6 @@ const post_author_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-author-name/edit.js
-
/**
* External dependencies
*/
@@ -39719,6 +41089,9 @@ const post_author_init = () => initBlock({
+
+
+
function PostAuthorNameEdit({
context: {
postType,
@@ -39744,44 +41117,52 @@ function PostAuthorNameEdit({
};
}, [postType, postId]);
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()({
+ className: dist_clsx({
[`has-text-align-${textAlign}`]: textAlign
})
});
const displayName = authorName?.name || (0,external_wp_i18n_namespaceObject.__)('Author Name');
- const displayAuthor = isLink ? (0,external_React_namespaceObject.createElement)("a", {
+ const displayAuthor = isLink ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
href: "#author-pseudo-link",
onClick: event => event.preventDefault(),
- className: "wp-block-post-author-name__link"
- }, displayName) : displayName;
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
- value: textAlign,
- onChange: nextAlign => {
- setAttributes({
- textAlign: nextAlign
- });
- }
- })), (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.ToggleControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Link to author archive'),
- onChange: () => setAttributes({
- isLink: !isLink
- }),
- checked: isLink
- }), 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_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, " ", displayAuthor, " "));
+ className: "wp-block-post-author-name__link",
+ children: displayName
+ }) : displayName;
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
+ value: textAlign,
+ onChange: nextAlign => {
+ setAttributes({
+ textAlign: nextAlign
+ });
+ }
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Link to author archive'),
+ onChange: () => setAttributes({
+ isLink: !isLink
+ }),
+ checked: isLink
+ }), isLink && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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'
+ })]
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ ...blockProps,
+ children: [" ", displayAuthor, " "]
+ })]
+ });
}
/* harmony default export */ const post_author_name_edit = (PostAuthorNameEdit);
@@ -39895,7 +41276,6 @@ const post_author_name_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-author-biography/edit.js
-
/**
* External dependencies
*/
@@ -39908,6 +41288,9 @@ const post_author_name_init = () => initBlock({
+
+
+
function PostAuthorBiographyEdit({
context: {
postType,
@@ -39931,26 +41314,29 @@ function PostAuthorBiographyEdit({
};
}, [postType, postId]);
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()({
+ className: dist_clsx({
[`has-text-align-${textAlign}`]: textAlign
})
});
const displayAuthorBiography = authorDetails?.description || (0,external_wp_i18n_namespaceObject.__)('Author Biography');
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
- value: textAlign,
- onChange: nextAlign => {
- setAttributes({
- textAlign: nextAlign
- });
- }
- })), (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps,
- dangerouslySetInnerHTML: {
- __html: displayAuthorBiography
- }
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
+ value: textAlign,
+ onChange: nextAlign => {
+ setAttributes({
+ textAlign: nextAlign
+ });
+ }
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ dangerouslySetInnerHTML: {
+ __html: displayAuthorBiography
+ }
+ })]
+ });
}
/* harmony default export */ const post_author_biography_edit = (PostAuthorBiographyEdit);
@@ -40025,21 +41411,21 @@ const post_author_biography_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/block-default.js
-
/**
* WordPress dependencies
*/
-const blockDefault = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const blockDefault = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const block_default = (blockDefault);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-comment/edit.js
-
/**
* WordPress dependencies
*/
@@ -40048,6 +41434,8 @@ const blockDefault = (0,external_React_namespaceObject.createElement)(external_w
+
+
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: {
@@ -40061,40 +41449,43 @@ function post_comment_edit_Edit({
template: post_comment_edit_TEMPLATE
});
if (!commentId) {
- return (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
- __nextHasNoMarginBottom: true,
- value: commentId,
- onChange: val => setCommentIdInput(parseInt(val))
- }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- variant: "primary",
- onClick: () => {
- setAttributes({
- commentId: commentIdInput
- });
- }
- }, (0,external_wp_i18n_namespaceObject.__)('Save'))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(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.'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
+ __nextHasNoMarginBottom: true,
+ value: commentId,
+ onChange: val => setCommentIdInput(parseInt(val))
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ variant: "primary",
+ onClick: () => {
+ setAttributes({
+ commentId: commentIdInput
+ });
+ },
+ children: (0,external_wp_i18n_namespaceObject.__)('Save')
+ })]
+ })
+ });
}
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
...innerBlocksProps
});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-comment/save.js
-
/**
* WordPress dependencies
*/
+
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_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
...innerBlocksProps
});
}
@@ -40153,21 +41544,21 @@ const post_comment_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/post-comments-count.js
-
/**
* WordPress dependencies
*/
-const postCommentsCount = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const postCommentsCount = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const post_comments_count = (postCommentsCount);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-comments-count/edit.js
-
/**
* External dependencies
*/
@@ -40181,6 +41572,9 @@ const postCommentsCount = (0,external_React_namespaceObject.createElement)(exter
+
+
+
function PostCommentsCountEdit({
attributes,
context,
@@ -40194,7 +41588,7 @@ function PostCommentsCountEdit({
} = context;
const [commentsCount, setCommentsCount] = (0,external_wp_element_namespaceObject.useState)();
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()({
+ className: dist_clsx({
[`has-text-align-${textAlign}`]: textAlign
})
});
@@ -40220,19 +41614,25 @@ function PostCommentsCountEdit({
...blockProps.style,
textDecoration: hasPostAndComments ? blockProps.style?.textDecoration : undefined
};
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
- value: textAlign,
- onChange: nextAlign => {
- setAttributes({
- textAlign: nextAlign
- });
- }
- })), (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps,
- style: blockStyles
- }, 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.'))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
+ value: textAlign,
+ onChange: nextAlign => {
+ setAttributes({
+ textAlign: nextAlign
+ });
+ }
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ style: blockStyles,
+ children: hasPostAndComments ? commentsCount : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, {
+ children: (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
@@ -40307,21 +41707,21 @@ const post_comments_count_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/post-comments-form.js
-
/**
* WordPress dependencies
*/
-const postCommentsForm = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const postCommentsForm = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const post_comments_form = (postCommentsForm);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-comments-form/edit.js
-
/**
* External dependencies
*/
@@ -40339,6 +41739,9 @@ const postCommentsForm = (0,external_React_namespaceObject.createElement)(extern
* Internal dependencies
*/
+
+
+
function PostCommentsFormEdit({
attributes,
context,
@@ -40354,28 +41757,33 @@ function PostCommentsFormEdit({
const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(PostCommentsFormEdit);
const instanceIdDesc = (0,external_wp_i18n_namespaceObject.sprintf)('comments-form-edit-%d-desc', instanceId);
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()({
+ className: dist_clsx({
[`has-text-align-${textAlign}`]: textAlign
}),
'aria-describedby': instanceIdDesc
});
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
- value: textAlign,
- onChange: nextAlign => {
- setAttributes({
- textAlign: nextAlign
- });
- }
- })), (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(post_comments_form_form, {
- postId: postId,
- postType: postType
- }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, {
- id: instanceIdDesc
- }, (0,external_wp_i18n_namespaceObject.__)('Comments form disabled in editor.'))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
+ value: textAlign,
+ onChange: nextAlign => {
+ setAttributes({
+ textAlign: nextAlign
+ });
+ }
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ ...blockProps,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(post_comments_form_form, {
+ postId: postId,
+ postType: postType
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, {
+ id: instanceIdDesc,
+ children: (0,external_wp_i18n_namespaceObject.__)('Comments form disabled in editor.')
+ })]
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-comments-form/index.js
@@ -40448,7 +41856,6 @@ const post_comments_form_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-comments-link/edit.js
-
/**
* External dependencies
*/
@@ -40464,6 +41871,9 @@ const post_comments_form_init = () => initBlock({
+
+
+
function PostCommentsLinkEdit({
context,
attributes,
@@ -40478,7 +41888,7 @@ function PostCommentsLinkEdit({
} = context;
const [commentsCount, setCommentsCount] = (0,external_wp_element_namespaceObject.useState)();
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()({
+ className: dist_clsx({
[`has-text-align-${textAlign}`]: textAlign
})
});
@@ -40516,21 +41926,28 @@ function PostCommentsLinkEdit({
(0,external_wp_i18n_namespaceObject._n)('%s comment', '%s comments', commentsNumber), commentsNumber.toLocaleString());
}
}
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
- value: textAlign,
- onChange: nextAlign => {
- setAttributes({
- textAlign: nextAlign
- });
- }
- })), (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, link && commentsText !== undefined ? (0,external_React_namespaceObject.createElement)("a", {
- href: link + '#comments',
- onClick: event => event.preventDefault()
- }, commentsText) : (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Post Comments Link block: post not found.'))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
+ value: textAlign,
+ onChange: nextAlign => {
+ setAttributes({
+ textAlign: nextAlign
+ });
+ }
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: link && commentsText !== undefined ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: link + '#comments',
+ onClick: event => event.preventDefault(),
+ children: commentsText
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, {
+ children: (0,external_wp_i18n_namespaceObject.__)('Post Comments Link block: post not found.')
+ })
+ })]
+ });
}
/* harmony default export */ const post_comments_link_edit = (PostCommentsLinkEdit);
@@ -40607,42 +42024,21 @@ const post_comments_link_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/post-content.js
-
-/**
- * WordPress dependencies
- */
-
-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_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
- d: "M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z"
-}));
-/* harmony default export */ const post_content = (postContent);
-
-;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/utils/hooks.js
/**
* WordPress dependencies
*/
-
-/**
- * Returns whether the current user can edit the given entity.
- *
- * @param {string} kind Entity kind.
- * @param {string} name Entity name.
- * @param {string} recordId Record's id.
- */
-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 */ const hooks = ({
- useCanEditEntity
+const postContent = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
+ xmlns: "http://www.w3.org/2000/svg",
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
+ d: "M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z"
+ })
});
+/* harmony default export */ const post_content = (postContent);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-content/edit.js
-
/**
* WordPress dependencies
*/
@@ -40654,6 +42050,8 @@ function useCanEditEntity(kind, name, recordId) {
* Internal dependencies
*/
+
+
function ReadOnlyContent({
layoutClassNames,
userCanEdit,
@@ -40664,9 +42062,12 @@ function ReadOnlyContent({
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
className: layoutClassNames
});
- return content?.protected && !userCanEdit ? (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (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", {
+ return content?.protected && !userCanEdit ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, {
+ children: (0,external_wp_i18n_namespaceObject.__)('This content is password protected.')
+ })
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
...blockProps,
dangerouslySetInnerHTML: {
__html: content?.rendered
@@ -40696,7 +42097,7 @@ function EditableContent({
onChange,
template: !hasInnerBlocks ? initialInnerBlocks : undefined
});
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
...props
});
}
@@ -40715,9 +42116,9 @@ function Content(props) {
}
const isDescendentOfQueryLoop = Number.isFinite(queryId);
const isEditable = userCanEdit && !isDescendentOfQueryLoop;
- return isEditable ? (0,external_React_namespaceObject.createElement)(EditableContent, {
+ return isEditable ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EditableContent, {
...props
- }) : (0,external_React_namespaceObject.createElement)(ReadOnlyContent, {
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ReadOnlyContent, {
layoutClassNames: layoutClassNames,
userCanEdit: userCanEdit,
postType: postType,
@@ -40730,15 +42131,25 @@ function edit_Placeholder({
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
className: layoutClassNames
});
- return (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (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.')));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ ...blockProps,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
+ children: (0,external_wp_i18n_namespaceObject.__)('This is the Content block, it will display all the blocks in any single post or page.')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
+ children: (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.')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
+ children: (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_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Block cannot be rendered inside itself.')));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, {
+ children: (0,external_wp_i18n_namespaceObject.__)('Block cannot be rendered inside itself.')
+ })
+ });
}
function PostContentEdit({
context,
@@ -40750,16 +42161,17 @@ function PostContentEdit({
} = context;
const hasAlreadyRendered = (0,external_wp_blockEditor_namespaceObject.useHasRecursion)(contextPostId);
if (contextPostId && contextPostType && hasAlreadyRendered) {
- return (0,external_React_namespaceObject.createElement)(RecursionError, null);
- }
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RecursionProvider, {
- uniqueId: contextPostId
- }, contextPostId && contextPostType ? (0,external_React_namespaceObject.createElement)(Content, {
- context: context,
- layoutClassNames: layoutClassNames
- }) : (0,external_React_namespaceObject.createElement)(edit_Placeholder, {
- layoutClassNames: layoutClassNames
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(RecursionError, {});
+ }
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RecursionProvider, {
+ uniqueId: contextPostId,
+ children: contextPostId && contextPostType ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Content, {
+ context: context,
+ layoutClassNames: layoutClassNames
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(edit_Placeholder, {
+ layoutClassNames: layoutClassNames
+ })
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-content/index.js
@@ -40831,7 +42243,6 @@ const post_content_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-date/edit.js
-
/**
* External dependencies
*/
@@ -40849,6 +42260,9 @@ const post_content_init = () => initBlock({
+
+
+
function PostDateEdit({
attributes: {
textAlign,
@@ -40864,7 +42278,7 @@ function PostDateEdit({
setAttributes
}) {
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()({
+ className: dist_clsx({
[`has-text-align-${textAlign}`]: textAlign,
[`wp-block-post-date__modified-date`]: displayType === 'modified'
})
@@ -40884,81 +42298,92 @@ 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_React_namespaceObject.createElement)("time", {
+ let postDate = date ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("time", {
dateTime: (0,external_wp_date_namespaceObject.dateI18n)('c', date),
- ref: setPopoverAnchor
- }, (0,external_wp_date_namespaceObject.dateI18n)(format || siteFormat, date)) : dateLabel;
+ ref: setPopoverAnchor,
+ children: (0,external_wp_date_namespaceObject.dateI18n)(format || siteFormat, date)
+ }) : dateLabel;
if (isLink && date) {
- postDate = (0,external_React_namespaceObject.createElement)("a", {
+ postDate = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
href: "#post-date-pseudo-link",
- onClick: event => event.preventDefault()
- }, postDate);
- }
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
- value: textAlign,
- onChange: nextAlign => {
- setAttributes({
- textAlign: nextAlign
- });
- }
- }), 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalPublishDateTimePicker, {
- currentDate: date,
- onChange: setDate,
- is12Hour: is12HourFormat(siteTimeFormat),
- onClose: onClose
- }),
- renderToggle: ({
- isOpen,
- onToggle
- }) => {
- const openOnArrowDown = event => {
- if (!isOpen && event.keyCode === external_wp_keycodes_namespaceObject.DOWN) {
- event.preventDefault();
- onToggle();
+ onClick: event => event.preventDefault(),
+ children: postDate
+ });
+ }
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
+ value: textAlign,
+ onChange: nextAlign => {
+ setAttributes({
+ textAlign: nextAlign
+ });
}
- };
- 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'),
- onClick: onToggle,
- onKeyDown: openOnArrowDown
- });
- }
- }))), (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_blockEditor_namespaceObject.__experimentalDateFormatPicker, {
- format: format,
- defaultFormat: siteFormat,
- onChange: nextFormat => setAttributes({
- format: nextFormat
- })
- }), (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".
- (0,external_wp_i18n_namespaceObject.__)('Link to %s'), postType.labels.singular_name.toLowerCase()) : (0,external_wp_i18n_namespaceObject.__)('Link to post'),
- onChange: () => setAttributes({
- isLink: !isLink
- }),
- checked: isLink
- }), (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({
- displayType: value ? 'modified' : 'date'
- }),
- checked: displayType === 'modified',
- help: (0,external_wp_i18n_namespaceObject.__)('Only shows if the post has been modified')
- }))), (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, postDate));
+ }), date && displayType === 'date' && !isDescendentOfQueryLoop && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Dropdown, {
+ popoverProps: popoverProps,
+ renderContent: ({
+ onClose
+ }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalPublishDateTimePicker, {
+ currentDate: date,
+ onChange: setDate,
+ is12Hour: is12HourFormat(siteTimeFormat),
+ onClose: onClose
+ }),
+ renderToggle: ({
+ isOpen,
+ onToggle
+ }) => {
+ const openOnArrowDown = event => {
+ if (!isOpen && event.keyCode === external_wp_keycodes_namespaceObject.DOWN) {
+ event.preventDefault();
+ onToggle();
+ }
+ };
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
+ "aria-expanded": isOpen,
+ icon: library_edit,
+ title: (0,external_wp_i18n_namespaceObject.__)('Change Date'),
+ onClick: onToggle,
+ onKeyDown: openOnArrowDown
+ });
+ }
+ })
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalDateFormatPicker, {
+ format: format,
+ defaultFormat: siteFormat,
+ onChange: nextFormat => setAttributes({
+ format: nextFormat
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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".
+ (0,external_wp_i18n_namespaceObject.__)('Link to %s'), postType.labels.singular_name.toLowerCase()) : (0,external_wp_i18n_namespaceObject.__)('Link to post'),
+ onChange: () => setAttributes({
+ isLink: !isLink
+ }),
+ checked: isLink
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Display last modified date'),
+ onChange: value => setAttributes({
+ displayType: value ? 'modified' : 'date'
+ }),
+ checked: displayType === 'modified',
+ help: (0,external_wp_i18n_namespaceObject.__)('Only shows if the post has been modified')
+ })]
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: postDate
+ })]
+ });
}
function is12HourFormat(format) {
// To know if the time format is a 12 hour time, look for any of the 12 hour
@@ -41131,21 +42556,21 @@ const post_date_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/post-excerpt.js
-
/**
* WordPress dependencies
*/
-const postExcerpt = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const postExcerpt = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const post_excerpt = (postExcerpt);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-excerpt/edit.js
-
/**
* External dependencies
*/
@@ -41165,6 +42590,9 @@ const postExcerpt = (0,external_React_namespaceObject.createElement)(external_wp
* Internal dependencies
*/
+
+
+
const ELLIPSIS = '…';
function PostExcerptEditor({
attributes: {
@@ -41212,7 +42640,7 @@ function PostExcerptEditor({
*/
const isEditable = userCanEdit && !isDescendentOfQueryLoop && postTypeSupportsExcerpts;
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()({
+ className: dist_clsx({
[`has-text-align-${textAlign}`]: textAlign
})
});
@@ -41230,26 +42658,39 @@ function PostExcerptEditor({
* excerpt has been produced from the content.
*/
const strippedRenderedExcerpt = (0,external_wp_element_namespaceObject.useMemo)(() => {
- if (!renderedExcerpt) return '';
+ if (!renderedExcerpt) {
+ return '';
+ }
const document = new window.DOMParser().parseFromString(renderedExcerpt, 'text/html');
return document.body.textContent || document.body.innerText || '';
}, [renderedExcerpt]);
if (!postType || !postId) {
- 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_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('This block will display the excerpt.'))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentToolbar, {
+ value: textAlign,
+ onChange: newAlign => setAttributes({
+ textAlign: newAlign
+ })
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
+ children: (0,external_wp_i18n_namespaceObject.__)('This block will display the excerpt.')
+ })
+ })]
+ });
}
if (isProtected && !userCanEdit) {
- return (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (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.')));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, {
+ children: (0,external_wp_i18n_namespaceObject.__)('The content is currently protected and does not have the available excerpt.')
+ })
+ });
}
- const readMoreLink = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, {
+ const readMoreLink = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
+ identifier: "moreText",
className: "wp-block-post-excerpt__more-link",
tagName: "a",
"aria-label": (0,external_wp_i18n_namespaceObject.__)('“Read more” link text'),
@@ -41260,7 +42701,7 @@ function PostExcerptEditor({
}),
withoutInteractiveFormatting: true
});
- const excerptClassName = classnames_default()('wp-block-post-excerpt__excerpt', {
+ const excerptClassName = dist_clsx('wp-block-post-excerpt__excerpt', {
'is-inline': !showMoreOnNewLine
});
@@ -41288,44 +42729,54 @@ function PostExcerptEditor({
trimmedExcerpt = rawOrRenderedExcerpt.split('', excerptLength).join('');
}
const isTrimmed = trimmedExcerpt !== rawOrRenderedExcerpt;
- const excerptContent = isEditable ? (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, {
+ const excerptContent = isEditable ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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_React_namespaceObject.createElement)("p", {
- className: excerptClassName
- }, !isTrimmed ? rawOrRenderedExcerpt || (0,external_wp_i18n_namespaceObject.__)('No excerpt found') : trimmedExcerpt + ELLIPSIS);
- 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_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.ToggleControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Show link on new line'),
- checked: showMoreOnNewLine,
- onChange: newShowMoreOnNewLine => setAttributes({
- showMoreOnNewLine: newShowMoreOnNewLine
- })
- }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, {
- label: (0,external_wp_i18n_namespaceObject.__)('Max number of words'),
- value: excerptLength,
- onChange: value => {
- setAttributes({
- excerptLength: value
- });
- },
- min: "10",
- max: "100"
- }))), (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, excerptContent, !showMoreOnNewLine && ' ', showMoreOnNewLine ? (0,external_React_namespaceObject.createElement)("p", {
- className: "wp-block-post-excerpt__more-text"
- }, readMoreLink) : readMoreLink));
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
+ className: excerptClassName,
+ children: !isTrimmed ? rawOrRenderedExcerpt || (0,external_wp_i18n_namespaceObject.__)('No excerpt found') : trimmedExcerpt + ELLIPSIS
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentToolbar, {
+ value: textAlign,
+ onChange: newAlign => setAttributes({
+ textAlign: newAlign
+ })
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.RangeControl, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Max number of words'),
+ value: excerptLength,
+ onChange: value => {
+ setAttributes({
+ excerptLength: value
+ });
+ },
+ min: "10",
+ max: "100"
+ })]
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ ...blockProps,
+ children: [excerptContent, !showMoreOnNewLine && ' ', showMoreOnNewLine ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
+ className: "wp-block-post-excerpt__more-text",
+ children: readMoreLink
+ }) : readMoreLink]
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-excerpt/transforms.js
@@ -41435,37 +42886,43 @@ const post_excerpt_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/post-featured-image.js
-
/**
* WordPress dependencies
*/
-const postFeaturedImage = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const postFeaturedImage = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const post_featured_image = (postFeaturedImage);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-featured-image/dimension-controls.js
-
/**
* WordPress dependencies
*/
-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_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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
- value: "fill",
- label: (0,external_wp_i18n_namespaceObject._x)('Fill', 'Scale option for Image dimension control')
-}));
+
+
+
+
+const SCALE_OPTIONS = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
+ value: "cover",
+ label: (0,external_wp_i18n_namespaceObject._x)('Cover', 'Scale option for Image dimension control')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
+ value: "contain",
+ label: (0,external_wp_i18n_namespaceObject._x)('Contain', 'Scale option for Image dimension control')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
+ value: "fill",
+ label: (0,external_wp_i18n_namespaceObject._x)('Fill', 'Scale option for Image dimension control')
+ })]
+});
const DEFAULT_SCALE = 'cover';
const DEFAULT_SIZE = 'full';
const scaleHelp = {
@@ -41483,12 +42940,24 @@ const DimensionControls = ({
sizeSlug
},
setAttributes,
- imageSizeOptions = []
+ media
}) => {
- const [availableUnits] = (0,external_wp_blockEditor_namespaceObject.useSettings)('spacing.units');
+ const [availableUnits, defaultRatios, themeRatios, showDefaultRatios] = (0,external_wp_blockEditor_namespaceObject.useSettings)('spacing.units', 'dimensions.aspectRatios.default', 'dimensions.aspectRatios.theme', 'dimensions.defaultAspectRatios');
const units = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({
availableUnits: availableUnits || ['px', '%', 'vw', 'em', 'rem']
});
+ const imageSizes = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).getSettings().imageSizes, []);
+ const imageSizeOptions = imageSizes.filter(({
+ slug
+ }) => {
+ return media?.media_details?.sizes?.[slug]?.source_url;
+ }).map(({
+ name,
+ slug
+ }) => ({
+ value: slug,
+ label: name
+ }));
const onDimensionChange = (dimension, nextValue) => {
const parsedValue = parseFloat(nextValue);
/**
@@ -41496,142 +42965,221 @@ const DimensionControls = ({
* we don't want to set the attribute, as it would
* end up having the unit as value without any number.
*/
- if (isNaN(parsedValue) && nextValue) return;
+ if (isNaN(parsedValue) && nextValue) {
+ return;
+ }
setAttributes({
[dimension]: parsedValue < 0 ? '0' : nextValue
});
};
const scaleLabel = (0,external_wp_i18n_namespaceObject._x)('Scale', 'Image scaling options');
const showScaleControl = height || aspectRatio && aspectRatio !== 'auto';
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, {
- group: "dimensions"
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
- hasValue: () => !!aspectRatio,
- label: (0,external_wp_i18n_namespaceObject.__)('Aspect ratio'),
- onDeselect: () => setAttributes({
- aspectRatio: undefined
- }),
- resetAllFilter: () => ({
- aspectRatio: undefined
- }),
- isShownByDefault: true,
- panelId: clientId
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Aspect ratio'),
- value: aspectRatio,
- options: [
- // These should use the same values as AspectRatioDropdown in @wordpress/block-editor
- {
- label: (0,external_wp_i18n_namespaceObject.__)('Original'),
- value: 'auto'
- }, {
- label: (0,external_wp_i18n_namespaceObject.__)('Square'),
- value: '1'
- }, {
- label: (0,external_wp_i18n_namespaceObject.__)('16:9'),
- value: '16/9'
- }, {
- label: (0,external_wp_i18n_namespaceObject.__)('4:3'),
- value: '4/3'
- }, {
- label: (0,external_wp_i18n_namespaceObject.__)('3:2'),
- value: '3/2'
- }, {
- label: (0,external_wp_i18n_namespaceObject.__)('9:16'),
- value: '9/16'
- }, {
- label: (0,external_wp_i18n_namespaceObject.__)('3:4'),
- value: '3/4'
- }, {
- label: (0,external_wp_i18n_namespaceObject.__)('2:3'),
- value: '2/3'
- }],
- onChange: nextAspectRatio => setAttributes({
- aspectRatio: nextAspectRatio
- })
- })), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
- className: "single-column",
- hasValue: () => !!height,
- label: (0,external_wp_i18n_namespaceObject.__)('Height'),
- onDeselect: () => setAttributes({
- height: undefined
- }),
- resetAllFilter: () => ({
- height: undefined
- }),
- isShownByDefault: true,
- panelId: clientId
- }, (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
- className: "single-column",
- hasValue: () => !!width,
- label: (0,external_wp_i18n_namespaceObject.__)('Width'),
- onDeselect: () => setAttributes({
- width: undefined
- }),
- resetAllFilter: () => ({
- width: undefined
- }),
- isShownByDefault: true,
- panelId: clientId
- }, (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
- hasValue: () => !!scale && scale !== DEFAULT_SCALE,
- label: scaleLabel,
- onDeselect: () => setAttributes({
- scale: DEFAULT_SCALE
- }),
- resetAllFilter: () => ({
- scale: DEFAULT_SCALE
- }),
- isShownByDefault: true,
- panelId: clientId
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControl, {
- __nextHasNoMarginBottom: true,
- label: scaleLabel,
- value: scale,
- help: scaleHelp[scale],
- onChange: value => setAttributes({
- scale: value
- }),
- isBlock: true
- }, 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({
- sizeSlug: undefined
- }),
- resetAllFilter: () => ({
- sizeSlug: undefined
- }),
- isShownByDefault: false,
- panelId: clientId
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Resolution'),
- value: sizeSlug || DEFAULT_SIZE,
- options: imageSizeOptions,
- onChange: nextSizeSlug => setAttributes({
- sizeSlug: nextSizeSlug
- }),
- help: (0,external_wp_i18n_namespaceObject.__)('Select the size of the source image.')
- })));
+ const themeOptions = themeRatios?.map(({
+ name,
+ ratio
+ }) => ({
+ label: name,
+ value: ratio
+ }));
+ const defaultOptions = defaultRatios?.map(({
+ name,
+ ratio
+ }) => ({
+ label: name,
+ value: ratio
+ }));
+ const aspectRatioOptions = [{
+ label: (0,external_wp_i18n_namespaceObject._x)('Original', 'Aspect ratio option for dimensions control'),
+ value: 'auto'
+ }, ...(showDefaultRatios ? defaultOptions : []), ...(themeOptions ? themeOptions : [])];
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
+ hasValue: () => !!aspectRatio,
+ label: (0,external_wp_i18n_namespaceObject.__)('Aspect ratio'),
+ onDeselect: () => setAttributes({
+ aspectRatio: undefined
+ }),
+ resetAllFilter: () => ({
+ aspectRatio: undefined
+ }),
+ isShownByDefault: true,
+ panelId: clientId,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SelectControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Aspect ratio'),
+ value: aspectRatio,
+ options: aspectRatioOptions,
+ onChange: nextAspectRatio => setAttributes({
+ aspectRatio: nextAspectRatio
+ })
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
+ className: "single-column",
+ hasValue: () => !!height,
+ label: (0,external_wp_i18n_namespaceObject.__)('Height'),
+ onDeselect: () => setAttributes({
+ height: undefined
+ }),
+ resetAllFilter: () => ({
+ height: undefined
+ }),
+ isShownByDefault: true,
+ panelId: clientId,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
+ className: "single-column",
+ hasValue: () => !!width,
+ label: (0,external_wp_i18n_namespaceObject.__)('Width'),
+ onDeselect: () => setAttributes({
+ width: undefined
+ }),
+ resetAllFilter: () => ({
+ width: undefined
+ }),
+ isShownByDefault: true,
+ panelId: clientId,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
+ hasValue: () => !!scale && scale !== DEFAULT_SCALE,
+ label: scaleLabel,
+ onDeselect: () => setAttributes({
+ scale: DEFAULT_SCALE
+ }),
+ resetAllFilter: () => ({
+ scale: DEFAULT_SCALE
+ }),
+ isShownByDefault: true,
+ panelId: clientId,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControl, {
+ __nextHasNoMarginBottom: true,
+ label: scaleLabel,
+ value: scale,
+ help: scaleHelp[scale],
+ onChange: value => setAttributes({
+ scale: value
+ }),
+ isBlock: true,
+ children: SCALE_OPTIONS
+ })
+ }), !!imageSizeOptions.length && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
+ hasValue: () => !!sizeSlug,
+ label: (0,external_wp_i18n_namespaceObject.__)('Resolution'),
+ onDeselect: () => setAttributes({
+ sizeSlug: undefined
+ }),
+ resetAllFilter: () => ({
+ sizeSlug: undefined
+ }),
+ isShownByDefault: false,
+ panelId: clientId,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SelectControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Resolution'),
+ value: sizeSlug || DEFAULT_SIZE,
+ options: imageSizeOptions,
+ onChange: nextSizeSlug => setAttributes({
+ sizeSlug: nextSizeSlug
+ }),
+ help: (0,external_wp_i18n_namespaceObject.__)('Select the size of the source image.')
+ })
+ })]
+ });
};
/* harmony default export */ const dimension_controls = (DimensionControls);
+;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-featured-image/overlay-controls.js
+/**
+ * WordPress dependencies
+ */
+
+
+
+
+
+
+
+const Overlay = ({
+ clientId,
+ attributes,
+ setAttributes,
+ overlayColor,
+ setOverlayColor
+}) => {
+ const {
+ dimRatio
+ } = attributes;
+ const {
+ gradientValue,
+ setGradient
+ } = (0,external_wp_blockEditor_namespaceObject.__experimentalUseGradient)();
+ const colorGradientSettings = (0,external_wp_blockEditor_namespaceObject.__experimentalUseMultipleOriginColorsAndGradients)();
+ if (!colorGradientSettings.hasColorsOrGradients) {
+ return null;
+ }
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown, {
+ __experimentalIsRenderedInSidebar: true,
+ settings: [{
+ colorValue: overlayColor.color,
+ gradientValue,
+ label: (0,external_wp_i18n_namespaceObject.__)('Overlay'),
+ onColorChange: setOverlayColor,
+ onGradientChange: setGradient,
+ isShownByDefault: true,
+ resetAllFilter: () => ({
+ overlayColor: undefined,
+ customOverlayColor: undefined,
+ gradient: undefined,
+ customGradient: undefined
+ })
+ }],
+ panelId: clientId,
+ ...colorGradientSettings
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
+ hasValue: () => dimRatio !== undefined,
+ label: (0,external_wp_i18n_namespaceObject.__)('Overlay opacity'),
+ onDeselect: () => setAttributes({
+ dimRatio: 0
+ }),
+ resetAllFilter: () => ({
+ dimRatio: 0
+ }),
+ isShownByDefault: true,
+ panelId: clientId,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.RangeControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Overlay opacity'),
+ value: dimRatio,
+ onChange: newDimRatio => setAttributes({
+ dimRatio: newDimRatio
+ }),
+ min: 0,
+ max: 100,
+ step: 10,
+ required: true,
+ __next40pxDefaultSize: true
+ })
+ })]
+ });
+};
+/* harmony default export */ const overlay_controls = ((0,external_wp_compose_namespaceObject.compose)([(0,external_wp_blockEditor_namespaceObject.withColors)({
+ overlayColor: 'background-color'
+})])(Overlay));
+
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-featured-image/utils.js
/**
* Generates the opacity/dim class based on given number.
@@ -41645,7 +43193,6 @@ function utils_dimRatioToClass(ratio) {
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-featured-image/overlay.js
-
/**
* External dependencies
*/
@@ -41657,26 +43204,21 @@ function utils_dimRatioToClass(ratio) {
-
-
/**
* Internal dependencies
*/
-const Overlay = ({
- clientId,
+
+const overlay_Overlay = ({
attributes,
- setAttributes,
- overlayColor,
- setOverlayColor
+ overlayColor
}) => {
const {
dimRatio
} = attributes;
const {
gradientClass,
- gradientValue,
- setGradient
+ gradientValue
} = (0,external_wp_blockEditor_namespaceObject.__experimentalUseGradient)();
const colorGradientSettings = (0,external_wp_blockEditor_namespaceObject.__experimentalUseMultipleOriginColorsAndGradients)();
const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes);
@@ -41685,69 +43227,25 @@ const Overlay = ({
backgroundImage: gradientValue,
...borderProps.style
};
- if (!colorGradientSettings.hasColorsOrGradients) {
+ if (!colorGradientSettings.hasColorsOrGradients || !dimRatio) {
return null;
}
- return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, !!dimRatio && (0,external_React_namespaceObject.createElement)("span", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
"aria-hidden": "true",
- className: classnames_default()('wp-block-post-featured-image__overlay', utils_dimRatioToClass(dimRatio), {
+ className: dist_clsx('wp-block-post-featured-image__overlay', utils_dimRatioToClass(dimRatio), {
[overlayColor.class]: overlayColor.class,
'has-background-dim': dimRatio !== undefined,
'has-background-gradient': gradientValue,
[gradientClass]: gradientClass
}, borderProps.className),
style: overlayStyles
- }), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, {
- group: "color"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown, {
- __experimentalIsRenderedInSidebar: true,
- settings: [{
- colorValue: overlayColor.color,
- gradientValue,
- label: (0,external_wp_i18n_namespaceObject.__)('Overlay'),
- onColorChange: setOverlayColor,
- onGradientChange: setGradient,
- isShownByDefault: true,
- resetAllFilter: () => ({
- overlayColor: undefined,
- customOverlayColor: undefined,
- gradient: undefined,
- customGradient: undefined
- })
- }],
- panelId: clientId,
- ...colorGradientSettings
- }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
- hasValue: () => dimRatio !== undefined,
- label: (0,external_wp_i18n_namespaceObject.__)('Overlay opacity'),
- onDeselect: () => setAttributes({
- dimRatio: 0
- }),
- resetAllFilter: () => ({
- dimRatio: 0
- }),
- isShownByDefault: true,
- panelId: clientId
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Overlay opacity'),
- value: dimRatio,
- onChange: newDimRatio => setAttributes({
- dimRatio: newDimRatio
- }),
- min: 0,
- max: 100,
- step: 10,
- required: true,
- __next40pxDefaultSize: true
- }))));
+ });
};
/* harmony default export */ const overlay = ((0,external_wp_compose_namespaceObject.compose)([(0,external_wp_blockEditor_namespaceObject.withColors)({
overlayColor: 'background-color'
-})])(Overlay));
+})])(overlay_Overlay));
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-featured-image/edit.js
-
/**
* External dependencies
*/
@@ -41765,11 +43263,16 @@ const Overlay = ({
+
/**
* Internal dependencies
*/
+
+
+
+
const post_featured_image_edit_ALLOWED_MEDIA_TYPES = ['image'];
function getMediaSourceUrlBySizeSlug(media, slug) {
return media?.media_details?.sizes?.[slug]?.source_url || media?.source_url;
@@ -41800,6 +43303,7 @@ function PostFeaturedImageEdit({
linkTarget,
useFirstImageFromPost
} = attributes;
+ const [temporaryURL, setTemporaryURL] = (0,external_wp_element_namespaceObject.useState)();
const [storedFeaturedImage, setFeaturedImage] = (0,external_wp_coreData_namespaceObject.useEntityProp)('postType', postTypeSlug, 'featured_media', postId);
// Fallback to post content if no featured image is set.
@@ -41835,43 +43339,47 @@ function PostFeaturedImageEdit({
};
}, [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(({
- slug
- }) => {
- return media?.media_details?.sizes?.[slug]?.source_url;
- }).map(({
- name,
- slug
- }) => ({
- value: slug,
- label: name
- }));
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
style: {
width,
height,
aspectRatio
- }
+ },
+ className: dist_clsx({
+ 'is-transient': temporaryURL
+ })
});
const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes);
+ const shadowProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetShadowClassesAndStyles)(attributes);
const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
const placeholder = content => {
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, {
- className: classnames_default()('block-editor-media-placeholder', borderProps.className),
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, {
+ className: dist_clsx('block-editor-media-placeholder', borderProps.className),
withIllustration: true,
style: {
height: !!aspectRatio && '100%',
width: !!aspectRatio && '100%',
- ...borderProps.style
- }
- }, content);
+ ...borderProps.style,
+ ...shadowProps.style
+ },
+ children: content
+ });
};
const onSelectImage = value => {
if (value?.id) {
setFeaturedImage(value.id);
}
+ if (value?.url && (0,external_wp_blob_namespaceObject.isBlobURL)(value.url)) {
+ setTemporaryURL(value.url);
+ }
};
+
+ // Reset temporary url when media is available.
+ (0,external_wp_element_namespaceObject.useEffect)(() => {
+ if (mediaUrl && temporaryURL) {
+ setTemporaryURL();
+ }
+ }, [mediaUrl, temporaryURL]);
const {
createErrorNotice
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
@@ -41879,65 +43387,88 @@ function PostFeaturedImageEdit({
createErrorNotice(message, {
type: 'snackbar'
});
+ setTemporaryURL();
};
- 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_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.ToggleControl, {
- __nextHasNoMarginBottom: true,
- label: postType?.labels.singular_name ? (0,external_wp_i18n_namespaceObject.sprintf)(
- // translators: %s: Name of the post type e.g: "Page".
- (0,external_wp_i18n_namespaceObject.__)('Link to %s'), postType.labels.singular_name) : (0,external_wp_i18n_namespaceObject.__)('Link to post'),
- onChange: () => setAttributes({
- isLink: !isLink
- }),
- checked: isLink
- }), 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_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
- })
- })))));
+ const controls = blockEditingMode === 'default' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ group: "color",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(overlay_controls, {
+ attributes: attributes,
+ setAttributes: setAttributes,
+ clientId: clientId
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ group: "dimensions",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(dimension_controls, {
+ clientId: clientId,
+ attributes: attributes,
+ setAttributes: setAttributes,
+ media: media
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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".
+ (0,external_wp_i18n_namespaceObject.__)('Link to %s'), postType.labels.singular_name) : (0,external_wp_i18n_namespaceObject.__)('Link to post'),
+ onChange: () => setAttributes({
+ isLink: !isLink
+ }),
+ checked: isLink
+ }), isLink && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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'
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Link rel'),
+ value: rel,
+ onChange: newRel => setAttributes({
+ rel: newRel
+ })
+ })]
+ })]
+ })
+ })]
+ });
let image;
/**
* A Post Featured Image block should not have image replacement
* or upload options in the following cases:
- * - Is placed in a Query Loop. This is a consious decision to
+ * - Is placed in a Query Loop. This is a conscious decision to
* prevent content editing of different posts in Query Loop, and
* this could change in the future.
* - Is in a context where it does not have a postId (for example
* in a template or template part).
*/
if (!featuredImage && (isDescendentOfQueryLoop || !postId)) {
- return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, controls, (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, !!isLink ? (0,external_React_namespaceObject.createElement)("a", {
- href: postPermalink,
- target: linkTarget,
- ...disabledClickProps
- }, placeholder()) : placeholder()));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [controls, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ ...blockProps,
+ children: [!!isLink ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: postPermalink,
+ target: linkTarget,
+ ...disabledClickProps,
+ children: placeholder()
+ }) : placeholder(), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(overlay, {
+ attributes: attributes,
+ setAttributes: setAttributes,
+ clientId: clientId
+ })]
+ })]
+ });
}
const label = (0,external_wp_i18n_namespaceObject.__)('Add a featured image');
const imageStyles = {
...borderProps.style,
+ ...shadowProps.style,
height: aspectRatio ? '100%' : height,
width: !!aspectRatio && '100%',
objectFit: !!(height || aspectRatio) && scale
@@ -41950,8 +43481,8 @@ function PostFeaturedImageEdit({
* - It has no image assigned yet
* Then display the placeholder with the image upload option.
*/
- if (!featuredImage) {
- image = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, {
+ if (!featuredImage && !temporaryURL) {
+ image = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, {
onSelect: onSelectImage,
accept: "image/*",
allowedTypes: post_featured_image_edit_ALLOWED_MEDIA_TYPES,
@@ -41960,7 +43491,7 @@ function PostFeaturedImageEdit({
mediaLibraryButton: ({
open
}) => {
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
icon: library_upload,
variant: "primary",
label: label,
@@ -41974,13 +43505,15 @@ function PostFeaturedImageEdit({
});
} else {
// We have a Featured image so show a Placeholder if is loading.
- image = !media ? placeholder() : (0,external_React_namespaceObject.createElement)("img", {
- className: borderProps.className,
- src: mediaUrl,
- alt: media.alt_text ? (0,external_wp_i18n_namespaceObject.sprintf)(
- // translators: %s: The image's alt text.
- (0,external_wp_i18n_namespaceObject.__)('Featured image: %s'), media.alt_text) : (0,external_wp_i18n_namespaceObject.__)('Featured image'),
- style: imageStyles
+ image = !media && !temporaryURL ? placeholder() : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ className: borderProps.className,
+ src: temporaryURL || mediaUrl,
+ alt: media && media?.alt_text ? (0,external_wp_i18n_namespaceObject.sprintf)(
+ // translators: %s: The image's alt text.
+ (0,external_wp_i18n_namespaceObject.__)('Featured image: %s'), media.alt_text) : (0,external_wp_i18n_namespaceObject.__)('Featured image'),
+ style: imageStyles
+ }), temporaryURL && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {})]
});
}
@@ -41990,24 +43523,35 @@ function PostFeaturedImageEdit({
* - Is not inside a query loop
* Then display the image and the image replacement option.
*/
- 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_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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
- onClick: () => setFeaturedImage(0)
- }, (0,external_wp_i18n_namespaceObject.__)('Reset')))), (0,external_React_namespaceObject.createElement)("figure", {
- ...blockProps
- }, !!isLink ? (0,external_React_namespaceObject.createElement)("a", {
- href: postPermalink,
- target: linkTarget,
- ...disabledClickProps
- }, image) : image));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [!temporaryURL && controls, !!media && !isDescendentOfQueryLoop && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "other",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, {
+ mediaId: featuredImage,
+ mediaURL: mediaUrl,
+ allowedTypes: post_featured_image_edit_ALLOWED_MEDIA_TYPES,
+ accept: "image/*",
+ onSelect: onSelectImage,
+ onError: onUploadError,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
+ onClick: () => setFeaturedImage(0),
+ children: (0,external_wp_i18n_namespaceObject.__)('Reset')
+ })
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
+ ...blockProps,
+ children: [!!isLink ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: postPermalink,
+ target: linkTarget,
+ ...disabledClickProps,
+ children: image
+ }) : image, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(overlay, {
+ attributes: attributes,
+ setAttributes: setAttributes,
+ clientId: clientId
+ })]
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-featured-image/index.js
@@ -42083,7 +43627,6 @@ const post_featured_image_metadata = {
supports: {
align: ["left", "right", "center", "wide", "full"],
color: {
- __experimentalDuotone: "img, .wp-block-post-featured-image__placeholder, .components-placeholder__illustration, .components-placeholder::before",
text: false,
background: false
},
@@ -42091,7 +43634,6 @@ const post_featured_image_metadata = {
color: true,
radius: true,
width: true,
- __experimentalSelector: "img, .block-editor-media-placeholder, .wp-block-post-featured-image__overlay",
__experimentalSkipSerialization: true,
__experimentalDefaultControls: {
color: true,
@@ -42099,6 +43641,12 @@ const post_featured_image_metadata = {
width: true
}
},
+ filter: {
+ duotone: true
+ },
+ shadow: {
+ __experimentalSkipSerialization: true
+ },
html: false,
spacing: {
margin: true,
@@ -42108,6 +43656,13 @@ const post_featured_image_metadata = {
clientNavigation: true
}
},
+ selectors: {
+ border: ".wp-block-post-featured-image img, .wp-block-post-featured-image .block-editor-media-placeholder, .wp-block-post-featured-image .wp-block-post-featured-image__overlay",
+ shadow: ".wp-block-post-featured-image img, .wp-block-post-featured-image .components-placeholder",
+ filter: {
+ duotone: ".wp-block-post-featured-image img, .wp-block-post-featured-image .wp-block-post-featured-image__placeholder, .wp-block-post-featured-image .components-placeholder__illustration, .wp-block-post-featured-image .components-placeholder::before"
+ }
+ },
editorStyle: "wp-block-post-featured-image-editor",
style: "wp-block-post-featured-image"
};
@@ -42127,7 +43682,6 @@ const post_featured_image_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-navigation-link/edit.js
-
/**
* External dependencies
*/
@@ -42141,6 +43695,9 @@ const post_featured_image_init = () => initBlock({
+
+
+
function PostNavigationLinkEdit({
context: {
postType
@@ -42170,7 +43727,7 @@ function PostNavigationLinkEdit({
}
const ariaLabel = isNext ? (0,external_wp_i18n_namespaceObject.__)('Next post') : (0,external_wp_i18n_namespaceObject.__)('Previous post');
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()({
+ className: dist_clsx({
[`has-text-align-${textAlign}`]: textAlign
})
});
@@ -42199,106 +43756,123 @@ function PostNavigationLinkEdit({
});
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.'),
- checked: !!showTitle,
- onChange: () => setAttributes({
- showTitle: !showTitle
- })
- }), 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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Arrow'),
- value: arrow,
- onChange: value => {
- setAttributes({
- arrow: value
- });
- },
- help: (0,external_wp_i18n_namespaceObject.__)('A decorative arrow for the next and previous link.'),
- isBlock: true
- }, (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_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_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_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_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, !isNext && displayArrow && (0,external_React_namespaceObject.createElement)("span", {
- className: `wp-block-post-navigation-link__arrow-previous is-arrow-${arrow}`
- }, displayArrow), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, {
- tagName: "a",
- "aria-label": ariaLabel,
- placeholder: placeholder,
- value: label,
- allowedFormats: ['core/bold', 'core/italic'],
- onChange: newLabel => setAttributes({
- label: newLabel
- })
- }), 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_React_namespaceObject.createElement)("span", {
- className: `wp-block-post-navigation-link__arrow-next is-arrow-${arrow}`,
- "aria-hidden": true
- }, displayArrow)));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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.'),
+ checked: !!showTitle,
+ onChange: () => setAttributes({
+ showTitle: !showTitle
+ })
+ }), showTitle && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalToggleGroupControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Arrow'),
+ value: arrow,
+ onChange: value => {
+ setAttributes({
+ arrow: value
+ });
+ },
+ help: (0,external_wp_i18n_namespaceObject.__)('A decorative arrow for the next and previous link.'),
+ isBlock: true,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
+ value: "none",
+ label: (0,external_wp_i18n_namespaceObject._x)('None', 'Arrow option for Next/Previous link')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
+ value: "arrow",
+ label: (0,external_wp_i18n_namespaceObject._x)('Arrow', 'Arrow option for Next/Previous link')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
+ value: "chevron",
+ label: (0,external_wp_i18n_namespaceObject._x)('Chevron', 'Arrow option for Next/Previous link')
+ })]
+ })]
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ group: "advanced",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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.')
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentToolbar, {
+ value: textAlign,
+ onChange: nextAlign => {
+ setAttributes({
+ textAlign: nextAlign
+ });
+ }
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ ...blockProps,
+ children: [!isNext && displayArrow && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ className: `wp-block-post-navigation-link__arrow-previous is-arrow-${arrow}`,
+ children: displayArrow
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
+ tagName: "a",
+ identifier: "label",
+ "aria-label": ariaLabel,
+ placeholder: placeholder,
+ value: label,
+ allowedFormats: ['core/bold', 'core/italic'],
+ onChange: newLabel => setAttributes({
+ label: newLabel
+ })
+ }), showTitle && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: "#post-navigation-pseudo-link",
+ onClick: event => event.preventDefault(),
+ children: (0,external_wp_i18n_namespaceObject.__)('An example title')
+ }), isNext && displayArrow && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ className: `wp-block-post-navigation-link__arrow-next is-arrow-${arrow}`,
+ "aria-hidden": true,
+ children: displayArrow
+ })]
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/next.js
-
/**
* WordPress dependencies
*/
-const next = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const next = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_next = (next);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/previous.js
-
/**
* WordPress dependencies
*/
-const previous = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const previous = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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.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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_previous = (previous);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-navigation-link/variations.js
@@ -42334,7 +43908,9 @@ const post_navigation_link_variations_variations = [{
* Block by providing its attributes.
*/
post_navigation_link_variations_variations.forEach(variation => {
- if (variation.isActive) return;
+ if (variation.isActive) {
+ return;
+ }
variation.isActive = (blockAttributes, variationAttributes) => blockAttributes.type === variationAttributes.type;
});
/* harmony default export */ const post_navigation_link_variations = (post_navigation_link_variations_variations);
@@ -42424,7 +44000,6 @@ const post_navigation_link_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-template/edit.js
-
/**
* External dependencies
*/
@@ -42440,28 +44015,34 @@ const post_navigation_link_init = () => initBlock({
+
+
+
const post_template_edit_TEMPLATE = [['core/post-title'], ['core/post-date'], ['core/post-excerpt']];
-function PostTemplateInnerBlocks() {
+function PostTemplateInnerBlocks({
+ classList
+}) {
const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)({
- className: 'wp-block-post'
+ className: dist_clsx('wp-block-post', classList)
}, {
template: post_template_edit_TEMPLATE,
__unstableDisableLayoutClassNames: true
});
- return (0,external_React_namespaceObject.createElement)("li", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", {
...innerBlocksProps
});
}
function PostTemplateBlockPreview({
blocks,
blockContextId,
+ classList,
isHidden,
setActiveBlockContextId
}) {
const blockPreviewProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBlockPreview)({
blocks,
props: {
- className: 'wp-block-post'
+ className: dist_clsx('wp-block-post', classList)
}
});
const handleOnClick = () => {
@@ -42470,7 +44051,7 @@ function PostTemplateBlockPreview({
const style = {
display: isHidden ? 'none' : undefined
};
- return (0,external_React_namespaceObject.createElement)("li", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", {
...blockPreviewProps,
tabIndex: 0
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role
@@ -42606,24 +44187,30 @@ function PostTemplateEdit({
blocks: getBlocks(clientId)
};
}, [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
- })), [posts]);
+ const blockContexts = (0,external_wp_element_namespaceObject.useMemo)(() => posts?.map(post => {
+ var _post$class_list;
+ return {
+ postType: post.type,
+ postId: post.id,
+ classList: (_post$class_list = post.class_list) !== null && _post$class_list !== void 0 ? _post$class_list : ''
+ };
+ }), [posts]);
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()(__unstableLayoutClassNames, {
+ className: dist_clsx(__unstableLayoutClassNames, {
[`columns-${columnCount}`]: layoutType === 'grid' && columnCount // Ensure column count is flagged via classname for backwards compatibility.
})
});
if (!posts) {
- return (0,external_React_namespaceObject.createElement)("p", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {})
+ });
}
if (!posts.length) {
- return (0,external_React_namespaceObject.createElement)("p", {
- ...blockProps
- }, " ", (0,external_wp_i18n_namespaceObject.__)('No results found.'));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("p", {
+ ...blockProps,
+ children: [" ", (0,external_wp_i18n_namespaceObject.__)('No results found.')]
+ });
}
const setDisplayLayout = newDisplayLayout => setAttributes({
layout: {
@@ -42633,14 +44220,14 @@ function PostTemplateEdit({
});
const displayLayoutControls = [{
icon: library_list,
- title: (0,external_wp_i18n_namespaceObject.__)('List view'),
+ title: (0,external_wp_i18n_namespaceObject._x)('List view', 'Post template block display setting'),
onClick: () => setDisplayLayout({
type: 'default'
}),
isActive: layoutType === 'default' || layoutType === 'constrained'
}, {
icon: library_grid,
- title: (0,external_wp_i18n_namespaceObject.__)('Grid view'),
+ title: (0,external_wp_i18n_namespaceObject._x)('Grid view', 'Post template block display setting'),
onClick: () => setDisplayLayout({
type: 'grid',
columnCount
@@ -42652,29 +44239,37 @@ 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_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_React_namespaceObject.createElement)("ul", {
- ...blockProps
- }, 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_React_namespaceObject.createElement)(PostTemplateInnerBlocks, null) : null, (0,external_React_namespaceObject.createElement)(MemoizedPostTemplateBlockPreview, {
- blocks: blocks,
- blockContextId: blockContext.postId,
- setActiveBlockContextId: setActiveBlockContextId,
- isHidden: blockContext.postId === (activeBlockContextId || blockContexts[0]?.postId)
- })))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, {
+ controls: displayLayoutControls
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
+ ...blockProps,
+ children: blockContexts && blockContexts.map(blockContext => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockContextProvider, {
+ value: blockContext,
+ children: [blockContext.postId === (activeBlockContextId || blockContexts[0]?.postId) ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostTemplateInnerBlocks, {
+ classList: blockContext.classList
+ }) : null, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MemoizedPostTemplateBlockPreview, {
+ blocks: blocks,
+ blockContextId: blockContext.postId,
+ classList: blockContext.classList,
+ setActiveBlockContextId: setActiveBlockContextId,
+ isHidden: blockContext.postId === (activeBlockContextId || blockContexts[0]?.postId)
+ })]
+ }, blockContext.postId))
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-template/save.js
-
/**
* WordPress dependencies
*/
+
function PostTemplateSave() {
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-template/index.js
@@ -42756,19 +44351,20 @@ const post_template_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/post-categories.js
-
/**
* WordPress dependencies
*/
-const postCategories = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const postCategories = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const post_categories = (postCategories);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-terms/use-post-terms.js
@@ -42813,7 +44409,6 @@ function usePostTerms({
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-terms/edit.js
-
/**
* External dependencies
*/
@@ -42836,6 +44431,9 @@ function usePostTerms({
// Allowed formats for the prefix and suffix fields.
+
+
+
const ALLOWED_FORMATS = ['core/bold', 'core/image', 'core/italic', 'core/link', 'core/strikethrough', 'core/text-color'];
function PostTermsEdit({
attributes,
@@ -42857,7 +44455,9 @@ function PostTermsEdit({
postType
} = context;
const selectedTerm = (0,external_wp_data_namespaceObject.useSelect)(select => {
- if (!term) return {};
+ if (!term) {
+ return {};
+ }
const {
getTaxonomy
} = select(external_wp_coreData_namespaceObject.store);
@@ -42875,75 +44475,89 @@ function PostTermsEdit({
const hasPost = postId && postType;
const blockInformation = (0,external_wp_blockEditor_namespaceObject.useBlockDisplayInformation)(clientId);
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()({
+ className: dist_clsx({
[`has-text-align-${textAlign}`]: textAlign,
[`taxonomy-${term}`]: term
})
});
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, {
- group: "advanced"
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
- __nextHasNoMarginBottom: true,
- autoComplete: "off",
- label: (0,external_wp_i18n_namespaceObject.__)('Separator'),
- value: separator || '',
- onChange: nextValue => {
- setAttributes({
- separator: nextValue
- });
- },
- help: (0,external_wp_i18n_namespaceObject.__)('Enter character(s) used to separate terms.')
- })), (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, 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",
- "aria-label": (0,external_wp_i18n_namespaceObject.__)('Prefix'),
- placeholder: (0,external_wp_i18n_namespaceObject.__)('Prefix') + ' ',
- value: prefix,
- onChange: value => setAttributes({
- prefix: value
- }),
- tagName: "span"
- }), (!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_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 && (isSelected || suffix) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, {
- allowedFormats: ALLOWED_FORMATS,
- className: "wp-block-post-terms__suffix",
- "aria-label": (0,external_wp_i18n_namespaceObject.__)('Suffix'),
- placeholder: ' ' + (0,external_wp_i18n_namespaceObject.__)('Suffix'),
- value: suffix,
- onChange: value => setAttributes({
- suffix: value
- }),
- tagName: "span",
- __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()))
- })));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentToolbar, {
+ value: textAlign,
+ onChange: nextAlign => {
+ setAttributes({
+ textAlign: nextAlign
+ });
+ }
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ group: "advanced",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
+ __nextHasNoMarginBottom: true,
+ autoComplete: "off",
+ label: (0,external_wp_i18n_namespaceObject.__)('Separator'),
+ value: separator || '',
+ onChange: nextValue => {
+ setAttributes({
+ separator: nextValue
+ });
+ },
+ help: (0,external_wp_i18n_namespaceObject.__)('Enter character(s) used to separate terms.')
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ ...blockProps,
+ children: [isLoading && hasPost && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}), !isLoading && (isSelected || prefix) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
+ identifier: "prefix",
+ allowedFormats: ALLOWED_FORMATS,
+ className: "wp-block-post-terms__prefix",
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Prefix'),
+ placeholder: (0,external_wp_i18n_namespaceObject.__)('Prefix') + ' ',
+ value: prefix,
+ onChange: value => setAttributes({
+ prefix: value
+ }),
+ tagName: "span"
+ }), (!hasPost || !term) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ children: blockInformation.title
+ }), hasPost && !isLoading && hasPostTerms && postTerms.map(postTerm => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: postTerm.link,
+ onClick: event => event.preventDefault(),
+ children: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(postTerm.name)
+ }, postTerm.id)).reduce((prev, curr) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [prev, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ className: "wp-block-post-terms__separator",
+ children: separator || ' '
+ }), curr]
+ })), hasPost && !isLoading && !hasPostTerms && (selectedTerm?.labels?.no_terms || (0,external_wp_i18n_namespaceObject.__)('Term items not found.')), !isLoading && (isSelected || suffix) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
+ identifier: "suffix",
+ allowedFormats: ALLOWED_FORMATS,
+ className: "wp-block-post-terms__suffix",
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Suffix'),
+ placeholder: ' ' + (0,external_wp_i18n_namespaceObject.__)('Suffix'),
+ value: suffix,
+ onChange: value => setAttributes({
+ suffix: value
+ }),
+ tagName: "span",
+ __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()))
+ })]
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/post-terms.js
-
/**
* WordPress dependencies
*/
-const postTerms = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const postTerms = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const post_terms = (postTerms);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-terms/hooks.js
@@ -43073,7 +44687,6 @@ const post_terms_init = () => {
;// CONCATENATED MODULE: external ["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
-
/**
* External dependencies
*/
@@ -43094,6 +44707,9 @@ const external_wp_wordcount_namespaceObject = window["wp"]["wordcount"];
* https://irisreading.com/average-reading-speed-in-various-languages/
* (Characters/minute used for Chinese rather than words).
*/
+
+
+
const AVERAGE_READING_RATE = 189;
function PostTimeToReadEdit({
attributes,
@@ -43133,44 +44749,49 @@ function PostTimeToReadEdit({
* Do not translate into your own language.
*/
const wordCountType = (0,external_wp_i18n_namespaceObject._x)('words', 'Word count type. Do not translate!');
- const minutesToRead = Math.max(1, Math.round((0,external_wp_wordcount_namespaceObject.count)(content, wordCountType) / AVERAGE_READING_RATE));
+ const minutesToRead = Math.max(1, Math.round((0,external_wp_wordcount_namespaceObject.count)(content || '', wordCountType) / AVERAGE_READING_RATE));
return (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %d is the number of minutes the post will take to read. */
(0,external_wp_i18n_namespaceObject._n)('%d minute', '%d minutes', minutesToRead), minutesToRead);
}, [contentStructure, blocks]);
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()({
+ className: dist_clsx({
[`has-text-align-${textAlign}`]: textAlign
})
});
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
- value: textAlign,
- onChange: nextAlign => {
- setAttributes({
- textAlign: nextAlign
- });
- }
- })), (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, minutesToReadString));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
+ value: textAlign,
+ onChange: nextAlign => {
+ setAttributes({
+ textAlign: nextAlign
+ });
+ }
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: minutesToReadString
+ })]
+ });
}
/* 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
-
/**
* WordPress dependencies
*/
-/* harmony default export */ const icon = ((0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+
+/* harmony default export */ const icon = (/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
width: "24",
height: "24",
- viewBox: "0 0 24 24"
-}, (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"
-})));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+}));
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-time-to-read/index.js
/**
@@ -43244,7 +44865,6 @@ const post_time_to_read_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-title/edit.js
-
/**
* External dependencies
*/
@@ -43259,9 +44879,8 @@ const post_time_to_read_init = () => initBlock({
-/**
- * Internal dependencies
- */
+
+
function PostTitleEdit({
attributes: {
@@ -43279,31 +44898,39 @@ function PostTitleEdit({
},
insertBlocksAfter
}) {
- const TagName = 'h' + level;
+ const TagName = level === 0 ? 'p' : `h${level}`;
const isDescendentOfQueryLoop = Number.isFinite(queryId);
- /**
- * Hack: useCanEditEntity may trigger an OPTIONS request to the REST API via the canUser resolver.
- * However, when the Post Title is a descendant of a Query Loop block, the title cannot be edited.
- * In order to avoid these unnecessary requests, we call the hook without
- * the proper data, resulting in returning early without making them.
- */
- const userCanEdit = useCanEditEntity('postType', !isDescendentOfQueryLoop && postType, postId);
+ const userCanEdit = (0,external_wp_data_namespaceObject.useSelect)(select => {
+ /**
+ * useCanEditEntity may trigger an OPTIONS request to the REST API
+ * via the canUser resolver. However, when the Post Title is a
+ * descendant of a Query Loop block, the title cannot be edited. In
+ * order to avoid these unnecessary requests, we call the hook
+ * without the proper data, resulting in returning early without
+ * making them.
+ */
+ if (isDescendentOfQueryLoop) {
+ return false;
+ }
+ return select(external_wp_coreData_namespaceObject.store).canUserEditEntityRecord('postType', postType, postId);
+ }, [isDescendentOfQueryLoop, postType, postId]);
const [rawTitle = '', setTitle, fullTitle] = (0,external_wp_coreData_namespaceObject.useEntityProp)('postType', postType, 'title', postId);
const [link] = (0,external_wp_coreData_namespaceObject.useEntityProp)('postType', postType, 'link', postId);
const onSplitAtEnd = () => {
insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()));
};
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()({
+ className: dist_clsx({
[`has-text-align-${textAlign}`]: textAlign
})
});
const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
- let titleElement = (0,external_React_namespaceObject.createElement)(TagName, {
- ...blockProps
- }, (0,external_wp_i18n_namespaceObject.__)('Title'));
+ let titleElement = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
+ ...blockProps,
+ children: (0,external_wp_i18n_namespaceObject.__)('Title')
+ });
if (postType && postId) {
- titleElement = userCanEdit ? (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.PlainText, {
+ titleElement = userCanEdit ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.PlainText, {
tagName: TagName,
placeholder: (0,external_wp_i18n_namespaceObject.__)('No Title'),
value: rawTitle,
@@ -43311,7 +44938,7 @@ function PostTitleEdit({
__experimentalVersion: 2,
__unstableOnSplitAtEnd: onSplitAtEnd,
...blockProps
- }) : (0,external_React_namespaceObject.createElement)(TagName, {
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
...blockProps,
dangerouslySetInnerHTML: {
__html: fullTitle?.rendered
@@ -43319,68 +44946,80 @@ function PostTitleEdit({
});
}
if (isLink && postType && postId) {
- titleElement = userCanEdit ? (0,external_React_namespaceObject.createElement)(TagName, {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.PlainText, {
- tagName: "a",
- href: link,
- target: linkTarget,
- rel: rel,
- placeholder: !rawTitle.length ? (0,external_wp_i18n_namespaceObject.__)('No Title') : null,
- value: rawTitle,
- onChange: setTitle,
- __experimentalVersion: 2,
- __unstableOnSplitAtEnd: onSplitAtEnd
- })) : (0,external_React_namespaceObject.createElement)(TagName, {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)("a", {
- href: link,
- target: linkTarget,
- rel: rel,
- onClick: event => event.preventDefault(),
- dangerouslySetInnerHTML: {
- __html: fullTitle?.rendered
- }
- }));
+ titleElement = userCanEdit ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.PlainText, {
+ tagName: "a",
+ href: link,
+ target: linkTarget,
+ rel: rel,
+ placeholder: !rawTitle.length ? (0,external_wp_i18n_namespaceObject.__)('No Title') : null,
+ value: rawTitle,
+ onChange: setTitle,
+ __experimentalVersion: 2,
+ __unstableOnSplitAtEnd: onSplitAtEnd
+ })
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: link,
+ target: linkTarget,
+ rel: rel,
+ onClick: event => event.preventDefault(),
+ dangerouslySetInnerHTML: {
+ __html: fullTitle?.rendered
+ }
+ })
+ });
}
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.HeadingLevelDropdown, {
- value: level,
- onChange: newLevel => setAttributes({
- level: newLevel
- })
- }), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
- value: textAlign,
- onChange: nextAlign => {
- setAttributes({
- textAlign: nextAlign
- });
- }
- })), (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.ToggleControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Make title a link'),
- onChange: () => setAttributes({
- isLink: !isLink
- }),
- checked: isLink
- }), 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_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);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [blockEditingMode === 'default' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.HeadingLevelDropdown, {
+ value: level,
+ onChange: newLevel => setAttributes({
+ level: newLevel
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
+ value: textAlign,
+ onChange: nextAlign => {
+ setAttributes({
+ textAlign: nextAlign
+ });
+ }
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Make title a link'),
+ onChange: () => setAttributes({
+ isLink: !isLink
+ }),
+ checked: isLink
+ }), isLink && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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'
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Link rel'),
+ value: rel,
+ onChange: newRel => setAttributes({
+ rel: newRel
+ })
+ })]
+ })]
+ })
+ })]
+ }), titleElement]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-title/deprecated.js
@@ -43545,27 +45184,28 @@ const post_title_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/preformatted.js
-
/**
* WordPress dependencies
*/
-const preformatted = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const preformatted = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_preformatted = (preformatted);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/preformatted/edit.js
-
/**
* WordPress dependencies
*/
+
function PreformattedEdit({
attributes,
mergeBlocks,
@@ -43580,7 +45220,7 @@ function PreformattedEdit({
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
style
});
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
tagName: "pre",
identifier: "content",
preserveWhiteSpace: true,
@@ -43601,22 +45241,23 @@ function PreformattedEdit({
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/preformatted/save.js
-
/**
* WordPress dependencies
*/
+
function preformatted_save_save({
attributes
}) {
const {
content
} = attributes;
- return (0,external_React_namespaceObject.createElement)("pre", {
- ...external_wp_blockEditor_namespaceObject.useBlockProps.save()
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- value: content
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("pre", {
+ ...external_wp_blockEditor_namespaceObject.useBlockProps.save(),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: content
+ })
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/preformatted/transforms.js
@@ -43751,24 +45392,24 @@ const preformatted_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pullquote.js
-
/**
* WordPress dependencies
*/
-const pullquote = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const pullquote = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_pullquote = (pullquote);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/pullquote/shared.js
const SOLID_COLOR_CLASS = `is-style-solid-color`;
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/pullquote/deprecated.js
-
/**
* External dependencies
*/
@@ -43784,6 +45425,8 @@ const SOLID_COLOR_CLASS = `is-style-solid-color`;
* Internal dependencies
*/
+
+
const pullquote_deprecated_blockAttributes = {
value: {
type: 'string',
@@ -43856,19 +45499,22 @@ const pullquote_deprecated_v5 = {
value
} = attributes;
const shouldShowCitation = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation);
- return (0,external_React_namespaceObject.createElement)("figure", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
- className: classnames_default()({
+ className: dist_clsx({
[`has-text-align-${textAlign}`]: textAlign
})
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: value,
+ multiline: true
+ }), shouldShowCitation && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "cite",
+ value: citation
+ })]
})
- }, (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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "cite",
- value: citation
- })));
+ });
},
migrate({
value,
@@ -43905,7 +45551,7 @@ const pullquote_deprecated_v4 = {
// Is solid color style
if (isSolidColorStyle) {
const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('background-color', mainColor);
- figureClasses = classnames_default()({
+ figureClasses = dist_clsx({
'has-background': backgroundClass || customMainColor,
[backgroundClass]: backgroundClass
});
@@ -43919,28 +45565,30 @@ const pullquote_deprecated_v4 = {
};
}
const blockquoteTextColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('color', textColor);
- const blockquoteClasses = classnames_default()({
+ const blockquoteClasses = dist_clsx({
'has-text-color': textColor || customTextColor,
[blockquoteTextColorClass]: blockquoteTextColorClass
});
const blockquoteStyles = blockquoteTextColorClass ? undefined : {
color: customTextColor
};
- return (0,external_React_namespaceObject.createElement)("figure", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className: figureClasses,
style: figureStyles
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", {
+ className: blockquoteClasses,
+ style: blockquoteStyles,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: value,
+ multiline: true
+ }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "cite",
+ value: citation
+ })]
})
- }, (0,external_React_namespaceObject.createElement)("blockquote", {
- className: blockquoteClasses,
- style: blockquoteStyles
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- value: value,
- multiline: true
- }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "cite",
- value: citation
- })));
+ });
},
migrate({
value,
@@ -44018,7 +45666,7 @@ const pullquote_deprecated_v3 = {
// Is solid color style
if (isSolidColorStyle) {
const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('background-color', mainColor);
- figureClasses = classnames_default()({
+ figureClasses = dist_clsx({
'has-background': backgroundClass || customMainColor,
[backgroundClass]: backgroundClass
});
@@ -44044,25 +45692,27 @@ const pullquote_deprecated_v3 = {
};
}
const blockquoteTextColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('color', textColor);
- const blockquoteClasses = (textColor || customTextColor) && classnames_default()('has-text-color', {
+ const blockquoteClasses = (textColor || customTextColor) && dist_clsx('has-text-color', {
[blockquoteTextColorClass]: blockquoteTextColorClass
});
const blockquoteStyles = blockquoteTextColorClass ? undefined : {
color: customTextColor
};
- return (0,external_React_namespaceObject.createElement)("figure", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", {
className: figureClasses,
- style: figureStyles
- }, (0,external_React_namespaceObject.createElement)("blockquote", {
- className: blockquoteClasses,
- style: blockquoteStyles
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- value: value,
- multiline: true
- }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "cite",
- value: citation
- })));
+ style: figureStyles,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", {
+ className: blockquoteClasses,
+ style: blockquoteStyles,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: value,
+ multiline: true
+ }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "cite",
+ value: citation
+ })]
+ })
+ });
},
migrate({
value,
@@ -44170,25 +45820,27 @@ const pullquote_deprecated_v2 = {
};
}
const blockquoteTextColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('color', textColor);
- const blockquoteClasses = textColor || customTextColor ? classnames_default()('has-text-color', {
+ const blockquoteClasses = textColor || customTextColor ? dist_clsx('has-text-color', {
[blockquoteTextColorClass]: blockquoteTextColorClass
}) : undefined;
const blockquoteStyle = blockquoteTextColorClass ? undefined : {
color: customTextColor
};
- return (0,external_React_namespaceObject.createElement)("figure", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", {
className: figureClass,
- style: figureStyles
- }, (0,external_React_namespaceObject.createElement)("blockquote", {
- className: blockquoteClasses,
- style: blockquoteStyle
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- value: value,
- multiline: true
- }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "cite",
- value: citation
- })));
+ style: figureStyles,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", {
+ className: blockquoteClasses,
+ style: blockquoteStyle,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: value,
+ multiline: true
+ }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "cite",
+ value: citation
+ })]
+ })
+ });
},
migrate({
value,
@@ -44247,13 +45899,15 @@ const pullquote_deprecated_v1 = {
value,
citation
} = attributes;
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "cite",
- value: citation
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: value,
+ multiline: true
+ }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "cite",
+ value: citation
+ })]
+ });
},
migrate({
value,
@@ -44286,15 +45940,16 @@ const deprecated_v0 = {
citation,
align
} = attributes;
- return (0,external_React_namespaceObject.createElement)("blockquote", {
- className: `align${align}`
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- value: value,
- multiline: true
- }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "footer",
- value: citation
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", {
+ className: `align${align}`,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: value,
+ multiline: true
+ }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "footer",
+ value: citation
+ })]
+ });
},
migrate({
value,
@@ -44324,7 +45979,6 @@ const Figure = 'figure';
const BlockQuote = 'blockquote';
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/pullquote/edit.js
-
/**
* External dependencies
*/
@@ -44343,6 +45997,9 @@ const BlockQuote = 'blockquote';
*/
+
+
+
const isWebPlatform = external_wp_element_namespaceObject.Platform.OS === 'web';
function PullQuoteEdit({
attributes,
@@ -44356,58 +46013,63 @@ function PullQuoteEdit({
value
} = attributes;
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()({
+ className: dist_clsx({
[`has-text-align-${textAlign}`]: textAlign
})
});
const shouldShowCitation = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) || isSelected;
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
- value: textAlign,
- onChange: nextAlign => {
- setAttributes({
- textAlign: nextAlign
- });
- }
- })), (0,external_React_namespaceObject.createElement)(Figure, {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(BlockQuote, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, {
- identifier: "value",
- tagName: "p",
- value: value,
- onChange: nextValue => setAttributes({
- value: nextValue
- }),
- "aria-label": (0,external_wp_i18n_namespaceObject.__)('Pullquote text'),
- placeholder:
- // translators: placeholder text used for the quote
- (0,external_wp_i18n_namespaceObject.__)('Add quote'),
- textAlign: "center"
- }), shouldShowCitation && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, {
- identifier: "citation",
- tagName: isWebPlatform ? 'cite' : undefined,
- style: {
- display: 'block'
- },
- value: citation,
- "aria-label": (0,external_wp_i18n_namespaceObject.__)('Pullquote citation text'),
- placeholder:
- // translators: placeholder text used for the citation
- (0,external_wp_i18n_namespaceObject.__)('Add citation'),
- onChange: nextCitation => setAttributes({
- citation: nextCitation
- }),
- className: "wp-block-pullquote__citation",
- __unstableMobileNoFocusOnMount: true,
- textAlign: "center",
- __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()))
- }))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
+ value: textAlign,
+ onChange: nextAlign => {
+ setAttributes({
+ textAlign: nextAlign
+ });
+ }
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Figure, {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(BlockQuote, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
+ identifier: "value",
+ tagName: "p",
+ value: value,
+ onChange: nextValue => setAttributes({
+ value: nextValue
+ }),
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Pullquote text'),
+ placeholder:
+ // translators: placeholder text used for the quote
+ (0,external_wp_i18n_namespaceObject.__)('Add quote'),
+ textAlign: "center"
+ }), shouldShowCitation && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
+ identifier: "citation",
+ tagName: isWebPlatform ? 'cite' : undefined,
+ style: {
+ display: 'block'
+ },
+ value: citation,
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Pullquote citation text'),
+ placeholder:
+ // translators: placeholder text used for the citation
+ (0,external_wp_i18n_namespaceObject.__)('Add citation'),
+ onChange: nextCitation => setAttributes({
+ citation: nextCitation
+ }),
+ className: "wp-block-pullquote__citation",
+ __unstableMobileNoFocusOnMount: true,
+ textAlign: "center",
+ __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()))
+ })]
+ })
+ })]
+ });
}
/* harmony default export */ const pullquote_edit = (PullQuoteEdit);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/pullquote/save.js
-
/**
* External dependencies
*/
@@ -44417,6 +46079,8 @@ function PullQuoteEdit({
* WordPress dependencies
*/
+
+
function pullquote_save_save({
attributes
}) {
@@ -44426,19 +46090,22 @@ function pullquote_save_save({
value
} = attributes;
const shouldShowCitation = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation);
- return (0,external_React_namespaceObject.createElement)("figure", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
- className: classnames_default()({
+ className: dist_clsx({
[`has-text-align-${textAlign}`]: textAlign
})
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "p",
+ value: value
+ }), shouldShowCitation && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "cite",
+ value: citation
+ })]
})
- }, (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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "cite",
- value: citation
- })));
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/pullquote/transforms.js
@@ -44651,33 +46318,36 @@ const pullquote_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/loop.js
-
/**
* WordPress dependencies
*/
-const loop = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const loop = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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.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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_loop = (loop);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/settings.js
-
/**
* WordPress dependencies
*/
-const settings_settings = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+
+const settings_settings = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(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: "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_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"
-}));
+ viewBox: "0 0 24 24",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_settings = (settings_settings);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/utils.js
@@ -44796,7 +46466,9 @@ const usePostTypes = () => {
return filteredPostTypes;
}, []);
const postTypesTaxonomiesMap = (0,external_wp_element_namespaceObject.useMemo)(() => {
- if (!postTypes?.length) return;
+ if (!postTypes?.length) {
+ return;
+ }
return postTypes.reduce((accumulator, type) => {
accumulator[type.slug] = type.taxonomies;
return accumulator;
@@ -44826,14 +46498,16 @@ const useTaxonomies = postType => {
const {
getTaxonomies
} = select(external_wp_coreData_namespaceObject.store);
- const filteredTaxonomies = getTaxonomies({
+ return getTaxonomies({
type: postType,
- per_page: -1,
- context: 'view'
+ per_page: -1
});
- return filteredTaxonomies;
}, [postType]);
- return taxonomies;
+ return (0,external_wp_element_namespaceObject.useMemo)(() => {
+ return taxonomies?.filter(({
+ visibility
+ }) => !!visibility?.publicly_queryable);
+ }, [taxonomies]);
};
/**
@@ -45062,7 +46736,6 @@ const useUnsupportedBlocks = clientId => {
};
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/edit/query-toolbar.js
-
/**
* WordPress dependencies
*/
@@ -45075,6 +46748,9 @@ const useUnsupportedBlocks = clientId => {
* Internal dependencies
*/
+
+
+
function QueryToolbar({
attributes: {
query
@@ -45086,84 +46762,97 @@ 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_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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, {
- icon: library_settings,
- label: (0,external_wp_i18n_namespaceObject.__)('Display settings'),
- onClick: onToggle
- }),
- 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",
- min: 1,
- max: 100,
- onChange: value => {
- if (isNaN(value) || value < 1 || value > 100) {
- return;
- }
- setQuery({
- perPage: value
- });
- },
- step: "1",
- value: query.perPage,
- isDragEnabled: false
- })), (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",
- min: 0,
- max: 100,
- onChange: value => {
- if (isNaN(value) || value < 0 || value > 100) {
- return;
- }
- setQuery({
- offset: value
- });
- },
- step: "1",
- value: query.offset,
- isDragEnabled: false
- })), (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalNumberControl, {
- id: maxPageInputId,
- __unstableInputWidth: "60px",
- label: (0,external_wp_i18n_namespaceObject.__)('Max page to show'),
- labelPosition: "edge",
- min: 0,
- onChange: value => {
- if (isNaN(value) || value < 0) {
- return;
- }
- setQuery({
- pages: value
- });
- },
- step: "1",
- value: query.pages,
- isDragEnabled: false
- })))
- })), hasPatterns && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, {
- className: "wp-block-template-part__block-control-group"
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, {
- onClick: openPatternSelectionModal
- }, (0,external_wp_i18n_namespaceObject.__)('Replace'))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [!query.inherit && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Dropdown, {
+ contentClassName: "block-library-query-toolbar__popover",
+ renderToggle: ({
+ onToggle
+ }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
+ icon: library_settings,
+ label: (0,external_wp_i18n_namespaceObject.__)('Display settings'),
+ onClick: onToggle
+ }),
+ renderContent: () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.BaseControl, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalNumberControl, {
+ __unstableInputWidth: "60px",
+ label: (0,external_wp_i18n_namespaceObject.__)('Items per Page'),
+ labelPosition: "edge",
+ min: 1,
+ max: 100,
+ onChange: value => {
+ if (isNaN(value) || value < 1 || value > 100) {
+ return;
+ }
+ setQuery({
+ perPage: value
+ });
+ },
+ step: "1",
+ value: query.perPage,
+ isDragEnabled: false
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.BaseControl, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalNumberControl, {
+ __unstableInputWidth: "60px",
+ label: (0,external_wp_i18n_namespaceObject.__)('Offset'),
+ labelPosition: "edge",
+ min: 0,
+ max: 100,
+ onChange: value => {
+ if (isNaN(value) || value < 0 || value > 100) {
+ return;
+ }
+ setQuery({
+ offset: value
+ });
+ },
+ step: "1",
+ value: query.offset,
+ isDragEnabled: false
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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).'),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalNumberControl, {
+ id: maxPageInputId,
+ __unstableInputWidth: "60px",
+ label: (0,external_wp_i18n_namespaceObject.__)('Max page to show'),
+ labelPosition: "edge",
+ min: 0,
+ onChange: value => {
+ if (isNaN(value) || value < 0) {
+ return;
+ }
+ setQuery({
+ pages: value
+ });
+ },
+ step: "1",
+ value: query.pages,
+ isDragEnabled: false
+ })
+ })]
+ })
+ })
+ }), hasPatterns && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, {
+ className: "wp-block-template-part__block-control-group",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
+ onClick: openPatternSelectionModal,
+ children: (0,external_wp_i18n_namespaceObject.__)('Replace')
+ })
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/order-control.js
-
/**
* WordPress dependencies
*/
+
const orderOptions = [{
label: (0,external_wp_i18n_namespaceObject.__)('Newest to oldest'),
value: 'date/desc'
@@ -45184,7 +46873,7 @@ function OrderControl({
orderBy,
onChange
}) {
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SelectControl, {
__nextHasNoMarginBottom: true,
label: (0,external_wp_i18n_namespaceObject.__)('Order by'),
value: `${orderBy}/${order}`,
@@ -45201,7 +46890,6 @@ function OrderControl({
/* harmony default export */ const order_control = (OrderControl);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/author-control.js
-
/**
* WordPress dependencies
*/
@@ -45214,6 +46902,7 @@ function OrderControl({
* Internal dependencies
*/
+
const author_control_AUTHORS_QUERY = {
who: 'authors',
per_page: -1,
@@ -45254,20 +46943,24 @@ function AuthorControl({
}, []);
const getIdByValue = (entitiesMappedByName, authorValue) => {
const id = authorValue?.id || entitiesMappedByName[authorValue]?.id;
- if (id) return id;
+ if (id) {
+ return id;
+ }
};
const onAuthorChange = newValue => {
const ids = Array.from(newValue.reduce((accumulator, author) => {
// Verify that new values point to existing entities.
const id = getIdByValue(authorsInfo.mapByName, author);
- if (id) accumulator.add(id);
+ if (id) {
+ accumulator.add(id);
+ }
return accumulator;
}, new Set()));
onChange({
author: ids.join(',')
});
};
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.FormTokenField, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FormTokenField, {
label: (0,external_wp_i18n_namespaceObject.__)('Authors'),
value: sanitizedValue,
suggestions: authorsInfo.names,
@@ -45278,7 +46971,6 @@ function AuthorControl({
/* harmony default export */ const author_control = (AuthorControl);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/parent-control.js
-
/**
* WordPress dependencies
*/
@@ -45293,6 +46985,7 @@ function AuthorControl({
* Internal dependencies
*/
+
const parent_control_EMPTY_ARRAY = [];
const BASE_QUERY = {
order: 'asc',
@@ -45335,7 +47028,9 @@ function ParentControl({
};
}, [search, parents]);
const currentParents = (0,external_wp_data_namespaceObject.useSelect)(select => {
- if (!parents?.length) return parent_control_EMPTY_ARRAY;
+ if (!parents?.length) {
+ return parent_control_EMPTY_ARRAY;
+ }
const {
getEntityRecords
} = select(external_wp_coreData_namespaceObject.store);
@@ -45351,7 +47046,9 @@ function ParentControl({
if (!parents?.length) {
setValue(parent_control_EMPTY_ARRAY);
}
- if (!currentParents?.length) return;
+ if (!currentParents?.length) {
+ return;
+ }
const currentParentsInfo = getEntitiesInfo(mapToIHasNameAndId(currentParents, 'title.rendered'));
// Returns only the existing entity ids. This prevents the component
// from crashing in the editor, when non existing ids are provided.
@@ -45368,23 +47065,31 @@ function ParentControl({
setValue(sanitizedValue);
}, [parents, currentParents]);
const entitiesInfo = (0,external_wp_element_namespaceObject.useMemo)(() => {
- if (!searchResults?.length) return parent_control_EMPTY_ARRAY;
+ if (!searchResults?.length) {
+ return parent_control_EMPTY_ARRAY;
+ }
return getEntitiesInfo(mapToIHasNameAndId(searchResults, 'title.rendered'));
}, [searchResults]);
// Update suggestions only when the query has resolved.
(0,external_wp_element_namespaceObject.useEffect)(() => {
- if (!searchHasResolved) return;
+ if (!searchHasResolved) {
+ return;
+ }
setSuggestions(entitiesInfo.names);
}, [entitiesInfo.names, searchHasResolved]);
const getIdByValue = (entitiesMappedByName, entity) => {
const id = entity?.id || entitiesMappedByName?.[entity]?.id;
- if (id) return id;
+ if (id) {
+ return id;
+ }
};
const onParentChange = newValue => {
const ids = Array.from(newValue.reduce((accumulator, entity) => {
// Verify that new values point to existing entities.
const id = getIdByValue(entitiesInfo.mapByName, entity);
- if (id) accumulator.add(id);
+ if (id) {
+ accumulator.add(id);
+ }
return accumulator;
}, new Set()));
setSuggestions(parent_control_EMPTY_ARRAY);
@@ -45392,7 +47097,7 @@ function ParentControl({
parents: ids
});
};
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.FormTokenField, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FormTokenField, {
label: (0,external_wp_i18n_namespaceObject.__)('Parents'),
value: value,
onInputChange: debouncedSearch,
@@ -45404,7 +47109,6 @@ function ParentControl({
/* harmony default export */ const parent_control = (ParentControl);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/taxonomy-controls.js
-
/**
* WordPress dependencies
*/
@@ -45419,6 +47123,8 @@ function ParentControl({
* Internal dependencies
*/
+
+
const taxonomy_controls_EMPTY_ARRAY = [];
const taxonomy_controls_BASE_QUERY = {
order: 'asc',
@@ -45458,21 +47164,22 @@ function TaxonomyControls({
if (!taxonomies || taxonomies.length === 0) {
return null;
}
- return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, taxonomies.map(taxonomy => {
- const termIds = taxQuery?.[taxonomy.slug] || [];
- const handleChange = newTermIds => onChange({
- taxQuery: {
- ...taxQuery,
- [taxonomy.slug]: newTermIds
- }
- });
- return (0,external_React_namespaceObject.createElement)(TaxonomyItem, {
- key: taxonomy.slug,
- taxonomy: taxonomy,
- termIds: termIds,
- onChange: handleChange
- });
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: taxonomies.map(taxonomy => {
+ const termIds = taxQuery?.[taxonomy.slug] || [];
+ const handleChange = newTermIds => onChange({
+ taxQuery: {
+ ...taxQuery,
+ [taxonomy.slug]: newTermIds
+ }
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TaxonomyItem, {
+ taxonomy: taxonomy,
+ termIds: termIds,
+ onChange: handleChange
+ }, taxonomy.slug);
+ })
+ });
}
/**
@@ -45523,7 +47230,9 @@ function TaxonomyItem({
// They are used to extract the terms' names to populate the `FormTokenField` properly
// and to sanitize the provided `termIds`, by setting only the ones that exist.
const existingTerms = (0,external_wp_data_namespaceObject.useSelect)(select => {
- if (!termIds?.length) return taxonomy_controls_EMPTY_ARRAY;
+ if (!termIds?.length) {
+ return taxonomy_controls_EMPTY_ARRAY;
+ }
const {
getEntityRecords
} = select(external_wp_coreData_namespaceObject.store);
@@ -45539,7 +47248,9 @@ function TaxonomyItem({
if (!termIds?.length) {
setValue(taxonomy_controls_EMPTY_ARRAY);
}
- if (!existingTerms?.length) return;
+ if (!existingTerms?.length) {
+ return;
+ }
// Returns only the existing entity ids. This prevents the component
// from crashing in the editor, when non existing ids are provided.
const sanitizedValue = termIds.reduce((accumulator, id) => {
@@ -45556,7 +47267,9 @@ function TaxonomyItem({
}, [termIds, existingTerms]);
// Update suggestions only when the query has resolved.
(0,external_wp_element_namespaceObject.useEffect)(() => {
- if (!searchHasResolved) return;
+ if (!searchHasResolved) {
+ return;
+ }
setSuggestions(searchResults.map(result => result.name));
}, [searchResults, searchHasResolved]);
const onTermsChange = newTermValues => {
@@ -45570,26 +47283,27 @@ function TaxonomyItem({
setSuggestions(taxonomy_controls_EMPTY_ARRAY);
onChange(Array.from(newTermIds));
};
- return (0,external_React_namespaceObject.createElement)("div", {
- className: "block-library-query-inspector__taxonomy-control"
- }, (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
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "block-library-query-inspector__taxonomy-control",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FormTokenField, {
+ label: taxonomy.name,
+ value: value,
+ onInputChange: debouncedSearch,
+ suggestions: suggestions,
+ displayTransform: external_wp_htmlEntities_namespaceObject.decodeEntities,
+ onChange: onTermsChange,
+ __experimentalShowHowTo: false
+ })
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/sticky-control.js
-
/**
* WordPress dependencies
*/
+
const stickyOptions = [{
label: (0,external_wp_i18n_namespaceObject.__)('Include'),
value: ''
@@ -45604,7 +47318,7 @@ function StickyControl({
value,
onChange
}) {
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SelectControl, {
__nextHasNoMarginBottom: true,
label: (0,external_wp_i18n_namespaceObject.__)('Sticky posts'),
options: stickyOptions,
@@ -45615,7 +47329,6 @@ function StickyControl({
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/enhanced-pagination-control.js
-
/**
* WordPress dependencies
*/
@@ -45626,6 +47339,8 @@ function StickyControl({
* Internal dependencies
*/
+
+
function EnhancedPaginationControl({
enhancedPagination,
setAttributes,
@@ -45634,33 +47349,38 @@ function EnhancedPaginationControl({
const {
hasUnsupportedBlocks
} = useUnsupportedBlocks(clientId);
+ const fullPageClientSideNavigation = window.__experimentalFullPageClientSideNavigation;
let help = (0,external_wp_i18n_namespaceObject.__)('Browsing between pages requires a full page reload.');
- if (enhancedPagination) {
+ if (fullPageClientSideNavigation) {
+ help = (0,external_wp_i18n_namespaceObject.__)('Experimental full-page client-side navigation setting enabled.');
+ } else if (enhancedPagination) {
help = (0,external_wp_i18n_namespaceObject.__)("Browsing between pages won't require a full page reload, unless non-compatible blocks are detected.");
} 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_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,
- disabled: hasUnsupportedBlocks,
- onChange: value => {
- setAttributes({
- enhancedPagination: !value
- });
- }
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Force page reload'),
+ help: help,
+ checked: !enhancedPagination && !fullPageClientSideNavigation,
+ disabled: hasUnsupportedBlocks || fullPageClientSideNavigation,
+ onChange: value => {
+ setAttributes({
+ enhancedPagination: !value
+ });
+ }
+ })
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/create-new-post-link.js
-
/**
* WordPress dependencies
*/
+
const CreateNewPostLink = ({
attributes: {
query: {
@@ -45668,24 +47388,26 @@ const CreateNewPostLink = ({
} = {}
} = {}
}) => {
- if (!postType) return null;
+ if (!postType) {
+ return null;
+ }
const newPostUrl = (0,external_wp_url_namespaceObject.addQueryArgs)('post-new.php', {
post_type: postType
});
- 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_React_namespaceObject.createElement)("a", {
- href: newPostUrl
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-query__create-new-link",
+ children: (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: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: newPostUrl
+ })
})
- }));
+ });
};
/* harmony default export */ const create_new_post_link = (CreateNewPostLink);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/index.js
-
/**
* WordPress dependencies
*/
@@ -45708,6 +47430,9 @@ const CreateNewPostLink = ({
+
+
+
const {
BlockInfo
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
@@ -45789,105 +47514,118 @@ function QueryInspectorControls(props) {
const showSearchControl = isControlAllowed(allowedControls, 'search');
const showParentControl = isControlAllowed(allowedControls, 'parents') && isPostTypeHierarchical;
const showFiltersPanel = showTaxControl || showAuthorControl || showSearchControl || showParentControl;
- 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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, {
- title: (0,external_wp_i18n_namespaceObject.__)('Settings')
- }, 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.'),
- checked: !!inherit,
- onChange: value => setQuery({
- inherit: !!value
- })
- }), 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_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,
- onChange: value => setDisplayLayout({
- columns: value
- }),
- min: 2,
- max: Math.max(6, displayLayout.columns)
- }), 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_React_namespaceObject.createElement)(order_control, {
- order,
- orderBy,
- onChange: setQuery
- }), showStickyControl && (0,external_React_namespaceObject.createElement)(StickyControl, {
- value: sticky,
- onChange: value => setQuery({
- sticky: value
- })
- }), (0,external_React_namespaceObject.createElement)(EnhancedPaginationControl, {
- enhancedPagination: enhancedPagination,
- setAttributes: setAttributes,
- clientId: clientId
- })), !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: () => {
- setQuery({
- author: '',
- parents: [],
- search: '',
- taxQuery: null
- });
- setQuerySearch('');
- },
- 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_React_namespaceObject.createElement)(TaxonomyControls, {
- onChange: setQuery,
- query: query
- })), 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_React_namespaceObject.createElement)(author_control, {
- value: authorIds,
- onChange: setQuery
- })), showSearchControl && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
- hasValue: () => !!querySearch,
- label: (0,external_wp_i18n_namespaceObject.__)('Keyword'),
- onDeselect: () => setQuerySearch('')
- }, (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
- hasValue: () => !!parents?.length,
- label: (0,external_wp_i18n_namespaceObject.__)('Parents'),
- onDeselect: () => setQuery({
- parents: []
- })
- }, (0,external_React_namespaceObject.createElement)(parent_control, {
- parents: parents,
- postType: postType,
- onChange: setQuery
- }))));
+ const dropdownMenuProps = useToolsPanelDropdownMenuProps();
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockInfo, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(create_new_post_link, {
+ ...props
+ })
+ }), showSettingsPanel && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [showInheritControl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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.'),
+ checked: !!inherit,
+ onChange: value => setQuery({
+ inherit: !!value
+ })
+ }), showPostTypeControl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.RangeControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Columns'),
+ value: displayLayout.columns,
+ onChange: value => setDisplayLayout({
+ columns: value
+ }),
+ min: 2,
+ max: Math.max(6, displayLayout.columns)
+ }), displayLayout.columns > 6 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, {
+ status: "warning",
+ isDismissible: false,
+ children: (0,external_wp_i18n_namespaceObject.__)('This column count exceeds the recommended amount and may cause visual breakage.')
+ })]
+ }), showOrderControl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(order_control, {
+ order,
+ orderBy,
+ onChange: setQuery
+ }), showStickyControl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(StickyControl, {
+ value: sticky,
+ onChange: value => setQuery({
+ sticky: value
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EnhancedPaginationControl, {
+ enhancedPagination: enhancedPagination,
+ setAttributes: setAttributes,
+ clientId: clientId
+ })]
+ }), !inherit && showFiltersPanel && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalToolsPanel, {
+ className: "block-library-query-toolspanel__filters",
+ label: (0,external_wp_i18n_namespaceObject.__)('Filters'),
+ resetAll: () => {
+ setQuery({
+ author: '',
+ parents: [],
+ search: '',
+ taxQuery: null
+ });
+ setQuerySearch('');
+ },
+ dropdownMenuProps: dropdownMenuProps,
+ children: [showTaxControl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Taxonomies'),
+ hasValue: () => Object.values(taxQuery || {}).some(terms => !!terms.length),
+ onDeselect: () => setQuery({
+ taxQuery: null
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TaxonomyControls, {
+ onChange: setQuery,
+ query: query
+ })
+ }), showAuthorControl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
+ hasValue: () => !!authorIds,
+ label: (0,external_wp_i18n_namespaceObject.__)('Authors'),
+ onDeselect: () => setQuery({
+ author: ''
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(author_control, {
+ value: authorIds,
+ onChange: setQuery
+ })
+ }), showSearchControl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
+ hasValue: () => !!querySearch,
+ label: (0,external_wp_i18n_namespaceObject.__)('Keyword'),
+ onDeselect: () => setQuerySearch(''),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Keyword'),
+ value: querySearch,
+ onChange: setQuerySearch
+ })
+ }), showParentControl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
+ hasValue: () => !!parents?.length,
+ label: (0,external_wp_i18n_namespaceObject.__)('Parents'),
+ onDeselect: () => setQuery({
+ parents: []
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(parent_control, {
+ parents: parents,
+ postType: postType,
+ onChange: setQuery
+ })
+ })]
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/edit/enhanced-pagination-modal.js
-
/**
* WordPress dependencies
*/
@@ -45899,6 +47637,8 @@ function QueryInspectorControls(props) {
* Internal dependencies
*/
+
+
const modalDescriptionId = 'wp-block-query-enhanced-pagination-modal__description';
function EnhancedPaginationModal({
clientId,
@@ -45914,7 +47654,7 @@ function EnhancedPaginationModal({
hasUnsupportedBlocks
} = useUnsupportedBlocks(clientId);
(0,external_wp_element_namespaceObject.useEffect)(() => {
- if (enhancedPagination && hasUnsupportedBlocks) {
+ if (enhancedPagination && hasUnsupportedBlocks && !window.__experimentalFullPageClientSideNavigation) {
setAttributes({
enhancedPagination: false
});
@@ -45926,11 +47666,11 @@ function EnhancedPaginationModal({
};
let notice = (0,external_wp_i18n_namespaceObject.__)('If you still want to prevent full page reloads, remove that block, then disable "Force page reload" again in the Query Block settings.');
if (hasBlocksFromPlugins) {
- notice = (0,external_wp_i18n_namespaceObject.__)('Currently, avoiding full page reloads is not possible when non-interactive or non-clientNavigation compatible blocks from plugins are present inside the Query block.') + ' ' + notice;
+ notice = (0,external_wp_i18n_namespaceObject.__)('Currently, avoiding full page reloads is not possible when non-interactive or non-client Navigation compatible blocks from plugins are present inside the Query block.') + ' ' + notice;
} 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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, {
+ return isOpen && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: {
@@ -45939,20 +47679,23 @@ function EnhancedPaginationModal({
role: "alertdialog",
focusOnMount: "firstElement",
isDismissible: false,
- onRequestClose: closeModal
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, {
- alignment: "right",
- spacing: 5
- }, (0,external_React_namespaceObject.createElement)("span", {
- id: modalDescriptionId
- }, notice), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- variant: "primary",
- onClick: closeModal
- }, (0,external_wp_i18n_namespaceObject.__)('OK'))));
+ onRequestClose: closeModal,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
+ alignment: "right",
+ spacing: 5,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ id: modalDescriptionId,
+ children: notice
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ variant: "primary",
+ onClick: closeModal,
+ children: (0,external_wp_i18n_namespaceObject.__)('OK')
+ })]
+ })
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/edit/query-content.js
-
/**
* WordPress dependencies
*/
@@ -45970,6 +47713,9 @@ function EnhancedPaginationModal({
+
+
+
const DEFAULTS_POSTS_PER_PAGE = 3;
const query_content_TEMPLATE = [['core/post-template']];
function QueryContent({
@@ -46061,53 +47807,59 @@ 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_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(EnhancedPaginationModal, {
- attributes: attributes,
- setAttributes: setAttributes,
- clientId: clientId
- }), (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_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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, {
- group: "advanced"
- }, (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>)'),
- value: 'div'
- }, {
- label: '<main>',
- value: 'main'
- }, {
- label: '<section>',
- value: 'section'
- }, {
- label: '<aside>',
- value: 'aside'
- }],
- value: TagName,
- onChange: value => setAttributes({
- tagName: value
- }),
- help: htmlElementMessages[TagName]
- })), (0,external_React_namespaceObject.createElement)(TagName, {
- ...innerBlocksProps
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EnhancedPaginationModal, {
+ attributes: attributes,
+ setAttributes: setAttributes,
+ clientId: clientId
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(QueryInspectorControls, {
+ attributes: attributes,
+ setQuery: updateQuery,
+ setDisplayLayout: updateDisplayLayout,
+ setAttributes: setAttributes,
+ clientId: clientId
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(QueryToolbar, {
+ name: name,
+ clientId: clientId,
+ attributes: attributes,
+ setQuery: updateQuery,
+ openPatternSelectionModal: openPatternSelectionModal
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ group: "advanced",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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>)'),
+ value: 'div'
+ }, {
+ label: '<main>',
+ value: 'main'
+ }, {
+ label: '<section>',
+ value: 'section'
+ }, {
+ label: '<aside>',
+ value: 'aside'
+ }],
+ value: TagName,
+ onChange: value => setAttributes({
+ tagName: value
+ }),
+ help: htmlElementMessages[TagName]
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
+ ...innerBlocksProps
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/edit/query-placeholder.js
-
/**
* WordPress dependencies
*/
@@ -46122,6 +47874,8 @@ function QueryContent({
* Internal dependencies
*/
+
+
function QueryPlaceholder({
attributes,
clientId,
@@ -46155,7 +47909,7 @@ function QueryPlaceholder({
const icon = activeBlockVariation?.icon?.src || activeBlockVariation?.icon || blockType?.icon?.src;
const label = activeBlockVariation?.title || blockType?.title;
if (isStartingBlank) {
- return (0,external_React_namespaceObject.createElement)(QueryVariationPicker, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(QueryVariationPicker, {
clientId: clientId,
attributes: attributes,
setAttributes: setAttributes,
@@ -46163,21 +47917,25 @@ function QueryPlaceholder({
label: label
});
}
- return (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- variant: "primary",
- onClick: openPatternSelectionModal
- }, (0,external_wp_i18n_namespaceObject.__)('Choose')), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- variant: "secondary",
- onClick: () => {
- setIsStartingBlank(true);
- }
- }, (0,external_wp_i18n_namespaceObject.__)('Start blank'))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(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.'),
+ children: [!!hasPatterns && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ variant: "primary",
+ onClick: openPatternSelectionModal,
+ children: (0,external_wp_i18n_namespaceObject.__)('Choose')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ variant: "secondary",
+ onClick: () => {
+ setIsStartingBlank(true);
+ },
+ children: (0,external_wp_i18n_namespaceObject.__)('Start blank')
+ })]
+ })
+ });
}
function QueryVariationPicker({
clientId,
@@ -46191,28 +47949,29 @@ 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_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalBlockVariationPicker, {
- icon: icon,
- label: label,
- variations: scopeVariations,
- onSelect: variation => {
- if (variation.attributes) {
- setAttributes({
- ...variation.attributes,
- query: {
- ...variation.attributes.query,
- postType: attributes.query.postType || variation.attributes.query.postType
- },
- namespace: attributes.namespace
- });
- }
- if (variation.innerBlocks) {
- replaceInnerBlocks(clientId, (0,external_wp_blocks_namespaceObject.createBlocksFromInnerBlocksTemplate)(variation.innerBlocks), false);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalBlockVariationPicker, {
+ icon: icon,
+ label: label,
+ variations: scopeVariations,
+ onSelect: variation => {
+ if (variation.attributes) {
+ setAttributes({
+ ...variation.attributes,
+ query: {
+ ...variation.attributes.query,
+ postType: attributes.query.postType || variation.attributes.query.postType
+ },
+ namespace: attributes.namespace
+ });
+ }
+ if (variation.innerBlocks) {
+ replaceInnerBlocks(clientId, (0,external_wp_blocks_namespaceObject.createBlocksFromInnerBlocksTemplate)(variation.innerBlocks), false);
+ }
}
- }
- }));
+ })
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/utils/search-patterns.js
@@ -46284,7 +48043,6 @@ function searchPatterns(patterns = [], searchValue = '') {
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/edit/pattern-selection-modal.js
-
/**
* WordPress dependencies
*/
@@ -46300,6 +48058,8 @@ function searchPatterns(patterns = [], searchValue = '') {
*/
+
+
function PatternSelectionModal({
clientId,
attributes,
@@ -46331,32 +48091,35 @@ function PatternSelectionModal({
return searchPatterns(blockPatterns, searchValue);
}, [blockPatterns, searchValue]);
const shownBlockPatterns = (0,external_wp_compose_namespaceObject.useAsyncList)(filteredBlockPatterns);
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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_React_namespaceObject.createElement)("div", {
- className: "block-library-query-pattern__selection-content"
- }, (0,external_React_namespaceObject.createElement)("div", {
- className: "block-library-query-pattern__selection-search"
- }, (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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockContextProvider, {
- value: blockPreviewContext
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalBlockPatternsList, {
- blockPatterns: filteredBlockPatterns,
- shownPatterns: shownBlockPatterns,
- onClickPattern: onBlockPatternSelect
- }))));
+ isFullScreen: true,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ className: "block-library-query-pattern__selection-content",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "block-library-query-pattern__selection-search",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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')
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockContextProvider, {
+ value: blockPreviewContext,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalBlockPatternsList, {
+ blockPatterns: filteredBlockPatterns,
+ shownPatterns: shownBlockPatterns,
+ onClickPattern: onBlockPatternSelect
+ })
+ })]
+ })
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/edit/index.js
-
/**
* WordPress dependencies
*/
@@ -46370,6 +48133,9 @@ function PatternSelectionModal({
+
+
+
const QueryEdit = props => {
const {
clientId,
@@ -46378,65 +48144,71 @@ 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_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(Component, {
- ...props,
- openPatternSelectionModal: () => setIsPatternSelectionModalOpen(true)
- }), isPatternSelectionModalOpen && (0,external_React_namespaceObject.createElement)(PatternSelectionModal, {
- clientId: clientId,
- attributes: attributes,
- setIsPatternSelectionModalOpen: setIsPatternSelectionModalOpen
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Component, {
+ ...props,
+ openPatternSelectionModal: () => setIsPatternSelectionModalOpen(true)
+ }), isPatternSelectionModalOpen && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PatternSelectionModal, {
+ clientId: clientId,
+ attributes: attributes,
+ setIsPatternSelectionModalOpen: setIsPatternSelectionModalOpen
+ })]
+ });
};
/* harmony default export */ const query_edit = (QueryEdit);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/save.js
-
/**
* WordPress dependencies
*/
-function QuerySave({
+
+function query_save_save({
attributes: {
tagName: Tag = 'div'
}
}) {
const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
- return (0,external_React_namespaceObject.createElement)(Tag, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, {
...innerBlocksProps
});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/icons.js
-
/**
* WordPress dependencies
*/
-const titleDate = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+
+const titleDate = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 48 48"
-}, (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+ viewBox: "0 0 48 48",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
+ d: "M41 9H7v3h34V9zm-22 5H7v1h12v-1zM7 26h12v1H7v-1zm34-5H7v3h34v-3zM7 38h12v1H7v-1zm34-5H7v3h34v-3z"
+ })
+});
+const titleExcerpt = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 48 48"
-}, (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+ viewBox: "0 0 48 48",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 48 48"
-}, (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+ viewBox: "0 0 48 48",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 48 48"
-}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, {
- d: "M7 9h34v6H7V9zm12 8H7v1h12v-1zm18 3H7v1h30v-1zm0 18H7v1h30v-1zM7 35h12v1H7v-1zm34-8H7v6h34v-6z"
-}));
+ viewBox: "0 0 48 48",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
+ d: "M7 9h34v6H7V9zm12 8H7v1h12v-1zm18 3H7v1h30v-1zm0 18H7v1h30v-1zM7 35h12v1H7v-1zm34-8H7v6h34v-6z"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/variations.js
/**
@@ -46485,12 +48257,7 @@ const query_variations_variations = [{
}
},
scope: ['inserter'],
- isActive: ({
- namespace,
- query
- }) => {
- return namespace === 'core/posts-list' && query.postType === 'post';
- }
+ isActive: ['namespace', 'query.postType']
}, {
name: 'title-date',
title: (0,external_wp_i18n_namespaceObject.__)('Title & Date'),
@@ -46531,7 +48298,6 @@ const query_variations_variations = [{
/* harmony default export */ const query_variations = (query_variations_variations);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/deprecated.js
-
/**
* WordPress dependencies
*/
@@ -46542,6 +48308,7 @@ const query_variations_variations = [{
* Internal dependencies
*/
+
const {
cleanEmptyObject: deprecated_cleanEmptyObject
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
@@ -46761,7 +48528,7 @@ const query_deprecated_v1 = {
return migrateDisplayLayout(newAttributes, innerBlocks);
},
save() {
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
}
};
@@ -46828,7 +48595,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_React_namespaceObject.createElement)(Tag, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, {
...innerBlocksProps
});
}
@@ -46906,7 +48673,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_React_namespaceObject.createElement)(Tag, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, {
...innerBlocksProps
});
}
@@ -46968,7 +48735,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_React_namespaceObject.createElement)(Tag, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, {
...innerBlocksProps
});
},
@@ -47030,7 +48797,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_React_namespaceObject.createElement)(Tag, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, {
...innerBlocksProps
});
},
@@ -47121,7 +48888,7 @@ const {
const query_settings = {
icon: library_loop,
edit: query_edit,
- save: QuerySave,
+ save: query_save_save,
variations: query_variations,
deprecated: query_deprecated
};
@@ -47132,12 +48899,12 @@ const query_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-no-results/edit.js
-
/**
* WordPress dependencies
*/
+
const query_no_results_edit_TEMPLATE = [['core/paragraph', {
placeholder: (0,external_wp_i18n_namespaceObject.__)('Add text or blocks that will display when a query returns no results.')
}]];
@@ -47146,19 +48913,19 @@ function QueryNoResultsEdit() {
const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
template: query_no_results_edit_TEMPLATE
});
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
...innerBlocksProps
});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-no-results/save.js
-
/**
* WordPress dependencies
*/
-function QueryNoResultsSave() {
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null);
+
+function query_no_results_save_save() {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-no-results/index.js
@@ -47216,7 +48983,7 @@ const {
const query_no_results_settings = {
icon: library_loop,
edit: QueryNoResultsEdit,
- save: QueryNoResultsSave
+ save: query_no_results_save_save
};
const query_no_results_init = () => initBlock({
name: query_no_results_name,
@@ -47225,47 +48992,49 @@ const query_no_results_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-pagination/query-pagination-arrow-controls.js
-
/**
* WordPress dependencies
*/
+
+
function QueryPaginationArrowControls({
value,
onChange
}) {
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControl, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(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_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_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_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')
- }));
+ isBlock: true,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
+ value: "none",
+ label: (0,external_wp_i18n_namespaceObject._x)('None', 'Arrow option for Query Pagination Next/Previous blocks')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
+ value: "arrow",
+ label: (0,external_wp_i18n_namespaceObject._x)('Arrow', 'Arrow option for Query Pagination Next/Previous blocks')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
+ value: "chevron",
+ label: (0,external_wp_i18n_namespaceObject._x)('Chevron', 'Arrow option for Query Pagination Next/Previous blocks')
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-pagination/query-pagination-label-control.js
-
/**
* WordPress dependencies
*/
+
function QueryPaginationLabelControl({
value,
onChange
}) {
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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".'),
@@ -47275,7 +49044,6 @@ function QueryPaginationLabelControl({
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-pagination/edit.js
-
/**
* WordPress dependencies
*/
@@ -47290,6 +49058,9 @@ function QueryPaginationLabelControl({
*/
+
+
+
const query_pagination_edit_TEMPLATE = [['core/query-pagination-previous'], ['core/query-pagination-numbers'], ['core/query-pagination-next']];
function edit_QueryPaginationEdit({
attributes: {
@@ -47324,50 +49095,56 @@ function edit_QueryPaginationEdit({
});
}
}, [paginationArrow, setAttributes, showLabel]);
- 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_React_namespaceObject.createElement)(QueryPaginationArrowControls, {
- value: paginationArrow,
- onChange: value => {
- setAttributes({
- paginationArrow: value
- });
- }
- }), paginationArrow !== 'none' && (0,external_React_namespaceObject.createElement)(QueryPaginationLabelControl, {
- value: showLabel,
- onChange: value => {
- setAttributes({
- showLabel: value
- });
- }
- }))), (0,external_React_namespaceObject.createElement)("nav", {
- ...innerBlocksProps
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [hasNextPreviousBlocks && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(QueryPaginationArrowControls, {
+ value: paginationArrow,
+ onChange: value => {
+ setAttributes({
+ paginationArrow: value
+ });
+ }
+ }), paginationArrow !== 'none' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(QueryPaginationLabelControl, {
+ value: showLabel,
+ onChange: value => {
+ setAttributes({
+ showLabel: value
+ });
+ }
+ })]
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("nav", {
+ ...innerBlocksProps
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-pagination/save.js
-
/**
* WordPress dependencies
*/
+
function query_pagination_save_save() {
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-pagination/deprecated.js
-
/**
* WordPress dependencies
*/
+
const query_pagination_deprecated_deprecated = [
// Version with wrapper `div` element.
{
save() {
- return (0,external_React_namespaceObject.createElement)("div", {
- ...external_wp_blockEditor_namespaceObject.useBlockProps.save()
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...external_wp_blockEditor_namespaceObject.useBlockProps.save(),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
+ });
}
}];
/* harmony default export */ const query_pagination_deprecated = (query_pagination_deprecated_deprecated);
@@ -47467,12 +49244,13 @@ const query_pagination_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-pagination-next/edit.js
-
/**
* WordPress dependencies
*/
+
+
const query_pagination_next_edit_arrowMap = {
none: '',
arrow: '→',
@@ -47489,23 +49267,25 @@ function QueryPaginationNextEdit({
}
}) {
const displayArrow = query_pagination_next_edit_arrowMap[paginationArrow];
- return (0,external_React_namespaceObject.createElement)("a", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("a", {
href: "#pagination-next-pseudo-link",
onClick: event => event.preventDefault(),
- ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)()
- }, 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'),
- placeholder: (0,external_wp_i18n_namespaceObject.__)('Next Page'),
- value: label,
- onChange: newLabel => setAttributes({
- label: newLabel
- })
- }), displayArrow && (0,external_React_namespaceObject.createElement)("span", {
- className: `wp-block-query-pagination-next-arrow is-arrow-${paginationArrow}`,
- "aria-hidden": true
- }, displayArrow));
+ ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(),
+ children: [showLabel && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.PlainText, {
+ __experimentalVersion: 2,
+ tagName: "span",
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Next page link'),
+ placeholder: (0,external_wp_i18n_namespaceObject.__)('Next Page'),
+ value: label,
+ onChange: newLabel => setAttributes({
+ label: newLabel
+ })
+ }), displayArrow && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ className: `wp-block-query-pagination-next-arrow is-arrow-${paginationArrow}`,
+ "aria-hidden": true,
+ children: displayArrow
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-pagination-next/index.js
@@ -47577,16 +49357,18 @@ const query_pagination_next_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-pagination-numbers/edit.js
-
/**
* WordPress dependencies
*/
-const createPaginationItem = (content, Tag = 'a', extraClass = '') => (0,external_React_namespaceObject.createElement)(Tag, {
- key: content,
- className: `page-numbers ${extraClass}`
+
+
+
+const createPaginationItem = (content, Tag = 'a', extraClass = '') => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, {
+ className: `page-numbers ${extraClass}`,
+ children: content
}, content);
const previewPaginationNumbers = midSize => {
const paginationItems = [];
@@ -47609,7 +49391,9 @@ const previewPaginationNumbers = midSize => {
// Last pagination item.
paginationItems.push(createPaginationItem(midSize * 2 + 3));
- return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, paginationItems);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: paginationItems
+ });
};
function QueryPaginationNumbersEdit({
attributes,
@@ -47619,23 +49403,29 @@ function QueryPaginationNumbersEdit({
midSize
} = attributes;
const paginationNumbers = previewPaginationNumbers(parseInt(midSize, 10));
- 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.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,
- onChange: value => {
- setAttributes({
- midSize: parseInt(value, 10)
- });
- },
- min: 0,
- max: 5,
- withInputField: false
- }))), (0,external_React_namespaceObject.createElement)("div", {
- ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)()
- }, paginationNumbers));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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,
+ onChange: value => {
+ setAttributes({
+ midSize: parseInt(value, 10)
+ });
+ },
+ min: 0,
+ max: 5,
+ withInputField: false
+ })
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(),
+ children: paginationNumbers
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-pagination-numbers/index.js
@@ -47709,12 +49499,13 @@ const query_pagination_numbers_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-pagination-previous/edit.js
-
/**
* WordPress dependencies
*/
+
+
const query_pagination_previous_edit_arrowMap = {
none: '',
arrow: '←',
@@ -47731,23 +49522,25 @@ function QueryPaginationPreviousEdit({
}
}) {
const displayArrow = query_pagination_previous_edit_arrowMap[paginationArrow];
- return (0,external_React_namespaceObject.createElement)("a", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("a", {
href: "#pagination-previous-pseudo-link",
onClick: event => event.preventDefault(),
- ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)()
- }, displayArrow && (0,external_React_namespaceObject.createElement)("span", {
- className: `wp-block-query-pagination-previous-arrow is-arrow-${paginationArrow}`,
- "aria-hidden": true
- }, 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'),
- placeholder: (0,external_wp_i18n_namespaceObject.__)('Previous Page'),
- value: label,
- onChange: newLabel => setAttributes({
- label: newLabel
- })
- }));
+ ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(),
+ children: [displayArrow && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ className: `wp-block-query-pagination-previous-arrow is-arrow-${paginationArrow}`,
+ "aria-hidden": true,
+ children: displayArrow
+ }), showLabel && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.PlainText, {
+ __experimentalVersion: 2,
+ tagName: "span",
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Previous page link'),
+ placeholder: (0,external_wp_i18n_namespaceObject.__)('Previous Page'),
+ value: label,
+ onChange: newLabel => setAttributes({
+ label: newLabel
+ })
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-pagination-previous/index.js
@@ -47819,7 +49612,6 @@ const query_pagination_previous_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-title/edit.js
-
/**
* External dependencies
*/
@@ -47832,6 +49624,9 @@ const query_pagination_previous_init = () => initBlock({
+
+
+
const SUPPORTED_TYPES = ['archive', 'search'];
function QueryTitleEdit({
attributes: {
@@ -47861,14 +49656,17 @@ function QueryTitleEdit({
});
const TagName = `h${level}`;
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()('wp-block-query-title__placeholder', {
+ className: dist_clsx('wp-block-query-title__placeholder', {
[`has-text-align-${textAlign}`]: textAlign
})
});
if (!SUPPORTED_TYPES.includes(type)) {
- return (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Provided type is not supported.')));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, {
+ children: (0,external_wp_i18n_namespaceObject.__)('Provided type is not supported.')
+ })
+ });
}
let titleElement;
if (type === 'archive') {
@@ -47891,48 +49689,63 @@ function QueryTitleEdit({
} else {
title = showPrefix ? (0,external_wp_i18n_namespaceObject.__)('Archive type: Name') : (0,external_wp_i18n_namespaceObject.__)('Archive title');
}
- 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_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_React_namespaceObject.createElement)(TagName, {
- ...blockProps
- }, title));
+ titleElement = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Show archive type in title'),
+ onChange: () => setAttributes({
+ showPrefix: !showPrefix
+ }),
+ checked: showPrefix
+ })
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
+ ...blockProps,
+ children: title
+ })]
+ });
}
if (type === 'search') {
- 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_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_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_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, {
- group: "block"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.HeadingLevelDropdown, {
- value: level,
- onChange: newLevel => setAttributes({
- level: newLevel
- })
- }), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
- value: textAlign,
- onChange: nextAlign => {
- setAttributes({
- textAlign: nextAlign
- });
- }
- })), titleElement);
+ titleElement = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Show search term in title'),
+ onChange: () => setAttributes({
+ showSearchTerm: !showSearchTerm
+ }),
+ checked: showSearchTerm
+ })
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
+ ...blockProps,
+ children: showSearchTerm ? (0,external_wp_i18n_namespaceObject.__)('Search results for: “search term”') : (0,external_wp_i18n_namespaceObject.__)('Search results')
+ })]
+ });
+ }
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.HeadingLevelDropdown, {
+ value: level,
+ onChange: newLevel => setAttributes({
+ level: newLevel
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
+ value: textAlign,
+ onChange: nextAlign => {
+ setAttributes({
+ textAlign: nextAlign
+ });
+ }
+ })]
+ }), titleElement]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query-title/variations.js
@@ -47969,7 +49782,9 @@ const query_title_variations_variations = [{
* Block by providing its attributes.
*/
query_title_variations_variations.forEach(variation => {
- if (variation.isActive) return;
+ if (variation.isActive) {
+ return;
+ }
variation.isActive = (blockAttributes, variationAttributes) => blockAttributes.type === variationAttributes.type;
});
/* harmony default export */ const query_title_variations = (query_title_variations_variations);
@@ -48119,21 +49934,21 @@ const query_title_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/quote.js
-
/**
* WordPress dependencies
*/
-const quote = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const quote = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_quote = (quote);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/deprecated.js
-
/**
* External dependencies
*/
@@ -48144,6 +49959,8 @@ const quote = (0,external_React_namespaceObject.createElement)(external_wp_primi
*/
+
+
const migrateToQuoteV2 = attributes => {
const {
value,
@@ -48167,6 +49984,107 @@ const migrateToQuoteV2 = attributes => {
content
})) : (0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph')];
};
+const deprecated_TEXT_ALIGN_OPTIONS = ['left', 'right', 'center'];
+
+// Migrate existing text alignment settings to the renamed attribute.
+const deprecated_migrateTextAlign = (attributes, innerBlocks) => {
+ const {
+ align,
+ ...rest
+ } = attributes;
+ // Check if there are valid alignments stored in the old attribute
+ // and assign them to the new attribute name.
+ const migratedAttributes = deprecated_TEXT_ALIGN_OPTIONS.includes(align) ? {
+ ...rest,
+ textAlign: align
+ } : attributes;
+ return [migratedAttributes, innerBlocks];
+};
+
+// Migrate the v2 blocks with style === `2`;
+const migrateLargeStyle = (attributes, innerBlocks) => {
+ return [{
+ ...attributes,
+ className: attributes.className ? attributes.className + ' is-style-large' : 'is-style-large'
+ }, innerBlocks];
+};
+
+// Version before the 'align' attribute was replaced with 'textAlign'.
+const quote_deprecated_v4 = {
+ attributes: {
+ value: {
+ type: 'string',
+ source: 'html',
+ selector: 'blockquote',
+ multiline: 'p',
+ default: '',
+ __experimentalRole: 'content'
+ },
+ citation: {
+ type: 'string',
+ source: 'html',
+ selector: 'cite',
+ default: '',
+ __experimentalRole: 'content'
+ },
+ align: {
+ type: 'string'
+ }
+ },
+ supports: {
+ anchor: true,
+ html: false,
+ __experimentalOnEnter: true,
+ __experimentalOnMerge: true,
+ typography: {
+ fontSize: true,
+ lineHeight: true,
+ __experimentalFontFamily: true,
+ __experimentalFontWeight: true,
+ __experimentalFontStyle: true,
+ __experimentalTextTransform: true,
+ __experimentalTextDecoration: true,
+ __experimentalLetterSpacing: true,
+ __experimentalDefaultControls: {
+ fontSize: true,
+ fontAppearance: true
+ }
+ },
+ color: {
+ gradients: true,
+ heading: true,
+ link: true,
+ __experimentalDefaultControls: {
+ background: true,
+ text: true
+ }
+ }
+ },
+ isEligible: ({
+ align
+ }) => deprecated_TEXT_ALIGN_OPTIONS.includes(align),
+ save({
+ attributes
+ }) {
+ const {
+ align,
+ citation
+ } = attributes;
+ const className = dist_clsx({
+ [`has-text-align-${align}`]: align
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", {
+ ...external_wp_blockEditor_namespaceObject.useBlockProps.save({
+ className
+ }),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "cite",
+ value: citation
+ })]
+ });
+ },
+ migrate: deprecated_migrateTextAlign
+};
const quote_deprecated_v3 = {
attributes: {
value: {
@@ -48212,22 +50130,25 @@ const quote_deprecated_v3 = {
value,
citation
} = attributes;
- const className = classnames_default()({
+ const className = dist_clsx({
[`has-text-align-${align}`]: align
});
- return (0,external_React_namespaceObject.createElement)("blockquote", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className
- })
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- multiline: true,
- value: value
- }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "cite",
- value: citation
- }));
+ }),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ multiline: true,
+ value: value
+ }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "cite",
+ value: citation
+ })]
+ });
},
- migrate: migrateToQuoteV2
+ migrate(attributes) {
+ return deprecated_migrateTextAlign(...migrateToQuoteV2(attributes));
+ }
};
const quote_deprecated_v2 = {
attributes: {
@@ -48248,7 +50169,9 @@ const quote_deprecated_v2 = {
type: 'string'
}
},
- migrate: migrateToQuoteV2,
+ migrate(attributes) {
+ return deprecated_migrateTextAlign(...migrateToQuoteV2(attributes));
+ },
save({
attributes
}) {
@@ -48257,17 +50180,18 @@ const quote_deprecated_v2 = {
value,
citation
} = attributes;
- return (0,external_React_namespaceObject.createElement)("blockquote", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", {
style: {
textAlign: align ? align : null
- }
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- multiline: true,
- value: value
- }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "cite",
- value: citation
- }));
+ },
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ multiline: true,
+ value: value
+ }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "cite",
+ value: citation
+ })]
+ });
}
};
const quote_deprecated_v1 = {
@@ -48299,12 +50223,9 @@ const quote_deprecated_v1 = {
style,
...restAttributes
} = attributes;
- return migrateToQuoteV2({
- ...restAttributes,
- className: attributes.className ? attributes.className + ' is-style-large' : 'is-style-large'
- });
+ return deprecated_migrateTextAlign(...migrateLargeStyle(...migrateToQuoteV2(restAttributes)));
}
- return migrateToQuoteV2(attributes);
+ return deprecated_migrateTextAlign(...migrateToQuoteV2(attributes));
},
save({
attributes
@@ -48315,18 +50236,19 @@ const quote_deprecated_v1 = {
citation,
style
} = attributes;
- return (0,external_React_namespaceObject.createElement)("blockquote", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", {
className: style === 2 ? 'is-large' : '',
style: {
textAlign: align ? align : null
- }
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- multiline: true,
- value: value
- }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "cite",
- value: citation
- }));
+ },
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ multiline: true,
+ value: value
+ }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "cite",
+ value: citation
+ })]
+ });
}
};
const quote_deprecated_v0 = {
@@ -48358,11 +50280,9 @@ const quote_deprecated_v0 = {
style,
...restAttributes
} = attributes;
- return migrateToQuoteV2({
- ...restAttributes
- });
+ return deprecated_migrateTextAlign(...migrateToQuoteV2(restAttributes));
}
- return migrateToQuoteV2(attributes);
+ return deprecated_migrateTextAlign(...migrateToQuoteV2(attributes));
},
save({
attributes
@@ -48373,18 +50293,19 @@ const quote_deprecated_v0 = {
citation,
style
} = attributes;
- return (0,external_React_namespaceObject.createElement)("blockquote", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", {
className: `blocks-quote-style-${style}`,
style: {
textAlign: align ? align : null
- }
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- multiline: true,
- value: value
- }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "footer",
- value: citation
- }));
+ },
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ multiline: true,
+ value: value
+ }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "footer",
+ value: citation
+ })]
+ });
}
};
@@ -48396,10 +50317,24 @@ const quote_deprecated_v0 = {
*
* See block-deprecation.md
*/
-/* harmony default export */ const quote_deprecated = ([quote_deprecated_v3, quote_deprecated_v2, quote_deprecated_v1, quote_deprecated_v0]);
+/* harmony default export */ const quote_deprecated = ([quote_deprecated_v4, quote_deprecated_v3, quote_deprecated_v2, quote_deprecated_v1, quote_deprecated_v0]);
-;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/edit.js
+;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/verse.js
+/**
+ * WordPress dependencies
+ */
+
+
+const verse = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
+ viewBox: "0 0 24 24",
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_verse = (verse);
+;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/edit.js
/**
* External dependencies
*/
@@ -48420,6 +50355,10 @@ const quote_deprecated_v0 = {
* Internal dependencies
*/
+
+
+
+
const edit_isWebPlatform = external_wp_element_namespaceObject.Platform.OS === 'web';
const quote_edit_TEMPLATE = [['core/paragraph', {}]];
@@ -48462,23 +50401,16 @@ function QuoteEdit({
insertBlocksAfter,
clientId,
className,
- style
+ style,
+ isSelected
}) {
const {
- align,
- citation
+ textAlign
} = attributes;
edit_useMigrateOnLoad(attributes, clientId);
- const hasSelection = (0,external_wp_data_namespaceObject.useSelect)(select => {
- const {
- isBlockSelected,
- hasSelectedInnerBlock
- } = select(external_wp_blockEditor_namespaceObject.store);
- return hasSelectedInnerBlock(clientId) || isBlockSelected(clientId);
- }, []);
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()(className, {
- [`has-text-align-${align}`]: align
+ className: dist_clsx(className, {
+ [`has-text-align-${textAlign}`]: textAlign
}),
...(!edit_isWebPlatform && {
style
@@ -48487,47 +50419,52 @@ function QuoteEdit({
const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
template: quote_edit_TEMPLATE,
templateInsertUpdatesSelection: true,
- __experimentalCaptureToolbars: true
+ __experimentalCaptureToolbars: true,
+ renderAppender: false
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
+ value: textAlign,
+ onChange: nextAlign => {
+ setAttributes({
+ textAlign: nextAlign
+ });
+ }
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.BlockQuotation, {
+ ...innerBlocksProps,
+ children: [innerBlocksProps.children, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Caption, {
+ attributeKey: "citation",
+ tagName: edit_isWebPlatform ? 'cite' : 'p',
+ style: edit_isWebPlatform && {
+ display: 'block'
+ },
+ isSelected: isSelected,
+ attributes: attributes,
+ setAttributes: setAttributes,
+ __unstableMobileNoFocusOnMount: true,
+ icon: library_verse,
+ label: (0,external_wp_i18n_namespaceObject.__)('Quote citation'),
+ placeholder:
+ // translators: placeholder text used for the
+ // citation
+ (0,external_wp_i18n_namespaceObject.__)('Add citation'),
+ addLabel: (0,external_wp_i18n_namespaceObject.__)('Add citation'),
+ removeLabel: (0,external_wp_i18n_namespaceObject.__)('Remove citation'),
+ excludeElementClassName: true,
+ className: "wp-block-quote__citation",
+ insertBlocksAfter: insertBlocksAfter,
+ ...(!edit_isWebPlatform ? {
+ textAlign
+ } : {})
+ })]
+ })]
});
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
- value: align,
- onChange: nextAlign => {
- setAttributes({
- align: nextAlign
- });
- }
- })), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.BlockQuotation, {
- ...innerBlocksProps
- }, 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: {
- display: 'block'
- },
- value: citation,
- onChange: nextCitation => {
- setAttributes({
- citation: nextCitation
- });
- },
- __unstableMobileNoFocusOnMount: true,
- "aria-label": (0,external_wp_i18n_namespaceObject.__)('Quote citation'),
- placeholder:
- // translators: placeholder text used for the
- // citation
- (0,external_wp_i18n_namespaceObject.__)('Add citation'),
- className: "wp-block-quote__citation",
- __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())),
- ...(!edit_isWebPlatform ? {
- textAlign: align
- } : {})
- })));
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/save.js
-
/**
* External dependencies
*/
@@ -48537,24 +50474,27 @@ function QuoteEdit({
* WordPress dependencies
*/
+
+
function quote_save_save({
attributes
}) {
const {
- align,
+ textAlign,
citation
} = attributes;
- const className = classnames_default()({
- [`has-text-align-${align}`]: align
+ const className = dist_clsx({
+ [`has-text-align-${textAlign}`]: textAlign
});
- return (0,external_React_namespaceObject.createElement)("blockquote", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className
- })
- }, (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
- }));
+ }),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "cite",
+ value: citation
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/transforms.js
@@ -48715,7 +50655,7 @@ const quote_metadata = {
selector: "cite",
__experimentalRole: "content"
},
- align: {
+ textAlign: {
type: "string"
}
},
@@ -48798,23 +50738,23 @@ const quote_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/symbol.js
-
/**
* WordPress dependencies
*/
-const symbol = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const symbol = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ 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
-
/**
* External dependencies
*/
@@ -48832,36 +50772,22 @@ const external_wp_patterns_namespaceObject = window["wp"]["patterns"];
-
/**
* Internal dependencies
*/
+
+
+
const {
useLayoutClasses
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
const {
- PARTIAL_SYNCING_SUPPORTED_BLOCKS
+ isOverridableBlock,
+ hasOverridableBlocks
} = 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)(() => {
@@ -48886,88 +50812,9 @@ 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');
+ const editMode = mode || (isOverridableBlock(block) ? 'contentOnly' : 'disabled');
setEditMode(block.clientId, editMode);
setBlockEditMode(setEditMode, block.innerBlocks,
// Disable editing for nested patterns.
@@ -48976,10 +50823,14 @@ function setBlockEditMode(setEditMode, blocks, mode) {
}
function RecursionWarning() {
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
- return (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Block cannot be rendered inside itself.')));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, {
+ children: (0,external_wp_i18n_namespaceObject.__)('Block cannot be rendered inside itself.')
+ })
+ });
}
+const edit_NOOP = () => {};
// Wrap the main Edit function for the pattern block with a recursion wrapper
// that allows short-circuiting rendering as early as possible, before any
@@ -48990,13 +50841,14 @@ function ReusableBlockEditRecursionWrapper(props) {
} = props.attributes;
const hasAlreadyRendered = (0,external_wp_blockEditor_namespaceObject.useHasRecursion)(ref);
if (hasAlreadyRendered) {
- return (0,external_React_namespaceObject.createElement)(RecursionWarning, null);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(RecursionWarning, {});
}
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RecursionProvider, {
- uniqueId: ref
- }, (0,external_React_namespaceObject.createElement)(ReusableBlockEdit, {
- ...props
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RecursionProvider, {
+ uniqueId: ref,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ReusableBlockEdit, {
+ ...props
+ })
+ });
}
function ReusableBlockEdit({
name,
@@ -49008,32 +50860,21 @@ function ReusableBlockEdit({
clientId: patternClientId,
setAttributes
}) {
- const registry = (0,external_wp_data_namespaceObject.useRegistry)();
const {
record,
- editedRecord,
hasResolved
} = (0,external_wp_coreData_namespaceObject.useEntityRecord)('postType', 'wp_block', ref);
+ const [blocks] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)('postType', 'wp_block', {
+ id: ref
+ });
const isMissing = hasResolved && !record;
-
- // 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
+ setBlockEditingMode,
+ __unstableMarkLastChangeAsPersistent
} = (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
@@ -49049,12 +50890,11 @@ function ReusableBlockEdit({
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,
+ innerBlocks: getBlocks(patternClientId),
userCanEdit: canEdit,
getBlockEditingMode: _getBlockEditingMode,
onNavigateToEntityRecord: getSettings().onNavigateToEntityRecord,
@@ -49069,71 +50909,29 @@ function ReusableBlockEdit({
// 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 canOverrideBlocks = (0,external_wp_element_namespaceObject.useMemo)(() => hasPatternOverridesSource && hasOverridableBlocks(blocks), [hasPatternOverridesSource, blocks]);
const {
alignment,
layout
- } = useInferredLayout(innerBlocks, parentLayout);
+ } = useInferredLayout(blocks, parentLayout);
const layoutClasses = useLayoutClasses({
layout
}, name);
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()('block-library-block__reusable-block-container', layout && layoutClasses, {
+ className: dist_clsx('block-library-block__reusable-block-container', layout && layoutClasses, {
[`align${alignment}`]: alignment
})
});
+
+ // Use `blocks` variable until `innerBlocks` is populated, which has the proper clientIds.
const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
templateLock: 'all',
layout,
- renderAppender: innerBlocks?.length ? undefined : external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender
+ value: innerBlocks.length > 0 ? innerBlocks : blocks,
+ onInput: edit_NOOP,
+ onChange: edit_NOOP,
+ renderAppender: blocks?.length ? undefined : blocks.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,
@@ -49142,27 +50940,48 @@ function ReusableBlockEdit({
};
const resetContent = () => {
if (content) {
- replaceInnerBlocks(patternClientId, initialBlocks);
+ // Make sure any previous changes are persisted before resetting.
+ __unstableMarkLastChangeAsPersistent();
+ setAttributes({
+ content: undefined
+ });
}
};
let children = null;
if (isMissing) {
- children = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Block has been deleted or is unavailable.'));
+ children = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, {
+ children: (0,external_wp_i18n_namespaceObject.__)('Block has been deleted or is unavailable.')
+ });
}
if (!hasResolved) {
- 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_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, 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));
+ children = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {})
+ });
+ }
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [userCanEdit && onNavigateToEntityRecord && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
+ onClick: handleEditOriginal,
+ children: (0,external_wp_i18n_namespaceObject.__)('Edit original')
+ })
+ })
+ }), canOverrideBlocks && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
+ onClick: resetContent,
+ disabled: !content,
+ __experimentalIsFocusable: true,
+ children: (0,external_wp_i18n_namespaceObject.__)('Reset')
+ })
+ })
+ }), children === null ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...innerBlocksProps
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: children
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/block/deprecated.js
@@ -49312,9 +51131,13 @@ const block_metadata = {
type: "number"
},
content: {
- type: "object"
+ type: "object",
+ "default": {}
}
},
+ providesContext: {
+ "pattern/overrides": "content"
+ },
supports: {
customClassName: false,
html: false,
@@ -49355,7 +51178,6 @@ const block_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/read-more/edit.js
-
/**
* WordPress dependencies
*/
@@ -49363,6 +51185,9 @@ const block_init = () => initBlock({
+
+
+
function ReadMore({
attributes: {
content,
@@ -49372,27 +51197,33 @@ function ReadMore({
insertBlocksAfter
}) {
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
- 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.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_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'),
- value: content,
- onChange: newValue => setAttributes({
- content: newValue
- }),
- __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())),
- withoutInteractiveFormatting: true,
- ...blockProps
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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'
+ })
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
+ identifier: "content",
+ tagName: "a",
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('“Read more” link text'),
+ placeholder: (0,external_wp_i18n_namespaceObject.__)('Read more'),
+ value: content,
+ onChange: newValue => setAttributes({
+ content: newValue
+ }),
+ __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())),
+ withoutInteractiveFormatting: true,
+ ...blockProps
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/read-more/index.js
@@ -49480,21 +51311,21 @@ const read_more_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/rss.js
-
/**
* WordPress dependencies
*/
-const rss = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const rss = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_rss = (rss);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/rss/edit.js
-
/**
* WordPress dependencies
*/
@@ -49505,6 +51336,9 @@ const rss = (0,external_React_namespaceObject.createElement)(external_wp_primiti
+
+
+
const DEFAULT_MIN_ITEMS = 1;
const DEFAULT_MAX_ITEMS = 20;
function RSSEdit({
@@ -49540,30 +51374,36 @@ function RSSEdit({
}
}
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
+ const label = (0,external_wp_i18n_namespaceObject.__)('RSS URL');
if (isEditing) {
- return (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, {
- icon: library_rss,
- label: "RSS"
- }, (0,external_React_namespaceObject.createElement)("form", {
- onSubmit: onSubmitURL,
- className: "wp-block-rss__placeholder-form"
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
- wrap: 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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- __next40pxDefaultSize: true,
- variant: "primary",
- type: "submit"
- }, (0,external_wp_i18n_namespaceObject.__)('Use URL'))))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, {
+ icon: library_rss,
+ label: label,
+ instructions: (0,external_wp_i18n_namespaceObject.__)('Display entries from any RSS or Atom feed.'),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("form", {
+ onSubmit: onSubmitURL,
+ className: "wp-block-rss__placeholder-form",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalInputControl, {
+ __next40pxDefaultSize: true,
+ label: label,
+ hideLabelFromVision: true,
+ placeholder: (0,external_wp_i18n_namespaceObject.__)('Enter URL here…'),
+ value: feedURL,
+ onChange: value => setAttributes({
+ feedURL: value
+ }),
+ className: "wp-block-rss__placeholder-input"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ __next40pxDefaultSize: true,
+ variant: "primary",
+ type: "submit",
+ children: (0,external_wp_i18n_namespaceObject.__)('Apply')
+ })]
+ })
+ })
+ });
}
const toolbarControls = [{
icon: library_edit,
@@ -49571,77 +51411,87 @@ function RSSEdit({
onClick: () => setIsEditing(true)
}, {
icon: library_list,
- title: (0,external_wp_i18n_namespaceObject.__)('List view'),
+ title: (0,external_wp_i18n_namespaceObject._x)('List view', 'RSS block display setting'),
onClick: () => setAttributes({
blockLayout: 'list'
}),
isActive: blockLayout === 'list'
}, {
icon: library_grid,
- title: (0,external_wp_i18n_namespaceObject.__)('Grid view'),
+ title: (0,external_wp_i18n_namespaceObject._x)('Grid view', 'RSS block display setting'),
onClick: () => setAttributes({
blockLayout: 'grid'
}),
isActive: blockLayout === 'grid'
}];
- 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_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.RangeControl, {
- __nextHasNoMarginBottom: true,
- __next40pxDefaultSize: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Number of items'),
- value: itemsToShow,
- onChange: value => setAttributes({
- itemsToShow: value
- }),
- min: DEFAULT_MIN_ITEMS,
- max: DEFAULT_MAX_ITEMS,
- required: true
- }), (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_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_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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, {
- __nextHasNoMarginBottom: true,
- __next40pxDefaultSize: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Max number of words in excerpt'),
- value: excerptLength,
- onChange: value => setAttributes({
- excerptLength: value
- }),
- min: 10,
- max: 100,
- required: true
- }), blockLayout === 'grid' && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, {
- __nextHasNoMarginBottom: true,
- __next40pxDefaultSize: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Columns'),
- value: columns,
- onChange: value => setAttributes({
- columns: value
- }),
- min: 2,
- max: 6,
- required: true
- }))), (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (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
- }))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, {
+ controls: toolbarControls
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.RangeControl, {
+ __nextHasNoMarginBottom: true,
+ __next40pxDefaultSize: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Number of items'),
+ value: itemsToShow,
+ onChange: value => setAttributes({
+ itemsToShow: value
+ }),
+ min: DEFAULT_MIN_ITEMS,
+ max: DEFAULT_MAX_ITEMS,
+ required: true
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Display author'),
+ checked: displayAuthor,
+ onChange: toggleAttribute('displayAuthor')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Display date'),
+ checked: displayDate,
+ onChange: toggleAttribute('displayDate')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Display excerpt'),
+ checked: displayExcerpt,
+ onChange: toggleAttribute('displayExcerpt')
+ }), displayExcerpt && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.RangeControl, {
+ __nextHasNoMarginBottom: true,
+ __next40pxDefaultSize: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Max number of words in excerpt'),
+ value: excerptLength,
+ onChange: value => setAttributes({
+ excerptLength: value
+ }),
+ min: 10,
+ max: 100,
+ required: true
+ }), blockLayout === 'grid' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.RangeControl, {
+ __nextHasNoMarginBottom: true,
+ __next40pxDefaultSize: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Columns'),
+ value: columns,
+ onChange: value => setAttributes({
+ columns: value
+ }),
+ min: 2,
+ max: 6,
+ required: true
+ })]
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)((external_wp_serverSideRender_default()), {
+ block: "core/rss",
+ attributes: attributes
+ })
+ })
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/rss/index.js
@@ -49728,127 +51578,135 @@ const rss_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/search.js
-
/**
* WordPress dependencies
*/
-const search = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const search = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_search = (search);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/search/icons.js
-
/**
* WordPress dependencies
*/
-const buttonOnly = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+
+
+const buttonOnly = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 24 24"
-}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, {
- x: "7",
- y: "10",
- width: "10",
- height: "4",
- rx: "1",
- fill: "currentColor"
-}));
-const buttonOutside = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Rect, {
+ x: "7",
+ y: "10",
+ width: "10",
+ height: "4",
+ rx: "1",
+ fill: "currentColor"
+ })
+});
+const buttonOutside = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 24 24"
-}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, {
- x: "4.75",
- y: "15.25",
- width: "6.5",
- height: "9.5",
- transform: "rotate(-90 4.75 15.25)",
- stroke: "currentColor",
- strokeWidth: "1.5",
- fill: "none"
-}), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, {
- x: "16",
- y: "10",
- width: "4",
- height: "4",
- rx: "1",
- fill: "currentColor"
-}));
-const buttonInside = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+ viewBox: "0 0 24 24",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Rect, {
+ x: "4.75",
+ y: "15.25",
+ width: "6.5",
+ height: "9.5",
+ transform: "rotate(-90 4.75 15.25)",
+ stroke: "currentColor",
+ strokeWidth: "1.5",
+ fill: "none"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Rect, {
+ x: "16",
+ y: "10",
+ width: "4",
+ height: "4",
+ rx: "1",
+ fill: "currentColor"
+ })]
+});
+const buttonInside = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 24 24"
-}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, {
- x: "4.75",
- y: "15.25",
- width: "6.5",
- height: "14.5",
- transform: "rotate(-90 4.75 15.25)",
- stroke: "currentColor",
- strokeWidth: "1.5",
- fill: "none"
-}), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, {
- x: "14",
- y: "10",
- width: "4",
- height: "4",
- rx: "1",
- fill: "currentColor"
-}));
-const noButton = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+ viewBox: "0 0 24 24",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Rect, {
+ x: "4.75",
+ y: "15.25",
+ width: "6.5",
+ height: "14.5",
+ transform: "rotate(-90 4.75 15.25)",
+ stroke: "currentColor",
+ strokeWidth: "1.5",
+ fill: "none"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Rect, {
+ x: "14",
+ y: "10",
+ width: "4",
+ height: "4",
+ rx: "1",
+ fill: "currentColor"
+ })]
+});
+const noButton = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 24 24"
-}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, {
- x: "4.75",
- y: "15.25",
- width: "6.5",
- height: "14.5",
- transform: "rotate(-90 4.75 15.25)",
- stroke: "currentColor",
- fill: "none",
- strokeWidth: "1.5"
-}));
-const buttonWithIcon = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Rect, {
+ x: "4.75",
+ y: "15.25",
+ width: "6.5",
+ height: "14.5",
+ transform: "rotate(-90 4.75 15.25)",
+ stroke: "currentColor",
+ fill: "none",
+ strokeWidth: "1.5"
+ })
+});
+const buttonWithIcon = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 24 24"
-}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, {
- x: "4.75",
- y: "7.75",
- width: "14.5",
- height: "8.5",
- rx: "1.25",
- stroke: "currentColor",
- fill: "none",
- strokeWidth: "1.5"
-}), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, {
- x: "8",
- y: "11",
- width: "8",
- height: "2",
- fill: "currentColor"
-}));
-const toggleLabel = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+ viewBox: "0 0 24 24",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Rect, {
+ x: "4.75",
+ y: "7.75",
+ width: "14.5",
+ height: "8.5",
+ rx: "1.25",
+ stroke: "currentColor",
+ fill: "none",
+ strokeWidth: "1.5"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Rect, {
+ x: "8",
+ y: "11",
+ width: "8",
+ height: "2",
+ fill: "currentColor"
+ })]
+});
+const toggleLabel = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 24 24"
-}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, {
- x: "4.75",
- y: "17.25",
- width: "5.5",
- height: "14.5",
- transform: "rotate(-90 4.75 17.25)",
- stroke: "currentColor",
- fill: "none",
- strokeWidth: "1.5"
-}), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Rect, {
- x: "4",
- y: "7",
- width: "10",
- height: "2",
- fill: "currentColor"
-}));
+ viewBox: "0 0 24 24",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Rect, {
+ x: "4.75",
+ y: "17.25",
+ width: "5.5",
+ height: "14.5",
+ transform: "rotate(-90 4.75 17.25)",
+ stroke: "currentColor",
+ fill: "none",
+ strokeWidth: "1.5"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Rect, {
+ x: "4",
+ y: "7",
+ width: "10",
+ height: "2",
+ fill: "currentColor"
+ })]
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/search/utils.js
/**
@@ -49870,7 +51728,6 @@ function utils_isPercentageUnit(unit) {
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/search/edit.js
-
/**
* External dependencies
*/
@@ -49896,6 +51753,9 @@ 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';
function SearchEdit({
className,
@@ -49940,13 +51800,19 @@ function SearchEdit({
}
}, [__unstableMarkNextChangeAsNotPersistent, wasJustInsertedIntoNavigationBlock, setAttributes]);
const borderRadius = style?.border?.radius;
- const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes);
+ let borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes);
// Check for old deprecated numerical border radius. Done as a separate
// check so that a borderRadius style won't overwrite the longhand
// per-corner styles.
if (typeof borderRadius === 'number') {
- borderProps.style.borderRadius = `${borderRadius}px`;
+ borderProps = {
+ ...borderProps,
+ style: {
+ ...borderProps.style,
+ borderRadius: `${borderRadius}px`
+ }
+ };
}
const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseColorProps)(attributes);
const [fluidTypographySettings, layout] = (0,external_wp_blockEditor_namespaceObject.useSettings)('typography.fluid', 'layout');
@@ -49991,7 +51857,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 && isSearchFieldHidden ? 'wp-block-search__searchfield-hidden' : undefined);
+ return dist_clsx(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',
@@ -50061,7 +51927,7 @@ function SearchEdit({
};
const renderTextField = () => {
// If the input is inside the wrapper, the wrapper gets the border color styles/classes, not the input control.
- const textFieldClasses = classnames_default()('wp-block-search__input', isButtonPositionInside ? undefined : borderProps.className, typographyProps.className);
+ const textFieldClasses = dist_clsx('wp-block-search__input', isButtonPositionInside ? undefined : borderProps.className, typographyProps.className);
const textFieldStyles = {
...(isButtonPositionInside ? {
borderRadius
@@ -50069,7 +51935,7 @@ function SearchEdit({
...typographyProps.style,
textDecoration: undefined
};
- return (0,external_React_namespaceObject.createElement)("input", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("input", {
type: "search",
className: textFieldClasses,
style: textFieldStyles,
@@ -50088,7 +51954,7 @@ function SearchEdit({
};
const renderButton = () => {
// If the button is inside the wrapper, the wrapper gets the border color styles/classes, not the button.
- const buttonClasses = classnames_default()('wp-block-search__button', colorProps.className, typographyProps.className, isButtonPositionInside ? undefined : borderProps.className, buttonUseIcon ? 'has-icon' : undefined, (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('button'));
+ const buttonClasses = dist_clsx('wp-block-search__button', colorProps.className, typographyProps.className, isButtonPositionInside ? undefined : borderProps.className, buttonUseIcon ? 'has-icon' : undefined, (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('button'));
const buttonStyles = {
...colorProps.style,
...typographyProps.style,
@@ -50103,89 +51969,104 @@ function SearchEdit({
});
}
};
- 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_React_namespaceObject.createElement)(build_module_icon, {
- icon: library_search
- })), !buttonUseIcon && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, {
- className: buttonClasses,
- style: buttonStyles,
- "aria-label": (0,external_wp_i18n_namespaceObject.__)('Button text'),
- placeholder: (0,external_wp_i18n_namespaceObject.__)('Add button text…'),
- withoutInteractiveFormatting: true,
- value: buttonText,
- onChange: html => setAttributes({
- buttonText: html
- }),
- onClick: handleButtonClick
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [buttonUseIcon && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("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,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, {
+ icon: library_search
+ })
+ }), !buttonUseIcon && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
+ identifier: "buttonText",
+ className: buttonClasses,
+ style: buttonStyles,
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Button text'),
+ placeholder: (0,external_wp_i18n_namespaceObject.__)('Add button text…'),
+ withoutInteractiveFormatting: true,
+ value: buttonText,
+ onChange: html => setAttributes({
+ buttonText: html
+ }),
+ onClick: handleButtonClick
+ })]
+ });
};
- 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: () => {
- setAttributes({
- showLabel: !showLabel
- });
- },
- className: showLabel ? 'is-pressed' : undefined
- }), (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, {
- title: (0,external_wp_i18n_namespaceObject.__)('Use button with icon'),
- icon: buttonWithIcon,
- onClick: () => {
- setAttributes({
- buttonUseIcon: !buttonUseIcon
- });
- },
- className: buttonUseIcon ? 'is-pressed' : undefined
- }))), (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl, {
- label: (0,external_wp_i18n_namespaceObject.__)('Width'),
- id: unitControlInputId
- }, (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,
- step: 1,
- onChange: newWidth => {
- const filteredWidth = widthUnit === '%' && parseInt(newWidth, 10) > 100 ? 100 : newWidth;
- setAttributes({
- width: parseInt(filteredWidth, 10)
- });
- },
- onUnitChange: newUnit => {
- setAttributes({
- width: '%' === newUnit ? PC_WIDTH_DEFAULT : PX_WIDTH_DEFAULT,
- widthUnit: newUnit
- });
- },
- __unstableInputWidth: '80px',
- value: `${width}${widthUnit}`,
- units: units
- }), (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- key: widthValue,
- size: "small",
- variant: widthValue === width && widthUnit === '%' ? 'primary' : undefined,
- onClick: () => setAttributes({
- width: widthValue,
- widthUnit: '%'
+ const controls = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.ToolbarGroup, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Toggle search label'),
+ icon: toggleLabel,
+ onClick: () => {
+ setAttributes({
+ showLabel: !showLabel
+ });
+ },
+ className: showLabel ? 'is-pressed' : undefined
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarDropdownMenu, {
+ icon: getButtonPositionIcon(),
+ label: (0,external_wp_i18n_namespaceObject.__)('Change button position'),
+ controls: buttonPositionControls
+ }), !hasNoButton && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Use button with icon'),
+ icon: buttonWithIcon,
+ onClick: () => {
+ setAttributes({
+ buttonUseIcon: !buttonUseIcon
+ });
+ },
+ className: buttonUseIcon ? 'is-pressed' : undefined
+ })]
})
- }, widthValue, "%");
- }))))));
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.BaseControl, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Width'),
+ id: unitControlInputId,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalUnitControl, {
+ id: unitControlInputId,
+ min: utils_isPercentageUnit(widthUnit) ? 0 : MIN_WIDTH,
+ max: utils_isPercentageUnit(widthUnit) ? 100 : undefined,
+ step: 1,
+ onChange: newWidth => {
+ const filteredWidth = widthUnit === '%' && parseInt(newWidth, 10) > 100 ? 100 : newWidth;
+ setAttributes({
+ width: parseInt(filteredWidth, 10)
+ });
+ },
+ onUnitChange: newUnit => {
+ setAttributes({
+ width: '%' === newUnit ? PC_WIDTH_DEFAULT : PX_WIDTH_DEFAULT,
+ widthUnit: newUnit
+ });
+ },
+ __unstableInputWidth: "80px",
+ value: `${width}${widthUnit}`,
+ units: units
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ButtonGroup, {
+ className: "wp-block-search__components-button-group",
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Percentage Width'),
+ children: [25, 50, 75, 100].map(widthValue => {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Button, {
+ size: "small",
+ variant: widthValue === width && widthUnit === '%' ? 'primary' : undefined,
+ onClick: () => setAttributes({
+ width: widthValue,
+ widthUnit: '%'
+ }),
+ children: [widthValue, "%"]
+ }, widthValue);
+ })
+ })]
+ })
+ })
+ })]
+ });
const padBorderRadius = radius => radius ? `calc(${radius} + ${DEFAULT_INNER_PADDING})` : undefined;
const getWrapperStyles = () => {
const styles = isButtonPositionInside ? borderProps.style : {
@@ -50236,42 +52117,47 @@ function SearchEdit({
textDecoration: undefined
}
});
- const labelClassnames = classnames_default()('wp-block-search__label', typographyProps.className);
- return (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, 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…'),
- withoutInteractiveFormatting: true,
- value: label,
- onChange: html => setAttributes({
- label: html
- }),
- style: typographyProps.style
- }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ResizableBox, {
- size: {
- width: `${width}${widthUnit}`
- },
- className: classnames_default()('wp-block-search__inside-wrapper', isButtonPositionInside ? borderProps.className : undefined),
- style: getWrapperStyles(),
- minWidth: MIN_WIDTH,
- enable: getResizableSides(),
- onResizeStart: (event, direction, elt) => {
- setAttributes({
- width: parseInt(elt.offsetWidth, 10),
- widthUnit: 'px'
- });
- toggleSelection(false);
- },
- onResizeStop: (event, direction, elt, delta) => {
- setAttributes({
- width: parseInt(width + delta.width, 10)
- });
- toggleSelection(true);
- },
- showHandle: isSelected
- }, (isButtonPositionInside || isButtonPositionOutside || hasOnlyButton) && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, renderTextField(), renderButton()), hasNoButton && renderTextField()));
+ const labelClassnames = dist_clsx('wp-block-search__label', typographyProps.className);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ ...blockProps,
+ children: [controls, showLabel && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
+ identifier: "label",
+ className: labelClassnames,
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Label text'),
+ placeholder: (0,external_wp_i18n_namespaceObject.__)('Add label…'),
+ withoutInteractiveFormatting: true,
+ value: label,
+ onChange: html => setAttributes({
+ label: html
+ }),
+ style: typographyProps.style
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.ResizableBox, {
+ size: {
+ width: `${width}${widthUnit}`
+ },
+ className: dist_clsx('wp-block-search__inside-wrapper', isButtonPositionInside ? borderProps.className : undefined),
+ style: getWrapperStyles(),
+ minWidth: MIN_WIDTH,
+ enable: getResizableSides(),
+ onResizeStart: (event, direction, elt) => {
+ setAttributes({
+ width: parseInt(elt.offsetWidth, 10),
+ widthUnit: 'px'
+ });
+ toggleSelection(false);
+ },
+ onResizeStop: (event, direction, elt, delta) => {
+ setAttributes({
+ width: parseInt(width + delta.width, 10)
+ });
+ toggleSelection(true);
+ },
+ showHandle: isSelected,
+ children: [(isButtonPositionInside || isButtonPositionOutside || hasOnlyButton) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [renderTextField(), renderButton()]
+ }), hasNoButton && renderTextField()]
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/search/variations.js
@@ -50417,17 +52303,18 @@ const search_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/separator.js
-
/**
* WordPress dependencies
*/
-const separator = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const separator = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "M4.5 12.5v4H3V7h1.5v3.987h15V7H21v9.5h-1.5v-4h-15Z"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
+ d: "M4.5 12.5v4H3V7h1.5v3.987h15V7H21v9.5h-1.5v-4h-15Z"
+ })
+});
/* harmony default export */ const library_separator = (separator);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/separator/use-deprecated-opacity.js
@@ -50464,7 +52351,6 @@ function useDeprecatedOpacity(opacity, currentColor, setAttributes) {
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/separator/edit.js
-
/**
* External dependencies
*/
@@ -50480,6 +52366,8 @@ function useDeprecatedOpacity(opacity, currentColor, setAttributes) {
* Internal dependencies
*/
+
+
function SeparatorEdit({
attributes,
setAttributes
@@ -50497,7 +52385,7 @@ function SeparatorEdit({
// The dots styles uses text for the dots, to change those dots color is
// using color, not backgroundColor.
const colorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('color', backgroundColor);
- const className = classnames_default()({
+ const className = dist_clsx({
'has-text-color': backgroundColor || currentColor,
[colorClass]: colorClass,
'has-css-opacity': opacity === 'css',
@@ -50507,16 +52395,17 @@ function SeparatorEdit({
color: currentColor,
backgroundColor: currentColor
};
- 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
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.HorizontalRule, {
+ ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({
+ className,
+ style: hasCustomColor ? styles : undefined
+ })
})
- }));
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/separator/save.js
-
/**
* External dependencies
*/
@@ -50526,6 +52415,7 @@ function SeparatorEdit({
* WordPress dependencies
*/
+
function separatorSave({
attributes
}) {
@@ -50542,7 +52432,7 @@ function separatorSave({
// The dots styles uses text for the dots, to change those dots color is
// using color, not backgroundColor.
const colorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('color', backgroundColor);
- const className = classnames_default()({
+ const className = dist_clsx({
'has-text-color': backgroundColor || customColor,
[colorClass]: colorClass,
'has-css-opacity': opacity === 'css',
@@ -50552,7 +52442,7 @@ function separatorSave({
backgroundColor: colorProps?.style?.backgroundColor,
color: colorClass ? undefined : customColor
};
- return (0,external_React_namespaceObject.createElement)("hr", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("hr", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className,
style: styles
@@ -50581,7 +52471,6 @@ const separator_transforms_transforms = {
/* harmony default export */ const separator_transforms = (separator_transforms_transforms);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/separator/deprecated.js
-
/**
* External dependencies
*/
@@ -50591,6 +52480,7 @@ const separator_transforms_transforms = {
* WordPress dependencies
*/
+
const separator_deprecated_v1 = {
attributes: {
color: {
@@ -50614,7 +52504,7 @@ const separator_deprecated_v1 = {
// the dots styles uses text for the dots, to change those dots color is
// using color, not backgroundColor
const colorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('color', color);
- const className = classnames_default()({
+ const className = dist_clsx({
'has-text-color has-background': color || customColor,
[backgroundClass]: backgroundClass,
[colorClass]: colorClass
@@ -50623,7 +52513,7 @@ const separator_deprecated_v1 = {
backgroundColor: backgroundClass ? undefined : customColor,
color: colorClass ? undefined : customColor
};
- return (0,external_React_namespaceObject.createElement)("hr", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("hr", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className,
style
@@ -50737,21 +52627,21 @@ const separator_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/shortcode.js
-
/**
* WordPress dependencies
*/
-const shortcode = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const shortcode = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_shortcode = (shortcode);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/shortcode/edit.js
-
/**
* WordPress dependencies
*/
@@ -50759,43 +52649,45 @@ const shortcode = (0,external_React_namespaceObject.createElement)(external_wp_p
+
+
function ShortcodeEdit({
attributes,
setAttributes
}) {
const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(ShortcodeEdit);
const inputId = `blocks-shortcode-input-${instanceId}`;
- return (0,external_React_namespaceObject.createElement)("div", {
- ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: 'components-placeholder'
- })
- }, (0,external_React_namespaceObject.createElement)("label", {
- htmlFor: inputId,
- className: "components-placeholder__label"
- }, (0,external_React_namespaceObject.createElement)(build_module_icon, {
- icon: library_shortcode
- }), (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,
- "aria-label": (0,external_wp_i18n_namespaceObject.__)('Shortcode text'),
- placeholder: (0,external_wp_i18n_namespaceObject.__)('Write shortcode here…'),
- onChange: text => setAttributes({
- text
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, {
+ icon: library_shortcode,
+ label: (0,external_wp_i18n_namespaceObject.__)('Shortcode'),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.PlainText, {
+ className: "blocks-shortcode__textarea",
+ id: inputId,
+ value: attributes.text,
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Shortcode text'),
+ placeholder: (0,external_wp_i18n_namespaceObject.__)('Write shortcode here…'),
+ onChange: text => setAttributes({
+ text
+ })
+ })
})
- }));
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/shortcode/save.js
-
/**
* WordPress dependencies
*/
+
function shortcode_save_save({
attributes
}) {
- return (0,external_React_namespaceObject.createElement)(external_wp_element_namespaceObject.RawHTML, null, attributes.text);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, {
+ children: attributes.text
+ });
}
;// CONCATENATED MODULE: external ["wp","autop"]
@@ -50882,21 +52774,21 @@ const shortcode_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/site-logo.js
-
/**
* WordPress dependencies
*/
-const siteLogo = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const siteLogo = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const site_logo = (siteLogo);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/site-logo/edit.js
-
/**
* External dependencies
*/
@@ -50921,9 +52813,7 @@ const siteLogo = (0,external_React_namespaceObject.createElement)(external_wp_pr
*/
-/**
- * Module constants
- */
+
const site_logo_edit_ALLOWED_MEDIA_TYPES = ['image'];
const ACCEPT_MEDIA_STRING = 'image/*';
@@ -50937,7 +52827,6 @@ const SiteLogo = ({
linkTarget,
shouldSyncIcon
},
- containerRef,
isSelected,
setAttributes,
setLogo,
@@ -50948,7 +52837,6 @@ const SiteLogo = ({
setIcon,
canUserEdit
}) => {
- const clientWidth = useClientWidth(containerRef, [align]);
const isLargeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium');
const isWideAligned = ['wide', 'full'].includes(align);
const isResizable = !isWideAligned && isLargeViewport;
@@ -50960,9 +52848,6 @@ const SiteLogo = ({
const {
toggleSelection
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
- const classes = classnames_default()('custom-logo-link', {
- 'is-transient': (0,external_wp_blob_namespaceObject.isBlobURL)(logoUrl)
- });
const {
imageEditing,
maxWidth,
@@ -50997,44 +52882,45 @@ const SiteLogo = ({
function onResizeStop() {
toggleSelection(true);
}
- const img = (0,external_React_namespaceObject.createElement)("img", {
- className: "custom-logo",
- src: logoUrl,
- alt: alt,
- onLoad: event => {
- setNaturalSize({
- naturalWidth: event.target.naturalWidth,
- naturalHeight: event.target.naturalHeight
- });
- }
+ const img = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ className: "custom-logo",
+ src: logoUrl,
+ alt: alt,
+ onLoad: event => {
+ setNaturalSize({
+ naturalWidth: event.target.naturalWidth,
+ naturalHeight: event.target.naturalHeight
+ });
+ }
+ }), (0,external_wp_blob_namespaceObject.isBlobURL)(logoUrl) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {})]
});
let imgWrapper = img;
// Disable reason: Image itself is not meant to be interactive, but
// 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_React_namespaceObject.createElement)("a", {
+ imgWrapper =
+ /*#__PURE__*/
+ /* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */
+ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
href: siteUrl,
- className: classes,
+ className: "custom-logo-link",
rel: "home",
title: title,
- onClick: event => event.preventDefault()
- }, img)
+ onClick: event => event.preventDefault(),
+ children: 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_React_namespaceObject.createElement)("div", {
+ if (!isResizable || !naturalWidth || !naturalHeight) {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
style: {
width,
height
- }
- }, imgWrapper);
+ },
+ children: imgWrapper
+ });
}
// Set the default width to a responsible size.
@@ -51086,12 +52972,11 @@ const SiteLogo = ({
/* eslint-enable no-lonely-if */
const canEditImage = logoId && naturalWidth && naturalHeight && imageEditing;
- const imgEdit = canEditImage && isEditingImage ? (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalImageEditor, {
+ const imgEdit = canEditImage && isEditingImage ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalImageEditor, {
id: logoId,
url: logoUrl,
width: currentWidth,
height: currentHeight,
- clientWidth: clientWidth,
naturalHeight: naturalHeight,
naturalWidth: naturalWidth,
onSaveImage: imageAttributes => {
@@ -51100,7 +52985,7 @@ const SiteLogo = ({
onFinishEditing: () => {
setIsEditingImage(false);
}
- }) : (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ResizableBox, {
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ResizableBox, {
size: {
width: currentWidth,
height: currentHeight
@@ -51124,8 +53009,9 @@ const SiteLogo = ({
width: parseInt(currentWidth + delta.width, 10),
height: parseInt(currentHeight + delta.height, 10)
});
- }
- }, imgWrapper);
+ },
+ children: 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.
@@ -51133,59 +53019,70 @@ const SiteLogo = ({
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:
+ /*#__PURE__*/
// eslint-disable-next-line jsx-a11y/anchor-has-content
- (0,external_React_namespaceObject.createElement)("a", {
+ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
href: siteIconSettingsUrl,
target: "_blank",
rel: "noopener noreferrer"
})
});
- 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.RangeControl, {
- __nextHasNoMarginBottom: true,
- __next40pxDefaultSize: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Image width'),
- onChange: newWidth => setAttributes({
- width: newWidth
- }),
- min: minWidth,
- max: maxWidthBuffer,
- initialPosition: Math.min(defaultWidth, maxWidthBuffer),
- value: width || '',
- disabled: !isResizable
- }), (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_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_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'),
- onChange: value => {
- setAttributes({
- shouldSyncIcon: value
- });
- setIcon(value ? logoId : undefined);
- },
- checked: !!shouldSyncIcon,
- help: syncSiteIconHelpText
- })))), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, {
- group: "block"
- }, 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')
- })), imgEdit);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.RangeControl, {
+ __nextHasNoMarginBottom: true,
+ __next40pxDefaultSize: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Image width'),
+ onChange: newWidth => setAttributes({
+ width: newWidth
+ }),
+ min: minWidth,
+ max: maxWidthBuffer,
+ initialPosition: Math.min(defaultWidth, maxWidthBuffer),
+ value: width || '',
+ disabled: !isResizable
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Link image to home'),
+ onChange: () => setAttributes({
+ isLink: !isLink
+ }),
+ checked: isLink
+ }), isLink && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Use as Site Icon'),
+ onChange: value => {
+ setAttributes({
+ shouldSyncIcon: value
+ });
+ setIcon(value ? logoId : undefined);
+ },
+ checked: !!shouldSyncIcon,
+ help: syncSiteIconHelpText
+ })
+ })]
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: canEditImage && !isEditingImage && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
+ onClick: () => setIsEditingImage(true),
+ icon: library_crop,
+ label: (0,external_wp_i18n_namespaceObject.__)('Crop')
+ })
+ }), imgEdit]
+ });
};
// This is a light wrapper around MediaReplaceFlow because the block has two
@@ -51194,13 +53091,15 @@ function SiteLogoReplaceFlow({
onRemoveLogo,
...mediaReplaceProps
}) {
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, {
...mediaReplaceProps,
allowedTypes: site_logo_edit_ALLOWED_MEDIA_TYPES,
- accept: ACCEPT_MEDIA_STRING
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
- onClick: onRemoveLogo
- }, (0,external_wp_i18n_namespaceObject.__)('Reset')));
+ accept: ACCEPT_MEDIA_STRING,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
+ onClick: onRemoveLogo,
+ children: (0,external_wp_i18n_namespaceObject.__)('Reset')
+ })
+ });
}
const InspectorLogoPreview = ({
mediaItemData = {},
@@ -51213,21 +53112,25 @@ const InspectorLogoPreview = ({
media_details: logoMediaDetails
} = mediaItemData;
const logoLabel = logoMediaDetails?.sizes?.full?.file || logoSlug;
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalItemGroup, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalItemGroup, {
...itemGroupProps,
- as: "span"
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
- justify: "flex-start",
- as: "span"
- }, (0,external_React_namespaceObject.createElement)("img", {
- src: logoUrl,
- alt: alt
- }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, {
- as: "span"
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalTruncate, {
- numberOfLines: 1,
- className: "block-library-site-logo__inspector-media-replace-title"
- }, logoLabel))));
+ as: "span",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
+ justify: "flex-start",
+ as: "span",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
+ src: logoUrl,
+ alt: alt
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
+ as: "span",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalTruncate, {
+ numberOfLines: 1,
+ className: "block-library-site-logo__inspector-media-replace-title",
+ children: logoLabel
+ })
+ })]
+ })
+ });
};
function LogoEdit({
attributes,
@@ -51239,7 +53142,6 @@ function LogoEdit({
width,
shouldSyncIcon
} = attributes;
- const ref = (0,external_wp_element_namespaceObject.useRef)();
const {
siteLogoId,
canUserEdit,
@@ -51276,6 +53178,7 @@ function LogoEdit({
const {
getSettings
} = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
+ const [temporaryURL, setTemporaryURL] = (0,external_wp_element_namespaceObject.useState)();
const {
editEntityRecord
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
@@ -51320,6 +53223,7 @@ function LogoEdit({
}
if (!media.id && media.url) {
// This is a temporary blob image.
+ setTemporaryURL(media.url);
setLogo(undefined);
return;
}
@@ -51338,6 +53242,7 @@ function LogoEdit({
createErrorNotice(message, {
type: 'snackbar'
});
+ setTemporaryURL();
};
const onFilesDrop = filesList => {
getSettings().mediaUpload({
@@ -51345,6 +53250,7 @@ function LogoEdit({
filesList,
onFileChange([image]) {
if ((0,external_wp_blob_namespaceObject.isBlobURL)(image?.url)) {
+ setTemporaryURL(image.url);
return;
}
onInitialSelectLogo(image);
@@ -51358,109 +53264,130 @@ function LogoEdit({
onError: onUploadError,
onRemoveLogo
};
- const controls = canUserEdit && logoUrl && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, {
- group: "other"
- }, (0,external_React_namespaceObject.createElement)(SiteLogoReplaceFlow, {
- ...mediaReplaceFlowProps
- }));
+ const controls = canUserEdit && logoUrl && !temporaryURL && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "other",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SiteLogoReplaceFlow, {
+ ...mediaReplaceFlowProps
+ })
+ });
let logoImage;
const isLoading = siteLogoId === undefined || isRequestingMediaItem;
if (isLoading) {
- logoImage = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null);
+ logoImage = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {});
}
- if (!!logoUrl) {
- logoImage = (0,external_React_namespaceObject.createElement)(SiteLogo, {
- alt: alt,
- attributes: attributes,
- className: className,
- containerRef: ref,
- isSelected: isSelected,
- setAttributes: setAttributes,
- logoUrl: logoUrl,
- setLogo: setLogo,
- logoId: mediaItemData?.id || siteLogoId,
- siteUrl: url,
- setIcon: setIcon,
- iconId: siteIconId,
- canUserEdit: canUserEdit
+
+ // Reset temporary url when logoUrl is available.
+ (0,external_wp_element_namespaceObject.useEffect)(() => {
+ if (logoUrl && temporaryURL) {
+ setTemporaryURL();
+ }
+ }, [logoUrl, temporaryURL]);
+ if (!!logoUrl || !!temporaryURL) {
+ logoImage = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SiteLogo, {
+ alt: alt,
+ attributes: attributes,
+ className: className,
+ isSelected: isSelected,
+ setAttributes: setAttributes,
+ logoUrl: temporaryURL || logoUrl,
+ setLogo: setLogo,
+ logoId: mediaItemData?.id || siteLogoId,
+ siteUrl: url,
+ setIcon: setIcon,
+ iconId: siteIconId,
+ canUserEdit: canUserEdit
+ })
});
}
const placeholder = content => {
- const placeholderClassName = classnames_default()('block-editor-media-placeholder', className);
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, {
+ const placeholderClassName = dist_clsx('block-editor-media-placeholder', className);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, {
className: placeholderClassName,
preview: logoImage,
withIllustration: true,
style: {
width
- }
- }, content);
+ },
+ children: content
+ });
};
- const classes = classnames_default()(className, {
- 'is-default-size': !width
+ const classes = dist_clsx(className, {
+ 'is-default-size': !width,
+ 'is-transient': temporaryURL
});
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- ref,
className: classes
});
const label = (0,external_wp_i18n_namespaceObject.__)('Add a site logo');
- 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_React_namespaceObject.createElement)("div", {
- className: "block-library-site-logo__inspector-media-replace-container"
- }, !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_React_namespaceObject.createElement)(SiteLogoReplaceFlow, {
- ...mediaReplaceFlowProps,
- name: (0,external_React_namespaceObject.createElement)(InspectorLogoPreview, {
- mediaItemData: mediaItemData
- }),
- popoverProps: {}
- }), 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_React_namespaceObject.createElement)("div", {
- className: "block-library-site-logo__inspector-upload-container"
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- onClick: open,
- variant: "secondary"
- }, 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_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, controls, mediaInspectorPanel, !!logoUrl && logoImage, !logoUrl && !canUserEdit && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, {
- className: "site-logo_placeholder"
- }, !!isLoading && (0,external_React_namespaceObject.createElement)("span", {
- className: "components-placeholder__preview"
- }, (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,
- onError: onUploadError,
- placeholder: placeholder,
- mediaLibraryButton: ({
- open
- }) => {
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- icon: library_upload,
- variant: "primary",
- label: label,
- showTooltip: true,
- tooltipPosition: "top center",
- onClick: () => {
- open();
- }
- });
- }
- }));
+ const mediaInspectorPanel = (canUserEdit || logoUrl) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Media'),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ className: "block-library-site-logo__inspector-media-replace-container",
+ children: [!canUserEdit && !!logoUrl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(InspectorLogoPreview, {
+ mediaItemData: mediaItemData,
+ itemGroupProps: {
+ isBordered: true,
+ className: 'block-library-site-logo__inspector-readonly-logo-preview'
+ }
+ }), canUserEdit && !!logoUrl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SiteLogoReplaceFlow, {
+ ...mediaReplaceFlowProps,
+ name: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(InspectorLogoPreview, {
+ mediaItemData: mediaItemData
+ }),
+ popoverProps: {}
+ }), canUserEdit && !logoUrl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaUploadCheck, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaUpload, {
+ onSelect: onInitialSelectLogo,
+ allowedTypes: site_logo_edit_ALLOWED_MEDIA_TYPES,
+ render: ({
+ open
+ }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ className: "block-library-site-logo__inspector-upload-container",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ onClick: open,
+ variant: "secondary",
+ children: isLoading ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) : (0,external_wp_i18n_namespaceObject.__)('Add media')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.DropZone, {
+ onFilesDrop: onFilesDrop
+ })]
+ })
+ })
+ })]
+ })
+ })
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ ...blockProps,
+ children: [controls, mediaInspectorPanel, (!!logoUrl || !!temporaryURL) && logoImage, !temporaryURL && !logoUrl && !canUserEdit && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, {
+ className: "site-logo_placeholder",
+ children: !!isLoading && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ className: "components-placeholder__preview",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {})
+ })
+ }), !temporaryURL && !logoUrl && canUserEdit && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, {
+ onSelect: onInitialSelectLogo,
+ accept: ACCEPT_MEDIA_STRING,
+ allowedTypes: site_logo_edit_ALLOWED_MEDIA_TYPES,
+ onError: onUploadError,
+ placeholder: placeholder,
+ mediaLibraryButton: ({
+ open
+ }) => {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ icon: library_upload,
+ variant: "primary",
+ label: label,
+ showTooltip: true,
+ tooltipPosition: "top center",
+ onClick: () => {
+ open();
+ }
+ });
+ }
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/site-logo/transforms.js
@@ -51577,7 +53504,6 @@ const site_logo_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/site-tagline/edit.js
-
/**
* External dependencies
*/
@@ -51591,13 +53517,18 @@ const site_logo_init = () => initBlock({
+
+
+
+const HEADING_LEVELS = [0, 1, 2, 3, 4, 5, 6];
function SiteTaglineEdit({
attributes,
setAttributes,
insertBlocksAfter
}) {
const {
- textAlign
+ textAlign,
+ level
} = attributes;
const {
canUserEdit,
@@ -51616,6 +53547,7 @@ function SiteTaglineEdit({
tagline: canEdit ? settings?.description : readOnlySettings?.description
};
}, []);
+ const TagName = level === 0 ? 'p' : `h${level}`;
const {
editEntityRecord
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
@@ -51625,47 +53557,58 @@ function SiteTaglineEdit({
});
}
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()({
+ className: dist_clsx({
[`has-text-align-${textAlign}`]: textAlign,
'wp-block-site-tagline__placeholder': !canUserEdit && !tagline
})
});
- const siteTaglineContent = canUserEdit ? (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, {
+ const siteTaglineContent = canUserEdit ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
allowedFormats: [],
onChange: setTagline,
"aria-label": (0,external_wp_i18n_namespaceObject.__)('Site tagline text'),
placeholder: (0,external_wp_i18n_namespaceObject.__)('Write site tagline…'),
- tagName: "p",
+ tagName: TagName,
value: tagline,
disableLineBreaks: true,
__unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())),
...blockProps
- }) : (0,external_React_namespaceObject.createElement)("p", {
- ...blockProps
- }, tagline || (0,external_wp_i18n_namespaceObject.__)('Site Tagline 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
- onChange: newAlign => setAttributes({
- textAlign: newAlign
- }),
- value: textAlign
- })), siteTaglineContent);
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
+ ...blockProps,
+ children: tagline || (0,external_wp_i18n_namespaceObject.__)('Site Tagline placeholder')
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.HeadingLevelDropdown, {
+ options: HEADING_LEVELS,
+ value: level,
+ onChange: newLevel => setAttributes({
+ level: newLevel
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
+ onChange: newAlign => setAttributes({
+ textAlign: newAlign
+ }),
+ value: textAlign
+ })]
+ }), siteTaglineContent]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/site-tagline/icon.js
-
/**
* WordPress dependencies
*/
-/* harmony default export */ const site_tagline_icon = ((0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
+
+/* harmony default export */ const site_tagline_icon = (/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
width: "24",
- height: "24"
-}, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, {
- d: "M4 10.5h16V9H4v1.5ZM4 15h9v-1.5H4V15Z"
-})));
+ height: "24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
+ d: "M4 10.5h16V9H4v1.5ZM4 15h9v-1.5H4V15Z"
+ })
+}));
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/site-tagline/deprecated.js
/**
@@ -51736,6 +53679,10 @@ const site_tagline_metadata = {
attributes: {
textAlign: {
type: "string"
+ },
+ level: {
+ type: "number",
+ "default": 0
}
},
example: {},
@@ -51795,21 +53742,21 @@ const site_tagline_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/map-marker.js
-
/**
* WordPress dependencies
*/
-const mapMarker = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const mapMarker = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const map_marker = (mapMarker);
-;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/site-title/edit/index.js
-
+;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/site-title/edit.js
/**
* External dependencies
*/
@@ -51825,7 +53772,10 @@ const mapMarker = (0,external_React_namespaceObject.createElement)(external_wp_p
-const HEADING_LEVELS = [0, 1, 2, 3, 4, 5, 6];
+
+
+
+const edit_HEADING_LEVELS = [0, 1, 2, 3, 4, 5, 6];
function SiteTitleEdit({
attributes,
setAttributes,
@@ -51864,61 +53814,72 @@ function SiteTitleEdit({
}
const TagName = level === 0 ? 'p' : `h${level}`;
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()({
+ className: dist_clsx({
[`has-text-align-${textAlign}`]: textAlign,
'wp-block-site-title__placeholder': !canUserEdit && !title
})
});
- const siteTitleContent = canUserEdit ? (0,external_React_namespaceObject.createElement)(TagName, {
- ...blockProps
- }, (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'),
- placeholder: (0,external_wp_i18n_namespaceObject.__)('Write site title…'),
- value: title,
- onChange: setTitle,
- allowedFormats: [],
- disableLineBreaks: true,
- __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()))
- })) : (0,external_React_namespaceObject.createElement)(TagName, {
- ...blockProps
- }, 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_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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.HeadingLevelDropdown, {
- options: HEADING_LEVELS,
- value: level,
- onChange: newLevel => setAttributes({
- level: newLevel
+ const siteTitleContent = canUserEdit ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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'),
+ placeholder: (0,external_wp_i18n_namespaceObject.__)('Write site title…'),
+ value: title,
+ onChange: setTitle,
+ allowedFormats: [],
+ disableLineBreaks: true,
+ __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()))
})
- }), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
- value: textAlign,
- onChange: nextAlign => {
- setAttributes({
- textAlign: nextAlign
- });
- }
- })), (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.ToggleControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Make title link to home'),
- onChange: () => setAttributes({
- isLink: !isLink
- }),
- checked: isLink
- }), 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'
- }))), siteTitleContent);
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
+ ...blockProps,
+ children: isLink ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: "#site-title-pseudo-link",
+ onClick: event => event.preventDefault(),
+ children: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title) || (0,external_wp_i18n_namespaceObject.__)('Site Title placeholder')
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ children: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title) || (0,external_wp_i18n_namespaceObject.__)('Site Title placeholder')
+ })
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.HeadingLevelDropdown, {
+ options: edit_HEADING_LEVELS,
+ value: level,
+ onChange: newLevel => setAttributes({
+ level: newLevel
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
+ value: textAlign,
+ onChange: nextAlign => {
+ setAttributes({
+ textAlign: nextAlign
+ });
+ }
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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'
+ })]
+ })
+ }), siteTitleContent]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/site-title/deprecated.js
@@ -52107,724 +54068,787 @@ const site_title_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/share.js
-
/**
* WordPress dependencies
*/
-const share = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const share = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_share = (share);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/keyboard-return.js
-
/**
* WordPress dependencies
*/
-const keyboardReturn = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const keyboardReturn = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
- viewBox: "-2 -2 24 24"
-}, (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"
-}));
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
+ d: "m6.734 16.106 2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.158 1.093-1.028-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 */ const keyboard_return = (keyboardReturn);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/wordpress.js
-
/**
* WordPress dependencies
*/
-const WordPressIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const WordPressIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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_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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/fivehundredpx.js
-
/**
* WordPress dependencies
*/
-const FivehundredpxIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const FivehundredpxIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/amazon.js
-
/**
* WordPress dependencies
*/
-const AmazonIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const AmazonIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/bandcamp.js
-
/**
* WordPress dependencies
*/
-const BandcampIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const BandcampIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "M15.27 17.289 3 17.289 8.73 6.711 21 6.711 15.27 17.289"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
+ d: "M15.27 17.289 3 17.289 8.73 6.711 21 6.711 15.27 17.289"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/behance.js
+/**
+ * WordPress dependencies
+ */
+
+
+const BehanceIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
+ width: "24",
+ height: "24",
+ viewBox: "0 0 24 24",
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
+;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/bluesky.js
/**
* WordPress dependencies
*/
-const BehanceIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const BlueskyIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
+ d: "M6.3,4.2c2.3,1.7,4.8,5.3,5.7,7.2.9-1.9,3.4-5.4,5.7-7.2,1.7-1.3,4.3-2.2,4.3.9s-.4,5.2-.6,5.9c-.7,2.6-3.3,3.2-5.6,2.8,4,.7,5.1,3,2.9,5.3-5,5.2-6.7-2.8-6.7-2.8,0,0-1.7,8-6.7,2.8-2.2-2.3-1.2-4.6,2.9-5.3-2.3.4-4.9-.3-5.6-2.8-.2-.7-.6-5.3-.6-5.9,0-3.1,2.7-2.1,4.3-.9h0Z"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/chain.js
-
/**
* WordPress dependencies
*/
-const ChainIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const ChainIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/codepen.js
-
/**
* WordPress dependencies
*/
-const CodepenIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const CodepenIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/deviantart.js
-
/**
* WordPress dependencies
*/
-const DeviantArtIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const DeviantArtIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/dribbble.js
-
/**
* WordPress dependencies
*/
-const DribbbleIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const DribbbleIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/dropbox.js
-
/**
* WordPress dependencies
*/
-const DropboxIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const DropboxIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/etsy.js
-
/**
* WordPress dependencies
*/
-const EtsyIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const EtsyIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/facebook.js
-
/**
* WordPress dependencies
*/
-const FacebookIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const FacebookIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/feed.js
-
/**
* WordPress dependencies
*/
-const FeedIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const FeedIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/flickr.js
-
/**
* WordPress dependencies
*/
-const FlickrIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const FlickrIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/foursquare.js
-
/**
* WordPress dependencies
*/
-const FoursquareIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const FoursquareIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/goodreads.js
-
/**
* WordPress dependencies
*/
-const GoodreadsIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const GoodreadsIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/google.js
-
/**
* WordPress dependencies
*/
-const GoogleIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const GoogleIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/github.js
-
/**
* WordPress dependencies
*/
-const GitHubIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const GitHubIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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, {
+
+const GravatarIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const InstagramIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/lastfm.js
-
/**
* WordPress dependencies
*/
-const LastfmIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const LastfmIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/linkedin.js
-
/**
* WordPress dependencies
*/
-const LinkedInIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const LinkedInIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/mail.js
-
/**
* WordPress dependencies
*/
-const MailIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const MailIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/mastodon.js
-
/**
* WordPress dependencies
*/
-const MastodonIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const MastodonIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/meetup.js
-
/**
* WordPress dependencies
*/
-const MeetupIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const MeetupIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/medium.js
-
/**
* WordPress dependencies
*/
-const MediumIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const MediumIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
+ d: "M13.2,12c0,3-2.4,5.4-5.3,5.4S2.6,15,2.6,12s2.4-5.4,5.3-5.4S13.2,9,13.2,12 M19.1,12c0,2.8-1.2,5-2.7,5s-2.7-2.3-2.7-5s1.2-5,2.7-5C17.9,7,19.1,9.2,19.1,12 M21.4,12c0,2.5-0.4,4.5-0.9,4.5c-0.5,0-0.9-2-0.9-4.5s0.4-4.5,0.9-4.5C21,7.5,21.4,9.5,21.4,12"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/patreon.js
-
/**
* WordPress dependencies
*/
-const PatreonIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const PatreonIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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
-
/**
* WordPress dependencies
*/
-const PinterestIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const PinterestIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/pocket.js
-
/**
* WordPress dependencies
*/
-const PocketIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const PocketIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/reddit.js
-
/**
* WordPress dependencies
*/
-const RedditIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const RedditIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
+ d: "M5.27 9.221A2.775 2.775 0 0 0 2.498 11.993a2.785 2.785 0 0 0 1.6 2.511 5.337 5.337 0 0 0 2.374 4.11 9.386 9.386 0 0 0 5.539 1.7 9.386 9.386 0 0 0 5.541-1.7 5.331 5.331 0 0 0 2.372-4.114 2.787 2.787 0 0 0 1.583-2.5 2.775 2.775 0 0 0-2.772-2.772 2.742 2.742 0 0 0-1.688.574 9.482 9.482 0 0 0-4.637-1.348v-.008a2.349 2.349 0 0 1 2.011-2.316 1.97 1.97 0 0 0 1.926 1.521 1.98 1.98 0 0 0 1.978-1.978 1.98 1.98 0 0 0-1.978-1.978 1.985 1.985 0 0 0-1.938 1.578 3.183 3.183 0 0 0-2.849 3.172v.011a9.463 9.463 0 0 0-4.59 1.35 2.741 2.741 0 0 0-1.688-.574Zm6.736 9.1a3.162 3.162 0 0 1-2.921-1.944.215.215 0 0 1 .014-.2.219.219 0 0 1 .168-.106 27.327 27.327 0 0 1 2.74-.133 27.357 27.357 0 0 1 2.74.133.219.219 0 0 1 .168.106.215.215 0 0 1 .014.2 3.158 3.158 0 0 1-2.921 1.944Zm3.743-3.157a1.265 1.265 0 0 1-1.4-1.371 1.954 1.954 0 0 1 .482-1.442 1.15 1.15 0 0 1 .842-.379 1.7 1.7 0 0 1 1.49 1.777 1.323 1.323 0 0 1-.325 1.015 1.476 1.476 0 0 1-1.089.4Zm-7.485 0a1.476 1.476 0 0 1-1.086-.4 1.323 1.323 0 0 1-.325-1.016 1.7 1.7 0 0 1 1.49-1.777 1.151 1.151 0 0 1 .843.379 1.951 1.951 0 0 1 .481 1.441 1.276 1.276 0 0 1-1.403 1.373Z"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/skype.js
-
/**
* WordPress dependencies
*/
-const SkypeIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const SkypeIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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.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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/snapchat.js
-
/**
* WordPress dependencies
*/
-const SnapchatIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const SnapchatIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/soundcloud.js
-
/**
* WordPress dependencies
*/
-const SoundCloudIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const SoundCloudIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/spotify.js
-
/**
* WordPress dependencies
*/
-const SpotifyIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const SpotifyIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/telegram.js
-
/**
* WordPress dependencies
*/
-const TelegramIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const TelegramIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
width: "24",
height: "24",
viewBox: "0 0 128 128",
- version: "1.1"
-}, (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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/threads.js
-
/**
* WordPress dependencies
*/
-const ThreadsIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const ThreadsIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/tiktok.js
-
/**
* WordPress dependencies
*/
-const TiktokIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const TiktokIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
width: "24",
height: "24",
viewBox: "0 0 32 32",
- version: "1.1"
-}, (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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/tumblr.js
-
/**
* WordPress dependencies
*/
-const TumblrIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const TumblrIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/twitch.js
-
/**
* WordPress dependencies
*/
-const TwitchIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const TwitchIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/twitter.js
-
/**
* WordPress dependencies
*/
-const TwitterIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const TwitterIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/vimeo.js
-
/**
* WordPress dependencies
*/
-const VimeoIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const VimeoIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/vk.js
-
/**
* WordPress dependencies
*/
-const VkIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const VkIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/whatsapp.js
-
/**
* WordPress dependencies
*/
-const WhatsAppIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const WhatsAppIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/x.js
-
/**
* WordPress dependencies
*/
-const XIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const XIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/yelp.js
-
/**
* WordPress dependencies
*/
-const YelpIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const YelpIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/icons/youtube.js
-
/**
* WordPress dependencies
*/
-const YouTubeIcon = () => (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const YouTubeIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ version: "1.1",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ })
+});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/variations.js
/**
@@ -52868,6 +54892,13 @@ const social_link_variations_variations = [{
title: 'Behance',
icon: BehanceIcon
}, {
+ name: 'bluesky',
+ attributes: {
+ service: 'bluesky'
+ },
+ title: 'Bluesky',
+ icon: BlueskyIcon
+}, {
name: 'chain',
attributes: {
service: 'chain'
@@ -53164,7 +55195,9 @@ const social_link_variations_variations = [{
* Block by providing its attributes.
*/
social_link_variations_variations.forEach(variation => {
- if (variation.isActive) return;
+ if (variation.isActive) {
+ return;
+ }
variation.isActive = (blockAttributes, variationAttributes) => blockAttributes.service === variationAttributes.service;
});
/* harmony default export */ const social_link_variations = (social_link_variations_variations);
@@ -53206,7 +55239,6 @@ const getNameBySite = name => {
};
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-link/edit.js
-
/**
* External dependencies
*/
@@ -53221,64 +55253,59 @@ const getNameBySite = name => {
-
-
/**
* Internal dependencies
*/
+
+
+
const SocialLinkURLPopover = ({
url,
setAttributes,
setPopover,
- popoverAnchor,
- clientId
+ popoverAnchor
}) => {
- const {
- removeBlock
- } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.URLPopover, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.URLPopover, {
anchor: popoverAnchor,
- onClose: () => setPopover(false)
- }, (0,external_React_namespaceObject.createElement)("form", {
- className: "block-editor-url-popover__link-editor",
- onSubmit: event => {
- event.preventDefault();
- setPopover(false);
- }
- }, (0,external_React_namespaceObject.createElement)("div", {
- className: "block-editor-url-input"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.URLInput, {
- __nextHasNoMarginBottom: true,
- value: url,
- onChange: nextURL => setAttributes({
- url: nextURL
- }),
- placeholder: (0,external_wp_i18n_namespaceObject.__)('Enter address'),
- disableSuggestions: true,
- onKeyDown: event => {
- if (!!url || event.defaultPrevented || ![external_wp_keycodes_namespaceObject.BACKSPACE, external_wp_keycodes_namespaceObject.DELETE].includes(event.keyCode)) {
- return;
- }
- removeBlock(clientId);
- }
- })), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- icon: keyboard_return,
- label: (0,external_wp_i18n_namespaceObject.__)('Apply'),
- type: "submit"
- })));
+ onClose: () => setPopover(false),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("form", {
+ className: "block-editor-url-popover__link-editor",
+ onSubmit: event => {
+ event.preventDefault();
+ setPopover(false);
+ },
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "block-editor-url-input",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.URLInput, {
+ __nextHasNoMarginBottom: true,
+ value: url,
+ onChange: nextURL => setAttributes({
+ url: nextURL
+ }),
+ placeholder: (0,external_wp_i18n_namespaceObject.__)('Enter social link'),
+ label: (0,external_wp_i18n_namespaceObject.__)('Enter social link'),
+ hideLabelFromVision: true,
+ disableSuggestions: true
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ icon: keyboard_return,
+ label: (0,external_wp_i18n_namespaceObject.__)('Apply'),
+ type: "submit"
+ })]
+ })
+ });
};
const SocialLinkEdit = ({
attributes,
context,
isSelected,
- setAttributes,
- clientId
+ setAttributes
}) => {
const {
url,
service,
- label,
+ label = '',
rel
} = attributes;
const {
@@ -53289,7 +55316,7 @@ const SocialLinkEdit = ({
iconBackgroundColorValue
} = context;
const [showURLPopover, setPopover] = (0,external_wp_element_namespaceObject.useState)(false);
- const classes = classnames_default()('wp-social-link', 'wp-social-link-' + service, {
+ const classes = dist_clsx('wp-social-link', 'wp-social-link-' + service, {
'wp-social-link__is-incomplete': !url,
[`has-${iconColor}-color`]: iconColor,
[`has-${iconBackgroundColor}-background-color`]: iconBackgroundColor
@@ -53300,7 +55327,11 @@ const SocialLinkEdit = ({
const [popoverAnchor, setPopoverAnchor] = (0,external_wp_element_namespaceObject.useState)(null);
const IconComponent = getIconBySite(service);
const socialLinkName = getNameBySite(service);
- const socialLinkLabel = label !== null && label !== void 0 ? label : socialLinkName;
+ // The initial label (ie. the link text) is an empty string.
+ // We want to prevent empty links so that the link text always fallbacks to
+ // the social name, even when users enter and save an empty string or only
+ // spaces. The PHP render callback fallbacks to the social name as well.
+ const socialLinkText = label.trim() === '' ? socialLinkName : label;
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
className: classes,
style: {
@@ -53308,44 +55339,53 @@ const SocialLinkEdit = ({
backgroundColor: iconBackgroundColorValue
}
});
- 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_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.'),
- value: label || '',
- onChange: value => setAttributes({
- label: value
- })
- })))), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, {
- group: "advanced"
- }, (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_React_namespaceObject.createElement)("li", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- className: "wp-block-social-link-anchor",
- ref: setPopoverAnchor,
- onClick: () => setPopover(true)
- }, (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_React_namespaceObject.createElement)(SocialLinkURLPopover, {
- url: url,
- setAttributes: setAttributes,
- setPopover: setPopover,
- popoverAnchor: popoverAnchor,
- clientId: clientId
- }))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelRow, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Link text'),
+ help: (0,external_wp_i18n_namespaceObject.__)('The link text is visible when enabled from the parent Social Icons block.'),
+ value: label,
+ onChange: value => setAttributes({
+ label: value
+ }),
+ placeholder: socialLinkName
+ })
+ })
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ group: "advanced",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Link rel'),
+ value: rel || '',
+ onChange: value => setAttributes({
+ rel: value
+ })
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", {
+ ...blockProps,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("button", {
+ className: "wp-block-social-link-anchor",
+ ref: setPopoverAnchor,
+ onClick: () => setPopover(true),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(IconComponent, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ className: dist_clsx('wp-block-social-link-label', {
+ 'screen-reader-text': !showLabels
+ }),
+ children: socialLinkText
+ })]
+ }), isSelected && showURLPopover && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SocialLinkURLPopover, {
+ url: url,
+ setAttributes: setAttributes,
+ setPopover: setPopover,
+ popoverAnchor: popoverAnchor
+ })]
+ })]
+ });
};
/* harmony default export */ const social_link_edit = (SocialLinkEdit);
@@ -53367,7 +55407,7 @@ const social_link_metadata = {
title: "Social Icon",
category: "widgets",
parent: ["core/social-links"],
- description: "Display an icon linking to a social media profile or site.",
+ description: "Display an icon linking to a social profile or site.",
textdomain: "default",
attributes: {
url: {
@@ -53410,7 +55450,6 @@ const social_link_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-links/deprecated.js
-
/**
* External dependencies
*/
@@ -53428,6 +55467,7 @@ const social_link_init = () => initBlock({
*
* @param {Object} attributes Block's attributes.
*/
+
const social_links_deprecated_migrateWithLayout = attributes => {
if (!!attributes.layout) {
return attributes;
@@ -53508,7 +55548,7 @@ const social_links_deprecated_deprecated = [
size
}
} = props;
- const className = classnames_default()(size, {
+ const className = dist_clsx(size, {
'has-icon-color': iconColorValue,
'has-icon-background-color': iconBackgroundColorValue,
[`items-justified-${itemsJustification}`]: itemsJustification
@@ -53517,32 +55557,33 @@ const social_links_deprecated_deprecated = [
'--wp--social-links--icon-color': iconColorValue,
'--wp--social-links--icon-background-color': iconBackgroundColorValue
};
- return (0,external_React_namespaceObject.createElement)("ul", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className,
style
- })
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, null));
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
+ });
}
}];
/* harmony default export */ const social_links_deprecated = (social_links_deprecated_deprecated);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/check.js
-
/**
* WordPress dependencies
*/
-const check = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const check = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_check = (check);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-links/edit.js
-
/**
* External dependencies
*/
@@ -53556,6 +55597,9 @@ const check = (0,external_React_namespaceObject.createElement)(external_wp_primi
+
+
+
const sizeOptions = [{
name: (0,external_wp_i18n_namespaceObject.__)('Small'),
value: 'has-small-icon-size'
@@ -53612,24 +55656,27 @@ function SocialLinksEdit(props) {
});
}
}, [logosOnly]);
- const SocialPlaceholder = (0,external_React_namespaceObject.createElement)("li", {
- className: "wp-block-social-links__social-placeholder"
- }, (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-social-links__social-placeholder-icons"
- }, (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-social-link wp-social-link-twitter"
- }), (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-social-link wp-social-link-facebook"
- }), (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-social-link wp-social-link-instagram"
- })));
- const SelectedSocialPlaceholder = (0,external_React_namespaceObject.createElement)("li", {
- className: "wp-block-social-links__social-prompt"
- }, (0,external_wp_i18n_namespaceObject.__)('Click plus to add'));
+ const SocialPlaceholder = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", {
+ className: "wp-block-social-links__social-placeholder",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ className: "wp-block-social-links__social-placeholder-icons",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-social-link wp-social-link-twitter"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-social-link wp-social-link-facebook"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-social-link wp-social-link-instagram"
+ })]
+ })
+ });
+ const SelectedSocialPlaceholder = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", {
+ className: "wp-block-social-links__social-prompt",
+ children: (0,external_wp_i18n_namespaceObject.__)('Click plus to add')
+ });
// Fallback color values are used maintain selections in case switching
// themes and named colors in palette do not match.
- const className = classnames_default()(size, {
+ const className = dist_clsx(size, {
'has-visible-labels': showLabels,
'has-icon-color': iconColor.color || iconColorValue,
'has-icon-background-color': iconBackgroundColor.color || iconBackgroundColorValue
@@ -53685,71 +55732,80 @@ function SocialLinksEdit(props) {
});
}
const colorGradientSettings = (0,external_wp_blockEditor_namespaceObject.__experimentalUseMultipleOriginColorsAndGradients)();
- 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_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_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,
- onClick: () => {
- setAttributes({
- size: entry.value
- });
- },
- onClose: onClose,
- role: "menuitemradio"
- }, entry.name);
- })))), (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.ToggleControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Open links in new tab'),
- checked: openInNewTab,
- onChange: () => setAttributes({
- openInNewTab: !openInNewTab
- })
- }), (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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, {
- group: "color"
- }, colorSettings.map(({
- onChange,
- label,
- value,
- resetAllFilter
- }) => (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown, {
- key: `social-links-color-${label}`,
- __experimentalIsRenderedInSidebar: true,
- settings: [{
- colorValue: value,
- label,
- onColorChange: onChange,
- isShownByDefault: true,
- resetAllFilter,
- enableAlpha: true
- }],
- panelId: clientId,
- ...colorGradientSettings
- })), !logosOnly && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.ContrastChecker, {
- textColor: iconColorValue,
- backgroundColor: iconBackgroundColorValue,
- isLargeText: false
- })), (0,external_React_namespaceObject.createElement)("ul", {
- ...innerBlocksProps
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "other",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarDropdownMenu, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Size'),
+ text: (0,external_wp_i18n_namespaceObject.__)('Size'),
+ icon: null,
+ popoverProps: POPOVER_PROPS,
+ children: ({
+ onClose
+ }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, {
+ children: sizeOptions.map(entry => {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
+ icon: (size === entry.value || !size && entry.value === 'has-normal-icon-size') && library_check,
+ isSelected: size === entry.value,
+ onClick: () => {
+ setAttributes({
+ size: entry.value
+ });
+ },
+ onClose: onClose,
+ role: "menuitemradio",
+ children: entry.name
+ }, entry.value);
+ })
+ })
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Open links in new tab'),
+ checked: openInNewTab,
+ onChange: () => setAttributes({
+ openInNewTab: !openInNewTab
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Show text'),
+ checked: showLabels,
+ onChange: () => setAttributes({
+ showLabels: !showLabels
+ })
+ })]
+ })
+ }), colorGradientSettings.hasColorsOrGradients && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ group: "color",
+ children: [colorSettings.map(({
+ onChange,
+ label,
+ value,
+ resetAllFilter
+ }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown, {
+ __experimentalIsRenderedInSidebar: true,
+ settings: [{
+ colorValue: value,
+ label,
+ onColorChange: onChange,
+ isShownByDefault: true,
+ resetAllFilter,
+ enableAlpha: true
+ }],
+ panelId: clientId,
+ ...colorGradientSettings
+ }, `social-links-color-${label}`)), !logosOnly && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.ContrastChecker, {
+ textColor: iconColorValue,
+ backgroundColor: iconBackgroundColorValue,
+ isLargeText: false
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
+ ...innerBlocksProps
+ })]
+ });
}
const iconColorAttributes = {
iconColor: 'icon-color',
@@ -53758,7 +55814,6 @@ const iconColorAttributes = {
/* 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
-
/**
* External dependencies
*/
@@ -53768,6 +55823,7 @@ const iconColorAttributes = {
* WordPress dependencies
*/
+
function social_links_save_save(props) {
const {
attributes: {
@@ -53777,7 +55833,7 @@ function social_links_save_save(props) {
size
}
} = props;
- const className = classnames_default()(size, {
+ const className = dist_clsx(size, {
'has-visible-labels': showLabels,
'has-icon-color': iconColorValue,
'has-icon-background-color': iconBackgroundColorValue
@@ -53786,7 +55842,7 @@ function social_links_save_save(props) {
className
});
const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
- return (0,external_React_namespaceObject.createElement)("ul", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
...innerBlocksProps
});
}
@@ -53810,7 +55866,7 @@ const social_links_metadata = {
title: "Social Icons",
category: "widgets",
allowedBlocks: ["core/social-link"],
- description: "Display icons linking to your social media profiles or sites.",
+ description: "Display icons linking to your social profiles or sites.",
keywords: ["links"],
textdomain: "default",
attributes: {
@@ -53941,25 +55997,26 @@ const social_links_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/resize-corner-n-e.js
-
/**
* WordPress dependencies
*/
-const resizeCornerNE = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const resizeCornerNE = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "M7 18h4.5v1.5h-7v-7H6V17L17 6h-4.5V4.5h7v7H18V7L7 18Z"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
+ d: "M7 18h4.5v1.5h-7v-7H6V17L17 6h-4.5V4.5h7v7H18V7L7 18Z"
+ })
+});
/* harmony default export */ const resize_corner_n_e = (resizeCornerNE);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/spacer/deprecated.js
-
/**
* WordPress dependencies
*/
+
const spacer_deprecated_deprecated = [{
attributes: {
height: {
@@ -53984,7 +56041,7 @@ const spacer_deprecated_deprecated = [{
save({
attributes
}) {
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
style: {
height: attributes.height,
@@ -54001,7 +56058,6 @@ const spacer_deprecated_deprecated = [{
const MIN_SPACER_SIZE = 0;
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/spacer/controls.js
-
/**
* WordPress dependencies
*/
@@ -54015,6 +56071,13 @@ const MIN_SPACER_SIZE = 0;
* Internal dependencies
*/
+
+
+
+
+const {
+ useSpacingSizes
+} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
function DimensionInput({
label,
onChange,
@@ -54022,7 +56085,8 @@ function DimensionInput({
value = ''
}) {
const inputId = (0,external_wp_compose_namespaceObject.useInstanceId)(external_wp_components_namespaceObject.__experimentalUnitControl, 'block-spacer-height-input');
- const [spacingSizes, spacingUnits] = (0,external_wp_blockEditor_namespaceObject.useSettings)('spacing.spacingSizes', 'spacing.units');
+ const spacingSizes = useSpacingSizes();
+ const [spacingUnits] = (0,external_wp_blockEditor_namespaceObject.useSettings)('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.
@@ -54044,33 +56108,37 @@ 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_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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalUnitControl, {
- id: inputId,
- isResetValueOnUnitChange: true,
- min: MIN_SPACER_SIZE,
- onChange: handleOnChange,
- style: {
- maxWidth: 80
- },
- value: computedValue,
- units: units
- })), spacingSizes?.length > 0 && (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.View, {
- className: "tools-panel-item-spacing"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalSpacingSizesControl, {
- values: {
- all: computedValue
- },
- onChange: handleOnChange,
- label: label,
- sides: ['all'],
- units: units,
- allowReset: false,
- splitOnAxis: false,
- showSideInLabel: false
- })));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [(!spacingSizes || spacingSizes?.length === 0) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.BaseControl, {
+ label: label,
+ id: inputId,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalUnitControl, {
+ id: inputId,
+ isResetValueOnUnitChange: true,
+ min: MIN_SPACER_SIZE,
+ onChange: handleOnChange,
+ style: {
+ maxWidth: 80
+ },
+ value: computedValue,
+ units: units
+ })
+ }), spacingSizes?.length > 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.View, {
+ className: "tools-panel-item-spacing",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalSpacingSizesControl, {
+ values: {
+ all: computedValue
+ },
+ onChange: handleOnChange,
+ label: label,
+ sides: ['all'],
+ units: units,
+ allowReset: false,
+ splitOnAxis: false,
+ showSideInLabel: false
+ })
+ })]
+ });
}
function SpacerControls({
setAttributes,
@@ -54079,27 +56147,29 @@ function SpacerControls({
width,
isResizing
}) {
- 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_React_namespaceObject.createElement)(DimensionInput, {
- label: (0,external_wp_i18n_namespaceObject.__)('Width'),
- value: width,
- onChange: nextWidth => setAttributes({
- width: nextWidth
- }),
- isResizing: isResizing
- }), orientation !== 'horizontal' && (0,external_React_namespaceObject.createElement)(DimensionInput, {
- label: (0,external_wp_i18n_namespaceObject.__)('Height'),
- value: height,
- onChange: nextHeight => setAttributes({
- height: nextHeight
- }),
- isResizing: isResizing
- })));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [orientation === 'horizontal' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DimensionInput, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Width'),
+ value: width,
+ onChange: nextWidth => setAttributes({
+ width: nextWidth
+ }),
+ isResizing: isResizing
+ }), orientation !== 'horizontal' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DimensionInput, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Height'),
+ value: height,
+ onChange: nextHeight => setAttributes({
+ height: nextHeight
+ }),
+ isResizing: isResizing
+ })]
+ })
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/spacer/edit.js
-
/**
* External dependencies
*/
@@ -54119,6 +56189,13 @@ function SpacerControls({
*/
+
+
+
+
+const {
+ useSpacingSizes: edit_useSpacingSizes
+} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
const ResizableSpacer = ({
orientation,
onResizeStart,
@@ -54135,8 +56212,8 @@ const ResizableSpacer = ({
const getNextVal = elt => {
return `${getCurrentSize(elt)}px`;
};
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ResizableBox, {
- className: classnames_default()('block-library-spacer__resize-container', {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ResizableBox, {
+ className: dist_clsx('block-library-spacer__resize-container', {
'resize-horizontal': orientation === 'horizontal',
'is-resizing': isResizing,
'is-selected': isSelected
@@ -54207,7 +56284,7 @@ const SpacerEdit = ({
selfStretch,
flexSize
} = layout;
- const [spacingSizes] = (0,external_wp_blockEditor_namespaceObject.useSettings)('spacing.spacingSizes');
+ const spacingSizes = edit_useSpacingSizes();
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);
@@ -54276,7 +56353,7 @@ const SpacerEdit = ({
};
const resizableBoxWithOrientation = blockOrientation => {
if (blockOrientation === 'horizontal') {
- return (0,external_React_namespaceObject.createElement)(ResizableSpacer, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ResizableSpacer, {
minWidth: MIN_SPACER_SIZE,
enable: {
top: false,
@@ -54297,26 +56374,28 @@ const SpacerEdit = ({
setIsResizing: setIsResizing
});
}
- return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(ResizableSpacer, {
- minHeight: MIN_SPACER_SIZE,
- enable: {
- top: false,
- right: false,
- bottom: true,
- left: false,
- topRight: false,
- bottomRight: false,
- bottomLeft: false,
- topLeft: false
- },
- orientation: blockOrientation,
- onResizeStart: onResizeStart,
- onResize: setTemporaryHeight,
- onResizeStop: handleOnVerticalResizeStop,
- isSelected: isSelected,
- isResizing: isResizing,
- setIsResizing: setIsResizing
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ResizableSpacer, {
+ minHeight: MIN_SPACER_SIZE,
+ enable: {
+ top: false,
+ right: false,
+ bottom: true,
+ left: false,
+ topRight: false,
+ bottomRight: false,
+ bottomLeft: false,
+ topLeft: false
+ },
+ orientation: blockOrientation,
+ onResizeStart: onResizeStart,
+ onResize: setTemporaryHeight,
+ onResizeStop: handleOnVerticalResizeStop,
+ isSelected: isSelected,
+ isResizing: isResizing,
+ setIsResizing: setIsResizing
+ })
+ });
};
(0,external_wp_element_namespaceObject.useEffect)(() => {
if (isFlexLayout && selfStretch !== 'fill' && selfStretch !== 'fit' && !flexSize) {
@@ -54381,29 +56460,32 @@ const SpacerEdit = ({
});
}
}, [blockStyle, flexSize, height, inheritedOrientation, isFlexLayout, layout, selfStretch, setAttributes, spacingSizes, width]);
- 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_React_namespaceObject.createElement)(SpacerControls, {
- setAttributes: setAttributes,
- height: temporaryHeight || height,
- width: temporaryWidth || width,
- orientation: inheritedOrientation,
- isResizing: isResizing
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.View, {
+ ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({
+ style,
+ className: dist_clsx(className, {
+ 'custom-sizes-disabled': disableCustomSpacingSizes
+ })
+ }),
+ children: resizableBoxWithOrientation(inheritedOrientation)
+ }), !isFlexLayout && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SpacerControls, {
+ setAttributes: setAttributes,
+ height: temporaryHeight || height,
+ width: temporaryWidth || width,
+ orientation: inheritedOrientation,
+ isResizing: isResizing
+ })]
+ });
};
/* harmony default export */ const spacer_edit = (SpacerEdit);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/spacer/save.js
-
/**
* WordPress dependencies
*/
+
function spacer_save_save({
attributes
}) {
@@ -54419,7 +56501,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_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
style: {
height: (0,external_wp_blockEditor_namespaceObject.getSpacingPresetCssVar)(finalHeight),
@@ -54493,21 +56575,21 @@ const spacer_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/block-table.js
-
/**
* WordPress dependencies
*/
-const blockTable = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const blockTable = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const block_table = (blockTable);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table/deprecated.js
-
/**
* External dependencies
*/
@@ -54521,6 +56603,8 @@ const blockTable = (0,external_React_namespaceObject.createElement)(external_wp_
// As the previous arbitrary colors won't match theme color palettes, the hex
// value will be mapped to the style.color.background attribute as if it was
// a custom color selection.
+
+
const oldColors = {
'subtle-light-gray': '#f3f4f5',
'subtle-pale-green': '#e9fbe5',
@@ -54528,8 +56612,249 @@ const oldColors = {
'subtle-pale-pink': '#fcf0ef'
};
+// Fixed width table cells on by default.
+const v4Query = {
+ content: {
+ type: 'rich-text',
+ source: 'rich-text'
+ },
+ tag: {
+ type: 'string',
+ default: 'td',
+ source: 'tag'
+ },
+ scope: {
+ type: 'string',
+ source: 'attribute',
+ attribute: 'scope'
+ },
+ align: {
+ type: 'string',
+ source: 'attribute',
+ attribute: 'data-align'
+ },
+ colspan: {
+ type: 'string',
+ source: 'attribute',
+ attribute: 'colspan'
+ },
+ rowspan: {
+ type: 'string',
+ source: 'attribute',
+ attribute: 'rowspan'
+ }
+};
+const table_deprecated_v4 = {
+ attributes: {
+ hasFixedLayout: {
+ type: 'boolean',
+ default: false
+ },
+ caption: {
+ type: 'rich-text',
+ source: 'rich-text',
+ selector: 'figcaption'
+ },
+ head: {
+ type: 'array',
+ default: [],
+ source: 'query',
+ selector: 'thead tr',
+ query: {
+ cells: {
+ type: 'array',
+ default: [],
+ source: 'query',
+ selector: 'td,th',
+ query: v4Query
+ }
+ }
+ },
+ body: {
+ type: 'array',
+ default: [],
+ source: 'query',
+ selector: 'tbody tr',
+ query: {
+ cells: {
+ type: 'array',
+ default: [],
+ source: 'query',
+ selector: 'td,th',
+ query: v4Query
+ }
+ }
+ },
+ foot: {
+ type: 'array',
+ default: [],
+ source: 'query',
+ selector: 'tfoot tr',
+ query: {
+ cells: {
+ type: 'array',
+ default: [],
+ source: 'query',
+ selector: 'td,th',
+ query: v4Query
+ }
+ }
+ }
+ },
+ supports: {
+ anchor: true,
+ align: true,
+ color: {
+ __experimentalSkipSerialization: true,
+ gradients: true,
+ __experimentalDefaultControls: {
+ background: true,
+ text: true
+ }
+ },
+ spacing: {
+ margin: true,
+ padding: true,
+ __experimentalDefaultControls: {
+ margin: false,
+ padding: false
+ }
+ },
+ typography: {
+ fontSize: true,
+ lineHeight: true,
+ __experimentalFontFamily: true,
+ __experimentalFontStyle: true,
+ __experimentalFontWeight: true,
+ __experimentalLetterSpacing: true,
+ __experimentalTextTransform: true,
+ __experimentalTextDecoration: true,
+ __experimentalDefaultControls: {
+ fontSize: true
+ }
+ },
+ __experimentalBorder: {
+ __experimentalSkipSerialization: true,
+ color: true,
+ style: true,
+ width: true,
+ __experimentalDefaultControls: {
+ color: true,
+ style: true,
+ width: true
+ }
+ },
+ __experimentalSelector: '.wp-block-table > table',
+ interactivity: {
+ clientNavigation: true
+ }
+ },
+ save({
+ attributes
+ }) {
+ const {
+ hasFixedLayout,
+ head,
+ body,
+ foot,
+ caption
+ } = attributes;
+ const isEmpty = !head.length && !body.length && !foot.length;
+ if (isEmpty) {
+ return null;
+ }
+ const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
+ const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
+ const classes = dist_clsx(colorProps.className, borderProps.className, {
+ 'has-fixed-layout': hasFixedLayout
+ });
+ const hasCaption = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption);
+ const Section = ({
+ type,
+ rows
+ }) => {
+ if (!rows.length) {
+ return null;
+ }
+ const Tag = `t${type}`;
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, {
+ children: rows.map(({
+ cells
+ }, rowIndex) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("tr", {
+ children: cells.map(({
+ content,
+ tag,
+ scope,
+ align,
+ colspan,
+ rowspan
+ }, cellIndex) => {
+ const cellClasses = dist_clsx({
+ [`has-text-align-${align}`]: align
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ className: cellClasses ? cellClasses : undefined,
+ "data-align": align,
+ tagName: tag,
+ value: content,
+ scope: tag === 'th' ? scope : undefined,
+ colSpan: colspan,
+ rowSpan: rowspan
+ }, cellIndex);
+ })
+ }, rowIndex))
+ });
+ };
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
+ ...external_wp_blockEditor_namespaceObject.useBlockProps.save(),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("table", {
+ className: classes === '' ? undefined : classes,
+ style: {
+ ...colorProps.style,
+ ...borderProps.style
+ },
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, {
+ type: "head",
+ rows: head
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, {
+ type: "body",
+ rows: body
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, {
+ type: "foot",
+ rows: foot
+ })]
+ }), hasCaption && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "figcaption",
+ value: caption,
+ className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption')
+ })]
+ });
+ }
+};
+
// In #41140 support was added to global styles for caption elements which
// added a `wp-element-caption` classname to the embed figcaption element.
+const v3Query = {
+ content: {
+ type: 'string',
+ source: 'html'
+ },
+ tag: {
+ type: 'string',
+ default: 'td',
+ source: 'tag'
+ },
+ scope: {
+ type: 'string',
+ source: 'attribute',
+ attribute: 'scope'
+ },
+ align: {
+ type: 'string',
+ source: 'attribute',
+ attribute: 'data-align'
+ }
+};
const table_deprecated_v3 = {
attributes: {
hasFixedLayout: {
@@ -54553,27 +56878,7 @@ const table_deprecated_v3 = {
default: [],
source: 'query',
selector: 'td,th',
- query: {
- content: {
- type: 'string',
- source: 'html'
- },
- tag: {
- type: 'string',
- default: 'td',
- source: 'tag'
- },
- scope: {
- type: 'string',
- source: 'attribute',
- attribute: 'scope'
- },
- align: {
- type: 'string',
- source: 'attribute',
- attribute: 'data-align'
- }
- }
+ query: v3Query
}
}
},
@@ -54588,27 +56893,7 @@ const table_deprecated_v3 = {
default: [],
source: 'query',
selector: 'td,th',
- query: {
- content: {
- type: 'string',
- source: 'html'
- },
- tag: {
- type: 'string',
- default: 'td',
- source: 'tag'
- },
- scope: {
- type: 'string',
- source: 'attribute',
- attribute: 'scope'
- },
- align: {
- type: 'string',
- source: 'attribute',
- attribute: 'data-align'
- }
- }
+ query: v3Query
}
}
},
@@ -54623,27 +56908,7 @@ const table_deprecated_v3 = {
default: [],
source: 'query',
selector: 'td,th',
- query: {
- content: {
- type: 'string',
- source: 'html'
- },
- tag: {
- type: 'string',
- default: 'td',
- source: 'tag'
- },
- scope: {
- type: 'string',
- source: 'attribute',
- attribute: 'scope'
- },
- align: {
- type: 'string',
- source: 'attribute',
- attribute: 'data-align'
- }
- }
+ query: v3Query
}
}
}
@@ -54705,7 +56970,7 @@ const table_deprecated_v3 = {
}
const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
- const classes = classnames_default()(colorProps.className, borderProps.className, {
+ const classes = dist_clsx(colorProps.className, borderProps.className, {
'has-fixed-layout': hasFixedLayout
});
const hasCaption = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption);
@@ -54717,54 +56982,78 @@ const table_deprecated_v3 = {
return null;
}
const Tag = `t${type}`;
- return (0,external_React_namespaceObject.createElement)(Tag, null, rows.map(({
- cells
- }, rowIndex) => (0,external_React_namespaceObject.createElement)("tr", {
- key: rowIndex
- }, cells.map(({
- content,
- tag,
- scope,
- align
- }, cellIndex) => {
- const cellClasses = classnames_default()({
- [`has-text-align-${align}`]: align
- });
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- className: cellClasses ? cellClasses : undefined,
- "data-align": align,
- tagName: tag,
- value: content,
- key: cellIndex,
- scope: tag === 'th' ? scope : undefined
- });
- }))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, {
+ children: rows.map(({
+ cells
+ }, rowIndex) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("tr", {
+ children: cells.map(({
+ content,
+ tag,
+ scope,
+ align
+ }, cellIndex) => {
+ const cellClasses = dist_clsx({
+ [`has-text-align-${align}`]: align
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ className: cellClasses ? cellClasses : undefined,
+ "data-align": align,
+ tagName: tag,
+ value: content,
+ scope: tag === 'th' ? scope : undefined
+ }, cellIndex);
+ })
+ }, rowIndex))
+ });
};
- return (0,external_React_namespaceObject.createElement)("figure", {
- ...external_wp_blockEditor_namespaceObject.useBlockProps.save()
- }, (0,external_React_namespaceObject.createElement)("table", {
- className: classes === '' ? undefined : classes,
- style: {
- ...colorProps.style,
- ...borderProps.style
- }
- }, (0,external_React_namespaceObject.createElement)(Section, {
- type: "head",
- rows: head
- }), (0,external_React_namespaceObject.createElement)(Section, {
- type: "body",
- rows: body
- }), (0,external_React_namespaceObject.createElement)(Section, {
- type: "foot",
- rows: foot
- })), hasCaption && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "figcaption",
- value: caption
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
+ ...external_wp_blockEditor_namespaceObject.useBlockProps.save(),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("table", {
+ className: classes === '' ? undefined : classes,
+ style: {
+ ...colorProps.style,
+ ...borderProps.style
+ },
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, {
+ type: "head",
+ rows: head
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, {
+ type: "body",
+ rows: body
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, {
+ type: "foot",
+ rows: foot
+ })]
+ }), hasCaption && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "figcaption",
+ value: caption
+ })]
+ });
}
};
// Deprecation migrating table block to use colors block support feature.
+const v2Query = {
+ content: {
+ type: 'string',
+ source: 'html'
+ },
+ tag: {
+ type: 'string',
+ default: 'td',
+ source: 'tag'
+ },
+ scope: {
+ type: 'string',
+ source: 'attribute',
+ attribute: 'scope'
+ },
+ align: {
+ type: 'string',
+ source: 'attribute',
+ attribute: 'data-align'
+ }
+};
const table_deprecated_v2 = {
attributes: {
hasFixedLayout: {
@@ -54791,27 +57080,7 @@ const table_deprecated_v2 = {
default: [],
source: 'query',
selector: 'td,th',
- query: {
- content: {
- type: 'string',
- source: 'html'
- },
- tag: {
- type: 'string',
- default: 'td',
- source: 'tag'
- },
- scope: {
- type: 'string',
- source: 'attribute',
- attribute: 'scope'
- },
- align: {
- type: 'string',
- source: 'attribute',
- attribute: 'data-align'
- }
- }
+ query: v2Query
}
}
},
@@ -54826,27 +57095,7 @@ const table_deprecated_v2 = {
default: [],
source: 'query',
selector: 'td,th',
- query: {
- content: {
- type: 'string',
- source: 'html'
- },
- tag: {
- type: 'string',
- default: 'td',
- source: 'tag'
- },
- scope: {
- type: 'string',
- source: 'attribute',
- attribute: 'scope'
- },
- align: {
- type: 'string',
- source: 'attribute',
- attribute: 'data-align'
- }
- }
+ query: v2Query
}
}
},
@@ -54861,27 +57110,7 @@ const table_deprecated_v2 = {
default: [],
source: 'query',
selector: 'td,th',
- query: {
- content: {
- type: 'string',
- source: 'html'
- },
- tag: {
- type: 'string',
- default: 'td',
- source: 'tag'
- },
- scope: {
- type: 'string',
- source: 'attribute',
- attribute: 'scope'
- },
- align: {
- type: 'string',
- source: 'attribute',
- attribute: 'data-align'
- }
- }
+ query: v2Query
}
}
}
@@ -54907,7 +57136,7 @@ const table_deprecated_v2 = {
return null;
}
const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('background-color', backgroundColor);
- const classes = classnames_default()(backgroundClass, {
+ const classes = dist_clsx(backgroundClass, {
'has-fixed-layout': hasFixedLayout,
'has-background': !!backgroundClass
});
@@ -54920,46 +57149,49 @@ const table_deprecated_v2 = {
return null;
}
const Tag = `t${type}`;
- return (0,external_React_namespaceObject.createElement)(Tag, null, rows.map(({
- cells
- }, rowIndex) => (0,external_React_namespaceObject.createElement)("tr", {
- key: rowIndex
- }, cells.map(({
- content,
- tag,
- scope,
- align
- }, cellIndex) => {
- const cellClasses = classnames_default()({
- [`has-text-align-${align}`]: align
- });
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- className: cellClasses ? cellClasses : undefined,
- "data-align": align,
- tagName: tag,
- value: content,
- key: cellIndex,
- scope: tag === 'th' ? scope : undefined
- });
- }))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, {
+ children: rows.map(({
+ cells
+ }, rowIndex) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("tr", {
+ children: cells.map(({
+ content,
+ tag,
+ scope,
+ align
+ }, cellIndex) => {
+ const cellClasses = dist_clsx({
+ [`has-text-align-${align}`]: align
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ className: cellClasses ? cellClasses : undefined,
+ "data-align": align,
+ tagName: tag,
+ value: content,
+ scope: tag === 'th' ? scope : undefined
+ }, cellIndex);
+ })
+ }, rowIndex))
+ });
};
- return (0,external_React_namespaceObject.createElement)("figure", {
- ...external_wp_blockEditor_namespaceObject.useBlockProps.save()
- }, (0,external_React_namespaceObject.createElement)("table", {
- className: classes === '' ? undefined : classes
- }, (0,external_React_namespaceObject.createElement)(Section, {
- type: "head",
- rows: head
- }), (0,external_React_namespaceObject.createElement)(Section, {
- type: "body",
- rows: body
- }), (0,external_React_namespaceObject.createElement)(Section, {
- type: "foot",
- rows: foot
- })), hasCaption && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "figcaption",
- value: caption
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
+ ...external_wp_blockEditor_namespaceObject.useBlockProps.save(),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("table", {
+ className: classes === '' ? undefined : classes,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, {
+ type: "head",
+ rows: head
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, {
+ type: "body",
+ rows: body
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, {
+ type: "foot",
+ rows: foot
+ })]
+ }), hasCaption && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "figcaption",
+ value: caption
+ })]
+ });
},
isEligible: attributes => {
return attributes.backgroundColor && attributes.backgroundColor in oldColors && !attributes.style;
@@ -54978,6 +57210,22 @@ const table_deprecated_v2 = {
};
}
};
+const v1Query = {
+ content: {
+ type: 'string',
+ source: 'html'
+ },
+ tag: {
+ type: 'string',
+ default: 'td',
+ source: 'tag'
+ },
+ scope: {
+ type: 'string',
+ source: 'attribute',
+ attribute: 'scope'
+ }
+};
const table_deprecated_v1 = {
attributes: {
hasFixedLayout: {
@@ -54998,22 +57246,7 @@ const table_deprecated_v1 = {
default: [],
source: 'query',
selector: 'td,th',
- query: {
- content: {
- type: 'string',
- source: 'html'
- },
- tag: {
- type: 'string',
- default: 'td',
- source: 'tag'
- },
- scope: {
- type: 'string',
- source: 'attribute',
- attribute: 'scope'
- }
- }
+ query: v1Query
}
}
},
@@ -55028,22 +57261,7 @@ const table_deprecated_v1 = {
default: [],
source: 'query',
selector: 'td,th',
- query: {
- content: {
- type: 'string',
- source: 'html'
- },
- tag: {
- type: 'string',
- default: 'td',
- source: 'tag'
- },
- scope: {
- type: 'string',
- source: 'attribute',
- attribute: 'scope'
- }
- }
+ query: v1Query
}
}
},
@@ -55058,22 +57276,7 @@ const table_deprecated_v1 = {
default: [],
source: 'query',
selector: 'td,th',
- query: {
- content: {
- type: 'string',
- source: 'html'
- },
- tag: {
- type: 'string',
- default: 'td',
- source: 'tag'
- },
- scope: {
- type: 'string',
- source: 'attribute',
- attribute: 'scope'
- }
- }
+ query: v1Query
}
}
}
@@ -55096,7 +57299,7 @@ const table_deprecated_v1 = {
return null;
}
const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)('background-color', backgroundColor);
- const classes = classnames_default()(backgroundClass, {
+ const classes = dist_clsx(backgroundClass, {
'has-fixed-layout': hasFixedLayout,
'has-background': !!backgroundClass
});
@@ -55108,33 +57311,35 @@ const table_deprecated_v1 = {
return null;
}
const Tag = `t${type}`;
- return (0,external_React_namespaceObject.createElement)(Tag, null, rows.map(({
- cells
- }, rowIndex) => (0,external_React_namespaceObject.createElement)("tr", {
- key: rowIndex
- }, cells.map(({
- content,
- tag,
- scope
- }, cellIndex) => (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: tag,
- value: content,
- key: cellIndex,
- scope: tag === 'th' ? scope : undefined
- })))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, {
+ children: rows.map(({
+ cells
+ }, rowIndex) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("tr", {
+ children: cells.map(({
+ content,
+ tag,
+ scope
+ }, cellIndex) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: tag,
+ value: content,
+ scope: tag === 'th' ? scope : undefined
+ }, cellIndex))
+ }, rowIndex))
+ });
};
- return (0,external_React_namespaceObject.createElement)("table", {
- className: classes
- }, (0,external_React_namespaceObject.createElement)(Section, {
- type: "head",
- rows: head
- }), (0,external_React_namespaceObject.createElement)(Section, {
- type: "body",
- rows: body
- }), (0,external_React_namespaceObject.createElement)(Section, {
- type: "foot",
- rows: foot
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("table", {
+ className: classes,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, {
+ type: "head",
+ rows: head
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, {
+ type: "body",
+ rows: body
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, {
+ type: "foot",
+ rows: foot
+ })]
+ });
}
};
@@ -55146,146 +57351,156 @@ const table_deprecated_v1 = {
*
* See block-deprecation.md
*/
-/* harmony default export */ const table_deprecated = ([table_deprecated_v3, table_deprecated_v2, table_deprecated_v1]);
+/* harmony default export */ const table_deprecated = ([table_deprecated_v4, table_deprecated_v3, table_deprecated_v2, table_deprecated_v1]);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/align-left.js
-
/**
* WordPress dependencies
*/
-const alignLeft = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const alignLeft = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
+ d: "M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"
+ })
+});
/* harmony default export */ const align_left = (alignLeft);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/align-center.js
-
/**
* WordPress dependencies
*/
-const alignCenter = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const alignCenter = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
+ d: "M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"
+ })
+});
/* harmony default export */ const align_center = (alignCenter);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/align-right.js
-
/**
* WordPress dependencies
*/
-const alignRight = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const alignRight = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
+ d: "M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"
+ })
+});
/* harmony default export */ const align_right = (alignRight);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table-row-before.js
-
/**
* WordPress dependencies
*/
-const tableRowBefore = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const tableRowBefore = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
- viewBox: "-2 -2 24 24"
-}, (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"
-}));
+ viewBox: "-2 -2 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const table_row_before = (tableRowBefore);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table-row-after.js
-
/**
* WordPress dependencies
*/
-const tableRowAfter = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const tableRowAfter = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
- viewBox: "-2 -2 24 24"
-}, (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"
-}));
+ viewBox: "-2 -2 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const table_row_after = (tableRowAfter);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table-row-delete.js
-
/**
* WordPress dependencies
*/
-const tableRowDelete = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const tableRowDelete = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
- viewBox: "-2 -2 24 24"
-}, (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"
-}));
+ viewBox: "-2 -2 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const table_row_delete = (tableRowDelete);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table-column-before.js
-
/**
* WordPress dependencies
*/
-const tableColumnBefore = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const tableColumnBefore = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
- viewBox: "-2 -2 24 24"
-}, (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"
-}));
+ viewBox: "-2 -2 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const table_column_before = (tableColumnBefore);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table-column-after.js
-
/**
* WordPress dependencies
*/
-const tableColumnAfter = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const tableColumnAfter = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
- viewBox: "-2 -2 24 24"
-}, (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"
-}));
+ viewBox: "-2 -2 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const table_column_after = (tableColumnAfter);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table-column-delete.js
-
/**
* WordPress dependencies
*/
-const tableColumnDelete = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const tableColumnDelete = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
- viewBox: "-2 -2 24 24"
-}, (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"
-}));
+ viewBox: "-2 -2 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const table_column_delete = (tableColumnDelete);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table.js
-
/**
* WordPress dependencies
*/
-const table = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const table = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "M4 6v11.5h16V6H4zm1.5 1.5h6V11h-6V7.5zm0 8.5v-3.5h6V16h-6zm13 0H13v-3.5h5.5V16zM13 11V7.5h5.5V11H13z"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_table = (table);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table/state.js
@@ -55587,7 +57802,6 @@ function isEmptyRow(row) {
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table/edit.js
-
/**
* External dependencies
*/
@@ -55607,6 +57821,9 @@ function isEmptyRow(row) {
* Internal dependencies
*/
+
+
+
const ALIGNMENT_CONTROLS = [{
icon: align_left,
title: (0,external_wp_i18n_namespaceObject.__)('Align column left'),
@@ -55634,7 +57851,7 @@ function TSection({
...props
}) {
const TagName = `t${name}`;
- return (0,external_React_namespaceObject.createElement)(TagName, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
...props
});
}
@@ -55920,143 +58137,156 @@ function TableEdit({
isDisabled: !selectedCell,
onClick: onDeleteColumn
}];
- const renderedSections = sections.map(name => (0,external_React_namespaceObject.createElement)(TSection, {
+ const renderedSections = sections.map(name => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TSection, {
name: name,
- key: name
- }, attributes[name].map(({
- cells
- }, rowIndex) => (0,external_React_namespaceObject.createElement)("tr", {
- key: rowIndex
- }, cells.map(({
- content,
- tag: CellTag,
- scope,
- align,
- colspan,
- rowspan
- }, columnIndex) => (0,external_React_namespaceObject.createElement)(CellTag, {
- key: columnIndex,
- scope: CellTag === 'th' ? scope : undefined,
- colSpan: colspan,
- rowSpan: rowspan,
- className: classnames_default()({
- [`has-text-align-${align}`]: align
- }, 'wp-block-table__cell-content')
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, {
- value: content,
- onChange: onChange,
- onFocus: () => {
- setSelectedCell({
- sectionName: name,
- rowIndex,
- columnIndex,
- type: 'cell'
- });
- },
- "aria-label": cellAriaLabel[name],
- placeholder: edit_placeholder[name]
- })))))));
+ children: attributes[name].map(({
+ cells
+ }, rowIndex) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("tr", {
+ children: cells.map(({
+ content,
+ tag: CellTag,
+ scope,
+ align,
+ colspan,
+ rowspan
+ }, columnIndex) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CellTag, {
+ scope: CellTag === 'th' ? scope : undefined,
+ colSpan: colspan,
+ rowSpan: rowspan,
+ className: dist_clsx({
+ [`has-text-align-${align}`]: align
+ }, 'wp-block-table__cell-content'),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
+ value: content,
+ onChange: onChange,
+ onFocus: () => {
+ setSelectedCell({
+ sectionName: name,
+ rowIndex,
+ columnIndex,
+ type: 'cell'
+ });
+ },
+ "aria-label": cellAriaLabel[name],
+ placeholder: edit_placeholder[name]
+ })
+ }, columnIndex))
+ }, rowIndex))
+ }, name));
const isEmpty = !sections.length;
- return (0,external_React_namespaceObject.createElement)("figure", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({
ref: tableRef
- })
- }, !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_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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, {
- group: "other"
- }, (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_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_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_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_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_React_namespaceObject.createElement)("table", {
- className: classnames_default()(colorProps.className, borderProps.className, {
- 'has-fixed-layout': hasFixedLayout,
- // This is required in the editor only to overcome
- // the fact the editor rewrites individual border
- // widths into a shorthand format.
- 'has-individual-borders': (0,external_wp_components_namespaceObject.__experimentalHasSplitBorders)(attributes?.style?.border)
}),
- style: {
- ...colorProps.style,
- ...borderProps.style
- }
- }, renderedSections), !isEmpty && (0,external_React_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.__)('Table caption text'),
- placeholder: (0,external_wp_i18n_namespaceObject.__)('Add caption'),
- value: caption,
- onChange: value => setAttributes({
- caption: value
- })
- // Deselect the selected table cell when the caption is focused.
- ,
- onFocus: () => setSelectedCell(),
- __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()))
- }), isEmpty && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, {
- label: (0,external_wp_i18n_namespaceObject.__)('Table'),
- 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_React_namespaceObject.createElement)("form", {
- className: "blocks-table__placeholder-form",
- onSubmit: onCreateTable
- }, (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_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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- __next40pxDefaultSize: true,
- variant: "primary",
- type: "submit"
- }, (0,external_wp_i18n_namespaceObject.__)('Create Table')))));
+ children: [!isEmpty && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Change column alignment'),
+ alignmentControls: ALIGNMENT_CONTROLS,
+ value: getCellAlignment(),
+ onChange: nextAlign => onChangeColumnAlignment(nextAlign)
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "other",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarDropdownMenu, {
+ hasArrowIndicator: true,
+ icon: library_table,
+ label: (0,external_wp_i18n_namespaceObject.__)('Edit table'),
+ controls: tableControls
+ })
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ className: "blocks-table-settings",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Fixed width table cells'),
+ checked: !!hasFixedLayout,
+ onChange: onChangeFixedLayout
+ }), !isEmpty && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Header section'),
+ checked: !!(head && head.length),
+ onChange: onToggleHeaderSection
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Footer section'),
+ checked: !!(foot && foot.length),
+ onChange: onToggleFooterSection
+ })]
+ })]
+ })
+ }), !isEmpty && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("table", {
+ className: dist_clsx(colorProps.className, borderProps.className, {
+ 'has-fixed-layout': hasFixedLayout,
+ // This is required in the editor only to overcome
+ // the fact the editor rewrites individual border
+ // widths into a shorthand format.
+ 'has-individual-borders': (0,external_wp_components_namespaceObject.__experimentalHasSplitBorders)(attributes?.style?.border)
+ }),
+ style: {
+ ...colorProps.style,
+ ...borderProps.style
+ },
+ children: renderedSections
+ }), !isEmpty && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
+ identifier: "caption",
+ tagName: "figcaption",
+ className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'),
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Table caption text'),
+ placeholder: (0,external_wp_i18n_namespaceObject.__)('Add caption'),
+ value: caption,
+ onChange: value => setAttributes({
+ caption: value
+ })
+ // Deselect the selected table cell when the caption is focused.
+ ,
+ onFocus: () => setSelectedCell(),
+ __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()))
+ }), isEmpty && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Table'),
+ icon: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, {
+ icon: block_table,
+ showColors: true
+ }),
+ instructions: (0,external_wp_i18n_namespaceObject.__)('Insert a table for sharing data.'),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("form", {
+ className: "blocks-table__placeholder-form",
+ onSubmit: onCreateTable,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ __next40pxDefaultSize: true,
+ variant: "primary",
+ type: "submit",
+ children: (0,external_wp_i18n_namespaceObject.__)('Create Table')
+ })]
+ })
+ })]
+ });
}
/* harmony default export */ const table_edit = (TableEdit);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table/save.js
-
/**
* External dependencies
*/
@@ -56066,6 +58296,8 @@ function TableEdit({
* WordPress dependencies
*/
+
+
function table_save_save({
attributes
}) {
@@ -56082,7 +58314,7 @@ function table_save_save({
}
const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
- const classes = classnames_default()(colorProps.className, borderProps.className, {
+ const classes = dist_clsx(colorProps.className, borderProps.className, {
'has-fixed-layout': hasFixedLayout
});
const hasCaption = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption);
@@ -56094,55 +58326,58 @@ function table_save_save({
return null;
}
const Tag = `t${type}`;
- return (0,external_React_namespaceObject.createElement)(Tag, null, rows.map(({
- cells
- }, rowIndex) => (0,external_React_namespaceObject.createElement)("tr", {
- key: rowIndex
- }, cells.map(({
- content,
- tag,
- scope,
- align,
- colspan,
- rowspan
- }, cellIndex) => {
- const cellClasses = classnames_default()({
- [`has-text-align-${align}`]: align
- });
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- className: cellClasses ? cellClasses : undefined,
- "data-align": align,
- tagName: tag,
- value: content,
- key: cellIndex,
- scope: tag === 'th' ? scope : undefined,
- colSpan: colspan,
- rowSpan: rowspan
- });
- }))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, {
+ children: rows.map(({
+ cells
+ }, rowIndex) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("tr", {
+ children: cells.map(({
+ content,
+ tag,
+ scope,
+ align,
+ colspan,
+ rowspan
+ }, cellIndex) => {
+ const cellClasses = dist_clsx({
+ [`has-text-align-${align}`]: align
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ className: cellClasses ? cellClasses : undefined,
+ "data-align": align,
+ tagName: tag,
+ value: content,
+ scope: tag === 'th' ? scope : undefined,
+ colSpan: colspan,
+ rowSpan: rowspan
+ }, cellIndex);
+ })
+ }, rowIndex))
+ });
};
- return (0,external_React_namespaceObject.createElement)("figure", {
- ...external_wp_blockEditor_namespaceObject.useBlockProps.save()
- }, (0,external_React_namespaceObject.createElement)("table", {
- className: classes === '' ? undefined : classes,
- style: {
- ...colorProps.style,
- ...borderProps.style
- }
- }, (0,external_React_namespaceObject.createElement)(Section, {
- type: "head",
- rows: head
- }), (0,external_React_namespaceObject.createElement)(Section, {
- type: "body",
- rows: body
- }), (0,external_React_namespaceObject.createElement)(Section, {
- type: "foot",
- rows: foot
- })), hasCaption && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "figcaption",
- value: caption,
- className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption')
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
+ ...external_wp_blockEditor_namespaceObject.useBlockProps.save(),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("table", {
+ className: classes === '' ? undefined : classes,
+ style: {
+ ...colorProps.style,
+ ...borderProps.style
+ },
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, {
+ type: "head",
+ rows: head
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, {
+ type: "body",
+ rows: body
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, {
+ type: "foot",
+ rows: foot
+ })]
+ }), hasCaption && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "figcaption",
+ value: caption,
+ className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption')
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table/utils.js
@@ -56274,7 +58509,7 @@ const table_metadata = {
attributes: {
hasFixedLayout: {
type: "boolean",
- "default": false
+ "default": true
},
caption: {
type: "rich-text",
@@ -56547,25 +58782,29 @@ const table_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table-of-contents.js
-
/**
* WordPress dependencies
*/
-const tableOfContents = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+
+const tableOfContents = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(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, {
- 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"
-}));
+ viewBox: "0 0 24 24",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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"
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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
+
+
/**
* External dependencies
*/
@@ -56580,27 +58819,33 @@ function TableOfContentsList({
disableLinkActivation,
onClick
}) {
- 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_React_namespaceObject.createElement)("a", {
- className: ENTRY_CLASS_NAME,
- 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_React_namespaceObject.createElement)("li", {
- key: index
- }, 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);
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: nestedHeadingList.map((node, index) => {
+ const {
+ content,
+ link
+ } = node.heading;
+ const entry = link ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ className: ENTRY_CLASS_NAME,
+ href: link,
+ "aria-disabled": disableLinkActivation || undefined,
+ onClick: disableLinkActivation && 'function' === typeof onClick ? onClick : undefined,
+ children: content
+ }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ className: ENTRY_CLASS_NAME,
+ children: content
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", {
+ children: [entry, node.children ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ol", {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TableOfContentsList, {
+ nestedHeadingList: node.children,
+ disableLinkActivation: disableLinkActivation,
+ onClick: disableLinkActivation && 'function' === typeof onClick ? onClick : undefined
+ })
+ }) : null]
+ }, index);
+ })
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table-of-contents/utils.js
@@ -56796,7 +59041,6 @@ function useObserveHeadings(clientId) {
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table-of-contents/edit.js
-
/**
* WordPress dependencies
*/
@@ -56831,6 +59075,9 @@ function useObserveHeadings(clientId) {
*
* @return {Component} The component.
*/
+
+
+
function TableOfContentsEdit({
attributes: {
headings = [],
@@ -56871,51 +59118,66 @@ function TableOfContentsEdit({
replaceBlocks
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
const headingTree = linearToNestedHeadingList(headings);
- 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_React_namespaceObject.createElement)(TableOfContentsList, {
- nestedHeadingList: headingTree
- }))
- }))
- }, (0,external_wp_i18n_namespaceObject.__)('Convert to static list'))));
- 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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Only include current page'),
- checked: onlyIncludeCurrentPage,
- onChange: value => setAttributes({
- onlyIncludeCurrentPage: value
- }),
- help: onlyIncludeCurrentPage ? (0,external_wp_i18n_namespaceObject.__)('Only including headings from the current page (if the post is paginated).') : (0,external_wp_i18n_namespaceObject.__)('Toggle to only include headings from the current page (if the post is paginated).')
- })));
+ const toolbarControls = canInsertList && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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)( /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TableOfContentsList, {
+ nestedHeadingList: headingTree
+ }))
+ })),
+ children: (0,external_wp_i18n_namespaceObject.__)('Convert to static list')
+ })
+ })
+ });
+ const inspectorControls = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Only include current page'),
+ checked: onlyIncludeCurrentPage,
+ onChange: value => setAttributes({
+ onlyIncludeCurrentPage: value
+ }),
+ help: onlyIncludeCurrentPage ? (0,external_wp_i18n_namespaceObject.__)('Only including headings from the current page (if the post is paginated).') : (0,external_wp_i18n_namespaceObject.__)('Toggle to only include headings from the current page (if the post is paginated).')
+ })
+ })
+ });
// If there are no headings or the only heading is empty.
// 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_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (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 /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, {
+ icon: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("nav", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)("ol", null, (0,external_React_namespaceObject.createElement)(TableOfContentsList, {
- nestedHeadingList: headingTree,
- disableLinkActivation: true,
- onClick: showRedirectionPreventedNotice
- }))), toolbarControls, inspectorControls);
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("nav", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ol", {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TableOfContentsList, {
+ nestedHeadingList: headingTree,
+ disableLinkActivation: true,
+ onClick: showRedirectionPreventedNotice
+ })
+ })
+ }), toolbarControls, inspectorControls]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table-of-contents/save.js
-
/**
* WordPress dependencies
*/
@@ -56926,6 +59188,7 @@ function TableOfContentsEdit({
*/
+
function table_of_contents_save_save({
attributes: {
headings = []
@@ -56934,11 +59197,14 @@ function table_of_contents_save_save({
if (headings.length === 0) {
return null;
}
- return (0,external_React_namespaceObject.createElement)("nav", {
- ...external_wp_blockEditor_namespaceObject.useBlockProps.save()
- }, (0,external_React_namespaceObject.createElement)("ol", null, (0,external_React_namespaceObject.createElement)(TableOfContentsList, {
- nestedHeadingList: linearToNestedHeadingList(headings)
- })));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("nav", {
+ ...external_wp_blockEditor_namespaceObject.useBlockProps.save(),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ol", {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TableOfContentsList, {
+ nestedHeadingList: linearToNestedHeadingList(headings)
+ })
+ })
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table-of-contents/index.js
@@ -57042,7 +59308,6 @@ const 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
-
/**
* WordPress dependencies
*/
@@ -57058,6 +59323,9 @@ const tag_cloud_transforms_transforms = {
*
* @type {number}
*/
+
+
+
const MIN_TAGS = 1;
/**
@@ -57123,64 +59391,76 @@ function TagCloudEdit({
});
setAttributes(updateObj);
};
- 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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Taxonomy'),
- options: getTaxonomyOptions(),
- value: taxonomy,
- onChange: selectedTaxonomy => setAttributes({
- taxonomy: selectedTaxonomy
- })
- }), (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
+ const inspectorControls = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SelectControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Taxonomy'),
+ options: getTaxonomyOptions(),
+ value: taxonomy,
+ onChange: selectedTaxonomy => setAttributes({
+ taxonomy: selectedTaxonomy
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Show post counts'),
+ checked: showTagCounts,
+ onChange: () => setAttributes({
+ showTagCounts: !showTagCounts
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.RangeControl, {
+ __nextHasNoMarginBottom: true,
+ __next40pxDefaultSize: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Number of tags'),
+ value: numberOfTags,
+ onChange: value => setAttributes({
+ numberOfTags: value
+ }),
+ min: MIN_TAGS,
+ max: MAX_TAGS,
+ required: true
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Flex, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
+ isBlock: true,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalUnitControl, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Smallest size'),
+ value: smallestFontSize,
+ onChange: value => {
+ onFontSizeChange('smallestFontSize', value);
+ },
+ units: units,
+ min: MIN_FONT_SIZE,
+ max: MAX_FONT_SIZE
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
+ isBlock: true,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalUnitControl, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Largest size'),
+ value: largestFontSize,
+ onChange: value => {
+ onFontSizeChange('largestFontSize', value);
+ },
+ units: units,
+ min: MIN_FONT_SIZE,
+ max: MAX_FONT_SIZE
+ })
+ })]
+ })]
})
- }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, {
- __nextHasNoMarginBottom: true,
- __next40pxDefaultSize: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Number of tags'),
- value: numberOfTags,
- onChange: value => setAttributes({
- numberOfTags: value
- }),
- min: MIN_TAGS,
- max: MAX_TAGS,
- required: true
- }), (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalUnitControl, {
- label: (0,external_wp_i18n_namespaceObject.__)('Smallest size'),
- value: smallestFontSize,
- onChange: value => {
- onFontSizeChange('smallestFontSize', value);
- },
- units: units,
- min: MIN_FONT_SIZE,
- max: MAX_FONT_SIZE
- })), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, {
- isBlock: true
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalUnitControl, {
- label: (0,external_wp_i18n_namespaceObject.__)('Largest size'),
- value: largestFontSize,
- onChange: value => {
- onFontSizeChange('largestFontSize', value);
- },
- units: units,
- min: MIN_FONT_SIZE,
- max: MAX_FONT_SIZE
- })))));
- 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_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
- }))));
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [inspectorControls, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)((external_wp_serverSideRender_default()), {
+ skipBlockSupportAttributes: true,
+ block: "core/tag-cloud",
+ attributes: attributes
+ })
+ })
+ })]
+ });
}
/* harmony default export */ const tag_cloud_edit = (TagCloudEdit);
@@ -57747,17 +60027,18 @@ function capitalCase(input, options) {
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/symbol-filled.js
-
/**
* WordPress dependencies
*/
-const symbolFilled = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const symbolFilled = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const symbol_filled = (symbolFilled);
;// CONCATENATED MODULE: ./node_modules/dot-case/dist.es2015/index.js
@@ -57910,13 +60191,14 @@ function useTemplatePartArea(area) {
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/template-part/edit/title-modal.js
-
/**
* WordPress dependencies
*/
+
+
function TitleModal({
areaLabel,
onClose,
@@ -57929,33 +60211,37 @@ function TitleModal({
event.preventDefault();
onSubmit(title);
};
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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_React_namespaceObject.createElement)("form", {
- onSubmit: submitForCreation
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, {
- spacing: "5"
- }, (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
- justify: "right"
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- variant: "primary",
- type: "submit",
- disabled: !title.length,
- "aria-disabled": !title.length
- }, (0,external_wp_i18n_namespaceObject.__)('Create'))))));
+ onRequestClose: onClose,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("form", {
+ onSubmit: submitForCreation,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
+ spacing: "5",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Name'),
+ value: title,
+ onChange: setTitle
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHStack, {
+ justify: "right",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ variant: "primary",
+ type: "submit",
+ __experimentalIsFocusable: true,
+ disabled: !title.length,
+ children: (0,external_wp_i18n_namespaceObject.__)('Create')
+ })
+ })]
+ })
+ })
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/template-part/edit/placeholder.js
-
/**
* WordPress dependencies
*/
@@ -57968,6 +60254,8 @@ function TitleModal({
*/
+
+
function TemplatePartPlaceholder({
area,
clientId,
@@ -57983,36 +60271,62 @@ function TemplatePartPlaceholder({
const [showTitleModal, setShowTitleModal] = (0,external_wp_element_namespaceObject.useState)(false);
const areaObject = useTemplatePartArea(area);
const createFromBlocks = useCreateTemplatePartFromBlocks(area, setAttributes);
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(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_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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- variant: "secondary",
- onClick: () => {
- setShowTitleModal(true);
- }
- }, (0,external_wp_i18n_namespaceObject.__)('Start blank')), showTitleModal && (0,external_React_namespaceObject.createElement)(TitleModal, {
- areaLabel: areaObject.label,
- onClose: () => setShowTitleModal(false),
- onSubmit: title => {
- createFromBlocks([], title);
- }
- }));
+ (0,external_wp_i18n_namespaceObject.__)('Choose an existing %s or create a new one.'), areaObject.label.toLowerCase()),
+ children: [isResolving && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}), !isResolving && !!(templateParts.length || blockPatterns.length) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ variant: "primary",
+ onClick: onOpenSelectionModal,
+ children: (0,external_wp_i18n_namespaceObject.__)('Choose')
+ }), !isResolving && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ variant: "secondary",
+ onClick: () => {
+ setShowTitleModal(true);
+ },
+ children: (0,external_wp_i18n_namespaceObject.__)('Start blank')
+ }), showTitleModal && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TitleModal, {
+ areaLabel: areaObject.label,
+ onClose: () => setShowTitleModal(false),
+ onSubmit: title => {
+ createFromBlocks([], title);
+ }
+ })]
+ });
}
-;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/template-part/edit/selection-modal.js
-
+;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/template-part/edit/utils/map-template-part-to-block-pattern.js
/**
* WordPress dependencies
*/
+/**
+ * Internal dependencies
+ */
+
+
+/**
+ * This maps the properties of a template part to those of a block pattern.
+ * @param {Object} templatePart
+ * @return {Object} The template part in the shape of block pattern.
+ */
+function mapTemplatePartToBlockPattern(templatePart) {
+ return {
+ name: createTemplatePartId(templatePart.theme, templatePart.slug),
+ title: templatePart.title.rendered,
+ blocks: (0,external_wp_blocks_namespaceObject.parse)(templatePart.content.raw),
+ templatePart
+ };
+}
+
+;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/template-part/edit/selection-modal.js
+/**
+ * WordPress dependencies
+ */
+
@@ -58026,6 +60340,8 @@ function TemplatePartPlaceholder({
+
+
function TemplatePartSelectionModal({
setAttributes,
onClose,
@@ -58037,14 +60353,10 @@ function TemplatePartSelectionModal({
const {
templateParts
} = useAlternativeTemplateParts(area, templatePartId);
+
// We can map template parts to block patters to reuse the BlockPatternsList UI
const filteredTemplateParts = (0,external_wp_element_namespaceObject.useMemo)(() => {
- const partsAsPatterns = templateParts.map(templatePart => ({
- name: createTemplatePartId(templatePart.theme, templatePart.slug),
- title: templatePart.title.rendered,
- blocks: (0,external_wp_blocks_namespaceObject.parse)(templatePart.content.raw),
- templatePart
- }));
+ const partsAsPatterns = templateParts.map(templatePart => mapTemplatePartToBlockPattern(templatePart));
return searchPatterns(partsAsPatterns, searchValue);
}, [templateParts, searchValue]);
const shownTemplateParts = (0,external_wp_compose_namespaceObject.useAsyncList)(filteredTemplateParts);
@@ -58052,7 +60364,6 @@ function TemplatePartSelectionModal({
const filteredBlockPatterns = (0,external_wp_element_namespaceObject.useMemo)(() => {
return searchPatterns(blockPatterns, searchValue);
}, [blockPatterns, searchValue]);
- const shownBlockPatterns = (0,external_wp_compose_namespaceObject.useAsyncList)(filteredBlockPatterns);
const {
createSuccessNotice
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
@@ -58068,35 +60379,36 @@ function TemplatePartSelectionModal({
});
onClose();
};
- const createFromBlocks = useCreateTemplatePartFromBlocks(area, setAttributes);
const hasTemplateParts = !!filteredTemplateParts.length;
const hasBlockPatterns = !!filteredBlockPatterns.length;
- return (0,external_React_namespaceObject.createElement)("div", {
- className: "block-library-template-part__selection-content"
- }, (0,external_React_namespaceObject.createElement)("div", {
- className: "block-library-template-part__selection-search"
- }, (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_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_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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
- alignment: "center"
- }, (0,external_React_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('No results found.'))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ className: "block-library-template-part__selection-content",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "block-library-template-part__selection-search",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", {
+ children: (0,external_wp_i18n_namespaceObject.__)('Existing template parts')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalBlockPatternsList, {
+ blockPatterns: filteredTemplateParts,
+ shownPatterns: shownTemplateParts,
+ onClickPattern: pattern => {
+ onTemplatePartSelect(pattern.templatePart);
+ }
+ })]
+ }), !hasTemplateParts && !hasBlockPatterns && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHStack, {
+ alignment: "center",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
+ children: (0,external_wp_i18n_namespaceObject.__)('No results found.')
+ })
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/template-part/edit/utils/transformers.js
@@ -58175,7 +60487,6 @@ function transformInnerBlocks(innerBlocks = []) {
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/template-part/edit/import-controls.js
-
/**
* WordPress dependencies
*/
@@ -58191,6 +60502,8 @@ function transformInnerBlocks(innerBlocks = []) {
*/
+
+
const SIDEBARS_QUERY = {
per_page: -1,
_fields: 'id,name,description,status,widgets'
@@ -58238,7 +60551,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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalSpacer, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
marginBottom: "0"
});
}
@@ -58284,35 +60597,40 @@ function TemplatePartImportControls({
}
setIsBusy(false);
}
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalSpacer, {
- marginBottom: "4"
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
- as: "form",
- onSubmit: createFromWidgets
- }, (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,
- __next40pxDefaultSize: true,
- __nextHasNoMarginBottom: true
- })), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, {
- style: {
- marginBottom: '8px',
- marginTop: 'auto'
- }
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- __next40pxDefaultSize: true,
- variant: "primary",
- type: "submit",
- isBusy: isBusy,
- "aria-disabled": isBusy || !selectedSidebar
- }, (0,external_wp_i18n_namespaceObject._x)('Import', 'button label')))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
+ marginBottom: "4",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
+ as: "form",
+ onSubmit: createFromWidgets,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexBlock, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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,
+ __next40pxDefaultSize: true,
+ __nextHasNoMarginBottom: true
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
+ style: {
+ marginBottom: '8px',
+ marginTop: 'auto'
+ },
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ __next40pxDefaultSize: true,
+ variant: "primary",
+ type: "submit",
+ isBusy: isBusy,
+ "aria-disabled": isBusy || !selectedSidebar,
+ children: (0,external_wp_i18n_namespaceObject._x)('Import', 'button label')
+ })
+ })]
+ })
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/template-part/edit/advanced-controls.js
-
/**
* WordPress dependencies
*/
@@ -58325,6 +60643,9 @@ function TemplatePartImportControls({
* Internal dependencies
*/
+
+
+
const htmlElementMessages = {
header: (0,external_wp_i18n_namespaceObject.__)('The <header> element should represent introductory content, typically a group of introductory or navigational aids.'),
main: (0,external_wp_i18n_namespaceObject.__)('The <main> element should be used for the primary content of your document only.'),
@@ -58356,77 +60677,90 @@ function TemplatePartAdvancedControls({
label,
value: _area
}));
- 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,
- onChange: value => {
- setTitle(value);
- },
- onFocus: event => event.target.select()
- }), (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_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. */
- (0,external_wp_i18n_namespaceObject.__)('Default based on area (%s)'), `<${defaultWrapper}>`),
- value: ''
- }, {
- label: '<header>',
- value: 'header'
- }, {
- label: '<main>',
- value: 'main'
- }, {
- label: '<section>',
- value: 'section'
- }, {
- label: '<article>',
- value: 'article'
- }, {
- label: '<aside>',
- value: 'aside'
- }, {
- label: '<footer>',
- value: 'footer'
- }, {
- label: '<div>',
- value: 'div'
- }],
- value: tagName || '',
- onChange: value => setAttributes({
- tagName: value
- }),
- help: htmlElementMessages[tagName]
- }), !hasInnerBlocks && (0,external_React_namespaceObject.createElement)(TemplatePartImportControls, {
- area: area,
- setAttributes: setAttributes
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [isEntityAvailable && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Title'),
+ value: title,
+ onChange: value => {
+ setTitle(value);
+ },
+ onFocus: event => event.target.select()
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SelectControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Area'),
+ labelPosition: "top",
+ options: areaOptions,
+ value: area,
+ onChange: setArea
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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. */
+ (0,external_wp_i18n_namespaceObject.__)('Default based on area (%s)'), `<${defaultWrapper}>`),
+ value: ''
+ }, {
+ label: '<header>',
+ value: 'header'
+ }, {
+ label: '<main>',
+ value: 'main'
+ }, {
+ label: '<section>',
+ value: 'section'
+ }, {
+ label: '<article>',
+ value: 'article'
+ }, {
+ label: '<aside>',
+ value: 'aside'
+ }, {
+ label: '<footer>',
+ value: 'footer'
+ }, {
+ label: '<div>',
+ value: 'div'
+ }],
+ value: tagName || '',
+ onChange: value => setAttributes({
+ tagName: value
+ }),
+ help: htmlElementMessages[tagName]
+ }), !hasInnerBlocks && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TemplatePartImportControls, {
+ area: area,
+ setAttributes: setAttributes
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/template-part/edit/inner-blocks.js
-
/**
* WordPress dependencies
*/
-function TemplatePartInnerBlocks({
- postId: id,
- hasInnerBlocks,
- layout,
- tagName: TagName,
- blockProps
-}) {
+
+
+
+function useRenderAppender(hasInnerBlocks) {
+ const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
+ // Disable appending when the editing mode is 'contentOnly'. This is so that the user can't
+ // append into a template part when editing a page in the site editor. See
+ // DisableNonPageContentBlocks. Ideally instead of (mis)using editing mode there would be a
+ // block editor API for achieving this.
+ if (blockEditingMode === 'contentOnly') {
+ return false;
+ }
+ if (!hasInnerBlocks) {
+ return external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender;
+ }
+}
+function useLayout(layout) {
const themeSupportsLayout = (0,external_wp_data_namespaceObject.useSelect)(select => {
const {
getSettings
@@ -58434,7 +60768,65 @@ function TemplatePartInnerBlocks({
return getSettings()?.supportsLayout;
}, []);
const [defaultLayout] = (0,external_wp_blockEditor_namespaceObject.useSettings)('layout');
- const usedLayout = layout?.inherit ? defaultLayout || {} : layout;
+ if (themeSupportsLayout) {
+ return layout?.inherit ? defaultLayout || {} : layout;
+ }
+}
+function NonEditableTemplatePartPreview({
+ postId: id,
+ layout,
+ tagName: TagName,
+ blockProps
+}) {
+ (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)('disabled');
+ const {
+ content,
+ editedBlocks
+ } = (0,external_wp_data_namespaceObject.useSelect)(select => {
+ if (!id) {
+ return {};
+ }
+ const {
+ getEditedEntityRecord
+ } = select(external_wp_coreData_namespaceObject.store);
+ const editedRecord = getEditedEntityRecord('postType', 'wp_template_part', id, {
+ context: 'view'
+ });
+ return {
+ editedBlocks: editedRecord.blocks,
+ content: editedRecord.content
+ };
+ }, [id]);
+ const blocks = (0,external_wp_element_namespaceObject.useMemo)(() => {
+ if (!id) {
+ return undefined;
+ }
+ if (editedBlocks) {
+ return editedBlocks;
+ }
+ if (!content || typeof content !== 'string') {
+ return [];
+ }
+ return (0,external_wp_blocks_namespaceObject.parse)(content);
+ }, [id, editedBlocks, content]);
+ const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
+ value: blocks,
+ onInput: () => {},
+ onChange: () => {},
+ renderAppender: false,
+ layout: useLayout(layout)
+ });
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
+ ...innerBlocksProps
+ });
+}
+function EditableTemplatePartInnerBlocks({
+ postId: id,
+ hasInnerBlocks,
+ layout,
+ tagName: TagName,
+ blockProps
+}) {
const [blocks, onInput, onChange] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)('postType', 'wp_template_part', {
id
});
@@ -58442,16 +60834,44 @@ function TemplatePartInnerBlocks({
value: blocks,
onInput,
onChange,
- renderAppender: hasInnerBlocks ? undefined : external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender,
- layout: themeSupportsLayout ? usedLayout : undefined
+ renderAppender: useRenderAppender(hasInnerBlocks),
+ layout: useLayout(layout)
});
- return (0,external_React_namespaceObject.createElement)(TagName, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
...innerBlocksProps
});
}
+function TemplatePartInnerBlocks({
+ postId: id,
+ hasInnerBlocks,
+ layout,
+ tagName: TagName,
+ blockProps
+}) {
+ const {
+ canViewTemplatePart,
+ canEditTemplatePart
+ } = (0,external_wp_data_namespaceObject.useSelect)(select => {
+ var _select$canUser, _select$canUser2;
+ return {
+ canViewTemplatePart: (_select$canUser = select(external_wp_coreData_namespaceObject.store).canUser('read', 'templates')) !== null && _select$canUser !== void 0 ? _select$canUser : false,
+ canEditTemplatePart: (_select$canUser2 = select(external_wp_coreData_namespaceObject.store).canUser('create', 'templates')) !== null && _select$canUser2 !== void 0 ? _select$canUser2 : false
+ };
+ }, []);
+ if (!canViewTemplatePart) {
+ return null;
+ }
+ const TemplatePartInnerBlocksComponent = canEditTemplatePart ? EditableTemplatePartInnerBlocks : NonEditableTemplatePartPreview;
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TemplatePartInnerBlocksComponent, {
+ postId: id,
+ hasInnerBlocks: hasInnerBlocks,
+ layout: layout,
+ tagName: TagName,
+ blockProps: blockProps
+ });
+}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/template-part/edit/index.js
-
/**
* WordPress dependencies
*/
@@ -58462,6 +60882,9 @@ function TemplatePartInnerBlocks({
+
+
+
/**
* Internal dependencies
*/
@@ -58471,36 +60894,71 @@ function TemplatePartInnerBlocks({
+
+
+
function ReplaceButton({
isEntityAvailable,
area,
- clientId,
templatePartId,
isTemplatePartSelectionOpen,
setIsTemplatePartSelectionOpen
}) {
+ // This hook fetches patterns, so don't run it unconditionally in the main
+ // edit function!
const {
templateParts
} = useAlternativeTemplateParts(area, templatePartId);
- const blockPatterns = useAlternativeBlockPatterns(area, clientId);
- const hasReplacements = !!templateParts.length || !!blockPatterns.length;
+ const hasReplacements = !!templateParts.length;
const canReplace = isEntityAvailable && hasReplacements && (area === 'header' || area === 'footer');
if (!canReplace) {
return null;
}
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
onClick: () => {
setIsTemplatePartSelectionOpen(true);
},
"aria-expanded": isTemplatePartSelectionOpen,
- "aria-haspopup": "dialog"
- }, (0,external_wp_i18n_namespaceObject.__)('Replace'));
+ "aria-haspopup": "dialog",
+ children: (0,external_wp_i18n_namespaceObject.__)('Replace')
+ });
+}
+function TemplatesList({
+ area,
+ clientId,
+ isEntityAvailable,
+ onSelect
+}) {
+ // This hook fetches patterns, so don't run it unconditionally in the main
+ // edit function!
+ const blockPatterns = useAlternativeBlockPatterns(area, clientId);
+ const canReplace = isEntityAvailable && !!blockPatterns.length && (area === 'header' || area === 'footer');
+ const shownTemplates = (0,external_wp_compose_namespaceObject.useAsyncList)(blockPatterns);
+ if (!canReplace) {
+ return null;
+ }
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Design'),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalBlockPatternsList, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Templates'),
+ blockPatterns: blockPatterns,
+ shownPatterns: shownTemplates,
+ onClickPattern: onSelect,
+ showTitle: false
+ })
+ });
}
function TemplatePartEdit({
attributes,
setAttributes,
clientId
}) {
+ const {
+ createSuccessNotice
+ } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
+ const {
+ editEntityRecord
+ } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
const currentTheme = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).getCurrentTheme()?.stylesheet, []);
const {
slug,
@@ -58515,24 +60973,33 @@ function TemplatePartEdit({
isResolved,
hasInnerBlocks,
isMissing,
- area
+ area,
+ onNavigateToEntityRecord,
+ title,
+ canEditTemplate
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
+ var _select$canUser;
const {
getEditedEntityRecord,
hasFinishedResolution
} = select(external_wp_coreData_namespaceObject.store);
const {
- getBlockCount
+ getBlockCount,
+ getSettings
} = 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;
+ const _canEditTemplate = (_select$canUser = select(external_wp_coreData_namespaceObject.store).canUser('create', 'templates')) !== null && _select$canUser !== void 0 ? _select$canUser : false;
return {
hasInnerBlocks: getBlockCount(clientId) > 0,
isResolved: hasResolvedEntity,
isMissing: hasResolvedEntity && (!entityRecord || Object.keys(entityRecord).length === 0),
- area: _area
+ area: _area,
+ onNavigateToEntityRecord: getSettings().onNavigateToEntityRecord,
+ title: entityRecord?.title,
+ canEditTemplate: _canEditTemplate
};
}, [templatePartId, attributes.area, clientId]);
const areaObject = useTemplatePartArea(area);
@@ -58540,120 +61007,164 @@ function TemplatePartEdit({
const isPlaceholder = !slug;
const isEntityAvailable = !isPlaceholder && !isMissing && isResolved;
const TagName = tagName || areaObject.tagName;
+ const onPatternSelect = async pattern => {
+ await editEntityRecord('postType', 'wp_template_part', templatePartId, {
+ blocks: pattern.blocks,
+ content: (0,external_wp_blocks_namespaceObject.serialize)(pattern.blocks)
+ });
+ createSuccessNotice((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: template part title. */
+ (0,external_wp_i18n_namespaceObject.__)('Template Part "%s" updated.'), title || slug), {
+ type: 'snackbar'
+ });
+ };
// 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 (!hasInnerBlocks && (slug && !theme || slug && isMissing)) {
- return (0,external_React_namespaceObject.createElement)(TagName, {
- ...blockProps
- }, (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)));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, {
+ children: (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_React_namespaceObject.createElement)(TagName, {
- ...blockProps
- }, (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_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RecursionProvider, {
- uniqueId: templatePartId
- }, (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: hasInnerBlocks
- })), isPlaceholder && (0,external_React_namespaceObject.createElement)(TagName, {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)(TemplatePartPlaceholder, {
- area: attributes.area,
- templatePartId: templatePartId,
- clientId: clientId,
- setAttributes: setAttributes,
- onOpenSelectionModal: () => setIsTemplatePartSelectionOpen(true)
- })), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockSettingsMenuControls, null, ({
- selectedClientIds
- }) => {
- // Only enable for single selection that matches the current block.
- // Ensures menu item doesn't render multiple times.
- if (!(selectedClientIds.length === 1 && clientId === selectedClientIds[0])) {
- return null;
- }
- return (0,external_React_namespaceObject.createElement)(ReplaceButton, {
- isEntityAvailable,
- area,
- clientId,
- templatePartId,
- isTemplatePartSelectionOpen,
- setIsTemplatePartSelectionOpen
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, {
+ children: (0,external_wp_i18n_namespaceObject.__)('Block cannot be rendered inside itself.')
+ })
});
- }), isEntityAvailable && (0,external_React_namespaceObject.createElement)(TemplatePartInnerBlocks, {
- tagName: TagName,
- blockProps: blockProps,
- postId: templatePartId,
- hasInnerBlocks: hasInnerBlocks,
- layout: layout
- }), !isPlaceholder && !isResolved && (0,external_React_namespaceObject.createElement)(TagName, {
- ...blockProps
- }, (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_React_namespaceObject.createElement)(TemplatePartSelectionModal, {
- templatePartId: templatePartId,
- clientId: clientId,
- area: area,
- setAttributes: setAttributes,
- onClose: () => setIsTemplatePartSelectionOpen(false)
- })));
+ }
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.RecursionProvider, {
+ uniqueId: templatePartId,
+ children: [isEntityAvailable && onNavigateToEntityRecord && canEditTemplate && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "other",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
+ onClick: () => onNavigateToEntityRecord({
+ postId: templatePartId,
+ postType: 'wp_template_part'
+ }),
+ children: (0,external_wp_i18n_namespaceObject.__)('Edit')
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ group: "advanced",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TemplatePartAdvancedControls, {
+ tagName: tagName,
+ setAttributes: setAttributes,
+ isEntityAvailable: isEntityAvailable,
+ templatePartId: templatePartId,
+ defaultWrapper: areaObject.tagName,
+ hasInnerBlocks: hasInnerBlocks
+ })
+ }), isPlaceholder && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TemplatePartPlaceholder, {
+ area: attributes.area,
+ templatePartId: templatePartId,
+ clientId: clientId,
+ setAttributes: setAttributes,
+ onOpenSelectionModal: () => setIsTemplatePartSelectionOpen(true)
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockSettingsMenuControls, {
+ children: ({
+ selectedClientIds
+ }) => {
+ // Only enable for single selection that matches the current block.
+ // Ensures menu item doesn't render multiple times.
+ if (!(selectedClientIds.length === 1 && clientId === selectedClientIds[0])) {
+ return null;
+ }
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ReplaceButton, {
+ isEntityAvailable,
+ area,
+ clientId,
+ templatePartId,
+ isTemplatePartSelectionOpen,
+ setIsTemplatePartSelectionOpen
+ });
+ }
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TemplatesList, {
+ area: area,
+ clientId: clientId,
+ isEntityAvailable: isEntityAvailable,
+ onSelect: pattern => onPatternSelect(pattern)
+ })
+ }), isEntityAvailable && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TemplatePartInnerBlocks, {
+ tagName: TagName,
+ blockProps: blockProps,
+ postId: templatePartId,
+ hasInnerBlocks: hasInnerBlocks,
+ layout: layout
+ }), !isPlaceholder && !isResolved && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {})
+ })]
+ }), isTemplatePartSelectionOpen && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TemplatePartSelectionModal, {
+ templatePartId: templatePartId,
+ clientId: clientId,
+ area: area,
+ setAttributes: setAttributes,
+ onClose: () => setIsTemplatePartSelectionOpen(false)
+ })
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/header.js
-
/**
* WordPress dependencies
*/
-const header = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const header = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_header = (header);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/footer.js
-
/**
* WordPress dependencies
*/
-const footer = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const footer = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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, {
- 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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_footer = (footer);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/sidebar.js
-
/**
* WordPress dependencies
*/
-const sidebar = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const sidebar = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_sidebar = (sidebar);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/template-part/variations.js
@@ -58686,10 +61197,14 @@ function enhanceTemplatePartVariations(settings, name) {
} = blockAttributes;
// We first check the `area` block attribute which is set during insertion.
// This property is removed on the creation of a template part.
- if (area) return area === variationAttributes.area;
+ if (area) {
+ return area === variationAttributes.area;
+ }
// Find a matching variation from the created template part
// by checking the entity's `area` property.
- if (!slug) return false;
+ if (!slug) {
+ return false;
+ }
const {
getCurrentTheme,
getEntityRecord
@@ -58828,21 +61343,21 @@ const template_part_init = () => {
};
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/term-description.js
-
/**
* WordPress dependencies
*/
-const term_description_tag = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const term_description_tag = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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: "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"
-}));
+ viewBox: "0 0 24 24",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const term_description = (term_description_tag);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/term-description/edit.js
-
/**
* External dependencies
*/
@@ -58853,6 +61368,9 @@ const term_description_tag = (0,external_React_namespaceObject.createElement)(ex
*/
+
+
+
function TermDescriptionEdit({
attributes,
setAttributes,
@@ -58862,25 +61380,32 @@ function TermDescriptionEdit({
textAlign
} = attributes;
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()({
+ className: dist_clsx({
[`has-text-align-${textAlign}`]: textAlign
}),
style: mergedStyle
});
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
- value: textAlign,
- onChange: nextAlign => {
- setAttributes({
- textAlign: nextAlign
- });
- }
- })), (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-term-description__placeholder"
- }, (0,external_React_namespaceObject.createElement)("span", null, (0,external_wp_i18n_namespaceObject.__)('Term Description')))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "block",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentControl, {
+ value: textAlign,
+ onChange: nextAlign => {
+ setAttributes({
+ textAlign: nextAlign
+ });
+ }
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-term-description__placeholder",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ children: (0,external_wp_i18n_namespaceObject.__)('Term Description')
+ })
+ })
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/term-description/index.js
@@ -58954,7 +61479,6 @@ const term_description_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/text-columns/edit.js
-
/**
* WordPress dependencies
*/
@@ -58962,6 +61486,9 @@ const term_description_init = () => initBlock({
+
+
+
function TextColumnsEdit({
attributes,
setAttributes
@@ -58975,57 +61502,66 @@ function TextColumnsEdit({
since: '5.3',
alternative: 'the Columns block'
});
- 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_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'),
- value: columns,
- onChange: value => setAttributes({
- columns: value
- }),
- min: 2,
- max: 4,
- required: true
- }))), (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_React_namespaceObject.createElement)("div", {
- className: "wp-block-column",
- key: `column-${index}`
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, {
- tagName: "p",
- value: content?.[index]?.children,
- onChange: nextContent => {
- setAttributes({
- content: [...content.slice(0, index), {
- children: nextContent
- }, ...content.slice(index + 1)]
- });
- },
- "aria-label": (0,external_wp_i18n_namespaceObject.sprintf)(
- // translators: %d: column index (starting with 1)
- (0,external_wp_i18n_namespaceObject.__)('Column %d text'), index + 1),
- placeholder: (0,external_wp_i18n_namespaceObject.__)('New Column')
- }));
- })));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockAlignmentToolbar, {
+ value: width,
+ onChange: nextWidth => setAttributes({
+ width: nextWidth
+ }),
+ controls: ['center', 'wide', 'full']
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.RangeControl, {
+ __nextHasNoMarginBottom: true,
+ __next40pxDefaultSize: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Columns'),
+ value: columns,
+ onChange: value => setAttributes({
+ columns: value
+ }),
+ min: 2,
+ max: 4,
+ required: true
+ })
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({
+ className: `align${width} columns-${columns}`
+ }),
+ children: Array.from({
+ length: columns
+ }).map((_, index) => {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-column",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
+ tagName: "p",
+ value: content?.[index]?.children,
+ onChange: nextContent => {
+ setAttributes({
+ content: [...content.slice(0, index), {
+ children: nextContent
+ }, ...content.slice(index + 1)]
+ });
+ },
+ "aria-label": (0,external_wp_i18n_namespaceObject.sprintf)(
+ // translators: %d: column index (starting with 1)
+ (0,external_wp_i18n_namespaceObject.__)('Column %d text'), index + 1),
+ placeholder: (0,external_wp_i18n_namespaceObject.__)('New Column')
+ })
+ }, `column-${index}`);
+ })
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/text-columns/save.js
-
/**
* WordPress dependencies
*/
+
function text_columns_save_save({
attributes
}) {
@@ -59034,19 +61570,20 @@ function text_columns_save_save({
content,
columns
} = attributes;
- return (0,external_React_namespaceObject.createElement)("div", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className: `align${width} columns-${columns}`
- })
- }, Array.from({
- length: columns
- }).map((_, index) => (0,external_React_namespaceObject.createElement)("div", {
- className: "wp-block-column",
- key: `column-${index}`
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "p",
- value: content?.[index]?.children
- }))));
+ }),
+ children: Array.from({
+ length: columns
+ }).map((_, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ className: "wp-block-column",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "p",
+ value: content?.[index]?.children
+ })
+ }, `column-${index}`))
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/text-columns/transforms.js
@@ -59148,22 +61685,7 @@ const text_columns_init = () => initBlock({
settings: text_columns_settings
});
-;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/verse.js
-
-/**
- * WordPress dependencies
- */
-
-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_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 */ const library_verse = (verse);
-
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/verse/deprecated.js
-
/**
* External dependencies
*/
@@ -59178,6 +61700,7 @@ const verse = (0,external_React_namespaceObject.createElement)(external_wp_primi
* Internal dependencies
*/
+
const verse_deprecated_v1 = {
attributes: {
content: {
@@ -59197,7 +61720,7 @@ const verse_deprecated_v1 = {
textAlign,
content
} = attributes;
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
tagName: "pre",
style: {
textAlign
@@ -59241,16 +61764,17 @@ const verse_deprecated_v2 = {
textAlign,
content
} = attributes;
- const className = classnames_default()({
+ const className = dist_clsx({
[`has-text-align-${textAlign}`]: textAlign
});
- return (0,external_React_namespaceObject.createElement)("pre", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("pre", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: content
})
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- value: content
- }));
+ });
},
migrate: migrate_font_family,
isEligible({
@@ -59271,7 +61795,6 @@ const verse_deprecated_v2 = {
/* harmony default export */ const verse_deprecated = ([verse_deprecated_v2, verse_deprecated_v1]);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/verse/edit.js
-
/**
* External dependencies
*/
@@ -59283,6 +61806,9 @@ const verse_deprecated_v2 = {
+
+
+
function VerseEdit({
attributes,
setAttributes,
@@ -59296,41 +61822,44 @@ function VerseEdit({
content
} = attributes;
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
- className: classnames_default()({
+ className: dist_clsx({
[`has-text-align-${textAlign}`]: textAlign
}),
style
});
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, {
- tagName: "pre",
- identifier: "content",
- preserveWhiteSpace: true,
- value: content,
- onChange: nextContent => {
- setAttributes({
- content: nextContent
- });
- },
- "aria-label": (0,external_wp_i18n_namespaceObject.__)('Verse text'),
- placeholder: (0,external_wp_i18n_namespaceObject.__)('Write verse…'),
- onRemove: onRemove,
- onMerge: mergeBlocks,
- textAlign: textAlign,
- ...blockProps,
- __unstablePastePlainText: true,
- __unstableOnSplitAtDoubleLineEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()))
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.AlignmentToolbar, {
+ value: textAlign,
+ onChange: nextAlign => {
+ setAttributes({
+ textAlign: nextAlign
+ });
+ }
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
+ tagName: "pre",
+ identifier: "content",
+ preserveWhiteSpace: true,
+ value: content,
+ onChange: nextContent => {
+ setAttributes({
+ content: nextContent
+ });
+ },
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Verse text'),
+ placeholder: (0,external_wp_i18n_namespaceObject.__)('Write verse…'),
+ onRemove: onRemove,
+ onMerge: mergeBlocks,
+ textAlign: textAlign,
+ ...blockProps,
+ __unstablePastePlainText: true,
+ __unstableOnSplitAtDoubleLineEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()))
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/verse/save.js
-
/**
* External dependencies
*/
@@ -59340,6 +61869,7 @@ function VerseEdit({
* WordPress dependencies
*/
+
function verse_save_save({
attributes
}) {
@@ -59347,16 +61877,17 @@ function verse_save_save({
textAlign,
content
} = attributes;
- const className = classnames_default()({
+ const className = dist_clsx({
[`has-text-align-${textAlign}`]: textAlign
});
- return (0,external_React_namespaceObject.createElement)("pre", {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("pre", {
...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className
+ }),
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ value: content
})
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- value: content
- }));
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/verse/transforms.js
@@ -59489,17 +62020,18 @@ const verse_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/video.js
-
/**
* WordPress dependencies
*/
-const video = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
+
+const video = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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.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"
-}));
+ xmlns: "http://www.w3.org/2000/svg",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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 */ const library_video = (video);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/video/tracks.js
@@ -59508,15 +62040,13 @@ function Tracks({
tracks = []
}) {
return tracks.map(track => {
- return (0,external_React_namespaceObject.createElement)("track", {
- key: track.src,
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("track", {
...track
- });
+ }, track.src);
});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/video/deprecated.js
-
/**
* WordPress dependencies
*/
@@ -59624,6 +62154,8 @@ const video_deprecated_metadata = {
style: "wp-block-video"
};
+
+
const {
attributes: video_deprecated_blockAttributes
} = video_deprecated_metadata;
@@ -59647,36 +62179,40 @@ const video_deprecated_v1 = {
playsInline,
tracks
} = attributes;
- return (0,external_React_namespaceObject.createElement)("figure", {
- ...external_wp_blockEditor_namespaceObject.useBlockProps.save()
- }, src && (0,external_React_namespaceObject.createElement)("video", {
- autoPlay: autoplay,
- controls: controls,
- loop: loop,
- muted: muted,
- poster: poster,
- preload: preload !== 'metadata' ? preload : undefined,
- src: src,
- playsInline: playsInline
- }, (0,external_React_namespaceObject.createElement)(Tracks, {
- tracks: tracks
- })), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
- tagName: "figcaption",
- value: caption
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
+ ...external_wp_blockEditor_namespaceObject.useBlockProps.save(),
+ children: [src && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
+ autoPlay: autoplay,
+ controls: controls,
+ loop: loop,
+ muted: muted,
+ poster: poster,
+ preload: preload !== 'metadata' ? preload : undefined,
+ src: src,
+ playsInline: playsInline,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tracks, {
+ tracks: tracks
+ })
+ }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ tagName: "figcaption",
+ value: caption
+ })]
+ });
}
};
const video_deprecated_deprecated = [video_deprecated_v1];
/* harmony default export */ const video_deprecated = (video_deprecated_deprecated);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/video/edit-common-settings.js
-
/**
* WordPress dependencies
*/
+
+
+
const options = [{
value: 'auto',
label: (0,external_wp_i18n_namespaceObject.__)('Auto')
@@ -59727,45 +62263,48 @@ const VideoSettings = ({
preload: value
});
}, []);
- 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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Loop'),
- onChange: toggleFactory.loop,
- checked: !!loop
- }), (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_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_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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, {
- __nextHasNoMarginBottom: true,
- label: (0,external_wp_i18n_namespaceObject.__)('Preload'),
- value: preload,
- onChange: onChangePreload,
- options: options,
- hideCancelButton: true
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Autoplay'),
+ onChange: toggleFactory.autoplay,
+ checked: !!autoplay,
+ help: getAutoplayHelp
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Loop'),
+ onChange: toggleFactory.loop,
+ checked: !!loop
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Muted'),
+ onChange: toggleFactory.muted,
+ checked: !!muted
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Playback controls'),
+ onChange: toggleFactory.controls,
+ checked: !!controls
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true
+ /* translators: Setting to play videos within the webpage on mobile browsers rather than opening in a fullscreen player. */,
+ label: (0,external_wp_i18n_namespaceObject.__)('Play inline'),
+ onChange: toggleFactory.playsInline,
+ checked: !!playsInline,
+ help: (0,external_wp_i18n_namespaceObject.__)('When enabled, videos will play directly within the webpage on mobile browsers, instead of opening in a fullscreen player.')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SelectControl, {
+ __nextHasNoMarginBottom: true,
+ label: (0,external_wp_i18n_namespaceObject.__)('Preload'),
+ value: preload,
+ onChange: onChangePreload,
+ options: options,
+ hideCancelButton: true
+ })]
+ });
};
/* harmony default export */ const edit_common_settings = (VideoSettings);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/video/tracks-editor.js
-
/**
* WordPress dependencies
*/
@@ -59776,6 +62315,9 @@ const VideoSettings = ({
+
+
+
const ALLOWED_TYPES = ['text/vtt'];
const DEFAULT_KIND = 'subtitles';
const KIND_OPTIONS = [{
@@ -59800,26 +62342,31 @@ function TrackList({
}) {
let content;
if (tracks.length === 0) {
- 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.'));
+ content = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
+ className: "block-library-video-tracks-editor__tracks-informative-message",
+ children: (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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
- key: index,
- className: "block-library-video-tracks-editor__track-list-track"
- }, (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" */
- (0,external_wp_i18n_namespaceObject.__)('Edit %s'), track.label)
- }, (0,external_wp_i18n_namespaceObject.__)('Edit')));
- });
- }
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
+ className: "block-library-video-tracks-editor__track-list-track",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("span", {
+ children: [track.label, " "]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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" */
+ (0,external_wp_i18n_namespaceObject.__)('Edit %s'), track.label),
+ children: (0,external_wp_i18n_namespaceObject.__)('Edit')
+ })]
+ }, index);
+ });
+ }
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, {
label: (0,external_wp_i18n_namespaceObject.__)('Text tracks'),
- className: "block-library-video-tracks-editor__track-list"
- }, content);
+ className: "block-library-video-tracks-editor__track-list",
+ children: content
+ });
}
function SingleTrackEditor({
track,
@@ -59834,81 +62381,94 @@ function SingleTrackEditor({
kind = DEFAULT_KIND
} = track;
const fileName = src.startsWith('blob:') ? '' : (0,external_wp_url_namespaceObject.getFilename)(src) || '';
- 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_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_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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
- __nextHasNoMarginBottom: true
- /* eslint-disable jsx-a11y/no-autofocus */,
- autoFocus: true
- /* eslint-enable jsx-a11y/no-autofocus */,
- onChange: newLabel => onChange({
- ...track,
- label: newLabel
- }),
- label: (0,external_wp_i18n_namespaceObject.__)('Label'),
- value: label,
- help: (0,external_wp_i18n_namespaceObject.__)('Title of track')
- }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
- __nextHasNoMarginBottom: true,
- onChange: newSrcLang => onChange({
- ...track,
- srcLang: newSrcLang
- }),
- label: (0,external_wp_i18n_namespaceObject.__)('Source language'),
- value: srcLang,
- help: (0,external_wp_i18n_namespaceObject.__)('Language tag (en, fr, etc.)')
- })), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, {
- spacing: "8"
- }, (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,
- value: kind,
- label: (0,external_wp_i18n_namespaceObject.__)('Kind'),
- onChange: newKind => {
- onChange({
- ...track,
- kind: newKind
- });
- }
- }), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
- className: "block-library-video-tracks-editor__single-track-editor-buttons-container"
- }, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- variant: "secondary",
- onClick: () => {
- const changes = {};
- let hasChanges = false;
- if (label === '') {
- changes.label = (0,external_wp_i18n_namespaceObject.__)('English');
- hasChanges = true;
- }
- if (srcLang === '') {
- changes.srcLang = 'en';
- hasChanges = true;
- }
- if (track.kind === undefined) {
- changes.kind = DEFAULT_KIND;
- hasChanges = true;
- }
- if (hasChanges) {
- onChange({
- ...track,
- ...changes
- });
- }
- onClose();
- }
- }, (0,external_wp_i18n_namespaceObject.__)('Close')), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- isDestructive: true,
- variant: "link",
- onClick: onRemove
- }, (0,external_wp_i18n_namespaceObject.__)('Remove track'))))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.NavigableMenu, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
+ className: "block-library-video-tracks-editor__single-track-editor",
+ spacing: "4",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
+ className: "block-library-video-tracks-editor__single-track-editor-edit-track-label",
+ children: (0,external_wp_i18n_namespaceObject.__)('Edit track')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("span", {
+ children: [(0,external_wp_i18n_namespaceObject.__)('File'), ": ", /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("b", {
+ children: fileName
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalGrid, {
+ columns: 2,
+ gap: 4,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
+ __nextHasNoMarginBottom: true
+ /* eslint-disable jsx-a11y/no-autofocus */,
+ autoFocus: true
+ /* eslint-enable jsx-a11y/no-autofocus */,
+ onChange: newLabel => onChange({
+ ...track,
+ label: newLabel
+ }),
+ label: (0,external_wp_i18n_namespaceObject.__)('Label'),
+ value: label,
+ help: (0,external_wp_i18n_namespaceObject.__)('Title of track')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
+ __nextHasNoMarginBottom: true,
+ onChange: newSrcLang => onChange({
+ ...track,
+ srcLang: newSrcLang
+ }),
+ label: (0,external_wp_i18n_namespaceObject.__)('Source language'),
+ value: srcLang,
+ help: (0,external_wp_i18n_namespaceObject.__)('Language tag (en, fr, etc.)')
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
+ spacing: "8",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SelectControl, {
+ __nextHasNoMarginBottom: true,
+ className: "block-library-video-tracks-editor__single-track-editor-kind-select",
+ options: KIND_OPTIONS,
+ value: kind,
+ label: (0,external_wp_i18n_namespaceObject.__)('Kind'),
+ onChange: newKind => {
+ onChange({
+ ...track,
+ kind: newKind
+ });
+ }
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
+ className: "block-library-video-tracks-editor__single-track-editor-buttons-container",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ variant: "secondary",
+ onClick: () => {
+ const changes = {};
+ let hasChanges = false;
+ if (label === '') {
+ changes.label = (0,external_wp_i18n_namespaceObject.__)('English');
+ hasChanges = true;
+ }
+ if (srcLang === '') {
+ changes.srcLang = 'en';
+ hasChanges = true;
+ }
+ if (track.kind === undefined) {
+ changes.kind = DEFAULT_KIND;
+ hasChanges = true;
+ }
+ if (hasChanges) {
+ onChange({
+ ...track,
+ ...changes
+ });
+ }
+ onClose();
+ },
+ children: (0,external_wp_i18n_namespaceObject.__)('Close')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ isDestructive: true,
+ variant: "link",
+ onClick: onRemove,
+ children: (0,external_wp_i18n_namespaceObject.__)('Remove track')
+ })]
+ })]
+ })]
+ })
+ });
}
function TracksEditor({
tracks = [],
@@ -59921,21 +62481,24 @@ function TracksEditor({
if (!mediaUpload) {
return null;
}
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Dropdown, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Dropdown, {
contentClassName: "block-library-video-tracks-editor",
renderToggle: ({
isOpen,
onToggle
- }) => (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,
- "aria-haspopup": "true",
- onClick: onToggle
- }, (0,external_wp_i18n_namespaceObject.__)('Text tracks'))),
+ }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
+ label: (0,external_wp_i18n_namespaceObject.__)('Text tracks'),
+ showTooltip: true,
+ "aria-expanded": isOpen,
+ "aria-haspopup": "true",
+ onClick: onToggle,
+ children: (0,external_wp_i18n_namespaceObject.__)('Text tracks')
+ })
+ }),
renderContent: () => {
if (trackBeingEdited !== null) {
- return (0,external_React_namespaceObject.createElement)(SingleTrackEditor, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SingleTrackEditor, {
track: tracks[trackBeingEdited],
onChange: newTrack => {
const newTracks = [...tracks];
@@ -59949,70 +62512,78 @@ function TracksEditor({
}
});
}
- 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_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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaUpload, {
- onSelect: ({
- url
- }) => {
- const trackIndex = tracks.length;
- onChange([...tracks, {
- src: url
- }]);
- setTrackBeingEdited(trackIndex);
- },
- allowedTypes: ALLOWED_TYPES,
- render: ({
- open
- }) => (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_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;
- mediaUpload({
- allowedTypes: ALLOWED_TYPES,
- filesList: files,
- onFileChange: ([{
- url
- }]) => {
- const newTracks = [...tracks];
- if (!newTracks[trackIndex]) {
- newTracks[trackIndex] = {};
- }
- newTracks[trackIndex] = {
- ...tracks[trackIndex],
- src: url
- };
- onChange(newTracks);
- setTrackBeingEdited(trackIndex);
- }
- });
- },
- accept: ".vtt,text/vtt",
- render: ({
- openFileDialog
- }) => {
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
- icon: library_upload,
- onClick: () => {
- openFileDialog();
- }
- }, (0,external_wp_i18n_namespaceObject.__)('Upload'));
- }
- })))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.NavigableMenu, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TrackList, {
+ tracks: tracks,
+ onEditPress: setTrackBeingEdited
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.MenuGroup, {
+ className: "block-library-video-tracks-editor__add-tracks-container",
+ label: (0,external_wp_i18n_namespaceObject.__)('Add tracks'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaUpload, {
+ onSelect: ({
+ url
+ }) => {
+ const trackIndex = tracks.length;
+ onChange([...tracks, {
+ src: url
+ }]);
+ setTrackBeingEdited(trackIndex);
+ },
+ allowedTypes: ALLOWED_TYPES,
+ render: ({
+ open
+ }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
+ icon: library_media,
+ onClick: open,
+ children: (0,external_wp_i18n_namespaceObject.__)('Open Media Library')
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaUploadCheck, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FormFileUpload, {
+ onChange: event => {
+ const files = event.target.files;
+ const trackIndex = tracks.length;
+ mediaUpload({
+ allowedTypes: ALLOWED_TYPES,
+ filesList: files,
+ onFileChange: ([{
+ url
+ }]) => {
+ const newTracks = [...tracks];
+ if (!newTracks[trackIndex]) {
+ newTracks[trackIndex] = {};
+ }
+ newTracks[trackIndex] = {
+ ...tracks[trackIndex],
+ src: url
+ };
+ onChange(newTracks);
+ setTrackBeingEdited(trackIndex);
+ }
+ });
+ },
+ accept: ".vtt,text/vtt",
+ render: ({
+ openFileDialog
+ }) => {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
+ icon: library_upload,
+ onClick: () => {
+ openFileDialog();
+ },
+ children: (0,external_wp_i18n_namespaceObject.__)('Upload')
+ });
+ }
+ })
+ })]
+ })]
+ })
+ });
}
});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/video/edit.js
-
/**
* External dependencies
*/
@@ -60040,15 +62611,20 @@ function TracksEditor({
+
// Much of this description is duplicated from MediaPlaceholder.
+
+
+
const video_edit_placeholder = content => {
- return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, {
className: "block-editor-media-placeholder",
withIllustration: true,
icon: library_video,
label: (0,external_wp_i18n_namespaceObject.__)('Video'),
- instructions: (0,external_wp_i18n_namespaceObject.__)('Upload a video file, pick one from your media library, or add one with a URL.')
- }, content);
+ instructions: (0,external_wp_i18n_namespaceObject.__)('Upload a video file, pick one from your media library, or add one with a URL.'),
+ children: content
+ });
};
const video_edit_ALLOWED_MEDIA_TYPES = ['video'];
const VIDEO_POSTER_ALLOWED_MEDIA_TYPES = ['image'];
@@ -60071,22 +62647,12 @@ function VideoEdit({
tracks
} = attributes;
const isTemporaryVideo = !id && (0,external_wp_blob_namespaceObject.isBlobURL)(src);
- 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) {
- getSettings().mediaUpload({
- filesList: [file],
- onFileChange: ([media]) => onSelectVideo(media),
- onError: onUploadError,
- allowedTypes: video_edit_ALLOWED_MEDIA_TYPES
- });
- }
- }
- }, []);
+ useUploadMediaFromBlobURL({
+ url: src,
+ allowedTypes: video_edit_ALLOWED_MEDIA_TYPES,
+ onChange: onSelectVideo,
+ onError: onUploadError
+ });
(0,external_wp_element_namespaceObject.useEffect)(() => {
// Placeholder may be rendered.
if (videoPlayer.current) {
@@ -60143,27 +62709,28 @@ function VideoEdit({
type: 'snackbar'
});
}
- const classes = classnames_default()(className, {
+ const classes = dist_clsx(className, {
'is-transient': isTemporaryVideo
});
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
className: classes
});
if (!src) {
- return (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (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,
- onSelectURL: onSelectURL,
- accept: "video/*",
- allowedTypes: video_edit_ALLOWED_MEDIA_TYPES,
- value: attributes,
- onError: onUploadError,
- placeholder: video_edit_placeholder
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaPlaceholder, {
+ icon: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, {
+ icon: library_video
+ }),
+ onSelect: onSelectVideo,
+ onSelectURL: onSelectURL,
+ accept: "video/*",
+ allowedTypes: video_edit_ALLOWED_MEDIA_TYPES,
+ value: attributes,
+ onError: onUploadError,
+ placeholder: video_edit_placeholder
+ })
+ });
}
function onSelectPoster(image) {
setAttributes({
@@ -60179,73 +62746,93 @@ function VideoEdit({
posterImageButton.current.focus();
}
const videoPosterDescription = `video-block__poster-image-description-${instanceId}`;
- 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_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, {
- group: "other"
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, {
- mediaId: id,
- mediaURL: src,
- allowedTypes: video_edit_ALLOWED_MEDIA_TYPES,
- accept: "video/*",
- onSelect: onSelectVideo,
- onSelectURL: onSelectURL,
- onError: onUploadError
- }))), (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)(edit_common_settings, {
- setAttributes: setAttributes,
- attributes: attributes
- }), (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_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_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_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_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
- onClick: onRemovePoster,
- variant: "tertiary"
- }, (0,external_wp_i18n_namespaceObject.__)('Remove')))))), (0,external_React_namespaceObject.createElement)("figure", {
- ...blockProps
- }, (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_React_namespaceObject.createElement)(Tracks, {
- tracks: tracks
- }))), 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
- })));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [isSingleSelected && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TracksEditor, {
+ tracks: tracks,
+ onChange: newTracks => {
+ setAttributes({
+ tracks: newTracks
+ });
+ }
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
+ group: "other",
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaReplaceFlow, {
+ mediaId: id,
+ mediaURL: src,
+ allowedTypes: video_edit_ALLOWED_MEDIA_TYPES,
+ accept: "video/*",
+ onSelect: onSelectVideo,
+ onSelectURL: onSelectURL,
+ onError: onUploadError
+ })
+ })]
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(edit_common_settings, {
+ setAttributes: setAttributes,
+ attributes: attributes
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaUploadCheck, {
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.BaseControl, {
+ className: "editor-video-poster-control",
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.BaseControl.VisualLabel, {
+ children: (0,external_wp_i18n_namespaceObject.__)('Poster image')
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaUpload, {
+ title: (0,external_wp_i18n_namespaceObject.__)('Select poster image'),
+ onSelect: onSelectPoster,
+ allowedTypes: VIDEO_POSTER_ALLOWED_MEDIA_TYPES,
+ render: ({
+ open
+ }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ variant: "primary",
+ onClick: open,
+ ref: posterImageButton,
+ "aria-describedby": videoPosterDescription,
+ children: !poster ? (0,external_wp_i18n_namespaceObject.__)('Select') : (0,external_wp_i18n_namespaceObject.__)('Replace')
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
+ id: videoPosterDescription,
+ hidden: true,
+ children: 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 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ onClick: onRemovePoster,
+ variant: "tertiary",
+ children: (0,external_wp_i18n_namespaceObject.__)('Remove')
+ })]
+ })
+ })]
+ })
+ }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
+ ...blockProps,
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, {
+ isDisabled: !isSingleSelected,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
+ controls: controls,
+ poster: poster,
+ src: src,
+ ref: videoPlayer,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tracks, {
+ tracks: tracks
+ })
+ })
+ }), isTemporaryVideo && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Caption, {
+ attributes: attributes,
+ setAttributes: setAttributes,
+ isSelected: isSingleSelected,
+ insertBlocksAfter: insertBlocksAfter,
+ label: (0,external_wp_i18n_namespaceObject.__)('Video caption text'),
+ showToolbarButton: isSingleSelected
+ })]
+ })]
+ });
}
/* harmony default export */ const video_edit = (VideoEdit);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/video/save.js
-
/**
* WordPress dependencies
*/
@@ -60255,6 +62842,8 @@ function VideoEdit({
* Internal dependencies
*/
+
+
function video_save_save({
attributes
}) {
@@ -60270,24 +62859,26 @@ function video_save_save({
playsInline,
tracks
} = attributes;
- return (0,external_React_namespaceObject.createElement)("figure", {
- ...external_wp_blockEditor_namespaceObject.useBlockProps.save()
- }, src && (0,external_React_namespaceObject.createElement)("video", {
- autoPlay: autoplay,
- controls: controls,
- loop: loop,
- muted: muted,
- poster: poster,
- preload: preload !== 'metadata' ? preload : undefined,
- src: src,
- playsInline: playsInline
- }, (0,external_React_namespaceObject.createElement)(Tracks, {
- tracks: tracks
- })), !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 /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", {
+ ...external_wp_blockEditor_namespaceObject.useBlockProps.save(),
+ children: [src && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
+ autoPlay: autoplay,
+ controls: controls,
+ loop: loop,
+ muted: muted,
+ poster: poster,
+ preload: preload !== 'metadata' ? preload : undefined,
+ src: src,
+ playsInline: playsInline,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tracks, {
+ tracks: tracks
+ })
+ }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, {
+ className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'),
+ tagName: "figcaption",
+ value: caption
+ })]
+ });
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/video/transforms.js
@@ -60531,7 +63122,6 @@ const video_init = () => initBlock({
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/footnotes/edit.js
-
/**
* WordPress dependencies
*/
@@ -60540,6 +63130,8 @@ const video_init = () => initBlock({
+
+
function FootnotesEdit({
context: {
postType,
@@ -60551,71 +63143,77 @@ function FootnotesEdit({
const footnotes = meta?.footnotes ? JSON.parse(meta.footnotes) : [];
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
if (!footnotesSupported) {
- return (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (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 are not supported here. Add this block to post or page content.')
- }));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, {
+ icon: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, {
+ icon: format_list_numbered
+ }),
+ label: (0,external_wp_i18n_namespaceObject.__)('Footnotes'),
+ instructions: (0,external_wp_i18n_namespaceObject.__)('Footnotes are not supported here. Add this block to post or page content.')
+ })
+ });
}
if (!footnotes.length) {
- return (0,external_React_namespaceObject.createElement)("div", {
- ...blockProps
- }, (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 /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
+ ...blockProps,
+ children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, {
+ icon: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(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_React_namespaceObject.createElement)("ol", {
- ...blockProps
- }, footnotes.map(({
- id,
- content
- }) => /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */
- (0,external_React_namespaceObject.createElement)("li", {
- key: id,
- onMouseDown: event => {
- // When clicking on the list item (not on descendants),
- // focus the rich text element since it's only 1px wide when
- // empty.
- if (event.target === event.currentTarget) {
- event.target.firstElementChild.focus();
- event.preventDefault();
- }
- }
- }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, {
- id: id,
- tagName: "span",
- value: content,
- identifier: id
- // To do: figure out why the browser is not scrolling
- // into view when it receives focus.
- ,
- onFocus: event => {
- if (!event.target.textContent.trim()) {
- event.target.scrollIntoView();
- }
- },
- onChange: nextFootnote => {
- updateMeta({
- ...meta,
- footnotes: JSON.stringify(footnotes.map(footnote => {
- return footnote.id === id ? {
- content: nextFootnote,
- id
- } : footnote;
- }))
- });
- }
- }), ' ', (0,external_React_namespaceObject.createElement)("a", {
- href: `#${id}-link`
- }, "\u21A9\uFE0E"))));
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ol", {
+ ...blockProps,
+ children: footnotes.map(({
+ id,
+ content
+ }) =>
+ /*#__PURE__*/
+ /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */
+ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", {
+ onMouseDown: event => {
+ // When clicking on the list item (not on descendants),
+ // focus the rich text element since it's only 1px wide when
+ // empty.
+ if (event.target === event.currentTarget) {
+ event.target.firstElementChild.focus();
+ event.preventDefault();
+ }
+ },
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText, {
+ id: id,
+ tagName: "span",
+ value: content,
+ identifier: id
+ // To do: figure out why the browser is not scrolling
+ // into view when it receives focus.
+ ,
+ onFocus: event => {
+ if (!event.target.textContent.trim()) {
+ event.target.scrollIntoView();
+ }
+ },
+ onChange: nextFootnote => {
+ updateMeta({
+ ...meta,
+ footnotes: JSON.stringify(footnotes.map(footnote => {
+ return footnote.id === id ? {
+ content: nextFootnote,
+ id
+ } : footnote;
+ }))
+ });
+ }
+ }), ' ', /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
+ href: `#${id}-link`,
+ children: "\u21A9\uFE0E"
+ })]
+ }, id))
+ });
}
;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/native.js
@@ -60707,7 +63305,6 @@ function v4_v4(options, buf, offset) {
/* harmony default export */ const esm_browser_v4 = (v4_v4);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/footnotes/format.js
-
/**
* External dependencies
*/
@@ -60728,6 +63325,7 @@ function v4_v4(options, buf, offset) {
* Internal dependencies
*/
+
const {
usesContextKey
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
@@ -60847,7 +63445,7 @@ const format = {
selectionChange(fnBlock.clientId, id, 0, 0);
});
}
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichTextToolbarButton, {
+ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichTextToolbarButton, {
icon: format_list_numbered,
title: (0,external_wp_i18n_namespaceObject.__)('Footnote'),
onClick: onClick,
@@ -60953,6 +63551,112 @@ 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__(2321);
var is_block_metadata_experimental_default = /*#__PURE__*/__webpack_require__.n(is_block_metadata_experimental);
+;// CONCATENATED MODULE: external ["wp","keyboardShortcuts"]
+const external_wp_keyboardShortcuts_namespaceObject = window["wp"]["keyboardShortcuts"];
+;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/block-keyboard-shortcuts/index.js
+/**
+ * WordPress dependencies
+ */
+
+
+
+
+
+
+function BlockKeyboardShortcuts() {
+ const {
+ registerShortcut
+ } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_keyboardShortcuts_namespaceObject.store);
+ const {
+ replaceBlocks
+ } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
+ const {
+ getBlockName,
+ getSelectedBlockClientId,
+ getBlockAttributes
+ } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
+ const handleTransformHeadingAndParagraph = (event, level) => {
+ event.preventDefault();
+ const currentClientId = getSelectedBlockClientId();
+ if (currentClientId === null) {
+ return;
+ }
+ const blockName = getBlockName(currentClientId);
+ const isParagraph = blockName === 'core/paragraph';
+ const isHeading = blockName === 'core/heading';
+ if (!isParagraph && !isHeading) {
+ return;
+ }
+ const destinationBlockName = level === 0 ? 'core/paragraph' : 'core/heading';
+ const attributes = getBlockAttributes(currentClientId);
+
+ // Avoid unnecessary block transform when attempting to transform to
+ // the same block type and/or same level.
+ if (isParagraph && level === 0 || isHeading && attributes.level === level) {
+ return;
+ }
+ const textAlign = blockName === 'core/paragraph' ? 'align' : 'textAlign';
+ const destinationTextAlign = destinationBlockName === 'core/paragraph' ? 'align' : 'textAlign';
+ replaceBlocks(currentClientId, (0,external_wp_blocks_namespaceObject.createBlock)(destinationBlockName, {
+ level,
+ content: attributes.content,
+ ...{
+ [destinationTextAlign]: attributes[textAlign]
+ }
+ }));
+ };
+ (0,external_wp_element_namespaceObject.useEffect)(() => {
+ registerShortcut({
+ name: 'core/block-editor/transform-heading-to-paragraph',
+ category: 'block-library',
+ description: (0,external_wp_i18n_namespaceObject.__)('Transform heading to paragraph.'),
+ keyCombination: {
+ modifier: 'access',
+ character: '0'
+ },
+ aliases: [{
+ modifier: 'access',
+ character: '7'
+ }]
+ });
+ [1, 2, 3, 4, 5, 6].forEach(level => {
+ registerShortcut({
+ name: `core/block-editor/transform-paragraph-to-heading-${level}`,
+ category: 'block-library',
+ description: (0,external_wp_i18n_namespaceObject.__)('Transform paragraph to heading.'),
+ keyCombination: {
+ modifier: 'access',
+ character: `${level}`
+ }
+ });
+ });
+ }, []);
+ (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/block-editor/transform-heading-to-paragraph', event => handleTransformHeadingAndParagraph(event, 0));
+ [1, 2, 3, 4, 5, 6].forEach(level => {
+ //the loop is based off on a constant therefore
+ //the hook will execute the same way every time
+ //eslint-disable-next-line react-hooks/rules-of-hooks
+ (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)(`core/block-editor/transform-paragraph-to-heading-${level}`, event => handleTransformHeadingAndParagraph(event, level));
+ });
+ return null;
+}
+/* harmony default export */ const block_keyboard_shortcuts = (BlockKeyboardShortcuts);
+
+;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/private-apis.js
+/**
+ * Internal dependencies
+ */
+
+
+
+/**
+ * @private
+ */
+const privateApis = {};
+lock(privateApis, {
+ BlockKeyboardShortcuts: block_keyboard_shortcuts
+});
+
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/index.js
/**
* WordPress dependencies
@@ -61158,6 +63862,7 @@ const registerCoreBlocks = (blocks = __experimentalGetCoreBlocks()) => {
*/
const __experimentalRegisterExperimentalCoreBlocks = false ? 0 : undefined;
+
})();
(window.wp = window.wp || {}).blockLibrary = __webpack_exports__;