@wordpress/block-editor 11.3.3 → 11.4.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/build/components/block-popover/inbetween.js +10 -33
- package/build/components/block-popover/inbetween.js.map +1 -1
- package/build/components/block-types-list/index.native.js +2 -0
- package/build/components/block-types-list/index.native.js.map +1 -1
- package/build/components/colors-gradients/control.js +6 -3
- package/build/components/colors-gradients/control.js.map +1 -1
- package/build/components/font-appearance-control/index.js +0 -3
- package/build/components/font-appearance-control/index.js.map +1 -1
- package/build/components/global-styles/hooks.js +106 -45
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/index.js +24 -0
- package/build/components/global-styles/index.js.map +1 -1
- package/build/components/global-styles/typography-panel.js +421 -0
- package/build/components/global-styles/typography-panel.js.map +1 -0
- package/build/components/global-styles/use-global-styles-output.js +6 -2
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/iframe/index.js +17 -11
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/image-editor/aspect-ratio-dropdown.js +2 -1
- package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
- package/build/components/image-size-control/index.js +6 -11
- package/build/components/image-size-control/index.js.map +1 -1
- package/build/components/inserter/block-patterns-tab.js +9 -15
- package/build/components/inserter/block-patterns-tab.js.map +1 -1
- package/build/components/inserter/block-types-tab.native.js +4 -1
- package/build/components/inserter/block-types-tab.native.js.map +1 -1
- package/build/components/inserter/reusable-blocks-tab.native.js +4 -1
- package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
- package/build/components/inserter/search-results.native.js +4 -1
- package/build/components/inserter/search-results.native.js.map +1 -1
- package/build/components/link-control/index.js +15 -15
- package/build/components/link-control/index.js.map +1 -1
- package/build/components/link-control/settings-drawer.js +72 -30
- package/build/components/link-control/settings-drawer.js.map +1 -1
- package/build/components/link-control/settings.js +52 -0
- package/build/components/link-control/settings.js.map +1 -0
- package/build/components/list-view/index.js +6 -1
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/off-canvas-editor/block-contents.js +3 -2
- package/build/components/off-canvas-editor/block-contents.js.map +1 -1
- package/build/components/off-canvas-editor/leaf-more-menu.js +116 -0
- package/build/components/off-canvas-editor/leaf-more-menu.js.map +1 -0
- package/build/components/off-canvas-editor/link-ui.js +1 -0
- package/build/components/off-canvas-editor/link-ui.js.map +1 -1
- package/build/components/rich-text/index.js +0 -2
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/url-input/index.js +2 -2
- package/build/components/url-input/index.js.map +1 -1
- package/build/hooks/dimensions.js +6 -0
- package/build/hooks/dimensions.js.map +1 -1
- package/build/hooks/font-family.js +2 -76
- package/build/hooks/font-family.js.map +1 -1
- package/build/hooks/font-size.js +3 -51
- package/build/hooks/font-size.js.map +1 -1
- package/build/hooks/gap.js +2 -1
- package/build/hooks/gap.js.map +1 -1
- package/build/hooks/index.js +2 -0
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/line-height.js +0 -42
- package/build/hooks/line-height.js.map +1 -1
- package/build/hooks/typography.js +112 -127
- package/build/hooks/typography.js.map +1 -1
- package/build/private-apis.js +3 -0
- package/build/private-apis.js.map +1 -1
- package/build/store/selectors.js +18 -1
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/block-popover/inbetween.js +10 -33
- package/build-module/components/block-popover/inbetween.js.map +1 -1
- package/build-module/components/block-types-list/index.native.js +2 -0
- package/build-module/components/block-types-list/index.native.js.map +1 -1
- package/build-module/components/colors-gradients/control.js +6 -3
- package/build-module/components/colors-gradients/control.js.map +1 -1
- package/build-module/components/font-appearance-control/index.js +2 -1
- package/build-module/components/font-appearance-control/index.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +100 -46
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/index.js +2 -1
- package/build-module/components/global-styles/index.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js +400 -0
- package/build-module/components/global-styles/typography-panel.js.map +1 -0
- package/build-module/components/global-styles/use-global-styles-output.js +6 -2
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/iframe/index.js +17 -11
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/image-editor/aspect-ratio-dropdown.js +2 -1
- package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
- package/build-module/components/image-size-control/index.js +7 -12
- package/build-module/components/image-size-control/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab.js +9 -15
- package/build-module/components/inserter/block-patterns-tab.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.native.js +3 -1
- package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
- package/build-module/components/inserter/reusable-blocks-tab.native.js +3 -1
- package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
- package/build-module/components/inserter/search-results.native.js +3 -1
- package/build-module/components/inserter/search-results.native.js.map +1 -1
- package/build-module/components/link-control/index.js +16 -16
- package/build-module/components/link-control/index.js.map +1 -1
- package/build-module/components/link-control/settings-drawer.js +68 -30
- package/build-module/components/link-control/settings-drawer.js.map +1 -1
- package/build-module/components/link-control/settings.js +43 -0
- package/build-module/components/link-control/settings.js.map +1 -0
- package/build-module/components/list-view/index.js +6 -1
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/off-canvas-editor/block-contents.js +3 -2
- package/build-module/components/off-canvas-editor/block-contents.js.map +1 -1
- package/build-module/components/off-canvas-editor/leaf-more-menu.js +99 -0
- package/build-module/components/off-canvas-editor/leaf-more-menu.js.map +1 -0
- package/build-module/components/off-canvas-editor/link-ui.js +1 -0
- package/build-module/components/off-canvas-editor/link-ui.js.map +1 -1
- package/build-module/components/rich-text/index.js +0 -2
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/url-input/index.js +2 -2
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/hooks/dimensions.js +6 -0
- package/build-module/hooks/dimensions.js.map +1 -1
- package/build-module/hooks/font-family.js +3 -69
- package/build-module/hooks/font-family.js.map +1 -1
- package/build-module/hooks/font-size.js +6 -47
- package/build-module/hooks/font-size.js.map +1 -1
- package/build-module/hooks/gap.js +3 -2
- package/build-module/hooks/gap.js.map +1 -1
- package/build-module/hooks/index.js +1 -0
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/line-height.js +0 -38
- package/build-module/hooks/line-height.js.map +1 -1
- package/build-module/hooks/typography.js +110 -123
- package/build-module/hooks/typography.js.map +1 -1
- package/build-module/private-apis.js +2 -0
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/selectors.js +18 -1
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +35 -22
- package/build-style/style.css +35 -22
- package/package.json +31 -31
- package/src/components/block-popover/inbetween.js +21 -53
- package/src/components/block-types-list/index.native.js +2 -0
- package/src/components/colors-gradients/control.js +3 -0
- package/src/components/font-appearance-control/index.js +1 -1
- package/src/components/global-styles/hooks.js +186 -66
- package/src/components/global-styles/index.js +5 -0
- package/src/components/global-styles/typography-panel.js +403 -0
- package/src/components/global-styles/use-global-styles-output.js +6 -2
- package/src/components/iframe/index.js +20 -18
- package/src/components/image-editor/aspect-ratio-dropdown.js +1 -0
- package/src/components/image-size-control/index.js +10 -12
- package/src/components/image-size-control/style.scss +3 -21
- package/src/components/inserter/block-patterns-tab.js +9 -23
- package/src/components/inserter/block-types-tab.native.js +2 -0
- package/src/components/inserter/reusable-blocks-tab.native.js +2 -0
- package/src/components/inserter/search-results.native.js +2 -0
- package/src/components/link-control/index.js +22 -22
- package/src/components/link-control/settings-drawer.js +85 -30
- package/src/components/link-control/settings.js +41 -0
- package/src/components/link-control/style.scss +39 -7
- package/src/components/link-control/test/index.js +213 -4
- package/src/components/list-view/index.js +5 -0
- package/src/components/off-canvas-editor/block-contents.js +2 -1
- package/src/components/off-canvas-editor/leaf-more-menu.js +115 -0
- package/src/components/off-canvas-editor/link-ui.js +1 -0
- package/src/components/rich-text/index.js +0 -2
- package/src/components/url-input/index.js +3 -2
- package/src/hooks/dimensions.js +12 -0
- package/src/hooks/font-family.js +0 -58
- package/src/hooks/font-size.js +1 -36
- package/src/hooks/gap.js +9 -2
- package/src/hooks/index.js +1 -0
- package/src/hooks/line-height.js +0 -33
- package/src/hooks/typography.js +133 -212
- package/src/private-apis.js +2 -0
- package/src/store/selectors.js +16 -1
- package/build/hooks/font-appearance.js +0 -188
- package/build/hooks/font-appearance.js.map +0 -1
- package/build/hooks/letter-spacing.js +0 -129
- package/build/hooks/letter-spacing.js.map +0 -1
- package/build/hooks/text-decoration.js +0 -130
- package/build/hooks/text-decoration.js.map +0 -1
- package/build/hooks/text-transform.js +0 -130
- package/build/hooks/text-transform.js.map +0 -1
- package/build-module/hooks/font-appearance.js +0 -161
- package/build-module/hooks/font-appearance.js.map +0 -1
- package/build-module/hooks/letter-spacing.js +0 -107
- package/build-module/hooks/letter-spacing.js.map +0 -1
- package/build-module/hooks/text-decoration.js +0 -108
- package/build-module/hooks/text-decoration.js.map +0 -1
- package/build-module/hooks/text-transform.js +0 -108
- package/build-module/hooks/text-transform.js.map +0 -1
- package/src/hooks/font-appearance.js +0 -146
- package/src/hooks/letter-spacing.js +0 -101
- package/src/hooks/text-decoration.js +0 -102
- package/src/hooks/text-transform.js +0 -101
|
@@ -1455,23 +1455,9 @@
|
|
|
1455
1455
|
.block-editor-image-size-control {
|
|
1456
1456
|
margin-bottom: 1em;
|
|
1457
1457
|
}
|
|
1458
|
-
.block-editor-image-size-control .block-editor-image-size-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
}
|
|
1462
|
-
.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__width,
|
|
1463
|
-
.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__height {
|
|
1464
|
-
margin-bottom: 0.5em;
|
|
1465
|
-
}
|
|
1466
|
-
.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__width input,
|
|
1467
|
-
.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__height input {
|
|
1468
|
-
line-height: 1.25;
|
|
1469
|
-
}
|
|
1470
|
-
.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__width {
|
|
1471
|
-
margin-left: 5px;
|
|
1472
|
-
}
|
|
1473
|
-
.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__height {
|
|
1474
|
-
margin-right: 5px;
|
|
1458
|
+
.block-editor-image-size-control .block-editor-image-size-control__width,
|
|
1459
|
+
.block-editor-image-size-control .block-editor-image-size-control__height {
|
|
1460
|
+
margin-bottom: 1.115em;
|
|
1475
1461
|
}
|
|
1476
1462
|
|
|
1477
1463
|
.block-editor-block-types-list__list-item {
|
|
@@ -1742,6 +1728,7 @@
|
|
|
1742
1728
|
flex-direction: row-reverse;
|
|
1743
1729
|
justify-content: flex-start;
|
|
1744
1730
|
gap: 8px;
|
|
1731
|
+
order: 20;
|
|
1745
1732
|
}
|
|
1746
1733
|
|
|
1747
1734
|
.components-button .block-editor-link-control__search-submit .has-icon {
|
|
@@ -2028,11 +2015,40 @@
|
|
|
2028
2015
|
|
|
2029
2016
|
.block-editor-link-control__drawer {
|
|
2030
2017
|
display: flex;
|
|
2018
|
+
order: 30;
|
|
2019
|
+
flex-direction: column;
|
|
2020
|
+
flex-basis: 100%;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
.block-editor-link-control__drawer-inner {
|
|
2024
|
+
display: flex;
|
|
2025
|
+
flex-direction: column;
|
|
2026
|
+
flex-basis: 100%;
|
|
2027
|
+
margin-top: 16px;
|
|
2028
|
+
padding-top: 16px;
|
|
2029
|
+
position: relative;
|
|
2030
|
+
}
|
|
2031
|
+
.block-editor-link-control__drawer-inner::after {
|
|
2032
|
+
content: "";
|
|
2033
|
+
display: block;
|
|
2034
|
+
height: 1px;
|
|
2035
|
+
background-color: #ddd;
|
|
2036
|
+
position: absolute;
|
|
2037
|
+
right: -16px;
|
|
2038
|
+
left: -16px;
|
|
2039
|
+
top: 0;
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2042
|
+
.block-editor-link-control__tools {
|
|
2043
|
+
display: flex;
|
|
2044
|
+
flex-wrap: wrap;
|
|
2031
2045
|
align-items: center;
|
|
2032
2046
|
justify-content: space-between;
|
|
2033
|
-
border-top: 1px solid #ddd;
|
|
2034
2047
|
margin: 0;
|
|
2035
2048
|
padding: 16px;
|
|
2049
|
+
margin-top: calc(var(--wp-admin-border-width-focus) * -1);
|
|
2050
|
+
padding-top: var(--wp-admin-border-width-focus);
|
|
2051
|
+
overflow: hidden;
|
|
2036
2052
|
}
|
|
2037
2053
|
|
|
2038
2054
|
.block-editor-link-control__unlink {
|
|
@@ -2044,9 +2060,6 @@
|
|
|
2044
2060
|
flex: 1;
|
|
2045
2061
|
margin: 0;
|
|
2046
2062
|
}
|
|
2047
|
-
.block-editor-link-control__settings :last-child {
|
|
2048
|
-
margin-bottom: 0;
|
|
2049
|
-
}
|
|
2050
2063
|
.is-alternate .block-editor-link-control__settings {
|
|
2051
2064
|
border-top: 1px solid #1e1e1e;
|
|
2052
2065
|
}
|
|
@@ -2054,7 +2067,7 @@
|
|
|
2054
2067
|
.block-editor-link-control__setting {
|
|
2055
2068
|
margin-bottom: 16px;
|
|
2056
2069
|
}
|
|
2057
|
-
.block-editor-link-control__setting
|
|
2070
|
+
.block-editor-link-control__setting.block-editor-link-control__setting:last-child {
|
|
2058
2071
|
margin-bottom: 0;
|
|
2059
2072
|
}
|
|
2060
2073
|
|
package/build-style/style.css
CHANGED
|
@@ -1455,23 +1455,9 @@
|
|
|
1455
1455
|
.block-editor-image-size-control {
|
|
1456
1456
|
margin-bottom: 1em;
|
|
1457
1457
|
}
|
|
1458
|
-
.block-editor-image-size-control .block-editor-image-size-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
}
|
|
1462
|
-
.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__width,
|
|
1463
|
-
.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__height {
|
|
1464
|
-
margin-bottom: 0.5em;
|
|
1465
|
-
}
|
|
1466
|
-
.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__width input,
|
|
1467
|
-
.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__height input {
|
|
1468
|
-
line-height: 1.25;
|
|
1469
|
-
}
|
|
1470
|
-
.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__width {
|
|
1471
|
-
margin-right: 5px;
|
|
1472
|
-
}
|
|
1473
|
-
.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__height {
|
|
1474
|
-
margin-left: 5px;
|
|
1458
|
+
.block-editor-image-size-control .block-editor-image-size-control__width,
|
|
1459
|
+
.block-editor-image-size-control .block-editor-image-size-control__height {
|
|
1460
|
+
margin-bottom: 1.115em;
|
|
1475
1461
|
}
|
|
1476
1462
|
|
|
1477
1463
|
.block-editor-block-types-list__list-item {
|
|
@@ -1742,6 +1728,7 @@
|
|
|
1742
1728
|
flex-direction: row-reverse;
|
|
1743
1729
|
justify-content: flex-start;
|
|
1744
1730
|
gap: 8px;
|
|
1731
|
+
order: 20;
|
|
1745
1732
|
}
|
|
1746
1733
|
|
|
1747
1734
|
.components-button .block-editor-link-control__search-submit .has-icon {
|
|
@@ -2028,11 +2015,40 @@
|
|
|
2028
2015
|
|
|
2029
2016
|
.block-editor-link-control__drawer {
|
|
2030
2017
|
display: flex;
|
|
2018
|
+
order: 30;
|
|
2019
|
+
flex-direction: column;
|
|
2020
|
+
flex-basis: 100%;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
.block-editor-link-control__drawer-inner {
|
|
2024
|
+
display: flex;
|
|
2025
|
+
flex-direction: column;
|
|
2026
|
+
flex-basis: 100%;
|
|
2027
|
+
margin-top: 16px;
|
|
2028
|
+
padding-top: 16px;
|
|
2029
|
+
position: relative;
|
|
2030
|
+
}
|
|
2031
|
+
.block-editor-link-control__drawer-inner::after {
|
|
2032
|
+
content: "";
|
|
2033
|
+
display: block;
|
|
2034
|
+
height: 1px;
|
|
2035
|
+
background-color: #ddd;
|
|
2036
|
+
position: absolute;
|
|
2037
|
+
left: -16px;
|
|
2038
|
+
right: -16px;
|
|
2039
|
+
top: 0;
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2042
|
+
.block-editor-link-control__tools {
|
|
2043
|
+
display: flex;
|
|
2044
|
+
flex-wrap: wrap;
|
|
2031
2045
|
align-items: center;
|
|
2032
2046
|
justify-content: space-between;
|
|
2033
|
-
border-top: 1px solid #ddd;
|
|
2034
2047
|
margin: 0;
|
|
2035
2048
|
padding: 16px;
|
|
2049
|
+
margin-top: calc(var(--wp-admin-border-width-focus) * -1);
|
|
2050
|
+
padding-top: var(--wp-admin-border-width-focus);
|
|
2051
|
+
overflow: hidden;
|
|
2036
2052
|
}
|
|
2037
2053
|
|
|
2038
2054
|
.block-editor-link-control__unlink {
|
|
@@ -2044,9 +2060,6 @@
|
|
|
2044
2060
|
flex: 1;
|
|
2045
2061
|
margin: 0;
|
|
2046
2062
|
}
|
|
2047
|
-
.block-editor-link-control__settings :last-child {
|
|
2048
|
-
margin-bottom: 0;
|
|
2049
|
-
}
|
|
2050
2063
|
.is-alternate .block-editor-link-control__settings {
|
|
2051
2064
|
border-top: 1px solid #1e1e1e;
|
|
2052
2065
|
}
|
|
@@ -2054,7 +2067,7 @@
|
|
|
2054
2067
|
.block-editor-link-control__setting {
|
|
2055
2068
|
margin-bottom: 16px;
|
|
2056
2069
|
}
|
|
2057
|
-
.block-editor-link-control__setting
|
|
2070
|
+
.block-editor-link-control__setting.block-editor-link-control__setting:last-child {
|
|
2058
2071
|
margin-bottom: 0;
|
|
2059
2072
|
}
|
|
2060
2073
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-editor",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.4.0",
|
|
4
4
|
"description": "Generic block editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -33,35 +33,35 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.16.0",
|
|
35
35
|
"@react-spring/web": "^9.4.5",
|
|
36
|
-
"@wordpress/a11y": "^3.
|
|
37
|
-
"@wordpress/api-fetch": "^6.
|
|
38
|
-
"@wordpress/blob": "^3.
|
|
39
|
-
"@wordpress/blocks": "^12.
|
|
40
|
-
"@wordpress/components": "^23.
|
|
41
|
-
"@wordpress/compose": "^6.
|
|
42
|
-
"@wordpress/data": "^8.
|
|
43
|
-
"@wordpress/date": "^4.
|
|
44
|
-
"@wordpress/deprecated": "^3.
|
|
45
|
-
"@wordpress/dom": "^3.
|
|
46
|
-
"@wordpress/element": "^5.
|
|
47
|
-
"@wordpress/escape-html": "^2.
|
|
48
|
-
"@wordpress/hooks": "^3.
|
|
49
|
-
"@wordpress/html-entities": "^3.
|
|
50
|
-
"@wordpress/i18n": "^4.
|
|
51
|
-
"@wordpress/icons": "^9.
|
|
52
|
-
"@wordpress/is-shallow-equal": "^4.
|
|
53
|
-
"@wordpress/keyboard-shortcuts": "^4.
|
|
54
|
-
"@wordpress/keycodes": "^3.
|
|
55
|
-
"@wordpress/notices": "^3.
|
|
56
|
-
"@wordpress/preferences": "^3.
|
|
57
|
-
"@wordpress/private-apis": "^0.
|
|
58
|
-
"@wordpress/rich-text": "^6.
|
|
59
|
-
"@wordpress/shortcode": "^3.
|
|
60
|
-
"@wordpress/style-engine": "^1.
|
|
61
|
-
"@wordpress/token-list": "^2.
|
|
62
|
-
"@wordpress/url": "^3.
|
|
63
|
-
"@wordpress/warning": "^2.
|
|
64
|
-
"@wordpress/wordcount": "^3.
|
|
36
|
+
"@wordpress/a11y": "^3.27.0",
|
|
37
|
+
"@wordpress/api-fetch": "^6.24.0",
|
|
38
|
+
"@wordpress/blob": "^3.27.0",
|
|
39
|
+
"@wordpress/blocks": "^12.4.0",
|
|
40
|
+
"@wordpress/components": "^23.4.0",
|
|
41
|
+
"@wordpress/compose": "^6.4.0",
|
|
42
|
+
"@wordpress/data": "^8.4.0",
|
|
43
|
+
"@wordpress/date": "^4.27.0",
|
|
44
|
+
"@wordpress/deprecated": "^3.27.0",
|
|
45
|
+
"@wordpress/dom": "^3.27.0",
|
|
46
|
+
"@wordpress/element": "^5.4.0",
|
|
47
|
+
"@wordpress/escape-html": "^2.27.0",
|
|
48
|
+
"@wordpress/hooks": "^3.27.0",
|
|
49
|
+
"@wordpress/html-entities": "^3.27.0",
|
|
50
|
+
"@wordpress/i18n": "^4.27.0",
|
|
51
|
+
"@wordpress/icons": "^9.18.0",
|
|
52
|
+
"@wordpress/is-shallow-equal": "^4.27.0",
|
|
53
|
+
"@wordpress/keyboard-shortcuts": "^4.4.0",
|
|
54
|
+
"@wordpress/keycodes": "^3.27.0",
|
|
55
|
+
"@wordpress/notices": "^3.27.0",
|
|
56
|
+
"@wordpress/preferences": "^3.4.0",
|
|
57
|
+
"@wordpress/private-apis": "^0.9.0",
|
|
58
|
+
"@wordpress/rich-text": "^6.4.0",
|
|
59
|
+
"@wordpress/shortcode": "^3.27.0",
|
|
60
|
+
"@wordpress/style-engine": "^1.10.0",
|
|
61
|
+
"@wordpress/token-list": "^2.27.0",
|
|
62
|
+
"@wordpress/url": "^3.28.0",
|
|
63
|
+
"@wordpress/warning": "^2.27.0",
|
|
64
|
+
"@wordpress/wordcount": "^3.27.0",
|
|
65
65
|
"change-case": "^4.1.2",
|
|
66
66
|
"classnames": "^2.3.1",
|
|
67
67
|
"colord": "^2.7.0",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"publishConfig": {
|
|
84
84
|
"access": "public"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "c25ff895413bad4354c55c0c2d732552618b0d56"
|
|
87
87
|
}
|
|
@@ -68,53 +68,6 @@ function BlockPopoverInbetween( {
|
|
|
68
68
|
const previousElement = useBlockElement( previousClientId );
|
|
69
69
|
const nextElement = useBlockElement( nextClientId );
|
|
70
70
|
const isVertical = orientation === 'vertical';
|
|
71
|
-
const style = useMemo( () => {
|
|
72
|
-
if (
|
|
73
|
-
// popoverRecomputeCounter is by definition always equal or greater than 0.
|
|
74
|
-
// This check is only there to satisfy the correctness of the
|
|
75
|
-
// exhaustive-deps rule for the `useMemo` hook.
|
|
76
|
-
popoverRecomputeCounter < 0 ||
|
|
77
|
-
( ! previousElement && ! nextElement ) ||
|
|
78
|
-
! isVisible
|
|
79
|
-
) {
|
|
80
|
-
return {};
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
const previousRect = previousElement
|
|
84
|
-
? previousElement.getBoundingClientRect()
|
|
85
|
-
: null;
|
|
86
|
-
const nextRect = nextElement
|
|
87
|
-
? nextElement.getBoundingClientRect()
|
|
88
|
-
: null;
|
|
89
|
-
|
|
90
|
-
if ( isVertical ) {
|
|
91
|
-
return {
|
|
92
|
-
width: previousRect ? previousRect.width : nextRect.width,
|
|
93
|
-
height:
|
|
94
|
-
nextRect && previousRect
|
|
95
|
-
? nextRect.top - previousRect.bottom
|
|
96
|
-
: 0,
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
let width = 0;
|
|
101
|
-
if ( previousRect && nextRect ) {
|
|
102
|
-
width = isRTL()
|
|
103
|
-
? previousRect.left - nextRect.right
|
|
104
|
-
: nextRect.left - previousRect.right;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return {
|
|
108
|
-
width,
|
|
109
|
-
height: previousRect ? previousRect.height : nextRect.height,
|
|
110
|
-
};
|
|
111
|
-
}, [
|
|
112
|
-
previousElement,
|
|
113
|
-
nextElement,
|
|
114
|
-
isVertical,
|
|
115
|
-
popoverRecomputeCounter,
|
|
116
|
-
isVisible,
|
|
117
|
-
] );
|
|
118
71
|
|
|
119
72
|
const popoverAnchor = useMemo( () => {
|
|
120
73
|
if (
|
|
@@ -142,10 +95,17 @@ function BlockPopoverInbetween( {
|
|
|
142
95
|
|
|
143
96
|
let left = 0;
|
|
144
97
|
let top = 0;
|
|
98
|
+
let width = 0;
|
|
99
|
+
let height = 0;
|
|
145
100
|
|
|
146
101
|
if ( isVertical ) {
|
|
147
102
|
// vertical
|
|
148
103
|
top = previousRect ? previousRect.bottom : nextRect.top;
|
|
104
|
+
width = previousRect ? previousRect.width : nextRect.width;
|
|
105
|
+
height =
|
|
106
|
+
nextRect && previousRect
|
|
107
|
+
? nextRect.top - previousRect.bottom
|
|
108
|
+
: 0;
|
|
149
109
|
|
|
150
110
|
if ( isRTL() ) {
|
|
151
111
|
// vertical, rtl
|
|
@@ -158,21 +118,32 @@ function BlockPopoverInbetween( {
|
|
|
158
118
|
}
|
|
159
119
|
} else {
|
|
160
120
|
top = previousRect ? previousRect.top : nextRect.top;
|
|
121
|
+
height = previousRect
|
|
122
|
+
? previousRect.height
|
|
123
|
+
: nextRect.height;
|
|
161
124
|
|
|
162
125
|
if ( isRTL() ) {
|
|
163
126
|
// non vertical, rtl
|
|
164
127
|
left = previousRect
|
|
165
128
|
? previousRect.left
|
|
166
129
|
: nextRect.right;
|
|
130
|
+
width =
|
|
131
|
+
previousRect && nextRect
|
|
132
|
+
? previousRect.left - nextRect.right
|
|
133
|
+
: 0;
|
|
167
134
|
} else {
|
|
168
135
|
// non vertical, ltr
|
|
169
136
|
left = previousRect
|
|
170
137
|
? previousRect.right
|
|
171
138
|
: nextRect.left;
|
|
139
|
+
width =
|
|
140
|
+
previousRect && nextRect
|
|
141
|
+
? nextRect.left - previousRect.right
|
|
142
|
+
: 0;
|
|
172
143
|
}
|
|
173
144
|
}
|
|
174
145
|
|
|
175
|
-
return new window.DOMRect( left, top,
|
|
146
|
+
return new window.DOMRect( left, top, width, height );
|
|
176
147
|
},
|
|
177
148
|
};
|
|
178
149
|
}, [
|
|
@@ -267,13 +238,10 @@ function BlockPopoverInbetween( {
|
|
|
267
238
|
) }
|
|
268
239
|
resize={ false }
|
|
269
240
|
flip={ false }
|
|
270
|
-
placement="
|
|
241
|
+
placement="overlay"
|
|
271
242
|
variant="unstyled"
|
|
272
243
|
>
|
|
273
|
-
<div
|
|
274
|
-
className="block-editor-block-popover__inbetween-container"
|
|
275
|
-
style={ style }
|
|
276
|
-
>
|
|
244
|
+
<div className="block-editor-block-popover__inbetween-container">
|
|
277
245
|
{ children }
|
|
278
246
|
</div>
|
|
279
247
|
</Popover>
|
|
@@ -32,6 +32,7 @@ export default function BlockTypesList( {
|
|
|
32
32
|
name,
|
|
33
33
|
sections,
|
|
34
34
|
onSelect,
|
|
35
|
+
label,
|
|
35
36
|
listProps,
|
|
36
37
|
initialNumToRender = 3,
|
|
37
38
|
} ) {
|
|
@@ -154,6 +155,7 @@ export default function BlockTypesList( {
|
|
|
154
155
|
<SectionList
|
|
155
156
|
onLayout={ onLayout }
|
|
156
157
|
testID={ `InserterUI-${ name }` }
|
|
158
|
+
accessibilityLabel={ label }
|
|
157
159
|
keyboardShouldPersistTaps="always"
|
|
158
160
|
sections={ sections }
|
|
159
161
|
initialNumToRender={ initialNumToRender }
|
|
@@ -55,6 +55,7 @@ function ColorGradientControlInner( {
|
|
|
55
55
|
clearable,
|
|
56
56
|
showTitle = true,
|
|
57
57
|
enableAlpha,
|
|
58
|
+
headingLevel,
|
|
58
59
|
} ) {
|
|
59
60
|
const canChooseAColor =
|
|
60
61
|
onColorChange && ( ! isEmpty( colors ) || ! disableCustomColors );
|
|
@@ -84,6 +85,7 @@ function ColorGradientControlInner( {
|
|
|
84
85
|
}
|
|
85
86
|
clearable={ clearable }
|
|
86
87
|
enableAlpha={ enableAlpha }
|
|
88
|
+
headingLevel={ headingLevel }
|
|
87
89
|
/>
|
|
88
90
|
),
|
|
89
91
|
[ TAB_GRADIENT.value ]: (
|
|
@@ -103,6 +105,7 @@ function ColorGradientControlInner( {
|
|
|
103
105
|
__experimentalIsRenderedInSidebar
|
|
104
106
|
}
|
|
105
107
|
clearable={ clearable }
|
|
108
|
+
headingLevel={ headingLevel }
|
|
106
109
|
/>
|
|
107
110
|
),
|
|
108
111
|
};
|
|
@@ -63,7 +63,7 @@ const FONT_WEIGHTS = [
|
|
|
63
63
|
* @param {boolean} hasFontWeights Whether font weights are enabled and present.
|
|
64
64
|
* @return {string} A label representing what font appearance is being edited.
|
|
65
65
|
*/
|
|
66
|
-
|
|
66
|
+
const getFontAppearanceLabel = ( hasFontStyles, hasFontWeights ) => {
|
|
67
67
|
if ( ! hasFontStyles ) {
|
|
68
68
|
return __( 'Font weight' );
|
|
69
69
|
}
|