@wordpress/block-editor 12.5.0 → 12.6.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.
Files changed (298) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +0 -4
  3. package/build/components/block-draggable/index.js +6 -3
  4. package/build/components/block-draggable/index.js.map +1 -1
  5. package/build/components/block-draggable/index.native.js +2 -2
  6. package/build/components/block-draggable/index.native.js.map +1 -1
  7. package/build/components/block-edit/edit.js +25 -13
  8. package/build/components/block-edit/edit.js.map +1 -1
  9. package/build/components/block-list/block-outline.native.js +14 -18
  10. package/build/components/block-list/block-outline.native.js.map +1 -1
  11. package/build/components/block-list/block.native.js +21 -42
  12. package/build/components/block-list/block.native.js.map +1 -1
  13. package/build/components/block-mover/index.native.js +1 -1
  14. package/build/components/block-mover/index.native.js.map +1 -1
  15. package/build/components/block-removal-warning-modal/index.js +1 -4
  16. package/build/components/block-removal-warning-modal/index.js.map +1 -1
  17. package/build/components/block-settings/button.native.js +2 -2
  18. package/build/components/block-settings/button.native.js.map +1 -1
  19. package/build/components/{block-mobile-toolbar/block-actions-menu.native.js → block-toolbar/block-toolbar-menu.native.js} +7 -5
  20. package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -0
  21. package/build/components/block-toolbar/index.js +4 -3
  22. package/build/components/block-toolbar/index.js.map +1 -1
  23. package/build/components/block-toolbar/index.native.js +62 -3
  24. package/build/components/block-toolbar/index.native.js.map +1 -1
  25. package/build/components/colors-gradients/control.js +4 -2
  26. package/build/components/colors-gradients/control.js.map +1 -1
  27. package/build/components/global-styles/color-panel.js +21 -15
  28. package/build/components/global-styles/color-panel.js.map +1 -1
  29. package/build/components/global-styles/dimensions-panel.js +13 -2
  30. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  31. package/build/components/global-styles/get-block-css-selector.js +4 -8
  32. package/build/components/global-styles/get-block-css-selector.js.map +1 -1
  33. package/build/components/global-styles/hooks.js +13 -23
  34. package/build/components/global-styles/hooks.js.map +1 -1
  35. package/build/components/global-styles/typography-panel.js +18 -3
  36. package/build/components/global-styles/typography-panel.js.map +1 -1
  37. package/build/components/global-styles/use-global-styles-output.js +12 -18
  38. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  39. package/build/components/global-styles/utils.js +6 -6
  40. package/build/components/global-styles/utils.js.map +1 -1
  41. package/build/components/iframe/index.js +36 -48
  42. package/build/components/iframe/index.js.map +1 -1
  43. package/build/components/iframe/use-compatibility-styles.js +5 -0
  44. package/build/components/iframe/use-compatibility-styles.js.map +1 -1
  45. package/build/components/index.js +1 -10
  46. package/build/components/index.js.map +1 -1
  47. package/build/components/inner-blocks/index.js +3 -1
  48. package/build/components/inner-blocks/index.js.map +1 -1
  49. package/build/components/inner-blocks/index.native.js +3 -1
  50. package/build/components/inner-blocks/index.native.js.map +1 -1
  51. package/build/components/inner-blocks/use-nested-settings-update.js +33 -7
  52. package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  53. package/build/components/inserter/index.js +2 -4
  54. package/build/components/inserter/index.js.map +1 -1
  55. package/build/components/inserter/index.native.js +21 -32
  56. package/build/components/inserter/index.native.js.map +1 -1
  57. package/build/components/inserter/reusable-block-rename-hint.js +23 -3
  58. package/build/components/inserter/reusable-block-rename-hint.js.map +1 -1
  59. package/build/components/link-control/index.js +4 -1
  60. package/build/components/link-control/index.js.map +1 -1
  61. package/build/components/link-control/search-item.js +1 -1
  62. package/build/components/link-control/search-item.js.map +1 -1
  63. package/build/components/list-view/use-list-view-client-ids.js +2 -2
  64. package/build/components/list-view/use-list-view-client-ids.js.map +1 -1
  65. package/build/components/media-placeholder/index.native.js +65 -31
  66. package/build/components/media-placeholder/index.native.js.map +1 -1
  67. package/build/components/preview-options/index.js +2 -2
  68. package/build/components/preview-options/index.js.map +1 -1
  69. package/build/components/rich-text/content.js +0 -36
  70. package/build/components/rich-text/content.js.map +1 -1
  71. package/build/components/rich-text/get-rich-text-values.js +118 -0
  72. package/build/components/rich-text/get-rich-text-values.js.map +1 -0
  73. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js +1 -1
  74. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  75. package/build/components/spacing-sizes-control/input-controls/axial.js +6 -2
  76. package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  77. package/build/components/spacing-sizes-control/input-controls/separated.js +5 -1
  78. package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  79. package/build/components/spacing-sizes-control/input-controls/single.js +5 -1
  80. package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  81. package/build/components/spacing-sizes-control/utils.js +1 -1
  82. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  83. package/build/components/use-block-display-information/index.js +7 -3
  84. package/build/components/use-block-display-information/index.js.map +1 -1
  85. package/build/components/use-block-drop-zone/index.native.js +49 -8
  86. package/build/components/use-block-drop-zone/index.native.js.map +1 -1
  87. package/build/components/use-setting/index.js +5 -9
  88. package/build/components/use-setting/index.js.map +1 -1
  89. package/build/hooks/margin.js +1 -1
  90. package/build/hooks/margin.js.map +1 -1
  91. package/build/hooks/padding.js +1 -1
  92. package/build/hooks/padding.js.map +1 -1
  93. package/build/hooks/utils.js +1 -7
  94. package/build/hooks/utils.js.map +1 -1
  95. package/build/private-apis.js +7 -3
  96. package/build/private-apis.js.map +1 -1
  97. package/build/store/actions.js +1 -1
  98. package/build/store/actions.js.map +1 -1
  99. package/build/store/private-selectors.js +5 -6
  100. package/build/store/private-selectors.js.map +1 -1
  101. package/build/store/reducer.js +0 -1
  102. package/build/store/reducer.js.map +1 -1
  103. package/build/store/selectors.js +19 -8
  104. package/build/store/selectors.js.map +1 -1
  105. package/build/utils/object.js +38 -2
  106. package/build/utils/object.js.map +1 -1
  107. package/build-module/components/block-draggable/index.js +6 -3
  108. package/build-module/components/block-draggable/index.js.map +1 -1
  109. package/build-module/components/block-draggable/index.native.js +2 -2
  110. package/build-module/components/block-draggable/index.native.js.map +1 -1
  111. package/build-module/components/block-edit/edit.js +27 -10
  112. package/build-module/components/block-edit/edit.js.map +1 -1
  113. package/build-module/components/block-list/block-outline.native.js +14 -18
  114. package/build-module/components/block-list/block-outline.native.js.map +1 -1
  115. package/build-module/components/block-list/block.native.js +24 -43
  116. package/build-module/components/block-list/block.native.js.map +1 -1
  117. package/build-module/components/block-mover/index.native.js +3 -3
  118. package/build-module/components/block-mover/index.native.js.map +1 -1
  119. package/build-module/components/block-removal-warning-modal/index.js +1 -4
  120. package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
  121. package/build-module/components/block-settings/button.native.js +3 -3
  122. package/build-module/components/block-settings/button.native.js.map +1 -1
  123. package/build-module/components/{block-mobile-toolbar/block-actions-menu.native.js → block-toolbar/block-toolbar-menu.native.js} +9 -7
  124. package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -0
  125. package/build-module/components/block-toolbar/index.js +4 -3
  126. package/build-module/components/block-toolbar/index.js.map +1 -1
  127. package/build-module/components/block-toolbar/index.native.js +60 -4
  128. package/build-module/components/block-toolbar/index.native.js.map +1 -1
  129. package/build-module/components/colors-gradients/control.js +3 -2
  130. package/build-module/components/colors-gradients/control.js.map +1 -1
  131. package/build-module/components/global-styles/color-panel.js +21 -15
  132. package/build-module/components/global-styles/color-panel.js.map +1 -1
  133. package/build-module/components/global-styles/dimensions-panel.js +13 -2
  134. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  135. package/build-module/components/global-styles/get-block-css-selector.js +4 -8
  136. package/build-module/components/global-styles/get-block-css-selector.js.map +1 -1
  137. package/build-module/components/global-styles/hooks.js +12 -22
  138. package/build-module/components/global-styles/hooks.js.map +1 -1
  139. package/build-module/components/global-styles/typography-panel.js +18 -3
  140. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  141. package/build-module/components/global-styles/use-global-styles-output.js +13 -18
  142. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  143. package/build-module/components/global-styles/utils.js +5 -5
  144. package/build-module/components/global-styles/utils.js.map +1 -1
  145. package/build-module/components/iframe/index.js +37 -49
  146. package/build-module/components/iframe/index.js.map +1 -1
  147. package/build-module/components/iframe/use-compatibility-styles.js +5 -0
  148. package/build-module/components/iframe/use-compatibility-styles.js.map +1 -1
  149. package/build-module/components/index.js +0 -5
  150. package/build-module/components/index.js.map +1 -1
  151. package/build-module/components/inner-blocks/index.js +3 -1
  152. package/build-module/components/inner-blocks/index.js.map +1 -1
  153. package/build-module/components/inner-blocks/index.native.js +3 -1
  154. package/build-module/components/inner-blocks/index.native.js.map +1 -1
  155. package/build-module/components/inner-blocks/use-nested-settings-update.js +30 -7
  156. package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  157. package/build-module/components/inserter/index.js +2 -4
  158. package/build-module/components/inserter/index.js.map +1 -1
  159. package/build-module/components/inserter/index.native.js +22 -33
  160. package/build-module/components/inserter/index.native.js.map +1 -1
  161. package/build-module/components/inserter/reusable-block-rename-hint.js +22 -3
  162. package/build-module/components/inserter/reusable-block-rename-hint.js.map +1 -1
  163. package/build-module/components/link-control/index.js +4 -1
  164. package/build-module/components/link-control/index.js.map +1 -1
  165. package/build-module/components/link-control/search-item.js +1 -1
  166. package/build-module/components/link-control/search-item.js.map +1 -1
  167. package/build-module/components/list-view/use-list-view-client-ids.js +2 -2
  168. package/build-module/components/list-view/use-list-view-client-ids.js.map +1 -1
  169. package/build-module/components/media-placeholder/index.native.js +66 -33
  170. package/build-module/components/media-placeholder/index.native.js.map +1 -1
  171. package/build-module/components/preview-options/index.js +2 -2
  172. package/build-module/components/preview-options/index.js.map +1 -1
  173. package/build-module/components/rich-text/content.js +1 -36
  174. package/build-module/components/rich-text/content.js.map +1 -1
  175. package/build-module/components/rich-text/get-rich-text-values.js +105 -0
  176. package/build-module/components/rich-text/get-rich-text-values.js.map +1 -0
  177. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js +1 -1
  178. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  179. package/build-module/components/spacing-sizes-control/input-controls/axial.js +7 -3
  180. package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  181. package/build-module/components/spacing-sizes-control/input-controls/separated.js +6 -2
  182. package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  183. package/build-module/components/spacing-sizes-control/input-controls/single.js +6 -2
  184. package/build-module/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  185. package/build-module/components/spacing-sizes-control/utils.js +1 -1
  186. package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
  187. package/build-module/components/use-block-display-information/index.js +7 -3
  188. package/build-module/components/use-block-display-information/index.js.map +1 -1
  189. package/build-module/components/use-block-drop-zone/index.native.js +50 -8
  190. package/build-module/components/use-block-drop-zone/index.native.js.map +1 -1
  191. package/build-module/components/use-setting/index.js +5 -9
  192. package/build-module/components/use-setting/index.js.map +1 -1
  193. package/build-module/hooks/margin.js +1 -1
  194. package/build-module/hooks/margin.js.map +1 -1
  195. package/build-module/hooks/padding.js +1 -1
  196. package/build-module/hooks/padding.js.map +1 -1
  197. package/build-module/hooks/utils.js +2 -7
  198. package/build-module/hooks/utils.js.map +1 -1
  199. package/build-module/private-apis.js +5 -2
  200. package/build-module/private-apis.js.map +1 -1
  201. package/build-module/store/actions.js +2 -2
  202. package/build-module/store/actions.js.map +1 -1
  203. package/build-module/store/private-selectors.js +3 -3
  204. package/build-module/store/private-selectors.js.map +1 -1
  205. package/build-module/store/reducer.js +0 -1
  206. package/build-module/store/reducer.js.map +1 -1
  207. package/build-module/store/selectors.js +16 -6
  208. package/build-module/store/selectors.js.map +1 -1
  209. package/build-module/utils/object.js +34 -2
  210. package/build-module/utils/object.js.map +1 -1
  211. package/build-style/content-rtl.css +2 -1
  212. package/build-style/content.css +2 -1
  213. package/build-style/style-rtl.css +7 -1
  214. package/build-style/style.css +7 -1
  215. package/package.json +32 -32
  216. package/src/components/block-controls/README.md +89 -0
  217. package/src/components/block-draggable/index.js +13 -4
  218. package/src/components/block-draggable/index.native.js +7 -3
  219. package/src/components/block-draggable/test/index.native.js +0 -54
  220. package/src/components/block-edit/edit.js +26 -9
  221. package/src/components/block-edit/test/edit.js +1 -1
  222. package/src/components/block-list/block-outline.native.js +26 -25
  223. package/src/components/block-list/block.native.js +24 -38
  224. package/src/components/block-list/block.native.scss +18 -40
  225. package/src/components/block-list/style.native.scss +3 -3
  226. package/src/components/block-mover/index.native.js +3 -3
  227. package/src/components/block-mover/test/__snapshots__/index.native.js.snap +16 -6
  228. package/src/components/block-removal-warning-modal/index.js +0 -3
  229. package/src/components/block-settings/button.native.js +12 -6
  230. package/src/components/{block-mobile-toolbar/block-actions-menu.native.js → block-toolbar/block-toolbar-menu.native.js} +15 -10
  231. package/src/components/block-toolbar/index.js +2 -3
  232. package/src/components/block-toolbar/index.native.js +86 -6
  233. package/src/components/{block-mobile-toolbar/test/block-actions-menu.native.js → block-toolbar/test/block-toolbar-menu.native.js} +20 -54
  234. package/src/components/block-toolbar/test/index.native.js +42 -0
  235. package/src/components/button-block-appender/styles.native.scss +2 -2
  236. package/src/components/caption/README.md +49 -0
  237. package/src/components/colors-gradients/control.js +3 -2
  238. package/src/components/global-styles/color-panel.js +23 -16
  239. package/src/components/global-styles/dimensions-panel.js +8 -2
  240. package/src/components/global-styles/get-block-css-selector.js +5 -9
  241. package/src/components/global-styles/hooks.js +20 -26
  242. package/src/components/global-styles/typography-panel.js +17 -5
  243. package/src/components/global-styles/use-global-styles-output.js +36 -18
  244. package/src/components/global-styles/utils.js +15 -6
  245. package/src/components/iframe/index.js +30 -56
  246. package/src/components/iframe/use-compatibility-styles.js +5 -0
  247. package/src/components/index.js +0 -5
  248. package/src/components/inner-blocks/README.md +10 -0
  249. package/src/components/inner-blocks/index.js +4 -0
  250. package/src/components/inner-blocks/index.native.js +4 -0
  251. package/src/components/inner-blocks/use-nested-settings-update.js +32 -5
  252. package/src/components/inserter/index.js +2 -3
  253. package/src/components/inserter/index.native.js +17 -36
  254. package/src/components/inserter/reusable-block-rename-hint.js +18 -1
  255. package/src/components/inserter/style.native.scss +10 -15
  256. package/src/components/link-control/index.js +4 -1
  257. package/src/components/link-control/search-item.js +1 -1
  258. package/src/components/link-control/style.scss +8 -1
  259. package/src/components/link-control/test/index.js +26 -0
  260. package/src/components/list-view/use-list-view-client-ids.js +2 -2
  261. package/src/components/media-placeholder/index.native.js +108 -59
  262. package/src/components/media-placeholder/styles.native.scss +59 -24
  263. package/src/components/preview-options/README.md +18 -17
  264. package/src/components/preview-options/index.js +2 -2
  265. package/src/components/rich-text/content.js +1 -46
  266. package/src/components/rich-text/get-rich-text-values.js +105 -0
  267. package/src/components/spacing-sizes-control/hooks/use-spacing-sizes.js +1 -1
  268. package/src/components/spacing-sizes-control/input-controls/axial.js +17 -2
  269. package/src/components/spacing-sizes-control/input-controls/separated.js +17 -2
  270. package/src/components/spacing-sizes-control/input-controls/single.js +12 -2
  271. package/src/components/spacing-sizes-control/utils.js +1 -1
  272. package/src/components/text-transform-control/README.md +44 -0
  273. package/src/components/use-block-display-information/index.js +12 -5
  274. package/src/components/use-block-drop-zone/index.native.js +65 -28
  275. package/src/components/use-setting/index.js +8 -8
  276. package/src/hooks/margin.js +4 -1
  277. package/src/hooks/padding.js +4 -1
  278. package/src/hooks/utils.js +5 -7
  279. package/src/private-apis.js +7 -1
  280. package/src/store/actions.js +1 -2
  281. package/src/store/private-selectors.js +3 -6
  282. package/src/store/reducer.js +0 -1
  283. package/src/store/selectors.js +33 -5
  284. package/src/store/test/actions.js +3 -0
  285. package/src/store/test/private-selectors.js +5 -5
  286. package/src/store/test/reducer.js +14 -7
  287. package/src/store/test/selectors.js +1 -1
  288. package/src/utils/object.js +32 -2
  289. package/src/utils/test/object.js +36 -0
  290. package/build/components/block-mobile-toolbar/block-actions-menu.native.js.map +0 -1
  291. package/build/components/block-mobile-toolbar/index.native.js +0 -135
  292. package/build/components/block-mobile-toolbar/index.native.js.map +0 -1
  293. package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js.map +0 -1
  294. package/build-module/components/block-mobile-toolbar/index.native.js +0 -116
  295. package/build-module/components/block-mobile-toolbar/index.native.js.map +0 -1
  296. package/src/components/block-mobile-toolbar/index.native.js +0 -127
  297. package/src/components/block-mobile-toolbar/style.native.scss +0 -16
  298. /package/src/components/{block-mobile-toolbar/test/__snapshots__/block-actions-menu.native.js.snap → block-toolbar/test/__snapshots__/block-toolbar-menu.native.js.snap} +0 -0
@@ -1,8 +1,3 @@
1
- /**
2
- * External dependencies
3
- */
4
- import { get, set } from 'lodash';
5
-
6
1
  /**
7
2
  * WordPress dependencies
8
3
  */
@@ -32,7 +27,11 @@ import { PresetDuotoneFilter } from '../duotone/components';
32
27
  import { getGapCSSValue } from '../../hooks/gap';
33
28
  import { store as blockEditorStore } from '../../store';
34
29
  import { LAYOUT_DEFINITIONS } from '../../layouts/definitions';
35
- import { kebabCase } from '../../utils/object';
30
+ import {
31
+ getValueFromObjectPath,
32
+ kebabCase,
33
+ setImmutably,
34
+ } from '../../utils/object';
36
35
 
37
36
  // List of block support features that can have their related styles
38
37
  // generated under their own feature level selector rather than the block's.
@@ -69,7 +68,11 @@ function compileStyleValue( uncompiledValue ) {
69
68
  function getPresetsDeclarations( blockPresets = {}, mergedSettings ) {
70
69
  return PRESET_METADATA.reduce(
71
70
  ( declarations, { path, valueKey, valueFunc, cssVarInfix } ) => {
72
- const presetByOrigin = get( blockPresets, path, [] );
71
+ const presetByOrigin = getValueFromObjectPath(
72
+ blockPresets,
73
+ path,
74
+ []
75
+ );
73
76
  [ 'default', 'theme', 'custom' ].forEach( ( origin ) => {
74
77
  if ( presetByOrigin[ origin ] ) {
75
78
  presetByOrigin[ origin ].forEach( ( value ) => {
@@ -113,7 +116,11 @@ function getPresetsClasses( blockSelector = '*', blockPresets = {} ) {
113
116
  return declarations;
114
117
  }
115
118
 
116
- const presetByOrigin = get( blockPresets, path, [] );
119
+ const presetByOrigin = getValueFromObjectPath(
120
+ blockPresets,
121
+ path,
122
+ []
123
+ );
117
124
  [ 'default', 'theme', 'custom' ].forEach( ( origin ) => {
118
125
  if ( presetByOrigin[ origin ] ) {
119
126
  presetByOrigin[ origin ].forEach( ( { slug } ) => {
@@ -147,7 +154,11 @@ function getPresetsSvgFilters( blockPresets = {} ) {
147
154
  // Duotone are the only type of filters for now.
148
155
  ( metadata ) => metadata.path.at( -1 ) === 'duotone'
149
156
  ).flatMap( ( metadata ) => {
150
- const presetByOrigin = get( blockPresets, metadata.path, {} );
157
+ const presetByOrigin = getValueFromObjectPath(
158
+ blockPresets,
159
+ metadata.path,
160
+ {}
161
+ );
151
162
  return [ 'default', 'theme' ]
152
163
  .filter( ( origin ) => presetByOrigin[ origin ] )
153
164
  .flatMap( ( origin ) =>
@@ -319,7 +330,10 @@ export function getStylesDeclarations(
319
330
  return declarations;
320
331
  }
321
332
 
322
- const styleValue = get( blockStyles, pathToValue );
333
+ const styleValue = getValueFromObjectPath(
334
+ blockStyles,
335
+ pathToValue
336
+ );
323
337
 
324
338
  // Root-level padding styles don't currently support strings with CSS shorthand values.
325
339
  // This may change: https://github.com/WordPress/gutenberg/issues/40132.
@@ -334,7 +348,9 @@ export function getStylesDeclarations(
334
348
  Object.entries( properties ).forEach( ( entry ) => {
335
349
  const [ name, prop ] = entry;
336
350
 
337
- if ( ! get( styleValue, [ prop ], false ) ) {
351
+ if (
352
+ ! getValueFromObjectPath( styleValue, [ prop ], false )
353
+ ) {
338
354
  // Do not create a declaration
339
355
  // for sub-properties that don't have any value.
340
356
  return;
@@ -345,17 +361,19 @@ export function getStylesDeclarations(
345
361
  : kebabCase( name );
346
362
  declarations.push(
347
363
  `${ cssProperty }: ${ compileStyleValue(
348
- get( styleValue, [ prop ] )
364
+ getValueFromObjectPath( styleValue, [ prop ] )
349
365
  ) }`
350
366
  );
351
367
  } );
352
- } else if ( get( blockStyles, pathToValue, false ) ) {
368
+ } else if (
369
+ getValueFromObjectPath( blockStyles, pathToValue, false )
370
+ ) {
353
371
  const cssProperty = key.startsWith( '--' )
354
372
  ? key
355
373
  : kebabCase( key );
356
374
  declarations.push(
357
375
  `${ cssProperty }: ${ compileStyleValue(
358
- get( blockStyles, pathToValue )
376
+ getValueFromObjectPath( blockStyles, pathToValue )
359
377
  ) }`
360
378
  );
361
379
  }
@@ -384,7 +402,7 @@ export function getStylesDeclarations(
384
402
  let ruleValue = rule.value;
385
403
  if ( typeof ruleValue !== 'string' && ruleValue?.ref ) {
386
404
  const refPath = ruleValue.ref.split( '.' );
387
- ruleValue = get( tree, refPath );
405
+ ruleValue = getValueFromObjectPath( tree, refPath );
388
406
  // Presence of another ref indicates a reference to another dynamic value.
389
407
  // Pointing to another dynamic value is not supported.
390
408
  if ( ! ruleValue || ruleValue?.ref ) {
@@ -678,11 +696,11 @@ export const getNodesWithSettings = ( tree, blockSelectors ) => {
678
696
  }
679
697
 
680
698
  const pickPresets = ( treeToPickFrom ) => {
681
- const presets = {};
699
+ let presets = {};
682
700
  PRESET_METADATA.forEach( ( { path } ) => {
683
- const value = get( treeToPickFrom, path, false );
701
+ const value = getValueFromObjectPath( treeToPickFrom, path, false );
684
702
  if ( value !== false ) {
685
- set( presets, path, value );
703
+ presets = setImmutably( presets, path, value );
686
704
  }
687
705
  } );
688
706
  return presets;
@@ -1,7 +1,6 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import { get } from 'lodash';
5
4
  import fastDeepEqual from 'fast-deep-equal/es6';
6
5
 
7
6
  /**
@@ -11,6 +10,7 @@ import {
11
10
  getTypographyFontSizeValue,
12
11
  getFluidTypographyOptionsFromSettings,
13
12
  } from './typography-utils';
13
+ import { getValueFromObjectPath } from '../../utils/object';
14
14
 
15
15
  /* Supporting data. */
16
16
  export const ROOT_BLOCK_NAME = 'root';
@@ -168,8 +168,12 @@ function findInPresetsBy(
168
168
  ) {
169
169
  // Block presets take priority above root level presets.
170
170
  const orderedPresetsByOrigin = [
171
- get( features, [ 'blocks', blockName, ...presetPath ] ),
172
- get( features, presetPath ),
171
+ getValueFromObjectPath( features, [
172
+ 'blocks',
173
+ blockName,
174
+ ...presetPath,
175
+ ] ),
176
+ getValueFromObjectPath( features, presetPath ),
173
177
  ];
174
178
 
175
179
  for ( const presetByOrigin of orderedPresetsByOrigin ) {
@@ -282,8 +286,13 @@ function getValueFromPresetVariable(
282
286
 
283
287
  function getValueFromCustomVariable( features, blockName, variable, path ) {
284
288
  const result =
285
- get( features.settings, [ 'blocks', blockName, 'custom', ...path ] ) ??
286
- get( features.settings, [ 'custom', ...path ] );
289
+ getValueFromObjectPath( features.settings, [
290
+ 'blocks',
291
+ blockName,
292
+ 'custom',
293
+ ...path,
294
+ ] ) ??
295
+ getValueFromObjectPath( features.settings, [ 'custom', ...path ] );
287
296
  if ( ! result ) {
288
297
  return variable;
289
298
  }
@@ -303,7 +312,7 @@ export function getValueFromVariable( features, blockName, variable ) {
303
312
  if ( ! variable || typeof variable !== 'string' ) {
304
313
  if ( variable?.ref && typeof variable?.ref === 'string' ) {
305
314
  const refPath = variable.ref.split( '.' );
306
- variable = get( features, refPath );
315
+ variable = getValueFromObjectPath( features, refPath );
307
316
  // Presence of another ref indicates a reference to another dynamic value.
308
317
  // Pointing to another dynamic value is not supported.
309
318
  if ( ! variable || !! variable?.ref ) {
@@ -11,7 +11,6 @@ import {
11
11
  createPortal,
12
12
  forwardRef,
13
13
  useMemo,
14
- useReducer,
15
14
  useEffect,
16
15
  } from '@wordpress/element';
17
16
  import { __ } from '@wordpress/i18n';
@@ -78,29 +77,6 @@ function bubbleEvents( doc ) {
78
77
  }
79
78
  }
80
79
 
81
- function useParsedAssets( html ) {
82
- return useMemo( () => {
83
- const doc = document.implementation.createHTMLDocument( '' );
84
- doc.body.innerHTML = html;
85
- return Array.from( doc.body.children );
86
- }, [ html ] );
87
- }
88
-
89
- async function loadScript( head, { id, src } ) {
90
- return new Promise( ( resolve, reject ) => {
91
- const script = head.ownerDocument.createElement( 'script' );
92
- script.id = id;
93
- if ( src ) {
94
- script.src = src;
95
- script.onload = () => resolve();
96
- script.onerror = () => reject();
97
- } else {
98
- resolve();
99
- }
100
- head.appendChild( script );
101
- } );
102
- }
103
-
104
80
  function Iframe( {
105
81
  contentRef,
106
82
  children,
@@ -112,21 +88,25 @@ function Iframe( {
112
88
  forwardedRef: ref,
113
89
  ...props
114
90
  } ) {
115
- const assets = useSelect(
116
- ( select ) =>
117
- select( blockEditorStore ).getSettings().__unstableResolvedAssets,
118
- []
119
- );
120
- const [ , forceRender ] = useReducer( () => ( {} ) );
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;
121
99
  const [ iframeDocument, setIframeDocument ] = useState();
122
100
  const [ bodyClasses, setBodyClasses ] = useState( [] );
123
101
  const compatStyles = useCompatibilityStyles();
124
- const scripts = useParsedAssets( assets?.scripts );
125
102
  const clearerRef = useBlockSelectionClearer();
126
103
  const [ before, writingFlowRef, after ] = useWritingFlow();
127
104
  const [ contentResizeListener, { height: contentHeight } ] =
128
105
  useResizeObserver();
129
106
  const setRef = useRefEffect( ( node ) => {
107
+ node._load = () => {
108
+ setIframeDocument( node.contentDocument );
109
+ };
130
110
  let iFrameDocument;
131
111
  // Prevent the default browser action for files dropped outside of dropzones.
132
112
  function preventFileDropDefault( event ) {
@@ -138,7 +118,6 @@ function Iframe( {
138
118
  iFrameDocument = contentDocument;
139
119
 
140
120
  bubbleEvents( contentDocument );
141
- setIframeDocument( contentDocument );
142
121
  clearerRef( documentElement );
143
122
 
144
123
  // Ideally ALL classes that are added through get_body_class should
@@ -154,7 +133,6 @@ function Iframe( {
154
133
  );
155
134
 
156
135
  contentDocument.dir = ownerDocument.dir;
157
- documentElement.removeChild( contentDocument.body );
158
136
 
159
137
  for ( const compatStyle of compatStyles ) {
160
138
  if ( contentDocument.getElementById( compatStyle.id ) ) {
@@ -165,11 +143,13 @@ function Iframe( {
165
143
  compatStyle.cloneNode( true )
166
144
  );
167
145
 
168
- // eslint-disable-next-line no-console
169
- console.warn(
170
- `${ compatStyle.id } was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,
171
- compatStyle
172
- );
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
+ }
173
153
  }
174
154
 
175
155
  iFrameDocument.addEventListener(
@@ -199,35 +179,29 @@ function Iframe( {
199
179
  };
200
180
  }, [] );
201
181
 
202
- const headRef = useRefEffect( ( element ) => {
203
- scripts
204
- .reduce(
205
- ( promise, script ) =>
206
- promise.then( () => loadScript( element, script ) ),
207
- Promise.resolve()
208
- )
209
- .finally( () => {
210
- // When script are loaded, re-render blocks to allow them
211
- // to initialise.
212
- forceRender();
213
- } );
214
- }, [] );
215
182
  const disabledRef = useDisabled( { isDisabled: ! readonly } );
216
183
  const bodyRef = useMergeRefs( [
217
184
  contentRef,
218
185
  clearerRef,
219
186
  writingFlowRef,
220
187
  disabledRef,
221
- headRef,
222
188
  ] );
223
189
 
224
190
  // Correct doctype is required to enable rendering in standards
225
191
  // mode. Also preload the styles to avoid a flash of unstyled
226
192
  // content.
227
- const html =
228
- '<!doctype html>' +
229
- '<style>html{height:auto!important;min-height:100%;}body{margin:0}</style>' +
230
- ( assets?.styles ?? '' );
193
+ const html = `<!doctype html>
194
+ <html>
195
+ <head>
196
+ <script>window.frameElement._load()</script>
197
+ <style>html{height:auto!important;min-height:100%;}body{margin:0}</style>
198
+ ${ styles }
199
+ ${ scripts }
200
+ </head>
201
+ <body>
202
+ <script>document.currentScript.parentElement.remove()</script>
203
+ </body>
204
+ </html>`;
231
205
 
232
206
  const [ src, cleanup ] = useMemo( () => {
233
207
  const _src = URL.createObjectURL(
@@ -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
  ( {
@@ -165,8 +165,3 @@ export { default as __experimentalInspectorPopoverHeader } from './inspector-pop
165
165
 
166
166
  export { default as BlockEditorProvider } from './provider';
167
167
  export { default as useSetting } from './use-setting';
168
-
169
- /*
170
- * The following rename hint component can be removed in 6.4.
171
- */
172
- export { default as ReusableBlocksRenameHint } from './inserter/reusable-block-rename-hint';
@@ -185,3 +185,13 @@ For example, a button block, deeply nested in several levels of block `X` that u
185
185
 
186
186
  - **Type:** `Array`
187
187
  - **Default:** - `undefined`. Determines which block types should be shown in the block inserter. For example, when inserting a block within the Navigation block we specify `core/navigation-link` and `core/navigation-link/page` as these are the most commonly used inner blocks. `prioritizedInserterBlocks` takes an array of the form {blockName}/{variationName}, where {variationName} is optional.
188
+
189
+ ### `defaultBlock`
190
+
191
+ - **Type:** `Array`
192
+ - **Default:** - `undefined`. Determines which block type should be inserted by default and any attributes that should be set by default when the block is inserted. Takes an array in the form of `[ blockname, {blockAttributes} ]`.
193
+
194
+ ### `directInsert`
195
+
196
+ - **Type:** `Boolean`
197
+ - **Default:** - `undefined`. Determines whether the default block should be inserted directly into the InnerBlocks area by the block appender.
@@ -46,6 +46,8 @@ function UncontrolledInnerBlocks( props ) {
46
46
  clientId,
47
47
  allowedBlocks,
48
48
  prioritizedInserterBlocks,
49
+ defaultBlock,
50
+ directInsert,
49
51
  __experimentalDefaultBlock,
50
52
  __experimentalDirectInsert,
51
53
  template,
@@ -64,6 +66,8 @@ function UncontrolledInnerBlocks( props ) {
64
66
  clientId,
65
67
  allowedBlocks,
66
68
  prioritizedInserterBlocks,
69
+ defaultBlock,
70
+ directInsert,
67
71
  __experimentalDefaultBlock,
68
72
  __experimentalDirectInsert,
69
73
  templateLock,
@@ -73,6 +73,8 @@ function UncontrolledInnerBlocks( props ) {
73
73
  clientId,
74
74
  allowedBlocks,
75
75
  prioritizedInserterBlocks,
76
+ defaultBlock,
77
+ directInsert,
76
78
  __experimentalDefaultBlock,
77
79
  __experimentalDirectInsert,
78
80
  template,
@@ -103,6 +105,8 @@ function UncontrolledInnerBlocks( props ) {
103
105
  clientId,
104
106
  allowedBlocks,
105
107
  prioritizedInserterBlocks,
108
+ defaultBlock,
109
+ directInsert,
106
110
  __experimentalDefaultBlock,
107
111
  __experimentalDirectInsert,
108
112
  templateLock,
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import { useLayoutEffect, useMemo } from '@wordpress/element';
5
5
  import { useSelect, useDispatch, useRegistry } from '@wordpress/data';
6
+ import deprecated from '@wordpress/deprecated';
6
7
 
7
8
  /**
8
9
  * Internal dependencies
@@ -25,9 +26,13 @@ const pendingSettingsUpdates = new WeakMap();
25
26
  * @param {string[]} allowedBlocks An array of block names which are permitted
26
27
  * in inner blocks.
27
28
  * @param {string[]} prioritizedInserterBlocks Block names and/or block variations to be prioritized in the inserter, in the format {blockName}/{variationName}.
28
- * @param {?WPDirectInsertBlock} __experimentalDefaultBlock The default block to insert: [ blockName, { blockAttributes } ].
29
- * @param {?Function|boolean} __experimentalDirectInsert If a default block should be inserted directly by the
30
- * appender.
29
+ * @param {?WPDirectInsertBlock} defaultBlock The default block to insert: [ blockName, { blockAttributes } ].
30
+ * @param {?Function|boolean} directInsert If a default block should be inserted directly by the appender.
31
+ *
32
+ * @param {?WPDirectInsertBlock} __experimentalDefaultBlock A deprecated prop for the default block to insert: [ blockName, { blockAttributes } ]. Use `defaultBlock` instead.
33
+ *
34
+ * @param {?Function|boolean} __experimentalDirectInsert A deprecated prop for whether a default block should be inserted directly by the appender. Use `directInsert` instead.
35
+ *
31
36
  * @param {string} [templateLock] The template lock specified for the inner
32
37
  * blocks component. (e.g. "all")
33
38
  * @param {boolean} captureToolbars Whether or children toolbars should be shown
@@ -41,6 +46,8 @@ export default function useNestedSettingsUpdate(
41
46
  clientId,
42
47
  allowedBlocks,
43
48
  prioritizedInserterBlocks,
49
+ defaultBlock,
50
+ directInsert,
44
51
  __experimentalDefaultBlock,
45
52
  __experimentalDirectInsert,
46
53
  templateLock,
@@ -108,11 +115,29 @@ export default function useNestedSettingsUpdate(
108
115
  }
109
116
 
110
117
  if ( __experimentalDefaultBlock !== undefined ) {
111
- newSettings.__experimentalDefaultBlock = __experimentalDefaultBlock;
118
+ deprecated( '__experimentalDefaultBlock', {
119
+ alternative: 'defaultBlock',
120
+ since: '6.3',
121
+ version: '6.4',
122
+ } );
123
+ newSettings.defaultBlock = __experimentalDefaultBlock;
124
+ }
125
+
126
+ if ( defaultBlock !== undefined ) {
127
+ newSettings.defaultBlock = defaultBlock;
112
128
  }
113
129
 
114
130
  if ( __experimentalDirectInsert !== undefined ) {
115
- newSettings.__experimentalDirectInsert = __experimentalDirectInsert;
131
+ deprecated( '__experimentalDirectInsert', {
132
+ alternative: 'directInsert',
133
+ since: '6.3',
134
+ version: '6.4',
135
+ } );
136
+ newSettings.directInsert = __experimentalDirectInsert;
137
+ }
138
+
139
+ if ( directInsert !== undefined ) {
140
+ newSettings.directInsert = directInsert;
116
141
  }
117
142
 
118
143
  // Batch updates to block list settings to avoid triggering cascading renders
@@ -144,6 +169,8 @@ export default function useNestedSettingsUpdate(
144
169
  _allowedBlocks,
145
170
  _prioritizedInserterBlocks,
146
171
  _templateLock,
172
+ defaultBlock,
173
+ directInsert,
147
174
  __experimentalDefaultBlock,
148
175
  __experimentalDirectInsert,
149
176
  captureToolbars,
@@ -231,7 +231,7 @@ export const ComposedPrivateInserter = compose( [
231
231
  getBlockRootClientId,
232
232
  hasInserterItems,
233
233
  getAllowedBlocks,
234
- __experimentalGetDirectInsertBlock,
234
+ getDirectInsertBlock,
235
235
  getSettings,
236
236
  } = select( blockEditorStore );
237
237
 
@@ -243,8 +243,7 @@ export const ComposedPrivateInserter = compose( [
243
243
  const allowedBlocks = getAllowedBlocks( rootClientId );
244
244
 
245
245
  const directInsertBlock =
246
- shouldDirectInsert &&
247
- __experimentalGetDirectInsertBlock( rootClientId );
246
+ shouldDirectInsert && getDirectInsertBlock( rootClientId );
248
247
 
249
248
  const settings = getSettings();
250
249
 
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import { AccessibilityInfo, Platform, Text } from 'react-native';
4
+ import { AccessibilityInfo, Platform } from 'react-native';
5
5
 
6
6
  /**
7
7
  * WordPress dependencies
@@ -35,33 +35,17 @@ const VOICE_OVER_ANNOUNCEMENT_DELAY = 1000;
35
35
  const defaultRenderToggle = ( {
36
36
  onToggle,
37
37
  disabled,
38
- style,
39
- containerStyle,
38
+ iconStyle,
39
+ buttonStyle,
40
40
  onLongPress,
41
- useExpandedMode,
42
41
  } ) => {
43
- // The "expanded mode" refers to the editor's appearance when no blocks
44
- // are currently selected. The "add block" button has a separate style
45
- // for the "expanded mode", which are added via the below "expandedModeViewProps"
46
- // and "expandedModeViewText" variables.
47
- const expandedModeViewProps = useExpandedMode && {
48
- icon: <Icon icon={ plus } style={ style } />,
49
- customContainerStyles: containerStyle,
50
- fixedRatio: false,
51
- };
52
- const expandedModeViewText = (
53
- <Text style={ styles[ 'inserter-menu__add-block-button-text' ] }>
54
- { __( 'Add blocks' ) }
55
- </Text>
56
- );
57
-
58
42
  return (
59
43
  <ToolbarButton
60
44
  title={ _x(
61
45
  'Add block',
62
46
  'Generic label for block inserter button'
63
47
  ) }
64
- icon={ <Icon icon={ plusCircleFilled } style={ style } /> }
48
+ icon={ <Icon icon={ plus } style={ iconStyle } /> }
65
49
  onClick={ onToggle }
66
50
  extraProps={ {
67
51
  hint: __( 'Double tap to add a block' ),
@@ -69,12 +53,12 @@ const defaultRenderToggle = ( {
69
53
  // usually required for components. See: https://github.com/WordPress/gutenberg/pull/18832#issuecomment-561411389.
70
54
  testID: 'add-block-button',
71
55
  onLongPress,
56
+ hitSlop: { top: 10, bottom: 10, left: 10, right: 10 },
72
57
  } }
73
58
  isDisabled={ disabled }
74
- { ...expandedModeViewProps }
75
- >
76
- { useExpandedMode && expandedModeViewText }
77
- </ToolbarButton>
59
+ customContainerStyles={ buttonStyle }
60
+ fixedRatio={ false }
61
+ />
78
62
  );
79
63
  };
80
64
 
@@ -249,23 +233,21 @@ export class Inserter extends Component {
249
233
  renderToggle = defaultRenderToggle,
250
234
  getStylesFromColorScheme,
251
235
  showSeparator,
252
- useExpandedMode,
253
236
  } = this.props;
254
237
  if ( showSeparator && isOpen ) {
255
238
  return <BlockInsertionPoint />;
256
239
  }
257
- const style = useExpandedMode
258
- ? styles[ 'inserter-menu__add-block-button-icon--expanded' ]
259
- : getStylesFromColorScheme(
260
- styles[ 'inserter-menu__add-block-button-icon' ],
261
- styles[ 'inserter-menu__add-block-button-icon--dark' ]
262
- );
263
-
264
- const containerStyle = getStylesFromColorScheme(
240
+
241
+ const buttonStyle = getStylesFromColorScheme(
265
242
  styles[ 'inserter-menu__add-block-button' ],
266
243
  styles[ 'inserter-menu__add-block-button--dark' ]
267
244
  );
268
245
 
246
+ const iconStyle = getStylesFromColorScheme(
247
+ styles[ 'inserter-menu__add-block-button-icon' ],
248
+ styles[ 'inserter-menu__add-block-button-icon--dark' ]
249
+ );
250
+
269
251
  const onPress = () => {
270
252
  this.setState(
271
253
  {
@@ -301,10 +283,9 @@ export class Inserter extends Component {
301
283
  onToggle: onPress,
302
284
  isOpen,
303
285
  disabled,
304
- style,
305
- containerStyle,
286
+ iconStyle,
287
+ buttonStyle,
306
288
  onLongPress,
307
- useExpandedMode,
308
289
  } ) }
309
290
  <Picker
310
291
  ref={ ( instance ) => ( this.picker = instance ) }
@@ -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
@@ -1,26 +1,21 @@
1
1
  /** @format */
2
-
3
- .inserter-menu__add-block-button-icon {
4
- color: $blue-50;
2
+ .inserter-menu__add-block-button {
3
+ border-radius: 2px;
4
+ background-color: $black;
5
+ margin: 9px $grid-unit-20 10px $grid-unit-20;
6
+ padding: 0;
5
7
  }
6
8
 
7
- .inserter-menu__add-block-button-icon--dark {
8
- color: $blue-30;
9
+ .inserter-menu__add-block-button--dark {
10
+ background-color: $white;
9
11
  }
10
12
 
11
- .inserter-menu__add-block-button-icon--expanded {
13
+ .inserter-menu__add-block-button-icon {
12
14
  color: $white;
13
15
  }
14
16
 
15
- .inserter-menu__add-block-button {
16
- border-radius: 22px;
17
- background-color: $blue-50;
18
- margin: 8px;
19
- padding: 6px 16px 6px 12px;
20
- }
21
-
22
- .inserter-menu__add-block-button--dark {
23
- background-color: $blue-30;
17
+ .inserter-menu__add-block-button-icon--dark {
18
+ color: $black;
24
19
  }
25
20
 
26
21
  .inserter-menu__add-block-button-text {