@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.
Files changed (143) hide show
  1. package/README.md +0 -4
  2. package/build/components/block-draggable/index.js +6 -3
  3. package/build/components/block-draggable/index.js.map +1 -1
  4. package/build/components/block-removal-warning-modal/index.js +15 -25
  5. package/build/components/block-removal-warning-modal/index.js.map +1 -1
  6. package/build/components/colors-gradients/control.js +4 -2
  7. package/build/components/colors-gradients/control.js.map +1 -1
  8. package/build/components/global-styles/dimensions-panel.js +13 -2
  9. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  10. package/build/components/iframe/index.js +16 -3
  11. package/build/components/iframe/index.js.map +1 -1
  12. package/build/components/iframe/use-compatibility-styles.js +5 -0
  13. package/build/components/iframe/use-compatibility-styles.js.map +1 -1
  14. package/build/components/index.js +1 -10
  15. package/build/components/index.js.map +1 -1
  16. package/build/components/inserter/reusable-block-rename-hint.js +23 -3
  17. package/build/components/inserter/reusable-block-rename-hint.js.map +1 -1
  18. package/build/components/link-control/constants.js +1 -1
  19. package/build/components/link-control/constants.js.map +1 -1
  20. package/build/components/link-control/search-create-button.js +5 -21
  21. package/build/components/link-control/search-create-button.js.map +1 -1
  22. package/build/components/link-control/search-item.js +13 -30
  23. package/build/components/link-control/search-item.js.map +1 -1
  24. package/build/components/link-control/search-results.js +2 -2
  25. package/build/components/link-control/search-results.js.map +1 -1
  26. package/build/components/rich-text/get-rich-text-values.js +7 -1
  27. package/build/components/rich-text/get-rich-text-values.js.map +1 -1
  28. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js +1 -1
  29. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  30. package/build/components/spacing-sizes-control/input-controls/axial.js +6 -2
  31. package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  32. package/build/components/spacing-sizes-control/input-controls/separated.js +5 -1
  33. package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  34. package/build/components/spacing-sizes-control/input-controls/single.js +5 -1
  35. package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  36. package/build/components/spacing-sizes-control/utils.js +1 -1
  37. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  38. package/build/components/use-block-display-information/index.js +7 -3
  39. package/build/components/use-block-display-information/index.js.map +1 -1
  40. package/build/hooks/margin.js +1 -1
  41. package/build/hooks/margin.js.map +1 -1
  42. package/build/hooks/padding.js +1 -1
  43. package/build/hooks/padding.js.map +1 -1
  44. package/build/private-apis.js +5 -1
  45. package/build/private-apis.js.map +1 -1
  46. package/build/store/index.js +10 -1
  47. package/build/store/index.js.map +1 -1
  48. package/build/store/private-actions.js +36 -36
  49. package/build/store/private-actions.js.map +1 -1
  50. package/build/store/private-selectors.js +3 -3
  51. package/build/store/private-selectors.js.map +1 -1
  52. package/build/store/reducer.js +16 -8
  53. package/build/store/reducer.js.map +1 -1
  54. package/build/store/selectors.js +1 -1
  55. package/build/store/selectors.js.map +1 -1
  56. package/build-module/components/block-draggable/index.js +6 -3
  57. package/build-module/components/block-draggable/index.js.map +1 -1
  58. package/build-module/components/block-removal-warning-modal/index.js +16 -23
  59. package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
  60. package/build-module/components/colors-gradients/control.js +3 -2
  61. package/build-module/components/colors-gradients/control.js.map +1 -1
  62. package/build-module/components/global-styles/dimensions-panel.js +13 -2
  63. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  64. package/build-module/components/iframe/index.js +16 -3
  65. package/build-module/components/iframe/index.js.map +1 -1
  66. package/build-module/components/iframe/use-compatibility-styles.js +5 -0
  67. package/build-module/components/iframe/use-compatibility-styles.js.map +1 -1
  68. package/build-module/components/index.js +0 -5
  69. package/build-module/components/index.js.map +1 -1
  70. package/build-module/components/inserter/reusable-block-rename-hint.js +22 -3
  71. package/build-module/components/inserter/reusable-block-rename-hint.js.map +1 -1
  72. package/build-module/components/link-control/constants.js +1 -1
  73. package/build-module/components/link-control/constants.js.map +1 -1
  74. package/build-module/components/link-control/search-create-button.js +7 -20
  75. package/build-module/components/link-control/search-create-button.js.map +1 -1
  76. package/build-module/components/link-control/search-item.js +14 -28
  77. package/build-module/components/link-control/search-item.js.map +1 -1
  78. package/build-module/components/link-control/search-results.js +3 -3
  79. package/build-module/components/link-control/search-results.js.map +1 -1
  80. package/build-module/components/rich-text/get-rich-text-values.js +7 -1
  81. package/build-module/components/rich-text/get-rich-text-values.js.map +1 -1
  82. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js +1 -1
  83. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  84. package/build-module/components/spacing-sizes-control/input-controls/axial.js +7 -3
  85. package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  86. package/build-module/components/spacing-sizes-control/input-controls/separated.js +6 -2
  87. package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  88. package/build-module/components/spacing-sizes-control/input-controls/single.js +6 -2
  89. package/build-module/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  90. package/build-module/components/spacing-sizes-control/utils.js +1 -1
  91. package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
  92. package/build-module/components/use-block-display-information/index.js +7 -3
  93. package/build-module/components/use-block-display-information/index.js.map +1 -1
  94. package/build-module/hooks/margin.js +1 -1
  95. package/build-module/hooks/margin.js.map +1 -1
  96. package/build-module/hooks/padding.js +1 -1
  97. package/build-module/hooks/padding.js.map +1 -1
  98. package/build-module/private-apis.js +4 -1
  99. package/build-module/private-apis.js.map +1 -1
  100. package/build-module/store/index.js +10 -1
  101. package/build-module/store/index.js.map +1 -1
  102. package/build-module/store/private-actions.js +35 -32
  103. package/build-module/store/private-actions.js.map +1 -1
  104. package/build-module/store/private-selectors.js +2 -2
  105. package/build-module/store/private-selectors.js.map +1 -1
  106. package/build-module/store/reducer.js +16 -8
  107. package/build-module/store/reducer.js.map +1 -1
  108. package/build-module/store/selectors.js +1 -1
  109. package/build-module/store/selectors.js.map +1 -1
  110. package/build-style/style-rtl.css +20 -83
  111. package/build-style/style.css +20 -83
  112. package/package.json +10 -10
  113. package/src/components/block-draggable/index.js +13 -4
  114. package/src/components/block-removal-warning-modal/index.js +13 -27
  115. package/src/components/colors-gradients/control.js +3 -2
  116. package/src/components/global-styles/dimensions-panel.js +8 -2
  117. package/src/components/iframe/index.js +15 -10
  118. package/src/components/iframe/use-compatibility-styles.js +5 -0
  119. package/src/components/index.js +0 -5
  120. package/src/components/inserter/reusable-block-rename-hint.js +18 -1
  121. package/src/components/link-control/constants.js +1 -1
  122. package/src/components/link-control/search-create-button.js +8 -26
  123. package/src/components/link-control/search-item.js +21 -43
  124. package/src/components/link-control/search-results.js +48 -46
  125. package/src/components/link-control/style.scss +25 -95
  126. package/src/components/link-control/test/index.js +6 -7
  127. package/src/components/rich-text/get-rich-text-values.js +11 -1
  128. package/src/components/spacing-sizes-control/hooks/use-spacing-sizes.js +1 -1
  129. package/src/components/spacing-sizes-control/input-controls/axial.js +17 -2
  130. package/src/components/spacing-sizes-control/input-controls/separated.js +17 -2
  131. package/src/components/spacing-sizes-control/input-controls/single.js +12 -2
  132. package/src/components/spacing-sizes-control/utils.js +1 -1
  133. package/src/components/use-block-display-information/index.js +12 -5
  134. package/src/hooks/margin.js +4 -1
  135. package/src/hooks/padding.js +4 -1
  136. package/src/private-apis.js +6 -0
  137. package/src/store/index.js +10 -0
  138. package/src/store/private-actions.js +33 -36
  139. package/src/store/private-selectors.js +2 -2
  140. package/src/store/reducer.js +16 -8
  141. package/src/store/selectors.js +1 -1
  142. package/src/store/test/actions.js +3 -0
  143. 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: 0;
2001
- padding: 8px 16px 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:hover, .block-editor-link-control__search-item:focus {
2024
- background-color: #f0f0f0;
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:hover .block-editor-link-control__search-item-type, .block-editor-link-control__search-item:focus .block-editor-link-control__search-item-type {
2027
- background: #fff;
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:focus:not(:disabled) {
2030
- box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color) inset;
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.is-selected {
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: 700;
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;
@@ -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: 0;
2002
- padding: 8px 16px 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:hover, .block-editor-link-control__search-item:focus {
2025
- background-color: #f0f0f0;
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:hover .block-editor-link-control__search-item-type, .block-editor-link-control__search-item:focus .block-editor-link-control__search-item-type {
2028
- background: #fff;
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:focus:not(:disabled) {
2031
- box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color) inset;
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.is-selected {
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: 700;
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.6",
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.3",
41
- "@wordpress/components": "^25.1.6",
40
+ "@wordpress/blocks": "^12.12.4",
41
+ "@wordpress/components": "^25.1.8",
42
42
  "@wordpress/compose": "^6.12.1",
43
- "@wordpress/data": "^9.5.3",
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.3",
54
+ "@wordpress/keyboard-shortcuts": "^4.12.4",
55
55
  "@wordpress/keycodes": "^3.35.1",
56
- "@wordpress/notices": "^4.3.3",
57
- "@wordpress/preferences": "^3.12.6",
58
- "@wordpress/private-apis": "^0.17.1",
59
- "@wordpress/rich-text": "^6.12.4",
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": "86ecd96b3bcada6b4cc35bb2455b3029cebb0ff3"
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 { canMoveBlocks, getBlockRootClientId, getBlockName } =
26
- select( blockEditorStore );
27
- const { getBlockType } = select( blocksStore );
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
- // In certain editing contexts, we'd like to prevent accidental removal of
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
- clearRemovalPrompt,
40
- toggleRemovalPromptSupport,
26
+ clearBlockRemovalPrompt,
27
+ setBlockRemovalRules,
41
28
  privateRemoveBlocks,
42
29
  } = unlock( useDispatch( blockEditorStore ) );
43
30
 
44
- // Signalling the removal prompt is in place.
31
+ // Load block removal rules, simultaneously signalling that the block
32
+ // removal prompt is in place.
45
33
  useEffect( () => {
46
- toggleRemovalPromptSupport( true );
34
+ setBlockRemovalRules( rules );
47
35
  return () => {
48
- toggleRemovalPromptSupport( false );
36
+ setBlockRemovalRules();
49
37
  };
50
- }, [ toggleRemovalPromptSupport ] );
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
- clearRemovalPrompt();
46
+ clearBlockRemovalPrompt();
59
47
  };
60
48
 
61
49
  return (
62
50
  <Modal
63
51
  title={ __( 'Are you sure?' ) }
64
- onRequestClose={ clearRemovalPrompt }
52
+ onRequestClose={ clearBlockRemovalPrompt }
65
53
  style={ {
66
54
  maxWidth: '40rem',
67
55
  } }
68
56
  >
69
57
  { blockNamesForPrompt.length === 1 ? (
70
- <p>{ blockTypePromptMessages[ blockNamesForPrompt[ 0 ] ] }</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={ clearRemovalPrompt }>
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( { settings }, '', rawValue );
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 { styles = '', scripts = '' } = useSelect(
92
- ( select ) =>
93
- select( blockEditorStore ).getSettings().__unstableResolvedAssets,
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
- // eslint-disable-next-line no-console
144
- console.warn(
145
- `${ compatStyle.id } was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,
146
- compatStyle
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
  ( {
@@ -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 called patterns. A synced pattern will behave in exactly the same way as a reusable block.'
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 = 'URL';
11
+ export const URL_TYPE = 'link';
12
12
  export const MAILTO_TYPE = 'mailto';
13
13
  export const INTERNAL_TYPE = 'internal';
14
14