@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.
@@ -164,6 +164,7 @@
164
164
  .block-editor-block-inspector .components-panel__body {
165
165
  border: none;
166
166
  border-top: 1px solid #e0e0e0;
167
+ margin-top: -1px;
167
168
  }
168
169
  .block-editor-block-inspector .block-editor-block-card {
169
170
  padding: 16px;
@@ -164,6 +164,7 @@
164
164
  .block-editor-block-inspector .components-panel__body {
165
165
  border: none;
166
166
  border-top: 1px solid #e0e0e0;
167
+ margin-top: -1px;
167
168
  }
168
169
  .block-editor-block-inspector .block-editor-block-card {
169
170
  padding: 16px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-editor",
3
- "version": "11.3.7",
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.5",
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.5",
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": "8ce158f9e03a25797be5a6f16edd7509d62e90e4"
86
+ "gitHead": "f22a3cbf0cd8f48c7ef800a09b69212a893b99b8"
87
87
  }
@@ -27,6 +27,9 @@
27
27
  .components-panel__body {
28
28
  border: none;
29
29
  border-top: $border-width solid $gray-200;
30
+
31
+ // Ensures this PanelBody is treated like the ToolsPanel, removing double borders.
32
+ margin-top: -$border-width;
30
33
  }
31
34
 
32
35
  .block-editor-block-card {
@@ -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
- [ onCompare, convertToHTML, convertToClassic ]
50
+ [
51
+ onCompare,
52
+ hasHTMLBlock,
53
+ convertToHTML,
54
+ hasClassicBlock,
55
+ convertToClassic,
56
+ ]
50
57
  );
51
58
 
52
59
  return (
@@ -105,7 +105,7 @@ export const Appender = forwardRef(
105
105
  ref={ ref }
106
106
  rootClientId={ clientId }
107
107
  position="bottom right"
108
- isAppender={ true }
108
+ isAppender
109
109
  selectBlockOnInsert={ false }
110
110
  shouldDirectInsert={ false }
111
111
  __experimentalIsQuick
@@ -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 }
@@ -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[ clientId ];
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[ parent ];
2814
+ parent = state.blocks.parents.get( parent );
2815
2815
  }
2816
2816
  return false;
2817
2817
  }