@wordpress/block-editor 7.0.4 → 8.0.3

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 (1259) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +31 -0
  3. package/build/components/alignment-control/ui.js +12 -11
  4. package/build/components/alignment-control/ui.js.map +1 -1
  5. package/build/components/autocomplete/index.js +5 -4
  6. package/build/components/autocomplete/index.js.map +1 -1
  7. package/build/components/block-actions/index.js +12 -8
  8. package/build/components/block-actions/index.js.map +1 -1
  9. package/build/components/block-alignment-control/ui.js +21 -17
  10. package/build/components/block-alignment-control/ui.js.map +1 -1
  11. package/build/components/block-alignment-control/use-available-alignments.js +9 -4
  12. package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
  13. package/build/components/block-alignment-matrix-control/index.js +6 -4
  14. package/build/components/block-alignment-matrix-control/index.js.map +1 -1
  15. package/build/components/block-breadcrumb/index.js +4 -3
  16. package/build/components/block-breadcrumb/index.js.map +1 -1
  17. package/build/components/block-caption/index.native.js +34 -29
  18. package/build/components/block-caption/index.native.js.map +1 -1
  19. package/build/components/block-card/index.js +8 -6
  20. package/build/components/block-card/index.js.map +1 -1
  21. package/build/components/block-compare/block-view.js +9 -8
  22. package/build/components/block-compare/block-view.js.map +1 -1
  23. package/build/components/block-compare/index.js +9 -7
  24. package/build/components/block-compare/index.js.map +1 -1
  25. package/build/components/block-content-overlay/index.js +7 -6
  26. package/build/components/block-content-overlay/index.js.map +1 -1
  27. package/build/components/block-context/index.js +5 -4
  28. package/build/components/block-context/index.js.map +1 -1
  29. package/build/components/block-controls/fill.js +7 -6
  30. package/build/components/block-controls/fill.js.map +1 -1
  31. package/build/components/block-controls/slot.js +5 -4
  32. package/build/components/block-controls/slot.js.map +1 -1
  33. package/build/components/block-controls/slot.native.js +5 -4
  34. package/build/components/block-controls/slot.native.js.map +1 -1
  35. package/build/components/block-draggable/draggable-chip.js +5 -4
  36. package/build/components/block-draggable/draggable-chip.js.map +1 -1
  37. package/build/components/block-draggable/index.js +13 -11
  38. package/build/components/block-draggable/index.js.map +1 -1
  39. package/build/components/block-edit/context.js +1 -1
  40. package/build/components/block-full-height-alignment-control/index.js +7 -6
  41. package/build/components/block-full-height-alignment-control/index.js.map +1 -1
  42. package/build/components/block-icon/index.js +12 -6
  43. package/build/components/block-icon/index.js.map +1 -1
  44. package/build/components/block-icon/index.native.js +8 -6
  45. package/build/components/block-icon/index.native.js.map +1 -1
  46. package/build/components/block-inspector/index.js +24 -15
  47. package/build/components/block-inspector/index.js.map +1 -1
  48. package/build/components/block-list/block-html.js +4 -3
  49. package/build/components/block-list/block-html.js.map +1 -1
  50. package/build/components/block-list/block-invalid-warning.js +28 -20
  51. package/build/components/block-list/block-invalid-warning.js.map +1 -1
  52. package/build/components/block-list/block-invalid-warning.native.js +5 -4
  53. package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
  54. package/build/components/block-list/block-list-item.native.js +6 -5
  55. package/build/components/block-list/block-list-item.native.js.map +1 -1
  56. package/build/components/block-list/block-selection-button.native.js +11 -9
  57. package/build/components/block-list/block-selection-button.native.js.map +1 -1
  58. package/build/components/block-list/block.js +40 -33
  59. package/build/components/block-list/block.js.map +1 -1
  60. package/build/components/block-list/block.native.js +35 -29
  61. package/build/components/block-list/block.native.js.map +1 -1
  62. package/build/components/block-list/index.js +14 -12
  63. package/build/components/block-list/index.js.map +1 -1
  64. package/build/components/block-list/index.native.js +23 -18
  65. package/build/components/block-list/index.native.js.map +1 -1
  66. package/build/components/block-list/insertion-point.native.js +4 -3
  67. package/build/components/block-list/insertion-point.native.js.map +1 -1
  68. package/build/components/block-list/layout.js +8 -6
  69. package/build/components/block-list/layout.js.map +1 -1
  70. package/build/components/block-list/subdirectory-icon.js +13 -10
  71. package/build/components/block-list/subdirectory-icon.js.map +1 -1
  72. package/build/components/block-list/use-block-props/index.js +5 -3
  73. package/build/components/block-list/use-block-props/index.js.map +1 -1
  74. package/build/components/block-list/use-block-props/index.native.js +2 -1
  75. package/build/components/block-list/use-block-props/index.native.js.map +1 -1
  76. package/build/components/block-list/use-block-props/use-block-refs.js +2 -2
  77. package/build/components/block-list/use-block-props/use-multi-selection.js +30 -14
  78. package/build/components/block-list/use-block-props/use-multi-selection.js.map +1 -1
  79. package/build/components/block-list-appender/index.js +16 -13
  80. package/build/components/block-list-appender/index.js.map +1 -1
  81. package/build/components/block-list-appender/index.native.js +14 -11
  82. package/build/components/block-list-appender/index.native.js.map +1 -1
  83. package/build/components/block-media-update-progress/index.native.js +1 -1
  84. package/build/components/block-mobile-toolbar/block-actions-menu.native.js +46 -42
  85. package/build/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
  86. package/build/components/block-mobile-toolbar/index.js +4 -3
  87. package/build/components/block-mobile-toolbar/index.js.map +1 -1
  88. package/build/components/block-mobile-toolbar/index.native.js +33 -25
  89. package/build/components/block-mobile-toolbar/index.native.js.map +1 -1
  90. package/build/components/block-mover/button.js +8 -7
  91. package/build/components/block-mover/button.js.map +1 -1
  92. package/build/components/block-mover/index.js +15 -13
  93. package/build/components/block-mover/index.js.map +1 -1
  94. package/build/components/block-mover/index.native.js +23 -20
  95. package/build/components/block-mover/index.native.js.map +1 -1
  96. package/build/components/block-mover/mover-description.native.js +10 -7
  97. package/build/components/block-mover/mover-description.native.js.map +1 -1
  98. package/build/components/block-navigation/dropdown.js +26 -22
  99. package/build/components/block-navigation/dropdown.js.map +1 -1
  100. package/build/components/block-pattern-setup/index.js +26 -22
  101. package/build/components/block-pattern-setup/index.js.map +1 -1
  102. package/build/components/block-pattern-setup/setup-toolbar.js +46 -39
  103. package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  104. package/build/components/block-patterns-list/index.js +45 -47
  105. package/build/components/block-patterns-list/index.js.map +1 -1
  106. package/build/components/block-preview/auto.js +5 -4
  107. package/build/components/block-preview/auto.js.map +1 -1
  108. package/build/components/block-preview/index.js +8 -7
  109. package/build/components/block-preview/index.js.map +1 -1
  110. package/build/components/block-preview/live.js +4 -3
  111. package/build/components/block-preview/live.js.map +1 -1
  112. package/build/components/block-selection-clearer/index.js +1 -1
  113. package/build/components/block-settings/button.native.js +10 -7
  114. package/build/components/block-settings/button.native.js.map +1 -1
  115. package/build/components/block-settings/container.native.js +12 -8
  116. package/build/components/block-settings/container.native.js.map +1 -1
  117. package/build/components/block-settings/index.native.js +4 -2
  118. package/build/components/block-settings/index.native.js.map +1 -1
  119. package/build/components/block-settings-menu/block-convert-button.js +7 -5
  120. package/build/components/block-settings-menu/block-convert-button.js.map +1 -1
  121. package/build/components/block-settings-menu/block-html-convert-button.js +14 -10
  122. package/build/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  123. package/build/components/block-settings-menu/block-mode-toggle.js +25 -19
  124. package/build/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  125. package/build/components/block-settings-menu/block-settings-dropdown.js +96 -68
  126. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  127. package/build/components/block-settings-menu/index.js +5 -4
  128. package/build/components/block-settings-menu/index.js.map +1 -1
  129. package/build/components/block-settings-menu-controls/index.js +8 -6
  130. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  131. package/build/components/block-styles/index.js +20 -17
  132. package/build/components/block-styles/index.js.map +1 -1
  133. package/build/components/block-styles/index.native.js +6 -4
  134. package/build/components/block-styles/index.native.js.map +1 -1
  135. package/build/components/block-styles/preview.native.js +9 -8
  136. package/build/components/block-styles/preview.native.js.map +1 -1
  137. package/build/components/block-switcher/block-styles-menu.js +5 -4
  138. package/build/components/block-switcher/block-styles-menu.js.map +1 -1
  139. package/build/components/block-switcher/block-transformations-menu.js +7 -6
  140. package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
  141. package/build/components/block-switcher/block-transformations-menu.native.js +9 -8
  142. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  143. package/build/components/block-switcher/index.js +42 -34
  144. package/build/components/block-switcher/index.js.map +1 -1
  145. package/build/components/block-switcher/pattern-transformations-menu.js +22 -18
  146. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  147. package/build/components/block-switcher/preview-block-popover.js +4 -3
  148. package/build/components/block-switcher/preview-block-popover.js.map +1 -1
  149. package/build/components/block-switcher/use-transformed-patterns.js +1 -1
  150. package/build/components/block-switcher/utils.js +2 -1
  151. package/build/components/block-switcher/utils.js.map +1 -1
  152. package/build/components/block-title/index.js +4 -3
  153. package/build/components/block-title/index.js.map +1 -1
  154. package/build/components/block-toolbar/index.js +4 -3
  155. package/build/components/block-toolbar/index.js.map +1 -1
  156. package/build/components/block-toolbar/utils.js +13 -11
  157. package/build/components/block-toolbar/utils.js.map +1 -1
  158. package/build/components/block-tools/back-compat.js +8 -5
  159. package/build/components/block-tools/back-compat.js.map +1 -1
  160. package/build/components/block-tools/block-contextual-toolbar.js +6 -5
  161. package/build/components/block-tools/block-contextual-toolbar.js.map +1 -1
  162. package/build/components/block-tools/block-popover.js +15 -13
  163. package/build/components/block-tools/block-popover.js.map +1 -1
  164. package/build/components/block-tools/block-selection-button.js +6 -5
  165. package/build/components/block-tools/block-selection-button.js.map +1 -1
  166. package/build/components/block-tools/index.js +6 -5
  167. package/build/components/block-tools/index.js.map +1 -1
  168. package/build/components/block-tools/insertion-point.js +12 -10
  169. package/build/components/block-tools/insertion-point.js.map +1 -1
  170. package/build/components/block-types-list/index.js +9 -8
  171. package/build/components/block-types-list/index.js.map +1 -1
  172. package/build/components/block-types-list/index.native.js +19 -15
  173. package/build/components/block-types-list/index.native.js.map +1 -1
  174. package/build/components/block-variation-picker/index.js +9 -8
  175. package/build/components/block-variation-picker/index.js.map +1 -1
  176. package/build/components/block-variation-picker/index.native.js +9 -7
  177. package/build/components/block-variation-picker/index.native.js.map +1 -1
  178. package/build/components/block-variation-transforms/index.js +22 -15
  179. package/build/components/block-variation-transforms/index.js.map +1 -1
  180. package/build/components/block-vertical-alignment-control/ui.js +9 -7
  181. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  182. package/build/components/border-radius-control/all-input-control.js +6 -5
  183. package/build/components/border-radius-control/all-input-control.js.map +1 -1
  184. package/build/components/border-radius-control/index.js +5 -4
  185. package/build/components/border-radius-control/index.js.map +1 -1
  186. package/build/components/border-radius-control/input-controls.js +16 -11
  187. package/build/components/border-radius-control/input-controls.js.map +1 -1
  188. package/build/components/border-radius-control/linked-button.js +5 -4
  189. package/build/components/border-radius-control/linked-button.js.map +1 -1
  190. package/build/components/border-radius-control/utils.js +10 -5
  191. package/build/components/border-radius-control/utils.js.map +1 -1
  192. package/build/components/border-style-control/index.js +5 -4
  193. package/build/components/border-style-control/index.js.map +1 -1
  194. package/build/components/button-block-appender/index.js +15 -13
  195. package/build/components/button-block-appender/index.js.map +1 -1
  196. package/build/components/button-block-appender/index.native.js +28 -24
  197. package/build/components/button-block-appender/index.native.js.map +1 -1
  198. package/build/components/caption/index.native.js +44 -41
  199. package/build/components/caption/index.native.js.map +1 -1
  200. package/build/components/color-palette/control.js +6 -5
  201. package/build/components/color-palette/control.js.map +1 -1
  202. package/build/components/color-style-selector/index.js +43 -34
  203. package/build/components/color-style-selector/index.js.map +1 -1
  204. package/build/components/colors/color-panel.js +21 -18
  205. package/build/components/colors/color-panel.js.map +1 -1
  206. package/build/components/colors/index.js +10 -8
  207. package/build/components/colors/index.js.map +1 -1
  208. package/build/components/colors/utils.js +7 -4
  209. package/build/components/colors/utils.js.map +1 -1
  210. package/build/components/colors/with-colors.js +17 -6
  211. package/build/components/colors/with-colors.js.map +1 -1
  212. package/build/components/colors-gradients/control.js +21 -59
  213. package/build/components/colors-gradients/control.js.map +1 -1
  214. package/build/components/colors-gradients/panel-color-gradient-settings.js +110 -30
  215. package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  216. package/build/components/colors-gradients/panel-color-gradient-settings.native.js +28 -24
  217. package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  218. package/build/components/contrast-checker/index.js +18 -15
  219. package/build/components/contrast-checker/index.js.map +1 -1
  220. package/build/components/convert-to-group-buttons/index.js +9 -8
  221. package/build/components/convert-to-group-buttons/index.js.map +1 -1
  222. package/build/components/copy-handler/index.js +6 -5
  223. package/build/components/copy-handler/index.js.map +1 -1
  224. package/build/components/default-block-appender/index.js +10 -8
  225. package/build/components/default-block-appender/index.js.map +1 -1
  226. package/build/components/default-block-appender/index.native.js +10 -8
  227. package/build/components/default-block-appender/index.native.js.map +1 -1
  228. package/build/components/default-style-picker/index.js +14 -10
  229. package/build/components/default-style-picker/index.js.map +1 -1
  230. package/build/components/duotone-control/index.js +20 -14
  231. package/build/components/duotone-control/index.js.map +1 -1
  232. package/build/components/editable-text/index.js +6 -5
  233. package/build/components/editable-text/index.js.map +1 -1
  234. package/build/components/editor-styles/index.js +4 -3
  235. package/build/components/editor-styles/index.js.map +1 -1
  236. package/build/components/floating-toolbar/index.native.js +8 -7
  237. package/build/components/floating-toolbar/index.native.js.map +1 -1
  238. package/build/components/font-appearance-control/index.js +53 -34
  239. package/build/components/font-appearance-control/index.js.map +1 -1
  240. package/build/components/font-family/index.js +12 -10
  241. package/build/components/font-family/index.js.map +1 -1
  242. package/build/components/font-sizes/index.js +6 -6
  243. package/build/components/font-sizes/index.native.js +6 -6
  244. package/build/components/font-sizes/utils.js +2 -2
  245. package/build/components/font-sizes/with-font-sizes.js +11 -5
  246. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  247. package/build/components/gradients/use-gradient.js +7 -6
  248. package/build/components/gradients/use-gradient.js.map +1 -1
  249. package/build/components/iframe/index.js +29 -23
  250. package/build/components/iframe/index.js.map +1 -1
  251. package/build/components/image-editor/aspect-ratio-dropdown.js +90 -82
  252. package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  253. package/build/components/image-editor/constants.js +1 -1
  254. package/build/components/image-editor/context.js +11 -10
  255. package/build/components/image-editor/context.js.map +1 -1
  256. package/build/components/image-editor/cropper.js +9 -8
  257. package/build/components/image-editor/cropper.js.map +1 -1
  258. package/build/components/image-editor/index.js +10 -9
  259. package/build/components/image-editor/index.js.map +1 -1
  260. package/build/components/image-editor/use-save-image.js +12 -11
  261. package/build/components/image-editor/use-save-image.js.map +1 -1
  262. package/build/components/image-editor/use-transform-image.js +6 -5
  263. package/build/components/image-editor/use-transform-image.js.map +1 -1
  264. package/build/components/image-editor/zoom-dropdown.js +13 -10
  265. package/build/components/image-editor/zoom-dropdown.js.map +1 -1
  266. package/build/components/image-size-control/index.js +12 -11
  267. package/build/components/image-size-control/index.js.map +1 -1
  268. package/build/components/index.js +217 -197
  269. package/build/components/index.js.map +1 -1
  270. package/build/components/index.native.js +113 -111
  271. package/build/components/index.native.js.map +1 -1
  272. package/build/components/inner-blocks/button-block-appender.js +8 -7
  273. package/build/components/inner-blocks/button-block-appender.js.map +1 -1
  274. package/build/components/inner-blocks/default-block-appender.js +9 -7
  275. package/build/components/inner-blocks/default-block-appender.js.map +1 -1
  276. package/build/components/inner-blocks/index.js +9 -6
  277. package/build/components/inner-blocks/index.js.map +1 -1
  278. package/build/components/inner-blocks/index.native.js +8 -5
  279. package/build/components/inner-blocks/index.native.js.map +1 -1
  280. package/build/components/inserter/block-patterns-explorer/explorer.js +64 -0
  281. package/build/components/inserter/block-patterns-explorer/explorer.js.map +1 -0
  282. package/build/components/inserter/block-patterns-explorer/patterns-list.js +114 -0
  283. package/build/components/inserter/block-patterns-explorer/patterns-list.js.map +1 -0
  284. package/build/components/inserter/block-patterns-explorer/sidebar.js +82 -0
  285. package/build/components/inserter/block-patterns-explorer/sidebar.js.map +1 -0
  286. package/build/components/inserter/block-patterns-tab.js +92 -57
  287. package/build/components/inserter/block-patterns-tab.js.map +1 -1
  288. package/build/components/inserter/block-types-tab.js +9 -7
  289. package/build/components/inserter/block-types-tab.js.map +1 -1
  290. package/build/components/inserter/block-types-tab.native.js +9 -8
  291. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  292. package/build/components/inserter/hooks/use-block-type-impressions.native.js +9 -10
  293. package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  294. package/build/components/inserter/hooks/use-block-types-state.js +6 -5
  295. package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
  296. package/build/components/inserter/hooks/use-insertion-point.js +11 -9
  297. package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
  298. package/build/components/inserter/index.js +36 -28
  299. package/build/components/inserter/index.js.map +1 -1
  300. package/build/components/inserter/index.native.js +46 -37
  301. package/build/components/inserter/index.native.js.map +1 -1
  302. package/build/components/inserter/library.js +12 -11
  303. package/build/components/inserter/library.js.map +1 -1
  304. package/build/components/inserter/menu.js +12 -11
  305. package/build/components/inserter/menu.js.map +1 -1
  306. package/build/components/inserter/menu.native.js +31 -27
  307. package/build/components/inserter/menu.native.js.map +1 -1
  308. package/build/components/inserter/panel.js +6 -5
  309. package/build/components/inserter/panel.js.map +1 -1
  310. package/build/components/inserter/pattern-panel.js +25 -15
  311. package/build/components/inserter/pattern-panel.js.map +1 -1
  312. package/build/components/inserter/preview-panel.js +4 -3
  313. package/build/components/inserter/preview-panel.js.map +1 -1
  314. package/build/components/inserter/quick-inserter.js +7 -6
  315. package/build/components/inserter/quick-inserter.js.map +1 -1
  316. package/build/components/inserter/reusable-blocks-tab.js +18 -13
  317. package/build/components/inserter/reusable-blocks-tab.js.map +1 -1
  318. package/build/components/inserter/reusable-blocks-tab.native.js +6 -5
  319. package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  320. package/build/components/inserter/search-items.js +23 -7
  321. package/build/components/inserter/search-items.js.map +1 -1
  322. package/build/components/inserter/search-results.js +15 -14
  323. package/build/components/inserter/search-results.js.map +1 -1
  324. package/build/components/inserter/search-results.native.js +11 -10
  325. package/build/components/inserter/search-results.native.js.map +1 -1
  326. package/build/components/inserter/tabs.js +7 -6
  327. package/build/components/inserter/tabs.js.map +1 -1
  328. package/build/components/inserter/tabs.native.js +55 -37
  329. package/build/components/inserter/tabs.native.js.map +1 -1
  330. package/build/components/inserter/utils.native.js +10 -8
  331. package/build/components/inserter/utils.native.js.map +1 -1
  332. package/build/components/inserter-draggable-blocks/index.js +12 -10
  333. package/build/components/inserter-draggable-blocks/index.js.map +1 -1
  334. package/build/components/inserter-list-item/index.js +79 -73
  335. package/build/components/inserter-list-item/index.js.map +1 -1
  336. package/build/components/inserter-listbox/index.js +8 -7
  337. package/build/components/inserter-listbox/index.js.map +1 -1
  338. package/build/components/inserter-listbox/item.js +7 -6
  339. package/build/components/inserter-listbox/item.js.map +1 -1
  340. package/build/components/inspector-controls/block-support-slot-container.js +5 -4
  341. package/build/components/inspector-controls/block-support-slot-container.js.map +1 -1
  342. package/build/components/inspector-controls/block-support-tools-panel.js +8 -6
  343. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  344. package/build/components/inspector-controls/fill.js +5 -4
  345. package/build/components/inspector-controls/fill.js.map +1 -1
  346. package/build/components/inspector-controls/fill.native.js +6 -5
  347. package/build/components/inspector-controls/fill.native.js.map +1 -1
  348. package/build/components/inspector-controls/groups.js +3 -1
  349. package/build/components/inspector-controls/groups.js.map +1 -1
  350. package/build/components/inspector-controls/slot.js +7 -6
  351. package/build/components/inspector-controls/slot.js.map +1 -1
  352. package/build/components/inspector-controls/slot.native.js +5 -4
  353. package/build/components/inspector-controls/slot.native.js.map +1 -1
  354. package/build/components/justify-content-control/ui.js +10 -8
  355. package/build/components/justify-content-control/ui.js.map +1 -1
  356. package/build/components/letter-spacing-control/index.js +13 -9
  357. package/build/components/letter-spacing-control/index.js.map +1 -1
  358. package/build/components/line-height-control/index.js +5 -4
  359. package/build/components/line-height-control/index.js.map +1 -1
  360. package/build/components/line-height-control/index.native.js +5 -4
  361. package/build/components/line-height-control/index.native.js.map +1 -1
  362. package/build/components/line-height-control/utils.js +1 -1
  363. package/build/components/link-control/index.js +107 -52
  364. package/build/components/link-control/index.js.map +1 -1
  365. package/build/components/link-control/link-preview.js +24 -10
  366. package/build/components/link-control/link-preview.js.map +1 -1
  367. package/build/components/link-control/search-create-button.js +9 -7
  368. package/build/components/link-control/search-create-button.js.map +1 -1
  369. package/build/components/link-control/search-input.js +31 -21
  370. package/build/components/link-control/search-input.js.map +1 -1
  371. package/build/components/link-control/search-item.js +10 -9
  372. package/build/components/link-control/search-item.js.map +1 -1
  373. package/build/components/link-control/search-results.js +15 -14
  374. package/build/components/link-control/search-results.js.map +1 -1
  375. package/build/components/link-control/settings-drawer.js +7 -5
  376. package/build/components/link-control/settings-drawer.js.map +1 -1
  377. package/build/components/link-control/use-search-handler.js +5 -4
  378. package/build/components/link-control/use-search-handler.js.map +1 -1
  379. package/build/components/link-control/viewer-slot.js +1 -1
  380. package/build/components/list-view/appender.js +27 -23
  381. package/build/components/list-view/appender.js.map +1 -1
  382. package/build/components/list-view/block-contents.js +32 -28
  383. package/build/components/list-view/block-contents.js.map +1 -1
  384. package/build/components/list-view/block-select-button.js +18 -17
  385. package/build/components/list-view/block-select-button.js.map +1 -1
  386. package/build/components/list-view/block.js +122 -83
  387. package/build/components/list-view/block.js.map +1 -1
  388. package/build/components/list-view/branch.js +92 -73
  389. package/build/components/list-view/branch.js.map +1 -1
  390. package/build/components/list-view/drop-indicator.js +5 -4
  391. package/build/components/list-view/drop-indicator.js.map +1 -1
  392. package/build/components/list-view/expander.js +4 -3
  393. package/build/components/list-view/expander.js.map +1 -1
  394. package/build/components/list-view/index.js +47 -23
  395. package/build/components/list-view/index.js.map +1 -1
  396. package/build/components/list-view/leaf.js +12 -11
  397. package/build/components/list-view/leaf.js.map +1 -1
  398. package/build/components/list-view/list-item.js +8 -7
  399. package/build/components/list-view/list-item.js.map +1 -1
  400. package/build/components/list-view/use-list-view-client-ids.js +8 -58
  401. package/build/components/list-view/use-list-view-client-ids.js.map +1 -1
  402. package/build/components/media-placeholder/index.js +86 -68
  403. package/build/components/media-placeholder/index.js.map +1 -1
  404. package/build/components/media-placeholder/index.native.js +5 -4
  405. package/build/components/media-placeholder/index.native.js.map +1 -1
  406. package/build/components/media-replace-flow/index.js +85 -72
  407. package/build/components/media-replace-flow/index.js.map +1 -1
  408. package/build/components/media-upload/check.js +5 -4
  409. package/build/components/media-upload/check.js.map +1 -1
  410. package/build/components/media-upload/index.native.js +1 -1
  411. package/build/components/media-upload-progress/index.native.js +1 -1
  412. package/build/components/multi-selection-inspector/index.js +4 -3
  413. package/build/components/multi-selection-inspector/index.js.map +1 -1
  414. package/build/components/navigable-toolbar/index.js +8 -7
  415. package/build/components/navigable-toolbar/index.js.map +1 -1
  416. package/build/components/observe-typing/index.js +5 -4
  417. package/build/components/observe-typing/index.js.map +1 -1
  418. package/build/components/panel-color-settings/index.js +16 -12
  419. package/build/components/panel-color-settings/index.js.map +1 -1
  420. package/build/components/plain-text/index.js +6 -4
  421. package/build/components/plain-text/index.js.map +1 -1
  422. package/build/components/preview-options/index.js +8 -7
  423. package/build/components/preview-options/index.js.map +1 -1
  424. package/build/components/provider/block-refs-provider.js +5 -4
  425. package/build/components/provider/block-refs-provider.js.map +1 -1
  426. package/build/components/provider/use-block-sync.js +8 -7
  427. package/build/components/provider/use-block-sync.js.map +1 -1
  428. package/build/components/provider/with-registry-provider.js +7 -5
  429. package/build/components/provider/with-registry-provider.js.map +1 -1
  430. package/build/components/responsive-block-control/label.js +6 -5
  431. package/build/components/responsive-block-control/label.js.map +1 -1
  432. package/build/components/rich-text/embed-handler-picker.native.js +8 -5
  433. package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
  434. package/build/components/rich-text/file-paste-handler.js +6 -3
  435. package/build/components/rich-text/file-paste-handler.js.map +1 -1
  436. package/build/components/rich-text/format-edit.js +36 -9
  437. package/build/components/rich-text/format-edit.js.map +1 -1
  438. package/build/components/rich-text/format-toolbar/index.js +20 -10
  439. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  440. package/build/components/rich-text/format-toolbar-container.js +6 -4
  441. package/build/components/rich-text/format-toolbar-container.js.map +1 -1
  442. package/build/components/rich-text/index.js +45 -41
  443. package/build/components/rich-text/index.js.map +1 -1
  444. package/build/components/rich-text/index.native.js +145 -122
  445. package/build/components/rich-text/index.native.js.map +1 -1
  446. package/build/components/rich-text/input-event.js +5 -4
  447. package/build/components/rich-text/input-event.js.map +1 -1
  448. package/build/components/rich-text/shortcut.js +6 -5
  449. package/build/components/rich-text/shortcut.js.map +1 -1
  450. package/build/components/rich-text/split-value.js +10 -8
  451. package/build/components/rich-text/split-value.js.map +1 -1
  452. package/build/components/rich-text/toolbar-button.js +7 -6
  453. package/build/components/rich-text/toolbar-button.js.map +1 -1
  454. package/build/components/rich-text/use-caret-in-format.js +4 -3
  455. package/build/components/rich-text/use-caret-in-format.js.map +1 -1
  456. package/build/components/rich-text/use-enter.js +6 -3
  457. package/build/components/rich-text/use-enter.js.map +1 -1
  458. package/build/components/rich-text/use-format-types.js +13 -10
  459. package/build/components/rich-text/use-format-types.js.map +1 -1
  460. package/build/components/rich-text/use-input-rules.js +15 -9
  461. package/build/components/rich-text/use-input-rules.js.map +1 -1
  462. package/build/components/rich-text/use-mark-persistent.js +5 -4
  463. package/build/components/rich-text/use-mark-persistent.js.map +1 -1
  464. package/build/components/rich-text/use-paste-handler.js +28 -4
  465. package/build/components/rich-text/use-paste-handler.js.map +1 -1
  466. package/build/components/rich-text/utils.js +9 -7
  467. package/build/components/rich-text/utils.js.map +1 -1
  468. package/build/components/skip-to-selected-block/index.js +4 -3
  469. package/build/components/skip-to-selected-block/index.js.map +1 -1
  470. package/build/components/text-decoration-control/index.js +5 -4
  471. package/build/components/text-decoration-control/index.js.map +1 -1
  472. package/build/components/text-transform-control/index.js +5 -4
  473. package/build/components/text-transform-control/index.js.map +1 -1
  474. package/build/components/tool-selector/index.js +16 -13
  475. package/build/components/tool-selector/index.js.map +1 -1
  476. package/build/components/typewriter/index.js +10 -7
  477. package/build/components/typewriter/index.js.map +1 -1
  478. package/build/components/ungroup-button/index.native.js +12 -9
  479. package/build/components/ungroup-button/index.native.js.map +1 -1
  480. package/build/components/unit-control/index.js +5 -4
  481. package/build/components/unit-control/index.js.map +1 -1
  482. package/build/components/url-input/index.js +23 -13
  483. package/build/components/url-input/index.js.map +1 -1
  484. package/build/components/url-input/index.native.js +8 -6
  485. package/build/components/url-input/index.native.js.map +1 -1
  486. package/build/components/url-popover/image-url-input-ui.js +12 -11
  487. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  488. package/build/components/url-popover/index.js +9 -8
  489. package/build/components/url-popover/index.js.map +1 -1
  490. package/build/components/url-popover/link-editor.js +8 -7
  491. package/build/components/url-popover/link-editor.js.map +1 -1
  492. package/build/components/url-popover/link-viewer-url.js +6 -5
  493. package/build/components/url-popover/link-viewer-url.js.map +1 -1
  494. package/build/components/url-popover/link-viewer.js +9 -8
  495. package/build/components/url-popover/link-viewer.js.map +1 -1
  496. package/build/components/use-block-drop-zone/index.js +9 -8
  497. package/build/components/use-block-drop-zone/index.js.map +1 -1
  498. package/build/components/use-moving-animation/index.js +17 -13
  499. package/build/components/use-moving-animation/index.js.map +1 -1
  500. package/build/components/use-no-recursive-renders/index.js +10 -6
  501. package/build/components/use-no-recursive-renders/index.js.map +1 -1
  502. package/build/components/use-on-block-drop/index.js +2 -2
  503. package/build/components/use-setting/index.js +48 -9
  504. package/build/components/use-setting/index.js.map +1 -1
  505. package/build/components/warning/index.js +7 -6
  506. package/build/components/warning/index.js.map +1 -1
  507. package/build/components/warning/index.native.js +10 -9
  508. package/build/components/warning/index.native.js.map +1 -1
  509. package/build/components/writing-flow/index.js +6 -5
  510. package/build/components/writing-flow/index.js.map +1 -1
  511. package/build/components/writing-flow/use-arrow-nav.js +2 -2
  512. package/build/hooks/align.js +12 -7
  513. package/build/hooks/align.js.map +1 -1
  514. package/build/hooks/border.js +9 -7
  515. package/build/hooks/border.js.map +1 -1
  516. package/build/hooks/color-panel.js +9 -7
  517. package/build/hooks/color-panel.js.map +1 -1
  518. package/build/hooks/color.js +4 -3
  519. package/build/hooks/color.js.map +1 -1
  520. package/build/hooks/dimensions.js +4 -2
  521. package/build/hooks/dimensions.js.map +1 -1
  522. package/build/hooks/duotone.js +29 -15
  523. package/build/hooks/duotone.js.map +1 -1
  524. package/build/hooks/font-appearance.js +60 -14
  525. package/build/hooks/font-appearance.js.map +1 -1
  526. package/build/hooks/font-family.js +62 -32
  527. package/build/hooks/font-family.js.map +1 -1
  528. package/build/hooks/font-size.js +57 -13
  529. package/build/hooks/font-size.js.map +1 -1
  530. package/build/hooks/gap.js +10 -8
  531. package/build/hooks/gap.js.map +1 -1
  532. package/build/hooks/index.js +16 -8
  533. package/build/hooks/index.js.map +1 -1
  534. package/build/hooks/index.native.js +16 -8
  535. package/build/hooks/index.native.js.map +1 -1
  536. package/build/hooks/layout.js +16 -13
  537. package/build/hooks/layout.js.map +1 -1
  538. package/build/hooks/letter-spacing.js +50 -11
  539. package/build/hooks/letter-spacing.js.map +1 -1
  540. package/build/hooks/line-height.js +51 -12
  541. package/build/hooks/line-height.js.map +1 -1
  542. package/build/hooks/margin.js +11 -9
  543. package/build/hooks/margin.js.map +1 -1
  544. package/build/hooks/padding.js +11 -9
  545. package/build/hooks/padding.js.map +1 -1
  546. package/build/hooks/style.js +9 -5
  547. package/build/hooks/style.js.map +1 -1
  548. package/build/hooks/text-decoration.js +48 -10
  549. package/build/hooks/text-decoration.js.map +1 -1
  550. package/build/hooks/text-transform.js +48 -10
  551. package/build/hooks/text-transform.js.map +1 -1
  552. package/build/hooks/typography.js +111 -10
  553. package/build/hooks/typography.js.map +1 -1
  554. package/build/hooks/typography.native.js +3 -2
  555. package/build/hooks/typography.native.js.map +1 -1
  556. package/build/hooks/use-border-props.js +5 -4
  557. package/build/hooks/use-border-props.js.map +1 -1
  558. package/build/hooks/use-cached-truthy.js +29 -0
  559. package/build/hooks/use-cached-truthy.js.map +1 -0
  560. package/build/index.js +21 -14
  561. package/build/index.js.map +1 -1
  562. package/build/layouts/flex.js +172 -52
  563. package/build/layouts/flex.js.map +1 -1
  564. package/build/layouts/flow.js +10 -8
  565. package/build/layouts/flow.js.map +1 -1
  566. package/build/layouts/index.js +2 -1
  567. package/build/layouts/index.js.map +1 -1
  568. package/build/layouts/utils.js +2 -1
  569. package/build/layouts/utils.js.map +1 -1
  570. package/build/store/actions.js +486 -369
  571. package/build/store/actions.js.map +1 -1
  572. package/build/store/array.js +2 -1
  573. package/build/store/array.js.map +1 -1
  574. package/build/store/index.js +6 -6
  575. package/build/store/index.js.map +1 -1
  576. package/build/store/reducer.js +145 -69
  577. package/build/store/reducer.js.map +1 -1
  578. package/build/store/selectors.js +259 -172
  579. package/build/store/selectors.js.map +1 -1
  580. package/build/utils/block-variation-transforms.js +4 -3
  581. package/build/utils/block-variation-transforms.js.map +1 -1
  582. package/build/utils/dom.js +1 -1
  583. package/build/utils/get-paste-event-data.js +10 -6
  584. package/build/utils/get-paste-event-data.js.map +1 -1
  585. package/build/utils/index.js +4 -4
  586. package/build/utils/math.js +2 -1
  587. package/build/utils/math.js.map +1 -1
  588. package/build/utils/parse-css-unit-to-px.js +6 -3
  589. package/build/utils/parse-css-unit-to-px.js.map +1 -1
  590. package/build/utils/transform-styles/index.js +8 -6
  591. package/build/utils/transform-styles/index.js.map +1 -1
  592. package/build/utils/transform-styles/transforms/wrap.js +31 -28
  593. package/build/utils/transform-styles/transforms/wrap.js.map +1 -1
  594. package/build-module/components/alignment-control/ui.js +12 -11
  595. package/build-module/components/alignment-control/ui.js.map +1 -1
  596. package/build-module/components/autocomplete/index.js +4 -3
  597. package/build-module/components/autocomplete/index.js.map +1 -1
  598. package/build-module/components/block-actions/index.js +12 -8
  599. package/build-module/components/block-actions/index.js.map +1 -1
  600. package/build-module/components/block-alignment-control/ui.js +21 -17
  601. package/build-module/components/block-alignment-control/ui.js.map +1 -1
  602. package/build-module/components/block-alignment-control/use-available-alignments.js +9 -4
  603. package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
  604. package/build-module/components/block-alignment-matrix-control/index.js +6 -4
  605. package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
  606. package/build-module/components/block-breadcrumb/index.js +4 -3
  607. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  608. package/build-module/components/block-caption/index.native.js +34 -29
  609. package/build-module/components/block-caption/index.native.js.map +1 -1
  610. package/build-module/components/block-card/index.js +8 -6
  611. package/build-module/components/block-card/index.js.map +1 -1
  612. package/build-module/components/block-compare/block-view.js +9 -8
  613. package/build-module/components/block-compare/block-view.js.map +1 -1
  614. package/build-module/components/block-compare/index.js +9 -7
  615. package/build-module/components/block-compare/index.js.map +1 -1
  616. package/build-module/components/block-content-overlay/index.js +7 -6
  617. package/build-module/components/block-content-overlay/index.js.map +1 -1
  618. package/build-module/components/block-context/index.js +5 -4
  619. package/build-module/components/block-context/index.js.map +1 -1
  620. package/build-module/components/block-controls/fill.js +7 -6
  621. package/build-module/components/block-controls/fill.js.map +1 -1
  622. package/build-module/components/block-controls/slot.js +5 -4
  623. package/build-module/components/block-controls/slot.js.map +1 -1
  624. package/build-module/components/block-controls/slot.native.js +5 -4
  625. package/build-module/components/block-controls/slot.native.js.map +1 -1
  626. package/build-module/components/block-draggable/draggable-chip.js +5 -4
  627. package/build-module/components/block-draggable/draggable-chip.js.map +1 -1
  628. package/build-module/components/block-draggable/index.js +13 -11
  629. package/build-module/components/block-draggable/index.js.map +1 -1
  630. package/build-module/components/block-full-height-alignment-control/index.js +7 -6
  631. package/build-module/components/block-full-height-alignment-control/index.js.map +1 -1
  632. package/build-module/components/block-icon/index.js +11 -5
  633. package/build-module/components/block-icon/index.js.map +1 -1
  634. package/build-module/components/block-icon/index.native.js +8 -6
  635. package/build-module/components/block-icon/index.native.js.map +1 -1
  636. package/build-module/components/block-inspector/index.js +20 -13
  637. package/build-module/components/block-inspector/index.js.map +1 -1
  638. package/build-module/components/block-list/block-html.js +4 -3
  639. package/build-module/components/block-list/block-html.js.map +1 -1
  640. package/build-module/components/block-list/block-invalid-warning.js +27 -19
  641. package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
  642. package/build-module/components/block-list/block-invalid-warning.native.js +5 -4
  643. package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
  644. package/build-module/components/block-list/block-list-item.native.js +6 -5
  645. package/build-module/components/block-list/block-list-item.native.js.map +1 -1
  646. package/build-module/components/block-list/block-selection-button.native.js +11 -9
  647. package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
  648. package/build-module/components/block-list/block.js +40 -33
  649. package/build-module/components/block-list/block.js.map +1 -1
  650. package/build-module/components/block-list/block.native.js +35 -29
  651. package/build-module/components/block-list/block.native.js.map +1 -1
  652. package/build-module/components/block-list/index.js +13 -11
  653. package/build-module/components/block-list/index.js.map +1 -1
  654. package/build-module/components/block-list/index.native.js +22 -17
  655. package/build-module/components/block-list/index.native.js.map +1 -1
  656. package/build-module/components/block-list/insertion-point.native.js +4 -3
  657. package/build-module/components/block-list/insertion-point.native.js.map +1 -1
  658. package/build-module/components/block-list/layout.js +5 -4
  659. package/build-module/components/block-list/layout.js.map +1 -1
  660. package/build-module/components/block-list/subdirectory-icon.js +13 -10
  661. package/build-module/components/block-list/subdirectory-icon.js.map +1 -1
  662. package/build-module/components/block-list/use-block-props/index.js +5 -3
  663. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  664. package/build-module/components/block-list/use-block-props/index.native.js +2 -1
  665. package/build-module/components/block-list/use-block-props/index.native.js.map +1 -1
  666. package/build-module/components/block-list/use-block-props/use-multi-selection.js +30 -14
  667. package/build-module/components/block-list/use-block-props/use-multi-selection.js.map +1 -1
  668. package/build-module/components/block-list-appender/index.js +16 -13
  669. package/build-module/components/block-list-appender/index.js.map +1 -1
  670. package/build-module/components/block-list-appender/index.native.js +14 -11
  671. package/build-module/components/block-list-appender/index.native.js.map +1 -1
  672. package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js +46 -42
  673. package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
  674. package/build-module/components/block-mobile-toolbar/index.js +4 -3
  675. package/build-module/components/block-mobile-toolbar/index.js.map +1 -1
  676. package/build-module/components/block-mobile-toolbar/index.native.js +33 -25
  677. package/build-module/components/block-mobile-toolbar/index.native.js.map +1 -1
  678. package/build-module/components/block-mover/button.js +7 -6
  679. package/build-module/components/block-mover/button.js.map +1 -1
  680. package/build-module/components/block-mover/index.js +15 -13
  681. package/build-module/components/block-mover/index.js.map +1 -1
  682. package/build-module/components/block-mover/index.native.js +22 -19
  683. package/build-module/components/block-mover/index.native.js.map +1 -1
  684. package/build-module/components/block-mover/mover-description.native.js +10 -7
  685. package/build-module/components/block-mover/mover-description.native.js.map +1 -1
  686. package/build-module/components/block-navigation/dropdown.js +26 -22
  687. package/build-module/components/block-navigation/dropdown.js.map +1 -1
  688. package/build-module/components/block-pattern-setup/index.js +26 -22
  689. package/build-module/components/block-pattern-setup/index.js.map +1 -1
  690. package/build-module/components/block-pattern-setup/setup-toolbar.js +46 -39
  691. package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  692. package/build-module/components/block-patterns-list/index.js +45 -45
  693. package/build-module/components/block-patterns-list/index.js.map +1 -1
  694. package/build-module/components/block-preview/auto.js +5 -4
  695. package/build-module/components/block-preview/auto.js.map +1 -1
  696. package/build-module/components/block-preview/index.js +8 -7
  697. package/build-module/components/block-preview/index.js.map +1 -1
  698. package/build-module/components/block-preview/live.js +4 -3
  699. package/build-module/components/block-preview/live.js.map +1 -1
  700. package/build-module/components/block-settings/button.native.js +10 -7
  701. package/build-module/components/block-settings/button.native.js.map +1 -1
  702. package/build-module/components/block-settings/container.native.js +13 -9
  703. package/build-module/components/block-settings/container.native.js.map +1 -1
  704. package/build-module/components/block-settings-menu/block-convert-button.js +7 -5
  705. package/build-module/components/block-settings-menu/block-convert-button.js.map +1 -1
  706. package/build-module/components/block-settings-menu/block-html-convert-button.js +14 -10
  707. package/build-module/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  708. package/build-module/components/block-settings-menu/block-mode-toggle.js +25 -19
  709. package/build-module/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  710. package/build-module/components/block-settings-menu/block-settings-dropdown.js +98 -70
  711. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  712. package/build-module/components/block-settings-menu/index.js +5 -4
  713. package/build-module/components/block-settings-menu/index.js.map +1 -1
  714. package/build-module/components/block-settings-menu-controls/index.js +8 -6
  715. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  716. package/build-module/components/block-styles/index.js +20 -17
  717. package/build-module/components/block-styles/index.js.map +1 -1
  718. package/build-module/components/block-styles/index.native.js +6 -4
  719. package/build-module/components/block-styles/index.native.js.map +1 -1
  720. package/build-module/components/block-styles/preview.native.js +9 -8
  721. package/build-module/components/block-styles/preview.native.js.map +1 -1
  722. package/build-module/components/block-switcher/block-styles-menu.js +5 -4
  723. package/build-module/components/block-switcher/block-styles-menu.js.map +1 -1
  724. package/build-module/components/block-switcher/block-transformations-menu.js +7 -6
  725. package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
  726. package/build-module/components/block-switcher/block-transformations-menu.native.js +9 -8
  727. package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  728. package/build-module/components/block-switcher/index.js +41 -33
  729. package/build-module/components/block-switcher/index.js.map +1 -1
  730. package/build-module/components/block-switcher/pattern-transformations-menu.js +22 -18
  731. package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  732. package/build-module/components/block-switcher/preview-block-popover.js +4 -3
  733. package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
  734. package/build-module/components/block-switcher/utils.js +2 -1
  735. package/build-module/components/block-switcher/utils.js.map +1 -1
  736. package/build-module/components/block-title/index.js +4 -3
  737. package/build-module/components/block-title/index.js.map +1 -1
  738. package/build-module/components/block-toolbar/index.js +4 -3
  739. package/build-module/components/block-toolbar/index.js.map +1 -1
  740. package/build-module/components/block-toolbar/utils.js +13 -11
  741. package/build-module/components/block-toolbar/utils.js.map +1 -1
  742. package/build-module/components/block-tools/back-compat.js +4 -3
  743. package/build-module/components/block-tools/back-compat.js.map +1 -1
  744. package/build-module/components/block-tools/block-contextual-toolbar.js +6 -5
  745. package/build-module/components/block-tools/block-contextual-toolbar.js.map +1 -1
  746. package/build-module/components/block-tools/block-popover.js +15 -13
  747. package/build-module/components/block-tools/block-popover.js.map +1 -1
  748. package/build-module/components/block-tools/block-selection-button.js +6 -5
  749. package/build-module/components/block-tools/block-selection-button.js.map +1 -1
  750. package/build-module/components/block-tools/index.js +6 -5
  751. package/build-module/components/block-tools/index.js.map +1 -1
  752. package/build-module/components/block-tools/insertion-point.js +11 -9
  753. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  754. package/build-module/components/block-types-list/index.js +9 -8
  755. package/build-module/components/block-types-list/index.js.map +1 -1
  756. package/build-module/components/block-types-list/index.native.js +19 -15
  757. package/build-module/components/block-types-list/index.native.js.map +1 -1
  758. package/build-module/components/block-variation-picker/index.js +9 -8
  759. package/build-module/components/block-variation-picker/index.js.map +1 -1
  760. package/build-module/components/block-variation-picker/index.native.js +9 -7
  761. package/build-module/components/block-variation-picker/index.native.js.map +1 -1
  762. package/build-module/components/block-variation-transforms/index.js +22 -15
  763. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  764. package/build-module/components/block-vertical-alignment-control/ui.js +9 -7
  765. package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
  766. package/build-module/components/border-radius-control/all-input-control.js +6 -5
  767. package/build-module/components/border-radius-control/all-input-control.js.map +1 -1
  768. package/build-module/components/border-radius-control/index.js +5 -4
  769. package/build-module/components/border-radius-control/index.js.map +1 -1
  770. package/build-module/components/border-radius-control/input-controls.js +16 -11
  771. package/build-module/components/border-radius-control/input-controls.js.map +1 -1
  772. package/build-module/components/border-radius-control/linked-button.js +5 -4
  773. package/build-module/components/border-radius-control/linked-button.js.map +1 -1
  774. package/build-module/components/border-radius-control/utils.js +8 -3
  775. package/build-module/components/border-radius-control/utils.js.map +1 -1
  776. package/build-module/components/border-style-control/index.js +5 -4
  777. package/build-module/components/border-style-control/index.js.map +1 -1
  778. package/build-module/components/button-block-appender/index.js +15 -13
  779. package/build-module/components/button-block-appender/index.js.map +1 -1
  780. package/build-module/components/button-block-appender/index.native.js +28 -24
  781. package/build-module/components/button-block-appender/index.native.js.map +1 -1
  782. package/build-module/components/caption/index.native.js +44 -41
  783. package/build-module/components/caption/index.native.js.map +1 -1
  784. package/build-module/components/color-palette/control.js +6 -5
  785. package/build-module/components/color-palette/control.js.map +1 -1
  786. package/build-module/components/color-style-selector/index.js +43 -34
  787. package/build-module/components/color-style-selector/index.js.map +1 -1
  788. package/build-module/components/colors/color-panel.js +21 -18
  789. package/build-module/components/colors/color-panel.js.map +1 -1
  790. package/build-module/components/colors/utils.js +6 -3
  791. package/build-module/components/colors/utils.js.map +1 -1
  792. package/build-module/components/colors/with-colors.js +17 -6
  793. package/build-module/components/colors/with-colors.js.map +1 -1
  794. package/build-module/components/colors-gradients/control.js +25 -65
  795. package/build-module/components/colors-gradients/control.js.map +1 -1
  796. package/build-module/components/colors-gradients/panel-color-gradient-settings.js +111 -30
  797. package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  798. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js +28 -24
  799. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  800. package/build-module/components/contrast-checker/index.js +18 -15
  801. package/build-module/components/contrast-checker/index.js.map +1 -1
  802. package/build-module/components/convert-to-group-buttons/index.js +9 -8
  803. package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
  804. package/build-module/components/copy-handler/index.js +4 -3
  805. package/build-module/components/copy-handler/index.js.map +1 -1
  806. package/build-module/components/default-block-appender/index.js +10 -8
  807. package/build-module/components/default-block-appender/index.js.map +1 -1
  808. package/build-module/components/default-block-appender/index.native.js +10 -8
  809. package/build-module/components/default-block-appender/index.native.js.map +1 -1
  810. package/build-module/components/default-style-picker/index.js +14 -10
  811. package/build-module/components/default-style-picker/index.js.map +1 -1
  812. package/build-module/components/duotone-control/index.js +20 -14
  813. package/build-module/components/duotone-control/index.js.map +1 -1
  814. package/build-module/components/editable-text/index.js +6 -5
  815. package/build-module/components/editable-text/index.js.map +1 -1
  816. package/build-module/components/editor-styles/index.js +4 -3
  817. package/build-module/components/editor-styles/index.js.map +1 -1
  818. package/build-module/components/floating-toolbar/index.native.js +8 -7
  819. package/build-module/components/floating-toolbar/index.native.js.map +1 -1
  820. package/build-module/components/font-appearance-control/index.js +49 -34
  821. package/build-module/components/font-appearance-control/index.js.map +1 -1
  822. package/build-module/components/font-family/index.js +12 -10
  823. package/build-module/components/font-family/index.js.map +1 -1
  824. package/build-module/components/font-sizes/with-font-sizes.js +11 -5
  825. package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
  826. package/build-module/components/gradients/use-gradient.js +5 -4
  827. package/build-module/components/gradients/use-gradient.js.map +1 -1
  828. package/build-module/components/iframe/index.js +29 -23
  829. package/build-module/components/iframe/index.js.map +1 -1
  830. package/build-module/components/image-editor/aspect-ratio-dropdown.js +90 -82
  831. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  832. package/build-module/components/image-editor/context.js +11 -10
  833. package/build-module/components/image-editor/context.js.map +1 -1
  834. package/build-module/components/image-editor/cropper.js +9 -8
  835. package/build-module/components/image-editor/cropper.js.map +1 -1
  836. package/build-module/components/image-editor/index.js +9 -8
  837. package/build-module/components/image-editor/index.js.map +1 -1
  838. package/build-module/components/image-editor/use-save-image.js +12 -11
  839. package/build-module/components/image-editor/use-save-image.js.map +1 -1
  840. package/build-module/components/image-editor/use-transform-image.js +6 -5
  841. package/build-module/components/image-editor/use-transform-image.js.map +1 -1
  842. package/build-module/components/image-editor/zoom-dropdown.js +13 -10
  843. package/build-module/components/image-editor/zoom-dropdown.js.map +1 -1
  844. package/build-module/components/image-size-control/index.js +12 -11
  845. package/build-module/components/image-size-control/index.js.map +1 -1
  846. package/build-module/components/index.js +3 -1
  847. package/build-module/components/index.js.map +1 -1
  848. package/build-module/components/index.native.js +1 -1
  849. package/build-module/components/index.native.js.map +1 -1
  850. package/build-module/components/inner-blocks/button-block-appender.js +8 -7
  851. package/build-module/components/inner-blocks/button-block-appender.js.map +1 -1
  852. package/build-module/components/inner-blocks/default-block-appender.js +9 -7
  853. package/build-module/components/inner-blocks/default-block-appender.js.map +1 -1
  854. package/build-module/components/inner-blocks/index.js +9 -6
  855. package/build-module/components/inner-blocks/index.js.map +1 -1
  856. package/build-module/components/inner-blocks/index.native.js +8 -5
  857. package/build-module/components/inner-blocks/index.native.js.map +1 -1
  858. package/build-module/components/inserter/block-patterns-explorer/explorer.js +52 -0
  859. package/build-module/components/inserter/block-patterns-explorer/explorer.js.map +1 -0
  860. package/build-module/components/inserter/block-patterns-explorer/patterns-list.js +95 -0
  861. package/build-module/components/inserter/block-patterns-explorer/patterns-list.js.map +1 -0
  862. package/build-module/components/inserter/block-patterns-explorer/sidebar.js +73 -0
  863. package/build-module/components/inserter/block-patterns-explorer/sidebar.js.map +1 -0
  864. package/build-module/components/inserter/block-patterns-tab.js +93 -58
  865. package/build-module/components/inserter/block-patterns-tab.js.map +1 -1
  866. package/build-module/components/inserter/block-types-tab.js +9 -7
  867. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  868. package/build-module/components/inserter/block-types-tab.native.js +9 -8
  869. package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
  870. package/build-module/components/inserter/hooks/use-block-type-impressions.native.js +9 -10
  871. package/build-module/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  872. package/build-module/components/inserter/hooks/use-block-types-state.js +6 -5
  873. package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
  874. package/build-module/components/inserter/hooks/use-insertion-point.js +11 -9
  875. package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
  876. package/build-module/components/inserter/index.js +36 -28
  877. package/build-module/components/inserter/index.js.map +1 -1
  878. package/build-module/components/inserter/index.native.js +46 -37
  879. package/build-module/components/inserter/index.native.js.map +1 -1
  880. package/build-module/components/inserter/library.js +12 -11
  881. package/build-module/components/inserter/library.js.map +1 -1
  882. package/build-module/components/inserter/menu.js +12 -11
  883. package/build-module/components/inserter/menu.js.map +1 -1
  884. package/build-module/components/inserter/menu.native.js +31 -27
  885. package/build-module/components/inserter/menu.native.js.map +1 -1
  886. package/build-module/components/inserter/panel.js +6 -5
  887. package/build-module/components/inserter/panel.js.map +1 -1
  888. package/build-module/components/inserter/pattern-panel.js +27 -18
  889. package/build-module/components/inserter/pattern-panel.js.map +1 -1
  890. package/build-module/components/inserter/preview-panel.js +4 -3
  891. package/build-module/components/inserter/preview-panel.js.map +1 -1
  892. package/build-module/components/inserter/quick-inserter.js +7 -6
  893. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  894. package/build-module/components/inserter/reusable-blocks-tab.js +18 -13
  895. package/build-module/components/inserter/reusable-blocks-tab.js.map +1 -1
  896. package/build-module/components/inserter/reusable-blocks-tab.native.js +6 -5
  897. package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  898. package/build-module/components/inserter/search-items.js +23 -7
  899. package/build-module/components/inserter/search-items.js.map +1 -1
  900. package/build-module/components/inserter/search-results.js +15 -14
  901. package/build-module/components/inserter/search-results.js.map +1 -1
  902. package/build-module/components/inserter/search-results.native.js +11 -10
  903. package/build-module/components/inserter/search-results.native.js.map +1 -1
  904. package/build-module/components/inserter/tabs.js +7 -6
  905. package/build-module/components/inserter/tabs.js.map +1 -1
  906. package/build-module/components/inserter/tabs.native.js +55 -37
  907. package/build-module/components/inserter/tabs.native.js.map +1 -1
  908. package/build-module/components/inserter/utils.native.js +10 -8
  909. package/build-module/components/inserter/utils.native.js.map +1 -1
  910. package/build-module/components/inserter-draggable-blocks/index.js +12 -10
  911. package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
  912. package/build-module/components/inserter-list-item/index.js +75 -69
  913. package/build-module/components/inserter-list-item/index.js.map +1 -1
  914. package/build-module/components/inserter-listbox/index.js +4 -3
  915. package/build-module/components/inserter-listbox/index.js.map +1 -1
  916. package/build-module/components/inserter-listbox/item.js +7 -6
  917. package/build-module/components/inserter-listbox/item.js.map +1 -1
  918. package/build-module/components/inspector-controls/block-support-slot-container.js +5 -4
  919. package/build-module/components/inspector-controls/block-support-slot-container.js.map +1 -1
  920. package/build-module/components/inspector-controls/block-support-tools-panel.js +8 -6
  921. package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  922. package/build-module/components/inspector-controls/fill.js +5 -4
  923. package/build-module/components/inspector-controls/fill.js.map +1 -1
  924. package/build-module/components/inspector-controls/fill.native.js +6 -5
  925. package/build-module/components/inspector-controls/fill.native.js.map +1 -1
  926. package/build-module/components/inspector-controls/groups.js +3 -1
  927. package/build-module/components/inspector-controls/groups.js.map +1 -1
  928. package/build-module/components/inspector-controls/slot.js +7 -6
  929. package/build-module/components/inspector-controls/slot.js.map +1 -1
  930. package/build-module/components/inspector-controls/slot.native.js +5 -4
  931. package/build-module/components/inspector-controls/slot.native.js.map +1 -1
  932. package/build-module/components/justify-content-control/ui.js +10 -8
  933. package/build-module/components/justify-content-control/ui.js.map +1 -1
  934. package/build-module/components/letter-spacing-control/index.js +13 -9
  935. package/build-module/components/letter-spacing-control/index.js.map +1 -1
  936. package/build-module/components/line-height-control/index.js +5 -4
  937. package/build-module/components/line-height-control/index.js.map +1 -1
  938. package/build-module/components/line-height-control/index.native.js +5 -4
  939. package/build-module/components/line-height-control/index.native.js.map +1 -1
  940. package/build-module/components/link-control/index.js +107 -53
  941. package/build-module/components/link-control/index.js.map +1 -1
  942. package/build-module/components/link-control/link-preview.js +24 -11
  943. package/build-module/components/link-control/link-preview.js.map +1 -1
  944. package/build-module/components/link-control/search-create-button.js +9 -7
  945. package/build-module/components/link-control/search-create-button.js.map +1 -1
  946. package/build-module/components/link-control/search-input.js +30 -21
  947. package/build-module/components/link-control/search-input.js.map +1 -1
  948. package/build-module/components/link-control/search-item.js +10 -9
  949. package/build-module/components/link-control/search-item.js.map +1 -1
  950. package/build-module/components/link-control/search-results.js +15 -14
  951. package/build-module/components/link-control/search-results.js.map +1 -1
  952. package/build-module/components/link-control/settings-drawer.js +7 -5
  953. package/build-module/components/link-control/settings-drawer.js.map +1 -1
  954. package/build-module/components/link-control/use-search-handler.js +4 -3
  955. package/build-module/components/link-control/use-search-handler.js.map +1 -1
  956. package/build-module/components/list-view/appender.js +27 -23
  957. package/build-module/components/list-view/appender.js.map +1 -1
  958. package/build-module/components/list-view/block-contents.js +32 -28
  959. package/build-module/components/list-view/block-contents.js.map +1 -1
  960. package/build-module/components/list-view/block-select-button.js +18 -17
  961. package/build-module/components/list-view/block-select-button.js.map +1 -1
  962. package/build-module/components/list-view/block.js +121 -83
  963. package/build-module/components/list-view/block.js.map +1 -1
  964. package/build-module/components/list-view/branch.js +92 -73
  965. package/build-module/components/list-view/branch.js.map +1 -1
  966. package/build-module/components/list-view/drop-indicator.js +5 -4
  967. package/build-module/components/list-view/drop-indicator.js.map +1 -1
  968. package/build-module/components/list-view/expander.js +4 -3
  969. package/build-module/components/list-view/expander.js.map +1 -1
  970. package/build-module/components/list-view/index.js +49 -25
  971. package/build-module/components/list-view/index.js.map +1 -1
  972. package/build-module/components/list-view/leaf.js +12 -11
  973. package/build-module/components/list-view/leaf.js.map +1 -1
  974. package/build-module/components/list-view/list-item.js +8 -7
  975. package/build-module/components/list-view/list-item.js.map +1 -1
  976. package/build-module/components/list-view/use-list-view-client-ids.js +8 -58
  977. package/build-module/components/list-view/use-list-view-client-ids.js.map +1 -1
  978. package/build-module/components/media-placeholder/index.js +86 -68
  979. package/build-module/components/media-placeholder/index.js.map +1 -1
  980. package/build-module/components/media-placeholder/index.native.js +5 -4
  981. package/build-module/components/media-placeholder/index.native.js.map +1 -1
  982. package/build-module/components/media-replace-flow/index.js +85 -72
  983. package/build-module/components/media-replace-flow/index.js.map +1 -1
  984. package/build-module/components/media-upload/check.js +5 -4
  985. package/build-module/components/media-upload/check.js.map +1 -1
  986. package/build-module/components/multi-selection-inspector/index.js +4 -3
  987. package/build-module/components/multi-selection-inspector/index.js.map +1 -1
  988. package/build-module/components/navigable-toolbar/index.js +8 -7
  989. package/build-module/components/navigable-toolbar/index.js.map +1 -1
  990. package/build-module/components/observe-typing/index.js +4 -3
  991. package/build-module/components/observe-typing/index.js.map +1 -1
  992. package/build-module/components/panel-color-settings/index.js +16 -12
  993. package/build-module/components/panel-color-settings/index.js.map +1 -1
  994. package/build-module/components/plain-text/index.js +6 -4
  995. package/build-module/components/plain-text/index.js.map +1 -1
  996. package/build-module/components/preview-options/index.js +8 -7
  997. package/build-module/components/preview-options/index.js.map +1 -1
  998. package/build-module/components/provider/block-refs-provider.js +4 -3
  999. package/build-module/components/provider/block-refs-provider.js.map +1 -1
  1000. package/build-module/components/provider/use-block-sync.js +8 -7
  1001. package/build-module/components/provider/use-block-sync.js.map +1 -1
  1002. package/build-module/components/provider/with-registry-provider.js +7 -5
  1003. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  1004. package/build-module/components/responsive-block-control/label.js +6 -5
  1005. package/build-module/components/responsive-block-control/label.js.map +1 -1
  1006. package/build-module/components/rich-text/embed-handler-picker.native.js +8 -5
  1007. package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
  1008. package/build-module/components/rich-text/file-paste-handler.js +6 -3
  1009. package/build-module/components/rich-text/file-paste-handler.js.map +1 -1
  1010. package/build-module/components/rich-text/format-edit.js +36 -10
  1011. package/build-module/components/rich-text/format-edit.js.map +1 -1
  1012. package/build-module/components/rich-text/format-toolbar/index.js +20 -10
  1013. package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
  1014. package/build-module/components/rich-text/format-toolbar-container.js +6 -4
  1015. package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
  1016. package/build-module/components/rich-text/index.js +44 -40
  1017. package/build-module/components/rich-text/index.js.map +1 -1
  1018. package/build-module/components/rich-text/index.native.js +145 -122
  1019. package/build-module/components/rich-text/index.native.js.map +1 -1
  1020. package/build-module/components/rich-text/input-event.js +5 -4
  1021. package/build-module/components/rich-text/input-event.js.map +1 -1
  1022. package/build-module/components/rich-text/shortcut.js +6 -5
  1023. package/build-module/components/rich-text/shortcut.js.map +1 -1
  1024. package/build-module/components/rich-text/split-value.js +10 -8
  1025. package/build-module/components/rich-text/split-value.js.map +1 -1
  1026. package/build-module/components/rich-text/toolbar-button.js +7 -6
  1027. package/build-module/components/rich-text/toolbar-button.js.map +1 -1
  1028. package/build-module/components/rich-text/use-caret-in-format.js +4 -3
  1029. package/build-module/components/rich-text/use-caret-in-format.js.map +1 -1
  1030. package/build-module/components/rich-text/use-enter.js +6 -3
  1031. package/build-module/components/rich-text/use-enter.js.map +1 -1
  1032. package/build-module/components/rich-text/use-format-types.js +13 -10
  1033. package/build-module/components/rich-text/use-format-types.js.map +1 -1
  1034. package/build-module/components/rich-text/use-input-rules.js +15 -9
  1035. package/build-module/components/rich-text/use-input-rules.js.map +1 -1
  1036. package/build-module/components/rich-text/use-mark-persistent.js +5 -4
  1037. package/build-module/components/rich-text/use-mark-persistent.js.map +1 -1
  1038. package/build-module/components/rich-text/use-paste-handler.js +28 -4
  1039. package/build-module/components/rich-text/use-paste-handler.js.map +1 -1
  1040. package/build-module/components/rich-text/utils.js +7 -5
  1041. package/build-module/components/rich-text/utils.js.map +1 -1
  1042. package/build-module/components/skip-to-selected-block/index.js +4 -3
  1043. package/build-module/components/skip-to-selected-block/index.js.map +1 -1
  1044. package/build-module/components/text-decoration-control/index.js +5 -4
  1045. package/build-module/components/text-decoration-control/index.js.map +1 -1
  1046. package/build-module/components/text-transform-control/index.js +5 -4
  1047. package/build-module/components/text-transform-control/index.js.map +1 -1
  1048. package/build-module/components/tool-selector/index.js +16 -13
  1049. package/build-module/components/tool-selector/index.js.map +1 -1
  1050. package/build-module/components/typewriter/index.js +9 -6
  1051. package/build-module/components/typewriter/index.js.map +1 -1
  1052. package/build-module/components/ungroup-button/index.native.js +12 -9
  1053. package/build-module/components/ungroup-button/index.native.js.map +1 -1
  1054. package/build-module/components/unit-control/index.js +5 -4
  1055. package/build-module/components/unit-control/index.js.map +1 -1
  1056. package/build-module/components/url-input/index.js +23 -13
  1057. package/build-module/components/url-input/index.js.map +1 -1
  1058. package/build-module/components/url-input/index.native.js +8 -6
  1059. package/build-module/components/url-input/index.native.js.map +1 -1
  1060. package/build-module/components/url-popover/image-url-input-ui.js +12 -11
  1061. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  1062. package/build-module/components/url-popover/index.js +9 -8
  1063. package/build-module/components/url-popover/index.js.map +1 -1
  1064. package/build-module/components/url-popover/link-editor.js +8 -7
  1065. package/build-module/components/url-popover/link-editor.js.map +1 -1
  1066. package/build-module/components/url-popover/link-viewer-url.js +6 -5
  1067. package/build-module/components/url-popover/link-viewer-url.js.map +1 -1
  1068. package/build-module/components/url-popover/link-viewer.js +9 -8
  1069. package/build-module/components/url-popover/link-viewer.js.map +1 -1
  1070. package/build-module/components/use-block-drop-zone/index.js +8 -7
  1071. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  1072. package/build-module/components/use-moving-animation/index.js +17 -13
  1073. package/build-module/components/use-moving-animation/index.js.map +1 -1
  1074. package/build-module/components/use-no-recursive-renders/index.js +10 -6
  1075. package/build-module/components/use-no-recursive-renders/index.js.map +1 -1
  1076. package/build-module/components/use-setting/index.js +48 -9
  1077. package/build-module/components/use-setting/index.js.map +1 -1
  1078. package/build-module/components/warning/index.js +7 -6
  1079. package/build-module/components/warning/index.js.map +1 -1
  1080. package/build-module/components/warning/index.native.js +10 -9
  1081. package/build-module/components/warning/index.native.js.map +1 -1
  1082. package/build-module/components/writing-flow/index.js +5 -4
  1083. package/build-module/components/writing-flow/index.js.map +1 -1
  1084. package/build-module/hooks/align.js +9 -4
  1085. package/build-module/hooks/align.js.map +1 -1
  1086. package/build-module/hooks/border.js +8 -6
  1087. package/build-module/hooks/border.js.map +1 -1
  1088. package/build-module/hooks/color-panel.js +9 -7
  1089. package/build-module/hooks/color-panel.js.map +1 -1
  1090. package/build-module/hooks/dimensions.js +2 -1
  1091. package/build-module/hooks/dimensions.js.map +1 -1
  1092. package/build-module/hooks/duotone.js +29 -15
  1093. package/build-module/hooks/duotone.js.map +1 -1
  1094. package/build-module/hooks/font-appearance.js +54 -12
  1095. package/build-module/hooks/font-appearance.js.map +1 -1
  1096. package/build-module/hooks/font-family.js +57 -31
  1097. package/build-module/hooks/font-family.js.map +1 -1
  1098. package/build-module/hooks/font-size.js +52 -12
  1099. package/build-module/hooks/font-size.js.map +1 -1
  1100. package/build-module/hooks/gap.js +9 -7
  1101. package/build-module/hooks/gap.js.map +1 -1
  1102. package/build-module/hooks/index.js +1 -0
  1103. package/build-module/hooks/index.js.map +1 -1
  1104. package/build-module/hooks/index.native.js +1 -0
  1105. package/build-module/hooks/index.native.js.map +1 -1
  1106. package/build-module/hooks/layout.js +16 -13
  1107. package/build-module/hooks/layout.js.map +1 -1
  1108. package/build-module/hooks/letter-spacing.js +45 -10
  1109. package/build-module/hooks/letter-spacing.js.map +1 -1
  1110. package/build-module/hooks/line-height.js +46 -11
  1111. package/build-module/hooks/line-height.js.map +1 -1
  1112. package/build-module/hooks/margin.js +10 -8
  1113. package/build-module/hooks/margin.js.map +1 -1
  1114. package/build-module/hooks/padding.js +10 -8
  1115. package/build-module/hooks/padding.js.map +1 -1
  1116. package/build-module/hooks/style.js +7 -3
  1117. package/build-module/hooks/style.js.map +1 -1
  1118. package/build-module/hooks/text-decoration.js +43 -9
  1119. package/build-module/hooks/text-decoration.js.map +1 -1
  1120. package/build-module/hooks/text-transform.js +43 -9
  1121. package/build-module/hooks/text-transform.js.map +1 -1
  1122. package/build-module/hooks/typography.js +119 -18
  1123. package/build-module/hooks/typography.js.map +1 -1
  1124. package/build-module/hooks/typography.native.js +2 -1
  1125. package/build-module/hooks/typography.native.js.map +1 -1
  1126. package/build-module/hooks/use-border-props.js +5 -4
  1127. package/build-module/hooks/use-border-props.js.map +1 -1
  1128. package/build-module/hooks/use-cached-truthy.js +21 -0
  1129. package/build-module/hooks/use-cached-truthy.js.map +1 -0
  1130. package/build-module/index.js +1 -1
  1131. package/build-module/index.js.map +1 -1
  1132. package/build-module/layouts/flex.js +176 -56
  1133. package/build-module/layouts/flex.js.map +1 -1
  1134. package/build-module/layouts/flow.js +10 -8
  1135. package/build-module/layouts/flow.js.map +1 -1
  1136. package/build-module/layouts/index.js +2 -1
  1137. package/build-module/layouts/index.js.map +1 -1
  1138. package/build-module/layouts/utils.js +2 -1
  1139. package/build-module/layouts/utils.js.map +1 -1
  1140. package/build-module/store/actions.js +410 -320
  1141. package/build-module/store/actions.js.map +1 -1
  1142. package/build-module/store/array.js +2 -1
  1143. package/build-module/store/array.js.map +1 -1
  1144. package/build-module/store/index.js +1 -2
  1145. package/build-module/store/index.js.map +1 -1
  1146. package/build-module/store/reducer.js +129 -54
  1147. package/build-module/store/reducer.js.map +1 -1
  1148. package/build-module/store/selectors.js +197 -117
  1149. package/build-module/store/selectors.js.map +1 -1
  1150. package/build-module/utils/block-variation-transforms.js +4 -3
  1151. package/build-module/utils/block-variation-transforms.js.map +1 -1
  1152. package/build-module/utils/get-paste-event-data.js +10 -6
  1153. package/build-module/utils/get-paste-event-data.js.map +1 -1
  1154. package/build-module/utils/math.js +2 -1
  1155. package/build-module/utils/math.js.map +1 -1
  1156. package/build-module/utils/parse-css-unit-to-px.js +5 -2
  1157. package/build-module/utils/parse-css-unit-to-px.js.map +1 -1
  1158. package/build-module/utils/transform-styles/index.js +8 -6
  1159. package/build-module/utils/transform-styles/index.js.map +1 -1
  1160. package/build-module/utils/transform-styles/transforms/wrap.js +28 -25
  1161. package/build-module/utils/transform-styles/transforms/wrap.js.map +1 -1
  1162. package/build-style/style-rtl.css +160 -57
  1163. package/build-style/style.css +160 -57
  1164. package/package.json +27 -28
  1165. package/src/components/alignment-control/test/__snapshots__/index.js.snap +0 -2
  1166. package/src/components/alignment-control/ui.js +1 -4
  1167. package/src/components/block-draggable/style.scss +19 -4
  1168. package/src/components/block-icon/index.js +4 -1
  1169. package/src/components/block-inspector/index.js +5 -0
  1170. package/src/components/block-list/index.native.js +1 -1
  1171. package/src/components/block-list/use-block-props/use-multi-selection.js +27 -7
  1172. package/src/components/block-navigation/dropdown.js +0 -1
  1173. package/src/components/block-patterns-list/index.js +1 -8
  1174. package/src/components/block-patterns-list/style.scss +22 -12
  1175. package/src/components/block-settings/container.native.js +7 -0
  1176. package/src/components/block-settings-menu/block-settings-dropdown.js +19 -7
  1177. package/src/components/block-styles/preview.native.js +2 -2
  1178. package/src/components/block-switcher/test/__snapshots__/index.js.snap +1 -1
  1179. package/src/components/color-palette/test/__snapshots__/control.js.snap +88 -63
  1180. package/src/components/colors-gradients/control.js +19 -62
  1181. package/src/components/colors-gradients/panel-color-gradient-settings.js +76 -6
  1182. package/src/components/colors-gradients/style.scss +3 -14
  1183. package/src/components/colors-gradients/test/control.js +0 -16
  1184. package/src/components/duotone-control/index.js +6 -0
  1185. package/src/components/duotone-control/style.scss +27 -12
  1186. package/src/components/font-appearance-control/index.js +22 -14
  1187. package/src/components/iframe/index.js +1 -1
  1188. package/src/components/index.js +3 -4
  1189. package/src/components/index.native.js +1 -4
  1190. package/src/components/inner-blocks/index.js +4 -4
  1191. package/src/components/inner-blocks/index.native.js +7 -4
  1192. package/src/components/inserter/block-patterns-explorer/explorer.js +50 -0
  1193. package/src/components/inserter/block-patterns-explorer/patterns-list.js +122 -0
  1194. package/src/components/inserter/block-patterns-explorer/sidebar.js +73 -0
  1195. package/src/components/inserter/block-patterns-tab.js +107 -80
  1196. package/src/components/inserter/hooks/use-block-type-impressions.native.js +14 -21
  1197. package/src/components/inserter/pattern-panel.js +33 -16
  1198. package/src/components/inserter/style.scss +64 -1
  1199. package/src/components/inserter/test/block-types-tab.native.js +1 -1
  1200. package/src/components/inserter/test/fixtures/index.native.js +12 -0
  1201. package/src/components/inspector-controls/groups.js +4 -0
  1202. package/src/components/letter-spacing-control/index.js +12 -6
  1203. package/src/components/link-control/README.md +7 -0
  1204. package/src/components/link-control/index.js +99 -34
  1205. package/src/components/link-control/link-preview.js +21 -9
  1206. package/src/components/link-control/search-input.js +9 -3
  1207. package/src/components/link-control/style.scss +32 -16
  1208. package/src/components/link-control/test/index.js +179 -4
  1209. package/src/components/list-view/block.js +67 -23
  1210. package/src/components/list-view/branch.js +113 -91
  1211. package/src/components/list-view/index.js +58 -19
  1212. package/src/components/list-view/leaf.js +1 -1
  1213. package/src/components/list-view/style.scss +14 -3
  1214. package/src/components/list-view/use-list-view-client-ids.js +7 -66
  1215. package/src/components/rich-text/embed-handler-picker.native.js +1 -0
  1216. package/src/components/rich-text/format-edit.js +36 -2
  1217. package/src/components/rich-text/format-toolbar/index.js +3 -0
  1218. package/src/components/rich-text/use-paste-handler.js +22 -0
  1219. package/src/components/url-input/index.js +14 -4
  1220. package/src/components/use-setting/index.js +49 -11
  1221. package/src/hooks/border.js +8 -11
  1222. package/src/hooks/color-panel.js +1 -0
  1223. package/src/hooks/duotone.js +21 -7
  1224. package/src/hooks/font-appearance.js +38 -7
  1225. package/src/hooks/font-family.js +29 -13
  1226. package/src/hooks/font-size.js +42 -6
  1227. package/src/hooks/index.js +1 -0
  1228. package/src/hooks/index.native.js +1 -0
  1229. package/src/hooks/layout.scss +3 -1
  1230. package/src/hooks/letter-spacing.js +35 -7
  1231. package/src/hooks/line-height.js +37 -9
  1232. package/src/hooks/margin.js +1 -1
  1233. package/src/hooks/padding.js +1 -1
  1234. package/src/hooks/text-decoration.js +34 -6
  1235. package/src/hooks/text-transform.js +34 -6
  1236. package/src/hooks/typography.js +165 -15
  1237. package/src/hooks/typography.scss +16 -0
  1238. package/src/hooks/use-cached-truthy.js +20 -0
  1239. package/src/index.js +1 -0
  1240. package/src/layouts/flex.js +155 -41
  1241. package/src/store/actions.js +223 -391
  1242. package/src/store/index.js +1 -2
  1243. package/src/store/reducer.js +36 -18
  1244. package/src/store/selectors.js +52 -47
  1245. package/src/store/test/actions.js +395 -694
  1246. package/src/store/test/selectors.js +79 -21
  1247. package/src/style.scss +1 -1
  1248. package/src/utils/test/parse-css-unit-to-px.js +127 -167
  1249. package/build/components/text-decoration-and-transform/index.js +0 -39
  1250. package/build/components/text-decoration-and-transform/index.js.map +0 -1
  1251. package/build/store/controls.js +0 -44
  1252. package/build/store/controls.js.map +0 -1
  1253. package/build-module/components/text-decoration-and-transform/index.js +0 -30
  1254. package/build-module/components/text-decoration-and-transform/index.js.map +0 -1
  1255. package/build-module/store/controls.js +0 -32
  1256. package/build-module/store/controls.js.map +0 -1
  1257. package/src/components/text-decoration-and-transform/index.js +0 -36
  1258. package/src/components/text-decoration-and-transform/style.scss +0 -3
  1259. package/src/store/controls.js +0 -39
@@ -19,61 +19,44 @@ import {
19
19
  } from '@wordpress/blocks';
20
20
  import { speak } from '@wordpress/a11y';
21
21
  import { __, _n, sprintf } from '@wordpress/i18n';
22
- import { controls } from '@wordpress/data';
23
22
  import { create, insert, remove, toHTMLString } from '@wordpress/rich-text';
24
23
  import deprecated from '@wordpress/deprecated';
25
24
 
26
25
  /**
27
- * Internal dependencies
28
- */
29
- import { __unstableMarkAutomaticChangeFinalControl } from '../store/controls';
30
- import { STORE_NAME as blockEditorStoreName } from './constants';
31
-
32
- /**
33
- * Generator which will yield a default block insert action if there
34
- * are no other blocks at the root of the editor. This generator should be used
26
+ * Action which will insert a default block insert action if there
27
+ * are no other blocks at the root of the editor. This action should be used
35
28
  * in actions which may result in no blocks remaining in the editor (removal,
36
29
  * replacement, etc).
37
30
  */
38
- function* ensureDefaultBlock() {
39
- const count = yield controls.select(
40
- blockEditorStoreName,
41
- 'getBlockCount'
42
- );
43
-
31
+ const ensureDefaultBlock = () => ( { select, dispatch } ) => {
44
32
  // To avoid a focus loss when removing the last block, assure there is
45
33
  // always a default block if the last of the blocks have been removed.
46
- if ( count === 0 ) {
47
- const { __unstableHasCustomAppender } = yield controls.select(
48
- blockEditorStoreName,
49
- 'getSettings'
50
- );
51
-
52
- // If there's an custom appender, don't insert default block.
53
- // We have to remember to manually move the focus elsewhere to
54
- // prevent it from being lost though.
55
- if ( __unstableHasCustomAppender ) {
56
- return;
57
- }
34
+ const count = select.getBlockCount();
35
+ if ( count > 0 ) {
36
+ return;
37
+ }
58
38
 
59
- return yield insertDefaultBlock();
39
+ // If there's an custom appender, don't insert default block.
40
+ // We have to remember to manually move the focus elsewhere to
41
+ // prevent it from being lost though.
42
+ const { __unstableHasCustomAppender } = select.getSettings();
43
+ if ( __unstableHasCustomAppender ) {
44
+ return;
60
45
  }
61
- }
46
+
47
+ dispatch.insertDefaultBlock();
48
+ };
62
49
 
63
50
  /**
64
- * Returns an action object used in signalling that blocks state should be
65
- * reset to the specified array of blocks, taking precedence over any other
66
- * content reflected as an edit in state.
51
+ * Action that resets blocks state to the specified array of blocks, taking precedence
52
+ * over any other content reflected as an edit in state.
67
53
  *
68
54
  * @param {Array} blocks Array of blocks.
69
55
  */
70
- export function* resetBlocks( blocks ) {
71
- yield {
72
- type: 'RESET_BLOCKS',
73
- blocks,
74
- };
75
- return yield* validateBlocksToTemplate( blocks );
76
- }
56
+ export const resetBlocks = ( blocks ) => ( { dispatch } ) => {
57
+ dispatch( { type: 'RESET_BLOCKS', blocks } );
58
+ dispatch( validateBlocksToTemplate( blocks ) );
59
+ };
77
60
 
78
61
  /**
79
62
  * Block validity is a function of blocks state (at the point of a
@@ -83,15 +66,12 @@ export function* resetBlocks( blocks ) {
83
66
  *
84
67
  * @param {Array} blocks Array of blocks.
85
68
  */
86
- export function* validateBlocksToTemplate( blocks ) {
87
- const template = yield controls.select(
88
- blockEditorStoreName,
89
- 'getTemplate'
90
- );
91
- const templateLock = yield controls.select(
92
- blockEditorStoreName,
93
- 'getTemplateLock'
94
- );
69
+ export const validateBlocksToTemplate = ( blocks ) => ( {
70
+ select,
71
+ dispatch,
72
+ } ) => {
73
+ const template = select.getTemplate();
74
+ const templateLock = select.getTemplateLock();
95
75
 
96
76
  // Unlocked templates are considered always valid because they act
97
77
  // as default values only.
@@ -101,16 +81,13 @@ export function* validateBlocksToTemplate( blocks ) {
101
81
  doBlocksMatchTemplate( blocks, template );
102
82
 
103
83
  // Update if validity has changed.
104
- const isValidTemplate = yield controls.select(
105
- blockEditorStoreName,
106
- 'isValidTemplate'
107
- );
84
+ const isValidTemplate = select.isValidTemplate();
108
85
 
109
86
  if ( isBlocksValidToTemplate !== isValidTemplate ) {
110
- yield setTemplateValidity( isBlocksValidToTemplate );
87
+ dispatch.setTemplateValidity( isBlocksValidToTemplate );
111
88
  return isBlocksValidToTemplate;
112
89
  }
113
- }
90
+ };
114
91
 
115
92
  /**
116
93
  * A block selection object.
@@ -172,8 +149,7 @@ export function receiveBlocks( blocks ) {
172
149
  }
173
150
 
174
151
  /**
175
- * Returns an action object used in signalling that the multiple blocks'
176
- * attributes with the specified client IDs have been updated.
152
+ * Action that updates attributes of multiple blocks with the specified client IDs.
177
153
  *
178
154
  * @param {string|string[]} clientIds Block client IDs.
179
155
  * @param {Object} attributes Block attributes to be merged. Should be keyed by clientIds if
@@ -195,8 +171,7 @@ export function updateBlockAttributes(
195
171
  }
196
172
 
197
173
  /**
198
- * Returns an action object used in signalling that the block with the
199
- * specified client ID has been updated.
174
+ * Action that updates the block with the specified client ID.
200
175
  *
201
176
  * @param {string} clientId Block client ID.
202
177
  * @param {Object} updates Block attributes to be merged.
@@ -239,18 +214,12 @@ export function selectBlock( clientId, initialPosition = 0 ) {
239
214
  *
240
215
  * @param {string} clientId Block client ID.
241
216
  */
242
- export function* selectPreviousBlock( clientId ) {
243
- const previousBlockClientId = yield controls.select(
244
- blockEditorStoreName,
245
- 'getPreviousBlockClientId',
246
- clientId
247
- );
248
-
217
+ export const selectPreviousBlock = ( clientId ) => ( { select, dispatch } ) => {
218
+ const previousBlockClientId = select.getPreviousBlockClientId( clientId );
249
219
  if ( previousBlockClientId ) {
250
- yield selectBlock( previousBlockClientId, -1 );
251
- return [ previousBlockClientId ];
220
+ dispatch.selectBlock( previousBlockClientId, -1 );
252
221
  }
253
- }
222
+ };
254
223
 
255
224
  /**
256
225
  * Yields action objects used in signalling that the block following the given
@@ -258,21 +227,15 @@ export function* selectPreviousBlock( clientId ) {
258
227
  *
259
228
  * @param {string} clientId Block client ID.
260
229
  */
261
- export function* selectNextBlock( clientId ) {
262
- const nextBlockClientId = yield controls.select(
263
- blockEditorStoreName,
264
- 'getNextBlockClientId',
265
- clientId
266
- );
267
-
230
+ export const selectNextBlock = ( clientId ) => ( { select, dispatch } ) => {
231
+ const nextBlockClientId = select.getNextBlockClientId( clientId );
268
232
  if ( nextBlockClientId ) {
269
- yield selectBlock( nextBlockClientId );
270
- return [ nextBlockClientId ];
233
+ dispatch.selectBlock( nextBlockClientId );
271
234
  }
272
- }
235
+ };
273
236
 
274
237
  /**
275
- * Returns an action object used in signalling that a block multi-selection has started.
238
+ * Action that starts block multi-selection.
276
239
  *
277
240
  * @return {Object} Action object.
278
241
  */
@@ -283,7 +246,7 @@ export function startMultiSelect() {
283
246
  }
284
247
 
285
248
  /**
286
- * Returns an action object used in signalling that block multi-selection stopped.
249
+ * Action that stops block multi-selection.
287
250
  *
288
251
  * @return {Object} Action object.
289
252
  */
@@ -294,38 +257,23 @@ export function stopMultiSelect() {
294
257
  }
295
258
 
296
259
  /**
297
- * Returns an action object used in signalling that block multi-selection changed.
260
+ * Action that changes block multi-selection.
298
261
  *
299
262
  * @param {string} start First block of the multi selection.
300
263
  * @param {string} end Last block of the multiselection.
301
264
  */
302
- export function* multiSelect( start, end ) {
303
- const startBlockRootClientId = yield controls.select(
304
- blockEditorStoreName,
305
- 'getBlockRootClientId',
306
- start
307
- );
308
- const endBlockRootClientId = yield controls.select(
309
- blockEditorStoreName,
310
- 'getBlockRootClientId',
311
- end
312
- );
265
+ export const multiSelect = ( start, end ) => ( { select, dispatch } ) => {
266
+ const startBlockRootClientId = select.getBlockRootClientId( start );
267
+ const endBlockRootClientId = select.getBlockRootClientId( end );
313
268
 
314
269
  // Only allow block multi-selections at the same level.
315
270
  if ( startBlockRootClientId !== endBlockRootClientId ) {
316
271
  return;
317
272
  }
318
273
 
319
- yield {
320
- type: 'MULTI_SELECT',
321
- start,
322
- end,
323
- };
274
+ dispatch( { type: 'MULTI_SELECT', start, end } );
324
275
 
325
- const blockCount = yield controls.select(
326
- blockEditorStoreName,
327
- 'getSelectedBlockCount'
328
- );
276
+ const blockCount = select.getSelectedBlockCount();
329
277
 
330
278
  speak(
331
279
  sprintf(
@@ -335,10 +283,10 @@ export function* multiSelect( start, end ) {
335
283
  ),
336
284
  'assertive'
337
285
  );
338
- }
286
+ };
339
287
 
340
288
  /**
341
- * Returns an action object used in signalling that the block selection is cleared.
289
+ * Action that clears the block selection.
342
290
  *
343
291
  * @return {Object} Action object.
344
292
  */
@@ -349,7 +297,7 @@ export function clearSelectedBlock() {
349
297
  }
350
298
 
351
299
  /**
352
- * Returns an action object that enables or disables block selection.
300
+ * Action that enables or disables block selection.
353
301
  *
354
302
  * @param {boolean} [isSelectionEnabled=true] Whether block selection should
355
303
  * be enabled.
@@ -395,8 +343,7 @@ function getBlocksWithDefaultStylesApplied( blocks, blockEditorSettings ) {
395
343
 
396
344
  /* eslint-disable jsdoc/valid-types */
397
345
  /**
398
- * Returns an action object signalling that a blocks should be replaced with
399
- * one or more replacement blocks.
346
+ * Action that replaces given blocks with one or more replacement blocks.
400
347
  *
401
348
  * @param {(string|string[])} clientIds Block client ID(s) to replace.
402
349
  * @param {(Object|Object[])} blocks Replacement block(s).
@@ -404,32 +351,26 @@ function getBlocksWithDefaultStylesApplied( blocks, blockEditorSettings ) {
404
351
  * @param {0|-1|null} initialPosition Index of caret after in the selected block after the operation.
405
352
  * @param {?Object} meta Optional Meta values to be passed to the action object.
406
353
  *
407
- * @yield {Object} Action object.
354
+ * @return {Object} Action object.
408
355
  */
409
- export function* replaceBlocks(
356
+ export const replaceBlocks = (
410
357
  clientIds,
411
358
  blocks,
412
359
  indexToSelect,
413
360
  initialPosition = 0,
414
361
  meta
415
- ) {
362
+ ) => ( { select, dispatch } ) => {
416
363
  /* eslint-enable jsdoc/valid-types */
417
364
  clientIds = castArray( clientIds );
418
365
  blocks = getBlocksWithDefaultStylesApplied(
419
366
  castArray( blocks ),
420
- yield controls.select( blockEditorStoreName, 'getSettings' )
421
- );
422
- const rootClientId = yield controls.select(
423
- blockEditorStoreName,
424
- 'getBlockRootClientId',
425
- first( clientIds )
367
+ select.getSettings()
426
368
  );
369
+ const rootClientId = select.getBlockRootClientId( first( clientIds ) );
427
370
  // Replace is valid if the new blocks can be inserted in the root block.
428
371
  for ( let index = 0; index < blocks.length; index++ ) {
429
372
  const block = blocks[ index ];
430
- const canInsertBlock = yield controls.select(
431
- blockEditorStoreName,
432
- 'canInsertBlockType',
373
+ const canInsertBlock = select.canInsertBlockType(
433
374
  block.name,
434
375
  rootClientId
435
376
  );
@@ -437,7 +378,7 @@ export function* replaceBlocks(
437
378
  return;
438
379
  }
439
380
  }
440
- yield {
381
+ dispatch( {
441
382
  type: 'REPLACE_BLOCKS',
442
383
  clientIds,
443
384
  blocks,
@@ -445,13 +386,12 @@ export function* replaceBlocks(
445
386
  indexToSelect,
446
387
  initialPosition,
447
388
  meta,
448
- };
449
- yield* ensureDefaultBlock();
450
- }
389
+ } );
390
+ dispatch( ensureDefaultBlock() );
391
+ };
451
392
 
452
393
  /**
453
- * Returns an action object signalling that a single block should be replaced
454
- * with one or more replacement blocks.
394
+ * Action that replaces a single block with one or more replacement blocks.
455
395
  *
456
396
  * @param {(string|string[])} clientId Block client ID to replace.
457
397
  * @param {(Object|Object[])} block Replacement block(s).
@@ -470,118 +410,91 @@ export function replaceBlock( clientId, block ) {
470
410
  *
471
411
  * @return {Function} Action creator.
472
412
  */
473
- function createOnMove( type ) {
474
- return function* ( clientIds, rootClientId ) {
475
- const canMoveBlocks = yield controls.select(
476
- blockEditorStoreName,
477
- 'canMoveBlocks',
478
- clientIds,
479
- rootClientId
480
- );
481
-
482
- // If one of the blocks is locked or the parent is locked, we cannot move any block.
483
- if ( ! canMoveBlocks ) {
484
- return;
485
- }
413
+ const createOnMove = ( type ) => ( clientIds, rootClientId ) => ( {
414
+ select,
415
+ dispatch,
416
+ } ) => {
417
+ // If one of the blocks is locked or the parent is locked, we cannot move any block.
418
+ const canMoveBlocks = select.canMoveBlocks( clientIds, rootClientId );
419
+ if ( ! canMoveBlocks ) {
420
+ return;
421
+ }
486
422
 
487
- yield {
488
- clientIds: castArray( clientIds ),
489
- type,
490
- rootClientId,
491
- };
492
- };
493
- }
423
+ dispatch( { type, clientIds: castArray( clientIds ), rootClientId } );
424
+ };
494
425
 
495
426
  export const moveBlocksDown = createOnMove( 'MOVE_BLOCKS_DOWN' );
496
427
  export const moveBlocksUp = createOnMove( 'MOVE_BLOCKS_UP' );
497
428
 
498
429
  /**
499
- * Returns an action object signalling that the given blocks should be moved to
500
- * a new position.
430
+ * Action that moves given blocks to a new position.
501
431
  *
502
432
  * @param {?string} clientIds The client IDs of the blocks.
503
433
  * @param {?string} fromRootClientId Root client ID source.
504
434
  * @param {?string} toRootClientId Root client ID destination.
505
435
  * @param {number} index The index to move the blocks to.
506
- *
507
- * @yield {Object} Action object.
508
436
  */
509
- export function* moveBlocksToPosition(
437
+ export const moveBlocksToPosition = (
510
438
  clientIds,
511
439
  fromRootClientId = '',
512
440
  toRootClientId = '',
513
441
  index
514
- ) {
515
- const canMoveBlocks = yield controls.select(
516
- blockEditorStoreName,
517
- 'canMoveBlocks',
518
- clientIds,
519
- fromRootClientId
520
- );
521
-
522
- const canRemoveBlocks = yield controls.select(
523
- blockEditorStoreName,
524
- 'canRemoveBlocks',
525
- clientIds,
526
- fromRootClientId
527
- );
442
+ ) => ( { select, dispatch } ) => {
443
+ const canMoveBlocks = select.canMoveBlocks( clientIds, fromRootClientId );
528
444
 
529
445
  // If one of the blocks is locked or the parent is locked, we cannot move any block.
530
446
  if ( ! canMoveBlocks ) {
531
447
  return;
532
448
  }
533
449
 
534
- const action = {
535
- type: 'MOVE_BLOCKS_TO_POSITION',
536
- fromRootClientId,
537
- toRootClientId,
538
- clientIds,
539
- index,
540
- };
541
-
542
450
  // If moving inside the same root block the move is always possible.
543
- if ( fromRootClientId === toRootClientId ) {
544
- yield action;
545
- return;
546
- }
451
+ if ( fromRootClientId !== toRootClientId ) {
452
+ const canRemoveBlocks = select.canRemoveBlocks(
453
+ clientIds,
454
+ fromRootClientId
455
+ );
547
456
 
548
- // If we're moving to another block, it means we're deleting blocks from
549
- // the original block, so we need to check if removing is possible.
550
- if ( ! canRemoveBlocks ) {
551
- return;
552
- }
457
+ // If we're moving to another block, it means we're deleting blocks from
458
+ // the original block, so we need to check if removing is possible.
459
+ if ( ! canRemoveBlocks ) {
460
+ return;
461
+ }
553
462
 
554
- const canInsertBlocks = yield controls.select(
555
- blockEditorStoreName,
556
- 'canInsertBlocks',
557
- clientIds,
558
- toRootClientId
559
- );
463
+ const canInsertBlocks = select.canInsertBlocks(
464
+ clientIds,
465
+ toRootClientId
466
+ );
560
467
 
561
- // If moving to other parent block, the move is possible if we can insert a block of the same type inside the new parent block.
562
- if ( canInsertBlocks ) {
563
- yield action;
468
+ // If moving to other parent block, the move is possible if we can insert a block of the same type inside the new parent block.
469
+ if ( ! canInsertBlocks ) {
470
+ return;
471
+ }
564
472
  }
565
- }
473
+
474
+ dispatch( {
475
+ type: 'MOVE_BLOCKS_TO_POSITION',
476
+ fromRootClientId,
477
+ toRootClientId,
478
+ clientIds,
479
+ index,
480
+ } );
481
+ };
566
482
 
567
483
  /**
568
- * Returns an action object signalling that the given block should be moved to a
569
- * new position.
484
+ * Action that moves given block to a new position.
570
485
  *
571
486
  * @param {?string} clientId The client ID of the block.
572
487
  * @param {?string} fromRootClientId Root client ID source.
573
488
  * @param {?string} toRootClientId Root client ID destination.
574
489
  * @param {number} index The index to move the block to.
575
- *
576
- * @yield {Object} Action object.
577
490
  */
578
- export function* moveBlockToPosition(
491
+ export function moveBlockToPosition(
579
492
  clientId,
580
493
  fromRootClientId = '',
581
494
  toRootClientId = '',
582
495
  index
583
496
  ) {
584
- yield moveBlocksToPosition(
497
+ return moveBlocksToPosition(
585
498
  [ clientId ],
586
499
  fromRootClientId,
587
500
  toRootClientId,
@@ -590,8 +503,7 @@ export function* moveBlockToPosition(
590
503
  }
591
504
 
592
505
  /**
593
- * Returns an action object used in signalling that a single block should be
594
- * inserted, optionally at a specific index respective a root block list.
506
+ * Action that inserts a single block, optionally at a specific index respective a root block list.
595
507
  *
596
508
  * @param {Object} block Block object to insert.
597
509
  * @param {?number} index Index at which block should be inserted.
@@ -605,7 +517,7 @@ export function insertBlock(
605
517
  block,
606
518
  index,
607
519
  rootClientId,
608
- updateSelection = true,
520
+ updateSelection,
609
521
  meta
610
522
  ) {
611
523
  return insertBlocks(
@@ -620,8 +532,7 @@ export function insertBlock(
620
532
 
621
533
  /* eslint-disable jsdoc/valid-types */
622
534
  /**
623
- * Returns an action object used in signalling that an array of blocks should
624
- * be inserted, optionally at a specific index respective a root block list.
535
+ * Action that inserts an array of blocks, optionally at a specific index respective a root block list.
625
536
  *
626
537
  * @param {Object[]} blocks Block objects to insert.
627
538
  * @param {?number} index Index at which block should be inserted.
@@ -631,14 +542,14 @@ export function insertBlock(
631
542
  * @param {?Object} meta Optional Meta values to be passed to the action object.
632
543
  * @return {Object} Action object.
633
544
  */
634
- export function* insertBlocks(
545
+ export const insertBlocks = (
635
546
  blocks,
636
547
  index,
637
548
  rootClientId,
638
549
  updateSelection = true,
639
550
  initialPosition = 0,
640
551
  meta
641
- ) {
552
+ ) => ( { select, dispatch } ) => {
642
553
  /* eslint-enable jsdoc/valid-types */
643
554
  if ( isObject( initialPosition ) ) {
644
555
  meta = initialPosition;
@@ -652,22 +563,17 @@ export function* insertBlocks(
652
563
 
653
564
  blocks = getBlocksWithDefaultStylesApplied(
654
565
  castArray( blocks ),
655
- yield controls.select( blockEditorStoreName, 'getSettings' )
566
+ select.getSettings()
656
567
  );
657
568
  const allowedBlocks = [];
658
569
  for ( const block of blocks ) {
659
- const isValid = yield controls.select(
660
- blockEditorStoreName,
661
- 'canInsertBlockType',
662
- block.name,
663
- rootClientId
664
- );
570
+ const isValid = select.canInsertBlockType( block.name, rootClientId );
665
571
  if ( isValid ) {
666
572
  allowedBlocks.push( block );
667
573
  }
668
574
  }
669
575
  if ( allowedBlocks.length ) {
670
- return {
576
+ dispatch( {
671
577
  type: 'INSERT_BLOCKS',
672
578
  blocks: allowedBlocks,
673
579
  index,
@@ -676,13 +582,12 @@ export function* insertBlocks(
676
582
  updateSelection,
677
583
  initialPosition: updateSelection ? initialPosition : null,
678
584
  meta,
679
- };
585
+ } );
680
586
  }
681
- }
587
+ };
682
588
 
683
589
  /**
684
- * Returns an action object used in signalling that the insertion point should
685
- * be shown.
590
+ * Action that shows the insertion point.
686
591
  *
687
592
  * @param {?string} rootClientId Optional root client ID of block list on
688
593
  * which to insert.
@@ -706,7 +611,7 @@ export function showInsertionPoint(
706
611
  }
707
612
 
708
613
  /**
709
- * Returns an action object hiding the insertion point.
614
+ * Action that hides the insertion point.
710
615
  *
711
616
  * @return {Object} Action object.
712
617
  */
@@ -717,7 +622,7 @@ export function hideInsertionPoint() {
717
622
  }
718
623
 
719
624
  /**
720
- * Returns an action object resetting the template validity.
625
+ * Action that resets the template validity.
721
626
  *
722
627
  * @param {boolean} isValid template validity flag.
723
628
  *
@@ -731,61 +636,45 @@ export function setTemplateValidity( isValid ) {
731
636
  }
732
637
 
733
638
  /**
734
- * Returns an action object synchronize the template with the list of blocks
639
+ * Action that synchronizes the template with the list of blocks.
735
640
  *
736
641
  * @return {Object} Action object.
737
642
  */
738
- export function* synchronizeTemplate() {
739
- yield {
740
- type: 'SYNCHRONIZE_TEMPLATE',
741
- };
742
- const blocks = yield controls.select( blockEditorStoreName, 'getBlocks' );
743
- const template = yield controls.select(
744
- blockEditorStoreName,
745
- 'getTemplate'
746
- );
643
+ export const synchronizeTemplate = () => ( { select, dispatch } ) => {
644
+ dispatch( { type: 'SYNCHRONIZE_TEMPLATE' } );
645
+ const blocks = select.getBlocks();
646
+ const template = select.getTemplate();
747
647
  const updatedBlockList = synchronizeBlocksWithTemplate( blocks, template );
748
648
 
749
- return yield resetBlocks( updatedBlockList );
750
- }
649
+ dispatch.resetBlocks( updatedBlockList );
650
+ };
751
651
 
752
652
  /**
753
- * Returns an action object used in signalling that two blocks should be merged
653
+ * Action that merges two blocks.
754
654
  *
755
655
  * @param {string} firstBlockClientId Client ID of the first block to merge.
756
656
  * @param {string} secondBlockClientId Client ID of the second block to merge.
757
657
  */
758
- export function* mergeBlocks( firstBlockClientId, secondBlockClientId ) {
658
+ export const mergeBlocks = ( firstBlockClientId, secondBlockClientId ) => ( {
659
+ select,
660
+ dispatch,
661
+ } ) => {
759
662
  const blocks = [ firstBlockClientId, secondBlockClientId ];
760
- yield {
761
- type: 'MERGE_BLOCKS',
762
- blocks,
763
- };
663
+ dispatch( { type: 'MERGE_BLOCKS', blocks } );
764
664
 
765
665
  const [ clientIdA, clientIdB ] = blocks;
766
- const blockA = yield controls.select(
767
- blockEditorStoreName,
768
- 'getBlock',
769
- clientIdA
770
- );
666
+ const blockA = select.getBlock( clientIdA );
771
667
  const blockAType = getBlockType( blockA.name );
772
668
 
773
669
  // Only focus the previous block if it's not mergeable
774
670
  if ( blockAType && ! blockAType.merge ) {
775
- yield selectBlock( blockA.clientId );
671
+ dispatch.selectBlock( blockA.clientId );
776
672
  return;
777
673
  }
778
674
 
779
- const blockB = yield controls.select(
780
- blockEditorStoreName,
781
- 'getBlock',
782
- clientIdB
783
- );
675
+ const blockB = select.getBlock( clientIdB );
784
676
  const blockBType = getBlockType( blockB.name );
785
- const { clientId, attributeKey, offset } = yield controls.select(
786
- blockEditorStoreName,
787
- 'getSelectionStart'
788
- );
677
+ const { clientId, attributeKey, offset } = select.getSelectionStart();
789
678
  const selectedBlockType = clientId === clientIdA ? blockAType : blockBType;
790
679
  const attributeDefinition = selectedBlockType.attributes[ attributeKey ];
791
680
  const canRestoreTextSelection =
@@ -892,7 +781,7 @@ export function* mergeBlocks( firstBlockClientId, secondBlockClientId ) {
892
781
 
893
782
  updatedAttributes[ newAttributeKey ] = newHtml;
894
783
 
895
- yield selectionChange(
784
+ dispatch.selectionChange(
896
785
  blockA.clientId,
897
786
  newAttributeKey,
898
787
  newOffset,
@@ -900,7 +789,7 @@ export function* mergeBlocks( firstBlockClientId, secondBlockClientId ) {
900
789
  );
901
790
  }
902
791
 
903
- yield* replaceBlocks(
792
+ dispatch.replaceBlocks(
904
793
  [ blockA.clientId, blockB.clientId ],
905
794
  [
906
795
  {
@@ -914,7 +803,7 @@ export function* mergeBlocks( firstBlockClientId, secondBlockClientId ) {
914
803
  ],
915
804
  0 // If we don't pass the `indexToSelect` it will default to the last block.
916
805
  );
917
- }
806
+ };
918
807
 
919
808
  /**
920
809
  * Yields action objects used in signalling that the blocks corresponding to
@@ -924,49 +813,32 @@ export function* mergeBlocks( firstBlockClientId, secondBlockClientId ) {
924
813
  * @param {boolean} selectPrevious True if the previous block should be
925
814
  * selected when a block is removed.
926
815
  */
927
- export function* removeBlocks( clientIds, selectPrevious = true ) {
816
+ export const removeBlocks = ( clientIds, selectPrevious = true ) => ( {
817
+ select,
818
+ dispatch,
819
+ } ) => {
928
820
  if ( ! clientIds || ! clientIds.length ) {
929
821
  return;
930
822
  }
931
823
 
932
824
  clientIds = castArray( clientIds );
933
- const rootClientId = yield controls.select(
934
- blockEditorStoreName,
935
- 'getBlockRootClientId',
936
- clientIds[ 0 ]
937
- );
938
- const canRemoveBlocks = yield controls.select(
939
- blockEditorStoreName,
940
- 'canRemoveBlocks',
941
- clientIds,
942
- rootClientId
943
- );
825
+ const rootClientId = select.getBlockRootClientId( clientIds[ 0 ] );
826
+ const canRemoveBlocks = select.canRemoveBlocks( clientIds, rootClientId );
944
827
 
945
828
  if ( ! canRemoveBlocks ) {
946
829
  return;
947
830
  }
948
831
 
949
- let previousBlockId;
950
832
  if ( selectPrevious ) {
951
- previousBlockId = yield selectPreviousBlock( clientIds[ 0 ] );
952
- } else {
953
- previousBlockId = yield controls.select(
954
- blockEditorStoreName,
955
- 'getPreviousBlockClientId',
956
- clientIds[ 0 ]
957
- );
833
+ dispatch.selectPreviousBlock( clientIds[ 0 ] );
958
834
  }
959
835
 
960
- yield {
961
- type: 'REMOVE_BLOCKS',
962
- clientIds,
963
- };
836
+ dispatch( { type: 'REMOVE_BLOCKS', clientIds } );
964
837
 
965
838
  // To avoid a focus loss when removing the last block, assure there is
966
839
  // always a default block if the last of the blocks have been removed.
967
- const defaultBlockId = yield* ensureDefaultBlock();
968
- return [ previousBlockId || defaultBlockId ];
969
- }
840
+ dispatch( ensureDefaultBlock() );
841
+ };
970
842
 
971
843
  /**
972
844
  * Returns an action object used in signalling that the block with the
@@ -1095,8 +967,7 @@ export function exitFormattedText() {
1095
967
  }
1096
968
 
1097
969
  /**
1098
- * Returns an action object used in signalling that the user caret has changed
1099
- * position.
970
+ * Action that changes the position of the user caret.
1100
971
  *
1101
972
  * @param {string} clientId The selected block client ID.
1102
973
  * @param {string} attributeKey The selected block attribute key.
@@ -1121,8 +992,7 @@ export function selectionChange(
1121
992
  }
1122
993
 
1123
994
  /**
1124
- * Returns an action object used in signalling that a new block of the default
1125
- * type should be added to the block list.
995
+ * Action that adds a new block of the default type to the block list.
1126
996
  *
1127
997
  * @param {?Object} attributes Optional attributes of the block to assign.
1128
998
  * @param {?string} rootClientId Optional root client ID of block list on which
@@ -1144,7 +1014,7 @@ export function insertDefaultBlock( attributes, rootClientId, index ) {
1144
1014
  }
1145
1015
 
1146
1016
  /**
1147
- * Returns an action object that changes the nested settings of a given block.
1017
+ * Action that changes the nested settings of a given block.
1148
1018
  *
1149
1019
  * @param {string} clientId Client ID of the block whose nested setting are
1150
1020
  * being received.
@@ -1161,7 +1031,7 @@ export function updateBlockListSettings( clientId, settings ) {
1161
1031
  }
1162
1032
 
1163
1033
  /**
1164
- * Returns an action object used in signalling that the block editor settings have been updated.
1034
+ * Action that updates the block editor settings.
1165
1035
  *
1166
1036
  * @param {Object} settings Updated settings
1167
1037
  *
@@ -1175,7 +1045,7 @@ export function updateSettings( settings ) {
1175
1045
  }
1176
1046
 
1177
1047
  /**
1178
- * Returns an action object used in signalling that a temporary reusable blocks have been saved
1048
+ * Action that signals that a temporary reusable block has been saved
1179
1049
  * in order to switch its temporary id with the real id.
1180
1050
  *
1181
1051
  * @param {string} id Reusable block's id.
@@ -1192,7 +1062,7 @@ export function __unstableSaveReusableBlock( id, updatedId ) {
1192
1062
  }
1193
1063
 
1194
1064
  /**
1195
- * Returns an action object used in signalling that the last block change should be marked explicitly as persistent.
1065
+ * Action that marks the last block change explicitly as persistent.
1196
1066
  *
1197
1067
  * @return {Object} Action object.
1198
1068
  */
@@ -1201,7 +1071,7 @@ export function __unstableMarkLastChangeAsPersistent() {
1201
1071
  }
1202
1072
 
1203
1073
  /**
1204
- * Returns an action object used in signalling that the next block change should be marked explicitly as not persistent.
1074
+ * Action that signals that the next block change should be marked explicitly as not persistent.
1205
1075
  *
1206
1076
  * @return {Object} Action object.
1207
1077
  */
@@ -1210,34 +1080,29 @@ export function __unstableMarkNextChangeAsNotPersistent() {
1210
1080
  }
1211
1081
 
1212
1082
  /**
1213
- * Returns an action object used in signalling that the last block change is
1214
- * an automatic change, meaning it was not performed by the user, and can be
1215
- * undone using the `Escape` and `Backspace` keys. This action must be called
1216
- * after the change was made, and any actions that are a consequence of it, so
1217
- * it is recommended to be called at the next idle period to ensure all
1083
+ * Action that marks the last block change as an automatic change, meaning it was not
1084
+ * performed by the user, and can be undone using the `Escape` and `Backspace` keys.
1085
+ * This action must be called after the change was made, and any actions that are a
1086
+ * consequence of it, so it is recommended to be called at the next idle period to ensure all
1218
1087
  * selection changes have been recorded.
1219
1088
  */
1220
- export function* __unstableMarkAutomaticChange() {
1221
- yield { type: 'MARK_AUTOMATIC_CHANGE' };
1222
- yield __unstableMarkAutomaticChangeFinalControl();
1223
- }
1224
-
1225
- export function __unstableMarkAutomaticChangeFinal() {
1226
- return {
1227
- type: 'MARK_AUTOMATIC_CHANGE_FINAL',
1228
- };
1229
- }
1089
+ export const __unstableMarkAutomaticChange = () => ( { dispatch } ) => {
1090
+ dispatch( { type: 'MARK_AUTOMATIC_CHANGE' } );
1091
+ const { requestIdleCallback = ( cb ) => setTimeout( cb, 100 ) } = window;
1092
+ requestIdleCallback( () => {
1093
+ dispatch( { type: 'MARK_AUTOMATIC_CHANGE_FINAL' } );
1094
+ } );
1095
+ };
1230
1096
 
1231
1097
  /**
1232
- * Generators that triggers an action used to enable or disable the navigation mode.
1098
+ * Action that enables or disables the navigation mode.
1233
1099
  *
1234
1100
  * @param {string} isNavigationMode Enable/Disable navigation mode.
1235
1101
  */
1236
- export function* setNavigationMode( isNavigationMode = true ) {
1237
- yield {
1238
- type: 'SET_NAVIGATION_MODE',
1239
- isNavigationMode,
1240
- };
1102
+ export const setNavigationMode = ( isNavigationMode = true ) => ( {
1103
+ dispatch,
1104
+ } ) => {
1105
+ dispatch( { type: 'SET_NAVIGATION_MODE', isNavigationMode } );
1241
1106
 
1242
1107
  if ( isNavigationMode ) {
1243
1108
  speak(
@@ -1252,18 +1117,17 @@ export function* setNavigationMode( isNavigationMode = true ) {
1252
1117
  )
1253
1118
  );
1254
1119
  }
1255
- }
1120
+ };
1256
1121
 
1257
1122
  /**
1258
- * Generator that triggers an action used to enable or disable the block moving mode.
1123
+ * Action that enables or disables the block moving mode.
1259
1124
  *
1260
1125
  * @param {string|null} hasBlockMovingClientId Enable/Disable block moving mode.
1261
1126
  */
1262
- export function* setBlockMovingClientId( hasBlockMovingClientId = null ) {
1263
- yield {
1264
- type: 'SET_BLOCK_MOVING_MODE',
1265
- hasBlockMovingClientId,
1266
- };
1127
+ export const setBlockMovingClientId = ( hasBlockMovingClientId = null ) => ( {
1128
+ dispatch,
1129
+ } ) => {
1130
+ dispatch( { type: 'SET_BLOCK_MOVING_MODE', hasBlockMovingClientId } );
1267
1131
 
1268
1132
  if ( hasBlockMovingClientId ) {
1269
1133
  speak(
@@ -1272,133 +1136,105 @@ export function* setBlockMovingClientId( hasBlockMovingClientId = null ) {
1272
1136
  )
1273
1137
  );
1274
1138
  }
1275
- }
1139
+ };
1276
1140
 
1277
1141
  /**
1278
- * Generator that triggers an action used to duplicate a list of blocks.
1142
+ * Action that duplicates a list of blocks.
1279
1143
  *
1280
1144
  * @param {string[]} clientIds
1281
1145
  * @param {boolean} updateSelection
1282
1146
  */
1283
- export function* duplicateBlocks( clientIds, updateSelection = true ) {
1284
- if ( ! clientIds && ! clientIds.length ) {
1147
+ export const duplicateBlocks = ( clientIds, updateSelection = true ) => ( {
1148
+ select,
1149
+ dispatch,
1150
+ } ) => {
1151
+ if ( ! clientIds || ! clientIds.length ) {
1285
1152
  return;
1286
1153
  }
1287
- const blocks = yield controls.select(
1288
- blockEditorStoreName,
1289
- 'getBlocksByClientId',
1290
- clientIds
1291
- );
1292
- const rootClientId = yield controls.select(
1293
- blockEditorStoreName,
1294
- 'getBlockRootClientId',
1295
- clientIds[ 0 ]
1296
- );
1154
+
1297
1155
  // Return early if blocks don't exist.
1156
+ const blocks = select.getBlocksByClientId( clientIds );
1298
1157
  if ( some( blocks, ( block ) => ! block ) ) {
1299
1158
  return;
1300
1159
  }
1301
- const blockNames = blocks.map( ( block ) => block.name );
1160
+
1302
1161
  // Return early if blocks don't support multiple usage.
1162
+ const blockNames = blocks.map( ( block ) => block.name );
1303
1163
  if (
1304
- some(
1305
- blockNames,
1164
+ blockNames.some(
1306
1165
  ( blockName ) => ! hasBlockSupport( blockName, 'multiple', true )
1307
1166
  )
1308
1167
  ) {
1309
1168
  return;
1310
1169
  }
1311
1170
 
1312
- const lastSelectedIndex = yield controls.select(
1313
- blockEditorStoreName,
1314
- 'getBlockIndex',
1171
+ const rootClientId = select.getBlockRootClientId( clientIds[ 0 ] );
1172
+ const lastSelectedIndex = select.getBlockIndex(
1315
1173
  last( castArray( clientIds ) ),
1316
1174
  rootClientId
1317
1175
  );
1318
1176
  const clonedBlocks = blocks.map( ( block ) =>
1319
1177
  __experimentalCloneSanitizedBlock( block )
1320
1178
  );
1321
- yield insertBlocks(
1179
+ dispatch.insertBlocks(
1322
1180
  clonedBlocks,
1323
1181
  lastSelectedIndex + 1,
1324
1182
  rootClientId,
1325
1183
  updateSelection
1326
1184
  );
1327
1185
  if ( clonedBlocks.length > 1 && updateSelection ) {
1328
- yield multiSelect(
1186
+ dispatch.multiSelect(
1329
1187
  first( clonedBlocks ).clientId,
1330
1188
  last( clonedBlocks ).clientId
1331
1189
  );
1332
1190
  }
1333
1191
  return clonedBlocks.map( ( block ) => block.clientId );
1334
- }
1192
+ };
1335
1193
 
1336
1194
  /**
1337
- * Generator used to insert an empty block after a given block.
1195
+ * Action that inserts an empty block before a given block.
1338
1196
  *
1339
1197
  * @param {string} clientId
1340
1198
  */
1341
- export function* insertBeforeBlock( clientId ) {
1199
+ export const insertBeforeBlock = ( clientId ) => ( { select, dispatch } ) => {
1342
1200
  if ( ! clientId ) {
1343
1201
  return;
1344
1202
  }
1345
- const rootClientId = yield controls.select(
1346
- blockEditorStoreName,
1347
- 'getBlockRootClientId',
1348
- clientId
1349
- );
1350
- const isLocked = yield controls.select(
1351
- blockEditorStoreName,
1352
- 'getTemplateLock',
1353
- rootClientId
1354
- );
1203
+ const rootClientId = select.getBlockRootClientId( clientId );
1204
+ const isLocked = select.getTemplateLock( rootClientId );
1355
1205
  if ( isLocked ) {
1356
1206
  return;
1357
1207
  }
1358
1208
 
1359
- const firstSelectedIndex = yield controls.select(
1360
- blockEditorStoreName,
1361
- 'getBlockIndex',
1362
- clientId,
1363
- rootClientId
1364
- );
1365
- return yield insertDefaultBlock( {}, rootClientId, firstSelectedIndex );
1366
- }
1209
+ const firstSelectedIndex = select.getBlockIndex( clientId, rootClientId );
1210
+ return dispatch.insertDefaultBlock( {}, rootClientId, firstSelectedIndex );
1211
+ };
1367
1212
 
1368
1213
  /**
1369
- * Generator used to insert an empty block before a given block.
1214
+ * Action that inserts an empty block after a given block.
1370
1215
  *
1371
1216
  * @param {string} clientId
1372
1217
  */
1373
- export function* insertAfterBlock( clientId ) {
1218
+ export const insertAfterBlock = ( clientId ) => ( { select, dispatch } ) => {
1374
1219
  if ( ! clientId ) {
1375
1220
  return;
1376
1221
  }
1377
- const rootClientId = yield controls.select(
1378
- blockEditorStoreName,
1379
- 'getBlockRootClientId',
1380
- clientId
1381
- );
1382
- const isLocked = yield controls.select(
1383
- blockEditorStoreName,
1384
- 'getTemplateLock',
1385
- rootClientId
1386
- );
1222
+ const rootClientId = select.getBlockRootClientId( clientId );
1223
+ const isLocked = select.getTemplateLock( rootClientId );
1387
1224
  if ( isLocked ) {
1388
1225
  return;
1389
1226
  }
1390
1227
 
1391
- const firstSelectedIndex = yield controls.select(
1392
- blockEditorStoreName,
1393
- 'getBlockIndex',
1394
- clientId,
1395
- rootClientId
1228
+ const firstSelectedIndex = select.getBlockIndex( clientId, rootClientId );
1229
+ return dispatch.insertDefaultBlock(
1230
+ {},
1231
+ rootClientId,
1232
+ firstSelectedIndex + 1
1396
1233
  );
1397
- return yield insertDefaultBlock( {}, rootClientId, firstSelectedIndex + 1 );
1398
- }
1234
+ };
1399
1235
 
1400
1236
  /**
1401
- * Returns an action object that toggles the highlighted block state.
1237
+ * Action that toggles the highlighted block state.
1402
1238
  *
1403
1239
  * @param {string} clientId The block's clientId.
1404
1240
  * @param {boolean} isHighlighted The highlight state.
@@ -1412,22 +1248,18 @@ export function toggleBlockHighlight( clientId, isHighlighted ) {
1412
1248
  }
1413
1249
 
1414
1250
  /**
1415
- * Yields action objects used in signalling that the block corresponding to the
1416
- * given clientId should appear to "flash" by rhythmically highlighting it.
1251
+ * Action that "flashes" the block with a given `clientId` by rhythmically highlighting it.
1417
1252
  *
1418
1253
  * @param {string} clientId Target block client ID.
1419
1254
  */
1420
- export function* flashBlock( clientId ) {
1421
- yield toggleBlockHighlight( clientId, true );
1422
- yield {
1423
- type: 'SLEEP',
1424
- duration: 150,
1425
- };
1426
- yield toggleBlockHighlight( clientId, false );
1427
- }
1255
+ export const flashBlock = ( clientId ) => async ( { dispatch } ) => {
1256
+ dispatch( toggleBlockHighlight( clientId, true ) );
1257
+ await new Promise( ( resolve ) => setTimeout( resolve, 150 ) );
1258
+ dispatch( toggleBlockHighlight( clientId, false ) );
1259
+ };
1428
1260
 
1429
1261
  /**
1430
- * Returns an action object that sets whether the block has controlled innerblocks.
1262
+ * Action that sets whether a block has controlled inner blocks.
1431
1263
  *
1432
1264
  * @param {string} clientId The block's clientId.
1433
1265
  * @param {boolean} hasControlledInnerBlocks True if the block's inner blocks are controlled.