@wordpress/block-editor 13.0.0 → 13.0.2
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-actions/index.js +4 -6
- package/build/components/block-actions/index.js.map +1 -1
- package/build/components/block-draggable/index.js +1 -1
- package/build/components/block-draggable/index.js.map +1 -1
- package/build/components/block-list/block.js +2 -2
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/block.native.js +2 -2
- package/build/components/block-list/block.native.js.map +1 -1
- package/build/components/block-list/use-in-between-inserter.js +3 -1
- package/build/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build/components/block-lock/use-block-lock.js +2 -4
- package/build/components/block-lock/use-block-lock.js.map +1 -1
- package/build/components/block-mover/index.js +1 -1
- package/build/components/block-mover/index.js.map +1 -1
- package/build/components/block-mover/index.native.js +1 -1
- package/build/components/block-mover/index.native.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-switcher/block-variation-transformations.js +1 -3
- package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
- package/build/components/block-switcher/index.js +13 -6
- package/build/components/block-switcher/index.js.map +1 -1
- package/build/components/block-toolbar/index.js +6 -10
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-tools/block-selection-button.js +2 -2
- package/build/components/block-tools/block-selection-button.js.map +1 -1
- package/build/components/button-block-appender/index.js +4 -1
- package/build/components/button-block-appender/index.js.map +1 -1
- package/build/components/global-styles/background-panel.js +3 -3
- package/build/components/global-styles/background-panel.js.map +1 -1
- package/build/components/global-styles/hooks.js +2 -2
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +14 -1
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/inserter/block-types-tab.js +3 -3
- package/build/components/inserter/block-types-tab.js.map +1 -1
- package/build/components/inserter/hooks/use-block-types-state.js +3 -2
- package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build/components/link-control/link-preview.js +1 -0
- package/build/components/link-control/link-preview.js.map +1 -1
- package/build/components/link-control/search-input.js +1 -1
- package/build/components/link-control/search-input.js.map +1 -1
- package/build/components/list-view/block.js +7 -6
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/branch.js +3 -1
- package/build/components/list-view/branch.js.map +1 -1
- package/build/components/list-view/use-clipboard-handler.js +1 -1
- package/build/components/list-view/use-clipboard-handler.js.map +1 -1
- package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js +9 -12
- package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
- package/build/components/use-block-commands/index.js +3 -3
- package/build/components/use-block-commands/index.js.map +1 -1
- package/build/components/writing-flow/use-clipboard-handler.js +22 -3
- package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
- package/build/hooks/block-bindings.js +19 -16
- package/build/hooks/block-bindings.js.map +1 -1
- package/build/hooks/block-style-variation.js +22 -4
- package/build/hooks/block-style-variation.js.map +1 -1
- package/build/hooks/use-bindings-attributes.js +7 -2
- package/build/hooks/use-bindings-attributes.js.map +1 -1
- package/build/hooks/utils.js +3 -2
- package/build/hooks/utils.js.map +1 -1
- package/build/lock-unlock.js +1 -1
- package/build/lock-unlock.js.map +1 -1
- package/build/private-apis.js +3 -1
- package/build/private-apis.js.map +1 -1
- package/build/store/actions.js +21 -5
- package/build/store/actions.js.map +1 -1
- package/build/store/private-actions.js +1 -2
- package/build/store/private-actions.js.map +1 -1
- package/build/store/selectors.js +19 -20
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/block-actions/index.js +4 -6
- package/build-module/components/block-actions/index.js.map +1 -1
- package/build-module/components/block-draggable/index.js +1 -1
- package/build-module/components/block-draggable/index.js.map +1 -1
- package/build-module/components/block-list/block.js +2 -2
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/block.native.js +2 -2
- package/build-module/components/block-list/block.native.js.map +1 -1
- package/build-module/components/block-list/use-in-between-inserter.js +3 -1
- package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build-module/components/block-lock/use-block-lock.js +2 -4
- package/build-module/components/block-lock/use-block-lock.js.map +1 -1
- package/build-module/components/block-mover/index.js +1 -1
- package/build-module/components/block-mover/index.js.map +1 -1
- package/build-module/components/block-mover/index.native.js +1 -1
- package/build-module/components/block-mover/index.native.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-switcher/block-variation-transformations.js +1 -3
- package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
- package/build-module/components/block-switcher/index.js +15 -8
- package/build-module/components/block-switcher/index.js.map +1 -1
- package/build-module/components/block-toolbar/index.js +7 -10
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-tools/block-selection-button.js +2 -2
- package/build-module/components/block-tools/block-selection-button.js.map +1 -1
- package/build-module/components/button-block-appender/index.js +4 -1
- package/build-module/components/button-block-appender/index.js.map +1 -1
- package/build-module/components/global-styles/background-panel.js +4 -4
- package/build-module/components/global-styles/background-panel.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +2 -2
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +14 -1
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.js +3 -3
- package/build-module/components/inserter/block-types-tab.js.map +1 -1
- package/build-module/components/inserter/hooks/use-block-types-state.js +4 -3
- package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build-module/components/link-control/link-preview.js +1 -0
- package/build-module/components/link-control/link-preview.js.map +1 -1
- package/build-module/components/link-control/search-input.js +1 -1
- package/build-module/components/link-control/search-input.js.map +1 -1
- package/build-module/components/list-view/block.js +7 -6
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/branch.js +3 -1
- package/build-module/components/list-view/branch.js.map +1 -1
- package/build-module/components/list-view/use-clipboard-handler.js +1 -1
- package/build-module/components/list-view/use-clipboard-handler.js.map +1 -1
- package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js +9 -12
- package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
- package/build-module/components/use-block-commands/index.js +3 -3
- package/build-module/components/use-block-commands/index.js.map +1 -1
- package/build-module/components/writing-flow/use-clipboard-handler.js +23 -4
- package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
- package/build-module/hooks/block-bindings.js +20 -17
- package/build-module/hooks/block-bindings.js.map +1 -1
- package/build-module/hooks/block-style-variation.js +21 -4
- package/build-module/hooks/block-style-variation.js.map +1 -1
- package/build-module/hooks/use-bindings-attributes.js +7 -2
- package/build-module/hooks/use-bindings-attributes.js.map +1 -1
- package/build-module/hooks/utils.js +3 -2
- package/build-module/hooks/utils.js.map +1 -1
- package/build-module/lock-unlock.js +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/private-apis.js +3 -1
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/actions.js +21 -5
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/private-actions.js +1 -2
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/selectors.js +19 -20
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/content-rtl.css +1 -1
- package/build-style/content.css +1 -1
- package/build-style/style-rtl.css +14 -19
- package/build-style/style.css +14 -19
- package/package.json +31 -31
- package/src/components/block-actions/index.js +3 -7
- package/src/components/block-canvas/style.scss +2 -2
- package/src/components/block-draggable/index.js +1 -1
- package/src/components/block-list/block.js +2 -2
- package/src/components/block-list/block.native.js +2 -2
- package/src/components/block-list/use-in-between-inserter.js +3 -1
- package/src/components/block-lock/use-block-lock.js +2 -4
- package/src/components/block-mover/index.js +1 -1
- package/src/components/block-mover/index.native.js +1 -1
- package/src/components/block-settings-menu/block-settings-dropdown.js +1 -1
- package/src/components/block-switcher/block-variation-transformations.js +4 -9
- package/src/components/block-switcher/index.js +27 -12
- package/src/components/block-switcher/style.scss +5 -0
- package/src/components/block-toolbar/index.js +7 -9
- package/src/components/block-toolbar/style.scss +9 -6
- package/src/components/block-tools/block-selection-button.js +2 -2
- package/src/components/block-variation-picker/content.scss +1 -1
- package/src/components/button-block-appender/index.js +2 -0
- package/src/components/global-styles/background-panel.js +13 -4
- package/src/components/global-styles/hooks.js +2 -4
- package/src/components/global-styles/use-global-styles-output.js +24 -4
- package/src/components/inserter/block-types-tab.js +0 -1
- package/src/components/inserter/hooks/use-block-types-state.js +10 -5
- package/src/components/inserter/style.scss +4 -0
- package/src/components/link-control/link-preview.js +1 -0
- package/src/components/link-control/search-input.js +1 -1
- package/src/components/list-view/block.js +7 -7
- package/src/components/list-view/branch.js +5 -1
- package/src/components/list-view/use-clipboard-handler.js +1 -6
- package/src/components/spacing-sizes-control/hooks/use-spacing-sizes.js +7 -4
- package/src/components/use-block-commands/index.js +3 -4
- package/src/components/writing-flow/use-clipboard-handler.js +29 -7
- package/src/hooks/block-bindings.js +28 -22
- package/src/hooks/block-style-variation.js +21 -4
- package/src/hooks/use-bindings-attributes.js +11 -1
- package/src/hooks/utils.js +3 -1
- package/src/lock-unlock.js +1 -1
- package/src/private-apis.js +2 -0
- package/src/store/actions.js +25 -11
- package/src/store/private-actions.js +1 -5
- package/src/store/selectors.js +22 -27
- package/src/style.scss +0 -1
- package/build/components/block-bindings-toolbar-indicator/index.js +0 -106
- package/build/components/block-bindings-toolbar-indicator/index.js.map +0 -1
- package/build-module/components/block-bindings-toolbar-indicator/index.js +0 -99
- package/build-module/components/block-bindings-toolbar-indicator/index.js.map +0 -1
- package/src/components/block-bindings-toolbar-indicator/index.js +0 -135
- package/src/components/block-bindings-toolbar-indicator/style.scss +0 -12
|
@@ -572,7 +572,7 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
572
572
|
.block-editor-block-variation-picker__variations svg,
|
|
573
573
|
.block-editor-block-variation-picker__skip svg,
|
|
574
574
|
.wp-block-group-placeholder__variations svg {
|
|
575
|
-
fill: #
|
|
575
|
+
fill: #949494 !important;
|
|
576
576
|
}
|
|
577
577
|
.block-editor-block-variation-picker__variations .components-button,
|
|
578
578
|
.block-editor-block-variation-picker__skip .components-button,
|
package/build-style/content.css
CHANGED
|
@@ -572,7 +572,7 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
572
572
|
.block-editor-block-variation-picker__variations svg,
|
|
573
573
|
.block-editor-block-variation-picker__skip svg,
|
|
574
574
|
.wp-block-group-placeholder__variations svg {
|
|
575
|
-
fill: #
|
|
575
|
+
fill: #949494 !important;
|
|
576
576
|
}
|
|
577
577
|
.block-editor-block-variation-picker__variations .components-button,
|
|
578
578
|
.block-editor-block-variation-picker__skip .components-button,
|
|
@@ -122,25 +122,12 @@
|
|
|
122
122
|
margin-top: 0;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
.block-editor-block-bindings-toolbar-indicator__popover .components-popover__content {
|
|
126
|
-
min-width: 260px;
|
|
127
|
-
padding: 16px;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.block-editor-block-bindings-toolbar-indicator .block-editor-block-bindings-toolbar-indicator-icon.has-colors svg {
|
|
131
|
-
fill: var(--wp-block-synced-color);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.editor-collapsible-block-toolbar .block-editor-block-bindings-toolbar-indicator {
|
|
135
|
-
height: 32px;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
125
|
iframe[name=editor-canvas] {
|
|
126
|
+
box-sizing: border-box;
|
|
139
127
|
width: 100%;
|
|
140
128
|
height: 100%;
|
|
141
129
|
display: block;
|
|
142
|
-
background-color:
|
|
143
|
-
box-sizing: border-box;
|
|
130
|
+
background-color: transparent;
|
|
144
131
|
}
|
|
145
132
|
|
|
146
133
|
.block-editor-block-icon {
|
|
@@ -1196,6 +1183,11 @@ iframe[name=editor-canvas] {
|
|
|
1196
1183
|
margin: 0;
|
|
1197
1184
|
}
|
|
1198
1185
|
|
|
1186
|
+
.block-editor-block-switcher__binding-indicator {
|
|
1187
|
+
display: block;
|
|
1188
|
+
padding: 8px;
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1199
1191
|
.block-editor-block-types-list > [role=presentation] {
|
|
1200
1192
|
overflow: hidden;
|
|
1201
1193
|
display: flex;
|
|
@@ -2895,8 +2887,7 @@ iframe[name=editor-canvas] {
|
|
|
2895
2887
|
.block-editor-responsive-block-control .components-base-control__help {
|
|
2896
2888
|
border: 0;
|
|
2897
2889
|
clip: rect(1px, 1px, 1px, 1px);
|
|
2898
|
-
|
|
2899
|
-
clip-path: inset(50%);
|
|
2890
|
+
clip-path: inset(50%);
|
|
2900
2891
|
height: 1px;
|
|
2901
2892
|
margin: -1px;
|
|
2902
2893
|
overflow: hidden;
|
|
@@ -3419,10 +3410,10 @@ iframe[name=editor-canvas] {
|
|
|
3419
3410
|
border: 0;
|
|
3420
3411
|
border-left: 1px solid #ddd;
|
|
3421
3412
|
}
|
|
3422
|
-
.block-editor-block-toolbar.is-synced .block-editor-block-switcher .components-button .block-editor-block-icon {
|
|
3413
|
+
.block-editor-block-toolbar.is-synced .block-editor-block-switcher .components-button .block-editor-block-icon, .block-editor-block-toolbar.is-connected .block-editor-block-switcher .components-button .block-editor-block-icon {
|
|
3423
3414
|
color: var(--wp-block-synced-color);
|
|
3424
3415
|
}
|
|
3425
|
-
.block-editor-block-toolbar.is-synced .components-toolbar-button.block-editor-block-switcher__no-switcher-icon:disabled .block-editor-block-icon.has-colors {
|
|
3416
|
+
.block-editor-block-toolbar.is-synced .components-toolbar-button.block-editor-block-switcher__no-switcher-icon:disabled .block-editor-block-icon.has-colors, .block-editor-block-toolbar.is-connected .components-toolbar-button.block-editor-block-switcher__no-switcher-icon:disabled .block-editor-block-icon.has-colors {
|
|
3426
3417
|
color: var(--wp-block-synced-color);
|
|
3427
3418
|
}
|
|
3428
3419
|
.block-editor-block-toolbar > :last-child,
|
|
@@ -3852,6 +3843,10 @@ iframe[name=editor-canvas] {
|
|
|
3852
3843
|
padding-bottom: 4px;
|
|
3853
3844
|
}
|
|
3854
3845
|
|
|
3846
|
+
.block-editor-inserter__insertable-blocks-at-selection {
|
|
3847
|
+
border-bottom: 1px solid #e0e0e0;
|
|
3848
|
+
}
|
|
3849
|
+
|
|
3855
3850
|
.block-editor-inserter__media-tabs-container,
|
|
3856
3851
|
.block-editor-inserter__block-patterns-tabs-container {
|
|
3857
3852
|
padding: 16px;
|
package/build-style/style.css
CHANGED
|
@@ -122,25 +122,12 @@
|
|
|
122
122
|
margin-top: 0;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
.block-editor-block-bindings-toolbar-indicator__popover .components-popover__content {
|
|
126
|
-
min-width: 260px;
|
|
127
|
-
padding: 16px;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.block-editor-block-bindings-toolbar-indicator .block-editor-block-bindings-toolbar-indicator-icon.has-colors svg {
|
|
131
|
-
fill: var(--wp-block-synced-color);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.editor-collapsible-block-toolbar .block-editor-block-bindings-toolbar-indicator {
|
|
135
|
-
height: 32px;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
125
|
iframe[name=editor-canvas] {
|
|
126
|
+
box-sizing: border-box;
|
|
139
127
|
width: 100%;
|
|
140
128
|
height: 100%;
|
|
141
129
|
display: block;
|
|
142
|
-
background-color:
|
|
143
|
-
box-sizing: border-box;
|
|
130
|
+
background-color: transparent;
|
|
144
131
|
}
|
|
145
132
|
|
|
146
133
|
.block-editor-block-icon {
|
|
@@ -1196,6 +1183,11 @@ iframe[name=editor-canvas] {
|
|
|
1196
1183
|
margin: 0;
|
|
1197
1184
|
}
|
|
1198
1185
|
|
|
1186
|
+
.block-editor-block-switcher__binding-indicator {
|
|
1187
|
+
display: block;
|
|
1188
|
+
padding: 8px;
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1199
1191
|
.block-editor-block-types-list > [role=presentation] {
|
|
1200
1192
|
overflow: hidden;
|
|
1201
1193
|
display: flex;
|
|
@@ -2896,8 +2888,7 @@ iframe[name=editor-canvas] {
|
|
|
2896
2888
|
.block-editor-responsive-block-control .components-base-control__help {
|
|
2897
2889
|
border: 0;
|
|
2898
2890
|
clip: rect(1px, 1px, 1px, 1px);
|
|
2899
|
-
|
|
2900
|
-
clip-path: inset(50%);
|
|
2891
|
+
clip-path: inset(50%);
|
|
2901
2892
|
height: 1px;
|
|
2902
2893
|
margin: -1px;
|
|
2903
2894
|
overflow: hidden;
|
|
@@ -3420,10 +3411,10 @@ iframe[name=editor-canvas] {
|
|
|
3420
3411
|
border: 0;
|
|
3421
3412
|
border-right: 1px solid #ddd;
|
|
3422
3413
|
}
|
|
3423
|
-
.block-editor-block-toolbar.is-synced .block-editor-block-switcher .components-button .block-editor-block-icon {
|
|
3414
|
+
.block-editor-block-toolbar.is-synced .block-editor-block-switcher .components-button .block-editor-block-icon, .block-editor-block-toolbar.is-connected .block-editor-block-switcher .components-button .block-editor-block-icon {
|
|
3424
3415
|
color: var(--wp-block-synced-color);
|
|
3425
3416
|
}
|
|
3426
|
-
.block-editor-block-toolbar.is-synced .components-toolbar-button.block-editor-block-switcher__no-switcher-icon:disabled .block-editor-block-icon.has-colors {
|
|
3417
|
+
.block-editor-block-toolbar.is-synced .components-toolbar-button.block-editor-block-switcher__no-switcher-icon:disabled .block-editor-block-icon.has-colors, .block-editor-block-toolbar.is-connected .components-toolbar-button.block-editor-block-switcher__no-switcher-icon:disabled .block-editor-block-icon.has-colors {
|
|
3427
3418
|
color: var(--wp-block-synced-color);
|
|
3428
3419
|
}
|
|
3429
3420
|
.block-editor-block-toolbar > :last-child,
|
|
@@ -3853,6 +3844,10 @@ iframe[name=editor-canvas] {
|
|
|
3853
3844
|
padding-bottom: 4px;
|
|
3854
3845
|
}
|
|
3855
3846
|
|
|
3847
|
+
.block-editor-inserter__insertable-blocks-at-selection {
|
|
3848
|
+
border-bottom: 1px solid #e0e0e0;
|
|
3849
|
+
}
|
|
3850
|
+
|
|
3856
3851
|
.block-editor-inserter__media-tabs-container,
|
|
3857
3852
|
.block-editor-inserter__block-patterns-tabs-container {
|
|
3858
3853
|
padding: 16px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-editor",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.2",
|
|
4
4
|
"description": "Generic block editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -36,35 +36,35 @@
|
|
|
36
36
|
"@emotion/react": "^11.7.1",
|
|
37
37
|
"@emotion/styled": "^11.6.0",
|
|
38
38
|
"@react-spring/web": "^9.4.5",
|
|
39
|
-
"@wordpress/a11y": "^4.0.
|
|
40
|
-
"@wordpress/api-fetch": "^7.0.
|
|
41
|
-
"@wordpress/blob": "^4.0.
|
|
42
|
-
"@wordpress/blocks": "^13.0.
|
|
43
|
-
"@wordpress/commands": "^1.0.
|
|
44
|
-
"@wordpress/components": "^28.0.
|
|
45
|
-
"@wordpress/compose": "^7.0.
|
|
46
|
-
"@wordpress/data": "^10.0.
|
|
47
|
-
"@wordpress/date": "^5.0.
|
|
48
|
-
"@wordpress/deprecated": "^4.0.
|
|
49
|
-
"@wordpress/dom": "^4.0.
|
|
50
|
-
"@wordpress/element": "^6.0.
|
|
51
|
-
"@wordpress/escape-html": "^3.0.
|
|
52
|
-
"@wordpress/hooks": "^4.0.
|
|
53
|
-
"@wordpress/html-entities": "^4.0.
|
|
54
|
-
"@wordpress/i18n": "^5.0.
|
|
55
|
-
"@wordpress/icons": "^10.0.
|
|
56
|
-
"@wordpress/is-shallow-equal": "^5.0.
|
|
57
|
-
"@wordpress/keyboard-shortcuts": "^5.0.
|
|
58
|
-
"@wordpress/keycodes": "^4.0.
|
|
59
|
-
"@wordpress/notices": "^5.0.
|
|
60
|
-
"@wordpress/preferences": "^4.0.
|
|
61
|
-
"@wordpress/private-apis": "^1.0.
|
|
62
|
-
"@wordpress/rich-text": "^7.0.
|
|
63
|
-
"@wordpress/style-engine": "^2.0.
|
|
64
|
-
"@wordpress/token-list": "^3.0.
|
|
65
|
-
"@wordpress/url": "^4.0.
|
|
66
|
-
"@wordpress/warning": "^3.0.
|
|
67
|
-
"@wordpress/wordcount": "^4.0.
|
|
39
|
+
"@wordpress/a11y": "^4.0.1",
|
|
40
|
+
"@wordpress/api-fetch": "^7.0.1",
|
|
41
|
+
"@wordpress/blob": "^4.0.1",
|
|
42
|
+
"@wordpress/blocks": "^13.0.2",
|
|
43
|
+
"@wordpress/commands": "^1.0.2",
|
|
44
|
+
"@wordpress/components": "^28.0.2",
|
|
45
|
+
"@wordpress/compose": "^7.0.1",
|
|
46
|
+
"@wordpress/data": "^10.0.2",
|
|
47
|
+
"@wordpress/date": "^5.0.1",
|
|
48
|
+
"@wordpress/deprecated": "^4.0.1",
|
|
49
|
+
"@wordpress/dom": "^4.0.1",
|
|
50
|
+
"@wordpress/element": "^6.0.1",
|
|
51
|
+
"@wordpress/escape-html": "^3.0.1",
|
|
52
|
+
"@wordpress/hooks": "^4.0.1",
|
|
53
|
+
"@wordpress/html-entities": "^4.0.1",
|
|
54
|
+
"@wordpress/i18n": "^5.0.1",
|
|
55
|
+
"@wordpress/icons": "^10.0.1",
|
|
56
|
+
"@wordpress/is-shallow-equal": "^5.0.1",
|
|
57
|
+
"@wordpress/keyboard-shortcuts": "^5.0.2",
|
|
58
|
+
"@wordpress/keycodes": "^4.0.1",
|
|
59
|
+
"@wordpress/notices": "^5.0.2",
|
|
60
|
+
"@wordpress/preferences": "^4.0.2",
|
|
61
|
+
"@wordpress/private-apis": "^1.0.2",
|
|
62
|
+
"@wordpress/rich-text": "^7.0.2",
|
|
63
|
+
"@wordpress/style-engine": "^2.0.2",
|
|
64
|
+
"@wordpress/token-list": "^3.0.1",
|
|
65
|
+
"@wordpress/url": "^4.0.1",
|
|
66
|
+
"@wordpress/warning": "^3.0.1",
|
|
67
|
+
"@wordpress/wordcount": "^4.0.1",
|
|
68
68
|
"change-case": "^4.1.2",
|
|
69
69
|
"clsx": "^2.1.1",
|
|
70
70
|
"colord": "^2.7.0",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "a68c6b5ef53956cccf4961d53d79b6af7e00ae60"
|
|
90
90
|
}
|
|
@@ -31,12 +31,10 @@ export default function BlockActions( {
|
|
|
31
31
|
getDirectInsertBlock,
|
|
32
32
|
canMoveBlocks,
|
|
33
33
|
canRemoveBlocks,
|
|
34
|
-
getBlockEditingMode,
|
|
35
34
|
} = select( blockEditorStore );
|
|
36
35
|
|
|
37
36
|
const blocks = getBlocksByClientId( clientIds );
|
|
38
37
|
const rootClientId = getBlockRootClientId( clientIds[ 0 ] );
|
|
39
|
-
const rootBlockEditingMode = getBlockEditingMode( rootClientId );
|
|
40
38
|
const canInsertDefaultBlock = canInsertBlockType(
|
|
41
39
|
getDefaultBlockName(),
|
|
42
40
|
rootClientId
|
|
@@ -46,11 +44,9 @@ export default function BlockActions( {
|
|
|
46
44
|
: null;
|
|
47
45
|
|
|
48
46
|
return {
|
|
49
|
-
canMove: canMoveBlocks( clientIds
|
|
50
|
-
canRemove: canRemoveBlocks( clientIds
|
|
51
|
-
canInsertBlock:
|
|
52
|
-
( canInsertDefaultBlock || !! directInsertBlock ) &&
|
|
53
|
-
rootBlockEditingMode === 'default',
|
|
47
|
+
canMove: canMoveBlocks( clientIds ),
|
|
48
|
+
canRemove: canRemoveBlocks( clientIds ),
|
|
49
|
+
canInsertBlock: canInsertDefaultBlock || !! directInsertBlock,
|
|
54
50
|
canCopyStyles: blocks.every( ( block ) => {
|
|
55
51
|
return (
|
|
56
52
|
!! block &&
|
|
@@ -53,7 +53,7 @@ const BlockDraggable = ( {
|
|
|
53
53
|
|
|
54
54
|
return {
|
|
55
55
|
srcRootClientId: rootClientId,
|
|
56
|
-
isDraggable: canMoveBlocks( clientIds
|
|
56
|
+
isDraggable: canMoveBlocks( clientIds ),
|
|
57
57
|
icon: variation?.icon || _getBlockType( blockName )?.icon,
|
|
58
58
|
visibleInserter: isBlockInsertionPointVisible(),
|
|
59
59
|
getBlockType: _getBlockType,
|
|
@@ -623,8 +623,8 @@ function BlockListBlockProvider( props ) {
|
|
|
623
623
|
}
|
|
624
624
|
|
|
625
625
|
const _isSelected = isBlockSelected( clientId );
|
|
626
|
-
const canRemove = canRemoveBlock( clientId
|
|
627
|
-
const canMove = canMoveBlock( clientId
|
|
626
|
+
const canRemove = canRemoveBlock( clientId );
|
|
627
|
+
const canMove = canMoveBlock( clientId );
|
|
628
628
|
const match = getActiveBlockVariation( blockName, attributes );
|
|
629
629
|
const isMultiSelected = isBlockMultiSelected( clientId );
|
|
630
630
|
const checkDeep = true;
|
|
@@ -432,8 +432,8 @@ const applyWithSelect = withSelect( ( select, { clientId, rootClientId } ) => {
|
|
|
432
432
|
const attributes = getBlockAttributes( clientId );
|
|
433
433
|
const isSelected = isBlockSelected( clientId );
|
|
434
434
|
const templateLock = getTemplateLock( rootClientId );
|
|
435
|
-
const canRemove = canRemoveBlock( clientId
|
|
436
|
-
const canMove = canMoveBlock( clientId
|
|
435
|
+
const canRemove = canRemoveBlock( clientId );
|
|
436
|
+
const canMove = canMoveBlock( clientId );
|
|
437
437
|
|
|
438
438
|
// The fallback to `{}` is a temporary fix.
|
|
439
439
|
// This function should never be called when a block is not present in
|
|
@@ -40,7 +40,9 @@ export function useInBetweenInserter() {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
function onMouseMove( event ) {
|
|
43
|
-
|
|
43
|
+
// openRef is the reference to the insertion point between blocks.
|
|
44
|
+
// If the reference is not set or the insertion point is already open, return.
|
|
45
|
+
if ( openRef === undefined || openRef.current ) {
|
|
44
46
|
return;
|
|
45
47
|
}
|
|
46
48
|
|
|
@@ -24,14 +24,12 @@ export default function useBlockLock( clientId ) {
|
|
|
24
24
|
canRemoveBlock,
|
|
25
25
|
canLockBlockType,
|
|
26
26
|
getBlockName,
|
|
27
|
-
getBlockRootClientId,
|
|
28
27
|
getTemplateLock,
|
|
29
28
|
} = select( blockEditorStore );
|
|
30
|
-
const rootClientId = getBlockRootClientId( clientId );
|
|
31
29
|
|
|
32
30
|
const canEdit = canEditBlock( clientId );
|
|
33
|
-
const canMove = canMoveBlock( clientId
|
|
34
|
-
const canRemove = canRemoveBlock( clientId
|
|
31
|
+
const canMove = canMoveBlock( clientId );
|
|
32
|
+
const canRemove = canRemoveBlock( clientId );
|
|
35
33
|
|
|
36
34
|
return {
|
|
37
35
|
canEdit,
|
|
@@ -46,7 +46,7 @@ function BlockMover( {
|
|
|
46
46
|
const blockOrder = getBlockOrder( _rootClientId );
|
|
47
47
|
|
|
48
48
|
return {
|
|
49
|
-
canMove: canMoveBlocks( clientIds
|
|
49
|
+
canMove: canMoveBlocks( clientIds ),
|
|
50
50
|
rootClientId: _rootClientId,
|
|
51
51
|
isFirst: firstIndex === 0,
|
|
52
52
|
isLast: lastIndex === blockOrder.length - 1,
|
|
@@ -166,7 +166,7 @@ export default compose(
|
|
|
166
166
|
numberOfBlocks: blockOrder.length - 1,
|
|
167
167
|
isFirst: firstIndex === 0,
|
|
168
168
|
isLast: lastIndex === blockOrder.length - 1,
|
|
169
|
-
canMove: canMoveBlocks( clientIds
|
|
169
|
+
canMove: canMoveBlocks( clientIds ),
|
|
170
170
|
rootClientId,
|
|
171
171
|
};
|
|
172
172
|
} ),
|
|
@@ -22,17 +22,12 @@ const EMPTY_OBJECT = {};
|
|
|
22
22
|
export function useBlockVariationTransforms( { clientIds, blocks } ) {
|
|
23
23
|
const { activeBlockVariation, blockVariationTransformations } = useSelect(
|
|
24
24
|
( select ) => {
|
|
25
|
-
const {
|
|
26
|
-
|
|
27
|
-
getBlockAttributes,
|
|
28
|
-
canRemoveBlocks,
|
|
29
|
-
} = select( blockEditorStore );
|
|
25
|
+
const { getBlockAttributes, canRemoveBlocks } =
|
|
26
|
+
select( blockEditorStore );
|
|
30
27
|
const { getActiveBlockVariation, getBlockVariations } =
|
|
31
28
|
select( blocksStore );
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
);
|
|
35
|
-
const canRemove = canRemoveBlocks( clientIds, rootClientId );
|
|
29
|
+
|
|
30
|
+
const canRemove = canRemoveBlocks( clientIds );
|
|
36
31
|
// Only handle single selected blocks for now.
|
|
37
32
|
if ( blocks.length !== 1 || ! canRemove ) {
|
|
38
33
|
return EMPTY_OBJECT;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { __, _n, sprintf } from '@wordpress/i18n';
|
|
4
|
+
import { __, _n, sprintf, _x } from '@wordpress/i18n';
|
|
5
5
|
import {
|
|
6
6
|
DropdownMenu,
|
|
7
7
|
ToolbarButton,
|
|
8
8
|
ToolbarGroup,
|
|
9
9
|
ToolbarItem,
|
|
10
|
+
__experimentalText as Text,
|
|
11
|
+
MenuGroup,
|
|
10
12
|
} from '@wordpress/components';
|
|
11
13
|
import {
|
|
12
14
|
switchToBlockType,
|
|
@@ -33,6 +35,7 @@ function BlockSwitcherDropdownMenuContents( {
|
|
|
33
35
|
clientIds,
|
|
34
36
|
hasBlockStyles,
|
|
35
37
|
canRemove,
|
|
38
|
+
isUsingBindings,
|
|
36
39
|
} ) {
|
|
37
40
|
const { replaceBlocks, multiSelect, updateBlockAttributes } =
|
|
38
41
|
useDispatch( blockEditorStore );
|
|
@@ -118,6 +121,17 @@ function BlockSwitcherDropdownMenuContents( {
|
|
|
118
121
|
</p>
|
|
119
122
|
);
|
|
120
123
|
}
|
|
124
|
+
|
|
125
|
+
const connectedBlockDescription = isSingleBlock
|
|
126
|
+
? _x(
|
|
127
|
+
'This block is connected.',
|
|
128
|
+
'block toolbar button label and description'
|
|
129
|
+
)
|
|
130
|
+
: _x(
|
|
131
|
+
'These blocks are connected.',
|
|
132
|
+
'block toolbar button label and description'
|
|
133
|
+
);
|
|
134
|
+
|
|
121
135
|
return (
|
|
122
136
|
<div className="block-editor-block-switcher__container">
|
|
123
137
|
{ hasPatternTransformation && (
|
|
@@ -156,11 +170,18 @@ function BlockSwitcherDropdownMenuContents( {
|
|
|
156
170
|
onSwitch={ onClose }
|
|
157
171
|
/>
|
|
158
172
|
) }
|
|
173
|
+
{ isUsingBindings && (
|
|
174
|
+
<MenuGroup>
|
|
175
|
+
<Text className="block-editor-block-switcher__binding-indicator">
|
|
176
|
+
{ connectedBlockDescription }
|
|
177
|
+
</Text>
|
|
178
|
+
</MenuGroup>
|
|
179
|
+
) }
|
|
159
180
|
</div>
|
|
160
181
|
);
|
|
161
182
|
}
|
|
162
183
|
|
|
163
|
-
export const BlockSwitcher = ( { clientIds, disabled } ) => {
|
|
184
|
+
export const BlockSwitcher = ( { clientIds, disabled, isUsingBindings } ) => {
|
|
164
185
|
const {
|
|
165
186
|
canRemove,
|
|
166
187
|
hasBlockStyles,
|
|
@@ -170,21 +191,14 @@ export const BlockSwitcher = ( { clientIds, disabled } ) => {
|
|
|
170
191
|
isTemplate,
|
|
171
192
|
} = useSelect(
|
|
172
193
|
( select ) => {
|
|
173
|
-
const {
|
|
174
|
-
|
|
175
|
-
getBlocksByClientId,
|
|
176
|
-
getBlockAttributes,
|
|
177
|
-
canRemoveBlocks,
|
|
178
|
-
} = select( blockEditorStore );
|
|
194
|
+
const { getBlocksByClientId, getBlockAttributes, canRemoveBlocks } =
|
|
195
|
+
select( blockEditorStore );
|
|
179
196
|
const { getBlockStyles, getBlockType, getActiveBlockVariation } =
|
|
180
197
|
select( blocksStore );
|
|
181
198
|
const _blocks = getBlocksByClientId( clientIds );
|
|
182
199
|
if ( ! _blocks.length || _blocks.some( ( block ) => ! block ) ) {
|
|
183
200
|
return { invalidBlocks: true };
|
|
184
201
|
}
|
|
185
|
-
const rootClientId = getBlockRootClientId(
|
|
186
|
-
Array.isArray( clientIds ) ? clientIds[ 0 ] : clientIds
|
|
187
|
-
);
|
|
188
202
|
const [ { name: firstBlockName } ] = _blocks;
|
|
189
203
|
const _isSingleBlockSelected = _blocks.length === 1;
|
|
190
204
|
const blockType = getBlockType( firstBlockName );
|
|
@@ -206,7 +220,7 @@ export const BlockSwitcher = ( { clientIds, disabled } ) => {
|
|
|
206
220
|
}
|
|
207
221
|
|
|
208
222
|
return {
|
|
209
|
-
canRemove: canRemoveBlocks( clientIds
|
|
223
|
+
canRemove: canRemoveBlocks( clientIds ),
|
|
210
224
|
hasBlockStyles:
|
|
211
225
|
_isSingleBlockSelected &&
|
|
212
226
|
!! getBlockStyles( firstBlockName )?.length,
|
|
@@ -303,6 +317,7 @@ export const BlockSwitcher = ( { clientIds, disabled } ) => {
|
|
|
303
317
|
clientIds={ clientIds }
|
|
304
318
|
hasBlockStyles={ hasBlockStyles }
|
|
305
319
|
canRemove={ canRemove }
|
|
320
|
+
isUsingBindings={ isUsingBindings }
|
|
306
321
|
/>
|
|
307
322
|
) }
|
|
308
323
|
</DropdownMenu>
|
|
@@ -35,9 +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 Shuffle from './shuffle';
|
|
38
|
-
import BlockBindingsIndicator from '../block-bindings-toolbar-indicator';
|
|
39
38
|
import { useHasBlockToolbar } from './use-has-block-toolbar';
|
|
40
|
-
|
|
39
|
+
|
|
41
40
|
/**
|
|
42
41
|
* Renders the block toolbar.
|
|
43
42
|
*
|
|
@@ -62,7 +61,6 @@ export function PrivateBlockToolbar( {
|
|
|
62
61
|
blockClientIds,
|
|
63
62
|
isDefaultEditingMode,
|
|
64
63
|
blockType,
|
|
65
|
-
blockName,
|
|
66
64
|
toolbarKey,
|
|
67
65
|
shouldShowVisualToolbar,
|
|
68
66
|
showParentSelector,
|
|
@@ -94,13 +92,14 @@ export function PrivateBlockToolbar( {
|
|
|
94
92
|
const isVisual = selectedBlockClientIds.every(
|
|
95
93
|
( id ) => getBlockMode( id ) === 'visual'
|
|
96
94
|
);
|
|
97
|
-
const _isUsingBindings =
|
|
98
|
-
|
|
95
|
+
const _isUsingBindings = selectedBlockClientIds.every(
|
|
96
|
+
( clientId ) =>
|
|
97
|
+
!! getBlockAttributes( clientId )?.metadata?.bindings
|
|
98
|
+
);
|
|
99
99
|
return {
|
|
100
100
|
blockClientId: selectedBlockClientId,
|
|
101
101
|
blockClientIds: selectedBlockClientIds,
|
|
102
102
|
isDefaultEditingMode: _isDefaultEditingMode,
|
|
103
|
-
blockName: _blockName,
|
|
104
103
|
blockType: selectedBlockClientId && getBlockType( _blockName ),
|
|
105
104
|
shouldShowVisualToolbar: isValid && isVisual,
|
|
106
105
|
rootClientId: blockRootClientId,
|
|
@@ -146,6 +145,7 @@ export function PrivateBlockToolbar( {
|
|
|
146
145
|
|
|
147
146
|
const innerClasses = clsx( 'block-editor-block-toolbar', {
|
|
148
147
|
'is-synced': isSynced,
|
|
148
|
+
'is-connected': isUsingBindings,
|
|
149
149
|
} );
|
|
150
150
|
|
|
151
151
|
return (
|
|
@@ -167,9 +167,6 @@ export function PrivateBlockToolbar( {
|
|
|
167
167
|
{ ! isMultiToolbar &&
|
|
168
168
|
isLargeViewport &&
|
|
169
169
|
isDefaultEditingMode && <BlockParentSelector /> }
|
|
170
|
-
{ isUsingBindings && canBindBlock( blockName ) && (
|
|
171
|
-
<BlockBindingsIndicator clientIds={ blockClientIds } />
|
|
172
|
-
) }
|
|
173
170
|
{ ( shouldShowVisualToolbar || isMultiToolbar ) &&
|
|
174
171
|
( isDefaultEditingMode || isSynced ) && (
|
|
175
172
|
<div
|
|
@@ -180,6 +177,7 @@ export function PrivateBlockToolbar( {
|
|
|
180
177
|
<BlockSwitcher
|
|
181
178
|
clientIds={ blockClientIds }
|
|
182
179
|
disabled={ ! isDefaultEditingMode }
|
|
180
|
+
isUsingBindings={ isUsingBindings }
|
|
183
181
|
/>
|
|
184
182
|
{ isDefaultEditingMode && (
|
|
185
183
|
<>
|
|
@@ -39,14 +39,17 @@
|
|
|
39
39
|
border-right: $border-width solid $gray-300;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
&.is-synced
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
&.is-synced .components-toolbar-button.block-editor-block-switcher__no-switcher-icon {
|
|
47
|
-
&:disabled .block-editor-block-icon.has-colors {
|
|
42
|
+
&.is-synced,
|
|
43
|
+
&.is-connected {
|
|
44
|
+
.block-editor-block-switcher .components-button .block-editor-block-icon {
|
|
48
45
|
color: var(--wp-block-synced-color);
|
|
49
46
|
}
|
|
47
|
+
|
|
48
|
+
.components-toolbar-button.block-editor-block-switcher__no-switcher-icon {
|
|
49
|
+
&:disabled .block-editor-block-icon.has-colors {
|
|
50
|
+
color: var(--wp-block-synced-color);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
> :last-child,
|
|
@@ -107,8 +107,8 @@ function BlockSelectionButton( { clientId, rootClientId } ) {
|
|
|
107
107
|
isBlockTemplatePart,
|
|
108
108
|
isNextBlockTemplatePart,
|
|
109
109
|
isPrevBlockTemplatePart,
|
|
110
|
-
canRemove: canRemoveBlock( clientId
|
|
111
|
-
canMove: canMoveBlock( clientId
|
|
110
|
+
canRemove: canRemoveBlock( clientId ),
|
|
111
|
+
canMove: canMoveBlock( clientId ),
|
|
112
112
|
};
|
|
113
113
|
},
|
|
114
114
|
[ clientId, rootClientId ]
|
|
@@ -60,6 +60,8 @@ function ButtonBlockAppender(
|
|
|
60
60
|
onClick={ onToggle }
|
|
61
61
|
aria-haspopup={ isToggleButton ? 'true' : undefined }
|
|
62
62
|
aria-expanded={ isToggleButton ? isOpen : undefined }
|
|
63
|
+
// Disable reason: There shouldn't be a case where this button is disabled but not visually hidden.
|
|
64
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
63
65
|
disabled={ disabled }
|
|
64
66
|
label={ label }
|
|
65
67
|
>
|