@wordpress/block-editor 12.3.6 → 12.3.8
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/README.md +0 -4
- package/build/components/block-draggable/index.js +6 -3
- package/build/components/block-draggable/index.js.map +1 -1
- package/build/components/block-removal-warning-modal/index.js +15 -25
- package/build/components/block-removal-warning-modal/index.js.map +1 -1
- package/build/components/colors-gradients/control.js +4 -2
- package/build/components/colors-gradients/control.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +13 -2
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/iframe/index.js +16 -3
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/iframe/use-compatibility-styles.js +5 -0
- package/build/components/iframe/use-compatibility-styles.js.map +1 -1
- package/build/components/index.js +1 -10
- package/build/components/index.js.map +1 -1
- package/build/components/inserter/reusable-block-rename-hint.js +23 -3
- package/build/components/inserter/reusable-block-rename-hint.js.map +1 -1
- package/build/components/link-control/constants.js +1 -1
- package/build/components/link-control/constants.js.map +1 -1
- package/build/components/link-control/search-create-button.js +5 -21
- package/build/components/link-control/search-create-button.js.map +1 -1
- package/build/components/link-control/search-item.js +13 -30
- package/build/components/link-control/search-item.js.map +1 -1
- package/build/components/link-control/search-results.js +2 -2
- package/build/components/link-control/search-results.js.map +1 -1
- package/build/components/rich-text/get-rich-text-values.js +7 -1
- package/build/components/rich-text/get-rich-text-values.js.map +1 -1
- package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js +1 -1
- package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/axial.js +6 -2
- package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/separated.js +5 -1
- package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/single.js +5 -1
- package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -1
- package/build/components/spacing-sizes-control/utils.js +1 -1
- package/build/components/spacing-sizes-control/utils.js.map +1 -1
- package/build/components/use-block-display-information/index.js +7 -3
- package/build/components/use-block-display-information/index.js.map +1 -1
- package/build/hooks/margin.js +1 -1
- package/build/hooks/margin.js.map +1 -1
- package/build/hooks/padding.js +1 -1
- package/build/hooks/padding.js.map +1 -1
- package/build/private-apis.js +5 -1
- package/build/private-apis.js.map +1 -1
- package/build/store/index.js +10 -1
- package/build/store/index.js.map +1 -1
- package/build/store/private-actions.js +36 -36
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +3 -3
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +16 -8
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +1 -1
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/block-draggable/index.js +6 -3
- package/build-module/components/block-draggable/index.js.map +1 -1
- package/build-module/components/block-removal-warning-modal/index.js +16 -23
- package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
- package/build-module/components/colors-gradients/control.js +3 -2
- package/build-module/components/colors-gradients/control.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +13 -2
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/iframe/index.js +16 -3
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/iframe/use-compatibility-styles.js +5 -0
- package/build-module/components/iframe/use-compatibility-styles.js.map +1 -1
- package/build-module/components/index.js +0 -5
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/inserter/reusable-block-rename-hint.js +22 -3
- package/build-module/components/inserter/reusable-block-rename-hint.js.map +1 -1
- package/build-module/components/link-control/constants.js +1 -1
- package/build-module/components/link-control/constants.js.map +1 -1
- package/build-module/components/link-control/search-create-button.js +7 -20
- package/build-module/components/link-control/search-create-button.js.map +1 -1
- package/build-module/components/link-control/search-item.js +14 -28
- package/build-module/components/link-control/search-item.js.map +1 -1
- package/build-module/components/link-control/search-results.js +3 -3
- package/build-module/components/link-control/search-results.js.map +1 -1
- package/build-module/components/rich-text/get-rich-text-values.js +7 -1
- package/build-module/components/rich-text/get-rich-text-values.js.map +1 -1
- package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js +1 -1
- package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/axial.js +7 -3
- package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/separated.js +6 -2
- package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/single.js +6 -2
- package/build-module/components/spacing-sizes-control/input-controls/single.js.map +1 -1
- package/build-module/components/spacing-sizes-control/utils.js +1 -1
- package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
- package/build-module/components/use-block-display-information/index.js +7 -3
- package/build-module/components/use-block-display-information/index.js.map +1 -1
- package/build-module/hooks/margin.js +1 -1
- package/build-module/hooks/margin.js.map +1 -1
- package/build-module/hooks/padding.js +1 -1
- package/build-module/hooks/padding.js.map +1 -1
- package/build-module/private-apis.js +4 -1
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/index.js +10 -1
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/private-actions.js +35 -32
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +2 -2
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +16 -8
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +1 -1
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +20 -83
- package/build-style/style.css +20 -83
- package/package.json +10 -10
- package/src/components/block-draggable/index.js +13 -4
- package/src/components/block-removal-warning-modal/index.js +13 -27
- package/src/components/colors-gradients/control.js +3 -2
- package/src/components/global-styles/dimensions-panel.js +8 -2
- package/src/components/iframe/index.js +15 -10
- package/src/components/iframe/use-compatibility-styles.js +5 -0
- package/src/components/index.js +0 -5
- package/src/components/inserter/reusable-block-rename-hint.js +18 -1
- package/src/components/link-control/constants.js +1 -1
- package/src/components/link-control/search-create-button.js +8 -26
- package/src/components/link-control/search-item.js +21 -43
- package/src/components/link-control/search-results.js +48 -46
- package/src/components/link-control/style.scss +25 -95
- package/src/components/link-control/test/index.js +6 -7
- package/src/components/rich-text/get-rich-text-values.js +11 -1
- package/src/components/spacing-sizes-control/hooks/use-spacing-sizes.js +1 -1
- package/src/components/spacing-sizes-control/input-controls/axial.js +17 -2
- package/src/components/spacing-sizes-control/input-controls/separated.js +17 -2
- package/src/components/spacing-sizes-control/input-controls/single.js +12 -2
- package/src/components/spacing-sizes-control/utils.js +1 -1
- package/src/components/use-block-display-information/index.js +12 -5
- package/src/hooks/margin.js +4 -1
- package/src/hooks/padding.js +4 -1
- package/src/private-apis.js +6 -0
- package/src/store/index.js +10 -0
- package/src/store/private-actions.js +33 -36
- package/src/store/private-selectors.js +2 -2
- package/src/store/reducer.js +16 -8
- package/src/store/selectors.js +1 -1
- package/src/store/test/actions.js +3 -0
- package/src/store/test/selectors.js +1 -1
|
@@ -1897,6 +1897,7 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
1897
1897
|
}
|
|
1898
1898
|
|
|
1899
1899
|
.block-editor-link-control__search-input-wrapper {
|
|
1900
|
+
margin-bottom: 8px;
|
|
1900
1901
|
position: relative;
|
|
1901
1902
|
}
|
|
1902
1903
|
|
|
@@ -1973,32 +1974,9 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
1973
1974
|
order: 20;
|
|
1974
1975
|
}
|
|
1975
1976
|
|
|
1976
|
-
.block-editor-link-control__search-results-wrapper {
|
|
1977
|
-
position: relative;
|
|
1978
|
-
}
|
|
1979
|
-
.block-editor-link-control__search-results-wrapper::before, .block-editor-link-control__search-results-wrapper::after {
|
|
1980
|
-
content: "";
|
|
1981
|
-
position: absolute;
|
|
1982
|
-
right: -1px;
|
|
1983
|
-
left: 16px;
|
|
1984
|
-
display: block;
|
|
1985
|
-
pointer-events: none;
|
|
1986
|
-
z-index: 100;
|
|
1987
|
-
}
|
|
1988
|
-
.block-editor-link-control__search-results-wrapper::before {
|
|
1989
|
-
height: 8px;
|
|
1990
|
-
top: 0;
|
|
1991
|
-
bottom: auto;
|
|
1992
|
-
}
|
|
1993
|
-
.block-editor-link-control__search-results-wrapper::after {
|
|
1994
|
-
height: 16px;
|
|
1995
|
-
bottom: 0;
|
|
1996
|
-
top: auto;
|
|
1997
|
-
}
|
|
1998
|
-
|
|
1999
1977
|
.block-editor-link-control__search-results {
|
|
2000
|
-
margin:
|
|
2001
|
-
padding: 8px
|
|
1978
|
+
margin-top: -16px;
|
|
1979
|
+
padding: 8px;
|
|
2002
1980
|
max-height: 200px;
|
|
2003
1981
|
overflow-y: auto;
|
|
2004
1982
|
}
|
|
@@ -2006,35 +1984,29 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
2006
1984
|
opacity: 0.2;
|
|
2007
1985
|
}
|
|
2008
1986
|
|
|
2009
|
-
.block-editor-link-control__search-item {
|
|
2010
|
-
position: relative;
|
|
2011
|
-
display: flex;
|
|
2012
|
-
align-items: flex-start;
|
|
2013
|
-
font-size: 13px;
|
|
2014
|
-
cursor: pointer;
|
|
2015
|
-
background: #fff;
|
|
2016
|
-
width: 100%;
|
|
2017
|
-
border: none;
|
|
2018
|
-
text-align: right;
|
|
2019
|
-
padding: 12px 16px;
|
|
2020
|
-
border-radius: 2px;
|
|
1987
|
+
.block-editor-link-control__search-item.components-button.components-menu-item__button {
|
|
2021
1988
|
height: auto;
|
|
1989
|
+
text-align: right;
|
|
2022
1990
|
}
|
|
2023
|
-
.block-editor-link-control__search-item
|
|
2024
|
-
|
|
1991
|
+
.block-editor-link-control__search-item .components-menu-item__item {
|
|
1992
|
+
overflow: hidden;
|
|
1993
|
+
text-overflow: ellipsis;
|
|
1994
|
+
display: inline-block;
|
|
1995
|
+
width: 100%;
|
|
2025
1996
|
}
|
|
2026
|
-
.block-editor-link-control__search-item
|
|
2027
|
-
|
|
1997
|
+
.block-editor-link-control__search-item .components-menu-item__item mark {
|
|
1998
|
+
font-weight: 600;
|
|
1999
|
+
color: inherit;
|
|
2000
|
+
background-color: transparent;
|
|
2028
2001
|
}
|
|
2029
|
-
.block-editor-link-control__search-item
|
|
2030
|
-
|
|
2002
|
+
.block-editor-link-control__search-item .components-menu-item__shortcut {
|
|
2003
|
+
color: #757575;
|
|
2004
|
+
text-transform: capitalize;
|
|
2005
|
+
white-space: nowrap;
|
|
2031
2006
|
}
|
|
2032
|
-
.block-editor-link-control__search-item
|
|
2007
|
+
.block-editor-link-control__search-item[aria-selected] {
|
|
2033
2008
|
background: #f0f0f0;
|
|
2034
2009
|
}
|
|
2035
|
-
.block-editor-link-control__search-item.is-selected .block-editor-link-control__search-item-type {
|
|
2036
|
-
background: #fff;
|
|
2037
|
-
}
|
|
2038
2010
|
.block-editor-link-control__search-item.is-current {
|
|
2039
2011
|
flex-direction: column;
|
|
2040
2012
|
background: transparent;
|
|
@@ -2063,7 +2035,6 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
2063
2035
|
}
|
|
2064
2036
|
.block-editor-link-control__search-item .block-editor-link-control__search-item-icon {
|
|
2065
2037
|
position: relative;
|
|
2066
|
-
top: 0.2em;
|
|
2067
2038
|
margin-left: 8px;
|
|
2068
2039
|
max-height: 24px;
|
|
2069
2040
|
flex-shrink: 0;
|
|
@@ -2079,17 +2050,6 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
2079
2050
|
width: 32px;
|
|
2080
2051
|
max-height: 32px;
|
|
2081
2052
|
}
|
|
2082
|
-
.block-editor-link-control__search-item .block-editor-link-control__search-item-info,
|
|
2083
|
-
.block-editor-link-control__search-item .block-editor-link-control__search-item-title {
|
|
2084
|
-
overflow: hidden;
|
|
2085
|
-
text-overflow: ellipsis;
|
|
2086
|
-
}
|
|
2087
|
-
.block-editor-link-control__search-item .block-editor-link-control__search-item-info .components-external-link__icon,
|
|
2088
|
-
.block-editor-link-control__search-item .block-editor-link-control__search-item-title .components-external-link__icon {
|
|
2089
|
-
position: absolute;
|
|
2090
|
-
left: 0;
|
|
2091
|
-
margin-top: 0;
|
|
2092
|
-
}
|
|
2093
2053
|
.block-editor-link-control__search-item .block-editor-link-control__search-item-title {
|
|
2094
2054
|
display: block;
|
|
2095
2055
|
margin-bottom: 0.2em;
|
|
@@ -2097,7 +2057,7 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
2097
2057
|
position: relative;
|
|
2098
2058
|
}
|
|
2099
2059
|
.block-editor-link-control__search-item .block-editor-link-control__search-item-title mark {
|
|
2100
|
-
font-weight:
|
|
2060
|
+
font-weight: 600;
|
|
2101
2061
|
color: inherit;
|
|
2102
2062
|
background-color: transparent;
|
|
2103
2063
|
}
|
|
@@ -2107,25 +2067,6 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
2107
2067
|
.block-editor-link-control__search-item .block-editor-link-control__search-item-title svg {
|
|
2108
2068
|
display: none;
|
|
2109
2069
|
}
|
|
2110
|
-
.block-editor-link-control__search-item .block-editor-link-control__search-item-info {
|
|
2111
|
-
display: block;
|
|
2112
|
-
color: #757575;
|
|
2113
|
-
font-size: 0.9em;
|
|
2114
|
-
line-height: 1.3;
|
|
2115
|
-
}
|
|
2116
|
-
.block-editor-link-control__search-item .block-editor-link-control__search-item-error-notice {
|
|
2117
|
-
font-style: italic;
|
|
2118
|
-
font-size: 1.1em;
|
|
2119
|
-
}
|
|
2120
|
-
.block-editor-link-control__search-item .block-editor-link-control__search-item-type {
|
|
2121
|
-
display: block;
|
|
2122
|
-
padding: 3px 6px;
|
|
2123
|
-
margin-right: auto;
|
|
2124
|
-
font-size: 0.9em;
|
|
2125
|
-
background-color: #f0f0f0;
|
|
2126
|
-
border-radius: 2px;
|
|
2127
|
-
white-space: nowrap;
|
|
2128
|
-
}
|
|
2129
2070
|
.block-editor-link-control__search-item .block-editor-link-control__search-item-description {
|
|
2130
2071
|
padding-top: 12px;
|
|
2131
2072
|
margin: 0;
|
|
@@ -2240,10 +2181,6 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
2240
2181
|
top: 0;
|
|
2241
2182
|
}
|
|
2242
2183
|
|
|
2243
|
-
.block-editor-link-control__search-results div[role=menu] > .block-editor-link-control__search-item.block-editor-link-control__search-item {
|
|
2244
|
-
padding: 10px;
|
|
2245
|
-
}
|
|
2246
|
-
|
|
2247
2184
|
.block-editor-link-control__drawer {
|
|
2248
2185
|
display: flex;
|
|
2249
2186
|
order: 30;
|
package/build-style/style.css
CHANGED
|
@@ -1898,6 +1898,7 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
1898
1898
|
}
|
|
1899
1899
|
|
|
1900
1900
|
.block-editor-link-control__search-input-wrapper {
|
|
1901
|
+
margin-bottom: 8px;
|
|
1901
1902
|
position: relative;
|
|
1902
1903
|
}
|
|
1903
1904
|
|
|
@@ -1974,32 +1975,9 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
1974
1975
|
order: 20;
|
|
1975
1976
|
}
|
|
1976
1977
|
|
|
1977
|
-
.block-editor-link-control__search-results-wrapper {
|
|
1978
|
-
position: relative;
|
|
1979
|
-
}
|
|
1980
|
-
.block-editor-link-control__search-results-wrapper::before, .block-editor-link-control__search-results-wrapper::after {
|
|
1981
|
-
content: "";
|
|
1982
|
-
position: absolute;
|
|
1983
|
-
left: -1px;
|
|
1984
|
-
right: 16px;
|
|
1985
|
-
display: block;
|
|
1986
|
-
pointer-events: none;
|
|
1987
|
-
z-index: 100;
|
|
1988
|
-
}
|
|
1989
|
-
.block-editor-link-control__search-results-wrapper::before {
|
|
1990
|
-
height: 8px;
|
|
1991
|
-
top: 0;
|
|
1992
|
-
bottom: auto;
|
|
1993
|
-
}
|
|
1994
|
-
.block-editor-link-control__search-results-wrapper::after {
|
|
1995
|
-
height: 16px;
|
|
1996
|
-
bottom: 0;
|
|
1997
|
-
top: auto;
|
|
1998
|
-
}
|
|
1999
|
-
|
|
2000
1978
|
.block-editor-link-control__search-results {
|
|
2001
|
-
margin:
|
|
2002
|
-
padding: 8px
|
|
1979
|
+
margin-top: -16px;
|
|
1980
|
+
padding: 8px;
|
|
2003
1981
|
max-height: 200px;
|
|
2004
1982
|
overflow-y: auto;
|
|
2005
1983
|
}
|
|
@@ -2007,35 +1985,29 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
2007
1985
|
opacity: 0.2;
|
|
2008
1986
|
}
|
|
2009
1987
|
|
|
2010
|
-
.block-editor-link-control__search-item {
|
|
2011
|
-
position: relative;
|
|
2012
|
-
display: flex;
|
|
2013
|
-
align-items: flex-start;
|
|
2014
|
-
font-size: 13px;
|
|
2015
|
-
cursor: pointer;
|
|
2016
|
-
background: #fff;
|
|
2017
|
-
width: 100%;
|
|
2018
|
-
border: none;
|
|
2019
|
-
text-align: left;
|
|
2020
|
-
padding: 12px 16px;
|
|
2021
|
-
border-radius: 2px;
|
|
1988
|
+
.block-editor-link-control__search-item.components-button.components-menu-item__button {
|
|
2022
1989
|
height: auto;
|
|
1990
|
+
text-align: left;
|
|
2023
1991
|
}
|
|
2024
|
-
.block-editor-link-control__search-item
|
|
2025
|
-
|
|
1992
|
+
.block-editor-link-control__search-item .components-menu-item__item {
|
|
1993
|
+
overflow: hidden;
|
|
1994
|
+
text-overflow: ellipsis;
|
|
1995
|
+
display: inline-block;
|
|
1996
|
+
width: 100%;
|
|
2026
1997
|
}
|
|
2027
|
-
.block-editor-link-control__search-item
|
|
2028
|
-
|
|
1998
|
+
.block-editor-link-control__search-item .components-menu-item__item mark {
|
|
1999
|
+
font-weight: 600;
|
|
2000
|
+
color: inherit;
|
|
2001
|
+
background-color: transparent;
|
|
2029
2002
|
}
|
|
2030
|
-
.block-editor-link-control__search-item
|
|
2031
|
-
|
|
2003
|
+
.block-editor-link-control__search-item .components-menu-item__shortcut {
|
|
2004
|
+
color: #757575;
|
|
2005
|
+
text-transform: capitalize;
|
|
2006
|
+
white-space: nowrap;
|
|
2032
2007
|
}
|
|
2033
|
-
.block-editor-link-control__search-item
|
|
2008
|
+
.block-editor-link-control__search-item[aria-selected] {
|
|
2034
2009
|
background: #f0f0f0;
|
|
2035
2010
|
}
|
|
2036
|
-
.block-editor-link-control__search-item.is-selected .block-editor-link-control__search-item-type {
|
|
2037
|
-
background: #fff;
|
|
2038
|
-
}
|
|
2039
2011
|
.block-editor-link-control__search-item.is-current {
|
|
2040
2012
|
flex-direction: column;
|
|
2041
2013
|
background: transparent;
|
|
@@ -2064,7 +2036,6 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
2064
2036
|
}
|
|
2065
2037
|
.block-editor-link-control__search-item .block-editor-link-control__search-item-icon {
|
|
2066
2038
|
position: relative;
|
|
2067
|
-
top: 0.2em;
|
|
2068
2039
|
margin-right: 8px;
|
|
2069
2040
|
max-height: 24px;
|
|
2070
2041
|
flex-shrink: 0;
|
|
@@ -2080,17 +2051,6 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
2080
2051
|
width: 32px;
|
|
2081
2052
|
max-height: 32px;
|
|
2082
2053
|
}
|
|
2083
|
-
.block-editor-link-control__search-item .block-editor-link-control__search-item-info,
|
|
2084
|
-
.block-editor-link-control__search-item .block-editor-link-control__search-item-title {
|
|
2085
|
-
overflow: hidden;
|
|
2086
|
-
text-overflow: ellipsis;
|
|
2087
|
-
}
|
|
2088
|
-
.block-editor-link-control__search-item .block-editor-link-control__search-item-info .components-external-link__icon,
|
|
2089
|
-
.block-editor-link-control__search-item .block-editor-link-control__search-item-title .components-external-link__icon {
|
|
2090
|
-
position: absolute;
|
|
2091
|
-
right: 0;
|
|
2092
|
-
margin-top: 0;
|
|
2093
|
-
}
|
|
2094
2054
|
.block-editor-link-control__search-item .block-editor-link-control__search-item-title {
|
|
2095
2055
|
display: block;
|
|
2096
2056
|
margin-bottom: 0.2em;
|
|
@@ -2098,7 +2058,7 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
2098
2058
|
position: relative;
|
|
2099
2059
|
}
|
|
2100
2060
|
.block-editor-link-control__search-item .block-editor-link-control__search-item-title mark {
|
|
2101
|
-
font-weight:
|
|
2061
|
+
font-weight: 600;
|
|
2102
2062
|
color: inherit;
|
|
2103
2063
|
background-color: transparent;
|
|
2104
2064
|
}
|
|
@@ -2108,25 +2068,6 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
2108
2068
|
.block-editor-link-control__search-item .block-editor-link-control__search-item-title svg {
|
|
2109
2069
|
display: none;
|
|
2110
2070
|
}
|
|
2111
|
-
.block-editor-link-control__search-item .block-editor-link-control__search-item-info {
|
|
2112
|
-
display: block;
|
|
2113
|
-
color: #757575;
|
|
2114
|
-
font-size: 0.9em;
|
|
2115
|
-
line-height: 1.3;
|
|
2116
|
-
}
|
|
2117
|
-
.block-editor-link-control__search-item .block-editor-link-control__search-item-error-notice {
|
|
2118
|
-
font-style: italic;
|
|
2119
|
-
font-size: 1.1em;
|
|
2120
|
-
}
|
|
2121
|
-
.block-editor-link-control__search-item .block-editor-link-control__search-item-type {
|
|
2122
|
-
display: block;
|
|
2123
|
-
padding: 3px 6px;
|
|
2124
|
-
margin-left: auto;
|
|
2125
|
-
font-size: 0.9em;
|
|
2126
|
-
background-color: #f0f0f0;
|
|
2127
|
-
border-radius: 2px;
|
|
2128
|
-
white-space: nowrap;
|
|
2129
|
-
}
|
|
2130
2071
|
.block-editor-link-control__search-item .block-editor-link-control__search-item-description {
|
|
2131
2072
|
padding-top: 12px;
|
|
2132
2073
|
margin: 0;
|
|
@@ -2241,10 +2182,6 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed {
|
|
|
2241
2182
|
top: 0;
|
|
2242
2183
|
}
|
|
2243
2184
|
|
|
2244
|
-
.block-editor-link-control__search-results div[role=menu] > .block-editor-link-control__search-item.block-editor-link-control__search-item {
|
|
2245
|
-
padding: 10px;
|
|
2246
|
-
}
|
|
2247
|
-
|
|
2248
2185
|
.block-editor-link-control__drawer {
|
|
2249
2186
|
display: flex;
|
|
2250
2187
|
order: 30;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-editor",
|
|
3
|
-
"version": "12.3.
|
|
3
|
+
"version": "12.3.8",
|
|
4
4
|
"description": "Generic block editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"@wordpress/a11y": "^3.35.1",
|
|
38
38
|
"@wordpress/api-fetch": "^6.32.1",
|
|
39
39
|
"@wordpress/blob": "^3.35.1",
|
|
40
|
-
"@wordpress/blocks": "^12.12.
|
|
41
|
-
"@wordpress/components": "^25.1.
|
|
40
|
+
"@wordpress/blocks": "^12.12.4",
|
|
41
|
+
"@wordpress/components": "^25.1.8",
|
|
42
42
|
"@wordpress/compose": "^6.12.1",
|
|
43
|
-
"@wordpress/data": "^9.5.
|
|
43
|
+
"@wordpress/data": "^9.5.4",
|
|
44
44
|
"@wordpress/date": "^4.35.1",
|
|
45
45
|
"@wordpress/deprecated": "^3.35.1",
|
|
46
46
|
"@wordpress/dom": "^3.35.1",
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
"@wordpress/i18n": "^4.35.1",
|
|
52
52
|
"@wordpress/icons": "^9.26.2",
|
|
53
53
|
"@wordpress/is-shallow-equal": "^4.35.1",
|
|
54
|
-
"@wordpress/keyboard-shortcuts": "^4.12.
|
|
54
|
+
"@wordpress/keyboard-shortcuts": "^4.12.4",
|
|
55
55
|
"@wordpress/keycodes": "^3.35.1",
|
|
56
|
-
"@wordpress/notices": "^4.3.
|
|
57
|
-
"@wordpress/preferences": "^3.12.
|
|
58
|
-
"@wordpress/private-apis": "^0.17.
|
|
59
|
-
"@wordpress/rich-text": "^6.12.
|
|
56
|
+
"@wordpress/notices": "^4.3.4",
|
|
57
|
+
"@wordpress/preferences": "^3.12.8",
|
|
58
|
+
"@wordpress/private-apis": "^0.17.2",
|
|
59
|
+
"@wordpress/rich-text": "^6.12.5",
|
|
60
60
|
"@wordpress/shortcode": "^3.35.1",
|
|
61
61
|
"@wordpress/style-engine": "^1.18.1",
|
|
62
62
|
"@wordpress/token-list": "^2.35.1",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"publishConfig": {
|
|
86
86
|
"access": "public"
|
|
87
87
|
},
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "cedb8caa943db47c16bdb4fa8880d506ce938fab"
|
|
89
89
|
}
|
|
@@ -22,16 +22,25 @@ const BlockDraggable = ( {
|
|
|
22
22
|
} ) => {
|
|
23
23
|
const { srcRootClientId, isDraggable, icon } = useSelect(
|
|
24
24
|
( select ) => {
|
|
25
|
-
const {
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
const {
|
|
26
|
+
canMoveBlocks,
|
|
27
|
+
getBlockRootClientId,
|
|
28
|
+
getBlockName,
|
|
29
|
+
getBlockAttributes,
|
|
30
|
+
} = select( blockEditorStore );
|
|
31
|
+
const { getBlockType, getActiveBlockVariation } =
|
|
32
|
+
select( blocksStore );
|
|
28
33
|
const rootClientId = getBlockRootClientId( clientIds[ 0 ] );
|
|
29
34
|
const blockName = getBlockName( clientIds[ 0 ] );
|
|
35
|
+
const variation = getActiveBlockVariation(
|
|
36
|
+
blockName,
|
|
37
|
+
getBlockAttributes( clientIds[ 0 ] )
|
|
38
|
+
);
|
|
30
39
|
|
|
31
40
|
return {
|
|
32
41
|
srcRootClientId: rootClientId,
|
|
33
42
|
isDraggable: canMoveBlocks( clientIds, rootClientId ),
|
|
34
|
-
icon: getBlockType( blockName )?.icon,
|
|
43
|
+
icon: variation?.icon || getBlockType( blockName )?.icon,
|
|
35
44
|
};
|
|
36
45
|
},
|
|
37
46
|
[ clientIds ]
|
|
@@ -16,38 +16,26 @@ import { __ } from '@wordpress/i18n';
|
|
|
16
16
|
import { store as blockEditorStore } from '../../store';
|
|
17
17
|
import { unlock } from '../../lock-unlock';
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
// important blocks. For example, in the site editor, the Query Loop block is
|
|
21
|
-
// deemed important. In such cases, we'll ask the user for confirmation that
|
|
22
|
-
// they intended to remove such block(s).
|
|
23
|
-
//
|
|
24
|
-
// @see https://github.com/WordPress/gutenberg/pull/51145
|
|
25
|
-
export const blockTypePromptMessages = {
|
|
26
|
-
'core/query': __( 'Query Loop displays a list of posts or pages.' ),
|
|
27
|
-
'core/post-content': __(
|
|
28
|
-
'Post Content displays the content of a post or page.'
|
|
29
|
-
),
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export function BlockRemovalWarningModal() {
|
|
19
|
+
export function BlockRemovalWarningModal( { rules } ) {
|
|
33
20
|
const { clientIds, selectPrevious, blockNamesForPrompt } = useSelect(
|
|
34
21
|
( select ) =>
|
|
35
22
|
unlock( select( blockEditorStore ) ).getRemovalPromptData()
|
|
36
23
|
);
|
|
37
24
|
|
|
38
25
|
const {
|
|
39
|
-
|
|
40
|
-
|
|
26
|
+
clearBlockRemovalPrompt,
|
|
27
|
+
setBlockRemovalRules,
|
|
41
28
|
privateRemoveBlocks,
|
|
42
29
|
} = unlock( useDispatch( blockEditorStore ) );
|
|
43
30
|
|
|
44
|
-
//
|
|
31
|
+
// Load block removal rules, simultaneously signalling that the block
|
|
32
|
+
// removal prompt is in place.
|
|
45
33
|
useEffect( () => {
|
|
46
|
-
|
|
34
|
+
setBlockRemovalRules( rules );
|
|
47
35
|
return () => {
|
|
48
|
-
|
|
36
|
+
setBlockRemovalRules();
|
|
49
37
|
};
|
|
50
|
-
}, [
|
|
38
|
+
}, [ rules, setBlockRemovalRules ] );
|
|
51
39
|
|
|
52
40
|
if ( ! blockNamesForPrompt ) {
|
|
53
41
|
return;
|
|
@@ -55,25 +43,23 @@ export function BlockRemovalWarningModal() {
|
|
|
55
43
|
|
|
56
44
|
const onConfirmRemoval = () => {
|
|
57
45
|
privateRemoveBlocks( clientIds, selectPrevious, /* force */ true );
|
|
58
|
-
|
|
46
|
+
clearBlockRemovalPrompt();
|
|
59
47
|
};
|
|
60
48
|
|
|
61
49
|
return (
|
|
62
50
|
<Modal
|
|
63
51
|
title={ __( 'Are you sure?' ) }
|
|
64
|
-
onRequestClose={
|
|
52
|
+
onRequestClose={ clearBlockRemovalPrompt }
|
|
65
53
|
style={ {
|
|
66
54
|
maxWidth: '40rem',
|
|
67
55
|
} }
|
|
68
56
|
>
|
|
69
57
|
{ blockNamesForPrompt.length === 1 ? (
|
|
70
|
-
<p>{
|
|
58
|
+
<p>{ rules[ blockNamesForPrompt[ 0 ] ] }</p>
|
|
71
59
|
) : (
|
|
72
60
|
<ul style={ { listStyleType: 'disc', paddingLeft: '1rem' } }>
|
|
73
61
|
{ blockNamesForPrompt.map( ( name ) => (
|
|
74
|
-
<li key={ name }>
|
|
75
|
-
{ blockTypePromptMessages[ name ] }
|
|
76
|
-
</li>
|
|
62
|
+
<li key={ name }>{ rules[ name ] }</li>
|
|
77
63
|
) ) }
|
|
78
64
|
</ul>
|
|
79
65
|
) }
|
|
@@ -83,7 +69,7 @@ export function BlockRemovalWarningModal() {
|
|
|
83
69
|
: __( 'Removing this block is not advised.' ) }
|
|
84
70
|
</p>
|
|
85
71
|
<HStack justify="right">
|
|
86
|
-
<Button variant="tertiary" onClick={
|
|
72
|
+
<Button variant="tertiary" onClick={ clearBlockRemovalPrompt }>
|
|
87
73
|
{ __( 'Cancel' ) }
|
|
88
74
|
</Button>
|
|
89
75
|
<Button variant="primary" onClick={ onConfirmRemoval }>
|
|
@@ -6,6 +6,7 @@ import classnames from 'classnames';
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
|
+
import { __ } from '@wordpress/i18n';
|
|
9
10
|
import {
|
|
10
11
|
BaseControl,
|
|
11
12
|
__experimentalVStack as VStack,
|
|
@@ -28,12 +29,12 @@ const colorsAndGradientKeys = [
|
|
|
28
29
|
|
|
29
30
|
const TAB_COLOR = {
|
|
30
31
|
name: 'color',
|
|
31
|
-
title: 'Solid',
|
|
32
|
+
title: __( 'Solid' ),
|
|
32
33
|
value: 'color',
|
|
33
34
|
};
|
|
34
35
|
const TAB_GRADIENT = {
|
|
35
36
|
name: 'gradient',
|
|
36
|
-
title: 'Gradient',
|
|
37
|
+
title: __( 'Gradient' ),
|
|
37
38
|
value: 'gradient',
|
|
38
39
|
};
|
|
39
40
|
|
|
@@ -207,18 +207,24 @@ export default function DimensionsPanel( {
|
|
|
207
207
|
// in global styles but not in block inspector.
|
|
208
208
|
includeLayoutControls = false,
|
|
209
209
|
} ) {
|
|
210
|
+
const { dimensions, spacing } = settings;
|
|
211
|
+
|
|
210
212
|
const decodeValue = ( rawValue ) => {
|
|
211
213
|
if ( rawValue && typeof rawValue === 'object' ) {
|
|
212
214
|
return Object.keys( rawValue ).reduce( ( acc, key ) => {
|
|
213
215
|
acc[ key ] = getValueFromVariable(
|
|
214
|
-
{ settings },
|
|
216
|
+
{ settings: { dimensions, spacing } },
|
|
215
217
|
'',
|
|
216
218
|
rawValue[ key ]
|
|
217
219
|
);
|
|
218
220
|
return acc;
|
|
219
221
|
}, {} );
|
|
220
222
|
}
|
|
221
|
-
return getValueFromVariable(
|
|
223
|
+
return getValueFromVariable(
|
|
224
|
+
{ settings: { dimensions, spacing } },
|
|
225
|
+
'',
|
|
226
|
+
rawValue
|
|
227
|
+
);
|
|
222
228
|
};
|
|
223
229
|
|
|
224
230
|
const showSpacingPresetsControl = useHasSpacingPresets( settings );
|
|
@@ -88,11 +88,14 @@ function Iframe( {
|
|
|
88
88
|
forwardedRef: ref,
|
|
89
89
|
...props
|
|
90
90
|
} ) {
|
|
91
|
-
const {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
91
|
+
const { resolvedAssets, isPreviewMode } = useSelect( ( select ) => {
|
|
92
|
+
const settings = select( blockEditorStore ).getSettings();
|
|
93
|
+
return {
|
|
94
|
+
resolvedAssets: settings.__unstableResolvedAssets,
|
|
95
|
+
isPreviewMode: settings.__unstableIsPreviewMode,
|
|
96
|
+
};
|
|
97
|
+
}, [] );
|
|
98
|
+
const { styles = '', scripts = '' } = resolvedAssets;
|
|
96
99
|
const [ iframeDocument, setIframeDocument ] = useState();
|
|
97
100
|
const [ bodyClasses, setBodyClasses ] = useState( [] );
|
|
98
101
|
const compatStyles = useCompatibilityStyles();
|
|
@@ -140,11 +143,13 @@ function Iframe( {
|
|
|
140
143
|
compatStyle.cloneNode( true )
|
|
141
144
|
);
|
|
142
145
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
if ( ! isPreviewMode ) {
|
|
147
|
+
// eslint-disable-next-line no-console
|
|
148
|
+
console.warn(
|
|
149
|
+
`${ compatStyle.id } was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,
|
|
150
|
+
compatStyle
|
|
151
|
+
);
|
|
152
|
+
}
|
|
148
153
|
}
|
|
149
154
|
|
|
150
155
|
iFrameDocument.addEventListener(
|
|
@@ -45,6 +45,11 @@ export function useCompatibilityStyles() {
|
|
|
45
45
|
return accumulator;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
// Don't try to add styles without ID. Styles enqueued via the WP dependency system will always have IDs.
|
|
49
|
+
if ( ! ownerNode.id ) {
|
|
50
|
+
return accumulator;
|
|
51
|
+
}
|
|
52
|
+
|
|
48
53
|
function matchFromRules( _cssRules ) {
|
|
49
54
|
return Array.from( _cssRules ).find(
|
|
50
55
|
( {
|
package/src/components/index.js
CHANGED
|
@@ -164,8 +164,3 @@ export { default as __experimentalInspectorPopoverHeader } from './inspector-pop
|
|
|
164
164
|
|
|
165
165
|
export { default as BlockEditorProvider } from './provider';
|
|
166
166
|
export { default as useSetting } from './use-setting';
|
|
167
|
-
|
|
168
|
-
/*
|
|
169
|
-
* The following rename hint component can be removed in 6.4.
|
|
170
|
-
*/
|
|
171
|
-
export { default as ReusableBlocksRenameHint } from './inserter/reusable-block-rename-hint';
|
|
@@ -10,7 +10,24 @@ import { close } from '@wordpress/icons';
|
|
|
10
10
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
11
11
|
|
|
12
12
|
const PREFERENCE_NAME = 'isResuableBlocksrRenameHintVisible';
|
|
13
|
+
/*
|
|
14
|
+
* This hook was added in 6.3 to help users with the transition from Reusable blocks to Patterns.
|
|
15
|
+
* It is only exported for use in the reusable-blocks package as well as block-editor.
|
|
16
|
+
* It will be removed in 6.4. and should not be used in any new code.
|
|
17
|
+
*/
|
|
18
|
+
export function useReusableBlocksRenameHint() {
|
|
19
|
+
return useSelect(
|
|
20
|
+
( select ) =>
|
|
21
|
+
select( preferencesStore ).get( 'core', PREFERENCE_NAME ) ?? true,
|
|
22
|
+
[]
|
|
23
|
+
);
|
|
24
|
+
}
|
|
13
25
|
|
|
26
|
+
/*
|
|
27
|
+
* This component was added in 6.3 to help users with the transition from Reusable blocks to Patterns.
|
|
28
|
+
* It is only exported for use in the reusable-blocks package as well as block-editor.
|
|
29
|
+
* It will be removed in 6.4. and should not be used in any new code.
|
|
30
|
+
*/
|
|
14
31
|
export default function ReusableBlocksRenameHint() {
|
|
15
32
|
const isReusableBlocksRenameHint = useSelect(
|
|
16
33
|
( select ) =>
|
|
@@ -29,7 +46,7 @@ export default function ReusableBlocksRenameHint() {
|
|
|
29
46
|
<div ref={ ref } className="reusable-blocks-menu-items__rename-hint">
|
|
30
47
|
<div className="reusable-blocks-menu-items__rename-hint-content">
|
|
31
48
|
{ __(
|
|
32
|
-
'Reusable blocks are now
|
|
49
|
+
'Reusable blocks are now synced patterns. A synced pattern will behave in exactly the same way as a reusable block.'
|
|
33
50
|
) }
|
|
34
51
|
</div>
|
|
35
52
|
<Button
|
|
@@ -8,7 +8,7 @@ import { __ } from '@wordpress/i18n';
|
|
|
8
8
|
// order to handle it as a unique case.
|
|
9
9
|
export const CREATE_TYPE = '__CREATE__';
|
|
10
10
|
export const TEL_TYPE = 'tel';
|
|
11
|
-
export const URL_TYPE = '
|
|
11
|
+
export const URL_TYPE = 'link';
|
|
12
12
|
export const MAILTO_TYPE = 'mailto';
|
|
13
13
|
export const INTERNAL_TYPE = 'internal';
|
|
14
14
|
|