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,
),
'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(
'attributes' => array(
'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;
flex-grow:1;
justify-content:center;
@ -800,7 +800,7 @@ body.is-fullscreen-mode .interface-interface-skeleton{
margin-right:8px;
}
.edit-post-document-title{
.edit-post-document-actions{
align-items:center;
background:#f0f0f0;
border-radius:4px;
@ -811,44 +811,40 @@ body.is-fullscreen-mode .interface-interface-skeleton{
min-width:0;
width:min(100%, 450px);
}
.edit-post-document-title:hover{
.edit-post-document-actions .components-button:hover{
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);
flex-grow:1;
overflow:hidden;
}
.edit-post-document-title__title.components-button:hover{
.edit-post-document-actions__title:hover{
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);
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}
.edit-post-document-title__shortcut{
color:#757575;
flex-shrink:0;
padding:0 12px;
}
.edit-post-document-title__shortcut:hover{
color:#757575;
.edit-post-document-actions__shortcut{
color:#2f2f2f;
}
.edit-post-document-title__left{
.edit-post-document-actions__back.components-button.has-icon.has-text{
color:#757575;
flex-shrink:0;
gap:0;
min-width:36px;
}
.edit-post-document-title__left .components-button.has-icon.has-text{
color:#757575;
gap:0;
}
.edit-post-document-title__left .components-button.has-icon.has-text:hover{
.edit-post-document-actions__back.components-button.has-icon.has-text:hover{
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;
flex-grow:1;
justify-content:center;
@ -800,7 +800,7 @@ body.is-fullscreen-mode .interface-interface-skeleton{
margin-left:8px;
}
.edit-post-document-title{
.edit-post-document-actions{
align-items:center;
background:#f0f0f0;
border-radius:4px;
@ -811,44 +811,40 @@ body.is-fullscreen-mode .interface-interface-skeleton{
min-width:0;
width:min(100%, 450px);
}
.edit-post-document-title:hover{
.edit-post-document-actions .components-button:hover{
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);
flex-grow:1;
overflow:hidden;
}
.edit-post-document-title__title.components-button:hover{
.edit-post-document-actions__title:hover{
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);
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}
.edit-post-document-title__shortcut{
color:#757575;
flex-shrink:0;
padding:0 12px;
}
.edit-post-document-title__shortcut:hover{
color:#757575;
.edit-post-document-actions__shortcut{
color:#2f2f2f;
}
.edit-post-document-title__left{
.edit-post-document-actions__back.components-button.has-icon.has-text{
color:#757575;
flex-shrink:0;
gap:0;
min-width:36px;
}
.edit-post-document-title__left .components-button.has-icon.has-text{
color:#757575;
gap:0;
}
.edit-post-document-title__left .components-button.has-icon.has-text:hover{
.edit-post-document-actions__back.components-button.has-icon.has-text:hover{
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{
align-items:center;
background:#f0f0f0;
border-radius:4px;
display:grid;
grid-template-columns:1fr 2fr 1fr;
display:flex;
gap:8px;
height:36px;
justify-content:space-between;
min-width:0;
overflow:hidden;
width:min(100%, 450px);
}
.edit-site-document-actions:hover{
.edit-site-document-actions .components-button:hover{
background:#e0e0e0;
color:currentColor;
color:var(--wp-block-synced-color);
}
@media (min-width:782px){
.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{
display:grid;
grid-column:1 / -1;
grid-row:1;
grid-template-columns:1fr 2fr 1fr;
}
.edit-site-document-actions__title{
.edit-site-document-actions__command,.edit-site-document-actions__title{
color:var(--wp-block-synced-color);
flex-grow:1;
grid-column:2 / 3;
overflow:hidden;
}
.edit-site-document-actions__title:hover{
color:var(--wp-block-synced-color);
}
.edit-site-document-actions__title .block-editor-block-icon{
flex-shrink:0;
min-width:24px;
}
.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;
}
.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{
text-align:left;
}
.edit-site-document-actions__back{
.edit-site-document-actions__back.components-button.has-icon.has-text{
color:#757575;
flex-shrink:0;
grid-column:1 / 2;
grid-row:1;
gap:0;
min-width:36px;
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;
}
@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-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{
align-items:center;
background:#f0f0f0;
border-radius:4px;
display:grid;
grid-template-columns:1fr 2fr 1fr;
display:flex;
gap:8px;
height:36px;
justify-content:space-between;
min-width:0;
overflow:hidden;
width:min(100%, 450px);
}
.edit-site-document-actions:hover{
.edit-site-document-actions .components-button:hover{
background:#e0e0e0;
color:currentColor;
color:var(--wp-block-synced-color);
}
@media (min-width:782px){
.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{
display:grid;
grid-column:1 / -1;
grid-row:1;
grid-template-columns:1fr 2fr 1fr;
}
.edit-site-document-actions__title{
.edit-site-document-actions__command,.edit-site-document-actions__title{
color:var(--wp-block-synced-color);
flex-grow:1;
grid-column:2 / 3;
overflow:hidden;
}
.edit-site-document-actions__title:hover{
color:var(--wp-block-synced-color);
}
.edit-site-document-actions__title .block-editor-block-icon{
flex-shrink:0;
min-width:24px;
}
.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;
}
.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{
text-align:right;
}
.edit-site-document-actions__back{
.edit-site-document-actions__back.components-button.has-icon.has-text{
color:#757575;
flex-shrink:0;
grid-column:1 / 2;
grid-row:1;
gap:0;
min-width:36px;
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;
}
@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-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) {
// Return value as-is if it is already a preset;
if (isValueSpacingPreset(value) || value === '0') {
// Return value as-is if it is undefined or is already a preset, or '0';
if (!value || isValueSpacingPreset(value) || value === '0') {
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,
[key]: { ...updatedSettings.spacing?.[key],
sides
@ -26739,10 +26739,10 @@ function useDarkThemeBodyClassName(styles) {
const tempCanvas = ownerDocument.createElement('div');
tempCanvas.classList.add('editor-styles-wrapper');
body.appendChild(tempCanvas);
backgroundColor = defaultView.getComputedStyle(tempCanvas, null).getPropertyValue('background-color');
backgroundColor = defaultView?.getComputedStyle(tempCanvas, null).getPropertyValue('background-color');
body.removeChild(tempCanvas);
} 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.
@ -50077,7 +50077,12 @@ function useListViewDropZone({
}, [canInsertBlocks, draggedBlockClientIds, getBlockCount, getBlockIndex, getBlockRootClientId, rtl]), 200);
const ref = (0,external_wp_compose_namespaceObject.__experimentalUseDropZone)({
dropZoneElement,
onDrop: onBlockDrop,
onDrop(event) {
if (target) {
onBlockDrop(event);
}
},
onDragLeave() {
throttled.cancel();
@ -58001,41 +58006,66 @@ function useFirefoxCompat(props) {
* WordPress dependencies
*/
function FormatEdit({
formatTypes,
/**
* Internal dependencies
*/
const format_edit_DEFAULT_BLOCK_CONTEXT = {};
const usesContextKey = Symbol('usesContext');
function format_edit_Edit({
onChange,
onFocus,
value,
forwardedRef
forwardedRef,
settings
}) {
return formatTypes.map(settings => {
const {
name,
edit: Edit
} = settings;
const {
name,
edit: EditFunction,
[usesContextKey]: usesContext
} = settings;
const blockContext = (0,external_wp_element_namespaceObject.useContext)(block_context); // Assign context values using the block type's declared context needs.
if (!Edit) {
return null;
}
const context = (0,external_wp_element_namespaceObject.useMemo)(() => {
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);
const isActive = activeFormat !== undefined;
const activeObject = (0,external_wp_richText_namespaceObject.getActiveObject)(value);
const isObjectActive = activeObject !== undefined && activeObject.type === name;
return (0,external_wp_element_namespaceObject.createElement)(Edit, {
key: name,
isActive: isActive,
activeAttributes: isActive ? activeFormat.attributes || {} : {},
isObjectActive: isObjectActive,
activeObjectAttributes: isObjectActive ? activeObject.attributes || {} : {},
value: value,
onChange: onChange,
onFocus: onFocus,
contentRef: forwardedRef
});
if (!EditFunction) {
return null;
}
const activeFormat = (0,external_wp_richText_namespaceObject.getActiveFormat)(value, name);
const isActive = activeFormat !== undefined;
const activeObject = (0,external_wp_richText_namespaceObject.getActiveObject)(value);
const isObjectActive = activeObject !== undefined && activeObject.type === name;
return (0,external_wp_element_namespaceObject.createElement)(EditFunction, {
key: name,
isActive: isActive,
activeAttributes: isActive ? activeFormat.attributes || {} : {},
isObjectActive: isObjectActive,
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
@ -66332,6 +66362,7 @@ function ResolutionTool({
/**
* Private @wordpress/block-editor APIs.
*/
@ -66355,7 +66386,8 @@ lock(privateApis, { ...global_styles_namespaceObject,
DimensionsTool: dimensions_tool,
ResolutionTool: ResolutionTool,
ReusableBlocksRenameHint: ReusableBlocksRenameHint,
useReusableBlocksRenameHint: useReusableBlocksRenameHint
useReusableBlocksRenameHint: useReusableBlocksRenameHint,
usesContextKey: usesContextKey
});
;// 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 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) {
return (0,external_wp_element_namespaceObject.createElement)("div", { ...blockProps
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, {
@ -58634,6 +58645,10 @@ const {
},
style: "wp-block-footnotes"
};
const {
usesContextKey
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
const formatName = 'core/footnote';
const format = {
title: (0,external_wp_i18n_namespaceObject.__)('Footnote'),
@ -58643,10 +58658,14 @@ const format = {
'data-fn': 'data-fn'
},
contentEditable: false,
[usesContextKey]: ['postType'],
edit: function Edit({
value,
onChange,
isObjectActive
isObjectActive,
context: {
postType
}
}) {
const registry = (0,external_wp_data_namespaceObject.useRegistry)();
const {
@ -58655,11 +58674,20 @@ const format = {
getBlockName,
getBlocks
} = (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 {
selectionChange,
insertBlock
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
if (!footnotesBlockType) {
return null;
}
if (postType !== 'post' && postType !== 'page') {
return null;
}
function onClick() {
registry.batch(() => {
let id;
@ -58761,8 +58789,7 @@ const {
const footnotes_settings = {
icon: format_list_numbered,
edit: FootnotesEdit
}; // Would be good to remove the format and HoR if the block is unregistered.
};
(0,external_wp_richText_namespaceObject.registerFormatType)(formatName, format);
const footnotes_init = () => {
initBlock({

File diff suppressed because one or more lines are too long

View File

@ -3980,6 +3980,16 @@ function CommandMenu() {
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);
return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, {
className: "commands-command-menu",
@ -3989,7 +3999,8 @@ function CommandMenu() {
}, (0,external_wp_element_namespaceObject.createElement)("div", {
className: "commands-command-menu__container"
}, (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", {
className: "commands-command-menu__header"
}, (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 = () => () => {
};
function useStoreState(store, keyOrSelector = WVTCK5PV_identity) {
@ -67965,6 +67966,10 @@ function useStoreProps(store, props, key, setKey) {
setValue: setKey ? props[setKey] : void 0
});
useSafeLayoutEffect(() => {
let canFlushSync = false;
queueMicrotask(() => {
canFlushSync = true;
});
return store.sync(
(state, prev) => {
const { value: value2, setValue } = propsRef.current;
@ -67974,7 +67979,11 @@ function useStoreProps(store, props, key, setKey) {
return;
if (state[key] === value2)
return;
setValue(state[key]);
if (canFlushSync) {
(0,external_ReactDOM_namespaceObject.flushSync)(() => setValue(state[key]));
} else {
setValue(state[key]);
}
},
[key]
);
@ -67987,7 +67996,7 @@ function useStoreProps(store, props, key, setKey) {
}, [key]);
}, [store, key, value]);
}
function FHQZ2KRN_useStore(createStore) {
function OOWNFOTF_useStore(createStore) {
const store = useLazyValue(createStore);
useSafeLayoutEffect(() => store.init(), [store]);
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;
}
function WFK3YK7D_targetIsAnotherItem(event, store) {
function DCG3EYDE_targetIsAnotherItem(event, store) {
if (events_isSelfTarget(event))
return false;
return OXPV2NBK_isItem(store, event.target);
}
function WFK3YK7D_useRole(ref, props) {
function DCG3EYDE_useRole(ref, props) {
const roleProp = props.role;
const [role, setRole] = (0,external_React_.useState)(roleProp);
useSafeLayoutEffect(() => {
@ -68110,7 +68119,7 @@ function supportsAriaSelected(role) {
return true;
return false;
}
var WFK3YK7D_useCompositeItem = NQJBHION_createHook(
var DCG3EYDE_useCompositeItem = NQJBHION_createHook(
(_a) => {
var _b = _a, {
store,
@ -68172,7 +68181,7 @@ var WFK3YK7D_useCompositeItem = NQJBHION_createHook(
if (!store)
return;
const { activeId, virtualFocus: virtualFocus2, baseElement: baseElement2 } = store.getState();
if (WFK3YK7D_targetIsAnotherItem(event, store))
if (DCG3EYDE_targetIsAnotherItem(event, store))
return;
if (activeId !== id) {
store.setActiveId(id);
@ -68272,7 +68281,7 @@ var WFK3YK7D_useCompositeItem = NQJBHION_createHook(
);
const isActiveItem = useStoreState(store, (state) => state.activeId === id);
const virtualFocus = useStoreState(store, "virtualFocus");
const role = WFK3YK7D_useRole(ref, props);
const role = DCG3EYDE_useRole(ref, props);
let ariaSelected;
if (isActiveItem) {
if (requiresAriaSelected(role)) {
@ -68331,9 +68340,9 @@ var WFK3YK7D_useCompositeItem = NQJBHION_createHook(
});
}
);
var WFK3YK7D_CompositeItem = createMemoComponent(
var DCG3EYDE_CompositeItem = createMemoComponent(
(props) => {
const htmlProps = WFK3YK7D_useCompositeItem(props);
const htmlProps = DCG3EYDE_useCompositeItem(props);
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(
(_a) => {
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;
}
);
@ -68705,7 +68714,7 @@ function 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 = {}) {
const options = useToolbarStoreOptions(props);
const store = FHQZ2KRN_useStore(
const store = OOWNFOTF_useStore(
() => createToolbarStore(PNRLI7OV_spreadValues(PNRLI7OV_spreadValues({}, props), options))
);
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);
;// 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 {
template,
isEditing
@ -6176,19 +6176,19 @@ function DocumentTitle() {
}
return (0,external_wp_element_namespaceObject.createElement)("div", {
className: "edit-post-document-title"
}, (0,external_wp_element_namespaceObject.createElement)("span", {
className: "edit-post-document-title__left"
className: "edit-post-document-actions"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
className: "edit-post-document-actions__back",
onClick: () => {
clearSelectedBlock();
setIsEditingTemplate(false);
},
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, {
className: "edit-post-document-title__title",
}, (0,external_wp_i18n_namespaceObject.__)('Back')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
className: "edit-post-document-actions__command",
onClick: () => openCommandCenter()
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
className: "edit-post-document-actions__title",
spacing: 1,
justify: "center"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, {
@ -6198,13 +6198,12 @@ function DocumentTitle() {
as: "h1"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, {
as: "span"
}, (0,external_wp_i18n_namespaceObject.__)('Editing template: ')), templateTitle))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
className: "edit-post-document-title__shortcut",
onClick: () => openCommandCenter()
}, external_wp_keycodes_namespaceObject.displayShortcut.primary('k')));
}, (0,external_wp_i18n_namespaceObject.__)('Editing template: ')), templateTitle)), (0,external_wp_element_namespaceObject.createElement)("span", {
className: "edit-post-document-actions__shortcut"
}, 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
@ -6288,8 +6287,8 @@ function Header({
},
className: "edit-post-header__toolbar"
}, (0,external_wp_element_namespaceObject.createElement)(header_toolbar, null), (0,external_wp_element_namespaceObject.createElement)("div", {
className: "edit-post-header__document-title"
}, (0,external_wp_element_namespaceObject.createElement)(document_title, null))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__unstableMotion.div, {
className: "edit-post-header__center"
}, (0,external_wp_element_namespaceObject.createElement)(document_actions, null))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__unstableMotion.div, {
variants: slideY,
transition: {
type: 'tween',
@ -6636,11 +6635,11 @@ function ListViewSidebar() {
selectOnMove: false,
tabs: [{
name: 'list-view',
title: 'List View',
title: (0,external_wp_i18n_namespaceObject._x)('List View', 'Post overview'),
className: 'edit-post-sidebar__panel-tab'
}, {
name: 'outline',
title: 'Outline',
title: (0,external_wp_i18n_namespaceObject._x)('Outline', 'Post overview'),
className: 'edit-post-sidebar__panel-tab'
}]
}, 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',
categoryType: type,
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) {
@ -17027,7 +17022,7 @@ function useSiteEditorSettings() {
}
;// 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
@ -18716,7 +18711,7 @@ const interfaceLabels = {
footer: (0,external_wp_i18n_namespaceObject.__)('Editor footer')
};
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_block: (0,external_wp_i18n_namespaceObject.__)('Pattern')
}; // Prevent accidental removal of certain blocks, asking the user for
@ -18811,9 +18806,8 @@ function Editor({
if (hasLoadedPost) {
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).
(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"
// action in <URLQueryController> from double-announcing.
@ -20011,7 +20005,7 @@ function BaseDocumentActions({
className: classnames_default()('edit-site-document-actions', className)
}, onBack && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
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 => {
event.stopPropagation();
onBack();
@ -20861,7 +20855,7 @@ function useSyncCanvasModeWithURL() {
(0,external_wp_element_namespaceObject.useEffect)(() => {
currentCanvasInUrl.current = canvasInUrl;
if (canvasInUrl === undefined && currentCanvasMode.current !== 'view') {
if (canvasInUrl !== 'edit' && currentCanvasMode.current !== 'view') {
setCanvasMode('view');
} else if (canvasInUrl === 'edit' && currentCanvasMode.current !== 'edit') {
setCanvasMode('edit');
@ -22532,9 +22526,10 @@ function Pagination({
function Grid({
categoryId,
items,
currentPage,
setCurrentPage,
...props
}) {
const [currentPage, setCurrentPage] = (0,external_wp_element_namespaceObject.useState)(1);
const gridRef = (0,external_wp_element_namespaceObject.useRef)();
const totalItems = items.length;
const pageIndex = currentPage - 1;
@ -22834,6 +22829,7 @@ function getItemSearchRank(item, searchTerm, config) {
/**
* Internal dependencies
*/
@ -22859,8 +22855,6 @@ const templatePartToPattern = templatePart => ({
templatePart
});
const templatePartHasCategory = (item, category) => item.templatePart.area === category;
const selectTemplatePartsAsPatterns = (select, {
categoryId,
search = ''
@ -22871,11 +22865,28 @@ const selectTemplatePartsAsPatterns = (select, {
getEntityRecords,
getIsResolving
} = select(external_wp_coreData_namespaceObject.store);
const {
__experimentalGetDefaultTemplatePartAreas
} = select(external_wp_editor_namespaceObject.store);
const query = {
per_page: -1
};
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 patterns = searchItems(templateParts, search, {
categoryId,
@ -23036,6 +23047,7 @@ function PatternsList({
categoryId,
type
}) {
const [currentPage, setCurrentPage] = (0,external_wp_element_namespaceObject.useState)(1);
const location = patterns_list_useLocation();
const history = patterns_list_useHistory();
const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium', '<');
@ -23051,6 +23063,17 @@ function PatternsList({
search: deferredFilterValue,
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 titleId = `${id}-title`;
const descriptionId = `${id}-description`;
@ -23085,7 +23108,7 @@ function PatternsList({
className: "edit-site-patterns__search-block"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SearchControl, {
className: "edit-site-patterns__search",
onChange: value => setFilterValue(value),
onChange: value => updateSearchFilter(value),
placeholder: (0,external_wp_i18n_namespaceObject.__)('Search patterns'),
label: (0,external_wp_i18n_namespaceObject.__)('Search patterns'),
value: filterValue,
@ -23096,7 +23119,7 @@ function PatternsList({
label: (0,external_wp_i18n_namespaceObject.__)('Filter by sync status'),
value: syncFilter,
isBlock: true,
onChange: value => setSyncFilter(value),
onChange: value => updateSyncFilter(value),
__nextHasNoMarginBottom: true
}, 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",
@ -23117,7 +23140,9 @@ function PatternsList({
categoryId: categoryId,
items: patterns,
"aria-labelledby": titleId,
"aria-describedby": descriptionId
"aria-describedby": descriptionId,
currentPage: currentPage,
setCurrentPage: setCurrentPage
}), !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 {
defaultView
} = ownerDocument;
const selection = defaultView.getSelection();
const selection = defaultView?.getSelection();
let range;
function getRange() {

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@
*
* @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.