@wordpress/block-editor 12.21.0 → 12.23.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 (408) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +4 -0
  3. package/build/components/block-actions/index.js +2 -4
  4. package/build/components/block-actions/index.js.map +1 -1
  5. package/build/components/block-heading-level-dropdown/index.js +5 -5
  6. package/build/components/block-heading-level-dropdown/index.js.map +1 -1
  7. package/build/components/block-heading-level-dropdown/index.native.js +5 -4
  8. package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
  9. package/build/components/block-list/block-crash-boundary.native.js +49 -0
  10. package/build/components/block-list/block-crash-boundary.native.js.map +1 -0
  11. package/build/components/block-list/block-crash-warning.native.js +24 -0
  12. package/build/components/block-list/block-crash-warning.native.js.map +1 -0
  13. package/build/components/block-list/block.js +11 -3
  14. package/build/components/block-list/block.js.map +1 -1
  15. package/build/components/block-list/block.native.js +7 -2
  16. package/build/components/block-list/block.native.js.map +1 -1
  17. package/build/components/block-mover/button.js +4 -1
  18. package/build/components/block-mover/button.js.map +1 -1
  19. package/build/components/block-mover/index.js +5 -1
  20. package/build/components/block-mover/index.js.map +1 -1
  21. package/build/components/block-patterns-list/index.js +4 -1
  22. package/build/components/block-patterns-list/index.js.map +1 -1
  23. package/build/components/block-settings/container.native.js +2 -1
  24. package/build/components/block-settings/container.native.js.map +1 -1
  25. package/build/components/block-settings-menu/block-settings-dropdown.js +36 -32
  26. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  27. package/build/components/block-settings-menu-controls/index.js +1 -3
  28. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  29. package/build/components/block-switcher/index.js +4 -3
  30. package/build/components/block-switcher/index.js.map +1 -1
  31. package/build/components/block-toolbar/index.js +8 -5
  32. package/build/components/block-toolbar/index.js.map +1 -1
  33. package/build/components/block-toolbar/shuffle.js +19 -10
  34. package/build/components/block-toolbar/shuffle.js.map +1 -1
  35. package/build/components/block-tools/block-selection-button.js +48 -8
  36. package/build/components/block-tools/block-selection-button.js.map +1 -1
  37. package/build/components/block-tools/index.js +14 -2
  38. package/build/components/block-tools/index.js.map +1 -1
  39. package/build/components/child-layout-control/index.js +108 -11
  40. package/build/components/child-layout-control/index.js.map +1 -1
  41. package/build/components/convert-to-group-buttons/toolbar.js +11 -0
  42. package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
  43. package/build/components/global-styles/advanced-panel.js +9 -2
  44. package/build/components/global-styles/advanced-panel.js.map +1 -1
  45. package/build/components/global-styles/background-panel.js +444 -0
  46. package/build/components/global-styles/background-panel.js.map +1 -0
  47. package/build/components/global-styles/color-panel.js +2 -1
  48. package/build/components/global-styles/color-panel.js.map +1 -1
  49. package/build/components/global-styles/dimensions-panel.js +8 -33
  50. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  51. package/build/components/global-styles/get-global-styles-changes.js +3 -0
  52. package/build/components/global-styles/get-global-styles-changes.js.map +1 -1
  53. package/build/components/global-styles/hooks.js +1 -1
  54. package/build/components/global-styles/hooks.js.map +1 -1
  55. package/build/components/global-styles/index.js +13 -0
  56. package/build/components/global-styles/index.js.map +1 -1
  57. package/build/components/global-styles/use-global-styles-output.js +16 -15
  58. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  59. package/build/components/global-styles/utils.js +2 -3
  60. package/build/components/global-styles/utils.js.map +1 -1
  61. package/build/components/iframe/index.js +43 -34
  62. package/build/components/iframe/index.js.map +1 -1
  63. package/build/components/inserter/block-patterns-explorer/index.js +3 -6
  64. package/build/components/inserter/block-patterns-explorer/index.js.map +1 -1
  65. package/build/components/inserter/block-patterns-explorer/pattern-list.js +3 -1
  66. package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  67. package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
  68. package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +5 -0
  69. package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
  70. package/build/components/inserter/library.js +2 -0
  71. package/build/components/inserter/library.js.map +1 -1
  72. package/build/components/inserter/menu.js +11 -11
  73. package/build/components/inserter/menu.js.map +1 -1
  74. package/build/components/inserter/mobile-tab-navigation.js +1 -1
  75. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  76. package/build/components/inserter/search-items.js +36 -15
  77. package/build/components/inserter/search-items.js.map +1 -1
  78. package/build/components/inserter/search-results.js +2 -3
  79. package/build/components/inserter/search-results.js.map +1 -1
  80. package/build/components/inserter/tabs.js +1 -2
  81. package/build/components/inserter/tabs.js.map +1 -1
  82. package/build/components/inspector-controls-tabs/advanced-controls-panel.native.js +36 -0
  83. package/build/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -0
  84. package/build/components/keyboard-shortcuts/index.js +11 -0
  85. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  86. package/build/components/list-view/block-select-button.js +18 -12
  87. package/build/components/list-view/block-select-button.js.map +1 -1
  88. package/build/components/list-view/block.js +4 -11
  89. package/build/components/list-view/block.js.map +1 -1
  90. package/build/components/list-view/index.js +17 -2
  91. package/build/components/list-view/index.js.map +1 -1
  92. package/build/components/list-view/use-list-view-collapse-items.js +47 -0
  93. package/build/components/list-view/use-list-view-collapse-items.js.map +1 -0
  94. package/build/components/list-view/utils.js +5 -3
  95. package/build/components/list-view/utils.js.map +1 -1
  96. package/build/components/rich-text/index.js +14 -11
  97. package/build/components/rich-text/index.js.map +1 -1
  98. package/build/components/rich-text/index.native.js +17 -11
  99. package/build/components/rich-text/index.native.js.map +1 -1
  100. package/build/components/rich-text/native/get-format-colors.native.js +1 -1
  101. package/build/components/rich-text/native/get-format-colors.native.js.map +1 -1
  102. package/build/components/rich-text/native/index.native.js +2 -2
  103. package/build/components/rich-text/native/index.native.js.map +1 -1
  104. package/build/components/rich-text/with-deprecations.js +0 -3
  105. package/build/components/rich-text/with-deprecations.js.map +1 -1
  106. package/build/components/spacing-sizes-control/sides-dropdown/index.js +1 -1
  107. package/build/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
  108. package/build/components/url-popover/image-url-input-ui.js +50 -36
  109. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  110. package/build/components/use-block-display-information/index.js +4 -6
  111. package/build/components/use-block-display-information/index.js.map +1 -1
  112. package/build/components/use-moving-animation/index.js +4 -0
  113. package/build/components/use-moving-animation/index.js.map +1 -1
  114. package/build/components/warning/index.native.js +9 -4
  115. package/build/components/warning/index.native.js.map +1 -1
  116. package/build/hooks/anchor.js +9 -10
  117. package/build/hooks/anchor.js.map +1 -1
  118. package/build/hooks/background.js +85 -402
  119. package/build/hooks/background.js.map +1 -1
  120. package/build/hooks/index.js +9 -1
  121. package/build/hooks/index.js.map +1 -1
  122. package/build/hooks/layout-child.js +28 -6
  123. package/build/hooks/layout-child.js.map +1 -1
  124. package/build/hooks/layout.js +21 -10
  125. package/build/hooks/layout.js.map +1 -1
  126. package/build/hooks/position.js +1 -1
  127. package/build/hooks/position.js.map +1 -1
  128. package/build/hooks/use-zoom-out.js +47 -0
  129. package/build/hooks/use-zoom-out.js.map +1 -0
  130. package/build/index.js +7 -0
  131. package/build/index.js.map +1 -1
  132. package/build/private-apis.js +6 -1
  133. package/build/private-apis.js.map +1 -1
  134. package/build/private-apis.native.js +5 -1
  135. package/build/private-apis.native.js.map +1 -1
  136. package/build/store/private-actions.js +13 -0
  137. package/build/store/private-actions.js.map +1 -1
  138. package/build/store/private-keys.js +2 -1
  139. package/build/store/private-keys.js.map +1 -1
  140. package/build/store/private-selectors.js +24 -3
  141. package/build/store/private-selectors.js.map +1 -1
  142. package/build/store/reducer.js +53 -26
  143. package/build/store/reducer.js.map +1 -1
  144. package/build/store/selectors.js +34 -32
  145. package/build/store/selectors.js.map +1 -1
  146. package/build/store/utils.js +7 -1
  147. package/build/store/utils.js.map +1 -1
  148. package/build/utils/transform-styles/index.js +2 -1
  149. package/build/utils/transform-styles/index.js.map +1 -1
  150. package/build-module/components/block-actions/index.js +2 -4
  151. package/build-module/components/block-actions/index.js.map +1 -1
  152. package/build-module/components/block-heading-level-dropdown/index.js +5 -5
  153. package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
  154. package/build-module/components/block-heading-level-dropdown/index.native.js +5 -4
  155. package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
  156. package/build-module/components/block-list/block-crash-boundary.native.js +42 -0
  157. package/build-module/components/block-list/block-crash-boundary.native.js.map +1 -0
  158. package/build-module/components/block-list/block-crash-warning.native.js +15 -0
  159. package/build-module/components/block-list/block-crash-warning.native.js.map +1 -0
  160. package/build-module/components/block-list/block.js +11 -3
  161. package/build-module/components/block-list/block.js.map +1 -1
  162. package/build-module/components/block-list/block.native.js +7 -2
  163. package/build-module/components/block-list/block.native.js.map +1 -1
  164. package/build-module/components/block-mover/button.js +4 -1
  165. package/build-module/components/block-mover/button.js.map +1 -1
  166. package/build-module/components/block-mover/index.js +5 -1
  167. package/build-module/components/block-mover/index.js.map +1 -1
  168. package/build-module/components/block-patterns-list/index.js +4 -1
  169. package/build-module/components/block-patterns-list/index.js.map +1 -1
  170. package/build-module/components/block-settings/container.native.js +3 -2
  171. package/build-module/components/block-settings/container.native.js.map +1 -1
  172. package/build-module/components/block-settings-menu/block-settings-dropdown.js +37 -33
  173. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  174. package/build-module/components/block-settings-menu-controls/index.js +1 -3
  175. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  176. package/build-module/components/block-switcher/index.js +4 -3
  177. package/build-module/components/block-switcher/index.js.map +1 -1
  178. package/build-module/components/block-toolbar/index.js +8 -5
  179. package/build-module/components/block-toolbar/index.js.map +1 -1
  180. package/build-module/components/block-toolbar/shuffle.js +19 -10
  181. package/build-module/components/block-toolbar/shuffle.js.map +1 -1
  182. package/build-module/components/block-tools/block-selection-button.js +50 -10
  183. package/build-module/components/block-tools/block-selection-button.js.map +1 -1
  184. package/build-module/components/block-tools/index.js +14 -2
  185. package/build-module/components/block-tools/index.js.map +1 -1
  186. package/build-module/components/child-layout-control/index.js +109 -12
  187. package/build-module/components/child-layout-control/index.js.map +1 -1
  188. package/build-module/components/convert-to-group-buttons/toolbar.js +12 -1
  189. package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
  190. package/build-module/components/global-styles/advanced-panel.js +9 -2
  191. package/build-module/components/global-styles/advanced-panel.js.map +1 -1
  192. package/build-module/components/global-styles/background-panel.js +430 -0
  193. package/build-module/components/global-styles/background-panel.js.map +1 -0
  194. package/build-module/components/global-styles/color-panel.js +2 -1
  195. package/build-module/components/global-styles/color-panel.js.map +1 -1
  196. package/build-module/components/global-styles/dimensions-panel.js +9 -34
  197. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  198. package/build-module/components/global-styles/get-global-styles-changes.js +3 -0
  199. package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
  200. package/build-module/components/global-styles/hooks.js +1 -1
  201. package/build-module/components/global-styles/hooks.js.map +1 -1
  202. package/build-module/components/global-styles/index.js +1 -0
  203. package/build-module/components/global-styles/index.js.map +1 -1
  204. package/build-module/components/global-styles/use-global-styles-output.js +17 -16
  205. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  206. package/build-module/components/global-styles/utils.js +1 -2
  207. package/build-module/components/global-styles/utils.js.map +1 -1
  208. package/build-module/components/iframe/index.js +43 -34
  209. package/build-module/components/iframe/index.js.map +1 -1
  210. package/build-module/components/inserter/block-patterns-explorer/index.js +3 -6
  211. package/build-module/components/inserter/block-patterns-explorer/index.js.map +1 -1
  212. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js +3 -1
  213. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  214. package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
  215. package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +5 -0
  216. package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
  217. package/build-module/components/inserter/library.js +2 -0
  218. package/build-module/components/inserter/library.js.map +1 -1
  219. package/build-module/components/inserter/menu.js +11 -11
  220. package/build-module/components/inserter/menu.js.map +1 -1
  221. package/build-module/components/inserter/mobile-tab-navigation.js +1 -1
  222. package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
  223. package/build-module/components/inserter/search-items.js +33 -15
  224. package/build-module/components/inserter/search-items.js.map +1 -1
  225. package/build-module/components/inserter/search-results.js +2 -3
  226. package/build-module/components/inserter/search-results.js.map +1 -1
  227. package/build-module/components/inserter/tabs.js +1 -2
  228. package/build-module/components/inserter/tabs.js.map +1 -1
  229. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.native.js +28 -0
  230. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -0
  231. package/build-module/components/keyboard-shortcuts/index.js +11 -0
  232. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  233. package/build-module/components/list-view/block-select-button.js +19 -13
  234. package/build-module/components/list-view/block-select-button.js.map +1 -1
  235. package/build-module/components/list-view/block.js +6 -13
  236. package/build-module/components/list-view/block.js.map +1 -1
  237. package/build-module/components/list-view/index.js +17 -2
  238. package/build-module/components/list-view/index.js.map +1 -1
  239. package/build-module/components/list-view/use-list-view-collapse-items.js +40 -0
  240. package/build-module/components/list-view/use-list-view-collapse-items.js.map +1 -0
  241. package/build-module/components/list-view/utils.js +2 -1
  242. package/build-module/components/list-view/utils.js.map +1 -1
  243. package/build-module/components/rich-text/index.js +15 -12
  244. package/build-module/components/rich-text/index.js.map +1 -1
  245. package/build-module/components/rich-text/index.native.js +16 -11
  246. package/build-module/components/rich-text/index.native.js.map +1 -1
  247. package/build-module/components/rich-text/native/get-format-colors.native.js +1 -1
  248. package/build-module/components/rich-text/native/get-format-colors.native.js.map +1 -1
  249. package/build-module/components/rich-text/native/index.native.js +2 -2
  250. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  251. package/build-module/components/rich-text/with-deprecations.js +0 -3
  252. package/build-module/components/rich-text/with-deprecations.js.map +1 -1
  253. package/build-module/components/spacing-sizes-control/sides-dropdown/index.js +1 -1
  254. package/build-module/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
  255. package/build-module/components/url-popover/image-url-input-ui.js +50 -36
  256. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  257. package/build-module/components/use-block-display-information/index.js +5 -7
  258. package/build-module/components/use-block-display-information/index.js.map +1 -1
  259. package/build-module/components/use-moving-animation/index.js +4 -0
  260. package/build-module/components/use-moving-animation/index.js.map +1 -1
  261. package/build-module/components/warning/index.native.js +9 -4
  262. package/build-module/components/warning/index.native.js.map +1 -1
  263. package/build-module/hooks/anchor.js +10 -11
  264. package/build-module/hooks/anchor.js.map +1 -1
  265. package/build-module/hooks/background.js +82 -397
  266. package/build-module/hooks/background.js.map +1 -1
  267. package/build-module/hooks/index.js +3 -1
  268. package/build-module/hooks/index.js.map +1 -1
  269. package/build-module/hooks/layout-child.js +28 -6
  270. package/build-module/hooks/layout-child.js.map +1 -1
  271. package/build-module/hooks/layout.js +21 -10
  272. package/build-module/hooks/layout.js.map +1 -1
  273. package/build-module/hooks/position.js +1 -1
  274. package/build-module/hooks/position.js.map +1 -1
  275. package/build-module/hooks/use-zoom-out.js +41 -0
  276. package/build-module/hooks/use-zoom-out.js.map +1 -0
  277. package/build-module/index.js +1 -1
  278. package/build-module/index.js.map +1 -1
  279. package/build-module/private-apis.js +7 -2
  280. package/build-module/private-apis.js.map +1 -1
  281. package/build-module/private-apis.native.js +5 -1
  282. package/build-module/private-apis.native.js.map +1 -1
  283. package/build-module/store/private-actions.js +12 -0
  284. package/build-module/store/private-actions.js.map +1 -1
  285. package/build-module/store/private-keys.js +1 -0
  286. package/build-module/store/private-keys.js.map +1 -1
  287. package/build-module/store/private-selectors.js +22 -4
  288. package/build-module/store/private-selectors.js.map +1 -1
  289. package/build-module/store/reducer.js +52 -26
  290. package/build-module/store/reducer.js.map +1 -1
  291. package/build-module/store/selectors.js +35 -33
  292. package/build-module/store/selectors.js.map +1 -1
  293. package/build-module/store/utils.js +6 -1
  294. package/build-module/store/utils.js.map +1 -1
  295. package/build-module/utils/transform-styles/index.js +2 -1
  296. package/build-module/utils/transform-styles/index.js.map +1 -1
  297. package/build-style/content-rtl.css +18 -1
  298. package/build-style/content.css +18 -1
  299. package/build-style/style-rtl.css +92 -99
  300. package/build-style/style.css +92 -99
  301. package/package.json +31 -31
  302. package/src/components/block-actions/index.js +2 -8
  303. package/src/components/block-bindings-toolbar-indicator/style.scss +10 -8
  304. package/src/components/block-heading-level-dropdown/README.md +5 -5
  305. package/src/components/block-heading-level-dropdown/index.js +5 -5
  306. package/src/components/block-heading-level-dropdown/index.native.js +5 -4
  307. package/src/components/block-list/block-crash-boundary.native.js +43 -0
  308. package/src/components/block-list/block-crash-warning.native.js +19 -0
  309. package/src/components/block-list/block.js +19 -3
  310. package/src/components/block-list/block.native.js +14 -7
  311. package/src/components/block-list/content.scss +16 -0
  312. package/src/components/block-mover/button.js +4 -1
  313. package/src/components/block-mover/index.js +8 -1
  314. package/src/components/block-patterns-list/index.js +22 -17
  315. package/src/components/block-preview/style.scss +28 -0
  316. package/src/components/block-settings/container.native.js +5 -1
  317. package/src/components/block-settings-menu/block-settings-dropdown.js +49 -58
  318. package/src/components/block-settings-menu-controls/README.md +0 -9
  319. package/src/components/block-settings-menu-controls/index.js +1 -6
  320. package/src/components/block-switcher/index.js +5 -3
  321. package/src/components/block-switcher/style.scss +1 -1
  322. package/src/components/block-toolbar/index.js +25 -20
  323. package/src/components/block-toolbar/shuffle.js +20 -14
  324. package/src/components/block-toolbar/style.scss +1 -1
  325. package/src/components/block-toolbar/test/index.native.js +1 -7
  326. package/src/components/block-tools/block-selection-button.js +66 -9
  327. package/src/components/block-tools/index.js +18 -1
  328. package/src/components/button-block-appender/content.scss +5 -1
  329. package/src/components/child-layout-control/index.js +147 -35
  330. package/src/components/convert-to-group-buttons/toolbar.js +13 -1
  331. package/src/components/default-block-appender/content.scss +2 -2
  332. package/src/components/global-styles/advanced-panel.js +8 -2
  333. package/src/components/global-styles/background-panel.js +591 -0
  334. package/src/components/global-styles/color-panel.js +2 -1
  335. package/src/components/global-styles/dimensions-panel.js +9 -34
  336. package/src/components/global-styles/get-global-styles-changes.js +3 -0
  337. package/src/components/global-styles/hooks.js +1 -0
  338. package/src/components/global-styles/index.js +4 -0
  339. package/src/components/global-styles/style.scss +78 -1
  340. package/src/{hooks/test/background.js → components/global-styles/test/background-panel.js} +36 -1
  341. package/src/components/global-styles/test/get-global-styles-changes.js +22 -3
  342. package/src/components/global-styles/test/use-global-styles-output.js +40 -9
  343. package/src/components/global-styles/use-global-styles-output.js +30 -17
  344. package/src/components/global-styles/utils.js +1 -18
  345. package/src/components/iframe/index.js +79 -53
  346. package/src/components/inserter/block-patterns-explorer/index.js +2 -9
  347. package/src/components/inserter/block-patterns-explorer/pattern-list.js +7 -1
  348. package/src/components/inserter/block-patterns-tab/index.js +1 -0
  349. package/src/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +5 -0
  350. package/src/components/inserter/library.js +4 -0
  351. package/src/components/inserter/menu.js +12 -11
  352. package/src/components/inserter/mobile-tab-navigation.js +1 -1
  353. package/src/components/inserter/search-items.js +37 -15
  354. package/src/components/inserter/search-results.js +1 -2
  355. package/src/components/inserter/style.scss +6 -12
  356. package/src/components/inserter/tabs.js +1 -2
  357. package/src/components/inspector-controls-tabs/advanced-controls-panel.native.js +31 -0
  358. package/src/components/keyboard-shortcuts/index.js +11 -0
  359. package/src/components/link-control/style.scss +0 -5
  360. package/src/components/list-view/block-select-button.js +15 -19
  361. package/src/components/list-view/block.js +12 -21
  362. package/src/components/list-view/index.js +18 -1
  363. package/src/components/list-view/style.scss +38 -28
  364. package/src/components/list-view/use-list-view-collapse-items.js +33 -0
  365. package/src/components/list-view/utils.js +4 -1
  366. package/src/components/rich-text/README.md +6 -0
  367. package/src/components/rich-text/index.js +30 -13
  368. package/src/components/rich-text/index.native.js +14 -11
  369. package/src/components/rich-text/native/get-format-colors.native.js +1 -1
  370. package/src/components/rich-text/native/index.native.js +2 -2
  371. package/src/components/rich-text/with-deprecations.js +0 -3
  372. package/src/components/spacing-sizes-control/sides-dropdown/index.js +1 -1
  373. package/src/components/url-popover/image-url-input-ui.js +68 -51
  374. package/src/components/use-block-display-information/index.js +8 -10
  375. package/src/components/use-moving-animation/index.js +1 -0
  376. package/src/components/warning/index.native.js +19 -15
  377. package/src/hooks/anchor.js +43 -61
  378. package/src/hooks/background.js +100 -516
  379. package/src/hooks/index.js +3 -0
  380. package/src/hooks/layout-child.js +44 -8
  381. package/src/hooks/layout.js +22 -18
  382. package/src/hooks/position.js +1 -1
  383. package/src/hooks/test/__snapshots__/anchor.native.js.snap +7 -0
  384. package/src/hooks/test/anchor.native.js +32 -0
  385. package/src/hooks/use-zoom-out.js +36 -0
  386. package/src/index.js +1 -0
  387. package/src/private-apis.js +13 -1
  388. package/src/private-apis.native.js +4 -0
  389. package/src/store/private-actions.js +12 -0
  390. package/src/store/private-keys.js +1 -0
  391. package/src/store/private-selectors.js +54 -27
  392. package/src/store/reducer.js +63 -41
  393. package/src/store/selectors.js +195 -180
  394. package/src/store/test/private-actions.js +10 -0
  395. package/src/store/test/private-selectors.js +13 -0
  396. package/src/store/test/reducer.js +26 -0
  397. package/src/store/test/selectors.js +90 -199
  398. package/src/store/utils.js +13 -0
  399. package/src/style.scss +0 -2
  400. package/src/utils/transform-styles/index.js +2 -1
  401. package/tsconfig.json +1 -0
  402. package/build/utils/calculate-scale.js +0 -17
  403. package/build/utils/calculate-scale.js.map +0 -1
  404. package/build-module/utils/calculate-scale.js +0 -11
  405. package/build-module/utils/calculate-scale.js.map +0 -1
  406. package/src/hooks/anchor.scss +0 -4
  407. package/src/hooks/background.scss +0 -75
  408. package/src/utils/calculate-scale.js +0 -20
@@ -0,0 +1,591 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import classnames from 'classnames';
5
+
6
+ /**
7
+ * WordPress dependencies
8
+ */
9
+ import {
10
+ __experimentalToolsPanel as ToolsPanel,
11
+ __experimentalToolsPanelItem as ToolsPanelItem,
12
+ ToggleControl,
13
+ __experimentalToggleGroupControl as ToggleGroupControl,
14
+ __experimentalToggleGroupControlOption as ToggleGroupControlOption,
15
+ __experimentalUnitControl as UnitControl,
16
+ __experimentalVStack as VStack,
17
+ DropZone,
18
+ FlexItem,
19
+ FocalPointPicker,
20
+ MenuItem,
21
+ VisuallyHidden,
22
+ __experimentalItemGroup as ItemGroup,
23
+ __experimentalHStack as HStack,
24
+ __experimentalTruncate as Truncate,
25
+ } from '@wordpress/components';
26
+ import { __, sprintf } from '@wordpress/i18n';
27
+ import { store as noticesStore } from '@wordpress/notices';
28
+ import { getFilename } from '@wordpress/url';
29
+ import { useCallback, Platform, useRef } from '@wordpress/element';
30
+ import { useDispatch, useSelect } from '@wordpress/data';
31
+ import { focus } from '@wordpress/dom';
32
+ import { isBlobURL } from '@wordpress/blob';
33
+
34
+ /**
35
+ * Internal dependencies
36
+ */
37
+ import { TOOLSPANEL_DROPDOWNMENU_PROPS } from './utils';
38
+ import { setImmutably } from '../../utils/object';
39
+ import MediaReplaceFlow from '../media-replace-flow';
40
+ import { store as blockEditorStore } from '../../store';
41
+
42
+ const IMAGE_BACKGROUND_TYPE = 'image';
43
+
44
+ /**
45
+ * Checks site settings to see if the background panel may be used.
46
+ * `settings.background.backgroundSize` exists also,
47
+ * but can only be used if settings?.background?.backgroundImage is `true`.
48
+ *
49
+ * @param {Object} settings Site settings
50
+ * @return {boolean} Whether site settings has activated background panel.
51
+ */
52
+ export function useHasBackgroundPanel( settings ) {
53
+ return Platform.OS === 'web' && settings?.background?.backgroundImage;
54
+ }
55
+
56
+ /**
57
+ * Checks if there is a current value in the background size block support
58
+ * attributes. Background size values include background size as well
59
+ * as background position.
60
+ *
61
+ * @param {Object} style Style attribute.
62
+ * @return {boolean} Whether the block has a background size value set.
63
+ */
64
+ export function hasBackgroundSizeValue( style ) {
65
+ return (
66
+ style?.background?.backgroundPosition !== undefined ||
67
+ style?.background?.backgroundSize !== undefined
68
+ );
69
+ }
70
+
71
+ /**
72
+ * Checks if there is a current value in the background image block support
73
+ * attributes.
74
+ *
75
+ * @param {Object} style Style attribute.
76
+ * @return {boolean} Whether the block has a background image value set.
77
+ */
78
+ export function hasBackgroundImageValue( style ) {
79
+ return (
80
+ !! style?.background?.backgroundImage?.id ||
81
+ !! style?.background?.backgroundImage?.url
82
+ );
83
+ }
84
+
85
+ /**
86
+ * Get the help text for the background size control.
87
+ *
88
+ * @param {string} value backgroundSize value.
89
+ * @return {string} Translated help text.
90
+ */
91
+ function backgroundSizeHelpText( value ) {
92
+ if ( value === 'cover' || value === undefined ) {
93
+ return __( 'Image covers the space evenly.' );
94
+ }
95
+ if ( value === 'contain' ) {
96
+ return __( 'Image is contained without distortion.' );
97
+ }
98
+ return __( 'Specify a fixed width.' );
99
+ }
100
+
101
+ /**
102
+ * Converts decimal x and y coords from FocalPointPicker to percentage-based values
103
+ * to use as backgroundPosition value.
104
+ *
105
+ * @param {{x?:number, y?:number}} value FocalPointPicker coords.
106
+ * @return {string} backgroundPosition value.
107
+ */
108
+ export const coordsToBackgroundPosition = ( value ) => {
109
+ if ( ! value || ( isNaN( value.x ) && isNaN( value.y ) ) ) {
110
+ return undefined;
111
+ }
112
+
113
+ const x = isNaN( value.x ) ? 0.5 : value.x;
114
+ const y = isNaN( value.y ) ? 0.5 : value.y;
115
+
116
+ return `${ x * 100 }% ${ y * 100 }%`;
117
+ };
118
+
119
+ /**
120
+ * Converts backgroundPosition value to x and y coords for FocalPointPicker.
121
+ *
122
+ * @param {string} value backgroundPosition value.
123
+ * @return {{x?:number, y?:number}} FocalPointPicker coords.
124
+ */
125
+ export const backgroundPositionToCoords = ( value ) => {
126
+ if ( ! value ) {
127
+ return { x: undefined, y: undefined };
128
+ }
129
+
130
+ let [ x, y ] = value.split( ' ' ).map( ( v ) => parseFloat( v ) / 100 );
131
+ x = isNaN( x ) ? undefined : x;
132
+ y = isNaN( y ) ? x : y;
133
+
134
+ return { x, y };
135
+ };
136
+
137
+ function InspectorImagePreview( { label, filename, url: imgUrl } ) {
138
+ const imgLabel = label || getFilename( imgUrl );
139
+ return (
140
+ <ItemGroup as="span">
141
+ <HStack justify="flex-start" as="span">
142
+ <span
143
+ className={ classnames(
144
+ 'block-editor-global-styles-background-panel__inspector-image-indicator-wrapper',
145
+ {
146
+ 'has-image': imgUrl,
147
+ }
148
+ ) }
149
+ aria-hidden
150
+ >
151
+ { imgUrl && (
152
+ <span
153
+ className="block-editor-global-styles-background-panel__inspector-image-indicator"
154
+ style={ {
155
+ backgroundImage: `url(${ imgUrl })`,
156
+ } }
157
+ />
158
+ ) }
159
+ </span>
160
+ <FlexItem as="span">
161
+ <Truncate
162
+ numberOfLines={ 1 }
163
+ className="block-editor-global-styles-background-panel__inspector-media-replace-title"
164
+ >
165
+ { imgLabel }
166
+ </Truncate>
167
+ <VisuallyHidden as="span">
168
+ { filename
169
+ ? sprintf(
170
+ /* translators: %s: file name */
171
+ __( 'Selected image: %s' ),
172
+ filename
173
+ )
174
+ : __( 'No image selected' ) }
175
+ </VisuallyHidden>
176
+ </FlexItem>
177
+ </HStack>
178
+ </ItemGroup>
179
+ );
180
+ }
181
+
182
+ function BackgroundImageToolsPanelItem( {
183
+ panelId,
184
+ isShownByDefault,
185
+ onChange,
186
+ style,
187
+ inheritedValue,
188
+ } ) {
189
+ const mediaUpload = useSelect(
190
+ ( select ) => select( blockEditorStore ).getSettings().mediaUpload,
191
+ []
192
+ );
193
+
194
+ const { id, title, url } = style?.background?.backgroundImage || {
195
+ ...inheritedValue?.background?.backgroundImage,
196
+ };
197
+
198
+ const replaceContainerRef = useRef();
199
+
200
+ const { createErrorNotice } = useDispatch( noticesStore );
201
+ const onUploadError = ( message ) => {
202
+ createErrorNotice( message, { type: 'snackbar' } );
203
+ };
204
+
205
+ const resetBackgroundImage = () =>
206
+ onChange(
207
+ setImmutably(
208
+ style,
209
+ [ 'background', 'backgroundImage' ],
210
+ undefined
211
+ )
212
+ );
213
+
214
+ const onSelectMedia = ( media ) => {
215
+ if ( ! media || ! media.url ) {
216
+ resetBackgroundImage();
217
+ return;
218
+ }
219
+
220
+ if ( isBlobURL( media.url ) ) {
221
+ return;
222
+ }
223
+
224
+ // For media selections originated from a file upload.
225
+ if (
226
+ ( media.media_type &&
227
+ media.media_type !== IMAGE_BACKGROUND_TYPE ) ||
228
+ ( ! media.media_type &&
229
+ media.type &&
230
+ media.type !== IMAGE_BACKGROUND_TYPE )
231
+ ) {
232
+ onUploadError(
233
+ __( 'Only images can be used as a background image.' )
234
+ );
235
+ return;
236
+ }
237
+
238
+ onChange(
239
+ setImmutably( style, [ 'background', 'backgroundImage' ], {
240
+ url: media.url,
241
+ id: media.id,
242
+ source: 'file',
243
+ title: media.title || undefined,
244
+ } )
245
+ );
246
+ };
247
+
248
+ const onFilesDrop = ( filesList ) => {
249
+ mediaUpload( {
250
+ allowedTypes: [ 'image' ],
251
+ filesList,
252
+ onFileChange( [ image ] ) {
253
+ if ( isBlobURL( image?.url ) ) {
254
+ return;
255
+ }
256
+ onSelectMedia( image );
257
+ },
258
+ onError: onUploadError,
259
+ } );
260
+ };
261
+
262
+ const resetAllFilter = useCallback( ( previousValue ) => {
263
+ return {
264
+ ...previousValue,
265
+ style: {
266
+ ...previousValue.style,
267
+ background: undefined,
268
+ },
269
+ };
270
+ }, [] );
271
+
272
+ const hasValue =
273
+ hasBackgroundImageValue( style ) ||
274
+ hasBackgroundImageValue( inheritedValue );
275
+
276
+ return (
277
+ <ToolsPanelItem
278
+ className="single-column"
279
+ hasValue={ () => hasValue }
280
+ label={ __( 'Background image' ) }
281
+ onDeselect={ resetBackgroundImage }
282
+ isShownByDefault={ isShownByDefault }
283
+ resetAllFilter={ resetAllFilter }
284
+ panelId={ panelId }
285
+ >
286
+ <div
287
+ className="block-editor-global-styles-background-panel__inspector-media-replace-container"
288
+ ref={ replaceContainerRef }
289
+ >
290
+ <MediaReplaceFlow
291
+ mediaId={ id }
292
+ mediaURL={ url }
293
+ allowedTypes={ [ IMAGE_BACKGROUND_TYPE ] }
294
+ accept="image/*"
295
+ onSelect={ onSelectMedia }
296
+ name={
297
+ <InspectorImagePreview
298
+ label={ __( 'Background image' ) }
299
+ filename={ title || __( 'Untitled' ) }
300
+ url={ url }
301
+ />
302
+ }
303
+ variant="secondary"
304
+ >
305
+ { hasValue && (
306
+ <MenuItem
307
+ onClick={ () => {
308
+ const [ toggleButton ] = focus.tabbable.find(
309
+ replaceContainerRef.current
310
+ );
311
+ // Focus the toggle button and close the dropdown menu.
312
+ // This ensures similar behaviour as to selecting an image, where the dropdown is
313
+ // closed and focus is redirected to the dropdown toggle button.
314
+ toggleButton?.focus();
315
+ toggleButton?.click();
316
+ resetBackgroundImage();
317
+ } }
318
+ >
319
+ { __( 'Reset ' ) }
320
+ </MenuItem>
321
+ ) }
322
+ </MediaReplaceFlow>
323
+ <DropZone
324
+ onFilesDrop={ onFilesDrop }
325
+ label={ __( 'Drop to upload' ) }
326
+ />
327
+ </div>
328
+ </ToolsPanelItem>
329
+ );
330
+ }
331
+
332
+ function BackgroundSizeToolsPanelItem( {
333
+ panelId,
334
+ isShownByDefault,
335
+ onChange,
336
+ style,
337
+ inheritedValue,
338
+ defaultValues,
339
+ } ) {
340
+ const sizeValue =
341
+ style?.background?.backgroundSize ||
342
+ inheritedValue?.background?.backgroundSize;
343
+ const repeatValue =
344
+ style?.background?.backgroundRepeat ||
345
+ inheritedValue?.background?.backgroundRepeat;
346
+ const imageValue =
347
+ style?.background?.backgroundImage?.url ||
348
+ inheritedValue?.background?.backgroundImage?.url;
349
+ const positionValue =
350
+ style?.background?.backgroundPosition ||
351
+ inheritedValue?.background?.backgroundPosition;
352
+
353
+ /*
354
+ * An `undefined` value is replaced with any supplied
355
+ * default control value for the toggle group control.
356
+ * An empty string is treated as `auto` - this allows a user
357
+ * to select "Size" and then enter a custom value, with an
358
+ * empty value being treated as `auto`.
359
+ */
360
+ const currentValueForToggle =
361
+ ( sizeValue !== undefined &&
362
+ sizeValue !== 'cover' &&
363
+ sizeValue !== 'contain' ) ||
364
+ sizeValue === ''
365
+ ? 'auto'
366
+ : sizeValue || defaultValues?.backgroundSize;
367
+
368
+ /*
369
+ * If the current value is `cover` and the repeat value is `undefined`, then
370
+ * the toggle should be unchecked as the default state. Otherwise, the toggle
371
+ * should reflect the current repeat value.
372
+ */
373
+ const repeatCheckedValue = ! (
374
+ repeatValue === 'no-repeat' ||
375
+ ( currentValueForToggle === 'cover' && repeatValue === undefined )
376
+ );
377
+
378
+ const hasValue = hasBackgroundSizeValue( style );
379
+
380
+ const resetAllFilter = useCallback( ( previousValue ) => {
381
+ return {
382
+ ...previousValue,
383
+ style: {
384
+ ...previousValue.style,
385
+ background: {
386
+ ...previousValue.style?.background,
387
+ backgroundRepeat: undefined,
388
+ backgroundSize: undefined,
389
+ },
390
+ },
391
+ };
392
+ }, [] );
393
+
394
+ const updateBackgroundSize = ( next ) => {
395
+ // When switching to 'contain' toggle the repeat off.
396
+ let nextRepeat = repeatValue;
397
+
398
+ if ( next === 'contain' ) {
399
+ nextRepeat = 'no-repeat';
400
+ }
401
+
402
+ if ( next === 'cover' ) {
403
+ nextRepeat = undefined;
404
+ }
405
+
406
+ if (
407
+ ( currentValueForToggle === 'cover' ||
408
+ currentValueForToggle === 'contain' ) &&
409
+ next === 'auto'
410
+ ) {
411
+ nextRepeat = undefined;
412
+ }
413
+
414
+ onChange(
415
+ setImmutably( style, [ 'background' ], {
416
+ ...style?.background,
417
+ backgroundRepeat: nextRepeat,
418
+ backgroundSize: next,
419
+ } )
420
+ );
421
+ };
422
+
423
+ const updateBackgroundPosition = ( next ) => {
424
+ onChange(
425
+ setImmutably(
426
+ style,
427
+ [ 'background', 'backgroundPosition' ],
428
+ coordsToBackgroundPosition( next )
429
+ )
430
+ );
431
+ };
432
+
433
+ const toggleIsRepeated = () =>
434
+ onChange(
435
+ setImmutably(
436
+ style,
437
+ [ 'background', 'backgroundRepeat' ],
438
+ repeatCheckedValue === true ? 'no-repeat' : undefined
439
+ )
440
+ );
441
+
442
+ const resetBackgroundSize = () =>
443
+ onChange(
444
+ setImmutably( style, [ 'background' ], {
445
+ ...style?.background,
446
+ backgroundPosition: undefined,
447
+ backgroundRepeat: undefined,
448
+ backgroundSize: undefined,
449
+ } )
450
+ );
451
+
452
+ return (
453
+ <VStack
454
+ as={ ToolsPanelItem }
455
+ spacing={ 2 }
456
+ className="single-column"
457
+ hasValue={ () => hasValue }
458
+ label={ __( 'Size' ) }
459
+ onDeselect={ resetBackgroundSize }
460
+ isShownByDefault={ isShownByDefault }
461
+ resetAllFilter={ resetAllFilter }
462
+ panelId={ panelId }
463
+ >
464
+ <FocalPointPicker
465
+ __next40pxDefaultSize
466
+ label={ __( 'Position' ) }
467
+ url={ imageValue }
468
+ value={ backgroundPositionToCoords( positionValue ) }
469
+ onChange={ updateBackgroundPosition }
470
+ />
471
+ <ToggleGroupControl
472
+ size={ '__unstable-large' }
473
+ label={ __( 'Size' ) }
474
+ value={ currentValueForToggle }
475
+ onChange={ updateBackgroundSize }
476
+ isBlock
477
+ help={ backgroundSizeHelpText( sizeValue ) }
478
+ >
479
+ <ToggleGroupControlOption
480
+ key={ 'cover' }
481
+ value={ 'cover' }
482
+ label={ __( 'Cover' ) }
483
+ />
484
+ <ToggleGroupControlOption
485
+ key={ 'contain' }
486
+ value={ 'contain' }
487
+ label={ __( 'Contain' ) }
488
+ />
489
+ <ToggleGroupControlOption
490
+ key={ 'fixed' }
491
+ value={ 'auto' }
492
+ label={ __( 'Fixed' ) }
493
+ />
494
+ </ToggleGroupControl>
495
+ { sizeValue !== undefined &&
496
+ sizeValue !== 'cover' &&
497
+ sizeValue !== 'contain' ? (
498
+ <UnitControl
499
+ size={ '__unstable-large' }
500
+ onChange={ updateBackgroundSize }
501
+ value={ sizeValue }
502
+ />
503
+ ) : null }
504
+ { currentValueForToggle !== 'cover' && (
505
+ <ToggleControl
506
+ label={ __( 'Repeat' ) }
507
+ checked={ repeatCheckedValue }
508
+ onChange={ toggleIsRepeated }
509
+ />
510
+ ) }
511
+ </VStack>
512
+ );
513
+ }
514
+
515
+ function BackgroundToolsPanel( {
516
+ resetAllFilter,
517
+ onChange,
518
+ value,
519
+ panelId,
520
+ children,
521
+ } ) {
522
+ const resetAll = () => {
523
+ const updatedValue = resetAllFilter( value );
524
+ onChange( updatedValue );
525
+ };
526
+
527
+ return (
528
+ <VStack
529
+ as={ ToolsPanel }
530
+ spacing={ 6 }
531
+ label={ __( 'Background' ) }
532
+ resetAll={ resetAll }
533
+ panelId={ panelId }
534
+ dropdownMenuProps={ TOOLSPANEL_DROPDOWNMENU_PROPS }
535
+ >
536
+ { children }
537
+ </VStack>
538
+ );
539
+ }
540
+
541
+ const DEFAULT_CONTROLS = {
542
+ backgroundImage: true,
543
+ backgroundSize: true,
544
+ };
545
+
546
+ export default function BackgroundPanel( {
547
+ as: Wrapper = BackgroundToolsPanel,
548
+ value,
549
+ onChange,
550
+ inheritedValue = value,
551
+ settings,
552
+ panelId,
553
+ defaultControls = DEFAULT_CONTROLS,
554
+ defaultValues = {},
555
+ } ) {
556
+ const resetAllFilter = useCallback( ( previousValue ) => {
557
+ return {
558
+ ...previousValue,
559
+ background: {},
560
+ };
561
+ }, [] );
562
+ const shouldShowBackgroundSizeControls =
563
+ settings?.background?.backgroundSize;
564
+
565
+ return (
566
+ <Wrapper
567
+ resetAllFilter={ resetAllFilter }
568
+ value={ value }
569
+ onChange={ onChange }
570
+ panelId={ panelId }
571
+ >
572
+ <BackgroundImageToolsPanelItem
573
+ onChange={ onChange }
574
+ panelId={ panelId }
575
+ isShownByDefault={ defaultControls.backgroundImage }
576
+ style={ value }
577
+ inheritedValue={ inheritedValue }
578
+ />
579
+ { shouldShowBackgroundSizeControls && (
580
+ <BackgroundSizeToolsPanelItem
581
+ onChange={ onChange }
582
+ panelId={ panelId }
583
+ isShownByDefault={ defaultControls.backgroundSize }
584
+ style={ value }
585
+ inheritedValue={ inheritedValue }
586
+ defaultValues={ defaultValues }
587
+ />
588
+ ) }
589
+ </Wrapper>
590
+ );
591
+ }
@@ -123,10 +123,11 @@ function ColorToolsPanel( {
123
123
 
124
124
  return (
125
125
  <ToolsPanel
126
- label={ __( 'Color' ) }
126
+ label={ __( 'Elements' ) }
127
127
  resetAll={ resetAll }
128
128
  panelId={ panelId }
129
129
  hasInnerWrapper
130
+ headingLevel={ 3 }
130
131
  className="color-block-support-panel"
131
132
  __experimentalFirstVisibleItemClass="first"
132
133
  __experimentalLastVisibleItemClass="last"
@@ -12,7 +12,6 @@ import {
12
12
  __experimentalToolsPanelItem as ToolsPanelItem,
13
13
  __experimentalBoxControl as BoxControl,
14
14
  __experimentalHStack as HStack,
15
- __experimentalVStack as VStack,
16
15
  __experimentalUnitControl as UnitControl,
17
16
  __experimentalUseCustomUnits as useCustomUnits,
18
17
  __experimentalView as View,
@@ -396,16 +395,7 @@ export default function DimensionsPanel( {
396
395
  // Child Layout
397
396
  const showChildLayoutControl = useHasChildLayout( settings );
398
397
  const childLayout = inheritedValue?.layout;
399
- const { orientation = 'horizontal' } = settings?.parentLayout ?? {};
400
- const {
401
- type: parentType,
402
- default: { type: defaultParentType = 'default' } = {},
403
- } = settings?.parentLayout ?? {};
404
- const parentLayoutType = parentType || defaultParentType;
405
- const flexResetLabel =
406
- orientation === 'horizontal' ? __( 'Width' ) : __( 'Height' );
407
- const childLayoutResetLabel =
408
- parentLayoutType === 'flex' ? flexResetLabel : __( 'Grid spans' );
398
+
409
399
  const setChildLayout = ( newChildLayout ) => {
410
400
  onChange( {
411
401
  ...value,
@@ -414,15 +404,6 @@ export default function DimensionsPanel( {
414
404
  },
415
405
  } );
416
406
  };
417
- const resetChildLayoutValue = () => {
418
- setChildLayout( {
419
- selfStretch: undefined,
420
- flexSize: undefined,
421
- columnSpan: undefined,
422
- rowSpan: undefined,
423
- } );
424
- };
425
- const hasChildLayoutValue = () => !! value?.layout;
426
407
 
427
408
  const resetAllFilter = useCallback( ( previousValue ) => {
428
409
  return {
@@ -433,6 +414,8 @@ export default function DimensionsPanel( {
433
414
  wideSize: undefined,
434
415
  selfStretch: undefined,
435
416
  flexSize: undefined,
417
+ columnStart: undefined,
418
+ rowStart: undefined,
436
419
  columnSpan: undefined,
437
420
  rowSpan: undefined,
438
421
  } ),
@@ -650,24 +633,16 @@ export default function DimensionsPanel( {
650
633
  </ToolsPanelItem>
651
634
  ) }
652
635
  { showChildLayoutControl && (
653
- <VStack
654
- as={ ToolsPanelItem }
655
- spacing={ 2 }
656
- hasValue={ hasChildLayoutValue }
657
- label={ childLayoutResetLabel }
658
- onDeselect={ resetChildLayoutValue }
636
+ <ChildLayoutControl
637
+ value={ childLayout }
638
+ onChange={ setChildLayout }
639
+ parentLayout={ settings?.parentLayout }
640
+ panelId={ panelId }
659
641
  isShownByDefault={
660
642
  defaultControls.childLayout ??
661
643
  DEFAULT_CONTROLS.childLayout
662
644
  }
663
- panelId={ panelId }
664
- >
665
- <ChildLayoutControl
666
- value={ childLayout }
667
- onChange={ setChildLayout }
668
- parentLayout={ settings?.parentLayout }
669
- />
670
- </VStack>
645
+ />
671
646
  ) }
672
647
  { showMinHeightControl && (
673
648
  <ToolsPanelItem
@@ -26,6 +26,7 @@ const translationMap = {
26
26
  'settings.typography': __( 'Typography' ),
27
27
  'styles.color': __( 'Colors' ),
28
28
  'styles.spacing': __( 'Spacing' ),
29
+ 'styles.background': __( 'Background' ),
29
30
  'styles.typography': __( 'Typography' ),
30
31
  };
31
32
  const getBlockNames = memoize( () =>
@@ -126,6 +127,7 @@ export function getGlobalStylesChangelist( next, previous ) {
126
127
  const changedValueTree = deepCompare(
127
128
  {
128
129
  styles: {
130
+ background: next?.styles?.background,
129
131
  color: next?.styles?.color,
130
132
  typography: next?.styles?.typography,
131
133
  spacing: next?.styles?.spacing,
@@ -136,6 +138,7 @@ export function getGlobalStylesChangelist( next, previous ) {
136
138
  },
137
139
  {
138
140
  styles: {
141
+ background: previous?.styles?.background,
139
142
  color: previous?.styles?.color,
140
143
  typography: previous?.styles?.typography,
141
144
  spacing: previous?.styles?.spacing,
@@ -27,6 +27,7 @@ const VALID_SETTINGS = [
27
27
  'background.backgroundImage',
28
28
  'background.backgroundRepeat',
29
29
  'background.backgroundSize',
30
+ 'background.backgroundPosition',
30
31
  'border.color',
31
32
  'border.radius',
32
33
  'border.style',