@wordpress/block-editor 14.3.4 → 14.4.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 (392) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +4 -0
  3. package/build/autocompleters/link.js +2 -1
  4. package/build/autocompleters/link.js.map +1 -1
  5. package/build/components/block-actions/index.js +1 -13
  6. package/build/components/block-actions/index.js.map +1 -1
  7. package/build/components/block-inspector/index.js +56 -75
  8. package/build/components/block-inspector/index.js.map +1 -1
  9. package/build/components/block-list/block.js +5 -19
  10. package/build/components/block-list/block.js.map +1 -1
  11. package/build/components/block-list/index.js +5 -8
  12. package/build/components/block-list/index.js.map +1 -1
  13. package/build/components/block-list/use-block-props/index.js +3 -11
  14. package/build/components/block-list/use-block-props/index.js.map +1 -1
  15. package/build/components/block-list/use-block-props/use-zoom-out-mode-exit.js +9 -12
  16. package/build/components/block-list/use-block-props/use-zoom-out-mode-exit.js.map +1 -1
  17. package/build/components/block-list/use-in-between-inserter.js +5 -3
  18. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  19. package/build/components/block-list/zoom-out-separator.js +14 -6
  20. package/build/components/block-list/zoom-out-separator.js.map +1 -1
  21. package/build/components/block-navigation/dropdown.js +2 -4
  22. package/build/components/block-navigation/dropdown.js.map +1 -1
  23. package/build/components/block-parent-selector/index.js +13 -10
  24. package/build/components/block-parent-selector/index.js.map +1 -1
  25. package/build/components/block-pattern-setup/setup-toolbar.js +10 -20
  26. package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  27. package/build/components/block-patterns-paging/index.js +11 -13
  28. package/build/components/block-patterns-paging/index.js.map +1 -1
  29. package/build/components/block-quick-navigation/index.js +2 -4
  30. package/build/components/block-quick-navigation/index.js.map +1 -1
  31. package/build/components/block-settings-menu/block-settings-dropdown.js +79 -76
  32. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  33. package/build/components/block-settings-menu-controls/index.js +1 -6
  34. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  35. package/build/components/block-switcher/index.js +17 -14
  36. package/build/components/block-switcher/index.js.map +1 -1
  37. package/build/components/block-toolbar/index.js +16 -19
  38. package/build/components/block-toolbar/index.js.map +1 -1
  39. package/build/components/block-toolbar/use-has-block-toolbar.js +3 -5
  40. package/build/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
  41. package/build/components/block-tools/index.js +8 -11
  42. package/build/components/block-tools/index.js.map +1 -1
  43. package/build/components/block-tools/insertion-point.js +1 -4
  44. package/build/components/block-tools/insertion-point.js.map +1 -1
  45. package/build/components/block-tools/use-show-block-tools.js +2 -5
  46. package/build/components/block-tools/use-show-block-tools.js.map +1 -1
  47. package/build/components/block-tools/zoom-out-mode-inserter-button.js +1 -12
  48. package/build/components/block-tools/zoom-out-mode-inserter-button.js.map +1 -1
  49. package/build/components/block-tools/zoom-out-mode-inserters.js +14 -17
  50. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  51. package/build/components/block-tools/zoom-out-toolbar.js +2 -12
  52. package/build/components/block-tools/zoom-out-toolbar.js.map +1 -1
  53. package/build/components/block-variation-picker/index.js +2 -4
  54. package/build/components/block-variation-picker/index.js.map +1 -1
  55. package/build/components/block-variation-transforms/index.js +3 -4
  56. package/build/components/block-variation-transforms/index.js.map +1 -1
  57. package/build/components/button-block-appender/index.js +2 -4
  58. package/build/components/button-block-appender/index.js.map +1 -1
  59. package/build/components/colors-gradients/dropdown.js +2 -4
  60. package/build/components/colors-gradients/dropdown.js.map +1 -1
  61. package/build/components/global-styles/border-panel.js +1 -1
  62. package/build/components/global-styles/border-panel.js.map +1 -1
  63. package/build/components/global-styles/color-panel.js +2 -4
  64. package/build/components/global-styles/color-panel.js.map +1 -1
  65. package/build/components/global-styles/dimensions-panel.js +3 -3
  66. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  67. package/build/components/global-styles/filters-panel.js +2 -4
  68. package/build/components/global-styles/filters-panel.js.map +1 -1
  69. package/build/components/global-styles/shadow-panel-components.js +24 -29
  70. package/build/components/global-styles/shadow-panel-components.js.map +1 -1
  71. package/build/components/inner-blocks/index.js +1 -9
  72. package/build/components/inner-blocks/index.js.map +1 -1
  73. package/build/components/inserter/block-types-tab.js +1 -1
  74. package/build/components/inserter/block-types-tab.js.map +1 -1
  75. package/build/components/inserter/hooks/use-block-types-state.js +24 -5
  76. package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
  77. package/build/components/inserter/hooks/use-insertion-point.js +22 -12
  78. package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
  79. package/build/components/inserter/hooks/use-patterns-state.js +23 -10
  80. package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
  81. package/build/components/inserter/media-tab/media-preview.js +35 -13
  82. package/build/components/inserter/media-tab/media-preview.js.map +1 -1
  83. package/build/components/inserter/menu.js +2 -2
  84. package/build/components/inserter/menu.js.map +1 -1
  85. package/build/components/inserter/mobile-tab-navigation.js +5 -5
  86. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  87. package/build/components/inserter/quick-inserter.js +4 -4
  88. package/build/components/inserter/quick-inserter.js.map +1 -1
  89. package/build/components/inspector-controls-tabs/index.js +11 -8
  90. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  91. package/build/components/inspector-popover-header/index.js +4 -8
  92. package/build/components/inspector-popover-header/index.js.map +1 -1
  93. package/build/components/link-control/index.js +5 -10
  94. package/build/components/link-control/index.js.map +1 -1
  95. package/build/components/link-control/settings-drawer.js +2 -4
  96. package/build/components/link-control/settings-drawer.js.map +1 -1
  97. package/build/components/list-view/block-contents.js +1 -25
  98. package/build/components/list-view/block-contents.js.map +1 -1
  99. package/build/components/list-view/block-select-button.js +1 -4
  100. package/build/components/list-view/block-select-button.js.map +1 -1
  101. package/build/components/media-placeholder/index.js +12 -24
  102. package/build/components/media-placeholder/index.js.map +1 -1
  103. package/build/components/skip-to-selected-block/index.js +2 -4
  104. package/build/components/skip-to-selected-block/index.js.map +1 -1
  105. package/build/components/tool-selector/index.js +13 -12
  106. package/build/components/tool-selector/index.js.map +1 -1
  107. package/build/components/url-input/button.js +14 -16
  108. package/build/components/url-input/button.js.map +1 -1
  109. package/build/components/url-input/index.js +2 -4
  110. package/build/components/url-input/index.js.map +1 -1
  111. package/build/components/use-block-commands/index.js +0 -61
  112. package/build/components/use-block-commands/index.js.map +1 -1
  113. package/build/components/writing-flow/use-tab-nav.js +2 -25
  114. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  115. package/build/hooks/duotone.js +4 -1
  116. package/build/hooks/duotone.js.map +1 -1
  117. package/build/hooks/layout-child.js +3 -1
  118. package/build/hooks/layout-child.js.map +1 -1
  119. package/build/hooks/position.js +3 -2
  120. package/build/hooks/position.js.map +1 -1
  121. package/build/layouts/flex.js +6 -38
  122. package/build/layouts/flex.js.map +1 -1
  123. package/build/store/actions.js +13 -14
  124. package/build/store/actions.js.map +1 -1
  125. package/build/store/private-actions.js +15 -0
  126. package/build/store/private-actions.js.map +1 -1
  127. package/build/store/private-selectors.js +104 -7
  128. package/build/store/private-selectors.js.map +1 -1
  129. package/build/store/reducer.js +22 -26
  130. package/build/store/reducer.js.map +1 -1
  131. package/build/store/selectors.js +127 -56
  132. package/build/store/selectors.js.map +1 -1
  133. package/build/store/utils.js +4 -3
  134. package/build/store/utils.js.map +1 -1
  135. package/build/utils/block-bindings.js +2 -0
  136. package/build/utils/block-bindings.js.map +1 -1
  137. package/build-module/autocompleters/link.js +2 -1
  138. package/build-module/autocompleters/link.js.map +1 -1
  139. package/build-module/components/block-actions/index.js +1 -13
  140. package/build-module/components/block-actions/index.js.map +1 -1
  141. package/build-module/components/block-inspector/index.js +57 -76
  142. package/build-module/components/block-inspector/index.js.map +1 -1
  143. package/build-module/components/block-list/block.js +5 -19
  144. package/build-module/components/block-list/block.js.map +1 -1
  145. package/build-module/components/block-list/index.js +5 -8
  146. package/build-module/components/block-list/index.js.map +1 -1
  147. package/build-module/components/block-list/use-block-props/index.js +3 -11
  148. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  149. package/build-module/components/block-list/use-block-props/use-zoom-out-mode-exit.js +9 -12
  150. package/build-module/components/block-list/use-block-props/use-zoom-out-mode-exit.js.map +1 -1
  151. package/build-module/components/block-list/use-in-between-inserter.js +5 -3
  152. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  153. package/build-module/components/block-list/zoom-out-separator.js +14 -6
  154. package/build-module/components/block-list/zoom-out-separator.js.map +1 -1
  155. package/build-module/components/block-navigation/dropdown.js +2 -4
  156. package/build-module/components/block-navigation/dropdown.js.map +1 -1
  157. package/build-module/components/block-parent-selector/index.js +13 -10
  158. package/build-module/components/block-parent-selector/index.js.map +1 -1
  159. package/build-module/components/block-pattern-setup/setup-toolbar.js +10 -20
  160. package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  161. package/build-module/components/block-patterns-paging/index.js +11 -13
  162. package/build-module/components/block-patterns-paging/index.js.map +1 -1
  163. package/build-module/components/block-quick-navigation/index.js +2 -4
  164. package/build-module/components/block-quick-navigation/index.js.map +1 -1
  165. package/build-module/components/block-settings-menu/block-settings-dropdown.js +79 -76
  166. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  167. package/build-module/components/block-settings-menu-controls/index.js +2 -7
  168. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  169. package/build-module/components/block-switcher/index.js +17 -14
  170. package/build-module/components/block-switcher/index.js.map +1 -1
  171. package/build-module/components/block-toolbar/index.js +17 -20
  172. package/build-module/components/block-toolbar/index.js.map +1 -1
  173. package/build-module/components/block-toolbar/use-has-block-toolbar.js +3 -5
  174. package/build-module/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
  175. package/build-module/components/block-tools/index.js +8 -11
  176. package/build-module/components/block-tools/index.js.map +1 -1
  177. package/build-module/components/block-tools/insertion-point.js +1 -4
  178. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  179. package/build-module/components/block-tools/use-show-block-tools.js +2 -5
  180. package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
  181. package/build-module/components/block-tools/zoom-out-mode-inserter-button.js +1 -12
  182. package/build-module/components/block-tools/zoom-out-mode-inserter-button.js.map +1 -1
  183. package/build-module/components/block-tools/zoom-out-mode-inserters.js +14 -17
  184. package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  185. package/build-module/components/block-tools/zoom-out-toolbar.js +2 -12
  186. package/build-module/components/block-tools/zoom-out-toolbar.js.map +1 -1
  187. package/build-module/components/block-variation-picker/index.js +2 -4
  188. package/build-module/components/block-variation-picker/index.js.map +1 -1
  189. package/build-module/components/block-variation-transforms/index.js +3 -4
  190. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  191. package/build-module/components/button-block-appender/index.js +2 -4
  192. package/build-module/components/button-block-appender/index.js.map +1 -1
  193. package/build-module/components/colors-gradients/dropdown.js +2 -4
  194. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  195. package/build-module/components/global-styles/border-panel.js +1 -1
  196. package/build-module/components/global-styles/border-panel.js.map +1 -1
  197. package/build-module/components/global-styles/color-panel.js +2 -4
  198. package/build-module/components/global-styles/color-panel.js.map +1 -1
  199. package/build-module/components/global-styles/dimensions-panel.js +1 -1
  200. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  201. package/build-module/components/global-styles/filters-panel.js +2 -4
  202. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  203. package/build-module/components/global-styles/shadow-panel-components.js +25 -30
  204. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
  205. package/build-module/components/inner-blocks/index.js +1 -9
  206. package/build-module/components/inner-blocks/index.js.map +1 -1
  207. package/build-module/components/inserter/block-types-tab.js +1 -1
  208. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  209. package/build-module/components/inserter/hooks/use-block-types-state.js +27 -8
  210. package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
  211. package/build-module/components/inserter/hooks/use-insertion-point.js +22 -12
  212. package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
  213. package/build-module/components/inserter/hooks/use-patterns-state.js +23 -10
  214. package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
  215. package/build-module/components/inserter/media-tab/media-preview.js +35 -13
  216. package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
  217. package/build-module/components/inserter/menu.js +2 -2
  218. package/build-module/components/inserter/menu.js.map +1 -1
  219. package/build-module/components/inserter/mobile-tab-navigation.js +6 -6
  220. package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
  221. package/build-module/components/inserter/quick-inserter.js +4 -4
  222. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  223. package/build-module/components/inspector-controls-tabs/index.js +12 -9
  224. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  225. package/build-module/components/inspector-popover-header/index.js +4 -8
  226. package/build-module/components/inspector-popover-header/index.js.map +1 -1
  227. package/build-module/components/link-control/index.js +5 -10
  228. package/build-module/components/link-control/index.js.map +1 -1
  229. package/build-module/components/link-control/settings-drawer.js +2 -4
  230. package/build-module/components/link-control/settings-drawer.js.map +1 -1
  231. package/build-module/components/list-view/block-contents.js +1 -25
  232. package/build-module/components/list-view/block-contents.js.map +1 -1
  233. package/build-module/components/list-view/block-select-button.js +2 -5
  234. package/build-module/components/list-view/block-select-button.js.map +1 -1
  235. package/build-module/components/media-placeholder/index.js +12 -24
  236. package/build-module/components/media-placeholder/index.js.map +1 -1
  237. package/build-module/components/skip-to-selected-block/index.js +2 -4
  238. package/build-module/components/skip-to-selected-block/index.js.map +1 -1
  239. package/build-module/components/tool-selector/index.js +13 -12
  240. package/build-module/components/tool-selector/index.js.map +1 -1
  241. package/build-module/components/url-input/button.js +15 -17
  242. package/build-module/components/url-input/button.js.map +1 -1
  243. package/build-module/components/url-input/index.js +2 -4
  244. package/build-module/components/url-input/index.js.map +1 -1
  245. package/build-module/components/use-block-commands/index.js +1 -62
  246. package/build-module/components/use-block-commands/index.js.map +1 -1
  247. package/build-module/components/writing-flow/use-tab-nav.js +3 -26
  248. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  249. package/build-module/hooks/duotone.js +4 -1
  250. package/build-module/hooks/duotone.js.map +1 -1
  251. package/build-module/hooks/layout-child.js +4 -1
  252. package/build-module/hooks/layout-child.js.map +1 -1
  253. package/build-module/hooks/position.js +4 -1
  254. package/build-module/hooks/position.js.map +1 -1
  255. package/build-module/layouts/flex.js +7 -39
  256. package/build-module/layouts/flex.js.map +1 -1
  257. package/build-module/store/actions.js +12 -12
  258. package/build-module/store/actions.js.map +1 -1
  259. package/build-module/store/private-actions.js +14 -0
  260. package/build-module/store/private-actions.js.map +1 -1
  261. package/build-module/store/private-selectors.js +98 -7
  262. package/build-module/store/private-selectors.js.map +1 -1
  263. package/build-module/store/reducer.js +21 -25
  264. package/build-module/store/reducer.js.map +1 -1
  265. package/build-module/store/selectors.js +129 -58
  266. package/build-module/store/selectors.js.map +1 -1
  267. package/build-module/store/utils.js +3 -2
  268. package/build-module/store/utils.js.map +1 -1
  269. package/build-module/utils/block-bindings.js +2 -0
  270. package/build-module/utils/block-bindings.js.map +1 -1
  271. package/build-style/content-rtl.css +14 -56
  272. package/build-style/content.css +14 -56
  273. package/build-style/default-editor-styles-rtl.css +10 -1
  274. package/build-style/default-editor-styles.css +10 -1
  275. package/build-style/style-rtl.css +51 -149
  276. package/build-style/style.css +51 -149
  277. package/package.json +32 -32
  278. package/src/autocompleters/link.js +2 -1
  279. package/src/components/block-actions/index.js +1 -13
  280. package/src/components/block-draggable/style.scss +2 -2
  281. package/src/components/block-inspector/index.js +79 -95
  282. package/src/components/block-inspector/style.scss +2 -0
  283. package/src/components/block-list/block.js +7 -28
  284. package/src/components/block-list/content.scss +1 -61
  285. package/src/components/block-list/index.js +21 -29
  286. package/src/components/block-list/use-block-props/index.js +3 -10
  287. package/src/components/block-list/use-block-props/use-zoom-out-mode-exit.js +19 -11
  288. package/src/components/block-list/use-in-between-inserter.js +5 -2
  289. package/src/components/block-list/zoom-out-separator.js +24 -8
  290. package/src/components/block-navigation/dropdown.js +1 -2
  291. package/src/components/block-parent-selector/index.js +13 -10
  292. package/src/components/block-pattern-setup/setup-toolbar.js +5 -10
  293. package/src/components/block-patterns-paging/index.js +8 -7
  294. package/src/components/block-patterns-paging/style.scss +10 -27
  295. package/src/components/block-quick-navigation/index.js +1 -2
  296. package/src/components/block-settings-menu/block-settings-dropdown.js +120 -106
  297. package/src/components/block-settings-menu-controls/index.js +0 -15
  298. package/src/components/block-switcher/index.js +37 -30
  299. package/src/components/block-toolbar/index.js +22 -34
  300. package/src/components/block-toolbar/style.scss +10 -1
  301. package/src/components/block-toolbar/use-has-block-toolbar.js +19 -31
  302. package/src/components/block-tools/index.js +7 -16
  303. package/src/components/block-tools/insertion-point.js +1 -4
  304. package/src/components/block-tools/style.scss +3 -88
  305. package/src/components/block-tools/use-show-block-tools.js +2 -12
  306. package/src/components/block-tools/zoom-out-mode-inserter-button.js +2 -17
  307. package/src/components/block-tools/zoom-out-mode-inserters.js +11 -19
  308. package/src/components/block-tools/zoom-out-toolbar.js +2 -13
  309. package/src/components/block-variation-picker/index.js +1 -2
  310. package/src/components/block-variation-transforms/index.js +2 -2
  311. package/src/components/button-block-appender/content.scss +0 -5
  312. package/src/components/button-block-appender/index.js +1 -2
  313. package/src/components/colors-gradients/dropdown.js +1 -5
  314. package/src/components/font-family/README.md +5 -1
  315. package/src/components/global-styles/border-panel.js +1 -1
  316. package/src/components/global-styles/color-panel.js +1 -5
  317. package/src/components/global-styles/dimensions-panel.js +1 -1
  318. package/src/components/global-styles/filters-panel.js +1 -2
  319. package/src/components/global-styles/shadow-panel-components.js +28 -33
  320. package/src/components/global-styles/style.scss +5 -0
  321. package/src/components/inner-blocks/index.js +1 -16
  322. package/src/components/inserter/block-types-tab.js +1 -1
  323. package/src/components/inserter/hooks/use-block-types-state.js +34 -14
  324. package/src/components/inserter/hooks/use-insertion-point.js +35 -13
  325. package/src/components/inserter/hooks/use-patterns-state.js +46 -9
  326. package/src/components/inserter/media-tab/media-preview.js +38 -12
  327. package/src/components/inserter/menu.js +2 -2
  328. package/src/components/inserter/mobile-tab-navigation.js +10 -13
  329. package/src/components/inserter/quick-inserter.js +5 -4
  330. package/src/components/inserter/style.scss +0 -28
  331. package/src/components/inspector-controls-tabs/index.js +21 -20
  332. package/src/components/inspector-controls-tabs/style.scss +2 -6
  333. package/src/components/inspector-popover-header/index.js +2 -4
  334. package/src/components/inspector-popover-header/style.scss +0 -13
  335. package/src/components/link-control/index.js +2 -5
  336. package/src/components/link-control/settings-drawer.js +1 -2
  337. package/src/components/list-view/block-contents.js +1 -28
  338. package/src/components/list-view/block-select-button.js +2 -5
  339. package/src/components/list-view/style.scss +18 -14
  340. package/src/components/media-placeholder/index.js +6 -12
  341. package/src/components/skip-to-selected-block/index.js +1 -2
  342. package/src/components/skip-to-selected-block/style.scss +0 -9
  343. package/src/components/tool-selector/index.js +14 -9
  344. package/src/components/tool-selector/style.scss +5 -0
  345. package/src/components/url-input/button.js +16 -12
  346. package/src/components/url-input/index.js +1 -2
  347. package/src/components/url-input/style.scss +0 -6
  348. package/src/components/use-block-commands/index.js +0 -58
  349. package/src/components/writing-flow/use-tab-nav.js +4 -36
  350. package/src/content.scss +0 -1
  351. package/src/hooks/duotone.js +4 -1
  352. package/src/hooks/layout-child.js +4 -1
  353. package/src/hooks/position.js +4 -1
  354. package/src/layouts/flex.js +10 -53
  355. package/src/store/actions.js +14 -13
  356. package/src/store/private-actions.js +14 -0
  357. package/src/store/private-selectors.js +120 -16
  358. package/src/store/reducer.js +22 -28
  359. package/src/store/selectors.js +203 -114
  360. package/src/store/test/private-actions.js +15 -0
  361. package/src/store/test/private-selectors.js +34 -0
  362. package/src/store/test/reducer.js +40 -4
  363. package/src/store/test/selectors.js +183 -20
  364. package/src/store/utils.js +4 -2
  365. package/src/utils/block-bindings.js +2 -0
  366. package/build/components/block-controls/use-has-block-controls.js +0 -43
  367. package/build/components/block-controls/use-has-block-controls.js.map +0 -1
  368. package/build/components/block-list/use-block-props/use-nav-mode-exit.js +0 -54
  369. package/build/components/block-list/use-block-props/use-nav-mode-exit.js.map +0 -1
  370. package/build/components/block-tools/block-selection-button.js +0 -259
  371. package/build/components/block-tools/block-selection-button.js.map +0 -1
  372. package/build/components/block-tools/block-toolbar-breadcrumb.js +0 -57
  373. package/build/components/block-tools/block-toolbar-breadcrumb.js.map +0 -1
  374. package/build/components/inserter/tabs.js +0 -78
  375. package/build/components/inserter/tabs.js.map +0 -1
  376. package/build-module/components/block-controls/use-has-block-controls.js +0 -34
  377. package/build-module/components/block-controls/use-has-block-controls.js.map +0 -1
  378. package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js +0 -48
  379. package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js.map +0 -1
  380. package/build-module/components/block-tools/block-selection-button.js +0 -254
  381. package/build-module/components/block-tools/block-selection-button.js.map +0 -1
  382. package/build-module/components/block-tools/block-toolbar-breadcrumb.js +0 -49
  383. package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +0 -1
  384. package/build-module/components/inserter/tabs.js +0 -72
  385. package/build-module/components/inserter/tabs.js.map +0 -1
  386. package/src/components/block-controls/use-has-block-controls.js +0 -35
  387. package/src/components/block-list/use-block-props/use-nav-mode-exit.js +0 -46
  388. package/src/components/block-tools/block-selection-button.js +0 -302
  389. package/src/components/block-tools/block-toolbar-breadcrumb.js +0 -51
  390. package/src/components/inner-blocks/content.scss +0 -13
  391. package/src/components/inserter/tabs.js +0 -78
  392. package/src/components/inserter/test/block-types-tab.native.js +0 -67
@@ -12,7 +12,6 @@ import {
12
12
  arrowDown,
13
13
  } from '@wordpress/icons';
14
14
  import {
15
- Button,
16
15
  ToggleControl,
17
16
  Flex,
18
17
  FlexItem,
@@ -110,7 +109,6 @@ export default {
110
109
  <FlexLayoutVerticalAlignmentControl
111
110
  layout={ layout }
112
111
  onChange={ onChange }
113
- isToolbar
114
112
  />
115
113
  ) }
116
114
  </BlockControls>
@@ -190,11 +188,7 @@ export default {
190
188
  },
191
189
  };
192
190
 
193
- function FlexLayoutVerticalAlignmentControl( {
194
- layout,
195
- onChange,
196
- isToolbar = false,
197
- } ) {
191
+ function FlexLayoutVerticalAlignmentControl( { layout, onChange } ) {
198
192
  const { orientation = 'horizontal' } = layout;
199
193
 
200
194
  const defaultVerticalAlignment =
@@ -210,54 +204,17 @@ function FlexLayoutVerticalAlignmentControl( {
210
204
  verticalAlignment: value,
211
205
  } );
212
206
  };
213
- if ( isToolbar ) {
214
- return (
215
- <BlockVerticalAlignmentControl
216
- onChange={ onVerticalAlignmentChange }
217
- value={ verticalAlignment }
218
- controls={
219
- orientation === 'horizontal'
220
- ? [ 'top', 'center', 'bottom', 'stretch' ]
221
- : [ 'top', 'center', 'bottom', 'space-between' ]
222
- }
223
- />
224
- );
225
- }
226
-
227
- const verticalAlignmentOptions = [
228
- {
229
- value: 'flex-start',
230
- label: __( 'Align items top' ),
231
- },
232
- {
233
- value: 'center',
234
- label: __( 'Align items center' ),
235
- },
236
- {
237
- value: 'flex-end',
238
- label: __( 'Align items bottom' ),
239
- },
240
- ];
241
207
 
242
208
  return (
243
- <fieldset className="block-editor-hooks__flex-layout-vertical-alignment-control">
244
- <legend>{ __( 'Vertical alignment' ) }</legend>
245
- <div>
246
- { verticalAlignmentOptions.map( ( value, icon, label ) => {
247
- return (
248
- <Button
249
- // TODO: Switch to `true` (40px size) if possible
250
- __next40pxDefaultSize={ false }
251
- key={ value }
252
- label={ label }
253
- icon={ icon }
254
- isPressed={ verticalAlignment === value }
255
- onClick={ () => onVerticalAlignmentChange( value ) }
256
- />
257
- );
258
- } ) }
259
- </div>
260
- </fieldset>
209
+ <BlockVerticalAlignmentControl
210
+ onChange={ onVerticalAlignmentChange }
211
+ value={ verticalAlignment }
212
+ controls={
213
+ orientation === 'horizontal'
214
+ ? [ 'top', 'center', 'bottom', 'stretch' ]
215
+ : [ 'top', 'center', 'bottom', 'space-between' ]
216
+ }
217
+ />
261
218
  );
262
219
  }
263
220
 
@@ -1728,23 +1728,24 @@ export const __unstableSetEditorMode =
1728
1728
  };
1729
1729
 
1730
1730
  /**
1731
- * Action that enables or disables the block moving mode.
1731
+ * Set the block moving client ID.
1732
1732
  *
1733
- * @param {string|null} hasBlockMovingClientId Enable/Disable block moving mode.
1733
+ * @deprecated
1734
+ *
1735
+ * @return {Object} Action object.
1734
1736
  */
1735
- export const setBlockMovingClientId =
1736
- ( hasBlockMovingClientId = null ) =>
1737
- ( { dispatch } ) => {
1738
- dispatch( { type: 'SET_BLOCK_MOVING_MODE', hasBlockMovingClientId } );
1739
-
1740
- if ( hasBlockMovingClientId ) {
1741
- speak(
1742
- __(
1743
- 'Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block.'
1744
- )
1745
- );
1737
+ export function setBlockMovingClientId() {
1738
+ deprecated(
1739
+ 'wp.data.dispatch( "core/block-editor" ).setBlockMovingClientId',
1740
+ {
1741
+ since: '6.7',
1742
+ hint: 'Block moving mode feature has been removed',
1746
1743
  }
1744
+ );
1745
+ return {
1746
+ type: 'DO_NOTHING',
1747
1747
  };
1748
+ }
1748
1749
 
1749
1750
  /**
1750
1751
  * Action that duplicates a list of blocks.
@@ -359,6 +359,20 @@ export function expandBlock( clientId ) {
359
359
  };
360
360
  }
361
361
 
362
+ /**
363
+ * @param {Object} value
364
+ * @param {string} value.rootClientId The root client ID to insert at.
365
+ * @param {number} value.index The index to insert at.
366
+ *
367
+ * @return {Object} Action object.
368
+ */
369
+ export function setInsertionPoint( value ) {
370
+ return {
371
+ type: 'SET_INSERTION_POINT',
372
+ value,
373
+ };
374
+ }
375
+
362
376
  /**
363
377
  * Temporarily modify/unlock the content-only block for editions.
364
378
  *
@@ -15,6 +15,8 @@ import {
15
15
  getBlockName,
16
16
  getTemplateLock,
17
17
  getClientIdsWithDescendants,
18
+ isNavigationMode,
19
+ getBlockRootClientId,
18
20
  } from './selectors';
19
21
  import {
20
22
  checkAllowListRecursive,
@@ -115,6 +117,7 @@ export const getEnabledClientIdsTree = createSelector(
115
117
  state.settings.templateLock,
116
118
  state.blockListSettings,
117
119
  state.editorMode,
120
+ getSectionRootClientId( state ),
118
121
  ]
119
122
  );
120
123
 
@@ -471,26 +474,57 @@ export function getExpandedBlock( state ) {
471
474
  * with the provided client ID.
472
475
  *
473
476
  * @param {Object} state Global application state.
474
- * @param {Object} clientId Client Id of the block.
477
+ * @param {string} clientId Client Id of the block.
475
478
  *
476
479
  * @return {?string} Client ID of the ancestor block that is content locking the block.
477
480
  */
478
- export const getContentLockingParent = createSelector(
479
- ( state, clientId ) => {
480
- let current = clientId;
481
- let result;
482
- while ( ( current = state.blocks.parents.get( current ) ) ) {
483
- if (
484
- getBlockName( state, current ) === 'core/block' ||
485
- getTemplateLock( state, current ) === 'contentOnly'
486
- ) {
487
- result = current;
488
- }
481
+ export const getContentLockingParent = ( state, clientId ) => {
482
+ let current = clientId;
483
+ let result;
484
+ while ( ! result && ( current = state.blocks.parents.get( current ) ) ) {
485
+ if ( getTemplateLock( state, current ) === 'contentOnly' ) {
486
+ result = current;
489
487
  }
490
- return result;
491
- },
492
- ( state ) => [ state.blocks.parents, state.blockListSettings ]
493
- );
488
+ }
489
+ return result;
490
+ };
491
+
492
+ /**
493
+ * Retrieves the client ID of the parent section block.
494
+ *
495
+ * @param {Object} state Global application state.
496
+ * @param {string} clientId Client Id of the block.
497
+ *
498
+ * @return {?string} Client ID of the ancestor block that is content locking the block.
499
+ */
500
+ export const getParentSectionBlock = ( state, clientId ) => {
501
+ let current = clientId;
502
+ let result;
503
+ while ( ! result && ( current = state.blocks.parents.get( current ) ) ) {
504
+ if ( isSectionBlock( state, current ) ) {
505
+ result = current;
506
+ }
507
+ }
508
+ return result;
509
+ };
510
+
511
+ /**
512
+ * Retrieves the client ID is a content locking parent
513
+ *
514
+ * @param {Object} state Global application state.
515
+ * @param {string} clientId Client Id of the block.
516
+ *
517
+ * @return {boolean} Whether the block is a content locking parent.
518
+ */
519
+ export function isSectionBlock( state, clientId ) {
520
+ const sectionRootClientId = getSectionRootClientId( state );
521
+ const sectionClientIds = getBlockOrder( state, sectionRootClientId );
522
+ return (
523
+ getBlockName( state, clientId ) === 'core/block' ||
524
+ getTemplateLock( state, clientId ) === 'contentOnly' ||
525
+ ( isNavigationMode( state ) && sectionClientIds.includes( clientId ) )
526
+ );
527
+ }
494
528
 
495
529
  /**
496
530
  * Retrieves the client ID of the block that is content locked but is
@@ -580,3 +614,73 @@ export function getZoomLevel( state ) {
580
614
  export function isZoomOut( state ) {
581
615
  return getZoomLevel( state ) < 100;
582
616
  }
617
+
618
+ /**
619
+ * Finds the closest block where the block is allowed to be inserted.
620
+ *
621
+ * @param {Object} state Editor state.
622
+ * @param {string[] | string} name Block name or names.
623
+ * @param {string} clientId Default insertion point.
624
+ *
625
+ * @return {string} clientID of the closest container when the block name can be inserted.
626
+ */
627
+ export function getClosestAllowedInsertionPoint( state, name, clientId = '' ) {
628
+ const blockNames = Array.isArray( name ) ? name : [ name ];
629
+ const areBlockNamesAllowedInClientId = ( id ) =>
630
+ blockNames.every( ( currentName ) =>
631
+ canInsertBlockType( state, currentName, id )
632
+ );
633
+
634
+ // If we're trying to insert at the root level and it's not allowed
635
+ // Try the section root instead.
636
+ if ( ! clientId ) {
637
+ if ( areBlockNamesAllowedInClientId( clientId ) ) {
638
+ return clientId;
639
+ }
640
+
641
+ const sectionRootClientId = getSectionRootClientId( state );
642
+ if (
643
+ sectionRootClientId &&
644
+ areBlockNamesAllowedInClientId( sectionRootClientId )
645
+ ) {
646
+ return sectionRootClientId;
647
+ }
648
+ return null;
649
+ }
650
+
651
+ // Traverse the block tree up until we find a place where we can insert.
652
+ let current = clientId;
653
+ while ( current !== null && ! areBlockNamesAllowedInClientId( current ) ) {
654
+ const parentClientId = getBlockRootClientId( state, current );
655
+ current = parentClientId;
656
+ }
657
+
658
+ return current;
659
+ }
660
+
661
+ export function getClosestAllowedInsertionPointForPattern(
662
+ state,
663
+ pattern,
664
+ clientId
665
+ ) {
666
+ const { allowedBlockTypes } = getSettings( state );
667
+ const isAllowed = checkAllowListRecursive(
668
+ getGrammar( pattern ),
669
+ allowedBlockTypes
670
+ );
671
+ if ( ! isAllowed ) {
672
+ return null;
673
+ }
674
+ const names = getGrammar( pattern ).map( ( { blockName: name } ) => name );
675
+ return getClosestAllowedInsertionPoint( state, names, clientId );
676
+ }
677
+
678
+ /**
679
+ * Where the point where the next block will be inserted into.
680
+ *
681
+ * @param {Object} state
682
+ * @return {Object} where the insertion point in the block editor is or null if none is set.
683
+ */
684
+ export function getInsertionPoint( state ) {
685
+ return state.insertionPoint;
686
+ }
@@ -1601,7 +1601,7 @@ export function blocksMode( state = {}, action ) {
1601
1601
  *
1602
1602
  * @return {Object} Updated state.
1603
1603
  */
1604
- export function insertionPoint( state = null, action ) {
1604
+ export function insertionCue( state = null, action ) {
1605
1605
  switch ( action.type ) {
1606
1606
  case 'SHOW_INSERTION_POINT': {
1607
1607
  const {
@@ -1795,11 +1795,6 @@ export const blockListSettings = ( state = {}, action ) => {
1795
1795
  * @return {string} Updated state.
1796
1796
  */
1797
1797
  export function editorMode( state = 'edit', action ) {
1798
- // Let inserting block in navigation mode always trigger Edit mode.
1799
- if ( action.type === 'INSERT_BLOCKS' && state === 'navigation' ) {
1800
- return 'edit';
1801
- }
1802
-
1803
1798
  if ( action.type === 'SET_EDITOR_MODE' ) {
1804
1799
  return action.mode;
1805
1800
  }
@@ -1807,26 +1802,6 @@ export function editorMode( state = 'edit', action ) {
1807
1802
  return state;
1808
1803
  }
1809
1804
 
1810
- /**
1811
- * Reducer returning whether the block moving mode is enabled or not.
1812
- *
1813
- * @param {string|null} state Current state.
1814
- * @param {Object} action Dispatched action.
1815
- *
1816
- * @return {string|null} Updated state.
1817
- */
1818
- export function hasBlockMovingClientId( state = null, action ) {
1819
- if ( action.type === 'SET_BLOCK_MOVING_MODE' ) {
1820
- return action.hasBlockMovingClientId;
1821
- }
1822
-
1823
- if ( action.type === 'SET_EDITOR_MODE' ) {
1824
- return null;
1825
- }
1826
-
1827
- return state;
1828
- }
1829
-
1830
1805
  /**
1831
1806
  * Reducer return an updated state representing the most recent block attribute
1832
1807
  * update. The state is structured as an object where the keys represent the
@@ -2091,7 +2066,7 @@ export function hoveredBlockClientId( state = false, action ) {
2091
2066
  * @param {boolean} state Current state.
2092
2067
  * @param {Object} action Dispatched action.
2093
2068
  *
2094
- * @return {boolean} Updated state.
2069
+ * @return {number} Updated state.
2095
2070
  */
2096
2071
  export function zoomLevel( state = 100, action ) {
2097
2072
  switch ( action.type ) {
@@ -2104,6 +2079,25 @@ export function zoomLevel( state = 100, action ) {
2104
2079
  return state;
2105
2080
  }
2106
2081
 
2082
+ /**
2083
+ * Reducer setting the insertion point
2084
+ *
2085
+ * @param {boolean} state Current state.
2086
+ * @param {Object} action Dispatched action.
2087
+ *
2088
+ * @return {Object} Updated state.
2089
+ */
2090
+ export function insertionPoint( state = null, action ) {
2091
+ switch ( action.type ) {
2092
+ case 'SET_INSERTION_POINT':
2093
+ return action.value;
2094
+ case 'SELECT_BLOCK':
2095
+ return null;
2096
+ }
2097
+
2098
+ return state;
2099
+ }
2100
+
2107
2101
  const combinedReducers = combineReducers( {
2108
2102
  blocks,
2109
2103
  isDragging,
@@ -2117,13 +2111,13 @@ const combinedReducers = combineReducers( {
2117
2111
  blocksMode,
2118
2112
  blockListSettings,
2119
2113
  insertionPoint,
2114
+ insertionCue,
2120
2115
  template,
2121
2116
  settings,
2122
2117
  preferences,
2123
2118
  lastBlockAttributesChange,
2124
2119
  lastFocus,
2125
2120
  editorMode,
2126
- hasBlockMovingClientId,
2127
2121
  expandedBlock,
2128
2122
  highlightedBlock,
2129
2123
  lastBlockInserted,