@wordpress/block-editor 12.3.3 → 12.3.5
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/README.md +4 -0
- package/build/components/block-edit/edit.js +25 -13
- package/build/components/block-edit/edit.js.map +1 -1
- package/build/components/block-mobile-toolbar/block-actions-menu.native.js +3 -6
- package/build/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
- package/build/components/block-parent-selector/index.js +8 -5
- package/build/components/block-parent-selector/index.js.map +1 -1
- package/build/components/block-removal-warning-modal/index.js +5 -2
- package/build/components/block-removal-warning-modal/index.js.map +1 -1
- package/build/components/block-tools/block-contextual-toolbar.js +7 -11
- package/build/components/block-tools/block-contextual-toolbar.js.map +1 -1
- package/build/components/global-styles/filters-panel.js +1 -1
- package/build/components/global-styles/filters-panel.js.map +1 -1
- package/build/components/index.js +10 -1
- package/build/components/index.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/patterns-list.js +2 -2
- package/build/components/inserter/block-patterns-explorer/patterns-list.js.map +1 -1
- package/build/components/inserter/block-patterns-tab.js +7 -35
- package/build/components/inserter/block-patterns-tab.js.map +1 -1
- package/build/components/inserter/hooks/use-block-types-state.js +3 -4
- package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build/components/inserter/hooks/use-patterns-state.js +9 -3
- package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build/components/inserter/reusable-block-rename-hint.js +62 -0
- package/build/components/inserter/reusable-block-rename-hint.js.map +1 -0
- package/build/components/inserter/reusable-blocks-tab.js +6 -2
- package/build/components/inserter/reusable-blocks-tab.js.map +1 -1
- package/build/components/list-view/use-list-view-client-ids.js +2 -2
- package/build/components/list-view/use-list-view-client-ids.js.map +1 -1
- package/build/store/private-selectors.js +5 -6
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/selectors.js +33 -15
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/block-edit/edit.js +27 -10
- package/build-module/components/block-edit/edit.js.map +1 -1
- package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js +4 -6
- package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
- package/build-module/components/block-parent-selector/index.js +7 -5
- package/build-module/components/block-parent-selector/index.js.map +1 -1
- package/build-module/components/block-removal-warning-modal/index.js +6 -3
- package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
- package/build-module/components/block-tools/block-contextual-toolbar.js +8 -11
- package/build-module/components/block-tools/block-contextual-toolbar.js.map +1 -1
- package/build-module/components/global-styles/filters-panel.js +2 -2
- package/build-module/components/global-styles/filters-panel.js.map +1 -1
- package/build-module/components/index.js +5 -0
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/patterns-list.js +2 -2
- package/build-module/components/inserter/block-patterns-explorer/patterns-list.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab.js +7 -33
- package/build-module/components/inserter/block-patterns-tab.js.map +1 -1
- package/build-module/components/inserter/hooks/use-block-types-state.js +3 -4
- package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build-module/components/inserter/hooks/use-patterns-state.js +9 -3
- package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build-module/components/inserter/reusable-block-rename-hint.js +48 -0
- package/build-module/components/inserter/reusable-block-rename-hint.js.map +1 -0
- package/build-module/components/inserter/reusable-blocks-tab.js +5 -2
- package/build-module/components/inserter/reusable-blocks-tab.js.map +1 -1
- package/build-module/components/list-view/use-list-view-client-ids.js +2 -2
- package/build-module/components/list-view/use-list-view-client-ids.js.map +1 -1
- package/build-module/store/private-selectors.js +3 -3
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/selectors.js +33 -15
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/content-rtl.css +3 -0
- package/build-style/content.css +3 -0
- package/build-style/style-rtl.css +72 -22
- package/build-style/style.css +72 -22
- package/package.json +9 -9
- package/src/components/block-edit/edit.js +26 -9
- package/src/components/block-edit/test/edit.js +1 -1
- package/src/components/block-mobile-toolbar/block-actions-menu.native.js +4 -8
- package/src/components/block-parent-selector/index.js +13 -8
- package/src/components/block-removal-warning-modal/index.js +7 -6
- package/src/components/block-tools/block-contextual-toolbar.js +5 -11
- package/src/components/block-tools/style.scss +69 -26
- package/src/components/default-block-appender/content.scss +11 -0
- package/src/components/global-styles/filters-panel.js +2 -2
- package/src/components/index.js +5 -0
- package/src/components/inserter/block-patterns-explorer/patterns-list.js +8 -2
- package/src/components/inserter/block-patterns-tab.js +8 -56
- package/src/components/inserter/hooks/use-block-types-state.js +3 -4
- package/src/components/inserter/hooks/use-patterns-state.js +35 -19
- package/src/components/inserter/reusable-block-rename-hint.js +52 -0
- package/src/components/inserter/reusable-blocks-tab.js +5 -1
- package/src/components/inserter/style.scss +28 -0
- package/src/components/list-view/style.scss +1 -2
- package/src/components/list-view/use-list-view-client-ids.js +2 -2
- package/src/store/private-selectors.js +3 -6
- package/src/store/selectors.js +54 -20
- package/src/store/test/private-selectors.js +5 -5
|
@@ -707,6 +707,9 @@
|
|
|
707
707
|
.block-editor-default-block-appender .block-editor-default-block-appender__content {
|
|
708
708
|
opacity: 0.62;
|
|
709
709
|
}
|
|
710
|
+
:where(body .is-layout-constrained) .block-editor-default-block-appender > :first-child:first-child {
|
|
711
|
+
margin-block-start: 0;
|
|
712
|
+
}
|
|
710
713
|
.block-editor-default-block-appender .components-drop-zone__content-icon {
|
|
711
714
|
display: none;
|
|
712
715
|
}
|
package/build-style/content.css
CHANGED
|
@@ -707,6 +707,9 @@
|
|
|
707
707
|
.block-editor-default-block-appender .block-editor-default-block-appender__content {
|
|
708
708
|
opacity: 0.62;
|
|
709
709
|
}
|
|
710
|
+
:where(body .is-layout-constrained) .block-editor-default-block-appender > :first-child:first-child {
|
|
711
|
+
margin-block-start: 0;
|
|
712
|
+
}
|
|
710
713
|
.block-editor-default-block-appender .components-drop-zone__content-icon {
|
|
711
714
|
display: none;
|
|
712
715
|
}
|
|
@@ -333,42 +333,72 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
333
333
|
}
|
|
334
334
|
@media (min-width: 782px) {
|
|
335
335
|
.block-editor-block-contextual-toolbar.is-fixed {
|
|
336
|
-
margin-right:
|
|
336
|
+
margin-right: 180px;
|
|
337
337
|
position: fixed;
|
|
338
|
-
top:
|
|
338
|
+
top: 39px;
|
|
339
339
|
min-height: initial;
|
|
340
340
|
border-bottom: none;
|
|
341
341
|
display: flex;
|
|
342
342
|
}
|
|
343
343
|
.block-editor-block-contextual-toolbar.is-fixed.is-collapsed {
|
|
344
344
|
width: initial;
|
|
345
|
-
margin-right: 216px;
|
|
346
345
|
}
|
|
347
346
|
.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
348
|
-
margin-right:
|
|
349
|
-
top:
|
|
347
|
+
margin-right: 240px;
|
|
348
|
+
top: 7px;
|
|
350
349
|
}
|
|
351
350
|
.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed.is-collapsed {
|
|
352
351
|
width: initial;
|
|
353
|
-
|
|
352
|
+
}
|
|
353
|
+
.block-editor-block-contextual-toolbar.is-fixed > .block-editor-block-toolbar.is-showing-movers {
|
|
354
|
+
flex-grow: initial;
|
|
355
|
+
width: initial;
|
|
356
|
+
}
|
|
357
|
+
.block-editor-block-contextual-toolbar.is-fixed > .block-editor-block-toolbar.is-showing-movers::before {
|
|
358
|
+
content: "";
|
|
359
|
+
width: 1px;
|
|
360
|
+
height: 24px;
|
|
361
|
+
margin-top: 12px;
|
|
362
|
+
margin-left: 0;
|
|
363
|
+
background-color: #ddd;
|
|
364
|
+
position: relative;
|
|
365
|
+
right: -2px;
|
|
366
|
+
top: -1px;
|
|
354
367
|
}
|
|
355
368
|
.block-editor-block-contextual-toolbar.is-fixed > .block-editor-block-toolbar__group-collapse-fixed-toolbar {
|
|
356
369
|
border: none;
|
|
357
370
|
}
|
|
358
|
-
.block-editor-block-contextual-toolbar.is-fixed > .block-editor-block-toolbar__group-collapse-fixed-toolbar
|
|
371
|
+
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed > .block-editor-block-toolbar__group-collapse-fixed-toolbar .components-button.has-icon svg {
|
|
372
|
+
display: none;
|
|
373
|
+
}
|
|
374
|
+
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed > .block-editor-block-toolbar__group-collapse-fixed-toolbar .components-button.has-icon::after {
|
|
375
|
+
content: attr(aria-label);
|
|
376
|
+
font-size: 12px;
|
|
377
|
+
}
|
|
378
|
+
.block-editor-block-contextual-toolbar.is-fixed > .block-editor-block-toolbar__group-collapse-fixed-toolbar::before {
|
|
359
379
|
content: "";
|
|
360
380
|
width: 1px;
|
|
361
381
|
height: 24px;
|
|
362
382
|
margin-top: 12px;
|
|
363
|
-
margin-
|
|
383
|
+
margin-left: 8px;
|
|
364
384
|
background-color: #ddd;
|
|
365
|
-
position:
|
|
366
|
-
right:
|
|
385
|
+
position: relative;
|
|
386
|
+
right: 0;
|
|
367
387
|
top: -1px;
|
|
368
388
|
}
|
|
369
389
|
.block-editor-block-contextual-toolbar.is-fixed > .block-editor-block-toolbar__group-expand-fixed-toolbar {
|
|
370
390
|
border: none;
|
|
371
391
|
}
|
|
392
|
+
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed > .block-editor-block-toolbar__group-expand-fixed-toolbar {
|
|
393
|
+
width: 256px;
|
|
394
|
+
}
|
|
395
|
+
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed > .block-editor-block-toolbar__group-expand-fixed-toolbar .components-button.has-icon svg {
|
|
396
|
+
display: none;
|
|
397
|
+
}
|
|
398
|
+
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed > .block-editor-block-toolbar__group-expand-fixed-toolbar .components-button.has-icon::after {
|
|
399
|
+
content: attr(aria-label);
|
|
400
|
+
font-size: 12px;
|
|
401
|
+
}
|
|
372
402
|
.block-editor-block-contextual-toolbar.is-fixed > .block-editor-block-toolbar__group-expand-fixed-toolbar::before {
|
|
373
403
|
content: "";
|
|
374
404
|
width: 1px;
|
|
@@ -376,20 +406,15 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
376
406
|
margin-bottom: 12px;
|
|
377
407
|
background-color: #ddd;
|
|
378
408
|
position: relative;
|
|
379
|
-
right: -
|
|
409
|
+
right: -8px;
|
|
380
410
|
height: 24px;
|
|
411
|
+
top: -1px;
|
|
381
412
|
}
|
|
382
413
|
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed {
|
|
383
|
-
margin-right:
|
|
384
|
-
}
|
|
385
|
-
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed.is-collapsed {
|
|
386
|
-
margin-right: 384px;
|
|
414
|
+
margin-right: 80px;
|
|
387
415
|
}
|
|
388
416
|
.is-fullscreen-mode .show-icon-labels .block-editor-block-contextual-toolbar.is-fixed {
|
|
389
|
-
margin-right:
|
|
390
|
-
}
|
|
391
|
-
.is-fullscreen-mode .show-icon-labels .block-editor-block-contextual-toolbar.is-fixed.is-collapsed {
|
|
392
|
-
margin-right: 448px;
|
|
417
|
+
margin-right: 144px;
|
|
393
418
|
}
|
|
394
419
|
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed .block-editor-block-parent-selector .block-editor-block-parent-selector__button::after {
|
|
395
420
|
right: 0;
|
|
@@ -447,7 +472,7 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
447
472
|
}
|
|
448
473
|
@media (min-width: 960px) {
|
|
449
474
|
.block-editor-block-contextual-toolbar.is-fixed {
|
|
450
|
-
width:
|
|
475
|
+
width: calc(100% - 240px - 256px);
|
|
451
476
|
}
|
|
452
477
|
}
|
|
453
478
|
|
|
@@ -2654,8 +2679,7 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
2654
2679
|
}
|
|
2655
2680
|
.block-editor-list-view-drop-indicator .block-editor-list-view-drop-indicator__line {
|
|
2656
2681
|
background: var(--wp-admin-theme-color);
|
|
2657
|
-
height:
|
|
2658
|
-
border: 1px solid #fff;
|
|
2682
|
+
height: 4px;
|
|
2659
2683
|
border-radius: 4px;
|
|
2660
2684
|
}
|
|
2661
2685
|
|
|
@@ -4115,6 +4139,32 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
4115
4139
|
margin: 0;
|
|
4116
4140
|
}
|
|
4117
4141
|
|
|
4142
|
+
.block-editor-inserter__hint {
|
|
4143
|
+
margin: 16px 16px 0;
|
|
4144
|
+
}
|
|
4145
|
+
|
|
4146
|
+
.reusable-blocks-menu-items__rename-hint {
|
|
4147
|
+
align-items: top;
|
|
4148
|
+
background: #f0f0f0;
|
|
4149
|
+
border-radius: 2px;
|
|
4150
|
+
color: #1e1e1e;
|
|
4151
|
+
display: flex;
|
|
4152
|
+
flex-direction: row;
|
|
4153
|
+
max-width: 380px;
|
|
4154
|
+
}
|
|
4155
|
+
|
|
4156
|
+
.reusable-blocks-menu-items__rename-hint-content {
|
|
4157
|
+
margin: 12px 12px 12px 0;
|
|
4158
|
+
}
|
|
4159
|
+
|
|
4160
|
+
.reusable-blocks-menu-items__rename-hint-dismiss {
|
|
4161
|
+
margin: 4px 0 4px 4px;
|
|
4162
|
+
}
|
|
4163
|
+
|
|
4164
|
+
.components-menu-group .reusable-blocks-menu-items__rename-hint {
|
|
4165
|
+
margin: 0;
|
|
4166
|
+
}
|
|
4167
|
+
|
|
4118
4168
|
.block-editor-post-preview__dropdown {
|
|
4119
4169
|
padding: 0;
|
|
4120
4170
|
}
|
package/build-style/style.css
CHANGED
|
@@ -333,42 +333,72 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
333
333
|
}
|
|
334
334
|
@media (min-width: 782px) {
|
|
335
335
|
.block-editor-block-contextual-toolbar.is-fixed {
|
|
336
|
-
margin-left:
|
|
336
|
+
margin-left: 180px;
|
|
337
337
|
position: fixed;
|
|
338
|
-
top:
|
|
338
|
+
top: 39px;
|
|
339
339
|
min-height: initial;
|
|
340
340
|
border-bottom: none;
|
|
341
341
|
display: flex;
|
|
342
342
|
}
|
|
343
343
|
.block-editor-block-contextual-toolbar.is-fixed.is-collapsed {
|
|
344
344
|
width: initial;
|
|
345
|
-
margin-left: 216px;
|
|
346
345
|
}
|
|
347
346
|
.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
348
|
-
margin-left:
|
|
349
|
-
top:
|
|
347
|
+
margin-left: 240px;
|
|
348
|
+
top: 7px;
|
|
350
349
|
}
|
|
351
350
|
.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed.is-collapsed {
|
|
352
351
|
width: initial;
|
|
353
|
-
|
|
352
|
+
}
|
|
353
|
+
.block-editor-block-contextual-toolbar.is-fixed > .block-editor-block-toolbar.is-showing-movers {
|
|
354
|
+
flex-grow: initial;
|
|
355
|
+
width: initial;
|
|
356
|
+
}
|
|
357
|
+
.block-editor-block-contextual-toolbar.is-fixed > .block-editor-block-toolbar.is-showing-movers::before {
|
|
358
|
+
content: "";
|
|
359
|
+
width: 1px;
|
|
360
|
+
height: 24px;
|
|
361
|
+
margin-top: 12px;
|
|
362
|
+
margin-right: 0;
|
|
363
|
+
background-color: #ddd;
|
|
364
|
+
position: relative;
|
|
365
|
+
left: -2px;
|
|
366
|
+
top: -1px;
|
|
354
367
|
}
|
|
355
368
|
.block-editor-block-contextual-toolbar.is-fixed > .block-editor-block-toolbar__group-collapse-fixed-toolbar {
|
|
356
369
|
border: none;
|
|
357
370
|
}
|
|
358
|
-
.block-editor-block-contextual-toolbar.is-fixed > .block-editor-block-toolbar__group-collapse-fixed-toolbar
|
|
371
|
+
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed > .block-editor-block-toolbar__group-collapse-fixed-toolbar .components-button.has-icon svg {
|
|
372
|
+
display: none;
|
|
373
|
+
}
|
|
374
|
+
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed > .block-editor-block-toolbar__group-collapse-fixed-toolbar .components-button.has-icon::after {
|
|
375
|
+
content: attr(aria-label);
|
|
376
|
+
font-size: 12px;
|
|
377
|
+
}
|
|
378
|
+
.block-editor-block-contextual-toolbar.is-fixed > .block-editor-block-toolbar__group-collapse-fixed-toolbar::before {
|
|
359
379
|
content: "";
|
|
360
380
|
width: 1px;
|
|
361
381
|
height: 24px;
|
|
362
382
|
margin-top: 12px;
|
|
363
|
-
margin-
|
|
383
|
+
margin-right: 8px;
|
|
364
384
|
background-color: #ddd;
|
|
365
|
-
position:
|
|
366
|
-
left:
|
|
385
|
+
position: relative;
|
|
386
|
+
left: 0;
|
|
367
387
|
top: -1px;
|
|
368
388
|
}
|
|
369
389
|
.block-editor-block-contextual-toolbar.is-fixed > .block-editor-block-toolbar__group-expand-fixed-toolbar {
|
|
370
390
|
border: none;
|
|
371
391
|
}
|
|
392
|
+
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed > .block-editor-block-toolbar__group-expand-fixed-toolbar {
|
|
393
|
+
width: 256px;
|
|
394
|
+
}
|
|
395
|
+
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed > .block-editor-block-toolbar__group-expand-fixed-toolbar .components-button.has-icon svg {
|
|
396
|
+
display: none;
|
|
397
|
+
}
|
|
398
|
+
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed > .block-editor-block-toolbar__group-expand-fixed-toolbar .components-button.has-icon::after {
|
|
399
|
+
content: attr(aria-label);
|
|
400
|
+
font-size: 12px;
|
|
401
|
+
}
|
|
372
402
|
.block-editor-block-contextual-toolbar.is-fixed > .block-editor-block-toolbar__group-expand-fixed-toolbar::before {
|
|
373
403
|
content: "";
|
|
374
404
|
width: 1px;
|
|
@@ -376,20 +406,15 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
376
406
|
margin-bottom: 12px;
|
|
377
407
|
background-color: #ddd;
|
|
378
408
|
position: relative;
|
|
379
|
-
left: -
|
|
409
|
+
left: -8px;
|
|
380
410
|
height: 24px;
|
|
411
|
+
top: -1px;
|
|
381
412
|
}
|
|
382
413
|
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed {
|
|
383
|
-
margin-left:
|
|
384
|
-
}
|
|
385
|
-
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed.is-collapsed {
|
|
386
|
-
margin-left: 384px;
|
|
414
|
+
margin-left: 80px;
|
|
387
415
|
}
|
|
388
416
|
.is-fullscreen-mode .show-icon-labels .block-editor-block-contextual-toolbar.is-fixed {
|
|
389
|
-
margin-left:
|
|
390
|
-
}
|
|
391
|
-
.is-fullscreen-mode .show-icon-labels .block-editor-block-contextual-toolbar.is-fixed.is-collapsed {
|
|
392
|
-
margin-left: 448px;
|
|
417
|
+
margin-left: 144px;
|
|
393
418
|
}
|
|
394
419
|
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed .block-editor-block-parent-selector .block-editor-block-parent-selector__button::after {
|
|
395
420
|
left: 0;
|
|
@@ -447,7 +472,7 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
447
472
|
}
|
|
448
473
|
@media (min-width: 960px) {
|
|
449
474
|
.block-editor-block-contextual-toolbar.is-fixed {
|
|
450
|
-
width:
|
|
475
|
+
width: calc(100% - 240px - 256px);
|
|
451
476
|
}
|
|
452
477
|
}
|
|
453
478
|
|
|
@@ -2655,8 +2680,7 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
2655
2680
|
}
|
|
2656
2681
|
.block-editor-list-view-drop-indicator .block-editor-list-view-drop-indicator__line {
|
|
2657
2682
|
background: var(--wp-admin-theme-color);
|
|
2658
|
-
height:
|
|
2659
|
-
border: 1px solid #fff;
|
|
2683
|
+
height: 4px;
|
|
2660
2684
|
border-radius: 4px;
|
|
2661
2685
|
}
|
|
2662
2686
|
|
|
@@ -4116,6 +4140,32 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
4116
4140
|
margin: 0;
|
|
4117
4141
|
}
|
|
4118
4142
|
|
|
4143
|
+
.block-editor-inserter__hint {
|
|
4144
|
+
margin: 16px 16px 0;
|
|
4145
|
+
}
|
|
4146
|
+
|
|
4147
|
+
.reusable-blocks-menu-items__rename-hint {
|
|
4148
|
+
align-items: top;
|
|
4149
|
+
background: #f0f0f0;
|
|
4150
|
+
border-radius: 2px;
|
|
4151
|
+
color: #1e1e1e;
|
|
4152
|
+
display: flex;
|
|
4153
|
+
flex-direction: row;
|
|
4154
|
+
max-width: 380px;
|
|
4155
|
+
}
|
|
4156
|
+
|
|
4157
|
+
.reusable-blocks-menu-items__rename-hint-content {
|
|
4158
|
+
margin: 12px 0 12px 12px;
|
|
4159
|
+
}
|
|
4160
|
+
|
|
4161
|
+
.reusable-blocks-menu-items__rename-hint-dismiss {
|
|
4162
|
+
margin: 4px 4px 4px 0;
|
|
4163
|
+
}
|
|
4164
|
+
|
|
4165
|
+
.components-menu-group .reusable-blocks-menu-items__rename-hint {
|
|
4166
|
+
margin: 0;
|
|
4167
|
+
}
|
|
4168
|
+
|
|
4119
4169
|
.block-editor-post-preview__dropdown {
|
|
4120
4170
|
padding: 0;
|
|
4121
4171
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-editor",
|
|
3
|
-
"version": "12.3.
|
|
3
|
+
"version": "12.3.5",
|
|
4
4
|
"description": "Generic block editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"@wordpress/a11y": "^3.35.1",
|
|
38
38
|
"@wordpress/api-fetch": "^6.32.1",
|
|
39
39
|
"@wordpress/blob": "^3.35.1",
|
|
40
|
-
"@wordpress/blocks": "^12.12.
|
|
41
|
-
"@wordpress/components": "^25.1.
|
|
40
|
+
"@wordpress/blocks": "^12.12.3",
|
|
41
|
+
"@wordpress/components": "^25.1.5",
|
|
42
42
|
"@wordpress/compose": "^6.12.1",
|
|
43
|
-
"@wordpress/data": "^9.5.
|
|
43
|
+
"@wordpress/data": "^9.5.3",
|
|
44
44
|
"@wordpress/date": "^4.35.1",
|
|
45
45
|
"@wordpress/deprecated": "^3.35.1",
|
|
46
46
|
"@wordpress/dom": "^3.35.1",
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
"@wordpress/i18n": "^4.35.1",
|
|
52
52
|
"@wordpress/icons": "^9.26.2",
|
|
53
53
|
"@wordpress/is-shallow-equal": "^4.35.1",
|
|
54
|
-
"@wordpress/keyboard-shortcuts": "^4.12.
|
|
54
|
+
"@wordpress/keyboard-shortcuts": "^4.12.3",
|
|
55
55
|
"@wordpress/keycodes": "^3.35.1",
|
|
56
|
-
"@wordpress/notices": "^4.3.
|
|
57
|
-
"@wordpress/preferences": "^3.12.
|
|
56
|
+
"@wordpress/notices": "^4.3.3",
|
|
57
|
+
"@wordpress/preferences": "^3.12.5",
|
|
58
58
|
"@wordpress/private-apis": "^0.17.1",
|
|
59
|
-
"@wordpress/rich-text": "^6.12.
|
|
59
|
+
"@wordpress/rich-text": "^6.12.3",
|
|
60
60
|
"@wordpress/shortcode": "^3.35.1",
|
|
61
61
|
"@wordpress/style-engine": "^1.18.1",
|
|
62
62
|
"@wordpress/token-list": "^2.35.1",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"publishConfig": {
|
|
86
86
|
"access": "public"
|
|
87
87
|
},
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "3eeb607ebb76c3bf06cb8acb462f0dc068f340f9"
|
|
89
89
|
}
|
|
@@ -29,7 +29,25 @@ import BlockContext from '../block-context';
|
|
|
29
29
|
*/
|
|
30
30
|
const DEFAULT_BLOCK_CONTEXT = {};
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
const Edit = ( props ) => {
|
|
33
|
+
const { name } = props;
|
|
34
|
+
const blockType = getBlockType( name );
|
|
35
|
+
|
|
36
|
+
if ( ! blockType ) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// `edit` and `save` are functions or components describing the markup
|
|
41
|
+
// with which a block is displayed. If `blockType` is valid, assign
|
|
42
|
+
// them preferentially as the render value for the block.
|
|
43
|
+
const Component = blockType.edit || blockType.save;
|
|
44
|
+
|
|
45
|
+
return <Component { ...props } />;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const EditWithFilters = withFilters( 'editor.BlockEdit' )( Edit );
|
|
49
|
+
|
|
50
|
+
const EditWithGeneratedProps = ( props ) => {
|
|
33
51
|
const { attributes = {}, name } = props;
|
|
34
52
|
const blockType = getBlockType( name );
|
|
35
53
|
const blockContext = useContext( BlockContext );
|
|
@@ -49,13 +67,8 @@ export const Edit = ( props ) => {
|
|
|
49
67
|
return null;
|
|
50
68
|
}
|
|
51
69
|
|
|
52
|
-
// `edit` and `save` are functions or components describing the markup
|
|
53
|
-
// with which a block is displayed. If `blockType` is valid, assign
|
|
54
|
-
// them preferentially as the render value for the block.
|
|
55
|
-
const Component = blockType.edit || blockType.save;
|
|
56
|
-
|
|
57
70
|
if ( blockType.apiVersion > 1 ) {
|
|
58
|
-
return <
|
|
71
|
+
return <EditWithFilters { ...props } context={ context } />;
|
|
59
72
|
}
|
|
60
73
|
|
|
61
74
|
// Generate a class name for the block's editable form.
|
|
@@ -69,8 +82,12 @@ export const Edit = ( props ) => {
|
|
|
69
82
|
);
|
|
70
83
|
|
|
71
84
|
return (
|
|
72
|
-
<
|
|
85
|
+
<EditWithFilters
|
|
86
|
+
{ ...props }
|
|
87
|
+
context={ context }
|
|
88
|
+
className={ className }
|
|
89
|
+
/>
|
|
73
90
|
);
|
|
74
91
|
};
|
|
75
92
|
|
|
76
|
-
export default
|
|
93
|
+
export default EditWithGeneratedProps;
|
|
@@ -213,16 +213,12 @@ const BlockActionsMenu = ( {
|
|
|
213
213
|
id: 'convertToRegularBlocksOption',
|
|
214
214
|
label:
|
|
215
215
|
innerBlockCount > 1
|
|
216
|
-
? __( '
|
|
217
|
-
: __( '
|
|
216
|
+
? __( 'Detach patterns' )
|
|
217
|
+
: __( 'Detach pattern' ),
|
|
218
218
|
value: 'convertToRegularBlocksOption',
|
|
219
219
|
onSelect: () => {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
? /* translators: %s: name of the reusable block */
|
|
223
|
-
__( '%s converted to regular blocks' )
|
|
224
|
-
: /* translators: %s: name of the reusable block */
|
|
225
|
-
__( '%s converted to regular block' );
|
|
220
|
+
/* translators: %s: name of the synced block */
|
|
221
|
+
const successNotice = __( '%s detached' );
|
|
226
222
|
createSuccessNotice(
|
|
227
223
|
sprintf(
|
|
228
224
|
successNotice,
|
|
@@ -14,6 +14,7 @@ import useBlockDisplayInformation from '../use-block-display-information';
|
|
|
14
14
|
import BlockIcon from '../block-icon';
|
|
15
15
|
import { useShowMoversGestures } from '../block-toolbar/utils';
|
|
16
16
|
import { store as blockEditorStore } from '../../store';
|
|
17
|
+
import { unlock } from '../../lock-unlock';
|
|
17
18
|
|
|
18
19
|
/**
|
|
19
20
|
* Block parent selector component, displaying the hierarchy of the
|
|
@@ -24,14 +25,15 @@ import { store as blockEditorStore } from '../../store';
|
|
|
24
25
|
export default function BlockParentSelector() {
|
|
25
26
|
const { selectBlock, toggleBlockHighlight } =
|
|
26
27
|
useDispatch( blockEditorStore );
|
|
27
|
-
const { firstParentClientId,
|
|
28
|
+
const { firstParentClientId, isVisible, isDistractionFree } = useSelect(
|
|
28
29
|
( select ) => {
|
|
29
30
|
const {
|
|
30
31
|
getBlockName,
|
|
31
32
|
getBlockParents,
|
|
32
33
|
getSelectedBlockClientId,
|
|
33
34
|
getSettings,
|
|
34
|
-
|
|
35
|
+
getBlockEditingMode,
|
|
36
|
+
} = unlock( select( blockEditorStore ) );
|
|
35
37
|
const { hasBlockSupport } = select( blocksStore );
|
|
36
38
|
const selectedBlockClientId = getSelectedBlockClientId();
|
|
37
39
|
const parents = getBlockParents( selectedBlockClientId );
|
|
@@ -41,11 +43,14 @@ export default function BlockParentSelector() {
|
|
|
41
43
|
const settings = getSettings();
|
|
42
44
|
return {
|
|
43
45
|
firstParentClientId: _firstParentClientId,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
'
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
isVisible:
|
|
47
|
+
_firstParentClientId &&
|
|
48
|
+
getBlockEditingMode( _firstParentClientId ) === 'default' &&
|
|
49
|
+
hasBlockSupport(
|
|
50
|
+
_parentBlockType,
|
|
51
|
+
'__experimentalParentSelector',
|
|
52
|
+
true
|
|
53
|
+
),
|
|
49
54
|
isDistractionFree: settings.isDistractionFree,
|
|
50
55
|
};
|
|
51
56
|
},
|
|
@@ -66,7 +71,7 @@ export default function BlockParentSelector() {
|
|
|
66
71
|
},
|
|
67
72
|
} );
|
|
68
73
|
|
|
69
|
-
if (
|
|
74
|
+
if ( ! isVisible ) {
|
|
70
75
|
return null;
|
|
71
76
|
}
|
|
72
77
|
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
Button,
|
|
9
9
|
__experimentalHStack as HStack,
|
|
10
10
|
} from '@wordpress/components';
|
|
11
|
-
import { __
|
|
11
|
+
import { __ } from '@wordpress/i18n';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Internal dependencies
|
|
@@ -62,6 +62,9 @@ export function BlockRemovalWarningModal() {
|
|
|
62
62
|
<Modal
|
|
63
63
|
title={ __( 'Are you sure?' ) }
|
|
64
64
|
onRequestClose={ clearRemovalPrompt }
|
|
65
|
+
style={ {
|
|
66
|
+
maxWidth: '40rem',
|
|
67
|
+
} }
|
|
65
68
|
>
|
|
66
69
|
{ blockNamesForPrompt.length === 1 ? (
|
|
67
70
|
<p>{ blockTypePromptMessages[ blockNamesForPrompt[ 0 ] ] }</p>
|
|
@@ -75,11 +78,9 @@ export function BlockRemovalWarningModal() {
|
|
|
75
78
|
</ul>
|
|
76
79
|
) }
|
|
77
80
|
<p>
|
|
78
|
-
{
|
|
79
|
-
'Removing
|
|
80
|
-
'Removing
|
|
81
|
-
blockNamesForPrompt.length
|
|
82
|
-
) }
|
|
81
|
+
{ blockNamesForPrompt.length > 1
|
|
82
|
+
? __( 'Removing these blocks is not advised.' )
|
|
83
|
+
: __( 'Removing this block is not advised.' ) }
|
|
83
84
|
</p>
|
|
84
85
|
<HStack justify="right">
|
|
85
86
|
<Button variant="tertiary" onClick={ clearRemovalPrompt }>
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
ToolbarButton,
|
|
16
16
|
ToolbarGroup,
|
|
17
17
|
} from '@wordpress/components';
|
|
18
|
-
import {
|
|
18
|
+
import { next, previous } from '@wordpress/icons';
|
|
19
19
|
import { useViewportMatch } from '@wordpress/compose';
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -24,7 +24,6 @@ import { useViewportMatch } from '@wordpress/compose';
|
|
|
24
24
|
import NavigableToolbar from '../navigable-toolbar';
|
|
25
25
|
import BlockToolbar from '../block-toolbar';
|
|
26
26
|
import { store as blockEditorStore } from '../../store';
|
|
27
|
-
import BlockIcon from '../block-icon';
|
|
28
27
|
import { unlock } from '../../lock-unlock';
|
|
29
28
|
|
|
30
29
|
function BlockContextualToolbar( { focusOnMount, isFixed, ...props } ) {
|
|
@@ -57,6 +56,7 @@ function BlockContextualToolbar( { focusOnMount, isFixed, ...props } ) {
|
|
|
57
56
|
hasParents: parents.length,
|
|
58
57
|
showParentSelector:
|
|
59
58
|
parentBlockType &&
|
|
59
|
+
getBlockEditingMode( firstParentClientId ) === 'default' &&
|
|
60
60
|
hasBlockSupport(
|
|
61
61
|
parentBlockType,
|
|
62
62
|
'__experimentalParentSelector',
|
|
@@ -93,6 +93,7 @@ function BlockContextualToolbar( { focusOnMount, isFixed, ...props } ) {
|
|
|
93
93
|
aria-label={ __( 'Block tools' ) }
|
|
94
94
|
{ ...props }
|
|
95
95
|
>
|
|
96
|
+
{ ! isCollapsed && <BlockToolbar hideDragHandle={ isFixed } /> }
|
|
96
97
|
{ isFixed && isLargeViewport && blockType && (
|
|
97
98
|
<ToolbarGroup
|
|
98
99
|
className={
|
|
@@ -104,13 +105,7 @@ function BlockContextualToolbar( { focusOnMount, isFixed, ...props } ) {
|
|
|
104
105
|
<ToolbarItem
|
|
105
106
|
as={ ToolbarButton }
|
|
106
107
|
ref={ toolbarButtonRef }
|
|
107
|
-
icon={
|
|
108
|
-
isCollapsed ? (
|
|
109
|
-
<BlockIcon icon={ blockType.icon } />
|
|
110
|
-
) : (
|
|
111
|
-
levelUp
|
|
112
|
-
)
|
|
113
|
-
}
|
|
108
|
+
icon={ isCollapsed ? next : previous }
|
|
114
109
|
onClick={ () => {
|
|
115
110
|
setIsCollapsed( ( collapsed ) => ! collapsed );
|
|
116
111
|
toolbarButtonRef.current.focus();
|
|
@@ -118,12 +113,11 @@ function BlockContextualToolbar( { focusOnMount, isFixed, ...props } ) {
|
|
|
118
113
|
label={
|
|
119
114
|
isCollapsed
|
|
120
115
|
? __( 'Show block tools' )
|
|
121
|
-
: __( '
|
|
116
|
+
: __( 'Hide block tools' )
|
|
122
117
|
}
|
|
123
118
|
/>
|
|
124
119
|
</ToolbarGroup>
|
|
125
120
|
) }
|
|
126
|
-
{ ! isCollapsed && <BlockToolbar hideDragHandle={ isFixed } /> }
|
|
127
121
|
</NavigableToolbar>
|
|
128
122
|
);
|
|
129
123
|
}
|