@wordpress/block-editor 9.5.0 → 9.7.1-next.d6164808d3.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 (548) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/block-alignment-control/use-available-alignments.js +1 -1
  3. package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
  4. package/build/components/block-edit-visually-button/index.js +46 -0
  5. package/build/components/block-edit-visually-button/index.js.map +1 -0
  6. package/build/components/block-list/block.js +12 -2
  7. package/build/components/block-list/block.js.map +1 -1
  8. package/build/components/block-list/index.native.js +1 -1
  9. package/build/components/block-list/index.native.js.map +1 -1
  10. package/build/components/block-lock/modal.js +2 -2
  11. package/build/components/block-lock/modal.js.map +1 -1
  12. package/build/components/block-mobile-toolbar/block-actions-menu.native.js +1 -1
  13. package/build/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
  14. package/build/components/block-mover/mover-description.js +95 -32
  15. package/build/components/block-mover/mover-description.js.map +1 -1
  16. package/build/components/block-popover/inbetween.js +5 -3
  17. package/build/components/block-popover/inbetween.js.map +1 -1
  18. package/build/components/block-settings-menu/index.js +2 -6
  19. package/build/components/block-settings-menu/index.js.map +1 -1
  20. package/build/components/block-settings-menu-controls/index.js +1 -1
  21. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  22. package/build/components/block-styles/index.js +3 -6
  23. package/build/components/block-styles/index.js.map +1 -1
  24. package/build/components/block-styles/preview.native.js +1 -3
  25. package/build/components/block-styles/preview.native.js.map +1 -1
  26. package/build/components/block-switcher/index.js +10 -16
  27. package/build/components/block-switcher/index.js.map +1 -1
  28. package/build/components/block-toolbar/index.js +5 -1
  29. package/build/components/block-toolbar/index.js.map +1 -1
  30. package/build/components/block-tools/block-selection-button.js +1 -7
  31. package/build/components/block-tools/block-selection-button.js.map +1 -1
  32. package/build/components/block-tools/index.js +4 -1
  33. package/build/components/block-tools/index.js.map +1 -1
  34. package/build/components/block-types-list/index.js +1 -1
  35. package/build/components/block-types-list/index.js.map +1 -1
  36. package/build/components/block-types-list/index.native.js +65 -23
  37. package/build/components/block-types-list/index.native.js.map +1 -1
  38. package/build/components/border-radius-control/all-input-control.js +31 -3
  39. package/build/components/border-radius-control/all-input-control.js.map +1 -1
  40. package/build/components/border-radius-control/index.js +23 -7
  41. package/build/components/border-radius-control/index.js.map +1 -1
  42. package/build/components/border-radius-control/input-controls.js +21 -6
  43. package/build/components/border-radius-control/input-controls.js.map +1 -1
  44. package/build/components/border-radius-control/utils.js +13 -16
  45. package/build/components/border-radius-control/utils.js.map +1 -1
  46. package/build/components/colors/utils.js +6 -2
  47. package/build/components/colors/utils.js.map +1 -1
  48. package/build/components/colors/with-colors.js +17 -4
  49. package/build/components/colors/with-colors.js.map +1 -1
  50. package/build/components/colors-gradients/control.js +8 -4
  51. package/build/components/colors-gradients/control.js.map +1 -1
  52. package/build/components/colors-gradients/dropdown.js +9 -3
  53. package/build/components/colors-gradients/dropdown.js.map +1 -1
  54. package/build/components/copy-handler/index.js +6 -0
  55. package/build/components/copy-handler/index.js.map +1 -1
  56. package/build/components/date-format-picker/index.js +2 -7
  57. package/build/components/date-format-picker/index.js.map +1 -1
  58. package/build/components/duotone/components.js +5 -5
  59. package/build/components/duotone/components.js.map +1 -1
  60. package/build/components/font-appearance-control/index.js +10 -4
  61. package/build/components/font-appearance-control/index.js.map +1 -1
  62. package/build/components/font-family/index.js +1 -1
  63. package/build/components/font-family/index.js.map +1 -1
  64. package/build/components/font-sizes/with-font-sizes.js +17 -4
  65. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  66. package/build/components/image-editor/cropper.js +4 -3
  67. package/build/components/image-editor/cropper.js.map +1 -1
  68. package/build/components/image-editor/index.js +3 -1
  69. package/build/components/image-editor/index.js.map +1 -1
  70. package/build/components/image-size-control/index.js +3 -1
  71. package/build/components/image-size-control/index.js.map +1 -1
  72. package/build/components/index.js +22 -6
  73. package/build/components/index.js.map +1 -1
  74. package/build/components/index.native.js +11 -4
  75. package/build/components/index.native.js.map +1 -1
  76. package/build/components/inserter/block-types-tab.native.js +30 -16
  77. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  78. package/build/components/inserter/index.native.js +8 -3
  79. package/build/components/inserter/index.native.js.map +1 -1
  80. package/build/components/inserter/preview-panel.js +8 -8
  81. package/build/components/inserter/preview-panel.js.map +1 -1
  82. package/build/components/inserter/reusable-blocks-tab.native.js +5 -1
  83. package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  84. package/build/components/inserter/search-items.js +22 -4
  85. package/build/components/inserter/search-items.js.map +1 -1
  86. package/build/components/inserter/search-results.native.js +5 -2
  87. package/build/components/inserter/search-results.native.js.map +1 -1
  88. package/build/components/inserter/utils.native.js +21 -0
  89. package/build/components/inserter/utils.native.js.map +1 -1
  90. package/build/components/inserter-list-item/index.js +7 -20
  91. package/build/components/inserter-list-item/index.js.map +1 -1
  92. package/build/components/letter-spacing-control/index.js +6 -3
  93. package/build/components/letter-spacing-control/index.js.map +1 -1
  94. package/build/components/line-height-control/index.js +6 -3
  95. package/build/components/line-height-control/index.js.map +1 -1
  96. package/build/components/link-control/is-url-like.js +1 -7
  97. package/build/components/link-control/is-url-like.js.map +1 -1
  98. package/build/components/link-control/link-preview.js +0 -1
  99. package/build/components/link-control/link-preview.js.map +1 -1
  100. package/build/components/link-control/use-search-handler.js +1 -7
  101. package/build/components/link-control/use-search-handler.js.map +1 -1
  102. package/build/components/list-view/block-select-button.js +5 -2
  103. package/build/components/list-view/block-select-button.js.map +1 -1
  104. package/build/components/list-view/branch.js +1 -7
  105. package/build/components/list-view/branch.js.map +1 -1
  106. package/build/components/list-view/expander.js +3 -1
  107. package/build/components/list-view/expander.js.map +1 -1
  108. package/build/components/list-view/use-block-selection.js +1 -7
  109. package/build/components/list-view/use-block-selection.js.map +1 -1
  110. package/build/components/media-upload/index.native.js +8 -3
  111. package/build/components/media-upload/index.native.js.map +1 -1
  112. package/build/components/observe-typing/index.js +22 -8
  113. package/build/components/observe-typing/index.js.map +1 -1
  114. package/build/components/preview-options/index.js +2 -2
  115. package/build/components/preview-options/index.js.map +1 -1
  116. package/build/components/{use-no-recursive-renders → recursion-provider}/index.js +40 -18
  117. package/build/components/recursion-provider/index.js.map +1 -0
  118. package/build/components/rich-text/format-toolbar-container.js +61 -12
  119. package/build/components/rich-text/format-toolbar-container.js.map +1 -1
  120. package/build/components/rich-text/index.js +8 -2
  121. package/build/components/rich-text/index.js.map +1 -1
  122. package/build/components/rich-text/index.native.js +3 -1
  123. package/build/components/rich-text/index.native.js.map +1 -1
  124. package/build/components/rich-text/use-before-input-rules.js +110 -0
  125. package/build/components/rich-text/use-before-input-rules.js.map +1 -0
  126. package/build/components/rich-text/use-enter.js +0 -4
  127. package/build/components/rich-text/use-enter.js.map +1 -1
  128. package/build/components/rich-text/use-format-types.js +39 -22
  129. package/build/components/rich-text/use-format-types.js.map +1 -1
  130. package/build/components/spacing-sizes-control/all-input-control.js +53 -0
  131. package/build/components/spacing-sizes-control/all-input-control.js.map +1 -0
  132. package/build/components/spacing-sizes-control/axial-input-controls.js +69 -0
  133. package/build/components/spacing-sizes-control/axial-input-controls.js.map +1 -0
  134. package/build/components/spacing-sizes-control/index.js +100 -0
  135. package/build/components/spacing-sizes-control/index.js.map +1 -0
  136. package/build/components/spacing-sizes-control/input-controls.js +52 -0
  137. package/build/components/spacing-sizes-control/input-controls.js.map +1 -0
  138. package/build/components/spacing-sizes-control/linked-button.js +38 -0
  139. package/build/components/spacing-sizes-control/linked-button.js.map +1 -0
  140. package/build/components/spacing-sizes-control/spacing-input-control.js +208 -0
  141. package/build/components/spacing-sizes-control/spacing-input-control.js.map +1 -0
  142. package/build/components/spacing-sizes-control/utils.js +202 -0
  143. package/build/components/spacing-sizes-control/utils.js.map +1 -0
  144. package/build/components/text-decoration-control/index.js +3 -1
  145. package/build/components/text-decoration-control/index.js.map +1 -1
  146. package/build/components/text-transform-control/index.js +3 -1
  147. package/build/components/text-transform-control/index.js.map +1 -1
  148. package/build/components/url-input/index.js +1 -1
  149. package/build/components/url-input/index.js.map +1 -1
  150. package/build/components/url-popover/image-url-input-ui.js +4 -1
  151. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  152. package/build/components/writing-flow/use-arrow-nav.js +4 -25
  153. package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
  154. package/build/components/writing-flow/use-drag-selection.js +9 -2
  155. package/build/components/writing-flow/use-drag-selection.js.map +1 -1
  156. package/build/components/writing-flow/use-multi-selection.js +4 -2
  157. package/build/components/writing-flow/use-multi-selection.js.map +1 -1
  158. package/build/components/writing-flow/use-select-all.js +3 -1
  159. package/build/components/writing-flow/use-select-all.js.map +1 -1
  160. package/build/components/writing-flow/use-selection-observer.js +10 -2
  161. package/build/components/writing-flow/use-selection-observer.js.map +1 -1
  162. package/build/components/writing-flow/use-tab-nav.js +1 -1
  163. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  164. package/build/hooks/border-radius.js +2 -7
  165. package/build/hooks/border-radius.js.map +1 -1
  166. package/build/hooks/border.js +2 -2
  167. package/build/hooks/border.js.map +1 -1
  168. package/build/hooks/color.js +4 -1
  169. package/build/hooks/color.js.map +1 -1
  170. package/build/hooks/dimensions.js +15 -0
  171. package/build/hooks/dimensions.js.map +1 -1
  172. package/build/hooks/duotone.js +4 -4
  173. package/build/hooks/duotone.js.map +1 -1
  174. package/build/hooks/gap.js +6 -4
  175. package/build/hooks/gap.js.map +1 -1
  176. package/build/hooks/generated-class-name.js +1 -7
  177. package/build/hooks/generated-class-name.js.map +1 -1
  178. package/build/hooks/layout.js +42 -15
  179. package/build/hooks/layout.js.map +1 -1
  180. package/build/hooks/margin.js +28 -12
  181. package/build/hooks/margin.js.map +1 -1
  182. package/build/hooks/padding.js +19 -8
  183. package/build/hooks/padding.js.map +1 -1
  184. package/build/hooks/style.js +40 -76
  185. package/build/hooks/style.js.map +1 -1
  186. package/build/layouts/constrained.js +215 -0
  187. package/build/layouts/constrained.js.map +1 -0
  188. package/build/layouts/flex.js +1 -1
  189. package/build/layouts/flex.js.map +1 -1
  190. package/build/layouts/flow.js +6 -145
  191. package/build/layouts/flow.js.map +1 -1
  192. package/build/layouts/index.js +3 -1
  193. package/build/layouts/index.js.map +1 -1
  194. package/build/layouts/utils.js +43 -0
  195. package/build/layouts/utils.js.map +1 -1
  196. package/build/store/actions.js +25 -3
  197. package/build/store/actions.js.map +1 -1
  198. package/build/store/selectors.js +4 -6
  199. package/build/store/selectors.js.map +1 -1
  200. package/build/utils/block-variation-transforms.js +15 -9
  201. package/build/utils/block-variation-transforms.js.map +1 -1
  202. package/build/utils/pasting.js +9 -1
  203. package/build/utils/pasting.js.map +1 -1
  204. package/build-module/components/block-alignment-control/use-available-alignments.js +1 -1
  205. package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
  206. package/build-module/components/block-edit-visually-button/index.js +35 -0
  207. package/build-module/components/block-edit-visually-button/index.js.map +1 -0
  208. package/build-module/components/block-list/block.js +13 -3
  209. package/build-module/components/block-list/block.js.map +1 -1
  210. package/build-module/components/block-list/index.native.js +1 -1
  211. package/build-module/components/block-list/index.native.js.map +1 -1
  212. package/build-module/components/block-lock/modal.js +2 -2
  213. package/build-module/components/block-lock/modal.js.map +1 -1
  214. package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js +2 -2
  215. package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
  216. package/build-module/components/block-mover/mover-description.js +97 -33
  217. package/build-module/components/block-mover/mover-description.js.map +1 -1
  218. package/build-module/components/block-popover/inbetween.js +5 -3
  219. package/build-module/components/block-popover/inbetween.js.map +1 -1
  220. package/build-module/components/block-settings-menu/index.js +3 -6
  221. package/build-module/components/block-settings-menu/index.js.map +1 -1
  222. package/build-module/components/block-settings-menu-controls/index.js +2 -2
  223. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  224. package/build-module/components/block-styles/index.js +4 -7
  225. package/build-module/components/block-styles/index.js.map +1 -1
  226. package/build-module/components/block-styles/preview.native.js +2 -3
  227. package/build-module/components/block-styles/preview.native.js.map +1 -1
  228. package/build-module/components/block-switcher/index.js +10 -16
  229. package/build-module/components/block-switcher/index.js.map +1 -1
  230. package/build-module/components/block-toolbar/index.js +4 -1
  231. package/build-module/components/block-toolbar/index.js.map +1 -1
  232. package/build-module/components/block-tools/block-selection-button.js +1 -7
  233. package/build-module/components/block-tools/block-selection-button.js.map +1 -1
  234. package/build-module/components/block-tools/index.js +4 -1
  235. package/build-module/components/block-tools/index.js.map +1 -1
  236. package/build-module/components/block-types-list/index.js +1 -1
  237. package/build-module/components/block-types-list/index.js.map +1 -1
  238. package/build-module/components/block-types-list/index.native.js +67 -25
  239. package/build-module/components/block-types-list/index.native.js.map +1 -1
  240. package/build-module/components/border-radius-control/all-input-control.js +32 -4
  241. package/build-module/components/border-radius-control/all-input-control.js.map +1 -1
  242. package/build-module/components/border-radius-control/index.js +24 -8
  243. package/build-module/components/border-radius-control/index.js.map +1 -1
  244. package/build-module/components/border-radius-control/input-controls.js +22 -7
  245. package/build-module/components/border-radius-control/input-controls.js.map +1 -1
  246. package/build-module/components/border-radius-control/utils.js +13 -16
  247. package/build-module/components/border-radius-control/utils.js.map +1 -1
  248. package/build-module/components/colors/utils.js +7 -3
  249. package/build-module/components/colors/utils.js.map +1 -1
  250. package/build-module/components/colors/with-colors.js +16 -3
  251. package/build-module/components/colors/with-colors.js.map +1 -1
  252. package/build-module/components/colors-gradients/control.js +8 -4
  253. package/build-module/components/colors-gradients/control.js.map +1 -1
  254. package/build-module/components/colors-gradients/dropdown.js +10 -4
  255. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  256. package/build-module/components/copy-handler/index.js +7 -1
  257. package/build-module/components/copy-handler/index.js.map +1 -1
  258. package/build-module/components/date-format-picker/index.js +2 -6
  259. package/build-module/components/date-format-picker/index.js.map +1 -1
  260. package/build-module/components/duotone/components.js +5 -5
  261. package/build-module/components/duotone/components.js.map +1 -1
  262. package/build-module/components/font-appearance-control/index.js +7 -4
  263. package/build-module/components/font-appearance-control/index.js.map +1 -1
  264. package/build-module/components/font-family/index.js +1 -1
  265. package/build-module/components/font-family/index.js.map +1 -1
  266. package/build-module/components/font-sizes/with-font-sizes.js +16 -3
  267. package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
  268. package/build-module/components/image-editor/cropper.js +4 -3
  269. package/build-module/components/image-editor/cropper.js.map +1 -1
  270. package/build-module/components/image-editor/index.js +3 -1
  271. package/build-module/components/image-editor/index.js.map +1 -1
  272. package/build-module/components/image-size-control/index.js +3 -1
  273. package/build-module/components/image-size-control/index.js.map +1 -1
  274. package/build-module/components/index.js +2 -1
  275. package/build-module/components/index.js.map +1 -1
  276. package/build-module/components/index.native.js +1 -1
  277. package/build-module/components/index.native.js.map +1 -1
  278. package/build-module/components/inserter/block-types-tab.native.js +31 -15
  279. package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
  280. package/build-module/components/inserter/index.native.js +9 -2
  281. package/build-module/components/inserter/index.native.js.map +1 -1
  282. package/build-module/components/inserter/preview-panel.js +9 -9
  283. package/build-module/components/inserter/preview-panel.js.map +1 -1
  284. package/build-module/components/inserter/reusable-blocks-tab.native.js +6 -2
  285. package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  286. package/build-module/components/inserter/search-items.js +19 -5
  287. package/build-module/components/inserter/search-items.js.map +1 -1
  288. package/build-module/components/inserter/search-results.native.js +6 -3
  289. package/build-module/components/inserter/search-results.native.js.map +1 -1
  290. package/build-module/components/inserter/utils.native.js +19 -0
  291. package/build-module/components/inserter/utils.native.js.map +1 -1
  292. package/build-module/components/inserter-list-item/index.js +5 -18
  293. package/build-module/components/inserter-list-item/index.js.map +1 -1
  294. package/build-module/components/letter-spacing-control/index.js +5 -3
  295. package/build-module/components/letter-spacing-control/index.js.map +1 -1
  296. package/build-module/components/line-height-control/index.js +5 -3
  297. package/build-module/components/line-height-control/index.js.map +1 -1
  298. package/build-module/components/link-control/is-url-like.js +1 -6
  299. package/build-module/components/link-control/is-url-like.js.map +1 -1
  300. package/build-module/components/link-control/link-preview.js +0 -1
  301. package/build-module/components/link-control/link-preview.js.map +1 -1
  302. package/build-module/components/link-control/use-search-handler.js +1 -6
  303. package/build-module/components/link-control/use-search-handler.js.map +1 -1
  304. package/build-module/components/list-view/block-select-button.js +5 -2
  305. package/build-module/components/list-view/block-select-button.js.map +1 -1
  306. package/build-module/components/list-view/branch.js +1 -6
  307. package/build-module/components/list-view/branch.js.map +1 -1
  308. package/build-module/components/list-view/expander.js +3 -2
  309. package/build-module/components/list-view/expander.js.map +1 -1
  310. package/build-module/components/list-view/use-block-selection.js +1 -6
  311. package/build-module/components/list-view/use-block-selection.js.map +1 -1
  312. package/build-module/components/media-upload/index.native.js +9 -2
  313. package/build-module/components/media-upload/index.native.js.map +1 -1
  314. package/build-module/components/observe-typing/index.js +22 -8
  315. package/build-module/components/observe-typing/index.js.map +1 -1
  316. package/build-module/components/preview-options/index.js +2 -2
  317. package/build-module/components/preview-options/index.js.map +1 -1
  318. package/build-module/components/{use-no-recursive-renders → recursion-provider}/index.js +39 -19
  319. package/build-module/components/recursion-provider/index.js.map +1 -0
  320. package/build-module/components/rich-text/format-toolbar-container.js +58 -12
  321. package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
  322. package/build-module/components/rich-text/index.js +7 -2
  323. package/build-module/components/rich-text/index.js.map +1 -1
  324. package/build-module/components/rich-text/index.native.js +3 -1
  325. package/build-module/components/rich-text/index.native.js.map +1 -1
  326. package/build-module/components/rich-text/use-before-input-rules.js +96 -0
  327. package/build-module/components/rich-text/use-before-input-rules.js.map +1 -0
  328. package/build-module/components/rich-text/use-enter.js +0 -4
  329. package/build-module/components/rich-text/use-enter.js.map +1 -1
  330. package/build-module/components/rich-text/use-format-types.js +39 -22
  331. package/build-module/components/rich-text/use-format-types.js.map +1 -1
  332. package/build-module/components/spacing-sizes-control/all-input-control.js +41 -0
  333. package/build-module/components/spacing-sizes-control/all-input-control.js.map +1 -0
  334. package/build-module/components/spacing-sizes-control/axial-input-controls.js +57 -0
  335. package/build-module/components/spacing-sizes-control/axial-input-controls.js.map +1 -0
  336. package/build-module/components/spacing-sizes-control/index.js +83 -0
  337. package/build-module/components/spacing-sizes-control/index.js.map +1 -0
  338. package/build-module/components/spacing-sizes-control/input-controls.js +41 -0
  339. package/build-module/components/spacing-sizes-control/input-controls.js.map +1 -0
  340. package/build-module/components/spacing-sizes-control/linked-button.js +28 -0
  341. package/build-module/components/spacing-sizes-control/linked-button.js.map +1 -0
  342. package/build-module/components/spacing-sizes-control/spacing-input-control.js +192 -0
  343. package/build-module/components/spacing-sizes-control/spacing-input-control.js.map +1 -0
  344. package/build-module/components/spacing-sizes-control/utils.js +174 -0
  345. package/build-module/components/spacing-sizes-control/utils.js.map +1 -0
  346. package/build-module/components/text-decoration-control/index.js +4 -2
  347. package/build-module/components/text-decoration-control/index.js.map +1 -1
  348. package/build-module/components/text-transform-control/index.js +4 -2
  349. package/build-module/components/text-transform-control/index.js.map +1 -1
  350. package/build-module/components/url-input/index.js +1 -1
  351. package/build-module/components/url-input/index.js.map +1 -1
  352. package/build-module/components/url-popover/image-url-input-ui.js +4 -1
  353. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  354. package/build-module/components/writing-flow/use-arrow-nav.js +5 -26
  355. package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
  356. package/build-module/components/writing-flow/use-drag-selection.js +9 -2
  357. package/build-module/components/writing-flow/use-drag-selection.js.map +1 -1
  358. package/build-module/components/writing-flow/use-multi-selection.js +4 -2
  359. package/build-module/components/writing-flow/use-multi-selection.js.map +1 -1
  360. package/build-module/components/writing-flow/use-select-all.js +3 -1
  361. package/build-module/components/writing-flow/use-select-all.js.map +1 -1
  362. package/build-module/components/writing-flow/use-selection-observer.js +10 -2
  363. package/build-module/components/writing-flow/use-selection-observer.js.map +1 -1
  364. package/build-module/components/writing-flow/use-tab-nav.js +1 -1
  365. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  366. package/build-module/hooks/border-radius.js +2 -7
  367. package/build-module/hooks/border-radius.js.map +1 -1
  368. package/build-module/hooks/border.js +2 -2
  369. package/build-module/hooks/border.js.map +1 -1
  370. package/build-module/hooks/color.js +4 -1
  371. package/build-module/hooks/color.js.map +1 -1
  372. package/build-module/hooks/dimensions.js +13 -0
  373. package/build-module/hooks/dimensions.js.map +1 -1
  374. package/build-module/hooks/duotone.js +4 -4
  375. package/build-module/hooks/duotone.js.map +1 -1
  376. package/build-module/hooks/gap.js +3 -2
  377. package/build-module/hooks/gap.js.map +1 -1
  378. package/build-module/hooks/generated-class-name.js +1 -6
  379. package/build-module/hooks/generated-class-name.js.map +1 -1
  380. package/build-module/hooks/layout.js +42 -15
  381. package/build-module/hooks/layout.js.map +1 -1
  382. package/build-module/hooks/margin.js +26 -12
  383. package/build-module/hooks/margin.js.map +1 -1
  384. package/build-module/hooks/padding.js +17 -8
  385. package/build-module/hooks/padding.js.map +1 -1
  386. package/build-module/hooks/style.js +44 -81
  387. package/build-module/hooks/style.js.map +1 -1
  388. package/build-module/layouts/constrained.js +197 -0
  389. package/build-module/layouts/constrained.js.map +1 -0
  390. package/build-module/layouts/flex.js +1 -1
  391. package/build-module/layouts/flex.js.map +1 -1
  392. package/build-module/layouts/flow.js +7 -140
  393. package/build-module/layouts/flow.js.map +1 -1
  394. package/build-module/layouts/index.js +2 -1
  395. package/build-module/layouts/index.js.map +1 -1
  396. package/build-module/layouts/utils.js +40 -0
  397. package/build-module/layouts/utils.js.map +1 -1
  398. package/build-module/store/actions.js +25 -3
  399. package/build-module/store/actions.js.map +1 -1
  400. package/build-module/store/selectors.js +5 -7
  401. package/build-module/store/selectors.js.map +1 -1
  402. package/build-module/utils/block-variation-transforms.js +14 -7
  403. package/build-module/utils/block-variation-transforms.js.map +1 -1
  404. package/build-module/utils/pasting.js +9 -1
  405. package/build-module/utils/pasting.js.map +1 -1
  406. package/build-style/style-rtl.css +154 -27
  407. package/build-style/style.css +154 -27
  408. package/package.json +30 -28
  409. package/src/components/block-alignment-control/use-available-alignments.js +1 -1
  410. package/src/components/block-edit-visually-button/index.js +39 -0
  411. package/src/components/block-list/block.js +13 -2
  412. package/src/components/block-list/index.native.js +1 -1
  413. package/src/components/block-lock/modal.js +5 -5
  414. package/src/components/block-mobile-toolbar/block-actions-menu.native.js +3 -3
  415. package/src/components/block-mover/mover-description.js +131 -48
  416. package/src/components/block-mover/test/mover-description.js +55 -3
  417. package/src/components/block-popover/inbetween.js +5 -1
  418. package/src/components/block-popover/style.scss +25 -2
  419. package/src/components/block-settings-menu/index.js +11 -15
  420. package/src/components/block-settings-menu-controls/index.js +2 -2
  421. package/src/components/block-styles/index.js +4 -7
  422. package/src/components/block-styles/preview.native.js +2 -2
  423. package/src/components/block-styles/style.scss +10 -0
  424. package/src/components/block-switcher/index.js +9 -13
  425. package/src/components/block-switcher/test/index.js +1 -0
  426. package/src/components/block-toolbar/index.js +2 -0
  427. package/src/components/block-tools/block-selection-button.js +0 -5
  428. package/src/components/block-tools/index.js +4 -1
  429. package/src/components/block-types-list/index.js +1 -1
  430. package/src/components/block-types-list/index.native.js +76 -24
  431. package/src/components/block-types-list/style.native.scss +18 -0
  432. package/src/components/border-radius-control/all-input-control.js +41 -4
  433. package/src/components/border-radius-control/index.js +29 -6
  434. package/src/components/border-radius-control/input-controls.js +40 -13
  435. package/src/components/border-radius-control/test/utils.js +22 -60
  436. package/src/components/border-radius-control/utils.js +12 -16
  437. package/src/components/color-palette/test/__snapshots__/control.js.snap +91 -79
  438. package/src/components/colors/test/__snapshots__/with-colors.js.snap +1 -1
  439. package/src/components/colors/test/with-colors.js +1 -1
  440. package/src/components/colors/utils.js +5 -2
  441. package/src/components/colors/with-colors.js +11 -1
  442. package/src/components/colors-gradients/control.js +13 -8
  443. package/src/components/colors-gradients/dropdown.js +14 -3
  444. package/src/components/colors-gradients/style.scss +33 -12
  445. package/src/components/colors-gradients/test/control.js +3 -3
  446. package/src/components/copy-handler/index.js +18 -0
  447. package/src/components/date-format-picker/index.js +12 -14
  448. package/src/components/date-format-picker/style.scss +0 -4
  449. package/src/components/duotone/components.js +5 -5
  450. package/src/components/duotone-control/style.scss +0 -4
  451. package/src/components/font-appearance-control/index.js +3 -0
  452. package/src/components/font-appearance-control/style.scss +0 -2
  453. package/src/components/font-family/index.js +1 -1
  454. package/src/components/font-sizes/with-font-sizes.js +11 -1
  455. package/src/components/image-editor/cropper.js +9 -3
  456. package/src/components/image-editor/index.js +2 -0
  457. package/src/components/image-size-control/README.md +7 -0
  458. package/src/components/image-size-control/index.js +2 -0
  459. package/src/components/index.js +5 -1
  460. package/src/components/index.native.js +4 -1
  461. package/src/components/inserter/block-types-tab.native.js +42 -21
  462. package/src/components/inserter/index.native.js +7 -2
  463. package/src/components/inserter/preview-panel.js +6 -14
  464. package/src/components/inserter/reusable-blocks-tab.native.js +4 -2
  465. package/src/components/inserter/search-items.js +17 -5
  466. package/src/components/inserter/search-results.native.js +4 -2
  467. package/src/components/inserter/test/block-types-tab.native.js +2 -0
  468. package/src/components/inserter/test/utils.native.js +37 -0
  469. package/src/components/inserter/utils.native.js +11 -0
  470. package/src/components/inserter-list-item/index.js +5 -18
  471. package/src/components/letter-spacing-control/index.js +2 -0
  472. package/src/components/line-height-control/index.js +2 -0
  473. package/src/components/link-control/is-url-like.js +1 -6
  474. package/src/components/link-control/link-preview.js +0 -1
  475. package/src/components/link-control/test/index.js +540 -893
  476. package/src/components/link-control/use-search-handler.js +1 -6
  477. package/src/components/list-view/block-select-button.js +7 -2
  478. package/src/components/list-view/branch.js +1 -6
  479. package/src/components/list-view/expander.js +4 -2
  480. package/src/components/list-view/style.scss +11 -4
  481. package/src/components/list-view/use-block-selection.js +2 -8
  482. package/src/components/media-replace-flow/style.scss +1 -0
  483. package/src/components/media-upload/index.native.js +7 -3
  484. package/src/components/observe-typing/index.js +17 -14
  485. package/src/components/preview-options/index.js +2 -2
  486. package/src/components/{use-no-recursive-renders → recursion-provider}/index.js +39 -28
  487. package/src/components/{use-no-recursive-renders/test/use-no-recursive-renders.js → recursion-provider/test/index.js} +5 -6
  488. package/src/components/rich-text/README.md +13 -1
  489. package/src/components/rich-text/format-toolbar-container.js +63 -14
  490. package/src/components/rich-text/index.js +3 -0
  491. package/src/components/rich-text/index.native.js +2 -0
  492. package/src/components/rich-text/use-before-input-rules.js +91 -0
  493. package/src/components/rich-text/use-enter.js +0 -3
  494. package/src/components/rich-text/use-format-types.js +38 -17
  495. package/src/components/spacing-sizes-control/all-input-control.js +40 -0
  496. package/src/components/spacing-sizes-control/axial-input-controls.js +62 -0
  497. package/src/components/spacing-sizes-control/index.js +91 -0
  498. package/src/components/spacing-sizes-control/input-controls.js +46 -0
  499. package/src/components/spacing-sizes-control/linked-button.js +25 -0
  500. package/src/components/spacing-sizes-control/spacing-input-control.js +280 -0
  501. package/src/components/spacing-sizes-control/style.scss +122 -0
  502. package/src/components/spacing-sizes-control/test/utils.js +156 -0
  503. package/src/components/spacing-sizes-control/utils.js +195 -0
  504. package/src/components/text-decoration-control/index.js +4 -2
  505. package/src/components/text-transform-control/index.js +4 -2
  506. package/src/components/url-input/index.js +1 -1
  507. package/src/components/url-input/style.scss +2 -2
  508. package/src/components/url-popover/image-url-input-ui.js +3 -0
  509. package/src/components/url-popover/style.scss +0 -3
  510. package/src/components/writing-flow/use-arrow-nav.js +4 -33
  511. package/src/components/writing-flow/use-drag-selection.js +7 -1
  512. package/src/components/writing-flow/use-multi-selection.js +4 -1
  513. package/src/components/writing-flow/use-select-all.js +2 -1
  514. package/src/components/writing-flow/use-selection-observer.js +10 -2
  515. package/src/components/writing-flow/use-tab-nav.js +1 -1
  516. package/src/hooks/border-radius.js +2 -6
  517. package/src/hooks/border.js +2 -2
  518. package/src/hooks/color.js +13 -3
  519. package/src/hooks/dimensions.js +15 -0
  520. package/src/hooks/duotone.js +4 -4
  521. package/src/hooks/gap.js +7 -2
  522. package/src/hooks/generated-class-name.js +6 -9
  523. package/src/hooks/layout.js +66 -18
  524. package/src/hooks/margin.js +49 -17
  525. package/src/hooks/padding.js +41 -14
  526. package/src/hooks/style.js +42 -86
  527. package/src/hooks/test/gap.js +22 -0
  528. package/src/hooks/typography.scss +0 -1
  529. package/src/layouts/constrained.js +217 -0
  530. package/src/layouts/flex.js +1 -1
  531. package/src/layouts/flow.js +6 -151
  532. package/src/layouts/index.js +2 -1
  533. package/src/layouts/test/constrained.js +21 -0
  534. package/src/layouts/utils.js +34 -0
  535. package/src/store/actions.js +32 -4
  536. package/src/store/selectors.js +5 -4
  537. package/src/style.scss +1 -0
  538. package/src/utils/block-variation-transforms.js +13 -6
  539. package/src/utils/pasting.js +10 -1
  540. package/src/utils/test/block-variation-transforms.js +24 -0
  541. package/src/utils/test/pasting.js +10 -0
  542. package/build/components/block-settings-menu/block-edit-visually-button.js +0 -70
  543. package/build/components/block-settings-menu/block-edit-visually-button.js.map +0 -1
  544. package/build/components/use-no-recursive-renders/index.js.map +0 -1
  545. package/build-module/components/block-settings-menu/block-edit-visually-button.js +0 -56
  546. package/build-module/components/block-settings-menu/block-edit-visually-button.js.map +0 -1
  547. package/build-module/components/use-no-recursive-renders/index.js.map +0 -1
  548. package/src/components/block-settings-menu/block-edit-visually-button.js +0 -52
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-editor",
3
- "version": "9.5.0",
3
+ "version": "9.7.1-next.d6164808d3.0",
4
4
  "description": "Generic block editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -33,32 +33,33 @@
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.16.0",
35
35
  "@react-spring/web": "^9.4.5",
36
- "@wordpress/a11y": "^3.13.0",
37
- "@wordpress/api-fetch": "^6.10.0",
38
- "@wordpress/blob": "^3.13.0",
39
- "@wordpress/blocks": "^11.12.0",
40
- "@wordpress/components": "^19.15.0",
41
- "@wordpress/compose": "^5.11.0",
42
- "@wordpress/data": "^6.13.0",
43
- "@wordpress/date": "^4.13.0",
44
- "@wordpress/deprecated": "^3.13.0",
45
- "@wordpress/dom": "^3.13.0",
46
- "@wordpress/element": "^4.11.0",
47
- "@wordpress/hooks": "^3.13.0",
48
- "@wordpress/html-entities": "^3.13.0",
49
- "@wordpress/i18n": "^4.13.0",
50
- "@wordpress/icons": "^9.4.0",
51
- "@wordpress/is-shallow-equal": "^4.13.0",
52
- "@wordpress/keyboard-shortcuts": "^3.11.0",
53
- "@wordpress/keycodes": "^3.13.0",
54
- "@wordpress/notices": "^3.13.0",
55
- "@wordpress/rich-text": "^5.11.0",
56
- "@wordpress/shortcode": "^3.13.0",
57
- "@wordpress/style-engine": "^0.12.0",
58
- "@wordpress/token-list": "^2.13.0",
59
- "@wordpress/url": "^3.14.0",
60
- "@wordpress/warning": "^2.13.0",
61
- "@wordpress/wordcount": "^3.13.0",
36
+ "@wordpress/a11y": "^3.15.1-next.d6164808d3.0",
37
+ "@wordpress/api-fetch": "^6.12.1-next.d6164808d3.0",
38
+ "@wordpress/blob": "^3.15.1-next.d6164808d3.0",
39
+ "@wordpress/blocks": "^11.14.1-next.d6164808d3.0",
40
+ "@wordpress/components": "^20.0.1-next.d6164808d3.0",
41
+ "@wordpress/compose": "^5.13.1-next.d6164808d3.0",
42
+ "@wordpress/data": "^7.0.1-next.d6164808d3.0",
43
+ "@wordpress/date": "^4.15.1-next.d6164808d3.0",
44
+ "@wordpress/deprecated": "^3.15.1-next.d6164808d3.0",
45
+ "@wordpress/dom": "^3.15.1-next.d6164808d3.0",
46
+ "@wordpress/element": "^4.13.1-next.d6164808d3.0",
47
+ "@wordpress/hooks": "^3.15.1-next.d6164808d3.0",
48
+ "@wordpress/html-entities": "^3.15.1-next.d6164808d3.0",
49
+ "@wordpress/i18n": "^4.15.1-next.d6164808d3.0",
50
+ "@wordpress/icons": "^9.6.1-next.d6164808d3.0",
51
+ "@wordpress/is-shallow-equal": "^4.15.1-next.d6164808d3.0",
52
+ "@wordpress/keyboard-shortcuts": "^3.13.1-next.d6164808d3.0",
53
+ "@wordpress/keycodes": "^3.15.1-next.d6164808d3.0",
54
+ "@wordpress/notices": "^3.15.1-next.d6164808d3.0",
55
+ "@wordpress/rich-text": "^5.13.1-next.d6164808d3.0",
56
+ "@wordpress/shortcode": "^3.15.1-next.d6164808d3.0",
57
+ "@wordpress/style-engine": "^0.14.1-next.d6164808d3.0",
58
+ "@wordpress/token-list": "^2.15.1-next.d6164808d3.0",
59
+ "@wordpress/url": "^3.16.1-next.d6164808d3.0",
60
+ "@wordpress/warning": "^2.15.1-next.d6164808d3.0",
61
+ "@wordpress/wordcount": "^3.15.1-next.d6164808d3.0",
62
+ "change-case": "^4.1.2",
62
63
  "classnames": "^2.3.1",
63
64
  "colord": "^2.7.0",
64
65
  "diff": "^4.0.2",
@@ -68,6 +69,7 @@
68
69
  "react-autosize-textarea": "^7.1.0",
69
70
  "react-easy-crop": "^3.0.0",
70
71
  "rememo": "^4.0.0",
72
+ "remove-accents": "^0.4.2",
71
73
  "traverse": "^0.6.6"
72
74
  },
73
75
  "peerDependencies": {
@@ -77,5 +79,5 @@
77
79
  "publishConfig": {
78
80
  "access": "public"
79
81
  },
80
- "gitHead": "9d9d33bbdf317a4381b8ca1713e43bb50df653b3"
82
+ "gitHead": "ba8a396d2f418e53a6c4c50575582f3f3eb11ff7"
81
83
  }
@@ -46,7 +46,7 @@ export default function useAvailableAlignments( controls = DEFAULT_CONTROLS ) {
46
46
  }
47
47
 
48
48
  // Starting here, it's the fallback for themes not supporting the layout config.
49
- if ( layoutType.name !== 'default' ) {
49
+ if ( layoutType.name !== 'default' && layoutType.name !== 'constrained' ) {
50
50
  return [];
51
51
  }
52
52
  const { alignments: availableAlignments = DEFAULT_CONTROLS } = layout;
@@ -0,0 +1,39 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { ToolbarButton, ToolbarGroup } from '@wordpress/components';
5
+ import { __ } from '@wordpress/i18n';
6
+ import { useSelect, useDispatch } from '@wordpress/data';
7
+
8
+ /**
9
+ * Internal dependencies
10
+ */
11
+ import { store as blockEditorStore } from '../../store';
12
+
13
+ export default function BlockEditVisuallyButton( { clientIds } ) {
14
+ // Edit visually only works for single block selection.
15
+ const clientId = clientIds.length === 1 ? clientIds[ 0 ] : undefined;
16
+ const canEditVisually = useSelect(
17
+ ( select ) =>
18
+ !! clientId &&
19
+ select( blockEditorStore ).getBlockMode( clientId ) === 'html',
20
+ [ clientId ]
21
+ );
22
+ const { toggleBlockMode } = useDispatch( blockEditorStore );
23
+
24
+ if ( ! canEditVisually ) {
25
+ return null;
26
+ }
27
+
28
+ return (
29
+ <ToolbarGroup>
30
+ <ToolbarButton
31
+ onClick={ () => {
32
+ toggleBlockMode( clientId );
33
+ } }
34
+ >
35
+ { __( 'Edit visually' ) }
36
+ </ToolbarButton>
37
+ </ToolbarGroup>
38
+ );
39
+ }
@@ -18,6 +18,7 @@ import {
18
18
  getSaveContent,
19
19
  isUnmodifiedDefaultBlock,
20
20
  serializeRawBlock,
21
+ switchToBlockType,
21
22
  } from '@wordpress/blocks';
22
23
  import { withFilters } from '@wordpress/components';
23
24
  import {
@@ -291,8 +292,8 @@ const applyWithDispatch = withDispatch( ( dispatch, ownProps, { select } ) => {
291
292
  insertBlocks( blocks, index + 1, rootClientId );
292
293
  },
293
294
  onMerge( forward ) {
294
- const { clientId } = ownProps;
295
- const { getPreviousBlockClientId, getNextBlockClientId } =
295
+ const { clientId, rootClientId } = ownProps;
296
+ const { getPreviousBlockClientId, getNextBlockClientId, getBlock } =
296
297
  select( blockEditorStore );
297
298
 
298
299
  if ( forward ) {
@@ -305,6 +306,16 @@ const applyWithDispatch = withDispatch( ( dispatch, ownProps, { select } ) => {
305
306
  getPreviousBlockClientId( clientId );
306
307
  if ( previousBlockClientId ) {
307
308
  mergeBlocks( previousBlockClientId, clientId );
309
+ } else if ( rootClientId ) {
310
+ // Attempt to "unwrap" the block contents when there's no
311
+ // preceding block to merge with.
312
+ const replacement = switchToBlockType(
313
+ getBlock( rootClientId ),
314
+ '*'
315
+ );
316
+ if ( replacement && replacement.length ) {
317
+ replaceBlocks( rootClientId, replacement, 0 );
318
+ }
308
319
  }
309
320
  }
310
321
  },
@@ -469,7 +469,7 @@ class EmptyListComponent extends Component {
469
469
  renderFooterAppender,
470
470
  } = this.props;
471
471
 
472
- if ( renderFooterAppender ) {
472
+ if ( renderFooterAppender || renderAppender === false ) {
473
473
  return null;
474
474
  }
475
475
 
@@ -88,6 +88,11 @@ export default function BlockLockModal( { clientId, onClose } ) {
88
88
  closeLabel={ __( 'Close' ) }
89
89
  onRequestClose={ onClose }
90
90
  >
91
+ <p>
92
+ { __(
93
+ 'Choose specific attributes to restrict or lock all available options.'
94
+ ) }
95
+ </p>
91
96
  <form
92
97
  onSubmit={ ( event ) => {
93
98
  event.preventDefault();
@@ -100,11 +105,6 @@ export default function BlockLockModal( { clientId, onClose } ) {
100
105
  onClose();
101
106
  } }
102
107
  >
103
- <p>
104
- { __(
105
- 'Choose specific attributes to restrict or lock all available options.'
106
- ) }
107
- </p>
108
108
  <div
109
109
  role="group"
110
110
  aria-labelledby={ instanceId }
@@ -2,7 +2,7 @@
2
2
  * External dependencies
3
3
  */
4
4
  import { Platform, findNodeHandle } from 'react-native';
5
- import { partial, first, castArray, last, compact, every } from 'lodash';
5
+ import { partial, first, castArray, last, every } from 'lodash';
6
6
  /**
7
7
  * WordPress dependencies
8
8
  */
@@ -202,7 +202,7 @@ const BlockActionsMenu = ( {
202
202
  },
203
203
  };
204
204
 
205
- const options = compact( [
205
+ const options = [
206
206
  wrapBlockMover && allOptions.backwardButton,
207
207
  wrapBlockMover && allOptions.forwardButton,
208
208
  wrapBlockSettings && allOptions.settings,
@@ -215,7 +215,7 @@ const BlockActionsMenu = ( {
215
215
  canDuplicate && allOptions.duplicateButton,
216
216
  isReusableBlockType && allOptions.convertToRegularBlocks,
217
217
  ! isLocked && allOptions.delete,
218
- ] );
218
+ ].filter( Boolean );
219
219
 
220
220
  // End early if there are no options to show.
221
221
  if ( ! options.length ) {
@@ -1,7 +1,22 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import { __, _n, sprintf, isRTL } from '@wordpress/i18n';
4
+ import { __, sprintf, isRTL } from '@wordpress/i18n';
5
+
6
+ const getMovementDirection = ( moveDirection, orientation ) => {
7
+ if ( moveDirection === 'up' ) {
8
+ if ( orientation === 'horizontal' ) {
9
+ return isRTL() ? 'right' : 'left';
10
+ }
11
+ return 'up';
12
+ } else if ( moveDirection === 'down' ) {
13
+ if ( orientation === 'horizontal' ) {
14
+ return isRTL() ? 'left' : 'right';
15
+ }
16
+ return 'down';
17
+ }
18
+ return null;
19
+ };
5
20
 
6
21
  /**
7
22
  * Return a label for the block movement controls depending on block position.
@@ -30,28 +45,14 @@ export function getBlockMoverDescription(
30
45
  ) {
31
46
  const position = firstIndex + 1;
32
47
 
33
- const getMovementDirection = ( moveDirection ) => {
34
- if ( moveDirection === 'up' ) {
35
- if ( orientation === 'horizontal' ) {
36
- return isRTL() ? 'right' : 'left';
37
- }
38
- return 'up';
39
- } else if ( moveDirection === 'down' ) {
40
- if ( orientation === 'horizontal' ) {
41
- return isRTL() ? 'left' : 'right';
42
- }
43
- return 'down';
44
- }
45
- return null;
46
- };
47
-
48
48
  if ( selectedCount > 1 ) {
49
49
  return getMultiBlockMoverDescription(
50
50
  selectedCount,
51
51
  firstIndex,
52
52
  isFirst,
53
53
  isLast,
54
- dir
54
+ dir,
55
+ orientation
55
56
  );
56
57
  }
57
58
 
@@ -65,7 +66,7 @@ export function getBlockMoverDescription(
65
66
 
66
67
  if ( dir > 0 && ! isLast ) {
67
68
  // Moving down.
68
- const movementDirection = getMovementDirection( 'down' );
69
+ const movementDirection = getMovementDirection( 'down', orientation );
69
70
 
70
71
  if ( movementDirection === 'down' ) {
71
72
  return sprintf(
@@ -106,7 +107,7 @@ export function getBlockMoverDescription(
106
107
 
107
108
  if ( dir > 0 && isLast ) {
108
109
  // Moving down, and is the last item.
109
- const movementDirection = getMovementDirection( 'down' );
110
+ const movementDirection = getMovementDirection( 'down', orientation );
110
111
 
111
112
  if ( movementDirection === 'down' ) {
112
113
  return sprintf(
@@ -141,7 +142,7 @@ export function getBlockMoverDescription(
141
142
 
142
143
  if ( dir < 0 && ! isFirst ) {
143
144
  // Moving up.
144
- const movementDirection = getMovementDirection( 'up' );
145
+ const movementDirection = getMovementDirection( 'up', orientation );
145
146
 
146
147
  if ( movementDirection === 'up' ) {
147
148
  return sprintf(
@@ -180,7 +181,7 @@ export function getBlockMoverDescription(
180
181
 
181
182
  if ( dir < 0 && isFirst ) {
182
183
  // Moving up, and is the first item.
183
- const movementDirection = getMovementDirection( 'up' );
184
+ const movementDirection = getMovementDirection( 'up', orientation );
184
185
 
185
186
  if ( movementDirection === 'up' ) {
186
187
  return sprintf(
@@ -223,6 +224,8 @@ export function getBlockMoverDescription(
223
224
  * @param {boolean} isLast This is the last block.
224
225
  * @param {number} dir Direction of movement (> 0 is considered to be going
225
226
  * down, < 0 is up).
227
+ * @param {string} orientation The orientation of the block movers, vertical or
228
+ * horizontal.
226
229
  *
227
230
  * @return {string} Label for the block movement controls.
228
231
  */
@@ -231,43 +234,123 @@ export function getMultiBlockMoverDescription(
231
234
  firstIndex,
232
235
  isFirst,
233
236
  isLast,
234
- dir
237
+ dir,
238
+ orientation
235
239
  ) {
236
240
  const position = firstIndex + 1;
237
241
 
238
- if ( dir < 0 && isFirst ) {
239
- return __( 'Blocks cannot be moved up as they are already at the top' );
242
+ if ( isFirst && isLast ) {
243
+ // All blocks are selected
244
+ return __( 'All blocks are selected, and cannot be moved' );
245
+ }
246
+
247
+ if ( dir > 0 && ! isLast ) {
248
+ // moving down
249
+ const movementDirection = getMovementDirection( 'down', orientation );
250
+
251
+ if ( movementDirection === 'down' ) {
252
+ return sprintf(
253
+ // translators: 1: Number of selected blocks, 2: Position of selected blocks
254
+ __( 'Move %1$d blocks from position %2$d down by one place' ),
255
+ selectedCount,
256
+ position
257
+ );
258
+ }
259
+
260
+ if ( movementDirection === 'left' ) {
261
+ return sprintf(
262
+ // translators: 1: Number of selected blocks, 2: Position of selected blocks
263
+ __( 'Move %1$d blocks from position %2$d left by one place' ),
264
+ selectedCount,
265
+ position
266
+ );
267
+ }
268
+
269
+ if ( movementDirection === 'right' ) {
270
+ return sprintf(
271
+ // translators: 1: Number of selected blocks, 2: Position of selected blocks
272
+ __( 'Move %1$d blocks from position %2$d right by one place' ),
273
+ selectedCount,
274
+ position
275
+ );
276
+ }
240
277
  }
241
278
 
242
279
  if ( dir > 0 && isLast ) {
243
- return __(
244
- 'Blocks cannot be moved down as they are already at the bottom'
245
- );
280
+ // moving down, and the selected blocks are the last item
281
+ const movementDirection = getMovementDirection( 'down', orientation );
282
+
283
+ if ( movementDirection === 'down' ) {
284
+ return __(
285
+ 'Blocks cannot be moved down as they are already at the bottom'
286
+ );
287
+ }
288
+
289
+ if ( movementDirection === 'left' ) {
290
+ return __(
291
+ 'Blocks cannot be moved left as they are already are at the leftmost position'
292
+ );
293
+ }
294
+
295
+ if ( movementDirection === 'right' ) {
296
+ return __(
297
+ 'Blocks cannot be moved right as they are already are at the rightmost position'
298
+ );
299
+ }
246
300
  }
247
301
 
248
302
  if ( dir < 0 && ! isFirst ) {
249
- return sprintf(
250
- // translators: 1: Number of selected blocks, 2: Position of selected blocks
251
- _n(
252
- 'Move %1$d block from position %2$d up by one place',
253
- 'Move %1$d blocks from position %2$d up by one place',
254
- selectedCount
255
- ),
256
- selectedCount,
257
- position
258
- );
303
+ // moving up
304
+ const movementDirection = getMovementDirection( 'up', orientation );
305
+
306
+ if ( movementDirection === 'up' ) {
307
+ return sprintf(
308
+ // translators: 1: Number of selected blocks, 2: Position of selected blocks
309
+ __( 'Move %1$d blocks from position %2$d up by one place' ),
310
+ selectedCount,
311
+ position
312
+ );
313
+ }
314
+
315
+ if ( movementDirection === 'left' ) {
316
+ return sprintf(
317
+ // translators: 1: Number of selected blocks, 2: Position of selected blocks
318
+ __( 'Move %1$d blocks from position %2$d left by one place' ),
319
+ selectedCount,
320
+ position
321
+ );
322
+ }
323
+
324
+ if ( movementDirection === 'right' ) {
325
+ return sprintf(
326
+ // translators: 1: Number of selected blocks, 2: Position of selected blocks
327
+ __( 'Move %1$d blocks from position %2$d right by one place' ),
328
+ selectedCount,
329
+ position
330
+ );
331
+ }
259
332
  }
260
333
 
261
- if ( dir > 0 && ! isLast ) {
262
- return sprintf(
263
- // translators: 1: Number of selected blocks, 2: Position of selected blocks
264
- _n(
265
- 'Move %1$d block from position %2$d down by one place',
266
- 'Move %1$d blocks from position %2$d down by one place',
267
- selectedCount
268
- ),
269
- selectedCount,
270
- position
271
- );
334
+ if ( dir < 0 && isFirst ) {
335
+ // moving up, and the selected blocks are the first item
336
+ const movementDirection = getMovementDirection( 'up', orientation );
337
+
338
+ if ( movementDirection === 'up' ) {
339
+ return __(
340
+ 'Blocks cannot be moved up as they are already at the top'
341
+ );
342
+ }
343
+
344
+ if ( movementDirection === 'left' ) {
345
+ return __(
346
+ 'Blocks cannot be moved left as they are already are at the leftmost position'
347
+ );
348
+ }
349
+
350
+ if ( movementDirection === 'right' ) {
351
+ return __(
352
+ 'Blocks cannot be moved right as they are already are at the rightmost position'
353
+ );
354
+ }
272
355
  }
273
356
  }
@@ -183,9 +183,7 @@ describe( 'block mover', () => {
183
183
  true,
184
184
  negativeDirection
185
185
  )
186
- ).toBe(
187
- 'Blocks cannot be moved up as they are already at the top'
188
- );
186
+ ).toBe( 'All blocks are selected, and cannot be moved' );
189
187
  } );
190
188
 
191
189
  it( 'generates a title for a selection of blocks at the bottom', () => {
@@ -201,5 +199,59 @@ describe( 'block mover', () => {
201
199
  'Blocks cannot be moved down as they are already at the bottom'
202
200
  );
203
201
  } );
202
+
203
+ it( 'indicates that blocks can be moved left when the orientation is horizontal and the direction is negative', () => {
204
+ expect(
205
+ getMultiBlockMoverDescription(
206
+ 4,
207
+ 1,
208
+ false,
209
+ true,
210
+ negativeDirection,
211
+ 'horizontal'
212
+ )
213
+ ).toBe( 'Move 4 blocks from position 2 left by one place' );
214
+ } );
215
+
216
+ it( 'indicates that blocks can be moved right when the orientation is horizontal and the direction is positive', () => {
217
+ expect(
218
+ getMultiBlockMoverDescription(
219
+ 4,
220
+ 0,
221
+ true,
222
+ false,
223
+ positiveDirection,
224
+ 'horizontal'
225
+ )
226
+ ).toBe( 'Move 4 blocks from position 1 right by one place' );
227
+ } );
228
+
229
+ it( 'indicates that blocks cannot be moved left when the orientation is horizontal and a selection of blocks at the left', () => {
230
+ expect(
231
+ getMultiBlockMoverDescription(
232
+ 4,
233
+ 1,
234
+ true,
235
+ true,
236
+ negativeDirection,
237
+ 'horizontal'
238
+ )
239
+ ).toBe( 'All blocks are selected, and cannot be moved' );
240
+ } );
241
+
242
+ it( 'indicates that blocks cannot be moved right when the orientation is horizontal and the block is the last block', () => {
243
+ expect(
244
+ getMultiBlockMoverDescription(
245
+ 4,
246
+ 2,
247
+ false,
248
+ true,
249
+ positiveDirection,
250
+ 'horizontal'
251
+ )
252
+ ).toBe(
253
+ 'Blocks cannot be moved right as they are already are at the rightmost position'
254
+ );
255
+ } );
204
256
  } );
205
257
  } );
@@ -154,7 +154,10 @@ function BlockPopoverInbetween( {
154
154
 
155
155
  const popoverScrollRef = usePopoverScroll( __unstableContentRef );
156
156
 
157
- if ( ! previousElement || ! nextElement || ! isVisible ) {
157
+ // If there's either a previous or a next element, show the inbetween popover.
158
+ // Note that drag and drop uses the inbetween popover to show the drop indicator
159
+ // before the first block and after the last block.
160
+ if ( ( ! previousElement && ! nextElement ) || ! isVisible ) {
158
161
  return null;
159
162
  }
160
163
 
@@ -180,6 +183,7 @@ function BlockPopoverInbetween( {
180
183
  { ...props }
181
184
  className={ classnames(
182
185
  'block-editor-block-popover',
186
+ 'block-editor-block-popover__inbetween',
183
187
  props.className
184
188
  ) }
185
189
  __unstableForcePosition
@@ -18,11 +18,34 @@
18
18
 
19
19
  // Allow clicking through the toolbar holder.
20
20
  pointer-events: none;
21
+ }
21
22
 
22
- // Position the block toolbar.
23
- > * {
23
+ // Enable pointer events for the toolbar's content.
24
+ &:not(.block-editor-block-popover__inbetween) .components-popover__content {
25
+ * {
24
26
  pointer-events: all;
25
27
  }
26
28
  }
27
29
  }
28
30
 
31
+ .components-popover.block-editor-block-popover__inbetween {
32
+ // Disable pointer events for dragging and dropping.
33
+ // Without this the insertion point interferes with the
34
+ // drop zone.
35
+ pointer-events: none;
36
+
37
+ * {
38
+ pointer-events: none;
39
+ }
40
+
41
+ // Re-enable pointer events when the inbetween inserter has a '+' button.
42
+ //
43
+ // Needs specificity, do not simplify.
44
+ .is-with-inserter {
45
+ pointer-events: all;
46
+
47
+ * {
48
+ pointer-events: all;
49
+ }
50
+ }
51
+ }
@@ -7,24 +7,20 @@ import { ToolbarGroup, ToolbarItem } from '@wordpress/components';
7
7
  * Internal dependencies
8
8
  */
9
9
  import BlockSettingsDropdown from './block-settings-dropdown';
10
- import BlockEditVisuallyButton from './block-edit-visually-button';
11
10
 
12
11
  export function BlockSettingsMenu( { clientIds, ...props } ) {
13
12
  return (
14
- <>
15
- <BlockEditVisuallyButton clientIds={ clientIds } { ...props } />
16
- <ToolbarGroup>
17
- <ToolbarItem>
18
- { ( toggleProps ) => (
19
- <BlockSettingsDropdown
20
- clientIds={ clientIds }
21
- toggleProps={ toggleProps }
22
- { ...props }
23
- />
24
- ) }
25
- </ToolbarItem>
26
- </ToolbarGroup>
27
- </>
13
+ <ToolbarGroup>
14
+ <ToolbarItem>
15
+ { ( toggleProps ) => (
16
+ <BlockSettingsDropdown
17
+ clientIds={ clientIds }
18
+ toggleProps={ toggleProps }
19
+ { ...props }
20
+ />
21
+ ) }
22
+ </ToolbarItem>
23
+ </ToolbarGroup>
28
24
  );
29
25
  }
30
26
 
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import { compact, map } from 'lodash';
4
+ import { map } from 'lodash';
5
5
 
6
6
  /**
7
7
  * WordPress dependencies
@@ -37,7 +37,7 @@ const BlockSettingsMenuControlsSlot = ( { fillProps, clientIds = null } ) => {
37
37
  clientIds !== null ? clientIds : getSelectedBlockClientIds();
38
38
  return {
39
39
  selectedBlocks: map(
40
- compact( getBlocksByClientId( ids ) ),
40
+ getBlocksByClientId( ids ).filter( Boolean ),
41
41
  ( block ) => block.name
42
42
  ),
43
43
  selectedClientIds: ids,