@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
@@ -1,77 +1,28 @@
1
- /**
2
- * External dependencies
3
- */
4
- import classnames from 'classnames';
5
-
6
1
  /**
7
2
  * WordPress dependencies
8
3
  */
9
- import { isBlobURL } from '@wordpress/blob';
10
4
  import { getBlockSupport } from '@wordpress/blocks';
11
- import { focus } from '@wordpress/dom';
12
- import {
13
- ToggleControl,
14
- __experimentalToggleGroupControl as ToggleGroupControl,
15
- __experimentalToggleGroupControlOption as ToggleGroupControlOption,
16
- __experimentalToolsPanelItem as ToolsPanelItem,
17
- __experimentalUnitControl as UnitControl,
18
- __experimentalVStack as VStack,
19
- DropZone,
20
- FlexItem,
21
- FocalPointPicker,
22
- MenuItem,
23
- VisuallyHidden,
24
- __experimentalItemGroup as ItemGroup,
25
- __experimentalHStack as HStack,
26
- __experimentalTruncate as Truncate,
27
- } from '@wordpress/components';
28
- import { useDispatch, useSelect } from '@wordpress/data';
29
- import { Platform, useCallback, useRef } from '@wordpress/element';
30
- import { __, sprintf } from '@wordpress/i18n';
31
- import { store as noticesStore } from '@wordpress/notices';
32
- import { getFilename } from '@wordpress/url';
5
+ import { useSelect } from '@wordpress/data';
6
+ import { useCallback } from '@wordpress/element';
33
7
 
34
8
  /**
35
9
  * Internal dependencies
36
10
  */
37
11
  import InspectorControls from '../components/inspector-controls';
38
- import MediaReplaceFlow from '../components/media-replace-flow';
39
- import { useSettings } from '../components/use-settings';
40
12
  import { cleanEmptyObject } from './utils';
41
13
  import { store as blockEditorStore } from '../store';
14
+ import {
15
+ default as StylesBackgroundPanel,
16
+ useHasBackgroundPanel,
17
+ hasBackgroundImageValue,
18
+ } from '../components/global-styles/background-panel';
42
19
 
43
20
  export const BACKGROUND_SUPPORT_KEY = 'background';
44
- export const IMAGE_BACKGROUND_TYPE = 'image';
45
-
46
- /**
47
- * Checks if there is a current value in the background image block support
48
- * attributes.
49
- *
50
- * @param {Object} style Style attribute.
51
- * @return {boolean} Whether or not the block has a background image value set.
52
- */
53
- export function hasBackgroundImageValue( style ) {
54
- const hasValue =
55
- !! style?.background?.backgroundImage?.id ||
56
- !! style?.background?.backgroundImage?.url;
57
-
58
- return hasValue;
59
- }
60
21
 
61
- /**
62
- * Checks if there is a current value in the background size block support
63
- * attributes. Background size values include background size as well
64
- * as background position.
65
- *
66
- * @param {Object} style Style attribute.
67
- * @return {boolean} Whether or not the block has a background size value set.
68
- */
69
- export function hasBackgroundSizeValue( style ) {
70
- return (
71
- style?.background?.backgroundPosition !== undefined ||
72
- style?.background?.backgroundSize !== undefined
73
- );
74
- }
22
+ // Initial control values where no block style is set.
23
+ const BACKGROUND_BLOCK_DEFAULT_VALUES = {
24
+ backgroundSize: 'cover',
25
+ };
75
26
 
76
27
  /**
77
28
  * Determine whether there is block support for background.
@@ -82,10 +33,6 @@ export function hasBackgroundSizeValue( style ) {
82
33
  * @return {boolean} Whether there is support.
83
34
  */
84
35
  export function hasBackgroundSupport( blockName, feature = 'any' ) {
85
- if ( Platform.OS !== 'web' ) {
86
- return false;
87
- }
88
-
89
36
  const support = getBlockSupport( blockName, BACKGROUND_SUPPORT_KEY );
90
37
 
91
38
  if ( support === true ) {
@@ -103,44 +50,54 @@ export function hasBackgroundSupport( blockName, feature = 'any' ) {
103
50
  return !! support?.[ feature ];
104
51
  }
105
52
 
106
- /**
107
- * Resets the background image block support attributes. This can be used when disabling
108
- * the background image controls for a block via a `ToolsPanel`.
109
- *
110
- * @param {Object} style Style attribute.
111
- * @param {Function} setAttributes Function to set block's attributes.
112
- */
113
- export function resetBackgroundImage( style = {}, setAttributes ) {
114
- setAttributes( {
115
- style: cleanEmptyObject( {
116
- ...style,
117
- background: {
118
- ...style?.background,
119
- backgroundImage: undefined,
120
- },
121
- } ),
122
- } );
53
+ export function setBackgroundStyleDefaults( backgroundStyle ) {
54
+ if ( ! backgroundStyle ) {
55
+ return;
56
+ }
57
+
58
+ const backgroundImage = backgroundStyle?.backgroundImage;
59
+ let backgroundStylesWithDefaults;
60
+
61
+ // Set block background defaults.
62
+ if ( backgroundImage?.source === 'file' && !! backgroundImage?.url ) {
63
+ if ( ! backgroundStyle?.backgroundSize ) {
64
+ backgroundStylesWithDefaults = {
65
+ backgroundSize: 'cover',
66
+ };
67
+ }
68
+
69
+ if (
70
+ 'contain' === backgroundStyle?.backgroundSize &&
71
+ ! backgroundStyle?.backgroundPosition
72
+ ) {
73
+ backgroundStylesWithDefaults = {
74
+ backgroundPosition: 'center',
75
+ };
76
+ }
77
+ }
78
+
79
+ return backgroundStylesWithDefaults;
123
80
  }
124
81
 
125
- /**
126
- * Resets the background size block support attributes. This can be used when disabling
127
- * the background size controls for a block via a `ToolsPanel`.
128
- *
129
- * @param {Object} style Style attribute.
130
- * @param {Function} setAttributes Function to set block's attributes.
131
- */
132
- function resetBackgroundSize( style = {}, setAttributes ) {
133
- setAttributes( {
134
- style: cleanEmptyObject( {
135
- ...style,
136
- background: {
137
- ...style?.background,
138
- backgroundPosition: undefined,
139
- backgroundRepeat: undefined,
140
- backgroundSize: undefined,
141
- },
142
- } ),
143
- } );
82
+ function useBlockProps( { name, style } ) {
83
+ if (
84
+ ! hasBackgroundSupport( name ) ||
85
+ ! style?.background?.backgroundImage
86
+ ) {
87
+ return;
88
+ }
89
+
90
+ const backgroundStyles = setBackgroundStyleDefaults( style?.background );
91
+
92
+ if ( ! backgroundStyles ) {
93
+ return;
94
+ }
95
+
96
+ return {
97
+ style: {
98
+ ...backgroundStyles,
99
+ },
100
+ };
144
101
  }
145
102
 
146
103
  /**
@@ -154,252 +111,28 @@ export function getBackgroundImageClasses( style ) {
154
111
  return hasBackgroundImageValue( style ) ? 'has-background' : '';
155
112
  }
156
113
 
157
- function InspectorImagePreview( { label, filename, url: imgUrl } ) {
158
- const imgLabel = label || getFilename( imgUrl );
159
- return (
160
- <ItemGroup as="span">
161
- <HStack justify="flex-start" as="span">
162
- <span
163
- className={ classnames(
164
- 'block-editor-hooks__background__inspector-image-indicator-wrapper',
165
- {
166
- 'has-image': imgUrl,
167
- }
168
- ) }
169
- aria-hidden
170
- >
171
- { imgUrl && (
172
- <span
173
- className="block-editor-hooks__background__inspector-image-indicator"
174
- style={ {
175
- backgroundImage: `url(${ imgUrl })`,
176
- } }
177
- />
178
- ) }
179
- </span>
180
- <FlexItem as="span">
181
- <Truncate
182
- numberOfLines={ 1 }
183
- className="block-editor-hooks__background__inspector-media-replace-title"
184
- >
185
- { imgLabel }
186
- </Truncate>
187
- <VisuallyHidden as="span">
188
- { filename
189
- ? sprintf(
190
- /* translators: %s: file name */
191
- __( 'Selected image: %s' ),
192
- filename
193
- )
194
- : __( 'No image selected' ) }
195
- </VisuallyHidden>
196
- </FlexItem>
197
- </HStack>
198
- </ItemGroup>
199
- );
200
- }
201
-
202
- function BackgroundImagePanelItem( {
203
- clientId,
204
- isShownByDefault,
205
- setAttributes,
206
- } ) {
207
- const { style, mediaUpload } = useSelect(
208
- ( select ) => {
209
- const { getBlockAttributes, getSettings } =
210
- select( blockEditorStore );
211
-
212
- return {
213
- style: getBlockAttributes( clientId )?.style,
214
- mediaUpload: getSettings().mediaUpload,
215
- };
216
- },
217
- [ clientId ]
218
- );
219
- const { id, title, url } = style?.background?.backgroundImage || {};
220
-
221
- const replaceContainerRef = useRef();
222
-
223
- const { createErrorNotice } = useDispatch( noticesStore );
224
- const onUploadError = ( message ) => {
225
- createErrorNotice( message, { type: 'snackbar' } );
226
- };
227
-
228
- const onSelectMedia = ( media ) => {
229
- if ( ! media || ! media.url ) {
230
- const newStyle = {
231
- ...style,
232
- background: {
233
- ...style?.background,
234
- backgroundImage: undefined,
235
- },
236
- };
237
-
238
- const newAttributes = {
239
- style: cleanEmptyObject( newStyle ),
240
- };
241
-
242
- setAttributes( newAttributes );
243
- return;
244
- }
245
-
246
- if ( isBlobURL( media.url ) ) {
247
- return;
248
- }
249
-
250
- // For media selections originated from a file upload.
251
- if (
252
- ( media.media_type &&
253
- media.media_type !== IMAGE_BACKGROUND_TYPE ) ||
254
- ( ! media.media_type &&
255
- media.type &&
256
- media.type !== IMAGE_BACKGROUND_TYPE )
257
- ) {
258
- onUploadError(
259
- __( 'Only images can be used as a background image.' )
260
- );
261
- return;
262
- }
263
-
264
- const newStyle = {
265
- ...style,
266
- background: {
267
- ...style?.background,
268
- backgroundImage: {
269
- url: media.url,
270
- id: media.id,
271
- source: 'file',
272
- title: media.title || undefined,
273
- },
274
- },
275
- };
276
-
277
- const newAttributes = {
278
- style: cleanEmptyObject( newStyle ),
279
- };
280
-
281
- setAttributes( newAttributes );
282
- };
283
-
284
- const onFilesDrop = ( filesList ) => {
285
- mediaUpload( {
286
- allowedTypes: [ 'image' ],
287
- filesList,
288
- onFileChange( [ image ] ) {
289
- if ( isBlobURL( image?.url ) ) {
290
- return;
291
- }
292
- onSelectMedia( image );
293
- },
294
- onError: onUploadError,
295
- } );
296
- };
297
-
298
- const resetAllFilter = useCallback( ( previousValue ) => {
114
+ function BackgroundInspectorControl( { children } ) {
115
+ const resetAllFilter = useCallback( ( attributes ) => {
299
116
  return {
300
- ...previousValue,
117
+ ...attributes,
301
118
  style: {
302
- ...previousValue.style,
119
+ ...attributes.style,
303
120
  background: undefined,
304
121
  },
305
122
  };
306
123
  }, [] );
307
-
308
- const hasValue = hasBackgroundImageValue( style );
309
-
310
124
  return (
311
- <ToolsPanelItem
312
- className="single-column"
313
- hasValue={ () => hasValue }
314
- label={ __( 'Background image' ) }
315
- onDeselect={ () => resetBackgroundImage( style, setAttributes ) }
316
- isShownByDefault={ isShownByDefault }
317
- resetAllFilter={ resetAllFilter }
318
- panelId={ clientId }
319
- >
320
- <div
321
- className="block-editor-hooks__background__inspector-media-replace-container"
322
- ref={ replaceContainerRef }
323
- >
324
- <MediaReplaceFlow
325
- mediaId={ id }
326
- mediaURL={ url }
327
- allowedTypes={ [ IMAGE_BACKGROUND_TYPE ] }
328
- accept="image/*"
329
- onSelect={ onSelectMedia }
330
- name={
331
- <InspectorImagePreview
332
- label={ __( 'Background image' ) }
333
- filename={ title }
334
- url={ url }
335
- />
336
- }
337
- variant="secondary"
338
- >
339
- { hasValue && (
340
- <MenuItem
341
- onClick={ () => {
342
- const [ toggleButton ] = focus.tabbable.find(
343
- replaceContainerRef.current
344
- );
345
- // Focus the toggle button and close the dropdown menu.
346
- // This ensures similar behaviour as to selecting an image, where the dropdown is
347
- // closed and focus is redirected to the dropdown toggle button.
348
- toggleButton?.focus();
349
- toggleButton?.click();
350
- resetBackgroundImage( style, setAttributes );
351
- } }
352
- >
353
- { __( 'Reset ' ) }
354
- </MenuItem>
355
- ) }
356
- </MediaReplaceFlow>
357
- <DropZone
358
- onFilesDrop={ onFilesDrop }
359
- label={ __( 'Drop to upload' ) }
360
- />
361
- </div>
362
- </ToolsPanelItem>
125
+ <InspectorControls group="background" resetAllFilter={ resetAllFilter }>
126
+ { children }
127
+ </InspectorControls>
363
128
  );
364
129
  }
365
130
 
366
- function backgroundSizeHelpText( value ) {
367
- if ( value === 'cover' || value === undefined ) {
368
- return __( 'Image covers the space evenly.' );
369
- }
370
- if ( value === 'contain' ) {
371
- return __( 'Image is contained without distortion.' );
372
- }
373
- return __( 'Specify a fixed width.' );
374
- }
375
-
376
- export const coordsToBackgroundPosition = ( value ) => {
377
- if ( ! value || ( isNaN( value.x ) && isNaN( value.y ) ) ) {
378
- return undefined;
379
- }
380
-
381
- const x = isNaN( value.x ) ? 0.5 : value.x;
382
- const y = isNaN( value.y ) ? 0.5 : value.y;
383
-
384
- return `${ x * 100 }% ${ y * 100 }%`;
385
- };
386
-
387
- export const backgroundPositionToCoords = ( value ) => {
388
- if ( ! value ) {
389
- return { x: undefined, y: undefined };
390
- }
391
-
392
- let [ x, y ] = value.split( ' ' ).map( ( v ) => parseFloat( v ) / 100 );
393
- x = isNaN( x ) ? undefined : x;
394
- y = isNaN( y ) ? x : y;
395
-
396
- return { x, y };
397
- };
398
-
399
- function BackgroundSizePanelItem( {
131
+ export function BackgroundImagePanel( {
400
132
  clientId,
401
- isShownByDefault,
133
+ name,
402
134
  setAttributes,
135
+ settings,
403
136
  } ) {
404
137
  const style = useSelect(
405
138
  ( select ) =>
@@ -407,198 +140,49 @@ function BackgroundSizePanelItem( {
407
140
  [ clientId ]
408
141
  );
409
142
 
410
- const sizeValue = style?.background?.backgroundSize;
411
- const repeatValue = style?.background?.backgroundRepeat;
412
-
413
- // An `undefined` value is treated as `cover` by the toggle group control.
414
- // An empty string is treated as `auto` by the toggle group control. This
415
- // allows a user to select "Size" and then enter a custom value, with an
416
- // empty value being treated as `auto`.
417
- const currentValueForToggle =
418
- ( sizeValue !== undefined &&
419
- sizeValue !== 'cover' &&
420
- sizeValue !== 'contain' ) ||
421
- sizeValue === ''
422
- ? 'auto'
423
- : sizeValue || 'cover';
424
-
425
- // If the current value is `cover` and the repeat value is `undefined`, then
426
- // the toggle should be unchecked as the default state. Otherwise, the toggle
427
- // should reflect the current repeat value.
428
- const repeatCheckedValue =
429
- repeatValue === 'no-repeat' ||
430
- ( currentValueForToggle === 'cover' && repeatValue === undefined )
431
- ? false
432
- : true;
433
-
434
- const hasValue = hasBackgroundSizeValue( style );
435
-
436
- const resetAllFilter = useCallback( ( previousValue ) => {
437
- return {
438
- ...previousValue,
439
- style: {
440
- ...previousValue.style,
441
- background: {
442
- ...previousValue.style?.background,
443
- backgroundRepeat: undefined,
444
- backgroundSize: undefined,
445
- },
446
- },
447
- };
448
- }, [] );
449
-
450
- const updateBackgroundSize = ( next ) => {
451
- // When switching to 'contain' toggle the repeat off.
452
- let nextRepeat = repeatValue;
453
-
454
- if ( next === 'contain' ) {
455
- nextRepeat = 'no-repeat';
456
- }
457
-
458
- if (
459
- ( currentValueForToggle === 'cover' ||
460
- currentValueForToggle === 'contain' ) &&
461
- next === 'auto'
462
- ) {
463
- nextRepeat = undefined;
464
- }
143
+ if (
144
+ ! useHasBackgroundPanel( settings ) ||
145
+ ! hasBackgroundSupport( name, 'backgroundImage' )
146
+ ) {
147
+ return null;
148
+ }
465
149
 
466
- setAttributes( {
467
- style: cleanEmptyObject( {
468
- ...style,
469
- background: {
470
- ...style?.background,
471
- backgroundRepeat: nextRepeat,
472
- backgroundSize: next,
473
- },
474
- } ),
475
- } );
476
- };
150
+ const defaultControls = getBlockSupport( name, [
151
+ BACKGROUND_SUPPORT_KEY,
152
+ '__experimentalDefaultControls',
153
+ ] );
477
154
 
478
- const updateBackgroundPosition = ( next ) => {
155
+ const onChange = ( newStyle ) => {
479
156
  setAttributes( {
480
- style: cleanEmptyObject( {
481
- ...style,
482
- background: {
483
- ...style?.background,
484
- backgroundPosition: coordsToBackgroundPosition( next ),
485
- },
486
- } ),
157
+ style: cleanEmptyObject( newStyle ),
487
158
  } );
488
159
  };
489
160
 
490
- const toggleIsRepeated = () => {
491
- setAttributes( {
492
- style: cleanEmptyObject( {
493
- ...style,
494
- background: {
495
- ...style?.background,
496
- backgroundRepeat:
497
- repeatCheckedValue === true ? 'no-repeat' : undefined,
498
- },
499
- } ),
500
- } );
161
+ const updatedSettings = {
162
+ ...settings,
163
+ background: {
164
+ ...settings.background,
165
+ backgroundSize:
166
+ settings?.background?.backgroundSize &&
167
+ hasBackgroundSupport( name, 'backgroundSize' ),
168
+ },
501
169
  };
502
170
 
503
171
  return (
504
- <VStack
505
- as={ ToolsPanelItem }
506
- spacing={ 2 }
507
- className="single-column"
508
- hasValue={ () => hasValue }
509
- label={ __( 'Size' ) }
510
- onDeselect={ () => resetBackgroundSize( style, setAttributes ) }
511
- isShownByDefault={ isShownByDefault }
512
- resetAllFilter={ resetAllFilter }
172
+ <StylesBackgroundPanel
173
+ as={ BackgroundInspectorControl }
513
174
  panelId={ clientId }
514
- >
515
- <FocalPointPicker
516
- __next40pxDefaultSize
517
- label={ __( 'Position' ) }
518
- url={ style?.background?.backgroundImage?.url }
519
- value={ backgroundPositionToCoords(
520
- style?.background?.backgroundPosition
521
- ) }
522
- onChange={ updateBackgroundPosition }
523
- />
524
- <ToggleGroupControl
525
- size={ '__unstable-large' }
526
- label={ __( 'Size' ) }
527
- value={ currentValueForToggle }
528
- onChange={ updateBackgroundSize }
529
- isBlock
530
- help={ backgroundSizeHelpText( sizeValue ) }
531
- >
532
- <ToggleGroupControlOption
533
- key={ 'cover' }
534
- value={ 'cover' }
535
- label={ __( 'Cover' ) }
536
- />
537
- <ToggleGroupControlOption
538
- key={ 'contain' }
539
- value={ 'contain' }
540
- label={ __( 'Contain' ) }
541
- />
542
- <ToggleGroupControlOption
543
- key={ 'fixed' }
544
- value={ 'auto' }
545
- label={ __( 'Fixed' ) }
546
- />
547
- </ToggleGroupControl>
548
- { sizeValue !== undefined &&
549
- sizeValue !== 'cover' &&
550
- sizeValue !== 'contain' ? (
551
- <UnitControl
552
- size={ '__unstable-large' }
553
- onChange={ updateBackgroundSize }
554
- value={ sizeValue }
555
- />
556
- ) : null }
557
- { currentValueForToggle !== 'cover' && (
558
- <ToggleControl
559
- label={ __( 'Repeat' ) }
560
- checked={ repeatCheckedValue }
561
- onChange={ toggleIsRepeated }
562
- />
563
- ) }
564
- </VStack>
175
+ defaultControls={ defaultControls }
176
+ defaultValues={ BACKGROUND_BLOCK_DEFAULT_VALUES }
177
+ settings={ updatedSettings }
178
+ onChange={ onChange }
179
+ value={ style }
180
+ />
565
181
  );
566
182
  }
567
183
 
568
- export function BackgroundImagePanel( props ) {
569
- const [ backgroundImage, backgroundSize ] = useSettings(
570
- 'background.backgroundImage',
571
- 'background.backgroundSize'
572
- );
573
-
574
- if (
575
- ! backgroundImage ||
576
- ! hasBackgroundSupport( props.name, 'backgroundImage' )
577
- ) {
578
- return null;
579
- }
580
-
581
- const showBackgroundSize = !! (
582
- backgroundSize && hasBackgroundSupport( props.name, 'backgroundSize' )
583
- );
584
-
585
- const defaultControls = getBlockSupport( props.name, [
586
- BACKGROUND_SUPPORT_KEY,
587
- '__experimentalDefaultControls',
588
- ] );
589
-
590
- return (
591
- <InspectorControls group="background">
592
- <BackgroundImagePanelItem
593
- isShownByDefault={ defaultControls?.backgroundImage }
594
- { ...props }
595
- />
596
- { showBackgroundSize && (
597
- <BackgroundSizePanelItem
598
- isShownByDefault={ defaultControls?.backgroundSize }
599
- { ...props }
600
- />
601
- ) }
602
- </InspectorControls>
603
- );
604
- }
184
+ export default {
185
+ useBlockProps,
186
+ attributeKeys: [ 'style' ],
187
+ hasSupport: hasBackgroundSupport,
188
+ };
@@ -8,6 +8,7 @@ import {
8
8
  } from './utils';
9
9
  import './compat';
10
10
  import align from './align';
11
+ import background from './background';
11
12
  import './lock';
12
13
  import anchor from './anchor';
13
14
  import ariaLabel from './aria-label';
@@ -47,6 +48,7 @@ createBlockEditFilter(
47
48
  );
48
49
  createBlockListBlockFilter( [
49
50
  align,
51
+ background,
50
52
  style,
51
53
  color,
52
54
  dimensions,
@@ -78,3 +80,4 @@ export { getSpacingClassesAndStyles } from './use-spacing-props';
78
80
  export { getTypographyClassesAndStyles } from './use-typography-props';
79
81
  export { getGapCSSValue } from './gap';
80
82
  export { useCachedTruthy } from './use-cached-truthy';
83
+ export { useZoomOut } from './use-zoom-out';