@wordpress/editor 14.33.9 → 14.33.11

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.
@@ -6,14 +6,10 @@ import { createHigherOrderComponent } from '@wordpress/compose';
6
6
  import { useCallback } from '@wordpress/element';
7
7
  import { __ } from '@wordpress/i18n';
8
8
  import {
9
- BlockControls,
9
+ __unstableBlockToolbarLastItem as BlockToolbarLastItem,
10
10
  store as blockEditorStore,
11
11
  } from '@wordpress/block-editor';
12
- import {
13
- ToolbarButton,
14
- ToolbarGroup,
15
- __experimentalDivider as Divider,
16
- } from '@wordpress/components';
12
+ import { ToolbarButton, ToolbarGroup } from '@wordpress/components';
17
13
  import { useSelect, useDispatch } from '@wordpress/data';
18
14
  import { store as interfaceStore } from '@wordpress/interface';
19
15
 
@@ -96,15 +92,8 @@ function TemplatePartNavigationEditButton( { clientId } ) {
96
92
  }
97
93
 
98
94
  return (
99
- <BlockControls group="other">
95
+ <BlockToolbarLastItem>
100
96
  <ToolbarGroup>
101
- { /*
102
- * Add a vertical divider to visually separate the "Edit navigation"
103
- * button from the template part's "Edit" button. Both buttons share
104
- * the same toolbar group ("other"), so without this divider they
105
- * would appear directly adjacent with no visual separation.
106
- */ }
107
- <Divider orientation="vertical" marginEnd={ 3 } />
108
97
  <ToolbarButton
109
98
  label={ __( 'Edit navigation' ) }
110
99
  onClick={ onEditNavigation }
@@ -112,7 +101,7 @@ function TemplatePartNavigationEditButton( { clientId } ) {
112
101
  { __( 'Edit navigation' ) }
113
102
  </ToolbarButton>
114
103
  </ToolbarGroup>
115
- </BlockControls>
104
+ </BlockToolbarLastItem>
116
105
  );
117
106
  }
118
107
 
@@ -206,6 +206,7 @@ describe( 'selectors', () => {
206
206
 
207
207
  beforeEach( () => {
208
208
  registerBlockType( 'core/block', {
209
+ apiVersion: 3,
209
210
  save: () => null,
210
211
  category: 'reusable',
211
212
  title: 'Reusable Block Stub',
@@ -215,6 +216,7 @@ describe( 'selectors', () => {
215
216
  } );
216
217
 
217
218
  registerBlockType( 'core/test-block-a', {
219
+ apiVersion: 3,
218
220
  save: ( props ) => props.attributes.text,
219
221
  category: 'design',
220
222
  title: 'Test Block A',
@@ -223,6 +225,7 @@ describe( 'selectors', () => {
223
225
  } );
224
226
 
225
227
  registerBlockType( 'core/test-block-b', {
228
+ apiVersion: 3,
226
229
  save: ( props ) => props.attributes.text,
227
230
  category: 'text',
228
231
  title: 'Test Block B',
@@ -234,6 +237,7 @@ describe( 'selectors', () => {
234
237
  } );
235
238
 
236
239
  registerBlockType( 'core/test-block-c', {
240
+ apiVersion: 3,
237
241
  save: ( props ) => props.attributes.text,
238
242
  category: 'text',
239
243
  title: 'Test Block C',
@@ -243,6 +247,7 @@ describe( 'selectors', () => {
243
247
  } );
244
248
 
245
249
  registerBlockType( 'core/freeform', {
250
+ apiVersion: 3,
246
251
  save: ( props ) => <RawHTML>{ props.attributes.content }</RawHTML>,
247
252
  category: 'text',
248
253
  title: 'Test Freeform Content Handler',
@@ -258,6 +263,7 @@ describe( 'selectors', () => {
258
263
  } );
259
264
 
260
265
  registerBlockType( 'core/test-default', {
266
+ apiVersion: 3,
261
267
  category: 'text',
262
268
  title: 'default',
263
269
  attributes: {
@@ -2332,6 +2338,7 @@ describe( 'selectors', () => {
2332
2338
  originalDefaultBlockName = getDefaultBlockName();
2333
2339
 
2334
2340
  registerBlockType( 'core/default', {
2341
+ apiVersion: 3,
2335
2342
  category: 'text',
2336
2343
  title: 'default',
2337
2344
  attributes: {