Skip to content

Commit

Permalink
prep build 07/11
Browse files Browse the repository at this point in the history
  • Loading branch information
bph committed Jul 11, 2024
2 parents 00eec84 + a4c1083 commit b07c16b
Show file tree
Hide file tree
Showing 237 changed files with 1,354 additions and 606 deletions.
190 changes: 94 additions & 96 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions packages/a11y/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

## 4.3.0 (2024-07-10)

## 4.2.0 (2024-06-26)

## 4.1.0 (2024-06-15)
Expand Down
2 changes: 1 addition & 1 deletion packages/a11y/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wordpress/a11y",
"version": "4.2.0",
"version": "4.3.0",
"description": "Accessibility (a11y) utilities for WordPress.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
Expand Down
2 changes: 2 additions & 0 deletions packages/annotations/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

## 3.3.0 (2024-07-10)

## 3.2.0 (2024-06-26)

## 3.1.0 (2024-06-15)
Expand Down
2 changes: 1 addition & 1 deletion packages/annotations/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wordpress/annotations",
"version": "3.2.0",
"version": "3.3.0",
"description": "Annotate content in the Gutenberg editor.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
Expand Down
2 changes: 2 additions & 0 deletions packages/api-fetch/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

## 7.3.0 (2024-07-10)

## 7.2.0 (2024-06-26)

## 7.1.0 (2024-06-15)
Expand Down
2 changes: 1 addition & 1 deletion packages/api-fetch/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wordpress/api-fetch",
"version": "7.2.0",
"version": "7.3.0",
"description": "Utility to make WordPress REST API requests.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
Expand Down
2 changes: 2 additions & 0 deletions packages/autop/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

## 4.3.0 (2024-07-10)

## 4.2.0 (2024-06-26)

## 4.1.0 (2024-06-15)
Expand Down
2 changes: 1 addition & 1 deletion packages/autop/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wordpress/autop",
"version": "4.2.0",
"version": "4.3.0",
"description": "WordPress's automatic paragraph functions `autop` and `removep`.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
Expand Down
2 changes: 2 additions & 0 deletions packages/babel-plugin-import-jsx-pragma/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

## 5.3.0 (2024-07-10)

## 5.2.0 (2024-06-26)

## 5.1.0 (2024-06-15)
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-import-jsx-pragma/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wordpress/babel-plugin-import-jsx-pragma",
"version": "5.2.0",
"version": "5.3.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",
Expand Down
2 changes: 2 additions & 0 deletions packages/babel-plugin-makepot/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

## 6.3.0 (2024-07-10)

## 6.2.0 (2024-06-26)

## 6.1.0 (2024-06-15)
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-makepot/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wordpress/babel-plugin-makepot",
"version": "6.2.0",
"version": "6.3.0",
"description": "WordPress Babel internationalization (i18n) plugin.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
Expand Down
2 changes: 2 additions & 0 deletions packages/babel-preset-default/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

## 8.3.0 (2024-07-10)

## 8.2.0 (2024-06-26)

## 8.1.0 (2024-06-15)
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset-default/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wordpress/babel-preset-default",
"version": "8.2.0",
"version": "8.3.0",
"description": "Default Babel preset for WordPress development.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
Expand Down
2 changes: 2 additions & 0 deletions packages/base-styles/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

## 5.3.0 (2024-07-10)

## 5.2.0 (2024-06-26)

## 5.1.0 (2024-06-15)
Expand Down
18 changes: 18 additions & 0 deletions packages/base-styles/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -597,3 +597,21 @@
}
}
}

@mixin selected-block-outline($widthRatio: 1) {
outline-color: var(--wp-admin-theme-color);
outline-style: solid;
outline-width: calc(#{$widthRatio} * (var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1)));
outline-offset: calc(#{$widthRatio} * ((-1 * var(--wp-admin-border-width-focus) ) / var(--wp-block-editor-iframe-zoom-out-scale, 1)));
}

@mixin selected-block-focus($widthRatio: 1) {
content: "";
position: absolute;
pointer-events: none;
top: 0;
right: 0;
bottom: 0;
left: 0;
@include selected-block-outline($widthRatio);
}
2 changes: 1 addition & 1 deletion packages/base-styles/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wordpress/base-styles",
"version": "5.2.0",
"version": "5.3.0",
"description": "Base SCSS utilities and variables for WordPress.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
Expand Down
2 changes: 2 additions & 0 deletions packages/blob/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

## 4.3.0 (2024-07-10)

## 4.2.0 (2024-06-26)

## 4.1.0 (2024-06-15)
Expand Down
2 changes: 1 addition & 1 deletion packages/blob/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wordpress/blob",
"version": "4.2.0",
"version": "4.3.0",
"description": "Blob utilities for WordPress.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
Expand Down
2 changes: 2 additions & 0 deletions packages/block-directory/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

## 5.3.0 (2024-07-10)

## 5.2.0 (2024-06-26)

## 5.1.0 (2024-06-15)
Expand Down
3 changes: 1 addition & 2 deletions packages/block-directory/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wordpress/block-directory",
"version": "5.2.0",
"version": "5.3.0",
"description": "Extend editor with block directory features to search, download and install blocks.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
Expand Down Expand Up @@ -35,7 +35,6 @@
"@wordpress/compose": "file:../compose",
"@wordpress/core-data": "file:../core-data",
"@wordpress/data": "file:../data",
"@wordpress/edit-post": "file:../edit-post",
"@wordpress/editor": "file:../editor",
"@wordpress/element": "file:../element",
"@wordpress/hooks": "file:../hooks",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
display: grid;
grid-template-columns: auto 1fr;

// The item contains absolutely positioned items.
// Set `position: relative` on the parent to prevent overflow issues
// in scroll containers.
// See: https://github.com/WordPress/gutenberg/issues/63384
position: relative;

&:hover {
@include button-style__focus();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@
import { _n, sprintf } from '@wordpress/i18n';
import { useSelect } from '@wordpress/data';
import { blockDefault } from '@wordpress/icons';
import { PluginPrePublishPanel } from '@wordpress/editor';

/**
* Internal dependencies
*/
import CompactList from '../../components/compact-list';
import { store as blockDirectoryStore } from '../../store';

// We shouldn't import the editor package directly
// because it would include the wp-editor in all pages loading the block-directory script.
const { PluginPrePublishPanel } = window?.wp?.editor ?? {};

export default function InstalledBlocksPrePublishPanel() {
const newBlockTypes = useSelect(
( select ) => select( blockDirectoryStore ).getNewBlockTypes(),
Expand Down
46 changes: 29 additions & 17 deletions packages/block-directory/src/store/selectors.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { createRegistrySelector } from '@wordpress/data';
import { createSelector, createRegistrySelector } from '@wordpress/data';
import { store as blockEditorStore } from '@wordpress/block-editor';

/**
Expand Down Expand Up @@ -53,15 +53,21 @@ export function getInstalledBlockTypes( state ) {
*
* @return {Array} Block type items.
*/
export const getNewBlockTypes = createRegistrySelector(
( select ) => ( state ) => {
const usedBlockTree = select( blockEditorStore ).getBlocks();
const installedBlockTypes = getInstalledBlockTypes( state );
export const getNewBlockTypes = createRegistrySelector( ( select ) =>
createSelector(
( state ) => {
const usedBlockTree = select( blockEditorStore ).getBlocks();
const installedBlockTypes = getInstalledBlockTypes( state );

return installedBlockTypes.filter( ( blockType ) =>
hasBlockType( blockType, usedBlockTree )
);
}
return installedBlockTypes.filter( ( blockType ) =>
hasBlockType( blockType, usedBlockTree )
);
},
( state ) => [
getInstalledBlockTypes( state ),
select( blockEditorStore ).getBlocks(),
]
)
);

/**
Expand All @@ -72,15 +78,21 @@ export const getNewBlockTypes = createRegistrySelector(
*
* @return {Array} Block type items.
*/
export const getUnusedBlockTypes = createRegistrySelector(
( select ) => ( state ) => {
const usedBlockTree = select( blockEditorStore ).getBlocks();
const installedBlockTypes = getInstalledBlockTypes( state );
export const getUnusedBlockTypes = createRegistrySelector( ( select ) =>
createSelector(
( state ) => {
const usedBlockTree = select( blockEditorStore ).getBlocks();
const installedBlockTypes = getInstalledBlockTypes( state );

return installedBlockTypes.filter(
( blockType ) => ! hasBlockType( blockType, usedBlockTree )
);
}
return installedBlockTypes.filter(
( blockType ) => ! hasBlockType( blockType, usedBlockTree )
);
},
( state ) => [
getInstalledBlockTypes( state ),
select( blockEditorStore ).getBlocks(),
]
)
);

/**
Expand Down
2 changes: 2 additions & 0 deletions packages/block-editor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

## 13.3.0 (2024-07-10)

## 13.2.0 (2024-06-26)

## 13.1.0 (2024-06-15)
Expand Down
2 changes: 1 addition & 1 deletion packages/block-editor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wordpress/block-editor",
"version": "13.2.0",
"version": "13.3.0",
"description": "Generic block editor.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
Expand Down
18 changes: 2 additions & 16 deletions packages/block-editor/src/components/block-list/content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,6 @@
}
}

@mixin selectedOutline() {
content: "";
position: absolute;
pointer-events: none;
top: 0;
right: 0;
bottom: 0;
left: 0;
outline-color: var(--wp-admin-theme-color);
outline-style: solid;
outline-width: calc(var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
outline-offset: calc((-1 * var(--wp-admin-border-width-focus)) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
}

// Hide selections on this element, otherwise Safari will include it stacked
// under your actual selection.
// This uses a CSS hack to show the rules to Safari only. Failing here is okay,
Expand Down Expand Up @@ -101,7 +87,7 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
// We're using a pseudo element to overflow placeholder borders
// and any border inside the block itself.
&::after {
@include selectedOutline();
@include selected-block-focus();
z-index: 1;

// Show a light color for dark themes.
Expand Down Expand Up @@ -281,7 +267,7 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
&:not(.rich-text):not([contenteditable="true"]).is-selected {

&::after {
@include selectedOutline();
@include selected-block-focus();
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export function useInBetweenInserter() {
__unstableIsWithinBlockOverlay,
getBlockEditingMode,
getBlockName,
getBlockAttributes,
} = useSelect( blockEditorStore );
const { showInsertionPoint, hideInsertionPoint } =
useDispatch( blockEditorStore );
Expand Down Expand Up @@ -79,7 +80,10 @@ export function useInBetweenInserter() {
if (
getTemplateLock( rootClientId ) ||
getBlockEditingMode( rootClientId ) === 'disabled' ||
getBlockName( rootClientId ) === 'core/block'
getBlockName( rootClientId ) === 'core/block' ||
( rootClientId &&
getBlockAttributes( rootClientId ).layout
?.isManualPlacement )
) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,18 @@ export function BlockRemovalWarningModal( { rules } ) {
>
<p>{ message }</p>
<HStack justify="right">
<Button variant="tertiary" onClick={ clearBlockRemovalPrompt }>
<Button
variant="tertiary"
onClick={ clearBlockRemovalPrompt }
__next40pxDefaultSize
>
{ __( 'Cancel' ) }
</Button>
<Button variant="primary" onClick={ onConfirmRemoval }>
<Button
variant="primary"
onClick={ onConfirmRemoval }
__next40pxDefaultSize
>
{ __( 'Delete' ) }
</Button>
</HStack>
Expand Down
Loading

0 comments on commit b07c16b

Please sign in to comment.