@wordpress/block-editor 11.3.7 → 11.3.9
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-list/block-invalid-warning.js +3 -2
- package/build/components/block-list/block-invalid-warning.js.map +1 -1
- package/build/components/off-canvas-editor/appender.js.map +1 -1
- package/build/components/off-canvas-editor/index.js +3 -0
- package/build/components/off-canvas-editor/index.js.map +1 -1
- package/build/store/selectors.js +2 -2
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/block-list/block-invalid-warning.js +3 -2
- package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
- package/build-module/components/off-canvas-editor/appender.js.map +1 -1
- package/build-module/components/off-canvas-editor/index.js +3 -0
- package/build-module/components/off-canvas-editor/index.js.map +1 -1
- package/build-module/store/selectors.js +2 -2
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +1 -0
- package/build-style/style.css +1 -0
- package/package.json +4 -4
- package/src/components/block-inspector/style.scss +3 -0
- package/src/components/block-list/block-invalid-warning.js +9 -2
- package/src/components/off-canvas-editor/appender.js +1 -1
- package/src/components/off-canvas-editor/index.js +3 -0
- package/src/store/selectors.js +2 -2
package/build-style/style.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-editor",
|
|
3
|
-
"version": "11.3.
|
|
3
|
+
"version": "11.3.9",
|
|
4
4
|
"description": "Generic block editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@wordpress/api-fetch": "^6.23.1",
|
|
38
38
|
"@wordpress/blob": "^3.26.1",
|
|
39
39
|
"@wordpress/blocks": "^12.3.3",
|
|
40
|
-
"@wordpress/components": "^23.3.
|
|
40
|
+
"@wordpress/components": "^23.3.6",
|
|
41
41
|
"@wordpress/compose": "^6.3.3",
|
|
42
42
|
"@wordpress/data": "^8.3.3",
|
|
43
43
|
"@wordpress/date": "^4.26.2",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@wordpress/keyboard-shortcuts": "^4.3.3",
|
|
54
54
|
"@wordpress/keycodes": "^3.26.2",
|
|
55
55
|
"@wordpress/notices": "^3.26.3",
|
|
56
|
-
"@wordpress/preferences": "^3.3.
|
|
56
|
+
"@wordpress/preferences": "^3.3.6",
|
|
57
57
|
"@wordpress/private-apis": "^0.8.1",
|
|
58
58
|
"@wordpress/rich-text": "^6.3.3",
|
|
59
59
|
"@wordpress/shortcode": "^3.26.1",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"publishConfig": {
|
|
84
84
|
"access": "public"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "f22a3cbf0cd8f48c7ef800a09b69212a893b99b8"
|
|
87
87
|
}
|
|
@@ -23,6 +23,7 @@ export function BlockInvalidWarning( {
|
|
|
23
23
|
block,
|
|
24
24
|
} ) {
|
|
25
25
|
const hasHTMLBlock = !! getBlockType( 'core/html' );
|
|
26
|
+
const hasClassicBlock = !! getBlockType( 'core/freeform' );
|
|
26
27
|
const [ compare, setCompare ] = useState( false );
|
|
27
28
|
|
|
28
29
|
const onCompare = useCallback( () => setCompare( true ), [] );
|
|
@@ -41,12 +42,18 @@ export function BlockInvalidWarning( {
|
|
|
41
42
|
title: __( 'Convert to HTML' ),
|
|
42
43
|
onClick: convertToHTML,
|
|
43
44
|
},
|
|
44
|
-
{
|
|
45
|
+
hasClassicBlock && {
|
|
45
46
|
title: __( 'Convert to Classic Block' ),
|
|
46
47
|
onClick: convertToClassic,
|
|
47
48
|
},
|
|
48
49
|
].filter( Boolean ),
|
|
49
|
-
[
|
|
50
|
+
[
|
|
51
|
+
onCompare,
|
|
52
|
+
hasHTMLBlock,
|
|
53
|
+
convertToHTML,
|
|
54
|
+
hasClassicBlock,
|
|
55
|
+
convertToClassic,
|
|
56
|
+
]
|
|
50
57
|
);
|
|
51
58
|
|
|
52
59
|
return (
|
|
@@ -56,6 +56,7 @@ export const BLOCK_LIST_ITEM_HEIGHT = 36;
|
|
|
56
56
|
*
|
|
57
57
|
* @param {Object} props Components props.
|
|
58
58
|
* @param {string} props.id An HTML element id for the root element of ListView.
|
|
59
|
+
* @param {string} props.parentClientId The client id of the parent block.
|
|
59
60
|
* @param {Array} props.blocks Custom subset of block client IDs to be used instead of the default hierarchy.
|
|
60
61
|
* @param {boolean} props.showBlockMovers Flag to enable block movers
|
|
61
62
|
* @param {boolean} props.isExpanded Flag to determine whether nested levels are expanded by default.
|
|
@@ -68,6 +69,7 @@ export const BLOCK_LIST_ITEM_HEIGHT = 36;
|
|
|
68
69
|
function OffCanvasEditor(
|
|
69
70
|
{
|
|
70
71
|
id,
|
|
72
|
+
parentClientId,
|
|
71
73
|
blocks,
|
|
72
74
|
showBlockMovers = false,
|
|
73
75
|
isExpanded = false,
|
|
@@ -229,6 +231,7 @@ function OffCanvasEditor(
|
|
|
229
231
|
>
|
|
230
232
|
<ListViewContext.Provider value={ contextValue }>
|
|
231
233
|
<ListViewBranch
|
|
234
|
+
parentId={ parentClientId }
|
|
232
235
|
blocks={ clientIdsTree }
|
|
233
236
|
selectBlock={ selectEditorBlock }
|
|
234
237
|
showBlockMovers={ showBlockMovers }
|
package/src/store/selectors.js
CHANGED
|
@@ -2806,12 +2806,12 @@ export function __unstableHasActiveBlockOverlayActive( state, clientId ) {
|
|
|
2806
2806
|
}
|
|
2807
2807
|
|
|
2808
2808
|
export function __unstableIsWithinBlockOverlay( state, clientId ) {
|
|
2809
|
-
let parent = state.blocks.parents
|
|
2809
|
+
let parent = state.blocks.parents.get( clientId );
|
|
2810
2810
|
while ( !! parent ) {
|
|
2811
2811
|
if ( __unstableHasActiveBlockOverlayActive( state, parent ) ) {
|
|
2812
2812
|
return true;
|
|
2813
2813
|
}
|
|
2814
|
-
parent = state.blocks.parents
|
|
2814
|
+
parent = state.blocks.parents.get( parent );
|
|
2815
2815
|
}
|
|
2816
2816
|
return false;
|
|
2817
2817
|
}
|