@wordpress/block-editor 12.8.0 → 12.9.0
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/CHANGELOG.md +6 -0
- package/README.md +30 -12
- package/build/components/block-controls/slot.js +1 -1
- package/build/components/block-controls/slot.js.map +1 -1
- package/build/components/block-controls/slot.native.js +1 -1
- package/build/components/block-controls/slot.native.js.map +1 -1
- package/build/components/block-controls/use-has-block-controls.js +1 -1
- package/build/components/block-controls/use-has-block-controls.js.map +1 -1
- package/build/components/block-list/block-outline.native.js +4 -3
- package/build/components/block-list/block-outline.native.js.map +1 -1
- package/build/components/block-list/index.js +4 -3
- package/build/components/block-list/index.js.map +1 -1
- package/build/components/block-list/use-block-props/index.js +27 -1
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list/use-block-props/use-nav-mode-exit.js +1 -1
- package/build/components/block-list/use-block-props/use-nav-mode-exit.js.map +1 -1
- package/build/components/block-lock/menu-item.js +3 -1
- package/build/components/block-lock/menu-item.js.map +1 -1
- package/build/components/block-lock/toolbar.js +3 -1
- package/build/components/block-lock/toolbar.js.map +1 -1
- package/build/components/block-popover/inbetween.js +4 -5
- package/build/components/block-popover/inbetween.js.map +1 -1
- package/build/components/block-popover/index.js +3 -2
- package/build/components/block-popover/index.js.map +1 -1
- package/build/components/color-style-selector/index.js +1 -1
- package/build/components/color-style-selector/index.js.map +1 -1
- package/build/components/iframe/index.js +1 -0
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/inserter/reusable-blocks-tab.native.js +7 -4
- package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
- package/build/components/inserter/search-results.native.js +10 -8
- package/build/components/inserter/search-results.native.js.map +1 -1
- package/build/components/inspector-controls/fill.js +1 -1
- package/build/components/inspector-controls/fill.js.map +1 -1
- package/build/components/inspector-controls/fill.native.js +1 -1
- package/build/components/inspector-controls/fill.native.js.map +1 -1
- package/build/components/inspector-controls/slot.js +1 -1
- package/build/components/inspector-controls/slot.js.map +1 -1
- package/build/components/inspector-controls/slot.native.js +1 -1
- package/build/components/inspector-controls/slot.native.js.map +1 -1
- package/build/components/link-control/index.js +1 -7
- package/build/components/link-control/index.js.map +1 -1
- package/build/components/list-view/block-select-button.js +48 -7
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/list-view/drop-indicator.js +3 -3
- package/build/components/list-view/drop-indicator.js.map +1 -1
- package/build/components/list-view/index.js +14 -8
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/list-view/use-list-view-images.js +5 -4
- package/build/components/list-view/use-list-view-images.js.map +1 -1
- package/build/components/preview-options/index.js +3 -1
- package/build/components/preview-options/index.js.map +1 -1
- package/build/components/provider/index.js +3 -1
- package/build/components/provider/index.js.map +1 -1
- package/build/components/rich-text/use-remove-browser-shortcuts.js +1 -1
- package/build/components/rich-text/use-remove-browser-shortcuts.js.map +1 -1
- package/build/components/use-block-commands/index.js +74 -63
- package/build/components/use-block-commands/index.js.map +1 -1
- package/build/components/warning/index.js +1 -1
- package/build/components/warning/index.js.map +1 -1
- package/build/hooks/auto-inserting-blocks.js +174 -0
- package/build/hooks/auto-inserting-blocks.js.map +1 -0
- package/build/hooks/index.js +1 -0
- package/build/hooks/index.js.map +1 -1
- package/build/store/selectors.js +1 -1
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/block-controls/slot.js +1 -1
- package/build-module/components/block-controls/slot.js.map +1 -1
- package/build-module/components/block-controls/slot.native.js +1 -1
- package/build-module/components/block-controls/slot.native.js.map +1 -1
- package/build-module/components/block-controls/use-has-block-controls.js +1 -1
- package/build-module/components/block-controls/use-has-block-controls.js.map +1 -1
- package/build-module/components/block-list/block-outline.native.js +4 -3
- package/build-module/components/block-list/block-outline.native.js.map +1 -1
- package/build-module/components/block-list/index.js +4 -3
- package/build-module/components/block-list/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.js +27 -1
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js +1 -1
- package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js.map +1 -1
- package/build-module/components/block-lock/menu-item.js +3 -1
- package/build-module/components/block-lock/menu-item.js.map +1 -1
- package/build-module/components/block-lock/toolbar.js +3 -1
- package/build-module/components/block-lock/toolbar.js.map +1 -1
- package/build-module/components/block-popover/inbetween.js +4 -5
- package/build-module/components/block-popover/inbetween.js.map +1 -1
- package/build-module/components/block-popover/index.js +3 -2
- package/build-module/components/block-popover/index.js.map +1 -1
- package/build-module/components/color-style-selector/index.js +1 -1
- package/build-module/components/color-style-selector/index.js.map +1 -1
- package/build-module/components/iframe/index.js +1 -0
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/inserter/reusable-blocks-tab.native.js +8 -4
- package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
- package/build-module/components/inserter/search-results.native.js +11 -8
- package/build-module/components/inserter/search-results.native.js.map +1 -1
- package/build-module/components/inspector-controls/fill.js +1 -1
- package/build-module/components/inspector-controls/fill.js.map +1 -1
- package/build-module/components/inspector-controls/fill.native.js +1 -1
- package/build-module/components/inspector-controls/fill.native.js.map +1 -1
- package/build-module/components/inspector-controls/slot.js +1 -1
- package/build-module/components/inspector-controls/slot.js.map +1 -1
- package/build-module/components/inspector-controls/slot.native.js +1 -1
- package/build-module/components/inspector-controls/slot.native.js.map +1 -1
- package/build-module/components/link-control/index.js +1 -7
- package/build-module/components/link-control/index.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +48 -7
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/list-view/drop-indicator.js +3 -3
- package/build-module/components/list-view/drop-indicator.js.map +1 -1
- package/build-module/components/list-view/index.js +14 -8
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/list-view/use-list-view-images.js +5 -4
- package/build-module/components/list-view/use-list-view-images.js.map +1 -1
- package/build-module/components/preview-options/index.js +3 -1
- package/build-module/components/preview-options/index.js.map +1 -1
- package/build-module/components/provider/index.js +3 -1
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/rich-text/use-remove-browser-shortcuts.js +1 -1
- package/build-module/components/rich-text/use-remove-browser-shortcuts.js.map +1 -1
- package/build-module/components/use-block-commands/index.js +74 -63
- package/build-module/components/use-block-commands/index.js.map +1 -1
- package/build-module/components/warning/index.js +2 -2
- package/build-module/components/warning/index.js.map +1 -1
- package/build-module/hooks/auto-inserting-blocks.js +167 -0
- package/build-module/hooks/auto-inserting-blocks.js.map +1 -0
- package/build-module/hooks/index.js +1 -0
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/store/selectors.js +1 -1
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/content-rtl.css +8 -7
- package/build-style/content.css +8 -7
- package/build-style/style-rtl.css +0 -3
- package/build-style/style.css +0 -3
- package/package.json +32 -32
- package/src/components/block-icon/test/index.js +2 -2
- package/src/components/block-list/block-outline.native.js +5 -2
- package/src/components/block-list/content.scss +2 -3
- package/src/components/block-list/index.js +4 -3
- package/src/components/block-list/use-block-props/index.js +26 -0
- package/src/components/block-list/use-block-props/use-nav-mode-exit.js +1 -1
- package/src/components/block-lock/menu-item.js +2 -0
- package/src/components/block-lock/toolbar.js +3 -1
- package/src/components/block-popover/inbetween.js +4 -3
- package/src/components/block-popover/index.js +3 -2
- package/src/components/block-styles/style.scss +0 -3
- package/src/components/button-block-appender/content.scss +8 -0
- package/src/components/color-style-selector/index.js +1 -1
- package/src/components/iframe/index.js +1 -0
- package/src/components/inserter/reusable-blocks-tab.native.js +7 -2
- package/src/components/inserter/search-results.native.js +13 -9
- package/src/components/link-control/index.js +1 -5
- package/src/components/link-control/test/index.js +1 -0
- package/src/components/list-view/block-select-button.js +67 -15
- package/src/components/list-view/drop-indicator.js +4 -5
- package/src/components/list-view/index.js +19 -13
- package/src/components/list-view/use-list-view-images.js +8 -4
- package/src/components/observe-typing/README.md +2 -2
- package/src/components/preview-options/index.js +2 -0
- package/src/components/provider/index.js +8 -1
- package/src/components/rich-text/use-remove-browser-shortcuts.js +1 -1
- package/src/components/use-block-commands/index.js +92 -88
- package/src/components/warning/index.js +2 -2
- package/src/hooks/auto-inserting-blocks.js +232 -0
- package/src/hooks/index.js +1 -0
- package/src/store/selectors.js +1 -1
- package/build/utils/pre-parse-patterns.js +0 -68
- package/build/utils/pre-parse-patterns.js.map +0 -1
- package/build-module/utils/pre-parse-patterns.js +0 -61
- package/build-module/utils/pre-parse-patterns.js.map +0 -1
- package/src/components/url-popover/test/__snapshots__/index.js.snap +0 -133
- package/src/components/url-popover/test/index.js +0 -75
- package/src/utils/pre-parse-patterns.js +0 -69
|
@@ -181,12 +181,12 @@
|
|
|
181
181
|
box-shadow: none;
|
|
182
182
|
}
|
|
183
183
|
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted,
|
|
184
|
-
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected, .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected,
|
|
184
|
+
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected, .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected,
|
|
185
185
|
.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus {
|
|
186
186
|
outline: none;
|
|
187
187
|
}
|
|
188
188
|
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted::after,
|
|
189
|
-
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected::after, .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected::after,
|
|
189
|
+
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected::after, .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected::after,
|
|
190
190
|
.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus::after {
|
|
191
191
|
content: "";
|
|
192
192
|
position: absolute;
|
|
@@ -201,14 +201,10 @@
|
|
|
201
201
|
outline: 2px solid transparent;
|
|
202
202
|
}
|
|
203
203
|
.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted::after,
|
|
204
|
-
.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected::after, .is-dark-theme .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected::after,
|
|
204
|
+
.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected::after, .is-dark-theme .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected::after,
|
|
205
205
|
.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus::after {
|
|
206
206
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) #fff;
|
|
207
207
|
}
|
|
208
|
-
.block-editor-block-list__layout .is-block-moving-mode.block-editor-block-list__block.is-selected {
|
|
209
|
-
box-shadow: none;
|
|
210
|
-
outline: none;
|
|
211
|
-
}
|
|
212
208
|
.block-editor-block-list__layout .is-block-moving-mode.block-editor-block-list__block.is-selected::after {
|
|
213
209
|
content: "";
|
|
214
210
|
position: absolute;
|
|
@@ -220,6 +216,8 @@
|
|
|
220
216
|
top: -14px;
|
|
221
217
|
border-radius: 2px;
|
|
222
218
|
border-top: 4px solid #ccc;
|
|
219
|
+
bottom: auto;
|
|
220
|
+
box-shadow: none;
|
|
223
221
|
}
|
|
224
222
|
.block-editor-block-list__layout .is-block-moving-mode.can-insert-moving-block.block-editor-block-list__block.is-selected::after {
|
|
225
223
|
border-color: var(--wp-admin-theme-color);
|
|
@@ -675,6 +673,9 @@
|
|
|
675
673
|
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child.is-drag-over .block-editor-inserter, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child.is-drag-over .block-editor-inserter, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child.is-drag-over .block-editor-inserter, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child.is-drag-over .block-editor-inserter {
|
|
676
674
|
visibility: visible;
|
|
677
675
|
}
|
|
676
|
+
.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__block > .block-list-appender:only-child::after {
|
|
677
|
+
border: none;
|
|
678
|
+
}
|
|
678
679
|
.block-list-appender:only-child.is-drag-over .block-editor-button-block-appender {
|
|
679
680
|
background-color: var(--wp-admin-theme-color);
|
|
680
681
|
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
|
package/build-style/content.css
CHANGED
|
@@ -181,12 +181,12 @@
|
|
|
181
181
|
box-shadow: none;
|
|
182
182
|
}
|
|
183
183
|
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted,
|
|
184
|
-
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected, .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected,
|
|
184
|
+
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected, .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected,
|
|
185
185
|
.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus {
|
|
186
186
|
outline: none;
|
|
187
187
|
}
|
|
188
188
|
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted::after,
|
|
189
|
-
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected::after, .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected::after,
|
|
189
|
+
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected::after, .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected::after,
|
|
190
190
|
.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus::after {
|
|
191
191
|
content: "";
|
|
192
192
|
position: absolute;
|
|
@@ -201,14 +201,10 @@
|
|
|
201
201
|
outline: 2px solid transparent;
|
|
202
202
|
}
|
|
203
203
|
.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted::after,
|
|
204
|
-
.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected::after, .is-dark-theme .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected::after,
|
|
204
|
+
.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected::after, .is-dark-theme .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected::after,
|
|
205
205
|
.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus::after {
|
|
206
206
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) #fff;
|
|
207
207
|
}
|
|
208
|
-
.block-editor-block-list__layout .is-block-moving-mode.block-editor-block-list__block.is-selected {
|
|
209
|
-
box-shadow: none;
|
|
210
|
-
outline: none;
|
|
211
|
-
}
|
|
212
208
|
.block-editor-block-list__layout .is-block-moving-mode.block-editor-block-list__block.is-selected::after {
|
|
213
209
|
content: "";
|
|
214
210
|
position: absolute;
|
|
@@ -220,6 +216,8 @@
|
|
|
220
216
|
top: -14px;
|
|
221
217
|
border-radius: 2px;
|
|
222
218
|
border-top: 4px solid #ccc;
|
|
219
|
+
bottom: auto;
|
|
220
|
+
box-shadow: none;
|
|
223
221
|
}
|
|
224
222
|
.block-editor-block-list__layout .is-block-moving-mode.can-insert-moving-block.block-editor-block-list__block.is-selected::after {
|
|
225
223
|
border-color: var(--wp-admin-theme-color);
|
|
@@ -675,6 +673,9 @@
|
|
|
675
673
|
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child.is-drag-over .block-editor-inserter, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child.is-drag-over .block-editor-inserter, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child.is-drag-over .block-editor-inserter, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child.is-drag-over .block-editor-inserter {
|
|
676
674
|
visibility: visible;
|
|
677
675
|
}
|
|
676
|
+
.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__block > .block-list-appender:only-child::after {
|
|
677
|
+
border: none;
|
|
678
|
+
}
|
|
678
679
|
.block-list-appender:only-child.is-drag-over .block-editor-button-block-appender {
|
|
679
680
|
background-color: var(--wp-admin-theme-color);
|
|
680
681
|
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
|
|
@@ -1072,9 +1072,6 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
1072
1072
|
|
|
1073
1073
|
.block-editor-block-styles__preview-panel {
|
|
1074
1074
|
display: none;
|
|
1075
|
-
position: absolute;
|
|
1076
|
-
left: 16px;
|
|
1077
|
-
right: auto;
|
|
1078
1075
|
z-index: 90;
|
|
1079
1076
|
}
|
|
1080
1077
|
@media (min-width: 782px) {
|
package/build-style/style.css
CHANGED
|
@@ -1072,9 +1072,6 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
1072
1072
|
|
|
1073
1073
|
.block-editor-block-styles__preview-panel {
|
|
1074
1074
|
display: none;
|
|
1075
|
-
position: absolute;
|
|
1076
|
-
right: 16px;
|
|
1077
|
-
left: auto;
|
|
1078
1075
|
z-index: 90;
|
|
1079
1076
|
}
|
|
1080
1077
|
@media (min-width: 782px) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-editor",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.9.0",
|
|
4
4
|
"description": "Generic block editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -35,36 +35,36 @@
|
|
|
35
35
|
"@emotion/react": "^11.7.1",
|
|
36
36
|
"@emotion/styled": "^11.6.0",
|
|
37
37
|
"@react-spring/web": "^9.4.5",
|
|
38
|
-
"@wordpress/a11y": "^3.
|
|
39
|
-
"@wordpress/api-fetch": "^6.
|
|
40
|
-
"@wordpress/blob": "^3.
|
|
41
|
-
"@wordpress/blocks": "^12.
|
|
42
|
-
"@wordpress/commands": "^0.
|
|
43
|
-
"@wordpress/components": "^25.
|
|
44
|
-
"@wordpress/compose": "^6.
|
|
45
|
-
"@wordpress/data": "^9.
|
|
46
|
-
"@wordpress/date": "^4.
|
|
47
|
-
"@wordpress/deprecated": "^3.
|
|
48
|
-
"@wordpress/dom": "^3.
|
|
49
|
-
"@wordpress/element": "^5.
|
|
50
|
-
"@wordpress/escape-html": "^2.
|
|
51
|
-
"@wordpress/hooks": "^3.
|
|
52
|
-
"@wordpress/html-entities": "^3.
|
|
53
|
-
"@wordpress/i18n": "^4.
|
|
54
|
-
"@wordpress/icons": "^9.
|
|
55
|
-
"@wordpress/is-shallow-equal": "^4.
|
|
56
|
-
"@wordpress/keyboard-shortcuts": "^4.
|
|
57
|
-
"@wordpress/keycodes": "^3.
|
|
58
|
-
"@wordpress/notices": "^4.
|
|
59
|
-
"@wordpress/preferences": "^3.
|
|
60
|
-
"@wordpress/private-apis": "^0.
|
|
61
|
-
"@wordpress/rich-text": "^6.
|
|
62
|
-
"@wordpress/shortcode": "^3.
|
|
63
|
-
"@wordpress/style-engine": "^1.
|
|
64
|
-
"@wordpress/token-list": "^2.
|
|
65
|
-
"@wordpress/url": "^3.
|
|
66
|
-
"@wordpress/warning": "^2.
|
|
67
|
-
"@wordpress/wordcount": "^3.
|
|
38
|
+
"@wordpress/a11y": "^3.41.0",
|
|
39
|
+
"@wordpress/api-fetch": "^6.38.0",
|
|
40
|
+
"@wordpress/blob": "^3.41.0",
|
|
41
|
+
"@wordpress/blocks": "^12.18.0",
|
|
42
|
+
"@wordpress/commands": "^0.12.0",
|
|
43
|
+
"@wordpress/components": "^25.7.0",
|
|
44
|
+
"@wordpress/compose": "^6.18.0",
|
|
45
|
+
"@wordpress/data": "^9.11.0",
|
|
46
|
+
"@wordpress/date": "^4.41.0",
|
|
47
|
+
"@wordpress/deprecated": "^3.41.0",
|
|
48
|
+
"@wordpress/dom": "^3.41.0",
|
|
49
|
+
"@wordpress/element": "^5.18.0",
|
|
50
|
+
"@wordpress/escape-html": "^2.41.0",
|
|
51
|
+
"@wordpress/hooks": "^3.41.0",
|
|
52
|
+
"@wordpress/html-entities": "^3.41.0",
|
|
53
|
+
"@wordpress/i18n": "^4.41.0",
|
|
54
|
+
"@wordpress/icons": "^9.32.0",
|
|
55
|
+
"@wordpress/is-shallow-equal": "^4.41.0",
|
|
56
|
+
"@wordpress/keyboard-shortcuts": "^4.18.0",
|
|
57
|
+
"@wordpress/keycodes": "^3.41.0",
|
|
58
|
+
"@wordpress/notices": "^4.9.0",
|
|
59
|
+
"@wordpress/preferences": "^3.18.0",
|
|
60
|
+
"@wordpress/private-apis": "^0.23.0",
|
|
61
|
+
"@wordpress/rich-text": "^6.18.0",
|
|
62
|
+
"@wordpress/shortcode": "^3.41.0",
|
|
63
|
+
"@wordpress/style-engine": "^1.24.0",
|
|
64
|
+
"@wordpress/token-list": "^2.41.0",
|
|
65
|
+
"@wordpress/url": "^3.42.0",
|
|
66
|
+
"@wordpress/warning": "^2.41.0",
|
|
67
|
+
"@wordpress/wordcount": "^3.41.0",
|
|
68
68
|
"change-case": "^4.1.2",
|
|
69
69
|
"classnames": "^2.3.1",
|
|
70
70
|
"colord": "^2.7.0",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "5eac1734bcdca2301fdd37ec8cfe2a45e722a2c4"
|
|
90
90
|
}
|
|
@@ -13,7 +13,7 @@ import { usePreferredColorSchemeStyle } from '@wordpress/compose';
|
|
|
13
13
|
*/
|
|
14
14
|
import styles from './block.scss';
|
|
15
15
|
|
|
16
|
-
const
|
|
16
|
+
const TEXT_BLOCKS_WITH_OUTLINE = [ 'core/missing' ];
|
|
17
17
|
|
|
18
18
|
function BlockOutline( {
|
|
19
19
|
blockCategory,
|
|
@@ -22,7 +22,9 @@ function BlockOutline( {
|
|
|
22
22
|
isSelected,
|
|
23
23
|
name,
|
|
24
24
|
} ) {
|
|
25
|
-
const textBlockWithOutline =
|
|
25
|
+
const textBlockWithOutline = TEXT_BLOCKS_WITH_OUTLINE.includes( name );
|
|
26
|
+
const socialBlockWithOutline = name.includes( 'core/social-link' );
|
|
27
|
+
|
|
26
28
|
const hasBlockTextCategory =
|
|
27
29
|
blockCategory === 'text' && ! textBlockWithOutline;
|
|
28
30
|
const hasBlockMediaCategory =
|
|
@@ -47,6 +49,7 @@ function BlockOutline( {
|
|
|
47
49
|
( ( hasBlockTextCategory && hasInnerBlocks ) ||
|
|
48
50
|
( ! hasBlockTextCategory && hasInnerBlocks ) ||
|
|
49
51
|
( ! hasBlockTextCategory && isRootList ) ||
|
|
52
|
+
socialBlockWithOutline ||
|
|
50
53
|
textBlockWithOutline );
|
|
51
54
|
|
|
52
55
|
return (
|
|
@@ -85,7 +85,6 @@
|
|
|
85
85
|
.block-editor-block-list__block.is-highlighted,
|
|
86
86
|
.block-editor-block-list__block.is-highlighted ~ .is-multi-selected,
|
|
87
87
|
&.is-navigate-mode .block-editor-block-list__block.is-selected,
|
|
88
|
-
& .is-block-moving-mode.block-editor-block-list__block.has-child-selected,
|
|
89
88
|
.block-editor-block-list__block:not([contenteditable]):focus {
|
|
90
89
|
outline: none;
|
|
91
90
|
|
|
@@ -113,8 +112,6 @@
|
|
|
113
112
|
|
|
114
113
|
// Moving blocks using keyboard (Ellipsis > Move).
|
|
115
114
|
& .is-block-moving-mode.block-editor-block-list__block.is-selected {
|
|
116
|
-
box-shadow: none;
|
|
117
|
-
outline: none;
|
|
118
115
|
|
|
119
116
|
&::after {
|
|
120
117
|
content: "";
|
|
@@ -130,6 +127,8 @@
|
|
|
130
127
|
top: -$default-block-margin * 0.5;
|
|
131
128
|
border-radius: $radius-block-ui;
|
|
132
129
|
border-top: 4px solid $gray-400;
|
|
130
|
+
bottom: auto;
|
|
131
|
+
box-shadow: none;
|
|
133
132
|
}
|
|
134
133
|
}
|
|
135
134
|
|
|
@@ -31,7 +31,6 @@ import BlockListBlock from './block';
|
|
|
31
31
|
import BlockListAppender from '../block-list-appender';
|
|
32
32
|
import { useInBetweenInserter } from './use-in-between-inserter';
|
|
33
33
|
import { store as blockEditorStore } from '../../store';
|
|
34
|
-
import { usePreParsePatterns } from '../../utils/pre-parse-patterns';
|
|
35
34
|
import { LayoutProvider, defaultLayout } from './layout';
|
|
36
35
|
import { useBlockSelectionClearer } from '../block-selection-clearer';
|
|
37
36
|
import { useInnerBlocksProps } from '../inner-blocks';
|
|
@@ -39,6 +38,7 @@ import {
|
|
|
39
38
|
BlockEditContextProvider,
|
|
40
39
|
DEFAULT_BLOCK_EDIT_CONTEXT,
|
|
41
40
|
} from '../block-edit/context';
|
|
41
|
+
import { useTypingObserver } from '../observe-typing';
|
|
42
42
|
|
|
43
43
|
const elementContext = createContext();
|
|
44
44
|
|
|
@@ -104,7 +104,7 @@ function Root( { className, ...settings } ) {
|
|
|
104
104
|
ref: useMergeRefs( [
|
|
105
105
|
useBlockSelectionClearer(),
|
|
106
106
|
useInBetweenInserter(),
|
|
107
|
-
|
|
107
|
+
useTypingObserver(),
|
|
108
108
|
] ),
|
|
109
109
|
className: classnames( 'is-root-container', className, {
|
|
110
110
|
'is-outline-mode': isOutlineMode,
|
|
@@ -118,13 +118,14 @@ function Root( { className, ...settings } ) {
|
|
|
118
118
|
<elementContext.Provider value={ element }>
|
|
119
119
|
<IntersectionObserver.Provider value={ intersectionObserver }>
|
|
120
120
|
<div { ...innerBlocksProps } />
|
|
121
|
+
{ /* Ensure element and layout styles are always at the end of the document */ }
|
|
122
|
+
<div ref={ setElement } />
|
|
121
123
|
</IntersectionObserver.Provider>
|
|
122
124
|
</elementContext.Provider>
|
|
123
125
|
);
|
|
124
126
|
}
|
|
125
127
|
|
|
126
128
|
export default function BlockList( settings ) {
|
|
127
|
-
usePreParsePatterns();
|
|
128
129
|
return (
|
|
129
130
|
<BlockEditContextProvider value={ DEFAULT_BLOCK_EDIT_CONTEXT }>
|
|
130
131
|
<Root { ...settings } />
|
|
@@ -53,6 +53,32 @@ const BLOCK_ANIMATION_THRESHOLD = 200;
|
|
|
53
53
|
* also pass any other props through this hook, and they will be merged and
|
|
54
54
|
* returned.
|
|
55
55
|
*
|
|
56
|
+
* Use of this hook on the outermost element of a block is required if using API >= v2.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```js
|
|
60
|
+
* import { useBlockProps } from '@wordpress/block-editor';
|
|
61
|
+
*
|
|
62
|
+
* export default function Edit() {
|
|
63
|
+
*
|
|
64
|
+
* const blockProps = useBlockProps(
|
|
65
|
+
* className: 'my-custom-class',
|
|
66
|
+
* style: {
|
|
67
|
+
* color: '#222222',
|
|
68
|
+
* backgroundColor: '#eeeeee'
|
|
69
|
+
* }
|
|
70
|
+
* )
|
|
71
|
+
*
|
|
72
|
+
* return (
|
|
73
|
+
* <div { ...blockProps }>
|
|
74
|
+
*
|
|
75
|
+
* </div>
|
|
76
|
+
* )
|
|
77
|
+
* }
|
|
78
|
+
*
|
|
79
|
+
* ```
|
|
80
|
+
*
|
|
81
|
+
*
|
|
56
82
|
* @param {Object} props Optional. Props to pass to the element. Must contain
|
|
57
83
|
* the ref if one is defined.
|
|
58
84
|
* @param {Object} options Options for internal use only.
|
|
@@ -38,7 +38,7 @@ export function useNavModeExit( clientId ) {
|
|
|
38
38
|
node.addEventListener( 'mousedown', onMouseDown );
|
|
39
39
|
|
|
40
40
|
return () => {
|
|
41
|
-
node.
|
|
41
|
+
node.removeEventListener( 'mousedown', onMouseDown );
|
|
42
42
|
};
|
|
43
43
|
},
|
|
44
44
|
[ clientId, isNavigationMode, isBlockSelected, setNavigationMode ]
|
|
@@ -59,10 +59,12 @@ export default function BlockLockToolbar( { clientId, wrapperRef } ) {
|
|
|
59
59
|
<>
|
|
60
60
|
<ToolbarGroup className="block-editor-block-lock-toolbar">
|
|
61
61
|
<ToolbarButton
|
|
62
|
+
ref={ lockButtonRef }
|
|
62
63
|
icon={ lock }
|
|
63
64
|
label={ __( 'Unlock' ) }
|
|
64
65
|
onClick={ toggleModal }
|
|
65
|
-
|
|
66
|
+
aria-expanded={ isModalOpen }
|
|
67
|
+
aria-haspopup="dialog"
|
|
66
68
|
/>
|
|
67
69
|
</ToolbarGroup>
|
|
68
70
|
{ isModalOpen && (
|
|
@@ -81,10 +81,10 @@ function BlockPopoverInbetween( {
|
|
|
81
81
|
return undefined;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
const
|
|
84
|
+
const contextElement = previousElement || nextElement;
|
|
85
85
|
|
|
86
86
|
return {
|
|
87
|
-
|
|
87
|
+
contextElement,
|
|
88
88
|
getBoundingClientRect() {
|
|
89
89
|
const previousRect = previousElement
|
|
90
90
|
? previousElement.getBoundingClientRect()
|
|
@@ -215,7 +215,8 @@ function BlockPopoverInbetween( {
|
|
|
215
215
|
focusOnMount={ false }
|
|
216
216
|
// Render in the old slot if needed for backward compatibility,
|
|
217
217
|
// otherwise render in place (not in the default popover slot).
|
|
218
|
-
__unstableSlotName={ __unstablePopoverSlot
|
|
218
|
+
__unstableSlotName={ __unstablePopoverSlot }
|
|
219
|
+
inline={ ! __unstablePopoverSlot }
|
|
219
220
|
// Forces a remount of the popover when its position changes
|
|
220
221
|
// This makes sure the popover doesn't animate from its previous position.
|
|
221
222
|
key={ nextClientId + '--' + rootClientId }
|
|
@@ -142,7 +142,7 @@ function BlockPopover(
|
|
|
142
142
|
|
|
143
143
|
return new window.DOMRect( left, top, width, height );
|
|
144
144
|
},
|
|
145
|
-
|
|
145
|
+
contextElement: selectedElement,
|
|
146
146
|
};
|
|
147
147
|
}, [
|
|
148
148
|
bottomClientId,
|
|
@@ -163,7 +163,8 @@ function BlockPopover(
|
|
|
163
163
|
anchor={ popoverAnchor }
|
|
164
164
|
// Render in the old slot if needed for backward compatibility,
|
|
165
165
|
// otherwise render in place (not in the default popover slot).
|
|
166
|
-
__unstableSlotName={ __unstablePopoverSlot
|
|
166
|
+
__unstableSlotName={ __unstablePopoverSlot }
|
|
167
|
+
inline={ ! __unstablePopoverSlot }
|
|
167
168
|
placement="top-start"
|
|
168
169
|
resize={ false }
|
|
169
170
|
flip={ false }
|
|
@@ -4,9 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
.block-editor-block-styles__preview-panel {
|
|
6
6
|
display: none;
|
|
7
|
-
position: absolute;
|
|
8
|
-
right: $grid-unit-20;
|
|
9
|
-
left: auto;
|
|
10
7
|
// Same layer as the sidebar from which it's triggered.
|
|
11
8
|
z-index: z-index(".interface-interface-skeleton__sidebar {greater than small}");
|
|
12
9
|
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
|
|
36
36
|
// When the appender shows up in empty container blocks, such as Group and Columns, add an extra click state.
|
|
37
37
|
.block-list-appender:only-child {
|
|
38
|
+
// One level of nesting
|
|
38
39
|
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > &,
|
|
39
40
|
.is-layout-flow.block-editor-block-list__block:not(.is-selected) > &,
|
|
40
41
|
// Legacy groups have an inner container so need to be targeted separately
|
|
@@ -69,6 +70,13 @@
|
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
72
|
|
|
73
|
+
// Hide the dashed outline in 2-level nested cases, so for example the dashed
|
|
74
|
+
// empty column is only shown when the columns block is selected.
|
|
75
|
+
.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__block > &::after {
|
|
76
|
+
border: none;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Drop zone.
|
|
72
80
|
&.is-drag-over .block-editor-button-block-appender {
|
|
73
81
|
background-color: var(--wp-admin-theme-color);
|
|
74
82
|
box-shadow: inset 0 0 0 $border-width $light-gray-placeholder;
|
|
@@ -13,7 +13,7 @@ import { DOWN } from '@wordpress/keycodes';
|
|
|
13
13
|
import deprecated from '@wordpress/deprecated';
|
|
14
14
|
|
|
15
15
|
const ColorSelectorSVGIcon = () => (
|
|
16
|
-
<SVG xmlns="
|
|
16
|
+
<SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
|
|
17
17
|
<Path d="M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z" />
|
|
18
18
|
</SVG>
|
|
19
19
|
);
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { useSelect } from '@wordpress/data';
|
|
5
5
|
import { __ } from '@wordpress/i18n';
|
|
6
|
+
import { useMemo } from '@wordpress/element';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Internal dependencies
|
|
@@ -12,18 +13,22 @@ import { store as blockEditorStore } from '../../store';
|
|
|
12
13
|
import { createInserterSection, filterInserterItems } from './utils';
|
|
13
14
|
|
|
14
15
|
function ReusableBlocksTab( { onSelect, rootClientId, listProps } ) {
|
|
15
|
-
const {
|
|
16
|
+
const { inserterItems } = useSelect(
|
|
16
17
|
( select ) => {
|
|
17
18
|
const { getInserterItems } = select( blockEditorStore );
|
|
18
19
|
const allItems = getInserterItems( rootClientId );
|
|
19
20
|
|
|
20
21
|
return {
|
|
21
|
-
|
|
22
|
+
inserterItems: allItems,
|
|
22
23
|
};
|
|
23
24
|
},
|
|
24
25
|
[ rootClientId ]
|
|
25
26
|
);
|
|
26
27
|
|
|
28
|
+
const items = useMemo( () => {
|
|
29
|
+
return filterInserterItems( inserterItems, { onlyReusable: true } );
|
|
30
|
+
}, [ inserterItems ] );
|
|
31
|
+
|
|
27
32
|
const sections = [ createInserterSection( { key: 'reuseable', items } ) ];
|
|
28
33
|
|
|
29
34
|
return (
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { useSelect } from '@wordpress/data';
|
|
5
5
|
import { __ } from '@wordpress/i18n';
|
|
6
|
+
import { useMemo } from '@wordpress/element';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Internal dependencies
|
|
@@ -21,21 +22,24 @@ function InserterSearchResults( {
|
|
|
21
22
|
rootClientId,
|
|
22
23
|
isFullScreen,
|
|
23
24
|
} ) {
|
|
24
|
-
const {
|
|
25
|
+
const { inserterItems } = useSelect(
|
|
25
26
|
( select ) => {
|
|
26
|
-
const
|
|
27
|
+
const items =
|
|
27
28
|
select( blockEditorStore ).getInserterItems( rootClientId );
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
allowReusable: true,
|
|
31
|
-
} );
|
|
32
|
-
const filteredItems = searchItems( availableItems, filterValue );
|
|
33
|
-
|
|
34
|
-
return { blockTypes: filteredItems };
|
|
30
|
+
return { inserterItems: items };
|
|
35
31
|
},
|
|
36
|
-
[ rootClientId
|
|
32
|
+
[ rootClientId ]
|
|
37
33
|
);
|
|
38
34
|
|
|
35
|
+
const blockTypes = useMemo( () => {
|
|
36
|
+
const availableItems = filterInserterItems( inserterItems, {
|
|
37
|
+
allowReusable: true,
|
|
38
|
+
} );
|
|
39
|
+
|
|
40
|
+
return searchItems( availableItems, filterValue );
|
|
41
|
+
}, [ inserterItems, filterValue ] );
|
|
42
|
+
|
|
39
43
|
const { items, trackBlockTypeSelected } =
|
|
40
44
|
useBlockTypeImpressions( blockTypes );
|
|
41
45
|
|
|
@@ -422,11 +422,7 @@ function LinkControl( {
|
|
|
422
422
|
settings={ settings?.filter(
|
|
423
423
|
( { id } ) => id === 'opensInNewTab'
|
|
424
424
|
) }
|
|
425
|
-
onChange={
|
|
426
|
-
onChange( {
|
|
427
|
-
opensInNewTab,
|
|
428
|
-
} );
|
|
429
|
-
} }
|
|
425
|
+
onChange={ onChange }
|
|
430
426
|
/>
|
|
431
427
|
);
|
|
432
428
|
}
|