@wordpress/block-editor 14.3.6 → 14.3.7
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 +2 -2
- package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js +14 -6
- package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
- package/build/components/block-list/zoom-out-separator.js +10 -7
- package/build/components/block-list/zoom-out-separator.js.map +1 -1
- package/build/components/block-popover/index.js +1 -1
- package/build/components/block-popover/index.js.map +1 -1
- package/build/components/block-toolbar/index.js +28 -16
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-toolbar/use-has-block-toolbar.js +3 -3
- package/build/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
- package/build/components/block-tools/index.js +1 -6
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-tools/use-show-block-tools.js +4 -6
- package/build/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserters.js +22 -36
- package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build/components/iframe/index.js +40 -10
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/index.js +4 -0
- package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
- package/build/components/inserter/hooks/use-insertion-point.js +16 -4
- package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build/components/inserter/media-tab/media-tab.js +4 -0
- package/build/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build/components/inserter/menu.js +5 -2
- package/build/components/inserter/menu.js.map +1 -1
- package/build/hooks/block-bindings.js +12 -1
- package/build/hooks/block-bindings.js.map +1 -1
- package/build/hooks/use-zoom-out.js +24 -16
- package/build/hooks/use-zoom-out.js.map +1 -1
- package/build/store/private-selectors.js +37 -2
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/selectors.js +15 -8
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js +14 -6
- package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
- package/build-module/components/block-list/zoom-out-separator.js +10 -7
- package/build-module/components/block-list/zoom-out-separator.js.map +1 -1
- package/build-module/components/block-popover/index.js +1 -1
- package/build-module/components/block-popover/index.js.map +1 -1
- package/build-module/components/block-toolbar/index.js +30 -18
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-toolbar/use-has-block-toolbar.js +3 -3
- package/build-module/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
- package/build-module/components/block-tools/index.js +1 -6
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-tools/use-show-block-tools.js +4 -6
- package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserters.js +22 -36
- package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build-module/components/iframe/index.js +40 -10
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/index.js +5 -1
- package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
- package/build-module/components/inserter/hooks/use-insertion-point.js +16 -4
- package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-tab.js +5 -1
- package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build-module/components/inserter/menu.js +5 -2
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/hooks/block-bindings.js +13 -2
- package/build-module/hooks/block-bindings.js.map +1 -1
- package/build-module/hooks/use-zoom-out.js +24 -17
- package/build-module/hooks/use-zoom-out.js.map +1 -1
- package/build-module/store/private-selectors.js +35 -2
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/selectors.js +15 -8
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/content-rtl.css +14 -20
- package/build-style/content.css +14 -20
- package/build-style/style-rtl.css +28 -21
- package/build-style/style.css +28 -21
- package/package.json +6 -6
- package/src/components/block-canvas/style.scss +1 -0
- package/src/components/block-list/content.scss +3 -2
- package/src/components/block-list/use-block-props/use-selected-block-event-handlers.js +25 -4
- package/src/components/block-list/zoom-out-separator.js +8 -6
- package/src/components/block-popover/index.js +2 -2
- package/src/components/block-toolbar/index.js +37 -24
- package/src/components/block-toolbar/style.scss +10 -1
- package/src/components/block-toolbar/use-has-block-toolbar.js +19 -28
- package/src/components/block-tools/index.js +0 -9
- package/src/components/block-tools/style.scss +2 -26
- package/src/components/block-tools/use-show-block-tools.js +2 -10
- package/src/components/block-tools/zoom-out-mode-inserters.js +26 -50
- package/src/components/iframe/content.scss +16 -24
- package/src/components/iframe/index.js +53 -12
- package/src/components/iframe/style.scss +6 -5
- package/src/components/inserter/block-patterns-tab/index.js +6 -1
- package/src/components/inserter/hooks/use-insertion-point.js +23 -5
- package/src/components/inserter/media-tab/media-tab.js +6 -1
- package/src/components/inserter/menu.js +7 -1
- package/src/components/inserter/style.scss +6 -0
- package/src/components/rich-text/style.scss +5 -0
- package/src/hooks/block-bindings.js +40 -23
- package/src/hooks/use-zoom-out.js +36 -20
- package/src/store/private-selectors.js +40 -1
- package/src/store/selectors.js +16 -8
- package/src/style.scss +1 -0
- package/build/components/block-tools/zoom-out-popover.js +0 -57
- package/build/components/block-tools/zoom-out-popover.js.map +0 -1
- package/build/components/block-tools/zoom-out-toolbar.js +0 -159
- package/build/components/block-tools/zoom-out-toolbar.js.map +0 -1
- package/build-module/components/block-tools/zoom-out-popover.js +0 -48
- package/build-module/components/block-tools/zoom-out-popover.js.map +0 -1
- package/build-module/components/block-tools/zoom-out-toolbar.js +0 -152
- package/build-module/components/block-tools/zoom-out-toolbar.js.map +0 -1
- package/src/components/block-tools/zoom-out-popover.js +0 -46
- package/src/components/block-tools/zoom-out-toolbar.js +0 -167
|
@@ -500,13 +500,14 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
500
500
|
display: flex;
|
|
501
501
|
align-items: center;
|
|
502
502
|
justify-content: center;
|
|
503
|
+
overflow: hidden;
|
|
503
504
|
font-size: 13px;
|
|
504
505
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
505
506
|
color: #000;
|
|
506
507
|
font-weight: normal;
|
|
507
508
|
}
|
|
508
509
|
.is-zoomed-out .block-editor-block-list__zoom-out-separator {
|
|
509
|
-
font-size: calc(13px
|
|
510
|
+
font-size: calc(13px / var(--wp-block-editor-iframe-zoom-out-scale));
|
|
510
511
|
}
|
|
511
512
|
.block-editor-block-list__zoom-out-separator.is-dragged-over {
|
|
512
513
|
background: #ccc;
|
|
@@ -803,26 +804,9 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
803
804
|
border: 0.01px solid transparent;
|
|
804
805
|
}
|
|
805
806
|
|
|
806
|
-
.block-editor-iframe__container {
|
|
807
|
-
width: 100%;
|
|
808
|
-
height: 100%;
|
|
809
|
-
overflow-x: hidden;
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
.block-editor-iframe__scale-container {
|
|
813
|
-
width: 100%;
|
|
814
|
-
height: 100%;
|
|
815
|
-
display: flex;
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
.block-editor-iframe__scale-container.is-zoomed-out {
|
|
819
|
-
width: var(--wp-block-editor-iframe-zoom-out-prev-container-width, 100vw);
|
|
820
|
-
margin-right: calc(-1 * (var(--wp-block-editor-iframe-zoom-out-prev-container-width, 100vw) - var(--wp-block-editor-iframe-zoom-out-container-width, 100vw)) / 2);
|
|
821
|
-
}
|
|
822
|
-
|
|
823
807
|
.block-editor-iframe__html {
|
|
824
808
|
transform-origin: top center;
|
|
825
|
-
transition: all
|
|
809
|
+
transition: all 400ms cubic-bezier(0.46, 0.03, 0.52, 0.96), transform 0s, scale 0s, padding 0s;
|
|
826
810
|
}
|
|
827
811
|
@media (prefers-reduced-motion: reduce) {
|
|
828
812
|
.block-editor-iframe__html {
|
|
@@ -830,9 +814,19 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
830
814
|
transition-delay: 0s;
|
|
831
815
|
}
|
|
832
816
|
}
|
|
817
|
+
.block-editor-iframe__html.zoom-out-animation {
|
|
818
|
+
transition: all 400ms cubic-bezier(0.46, 0.03, 0.52, 0.96), transform 0s;
|
|
819
|
+
}
|
|
820
|
+
@media (prefers-reduced-motion: reduce) {
|
|
821
|
+
.block-editor-iframe__html.zoom-out-animation {
|
|
822
|
+
transition-duration: 0s;
|
|
823
|
+
transition-delay: 0s;
|
|
824
|
+
}
|
|
825
|
+
}
|
|
833
826
|
|
|
834
827
|
.block-editor-iframe__html.is-zoomed-out {
|
|
835
|
-
transform: scale(var(--wp-block-editor-iframe-zoom-out-scale));
|
|
828
|
+
transform: translateX(calc(-1*((var(--wp-block-editor-iframe-zoom-out-scale-container-width) - var(--wp-block-editor-iframe-zoom-out-container-width, 100vw)) / 2 / var(--wp-block-editor-iframe-zoom-out-scale))));
|
|
829
|
+
scale: var(--wp-block-editor-iframe-zoom-out-scale);
|
|
836
830
|
background-color: #ddd;
|
|
837
831
|
margin-bottom: calc(-1 * calc(calc(var(--wp-block-editor-iframe-zoom-out-content-height) * (1 - var(--wp-block-editor-iframe-zoom-out-scale))) + calc(2 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)) + 2px));
|
|
838
832
|
padding-top: calc(var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale));
|
package/build-style/content.css
CHANGED
|
@@ -500,13 +500,14 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
500
500
|
display: flex;
|
|
501
501
|
align-items: center;
|
|
502
502
|
justify-content: center;
|
|
503
|
+
overflow: hidden;
|
|
503
504
|
font-size: 13px;
|
|
504
505
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
505
506
|
color: #000;
|
|
506
507
|
font-weight: normal;
|
|
507
508
|
}
|
|
508
509
|
.is-zoomed-out .block-editor-block-list__zoom-out-separator {
|
|
509
|
-
font-size: calc(13px
|
|
510
|
+
font-size: calc(13px / var(--wp-block-editor-iframe-zoom-out-scale));
|
|
510
511
|
}
|
|
511
512
|
.block-editor-block-list__zoom-out-separator.is-dragged-over {
|
|
512
513
|
background: #ccc;
|
|
@@ -803,26 +804,9 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
803
804
|
border: 0.01px solid transparent;
|
|
804
805
|
}
|
|
805
806
|
|
|
806
|
-
.block-editor-iframe__container {
|
|
807
|
-
width: 100%;
|
|
808
|
-
height: 100%;
|
|
809
|
-
overflow-x: hidden;
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
.block-editor-iframe__scale-container {
|
|
813
|
-
width: 100%;
|
|
814
|
-
height: 100%;
|
|
815
|
-
display: flex;
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
.block-editor-iframe__scale-container.is-zoomed-out {
|
|
819
|
-
width: var(--wp-block-editor-iframe-zoom-out-prev-container-width, 100vw);
|
|
820
|
-
margin-left: calc(-1 * (var(--wp-block-editor-iframe-zoom-out-prev-container-width, 100vw) - var(--wp-block-editor-iframe-zoom-out-container-width, 100vw)) / 2);
|
|
821
|
-
}
|
|
822
|
-
|
|
823
807
|
.block-editor-iframe__html {
|
|
824
808
|
transform-origin: top center;
|
|
825
|
-
transition: all
|
|
809
|
+
transition: all 400ms cubic-bezier(0.46, 0.03, 0.52, 0.96), transform 0s, scale 0s, padding 0s;
|
|
826
810
|
}
|
|
827
811
|
@media (prefers-reduced-motion: reduce) {
|
|
828
812
|
.block-editor-iframe__html {
|
|
@@ -830,9 +814,19 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
830
814
|
transition-delay: 0s;
|
|
831
815
|
}
|
|
832
816
|
}
|
|
817
|
+
.block-editor-iframe__html.zoom-out-animation {
|
|
818
|
+
transition: all 400ms cubic-bezier(0.46, 0.03, 0.52, 0.96), transform 0s;
|
|
819
|
+
}
|
|
820
|
+
@media (prefers-reduced-motion: reduce) {
|
|
821
|
+
.block-editor-iframe__html.zoom-out-animation {
|
|
822
|
+
transition-duration: 0s;
|
|
823
|
+
transition-delay: 0s;
|
|
824
|
+
}
|
|
825
|
+
}
|
|
833
826
|
|
|
834
827
|
.block-editor-iframe__html.is-zoomed-out {
|
|
835
|
-
transform: scale(var(--wp-block-editor-iframe-zoom-out-scale));
|
|
828
|
+
transform: translateX(calc((var(--wp-block-editor-iframe-zoom-out-scale-container-width) - var(--wp-block-editor-iframe-zoom-out-container-width, 100vw)) / 2 / var(--wp-block-editor-iframe-zoom-out-scale)));
|
|
829
|
+
scale: var(--wp-block-editor-iframe-zoom-out-scale);
|
|
836
830
|
background-color: #ddd;
|
|
837
831
|
margin-bottom: calc(-1 * calc(calc(var(--wp-block-editor-iframe-zoom-out-content-height) * (1 - var(--wp-block-editor-iframe-zoom-out-scale))) + calc(2 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)) + 2px));
|
|
838
832
|
padding-top: calc(var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale));
|
|
@@ -270,7 +270,7 @@ iframe[name=editor-canvas] {
|
|
|
270
270
|
height: 100%;
|
|
271
271
|
display: block;
|
|
272
272
|
background-color: transparent;
|
|
273
|
-
transition: all
|
|
273
|
+
transition: all 400ms cubic-bezier(0.46, 0.03, 0.52, 0.96);
|
|
274
274
|
}
|
|
275
275
|
@media (prefers-reduced-motion: reduce) {
|
|
276
276
|
iframe[name=editor-canvas] {
|
|
@@ -554,25 +554,8 @@ iframe[name=editor-canvas] {
|
|
|
554
554
|
right: 50%;
|
|
555
555
|
}
|
|
556
556
|
|
|
557
|
-
.
|
|
558
|
-
|
|
559
|
-
.zoom-out-toolbar .block-editor-block-toolbar-shuffle:focus::before,
|
|
560
|
-
.zoom-out-toolbar .block-selection-button_drag-handle:focus::before {
|
|
561
|
-
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
562
|
-
}
|
|
563
|
-
.zoom-out-toolbar .block-editor-block-mover {
|
|
564
|
-
background: none;
|
|
565
|
-
border: none;
|
|
566
|
-
}
|
|
567
|
-
.zoom-out-toolbar .zoom-out-toolbar-button {
|
|
568
|
-
height: 40px;
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
.block-editor-block-tools__zoom-out-mode-inserter-button {
|
|
572
|
-
visibility: hidden;
|
|
573
|
-
}
|
|
574
|
-
.block-editor-block-tools__zoom-out-mode-inserter-button.is-visible {
|
|
575
|
-
visibility: visible;
|
|
557
|
+
.components-button.block-editor-button-pattern-inserter__button.block-editor-block-tools__zoom-out-mode-inserter-button {
|
|
558
|
+
top: -1px;
|
|
576
559
|
}
|
|
577
560
|
|
|
578
561
|
.block-editor-block-lock-modal {
|
|
@@ -1919,6 +1902,22 @@ iframe[name=editor-canvas] {
|
|
|
1919
1902
|
padding: 0;
|
|
1920
1903
|
}
|
|
1921
1904
|
|
|
1905
|
+
.block-editor-iframe__container {
|
|
1906
|
+
width: 100%;
|
|
1907
|
+
height: 100%;
|
|
1908
|
+
overflow-x: hidden;
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
.block-editor-iframe__scale-container {
|
|
1912
|
+
height: 100%;
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1915
|
+
.block-editor-iframe__scale-container.is-zoomed-out {
|
|
1916
|
+
width: var(--wp-block-editor-iframe-zoom-out-scale-container-width, 100vw);
|
|
1917
|
+
position: absolute;
|
|
1918
|
+
left: 0;
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1922
1921
|
.block-editor-image-size-control {
|
|
1923
1922
|
margin-bottom: 1em;
|
|
1924
1923
|
}
|
|
@@ -3061,10 +3060,14 @@ iframe[name=editor-canvas] {
|
|
|
3061
3060
|
margin-bottom: 8px;
|
|
3062
3061
|
box-shadow: none;
|
|
3063
3062
|
outline: none;
|
|
3063
|
+
border-radius: 2px;
|
|
3064
3064
|
}
|
|
3065
3065
|
.components-popover.block-editor-rich-text__inline-format-toolbar .components-toolbar {
|
|
3066
3066
|
border-radius: 2px;
|
|
3067
3067
|
}
|
|
3068
|
+
.components-popover.block-editor-rich-text__inline-format-toolbar .components-toolbar-group {
|
|
3069
|
+
background: none;
|
|
3070
|
+
}
|
|
3068
3071
|
.components-popover.block-editor-rich-text__inline-format-toolbar .components-toolbar__control,
|
|
3069
3072
|
.components-popover.block-editor-rich-text__inline-format-toolbar .components-dropdown-menu__toggle {
|
|
3070
3073
|
min-width: 48px;
|
|
@@ -3478,9 +3481,12 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
|
|
|
3478
3481
|
}
|
|
3479
3482
|
.block-editor-block-toolbar > :last-child,
|
|
3480
3483
|
.block-editor-block-toolbar > :last-child .components-toolbar-group,
|
|
3481
|
-
.block-editor-block-toolbar > :last-child .components-toolbar {
|
|
3484
|
+
.block-editor-block-toolbar > :last-child .components-toolbar, .block-editor-block-toolbar:has(> :last-child:empty) > :nth-last-child(2), .block-editor-block-toolbar:has(> :last-child:empty) > :nth-last-child(2) .components-toolbar-group, .block-editor-block-toolbar:has(> :last-child:empty) > :nth-last-child(2) .components-toolbar {
|
|
3482
3485
|
border-left: none;
|
|
3483
3486
|
}
|
|
3487
|
+
.block-editor-block-toolbar .components-toolbar-group:empty {
|
|
3488
|
+
display: none;
|
|
3489
|
+
}
|
|
3484
3490
|
|
|
3485
3491
|
.block-editor-block-contextual-toolbar {
|
|
3486
3492
|
position: sticky;
|
|
@@ -3775,6 +3781,7 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
|
|
|
3775
3781
|
}
|
|
3776
3782
|
|
|
3777
3783
|
.block-editor-inserter__panel-header {
|
|
3784
|
+
position: relative;
|
|
3778
3785
|
display: inline-flex;
|
|
3779
3786
|
align-items: center;
|
|
3780
3787
|
padding: 16px 16px 0;
|
package/build-style/style.css
CHANGED
|
@@ -270,7 +270,7 @@ iframe[name=editor-canvas] {
|
|
|
270
270
|
height: 100%;
|
|
271
271
|
display: block;
|
|
272
272
|
background-color: transparent;
|
|
273
|
-
transition: all
|
|
273
|
+
transition: all 400ms cubic-bezier(0.46, 0.03, 0.52, 0.96);
|
|
274
274
|
}
|
|
275
275
|
@media (prefers-reduced-motion: reduce) {
|
|
276
276
|
iframe[name=editor-canvas] {
|
|
@@ -554,25 +554,8 @@ iframe[name=editor-canvas] {
|
|
|
554
554
|
left: 50%;
|
|
555
555
|
}
|
|
556
556
|
|
|
557
|
-
.
|
|
558
|
-
|
|
559
|
-
.zoom-out-toolbar .block-editor-block-toolbar-shuffle:focus::before,
|
|
560
|
-
.zoom-out-toolbar .block-selection-button_drag-handle:focus::before {
|
|
561
|
-
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
562
|
-
}
|
|
563
|
-
.zoom-out-toolbar .block-editor-block-mover {
|
|
564
|
-
background: none;
|
|
565
|
-
border: none;
|
|
566
|
-
}
|
|
567
|
-
.zoom-out-toolbar .zoom-out-toolbar-button {
|
|
568
|
-
height: 40px;
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
.block-editor-block-tools__zoom-out-mode-inserter-button {
|
|
572
|
-
visibility: hidden;
|
|
573
|
-
}
|
|
574
|
-
.block-editor-block-tools__zoom-out-mode-inserter-button.is-visible {
|
|
575
|
-
visibility: visible;
|
|
557
|
+
.components-button.block-editor-button-pattern-inserter__button.block-editor-block-tools__zoom-out-mode-inserter-button {
|
|
558
|
+
top: -1px;
|
|
576
559
|
}
|
|
577
560
|
|
|
578
561
|
.block-editor-block-lock-modal {
|
|
@@ -1920,6 +1903,22 @@ iframe[name=editor-canvas] {
|
|
|
1920
1903
|
padding: 0;
|
|
1921
1904
|
}
|
|
1922
1905
|
|
|
1906
|
+
.block-editor-iframe__container {
|
|
1907
|
+
width: 100%;
|
|
1908
|
+
height: 100%;
|
|
1909
|
+
overflow-x: hidden;
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1912
|
+
.block-editor-iframe__scale-container {
|
|
1913
|
+
height: 100%;
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
.block-editor-iframe__scale-container.is-zoomed-out {
|
|
1917
|
+
width: var(--wp-block-editor-iframe-zoom-out-scale-container-width, 100vw);
|
|
1918
|
+
position: absolute;
|
|
1919
|
+
right: 0;
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1923
1922
|
.block-editor-image-size-control {
|
|
1924
1923
|
margin-bottom: 1em;
|
|
1925
1924
|
}
|
|
@@ -3062,10 +3061,14 @@ iframe[name=editor-canvas] {
|
|
|
3062
3061
|
margin-bottom: 8px;
|
|
3063
3062
|
box-shadow: none;
|
|
3064
3063
|
outline: none;
|
|
3064
|
+
border-radius: 2px;
|
|
3065
3065
|
}
|
|
3066
3066
|
.components-popover.block-editor-rich-text__inline-format-toolbar .components-toolbar {
|
|
3067
3067
|
border-radius: 2px;
|
|
3068
3068
|
}
|
|
3069
|
+
.components-popover.block-editor-rich-text__inline-format-toolbar .components-toolbar-group {
|
|
3070
|
+
background: none;
|
|
3071
|
+
}
|
|
3069
3072
|
.components-popover.block-editor-rich-text__inline-format-toolbar .components-toolbar__control,
|
|
3070
3073
|
.components-popover.block-editor-rich-text__inline-format-toolbar .components-dropdown-menu__toggle {
|
|
3071
3074
|
min-width: 48px;
|
|
@@ -3479,9 +3482,12 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
|
|
|
3479
3482
|
}
|
|
3480
3483
|
.block-editor-block-toolbar > :last-child,
|
|
3481
3484
|
.block-editor-block-toolbar > :last-child .components-toolbar-group,
|
|
3482
|
-
.block-editor-block-toolbar > :last-child .components-toolbar {
|
|
3485
|
+
.block-editor-block-toolbar > :last-child .components-toolbar, .block-editor-block-toolbar:has(> :last-child:empty) > :nth-last-child(2), .block-editor-block-toolbar:has(> :last-child:empty) > :nth-last-child(2) .components-toolbar-group, .block-editor-block-toolbar:has(> :last-child:empty) > :nth-last-child(2) .components-toolbar {
|
|
3483
3486
|
border-right: none;
|
|
3484
3487
|
}
|
|
3488
|
+
.block-editor-block-toolbar .components-toolbar-group:empty {
|
|
3489
|
+
display: none;
|
|
3490
|
+
}
|
|
3485
3491
|
|
|
3486
3492
|
.block-editor-block-contextual-toolbar {
|
|
3487
3493
|
position: sticky;
|
|
@@ -3776,6 +3782,7 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
|
|
|
3776
3782
|
}
|
|
3777
3783
|
|
|
3778
3784
|
.block-editor-inserter__panel-header {
|
|
3785
|
+
position: relative;
|
|
3779
3786
|
display: inline-flex;
|
|
3780
3787
|
align-items: center;
|
|
3781
3788
|
padding: 16px 16px 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-editor",
|
|
3
|
-
"version": "14.3.
|
|
3
|
+
"version": "14.3.7",
|
|
4
4
|
"description": "Generic block editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"@wordpress/api-fetch": "^7.8.2",
|
|
41
41
|
"@wordpress/blob": "^4.8.1",
|
|
42
42
|
"@wordpress/block-serialization-default-parser": "^5.8.1",
|
|
43
|
-
"@wordpress/blocks": "^13.8.
|
|
44
|
-
"@wordpress/commands": "^1.8.
|
|
45
|
-
"@wordpress/components": "^28.8.
|
|
43
|
+
"@wordpress/blocks": "^13.8.5",
|
|
44
|
+
"@wordpress/commands": "^1.8.7",
|
|
45
|
+
"@wordpress/components": "^28.8.7",
|
|
46
46
|
"@wordpress/compose": "^7.8.3",
|
|
47
47
|
"@wordpress/data": "^10.8.3",
|
|
48
48
|
"@wordpress/date": "^5.8.2",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@wordpress/keyboard-shortcuts": "^5.8.3",
|
|
59
59
|
"@wordpress/keycodes": "^4.8.2",
|
|
60
60
|
"@wordpress/notices": "^5.8.3",
|
|
61
|
-
"@wordpress/preferences": "^4.8.
|
|
61
|
+
"@wordpress/preferences": "^4.8.7",
|
|
62
62
|
"@wordpress/private-apis": "^1.8.1",
|
|
63
63
|
"@wordpress/rich-text": "^7.8.3",
|
|
64
64
|
"@wordpress/style-engine": "^2.8.1",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"publishConfig": {
|
|
89
89
|
"access": "public"
|
|
90
90
|
},
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "b1ace05ee94f0803e51b205306c19fc706499ede"
|
|
92
92
|
}
|
|
@@ -464,14 +464,15 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
464
464
|
display: flex;
|
|
465
465
|
align-items: center;
|
|
466
466
|
justify-content: center;
|
|
467
|
+
overflow: hidden;
|
|
467
468
|
font-size: $default-font-size;
|
|
468
469
|
font-family: $default-font;
|
|
469
470
|
color: $black;
|
|
470
471
|
font-weight: normal;
|
|
471
472
|
|
|
472
473
|
.is-zoomed-out & {
|
|
473
|
-
//
|
|
474
|
-
font-size: calc(#{$default-font-size}
|
|
474
|
+
// Maintains an absolute font-size by counter-scaling based on the zoom level.
|
|
475
|
+
font-size: calc(#{$default-font-size} / var(--wp-block-editor-iframe-zoom-out-scale));
|
|
475
476
|
}
|
|
476
477
|
|
|
477
478
|
&.is-dragged-over {
|
|
@@ -10,6 +10,7 @@ import { useRefEffect } from '@wordpress/compose';
|
|
|
10
10
|
* Internal dependencies
|
|
11
11
|
*/
|
|
12
12
|
import { store as blockEditorStore } from '../../../store';
|
|
13
|
+
import { unlock } from '../../../lock-unlock';
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* Adds block behaviour:
|
|
@@ -20,9 +21,18 @@ import { store as blockEditorStore } from '../../../store';
|
|
|
20
21
|
* @param {string} clientId Block client ID.
|
|
21
22
|
*/
|
|
22
23
|
export function useEventHandlers( { clientId, isSelected } ) {
|
|
23
|
-
const {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
const {
|
|
25
|
+
getBlockRootClientId,
|
|
26
|
+
getBlockIndex,
|
|
27
|
+
isZoomOut,
|
|
28
|
+
__unstableGetEditorMode,
|
|
29
|
+
} = unlock( useSelect( blockEditorStore ) );
|
|
30
|
+
const {
|
|
31
|
+
insertAfterBlock,
|
|
32
|
+
removeBlock,
|
|
33
|
+
__unstableSetEditorMode,
|
|
34
|
+
resetZoomLevel,
|
|
35
|
+
} = unlock( useDispatch( blockEditorStore ) );
|
|
26
36
|
|
|
27
37
|
return useRefEffect(
|
|
28
38
|
( node ) => {
|
|
@@ -56,7 +66,14 @@ export function useEventHandlers( { clientId, isSelected } ) {
|
|
|
56
66
|
|
|
57
67
|
event.preventDefault();
|
|
58
68
|
|
|
59
|
-
if (
|
|
69
|
+
if (
|
|
70
|
+
keyCode === ENTER &&
|
|
71
|
+
__unstableGetEditorMode() === 'zoom-out' &&
|
|
72
|
+
isZoomOut()
|
|
73
|
+
) {
|
|
74
|
+
__unstableSetEditorMode( 'edit' );
|
|
75
|
+
resetZoomLevel();
|
|
76
|
+
} else if ( keyCode === ENTER ) {
|
|
60
77
|
insertAfterBlock( clientId );
|
|
61
78
|
} else {
|
|
62
79
|
removeBlock( clientId );
|
|
@@ -88,6 +105,10 @@ export function useEventHandlers( { clientId, isSelected } ) {
|
|
|
88
105
|
getBlockIndex,
|
|
89
106
|
insertAfterBlock,
|
|
90
107
|
removeBlock,
|
|
108
|
+
__unstableGetEditorMode,
|
|
109
|
+
__unstableSetEditorMode,
|
|
110
|
+
isZoomOut,
|
|
111
|
+
resetZoomLevel,
|
|
91
112
|
]
|
|
92
113
|
);
|
|
93
114
|
}
|
|
@@ -85,14 +85,15 @@ export function ZoomOutSeparator( {
|
|
|
85
85
|
<AnimatePresence>
|
|
86
86
|
{ isVisible && (
|
|
87
87
|
<motion.div
|
|
88
|
-
as="button"
|
|
89
|
-
layout={ ! isReducedMotion }
|
|
90
88
|
initial={ { height: 0 } }
|
|
91
|
-
animate={ {
|
|
89
|
+
animate={ {
|
|
90
|
+
// Use a height equal to that of the zoom out frame size.
|
|
91
|
+
height: 'calc(1.5 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)',
|
|
92
|
+
} }
|
|
92
93
|
exit={ { height: 0 } }
|
|
93
94
|
transition={ {
|
|
94
95
|
type: 'tween',
|
|
95
|
-
duration: 0.2,
|
|
96
|
+
duration: isReducedMotion ? 0 : 0.2,
|
|
96
97
|
ease: [ 0.6, 0, 0.4, 1 ],
|
|
97
98
|
} }
|
|
98
99
|
className={ clsx(
|
|
@@ -108,10 +109,11 @@ export function ZoomOutSeparator( {
|
|
|
108
109
|
<motion.div
|
|
109
110
|
initial={ { opacity: 0 } }
|
|
110
111
|
animate={ { opacity: 1 } }
|
|
111
|
-
exit={ { opacity: 0 } }
|
|
112
|
+
exit={ { opacity: 0, transition: { delay: -0.125 } } }
|
|
112
113
|
transition={ {
|
|
113
|
-
|
|
114
|
+
ease: 'linear',
|
|
114
115
|
duration: 0.1,
|
|
116
|
+
delay: 0.125,
|
|
115
117
|
} }
|
|
116
118
|
>
|
|
117
119
|
{ __( 'Drop pattern.' ) }
|
|
@@ -98,10 +98,10 @@ function BlockPopover(
|
|
|
98
98
|
contextElement: selectedElement,
|
|
99
99
|
};
|
|
100
100
|
}, [
|
|
101
|
+
popoverDimensionsRecomputeCounter,
|
|
102
|
+
selectedElement,
|
|
101
103
|
bottomClientId,
|
|
102
104
|
lastSelectedElement,
|
|
103
|
-
selectedElement,
|
|
104
|
-
popoverDimensionsRecomputeCounter,
|
|
105
105
|
] );
|
|
106
106
|
|
|
107
107
|
if ( ! selectedElement || ( bottomClientId && ! lastSelectedElement ) ) {
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
isReusableBlock,
|
|
17
17
|
isTemplatePart,
|
|
18
18
|
} from '@wordpress/blocks';
|
|
19
|
-
import { ToolbarGroup } from '@wordpress/components';
|
|
19
|
+
import { ToolbarGroup, ToolbarButton } from '@wordpress/components';
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Internal dependencies
|
|
@@ -35,6 +35,8 @@ import { store as blockEditorStore } from '../../store';
|
|
|
35
35
|
import __unstableBlockNameContext from './block-name-context';
|
|
36
36
|
import NavigableToolbar from '../navigable-toolbar';
|
|
37
37
|
import { useHasBlockToolbar } from './use-has-block-toolbar';
|
|
38
|
+
import Shuffle from './shuffle';
|
|
39
|
+
import { unlock } from '../../lock-unlock';
|
|
38
40
|
|
|
39
41
|
/**
|
|
40
42
|
* Renders the block toolbar.
|
|
@@ -58,7 +60,6 @@ export function PrivateBlockToolbar( {
|
|
|
58
60
|
const {
|
|
59
61
|
blockClientId,
|
|
60
62
|
blockClientIds,
|
|
61
|
-
isContentOnlyEditingMode,
|
|
62
63
|
isDefaultEditingMode,
|
|
63
64
|
blockType,
|
|
64
65
|
toolbarKey,
|
|
@@ -67,6 +68,10 @@ export function PrivateBlockToolbar( {
|
|
|
67
68
|
isUsingBindings,
|
|
68
69
|
hasParentPattern,
|
|
69
70
|
hasContentOnlyLocking,
|
|
71
|
+
showShuffleButton,
|
|
72
|
+
showSlots,
|
|
73
|
+
showGroupButtons,
|
|
74
|
+
showLockButtons,
|
|
70
75
|
} = useSelect( ( select ) => {
|
|
71
76
|
const {
|
|
72
77
|
getBlockName,
|
|
@@ -78,7 +83,8 @@ export function PrivateBlockToolbar( {
|
|
|
78
83
|
getBlockAttributes,
|
|
79
84
|
getBlockParentsByBlockName,
|
|
80
85
|
getTemplateLock,
|
|
81
|
-
|
|
86
|
+
isZoomOutMode,
|
|
87
|
+
} = unlock( select( blockEditorStore ) );
|
|
82
88
|
const selectedBlockClientIds = getSelectedBlockClientIds();
|
|
83
89
|
const selectedBlockClientId = selectedBlockClientIds[ 0 ];
|
|
84
90
|
const parents = getBlockParents( selectedBlockClientId );
|
|
@@ -112,12 +118,12 @@ export function PrivateBlockToolbar( {
|
|
|
112
118
|
return {
|
|
113
119
|
blockClientId: selectedBlockClientId,
|
|
114
120
|
blockClientIds: selectedBlockClientIds,
|
|
115
|
-
isContentOnlyEditingMode: editingMode === 'contentOnly',
|
|
116
121
|
isDefaultEditingMode: _isDefaultEditingMode,
|
|
117
122
|
blockType: selectedBlockClientId && getBlockType( _blockName ),
|
|
118
123
|
shouldShowVisualToolbar: isValid && isVisual,
|
|
119
124
|
toolbarKey: `${ selectedBlockClientId }${ firstParentClientId }`,
|
|
120
125
|
showParentSelector:
|
|
126
|
+
! isZoomOutMode() &&
|
|
121
127
|
parentBlockType &&
|
|
122
128
|
getBlockEditingMode( firstParentClientId ) === 'default' &&
|
|
123
129
|
hasBlockSupport(
|
|
@@ -130,6 +136,10 @@ export function PrivateBlockToolbar( {
|
|
|
130
136
|
isUsingBindings: _isUsingBindings,
|
|
131
137
|
hasParentPattern: _hasParentPattern,
|
|
132
138
|
hasContentOnlyLocking: _hasTemplateLock,
|
|
139
|
+
showShuffleButton: isZoomOutMode(),
|
|
140
|
+
showSlots: ! isZoomOutMode(),
|
|
141
|
+
showGroupButtons: ! isZoomOutMode(),
|
|
142
|
+
showLockButtons: ! isZoomOutMode(),
|
|
133
143
|
};
|
|
134
144
|
}, [] );
|
|
135
145
|
|
|
@@ -179,13 +189,11 @@ export function PrivateBlockToolbar( {
|
|
|
179
189
|
key={ toolbarKey }
|
|
180
190
|
>
|
|
181
191
|
<div ref={ toolbarWrapperRef } className={ innerClasses }>
|
|
182
|
-
{ ! isMultiToolbar &&
|
|
183
|
-
|
|
184
|
-
|
|
192
|
+
{ showParentSelector && ! isMultiToolbar && isLargeViewport && (
|
|
193
|
+
<BlockParentSelector />
|
|
194
|
+
) }
|
|
185
195
|
{ ( shouldShowVisualToolbar || isMultiToolbar ) &&
|
|
186
|
-
|
|
187
|
-
( isContentOnlyEditingMode && ! hasParentPattern ) ||
|
|
188
|
-
isSynced ) && (
|
|
196
|
+
! hasParentPattern && (
|
|
189
197
|
<div
|
|
190
198
|
ref={ nodeRef }
|
|
191
199
|
{ ...showHoveredOrFocusedGestures }
|
|
@@ -196,26 +204,31 @@ export function PrivateBlockToolbar( {
|
|
|
196
204
|
disabled={ ! isDefaultEditingMode }
|
|
197
205
|
isUsingBindings={ isUsingBindings }
|
|
198
206
|
/>
|
|
199
|
-
{
|
|
200
|
-
|
|
201
|
-
{
|
|
202
|
-
|
|
203
|
-
clientId={ blockClientId }
|
|
204
|
-
/>
|
|
205
|
-
) }
|
|
206
|
-
<BlockMover
|
|
207
|
-
clientIds={ blockClientIds }
|
|
208
|
-
hideDragHandle={ hideDragHandle }
|
|
209
|
-
/>
|
|
210
|
-
</>
|
|
207
|
+
{ ! isMultiToolbar && showLockButtons && (
|
|
208
|
+
<BlockLockToolbar
|
|
209
|
+
clientId={ blockClientId }
|
|
210
|
+
/>
|
|
211
211
|
) }
|
|
212
|
+
<BlockMover
|
|
213
|
+
clientIds={ blockClientIds }
|
|
214
|
+
hideDragHandle={ hideDragHandle }
|
|
215
|
+
/>
|
|
212
216
|
</ToolbarGroup>
|
|
213
217
|
</div>
|
|
214
218
|
) }
|
|
215
219
|
{ ! hasContentOnlyLocking &&
|
|
216
220
|
shouldShowVisualToolbar &&
|
|
217
|
-
isMultiToolbar &&
|
|
218
|
-
|
|
221
|
+
isMultiToolbar &&
|
|
222
|
+
showGroupButtons && <BlockGroupToolbar /> }
|
|
223
|
+
{ showShuffleButton && (
|
|
224
|
+
<ToolbarGroup>
|
|
225
|
+
<Shuffle
|
|
226
|
+
clientId={ blockClientIds[ 0 ] }
|
|
227
|
+
as={ ToolbarButton }
|
|
228
|
+
/>
|
|
229
|
+
</ToolbarGroup>
|
|
230
|
+
) }
|
|
231
|
+
{ shouldShowVisualToolbar && showSlots && (
|
|
219
232
|
<>
|
|
220
233
|
<BlockControls.Slot
|
|
221
234
|
group="parent"
|
|
@@ -59,9 +59,18 @@
|
|
|
59
59
|
|
|
60
60
|
> :last-child,
|
|
61
61
|
> :last-child .components-toolbar-group,
|
|
62
|
-
> :last-child .components-toolbar
|
|
62
|
+
> :last-child .components-toolbar,
|
|
63
|
+
// If the last toolbar group is empty,
|
|
64
|
+
// we need to remove the double border from the penultimate one.
|
|
65
|
+
&:has(> :last-child:empty) > :nth-last-child(2),
|
|
66
|
+
&:has(> :last-child:empty) > :nth-last-child(2) .components-toolbar-group,
|
|
67
|
+
&:has(> :last-child:empty) > :nth-last-child(2) .components-toolbar {
|
|
63
68
|
border-right: none;
|
|
64
69
|
}
|
|
70
|
+
|
|
71
|
+
.components-toolbar-group:empty {
|
|
72
|
+
display: none;
|
|
73
|
+
}
|
|
65
74
|
}
|
|
66
75
|
|
|
67
76
|
.block-editor-block-contextual-toolbar {
|