From b83a95466a4380869ec3e34f86fc3b4f8ac2bb43 Mon Sep 17 00:00:00 2001 From: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com> Date: Mon, 3 Jul 2023 11:31:42 +1000 Subject: [PATCH 001/146] Patterns: Include template parts for custom areas in Uncategorized category (#52159) --- .../src/components/page-patterns/use-patterns.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/edit-site/src/components/page-patterns/use-patterns.js b/packages/edit-site/src/components/page-patterns/use-patterns.js index 6f3b7407e917d..a8d76b58cb45d 100644 --- a/packages/edit-site/src/components/page-patterns/use-patterns.js +++ b/packages/edit-site/src/components/page-patterns/use-patterns.js @@ -38,6 +38,15 @@ const templatePartToPattern = ( templatePart ) => ( { templatePart, } ); +const templatePartCategories = [ 'header', 'footer', 'sidebar' ]; +const templatePartHasCategory = ( item, category ) => { + if ( category === 'uncategorized' ) { + return ! templatePartCategories.includes( item.templatePart.area ); + } + + return item.templatePart.area === category; +}; + const useTemplatePartsAsPatterns = ( categoryId, postType = TEMPLATE_PARTS, @@ -83,7 +92,7 @@ const useTemplatePartsAsPatterns = ( return searchItems( templateParts, filterValue, { categoryId, - hasCategory: ( item, area ) => item.templatePart.area === area, + hasCategory: templatePartHasCategory, } ); }, [ templateParts, filterValue, categoryId ] ); From 5023dd5450ce8b3288331212e462768955755128 Mon Sep 17 00:00:00 2001 From: tellthemachines Date: Mon, 3 Jul 2023 11:48:23 +1000 Subject: [PATCH 002/146] Move grid function kses patch into 6.3 compat folder. (#52098) * Move grid function kses patch into 6.3 compat folder. * Move require to right part of the file. --- lib/compat/wordpress-6.3/kses.php | 27 +++++++++++++++++++++++++++ lib/experimental/kses.php | 19 ------------------- lib/load.php | 1 + 3 files changed, 28 insertions(+), 19 deletions(-) create mode 100644 lib/compat/wordpress-6.3/kses.php diff --git a/lib/compat/wordpress-6.3/kses.php b/lib/compat/wordpress-6.3/kses.php new file mode 100644 index 0000000000000..23eee580f831a --- /dev/null +++ b/lib/compat/wordpress-6.3/kses.php @@ -0,0 +1,27 @@ + Date: Mon, 3 Jul 2023 17:02:50 +1000 Subject: [PATCH 003/146] Page Content Focus: Add welcome guides (#52014) * Page Content Focus: Add welcome guides * Don't show when editor guide is active * Just use regular accent/theme color in all guides * slight copy change page guide * Update components changelog * Disable new guides in E2E tests * Use s.w.org videos --------- Co-authored-by: Saxon Fletcher --- packages/components/CHANGELOG.md | 1 + packages/components/src/guide/icons.tsx | 9 +- packages/components/src/guide/index.tsx | 4 + .../components/src/guide/page-control.tsx | 6 +- packages/components/src/guide/style.scss | 32 ++------ .../src/admin/visit-site-editor.ts | 8 ++ packages/e2e-test-utils/src/site-editor.js | 77 ++++------------- .../src/components/welcome-guide/editor.js | 2 +- .../src/components/welcome-guide/index.js | 4 + .../src/components/welcome-guide/page.js | 75 +++++++++++++++++ .../src/components/welcome-guide/style.scss | 16 +++- .../src/components/welcome-guide/styles.js | 2 +- .../src/components/welcome-guide/template.js | 82 +++++++++++++++++++ packages/edit-site/src/index.js | 2 + 14 files changed, 220 insertions(+), 100 deletions(-) create mode 100644 packages/edit-site/src/components/welcome-guide/page.js create mode 100644 packages/edit-site/src/components/welcome-guide/template.js diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 5c87043b8e31f..844b4a8fa97c3 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -8,6 +8,7 @@ - `RangeControl`: Add `__next40pxDefaultSize` prop to opt into the new 40px default size ([#49105](https://github.com/WordPress/gutenberg/pull/49105)). - `Button`: Introduce `size` prop with `default`, `compact`, and `small` variants ([#51842](https://github.com/WordPress/gutenberg/pull/51842)). - `ItemGroup`: Update button focus state styles to target `:focus-visible` rather than `:focus`. ([#51787](https://github.com/WordPress/gutenberg/pull/51787)). +- `Guide`: Don't show Close button when there is only one page, and use default button and accent/theme styling ([#52014](https://github.com/WordPress/gutenberg/pull/52014)). ### Bug Fix diff --git a/packages/components/src/guide/icons.tsx b/packages/components/src/guide/icons.tsx index 1c47180ae0b11..36146611dc299 100644 --- a/packages/components/src/guide/icons.tsx +++ b/packages/components/src/guide/icons.tsx @@ -3,13 +3,8 @@ */ import { SVG, Circle } from '@wordpress/primitives'; -export const PageControlIcon = ( { isSelected }: { isSelected: boolean } ) => ( +export const PageControlIcon = () => ( - + ); diff --git a/packages/components/src/guide/index.tsx b/packages/components/src/guide/index.tsx index 38f8d07d8c0ef..e6a2d4c1252eb 100644 --- a/packages/components/src/guide/index.tsx +++ b/packages/components/src/guide/index.tsx @@ -111,6 +111,7 @@ function Guide( { 1 } onRequestClose={ onFinish } onKeyDown={ ( event ) => { if ( event.code === 'ArrowLeft' ) { @@ -144,6 +145,7 @@ function Guide( { { canGoBack && ( + ); + + if ( hasContent && ! hasFreeformBlock && ! originalName ) { + if ( hasHTMLBlock ) { + messageHTML = __( + 'It appears you are trying to use the deprecated Classic block. You can leave this block intact, convert its content to a Custom HTML block, or remove it entirely. Alternatively, you can refresh the page to use the Classic block.' + ); + actions.push( convertToHtmlButton ); + } else { + messageHTML = __( + 'It appears you are trying to use the deprecated Classic block. You can leave this block intact, or remove it entirely. Alternatively, you can refresh the page to use the Classic block.' + ); + } + } else if ( hasContent && hasHTMLBlock ) { messageHTML = sprintf( /* translators: %s: block name */ __( @@ -39,11 +63,7 @@ function MissingBlockWarning( { attributes, convertToHTML, clientId } ) { ), originalName ); - actions.push( - - ); + actions.push( convertToHtmlButton ); } else { messageHTML = sprintf( /* translators: %s: block name */ From db524a8b270dbb36102027fc043e2b975dfa9269 Mon Sep 17 00:00:00 2001 From: Nik Tsekouras Date: Mon, 3 Jul 2023 13:46:37 +0300 Subject: [PATCH 008/146] [Command Palette]: Remove suggestion for deleting templates/parts (#52168) --- packages/edit-site/src/hooks/commands/use-edit-mode-commands.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/edit-site/src/hooks/commands/use-edit-mode-commands.js b/packages/edit-site/src/hooks/commands/use-edit-mode-commands.js index e9e00b9723a12..3bd1b561a3ab1 100644 --- a/packages/edit-site/src/hooks/commands/use-edit-mode-commands.js +++ b/packages/edit-site/src/hooks/commands/use-edit-mode-commands.js @@ -250,7 +250,6 @@ export function useEditModeCommands() { useCommandLoader( { name: 'core/edit-site/manipulate-document', hook: useManipulateDocumentCommands, - context: 'site-editor-edit', } ); useCommandLoader( { From 8a83331d02abcd83159ce007b4b13e0a4fd016d9 Mon Sep 17 00:00:00 2001 From: Nik Tsekouras Date: Mon, 3 Jul 2023 13:47:01 +0300 Subject: [PATCH 009/146] Add confirmation step when deleting a Template (#52236) --- .../src/components/template-actions/index.js | 46 +++++++++++++++---- 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/packages/edit-site/src/components/template-actions/index.js b/packages/edit-site/src/components/template-actions/index.js index 0b54d6ef3ea71..b4618dcae966d 100644 --- a/packages/edit-site/src/components/template-actions/index.js +++ b/packages/edit-site/src/components/template-actions/index.js @@ -3,8 +3,14 @@ */ import { useDispatch, useSelect } from '@wordpress/data'; import { store as coreStore } from '@wordpress/core-data'; +import { useState } from '@wordpress/element'; import { __, sprintf } from '@wordpress/i18n'; -import { DropdownMenu, MenuGroup, MenuItem } from '@wordpress/components'; +import { + DropdownMenu, + MenuGroup, + MenuItem, + __experimentalConfirmDialog as ConfirmDialog, +} from '@wordpress/components'; import { moreVertical } from '@wordpress/icons'; import { store as noticesStore } from '@wordpress/notices'; @@ -84,17 +90,14 @@ export default function TemplateActions( { template={ template } onClose={ onClose } /> - { + { removeTemplate( template ); onRemove?.(); onClose(); } } - > - { __( 'Delete' ) } - + isTemplate={ template.type === 'wp_template' } + /> ) } { isRevertable && ( @@ -115,3 +118,30 @@ export default function TemplateActions( { ); } + +function DeleteMenuItem( { onRemove, isTemplate } ) { + const [ isModalOpen, setIsModalOpen ] = useState( false ); + return ( + <> + setIsModalOpen( true ) } + > + { __( 'Delete' ) } + + setIsModalOpen( false ) } + confirmButtonText={ __( 'Delete' ) } + > + { isTemplate + ? __( 'Are you sure you want to delete this template?' ) + : __( + 'Are you sure you want to delete this template part?' + ) } + + + ); +} From eee507a96266e48f2fc50580444accd4d70c8930 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Mon, 3 Jul 2023 15:14:17 +0400 Subject: [PATCH 010/146] Page List: Fix parent block selection when converting to link (#52193) --- packages/block-library/src/page-list/edit.js | 22 +++++++++--------- .../use-convert-to-navigation-links.js | 23 +++---------------- 2 files changed, 14 insertions(+), 31 deletions(-) diff --git a/packages/block-library/src/page-list/edit.js b/packages/block-library/src/page-list/edit.js index 417ebed5b5e24..837e9d0cf6729 100644 --- a/packages/block-library/src/page-list/edit.js +++ b/packages/block-library/src/page-list/edit.js @@ -169,12 +169,6 @@ export default function PageListEdit( { }, new Map() ); }, [ pages ] ); - const convertToNavigationLinks = useConvertToNavigationLinks( { - clientId, - pages, - parentPageID, - } ); - const blockProps = useBlockProps( { className: classnames( 'wp-block-page-list', { 'has-text-color': !! context.textColor, @@ -250,7 +244,7 @@ export default function PageListEdit( { const { isNested, hasSelectedChild, - parentBlock, + parentClientId, hasDraggedChild, isChildOfNavigation, } = useSelect( @@ -258,7 +252,6 @@ export default function PageListEdit( { const { getBlockParentsByBlockName, hasSelectedInnerBlock, - getBlockRootClientId, hasDraggedInnerBlock, } = select( blockEditorStore ); const blockParents = getBlockParentsByBlockName( @@ -276,12 +269,19 @@ export default function PageListEdit( { isChildOfNavigation: navigationBlockParents.length > 0, hasSelectedChild: hasSelectedInnerBlock( clientId, true ), hasDraggedChild: hasDraggedInnerBlock( clientId, true ), - parentBlock: getBlockRootClientId( clientId ), + parentClientId: navigationBlockParents[ 0 ], }; }, [ clientId ] ); + const convertToNavigationLinks = useConvertToNavigationLinks( { + clientId, + pages, + parentClientId, + parentPageID, + } ); + const innerBlocksProps = useInnerBlocksProps( blockProps, { allowedBlocks: [ 'core/page-list-item' ], renderAppender: false, @@ -297,12 +297,12 @@ export default function PageListEdit( { useEffect( () => { if ( hasSelectedChild || hasDraggedChild ) { openModal(); - selectBlock( parentBlock ); + selectBlock( parentClientId ); } }, [ hasSelectedChild, hasDraggedChild, - parentBlock, + parentClientId, selectBlock, openModal, ] ); diff --git a/packages/block-library/src/page-list/use-convert-to-navigation-links.js b/packages/block-library/src/page-list/use-convert-to-navigation-links.js index 5c62342fe77cd..4cbc69d6e6de6 100644 --- a/packages/block-library/src/page-list/use-convert-to-navigation-links.js +++ b/packages/block-library/src/page-list/use-convert-to-navigation-links.js @@ -2,7 +2,7 @@ * WordPress dependencies */ import { createBlock } from '@wordpress/blocks'; -import { useSelect, useDispatch } from '@wordpress/data'; +import { useDispatch } from '@wordpress/data'; import { store as blockEditorStore } from '@wordpress/block-editor'; /** @@ -116,28 +116,11 @@ export function convertToNavigationLinks( pages = [], parentPageID = null ) { export function useConvertToNavigationLinks( { clientId, pages, + parentClientId, parentPageID, } ) { const { replaceBlock, selectBlock } = useDispatch( blockEditorStore ); - const { parentNavBlockClientId } = useSelect( - ( select ) => { - const { getSelectedBlockClientId, getBlockParentsByBlockName } = - select( blockEditorStore ); - - const _selectedBlockClientId = getSelectedBlockClientId(); - - return { - parentNavBlockClientId: getBlockParentsByBlockName( - _selectedBlockClientId, - 'core/navigation', - true - )[ 0 ], - }; - }, - [ clientId ] - ); - return () => { const navigationLinks = convertToNavigationLinks( pages, parentPageID ); @@ -145,6 +128,6 @@ export function useConvertToNavigationLinks( { replaceBlock( clientId, navigationLinks ); // Select the Navigation block to reveal the changes. - selectBlock( parentNavBlockClientId ); + selectBlock( parentClientId ); }; } From afa9979f371ea970af181807613c4ac6c16ada6b Mon Sep 17 00:00:00 2001 From: Andrei Draganescu Date: Mon, 3 Jul 2023 15:20:40 +0300 Subject: [PATCH 011/146] Turn off DFM for style book and style editing (#52117) --- .../index.js | 79 +++++++++++-------- 1 file changed, 47 insertions(+), 32 deletions(-) diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js b/packages/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js index 1e2e7aac159ef..4d98b235ac81c 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js +++ b/packages/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js @@ -37,17 +37,27 @@ export function SidebarNavigationItemGlobalStyles( props ) { const { setCanvasMode } = unlock( useDispatch( editSiteStore ) ); const { createNotice } = useDispatch( noticesStore ); const { set: setPreference } = useDispatch( preferencesStore ); - const { hasGlobalStyleVariations, isDistractionFree } = useSelect( - ( select ) => ( { - hasGlobalStyleVariations: - !! select( - coreStore - ).__experimentalGetCurrentThemeGlobalStylesVariations()?.length, - isDistractionFree: select( preferencesStore ).get( - editSiteStore.name, - 'distractionFree' - ), - } ), + const { get: getPrefference } = useSelect( preferencesStore ); + + const turnOffDistractionFreeMode = useCallback( () => { + const isDistractionFree = getPrefference( + editSiteStore.name, + 'distractionFree' + ); + if ( ! isDistractionFree ) { + return; + } + setPreference( editSiteStore.name, 'distractionFree', false ); + createNotice( 'info', __( 'Distraction free mode turned off' ), { + isDismissible: true, + type: 'snackbar', + } ); + }, [ createNotice, setPreference, getPrefference ] ); + const hasGlobalStyleVariations = useSelect( + ( select ) => + !! select( + coreStore + ).__experimentalGetCurrentThemeGlobalStylesVariations()?.length, [] ); if ( hasGlobalStyleVariations ) { @@ -63,19 +73,7 @@ export function SidebarNavigationItemGlobalStyles( props ) { { - // Disable distraction free mode. - if ( isDistractionFree ) { - setPreference( - editSiteStore.name, - 'distractionFree', - false - ); - createNotice( - 'info', - __( 'Distraction free mode turned off.' ), - { type: 'snackbar' } - ); - } + turnOffDistractionFreeMode(); // Switch to edit mode. setCanvasMode( 'edit' ); // Open global styles sidebar. @@ -170,6 +168,9 @@ export default function SidebarNavigationScreenGlobalStyles() { const { setCanvasMode, setEditorCanvasContainerView } = unlock( useDispatch( editSiteStore ) ); + const { createNotice } = useDispatch( noticesStore ); + const { set: setPreference } = useDispatch( preferencesStore ); + const { get: getPrefference } = useSelect( preferencesStore ); const isStyleBookOpened = useSelect( ( select ) => @@ -178,14 +179,28 @@ export default function SidebarNavigationScreenGlobalStyles() { [] ); - const openGlobalStyles = useCallback( - async () => - Promise.all( [ - setCanvasMode( 'edit' ), - openGeneralSidebar( 'edit-site/global-styles' ), - ] ), - [ setCanvasMode, openGeneralSidebar ] - ); + const turnOffDistractionFreeMode = useCallback( () => { + const isDistractionFree = getPrefference( + editSiteStore.name, + 'distractionFree' + ); + if ( ! isDistractionFree ) { + return; + } + setPreference( editSiteStore.name, 'distractionFree', false ); + createNotice( 'info', __( 'Distraction free mode turned off' ), { + isDismissible: true, + type: 'snackbar', + } ); + }, [ createNotice, setPreference, getPrefference ] ); + + const openGlobalStyles = useCallback( async () => { + turnOffDistractionFreeMode(); + return Promise.all( [ + setCanvasMode( 'edit' ), + openGeneralSidebar( 'edit-site/global-styles' ), + ] ); + }, [ setCanvasMode, openGeneralSidebar, turnOffDistractionFreeMode ] ); const openStyleBook = useCallback( async () => { await openGlobalStyles(); From 96a8929949f4d414d8113ab53f92d5677743b84e Mon Sep 17 00:00:00 2001 From: Juan Aldasoro Date: Mon, 3 Jul 2023 16:26:26 +0200 Subject: [PATCH 012/146] Hide word count and reading time meta data for the Posts Page details panel (#52186) * Hide word count and reading time meta data for the Posts Page details panel * Apply suggestions from code review. --- .../sidebar-navigation-screen-page/page-details.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-page/page-details.js b/packages/edit-site/src/components/sidebar-navigation-screen-page/page-details.js index c6ae8683c0ec9..47c435a54e0ca 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-page/page-details.js +++ b/packages/edit-site/src/components/sidebar-navigation-screen-page/page-details.js @@ -76,7 +76,7 @@ function getPageDetails( page ) { : 0; const readingTime = Math.round( wordsCounted / AVERAGE_READING_RATE ); - if ( wordsCounted ) { + if ( wordsCounted && ! page?.isPostsPage ) { details.push( { label: __( 'Words' ), @@ -100,7 +100,7 @@ function getPageDetails( page ) { export default function PageDetails( { id } ) { const { record } = useEntityRecord( 'postType', 'page', id ); - const { parentTitle, templateTitle } = useSelect( + const { parentTitle, templateTitle, isPostsPage } = useSelect( ( select ) => { const { getEditedPostContext } = unlock( select( editSiteStore ) ); const postContext = getEditedPostContext(); @@ -135,12 +135,16 @@ export default function PageDetails( { id } ) { )?.title?.rendered : null; + const { getEntityRecord } = select( coreStore ); + const siteSettings = getEntityRecord( 'root', 'site' ); + return { parentTitle: _parentTitle, templateTitle: _templateTitle, + isPostsPage: record?.id === siteSettings?.page_for_posts, }; }, - [ record?.parent ] + [ record?.parent, record?.id ] ); return ( ( From 4090d21ed1d4e0abf2298e8e359400e54eb7693a Mon Sep 17 00:00:00 2001 From: Timothy Jacobs Date: Mon, 3 Jul 2023 11:52:39 -0400 Subject: [PATCH 013/146] Fix UnitControl crashing on regex control characters. Units are now escaped using `escapeRegExp` before concatenating them into a regular expression. Fixes #52211. --------- Co-authored-by: Mitchell Austin --- packages/components/CHANGELOG.md | 1 + packages/components/src/unit-control/index.tsx | 5 +++-- packages/components/src/unit-control/test/index.tsx | 7 +++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 844b4a8fa97c3..c690c15bce3e9 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -16,6 +16,7 @@ - `ZStack`: ZStack: fix component bounding box to match children ([#51836](https://github.com/WordPress/gutenberg/pull/51836)). - `Modal`: Add small top padding to the content so that avoid cutting off the visible outline when hovering items ([#51829](https://github.com/WordPress/gutenberg/pull/51829)). - `DropdownMenu`: fix icon style when dashicon is used ([#43574](https://github.com/WordPress/gutenberg/pull/43574)). +- `UnitControl`: Fix crash when certain units are used ([#52211](https://github.com/WordPress/gutenberg/pull/52211)). ## 25.2.0 (2023-06-23) diff --git a/packages/components/src/unit-control/index.tsx b/packages/components/src/unit-control/index.tsx index 847056ae4da47..073801df17c15 100644 --- a/packages/components/src/unit-control/index.tsx +++ b/packages/components/src/unit-control/index.tsx @@ -24,6 +24,7 @@ import { getValidParsedQuantityAndUnit, } from './utils'; import { useControlledState } from '../utils/hooks'; +import { escapeRegExp } from '../utils/strings'; import type { UnitControlProps, UnitControlOnChangeCallback } from './types'; function UnforwardedUnitControl( @@ -76,9 +77,9 @@ function UnforwardedUnitControl( ); const [ { value: firstUnitValue = '' } = {}, ...rest ] = list; const firstCharacters = rest.reduce( ( carry, { value } ) => { - const first = value?.substring( 0, 1 ) || ''; + const first = escapeRegExp( value?.substring( 0, 1 ) || '' ); return carry.includes( first ) ? carry : `${ carry }|${ first }`; - }, firstUnitValue.substring( 0, 1 ) ); + }, escapeRegExp( firstUnitValue.substring( 0, 1 ) ) ); return [ list, new RegExp( `^(?:${ firstCharacters })$`, 'i' ) ]; }, [ nonNullValueProp, unitProp, unitsProp ] ); const [ parsedQuantity, parsedUnit ] = getParsedQuantityAndUnit( diff --git a/packages/components/src/unit-control/test/index.tsx b/packages/components/src/unit-control/test/index.tsx index 9a2c719c46336..777004a6e8ae2 100644 --- a/packages/components/src/unit-control/test/index.tsx +++ b/packages/components/src/unit-control/test/index.tsx @@ -373,18 +373,21 @@ describe( 'UnitControl', () => { const units = [ { value: 'pt', label: 'pt', default: 0 }, { value: 'vmax', label: 'vmax', default: 10 }, + // Proves that units with regex control characters don't error. + { value: '+', label: '+', default: 10 }, ]; render( ); const options = getSelectOptions(); - expect( options.length ).toBe( 2 ); + expect( options.length ).toBe( 3 ); - const [ pt, vmax ] = options; + const [ pt, vmax, plus ] = options; expect( pt.value ).toBe( 'pt' ); expect( vmax.value ).toBe( 'vmax' ); + expect( plus.value ).toBe( '+' ); } ); it( 'should reset value on unit change, if unit has default value', async () => { From a3d81f6ff136d8676c84da79406ec58fc2fa3305 Mon Sep 17 00:00:00 2001 From: Mitchell Austin Date: Mon, 3 Jul 2023 09:00:19 -0700 Subject: [PATCH 014/146] Command palette: rename (#52153) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Revise use of “command menu” to “command palette”. Dropping "global" where it was used as well. * Find “command center” and replace with “command palette” --- packages/commands/README.md | 4 ++-- packages/commands/src/components/command-menu.js | 6 +++--- packages/commands/src/hooks/use-command-context.js | 2 +- packages/commands/src/hooks/use-command-loader.js | 2 +- packages/commands/src/hooks/use-command.js | 2 +- packages/commands/src/store/actions.js | 4 ++-- packages/commands/src/store/reducer.js | 4 ++-- packages/edit-site/src/components/layout/index.js | 2 +- packages/edit-site/src/components/site-hub/index.js | 2 +- test/e2e/specs/site-editor/command-center.spec.js | 10 +++++----- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/packages/commands/README.md b/packages/commands/README.md index 130812664368f..c6504ff638cde 100644 --- a/packages/commands/README.md +++ b/packages/commands/README.md @@ -38,7 +38,7 @@ _Type_ ### useCommand -Attach a command to the Global command menu. +Attach a command to the command palette. _Parameters_ @@ -46,7 +46,7 @@ _Parameters_ ### useCommandLoader -Attach a command loader to the Global command menu. +Attach a command loader to the command palette. _Parameters_ diff --git a/packages/commands/src/components/command-menu.js b/packages/commands/src/components/command-menu.js index 9f59db3f6f53c..b4a828f34303d 100644 --- a/packages/commands/src/components/command-menu.js +++ b/packages/commands/src/components/command-menu.js @@ -155,7 +155,7 @@ export function CommandMenu() { registerShortcut( { name: 'core/commands', category: 'global', - description: __( 'Open the global command menu' ), + description: __( 'Open the command palette' ), keyCombination: { modifier: 'primary', character: 'k', @@ -192,7 +192,7 @@ export function CommandMenu() { }; useEffect( () => { - // Focus the command menu input when mounting the modal. + // Focus the command palette input when mounting the modal. if ( isOpen ) { commandMenuInput.current.focus(); } @@ -211,7 +211,7 @@ export function CommandMenu() { __experimentalHideHeader >
- +
{ className="edit-site-site-hub_toggle-command-center" icon={ search } onClick={ () => openCommandCenter() } - label={ __( 'Open command center' ) } + label={ __( 'Open command palette' ) } /> ) } diff --git a/test/e2e/specs/site-editor/command-center.spec.js b/test/e2e/specs/site-editor/command-center.spec.js index 0ee6d77d3b301..9d22248bc2362 100644 --- a/test/e2e/specs/site-editor/command-center.spec.js +++ b/test/e2e/specs/site-editor/command-center.spec.js @@ -3,7 +3,7 @@ */ const { test, expect } = require( '@wordpress/e2e-test-utils-playwright' ); -test.describe( 'Site editor command center', () => { +test.describe( 'Site editor command palette', () => { test.beforeAll( async ( { requestUtils } ) => { await requestUtils.activateTheme( 'emptytheme' ); } ); @@ -17,11 +17,11 @@ test.describe( 'Site editor command center', () => { await admin.visitSiteEditor(); } ); - test( 'Open the command center and navigate to the page create page', async ( { + test( 'Open the command palette and navigate to the page create page', async ( { page, } ) => { await page - .getByRole( 'button', { name: 'Open command center' } ) + .getByRole( 'button', { name: 'Open command palette' } ) .focus(); await page.keyboard.press( 'Meta+k' ); await page.keyboard.type( 'new page' ); @@ -36,11 +36,11 @@ test.describe( 'Site editor command center', () => { ).toBeVisible(); } ); - test( 'Open the command center and navigate to a template', async ( { + test( 'Open the command palette and navigate to a template', async ( { page, } ) => { await page - .getByRole( 'button', { name: 'Open command center' } ) + .getByRole( 'button', { name: 'Open command palette' } ) .click(); await page.keyboard.type( 'index' ); await page.getByRole( 'option', { name: 'index' } ).click(); From 448995fea6bd291a744a7b536dc90c93e0cc690a Mon Sep 17 00:00:00 2001 From: Saxon Fletcher Date: Tue, 4 Jul 2023 14:03:28 +1000 Subject: [PATCH 015/146] default to showing status (#52226) --- .../components/sidebar-navigation-screen-page/status-label.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-page/status-label.js b/packages/edit-site/src/components/sidebar-navigation-screen-page/status-label.js index 13aba13aacbec..bcfc540b1f841 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-page/status-label.js +++ b/packages/edit-site/src/components/sidebar-navigation-screen-page/status-label.js @@ -43,7 +43,7 @@ const pendingIcon = ( export default function StatusLabel( { status, date, short } ) { const relateToNow = humanTimeDiff( date ); - let statusLabel = ''; + let statusLabel = status; let statusIcon = pendingIcon; switch ( status ) { case 'publish': From d307b77648973aa5a62a3b8f8448af06e3db722b Mon Sep 17 00:00:00 2001 From: Gutenberg Repository Automation Date: Tue, 4 Jul 2023 04:14:22 +0000 Subject: [PATCH 016/146] Bump plugin version to 16.1.1 --- gutenberg.php | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gutenberg.php b/gutenberg.php index f0c0bf22545b1..8037b9acba9c8 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -5,7 +5,7 @@ * Description: Printing since 1440. This is the development plugin for the block editor, site editor, and other future WordPress core functionality. * Requires at least: 6.1 * Requires PHP: 5.6 - * Version: 16.1.0 + * Version: 16.1.1 * Author: Gutenberg Team * Text Domain: gutenberg * diff --git a/package-lock.json b/package-lock.json index ae95d46b2cbb2..981958e6aef1e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gutenberg", - "version": "16.1.0", + "version": "16.1.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index fdaee31c0549c..5abcc4a646c63 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gutenberg", - "version": "16.1.0", + "version": "16.1.1", "private": true, "description": "A new WordPress editor experience.", "author": "The WordPress Contributors", From 1be8fa3c5f63a0c9a096478805665724417512aa Mon Sep 17 00:00:00 2001 From: Gutenberg Repository Automation Date: Tue, 4 Jul 2023 04:53:21 +0000 Subject: [PATCH 017/146] Update Changelog for 16.1.1 --- changelog.txt | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/changelog.txt b/changelog.txt index 277ac5f08ffb8..e011668bc7e00 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,34 @@ == Changelog == += 16.1.1 = + +## Changelog + +### Features + +#### Patterns + +- Remove ability for user to toggle sync status after pattern creation. This is because changing the sync status can have unintended consequences on existing instances of the block. ([52230](https://github.com/WordPress/gutenberg/pull/52230)) + +### Code Quality + +#### Patterns + +- Rename sync_status postmeta from `sync_status` to `wp_pattern_sync_status` to avoid clashes with custom plugin fields. ([52232](https://github.com/WordPress/gutenberg/pull/52232)) + +### Bugs + +#### Patterns + +- Fix issue with wrong sync status being set in the Site Editor when adding new synced patterns. ([52229 ](https://github.com/WordPress/gutenberg/pull/52229)) + +## Contributors + +The following contributors merged PRs in this release: + +@glendaviesnz + + = 16.1.0 = ## Changelog From ebad47952fc94ce4324e989691dde2d3d7689f45 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Tue, 4 Jul 2023 11:43:47 +0400 Subject: [PATCH 018/146] Editor: Avoid remounting pre-publish sidebar contents during autosave (#52208) --- packages/editor/src/components/post-publish-panel/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/editor/src/components/post-publish-panel/index.js b/packages/editor/src/components/post-publish-panel/index.js index 8b2f9c67218f1..b89f94b8f71f8 100644 --- a/packages/editor/src/components/post-publish-panel/index.js +++ b/packages/editor/src/components/post-publish-panel/index.js @@ -141,6 +141,7 @@ export default compose( [ isCurrentPostScheduled, isEditedPostBeingScheduled, isEditedPostDirty, + isAutosavingPost, isSavingPost, isSavingNonPostEntityChanges, } = select( editorStore ); @@ -155,7 +156,7 @@ export default compose( [ isDirty: isEditedPostDirty(), isPublished: isCurrentPostPublished(), isPublishSidebarEnabled: isPublishSidebarEnabled(), - isSaving: isSavingPost(), + isSaving: isSavingPost() && ! isAutosavingPost(), isSavingNonPostEntityChanges: isSavingNonPostEntityChanges(), isScheduled: isCurrentPostScheduled(), }; From eb8469f33c0f8080a3c1668b8bb5e0a15cad8ed4 Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Tue, 4 Jul 2023 10:46:21 +0100 Subject: [PATCH 019/146] Navigation: Remove one preloaded endpoint (#52115) --- .../navigation-block-preloading.php | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/lib/compat/wordpress-6.3/navigation-block-preloading.php b/lib/compat/wordpress-6.3/navigation-block-preloading.php index 0def6f2c7c791..22b4a97526793 100644 --- a/lib/compat/wordpress-6.3/navigation-block-preloading.php +++ b/lib/compat/wordpress-6.3/navigation-block-preloading.php @@ -27,24 +27,6 @@ function gutenberg_preload_navigation_posts( $preload_paths, $context ) { // Preload the OPTIONS request for all Navigation posts request. $preload_paths[] = array( $navigation_rest_route, 'OPTIONS' ); - // Preload the GET request for ALL 'published' or 'draft' Navigation posts. - $preload_paths[] = array( - add_query_arg( - array( - 'context' => 'edit', - 'per_page' => 100, - 'order' => 'desc', - 'orderby' => 'date', - '_locale' => 'user', - // array indices are required to avoid query being encoded and not matching in cache. - 'status[0]' => 'publish', - 'status[1]' => 'draft', - ), - $navigation_rest_route - ), - 'GET', - ); - // Preload request for all menus in Browse Mode sidebar "Navigation" section. $preload_paths[] = array( add_query_arg( From 98c950170964a003e6ebc726928bde73f908423e Mon Sep 17 00:00:00 2001 From: Daniel Richards Date: Tue, 4 Jul 2023 17:49:32 +0800 Subject: [PATCH 020/146] Try restoring the site editor animation (#51956) * Try restoring the site editor animation * fix header animation * Remove accidental addition of layout prop * tidy up formatting * fix animate presence issue * Fix animation between sidebar view and distraction free edit view * Leave sidebar present and maintain canvas to sidebar animation The sidebar is necessary for routing on mobile so we have to maintain its presence in the DOM. Just hiding it isn't enough though, as it is still able to be reached with keyboard tabs and screen readers. Using the relatively new `inert` property disables the element from user interaction, so we add that when we don't want the sidebar to be shown. * Fix mobile view for pattern library On Mobile, the canvas mode wasn't being set to edit when using the pattern library. This updates it to use the showSidbar value instead, keeping it in sync with the inert setting. --------- Co-authored-by: Saxon Fletcher Co-authored-by: Jerry Jones --- .../edit-site/src/components/layout/index.js | 81 +++++++++---------- 1 file changed, 38 insertions(+), 43 deletions(-) diff --git a/packages/edit-site/src/components/layout/index.js b/packages/edit-site/src/components/layout/index.js index bbe9d7ff707ca..cd7890649c60a 100644 --- a/packages/edit-site/src/components/layout/index.js +++ b/packages/edit-site/src/components/layout/index.js @@ -224,14 +224,25 @@ export default function Layout() { { isEditorPage && isEditing && ( - { isEditing &&
} +
) }
- - { - - - - - - } - + + + + + From ee79eae0ded284816c0b0c11c3072d7691038b96 Mon Sep 17 00:00:00 2001 From: Jarda Snajdr Date: Tue, 4 Jul 2023 12:26:40 +0200 Subject: [PATCH 021/146] Remove serverSideBlockDefinitions from a test (#52215) --- packages/blocks/src/api/registration.js | 2 +- packages/blocks/src/api/test/registration.js | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/blocks/src/api/registration.js b/packages/blocks/src/api/registration.js index f601a3f59314f..bf866b7a2143b 100644 --- a/packages/blocks/src/api/registration.js +++ b/packages/blocks/src/api/registration.js @@ -129,7 +129,7 @@ import { store as blocksStore } from '../store'; * then no preview is shown. */ -export const serverSideBlockDefinitions = {}; +const serverSideBlockDefinitions = {}; function isObject( object ) { return object !== null && typeof object === 'object'; diff --git a/packages/blocks/src/api/test/registration.js b/packages/blocks/src/api/test/registration.js index ff75590b40007..42f4dcfbf0e48 100644 --- a/packages/blocks/src/api/test/registration.js +++ b/packages/blocks/src/api/test/registration.js @@ -28,7 +28,6 @@ import { getBlockSupport, hasBlockSupport, isReusableBlock, - serverSideBlockDefinitions, unstable__bootstrapServerSideBlockDefinitions, // eslint-disable-line camelcase } from '../registration'; import { BLOCK_ICON_DEFAULT, DEPRECATED_ENTRY_KEYS } from '../constants'; @@ -822,7 +821,6 @@ describe( 'blocks', () => { styles: [], variations: [], save: () => null, - ...serverSideBlockDefinitions[ name ], ...blockSettingsWithDeprecations, }, DEPRECATED_ENTRY_KEYS From b380a603c23f266499e1bead2f90ac55874594b8 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Tue, 4 Jul 2023 14:32:17 +0400 Subject: [PATCH 022/146] Page List: Fix ESLint warnings (#52267) --- packages/block-library/src/page-list/edit.js | 105 ++++++++++--------- 1 file changed, 54 insertions(+), 51 deletions(-) diff --git a/packages/block-library/src/page-list/edit.js b/packages/block-library/src/page-list/edit.js index 837e9d0cf6729..e4c28a22111c6 100644 --- a/packages/block-library/src/page-list/edit.js +++ b/packages/block-library/src/page-list/edit.js @@ -183,63 +183,66 @@ export default function PageListEdit( { style: { ...context.style?.color }, } ); - const getBlockList = ( parentId = parentPageID ) => { - const childPages = pagesByParentId.get( parentId ); + const pagesTree = useMemo( + function makePagesTree( parentId = 0, level = 0 ) { + const childPages = pagesByParentId.get( parentId ); - if ( ! childPages?.length ) { - return []; - } - - return childPages.reduce( ( template, page ) => { - const hasChildren = pagesByParentId.has( page.id ); - const pageProps = { - id: page.id, - label: - // translators: displayed when a page has an empty title. - page.title?.rendered?.trim() !== '' - ? page.title?.rendered - : __( '(no title)' ), - title: page.title?.rendered, - link: page.url, - hasChildren, - }; - let item = null; - const children = getBlockList( page.id ); - item = createBlock( 'core/page-list-item', pageProps, children ); - template.push( item ); - - return template; - }, [] ); - }; + if ( ! childPages?.length ) { + return []; + } - const makePagesTree = ( parentId = 0, level = 0 ) => { - const childPages = pagesByParentId.get( parentId ); + return childPages.reduce( ( tree, page ) => { + const hasChildren = pagesByParentId.has( page.id ); + const item = { + value: page.id, + label: '— '.repeat( level ) + page.title.rendered, + rawName: page.title.rendered, + }; + tree.push( item ); + if ( hasChildren ) { + tree.push( ...makePagesTree( page.id, level + 1 ) ); + } + return tree; + }, [] ); + }, + [ pagesByParentId ] + ); - if ( ! childPages?.length ) { - return []; - } + const blockList = useMemo( + function getBlockList( parentId = parentPageID ) { + const childPages = pagesByParentId.get( parentId ); - return childPages.reduce( ( tree, page ) => { - const hasChildren = pagesByParentId.has( page.id ); - const item = { - value: page.id, - label: '— '.repeat( level ) + page.title.rendered, - rawName: page.title.rendered, - }; - tree.push( item ); - if ( hasChildren ) { - tree.push( ...makePagesTree( page.id, level + 1 ) ); + if ( ! childPages?.length ) { + return []; } - return tree; - }, [] ); - }; - const pagesTree = useMemo( makePagesTree, [ pagesByParentId ] ); - - const blockList = useMemo( getBlockList, [ - pagesByParentId, - parentPageID, - ] ); + return childPages.reduce( ( template, page ) => { + const hasChildren = pagesByParentId.has( page.id ); + const pageProps = { + id: page.id, + label: + // translators: displayed when a page has an empty title. + page.title?.rendered?.trim() !== '' + ? page.title?.rendered + : __( '(no title)' ), + title: page.title?.rendered, + link: page.url, + hasChildren, + }; + let item = null; + const children = getBlockList( page.id ); + item = createBlock( + 'core/page-list-item', + pageProps, + children + ); + template.push( item ); + + return template; + }, [] ); + }, + [ pagesByParentId, parentPageID ] + ); const { isNested, From 9ac0ed771d61cd8707ef74d9bc4b0a634144d566 Mon Sep 17 00:00:00 2001 From: Nik Tsekouras Date: Tue, 4 Jul 2023 13:46:21 +0300 Subject: [PATCH 023/146] Site Editor Frame: Ignore Spotlight in view mode (#52262) --- .../block-editor/use-site-editor-settings.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/edit-site/src/components/block-editor/use-site-editor-settings.js b/packages/edit-site/src/components/block-editor/use-site-editor-settings.js index 4ce186ad9d6bb..732f662f5ddca 100644 --- a/packages/edit-site/src/components/block-editor/use-site-editor-settings.js +++ b/packages/edit-site/src/components/block-editor/use-site-editor-settings.js @@ -12,11 +12,13 @@ import { unlock } from '../../lock-unlock'; import inserterMediaCategories from './inserter-media-categories'; export default function useSiteEditorSettings( templateType ) { - const { storedSettings } = useSelect( ( select ) => { - const { getSettings } = unlock( select( editSiteStore ) ); - + const { storedSettings, canvasMode } = useSelect( ( select ) => { + const { getSettings, getCanvasMode } = unlock( + select( editSiteStore ) + ); return { storedSettings: getSettings(), + canvasMode: getCanvasMode(), }; }, [] ); @@ -70,6 +72,7 @@ export default function useSiteEditorSettings( templateType ) { const { __experimentalAdditionalBlockPatterns, __experimentalAdditionalBlockPatternCategories, + focusMode, ...restStoredSettings } = storedSettings; @@ -78,6 +81,7 @@ export default function useSiteEditorSettings( templateType ) { inserterMediaCategories, __experimentalBlockPatterns: blockPatterns, __experimentalBlockPatternCategories: blockPatternCategories, + focusMode: canvasMode === 'view' && focusMode ? false : focusMode, }; - }, [ storedSettings, blockPatterns, blockPatternCategories ] ); + }, [ storedSettings, blockPatterns, blockPatternCategories, canvasMode ] ); } From 5ba748472b3e481e89ec3ac4c4e215031cc1eb3c Mon Sep 17 00:00:00 2001 From: Rich Tabor Date: Tue, 4 Jul 2023 07:02:49 -0400 Subject: [PATCH 024/146] Fix default block dimensions visibility (#52256) * core/heading * core/details * core/list * core/table * core/video * core/verse * core/social-links * core/site-title * core/site-tagline * core/site-logo * core/post-time-to-read * core/gallery * core/code * core/categories * core/audio * core/archives --- packages/block-library/src/archives/block.json | 6 +++++- packages/block-library/src/audio/block.json | 6 +++++- packages/block-library/src/categories/block.json | 6 +++++- packages/block-library/src/code/block.json | 6 +++++- packages/block-library/src/details/block.json | 6 +++++- packages/block-library/src/gallery/block.json | 4 +++- packages/block-library/src/heading/block.json | 6 +++++- packages/block-library/src/list/block.json | 6 +++++- packages/block-library/src/post-time-to-read/block.json | 6 +++++- packages/block-library/src/site-logo/block.json | 6 +++++- packages/block-library/src/site-tagline/block.json | 6 +++++- packages/block-library/src/site-title/block.json | 6 +++++- packages/block-library/src/social-links/block.json | 4 +++- packages/block-library/src/table/block.json | 6 +++++- packages/block-library/src/verse/block.json | 6 +++++- packages/block-library/src/video/block.json | 6 +++++- 16 files changed, 76 insertions(+), 16 deletions(-) diff --git a/packages/block-library/src/archives/block.json b/packages/block-library/src/archives/block.json index 4d30b5344d2a6..7e0f5181d2c3d 100644 --- a/packages/block-library/src/archives/block.json +++ b/packages/block-library/src/archives/block.json @@ -29,7 +29,11 @@ "html": false, "spacing": { "margin": true, - "padding": true + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } }, "typography": { "fontSize": true, diff --git a/packages/block-library/src/audio/block.json b/packages/block-library/src/audio/block.json index adcf67e4dc10c..a4740e304451c 100644 --- a/packages/block-library/src/audio/block.json +++ b/packages/block-library/src/audio/block.json @@ -49,7 +49,11 @@ "align": true, "spacing": { "margin": true, - "padding": true + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } } }, "editorStyle": "wp-block-audio-editor", diff --git a/packages/block-library/src/categories/block.json b/packages/block-library/src/categories/block.json index e0d77ff5696ec..5014da8298049 100644 --- a/packages/block-library/src/categories/block.json +++ b/packages/block-library/src/categories/block.json @@ -33,7 +33,11 @@ "html": false, "spacing": { "margin": true, - "padding": true + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } }, "typography": { "fontSize": true, diff --git a/packages/block-library/src/code/block.json b/packages/block-library/src/code/block.json index 7f58e79d22175..4d19423f1b629 100644 --- a/packages/block-library/src/code/block.json +++ b/packages/block-library/src/code/block.json @@ -31,7 +31,11 @@ }, "spacing": { "margin": [ "top", "bottom" ], - "padding": true + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } }, "__experimentalBorder": { "radius": true, diff --git a/packages/block-library/src/details/block.json b/packages/block-library/src/details/block.json index 01110dfec26ff..222be7357c3fb 100644 --- a/packages/block-library/src/details/block.json +++ b/packages/block-library/src/details/block.json @@ -34,7 +34,11 @@ "html": false, "spacing": { "margin": true, - "padding": true + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } }, "typography": { "fontSize": true, diff --git a/packages/block-library/src/gallery/block.json b/packages/block-library/src/gallery/block.json index 07425e1037402..69427d53dfef2 100644 --- a/packages/block-library/src/gallery/block.json +++ b/packages/block-library/src/gallery/block.json @@ -115,7 +115,9 @@ "blockGap": [ "horizontal", "vertical" ], "__experimentalSkipSerialization": [ "blockGap" ], "__experimentalDefaultControls": { - "blockGap": true + "blockGap": true, + "margin": false, + "padding": false } }, "color": { diff --git a/packages/block-library/src/heading/block.json b/packages/block-library/src/heading/block.json index ff2a5d267511b..80f1f0c47b5a8 100644 --- a/packages/block-library/src/heading/block.json +++ b/packages/block-library/src/heading/block.json @@ -40,7 +40,11 @@ }, "spacing": { "margin": true, - "padding": true + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } }, "typography": { "fontSize": true, diff --git a/packages/block-library/src/list/block.json b/packages/block-library/src/list/block.json index e7ef850d29ba5..9c4c1ef4f2784 100644 --- a/packages/block-library/src/list/block.json +++ b/packages/block-library/src/list/block.json @@ -61,7 +61,11 @@ }, "spacing": { "margin": true, - "padding": true + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } }, "__unstablePasteTextInline": true, "__experimentalSelector": "ol,ul", diff --git a/packages/block-library/src/post-time-to-read/block.json b/packages/block-library/src/post-time-to-read/block.json index 8f88db46d51ae..281e9bb1f1b21 100644 --- a/packages/block-library/src/post-time-to-read/block.json +++ b/packages/block-library/src/post-time-to-read/block.json @@ -24,7 +24,11 @@ "html": false, "spacing": { "margin": true, - "padding": true + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } }, "typography": { "fontSize": true, diff --git a/packages/block-library/src/site-logo/block.json b/packages/block-library/src/site-logo/block.json index 747f1ab94a9c3..d1e3d1b20c3da 100644 --- a/packages/block-library/src/site-logo/block.json +++ b/packages/block-library/src/site-logo/block.json @@ -40,7 +40,11 @@ }, "spacing": { "margin": true, - "padding": true + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } } }, "styles": [ diff --git a/packages/block-library/src/site-tagline/block.json b/packages/block-library/src/site-tagline/block.json index 7382c084ee642..22fb59aab5ead 100644 --- a/packages/block-library/src/site-tagline/block.json +++ b/packages/block-library/src/site-tagline/block.json @@ -25,7 +25,11 @@ }, "spacing": { "margin": true, - "padding": true + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } }, "typography": { "fontSize": true, diff --git a/packages/block-library/src/site-title/block.json b/packages/block-library/src/site-title/block.json index 2c37258acb3eb..e936bad0e4515 100644 --- a/packages/block-library/src/site-title/block.json +++ b/packages/block-library/src/site-title/block.json @@ -40,7 +40,11 @@ }, "spacing": { "padding": true, - "margin": true + "margin": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } }, "typography": { "fontSize": true, diff --git a/packages/block-library/src/social-links/block.json b/packages/block-library/src/social-links/block.json index 064b077b5e9ed..20206511a4c96 100644 --- a/packages/block-library/src/social-links/block.json +++ b/packages/block-library/src/social-links/block.json @@ -73,7 +73,9 @@ "padding": true, "units": [ "px", "em", "rem", "vh", "vw" ], "__experimentalDefaultControls": { - "blockGap": true + "blockGap": true, + "margin": true, + "padding": false } } }, diff --git a/packages/block-library/src/table/block.json b/packages/block-library/src/table/block.json index 54e4bc26cac7d..d1139d6c55add 100644 --- a/packages/block-library/src/table/block.json +++ b/packages/block-library/src/table/block.json @@ -166,7 +166,11 @@ }, "spacing": { "margin": true, - "padding": true + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } }, "typography": { "fontSize": true, diff --git a/packages/block-library/src/verse/block.json b/packages/block-library/src/verse/block.json index 5fabf49adec7b..d0fffc8ae5076 100644 --- a/packages/block-library/src/verse/block.json +++ b/packages/block-library/src/verse/block.json @@ -46,7 +46,11 @@ }, "spacing": { "margin": true, - "padding": true + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } }, "__experimentalBorder": { "radius": true, diff --git a/packages/block-library/src/video/block.json b/packages/block-library/src/video/block.json index df2d2075375ff..debe6f20fe53f 100644 --- a/packages/block-library/src/video/block.json +++ b/packages/block-library/src/video/block.json @@ -83,7 +83,11 @@ "align": true, "spacing": { "margin": true, - "padding": true + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } } }, "editorStyle": "wp-block-video-editor", From f59138dcb81feb53567c74402e230439539cd272 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Tue, 4 Jul 2023 17:18:00 +0400 Subject: [PATCH 025/146] Fix flaky Site Editor pages e2e test (#52283) --- test/e2e/specs/site-editor/pages.spec.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/e2e/specs/site-editor/pages.spec.js b/test/e2e/specs/site-editor/pages.spec.js index 8358c5f4941dd..8c63036a60ebb 100644 --- a/test/e2e/specs/site-editor/pages.spec.js +++ b/test/e2e/specs/site-editor/pages.spec.js @@ -78,7 +78,7 @@ test.describe( 'Pages', () => { ).toBeVisible(); // Switch to template editing focus. - await page.getByRole( 'button', { name: 'Settings' } ).click(); + await editor.openDocumentSettingsSidebar(); await page .getByRole( 'region', { name: 'Editor settings' } ) .getByRole( 'button', { name: 'Edit template' } ) @@ -102,7 +102,10 @@ test.describe( 'Pages', () => { .fill( 'New Site Title' ); // Go back to page editing focus. - await page.getByRole( 'button', { name: 'Back', exact: true } ).click(); + await page + .getByRole( 'region', { name: 'Editor top bar' } ) + .getByRole( 'button', { name: 'Back' } ) + .click(); // Site Title and Page entities should have been modified. await page.getByRole( 'button', { name: 'Save', exact: true } ).click(); From 926ba1741053e89763856e3c79512de4ee9dd8f6 Mon Sep 17 00:00:00 2001 From: Ryan Welcher Date: Tue, 4 Jul 2023 16:52:45 +0300 Subject: [PATCH 026/146] Export store for the customize-widgets package. (#52189) --- packages/customize-widgets/src/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/customize-widgets/src/index.js b/packages/customize-widgets/src/index.js index 6a564f1560cc5..10ca00ff78309 100644 --- a/packages/customize-widgets/src/index.js +++ b/packages/customize-widgets/src/index.js @@ -100,3 +100,4 @@ export function initialize( editorName, blockEditorSettings ) { ); } ); } +export { store } from './store'; From eb8209ec7c356a63454c789b061a3141c71cca4b Mon Sep 17 00:00:00 2001 From: Ryan Welcher Date: Tue, 4 Jul 2023 17:32:57 +0300 Subject: [PATCH 027/146] Add @example tags to the customize-widgets package (#52141) * Add example for setIsInserterOpen. * Add example for isInserterOpened selector. * Update examples to use store export based on #52189 --- .../data/data-core-customize-widgets.md | 45 +++++++++++++++++++ .../customize-widgets/src/store/actions.js | 25 +++++++++++ .../customize-widgets/src/store/selectors.js | 18 ++++++++ 3 files changed, 88 insertions(+) diff --git a/docs/reference-guides/data/data-core-customize-widgets.md b/docs/reference-guides/data/data-core-customize-widgets.md index 13476f94fdb39..78433e8991a81 100644 --- a/docs/reference-guides/data/data-core-customize-widgets.md +++ b/docs/reference-guides/data/data-core-customize-widgets.md @@ -10,6 +10,25 @@ Namespace: `core/customize-widgets`. Returns true if the inserter is opened. +_Usage_ + +```js +import { store as customizeWidgetsStore } from '@wordpress/customize-widgets'; +import { __ } from '@wordpress/i18n'; +import { useSelect } from '@wordpress/data'; + +const ExampleComponent = () => { + const { isInserterOpened } = useSelect( + ( select ) => select( customizeWidgetsStore ), + [] + ); + + return isInserterOpened() + ? __( 'Inserter is open' ) + : __( 'Inserter is closed.' ); +}; +``` + _Parameters_ - _state_ `Object`: Global application state. @@ -28,6 +47,32 @@ _Returns_ Returns an action object used to open/close the inserter. +_Usage_ + +```js +import { store as customizeWidgetsStore } from '@wordpress/customize-widgets'; +import { __ } from '@wordpress/i18n'; +import { useDispatch } from '@wordpress/data'; +import { Button } from '@wordpress/components'; +import { useState } from '@wordpress/element'; + +const ExampleComponent = () => { + const { setIsInserterOpened } = useDispatch( customizeWidgetsStore ); + const [ isOpen, setIsOpen ] = useState( false ); + + return ( + + ); +}; +``` + _Parameters_ - _value_ `boolean|Object`: Whether the inserter should be opened (true) or closed (false). To specify an insertion point, use an object. diff --git a/packages/customize-widgets/src/store/actions.js b/packages/customize-widgets/src/store/actions.js index 30926701e1f26..844617b4142aa 100644 --- a/packages/customize-widgets/src/store/actions.js +++ b/packages/customize-widgets/src/store/actions.js @@ -8,6 +8,31 @@ * @param {string} value.rootClientId The root client ID to insert at. * @param {number} value.insertionIndex The index to insert at. * + * @example + * ```js + * import { store as customizeWidgetsStore } from '@wordpress/customize-widgets'; + * import { __ } from '@wordpress/i18n'; + * import { useDispatch } from '@wordpress/data'; + * import { Button } from '@wordpress/components'; + * import { useState } from '@wordpress/element'; + * + * const ExampleComponent = () => { + * const { setIsInserterOpened } = useDispatch( customizeWidgetsStore ); + * const [ isOpen, setIsOpen ] = useState( false ); + * + * return ( + * + * ); + * }; + * ``` + * * @return {Object} Action object. */ export function setIsInserterOpened( value ) { diff --git a/packages/customize-widgets/src/store/selectors.js b/packages/customize-widgets/src/store/selectors.js index 63962af151d15..abe2cb89c9f6a 100644 --- a/packages/customize-widgets/src/store/selectors.js +++ b/packages/customize-widgets/src/store/selectors.js @@ -3,6 +3,24 @@ * * @param {Object} state Global application state. * + * @example + * ```js + * import { store as customizeWidgetsStore } from '@wordpress/customize-widgets'; + * import { __ } from '@wordpress/i18n'; + * import { useSelect } from '@wordpress/data'; + * + * const ExampleComponent = () => { + * const { isInserterOpened } = useSelect( + * ( select ) => select( customizeWidgetsStore ), + * [] + * ); + * + * return isInserterOpened() + * ? __( 'Inserter is open' ) + * : __( 'Inserter is closed.' ); + * }; + * ``` + * * @return {boolean} Whether the inserter is opened. */ export function isInserterOpened( state ) { From b1579dd8d3bc745a1f25da2872f2df3cc16afc28 Mon Sep 17 00:00:00 2001 From: Ryan Welcher Date: Tue, 4 Jul 2023 17:36:03 +0300 Subject: [PATCH 028/146] Export the store. (#52190) --- packages/edit-widgets/src/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/edit-widgets/src/index.js b/packages/edit-widgets/src/index.js index bae80786b6414..aa8d97d628992 100644 --- a/packages/edit-widgets/src/index.js +++ b/packages/edit-widgets/src/index.js @@ -124,3 +124,5 @@ const registerBlock = ( block ) => { } registerBlockType( name, settings ); }; + +export { store } from './store'; From ea6b5a12aa7424c2cd9c10e4a4476d9dad10295d Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Tue, 4 Jul 2023 16:57:11 +0100 Subject: [PATCH 029/146] Navigation: Fix sidebar title (#52167) The tests are also broken on trunk --- .../template-part-navigation-menu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js b/packages/edit-site/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js index f451c17e00adb..4837ad99beadd 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +++ b/packages/edit-site/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js @@ -22,7 +22,7 @@ export default function TemplatePartNavigationMenu( { id } ) { size="12" upperCase={ true } > - { title?.rendered || __( 'Navigation' ) } + { title || __( 'Navigation' ) } From 7de4d65a848383abe6d21020e90ef54cda6951c9 Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Wed, 5 Jul 2023 12:21:16 +1200 Subject: [PATCH 030/146] Patterns: rename sync_status and move to top level field on rest return instead of a meta field (#52146) --- lib/blocks.php | 28 +++++++++++ lib/compat/wordpress-6.3/blocks.php | 29 +++--------- ...class-gutenberg-rest-blocks-controller.php | 47 +++++++++++++++++++ lib/load.php | 1 + packages/block-editor/src/store/selectors.js | 15 +++--- .../components/create-pattern-modal/index.js | 2 +- .../components/page-patterns/use-patterns.js | 2 +- .../use-pattern-details.js | 2 +- .../src/components/post-sync-status/index.js | 6 +-- packages/reusable-blocks/src/store/actions.js | 2 +- 10 files changed, 98 insertions(+), 36 deletions(-) create mode 100644 lib/compat/wordpress-6.3/class-gutenberg-rest-blocks-controller.php diff --git a/lib/blocks.php b/lib/blocks.php index 8185567db1b80..e98f711b5c85a 100644 --- a/lib/blocks.php +++ b/lib/blocks.php @@ -372,3 +372,31 @@ function gutenberg_register_legacy_social_link_blocks() { } add_action( 'init', 'gutenberg_register_legacy_social_link_blocks' ); + +/** + * Migrate the legacy `sync_status` meta key (added 16.1) to the new `wp_pattern_sync_status` meta key (16.1.1). + * + * This filter is INTENTIONALLY left out of core as the meta key was fist introduced to core in 6.3 as `wp_pattern_sync_status`. + * see https://github.com/WordPress/gutenberg/pull/52232 + * + * @param mixed $value The value to return, either a single metadata value or an array of values depending on the value of $single. + * @param int $object_id ID of the object metadata is for. + * @param string $meta_key Metadata key. + * @param bool $single Whether to return only the first value of the specified $meta_key. + */ +function gutenberg_legacy_wp_block_post_meta( $value, $object_id, $meta_key, $single ) { + if ( 'wp_pattern_sync_status' !== $meta_key ) { + return $value; + } + + $sync_status = get_post_meta( $object_id, 'sync_status', $single ); + + if ( $single && 'unsynced' === $sync_status ) { + return $sync_status; + } elseif ( isset( $sync_status[0] ) && 'unsynced' === $sync_status[0] ) { + return $sync_status; + } + + return $value; +} +add_filter( 'default_post_metadata', 'gutenberg_legacy_wp_block_post_meta', 10, 4 ); diff --git a/lib/compat/wordpress-6.3/blocks.php b/lib/compat/wordpress-6.3/blocks.php index b338d0a246709..ccc68786dc6ad 100644 --- a/lib/compat/wordpress-6.3/blocks.php +++ b/lib/compat/wordpress-6.3/blocks.php @@ -60,6 +60,7 @@ function gutenberg_rename_reusable_block_cpt_to_pattern( $args, $post_type ) { $args['labels']['item_reverted_to_draft'] = __( 'Pattern reverted to draft.' ); $args['labels']['item_scheduled'] = __( 'Pattern scheduled.' ); $args['labels']['item_updated'] = __( 'Pattern updated.' ); + $args['rest_controller_class'] = 'Gutenberg_REST_Blocks_Controller'; } return $args; @@ -89,7 +90,7 @@ function gutenberg_add_custom_fields_to_wp_block( $args, $post_type ) { add_filter( 'register_post_type_args', 'gutenberg_add_custom_fields_to_wp_block', 10, 2 ); /** - * Adds sync_status meta fields to the wp_block post type so an unsynced option can be added. + * Adds wp_pattern_sync_status meta fields to the wp_block post type so an unsynced option can be added. * * Note: This should be removed when the minimum required WP version is >= 6.3. * @@ -101,39 +102,21 @@ function gutenberg_wp_block_register_post_meta() { $post_type = 'wp_block'; register_post_meta( $post_type, - 'sync_status', + 'wp_pattern_sync_status', array( 'auth_callback' => function() { return current_user_can( 'edit_posts' ); }, - 'sanitize_callback' => 'gutenberg_wp_block_sanitize_post_meta', + 'sanitize_callback' => 'sanitize_text_field', 'single' => true, 'type' => 'string', 'show_in_rest' => array( 'schema' => array( - 'type' => 'string', - 'properties' => array( - 'sync_status' => array( - 'type' => 'string', - ), - ), + 'type' => 'string', + 'enum' => array( 'partial', 'unsynced' ), ), ), ) ); } -/** - * Sanitizes the array of wp_block post meta sync_status string. - * - * Note: This should be removed when the minimum required WP version is >= 6.3. - * - * @see https://github.com/WordPress/gutenberg/pull/51144 - * - * @param array $meta_value String to sanitize. - * - * @return array Sanitized string. - */ -function gutenberg_wp_block_sanitize_post_meta( $meta_value ) { - return sanitize_text_field( $meta_value ); -} add_action( 'init', 'gutenberg_wp_block_register_post_meta' ); diff --git a/lib/compat/wordpress-6.3/class-gutenberg-rest-blocks-controller.php b/lib/compat/wordpress-6.3/class-gutenberg-rest-blocks-controller.php new file mode 100644 index 0000000000000..08108e1638334 --- /dev/null +++ b/lib/compat/wordpress-6.3/class-gutenberg-rest-blocks-controller.php @@ -0,0 +1,47 @@ + - // Filter to either fully synced patterns (sync_status === 'fully'), - // or old school reusable blocks (sync_status === ''). - reusableBlock.meta?.sync_status === 'fully' || - reusableBlock.meta?.sync_status === '' || - ! reusableBlock.meta?.sync_status + // Reusable blocks that are fully synced should have no sync status set + // for backwards compat between patterns and old reusable blocks, but + // some in release 16.1 may have had sync status inadvertantly set to + // 'fully' if created in the site editor. + reusableBlock.wp_pattern_sync_status === 'fully' || + reusableBlock.wp_pattern_sync_status === '' || + ! reusableBlock.wp_pattern_sync_status ) .map( buildReusableBlockInserterItem ) : []; @@ -2313,7 +2315,8 @@ function getUnsyncedPatterns( state ) { return reusableBlocks .filter( - ( reusableBlock ) => reusableBlock.meta?.sync_status === 'unsynced' + ( reusableBlock ) => + reusableBlock.wp_pattern_sync_status === 'unsynced' ) .map( ( reusableBlock ) => { return { diff --git a/packages/edit-site/src/components/create-pattern-modal/index.js b/packages/edit-site/src/components/create-pattern-modal/index.js index 7906cb2352c7b..46d734b86fdd1 100644 --- a/packages/edit-site/src/components/create-pattern-modal/index.js +++ b/packages/edit-site/src/components/create-pattern-modal/index.js @@ -56,7 +56,7 @@ export default function CreatePatternModal( { status: 'publish', meta: syncType === SYNC_TYPES.unsynced - ? { sync_status: syncType } + ? { wp_pattern_sync_status: syncType } : undefined, }, { throwOnError: true } diff --git a/packages/edit-site/src/components/page-patterns/use-patterns.js b/packages/edit-site/src/components/page-patterns/use-patterns.js index a8d76b58cb45d..cef7b4721193f 100644 --- a/packages/edit-site/src/components/page-patterns/use-patterns.js +++ b/packages/edit-site/src/components/page-patterns/use-patterns.js @@ -154,7 +154,7 @@ const reusableBlockToPattern = ( reusableBlock ) => ( { categories: reusableBlock.wp_pattern, id: reusableBlock.id, name: reusableBlock.slug, - syncStatus: reusableBlock.meta?.sync_status || SYNC_TYPES.full, + syncStatus: reusableBlock.wp_pattern_sync_status || SYNC_TYPES.full, title: reusableBlock.title.raw, type: reusableBlock.type, reusableBlock, diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js b/packages/edit-site/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js index dfc367ea0b97d..9853e2e6de23b 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +++ b/packages/edit-site/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js @@ -95,7 +95,7 @@ export default function usePatternDetails( postType, postId ) { details.push( { label: __( 'Syncing' ), value: - record.meta?.sync_status === 'unsynced' + record.wp_pattern_sync_status === 'unsynced' ? __( 'Not synced' ) : __( 'Fully synced' ), } ); diff --git a/packages/editor/src/components/post-sync-status/index.js b/packages/editor/src/components/post-sync-status/index.js index c384fd234c7a3..22de1396d0679 100644 --- a/packages/editor/src/components/post-sync-status/index.js +++ b/packages/editor/src/components/post-sync-status/index.js @@ -11,17 +11,17 @@ import { PanelRow } from '@wordpress/components'; import { store as editorStore } from '../../store'; export default function PostSyncStatus() { - const { meta, postType } = useSelect( ( select ) => { + const { syncStatus, postType } = useSelect( ( select ) => { const { getEditedPostAttribute } = select( editorStore ); return { - meta: getEditedPostAttribute( 'meta' ), + syncStatus: getEditedPostAttribute( 'wp_pattern_sync_status' ), postType: getEditedPostAttribute( 'type' ), }; }, [] ); if ( postType !== 'wp_block' ) { return null; } - const syncStatus = meta?.sync_status; + const isFullySynced = ! syncStatus; return ( diff --git a/packages/reusable-blocks/src/store/actions.js b/packages/reusable-blocks/src/store/actions.js index aae706adfab36..17a2e83d5e776 100644 --- a/packages/reusable-blocks/src/store/actions.js +++ b/packages/reusable-blocks/src/store/actions.js @@ -52,7 +52,7 @@ export const __experimentalConvertBlocksToReusable = const meta = syncType === 'unsynced' ? { - sync_status: syncType, + wp_pattern_sync_status: syncType, } : undefined; From e085f159ce0290b995e7dc598afb6e43624ffbd8 Mon Sep 17 00:00:00 2001 From: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com> Date: Wed, 5 Jul 2023 11:24:05 +1000 Subject: [PATCH 031/146] Patterns: Update section heading levels (#52273) --- .../edit-site/src/components/page-patterns/grid-item.js | 8 +------- .../src/components/page-patterns/patterns-list.js | 8 ++++++-- .../edit-site/src/components/page-patterns/style.scss | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/packages/edit-site/src/components/page-patterns/grid-item.js b/packages/edit-site/src/components/page-patterns/grid-item.js index 377a04aca1c16..30db5cdedfeff 100644 --- a/packages/edit-site/src/components/page-patterns/grid-item.js +++ b/packages/edit-site/src/components/page-patterns/grid-item.js @@ -12,7 +12,6 @@ import { DropdownMenu, MenuGroup, MenuItem, - __experimentalHeading as Heading, __experimentalHStack as HStack, __unstableCompositeItem as CompositeItem, Tooltip, @@ -155,12 +154,7 @@ export default function GridItem( { categoryId, composite, icon, item } ) { icon={ itemIcon } /> ) } - + { item.title } { item.type === PATTERNS && ( - { __( 'Synced' ) } + + { __( 'Synced' ) } + { __( 'Patterns that are kept in sync across your site' @@ -94,7 +96,9 @@ export default function PatternsList( { categoryId, type } ) { { ! isResolving && !! unsyncedPatterns.length && ( <> - { __( 'Standard' ) } + + { __( 'Standard' ) } + { __( 'Patterns that can be changed freely without affecting your site' diff --git a/packages/edit-site/src/components/page-patterns/style.scss b/packages/edit-site/src/components/page-patterns/style.scss index fdf0aea3431f6..9326a96612319 100644 --- a/packages/edit-site/src/components/page-patterns/style.scss +++ b/packages/edit-site/src/components/page-patterns/style.scss @@ -91,7 +91,7 @@ } .edit-site-patterns__pattern-title { - color: $gray-600; + color: $gray-200; .edit-site-patterns__pattern-icon { border-radius: $grid-unit-05; From 095d64a7fd92c3d5fa26e836fc40cd8fe5dc77cd Mon Sep 17 00:00:00 2001 From: Kai Hao Date: Wed, 5 Jul 2023 09:25:48 +0800 Subject: [PATCH 032/146] Fix incorrect aria-describedby attributes for theme patterns (#52263) --- .../edit-site/src/components/page-patterns/grid-item.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/edit-site/src/components/page-patterns/grid-item.js b/packages/edit-site/src/components/page-patterns/grid-item.js index 30db5cdedfeff..8795e41eedd4f 100644 --- a/packages/edit-site/src/components/page-patterns/grid-item.js +++ b/packages/edit-site/src/components/page-patterns/grid-item.js @@ -121,7 +121,12 @@ export default function GridItem( { categoryId, composite, icon, item } ) { aria-label={ item.title } aria-describedby={ ariaDescriptions.length - ? ariaDescriptions.join( ' ' ) + ? ariaDescriptions + .map( + ( _, index ) => + `${ descriptionId }-${ index }` + ) + .join( ' ' ) : undefined } > From c629b5da345739cbc0ad17361f40c4add8f6728f Mon Sep 17 00:00:00 2001 From: Robert Anderson Date: Wed, 5 Jul 2023 14:40:16 +1000 Subject: [PATCH 033/146] Hide parent selector when parent is 'disabled' or 'contentOnly' (#52264) --- .../components/block-parent-selector/index.js | 21 ++++++++++++------- .../block-tools/block-contextual-toolbar.js | 1 + 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/packages/block-editor/src/components/block-parent-selector/index.js b/packages/block-editor/src/components/block-parent-selector/index.js index e338a10f17069..e47c6da6063a2 100644 --- a/packages/block-editor/src/components/block-parent-selector/index.js +++ b/packages/block-editor/src/components/block-parent-selector/index.js @@ -14,6 +14,7 @@ import useBlockDisplayInformation from '../use-block-display-information'; import BlockIcon from '../block-icon'; import { useShowMoversGestures } from '../block-toolbar/utils'; import { store as blockEditorStore } from '../../store'; +import { unlock } from '../../lock-unlock'; /** * Block parent selector component, displaying the hierarchy of the @@ -24,14 +25,15 @@ import { store as blockEditorStore } from '../../store'; export default function BlockParentSelector() { const { selectBlock, toggleBlockHighlight } = useDispatch( blockEditorStore ); - const { firstParentClientId, shouldHide, isDistractionFree } = useSelect( + const { firstParentClientId, isVisible, isDistractionFree } = useSelect( ( select ) => { const { getBlockName, getBlockParents, getSelectedBlockClientId, getSettings, - } = select( blockEditorStore ); + getBlockEditingMode, + } = unlock( select( blockEditorStore ) ); const { hasBlockSupport } = select( blocksStore ); const selectedBlockClientId = getSelectedBlockClientId(); const parents = getBlockParents( selectedBlockClientId ); @@ -41,11 +43,14 @@ export default function BlockParentSelector() { const settings = getSettings(); return { firstParentClientId: _firstParentClientId, - shouldHide: ! hasBlockSupport( - _parentBlockType, - '__experimentalParentSelector', - true - ), + isVisible: + _firstParentClientId && + getBlockEditingMode( _firstParentClientId ) === 'default' && + hasBlockSupport( + _parentBlockType, + '__experimentalParentSelector', + true + ), isDistractionFree: settings.isDistractionFree, }; }, @@ -66,7 +71,7 @@ export default function BlockParentSelector() { }, } ); - if ( shouldHide || firstParentClientId === undefined ) { + if ( ! isVisible ) { return null; } diff --git a/packages/block-editor/src/components/block-tools/block-contextual-toolbar.js b/packages/block-editor/src/components/block-tools/block-contextual-toolbar.js index d9c06f0324701..743a07b4bb881 100644 --- a/packages/block-editor/src/components/block-tools/block-contextual-toolbar.js +++ b/packages/block-editor/src/components/block-tools/block-contextual-toolbar.js @@ -57,6 +57,7 @@ function BlockContextualToolbar( { focusOnMount, isFixed, ...props } ) { hasParents: parents.length, showParentSelector: parentBlockType && + getBlockEditingMode( firstParentClientId ) === 'default' && hasBlockSupport( parentBlockType, '__experimentalParentSelector', From b73b1d23d5c83edb57cb3957eae2eb7f3c2e3bbc Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Wed, 5 Jul 2023 17:34:26 +1200 Subject: [PATCH 034/146] Navigation: Fix e2e test failures caused by sidebar title change (#52308) --- .../template-part-navigation-menu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js b/packages/edit-site/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js index 4837ad99beadd..b410b2cf8a9b6 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +++ b/packages/edit-site/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js @@ -22,7 +22,7 @@ export default function TemplatePartNavigationMenu( { id } ) { size="12" upperCase={ true } > - { title || __( 'Navigation' ) } + { title?.rendered || title || __( 'Navigation' ) } From a42a0b2c65c672c8aeefbd8e1d389a0136b776f4 Mon Sep 17 00:00:00 2001 From: tellthemachines Date: Wed, 5 Jul 2023 15:35:26 +1000 Subject: [PATCH 035/146] Check randomizer experiment is enabled before rendering button (#52306) --- packages/edit-site/src/components/global-styles/palette.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/edit-site/src/components/global-styles/palette.js b/packages/edit-site/src/components/global-styles/palette.js index 6e9757415524c..32d92469068ba 100644 --- a/packages/edit-site/src/components/global-styles/palette.js +++ b/packages/edit-site/src/components/global-styles/palette.js @@ -91,7 +91,7 @@ function Palette( { name } ) { - { themeColors?.length > 0 && ( + { randomizeThemeColors && themeColors?.length > 0 && (
+ ); +} diff --git a/packages/block-editor/src/components/inserter/reusable-blocks-tab.js b/packages/block-editor/src/components/inserter/reusable-blocks-tab.js index c16d5f1a78e54..08cd8d57ba0d0 100644 --- a/packages/block-editor/src/components/inserter/reusable-blocks-tab.js +++ b/packages/block-editor/src/components/inserter/reusable-blocks-tab.js @@ -13,6 +13,7 @@ import BlockTypesList from '../block-types-list'; import InserterPanel from './panel'; import InserterNoResults from './no-results'; import useBlockTypesState from './hooks/use-block-types-state'; +import ReusableBlocksRenameHint from './reusable-block-rename-hint'; function ReusableBlocksList( { onHover, onInsert, rootClientId } ) { const [ items, , , onSelectItem ] = useBlockTypesState( @@ -54,6 +55,9 @@ function ReusableBlocksList( { onHover, onInsert, rootClientId } ) { export function ReusableBlocksTab( { rootClientId, onInsert, onHover } ) { return ( <> +
+ +
{ await page.keyboard.type( content ); await clickBlockToolbarButton( 'Options' ); - await clickMenuItem( 'Create pattern' ); + await clickMenuItem( 'Create pattern/reusable block' ); const nameInput = await page.waitForSelector( reusableBlockNameInputSelector ); diff --git a/packages/e2e-tests/specs/editor/various/block-editor-keyboard-shortcuts.test.js b/packages/e2e-tests/specs/editor/various/block-editor-keyboard-shortcuts.test.js index 24e8e3104aaaa..3be73830a4299 100644 --- a/packages/e2e-tests/specs/editor/various/block-editor-keyboard-shortcuts.test.js +++ b/packages/e2e-tests/specs/editor/various/block-editor-keyboard-shortcuts.test.js @@ -90,7 +90,7 @@ describe( 'block editor keyboard shortcuts', () => { } ); it( 'should prevent deleting multiple selected blocks from inputs', async () => { await clickBlockToolbarButton( 'Options' ); - await clickMenuItem( 'Create pattern' ); + await clickMenuItem( 'Create pattern/reusable block' ); const reusableBlockNameInputSelector = '.reusable-blocks-menu-items__convert-modal .components-text-control__input'; const nameInput = await page.waitForSelector( diff --git a/packages/e2e-tests/specs/editor/various/reusable-blocks.test.js b/packages/e2e-tests/specs/editor/various/reusable-blocks.test.js index 1ffd4e2414336..ec2fc8e535550 100644 --- a/packages/e2e-tests/specs/editor/various/reusable-blocks.test.js +++ b/packages/e2e-tests/specs/editor/various/reusable-blocks.test.js @@ -197,7 +197,7 @@ describe( 'Reusable blocks', () => { // Convert block to a reusable block. await clickBlockToolbarButton( 'Options' ); - await clickMenuItem( 'Create pattern' ); + await clickMenuItem( 'Create pattern/reusable block' ); // Set title. const nameInput = await page.waitForSelector( @@ -383,7 +383,7 @@ describe( 'Reusable blocks', () => { // Convert to reusable. await clickBlockToolbarButton( 'Options' ); - await clickMenuItem( 'Create pattern' ); + await clickMenuItem( 'Create pattern/reusable block' ); const nameInput = await page.waitForSelector( reusableBlockNameInputSelector ); diff --git a/packages/edit-site/src/components/page-patterns/patterns-list.js b/packages/edit-site/src/components/page-patterns/patterns-list.js index 81d383ea7bdd5..87b830c6180cc 100644 --- a/packages/edit-site/src/components/page-patterns/patterns-list.js +++ b/packages/edit-site/src/components/page-patterns/patterns-list.js @@ -88,7 +88,7 @@ export default function PatternsList( { categoryId, type } ) { diff --git a/packages/reusable-blocks/src/components/reusable-blocks-menu-items/reusable-block-convert-button.js b/packages/reusable-blocks/src/components/reusable-blocks-menu-items/reusable-block-convert-button.js index d051e36641281..875adb8fc16e3 100644 --- a/packages/reusable-blocks/src/components/reusable-blocks-menu-items/reusable-block-convert-button.js +++ b/packages/reusable-blocks/src/components/reusable-blocks-menu-items/reusable-block-convert-button.js @@ -5,6 +5,7 @@ import { hasBlockSupport, isReusableBlock } from '@wordpress/blocks'; import { BlockSettingsMenuControls, store as blockEditorStore, + ReusableBlocksRenameHint, } from '@wordpress/block-editor'; import { useCallback, useState } from '@wordpress/element'; import { @@ -130,7 +131,7 @@ export default function ReusableBlockConvertButton( { icon={ symbol } onClick={ () => setIsModalOpen( true ) } > - { __( 'Create pattern' ) } + { __( 'Create pattern/reusable block' ) } { isModalOpen && ( + { From 58ba018f0f9f4ae48f0f75c4ce1bf7072999a217 Mon Sep 17 00:00:00 2001 From: Robert Anderson Date: Wed, 5 Jul 2023 16:15:43 +1000 Subject: [PATCH 038/146] Guide: Place focus on the guide's container instead of its first tabbable (#52300) * Guide: Place focus on the guide's container instead of its first tabbable * Update CHANGELOG --- packages/components/CHANGELOG.md | 1 + packages/components/src/guide/index.tsx | 23 ++++++++++------------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index c690c15bce3e9..c83fe7fc5ea82 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -17,6 +17,7 @@ - `Modal`: Add small top padding to the content so that avoid cutting off the visible outline when hovering items ([#51829](https://github.com/WordPress/gutenberg/pull/51829)). - `DropdownMenu`: fix icon style when dashicon is used ([#43574](https://github.com/WordPress/gutenberg/pull/43574)). - `UnitControl`: Fix crash when certain units are used ([#52211](https://github.com/WordPress/gutenberg/pull/52211)). +- `Guide`: Place focus on the guide's container instead of its first tabbable ([#52300](https://github.com/WordPress/gutenberg/pull/52300)). ## 25.2.0 (2023-06-23) diff --git a/packages/components/src/guide/index.tsx b/packages/components/src/guide/index.tsx index e6a2d4c1252eb..c5655847d99e5 100644 --- a/packages/components/src/guide/index.tsx +++ b/packages/components/src/guide/index.tsx @@ -9,7 +9,6 @@ import classnames from 'classnames'; import { useState, useEffect, Children, useRef } from '@wordpress/element'; import deprecated from '@wordpress/deprecated'; import { __ } from '@wordpress/i18n'; -import { focus } from '@wordpress/dom'; /** * Internal dependencies @@ -59,9 +58,17 @@ function Guide( { onFinish, pages = [], }: GuideProps ) { - const guideContainer = useRef< HTMLDivElement >( null ); + const ref = useRef< HTMLDivElement >( null ); const [ currentPage, setCurrentPage ] = useState( 0 ); + useEffect( () => { + // Place focus at the top of the guide on mount and when the page changes. + const frame = ref.current?.querySelector( '.components-guide' ); + if ( frame instanceof HTMLElement ) { + frame.focus(); + } + }, [ currentPage ] ); + useEffect( () => { if ( Children.count( children ) ) { deprecated( 'Passing children to ', { @@ -71,16 +78,6 @@ function Guide( { } }, [ children ] ); - useEffect( () => { - // Each time we change the current page, start from the first element of the page. - // This also solves any focus loss that can happen. - if ( guideContainer.current ) { - ( - focus.tabbable.find( guideContainer.current ) as HTMLElement[] - )[ 0 ]?.focus(); - } - }, [ currentPage ] ); - if ( Children.count( children ) ) { pages = Children.map( children, ( child ) => ( { @@ -124,7 +121,7 @@ function Guide( { event.preventDefault(); } } } - ref={ guideContainer } + ref={ ref } >
From 48473a78dfa825d3d674801c3a4a5d87b4db44f1 Mon Sep 17 00:00:00 2001 From: tellthemachines Date: Wed, 5 Jul 2023 16:21:45 +1000 Subject: [PATCH 039/146] Check if experiment enabled fr this time (#52315) --- .../src/components/global-styles/palette.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/edit-site/src/components/global-styles/palette.js b/packages/edit-site/src/components/global-styles/palette.js index 32d92469068ba..dc73f54a1701a 100644 --- a/packages/edit-site/src/components/global-styles/palette.js +++ b/packages/edit-site/src/components/global-styles/palette.js @@ -91,15 +91,16 @@ function Palette( { name } ) { - { randomizeThemeColors && themeColors?.length > 0 && ( - - ) } + { window.__experimentalEnableColorRandomizer && + themeColors?.length > 0 && ( + + ) } ); } From 0a6bd092335f24041e795f5dae26d7139eacfd59 Mon Sep 17 00:00:00 2001 From: James Koster Date: Wed, 5 Jul 2023 10:38:06 +0100 Subject: [PATCH 040/146] Update welcome guide copy (#52282) --- packages/edit-site/src/components/welcome-guide/page.js | 4 ++-- packages/edit-site/src/components/welcome-guide/template.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/edit-site/src/components/welcome-guide/page.js b/packages/edit-site/src/components/welcome-guide/page.js index 2f162c0b2e84e..adb64a8033e99 100644 --- a/packages/edit-site/src/components/welcome-guide/page.js +++ b/packages/edit-site/src/components/welcome-guide/page.js @@ -31,7 +31,7 @@ export default function WelcomeGuidePage() { return null; } - const heading = __( 'Editing your page' ); + const heading = __( 'Editing a page' ); return (

{ __( - 'We’ve recently introduced the ability to edit pages within the site editor. You can switch to editing your template using the settings sidebar.' + 'It’s now possible to edit page content in the site editor. To customise other parts of the page like the header and footer switch to editing the template using the settings sidebar.' ) }

diff --git a/packages/edit-site/src/components/welcome-guide/template.js b/packages/edit-site/src/components/welcome-guide/template.js index cf0e723ab4609..f0c02c09d1124 100644 --- a/packages/edit-site/src/components/welcome-guide/template.js +++ b/packages/edit-site/src/components/welcome-guide/template.js @@ -36,7 +36,7 @@ export default function WelcomeGuideTemplate() { return null; } - const heading = __( 'Editing your template' ); + const heading = __( 'Editing a template' ); return (

{ __( - 'You’re now editing your page’s template. To switch back to editing your page you can click the back button in the toolbar.' + 'Note that the same template can be used by multiple pages, so any changes made here may affect other pages on the site. To switch back to editing the page content click the ‘Back’ button in the toolbar.' ) }

From ec1180408b670dc1e67721a398714ca12c457f6a Mon Sep 17 00:00:00 2001 From: James Koster Date: Wed, 5 Jul 2023 10:49:03 +0100 Subject: [PATCH 041/146] Adjust top position (#52248) --- packages/edit-post/src/components/block-manager/style.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/edit-post/src/components/block-manager/style.scss b/packages/edit-post/src/components/block-manager/style.scss index 2568856be41ab..c62e5fea93202 100644 --- a/packages/edit-post/src/components/block-manager/style.scss +++ b/packages/edit-post/src/components/block-manager/style.scss @@ -36,7 +36,7 @@ .edit-post-block-manager__category-title { position: sticky; - top: 0; + top: - $grid-unit-05; // Offsets the top padding on the modal content container padding: $grid-unit-20 0; background-color: $white; z-index: z-index(".edit-post-block-manager__category-title"); From b3d878ab2fee0cf96a344deedeef6873b489e242 Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Wed, 5 Jul 2023 11:31:19 +0100 Subject: [PATCH 042/146] Page List: Change modal text (#52116) * Page List: Change modal text * Apply suggestions from code review * Update packages/block-library/src/page-list/convert-to-links-modal.js --- .../block-library/src/page-list/convert-to-links-modal.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/block-library/src/page-list/convert-to-links-modal.js b/packages/block-library/src/page-list/convert-to-links-modal.js index b212fccb77417..cd4049fecff58 100644 --- a/packages/block-library/src/page-list/convert-to-links-modal.js +++ b/packages/block-library/src/page-list/convert-to-links-modal.js @@ -5,14 +5,14 @@ import { Button, Modal } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; export const convertDescription = __( - 'This menu is automatically kept in sync with pages on your site. You can manage the menu yourself by clicking "Edit" below.' + 'This page list is synced with the published pages on your site. Detach the page list to add, delete, or reorder pages yourself.' ); export function ConvertToLinksModal( { onClick, onClose, disabled } ) { return ( - { __( 'Edit' ) } + { __( 'Detach' ) }
From 09bf154446584e4725406f30c8ffa9b11196f60f Mon Sep 17 00:00:00 2001 From: Luis Herranz Date: Wed, 5 Jul 2023 12:35:23 +0200 Subject: [PATCH 043/146] Navigation block: Do not toggle aria-expanded on hover when the overlay menu is opened (#52170) * Fix aria expanded when overlay is open * Update deepsignal and remove old packages * Remove unnecessary initial context * Rename OpenBy to OpenedBy --- package-lock.json | 34 +++-- packages/block-library/package.json | 4 - .../block-library/src/navigation/index.php | 10 +- packages/block-library/src/navigation/view.js | 129 ++++++++++-------- packages/interactivity/package.json | 2 +- 5 files changed, 95 insertions(+), 84 deletions(-) diff --git a/package-lock.json b/package-lock.json index 981958e6aef1e..c58fbb4a7197b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7133,12 +7133,19 @@ "integrity": "sha512-M+M3ZOtd1dtV/uasyk4SZu1vbfEJ4NeENv0F7F12nijZYedB5wSgbtZcuACyssnTznhF4ctUyrR0dZHuHfyWKA==" }, "@preact/signals-react": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@preact/signals-react/-/signals-react-1.3.1.tgz", - "integrity": "sha512-YHWoGAT2Mmv2OGlGx7CCCbaLjAH/InV9ytGAR+esX8Y0HJmMAw51QlqGYOD5GPA5LwimV7Ht1x7KEIegDZIoxg==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@preact/signals-react/-/signals-react-1.3.3.tgz", + "integrity": "sha512-Tbv+oWPcrWowAJp1U1eWFiFUJihulOAnL8g/hJ3fUsP0IcsKsj8U0OcIDrwemIPQe7+J/3FuudkZzted0MD/bA==", "requires": { - "@preact/signals-core": "^1.3.0", + "@preact/signals-core": "^1.3.1", "use-sync-external-store": "^1.2.0" + }, + "dependencies": { + "@preact/signals-core": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@preact/signals-core/-/signals-core-1.3.1.tgz", + "integrity": "sha512-DL+3kDssZ3UOMz9HufwSYE/gK0+TnT1jzegfF5rstgyPrnyfjz4BHAoxmzQA6Mkp4UlKe8qjsgl3v5a/obzNig==" + } } }, "@radix-ui/primitive": { @@ -17303,7 +17310,6 @@ "version": "file:packages/block-library", "requires": { "@babel/runtime": "^7.16.0", - "@preact/signals": "^1.1.3", "@wordpress/a11y": "file:packages/a11y", "@wordpress/api-fetch": "file:packages/api-fetch", "@wordpress/autop": "file:packages/autop", @@ -17337,13 +17343,10 @@ "change-case": "^4.1.2", "classnames": "^2.3.1", "colord": "^2.7.0", - "deepsignal": "^1.3.0", "escape-html": "^1.0.3", "fast-average-color": "^9.1.1", "fast-deep-equal": "^3.1.3", "memize": "^2.1.0", - "micromodal": "^0.4.10", - "preact": "^10.13.2", "remove-accents": "^0.4.2", "uuid": "^8.3.0" } @@ -18131,7 +18134,7 @@ "version": "file:packages/interactivity", "requires": { "@preact/signals": "^1.1.3", - "deepsignal": "^1.3.0", + "deepsignal": "^1.3.3", "preact": "^10.13.2" } }, @@ -31240,9 +31243,9 @@ "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==" }, "deepsignal": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/deepsignal/-/deepsignal-1.3.0.tgz", - "integrity": "sha512-tMh3g3F7Ka6gKALqu7uOzi/3Xm00mGWgWR3hp1GUzGGnTz2J926ime5aOe1haz233v4encyjTkZESr5R6hr8oQ==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/deepsignal/-/deepsignal-1.3.3.tgz", + "integrity": "sha512-4D5p2wp/4bRGfAPllwYCufPPAOxeD5milmfm/F4paKVoZOAjRVB5F+bs/wOJWWXsL8vsEcPf1vw8S/FT45k/wA==", "requires": { "@preact/signals": "^1.0.0", "@preact/signals-core": "^1.0.0", @@ -43553,11 +43556,6 @@ "picomatch": "^2.3.1" } }, - "micromodal": { - "version": "0.4.10", - "resolved": "https://registry.npmjs.org/micromodal/-/micromodal-0.4.10.tgz", - "integrity": "sha512-BUrEnzMPFBwK8nOE4xUDYHLrlGlLULQVjpja99tpJQPSUEWgw3kTLp1n1qv0HmKU29AiHE7Y7sMLiRziDK4ghQ==" - }, "miller-rabin": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", @@ -46495,7 +46493,7 @@ "optionator": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "integrity": "sha512-oCOQ8AIC2ciLy/sE2ehafRBleBgDLvzGhBRRev87sP7ovnbvQfqpc3XFI0DhHey2OfVoNV91W+GPC6B3540/5Q==", "dev": true, "requires": { "deep-is": "~0.1.3", diff --git a/packages/block-library/package.json b/packages/block-library/package.json index 213d6690f7afe..2c33e22d0e0fb 100644 --- a/packages/block-library/package.json +++ b/packages/block-library/package.json @@ -31,7 +31,6 @@ ], "dependencies": { "@babel/runtime": "^7.16.0", - "@preact/signals": "^1.1.3", "@wordpress/a11y": "file:../a11y", "@wordpress/api-fetch": "file:../api-fetch", "@wordpress/autop": "file:../autop", @@ -65,13 +64,10 @@ "change-case": "^4.1.2", "classnames": "^2.3.1", "colord": "^2.7.0", - "deepsignal": "^1.3.0", "escape-html": "^1.0.3", "fast-average-color": "^9.1.1", "fast-deep-equal": "^3.1.3", "memize": "^2.1.0", - "micromodal": "^0.4.10", - "preact": "^10.13.2", "remove-accents": "^0.4.2", "uuid": "^8.3.0" }, diff --git a/packages/block-library/src/navigation/index.php b/packages/block-library/src/navigation/index.php index e86561e8f4dbd..d4614ecbd7c4f 100644 --- a/packages/block-library/src/navigation/index.php +++ b/packages/block-library/src/navigation/index.php @@ -103,7 +103,7 @@ function block_core_navigation_add_directives_to_submenu( $w, $block_attributes ) ) { // Add directives to the parent `
  • `. $w->set_attribute( 'data-wp-interactive', true ); - $w->set_attribute( 'data-wp-context', '{ "core": { "navigation": { "isMenuOpen": { "click": false, "hover": false }, "overlay": false } } }' ); + $w->set_attribute( 'data-wp-context', '{ "core": { "navigation": { "submenuOpenedBy": {}, "type": "submenu" } } }' ); $w->set_attribute( 'data-wp-effect', 'effects.core.navigation.initMenu' ); $w->set_attribute( 'data-wp-on--focusout', 'actions.core.navigation.handleMenuFocusout' ); $w->set_attribute( 'data-wp-on--keydown', 'actions.core.navigation.handleMenuKeydown' ); @@ -711,7 +711,7 @@ function render_block_core_navigation( $attributes, $content, $block ) { if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN && $should_load_view_script ) { $nav_element_directives = ' data-wp-interactive - data-wp-context=\'{ "core": { "navigation": { "isMenuOpen": { "click": false, "hover": false }, "overlay": true, "roleAttribute": "" } } }\' + data-wp-context=\'{ "core": { "navigation": { "overlayOpenedBy": {}, "type": "overlay", "roleAttribute": "" } } }\' '; $open_button_directives = ' data-wp-on--click="actions.core.navigation.openMenuOnClick" @@ -736,11 +736,11 @@ function render_block_core_navigation( $attributes, $content, $block ) { } $responsive_container_markup = sprintf( - ' + '
    -
    +
    - +
    %2$s
    diff --git a/packages/block-library/src/navigation/view.js b/packages/block-library/src/navigation/view.js index c9e0a78d6a2a3..cbcd60168393f 100644 --- a/packages/block-library/src/navigation/view.js +++ b/packages/block-library/src/navigation/view.js @@ -1,35 +1,33 @@ /** * WordPress dependencies */ -import { store } from '@wordpress/interactivity'; +import { store as wpStore } from '@wordpress/interactivity'; const focusableSelectors = [ 'a[href]', - 'area[href]', 'input:not([disabled]):not([type="hidden"]):not([aria-hidden])', 'select:not([disabled]):not([aria-hidden])', 'textarea:not([disabled]):not([aria-hidden])', 'button:not([disabled]):not([aria-hidden])', - 'iframe', - 'object', - 'embed', '[contenteditable]', '[tabindex]:not([tabindex^="-"])', ]; -const openMenu = ( { context, ref }, menuOpenedOn ) => { - context.core.navigation.isMenuOpen[ menuOpenedOn ] = true; +const openMenu = ( store, menuOpenedOn ) => { + const { context, ref, selectors } = store; + selectors.core.navigation.menuOpenBy( store )[ menuOpenedOn ] = true; context.core.navigation.previousFocus = ref; - if ( context.core.navigation.overlay ) { + if ( context.core.navigation.type === 'overlay' ) { // Add a `has-modal-open` class to the root. document.documentElement.classList.add( 'has-modal-open' ); } }; -const closeMenu = ( { context, selectors }, menuClosedOn ) => { - context.core.navigation.isMenuOpen[ menuClosedOn ] = false; +const closeMenu = ( store, menuClosedOn ) => { + const { context, selectors } = store; + selectors.core.navigation.menuOpenBy( store )[ menuClosedOn ] = false; // Check if the menu is still open or not. - if ( ! selectors.core.navigation.isMenuOpen( { context } ) ) { + if ( ! selectors.core.navigation.isMenuOpen( store ) ) { if ( context.core.navigation.modal?.contains( window.document.activeElement @@ -39,18 +37,19 @@ const closeMenu = ( { context, selectors }, menuClosedOn ) => { } context.core.navigation.modal = null; context.core.navigation.previousFocus = null; - if ( context.core.navigation.overlay ) { + if ( context.core.navigation.type === 'overlay' ) { document.documentElement.classList.remove( 'has-modal-open' ); } } }; -store( { +wpStore( { effects: { core: { navigation: { - initMenu: ( { context, selectors, ref } ) => { - if ( selectors.core.navigation.isMenuOpen( { context } ) ) { + initMenu: ( store ) => { + const { context, selectors, ref } = store; + if ( selectors.core.navigation.isMenuOpen( store ) ) { const focusableElements = ref.querySelectorAll( focusableSelectors ); context.core.navigation.modal = ref; @@ -60,8 +59,9 @@ store( { focusableElements[ focusableElements.length - 1 ]; } }, - focusFirstElement: ( { context, selectors, ref } ) => { - if ( selectors.core.navigation.isMenuOpen( { context } ) ) { + focusFirstElement: ( store ) => { + const { selectors, ref } = store; + if ( selectors.core.navigation.isMenuOpen( store ) ) { ref.querySelector( '.wp-block-navigation-item > *:first-child' ).focus(); @@ -73,60 +73,77 @@ store( { selectors: { core: { navigation: { - roleAttribute: ( { context, selectors } ) => - context.core.navigation.overlay && - selectors.core.navigation.isMenuOpen( { context } ) + roleAttribute: ( store ) => { + const { context, selectors } = store; + return context.core.navigation.type === 'overlay' && + selectors.core.navigation.isMenuOpen( store ) ? 'dialog' - : '', + : ''; + }, isMenuOpen: ( { context } ) => - // The menu is opened if either `click` or `hover` is true. - Object.values( context.core.navigation.isMenuOpen ).filter( - Boolean - ).length > 0, + // The menu is opened if either `click`, `hover` or `focus` is true. + Object.values( + context.core.navigation[ + context.core.navigation.type === 'overlay' + ? 'overlayOpenedBy' + : 'submenuOpenedBy' + ] + ).filter( Boolean ).length > 0, + menuOpenBy: ( { context } ) => + context.core.navigation[ + context.core.navigation.type === 'overlay' + ? 'overlayOpenedBy' + : 'submenuOpenedBy' + ], }, }, }, actions: { core: { navigation: { - openMenuOnHover( args ) { - openMenu( args, 'hover' ); + openMenuOnHover( store ) { + const { navigation } = store.context.core; + if ( + navigation.type === 'submenu' && + // Only open on hover if the overlay is closed. + Object.values( + navigation.overlayOpenedBy || {} + ).filter( Boolean ).length === 0 + ) + openMenu( store, 'hover' ); }, - closeMenuOnHover( args ) { - closeMenu( args, 'hover' ); + closeMenuOnHover( store ) { + closeMenu( store, 'hover' ); }, - openMenuOnClick( args ) { - openMenu( args, 'click' ); + openMenuOnClick( store ) { + openMenu( store, 'click' ); }, - closeMenuOnClick( args ) { - closeMenu( args, 'click' ); + closeMenuOnClick( store ) { + closeMenu( store, 'click' ); }, - toggleMenuOnClick: ( args ) => { - const { context } = args; - if ( context.core.navigation.isMenuOpen.click ) { - closeMenu( args, 'click' ); + toggleMenuOnClick: ( store ) => { + const { selectors } = store; + if ( selectors.core.navigation.menuOpenBy( store ).click ) { + closeMenu( store, 'click' ); } else { - openMenu( args, 'click' ); + openMenu( store, 'click' ); } }, - handleMenuKeydown: ( args ) => { - const { context, event } = args; - if ( context.core.navigation.isMenuOpen.click ) { - // If Escape close the menu - if ( - event?.key === 'Escape' || - event?.keyCode === 27 - ) { - closeMenu( args, 'click' ); + handleMenuKeydown: ( store ) => { + const { context, selectors, event } = store; + if ( selectors.core.navigation.menuOpenBy( store ).click ) { + // If Escape close the menu. + if ( event?.key === 'Escape' ) { + closeMenu( store, 'click' ); return; } - // Trap focus if it is an overlay (main menu) + // Trap focus if it is an overlay (main menu). if ( - context.core.navigation.overlay && - ( event.key === 'Tab' || event.keyCode === 9 ) + context.core.navigation.type === 'overlay' && + event.key === 'Tab' ) { - // If shift + tab it change the direction + // If shift + tab it change the direction. if ( event.shiftKey && window.document.activeElement === @@ -146,21 +163,21 @@ store( { } } }, - handleMenuFocusout: ( args ) => { - const { context, event } = args; + handleMenuFocusout: ( store ) => { + const { context, selectors, event } = store; // If focus is outside modal, and in the document, close menu // event.target === The element losing focus // event.relatedTarget === The element receiving focus (if any) // When focusout is outsite the document, - // `window.document.activeElement` doesn't change + // `window.document.activeElement` doesn't change. if ( - context.core.navigation.isMenuOpen.click && + selectors.core.navigation.menuOpenBy( store ).click && ! context.core.navigation.modal?.contains( event.relatedTarget ) && event.target !== window.document.activeElement ) { - closeMenu( args, 'click' ); + closeMenu( store, 'click' ); } }, }, diff --git a/packages/interactivity/package.json b/packages/interactivity/package.json index 15f6c09fe302f..25e49e3ff6310 100644 --- a/packages/interactivity/package.json +++ b/packages/interactivity/package.json @@ -26,7 +26,7 @@ "react-native": "src/index", "dependencies": { "@preact/signals": "^1.1.3", - "deepsignal": "^1.3.0", + "deepsignal": "^1.3.3", "preact": "^10.13.2" }, "publishConfig": { From e244388d8669618b76c966cc33d48df9156c2db6 Mon Sep 17 00:00:00 2001 From: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Date: Wed, 5 Jul 2023 20:41:45 +0900 Subject: [PATCH 044/146] Style Book: Show tabs and make blocks clickable when entering edit mode from the Styles menu (#52222) * Style Book: Show tabs and make blocks clickable when entering edit mode from the Styles menu * Move lines --- .../index.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js b/packages/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js index 4d98b235ac81c..1e9200bf0af01 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js +++ b/packages/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js @@ -171,13 +171,15 @@ export default function SidebarNavigationScreenGlobalStyles() { const { createNotice } = useDispatch( noticesStore ); const { set: setPreference } = useDispatch( preferencesStore ); const { get: getPrefference } = useSelect( preferencesStore ); - - const isStyleBookOpened = useSelect( - ( select ) => - 'style-book' === - unlock( select( editSiteStore ) ).getEditorCanvasContainerView(), - [] - ); + const { isViewMode, isStyleBookOpened } = useSelect( ( select ) => { + const { getCanvasMode, getEditorCanvasContainerView } = unlock( + select( editSiteStore ) + ); + return { + isViewMode: 'view' === getCanvasMode(), + isStyleBookOpened: 'style-book' === getEditorCanvasContainerView(), + }; + }, [] ); const turnOffDistractionFreeMode = useCallback( () => { const isDistractionFree = getPrefference( @@ -261,7 +263,7 @@ export default function SidebarNavigationScreenGlobalStyles() { } /> - { isStyleBookOpened && ! isMobileViewport && ( + { isStyleBookOpened && ! isMobileViewport && isViewMode && ( false } From d3c8dd8ae53cf6485c58b4139c46be1fd6c5a45c Mon Sep 17 00:00:00 2001 From: Andrei Draganescu Date: Wed, 5 Jul 2023 16:38:16 +0300 Subject: [PATCH 045/146] Respect custom aspect ratio (#52286) * add image width and height via css inline style, update width and height attrs to be string * keep width and height as attributes too, keep the attributes as numbers * updates image fixtures --- .../block-library/src/image/deprecated.js | 99 ++++++++++++++++++- packages/block-library/src/image/save.js | 2 + ...e__deprecated-v1-add-responsive-class.json | 4 +- ...e__deprecated-v2-add-is-resized-class.json | 2 +- ...ed-v2-add-is-resized-class.serialized.html | 2 +- ...cated-v3-add-align-wrapper.serialized.html | 2 +- ...ed-v4-remove-align-wrapper.serialized.html | 2 +- 7 files changed, 105 insertions(+), 8 deletions(-) diff --git a/packages/block-library/src/image/deprecated.js b/packages/block-library/src/image/deprecated.js index 34b4573c1002c..bdfdca6ee3c4d 100644 --- a/packages/block-library/src/image/deprecated.js +++ b/packages/block-library/src/image/deprecated.js @@ -6,7 +6,11 @@ import classnames from 'classnames'; /** * WordPress dependencies */ -import { RichText, useBlockProps } from '@wordpress/block-editor'; +import { + RichText, + useBlockProps, + __experimentalGetElementClassName as getBorderClassesAndStyles, +} from '@wordpress/block-editor'; /** * Deprecation for adding the `wp-image-${id}` class to the image block for @@ -539,4 +543,95 @@ const v5 = { }, }; -export default [ v5, v4, v3, v2, v1 ]; +/** + * Deprecation for adding width and height as style rules on the inner img. + * It also updates the widht and height attributes to be strings instead of numbers. + * + * @see https://github.com/WordPress/gutenberg/pull/31366 + */ +const v6 = { + save( { attributes } ) { + const { + url, + alt, + caption, + align, + href, + rel, + linkClass, + width, + height, + aspectRatio, + scale, + id, + linkTarget, + sizeSlug, + title, + } = attributes; + + const newRel = ! rel ? undefined : rel; + const borderProps = getBorderClassesAndStyles( attributes ); + + const classes = classnames( { + [ `align${ align }` ]: align, + [ `size-${ sizeSlug }` ]: sizeSlug, + 'is-resized': width || height, + 'has-custom-border': + !! borderProps.className || + ( borderProps.style && + Object.keys( borderProps.style ).length > 0 ), + } ); + + const imageClasses = classnames( borderProps.className, { + [ `wp-image-${ id }` ]: !! id, + } ); + + const image = ( + { + ); + + const figure = ( + <> + { href ? ( + + { image } + + ) : ( + image + ) } + { ! RichText.isEmpty( caption ) && ( + + ) } + + ); + + return ( +
    + { figure } +
    + ); + }, +}; + +export default [ v6, v5, v4, v3, v2, v1 ]; diff --git a/packages/block-library/src/image/save.js b/packages/block-library/src/image/save.js index 95e8803dd6785..6fa8c6b2342f3 100644 --- a/packages/block-library/src/image/save.js +++ b/packages/block-library/src/image/save.js @@ -58,6 +58,8 @@ export default function save( { attributes } ) { ...borderProps.style, aspectRatio, objectFit: scale, + width, + height, } } width={ width } height={ height } diff --git a/test/integration/fixtures/blocks/core__image__deprecated-v1-add-responsive-class.json b/test/integration/fixtures/blocks/core__image__deprecated-v1-add-responsive-class.json index 24be125d856ab..6b2f1a80f52c6 100644 --- a/test/integration/fixtures/blocks/core__image__deprecated-v1-add-responsive-class.json +++ b/test/integration/fixtures/blocks/core__image__deprecated-v1-add-responsive-class.json @@ -3,10 +3,10 @@ "name": "core/image", "isValid": true, "attributes": { - "align": "left", "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==", "alt": "", - "caption": [] + "caption": [], + "align": "left" }, "innerBlocks": [] } diff --git a/test/integration/fixtures/blocks/core__image__deprecated-v2-add-is-resized-class.json b/test/integration/fixtures/blocks/core__image__deprecated-v2-add-is-resized-class.json index 8d1d58f3e6fd3..a0ad3b755587b 100644 --- a/test/integration/fixtures/blocks/core__image__deprecated-v2-add-is-resized-class.json +++ b/test/integration/fixtures/blocks/core__image__deprecated-v2-add-is-resized-class.json @@ -3,10 +3,10 @@ "name": "core/image", "isValid": true, "attributes": { - "align": "left", "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==", "alt": "", "caption": [], + "align": "left", "width": 100, "height": 100 }, diff --git a/test/integration/fixtures/blocks/core__image__deprecated-v2-add-is-resized-class.serialized.html b/test/integration/fixtures/blocks/core__image__deprecated-v2-add-is-resized-class.serialized.html index eb06f24974863..7ce56e11fa75e 100644 --- a/test/integration/fixtures/blocks/core__image__deprecated-v2-add-is-resized-class.serialized.html +++ b/test/integration/fixtures/blocks/core__image__deprecated-v2-add-is-resized-class.serialized.html @@ -1,3 +1,3 @@ -
    +
    diff --git a/test/integration/fixtures/blocks/core__image__deprecated-v3-add-align-wrapper.serialized.html b/test/integration/fixtures/blocks/core__image__deprecated-v3-add-align-wrapper.serialized.html index eb06f24974863..7ce56e11fa75e 100644 --- a/test/integration/fixtures/blocks/core__image__deprecated-v3-add-align-wrapper.serialized.html +++ b/test/integration/fixtures/blocks/core__image__deprecated-v3-add-align-wrapper.serialized.html @@ -1,3 +1,3 @@ -
    +
    diff --git a/test/integration/fixtures/blocks/core__image__deprecated-v4-remove-align-wrapper.serialized.html b/test/integration/fixtures/blocks/core__image__deprecated-v4-remove-align-wrapper.serialized.html index 5ba1eb754e83f..cfdc52e3cbb6e 100644 --- a/test/integration/fixtures/blocks/core__image__deprecated-v4-remove-align-wrapper.serialized.html +++ b/test/integration/fixtures/blocks/core__image__deprecated-v4-remove-align-wrapper.serialized.html @@ -1,3 +1,3 @@ -
    +
    From 38247cec17ea8d2a860c2016cb857bafda474006 Mon Sep 17 00:00:00 2001 From: Andrei Draganescu Date: Wed, 5 Jul 2023 16:44:15 +0300 Subject: [PATCH 046/146] Update fixed block toolbar (#52123) * update the icons for expanding and collapsing the fixed block toolbar * hide the tools selector item in document tools for fixed toolbar preference * reveal undo, redo and list view buttons * tweaks for show icon labels and hide zoom out for top toolbar option * improve the responsiveness of the fixed block toolbar * remove the overflow rule - bad experiment * update top toolbar test with the new label for buttons * update the toolbar tests to account for moving the collapse button --- .../block-tools/block-contextual-toolbar.js | 15 +-- .../src/components/block-tools/style.scss | 95 ++++++++++++++----- .../components/header/header-toolbar/index.js | 5 +- .../document-actions/style.scss | 8 ++ .../src/components/header-edit-mode/index.js | 26 +++-- .../src/components/layout/style.scss | 11 --- .../various/shortcut-focus-toolbar.spec.js | 22 +---- 7 files changed, 107 insertions(+), 75 deletions(-) diff --git a/packages/block-editor/src/components/block-tools/block-contextual-toolbar.js b/packages/block-editor/src/components/block-tools/block-contextual-toolbar.js index 743a07b4bb881..f0fc28c7fbbd2 100644 --- a/packages/block-editor/src/components/block-tools/block-contextual-toolbar.js +++ b/packages/block-editor/src/components/block-tools/block-contextual-toolbar.js @@ -15,7 +15,7 @@ import { ToolbarButton, ToolbarGroup, } from '@wordpress/components'; -import { levelUp } from '@wordpress/icons'; +import { next, previous } from '@wordpress/icons'; import { useViewportMatch } from '@wordpress/compose'; /** @@ -24,7 +24,6 @@ import { useViewportMatch } from '@wordpress/compose'; import NavigableToolbar from '../navigable-toolbar'; import BlockToolbar from '../block-toolbar'; import { store as blockEditorStore } from '../../store'; -import BlockIcon from '../block-icon'; import { unlock } from '../../lock-unlock'; function BlockContextualToolbar( { focusOnMount, isFixed, ...props } ) { @@ -94,6 +93,7 @@ function BlockContextualToolbar( { focusOnMount, isFixed, ...props } ) { aria-label={ __( 'Block tools' ) } { ...props } > + { ! isCollapsed && } { isFixed && isLargeViewport && blockType && ( - ) : ( - levelUp - ) - } + icon={ isCollapsed ? next : previous } onClick={ () => { setIsCollapsed( ( collapsed ) => ! collapsed ); toolbarButtonRef.current.focus(); @@ -119,12 +113,11 @@ function BlockContextualToolbar( { focusOnMount, isFixed, ...props } ) { label={ isCollapsed ? __( 'Show block tools' ) - : __( 'Show document tools' ) + : __( 'Hide block tools' ) } /> ) } - { ! isCollapsed && } ); } diff --git a/packages/block-editor/src/components/block-tools/style.scss b/packages/block-editor/src/components/block-tools/style.scss index c55b8e651c2e7..07e400344bfe1 100644 --- a/packages/block-editor/src/components/block-tools/style.scss +++ b/packages/block-editor/src/components/block-tools/style.scss @@ -131,11 +131,11 @@ @include break-medium() { &.is-fixed { - // leave room for block inserter - margin-left: $grid-unit-80; + // leave room for block inserter, undo and redo, list view + margin-left: $grid-unit-80 * 3 - 2 * $grid-unit + $grid-unit-05; // position on top of interface header position: fixed; - top: $admin-bar-height + $grid-unit; + top: $admin-bar-height + $grid-unit - $border-width; // Don't fill up when empty min-height: initial; // remove the border @@ -145,32 +145,63 @@ &.is-collapsed { width: initial; - margin-left: $grid-unit-80 * 3 + $grid-unit-30; } .is-fullscreen-mode & { - // leave room for block inserter - margin-left: $grid-unit-80 + $grid-unit-70; - top: $grid-unit; + // leave room for block inserter, undo and redo, list view + // and some margin left + margin-left: $grid-unit-80 * 4 - 2 * $grid-unit; + top: $grid-unit - $border-width; &.is-collapsed { width: initial; - margin-left: $grid-unit-80 * 4 + $grid-unit-30; + } + } + + & > .block-editor-block-toolbar.is-showing-movers { + flex-grow: initial; + width: initial; + + // Add a border as separator in the block toolbar. + &::before { + content: ""; + width: $border-width; + height: 3 * $grid-unit; + margin-top: $grid-unit + $grid-unit-05; + margin-right: 0; + background-color: $gray-300; + position: relative; + left: math.div(-$grid-unit-05, 2); + top: -1px; } } & > .block-editor-block-toolbar__group-collapse-fixed-toolbar { border: none; + .show-icon-labels & { + .components-button.has-icon { + // Hide the button icons when labels are set to display... + svg { + display: none; + } + // ... and display labels. + &::after { + content: attr(aria-label); + font-size: $helptext-font-size; + } + } + } + // Add a border as separator in the block toolbar. - &::after { + &::before { content: ""; width: $border-width; - height: 24px; + height: 3 * $grid-unit; margin-top: $grid-unit + $grid-unit-05; - margin-bottom: $grid-unit + $grid-unit-05; + margin-right: $grid-unit-10; background-color: $gray-300; - position: absolute; - left: 44px; + position: relative; + left: 0; top: -1px; } } @@ -178,6 +209,21 @@ & > .block-editor-block-toolbar__group-expand-fixed-toolbar { border: none; + .show-icon-labels & { + width: $grid-unit-80 * 4; + .components-button.has-icon { + // Hide the button icons when labels are set to display... + svg { + display: none; + } + // ... and display labels. + &::after { + content: attr(aria-label); + font-size: $helptext-font-size; + } + } + } + // Add a border as separator in the block toolbar. &::before { content: ""; @@ -186,27 +232,20 @@ margin-bottom: $grid-unit + $grid-unit-05; background-color: $gray-300; position: relative; - left: -12px; //the padding of buttons - height: 24px; + left: -8px; + height: 3 * $grid-unit; + top: -1px; } } .show-icon-labels & { - margin-left: $grid-unit-80; - - &.is-collapsed { - margin-left: $grid-unit-80 * 6; - } + margin-left: $grid-unit-80 + 2 * $grid-unit; // inserter and margin ; .is-fullscreen-mode & { - margin-left: $grid-unit-80 + $grid-unit-80; - &.is-collapsed { - margin-left: $grid-unit-80 * 7; - } + margin-left: $grid-unit * 18; // site hub, inserter and margin } - .block-editor-block-parent-selector .block-editor-block-parent-selector__button::after { left: 0; } @@ -234,12 +273,14 @@ } &.is-fixed .block-editor-block-parent-selector { + .block-editor-block-parent-selector__button { position: relative; top: -1px; border: 0; padding-right: 6px; padding-left: 6px; + &::after { content: "\00B7"; font-size: 16px; @@ -281,7 +322,9 @@ // for the block inserter the publish button @include break-large() { &.is-fixed { - width: initial; + // the combined with of the tools at the right of the header and the margin left + // of the toolbar which includes four buttons + width: calc(100% - 240px - #{4 * $grid-unit-80}); } } diff --git a/packages/edit-post/src/components/header/header-toolbar/index.js b/packages/edit-post/src/components/header/header-toolbar/index.js index 391e5473999bb..8f9e413707d50 100644 --- a/packages/edit-post/src/components/header/header-toolbar/index.js +++ b/packages/edit-post/src/components/header/header-toolbar/index.js @@ -19,6 +19,7 @@ import { Button, ToolbarItem } from '@wordpress/components'; import { listView, plus } from '@wordpress/icons'; import { useRef, useCallback } from '@wordpress/element'; import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts'; +import { store as preferencesStore } from '@wordpress/preferences'; /** * Internal dependencies @@ -36,6 +37,8 @@ function HeaderToolbar() { const inserterButton = useRef(); const { setIsInserterOpened, setIsListViewOpened } = useDispatch( editPostStore ); + const { get: getPreference } = useSelect( preferencesStore ); + const hasFixedToolbar = getPreference( 'core/edit-post', 'fixedToolbar' ); const { isInserterEnabled, isInserterOpened, @@ -147,7 +150,7 @@ function HeaderToolbar() { /> { ( isWideViewport || ! showIconLabels ) && ( <> - { isLargeViewport && ( + { isLargeViewport && ! hasFixedToolbar && ( - + { ! hasFixedToolbar && ( + + ) } ) } { isZoomedOutViewExperimentEnabled && - ! isDistractionFree && ( + ! isDistractionFree && + ! hasFixedToolbar && ( { await editor.insertBlock( { name: 'core/paragraph' } ); await toolbarUtils.moveToToolbarShortcut(); await expect( - toolbarUtils.blockToolbarShowDocumentButton + toolbarUtils.blockToolbarParagraphButton ).toBeFocused(); - await expect( - toolbarUtils.documentToolbarTooltip - ).not.toBeVisible(); // Test: Focus the block toolbar from paragraph block with content await editor.insertBlock( { name: 'core/paragraph' } ); @@ -113,11 +110,8 @@ test.describe( 'Focus toolbar shortcut (alt + F10)', () => { ); await toolbarUtils.moveToToolbarShortcut(); await expect( - toolbarUtils.blockToolbarShowDocumentButton + toolbarUtils.blockToolbarParagraphButton ).toBeFocused(); - await expect( - toolbarUtils.documentToolbarTooltip - ).not.toBeVisible(); } ); test( 'Focuses the correct toolbar in select mode', async ( { @@ -135,11 +129,8 @@ test.describe( 'Focus toolbar shortcut (alt + F10)', () => { await toolbarUtils.useSelectMode(); await toolbarUtils.moveToToolbarShortcut(); await expect( - toolbarUtils.blockToolbarShowDocumentButton + toolbarUtils.blockToolbarParagraphButton ).toBeFocused(); - await expect( - toolbarUtils.documentToolbarTooltip - ).not.toBeVisible(); // Test: Focus the block toolbar from paragraph in select mode await editor.insertBlock( { name: 'core/paragraph' } ); @@ -149,11 +140,8 @@ test.describe( 'Focus toolbar shortcut (alt + F10)', () => { await toolbarUtils.useSelectMode(); await toolbarUtils.moveToToolbarShortcut(); await expect( - toolbarUtils.blockToolbarShowDocumentButton + toolbarUtils.blockToolbarParagraphButton ).toBeFocused(); - await expect( - toolbarUtils.documentToolbarTooltip - ).not.toBeVisible(); } ); } ); @@ -254,7 +242,7 @@ class ToolbarUtils { exact: true, } ); this.blockToolbarShowDocumentButton = this.page.getByRole( 'button', { - name: 'Show document tools', + name: 'Hide block tools', exact: true, } ); } From 60a6c2df2794cc90f950e8a05cd266fca33fc56f Mon Sep 17 00:00:00 2001 From: James Koster Date: Wed, 5 Jul 2023 14:58:46 +0100 Subject: [PATCH 047/146] wrap buttons (#52249) --- .../edit-post/src/components/sidebar/post-status/index.js | 1 + .../edit-post/src/components/sidebar/post-trash/index.js | 5 +---- .../src/components/post-switch-to-draft-button/index.js | 7 +++---- packages/editor/src/components/post-trash/style.scss | 4 ++-- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/packages/edit-post/src/components/sidebar/post-status/index.js b/packages/edit-post/src/components/sidebar/post-status/index.js index 5cc9b70bf9ac3..d0633f26cf254 100644 --- a/packages/edit-post/src/components/sidebar/post-status/index.js +++ b/packages/edit-post/src/components/sidebar/post-status/index.js @@ -58,6 +58,7 @@ function PostStatus( { isOpened, onTogglePanel } ) { marginTop: '16px', } } spacing={ 4 } + wrap > diff --git a/packages/edit-post/src/components/sidebar/post-trash/index.js b/packages/edit-post/src/components/sidebar/post-trash/index.js index 885be537952c0..d77c7a6d82988 100644 --- a/packages/edit-post/src/components/sidebar/post-trash/index.js +++ b/packages/edit-post/src/components/sidebar/post-trash/index.js @@ -2,14 +2,11 @@ * WordPress dependencies */ import { PostTrash as PostTrashLink, PostTrashCheck } from '@wordpress/editor'; -import { FlexItem } from '@wordpress/components'; export default function PostTrash() { return ( - - - + ); } diff --git a/packages/editor/src/components/post-switch-to-draft-button/index.js b/packages/editor/src/components/post-switch-to-draft-button/index.js index 6521200fde590..1fb04931bfce1 100644 --- a/packages/editor/src/components/post-switch-to-draft-button/index.js +++ b/packages/editor/src/components/post-switch-to-draft-button/index.js @@ -3,7 +3,6 @@ */ import { Button, - FlexItem, __experimentalConfirmDialog as ConfirmDialog, } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; @@ -41,7 +40,7 @@ function PostSwitchToDraftButton( { }; return ( - + <> @@ -60,7 +59,7 @@ function PostSwitchToDraftButton( { > { alertMessage } - + ); } diff --git a/packages/editor/src/components/post-trash/style.scss b/packages/editor/src/components/post-trash/style.scss index f24a6eb2743dd..e47981314d5f2 100644 --- a/packages/editor/src/components/post-trash/style.scss +++ b/packages/editor/src/components/post-trash/style.scss @@ -1,4 +1,4 @@ .editor-post-trash.components-button { - width: 100%; - display: block; + flex-grow: 1; + justify-content: center; } From 966d20feacd54faaf9c2ca4f949a4ed9a3dc0f8d Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Wed, 5 Jul 2023 15:31:22 +0100 Subject: [PATCH 048/146] Update the behavior of the cached undo/redo stack (#51644) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ella van Durpe --- docs/explanations/architecture/entities.md | 12 +++-- packages/core-data/src/actions.js | 4 +- packages/core-data/src/entity-provider.js | 62 ++++++++++++---------- packages/core-data/src/reducer.js | 8 +-- packages/core-data/src/test/reducer.js | 23 +++----- packages/data/src/registry.js | 6 +++ packages/data/src/test/registry.js | 21 ++++++++ 7 files changed, 83 insertions(+), 53 deletions(-) diff --git a/docs/explanations/architecture/entities.md b/docs/explanations/architecture/entities.md index 13e6eaca08b5a..2a3af6288d27f 100644 --- a/docs/explanations/architecture/entities.md +++ b/docs/explanations/architecture/entities.md @@ -56,8 +56,14 @@ For example, let's say a user edits the title of a post, followed by a modificat The store also keep tracks of a "pointer" to the current "undo/redo" step. By default, the pointer always points to the last item in the stack. This pointer is updated when the user performs an undo or redo operation. -### Transient changes +### Cached changes -The undo/redo core behavior also supports what we call "transient modifications". These are modifications that are not stored in the undo/redo stack right away. For instance, when a user starts typing in a text field, the value of the field is modified in the store, but this modification is not stored in the undo/redo stack until after the user moves to the next word or after a few milliseconds. This is done to avoid creating a new undo/redo step for each character typed by the user. +The undo/redo core behavior also supports what we call "cached modifications". These are modifications that are not stored in the undo/redo stack right away. For instance, when a user starts typing in a text field, the value of the field is modified in the store, but this modification is not stored in the undo/redo stack until after the user moves to the next word or after a few milliseconds. This is done to avoid creating a new undo/redo step for each character typed by the user. -So by default, `core-data` store considers all modifications to properties that are marked as "transient" (like the `blocks` property in the post entity) as transient modifications. It keeps these modifications outside the undo/redo stack in what is called a "cache" of modifications and these modifications are only stored in the undo/redo stack when we explicitely call `__unstableCreateUndoLevel` or when the next non-transient modification is performed. +Cached changes are kept outside the undo/redo stack in what is called a "cache" of modifications and these modifications are only stored in the undo/redo stack when we explicitely call `__unstableCreateUndoLevel` or when the next modification is not a cached one. + +By default all calls to `editEntityRecord` are considered "non-cached" unless the `isCached` option is passed as true. Example: + +```js +wp.data.dispatch( 'core' ).editEntityRecord( 'postType', 'post', 1, { title: 'Hello World' }, { isCached: true } ); +``` diff --git a/packages/core-data/src/actions.js b/packages/core-data/src/actions.js index cfab95aae9f8f..2170e3ffcb4ae 100644 --- a/packages/core-data/src/actions.js +++ b/packages/core-data/src/actions.js @@ -357,7 +357,7 @@ export const editEntityRecord = `The entity being edited (${ kind }, ${ name }) does not have a loaded config.` ); } - const { transientEdits = {}, mergedEdits = {} } = entityConfig; + const { mergedEdits = {} } = entityConfig; const record = select.getRawEntityRecord( kind, name, recordId ); const editedRecord = select.getEditedEntityRecord( kind, @@ -382,7 +382,6 @@ export const editEntityRecord = : value; return acc; }, {} ), - transientEdits, }; dispatch( { type: 'EDIT_ENTITY_RECORD', @@ -395,6 +394,7 @@ export const editEntityRecord = acc[ key ] = editedRecord[ key ]; return acc; }, {} ), + isCached: options.isCached, }, }, } ); diff --git a/packages/core-data/src/entity-provider.js b/packages/core-data/src/entity-provider.js index 04bb4c21433e3..da048944f1498 100644 --- a/packages/core-data/src/entity-provider.js +++ b/packages/core-data/src/entity-provider.js @@ -7,7 +7,7 @@ import { useCallback, useEffect, } from '@wordpress/element'; -import { useSelect, useDispatch, useRegistry } from '@wordpress/data'; +import { useSelect, useDispatch } from '@wordpress/data'; import { parse, __unstableSerializeAndClean } from '@wordpress/blocks'; import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor'; @@ -154,17 +154,16 @@ export function useEntityProp( kind, name, prop, _id ) { * @return {[WPBlock[], Function, Function]} The block array and setters. */ export function useEntityBlockEditor( kind, name, { id: _id } = {} ) { - const [ meta, updateMeta ] = useEntityProp( kind, name, 'meta', _id ); - const registry = useRegistry(); const providerId = useEntityId( kind, name ); const id = _id ?? providerId; - const { content, blocks } = useSelect( + const { content, blocks, meta } = useSelect( ( select ) => { const { getEditedEntityRecord } = select( STORE_NAME ); const editedRecord = getEditedEntityRecord( kind, name, id ); return { blocks: editedRecord.blocks, content: editedRecord.content, + meta: editedRecord.meta, }; }, [ kind, name, id ] @@ -194,7 +193,7 @@ export function useEntityBlockEditor( kind, name, { id: _id } = {} ) { ( _blocks ) => { if ( ! meta ) return; // If meta.footnotes is empty, it means the meta is not registered. - if ( meta.footnotes === undefined ) return; + if ( meta.footnotes === undefined ) return {}; const { getRichTextValues } = unlock( blockEditorPrivateApis ); const _content = getRichTextValues( _blocks ).join( '' ) || ''; @@ -237,48 +236,57 @@ export function useEntityBlockEditor( kind, name, { id: _id } = {} ) { }, {} ), }; - updateMeta( { - ...meta, - footnotes: JSON.stringify( newFootnotes ), - } ); + return { + meta: { + ...meta, + footnotes: JSON.stringify( newFootnotes ), + }, + }; }, - [ meta, updateMeta ] + [ meta ] ); const onChange = useCallback( ( newBlocks, options ) => { - const { selection } = options; - const edits = { blocks: newBlocks, selection }; - - const noChange = blocks === edits.blocks; + const noChange = blocks === newBlocks; if ( noChange ) { return __unstableCreateUndoLevel( kind, name, id ); } + const { selection } = options; // We create a new function here on every persistent edit // to make sure the edit makes the post dirty and creates // a new undo level. - edits.content = ( { blocks: blocksForSerialization = [] } ) => - __unstableSerializeAndClean( blocksForSerialization ); + const edits = { + blocks: newBlocks, + selection, + content: ( { blocks: blocksForSerialization = [] } ) => + __unstableSerializeAndClean( blocksForSerialization ), + ...updateFootnotes( newBlocks ), + }; - registry.batch( () => { - updateFootnotes( edits.blocks ); - editEntityRecord( kind, name, id, edits ); - } ); + editEntityRecord( kind, name, id, edits, { isCached: false } ); }, - [ kind, name, id, blocks, updateFootnotes ] + [ + kind, + name, + id, + blocks, + updateFootnotes, + __unstableCreateUndoLevel, + editEntityRecord, + ] ); const onInput = useCallback( ( newBlocks, options ) => { const { selection } = options; - const edits = { blocks: newBlocks, selection }; - registry.batch( () => { - updateFootnotes( edits.blocks ); - editEntityRecord( kind, name, id, edits ); - } ); + const footnotesChanges = updateFootnotes( newBlocks ); + const edits = { blocks: newBlocks, selection, ...footnotesChanges }; + + editEntityRecord( kind, name, id, edits, { isCached: true } ); }, - [ kind, name, id, updateFootnotes ] + [ kind, name, id, updateFootnotes, editEntityRecord ] ); return [ blocks ?? EMPTY_ARRAY, onInput, onChange ]; diff --git a/packages/core-data/src/reducer.js b/packages/core-data/src/reducer.js index b7dd9d73df15a..20755dad4be8d 100644 --- a/packages/core-data/src/reducer.js +++ b/packages/core-data/src/reducer.js @@ -439,7 +439,7 @@ export const entities = ( state = {}, action ) => { * * @property {number} list The undo stack. * @property {number} offset Where in the undo stack we are. - * @property {Object} cache Cache of unpersisted transient edits. + * @property {Object} cache Cache of unpersisted edits. */ /** @typedef {Array & UndoStateMeta} UndoState */ @@ -543,10 +543,6 @@ export function undo( state = UNDO_INITIAL_STATE, action ) { return state; } - const isCachedChange = Object.keys( action.edits ).every( - ( key ) => action.transientEdits[ key ] - ); - const edits = Object.keys( action.edits ).map( ( key ) => { return { kind: action.kind, @@ -558,7 +554,7 @@ export function undo( state = UNDO_INITIAL_STATE, action ) { }; } ); - if ( isCachedChange ) { + if ( action.meta.undo.isCached ) { return { ...state, cache: edits.reduce( appendEditToStack, state.cache ), diff --git a/packages/core-data/src/test/reducer.js b/packages/core-data/src/test/reducer.js index 4f7d9b9c0d2ae..7fac52c33c4b3 100644 --- a/packages/core-data/src/test/reducer.js +++ b/packages/core-data/src/test/reducer.js @@ -155,19 +155,21 @@ describe( 'undo', () => { from, to, } ); - const createNextEditAction = ( edits, transientEdits = {} ) => { + const createNextEditAction = ( edits, isCached ) => { let action = { kind: 'someKind', name: 'someName', recordId: 'someRecordId', edits, - transientEdits, }; action = { type: 'EDIT_ENTITY_RECORD', ...action, meta: { - undo: { edits: lastValues }, + undo: { + isCached, + edits: lastValues, + }, }, }; lastValues = { ...lastValues, ...edits }; @@ -303,10 +305,7 @@ describe( 'undo', () => { it( 'handles flattened undos/redos', () => { undoState = createNextUndoState(); undoState = createNextUndoState( { value: 1 } ); - undoState = createNextUndoState( - { transientValue: 2 }, - { transientValue: true } - ); + undoState = createNextUndoState( { transientValue: 2 }, true ); undoState = createNextUndoState( { value: 3 } ); expectedUndoState.list.push( [ @@ -335,10 +334,7 @@ describe( 'undo', () => { // Check that transient edits are merged into the last // edits. - undoState = createNextUndoState( - { transientValue: 2 }, - { transientValue: true } - ); + undoState = createNextUndoState( { transientValue: 2 }, true ); undoState = createNextUndoState( 'isCreate' ); expectedUndoState.list[ expectedUndoState.list.length - 1 ].push( createExpectedDiff( 'transientValue', { from: undefined, to: 2 } ) @@ -359,10 +355,7 @@ describe( 'undo', () => { it( 'explicitly creates an undo level when undoing while there are pending transient edits', () => { undoState = createNextUndoState(); undoState = createNextUndoState( { value: 1 } ); - undoState = createNextUndoState( - { transientValue: 2 }, - { transientValue: true } - ); + undoState = createNextUndoState( { transientValue: 2 }, true ); undoState = createNextUndoState( 'isUndo' ); expectedUndoState.list.push( [ createExpectedDiff( 'value', { from: undefined, to: 1 } ), diff --git a/packages/data/src/registry.js b/packages/data/src/registry.js index d193a50cbc392..02a0b19136a3e 100644 --- a/packages/data/src/registry.js +++ b/packages/data/src/registry.js @@ -314,6 +314,12 @@ export function createRegistry( storeConfigs = {}, parent = null ) { } function batch( callback ) { + // If we're already batching, just call the callback. + if ( emitter.isPaused ) { + callback(); + return; + } + emitter.pause(); Object.values( stores ).forEach( ( store ) => store.emitter.pause() ); callback(); diff --git a/packages/data/src/test/registry.js b/packages/data/src/test/registry.js index b9288eae821d8..df9cb774dfc8c 100644 --- a/packages/data/src/test/registry.js +++ b/packages/data/src/test/registry.js @@ -734,6 +734,27 @@ describe( 'createRegistry', () => { unsubscribe(); expect( listener2 ).toHaveBeenCalledTimes( 1 ); } ); + + it( 'should support nested batches', () => { + const store = registry.registerStore( 'myAwesomeReducer', { + reducer: ( state = 0 ) => state + 1, + } ); + const listener = jest.fn(); + subscribeWithUnsubscribe( listener ); + + registry.batch( () => {} ); + expect( listener ).not.toHaveBeenCalled(); + + registry.batch( () => { + store.dispatch( { type: 'dummy' } ); + registry.batch( () => { + store.dispatch( { type: 'dummy' } ); + store.dispatch( { type: 'dummy' } ); + } ); + store.dispatch( { type: 'dummy' } ); + } ); + expect( listener ).toHaveBeenCalledTimes( 1 ); + } ); } ); describe( 'use', () => { From 454452eac2db6b8005640a4721f9544a25c52967 Mon Sep 17 00:00:00 2001 From: Marin Atanasov <8436925+tyxla@users.noreply.github.com> Date: Wed, 5 Jul 2023 17:37:04 +0300 Subject: [PATCH 049/146] Block Editor: Add README for PanelColorSettings component (#52327) --- .../components/panel-color-settings/README.md | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 packages/block-editor/src/components/panel-color-settings/README.md diff --git a/packages/block-editor/src/components/panel-color-settings/README.md b/packages/block-editor/src/components/panel-color-settings/README.md new file mode 100644 index 0000000000000..94b82eb3869b1 --- /dev/null +++ b/packages/block-editor/src/components/panel-color-settings/README.md @@ -0,0 +1,98 @@ +# PanelColorSettings + +`PanelColorSettings` is a React component that renders a UI for managing various color settings. +It is essentially a wrapper around the `PanelColorGradientSettings` component, but specifically disables the gradient features. + +## Usage + +```jsx +/** + * WordPress dependencies + */ +import { PanelColorSettings } from '@wordpress/block-editor'; +import { useState } from '@wordpress/element'; +import { __ } from '@wordpress/i18n'; + +// ... + +const MyPanelColorSettings = () => { + const [ textColor, setTextColor ] = useState( { color: '#000' } ); + const [ backgroundColor, setBackgroundColor ] = useState( { + color: '#fff', + } ); + const [ overlayTextColor, setOverlayTextColor ] = useState( { + color: '#000', + } ); + const [ overlayBackgroundColor, setOverlayBackgroundColor ] = useState( { + color: '#eee', + } ); + + return ( + + ); +}; + +/// ... + +; +``` + +## Props + +The component accepts the following props: + +### colorSettings + +A user-provided set of color settings. + +- Type: `Array` +- Required: No + +Colors settings are provided as an array of objects with the following schema: + +| Property | Description | Type | +| -------- | --------------------------------- | -------- | +| value | The current color of the setting | string | +| onChange | Callback on change of the setting | Function | +| label | Label of the setting | string | + +Additionally, the following `PanelColorGradientSettings` props are supported and directly passed down to the underlying `PanelColorGradientSettings` instance: + +- `className` - added to the underlying `ToolsPanel` instance. +- `colors` - array of colors to be used. +- `gradients` - not recommended to be used since `PanelColorSettings` resets it. +- `disableCustomColors` - whether addition of custom colors is enabled +- `disableCustomGradients` - not recommended to be used since `PanelColorSettings` sets it. +- `children` - displayed below the underlying `PanelColorGradientSettings` instance. +- `settings` - not recommended to be used, since `PanelColorSettings` builds it from the `colorSettings` prop. +- `title` - title of the underlying `ToolsPanel`. +- `showTitle` - whether to show the title of the `ToolsPanel`. +- `__experimentalIsRenderedInSidebar` +- `enableAlpha` - whether to enable setting opacity when specifying a color. + +Please refer to the `PanelColorGradientSettings` component for more information. From e6426ea60b99ae76f703baeb22c8add5cc7afbf4 Mon Sep 17 00:00:00 2001 From: Miguel Fonseca <150562+mcsf@users.noreply.github.com> Date: Wed, 5 Jul 2023 15:48:43 +0100 Subject: [PATCH 050/146] Post editor: Require confirmation before removing Footnotes (#52277) * Post editor: Require confirmation before removing Footnotes Context: #52176 * BlockRemovalWarningModal: Limit width to 40rem * Explain that footnotes are preserved. Add warning to Site Editor --- .../block-removal-warning-modal/index.js | 3 +++ packages/edit-post/src/components/layout/index.js | 15 ++++++++++++++- packages/edit-site/src/components/editor/index.js | 3 +++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/block-removal-warning-modal/index.js b/packages/block-editor/src/components/block-removal-warning-modal/index.js index 08f3deccb5ae0..af521b7233435 100644 --- a/packages/block-editor/src/components/block-removal-warning-modal/index.js +++ b/packages/block-editor/src/components/block-removal-warning-modal/index.js @@ -50,6 +50,9 @@ export function BlockRemovalWarningModal( { rules } ) { { blockNamesForPrompt.length === 1 ? (

    { rules[ blockNamesForPrompt[ 0 ] ] }

    diff --git a/packages/edit-post/src/components/layout/index.js b/packages/edit-post/src/components/layout/index.js index 15bc017900daa..0c18521b1215f 100644 --- a/packages/edit-post/src/components/layout/index.js +++ b/packages/edit-post/src/components/layout/index.js @@ -16,7 +16,10 @@ import { store as editorStore, } from '@wordpress/editor'; import { useSelect, useDispatch } from '@wordpress/data'; -import { BlockBreadcrumb } from '@wordpress/block-editor'; +import { + BlockBreadcrumb, + privateApis as blockEditorPrivateApis, +} from '@wordpress/block-editor'; import { Button, ScrollLock, Popover } from '@wordpress/components'; import { useViewportMatch } from '@wordpress/compose'; import { PluginArea } from '@wordpress/plugins'; @@ -49,6 +52,9 @@ import WelcomeGuide from '../welcome-guide'; import ActionsPanel from './actions-panel'; import StartPageOptions from '../start-page-options'; import { store as editPostStore } from '../../store'; +import { unlock } from '../../lock-unlock'; + +const { BlockRemovalWarningModal } = unlock( blockEditorPrivateApis ); const interfaceLabels = { /* translators: accessibility text for the editor top bar landmark region. */ @@ -63,6 +69,12 @@ const interfaceLabels = { footer: __( 'Editor footer' ), }; +const blockRemovalRules = { + 'core/footnotes': __( + 'The Footnotes block displays all footnotes found in the content. Note that any footnotes in the content will persist after removing this block.' + ), +}; + function Layout( { styles } ) { const isMobileViewport = useViewportMatch( 'medium', '<' ); const isHugeViewport = useViewportMatch( 'huge', '>=' ); @@ -202,6 +214,7 @@ function Layout( { styles } ) { + Date: Wed, 5 Jul 2023 18:04:41 +0300 Subject: [PATCH 051/146] Block Editor: Add README for `RecursionProvider` (#52334) * Block Editor: Add README for RecursionProvider * Fix typo --- .../components/recursion-provider/README.md | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 packages/block-editor/src/components/recursion-provider/README.md diff --git a/packages/block-editor/src/components/recursion-provider/README.md b/packages/block-editor/src/components/recursion-provider/README.md new file mode 100644 index 0000000000000..4538fd6a7d350 --- /dev/null +++ b/packages/block-editor/src/components/recursion-provider/README.md @@ -0,0 +1,101 @@ +# RecursionProvider + +According to Gutenberg's block rendering architecture, any block type capable of recursion should be responsible for handling its own infinite loops. + +To help with detecting infinite loops on the client, the `RecursionProvider` component and the `useHasRecursion()` hook are used to identify if a block has already been rendered. + +## Usage + +```jsx +/** + * WordPress dependencies + */ +import { + __experimentalRecursionProvider as RecursionProvider, + __experimentalUseHasRecursion as useHasRecursion, + useBlockProps, + Warning, +} from '@wordpress/block-editor'; +import { __ } from '@wordpress/i18n'; + +export default function MyRecursiveBlockEdit( { attributes: { ref } } ) { + const hasAlreadyRendered = useHasRecursion( ref ); + const blockProps = useBlockProps( { + className: 'my-block__custom-class', + } ); + + if ( hasAlreadyRendered ) { + return ( +
    + + { __( 'Block cannot be rendered inside itself.' ) } + +
    + ); + } + + return ( + + Block editing code here.... + + ); +} + +/// ... + +; +``` + +## Props + +The component accepts the following props: + +### uniqueId + +Any value that acts as a unique identifier for a block instance. + +- Type: `any` +- Required: Yes + +### children + +Components to be rendered as content. + +- Type: `Element` +- Required: Yes. + +### blockName + +Optional block name. + +- Type: `String` +- Required: No +- Default: '' + +# `useHasRecursion()` + +Used in conjunction with `RecursionProvider`, this hook is used to identify if a block has already been rendered. + +## Usage + +For example usage, refer to the example above. + +## Props + +The component accepts the following props: + +### uniqueId + +Any value that acts as a unique identifier for a block instance. + +- Type: `any` +- Required: Yes + +### blockName + +Optional block name. + +- Type: `String` +- Required: No +- Default: '' + From 6e8cba0f307f529fcc01be19a9d51c13817855fa Mon Sep 17 00:00:00 2001 From: Luis Herranz Date: Wed, 5 Jul 2023 17:36:56 +0200 Subject: [PATCH 052/146] Navigation block: Don't close submenu when it has focus (#52177) * Do not close submenu when it has the focus * Reuse handleMenuFocusout to remove the `"focus"` * Flush focus when menu is closed on click * Check if menu is opened by focus also on the toggle * Rename menuOpenBy to menuOpenedBy for consistency * Use correct class to inject focusin directive --- .../block-library/src/navigation/index.php | 10 ++++++++ packages/block-library/src/navigation/view.js | 24 +++++++++++++------ 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/packages/block-library/src/navigation/index.php b/packages/block-library/src/navigation/index.php index d4614ecbd7c4f..dbf6b8c0f5ed2 100644 --- a/packages/block-library/src/navigation/index.php +++ b/packages/block-library/src/navigation/index.php @@ -123,6 +123,16 @@ function block_core_navigation_add_directives_to_submenu( $w, $block_attributes $w->set_attribute( 'data-wp-bind--aria-expanded', 'selectors.core.navigation.isMenuOpen' ); }; + // Add directives to the submenu. + if ( $w->next_tag( + array( + 'tag_name' => 'UL', + 'class_name' => 'wp-block-navigation__submenu-container', + ) + ) ) { + $w->set_attribute( 'data-wp-on--focusin', 'actions.core.navigation.openMenuOnFocus' ); + } + // Iterate through subitems if exist. block_core_navigation_add_directives_to_submenu( $w, $block_attributes ); } diff --git a/packages/block-library/src/navigation/view.js b/packages/block-library/src/navigation/view.js index cbcd60168393f..b0d39ef3ca4d5 100644 --- a/packages/block-library/src/navigation/view.js +++ b/packages/block-library/src/navigation/view.js @@ -15,7 +15,7 @@ const focusableSelectors = [ const openMenu = ( store, menuOpenedOn ) => { const { context, ref, selectors } = store; - selectors.core.navigation.menuOpenBy( store )[ menuOpenedOn ] = true; + selectors.core.navigation.menuOpenedBy( store )[ menuOpenedOn ] = true; context.core.navigation.previousFocus = ref; if ( context.core.navigation.type === 'overlay' ) { // Add a `has-modal-open` class to the root. @@ -25,7 +25,7 @@ const openMenu = ( store, menuOpenedOn ) => { const closeMenu = ( store, menuClosedOn ) => { const { context, selectors } = store; - selectors.core.navigation.menuOpenBy( store )[ menuClosedOn ] = false; + selectors.core.navigation.menuOpenedBy( store )[ menuClosedOn ] = false; // Check if the menu is still open or not. if ( ! selectors.core.navigation.isMenuOpen( store ) ) { if ( @@ -89,7 +89,7 @@ wpStore( { : 'submenuOpenedBy' ] ).filter( Boolean ).length > 0, - menuOpenBy: ( { context } ) => + menuOpenedBy: ( { context } ) => context.core.navigation[ context.core.navigation.type === 'overlay' ? 'overlayOpenedBy' @@ -120,21 +120,31 @@ wpStore( { }, closeMenuOnClick( store ) { closeMenu( store, 'click' ); + closeMenu( store, 'focus' ); + }, + openMenuOnFocus( store ) { + openMenu( store, 'focus' ); }, toggleMenuOnClick: ( store ) => { const { selectors } = store; - if ( selectors.core.navigation.menuOpenBy( store ).click ) { + const menuOpenedBy = + selectors.core.navigation.menuOpenedBy( store ); + if ( menuOpenedBy.click || menuOpenedBy.focus ) { closeMenu( store, 'click' ); + closeMenu( store, 'focus' ); } else { openMenu( store, 'click' ); } }, handleMenuKeydown: ( store ) => { const { context, selectors, event } = store; - if ( selectors.core.navigation.menuOpenBy( store ).click ) { + if ( + selectors.core.navigation.menuOpenedBy( store ).click + ) { // If Escape close the menu. if ( event?.key === 'Escape' ) { closeMenu( store, 'click' ); + closeMenu( store, 'focus' ); return; } @@ -164,20 +174,20 @@ wpStore( { } }, handleMenuFocusout: ( store ) => { - const { context, selectors, event } = store; + const { context, event } = store; // If focus is outside modal, and in the document, close menu // event.target === The element losing focus // event.relatedTarget === The element receiving focus (if any) // When focusout is outsite the document, // `window.document.activeElement` doesn't change. if ( - selectors.core.navigation.menuOpenBy( store ).click && ! context.core.navigation.modal?.contains( event.relatedTarget ) && event.target !== window.document.activeElement ) { closeMenu( store, 'click' ); + closeMenu( store, 'focus' ); } }, }, From f3da2676af29b3b672cfb3f49317193538d72d54 Mon Sep 17 00:00:00 2001 From: Mitchell Austin Date: Wed, 5 Jul 2023 09:57:55 -0700 Subject: [PATCH 053/146] Have `createNewPost` wait for editor canvas contents (#51824) * Wait for editor canvas contents * Update e2e block-api test/plugin to block api v3 * Update e2e deprecated-node-matcher to block api v3 * Update e2e inner-blocks-allowed-blocks to block api v3 * Update e2e inner-blocks-templates to block api v3 * Allow awaiting non-iframed canvas in `createNewPost` * Update e2e wp-editor-meta-box test * Generalize the locator for the iframed editor canvas * Use block props hook in all blocks of inner-blocks-templates plugin * Update container-blocks test for iframed canvas --- .../src/admin/create-new-post.js | 12 +++- packages/e2e-tests/plugins/block-api.php | 2 + packages/e2e-tests/plugins/block-api/index.js | 7 ++- .../plugins/deprecated-node-matcher.php | 1 - .../plugins/deprecated-node-matcher/index.js | 28 ++++----- .../inner-blocks-allowed-blocks/index.js | 1 + .../plugins/inner-blocks-templates/index.js | 63 ++++++++++--------- .../editor/plugins/container-blocks.test.js | 3 +- .../specs/editor/plugins/block-api.spec.js | 5 +- .../plugins/deprecated-node-matcher.spec.js | 2 - .../editor/plugins/wp-editor-meta-box.spec.js | 2 +- .../various/inner-blocks-templates.spec.js | 8 ++- 12 files changed, 75 insertions(+), 59 deletions(-) diff --git a/packages/e2e-test-utils-playwright/src/admin/create-new-post.js b/packages/e2e-test-utils-playwright/src/admin/create-new-post.js index 5d73157d3c02d..6f31f43355f67 100644 --- a/packages/e2e-test-utils-playwright/src/admin/create-new-post.js +++ b/packages/e2e-test-utils-playwright/src/admin/create-new-post.js @@ -13,6 +13,7 @@ import { addQueryArgs } from '@wordpress/url'; * @param {string} [object.content] Content of the new post. * @param {string} [object.excerpt] Excerpt of the new post. * @param {boolean} [object.showWelcomeGuide] Whether to show the welcome guide. + * @param {boolean} [object.legacyCanvas] Whether the non-iframed editor canvas is awaited. */ export async function createNewPost( { postType, @@ -20,6 +21,7 @@ export async function createNewPost( { content, excerpt, showWelcomeGuide = false, + legacyCanvas = false, } = {} ) { const query = addQueryArgs( '', { post_type: postType, @@ -29,7 +31,15 @@ export async function createNewPost( { } ).slice( 1 ); await this.visitAdminPage( 'post-new.php', query ); - await this.page.waitForSelector( '.edit-post-layout' ); + + const canvasReadyLocator = legacyCanvas + ? this.page.locator( '.edit-post-layout' ) + : this.page + .frameLocator( '[name=editor-canvas]' ) + .locator( 'body > *' ) + .first(); + + await canvasReadyLocator.waitFor(); await this.page.evaluate( ( welcomeGuide ) => { window.wp.data diff --git a/packages/e2e-tests/plugins/block-api.php b/packages/e2e-tests/plugins/block-api.php index e0609f7adc0ff..265ada8ab8ed9 100644 --- a/packages/e2e-tests/plugins/block-api.php +++ b/packages/e2e-tests/plugins/block-api.php @@ -16,6 +16,8 @@ function enqueue_block_api_plugin_script() { plugins_url( 'block-api/index.js', __FILE__ ), array( 'wp-blocks', + 'wp-block-editor', + 'wp-element', 'wp-hooks', ), filemtime( plugin_dir_path( __FILE__ ) . 'block-api/index.js' ), diff --git a/packages/e2e-tests/plugins/block-api/index.js b/packages/e2e-tests/plugins/block-api/index.js index 99a6ab3cdcc83..cb171ab1b442b 100644 --- a/packages/e2e-tests/plugins/block-api/index.js +++ b/packages/e2e-tests/plugins/block-api/index.js @@ -1,13 +1,16 @@ ( function () { const { registerBlockType } = wp.blocks; + const { useBlockProps } = wp.blockEditor; + const { createElement: el } = wp.element; const { addFilter } = wp.hooks; registerBlockType( 'e2e-tests/hello-world', { + apiVersion: 3, title: 'Hello World', description: 'Hello World test block.', category: 'widgets', - edit() { - return 'Hello Editor!'; + edit: function Edit() { + return el( 'p', useBlockProps(), 'Hello Editor!' ); }, save() { return 'Hello Frontend!'; diff --git a/packages/e2e-tests/plugins/deprecated-node-matcher.php b/packages/e2e-tests/plugins/deprecated-node-matcher.php index 7e0a6e3d2c557..0356718b02e97 100644 --- a/packages/e2e-tests/plugins/deprecated-node-matcher.php +++ b/packages/e2e-tests/plugins/deprecated-node-matcher.php @@ -15,7 +15,6 @@ function enqueue_deprecated_node_matcher_plugin_script() { 'gutenberg-test-deprecated-node-matcher', plugins_url( 'deprecated-node-matcher/index.js', __FILE__ ), array( - 'lodash', 'wp-blocks', 'wp-element', 'wp-block-editor', diff --git a/packages/e2e-tests/plugins/deprecated-node-matcher/index.js b/packages/e2e-tests/plugins/deprecated-node-matcher/index.js index a7edacf6739b8..94b59f6190166 100644 --- a/packages/e2e-tests/plugins/deprecated-node-matcher/index.js +++ b/packages/e2e-tests/plugins/deprecated-node-matcher/index.js @@ -1,9 +1,10 @@ ( function () { const registerBlockType = wp.blocks.registerBlockType; - const RichText = wp.blockEditor.RichText; + const { useBlockProps, RichText } = wp.blockEditor; const el = wp.element.createElement; registerBlockType( 'core/deprecated-children-matcher', { + apiVersion: 3, title: 'Deprecated Children Matcher', attributes: { value: { @@ -13,40 +14,35 @@ }, }, category: 'text', - edit( { attributes, setAttributes } ) { + edit: function EditChildrenMatcher( { attributes, setAttributes } ) { return el( RichText, { tagName: 'p', value: attributes.value, onChange( nextValue ) { setAttributes( { value: nextValue } ); }, + ...useBlockProps(), } ); }, save( { attributes } ) { return el( RichText.Content, { tagName: 'p', value: attributes.value, + ...useBlockProps.save(), } ); }, } ); function toRichTextValue( value ) { - // eslint-disable-next-line no-undef - return _.map( value, function ( subValue ) { - return subValue.children; - } ); + return value?.map( ( { children } ) => children ) ?? []; } function fromRichTextValue( value ) { - // eslint-disable-next-line no-undef - return _.map( value, function ( subValue ) { - return { - children: subValue, - }; - } ); + return value.map( ( subValue ) => ( { children: subValue } ) ); } registerBlockType( 'core/deprecated-node-matcher', { + apiVersion: 3, title: 'Deprecated Node Matcher', attributes: { value: { @@ -61,10 +57,10 @@ }, }, category: 'text', - edit( { attributes, setAttributes } ) { + edit: function EditNodeMatcher( { attributes, setAttributes } ) { return el( 'blockquote', - {}, + useBlockProps(), el( RichText, { multiline: 'p', value: toRichTextValue( attributes.value ), @@ -74,12 +70,12 @@ } ); }, } ) - ); + ) }, save( { attributes } ) { return el( 'blockquote', - {}, + useBlockProps.save(), el( RichText.Content, { value: toRichTextValue( attributes.value ), } ) diff --git a/packages/e2e-tests/plugins/inner-blocks-allowed-blocks/index.js b/packages/e2e-tests/plugins/inner-blocks-allowed-blocks/index.js index e6c35785d1a5d..c32307b2d49ff 100644 --- a/packages/e2e-tests/plugins/inner-blocks-allowed-blocks/index.js +++ b/packages/e2e-tests/plugins/inner-blocks-allowed-blocks/index.js @@ -12,6 +12,7 @@ const allowedBlocksWhenMultipleChildren = [ 'core/gallery', 'core/video' ]; registerBlockType( 'test/allowed-blocks-dynamic', { + apiVersion: 3, title: 'Allowed Blocks Dynamic', icon: 'carrot', category: 'text', diff --git a/packages/e2e-tests/plugins/inner-blocks-templates/index.js b/packages/e2e-tests/plugins/inner-blocks-templates/index.js index 959f4a3eeb5a0..5a49a0fa0aa05 100644 --- a/packages/e2e-tests/plugins/inner-blocks-templates/index.js +++ b/packages/e2e-tests/plugins/inner-blocks-templates/index.js @@ -2,7 +2,7 @@ const registerBlockType = wp.blocks.registerBlockType; const createBlock = wp.blocks.createBlock; const el = wp.element.createElement; - const InnerBlocks = wp.blockEditor.InnerBlocks; + const { InnerBlocks, useBlockProps } = wp.blockEditor; const useState = window.wp.element.useState; const TEMPLATE = [ @@ -47,35 +47,38 @@ }; registerBlockType( 'test/test-inner-blocks-no-locking', { + apiVersion: 3, title: 'Test Inner Blocks no locking', icon: 'cart', category: 'text', - edit() { - return el( InnerBlocks, { + edit: function InnerBlocksNoLockingEdit() { + return el( 'div', useBlockProps(), el( InnerBlocks, { template: TEMPLATE, - } ); + } ) ); }, save, } ); registerBlockType( 'test/test-inner-blocks-locking-all', { + apiVersion: 3, title: 'Test InnerBlocks locking all', icon: 'cart', category: 'text', - edit() { - return el( InnerBlocks, { + edit: function InnerBlocksBlocksLockingAllEdit() { + return el( 'div', useBlockProps(), el( InnerBlocks, { template: TEMPLATE, templateLock: 'all', - } ); + } ) ); }, save, } ); registerBlockType( 'test/test-inner-blocks-update-locked-template', { + apiVersion: 3, title: 'Test Inner Blocks update locked template', icon: 'cart', category: 'text', @@ -87,7 +90,7 @@ }, }, - edit( props ) { + edit: function InnerBlocksUpdateLockedTemplateEdit( props ) { const hasUpdatedTemplated = props.attributes.hasUpdatedTemplate; return el( 'div', null, [ el( @@ -99,12 +102,12 @@ }, 'Update template' ), - el( InnerBlocks, { + el( 'div', useBlockProps(), el( InnerBlocks, { template: hasUpdatedTemplated ? TEMPLATE_TWO_PARAGRAPHS : TEMPLATE, templateLock: 'all', - } ), + } ) ), ] ); }, @@ -112,21 +115,23 @@ } ); registerBlockType( 'test/test-inner-blocks-paragraph-placeholder', { + apiVersion: 3, title: 'Test Inner Blocks Paragraph Placeholder', icon: 'cart', category: 'text', - edit() { - return el( InnerBlocks, { + edit: function InnerBlocksParagraphPlaceholderEdit() { + return el( 'div', useBlockProps(), el( InnerBlocks, { template: TEMPLATE_PARAGRAPH_PLACEHOLDER, templateInsertUpdatesSelection: true, - } ); + } ) ); }, save, } ); registerBlockType( 'test/test-inner-blocks-transformer-target', { + apiVersion: 3, title: 'Test Inner Blocks transformer target', icon: 'cart', category: 'text', @@ -165,36 +170,34 @@ ], }, - edit() { - return el( InnerBlocks, { + edit: function InnerBlocksTransformerTargetEdit() { + return el( 'div', useBlockProps(), el( InnerBlocks, { template: TEMPLATE, - } ); + } ) ); }, save, } ); - - function InnerBlocksAsyncTemplateEdit() { - const [ template, setTemplate ] = useState( [] ); - - setInterval( () => { - setTemplate( TEMPLATE_TWO_PARAGRAPHS ); - }, 1000 ); - - return el( InnerBlocks, { - template, - } ); - } - registerBlockType( 'test/test-inner-blocks-async-template', { + apiVersion: 3, title: 'Test Inner Blocks Async Template', icon: 'cart', category: 'text', - edit: InnerBlocksAsyncTemplateEdit, + edit: function InnerBlocksAsyncTemplateEdit() { + const [ template, setTemplate ] = useState( [] ); + + setInterval( () => { + setTemplate( TEMPLATE_TWO_PARAGRAPHS ); + }, 1000 ); + + return el('div', useBlockProps(), el( InnerBlocks, { + template, + } ) ); + }, // Purposely do not save inner blocks so that it's possible to test template resolution. save() {}, diff --git a/packages/e2e-tests/specs/editor/plugins/container-blocks.test.js b/packages/e2e-tests/specs/editor/plugins/container-blocks.test.js index 4c159571da9fd..88c1a7fc8271a 100644 --- a/packages/e2e-tests/specs/editor/plugins/container-blocks.test.js +++ b/packages/e2e-tests/specs/editor/plugins/container-blocks.test.js @@ -9,6 +9,7 @@ import { insertBlock, switchEditorModeTo, pressKeyWithModifier, + canvas, } from '@wordpress/e2e-test-utils'; describe( 'InnerBlocks Template Sync', () => { @@ -75,7 +76,7 @@ describe( 'InnerBlocks Template Sync', () => { expect( await getEditedPostContent() ).toMatchSnapshot(); // Trigger a template update and assert that a second block is now present. - const [ button ] = await page.$x( + const [ button ] = await canvas().$x( `//button[contains(text(), 'Update template')]` ); await button.click(); diff --git a/test/e2e/specs/editor/plugins/block-api.spec.js b/test/e2e/specs/editor/plugins/block-api.spec.js index 1d4802b226291..dd2a89cd2beca 100644 --- a/test/e2e/specs/editor/plugins/block-api.spec.js +++ b/test/e2e/specs/editor/plugins/block-api.spec.js @@ -15,13 +15,14 @@ test.describe( 'Using Block API', () => { test( 'Inserts the filtered hello world block even when filter added after block registration', async ( { admin, editor, - page, } ) => { await admin.createNewPost(); await editor.insertBlock( { name: 'e2e-tests/hello-world' } ); - const block = page.locator( '[data-type="e2e-tests/hello-world"]' ); + const block = editor.canvas.locator( + '[data-type="e2e-tests/hello-world"]' + ); await expect( block ).toHaveText( 'Hello Editor!' ); } ); } ); diff --git a/test/e2e/specs/editor/plugins/deprecated-node-matcher.spec.js b/test/e2e/specs/editor/plugins/deprecated-node-matcher.spec.js index 1466781bbf59a..58f742341ebc3 100644 --- a/test/e2e/specs/editor/plugins/deprecated-node-matcher.spec.js +++ b/test/e2e/specs/editor/plugins/deprecated-node-matcher.spec.js @@ -27,7 +27,6 @@ test.describe( 'Deprecated Node Matcher', () => { page, editor, } ) => { - // await insertBlock( 'Deprecated Node Matcher' ); await editor.insertBlock( { name: 'core/deprecated-node-matcher' } ); await page.keyboard.type( 'test' ); await page.keyboard.press( 'Enter' ); @@ -39,7 +38,6 @@ test.describe( 'Deprecated Node Matcher', () => { editor, pageUtils, } ) => { - // await insertBlock( 'Deprecated Children Matcher' ); await editor.insertBlock( { name: 'core/deprecated-children-matcher', } ); diff --git a/test/e2e/specs/editor/plugins/wp-editor-meta-box.spec.js b/test/e2e/specs/editor/plugins/wp-editor-meta-box.spec.js index 13720de509e3c..bdb21008c68d6 100644 --- a/test/e2e/specs/editor/plugins/wp-editor-meta-box.spec.js +++ b/test/e2e/specs/editor/plugins/wp-editor-meta-box.spec.js @@ -17,7 +17,7 @@ test.describe( 'WP Editor Meta Boxes', () => { } ); test( 'Should save the changes', async ( { admin, editor, page } ) => { - await admin.createNewPost(); + await admin.createNewPost( { legacyCanvas: true } ); // Add title to enable valid non-empty post save. await editor.canvas.type( diff --git a/test/e2e/specs/editor/various/inner-blocks-templates.spec.js b/test/e2e/specs/editor/various/inner-blocks-templates.spec.js index e1588e57beb10..bbb4a51c75c52 100644 --- a/test/e2e/specs/editor/various/inner-blocks-templates.spec.js +++ b/test/e2e/specs/editor/various/inner-blocks-templates.spec.js @@ -28,9 +28,11 @@ test.describe( 'Inner blocks templates', () => { name: 'test/test-inner-blocks-async-template', } ); - const blockWithTemplateContent = editor.canvas.locator( - 'role=document[name="Block: Test Inner Blocks Async Template"i] >> text=OneTwo' - ); + const blockWithTemplateContent = page + .frameLocator( '[name=editor-canvas]' ) + .locator( + 'role=document[name="Block: Test Inner Blocks Async Template"i] >> text=OneTwo' + ); // The block template content appears asynchronously, so wait for it. await expect( blockWithTemplateContent ).toBeVisible(); From 68fa80a0a8cb2c242f0ed280d3552efd9f04aacc Mon Sep 17 00:00:00 2001 From: Marcelo Serpa <81248+fullofcaffeine@users.noreply.github.com> Date: Wed, 5 Jul 2023 12:14:10 -0600 Subject: [PATCH 054/146] [Github-Actions-Workflows][Plugin-Release] Allow shipping a point-release for an older stable release (#49082) * Allow point-releases for release branches that are not the latest anymore And other minor improvements * Revert debug changes Revert changes I made in order to test end-to-end from a test fork. * Limit runs to `release/` branches Co-authored-by: Bernie Reiter * Fix changelog directory interpolation Co-authored-by: Bernie Reiter * Re-add debug changes for further testing * Create only the tag when releasing an older point release, do not create a branch anymore * Implement guard against accidental trunk release of older point releases This refactors the upload zip workflow and add some version arithmetic to make sure the right version is uploaded depending: - what is the current version set as latest -- this signals that a trunk release could be imminent, but is not enough to define it - what is the current version in the WP core repo (real latest released version) -- this is compared with the published version and if it's greater than this version + the version was set as latest in GH, then it is a trunk release - If the conditions above are false, then it's a tag release. See the source for more details. * Attempt to fix "fetch" already defined error when running the script in the GH actions env * Simplify by not using node-fetch, or it will require installing the npm * GH requires an user-agent * Improve var name and comments * Define func to set the output of the "compute-should-update-trunk" job and improve its name * The core object should already be available as part of the github-scripts package * Rely only in the github ref from the published release and not the latest tag, restructure the workflow to make it easier to debug and simplify it by using shell commands/script instead of JS * Simplify further by moving the fetch core repo job to a step inside compute_should_update_trunk * Fix/improve step/job ids * Fix typo * Formatting fixes Auto-format with the RedHat YAML extension in vscode. * Add missing outputs and a couple of other fixes * A couple more fixes and a simplification of the compute_latest_version step * Mock the build of the gutenberg.zip for debugging purposes, this commit should be reverted before merging! * Fix a couple of step names * Re-add prelease attribute, was accidentally commented out * Debug commit, please revert: mock the version number in the version repo * Fix changelog fetching when uploading the SVN tag * Mock SVN version to 16.1.0 * Make the svn commit command verbose in order to debug network timeout issues while testing * Revert "Make the svn commit command verbose in order to debug network timeout issues while testing" This reverts commit da46abafed451ca861fa082787f8d18eed093914. * Optimize SVN tag addition in GitHub workflow This commit significantly optimizes the process of adding a new tag to the SVN repository in our GitHub Workflow. Previously, our process involved checking out the entire tags directory from the SVN repository, which led to increased execution time and failure points when the tags directory was filled with numerous versions. We've resolved this issue by leveraging the svn import command, which allows us to directly add a new directory to the tags directory without checking out the existing directories first. This results in faster and more reliable workflow execution, particularly when dealing with repositories that have accumulated many tagged versions. The changes made include: Removing the step to checkout Gutenberg tags from the WP.org plugin repository. Adding a new step that uses the svn import command to directly add a new version directory to the SVN repository. This is achieved without the need to checkout all existing directories under tags/. Removing the step to checkout the new Gutenberg tag as it's not needed anymore. * Enhance safety checks in workflow to skip upload jobs for RC builds This commit enhances the conditional checks within the 'upload' and 'upload-tag' jobs in our GitHub Actions workflows. Previously, the jobs were executed based solely on the 'prerelease' flag of the release. However, there could be situations where this flag is accidentally set to 'false' for a Release Candidate (RC). To avoid such mishaps, the conditions have been extended to check for the '-rc' suffix in the version string as well. This ensures that even if the 'prerelease' flag is incorrectly marked as 'false', the 'upload' and 'upload-tag' jobs are still skipped for RCs, thus preventing any unintended release of RC builds. * Revert "Enhance safety checks in workflow to skip upload jobs for RC builds" This reverts commit eae536a6eeca7e7b7373361f451bdbfc58d45d10. * Skip upload jobs if release is an RC by checking the ref for a rc suffix This makes sure we don't upload RCs as trunk or tag even if the deployer accidentally unchecks the "Set as prerelease" flag. * Revert build plugin mocking logic Effectively reverts changes in 014e2c6. * Revert initial dev/debug changes Reverts changes from 489aa70. If further testing is needed, revert the changes here again. * Revert WP SVN repo version mock Revert changes from fe8b33c. * Add back if conditions that were accidentally removed Removed in https://github.com/WordPress/gutenberg/pull/49082/commits/014e2c6168c6945029ce7b1ac2ffbf3525004d4a. I accidentally removed it instead of commenting out, so I forgot to reactivate it. The problem was that due to the amount of changes later, I couldn't just revert this commit. --------- Co-authored-by: Bernie Reiter --- .github/workflows/build-plugin-zip.yml | 2 +- .../upload-release-to-plugin-repo.yml | 119 ++++++++++++++++-- 2 files changed, 108 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-plugin-zip.yml b/.github/workflows/build-plugin-zip.yml index 9052f1689c921..f57ccd21e361e 100644 --- a/.github/workflows/build-plugin-zip.yml +++ b/.github/workflows/build-plugin-zip.yml @@ -56,7 +56,7 @@ jobs: github.event.inputs.version == 'rc' || github.event.inputs.version == 'stable' ) || ( - endsWith( github.ref, needs.compute-stable-branches.outputs.current_stable_branch ) && + startsWith( github.ref, 'refs/heads/release/' ) && github.event.inputs.version == 'stable' ) ) diff --git a/.github/workflows/upload-release-to-plugin-repo.yml b/.github/workflows/upload-release-to-plugin-repo.yml index 392cf912e8db5..521fd3a786f15 100644 --- a/.github/workflows/upload-release-to-plugin-repo.yml +++ b/.github/workflows/upload-release-to-plugin-repo.yml @@ -5,10 +5,66 @@ on: types: [published] jobs: + compute-should-update-trunk: + name: Decide if trunk or tag + runs-on: ubuntu-latest + # Skip this job if the release is a release candidate. This will in turn skip + # the upload jobs, which are only relevant for non-RC releases. + # We first check if the release is a prerelease, and then if the ref contains + # the string "rc". The latter is fallback in case the deployer accidentally + # unchecks the "This is a pre-release" checkbox in the release UI. + if: | + !github.event.release.prerelease && !contains(github.ref, 'rc') + + outputs: + should_update_trunk: ${{ steps.compute_should_update_trunk.outputs.should_update_trunk }} + + steps: + - name: Fetch latest version in the WP core repo + id: compute_latest_version_in_core_repo + run: | + latest_version_in_core_repo=$(curl -s 'https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&request\[slug\]=gutenberg' | jq -r '.version') + echo "Latest Core Repo version: $latest_version_in_core_repo" + echo "version=$latest_version_in_core_repo" >> $GITHUB_OUTPUT + + - name: Decide if it is a trunk or tag update + id: compute_should_update_trunk + env: + GITHUB_REF: ${{ github.ref }} + run: | + latestPublishedVersion=$(echo "$GITHUB_REF" | sed -E 's/refs\/tags\/(v?)([0-9.]+)/\2/') + latestVersionInCoreRepo="${{ steps.compute_latest_version_in_core_repo.outputs.version }}" + + # Determines if the first version string is greater than the second version string. + # + # Params: + # $1 - The first version string to compare, which may have an optional leading "v". + # $2 - The second version string to compare, which may have an optional leading "v". + # + # Return values: + # 0 - The first version string is greater than the second version string. + # 1 - The first version string is less than or equal to the second version string. + is_first_version_greater_than_second() { + v1=${1#v} + v2=${2#v} + dpkg --compare-versions "$v1" gt "$v2" + return $? + } + + # Only update trunk *if* the published release's version in Github is GREATER + # than the version currently published in the WP plugins repo. If not, then it + # will upload it as a new tag. + shouldUpdateTrunk=false + if is_first_version_greater_than_second "$latestPublishedVersion" "$latestVersionInCoreRepo"; then + shouldUpdateTrunk=true + fi + + echo "Should update trunk: $shouldUpdateTrunk" + echo "should_update_trunk=$shouldUpdateTrunk" >> $GITHUB_OUTPUT + get-release-branch: name: Get release branch name runs-on: ubuntu-latest - if: github.event.release.assets[0] outputs: release_branch: ${{ steps.get_release_branch.outputs.release_branch }} @@ -25,7 +81,8 @@ jobs: update-changelog: name: Update Changelog on ${{ matrix.branch }} branch runs-on: ubuntu-latest - if: github.event.release.assets[0] + if: | + github.event.release.assets[0] needs: get-release-branch env: TAG: ${{ github.event.release.tag_name }} @@ -95,11 +152,12 @@ jobs: path: ./changelog.txt upload: - name: Upload Gutenberg Plugin + name: Publish as trunk (and tag) runs-on: ubuntu-latest environment: wp.org plugin - needs: update-changelog - if: ${{ !github.event.release.prerelease && github.event.release.assets[0] }} + needs: [compute-should-update-trunk, update-changelog] + if: | + needs.compute-should-update-trunk.outputs.should_update_trunk == 'true' && github.event.release.assets[0] env: PLUGIN_REPO_URL: 'https://plugins.svn.wordpress.org/gutenberg' STABLE_VERSION_REGEX: '[0-9]\+\.[0-9]\+\.[0-9]\+\s*' @@ -109,11 +167,7 @@ jobs: steps: - name: Check out Gutenberg trunk from WP.org plugin repo - run: svn checkout "$PLUGIN_REPO_URL/trunk" - - - name: Get previous stable version - id: get_previous_stable_version - run: echo "stable_version=$(awk -F ':\ ' '$1 == "Stable tag" {print $2}' ./trunk/readme.txt)" >> $GITHUB_OUTPUT + run: svn checkout "$PLUGIN_REPO_URL/trunk" --username "$SVN_USERNAME" --password "$SVN_PASSWORD" - name: Delete everything working-directory: ./trunk @@ -130,8 +184,8 @@ jobs: - name: Replace the stable tag placeholder with the existing stable tag on the SVN repository env: STABLE_TAG_PLACEHOLDER: 'Stable tag: V\.V\.V' - STABLE_TAG: 'Stable tag: ${{ steps.get_previous_stable_version.outputs.stable_version }}' - run: sed -i "s/${STABLE_TAG_PLACEHOLDER}/${STABLE_TAG}/g" ./trunk/readme.txt + run: | + sed -i "s/$STABLE_TAG_PLACEHOLDER/Stable tag: $VERSION/g" ./trunk/readme.txt - name: Download Changelog Artifact uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # v3.0.1 @@ -159,3 +213,44 @@ jobs: sed -i "s/Stable tag: ${STABLE_VERSION_REGEX}/Stable tag: ${VERSION}/g" ./readme.txt svn commit -m "Releasing version $VERSION" \ --no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD" + + upload-tag: + name: Publish as tag + runs-on: ubuntu-latest + environment: wp.org plugin + needs: [compute-should-update-trunk, update-changelog] + if: | + needs.compute-should-update-trunk.outputs.should_update_trunk == 'false' && github.event.release.assets[0] + env: + PLUGIN_REPO_URL: 'https://plugins.svn.wordpress.org/gutenberg' + STABLE_VERSION_REGEX: '[0-9]\+\.[0-9]\+\.[0-9]\+\s*' + SVN_USERNAME: ${{ secrets.svn_username }} + SVN_PASSWORD: ${{ secrets.svn_password }} + VERSION: ${{ github.event.release.name }} + + steps: + - name: Download and unzip Gutenberg plugin asset into tags folder + env: + PLUGIN_URL: ${{ github.event.release.assets[0].browser_download_url }} + run: | + # do the magic here + curl -L -o gutenberg.zip $PLUGIN_URL + unzip gutenberg.zip -d "$VERSION" + rm gutenberg.zip + + - name: Replace the stable tag placeholder with the existing stable tag on the SVN repository + env: + STABLE_TAG_PLACEHOLDER: 'Stable tag: V\.V\.V' + run: | + sed -i "s/$STABLE_TAG_PLACEHOLDER/Stable tag: $VERSION/g" "$VERSION/readme.txt" + + - name: Download Changelog Artifact + uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # v3.0.1 + with: + name: changelog trunk + path: ${{ github.event.release.name }} + + - name: Add the new version directory and commit changes to the SVN repository + run: | + svn import "$VERSION" "$PLUGIN_REPO_URL/tags/$VERSION" -m "Committing version $VERSION" \ + --no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD" From 7eec919e4eae6899995c6a02d735a88d0f832315 Mon Sep 17 00:00:00 2001 From: Artemio Morales Date: Wed, 5 Jul 2023 14:16:53 -0500 Subject: [PATCH 055/146] Image block: Update lightbox animation tests (#52290) * Modify tests to ensure zoom and fade work w/ responsive images * Add style checks for the zoom animation --- ...00_e2e_test_image_responsive_lightbox.jpeg | Bin 0 -> 48585 bytes test/e2e/specs/editor/blocks/image.spec.js | 216 ++++++++++++++---- 2 files changed, 170 insertions(+), 46 deletions(-) create mode 100644 test/e2e/assets/3200x2400_e2e_test_image_responsive_lightbox.jpeg diff --git a/test/e2e/assets/3200x2400_e2e_test_image_responsive_lightbox.jpeg b/test/e2e/assets/3200x2400_e2e_test_image_responsive_lightbox.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..1d982c8dd1341173a75942a60c925245f1d5bded GIT binary patch literal 48585 zcmeI#X;>528VB$*GucT9Aprqd!oCRz$}X~R0>$rN&( z2>E8`OqEMh)AEECB1@sYtE-DJNK%+7$;-2eND*bE$i+h6?5vy=*;Ir+d}rk>q^`6T zlE_Z>u1-!i4z?u!$NJlyA4mOtP@dZlBc4SLoHI9Z zOe#wyPq$1g&68%!gi_gGo#B5t?Xxu~{-4E)XSks!$ysht%d;-_{*;j17baXq;Q z`*_|$nK4ND%ZoMW`EcEnncP3H{oMvHBj4h=(o~_c?Hd&>6y?hcl$rcZC^uBZLR=(3 z+DIQ6BMW4M9FQ||M_$MujY8ol8pWdtNQBZ*7LubvGy}~=#i$f5L#t2~szIAk9jZsW zQ4`vaj-cb{3_6D{p&O_Rb)!e94?Rb3Fbtz(9E^`?V+NQhW{o*uF4#!S9}C5zuy`yP zOT}bZJ~jiJkCkHOSQWMrtHZv<_F+e`Q&=Z<4ZDN&V!vRoaRO)K0$dL_!|iYv+#3(U zqw(>0Dn1#Xh8N*W@k+cF--$QkNANTFCAnBPZ3gVDDIRX%2Aa*+yxkv{5cl?oj$D z@2MQBF4daqMh&LMQB$df)M9D{bqjSb^%(UMwVV2!Mx$xc%xTWFAX+>voi?4egtm^> zKs!w9q}`+S)9G|=x;5Q{9!^i8=h2JlYv?=ahv?_&-Sn3X6@~%Bff2w+V8|Hr7!{1| zjDw8xj2^}trW(_f>BbCaikVZHWz5aY7Uo%IH}egP$1-Pmu%cP%thua8Rz2$&>n7`& zii(PnimOVbid1EeN~Ov!m6IxWR9>;w*;Z^{b|O2Uy_CI`eVBcX{fxumm~p%~37kC6 zQcfM`DCaikr7B<5Ry9~vtU6n@TD4L2yy_D!lWWTL=1$;F<5qC@aL;ldt1;Eg)O^)a z)MlwwtL;;}qSnvj^Xz%yye!@l-ge$8-UD^Ix|zDax>&tPeUti8^?Q7RZ_M}Qi}>^T zoB7B1-2$4xTo5cs7nBOV5p)RpG}JYQYs6?w(WurqpwXpCXqssTYi4SeY3|m%toeG7 z-XQNml0l0H)eky9=!Mo`EiWyJR*6=F)+Mdi+CpuA?F{YZ+D+QGbSOGjI*~esI_q_g z={z1R80uvzf%98 zey;)FV5EW6V5Pw!gNH&5p|>zoSSf51_8ICL1{vlXZZzyLd}Cy8G}dUIQG?MfW0tXt z@g(Dw#;wMECI%*9CNoTSm|Qnyn!1>#nXWcHVfw<%+$`2?p;?pJ19L6&VDo9_JIrrd za4bA6CR@~6T(qQFx>#mduCqL6g#RG6P=~ka&i z<84!5v%}_&t)^|L?L6Bi+b4D=b_sUN?M~ReAL=+XbLi%wH|*8zN7>J_Z?XTy!OB78 zQ0;JW7-v|(u-U_!hdmu`JzO$;{qU=fe8(`yg^sO`@0^^SOYF79tH;~YJKcMy_YWOd~IDEp`xQ76Xm z$0Uu}KIVC}Pjp%IjjSA8R`o)&VcE#Dn&5Sz}uM;ngZ%&{m#3XD< z=pW}lZq>N%M90M9#LMH&$4?o5YJ$#$%n1jQxJfBVdy=WivB}$$-=>78)TZ=L44$}l zVxP!Yv|98?>?K|)?v;2*$|XIMJSLS-dXVaox+1kV%`>ec?XlEXS|xp&9+X~_{vsnh zV{3*YGd8m!i;t|2N?#!{yDbDGd>^6DT~^hp4u}lVA|KyDbq#MTW1)~m^+5UuYD#NfZ;)=dx-oELW35?j#U|ROf=%}~$80|FwaeFa zTXeRRZh5y=wzX?p)V8)d=eoM>y4%Zk;5+hn^zKaDdF~s(Z<_0E>NhrMHk9r{yYhEE z{5JX9%ezB%x9)M-Q~#amcWd|Z_m(tbjZ+)@n$nuOn&X>0_l?@u+Tz}__j}v#x9&IG zUwuI1K-odo!J>nTL(>lRAI>@a_(WH;%>~z1SAn)^RN4*vaDo$B&-yK5^)z z$I1Pt+)nK~?Q**5jMJIMcE|R;KREudx5KHU@vQUN=5wy+S~^E`9z5@P{>TNt3&$@8 zUp#YZ^rgx6Yr)6*l zZwlYi-&Ve}eAn_m_t8cU<6VlaDt|MF8Hk!H&7A6aq`|v zP;i_=r4SSP58*tF;9-h3G=AW(&~Gapcx5U79R0r3{@Cf_{i&n=r;g$} zViOpK^9UaKaW%@nGf*G^0w4eaAOHd&00JNY0w4eaAOHd&00JNY0w4eaAOHd&00JNY z0w4eaAOHd&00JNY0w4eaAOHd&00JNY0w4eaAOHd&00JNY0w4eaAOHd&00JNY0w4ea zAOHd&00JNY0w4eaAOHd&00JNY0w4eaAOHd&00JNY0w4eaAOHd&00JNY0w4eaAOHd& z00JNY0w4eaAOHd&00JNY0w4eaAOHd&00JNY0w4eaAOHd&00JNY0w4eaAOHd&00JNY z0w4eaAOHd&00JNY0w4eaAOHd&00JNY0w4eaAOHd&00JNY0w4eaAOHd&00JNY0w4ea zAOHd&00JNY0w4eaAn^YZFi>1a3=BsY70rIHK<^ajRjB7ckN83l`$7-LX`X+Y`-L8c J{eIlFe*>?;MMwYu literal 0 HcmV?d00001 diff --git a/test/e2e/specs/editor/blocks/image.spec.js b/test/e2e/specs/editor/blocks/image.spec.js index b392b39de407c..a2c4399fcac7a 100644 --- a/test/e2e/specs/editor/blocks/image.spec.js +++ b/test/e2e/specs/editor/blocks/image.spec.js @@ -781,7 +781,8 @@ test.describe( 'Image - interactivity', () => { await expect( imageBlock ).toBeVisible(); filename = await imageBlockUtils.upload( - imageBlock.locator( 'data-testid=form-file-upload-input' ) + imageBlock.locator( 'data-testid=form-file-upload-input' ), + '3200x2400_e2e_test_image_responsive_lightbox.jpeg' ); const image = imageBlock.locator( 'role=img' ); await expect( image ).toBeVisible(); @@ -828,54 +829,177 @@ test.describe( 'Image - interactivity', () => { expect( blocks[ 0 ].attributes.url ).toContain( filename ); } ); - test( 'should open and close the image in a lightbox when using a mouse and dynamically load src', async ( { - editor, - page, - } ) => { - await page.getByRole( 'button', { name: 'Advanced' } ).click(); - await page - .getByRole( 'combobox', { name: 'Behaviors' } ) - .selectOption( 'lightbox' ); + test.describe( 'should open and close the image in a lightbox when using a mouse and dynamically load src', () => { + test.beforeEach( async ( { page } ) => { + await page.getByRole( 'button', { name: 'Advanced' } ).click(); + await page + .getByRole( 'combobox', { name: 'Behaviors' } ) + .selectOption( 'lightbox' ); + } ); - const postId = await editor.publishPost(); - await page.goto( `/?p=${ postId }` ); + test( 'zoom animation', async ( { editor, page } ) => { + await page + .getByRole( 'combobox', { name: 'Animation' } ) + .selectOption( 'zoom' ); + + const postId = await editor.publishPost(); + await page.goto( `/?p=${ postId }` ); - const lightbox = page.locator( '.wp-lightbox-overlay' ); - await expect( lightbox ).toBeHidden(); - const responsiveImage = lightbox.locator( '.responsive-image img' ); - const enlargedImage = lightbox.locator( '.enlarged-image img' ); + // getByRole() doesn't work for the image here for + // some reason, so let's use locators instead + const contentFigure = page.locator( '.entry-content figure' ); + const contentImage = page.locator( + '.entry-content figure img' + ); - await expect( responsiveImage ).toHaveAttribute( - 'src', - new RegExp( filename ) - ); - await expect( enlargedImage ).toHaveAttribute( 'src', '' ); + const wpContext = await contentFigure.getAttribute( + 'data-wp-context' + ); - await page.getByRole( 'button', { name: 'Enlarge image' } ).click(); + const imageUploadedSrc = + JSON.parse( wpContext ).core.image.imageUploadedSrc; - await expect( responsiveImage ).toHaveAttribute( - 'src', - new RegExp( filename ) - ); - await expect( enlargedImage ).toHaveAttribute( - 'src', - new RegExp( filename ) - ); + const contentImageCurrentSrc = await contentImage.evaluate( + ( img ) => img.currentSrc + ); + + const lightbox = page.locator( '.wp-lightbox-overlay' ); + await expect( lightbox ).toBeHidden(); + const responsiveImage = lightbox.locator( + '.responsive-image img' + ); + const enlargedImage = lightbox.locator( '.enlarged-image img' ); + + await expect( responsiveImage ).toHaveAttribute( + 'src', + contentImageCurrentSrc + ); + await expect( enlargedImage ).toHaveAttribute( 'src', '' ); + + await page + .getByRole( 'button', { name: 'Enlarge image' } ) + .click(); + + await expect( responsiveImage ).toHaveAttribute( + 'src', + contentImageCurrentSrc + ); + await expect( enlargedImage ).toHaveAttribute( + 'src', + imageUploadedSrc + ); - await expect( lightbox ).toBeVisible(); + await expect( lightbox ).toBeVisible(); + + const document = page.getByRole( 'document' ); + const lightboxStyleCheck = await document.evaluate( ( doc ) => { + // We don't have access to the getPropertyValue() method + // on the CSSStyleDeclaration returned form getComputedStyle() + // in the Playwright outer context, so we need to evaluate it here + // in the browser context here. + const documentStyles = window.getComputedStyle( doc ); + const lightboxStyleVars = [ + '--lightbox-scale-width', + '--lightbox-scale-height', + '--lightbox-image-max-width', + '--lightbox-image-max-height', + '--lightbox-initial-left-position', + '--lightbox-initial-top-position', + ]; + const lightboxStyleErrors = []; + lightboxStyleVars.forEach( ( styleVar ) => { + if ( ! documentStyles.getPropertyValue( styleVar ) ) { + lightboxStyleErrors.push( styleVar ); + } + } ); + + return lightboxStyleErrors.length > 0 + ? lightboxStyleErrors + : true; + } ); + expect( lightboxStyleCheck ).toBe( true ); + + const closeButton = lightbox.getByRole( 'button', { + name: 'Close', + } ); + await closeButton.click(); - const closeButton = lightbox.getByRole( 'button', { - name: 'Close', + await expect( responsiveImage ).toHaveAttribute( 'src', '' ); + await expect( enlargedImage ).toHaveAttribute( + 'src', + imageUploadedSrc + ); + + await expect( lightbox ).toBeHidden(); } ); - await closeButton.click(); - await expect( responsiveImage ).toHaveAttribute( 'src', '' ); - await expect( enlargedImage ).toHaveAttribute( - 'src', - new RegExp( filename ) - ); + test( 'fade animation', async ( { editor, page } ) => { + await page + .getByRole( 'combobox', { name: 'Animation' } ) + .selectOption( 'fade' ); + + const postId = await editor.publishPost(); + await page.goto( `/?p=${ postId }` ); + + // getByRole() doesn't work for the image here for + // some reason, so let's use locators instead + const contentFigure = page.locator( '.entry-content figure' ); + const contentImage = page.locator( + '.entry-content figure img' + ); - await expect( lightbox ).toBeHidden(); + const wpContext = await contentFigure.getAttribute( + 'data-wp-context' + ); + + const imageUploadedSrc = + JSON.parse( wpContext ).core.image.imageUploadedSrc; + + const contentImageCurrentSrc = await contentImage.evaluate( + ( img ) => img.currentSrc + ); + + const lightbox = page.locator( '.wp-lightbox-overlay' ); + await expect( lightbox ).toBeHidden(); + const responsiveImage = lightbox.locator( + '.responsive-image img' + ); + const enlargedImage = lightbox.locator( '.enlarged-image img' ); + + await expect( responsiveImage ).toHaveAttribute( + 'src', + contentImageCurrentSrc + ); + await expect( enlargedImage ).toHaveAttribute( 'src', '' ); + + await page + .getByRole( 'button', { name: 'Enlarge image' } ) + .click(); + + await expect( responsiveImage ).toHaveAttribute( + 'src', + contentImageCurrentSrc + ); + await expect( enlargedImage ).toHaveAttribute( + 'src', + imageUploadedSrc + ); + + await expect( lightbox ).toBeVisible(); + + const closeButton = lightbox.getByRole( 'button', { + name: 'Close', + } ); + await closeButton.click(); + + await expect( responsiveImage ).toHaveAttribute( 'src', '' ); + await expect( enlargedImage ).toHaveAttribute( + 'src', + imageUploadedSrc + ); + + await expect( lightbox ).toBeHidden(); + } ); } ); test( 'lightbox should be overriden when link is configured for image', async ( { @@ -1116,24 +1240,24 @@ class ImageBlockUtils { constructor( { page } ) { /** @type {Page} */ this.page = page; + this.basePath = path.join( __dirname, '..', '..', '..', 'assets' ); this.TEST_IMAGE_FILE_PATH = path.join( - __dirname, - '..', - '..', - '..', - 'assets', + this.basePath, '10x10_e2e_test_image_z9T8jK.png' ); } - async upload( inputElement ) { + async upload( inputElement, customFile = null ) { const tmpDirectory = await fs.mkdtemp( path.join( os.tmpdir(), 'gutenberg-test-image-' ) ); const filename = uuid(); const tmpFileName = path.join( tmpDirectory, filename + '.png' ); - await fs.copyFile( this.TEST_IMAGE_FILE_PATH, tmpFileName ); + const filepath = customFile + ? path.join( this.basePath, customFile ) + : this.TEST_IMAGE_FILE_PATH; + await fs.copyFile( filepath, tmpFileName ); await inputElement.setInputFiles( tmpFileName ); From d9022ff7e4a3558cc764a8b2debe89ff1377a517 Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Wed, 5 Jul 2023 16:45:06 -0500 Subject: [PATCH 056/146] Drop PHP 5.6 CI jobs (#52345) * Remove PHP 5.6 PHPUnit CI job * Raise version in phpcs / WPCS --- .github/workflows/unit-test.yml | 1 - phpcs.xml.dist | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 9c93b6b93d98d..e222083a160e9 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -85,7 +85,6 @@ jobs: fail-fast: true matrix: php: - - '5.6' - '7.0' - '7.1' - '7.2' diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 6f40a38522ad6..9e44d5fea1347 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -2,7 +2,7 @@ Sniffs for WordPress plugins, with minor modifications for Gutenberg - + *\.php$ From 2dc8bfcdb285b98c0f0d6d737a714540bac64a1f Mon Sep 17 00:00:00 2001 From: Gutenberg Repository Automation Date: Wed, 5 Jul 2023 21:55:57 +0000 Subject: [PATCH 057/146] Bump plugin version to 16.2.0-rc.1 --- gutenberg.php | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gutenberg.php b/gutenberg.php index 8037b9acba9c8..c90c1d0bb22e8 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -5,7 +5,7 @@ * Description: Printing since 1440. This is the development plugin for the block editor, site editor, and other future WordPress core functionality. * Requires at least: 6.1 * Requires PHP: 5.6 - * Version: 16.1.1 + * Version: 16.2.0-rc.1 * Author: Gutenberg Team * Text Domain: gutenberg * diff --git a/package-lock.json b/package-lock.json index c58fbb4a7197b..31da77f8ca62d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gutenberg", - "version": "16.1.1", + "version": "16.2.0-rc.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 5abcc4a646c63..12d7d4ae6e64e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gutenberg", - "version": "16.1.1", + "version": "16.2.0-rc.1", "private": true, "description": "A new WordPress editor experience.", "author": "The WordPress Contributors", From 9fbc1ada318a6be30213db4ade6a8b8de7000210 Mon Sep 17 00:00:00 2001 From: Gutenberg Repository Automation Date: Wed, 5 Jul 2023 22:16:25 +0000 Subject: [PATCH 058/146] Update changelog files --- packages/a11y/CHANGELOG.md | 2 ++ packages/a11y/package.json | 2 +- packages/annotations/CHANGELOG.md | 2 ++ packages/annotations/package.json | 2 +- packages/api-fetch/CHANGELOG.md | 2 ++ packages/api-fetch/package.json | 2 +- packages/autop/CHANGELOG.md | 2 ++ packages/autop/package.json | 2 +- packages/babel-plugin-import-jsx-pragma/CHANGELOG.md | 2 ++ packages/babel-plugin-import-jsx-pragma/package.json | 2 +- packages/babel-plugin-makepot/CHANGELOG.md | 2 ++ packages/babel-plugin-makepot/package.json | 2 +- packages/babel-preset-default/CHANGELOG.md | 2 ++ packages/babel-preset-default/package.json | 2 +- packages/base-styles/CHANGELOG.md | 2 ++ packages/base-styles/package.json | 2 +- packages/blob/CHANGELOG.md | 2 ++ packages/blob/package.json | 2 +- packages/block-directory/CHANGELOG.md | 2 ++ packages/block-directory/package.json | 2 +- packages/block-editor/CHANGELOG.md | 2 ++ packages/block-editor/package.json | 2 +- packages/block-library/CHANGELOG.md | 2 ++ packages/block-library/package.json | 2 +- packages/block-serialization-default-parser/CHANGELOG.md | 2 ++ packages/block-serialization-default-parser/package.json | 2 +- packages/block-serialization-spec-parser/CHANGELOG.md | 2 ++ packages/block-serialization-spec-parser/package.json | 2 +- packages/blocks/CHANGELOG.md | 2 ++ packages/blocks/package.json | 2 +- packages/browserslist-config/CHANGELOG.md | 2 ++ packages/browserslist-config/package.json | 2 +- packages/commands/CHANGELOG.md | 2 ++ packages/commands/package.json | 2 +- packages/components/CHANGELOG.md | 2 ++ packages/components/package.json | 2 +- packages/compose/CHANGELOG.md | 2 ++ packages/compose/package.json | 2 +- packages/core-commands/CHANGELOG.md | 2 ++ packages/core-commands/package.json | 2 +- packages/core-data/CHANGELOG.md | 2 ++ packages/core-data/package.json | 2 +- packages/create-block-tutorial-template/CHANGELOG.md | 2 ++ packages/create-block-tutorial-template/package.json | 2 +- packages/create-block/CHANGELOG.md | 2 ++ packages/create-block/package.json | 2 +- packages/customize-widgets/CHANGELOG.md | 2 ++ packages/customize-widgets/package.json | 2 +- packages/data-controls/CHANGELOG.md | 2 ++ packages/data-controls/package.json | 2 +- packages/data/CHANGELOG.md | 2 ++ packages/data/package.json | 2 +- packages/date/CHANGELOG.md | 2 ++ packages/date/package.json | 2 +- packages/dependency-extraction-webpack-plugin/CHANGELOG.md | 2 ++ packages/dependency-extraction-webpack-plugin/package.json | 2 +- packages/deprecated/CHANGELOG.md | 2 ++ packages/deprecated/package.json | 2 +- packages/docgen/CHANGELOG.md | 2 ++ packages/docgen/package.json | 2 +- packages/dom-ready/CHANGELOG.md | 2 ++ packages/dom-ready/package.json | 2 +- packages/dom/CHANGELOG.md | 2 ++ packages/dom/package.json | 2 +- packages/e2e-test-utils-playwright/CHANGELOG.md | 2 ++ packages/e2e-test-utils-playwright/package.json | 2 +- packages/e2e-test-utils/CHANGELOG.md | 2 ++ packages/e2e-test-utils/package.json | 2 +- packages/e2e-tests/CHANGELOG.md | 2 ++ packages/e2e-tests/package.json | 2 +- packages/edit-post/CHANGELOG.md | 2 ++ packages/edit-post/package.json | 2 +- packages/edit-site/CHANGELOG.md | 2 ++ packages/edit-site/package.json | 2 +- packages/edit-widgets/CHANGELOG.md | 2 ++ packages/edit-widgets/package.json | 2 +- packages/editor/CHANGELOG.md | 2 ++ packages/editor/package.json | 2 +- packages/element/CHANGELOG.md | 2 ++ packages/element/package.json | 2 +- packages/env/CHANGELOG.md | 2 ++ packages/env/package.json | 2 +- packages/escape-html/CHANGELOG.md | 2 ++ packages/escape-html/package.json | 2 +- packages/eslint-plugin/CHANGELOG.md | 2 ++ packages/eslint-plugin/package.json | 2 +- packages/format-library/CHANGELOG.md | 2 ++ packages/format-library/package.json | 2 +- packages/hooks/CHANGELOG.md | 2 ++ packages/hooks/package.json | 2 +- packages/html-entities/CHANGELOG.md | 2 ++ packages/html-entities/package.json | 2 +- packages/i18n/CHANGELOG.md | 2 ++ packages/i18n/package.json | 2 +- packages/icons/CHANGELOG.md | 2 ++ packages/icons/package.json | 2 +- packages/interface/CHANGELOG.md | 2 ++ packages/interface/package.json | 2 +- packages/is-shallow-equal/CHANGELOG.md | 2 ++ packages/is-shallow-equal/package.json | 2 +- packages/jest-console/CHANGELOG.md | 2 ++ packages/jest-console/package.json | 2 +- packages/jest-preset-default/CHANGELOG.md | 2 ++ packages/jest-preset-default/package.json | 2 +- packages/jest-puppeteer-axe/CHANGELOG.md | 2 ++ packages/jest-puppeteer-axe/package.json | 2 +- packages/keyboard-shortcuts/CHANGELOG.md | 2 ++ packages/keyboard-shortcuts/package.json | 2 +- packages/keycodes/CHANGELOG.md | 2 ++ packages/keycodes/package.json | 2 +- packages/lazy-import/CHANGELOG.md | 2 ++ packages/lazy-import/package.json | 2 +- packages/list-reusable-blocks/CHANGELOG.md | 2 ++ packages/list-reusable-blocks/package.json | 2 +- packages/media-utils/CHANGELOG.md | 2 ++ packages/media-utils/package.json | 2 +- packages/notices/CHANGELOG.md | 2 ++ packages/notices/package.json | 2 +- packages/npm-package-json-lint-config/CHANGELOG.md | 2 ++ packages/npm-package-json-lint-config/package.json | 2 +- packages/plugins/CHANGELOG.md | 2 ++ packages/plugins/package.json | 2 +- packages/postcss-plugins-preset/CHANGELOG.md | 2 ++ packages/postcss-plugins-preset/package.json | 2 +- packages/postcss-themes/CHANGELOG.md | 2 ++ packages/postcss-themes/package.json | 2 +- packages/preferences-persistence/CHANGELOG.md | 2 ++ packages/preferences-persistence/package.json | 2 +- packages/preferences/CHANGELOG.md | 2 ++ packages/preferences/package.json | 2 +- packages/prettier-config/CHANGELOG.md | 2 ++ packages/prettier-config/package.json | 2 +- packages/primitives/CHANGELOG.md | 2 ++ packages/primitives/package.json | 2 +- packages/priority-queue/CHANGELOG.md | 2 ++ packages/priority-queue/package.json | 2 +- packages/private-apis/CHANGELOG.md | 2 ++ packages/private-apis/package.json | 2 +- packages/project-management-automation/CHANGELOG.md | 2 ++ packages/project-management-automation/package.json | 2 +- packages/react-i18n/CHANGELOG.md | 2 ++ packages/react-i18n/package.json | 2 +- packages/readable-js-assets-webpack-plugin/CHANGELOG.md | 2 ++ packages/readable-js-assets-webpack-plugin/package.json | 2 +- packages/redux-routine/CHANGELOG.md | 2 ++ packages/redux-routine/package.json | 2 +- packages/reusable-blocks/CHANGELOG.md | 2 ++ packages/reusable-blocks/package.json | 2 +- packages/rich-text/CHANGELOG.md | 2 ++ packages/rich-text/package.json | 2 +- packages/router/CHANGELOG.md | 2 ++ packages/router/package.json | 2 +- packages/scripts/CHANGELOG.md | 2 ++ packages/scripts/package.json | 2 +- packages/server-side-render/CHANGELOG.md | 2 ++ packages/server-side-render/package.json | 2 +- packages/shortcode/CHANGELOG.md | 2 ++ packages/shortcode/package.json | 2 +- packages/style-engine/CHANGELOG.md | 2 ++ packages/style-engine/package.json | 2 +- packages/stylelint-config/CHANGELOG.md | 2 ++ packages/stylelint-config/package.json | 2 +- packages/token-list/CHANGELOG.md | 2 ++ packages/token-list/package.json | 2 +- packages/url/CHANGELOG.md | 2 ++ packages/url/package.json | 2 +- packages/viewport/CHANGELOG.md | 2 ++ packages/viewport/package.json | 2 +- packages/warning/CHANGELOG.md | 2 ++ packages/warning/package.json | 2 +- packages/widgets/CHANGELOG.md | 2 ++ packages/widgets/package.json | 2 +- packages/wordcount/CHANGELOG.md | 2 ++ packages/wordcount/package.json | 2 +- 174 files changed, 261 insertions(+), 87 deletions(-) diff --git a/packages/a11y/CHANGELOG.md b/packages/a11y/CHANGELOG.md index 98c87f9cf0444..69525636d8a8e 100644 --- a/packages/a11y/CHANGELOG.md +++ b/packages/a11y/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.37.0 (2023-07-05) + ## 3.36.0 (2023-06-23) ## 3.35.0 (2023-06-07) diff --git a/packages/a11y/package.json b/packages/a11y/package.json index d6f0690a5bb00..c318cd2d6e9ac 100644 --- a/packages/a11y/package.json +++ b/packages/a11y/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/a11y", - "version": "3.36.0", + "version": "3.37.0-prerelease", "description": "Accessibility (a11y) utilities for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/annotations/CHANGELOG.md b/packages/annotations/CHANGELOG.md index 3f98aba331580..a93d4a16a75d9 100644 --- a/packages/annotations/CHANGELOG.md +++ b/packages/annotations/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 2.37.0 (2023-07-05) + ## 2.36.0 (2023-06-23) ## 2.35.0 (2023-06-07) diff --git a/packages/annotations/package.json b/packages/annotations/package.json index b8f586b187725..e3dcd5ed01bf7 100644 --- a/packages/annotations/package.json +++ b/packages/annotations/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/annotations", - "version": "2.36.0", + "version": "2.37.0-prerelease", "description": "Annotate content in the Gutenberg editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/api-fetch/CHANGELOG.md b/packages/api-fetch/CHANGELOG.md index b25f69fb4f5fc..6a86ed587766b 100644 --- a/packages/api-fetch/CHANGELOG.md +++ b/packages/api-fetch/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 6.34.0 (2023-07-05) + ## 6.33.0 (2023-06-23) ## 6.32.0 (2023-06-07) diff --git a/packages/api-fetch/package.json b/packages/api-fetch/package.json index 68ee06ae8bc79..70fc99318c2b1 100644 --- a/packages/api-fetch/package.json +++ b/packages/api-fetch/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/api-fetch", - "version": "6.33.0", + "version": "6.34.0-prerelease", "description": "Utility to make WordPress REST API requests.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/autop/CHANGELOG.md b/packages/autop/CHANGELOG.md index d089ca46fe2b0..b27ac27a31cef 100644 --- a/packages/autop/CHANGELOG.md +++ b/packages/autop/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.37.0 (2023-07-05) + ## 3.36.0 (2023-06-23) ## 3.35.0 (2023-06-07) diff --git a/packages/autop/package.json b/packages/autop/package.json index f7c5fa2d5a3a2..c7e4fa68dd471 100644 --- a/packages/autop/package.json +++ b/packages/autop/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/autop", - "version": "3.36.0", + "version": "3.37.0-prerelease", "description": "WordPress's automatic paragraph functions `autop` and `removep`.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md b/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md index 354c9c51d5cac..9b27925294531 100644 --- a/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md +++ b/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.20.0 (2023-07-05) + ## 4.19.0 (2023-06-23) ## 4.18.0 (2023-06-07) diff --git a/packages/babel-plugin-import-jsx-pragma/package.json b/packages/babel-plugin-import-jsx-pragma/package.json index f4c87b4ad0c83..970e86b552219 100644 --- a/packages/babel-plugin-import-jsx-pragma/package.json +++ b/packages/babel-plugin-import-jsx-pragma/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/babel-plugin-import-jsx-pragma", - "version": "4.19.0", + "version": "4.20.0-prerelease", "description": "Babel transform plugin for automatically injecting an import to be used as the pragma for the React JSX Transform plugin.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/babel-plugin-makepot/CHANGELOG.md b/packages/babel-plugin-makepot/CHANGELOG.md index 19c6d8217fd66..aba48ba23c847 100644 --- a/packages/babel-plugin-makepot/CHANGELOG.md +++ b/packages/babel-plugin-makepot/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.21.0 (2023-07-05) + ## 5.20.0 (2023-06-23) ## 5.19.0 (2023-06-07) diff --git a/packages/babel-plugin-makepot/package.json b/packages/babel-plugin-makepot/package.json index 8009a3797bcb2..960ff118da5ee 100644 --- a/packages/babel-plugin-makepot/package.json +++ b/packages/babel-plugin-makepot/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/babel-plugin-makepot", - "version": "5.20.0", + "version": "5.21.0-prerelease", "description": "WordPress Babel internationalization (i18n) plugin.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/babel-preset-default/CHANGELOG.md b/packages/babel-preset-default/CHANGELOG.md index 4a9c7c7616d35..698f48a0b03b7 100644 --- a/packages/babel-preset-default/CHANGELOG.md +++ b/packages/babel-preset-default/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 7.21.0 (2023-07-05) + ## 7.20.0 (2023-06-23) ## 7.19.0 (2023-06-07) diff --git a/packages/babel-preset-default/package.json b/packages/babel-preset-default/package.json index a519772e853ad..28615cf6a7403 100644 --- a/packages/babel-preset-default/package.json +++ b/packages/babel-preset-default/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/babel-preset-default", - "version": "7.20.0", + "version": "7.21.0-prerelease", "description": "Default Babel preset for WordPress development.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/base-styles/CHANGELOG.md b/packages/base-styles/CHANGELOG.md index f0add1ac033f1..6d30378441337 100644 --- a/packages/base-styles/CHANGELOG.md +++ b/packages/base-styles/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.28.0 (2023-07-05) + ## 4.27.0 (2023-06-23) ## 4.26.0 (2023-06-07) diff --git a/packages/base-styles/package.json b/packages/base-styles/package.json index e0b1fd5624fd9..943a9c5ba72b5 100644 --- a/packages/base-styles/package.json +++ b/packages/base-styles/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/base-styles", - "version": "4.27.0", + "version": "4.28.0-prerelease", "description": "Base SCSS utilities and variables for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/blob/CHANGELOG.md b/packages/blob/CHANGELOG.md index ce0e2a0cae35d..3939d966df584 100644 --- a/packages/blob/CHANGELOG.md +++ b/packages/blob/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.37.0 (2023-07-05) + ## 3.36.0 (2023-06-23) ## 3.35.0 (2023-06-07) diff --git a/packages/blob/package.json b/packages/blob/package.json index 56d1b67f37aab..1c958e7d4cb0f 100644 --- a/packages/blob/package.json +++ b/packages/blob/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/blob", - "version": "3.36.0", + "version": "3.37.0-prerelease", "description": "Blob utilities for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-directory/CHANGELOG.md b/packages/block-directory/CHANGELOG.md index 3614d2137dd65..34abf900ac261 100644 --- a/packages/block-directory/CHANGELOG.md +++ b/packages/block-directory/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.14.0 (2023-07-05) + ## 4.13.0 (2023-06-23) ## 4.12.0 (2023-06-07) diff --git a/packages/block-directory/package.json b/packages/block-directory/package.json index 54ddb76259801..1349cac080605 100644 --- a/packages/block-directory/package.json +++ b/packages/block-directory/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-directory", - "version": "4.13.0", + "version": "4.14.0-prerelease", "description": "Extend editor with block directory features to search, download and install blocks.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-editor/CHANGELOG.md b/packages/block-editor/CHANGELOG.md index c3a92fae4bfbd..67ce1c53a3e83 100644 --- a/packages/block-editor/CHANGELOG.md +++ b/packages/block-editor/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 12.5.0 (2023-07-05) + ## 12.4.0 (2023-06-23) ### Enhancements diff --git a/packages/block-editor/package.json b/packages/block-editor/package.json index 634419c87954a..c3bb47c4bc045 100644 --- a/packages/block-editor/package.json +++ b/packages/block-editor/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-editor", - "version": "12.4.0", + "version": "12.5.0-prerelease", "description": "Generic block editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-library/CHANGELOG.md b/packages/block-library/CHANGELOG.md index 12d3e9ce980be..fa26d4a346ceb 100644 --- a/packages/block-library/CHANGELOG.md +++ b/packages/block-library/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 8.14.0 (2023-07-05) + ## 8.13.0 (2023-06-23) ## 8.12.0 (2023-06-07) diff --git a/packages/block-library/package.json b/packages/block-library/package.json index 2c33e22d0e0fb..386cd765da113 100644 --- a/packages/block-library/package.json +++ b/packages/block-library/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-library", - "version": "8.13.0", + "version": "8.14.0-prerelease", "description": "Block library for the WordPress editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-serialization-default-parser/CHANGELOG.md b/packages/block-serialization-default-parser/CHANGELOG.md index 6a1e83fff5ab3..d3ca0243114f9 100644 --- a/packages/block-serialization-default-parser/CHANGELOG.md +++ b/packages/block-serialization-default-parser/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.37.0 (2023-07-05) + ## 4.36.0 (2023-06-23) ## 4.35.0 (2023-06-07) diff --git a/packages/block-serialization-default-parser/package.json b/packages/block-serialization-default-parser/package.json index b170b16f02770..272aaac138a68 100644 --- a/packages/block-serialization-default-parser/package.json +++ b/packages/block-serialization-default-parser/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-serialization-default-parser", - "version": "4.36.0", + "version": "4.37.0-prerelease", "description": "Block serialization specification parser for WordPress posts.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-serialization-spec-parser/CHANGELOG.md b/packages/block-serialization-spec-parser/CHANGELOG.md index 944bb874da02b..8f3d032be39c6 100644 --- a/packages/block-serialization-spec-parser/CHANGELOG.md +++ b/packages/block-serialization-spec-parser/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.37.0 (2023-07-05) + ## 4.36.0 (2023-06-23) ## 4.35.0 (2023-06-07) diff --git a/packages/block-serialization-spec-parser/package.json b/packages/block-serialization-spec-parser/package.json index 8c8653198d348..c5853b0d5c75c 100644 --- a/packages/block-serialization-spec-parser/package.json +++ b/packages/block-serialization-spec-parser/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-serialization-spec-parser", - "version": "4.36.0", + "version": "4.37.0-prerelease", "description": "Block serialization specification parser for WordPress posts.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/blocks/CHANGELOG.md b/packages/blocks/CHANGELOG.md index f26e897aebbd0..249b254a92fa4 100644 --- a/packages/blocks/CHANGELOG.md +++ b/packages/blocks/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 12.14.0 (2023-07-05) + ## 12.13.0 (2023-06-23) ## 12.12.0 (2023-06-07) diff --git a/packages/blocks/package.json b/packages/blocks/package.json index 582774a9d6a1c..959fe9f510928 100644 --- a/packages/blocks/package.json +++ b/packages/blocks/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/blocks", - "version": "12.13.0", + "version": "12.14.0-prerelease", "description": "Block API for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/browserslist-config/CHANGELOG.md b/packages/browserslist-config/CHANGELOG.md index cf43f3751f74b..ce9ff2903239b 100644 --- a/packages/browserslist-config/CHANGELOG.md +++ b/packages/browserslist-config/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.20.0 (2023-07-05) + ## 5.19.0 (2023-06-23) ## 5.18.0 (2023-06-07) diff --git a/packages/browserslist-config/package.json b/packages/browserslist-config/package.json index d90ecf77f0ce0..ee6e1457f1a6b 100644 --- a/packages/browserslist-config/package.json +++ b/packages/browserslist-config/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/browserslist-config", - "version": "5.19.0", + "version": "5.20.0-prerelease", "description": "WordPress Browserslist shared configuration.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/commands/CHANGELOG.md b/packages/commands/CHANGELOG.md index e76f27c9d787b..1645fa29f2b44 100644 --- a/packages/commands/CHANGELOG.md +++ b/packages/commands/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 0.8.0 (2023-07-05) + ## 0.7.0 (2023-06-23) ## 0.6.0 (2023-06-07) diff --git a/packages/commands/package.json b/packages/commands/package.json index 92d7cd61bd16c..cfd7b1a620c93 100644 --- a/packages/commands/package.json +++ b/packages/commands/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/commands", - "version": "0.7.0", + "version": "0.8.0-prerelease", "description": "Handles the commands menu.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index c83fe7fc5ea82..03f0ad1563448 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 25.3.0 (2023-07-05) + ### Enhancements - `SelectControl`: Added option to set hidden options. ([#51545](https://github.com/WordPress/gutenberg/pull/51545)) diff --git a/packages/components/package.json b/packages/components/package.json index 3b2ffe6355e4f..107dffec9dee7 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/components", - "version": "25.2.0", + "version": "25.3.0-prerelease", "description": "UI components for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/compose/CHANGELOG.md b/packages/compose/CHANGELOG.md index dd09c0f94a229..7750b279efdd7 100644 --- a/packages/compose/CHANGELOG.md +++ b/packages/compose/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 6.14.0 (2023-07-05) + ## 6.13.0 (2023-06-23) ## 6.12.0 (2023-06-07) diff --git a/packages/compose/package.json b/packages/compose/package.json index 6fc4d8c9db746..56327b248e3cf 100644 --- a/packages/compose/package.json +++ b/packages/compose/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/compose", - "version": "6.13.0", + "version": "6.14.0-prerelease", "description": "WordPress higher-order components (HOCs).", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/core-commands/CHANGELOG.md b/packages/core-commands/CHANGELOG.md index 7f958692b8b51..b0c207cf0fada 100644 --- a/packages/core-commands/CHANGELOG.md +++ b/packages/core-commands/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 0.6.0 (2023-07-05) + ## 0.5.0 (2023-06-23) ## 0.4.0 (2023-06-07) diff --git a/packages/core-commands/package.json b/packages/core-commands/package.json index ed06ff22c3fd8..1221b95106a39 100644 --- a/packages/core-commands/package.json +++ b/packages/core-commands/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/core-commands", - "version": "0.5.0", + "version": "0.6.0-prerelease", "description": "WordPress core reusable commands.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/core-data/CHANGELOG.md b/packages/core-data/CHANGELOG.md index 5b6d9857dfdc3..025827081db64 100644 --- a/packages/core-data/CHANGELOG.md +++ b/packages/core-data/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 6.14.0 (2023-07-05) + ## 6.13.0 (2023-06-23) ## 6.12.0 (2023-06-07) diff --git a/packages/core-data/package.json b/packages/core-data/package.json index a5b9572e275bc..aa0f9d2ef68a5 100644 --- a/packages/core-data/package.json +++ b/packages/core-data/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/core-data", - "version": "6.13.0", + "version": "6.14.0-prerelease", "description": "Access to and manipulation of core WordPress entities.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/create-block-tutorial-template/CHANGELOG.md b/packages/create-block-tutorial-template/CHANGELOG.md index 57eb9ae327f32..8d2617e4e5e9a 100644 --- a/packages/create-block-tutorial-template/CHANGELOG.md +++ b/packages/create-block-tutorial-template/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 2.25.0 (2023-07-05) + ## 2.24.0 (2023-06-23) ## 2.23.0 (2023-06-07) diff --git a/packages/create-block-tutorial-template/package.json b/packages/create-block-tutorial-template/package.json index 7ef3faad89e1d..f3b49c9ac6fc2 100644 --- a/packages/create-block-tutorial-template/package.json +++ b/packages/create-block-tutorial-template/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/create-block-tutorial-template", - "version": "2.24.0", + "version": "2.25.0-prerelease", "description": "Template for @wordpress/create-block used in the official WordPress tutorial.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/create-block/CHANGELOG.md b/packages/create-block/CHANGELOG.md index 96835f0de98a9..5044041b949b2 100644 --- a/packages/create-block/CHANGELOG.md +++ b/packages/create-block/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.21.0 (2023-07-05) + ## 4.20.0 (2023-06-23) ## 4.19.0 (2023-06-07) diff --git a/packages/create-block/package.json b/packages/create-block/package.json index 8a8bae31a334e..53d4ef7ed1c09 100644 --- a/packages/create-block/package.json +++ b/packages/create-block/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/create-block", - "version": "4.20.0", + "version": "4.21.0-prerelease", "description": "Generates PHP, JS and CSS code for registering a block for a WordPress plugin.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/customize-widgets/CHANGELOG.md b/packages/customize-widgets/CHANGELOG.md index 3eec6f2645134..45a77305107b3 100644 --- a/packages/customize-widgets/CHANGELOG.md +++ b/packages/customize-widgets/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.14.0 (2023-07-05) + ## 4.13.0 (2023-06-23) ## 4.12.0 (2023-06-07) diff --git a/packages/customize-widgets/package.json b/packages/customize-widgets/package.json index a931608031953..b4e2b87617d6d 100644 --- a/packages/customize-widgets/package.json +++ b/packages/customize-widgets/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/customize-widgets", - "version": "4.13.0", + "version": "4.14.0-prerelease", "description": "Widgets blocks in Customizer Module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/data-controls/CHANGELOG.md b/packages/data-controls/CHANGELOG.md index 57c16160b19eb..b2d3fc117207b 100644 --- a/packages/data-controls/CHANGELOG.md +++ b/packages/data-controls/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.6.0 (2023-07-05) + ## 3.5.0 (2023-06-23) ## 3.4.0 (2023-06-07) diff --git a/packages/data-controls/package.json b/packages/data-controls/package.json index 277e13e080c7a..67a424c9ffc7c 100644 --- a/packages/data-controls/package.json +++ b/packages/data-controls/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/data-controls", - "version": "3.5.0", + "version": "3.6.0-prerelease", "description": "A set of common controls for the @wordpress/data api.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/data/CHANGELOG.md b/packages/data/CHANGELOG.md index 6b1fb31679157..54d18172e42b3 100644 --- a/packages/data/CHANGELOG.md +++ b/packages/data/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 9.7.0 (2023-07-05) + ## 9.6.0 (2023-06-23) ## 9.5.0 (2023-06-07) diff --git a/packages/data/package.json b/packages/data/package.json index b151115dca76d..76f3aad050b77 100644 --- a/packages/data/package.json +++ b/packages/data/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/data", - "version": "9.6.0", + "version": "9.7.0-prerelease", "description": "Data module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/date/CHANGELOG.md b/packages/date/CHANGELOG.md index a20b8a26ace6c..a81474839cb26 100644 --- a/packages/date/CHANGELOG.md +++ b/packages/date/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.37.0 (2023-07-05) + ## 4.36.0 (2023-06-23) ## 4.35.0 (2023-06-07) diff --git a/packages/date/package.json b/packages/date/package.json index f371b82c33603..92c34ff29fdb0 100644 --- a/packages/date/package.json +++ b/packages/date/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/date", - "version": "4.36.0", + "version": "4.37.0-prerelease", "description": "Date module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/dependency-extraction-webpack-plugin/CHANGELOG.md b/packages/dependency-extraction-webpack-plugin/CHANGELOG.md index d67b4a4569822..74fbd51bb0f36 100644 --- a/packages/dependency-extraction-webpack-plugin/CHANGELOG.md +++ b/packages/dependency-extraction-webpack-plugin/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.20.0 (2023-07-05) + ## 4.19.0 (2023-06-23) ## 4.18.0 (2023-06-07) diff --git a/packages/dependency-extraction-webpack-plugin/package.json b/packages/dependency-extraction-webpack-plugin/package.json index 59f312b0fffd1..0fe37128090a7 100644 --- a/packages/dependency-extraction-webpack-plugin/package.json +++ b/packages/dependency-extraction-webpack-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/dependency-extraction-webpack-plugin", - "version": "4.19.0", + "version": "4.20.0-prerelease", "description": "Extract WordPress script dependencies from webpack bundles.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/deprecated/CHANGELOG.md b/packages/deprecated/CHANGELOG.md index 7d4bd62d699f8..ae4cc1fccc3e1 100644 --- a/packages/deprecated/CHANGELOG.md +++ b/packages/deprecated/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.37.0 (2023-07-05) + ## 3.36.0 (2023-06-23) ## 3.35.0 (2023-06-07) diff --git a/packages/deprecated/package.json b/packages/deprecated/package.json index c59a1acaa8a05..6884b60d427e7 100644 --- a/packages/deprecated/package.json +++ b/packages/deprecated/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/deprecated", - "version": "3.36.0", + "version": "3.37.0-prerelease", "description": "Deprecation utility for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/docgen/CHANGELOG.md b/packages/docgen/CHANGELOG.md index 93b3f41495b84..7cc252c98b0b0 100644 --- a/packages/docgen/CHANGELOG.md +++ b/packages/docgen/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 1.46.0 (2023-07-05) + ## 1.45.0 (2023-06-23) ## 1.44.0 (2023-06-07) diff --git a/packages/docgen/package.json b/packages/docgen/package.json index 9809d771b596d..e2a8e7be282e4 100644 --- a/packages/docgen/package.json +++ b/packages/docgen/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/docgen", - "version": "1.45.0", + "version": "1.46.0-prerelease", "description": "Autogenerate public API documentation from exports and JSDoc comments.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/dom-ready/CHANGELOG.md b/packages/dom-ready/CHANGELOG.md index d270c829083ef..fa80e8aa49336 100644 --- a/packages/dom-ready/CHANGELOG.md +++ b/packages/dom-ready/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.37.0 (2023-07-05) + ## 3.36.0 (2023-06-23) ## 3.35.0 (2023-06-07) diff --git a/packages/dom-ready/package.json b/packages/dom-ready/package.json index d839cc32a3c90..6238094553ac9 100644 --- a/packages/dom-ready/package.json +++ b/packages/dom-ready/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/dom-ready", - "version": "3.36.0", + "version": "3.37.0-prerelease", "description": "Execute callback after the DOM is loaded.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/dom/CHANGELOG.md b/packages/dom/CHANGELOG.md index 7ca2d79a9cdd8..542f2f12b9142 100644 --- a/packages/dom/CHANGELOG.md +++ b/packages/dom/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.37.0 (2023-07-05) + ## 3.36.0 (2023-06-23) ## 3.35.0 (2023-06-07) diff --git a/packages/dom/package.json b/packages/dom/package.json index 6475b8844783f..17d06653cfc18 100644 --- a/packages/dom/package.json +++ b/packages/dom/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/dom", - "version": "3.36.0", + "version": "3.37.0-prerelease", "description": "DOM utilities module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/e2e-test-utils-playwright/CHANGELOG.md b/packages/e2e-test-utils-playwright/CHANGELOG.md index 157e3e21cbf63..7f55bbad7c818 100644 --- a/packages/e2e-test-utils-playwright/CHANGELOG.md +++ b/packages/e2e-test-utils-playwright/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 0.5.0 (2023-07-05) + ## 0.4.0 (2023-06-23) ## 0.3.0 (2023-06-07) diff --git a/packages/e2e-test-utils-playwright/package.json b/packages/e2e-test-utils-playwright/package.json index ab82d13356627..44e91e890811c 100644 --- a/packages/e2e-test-utils-playwright/package.json +++ b/packages/e2e-test-utils-playwright/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/e2e-test-utils-playwright", - "version": "0.4.0", + "version": "0.5.0-prerelease", "description": "End-To-End (E2E) test utils for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/e2e-test-utils/CHANGELOG.md b/packages/e2e-test-utils/CHANGELOG.md index 643b335f88324..e5a7bd3819017 100644 --- a/packages/e2e-test-utils/CHANGELOG.md +++ b/packages/e2e-test-utils/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 10.8.0 (2023-07-05) + ## 10.7.0 (2023-06-23) ## 10.6.0 (2023-06-07) diff --git a/packages/e2e-test-utils/package.json b/packages/e2e-test-utils/package.json index 69fa428544418..83a7e69cdb481 100644 --- a/packages/e2e-test-utils/package.json +++ b/packages/e2e-test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/e2e-test-utils", - "version": "10.7.0", + "version": "10.8.0-prerelease", "description": "End-To-End (E2E) test utils for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/e2e-tests/CHANGELOG.md b/packages/e2e-tests/CHANGELOG.md index b8a2cfdbb8f55..c591ca9caa0bd 100644 --- a/packages/e2e-tests/CHANGELOG.md +++ b/packages/e2e-tests/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 7.8.0 (2023-07-05) + ## 7.7.0 (2023-06-23) ## 7.6.0 (2023-06-07) diff --git a/packages/e2e-tests/package.json b/packages/e2e-tests/package.json index de9108f1b59a9..b7af51a53bf48 100644 --- a/packages/e2e-tests/package.json +++ b/packages/e2e-tests/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/e2e-tests", - "version": "7.7.0", + "version": "7.8.0-prerelease", "description": "End-To-End (E2E) tests for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/edit-post/CHANGELOG.md b/packages/edit-post/CHANGELOG.md index bdeb9086a2dd7..5ddb12e69276d 100644 --- a/packages/edit-post/CHANGELOG.md +++ b/packages/edit-post/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 7.14.0 (2023-07-05) + ## 7.13.0 (2023-06-23) ## 7.12.0 (2023-06-07) diff --git a/packages/edit-post/package.json b/packages/edit-post/package.json index d4f9cb16bd050..acb0868169c24 100644 --- a/packages/edit-post/package.json +++ b/packages/edit-post/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/edit-post", - "version": "7.13.0", + "version": "7.14.0-prerelease", "description": "Edit Post module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/edit-site/CHANGELOG.md b/packages/edit-site/CHANGELOG.md index 55497a651f92d..cc77bca0e7375 100644 --- a/packages/edit-site/CHANGELOG.md +++ b/packages/edit-site/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.14.0 (2023-07-05) + ## 5.13.0 (2023-06-23) ### Enhancements diff --git a/packages/edit-site/package.json b/packages/edit-site/package.json index 0b5560a277839..fb1b070b6d46b 100644 --- a/packages/edit-site/package.json +++ b/packages/edit-site/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/edit-site", - "version": "5.13.0", + "version": "5.14.0-prerelease", "description": "Edit Site Page module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/edit-widgets/CHANGELOG.md b/packages/edit-widgets/CHANGELOG.md index ffbaf78b4c7b7..09c4fe9e6629d 100644 --- a/packages/edit-widgets/CHANGELOG.md +++ b/packages/edit-widgets/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.14.0 (2023-07-05) + ## 5.13.0 (2023-06-23) ## 5.12.0 (2023-06-07) diff --git a/packages/edit-widgets/package.json b/packages/edit-widgets/package.json index 78a20158a4470..1f90021d8dbbc 100644 --- a/packages/edit-widgets/package.json +++ b/packages/edit-widgets/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/edit-widgets", - "version": "5.13.0", + "version": "5.14.0-prerelease", "description": "Widgets Page module for WordPress..", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/editor/CHANGELOG.md b/packages/editor/CHANGELOG.md index 25bbf0b65bfe0..804d801e69e72 100644 --- a/packages/editor/CHANGELOG.md +++ b/packages/editor/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 13.14.0 (2023-07-05) + ## 13.13.0 (2023-06-23) ## 13.12.0 (2023-06-07) diff --git a/packages/editor/package.json b/packages/editor/package.json index 89b6496bbadd7..911917aa1e1fa 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/editor", - "version": "13.13.0", + "version": "13.14.0-prerelease", "description": "Enhanced block editor for WordPress posts.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/element/CHANGELOG.md b/packages/element/CHANGELOG.md index 7512e88b669de..42b13b085bc95 100644 --- a/packages/element/CHANGELOG.md +++ b/packages/element/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.14.0 (2023-07-05) + ## 5.13.0 (2023-06-23) ## 5.12.0 (2023-06-07) diff --git a/packages/element/package.json b/packages/element/package.json index d40d57ed168fd..909cd9be4fd96 100644 --- a/packages/element/package.json +++ b/packages/element/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/element", - "version": "5.13.0", + "version": "5.14.0-prerelease", "description": "Element React module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/env/CHANGELOG.md b/packages/env/CHANGELOG.md index fe680d7b4e846..ae968b021f8bc 100644 --- a/packages/env/CHANGELOG.md +++ b/packages/env/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 8.3.0 (2023-07-05) + ## 8.2.0 (2023-06-23) ## 8.1.1 (2023-06-17) diff --git a/packages/env/package.json b/packages/env/package.json index 67b12d17dfb56..f894f29711a71 100644 --- a/packages/env/package.json +++ b/packages/env/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/env", - "version": "8.2.0", + "version": "8.3.0-prerelease", "description": "A zero-config, self contained local WordPress environment for development and testing.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/escape-html/CHANGELOG.md b/packages/escape-html/CHANGELOG.md index 367fe2120d21b..5fb4034775e47 100644 --- a/packages/escape-html/CHANGELOG.md +++ b/packages/escape-html/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 2.37.0 (2023-07-05) + ## 2.36.0 (2023-06-23) ## 2.35.0 (2023-06-07) diff --git a/packages/escape-html/package.json b/packages/escape-html/package.json index fbb2755e439ea..155648a0e864f 100644 --- a/packages/escape-html/package.json +++ b/packages/escape-html/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/escape-html", - "version": "2.36.0", + "version": "2.37.0-prerelease", "description": "Escape HTML utils.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index e5da507e40a16..5fa435458f455 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 14.10.0 (2023-07-05) + ## 14.9.0 (2023-06-23) ## 14.8.0 (2023-06-07) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 5dc7b4b7fe482..c309a212809b2 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/eslint-plugin", - "version": "14.9.0", + "version": "14.10.0-prerelease", "description": "ESLint plugin for WordPress development.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/format-library/CHANGELOG.md b/packages/format-library/CHANGELOG.md index 5730e4beb7458..6e78532f89f6a 100644 --- a/packages/format-library/CHANGELOG.md +++ b/packages/format-library/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.14.0 (2023-07-05) + ## 4.13.0 (2023-06-23) ## 4.12.0 (2023-06-07) diff --git a/packages/format-library/package.json b/packages/format-library/package.json index 902ac7fbbe36f..0c036461c5745 100644 --- a/packages/format-library/package.json +++ b/packages/format-library/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/format-library", - "version": "4.13.0", + "version": "4.14.0-prerelease", "description": "Format library for the WordPress editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/hooks/CHANGELOG.md b/packages/hooks/CHANGELOG.md index efbb7b009272c..d04a3234e047f 100644 --- a/packages/hooks/CHANGELOG.md +++ b/packages/hooks/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.37.0 (2023-07-05) + ## 3.36.0 (2023-06-23) ## 3.35.0 (2023-06-07) diff --git a/packages/hooks/package.json b/packages/hooks/package.json index 9cf064c801333..1bdb0663f2aff 100644 --- a/packages/hooks/package.json +++ b/packages/hooks/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/hooks", - "version": "3.36.0", + "version": "3.37.0-prerelease", "description": "WordPress hooks library.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/html-entities/CHANGELOG.md b/packages/html-entities/CHANGELOG.md index 1dcbc63379fe1..bbcb7ff697ebd 100644 --- a/packages/html-entities/CHANGELOG.md +++ b/packages/html-entities/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.37.0 (2023-07-05) + ## 3.36.0 (2023-06-23) ## 3.35.0 (2023-06-07) diff --git a/packages/html-entities/package.json b/packages/html-entities/package.json index 264c071d438a4..e440d02451fdc 100644 --- a/packages/html-entities/package.json +++ b/packages/html-entities/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/html-entities", - "version": "3.36.0", + "version": "3.37.0-prerelease", "description": "HTML entity utilities for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/i18n/CHANGELOG.md b/packages/i18n/CHANGELOG.md index 9b4b0db86019c..647b816ad47ea 100644 --- a/packages/i18n/CHANGELOG.md +++ b/packages/i18n/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.37.0 (2023-07-05) + ## 4.36.0 (2023-06-23) ## 4.35.0 (2023-06-07) diff --git a/packages/i18n/package.json b/packages/i18n/package.json index 06281ebccc321..14e4817048ea2 100644 --- a/packages/i18n/package.json +++ b/packages/i18n/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/i18n", - "version": "4.36.0", + "version": "4.37.0-prerelease", "description": "WordPress internationalization (i18n) library.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/icons/CHANGELOG.md b/packages/icons/CHANGELOG.md index d993d7056337d..e1c6ef1fe707b 100644 --- a/packages/icons/CHANGELOG.md +++ b/packages/icons/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 9.28.0 (2023-07-05) + ## 9.27.0 (2023-06-23) ## 9.26.0 (2023-06-07) diff --git a/packages/icons/package.json b/packages/icons/package.json index 1ced62d92cfe4..e877d6a88c522 100644 --- a/packages/icons/package.json +++ b/packages/icons/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/icons", - "version": "9.27.0", + "version": "9.28.0-prerelease", "description": "WordPress Icons package, based on dashicon.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/interface/CHANGELOG.md b/packages/interface/CHANGELOG.md index e6e3947180821..fb45db0f5bed7 100644 --- a/packages/interface/CHANGELOG.md +++ b/packages/interface/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.14.0 (2023-07-05) + ## 5.13.0 (2023-06-23) ## 5.12.0 (2023-06-07) diff --git a/packages/interface/package.json b/packages/interface/package.json index 76240850da466..324094de683cc 100644 --- a/packages/interface/package.json +++ b/packages/interface/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/interface", - "version": "5.13.0", + "version": "5.14.0-prerelease", "description": "Interface module for WordPress. The package contains shared functionality across the modern JavaScript-based WordPress screens.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/is-shallow-equal/CHANGELOG.md b/packages/is-shallow-equal/CHANGELOG.md index 7f8453c14ef01..50273b66df1eb 100644 --- a/packages/is-shallow-equal/CHANGELOG.md +++ b/packages/is-shallow-equal/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.37.0 (2023-07-05) + ## 4.36.0 (2023-06-23) ## 4.35.0 (2023-06-07) diff --git a/packages/is-shallow-equal/package.json b/packages/is-shallow-equal/package.json index c0acfa6352f26..6370deab9e656 100644 --- a/packages/is-shallow-equal/package.json +++ b/packages/is-shallow-equal/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/is-shallow-equal", - "version": "4.36.0", + "version": "4.37.0-prerelease", "description": "Test for shallow equality between two objects or arrays.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/jest-console/CHANGELOG.md b/packages/jest-console/CHANGELOG.md index 92711da2c80b8..7816bd368351b 100644 --- a/packages/jest-console/CHANGELOG.md +++ b/packages/jest-console/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 7.8.0 (2023-07-05) + ## 7.7.0 (2023-06-23) ## 7.6.0 (2023-06-07) diff --git a/packages/jest-console/package.json b/packages/jest-console/package.json index 3fd951a982377..168261acfff6a 100644 --- a/packages/jest-console/package.json +++ b/packages/jest-console/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/jest-console", - "version": "7.7.0", + "version": "7.8.0-prerelease", "description": "Custom Jest matchers for the Console object.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/jest-preset-default/CHANGELOG.md b/packages/jest-preset-default/CHANGELOG.md index af775dd7d9aee..b6e62348b170f 100644 --- a/packages/jest-preset-default/CHANGELOG.md +++ b/packages/jest-preset-default/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 11.8.0 (2023-07-05) + ## 11.7.0 (2023-06-23) ## 11.6.0 (2023-06-07) diff --git a/packages/jest-preset-default/package.json b/packages/jest-preset-default/package.json index e0e2ff33587e9..f97dcddcdc594 100644 --- a/packages/jest-preset-default/package.json +++ b/packages/jest-preset-default/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/jest-preset-default", - "version": "11.7.0", + "version": "11.8.0-prerelease", "description": "Default Jest preset for WordPress development.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/jest-puppeteer-axe/CHANGELOG.md b/packages/jest-puppeteer-axe/CHANGELOG.md index 0ad708658f82d..ae15de6401561 100644 --- a/packages/jest-puppeteer-axe/CHANGELOG.md +++ b/packages/jest-puppeteer-axe/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 6.8.0 (2023-07-05) + ## 6.7.0 (2023-06-23) ## 6.6.0 (2023-06-07) diff --git a/packages/jest-puppeteer-axe/package.json b/packages/jest-puppeteer-axe/package.json index 90936135de563..5d2569e47354a 100644 --- a/packages/jest-puppeteer-axe/package.json +++ b/packages/jest-puppeteer-axe/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/jest-puppeteer-axe", - "version": "6.7.0", + "version": "6.8.0-prerelease", "description": "Axe API integration with Jest and Puppeteer.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/keyboard-shortcuts/CHANGELOG.md b/packages/keyboard-shortcuts/CHANGELOG.md index ab7d37c8d9865..b9266bf968cda 100644 --- a/packages/keyboard-shortcuts/CHANGELOG.md +++ b/packages/keyboard-shortcuts/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.14.0 (2023-07-05) + ## 4.13.0 (2023-06-23) ## 4.12.0 (2023-06-07) diff --git a/packages/keyboard-shortcuts/package.json b/packages/keyboard-shortcuts/package.json index dfa109be9276e..450a371c8e8bf 100644 --- a/packages/keyboard-shortcuts/package.json +++ b/packages/keyboard-shortcuts/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/keyboard-shortcuts", - "version": "4.13.0", + "version": "4.14.0-prerelease", "description": "Handling keyboard shortcuts.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/keycodes/CHANGELOG.md b/packages/keycodes/CHANGELOG.md index a0ed8562692a9..bca38d6eb520a 100644 --- a/packages/keycodes/CHANGELOG.md +++ b/packages/keycodes/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.37.0 (2023-07-05) + ## 3.36.0 (2023-06-23) ## 3.35.0 (2023-06-07) diff --git a/packages/keycodes/package.json b/packages/keycodes/package.json index 41acb05b0bf3e..3e1c021c40686 100644 --- a/packages/keycodes/package.json +++ b/packages/keycodes/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/keycodes", - "version": "3.36.0", + "version": "3.37.0-prerelease", "description": "Keycodes utilities for WordPress. Used to check for keyboard events across browsers/operating systems.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/lazy-import/CHANGELOG.md b/packages/lazy-import/CHANGELOG.md index 2b842070991a9..9ad43e89278f6 100644 --- a/packages/lazy-import/CHANGELOG.md +++ b/packages/lazy-import/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 1.24.0 (2023-07-05) + ## 1.23.0 (2023-06-23) ## 1.22.0 (2023-06-07) diff --git a/packages/lazy-import/package.json b/packages/lazy-import/package.json index d733cea00e208..7a480e76c7711 100644 --- a/packages/lazy-import/package.json +++ b/packages/lazy-import/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/lazy-import", - "version": "1.23.0", + "version": "1.24.0-prerelease", "description": "Lazily import a module, installing it automatically if missing.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/list-reusable-blocks/CHANGELOG.md b/packages/list-reusable-blocks/CHANGELOG.md index 1030651eeb147..c6d29a87a40ca 100644 --- a/packages/list-reusable-blocks/CHANGELOG.md +++ b/packages/list-reusable-blocks/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.14.0 (2023-07-05) + ## 4.13.0 (2023-06-23) ## 4.12.0 (2023-06-07) diff --git a/packages/list-reusable-blocks/package.json b/packages/list-reusable-blocks/package.json index f24fc355316ae..1df299156ffd7 100644 --- a/packages/list-reusable-blocks/package.json +++ b/packages/list-reusable-blocks/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/list-reusable-blocks", - "version": "4.13.0", + "version": "4.14.0-prerelease", "description": "Adding Export/Import support to the reusable blocks listing.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/media-utils/CHANGELOG.md b/packages/media-utils/CHANGELOG.md index 7fe2a1375a95c..f924dbfdadf9f 100644 --- a/packages/media-utils/CHANGELOG.md +++ b/packages/media-utils/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.28.0 (2023-07-05) + ## 4.27.0 (2023-06-23) ## 4.26.0 (2023-06-07) diff --git a/packages/media-utils/package.json b/packages/media-utils/package.json index f44a65a7b7404..99c7c660b20f3 100644 --- a/packages/media-utils/package.json +++ b/packages/media-utils/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/media-utils", - "version": "4.27.0", + "version": "4.28.0-prerelease", "description": "WordPress Media Upload Utils.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/notices/CHANGELOG.md b/packages/notices/CHANGELOG.md index 49e3711961c78..a764d8e2bcd6b 100644 --- a/packages/notices/CHANGELOG.md +++ b/packages/notices/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.5.0 (2023-07-05) + ## 4.4.0 (2023-06-23) ## 4.3.0 (2023-06-07) diff --git a/packages/notices/package.json b/packages/notices/package.json index ca17e9c838bac..bfe659509e62a 100644 --- a/packages/notices/package.json +++ b/packages/notices/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/notices", - "version": "4.4.0", + "version": "4.5.0-prerelease", "description": "State management for notices.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/npm-package-json-lint-config/CHANGELOG.md b/packages/npm-package-json-lint-config/CHANGELOG.md index f6f61cebe8e50..a28ae84e52085 100644 --- a/packages/npm-package-json-lint-config/CHANGELOG.md +++ b/packages/npm-package-json-lint-config/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.22.0 (2023-07-05) + ## 4.21.0 (2023-06-23) ## 4.20.0 (2023-06-07) diff --git a/packages/npm-package-json-lint-config/package.json b/packages/npm-package-json-lint-config/package.json index da423454a98a2..69e4dac314d2e 100644 --- a/packages/npm-package-json-lint-config/package.json +++ b/packages/npm-package-json-lint-config/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/npm-package-json-lint-config", - "version": "4.21.0", + "version": "4.22.0-prerelease", "description": "WordPress npm-package-json-lint shareable configuration.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/plugins/CHANGELOG.md b/packages/plugins/CHANGELOG.md index ac77eead0af17..f13ea93091a77 100644 --- a/packages/plugins/CHANGELOG.md +++ b/packages/plugins/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 6.5.0 (2023-07-05) + ## 6.4.0 (2023-06-23) ## 6.3.0 (2023-06-07) diff --git a/packages/plugins/package.json b/packages/plugins/package.json index 063940e9f9215..caa1d58f83066 100644 --- a/packages/plugins/package.json +++ b/packages/plugins/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/plugins", - "version": "6.4.0", + "version": "6.5.0-prerelease", "description": "Plugins module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/postcss-plugins-preset/CHANGELOG.md b/packages/postcss-plugins-preset/CHANGELOG.md index a7a7b1a4ad662..3c417250d0aa7 100644 --- a/packages/postcss-plugins-preset/CHANGELOG.md +++ b/packages/postcss-plugins-preset/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.21.0 (2023-07-05) + ## 4.20.0 (2023-06-23) ## 4.19.0 (2023-06-07) diff --git a/packages/postcss-plugins-preset/package.json b/packages/postcss-plugins-preset/package.json index 307a6e31b080a..13a50c53530cc 100644 --- a/packages/postcss-plugins-preset/package.json +++ b/packages/postcss-plugins-preset/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/postcss-plugins-preset", - "version": "4.20.0", + "version": "4.21.0-prerelease", "description": "PostCSS sharable plugins preset for WordPress development.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/postcss-themes/CHANGELOG.md b/packages/postcss-themes/CHANGELOG.md index 8736e223d7747..b5078945ae94b 100644 --- a/packages/postcss-themes/CHANGELOG.md +++ b/packages/postcss-themes/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.20.0 (2023-07-05) + ## 5.19.0 (2023-06-23) ## 5.18.0 (2023-06-07) diff --git a/packages/postcss-themes/package.json b/packages/postcss-themes/package.json index 846bd4b61acdd..850c5237d292b 100644 --- a/packages/postcss-themes/package.json +++ b/packages/postcss-themes/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/postcss-themes", - "version": "5.19.0", + "version": "5.20.0-prerelease", "description": "PostCSS plugin to generate theme colors.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/preferences-persistence/CHANGELOG.md b/packages/preferences-persistence/CHANGELOG.md index f9b58be91ed52..ab87950a2a326 100644 --- a/packages/preferences-persistence/CHANGELOG.md +++ b/packages/preferences-persistence/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 1.29.0 (2023-07-05) + ## 1.28.0 (2023-06-23) ## 1.27.0 (2023-06-07) diff --git a/packages/preferences-persistence/package.json b/packages/preferences-persistence/package.json index 7ff80a6a8cce3..8475aa2a96272 100644 --- a/packages/preferences-persistence/package.json +++ b/packages/preferences-persistence/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/preferences-persistence", - "version": "1.28.0", + "version": "1.29.0-prerelease", "description": "Persistence utilities for `wordpress/preferences`.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/preferences/CHANGELOG.md b/packages/preferences/CHANGELOG.md index f2576860ef705..511f9b99675bd 100644 --- a/packages/preferences/CHANGELOG.md +++ b/packages/preferences/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.14.0 (2023-07-05) + ## 3.13.0 (2023-06-23) ## 3.12.0 (2023-06-07) diff --git a/packages/preferences/package.json b/packages/preferences/package.json index ef1a1760fb5c0..4cde675b8c79c 100644 --- a/packages/preferences/package.json +++ b/packages/preferences/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/preferences", - "version": "3.13.0", + "version": "3.14.0-prerelease", "description": "Utilities for managing WordPress preferences.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/prettier-config/CHANGELOG.md b/packages/prettier-config/CHANGELOG.md index f3174145a37de..ca000d2d908f9 100644 --- a/packages/prettier-config/CHANGELOG.md +++ b/packages/prettier-config/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 2.20.0 (2023-07-05) + ## 2.19.0 (2023-06-23) ## 2.18.0 (2023-06-07) diff --git a/packages/prettier-config/package.json b/packages/prettier-config/package.json index c2057f0ff54e1..f0df61eff583f 100644 --- a/packages/prettier-config/package.json +++ b/packages/prettier-config/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/prettier-config", - "version": "2.19.0", + "version": "2.20.0-prerelease", "description": "WordPress Prettier shared configuration.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/primitives/CHANGELOG.md b/packages/primitives/CHANGELOG.md index 64c1773f09890..54f84d55c7f1c 100644 --- a/packages/primitives/CHANGELOG.md +++ b/packages/primitives/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.35.0 (2023-07-05) + ## 3.34.0 (2023-06-23) ## 3.33.0 (2023-06-07) diff --git a/packages/primitives/package.json b/packages/primitives/package.json index 1b68a54a7aeca..11209ad0c3e7e 100644 --- a/packages/primitives/package.json +++ b/packages/primitives/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/primitives", - "version": "3.34.0", + "version": "3.35.0-prerelease", "description": "WordPress cross-platform primitives.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/priority-queue/CHANGELOG.md b/packages/priority-queue/CHANGELOG.md index 4376eae72d788..b2b1916066345 100644 --- a/packages/priority-queue/CHANGELOG.md +++ b/packages/priority-queue/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 2.37.0 (2023-07-05) + ## 2.36.0 (2023-06-23) ## 2.35.0 (2023-06-07) diff --git a/packages/priority-queue/package.json b/packages/priority-queue/package.json index 601a6c9bac6e5..8376e4581d720 100644 --- a/packages/priority-queue/package.json +++ b/packages/priority-queue/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/priority-queue", - "version": "2.36.0", + "version": "2.37.0-prerelease", "description": "Generic browser priority queue.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/private-apis/CHANGELOG.md b/packages/private-apis/CHANGELOG.md index 831800ac017c2..405cd58401546 100644 --- a/packages/private-apis/CHANGELOG.md +++ b/packages/private-apis/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 0.19.0 (2023-07-05) + ## 0.18.0 (2023-06-23) ## 0.17.0 (2023-06-07) diff --git a/packages/private-apis/package.json b/packages/private-apis/package.json index 4fcef01c7c448..83638e5525427 100644 --- a/packages/private-apis/package.json +++ b/packages/private-apis/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/private-apis", - "version": "0.18.0", + "version": "0.19.0-prerelease", "description": "Internal experimental APIs for WordPress core.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/project-management-automation/CHANGELOG.md b/packages/project-management-automation/CHANGELOG.md index 4c9fe0e631a6c..ac9b0383e1951 100644 --- a/packages/project-management-automation/CHANGELOG.md +++ b/packages/project-management-automation/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 1.36.0 (2023-07-05) + ## 1.35.0 (2023-06-23) ## 1.34.0 (2023-06-07) diff --git a/packages/project-management-automation/package.json b/packages/project-management-automation/package.json index 43cc2325fa443..40f6abf718d87 100644 --- a/packages/project-management-automation/package.json +++ b/packages/project-management-automation/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/project-management-automation", - "version": "1.35.0", + "version": "1.36.0-prerelease", "description": "GitHub Action that implements various automation to assist with managing the Gutenberg GitHub repository.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/react-i18n/CHANGELOG.md b/packages/react-i18n/CHANGELOG.md index bfe0797d50a45..61842254aff02 100644 --- a/packages/react-i18n/CHANGELOG.md +++ b/packages/react-i18n/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.35.0 (2023-07-05) + ## 3.34.0 (2023-06-23) ## 3.33.0 (2023-06-07) diff --git a/packages/react-i18n/package.json b/packages/react-i18n/package.json index b5e1243018867..c69ebff0fb19d 100644 --- a/packages/react-i18n/package.json +++ b/packages/react-i18n/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/react-i18n", - "version": "3.34.0", + "version": "3.35.0-prerelease", "description": "React bindings for @wordpress/i18n.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/readable-js-assets-webpack-plugin/CHANGELOG.md b/packages/readable-js-assets-webpack-plugin/CHANGELOG.md index a4b5ab64514ed..b57c60f7b1665 100644 --- a/packages/readable-js-assets-webpack-plugin/CHANGELOG.md +++ b/packages/readable-js-assets-webpack-plugin/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 2.20.0 (2023-07-05) + ## 2.19.0 (2023-06-23) ## 2.18.0 (2023-06-07) diff --git a/packages/readable-js-assets-webpack-plugin/package.json b/packages/readable-js-assets-webpack-plugin/package.json index 756526d18281f..da9af384df3c7 100644 --- a/packages/readable-js-assets-webpack-plugin/package.json +++ b/packages/readable-js-assets-webpack-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/readable-js-assets-webpack-plugin", - "version": "2.19.0", + "version": "2.20.0-prerelease", "description": "Generate a readable JS file for each JS asset.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/redux-routine/CHANGELOG.md b/packages/redux-routine/CHANGELOG.md index 33b6483b16938..a2c6c385b0de6 100644 --- a/packages/redux-routine/CHANGELOG.md +++ b/packages/redux-routine/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.37.0 (2023-07-05) + ## 4.36.0 (2023-06-23) ## 4.35.0 (2023-06-07) diff --git a/packages/redux-routine/package.json b/packages/redux-routine/package.json index 1672baa85df91..1298f23c32efe 100644 --- a/packages/redux-routine/package.json +++ b/packages/redux-routine/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/redux-routine", - "version": "4.36.0", + "version": "4.37.0-prerelease", "description": "Redux middleware for generator coroutines.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/reusable-blocks/CHANGELOG.md b/packages/reusable-blocks/CHANGELOG.md index 997f02978feb9..38a4d5bbdfa74 100644 --- a/packages/reusable-blocks/CHANGELOG.md +++ b/packages/reusable-blocks/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.14.0 (2023-07-05) + ## 4.13.0 (2023-06-23) ## 4.12.0 (2023-06-07) diff --git a/packages/reusable-blocks/package.json b/packages/reusable-blocks/package.json index b32b856851b66..92518c9cd34f6 100644 --- a/packages/reusable-blocks/package.json +++ b/packages/reusable-blocks/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/reusable-blocks", - "version": "4.13.0", + "version": "4.14.0-prerelease", "description": "Reusable blocks utilities.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/rich-text/CHANGELOG.md b/packages/rich-text/CHANGELOG.md index 0b5dde73c7cc4..fb5573b92ae72 100644 --- a/packages/rich-text/CHANGELOG.md +++ b/packages/rich-text/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 6.14.0 (2023-07-05) + ## 6.13.0 (2023-06-23) ## 6.12.0 (2023-06-07) diff --git a/packages/rich-text/package.json b/packages/rich-text/package.json index ea8cd72fa125e..96c7bceb35d6d 100644 --- a/packages/rich-text/package.json +++ b/packages/rich-text/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/rich-text", - "version": "6.13.0", + "version": "6.14.0-prerelease", "description": "Rich text value and manipulation API.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/router/CHANGELOG.md b/packages/router/CHANGELOG.md index 08ad1a4e400dd..5139ec618379c 100644 --- a/packages/router/CHANGELOG.md +++ b/packages/router/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 0.6.0 (2023-07-05) + ## 0.5.0 (2023-06-23) ## 0.4.0 (2023-06-07) diff --git a/packages/router/package.json b/packages/router/package.json index a62374207825b..8d2ae203ebf29 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/router", - "version": "0.5.0", + "version": "0.6.0-prerelease", "description": "Router API for WordPress pages.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/scripts/CHANGELOG.md b/packages/scripts/CHANGELOG.md index 38a0c3e956526..2b08bbca07fb7 100644 --- a/packages/scripts/CHANGELOG.md +++ b/packages/scripts/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 26.8.0 (2023-07-05) + ## 26.7.0 (2023-06-23) ## 26.6.0 (2023-06-07) diff --git a/packages/scripts/package.json b/packages/scripts/package.json index bfa3d0403bf6d..9a6659bfbfbbe 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/scripts", - "version": "26.7.0", + "version": "26.8.0-prerelease", "description": "Collection of reusable scripts for WordPress development.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/server-side-render/CHANGELOG.md b/packages/server-side-render/CHANGELOG.md index 4fd70fa8ce29a..eee7487228efb 100644 --- a/packages/server-side-render/CHANGELOG.md +++ b/packages/server-side-render/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.14.0 (2023-07-05) + ## 4.13.0 (2023-06-23) ## 4.12.0 (2023-06-07) diff --git a/packages/server-side-render/package.json b/packages/server-side-render/package.json index 2c82a64458d4f..514ef46728818 100644 --- a/packages/server-side-render/package.json +++ b/packages/server-side-render/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/server-side-render", - "version": "4.13.0", + "version": "4.14.0-prerelease", "description": "The component used with WordPress to server-side render a preview of dynamic blocks to display in the editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/shortcode/CHANGELOG.md b/packages/shortcode/CHANGELOG.md index 7eff85ced8717..b1c6427a5d712 100644 --- a/packages/shortcode/CHANGELOG.md +++ b/packages/shortcode/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.37.0 (2023-07-05) + ## 3.36.0 (2023-06-23) ## 3.35.0 (2023-06-07) diff --git a/packages/shortcode/package.json b/packages/shortcode/package.json index 79c56c4ca2c25..8ab4f5703a79e 100644 --- a/packages/shortcode/package.json +++ b/packages/shortcode/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/shortcode", - "version": "3.36.0", + "version": "3.37.0-prerelease", "description": "Shortcode module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/style-engine/CHANGELOG.md b/packages/style-engine/CHANGELOG.md index 47f047cf8f8ad..c06316a4e826f 100644 --- a/packages/style-engine/CHANGELOG.md +++ b/packages/style-engine/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 1.20.0 (2023-07-05) + ## 1.19.0 (2023-06-23) ## 1.18.0 (2023-06-07) diff --git a/packages/style-engine/package.json b/packages/style-engine/package.json index 7d49b7266ddc5..6a7335ca2a2f9 100644 --- a/packages/style-engine/package.json +++ b/packages/style-engine/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/style-engine", - "version": "1.19.0", + "version": "1.20.0-prerelease", "description": "A suite of parsers and compilers for WordPress styles.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/stylelint-config/CHANGELOG.md b/packages/stylelint-config/CHANGELOG.md index 291de61fb2920..01e27d783c16e 100644 --- a/packages/stylelint-config/CHANGELOG.md +++ b/packages/stylelint-config/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 21.20.0 (2023-07-05) + ## 21.19.0 (2023-06-23) ## 21.18.0 (2023-06-07) diff --git a/packages/stylelint-config/package.json b/packages/stylelint-config/package.json index 98bed0b8fce17..f7c0e76a60b78 100644 --- a/packages/stylelint-config/package.json +++ b/packages/stylelint-config/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/stylelint-config", - "version": "21.19.0", + "version": "21.20.0-prerelease", "description": "stylelint config for WordPress development.", "author": "The WordPress Contributors", "license": "MIT", diff --git a/packages/token-list/CHANGELOG.md b/packages/token-list/CHANGELOG.md index fc0e58fad832d..91ab49f7bf940 100644 --- a/packages/token-list/CHANGELOG.md +++ b/packages/token-list/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 2.37.0 (2023-07-05) + ## 2.36.0 (2023-06-23) ## 2.35.0 (2023-06-07) diff --git a/packages/token-list/package.json b/packages/token-list/package.json index 8f8686312661f..2895cc2fdbe9a 100644 --- a/packages/token-list/package.json +++ b/packages/token-list/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/token-list", - "version": "2.36.0", + "version": "2.37.0-prerelease", "description": "Constructable, plain JavaScript DOMTokenList implementation, supporting non-browser runtimes.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/url/CHANGELOG.md b/packages/url/CHANGELOG.md index 6f2dbc3a896cd..327c7480999c0 100644 --- a/packages/url/CHANGELOG.md +++ b/packages/url/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.38.0 (2023-07-05) + ## 3.37.0 (2023-06-23) ## 3.36.0 (2023-06-07) diff --git a/packages/url/package.json b/packages/url/package.json index 53a4ecc7e9d52..eb1aa6623ce3b 100644 --- a/packages/url/package.json +++ b/packages/url/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/url", - "version": "3.37.0", + "version": "3.38.0-prerelease", "description": "WordPress URL utilities.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/viewport/CHANGELOG.md b/packages/viewport/CHANGELOG.md index d179001a47927..07a2df9fa904c 100644 --- a/packages/viewport/CHANGELOG.md +++ b/packages/viewport/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.14.0 (2023-07-05) + ## 5.13.0 (2023-06-23) ## 5.12.0 (2023-06-07) diff --git a/packages/viewport/package.json b/packages/viewport/package.json index 4feee48f5be3e..dc583126d6d3d 100644 --- a/packages/viewport/package.json +++ b/packages/viewport/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/viewport", - "version": "5.13.0", + "version": "5.14.0-prerelease", "description": "Viewport module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/warning/CHANGELOG.md b/packages/warning/CHANGELOG.md index f6588ec7fd5e4..b39951ab6182f 100644 --- a/packages/warning/CHANGELOG.md +++ b/packages/warning/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 2.37.0 (2023-07-05) + ## 2.36.0 (2023-06-23) ## 2.35.0 (2023-06-07) diff --git a/packages/warning/package.json b/packages/warning/package.json index 7f552e9f128f5..f8034054358da 100644 --- a/packages/warning/package.json +++ b/packages/warning/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/warning", - "version": "2.36.0", + "version": "2.37.0-prerelease", "description": "Warning utility for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/widgets/CHANGELOG.md b/packages/widgets/CHANGELOG.md index 5bb9d11460ebf..ddbcfc39927e5 100644 --- a/packages/widgets/CHANGELOG.md +++ b/packages/widgets/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.14.0 (2023-07-05) + ## 3.13.0 (2023-06-23) ## 3.12.0 (2023-06-07) diff --git a/packages/widgets/package.json b/packages/widgets/package.json index 6663a97c749c9..c0995ddad226b 100644 --- a/packages/widgets/package.json +++ b/packages/widgets/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/widgets", - "version": "3.13.0", + "version": "3.14.0-prerelease", "description": "Functionality used by the widgets block editor in the Widgets screen and the Customizer.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/wordcount/CHANGELOG.md b/packages/wordcount/CHANGELOG.md index 7fe0bd05ebfd4..281462879def0 100644 --- a/packages/wordcount/CHANGELOG.md +++ b/packages/wordcount/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.37.0 (2023-07-05) + ## 3.36.0 (2023-06-23) ## 3.35.0 (2023-06-07) diff --git a/packages/wordcount/package.json b/packages/wordcount/package.json index 4f3ff6acd82f1..de7d1af9979fc 100644 --- a/packages/wordcount/package.json +++ b/packages/wordcount/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/wordcount", - "version": "3.36.0", + "version": "3.37.0-prerelease", "description": "WordPress word count utility.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", From ca2d1f23aa0a0cc55d13e0c8d279a1795aae63e7 Mon Sep 17 00:00:00 2001 From: Gutenberg Repository Automation Date: Wed, 5 Jul 2023 22:18:52 +0000 Subject: [PATCH 059/146] chore(release): publish - @wordpress/a11y@3.37.0 - @wordpress/annotations@2.37.0 - @wordpress/api-fetch@6.34.0 - @wordpress/autop@3.37.0 - @wordpress/babel-plugin-import-jsx-pragma@4.20.0 - @wordpress/babel-plugin-makepot@5.21.0 - @wordpress/babel-preset-default@7.21.0 - @wordpress/base-styles@4.28.0 - @wordpress/blob@3.37.0 - @wordpress/block-directory@4.14.0 - @wordpress/block-editor@12.5.0 - @wordpress/block-library@8.14.0 - @wordpress/block-serialization-default-parser@4.37.0 - @wordpress/block-serialization-spec-parser@4.37.0 - @wordpress/blocks@12.14.0 - @wordpress/browserslist-config@5.20.0 - @wordpress/commands@0.8.0 - @wordpress/components@25.3.0 - @wordpress/compose@6.14.0 - @wordpress/core-commands@0.6.0 - @wordpress/core-data@6.14.0 - @wordpress/create-block-tutorial-template@2.25.0 - @wordpress/create-block@4.21.0 - @wordpress/customize-widgets@4.14.0 - @wordpress/data-controls@3.6.0 - @wordpress/data@9.7.0 - @wordpress/date@4.37.0 - @wordpress/dependency-extraction-webpack-plugin@4.20.0 - @wordpress/deprecated@3.37.0 - @wordpress/docgen@1.46.0 - @wordpress/dom-ready@3.37.0 - @wordpress/dom@3.37.0 - @wordpress/e2e-test-utils-playwright@0.5.0 - @wordpress/e2e-test-utils@10.8.0 - @wordpress/e2e-tests@7.8.0 - @wordpress/edit-post@7.14.0 - @wordpress/edit-site@5.14.0 - @wordpress/edit-widgets@5.14.0 - @wordpress/editor@13.14.0 - @wordpress/element@5.14.0 - @wordpress/env@8.3.0 - @wordpress/escape-html@2.37.0 - @wordpress/eslint-plugin@14.10.0 - @wordpress/format-library@4.14.0 - @wordpress/hooks@3.37.0 - @wordpress/html-entities@3.37.0 - @wordpress/i18n@4.37.0 - @wordpress/icons@9.28.0 - @wordpress/interactivity@1.1.0 - @wordpress/interface@5.14.0 - @wordpress/is-shallow-equal@4.37.0 - @wordpress/jest-console@7.8.0 - @wordpress/jest-preset-default@11.8.0 - @wordpress/jest-puppeteer-axe@6.8.0 - @wordpress/keyboard-shortcuts@4.14.0 - @wordpress/keycodes@3.37.0 - @wordpress/lazy-import@1.24.0 - @wordpress/list-reusable-blocks@4.14.0 - @wordpress/media-utils@4.28.0 - @wordpress/notices@4.5.0 - @wordpress/npm-package-json-lint-config@4.22.0 - @wordpress/plugins@6.5.0 - @wordpress/postcss-plugins-preset@4.21.0 - @wordpress/postcss-themes@5.20.0 - @wordpress/preferences-persistence@1.29.0 - @wordpress/preferences@3.14.0 - @wordpress/prettier-config@2.20.0 - @wordpress/primitives@3.35.0 - @wordpress/priority-queue@2.37.0 - @wordpress/private-apis@0.19.0 - @wordpress/project-management-automation@1.36.0 - @wordpress/react-i18n@3.35.0 - @wordpress/readable-js-assets-webpack-plugin@2.20.0 - @wordpress/redux-routine@4.37.0 - @wordpress/reusable-blocks@4.14.0 - @wordpress/rich-text@6.14.0 - @wordpress/router@0.6.0 - @wordpress/scripts@26.8.0 - @wordpress/server-side-render@4.14.0 - @wordpress/shortcode@3.37.0 - @wordpress/style-engine@1.20.0 - @wordpress/stylelint-config@21.20.0 - @wordpress/token-list@2.37.0 - @wordpress/url@3.38.0 - @wordpress/viewport@5.14.0 - @wordpress/warning@2.37.0 - @wordpress/widgets@3.14.0 - @wordpress/wordcount@3.37.0 --- packages/a11y/package.json | 2 +- packages/annotations/package.json | 2 +- packages/api-fetch/package.json | 2 +- packages/autop/package.json | 2 +- packages/babel-plugin-import-jsx-pragma/package.json | 2 +- packages/babel-plugin-makepot/package.json | 2 +- packages/babel-preset-default/package.json | 2 +- packages/base-styles/package.json | 2 +- packages/blob/package.json | 2 +- packages/block-directory/package.json | 2 +- packages/block-editor/package.json | 2 +- packages/block-library/package.json | 2 +- packages/block-serialization-default-parser/package.json | 2 +- packages/block-serialization-spec-parser/package.json | 2 +- packages/blocks/package.json | 2 +- packages/browserslist-config/package.json | 2 +- packages/commands/package.json | 2 +- packages/components/package.json | 2 +- packages/compose/package.json | 2 +- packages/core-commands/package.json | 2 +- packages/core-data/package.json | 2 +- packages/create-block-tutorial-template/package.json | 2 +- packages/create-block/package.json | 2 +- packages/customize-widgets/package.json | 2 +- packages/data-controls/package.json | 2 +- packages/data/package.json | 2 +- packages/date/package.json | 2 +- packages/dependency-extraction-webpack-plugin/package.json | 2 +- packages/deprecated/package.json | 2 +- packages/docgen/package.json | 2 +- packages/dom-ready/package.json | 2 +- packages/dom/package.json | 2 +- packages/e2e-test-utils-playwright/package.json | 2 +- packages/e2e-test-utils/package.json | 2 +- packages/e2e-tests/package.json | 2 +- packages/edit-post/package.json | 2 +- packages/edit-site/package.json | 2 +- packages/edit-widgets/package.json | 2 +- packages/editor/package.json | 2 +- packages/element/package.json | 2 +- packages/env/package.json | 2 +- packages/escape-html/package.json | 2 +- packages/eslint-plugin/package.json | 2 +- packages/format-library/package.json | 2 +- packages/hooks/package.json | 2 +- packages/html-entities/package.json | 2 +- packages/i18n/package.json | 2 +- packages/icons/package.json | 2 +- packages/interactivity/package.json | 2 +- packages/interface/package.json | 2 +- packages/is-shallow-equal/package.json | 2 +- packages/jest-console/package.json | 2 +- packages/jest-preset-default/package.json | 2 +- packages/jest-puppeteer-axe/package.json | 2 +- packages/keyboard-shortcuts/package.json | 2 +- packages/keycodes/package.json | 2 +- packages/lazy-import/package.json | 2 +- packages/list-reusable-blocks/package.json | 2 +- packages/media-utils/package.json | 2 +- packages/notices/package.json | 2 +- packages/npm-package-json-lint-config/package.json | 2 +- packages/plugins/package.json | 2 +- packages/postcss-plugins-preset/package.json | 2 +- packages/postcss-themes/package.json | 2 +- packages/preferences-persistence/package.json | 2 +- packages/preferences/package.json | 2 +- packages/prettier-config/package.json | 2 +- packages/primitives/package.json | 2 +- packages/priority-queue/package.json | 2 +- packages/private-apis/package.json | 2 +- packages/project-management-automation/package.json | 2 +- packages/react-i18n/package.json | 2 +- packages/readable-js-assets-webpack-plugin/package.json | 2 +- packages/redux-routine/package.json | 2 +- packages/reusable-blocks/package.json | 2 +- packages/rich-text/package.json | 2 +- packages/router/package.json | 2 +- packages/scripts/package.json | 2 +- packages/server-side-render/package.json | 2 +- packages/shortcode/package.json | 2 +- packages/style-engine/package.json | 2 +- packages/stylelint-config/package.json | 2 +- packages/token-list/package.json | 2 +- packages/url/package.json | 2 +- packages/viewport/package.json | 2 +- packages/warning/package.json | 2 +- packages/widgets/package.json | 2 +- packages/wordcount/package.json | 2 +- 88 files changed, 88 insertions(+), 88 deletions(-) diff --git a/packages/a11y/package.json b/packages/a11y/package.json index c318cd2d6e9ac..cf231188bd39e 100644 --- a/packages/a11y/package.json +++ b/packages/a11y/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/a11y", - "version": "3.37.0-prerelease", + "version": "3.37.0", "description": "Accessibility (a11y) utilities for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/annotations/package.json b/packages/annotations/package.json index e3dcd5ed01bf7..3943f66f5725e 100644 --- a/packages/annotations/package.json +++ b/packages/annotations/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/annotations", - "version": "2.37.0-prerelease", + "version": "2.37.0", "description": "Annotate content in the Gutenberg editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/api-fetch/package.json b/packages/api-fetch/package.json index 70fc99318c2b1..9e6e2e5875f86 100644 --- a/packages/api-fetch/package.json +++ b/packages/api-fetch/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/api-fetch", - "version": "6.34.0-prerelease", + "version": "6.34.0", "description": "Utility to make WordPress REST API requests.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/autop/package.json b/packages/autop/package.json index c7e4fa68dd471..8c6e201015b1d 100644 --- a/packages/autop/package.json +++ b/packages/autop/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/autop", - "version": "3.37.0-prerelease", + "version": "3.37.0", "description": "WordPress's automatic paragraph functions `autop` and `removep`.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/babel-plugin-import-jsx-pragma/package.json b/packages/babel-plugin-import-jsx-pragma/package.json index 970e86b552219..cc4aa554e8801 100644 --- a/packages/babel-plugin-import-jsx-pragma/package.json +++ b/packages/babel-plugin-import-jsx-pragma/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/babel-plugin-import-jsx-pragma", - "version": "4.20.0-prerelease", + "version": "4.20.0", "description": "Babel transform plugin for automatically injecting an import to be used as the pragma for the React JSX Transform plugin.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/babel-plugin-makepot/package.json b/packages/babel-plugin-makepot/package.json index 960ff118da5ee..b5ae836913f14 100644 --- a/packages/babel-plugin-makepot/package.json +++ b/packages/babel-plugin-makepot/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/babel-plugin-makepot", - "version": "5.21.0-prerelease", + "version": "5.21.0", "description": "WordPress Babel internationalization (i18n) plugin.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/babel-preset-default/package.json b/packages/babel-preset-default/package.json index 28615cf6a7403..28e6a7af9357c 100644 --- a/packages/babel-preset-default/package.json +++ b/packages/babel-preset-default/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/babel-preset-default", - "version": "7.21.0-prerelease", + "version": "7.21.0", "description": "Default Babel preset for WordPress development.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/base-styles/package.json b/packages/base-styles/package.json index 943a9c5ba72b5..4fd28ec7ae9a2 100644 --- a/packages/base-styles/package.json +++ b/packages/base-styles/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/base-styles", - "version": "4.28.0-prerelease", + "version": "4.28.0", "description": "Base SCSS utilities and variables for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/blob/package.json b/packages/blob/package.json index 1c958e7d4cb0f..12ee6bf38bb28 100644 --- a/packages/blob/package.json +++ b/packages/blob/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/blob", - "version": "3.37.0-prerelease", + "version": "3.37.0", "description": "Blob utilities for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-directory/package.json b/packages/block-directory/package.json index 1349cac080605..acddeac7f16c2 100644 --- a/packages/block-directory/package.json +++ b/packages/block-directory/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-directory", - "version": "4.14.0-prerelease", + "version": "4.14.0", "description": "Extend editor with block directory features to search, download and install blocks.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-editor/package.json b/packages/block-editor/package.json index c3bb47c4bc045..19f9c9851dd29 100644 --- a/packages/block-editor/package.json +++ b/packages/block-editor/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-editor", - "version": "12.5.0-prerelease", + "version": "12.5.0", "description": "Generic block editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-library/package.json b/packages/block-library/package.json index 386cd765da113..a5eebe6bbc9d0 100644 --- a/packages/block-library/package.json +++ b/packages/block-library/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-library", - "version": "8.14.0-prerelease", + "version": "8.14.0", "description": "Block library for the WordPress editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-serialization-default-parser/package.json b/packages/block-serialization-default-parser/package.json index 272aaac138a68..a0b8414ded1e7 100644 --- a/packages/block-serialization-default-parser/package.json +++ b/packages/block-serialization-default-parser/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-serialization-default-parser", - "version": "4.37.0-prerelease", + "version": "4.37.0", "description": "Block serialization specification parser for WordPress posts.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-serialization-spec-parser/package.json b/packages/block-serialization-spec-parser/package.json index c5853b0d5c75c..db2592278c16c 100644 --- a/packages/block-serialization-spec-parser/package.json +++ b/packages/block-serialization-spec-parser/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-serialization-spec-parser", - "version": "4.37.0-prerelease", + "version": "4.37.0", "description": "Block serialization specification parser for WordPress posts.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/blocks/package.json b/packages/blocks/package.json index 959fe9f510928..89ed8b687f447 100644 --- a/packages/blocks/package.json +++ b/packages/blocks/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/blocks", - "version": "12.14.0-prerelease", + "version": "12.14.0", "description": "Block API for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/browserslist-config/package.json b/packages/browserslist-config/package.json index ee6e1457f1a6b..be81cad67529f 100644 --- a/packages/browserslist-config/package.json +++ b/packages/browserslist-config/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/browserslist-config", - "version": "5.20.0-prerelease", + "version": "5.20.0", "description": "WordPress Browserslist shared configuration.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/commands/package.json b/packages/commands/package.json index cfd7b1a620c93..8b08f11582047 100644 --- a/packages/commands/package.json +++ b/packages/commands/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/commands", - "version": "0.8.0-prerelease", + "version": "0.8.0", "description": "Handles the commands menu.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/components/package.json b/packages/components/package.json index 107dffec9dee7..2b6595215011e 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/components", - "version": "25.3.0-prerelease", + "version": "25.3.0", "description": "UI components for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/compose/package.json b/packages/compose/package.json index 56327b248e3cf..af4d539bd978f 100644 --- a/packages/compose/package.json +++ b/packages/compose/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/compose", - "version": "6.14.0-prerelease", + "version": "6.14.0", "description": "WordPress higher-order components (HOCs).", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/core-commands/package.json b/packages/core-commands/package.json index 1221b95106a39..5eee67fca77f6 100644 --- a/packages/core-commands/package.json +++ b/packages/core-commands/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/core-commands", - "version": "0.6.0-prerelease", + "version": "0.6.0", "description": "WordPress core reusable commands.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/core-data/package.json b/packages/core-data/package.json index aa0f9d2ef68a5..24b7869a3b005 100644 --- a/packages/core-data/package.json +++ b/packages/core-data/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/core-data", - "version": "6.14.0-prerelease", + "version": "6.14.0", "description": "Access to and manipulation of core WordPress entities.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/create-block-tutorial-template/package.json b/packages/create-block-tutorial-template/package.json index f3b49c9ac6fc2..423b7d140266b 100644 --- a/packages/create-block-tutorial-template/package.json +++ b/packages/create-block-tutorial-template/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/create-block-tutorial-template", - "version": "2.25.0-prerelease", + "version": "2.25.0", "description": "Template for @wordpress/create-block used in the official WordPress tutorial.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/create-block/package.json b/packages/create-block/package.json index 53d4ef7ed1c09..5f8885ec0375b 100644 --- a/packages/create-block/package.json +++ b/packages/create-block/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/create-block", - "version": "4.21.0-prerelease", + "version": "4.21.0", "description": "Generates PHP, JS and CSS code for registering a block for a WordPress plugin.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/customize-widgets/package.json b/packages/customize-widgets/package.json index b4e2b87617d6d..96e313d27b9d3 100644 --- a/packages/customize-widgets/package.json +++ b/packages/customize-widgets/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/customize-widgets", - "version": "4.14.0-prerelease", + "version": "4.14.0", "description": "Widgets blocks in Customizer Module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/data-controls/package.json b/packages/data-controls/package.json index 67a424c9ffc7c..dbe372d1ee515 100644 --- a/packages/data-controls/package.json +++ b/packages/data-controls/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/data-controls", - "version": "3.6.0-prerelease", + "version": "3.6.0", "description": "A set of common controls for the @wordpress/data api.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/data/package.json b/packages/data/package.json index 76f3aad050b77..810d48c7e7a10 100644 --- a/packages/data/package.json +++ b/packages/data/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/data", - "version": "9.7.0-prerelease", + "version": "9.7.0", "description": "Data module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/date/package.json b/packages/date/package.json index 92c34ff29fdb0..436c85cd27da0 100644 --- a/packages/date/package.json +++ b/packages/date/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/date", - "version": "4.37.0-prerelease", + "version": "4.37.0", "description": "Date module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/dependency-extraction-webpack-plugin/package.json b/packages/dependency-extraction-webpack-plugin/package.json index 0fe37128090a7..6695e5e7f6002 100644 --- a/packages/dependency-extraction-webpack-plugin/package.json +++ b/packages/dependency-extraction-webpack-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/dependency-extraction-webpack-plugin", - "version": "4.20.0-prerelease", + "version": "4.20.0", "description": "Extract WordPress script dependencies from webpack bundles.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/deprecated/package.json b/packages/deprecated/package.json index 6884b60d427e7..09a05bef90c30 100644 --- a/packages/deprecated/package.json +++ b/packages/deprecated/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/deprecated", - "version": "3.37.0-prerelease", + "version": "3.37.0", "description": "Deprecation utility for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/docgen/package.json b/packages/docgen/package.json index e2a8e7be282e4..ee480b67454dd 100644 --- a/packages/docgen/package.json +++ b/packages/docgen/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/docgen", - "version": "1.46.0-prerelease", + "version": "1.46.0", "description": "Autogenerate public API documentation from exports and JSDoc comments.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/dom-ready/package.json b/packages/dom-ready/package.json index 6238094553ac9..d813006f11e4e 100644 --- a/packages/dom-ready/package.json +++ b/packages/dom-ready/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/dom-ready", - "version": "3.37.0-prerelease", + "version": "3.37.0", "description": "Execute callback after the DOM is loaded.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/dom/package.json b/packages/dom/package.json index 17d06653cfc18..87bdd70de09d7 100644 --- a/packages/dom/package.json +++ b/packages/dom/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/dom", - "version": "3.37.0-prerelease", + "version": "3.37.0", "description": "DOM utilities module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/e2e-test-utils-playwright/package.json b/packages/e2e-test-utils-playwright/package.json index 44e91e890811c..5320239223ba5 100644 --- a/packages/e2e-test-utils-playwright/package.json +++ b/packages/e2e-test-utils-playwright/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/e2e-test-utils-playwright", - "version": "0.5.0-prerelease", + "version": "0.5.0", "description": "End-To-End (E2E) test utils for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/e2e-test-utils/package.json b/packages/e2e-test-utils/package.json index 83a7e69cdb481..1929472c8160e 100644 --- a/packages/e2e-test-utils/package.json +++ b/packages/e2e-test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/e2e-test-utils", - "version": "10.8.0-prerelease", + "version": "10.8.0", "description": "End-To-End (E2E) test utils for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/e2e-tests/package.json b/packages/e2e-tests/package.json index b7af51a53bf48..aaef06e196b7c 100644 --- a/packages/e2e-tests/package.json +++ b/packages/e2e-tests/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/e2e-tests", - "version": "7.8.0-prerelease", + "version": "7.8.0", "description": "End-To-End (E2E) tests for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/edit-post/package.json b/packages/edit-post/package.json index acb0868169c24..26310deccf448 100644 --- a/packages/edit-post/package.json +++ b/packages/edit-post/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/edit-post", - "version": "7.14.0-prerelease", + "version": "7.14.0", "description": "Edit Post module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/edit-site/package.json b/packages/edit-site/package.json index fb1b070b6d46b..230faa8857f1c 100644 --- a/packages/edit-site/package.json +++ b/packages/edit-site/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/edit-site", - "version": "5.14.0-prerelease", + "version": "5.14.0", "description": "Edit Site Page module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/edit-widgets/package.json b/packages/edit-widgets/package.json index 1f90021d8dbbc..89f3219873e7d 100644 --- a/packages/edit-widgets/package.json +++ b/packages/edit-widgets/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/edit-widgets", - "version": "5.14.0-prerelease", + "version": "5.14.0", "description": "Widgets Page module for WordPress..", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/editor/package.json b/packages/editor/package.json index 911917aa1e1fa..a06db5e111832 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/editor", - "version": "13.14.0-prerelease", + "version": "13.14.0", "description": "Enhanced block editor for WordPress posts.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/element/package.json b/packages/element/package.json index 909cd9be4fd96..37774f5d908f7 100644 --- a/packages/element/package.json +++ b/packages/element/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/element", - "version": "5.14.0-prerelease", + "version": "5.14.0", "description": "Element React module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/env/package.json b/packages/env/package.json index f894f29711a71..504fca655e3c8 100644 --- a/packages/env/package.json +++ b/packages/env/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/env", - "version": "8.3.0-prerelease", + "version": "8.3.0", "description": "A zero-config, self contained local WordPress environment for development and testing.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/escape-html/package.json b/packages/escape-html/package.json index 155648a0e864f..8e6771bbaf1bf 100644 --- a/packages/escape-html/package.json +++ b/packages/escape-html/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/escape-html", - "version": "2.37.0-prerelease", + "version": "2.37.0", "description": "Escape HTML utils.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index c309a212809b2..986fd5bda01e9 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/eslint-plugin", - "version": "14.10.0-prerelease", + "version": "14.10.0", "description": "ESLint plugin for WordPress development.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/format-library/package.json b/packages/format-library/package.json index 0c036461c5745..e69b7e5c8d61f 100644 --- a/packages/format-library/package.json +++ b/packages/format-library/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/format-library", - "version": "4.14.0-prerelease", + "version": "4.14.0", "description": "Format library for the WordPress editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/hooks/package.json b/packages/hooks/package.json index 1bdb0663f2aff..0b4f0690400ea 100644 --- a/packages/hooks/package.json +++ b/packages/hooks/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/hooks", - "version": "3.37.0-prerelease", + "version": "3.37.0", "description": "WordPress hooks library.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/html-entities/package.json b/packages/html-entities/package.json index e440d02451fdc..235ef17b81250 100644 --- a/packages/html-entities/package.json +++ b/packages/html-entities/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/html-entities", - "version": "3.37.0-prerelease", + "version": "3.37.0", "description": "HTML entity utilities for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/i18n/package.json b/packages/i18n/package.json index 14e4817048ea2..9b1254f4837e0 100644 --- a/packages/i18n/package.json +++ b/packages/i18n/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/i18n", - "version": "4.37.0-prerelease", + "version": "4.37.0", "description": "WordPress internationalization (i18n) library.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/icons/package.json b/packages/icons/package.json index e877d6a88c522..8cdb9d560f5a6 100644 --- a/packages/icons/package.json +++ b/packages/icons/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/icons", - "version": "9.28.0-prerelease", + "version": "9.28.0", "description": "WordPress Icons package, based on dashicon.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/interactivity/package.json b/packages/interactivity/package.json index 25e49e3ff6310..e1ea984b8864c 100644 --- a/packages/interactivity/package.json +++ b/packages/interactivity/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/interactivity", - "version": "1.0.0", + "version": "1.1.0", "description": "Package that provides a standard and simple way to handle the frontend interactivity of Gutenberg blocks.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/interface/package.json b/packages/interface/package.json index 324094de683cc..b77df3af49090 100644 --- a/packages/interface/package.json +++ b/packages/interface/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/interface", - "version": "5.14.0-prerelease", + "version": "5.14.0", "description": "Interface module for WordPress. The package contains shared functionality across the modern JavaScript-based WordPress screens.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/is-shallow-equal/package.json b/packages/is-shallow-equal/package.json index 6370deab9e656..a363b89f2b07c 100644 --- a/packages/is-shallow-equal/package.json +++ b/packages/is-shallow-equal/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/is-shallow-equal", - "version": "4.37.0-prerelease", + "version": "4.37.0", "description": "Test for shallow equality between two objects or arrays.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/jest-console/package.json b/packages/jest-console/package.json index 168261acfff6a..3571cd8fe3344 100644 --- a/packages/jest-console/package.json +++ b/packages/jest-console/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/jest-console", - "version": "7.8.0-prerelease", + "version": "7.8.0", "description": "Custom Jest matchers for the Console object.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/jest-preset-default/package.json b/packages/jest-preset-default/package.json index f97dcddcdc594..fda3037a99c7c 100644 --- a/packages/jest-preset-default/package.json +++ b/packages/jest-preset-default/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/jest-preset-default", - "version": "11.8.0-prerelease", + "version": "11.8.0", "description": "Default Jest preset for WordPress development.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/jest-puppeteer-axe/package.json b/packages/jest-puppeteer-axe/package.json index 5d2569e47354a..3e0482f65b471 100644 --- a/packages/jest-puppeteer-axe/package.json +++ b/packages/jest-puppeteer-axe/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/jest-puppeteer-axe", - "version": "6.8.0-prerelease", + "version": "6.8.0", "description": "Axe API integration with Jest and Puppeteer.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/keyboard-shortcuts/package.json b/packages/keyboard-shortcuts/package.json index 450a371c8e8bf..327043e17523a 100644 --- a/packages/keyboard-shortcuts/package.json +++ b/packages/keyboard-shortcuts/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/keyboard-shortcuts", - "version": "4.14.0-prerelease", + "version": "4.14.0", "description": "Handling keyboard shortcuts.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/keycodes/package.json b/packages/keycodes/package.json index 3e1c021c40686..fc99af669afce 100644 --- a/packages/keycodes/package.json +++ b/packages/keycodes/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/keycodes", - "version": "3.37.0-prerelease", + "version": "3.37.0", "description": "Keycodes utilities for WordPress. Used to check for keyboard events across browsers/operating systems.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/lazy-import/package.json b/packages/lazy-import/package.json index 7a480e76c7711..d461b81e26a2d 100644 --- a/packages/lazy-import/package.json +++ b/packages/lazy-import/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/lazy-import", - "version": "1.24.0-prerelease", + "version": "1.24.0", "description": "Lazily import a module, installing it automatically if missing.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/list-reusable-blocks/package.json b/packages/list-reusable-blocks/package.json index 1df299156ffd7..8e1073e6a648e 100644 --- a/packages/list-reusable-blocks/package.json +++ b/packages/list-reusable-blocks/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/list-reusable-blocks", - "version": "4.14.0-prerelease", + "version": "4.14.0", "description": "Adding Export/Import support to the reusable blocks listing.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/media-utils/package.json b/packages/media-utils/package.json index 99c7c660b20f3..f9fe4e58816d0 100644 --- a/packages/media-utils/package.json +++ b/packages/media-utils/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/media-utils", - "version": "4.28.0-prerelease", + "version": "4.28.0", "description": "WordPress Media Upload Utils.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/notices/package.json b/packages/notices/package.json index bfe659509e62a..ca051ab9a50c8 100644 --- a/packages/notices/package.json +++ b/packages/notices/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/notices", - "version": "4.5.0-prerelease", + "version": "4.5.0", "description": "State management for notices.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/npm-package-json-lint-config/package.json b/packages/npm-package-json-lint-config/package.json index 69e4dac314d2e..30479f99ee1f2 100644 --- a/packages/npm-package-json-lint-config/package.json +++ b/packages/npm-package-json-lint-config/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/npm-package-json-lint-config", - "version": "4.22.0-prerelease", + "version": "4.22.0", "description": "WordPress npm-package-json-lint shareable configuration.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/plugins/package.json b/packages/plugins/package.json index caa1d58f83066..60c9f9613f01c 100644 --- a/packages/plugins/package.json +++ b/packages/plugins/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/plugins", - "version": "6.5.0-prerelease", + "version": "6.5.0", "description": "Plugins module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/postcss-plugins-preset/package.json b/packages/postcss-plugins-preset/package.json index 13a50c53530cc..ab0a8b2b15373 100644 --- a/packages/postcss-plugins-preset/package.json +++ b/packages/postcss-plugins-preset/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/postcss-plugins-preset", - "version": "4.21.0-prerelease", + "version": "4.21.0", "description": "PostCSS sharable plugins preset for WordPress development.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/postcss-themes/package.json b/packages/postcss-themes/package.json index 850c5237d292b..9d290ef95bf59 100644 --- a/packages/postcss-themes/package.json +++ b/packages/postcss-themes/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/postcss-themes", - "version": "5.20.0-prerelease", + "version": "5.20.0", "description": "PostCSS plugin to generate theme colors.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/preferences-persistence/package.json b/packages/preferences-persistence/package.json index 8475aa2a96272..724e78a97c2a5 100644 --- a/packages/preferences-persistence/package.json +++ b/packages/preferences-persistence/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/preferences-persistence", - "version": "1.29.0-prerelease", + "version": "1.29.0", "description": "Persistence utilities for `wordpress/preferences`.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/preferences/package.json b/packages/preferences/package.json index 4cde675b8c79c..35378a679b020 100644 --- a/packages/preferences/package.json +++ b/packages/preferences/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/preferences", - "version": "3.14.0-prerelease", + "version": "3.14.0", "description": "Utilities for managing WordPress preferences.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/prettier-config/package.json b/packages/prettier-config/package.json index f0df61eff583f..f391b650785bf 100644 --- a/packages/prettier-config/package.json +++ b/packages/prettier-config/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/prettier-config", - "version": "2.20.0-prerelease", + "version": "2.20.0", "description": "WordPress Prettier shared configuration.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/primitives/package.json b/packages/primitives/package.json index 11209ad0c3e7e..8600e4af8ac4c 100644 --- a/packages/primitives/package.json +++ b/packages/primitives/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/primitives", - "version": "3.35.0-prerelease", + "version": "3.35.0", "description": "WordPress cross-platform primitives.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/priority-queue/package.json b/packages/priority-queue/package.json index 8376e4581d720..23dfd75532406 100644 --- a/packages/priority-queue/package.json +++ b/packages/priority-queue/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/priority-queue", - "version": "2.37.0-prerelease", + "version": "2.37.0", "description": "Generic browser priority queue.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/private-apis/package.json b/packages/private-apis/package.json index 83638e5525427..31bc79ace528c 100644 --- a/packages/private-apis/package.json +++ b/packages/private-apis/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/private-apis", - "version": "0.19.0-prerelease", + "version": "0.19.0", "description": "Internal experimental APIs for WordPress core.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/project-management-automation/package.json b/packages/project-management-automation/package.json index 40f6abf718d87..9551a2ad4e1fc 100644 --- a/packages/project-management-automation/package.json +++ b/packages/project-management-automation/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/project-management-automation", - "version": "1.36.0-prerelease", + "version": "1.36.0", "description": "GitHub Action that implements various automation to assist with managing the Gutenberg GitHub repository.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/react-i18n/package.json b/packages/react-i18n/package.json index c69ebff0fb19d..d1bfffeacb0b8 100644 --- a/packages/react-i18n/package.json +++ b/packages/react-i18n/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/react-i18n", - "version": "3.35.0-prerelease", + "version": "3.35.0", "description": "React bindings for @wordpress/i18n.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/readable-js-assets-webpack-plugin/package.json b/packages/readable-js-assets-webpack-plugin/package.json index da9af384df3c7..0d5e48da83291 100644 --- a/packages/readable-js-assets-webpack-plugin/package.json +++ b/packages/readable-js-assets-webpack-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/readable-js-assets-webpack-plugin", - "version": "2.20.0-prerelease", + "version": "2.20.0", "description": "Generate a readable JS file for each JS asset.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/redux-routine/package.json b/packages/redux-routine/package.json index 1298f23c32efe..b0aeab3d626eb 100644 --- a/packages/redux-routine/package.json +++ b/packages/redux-routine/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/redux-routine", - "version": "4.37.0-prerelease", + "version": "4.37.0", "description": "Redux middleware for generator coroutines.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/reusable-blocks/package.json b/packages/reusable-blocks/package.json index 92518c9cd34f6..a15e98ac1a906 100644 --- a/packages/reusable-blocks/package.json +++ b/packages/reusable-blocks/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/reusable-blocks", - "version": "4.14.0-prerelease", + "version": "4.14.0", "description": "Reusable blocks utilities.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/rich-text/package.json b/packages/rich-text/package.json index 96c7bceb35d6d..03ec879b2c6d2 100644 --- a/packages/rich-text/package.json +++ b/packages/rich-text/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/rich-text", - "version": "6.14.0-prerelease", + "version": "6.14.0", "description": "Rich text value and manipulation API.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/router/package.json b/packages/router/package.json index 8d2ae203ebf29..4db064e4ec3ad 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/router", - "version": "0.6.0-prerelease", + "version": "0.6.0", "description": "Router API for WordPress pages.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/scripts/package.json b/packages/scripts/package.json index 9a6659bfbfbbe..c83128f880c25 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/scripts", - "version": "26.8.0-prerelease", + "version": "26.8.0", "description": "Collection of reusable scripts for WordPress development.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/server-side-render/package.json b/packages/server-side-render/package.json index 514ef46728818..00b7f56587209 100644 --- a/packages/server-side-render/package.json +++ b/packages/server-side-render/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/server-side-render", - "version": "4.14.0-prerelease", + "version": "4.14.0", "description": "The component used with WordPress to server-side render a preview of dynamic blocks to display in the editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/shortcode/package.json b/packages/shortcode/package.json index 8ab4f5703a79e..d68d656f97643 100644 --- a/packages/shortcode/package.json +++ b/packages/shortcode/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/shortcode", - "version": "3.37.0-prerelease", + "version": "3.37.0", "description": "Shortcode module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/style-engine/package.json b/packages/style-engine/package.json index 6a7335ca2a2f9..e923cfcafa033 100644 --- a/packages/style-engine/package.json +++ b/packages/style-engine/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/style-engine", - "version": "1.20.0-prerelease", + "version": "1.20.0", "description": "A suite of parsers and compilers for WordPress styles.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/stylelint-config/package.json b/packages/stylelint-config/package.json index f7c0e76a60b78..4bf55359f6651 100644 --- a/packages/stylelint-config/package.json +++ b/packages/stylelint-config/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/stylelint-config", - "version": "21.20.0-prerelease", + "version": "21.20.0", "description": "stylelint config for WordPress development.", "author": "The WordPress Contributors", "license": "MIT", diff --git a/packages/token-list/package.json b/packages/token-list/package.json index 2895cc2fdbe9a..79fe3a8ef5f1c 100644 --- a/packages/token-list/package.json +++ b/packages/token-list/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/token-list", - "version": "2.37.0-prerelease", + "version": "2.37.0", "description": "Constructable, plain JavaScript DOMTokenList implementation, supporting non-browser runtimes.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/url/package.json b/packages/url/package.json index eb1aa6623ce3b..a948e09fe71a8 100644 --- a/packages/url/package.json +++ b/packages/url/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/url", - "version": "3.38.0-prerelease", + "version": "3.38.0", "description": "WordPress URL utilities.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/viewport/package.json b/packages/viewport/package.json index dc583126d6d3d..d3176311bca5a 100644 --- a/packages/viewport/package.json +++ b/packages/viewport/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/viewport", - "version": "5.14.0-prerelease", + "version": "5.14.0", "description": "Viewport module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/warning/package.json b/packages/warning/package.json index f8034054358da..81d798c7c8313 100644 --- a/packages/warning/package.json +++ b/packages/warning/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/warning", - "version": "2.37.0-prerelease", + "version": "2.37.0", "description": "Warning utility for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/widgets/package.json b/packages/widgets/package.json index c0995ddad226b..5b7dfa47b168f 100644 --- a/packages/widgets/package.json +++ b/packages/widgets/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/widgets", - "version": "3.14.0-prerelease", + "version": "3.14.0", "description": "Functionality used by the widgets block editor in the Widgets screen and the Customizer.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/wordcount/package.json b/packages/wordcount/package.json index de7d1af9979fc..509a18a359473 100644 --- a/packages/wordcount/package.json +++ b/packages/wordcount/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/wordcount", - "version": "3.37.0-prerelease", + "version": "3.37.0", "description": "WordPress word count utility.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", From 38904e9d9b3cfeb9c51ca9b9bf392426227da523 Mon Sep 17 00:00:00 2001 From: Gutenberg Repository Automation Date: Wed, 5 Jul 2023 23:08:00 +0000 Subject: [PATCH 060/146] Update Changelog for 16.2.0-rc.1 --- changelog.txt | 308 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 308 insertions(+) diff --git a/changelog.txt b/changelog.txt index e011668bc7e00..9f1b040aaffc7 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,313 @@ == Changelog == += 16.2.0-rc.1 = + + + +## Changelog + +### Features + +#### Patterns +- feat: Rename Reusable blocks to Patterns. ([51704](https://github.com/WordPress/gutenberg/pull/51704)) + + +### Enhancements + +- Export store for the core/customize-widgets package. ([52189](https://github.com/WordPress/gutenberg/pull/52189)) + +#### Patterns +- Library: Add sync status to pattern details screen. ([51954](https://github.com/WordPress/gutenberg/pull/51954)) +- Rename Library to Patterns. ([52102](https://github.com/WordPress/gutenberg/pull/52102)) +- Update custom patterns label to 'My patterns'. ([51949](https://github.com/WordPress/gutenberg/pull/51949)) +- Update pattern creation modal in library. ([51946](https://github.com/WordPress/gutenberg/pull/51946)) +- Update template part icons in the library mosaic (grid items). ([51963](https://github.com/WordPress/gutenberg/pull/51963)) + +#### Site Editor +- Change "Home" template name to "Blog home". ([52048](https://github.com/WordPress/gutenberg/pull/52048)) +- Edit Site: Make loading spinner colors consistent. ([51857](https://github.com/WordPress/gutenberg/pull/51857)) +- Update the icon used to reference the blog. ([52075](https://github.com/WordPress/gutenberg/pull/52075)) + +#### Interactivity API +- Image block: Remove extra lookup for external image dimensions in lightbox. ([52178](https://github.com/WordPress/gutenberg/pull/52178)) +- Image block: Use built-in directive for mouseover event in lightbox. ([52067](https://github.com/WordPress/gutenberg/pull/52067)) + +#### Block Library +- Force full height for editor in Navigation focus mode. ([51798](https://github.com/WordPress/gutenberg/pull/51798)) +- Social links: Updating class and style attributes. ([51997](https://github.com/WordPress/gutenberg/pull/51997)) + +#### Themes +- Add border theme_support. ([51777](https://github.com/WordPress/gutenberg/pull/51777)) +- Add link color theme_support. ([51775](https://github.com/WordPress/gutenberg/pull/51775)) + +#### Global Styles +- Style Book: Show tabs and make blocks clickable when entering edit mode from the Styles menu. ([52222](https://github.com/WordPress/gutenberg/pull/52222)) + +#### Widgets Editor +- Add @example tags to the customize-widgets package. ([52141](https://github.com/WordPress/gutenberg/pull/52141)) + +#### NUX +- Page Content Focus: Add welcome guides. ([52014](https://github.com/WordPress/gutenberg/pull/52014)) + +#### Block Editor +- Use block label and icon for the inserter draggable chip.. ([51048](https://github.com/WordPress/gutenberg/pull/51048)) + +#### Design Tools +- Add Typography: Text orientation (writing mode). ([50822](https://github.com/WordPress/gutenberg/pull/50822)) + +#### Components +- RangeControl: Add support for large 40px number input size. ([49105](https://github.com/WordPress/gutenberg/pull/49105)) + + +### New APIs + +#### Block Editor +- Add new `registerInserterMediaCategory` API to make media categories extensible. ([51542](https://github.com/WordPress/gutenberg/pull/51542)) + + +### Bug Fixes + +- Adjust the position of sticky headings in preferences modal. ([52248](https://github.com/WordPress/gutenberg/pull/52248)) +- BlockRemovalWarningModal: Fix incorrect '_n' usage. ([52164](https://github.com/WordPress/gutenberg/pull/52164)) +- Editor initrial appender: Zero out margins in constrained layouts. ([52026](https://github.com/WordPress/gutenberg/pull/52026)) +- Export store from the edit-site package. ([51986](https://github.com/WordPress/gutenberg/pull/51986)) +- Fix disable DFM when opening styles command. ([52165](https://github.com/WordPress/gutenberg/pull/52165)) +- Fix unintentional toggling on of distraction free. ([52090](https://github.com/WordPress/gutenberg/pull/52090)) +- Footnotes: Increase selector specificity for anchor. ([52179](https://github.com/WordPress/gutenberg/pull/52179)) +- Respect custom aspect ratio. ([52286](https://github.com/WordPress/gutenberg/pull/52286)) +- Turn off DFM for style book and style editing. ([52117](https://github.com/WordPress/gutenberg/pull/52117)) +- Update fixed block toolbar. ([52123](https://github.com/WordPress/gutenberg/pull/52123)) +- Updating the BlockEditorProvider settings prop should reset the store's settings entirely. ([51904](https://github.com/WordPress/gutenberg/pull/51904)) +- [Command Palette]: Remove suggestion for deleting templates/parts. ([52168](https://github.com/WordPress/gutenberg/pull/52168)) +- [Command center]: Add preferences and keyboard shortcuts commands. ([51862](https://github.com/WordPress/gutenberg/pull/51862)) +- [Edit Post]: Add toggle fullscreen mode and list view commands. ([52184](https://github.com/WordPress/gutenberg/pull/52184)) + +#### Block Library +- Fix default block dimensions visibility. ([52256](https://github.com/WordPress/gutenberg/pull/52256)) +- Fix fetching Nav fallback ID flushing Navigation entity cache. ([52069](https://github.com/WordPress/gutenberg/pull/52069)) +- Fix flaky tests in `navigation.spec.js` and other tests related to the Post Editor Template mode. ([51790](https://github.com/WordPress/gutenberg/pull/51790)) +- Fix: Term Description block should only be available in the site editor. ([51053](https://github.com/WordPress/gutenberg/pull/51053)) +- Footnotes: Register meta field for pages. ([52024](https://github.com/WordPress/gutenberg/pull/52024)) +- Image block: Fix cursor style when lightbox is opened. ([52187](https://github.com/WordPress/gutenberg/pull/52187)) +- Navigation: Add the draft status to the navigation title. ([51967](https://github.com/WordPress/gutenberg/pull/51967)) +- Navigation: Fix end-to-end test failures caused by sidebar title change. ([52308](https://github.com/WordPress/gutenberg/pull/52308)) +- Navigation: Fix sidebar title. ([52167](https://github.com/WordPress/gutenberg/pull/52167)) +- Navigation: Remove one preloaded endpoint. ([52115](https://github.com/WordPress/gutenberg/pull/52115)) +- Page List: Fix parent block selection when converting to link. ([52193](https://github.com/WordPress/gutenberg/pull/52193)) +- Post editor: Require confirmation before removing Footnotes. ([52277](https://github.com/WordPress/gutenberg/pull/52277)) +- fix: Display heading level dropdown icons and labels. ([52004](https://github.com/WordPress/gutenberg/pull/52004)) + +#### Site Editor +- Add confirmation step when deleting a Template. ([52236](https://github.com/WordPress/gutenberg/pull/52236)) +- Command Palette: Fix incorrect path and snackbar message when template part is deleted. ([52034](https://github.com/WordPress/gutenberg/pull/52034)) +- Default to showing status slug in sidebar. ([52226](https://github.com/WordPress/gutenberg/pull/52226)) +- Fix missing MenuGroup segment in Site Editor header more menu. ([51860](https://github.com/WordPress/gutenberg/pull/51860)) +- Fix missing snackbars in Library. ([52021](https://github.com/WordPress/gutenberg/pull/52021)) +- Fix stepper styling in Home template sidebar. ([52025](https://github.com/WordPress/gutenberg/pull/52025)) +- Get the top toolbar preference from the correct scope. ([51840](https://github.com/WordPress/gutenberg/pull/51840)) +- Hide word count and reading time meta data for the Posts Page details panel. ([52186](https://github.com/WordPress/gutenberg/pull/52186)) +- Modal: Add small top padding to the content so that avoid cutting off the visible outline when hovering items. ([51829](https://github.com/WordPress/gutenberg/pull/51829)) +- Site Editor Frame: Ignore Spotlight in view mode. ([52262](https://github.com/WordPress/gutenberg/pull/52262)) +- Try restoring the site editor animation. ([51956](https://github.com/WordPress/gutenberg/pull/51956)) + +#### Patterns +- Fix custom patterns console error. ([51947](https://github.com/WordPress/gutenberg/pull/51947)) +- Fix history back after entering edit mode from Patterns. ([52112](https://github.com/WordPress/gutenberg/pull/52112)) +- Fix setting of sync status for fully synced patterns. ([51952](https://github.com/WordPress/gutenberg/pull/51952)) +- Fix sidebar tab label. ([51953](https://github.com/WordPress/gutenberg/pull/51953)) +- Fix: Pattern focus mode DocumentActions should use the pattern icon. ([52031](https://github.com/WordPress/gutenberg/pull/52031)) +- Include template parts for custom areas in Uncategorized category. ([52159](https://github.com/WordPress/gutenberg/pull/52159)) +- Remove ability for user to toggle sync status after pattern creation. ([51998](https://github.com/WordPress/gutenberg/pull/51998)) +- Rename sync_status and move to top level field on rest return instead of a meta field. ([52146](https://github.com/WordPress/gutenberg/pull/52146)) + +#### Interactivity API +- Block Image: Lightbox - Hide animation selector if behavior is Default or None. ([51748](https://github.com/WordPress/gutenberg/pull/51748)) +- Image block: Fix responsive sizing in lightbox. ([51823](https://github.com/WordPress/gutenberg/pull/51823)) +- Image block: Lightbox animation improvements. ([51721](https://github.com/WordPress/gutenberg/pull/51721)) +- Navigation block: Check that the modal is set before using `contains`. ([51962](https://github.com/WordPress/gutenberg/pull/51962)) + +#### Accessibility +- Fix incorrect aria-describedby attributes for theme patterns. ([52263](https://github.com/WordPress/gutenberg/pull/52263)) +- Guide: Place focus on the guide's container instead of its first tabbable. ([52300](https://github.com/WordPress/gutenberg/pull/52300)) +- Site Editor: Update headings hierarchy in the 'Manage all' screens. ([52271](https://github.com/WordPress/gutenberg/pull/52271)) + +#### Global Styles +- Check if experiment enabled for realsies this time. ([52315](https://github.com/WordPress/gutenberg/pull/52315)) +- Check randomizer experiment is enabled before rendering button. ([52306](https://github.com/WordPress/gutenberg/pull/52306)) + +#### Navigation Menu Sidebar +- Make the entire preview clickable in order to enter "edit" mode in focus mode. ([51973](https://github.com/WordPress/gutenberg/pull/51973)) +- Restore sidebar in focus mode on Pattern click through in Browse Mode `Library`. ([51897](https://github.com/WordPress/gutenberg/pull/51897)) + +#### Page Content Focus +- Hide parent selector when parent's block editing mode is 'disabled' or 'contentOnly'. ([52264](https://github.com/WordPress/gutenberg/pull/52264)) + +#### Post Editor +- Editor: Avoid remounting pre-publish sidebar contents during autosave. ([52208](https://github.com/WordPress/gutenberg/pull/52208)) + +#### Block Editor +- Enable draft entity creation in Nav block offcanvas. ([52166](https://github.com/WordPress/gutenberg/pull/52166)) + +#### History +- Update the behavior of the cached undo/redo stack. ([51644](https://github.com/WordPress/gutenberg/pull/51644)) + +#### Components +- DropdownMenu: Fix icon style when dashicon is used. ([43574](https://github.com/WordPress/gutenberg/pull/43574)) + + +### Performance + +- Migrate performance tests to Playwright. ([51084](https://github.com/WordPress/gutenberg/pull/51084)) +- Social links: Reverts updating class and style attributes. ([52019](https://github.com/WordPress/gutenberg/pull/52019)) +- tests: Configure as a production environment. ([52016](https://github.com/WordPress/gutenberg/pull/52016)) + +#### Block Library +- Try: Aggressive TinyMCE deprecation. ([50387](https://github.com/WordPress/gutenberg/pull/50387)) + + +### Experiments + +#### Interactivity API +- Create @wordpress/interactivity with the Interactivity API. ([50906](https://github.com/WordPress/gutenberg/pull/50906)) + + +### Documentation + +- Add @examples to the @wordpress/rich-text package selectors and hide the actions from documentation. ([52089](https://github.com/WordPress/gutenberg/pull/52089)) +- Add examples for core/keyboard-shortcut package. ([42831](https://github.com/WordPress/gutenberg/pull/42831)) +- Block Editor: Add README for FontFamilyControl component. ([52118](https://github.com/WordPress/gutenberg/pull/52118)) +- Block Editor: Add README for `PanelColorSettings` component. ([52327](https://github.com/WordPress/gutenberg/pull/52327)) +- Block Editor: Add README for `RecursionProvider`. ([52334](https://github.com/WordPress/gutenberg/pull/52334)) +- Docs: Update release documentation to use the right cherry-picking command. ([51935](https://github.com/WordPress/gutenberg/pull/51935)) + + +### Code Quality + +- Lodash: Refactor away from `_.kebabCase()` in `getCleanTemplatePartSlug`. ([51906](https://github.com/WordPress/gutenberg/pull/51906)) +- Lodash: Refactor away from `_.kebabCase()` in add page modal. ([51911](https://github.com/WordPress/gutenberg/pull/51911)) +- Lodash: Refactor away from `_.kebabCase()` in generic template modal. ([51910](https://github.com/WordPress/gutenberg/pull/51910)) +- Lodash: Remove completely from `@wordpress/style-engine` package. ([51726](https://github.com/WordPress/gutenberg/pull/51726)) + +#### Block Library +- Heading Block: Remove unused `HeadingLevelIcon` component. ([52008](https://github.com/WordPress/gutenberg/pull/52008)) +- Image block and behaviors: Fix some warnings. ([52109](https://github.com/WordPress/gutenberg/pull/52109)) +- Lodash: Refactor embed block away from `_.kebabCase()`. ([51916](https://github.com/WordPress/gutenberg/pull/51916)) +- Lodash: Remove dependency from block library package. ([51976](https://github.com/WordPress/gutenberg/pull/51976)) +- Make Navigation fallback selector private. ([51413](https://github.com/WordPress/gutenberg/pull/51413)) +- Page List: Fix ESLint warnings. ([52267](https://github.com/WordPress/gutenberg/pull/52267)) +- Refactor, document, and fix image block deprecations. ([52081](https://github.com/WordPress/gutenberg/pull/52081)) + +#### Page Content Focus +- Add basic test for the page content focus flow. ([52231](https://github.com/WordPress/gutenberg/pull/52231)) + +#### List View +- Return primitive value for 'hideInserter' in Appender component. ([52161](https://github.com/WordPress/gutenberg/pull/52161)) + +#### Interactivity API +- Fix the `exsisting` -> `existing` typo. ([52110](https://github.com/WordPress/gutenberg/pull/52110)) + +#### Navigation Menu Sidebar +- Remove redundant call to Navigation selector in Browse Mode. ([51988](https://github.com/WordPress/gutenberg/pull/51988)) + +#### Site Editor +- Block removal prompt: Let consumers pass their own rules. ([51841](https://github.com/WordPress/gutenberg/pull/51841)) + +#### Block Editor +- Revise LinkControl suggestions UI to use MenuItem. ([50978](https://github.com/WordPress/gutenberg/pull/50978)) + + +### Tools + +#### Testing +- Drops PHP 5.6 CI jobs. ([52345](https://github.com/WordPress/gutenberg/pull/52345)) +- Fix flakiness of saving entities in the site editor. ([51728](https://github.com/WordPress/gutenberg/pull/51728)) +- Fix flaky Site Editor pages end-to-end test. ([52283](https://github.com/WordPress/gutenberg/pull/52283)) +- Have `createNewPost` wait for editor canvas contents. ([51824](https://github.com/WordPress/gutenberg/pull/51824)) + +#### Build Tooling +- Fix phpunit failures. ([51950](https://github.com/WordPress/gutenberg/pull/51950)) +- Use moment-timezone-data-webpack-plugin to optimize timezones shipped in wp/date. ([51519](https://github.com/WordPress/gutenberg/pull/51519)) + + +### Various + +- Add caching to schema of REST API. ([52045](https://github.com/WordPress/gutenberg/pull/52045)) +- Add code owners for the Interactivity API runtime. ([52174](https://github.com/WordPress/gutenberg/pull/52174)) +- Backport from core: Rename `gutenberg_get_remote_theme_patterns` to `gutenberg_get_theme_directory_pattern_slugs`. ([51784](https://github.com/WordPress/gutenberg/pull/51784)) +- Block editor store: Also attach private APIs to old store descriptor. ([52088](https://github.com/WordPress/gutenberg/pull/52088)) +- Blocks: Remove gutenberg refs in PHP files. ([51978](https://github.com/WordPress/gutenberg/pull/51978)) +- Command palette: Rename. ([52153](https://github.com/WordPress/gutenberg/pull/52153)) +- Drop-indicator: Remove white border. ([52122](https://github.com/WordPress/gutenberg/pull/52122)) +- First version of the Interactivity API README. ([52104](https://github.com/WordPress/gutenberg/pull/52104)) +- Global Styles Revisions API: Backport changes from Core. ([52095](https://github.com/WordPress/gutenberg/pull/52095)) +- Global Styles Sidebar: Re-add Colors: Heading to selected blocks. ([49131](https://github.com/WordPress/gutenberg/pull/49131)) +- Image block: Update lightbox animation tests. ([52290](https://github.com/WordPress/gutenberg/pull/52290)) +- Patterns: Update section heading levels. ([52273](https://github.com/WordPress/gutenberg/pull/52273)) +- Perf logging: Change date to ISO 8601. ([51833](https://github.com/WordPress/gutenberg/pull/51833)) +- Refactor use-tab-nav shift+tab to use existing utils. ([51817](https://github.com/WordPress/gutenberg/pull/51817)) +- Remove serverSideBlockDefinitions from a test. ([52215](https://github.com/WordPress/gutenberg/pull/52215)) +- Restore "Buttons > can resize width" test. ([51865](https://github.com/WordPress/gutenberg/pull/51865)) +- Update delete page button label. ([51812](https://github.com/WordPress/gutenberg/pull/51812)) +- Update versions in WP for 6.3. ([51984](https://github.com/WordPress/gutenberg/pull/51984)) +- Wrap "Move to trash" and "Switch to draft" buttons when labels are too long to fit on a single row. ([52249](https://github.com/WordPress/gutenberg/pull/52249)) +- [Github-Actions-Workflows][Plugin-Release] Allow shipping a point-release for an older stable release. ([49082](https://github.com/WordPress/gutenberg/pull/49082)) + +#### Block Library +- Block Editor: Unify texts for Create pattern modal. ([52151](https://github.com/WordPress/gutenberg/pull/52151)) +- Block Supports: Change prefix in gutenberg_apply_colors_support to wp_ in dynamic blocks. ([51989](https://github.com/WordPress/gutenberg/pull/51989)) +- Navigation in Site View: Readd the edit button. ([52111](https://github.com/WordPress/gutenberg/pull/52111)) +- Navigation submenu: Remove unused doc block. ([52152](https://github.com/WordPress/gutenberg/pull/52152)) +- Page List: Change modal text. ([52116](https://github.com/WordPress/gutenberg/pull/52116)) +- i18n: Add context to the word "Filters". ([52198](https://github.com/WordPress/gutenberg/pull/52198)) + +#### Site Editor +- Library: Update icons in the creation menu. ([52108](https://github.com/WordPress/gutenberg/pull/52108)) +- Polish welcome guide copy for page / template editing. ([52282](https://github.com/WordPress/gutenberg/pull/52282)) +- Try: Update template titles. ([51428](https://github.com/WordPress/gutenberg/pull/51428)) +- Update stepper styling in Home template details panel. ([51972](https://github.com/WordPress/gutenberg/pull/51972)) +- Update text color of active menu items. ([51965](https://github.com/WordPress/gutenberg/pull/51965)) + +#### Patterns +- Add a hint about the rename of reusable blocks to menu and inserter. ([51771](https://github.com/WordPress/gutenberg/pull/51771)) +- Copy: "Detach pattern" instead of "Covert to regular block". ([51993](https://github.com/WordPress/gutenberg/pull/51993)) +- Library: Reinstate manage all template parts page. ([51961](https://github.com/WordPress/gutenberg/pull/51961)) +- [Library] Add lock icon for theme patterns. ([51990](https://github.com/WordPress/gutenberg/pull/51990)) + +#### Accessibility +- Navigation block: Do not toggle aria-expanded on hover when the overlay menu is opened. ([52170](https://github.com/WordPress/gutenberg/pull/52170)) +- Navigation block: Don't close submenu when it has focus. ([52177](https://github.com/WordPress/gutenberg/pull/52177)) + +#### Widgets Editor +- Export the store for the core/edit-widgets pacakage. ([52190](https://github.com/WordPress/gutenberg/pull/52190)) + +#### Post Editor +- Move block editor settings filter into 6.3 compat folder. ([52100](https://github.com/WordPress/gutenberg/pull/52100)) + +#### Layout +- Move grid function kses patch into 6.3 compat folder. ([52098](https://github.com/WordPress/gutenberg/pull/52098)) + +#### Data Layer +- hasResolvingSelectors: Exclude from result of resolveSelect. ([52038](https://github.com/WordPress/gutenberg/pull/52038)) + +#### Icons +- Remove fill="none" from pinSmall icon. ([51979](https://github.com/WordPress/gutenberg/pull/51979)) + +#### Navigation Menu Sidebar +- Sidebar Navigation: Refactor delete modal with `ConfirmDialog` component. ([51867](https://github.com/WordPress/gutenberg/pull/51867)) + +#### Templates API +- Template revisions API: Move back to experimental. ([51774](https://github.com/WordPress/gutenberg/pull/51774)) + + + + +## Contributors + +The following contributors merged PRs in this release: + +@aaronrobertshaw @ajlende @annezazu @artemiomorales @c4rl0sbr4v0 @carolinan @DAreRodz @dcalhoun @draganescu @ellatrix @fullofcaffeine @getdave @glendaviesnz @hellofromtonya @jameskoster @jasmussen @jeryj @jsnajdr @juanfra @juanmaguitar @kevin940726 @luisherranz @Mamaduka @mcsf @michalczaplinski @miminari @noisysocks @ntsekouras @oandregal @ockham @priethor @ramonjd @richtabor @ryanwelcher @SaxonF @scruffian @spacedmonkey @stokesman @t-hamano @talldan @tellthemachines @tyxla @WunderBart @youknowriad + + = 16.1.1 = ## Changelog From 7ac218c3aa7d169ea75d7d2bc32538e5a7af5a05 Mon Sep 17 00:00:00 2001 From: Robert Anderson Date: Thu, 6 Jul 2023 09:18:59 +1000 Subject: [PATCH 061/146] Exit template focus when opening the W menu (#52235) --- packages/edit-site/src/store/private-actions.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/edit-site/src/store/private-actions.js b/packages/edit-site/src/store/private-actions.js index 952c1852ae305..1b97959277760 100644 --- a/packages/edit-site/src/store/private-actions.js +++ b/packages/edit-site/src/store/private-actions.js @@ -11,7 +11,7 @@ import { store as preferencesStore } from '@wordpress/preferences'; */ export const setCanvasMode = ( mode ) => - ( { registry, dispatch } ) => { + ( { registry, dispatch, select } ) => { registry.dispatch( blockEditorStore ).__unstableSetEditorMode( 'edit' ); dispatch( { type: 'SET_CANVAS_MODE', @@ -26,6 +26,10 @@ export const setCanvasMode = ) { dispatch.setIsListViewOpened( true ); } + // Switch focus away from editing the template when switching to view mode. + if ( mode === 'view' && select.isPage() ) { + dispatch.setHasPageContentFocus( true ); + } }; /** From 72b2b28305cd2eae0eb0b6c2ac82a715259c6830 Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Wed, 5 Jul 2023 18:29:09 -0500 Subject: [PATCH 062/146] Fix font printing when metabox exists (#52343) --- lib/experimental/fonts-api/fonts-api.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/experimental/fonts-api/fonts-api.php b/lib/experimental/fonts-api/fonts-api.php index 841efeda47a95..e2ad6e1cb53af 100644 --- a/lib/experimental/fonts-api/fonts-api.php +++ b/lib/experimental/fonts-api/fonts-api.php @@ -26,14 +26,7 @@ function wp_fonts() { // Initialize. $wp_fonts->register_provider( 'local', 'WP_Fonts_Provider_Local' ); add_action( 'wp_head', 'wp_print_fonts', 50 ); - - /* - * For themes without a theme.json, admin printing is initiated by the 'admin_print_styles' hook. - * For themes with theme.json, admin printing is initiated by _wp_get_iframed_editor_assets(). - */ - if ( ! wp_theme_has_theme_json() ) { - add_action( 'admin_print_styles', 'wp_print_fonts', 50 ); - } + add_action( 'admin_print_styles', 'wp_print_fonts', 50 ); } return $wp_fonts; From 1cbaccd1d52676bcd49057b51c1a446ee0bb4dae Mon Sep 17 00:00:00 2001 From: James Koster Date: Thu, 6 Jul 2023 01:53:31 +0100 Subject: [PATCH 063/146] Patterns: Update pattern copy (#52340) --- .../edit-site/src/components/page-patterns/patterns-list.js | 4 ++-- .../sidebar-navigation-screen-pattern/use-pattern-details.js | 4 ++-- .../components/sidebar-navigation-screen-patterns/index.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/edit-site/src/components/page-patterns/patterns-list.js b/packages/edit-site/src/components/page-patterns/patterns-list.js index 87b830c6180cc..d59596f20e795 100644 --- a/packages/edit-site/src/components/page-patterns/patterns-list.js +++ b/packages/edit-site/src/components/page-patterns/patterns-list.js @@ -81,7 +81,7 @@ export default function PatternsList( { categoryId, type } ) { { __( - 'Patterns that are kept in sync across your site' + 'Patterns that are kept in sync across the site' ) } @@ -101,7 +101,7 @@ export default function PatternsList( { categoryId, type } ) { { __( - 'Patterns that can be changed freely without affecting your site' + 'Patterns that can be changed freely without affecting the site' ) } diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js b/packages/edit-site/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js index 9853e2e6de23b..ed36bb907301b 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +++ b/packages/edit-site/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js @@ -38,7 +38,7 @@ export default function usePatternDetails( postType, postId ) { if ( ! descriptionText && addedBy.text ) { descriptionText = sprintf( // translators: %s: pattern title e.g: "Header". - __( 'This is your %s pattern.' ), + __( 'This is the %s pattern.' ), getTitle() ); } @@ -46,7 +46,7 @@ export default function usePatternDetails( postType, postId ) { if ( ! descriptionText && postType === 'wp_block' && record?.title ) { descriptionText = sprintf( // translators: %s: user created pattern title e.g. "Footer". - __( 'This is your %s pattern.' ), + __( 'This is the %s pattern.' ), record.title ); } diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-patterns/index.js b/packages/edit-site/src/components/sidebar-navigation-screen-patterns/index.js index 04f893cdbf2c8..b28aa6687723b 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-patterns/index.js +++ b/packages/edit-site/src/components/sidebar-navigation-screen-patterns/index.js @@ -73,7 +73,7 @@ export default function SidebarNavigationScreenPatterns() { isRoot={ isTemplatePartsMode } title={ __( 'Patterns' ) } description={ __( - 'Manage what patterns are available when editing your site.' + 'Manage what patterns are available when editing the site.' ) } actions={ } footer={ footer } From f6efbc2ba29ca1b278cb1895ae9e55cdac020523 Mon Sep 17 00:00:00 2001 From: tellthemachines Date: Thu, 6 Jul 2023 11:32:04 +1000 Subject: [PATCH 064/146] Update layout documentation after stabilisation (#52316) --- docs/explanations/architecture/styles.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/explanations/architecture/styles.md b/docs/explanations/architecture/styles.md index faf2649efd13a..5b147b2bbe6ea 100644 --- a/docs/explanations/architecture/styles.md +++ b/docs/explanations/architecture/styles.md @@ -511,9 +511,7 @@ The global styles UI in the site editor has a screen for per-block styles. The l In addition to styles at the individual block level and in global styles, there is the concept of layout styles that are output for both blocks-based and classic themes. -The layout block support is an experimental approach for outputting common layout styles that are shared between blocks that are used for creating layouts. Layout styles are useful for providing common styling for any block that is a container for other blocks. Examples of blocks that depend on these layout styles include Group, Row, Columns, Buttons, and Social Icons. - -While the feature is part of WordPress core, it is still flagged as experimental in the sense that the features and output are still undergoing active development. It is therefore not yet a stable feature from the perspective of 3rd party blocks, as the API is likely to change. The feature is enabled in core blocks via the `layout` setting under `supports` in a block's `block.json` file. +The layout block support outputs common layout styles that are shared between blocks used for creating layouts. Layout styles are useful for providing common styling for any block that is a container for other blocks. Examples of blocks that depend on these layout styles include Group, Row, Columns, Buttons, and Social Icons. The feature is enabled in core blocks via the `layout` setting under `supports` in a block's `block.json` file. There are two primary places where Layout styles are output: @@ -523,22 +521,23 @@ Base layout styles are those styles that are common to all blocks that opt in to Base layout styles are output from within [the main PHP class](https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/class-wp-theme-json.php) that handles global styles, and form part of the global styles stylesheet. In order to provide support for core blocks in classic themes, these styles are always output, irrespective of whether the theme provides its own `theme.json` file. -Common layout definitions are stored in [the core `theme.json` file](https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/theme.json), but are not intended to be extended or overridden by themes. +Common layout definitions are stored in [the core layout block support file](https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/block-supports/layout.php). #### Individual layout styles -When a block that opts in to the experimental layout support is rendered, two things are processed and added to the output via [`layout.php`](https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/block-supports/layout.php): +When a block that opts in to layout support is rendered, two things are processed and added to the output via [`layout.php`](https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/block-supports/layout.php): - Semantic class names are added to the block markup to indicate which layout settings are in use. For example, `is-layout-flow` is for blocks (such as Group) that use the default/flow layout, and `is-content-justification-right` is added when a user sets a block to use right justification. - Individual styles are generated for non-default layout values that are set on the individual block being rendered. These styles are attached to the block via a container class name using the form `wp-container-$id` where the `$id` is a [unique number](https://developer.wordpress.org/reference/functions/wp_unique_id/). #### Available layout types -There are currently three layout types in use: +There are currently four layout types in use: - Default/Flow: Items are stacked vertically. The parent container block is set to `display: flow` and the spacing between children is handled via vertical margins. - Constrained: Items are stacked vertically, using the same spacing logic as the Flow layout. Features constrained widths for child content, outputting widths for standard content size and wide size. Defaults to using global `contentSize` and `wideSize` values set in `settings.layout` in the `theme.json`. - Flex: Items are displayed using a Flexbox layout. Defaults to a horizontal orientation. Spacing between children is handled via the `gap` CSS property. +- Grid: Items are displayed using a Grid layout. Defaults to an `auto-fill` approach to column generation but can also be set to a fixed number of columns. Spacing between children is handled via the `gap` CSS property. For controlling spacing between blocks, and enabling block spacing controls see: [What is blockGap and how can I use it?](https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-json/#what-is-blockgap-and-how-can-i-use-it). @@ -546,7 +545,7 @@ For controlling spacing between blocks, and enabling block spacing controls see: The layout block support is designed to enable control over layout features from within the block and site editors. Where possible, try to use the features of the blocks to determine particular layout requirements rather than relying upon additional stylesheets. -For themes that wish to target container blocks in order to add or adjust particular styles, the block's class name is often the best class name to use. Class names such as `wp-block-group` or `wp-block-columns` are usually reliable class names for targeting a particular block. +For themes that wish to target container blocks in order to add or adjust particular styles, the block's class name is often the best class name to use. Class names such as `wp-block-group` or `wp-block-columns` are usually reliable class names for targeting a particular block. In addition to block and layout classnames, there is also a classname composed of block and layout together: for example, for a Group block with a constrained layout it will be `wp-block-group-is-layout-constrained`. For targeting a block that uses a particular layout type, avoid targeting `wp-container-` as container classes may not always be present in the rendered markup. @@ -559,6 +558,7 @@ The current semantic class names that can be output by the Layout block support - `is-layout-flow`: Blocks that use the Default/Flow layout type. - `is-layout-constrained`: Blocks that use the Constrained layout type. - `is-layout-flex`: Blocks that use the Flex layout type. +- `is-layout-grid`: Blocks that used the Grid layout type. - `wp-container-$id`: Where `$id` is a semi-random number. A container class that only exists when the block contains non-default Layout values. This class should not be used directly for any CSS targeting as it may or may not be present. - `is-horizontal`: When a block explicitly sets `orientation` to `horizontal`. - `is-vertical`: When a block explicitly sets `orientation` to `vertical`. From 00cfeee55e19be3f590748dd5d5f8a23c93d0a00 Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Thu, 6 Jul 2023 14:48:40 +1200 Subject: [PATCH 065/146] Patterns: Add handling of sync status to the wp-admin patterns list page (#52346) --- .../src/components/import-form/index.js | 4 ++-- packages/list-reusable-blocks/src/index.js | 4 +--- packages/list-reusable-blocks/src/utils/export.js | 2 ++ packages/list-reusable-blocks/src/utils/import.js | 10 ++++++++-- .../editor/various/manage-reusable-blocks.spec.js | 2 +- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/packages/list-reusable-blocks/src/components/import-form/index.js b/packages/list-reusable-blocks/src/components/import-form/index.js index 3b3daa49571f4..9ba1589e52f39 100644 --- a/packages/list-reusable-blocks/src/components/import-form/index.js +++ b/packages/list-reusable-blocks/src/components/import-form/index.js @@ -49,8 +49,8 @@ function ImportForm( { instanceId, onUpload } ) { case 'Invalid JSON file': uiMessage = __( 'Invalid JSON file' ); break; - case 'Invalid Reusable block JSON file': - uiMessage = __( 'Invalid Reusable block JSON file' ); + case 'Invalid Pattern JSON file': + uiMessage = __( 'Invalid Pattern JSON file' ); break; default: uiMessage = __( 'Unknown error' ); diff --git a/packages/list-reusable-blocks/src/index.js b/packages/list-reusable-blocks/src/index.js index 3c9945139856f..4440ba1c49f05 100644 --- a/packages/list-reusable-blocks/src/index.js +++ b/packages/list-reusable-blocks/src/index.js @@ -31,9 +31,7 @@ document.addEventListener( 'DOMContentLoaded', () => { const showNotice = () => { const notice = document.createElement( 'div' ); notice.className = 'notice notice-success is-dismissible'; - notice.innerHTML = `

    ${ __( - 'Reusable block imported successfully!' - ) }

    `; + notice.innerHTML = `

    ${ __( 'Pattern imported successfully!' ) }

    `; const headerEnd = document.querySelector( '.wp-header-end' ); if ( ! headerEnd ) { diff --git a/packages/list-reusable-blocks/src/utils/export.js b/packages/list-reusable-blocks/src/utils/export.js index 0f70931c50080..4075c7576f134 100644 --- a/packages/list-reusable-blocks/src/utils/export.js +++ b/packages/list-reusable-blocks/src/utils/export.js @@ -25,11 +25,13 @@ async function exportReusableBlock( id ) { } ); const title = post.title.raw; const content = post.content.raw; + const syncStatus = post.wp_pattern_sync_status; const fileContent = JSON.stringify( { __file: 'wp_block', title, content, + syncStatus, }, null, 2 diff --git a/packages/list-reusable-blocks/src/utils/import.js b/packages/list-reusable-blocks/src/utils/import.js index 84c28b5fcfc80..465fb080ce8df 100644 --- a/packages/list-reusable-blocks/src/utils/import.js +++ b/packages/list-reusable-blocks/src/utils/import.js @@ -27,9 +27,11 @@ async function importReusableBlock( file ) { ! parsedContent.title || ! parsedContent.content || typeof parsedContent.title !== 'string' || - typeof parsedContent.content !== 'string' + typeof parsedContent.content !== 'string' || + ( parsedContent.syncStatus && + typeof parsedContent.syncStatus !== 'string' ) ) { - throw new Error( 'Invalid Reusable block JSON file' ); + throw new Error( 'Invalid Pattern JSON file' ); } const postType = await apiFetch( { path: `/wp/v2/types/wp_block` } ); const reusableBlock = await apiFetch( { @@ -38,6 +40,10 @@ async function importReusableBlock( file ) { title: parsedContent.title, content: parsedContent.content, status: 'publish', + meta: + parsedContent.syncStatus === 'unsynced' + ? { wp_pattern_sync_status: parsedContent.syncStatus } + : undefined, }, method: 'POST', } ); diff --git a/test/e2e/specs/editor/various/manage-reusable-blocks.spec.js b/test/e2e/specs/editor/various/manage-reusable-blocks.spec.js index 64d09dc39af72..bb390d2b39a8e 100644 --- a/test/e2e/specs/editor/various/manage-reusable-blocks.spec.js +++ b/test/e2e/specs/editor/various/manage-reusable-blocks.spec.js @@ -35,7 +35,7 @@ test.describe( 'Managing reusable blocks', () => { // Wait for the success notice. await expect( - page.locator( 'text=Reusable block imported successfully!' ) + page.locator( 'text=Pattern imported successfully!' ) ).toBeVisible(); // Refresh the page. From 892f9a657a10153ddd532bf8df8dd198302bc9e0 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Thu, 6 Jul 2023 11:46:36 +0400 Subject: [PATCH 066/146] Query Pagination: Set 'clientId' as useSelect dependency (#52358) --- .../src/query-pagination/edit.js | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/packages/block-library/src/query-pagination/edit.js b/packages/block-library/src/query-pagination/edit.js index 8ab1f63377949..7598eba5c1cac 100644 --- a/packages/block-library/src/query-pagination/edit.js +++ b/packages/block-library/src/query-pagination/edit.js @@ -34,20 +34,23 @@ export default function QueryPaginationEdit( { setAttributes, clientId, } ) { - const hasNextPreviousBlocks = useSelect( ( select ) => { - const { getBlocks } = select( blockEditorStore ); - const innerBlocks = getBlocks( clientId ); - /** - * Show the `paginationArrow` and `showLabel` controls only if a - * `QueryPaginationNext/Previous` block exists. - */ - return innerBlocks?.find( ( innerBlock ) => { - return [ - 'core/query-pagination-next', - 'core/query-pagination-previous', - ].includes( innerBlock.name ); - } ); - }, [] ); + const hasNextPreviousBlocks = useSelect( + ( select ) => { + const { getBlocks } = select( blockEditorStore ); + const innerBlocks = getBlocks( clientId ); + /** + * Show the `paginationArrow` and `showLabel` controls only if a + * `QueryPaginationNext/Previous` block exists. + */ + return innerBlocks?.find( ( innerBlock ) => { + return [ + 'core/query-pagination-next', + 'core/query-pagination-previous', + ].includes( innerBlock.name ); + } ); + }, + [ clientId ] + ); const blockProps = useBlockProps(); const innerBlocksProps = useInnerBlocksProps( blockProps, { template: TEMPLATE, From 9e1f63739f18334761367808b09535f7b83cf4d8 Mon Sep 17 00:00:00 2001 From: tellthemachines Date: Thu, 6 Jul 2023 17:52:45 +1000 Subject: [PATCH 067/146] =?UTF-8?q?Fix=20react-dropdown-menu=20version=20t?= =?UTF-8?q?o=20avoid=20breaking=20change=20from=20one=20of=20=E2=80=A6=20(?= =?UTF-8?q?#52356)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix react-dropdown-menu version to avoid breaking change from one if its dependencies. * Changelog update * move changelog entry to the right place * Update package-lock --- package-lock.json | 4 ++-- packages/components/CHANGELOG.md | 4 ++++ packages/components/package.json | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 31da77f8ca62d..f9e56d0a6b9a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17427,7 +17427,7 @@ "@emotion/styled": "^11.6.0", "@emotion/utils": "^1.0.0", "@floating-ui/react-dom": "1.0.0", - "@radix-ui/react-dropdown-menu": "^2.0.4", + "@radix-ui/react-dropdown-menu": "2.0.4", "@use-gesture/react": "^10.2.24", "@wordpress/a11y": "file:packages/a11y", "@wordpress/compose": "file:packages/compose", @@ -46493,7 +46493,7 @@ "optionator": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha512-oCOQ8AIC2ciLy/sE2ehafRBleBgDLvzGhBRRev87sP7ovnbvQfqpc3XFI0DhHey2OfVoNV91W+GPC6B3540/5Q==", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", "dev": true, "requires": { "deep-is": "~0.1.3", diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 03f0ad1563448..6e38eb22213fc 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Bug Fix + +- `Popover`: Pin `react-dropdown-menu` version to avoid breaking changes in dependency updates. ([52356](https://github.com/WordPress/gutenberg/pull/52356)). + ## 25.3.0 (2023-07-05) ### Enhancements diff --git a/packages/components/package.json b/packages/components/package.json index 2b6595215011e..74220c11013e2 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -39,7 +39,7 @@ "@emotion/styled": "^11.6.0", "@emotion/utils": "^1.0.0", "@floating-ui/react-dom": "1.0.0", - "@radix-ui/react-dropdown-menu": "^2.0.4", + "@radix-ui/react-dropdown-menu": "2.0.4", "@use-gesture/react": "^10.2.24", "@wordpress/a11y": "file:../a11y", "@wordpress/compose": "file:../compose", From cea0afda8a086ba12eb634202ad2a6f771655756 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Thu, 6 Jul 2023 09:53:18 +0200 Subject: [PATCH 068/146] [RNMobile] Fix a crash related to Reanimated when closing the editor (#52320) * Update block drop position using Reanimated's shared value Seems there's some kind of incompatibility on calling a JS function from a worklet invoked from a gesture handler. For this reason, the logic to set the dropping insertion point has been updated. It now uses a Reanimated's shared value to keep the dragging over position and `useDerivedValue` hook to listen for changes. * Update `react-native-editor` changelog --- .../block-draggable/index.native.js | 10 +- .../use-block-drop-zone/index.native.js | 93 +++++++++++++------ packages/react-native-editor/CHANGELOG.md | 1 + 3 files changed, 73 insertions(+), 31 deletions(-) diff --git a/packages/block-editor/src/components/block-draggable/index.native.js b/packages/block-editor/src/components/block-draggable/index.native.js index a6deca474dd56..d153843cae6a4 100644 --- a/packages/block-editor/src/components/block-draggable/index.native.js +++ b/packages/block-editor/src/components/block-draggable/index.native.js @@ -109,8 +109,12 @@ const BlockDraggableWrapper = ( { children, isRTL } ) => { draggingScrollHandler( event ); }; - const { onBlockDragOver, onBlockDragEnd, onBlockDrop, targetBlockIndex } = - useBlockDropZone(); + const { + onBlockDragOverWorklet, + onBlockDragEnd, + onBlockDrop, + targetBlockIndex, + } = useBlockDropZone(); // Stop dragging blocks if the block draggable is unmounted. useEffect( () => { @@ -184,7 +188,7 @@ const BlockDraggableWrapper = ( { children, isRTL } ) => { chip.y.value = dragPosition.y; currentYPosition.value = dragPosition.y; - runOnJS( onBlockDragOver )( { x, y: y + scroll.offsetY.value } ); + onBlockDragOverWorklet( { x, y: y + scroll.offsetY.value } ); // Update scrolling velocity scrollOnDragOver( dragPosition.y ); diff --git a/packages/block-editor/src/components/use-block-drop-zone/index.native.js b/packages/block-editor/src/components/use-block-drop-zone/index.native.js index 5a64803aa4bc2..4f00880873c2f 100644 --- a/packages/block-editor/src/components/use-block-drop-zone/index.native.js +++ b/packages/block-editor/src/components/use-block-drop-zone/index.native.js @@ -1,14 +1,17 @@ /** * External dependencies */ -import { useSharedValue } from 'react-native-reanimated'; +import { + runOnJS, + useDerivedValue, + useSharedValue, +} from 'react-native-reanimated'; /** * WordPress dependencies */ import { useSelect } from '@wordpress/data'; import { useCallback } from '@wordpress/element'; -import { useThrottle } from '@wordpress/compose'; /** * Internal dependencies @@ -18,6 +21,8 @@ import { useBlockListContext } from '../block-list/block-list-context'; import { getDistanceToNearestEdge } from '../../utils/math'; import useOnBlockDrop from '../use-on-block-drop'; +const UPDATE_TARGET_BLOCK_INDEX_THRESHOLD = 20; // In pixels + /** @typedef {import('../../utils/math').WPPoint} WPPoint */ /** @@ -111,6 +116,14 @@ export default function useBlockDropZone( { rootClientId: targetRootClientId = '', } = {} ) { const targetBlockIndex = useSharedValue( null ); + const dragPosition = { + x: useSharedValue( 0 ), + y: useSharedValue( 0 ), + }; + const prevDragPosition = { + x: useSharedValue( 0 ), + y: useSharedValue( 0 ), + }; const { getBlockListSettings, getSettings } = useSelect( blockEditorStore ); const { blocksLayouts, getBlockLayoutsOrderedByYCoord } = @@ -118,43 +131,67 @@ export default function useBlockDropZone( { const getSortedBlocksLayouts = useCallback( () => { return getBlockLayoutsOrderedByYCoord( blocksLayouts.current ); + // We use the value of `blocksLayouts` as the dependency. + // eslint-disable-next-line react-hooks/exhaustive-deps }, [ blocksLayouts.current ] ); const isRTL = getSettings().isRTL; const onBlockDrop = useOnBlockDrop(); - const throttled = useThrottle( - useCallback( - ( event ) => { - const sortedBlockLayouts = getSortedBlocksLayouts(); - - const targetIndex = getNearestBlockIndex( - sortedBlockLayouts, - { x: event.x, y: event.y }, - getBlockListSettings( targetRootClientId )?.orientation, - isRTL - ); - if ( targetIndex !== null ) { - targetBlockIndex.value = targetIndex ?? 0; - } - }, - [ - getSortedBlocksLayouts, - getNearestBlockIndex, - getBlockListSettings, - targetBlockIndex, - ] - ), - 200 + const updateTargetBlockIndex = useCallback( + ( event ) => { + const sortedBlockLayouts = getSortedBlocksLayouts(); + + const targetIndex = getNearestBlockIndex( + sortedBlockLayouts, + { x: event.x, y: event.y }, + getBlockListSettings( targetRootClientId )?.orientation, + isRTL + ); + if ( targetIndex !== null ) { + targetBlockIndex.value = targetIndex ?? 0; + } + }, + [ + getSortedBlocksLayouts, + getBlockListSettings, + targetRootClientId, + isRTL, + targetBlockIndex, + ] ); + useDerivedValue( () => { + const x = dragPosition.x.value; + const y = dragPosition.y.value; + const prevX = prevDragPosition.x.value; + const prevY = prevDragPosition.y.value; + // `updateTargetBlockIndex` performs expensive calculations, so we throttle + // the call using a offset threshold based on the dragging position. + if ( + Math.abs( x - prevX ) >= UPDATE_TARGET_BLOCK_INDEX_THRESHOLD || + Math.abs( y - prevY ) >= UPDATE_TARGET_BLOCK_INDEX_THRESHOLD + ) { + runOnJS( updateTargetBlockIndex )( { x, y } ); + prevDragPosition.x.value = x; + prevDragPosition.y.value = y; + return true; + } + return false; + } ); + return { - onBlockDragOver( event ) { - throttled( event ); + onBlockDragOver( { x, y } ) { + dragPosition.x.value = x; + dragPosition.y.value = y; + }, + onBlockDragOverWorklet( { x, y } ) { + 'worklet'; + dragPosition.x.value = x; + dragPosition.y.value = y; }, onBlockDragEnd() { - throttled.cancel(); targetBlockIndex.value = null; }, onBlockDrop: ( event ) => { diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index 772a11a3dbd80..d43144db54722 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -11,6 +11,7 @@ For each user feature we should also add a importance categorization label to i ## Unreleased - [*] Rename "Reusable blocks" to "Synced patterns", aligning with the web editor. [#51704] +- [**] Fix a crash related to Reanimated when closing the editor [#52320] ## 1.98.1 - [*] fix: Display heading level dropdown icons and labels [#52004] From e72a740e189be3d47024e803f3709cac06c4ff31 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Thu, 6 Jul 2023 12:45:40 +0400 Subject: [PATCH 069/146] Template Parts: Set attributes 'area' as useSelect dependency (#52330) --- packages/block-library/src/template-part/edit/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/template-part/edit/index.js b/packages/block-library/src/template-part/edit/index.js index b7ae4f6043afb..a4d2e5f2a017e 100644 --- a/packages/block-library/src/template-part/edit/index.js +++ b/packages/block-library/src/template-part/edit/index.js @@ -77,7 +77,7 @@ export default function TemplatePartEdit( { area: _area, }; }, - [ templatePartId, clientId ] + [ templatePartId, attributes.area, clientId ] ); const { templateParts } = useAlternativeTemplateParts( area, From bc663f6418c2775b24b3e62a7c639f2d72eb1b51 Mon Sep 17 00:00:00 2001 From: Marin Atanasov <8436925+tyxla@users.noreply.github.com> Date: Thu, 6 Jul 2023 13:45:44 +0300 Subject: [PATCH 070/146] Block Editor: Add README for BlockControls (#52366) --- .../src/components/block-controls/README.md | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 packages/block-editor/src/components/block-controls/README.md diff --git a/packages/block-editor/src/components/block-controls/README.md b/packages/block-editor/src/components/block-controls/README.md new file mode 100644 index 0000000000000..ee02e96e08b4d --- /dev/null +++ b/packages/block-editor/src/components/block-controls/README.md @@ -0,0 +1,89 @@ +# BlockControls + +When the user selects a particular block, a toolbar positioned above the selected block displays a set of control buttons. Certain block-level controls are automatically included in the toolbar under specific circumstances. For example, there is a control for converting the block into a different type or when the focused element is a RichText component. + +With `BlockControls`, you can customize the toolbar to include controls specific to your block type. If the return value of your block type's `edit` function includes a `BlockControls` element, the controls nested inside it will be shown in the selected block's toolbar. + +![Screenshot of the block controls of a Paragraph block inside the block editor](https://raw.githubusercontent.com/WordPress/gutenberg/HEAD/docs/assets/toolbar-text.png) + +## Usage + +```jsx +/** + * WordPress dependencies + */ +import { + BlockControls, + __experimentalBlockAlignmentMatrixControl as BlockAlignmentMatrixControl, + useBlockProps, +} from '@wordpress/block-editor'; +import { __ } from '@wordpress/i18n'; + +export default function MyBlockEdit( { attributes, setAttributes } ) { + const blockProps = useBlockProps( { + className: 'my-block__custom-class', + } ); + const { contentPosition } = attributes; + + return ( +
    + { + + + setAttributes( { + contentPosition: nextPosition, + } ) + } + /> + + } +
    + ); +} + +/// ... + +; +``` + +See [this custom block tutorial page](/docs/how-to-guides/block-tutorial/block-controls-toolbar-and-sidebar.md) for more information and block controls examples. + +Furthermore, the READMEs of various components inside the block editor package and the components package include examples that also utilize `BlockControls` and can be a good reference. + +### Props + +The component accepts the following props: + +### `group` + +Group of the block controls. Allows you to create and render multiple groups of block controls. + +- Type: `string` +- Default: `default` +- Required: No + +### `controls` + +Allows overriding the default `controls` if the `default` group is used. + +See [this custom block tutorial page](/docs/how-to-guides/block-tutorial/block-controls-toolbar-and-sidebar.md) for more details and examples with block controls. + +- Type: `array` + +### `children` + +Additional control components to be rendered. + +- Type: `Element` +- Required: No. + + +### `__experimentalShareWithChildBlocks` + +Whether the additional block controls should be added to the block toolbars of child blocks. + +- Type: `boolean` +- Default: `false` From 4baf207b15f6624d52b46144504d882ca69c2205 Mon Sep 17 00:00:00 2001 From: Pooja Killekar <41000648+pooja-muchandikar@users.noreply.github.com> Date: Thu, 6 Jul 2023 17:23:29 +0530 Subject: [PATCH 071/146] Migrate Adding Inline Token test to Playwright (#52020) * Migrate Adding Inline Token test to Playwright * Address feedback * Address Feedbacks --- .../various/adding-inline-tokens.test.js | 80 ------------------ .../various/adding-inline-tokens.spec.js | 81 +++++++++++++++++++ 2 files changed, 81 insertions(+), 80 deletions(-) delete mode 100644 packages/e2e-tests/specs/editor/various/adding-inline-tokens.test.js create mode 100644 test/e2e/specs/editor/various/adding-inline-tokens.spec.js diff --git a/packages/e2e-tests/specs/editor/various/adding-inline-tokens.test.js b/packages/e2e-tests/specs/editor/various/adding-inline-tokens.test.js deleted file mode 100644 index 7c04bae1f95dd..0000000000000 --- a/packages/e2e-tests/specs/editor/various/adding-inline-tokens.test.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * External dependencies - */ -import path from 'path'; -import fs from 'fs'; -import os from 'os'; -import { v4 as uuid } from 'uuid'; - -/** - * WordPress dependencies - */ -import { - clickBlockAppender, - getEditedPostContent, - createNewPost, - clickBlockToolbarButton, - clickButton, - pressKeyWithModifier, -} from '@wordpress/e2e-test-utils'; - -describe( 'adding inline tokens', () => { - beforeEach( async () => { - await createNewPost(); - } ); - - it( 'should insert inline image', async () => { - // Create a paragraph. - await clickBlockAppender(); - await page.keyboard.type( 'a ' ); - - await clickBlockToolbarButton( 'More' ); - await clickButton( 'Inline image' ); - - // Wait for media modal to appear and upload image. - // Wait for media modal to appear and upload image. - const inputElement = await page.waitForSelector( - '.media-modal .moxie-shim input[type=file]' - ); - const testImagePath = path.join( - __dirname, - '..', - '..', - '..', - 'assets', - '10x10_e2e_test_image_z9T8jK.png' - ); - const filename = uuid(); - const tmpFileName = path.join( os.tmpdir(), filename + '.png' ); - fs.copyFileSync( testImagePath, tmpFileName ); - await inputElement.uploadFile( tmpFileName ); - - // Wait for upload. - await page.waitForSelector( - `.media-modal li[aria-label="${ filename }"]` - ); - - // Insert the uploaded image. - await page.click( '.media-modal button.media-button-select' ); - - // Check the content. - const regex = new RegExp( - `\\s*

    a <\\/p>\\s*` - ); - expect( await getEditedPostContent() ).toMatch( regex ); - - await pressKeyWithModifier( 'shift', 'ArrowLeft' ); - await page.waitForSelector( - '.block-editor-format-toolbar__image-popover' - ); - await page.keyboard.press( 'Tab' ); - await page.keyboard.type( '20' ); - await page.keyboard.press( 'Enter' ); - - // Check the content. - const regex2 = new RegExp( - `\\s*

    First example paragraph.

    + + + +

    Second example paragraph.

    + + + + +" +`; diff --git a/packages/edit-post/src/components/visual-editor/test/index.native.js b/packages/edit-post/src/components/visual-editor/test/index.native.js index af07e4309ab69..8c6e041880a83 100644 --- a/packages/edit-post/src/components/visual-editor/test/index.native.js +++ b/packages/edit-post/src/components/visual-editor/test/index.native.js @@ -1,11 +1,12 @@ /** * External dependencies */ -import { initializeEditor, fireEvent } from 'test/helpers'; +import { initializeEditor, getEditorHtml, fireEvent } from 'test/helpers'; /** * WordPress dependencies */ +import { Platform } from '@wordpress/element'; import { getBlockTypes, unregisterBlockType } from '@wordpress/blocks'; import { registerCoreBlocks } from '@wordpress/block-library'; @@ -21,6 +22,12 @@ afterAll( () => { } ); } ); +const MEDIA_OPTIONS = [ + 'Choose from device', + 'Take a Photo', + 'WordPress Media Library', +]; + const initialHtml = `

    First example paragraph.

    @@ -63,6 +70,38 @@ describe( 'when title is focused', () => { screen.getAllByLabelText( /Paragraph Block. Row 3/ )[ 0 ] ).toBeDefined(); } ); + + it( 'media blocks should be displayed', async () => { + const screen = await initializeEditor( { + initialHtml, + } ); + + // Focus first block + fireEvent.press( + screen.getAllByLabelText( /Paragraph Block. Row 1/ )[ 0 ] + ); + + // Focus title + fireEvent( + screen.getAllByLabelText( 'Post title. test' )[ 0 ], + 'select' + ); + + // Assert that the media buttons are visible + const imageButton = await screen.findByTestId( 'insert-image-button' ); + expect( imageButton ).toBeVisible(); + + const videoButton = await screen.findByTestId( 'insert-video-button' ); + expect( videoButton ).toBeVisible(); + + const galleryButton = await screen.findByTestId( + 'insert-gallery-button' + ); + expect( galleryButton ).toBeVisible(); + + const audioButton = await screen.findByTestId( 'insert-audio-button' ); + expect( audioButton ).toBeVisible(); + } ); } ); describe( 'when title is no longer focused', () => { @@ -101,4 +140,82 @@ describe( 'when title is no longer focused', () => { screen.getAllByLabelText( /Heading Block. Row 3/ )[ 0 ] ).toBeDefined(); } ); + + it( 'media blocks should not be displayed', async () => { + const screen = await initializeEditor( { + initialHtml, + } ); + + // Focus first block + fireEvent.press( + screen.getAllByLabelText( /Paragraph Block. Row 1/ )[ 0 ] + ); + + // Focus title + fireEvent( + screen.getAllByLabelText( 'Post title. test' )[ 0 ], + 'select' + ); + + // Focus last block + fireEvent.press( + screen.getAllByLabelText( /Paragraph Block. Row 2/ )[ 0 ] + ); + + // Assert that the media buttons are not visible + const imageButton = screen.queryByTestId( 'insert-image-button' ); + expect( imageButton ).toBeNull(); + + const videoButton = screen.queryByTestId( 'insert-video-button' ); + expect( videoButton ).toBeNull(); + + const galleryButton = screen.queryByTestId( 'insert-gallery-button' ); + expect( galleryButton ).toBeNull(); + + const audioButton = screen.queryByTestId( 'insert-audio-button' ); + expect( audioButton ).toBeNull(); + } ); +} ); + +describe( 'when nothing is selected', () => { + it( 'media buttons and picker display correctly', async () => { + const screen = await initializeEditor( { + initialHtml, + } ); + + const { getByText, getByTestId } = screen; + + // Check that the gallery button is visible within the toolbar + const galleryButton = await screen.queryByTestId( + 'insert-gallery-button' + ); + expect( galleryButton ).toBeVisible(); + + // Press the toolbar Gallery button + fireEvent.press( galleryButton ); + + // Expect the block to be created + expect( + screen.getAllByLabelText( /Gallery Block. Row 3/ )[ 0 ] + ).toBeDefined(); + + expect( getByText( 'Choose images' ) ).toBeVisible(); + MEDIA_OPTIONS.forEach( ( option ) => + expect( getByText( option ) ).toBeVisible() + ); + + // Dismiss the picker + if ( Platform.isIOS ) { + fireEvent.press( getByText( 'Cancel' ) ); + } else { + fireEvent( getByTestId( 'media-options-picker' ), 'backdropPress' ); + } + + // Expect the Gallery block to remain + expect( + screen.getAllByLabelText( /Gallery Block. Row 3/ )[ 0 ] + ).toBeDefined(); + + expect( getEditorHtml() ).toMatchSnapshot(); + } ); } ); diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index d43144db54722..add4d4c780483 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -12,6 +12,7 @@ For each user feature we should also add a importance categorization label to i ## Unreleased - [*] Rename "Reusable blocks" to "Synced patterns", aligning with the web editor. [#51704] - [**] Fix a crash related to Reanimated when closing the editor [#52320] +- [**] Add media inserter buttons to editor toolbar [#51827] ## 1.98.1 - [*] fix: Display heading level dropdown icons and labels [#52004] From b48472ecf32b3be635e456a81891734bcccbced0 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Thu, 6 Jul 2023 19:31:34 +0400 Subject: [PATCH 074/146] Migrate site editor multi-entity save flow tests (#52372) * Migrate site editor multi-entity save flow tests * Remove old tests * Add cleanup --- .../site-editor/multi-entity-saving.test.js | 102 ------------------ .../site-editor/multi-entity-saving.spec.js | 87 +++++++++++++++ 2 files changed, 87 insertions(+), 102 deletions(-) create mode 100644 test/e2e/specs/site-editor/multi-entity-saving.spec.js diff --git a/packages/e2e-tests/specs/site-editor/multi-entity-saving.test.js b/packages/e2e-tests/specs/site-editor/multi-entity-saving.test.js index d54f9c78dd8b8..c2bd3cb6d7507 100644 --- a/packages/e2e-tests/specs/site-editor/multi-entity-saving.test.js +++ b/packages/e2e-tests/specs/site-editor/multi-entity-saving.test.js @@ -12,8 +12,6 @@ import { activateTheme, clickButton, createReusableBlock, - visitSiteEditor, - enterEditMode, deleteAllTemplates, canvas, } from '@wordpress/e2e-test-utils'; @@ -239,104 +237,4 @@ describe( 'Multi-entity save flow', () => { expect( checkboxInputs ).toHaveLength( 1 ); } ); } ); - - describe( 'Site Editor', () => { - // Selectors - Site editor specific. - const saveSiteSelector = '.edit-site-save-button__button'; - const activeSaveSiteSelector = `${ saveSiteSelector }[aria-disabled=false]`; - const disabledSaveSiteSelector = `${ saveSiteSelector }[aria-disabled=true]`; - const saveA11ySelector = '.edit-site-editor__toggle-save-panel-button'; - - const saveAllChanges = async () => { - // Clicking button should open panel with boxes checked. - await page.click( activeSaveSiteSelector ); - await page.waitForSelector( savePanelSelector ); - await assertAllBoxesChecked(); - - // Save a11y button should not be present with save panel open. - await assertExistence( saveA11ySelector, false ); - - // Saving should result in items being saved. - await page.click( entitiesSaveSelector ); - }; - - it( 'Save flow should work as expected', async () => { - // Navigate to site editor. - await visitSiteEditor( { - postId: 'emptytheme//index', - postType: 'wp_template', - } ); - - await enterEditMode(); - - // Select the header template part via list view. - await page.click( '.edit-site-header-edit-mode__list-view-toggle' ); - const headerTemplatePartListViewButton = await page.waitForXPath( - '//a[contains(@class, "block-editor-list-view-block-select-button")][contains(., "header")]' - ); - headerTemplatePartListViewButton.click(); - await page.click( 'button[aria-label="Close"]' ); - - // Insert something to dirty the editor. - await insertBlock( 'Paragraph' ); - - const enabledButton = await page.waitForSelector( - activeSaveSiteSelector - ); - - // Should be enabled after edits. - expect( enabledButton ).not.toBeNull(); - - // Save a11y button should be present. - await assertExistence( saveA11ySelector, true ); - - // Save all changes. - await saveAllChanges(); - - const disabledButton = await page.waitForSelector( - disabledSaveSiteSelector - ); - expect( disabledButton ).not.toBeNull(); - } ); - - it( 'Save flow should allow re-saving after changing the same block attribute', async () => { - // Navigate to site editor. - await visitSiteEditor( { - postId: 'emptytheme//index', - postType: 'wp_template', - } ); - - await enterEditMode(); - - // Insert a paragraph at the bottom. - await insertBlock( 'Paragraph' ); - - // Open the block settings. - await page.click( 'button[aria-label="Settings"]' ); - - // Wait for the font size picker controls. - await page.waitForSelector( - '.components-font-size-picker__controls' - ); - - // Change the font size. - await page.click( - '.components-font-size-picker__controls button[aria-label="Small"]' - ); - - // Save all changes. - await saveAllChanges(); - - // Change the font size. - await page.click( - '.components-font-size-picker__controls button[aria-label="Medium"]' - ); - - // Assert that the save button has been re-enabled. - const saveButton = await page.waitForSelector( - activeSaveSiteSelector - ); - expect( saveButton ).not.toBeNull(); - } ); - } ); } ); diff --git a/test/e2e/specs/site-editor/multi-entity-saving.spec.js b/test/e2e/specs/site-editor/multi-entity-saving.spec.js new file mode 100644 index 0000000000000..b4d2f1dbda0d0 --- /dev/null +++ b/test/e2e/specs/site-editor/multi-entity-saving.spec.js @@ -0,0 +1,87 @@ +/** + * WordPress dependencies + */ +const { test, expect } = require( '@wordpress/e2e-test-utils-playwright' ); + +test.describe( 'Site Editor - Multi-entity save flow', () => { + test.beforeAll( async ( { requestUtils } ) => { + await Promise.all( [ + requestUtils.activateTheme( 'emptytheme' ), + requestUtils.deleteAllTemplates( 'wp_template' ), + ] ); + } ); + + test.afterAll( async ( { requestUtils } ) => { + await Promise.all( [ + requestUtils.activateTheme( 'twentytwentyone' ), + requestUtils.deleteAllTemplates( 'wp_template' ), + ] ); + } ); + + test.beforeEach( async ( { admin, editor } ) => { + await admin.visitSiteEditor( { + postId: 'emptytheme//index', + postType: 'wp_template', + } ); + await editor.canvas.click( 'body' ); + } ); + + test( 'save flow should work as expected', async ( { editor, page } ) => { + await editor.insertBlock( { + name: 'core/paragraph', + attributes: { + content: 'Testing', + }, + } ); + + await expect( + page + .getByRole( 'region', { name: 'Editor top bar' } ) + .getByRole( 'button', { name: 'Save' } ) + ).toBeEnabled(); + await expect( + page + .getByRole( 'region', { name: 'Save panel' } ) + .getByRole( 'button', { name: 'Open save panel' } ) + ).toBeVisible(); + + await editor.saveSiteEditorEntities(); + await expect( + page + .getByRole( 'region', { name: 'Editor top bar' } ) + .getByRole( 'button', { name: 'Saved' } ) + ).toBeDisabled(); + } ); + + test( 'save flow should allow re-saving after changing the same block attribute', async ( { + editor, + page, + } ) => { + await editor.openDocumentSettingsSidebar(); + await editor.insertBlock( { + name: 'core/paragraph', + attributes: { + content: 'Testing', + }, + } ); + + const fontSizePicker = page + .getByRole( 'region', { name: 'Editor Settings' } ) + .getByRole( 'group', { name: 'Font size' } ); + + // Change font size. + await fontSizePicker.getByRole( 'radio', { name: 'Small' } ).click(); + + await editor.saveSiteEditorEntities(); + + // Change font size again. + await fontSizePicker.getByRole( 'radio', { name: 'Medium' } ).click(); + + // The save button has been re-enabled. + await expect( + page + .getByRole( 'region', { name: 'Editor top bar' } ) + .getByRole( 'button', { name: 'Save' } ) + ).toBeEnabled(); + } ); +} ); From dbc146ad754107d1dae7cec552741ba42c457a04 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Thu, 6 Jul 2023 17:34:01 +0200 Subject: [PATCH 075/146] Mobile Release v1.99.0 (#52368) * Release script: Update react-native-editor version to 1.99.0 * Release script: Update with changes from 'npm run core preios' * Update `react-native-editor` changelog --- packages/react-native-aztec/package.json | 2 +- packages/react-native-bridge/package.json | 2 +- packages/react-native-editor/CHANGELOG.md | 2 ++ packages/react-native-editor/ios/Podfile.lock | 20 +++++++++---------- packages/react-native-editor/package.json | 2 +- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/packages/react-native-aztec/package.json b/packages/react-native-aztec/package.json index 371c890feae12..3087d3708a704 100644 --- a/packages/react-native-aztec/package.json +++ b/packages/react-native-aztec/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/react-native-aztec", - "version": "1.98.1", + "version": "1.99.0", "description": "Aztec view for react-native.", "private": true, "author": "The WordPress Contributors", diff --git a/packages/react-native-bridge/package.json b/packages/react-native-bridge/package.json index 1e4039e8135e1..8c07de0e29871 100644 --- a/packages/react-native-bridge/package.json +++ b/packages/react-native-bridge/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/react-native-bridge", - "version": "1.98.1", + "version": "1.99.0", "description": "Native bridge library used to integrate the block editor into a native App.", "private": true, "author": "The WordPress Contributors", diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index add4d4c780483..5a1dc4d533a68 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -10,6 +10,8 @@ For each user feature we should also add a importance categorization label to i --> ## Unreleased + +## 1.99.0 - [*] Rename "Reusable blocks" to "Synced patterns", aligning with the web editor. [#51704] - [**] Fix a crash related to Reanimated when closing the editor [#52320] - [**] Add media inserter buttons to editor toolbar [#51827] diff --git a/packages/react-native-editor/ios/Podfile.lock b/packages/react-native-editor/ios/Podfile.lock index e33ff9f46d789..27d2e6ca929b5 100644 --- a/packages/react-native-editor/ios/Podfile.lock +++ b/packages/react-native-editor/ios/Podfile.lock @@ -13,7 +13,7 @@ PODS: - ReactCommon/turbomodule/core (= 0.69.4) - fmt (6.2.1) - glog (0.3.5) - - Gutenberg (1.98.1): + - Gutenberg (1.99.0): - React-Core (= 0.69.4) - React-CoreModules (= 0.69.4) - React-RCTImage (= 0.69.4) @@ -360,7 +360,7 @@ PODS: - React-Core - RNSVG (9.13.6): - React-Core - - RNTAztecView (1.98.1): + - RNTAztecView (1.99.0): - React-Core - WordPress-Aztec-iOS (~> 1.19.8) - SDWebImage (5.11.1): @@ -540,7 +540,7 @@ SPEC CHECKSUMS: FBReactNativeSpec: 2ff441cbe6e58c1778d8a5cf3311831a6a8c0809 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 3d02b25ca00c2d456734d0bcff864cbc62f6ae1a - Gutenberg: 36708d354578d1fd904c5c93fa8199b31b4cbb42 + Gutenberg: 06d0e1bc1dbd7ad23b8f9b587cceba18aa8518da libwebp: 60305b2e989864154bd9be3d772730f08fc6a59c RCT-Folly: b9d9fe1fc70114b751c076104e52f3b1b5e5a95a RCTRequired: bd9d2ab0fda10171fcbcf9ba61a7df4dc15a28f4 @@ -556,13 +556,13 @@ SPEC CHECKSUMS: React-jsiexecutor: a27badbbdbc0ff781813370736a2d1c7261181d4 React-jsinspector: 8a3d3f5dcd23a91e8c80b1bf0e96902cd1dca999 React-logger: 1088859f145b8f6dd0d3ed051a647ef0e3e80fad - react-native-blur: 8cd9b4a8007166ad643f4dff914c3fddd2ff5b9a + react-native-blur: 3e9c8e8e9f7d17fa1b94e1a0ae9fd816675f5382 react-native-get-random-values: b6fb85e7169b9822976793e467458c151c3e8b69 react-native-safe-area: c9cf765aa2dd96159476a99633e7d462ce5bb94f - react-native-safe-area-context: e471852c5ed67eea4b10c5d9d43c1cebae3b231d + react-native-safe-area-context: f0906bf8bc9835ac9a9d3f97e8bde2a997d8da79 react-native-slider: dff0d8a46f368a8d1bacd8638570d75b9b0be400 - react-native-video: afb806880af4f6612683ab678a793ae41bc39705 - react-native-webview: e3b659a6d614bb37fb12a2de82c91a378c59d84b + react-native-video: 6dee623307ed9d04d1be2de87494f9a0fa2041d1 + react-native-webview: 9f111dfbcfc826084d6c507f569e5e03342ee1c1 React-perflogger: cb386fd44c97ec7f8199c04c12b22066b0f2e1e0 React-RCTActionSheet: f803a85e46cf5b4066c2ac5e122447f918e9c6e5 React-RCTAnimation: 19c80fa950ccce7f4db76a2a7f2cf79baae07fc7 @@ -575,14 +575,14 @@ SPEC CHECKSUMS: React-RCTVibration: 9adb4a3cbb598d1bbd46a05256f445e4b8c70603 React-runtimeexecutor: 61ee22a8cdf8b6bb2a7fb7b4ba2cc763e5285196 ReactCommon: 8f67bd7e0a6afade0f20718f859dc8c2275f2e83 - RNCClipboard: f49f3de56b40d0f4104680dabadc7a1f063f4fd4 - RNCMaskedView: d367b2a8df3992114e31b32b091a0c00dc800827 + RNCClipboard: 99fc8ad669a376b756fbc8098ae2fd05c0ed0668 + RNCMaskedView: c298b644a10c0c142055b3ae24d83879ecb13ccd RNFastImage: 1f2cab428712a4baaf78d6169eaec7f622556dd7 RNGestureHandler: f5c389f7c9947057ee47d16ca1d7d170289b2c2a RNReanimated: 5740ec9926f80bccd404bacd3e71108e87c94afa RNScreens: 953633729a42e23ad0c93574d676b361e3335e8b RNSVG: 36a7359c428dcb7c6bce1cc546fbfebe069809b0 - RNTAztecView: 3e9b521a52ad407c08235c82ab586bad6bb5f0f7 + RNTAztecView: 4ccd0ce94481a4026420a7b0725ce86e762f1c16 SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d WordPress-Aztec-iOS: 7d11d598f14c82c727c08b56bd35fbeb7dafb504 diff --git a/packages/react-native-editor/package.json b/packages/react-native-editor/package.json index 1369f8c193b36..4034ada7699ca 100644 --- a/packages/react-native-editor/package.json +++ b/packages/react-native-editor/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/react-native-editor", - "version": "1.98.1", + "version": "1.99.0", "description": "Mobile WordPress gutenberg editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", From eaf6715f9a91996a4a737f1429d8373cac330114 Mon Sep 17 00:00:00 2001 From: Gerardo Pacheco Date: Thu, 6 Jul 2023 18:35:08 +0200 Subject: [PATCH 076/146] =?UTF-8?q?[Mobile]=C2=A0Moves=20block=20settings?= =?UTF-8?q?=20and=20more=20button=20to=20the=20toolbar=20=20(#52289)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove BlockMobileToolbar * Refactor BlockSettingsButton * Update BlockToolbar with new order for buttons * Clean up BlockMobileToolbar refactor * Update EditorPage with new swipeToolbarToElement and updates removeBlock, toggleFormatting and addBlock helpers * Update E2E Tests * Update BlockList to remove inline block settings options * Update Gallery test * Update BlockDraggable test * Update BlockMover * EditorPage utils - Update swipeToolbarToElement to take into account swiping to the right --- .../block-draggable/test/index.native.js | 54 -------- .../src/components/block-list/block.native.js | 30 +---- .../components/block-list/block.native.scss | 7 +- .../block-mobile-toolbar/index.native.js | 127 ------------------ .../block-mobile-toolbar/style.native.scss | 16 --- .../components/block-mover/index.native.js | 6 +- .../test/__snapshots__/index.native.js.snap | 17 ++- .../block-settings/button.native.js | 41 ++---- .../block-toolbar-menu.native.js} | 17 ++- .../components/block-toolbar/index.native.js | 87 +++++++++++- .../block-toolbar-menu.native.js.snap} | 0 .../test/block-toolbar-menu.native.js} | 74 +++------- .../inspector-controls/fill.native.js | 3 - .../src/gallery/test/index.native.js | 13 +- .../header/header-toolbar/index.native.js | 13 +- ...erg-editor-block-insertion-@canary.test.js | 8 +- .../gutenberg-editor-device-actions.test.js | 4 +- ...enberg-editor-media-blocks-@canary.test.js | 4 +- .../__device-tests__/pages/editor-page.js | 59 ++++++-- 19 files changed, 219 insertions(+), 361 deletions(-) delete mode 100644 packages/block-editor/src/components/block-mobile-toolbar/index.native.js delete mode 100644 packages/block-editor/src/components/block-mobile-toolbar/style.native.scss rename packages/block-editor/src/components/{block-mobile-toolbar/block-actions-menu.native.js => block-toolbar/block-toolbar-menu.native.js} (98%) rename packages/block-editor/src/components/{block-mobile-toolbar/test/__snapshots__/block-actions-menu.native.js.snap => block-toolbar/test/__snapshots__/block-toolbar-menu.native.js.snap} (100%) rename packages/block-editor/src/components/{block-mobile-toolbar/test/block-actions-menu.native.js => block-toolbar/test/block-toolbar-menu.native.js} (81%) diff --git a/packages/block-editor/src/components/block-draggable/test/index.native.js b/packages/block-editor/src/components/block-draggable/test/index.native.js index 5b670970406f5..47b3bc829345f 100644 --- a/packages/block-editor/src/components/block-draggable/test/index.native.js +++ b/packages/block-editor/src/components/block-draggable/test/index.native.js @@ -133,16 +133,6 @@ describe( 'BlockDraggable', () => { // "firePanGesture" finishes the dragging gesture firePanGesture( blockDraggableWrapper ); expect( getDraggableChip( screen ) ).not.toBeDefined(); - - // Start dragging from block's mobile toolbar - fireLongPress( - paragraphBlock, - 'draggable-trigger-mobile-toolbar' - ); - expect( getDraggableChip( screen ) ).toBeVisible(); - // "firePanGesture" finishes the dragging gesture - firePanGesture( blockDraggableWrapper ); - expect( getDraggableChip( screen ) ).not.toBeDefined(); } ) ); it( 'does not enable drag mode when selected and editing text', async () => @@ -243,16 +233,6 @@ describe( 'BlockDraggable', () => { // "firePanGesture" finishes the dragging gesture firePanGesture( blockDraggableWrapper ); expect( getDraggableChip( screen ) ).not.toBeDefined(); - - // Start dragging from block's mobile toolbar - fireLongPress( - imageBlock, - 'draggable-trigger-mobile-toolbar' - ); - expect( getDraggableChip( screen ) ).toBeVisible(); - // "firePanGesture" finishes the dragging gesture - firePanGesture( blockDraggableWrapper ); - expect( getDraggableChip( screen ) ).not.toBeDefined(); } ) ); } ); @@ -301,16 +281,6 @@ describe( 'BlockDraggable', () => { // "firePanGesture" finishes the dragging gesture firePanGesture( blockDraggableWrapper ); expect( getDraggableChip( screen ) ).not.toBeDefined(); - - // Start dragging from block's mobile toolbar - fireLongPress( - galleryBlock, - 'draggable-trigger-mobile-toolbar' - ); - expect( getDraggableChip( screen ) ).toBeVisible(); - // "firePanGesture" finishes the dragging gesture - firePanGesture( blockDraggableWrapper ); - expect( getDraggableChip( screen ) ).not.toBeDefined(); } ) ); it( 'enables drag mode when nested block is selected', async () => @@ -336,20 +306,6 @@ describe( 'BlockDraggable', () => { // "firePanGesture" finishes the dragging gesture firePanGesture( blockDraggableWrapper ); expect( getDraggableChip( screen ) ).not.toBeDefined(); - - // After dropping the block, the gallery item gets automatically selected. - // Hence, we have to select the gallery item again. - fireEvent.press( galleryItem ); - - // Start dragging from nested block's mobile toolbar - fireLongPress( - galleryItem, - 'draggable-trigger-mobile-toolbar' - ); - expect( getDraggableChip( screen ) ).toBeVisible(); - // "firePanGesture" finishes the dragging gesture - firePanGesture( blockDraggableWrapper ); - expect( getDraggableChip( screen ) ).not.toBeDefined(); } ) ); } ); @@ -390,16 +346,6 @@ describe( 'BlockDraggable', () => { // "firePanGesture" finishes the dragging gesture firePanGesture( blockDraggableWrapper ); expect( getDraggableChip( screen ) ).not.toBeDefined(); - - // Start dragging from block's mobile toolbar - fireLongPress( - spacerBlock, - 'draggable-trigger-mobile-toolbar' - ); - expect( getDraggableChip( screen ) ).toBeVisible(); - // "firePanGesture" finishes the dragging gesture - firePanGesture( blockDraggableWrapper ); - expect( getDraggableChip( screen ) ).not.toBeDefined(); } ) ); } ); } ); diff --git a/packages/block-editor/src/components/block-list/block.native.js b/packages/block-editor/src/components/block-list/block.native.js index bb537f22d0fb0..89f30572fe331 100644 --- a/packages/block-editor/src/components/block-list/block.native.js +++ b/packages/block-editor/src/components/block-list/block.native.js @@ -6,12 +6,11 @@ import { Pressable, useWindowDimensions, View } from 'react-native'; /** * WordPress dependencies */ -import { useCallback, useMemo, useRef, useState } from '@wordpress/element'; +import { useCallback, useMemo, useState } from '@wordpress/element'; import { GlobalStylesContext, getMergedGlobalStyles, useMobileGlobalStylesColors, - alignmentHelpers, useGlobalStyles, } from '@wordpress/components'; import { @@ -36,9 +35,7 @@ import { compose, ifCondition, pure } from '@wordpress/compose'; import BlockEdit from '../block-edit'; import BlockDraggable from '../block-draggable'; import BlockInvalidWarning from './block-invalid-warning'; -import BlockMobileToolbar from '../block-mobile-toolbar'; import BlockOutline from './block-outline'; -import styles from './block.scss'; import { store as blockEditorStore } from '../../store'; import { useLayout } from './layout'; import useSetting from '../use-setting'; @@ -63,8 +60,6 @@ function getWrapperProps( value, getWrapperPropsFunction ) { function BlockWrapper( { accessibilityLabel, - align, - blockWidth, children, clientId, draggingClientId, @@ -72,18 +67,12 @@ function BlockWrapper( { isDescendentBlockSelected, isParentSelected, isSelected, - isStackedHorizontally, isTouchable, marginHorizontal, marginVertical, - onDeleteBlock, onFocus, } ) { const { width: screenWidth } = useWindowDimensions(); - const anchorNodeRef = useRef(); - const { isFullWidth } = alignmentHelpers; - const isScreenWidthEqual = blockWidth === screenWidth; - const isFullWidthToolbar = isFullWidth( align ) || isScreenWidthEqual; const blockWrapperStyles = { flex: 1 }; const blockWrapperStyle = [ blockWrapperStyles, @@ -116,19 +105,6 @@ function BlockWrapper( { > { children } - - { isSelected && ( - - ) } - ); } @@ -295,7 +271,6 @@ function BlockListBlock( { ), ] ); - const { align } = attributes; const isFocused = isSelected || isDescendentBlockSelected; const isTouchable = isSelected || @@ -312,8 +287,6 @@ function BlockListBlock( { return ( { () => diff --git a/packages/block-editor/src/components/block-list/block.native.scss b/packages/block-editor/src/components/block-list/block.native.scss index 78905de5bd733..0576f97f5a3a9 100644 --- a/packages/block-editor/src/components/block-list/block.native.scss +++ b/packages/block-editor/src/components/block-list/block.native.scss @@ -51,15 +51,10 @@ min-height: 50px; } -.neutralToolbar { - margin-left: -$block-edge-to-content; - margin-right: -$block-edge-to-content; -} - .solidBorder { position: absolute; top: -$solid-border-space; - bottom: 0; + bottom: -$solid-border-space; left: -$solid-border-space; right: -$solid-border-space; border-width: $block-selected-border-width; diff --git a/packages/block-editor/src/components/block-mobile-toolbar/index.native.js b/packages/block-editor/src/components/block-mobile-toolbar/index.native.js deleted file mode 100644 index d4dd69551715f..0000000000000 --- a/packages/block-editor/src/components/block-mobile-toolbar/index.native.js +++ /dev/null @@ -1,127 +0,0 @@ -/** - * External dependencies - */ -import { View } from 'react-native'; - -/** - * WordPress dependencies - */ -import { withDispatch, withSelect } from '@wordpress/data'; -import { compose } from '@wordpress/compose'; -import { useState, useEffect } from '@wordpress/element'; - -/** - * Internal dependencies - */ -import styles from './style.scss'; -import BlockMover from '../block-mover'; -import BlockDraggable from '../block-draggable'; -import BlockActionsMenu from './block-actions-menu'; -import { BlockSettingsButton } from '../block-settings'; -import { store as blockEditorStore } from '../../store'; - -// Defined breakpoints are used to get a point when -// `settings` and `mover` controls should be wrapped into `BlockActionsMenu` -// and accessed through `BottomSheet`(Android)/`ActionSheet`(iOS). -const BREAKPOINTS = { - wrapSettings: 65, - wrapMover: 150, -}; -const BlockMobileToolbar = ( { - clientId, - onDelete, - isStackedHorizontally, - blockWidth, - anchorNodeRef, - isFullWidth, - draggingClientId, -} ) => { - const [ fillsLength, setFillsLength ] = useState( null ); - const [ appenderWidth, setAppenderWidth ] = useState( 0 ); - const spacingValue = styles.toolbar.marginLeft * 2; - - function onLayout( { nativeEvent } ) { - const { layout } = nativeEvent; - const layoutWidth = Math.floor( layout.width ); - if ( layoutWidth !== appenderWidth ) { - setAppenderWidth( nativeEvent.layout.width ); - } - } - - const wrapBlockSettings = - blockWidth < BREAKPOINTS.wrapSettings || - appenderWidth - spacingValue < BREAKPOINTS.wrapSettings; - const wrapBlockMover = - blockWidth <= BREAKPOINTS.wrapMover || - appenderWidth - spacingValue <= BREAKPOINTS.wrapMover; - - const BlockSettingsButtonFill = ( fillProps ) => { - useEffect( - () => fillProps.onChangeFillsLength( fillProps.fillsLength ), - [ fillProps.fillsLength ] - ); - return fillProps.children ?? null; - }; - - return ( - - { ! wrapBlockMover && ( - - ) } - - - { () => } - - - - { /* Render only one settings icon even if we have more than one fill - need for hooks with controls. */ } - { ( fills = [ null ] ) => ( - // The purpose of BlockSettingsButtonFill component is only to provide a way - // to pass data upstream from the slot rendering. - - { wrapBlockSettings ? null : fills[ 0 ] } - - ) } - - - - - ); -}; - -export default compose( - withSelect( ( select, { clientId } ) => { - const { getBlockIndex } = select( blockEditorStore ); - - return { - order: getBlockIndex( clientId ), - }; - } ), - withDispatch( ( dispatch, { clientId, rootClientId, onDelete } ) => { - const { removeBlock } = dispatch( blockEditorStore ); - return { - onDelete: - onDelete || ( () => removeBlock( clientId, rootClientId ) ), - }; - } ) -)( BlockMobileToolbar ); diff --git a/packages/block-editor/src/components/block-mobile-toolbar/style.native.scss b/packages/block-editor/src/components/block-mobile-toolbar/style.native.scss deleted file mode 100644 index 9a95177048660..0000000000000 --- a/packages/block-editor/src/components/block-mobile-toolbar/style.native.scss +++ /dev/null @@ -1,16 +0,0 @@ -.toolbar { - flex-direction: row; - height: $mobile-block-toolbar-height; - align-items: flex-start; - margin-left: $block-selected-margin; - margin-right: $block-selected-margin; -} - -.toolbarFullWidth { - padding-left: $grid-unit-15; - padding-right: $grid-unit-15; -} - -.spacer { - flex-grow: 1; -} diff --git a/packages/block-editor/src/components/block-mover/index.native.js b/packages/block-editor/src/components/block-mover/index.native.js index 852515a343821..06a1a881d14f8 100644 --- a/packages/block-editor/src/components/block-mover/index.native.js +++ b/packages/block-editor/src/components/block-mover/index.native.js @@ -7,7 +7,7 @@ import { Platform } from 'react-native'; * WordPress dependencies */ import { __ } from '@wordpress/i18n'; -import { Picker, ToolbarButton } from '@wordpress/components'; +import { Picker, ToolbarButton, ToolbarGroup } from '@wordpress/components'; import { withInstanceId, compose } from '@wordpress/compose'; import { withSelect, withDispatch } from '@wordpress/data'; import { useCallback, useEffect, useRef, useState } from '@wordpress/element'; @@ -107,7 +107,7 @@ export const BlockMover = ( { } return ( - <> + - + ); }; diff --git a/packages/block-editor/src/components/block-mover/test/__snapshots__/index.native.js.snap b/packages/block-editor/src/components/block-mover/test/__snapshots__/index.native.js.snap index ea30939ef9d52..db322ec2af840 100644 --- a/packages/block-editor/src/components/block-mover/test/__snapshots__/index.native.js.snap +++ b/packages/block-editor/src/components/block-mover/test/__snapshots__/index.native.js.snap @@ -43,7 +43,16 @@ exports[`Block Mover Picker moving blocks moves blocks up and down 1`] = ` `; exports[`Block Mover Picker should render without crashing and match snapshot 1`] = ` -[ + - , + - , -] + + `; diff --git a/packages/block-editor/src/components/block-settings/button.native.js b/packages/block-editor/src/components/block-settings/button.native.js index 9fa1a03749429..9db4c279a05d9 100644 --- a/packages/block-editor/src/components/block-settings/button.native.js +++ b/packages/block-editor/src/components/block-settings/button.native.js @@ -1,35 +1,20 @@ /** * WordPress dependencies */ -import { createSlotFill, ToolbarButton } from '@wordpress/components'; +import { ToolbarGroup, ToolbarButton } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; -import { withDispatch } from '@wordpress/data'; import { cog } from '@wordpress/icons'; -const { Fill, Slot } = createSlotFill( 'SettingsToolbarButton' ); +const SettingsButton = ( { onOpenBlockSettings } ) => { + return ( + + + + ); +}; -const SettingsButton = ( { openGeneralSidebar } ) => ( - -); - -const SettingsButtonFill = ( props ) => ( - - - -); - -const SettingsToolbarButton = withDispatch( ( dispatch ) => { - const { openGeneralSidebar } = dispatch( 'core/edit-post' ); - - return { - openGeneralSidebar: () => openGeneralSidebar( 'edit-post/block' ), - }; -} )( SettingsButtonFill ); - -SettingsToolbarButton.Slot = Slot; - -export default SettingsToolbarButton; +export default SettingsButton; diff --git a/packages/block-editor/src/components/block-mobile-toolbar/block-actions-menu.native.js b/packages/block-editor/src/components/block-toolbar/block-toolbar-menu.native.js similarity index 98% rename from packages/block-editor/src/components/block-mobile-toolbar/block-actions-menu.native.js rename to packages/block-editor/src/components/block-toolbar/block-toolbar-menu.native.js index 48be5cb8a9c00..bff035173b290 100644 --- a/packages/block-editor/src/components/block-mobile-toolbar/block-actions-menu.native.js +++ b/packages/block-editor/src/components/block-toolbar/block-toolbar-menu.native.js @@ -9,6 +9,7 @@ import { Platform, findNodeHandle } from 'react-native'; import { getClipboard, setClipboard, + ToolbarGroup, ToolbarButton, Picker, } from '@wordpress/components'; @@ -254,11 +255,13 @@ const BlockActionsMenu = ( { // End early if there are no options to show. if ( ! options.length ) { return ( - + + + ); } @@ -294,7 +297,7 @@ const BlockActionsMenu = ( { anchorNodeRef ? findNodeHandle( anchorNodeRef ) : undefined; return ( - <> + - + ); }; diff --git a/packages/block-editor/src/components/block-toolbar/index.native.js b/packages/block-editor/src/components/block-toolbar/index.native.js index a1726441031b1..32233fa54a1c1 100644 --- a/packages/block-editor/src/components/block-toolbar/index.native.js +++ b/packages/block-editor/src/components/block-toolbar/index.native.js @@ -1,23 +1,60 @@ /** * WordPress dependencies */ -import { useSelect } from '@wordpress/data'; +import { useSelect, useDispatch } from '@wordpress/data'; +import { useCallback } from '@wordpress/element'; /** * Internal dependencies */ +import BlockActionsMenu from './block-toolbar-menu'; import BlockControls from '../block-controls'; +import BlockMover from '../block-mover'; import UngroupButton from '../ungroup-button'; +import { BlockSettingsButton } from '../block-settings'; import { store as blockEditorStore } from '../../store'; -export default function BlockToolbar() { - const { isSelected, isValidAndVisual } = useSelect( ( select ) => { - const { getBlockMode, getSelectedBlockClientIds, isBlockValid } = - select( blockEditorStore ); +const REMOVE_EMPY_PARENT_BLOCKS = [ + 'core/buttons', + 'core/columns', + 'core/social-links', +]; + +export default function BlockToolbar( { anchorNodeRef, onOpenBlockSettings } ) { + const { + rootClientId, + blockClientId, + isSelected, + isValidAndVisual, + isStackedHorizontally, + parentBlockName, + parentNumberOfInnerBlocks, + } = useSelect( ( select ) => { + const { + getBlockListSettings, + getBlockMode, + getBlockName, + getBlockCount, + getBlockRootClientId, + getSelectedBlockClientIds, + isBlockValid, + } = select( blockEditorStore ); const selectedBlockClientIds = getSelectedBlockClientIds(); + const selectedBlockClientId = selectedBlockClientIds[ 0 ]; + const blockRootClientId = getBlockRootClientId( selectedBlockClientId ); + const blockListSettings = getBlockListSettings( blockRootClientId ); + const orientation = blockListSettings?.orientation; + const isBlockStackedHorizontally = orientation === 'horizontal'; + const parentName = getBlockName( blockRootClientId ); + const numberOfInnerBlocks = getBlockCount( blockRootClientId ); return { + rootClientId: blockRootClientId, + blockClientId: selectedBlockClientId, isSelected: selectedBlockClientIds.length > 0, + isStackedHorizontally: isBlockStackedHorizontally, + parentBlockName: parentName, + parentNumberOfInnerBlocks: numberOfInnerBlocks, isValidAndVisual: selectedBlockClientIds.length === 1 ? isBlockValid( selectedBlockClientIds[ 0 ] ) && @@ -26,6 +63,28 @@ export default function BlockToolbar() { }; }, [] ); + const { removeBlock } = useDispatch( blockEditorStore ); + const onRemove = useCallback( () => { + // Temp: remove parent block for specific cases where they don't + // have inner blocks, ideally we should match the behavior as in + // the Web editor and show a placeholder instead of removing the parent. + if ( + REMOVE_EMPY_PARENT_BLOCKS.includes( parentBlockName ) && + parentNumberOfInnerBlocks === 1 + ) { + removeBlock( rootClientId ); + return; + } + + removeBlock( blockClientId ); + }, [ + blockClientId, + parentBlockName, + parentNumberOfInnerBlocks, + removeBlock, + rootClientId, + ] ); + if ( ! isSelected ) { return null; } @@ -34,11 +93,27 @@ export default function BlockToolbar() { <> { isValidAndVisual && ( <> - + + + + + + + ) } diff --git a/packages/block-editor/src/components/block-mobile-toolbar/test/__snapshots__/block-actions-menu.native.js.snap b/packages/block-editor/src/components/block-toolbar/test/__snapshots__/block-toolbar-menu.native.js.snap similarity index 100% rename from packages/block-editor/src/components/block-mobile-toolbar/test/__snapshots__/block-actions-menu.native.js.snap rename to packages/block-editor/src/components/block-toolbar/test/__snapshots__/block-toolbar-menu.native.js.snap diff --git a/packages/block-editor/src/components/block-mobile-toolbar/test/block-actions-menu.native.js b/packages/block-editor/src/components/block-toolbar/test/block-toolbar-menu.native.js similarity index 81% rename from packages/block-editor/src/components/block-mobile-toolbar/test/block-actions-menu.native.js rename to packages/block-editor/src/components/block-toolbar/test/block-toolbar-menu.native.js index 940d95d274942..6e26b906d68c9 100644 --- a/packages/block-editor/src/components/block-mobile-toolbar/test/block-actions-menu.native.js +++ b/packages/block-editor/src/components/block-toolbar/test/block-toolbar-menu.native.js @@ -9,6 +9,7 @@ import { within, getEditorHtml, typeInRichText, + openBlockActionsMenu, } from 'test/helpers'; /** @@ -36,15 +37,14 @@ describe( 'Block Actions Menu', () => {

    `, } ); - const { getByLabelText, getByRole } = screen; + const { getByRole } = screen; // Get block const paragraphBlock = await getBlock( screen, 'Paragraph' ); fireEvent.press( paragraphBlock ); // Open block actions menu - const blockActionsButton = getByLabelText( /Open Block Actions Menu/ ); - fireEvent.press( blockActionsButton ); + await openBlockActionsMenu( screen ); // Get Picker title const pickerHeader = getByRole( 'header' ); @@ -56,10 +56,8 @@ describe( 'Block Actions Menu', () => { describe( 'moving blocks', () => { it( 'moves blocks up and down', async () => { - const screen = await initializeEditor( { - screenWidth: 100, // To collapse the up/arrow buttons bellow blocks - } ); - const { getByLabelText, getByTestId } = screen; + const screen = await initializeEditor(); + const { getByLabelText } = screen; // Add Paragraph block await addBlock( screen, 'Paragraph' ); @@ -85,16 +83,8 @@ describe( 'Block Actions Menu', () => { } ); fireEvent.press( spacerBlock ); - // Open block actions menu - fireEvent.press( getByLabelText( /Open Block Actions Menu/ ) ); - - // Get block actions modal - let blockActionsMenu = await getByTestId( 'block-actions-menu' ); - // Tap on the Move Down button - fireEvent.press( - within( blockActionsMenu ).getByLabelText( 'Move block down' ) - ); + fireEvent.press( getByLabelText( /Move block down/ ) ); // Get Heading block const headingBlock = await getBlock( screen, 'Heading', { @@ -102,25 +92,15 @@ describe( 'Block Actions Menu', () => { } ); fireEvent.press( headingBlock ); - // Open block actions menu - fireEvent.press( getByLabelText( /Open Block Actions Menu/ ) ); - - // Get block actions modal - blockActionsMenu = await getByTestId( 'block-actions-menu' ); - // Tap on the Move Up button - fireEvent.press( - within( blockActionsMenu ).getByLabelText( 'Move block up' ) - ); + fireEvent.press( getByLabelText( /Move block up/ ) ); expect( getEditorHtml() ).toMatchSnapshot(); } ); it( 'disables the Move Up button for the first block', async () => { - const screen = await initializeEditor( { - screenWidth: 100, // To collapse the up/arrow buttons bellow blocks - } ); - const { getByLabelText, getByTestId } = screen; + const screen = await initializeEditor(); + const { getByLabelText } = screen; // Add Paragraph block await addBlock( screen, 'Paragraph' ); @@ -144,15 +124,8 @@ describe( 'Block Actions Menu', () => { paragraphBlock = await getBlock( screen, 'Paragraph' ); fireEvent.press( paragraphBlock ); - // Open block actions menu - fireEvent.press( getByLabelText( /Open Block Actions Menu/ ) ); - - // Get block actions modal - const blockActionsMenu = await getByTestId( 'block-actions-menu' ); - // Get the Move Up button - const upButton = - within( blockActionsMenu ).getByLabelText( 'Move block up' ); + const upButton = getByLabelText( /Move block up/ ); const isUpButtonDisabled = upButton.props.accessibilityState?.disabled; expect( isUpButtonDisabled ).toBe( true ); @@ -167,7 +140,7 @@ describe( 'Block Actions Menu', () => { const screen = await initializeEditor( { screenWidth: 100, } ); - const { getByLabelText, getByTestId } = screen; + const { getByLabelText } = screen; // Add Paragraph block await addBlock( screen, 'Paragraph' ); @@ -193,15 +166,8 @@ describe( 'Block Actions Menu', () => { } ); fireEvent.press( headingBlock ); - // Open block actions menu - fireEvent.press( getByLabelText( /Open Block Actions Menu/ ) ); - - // Get block actions modal - const blockActionsMenu = await getByTestId( 'block-actions-menu' ); - // Get the Move Down button - const downButton = - within( blockActionsMenu ).getByLabelText( 'Move block down' ); + const downButton = getByLabelText( /Move block down/ ); const isDownButtonDisabled = downButton.props.accessibilityState?.disabled; expect( isDownButtonDisabled ).toBe( true ); @@ -243,7 +209,7 @@ describe( 'Block Actions Menu', () => { fireEvent.press( headingBlock ); // Open block actions menu - fireEvent.press( getByLabelText( /Open Block Actions Menu/ ) ); + await openBlockActionsMenu( screen ); // Tap on the Copy button fireEvent.press( getByLabelText( /Copy/ ) ); @@ -253,7 +219,7 @@ describe( 'Block Actions Menu', () => { fireEvent.press( paragraphBlock ); // Open block actions menu - fireEvent.press( getByLabelText( /Open Block Actions Menu/ ) ); + await openBlockActionsMenu( screen ); // Tap on the Paste block after button fireEvent.press( getByLabelText( /Paste block after/ ) ); @@ -290,7 +256,7 @@ describe( 'Block Actions Menu', () => { fireEvent.press( headingBlock ); // Open block actions menu - fireEvent.press( getByLabelText( /Open Block Actions Menu/ ) ); + await openBlockActionsMenu( screen ); // Tap on the Copy button fireEvent.press( getByLabelText( /Copy/ ) ); @@ -300,7 +266,7 @@ describe( 'Block Actions Menu', () => { fireEvent.press( paragraphBlock ); // Open block actions menu - fireEvent.press( getByLabelText( /Open Block Actions Menu/ ) ); + await openBlockActionsMenu( screen ); // Tap on the Past block after button fireEvent.press( getByLabelText( /Paste block after/ ) ); @@ -335,7 +301,7 @@ describe( 'Block Actions Menu', () => { fireEvent.press( paragraphBlock ); // Open block actions menu - fireEvent.press( getByLabelText( /Open Block Actions Menu/ ) ); + await openBlockActionsMenu( screen ); // Tap on the Cut button fireEvent.press( getByLabelText( /Cut block/ ) ); @@ -346,7 +312,7 @@ describe( 'Block Actions Menu', () => { fireEvent.press( headingBlock ); // Open block actions menu - fireEvent.press( getByLabelText( /Open Block Actions Menu/ ) ); + await openBlockActionsMenu( screen ); // Tap on the Cut button fireEvent.press( getByLabelText( /Paste block after/ ) ); @@ -383,7 +349,7 @@ describe( 'Block Actions Menu', () => { fireEvent.press( spacerBlock ); // Open block actions menu - fireEvent.press( getByLabelText( /Open Block Actions Menu/ ) ); + await openBlockActionsMenu( screen ); // Tap on the Duplicate button fireEvent.press( getByLabelText( /Duplicate block/ ) ); @@ -418,7 +384,7 @@ describe( 'Block Actions Menu', () => { fireEvent.press( paragraphBlock ); // Open block actions menu - fireEvent.press( getByLabelText( /Open Block Actions Menu/ ) ); + await openBlockActionsMenu( screen ); // Tap on the Transform block button fireEvent.press( getByLabelText( /Transform block…/ ) ); diff --git a/packages/block-editor/src/components/inspector-controls/fill.native.js b/packages/block-editor/src/components/inspector-controls/fill.native.js index d38d865cd15cc..f4cd288c6913c 100644 --- a/packages/block-editor/src/components/inspector-controls/fill.native.js +++ b/packages/block-editor/src/components/inspector-controls/fill.native.js @@ -6,7 +6,6 @@ import { View } from 'react-native'; /** * WordPress dependencies */ -import { Children } from '@wordpress/element'; import { BottomSheetConsumer } from '@wordpress/components'; import warning from '@wordpress/warning'; import deprecated from '@wordpress/deprecated'; @@ -16,7 +15,6 @@ import deprecated from '@wordpress/deprecated'; */ import groups from './groups'; import useDisplayBlockControls from '../use-display-block-controls'; -import { BlockSettingsButton } from '../block-settings'; export default function InspectorControlsFill( { children, @@ -55,7 +53,6 @@ export default function InspectorControlsFill( { } - { Children.count( children ) > 0 && } ); } diff --git a/packages/block-library/src/gallery/test/index.native.js b/packages/block-library/src/gallery/test/index.native.js index 70b05870b5f30..ef4f445db337b 100644 --- a/packages/block-library/src/gallery/test/index.native.js +++ b/packages/block-library/src/gallery/test/index.native.js @@ -511,10 +511,11 @@ describe( 'Gallery block', () => { // Reference: https://github.com/wordpress-mobile/test-cases/blob/trunk/test-cases/gutenberg/gallery.md#tc010 it( 'rearranges gallery items', async () => { // Initialize with a gallery that contains three items - const { galleryBlock } = await initializeWithGalleryBlock( { - numberOfItems: 3, - media, - } ); + const { getByLabelText, galleryBlock } = + await initializeWithGalleryBlock( { + numberOfItems: 3, + media, + } ); // Rearrange items (final disposition will be: Image 3 - Image 1 - Image 2) const galleryItem1 = getGalleryItem( galleryBlock, 1 ); @@ -523,7 +524,7 @@ describe( 'Gallery block', () => { fireEvent.press( galleryItem3 ); await act( () => fireEvent.press( - within( galleryItem3 ).getByLabelText( + getByLabelText( /Move block left from position 3 to position 2/ ) ) @@ -532,7 +533,7 @@ describe( 'Gallery block', () => { fireEvent.press( galleryItem1 ); await act( () => fireEvent.press( - within( galleryItem1 ).getByLabelText( + getByLabelText( /Move block right from position 1 to position 2/ ) ) diff --git a/packages/edit-post/src/components/header/header-toolbar/index.native.js b/packages/edit-post/src/components/header/header-toolbar/index.native.js index 948d37fe76ff5..6c5ae1b932e85 100644 --- a/packages/edit-post/src/components/header/header-toolbar/index.native.js +++ b/packages/edit-post/src/components/header/header-toolbar/index.native.js @@ -45,9 +45,11 @@ function HeaderToolbar( { getStylesFromColorScheme, insertBlock, onHideKeyboard, + onOpenBlockSettings, isRTL, noContentSelected, } ) { + const anchorNodeRef = useRef(); const wasNoContentSelected = useRef( noContentSelected ); const [ isInserterOpen, setIsInserterOpen ] = useState( false ); @@ -165,6 +167,7 @@ function HeaderToolbar( { return ( + { noContentSelected && renderMediaButtons } { renderHistoryButtons() } - + { showKeyboardHideButton && ( { const { clearSelectedBlock, insertBlock } = dispatch( blockEditorStore ); + const { openGeneralSidebar } = dispatch( editPostStore ); const { togglePostTitleSelection } = dispatch( editorStore ); return { @@ -255,6 +263,9 @@ export default compose( [ togglePostTitleSelection( false ); }, insertBlock, + onOpenBlockSettings() { + openGeneralSidebar( 'edit-post/block' ); + }, }; } ), withViewportMatch( { isLargeViewport: 'medium' } ), diff --git a/packages/react-native-editor/__device-tests__/gutenberg-editor-block-insertion-@canary.test.js b/packages/react-native-editor/__device-tests__/gutenberg-editor-block-insertion-@canary.test.js index b413f3b6a42ce..05f7c6bfcd077 100644 --- a/packages/react-native-editor/__device-tests__/gutenberg-editor-block-insertion-@canary.test.js +++ b/packages/react-native-editor/__device-tests__/gutenberg-editor-block-insertion-@canary.test.js @@ -104,7 +104,7 @@ describe( 'Gutenberg Editor Slash Inserter tests', () => { ); expect( await editorPage.assertSlashInserterPresent() ).toBe( true ); - await editorPage.removeBlockAtPosition( blockNames.paragraph ); + await editorPage.removeBlock(); } ); it( 'should hide the menu after deleting the / character', async () => { @@ -139,7 +139,7 @@ describe( 'Gutenberg Editor Slash Inserter tests', () => { // Check if the slash inserter UI no longer exists. expect( await editorPage.assertSlashInserterPresent() ).toBe( false ); - await editorPage.removeBlockAtPosition( blockNames.paragraph ); + await editorPage.removeBlock(); } ); it( 'should add an Image block after tying /image and tapping on the Image block button', async () => { @@ -172,7 +172,7 @@ describe( 'Gutenberg Editor Slash Inserter tests', () => { expect( await editorPage.assertSlashInserterPresent() ).toBe( false ); // Remove image block. - await editorPage.removeBlockAtPosition( blockNames.image ); + await editorPage.removeBlock(); } ); it( 'should insert an embed image block with "/img" + enter', async () => { @@ -190,6 +190,6 @@ describe( 'Gutenberg Editor Slash Inserter tests', () => { await editorPage.hasBlockAtPosition( 1, blockNames.embed ) ).toBe( true ); - await editorPage.removeBlockAtPosition( blockNames.embed ); + await editorPage.removeBlock(); } ); } ); diff --git a/packages/react-native-editor/__device-tests__/gutenberg-editor-device-actions.test.js b/packages/react-native-editor/__device-tests__/gutenberg-editor-device-actions.test.js index 3a64ca3750898..e5e7b5c829f8e 100644 --- a/packages/react-native-editor/__device-tests__/gutenberg-editor-device-actions.test.js +++ b/packages/react-native-editor/__device-tests__/gutenberg-editor-device-actions.test.js @@ -108,8 +108,8 @@ describe( 'Gutenberg Editor Paste tests', () => { const text = await editorPage.getTextForParagraphBlockAtPosition( 2 ); expect( text ).toBe( testData.pastePlainText ); - await editorPage.removeBlockAtPosition( blockNames.paragraph, 2 ); - await editorPage.removeBlockAtPosition( blockNames.paragraph, 1 ); + await editorPage.removeBlock(); + await editorPage.removeBlock(); } ); it.skip( 'copies styled text from one paragraph block and pastes in another', async () => { diff --git a/packages/react-native-editor/__device-tests__/gutenberg-editor-media-blocks-@canary.test.js b/packages/react-native-editor/__device-tests__/gutenberg-editor-media-blocks-@canary.test.js index 6fd68a7a4aff3..e17e39bd8357f 100644 --- a/packages/react-native-editor/__device-tests__/gutenberg-editor-media-blocks-@canary.test.js +++ b/packages/react-native-editor/__device-tests__/gutenberg-editor-media-blocks-@canary.test.js @@ -134,7 +134,7 @@ onlyOniOS( 'Gutenberg Editor Cover Block test', () => { // Navigate upwards to select parent block await editorPage.moveBlockSelectionUp(); - await editorPage.removeBlockAtPosition( blockNames.cover ); + await editorPage.removeBlock(); } ); // Testing this for iOS on a device is valuable to ensure that it properly @@ -165,6 +165,6 @@ onlyOniOS( 'Gutenberg Editor Cover Block test', () => { await editorPage.chooseMediaLibrary(); expect( coverBlock ).toBeTruthy(); - await editorPage.removeBlockAtPosition( blockNames.cover ); + await editorPage.removeBlock(); } ); } ); diff --git a/packages/react-native-editor/__device-tests__/pages/editor-page.js b/packages/react-native-editor/__device-tests__/pages/editor-page.js index 3b06187482a6f..f03dae92c4174 100644 --- a/packages/react-native-editor/__device-tests__/pages/editor-page.js +++ b/packages/react-native-editor/__device-tests__/pages/editor-page.js @@ -341,6 +341,46 @@ class EditorPage { } } + async swipeToolbarToElement( elementSelector, options ) { + const { byId, swipeRight } = options || {}; + const offset = isAndroid() ? 300 : 50; + const maxLocatorAttempts = 5; + let locatorAttempts = 0; + let element; + + const toolbar = await this.getToolbar(); + const toolbarLocation = await toolbar.getLocation(); + const toolbarSize = await toolbar.getSize(); + + while ( locatorAttempts < maxLocatorAttempts ) { + element = byId + ? await this.driver.elementsByAccessibilityId( elementSelector ) + : await this.driver.elementsByXPath( elementSelector ); + if ( await element[ 0 ]?.isDisplayed() ) { + break; + } + + swipeFromTo( + this.driver, + { + x: ! swipeRight + ? toolbarSize.width - offset + : toolbarSize.width / 2, + y: toolbarLocation.y + toolbarSize.height / 2, + }, + { + x: ! swipeRight + ? toolbarSize.width / 2 + : toolbarSize.width - offset, + y: toolbarLocation.y + toolbarSize.height / 2, + }, + 1000 + ); + locatorAttempts++; + } + return element; + } + async openBlockSettings() { const settingsButtonElement = isAndroid() ? '//android.widget.Button[@content-desc="Open Settings"]/android.view.ViewGroup' @@ -356,10 +396,10 @@ class EditorPage { const blockActionsButtonElement = isAndroid() ? '//android.widget.Button[contains(@content-desc, "Open Block Actions Menu")]' : '//XCUIElementTypeButton[@name="Open Block Actions Menu"]'; - const blockActionsMenu = await this.waitForElementToBeDisplayedByXPath( + const blockActionsMenu = await this.swipeToolbarToElement( blockActionsButtonElement ); - await blockActionsMenu.click(); + await blockActionsMenu[ 0 ].click(); const removeElement = 'Remove block'; const removeBlockButton = await this.waitForElementToBeDisplayedById( @@ -378,13 +418,16 @@ class EditorPage { // ========================= async getToolbar() { - return await this.driver.elementsByAccessibilityId( 'Document tools' ); + return this.waitForElementToBeDisplayedById( 'Document tools', 4000 ); } async addNewBlock( blockName, { skipInserterOpen = false } = {} ) { if ( ! skipInserterOpen ) { - const addButton = await this.getAddBlockButton(); - await addButton.click(); + const addButton = await this.swipeToolbarToElement( ADD_BLOCK_ID, { + byId: true, + swipeRight: true, + } ); + await addButton[ 0 ].click(); } // Click on block of choice. @@ -599,10 +642,8 @@ class EditorPage { const identifier = isAndroid() ? `//android.widget.Button[@content-desc="${ formatting }"]/android.view.ViewGroup` : `//XCUIElementTypeButton[@name="${ formatting }"]`; - const toggleElement = await this.waitForElementToBeDisplayedByXPath( - identifier - ); - return await toggleElement.click(); + const toggleElement = await this.swipeToolbarToElement( identifier ); + return await toggleElement[ 0 ].click(); } async openLinkToSettings() { From f4c104672fe5a94f76ae1f217acb0322e338f3b5 Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Thu, 6 Jul 2023 12:32:01 -0500 Subject: [PATCH 077/146] Revert phpcs back to PHP 5.6 (#52384) Reverts phpcs PHP compatibility version back to 5.6. --- phpcs.xml.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 9e44d5fea1347..6f40a38522ad6 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -2,7 +2,7 @@ Sniffs for WordPress plugins, with minor modifications for Gutenberg - + *\.php$ From d72aad081b8cae188f1530f8cb76ecd7a0d703f4 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Thu, 6 Jul 2023 19:40:16 +0100 Subject: [PATCH 078/146] Allow opt out of auto-creation of Navigation fallback (#52319) --- .../class-gutenberg-navigation-fallback.php | 11 ++++++++++- ...erg-navigation-fallback-gutenberg-test.php | 19 ++++++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/lib/compat/wordpress-6.3/class-gutenberg-navigation-fallback.php b/lib/compat/wordpress-6.3/class-gutenberg-navigation-fallback.php index 91417971e22c7..fcf6e13b0954d 100644 --- a/lib/compat/wordpress-6.3/class-gutenberg-navigation-fallback.php +++ b/lib/compat/wordpress-6.3/class-gutenberg-navigation-fallback.php @@ -23,9 +23,18 @@ class Gutenberg_Navigation_Fallback { */ public static function get_fallback() { + /** + * Filters whether or not a fallback should be created. + * + * @since 6.3.0 + * + * @param bool Whether or not to create a fallback. + */ + $should_create_fallback = apply_filters( 'gutenberg_navigation_should_create_fallback', true ); + $fallback = static::get_most_recently_published_navigation(); - if ( $fallback ) { + if ( $fallback || ! $should_create_fallback ) { return $fallback; } diff --git a/phpunit/class-gutenberg-navigation-fallback-gutenberg-test.php b/phpunit/class-gutenberg-navigation-fallback-gutenberg-test.php index 7b0719950df8b..edc48f1c71761 100644 --- a/phpunit/class-gutenberg-navigation-fallback-gutenberg-test.php +++ b/phpunit/class-gutenberg-navigation-fallback-gutenberg-test.php @@ -32,7 +32,6 @@ public function test_it_exists() { $this->assertTrue( class_exists( 'Gutenberg_Navigation_Fallback' ), 'Gutenberg_Navigation_Fallback class should exist.' ); } - /** * @covers WP_REST_Navigation_Fallback_Controller::get_fallback */ @@ -54,6 +53,24 @@ public function test_should_return_a_default_fallback_navigation_menu_in_absence $this->assertCount( 1, $navs_in_db, 'The fallback Navigation post should be the only one in the database.' ); } + /** + * @covers WP_REST_Navigation_Fallback_Controller::get_fallback + */ + public function test_should_not_automatically_create_fallback_if_filter_is_falsey() { + + add_filter( 'gutenberg_navigation_should_create_fallback', '__return_false' ); + + $data = Gutenberg_Navigation_Fallback::get_fallback(); + + $this->assertEmpty( $data ); + + $navs_in_db = $this->get_navigations_in_database(); + + $this->assertCount( 0, $navs_in_db, 'The fallback Navigation post should not have been created.' ); + + remove_filter( 'gutenberg_navigation_should_create_fallback', '__return_false' ); + } + /** * @covers WP_REST_Navigation_Fallback_Controller::get_fallback */ From 5977e3d60b7aea6e22d4a452f7525d3f140c37b6 Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Fri, 7 Jul 2023 09:31:12 +1200 Subject: [PATCH 079/146] Patterns: stop endless snackbars appearing (#52012) --- .../e2e-test-utils/src/create-reusable-block.js | 2 +- .../specs/editor/various/reusable-blocks.test.js | 2 +- .../reusable-block-convert-button.js | 16 +++++++++++++--- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/packages/e2e-test-utils/src/create-reusable-block.js b/packages/e2e-test-utils/src/create-reusable-block.js index 4559d3b435fd1..9714638154403 100644 --- a/packages/e2e-test-utils/src/create-reusable-block.js +++ b/packages/e2e-test-utils/src/create-reusable-block.js @@ -38,7 +38,7 @@ export const createReusableBlock = async ( content, title ) => { // Wait for creation to finish await page.waitForXPath( - '//*[contains(@class, "components-snackbar")]/*[text()="Synced Pattern created."]' + '//*[contains(@class, "components-snackbar")]/*[contains(text(),"Pattern created:")]' ); // Check that we have a reusable block on the page diff --git a/packages/e2e-tests/specs/editor/various/reusable-blocks.test.js b/packages/e2e-tests/specs/editor/various/reusable-blocks.test.js index ec2fc8e535550..0a18c75528930 100644 --- a/packages/e2e-tests/specs/editor/various/reusable-blocks.test.js +++ b/packages/e2e-tests/specs/editor/various/reusable-blocks.test.js @@ -212,7 +212,7 @@ describe( 'Reusable blocks', () => { // Wait for creation to finish. await page.waitForXPath( - '//*[contains(@class, "components-snackbar")]/*[text()="Synced Pattern created."]' + '//*[contains(@class, "components-snackbar")]/*[contains(text(),"Pattern created:")]' ); await clearAllBlocks(); diff --git a/packages/reusable-blocks/src/components/reusable-blocks-menu-items/reusable-block-convert-button.js b/packages/reusable-blocks/src/components/reusable-blocks-menu-items/reusable-block-convert-button.js index 875adb8fc16e3..981776880a137 100644 --- a/packages/reusable-blocks/src/components/reusable-blocks-menu-items/reusable-block-convert-button.js +++ b/packages/reusable-blocks/src/components/reusable-blocks-menu-items/reusable-block-convert-button.js @@ -19,7 +19,7 @@ import { } from '@wordpress/components'; import { symbol } from '@wordpress/icons'; import { useDispatch, useSelect } from '@wordpress/data'; -import { __ } from '@wordpress/i18n'; +import { __, sprintf } from '@wordpress/i18n'; import { store as noticesStore } from '@wordpress/notices'; import { store as coreStore } from '@wordpress/core-data'; @@ -98,15 +98,25 @@ export default function ReusableBlockConvertButton( { ); createSuccessNotice( syncType === 'fully' - ? __( 'Synced Pattern created.' ) - : __( 'Unsynced Pattern created.' ), + ? sprintf( + // translators: %s: the name the user has given to the pattern. + __( 'Synced Pattern created: %s' ), + reusableBlockTitle + ) + : sprintf( + // translators: %s: the name the user has given to the pattern. + __( 'Unsynced Pattern created: %s' ), + reusableBlockTitle + ), { type: 'snackbar', + id: 'convert-to-reusable-block-success', } ); } catch ( error ) { createErrorNotice( error.message, { type: 'snackbar', + id: 'convert-to-reusable-block-error', } ); } }, From 5b0011fa2a557135a7776544f859ceced7bdd794 Mon Sep 17 00:00:00 2001 From: James Koster Date: Fri, 7 Jul 2023 00:50:02 +0100 Subject: [PATCH 080/146] Patterns: Distinguish between theme patterns and template parts in category list (#52382) --- .../index.js | 128 +++++++++++------- .../style.scss | 27 +++- 2 files changed, 105 insertions(+), 50 deletions(-) diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-patterns/index.js b/packages/edit-site/src/components/sidebar-navigation-screen-patterns/index.js index b28aa6687723b..97789e6ec45fe 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-patterns/index.js +++ b/packages/edit-site/src/components/sidebar-navigation-screen-patterns/index.js @@ -7,6 +7,7 @@ import { Flex, Icon, Tooltip, + __experimentalHeading as Heading, } from '@wordpress/components'; import { useViewportMatch } from '@wordpress/compose'; import { useSelect } from '@wordpress/data'; @@ -109,9 +110,21 @@ export default function SidebarNavigationScreenPatterns() { ) } { hasTemplateParts && ( - - { Object.entries( templatePartAreas ).map( - ( [ area, parts ] ) => ( + <> +
    + + { __( 'Template parts' ) } + +

    + { __( + 'Synced patterns for use in template building.' + ) } +

    +
    + + { Object.entries( + templatePartAreas + ).map( ( [ area, parts ] ) => ( - ) - ) } - + ) ) } +
    + ) } { hasPatterns && ( - - { patternCategories.map( ( category ) => ( - - { category.label } - - - - - - - } - icon={ file } - id={ category.name } - type="pattern" - isActive={ - currentCategory === - `${ category.name }` && - currentType === 'pattern' - } - /> - ) ) } - + <> +
    + + { __( 'Theme patterns' ) } + +

    + { __( + 'For insertion into documents where they can then be customized.' + ) } +

    +
    + + { patternCategories.map( + ( category ) => ( + + { category.label } + + + + + + + } + icon={ file } + id={ category.name } + type="pattern" + isActive={ + currentCategory === + `${ category.name }` && + currentType === + 'pattern' + } + /> + ) + ) } + + ) } ) } diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-patterns/style.scss b/packages/edit-site/src/components/sidebar-navigation-screen-patterns/style.scss index f0edb96164abc..65790b5e86216 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-patterns/style.scss +++ b/packages/edit-site/src/components/sidebar-navigation-screen-patterns/style.scss @@ -1,3 +1,28 @@ .edit-site-sidebar-navigation-screen-patterns__group { - margin-bottom: $grid-unit-30; + margin-bottom: $grid-unit-40; + padding-bottom: $grid-unit-30; + border-bottom: 1px solid $gray-800; + + &:last-of-type, + &:first-of-type { + border-bottom: 0; + padding-bottom: 0; + margin-bottom: 0; + } + + &:first-of-type { + margin-bottom: $grid-unit-40; + } +} + +.edit-site-sidebar-navigation-screen-patterns__group-header { + p { + color: $gray-600; + } + + h2 { + font-size: 11px; + font-weight: 500; + text-transform: uppercase; + } } From bf8023a2f36194768b9f5d9f110c5c8c7049f510 Mon Sep 17 00:00:00 2001 From: Robert Anderson Date: Fri, 7 Jul 2023 10:39:46 +1000 Subject: [PATCH 081/146] Page Content Focus: Ignore page content within a Query Loop block (#52351) * Block Editor: Pass context and className props to editor.BlockEdit filter * Page Content Focus: Ignore content blocks that are within a Query Loop --- .../src/components/block-edit/edit.js | 35 ++++++++++++++----- .../src/components/block-edit/test/edit.js | 2 +- .../list-view/use-list-view-client-ids.js | 4 +-- .../src/store/private-selectors.js | 9 ++--- .../src/store/test/private-selectors.js | 10 +++--- .../page-content-focus-manager/constants.js | 5 --- .../disable-non-page-content-blocks.js | 15 ++++++-- .../page-panels/page-content.js | 12 ++++--- 8 files changed, 56 insertions(+), 36 deletions(-) delete mode 100644 packages/edit-site/src/components/page-content-focus-manager/constants.js diff --git a/packages/block-editor/src/components/block-edit/edit.js b/packages/block-editor/src/components/block-edit/edit.js index 1154b99efebab..31344b5433793 100644 --- a/packages/block-editor/src/components/block-edit/edit.js +++ b/packages/block-editor/src/components/block-edit/edit.js @@ -29,7 +29,25 @@ import BlockContext from '../block-context'; */ const DEFAULT_BLOCK_CONTEXT = {}; -export const Edit = ( props ) => { +const Edit = ( props ) => { + const { name } = props; + const blockType = getBlockType( name ); + + if ( ! blockType ) { + return null; + } + + // `edit` and `save` are functions or components describing the markup + // with which a block is displayed. If `blockType` is valid, assign + // them preferentially as the render value for the block. + const Component = blockType.edit || blockType.save; + + return ; +}; + +const EditWithFilters = withFilters( 'editor.BlockEdit' )( Edit ); + +const EditWithGeneratedProps = ( props ) => { const { attributes = {}, name } = props; const blockType = getBlockType( name ); const blockContext = useContext( BlockContext ); @@ -49,13 +67,8 @@ export const Edit = ( props ) => { return null; } - // `edit` and `save` are functions or components describing the markup - // with which a block is displayed. If `blockType` is valid, assign - // them preferentially as the render value for the block. - const Component = blockType.edit || blockType.save; - if ( blockType.apiVersion > 1 ) { - return ; + return ; } // Generate a class name for the block's editable form. @@ -69,8 +82,12 @@ export const Edit = ( props ) => { ); return ( - + ); }; -export default withFilters( 'editor.BlockEdit' )( Edit ); +export default EditWithGeneratedProps; diff --git a/packages/block-editor/src/components/block-edit/test/edit.js b/packages/block-editor/src/components/block-edit/test/edit.js index 0eb4c72cbbfc9..76afbcb852ac1 100644 --- a/packages/block-editor/src/components/block-edit/test/edit.js +++ b/packages/block-editor/src/components/block-edit/test/edit.js @@ -15,7 +15,7 @@ import { /** * Internal dependencies */ -import { Edit } from '../edit'; +import Edit from '../edit'; import { BlockContextProvider } from '../../block-context'; const noop = () => {}; diff --git a/packages/block-editor/src/components/list-view/use-list-view-client-ids.js b/packages/block-editor/src/components/list-view/use-list-view-client-ids.js index d51412fdf2c3d..8a1ccfcede4c1 100644 --- a/packages/block-editor/src/components/list-view/use-list-view-client-ids.js +++ b/packages/block-editor/src/components/list-view/use-list-view-client-ids.js @@ -16,14 +16,14 @@ export default function useListViewClientIds( { blocks, rootClientId } ) { const { getDraggedBlockClientIds, getSelectedBlockClientIds, - getListViewClientIdsTree, + getEnabledClientIdsTree, } = unlock( select( blockEditorStore ) ); return { selectedClientIds: getSelectedBlockClientIds(), draggedClientIds: getDraggedBlockClientIds(), clientIdsTree: - blocks ?? getListViewClientIdsTree( rootClientId ), + blocks ?? getEnabledClientIdsTree( rootClientId ), }; }, [ blocks, rootClientId ] diff --git a/packages/block-editor/src/store/private-selectors.js b/packages/block-editor/src/store/private-selectors.js index 3abc1b0b3bdfd..e6fb17c5f6e3c 100644 --- a/packages/block-editor/src/store/private-selectors.js +++ b/packages/block-editor/src/store/private-selectors.js @@ -136,21 +136,18 @@ export const isBlockSubtreeDisabled = createSelector( * * @return {Object[]} Tree of block objects with only clientID and innerBlocks set. */ -export const getListViewClientIdsTree = createSelector( +export const getEnabledClientIdsTree = createSelector( ( state, rootClientId = '' ) => { return getBlockOrder( state, rootClientId ).flatMap( ( clientId ) => { if ( getBlockEditingMode( state, clientId ) !== 'disabled' ) { return [ { clientId, - innerBlocks: getListViewClientIdsTree( - state, - clientId - ), + innerBlocks: getEnabledClientIdsTree( state, clientId ), }, ]; } - return getListViewClientIdsTree( state, clientId ); + return getEnabledClientIdsTree( state, clientId ); } ); }, ( state ) => [ diff --git a/packages/block-editor/src/store/test/private-selectors.js b/packages/block-editor/src/store/test/private-selectors.js index 30cf702c60526..e826db4a62bb9 100644 --- a/packages/block-editor/src/store/test/private-selectors.js +++ b/packages/block-editor/src/store/test/private-selectors.js @@ -11,7 +11,7 @@ import { getLastInsertedBlocksClientIds, getBlockEditingMode, isBlockSubtreeDisabled, - getListViewClientIdsTree, + getEnabledClientIdsTree, getEnabledBlockParents, } from '../private-selectors'; @@ -391,7 +391,7 @@ describe( 'private selectors', () => { } ); } ); - describe( 'getListViewClientIdsTree', () => { + describe( 'getEnabledClientIdsTree', () => { const baseState = { settings: {}, blocks: { @@ -462,7 +462,7 @@ describe( 'private selectors', () => { ...baseState, blockEditingModes: new Map( [] ), }; - expect( getListViewClientIdsTree( state ) ).toEqual( [ + expect( getEnabledClientIdsTree( state ) ).toEqual( [ { clientId: '6cf70164-9097-4460-bcbf-200560546988', innerBlocks: [], @@ -500,7 +500,7 @@ describe( 'private selectors', () => { blockEditingModes: new Map( [] ), }; expect( - getListViewClientIdsTree( + getEnabledClientIdsTree( state, 'ef45d5fd-5234-4fd5-ac4f-c3736c7f9337' ) @@ -534,7 +534,7 @@ describe( 'private selectors', () => { [ '9b9c5c3f-2e46-4f02-9e14-9fe9515b958f', 'contentOnly' ], ] ), }; - expect( getListViewClientIdsTree( state ) ).toEqual( [ + expect( getEnabledClientIdsTree( state ) ).toEqual( [ { clientId: 'b26fc763-417d-4f01-b81c-2ec61e14a972', innerBlocks: [], diff --git a/packages/edit-site/src/components/page-content-focus-manager/constants.js b/packages/edit-site/src/components/page-content-focus-manager/constants.js deleted file mode 100644 index a81b2fd37563a..0000000000000 --- a/packages/edit-site/src/components/page-content-focus-manager/constants.js +++ /dev/null @@ -1,5 +0,0 @@ -export const PAGE_CONTENT_BLOCK_TYPES = [ - 'core/post-title', - 'core/post-featured-image', - 'core/post-content', -]; diff --git a/packages/edit-site/src/components/page-content-focus-manager/disable-non-page-content-blocks.js b/packages/edit-site/src/components/page-content-focus-manager/disable-non-page-content-blocks.js index 33ea486863d20..7b184ff253c7e 100644 --- a/packages/edit-site/src/components/page-content-focus-manager/disable-non-page-content-blocks.js +++ b/packages/edit-site/src/components/page-content-focus-manager/disable-non-page-content-blocks.js @@ -10,16 +10,22 @@ import { useEffect } from '@wordpress/element'; * Internal dependencies */ import { unlock } from '../../lock-unlock'; -import { PAGE_CONTENT_BLOCK_TYPES } from './constants'; const { useBlockEditingMode } = unlock( blockEditorPrivateApis ); +const PAGE_CONTENT_BLOCK_TYPES = [ + 'core/post-title', + 'core/post-featured-image', + 'core/post-content', +]; + /** * Component that when rendered, makes it so that the site editor allows only * page content to be edited. */ export default function DisableNonPageContentBlocks() { useDisableNonPageContentBlocks(); + return null; } /** @@ -43,8 +49,11 @@ export function useDisableNonPageContentBlocks() { const withDisableNonPageContentBlocks = createHigherOrderComponent( ( BlockEdit ) => ( props ) => { - const isContent = PAGE_CONTENT_BLOCK_TYPES.includes( props.name ); - const mode = isContent ? 'contentOnly' : undefined; + const isDescendentOfQueryLoop = !! props.context.queryId; + const isPageContent = + PAGE_CONTENT_BLOCK_TYPES.includes( props.name ) && + ! isDescendentOfQueryLoop; + const mode = isPageContent ? 'contentOnly' : undefined; useBlockEditingMode( mode ); return ; }, diff --git a/packages/edit-site/src/components/sidebar-edit-mode/page-panels/page-content.js b/packages/edit-site/src/components/sidebar-edit-mode/page-panels/page-content.js index d6e7dd23a709f..dd40bcaef9f70 100644 --- a/packages/edit-site/src/components/sidebar-edit-mode/page-panels/page-content.js +++ b/packages/edit-site/src/components/sidebar-edit-mode/page-panels/page-content.js @@ -6,22 +6,24 @@ import { store as blockEditorStore, privateApis as blockEditorPrivateApis, } from '@wordpress/block-editor'; +import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { PAGE_CONTENT_BLOCK_TYPES } from '../../page-content-focus-manager/constants'; import { unlock } from '../../../lock-unlock'; const { BlockQuickNavigation } = unlock( blockEditorPrivateApis ); export default function PageContent() { - const clientIds = useSelect( + const clientIdsTree = useSelect( ( select ) => - select( blockEditorStore ).__experimentalGetGlobalBlocksByName( - PAGE_CONTENT_BLOCK_TYPES - ), + unlock( select( blockEditorStore ) ).getEnabledClientIdsTree(), [] ); + const clientIds = useMemo( + () => clientIdsTree.map( ( { clientId } ) => clientId ), + [ clientIdsTree ] + ); return ; } From d22200665d0f2500a3288f64c4ec26ebbe76df63 Mon Sep 17 00:00:00 2001 From: Saxon Fletcher Date: Fri, 7 Jul 2023 11:39:41 +1000 Subject: [PATCH 082/146] add hint to show template part move (#52395) --- .../sidebar-navigation-screen-main/index.js | 84 ++++++++++--------- .../template-part-hint.js | 36 ++++++++ .../sidebar-navigation-screen/style.scss | 14 ++++ 3 files changed, 94 insertions(+), 40 deletions(-) create mode 100644 packages/edit-site/src/components/sidebar-navigation-screen-main/template-part-hint.js diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-main/index.js b/packages/edit-site/src/components/sidebar-navigation-screen-main/index.js index 58b93d61c45a6..152139870fa59 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-main/index.js +++ b/packages/edit-site/src/components/sidebar-navigation-screen-main/index.js @@ -20,6 +20,7 @@ import SidebarNavigationItem from '../sidebar-navigation-item'; import { SidebarNavigationItemGlobalStyles } from '../sidebar-navigation-screen-global-styles'; import { unlock } from '../../lock-unlock'; import { store as editSiteStore } from '../../store'; +import TemplatePartHint from './template-part-hint'; export default function SidebarNavigationScreenMain() { const { location } = useNavigator(); @@ -42,46 +43,49 @@ export default function SidebarNavigationScreenMain() { 'Customize the appearance of your website using the block editor.' ) } content={ - - - { __( 'Navigation' ) } - - - { __( 'Styles' ) } - - - { __( 'Pages' ) } - - - { __( 'Templates' ) } - - - { __( 'Patterns' ) } - - + <> + + + { __( 'Navigation' ) } + + + { __( 'Styles' ) } + + + { __( 'Pages' ) } + + + { __( 'Templates' ) } + + + { __( 'Patterns' ) } + + + + } /> ); diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-main/template-part-hint.js b/packages/edit-site/src/components/sidebar-navigation-screen-main/template-part-hint.js new file mode 100644 index 0000000000000..8fbe74f81bb4d --- /dev/null +++ b/packages/edit-site/src/components/sidebar-navigation-screen-main/template-part-hint.js @@ -0,0 +1,36 @@ +/** + * WordPress dependencies + */ +import { Notice } from '@wordpress/components'; +import { useDispatch, useSelect } from '@wordpress/data'; +import { __ } from '@wordpress/i18n'; +import { store as preferencesStore } from '@wordpress/preferences'; + +const PREFERENCE_NAME = 'isTemplatePartMoveHintVisible'; + +export default function TemplatePartHint() { + const showTemplatePartHint = useSelect( + ( select ) => + select( preferencesStore ).get( 'core', PREFERENCE_NAME ) ?? true, + [] + ); + + const { set: setPreference } = useDispatch( preferencesStore ); + if ( ! showTemplatePartHint ) { + return null; + } + + return ( + { + setPreference( 'core', PREFERENCE_NAME, false ); + } } + > + { __( + 'Looking for template parts? You can now find them in the new "Patterns" page.' + ) } + + ); +} diff --git a/packages/edit-site/src/components/sidebar-navigation-screen/style.scss b/packages/edit-site/src/components/sidebar-navigation-screen/style.scss index 1fecf49d71221..26a30da286fc8 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen/style.scss +++ b/packages/edit-site/src/components/sidebar-navigation-screen/style.scss @@ -98,6 +98,20 @@ border-top: 1px solid $gray-800; } +.edit-site-sidebar__notice { + background: $gray-800; + color: $gray-300; + margin: $grid-unit-30 0; + &.is-dismissible { + padding-right: $grid-unit-10; + } + .components-notice__dismiss:not(:disabled):not([aria-disabled="true"]):focus, + .components-notice__dismiss:not(:disabled):not([aria-disabled="true"]):not(.is-secondary):active, + .components-notice__dismiss:not(:disabled):not([aria-disabled="true"]):not(.is-secondary):hover { + color: $gray-100; + } +} + /* In general style overrides are discouraged. * This is a temporary solution to override the InputControl component's styles. * The `Theme` component will potentially be the more appropriate approach From 9e8763a9e66dc5b185e69b8e2bbaab6b53fa694a Mon Sep 17 00:00:00 2001 From: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com> Date: Fri, 7 Jul 2023 12:06:09 +1000 Subject: [PATCH 083/146] Patterns: Display all custom template part areas in sidebar nav (#52355) --- .../components/page-patterns/use-patterns.js | 10 +- .../index.js | 186 ++++++++---------- .../use-template-part-areas.js | 40 +++- 3 files changed, 116 insertions(+), 120 deletions(-) diff --git a/packages/edit-site/src/components/page-patterns/use-patterns.js b/packages/edit-site/src/components/page-patterns/use-patterns.js index cef7b4721193f..a394aabf572c4 100644 --- a/packages/edit-site/src/components/page-patterns/use-patterns.js +++ b/packages/edit-site/src/components/page-patterns/use-patterns.js @@ -38,14 +38,8 @@ const templatePartToPattern = ( templatePart ) => ( { templatePart, } ); -const templatePartCategories = [ 'header', 'footer', 'sidebar' ]; -const templatePartHasCategory = ( item, category ) => { - if ( category === 'uncategorized' ) { - return ! templatePartCategories.includes( item.templatePart.area ); - } - - return item.templatePart.area === category; -}; +const templatePartHasCategory = ( item, category ) => + item.templatePart.area === category; const useTemplatePartsAsPatterns = ( categoryId, diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-patterns/index.js b/packages/edit-site/src/components/sidebar-navigation-screen-patterns/index.js index 97789e6ec45fe..f200382f96311 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-patterns/index.js +++ b/packages/edit-site/src/components/sidebar-navigation-screen-patterns/index.js @@ -30,12 +30,79 @@ import usePatternCategories from './use-pattern-categories'; import useMyPatterns from './use-my-patterns'; import useTemplatePartAreas from './use-template-part-areas'; -const templatePartAreaLabels = { - header: __( 'Headers' ), - footer: __( 'Footers' ), - sidebar: __( 'Sidebar' ), - uncategorized: __( 'Uncategorized' ), -}; +function TemplatePartGroup( { areas, currentArea, currentType } ) { + return ( + <> +
    + { __( 'Template parts' ) } +

    { __( 'Synced patterns for use in template building.' ) }

    +
    + + { Object.entries( areas ).map( + ( [ area, { label, templateParts } ] ) => ( + + ) + ) } + + + ); +} + +function ThemePatternsGroup( { categories, currentCategory, currentType } ) { + return ( + <> +
    + { __( 'Theme patterns' ) } +

    + { __( + 'For insertion into documents where they can then be customized.' + ) } +

    +
    + + { categories.map( ( category ) => ( + + { category.label } + + + + + + + } + icon={ file } + id={ category.name } + type="pattern" + isActive={ + currentCategory === `${ category.name }` && + currentType === 'pattern' + } + /> + ) ) } + + + ); +} export default function SidebarNavigationScreenPatterns() { const isMobileViewport = useViewportMatch( 'medium', '<' ); @@ -110,105 +177,18 @@ export default function SidebarNavigationScreenPatterns() { ) } { hasTemplateParts && ( - <> -
    - - { __( 'Template parts' ) } - -

    - { __( - 'Synced patterns for use in template building.' - ) } -

    -
    - - { Object.entries( - templatePartAreas - ).map( ( [ area, parts ] ) => ( - - ) ) } - - + ) } { hasPatterns && ( - <> -
    - - { __( 'Theme patterns' ) } - -

    - { __( - 'For insertion into documents where they can then be customized.' - ) } -

    -
    - - { patternCategories.map( - ( category ) => ( - - { category.label } - - - - - - - } - icon={ file } - id={ category.name } - type="pattern" - isActive={ - currentCategory === - `${ category.name }` && - currentType === - 'pattern' - } - /> - ) - ) } - - + ) } ) } diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-patterns/use-template-part-areas.js b/packages/edit-site/src/components/sidebar-navigation-screen-patterns/use-template-part-areas.js index aa258344d132d..bc538c5e7a85f 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +++ b/packages/edit-site/src/components/sidebar-navigation-screen-patterns/use-template-part-areas.js @@ -2,19 +2,41 @@ * WordPress dependencies */ import { useEntityRecords } from '@wordpress/core-data'; +import { useSelect } from '@wordpress/data'; +import { store as editorStore } from '@wordpress/editor'; -const getTemplatePartAreas = ( items ) => { +const useTemplatePartsGroupedByArea = ( items ) => { const allItems = items || []; - const groupedByArea = allItems.reduce( - ( accumulator, item ) => { - const key = accumulator[ item.area ] ? item.area : 'uncategorized'; - accumulator[ key ].push( item ); - return accumulator; - }, - { header: [], footer: [], sidebar: [], uncategorized: [] } + const templatePartAreas = useSelect( + ( select ) => + select( editorStore ).__experimentalGetDefaultTemplatePartAreas(), + [] ); + // Create map of template areas ensuring that default areas are displayed before + // any custom registered template part areas. + const knownAreas = { + header: {}, + footer: {}, + sidebar: {}, + uncategorized: {}, + }; + + templatePartAreas.forEach( + ( templatePartArea ) => + ( knownAreas[ templatePartArea.area ] = { + ...templatePartArea, + templateParts: [], + } ) + ); + + const groupedByArea = allItems.reduce( ( accumulator, item ) => { + const key = accumulator[ item.area ] ? item.area : 'uncategorized'; + accumulator[ key ].templateParts.push( item ); + return accumulator; + }, knownAreas ); + return groupedByArea; }; @@ -28,6 +50,6 @@ export default function useTemplatePartAreas() { return { hasTemplateParts: templateParts ? !! templateParts.length : false, isLoading, - templatePartAreas: getTemplatePartAreas( templateParts ), + templatePartAreas: useTemplatePartsGroupedByArea( templateParts ), }; } From 4e9b121b269c315a0c159411bcd03a8a55dc0590 Mon Sep 17 00:00:00 2001 From: Marin Atanasov <8436925+tyxla@users.noreply.github.com> Date: Fri, 7 Jul 2023 08:40:57 +0300 Subject: [PATCH 084/146] Add support for arrays (#52280) --- packages/block-editor/src/utils/object.js | 13 +++++-- .../block-editor/src/utils/test/object.js | 36 +++++++++++++++++++ 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/packages/block-editor/src/utils/object.js b/packages/block-editor/src/utils/object.js index a543c1e4f1d30..a144f1b1bf53a 100644 --- a/packages/block-editor/src/utils/object.js +++ b/packages/block-editor/src/utils/object.js @@ -56,12 +56,17 @@ export function kebabCase( str ) { /** * Clones an object. + * Arrays are also cloned as arrays. * Non-object values are returned unchanged. * * @param {*} object Object to clone. * @return {*} Cloned object, or original literal non-object value. */ function cloneObject( object ) { + if ( Array.isArray( object ) ) { + return object.map( cloneObject ); + } + if ( object && typeof object === 'object' ) { return { ...Object.fromEntries( @@ -79,7 +84,7 @@ function cloneObject( object ) { /** * Immutably sets a value inside an object. Like `lodash#set`, but returning a * new object. Treats nullish initial values as empty objects. Clones any - * nested objects. + * nested objects. Supports arrays, too. * * @param {Object} object Object to set a value in. * @param {number|string|Array} path Path in the object to modify. @@ -92,7 +97,11 @@ export function setImmutably( object, path, value ) { normalizedPath.reduce( ( acc, key, i ) => { if ( acc[ key ] === undefined ) { - acc[ key ] = {}; + if ( Number.isInteger( path[ i + 1 ] ) ) { + acc[ key ] = []; + } else { + acc[ key ] = {}; + } } if ( i === normalizedPath.length - 1 ) { acc[ key ] = value; diff --git a/packages/block-editor/src/utils/test/object.js b/packages/block-editor/src/utils/test/object.js index def7e5e9c8f05..87f01375df311 100644 --- a/packages/block-editor/src/utils/test/object.js +++ b/packages/block-editor/src/utils/test/object.js @@ -150,6 +150,22 @@ describe( 'setImmutably', () => { expect( result ).toEqual( { test: 2 } ); } ); + it( 'handles first level arrays properly', () => { + const result = setImmutably( [ 5 ], 0, 6 ); + + expect( result ).toEqual( [ 6 ] ); + } ); + + it( 'handles nested arrays properly', () => { + const result = setImmutably( + [ [ 'foo', [ 'bar' ] ] ], + [ 0, 1, 0 ], + 'baz' + ); + + expect( result ).toEqual( [ [ 'foo', [ 'baz' ] ] ] ); + } ); + describe( 'with array notation access', () => { it( 'assigns values at deeper levels', () => { const result = setImmutably( {}, [ 'foo', 'bar', 'baz' ], 5 ); @@ -236,5 +252,25 @@ describe( 'setImmutably', () => { expect( result.foo.bar ).not.toBe( input.foo.bar ); expect( result.foo.bar.baz ).not.toBe( input.foo.bar.baz ); } ); + + it( 'clones arrays at the first level', () => { + const input = []; + const result = setImmutably( input, 0, 1 ); + + expect( result ).not.toBe( input ); + } ); + + it( 'clones arrays at deeper levels', () => { + const input = [ [ [ [ 'foo', [ 'bar' ] ] ] ] ]; + const result = setImmutably( input, [ 0, 0, 0, 1, 0 ], 'baz' ); + + expect( result ).not.toBe( input ); + expect( result[ 0 ] ).not.toBe( input[ 0 ] ); + expect( result[ 0 ][ 0 ] ).not.toBe( input[ 0 ][ 0 ] ); + expect( result[ 0 ][ 0 ][ 0 ] ).not.toBe( input[ 0 ][ 0 ][ 0 ] ); + expect( result[ 0 ][ 0 ][ 0 ][ 1 ] ).not.toBe( + input[ 0 ][ 0 ][ 0 ][ 1 ] + ); + } ); } ); } ); From bb5c6d0ac1467f6c0cd771833b88586a53ed805a Mon Sep 17 00:00:00 2001 From: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com> Date: Fri, 7 Jul 2023 16:40:48 +1000 Subject: [PATCH 085/146] Patterns: Add renaming, duplication, and deletion options (#52270) --- .../components/create-pattern-modal/index.js | 7 +- .../page-patterns/duplicate-menu-item.js | 196 ++++++++++++++++++ .../src/components/page-patterns/grid-item.js | 156 +++++++++----- .../page-patterns/rename-menu-item.js | 115 ++++++++++ .../src/components/page-patterns/style.scss | 4 + .../components/page-patterns/use-patterns.js | 2 + 6 files changed, 421 insertions(+), 59 deletions(-) create mode 100644 packages/edit-site/src/components/page-patterns/duplicate-menu-item.js create mode 100644 packages/edit-site/src/components/page-patterns/rename-menu-item.js diff --git a/packages/edit-site/src/components/create-pattern-modal/index.js b/packages/edit-site/src/components/create-pattern-modal/index.js index 46d734b86fdd1..753dccfb961dd 100644 --- a/packages/edit-site/src/components/create-pattern-modal/index.js +++ b/packages/edit-site/src/components/create-pattern-modal/index.js @@ -14,6 +14,7 @@ import { __ } from '@wordpress/i18n'; import { useState } from '@wordpress/element'; import { store as noticesStore } from '@wordpress/notices'; import { useDispatch } from '@wordpress/data'; +import { serialize } from '@wordpress/blocks'; /** * Internal dependencies @@ -21,9 +22,11 @@ import { useDispatch } from '@wordpress/data'; import { SYNC_TYPES, USER_PATTERN_CATEGORY } from '../page-patterns/utils'; export default function CreatePatternModal( { + blocks = [], closeModal, onCreate, onError, + title, } ) { const [ name, setName ] = useState( '' ); const [ syncType, setSyncType ] = useState( SYNC_TYPES.unsynced ); @@ -52,7 +55,7 @@ export default function CreatePatternModal( { 'wp_block', { title: name || __( 'Untitled Pattern' ), - content: '', + content: blocks?.length ? serialize( blocks ) : '', status: 'publish', meta: syncType === SYNC_TYPES.unsynced @@ -76,7 +79,7 @@ export default function CreatePatternModal( { return ( diff --git a/packages/edit-site/src/components/page-patterns/duplicate-menu-item.js b/packages/edit-site/src/components/page-patterns/duplicate-menu-item.js new file mode 100644 index 0000000000000..d2c14d15f341b --- /dev/null +++ b/packages/edit-site/src/components/page-patterns/duplicate-menu-item.js @@ -0,0 +1,196 @@ +/** + * WordPress dependencies + */ +import { MenuItem } from '@wordpress/components'; +import { store as coreStore } from '@wordpress/core-data'; +import { useDispatch } from '@wordpress/data'; +import { __, sprintf } from '@wordpress/i18n'; +import { store as noticesStore } from '@wordpress/notices'; +import { privateApis as routerPrivateApis } from '@wordpress/router'; + +/** + * Internal dependencies + */ +import { + TEMPLATE_PARTS, + PATTERNS, + SYNC_TYPES, + USER_PATTERNS, + USER_PATTERN_CATEGORY, +} from './utils'; +import { + useExistingTemplateParts, + getUniqueTemplatePartTitle, + getCleanTemplatePartSlug, +} from '../../utils/template-part-create'; +import { unlock } from '../../lock-unlock'; + +const { useHistory } = unlock( routerPrivateApis ); + +function getPatternMeta( item ) { + if ( item.type === PATTERNS ) { + return { wp_pattern_sync_status: SYNC_TYPES.unsynced }; + } + + const syncStatus = item.reusableBlock.wp_pattern_sync_status; + const isUnsynced = syncStatus === SYNC_TYPES.unsynced; + + return { + ...item.reusableBlock.meta, + wp_pattern_sync_status: isUnsynced ? syncStatus : undefined, + }; +} + +export default function DuplicateMenuItem( { + categoryId, + item, + label = __( 'Duplicate' ), + onClose, +} ) { + const { saveEntityRecord } = useDispatch( coreStore ); + const { createErrorNotice, createSuccessNotice } = + useDispatch( noticesStore ); + + const history = useHistory(); + const existingTemplateParts = useExistingTemplateParts(); + + async function createTemplatePart() { + try { + const copiedTitle = sprintf( + /* translators: %s: Existing template part title */ + __( '%s (Copy)' ), + item.title + ); + const title = getUniqueTemplatePartTitle( + copiedTitle, + existingTemplateParts + ); + const slug = getCleanTemplatePartSlug( title ); + const { area, content } = item.templatePart; + + const result = await saveEntityRecord( + 'postType', + 'wp_template_part', + { slug, title, content, area }, + { throwOnError: true } + ); + + createSuccessNotice( + sprintf( + // translators: %s: The new template part's title e.g. 'Call to action (copy)'. + __( '"%s" created.' ), + title + ), + { + type: 'snackbar', + id: 'edit-site-patterns-success', + actions: [ + { + label: __( 'Edit' ), + onClick: () => + history.push( { + postType: TEMPLATE_PARTS, + postId: result?.id, + categoryType: TEMPLATE_PARTS, + categoryId, + } ), + }, + ], + } + ); + + onClose(); + } catch ( error ) { + const errorMessage = + error.message && error.code !== 'unknown_error' + ? error.message + : __( + 'An error occurred while creating the template part.' + ); + + createErrorNotice( errorMessage, { + type: 'snackbar', + id: 'edit-site-patterns-error', + } ); + onClose(); + } + } + + async function createPattern() { + try { + const isThemePattern = item.type === PATTERNS; + const title = sprintf( + /* translators: %s: Existing pattern title */ + __( '%s (Copy)' ), + item.title + ); + + const result = await saveEntityRecord( + 'postType', + 'wp_block', + { + content: isThemePattern + ? item.content + : item.reusableBlock.content, + meta: getPatternMeta( item ), + status: 'publish', + title, + }, + { throwOnError: true } + ); + + const actionLabel = isThemePattern + ? __( 'View my patterns' ) + : __( 'Edit' ); + + const newLocation = isThemePattern + ? { + categoryType: USER_PATTERNS, + categoryId: USER_PATTERN_CATEGORY, + path: '/patterns', + } + : { + categoryType: USER_PATTERNS, + categoryId: USER_PATTERN_CATEGORY, + postType: USER_PATTERNS, + postId: result?.id, + }; + + createSuccessNotice( + sprintf( + // translators: %s: The new pattern's title e.g. 'Call to action (copy)'. + __( '"%s" added to my patterns.' ), + title + ), + { + type: 'snackbar', + id: 'edit-site-patterns-success', + actions: [ + { + label: actionLabel, + onClick: () => history.push( newLocation ), + }, + ], + } + ); + + onClose(); + } catch ( error ) { + const errorMessage = + error.message && error.code !== 'unknown_error' + ? error.message + : __( 'An error occurred while creating the pattern.' ); + + createErrorNotice( errorMessage, { + type: 'snackbar', + id: 'edit-site-patterns-error', + } ); + onClose(); + } + } + + const createItem = + item.type === TEMPLATE_PARTS ? createTemplatePart : createPattern; + + return { label }; +} diff --git a/packages/edit-site/src/components/page-patterns/grid-item.js b/packages/edit-site/src/components/page-patterns/grid-item.js index 8795e41eedd4f..7f40fbce9035c 100644 --- a/packages/edit-site/src/components/page-patterns/grid-item.js +++ b/packages/edit-site/src/components/page-patterns/grid-item.js @@ -24,7 +24,7 @@ import { Icon, header, footer, - symbolFilled, + symbolFilled as uncategorized, moreHorizontal, lockSmall, } from '@wordpress/icons'; @@ -35,23 +35,31 @@ import { DELETE, BACKSPACE } from '@wordpress/keycodes'; /** * Internal dependencies */ -import { PATTERNS, USER_PATTERNS } from './utils'; +import RenameMenuItem from './rename-menu-item'; +import DuplicateMenuItem from './duplicate-menu-item'; +import { PATTERNS, TEMPLATE_PARTS, USER_PATTERNS } from './utils'; +import { store as editSiteStore } from '../../store'; import { useLink } from '../routes/link'; -const THEME_PATTERN_TOOLTIP = __( 'Theme patterns cannot be edited.' ); +const templatePartIcons = { header, footer, uncategorized }; export default function GridItem( { categoryId, composite, icon, item } ) { const descriptionId = useId(); const [ isDeleteDialogOpen, setIsDeleteDialogOpen ] = useState( false ); + const { removeTemplate } = useDispatch( editSiteStore ); const { __experimentalDeleteReusableBlock } = useDispatch( reusableBlocksStore ); const { createErrorNotice, createSuccessNotice } = useDispatch( noticesStore ); + const isUserPattern = item.type === USER_PATTERNS; + const isNonUserPattern = item.type === PATTERNS; + const isTemplatePart = item.type === TEMPLATE_PARTS; + const { onClick } = useLink( { postType: item.type, - postId: item.type === USER_PATTERNS ? item.id : item.name, + postId: isUserPattern ? item.id : item.name, categoryId, categoryType: item.type, } ); @@ -67,27 +75,41 @@ export default function GridItem( { categoryId, composite, icon, item } ) { 'is-placeholder': isEmpty, } ); const previewClassNames = classnames( 'edit-site-patterns__preview', { - 'is-inactive': item.type === PATTERNS, + 'is-inactive': isNonUserPattern, } ); const deletePattern = async () => { try { await __experimentalDeleteReusableBlock( item.id ); - createSuccessNotice( __( 'Pattern successfully deleted.' ), { - type: 'snackbar', - } ); + createSuccessNotice( + sprintf( + // translators: %s: The pattern's title e.g. 'Call to action'. + __( '"%s" deleted.' ), + item.title + ), + { type: 'snackbar', id: 'edit-site-patterns-success' } + ); } catch ( error ) { const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : __( 'An error occurred while deleting the pattern.' ); - createErrorNotice( errorMessage, { type: 'snackbar' } ); + createErrorNotice( errorMessage, { + type: 'snackbar', + id: 'edit-site-patterns-error', + } ); } }; + const deleteItem = () => + isTemplatePart ? removeTemplate( item ) : deletePattern(); - const isUserPattern = item.type === USER_PATTERNS; + // Only custom patterns or custom template parts can be renamed or deleted. + const isCustomPattern = + isUserPattern || ( isTemplatePart && item.isCustom ); + const hasThemeFile = isTemplatePart && item.templatePart.has_theme_file; const ariaDescriptions = []; - if ( isUserPattern ) { + + if ( isCustomPattern ) { // User patterns don't have descriptions, but can be edited and deleted, so include some help text. ariaDescriptions.push( __( 'Press Enter to edit, or Delete to delete the pattern.' ) @@ -95,19 +117,24 @@ export default function GridItem( { categoryId, composite, icon, item } ) { } else if ( item.description ) { ariaDescriptions.push( item.description ); } - if ( item.type === PATTERNS ) { - ariaDescriptions.push( THEME_PATTERN_TOOLTIP ); - } - let itemIcon = icon; - if ( categoryId === 'header' ) { - itemIcon = header; - } else if ( categoryId === 'footer' ) { - itemIcon = footer; - } else if ( categoryId === 'uncategorized' ) { - itemIcon = symbolFilled; + if ( isNonUserPattern ) { + ariaDescriptions.push( __( 'Theme patterns cannot be edited.' ) ); } + const itemIcon = templatePartIcons[ categoryId ] + ? templatePartIcons[ categoryId ] + : icon; + + const confirmButtonText = hasThemeFile ? __( 'Clear' ) : __( 'Delete' ); + const confirmPrompt = hasThemeFile + ? __( 'Are you sure you want to clear these customizations?' ) + : sprintf( + // translators: %s: The pattern or template part's title e.g. 'Call to action'. + __( 'Are you sure you want to delete "%s"?' ), + item.title + ); + return ( <>
    @@ -117,7 +144,7 @@ export default function GridItem( { categoryId, composite, icon, item } ) { as="div" { ...composite } onClick={ item.type !== PATTERNS ? onClick : undefined } - onKeyDown={ isUserPattern ? onKeyDown : undefined } + onKeyDown={ isCustomPattern ? onKeyDown : undefined } aria-label={ item.title } aria-describedby={ ariaDescriptions.length @@ -169,58 +196,73 @@ export default function GridItem( { categoryId, composite, icon, item } ) { ) } > - + ) } - { item.type === USER_PATTERNS && ( - - { () => ( - + + { ( { onClose } ) => ( + + { isCustomPattern && ! hasThemeFile && ( + + ) } + + { isCustomPattern && ( setIsDeleteDialogOpen( true ) } > - { __( 'Delete' ) } + { hasThemeFile + ? __( 'Clear customizations' ) + : __( 'Delete' ) } - - ) } - - ) } + ) } + + ) } +
    { isDeleteDialogOpen && ( setIsDeleteDialogOpen( false ) } > - { __( 'Are you sure you want to delete this pattern?' ) } + { confirmPrompt } ) } diff --git a/packages/edit-site/src/components/page-patterns/rename-menu-item.js b/packages/edit-site/src/components/page-patterns/rename-menu-item.js new file mode 100644 index 0000000000000..938023a62cefd --- /dev/null +++ b/packages/edit-site/src/components/page-patterns/rename-menu-item.js @@ -0,0 +1,115 @@ +/** + * WordPress dependencies + */ +import { + Button, + MenuItem, + Modal, + TextControl, + __experimentalHStack as HStack, + __experimentalVStack as VStack, +} from '@wordpress/components'; +import { store as coreStore } from '@wordpress/core-data'; +import { useDispatch } from '@wordpress/data'; +import { useState } from '@wordpress/element'; +import { __ } from '@wordpress/i18n'; +import { store as noticesStore } from '@wordpress/notices'; + +/** + * Internal dependencies + */ +import { TEMPLATE_PARTS } from './utils'; + +export default function RenameMenuItem( { item, onClose } ) { + const [ title, setTitle ] = useState( () => item.title ); + const [ isModalOpen, setIsModalOpen ] = useState( false ); + + const { editEntityRecord, saveEditedEntityRecord } = + useDispatch( coreStore ); + const { createSuccessNotice, createErrorNotice } = + useDispatch( noticesStore ); + + if ( item.type === TEMPLATE_PARTS && ! item.isCustom ) { + return null; + } + + async function onRename( event ) { + event.preventDefault(); + + try { + await editEntityRecord( 'postType', item.type, item.id, { title } ); + + // Update state before saving rerenders the list. + setTitle( '' ); + setIsModalOpen( false ); + onClose(); + + // Persist edited entity. + await saveEditedEntityRecord( 'postType', item.type, item.id, { + throwOnError: true, + } ); + + createSuccessNotice( __( 'Entity renamed.' ), { + type: 'snackbar', + } ); + } catch ( error ) { + const errorMessage = + error.message && error.code !== 'unknown_error' + ? error.message + : __( 'An error occurred while renaming the entity.' ); + + createErrorNotice( errorMessage, { type: 'snackbar' } ); + } + } + + return ( + <> + { + setIsModalOpen( true ); + setTitle( item.title ); + } } + > + { __( 'Rename' ) } + + { isModalOpen && ( + { + setIsModalOpen( false ); + onClose(); + } } + overlayClassName="edit-site-list__rename_modal" + > +
    + + + + + + + + + +
    +
    + ) } + + ); +} diff --git a/packages/edit-site/src/components/page-patterns/style.scss b/packages/edit-site/src/components/page-patterns/style.scss index 9326a96612319..7a7bf026b9c62 100644 --- a/packages/edit-site/src/components/page-patterns/style.scss +++ b/packages/edit-site/src/components/page-patterns/style.scss @@ -101,6 +101,10 @@ .edit-site-patterns__pattern-lock-icon { display: inline-flex; + + svg { + fill: currentcolor; + } } } diff --git a/packages/edit-site/src/components/page-patterns/use-patterns.js b/packages/edit-site/src/components/page-patterns/use-patterns.js index a394aabf572c4..295d1eee8e410 100644 --- a/packages/edit-site/src/components/page-patterns/use-patterns.js +++ b/packages/edit-site/src/components/page-patterns/use-patterns.js @@ -31,7 +31,9 @@ const templatePartToPattern = ( templatePart ) => ( { blocks: parse( templatePart.content.raw ), categories: [ templatePart.area ], description: templatePart.description || '', + isCustom: templatePart.source === 'custom', keywords: templatePart.keywords || [], + id: createTemplatePartId( templatePart.theme, templatePart.slug ), name: createTemplatePartId( templatePart.theme, templatePart.slug ), title: templatePart.title.rendered, type: templatePart.type, From 6331cbf28efa0f994ffb72c604164544eb89414e Mon Sep 17 00:00:00 2001 From: Peter Wilson <519727+peterwilsoncc@users.noreply.github.com> Date: Fri, 7 Jul 2023 18:08:31 +1000 Subject: [PATCH 086/146] Fix admin_url() for preview link of block themes. (#52399) --- lib/compat/wordpress-6.3/theme-previews.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compat/wordpress-6.3/theme-previews.php b/lib/compat/wordpress-6.3/theme-previews.php index eab05c5824b1f..31d684c17cf2a 100644 --- a/lib/compat/wordpress-6.3/theme-previews.php +++ b/lib/compat/wordpress-6.3/theme-previews.php @@ -88,7 +88,7 @@ function addLivePreviewButton() { livePreviewButton.setAttribute('class', 'button button-primary'); livePreviewButton.setAttribute( 'href', - `/wp-admin/site-editor.php?wp_theme_preview=${themePath}&return=themes.php` + `?wp_theme_preview=${themePath}&return=themes.php` ); livePreviewButton.innerHTML = ''; themeInfo.querySelector('.theme-actions').appendChild(livePreviewButton); From 6ca7fcb423c2dfd5fe70691d651806af1472555a Mon Sep 17 00:00:00 2001 From: Bernie Reiter <96308+ockham@users.noreply.github.com> Date: Fri, 7 Jul 2023 10:54:29 +0200 Subject: [PATCH 087/146] Post and Comment Template blocks: Change render_block_context priority to 1 (#52364) --- packages/block-library/src/comment-template/index.php | 7 +++++-- packages/block-library/src/post-template/index.php | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/block-library/src/comment-template/index.php b/packages/block-library/src/comment-template/index.php index 3a553e802de0e..bb1cfa474e4c3 100644 --- a/packages/block-library/src/comment-template/index.php +++ b/packages/block-library/src/comment-template/index.php @@ -35,8 +35,11 @@ function block_core_comment_template_render_comments( $comments, $block ) { * We set commentId context through the `render_block_context` filter so * that dynamically inserted blocks (at `render_block` filter stage) * will also receive that context. + * + * Use an early priority to so that other 'render_block_context' filters + * have access to the values. */ - add_filter( 'render_block_context', $filter_block_context ); + add_filter( 'render_block_context', $filter_block_context, 1 ); /* * We construct a new WP_Block instance from the parsed block so that @@ -44,7 +47,7 @@ function block_core_comment_template_render_comments( $comments, $block ) { */ $block_content = ( new WP_Block( $block->parsed_block ) )->render( array( 'dynamic' => false ) ); - remove_filter( 'render_block_context', $filter_block_context ); + remove_filter( 'render_block_context', $filter_block_context, 1 ); $children = $comment->get_children(); diff --git a/packages/block-library/src/post-template/index.php b/packages/block-library/src/post-template/index.php index 3c023c80ed263..b1499d845f39a 100644 --- a/packages/block-library/src/post-template/index.php +++ b/packages/block-library/src/post-template/index.php @@ -97,11 +97,13 @@ function render_block_core_post_template( $attributes, $content, $block ) { $context['postId'] = $post_id; return $context; }; - add_filter( 'render_block_context', $filter_block_context ); + + // Use an early priority to so that other 'render_block_context' filters have access to the values. + add_filter( 'render_block_context', $filter_block_context, 1 ); // Render the inner blocks of the Post Template block with `dynamic` set to `false` to prevent calling // `render_callback` and ensure that no wrapper markup is included. $block_content = ( new WP_Block( $block_instance ) )->render( array( 'dynamic' => false ) ); - remove_filter( 'render_block_context', $filter_block_context ); + remove_filter( 'render_block_context', $filter_block_context, 1 ); // Wrap the render inner blocks in a `li` element with the appropriate post classes. $post_classes = implode( ' ', get_post_class( 'wp-block-post' ) ); From 667fa36241abb219170098e06c72536e257dab95 Mon Sep 17 00:00:00 2001 From: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com> Date: Fri, 7 Jul 2023 19:01:21 +1000 Subject: [PATCH 088/146] Patterns: Update manage pattern links to go to site editor if available (#52403) --- packages/edit-post/src/plugins/index.js | 40 ++++++++++--- .../reusable-blocks-manage-button.js | 59 +++++++++++-------- 2 files changed, 67 insertions(+), 32 deletions(-) diff --git a/packages/edit-post/src/plugins/index.js b/packages/edit-post/src/plugins/index.js index e3bd1b2dd72bd..1cd03debbf7a7 100644 --- a/packages/edit-post/src/plugins/index.js +++ b/packages/edit-post/src/plugins/index.js @@ -2,6 +2,9 @@ * WordPress dependencies */ import { MenuItem, VisuallyHidden } from '@wordpress/components'; +import { store as coreStore } from '@wordpress/core-data'; +import { store as editorStore } from '@wordpress/editor'; +import { useSelect } from '@wordpress/data'; import { external } from '@wordpress/icons'; import { __ } from '@wordpress/i18n'; import { registerPlugin } from '@wordpress/plugins'; @@ -15,6 +18,34 @@ import KeyboardShortcutsHelpMenuItem from './keyboard-shortcuts-help-menu-item'; import ToolsMoreMenuGroup from '../components/header/tools-more-menu-group'; import WelcomeGuideMenuItem from './welcome-guide-menu-item'; +function ManagePatternsMenuItem() { + const url = useSelect( ( select ) => { + const { canUser } = select( coreStore ); + const { getEditorSettings } = select( editorStore ); + + const isBlockTheme = getEditorSettings().__unstableIsBlockBasedTheme; + const defaultUrl = addQueryArgs( 'edit.php', { + post_type: 'wp_block', + } ); + const patternsUrl = addQueryArgs( 'site-editor.php', { + path: '/patterns', + } ); + + // The site editor and templates both check whether the user has + // edit_theme_options capabilities. We can leverage that here and not + // display the manage patterns link if the user can't access it. + return canUser( 'read', 'templates' ) && isBlockTheme + ? patternsUrl + : defaultUrl; + }, [] ); + + return ( + + { __( 'Manage Patterns' ) } + + ); +} + registerPlugin( 'edit-post', { render() { return ( @@ -22,14 +53,7 @@ registerPlugin( 'edit-post', { { ( { onClose } ) => ( <> - - { __( 'Manage Patterns' ) } - + diff --git a/packages/reusable-blocks/src/components/reusable-blocks-menu-items/reusable-blocks-manage-button.js b/packages/reusable-blocks/src/components/reusable-blocks-menu-items/reusable-blocks-manage-button.js index 6f33905888511..e3bbef8bf7738 100644 --- a/packages/reusable-blocks/src/components/reusable-blocks-menu-items/reusable-blocks-manage-button.js +++ b/packages/reusable-blocks/src/components/reusable-blocks-menu-items/reusable-blocks-manage-button.js @@ -18,28 +18,41 @@ import { store as coreStore } from '@wordpress/core-data'; import { store as reusableBlocksStore } from '../../store'; function ReusableBlocksManageButton( { clientId } ) { - const { canRemove, isVisible, innerBlockCount } = useSelect( - ( select ) => { - const { getBlock, canRemoveBlock, getBlockCount } = - select( blockEditorStore ); - const { canUser } = select( coreStore ); - const reusableBlock = getBlock( clientId ); + const { canRemove, isVisible, innerBlockCount, managePatternsUrl } = + useSelect( + ( select ) => { + const { getBlock, canRemoveBlock, getBlockCount, getSettings } = + select( blockEditorStore ); + const { canUser } = select( coreStore ); + const reusableBlock = getBlock( clientId ); + const isBlockTheme = getSettings().__unstableIsBlockBasedTheme; - return { - canRemove: canRemoveBlock( clientId ), - isVisible: - !! reusableBlock && - isReusableBlock( reusableBlock ) && - !! canUser( - 'update', - 'blocks', - reusableBlock.attributes.ref - ), - innerBlockCount: getBlockCount( clientId ), - }; - }, - [ clientId ] - ); + return { + canRemove: canRemoveBlock( clientId ), + isVisible: + !! reusableBlock && + isReusableBlock( reusableBlock ) && + !! canUser( + 'update', + 'blocks', + reusableBlock.attributes.ref + ), + innerBlockCount: getBlockCount( clientId ), + // The site editor and templates both check whether the user + // has edit_theme_options capabilities. We can leverage that here + // and omit the manage patterns link if the user can't access it. + managePatternsUrl: + isBlockTheme && canUser( 'read', 'templates' ) + ? addQueryArgs( 'site-editor.php', { + path: '/patterns', + } ) + : addQueryArgs( 'edit.php', { + post_type: 'wp_block', + } ), + }; + }, + [ clientId ] + ); const { __experimentalConvertBlockToStatic: convertBlockToStatic } = useDispatch( reusableBlocksStore ); @@ -50,9 +63,7 @@ function ReusableBlocksManageButton( { clientId } ) { return ( - + { __( 'Manage Patterns' ) } { canRemove && ( From 7ff201c659f133aa911661b9635731de8bfcd845 Mon Sep 17 00:00:00 2001 From: Marin Atanasov <8436925+tyxla@users.noreply.github.com> Date: Fri, 7 Jul 2023 12:59:44 +0300 Subject: [PATCH 089/146] Lodash: Refactor away from _.set() in PushChangesToGlobalStylesControl (#52404) --- .../core-data/src/utils/set-nested-value.js | 2 + .../push-changes-to-global-styles/index.js | 50 +++++++++++++++++-- 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/packages/core-data/src/utils/set-nested-value.js b/packages/core-data/src/utils/set-nested-value.js index cb7db8a04b4b0..e90bf23e4dad8 100644 --- a/packages/core-data/src/utils/set-nested-value.js +++ b/packages/core-data/src/utils/set-nested-value.js @@ -10,6 +10,8 @@ * * @see https://lodash.com/docs/4.17.15#set * + * @todo Needs to be deduplicated with its copy in `@wordpress/edit-site`. + * * @param {Object} object Object to modify * @param {Array} path Path of the property to set. * @param {*} value Value to set. diff --git a/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js b/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js index d82f3a86847da..ab2487e76f191 100644 --- a/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js +++ b/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js @@ -1,7 +1,7 @@ /** * External dependencies */ -import { get, set } from 'lodash'; +import { get } from 'lodash'; /** * WordPress dependencies @@ -119,6 +119,46 @@ function useChangesToPush( name, attributes ) { ); } +/** + * Sets the value at path of object. + * If a portion of path doesn’t exist, it’s created. + * Arrays are created for missing index properties while objects are created + * for all other missing properties. + * + * This function intentionally mutates the input object. + * + * Inspired by _.set(). + * + * @see https://lodash.com/docs/4.17.15#set + * + * @todo Needs to be deduplicated with its copy in `@wordpress/core-data`. + * + * @param {Object} object Object to modify + * @param {Array} path Path of the property to set. + * @param {*} value Value to set. + */ +function setNestedValue( object, path, value ) { + if ( ! object || typeof object !== 'object' ) { + return object; + } + + path.reduce( ( acc, key, idx ) => { + if ( acc[ key ] === undefined ) { + if ( Number.isInteger( path[ idx + 1 ] ) ) { + acc[ key ] = []; + } else { + acc[ key ] = {}; + } + } + if ( idx === path.length - 1 ) { + acc[ key ] = value; + } + return acc[ key ]; + }, object ); + + return object; +} + function cloneDeep( object ) { return ! object ? {} : JSON.parse( JSON.stringify( object ) ); } @@ -148,8 +188,12 @@ function PushChangesToGlobalStylesControl( { const newUserConfig = cloneDeep( userConfig ); for ( const { path, value } of changes ) { - set( newBlockStyles, path, undefined ); - set( newUserConfig, [ 'styles', 'blocks', name, ...path ], value ); + setNestedValue( newBlockStyles, path, undefined ); + setNestedValue( + newUserConfig, + [ 'styles', 'blocks', name, ...path ], + value + ); } // @wordpress/core-data doesn't support editing multiple entity types in From 2118e66ee96afa8bb411037a258b3059a7257f65 Mon Sep 17 00:00:00 2001 From: Marin Atanasov <8436925+tyxla@users.noreply.github.com> Date: Fri, 7 Jul 2023 13:13:23 +0300 Subject: [PATCH 090/146] Edit Site: Add delay and fade-in animation to loading spinner (#51902) * Edit Site: Add delay and fade-in animation to loading spinner * Increase delay a bit * Further increase delay to 1s --- .../src/components/canvas-spinner/style.scss | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/edit-site/src/components/canvas-spinner/style.scss b/packages/edit-site/src/components/canvas-spinner/style.scss index 2f0626b80363f..22b1b85625742 100644 --- a/packages/edit-site/src/components/canvas-spinner/style.scss +++ b/packages/edit-site/src/components/canvas-spinner/style.scss @@ -2,10 +2,24 @@ width: 100%; height: 100%; display: flex; + opacity: 0; align-items: center; justify-content: center; + animation: 0.5s ease 1s edit-site-canvas-spinner__fade-in-animation; + animation-fill-mode: forwards; + @include reduce-motion("animation"); + circle { stroke: rgba($black, 0.3); } } + +@keyframes edit-site-canvas-spinner__fade-in-animation { + from { + opacity: 0; + } + to { + opacity: 1; + } +} From 7b334ff38ade601c41a49e4bba8034501c6b0926 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Fri, 7 Jul 2023 14:02:17 +0200 Subject: [PATCH 091/146] Make `query` optional in `visitAdminPage` (#52413) --- .../e2e-test-utils-playwright/src/admin/visit-admin-page.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/e2e-test-utils-playwright/src/admin/visit-admin-page.ts b/packages/e2e-test-utils-playwright/src/admin/visit-admin-page.ts index 60aec50837694..1ffb20c6cc3f8 100644 --- a/packages/e2e-test-utils-playwright/src/admin/visit-admin-page.ts +++ b/packages/e2e-test-utils-playwright/src/admin/visit-admin-page.ts @@ -18,7 +18,7 @@ import type { Admin } from './'; export async function visitAdminPage( this: Admin, adminPath: string, - query: string + query?: string ) { await this.page.goto( join( 'wp-admin', adminPath ) + ( query ? `?${ query }` : '' ) From cec1fc3f628dac0403e68a90966c5cc1a30b2c87 Mon Sep 17 00:00:00 2001 From: Andrei Draganescu Date: Fri, 7 Jul 2023 16:32:15 +0300 Subject: [PATCH 092/146] make the body of the editor minimmum viewport height so that smaller contents maintain clickability (#52406) --- packages/edit-site/src/components/block-editor/editor-canvas.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/edit-site/src/components/block-editor/editor-canvas.js b/packages/edit-site/src/components/block-editor/editor-canvas.js index 34c23cc699bc2..a8bbe75e0261b 100644 --- a/packages/edit-site/src/components/block-editor/editor-canvas.js +++ b/packages/edit-site/src/components/block-editor/editor-canvas.js @@ -88,7 +88,7 @@ function EditorCanvas( { enableResizing, settings, children, ...props } ) { enableResizing ? 'min-height:0!important;' : '' }}body{position:relative; ${ canvasMode === 'view' - ? 'cursor: pointer; height: 100vh' + ? 'cursor: pointer; min-height: 100vh;' : '' }}}` } From ae5cc08fe0f352c5e0b914ca741a8433e18a4e6e Mon Sep 17 00:00:00 2001 From: Carolina Nymark Date: Fri, 7 Jul 2023 15:44:10 +0200 Subject: [PATCH 093/146] Fix: Patterns & template parts: remove "apply globally" option from block settings (#52160) * Advanced styles panel: add an early return * Update index.js * Minor styling changes * Use array of features --------- Co-authored-by: George Mamadashvili --- .../src/hooks/push-changes-to-global-styles/index.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js b/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js index ab2487e76f191..4e7b671a0c260 100644 --- a/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js +++ b/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js @@ -18,6 +18,7 @@ import { __, sprintf } from '@wordpress/i18n'; import { __EXPERIMENTAL_STYLE_PROPERTY as STYLE_PROPERTY, getBlockType, + hasBlockSupport, } from '@wordpress/blocks'; import { useContext, useMemo, useCallback } from '@wordpress/element'; import { useDispatch } from '@wordpress/data'; @@ -93,6 +94,8 @@ const STYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE = { 'typography.fontFamily': 'fontFamily', }; +const SUPPORTED_STYLES = [ 'border', 'color', 'spacing', 'typography' ]; + function useChangesToPush( name, attributes ) { const supports = useSupportedStyles( name ); @@ -256,10 +259,14 @@ function PushChangesToGlobalStylesControl( { const withPushChangesToGlobalStyles = createHigherOrderComponent( ( BlockEdit ) => ( props ) => { const blockEditingMode = useBlockEditingMode(); + const supportsStyles = SUPPORTED_STYLES.some( ( feature ) => + hasBlockSupport( props.name, feature ) + ); + return ( <> - { blockEditingMode === 'default' && ( + { blockEditingMode === 'default' && supportsStyles && ( From f093a91b5c432f94da209dbf31c2d23897377497 Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Fri, 7 Jul 2023 15:14:53 +0100 Subject: [PATCH 094/146] Top Toolbar: Move the preferences selection into the main useSelect (#52332) * Top Toolbar: Move the preferences selection into the main useSelect * also consolidate selectors for header mode * also update the other uses of the preferences store --- .../components/header/header-toolbar/index.js | 5 +++-- .../src/components/header-edit-mode/index.js | 18 +++++++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/packages/edit-post/src/components/header/header-toolbar/index.js b/packages/edit-post/src/components/header/header-toolbar/index.js index 8f9e413707d50..bcb8180427291 100644 --- a/packages/edit-post/src/components/header/header-toolbar/index.js +++ b/packages/edit-post/src/components/header/header-toolbar/index.js @@ -37,8 +37,6 @@ function HeaderToolbar() { const inserterButton = useRef(); const { setIsInserterOpened, setIsListViewOpened } = useDispatch( editPostStore ); - const { get: getPreference } = useSelect( preferencesStore ); - const hasFixedToolbar = getPreference( 'core/edit-post', 'fixedToolbar' ); const { isInserterEnabled, isInserterOpened, @@ -46,6 +44,7 @@ function HeaderToolbar() { showIconLabels, isListViewOpen, listViewShortcut, + hasFixedToolbar, } = useSelect( ( select ) => { const { hasInserterItems, getBlockRootClientId, getBlockSelectionEnd } = select( blockEditorStore ); @@ -53,6 +52,7 @@ function HeaderToolbar() { const { getEditorMode, isFeatureActive, isListViewOpened } = select( editPostStore ); const { getShortcutRepresentation } = select( keyboardShortcutsStore ); + const { get: getPreference } = select( preferencesStore ); return { // This setting (richEditingEnabled) should not live in the block editor's setting. @@ -69,6 +69,7 @@ function HeaderToolbar() { listViewShortcut: getShortcutRepresentation( 'core/edit-post/toggle-list-view' ), + hasFixedToolbar: getPreference( 'core/edit-post', 'fixedToolbar' ), }; }, [] ); diff --git a/packages/edit-site/src/components/header-edit-mode/index.js b/packages/edit-site/src/components/header-edit-mode/index.js index b8d3b6e4cc255..40ffc805565e6 100644 --- a/packages/edit-site/src/components/header-edit-mode/index.js +++ b/packages/edit-site/src/components/header-edit-mode/index.js @@ -66,6 +66,7 @@ export default function HeaderEditMode() { homeUrl, showIconLabels, editorCanvasView, + hasFixedToolbar, } = useSelect( ( select ) => { const { __experimentalGetPreviewDeviceType, @@ -83,6 +84,8 @@ export default function HeaderEditMode() { getUnstableBase, // Site index. } = select( coreStore ); + const { get: getPreference } = select( preferencesStore ); + return { deviceType: __experimentalGetPreviewDeviceType(), templateType: postType, @@ -94,23 +97,24 @@ export default function HeaderEditMode() { isVisualMode: getEditorMode() === 'visual', blockEditorMode: __unstableGetEditorMode(), homeUrl: getUnstableBase()?.home, - showIconLabels: select( preferencesStore ).get( - 'core/edit-site', + showIconLabels: getPreference( + editSiteStore.name, 'showIconLabels' ), editorCanvasView: unlock( select( editSiteStore ) ).getEditorCanvasContainerView(), - isDistractionFree: select( preferencesStore ).get( - 'core/edit-site', + isDistractionFree: getPreference( + editSiteStore.name, 'distractionFree' ), + hasFixedToolbar: getPreference( + editSiteStore.name, + 'fixedToolbar' + ), }; }, [] ); - const { get: getPreference } = useSelect( preferencesStore ); - const hasFixedToolbar = getPreference( editSiteStore.name, 'fixedToolbar' ); - const { __experimentalSetPreviewDeviceType: setPreviewDeviceType, setIsInserterOpened, From 66e8da17bbb3b3039e9910f54618f6cff202ebec Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Fri, 7 Jul 2023 15:49:54 +0100 Subject: [PATCH 095/146] Fix renaming in Site View sidebar rename saves all edits for Template Parts and Navigation Menus (#52373) * Use action to save specific edits to title only * Fix action to update specified record * Compute correct recordKey based on entity config * Fix identical bug with Template Parts * Update packages/edit-site/src/components/template-actions/rename-menu-item.js --------- Co-authored-by: Ben Dwyer --- packages/core-data/src/actions.js | 16 +++++++++++++++ .../use-navigation-menu-handlers.js | 20 ++++++++++++++----- .../template-actions/rename-menu-item.js | 13 ++++++++---- 3 files changed, 40 insertions(+), 9 deletions(-) diff --git a/packages/core-data/src/actions.js b/packages/core-data/src/actions.js index 2170e3ffcb4ae..7d3bffef59b8f 100644 --- a/packages/core-data/src/actions.js +++ b/packages/core-data/src/actions.js @@ -789,6 +789,22 @@ export const __experimentalSaveSpecifiedEntityEdits = editsToSave[ edit ] = edits[ edit ]; } } + + const configs = await dispatch( getOrLoadEntitiesConfig( kind ) ); + const entityConfig = configs.find( + ( config ) => config.kind === kind && config.name === name + ); + + const entityIdKey = entityConfig?.key || DEFAULT_ENTITY_KEY; + + // If a record key is provided then update the existing record. + // This necessitates providing `recordKey` to saveEntityRecord as part of the + // `record` argument (here called `editsToSave`) to stop that action creating + // a new record and instead cause it to update the existing record. + if ( recordId ) { + editsToSave[ entityIdKey ] = recordId; + } + return await dispatch.saveEntityRecord( kind, name, diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js b/packages/edit-site/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js index 81d4cad95e309..c7dbf919324f6 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +++ b/packages/edit-site/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js @@ -65,8 +65,10 @@ function useSaveNavigationMenu() { }; }, [] ); - const { editEntityRecord, saveEditedEntityRecord } = - useDispatch( coreStore ); + const { + editEntityRecord, + __experimentalSaveSpecifiedEntityEdits: saveSpecifiedEntityEdits, + } = useDispatch( coreStore ); const { createSuccessNotice, createErrorNotice } = useDispatch( noticesStore ); @@ -87,11 +89,19 @@ function useSaveNavigationMenu() { // Apply the edits. editEntityRecord( 'postType', postType, postId, edits ); + const recordPropertiesToSave = Object.keys( edits ); + // Attempt to persist. try { - await saveEditedEntityRecord( 'postType', postType, postId, { - throwOnError: true, - } ); + await saveSpecifiedEntityEdits( + 'postType', + postType, + postId, + recordPropertiesToSave, + { + throwOnError: true, + } + ); createSuccessNotice( __( 'Renamed Navigation menu' ), { type: 'snackbar', } ); diff --git a/packages/edit-site/src/components/template-actions/rename-menu-item.js b/packages/edit-site/src/components/template-actions/rename-menu-item.js index dec7f0bc8bf7d..cee30e64e99f2 100644 --- a/packages/edit-site/src/components/template-actions/rename-menu-item.js +++ b/packages/edit-site/src/components/template-actions/rename-menu-item.js @@ -19,8 +19,10 @@ export default function RenameMenuItem( { template, onClose } ) { const [ title, setTitle ] = useState( () => template.title.rendered ); const [ isModalOpen, setIsModalOpen ] = useState( false ); - const { editEntityRecord, saveEditedEntityRecord } = - useDispatch( coreStore ); + const { + editEntityRecord, + __experimentalSaveSpecifiedEntityEdits: saveSpecifiedEntityEdits, + } = useDispatch( coreStore ); const { createSuccessNotice, createErrorNotice } = useDispatch( noticesStore ); @@ -42,11 +44,14 @@ export default function RenameMenuItem( { template, onClose } ) { onClose(); // Persist edited entity. - await saveEditedEntityRecord( + await saveSpecifiedEntityEdits( 'postType', template.type, template.id, - { throwOnError: true } + [ 'title' ], // Only save title to avoid persisting other edits. + { + throwOnError: true, + } ); createSuccessNotice( __( 'Entity renamed.' ), { From dc472d5806bc336b5dc47c836754dbe0529791e3 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Fri, 7 Jul 2023 19:07:01 +0400 Subject: [PATCH 096/146] Patterns: Enable focus mode editing (#52427) --- packages/edit-site/src/components/block-editor/constants.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/edit-site/src/components/block-editor/constants.js b/packages/edit-site/src/components/block-editor/constants.js index 9f076eea1ca31..ed88c3e14c947 100644 --- a/packages/edit-site/src/components/block-editor/constants.js +++ b/packages/edit-site/src/components/block-editor/constants.js @@ -1 +1,5 @@ -export const FOCUSABLE_ENTITIES = [ 'wp_template_part', 'wp_navigation' ]; +export const FOCUSABLE_ENTITIES = [ + 'wp_template_part', + 'wp_navigation', + 'wp_block', +]; From b4daf92750381ff14776b049db5e34f92d832fe6 Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Fri, 7 Jul 2023 11:16:58 -0400 Subject: [PATCH 097/146] test: Enable jest-watch-typeahead for native tests (#51869) * test: Enable `jest-watch-typeahead` for native tests Allow filtering test by file or test name while in watch mode. This matches existing configuration for the web tests. * test: Refactor Jest configuration to fix file name filter regex Previously, Jest was executed from within a nested directory. Doing so caused the regex patterns used for the `jest-watch-typeahead` to break, as the `../../` would be erroneously included in the file name. --- .github/workflows/unit-test.yml | 2 +- .gitignore | 2 +- .../getting-started-react-native.md | 4 +- .../code/react-native/osx-setup-guide.md | 2 +- docs/contributors/code/testing-overview.md | 2 +- package.json | 6 +++ packages/react-native-editor/package.json | 6 --- test/native/jest.config.js | 47 ++++++++++++------- 8 files changed, 42 insertions(+), 29 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index e222083a160e9..09494f0d514ad 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -296,4 +296,4 @@ jobs: run: npx lerna run build - name: Running the tests - run: npm run native test -- --ci --maxWorkers=2 --cacheDirectory="$HOME/.jest-cache" + run: npm run test:native -- --ci --maxWorkers=2 --cacheDirectory="$HOME/.jest-cache" diff --git a/.gitignore b/.gitignore index 19e43aecea7b8..b44eabe00cccc 100644 --- a/.gitignore +++ b/.gitignore @@ -35,7 +35,7 @@ yarn.lock Thumbs.db # Report generated from jest-junit -test/native/junit.xml +junit.xml # Local overrides .wp-env.override.json diff --git a/docs/contributors/code/react-native/getting-started-react-native.md b/docs/contributors/code/react-native/getting-started-react-native.md index 96338af7a6f2f..9b8ae44f0d8b1 100644 --- a/docs/contributors/code/react-native/getting-started-react-native.md +++ b/docs/contributors/code/react-native/getting-started-react-native.md @@ -89,7 +89,7 @@ One of the extensions we are using is the [React Native Tools](https://marketpla Use the following command to run the test suite: ```sh -npm run native test +npm run test:native ``` It will run the [jest](https://github.com/facebook/jest) test runner on your tests. The tests are running on the desktop against Node.js. @@ -97,7 +97,7 @@ It will run the [jest](https://github.com/facebook/jest) test runner on your tes To run the tests with debugger support, start it with the following CLI command: ```sh -npm run native test:debug +npm run test:native:debug ``` Then, open `chrome://inspect` in Chrome to attach the debugger (look into the "Remote Target" section). While testing/developing, feel free to sprinkle `debugger` statements anywhere in the code that you'd like the debugger to break. diff --git a/docs/contributors/code/react-native/osx-setup-guide.md b/docs/contributors/code/react-native/osx-setup-guide.md index 5d6d4603e4959..dab5f33448b74 100644 --- a/docs/contributors/code/react-native/osx-setup-guide.md +++ b/docs/contributors/code/react-native/osx-setup-guide.md @@ -212,7 +212,7 @@ After a bit of a wait, we’ll see something like this: ## Unit Tests ```sh -npm run native test +npm run test:native ``` ## Integration Tests diff --git a/docs/contributors/code/testing-overview.md b/docs/contributors/code/testing-overview.md index 42704be233b9b..946aec8cd70e3 100644 --- a/docs/contributors/code/testing-overview.md +++ b/docs/contributors/code/testing-overview.md @@ -497,7 +497,7 @@ Part of the unit-tests suite is a set of Jest tests run exercise native-mobile c To locally run the tests in debug mode, follow these steps: 0. Make sure you have ran `npm ci` to install all the packages -1. Run `npm run native test:debug` inside the Gutenberg root folder, on the CLI. Node is now waiting for the debugger to connect. +1. Run `npm run test:native:debug` inside the Gutenberg root folder, on the CLI. Node is now waiting for the debugger to connect. 2. Open `chrome://inspect` in Chrome 3. Under the "Remote Target" section, look for a `../../node_modules/.bin/jest` target and click on the "inspect" link. That will open a new window with the Chrome DevTools debugger attached to the process and stopped at the beginning of the `jest.js` file. Alternatively, if the targets are not visible, click on the `Open dedicated DevTools for Node` link in the same page. 4. You can place breakpoints or `debugger;` statements throughout the code, including the tests code, to stop and inspect diff --git a/package.json b/package.json index 12d7d4ae6e64e..f95417f61b35e 100644 --- a/package.json +++ b/package.json @@ -311,6 +311,12 @@ "test:e2e:playwright": "playwright test --config test/e2e/playwright.config.ts", "test:e2e:storybook": "playwright test --config test/storybook-playwright/playwright.config.ts", "test:e2e:watch": "npm run test:e2e -- --watch", + "test:native": "cross-env NODE_ENV=test jest --verbose --config test/native/jest.config.js", + "test:native:clean": "jest --clearCache --config test/native/jest.config.js; rm -rf $TMPDIR/jest_*", + "test:native:debug": "cross-env NODE_ENV=test node --inspect-brk node_modules/.bin/jest --runInBand --verbose --config test/native/jest.config.js", + "test:native:perf": "cross-env TEST_RUNNER_ARGS='--runInBand --config test/native/jest.config.js --testMatch \"**/performance/*.native.[jt]s?(x)\" --verbose' reassure", + "test:native:perf:baseline": "cross-env TEST_RUNNER_ARGS='--runInBand --config test/native/jest.config.js --testMatch \"**/performance/*.native.[jt]s?(x)\" --verbose' reassure --baseline --testMatch \"**/performance/*.native.[jt]s?(x)\"", + "test:native:update": "npm run test:native -- --updateSnapshot", "test:performance": "wp-scripts test-e2e --config packages/e2e-tests/jest.performance.config.js", "test:performance:debug": "wp-scripts --inspect-brk test-e2e --runInBand --no-cache --verbose --config packages/e2e-tests/jest.performance.config.js --puppeteer-devtools", "test:performance:playwright": "playwright test --config test/performance/playwright.config.ts", diff --git a/packages/react-native-editor/package.json b/packages/react-native-editor/package.json index 4034ada7699ca..ceb39c10b0c3c 100644 --- a/packages/react-native-editor/package.json +++ b/packages/react-native-editor/package.json @@ -103,11 +103,6 @@ "preios:xcode10": "cd ../../node_modules/react-native && ./scripts/ios-install-third-party.sh && cd third-party/glog-0.3.5 && [ -f libglog.pc ] || ../../scripts/ios-configure-glog.sh", "ios": "react-native run-ios", "ios:fast": "react-native run-ios", - "test": "cross-env NODE_ENV=test jest --verbose --config ../../test/native/jest.config.js", - "test:debug": "cross-env NODE_ENV=test node --inspect-brk ../../node_modules/.bin/jest --runInBand --verbose --config ../../test/native/jest.config.js", - "test:update": "npm run test -- --updateSnapshot", - "test:perf": "cross-env NODE_ENV=test TEST_RUNNER_PATH=../../node_modules/.bin/jest TEST_RUNNER_ARGS='--runInBand --testMatch \"**/performance/*.native.[jt]s?(x)\" --verbose --config ../../test/native/jest.config.js' reassure", - "test:perf:baseline": "cross-env NODE_ENV=test TEST_RUNNER_PATH=../../node_modules/.bin/jest TEST_RUNNER_ARGS='--runInBand --testMatch \"**/performance/*.native.[jt]s?(x)\" --verbose --config ../../test/native/jest.config.js' reassure --baseline", "device-tests": "cross-env NODE_ENV=test jest --forceExit --detectOpenHandles --no-cache --maxWorkers=3 --testPathIgnorePatterns='canary|gutenberg-editor-rendering' --verbose --config ./jest_ui.config.js", "device-tests-canary": "cross-env NODE_ENV=test jest --forceExit --detectOpenHandles --no-cache --maxWorkers=2 --testPathPattern=@canary --verbose --config ./jest_ui.config.js", "device-tests:local": "cross-env NODE_ENV=test jest --runInBand --detectOpenHandles --verbose --forceExit --config ./jest_ui.config.js", @@ -126,7 +121,6 @@ "clean:aztec": "cd ../react-native-aztec && npm run clean", "clean:haste": "rm -rf $TMPDIR/haste-map-metro-*", "clean:install": "npm run clean; npm install", - "clean:jest": "jest --clearCache --config ../../test/native/jest.config.js; rm -rf $TMPDIR/jest_*", "clean:metro": "rm -rf $TMPDIR/metro-cache/", "clean:watchman": "command -v watchman >/dev/null 2>&1 && watchman watch-del-all; true", "clean:babel-cache": "rm -rf ../../node_modules/.cache/babel-loader/*", diff --git a/test/native/jest.config.js b/test/native/jest.config.js index 22bd62065ca7d..1e6031ee89c77 100644 --- a/test/native/jest.config.js +++ b/test/native/jest.config.js @@ -2,6 +2,7 @@ * External dependencies */ const glob = require( 'glob' ).sync; +const path = require( 'path' ); const defaultPlatform = 'android'; const rnPlatform = process.env.TEST_RN_PLATFORM || defaultPlatform; @@ -13,51 +14,59 @@ if ( process.env.TEST_RN_PLATFORM ) { console.log( 'Setting RN platform to: default (' + defaultPlatform + ')' ); } -const transpiledPackageNames = glob( '../../packages/*/src/index.{js,ts}' ).map( - ( fileName ) => fileName.split( '/' )[ 3 ] +const transpiledPackageNames = glob( 'packages/*/src/index.{js,ts}' ).map( + ( fileName ) => fileName.split( '/' )[ 1 ] ); module.exports = { verbose: true, - rootDir: '.', - roots: [ '/../..' ], + rootDir: '../../', // Automatically clear mock calls and instances between every test. clearMocks: true, preset: 'react-native', - setupFiles: [ '/setup.js' ], - setupFilesAfterEnv: [ '/setup-after-env.js' ], + setupFiles: [ '/test/native/setup.js' ], + setupFilesAfterEnv: [ '/test/native/setup-after-env.js' ], testMatch: [ - '/../../test/**/*.native.[jt]s?(x)', - '/../../**/test/!(helper)*.native.[jt]s?(x)', - '/../../packages/react-native-*/**/?(*.)+(spec|test).[jt]s?(x)', + '/test/**/*.native.[jt]s?(x)', + '/**/test/!(helper)*.native.[jt]s?(x)', + '/packages/react-native-*/**/?(*.)+(spec|test).[jt]s?(x)', ], testPathIgnorePatterns: [ '/node_modules/', '/__device-tests__/' ], testEnvironmentOptions: { url: 'http://localhost/', }, - resolver: '/../../test/unit/scripts/resolver.js', + resolver: '/test/unit/scripts/resolver.js', // Add the `Libraries/Utilities` subfolder to the module directories, otherwise haste/jest doesn't find Platform.js on Travis, // and add it first so https://github.com/facebook/react-native/blob/v0.60.0/Libraries/react-native/react-native-implementation.js#L324-L326 doesn't pick up the Platform npm module. moduleDirectories: [ - '../../node_modules/react-native/Libraries/Utilities', - '../../node_modules', + 'node_modules/react-native/Libraries/Utilities', + 'node_modules', ], moduleNameMapper: { // Mock the CSS modules. See https://facebook.github.io/jest/docs/en/webpack.html#handling-static-assets - '\\.(scss)$': '/__mocks__/styleMock.js', + '\\.(scss)$': '/test/native/__mocks__/styleMock.js', '\\.(eot|otf|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': - '/__mocks__/fileMock.js', + '/test/native/__mocks__/fileMock.js', [ `@wordpress\\/(${ transpiledPackageNames.join( '|' ) })$` ]: - '/../../packages/$1/src', - 'test/helpers$': '/../../test/native/helpers.js', + '/packages/$1/src', + 'test/helpers$': '/test/native/helpers.js', }, modulePathIgnorePatterns: [ - '/../../packages/react-native-editor/node_modules', + '/packages/react-native-editor/node_modules', ], haste: { defaultPlatform: rnPlatform, platforms: [ 'android', 'ios', 'native' ], }, + transform: { + '\\.[jt]sx?$': [ + 'babel-jest', + // https://git.io/JYiYc + { + configFile: path.resolve( __dirname, 'babel.config.js' ), + }, + ], + }, transformIgnorePatterns: [ // This is required for now to have jest transform some of our modules // See: https://github.com/wordpress-mobile/gutenberg-mobile/pull/257#discussion_r234978268 @@ -71,4 +80,8 @@ module.exports = { printBasicPrototype: false, }, reporters: [ 'default', 'jest-junit' ], + watchPlugins: [ + 'jest-watch-typeahead/filename', + 'jest-watch-typeahead/testname', + ], }; From 5b61016fe4ce2c6902d894375466e231c6c5fa01 Mon Sep 17 00:00:00 2001 From: Derek Blank Date: Sat, 8 Jul 2023 01:18:56 +1000 Subject: [PATCH 098/146] [RNMobile] Update native BlockOutline component styles (#51222) * Remove BlockOutline * Remove outline from post title * Update PostTitle padding * Reduce vertical margin for native blocks * Reimplement BlockOutline component * Remove solid border styles from BlockOutline * Reimplement dashed border styles * Update CHANGELOG * Update Editor Media Blocks E2E test * Update BlockOutline to remove unused view, it also remvoves uneeded props * Update paddings/margins for the Post Title and default placeholder block * Remove BlockOutline component * Column - Update selected placeholder --------- Co-authored-by: Gerardo --- .../block-list/block-outline.native.js | 58 ------------------- .../src/components/block-list/block.native.js | 11 +--- .../components/block-list/block.native.scss | 49 ---------------- .../components/block-list/style.native.scss | 6 +- .../block-library/src/column/edit.native.js | 14 ++--- .../src/column/editor.native.scss | 4 -- .../components/visual-editor/header.native.js | 18 +----- .../visual-editor/style.native.scss | 18 ------ .../components/post-title/style.native.scss | 10 ++-- packages/react-native-editor/CHANGELOG.md | 3 +- ...enberg-editor-media-blocks-@canary.test.js | 6 +- 11 files changed, 19 insertions(+), 178 deletions(-) delete mode 100644 packages/block-editor/src/components/block-list/block-outline.native.js delete mode 100644 packages/edit-post/src/components/visual-editor/style.native.scss diff --git a/packages/block-editor/src/components/block-list/block-outline.native.js b/packages/block-editor/src/components/block-list/block-outline.native.js deleted file mode 100644 index eabff38fa6e7b..0000000000000 --- a/packages/block-editor/src/components/block-list/block-outline.native.js +++ /dev/null @@ -1,58 +0,0 @@ -/** - * External dependencies - */ -import { View } from 'react-native'; - -/** - * WordPress dependencies - */ -import { usePreferredColorSchemeStyle } from '@wordpress/compose'; -import { alignmentHelpers } from '@wordpress/components'; - -/** - * Internal dependencies - */ -import styles from './block.scss'; - -function BlockOutline( { - align, - blockWidth, - isParentSelected, - isSelected, - name, - screenWidth, -} ) { - const { isFullWidth, isContainerRelated } = alignmentHelpers; - const isScreenWidthWider = blockWidth < screenWidth; - - const styleSolidBorder = [ - styles.solidBorder, - isFullWidth( align ) && isScreenWidthWider && styles.borderFullWidth, - isFullWidth( align ) && - isContainerRelated( name ) && - isScreenWidthWider && - styles.containerBorderFullWidth, - usePreferredColorSchemeStyle( - styles.solidBorderColor, - styles.solidBorderColorDark - ), - ]; - const styleDashedBorder = [ - styles.dashedBorder, - usePreferredColorSchemeStyle( - styles.dashedBorderColor, - styles.dashedBorderColorDark - ), - ]; - - return ( - <> - { isSelected && ( - - ) } - { isParentSelected && } - - ); -} - -export default BlockOutline; diff --git a/packages/block-editor/src/components/block-list/block.native.js b/packages/block-editor/src/components/block-list/block.native.js index 89f30572fe331..4f1e335f15271 100644 --- a/packages/block-editor/src/components/block-list/block.native.js +++ b/packages/block-editor/src/components/block-list/block.native.js @@ -1,7 +1,7 @@ /** * External dependencies */ -import { Pressable, useWindowDimensions, View } from 'react-native'; +import { Pressable, View } from 'react-native'; /** * WordPress dependencies @@ -35,7 +35,6 @@ import { compose, ifCondition, pure } from '@wordpress/compose'; import BlockEdit from '../block-edit'; import BlockDraggable from '../block-draggable'; import BlockInvalidWarning from './block-invalid-warning'; -import BlockOutline from './block-outline'; import { store as blockEditorStore } from '../../store'; import { useLayout } from './layout'; import useSetting from '../use-setting'; @@ -65,14 +64,12 @@ function BlockWrapper( { draggingClientId, draggingEnabled, isDescendentBlockSelected, - isParentSelected, isSelected, isTouchable, marginHorizontal, marginVertical, onFocus, } ) { - const { width: screenWidth } = useWindowDimensions(); const blockWrapperStyles = { flex: 1 }; const blockWrapperStyle = [ blockWrapperStyles, @@ -92,11 +89,6 @@ function BlockWrapper( { onPress={ onFocus } style={ blockWrapperStyle } > - @@ -258,8 +255,6 @@ export default compose( [ const parentId = getBlockRootClientId( clientId ); const hasChildren = !! getBlockCount( clientId ); - const isParentSelected = - selectedBlockClientId && selectedBlockClientId === parentId; const blockOrder = getBlockOrder( parentId ); @@ -271,7 +266,6 @@ export default compose( [ return { hasChildren, - isParentSelected, isSelected, selectedColumnIndex, columns, diff --git a/packages/block-library/src/column/editor.native.scss b/packages/block-library/src/column/editor.native.scss index ef937134a43c3..f76d85ff44b23 100644 --- a/packages/block-library/src/column/editor.native.scss +++ b/packages/block-library/src/column/editor.native.scss @@ -1,7 +1,3 @@ -.columnPlaceholderNotSelected { - padding-top: $block-selected-to-content; -} - .columnPlaceholder { flex: 1; padding: $block-selected-to-content; diff --git a/packages/edit-post/src/components/visual-editor/header.native.js b/packages/edit-post/src/components/visual-editor/header.native.js index 20ed9ae5d8164..f7679e531ec9e 100644 --- a/packages/edit-post/src/components/visual-editor/header.native.js +++ b/packages/edit-post/src/components/visual-editor/header.native.js @@ -16,23 +16,9 @@ import { useEditorWrapperStyles, } from '@wordpress/block-editor'; -/** - * Internal dependencies - */ -import styles from './style.scss'; - const Header = memo( - function EditorHeader( { - editTitle, - setTitleRef, - title, - getStylesFromColorScheme, - } ) { + function EditorHeader( { editTitle, setTitleRef, title } ) { const [ wrapperStyles ] = useEditorWrapperStyles(); - const blockHolderFocusedStyle = getStylesFromColorScheme( - styles.blockHolderFocused, - styles.blockHolderFocusedDark - ); return ( diff --git a/packages/edit-post/src/components/visual-editor/style.native.scss b/packages/edit-post/src/components/visual-editor/style.native.scss deleted file mode 100644 index 7475caa801a2b..0000000000000 --- a/packages/edit-post/src/components/visual-editor/style.native.scss +++ /dev/null @@ -1,18 +0,0 @@ -.blockHolderFullBordered { - border-top-width: $block-selected-border-width; - border-bottom-width: $block-selected-border-width; - border-left-width: $block-selected-border-width; - border-right-width: $block-selected-border-width; - border-radius: 4px; - border-style: solid; - margin-left: 4px; - margin-right: 4px; -} - -.blockHolderFocused { - border-color: $blue-wordpress; -} - -.blockHolderFocusedDark { - border-color: $blue-30; -} diff --git a/packages/editor/src/components/post-title/style.native.scss b/packages/editor/src/components/post-title/style.native.scss index 05727a318300a..42b0b5bce146d 100644 --- a/packages/editor/src/components/post-title/style.native.scss +++ b/packages/editor/src/components/post-title/style.native.scss @@ -1,10 +1,10 @@ .titleContainer { - padding-left: 12; - padding-right: 16; - padding-top: 12; - padding-bottom: 12; - margin-top: 24; + padding-left: $block-edge-to-content; + padding-right: $block-edge-to-content; + padding-top: 6; + padding-bottom: 6; + margin-top: 12; } .dimmed { diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index 5a1dc4d533a68..2380e16ddb426 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -10,11 +10,12 @@ For each user feature we should also add a importance categorization label to i --> ## Unreleased +- [**] Add media inserter buttons to editor toolbar [#51827] +- [**] Update native BlockOutline component styles to remove blue border from blocks [#51222] ## 1.99.0 - [*] Rename "Reusable blocks" to "Synced patterns", aligning with the web editor. [#51704] - [**] Fix a crash related to Reanimated when closing the editor [#52320] -- [**] Add media inserter buttons to editor toolbar [#51827] ## 1.98.1 - [*] fix: Display heading level dropdown icons and labels [#52004] diff --git a/packages/react-native-editor/__device-tests__/gutenberg-editor-media-blocks-@canary.test.js b/packages/react-native-editor/__device-tests__/gutenberg-editor-media-blocks-@canary.test.js index e17e39bd8357f..a5a1b10b692fd 100644 --- a/packages/react-native-editor/__device-tests__/gutenberg-editor-media-blocks-@canary.test.js +++ b/packages/react-native-editor/__device-tests__/gutenberg-editor-media-blocks-@canary.test.js @@ -125,9 +125,9 @@ onlyOniOS( 'Gutenberg Editor Cover Block test', () => { const { height } = await coverBlock.getSize(); // Height is set to 20rem, where 1rem is 16. - // There is also block's vertical padding equal 32. - // Finally, the total height should be 20 * 16 + 32 = 352. - expect( height ).toBe( 352 ); + // There is also block's vertical padding equal 16. + // Finally, the total height should be 20 * 16 + 16 = 336. + expect( height ).toBe( 336 ); await coverBlock.click(); expect( coverBlock ).toBeTruthy(); From e068c4775cf9bd5770aafb028c4fd13d294d367d Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Fri, 7 Jul 2023 17:33:32 +0200 Subject: [PATCH 099/146] Scope CSS rules for the wp admin reset to js support only. (#52376) --- packages/edit-post/src/style.scss | 8 +------- packages/edit-site/src/style.scss | 22 ++++++++++------------ packages/edit-widgets/src/style.scss | 10 ++-------- 3 files changed, 13 insertions(+), 27 deletions(-) diff --git a/packages/edit-post/src/style.scss b/packages/edit-post/src/style.scss index d33a5ae22c0fd..fac5deef18f71 100644 --- a/packages/edit-post/src/style.scss +++ b/packages/edit-post/src/style.scss @@ -41,13 +41,7 @@ } } -// In order to use mix-blend-mode, this element needs to have an explicitly set background-color -// We scope it to .wp-toolbar to be wp-admin only, to prevent bleed into other implementations -html.wp-toolbar { - background: $white; -} - -body.block-editor-page { +body.js.block-editor-page { @include wp-admin-reset( ".block-editor" ); } diff --git a/packages/edit-site/src/style.scss b/packages/edit-site/src/style.scss index 5a7f96433518a..a6309ae2a895c 100644 --- a/packages/edit-site/src/style.scss +++ b/packages/edit-site/src/style.scss @@ -47,27 +47,20 @@ @import "./components/resizable-frame/style.scss"; @import "./hooks/push-changes-to-global-styles/style.scss"; -html #wpadminbar { +body.js #wpadminbar { display: none; } -html #wpbody { +body.js #wpbody { padding-top: 0; } -// In order to use mix-blend-mode, this element needs to have an explicitly set background-color. -// We scope it to .wp-toolbar to be wp-admin only, to prevent bleed into other implementations. -html.wp-toolbar { - background: $white; - padding-top: 0; -} - -body.appearance_page_gutenberg-template-parts, -body.site-editor-php { +body.js.appearance_page_gutenberg-template-parts, +body.js.site-editor-php { @include wp-admin-reset(".edit-site"); } -body.site-editor-php { +body.js.site-editor-php { background: $gray-900; } @@ -91,6 +84,11 @@ body.site-editor-php { top: 0; } + .no-js & { + min-height: 0; + position: static; + } + .interface-interface-skeleton { top: 0; } diff --git a/packages/edit-widgets/src/style.scss b/packages/edit-widgets/src/style.scss index 2e78903d72c71..ae850c3bb78fe 100644 --- a/packages/edit-widgets/src/style.scss +++ b/packages/edit-widgets/src/style.scss @@ -11,14 +11,8 @@ @import "./components/widget-areas-block-editor-content/style.scss"; @import "./components/secondary-sidebar/style.scss"; -// In order to use mix-blend-mode, this element needs to have an explicitly set background-color -// We scope it to .wp-toolbar to be wp-admin only, to prevent bleed into other implementations -html.wp-toolbar { - background: $white; -} - -body.appearance_page_gutenberg-widgets, -body.widgets-php { +body.js.appearance_page_gutenberg-widgets, +body.js.widgets-php { @include wp-admin-reset( ".blocks-widgets-container" ); } From 464f219859866a7d386d7a865aa16c5ac3faa5d3 Mon Sep 17 00:00:00 2001 From: Gutenberg Repository Automation Date: Fri, 7 Jul 2023 16:48:42 +0000 Subject: [PATCH 100/146] Update Changelog for 16.1.2 --- changelog.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/changelog.txt b/changelog.txt index 9f1b040aaffc7..820de06284764 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,12 @@ == Changelog == += 16.1.2 = + +## Bugfixes + +* Footnotes: increase selector specificity for anchor (https://github.com/WordPress/gutenberg/pull/52179) + + = 16.2.0-rc.1 = From 02210c2bbda96e4f6c537ba04998a11095b26e28 Mon Sep 17 00:00:00 2001 From: Marcelo Serpa <81248+fullofcaffeine@users.noreply.github.com> Date: Fri, 7 Jul 2023 11:05:08 -0600 Subject: [PATCH 101/146] Revert "Update Changelog for 16.1.2" (#52433) This reverts commit 464f219859866a7d386d7a865aa16c5ac3faa5d3. --- changelog.txt | 7 ------- 1 file changed, 7 deletions(-) diff --git a/changelog.txt b/changelog.txt index 820de06284764..9f1b040aaffc7 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,12 +1,5 @@ == Changelog == -= 16.1.2 = - -## Bugfixes - -* Footnotes: increase selector specificity for anchor (https://github.com/WordPress/gutenberg/pull/52179) - - = 16.2.0-rc.1 = From 4071c900444421c5612e2d739b22dc24af220d97 Mon Sep 17 00:00:00 2001 From: Gutenberg Repository Automation Date: Fri, 7 Jul 2023 17:20:20 +0000 Subject: [PATCH 102/146] Update Changelog for 16.1.2 --- changelog.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/changelog.txt b/changelog.txt index 9f1b040aaffc7..1937dcdf19376 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,12 @@ == Changelog == += 16.1.2 = + +### Bug fixes + +* Footnotes: increase selector specificity for anchor (https://github.com/WordPress/gutenberg/pull/52179) + + = 16.2.0-rc.1 = From dc32307fcad60e05a87f9b27f161fc2e3d480b5e Mon Sep 17 00:00:00 2001 From: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Date: Sat, 8 Jul 2023 03:51:13 +0900 Subject: [PATCH 103/146] Footnotes: Fix incorrect anchor position in Firefox (#52425) --- packages/block-library/src/footnotes/style.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/footnotes/style.scss b/packages/block-library/src/footnotes/style.scss index 4debba0560f17..ad49bc1cf2911 100644 --- a/packages/block-library/src/footnotes/style.scss +++ b/packages/block-library/src/footnotes/style.scss @@ -7,7 +7,8 @@ vertical-align: super; font-size: smaller; counter-increment: footnotes; - display: inline-block; + display: inline-flex; + text-decoration: none; text-indent: -9999999px; } From aaf6f8f5e044624a9ff98dbd5acd6c38749e297b Mon Sep 17 00:00:00 2001 From: Ella <4710635+ellatrix@users.noreply.github.com> Date: Fri, 7 Jul 2023 22:09:38 +0200 Subject: [PATCH 104/146] Footnotes: fix lingering format boundary attr (#52439) --- packages/rich-text/src/to-tree.js | 2 +- test/e2e/specs/editor/various/footnotes.spec.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/rich-text/src/to-tree.js b/packages/rich-text/src/to-tree.js index 805b539053a57..b390954b79672 100644 --- a/packages/rich-text/src/to-tree.js +++ b/packages/rich-text/src/to-tree.js @@ -60,7 +60,7 @@ function fromFormat( { let elementAttributes = {}; - if ( boundaryClass ) { + if ( boundaryClass && isEditableTree ) { elementAttributes[ 'data-rich-text-format-boundary' ] = 'true'; } diff --git a/test/e2e/specs/editor/various/footnotes.spec.js b/test/e2e/specs/editor/various/footnotes.spec.js index 63480bd11521c..e65eee6d3d08e 100644 --- a/test/e2e/specs/editor/various/footnotes.spec.js +++ b/test/e2e/specs/editor/various/footnotes.spec.js @@ -48,7 +48,7 @@ test.describe( 'Footnotes', () => { { name: 'core/paragraph', attributes: { - content: `second paragraph*`, + content: `second paragraph*`, }, }, { @@ -72,13 +72,13 @@ test.describe( 'Footnotes', () => { { name: 'core/paragraph', attributes: { - content: `first paragraph*`, + content: `first paragraph*`, }, }, { name: 'core/paragraph', attributes: { - content: `second paragraph*`, + content: `second paragraph*`, }, }, { @@ -106,13 +106,13 @@ test.describe( 'Footnotes', () => { { name: 'core/paragraph', attributes: { - content: `second paragraph*`, + content: `second paragraph*`, }, }, { name: 'core/paragraph', attributes: { - content: `first paragraph*`, + content: `first paragraph*`, }, }, { @@ -138,7 +138,7 @@ test.describe( 'Footnotes', () => { { name: 'core/paragraph', attributes: { - content: `second paragraph*`, + content: `second paragraph*`, }, }, { From 0daf67effc83e5c3faf357f0d63e3cc8ce60dcf3 Mon Sep 17 00:00:00 2001 From: Kai Hao Date: Mon, 10 Jul 2023 08:58:59 +0800 Subject: [PATCH 105/146] [Patterns] Separate sync status into a filter control (#52303) Co-authored-by: Saxon Fletcher Co-authored-by: Glen Davies --- .../src/components/page-patterns/grid-item.js | 22 +- .../src/components/page-patterns/grid.js | 56 ++-- .../src/components/page-patterns/header.js | 69 +++++ .../src/components/page-patterns/index.js | 7 +- .../components/page-patterns/patterns-list.js | 140 ++++++---- .../src/components/page-patterns/style.scss | 82 ++++-- .../components/page-patterns/use-patterns.js | 258 +++++++----------- .../use-my-patterns.js | 13 +- 8 files changed, 372 insertions(+), 275 deletions(-) create mode 100644 packages/edit-site/src/components/page-patterns/header.js diff --git a/packages/edit-site/src/components/page-patterns/grid-item.js b/packages/edit-site/src/components/page-patterns/grid-item.js index 7f40fbce9035c..d8e3b2fe16d53 100644 --- a/packages/edit-site/src/components/page-patterns/grid-item.js +++ b/packages/edit-site/src/components/page-patterns/grid-item.js @@ -18,13 +18,14 @@ import { Flex, } from '@wordpress/components'; import { useDispatch } from '@wordpress/data'; -import { useState, useId } from '@wordpress/element'; +import { useState, useId, memo } from '@wordpress/element'; import { __, sprintf } from '@wordpress/i18n'; import { Icon, header, footer, symbolFilled as uncategorized, + symbol, moreHorizontal, lockSmall, } from '@wordpress/icons'; @@ -37,13 +38,13 @@ import { DELETE, BACKSPACE } from '@wordpress/keycodes'; */ import RenameMenuItem from './rename-menu-item'; import DuplicateMenuItem from './duplicate-menu-item'; -import { PATTERNS, TEMPLATE_PARTS, USER_PATTERNS } from './utils'; +import { PATTERNS, TEMPLATE_PARTS, USER_PATTERNS, SYNC_TYPES } from './utils'; import { store as editSiteStore } from '../../store'; import { useLink } from '../routes/link'; const templatePartIcons = { header, footer, uncategorized }; -export default function GridItem( { categoryId, composite, icon, item } ) { +function GridItem( { categoryId, item, ...props } ) { const descriptionId = useId(); const [ isDeleteDialogOpen, setIsDeleteDialogOpen ] = useState( false ); @@ -122,9 +123,9 @@ export default function GridItem( { categoryId, composite, icon, item } ) { ariaDescriptions.push( __( 'Theme patterns cannot be edited.' ) ); } - const itemIcon = templatePartIcons[ categoryId ] - ? templatePartIcons[ categoryId ] - : icon; + const itemIcon = + templatePartIcons[ categoryId ] || + ( item.syncStatus === SYNC_TYPES.full ? symbol : undefined ); const confirmButtonText = hasThemeFile ? __( 'Clear' ) : __( 'Delete' ); const confirmPrompt = hasThemeFile @@ -142,7 +143,10 @@ export default function GridItem( { categoryId, composite, icon, item } ) { className={ previewClassNames } role="option" as="div" - { ...composite } + // Even though still incomplete, passing ids helps performance. + // @see https://reakit.io/docs/composite/#performance. + id={ `edit-site-patterns-${ item.name }` } + { ...props } onClick={ item.type !== PATTERNS ? onClick : undefined } onKeyDown={ isCustomPattern ? onKeyDown : undefined } aria-label={ item.title } @@ -180,7 +184,7 @@ export default function GridItem( { categoryId, composite, icon, item } ) { spacing={ 3 } className="edit-site-patterns__pattern-title" > - { icon && ( + { itemIcon && ( ); } + +export default memo( GridItem ); diff --git a/packages/edit-site/src/components/page-patterns/grid.js b/packages/edit-site/src/components/page-patterns/grid.js index 3f6e5fd01f72f..b9b7053c112ce 100644 --- a/packages/edit-site/src/components/page-patterns/grid.js +++ b/packages/edit-site/src/components/page-patterns/grid.js @@ -4,36 +4,56 @@ import { __unstableComposite as Composite, __unstableUseCompositeState as useCompositeState, + __experimentalText as Text, } from '@wordpress/components'; +import { useRef } from '@wordpress/element'; +import { __, sprintf } from '@wordpress/i18n'; /** * Internal dependencies */ import GridItem from './grid-item'; -export default function Grid( { categoryId, label, icon, items } ) { - const composite = useCompositeState( { orientation: 'vertical' } ); +const PAGE_SIZE = 100; + +export default function Grid( { categoryId, items, ...props } ) { + const composite = useCompositeState( { wrap: true } ); + const gridRef = useRef(); if ( ! items?.length ) { return null; } + const list = items.slice( 0, PAGE_SIZE ); + const restLength = items.length - PAGE_SIZE; + return ( - - { items.map( ( item ) => ( - - ) ) } - + <> + + { list.map( ( item ) => ( + + ) ) } + + { restLength > 0 && ( + + { sprintf( + /* translators: %d: number of patterns */ + __( '+ %d more patterns discoverable by searching' ), + restLength + ) } + + ) } + ); } diff --git a/packages/edit-site/src/components/page-patterns/header.js b/packages/edit-site/src/components/page-patterns/header.js new file mode 100644 index 0000000000000..1237b85d6c978 --- /dev/null +++ b/packages/edit-site/src/components/page-patterns/header.js @@ -0,0 +1,69 @@ +/** + * WordPress dependencies + */ +import { + __experimentalVStack as VStack, + __experimentalHeading as Heading, + __experimentalText as Text, +} from '@wordpress/components'; +import { __ } from '@wordpress/i18n'; +import { store as editorStore } from '@wordpress/editor'; +import { useSelect } from '@wordpress/data'; + +/** + * Internal dependencies + */ +import usePatternCategories from '../sidebar-navigation-screen-patterns/use-pattern-categories'; +import { + USER_PATTERN_CATEGORY, + USER_PATTERNS, + TEMPLATE_PARTS, + PATTERNS, +} from './utils'; + +export default function PatternsHeader( { + categoryId, + type, + titleId, + descriptionId, +} ) { + const { patternCategories } = usePatternCategories(); + const templatePartAreas = useSelect( + ( select ) => + select( editorStore ).__experimentalGetDefaultTemplatePartAreas(), + [] + ); + + let title, description; + if ( categoryId === USER_PATTERN_CATEGORY && type === USER_PATTERNS ) { + title = __( 'My Patterns' ); + description = ''; + } else if ( type === TEMPLATE_PARTS ) { + const templatePartArea = templatePartAreas.find( + ( area ) => area.area === categoryId + ); + title = templatePartArea?.label; + description = templatePartArea?.description; + } else if ( type === PATTERNS ) { + const patternCategory = patternCategories.find( + ( category ) => category.name === categoryId + ); + title = patternCategory?.label; + description = patternCategory?.description; + } + + if ( ! title ) return null; + + return ( + + + { title } + + { description ? ( + + { description } + + ) : null } + + ); +} diff --git a/packages/edit-site/src/components/page-patterns/index.js b/packages/edit-site/src/components/page-patterns/index.js index 961ed51f39e5d..d90fc74844244 100644 --- a/packages/edit-site/src/components/page-patterns/index.js +++ b/packages/edit-site/src/components/page-patterns/index.js @@ -32,7 +32,12 @@ export default function PagePatterns() { title={ __( 'Patterns content' ) } hideTitleFromUI > - + ); diff --git a/packages/edit-site/src/components/page-patterns/patterns-list.js b/packages/edit-site/src/components/page-patterns/patterns-list.js index d59596f20e795..bc2a18bf39456 100644 --- a/packages/edit-site/src/components/page-patterns/patterns-list.js +++ b/packages/edit-site/src/components/page-patterns/patterns-list.js @@ -1,51 +1,87 @@ /** * WordPress dependencies */ - +import { useState, useDeferredValue, useId } from '@wordpress/element'; import { SearchControl, - __experimentalHeading as Heading, - __experimentalText as Text, __experimentalVStack as VStack, Flex, FlexBlock, + __experimentalToggleGroupControl as ToggleGroupControl, + __experimentalToggleGroupControlOption as ToggleGroupControlOption, + __experimentalHeading as Heading, + __experimentalText as Text, } from '@wordpress/components'; import { __, isRTL } from '@wordpress/i18n'; -import { symbol, chevronLeft, chevronRight } from '@wordpress/icons'; +import { chevronLeft, chevronRight } from '@wordpress/icons'; import { privateApis as routerPrivateApis } from '@wordpress/router'; -import { useViewportMatch } from '@wordpress/compose'; +import { useViewportMatch, useAsyncList } from '@wordpress/compose'; /** * Internal dependencies */ +import PatternsHeader from './header'; import Grid from './grid'; import NoPatterns from './no-patterns'; import usePatterns from './use-patterns'; import SidebarButton from '../sidebar-button'; import useDebouncedInput from '../../utils/use-debounced-input'; import { unlock } from '../../lock-unlock'; +import { SYNC_TYPES, USER_PATTERN_CATEGORY } from './utils'; const { useLocation, useHistory } = unlock( routerPrivateApis ); +const SYNC_FILTERS = { + all: __( 'All' ), + [ SYNC_TYPES.full ]: __( 'Synced' ), + [ SYNC_TYPES.unsynced ]: __( 'Standard' ), +}; + +const SYNC_DESCRIPTIONS = { + all: '', + [ SYNC_TYPES.full ]: __( + 'Patterns that are kept in sync across your site.' + ), + [ SYNC_TYPES.unsynced ]: __( + 'Patterns that can be changed freely without affecting your site.' + ), +}; + export default function PatternsList( { categoryId, type } ) { const location = useLocation(); const history = useHistory(); const isMobileViewport = useViewportMatch( 'medium', '<' ); const [ filterValue, setFilterValue, delayedFilterValue ] = useDebouncedInput( '' ); + const deferredFilterValue = useDeferredValue( delayedFilterValue ); - const [ patterns, isResolving ] = usePatterns( - type, - categoryId, - delayedFilterValue - ); + const [ syncFilter, setSyncFilter ] = useState( 'all' ); + const deferredSyncedFilter = useDeferredValue( syncFilter ); + const { patterns, isResolving } = usePatterns( type, categoryId, { + search: deferredFilterValue, + syncStatus: + deferredSyncedFilter === 'all' ? undefined : deferredSyncedFilter, + } ); - const { syncedPatterns, unsyncedPatterns } = patterns; - const hasPatterns = !! syncedPatterns.length || !! unsyncedPatterns.length; + const id = useId(); + const titleId = `${ id }-title`; + const descriptionId = `${ id }-description`; + + const hasPatterns = patterns.length; + const title = SYNC_FILTERS[ syncFilter ]; + const description = SYNC_DESCRIPTIONS[ syncFilter ]; + const shownPatterns = useAsyncList( patterns ); return ( - + + + { isMobileViewport && ( ) } - + setFilterValue( value ) } @@ -71,46 +107,48 @@ export default function PatternsList( { categoryId, type } ) { __nextHasNoMarginBottom /> + { categoryId === USER_PATTERN_CATEGORY && ( + setSyncFilter( value ) } + __nextHasNoMarginBottom + > + { Object.entries( SYNC_FILTERS ).map( + ( [ key, label ] ) => ( + + ) + ) } + + ) } - { isResolving && __( 'Loading' ) } - { ! isResolving && !! syncedPatterns.length && ( - <> - - - { __( 'Synced' ) } - - - { __( - 'Patterns that are kept in sync across the site' - ) } + { syncFilter !== 'all' && ( + + + { title } + + { description ? ( + + { description } - - - + ) : null } + ) } - { ! isResolving && !! unsyncedPatterns.length && ( - <> - - - { __( 'Standard' ) } - - - { __( - 'Patterns that can be changed freely without affecting the site' - ) } - - - - + { hasPatterns && ( + ) } { ! isResolving && ! hasPatterns && } diff --git a/packages/edit-site/src/components/page-patterns/style.scss b/packages/edit-site/src/components/page-patterns/style.scss index 7a7bf026b9c62..64dcb61ac1a74 100644 --- a/packages/edit-site/src/components/page-patterns/style.scss +++ b/packages/edit-site/src/components/page-patterns/style.scss @@ -1,6 +1,13 @@ .edit-site-patterns { - background: rgba(0, 0, 0, 0.05); + background: rgba(0, 0, 0, 0.15); margin: $header-height 0 0; + .components-base-control { + width: 100%; + @include break-medium { + width: auto; + } + } + .components-text { color: $gray-600; } @@ -12,25 +19,63 @@ @include break-medium { margin: 0; } -} -.edit-site-patterns__grid { - column-gap: $grid-unit-30; - @include break-large() { - column-count: 2; + .edit-site-patterns__search-block { + min-width: fit-content; + flex-grow: 1; } + // The increased specificity here is to overcome component styles + // without relying on internal component class names. + .edit-site-patterns__search { + input[type="search"] { + height: $button-size-next-default-40px; + background: $gray-800; + color: $gray-200; + + &:focus { + background: $gray-800; + } + } + + svg { + fill: $gray-600; + } + } + + .edit-site-patterns__sync-status-filter { + background: $gray-800; + border: none; + height: $button-size-next-default-40px; + min-width: max-content; + width: 100%; + max-width: 100%; + + @include break-medium { + width: 300px; + } + } + .edit-site-patterns__sync-status-filter-option:active { + background: $gray-700; + color: $gray-100; + } +} + +.edit-site-patterns__grid { + display: grid; + grid-template-columns: 1fr; + gap: $grid-unit-40; // Small top padding required to avoid cutting off the visible outline // when hovering items. padding-top: $border-width-focus-fallback; margin-bottom: $grid-unit-40; - + @include break-large { + grid-template-columns: 1fr 1fr; + } .edit-site-patterns__pattern { break-inside: avoid-column; display: flex; flex-direction: column; - margin-bottom: $grid-unit-60; - .edit-site-patterns__preview { border-radius: $radius-block-ui; cursor: pointer; @@ -68,26 +113,13 @@ } .edit-site-patterns__preview { - flex: 1; + flex: 0 1 auto; margin-bottom: $grid-unit-20; } } -// The increased specificity here is to overcome component styles -// without relying on internal component class names. -.edit-site-patterns__search { - &#{&} input[type="search"] { - background: $gray-800; - color: $gray-200; - - &:focus { - background: $gray-800; - } - } - - svg { - fill: $gray-600; - } +.edit-site-patterns__load-more { + align-self: center; } .edit-site-patterns__pattern-title { diff --git a/packages/edit-site/src/components/page-patterns/use-patterns.js b/packages/edit-site/src/components/page-patterns/use-patterns.js index 295d1eee8e410..0bcc52c85cb62 100644 --- a/packages/edit-site/src/components/page-patterns/use-patterns.js +++ b/packages/edit-site/src/components/page-patterns/use-patterns.js @@ -4,7 +4,6 @@ import { parse } from '@wordpress/blocks'; import { useSelect } from '@wordpress/data'; import { store as coreStore } from '@wordpress/core-data'; -import { useMemo } from '@wordpress/element'; /** * Internal dependencies @@ -15,7 +14,6 @@ import { SYNC_TYPES, TEMPLATE_PARTS, USER_PATTERNS, - USER_PATTERN_CATEGORY, filterOutDuplicatesByName, } from './utils'; import { unlock } from '../../lock-unlock'; @@ -43,106 +41,64 @@ const templatePartToPattern = ( templatePart ) => ( { const templatePartHasCategory = ( item, category ) => item.templatePart.area === category; -const useTemplatePartsAsPatterns = ( - categoryId, - postType = TEMPLATE_PARTS, - filterValue = '' +const selectTemplatePartsAsPatterns = ( + select, + { categoryId, search = '' } = {} ) => { - const { templateParts, isResolving } = useSelect( - ( select ) => { - if ( postType !== TEMPLATE_PARTS ) { - return { - templateParts: EMPTY_PATTERN_LIST, - isResolving: false, - }; - } - - const { getEntityRecords, isResolving: _isResolving } = - select( coreStore ); - const query = { per_page: -1 }; - const rawTemplateParts = getEntityRecords( - 'postType', - postType, - query - ); - const partsAsPatterns = rawTemplateParts?.map( ( templatePart ) => - templatePartToPattern( templatePart ) - ); - - return { - templateParts: partsAsPatterns, - isResolving: _isResolving( 'getEntityRecords', [ - 'postType', - 'wp_template_part', - query, - ] ), - }; - }, - [ postType ] + const { getEntityRecords, getIsResolving } = select( coreStore ); + const query = { per_page: -1 }; + const rawTemplateParts = + getEntityRecords( 'postType', TEMPLATE_PARTS, query ) ?? + EMPTY_PATTERN_LIST; + const templateParts = rawTemplateParts.map( ( templatePart ) => + templatePartToPattern( templatePart ) ); - const filteredTemplateParts = useMemo( () => { - if ( ! templateParts ) { - return EMPTY_PATTERN_LIST; - } + const isResolving = getIsResolving( 'getEntityRecords', [ + 'postType', + 'wp_template_part', + query, + ] ); - return searchItems( templateParts, filterValue, { - categoryId, - hasCategory: templatePartHasCategory, - } ); - }, [ templateParts, filterValue, categoryId ] ); + const patterns = searchItems( templateParts, search, { + categoryId, + hasCategory: templatePartHasCategory, + } ); - return { templateParts: filteredTemplateParts, isResolving }; + return { patterns, isResolving }; }; -const useThemePatterns = ( - categoryId, - postType = PATTERNS, - filterValue = '' -) => { - const blockPatterns = useSelect( ( select ) => { - const { getSettings } = unlock( select( editSiteStore ) ); - const settings = getSettings(); - return ( - settings.__experimentalAdditionalBlockPatterns ?? - settings.__experimentalBlockPatterns - ); +const selectThemePatterns = ( select, { categoryId, search = '' } = {} ) => { + const { getSettings } = unlock( select( editSiteStore ) ); + const settings = getSettings(); + const blockPatterns = + settings.__experimentalAdditionalBlockPatterns ?? + settings.__experimentalBlockPatterns; + + const restBlockPatterns = select( coreStore ).getBlockPatterns(); + + let patterns = [ + ...( blockPatterns || [] ), + ...( restBlockPatterns || [] ), + ] + .filter( + ( pattern ) => ! CORE_PATTERN_SOURCES.includes( pattern.source ) + ) + .filter( filterOutDuplicatesByName ) + .map( ( pattern ) => ( { + ...pattern, + keywords: pattern.keywords || [], + type: 'pattern', + blocks: parse( pattern.content ), + } ) ); + + patterns = searchItems( patterns, search, { + categoryId, + hasCategory: ( item, currentCategory ) => + item.categories?.includes( currentCategory ), } ); - const restBlockPatterns = useSelect( ( select ) => - select( coreStore ).getBlockPatterns() - ); - - const patterns = useMemo( - () => - [ ...( blockPatterns || [] ), ...( restBlockPatterns || [] ) ] - .filter( - ( pattern ) => - ! CORE_PATTERN_SOURCES.includes( pattern.source ) - ) - .filter( filterOutDuplicatesByName ) - .map( ( pattern ) => ( { - ...pattern, - keywords: pattern.keywords || [], - type: 'pattern', - blocks: parse( pattern.content ), - } ) ), - [ blockPatterns, restBlockPatterns ] - ); - - const filteredPatterns = useMemo( () => { - if ( postType !== PATTERNS ) { - return EMPTY_PATTERN_LIST; - } - - return searchItems( patterns, filterValue, { - categoryId, - hasCategory: ( item, currentCategory ) => - item.categories?.includes( currentCategory ), - } ); - }, [ patterns, filterValue, categoryId, postType ] ); - - return filteredPatterns; + return { patterns, isResolving: false }; }; const reusableBlockToPattern = ( reusableBlock ) => ( { @@ -156,88 +112,58 @@ const reusableBlockToPattern = ( reusableBlock ) => ( { reusableBlock, } ); -const useUserPatterns = ( - categoryId, - categoryType = PATTERNS, - filterValue = '' -) => { - const postType = categoryType === PATTERNS ? USER_PATTERNS : categoryType; - const unfilteredPatterns = useSelect( - ( select ) => { - if ( - postType !== USER_PATTERNS || - categoryId !== USER_PATTERN_CATEGORY - ) { - return EMPTY_PATTERN_LIST; - } +const selectUserPatterns = ( select, { search = '', syncStatus } = {} ) => { + const { getEntityRecords, getIsResolving } = select( coreStore ); - const { getEntityRecords } = select( coreStore ); - const records = getEntityRecords( 'postType', postType, { - per_page: -1, - } ); + const query = { per_page: -1 }; + const records = getEntityRecords( 'postType', USER_PATTERNS, query ); - if ( ! records ) { - return EMPTY_PATTERN_LIST; - } + let patterns = records + ? records.map( ( record ) => reusableBlockToPattern( record ) ) + : EMPTY_PATTERN_LIST; + const isResolving = getIsResolving( 'getEntityRecords', [ + 'postType', + USER_PATTERNS, + query, + ] ); - return records.map( ( record ) => - reusableBlockToPattern( record ) - ); - }, - [ postType, categoryId ] - ); + if ( syncStatus ) { + patterns = patterns.filter( + ( pattern ) => pattern.syncStatus === syncStatus + ); + } - const filteredPatterns = useMemo( () => { - if ( ! unfilteredPatterns.length ) { - return EMPTY_PATTERN_LIST; - } - - return searchItems( unfilteredPatterns, filterValue, { - // We exit user pattern retrieval early if we aren't in the - // catch-all category for user created patterns, so it has - // to be in the category. - hasCategory: () => true, - } ); - }, [ unfilteredPatterns, filterValue ] ); - - const patterns = { syncedPatterns: [], unsyncedPatterns: [] }; - - filteredPatterns.forEach( ( pattern ) => { - if ( pattern.syncStatus === SYNC_TYPES.full ) { - patterns.syncedPatterns.push( pattern ); - } else { - patterns.unsyncedPatterns.push( pattern ); - } + patterns = searchItems( patterns, search, { + // We exit user pattern retrieval early if we aren't in the + // catch-all category for user created patterns, so it has + // to be in the category. + hasCategory: () => true, } ); - return patterns; + return { patterns, isResolving }; }; -export const usePatterns = ( categoryType, categoryId, filterValue ) => { - const blockPatterns = useThemePatterns( - categoryId, - categoryType, - filterValue - ); - - const { syncedPatterns = [], unsyncedPatterns = [] } = useUserPatterns( - categoryId, - categoryType, - filterValue - ); - - const { templateParts, isResolving } = useTemplatePartsAsPatterns( - categoryId, - categoryType, - filterValue +export const usePatterns = ( + categoryType, + categoryId, + { search = '', syncStatus } +) => { + return useSelect( + ( select ) => { + if ( categoryType === TEMPLATE_PARTS ) { + return selectTemplatePartsAsPatterns( select, { + categoryId, + search, + } ); + } else if ( categoryType === PATTERNS ) { + return selectThemePatterns( select, { categoryId, search } ); + } else if ( categoryType === USER_PATTERNS ) { + return selectUserPatterns( select, { search, syncStatus } ); + } + return { patterns: EMPTY_PATTERN_LIST, isResolving: false }; + }, + [ categoryId, categoryType, search, syncStatus ] ); - - const patterns = { - syncedPatterns: [ ...templateParts, ...syncedPatterns ], - unsyncedPatterns: [ ...blockPatterns, ...unsyncedPatterns ], - }; - - return [ patterns, isResolving ]; }; export default usePatterns; diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-patterns/use-my-patterns.js b/packages/edit-site/src/components/sidebar-navigation-screen-patterns/use-my-patterns.js index e3d5cc297164a..37f0b0f8a4e06 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-patterns/use-my-patterns.js +++ b/packages/edit-site/src/components/sidebar-navigation-screen-patterns/use-my-patterns.js @@ -6,18 +6,19 @@ import { useSelect } from '@wordpress/data'; import { __ } from '@wordpress/i18n'; export default function useMyPatterns() { - const myPatterns = useSelect( ( select ) => - select( coreStore ).getEntityRecords( 'postType', 'wp_block', { - per_page: -1, - } ) + const myPatternsCount = useSelect( + ( select ) => + select( coreStore ).getEntityRecords( 'postType', 'wp_block', { + per_page: -1, + } )?.length ?? 0 ); return { myPatterns: { - count: myPatterns?.length || 0, + count: myPatternsCount, name: 'my-patterns', label: __( 'My patterns' ), }, - hasPatterns: !! myPatterns?.length, + hasPatterns: myPatternsCount > 0, }; } From ac57a486f961aa8bd51622d0c78fab28257fc49f Mon Sep 17 00:00:00 2001 From: Saxon Fletcher Date: Mon, 10 Jul 2023 11:06:38 +1000 Subject: [PATCH 106/146] remove sidebar group descriptions (#52453) --- .../components/sidebar-navigation-screen-patterns/index.js | 6 ------ .../sidebar-navigation-screen-patterns/style.scss | 3 --- 2 files changed, 9 deletions(-) diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-patterns/index.js b/packages/edit-site/src/components/sidebar-navigation-screen-patterns/index.js index f200382f96311..d3fc15358027b 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-patterns/index.js +++ b/packages/edit-site/src/components/sidebar-navigation-screen-patterns/index.js @@ -35,7 +35,6 @@ function TemplatePartGroup( { areas, currentArea, currentType } ) { <>
    { __( 'Template parts' ) } -

    { __( 'Synced patterns for use in template building.' ) }

    { Object.entries( areas ).map( @@ -64,11 +63,6 @@ function ThemePatternsGroup( { categories, currentCategory, currentType } ) { <>
    { __( 'Theme patterns' ) } -

    - { __( - 'For insertion into documents where they can then be customized.' - ) } -

    { categories.map( ( category ) => ( diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-patterns/style.scss b/packages/edit-site/src/components/sidebar-navigation-screen-patterns/style.scss index 65790b5e86216..6a6fbc009e0aa 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-patterns/style.scss +++ b/packages/edit-site/src/components/sidebar-navigation-screen-patterns/style.scss @@ -1,8 +1,5 @@ .edit-site-sidebar-navigation-screen-patterns__group { margin-bottom: $grid-unit-40; - padding-bottom: $grid-unit-30; - border-bottom: 1px solid $gray-800; - &:last-of-type, &:first-of-type { border-bottom: 0; From 38fca8a71091a362c448d1abbbc741a2635f2cbf Mon Sep 17 00:00:00 2001 From: Ramon Date: Mon, 10 Jul 2023 11:32:54 +1000 Subject: [PATCH 107/146] Site Editor Pages: load the appropriate template if posts page set (#52266) * This commit: - links the posts page to the homepage template when a post page is set - abstracts logic to get page item props * The Posts Page resolves to display the Home or Index template only. Adding a check to skip the Front Page * Showing homepage settings for posts pages that are set as the post page in reading settings * Post pages that have been set to display posts will redirect to first the home template, then the index template. The fallback is the post id of the page. * Reverted refactor of packages/edit-site/src/components/sidebar-navigation-screen-page/index.js Will do it in a follow up --- .../sidebar-navigation-screen-pages/index.js | 68 +++++++++++-------- 1 file changed, 39 insertions(+), 29 deletions(-) diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-pages/index.js b/packages/edit-site/src/components/sidebar-navigation-screen-pages/index.js index 567bf91aca69f..331221dde7985 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-pages/index.js +++ b/packages/edit-site/src/components/sidebar-navigation-screen-pages/index.js @@ -58,13 +58,16 @@ export default function SidebarNavigationScreenPages() { templates?.find( ( template ) => template.slug === 'home' ) || templates?.find( ( template ) => template.slug === 'index' ); + const getPostsPageTemplate = () => + templates?.find( ( template ) => template.slug === 'home' ) || + templates?.find( ( template ) => template.slug === 'index' ); + const pagesAndTemplates = pages?.concat( dynamicPageTemplates, [ homeTemplate, ] ); const { frontPage, postsPage } = useSelect( ( select ) => { const { getEntityRecord } = select( coreStore ); - const siteSettings = getEntityRecord( 'root', 'site' ); return { frontPage: siteSettings?.page_on_front, @@ -106,6 +109,27 @@ export default function SidebarNavigationScreenPages() { setShowAddPage( false ); }; + const getPageProps = ( id ) => { + let itemIcon = page; + const postsPageTemplateId = + postsPage && postsPage === id ? getPostsPageTemplate()?.id : null; + + switch ( id ) { + case frontPage: + itemIcon = home; + break; + case postsPage: + itemIcon = verse; + break; + } + + return { + icon: itemIcon, + postType: postsPageTemplateId ? 'wp_template' : 'page', + postId: postsPageTemplateId || id, + }; + }; + return ( <> { showAddPage && ( @@ -152,34 +176,20 @@ export default function SidebarNavigationScreenPages() { ) } - { reorderedPages?.map( ( item ) => { - let itemIcon; - switch ( item.id ) { - case frontPage: - itemIcon = home; - break; - case postsPage: - itemIcon = verse; - break; - default: - itemIcon = page; - } - return ( - - - { decodeEntities( - item?.title?.rendered || - __( '(no title)' ) - ) } - - - ); - } ) } + { reorderedPages?.map( ( { id, title } ) => ( + + + { decodeEntities( + title?.rendered || + __( '(no title)' ) + ) } + + + ) ) } ) } From b6ac42a773db21fcd7096a471eba3151796b1d43 Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Mon, 10 Jul 2023 16:18:47 +1200 Subject: [PATCH 108/146] Patterns: alternative grid layout to improve keyboard accessibility (#52357) --- .../src/components/page-patterns/grid-item.js | 233 ++++++++---------- .../src/components/page-patterns/grid.js | 13 +- .../src/components/page-patterns/style.scss | 20 +- 3 files changed, 128 insertions(+), 138 deletions(-) diff --git a/packages/edit-site/src/components/page-patterns/grid-item.js b/packages/edit-site/src/components/page-patterns/grid-item.js index d8e3b2fe16d53..b78c58f5a2572 100644 --- a/packages/edit-site/src/components/page-patterns/grid-item.js +++ b/packages/edit-site/src/components/page-patterns/grid-item.js @@ -13,7 +13,6 @@ import { MenuGroup, MenuItem, __experimentalHStack as HStack, - __unstableCompositeItem as CompositeItem, Tooltip, Flex, } from '@wordpress/components'; @@ -31,7 +30,6 @@ import { } from '@wordpress/icons'; import { store as noticesStore } from '@wordpress/notices'; import { store as reusableBlocksStore } from '@wordpress/reusable-blocks'; -import { DELETE, BACKSPACE } from '@wordpress/keycodes'; /** * Internal dependencies @@ -65,12 +63,6 @@ function GridItem( { categoryId, item, ...props } ) { categoryType: item.type, } ); - const onKeyDown = ( event ) => { - if ( DELETE === event.keyCode || BACKSPACE === event.keyCode ) { - setIsDeleteDialogOpen( true ); - } - }; - const isEmpty = ! item.blocks?.length; const patternClassNames = classnames( 'edit-site-patterns__pattern', { 'is-placeholder': isEmpty, @@ -137,129 +129,120 @@ function GridItem( { categoryId, item, ...props } ) { ); return ( - <> -
    - - `${ descriptionId }-${ index }` - ) - .join( ' ' ) - : undefined - } +
  • + + { ariaDescriptions.map( ( ariaDescription, index ) => ( + + ) ) } + + + { ( { onClose } ) => ( + + { isCustomPattern && ! hasThemeFile && ( + - { isCustomPattern && ( - - setIsDeleteDialogOpen( true ) - } - > - { hasThemeFile - ? __( 'Clear customizations' ) - : __( 'Delete' ) } - - ) } - - ) } - - -
  • + ) } + + { isCustomPattern && ( + + setIsDeleteDialogOpen( true ) + } + > + { hasThemeFile + ? __( 'Clear customizations' ) + : __( 'Delete' ) } + + ) } + + ) } + + + { isDeleteDialogOpen && ( ) } - + ); } diff --git a/packages/edit-site/src/components/page-patterns/grid.js b/packages/edit-site/src/components/page-patterns/grid.js index b9b7053c112ce..1902b36982c14 100644 --- a/packages/edit-site/src/components/page-patterns/grid.js +++ b/packages/edit-site/src/components/page-patterns/grid.js @@ -1,11 +1,7 @@ /** * WordPress dependencies */ -import { - __unstableComposite as Composite, - __unstableUseCompositeState as useCompositeState, - __experimentalText as Text, -} from '@wordpress/components'; +import { __experimentalText as Text } from '@wordpress/components'; import { useRef } from '@wordpress/element'; import { __, sprintf } from '@wordpress/i18n'; @@ -17,7 +13,6 @@ import GridItem from './grid-item'; const PAGE_SIZE = 100; export default function Grid( { categoryId, items, ...props } ) { - const composite = useCompositeState( { wrap: true } ); const gridRef = useRef(); if ( ! items?.length ) { @@ -29,8 +24,7 @@ export default function Grid( { categoryId, items, ...props } ) { return ( <> - ) ) } - + { restLength > 0 && ( { sprintf( diff --git a/packages/edit-site/src/components/page-patterns/style.scss b/packages/edit-site/src/components/page-patterns/style.scss index 64dcb61ac1a74..d6f0b897d0cf2 100644 --- a/packages/edit-site/src/components/page-patterns/style.scss +++ b/packages/edit-site/src/components/page-patterns/style.scss @@ -61,6 +61,12 @@ } } +.edit-site-patterns__section-header { + .screen-reader-shortcut:focus { + top: 0; + } +} + .edit-site-patterns__grid { display: grid; grid-template-columns: 1fr; @@ -77,13 +83,17 @@ display: flex; flex-direction: column; .edit-site-patterns__preview { - border-radius: $radius-block-ui; + box-shadow: none; + border: none; + padding: 0; + background-color: unset; + box-sizing: border-box; + border-radius: 4px; cursor: pointer; overflow: hidden; &:focus { - box-shadow: inset 0 0 0 2px $white, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); - + box-shadow: inset 0 0 0 0 $white, 0 0 0 2px var(--wp-admin-theme-color); // Windows High Contrast mode will show this outline, but not the box-shadow. outline: 2px solid transparent; } @@ -91,6 +101,10 @@ &.is-inactive { cursor: default; } + &.is-inactive:focus { + box-shadow: 0 0 0 var(--wp-admin-border-width-focus) $gray-800; + opacity: 0.8; + } } .edit-site-patterns__footer, From 6dfed256dace00c6e3a1433911e984af2ac0a943 Mon Sep 17 00:00:00 2001 From: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Date: Mon, 10 Jul 2023 14:25:24 +0900 Subject: [PATCH 109/146] Patterns: Add missing decoding entities processing in Patterns and Template/Parts pages (#52449) --- .../src/components/page-patterns/use-patterns.js | 3 ++- .../src/components/template-actions/index.js | 3 ++- .../components/template-actions/rename-menu-item.js | 13 ++++++------- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/edit-site/src/components/page-patterns/use-patterns.js b/packages/edit-site/src/components/page-patterns/use-patterns.js index 0bcc52c85cb62..ea2b8ac976fea 100644 --- a/packages/edit-site/src/components/page-patterns/use-patterns.js +++ b/packages/edit-site/src/components/page-patterns/use-patterns.js @@ -4,6 +4,7 @@ import { parse } from '@wordpress/blocks'; import { useSelect } from '@wordpress/data'; import { store as coreStore } from '@wordpress/core-data'; +import { decodeEntities } from '@wordpress/html-entities'; /** * Internal dependencies @@ -33,7 +34,7 @@ const templatePartToPattern = ( templatePart ) => ( { keywords: templatePart.keywords || [], id: createTemplatePartId( templatePart.theme, templatePart.slug ), name: createTemplatePartId( templatePart.theme, templatePart.slug ), - title: templatePart.title.rendered, + title: decodeEntities( templatePart.title.rendered ), type: templatePart.type, templatePart, } ); diff --git a/packages/edit-site/src/components/template-actions/index.js b/packages/edit-site/src/components/template-actions/index.js index b4618dcae966d..6e744135df67f 100644 --- a/packages/edit-site/src/components/template-actions/index.js +++ b/packages/edit-site/src/components/template-actions/index.js @@ -13,6 +13,7 @@ import { } from '@wordpress/components'; import { moreVertical } from '@wordpress/icons'; import { store as noticesStore } from '@wordpress/notices'; +import { decodeEntities } from '@wordpress/html-entities'; /** * Internal dependencies @@ -58,7 +59,7 @@ export default function TemplateActions( { sprintf( /* translators: The template/part's name. */ __( '"%s" reverted.' ), - template.title.rendered + decodeEntities( template.title.rendered ) ), { type: 'snackbar', diff --git a/packages/edit-site/src/components/template-actions/rename-menu-item.js b/packages/edit-site/src/components/template-actions/rename-menu-item.js index cee30e64e99f2..9c6368ced17bf 100644 --- a/packages/edit-site/src/components/template-actions/rename-menu-item.js +++ b/packages/edit-site/src/components/template-actions/rename-menu-item.js @@ -14,9 +14,13 @@ import { } from '@wordpress/components'; import { store as coreStore } from '@wordpress/core-data'; import { store as noticesStore } from '@wordpress/notices'; +import { decodeEntities } from '@wordpress/html-entities'; export default function RenameMenuItem( { template, onClose } ) { - const [ title, setTitle ] = useState( () => template.title.rendered ); + const [ title, setTitle ] = useState( + decodeEntities( template.title.rendered ) + ); + const [ isModalOpen, setIsModalOpen ] = useState( false ); const { @@ -69,12 +73,7 @@ export default function RenameMenuItem( { template, onClose } ) { return ( <> - { - setIsModalOpen( true ); - setTitle( template.title.rendered ); - } } - > + setIsModalOpen( true ) }> { __( 'Rename' ) } { isModalOpen && ( From 55970a115568a77d1599d9256fcf8b6312465222 Mon Sep 17 00:00:00 2001 From: Saxon Fletcher Date: Mon, 10 Jul 2023 15:36:52 +1000 Subject: [PATCH 110/146] add sync tooltip (#52458) --- .../src/components/page-patterns/grid-item.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/packages/edit-site/src/components/page-patterns/grid-item.js b/packages/edit-site/src/components/page-patterns/grid-item.js index b78c58f5a2572..0b1f6dc1fdf8d 100644 --- a/packages/edit-site/src/components/page-patterns/grid-item.js +++ b/packages/edit-site/src/components/page-patterns/grid-item.js @@ -173,10 +173,19 @@ function GridItem( { categoryId, item, ...props } ) { className="edit-site-patterns__pattern-title" > { itemIcon && ( - + + + + + ) } { item.title } From 5c3c9fd8f953059385cd581d03573b25334f9f53 Mon Sep 17 00:00:00 2001 From: Rich Tabor Date: Mon, 10 Jul 2023 01:51:12 -0400 Subject: [PATCH 111/146] Quote block: Add transform to paragraph (#51809) * Add ungroup transform as transform to p * Lint * Update test and snapshot. --------- Co-authored-by: Juan Aldasoro --- .../test/__snapshots__/transforms.native.js.snap | 10 ++++++++++ .../src/quote/test/transforms.native.js | 6 +++++- packages/block-library/src/quote/transforms.js | 13 +++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/quote/test/__snapshots__/transforms.native.js.snap b/packages/block-library/src/quote/test/__snapshots__/transforms.native.js.snap index 5b5df918f2bee..65d87d5b0d7bd 100644 --- a/packages/block-library/src/quote/test/__snapshots__/transforms.native.js.snap +++ b/packages/block-library/src/quote/test/__snapshots__/transforms.native.js.snap @@ -22,6 +22,16 @@ exports[`Quote block transforms to Group block 1`] = ` " `; +exports[`Quote block transforms to Paragraph block 1`] = ` +" +

    "This will make running your own blog a viable alternative again."

    + + + +

    Adrian Zumbrunnen

    +" +`; + exports[`Quote block transforms to Pullquote block 1`] = ` "

    "This will make running your own blog a viable alternative again."

    Adrian Zumbrunnen
    diff --git a/packages/block-library/src/quote/test/transforms.native.js b/packages/block-library/src/quote/test/transforms.native.js index 46c4eb2b6f972..25030e0a018d4 100644 --- a/packages/block-library/src/quote/test/transforms.native.js +++ b/packages/block-library/src/quote/test/transforms.native.js @@ -21,7 +21,11 @@ const initialHtml = ` `; const transformsWithInnerBlocks = [ 'Columns', 'Group' ]; -const blockTransforms = [ 'Pullquote', ...transformsWithInnerBlocks ]; +const blockTransforms = [ + 'Pullquote', + 'Paragraph', + ...transformsWithInnerBlocks, +]; setupCoreBlocks(); diff --git a/packages/block-library/src/quote/transforms.js b/packages/block-library/src/quote/transforms.js index d4cd77177bf03..4e153a6399029 100644 --- a/packages/block-library/src/quote/transforms.js +++ b/packages/block-library/src/quote/transforms.js @@ -109,6 +109,19 @@ const transforms = { } ); }, }, + { + type: 'block', + blocks: [ 'core/paragraph' ], + transform: ( { citation }, innerBlocks ) => + citation + ? [ + ...innerBlocks, + createBlock( 'core/paragraph', { + content: citation, + } ), + ] + : innerBlocks, + }, { type: 'block', blocks: [ 'core/group' ], From 64de20f5117e20e16689898b8139534f5b36e956 Mon Sep 17 00:00:00 2001 From: James Koster Date: Mon, 10 Jul 2023 07:01:47 +0100 Subject: [PATCH 112/146] Fix document title icon appearance (#52424) --- .../components/header-edit-mode/document-actions/style.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/edit-site/src/components/header-edit-mode/document-actions/style.scss b/packages/edit-site/src/components/header-edit-mode/document-actions/style.scss index 6281887b13738..d26bbdaf28ff6 100644 --- a/packages/edit-site/src/components/header-edit-mode/document-actions/style.scss +++ b/packages/edit-site/src/components/header-edit-mode/document-actions/style.scss @@ -40,6 +40,10 @@ overflow: hidden; grid-column: 2 / 3; + .block-editor-block-icon { + min-width: $grid-unit-30; + } + h1 { white-space: nowrap; overflow: hidden; From ee7b90d57a6807f87e7aeb4d6d0c3c13ead47db1 Mon Sep 17 00:00:00 2001 From: Jarda Snajdr Date: Mon, 10 Jul 2023 09:13:22 +0200 Subject: [PATCH 113/146] Update caniuse-lite, browserslist and core-js (#52420) * Upgrade core-js, browserslist and caniuse-lite to latest versions * Update webpack test snapshots --- package-lock.json | 875 +++++++++--------- package.json | 5 +- packages/babel-preset-default/package.json | 4 +- .../test/__snapshots__/build.js.snap | 8 +- packages/react-native-editor/package.json | 2 +- packages/scripts/package.json | 2 +- 6 files changed, 431 insertions(+), 465 deletions(-) diff --git a/package-lock.json b/package-lock.json index f9e56d0a6b9a1..a0a00a13e4520 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10462,7 +10462,7 @@ "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { "ansi-regex": "^2.0.0" @@ -13592,7 +13592,7 @@ "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { "ansi-regex": "^2.0.0" @@ -16075,7 +16075,7 @@ "@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", "dev": true }, "@types/keyv": { @@ -17216,8 +17216,8 @@ "@wordpress/browserslist-config": "file:packages/browserslist-config", "@wordpress/element": "file:packages/element", "@wordpress/warning": "file:packages/warning", - "browserslist": "^4.17.6", - "core-js": "^3.19.1" + "browserslist": "^4.21.9", + "core-js": "^3.31.0" } }, "@wordpress/base-styles": { @@ -18385,7 +18385,7 @@ "@wordpress/i18n": "file:packages/i18n", "@wordpress/react-native-aztec": "file:packages/react-native-aztec", "@wordpress/react-native-bridge": "file:packages/react-native-bridge", - "core-js": "^3.19.1", + "core-js": "^3.31.0", "fast-average-color": "^9.1.1", "gettext-parser": "^1.3.1", "jed": "^1.1.1", @@ -18620,7 +18620,7 @@ "adm-zip": "^0.5.9", "babel-jest": "^29.5.0", "babel-loader": "^8.2.3", - "browserslist": "^4.17.6", + "browserslist": "^4.21.9", "chalk": "^4.0.0", "check-node-version": "^4.1.0", "clean-webpack-plugin": "^3.0.0", @@ -18818,7 +18818,7 @@ "absolute-path": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/absolute-path/-/absolute-path-0.0.0.tgz", - "integrity": "sha512-HQiug4c+/s3WOvEnDRxXVmNtSG5s2gJM9r19BTcqjp7BWcE48PB+Y2G6jE65kqI0LpsQeMZygt/b60Gi4KxGyA==" + "integrity": "sha1-p4di+9rftSl76ZsV01p4Wy8JW/c=" }, "accepts": { "version": "1.3.7", @@ -25860,7 +25860,7 @@ "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" } } }, @@ -25885,7 +25885,7 @@ "arr-diff": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==" + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" }, "arr-flatten": { "version": "1.1.0", @@ -25895,7 +25895,7 @@ "arr-union": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==" + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" }, "array-differ": { "version": "3.0.0", @@ -25906,14 +25906,14 @@ "array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", "dev": true, "optional": true }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", "dev": true }, "array-ify": { @@ -26170,7 +26170,7 @@ "array-union": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", "dev": true, "requires": { "array-uniq": "^1.0.1" @@ -26179,13 +26179,13 @@ "array-uniq": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", "dev": true }, "array-unique": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==" + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" }, "array.prototype.flat": { "version": "1.2.1", @@ -26929,7 +26929,7 @@ "asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==" + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" }, "asn1": { "version": "0.2.3", @@ -26970,13 +26970,13 @@ "inherits": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha512-8nWq2nLTAwd02jTqJExUYFSD/fKq6VH9Y/oG2accc/kdI0V98Bag8d5a4gi3XHz73rDWa2PvTtvcWYquKqSENA==", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", "dev": true }, "util": { "version": "0.10.3", "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha512-5KiHfsmkqacuKjkRkdV7SsfDJ2EGiPsK92s2MhNSY0craxjTdKTtqKsJaCWp4LW33ZZ0OPUv1WO/TFvNQRiQxQ==", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", "dev": true, "requires": { "inherits": "2.0.1" @@ -26987,13 +26987,13 @@ "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "dev": true }, "assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==" + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" }, "ast-types": { "version": "0.14.2", @@ -27006,7 +27006,7 @@ "ast-types-flow": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz", - "integrity": "sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag==", + "integrity": "sha1-9wtzXGvKGlycItmCw+Oef+ujva0=", "dev": true }, "astral-regex": { @@ -27034,7 +27034,7 @@ "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "dev": true }, "at-least-node": { @@ -27051,7 +27051,7 @@ "atob-lite": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/atob-lite/-/atob-lite-2.0.0.tgz", - "integrity": "sha512-LEeSAWeh2Gfa2FtlQE1shxQ8zi5F9GHarrGKz08TMdODD5T4eH6BMsvtnhbWZ+XQn+Gb6om/917ucvRu7l7ukw==", + "integrity": "sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY=", "dev": true }, "autoprefixer": { @@ -27068,41 +27068,10 @@ "postcss-value-parser": "^4.1.0" }, "dependencies": { - "browserslist": { - "version": "4.16.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.3.tgz", - "integrity": "sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001181", - "colorette": "^1.2.1", - "electron-to-chromium": "^1.3.649", - "escalade": "^3.1.1", - "node-releases": "^1.1.70" - } - }, - "colorette": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", - "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.690", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.690.tgz", - "integrity": "sha512-zPbaSv1c8LUKqQ+scNxJKv01RYFkVVF1xli+b+3Ty8ONujHjAMg+t/COmdZqrtnS1gT+g4hbSodHillymt1Lww==", - "dev": true - }, - "node-releases": { - "version": "1.1.71", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", - "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==", - "dev": true - }, "postcss-value-parser": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", - "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true } } @@ -27121,7 +27090,7 @@ "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", "dev": true }, "aws4": { @@ -27554,7 +27523,7 @@ "babel-plugin-transform-remove-console": { "version": "6.9.4", "resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-console/-/babel-plugin-transform-remove-console-6.9.4.tgz", - "integrity": "sha512-88blrUrMX3SPiGkT1GnvVY8E/7A+k6oj3MNvUtTIxJflFzXTw1bHkuJ/y039ouhFMp2prRn5cQGzokViYi1dsg==", + "integrity": "sha1-uYA2DAZzhOJLNXpYjYB9PINSd4A=", "dev": true }, "babel-preset-current-node-syntax": { @@ -27649,7 +27618,7 @@ "define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { "is-descriptor": "^1.0.0" } @@ -27690,7 +27659,7 @@ "batch": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", - "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", + "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", "dev": true }, "batch-processor": { @@ -27702,7 +27671,7 @@ "bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", "dev": true, "optional": true, "requires": { @@ -27718,7 +27687,7 @@ "benchmark": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/benchmark/-/benchmark-2.1.4.tgz", - "integrity": "sha512-l9MlfN4M1K/H2fbhfMy3B7vJd6AGKJVQn2h6Sg/Yx+KckoUA7ewS5Vv6TjSq18ooE1kS9hhAlQRH3AkXIh/aOQ==", + "integrity": "sha1-CfPeMckWQl1JjMLuVloOvzwqVik=", "dev": true, "requires": { "lodash": "^4.17.4", @@ -27904,7 +27873,7 @@ "boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" }, "boxen": { "version": "5.1.2", @@ -28030,7 +27999,7 @@ "brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", "dev": true }, "browser-assert": { @@ -28138,27 +28107,14 @@ } }, "browserslist": { - "version": "4.17.6", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.6.tgz", - "integrity": "sha512-uPgz3vyRTlEiCv4ee9KlsKgo2V6qPk7Jsn0KAn2OBqbqKo3iNcPEC1Ti6J4dwnz+aIRfEEEuOzC9IBk8tXUomw==", + "version": "4.21.9", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", + "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", "requires": { - "caniuse-lite": "^1.0.30001274", - "electron-to-chromium": "^1.3.886", - "escalade": "^3.1.1", - "node-releases": "^2.0.1", - "picocolors": "^1.0.0" - }, - "dependencies": { - "electron-to-chromium": { - "version": "1.3.889", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.889.tgz", - "integrity": "sha512-suEUoPTD1mExjL9TdmH7cvEiWJVM2oEiAi+Y1p0QKxI2HcRlT44qDTP2c1aZmVwRemIPYOpxmV7CxQCOWcm4XQ==" - }, - "node-releases": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.1.tgz", - "integrity": "sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA==" - } + "caniuse-lite": "^1.0.30001503", + "electron-to-chromium": "^1.4.431", + "node-releases": "^2.0.12", + "update-browserslist-db": "^1.0.11" } }, "bser": { @@ -28172,7 +28128,7 @@ "btoa-lite": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/btoa-lite/-/btoa-lite-1.0.0.tgz", - "integrity": "sha512-gvW7InbIyF8AicrqWoptdW08pUxuhq8BEgowNajy9RhiE86fmGAGl+bLKo6oB8QP0CkqHLowfN0oJdKC/J6LbA==", + "integrity": "sha1-M3dm2hWAEhD92VbCLpxokaudAzc=", "dev": true }, "buffer": { @@ -28189,7 +28145,7 @@ "buffer-crc32": { "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", "dev": true }, "buffer-from": { @@ -28206,7 +28162,7 @@ "buffer-xor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", "dev": true }, "builtin-modules": { @@ -28218,13 +28174,13 @@ "builtin-status-codes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", "dev": true }, "builtins": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", - "integrity": "sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ==", + "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=", "dev": true }, "byte-size": { @@ -28471,7 +28427,7 @@ "caller-callsite": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", - "integrity": "sha512-JuG3qI4QOftFsZyOn1qq87fq5grLIyk1JYd5lJmdA+fG7aQ9pA/i3JIJGcO3q0MrRcHlOt1U+ZeHW8Dq9axALQ==", + "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", "requires": { "callsites": "^2.0.0" }, @@ -28479,14 +28435,14 @@ "callsites": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha512-ksWePWBloaWPxJYQ8TL0JHvtci6G5QTKwQ95RcWAa/lzoAKuAOflGdAK92hpHXjkwb8zLxoLNUoNYZgVsaJzvQ==" + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=" } } }, "caller-path": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", - "integrity": "sha512-MCL3sf6nCSXOwCTzvPKhN18TU7AHTvdtam8DAogxcrJ8Rjfbbg7Lgng64H9Iy+vUV6VGFClN/TyxBkAebLRR4A==", + "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", "requires": { "caller-callsite": "^2.0.0" } @@ -28494,7 +28450,7 @@ "callsite": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", - "integrity": "sha512-0vdNRFXn5q+dtOqjfFtmtlI9N2eVZ7LMyEV2iKC5mEEFvSg/69Ml6b/WU2qF8W1nLRa0wiSrDT3Y5jOHZCwKPQ==", + "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", "dev": true }, "callsites": { @@ -28525,7 +28481,7 @@ "camelcase-keys": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha512-bA/Z/DERHKqoEOrp+qeGKw1QlvEQkGZSc0XaY6VnTxZr+Kv1G5zFwttpjv8qxZ/sBPT4nthwZaAcsAZTJlSKXQ==", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, "optional": true, "requires": { @@ -28536,7 +28492,7 @@ "camelcase": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha512-DLIsRzJVBQu72meAKPkWQOLcujdXT32hwdfnkI1frSiSRMK1MofjKHf+MEx0SB6fjEFXL8fBDv1dKymBlOp4Qw==", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", "dev": true, "optional": true } @@ -28560,9 +28516,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001488", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001488.tgz", - "integrity": "sha512-NORIQuuL4xGpIy6iCCQGN4iFjlBXtfKWIenlUuyZJumLRIindLb7wXM+GO8erEhb7vXfcnf4BAg2PrSDN5TNLQ==" + "version": "1.0.30001513", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001513.tgz", + "integrity": "sha512-pnjGJo7SOOjAGytZZ203Em95MRM8Cr6jhCXNF/FAXTpCTRTECnqQWLpiTRqrFtdYcth8hf4WECUpkezuYsMVww==" }, "capital-case": { "version": "1.0.4", @@ -28592,7 +28548,7 @@ "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", "dev": true }, "ccount": { @@ -28911,7 +28867,7 @@ "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { "is-descriptor": "^0.1.0" } @@ -29105,7 +29061,7 @@ "cli-truncate": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-0.2.1.tgz", - "integrity": "sha512-f4r4yJnbT++qUPI9NR4XLDLq41gQ+uqnPItWG0F5ZkehuNiTTa3EY0S4AqTSUOeJ7/zU41oWPQSNkW5BqPL9bg==", + "integrity": "sha1-nxXPuwcFAFNpIWxiasfQWrkN1XQ=", "dev": true, "requires": { "slice-ansi": "0.0.4", @@ -29115,13 +29071,13 @@ "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "dev": true }, "is-fullwidth-code-point": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { "number-is-nan": "^1.0.0" @@ -29130,7 +29086,7 @@ "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { "code-point-at": "^1.0.0", @@ -29141,7 +29097,7 @@ "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { "ansi-regex": "^2.0.0" @@ -29213,7 +29169,7 @@ "clone": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==" + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=" }, "clone-deep": { "version": "4.0.1", @@ -29288,7 +29244,7 @@ "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true }, "collapse-white-space": { @@ -29306,7 +29262,7 @@ "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", "requires": { "map-visit": "^1.0.0", "object-visit": "^1.0.0" @@ -29453,7 +29409,7 @@ "commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==" + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" }, "compare-func": { "version": "2.0.0", @@ -29565,12 +29521,12 @@ "computed-style": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/computed-style/-/computed-style-0.1.4.tgz", - "integrity": "sha512-WpAmaKbMNmS3OProfHIdJiNleNJdgUrJfbKArXua28QF7+0CoZjlLn0lp6vlc+dl5r2/X9GQiQRQQU4BzSa69w==" + "integrity": "sha1-fzRP2FhLLkJb7cpKGvwOMAuwXXQ=" }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "concat-stream": { "version": "1.6.2", @@ -29587,7 +29543,7 @@ "concurrently": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-3.5.0.tgz", - "integrity": "sha512-Z2iVM5+c0VxKmENTXrG/kp+MUhWEEH+wI5wV/L8CTFJDb/uae1zSVIkNM7o3W4Tdt42pv7RGsOICaskWy9bqSA==", + "integrity": "sha1-jPG3cHppFqeKT/W3e7BN7FSzebI=", "dev": true, "requires": { "chalk": "0.5.1", @@ -29603,19 +29559,19 @@ "ansi-regex": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz", - "integrity": "sha512-sGwIGMjhYdW26/IhwK2gkWWI8DRCVO6uj3hYgHT+zD+QL1pa37tM3ujhyfcJIYSbsxp7Gxhy7zrRW/1AHm4BmA==", + "integrity": "sha1-DY6UaWej2BQ/k+JOKYUl/BsiNfk=", "dev": true }, "ansi-styles": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz", - "integrity": "sha512-f2PKUkN5QngiSemowa6Mrk9MPCdtFiOSmibjZ+j1qhLGHHYsqZwmBMRF3IRMVXo8sybDqx2fJl2d/8OphBoWkA==", + "integrity": "sha1-6uy/Zs1waIJ2Cy9GkVgrj1XXp94=", "dev": true }, "chalk": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz", - "integrity": "sha512-bIKA54hP8iZhyDT81TOsJiQvR1gW+ZYSXFaZUAvoD4wCHdbHY2actmpTE4x344ZlFqHbvoxKOaESULTZN2gstg==", + "integrity": "sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=", "dev": true, "requires": { "ansi-styles": "^1.1.0", @@ -29628,7 +29584,7 @@ "supports-color": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz", - "integrity": "sha512-tdCZ28MnM7k7cJDJc7Eq80A9CsRFAAOZUy41npOZCs++qSjfIy7o5Rh46CBk+Dk5FbKJ33X3Tqg4YrV07N5RaA==", + "integrity": "sha1-2S3iaU6z9nMjlz1649i1W0wiGQo=", "dev": true } } @@ -29636,7 +29592,7 @@ "commander": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.6.0.tgz", - "integrity": "sha512-PhbTMT+ilDXZKqH8xbvuUY2ZEQNef0Q7DKxgoEKb4ccytsdvVVJmYqR0sGbi96nxU6oGrwEIQnclpK2NBZuQlg==", + "integrity": "sha1-nfflL7Kgyw+4kFjugMMQQiXzfh0=", "dev": true }, "date-fns": { @@ -29657,13 +29613,13 @@ "has-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", "dev": true }, "strip-ansi": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz", - "integrity": "sha512-DerhZL7j6i6/nEnVG0qViKXI0OKouvvpsAiaj7c+LfqZZZxdwZtv8+UiA/w4VUJpT8UzX0pR1dcHOii1GbmruQ==", + "integrity": "sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=", "dev": true, "requires": { "ansi-regex": "^0.2.1" @@ -29672,7 +29628,7 @@ "supports-color": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", "dev": true, "requires": { "has-flag": "^1.0.0" @@ -29726,7 +29682,7 @@ "console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "dev": true }, "constant-case": { @@ -29742,7 +29698,7 @@ "constants-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", "dev": true }, "content-type": { @@ -30077,7 +30033,7 @@ "cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", "dev": true }, "copy-concurrently": { @@ -30122,7 +30078,7 @@ "copy-descriptor": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==" + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" }, "copy-dir": { "version": "1.3.0", @@ -30257,22 +30213,34 @@ } }, "core-js": { - "version": "3.19.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.19.1.tgz", - "integrity": "sha512-Tnc7E9iKd/b/ff7GFbhwPVzJzPztGrChB8X8GLqoYGdEOG8IpLnK1xPyo3ZoO3HsK6TodJS58VGPOxA+hLHQMg==" + "version": "3.31.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.31.0.tgz", + "integrity": "sha512-NIp2TQSGfR6ba5aalZD+ZQ1fSxGhDo/s1w0nx3RYzf2pnJxt7YynxFlFScP6eV7+GZsKO95NSjGxyJsU3DZgeQ==" }, "core-js-builder": { - "version": "3.19.1", - "resolved": "https://registry.npmjs.org/core-js-builder/-/core-js-builder-3.19.1.tgz", - "integrity": "sha512-PuQdf3ycpvB4jGxtp42uPREHWHzHV/N8QoSX5S5T2QFb8Uaig46oJRfxm6wwT38kfPWTh1gNcPZTzbi8oRoC0w==", + "version": "3.31.0", + "resolved": "https://registry.npmjs.org/core-js-builder/-/core-js-builder-3.31.0.tgz", + "integrity": "sha512-qx8vgRM3U4+IjlMqNQl7Vj53ectTm1FpzJ+nJSQuT865StCXvusxCO+HuASWIKlkoc+96AfnFa2MEdqvGep9nA==", "dev": true, "requires": { - "core-js": "3.19.1", - "core-js-compat": "3.19.1", + "core-js": "3.31.0", + "core-js-compat": "3.31.0", "mkdirp": ">=0.5.5 <1", "webpack": ">=4.46.0 <5" }, "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, "braces": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", @@ -30372,21 +30340,21 @@ "to-regex": "^3.0.2" } }, + "minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true + }, "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", "dev": true, "requires": { - "minimist": "^1.2.5" + "minimist": "^1.2.6" } }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, "tapable": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", @@ -30450,20 +30418,6 @@ "terser-webpack-plugin": "^1.4.3", "watchpack": "^1.7.4", "webpack-sources": "^1.4.1" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - } } }, "webpack-sources": { @@ -30479,25 +30433,17 @@ } }, "core-js-compat": { - "version": "3.19.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.19.1.tgz", - "integrity": "sha512-Q/VJ7jAF/y68+aUsQJ/afPOewdsGkDtcMb40J8MbuWKlK3Y+wtHq8bTHKPj2WKWLIqmS5JhHs4CzHtz6pT2W6g==", + "version": "3.31.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.31.0.tgz", + "integrity": "sha512-hM7YCu1cU6Opx7MXNu0NuumM0ezNeAeRKadixyiQELWY3vT3De9S4J5ZBMraWV2vZnrE1Cirl0GtFtDtMUXzPw==", "requires": { - "browserslist": "^4.17.6", - "semver": "7.0.0" - }, - "dependencies": { - "semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==" - } + "browserslist": "^4.21.5" } }, "core-js-pure": { - "version": "3.19.1", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.19.1.tgz", - "integrity": "sha512-Q0Knr8Es84vtv62ei6/6jXH/7izKmOrtrxH9WJTHLCMAVeU+8TF8z8Nr08CsH4Ot0oJKzBzJJL9SJBYIv7WlfQ==", + "version": "3.31.0", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.31.0.tgz", + "integrity": "sha512-/AnE9Y4OsJZicCzIe97JP5XoPKQJfTuEG43aEVLFJGOJpyqELod+pE6LEl63DfG1Mp8wX97LDaDpy1GmLEUxlg==", "dev": true }, "core-util-is": { @@ -30698,7 +30644,7 @@ "cross-env": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-3.2.4.tgz", - "integrity": "sha512-T8AFEAiuJ0w53ou6rnu3Fipaiu1W6ZO9GYfd33uxe1kAIiXM0fD8QnIm7orcJBOt7WQC5Ply63E7WZW/jSM+FA==", + "integrity": "sha1-ngWF8neGTtQhznVvgamA/w1piro=", "dev": true, "requires": { "cross-spawn": "^5.1.0", @@ -30756,7 +30702,7 @@ "css-color-keywords": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz", - "integrity": "sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg==" + "integrity": "sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU=" }, "css-color-names": { "version": "1.0.1", @@ -30841,7 +30787,7 @@ "css-mediaquery": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/css-mediaquery/-/css-mediaquery-0.1.2.tgz", - "integrity": "sha512-COtn4EROW5dBGlE/4PiKnh6rZpAPxDeFLaEEwt4i10jpDMFt2EhQGS79QmmrO+iKCHv0PU/HrOWEhijFd1x99Q==" + "integrity": "sha1-aiw3NEkoYYYxxUvTPO3TAdoYvqA=" }, "css-to-react-native": { "version": "2.3.2", @@ -30882,7 +30828,7 @@ "css.escape": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", - "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==", + "integrity": "sha1-QuJ9T6BK4y+TGktNQZH6nN3ul8s=", "dev": true }, "cssesc": { @@ -30994,7 +30940,7 @@ "currently-unhandled": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng==", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", "dev": true, "optional": true, "requires": { @@ -31004,7 +30950,7 @@ "cwd": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/cwd/-/cwd-0.10.0.tgz", - "integrity": "sha512-YGZxdTTL9lmLkCUTpg4j0zQ7IhRB5ZmqNBbGCl3Tg6MP/d5/6sY7L5mmTjzbc6JKgVZYiqTQTNhPFsbXNGlRaA==", + "integrity": "sha1-FyQAaUBXwioTsM8WFix+S3p/5Wc=", "dev": true, "requires": { "find-pkg": "^0.1.2", @@ -31032,7 +30978,7 @@ "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "dev": true, "requires": { "assert-plus": "^1.0.0" @@ -31143,7 +31089,7 @@ "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==" + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" }, "decamelize-keys": { "version": "1.1.0", @@ -31194,7 +31140,7 @@ "dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", + "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", "dev": true }, "deep-equal": { @@ -31228,7 +31174,7 @@ "deep-freeze": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/deep-freeze/-/deep-freeze-0.0.1.tgz", - "integrity": "sha512-Z+z8HiAvsGwmjqlphnHW5oz6yWlOwu6EQfFTjmeTWlDeda3FS2yv3jhq35TX/ewmsnqB+RX2IdsIOyjJCQN5tg==", + "integrity": "sha1-OgsABd4YZygZ39OM0x+RF5yJPoQ=", "dev": true }, "deep-is": { @@ -31537,7 +31483,7 @@ "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true }, "delegate": { @@ -31548,13 +31494,13 @@ "delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "dev": true }, "denodeify": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/denodeify/-/denodeify-1.2.1.tgz", - "integrity": "sha512-KNTihKNmQENUZeKu5fzfpzRqR5S2VMp4gl9RFHiWzj9DfvYQPMJ6XHKNaQxaGCXwPk6y9yme3aUoaiAe+KX+vg==" + "integrity": "sha1-OjYof1A05pnnV3kBBSwubJQlFjE=" }, "depd": { "version": "1.1.2", @@ -31600,7 +31546,7 @@ "detect-indent": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", - "integrity": "sha512-rlpvsxUtM0PQvy9iZe640/IWwWYyBsTApREbA1pHOpmOUIl9MkP/U4z7vTtg4Oaojvqhxt7sdufnT0EzGaR31g==", + "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", "dev": true }, "detect-newline": { @@ -31824,7 +31770,7 @@ "dns-equal": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", - "integrity": "sha512-z+paD6YUQsk+AbGCEM4PrOXSss5gd66QfcVBFTKR/HpFL9jCqikS94HYwKww6fQyO7IxrIIyUu+g0Ka9tUS2Cg==", + "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=", "dev": true }, "dns-packet": { @@ -31879,7 +31825,7 @@ "dom-scroll-into-view": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/dom-scroll-into-view/-/dom-scroll-into-view-1.2.1.tgz", - "integrity": "sha512-LwNVg3GJOprWDO+QhLL1Z9MMgWe/KAFLxVWKzjRTxNSPn8/LLDIfmuG71YHznXCqaqTjvHJDYO1MEAgX6XCNbQ==" + "integrity": "sha1-6PNnMt0ImwIBqI14Fdw/iObWbH4=" }, "dom-serializer": { "version": "0.1.0", @@ -31989,7 +31935,7 @@ "downloadjs": { "version": "1.4.7", "resolved": "https://registry.npmjs.org/downloadjs/-/downloadjs-1.4.7.tgz", - "integrity": "sha512-LN1gO7+u9xjU5oEScGFKvXhYf7Y/empUIIEAGBs1LzUq/rg5duiDrkuH5A2lQGd5jfMOb9X9usDa2oVXwJ0U/Q==" + "integrity": "sha1-9p+W+UDg0FU9rCkROYZaPNAQHjw=" }, "downshift": { "version": "6.1.0", @@ -32040,12 +31986,17 @@ "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "electron-to-chromium": { + "version": "1.4.447", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.447.tgz", + "integrity": "sha512-sxX0LXh+uL41hSJsujAN86PjhrV/6c79XmpY0TvjZStV6VxIgarf8SRkUoUTuYmFcZQTemsoqo8qXOGw5npWfw==" }, "elegant-spinner": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz", - "integrity": "sha512-B+ZM+RXvRqQaAmkMlO/oSe5nMUOaUnyfGYCEHoR8wrXsZR2mA0XVibsxV1bvTwxdRWah1PkQqso2EzhILGHtEQ==", + "integrity": "sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=", "dev": true }, "element-resize-detector": { @@ -32106,7 +32057,7 @@ "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==" + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" }, "encoding": { "version": "0.1.12", @@ -32348,7 +32299,7 @@ "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" }, "escape-latex": { "version": "1.2.0", @@ -33855,7 +33806,7 @@ "etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==" + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, "event-target-shim": { "version": "5.0.1", @@ -33865,7 +33816,7 @@ "eventemitter2": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-1.0.5.tgz", - "integrity": "sha512-EUFhWUYzqqBZlzBMI+dPU8rnKXfQZEUnitnccQuEIAnvWFHCpt3+4fts2+4dpxLtlsiseVXCMFg37KjYChSxpg==" + "integrity": "sha1-+YNhBRexc3wLncZDvsqTiTwE3xg=" }, "eventemitter3": { "version": "4.0.7", @@ -34022,13 +33973,13 @@ "exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", "dev": true }, "expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "requires": { "debug": "^2.3.3", "define-property": "^0.2.5", @@ -34050,7 +34001,7 @@ "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { "is-descriptor": "^0.1.0" } @@ -34058,7 +34009,7 @@ "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { "is-extendable": "^0.1.0" } @@ -34068,7 +34019,7 @@ "expand-tilde": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-1.2.2.tgz", - "integrity": "sha512-rtmc+cjLZqnu9dSYosX9EWmSJhTwpACgJQTfj4hgg2JjOD/6SIQalZrt4a3aQeh++oNxkazcaxrhPUj6+g5G/Q==", + "integrity": "sha1-C4HrqJflo9MdHD0QL48BRB5VlEk=", "dev": true, "requires": { "os-homedir": "^1.0.1" @@ -34309,7 +34260,7 @@ "extend-shallow": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "requires": { "assign-symbols": "^1.0.0", "is-extendable": "^1.0.1" @@ -34375,7 +34326,7 @@ "define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { "is-descriptor": "^1.0.0" } @@ -34383,7 +34334,7 @@ "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { "is-extendable": "^0.1.0" } @@ -34442,7 +34393,7 @@ "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", "dev": true }, "fast-average-color": { @@ -34578,7 +34529,7 @@ "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, "fast-memoize": { @@ -34768,7 +34719,7 @@ "filename-reserved-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", - "integrity": "sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ==", + "integrity": "sha1-q/c9+rc10EVECr/qLZHzieu/oik=", "dev": true }, "filenamify": { @@ -34811,7 +34762,7 @@ "filter-obj": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", - "integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==" + "integrity": "sha1-mzERErxsYSehbgFsbF1/GeCAXFs=" }, "finalhandler": { "version": "1.1.2", @@ -34843,7 +34794,7 @@ "statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==" + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" } } }, @@ -34927,7 +34878,7 @@ "find-file-up": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/find-file-up/-/find-file-up-0.1.3.tgz", - "integrity": "sha512-mBxmNbVyjg1LQIIpgO8hN+ybWBgDQK8qjht+EbrTCGmmPV/sc7RF1i9stPTD6bpvXZywBdrwRYxhSdJv867L6A==", + "integrity": "sha1-z2gJG8+fMApA2kEbN9pczlovvqA=", "dev": true, "requires": { "fs-exists-sync": "^0.1.0", @@ -34943,7 +34894,7 @@ "find-pkg": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/find-pkg/-/find-pkg-0.1.2.tgz", - "integrity": "sha512-0rnQWcFwZr7eO0513HahrWafsc3CTFioEB7DRiEYCUM/70QXSY8f3mCST17HXLcPvEhzH/Ty/Bxd72ZZsr/yvw==", + "integrity": "sha1-G9wiwG42NlUy4qJIBGhUuXiNpVc=", "dev": true, "requires": { "find-file-up": "^0.1.2" @@ -35148,12 +35099,12 @@ "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==" + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" }, "for-own": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha512-SKmowqGTJoPzLO1T0BBJpkfp3EMacCMOuH40hOUbrbzElVktk4DioXVM99QkLCyKoiuOmyjgcWMpVz2xjE7LZw==", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", "dev": true, "requires": { "for-in": "^1.0.1" @@ -35220,7 +35171,7 @@ "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", "dev": true }, "fork-ts-checker-webpack-plugin": { @@ -35367,7 +35318,7 @@ "format": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/format/-/format-0.2.2.tgz", - "integrity": "sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==", + "integrity": "sha1-1hcBB+nv3E7TDJ3DkBbflCtctYs=", "dev": true }, "fraction.js": { @@ -35379,7 +35330,7 @@ "fragment-cache": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", "requires": { "map-cache": "^0.2.2" } @@ -35403,12 +35354,12 @@ "fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==" + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" }, "from2": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", "dev": true, "requires": { "inherits": "^2.0.1", @@ -35424,7 +35375,7 @@ "fs-exists-sync": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz", - "integrity": "sha512-cR/vflFyPZtrN6b38ZyWxpWdhlXrzZEBawlpBQMq7033xVY7/kg0GDMBK5jg8lDYQckdJ5x/YC88lM3C7VMsLg==", + "integrity": "sha1-mC1ok6+RjnLQjeyehnP/K1qNat0=", "dev": true }, "fs-extra": { @@ -35479,7 +35430,7 @@ "fs-write-stream-atomic": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", - "integrity": "sha512-gehEzmPn2nAwr39eay+x3X34Ra+M2QlVUTLhkXPjWdeO8RF9kszk116avgBJM3ZyNHgHXBNx+VmPaFC36k0PzA==", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", "dev": true, "requires": { "graceful-fs": "^4.1.2", @@ -35491,7 +35442,7 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { "version": "2.3.2", @@ -35844,7 +35795,7 @@ "get-stdin": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha512-F5aQMywwJ2n85s4hJPTT9RPxGmubonuB10MNYo17/xph174n2MIR33HRguhzVag10O/npM7SPk73LMZNP+FaWw==", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", "dev": true, "optional": true }, @@ -35911,12 +35862,12 @@ "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==" + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "dev": true, "requires": { "assert-plus": "^1.0.0" @@ -36295,13 +36246,13 @@ "globjoin": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/globjoin/-/globjoin-0.1.4.tgz", - "integrity": "sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg==", + "integrity": "sha1-L0SUrIkZ43Z8XLtpHp9GMyQoXUM=", "dev": true }, "good-listener": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", - "integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==", + "integrity": "sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=", "requires": { "delegate": "^3.1.2" } @@ -36333,7 +36284,7 @@ "gradient-parser": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/gradient-parser/-/gradient-parser-0.1.5.tgz", - "integrity": "sha512-+uPlcVbjrKOnTzvz0MjTj7BfACj8OmxIa1moIjJV7btvhUMSJk0D47RfDCgDrZE3dYMz9Cf5xKJwnrKLjUq0KQ==" + "integrity": "sha1-DH4heVWeXOfY1x9EI6+TcQCyJIw=" }, "handle-thing": { "version": "2.0.1", @@ -36365,7 +36316,7 @@ "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", "dev": true }, "har-validator": { @@ -36432,7 +36383,7 @@ "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==" + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, "has-glob": { "version": "1.0.0", @@ -36507,13 +36458,13 @@ "has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "dev": true }, "has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw==", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", "requires": { "get-value": "^2.0.6", "has-values": "^1.0.0", @@ -36523,7 +36474,7 @@ "has-values": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", "requires": { "is-number": "^3.0.0", "kind-of": "^4.0.0" @@ -36532,7 +36483,7 @@ "kind-of": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "requires": { "is-buffer": "^1.1.5" } @@ -36838,7 +36789,7 @@ "hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", "dev": true, "requires": { "hash.js": "^1.0.3", @@ -36892,7 +36843,7 @@ "hpack.js": { "version": "2.1.6", "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", - "integrity": "sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ==", + "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", "dev": true, "requires": { "inherits": "^2.0.1", @@ -36998,7 +36949,7 @@ "htmlparser2-without-node-native": { "version": "3.9.2", "resolved": "https://registry.npmjs.org/htmlparser2-without-node-native/-/htmlparser2-without-node-native-3.9.2.tgz", - "integrity": "sha512-+FplQXqmY5fRx6vCIp2P5urWaoBCpTNJMXnKP/6mNCcyb+AZWWJzA8D03peXfozlxDL+vpgLK5dJblqEgu8j6A==", + "integrity": "sha1-s+0FDYd9D/NGWWnjOYd7f59mMfY=", "requires": { "domelementtype": "^1.3.0", "domhandler": "^2.3.0", @@ -37018,7 +36969,7 @@ "http-deceiver": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", - "integrity": "sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw==", + "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=", "dev": true }, "http-errors": { @@ -37196,7 +37147,7 @@ "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", "dev": true, "requires": { "assert-plus": "^1.0.0", @@ -37225,7 +37176,7 @@ "https-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", "dev": true }, "https-proxy-agent": { @@ -37299,7 +37250,7 @@ "iferr": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", - "integrity": "sha512-DUNFN5j7Tln0D+TxzloUjKB+CtVu6myn0JEFak6dG18mNt9YkQ6lzGCdafwofISZ1lLF3xRHJ98VKy9ynkcFaA==", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", "dev": true }, "ignore": { @@ -37417,7 +37368,7 @@ "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==" + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" }, "indent-string": { "version": "3.2.0", @@ -37440,7 +37391,7 @@ "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "requires": { "once": "^1.3.0", "wrappy": "1" @@ -37834,7 +37785,7 @@ "is-accessor-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { "kind-of": "^3.0.2" }, @@ -37842,7 +37793,7 @@ "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { "is-buffer": "^1.1.5" } @@ -37858,7 +37809,7 @@ "is-alphanumeric": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-alphanumeric/-/is-alphanumeric-1.0.0.tgz", - "integrity": "sha512-ZmRL7++ZkcMOfDuWZuMJyIVLr2keE1o/DeNWh1EmgqGhUcV+9BIVsx0BcSBOHTZqzjs4+dISzr2KAeBEWGgXeA==", + "integrity": "sha1-Spzvcdr0wAHB2B1j0UDPU/1oifQ=", "dev": true }, "is-alphanumerical": { @@ -37883,7 +37834,7 @@ "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" }, "is-bigint": { "version": "1.0.1", @@ -37970,7 +37921,7 @@ "is-data-descriptor": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { "kind-of": "^3.0.2" }, @@ -37978,7 +37929,7 @@ "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { "is-buffer": "^1.1.5" } @@ -38017,7 +37968,7 @@ "is-directory": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha512-yVChGzahRFvbkscn2MlwGismPO12i9+znNruC5gVEntG3qu0xQMzsGg/JFbrsqDOHtHFPci+V5aP5T9I+yeKqw==" + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=" }, "is-docker": { "version": "2.2.1", @@ -38038,12 +37989,12 @@ "is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==" + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, "is-finite": { @@ -38056,7 +38007,7 @@ "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==" + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" }, "is-function": { "version": "1.0.2", @@ -38230,7 +38181,7 @@ "is-regexp": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", - "integrity": "sha512-7zjFAPO4/gwyQAAgRRmqeEeyIICSdmCqa3tsVHMdBzaXXRiqopZL4Cyghg/XulGWrtABTpbnYYzzIRffLkP4oA==", + "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=", "dev": true }, "is-resolvable": { @@ -38263,7 +38214,7 @@ "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==" + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" }, "is-string": { "version": "1.0.5", @@ -38514,7 +38465,7 @@ "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "dev": true }, "is-unicode-supported": { @@ -38525,7 +38476,7 @@ "is-utf8": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", "dev": true, "optional": true }, @@ -38609,22 +38560,22 @@ "is-wsl": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", - "integrity": "sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw==" + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=" }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==" + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" }, "isomorphic-unfetch": { "version": "3.1.0", @@ -38639,7 +38590,7 @@ "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", "dev": true }, "istanbul-lib-coverage": { @@ -38772,7 +38723,7 @@ "jed": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/jed/-/jed-1.1.1.tgz", - "integrity": "sha512-z35ZSEcXHxLW4yumw0dF6L464NT36vmx3wxJw8MDpraBcWuNVgUPZgPJKcu1HekNgwlMFNqol7i/IpSbjhqwqA==" + "integrity": "sha1-elSbvZ/+FYWwzQoZHiAwVb7ldLQ=" }, "jest": { "version": "29.5.0", @@ -39674,7 +39625,7 @@ "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", "dev": true, "optional": true }, @@ -40010,7 +39961,7 @@ "json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, "json-stringify-nice": { @@ -40022,7 +39973,7 @@ "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "dev": true }, "json2php": { @@ -40045,7 +39996,7 @@ "jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "requires": { "graceful-fs": "^4.1.6" } @@ -40242,7 +40193,7 @@ "klaw": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", - "integrity": "sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw==", + "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", "requires": { "graceful-fs": "^4.1.9" } @@ -40282,7 +40233,7 @@ "language-tags": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.5.tgz", - "integrity": "sha512-qJhlO9cGXi6hBGKoxEG/sKZDAHD5Hnu9Hs4WbOY3pCWXDhw0N8x1NenNzm2EnNLkLkk7J2SdxAkDSbb6ftT+UQ==", + "integrity": "sha1-0yHbxNowuovzAk4ED6XBRmH5GTo=", "dev": true, "requires": { "language-subtag-registry": "~0.3.2" @@ -40291,7 +40242,7 @@ "lazy-cache": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha512-RE2g0b5VGZsOCFOCgP7omTRYFqydmZkBwl5oNnQ1lDYC57uyO9KqNnNVxT7COSHTxrRCWVcAVOcbjk+tvh/rgQ==", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", "dev": true }, "lazy-universal-dotenv": { @@ -40352,7 +40303,7 @@ "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "dev": true, "requires": { "prelude-ls": "~1.1.2", @@ -40559,7 +40510,7 @@ "line-height": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/line-height/-/line-height-0.3.1.tgz", - "integrity": "sha512-YExecgqPwnp5gplD2+Y8e8A5+jKpr25+DzMbFdI1/1UAr0FJrTFv4VkHLf8/6B590i1wUPJWMKKldkd/bdQ//w==", + "integrity": "sha1-SxIF7d4YKHKl76PI9iCzGHqcVMk=", "requires": { "computed-style": "~0.1.3" } @@ -40766,13 +40717,13 @@ "color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, "supports-color": { @@ -40934,7 +40885,7 @@ "listr-silent-renderer": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz", - "integrity": "sha512-L26cIFm7/oZeSNVhWB6faeorXhMg4HNlb/dS/7jHhr708jxlXrtrBWo4YUxZQkc6dGoxEAe6J/D3juTRBUzjtA==", + "integrity": "sha1-kktaN1cVN3C/Go4/v3S4u/P5JC4=", "dev": true }, "listr-update-renderer": { @@ -40956,19 +40907,19 @@ "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "dev": true }, "ansi-styles": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", "dev": true }, "chalk": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { "ansi-styles": "^2.2.1", @@ -40981,7 +40932,7 @@ "figures": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha512-UxKlfCRuCBxSXU4C6t9scbDyWZ4VlaFFdojKtzJuSkuOBQ5CNFum+zZXFwHjo+CxBC1t6zlYPgHIgFjL8ggoEQ==", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", "dev": true, "requires": { "escape-string-regexp": "^1.0.5", @@ -40991,7 +40942,7 @@ "log-symbols": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", - "integrity": "sha512-mmPrW0Fh2fxOzdBbFv4g1m6pR72haFLPJ2G5SJEELf1y+iaQrDG6cWCPjy54RHYbZAt7X+ls690Kw62AdWXBzQ==", + "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", "dev": true, "requires": { "chalk": "^1.0.0" @@ -41000,7 +40951,7 @@ "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { "ansi-regex": "^2.0.0" @@ -41009,7 +40960,7 @@ "supports-color": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", "dev": true } } @@ -41057,7 +41008,7 @@ "load-json-file": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "optional": true, "requires": { @@ -41071,7 +41022,7 @@ "parse-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "optional": true, "requires": { @@ -41125,36 +41076,36 @@ "lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==" + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=" }, "lodash.defaults": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", - "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==", + "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=", "dev": true }, "lodash.difference": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", - "integrity": "sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA==", + "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=", "dev": true }, "lodash.flatten": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", "dev": true }, "lodash.get": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", "dev": true }, "lodash.isequal": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" }, "lodash.ismatch": { "version": "4.4.0", @@ -41165,13 +41116,13 @@ "lodash.isplainobject": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", "dev": true }, "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", "dev": true }, "lodash.merge": { @@ -41183,30 +41134,30 @@ "lodash.set": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz", - "integrity": "sha512-4hNPN5jlm/N/HLMCO43v8BXKq9Z7QdAGc/VGrRD61w8gN9g/6jF9A4L1pbUgBLCffi0w9VsXfTOij5x8iTyFvg==", + "integrity": "sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=", "dev": true }, "lodash.throttle": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", - "integrity": "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==" + "integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=" }, "lodash.truncate": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", "dev": true }, "lodash.union": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", - "integrity": "sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw==", + "integrity": "sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=", "dev": true }, "lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", - "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", "dev": true }, "log-symbols": { @@ -41221,7 +41172,7 @@ "log-update": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/log-update/-/log-update-2.3.0.tgz", - "integrity": "sha512-vlP11XfFGyeNQlmEn9tJ66rEW1coA/79m5z6BCkudjbAGE83uhAcGYrBFwfs3AdLiLzGRusRPAbSPK9xZteCmg==", + "integrity": "sha1-iDKP19HOeTiykoN0bwsbwSayRwg=", "dev": true, "requires": { "ansi-escapes": "^3.0.0", @@ -41253,7 +41204,7 @@ "wrap-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-3.0.1.tgz", - "integrity": "sha512-iXR3tDXpbnTpzjKSylUJRkLuOrEC7hwEB221cgn6wtF8wpmz28puFXAEfPT5zrjM3wahygB//VuWEr1vTkDcNQ==", + "integrity": "sha1-KIoE2H7aXChuBg3+jxNc6NAH+Lo=", "dev": true, "requires": { "string-width": "^2.1.1", @@ -41394,7 +41345,7 @@ "loud-rejection": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha512-RPNliZOFkqFumDhvYqOaNY4Uz9oJM2K9tC6JWsJJsNdhuONW4LQHRBpb0qf4pJApVffI5N39SwzWZJuEhfd7eQ==", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", "dev": true, "optional": true, "requires": { @@ -41439,7 +41390,7 @@ "lz-string": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", - "integrity": "sha512-0ckx7ZHRPqb0oUm8zNr+90mtf9DQB60H1wMCjBtfi62Kl3a7JbHob6gA2bC+xRvZoOL+1hzUK8jeuEIQE8svEQ==", + "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=", "dev": true }, "macos-release": { @@ -41639,31 +41590,31 @@ "map-cache": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==" + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" }, "map-obj": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", "dev": true, "optional": true }, "map-or-similar": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/map-or-similar/-/map-or-similar-1.5.0.tgz", - "integrity": "sha512-0aF7ZmVon1igznGI4VS30yugpduQW3y3GkcgGJOp7d8x8QrizhigUxjI/m2UojsXXto+jLAH3KSz+xOJTiORjg==", + "integrity": "sha1-beJlMXSt+12e3DPGnT6Sobdvrwg=", "dev": true }, "map-values": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/map-values/-/map-values-1.0.1.tgz", - "integrity": "sha512-BbShUnr5OartXJe1GeccAWtfro11hhgNJg6G9/UtWKjVGvV5U4C09cg5nk8JUevhXODaXY+hQ3xxMUKSs62ONQ==", + "integrity": "sha1-douOecAJvytk/ugG4ip7HEGQyZA=", "dev": true }, "map-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", "requires": { "object-visit": "^1.0.0" } @@ -42121,7 +42072,7 @@ "mdast-util-inject": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/mdast-util-inject/-/mdast-util-inject-1.1.0.tgz", - "integrity": "sha512-CcJ0mHa36QYumDKiZ2OIR+ClhfOM7zIzN+Wfy8tRZ1hpH9DKLCS+Mh4DyK5bCxzE9uxMWcbIpeNFWsg1zrj/2g==", + "integrity": "sha1-2wa4tYW+lZotzS+H9HK6m3VvNnU=", "dev": true, "requires": { "mdast-util-to-string": "^1.0.0" @@ -42186,13 +42137,13 @@ "mdurl": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", + "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", "dev": true }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", "dev": true }, "mem": { @@ -42235,7 +42186,7 @@ "memoizerific": { "version": "1.11.3", "resolved": "https://registry.npmjs.org/memoizerific/-/memoizerific-1.11.3.tgz", - "integrity": "sha512-/EuHYwAPdLtXwAwSZkh/Gutery6pD2KYd44oQLhAvQp/50mpyduZh8Q7PYHXTCJ+wuXxt7oij2LXyIJOOYFPog==", + "integrity": "sha1-fIekZGREwy11Q4VwkF8tvRsagFo=", "dev": true, "requires": { "map-or-similar": "^1.5.0" @@ -42244,7 +42195,7 @@ "memory-fs": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", - "integrity": "sha512-cda4JKCxReDXFXRqOHPQscuIYg1PvxbE2S2GP45rnwfEK+vZaXC8C1OFvdHIbgw0DLzowXGVoxLaAmlgRy14GQ==", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", "dev": true, "requires": { "errno": "^0.1.3", @@ -42254,7 +42205,7 @@ "memorystream": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", - "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=", "dev": true }, "meow": { @@ -42391,7 +42342,7 @@ "clone-deep": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-0.2.4.tgz", - "integrity": "sha512-we+NuQo2DHhSl+DP6jlUiAhyAjBQrYnpOk15rN6c6JSPScjiCLh8IbSU+VTcph6YS3o7mASE8a0+gbZ7ChLpgg==", + "integrity": "sha1-TnPdCen7lxzDhnDF3O2cGJZIHMY=", "dev": true, "requires": { "for-own": "^0.1.3", @@ -42415,7 +42366,7 @@ "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { "is-buffer": "^1.1.5" @@ -42424,7 +42375,7 @@ "shallow-clone": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-0.1.2.tgz", - "integrity": "sha512-J1zdXCky5GmNnuauESROVu31MQSnLoYvlyEn6j2Ztk6Q5EHFIhxkMhYcv6vuDzl2XEzoRr856QwzMgWM/TmZgw==", + "integrity": "sha1-WQnodLp3EG1zrEFM/sH/yofZcGA=", "dev": true, "requires": { "is-extendable": "^0.1.1", @@ -42436,7 +42387,7 @@ "kind-of": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-2.0.1.tgz", - "integrity": "sha512-0u8i1NZ/mg0b+W3MGGw5I7+6Eib2nx72S/QvXa0hYjEkjTknYmEYQJwGu3mLC0BrhtJjtQafTkyRUQ75Kx0LVg==", + "integrity": "sha1-AY7HpM5+OobLkUG+UZ0kyPqpgbU=", "dev": true, "requires": { "is-buffer": "^1.0.2" @@ -42445,7 +42396,7 @@ "lazy-cache": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", - "integrity": "sha512-gkX52wvU/R8DVMMt78ATVPFMJqfW8FPz1GZ1sVHBVQHmu/WvhIWE4cE1GBzhJNFicDeYhnwp6Rl35BcAIM3YOQ==", + "integrity": "sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=", "dev": true } } @@ -42455,7 +42406,7 @@ "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", "dev": true }, "merge-stream": { @@ -42472,7 +42423,7 @@ "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", "dev": true }, "metro": { @@ -43610,7 +43561,7 @@ "min-document": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", - "integrity": "sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ==", + "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", "dev": true, "requires": { "dom-walk": "^0.1.0" @@ -43687,7 +43638,7 @@ "minimalistic-crypto-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", "dev": true }, "minimatch": { @@ -43949,7 +43900,7 @@ "mixin-object": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/mixin-object/-/mixin-object-2.0.1.tgz", - "integrity": "sha512-ALGF1Jt9ouehcaXaHhn6t1yGWRqGaHkPFndtFVHfZXOvkIZ/yoGaSi0AHVTafb3ZBGg4dr/bDwnaEKqCXzchMA==", + "integrity": "sha1-T7lJRB2rGCVA8f4DW6YOGUel5X4=", "dev": true, "requires": { "for-in": "^0.1.3", @@ -43959,7 +43910,7 @@ "for-in": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.8.tgz", - "integrity": "sha512-F0to7vbBSHP8E3l6dCjxNOLuSFAACIxFy3UehTUlG7svlXi37HHsDkyVcHo0Pq8QwrE+pXvWSVX3ZT1T9wAZ9g==", + "integrity": "sha1-2Hc5COMSVhCZUrH9ubP6hn0ndeE=", "dev": true } } @@ -43967,7 +43918,7 @@ "mkdirp": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha512-SknJC52obPfGQPnjIkXbmA6+5H15E+fR+E4iR2oQ3zzCLbd7/ONua69R/Gw7AgkTLsRG+r5fzksYwWe1AgTyWA==", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "requires": { "minimist": "0.0.8" }, @@ -43975,7 +43926,7 @@ "minimist": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha512-miQKw5Hv4NS1Psg2517mV4e4dYNaO3++hjAvLOAzKqZ61rH8NS1SK+vbfBWZ5PY/Me/bEWhUwqMghEW5Fb9T7Q==" + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" } } }, @@ -44144,7 +44095,7 @@ "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", - "integrity": "sha512-hdrFxZOycD/g6A6SoI2bB5NA/5NEqD0569+S47WZhPvm46sD50ZHdYaFmnua5lndde9rCHGjmfK7Z8BuCt/PcQ==", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", "dev": true, "requires": { "aproba": "^1.1.1", @@ -44275,7 +44226,7 @@ "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, "negotiator": { @@ -44351,7 +44302,7 @@ "node-dir": { "version": "0.1.17", "resolved": "https://registry.npmjs.org/node-dir/-/node-dir-0.1.17.tgz", - "integrity": "sha512-tmPX422rYgofd4epzrNoOXiE8XFZYOcCq1vD7MAXCDO+O+zndlA2ztdKKMa+EeuBG5tHETpr4ml4RGgpqDCCAg==", + "integrity": "sha1-X1Zl2TNRM1yqvvjxxVRRbPXx5OU=", "requires": { "minimatch": "^3.0.2" } @@ -44419,7 +44370,7 @@ "node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==" + "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=" }, "node-libs-browser": { "version": "2.2.1", @@ -44455,11 +44406,16 @@ "punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", "dev": true } } }, + "node-releases": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.12.tgz", + "integrity": "sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==" + }, "node-stream-zip": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/node-stream-zip/-/node-stream-zip-1.15.0.tgz", @@ -44518,7 +44474,7 @@ "normalize-range": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", + "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", "dev": true }, "normalize-selector": { @@ -45103,7 +45059,7 @@ "load-json-file": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "dev": true, "requires": { "graceful-fs": "^4.1.2", @@ -45115,7 +45071,7 @@ "parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { "error-ex": "^1.3.1", @@ -45125,13 +45081,13 @@ "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true }, "read-pkg": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", "dev": true, "requires": { "load-json-file": "^4.0.0", @@ -45148,7 +45104,7 @@ "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true } } @@ -45156,7 +45112,7 @@ "npm-run-path": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "requires": { "path-key": "^2.0.0" } @@ -45187,7 +45143,7 @@ "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, "nwsapi": { @@ -45599,12 +45555,12 @@ "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, "object-copy": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", "requires": { "copy-descriptor": "^0.1.0", "define-property": "^0.2.5", @@ -45614,7 +45570,7 @@ "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { "is-descriptor": "^0.1.0" } @@ -45622,7 +45578,7 @@ "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { "is-buffer": "^1.1.5" } @@ -45632,7 +45588,7 @@ "object-filter": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/object-filter/-/object-filter-1.0.2.tgz", - "integrity": "sha512-NahvP2vZcy1ZiiYah30CEPw0FpDcSkSePJBMpzl5EQgCmISijiGuJm3SPYp7U+Lf2TljyaIw3E5EgkEx/TNEVA==", + "integrity": "sha1-rwt5f/6+r4pSxmN87b6IFs/sG8g=", "dev": true }, "object-inspect": { @@ -45680,7 +45636,7 @@ "object-visit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", "requires": { "isobject": "^3.0.0" } @@ -46283,7 +46239,7 @@ "object.pick": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", "requires": { "isobject": "^3.0.1" } @@ -46462,7 +46418,7 @@ "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "requires": { "wrappy": "1" } @@ -46602,13 +46558,13 @@ "os-browserify": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", "dev": true }, "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true }, "os-name": { @@ -46624,7 +46580,7 @@ "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==" + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" }, "p-all": { "version": "2.1.0", @@ -46684,7 +46640,7 @@ "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==" + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" }, "p-limit": { "version": "3.1.0", @@ -47120,7 +47076,7 @@ "parse-passwd": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", "dev": true }, "parse-path": { @@ -47175,7 +47131,7 @@ "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==" + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" }, "patch-package": { "version": "6.2.2", @@ -47296,29 +47252,29 @@ "path-dirname": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q==", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", "dev": true }, "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==" + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, "path-is-inside": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", "dev": true }, "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==" + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" }, "path-parse": { "version": "1.0.7", @@ -47328,7 +47284,7 @@ "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", "dev": true }, "path-type": { @@ -47364,24 +47320,24 @@ "pegjs": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/pegjs/-/pegjs-0.10.0.tgz", - "integrity": "sha512-qI5+oFNEGi3L5HAxDwN2LA4Gg7irF70Zs25edhjld9QemOgp0CbvMtbFcMvFtEo1OityPrcCzkQFB8JP/hxgow==" + "integrity": "sha1-z4uvrm7d/0tafvsYUmnqr0YQ3b0=" }, "pend": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", "dev": true }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", "dev": true }, "phpegjs": { "version": "1.0.0-beta7", "resolved": "https://registry.npmjs.org/phpegjs/-/phpegjs-1.0.0-beta7.tgz", - "integrity": "sha512-SO+NP5argMoJVCWcYiOofPUeEWDIM47FNCBJtp6uJ8PpjtBcudYJTzCbCMit5dzmfSLCoijzEwIXOqPqD45xQg==" + "integrity": "sha1-uLbthQGYB//Q7+ID4AKj5e2LTZQ=" }, "picocolors": { "version": "1.0.0", @@ -47408,13 +47364,13 @@ "pinkie": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", "dev": true }, "pinkie-promise": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { "pinkie": "^2.0.0" @@ -47532,7 +47488,7 @@ "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==" + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" }, "postcss": { "version": "8.4.16", @@ -47693,7 +47649,7 @@ "postcss-media-query-parser": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz", - "integrity": "sha512-3sOlxmbKcSHMjlUXQZKQ06jOswE7oVkXPxmZdoB1r5l0q6gTFTQSHxNxOrCccElbW7dxNytifNEo8qidX2Vsig==", + "integrity": "sha1-J7Ocb02U+Bsac7j3Y1HGCeXO8kQ=", "dev": true }, "postcss-merge-longhand": { @@ -48065,7 +48021,7 @@ "postcss-resolve-nested-selector": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz", - "integrity": "sha512-HvExULSwLqHLgUy1rl3ANIqCsvMS0WHss2UOsXhXnQaZ9VCc2oBvIpXrl00IUFT5ZDITME0o6oiXeiHr2SAIfw==", + "integrity": "sha1-Kcy8fDfe36wwTp//C/FZaz9qDk4=", "dev": true }, "postcss-safe-parser": { @@ -48140,7 +48096,7 @@ "prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, "prettier": { @@ -48214,7 +48170,7 @@ "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", "dev": true }, "process-nextick-args": { @@ -48251,7 +48207,7 @@ "promise-inflight": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", "dev": true }, "promise-retry": { @@ -48812,13 +48768,13 @@ "prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", "dev": true }, "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", "dev": true }, "psl": { @@ -49174,7 +49130,7 @@ "q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", "dev": true }, "qs": { @@ -49205,7 +49161,7 @@ "querystring-es3": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", "dev": true }, "querystringify": { @@ -50685,7 +50641,7 @@ "readline": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/readline/-/readline-1.3.0.tgz", - "integrity": "sha512-k2d6ACCkiNYz222Fs/iNze30rRJ1iIicW7JuX/7/cozvih6YCkFZH+J6mAFDVgv0dRBaAyr4jDqC95R2y4IADg==" + "integrity": "sha1-xYDXfvLPyHUrEySYBg3JeTp6wBw=" }, "reakit": { "version": "1.3.11", @@ -50752,7 +50708,7 @@ "redent": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha512-qtW5hKzGQZqKoh6JNSD+4lfitfPKGz42e6QwiRmPM5mmKtR0N41AbJRYu0xJi7nhOJ4WDgRkKvAk6tw4WIwR4g==", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", "dev": true, "optional": true, "requires": { @@ -50763,7 +50719,7 @@ "indent-string": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha512-aqwDFWSgSgfRaEwao5lg5KEcVd/2a+D1rvoG7NdilmYz0NwRk6StWpWdz/Hpk34MKPpx7s8XxUqimfcQK6gGlg==", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "dev": true, "optional": true, "requires": { @@ -51390,7 +51346,7 @@ "remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", "dev": true }, "renderkid": { @@ -51514,12 +51470,12 @@ "repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==" + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" }, "repeating": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha512-ZqtSMuVybkISo2OWvqvm7iHSWngvdaW3IpsT9/uP8v4gMi591LY6h35wdOfvQdWCKFWZWm2Y1Opp4kV7vQKT6A==", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "dev": true, "optional": true, "requires": { @@ -51529,7 +51485,7 @@ "replace-ext": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", - "integrity": "sha512-vuNYXC7gG7IeVNBC1xUllqCcZKRbJoSPOBhnTEcAIiKCsbuef6zO3F0Rve3isPMMoNoQRWjQwbAgAjHUHniyEA==", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", "dev": true }, "request": { @@ -51608,7 +51564,7 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==" + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, "require-from-string": { "version": "2.0.2", @@ -51630,7 +51586,7 @@ "requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", "dev": true }, "resize-observer-polyfill": { @@ -51696,7 +51652,7 @@ "resolve-dir": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz", - "integrity": "sha512-QxMPqI6le2u0dCLyiGzgy92kjkkL6zO0XyvHzjdTNH3zM6e5Hz3BwG6+aEyNgiQ5Xz6PwTwgQEj3U50dByPKIA==", + "integrity": "sha1-shklmlYC+sXFxJatiUpujMQwJh4=", "dev": true, "requires": { "expand-tilde": "^1.2.2", @@ -51741,7 +51697,7 @@ "resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==" + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" }, "resolve.exports": { "version": "2.0.1", @@ -51905,7 +51861,7 @@ "run-queue": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", - "integrity": "sha512-ntymy489o0/QQplUDnpYAYUsO50K9SBrIVaKCWDOJzYJts0f9WH9RFJkyagebkw5+y1oi00R7ynNW/d12GBumg==", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", "dev": true, "requires": { "aproba": "^1.1.1" @@ -51914,12 +51870,12 @@ "rungen": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/rungen/-/rungen-0.3.2.tgz", - "integrity": "sha512-zWl10xu2D7zoR8zSC2U6bg5bYF6T/Wk7rxwp8IPaJH7f0Ge21G03kNHVgHR7tyVkSSfAOG0Rqf/Cl38JftSmtw==" + "integrity": "sha1-QAwJ6+kU57F+C27zJjQA/Cq8fLM=" }, "rx": { "version": "2.3.24", "resolved": "https://registry.npmjs.org/rx/-/rx-2.3.24.tgz", - "integrity": "sha512-Ue4ZB7Dzbn2I9sIj8ws536nOP2S53uypyCkCz9q0vlYD5Kn6/pu4dE+wt2ZfFzd9m73hiYKnnCb1OyKqc+MRkg==", + "integrity": "sha1-FPlQpCF9fjXapxu8vljv9o6ksrc=", "dev": true }, "rxjs": { @@ -51947,7 +51903,7 @@ "safe-regex": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "requires": { "ret": "~0.1.10" } @@ -52349,12 +52305,12 @@ "select": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz", - "integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==" + "integrity": "sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=" }, "select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", - "integrity": "sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==", + "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=", "dev": true }, "selfsigned": { @@ -52395,7 +52351,7 @@ "semver-compare": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", - "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==", + "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", "dev": true }, "send": { @@ -52481,7 +52437,7 @@ "serialize-error": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-2.1.0.tgz", - "integrity": "sha512-ghgmKt5o4Tly5yEG/UJp8qTd0AN7Xalw4XBtDEKP655B699qMEtra1WlXeE6WIvdEG481JvRxULKsInq/iNysw==" + "integrity": "sha1-ULZ51WNc34Rme9yOWa9OW4HV9go=" }, "serialize-javascript": { "version": "4.0.0", @@ -52495,7 +52451,7 @@ "serve-favicon": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/serve-favicon/-/serve-favicon-2.5.0.tgz", - "integrity": "sha512-FMW2RvqNr03x+C0WxTyu6sOv21oOjkq5j8tjquWccwa6ScNyGFOGJVpuS1NmTVGBAHS07xnSKotgf2ehQmf9iA==", + "integrity": "sha1-k10kDN/g9YBTB/3+ln2IlCosvPA=", "dev": true, "requires": { "etag": "~1.8.1", @@ -52522,7 +52478,7 @@ "serve-index": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", - "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==", + "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", "dev": true, "requires": { "accepts": "~1.3.4", @@ -52546,7 +52502,7 @@ "http-errors": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", "dev": true, "requires": { "depd": "~1.1.2", @@ -52577,7 +52533,7 @@ "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, "set-value": { "version": "2.0.1", @@ -52593,7 +52549,7 @@ "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { "is-extendable": "^0.1.0" } @@ -52611,7 +52567,7 @@ "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" }, "setprototypeof": { "version": "1.2.0", @@ -52645,7 +52601,7 @@ "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "requires": { "shebang-regex": "^1.0.0" } @@ -52653,7 +52609,7 @@ "shebang-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==" + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" }, "shell-quote": { "version": "1.7.3", @@ -52853,7 +52809,7 @@ "simple-swizzle": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", - "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", "requires": { "is-arrayish": "^0.3.1" }, @@ -52941,7 +52897,7 @@ "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { "is-descriptor": "^0.1.0" } @@ -52949,7 +52905,7 @@ "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { "is-extendable": "^0.1.0" } @@ -52974,7 +52930,7 @@ "define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { "is-descriptor": "^1.0.0" } @@ -53018,7 +52974,7 @@ "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { "is-buffer": "^1.1.5" } @@ -53116,7 +53072,7 @@ "sort-keys": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", - "integrity": "sha512-/dPCrG1s3ePpWm6yBbxZq5Be1dXGLyLn9Z791chDC3NFrpkVbWGzkBwPN1knaciexFXgRJ7hzdnwZ4stHSDmjg==", + "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", "dev": true, "requires": { "is-plain-obj": "^1.0.0" @@ -53193,7 +53149,7 @@ "spawn-command": { "version": "0.0.2-1", "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", - "integrity": "sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg==", + "integrity": "sha1-YvXpRmmBwbeW3Fkpk34RycaSG9A=", "dev": true }, "spawnd": { @@ -53372,7 +53328,7 @@ "sprintf-js": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.1.tgz", - "integrity": "sha512-h/U+VScR2Ft+aXDjGTLtguUEIrYuOjTj79BAOElUvdahYMaaa7SNLjJpOIn+Uzt0hsgHfYvlbcno3e9yXOSo8Q==" + "integrity": "sha1-Nr54Mgr+WAH2zqPueLblqrlA6gw=" }, "sshpk": { "version": "1.14.2", @@ -53452,7 +53408,7 @@ "static-extend": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", "requires": { "define-property": "^0.2.5", "object-copy": "^0.1.0" @@ -53461,7 +53417,7 @@ "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { "is-descriptor": "^0.1.0" } @@ -53528,7 +53484,7 @@ "strict-uri-encode": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", - "integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==" + "integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY=" }, "string-hash-64": { "version": "1.0.3", @@ -54539,7 +54495,7 @@ "strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==" + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" }, "strip-final-newline": { "version": "2.0.0", @@ -54550,7 +54506,7 @@ "strip-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha512-I5iQq6aFMM62fBEAIB/hXzwJD6EEZ0xEGCX2t7oXqaKPIRgt4WruAQ285BISgdkP+HLGWyeGmNJcpIwFeRYRUA==", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", "dev": true, "optional": true, "requires": { @@ -54592,7 +54548,7 @@ "style-search": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/style-search/-/style-search-0.1.0.tgz", - "integrity": "sha512-Dj1Okke1C3uKKwQcetra4jSuk0DqbzbYtXipzFlFMZtowbF1x7BKJwB9AayVMyFARvU8EDrZdcax4At/452cAg==", + "integrity": "sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI=", "dev": true }, "style-to-object": { @@ -55209,7 +55165,7 @@ "svg-tags": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz", - "integrity": "sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==", + "integrity": "sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=", "dev": true }, "svgo": { @@ -55780,7 +55736,7 @@ "temp": { "version": "0.8.3", "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz", - "integrity": "sha512-jtnWJs6B1cZlHs9wPG7BrowKxZw/rf6+UpGAkr8AaYmiTyTO7zQlLoST8zx/8TcUPnZmeBoB+H8ARuHZaSijVw==", + "integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=", "requires": { "os-tmpdir": "^1.0.0", "rimraf": "~2.2.6" @@ -55789,7 +55745,7 @@ "rimraf": { "version": "2.2.8", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", - "integrity": "sha512-R5KMKHnPAQaZMqLOsyuyUmcIjSeDm+73eoqQpaXA7AZ22BL+6C+1mcUscgOsNd8WVlJuvlgAPsegcx7pjlV0Dg==" + "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=" } } }, @@ -55963,7 +55919,7 @@ "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, "throat": { @@ -55980,7 +55936,7 @@ "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, "through2": { @@ -56040,18 +55996,18 @@ "to-arraybuffer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha512-okFlQcoGTi4LQBG/PgSYblw9VOyptsz2KJZqc6qtgGdes8VktzUQkj4BI2blit072iS8VODNcMA+tvnS9dnuMA==", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", "dev": true }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==" + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" }, "to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "requires": { "kind-of": "^3.0.2" }, @@ -56059,7 +56015,7 @@ "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { "is-buffer": "^1.1.5" } @@ -56136,20 +56092,20 @@ "trim": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", - "integrity": "sha512-YzQV+TZg4AxpKxaTHK3c3D+kRDCGVEE7LemdlQZoQXn0iennk10RsIoY6ikzAqJTc9Xjl9C1/waHom/J86ziAQ==", + "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=", "dev": true }, "trim-newlines": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha512-Nm4cF79FhSTzrLKGDMi3I4utBtFv8qKy4sq1enftf2gMdpqI8oVQTAfySkTz5r49giVzDj88SVZXP4CeYQwjaw==", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", "dev": true, "optional": true }, "trim-repeated": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", - "integrity": "sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg==", + "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", "dev": true, "requires": { "escape-string-regexp": "^1.0.2" @@ -56233,7 +56189,7 @@ "tty-browserify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha512-JVa5ijo+j/sOoHGjw0sxw734b1LhBkQ3bvUGNdxnVXDCX81Yx7TFgnZygxrIIWn23hbfTaMYLwRmAxFyDuFmIw==", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", "dev": true }, "tunnel": { @@ -56245,7 +56201,7 @@ "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "dev": true, "requires": { "safe-buffer": "^5.0.1" @@ -56259,14 +56215,14 @@ "tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", "dev": true, "optional": true }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { "prelude-ls": "~1.1.2" @@ -56320,7 +56276,7 @@ "typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", "dev": true }, "typedarray-to-buffer": { @@ -56630,12 +56586,12 @@ "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==" + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" }, "unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", "requires": { "has-value": "^0.3.1", "isobject": "^3.0.0" @@ -56644,7 +56600,7 @@ "has-value": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", "requires": { "get-value": "^2.0.3", "has-values": "^0.1.4", @@ -56654,7 +56610,7 @@ "isobject": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", "requires": { "isarray": "1.0.0" } @@ -56664,14 +56620,14 @@ "has-values": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ==" + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" } } }, "untildify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/untildify/-/untildify-2.1.0.tgz", - "integrity": "sha512-sJjbDp2GodvkB0FZZcn7k6afVisqX5BZD7Yq3xp4nN2O15BBK0cLm3Vwn2vQaF7UDS0UUsrQMkkplmDI5fskig==", + "integrity": "sha1-F+soB5h/dpUunASF/DEdBqgmouA=", "dev": true, "optional": true, "requires": { @@ -56685,6 +56641,15 @@ "dev": true, "optional": true }, + "update-browserslist-db": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", + "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "requires": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + } + }, "upper-case": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-2.0.2.tgz", @@ -56713,7 +56678,7 @@ "urix": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==" + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" }, "url": { "version": "0.11.0", @@ -56825,7 +56790,7 @@ "url-template": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz", - "integrity": "sha512-XdVKMF4SJ0nP/O7XIPB0JwAEuT9lDIYnNsK8yGVe43y0AWoKeJNdv3ZNWh7ksJ6KqQFjOO6ox/VEitLnaVNufw==", + "integrity": "sha1-/FZaPMy/93MMd19WQflVV5FDnyE=", "dev": true }, "use": { @@ -56900,7 +56865,7 @@ "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "util.promisify": { "version": "1.0.0", @@ -56915,7 +56880,7 @@ "utila": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", - "integrity": "sha512-Z0DbgELS9/L/75wZbro8xAnT50pBVFQZ+hUEueGDU5FN51YSCYM+jdxsfCiHjwNP/4LCDD0i/graKpeBnOXKRA==", + "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", "dev": true }, "utility-types": { @@ -56926,7 +56891,7 @@ "utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==" + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" }, "uuid": { "version": "8.3.0", @@ -56936,7 +56901,7 @@ "uuid-browser": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/uuid-browser/-/uuid-browser-3.1.0.tgz", - "integrity": "sha512-dsNgbLaTrd6l3MMxTtouOCFw4CBFc/3a+GgYA2YyrJvyQ1u6q4pcu3ktLoUZ/VN/Aw9WsauazbgsgdfVWgAKQg==", + "integrity": "sha1-DwWkCu90+eWVHiDvv0SxGHHlZBA=", "dev": true }, "v8-compile-cache": { @@ -56977,7 +56942,7 @@ "validate-npm-package-name": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", - "integrity": "sha512-M6w37eVCMMouJ9V/sdPGnC5H4uDr73/+xdq0FBLO3TFFX1+7wiUY6Es328NN+y43tmY+doUdN9g9J21vqB7iLw==", + "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", "dev": true, "requires": { "builtins": "^1.0.3" @@ -56995,13 +56960,13 @@ "vargs": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/vargs/-/vargs-0.1.0.tgz", - "integrity": "sha512-d/j1kMUt0YjLCQPAI+VMZ7IKwNGjk8dSHMCrHq9txFOCcCIDoe8ck9FmPvABJgxIaZO1tabXmNojQG6mBkLLCw==", + "integrity": "sha1-a2GE2mUgzDIEzhtAfKwm2SYJ6/8=", "dev": true }, "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==" + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, "vendors": { "version": "1.0.4", @@ -57012,7 +56977,7 @@ "verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", "dev": true, "requires": { "assert-plus": "^1.0.0", @@ -57023,7 +56988,7 @@ "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true } } @@ -57279,7 +57244,7 @@ "is-binary-path": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha512-9fRVlXc0uCxEDj1nQzaWONSpbTfx0FmJfzHF7pwlI8DkWGoHBBea4Pg5Ky0ojwwxQmnSifgbKkI06Qv0Ljgj+Q==", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "dev": true, "optional": true, "requires": { @@ -57341,7 +57306,7 @@ "wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", "requires": { "defaults": "^1.0.3" } @@ -58922,7 +58887,7 @@ "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", "dev": true }, "worker-farm": { @@ -59012,7 +58977,7 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "write-file-atomic": { "version": "2.4.3", @@ -59095,7 +59060,7 @@ "x-default-browser": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/x-default-browser/-/x-default-browser-0.4.0.tgz", - "integrity": "sha512-7LKo7RtWfoFN/rHx1UELv/2zHGMx8MkZKDq1xENmOCTkfIqZJ0zZ26NEJX8czhnPXVcqS0ARjjfJB+eJ0/5Cvw==", + "integrity": "sha1-cM8NqF2nwKtcsPFaiX8jIqa91IE=", "dev": true, "requires": { "default-browser-id": "^1.0.4" @@ -59104,13 +59069,13 @@ "x-is-string": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/x-is-string/-/x-is-string-0.1.0.tgz", - "integrity": "sha512-GojqklwG8gpzOVEVki5KudKNoq7MbbjYZCbyWzEz7tyPA7eleiE0+ePwOWQQRb5fm86rD3S8Tc0tSFf3AOv50w==", + "integrity": "sha1-R0tQhlrzpJqcRlfwWs0UVFj3fYI=", "dev": true }, "xml": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", - "integrity": "sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==", + "integrity": "sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=", "dev": true }, "xml-name-validator": { diff --git a/package.json b/package.json index f95417f61b35e..a7da15a667182 100644 --- a/package.json +++ b/package.json @@ -172,13 +172,14 @@ "babel-plugin-react-native-platform-specific-extensions": "1.1.1", "babel-plugin-transform-remove-console": "6.9.4", "benchmark": "2.1.4", - "browserslist": "4.17.6", + "browserslist": "4.21.9", + "caniuse-lite": "1.0.30001513", "chalk": "4.1.1", "change-case": "4.1.2", "commander": "9.2.0", "concurrently": "3.5.0", "copy-webpack-plugin": "10.2.0", - "core-js-builder": "3.19.1", + "core-js-builder": "3.31.0", "cross-env": "3.2.4", "css-loader": "6.2.0", "cssnano": "5.0.7", diff --git a/packages/babel-preset-default/package.json b/packages/babel-preset-default/package.json index 28e6a7af9357c..8fecd7de01440 100644 --- a/packages/babel-preset-default/package.json +++ b/packages/babel-preset-default/package.json @@ -39,8 +39,8 @@ "@wordpress/browserslist-config": "file:../browserslist-config", "@wordpress/element": "file:../element", "@wordpress/warning": "file:../warning", - "browserslist": "^4.17.6", - "core-js": "^3.19.1" + "browserslist": "^4.21.9", + "core-js": "^3.31.0" }, "publishConfig": { "access": "public" diff --git a/packages/dependency-extraction-webpack-plugin/test/__snapshots__/build.js.snap b/packages/dependency-extraction-webpack-plugin/test/__snapshots__/build.js.snap index 8568390679354..faeb6f9e434cb 100644 --- a/packages/dependency-extraction-webpack-plugin/test/__snapshots__/build.js.snap +++ b/packages/dependency-extraction-webpack-plugin/test/__snapshots__/build.js.snap @@ -32,7 +32,7 @@ exports[`DependencyExtractionWebpackPlugin Webpack \`combine-assets\` should pro `; exports[`DependencyExtractionWebpackPlugin Webpack \`dynamic-import\` should produce expected output: Asset file 'main.asset.php' should match snapshot 1`] = ` -" array('wp-blob'), 'version' => 'c8be4fceac30d1d00ca7'); +" array('wp-blob'), 'version' => 'b0e5d8b4c38533765be8'); " `; @@ -207,17 +207,17 @@ exports[`DependencyExtractionWebpackPlugin Webpack \`overrides\` should produce `; exports[`DependencyExtractionWebpackPlugin Webpack \`runtime-chunk-single\` should produce expected output: Asset file 'a.asset.php' should match snapshot 1`] = ` -" array('wp-blob'), 'version' => '09a0c551770a351c5ca7'); +" array('wp-blob'), 'version' => 'd3cda564b538b44d38ef'); " `; exports[`DependencyExtractionWebpackPlugin Webpack \`runtime-chunk-single\` should produce expected output: Asset file 'b.asset.php' should match snapshot 1`] = ` -" array('lodash', 'wp-blob'), 'version' => 'c9f00d690a9f72438910'); +" array('lodash', 'wp-blob'), 'version' => '420d636da562e71648f7'); " `; exports[`DependencyExtractionWebpackPlugin Webpack \`runtime-chunk-single\` should produce expected output: Asset file 'runtime.asset.php' should match snapshot 1`] = ` -" array(), 'version' => '46ea0ff11ac53fa5e88b'); +" array(), 'version' => '66079b05b32ae1e16886'); " `; diff --git a/packages/react-native-editor/package.json b/packages/react-native-editor/package.json index ceb39c10b0c3c..1c0044e92962a 100644 --- a/packages/react-native-editor/package.json +++ b/packages/react-native-editor/package.json @@ -50,7 +50,7 @@ "@wordpress/i18n": "file:../i18n", "@wordpress/react-native-aztec": "file:../react-native-aztec", "@wordpress/react-native-bridge": "file:../react-native-bridge", - "core-js": "^3.19.1", + "core-js": "^3.31.0", "fast-average-color": "^9.1.1", "gettext-parser": "^1.3.1", "jed": "^1.1.1", diff --git a/packages/scripts/package.json b/packages/scripts/package.json index c83128f880c25..d960ff5029ea8 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -47,7 +47,7 @@ "adm-zip": "^0.5.9", "babel-jest": "^29.5.0", "babel-loader": "^8.2.3", - "browserslist": "^4.17.6", + "browserslist": "^4.21.9", "chalk": "^4.0.0", "check-node-version": "^4.1.0", "clean-webpack-plugin": "^3.0.0", From 42d562480b5a846c0118bce27576c1c37629f55f Mon Sep 17 00:00:00 2001 From: Marin Atanasov <8436925+tyxla@users.noreply.github.com> Date: Mon, 10 Jul 2023 10:34:05 +0300 Subject: [PATCH 114/146] Lodash: Refactor away from _.set() in getNodesWithSettings() (#52278) --- .../components/global-styles/use-global-styles-output.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/block-editor/src/components/global-styles/use-global-styles-output.js b/packages/block-editor/src/components/global-styles/use-global-styles-output.js index 76facd7024ee5..ea118b55809d4 100644 --- a/packages/block-editor/src/components/global-styles/use-global-styles-output.js +++ b/packages/block-editor/src/components/global-styles/use-global-styles-output.js @@ -1,7 +1,7 @@ /** * External dependencies */ -import { get, set } from 'lodash'; +import { get } from 'lodash'; /** * WordPress dependencies @@ -32,7 +32,7 @@ import { PresetDuotoneFilter } from '../duotone/components'; import { getGapCSSValue } from '../../hooks/gap'; import { store as blockEditorStore } from '../../store'; import { LAYOUT_DEFINITIONS } from '../../layouts/definitions'; -import { kebabCase } from '../../utils/object'; +import { kebabCase, setImmutably } from '../../utils/object'; // List of block support features that can have their related styles // generated under their own feature level selector rather than the block's. @@ -678,11 +678,11 @@ export const getNodesWithSettings = ( tree, blockSelectors ) => { } const pickPresets = ( treeToPickFrom ) => { - const presets = {}; + let presets = {}; PRESET_METADATA.forEach( ( { path } ) => { const value = get( treeToPickFrom, path, false ); if ( value !== false ) { - set( presets, path, value ); + presets = setImmutably( presets, path, value ); } } ); return presets; From b0a3ef985f2615a3669e4698263b3ef4d5951d07 Mon Sep 17 00:00:00 2001 From: Marin Atanasov <8436925+tyxla@users.noreply.github.com> Date: Mon, 10 Jul 2023 10:34:42 +0300 Subject: [PATCH 115/146] Lodash: Refactor away from _.set() in global styles (#52279) --- .../src/components/global-styles/hooks.js | 32 ++++++++----------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/packages/block-editor/src/components/global-styles/hooks.js b/packages/block-editor/src/components/global-styles/hooks.js index 2efdc187f8f6b..75cd084428293 100644 --- a/packages/block-editor/src/components/global-styles/hooks.js +++ b/packages/block-editor/src/components/global-styles/hooks.js @@ -2,7 +2,7 @@ * External dependencies */ import fastDeepEqual from 'fast-deep-equal/es6'; -import { get, set } from 'lodash'; +import { get } from 'lodash'; /** * WordPress dependencies @@ -16,6 +16,7 @@ import { _x } from '@wordpress/i18n'; * Internal dependencies */ import { getValueFromVariable, getPresetVariableFromValue } from './utils'; +import { setImmutably } from '../../utils/object'; import { GlobalStylesContext } from './context'; import { unlock } from '../../lock-unlock'; @@ -108,7 +109,7 @@ export function useGlobalSetting( propertyPath, blockName, source = 'all' ) { ); } - const result = {}; + let result = {}; VALID_SETTINGS.forEach( ( setting ) => { const value = get( @@ -116,7 +117,7 @@ export function useGlobalSetting( propertyPath, blockName, source = 'all' ) { `settings${ appendedBlockPath }.${ setting }` ) ?? get( configToUse, `settings.${ setting }` ); if ( value ) { - set( result, setting, value ); + result = setImmutably( result, setting.split( '.' ), value ); } } ); return result; @@ -130,13 +131,9 @@ export function useGlobalSetting( propertyPath, blockName, source = 'all' ) { ] ); const setSetting = ( newValue ) => { - setUserConfig( ( currentConfig ) => { - // Deep clone `currentConfig` to avoid mutating it later. - const newUserConfig = JSON.parse( JSON.stringify( currentConfig ) ); - set( newUserConfig, contextualPath, newValue ); - - return newUserConfig; - } ); + setUserConfig( ( currentConfig ) => + setImmutably( currentConfig, contextualPath.split( '.' ), newValue ) + ); }; return [ settingValue, setSetting ]; @@ -160,12 +157,10 @@ export function useGlobalStyle( : `styles.blocks.${ blockName }${ appendedPath }`; const setStyle = ( newValue ) => { - setUserConfig( ( currentConfig ) => { - // Deep clone `currentConfig` to avoid mutating it later. - const newUserConfig = JSON.parse( JSON.stringify( currentConfig ) ); - set( - newUserConfig, - finalPath, + setUserConfig( ( currentConfig ) => + setImmutably( + currentConfig, + finalPath.split( '.' ), shouldDecodeEncode ? getPresetVariableFromValue( mergedConfig.settings, @@ -174,9 +169,8 @@ export function useGlobalStyle( newValue ) : newValue - ); - return newUserConfig; - } ); + ) + ); }; let rawResult, result; From de251b6c360a89ef46a90851a2a29d2b58cbe06a Mon Sep 17 00:00:00 2001 From: "Marius L. Jensen" <468735+Clorith@users.noreply.github.com> Date: Mon, 10 Jul 2023 10:07:02 +0100 Subject: [PATCH 116/146] E2E Test Utils: Improve test reliability in plugins/themes and login procedures (#52144) * Create logical promise ordering for navigation watchers. By Creating the promise for navigations before attempting the navigation, we ensure that there's no risk of race conditions where one promise triggers before the other, leaving the navigation watcher in limbo. * Add heightened timeout values when waiting for plugins or themes to be installed. Plugin and theme installations are dependent on external factors, such as WordPress.org availability, disk read/writes, and such. Some inconsistent test runs were traced back to prolonged time needed to install either, causing false positive test failures. * Update packages/e2e-test-utils/src/install-plugin.js * Update packages/e2e-test-utils/src/install-theme.js * Allow linting to pass --------- Co-authored-by: Ari Stathopoulos Co-authored-by: Sergey Biryukov --- packages/e2e-test-utils/src/install-plugin.js | 4 +++- packages/e2e-test-utils/src/install-theme.js | 4 +++- packages/e2e-test-utils/src/login-user.js | 8 ++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/e2e-test-utils/src/install-plugin.js b/packages/e2e-test-utils/src/install-plugin.js index a2f8e49329419..5edfbb54f6642 100644 --- a/packages/e2e-test-utils/src/install-plugin.js +++ b/packages/e2e-test-utils/src/install-plugin.js @@ -20,6 +20,8 @@ export async function installPlugin( slug, searchTerm ) { '&tab=search&type=term' ); await page.click( `.install-now[data-slug="${ slug }"]` ); - await page.waitForSelector( `.activate-now[data-slug="${ slug }"]` ); + await page.waitForSelector( `.activate-now[data-slug="${ slug }"]`, { + timeout: 60000, + } ); await switchUserToTest(); } diff --git a/packages/e2e-test-utils/src/install-theme.js b/packages/e2e-test-utils/src/install-theme.js index d030165c7cb97..7d001d395bda7 100644 --- a/packages/e2e-test-utils/src/install-theme.js +++ b/packages/e2e-test-utils/src/install-theme.js @@ -37,6 +37,8 @@ export async function installTheme( slug, { searchTerm } = {} ) { await page.waitForSelector( `.theme-install[data-slug="${ slug }"]` ); await page.click( `.theme-install[data-slug="${ slug }"]` ); - await page.waitForSelector( `.theme[data-slug="${ slug }"] .activate` ); + await page.waitForSelector( `.theme[data-slug="${ slug }"] .activate`, { + timeout: 60000, + } ); await switchUserToTest(); } diff --git a/packages/e2e-test-utils/src/login-user.js b/packages/e2e-test-utils/src/login-user.js index aeecfd9d5cc61..976153bce8f61 100644 --- a/packages/e2e-test-utils/src/login-user.js +++ b/packages/e2e-test-utils/src/login-user.js @@ -17,7 +17,9 @@ export async function loginUser( password = WP_PASSWORD ) { if ( ! isCurrentURL( 'wp-login.php' ) ) { + const waitForLoginPageNavigation = page.waitForNavigation(); await page.goto( createURL( 'wp-login.php' ) ); + await waitForLoginPageNavigation; } await page.focus( '#user_login' ); @@ -27,8 +29,6 @@ export async function loginUser( await pressKeyWithModifier( 'primary', 'a' ); await page.type( '#user_pass', password ); - await Promise.all( [ - page.waitForNavigation(), - page.click( '#wp-submit' ), - ] ); + const waitForLoginNavigation = page.waitForNavigation(); + await Promise.all( [ waitForLoginNavigation, page.click( '#wp-submit' ) ] ); } From 01b527dae85f2e19adcc23e102cf5b9b37f163b3 Mon Sep 17 00:00:00 2001 From: Jarda Snajdr Date: Mon, 10 Jul 2023 11:09:59 +0200 Subject: [PATCH 117/146] Make use of accessing private APIs from thunks directly (#52214) * Make use of accessing private APIs from thunks directly * Actually register the getUndo/RedoEdits private selectors --- packages/block-editor/src/store/actions.js | 3 +-- packages/block-editor/src/store/test/actions.js | 3 +++ packages/core-data/src/actions.js | 7 ++----- packages/core-data/src/index.js | 6 ++---- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/packages/block-editor/src/store/actions.js b/packages/block-editor/src/store/actions.js index 9dd3b24009c51..1d7ec460fe8d9 100644 --- a/packages/block-editor/src/store/actions.js +++ b/packages/block-editor/src/store/actions.js @@ -28,7 +28,6 @@ import { } from '../utils/selection'; import { __experimentalUpdateSettings, - ensureDefaultBlock, privateRemoveBlocks, } from './private-actions'; @@ -403,7 +402,7 @@ export const replaceBlocks = initialPosition, meta, } ); - dispatch( ensureDefaultBlock() ); + dispatch.ensureDefaultBlock(); }; /** diff --git a/packages/block-editor/src/store/test/actions.js b/packages/block-editor/src/store/test/actions.js index fc15737eda8d2..48fc234e0e6c2 100644 --- a/packages/block-editor/src/store/test/actions.js +++ b/packages/block-editor/src/store/test/actions.js @@ -216,6 +216,7 @@ describe( 'actions', () => { getBlockCount: () => 1, }; const dispatch = jest.fn(); + dispatch.ensureDefaultBlock = jest.fn(); replaceBlock( 'chicken', block )( { select, dispatch } ); @@ -281,6 +282,7 @@ describe( 'actions', () => { getBlockCount: () => 1, }; const dispatch = jest.fn(); + dispatch.ensureDefaultBlock = jest.fn(); replaceBlocks( [ 'chicken' ], blocks )( { select, dispatch } ); @@ -314,6 +316,7 @@ describe( 'actions', () => { getBlockCount: () => 1, }; const dispatch = jest.fn(); + dispatch.ensureDefaultBlock = jest.fn(); replaceBlocks( [ 'chicken' ], diff --git a/packages/core-data/src/actions.js b/packages/core-data/src/actions.js index 7d3bffef59b8f..824e1159286ed 100644 --- a/packages/core-data/src/actions.js +++ b/packages/core-data/src/actions.js @@ -18,7 +18,6 @@ import { receiveItems, removeItems, receiveQueriedItems } from './queried-data'; import { getOrLoadEntitiesConfig, DEFAULT_ENTITY_KEY } from './entities'; import { createBatch } from './batch'; import { STORE_NAME } from './name'; -import { getUndoEdits, getRedoEdits } from './private-selectors'; /** * Returns an action object used in signalling that authors have been received. @@ -407,8 +406,7 @@ export const editEntityRecord = export const undo = () => ( { select, dispatch } ) => { - // Todo: we shouldn't have to pass "root" here. - const undoEdit = select( ( state ) => getUndoEdits( state.root ) ); + const undoEdit = select.getUndoEdits(); if ( ! undoEdit ) { return; } @@ -425,8 +423,7 @@ export const undo = export const redo = () => ( { select, dispatch } ) => { - // Todo: we shouldn't have to pass "root" here. - const redoEdit = select( ( state ) => getRedoEdits( state.root ) ); + const redoEdit = select.getRedoEdits(); if ( ! redoEdit ) { return; } diff --git a/packages/core-data/src/index.js b/packages/core-data/src/index.js index 98509d9f0383b..5b42b6731716f 100644 --- a/packages/core-data/src/index.js +++ b/packages/core-data/src/index.js @@ -8,13 +8,13 @@ import { createReduxStore, register } from '@wordpress/data'; */ import reducer from './reducer'; import * as selectors from './selectors'; +import * as privateSelectors from './private-selectors'; import * as actions from './actions'; import * as resolvers from './resolvers'; import createLocksActions from './locks/actions'; import { rootEntitiesConfig, getMethodName } from './entities'; import { STORE_NAME } from './name'; import { unlock } from './private-apis'; -import { getNavigationFallbackId } from './private-selectors'; // The entity selectors/resolvers and actions are shortcuts to their generic equivalents // (getEntityRecord, getEntityRecords, updateEntityRecord, updateEntityRecords) @@ -64,9 +64,7 @@ const storeConfig = () => ( { * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore */ export const store = createReduxStore( STORE_NAME, storeConfig() ); -unlock( store ).registerPrivateSelectors( { - getNavigationFallbackId, -} ); +unlock( store ).registerPrivateSelectors( privateSelectors ); register( store ); // Register store after unlocking private selectors to allow resolvers to use them. export { default as EntityProvider } from './entity-provider'; From 9afcae6ad0bdc2da0b4e385e242fb63e3f54cf43 Mon Sep 17 00:00:00 2001 From: James Koster Date: Mon, 10 Jul 2023 11:43:59 +0100 Subject: [PATCH 118/146] Update tooltip (#52465) --- .../edit-site/src/components/sidebar-navigation-screen/index.js | 2 +- packages/edit-site/src/components/site-hub/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/edit-site/src/components/sidebar-navigation-screen/index.js b/packages/edit-site/src/components/sidebar-navigation-screen/index.js index 4c0d9d82f02cb..919e7e92d721d 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen/index.js +++ b/packages/edit-site/src/components/sidebar-navigation-screen/index.js @@ -78,7 +78,7 @@ export default function SidebarNavigationScreen( { icon={ icon } label={ ! isPreviewingTheme() - ? __( 'Go back to the Dashboard' ) + ? __( 'Go to the Dashboard' ) : __( 'Go back to the theme showcase' ) } href={ diff --git a/packages/edit-site/src/components/site-hub/index.js b/packages/edit-site/src/components/site-hub/index.js index d4f68943c46ae..897924a92a12b 100644 --- a/packages/edit-site/src/components/site-hub/index.js +++ b/packages/edit-site/src/components/site-hub/index.js @@ -57,7 +57,7 @@ const SiteHub = forwardRef( ( props, ref ) => { const siteIconButtonProps = isBackToDashboardButton ? { href: dashboardLink, - label: __( 'Go back to the Dashboard' ), + label: __( 'Go to the Dashboard' ), } : { href: dashboardLink, // We need to keep the `href` here so the component doesn't remount as a ` - ); - } + previewWindow.focus(); + + writeInterstitialMessage( previewWindow.document ); + + const link = await __unstableSaveForPreview( { forceIsAutosaveable } ); + + previewWindow.location = link; + + onPreview?.(); + }; + + // Link to the `?preview=true` URL if we have it, since this lets us see + // changes that were autosaved since the post was last published. Otherwise, + // just link to the post's URL. + const href = previewLink || currentPostLink; + + return ( + + ); } - -export default compose( [ - withSelect( ( select, { forcePreviewLink, forceIsAutosaveable } ) => { - const { - getCurrentPostId, - getCurrentPostAttribute, - getEditedPostAttribute, - isEditedPostSaveable, - isEditedPostAutosaveable, - getEditedPostPreviewLink, - isPostLocked, - } = select( editorStore ); - const { getPostType } = select( coreStore ); - - const previewLink = getEditedPostPreviewLink(); - const postType = getPostType( getEditedPostAttribute( 'type' ) ); - - return { - postId: getCurrentPostId(), - currentPostLink: getCurrentPostAttribute( 'link' ), - previewLink: - forcePreviewLink !== undefined ? forcePreviewLink : previewLink, - isSaveable: isEditedPostSaveable(), - isAutosaveable: forceIsAutosaveable || isEditedPostAutosaveable(), - isViewable: postType?.viewable ?? false, - isDraft: - [ 'draft', 'auto-draft' ].indexOf( - getEditedPostAttribute( 'status' ) - ) !== -1, - isPostLocked: isPostLocked(), - }; - } ), - withDispatch( ( dispatch ) => ( { - autosave: dispatch( editorStore ).autosave, - savePost: dispatch( editorStore ).savePost, - } ) ), - ifCondition( ( { isViewable } ) => isViewable ), -] )( PostPreviewButton ); diff --git a/packages/editor/src/components/post-preview-button/test/index.js b/packages/editor/src/components/post-preview-button/test/index.js index 184550d25e4aa..e34c05caa178b 100644 --- a/packages/editor/src/components/post-preview-button/test/index.js +++ b/packages/editor/src/components/post-preview-button/test/index.js @@ -4,10 +4,39 @@ import { render, screen, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; +/** + * WordPress dependencies + */ +import { useSelect, useDispatch } from '@wordpress/data'; + /** * Internal dependencies */ -import { PostPreviewButton } from '../'; +import PostPreviewButton from '..'; + +jest.useRealTimers(); + +jest.mock( '@wordpress/data/src/components/use-select', () => jest.fn() ); +jest.mock( '@wordpress/data/src/components/use-dispatch/use-dispatch', () => + jest.fn() +); + +function mockUseSelect( overrides ) { + useSelect.mockImplementation( ( map ) => + map( () => ( { + getPostType: () => ( { viewable: true } ), + getCurrentPostId: () => 123, + getCurrentPostType: () => 'post', + getCurrentPostAttribute: () => undefined, + getEditedPostPreviewLink: () => undefined, + isEditedPostSaveable: () => false, + ...overrides, + } ) ) + ); + useDispatch.mockImplementation( () => ( { + __unstableSaveForPreview: () => Promise.resolve(), + } ) ); +} describe( 'PostPreviewButton', () => { const documentWrite = jest.fn(); @@ -42,33 +71,39 @@ describe( 'PostPreviewButton', () => { } ); it( 'should render with `editor-post-preview` class if no `className` is specified.', () => { + mockUseSelect(); + render( ); - expect( screen.getByRole( 'button' ) ).toHaveClass( - 'editor-post-preview' - ); + const button = screen.getByRole( 'button' ); + expect( button ).toHaveClass( 'editor-post-preview' ); } ); it( 'should render with a custom class and not `editor-post-preview` if `className` is specified.', () => { + mockUseSelect(); + render( ); const button = screen.getByRole( 'button' ); - expect( button ).toHaveClass( 'foo-bar' ); expect( button ).not.toHaveClass( 'editor-post-preview' ); } ); it( 'should render a tertiary button if no classname is specified.', () => { + mockUseSelect(); + render( ); - expect( screen.getByRole( 'button' ) ).toHaveClass( 'is-tertiary' ); + const button = screen.getByRole( 'button' ); + expect( button ).toHaveClass( 'is-tertiary' ); } ); it( 'should render the button in its default variant if a custom classname is specified.', () => { + mockUseSelect(); + render( ); const button = screen.getByRole( 'button' ); - expect( button ).not.toHaveClass( 'is-primary' ); expect( button ).not.toHaveClass( 'is-secondary' ); expect( button ).not.toHaveClass( 'is-tertiary' ); @@ -76,12 +111,13 @@ describe( 'PostPreviewButton', () => { } ); it( 'should render `textContent` if specified.', () => { + mockUseSelect(); + const textContent = 'Foo bar'; render( ); const button = screen.getByRole( 'button' ); - expect( button ).toHaveTextContent( textContent ); expect( within( button ).queryByText( 'Preview' ) @@ -92,213 +128,113 @@ describe( 'PostPreviewButton', () => { } ); it( 'should render `Preview` with accessibility text if `textContent` not specified.', () => { + mockUseSelect(); + render( ); const button = screen.getByRole( 'button' ); - expect( within( button ).getByText( 'Preview' ) ).toBeVisible(); expect( within( button ).getByText( '(opens in a new tab)' ) ).toBeInTheDocument(); } ); - it( 'should be disabled if post is not saveable.', async () => { - render( ); + it( 'should be disabled if post is not saveable.', () => { + mockUseSelect( { isEditedPostSaveable: () => false } ); + + render( ); expect( screen.getByRole( 'button' ) ).toBeDisabled(); } ); - it( 'should not be disabled if post is saveable.', async () => { - render( ); + it( 'should not be disabled if post is saveable.', () => { + mockUseSelect( { isEditedPostSaveable: () => true } ); + + render( ); expect( screen.getByRole( 'button' ) ).toBeEnabled(); } ); - it( 'should set `href` to `previewLink` if `previewLink` is specified.', async () => { + it( 'should set `href` to edited post preview link if specified.', () => { const url = 'https://wordpress.org'; + mockUseSelect( { + getEditedPostPreviewLink: () => url, + isEditedPostSaveable: () => true, + } ); - render( - - ); + render( ); expect( screen.getByRole( 'link' ) ).toHaveAttribute( 'href', url ); } ); - it( 'should set `href` to `currentPostLink` if `currentPostLink` is specified.', async () => { + it( 'should set `href` to current post link if specified.', () => { const url = 'https://wordpress.org'; + mockUseSelect( { + getCurrentPostAttribute: () => url, + isEditedPostSaveable: () => true, + } ); - render( - - ); + render( ); expect( screen.getByRole( 'link' ) ).toHaveAttribute( 'href', url ); } ); - it( 'should prioritize `previewLink` if both `previewLink` and `currentPostLink` are specified.', async () => { + it( 'should prioritize preview link if both preview link and link attribute are specified.', () => { const url1 = 'https://wordpress.org'; const url2 = 'https://wordpress.com'; + mockUseSelect( { + getEditedPostPreviewLink: () => url1, + getCurrentPostAttribute: () => url2, + isEditedPostSaveable: () => true, + } ); - render( - - ); + render( ); expect( screen.getByRole( 'link' ) ).toHaveAttribute( 'href', url1 ); } ); - it( 'should properly set target to `wp-preview-${ postId }`.', async () => { - const postId = 123; - const url = 'https://wordpress.org'; + it( 'should properly set link target', () => { + mockUseSelect( { + getEditedPostPreviewLink: () => 'https://wordpress.org', + isEditedPostSaveable: () => true, + } ); - render( - - ); + render( ); expect( screen.getByRole( 'link' ) ).toHaveAttribute( 'target', - `wp-preview-${ postId }` - ); - } ); - - it( 'should save post if `isDraft` is `true`', async () => { - const user = userEvent.setup(); - const url = 'https://wordpress.org'; - const savePost = jest.fn(); - const autosave = jest.fn(); - - render( - - ); - - await user.click( screen.getByRole( 'link' ) ); - - expect( savePost ).toHaveBeenCalledWith( - expect.objectContaining( { isPreview: true } ) - ); - expect( autosave ).not.toHaveBeenCalled(); - } ); - - it( 'should autosave post if `isDraft` is `false`', async () => { - const user = userEvent.setup(); - const url = 'https://wordpress.org'; - const savePost = jest.fn(); - const autosave = jest.fn(); - - render( - - ); - - await user.click( screen.getByRole( 'link' ) ); - - expect( savePost ).not.toHaveBeenCalled(); - expect( autosave ).toHaveBeenCalledWith( - expect.objectContaining( { isPreview: true } ) + 'wp-preview-123' ); } ); it( 'should open a window with the specified target', async () => { const user = userEvent.setup(); - const postId = 123; - const url = 'https://wordpress.org'; - render( - - ); + mockUseSelect( { + getEditedPostPreviewLink: () => 'https://wordpress.org', + isEditedPostSaveable: () => true, + } ); + + render( ); await user.click( screen.getByRole( 'link' ) ); - expect( global.open ).toHaveBeenCalledWith( - '', - `wp-preview-${ postId }` - ); + expect( global.open ).toHaveBeenCalledWith( '', 'wp-preview-123' ); } ); - it( 'should set the location in the window properly', async () => { + it( 'should display a `Generating preview` message while waiting for autosaving', async () => { const user = userEvent.setup(); - const postId = 123; - const url = 'https://wordpress.org'; - - const { rerender } = render( - - ); - - await user.click( screen.getByRole( 'button' ) ); - expect( setLocation ).toHaveBeenCalledWith( undefined ); + mockUseSelect( { + getEditedPostPreviewLink: () => 'https://wordpress.org', + isEditedPostSaveable: () => true, + } ); - rerender( - - ); + render( ); - expect( setLocation ).toHaveBeenCalledWith( url ); - } ); + await user.click( screen.getByRole( 'link' ) ); - it( 'should display a `Generating preview` message while waiting for autosaving', async () => { - const user = userEvent.setup(); const previewText = 'Generating preview…'; - const url = 'https://wordpress.org'; - const savePost = jest.fn(); - const autosave = jest.fn(); - - render( - - ); - - await user.click( screen.getByRole( 'link' ) ); expect( documentWrite ).toHaveBeenCalledWith( expect.stringContaining( previewText ) diff --git a/packages/editor/src/components/post-publish-button/index.js b/packages/editor/src/components/post-publish-button/index.js index b4ea3a0725845..b9140b733c9d3 100644 --- a/packages/editor/src/components/post-publish-button/index.js +++ b/packages/editor/src/components/post-publish-button/index.js @@ -102,7 +102,6 @@ export class PostPublishButton extends Component { render() { const { forceIsDirty, - forceIsSaving, hasPublishAction, isBeingScheduled, isOpen, @@ -124,7 +123,6 @@ export class PostPublishButton extends Component { const isButtonDisabled = ( isSaving || - forceIsSaving || ! isSaveable || isPostSavingLocked || ( ! isPublishable && ! forceIsDirty ) ) && @@ -133,7 +131,6 @@ export class PostPublishButton extends Component { const isToggleDisabled = ( isPublished || isSaving || - forceIsSaving || ! isSaveable || ( ! isPublishable && ! forceIsDirty ) ) && ( ! hasNonPostEntityChanges || isSavingNonPostEntityChanges ); @@ -187,7 +184,6 @@ export class PostPublishButton extends Component { : __( 'Publish' ); const buttonChildren = ( ); @@ -231,10 +227,9 @@ export default compose( [ hasNonPostEntityChanges, isSavingNonPostEntityChanges, } = select( editorStore ); - const _isAutoSaving = isAutosavingPost(); return { - isSaving: isSavingPost() || _isAutoSaving, - isAutoSaving: _isAutoSaving, + isSaving: isSavingPost(), + isAutoSaving: isAutosavingPost(), isBeingScheduled: isEditedPostBeingScheduled(), visibility: getEditedPostVisibility(), isSaveable: isEditedPostSaveable(), diff --git a/packages/editor/src/components/post-publish-button/label.js b/packages/editor/src/components/post-publish-button/label.js index 05c7eb0f633e5..0a0fdd30d8500 100644 --- a/packages/editor/src/components/post-publish-button/label.js +++ b/packages/editor/src/components/post-publish-button/label.js @@ -44,7 +44,7 @@ export function PublishButtonLabel( { } export default compose( [ - withSelect( ( select, { forceIsSaving } ) => { + withSelect( ( select ) => { const { isCurrentPostPublished, isEditedPostBeingScheduled, @@ -57,7 +57,7 @@ export default compose( [ return { isPublished: isCurrentPostPublished(), isBeingScheduled: isEditedPostBeingScheduled(), - isSaving: forceIsSaving || isSavingPost(), + isSaving: isSavingPost(), isPublishing: isPublishingPost(), hasPublishAction: getCurrentPost()._links?.[ 'wp:action-publish' ] ?? false, diff --git a/packages/editor/src/components/post-publish-button/test/index.js b/packages/editor/src/components/post-publish-button/test/index.js index f1177c0a0288a..b0a8c3c5129c9 100644 --- a/packages/editor/src/components/post-publish-button/test/index.js +++ b/packages/editor/src/components/post-publish-button/test/index.js @@ -19,16 +19,6 @@ describe( 'PostPublishButton', () => { ).toHaveAttribute( 'aria-disabled', 'true' ); } ); - it( 'should be true if forceIsSaving is true', () => { - render( - - ); - - expect( - screen.getByRole( 'button', { name: 'Submit for Review' } ) - ).toHaveAttribute( 'aria-disabled', 'true' ); - } ); - it( 'should be true if post is not publishable and not forceIsDirty', () => { render(
    diff --git a/packages/editor/src/components/post-saved-state/index.js b/packages/editor/src/components/post-saved-state/index.js index 24b88d4d96dee..ed3115d5a6c54 100644 --- a/packages/editor/src/components/post-saved-state/index.js +++ b/packages/editor/src/components/post-saved-state/index.js @@ -29,14 +29,11 @@ import { store as editorStore } from '../../store'; * @param {Object} props Component props. * @param {?boolean} props.forceIsDirty Whether to force the post to be marked * as dirty. - * @param {?boolean} props.forceIsSaving Whether to force the post to be marked - * as being saved. * @param {?boolean} props.showIconLabels Whether interface buttons show labels instead of icons * @return {import('@wordpress/element').WPComponent} The component. */ export default function PostSavedState( { forceIsDirty, - forceIsSaving, showIconLabels = false, } ) { const [ forceSavedMessage, setForceSavedMessage ] = useState( false ); @@ -72,14 +69,14 @@ export default function PostSavedState( { isNew: isEditedPostNew(), isPending: 'pending' === getEditedPostAttribute( 'status' ), isPublished: isCurrentPostPublished(), - isSaving: forceIsSaving || isSavingPost(), + isSaving: isSavingPost(), isSaveable: isEditedPostSaveable(), isScheduled: isCurrentPostScheduled(), hasPublishAction: getCurrentPost()?._links?.[ 'wp:action-publish' ] ?? false, }; }, - [ forceIsDirty, forceIsSaving ] + [ forceIsDirty ] ); const { savePost } = useDispatch( editorStore ); diff --git a/packages/editor/src/store/actions.js b/packages/editor/src/store/actions.js index 390c19571542d..ece8d62f689a5 100644 --- a/packages/editor/src/store/actions.js +++ b/packages/editor/src/store/actions.js @@ -11,6 +11,7 @@ import { import { store as noticesStore } from '@wordpress/notices'; import { store as coreStore } from '@wordpress/core-data'; import { store as blockEditorStore } from '@wordpress/block-editor'; +import { applyFilters } from '@wordpress/hooks'; import { store as preferencesStore } from '@wordpress/preferences'; /** @@ -177,15 +178,26 @@ export const savePost = edits, options ); - dispatch( { type: 'REQUEST_POST_UPDATE_FINISH', options } ); - const error = registry + let error = registry .select( coreStore ) .getLastEntitySaveError( 'postType', previousRecord.type, previousRecord.id ); + + if ( ! error ) { + await applyFilters( + 'editor.__unstableSavePost', + Promise.resolve(), + options + ).catch( ( err ) => { + error = err; + } ); + } + dispatch( { type: 'REQUEST_POST_UPDATE_FINISH', options } ); + if ( error ) { const args = getNotificationArgumentsForSaveFail( { post: previousRecord, @@ -289,6 +301,26 @@ export const autosave = } }; +export const __unstableSaveForPreview = + ( { forceIsAutosaveable } ) => + async ( { select, dispatch } ) => { + if ( + ( forceIsAutosaveable || select.isEditedPostAutosaveable() ) && + ! select.isPostLocked() + ) { + const isDraft = [ 'draft', 'auto-draft' ].includes( + select.getEditedPostAttribute( 'status' ) + ); + if ( isDraft ) { + await dispatch.savePost( { isPreview: true } ); + } else { + await dispatch.autosave( { isPreview: true } ); + } + } + + return select.getEditedPostPreviewLink(); + }; + /** * Action that restores last popped state in undo history. */ diff --git a/packages/editor/src/store/selectors.js b/packages/editor/src/store/selectors.js index 51b307dce9e7c..a533851751b18 100644 --- a/packages/editor/src/store/selectors.js +++ b/packages/editor/src/store/selectors.js @@ -681,15 +681,9 @@ export function isDeletingPost( state ) { * * @return {boolean} Whether post is being saved. */ -export const isSavingPost = createRegistrySelector( ( select ) => ( state ) => { - const postType = getCurrentPostType( state ); - const postId = getCurrentPostId( state ); - return select( coreStore ).isSavingEntityRecord( - 'postType', - postType, - postId - ); -} ); +export function isSavingPost( state ) { + return !! state.saving.pending; +} /** * Returns true if non-post entities are currently being saved, or false otherwise. @@ -760,10 +754,7 @@ export const didPostSaveRequestFail = createRegistrySelector( * @return {boolean} Whether the post is autosaving. */ export function isAutosavingPost( state ) { - if ( ! isSavingPost( state ) ) { - return false; - } - return Boolean( state.saving.options?.isAutosave ); + return isSavingPost( state ) && Boolean( state.saving.options?.isAutosave ); } /** @@ -774,10 +765,7 @@ export function isAutosavingPost( state ) { * @return {boolean} Whether the post is being previewed. */ export function isPreviewingPost( state ) { - if ( ! isSavingPost( state ) ) { - return false; - } - return Boolean( state.saving.options?.isPreview ); + return isSavingPost( state ) && Boolean( state.saving.options?.isPreview ); } /** diff --git a/packages/editor/src/store/test/selectors.js b/packages/editor/src/store/test/selectors.js index 4b29e251f80c0..2a22b4523444b 100644 --- a/packages/editor/src/store/test/selectors.js +++ b/packages/editor/src/store/test/selectors.js @@ -75,10 +75,6 @@ selectorNames.forEach( ( name ) => { }; }, - isSavingEntityRecord() { - return state.saving && state.saving.requesting; - }, - getLastEntitySaveError() { const saving = state.saving; const successful = saving && saving.successful; @@ -1254,7 +1250,7 @@ describe( 'selectors', () => { title: 'sassel', }, saving: { - requesting: true, + pending: true, }, }; @@ -1403,9 +1399,8 @@ describe( 'selectors', () => { currentPost: { title: 'sassel', }, - saving: { - requesting: true, - }, + postAutosavingLock: {}, + saving: {}, getCurrentUser() {}, hasFetchedAutosaves() { return false; @@ -1434,9 +1429,8 @@ describe( 'selectors', () => { currentPost: { title: 'sassel', }, - saving: { - requesting: true, - }, + postAutosavingLock: {}, + saving: {}, getCurrentUser() {}, hasFetchedAutosaves() { return true; @@ -2017,7 +2011,7 @@ describe( 'selectors', () => { it( 'should return true if the post is currently being saved', () => { const state = { saving: { - requesting: true, + pending: true, }, }; @@ -2027,7 +2021,7 @@ describe( 'selectors', () => { it( 'should return false if the post is not currently being saved', () => { const state = { saving: { - requesting: false, + pending: false, }, }; From 70215589cd2510a9881286d36aa48e41e19d06ac Mon Sep 17 00:00:00 2001 From: Ella <4710635+ellatrix@users.noreply.github.com> Date: Mon, 10 Jul 2023 13:32:02 +0200 Subject: [PATCH 122/146] RichText/Footnotes: make getRichTextValues work with InnerBlocks.Content (#52241) * RichText/Footnotes: make getRichTextValues work with InnerBlocks.Content --------- Co-authored-by: Miguel Fonseca <150562+mcsf@users.noreply.github.com> --- .../src/components/rich-text/content.js | 47 +-------- .../rich-text/get-rich-text-values.js | 95 ++++++++++++++++++ packages/block-editor/src/private-apis.js | 2 +- .../specs/editor/various/footnotes.spec.js | 96 +++++++++++++++++++ 4 files changed, 193 insertions(+), 47 deletions(-) create mode 100644 packages/block-editor/src/components/rich-text/get-rich-text-values.js diff --git a/packages/block-editor/src/components/rich-text/content.js b/packages/block-editor/src/components/rich-text/content.js index dfd206a1ddb7e..9762582f86f14 100644 --- a/packages/block-editor/src/components/rich-text/content.js +++ b/packages/block-editor/src/components/rich-text/content.js @@ -2,11 +2,7 @@ * WordPress dependencies */ import { RawHTML } from '@wordpress/element'; -import { - children as childrenSource, - getSaveElement, - __unstableGetBlockProps as getBlockProps, -} from '@wordpress/blocks'; +import { children as childrenSource } from '@wordpress/blocks'; import deprecated from '@wordpress/deprecated'; /** @@ -42,44 +38,3 @@ export const Content = ( { value, tagName: Tag, multiline, ...props } ) => { return content; }; - -Content.__unstableIsRichTextContent = {}; - -function findContent( blocks, richTextValues = [] ) { - if ( ! Array.isArray( blocks ) ) { - blocks = [ blocks ]; - } - - for ( const block of blocks ) { - if ( - block?.type?.__unstableIsRichTextContent === - Content.__unstableIsRichTextContent - ) { - richTextValues.push( block.props.value ); - continue; - } - - if ( block?.props?.children ) { - findContent( block.props.children, richTextValues ); - } - } - - return richTextValues; -} - -function _getSaveElement( { name, attributes, innerBlocks } ) { - return getSaveElement( - name, - attributes, - innerBlocks.map( _getSaveElement ) - ); -} - -export function getRichTextValues( blocks = [] ) { - getBlockProps.skipFilters = true; - const values = findContent( - ( Array.isArray( blocks ) ? blocks : [ blocks ] ).map( _getSaveElement ) - ); - getBlockProps.skipFilters = false; - return values; -} diff --git a/packages/block-editor/src/components/rich-text/get-rich-text-values.js b/packages/block-editor/src/components/rich-text/get-rich-text-values.js new file mode 100644 index 0000000000000..4ecee9b76530e --- /dev/null +++ b/packages/block-editor/src/components/rich-text/get-rich-text-values.js @@ -0,0 +1,95 @@ +/** + * WordPress dependencies + */ +import { RawHTML, StrictMode, Fragment } from '@wordpress/element'; +import { + getSaveElement, + __unstableGetBlockProps as getBlockProps, +} from '@wordpress/blocks'; + +/** + * Internal dependencies + */ +import InnerBlocks from '../inner-blocks'; +import { Content } from './content'; + +/* + * This function is similar to `@wordpress/element`'s `renderToString` function, + * except that it does not render the elements to a string, but instead collects + * the values of all rich text `Content` elements. + */ +function addValuesForElement( element, ...args ) { + if ( null === element || undefined === element || false === element ) { + return; + } + + if ( Array.isArray( element ) ) { + return addValuesForElements( element, ...args ); + } + + switch ( typeof element ) { + case 'string': + case 'number': + return; + } + + const { type, props } = element; + + switch ( type ) { + case StrictMode: + case Fragment: + return addValuesForElements( props.children, ...args ); + case RawHTML: + return; + case InnerBlocks.Content: + return addValuesForBlocks( ...args ); + case Content: + const [ values ] = args; + values.push( props.value ); + return; + } + + switch ( typeof type ) { + case 'string': + if ( typeof props.children !== 'undefined' ) { + return addValuesForElements( props.children, ...args ); + } + return; + case 'function': + if ( + type.prototype && + typeof type.prototype.render === 'function' + ) { + return addValuesForElement( + new type( props ).render(), + ...args + ); + } + + return addValuesForElement( type( props ), ...args ); + } +} + +function addValuesForElements( children, ...args ) { + children = Array.isArray( children ) ? children : [ children ]; + + for ( let i = 0; i < children.length; i++ ) { + addValuesForElement( children[ i ], ...args ); + } +} + +function addValuesForBlocks( values, blocks ) { + for ( let i = 0; i < blocks.length; i++ ) { + const { name, attributes, innerBlocks } = blocks[ i ]; + const saveElement = getSaveElement( name, attributes ); + addValuesForElement( saveElement, values, innerBlocks ); + } +} + +export function getRichTextValues( blocks = [] ) { + getBlockProps.skipFilters = true; + const values = []; + addValuesForBlocks( values, blocks ); + getBlockProps.skipFilters = false; + return values; +} diff --git a/packages/block-editor/src/private-apis.js b/packages/block-editor/src/private-apis.js index 1200dee367d24..453fbd7ce63eb 100644 --- a/packages/block-editor/src/private-apis.js +++ b/packages/block-editor/src/private-apis.js @@ -4,7 +4,7 @@ import * as globalStyles from './components/global-styles'; import { ExperimentalBlockEditorProvider } from './components/provider'; import { lock } from './lock-unlock'; -import { getRichTextValues } from './components/rich-text/content'; +import { getRichTextValues } from './components/rich-text/get-rich-text-values'; import { kebabCase } from './utils/object'; import ResizableBoxPopover from './components/resizable-box-popover'; import { ComposedPrivateInserter as PrivateInserter } from './components/inserter'; diff --git a/test/e2e/specs/editor/various/footnotes.spec.js b/test/e2e/specs/editor/various/footnotes.spec.js index e65eee6d3d08e..1f2fd33f23f73 100644 --- a/test/e2e/specs/editor/various/footnotes.spec.js +++ b/test/e2e/specs/editor/various/footnotes.spec.js @@ -182,4 +182,100 @@ test.describe( 'Footnotes', () => { expect( await getFootnotes( page ) ).toMatchObject( [] ); } ); + + test( 'can be inserted in a list', async ( { editor, page } ) => { + await editor.canvas.click( 'role=button[name="Add default block"i]' ); + await page.keyboard.type( '* 1' ); + await editor.clickBlockToolbarButton( 'More' ); + await page.locator( 'button:text("Footnote")' ).click(); + + await page.keyboard.type( 'a' ); + + const id1 = await editor.canvas.evaluate( () => { + return document.activeElement.id; + } ); + + expect( await editor.getBlocks() ).toMatchObject( [ + { + name: 'core/list', + innerBlocks: [ + { + name: 'core/list-item', + attributes: { + content: `1*`, + }, + }, + ], + }, + { + name: 'core/footnotes', + }, + ] ); + + expect( await getFootnotes( page ) ).toMatchObject( [ + { + content: 'a', + id: id1, + }, + ] ); + } ); + + test( 'can be inserted in a table', async ( { editor, page } ) => { + await editor.insertBlock( { name: 'core/table' } ); + await editor.canvas.click( 'role=button[name="Create Table"i]' ); + await page.keyboard.type( '1' ); + await editor.showBlockToolbar(); + await editor.clickBlockToolbarButton( 'More' ); + await page.locator( 'button:text("Footnote")' ).click(); + + await page.keyboard.type( 'a' ); + + const id1 = await editor.canvas.evaluate( () => { + return document.activeElement.id; + } ); + + expect( await editor.getBlocks() ).toMatchObject( [ + { + name: 'core/table', + attributes: { + body: [ + { + cells: [ + { + content: `1*`, + tag: 'td', + }, + { + content: '', + tag: 'td', + }, + ], + }, + { + cells: [ + { + content: '', + tag: 'td', + }, + { + content: '', + tag: 'td', + }, + ], + }, + ], + }, + }, + { + name: 'core/footnotes', + }, + ] ); + + expect( await getFootnotes( page ) ).toMatchObject( [ + { + content: 'a', + id: id1, + }, + ] ); + } ); } ); From 7d3ec5870d532bb68577483975b486b357482f91 Mon Sep 17 00:00:00 2001 From: Marin Atanasov <8436925+tyxla@users.noreply.github.com> Date: Mon, 10 Jul 2023 18:00:54 +0300 Subject: [PATCH 123/146] Experimental: Disable TinyMCE compat with classic editor (#52325) --- lib/experimental/disable-tinymce.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/experimental/disable-tinymce.php b/lib/experimental/disable-tinymce.php index f6bdf052fb05e..824f1ab9a73ae 100644 --- a/lib/experimental/disable-tinymce.php +++ b/lib/experimental/disable-tinymce.php @@ -71,6 +71,14 @@ function gutenberg_post_being_edited_requires_classic_block() { $content = $current_post->post_content; } + // Check if block editor is disabled by "Classic Editor" or another plugin. + if ( + function_exists( 'use_block_editor_for_post_type' ) && + ! use_block_editor_for_post_type( $current_post->post_type ) + ) { + return true; + } + if ( empty( $content ) ) { return false; } From ceba95d4a4a04d5d8dc67626c3b6467af4795472 Mon Sep 17 00:00:00 2001 From: Ella <4710635+ellatrix@users.noreply.github.com> Date: Mon, 10 Jul 2023 17:22:34 +0200 Subject: [PATCH 124/146] Footnotes: show in inserter and placehold (#52445) * Footnotes: show in inserter and placehold * Fix placeholder block membrane; fix copy; add icon, label --------- Co-authored-by: Miguel Fonseca <150562+mcsf@users.noreply.github.com> --- docs/reference-guides/core-blocks.md | 2 +- .../block-library/src/footnotes/block.json | 1 - packages/block-library/src/footnotes/edit.js | 23 +++++++++++++++++-- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index a4e307c94df87..44561fdecfcf7 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -275,7 +275,7 @@ Add a link to a downloadable file. ([Source](https://github.com/WordPress/gutenb - **Name:** core/footnotes - **Category:** text -- **Supports:** ~~html~~, ~~inserter~~, ~~multiple~~, ~~reusable~~ +- **Supports:** ~~html~~, ~~multiple~~, ~~reusable~~ - **Attributes:** ## Classic diff --git a/packages/block-library/src/footnotes/block.json b/packages/block-library/src/footnotes/block.json index 0ab992009d123..e021e9c5225da 100644 --- a/packages/block-library/src/footnotes/block.json +++ b/packages/block-library/src/footnotes/block.json @@ -11,7 +11,6 @@ "supports": { "html": false, "multiple": false, - "inserter": false, "reusable": false }, "style": "wp-block-footnotes" diff --git a/packages/block-library/src/footnotes/edit.js b/packages/block-library/src/footnotes/edit.js index e90a7f82be94a..fdfe7a94039af 100644 --- a/packages/block-library/src/footnotes/edit.js +++ b/packages/block-library/src/footnotes/edit.js @@ -1,8 +1,11 @@ /** * WordPress dependencies */ -import { RichText, useBlockProps } from '@wordpress/block-editor'; +import { BlockIcon, RichText, useBlockProps } from '@wordpress/block-editor'; import { useEntityProp } from '@wordpress/core-data'; +import { __ } from '@wordpress/i18n'; +import { Placeholder } from '@wordpress/components'; +import { formatListNumbered as icon } from '@wordpress/icons'; export default function FootnotesEdit( { context: { postType, postId } } ) { const [ meta, updateMeta ] = useEntityProp( @@ -12,8 +15,24 @@ export default function FootnotesEdit( { context: { postType, postId } } ) { postId ); const footnotes = meta?.footnotes ? JSON.parse( meta.footnotes ) : []; + const blockProps = useBlockProps(); + + if ( ! footnotes.length ) { + return ( +
    + } + label={ __( 'Footnotes' ) } + instructions={ __( + 'Footnotes found in blocks within this document will be displayed here.' + ) } + /> +
    + ); + } + return ( -
      +
        { footnotes.map( ( { id, content } ) => (
      1. Date: Mon, 10 Jul 2023 17:35:39 +0200 Subject: [PATCH 125/146] Footnotes: save numbering through the entity provider (#52423) * Footnotes: save numbering through the entity provider * Add sup so no styling is needed at all * Migrate old format * Restore old styles, fix nested attribute queries * Fix anchor selection * Migrate markup in entity provider instead * Fix tests * Fix typo * Fix comment --------- Co-authored-by: Miguel Fonseca <150562+mcsf@users.noreply.github.com> --- .../block-library/src/footnotes/format.js | 8 +- .../block-library/src/footnotes/style.scss | 6 +- packages/core-data/src/entity-provider.js | 77 +++++++++++++++++-- .../src/component/use-select-object.js | 7 +- packages/rich-text/src/to-dom.js | 4 + packages/rich-text/src/to-tree.js | 8 +- .../specs/editor/various/footnotes.spec.js | 16 ++-- 7 files changed, 102 insertions(+), 24 deletions(-) diff --git a/packages/block-library/src/footnotes/format.js b/packages/block-library/src/footnotes/format.js index 7c1b190fc42af..40de6a132ea99 100644 --- a/packages/block-library/src/footnotes/format.js +++ b/packages/block-library/src/footnotes/format.js @@ -24,11 +24,9 @@ import { name } from './block.json'; export const formatName = 'core/footnote'; export const format = { title: __( 'Footnote' ), - tagName: 'a', + tagName: 'sup', className: 'fn', attributes: { - id: 'id', - href: 'href', 'data-fn': 'data-fn', }, contentEditable: false, @@ -50,11 +48,9 @@ export const format = { { type: formatName, attributes: { - href: '#' + id, - id: `${ id }-link`, 'data-fn': id, }, - innerHTML: '*', + innerHTML: `*`, }, value.end, value.end diff --git a/packages/block-library/src/footnotes/style.scss b/packages/block-library/src/footnotes/style.scss index ad49bc1cf2911..aa7ab8b6951dd 100644 --- a/packages/block-library/src/footnotes/style.scss +++ b/packages/block-library/src/footnotes/style.scss @@ -1,9 +1,11 @@ +// These styles are for backwards compatibility with the old footnotes anchors. +// Can be removed in the future. .editor-styles-wrapper, .entry-content { counter-reset: footnotes; } -[data-fn].fn { +a[data-fn].fn { vertical-align: super; font-size: smaller; counter-increment: footnotes; @@ -12,7 +14,7 @@ text-indent: -9999999px; } -[data-fn].fn::after { +a[data-fn].fn::after { content: "[" counter(footnotes) "]"; text-indent: 0; float: left; diff --git a/packages/core-data/src/entity-provider.js b/packages/core-data/src/entity-provider.js index da048944f1498..6cc1e021841b4 100644 --- a/packages/core-data/src/entity-provider.js +++ b/packages/core-data/src/entity-provider.js @@ -191,9 +191,10 @@ export function useEntityBlockEditor( kind, name, { id: _id } = {} ) { const updateFootnotes = useCallback( ( _blocks ) => { - if ( ! meta ) return; + const output = { blocks: _blocks }; + if ( ! meta ) return output; // If meta.footnotes is empty, it means the meta is not registered. - if ( meta.footnotes === undefined ) return {}; + if ( meta.footnotes === undefined ) return output; const { getRichTextValues } = unlock( blockEditorPrivateApis ); const _content = getRichTextValues( _blocks ).join( '' ) || ''; @@ -215,7 +216,8 @@ export function useEntityBlockEditor( kind, name, { id: _id } = {} ) { : []; const currentOrder = footnotes.map( ( fn ) => fn.id ); - if ( currentOrder.join( '' ) === newOrder.join( '' ) ) return; + if ( currentOrder.join( '' ) === newOrder.join( '' ) ) + return output; const newFootnotes = newOrder.map( ( fnId ) => @@ -226,6 +228,71 @@ export function useEntityBlockEditor( kind, name, { id: _id } = {} ) { } ); + function updateAttributes( attributes ) { + attributes = { ...attributes }; + + for ( const key in attributes ) { + const value = attributes[ key ]; + + if ( Array.isArray( value ) ) { + attributes[ key ] = value.map( updateAttributes ); + continue; + } + + if ( typeof value !== 'string' ) { + continue; + } + + if ( value.indexOf( 'data-fn' ) === -1 ) { + continue; + } + + // When we store rich text values, this would no longer + // require a regex. + const regex = + /(]+data-fn="([^"]+)"[^>]*>]*>)[\d*]*<\/a><\/sup>/g; + + attributes[ key ] = value.replace( + regex, + ( match, opening, fnId ) => { + const index = newOrder.indexOf( fnId ); + return `${ opening }${ index + 1 }`; + } + ); + + const compatRegex = + /]+data-fn="([^"]+)"[^>]*>\*<\/a>/g; + + attributes[ key ] = attributes[ key ].replace( + compatRegex, + ( match, fnId ) => { + const index = newOrder.indexOf( fnId ); + return `${ + index + 1 + }`; + } + ); + } + + return attributes; + } + + function updateBlocksAttributes( __blocks ) { + return __blocks.map( ( block ) => { + return { + ...block, + attributes: updateAttributes( block.attributes ), + innerBlocks: updateBlocksAttributes( + block.innerBlocks + ), + }; + } ); + } + + // We need to go through all block attributs deeply and update the + // footnote anchor numbering (textContent) to match the new order. + const newBlocks = updateBlocksAttributes( _blocks ); + oldFootnotes = { ...oldFootnotes, ...footnotes.reduce( ( acc, fn ) => { @@ -241,6 +308,7 @@ export function useEntityBlockEditor( kind, name, { id: _id } = {} ) { ...meta, footnotes: JSON.stringify( newFootnotes ), }, + blocks: newBlocks, }; }, [ meta ] @@ -258,7 +326,6 @@ export function useEntityBlockEditor( kind, name, { id: _id } = {} ) { // to make sure the edit makes the post dirty and creates // a new undo level. const edits = { - blocks: newBlocks, selection, content: ( { blocks: blocksForSerialization = [] } ) => __unstableSerializeAndClean( blocksForSerialization ), @@ -282,7 +349,7 @@ export function useEntityBlockEditor( kind, name, { id: _id } = {} ) { ( newBlocks, options ) => { const { selection } = options; const footnotesChanges = updateFootnotes( newBlocks ); - const edits = { blocks: newBlocks, selection, ...footnotesChanges }; + const edits = { selection, ...footnotesChanges }; editEntityRecord( kind, name, id, edits, { isCached: true } ); }, diff --git a/packages/rich-text/src/component/use-select-object.js b/packages/rich-text/src/component/use-select-object.js index 9ecc7ed9f147c..e5db313494f48 100644 --- a/packages/rich-text/src/component/use-select-object.js +++ b/packages/rich-text/src/component/use-select-object.js @@ -25,8 +25,13 @@ export function useSelectObject() { if ( selection.containsNode( target ) ) return; const range = ownerDocument.createRange(); + // If the target is within a non editable element, select the non + // editable element. + const nodeToSelect = target.isContentEditable + ? target + : target.closest( '[contenteditable]' ); - range.selectNode( target ); + range.selectNode( nodeToSelect ); selection.removeAllRanges(); selection.addRange( range ); diff --git a/packages/rich-text/src/to-dom.js b/packages/rich-text/src/to-dom.js index 828e3a4e3f6cb..305eebaf3e4a6 100644 --- a/packages/rich-text/src/to-dom.js +++ b/packages/rich-text/src/to-dom.js @@ -57,6 +57,10 @@ function getNodeByPath( node, path ) { } function append( element, child ) { + if ( child.html !== undefined ) { + return ( element.innerHTML += child.html ); + } + if ( typeof child === 'string' ) { child = element.ownerDocument.createTextNode( child ); } diff --git a/packages/rich-text/src/to-tree.js b/packages/rich-text/src/to-tree.js index b390954b79672..8a1c3ff074a55 100644 --- a/packages/rich-text/src/to-tree.js +++ b/packages/rich-text/src/to-tree.js @@ -108,7 +108,7 @@ function fromFormat( { } return { - type: formatType.tagName === '*' ? tagName : formatType.tagName, + type: tagName || formatType.tagName, object: formatType.object, attributes: restoreOnAttributes( elementAttributes, isEditableTree ), }; @@ -326,7 +326,11 @@ export function toTree( { } ) ); - if ( innerHTML ) append( pointer, innerHTML ); + if ( innerHTML ) { + append( pointer, { + html: innerHTML, + } ); + } } else { pointer = append( getParent( pointer ), diff --git a/test/e2e/specs/editor/various/footnotes.spec.js b/test/e2e/specs/editor/various/footnotes.spec.js index 1f2fd33f23f73..376962b5c99ba 100644 --- a/test/e2e/specs/editor/various/footnotes.spec.js +++ b/test/e2e/specs/editor/various/footnotes.spec.js @@ -48,7 +48,7 @@ test.describe( 'Footnotes', () => { { name: 'core/paragraph', attributes: { - content: `second paragraph*`, + content: `second paragraph1`, }, }, { @@ -72,13 +72,13 @@ test.describe( 'Footnotes', () => { { name: 'core/paragraph', attributes: { - content: `first paragraph*`, + content: `first paragraph1`, }, }, { name: 'core/paragraph', attributes: { - content: `second paragraph*`, + content: `second paragraph2`, }, }, { @@ -106,13 +106,13 @@ test.describe( 'Footnotes', () => { { name: 'core/paragraph', attributes: { - content: `second paragraph*`, + content: `second paragraph1`, }, }, { name: 'core/paragraph', attributes: { - content: `first paragraph*`, + content: `first paragraph2`, }, }, { @@ -138,7 +138,7 @@ test.describe( 'Footnotes', () => { { name: 'core/paragraph', attributes: { - content: `second paragraph*`, + content: `second paragraph1`, }, }, { @@ -202,7 +202,7 @@ test.describe( 'Footnotes', () => { { name: 'core/list-item', attributes: { - content: `1*`, + content: `11`, }, }, ], @@ -242,7 +242,7 @@ test.describe( 'Footnotes', () => { { cells: [ { - content: `1*`, + content: `11`, tag: 'td', }, { From 1f82e3f6400148bfee80673915d76f14e58f2347 Mon Sep 17 00:00:00 2001 From: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Date: Tue, 11 Jul 2023 00:40:13 +0900 Subject: [PATCH 126/146] [RNMobile] Fix Fixed warning in `clean` script (#52447) --- packages/react-native-aztec/package.json | 2 +- packages/react-native-editor/package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-native-aztec/package.json b/packages/react-native-aztec/package.json index 3087d3708a704..c110932d6c0d8 100644 --- a/packages/react-native-aztec/package.json +++ b/packages/react-native-aztec/package.json @@ -37,7 +37,7 @@ "clean-metro": "rm -rf $TMPDIR/metro-cache-*; rm -rf $TMPDIR/metro-bundler-cache-*;", "clean-node": "rm -rf node_modules/;", "clean-react": "rm -rf $TMPDIR/react-*; rm -rf $TMPDIR/react-native-packager-cache-*;", - "clean-watchman": "command -v watchman >/dev/null 2>&1 && watchman watch-del-all;", + "clean-watchman": "command -v watchman >/dev/null 2>&1 && watchman watch-del-all; true", "clean:install": "npm run clean && npm install" } } diff --git a/packages/react-native-editor/package.json b/packages/react-native-editor/package.json index 1c0044e92962a..91f261457d4e0 100644 --- a/packages/react-native-editor/package.json +++ b/packages/react-native-editor/package.json @@ -115,8 +115,8 @@ "test:e2e:build-wda": "xcodebuild -project ../../node_modules/appium/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'platform=iOS Simulator,name=iPhone 13' -derivedDataPath ios/build/WDA", "test:e2e:ios:local": "npm run test:e2e:bundle:ios && npm run test:e2e:build-app:ios && npm run test:e2e:build-wda && TEST_RN_PLATFORM=ios npm run device-tests:local", "build:gutenberg": "cd gutenberg && npm ci && npm run build", - "clean": "npm run clean:build-artifacts; npm run clean:aztec; npm run clean:haste; npm run clean:jest; npm run clean:metro; npm run clean:watchman", - "clean:runtime": "npm run clean:haste; npm run clean:metro; npm run clean:jest; npm run clean:watchman; npm run clean:babel-cache", + "clean": "npm run clean:build-artifacts; npm run clean:aztec; npm run clean:haste; npm run clean:metro; npm run clean:watchman", + "clean:runtime": "npm run clean:haste; npm run clean:metro; npm run clean:watchman; npm run clean:babel-cache", "clean:build-artifacts": "rm -rf ./ios/build && rm -rf ./ios/Pods", "clean:aztec": "cd ../react-native-aztec && npm run clean", "clean:haste": "rm -rf $TMPDIR/haste-map-metro-*", From 9baa061f1d6028f59fcc0d86e61fb43988ffd38a Mon Sep 17 00:00:00 2001 From: Luis Herranz Date: Mon, 10 Jul 2023 17:42:02 +0200 Subject: [PATCH 127/146] Navigation block: Add notice on reduced accessibility (#52251) * Add notice on reduced accessibility submenu options * Make notice assertive * Don't read the notice on the initial render * Speak full message and remove assertive --- .../src/navigation/edit/index.js | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/packages/block-library/src/navigation/edit/index.js b/packages/block-library/src/navigation/edit/index.js index 7ec990d5b7389..cc83463676d95 100644 --- a/packages/block-library/src/navigation/edit/index.js +++ b/packages/block-library/src/navigation/edit/index.js @@ -38,6 +38,7 @@ import { __experimentalToggleGroupControlOption as ToggleGroupControlOption, Button, Spinner, + Notice, } from '@wordpress/components'; import { __, sprintf } from '@wordpress/i18n'; import { speak } from '@wordpress/a11y'; @@ -485,6 +486,21 @@ function Navigation( { { open: overlayMenuPreview } ); + const submenuAccessibilityNotice = + ! showSubmenuIcon && ! openSubmenusOnClick + ? __( + 'The current menu options offer reduced accessibility for users and are not recommended. Enabling either "Open on Click" or "Show arrow" offers enhanced accessibility by allowing keyboard users to browse submenus selectively.' + ) + : ''; + + const isFirstRender = useRef( true ); // Don't speak on first render. + useEffect( () => { + if ( ! isFirstRender.current && submenuAccessibilityNotice ) { + speak( submenuAccessibilityNotice ); + } + isFirstRender.current = false; + }, [ submenuAccessibilityNotice ] ); + const colorGradientSettings = useMultipleOriginColorsAndGradients(); const stylingInspectorControls = ( <> @@ -578,6 +594,18 @@ function Navigation( { disabled={ attributes.openSubmenusOnClick } label={ __( 'Show arrow' ) } /> + + { submenuAccessibilityNotice && ( +
        + + { submenuAccessibilityNotice } + +
        + ) } ) } From 7318f11e728851956b56387ff7100e7cfa9f64ed Mon Sep 17 00:00:00 2001 From: JuanMa Date: Mon, 10 Jul 2023 17:16:08 +0100 Subject: [PATCH 128/146] added README for the "caption" component (#52033) * added README for the caption component * Minor adjustments * removed unnecesary space --- .../src/components/caption/README.md | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 packages/block-editor/src/components/caption/README.md diff --git a/packages/block-editor/src/components/caption/README.md b/packages/block-editor/src/components/caption/README.md new file mode 100644 index 0000000000000..d1f8bcddaaced --- /dev/null +++ b/packages/block-editor/src/components/caption/README.md @@ -0,0 +1,49 @@ +## Caption + +The `Caption` component renders the [caption part](https://wordpress.org/documentation/article/gallery-block/#caption) of some blocks (image, gallery...). + +This component encapsulates the "caption" behaviour and styles over a `` so it can be used in other components such as the `BlockCaption` component. + +## Table of contents + +1. [Development guidelines](#development-guidelines) +2. [Related components](#related-components) + +## Development guidelines + +### Usage + +Renders a Caption area: + +```jsx +import { Caption } from '@wordpress/block-editor'; +const BlockCaption = ( { + onBlur, + onChange, + onFocus, + isSelected, + shouldDisplay, + text, + insertBlocksAfter, +} ) => ( + + + +); +``` + +### Props + +The properties `isSelected`, `onBlur`, `onChange`, `onFocus`, `shouldDisplay`, `value`, `insertBlocksAfter` of this component are passed directly to their related props of its inner `` component ([see detailed info about the RichText component's props](https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/rich-text/README.md)). + +## Related components + +Caption components is mostly used by the [`BlockCaption`](https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-caption) component. \ No newline at end of file From 92dd32e7aaa26cf24e0e706c6481e834f67272c4 Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Mon, 10 Jul 2023 12:31:20 -0500 Subject: [PATCH 129/146] Font Face: to generate and print font-face styles for theme.json fonts (#51770) Introduces Font Face for generating and printing @font-face styles for fonts in theme.json merged data. It's minimalistic in what it publicly exposes to avoid BC concerns. There's no register, deregister, or enqueue of fonts or providers. The fonts to be processed come directly from theme.json merged data which contains the theme's defined fonts and user "activated" fonts (from the Font Library). This PR only loads Font Face into memory (thus replacing Fonts API) when the Fonts Library class. This design is intentional to ensure sites using Fonts API stay functioning until Fonts Library is introduced. --------- Co-authored-by: Anton Vlasenko Co-authored-by: Ari Stathopoulos --- ...class-wp-theme-json-resolver-gutenberg.php | 4 +- lib/compat/wordpress-6.3/script-loader.php | 1 - lib/experimental/fonts-api/fonts-api.php | 14 + .../fonts/class-wp-font-face-resolver.php | 158 +++++++ lib/experimental/fonts/class-wp-font-face.php | 418 ++++++++++++++++++ lib/experimental/fonts/fonts.php | 58 +++ lib/load.php | 19 +- phpunit/fonts/wp-font-face-testcase.php | 187 ++++++++ phpunit/fonts/wp-font-face-tests-dataset.php | 274 ++++++++++++ .../wpFontFace/generateAndPrint-test.php | 57 +++ .../getFontsFromThemeJson-test.php | 116 +++++ phpunit/fonts/wpPrintFontFaces-test.php | 75 ++++ 12 files changed, 1376 insertions(+), 5 deletions(-) create mode 100644 lib/experimental/fonts/class-wp-font-face-resolver.php create mode 100644 lib/experimental/fonts/class-wp-font-face.php create mode 100644 lib/experimental/fonts/fonts.php create mode 100644 phpunit/fonts/wp-font-face-testcase.php create mode 100644 phpunit/fonts/wp-font-face-tests-dataset.php create mode 100644 phpunit/fonts/wpFontFace/generateAndPrint-test.php create mode 100644 phpunit/fonts/wpFontFaceResolver/getFontsFromThemeJson-test.php create mode 100644 phpunit/fonts/wpPrintFontFaces-test.php diff --git a/lib/class-wp-theme-json-resolver-gutenberg.php b/lib/class-wp-theme-json-resolver-gutenberg.php index 6e9d05cd7f238..1e825e3c6bbe4 100644 --- a/lib/class-wp-theme-json-resolver-gutenberg.php +++ b/lib/class-wp-theme-json-resolver-gutenberg.php @@ -275,7 +275,9 @@ public static function get_theme_data( $deprecated = array(), $options = array() } // BEGIN OF EXPERIMENTAL CODE. Not to backport to core. - static::$theme = WP_Fonts_Resolver::add_missing_fonts_to_theme_json( static::$theme ); + if ( ! class_exists( 'WP_Font_Face' ) && class_exists( 'WP_Fonts_Resolver' ) ) { + static::$theme = WP_Fonts_Resolver::add_missing_fonts_to_theme_json( static::$theme ); + } // END OF EXPERIMENTAL CODE. } diff --git a/lib/compat/wordpress-6.3/script-loader.php b/lib/compat/wordpress-6.3/script-loader.php index c515eb10fdc6b..8f7bda2a64811 100644 --- a/lib/compat/wordpress-6.3/script-loader.php +++ b/lib/compat/wordpress-6.3/script-loader.php @@ -81,7 +81,6 @@ function _gutenberg_get_iframed_editor_assets() { ob_start(); wp_print_styles(); - wp_print_fonts( true ); $styles = ob_get_clean(); ob_start(); diff --git a/lib/experimental/fonts-api/fonts-api.php b/lib/experimental/fonts-api/fonts-api.php index e2ad6e1cb53af..8d07dc118f56e 100644 --- a/lib/experimental/fonts-api/fonts-api.php +++ b/lib/experimental/fonts-api/fonts-api.php @@ -243,3 +243,17 @@ static function( $mime_types ) { * during the build. See: tools/webpack/blocks.js. */ add_action( 'init', 'WP_Fonts_Resolver::register_fonts_from_theme_json', 21 ); + +add_filter( + 'block_editor_settings_all', + static function( $settings ) { + ob_start(); + wp_print_fonts( true ); + $styles = ob_get_clean(); + + // Add the font-face styles to iframed editor assets. + $settings['__unstableResolvedAssets']['styles'] .= $styles; + return $settings; + }, + 11 +); diff --git a/lib/experimental/fonts/class-wp-font-face-resolver.php b/lib/experimental/fonts/class-wp-font-face-resolver.php new file mode 100644 index 0000000000000..16e74d6051aa7 --- /dev/null +++ b/lib/experimental/fonts/class-wp-font-face-resolver.php @@ -0,0 +1,158 @@ +get_settings(); + + // Bail out early if there are no font settings. + if ( empty( $settings['typography'] ) || empty( $settings['typography']['fontFamilies'] ) ) { + return array(); + } + + return static::parse_settings( $settings ); + } + + /** + * Parse theme.json settings to extract font definitions with variations grouped by font-family. + * + * @since X.X.X + * + * @param array $settings Font settings to parse. + * @return array Returns an array of fonts, grouped by font-family. + */ + private static function parse_settings( array $settings ) { + $fonts = array(); + + foreach ( $settings['typography']['fontFamilies'] as $font_families ) { + foreach ( $font_families as $definition ) { + + // Skip if font-family "name" is not defined. + if ( empty( $definition['name'] ) ) { + continue; + } + + // Skip if "fontFace" is not defined, meaning there are no variations. + if ( empty( $definition['fontFace'] ) ) { + continue; + } + + $font_family = $definition['name']; + + // Prepare the fonts array structure for this font-family. + if ( ! array_key_exists( $font_family, $fonts ) ) { + $fonts[ $font_family ] = array(); + } + + $fonts[ $font_family ] = static::convert_font_face_properties( $definition['fontFace'], $font_family ); + } + } + + return $fonts; + } + + /** + * Converts font-face properties from theme.json format. + * + * @since X.X.X + * + * @param array $font_face_definition The font-face definitions to convert. + * @param string $font_family_property The value to store in the font-face font-family property. + * @return array Converted font-face properties. + */ + private static function convert_font_face_properties( array $font_face_definition, $font_family_property ) { + $converted_font_faces = array(); + + foreach ( $font_face_definition as $font_face ) { + // Add the font-family property to the font-face. + $font_face['font-family'] = $font_family_property; + + // Converts the "file:./" src placeholder into a theme font file URI. + if ( ! empty( $font_face['src'] ) ) { + $font_face['src'] = static::to_theme_file_uri( (array) $font_face['src'] ); + } + + // Convert camelCase properties into kebab-case. + $font_face = static::to_kebab_case( $font_face ); + + $converted_font_faces[] = $font_face; + } + + return $converted_font_faces; + } + + /** + * Converts each 'file:./' placeholder into a URI to the font file in the theme. + * + * The 'file:./' is specified in the theme's `theme.json` as a placeholder to be + * replaced with the URI to the font file's location in the theme. When a "src" + * beings with this placeholder, it is replaced, converting the src into a URI. + * + * @since X.X.X + * + * @param array $src An array of font file sources to process. + * @return array An array of font file src URI(s). + */ + private static function to_theme_file_uri( array $src ) { + $placeholder = 'file:./'; + + foreach ( $src as $src_key => $src_url ) { + // Skip if the src doesn't start with the placeholder, as there's nothing to replace. + if ( ! str_starts_with( $src_url, $placeholder ) ) { + continue; + } + + $src_file = str_replace( $placeholder, '', $src_url ); + $src[ $src_key ] = get_theme_file_uri( $src_file ); + } + + return $src; + } + + /** + * Converts all first dimension keys into kebab-case. + * + * @since X.X.X + * + * @param array $data The array to process. + * @return array Data with first dimension keys converted into kebab-case. + */ + private static function to_kebab_case( array $data ) { + foreach ( $data as $key => $value ) { + $kebab_case = _wp_to_kebab_case( $key ); + $data[ $kebab_case ] = $value; + if ( $kebab_case !== $key ) { + unset( $data[ $key ] ); + } + } + + return $data; + } +} diff --git a/lib/experimental/fonts/class-wp-font-face.php b/lib/experimental/fonts/class-wp-font-face.php new file mode 100644 index 0000000000000..482bf4d42396d --- /dev/null +++ b/lib/experimental/fonts/class-wp-font-face.php @@ -0,0 +1,418 @@ + '', + 'font-style' => 'normal', + 'font-weight' => '400', + 'font-display' => 'fallback', + ); + + /** + * Valid font-face property names. + * + * @since X.X.X + * + * @var string[] + */ + private $valid_font_face_properties = array( + 'ascent-override', + 'descent-override', + 'font-display', + 'font-family', + 'font-stretch', + 'font-style', + 'font-weight', + 'font-variant', + 'font-feature-settings', + 'font-variation-settings', + 'line-gap-override', + 'size-adjust', + 'src', + 'unicode-range', + ); + + /** + * Valid font-display values. + * + * @since X.X.X + * + * @var string[] + */ + private $valid_font_display = array( 'auto', 'block', 'fallback', 'swap', 'optional' ); + + /** + * Array of font-face style tag's attribute(s) + * where the key is the attribute name and the + * value is its value. + * + * @since X.X.X + * + * @var string[] + */ + private $style_tag_attrs = array(); + + /** + * Creates and initializes an instance of WP_Font_Face. + * + * @since X.X.X + */ + public function __construct() { + /** + * Filters the font-face property defaults. + * + * @since X.X.X + * + * @param array $defaults { + * An array of required font-face properties and defaults. + * + * @type string $provider The provider ID. Default 'local'. + * @type string $font-family The font-family property. Default empty string. + * @type string $font-style The font-style property. Default 'normal'. + * @type string $font-weight The font-weight property. Default '400'. + * @type string $font-display The font-display property. Default 'fallback'. + * } + */ + $this->font_face_property_defaults = apply_filters( 'wp_font_face_property_defaults', $this->font_face_property_defaults ); + + if ( + function_exists( 'is_admin' ) && ! is_admin() + && + function_exists( 'current_theme_supports' ) && ! current_theme_supports( 'html5', 'style' ) + ) { + $this->style_tag_attrs = array( 'type' => 'text/css' ); + } + } + + /** + * Generates and prints the `@font-face` styles for the given fonts. + * + * @since X.X.X + * + * @param array $fonts The fonts to generate and print @font-face styles. + */ + public function generate_and_print( array $fonts ) { + $fonts = $this->validate_fonts( $fonts ); + + // Bail out if there are no fonts are given to process. + if ( empty( $fonts ) ) { + return; + } + + printf( + $this->get_style_element(), + $this->get_css( $fonts ) + ); + } + + /** + * Validates each of the font-face properties. + * + * @since X.X.X + * + * @param array $fonts The fonts to valid. + * @return array Prepared font-faces organized by provider and font-family. + */ + private function validate_fonts( array $fonts ) { + $validated_fonts = array(); + + foreach ( $fonts as $font_faces ) { + foreach ( $font_faces as $font_face ) { + $font_face = $this->validate_font_face_properties( $font_face ); + // Skip if failed validation. + if ( false === $font_face ) { + continue; + } + + $validated_fonts[] = $font_face; + } + } + + return $validated_fonts; + } + + /** + * Validates each font-face property. + * + * @since X.X.X + * + * @param array $font_face Font face properties to validate. + * @return false|array Validated font-face on success. Else, false. + */ + private function validate_font_face_properties( array $font_face ) { + $font_face = wp_parse_args( $font_face, $this->font_face_property_defaults ); + + // Check the font-family. + if ( empty( $font_face['font-family'] ) || ! is_string( $font_face['font-family'] ) ) { + trigger_error( 'Font font-family must be a non-empty string.' ); + return false; + } + + // Make sure that local fonts have 'src' defined. + if ( empty( $font_face['src'] ) || ( ! is_string( $font_face['src'] ) && ! is_array( $font_face['src'] ) ) ) { + trigger_error( 'Font src must be a non-empty string or an array of strings.' ); + return false; + } + + // Validate the 'src' property. + if ( ! empty( $font_face['src'] ) ) { + foreach ( (array) $font_face['src'] as $src ) { + if ( empty( $src ) || ! is_string( $src ) ) { + trigger_error( 'Each font src must be a non-empty string.' ); + return false; + } + } + } + + // Check the font-weight. + if ( ! is_string( $font_face['font-weight'] ) && ! is_int( $font_face['font-weight'] ) ) { + trigger_error( 'Font font-weight must be a properly formatted string or integer.' ); + return false; + } + + // Check the font-display. + if ( ! in_array( $font_face['font-display'], $this->valid_font_display, true ) ) { + $font_face['font-display'] = $this->font_face_property_defaults['font-display']; + } + + // Remove invalid properties. + foreach ( $font_face as $prop => $value ) { + if ( ! in_array( $prop, $this->valid_font_face_properties, true ) ) { + unset( $font_face[ $prop ] ); + } + } + + return $font_face; + } + + /** + * Gets the `\n"; + } + + /** + * Gets the defined \n"; + $expected_output = sprintf( $style_element, $expected ); + + $this->expectOutputString( $expected_output ); + $font_face->generate_and_print( $fonts ); + } +} diff --git a/phpunit/fonts/wpFontFaceResolver/getFontsFromThemeJson-test.php b/phpunit/fonts/wpFontFaceResolver/getFontsFromThemeJson-test.php new file mode 100644 index 0000000000000..74c0f0a4f3c42 --- /dev/null +++ b/phpunit/fonts/wpFontFaceResolver/getFontsFromThemeJson-test.php @@ -0,0 +1,116 @@ +assertIsArray( $fonts, 'Should return an array data type' ); + $this->assertEmpty( $fonts, 'Should return an empty array' ); + } + + public function test_should_return_all_fonts_from_theme() { + switch_theme( static::FONTS_THEME ); + + $actual = WP_Font_Face_Resolver::get_fonts_from_theme_json(); + $expected = $this->get_expected_fonts_for_fonts_block_theme( 'fonts' ); + $this->assertSame( $expected, $actual ); + } + + /** + * @dataProvider data_should_replace_src_file_placeholder + * + * @param string $font_name Font's name. + * @param string $font_index Font's index in the $fonts array. + * @param string $expected Expected src. + */ + public function test_should_replace_src_file_placeholder( $font_name, $font_index, $expected ) { + switch_theme( static::FONTS_THEME ); + + $fonts = WP_Font_Face_Resolver::get_fonts_from_theme_json(); + + $actual = $fonts[ $font_name ][ $font_index ]['src'][0]; + $expected = get_stylesheet_directory_uri() . $expected; + + $this->assertStringNotContainsString( 'file:./', $actual, 'Font src should not contain the "file:./" placeholder' ); + $this->assertSame( $expected, $actual, 'Font src should be an URL to its file' ); + } + + /** + * Data provider. + * + * @return array + */ + public function data_should_replace_src_file_placeholder() { + return array( + // Theme's theme.json. + 'DM Sans: 400 normal' => array( + 'font_name' => 'DM Sans', + 'font_index' => 0, + 'expected' => '/assets/fonts/dm-sans/DMSans-Regular.woff2', + ), + 'DM Sans: 400 italic' => array( + 'font_name' => 'DM Sans', + 'font_index' => 1, + 'expected' => '/assets/fonts/dm-sans/DMSans-Regular-Italic.woff2', + ), + 'DM Sans: 700 normal' => array( + 'font_name' => 'DM Sans', + 'font_index' => 2, + 'expected' => '/assets/fonts/dm-sans/DMSans-Bold.woff2', + ), + 'DM Sans: 700 italic' => array( + 'font_name' => 'DM Sans', + 'font_index' => 3, + 'expected' => '/assets/fonts/dm-sans/DMSans-Bold-Italic.woff2', + ), + 'Source Serif Pro: 200-900 normal' => array( + 'font_name' => 'Source Serif Pro', + 'font_index' => 0, + 'expected' => '/assets/fonts/source-serif-pro/SourceSerif4Variable-Roman.ttf.woff2', + ), + 'Source Serif Pro: 200-900 italic' => array( + 'font_name' => 'Source Serif Pro', + 'font_index' => 1, + 'expected' => '/assets/fonts/source-serif-pro/SourceSerif4Variable-Italic.ttf.woff2', + ), + ); + } +} diff --git a/phpunit/fonts/wpPrintFontFaces-test.php b/phpunit/fonts/wpPrintFontFaces-test.php new file mode 100644 index 0000000000000..aa44dd4f71b0d --- /dev/null +++ b/phpunit/fonts/wpPrintFontFaces-test.php @@ -0,0 +1,75 @@ +expectOutputString( '' ); + wp_print_font_faces(); + } + + /** + * @dataProvider data_should_print_given_fonts + * + * @param array $fonts Fonts to process. + * @param string $expected Expected CSS. + */ + public function test_should_print_given_fonts( array $fonts, $expected ) { + $expected_output = $this->get_expected_styles_output( $expected ); + + $this->expectOutputString( $expected_output ); + wp_print_font_faces( $fonts ); + } + + public function test_should_print_fonts_in_merged_data() { + switch_theme( static::FONTS_THEME ); + + $expected = $this->get_expected_fonts_for_fonts_block_theme( 'font_face_styles' ); + $expected_output = $this->get_expected_styles_output( $expected ); + + $this->expectOutputString( $expected_output ); + wp_print_font_faces(); + } + + private function get_expected_styles_output( $styles ) { + $style_element = "\n"; + return sprintf( $style_element, $styles ); + } +} From 7b6c18433d44a49c261049cb3830d46017aae932 Mon Sep 17 00:00:00 2001 From: Phill <38789408+SavPhill@users.noreply.github.com> Date: Tue, 11 Jul 2023 01:01:46 +0700 Subject: [PATCH 130/146] Removed line break within the code block (#46920) --- docs/explanations/architecture/styles.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/explanations/architecture/styles.md b/docs/explanations/architecture/styles.md index 5b147b2bbe6ea..a8a5af72fec76 100644 --- a/docs/explanations/architecture/styles.md +++ b/docs/explanations/architecture/styles.md @@ -59,10 +59,8 @@ The user may change the state of this block by applying different styles: a text After some user modifications to the block, the initial markup may become something like this: ```html -

        +

        ``` This is what we refer to as "user-provided block styles", also know as "local styles" or "serialized styles". Essentially, each tool (font size, color, etc) ends up adding some classes and/or inline styles to the block markup. The CSS styling for these classes is part of the block, global, or theme stylesheets. From ba0a3320c878c36a9a3cc27660ca0b9b3d89facd Mon Sep 17 00:00:00 2001 From: Ella <4710635+ellatrix@users.noreply.github.com> Date: Mon, 10 Jul 2023 21:05:46 +0200 Subject: [PATCH 131/146] Iframe: avoid asset parsing & fix script localisation (#52405) * Iframe: avoid asset parsing & fix script localisation * Add e2e test for script localisation --- .../src/components/iframe/index.js | 63 +++++-------------- .../plugins/iframed-enqueue-block-assets.php | 13 ++++ .../iframed-enqueue-block-assets/script.js | 3 + .../iframed-equeue-block-assets.test.js | 7 +++ 4 files changed, 39 insertions(+), 47 deletions(-) create mode 100644 packages/e2e-tests/plugins/iframed-enqueue-block-assets/script.js diff --git a/packages/block-editor/src/components/iframe/index.js b/packages/block-editor/src/components/iframe/index.js index 4d4521eae3581..afe403af0aa39 100644 --- a/packages/block-editor/src/components/iframe/index.js +++ b/packages/block-editor/src/components/iframe/index.js @@ -11,7 +11,6 @@ import { createPortal, forwardRef, useMemo, - useReducer, useEffect, } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; @@ -78,29 +77,6 @@ function bubbleEvents( doc ) { } } -function useParsedAssets( html ) { - return useMemo( () => { - const doc = document.implementation.createHTMLDocument( '' ); - doc.body.innerHTML = html; - return Array.from( doc.body.children ); - }, [ html ] ); -} - -async function loadScript( head, { id, src } ) { - return new Promise( ( resolve, reject ) => { - const script = head.ownerDocument.createElement( 'script' ); - script.id = id; - if ( src ) { - script.src = src; - script.onload = () => resolve(); - script.onerror = () => reject(); - } else { - resolve(); - } - head.appendChild( script ); - } ); -} - function Iframe( { contentRef, children, @@ -112,21 +88,22 @@ function Iframe( { forwardedRef: ref, ...props } ) { - const assets = useSelect( + const { styles = '', scripts = '' } = useSelect( ( select ) => select( blockEditorStore ).getSettings().__unstableResolvedAssets, [] ); - const [ , forceRender ] = useReducer( () => ( {} ) ); const [ iframeDocument, setIframeDocument ] = useState(); const [ bodyClasses, setBodyClasses ] = useState( [] ); const compatStyles = useCompatibilityStyles(); - const scripts = useParsedAssets( assets?.scripts ); const clearerRef = useBlockSelectionClearer(); const [ before, writingFlowRef, after ] = useWritingFlow(); const [ contentResizeListener, { height: contentHeight } ] = useResizeObserver(); const setRef = useRefEffect( ( node ) => { + node._load = () => { + setIframeDocument( node.contentDocument ); + }; let iFrameDocument; // Prevent the default browser action for files dropped outside of dropzones. function preventFileDropDefault( event ) { @@ -138,7 +115,6 @@ function Iframe( { iFrameDocument = contentDocument; bubbleEvents( contentDocument ); - setIframeDocument( contentDocument ); clearerRef( documentElement ); // Ideally ALL classes that are added through get_body_class should @@ -154,7 +130,6 @@ function Iframe( { ); contentDocument.dir = ownerDocument.dir; - documentElement.removeChild( contentDocument.body ); for ( const compatStyle of compatStyles ) { if ( contentDocument.getElementById( compatStyle.id ) ) { @@ -199,35 +174,29 @@ function Iframe( { }; }, [] ); - const headRef = useRefEffect( ( element ) => { - scripts - .reduce( - ( promise, script ) => - promise.then( () => loadScript( element, script ) ), - Promise.resolve() - ) - .finally( () => { - // When script are loaded, re-render blocks to allow them - // to initialise. - forceRender(); - } ); - }, [] ); const disabledRef = useDisabled( { isDisabled: ! readonly } ); const bodyRef = useMergeRefs( [ contentRef, clearerRef, writingFlowRef, disabledRef, - headRef, ] ); // Correct doctype is required to enable rendering in standards // mode. Also preload the styles to avoid a flash of unstyled // content. - const html = - '' + - '' + - ( assets?.styles ?? '' ); + const html = ` + + + + + ${ styles } + ${ scripts } + + + + +`; const [ src, cleanup ] = useMemo( () => { const _src = URL.createObjectURL( diff --git a/packages/e2e-tests/plugins/iframed-enqueue-block-assets.php b/packages/e2e-tests/plugins/iframed-enqueue-block-assets.php index ad98354dd45dc..3f24a6e25cfcb 100644 --- a/packages/e2e-tests/plugins/iframed-enqueue-block-assets.php +++ b/packages/e2e-tests/plugins/iframed-enqueue-block-assets.php @@ -17,5 +17,18 @@ static function() { filemtime( plugin_dir_path( __FILE__ ) . 'iframed-enqueue-block-assets/style.css' ) ); wp_add_inline_style( 'iframed-enqueue-block-assets', 'body{padding:20px!important}' ); + wp_enqueue_script( + 'iframed-enqueue-block-assets-script', + plugin_dir_url( __FILE__ ) . 'iframed-enqueue-block-assets/script.js', + array(), + filemtime( plugin_dir_path( __FILE__ ) . 'iframed-enqueue-block-assets/script.js' ) + ); + wp_localize_script( + 'iframed-enqueue-block-assets-script', + 'iframedEnqueueBlockAssetsL10n', + array( + 'test' => 'Iframed Enqueue Block Assets!', + ) + ); } ); diff --git a/packages/e2e-tests/plugins/iframed-enqueue-block-assets/script.js b/packages/e2e-tests/plugins/iframed-enqueue-block-assets/script.js new file mode 100644 index 0000000000000..f0eddd65c70eb --- /dev/null +++ b/packages/e2e-tests/plugins/iframed-enqueue-block-assets/script.js @@ -0,0 +1,3 @@ +window.addEventListener( 'load', () => { + document.body.dataset.iframedEnqueueBlockAssetsL10n = window.iframedEnqueueBlockAssetsL10n.test; +} ); diff --git a/packages/e2e-tests/specs/editor/plugins/iframed-equeue-block-assets.test.js b/packages/e2e-tests/specs/editor/plugins/iframed-equeue-block-assets.test.js index c1bd26fe1c761..c29af593abb12 100644 --- a/packages/e2e-tests/specs/editor/plugins/iframed-equeue-block-assets.test.js +++ b/packages/e2e-tests/specs/editor/plugins/iframed-equeue-block-assets.test.js @@ -32,6 +32,7 @@ describe( 'iframed inline styles', () => { } ); it( 'should load styles added through enqueue_block_assets', async () => { + await page.waitForSelector( 'iframe[name="editor-canvas"]' ); // Check stylesheet. expect( await getComputedStyle( canvas(), 'body', 'background-color' ) @@ -40,5 +41,11 @@ describe( 'iframed inline styles', () => { expect( await getComputedStyle( canvas(), 'body', 'padding' ) ).toBe( '20px' ); + + expect( + await canvas().evaluate( () => ( { ...document.body.dataset } ) ) + ).toEqual( { + iframedEnqueueBlockAssetsL10n: 'Iframed Enqueue Block Assets!', + } ); } ); } ); From dabe35463a073368ab9e2aa2bc1a607c395aa9e3 Mon Sep 17 00:00:00 2001 From: Gutenberg Repository Automation Date: Mon, 10 Jul 2023 19:22:31 +0000 Subject: [PATCH 132/146] Bump plugin version to 16.2.0-rc.2 --- gutenberg.php | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gutenberg.php b/gutenberg.php index c90c1d0bb22e8..b1513d52e61d1 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -5,7 +5,7 @@ * Description: Printing since 1440. This is the development plugin for the block editor, site editor, and other future WordPress core functionality. * Requires at least: 6.1 * Requires PHP: 5.6 - * Version: 16.2.0-rc.1 + * Version: 16.2.0-rc.2 * Author: Gutenberg Team * Text Domain: gutenberg * diff --git a/package-lock.json b/package-lock.json index a0a00a13e4520..60cabfe3244bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gutenberg", - "version": "16.2.0-rc.1", + "version": "16.2.0-rc.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index a7da15a667182..46fb91477bd6e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gutenberg", - "version": "16.2.0-rc.1", + "version": "16.2.0-rc.2", "private": true, "description": "A new WordPress editor experience.", "author": "The WordPress Contributors", From a045f9ec5d8ec9efd186f484ca3fc4d050abb44c Mon Sep 17 00:00:00 2001 From: Gutenberg Repository Automation Date: Mon, 10 Jul 2023 19:50:38 +0000 Subject: [PATCH 133/146] Update Changelog for 16.2.0-rc.2 --- changelog.txt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/changelog.txt b/changelog.txt index 1937dcdf19376..561df06f23529 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,30 @@ == Changelog == += 16.2.0-rc.2 = + +## Changelog + +### Bug Fixes + +#### Block Library +- RichText/Footnotes: Make getRichTextValues work with InnerBlocks.Content. ([52241](https://github.com/WordPress/gutenberg/pull/52241)) + +#### Blocks +- Post and Comment Template blocks: Change render_block_context priority to 1 (https://github.com/WordPress/gutenberg/pull/52364) +- Footnotes: Fix incorrect anchor position in Firefox (https://github.com/WordPress/gutenberg/pull/52425) +- Footnotes: fix lingering format boundary attr (https://github.com/WordPress/gutenberg/pull/52439) +- Footnotes: save numbering through the entity provider (https://github.com/WordPress/gutenberg/pull/52423) + +#### Code Quality / Performance +- Iframe: avoid asset parsing & fix script localisation + +## Contributors + +The following contributors merged PRs in this release: + +@ellatrix @ockham @t-hamano + + = 16.1.2 = ### Bug fixes From c1f97cb90d17458a5a44a9be4e76c40f09558386 Mon Sep 17 00:00:00 2001 From: Marcelo Serpa <81248+fullofcaffeine@users.noreply.github.com> Date: Mon, 10 Jul 2023 14:10:50 -0600 Subject: [PATCH 134/146] (readme.md) Document the new process for releasing point releases for old release branches (#49968) * Document the new process for releasing point releases for old release branches/versions of Gutenberg * Document a bit better * Add a couple of minor improvements * Fix use-case example, the description of the logic was wrong * Make it more concise * Improve last paragraph * Update docs/contributors/code/release.md Co-authored-by: Bernie Reiter <96308+ockham@users.noreply.github.com> --------- Co-authored-by: Bernie Reiter <96308+ockham@users.noreply.github.com> --- docs/contributors/code/release.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/contributors/code/release.md b/docs/contributors/code/release.md index 180de30d19557..edbd67655a699 100644 --- a/docs/contributors/code/release.md +++ b/docs/contributors/code/release.md @@ -181,7 +181,13 @@ _If_ however, the previous release was an **RC** (e.g. `X.Y.0-rc.1`) you will ne To do this, when running the Workflow, select the appropriate `release/` branch from the `Use workflow from` dropdown (e.g. `release/12.5`) and specify `stable` in the text input field. -Please note you **cannot create minor releases for previous stable releases once a more recent stable release has been published** as this would require significant changes to how we upload plugin versions to the WP.org plugin SVN repo). Always check the latest release version before you proceed (see [this Issue](https://github.com/WordPress/gutenberg/issues/33277#issuecomment-876289457) for more information). +##### Creating a minor release for previous stable releases + +It is possible to create a minor release for any release branch even after a more recent stable release has been published. This can be done for _any_ previous release branches, allowing more flexibility in delivering updates to users. In the past, users had to wait for the next stable release, potentially taking days. Now, fixes can be swiftly shipped to any previous release branches as required. + +The process is identical to the one documented above when an RC is already out: choose a previous release branch, type `stable`, and click "Run workflow". The release will be published on the GitHub releases page for Gutenberg and to the WordPress core repository SVN as a `tag` under http://plugins.svn.wordpress.org/gutenberg/tags/. The SVN `trunk` directory will not be touched. + +**IMPORTANT:** When publishing the draft created by the ["Build Plugin Zip" workflow](https://github.com/WordPress/gutenberg/actions/workflows/build-plugin-zip.yml), make sure to leave the "Set as last release" checkbox unchecked. If it is left checked by accident, the ["Upload Gutenberg plugin to WordPress.org plugin" workflow](https://github.com/WordPress/gutenberg/actions/workflows/upload-release-to-plugin-repo.yml) will still correctly upload it **as a tag (and will _not_ replace the `trunk` version)** to the WordPress plugin repository SVN - the workflow will perform some version arithmetic to determine how the plugin should be shipped - but you'll still need to fix the state on GitHub by setting the right release as `latest` on the [releases](https://github.com/WordPress/gutenberg/releases/) page! #### Troubleshooting From 05f75a964931be3e332f6706329e9e676ec00e95 Mon Sep 17 00:00:00 2001 From: James Koster Date: Tue, 11 Jul 2023 00:01:43 +0100 Subject: [PATCH 135/146] Update descriptions (#52468) --- .../edit-site/src/components/page-patterns/patterns-list.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/edit-site/src/components/page-patterns/patterns-list.js b/packages/edit-site/src/components/page-patterns/patterns-list.js index bc2a18bf39456..7bf2a9d506584 100644 --- a/packages/edit-site/src/components/page-patterns/patterns-list.js +++ b/packages/edit-site/src/components/page-patterns/patterns-list.js @@ -40,10 +40,10 @@ const SYNC_FILTERS = { const SYNC_DESCRIPTIONS = { all: '', [ SYNC_TYPES.full ]: __( - 'Patterns that are kept in sync across your site.' + 'Patterns that are kept in sync across the site.' ), [ SYNC_TYPES.unsynced ]: __( - 'Patterns that can be changed freely without affecting your site.' + 'Patterns that can be changed freely without affecting the site.' ), }; From f448947625ada1c2360fa8ae9d03d1c3df8b7584 Mon Sep 17 00:00:00 2001 From: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Date: Tue, 11 Jul 2023 08:56:13 +0900 Subject: [PATCH 136/146] Ensure that the unsaved title is not persisted when reopening the modal (#52473) --- .../template-actions/rename-menu-item.js | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/packages/edit-site/src/components/template-actions/rename-menu-item.js b/packages/edit-site/src/components/template-actions/rename-menu-item.js index 9c6368ced17bf..9f897fcd2e943 100644 --- a/packages/edit-site/src/components/template-actions/rename-menu-item.js +++ b/packages/edit-site/src/components/template-actions/rename-menu-item.js @@ -17,10 +17,8 @@ import { store as noticesStore } from '@wordpress/notices'; import { decodeEntities } from '@wordpress/html-entities'; export default function RenameMenuItem( { template, onClose } ) { - const [ title, setTitle ] = useState( - decodeEntities( template.title.rendered ) - ); - + const title = decodeEntities( template.title.rendered ); + const [ editedTitle, setEditedTitle ] = useState( title ); const [ isModalOpen, setIsModalOpen ] = useState( false ); const { @@ -39,11 +37,11 @@ export default function RenameMenuItem( { template, onClose } ) { try { await editEntityRecord( 'postType', template.type, template.id, { - title, + title: editedTitle, } ); // Update state before saving rerenders the list. - setTitle( '' ); + setEditedTitle( '' ); setIsModalOpen( false ); onClose(); @@ -73,7 +71,12 @@ export default function RenameMenuItem( { template, onClose } ) { return ( <> - setIsModalOpen( true ) }> + { + setIsModalOpen( true ); + setEditedTitle( title ); + } } + > { __( 'Rename' ) } { isModalOpen && ( @@ -89,8 +92,8 @@ export default function RenameMenuItem( { template, onClose } ) { From b802534433013b292406291925d976f6ea371989 Mon Sep 17 00:00:00 2001 From: Gutenberg Repository Automation Date: Tue, 11 Jul 2023 00:24:16 +0000 Subject: [PATCH 137/146] Bump plugin version to 16.2.0-rc.3 --- gutenberg.php | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gutenberg.php b/gutenberg.php index b1513d52e61d1..65b712ac1f76a 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -5,7 +5,7 @@ * Description: Printing since 1440. This is the development plugin for the block editor, site editor, and other future WordPress core functionality. * Requires at least: 6.1 * Requires PHP: 5.6 - * Version: 16.2.0-rc.2 + * Version: 16.2.0-rc.3 * Author: Gutenberg Team * Text Domain: gutenberg * diff --git a/package-lock.json b/package-lock.json index 60cabfe3244bf..f4d914d70969a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gutenberg", - "version": "16.2.0-rc.2", + "version": "16.2.0-rc.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 46fb91477bd6e..9956d97e11016 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gutenberg", - "version": "16.2.0-rc.2", + "version": "16.2.0-rc.3", "private": true, "description": "A new WordPress editor experience.", "author": "The WordPress Contributors", From 488b40d264d14216abc199cf15ccc74ffaab8aab Mon Sep 17 00:00:00 2001 From: Gutenberg Repository Automation Date: Tue, 11 Jul 2023 00:34:39 +0000 Subject: [PATCH 138/146] Update Changelog for 16.2.0-rc.3 --- changelog.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/changelog.txt b/changelog.txt index 561df06f23529..2904601f88955 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,15 @@ == Changelog == += 16.2.0-rc.3 = + +## Changelog + +### Bug Fixes + +#### Build Tooling +- Revert phpcs testVersion back to PHP 5.6. ([52384](https://github.com/WordPress/gutenberg/pull/52384)) + + = 16.2.0-rc.2 = ## Changelog From 2937e5666c175dea15d44fd1479ccf96c6240260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor?= <27339341+priethor@users.noreply.github.com> Date: Tue, 11 Jul 2023 03:16:07 +0200 Subject: [PATCH 139/146] Revert "Post editor: Require confirmation before removing Footnotes (#52277)" (#52486) This reverts commit e6426ea60b99ae76f703baeb22c8add5cc7afbf4. --- .../block-removal-warning-modal/index.js | 3 --- packages/edit-post/src/components/layout/index.js | 15 +-------------- packages/edit-site/src/components/editor/index.js | 3 --- 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/packages/block-editor/src/components/block-removal-warning-modal/index.js b/packages/block-editor/src/components/block-removal-warning-modal/index.js index af521b7233435..08f3deccb5ae0 100644 --- a/packages/block-editor/src/components/block-removal-warning-modal/index.js +++ b/packages/block-editor/src/components/block-removal-warning-modal/index.js @@ -50,9 +50,6 @@ export function BlockRemovalWarningModal( { rules } ) { { blockNamesForPrompt.length === 1 ? (

        { rules[ blockNamesForPrompt[ 0 ] ] }

        diff --git a/packages/edit-post/src/components/layout/index.js b/packages/edit-post/src/components/layout/index.js index 0c18521b1215f..15bc017900daa 100644 --- a/packages/edit-post/src/components/layout/index.js +++ b/packages/edit-post/src/components/layout/index.js @@ -16,10 +16,7 @@ import { store as editorStore, } from '@wordpress/editor'; import { useSelect, useDispatch } from '@wordpress/data'; -import { - BlockBreadcrumb, - privateApis as blockEditorPrivateApis, -} from '@wordpress/block-editor'; +import { BlockBreadcrumb } from '@wordpress/block-editor'; import { Button, ScrollLock, Popover } from '@wordpress/components'; import { useViewportMatch } from '@wordpress/compose'; import { PluginArea } from '@wordpress/plugins'; @@ -52,9 +49,6 @@ import WelcomeGuide from '../welcome-guide'; import ActionsPanel from './actions-panel'; import StartPageOptions from '../start-page-options'; import { store as editPostStore } from '../../store'; -import { unlock } from '../../lock-unlock'; - -const { BlockRemovalWarningModal } = unlock( blockEditorPrivateApis ); const interfaceLabels = { /* translators: accessibility text for the editor top bar landmark region. */ @@ -69,12 +63,6 @@ const interfaceLabels = { footer: __( 'Editor footer' ), }; -const blockRemovalRules = { - 'core/footnotes': __( - 'The Footnotes block displays all footnotes found in the content. Note that any footnotes in the content will persist after removing this block.' - ), -}; - function Layout( { styles } ) { const isMobileViewport = useViewportMatch( 'medium', '<' ); const isHugeViewport = useViewportMatch( 'huge', '>=' ); @@ -214,7 +202,6 @@ function Layout( { styles } ) { - Date: Tue, 11 Jul 2023 13:35:29 +1000 Subject: [PATCH 140/146] Rename block theme activation nonce variable. (#52398) --- lib/compat/wordpress-6.3/theme-previews.php | 2 +- packages/edit-site/src/utils/use-activate-theme.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/compat/wordpress-6.3/theme-previews.php b/lib/compat/wordpress-6.3/theme-previews.php index 31d684c17cf2a..26153d74878b5 100644 --- a/lib/compat/wordpress-6.3/theme-previews.php +++ b/lib/compat/wordpress-6.3/theme-previews.php @@ -107,7 +107,7 @@ function block_theme_activate_nonce() { $nonce_handle = 'switch-theme_' . gutenberg_get_theme_preview_path(); ?> Date: Tue, 11 Jul 2023 13:59:27 +1000 Subject: [PATCH 141/146] remove status icon (#52457) --- .../status-label.js | 36 +------------------ 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-page/status-label.js b/packages/edit-site/src/components/sidebar-navigation-screen-page/status-label.js index bcfc540b1f841..f864d48de3383 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-page/status-label.js +++ b/packages/edit-site/src/components/sidebar-navigation-screen-page/status-label.js @@ -9,42 +9,10 @@ import classnames from 'classnames'; import { __, sprintf } from '@wordpress/i18n'; import { dateI18n, getDate, humanTimeDiff } from '@wordpress/date'; import { createInterpolateElement } from '@wordpress/element'; -import { Path, SVG } from '@wordpress/primitives'; - -const publishedIcon = ( - - - -); - -const draftIcon = ( - - - -); - -const pendingIcon = ( - - - -); export default function StatusLabel( { status, date, short } ) { const relateToNow = humanTimeDiff( date ); let statusLabel = status; - let statusIcon = pendingIcon; switch ( status ) { case 'publish': statusLabel = date @@ -57,7 +25,6 @@ export default function StatusLabel( { status, date, short } ) { { time:
    ); } From be51eb79c531031ab6ec4f8607ebf18b4f1afc38 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Tue, 11 Jul 2023 05:07:53 +0100 Subject: [PATCH 142/146] Library - make pattern title clickable (#51898) * Use button inside title * Remove href * Preserve roving tab index * Fix link colors to match trunk $gray-600 * Remove redundant var * Amend colors as per review * remove old files again --------- Co-authored-by: scruffian --- .../src/components/page-patterns/grid-item.js | 18 +++++++++++++++++- .../src/components/page-patterns/style.scss | 10 ++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/packages/edit-site/src/components/page-patterns/grid-item.js b/packages/edit-site/src/components/page-patterns/grid-item.js index 0b1f6dc1fdf8d..441529e1c0583 100644 --- a/packages/edit-site/src/components/page-patterns/grid-item.js +++ b/packages/edit-site/src/components/page-patterns/grid-item.js @@ -8,10 +8,12 @@ import classnames from 'classnames'; */ import { BlockPreview } from '@wordpress/block-editor'; import { + Button, __experimentalConfirmDialog as ConfirmDialog, DropdownMenu, MenuGroup, MenuItem, + __experimentalHeading as Heading, __experimentalHStack as HStack, Tooltip, Flex, @@ -188,7 +190,21 @@ function GridItem( { categoryId, item, ...props } ) { ) } - { item.title } + { item.type === PATTERNS ? ( + item.title + ) : ( + + + + ) } { item.type === PATTERNS && ( Date: Tue, 11 Jul 2023 06:09:06 +0200 Subject: [PATCH 143/146] List block: Fix selected type option (#52472) --- packages/block-library/src/list/edit.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/block-library/src/list/edit.js b/packages/block-library/src/list/edit.js index 24d5ead74c47d..7c8c15e05fe87 100644 --- a/packages/block-library/src/list/edit.js +++ b/packages/block-library/src/list/edit.js @@ -177,10 +177,12 @@ export default function Edit( { attributes, setAttributes, clientId, style } ) { { controls } { ordered && ( ) } From 8ef7925ffff05d1004802a0703baf5c8939a3008 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Tue, 11 Jul 2023 01:14:21 -0400 Subject: [PATCH 144/146] Add missing `@emotion/react` dep to block-editor (#52475) PR #51545 added a dependency on `@emotion/styled`, which resulted in a transitive peer dependency on `@emotion/react`. We should satisfy that dependency ourself, just as we do in the components package. --- package-lock.json | 1 + packages/block-editor/package.json | 1 + 2 files changed, 2 insertions(+) diff --git a/package-lock.json b/package-lock.json index f4d914d70969a..37d26804e35fb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17259,6 +17259,7 @@ "version": "file:packages/block-editor", "requires": { "@babel/runtime": "^7.16.0", + "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", "@react-spring/web": "^9.4.5", "@wordpress/a11y": "file:packages/a11y", diff --git a/packages/block-editor/package.json b/packages/block-editor/package.json index 19f9c9851dd29..5e4b8f466b3f9 100644 --- a/packages/block-editor/package.json +++ b/packages/block-editor/package.json @@ -32,6 +32,7 @@ ], "dependencies": { "@babel/runtime": "^7.16.0", + "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", "@react-spring/web": "^9.4.5", "@wordpress/a11y": "file:../a11y", From ec66d6cffc3aeb911d0200f735997b8021051e06 Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Tue, 11 Jul 2023 17:53:14 +1200 Subject: [PATCH 145/146] Patterns: Check that core hasn't already moved sync status meta before moving and unsetting (#52494) * Check that core hasn't already moved sync status meta before moving and unsetting * remove whitespace --- .../wordpress-6.3/class-gutenberg-rest-blocks-controller.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/compat/wordpress-6.3/class-gutenberg-rest-blocks-controller.php b/lib/compat/wordpress-6.3/class-gutenberg-rest-blocks-controller.php index 08108e1638334..5279a2c3a829e 100644 --- a/lib/compat/wordpress-6.3/class-gutenberg-rest-blocks-controller.php +++ b/lib/compat/wordpress-6.3/class-gutenberg-rest-blocks-controller.php @@ -39,6 +39,10 @@ public function filter_response_by_context( $data, $context ) { unset( $data['title']['rendered'] ); unset( $data['content']['rendered'] ); + // If `$data['wp_pattern_sync_status']` is already set core 6.3 + has already done the job of setting this so return early. + if ( isset( $data['wp_pattern_sync_status'] ) ) { + return $data; + } // Add the core wp_pattern_sync_status meta as top level property to the response. $data['wp_pattern_sync_status'] = isset( $data['meta']['wp_pattern_sync_status'] ) ? $data['meta']['wp_pattern_sync_status'] : ''; unset( $data['meta']['wp_pattern_sync_status'] ); From 0c28bc20addc78353941cb8a2623a22935f2af3c Mon Sep 17 00:00:00 2001 From: Marin Atanasov <8436925+tyxla@users.noreply.github.com> Date: Tue, 11 Jul 2023 10:02:47 +0300 Subject: [PATCH 146/146] Lodash: Remove completely from site editor (#52480) --- package-lock.json | 1 - packages/edit-site/package.json | 1 - .../src/components/add-new-template/utils.js | 15 +++++++++------ .../hooks/push-changes-to-global-styles/index.js | 15 +++++++++------ 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index 37d26804e35fb..f552635bec7cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17823,7 +17823,6 @@ "downloadjs": "^1.4.7", "fast-deep-equal": "^3.1.3", "is-plain-object": "^5.0.0", - "lodash": "^4.17.21", "memize": "^2.1.0", "react-autosize-textarea": "^7.1.0", "rememo": "^4.0.2", diff --git a/packages/edit-site/package.json b/packages/edit-site/package.json index 230faa8857f1c..06e52ed9fd53e 100644 --- a/packages/edit-site/package.json +++ b/packages/edit-site/package.json @@ -71,7 +71,6 @@ "downloadjs": "^1.4.7", "fast-deep-equal": "^3.1.3", "is-plain-object": "^5.0.0", - "lodash": "^4.17.21", "memize": "^2.1.0", "react-autosize-textarea": "^7.1.0", "rememo": "^4.0.2", diff --git a/packages/edit-site/src/components/add-new-template/utils.js b/packages/edit-site/src/components/add-new-template/utils.js index 8de37c1f64632..1869cdb72f592 100644 --- a/packages/edit-site/src/components/add-new-template/utils.js +++ b/packages/edit-site/src/components/add-new-template/utils.js @@ -1,8 +1,3 @@ -/** - * External dependencies - */ -import { get } from 'lodash'; - /** * WordPress dependencies */ @@ -20,6 +15,14 @@ import { blockMeta, post, archive } from '@wordpress/icons'; * @property {string} name The entity's name. */ +const getValueFromObjectPath = ( object, path ) => { + let value = object; + path.split( '.' ).forEach( ( fieldName ) => { + value = value?.[ fieldName ]; + } ); + return value; +}; + /** * Helper util to map records to add a `name` prop from a * provided path, in order to handle all entities in the same @@ -32,7 +35,7 @@ import { blockMeta, post, archive } from '@wordpress/icons'; export const mapToIHasNameAndId = ( entities, path ) => { return ( entities || [] ).map( ( entity ) => ( { ...entity, - name: decodeEntities( get( entity, path ) ), + name: decodeEntities( getValueFromObjectPath( entity, path ) ), } ) ); }; diff --git a/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js b/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js index 4e7b671a0c260..6e55b89d22b2c 100644 --- a/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js +++ b/packages/edit-site/src/hooks/push-changes-to-global-styles/index.js @@ -1,8 +1,3 @@ -/** - * External dependencies - */ -import { get } from 'lodash'; - /** * WordPress dependencies */ @@ -96,6 +91,14 @@ const STYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE = { const SUPPORTED_STYLES = [ 'border', 'color', 'spacing', 'typography' ]; +const getValueFromObjectPath = ( object, path ) => { + let value = object; + path.forEach( ( fieldName ) => { + value = value?.[ fieldName ]; + } ); + return value; +}; + function useChangesToPush( name, attributes ) { const supports = useSupportedStyles( name ); @@ -115,7 +118,7 @@ function useChangesToPush( name, attributes ) { ]; const value = presetAttributeValue ? `var:preset|${ STYLE_PATH_TO_CSS_VAR_INFIX[ presetAttributeKey ] }|${ presetAttributeValue }` - : get( attributes.style, path ); + : getValueFromObjectPath( attributes.style, path ); return value ? [ { path, value } ] : []; } ), [ supports, name, attributes ]

    a <\\/p>\\s*` - ); - expect( await getEditedPostContent() ).toMatch( regex2 ); - } ); -} ); diff --git a/test/e2e/specs/editor/various/adding-inline-tokens.spec.js b/test/e2e/specs/editor/various/adding-inline-tokens.spec.js new file mode 100644 index 0000000000000..0facffd9097e8 --- /dev/null +++ b/test/e2e/specs/editor/various/adding-inline-tokens.spec.js @@ -0,0 +1,81 @@ +/** + * External dependencies + */ +import path from 'path'; +import fs from 'fs'; +import os from 'os'; +import { v4 as uuid } from 'uuid'; + +/** + * WordPress dependencies + */ +const { test, expect } = require( '@wordpress/e2e-test-utils-playwright' ); + +test.describe( 'adding inline tokens', () => { + test.beforeEach( async ( { admin } ) => { + await admin.createNewPost(); + } ); + + test( 'should insert inline image', async ( { + page, + editor, + pageUtils, + } ) => { + // Create a paragraph. + await editor.canvas.click( 'role=button[name="Add default block"i]' ); + + await page.keyboard.type( 'a ' ); + + await editor.showBlockToolbar(); + await page.click( 'role=button[name="More"i]' ); + await page.click( 'role=menuitem[name="Inline image"i]' ); + + const testImagePath = path.join( + __dirname, + '..', + '..', + '..', + 'assets', + '10x10_e2e_test_image_z9T8jK.png' + ); + const filename = uuid(); + const tmpFileName = path.join( os.tmpdir(), filename + '.png' ); + fs.copyFileSync( testImagePath, tmpFileName ); + await page + .locator( '.media-modal .moxie-shim input[type=file]' ) + .setInputFiles( tmpFileName ); + + // Insert the uploaded image. + await page.click( 'role=button[name="Select"i]' ); + + // Check the content. + const contentRegex = new RegExp( + `a ` + ); + await expect.poll( editor.getBlocks ).toMatchObject( [ + { + name: 'core/paragraph', + attributes: { content: expect.stringMatching( contentRegex ) }, + }, + ] ); + + await pageUtils.pressKeys( 'shift+ArrowLeft' ); + + await page.keyboard.press( 'Tab' ); + await page.keyboard.press( 'Tab' ); + await page.fill( 'role=spinbutton[name="WIDTH"i]', '20' ); + await page.click( 'role=button[name="Apply"i]' ); + + // Check the content. + const contentRegex2 = new RegExp( + `a ` + ); + + await expect.poll( editor.getBlocks ).toMatchObject( [ + { + name: 'core/paragraph', + attributes: { content: expect.stringMatching( contentRegex2 ) }, + }, + ] ); + } ); +} ); From 1ade4eca3fbb7483bd46600a198f79940f2de2dd Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Thu, 6 Jul 2023 17:22:27 +0400 Subject: [PATCH 072/146] Post Title: The changes should be reflected when previewing a post (#52369) --- packages/block-library/src/post-title/index.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/block-library/src/post-title/index.php b/packages/block-library/src/post-title/index.php index e1d4b255c5773..1769b199cebf1 100644 --- a/packages/block-library/src/post-title/index.php +++ b/packages/block-library/src/post-title/index.php @@ -19,8 +19,11 @@ function render_block_core_post_title( $attributes, $content, $block ) { return ''; } - $post = get_post( $block->context['postId'] ); - $title = get_the_title( $post ); + /** + * The `$post` argument is intentionally omitted so that changes are reflected when previewing a post. + * See: https://github.com/WordPress/gutenberg/pull/37622#issuecomment-1000932816. + */ + $title = get_the_title(); if ( ! $title ) { return ''; @@ -33,7 +36,7 @@ function render_block_core_post_title( $attributes, $content, $block ) { if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) { $rel = ! empty( $attributes['rel'] ) ? 'rel="' . esc_attr( $attributes['rel'] ) . '"' : ''; - $title = sprintf( '%4$s', get_the_permalink( $post ), esc_attr( $attributes['linkTarget'] ), $rel, $title ); + $title = sprintf( '%4$s', get_the_permalink( $block->context['postId'] ), esc_attr( $attributes['linkTarget'] ), $rel, $title ); } $classes = array(); From 1b82cbf757fbce04f21f2cf317d7367581e706e4 Mon Sep 17 00:00:00 2001 From: Derek Blank Date: Thu, 6 Jul 2023 23:34:34 +1000 Subject: [PATCH 073/146] [RNMobile] Add media inserter blocks to toolbar (#51827) * Add media button to native header toolbar * Add other media button types * Display media inserter buttons when no block is selected * Add insertBlocks function to Header Toolbar * Use const instead of function for renderMediaButtons * Remove inline function for onInsertBlock * Update header toolbar media block insertion method * Update media toolbar insertion tests * Update media toolbar insertion tests * Update visual-editor test with Media Toolbar insertion tests * Fix typo in Gallery block test * Update visual editor tests to use toBeVisible when selecting Media Toolbar buttons * Update Visual Editor gallery block selector * Wrap Media Inserter toolbar buttons in ToolbarGroup * Remove iOS ActionSheet conditional from Visual Editor test * Update CHANGELOG --------- Co-authored-by: Gerardo --- .../src/gallery/test/index.native.js | 4 +- .../header/header-toolbar/index.native.js | 66 +++++++++- .../test/__snapshots__/index.native.js.snap | 15 +++ .../visual-editor/test/index.native.js | 119 +++++++++++++++++- packages/react-native-editor/CHANGELOG.md | 1 + 5 files changed, 201 insertions(+), 4 deletions(-) create mode 100644 packages/edit-post/src/components/visual-editor/test/__snapshots__/index.native.js.snap diff --git a/packages/block-library/src/gallery/test/index.native.js b/packages/block-library/src/gallery/test/index.native.js index a64b8bf403281..70b05870b5f30 100644 --- a/packages/block-library/src/gallery/test/index.native.js +++ b/packages/block-library/src/gallery/test/index.native.js @@ -161,7 +161,7 @@ describe( 'Gallery block', () => { // This case is disabled until the issue (https://github.com/WordPress/gutenberg/issues/38444) // is addressed. - it.skip( 'block remains selected after dimissing the media options picker', async () => { + it.skip( 'block remains selected after dismissing the media options picker', async () => { // Initialize with an empty gallery const { getByLabelText, getByText, getByTestId } = await initializeEditor( { @@ -175,7 +175,7 @@ describe( 'Gallery block', () => { expect( getByText( 'Choose images' ) ).toBeVisible(); expect( getByText( 'WordPress Media Library' ) ).toBeVisible(); - // Dimiss the picker + // Dismiss the picker if ( Platform.isIOS ) { fireEvent.press( getByText( 'Cancel' ) ); } else { diff --git a/packages/edit-post/src/components/header/header-toolbar/index.native.js b/packages/edit-post/src/components/header/header-toolbar/index.native.js index b9b91c8d4f558..948d37fe76ff5 100644 --- a/packages/edit-post/src/components/header/header-toolbar/index.native.js +++ b/packages/edit-post/src/components/header/header-toolbar/index.native.js @@ -19,10 +19,15 @@ import { import { ToolbarGroup, ToolbarButton } from '@wordpress/components'; import { keyboardClose, + audio as audioIcon, + media as imageIcon, + video as videoIcon, + gallery as galleryIcon, undo as undoIcon, redo as redoIcon, } from '@wordpress/icons'; import { store as editorStore } from '@wordpress/editor'; +import { createBlock } from '@wordpress/blocks'; /** * Internal dependencies @@ -38,6 +43,7 @@ function HeaderToolbar( { showInserter, showKeyboardHideButton, getStylesFromColorScheme, + insertBlock, onHideKeyboard, isRTL, noContentSelected, @@ -55,6 +61,7 @@ function HeaderToolbar( { scrollViewRef.current.scrollTo( { x: 0 } ); } }; + const renderHistoryButtons = () => { const buttons = [ /* TODO: replace with EditorHistoryRedo and EditorHistoryUndo. */ @@ -83,6 +90,60 @@ function HeaderToolbar( { return isRTL ? buttons.reverse() : buttons; }; + const onInsertBlock = useCallback( + ( blockType ) => () => { + insertBlock( createBlock( blockType ), undefined, undefined, true, { + source: 'inserter_menu', + } ); + }, + [ insertBlock ] + ); + + const renderMediaButtons = ( + + + + + + + ); + const onToggleInserter = useCallback( ( isOpen ) => { if ( isOpen ) { @@ -131,6 +192,7 @@ function HeaderToolbar( { useExpandedMode={ useExpandedMode } onToggle={ onToggleInserter } /> + { noContentSelected && renderMediaButtons } { renderHistoryButtons() } @@ -181,7 +243,8 @@ export default compose( [ }; } ), withDispatch( ( dispatch ) => { - const { clearSelectedBlock } = dispatch( blockEditorStore ); + const { clearSelectedBlock, insertBlock } = + dispatch( blockEditorStore ); const { togglePostTitleSelection } = dispatch( editorStore ); return { @@ -191,6 +254,7 @@ export default compose( [ clearSelectedBlock(); togglePostTitleSelection( false ); }, + insertBlock, }; } ), withViewportMatch( { isLargeViewport: 'medium' } ), diff --git a/packages/edit-post/src/components/visual-editor/test/__snapshots__/index.native.js.snap b/packages/edit-post/src/components/visual-editor/test/__snapshots__/index.native.js.snap new file mode 100644 index 0000000000000..de7091fa94735 --- /dev/null +++ b/packages/edit-post/src/components/visual-editor/test/__snapshots__/index.native.js.snap @@ -0,0 +1,15 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`when nothing is selected media buttons and picker display correctly 1`] = ` +" +