@wordpress/block-editor 12.21.0 → 12.22.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 +2 -0
- package/build/components/block-actions/index.js +2 -4
- package/build/components/block-actions/index.js.map +1 -1
- package/build/components/block-heading-level-dropdown/index.js +5 -5
- package/build/components/block-heading-level-dropdown/index.js.map +1 -1
- package/build/components/block-heading-level-dropdown/index.native.js +5 -4
- package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
- package/build/components/block-list/block-crash-boundary.native.js +49 -0
- package/build/components/block-list/block-crash-boundary.native.js.map +1 -0
- package/build/components/block-list/block-crash-warning.native.js +24 -0
- package/build/components/block-list/block-crash-warning.native.js.map +1 -0
- package/build/components/block-list/block.native.js +7 -2
- package/build/components/block-list/block.native.js.map +1 -1
- package/build/components/block-settings/container.native.js +2 -1
- package/build/components/block-settings/container.native.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +29 -29
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-settings-menu-controls/index.js +1 -3
- package/build/components/block-settings-menu-controls/index.js.map +1 -1
- package/build/components/block-toolbar/index.js +3 -1
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-toolbar/shuffle.js +1 -1
- package/build/components/block-toolbar/shuffle.js.map +1 -1
- package/build/components/child-layout-control/index.js +108 -11
- package/build/components/child-layout-control/index.js.map +1 -1
- package/build/components/convert-to-group-buttons/toolbar.js +11 -0
- package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +8 -33
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +1 -1
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/global-styles/utils.js +1 -3
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/iframe/index.js +34 -30
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/index.js +3 -6
- package/build/components/inserter/block-patterns-explorer/index.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/pattern-list.js +3 -1
- package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
- package/build/components/inserter/menu.js +3 -9
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/mobile-tab-navigation.js +1 -1
- package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build/components/inserter/search-results.js +2 -3
- package/build/components/inserter/search-results.js.map +1 -1
- package/build/components/inserter/tabs.js +1 -2
- package/build/components/inserter/tabs.js.map +1 -1
- package/build/components/inspector-controls-tabs/advanced-controls-panel.native.js +36 -0
- package/build/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -0
- package/build/components/list-view/block-select-button.js +2 -12
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/list-view/block.js +4 -11
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/utils.js +5 -3
- package/build/components/list-view/utils.js.map +1 -1
- package/build/components/spacing-sizes-control/sides-dropdown/index.js +1 -1
- package/build/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
- package/build/components/use-moving-animation/index.js +4 -0
- package/build/components/use-moving-animation/index.js.map +1 -1
- package/build/components/warning/index.native.js +9 -4
- package/build/components/warning/index.native.js.map +1 -1
- package/build/hooks/anchor.js +7 -8
- package/build/hooks/anchor.js.map +1 -1
- package/build/hooks/background.js +39 -2
- package/build/hooks/background.js.map +1 -1
- package/build/hooks/index.js +2 -1
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/layout-child.js +28 -6
- package/build/hooks/layout-child.js.map +1 -1
- package/build/hooks/layout.js +21 -10
- package/build/hooks/layout.js.map +1 -1
- package/build/hooks/position.js +1 -1
- package/build/hooks/position.js.map +1 -1
- package/build/private-apis.native.js +3 -1
- package/build/private-apis.native.js.map +1 -1
- package/build/store/reducer.js +31 -26
- package/build/store/reducer.js.map +1 -1
- package/build-module/components/block-actions/index.js +2 -4
- package/build-module/components/block-actions/index.js.map +1 -1
- package/build-module/components/block-heading-level-dropdown/index.js +5 -5
- package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
- package/build-module/components/block-heading-level-dropdown/index.native.js +5 -4
- package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
- package/build-module/components/block-list/block-crash-boundary.native.js +42 -0
- package/build-module/components/block-list/block-crash-boundary.native.js.map +1 -0
- package/build-module/components/block-list/block-crash-warning.native.js +15 -0
- package/build-module/components/block-list/block-crash-warning.native.js.map +1 -0
- package/build-module/components/block-list/block.native.js +7 -2
- package/build-module/components/block-list/block.native.js.map +1 -1
- package/build-module/components/block-settings/container.native.js +3 -2
- package/build-module/components/block-settings/container.native.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +30 -30
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-settings-menu-controls/index.js +1 -3
- package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
- package/build-module/components/block-toolbar/index.js +3 -1
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-toolbar/shuffle.js +1 -1
- package/build-module/components/block-toolbar/shuffle.js.map +1 -1
- package/build-module/components/child-layout-control/index.js +109 -12
- package/build-module/components/child-layout-control/index.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/toolbar.js +12 -1
- package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +9 -34
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/global-styles/utils.js +0 -2
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/iframe/index.js +34 -30
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/index.js +3 -6
- package/build-module/components/inserter/block-patterns-explorer/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/pattern-list.js +3 -1
- package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
- package/build-module/components/inserter/menu.js +3 -9
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/mobile-tab-navigation.js +1 -1
- package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build-module/components/inserter/search-results.js +2 -3
- package/build-module/components/inserter/search-results.js.map +1 -1
- package/build-module/components/inserter/tabs.js +1 -2
- package/build-module/components/inserter/tabs.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/advanced-controls-panel.native.js +28 -0
- package/build-module/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -0
- package/build-module/components/list-view/block-select-button.js +3 -13
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/list-view/block.js +6 -13
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/utils.js +2 -1
- package/build-module/components/list-view/utils.js.map +1 -1
- package/build-module/components/spacing-sizes-control/sides-dropdown/index.js +1 -1
- package/build-module/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
- package/build-module/components/use-moving-animation/index.js +4 -0
- package/build-module/components/use-moving-animation/index.js.map +1 -1
- package/build-module/components/warning/index.native.js +9 -4
- package/build-module/components/warning/index.native.js.map +1 -1
- package/build-module/hooks/anchor.js +8 -9
- package/build-module/hooks/anchor.js.map +1 -1
- package/build-module/hooks/background.js +38 -1
- package/build-module/hooks/background.js.map +1 -1
- package/build-module/hooks/index.js +2 -1
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/layout-child.js +28 -6
- package/build-module/hooks/layout-child.js.map +1 -1
- package/build-module/hooks/layout.js +21 -10
- package/build-module/hooks/layout.js.map +1 -1
- package/build-module/hooks/position.js +1 -1
- package/build-module/hooks/position.js.map +1 -1
- package/build-module/private-apis.native.js +3 -1
- package/build-module/private-apis.native.js.map +1 -1
- package/build-module/store/reducer.js +31 -26
- package/build-module/store/reducer.js.map +1 -1
- package/build-style/content-rtl.css +14 -0
- package/build-style/content.css +14 -0
- package/build-style/style-rtl.css +8 -20
- package/build-style/style.css +8 -20
- package/package.json +31 -31
- package/src/components/block-actions/index.js +2 -8
- package/src/components/block-bindings-toolbar-indicator/style.scss +10 -8
- package/src/components/block-heading-level-dropdown/README.md +5 -5
- package/src/components/block-heading-level-dropdown/index.js +5 -5
- package/src/components/block-heading-level-dropdown/index.native.js +5 -4
- package/src/components/block-list/block-crash-boundary.native.js +43 -0
- package/src/components/block-list/block-crash-warning.native.js +19 -0
- package/src/components/block-list/block.native.js +14 -7
- package/src/components/block-list/content.scss +16 -0
- package/src/components/block-settings/container.native.js +5 -1
- package/src/components/block-settings-menu/block-settings-dropdown.js +41 -56
- package/src/components/block-settings-menu-controls/README.md +0 -9
- package/src/components/block-settings-menu-controls/index.js +1 -6
- package/src/components/block-toolbar/index.js +3 -1
- package/src/components/block-toolbar/shuffle.js +1 -1
- package/src/components/block-toolbar/test/index.native.js +1 -7
- package/src/components/child-layout-control/index.js +147 -35
- package/src/components/convert-to-group-buttons/toolbar.js +13 -1
- package/src/components/global-styles/dimensions-panel.js +9 -34
- package/src/components/global-styles/test/use-global-styles-output.js +31 -0
- package/src/components/global-styles/use-global-styles-output.js +3 -1
- package/src/components/global-styles/utils.js +0 -18
- package/src/components/iframe/index.js +60 -44
- package/src/components/inserter/block-patterns-explorer/index.js +2 -9
- package/src/components/inserter/block-patterns-explorer/pattern-list.js +7 -1
- package/src/components/inserter/menu.js +4 -10
- package/src/components/inserter/mobile-tab-navigation.js +1 -1
- package/src/components/inserter/search-results.js +1 -2
- package/src/components/inserter/tabs.js +1 -2
- package/src/components/inspector-controls-tabs/advanced-controls-panel.native.js +31 -0
- package/src/components/link-control/style.scss +0 -5
- package/src/components/list-view/block-select-button.js +2 -18
- package/src/components/list-view/block.js +12 -21
- package/src/components/list-view/style.scss +34 -24
- package/src/components/list-view/utils.js +4 -1
- package/src/components/rich-text/README.md +6 -0
- package/src/components/spacing-sizes-control/sides-dropdown/index.js +1 -1
- package/src/components/use-moving-animation/index.js +1 -0
- package/src/components/warning/index.native.js +19 -15
- package/src/hooks/anchor.js +41 -61
- package/src/hooks/background.js +48 -3
- package/src/hooks/index.js +2 -0
- package/src/hooks/layout-child.js +44 -8
- package/src/hooks/layout.js +22 -18
- package/src/hooks/position.js +1 -1
- package/src/hooks/test/__snapshots__/anchor.native.js.snap +7 -0
- package/src/hooks/test/anchor.native.js +32 -0
- package/src/private-apis.native.js +2 -0
- package/src/store/reducer.js +41 -41
- package/tsconfig.json +1 -0
- package/build/utils/calculate-scale.js +0 -17
- package/build/utils/calculate-scale.js.map +0 -1
- package/build-module/utils/calculate-scale.js +0 -11
- package/build-module/utils/calculate-scale.js.map +0 -1
- package/src/utils/calculate-scale.js +0 -20
|
@@ -126,15 +126,15 @@
|
|
|
126
126
|
.block-editor-block-bindings-toolbar-indicator {
|
|
127
127
|
display: inline-flex;
|
|
128
128
|
align-items: center;
|
|
129
|
-
|
|
129
|
+
justify-content: center;
|
|
130
130
|
padding: 6px;
|
|
131
131
|
}
|
|
132
|
-
.block-editor-block-bindings-toolbar-indicator svg
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
132
|
+
.block-editor-block-bindings-toolbar-indicator svg {
|
|
133
|
+
fill: var(--wp-bound-block-color);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.edit-post-header__toolbar .selected-block-tools-wrapper .block-editor-block-toolbar .block-editor-block-bindings-toolbar-indicator {
|
|
137
|
+
height: 32px;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
iframe[name=editor-canvas] {
|
|
@@ -1934,10 +1934,6 @@ iframe[name=editor-canvas].has-editor-padding {
|
|
|
1934
1934
|
left: 19px;
|
|
1935
1935
|
top: 3px;
|
|
1936
1936
|
}
|
|
1937
|
-
.block-editor-link-control__search-enter svg {
|
|
1938
|
-
position: relative;
|
|
1939
|
-
top: -2px;
|
|
1940
|
-
}
|
|
1941
1937
|
|
|
1942
1938
|
.block-editor-link-control__search-actions {
|
|
1943
1939
|
padding: 8px 16px 16px;
|
|
@@ -2361,7 +2357,7 @@ iframe[name=editor-canvas].has-editor-padding {
|
|
|
2361
2357
|
}
|
|
2362
2358
|
.block-editor-list-view-leaf.is-after-dragged-blocks.is-displacement-down {
|
|
2363
2359
|
transition: transform 0.2s;
|
|
2364
|
-
transform: translateY(calc(36px + var(--wp-admin--list-view-dragged-items-height, 36px) *
|
|
2360
|
+
transform: translateY(calc(36px + var(--wp-admin--list-view-dragged-items-height, 36px) * -1));
|
|
2365
2361
|
}
|
|
2366
2362
|
@media (prefers-reduced-motion: reduce) {
|
|
2367
2363
|
.block-editor-list-view-leaf.is-after-dragged-blocks.is-displacement-down {
|
|
@@ -2708,14 +2704,6 @@ iframe[name=editor-canvas].has-editor-padding {
|
|
|
2708
2704
|
display: none;
|
|
2709
2705
|
}
|
|
2710
2706
|
|
|
2711
|
-
.block-editor-list-view-block-select-button__bindings svg g {
|
|
2712
|
-
stroke: var(--wp-bound-block-color);
|
|
2713
|
-
fill: transparent;
|
|
2714
|
-
stroke-width: 1.5;
|
|
2715
|
-
stroke-linecap: round;
|
|
2716
|
-
stroke-linejoin: round;
|
|
2717
|
-
}
|
|
2718
|
-
|
|
2719
2707
|
.modal-open .block-editor-media-replace-flow__options {
|
|
2720
2708
|
display: none;
|
|
2721
2709
|
}
|
package/build-style/style.css
CHANGED
|
@@ -126,15 +126,15 @@
|
|
|
126
126
|
.block-editor-block-bindings-toolbar-indicator {
|
|
127
127
|
display: inline-flex;
|
|
128
128
|
align-items: center;
|
|
129
|
-
|
|
129
|
+
justify-content: center;
|
|
130
130
|
padding: 6px;
|
|
131
131
|
}
|
|
132
|
-
.block-editor-block-bindings-toolbar-indicator svg
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
132
|
+
.block-editor-block-bindings-toolbar-indicator svg {
|
|
133
|
+
fill: var(--wp-bound-block-color);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.edit-post-header__toolbar .selected-block-tools-wrapper .block-editor-block-toolbar .block-editor-block-bindings-toolbar-indicator {
|
|
137
|
+
height: 32px;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
iframe[name=editor-canvas] {
|
|
@@ -1935,10 +1935,6 @@ iframe[name=editor-canvas].has-editor-padding {
|
|
|
1935
1935
|
right: 19px;
|
|
1936
1936
|
top: 3px;
|
|
1937
1937
|
}
|
|
1938
|
-
.block-editor-link-control__search-enter svg {
|
|
1939
|
-
position: relative;
|
|
1940
|
-
top: -2px;
|
|
1941
|
-
}
|
|
1942
1938
|
|
|
1943
1939
|
.block-editor-link-control__search-actions {
|
|
1944
1940
|
padding: 8px 16px 16px;
|
|
@@ -2362,7 +2358,7 @@ iframe[name=editor-canvas].has-editor-padding {
|
|
|
2362
2358
|
}
|
|
2363
2359
|
.block-editor-list-view-leaf.is-after-dragged-blocks.is-displacement-down {
|
|
2364
2360
|
transition: transform 0.2s;
|
|
2365
|
-
transform: translateY(calc(36px + var(--wp-admin--list-view-dragged-items-height, 36px) *
|
|
2361
|
+
transform: translateY(calc(36px + var(--wp-admin--list-view-dragged-items-height, 36px) * -1));
|
|
2366
2362
|
}
|
|
2367
2363
|
@media (prefers-reduced-motion: reduce) {
|
|
2368
2364
|
.block-editor-list-view-leaf.is-after-dragged-blocks.is-displacement-down {
|
|
@@ -2709,14 +2705,6 @@ iframe[name=editor-canvas].has-editor-padding {
|
|
|
2709
2705
|
display: none;
|
|
2710
2706
|
}
|
|
2711
2707
|
|
|
2712
|
-
.block-editor-list-view-block-select-button__bindings svg g {
|
|
2713
|
-
stroke: var(--wp-bound-block-color);
|
|
2714
|
-
fill: transparent;
|
|
2715
|
-
stroke-width: 1.5;
|
|
2716
|
-
stroke-linecap: round;
|
|
2717
|
-
stroke-linejoin: round;
|
|
2718
|
-
}
|
|
2719
|
-
|
|
2720
2708
|
.modal-open .block-editor-media-replace-flow__options {
|
|
2721
2709
|
display: none;
|
|
2722
2710
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-editor",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.22.0",
|
|
4
4
|
"description": "Generic block editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -35,35 +35,35 @@
|
|
|
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": "^27.
|
|
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/style-engine": "^1.
|
|
63
|
-
"@wordpress/token-list": "^2.
|
|
64
|
-
"@wordpress/url": "^3.
|
|
65
|
-
"@wordpress/warning": "^2.
|
|
66
|
-
"@wordpress/wordcount": "^3.
|
|
38
|
+
"@wordpress/a11y": "^3.54.0",
|
|
39
|
+
"@wordpress/api-fetch": "^6.51.0",
|
|
40
|
+
"@wordpress/blob": "^3.54.0",
|
|
41
|
+
"@wordpress/blocks": "^12.31.0",
|
|
42
|
+
"@wordpress/commands": "^0.25.0",
|
|
43
|
+
"@wordpress/components": "^27.2.0",
|
|
44
|
+
"@wordpress/compose": "^6.31.0",
|
|
45
|
+
"@wordpress/data": "^9.24.0",
|
|
46
|
+
"@wordpress/date": "^4.54.0",
|
|
47
|
+
"@wordpress/deprecated": "^3.54.0",
|
|
48
|
+
"@wordpress/dom": "^3.54.0",
|
|
49
|
+
"@wordpress/element": "^5.31.0",
|
|
50
|
+
"@wordpress/escape-html": "^2.54.0",
|
|
51
|
+
"@wordpress/hooks": "^3.54.0",
|
|
52
|
+
"@wordpress/html-entities": "^3.54.0",
|
|
53
|
+
"@wordpress/i18n": "^4.54.0",
|
|
54
|
+
"@wordpress/icons": "^9.45.0",
|
|
55
|
+
"@wordpress/is-shallow-equal": "^4.54.0",
|
|
56
|
+
"@wordpress/keyboard-shortcuts": "^4.31.0",
|
|
57
|
+
"@wordpress/keycodes": "^3.54.0",
|
|
58
|
+
"@wordpress/notices": "^4.22.0",
|
|
59
|
+
"@wordpress/preferences": "^3.31.0",
|
|
60
|
+
"@wordpress/private-apis": "^0.36.0",
|
|
61
|
+
"@wordpress/rich-text": "^6.31.0",
|
|
62
|
+
"@wordpress/style-engine": "^1.37.0",
|
|
63
|
+
"@wordpress/token-list": "^2.54.0",
|
|
64
|
+
"@wordpress/url": "^3.55.0",
|
|
65
|
+
"@wordpress/warning": "^2.54.0",
|
|
66
|
+
"@wordpress/wordcount": "^3.54.0",
|
|
67
67
|
"change-case": "^4.1.2",
|
|
68
68
|
"classnames": "^2.3.1",
|
|
69
69
|
"colord": "^2.7.0",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "ffc07735d0abfb3f69e91d48f25b7fe8d1ef92d2"
|
|
90
90
|
}
|
|
@@ -98,16 +98,10 @@ export default function BlockActions( {
|
|
|
98
98
|
return removeBlocks( clientIds, updateSelection );
|
|
99
99
|
},
|
|
100
100
|
onInsertBefore() {
|
|
101
|
-
|
|
102
|
-
? clientIds[ 0 ]
|
|
103
|
-
: clientId;
|
|
104
|
-
insertBeforeBlock( clientId );
|
|
101
|
+
insertBeforeBlock( clientIds[ 0 ] );
|
|
105
102
|
},
|
|
106
103
|
onInsertAfter() {
|
|
107
|
-
|
|
108
|
-
? clientIds[ clientIds.length - 1 ]
|
|
109
|
-
: clientId;
|
|
110
|
-
insertAfterBlock( clientId );
|
|
104
|
+
insertAfterBlock( clientIds[ clientIds.length - 1 ] );
|
|
111
105
|
},
|
|
112
106
|
onMoveTo() {
|
|
113
107
|
setNavigationMode( true );
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
.block-editor-block-bindings-toolbar-indicator {
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
align-items: center;
|
|
4
|
-
|
|
4
|
+
justify-content: center;
|
|
5
5
|
padding: 6px;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
stroke: var(--wp-bound-block-color);
|
|
9
|
-
fill: transparent;
|
|
10
|
-
stroke-width: 1.5;
|
|
11
|
-
stroke-linecap: round;
|
|
12
|
-
stroke-linejoin: round;
|
|
6
|
+
svg {
|
|
7
|
+
fill: var(--wp-bound-block-color);
|
|
13
8
|
}
|
|
14
9
|
}
|
|
10
|
+
|
|
11
|
+
.edit-post-header__toolbar
|
|
12
|
+
.selected-block-tools-wrapper
|
|
13
|
+
.block-editor-block-toolbar
|
|
14
|
+
.block-editor-block-bindings-toolbar-indicator {
|
|
15
|
+
height: 32px;
|
|
16
|
+
}
|
|
@@ -28,23 +28,23 @@ const MyHeadingLevelToolbar = () => (
|
|
|
28
28
|
|
|
29
29
|
#### options
|
|
30
30
|
|
|
31
|
-
The list of available
|
|
31
|
+
The list of available heading levels, passed from the block.
|
|
32
32
|
|
|
33
33
|
- Type: `Object`
|
|
34
34
|
- Required: no
|
|
35
35
|
|
|
36
36
|
#### value
|
|
37
37
|
|
|
38
|
-
The chosen
|
|
38
|
+
The chosen heading level.
|
|
39
39
|
|
|
40
|
-
- Type: `
|
|
40
|
+
- Type: `number`
|
|
41
41
|
- Required: no
|
|
42
42
|
|
|
43
43
|
#### onChange
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
Function called with the selected value changes.
|
|
46
46
|
|
|
47
|
-
- Type: `
|
|
47
|
+
- Type: `() => number`
|
|
48
48
|
- Required: yes
|
|
49
49
|
|
|
50
50
|
## Related components
|
|
@@ -22,10 +22,10 @@ const POPOVER_PROPS = {
|
|
|
22
22
|
*
|
|
23
23
|
* @typedef WPHeadingLevelDropdownProps
|
|
24
24
|
*
|
|
25
|
-
* @property {number}
|
|
26
|
-
* @property {number[]}
|
|
27
|
-
* @property {(
|
|
28
|
-
*
|
|
25
|
+
* @property {number} value The chosen heading level.
|
|
26
|
+
* @property {number[]} options An array of supported heading levels.
|
|
27
|
+
* @property {()=>number} onChange Function called with
|
|
28
|
+
* the selected value changes.
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
31
|
/**
|
|
@@ -53,7 +53,7 @@ export default function HeadingLevelDropdown( {
|
|
|
53
53
|
targetLevel === 0
|
|
54
54
|
? __( 'Paragraph' )
|
|
55
55
|
: sprintf(
|
|
56
|
-
// translators: %
|
|
56
|
+
// translators: %d: heading level e.g: "1", "2", "3"
|
|
57
57
|
__( 'Heading %d' ),
|
|
58
58
|
targetLevel
|
|
59
59
|
),
|
|
@@ -18,9 +18,10 @@ const HEADING_LEVELS = [ 1, 2, 3, 4, 5, 6 ];
|
|
|
18
18
|
*
|
|
19
19
|
* @typedef WPHeadingLevelDropdownProps
|
|
20
20
|
*
|
|
21
|
-
* @property {number}
|
|
22
|
-
* @property {
|
|
23
|
-
*
|
|
21
|
+
* @property {number} value The chosen heading level.
|
|
22
|
+
* @property {number[]} options An array of supported heading levels.
|
|
23
|
+
* @property {()=>number} onChange Function called with
|
|
24
|
+
* the selected value changes.
|
|
24
25
|
*/
|
|
25
26
|
|
|
26
27
|
/**
|
|
@@ -48,7 +49,7 @@ export default function HeadingLevelDropdown( {
|
|
|
48
49
|
isPressed={ isActive }
|
|
49
50
|
/>
|
|
50
51
|
),
|
|
51
|
-
// translators: %
|
|
52
|
+
// translators: %d: heading level e.g: "1", "2", "3"
|
|
52
53
|
title: sprintf( __( 'Heading %d' ), targetLevel ),
|
|
53
54
|
isActive,
|
|
54
55
|
onClick: () => onChangeCallback( targetLevel ),
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { Component } from '@wordpress/element';
|
|
5
|
+
import { logException } from '@wordpress/react-native-bridge';
|
|
6
|
+
|
|
7
|
+
class BlockCrashBoundary extends Component {
|
|
8
|
+
constructor() {
|
|
9
|
+
super( ...arguments );
|
|
10
|
+
|
|
11
|
+
this.state = {
|
|
12
|
+
error: null,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
static getDerivedStateFromError( error ) {
|
|
17
|
+
return { error };
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
componentDidCatch( error ) {
|
|
21
|
+
const { blockName } = this.props;
|
|
22
|
+
|
|
23
|
+
logException( error, {
|
|
24
|
+
context: {
|
|
25
|
+
component_stack: error.componentStack,
|
|
26
|
+
block_name: blockName,
|
|
27
|
+
},
|
|
28
|
+
isHandled: true,
|
|
29
|
+
handledBy: 'Block-level Error Boundary',
|
|
30
|
+
} );
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
render() {
|
|
34
|
+
const { error } = this.state;
|
|
35
|
+
if ( ! error ) {
|
|
36
|
+
return this.props.children;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return this.props.fallback;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export default BlockCrashBoundary;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { __ } from '@wordpress/i18n';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import Warning from '../warning';
|
|
10
|
+
|
|
11
|
+
const warning = (
|
|
12
|
+
<Warning
|
|
13
|
+
message={ __(
|
|
14
|
+
'This block has encountered an error and cannot be previewed.'
|
|
15
|
+
) }
|
|
16
|
+
/>
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
export default () => warning;
|
|
@@ -49,6 +49,8 @@ import { useLayout } from './layout';
|
|
|
49
49
|
import useScrollUponInsertion from './use-scroll-upon-insertion';
|
|
50
50
|
import { useSettings } from '../use-settings';
|
|
51
51
|
import { unlock } from '../../lock-unlock';
|
|
52
|
+
import BlockCrashBoundary from './block-crash-boundary';
|
|
53
|
+
import BlockCrashWarning from './block-crash-warning';
|
|
52
54
|
|
|
53
55
|
const EMPTY_ARRAY = [];
|
|
54
56
|
|
|
@@ -139,14 +141,19 @@ function BlockWrapper( {
|
|
|
139
141
|
isSelected={ isSelected }
|
|
140
142
|
name={ name }
|
|
141
143
|
/>
|
|
142
|
-
<
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
enabled={ draggingEnabled }
|
|
146
|
-
testID="draggable-trigger-content"
|
|
144
|
+
<BlockCrashBoundary
|
|
145
|
+
blockName={ name }
|
|
146
|
+
fallback={ <BlockCrashWarning /> }
|
|
147
147
|
>
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
<BlockDraggable
|
|
149
|
+
clientId={ clientId }
|
|
150
|
+
draggingClientId={ draggingClientId }
|
|
151
|
+
enabled={ draggingEnabled }
|
|
152
|
+
testID="draggable-trigger-content"
|
|
153
|
+
>
|
|
154
|
+
{ children }
|
|
155
|
+
</BlockDraggable>
|
|
156
|
+
</BlockCrashBoundary>
|
|
150
157
|
</Pressable>
|
|
151
158
|
);
|
|
152
159
|
}
|
|
@@ -360,6 +360,22 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
360
360
|
z-index: z-index("{core/image aligned left or right} .wp-block");
|
|
361
361
|
}
|
|
362
362
|
|
|
363
|
+
body.is-zoomed-out {
|
|
364
|
+
display: flex;
|
|
365
|
+
flex-direction: column;
|
|
366
|
+
|
|
367
|
+
> .is-root-container {
|
|
368
|
+
flex: 1;
|
|
369
|
+
display: flex;
|
|
370
|
+
flex-direction: column;
|
|
371
|
+
height: 100%;
|
|
372
|
+
|
|
373
|
+
> main {
|
|
374
|
+
flex: 1;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
363
379
|
.wp-site-blocks > [data-align="left"] {
|
|
364
380
|
float: left;
|
|
365
381
|
margin-right: 2em;
|
|
@@ -16,6 +16,7 @@ import styles from './container.native.scss';
|
|
|
16
16
|
import InspectorControls from '../inspector-controls';
|
|
17
17
|
import ImageLinkDestinationsScreen from '../image-link-destinations';
|
|
18
18
|
import useMultipleOriginColorsAndGradients from '../colors-gradients/use-multiple-origin-colors-and-gradients';
|
|
19
|
+
import AdvancedControls from '../inspector-controls-tabs/advanced-controls-panel';
|
|
19
20
|
|
|
20
21
|
export const blockSettingsScreens = {
|
|
21
22
|
settings: 'Settings',
|
|
@@ -46,7 +47,10 @@ export default function BottomSheetSettings( props ) {
|
|
|
46
47
|
<BottomSheet.NavigationScreen
|
|
47
48
|
name={ blockSettingsScreens.settings }
|
|
48
49
|
>
|
|
49
|
-
|
|
50
|
+
<>
|
|
51
|
+
<InspectorControls.Slot />
|
|
52
|
+
<AdvancedControls />
|
|
53
|
+
</>
|
|
50
54
|
</BottomSheet.NavigationScreen>
|
|
51
55
|
<BottomSheet.NavigationScreen
|
|
52
56
|
name={ BottomSheet.SubSheet.screenName }
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import { DropdownMenu, MenuGroup, MenuItem } from '@wordpress/components';
|
|
10
10
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
11
11
|
import { moreVertical } from '@wordpress/icons';
|
|
12
|
-
import { Children, cloneElement
|
|
12
|
+
import { Children, cloneElement } from '@wordpress/element';
|
|
13
13
|
import { __ } from '@wordpress/i18n';
|
|
14
14
|
import {
|
|
15
15
|
store as keyboardShortcutsStore,
|
|
@@ -46,18 +46,14 @@ function CopyMenuItem( { clientIds, onCopy, label } ) {
|
|
|
46
46
|
export function BlockSettingsDropdown( {
|
|
47
47
|
block,
|
|
48
48
|
clientIds,
|
|
49
|
-
__experimentalSelectBlock,
|
|
50
49
|
children,
|
|
51
|
-
|
|
50
|
+
__experimentalSelectBlock,
|
|
52
51
|
...props
|
|
53
52
|
} ) {
|
|
54
53
|
// Get the client id of the current block for this menu, if one is set.
|
|
55
54
|
const currentClientId = block?.clientId;
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
: [ clientIds ];
|
|
59
|
-
const count = blockClientIds.length;
|
|
60
|
-
const firstBlockClientId = blockClientIds[ 0 ];
|
|
55
|
+
const count = clientIds.length;
|
|
56
|
+
const firstBlockClientId = clientIds[ 0 ];
|
|
61
57
|
const {
|
|
62
58
|
firstParentClientId,
|
|
63
59
|
onlyBlock,
|
|
@@ -127,41 +123,35 @@ export function BlockSettingsDropdown( {
|
|
|
127
123
|
const isMatch = __unstableUseShortcutEventMatch();
|
|
128
124
|
const hasSelectedBlocks = selectedBlockClientIds.length > 0;
|
|
129
125
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
if ( ids && ids[ 0 ] ) {
|
|
135
|
-
__experimentalSelectBlock( ids[ 0 ], false );
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
[ __experimentalSelectBlock ]
|
|
140
|
-
);
|
|
126
|
+
async function updateSelectionAfterDuplicate( clientIdsPromise ) {
|
|
127
|
+
if ( ! __experimentalSelectBlock ) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
141
130
|
|
|
142
|
-
|
|
143
|
-
if (
|
|
144
|
-
|
|
131
|
+
const ids = await clientIdsPromise;
|
|
132
|
+
if ( ids && ids[ 0 ] ) {
|
|
133
|
+
__experimentalSelectBlock( ids[ 0 ], false );
|
|
134
|
+
}
|
|
135
|
+
}
|
|
145
136
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
137
|
+
function updateSelectionAfterRemove() {
|
|
138
|
+
if ( ! __experimentalSelectBlock ) {
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
150
141
|
|
|
151
|
-
|
|
152
|
-
const shouldUpdateSelection =
|
|
153
|
-
hasSelectedBlocks && getSelectedBlockClientIds().length === 0;
|
|
142
|
+
let blockToFocus = previousBlockClientId || firstParentClientId;
|
|
154
143
|
|
|
155
|
-
|
|
144
|
+
// Focus the first block if there's no previous block nor parent block.
|
|
145
|
+
if ( ! blockToFocus ) {
|
|
146
|
+
blockToFocus = getBlockOrder()[ 0 ];
|
|
156
147
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
] );
|
|
148
|
+
|
|
149
|
+
// Only update the selection if the original selection is removed.
|
|
150
|
+
const shouldUpdateSelection =
|
|
151
|
+
hasSelectedBlocks && getSelectedBlockClientIds().length === 0;
|
|
152
|
+
|
|
153
|
+
__experimentalSelectBlock( blockToFocus, shouldUpdateSelection );
|
|
154
|
+
}
|
|
165
155
|
|
|
166
156
|
// This can occur when the selected block (the parent)
|
|
167
157
|
// displays child blocks within a List View.
|
|
@@ -179,20 +169,17 @@ export function BlockSettingsDropdown( {
|
|
|
179
169
|
? undefined
|
|
180
170
|
: openedBlockSettingsMenu === currentClientId || false;
|
|
181
171
|
|
|
182
|
-
|
|
183
|
-
( localOpen )
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
)
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
},
|
|
194
|
-
[ currentClientId, openedBlockSettingsMenu, setOpenedBlockSettingsMenu ]
|
|
195
|
-
);
|
|
172
|
+
function onToggle( localOpen ) {
|
|
173
|
+
if ( localOpen && openedBlockSettingsMenu !== currentClientId ) {
|
|
174
|
+
setOpenedBlockSettingsMenu( currentClientId );
|
|
175
|
+
} else if (
|
|
176
|
+
! localOpen &&
|
|
177
|
+
openedBlockSettingsMenu &&
|
|
178
|
+
openedBlockSettingsMenu === currentClientId
|
|
179
|
+
) {
|
|
180
|
+
setOpenedBlockSettingsMenu( undefined );
|
|
181
|
+
}
|
|
182
|
+
}
|
|
196
183
|
|
|
197
184
|
return (
|
|
198
185
|
<BlockActions
|
|
@@ -233,7 +220,8 @@ export function BlockSettingsDropdown( {
|
|
|
233
220
|
canRemove
|
|
234
221
|
) {
|
|
235
222
|
event.preventDefault();
|
|
236
|
-
|
|
223
|
+
onRemove();
|
|
224
|
+
updateSelectionAfterRemove();
|
|
237
225
|
} else if (
|
|
238
226
|
isMatch(
|
|
239
227
|
'core/block-editor/duplicate',
|
|
@@ -349,9 +337,6 @@ export function BlockSettingsDropdown( {
|
|
|
349
337
|
firstBlockClientId,
|
|
350
338
|
} }
|
|
351
339
|
clientIds={ clientIds }
|
|
352
|
-
__unstableDisplayLocation={
|
|
353
|
-
__unstableDisplayLocation
|
|
354
|
-
}
|
|
355
340
|
/>
|
|
356
341
|
{ typeof children === 'function'
|
|
357
342
|
? children( { onClose } )
|
|
@@ -16,12 +16,3 @@ function ReusableBlocksMenuItems() {
|
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
18
|
```
|
|
19
|
-
|
|
20
|
-
## Props
|
|
21
|
-
|
|
22
|
-
### `__unstableDisplayLocation`
|
|
23
|
-
|
|
24
|
-
- **Type:** `String`
|
|
25
|
-
- **Default:** `undefined`
|
|
26
|
-
|
|
27
|
-
A string representing the location where the component is being displayed within the UI. This can be used to conditionalize certain behaviors including the display of associated components. This behaviour will likely be refactored to a React.Context implementation.
|
|
@@ -26,11 +26,7 @@ import { BlockRenameControl, useBlockRename } from '../block-rename';
|
|
|
26
26
|
|
|
27
27
|
const { Fill, Slot } = createSlotFill( 'BlockSettingsMenuControls' );
|
|
28
28
|
|
|
29
|
-
const BlockSettingsMenuControlsSlot = ( {
|
|
30
|
-
fillProps,
|
|
31
|
-
clientIds = null,
|
|
32
|
-
__unstableDisplayLocation,
|
|
33
|
-
} ) => {
|
|
29
|
+
const BlockSettingsMenuControlsSlot = ( { fillProps, clientIds = null } ) => {
|
|
34
30
|
const { selectedBlocks, selectedClientIds } = useSelect(
|
|
35
31
|
( select ) => {
|
|
36
32
|
const { getBlockNamesByClientId, getSelectedBlockClientIds } =
|
|
@@ -61,7 +57,6 @@ const BlockSettingsMenuControlsSlot = ( {
|
|
|
61
57
|
<Slot
|
|
62
58
|
fillProps={ {
|
|
63
59
|
...fillProps,
|
|
64
|
-
__unstableDisplayLocation,
|
|
65
60
|
selectedBlocks,
|
|
66
61
|
selectedClientIds,
|
|
67
62
|
} }
|