@wordpress/block-editor 15.8.0 → 15.8.1-next.16d95556a.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/block-inspector/edit-contents.js +1 -1
- package/build/components/block-inspector/edit-contents.js.map +2 -2
- package/build/components/global-styles/typography-panel.js +16 -10
- package/build/components/global-styles/typography-panel.js.map +2 -2
- package/build/components/rich-text/format-edit.js +9 -1
- package/build/components/rich-text/format-edit.js.map +2 -2
- package/build/store/selectors.js +3 -0
- package/build/store/selectors.js.map +2 -2
- package/build-module/components/block-inspector/edit-contents.js +1 -1
- package/build-module/components/block-inspector/edit-contents.js.map +2 -2
- package/build-module/components/global-styles/typography-panel.js +18 -11
- package/build-module/components/global-styles/typography-panel.js.map +2 -2
- package/build-module/components/rich-text/format-edit.js +9 -1
- package/build-module/components/rich-text/format-edit.js.map +2 -2
- package/build-module/store/selectors.js +3 -0
- package/build-module/store/selectors.js.map +2 -2
- package/package.json +37 -37
- package/src/components/block-inspector/edit-contents.js +2 -2
- package/src/components/block-switcher/block-transformations-menu.native.js +0 -1
- package/src/components/block-toolbar/test/__snapshots__/block-toolbar-menu.native.js.snap +6 -4
- package/src/components/block-toolbar/test/block-toolbar-menu.native.js +2 -2
- package/src/components/global-styles/typography-panel.js +12 -0
- package/src/components/rich-text/format-edit.js +9 -1
- package/src/store/selectors.js +7 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-editor",
|
|
3
|
-
"version": "15.8.0",
|
|
3
|
+
"version": "15.8.1-next.16d95556a.0",
|
|
4
4
|
"description": "Generic block editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -55,41 +55,41 @@
|
|
|
55
55
|
"@emotion/react": "^11.7.1",
|
|
56
56
|
"@emotion/styled": "^11.6.0",
|
|
57
57
|
"@react-spring/web": "^9.4.5",
|
|
58
|
-
"@wordpress/a11y": "^4.35.0",
|
|
59
|
-
"@wordpress/api-fetch": "^7.35.0",
|
|
60
|
-
"@wordpress/base-styles": "^6.11.0",
|
|
61
|
-
"@wordpress/blob": "^4.35.0",
|
|
62
|
-
"@wordpress/block-serialization-default-parser": "^5.35.0",
|
|
63
|
-
"@wordpress/blocks": "^15.8.0",
|
|
64
|
-
"@wordpress/commands": "^1.35.0",
|
|
65
|
-
"@wordpress/components": "^30.8.0",
|
|
66
|
-
"@wordpress/compose": "^7.35.0",
|
|
67
|
-
"@wordpress/data": "^10.35.0",
|
|
68
|
-
"@wordpress/date": "^5.35.0",
|
|
69
|
-
"@wordpress/deprecated": "^4.35.0",
|
|
70
|
-
"@wordpress/dom": "^4.35.0",
|
|
71
|
-
"@wordpress/element": "^6.35.0",
|
|
72
|
-
"@wordpress/escape-html": "^3.35.0",
|
|
73
|
-
"@wordpress/global-styles-engine": "^1.2.0",
|
|
74
|
-
"@wordpress/hooks": "^4.35.0",
|
|
75
|
-
"@wordpress/html-entities": "^4.35.0",
|
|
76
|
-
"@wordpress/i18n": "^6.8.0",
|
|
77
|
-
"@wordpress/icons": "^11.2.0",
|
|
78
|
-
"@wordpress/interactivity": "^6.35.0",
|
|
79
|
-
"@wordpress/is-shallow-equal": "^5.35.0",
|
|
80
|
-
"@wordpress/keyboard-shortcuts": "^5.35.0",
|
|
81
|
-
"@wordpress/keycodes": "^4.35.0",
|
|
82
|
-
"@wordpress/notices": "^5.35.0",
|
|
83
|
-
"@wordpress/preferences": "^4.35.0",
|
|
84
|
-
"@wordpress/priority-queue": "^3.35.0",
|
|
85
|
-
"@wordpress/private-apis": "^1.35.0",
|
|
86
|
-
"@wordpress/rich-text": "^7.35.0",
|
|
87
|
-
"@wordpress/style-engine": "^2.35.0",
|
|
88
|
-
"@wordpress/token-list": "^3.35.0",
|
|
89
|
-
"@wordpress/upload-media": "^0.20.0",
|
|
90
|
-
"@wordpress/url": "^4.35.0",
|
|
91
|
-
"@wordpress/warning": "^3.35.0",
|
|
92
|
-
"@wordpress/wordcount": "^4.35.0",
|
|
58
|
+
"@wordpress/a11y": "^4.35.1-next.16d95556a.0",
|
|
59
|
+
"@wordpress/api-fetch": "^7.35.1-next.16d95556a.0",
|
|
60
|
+
"@wordpress/base-styles": "^6.11.1-next.16d95556a.0",
|
|
61
|
+
"@wordpress/blob": "^4.35.1-next.16d95556a.0",
|
|
62
|
+
"@wordpress/block-serialization-default-parser": "^5.35.1-next.16d95556a.0",
|
|
63
|
+
"@wordpress/blocks": "^15.8.1-next.16d95556a.0",
|
|
64
|
+
"@wordpress/commands": "^1.35.1-next.16d95556a.0",
|
|
65
|
+
"@wordpress/components": "^30.8.1-next.16d95556a.0",
|
|
66
|
+
"@wordpress/compose": "^7.35.1-next.16d95556a.0",
|
|
67
|
+
"@wordpress/data": "^10.35.1-next.16d95556a.0",
|
|
68
|
+
"@wordpress/date": "^5.35.1-next.16d95556a.0",
|
|
69
|
+
"@wordpress/deprecated": "^4.35.1-next.16d95556a.0",
|
|
70
|
+
"@wordpress/dom": "^4.35.1-next.16d95556a.0",
|
|
71
|
+
"@wordpress/element": "^6.35.1-next.16d95556a.0",
|
|
72
|
+
"@wordpress/escape-html": "^3.35.1-next.16d95556a.0",
|
|
73
|
+
"@wordpress/global-styles-engine": "^1.2.1-next.16d95556a.0",
|
|
74
|
+
"@wordpress/hooks": "^4.35.1-next.16d95556a.0",
|
|
75
|
+
"@wordpress/html-entities": "^4.35.1-next.16d95556a.0",
|
|
76
|
+
"@wordpress/i18n": "^6.8.1-next.16d95556a.0",
|
|
77
|
+
"@wordpress/icons": "^11.2.1-next.16d95556a.0",
|
|
78
|
+
"@wordpress/interactivity": "^6.35.1-next.16d95556a.0",
|
|
79
|
+
"@wordpress/is-shallow-equal": "^5.35.1-next.16d95556a.0",
|
|
80
|
+
"@wordpress/keyboard-shortcuts": "^5.35.1-next.16d95556a.0",
|
|
81
|
+
"@wordpress/keycodes": "^4.35.1-next.16d95556a.0",
|
|
82
|
+
"@wordpress/notices": "^5.35.1-next.16d95556a.0",
|
|
83
|
+
"@wordpress/preferences": "^4.35.1-next.16d95556a.0",
|
|
84
|
+
"@wordpress/priority-queue": "^3.35.1-next.16d95556a.0",
|
|
85
|
+
"@wordpress/private-apis": "^1.35.1-next.16d95556a.0",
|
|
86
|
+
"@wordpress/rich-text": "^7.35.1-next.16d95556a.0",
|
|
87
|
+
"@wordpress/style-engine": "^2.35.1-next.16d95556a.0",
|
|
88
|
+
"@wordpress/token-list": "^3.35.1-next.16d95556a.0",
|
|
89
|
+
"@wordpress/upload-media": "^0.20.1-next.16d95556a.0",
|
|
90
|
+
"@wordpress/url": "^4.35.1-next.16d95556a.0",
|
|
91
|
+
"@wordpress/warning": "^3.35.1-next.16d95556a.0",
|
|
92
|
+
"@wordpress/wordcount": "^4.35.1-next.16d95556a.0",
|
|
93
93
|
"change-case": "^4.1.2",
|
|
94
94
|
"clsx": "^2.1.1",
|
|
95
95
|
"colord": "^2.7.0",
|
|
@@ -112,5 +112,5 @@
|
|
|
112
112
|
"publishConfig": {
|
|
113
113
|
"access": "public"
|
|
114
114
|
},
|
|
115
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "59a9383612bbe16e21af84d13b035bfbca7fe833"
|
|
116
116
|
}
|
|
@@ -33,7 +33,6 @@ const BlockTransformationsMenu = ( {
|
|
|
33
33
|
const blocksThatSplitWhenTransformed = {
|
|
34
34
|
'core/list': [ 'core/paragraph', 'core/heading' ],
|
|
35
35
|
'core/quote': [ 'core/paragraph' ],
|
|
36
|
-
'core/pullquote': [ 'core/paragraph' ],
|
|
37
36
|
};
|
|
38
37
|
|
|
39
38
|
return possibleTransformations.map( ( item ) => {
|
|
@@ -68,10 +68,12 @@ exports[`Block Actions Menu block options duplicates a block 1`] = `
|
|
|
68
68
|
<!-- /wp:heading -->"
|
|
69
69
|
`;
|
|
70
70
|
|
|
71
|
-
exports[`Block Actions Menu block options transforms a Paragraph block into a
|
|
72
|
-
"<!-- wp:
|
|
73
|
-
<
|
|
74
|
-
|
|
71
|
+
exports[`Block Actions Menu block options transforms a Paragraph block into a Quote block 1`] = `
|
|
72
|
+
"<!-- wp:quote -->
|
|
73
|
+
<blockquote class="wp-block-quote"><!-- wp:paragraph -->
|
|
74
|
+
<p>Hello!</p>
|
|
75
|
+
<!-- /wp:paragraph --></blockquote>
|
|
76
|
+
<!-- /wp:quote -->
|
|
75
77
|
|
|
76
78
|
<!-- wp:spacer -->
|
|
77
79
|
<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
|
|
@@ -357,7 +357,7 @@ describe( 'Block Actions Menu', () => {
|
|
|
357
357
|
expect( getEditorHtml() ).toMatchSnapshot();
|
|
358
358
|
} );
|
|
359
359
|
|
|
360
|
-
it( 'transforms a Paragraph block into a
|
|
360
|
+
it( 'transforms a Paragraph block into a Quote block', async () => {
|
|
361
361
|
const screen = await initializeEditor();
|
|
362
362
|
const { getByLabelText, getByRole } = screen;
|
|
363
363
|
|
|
@@ -397,7 +397,7 @@ describe( 'Block Actions Menu', () => {
|
|
|
397
397
|
expect( headerTitle ).toBeVisible();
|
|
398
398
|
|
|
399
399
|
// Tap on the Transform block button
|
|
400
|
-
fireEvent.press( getByLabelText( /
|
|
400
|
+
fireEvent.press( getByLabelText( /Quote/ ) );
|
|
401
401
|
|
|
402
402
|
expect( getEditorHtml() ).toMatchSnapshot();
|
|
403
403
|
} );
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
__experimentalNumberControl as NumberControl,
|
|
7
7
|
__experimentalToolsPanel as ToolsPanel,
|
|
8
8
|
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
9
|
+
Notice,
|
|
9
10
|
} from '@wordpress/components';
|
|
10
11
|
import { __ } from '@wordpress/i18n';
|
|
11
12
|
import { useCallback, useMemo, useEffect } from '@wordpress/element';
|
|
@@ -609,9 +610,20 @@ export default function TypographyPanel( {
|
|
|
609
610
|
<TextAlignmentControl
|
|
610
611
|
value={ textAlign }
|
|
611
612
|
onChange={ setTextAlign }
|
|
613
|
+
options={ [ 'left', 'center', 'right', 'justify' ] }
|
|
612
614
|
size="__unstable-large"
|
|
613
615
|
__nextHasNoMarginBottom
|
|
614
616
|
/>
|
|
617
|
+
|
|
618
|
+
{ textAlign === 'justify' && (
|
|
619
|
+
<div>
|
|
620
|
+
<Notice status="warning" isDismissible={ false }>
|
|
621
|
+
{ __(
|
|
622
|
+
'Justified text can reduce readability. For better accessibility, use left-aligned text instead.'
|
|
623
|
+
) }
|
|
624
|
+
</Notice>
|
|
625
|
+
</div>
|
|
626
|
+
) }
|
|
615
627
|
</ToolsPanelItem>
|
|
616
628
|
) }
|
|
617
629
|
</Wrapper>
|
|
@@ -13,7 +13,14 @@ const DEFAULT_BLOCK_CONTEXT = {};
|
|
|
13
13
|
|
|
14
14
|
export const usesContextKey = Symbol( 'usesContext' );
|
|
15
15
|
|
|
16
|
-
function Edit( {
|
|
16
|
+
function Edit( {
|
|
17
|
+
onChange,
|
|
18
|
+
onFocus,
|
|
19
|
+
value,
|
|
20
|
+
forwardedRef,
|
|
21
|
+
settings,
|
|
22
|
+
isVisible,
|
|
23
|
+
} ) {
|
|
17
24
|
const {
|
|
18
25
|
name,
|
|
19
26
|
edit: EditFunction,
|
|
@@ -47,6 +54,7 @@ function Edit( { onChange, onFocus, value, forwardedRef, settings } ) {
|
|
|
47
54
|
<EditFunction
|
|
48
55
|
key={ name }
|
|
49
56
|
isActive={ isActive }
|
|
57
|
+
isVisible={ isVisible }
|
|
50
58
|
activeAttributes={ isActive ? activeFormat.attributes || {} : {} }
|
|
51
59
|
isObjectActive={ isObjectActive }
|
|
52
60
|
activeObjectAttributes={
|
package/src/store/selectors.js
CHANGED
|
@@ -3140,6 +3140,7 @@ export function getBlockEditingMode( state, clientId = '' ) {
|
|
|
3140
3140
|
* requirement of being the default grouping block.
|
|
3141
3141
|
* Additionally a block can only be ungrouped if it has inner blocks and can
|
|
3142
3142
|
* be removed.
|
|
3143
|
+
* Section blocks are not ungroupable.
|
|
3143
3144
|
*
|
|
3144
3145
|
* @param {Object} state Global application state.
|
|
3145
3146
|
* @param {string} clientId Client Id of the block. If not passed the selected block's client id will be used.
|
|
@@ -3152,6 +3153,12 @@ export const isUngroupable = createRegistrySelector(
|
|
|
3152
3153
|
if ( ! _clientId ) {
|
|
3153
3154
|
return false;
|
|
3154
3155
|
}
|
|
3156
|
+
|
|
3157
|
+
// Section blocks should not be ungroupable.
|
|
3158
|
+
if ( isSectionBlock( state, _clientId ) ) {
|
|
3159
|
+
return false;
|
|
3160
|
+
}
|
|
3161
|
+
|
|
3155
3162
|
const { getGroupingBlockName } = select( blocksStore );
|
|
3156
3163
|
const block = getBlock( state, _clientId );
|
|
3157
3164
|
const groupingBlockName = getGroupingBlockName();
|