Editor: initial update of npm packages for 6.3 RC3.

Includes bug fixes for patterns, command palette and several minor regressions.

Props ramonopoly.
See #58926.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
isabel_brison 2023-07-28 07:40:16 +00:00
parent 29c16a48ec
commit bae8871465
26 changed files with 282 additions and 201 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

@ -250,7 +250,7 @@ function build_template_part_block_instance_variations() {
'area' => $template_part->area, 'area' => $template_part->area,
), ),
'scope' => array( 'inserter' ), 'scope' => array( 'inserter' ),
'icon' => $icon_by_area[ $template_part->area ], 'icon' => isset( $icon_by_area[ $template_part->area ] ) ? $icon_by_area[ $template_part->area ] : null,
'example' => array( 'example' => array(
'attributes' => array( 'attributes' => array(
'slug' => $template_part->slug, 'slug' => $template_part->slug,

View File

@ -497,7 +497,7 @@ body.is-fullscreen-mode .interface-interface-skeleton{
} }
} }
.edit-post-header__document-title{ .edit-post-header__center{
display:flex; display:flex;
flex-grow:1; flex-grow:1;
justify-content:center; justify-content:center;
@ -800,7 +800,7 @@ body.is-fullscreen-mode .interface-interface-skeleton{
margin-right:8px; margin-right:8px;
} }
.edit-post-document-title{ .edit-post-document-actions{
align-items:center; align-items:center;
background:#f0f0f0; background:#f0f0f0;
border-radius:4px; border-radius:4px;
@ -811,44 +811,40 @@ body.is-fullscreen-mode .interface-interface-skeleton{
min-width:0; min-width:0;
width:min(100%, 450px); width:min(100%, 450px);
} }
.edit-post-document-title:hover{ .edit-post-document-actions .components-button:hover{
background:#e0e0e0; background:#e0e0e0;
color:currentColor; color:var(--wp-block-synced-color);
} }
.edit-post-document-title__title.components-button{ .edit-post-document-actions__command,.edit-post-document-actions__title{
color:var(--wp-block-synced-color); color:var(--wp-block-synced-color);
flex-grow:1; flex-grow:1;
overflow:hidden; overflow:hidden;
} }
.edit-post-document-title__title.components-button:hover{ .edit-post-document-actions__title:hover{
color:var(--wp-block-synced-color); color:var(--wp-block-synced-color);
} }
.edit-post-document-title__title.components-button h1{ .edit-post-document-actions__title .block-editor-block-icon{
flex-shrink:0;
}
.edit-post-document-actions__title h1{
color:var(--wp-block-synced-color); color:var(--wp-block-synced-color);
overflow:hidden; overflow:hidden;
text-overflow:ellipsis; text-overflow:ellipsis;
white-space:nowrap; white-space:nowrap;
} }
.edit-post-document-title__shortcut{ .edit-post-document-actions__shortcut{
color:#757575; color:#2f2f2f;
flex-shrink:0;
padding:0 12px;
}
.edit-post-document-title__shortcut:hover{
color:#757575;
} }
.edit-post-document-title__left{ .edit-post-document-actions__back.components-button.has-icon.has-text{
color:#757575;
flex-shrink:0; flex-shrink:0;
gap:0;
min-width:36px; min-width:36px;
} }
.edit-post-document-title__left .components-button.has-icon.has-text{ .edit-post-document-actions__back.components-button.has-icon.has-text:hover{
color:#757575;
gap:0;
}
.edit-post-document-title__left .components-button.has-icon.has-text:hover{
color:currentColor; color:currentColor;
} }

File diff suppressed because one or more lines are too long

View File

@ -497,7 +497,7 @@ body.is-fullscreen-mode .interface-interface-skeleton{
} }
} }
.edit-post-header__document-title{ .edit-post-header__center{
display:flex; display:flex;
flex-grow:1; flex-grow:1;
justify-content:center; justify-content:center;
@ -800,7 +800,7 @@ body.is-fullscreen-mode .interface-interface-skeleton{
margin-left:8px; margin-left:8px;
} }
.edit-post-document-title{ .edit-post-document-actions{
align-items:center; align-items:center;
background:#f0f0f0; background:#f0f0f0;
border-radius:4px; border-radius:4px;
@ -811,44 +811,40 @@ body.is-fullscreen-mode .interface-interface-skeleton{
min-width:0; min-width:0;
width:min(100%, 450px); width:min(100%, 450px);
} }
.edit-post-document-title:hover{ .edit-post-document-actions .components-button:hover{
background:#e0e0e0; background:#e0e0e0;
color:currentColor; color:var(--wp-block-synced-color);
} }
.edit-post-document-title__title.components-button{ .edit-post-document-actions__command,.edit-post-document-actions__title{
color:var(--wp-block-synced-color); color:var(--wp-block-synced-color);
flex-grow:1; flex-grow:1;
overflow:hidden; overflow:hidden;
} }
.edit-post-document-title__title.components-button:hover{ .edit-post-document-actions__title:hover{
color:var(--wp-block-synced-color); color:var(--wp-block-synced-color);
} }
.edit-post-document-title__title.components-button h1{ .edit-post-document-actions__title .block-editor-block-icon{
flex-shrink:0;
}
.edit-post-document-actions__title h1{
color:var(--wp-block-synced-color); color:var(--wp-block-synced-color);
overflow:hidden; overflow:hidden;
text-overflow:ellipsis; text-overflow:ellipsis;
white-space:nowrap; white-space:nowrap;
} }
.edit-post-document-title__shortcut{ .edit-post-document-actions__shortcut{
color:#757575; color:#2f2f2f;
flex-shrink:0;
padding:0 12px;
}
.edit-post-document-title__shortcut:hover{
color:#757575;
} }
.edit-post-document-title__left{ .edit-post-document-actions__back.components-button.has-icon.has-text{
color:#757575;
flex-shrink:0; flex-shrink:0;
gap:0;
min-width:36px; min-width:36px;
} }
.edit-post-document-title__left .components-button.has-icon.has-text{ .edit-post-document-actions__back.components-button.has-icon.has-text:hover{
color:#757575;
gap:0;
}
.edit-post-document-title__left .components-button.has-icon.has-text:hover{
color:currentColor; color:currentColor;
} }

File diff suppressed because one or more lines are too long

View File

@ -1290,18 +1290,19 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
} }
.edit-site-document-actions{ .edit-site-document-actions{
align-items:center;
background:#f0f0f0; background:#f0f0f0;
border-radius:4px; border-radius:4px;
display:grid; display:flex;
grid-template-columns:1fr 2fr 1fr; gap:8px;
height:36px; height:36px;
justify-content:space-between;
min-width:0; min-width:0;
overflow:hidden;
width:min(100%, 450px); width:min(100%, 450px);
} }
.edit-site-document-actions:hover{ .edit-site-document-actions .components-button:hover{
background:#e0e0e0; background:#e0e0e0;
color:currentColor; color:var(--wp-block-synced-color);
} }
@media (min-width:782px){ @media (min-width:782px){
.edit-site-document-actions{ .edit-site-document-actions{
@ -1314,20 +1315,16 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
} }
} }
.edit-site-document-actions__command{ .edit-site-document-actions__command,.edit-site-document-actions__title{
display:grid;
grid-column:1 / -1;
grid-row:1;
grid-template-columns:1fr 2fr 1fr;
}
.edit-site-document-actions__title{
color:var(--wp-block-synced-color); color:var(--wp-block-synced-color);
flex-grow:1; flex-grow:1;
grid-column:2 / 3;
overflow:hidden; overflow:hidden;
} }
.edit-site-document-actions__title:hover{
color:var(--wp-block-synced-color);
}
.edit-site-document-actions__title .block-editor-block-icon{ .edit-site-document-actions__title .block-editor-block-icon{
flex-shrink:0;
min-width:24px; min-width:24px;
} }
.edit-site-document-actions__title h1{ .edit-site-document-actions__title h1{
@ -1358,29 +1355,25 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
} }
} }
.edit-site-document-actions__back,.edit-site-document-actions__shortcut{ .edit-site-document-actions__shortcut{
color:#2f2f2f; color:#2f2f2f;
} }
.edit-site-document-actions:hover .edit-site-document-actions__back,.edit-site-document-actions:hover .edit-site-document-actions__shortcut{
color:#1e1e1e;
}
.edit-site-document-actions__shortcut{ .edit-site-document-actions__back.components-button.has-icon.has-text{
text-align:left; color:#757575;
}
.edit-site-document-actions__back{
flex-shrink:0; flex-shrink:0;
grid-column:1 / 2; gap:0;
grid-row:1;
min-width:36px; min-width:36px;
z-index:1; z-index:1;
} }
.edit-site-document-actions.is-animated .edit-site-document-actions__back{ .edit-site-document-actions__back.components-button.has-icon.has-text:hover{
color:currentColor;
}
.edit-site-document-actions.is-animated .edit-site-document-actions__back.components-button.has-icon.has-text{
animation:edit-site-document-actions__slide-in-left .3s; animation:edit-site-document-actions__slide-in-left .3s;
} }
@media (prefers-reduced-motion:reduce){ @media (prefers-reduced-motion:reduce){
.edit-site-document-actions.is-animated .edit-site-document-actions__back{ .edit-site-document-actions.is-animated .edit-site-document-actions__back.components-button.has-icon.has-text{
animation-delay:0s; animation-delay:0s;
animation-duration:1ms; animation-duration:1ms;
} }

File diff suppressed because one or more lines are too long

View File

@ -1290,18 +1290,19 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
} }
.edit-site-document-actions{ .edit-site-document-actions{
align-items:center;
background:#f0f0f0; background:#f0f0f0;
border-radius:4px; border-radius:4px;
display:grid; display:flex;
grid-template-columns:1fr 2fr 1fr; gap:8px;
height:36px; height:36px;
justify-content:space-between;
min-width:0; min-width:0;
overflow:hidden;
width:min(100%, 450px); width:min(100%, 450px);
} }
.edit-site-document-actions:hover{ .edit-site-document-actions .components-button:hover{
background:#e0e0e0; background:#e0e0e0;
color:currentColor; color:var(--wp-block-synced-color);
} }
@media (min-width:782px){ @media (min-width:782px){
.edit-site-document-actions{ .edit-site-document-actions{
@ -1314,20 +1315,16 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
} }
} }
.edit-site-document-actions__command{ .edit-site-document-actions__command,.edit-site-document-actions__title{
display:grid;
grid-column:1 / -1;
grid-row:1;
grid-template-columns:1fr 2fr 1fr;
}
.edit-site-document-actions__title{
color:var(--wp-block-synced-color); color:var(--wp-block-synced-color);
flex-grow:1; flex-grow:1;
grid-column:2 / 3;
overflow:hidden; overflow:hidden;
} }
.edit-site-document-actions__title:hover{
color:var(--wp-block-synced-color);
}
.edit-site-document-actions__title .block-editor-block-icon{ .edit-site-document-actions__title .block-editor-block-icon{
flex-shrink:0;
min-width:24px; min-width:24px;
} }
.edit-site-document-actions__title h1{ .edit-site-document-actions__title h1{
@ -1358,29 +1355,25 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
} }
} }
.edit-site-document-actions__back,.edit-site-document-actions__shortcut{ .edit-site-document-actions__shortcut{
color:#2f2f2f; color:#2f2f2f;
} }
.edit-site-document-actions:hover .edit-site-document-actions__back,.edit-site-document-actions:hover .edit-site-document-actions__shortcut{
color:#1e1e1e;
}
.edit-site-document-actions__shortcut{ .edit-site-document-actions__back.components-button.has-icon.has-text{
text-align:right; color:#757575;
}
.edit-site-document-actions__back{
flex-shrink:0; flex-shrink:0;
grid-column:1 / 2; gap:0;
grid-row:1;
min-width:36px; min-width:36px;
z-index:1; z-index:1;
} }
.edit-site-document-actions.is-animated .edit-site-document-actions__back{ .edit-site-document-actions__back.components-button.has-icon.has-text:hover{
color:currentColor;
}
.edit-site-document-actions.is-animated .edit-site-document-actions__back.components-button.has-icon.has-text{
animation:edit-site-document-actions__slide-in-left .3s; animation:edit-site-document-actions__slide-in-left .3s;
} }
@media (prefers-reduced-motion:reduce){ @media (prefers-reduced-motion:reduce){
.edit-site-document-actions.is-animated .edit-site-document-actions__back{ .edit-site-document-actions.is-animated .edit-site-document-actions__back.components-button.has-icon.has-text{
animation-delay:0s; animation-delay:0s;
animation-duration:1ms; animation-duration:1ms;
} }

File diff suppressed because one or more lines are too long

View File

@ -11744,8 +11744,8 @@ function getCustomValueFromPreset(value, spacingSizes) {
*/ */
function getPresetValueFromCustomValue(value, spacingSizes) { function getPresetValueFromCustomValue(value, spacingSizes) {
// Return value as-is if it is already a preset; // Return value as-is if it is undefined or is already a preset, or '0';
if (isValueSpacingPreset(value) || value === '0') { if (!value || isValueSpacingPreset(value) || value === '0') {
return value; return value;
} }
@ -13394,9 +13394,9 @@ function useSettingsForBlockElement(parentSettings, blockName, element) {
}; };
} }
const sides = Array.isArray(supports?.spacing?.[key]) ? supports?.spacing?.[key] : supports?.spacing?.[key]?.sides; const sides = Array.isArray(supports?.spacing?.[key]) ? supports?.spacing?.[key] : supports?.spacing?.[key]?.sides; // Check if spacing type is supported before adding sides.
if (sides?.length) { if (sides?.length && updatedSettings.spacing?.[key]) {
updatedSettings.spacing = { ...updatedSettings.spacing, updatedSettings.spacing = { ...updatedSettings.spacing,
[key]: { ...updatedSettings.spacing?.[key], [key]: { ...updatedSettings.spacing?.[key],
sides sides
@ -26739,10 +26739,10 @@ function useDarkThemeBodyClassName(styles) {
const tempCanvas = ownerDocument.createElement('div'); const tempCanvas = ownerDocument.createElement('div');
tempCanvas.classList.add('editor-styles-wrapper'); tempCanvas.classList.add('editor-styles-wrapper');
body.appendChild(tempCanvas); body.appendChild(tempCanvas);
backgroundColor = defaultView.getComputedStyle(tempCanvas, null).getPropertyValue('background-color'); backgroundColor = defaultView?.getComputedStyle(tempCanvas, null).getPropertyValue('background-color');
body.removeChild(tempCanvas); body.removeChild(tempCanvas);
} else { } else {
backgroundColor = defaultView.getComputedStyle(canvas, null).getPropertyValue('background-color'); backgroundColor = defaultView?.getComputedStyle(canvas, null).getPropertyValue('background-color');
} }
const colordBackgroundColor = w(backgroundColor); // If background is transparent, it should be treated as light color. const colordBackgroundColor = w(backgroundColor); // If background is transparent, it should be treated as light color.
@ -50077,7 +50077,12 @@ function useListViewDropZone({
}, [canInsertBlocks, draggedBlockClientIds, getBlockCount, getBlockIndex, getBlockRootClientId, rtl]), 200); }, [canInsertBlocks, draggedBlockClientIds, getBlockCount, getBlockIndex, getBlockRootClientId, rtl]), 200);
const ref = (0,external_wp_compose_namespaceObject.__experimentalUseDropZone)({ const ref = (0,external_wp_compose_namespaceObject.__experimentalUseDropZone)({
dropZoneElement, dropZoneElement,
onDrop: onBlockDrop,
onDrop(event) {
if (target) {
onBlockDrop(event);
}
},
onDragLeave() { onDragLeave() {
throttled.cancel(); throttled.cancel();
@ -58001,41 +58006,66 @@ function useFirefoxCompat(props) {
* WordPress dependencies * WordPress dependencies
*/ */
function FormatEdit({
formatTypes, /**
* Internal dependencies
*/
const format_edit_DEFAULT_BLOCK_CONTEXT = {};
const usesContextKey = Symbol('usesContext');
function format_edit_Edit({
onChange, onChange,
onFocus, onFocus,
value, value,
forwardedRef forwardedRef,
settings
}) { }) {
return formatTypes.map(settings => { const {
const { name,
name, edit: EditFunction,
edit: Edit [usesContextKey]: usesContext
} = settings; } = settings;
const blockContext = (0,external_wp_element_namespaceObject.useContext)(block_context); // Assign context values using the block type's declared context needs.
if (!Edit) { const context = (0,external_wp_element_namespaceObject.useMemo)(() => {
return null; return usesContext ? Object.fromEntries(Object.entries(blockContext).filter(([key]) => usesContext.includes(key))) : format_edit_DEFAULT_BLOCK_CONTEXT;
} }, [usesContext, blockContext]);
const activeFormat = (0,external_wp_richText_namespaceObject.getActiveFormat)(value, name); if (!EditFunction) {
const isActive = activeFormat !== undefined; return null;
const activeObject = (0,external_wp_richText_namespaceObject.getActiveObject)(value); }
const isObjectActive = activeObject !== undefined && activeObject.type === name;
return (0,external_wp_element_namespaceObject.createElement)(Edit, { const activeFormat = (0,external_wp_richText_namespaceObject.getActiveFormat)(value, name);
key: name, const isActive = activeFormat !== undefined;
isActive: isActive, const activeObject = (0,external_wp_richText_namespaceObject.getActiveObject)(value);
activeAttributes: isActive ? activeFormat.attributes || {} : {}, const isObjectActive = activeObject !== undefined && activeObject.type === name;
isObjectActive: isObjectActive, return (0,external_wp_element_namespaceObject.createElement)(EditFunction, {
activeObjectAttributes: isObjectActive ? activeObject.attributes || {} : {}, key: name,
value: value, isActive: isActive,
onChange: onChange, activeAttributes: isActive ? activeFormat.attributes || {} : {},
onFocus: onFocus, isObjectActive: isObjectActive,
contentRef: forwardedRef activeObjectAttributes: isObjectActive ? activeObject.attributes || {} : {},
}); value: value,
onChange: onChange,
onFocus: onFocus,
contentRef: forwardedRef,
context: context
}); });
} }
function FormatEdit({
formatTypes,
...props
}) {
return formatTypes.map(settings => (0,external_wp_element_namespaceObject.createElement)(format_edit_Edit, {
settings: settings,
...props,
key: settings.name
}));
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/content.js ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/content.js
@ -66332,6 +66362,7 @@ function ResolutionTool({
/** /**
* Private @wordpress/block-editor APIs. * Private @wordpress/block-editor APIs.
*/ */
@ -66355,7 +66386,8 @@ lock(privateApis, { ...global_styles_namespaceObject,
DimensionsTool: dimensions_tool, DimensionsTool: dimensions_tool,
ResolutionTool: ResolutionTool, ResolutionTool: ResolutionTool,
ReusableBlocksRenameHint: ReusableBlocksRenameHint, ReusableBlocksRenameHint: ReusableBlocksRenameHint,
useReusableBlocksRenameHint: useReusableBlocksRenameHint useReusableBlocksRenameHint: useReusableBlocksRenameHint,
usesContextKey: usesContextKey
}); });
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/index.js ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/index.js

File diff suppressed because one or more lines are too long

View File

@ -58464,6 +58464,17 @@ function FootnotesEdit({
const footnotes = meta?.footnotes ? JSON.parse(meta.footnotes) : []; const footnotes = meta?.footnotes ? JSON.parse(meta.footnotes) : [];
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
if (postType !== 'post' && postType !== 'page') {
return (0,external_wp_element_namespaceObject.createElement)("div", { ...blockProps
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, {
icon: (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, {
icon: format_list_numbered
}),
label: (0,external_wp_i18n_namespaceObject.__)('Footnotes') // To do: add instructions. We can't add new string in RC.
}));
}
if (!footnotes.length) { if (!footnotes.length) {
return (0,external_wp_element_namespaceObject.createElement)("div", { ...blockProps return (0,external_wp_element_namespaceObject.createElement)("div", { ...blockProps
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, { }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, {
@ -58634,6 +58645,10 @@ const {
}, },
style: "wp-block-footnotes" style: "wp-block-footnotes"
}; };
const {
usesContextKey
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
const formatName = 'core/footnote'; const formatName = 'core/footnote';
const format = { const format = {
title: (0,external_wp_i18n_namespaceObject.__)('Footnote'), title: (0,external_wp_i18n_namespaceObject.__)('Footnote'),
@ -58643,10 +58658,14 @@ const format = {
'data-fn': 'data-fn' 'data-fn': 'data-fn'
}, },
contentEditable: false, contentEditable: false,
[usesContextKey]: ['postType'],
edit: function Edit({ edit: function Edit({
value, value,
onChange, onChange,
isObjectActive isObjectActive,
context: {
postType
}
}) { }) {
const registry = (0,external_wp_data_namespaceObject.useRegistry)(); const registry = (0,external_wp_data_namespaceObject.useRegistry)();
const { const {
@ -58655,11 +58674,20 @@ const format = {
getBlockName, getBlockName,
getBlocks getBlocks
} = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store); } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
const footnotesBlockType = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blocks_namespaceObject.store).getBlockType(format_name));
const { const {
selectionChange, selectionChange,
insertBlock insertBlock
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
if (!footnotesBlockType) {
return null;
}
if (postType !== 'post' && postType !== 'page') {
return null;
}
function onClick() { function onClick() {
registry.batch(() => { registry.batch(() => {
let id; let id;
@ -58761,8 +58789,7 @@ const {
const footnotes_settings = { const footnotes_settings = {
icon: format_list_numbered, icon: format_list_numbered,
edit: FootnotesEdit edit: FootnotesEdit
}; // Would be good to remove the format and HoR if the block is unregistered. };
(0,external_wp_richText_namespaceObject.registerFormatType)(formatName, format); (0,external_wp_richText_namespaceObject.registerFormatType)(formatName, format);
const footnotes_init = () => { const footnotes_init = () => {
initBlock({ initBlock({

File diff suppressed because one or more lines are too long

View File

@ -3980,6 +3980,16 @@ function CommandMenu() {
return false; return false;
} }
const onKeyDown = event => {
if ( // Ignore keydowns from IMEs
event.nativeEvent.isComposing || // Workaround for Mac Safari where the final Enter/Backspace of an IME composition
// is `isComposing=false`, even though it's technically still part of the composition.
// These can only be detected by keyCode.
event.keyCode === 229) {
event.preventDefault();
}
};
const isLoading = Object.values(loaders).some(Boolean); const isLoading = Object.values(loaders).some(Boolean);
return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, { return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, {
className: "commands-command-menu", className: "commands-command-menu",
@ -3989,7 +3999,8 @@ function CommandMenu() {
}, (0,external_wp_element_namespaceObject.createElement)("div", { }, (0,external_wp_element_namespaceObject.createElement)("div", {
className: "commands-command-menu__container" className: "commands-command-menu__container"
}, (0,external_wp_element_namespaceObject.createElement)(Le, { }, (0,external_wp_element_namespaceObject.createElement)(Le, {
label: (0,external_wp_i18n_namespaceObject.__)('Command palette') label: (0,external_wp_i18n_namespaceObject.__)('Command palette'),
onKeyDown: onKeyDown
}, (0,external_wp_element_namespaceObject.createElement)("div", { }, (0,external_wp_element_namespaceObject.createElement)("div", {
className: "commands-command-menu__header" className: "commands-command-menu__header"
}, (0,external_wp_element_namespaceObject.createElement)(Le.Input, { }, (0,external_wp_element_namespaceObject.createElement)(Le.Input, {

File diff suppressed because one or more lines are too long

View File

@ -67927,7 +67927,7 @@ var CompositeContext = (0,external_React_.createContext)(
;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/FHQZ2KRN.js ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/OOWNFOTF.js
@ -67935,6 +67935,7 @@ var CompositeContext = (0,external_React_.createContext)(
var noopSubscribe = () => () => { var noopSubscribe = () => () => {
}; };
function useStoreState(store, keyOrSelector = WVTCK5PV_identity) { function useStoreState(store, keyOrSelector = WVTCK5PV_identity) {
@ -67965,6 +67966,10 @@ function useStoreProps(store, props, key, setKey) {
setValue: setKey ? props[setKey] : void 0 setValue: setKey ? props[setKey] : void 0
}); });
useSafeLayoutEffect(() => { useSafeLayoutEffect(() => {
let canFlushSync = false;
queueMicrotask(() => {
canFlushSync = true;
});
return store.sync( return store.sync(
(state, prev) => { (state, prev) => {
const { value: value2, setValue } = propsRef.current; const { value: value2, setValue } = propsRef.current;
@ -67974,7 +67979,11 @@ function useStoreProps(store, props, key, setKey) {
return; return;
if (state[key] === value2) if (state[key] === value2)
return; return;
setValue(state[key]); if (canFlushSync) {
(0,external_ReactDOM_namespaceObject.flushSync)(() => setValue(state[key]));
} else {
setValue(state[key]);
}
}, },
[key] [key]
); );
@ -67987,7 +67996,7 @@ function useStoreProps(store, props, key, setKey) {
}, [key]); }, [key]);
}, [store, key, value]); }, [store, key, value]);
} }
function FHQZ2KRN_useStore(createStore) { function OOWNFOTF_useStore(createStore) {
const store = useLazyValue(createStore); const store = useLazyValue(createStore);
useSafeLayoutEffect(() => store.init(), [store]); useSafeLayoutEffect(() => store.init(), [store]);
const useState = (0,external_React_.useCallback)( const useState = (0,external_React_.useCallback)(
@ -67999,7 +68008,7 @@ function FHQZ2KRN_useStore(createStore) {
;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/WFK3YK7D.js ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/DCG3EYDE.js
@ -68074,12 +68083,12 @@ function findNextPageItemId(element, store, next, pageUp = false) {
} }
return id; return id;
} }
function WFK3YK7D_targetIsAnotherItem(event, store) { function DCG3EYDE_targetIsAnotherItem(event, store) {
if (events_isSelfTarget(event)) if (events_isSelfTarget(event))
return false; return false;
return OXPV2NBK_isItem(store, event.target); return OXPV2NBK_isItem(store, event.target);
} }
function WFK3YK7D_useRole(ref, props) { function DCG3EYDE_useRole(ref, props) {
const roleProp = props.role; const roleProp = props.role;
const [role, setRole] = (0,external_React_.useState)(roleProp); const [role, setRole] = (0,external_React_.useState)(roleProp);
useSafeLayoutEffect(() => { useSafeLayoutEffect(() => {
@ -68110,7 +68119,7 @@ function supportsAriaSelected(role) {
return true; return true;
return false; return false;
} }
var WFK3YK7D_useCompositeItem = NQJBHION_createHook( var DCG3EYDE_useCompositeItem = NQJBHION_createHook(
(_a) => { (_a) => {
var _b = _a, { var _b = _a, {
store, store,
@ -68172,7 +68181,7 @@ var WFK3YK7D_useCompositeItem = NQJBHION_createHook(
if (!store) if (!store)
return; return;
const { activeId, virtualFocus: virtualFocus2, baseElement: baseElement2 } = store.getState(); const { activeId, virtualFocus: virtualFocus2, baseElement: baseElement2 } = store.getState();
if (WFK3YK7D_targetIsAnotherItem(event, store)) if (DCG3EYDE_targetIsAnotherItem(event, store))
return; return;
if (activeId !== id) { if (activeId !== id) {
store.setActiveId(id); store.setActiveId(id);
@ -68272,7 +68281,7 @@ var WFK3YK7D_useCompositeItem = NQJBHION_createHook(
); );
const isActiveItem = useStoreState(store, (state) => state.activeId === id); const isActiveItem = useStoreState(store, (state) => state.activeId === id);
const virtualFocus = useStoreState(store, "virtualFocus"); const virtualFocus = useStoreState(store, "virtualFocus");
const role = WFK3YK7D_useRole(ref, props); const role = DCG3EYDE_useRole(ref, props);
let ariaSelected; let ariaSelected;
if (isActiveItem) { if (isActiveItem) {
if (requiresAriaSelected(role)) { if (requiresAriaSelected(role)) {
@ -68331,9 +68340,9 @@ var WFK3YK7D_useCompositeItem = NQJBHION_createHook(
}); });
} }
); );
var WFK3YK7D_CompositeItem = createMemoComponent( var DCG3EYDE_CompositeItem = createMemoComponent(
(props) => { (props) => {
const htmlProps = WFK3YK7D_useCompositeItem(props); const htmlProps = DCG3EYDE_useCompositeItem(props);
return NQJBHION_createElement("button", htmlProps); return NQJBHION_createElement("button", htmlProps);
} }
); );
@ -68341,7 +68350,7 @@ if (false) {}
;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/6YH4Z35H.js ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/HCTED3MY.js
@ -68350,7 +68359,7 @@ if (false) {}
var useToolbarItem = NQJBHION_createHook( var useToolbarItem = NQJBHION_createHook(
(_a) => { (_a) => {
var _b = _a, { store } = _b, props = __objRest(_b, ["store"]); var _b = _a, { store } = _b, props = __objRest(_b, ["store"]);
props = WFK3YK7D_useCompositeItem(PNRLI7OV_spreadValues({ store }, props)); props = DCG3EYDE_useCompositeItem(PNRLI7OV_spreadValues({ store }, props));
return props; return props;
} }
); );
@ -68705,7 +68714,7 @@ function ToolbarGroup({
/* harmony default export */ var toolbar_group = (ToolbarGroup); /* harmony default export */ var toolbar_group = (ToolbarGroup);
;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/6DS7ZDWX.js ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/WKNTOKYS.js
@ -68728,7 +68737,7 @@ function useCollectionStore(props = {}) {
;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/OK4RCQBZ.js ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/5PLAJI33.js
@ -69421,7 +69430,7 @@ function useToolbarStoreProps(store, props) {
} }
function useToolbarStore(props = {}) { function useToolbarStore(props = {}) {
const options = useToolbarStoreOptions(props); const options = useToolbarStoreOptions(props);
const store = FHQZ2KRN_useStore( const store = OOWNFOTF_useStore(
() => createToolbarStore(PNRLI7OV_spreadValues(PNRLI7OV_spreadValues({}, props), options)) () => createToolbarStore(PNRLI7OV_spreadValues(PNRLI7OV_spreadValues({}, props), options))
); );
return useToolbarStoreProps(store, props); return useToolbarStoreProps(store, props);

File diff suppressed because one or more lines are too long

View File

@ -6117,7 +6117,7 @@ const layout = (0,external_wp_element_namespaceObject.createElement)(external_wp
})); }));
/* harmony default export */ var library_layout = (layout); /* harmony default export */ var library_layout = (layout);
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/document-title/index.js ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/document-actions/index.js
/** /**
@ -6136,7 +6136,7 @@ const layout = (0,external_wp_element_namespaceObject.createElement)(external_wp
function DocumentTitle() { function DocumentActions() {
const { const {
template, template,
isEditing isEditing
@ -6176,19 +6176,19 @@ function DocumentTitle() {
} }
return (0,external_wp_element_namespaceObject.createElement)("div", { return (0,external_wp_element_namespaceObject.createElement)("div", {
className: "edit-post-document-title" className: "edit-post-document-actions"
}, (0,external_wp_element_namespaceObject.createElement)("span", {
className: "edit-post-document-title__left"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
className: "edit-post-document-actions__back",
onClick: () => { onClick: () => {
clearSelectedBlock(); clearSelectedBlock();
setIsEditingTemplate(false); setIsEditingTemplate(false);
}, },
icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_right_small : chevron_left_small icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_right_small : chevron_left_small
}, (0,external_wp_i18n_namespaceObject.__)('Back'))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { }, (0,external_wp_i18n_namespaceObject.__)('Back')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
className: "edit-post-document-title__title", className: "edit-post-document-actions__command",
onClick: () => openCommandCenter() onClick: () => openCommandCenter()
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, { }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
className: "edit-post-document-actions__title",
spacing: 1, spacing: 1,
justify: "center" justify: "center"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, { }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, {
@ -6198,13 +6198,12 @@ function DocumentTitle() {
as: "h1" as: "h1"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, { }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, {
as: "span" as: "span"
}, (0,external_wp_i18n_namespaceObject.__)('Editing template: ')), templateTitle))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { }, (0,external_wp_i18n_namespaceObject.__)('Editing template: ')), templateTitle)), (0,external_wp_element_namespaceObject.createElement)("span", {
className: "edit-post-document-title__shortcut", className: "edit-post-document-actions__shortcut"
onClick: () => openCommandCenter() }, external_wp_keycodes_namespaceObject.displayShortcut.primary('k'))));
}, external_wp_keycodes_namespaceObject.displayShortcut.primary('k')));
} }
/* harmony default export */ var document_title = (DocumentTitle); /* harmony default export */ var document_actions = (DocumentActions);
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/index.js ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/index.js
@ -6288,8 +6287,8 @@ function Header({
}, },
className: "edit-post-header__toolbar" className: "edit-post-header__toolbar"
}, (0,external_wp_element_namespaceObject.createElement)(header_toolbar, null), (0,external_wp_element_namespaceObject.createElement)("div", { }, (0,external_wp_element_namespaceObject.createElement)(header_toolbar, null), (0,external_wp_element_namespaceObject.createElement)("div", {
className: "edit-post-header__document-title" className: "edit-post-header__center"
}, (0,external_wp_element_namespaceObject.createElement)(document_title, null))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__unstableMotion.div, { }, (0,external_wp_element_namespaceObject.createElement)(document_actions, null))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__unstableMotion.div, {
variants: slideY, variants: slideY,
transition: { transition: {
type: 'tween', type: 'tween',
@ -6636,11 +6635,11 @@ function ListViewSidebar() {
selectOnMove: false, selectOnMove: false,
tabs: [{ tabs: [{
name: 'list-view', name: 'list-view',
title: 'List View', title: (0,external_wp_i18n_namespaceObject._x)('List View', 'Post overview'),
className: 'edit-post-sidebar__panel-tab' className: 'edit-post-sidebar__panel-tab'
}, { }, {
name: 'outline', name: 'outline',
title: 'Outline', title: (0,external_wp_i18n_namespaceObject._x)('Outline', 'Post overview'),
className: 'edit-post-sidebar__panel-tab' className: 'edit-post-sidebar__panel-tab'
}] }]
}, currentTab => (0,external_wp_element_namespaceObject.createElement)("div", { }, currentTab => (0,external_wp_element_namespaceObject.createElement)("div", {

File diff suppressed because one or more lines are too long

View File

@ -10139,11 +10139,6 @@ function CategoryItem({
path: '/patterns', path: '/patterns',
categoryType: type, categoryType: type,
categoryId: id categoryId: id
}, {
// Keep a record of where we came from in state so we can
// use the browser's back button to go back to Patterns.
// See the implementation of the back button in patterns-list.
backPath: '/patterns'
}); });
if (!count) { if (!count) {
@ -17027,7 +17022,7 @@ function useSiteEditorSettings() {
} }
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/block-editor/constants.js ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/block-editor/constants.js
const FOCUSABLE_ENTITIES = ['wp_template_part', 'wp_navigation']; const FOCUSABLE_ENTITIES = ['wp_template_part', 'wp_navigation', 'wp_block'];
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js
@ -18716,7 +18711,7 @@ const interfaceLabels = {
footer: (0,external_wp_i18n_namespaceObject.__)('Editor footer') footer: (0,external_wp_i18n_namespaceObject.__)('Editor footer')
}; };
const typeLabels = { const typeLabels = {
wp_template: (0,external_wp_i18n_namespaceObject.__)('Template Part'), wp_template: (0,external_wp_i18n_namespaceObject.__)('Template'),
wp_template_part: (0,external_wp_i18n_namespaceObject.__)('Template Part'), wp_template_part: (0,external_wp_i18n_namespaceObject.__)('Template Part'),
wp_block: (0,external_wp_i18n_namespaceObject.__)('Pattern') wp_block: (0,external_wp_i18n_namespaceObject.__)('Pattern')
}; // Prevent accidental removal of certain blocks, asking the user for }; // Prevent accidental removal of certain blocks, asking the user for
@ -18811,9 +18806,8 @@ function Editor({
if (hasLoadedPost) { if (hasLoadedPost) {
var _typeLabels$editedPos; var _typeLabels$editedPos;
const type = (_typeLabels$editedPos = typeLabels[editedPostType]) !== null && _typeLabels$editedPos !== void 0 ? _typeLabels$editedPos : (0,external_wp_i18n_namespaceObject.__)('Template');
title = (0,external_wp_i18n_namespaceObject.sprintf)( // translators: A breadcrumb trail in browser tab. %1$s: title of template being edited, %2$s: type of template (Template or Template Part). title = (0,external_wp_i18n_namespaceObject.sprintf)( // translators: A breadcrumb trail in browser tab. %1$s: title of template being edited, %2$s: type of template (Template or Template Part).
(0,external_wp_i18n_namespaceObject.__)('%1$s %2$s Editor'), getTitle(), type); (0,external_wp_i18n_namespaceObject.__)('%1$s %2$s Editor'), getTitle(), (_typeLabels$editedPos = typeLabels[editedPostType]) !== null && _typeLabels$editedPos !== void 0 ? _typeLabels$editedPos : typeLabels.wp_template);
} // Only announce the title once the editor is ready to prevent "Replace" } // Only announce the title once the editor is ready to prevent "Replace"
// action in <URLQueryController> from double-announcing. // action in <URLQueryController> from double-announcing.
@ -20011,7 +20005,7 @@ function BaseDocumentActions({
className: classnames_default()('edit-site-document-actions', className) className: classnames_default()('edit-site-document-actions', className)
}, onBack && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { }, onBack && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
className: "edit-site-document-actions__back", className: "edit-site-document-actions__back",
icon: chevron_left_small, icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_right_small : chevron_left_small,
onClick: event => { onClick: event => {
event.stopPropagation(); event.stopPropagation();
onBack(); onBack();
@ -20861,7 +20855,7 @@ function useSyncCanvasModeWithURL() {
(0,external_wp_element_namespaceObject.useEffect)(() => { (0,external_wp_element_namespaceObject.useEffect)(() => {
currentCanvasInUrl.current = canvasInUrl; currentCanvasInUrl.current = canvasInUrl;
if (canvasInUrl === undefined && currentCanvasMode.current !== 'view') { if (canvasInUrl !== 'edit' && currentCanvasMode.current !== 'view') {
setCanvasMode('view'); setCanvasMode('view');
} else if (canvasInUrl === 'edit' && currentCanvasMode.current !== 'edit') { } else if (canvasInUrl === 'edit' && currentCanvasMode.current !== 'edit') {
setCanvasMode('edit'); setCanvasMode('edit');
@ -22532,9 +22526,10 @@ function Pagination({
function Grid({ function Grid({
categoryId, categoryId,
items, items,
currentPage,
setCurrentPage,
...props ...props
}) { }) {
const [currentPage, setCurrentPage] = (0,external_wp_element_namespaceObject.useState)(1);
const gridRef = (0,external_wp_element_namespaceObject.useRef)(); const gridRef = (0,external_wp_element_namespaceObject.useRef)();
const totalItems = items.length; const totalItems = items.length;
const pageIndex = currentPage - 1; const pageIndex = currentPage - 1;
@ -22834,6 +22829,7 @@ function getItemSearchRank(item, searchTerm, config) {
/** /**
* Internal dependencies * Internal dependencies
*/ */
@ -22859,8 +22855,6 @@ const templatePartToPattern = templatePart => ({
templatePart templatePart
}); });
const templatePartHasCategory = (item, category) => item.templatePart.area === category;
const selectTemplatePartsAsPatterns = (select, { const selectTemplatePartsAsPatterns = (select, {
categoryId, categoryId,
search = '' search = ''
@ -22871,11 +22865,28 @@ const selectTemplatePartsAsPatterns = (select, {
getEntityRecords, getEntityRecords,
getIsResolving getIsResolving
} = select(external_wp_coreData_namespaceObject.store); } = select(external_wp_coreData_namespaceObject.store);
const {
__experimentalGetDefaultTemplatePartAreas
} = select(external_wp_editor_namespaceObject.store);
const query = { const query = {
per_page: -1 per_page: -1
}; };
const rawTemplateParts = (_getEntityRecords = getEntityRecords('postType', TEMPLATE_PARTS, query)) !== null && _getEntityRecords !== void 0 ? _getEntityRecords : EMPTY_PATTERN_LIST; const rawTemplateParts = (_getEntityRecords = getEntityRecords('postType', TEMPLATE_PARTS, query)) !== null && _getEntityRecords !== void 0 ? _getEntityRecords : EMPTY_PATTERN_LIST;
const templateParts = rawTemplateParts.map(templatePart => templatePartToPattern(templatePart)); const templateParts = rawTemplateParts.map(templatePart => templatePartToPattern(templatePart)); // In the case where a custom template part area has been removed we need
// the current list of areas to cross check against so orphaned template
// parts can be treated as uncategorized.
const knownAreas = __experimentalGetDefaultTemplatePartAreas() || [];
const templatePartAreas = knownAreas.map(area => area.area);
const templatePartHasCategory = (item, category) => {
if (category !== 'uncategorized') {
return item.templatePart.area === category;
}
return item.templatePart.area === category || !templatePartAreas.includes(item.templatePart.area);
};
const isResolving = getIsResolving('getEntityRecords', ['postType', 'wp_template_part', query]); const isResolving = getIsResolving('getEntityRecords', ['postType', 'wp_template_part', query]);
const patterns = searchItems(templateParts, search, { const patterns = searchItems(templateParts, search, {
categoryId, categoryId,
@ -23036,6 +23047,7 @@ function PatternsList({
categoryId, categoryId,
type type
}) { }) {
const [currentPage, setCurrentPage] = (0,external_wp_element_namespaceObject.useState)(1);
const location = patterns_list_useLocation(); const location = patterns_list_useLocation();
const history = patterns_list_useHistory(); const history = patterns_list_useHistory();
const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium', '<'); const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium', '<');
@ -23051,6 +23063,17 @@ function PatternsList({
search: deferredFilterValue, search: deferredFilterValue,
syncStatus: deferredSyncedFilter === 'all' ? undefined : deferredSyncedFilter syncStatus: deferredSyncedFilter === 'all' ? undefined : deferredSyncedFilter
}); });
const updateSearchFilter = value => {
setCurrentPage(1);
setFilterValue(value);
};
const updateSyncFilter = value => {
setCurrentPage(1);
setSyncFilter(value);
};
const id = (0,external_wp_element_namespaceObject.useId)(); const id = (0,external_wp_element_namespaceObject.useId)();
const titleId = `${id}-title`; const titleId = `${id}-title`;
const descriptionId = `${id}-description`; const descriptionId = `${id}-description`;
@ -23085,7 +23108,7 @@ function PatternsList({
className: "edit-site-patterns__search-block" className: "edit-site-patterns__search-block"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SearchControl, { }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SearchControl, {
className: "edit-site-patterns__search", className: "edit-site-patterns__search",
onChange: value => setFilterValue(value), onChange: value => updateSearchFilter(value),
placeholder: (0,external_wp_i18n_namespaceObject.__)('Search patterns'), placeholder: (0,external_wp_i18n_namespaceObject.__)('Search patterns'),
label: (0,external_wp_i18n_namespaceObject.__)('Search patterns'), label: (0,external_wp_i18n_namespaceObject.__)('Search patterns'),
value: filterValue, value: filterValue,
@ -23096,7 +23119,7 @@ function PatternsList({
label: (0,external_wp_i18n_namespaceObject.__)('Filter by sync status'), label: (0,external_wp_i18n_namespaceObject.__)('Filter by sync status'),
value: syncFilter, value: syncFilter,
isBlock: true, isBlock: true,
onChange: value => setSyncFilter(value), onChange: value => updateSyncFilter(value),
__nextHasNoMarginBottom: true __nextHasNoMarginBottom: true
}, Object.entries(SYNC_FILTERS).map(([key, label]) => (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { }, Object.entries(SYNC_FILTERS).map(([key, label]) => (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, {
className: "edit-site-patterns__sync-status-filter-option", className: "edit-site-patterns__sync-status-filter-option",
@ -23117,7 +23140,9 @@ function PatternsList({
categoryId: categoryId, categoryId: categoryId,
items: patterns, items: patterns,
"aria-labelledby": titleId, "aria-labelledby": titleId,
"aria-describedby": descriptionId "aria-describedby": descriptionId,
currentPage: currentPage,
setCurrentPage: setCurrentPage
}), !isResolving && !hasPatterns && (0,external_wp_element_namespaceObject.createElement)(NoPatterns, null)); }), !isResolving && !hasPatterns && (0,external_wp_element_namespaceObject.createElement)(NoPatterns, null));
} }

File diff suppressed because one or more lines are too long

View File

@ -4128,7 +4128,7 @@ function useSelectionChangeCompat() {
const { const {
defaultView defaultView
} = ownerDocument; } = ownerDocument;
const selection = defaultView.getSelection(); const selection = defaultView?.getSelection();
let range; let range;
function getRange() { function getRange() {

File diff suppressed because one or more lines are too long

View File

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