@wordpress/block-editor 10.0.0 → 10.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/autocomplete/index.js +2 -2
- package/build/components/autocomplete/index.js.map +1 -1
- package/build/components/block-inspector/index.js +1 -1
- package/build/components/block-inspector/index.js.map +1 -1
- package/build/components/block-list/block-list-compact.native.js +2 -1
- package/build/components/block-list/block-list-compact.native.js.map +1 -1
- package/build/components/block-list/block.js +1 -1
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-lock/use-block-lock.js +1 -1
- package/build/components/block-lock/use-block-lock.js.map +1 -1
- package/build/components/block-popover/inbetween.js +37 -49
- package/build/components/block-popover/inbetween.js.map +1 -1
- package/build/components/block-popover/index.js +28 -5
- package/build/components/block-popover/index.js.map +1 -1
- package/build/components/border-radius-control/linked-button.js +5 -6
- package/build/components/border-radius-control/linked-button.js.map +1 -1
- package/build/components/convert-to-group-buttons/toolbar.js +8 -3
- package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build/components/inner-blocks/index.js +7 -1
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inner-blocks/use-inner-block-template-sync.js +27 -16
- package/build/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
- package/build/components/inner-blocks/use-nested-settings-update.js +28 -4
- package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build/components/list-view/branch.js +1 -1
- package/build/components/list-view/branch.js.map +1 -1
- package/build/components/list-view/drop-indicator.js +30 -28
- package/build/components/list-view/drop-indicator.js.map +1 -1
- package/build/components/rich-text/format-toolbar-container.js +9 -9
- package/build/components/rich-text/format-toolbar-container.js.map +1 -1
- package/build/components/rich-text/index.js +4 -2
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/spacing-sizes-control/linked-button.js +2 -3
- package/build/components/spacing-sizes-control/linked-button.js.map +1 -1
- package/build/components/spacing-sizes-control/utils.js +1 -4
- package/build/components/spacing-sizes-control/utils.js.map +1 -1
- package/build/components/text-decoration-control/index.js +19 -15
- package/build/components/text-decoration-control/index.js.map +1 -1
- package/build/components/text-transform-control/index.js +25 -17
- package/build/components/text-transform-control/index.js.map +1 -1
- package/build/components/url-popover/image-url-input-ui.js +6 -4
- package/build/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build/components/use-block-drop-zone/index.js +1 -1
- package/build/components/use-block-drop-zone/index.js.map +1 -1
- package/build/hooks/content-lock-ui.js +3 -3
- package/build/hooks/content-lock-ui.js.map +1 -1
- package/build/hooks/typography.js +10 -11
- package/build/hooks/typography.js.map +1 -1
- package/build/layouts/constrained.js +1 -1
- package/build/layouts/constrained.js.map +1 -1
- package/build/store/reducer.js +4 -1
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +2 -2
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/autocomplete/index.js +2 -2
- package/build-module/components/autocomplete/index.js.map +1 -1
- package/build-module/components/block-inspector/index.js +1 -1
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-list/block-list-compact.native.js +2 -1
- package/build-module/components/block-list/block-list-compact.native.js.map +1 -1
- package/build-module/components/block-list/block.js +1 -1
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-lock/use-block-lock.js +1 -1
- package/build-module/components/block-lock/use-block-lock.js.map +1 -1
- package/build-module/components/block-popover/inbetween.js +38 -50
- package/build-module/components/block-popover/inbetween.js.map +1 -1
- package/build-module/components/block-popover/index.js +28 -5
- package/build-module/components/block-popover/index.js.map +1 -1
- package/build-module/components/border-radius-control/linked-button.js +5 -6
- package/build-module/components/border-radius-control/linked-button.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/toolbar.js +8 -3
- package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +7 -1
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inner-blocks/use-inner-block-template-sync.js +27 -16
- package/build-module/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
- package/build-module/components/inner-blocks/use-nested-settings-update.js +28 -4
- package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build-module/components/list-view/branch.js +1 -1
- package/build-module/components/list-view/branch.js.map +1 -1
- package/build-module/components/list-view/drop-indicator.js +30 -28
- package/build-module/components/list-view/drop-indicator.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar-container.js +10 -10
- package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
- package/build-module/components/rich-text/index.js +4 -2
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/linked-button.js +2 -3
- package/build-module/components/spacing-sizes-control/linked-button.js.map +1 -1
- package/build-module/components/spacing-sizes-control/utils.js +1 -4
- package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
- package/build-module/components/text-decoration-control/index.js +21 -16
- package/build-module/components/text-decoration-control/index.js.map +1 -1
- package/build-module/components/text-transform-control/index.js +28 -20
- package/build-module/components/text-transform-control/index.js.map +1 -1
- package/build-module/components/url-popover/image-url-input-ui.js +6 -4
- package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.js +1 -1
- package/build-module/components/use-block-drop-zone/index.js.map +1 -1
- package/build-module/hooks/content-lock-ui.js +3 -3
- package/build-module/hooks/content-lock-ui.js.map +1 -1
- package/build-module/hooks/typography.js +10 -11
- package/build-module/hooks/typography.js.map +1 -1
- package/build-module/layouts/constrained.js +1 -1
- package/build-module/layouts/constrained.js.map +1 -1
- package/build-module/store/reducer.js +4 -1
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +2 -2
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +49 -3
- package/build-style/style.css +49 -3
- package/package.json +28 -28
- package/src/components/autocomplete/index.js +2 -5
- package/src/components/block-inspector/index.js +1 -1
- package/src/components/block-list/block-list-compact.native.js +1 -1
- package/src/components/block-list/block.js +1 -1
- package/src/components/block-list/style.scss +22 -3
- package/src/components/block-lock/use-block-lock.js +1 -1
- package/src/components/block-popover/inbetween.js +50 -52
- package/src/components/block-popover/index.js +44 -6
- package/src/components/border-radius-control/linked-button.js +12 -11
- package/src/components/convert-to-group-buttons/toolbar.js +6 -2
- package/src/components/inner-blocks/README.md +2 -2
- package/src/components/inner-blocks/index.js +7 -0
- package/src/components/inner-blocks/use-inner-block-template-sync.js +39 -28
- package/src/components/inner-blocks/use-nested-settings-update.js +30 -3
- package/src/components/list-view/branch.js +1 -1
- package/src/components/list-view/drop-indicator.js +33 -32
- package/src/components/rich-text/format-toolbar-container.js +18 -10
- package/src/components/rich-text/index.js +2 -2
- package/src/components/spacing-sizes-control/linked-button.js +2 -3
- package/src/components/spacing-sizes-control/style.scss +4 -1
- package/src/components/spacing-sizes-control/utils.js +1 -8
- package/src/components/text-decoration-control/index.js +31 -23
- package/src/components/text-decoration-control/style.scss +18 -0
- package/src/components/text-transform-control/index.js +42 -26
- package/src/components/text-transform-control/style.scss +18 -0
- package/src/components/url-popover/image-url-input-ui.js +5 -3
- package/src/components/use-block-drop-zone/index.js +1 -1
- package/src/hooks/content-lock-ui.js +3 -3
- package/src/hooks/typography.js +13 -14
- package/src/layouts/constrained.js +1 -1
- package/src/store/reducer.js +3 -0
- package/src/store/selectors.js +2 -2
- package/src/store/test/selectors.js +4 -4
- package/src/style.scss +2 -0
|
@@ -175,6 +175,9 @@
|
|
|
175
175
|
.block-editor-block-list__layout {
|
|
176
176
|
position: relative;
|
|
177
177
|
}
|
|
178
|
+
.block-editor-block-list__layout::selection {
|
|
179
|
+
background: transparent;
|
|
180
|
+
}
|
|
178
181
|
.block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected:not(.is-partially-selected)::after,
|
|
179
182
|
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted::after,
|
|
180
183
|
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected::after {
|
|
@@ -203,6 +206,9 @@
|
|
|
203
206
|
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected .block-editor-block-list__block.is-multi-selected:not(.is-partially-selected) ::selection {
|
|
204
207
|
background: transparent;
|
|
205
208
|
}
|
|
209
|
+
.has-multi-selection .block-editor-block-list__layout::selection {
|
|
210
|
+
background: transparent;
|
|
211
|
+
}
|
|
206
212
|
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted::after {
|
|
207
213
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
208
214
|
outline: 1px solid transparent;
|
|
@@ -268,10 +274,16 @@
|
|
|
268
274
|
*/
|
|
269
275
|
}
|
|
270
276
|
.block-editor-block-list__layout .block-editor-block-list__block.is-partially-selected::after {
|
|
271
|
-
|
|
277
|
+
top: -0.5px;
|
|
278
|
+
left: -0.5px;
|
|
279
|
+
bottom: -0.5px;
|
|
280
|
+
right: -0.5px;
|
|
272
281
|
}
|
|
273
282
|
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted::after, .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected::after {
|
|
274
|
-
|
|
283
|
+
top: 0;
|
|
284
|
+
left: 0;
|
|
285
|
+
bottom: 0;
|
|
286
|
+
right: 0;
|
|
275
287
|
}
|
|
276
288
|
.block-editor-block-list__layout .block-editor-block-list__block .reusable-block-edit-panel * {
|
|
277
289
|
z-index: 1;
|
|
@@ -3286,6 +3298,38 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
|
|
|
3286
3298
|
z-index: 100000;
|
|
3287
3299
|
}
|
|
3288
3300
|
|
|
3301
|
+
.block-editor-text-decoration-control {
|
|
3302
|
+
border: 0;
|
|
3303
|
+
margin: 0;
|
|
3304
|
+
padding: 0;
|
|
3305
|
+
}
|
|
3306
|
+
.block-editor-text-decoration-control .block-editor-text-decoration-control__buttons {
|
|
3307
|
+
padding: 4px 0;
|
|
3308
|
+
display: flex;
|
|
3309
|
+
}
|
|
3310
|
+
.block-editor-text-decoration-control .components-button.has-icon {
|
|
3311
|
+
height: 32px;
|
|
3312
|
+
margin-left: 4px;
|
|
3313
|
+
min-width: 32px;
|
|
3314
|
+
padding: 0;
|
|
3315
|
+
}
|
|
3316
|
+
|
|
3317
|
+
.block-editor-text-transform-control {
|
|
3318
|
+
border: 0;
|
|
3319
|
+
margin: 0;
|
|
3320
|
+
padding: 0;
|
|
3321
|
+
}
|
|
3322
|
+
.block-editor-text-transform-control .block-editor-text-transform-control__buttons {
|
|
3323
|
+
padding: 4px 0;
|
|
3324
|
+
display: flex;
|
|
3325
|
+
}
|
|
3326
|
+
.block-editor-text-transform-control .components-button.has-icon {
|
|
3327
|
+
height: 32px;
|
|
3328
|
+
margin-left: 4px;
|
|
3329
|
+
min-width: 32px;
|
|
3330
|
+
padding: 0;
|
|
3331
|
+
}
|
|
3332
|
+
|
|
3289
3333
|
.block-editor-tool-selector__help {
|
|
3290
3334
|
margin-top: 8px;
|
|
3291
3335
|
margin-right: -8px;
|
|
@@ -4313,9 +4357,11 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
|
|
|
4313
4357
|
grid-column: 2/2;
|
|
4314
4358
|
grid-row: 1/1;
|
|
4315
4359
|
justify-self: end;
|
|
4316
|
-
margin-left: 4px;
|
|
4317
4360
|
padding: 0;
|
|
4318
4361
|
}
|
|
4362
|
+
.component-spacing-sizes-control .component-spacing-sizes-control__linked-button ~ .components-spacing-sizes-control__custom-toggle-all {
|
|
4363
|
+
margin-left: 4px;
|
|
4364
|
+
}
|
|
4319
4365
|
.component-spacing-sizes-control .components-spacing-sizes-control__custom-toggle-single {
|
|
4320
4366
|
grid-column: 3/3;
|
|
4321
4367
|
justify-self: end;
|
package/build-style/style.css
CHANGED
|
@@ -175,6 +175,9 @@
|
|
|
175
175
|
.block-editor-block-list__layout {
|
|
176
176
|
position: relative;
|
|
177
177
|
}
|
|
178
|
+
.block-editor-block-list__layout::selection {
|
|
179
|
+
background: transparent;
|
|
180
|
+
}
|
|
178
181
|
.block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected:not(.is-partially-selected)::after,
|
|
179
182
|
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted::after,
|
|
180
183
|
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected::after {
|
|
@@ -203,6 +206,9 @@
|
|
|
203
206
|
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected .block-editor-block-list__block.is-multi-selected:not(.is-partially-selected) ::selection {
|
|
204
207
|
background: transparent;
|
|
205
208
|
}
|
|
209
|
+
.has-multi-selection .block-editor-block-list__layout::selection {
|
|
210
|
+
background: transparent;
|
|
211
|
+
}
|
|
206
212
|
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted::after {
|
|
207
213
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
208
214
|
outline: 1px solid transparent;
|
|
@@ -268,10 +274,16 @@
|
|
|
268
274
|
*/
|
|
269
275
|
}
|
|
270
276
|
.block-editor-block-list__layout .block-editor-block-list__block.is-partially-selected::after {
|
|
271
|
-
|
|
277
|
+
top: -0.5px;
|
|
278
|
+
right: -0.5px;
|
|
279
|
+
bottom: -0.5px;
|
|
280
|
+
left: -0.5px;
|
|
272
281
|
}
|
|
273
282
|
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted::after, .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected::after {
|
|
274
|
-
|
|
283
|
+
top: 0;
|
|
284
|
+
right: 0;
|
|
285
|
+
bottom: 0;
|
|
286
|
+
left: 0;
|
|
275
287
|
}
|
|
276
288
|
.block-editor-block-list__layout .block-editor-block-list__block .reusable-block-edit-panel * {
|
|
277
289
|
z-index: 1;
|
|
@@ -3286,6 +3298,38 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
|
|
|
3286
3298
|
z-index: 100000;
|
|
3287
3299
|
}
|
|
3288
3300
|
|
|
3301
|
+
.block-editor-text-decoration-control {
|
|
3302
|
+
border: 0;
|
|
3303
|
+
margin: 0;
|
|
3304
|
+
padding: 0;
|
|
3305
|
+
}
|
|
3306
|
+
.block-editor-text-decoration-control .block-editor-text-decoration-control__buttons {
|
|
3307
|
+
padding: 4px 0;
|
|
3308
|
+
display: flex;
|
|
3309
|
+
}
|
|
3310
|
+
.block-editor-text-decoration-control .components-button.has-icon {
|
|
3311
|
+
height: 32px;
|
|
3312
|
+
margin-right: 4px;
|
|
3313
|
+
min-width: 32px;
|
|
3314
|
+
padding: 0;
|
|
3315
|
+
}
|
|
3316
|
+
|
|
3317
|
+
.block-editor-text-transform-control {
|
|
3318
|
+
border: 0;
|
|
3319
|
+
margin: 0;
|
|
3320
|
+
padding: 0;
|
|
3321
|
+
}
|
|
3322
|
+
.block-editor-text-transform-control .block-editor-text-transform-control__buttons {
|
|
3323
|
+
padding: 4px 0;
|
|
3324
|
+
display: flex;
|
|
3325
|
+
}
|
|
3326
|
+
.block-editor-text-transform-control .components-button.has-icon {
|
|
3327
|
+
height: 32px;
|
|
3328
|
+
margin-right: 4px;
|
|
3329
|
+
min-width: 32px;
|
|
3330
|
+
padding: 0;
|
|
3331
|
+
}
|
|
3332
|
+
|
|
3289
3333
|
.block-editor-tool-selector__help {
|
|
3290
3334
|
margin-top: 8px;
|
|
3291
3335
|
margin-left: -8px;
|
|
@@ -4313,9 +4357,11 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
|
|
|
4313
4357
|
grid-column: 2/2;
|
|
4314
4358
|
grid-row: 1/1;
|
|
4315
4359
|
justify-self: end;
|
|
4316
|
-
margin-right: 4px;
|
|
4317
4360
|
padding: 0;
|
|
4318
4361
|
}
|
|
4362
|
+
.component-spacing-sizes-control .component-spacing-sizes-control__linked-button ~ .components-spacing-sizes-control__custom-toggle-all {
|
|
4363
|
+
margin-right: 4px;
|
|
4364
|
+
}
|
|
4319
4365
|
.component-spacing-sizes-control .components-spacing-sizes-control__custom-toggle-single {
|
|
4320
4366
|
grid-column: 3/3;
|
|
4321
4367
|
justify-self: end;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-editor",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.2",
|
|
4
4
|
"description": "Generic block editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -33,32 +33,32 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.16.0",
|
|
35
35
|
"@react-spring/web": "^9.4.5",
|
|
36
|
-
"@wordpress/a11y": "^3.17.
|
|
37
|
-
"@wordpress/api-fetch": "^6.14.
|
|
38
|
-
"@wordpress/blob": "^3.17.
|
|
39
|
-
"@wordpress/blocks": "^11.16.
|
|
40
|
-
"@wordpress/components": "^21.0.
|
|
41
|
-
"@wordpress/compose": "^5.15.
|
|
42
|
-
"@wordpress/data": "^7.1.
|
|
43
|
-
"@wordpress/date": "^4.17.
|
|
44
|
-
"@wordpress/deprecated": "^3.17.
|
|
45
|
-
"@wordpress/dom": "^3.17.
|
|
46
|
-
"@wordpress/element": "^4.15.
|
|
47
|
-
"@wordpress/hooks": "^3.17.
|
|
48
|
-
"@wordpress/html-entities": "^3.17.
|
|
49
|
-
"@wordpress/i18n": "^4.17.
|
|
50
|
-
"@wordpress/icons": "^9.8.
|
|
51
|
-
"@wordpress/is-shallow-equal": "^4.17.
|
|
52
|
-
"@wordpress/keyboard-shortcuts": "^3.15.
|
|
53
|
-
"@wordpress/keycodes": "^3.17.
|
|
54
|
-
"@wordpress/notices": "^3.17.
|
|
55
|
-
"@wordpress/rich-text": "^5.15.
|
|
56
|
-
"@wordpress/shortcode": "^3.17.
|
|
57
|
-
"@wordpress/style-engine": "^0.
|
|
58
|
-
"@wordpress/token-list": "^2.17.
|
|
59
|
-
"@wordpress/url": "^3.18.
|
|
60
|
-
"@wordpress/warning": "^2.17.
|
|
61
|
-
"@wordpress/wordcount": "^3.17.
|
|
36
|
+
"@wordpress/a11y": "^3.17.1",
|
|
37
|
+
"@wordpress/api-fetch": "^6.14.1",
|
|
38
|
+
"@wordpress/blob": "^3.17.1",
|
|
39
|
+
"@wordpress/blocks": "^11.16.2",
|
|
40
|
+
"@wordpress/components": "^21.0.2",
|
|
41
|
+
"@wordpress/compose": "^5.15.2",
|
|
42
|
+
"@wordpress/data": "^7.1.2",
|
|
43
|
+
"@wordpress/date": "^4.17.1",
|
|
44
|
+
"@wordpress/deprecated": "^3.17.1",
|
|
45
|
+
"@wordpress/dom": "^3.17.2",
|
|
46
|
+
"@wordpress/element": "^4.15.1",
|
|
47
|
+
"@wordpress/hooks": "^3.17.1",
|
|
48
|
+
"@wordpress/html-entities": "^3.17.1",
|
|
49
|
+
"@wordpress/i18n": "^4.17.1",
|
|
50
|
+
"@wordpress/icons": "^9.8.1",
|
|
51
|
+
"@wordpress/is-shallow-equal": "^4.17.1",
|
|
52
|
+
"@wordpress/keyboard-shortcuts": "^3.15.2",
|
|
53
|
+
"@wordpress/keycodes": "^3.17.1",
|
|
54
|
+
"@wordpress/notices": "^3.17.2",
|
|
55
|
+
"@wordpress/rich-text": "^5.15.2",
|
|
56
|
+
"@wordpress/shortcode": "^3.17.1",
|
|
57
|
+
"@wordpress/style-engine": "^1.0.1",
|
|
58
|
+
"@wordpress/token-list": "^2.17.1",
|
|
59
|
+
"@wordpress/url": "^3.18.1",
|
|
60
|
+
"@wordpress/warning": "^2.17.1",
|
|
61
|
+
"@wordpress/wordcount": "^3.17.1",
|
|
62
62
|
"change-case": "^4.1.2",
|
|
63
63
|
"classnames": "^2.3.1",
|
|
64
64
|
"colord": "^2.7.0",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"publishConfig": {
|
|
80
80
|
"access": "public"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "f6021282457317c7e12dcc3a3f02c9ac28e16a30"
|
|
83
83
|
}
|
|
@@ -32,16 +32,13 @@ const EMPTY_ARRAY = [];
|
|
|
32
32
|
function useCompleters( { completers = EMPTY_ARRAY } ) {
|
|
33
33
|
const { name } = useBlockEditContext();
|
|
34
34
|
return useMemo( () => {
|
|
35
|
-
let filteredCompleters = completers;
|
|
35
|
+
let filteredCompleters = [ ...completers, linkAutocompleter ];
|
|
36
36
|
|
|
37
37
|
if (
|
|
38
38
|
name === getDefaultBlockName() ||
|
|
39
39
|
getBlockSupport( name, '__experimentalSlashInserter', false )
|
|
40
40
|
) {
|
|
41
|
-
filteredCompleters = filteredCompleters
|
|
42
|
-
blockAutocompleter,
|
|
43
|
-
linkAutocompleter,
|
|
44
|
-
] );
|
|
41
|
+
filteredCompleters = [ ...filteredCompleters, blockAutocompleter ];
|
|
45
42
|
}
|
|
46
43
|
|
|
47
44
|
if ( hasFilter( 'editor.Autocomplete.completers' ) ) {
|
|
@@ -158,7 +158,7 @@ const BlockInspector = ( { showNoBlockSelectedMessage = true } ) => {
|
|
|
158
158
|
selectedBlockName: _selectedBlockName,
|
|
159
159
|
blockType: _blockType,
|
|
160
160
|
topLevelLockedBlock:
|
|
161
|
-
getTemplateLock( _selectedBlockClientId ) === '
|
|
161
|
+
getTemplateLock( _selectedBlockClientId ) === 'contentOnly'
|
|
162
162
|
? _selectedBlockClientId
|
|
163
163
|
: __unstableGetContentLockingParent(
|
|
164
164
|
_selectedBlockClientId
|
|
@@ -118,7 +118,7 @@ function BlockListBlock( {
|
|
|
118
118
|
),
|
|
119
119
|
hasContentLockedParent: _hasContentLockedParent,
|
|
120
120
|
isContentLocking:
|
|
121
|
-
getTemplateLock( clientId ) === '
|
|
121
|
+
getTemplateLock( clientId ) === 'contentOnly' &&
|
|
122
122
|
! _hasContentLockedParent,
|
|
123
123
|
isTemporarilyEditingAsBlocks:
|
|
124
124
|
__unstableGetTemporarilyEditingAsBlocks() === clientId,
|
|
@@ -13,6 +13,12 @@
|
|
|
13
13
|
.block-editor-block-list__layout {
|
|
14
14
|
position: relative;
|
|
15
15
|
|
|
16
|
+
// Hide selections on this element, otherwise Safari will include it stacked
|
|
17
|
+
// under your actual selection.
|
|
18
|
+
&::selection {
|
|
19
|
+
background: transparent;
|
|
20
|
+
}
|
|
21
|
+
|
|
16
22
|
// The primary indicator of selection in text is the native selection marker.
|
|
17
23
|
// When selecting multiple blocks, we provide an additional selection indicator.
|
|
18
24
|
.block-editor-block-list__block.is-multi-selected:not(.is-partially-selected),
|
|
@@ -51,6 +57,11 @@
|
|
|
51
57
|
}
|
|
52
58
|
}
|
|
53
59
|
|
|
60
|
+
// Hide the selection indicator on .block-editor-block-list__layout, else Safari will show it stacked.
|
|
61
|
+
.has-multi-selection &::selection {
|
|
62
|
+
background: transparent;
|
|
63
|
+
}
|
|
64
|
+
|
|
54
65
|
.block-editor-block-list__block.is-highlighted::after {
|
|
55
66
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
56
67
|
outline: $border-width solid transparent;
|
|
@@ -128,14 +139,22 @@
|
|
|
128
139
|
// Re-enable text-selection on editable blocks.
|
|
129
140
|
user-select: text;
|
|
130
141
|
|
|
131
|
-
// Hide the select style pseudo element as it
|
|
142
|
+
// Hide the select style pseudo element as otherwise it gets shwon as "selected" in Safari.
|
|
132
143
|
&.is-partially-selected::after {
|
|
133
|
-
|
|
144
|
+
// By positioning this pseudo element outside the boundaries of the parent block,
|
|
145
|
+
// when partially selected it hides the pseudo element selection in Safari.
|
|
146
|
+
top: -0.5px;
|
|
147
|
+
right: -0.5px;
|
|
148
|
+
bottom: -0.5px;
|
|
149
|
+
left: -0.5px;
|
|
134
150
|
}
|
|
135
151
|
|
|
136
152
|
&.is-highlighted::after,
|
|
137
153
|
&.is-highlighted ~ .is-multi-selected::after {
|
|
138
|
-
|
|
154
|
+
top: 0;
|
|
155
|
+
right: 0;
|
|
156
|
+
bottom: 0;
|
|
157
|
+
left: 0;
|
|
139
158
|
}
|
|
140
159
|
|
|
141
160
|
// Break long strings of text without spaces so they don't overflow the block.
|
|
@@ -38,7 +38,7 @@ export default function useBlockLock( clientId ) {
|
|
|
38
38
|
canMove,
|
|
39
39
|
canRemove,
|
|
40
40
|
canLock: canLockBlockType( getBlockName( clientId ) ),
|
|
41
|
-
isContentLocked: getTemplateLock( clientId ) === '
|
|
41
|
+
isContentLocked: getTemplateLock( clientId ) === 'contentOnly',
|
|
42
42
|
isLocked: ! canEdit || ! canMove || ! canRemove,
|
|
43
43
|
};
|
|
44
44
|
},
|
|
@@ -8,7 +8,6 @@ import classnames from 'classnames';
|
|
|
8
8
|
*/
|
|
9
9
|
import { useSelect } from '@wordpress/data';
|
|
10
10
|
import {
|
|
11
|
-
useCallback,
|
|
12
11
|
useMemo,
|
|
13
12
|
createContext,
|
|
14
13
|
useReducer,
|
|
@@ -107,66 +106,65 @@ function BlockPopoverInbetween( {
|
|
|
107
106
|
isVisible,
|
|
108
107
|
] );
|
|
109
108
|
|
|
110
|
-
const
|
|
109
|
+
const popoverAnchor = useMemo( () => {
|
|
111
110
|
if ( ( ! previousElement && ! nextElement ) || ! isVisible ) {
|
|
112
|
-
return
|
|
111
|
+
return undefined;
|
|
113
112
|
}
|
|
114
113
|
|
|
115
114
|
const { ownerDocument } = previousElement || nextElement;
|
|
116
115
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
116
|
+
return {
|
|
117
|
+
ownerDocument,
|
|
118
|
+
getBoundingClientRect() {
|
|
119
|
+
const previousRect = previousElement
|
|
120
|
+
? previousElement.getBoundingClientRect()
|
|
121
|
+
: null;
|
|
122
|
+
const nextRect = nextElement
|
|
123
|
+
? nextElement.getBoundingClientRect()
|
|
124
|
+
: null;
|
|
123
125
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
return {
|
|
127
|
-
top: previousRect ? previousRect.bottom : nextRect.top,
|
|
128
|
-
left: previousRect ? previousRect.right : nextRect.right,
|
|
129
|
-
right: previousRect ? previousRect.right : nextRect.right,
|
|
130
|
-
bottom: previousRect ? previousRect.bottom : nextRect.top,
|
|
131
|
-
height: 0,
|
|
132
|
-
width: 0,
|
|
133
|
-
ownerDocument,
|
|
134
|
-
};
|
|
135
|
-
}
|
|
126
|
+
let left = 0;
|
|
127
|
+
let top = 0;
|
|
136
128
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
right: previousRect ? previousRect.left : nextRect.left,
|
|
141
|
-
bottom: previousRect ? previousRect.bottom : nextRect.top,
|
|
142
|
-
height: 0,
|
|
143
|
-
width: 0,
|
|
144
|
-
ownerDocument,
|
|
145
|
-
};
|
|
146
|
-
}
|
|
129
|
+
if ( isVertical ) {
|
|
130
|
+
// vertical
|
|
131
|
+
top = previousRect ? previousRect.bottom : nextRect.top;
|
|
147
132
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
133
|
+
if ( isRTL() ) {
|
|
134
|
+
// vertical, rtl
|
|
135
|
+
left = previousRect
|
|
136
|
+
? previousRect.right
|
|
137
|
+
: nextRect.right;
|
|
138
|
+
} else {
|
|
139
|
+
// vertical, ltr
|
|
140
|
+
left = previousRect ? previousRect.left : nextRect.left;
|
|
141
|
+
}
|
|
142
|
+
} else {
|
|
143
|
+
top = previousRect ? previousRect.top : nextRect.top;
|
|
159
144
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
145
|
+
if ( isRTL() ) {
|
|
146
|
+
// non vertical, rtl
|
|
147
|
+
left = previousRect
|
|
148
|
+
? previousRect.left
|
|
149
|
+
: nextRect.right;
|
|
150
|
+
} else {
|
|
151
|
+
// non vertical, ltr
|
|
152
|
+
left = previousRect
|
|
153
|
+
? previousRect.right
|
|
154
|
+
: nextRect.left;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
return new window.DOMRect( left, top, 0, 0 );
|
|
159
|
+
},
|
|
168
160
|
};
|
|
169
|
-
}, [
|
|
161
|
+
}, [
|
|
162
|
+
previousElement,
|
|
163
|
+
nextElement,
|
|
164
|
+
positionRecompute,
|
|
165
|
+
isVertical,
|
|
166
|
+
isVisible,
|
|
167
|
+
] );
|
|
170
168
|
|
|
171
169
|
const popoverScrollRef = usePopoverScroll( __unstableContentRef );
|
|
172
170
|
|
|
@@ -229,7 +227,7 @@ function BlockPopoverInbetween( {
|
|
|
229
227
|
<Popover
|
|
230
228
|
ref={ popoverScrollRef }
|
|
231
229
|
animate={ false }
|
|
232
|
-
|
|
230
|
+
anchor={ popoverAnchor }
|
|
233
231
|
focusOnMount={ false }
|
|
234
232
|
// Render in the old slot if needed for backward compatibility,
|
|
235
233
|
// otherwise render in place (not in the default popover slot).
|
|
@@ -47,22 +47,60 @@ function BlockPopover(
|
|
|
47
47
|
};
|
|
48
48
|
}, [ selectedElement, lastSelectedElement, __unstableRefreshSize ] );
|
|
49
49
|
|
|
50
|
+
const popoverAnchor = useMemo( () => {
|
|
51
|
+
if (
|
|
52
|
+
! selectedElement ||
|
|
53
|
+
( bottomClientId && ! lastSelectedElement )
|
|
54
|
+
) {
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return {
|
|
59
|
+
getBoundingClientRect() {
|
|
60
|
+
const selectedBCR = selectedElement.getBoundingClientRect();
|
|
61
|
+
const lastSelectedBCR =
|
|
62
|
+
lastSelectedElement?.getBoundingClientRect();
|
|
63
|
+
|
|
64
|
+
// Get the biggest rectangle that encompasses completely the currently
|
|
65
|
+
// selected element and the last selected element:
|
|
66
|
+
// - for top/left coordinates, use the smaller numbers
|
|
67
|
+
// - for the bottom/right coordinates, use the largest numbers
|
|
68
|
+
const left = Math.min(
|
|
69
|
+
selectedBCR.left,
|
|
70
|
+
lastSelectedBCR?.left ?? Infinity
|
|
71
|
+
);
|
|
72
|
+
const top = Math.min(
|
|
73
|
+
selectedBCR.top,
|
|
74
|
+
lastSelectedBCR?.top ?? Infinity
|
|
75
|
+
);
|
|
76
|
+
const right = Math.max(
|
|
77
|
+
selectedBCR.right,
|
|
78
|
+
lastSelectedBCR.right ?? -Infinity
|
|
79
|
+
);
|
|
80
|
+
const bottom = Math.max(
|
|
81
|
+
selectedBCR.bottom,
|
|
82
|
+
lastSelectedBCR.bottom ?? -Infinity
|
|
83
|
+
);
|
|
84
|
+
const width = right - left;
|
|
85
|
+
const height = bottom - top;
|
|
86
|
+
|
|
87
|
+
return new window.DOMRect( left, top, width, height );
|
|
88
|
+
},
|
|
89
|
+
ownerDocument: selectedElement.ownerDocument,
|
|
90
|
+
};
|
|
91
|
+
}, [ bottomClientId, lastSelectedElement, selectedElement ] );
|
|
92
|
+
|
|
50
93
|
if ( ! selectedElement || ( bottomClientId && ! lastSelectedElement ) ) {
|
|
51
94
|
return null;
|
|
52
95
|
}
|
|
53
96
|
|
|
54
|
-
const anchorRef = {
|
|
55
|
-
top: selectedElement,
|
|
56
|
-
bottom: lastSelectedElement,
|
|
57
|
-
};
|
|
58
|
-
|
|
59
97
|
return (
|
|
60
98
|
<Popover
|
|
61
99
|
ref={ mergedRefs }
|
|
62
100
|
animate={ false }
|
|
63
101
|
position="top right left"
|
|
64
102
|
focusOnMount={ false }
|
|
65
|
-
|
|
103
|
+
anchor={ popoverAnchor }
|
|
66
104
|
// Render in the old slot if needed for backward compatibility,
|
|
67
105
|
// otherwise render in place (not in the default popover slot).
|
|
68
106
|
__unstableSlotName={ __unstablePopoverSlot || null }
|
|
@@ -6,20 +6,21 @@ import { link, linkOff } from '@wordpress/icons';
|
|
|
6
6
|
import { __ } from '@wordpress/i18n';
|
|
7
7
|
|
|
8
8
|
export default function LinkedButton( { isLinked, ...props } ) {
|
|
9
|
-
const label = isLinked ? __( 'Unlink
|
|
9
|
+
const label = isLinked ? __( 'Unlink radii' ) : __( 'Link radii' );
|
|
10
10
|
|
|
11
|
+
// TODO: Remove span after merging https://github.com/WordPress/gutenberg/pull/44198
|
|
11
12
|
return (
|
|
12
13
|
<Tooltip text={ label }>
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
<span>
|
|
15
|
+
<Button
|
|
16
|
+
{ ...props }
|
|
17
|
+
className="component-border-radius-control__linked-button"
|
|
18
|
+
isSmall
|
|
19
|
+
icon={ isLinked ? link : linkOff }
|
|
20
|
+
iconSize={ 24 }
|
|
21
|
+
aria-label={ label }
|
|
22
|
+
/>
|
|
23
|
+
</span>
|
|
23
24
|
</Tooltip>
|
|
24
25
|
);
|
|
25
26
|
}
|
|
@@ -14,7 +14,7 @@ import { useConvertToGroupButtonProps } from '../convert-to-group-buttons';
|
|
|
14
14
|
import { store as blockEditorStore } from '../../store';
|
|
15
15
|
|
|
16
16
|
const layouts = {
|
|
17
|
-
group:
|
|
17
|
+
group: { type: 'constrained' },
|
|
18
18
|
row: { type: 'flex', flexWrap: 'nowrap' },
|
|
19
19
|
stack: { type: 'flex', orientation: 'vertical' },
|
|
20
20
|
};
|
|
@@ -40,12 +40,16 @@ function BlockGroupToolbar() {
|
|
|
40
40
|
[ clientIds, groupingBlockName ]
|
|
41
41
|
);
|
|
42
42
|
|
|
43
|
-
const onConvertToGroup = ( layout
|
|
43
|
+
const onConvertToGroup = ( layout ) => {
|
|
44
44
|
const newBlocks = switchToBlockType(
|
|
45
45
|
blocksSelection,
|
|
46
46
|
groupingBlockName
|
|
47
47
|
);
|
|
48
48
|
|
|
49
|
+
if ( typeof layout !== 'string' ) {
|
|
50
|
+
layout = 'group';
|
|
51
|
+
}
|
|
52
|
+
|
|
49
53
|
if ( newBlocks && newBlocks.length > 0 ) {
|
|
50
54
|
// Because the block is not in the store yet we can't use
|
|
51
55
|
// updateBlockAttributes so need to manually update attributes.
|
|
@@ -125,12 +125,12 @@ Template locking of `InnerBlocks` is similar to [Custom Post Type templates lock
|
|
|
125
125
|
Template locking allows locking the `InnerBlocks` area for the current template.
|
|
126
126
|
_Options:_
|
|
127
127
|
|
|
128
|
-
- `
|
|
128
|
+
- `contentOnly` — prevents all operations. Additionally, the block types that don't have content are hidden from the list view and can't gain focus within the block list. Unlike the other lock types, this is not overrideable by children.
|
|
129
129
|
- `'all'` — prevents all operations. It is not possible to insert new blocks. Move existing blocks or delete them.
|
|
130
130
|
- `'insert'` — prevents inserting or removing blocks, but allows moving existing ones.
|
|
131
131
|
- `false` — prevents locking from being applied to an `InnerBlocks` area even if a parent block contains locking. ( Boolean )
|
|
132
132
|
|
|
133
|
-
If locking is not set in an `InnerBlocks` area: the locking of the parent `InnerBlocks` area is used. Note that `
|
|
133
|
+
If locking is not set in an `InnerBlocks` area: the locking of the parent `InnerBlocks` area is used. Note that `contentOnly` can't be overriden: it's present, the `templateLock` value of any children is ignored.
|
|
134
134
|
|
|
135
135
|
If the block is a top level block: the locking of the Custom Post Type is used.
|
|
136
136
|
|
|
@@ -77,6 +77,13 @@ function UncontrolledInnerBlocks( props ) {
|
|
|
77
77
|
const context = useSelect(
|
|
78
78
|
( select ) => {
|
|
79
79
|
const block = select( blockEditorStore ).getBlock( clientId );
|
|
80
|
+
|
|
81
|
+
// This check is here to avoid the Redux zombie bug where a child subscription
|
|
82
|
+
// is called before a parent, causing potential JS errors when the child has been removed.
|
|
83
|
+
if ( ! block ) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
|
|
80
87
|
const blockType = getBlockType( block.name );
|
|
81
88
|
|
|
82
89
|
if ( ! blockType || ! blockType.providesContext ) {
|