Update editor related npm packages for 6.4 RC3.

The npm packages needed update for 6.4 RC3.

Patch: https://github.com/WordPress/wordpress-develop/pull/5587.
This PR includes the following changes:

- Regression: [https://github.com/WordPress/gutenberg/pull/55553 Patterns: fix bug with authors and contributors not seeing user pattern categories].
- Bugfix: [https://github.com/WordPress/gutenberg/pull/55539 Query Loop:Disallow "enhanced pagination" with core blocks that may contain third-party blocks].
- Regression: [https://github.com/WordPress/gutenberg/pull/55667 File: Fix embedded PDF files in Safari].
- Regression: [https://github.com/WordPress/gutenberg/pull/55669 Ensure Term Description block is registered in core]

Props DAreRodz, luisherranz, poena, afercia, danieldudzic, hellofromtonya, siobhyb, mikachan, get_dave, scruffian, wildworks, glendaviesnz, ramonopoly, aaronrobertshaw.

See #59411.

Built from https://develop.svn.wordpress.org/trunk@57034


git-svn-id: http://core.svn.wordpress.org/trunk@56545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Tammie Lister 2023-10-31 15:14:05 +00:00
parent 0abdf83aaf
commit 6edefe60c0
31 changed files with 258 additions and 187 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -59,7 +59,8 @@ function render_block_core_file( $attributes, $content, $block ) {
$processor->next_tag();
$processor->set_attribute( 'data-wp-interactive', '' );
$processor->next_tag( 'object' );
$processor->set_attribute( 'data-wp-style--display', 'selectors.core.file.hasPdfPreview' );
$processor->set_attribute( 'data-wp-bind--hidden', '!selectors.core.file.hasPdfPreview' );
$processor->set_attribute( 'hidden', true );
return $processor->get_updated_html();
}

View File

@ -22,11 +22,6 @@
margin-bottom:1em;
}
@media (max-width:768px){
.wp-block-file__embed{
display:none;
}
}
:where(.wp-block-file__button){
border-radius:2em;
display:inline-block;

View File

@ -1 +1 @@
.wp-block-file{box-sizing:border-box}.wp-block-file:not(.wp-element-button){font-size:.8em}.wp-block-file.aligncenter{text-align:center}.wp-block-file.alignright{text-align:right}.wp-block-file *+.wp-block-file__button{margin-right:.75em}:where(.wp-block-file){margin-bottom:1.5em}.wp-block-file__embed{margin-bottom:1em}@media (max-width:768px){.wp-block-file__embed{display:none}}:where(.wp-block-file__button){border-radius:2em;display:inline-block;padding:.5em 1em}:where(.wp-block-file__button):is(a):active,:where(.wp-block-file__button):is(a):focus,:where(.wp-block-file__button):is(a):hover,:where(.wp-block-file__button):is(a):visited{box-shadow:none;color:#fff;opacity:.85;text-decoration:none}
.wp-block-file{box-sizing:border-box}.wp-block-file:not(.wp-element-button){font-size:.8em}.wp-block-file.aligncenter{text-align:center}.wp-block-file.alignright{text-align:right}.wp-block-file *+.wp-block-file__button{margin-right:.75em}:where(.wp-block-file){margin-bottom:1.5em}.wp-block-file__embed{margin-bottom:1em}:where(.wp-block-file__button){border-radius:2em;display:inline-block;padding:.5em 1em}:where(.wp-block-file__button):is(a):active,:where(.wp-block-file__button):is(a):focus,:where(.wp-block-file__button):is(a):hover,:where(.wp-block-file__button):is(a):visited{box-shadow:none;color:#fff;opacity:.85;text-decoration:none}

View File

@ -22,11 +22,6 @@
margin-bottom:1em;
}
@media (max-width:768px){
.wp-block-file__embed{
display:none;
}
}
:where(.wp-block-file__button){
border-radius:2em;
display:inline-block;

View File

@ -1 +1 @@
.wp-block-file{box-sizing:border-box}.wp-block-file:not(.wp-element-button){font-size:.8em}.wp-block-file.aligncenter{text-align:center}.wp-block-file.alignright{text-align:right}.wp-block-file *+.wp-block-file__button{margin-left:.75em}:where(.wp-block-file){margin-bottom:1.5em}.wp-block-file__embed{margin-bottom:1em}@media (max-width:768px){.wp-block-file__embed{display:none}}:where(.wp-block-file__button){border-radius:2em;display:inline-block;padding:.5em 1em}:where(.wp-block-file__button):is(a):active,:where(.wp-block-file__button):is(a):focus,:where(.wp-block-file__button):is(a):hover,:where(.wp-block-file__button):is(a):visited{box-shadow:none;color:#fff;opacity:.85;text-decoration:none}
.wp-block-file{box-sizing:border-box}.wp-block-file:not(.wp-element-button){font-size:.8em}.wp-block-file.aligncenter{text-align:center}.wp-block-file.alignright{text-align:right}.wp-block-file *+.wp-block-file__button{margin-left:.75em}:where(.wp-block-file){margin-bottom:1.5em}.wp-block-file__embed{margin-bottom:1em}:where(.wp-block-file__button){border-radius:2em;display:inline-block;padding:.5em 1em}:where(.wp-block-file__button):is(a):active,:where(.wp-block-file__button):is(a):focus,:where(.wp-block-file__button):is(a):hover,:where(.wp-block-file__button):is(a):visited{box-shadow:none;color:#fff;opacity:.85;text-decoration:none}

View File

@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => 'fb3967e9bafc6e7ca2eb');
<?php return array('dependencies' => array(), 'version' => '3fd0154de23a0ecc28af');

View File

@ -66,7 +66,7 @@ const createActiveXObject = type => {
selectors: {
core: {
file: {
hasPdfPreview: browserSupportsPdfs() ? 'inherit' : 'none'
hasPdfPreview: browserSupportsPdfs
}
}
}

View File

@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => 'cf908645ea0e9c064392');
<?php return array('dependencies' => array(), 'version' => '8a0237493a27c0d781aa');

View File

@ -1 +1 @@
"use strict";(self.__WordPressPrivateInteractivityAPI__=self.__WordPressPrivateInteractivityAPI__||[]).push([[81],{149:function(i,t,n){var e=n(754);const o=i=>{let t;try{t=new window.ActiveXObject(i)}catch(i){t=void 0}return t};(0,e.h)({selectors:{core:{file:{hasPdfPreview:window.navigator.userAgent.indexOf("Mobi")>-1||window.navigator.userAgent.indexOf("Android")>-1||window.navigator.userAgent.indexOf("Macintosh")>-1&&window.navigator.maxTouchPoints&&window.navigator.maxTouchPoints>2||(window.ActiveXObject||"ActiveXObject"in window)&&!o("AcroPDF.PDF")&&!o("PDF.PdfCtrl")?"none":"inherit"}}}})}},function(i){var t;t=149,i(i.s=t)}]);
"use strict";(self.__WordPressPrivateInteractivityAPI__=self.__WordPressPrivateInteractivityAPI__||[]).push([[81],{149:function(i,t,e){var n=e(754);const o=i=>{let t;try{t=new window.ActiveXObject(i)}catch(i){t=void 0}return t};(0,n.h)({selectors:{core:{file:{hasPdfPreview:()=>!(window.navigator.userAgent.indexOf("Mobi")>-1)&&(!(window.navigator.userAgent.indexOf("Android")>-1)&&(!(window.navigator.userAgent.indexOf("Macintosh")>-1&&window.navigator.maxTouchPoints&&window.navigator.maxTouchPoints>2)&&!((window.ActiveXObject||"ActiveXObject"in window)&&!o("AcroPDF.PDF")&&!o("PDF.PdfCtrl"))))}}}})}},function(i){var t;t=149,i(i.s=t)}]);

View File

@ -64,3 +64,4 @@ require_once ABSPATH . WPINC . '/blocks/site-title.php';
require_once ABSPATH . WPINC . '/blocks/social-link.php';
require_once ABSPATH . WPINC . '/blocks/tag-cloud.php';
require_once ABSPATH . WPINC . '/blocks/template-part.php';
require_once ABSPATH . WPINC . '/blocks/term-description.php';

View File

@ -0,0 +1,9 @@
:where(.wp-block-term-description){
margin-bottom:var(--wp--style--block-gap);
margin-top:var(--wp--style--block-gap);
}
.wp-block-term-description p{
margin-bottom:0;
margin-top:0;
}

View File

@ -0,0 +1 @@
:where(.wp-block-term-description){margin-bottom:var(--wp--style--block-gap);margin-top:var(--wp--style--block-gap)}.wp-block-term-description p{margin-bottom:0;margin-top:0}

View File

@ -0,0 +1,9 @@
:where(.wp-block-term-description){
margin-bottom:var(--wp--style--block-gap);
margin-top:var(--wp--style--block-gap);
}
.wp-block-term-description p{
margin-bottom:0;
margin-top:0;
}

View File

@ -0,0 +1 @@
:where(.wp-block-term-description){margin-bottom:var(--wp--style--block-gap);margin-top:var(--wp--style--block-gap)}.wp-block-term-description p{margin-bottom:0;margin-top:0}

View File

@ -877,6 +877,10 @@
z-index:1;
}
.block-editor-block-rename-modal{
z-index:1000001;
}
.block-editor-block-settings-menu__popover .components-dropdown-menu__menu{
padding:0;
}
@ -3111,10 +3115,6 @@
.typography-block-support-panel .single-column{
grid-column:span 1;
}
.block-editor-block-rename-modal{
z-index:1000001;
}
.block-editor-block-toolbar{
display:flex;
flex-grow:1;

File diff suppressed because one or more lines are too long

View File

@ -877,6 +877,10 @@
z-index:1;
}
.block-editor-block-rename-modal{
z-index:1000001;
}
.block-editor-block-settings-menu__popover .components-dropdown-menu__menu{
padding:0;
}
@ -3111,10 +3115,6 @@
.typography-block-support-panel .single-column{
grid-column:span 1;
}
.block-editor-block-rename-modal{
z-index:1000001;
}
.block-editor-block-toolbar{
display:flex;
flex-grow:1;

File diff suppressed because one or more lines are too long

View File

@ -816,11 +816,6 @@
margin-bottom:1em;
}
@media (max-width:768px){
.wp-block-file__embed{
display:none;
}
}
:where(.wp-block-file__button){
border-radius:2em;
display:inline-block;

File diff suppressed because one or more lines are too long

View File

@ -816,11 +816,6 @@
margin-bottom:1em;
}
@media (max-width:768px){
.wp-block-file__embed{
display:none;
}
}
:where(.wp-block-file__button){
border-radius:2em;
display:inline-block;

File diff suppressed because one or more lines are too long

View File

@ -43616,6 +43616,171 @@ function BlockModeToggle({
}
}))])(BlockModeToggle));
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-rename/use-block-rename.js
/**
* WordPress dependencies
*/
function useBlockRename(name) {
const metaDataSupport = (0,external_wp_blocks_namespaceObject.getBlockSupport)(name, '__experimentalMetadata', false);
const supportsBlockNaming = !!(true === metaDataSupport || metaDataSupport?.name);
return {
canRename: supportsBlockNaming
};
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-rename/is-empty-string.js
function isEmptyString(testString) {
return testString?.trim()?.length === 0;
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-rename/modal.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
function BlockRenameModal({
blockName,
originalBlockName,
onClose,
onSave
}) {
const [editedBlockName, setEditedBlockName] = (0,external_wp_element_namespaceObject.useState)(blockName);
const nameHasChanged = editedBlockName !== blockName;
const nameIsOriginal = editedBlockName === originalBlockName;
const nameIsEmpty = isEmptyString(editedBlockName);
const isNameValid = nameHasChanged || nameIsOriginal;
const autoSelectInputText = event => event.target.select();
const dialogDescription = (0,external_wp_compose_namespaceObject.useInstanceId)(BlockRenameModal, `block-editor-rename-modal__description`);
const handleSubmit = () => {
const message = nameIsOriginal || nameIsEmpty ? (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: new name/label for the block */
(0,external_wp_i18n_namespaceObject.__)('Block name reset to: "%s".'), editedBlockName) : (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: new name/label for the block */
(0,external_wp_i18n_namespaceObject.__)('Block name changed to: "%s".'), editedBlockName);
// Must be assertive to immediately announce change.
(0,external_wp_a11y_namespaceObject.speak)(message, 'assertive');
onSave(editedBlockName);
// Immediate close avoids ability to hit save multiple times.
onClose();
};
return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, {
title: (0,external_wp_i18n_namespaceObject.__)('Rename'),
onRequestClose: onClose,
overlayClassName: "block-editor-block-rename-modal",
aria: {
describedby: dialogDescription
},
focusOnMount: "firstContentElement"
}, (0,external_wp_element_namespaceObject.createElement)("p", {
id: dialogDescription
}, (0,external_wp_i18n_namespaceObject.__)('Enter a custom name for this block.')), (0,external_wp_element_namespaceObject.createElement)("form", {
onSubmit: e => {
e.preventDefault();
if (!isNameValid) {
return;
}
handleSubmit();
}
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, {
spacing: "3"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
__nextHasNoMarginBottom: true,
value: editedBlockName,
label: (0,external_wp_i18n_namespaceObject.__)('Block name'),
hideLabelFromVision: true,
placeholder: originalBlockName,
onChange: setEditedBlockName,
onFocus: autoSelectInputText
}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
justify: "right"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
variant: "tertiary",
onClick: onClose
}, (0,external_wp_i18n_namespaceObject.__)('Cancel')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
"aria-disabled": !isNameValid,
variant: "primary",
type: "submit"
}, (0,external_wp_i18n_namespaceObject.__)('Save'))))));
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-rename/rename-control.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
function BlockRenameControl({
clientId
}) {
const [renamingBlock, setRenamingBlock] = (0,external_wp_element_namespaceObject.useState)(false);
const {
metadata
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
const {
getBlockAttributes
} = select(store);
const _metadata = getBlockAttributes(clientId)?.metadata;
return {
metadata: _metadata
};
}, [clientId]);
const {
updateBlockAttributes
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
const customName = metadata?.name;
function onChange(newName) {
updateBlockAttributes([clientId], {
metadata: {
...(metadata && metadata),
name: newName
}
});
}
const blockInformation = useBlockDisplayInformation(clientId);
return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
onClick: () => {
setRenamingBlock(true);
},
"aria-expanded": renamingBlock,
"aria-haspopup": "dialog"
}, (0,external_wp_i18n_namespaceObject.__)('Rename')), renamingBlock && (0,external_wp_element_namespaceObject.createElement)(BlockRenameModal, {
blockName: customName || '',
originalBlockName: blockInformation?.title,
onClose: () => setRenamingBlock(false),
onSave: newName => {
// If the new value is the block's original name (e.g. `Group`)
// or it is an empty string then assume the intent is to reset
// the value. Therefore reset the metadata.
if (newName === blockInformation?.title || isEmptyString(newName)) {
newName = undefined;
}
onChange(newName);
}
}));
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-settings-menu-controls/index.js
/**
@ -43633,6 +43798,7 @@ function BlockModeToggle({
const {
Fill,
Slot: block_settings_menu_controls_Slot
@ -43659,7 +43825,11 @@ const BlockSettingsMenuControlsSlot = ({
const {
canLock
} = useBlockLock(selectedClientIds[0]);
const {
canRename
} = useBlockRename(selectedBlocks[0]);
const showLockButton = selectedClientIds.length === 1 && canLock;
const showRenameButton = selectedClientIds.length === 1 && canRename;
// Check if current selection of blocks is Groupable or Ungroupable
// and pass this props down to ConvertToGroupButton.
@ -43685,6 +43855,8 @@ const BlockSettingsMenuControlsSlot = ({
onClose: fillProps?.onClose
}), showLockButton && (0,external_wp_element_namespaceObject.createElement)(BlockLockMenuItem, {
clientId: selectedClientIds[0]
}), showRenameButton && (0,external_wp_element_namespaceObject.createElement)(BlockRenameControl, {
clientId: selectedClientIds[0]
}), fills, fillProps?.canMove && !fillProps?.onlyBlock && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
onClick: (0,external_wp_compose_namespaceObject.pipe)(fillProps?.onClose, fillProps?.onMoveTo)
}, (0,external_wp_i18n_namespaceObject.__)('Move to')), fillProps?.count === 1 && (0,external_wp_element_namespaceObject.createElement)(block_mode_toggle, {
@ -44225,7 +44397,7 @@ const withBlockHooks = (0,external_wp_compose_namespaceObject.createHigherOrderC
}, 'withBlockHooks');
(0,external_wp_hooks_namespaceObject.addFilter)('editor.BlockEdit', 'core/block-hooks/with-inspector-control', withBlockHooks);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/block-rename-ui.js
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/block-rename.js
/**
* WordPress dependencies
@ -44236,142 +44408,28 @@ const withBlockHooks = (0,external_wp_compose_namespaceObject.createHigherOrderC
/**
* Internal dependencies
*/
const emptyString = testString => testString?.trim()?.length === 0;
function RenameModal({
blockName,
originalBlockName,
onClose,
onSave
}) {
const [editedBlockName, setEditedBlockName] = (0,external_wp_element_namespaceObject.useState)(blockName);
const nameHasChanged = editedBlockName !== blockName;
const nameIsOriginal = editedBlockName === originalBlockName;
const nameIsEmpty = emptyString(editedBlockName);
const isNameValid = nameHasChanged || nameIsOriginal;
const autoSelectInputText = event => event.target.select();
const dialogDescription = (0,external_wp_compose_namespaceObject.useInstanceId)(RenameModal, `block-editor-rename-modal__description`);
const handleSubmit = () => {
const message = nameIsOriginal || nameIsEmpty ? (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: new name/label for the block */
(0,external_wp_i18n_namespaceObject.__)('Block name reset to: "%s".'), editedBlockName) : (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: new name/label for the block */
(0,external_wp_i18n_namespaceObject.__)('Block name changed to: "%s".'), editedBlockName);
// Must be assertive to immediately announce change.
(0,external_wp_a11y_namespaceObject.speak)(message, 'assertive');
onSave(editedBlockName);
// Immediate close avoids ability to hit save multiple times.
onClose();
};
return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, {
title: (0,external_wp_i18n_namespaceObject.__)('Rename'),
onRequestClose: onClose,
overlayClassName: "block-editor-block-rename-modal",
aria: {
describedby: dialogDescription
},
focusOnMount: "firstContentElement"
}, (0,external_wp_element_namespaceObject.createElement)("p", {
id: dialogDescription
}, (0,external_wp_i18n_namespaceObject.__)('Enter a custom name for this block.')), (0,external_wp_element_namespaceObject.createElement)("form", {
onSubmit: e => {
e.preventDefault();
if (!isNameValid) {
return;
}
handleSubmit();
}
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, {
spacing: "3"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
__nextHasNoMarginBottom: true,
value: editedBlockName,
label: (0,external_wp_i18n_namespaceObject.__)('Block name'),
hideLabelFromVision: true,
placeholder: originalBlockName,
onChange: setEditedBlockName,
onFocus: autoSelectInputText
}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
justify: "right"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
variant: "tertiary",
onClick: onClose
}, (0,external_wp_i18n_namespaceObject.__)('Cancel')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
"aria-disabled": !isNameValid,
variant: "primary",
type: "submit"
}, (0,external_wp_i18n_namespaceObject.__)('Save'))))));
}
function BlockRenameControl(props) {
const [renamingBlock, setRenamingBlock] = (0,external_wp_element_namespaceObject.useState)(false);
const withBlockRenameControl = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(BlockEdit => props => {
const {
clientId,
customName,
onChange
name,
attributes,
setAttributes,
isSelected
} = props;
const blockInformation = useBlockDisplayInformation(clientId);
return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(inspector_controls, {
const supportsBlockNaming = (0,external_wp_blocks_namespaceObject.hasBlockSupport)(name, 'renaming', true);
return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, isSelected && supportsBlockNaming && (0,external_wp_element_namespaceObject.createElement)(inspector_controls, {
group: "advanced"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
__nextHasNoMarginBottom: true,
label: (0,external_wp_i18n_namespaceObject.__)('Block name'),
value: customName || '',
onChange: onChange
})), (0,external_wp_element_namespaceObject.createElement)(block_settings_menu_controls, null, ({
selectedClientIds
}) => {
// Only enabled for single selections.
const canRename = selectedClientIds.length === 1 && clientId === selectedClientIds[0];
// This check ensures the `BlockSettingsMenuControls` fill
// doesn't render multiple times and also that it renders for
// the block from which the menu was triggered.
if (!canRename) {
return null;
}
return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
onClick: () => {
setRenamingBlock(true);
},
"aria-expanded": renamingBlock,
"aria-haspopup": "dialog"
}, (0,external_wp_i18n_namespaceObject.__)('Rename'));
}), renamingBlock && (0,external_wp_element_namespaceObject.createElement)(RenameModal, {
blockName: customName || '',
originalBlockName: blockInformation?.title,
onClose: () => setRenamingBlock(false),
onSave: newName => {
// If the new value is the block's original name (e.g. `Group`)
// or it is an empty string then assume the intent is to reset
// the value. Therefore reset the metadata.
if (newName === blockInformation?.title || emptyString(newName)) {
newName = undefined;
}
onChange(newName);
}
}));
}
const withBlockRenameControl = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(BlockEdit => props => {
const {
clientId,
name,
attributes,
setAttributes
} = props;
const metaDataSupport = (0,external_wp_blocks_namespaceObject.getBlockSupport)(name, '__experimentalMetadata', false);
const supportsBlockNaming = !!(true === metaDataSupport || metaDataSupport?.name);
return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, supportsBlockNaming && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(BlockRenameControl, {
clientId: clientId,
customName: attributes?.metadata?.name,
value: attributes?.metadata?.name || '',
onChange: newName => {
setAttributes({
metadata: {
...(attributes?.metadata && attributes?.metadata),
...attributes?.metadata,
name: newName
}
});
@ -60736,6 +60794,7 @@ const ungroup = (0,external_wp_element_namespaceObject.createElement)(external_w
/* harmony default export */ var library_ungroup = (ungroup);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/use-block-commands/index.js
/**
* WordPress dependencies
*/
@ -60749,6 +60808,7 @@ const ungroup = (0,external_wp_element_namespaceObject.createElement)(external_w
* Internal dependencies
*/
const useTransformCommands = () => {
const {
clientIds
@ -60817,7 +60877,9 @@ const useTransformCommands = () => {
name: 'core/block-editor/transform-to-' + name.replace('/', '-'),
// translators: %s: block title/name.
label: (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)('Transform to %s'), title),
icon: icon.src,
icon: (0,external_wp_element_namespaceObject.createElement)(block_icon, {
icon: icon
}),
callback: ({
close
}) => {

File diff suppressed because one or more lines are too long

View File

@ -42521,19 +42521,22 @@ const usePatterns = (clientId, name) => {
};
/**
* Hook that returns whether the Query Loop with the given `clientId` contains
* any third-party block.
* Hook that returns a list of unsupported blocks inside the Query Loop with the
* given `clientId`.
*
* @param {string} clientId The block's client ID.
* @return {boolean} True if it contains third-party blocks.
* @return {string[]} List of block titles.
*/
const useContainsThirdPartyBlocks = clientId => {
const useUnsupportedBlockList = clientId => {
return (0,external_wp_data_namespaceObject.useSelect)(select => {
const {
getClientIdsOfDescendants,
getBlockName
} = select(external_wp_blockEditor_namespaceObject.store);
return getClientIdsOfDescendants(clientId).some(descendantClientId => !getBlockName(descendantClientId).startsWith('core/'));
return getClientIdsOfDescendants(clientId).filter(descendantClientId => {
const blockName = getBlockName(descendantClientId);
return !blockName.startsWith('core/') || blockName === 'core/post-content' || blockName === 'core/template-part' || blockName === 'core/block';
});
}, [clientId]);
};
@ -43096,6 +43099,7 @@ function StickyControl({
/**
* Internal dependencies
*/
@ -43105,23 +43109,26 @@ function EnhancedPaginationControl({
setAttributes,
clientId
}) {
const enhancedPaginationNotice = (0,external_wp_i18n_namespaceObject.__)("Enhanced pagination doesn't support plugin blocks yet. If you want to enable it, you have to remove all plugin blocks from the Query Loop.");
const containsThirdPartyBlocks = useContainsThirdPartyBlocks(clientId);
const unsupported = useUnsupportedBlockList(clientId);
return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, {
label: (0,external_wp_i18n_namespaceObject.__)('Enhanced pagination'),
help: (0,external_wp_i18n_namespaceObject.__)('Browsing between pages wont require a full page reload.'),
checked: !!enhancedPagination,
disabled: containsThirdPartyBlocks,
disabled: unsupported.length,
onChange: value => {
setAttributes({
enhancedPagination: !!value
});
}
}), containsThirdPartyBlocks && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Notice, {
}), !!unsupported.length && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Notice, {
status: "warning",
isDismissible: false,
className: "wp-block-query__enhanced-pagination-notice"
}, enhancedPaginationNotice));
}, (0,external_wp_i18n_namespaceObject.__)("Enhanced pagination doesn't support the following blocks:"), (0,external_wp_element_namespaceObject.createElement)("ul", null, unsupported.map(id => (0,external_wp_element_namespaceObject.createElement)("li", {
key: id
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockTitle, {
clientId: id
})))), (0,external_wp_i18n_namespaceObject.__)('If you want to enable it, you have to remove all unsupported blocks first.')));
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/create-new-post-link.js
@ -43368,7 +43375,7 @@ function QueryInspectorControls(props) {
* Internal dependencies
*/
const disableEnhancedPaginationDescription = (0,external_wp_i18n_namespaceObject.__)('Plugin blocks are not supported yet. For the enhanced pagination to work, remove the plugin block, then re-enable "Enhanced pagination" in the Query Block settings.');
const disableEnhancedPaginationDescription = (0,external_wp_i18n_namespaceObject.__)('You have added unsupported blocks. For the enhanced pagination to work, remove them, then re-enable "Enhanced pagination" in the Query Block settings.');
const modalDescriptionId = 'wp-block-query-enhanced-pagination-modal__description';
function EnhancedPaginationModal({
clientId,
@ -43378,10 +43385,10 @@ function EnhancedPaginationModal({
setAttributes
}) {
const [isOpen, setOpen] = (0,external_wp_element_namespaceObject.useState)(false);
const containsThirdPartyBlocks = useContainsThirdPartyBlocks(clientId);
const unsupported = useUnsupportedBlockList(clientId);
(0,external_wp_element_namespaceObject.useEffect)(() => {
setOpen(containsThirdPartyBlocks && enhancedPagination);
}, [containsThirdPartyBlocks, enhancedPagination, setOpen]);
setOpen(!!unsupported.length && enhancedPagination);
}, [unsupported.length, enhancedPagination, setOpen]);
return isOpen && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, {
title: (0,external_wp_i18n_namespaceObject.__)('Enhanced pagination will be disabled'),
className: "wp-block-query__enhanced-pagination-modal",
@ -55833,7 +55840,6 @@ function TermDescriptionEdit({
const term_description_metadata = {
$schema: "https://schemas.wp.org/trunk/block.json",
apiVersion: 3,
__experimental: "fse",
name: "core/term-description",
title: "Term Description",
category: "theme",

File diff suppressed because one or more lines are too long

View File

@ -5829,7 +5829,8 @@ const resolvers_getUserPatternCategories = () => async ({
}) => {
const patternCategories = await resolveSelect.getEntityRecords('taxonomy', 'wp_pattern_category', {
per_page: -1,
_fields: 'id,name,description,slug'
_fields: 'id,name,description,slug',
context: 'view'
});
const mappedPatternCategories = patternCategories?.map(userCategory => ({
...userCategory,

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.5-alpha-57033';
$wp_version = '6.5-alpha-57034';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.