@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
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-editor/src/store/actions.js"],"names":["castArray","findKey","first","isObject","last","some","cloneBlock","__experimentalCloneSanitizedBlock","createBlock","doBlocksMatchTemplate","getBlockType","getDefaultBlockName","hasBlockSupport","switchToBlockType","synchronizeBlocksWithTemplate","speak","__","_n","sprintf","controls","create","insert","remove","toHTMLString","deprecated","__unstableMarkAutomaticChangeFinalControl","STORE_NAME","blockEditorStoreName","ensureDefaultBlock","count","select","__unstableHasCustomAppender","insertDefaultBlock","resetBlocks","blocks","type","validateBlocksToTemplate","template","templateLock","isBlocksValidToTemplate","isValidTemplate","setTemplateValidity","resetSelection","selectionStart","selectionEnd","initialPosition","receiveBlocks","since","alternative","updateBlockAttributes","clientIds","attributes","uniqueByBlock","updateBlock","clientId","updates","selectBlock","selectPreviousBlock","previousBlockClientId","selectNextBlock","nextBlockClientId","startMultiSelect","stopMultiSelect","multiSelect","start","end","startBlockRootClientId","endBlockRootClientId","blockCount","clearSelectedBlock","toggleSelection","isSelectionEnabled","getBlocksWithDefaultStylesApplied","blockEditorSettings","preferredStyleVariations","__experimentalPreferredStyleVariations","value","map","block","blockName","name","className","includes","blockStyle","trim","replaceBlocks","indexToSelect","meta","rootClientId","index","length","canInsertBlock","time","Date","now","replaceBlock","createOnMove","canMoveBlocks","moveBlocksDown","moveBlocksUp","moveBlocksToPosition","fromRootClientId","toRootClientId","canRemoveBlocks","action","canInsertBlocks","moveBlockToPosition","insertBlock","updateSelection","insertBlocks","plugin","hint","allowedBlocks","isValid","push","showInsertionPoint","__unstableOptions","__unstableWithInserter","hideInsertionPoint","synchronizeTemplate","updatedBlockList","mergeBlocks","firstBlockClientId","secondBlockClientId","clientIdA","clientIdB","blockA","blockAType","merge","blockB","blockBType","attributeKey","offset","selectedBlockType","attributeDefinition","canRestoreTextSelection","undefined","window","console","error","START_OF_SELECTED_AREA","cloneA","cloneB","selectedBlock","html","multiline","multilineTag","__unstableMultilineWrapperTags","multilineWrapperTags","__unstablePreserveWhiteSpace","preserveWhiteSpace","blocksWithTheSameType","updatedAttributes","newAttributeKey","v","indexOf","convertedHtml","convertedValue","newOffset","text","newValue","newHtml","selectionChange","slice","removeBlocks","selectPrevious","previousBlockId","defaultBlockId","removeBlock","replaceInnerBlocks","toggleBlockMode","startTyping","stopTyping","startDraggingBlocks","stopDraggingBlocks","enterFormattedText","exitFormattedText","startOffset","endOffset","defaultBlockName","updateBlockListSettings","settings","updateSettings","__unstableSaveReusableBlock","id","updatedId","__unstableMarkLastChangeAsPersistent","__unstableMarkNextChangeAsNotPersistent","__unstableMarkAutomaticChange","__unstableMarkAutomaticChangeFinal","setNavigationMode","isNavigationMode","setBlockMovingClientId","hasBlockMovingClientId","duplicateBlocks","blockNames","lastSelectedIndex","clonedBlocks","insertBeforeBlock","isLocked","firstSelectedIndex","insertAfterBlock","toggleBlockHighlight","isHighlighted","flashBlock","duration","setHasControlledInnerBlocks","hasControlledInnerBlocks"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAT,EAAoBC,OAApB,EAA6BC,KAA7B,EAAoCC,QAApC,EAA8CC,IAA9C,EAAoDC,IAApD,QAAgE,QAAhE;AAEA;AACA;AACA;;AACA,SACCC,UADD,EAECC,iCAFD,EAGCC,WAHD,EAICC,qBAJD,EAKCC,YALD,EAMCC,mBAND,EAOCC,eAPD,EAQCC,iBARD,EASCC,6BATD,QAUO,mBAVP;AAWA,SAASC,KAAT,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B;AACA,QAAM;AACLnB,IAAAA,IAAI,EAAE,OADD;AAEL0K,IAAAA,QAAQ,EAAE;AAFL,GAAN;AAIA,QAAMH,oBAAoB,CAAEpJ,QAAF,EAAY,KAAZ,CAA1B;AACA;AAED;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASwJ,2BAAT,CACNxJ,QADM,EAENyJ,wBAFM,EAGL;AACD,SAAO;AACN5K,IAAAA,IAAI,EAAE,iCADA;AAEN4K,IAAAA,wBAFM;AAGNzJ,IAAAA;AAHM,GAAP;AAKA","sourcesContent":["/**\n * External dependencies\n */\nimport { castArray, findKey, first, isObject, last, some } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcloneBlock,\n\t__experimentalCloneSanitizedBlock,\n\tcreateBlock,\n\tdoBlocksMatchTemplate,\n\tgetBlockType,\n\tgetDefaultBlockName,\n\thasBlockSupport,\n\tswitchToBlockType,\n\tsynchronizeBlocksWithTemplate,\n} from '@wordpress/blocks';\nimport { speak } from '@wordpress/a11y';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { controls } from '@wordpress/data';\nimport { create, insert, remove, toHTMLString } from '@wordpress/rich-text';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { __unstableMarkAutomaticChangeFinalControl } from '../store/controls';\nimport { STORE_NAME as blockEditorStoreName } from './constants';\n\n/**\n * Generator which will yield a default block insert action if there\n * are no other blocks at the root of the editor. This generator should be used\n * in actions which may result in no blocks remaining in the editor (removal,\n * replacement, etc).\n */\nfunction* ensureDefaultBlock() {\n\tconst count = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'getBlockCount'\n\t);\n\n\t// To avoid a focus loss when removing the last block, assure there is\n\t// always a default block if the last of the blocks have been removed.\n\tif ( count === 0 ) {\n\t\tconst { __unstableHasCustomAppender } = yield controls.select(\n\t\t\tblockEditorStoreName,\n\t\t\t'getSettings'\n\t\t);\n\n\t\t// If there's an custom appender, don't insert default block.\n\t\t// We have to remember to manually move the focus elsewhere to\n\t\t// prevent it from being lost though.\n\t\tif ( __unstableHasCustomAppender ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn yield insertDefaultBlock();\n\t}\n}\n\n/**\n * Returns an action object used in signalling that blocks state should be\n * reset to the specified array of blocks, taking precedence over any other\n * content reflected as an edit in state.\n *\n * @param {Array} blocks Array of blocks.\n */\nexport function* resetBlocks( blocks ) {\n\tyield {\n\t\ttype: 'RESET_BLOCKS',\n\t\tblocks,\n\t};\n\treturn yield* validateBlocksToTemplate( blocks );\n}\n\n/**\n * Block validity is a function of blocks state (at the point of a\n * reset) and the template setting. As a compromise to its placement\n * across distinct parts of state, it is implemented here as a side-\n * effect of the block reset action.\n *\n * @param {Array} blocks Array of blocks.\n */\nexport function* validateBlocksToTemplate( blocks ) {\n\tconst template = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'getTemplate'\n\t);\n\tconst templateLock = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'getTemplateLock'\n\t);\n\n\t// Unlocked templates are considered always valid because they act\n\t// as default values only.\n\tconst isBlocksValidToTemplate =\n\t\t! template ||\n\t\ttemplateLock !== 'all' ||\n\t\tdoBlocksMatchTemplate( blocks, template );\n\n\t// Update if validity has changed.\n\tconst isValidTemplate = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'isValidTemplate'\n\t);\n\n\tif ( isBlocksValidToTemplate !== isValidTemplate ) {\n\t\tyield setTemplateValidity( isBlocksValidToTemplate );\n\t\treturn isBlocksValidToTemplate;\n\t}\n}\n\n/**\n * A block selection object.\n *\n * @typedef {Object} WPBlockSelection\n *\n * @property {string} clientId A block client ID.\n * @property {string} attributeKey A block attribute key.\n * @property {number} offset An attribute value offset, based on the rich\n * text value. See `wp.richText.create`.\n */\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * Returns an action object used in signalling that selection state should be\n * reset to the specified selection.\n *\n * @param {WPBlockSelection} selectionStart The selection start.\n * @param {WPBlockSelection} selectionEnd The selection end.\n * @param {0|-1|null} initialPosition Initial block position.\n *\n * @return {Object} Action object.\n */\nexport function resetSelection(\n\tselectionStart,\n\tselectionEnd,\n\tinitialPosition\n) {\n\t/* eslint-enable jsdoc/valid-types */\n\treturn {\n\t\ttype: 'RESET_SELECTION',\n\t\tselectionStart,\n\t\tselectionEnd,\n\t\tinitialPosition,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that blocks have been received.\n * Unlike resetBlocks, these should be appended to the existing known set, not\n * replacing.\n *\n * @deprecated\n *\n * @param {Object[]} blocks Array of block objects.\n *\n * @return {Object} Action object.\n */\nexport function receiveBlocks( blocks ) {\n\tdeprecated( 'wp.data.dispatch( \"core/block-editor\" ).receiveBlocks', {\n\t\tsince: '5.9',\n\t\talternative: 'resetBlocks or insertBlocks',\n\t} );\n\n\treturn {\n\t\ttype: 'RECEIVE_BLOCKS',\n\t\tblocks,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the multiple blocks'\n * attributes with the specified client IDs have been updated.\n *\n * @param {string|string[]} clientIds Block client IDs.\n * @param {Object} attributes Block attributes to be merged. Should be keyed by clientIds if\n * uniqueByBlock is true.\n * @param {boolean} uniqueByBlock true if each block in clientIds array has a unique set of attributes\n * @return {Object} Action object.\n */\nexport function updateBlockAttributes(\n\tclientIds,\n\tattributes,\n\tuniqueByBlock = false\n) {\n\treturn {\n\t\ttype: 'UPDATE_BLOCK_ATTRIBUTES',\n\t\tclientIds: castArray( clientIds ),\n\t\tattributes,\n\t\tuniqueByBlock,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the block with the\n * specified client ID has been updated.\n *\n * @param {string} clientId Block client ID.\n * @param {Object} updates Block attributes to be merged.\n *\n * @return {Object} Action object.\n */\nexport function updateBlock( clientId, updates ) {\n\treturn {\n\t\ttype: 'UPDATE_BLOCK',\n\t\tclientId,\n\t\tupdates,\n\t};\n}\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * Returns an action object used in signalling that the block with the\n * specified client ID has been selected, optionally accepting a position\n * value reflecting its selection directionality. An initialPosition of -1\n * reflects a reverse selection.\n *\n * @param {string} clientId Block client ID.\n * @param {0|-1|null} initialPosition Optional initial position. Pass as -1 to\n * reflect reverse selection.\n *\n * @return {Object} Action object.\n */\nexport function selectBlock( clientId, initialPosition = 0 ) {\n\t/* eslint-enable jsdoc/valid-types */\n\treturn {\n\t\ttype: 'SELECT_BLOCK',\n\t\tinitialPosition,\n\t\tclientId,\n\t};\n}\n\n/**\n * Yields action objects used in signalling that the block preceding the given\n * clientId should be selected.\n *\n * @param {string} clientId Block client ID.\n */\nexport function* selectPreviousBlock( clientId ) {\n\tconst previousBlockClientId = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'getPreviousBlockClientId',\n\t\tclientId\n\t);\n\n\tif ( previousBlockClientId ) {\n\t\tyield selectBlock( previousBlockClientId, -1 );\n\t\treturn [ previousBlockClientId ];\n\t}\n}\n\n/**\n * Yields action objects used in signalling that the block following the given\n * clientId should be selected.\n *\n * @param {string} clientId Block client ID.\n */\nexport function* selectNextBlock( clientId ) {\n\tconst nextBlockClientId = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'getNextBlockClientId',\n\t\tclientId\n\t);\n\n\tif ( nextBlockClientId ) {\n\t\tyield selectBlock( nextBlockClientId );\n\t\treturn [ nextBlockClientId ];\n\t}\n}\n\n/**\n * Returns an action object used in signalling that a block multi-selection has started.\n *\n * @return {Object} Action object.\n */\nexport function startMultiSelect() {\n\treturn {\n\t\ttype: 'START_MULTI_SELECT',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that block multi-selection stopped.\n *\n * @return {Object} Action object.\n */\nexport function stopMultiSelect() {\n\treturn {\n\t\ttype: 'STOP_MULTI_SELECT',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that block multi-selection changed.\n *\n * @param {string} start First block of the multi selection.\n * @param {string} end Last block of the multiselection.\n */\nexport function* multiSelect( start, end ) {\n\tconst startBlockRootClientId = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'getBlockRootClientId',\n\t\tstart\n\t);\n\tconst endBlockRootClientId = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'getBlockRootClientId',\n\t\tend\n\t);\n\n\t// Only allow block multi-selections at the same level.\n\tif ( startBlockRootClientId !== endBlockRootClientId ) {\n\t\treturn;\n\t}\n\n\tyield {\n\t\ttype: 'MULTI_SELECT',\n\t\tstart,\n\t\tend,\n\t};\n\n\tconst blockCount = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'getSelectedBlockCount'\n\t);\n\n\tspeak(\n\t\tsprintf(\n\t\t\t/* translators: %s: number of selected blocks */\n\t\t\t_n( '%s block selected.', '%s blocks selected.', blockCount ),\n\t\t\tblockCount\n\t\t),\n\t\t'assertive'\n\t);\n}\n\n/**\n * Returns an action object used in signalling that the block selection is cleared.\n *\n * @return {Object} Action object.\n */\nexport function clearSelectedBlock() {\n\treturn {\n\t\ttype: 'CLEAR_SELECTED_BLOCK',\n\t};\n}\n\n/**\n * Returns an action object that enables or disables block selection.\n *\n * @param {boolean} [isSelectionEnabled=true] Whether block selection should\n * be enabled.\n *\n * @return {Object} Action object.\n */\nexport function toggleSelection( isSelectionEnabled = true ) {\n\treturn {\n\t\ttype: 'TOGGLE_SELECTION',\n\t\tisSelectionEnabled,\n\t};\n}\n\nfunction getBlocksWithDefaultStylesApplied( blocks, blockEditorSettings ) {\n\tconst preferredStyleVariations =\n\t\tblockEditorSettings?.__experimentalPreferredStyleVariations?.value ??\n\t\t{};\n\treturn blocks.map( ( block ) => {\n\t\tconst blockName = block.name;\n\t\tif ( ! hasBlockSupport( blockName, 'defaultStylePicker', true ) ) {\n\t\t\treturn block;\n\t\t}\n\t\tif ( ! preferredStyleVariations[ blockName ] ) {\n\t\t\treturn block;\n\t\t}\n\t\tconst className = block.attributes?.className;\n\t\tif ( className?.includes( 'is-style-' ) ) {\n\t\t\treturn block;\n\t\t}\n\t\tconst { attributes = {} } = block;\n\t\tconst blockStyle = preferredStyleVariations[ blockName ];\n\t\treturn {\n\t\t\t...block,\n\t\t\tattributes: {\n\t\t\t\t...attributes,\n\t\t\t\tclassName: `${\n\t\t\t\t\tclassName || ''\n\t\t\t\t} is-style-${ blockStyle }`.trim(),\n\t\t\t},\n\t\t};\n\t} );\n}\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * Returns an action object signalling that a blocks should be replaced with\n * one or more replacement blocks.\n *\n * @param {(string|string[])} clientIds Block client ID(s) to replace.\n * @param {(Object|Object[])} blocks Replacement block(s).\n * @param {number} indexToSelect Index of replacement block to select.\n * @param {0|-1|null} initialPosition Index of caret after in the selected block after the operation.\n * @param {?Object} meta Optional Meta values to be passed to the action object.\n *\n * @yield {Object} Action object.\n */\nexport function* replaceBlocks(\n\tclientIds,\n\tblocks,\n\tindexToSelect,\n\tinitialPosition = 0,\n\tmeta\n) {\n\t/* eslint-enable jsdoc/valid-types */\n\tclientIds = castArray( clientIds );\n\tblocks = getBlocksWithDefaultStylesApplied(\n\t\tcastArray( blocks ),\n\t\tyield controls.select( blockEditorStoreName, 'getSettings' )\n\t);\n\tconst rootClientId = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'getBlockRootClientId',\n\t\tfirst( clientIds )\n\t);\n\t// Replace is valid if the new blocks can be inserted in the root block.\n\tfor ( let index = 0; index < blocks.length; index++ ) {\n\t\tconst block = blocks[ index ];\n\t\tconst canInsertBlock = yield controls.select(\n\t\t\tblockEditorStoreName,\n\t\t\t'canInsertBlockType',\n\t\t\tblock.name,\n\t\t\trootClientId\n\t\t);\n\t\tif ( ! canInsertBlock ) {\n\t\t\treturn;\n\t\t}\n\t}\n\tyield {\n\t\ttype: 'REPLACE_BLOCKS',\n\t\tclientIds,\n\t\tblocks,\n\t\ttime: Date.now(),\n\t\tindexToSelect,\n\t\tinitialPosition,\n\t\tmeta,\n\t};\n\tyield* ensureDefaultBlock();\n}\n\n/**\n * Returns an action object signalling that a single block should be replaced\n * with one or more replacement blocks.\n *\n * @param {(string|string[])} clientId Block client ID to replace.\n * @param {(Object|Object[])} block Replacement block(s).\n *\n * @return {Object} Action object.\n */\nexport function replaceBlock( clientId, block ) {\n\treturn replaceBlocks( clientId, block );\n}\n\n/**\n * Higher-order action creator which, given the action type to dispatch creates\n * an action creator for managing block movement.\n *\n * @param {string} type Action type to dispatch.\n *\n * @return {Function} Action creator.\n */\nfunction createOnMove( type ) {\n\treturn function* ( clientIds, rootClientId ) {\n\t\tconst canMoveBlocks = yield controls.select(\n\t\t\tblockEditorStoreName,\n\t\t\t'canMoveBlocks',\n\t\t\tclientIds,\n\t\t\trootClientId\n\t\t);\n\n\t\t// If one of the blocks is locked or the parent is locked, we cannot move any block.\n\t\tif ( ! canMoveBlocks ) {\n\t\t\treturn;\n\t\t}\n\n\t\tyield {\n\t\t\tclientIds: castArray( clientIds ),\n\t\t\ttype,\n\t\t\trootClientId,\n\t\t};\n\t};\n}\n\nexport const moveBlocksDown = createOnMove( 'MOVE_BLOCKS_DOWN' );\nexport const moveBlocksUp = createOnMove( 'MOVE_BLOCKS_UP' );\n\n/**\n * Returns an action object signalling that the given blocks should be moved to\n * a new position.\n *\n * @param {?string} clientIds The client IDs of the blocks.\n * @param {?string} fromRootClientId Root client ID source.\n * @param {?string} toRootClientId Root client ID destination.\n * @param {number} index The index to move the blocks to.\n *\n * @yield {Object} Action object.\n */\nexport function* moveBlocksToPosition(\n\tclientIds,\n\tfromRootClientId = '',\n\ttoRootClientId = '',\n\tindex\n) {\n\tconst canMoveBlocks = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'canMoveBlocks',\n\t\tclientIds,\n\t\tfromRootClientId\n\t);\n\n\tconst canRemoveBlocks = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'canRemoveBlocks',\n\t\tclientIds,\n\t\tfromRootClientId\n\t);\n\n\t// If one of the blocks is locked or the parent is locked, we cannot move any block.\n\tif ( ! canMoveBlocks ) {\n\t\treturn;\n\t}\n\n\tconst action = {\n\t\ttype: 'MOVE_BLOCKS_TO_POSITION',\n\t\tfromRootClientId,\n\t\ttoRootClientId,\n\t\tclientIds,\n\t\tindex,\n\t};\n\n\t// If moving inside the same root block the move is always possible.\n\tif ( fromRootClientId === toRootClientId ) {\n\t\tyield action;\n\t\treturn;\n\t}\n\n\t// If we're moving to another block, it means we're deleting blocks from\n\t// the original block, so we need to check if removing is possible.\n\tif ( ! canRemoveBlocks ) {\n\t\treturn;\n\t}\n\n\tconst canInsertBlocks = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'canInsertBlocks',\n\t\tclientIds,\n\t\ttoRootClientId\n\t);\n\n\t// 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.\n\tif ( canInsertBlocks ) {\n\t\tyield action;\n\t}\n}\n\n/**\n * Returns an action object signalling that the given block should be moved to a\n * new position.\n *\n * @param {?string} clientId The client ID of the block.\n * @param {?string} fromRootClientId Root client ID source.\n * @param {?string} toRootClientId Root client ID destination.\n * @param {number} index The index to move the block to.\n *\n * @yield {Object} Action object.\n */\nexport function* moveBlockToPosition(\n\tclientId,\n\tfromRootClientId = '',\n\ttoRootClientId = '',\n\tindex\n) {\n\tyield moveBlocksToPosition(\n\t\t[ clientId ],\n\t\tfromRootClientId,\n\t\ttoRootClientId,\n\t\tindex\n\t);\n}\n\n/**\n * Returns an action object used in signalling that a single block should be\n * inserted, optionally at a specific index respective a root block list.\n *\n * @param {Object} block Block object to insert.\n * @param {?number} index Index at which block should be inserted.\n * @param {?string} rootClientId Optional root client ID of block list on which to insert.\n * @param {?boolean} updateSelection If true block selection will be updated. If false, block selection will not change. Defaults to true.\n * @param {?Object} meta Optional Meta values to be passed to the action object.\n *\n * @return {Object} Action object.\n */\nexport function insertBlock(\n\tblock,\n\tindex,\n\trootClientId,\n\tupdateSelection = true,\n\tmeta\n) {\n\treturn insertBlocks(\n\t\t[ block ],\n\t\tindex,\n\t\trootClientId,\n\t\tupdateSelection,\n\t\t0,\n\t\tmeta\n\t);\n}\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * Returns an action object used in signalling that an array of blocks should\n * be inserted, optionally at a specific index respective a root block list.\n *\n * @param {Object[]} blocks Block objects to insert.\n * @param {?number} index Index at which block should be inserted.\n * @param {?string} rootClientId Optional root client ID of block list on which to insert.\n * @param {?boolean} updateSelection If true block selection will be updated. If false, block selection will not change. Defaults to true.\n * @param {0|-1|null} initialPosition Initial focus position. Setting it to null prevent focusing the inserted block.\n * @param {?Object} meta Optional Meta values to be passed to the action object.\n * @return {Object} Action object.\n */\nexport function* insertBlocks(\n\tblocks,\n\tindex,\n\trootClientId,\n\tupdateSelection = true,\n\tinitialPosition = 0,\n\tmeta\n) {\n\t/* eslint-enable jsdoc/valid-types */\n\tif ( isObject( initialPosition ) ) {\n\t\tmeta = initialPosition;\n\t\tinitialPosition = 0;\n\t\tdeprecated( \"meta argument in wp.data.dispatch('core/block-editor')\", {\n\t\t\tsince: '10.1',\n\t\t\tplugin: 'Gutenberg',\n\t\t\thint: 'The meta argument is now the 6th argument of the function',\n\t\t} );\n\t}\n\n\tblocks = getBlocksWithDefaultStylesApplied(\n\t\tcastArray( blocks ),\n\t\tyield controls.select( blockEditorStoreName, 'getSettings' )\n\t);\n\tconst allowedBlocks = [];\n\tfor ( const block of blocks ) {\n\t\tconst isValid = yield controls.select(\n\t\t\tblockEditorStoreName,\n\t\t\t'canInsertBlockType',\n\t\t\tblock.name,\n\t\t\trootClientId\n\t\t);\n\t\tif ( isValid ) {\n\t\t\tallowedBlocks.push( block );\n\t\t}\n\t}\n\tif ( allowedBlocks.length ) {\n\t\treturn {\n\t\t\ttype: 'INSERT_BLOCKS',\n\t\t\tblocks: allowedBlocks,\n\t\t\tindex,\n\t\t\trootClientId,\n\t\t\ttime: Date.now(),\n\t\t\tupdateSelection,\n\t\t\tinitialPosition: updateSelection ? initialPosition : null,\n\t\t\tmeta,\n\t\t};\n\t}\n}\n\n/**\n * Returns an action object used in signalling that the insertion point should\n * be shown.\n *\n * @param {?string} rootClientId Optional root client ID of block list on\n * which to insert.\n * @param {?number} index Index at which block should be inserted.\n * @param {Object} __unstableOptions Wether or not to show an inserter button.\n *\n * @return {Object} Action object.\n */\nexport function showInsertionPoint(\n\trootClientId,\n\tindex,\n\t__unstableOptions = {}\n) {\n\tconst { __unstableWithInserter } = __unstableOptions;\n\treturn {\n\t\ttype: 'SHOW_INSERTION_POINT',\n\t\trootClientId,\n\t\tindex,\n\t\t__unstableWithInserter,\n\t};\n}\n\n/**\n * Returns an action object hiding the insertion point.\n *\n * @return {Object} Action object.\n */\nexport function hideInsertionPoint() {\n\treturn {\n\t\ttype: 'HIDE_INSERTION_POINT',\n\t};\n}\n\n/**\n * Returns an action object resetting the template validity.\n *\n * @param {boolean} isValid template validity flag.\n *\n * @return {Object} Action object.\n */\nexport function setTemplateValidity( isValid ) {\n\treturn {\n\t\ttype: 'SET_TEMPLATE_VALIDITY',\n\t\tisValid,\n\t};\n}\n\n/**\n * Returns an action object synchronize the template with the list of blocks\n *\n * @return {Object} Action object.\n */\nexport function* synchronizeTemplate() {\n\tyield {\n\t\ttype: 'SYNCHRONIZE_TEMPLATE',\n\t};\n\tconst blocks = yield controls.select( blockEditorStoreName, 'getBlocks' );\n\tconst template = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'getTemplate'\n\t);\n\tconst updatedBlockList = synchronizeBlocksWithTemplate( blocks, template );\n\n\treturn yield resetBlocks( updatedBlockList );\n}\n\n/**\n * Returns an action object used in signalling that two blocks should be merged\n *\n * @param {string} firstBlockClientId Client ID of the first block to merge.\n * @param {string} secondBlockClientId Client ID of the second block to merge.\n */\nexport function* mergeBlocks( firstBlockClientId, secondBlockClientId ) {\n\tconst blocks = [ firstBlockClientId, secondBlockClientId ];\n\tyield {\n\t\ttype: 'MERGE_BLOCKS',\n\t\tblocks,\n\t};\n\n\tconst [ clientIdA, clientIdB ] = blocks;\n\tconst blockA = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'getBlock',\n\t\tclientIdA\n\t);\n\tconst blockAType = getBlockType( blockA.name );\n\n\t// Only focus the previous block if it's not mergeable\n\tif ( blockAType && ! blockAType.merge ) {\n\t\tyield selectBlock( blockA.clientId );\n\t\treturn;\n\t}\n\n\tconst blockB = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'getBlock',\n\t\tclientIdB\n\t);\n\tconst blockBType = getBlockType( blockB.name );\n\tconst { clientId, attributeKey, offset } = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'getSelectionStart'\n\t);\n\tconst selectedBlockType = clientId === clientIdA ? blockAType : blockBType;\n\tconst attributeDefinition = selectedBlockType.attributes[ attributeKey ];\n\tconst canRestoreTextSelection =\n\t\t( clientId === clientIdA || clientId === clientIdB ) &&\n\t\tattributeKey !== undefined &&\n\t\toffset !== undefined &&\n\t\t// We cannot restore text selection if the RichText identifier\n\t\t// is not a defined block attribute key. This can be the case if the\n\t\t// fallback intance ID is used to store selection (and no RichText\n\t\t// identifier is set), or when the identifier is wrong.\n\t\t!! attributeDefinition;\n\n\tif ( ! attributeDefinition ) {\n\t\tif ( typeof attributeKey === 'number' ) {\n\t\t\twindow.console.error(\n\t\t\t\t`RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was ${ typeof attributeKey }`\n\t\t\t);\n\t\t} else {\n\t\t\twindow.console.error(\n\t\t\t\t'The RichText identifier prop does not match any attributes defined by the block.'\n\t\t\t);\n\t\t}\n\t}\n\n\t// A robust way to retain selection position through various transforms\n\t// is to insert a special character at the position and then recover it.\n\tconst START_OF_SELECTED_AREA = '\\u0086';\n\n\t// Clone the blocks so we don't insert the character in a \"live\" block.\n\tconst cloneA = cloneBlock( blockA );\n\tconst cloneB = cloneBlock( blockB );\n\n\tif ( canRestoreTextSelection ) {\n\t\tconst selectedBlock = clientId === clientIdA ? cloneA : cloneB;\n\t\tconst html = selectedBlock.attributes[ attributeKey ];\n\t\tconst {\n\t\t\tmultiline: multilineTag,\n\t\t\t__unstableMultilineWrapperTags: multilineWrapperTags,\n\t\t\t__unstablePreserveWhiteSpace: preserveWhiteSpace,\n\t\t} = attributeDefinition;\n\t\tconst value = insert(\n\t\t\tcreate( {\n\t\t\t\thtml,\n\t\t\t\tmultilineTag,\n\t\t\t\tmultilineWrapperTags,\n\t\t\t\tpreserveWhiteSpace,\n\t\t\t} ),\n\t\t\tSTART_OF_SELECTED_AREA,\n\t\t\toffset,\n\t\t\toffset\n\t\t);\n\n\t\tselectedBlock.attributes[ attributeKey ] = toHTMLString( {\n\t\t\tvalue,\n\t\t\tmultilineTag,\n\t\t\tpreserveWhiteSpace,\n\t\t} );\n\t}\n\n\t// We can only merge blocks with similar types\n\t// thus, we transform the block to merge first\n\tconst blocksWithTheSameType =\n\t\tblockA.name === blockB.name\n\t\t\t? [ cloneB ]\n\t\t\t: switchToBlockType( cloneB, blockA.name );\n\n\t// If the block types can not match, do nothing\n\tif ( ! blocksWithTheSameType || ! blocksWithTheSameType.length ) {\n\t\treturn;\n\t}\n\n\t// Calling the merge to update the attributes and remove the block to be merged\n\tconst updatedAttributes = blockAType.merge(\n\t\tcloneA.attributes,\n\t\tblocksWithTheSameType[ 0 ].attributes\n\t);\n\n\tif ( canRestoreTextSelection ) {\n\t\tconst newAttributeKey = findKey(\n\t\t\tupdatedAttributes,\n\t\t\t( v ) =>\n\t\t\t\ttypeof v === 'string' &&\n\t\t\t\tv.indexOf( START_OF_SELECTED_AREA ) !== -1\n\t\t);\n\t\tconst convertedHtml = updatedAttributes[ newAttributeKey ];\n\t\tconst {\n\t\t\tmultiline: multilineTag,\n\t\t\t__unstableMultilineWrapperTags: multilineWrapperTags,\n\t\t\t__unstablePreserveWhiteSpace: preserveWhiteSpace,\n\t\t} = blockAType.attributes[ newAttributeKey ];\n\t\tconst convertedValue = create( {\n\t\t\thtml: convertedHtml,\n\t\t\tmultilineTag,\n\t\t\tmultilineWrapperTags,\n\t\t\tpreserveWhiteSpace,\n\t\t} );\n\t\tconst newOffset = convertedValue.text.indexOf( START_OF_SELECTED_AREA );\n\t\tconst newValue = remove( convertedValue, newOffset, newOffset + 1 );\n\t\tconst newHtml = toHTMLString( {\n\t\t\tvalue: newValue,\n\t\t\tmultilineTag,\n\t\t\tpreserveWhiteSpace,\n\t\t} );\n\n\t\tupdatedAttributes[ newAttributeKey ] = newHtml;\n\n\t\tyield selectionChange(\n\t\t\tblockA.clientId,\n\t\t\tnewAttributeKey,\n\t\t\tnewOffset,\n\t\t\tnewOffset\n\t\t);\n\t}\n\n\tyield* replaceBlocks(\n\t\t[ blockA.clientId, blockB.clientId ],\n\t\t[\n\t\t\t{\n\t\t\t\t...blockA,\n\t\t\t\tattributes: {\n\t\t\t\t\t...blockA.attributes,\n\t\t\t\t\t...updatedAttributes,\n\t\t\t\t},\n\t\t\t},\n\t\t\t...blocksWithTheSameType.slice( 1 ),\n\t\t],\n\t\t0 // If we don't pass the `indexToSelect` it will default to the last block.\n\t);\n}\n\n/**\n * Yields action objects used in signalling that the blocks corresponding to\n * the set of specified client IDs are to be removed.\n *\n * @param {string|string[]} clientIds Client IDs of blocks to remove.\n * @param {boolean} selectPrevious True if the previous block should be\n * selected when a block is removed.\n */\nexport function* removeBlocks( clientIds, selectPrevious = true ) {\n\tif ( ! clientIds || ! clientIds.length ) {\n\t\treturn;\n\t}\n\n\tclientIds = castArray( clientIds );\n\tconst rootClientId = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'getBlockRootClientId',\n\t\tclientIds[ 0 ]\n\t);\n\tconst canRemoveBlocks = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'canRemoveBlocks',\n\t\tclientIds,\n\t\trootClientId\n\t);\n\n\tif ( ! canRemoveBlocks ) {\n\t\treturn;\n\t}\n\n\tlet previousBlockId;\n\tif ( selectPrevious ) {\n\t\tpreviousBlockId = yield selectPreviousBlock( clientIds[ 0 ] );\n\t} else {\n\t\tpreviousBlockId = yield controls.select(\n\t\t\tblockEditorStoreName,\n\t\t\t'getPreviousBlockClientId',\n\t\t\tclientIds[ 0 ]\n\t\t);\n\t}\n\n\tyield {\n\t\ttype: 'REMOVE_BLOCKS',\n\t\tclientIds,\n\t};\n\n\t// To avoid a focus loss when removing the last block, assure there is\n\t// always a default block if the last of the blocks have been removed.\n\tconst defaultBlockId = yield* ensureDefaultBlock();\n\treturn [ previousBlockId || defaultBlockId ];\n}\n\n/**\n * Returns an action object used in signalling that the block with the\n * specified client ID is to be removed.\n *\n * @param {string} clientId Client ID of block to remove.\n * @param {boolean} selectPrevious True if the previous block should be\n * selected when a block is removed.\n *\n * @return {Object} Action object.\n */\nexport function removeBlock( clientId, selectPrevious ) {\n\treturn removeBlocks( [ clientId ], selectPrevious );\n}\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * Returns an action object used in signalling that the inner blocks with the\n * specified client ID should be replaced.\n *\n * @param {string} rootClientId Client ID of the block whose InnerBlocks will re replaced.\n * @param {Object[]} blocks Block objects to insert as new InnerBlocks\n * @param {?boolean} updateSelection If true block selection will be updated. If false, block selection will not change. Defaults to false.\n * @param {0|-1|null} initialPosition Initial block position.\n * @return {Object} Action object.\n */\nexport function replaceInnerBlocks(\n\trootClientId,\n\tblocks,\n\tupdateSelection = false,\n\tinitialPosition = 0\n) {\n\t/* eslint-enable jsdoc/valid-types */\n\treturn {\n\t\ttype: 'REPLACE_INNER_BLOCKS',\n\t\trootClientId,\n\t\tblocks,\n\t\tupdateSelection,\n\t\tinitialPosition: updateSelection ? initialPosition : null,\n\t\ttime: Date.now(),\n\t};\n}\n\n/**\n * Returns an action object used to toggle the block editing mode between\n * visual and HTML modes.\n *\n * @param {string} clientId Block client ID.\n *\n * @return {Object} Action object.\n */\nexport function toggleBlockMode( clientId ) {\n\treturn {\n\t\ttype: 'TOGGLE_BLOCK_MODE',\n\t\tclientId,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user has begun to type.\n *\n * @return {Object} Action object.\n */\nexport function startTyping() {\n\treturn {\n\t\ttype: 'START_TYPING',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user has stopped typing.\n *\n * @return {Object} Action object.\n */\nexport function stopTyping() {\n\treturn {\n\t\ttype: 'STOP_TYPING',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user has begun to drag blocks.\n *\n * @param {string[]} clientIds An array of client ids being dragged\n *\n * @return {Object} Action object.\n */\nexport function startDraggingBlocks( clientIds = [] ) {\n\treturn {\n\t\ttype: 'START_DRAGGING_BLOCKS',\n\t\tclientIds,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user has stopped dragging blocks.\n *\n * @return {Object} Action object.\n */\nexport function stopDraggingBlocks() {\n\treturn {\n\t\ttype: 'STOP_DRAGGING_BLOCKS',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the caret has entered formatted text.\n *\n * @return {Object} Action object.\n */\nexport function enterFormattedText() {\n\treturn {\n\t\ttype: 'ENTER_FORMATTED_TEXT',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user caret has exited formatted text.\n *\n * @return {Object} Action object.\n */\nexport function exitFormattedText() {\n\treturn {\n\t\ttype: 'EXIT_FORMATTED_TEXT',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user caret has changed\n * position.\n *\n * @param {string} clientId The selected block client ID.\n * @param {string} attributeKey The selected block attribute key.\n * @param {number} startOffset The start offset.\n * @param {number} endOffset The end offset.\n *\n * @return {Object} Action object.\n */\nexport function selectionChange(\n\tclientId,\n\tattributeKey,\n\tstartOffset,\n\tendOffset\n) {\n\treturn {\n\t\ttype: 'SELECTION_CHANGE',\n\t\tclientId,\n\t\tattributeKey,\n\t\tstartOffset,\n\t\tendOffset,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that a new block of the default\n * type should be added to the block list.\n *\n * @param {?Object} attributes Optional attributes of the block to assign.\n * @param {?string} rootClientId Optional root client ID of block list on which\n * to append.\n * @param {?number} index Optional index where to insert the default block\n *\n * @return {Object} Action object\n */\nexport function insertDefaultBlock( attributes, rootClientId, index ) {\n\t// Abort if there is no default block type (if it has been unregistered).\n\tconst defaultBlockName = getDefaultBlockName();\n\tif ( ! defaultBlockName ) {\n\t\treturn;\n\t}\n\n\tconst block = createBlock( defaultBlockName, attributes );\n\n\treturn insertBlock( block, index, rootClientId );\n}\n\n/**\n * Returns an action object that changes the nested settings of a given block.\n *\n * @param {string} clientId Client ID of the block whose nested setting are\n * being received.\n * @param {Object} settings Object with the new settings for the nested block.\n *\n * @return {Object} Action object\n */\nexport function updateBlockListSettings( clientId, settings ) {\n\treturn {\n\t\ttype: 'UPDATE_BLOCK_LIST_SETTINGS',\n\t\tclientId,\n\t\tsettings,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the block editor settings have been updated.\n *\n * @param {Object} settings Updated settings\n *\n * @return {Object} Action object\n */\nexport function updateSettings( settings ) {\n\treturn {\n\t\ttype: 'UPDATE_SETTINGS',\n\t\tsettings,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that a temporary reusable blocks have been saved\n * in order to switch its temporary id with the real id.\n *\n * @param {string} id Reusable block's id.\n * @param {string} updatedId Updated block's id.\n *\n * @return {Object} Action object.\n */\nexport function __unstableSaveReusableBlock( id, updatedId ) {\n\treturn {\n\t\ttype: 'SAVE_REUSABLE_BLOCK_SUCCESS',\n\t\tid,\n\t\tupdatedId,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the last block change should be marked explicitly as persistent.\n *\n * @return {Object} Action object.\n */\nexport function __unstableMarkLastChangeAsPersistent() {\n\treturn { type: 'MARK_LAST_CHANGE_AS_PERSISTENT' };\n}\n\n/**\n * Returns an action object used in signalling that the next block change should be marked explicitly as not persistent.\n *\n * @return {Object} Action object.\n */\nexport function __unstableMarkNextChangeAsNotPersistent() {\n\treturn { type: 'MARK_NEXT_CHANGE_AS_NOT_PERSISTENT' };\n}\n\n/**\n * Returns an action object used in signalling that the last block change is\n * an automatic change, meaning it was not performed by the user, and can be\n * undone using the `Escape` and `Backspace` keys. This action must be called\n * after the change was made, and any actions that are a consequence of it, so\n * it is recommended to be called at the next idle period to ensure all\n * selection changes have been recorded.\n */\nexport function* __unstableMarkAutomaticChange() {\n\tyield { type: 'MARK_AUTOMATIC_CHANGE' };\n\tyield __unstableMarkAutomaticChangeFinalControl();\n}\n\nexport function __unstableMarkAutomaticChangeFinal() {\n\treturn {\n\t\ttype: 'MARK_AUTOMATIC_CHANGE_FINAL',\n\t};\n}\n\n/**\n * Generators that triggers an action used to enable or disable the navigation mode.\n *\n * @param {string} isNavigationMode Enable/Disable navigation mode.\n */\nexport function* setNavigationMode( isNavigationMode = true ) {\n\tyield {\n\t\ttype: 'SET_NAVIGATION_MODE',\n\t\tisNavigationMode,\n\t};\n\n\tif ( isNavigationMode ) {\n\t\tspeak(\n\t\t\t__(\n\t\t\t\t'You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.'\n\t\t\t)\n\t\t);\n\t} else {\n\t\tspeak(\n\t\t\t__(\n\t\t\t\t'You are currently in edit mode. To return to the navigation mode, press Escape.'\n\t\t\t)\n\t\t);\n\t}\n}\n\n/**\n * Generator that triggers an action used to enable or disable the block moving mode.\n *\n * @param {string|null} hasBlockMovingClientId Enable/Disable block moving mode.\n */\nexport function* setBlockMovingClientId( hasBlockMovingClientId = null ) {\n\tyield {\n\t\ttype: 'SET_BLOCK_MOVING_MODE',\n\t\thasBlockMovingClientId,\n\t};\n\n\tif ( hasBlockMovingClientId ) {\n\t\tspeak(\n\t\t\t__(\n\t\t\t\t'Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block.'\n\t\t\t)\n\t\t);\n\t}\n}\n\n/**\n * Generator that triggers an action used to duplicate a list of blocks.\n *\n * @param {string[]} clientIds\n * @param {boolean} updateSelection\n */\nexport function* duplicateBlocks( clientIds, updateSelection = true ) {\n\tif ( ! clientIds && ! clientIds.length ) {\n\t\treturn;\n\t}\n\tconst blocks = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'getBlocksByClientId',\n\t\tclientIds\n\t);\n\tconst rootClientId = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'getBlockRootClientId',\n\t\tclientIds[ 0 ]\n\t);\n\t// Return early if blocks don't exist.\n\tif ( some( blocks, ( block ) => ! block ) ) {\n\t\treturn;\n\t}\n\tconst blockNames = blocks.map( ( block ) => block.name );\n\t// Return early if blocks don't support multiple usage.\n\tif (\n\t\tsome(\n\t\t\tblockNames,\n\t\t\t( blockName ) => ! hasBlockSupport( blockName, 'multiple', true )\n\t\t)\n\t) {\n\t\treturn;\n\t}\n\n\tconst lastSelectedIndex = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'getBlockIndex',\n\t\tlast( castArray( clientIds ) ),\n\t\trootClientId\n\t);\n\tconst clonedBlocks = blocks.map( ( block ) =>\n\t\t__experimentalCloneSanitizedBlock( block )\n\t);\n\tyield insertBlocks(\n\t\tclonedBlocks,\n\t\tlastSelectedIndex + 1,\n\t\trootClientId,\n\t\tupdateSelection\n\t);\n\tif ( clonedBlocks.length > 1 && updateSelection ) {\n\t\tyield multiSelect(\n\t\t\tfirst( clonedBlocks ).clientId,\n\t\t\tlast( clonedBlocks ).clientId\n\t\t);\n\t}\n\treturn clonedBlocks.map( ( block ) => block.clientId );\n}\n\n/**\n * Generator used to insert an empty block after a given block.\n *\n * @param {string} clientId\n */\nexport function* insertBeforeBlock( clientId ) {\n\tif ( ! clientId ) {\n\t\treturn;\n\t}\n\tconst rootClientId = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'getBlockRootClientId',\n\t\tclientId\n\t);\n\tconst isLocked = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'getTemplateLock',\n\t\trootClientId\n\t);\n\tif ( isLocked ) {\n\t\treturn;\n\t}\n\n\tconst firstSelectedIndex = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'getBlockIndex',\n\t\tclientId,\n\t\trootClientId\n\t);\n\treturn yield insertDefaultBlock( {}, rootClientId, firstSelectedIndex );\n}\n\n/**\n * Generator used to insert an empty block before a given block.\n *\n * @param {string} clientId\n */\nexport function* insertAfterBlock( clientId ) {\n\tif ( ! clientId ) {\n\t\treturn;\n\t}\n\tconst rootClientId = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'getBlockRootClientId',\n\t\tclientId\n\t);\n\tconst isLocked = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'getTemplateLock',\n\t\trootClientId\n\t);\n\tif ( isLocked ) {\n\t\treturn;\n\t}\n\n\tconst firstSelectedIndex = yield controls.select(\n\t\tblockEditorStoreName,\n\t\t'getBlockIndex',\n\t\tclientId,\n\t\trootClientId\n\t);\n\treturn yield insertDefaultBlock( {}, rootClientId, firstSelectedIndex + 1 );\n}\n\n/**\n * Returns an action object that toggles the highlighted block state.\n *\n * @param {string} clientId The block's clientId.\n * @param {boolean} isHighlighted The highlight state.\n */\nexport function toggleBlockHighlight( clientId, isHighlighted ) {\n\treturn {\n\t\ttype: 'TOGGLE_BLOCK_HIGHLIGHT',\n\t\tclientId,\n\t\tisHighlighted,\n\t};\n}\n\n/**\n * Yields action objects used in signalling that the block corresponding to the\n * given clientId should appear to \"flash\" by rhythmically highlighting it.\n *\n * @param {string} clientId Target block client ID.\n */\nexport function* flashBlock( clientId ) {\n\tyield toggleBlockHighlight( clientId, true );\n\tyield {\n\t\ttype: 'SLEEP',\n\t\tduration: 150,\n\t};\n\tyield toggleBlockHighlight( clientId, false );\n}\n\n/**\n * Returns an action object that sets whether the block has controlled innerblocks.\n *\n * @param {string} clientId The block's clientId.\n * @param {boolean} hasControlledInnerBlocks True if the block's inner blocks are controlled.\n */\nexport function setHasControlledInnerBlocks(\n\tclientId,\n\thasControlledInnerBlocks\n) {\n\treturn {\n\t\ttype: 'SET_HAS_CONTROLLED_INNER_BLOCKS',\n\t\thasControlledInnerBlocks,\n\t\tclientId,\n\t};\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-editor/src/store/actions.js"],"names":["castArray","findKey","first","isObject","last","some","cloneBlock","__experimentalCloneSanitizedBlock","createBlock","doBlocksMatchTemplate","getBlockType","getDefaultBlockName","hasBlockSupport","switchToBlockType","synchronizeBlocksWithTemplate","speak","__","_n","sprintf","create","insert","remove","toHTMLString","deprecated","ensureDefaultBlock","select","dispatch","count","getBlockCount","__unstableHasCustomAppender","getSettings","insertDefaultBlock","resetBlocks","blocks","type","validateBlocksToTemplate","template","getTemplate","templateLock","getTemplateLock","isBlocksValidToTemplate","isValidTemplate","setTemplateValidity","resetSelection","selectionStart","selectionEnd","initialPosition","receiveBlocks","since","alternative","updateBlockAttributes","clientIds","attributes","uniqueByBlock","updateBlock","clientId","updates","selectBlock","selectPreviousBlock","previousBlockClientId","getPreviousBlockClientId","selectNextBlock","nextBlockClientId","getNextBlockClientId","startMultiSelect","stopMultiSelect","multiSelect","start","end","startBlockRootClientId","getBlockRootClientId","endBlockRootClientId","blockCount","getSelectedBlockCount","clearSelectedBlock","toggleSelection","isSelectionEnabled","getBlocksWithDefaultStylesApplied","blockEditorSettings","preferredStyleVariations","__experimentalPreferredStyleVariations","value","map","block","blockName","name","className","includes","blockStyle","trim","replaceBlocks","indexToSelect","meta","rootClientId","index","length","canInsertBlock","canInsertBlockType","time","Date","now","replaceBlock","createOnMove","canMoveBlocks","moveBlocksDown","moveBlocksUp","moveBlocksToPosition","fromRootClientId","toRootClientId","canRemoveBlocks","canInsertBlocks","moveBlockToPosition","insertBlock","updateSelection","insertBlocks","plugin","hint","allowedBlocks","isValid","push","showInsertionPoint","__unstableOptions","__unstableWithInserter","hideInsertionPoint","synchronizeTemplate","getBlocks","updatedBlockList","mergeBlocks","firstBlockClientId","secondBlockClientId","clientIdA","clientIdB","blockA","getBlock","blockAType","merge","blockB","blockBType","attributeKey","offset","getSelectionStart","selectedBlockType","attributeDefinition","canRestoreTextSelection","undefined","window","console","error","START_OF_SELECTED_AREA","cloneA","cloneB","selectedBlock","html","multiline","multilineTag","__unstableMultilineWrapperTags","multilineWrapperTags","__unstablePreserveWhiteSpace","preserveWhiteSpace","blocksWithTheSameType","updatedAttributes","newAttributeKey","v","indexOf","convertedHtml","convertedValue","newOffset","text","newValue","newHtml","selectionChange","slice","removeBlocks","selectPrevious","removeBlock","replaceInnerBlocks","toggleBlockMode","startTyping","stopTyping","startDraggingBlocks","stopDraggingBlocks","enterFormattedText","exitFormattedText","startOffset","endOffset","defaultBlockName","updateBlockListSettings","settings","updateSettings","__unstableSaveReusableBlock","id","updatedId","__unstableMarkLastChangeAsPersistent","__unstableMarkNextChangeAsNotPersistent","__unstableMarkAutomaticChange","requestIdleCallback","cb","setTimeout","setNavigationMode","isNavigationMode","setBlockMovingClientId","hasBlockMovingClientId","duplicateBlocks","getBlocksByClientId","blockNames","lastSelectedIndex","getBlockIndex","clonedBlocks","insertBeforeBlock","isLocked","firstSelectedIndex","insertAfterBlock","toggleBlockHighlight","isHighlighted","flashBlock","Promise","resolve","setHasControlledInnerBlocks","hasControlledInnerBlocks"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAT,EAAoBC,OAApB,EAA6BC,KAA7B,EAAoCC,QAApC,EAA8CC,IAA9C,EAAoDC,IAApD,QAAgE,QAAhE;AAEA;AACA;AACA;;AACA,SACCC,UADD,EAECC,iCAFD,EAGCC,WAHD,EAICC,qBAJD,EAKCC,YALD,EAMCC,mBAND,EAOCC,eAPD,EAQCC,iBARD,EASCC,6BATD,QAUO,mBAVP;AAWA,SAASC,KAAT,QAAsB,iBAAtB;AACA,SAASC,EAAT,EAAaC,EAAb,EAAiBC,OAAjB,QAAgC,iBAAhC;AACA,SAASC,MAAT,EAAiBC,MAAjB,EAAyBC,MAAzB,EAAiCC,YAAjC,QAAqD,sBAArD;AACA,OAAOC,UAAP,MAAuB,uBAAvB;AAEA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,kBAAkB,GAAG,MAAM,QAA4B;AAAA,MAA1B;AAAEC,IAAAA,MAAF;AAAUC,IAAAA;AAAV,GAA0B;AAC5D;AACA;AACA,QAAMC,KAAK,GAAGF,MAAM,CAACG,aAAP,EAAd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0B;AAAA,MAAlB;AAAE7B,IAAAA;AAAF,GAAkB;AACnEA,EAAAA,QAAQ,CAAE0L,oBAAoB,CAAE7J,QAAF,EAAY,IAAZ,CAAtB,CAAR;AACA,QAAM,IAAIgK,OAAJ,CAAeC,OAAF,IAAenB,UAAU,CAAEmB,OAAF,EAAW,GAAX,CAAtC,CAAN;AACA9L,EAAAA,QAAQ,CAAE0L,oBAAoB,CAAE7J,QAAF,EAAY,KAAZ,CAAtB,CAAR;AACA,CAJM;AAMP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASkK,2BAAT,CACNlK,QADM,EAENmK,wBAFM,EAGL;AACD,SAAO;AACNxL,IAAAA,IAAI,EAAE,iCADA;AAENwL,IAAAA,wBAFM;AAGNnK,IAAAA;AAHM,GAAP;AAKA","sourcesContent":["/**\n * External dependencies\n */\nimport { castArray, findKey, first, isObject, last, some } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcloneBlock,\n\t__experimentalCloneSanitizedBlock,\n\tcreateBlock,\n\tdoBlocksMatchTemplate,\n\tgetBlockType,\n\tgetDefaultBlockName,\n\thasBlockSupport,\n\tswitchToBlockType,\n\tsynchronizeBlocksWithTemplate,\n} from '@wordpress/blocks';\nimport { speak } from '@wordpress/a11y';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { create, insert, remove, toHTMLString } from '@wordpress/rich-text';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Action which will insert a default block insert action if there\n * are no other blocks at the root of the editor. This action should be used\n * in actions which may result in no blocks remaining in the editor (removal,\n * replacement, etc).\n */\nconst ensureDefaultBlock = () => ( { select, dispatch } ) => {\n\t// To avoid a focus loss when removing the last block, assure there is\n\t// always a default block if the last of the blocks have been removed.\n\tconst count = select.getBlockCount();\n\tif ( count > 0 ) {\n\t\treturn;\n\t}\n\n\t// If there's an custom appender, don't insert default block.\n\t// We have to remember to manually move the focus elsewhere to\n\t// prevent it from being lost though.\n\tconst { __unstableHasCustomAppender } = select.getSettings();\n\tif ( __unstableHasCustomAppender ) {\n\t\treturn;\n\t}\n\n\tdispatch.insertDefaultBlock();\n};\n\n/**\n * Action that resets blocks state to the specified array of blocks, taking precedence\n * over any other content reflected as an edit in state.\n *\n * @param {Array} blocks Array of blocks.\n */\nexport const resetBlocks = ( blocks ) => ( { dispatch } ) => {\n\tdispatch( { type: 'RESET_BLOCKS', blocks } );\n\tdispatch( validateBlocksToTemplate( blocks ) );\n};\n\n/**\n * Block validity is a function of blocks state (at the point of a\n * reset) and the template setting. As a compromise to its placement\n * across distinct parts of state, it is implemented here as a side-\n * effect of the block reset action.\n *\n * @param {Array} blocks Array of blocks.\n */\nexport const validateBlocksToTemplate = ( blocks ) => ( {\n\tselect,\n\tdispatch,\n} ) => {\n\tconst template = select.getTemplate();\n\tconst templateLock = select.getTemplateLock();\n\n\t// Unlocked templates are considered always valid because they act\n\t// as default values only.\n\tconst isBlocksValidToTemplate =\n\t\t! template ||\n\t\ttemplateLock !== 'all' ||\n\t\tdoBlocksMatchTemplate( blocks, template );\n\n\t// Update if validity has changed.\n\tconst isValidTemplate = select.isValidTemplate();\n\n\tif ( isBlocksValidToTemplate !== isValidTemplate ) {\n\t\tdispatch.setTemplateValidity( isBlocksValidToTemplate );\n\t\treturn isBlocksValidToTemplate;\n\t}\n};\n\n/**\n * A block selection object.\n *\n * @typedef {Object} WPBlockSelection\n *\n * @property {string} clientId A block client ID.\n * @property {string} attributeKey A block attribute key.\n * @property {number} offset An attribute value offset, based on the rich\n * text value. See `wp.richText.create`.\n */\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * Returns an action object used in signalling that selection state should be\n * reset to the specified selection.\n *\n * @param {WPBlockSelection} selectionStart The selection start.\n * @param {WPBlockSelection} selectionEnd The selection end.\n * @param {0|-1|null} initialPosition Initial block position.\n *\n * @return {Object} Action object.\n */\nexport function resetSelection(\n\tselectionStart,\n\tselectionEnd,\n\tinitialPosition\n) {\n\t/* eslint-enable jsdoc/valid-types */\n\treturn {\n\t\ttype: 'RESET_SELECTION',\n\t\tselectionStart,\n\t\tselectionEnd,\n\t\tinitialPosition,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that blocks have been received.\n * Unlike resetBlocks, these should be appended to the existing known set, not\n * replacing.\n *\n * @deprecated\n *\n * @param {Object[]} blocks Array of block objects.\n *\n * @return {Object} Action object.\n */\nexport function receiveBlocks( blocks ) {\n\tdeprecated( 'wp.data.dispatch( \"core/block-editor\" ).receiveBlocks', {\n\t\tsince: '5.9',\n\t\talternative: 'resetBlocks or insertBlocks',\n\t} );\n\n\treturn {\n\t\ttype: 'RECEIVE_BLOCKS',\n\t\tblocks,\n\t};\n}\n\n/**\n * Action that updates attributes of multiple blocks with the specified client IDs.\n *\n * @param {string|string[]} clientIds Block client IDs.\n * @param {Object} attributes Block attributes to be merged. Should be keyed by clientIds if\n * uniqueByBlock is true.\n * @param {boolean} uniqueByBlock true if each block in clientIds array has a unique set of attributes\n * @return {Object} Action object.\n */\nexport function updateBlockAttributes(\n\tclientIds,\n\tattributes,\n\tuniqueByBlock = false\n) {\n\treturn {\n\t\ttype: 'UPDATE_BLOCK_ATTRIBUTES',\n\t\tclientIds: castArray( clientIds ),\n\t\tattributes,\n\t\tuniqueByBlock,\n\t};\n}\n\n/**\n * Action that updates the block with the specified client ID.\n *\n * @param {string} clientId Block client ID.\n * @param {Object} updates Block attributes to be merged.\n *\n * @return {Object} Action object.\n */\nexport function updateBlock( clientId, updates ) {\n\treturn {\n\t\ttype: 'UPDATE_BLOCK',\n\t\tclientId,\n\t\tupdates,\n\t};\n}\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * Returns an action object used in signalling that the block with the\n * specified client ID has been selected, optionally accepting a position\n * value reflecting its selection directionality. An initialPosition of -1\n * reflects a reverse selection.\n *\n * @param {string} clientId Block client ID.\n * @param {0|-1|null} initialPosition Optional initial position. Pass as -1 to\n * reflect reverse selection.\n *\n * @return {Object} Action object.\n */\nexport function selectBlock( clientId, initialPosition = 0 ) {\n\t/* eslint-enable jsdoc/valid-types */\n\treturn {\n\t\ttype: 'SELECT_BLOCK',\n\t\tinitialPosition,\n\t\tclientId,\n\t};\n}\n\n/**\n * Yields action objects used in signalling that the block preceding the given\n * clientId should be selected.\n *\n * @param {string} clientId Block client ID.\n */\nexport const selectPreviousBlock = ( clientId ) => ( { select, dispatch } ) => {\n\tconst previousBlockClientId = select.getPreviousBlockClientId( clientId );\n\tif ( previousBlockClientId ) {\n\t\tdispatch.selectBlock( previousBlockClientId, -1 );\n\t}\n};\n\n/**\n * Yields action objects used in signalling that the block following the given\n * clientId should be selected.\n *\n * @param {string} clientId Block client ID.\n */\nexport const selectNextBlock = ( clientId ) => ( { select, dispatch } ) => {\n\tconst nextBlockClientId = select.getNextBlockClientId( clientId );\n\tif ( nextBlockClientId ) {\n\t\tdispatch.selectBlock( nextBlockClientId );\n\t}\n};\n\n/**\n * Action that starts block multi-selection.\n *\n * @return {Object} Action object.\n */\nexport function startMultiSelect() {\n\treturn {\n\t\ttype: 'START_MULTI_SELECT',\n\t};\n}\n\n/**\n * Action that stops block multi-selection.\n *\n * @return {Object} Action object.\n */\nexport function stopMultiSelect() {\n\treturn {\n\t\ttype: 'STOP_MULTI_SELECT',\n\t};\n}\n\n/**\n * Action that changes block multi-selection.\n *\n * @param {string} start First block of the multi selection.\n * @param {string} end Last block of the multiselection.\n */\nexport const multiSelect = ( start, end ) => ( { select, dispatch } ) => {\n\tconst startBlockRootClientId = select.getBlockRootClientId( start );\n\tconst endBlockRootClientId = select.getBlockRootClientId( end );\n\n\t// Only allow block multi-selections at the same level.\n\tif ( startBlockRootClientId !== endBlockRootClientId ) {\n\t\treturn;\n\t}\n\n\tdispatch( { type: 'MULTI_SELECT', start, end } );\n\n\tconst blockCount = select.getSelectedBlockCount();\n\n\tspeak(\n\t\tsprintf(\n\t\t\t/* translators: %s: number of selected blocks */\n\t\t\t_n( '%s block selected.', '%s blocks selected.', blockCount ),\n\t\t\tblockCount\n\t\t),\n\t\t'assertive'\n\t);\n};\n\n/**\n * Action that clears the block selection.\n *\n * @return {Object} Action object.\n */\nexport function clearSelectedBlock() {\n\treturn {\n\t\ttype: 'CLEAR_SELECTED_BLOCK',\n\t};\n}\n\n/**\n * Action that enables or disables block selection.\n *\n * @param {boolean} [isSelectionEnabled=true] Whether block selection should\n * be enabled.\n *\n * @return {Object} Action object.\n */\nexport function toggleSelection( isSelectionEnabled = true ) {\n\treturn {\n\t\ttype: 'TOGGLE_SELECTION',\n\t\tisSelectionEnabled,\n\t};\n}\n\nfunction getBlocksWithDefaultStylesApplied( blocks, blockEditorSettings ) {\n\tconst preferredStyleVariations =\n\t\tblockEditorSettings?.__experimentalPreferredStyleVariations?.value ??\n\t\t{};\n\treturn blocks.map( ( block ) => {\n\t\tconst blockName = block.name;\n\t\tif ( ! hasBlockSupport( blockName, 'defaultStylePicker', true ) ) {\n\t\t\treturn block;\n\t\t}\n\t\tif ( ! preferredStyleVariations[ blockName ] ) {\n\t\t\treturn block;\n\t\t}\n\t\tconst className = block.attributes?.className;\n\t\tif ( className?.includes( 'is-style-' ) ) {\n\t\t\treturn block;\n\t\t}\n\t\tconst { attributes = {} } = block;\n\t\tconst blockStyle = preferredStyleVariations[ blockName ];\n\t\treturn {\n\t\t\t...block,\n\t\t\tattributes: {\n\t\t\t\t...attributes,\n\t\t\t\tclassName: `${\n\t\t\t\t\tclassName || ''\n\t\t\t\t} is-style-${ blockStyle }`.trim(),\n\t\t\t},\n\t\t};\n\t} );\n}\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * Action that replaces given blocks with one or more replacement blocks.\n *\n * @param {(string|string[])} clientIds Block client ID(s) to replace.\n * @param {(Object|Object[])} blocks Replacement block(s).\n * @param {number} indexToSelect Index of replacement block to select.\n * @param {0|-1|null} initialPosition Index of caret after in the selected block after the operation.\n * @param {?Object} meta Optional Meta values to be passed to the action object.\n *\n * @return {Object} Action object.\n */\nexport const replaceBlocks = (\n\tclientIds,\n\tblocks,\n\tindexToSelect,\n\tinitialPosition = 0,\n\tmeta\n) => ( { select, dispatch } ) => {\n\t/* eslint-enable jsdoc/valid-types */\n\tclientIds = castArray( clientIds );\n\tblocks = getBlocksWithDefaultStylesApplied(\n\t\tcastArray( blocks ),\n\t\tselect.getSettings()\n\t);\n\tconst rootClientId = select.getBlockRootClientId( first( clientIds ) );\n\t// Replace is valid if the new blocks can be inserted in the root block.\n\tfor ( let index = 0; index < blocks.length; index++ ) {\n\t\tconst block = blocks[ index ];\n\t\tconst canInsertBlock = select.canInsertBlockType(\n\t\t\tblock.name,\n\t\t\trootClientId\n\t\t);\n\t\tif ( ! canInsertBlock ) {\n\t\t\treturn;\n\t\t}\n\t}\n\tdispatch( {\n\t\ttype: 'REPLACE_BLOCKS',\n\t\tclientIds,\n\t\tblocks,\n\t\ttime: Date.now(),\n\t\tindexToSelect,\n\t\tinitialPosition,\n\t\tmeta,\n\t} );\n\tdispatch( ensureDefaultBlock() );\n};\n\n/**\n * Action that replaces a single block with one or more replacement blocks.\n *\n * @param {(string|string[])} clientId Block client ID to replace.\n * @param {(Object|Object[])} block Replacement block(s).\n *\n * @return {Object} Action object.\n */\nexport function replaceBlock( clientId, block ) {\n\treturn replaceBlocks( clientId, block );\n}\n\n/**\n * Higher-order action creator which, given the action type to dispatch creates\n * an action creator for managing block movement.\n *\n * @param {string} type Action type to dispatch.\n *\n * @return {Function} Action creator.\n */\nconst createOnMove = ( type ) => ( clientIds, rootClientId ) => ( {\n\tselect,\n\tdispatch,\n} ) => {\n\t// If one of the blocks is locked or the parent is locked, we cannot move any block.\n\tconst canMoveBlocks = select.canMoveBlocks( clientIds, rootClientId );\n\tif ( ! canMoveBlocks ) {\n\t\treturn;\n\t}\n\n\tdispatch( { type, clientIds: castArray( clientIds ), rootClientId } );\n};\n\nexport const moveBlocksDown = createOnMove( 'MOVE_BLOCKS_DOWN' );\nexport const moveBlocksUp = createOnMove( 'MOVE_BLOCKS_UP' );\n\n/**\n * Action that moves given blocks to a new position.\n *\n * @param {?string} clientIds The client IDs of the blocks.\n * @param {?string} fromRootClientId Root client ID source.\n * @param {?string} toRootClientId Root client ID destination.\n * @param {number} index The index to move the blocks to.\n */\nexport const moveBlocksToPosition = (\n\tclientIds,\n\tfromRootClientId = '',\n\ttoRootClientId = '',\n\tindex\n) => ( { select, dispatch } ) => {\n\tconst canMoveBlocks = select.canMoveBlocks( clientIds, fromRootClientId );\n\n\t// If one of the blocks is locked or the parent is locked, we cannot move any block.\n\tif ( ! canMoveBlocks ) {\n\t\treturn;\n\t}\n\n\t// If moving inside the same root block the move is always possible.\n\tif ( fromRootClientId !== toRootClientId ) {\n\t\tconst canRemoveBlocks = select.canRemoveBlocks(\n\t\t\tclientIds,\n\t\t\tfromRootClientId\n\t\t);\n\n\t\t// If we're moving to another block, it means we're deleting blocks from\n\t\t// the original block, so we need to check if removing is possible.\n\t\tif ( ! canRemoveBlocks ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst canInsertBlocks = select.canInsertBlocks(\n\t\t\tclientIds,\n\t\t\ttoRootClientId\n\t\t);\n\n\t\t// 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.\n\t\tif ( ! canInsertBlocks ) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tdispatch( {\n\t\ttype: 'MOVE_BLOCKS_TO_POSITION',\n\t\tfromRootClientId,\n\t\ttoRootClientId,\n\t\tclientIds,\n\t\tindex,\n\t} );\n};\n\n/**\n * Action that moves given block to a new position.\n *\n * @param {?string} clientId The client ID of the block.\n * @param {?string} fromRootClientId Root client ID source.\n * @param {?string} toRootClientId Root client ID destination.\n * @param {number} index The index to move the block to.\n */\nexport function moveBlockToPosition(\n\tclientId,\n\tfromRootClientId = '',\n\ttoRootClientId = '',\n\tindex\n) {\n\treturn moveBlocksToPosition(\n\t\t[ clientId ],\n\t\tfromRootClientId,\n\t\ttoRootClientId,\n\t\tindex\n\t);\n}\n\n/**\n * Action that inserts a single block, optionally at a specific index respective a root block list.\n *\n * @param {Object} block Block object to insert.\n * @param {?number} index Index at which block should be inserted.\n * @param {?string} rootClientId Optional root client ID of block list on which to insert.\n * @param {?boolean} updateSelection If true block selection will be updated. If false, block selection will not change. Defaults to true.\n * @param {?Object} meta Optional Meta values to be passed to the action object.\n *\n * @return {Object} Action object.\n */\nexport function insertBlock(\n\tblock,\n\tindex,\n\trootClientId,\n\tupdateSelection,\n\tmeta\n) {\n\treturn insertBlocks(\n\t\t[ block ],\n\t\tindex,\n\t\trootClientId,\n\t\tupdateSelection,\n\t\t0,\n\t\tmeta\n\t);\n}\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * Action that inserts an array of blocks, optionally at a specific index respective a root block list.\n *\n * @param {Object[]} blocks Block objects to insert.\n * @param {?number} index Index at which block should be inserted.\n * @param {?string} rootClientId Optional root client ID of block list on which to insert.\n * @param {?boolean} updateSelection If true block selection will be updated. If false, block selection will not change. Defaults to true.\n * @param {0|-1|null} initialPosition Initial focus position. Setting it to null prevent focusing the inserted block.\n * @param {?Object} meta Optional Meta values to be passed to the action object.\n * @return {Object} Action object.\n */\nexport const insertBlocks = (\n\tblocks,\n\tindex,\n\trootClientId,\n\tupdateSelection = true,\n\tinitialPosition = 0,\n\tmeta\n) => ( { select, dispatch } ) => {\n\t/* eslint-enable jsdoc/valid-types */\n\tif ( isObject( initialPosition ) ) {\n\t\tmeta = initialPosition;\n\t\tinitialPosition = 0;\n\t\tdeprecated( \"meta argument in wp.data.dispatch('core/block-editor')\", {\n\t\t\tsince: '10.1',\n\t\t\tplugin: 'Gutenberg',\n\t\t\thint: 'The meta argument is now the 6th argument of the function',\n\t\t} );\n\t}\n\n\tblocks = getBlocksWithDefaultStylesApplied(\n\t\tcastArray( blocks ),\n\t\tselect.getSettings()\n\t);\n\tconst allowedBlocks = [];\n\tfor ( const block of blocks ) {\n\t\tconst isValid = select.canInsertBlockType( block.name, rootClientId );\n\t\tif ( isValid ) {\n\t\t\tallowedBlocks.push( block );\n\t\t}\n\t}\n\tif ( allowedBlocks.length ) {\n\t\tdispatch( {\n\t\t\ttype: 'INSERT_BLOCKS',\n\t\t\tblocks: allowedBlocks,\n\t\t\tindex,\n\t\t\trootClientId,\n\t\t\ttime: Date.now(),\n\t\t\tupdateSelection,\n\t\t\tinitialPosition: updateSelection ? initialPosition : null,\n\t\t\tmeta,\n\t\t} );\n\t}\n};\n\n/**\n * Action that shows the insertion point.\n *\n * @param {?string} rootClientId Optional root client ID of block list on\n * which to insert.\n * @param {?number} index Index at which block should be inserted.\n * @param {Object} __unstableOptions Wether or not to show an inserter button.\n *\n * @return {Object} Action object.\n */\nexport function showInsertionPoint(\n\trootClientId,\n\tindex,\n\t__unstableOptions = {}\n) {\n\tconst { __unstableWithInserter } = __unstableOptions;\n\treturn {\n\t\ttype: 'SHOW_INSERTION_POINT',\n\t\trootClientId,\n\t\tindex,\n\t\t__unstableWithInserter,\n\t};\n}\n\n/**\n * Action that hides the insertion point.\n *\n * @return {Object} Action object.\n */\nexport function hideInsertionPoint() {\n\treturn {\n\t\ttype: 'HIDE_INSERTION_POINT',\n\t};\n}\n\n/**\n * Action that resets the template validity.\n *\n * @param {boolean} isValid template validity flag.\n *\n * @return {Object} Action object.\n */\nexport function setTemplateValidity( isValid ) {\n\treturn {\n\t\ttype: 'SET_TEMPLATE_VALIDITY',\n\t\tisValid,\n\t};\n}\n\n/**\n * Action that synchronizes the template with the list of blocks.\n *\n * @return {Object} Action object.\n */\nexport const synchronizeTemplate = () => ( { select, dispatch } ) => {\n\tdispatch( { type: 'SYNCHRONIZE_TEMPLATE' } );\n\tconst blocks = select.getBlocks();\n\tconst template = select.getTemplate();\n\tconst updatedBlockList = synchronizeBlocksWithTemplate( blocks, template );\n\n\tdispatch.resetBlocks( updatedBlockList );\n};\n\n/**\n * Action that merges two blocks.\n *\n * @param {string} firstBlockClientId Client ID of the first block to merge.\n * @param {string} secondBlockClientId Client ID of the second block to merge.\n */\nexport const mergeBlocks = ( firstBlockClientId, secondBlockClientId ) => ( {\n\tselect,\n\tdispatch,\n} ) => {\n\tconst blocks = [ firstBlockClientId, secondBlockClientId ];\n\tdispatch( { type: 'MERGE_BLOCKS', blocks } );\n\n\tconst [ clientIdA, clientIdB ] = blocks;\n\tconst blockA = select.getBlock( clientIdA );\n\tconst blockAType = getBlockType( blockA.name );\n\n\t// Only focus the previous block if it's not mergeable\n\tif ( blockAType && ! blockAType.merge ) {\n\t\tdispatch.selectBlock( blockA.clientId );\n\t\treturn;\n\t}\n\n\tconst blockB = select.getBlock( clientIdB );\n\tconst blockBType = getBlockType( blockB.name );\n\tconst { clientId, attributeKey, offset } = select.getSelectionStart();\n\tconst selectedBlockType = clientId === clientIdA ? blockAType : blockBType;\n\tconst attributeDefinition = selectedBlockType.attributes[ attributeKey ];\n\tconst canRestoreTextSelection =\n\t\t( clientId === clientIdA || clientId === clientIdB ) &&\n\t\tattributeKey !== undefined &&\n\t\toffset !== undefined &&\n\t\t// We cannot restore text selection if the RichText identifier\n\t\t// is not a defined block attribute key. This can be the case if the\n\t\t// fallback intance ID is used to store selection (and no RichText\n\t\t// identifier is set), or when the identifier is wrong.\n\t\t!! attributeDefinition;\n\n\tif ( ! attributeDefinition ) {\n\t\tif ( typeof attributeKey === 'number' ) {\n\t\t\twindow.console.error(\n\t\t\t\t`RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was ${ typeof attributeKey }`\n\t\t\t);\n\t\t} else {\n\t\t\twindow.console.error(\n\t\t\t\t'The RichText identifier prop does not match any attributes defined by the block.'\n\t\t\t);\n\t\t}\n\t}\n\n\t// A robust way to retain selection position through various transforms\n\t// is to insert a special character at the position and then recover it.\n\tconst START_OF_SELECTED_AREA = '\\u0086';\n\n\t// Clone the blocks so we don't insert the character in a \"live\" block.\n\tconst cloneA = cloneBlock( blockA );\n\tconst cloneB = cloneBlock( blockB );\n\n\tif ( canRestoreTextSelection ) {\n\t\tconst selectedBlock = clientId === clientIdA ? cloneA : cloneB;\n\t\tconst html = selectedBlock.attributes[ attributeKey ];\n\t\tconst {\n\t\t\tmultiline: multilineTag,\n\t\t\t__unstableMultilineWrapperTags: multilineWrapperTags,\n\t\t\t__unstablePreserveWhiteSpace: preserveWhiteSpace,\n\t\t} = attributeDefinition;\n\t\tconst value = insert(\n\t\t\tcreate( {\n\t\t\t\thtml,\n\t\t\t\tmultilineTag,\n\t\t\t\tmultilineWrapperTags,\n\t\t\t\tpreserveWhiteSpace,\n\t\t\t} ),\n\t\t\tSTART_OF_SELECTED_AREA,\n\t\t\toffset,\n\t\t\toffset\n\t\t);\n\n\t\tselectedBlock.attributes[ attributeKey ] = toHTMLString( {\n\t\t\tvalue,\n\t\t\tmultilineTag,\n\t\t\tpreserveWhiteSpace,\n\t\t} );\n\t}\n\n\t// We can only merge blocks with similar types\n\t// thus, we transform the block to merge first\n\tconst blocksWithTheSameType =\n\t\tblockA.name === blockB.name\n\t\t\t? [ cloneB ]\n\t\t\t: switchToBlockType( cloneB, blockA.name );\n\n\t// If the block types can not match, do nothing\n\tif ( ! blocksWithTheSameType || ! blocksWithTheSameType.length ) {\n\t\treturn;\n\t}\n\n\t// Calling the merge to update the attributes and remove the block to be merged\n\tconst updatedAttributes = blockAType.merge(\n\t\tcloneA.attributes,\n\t\tblocksWithTheSameType[ 0 ].attributes\n\t);\n\n\tif ( canRestoreTextSelection ) {\n\t\tconst newAttributeKey = findKey(\n\t\t\tupdatedAttributes,\n\t\t\t( v ) =>\n\t\t\t\ttypeof v === 'string' &&\n\t\t\t\tv.indexOf( START_OF_SELECTED_AREA ) !== -1\n\t\t);\n\t\tconst convertedHtml = updatedAttributes[ newAttributeKey ];\n\t\tconst {\n\t\t\tmultiline: multilineTag,\n\t\t\t__unstableMultilineWrapperTags: multilineWrapperTags,\n\t\t\t__unstablePreserveWhiteSpace: preserveWhiteSpace,\n\t\t} = blockAType.attributes[ newAttributeKey ];\n\t\tconst convertedValue = create( {\n\t\t\thtml: convertedHtml,\n\t\t\tmultilineTag,\n\t\t\tmultilineWrapperTags,\n\t\t\tpreserveWhiteSpace,\n\t\t} );\n\t\tconst newOffset = convertedValue.text.indexOf( START_OF_SELECTED_AREA );\n\t\tconst newValue = remove( convertedValue, newOffset, newOffset + 1 );\n\t\tconst newHtml = toHTMLString( {\n\t\t\tvalue: newValue,\n\t\t\tmultilineTag,\n\t\t\tpreserveWhiteSpace,\n\t\t} );\n\n\t\tupdatedAttributes[ newAttributeKey ] = newHtml;\n\n\t\tdispatch.selectionChange(\n\t\t\tblockA.clientId,\n\t\t\tnewAttributeKey,\n\t\t\tnewOffset,\n\t\t\tnewOffset\n\t\t);\n\t}\n\n\tdispatch.replaceBlocks(\n\t\t[ blockA.clientId, blockB.clientId ],\n\t\t[\n\t\t\t{\n\t\t\t\t...blockA,\n\t\t\t\tattributes: {\n\t\t\t\t\t...blockA.attributes,\n\t\t\t\t\t...updatedAttributes,\n\t\t\t\t},\n\t\t\t},\n\t\t\t...blocksWithTheSameType.slice( 1 ),\n\t\t],\n\t\t0 // If we don't pass the `indexToSelect` it will default to the last block.\n\t);\n};\n\n/**\n * Yields action objects used in signalling that the blocks corresponding to\n * the set of specified client IDs are to be removed.\n *\n * @param {string|string[]} clientIds Client IDs of blocks to remove.\n * @param {boolean} selectPrevious True if the previous block should be\n * selected when a block is removed.\n */\nexport const removeBlocks = ( clientIds, selectPrevious = true ) => ( {\n\tselect,\n\tdispatch,\n} ) => {\n\tif ( ! clientIds || ! clientIds.length ) {\n\t\treturn;\n\t}\n\n\tclientIds = castArray( clientIds );\n\tconst rootClientId = select.getBlockRootClientId( clientIds[ 0 ] );\n\tconst canRemoveBlocks = select.canRemoveBlocks( clientIds, rootClientId );\n\n\tif ( ! canRemoveBlocks ) {\n\t\treturn;\n\t}\n\n\tif ( selectPrevious ) {\n\t\tdispatch.selectPreviousBlock( clientIds[ 0 ] );\n\t}\n\n\tdispatch( { type: 'REMOVE_BLOCKS', clientIds } );\n\n\t// To avoid a focus loss when removing the last block, assure there is\n\t// always a default block if the last of the blocks have been removed.\n\tdispatch( ensureDefaultBlock() );\n};\n\n/**\n * Returns an action object used in signalling that the block with the\n * specified client ID is to be removed.\n *\n * @param {string} clientId Client ID of block to remove.\n * @param {boolean} selectPrevious True if the previous block should be\n * selected when a block is removed.\n *\n * @return {Object} Action object.\n */\nexport function removeBlock( clientId, selectPrevious ) {\n\treturn removeBlocks( [ clientId ], selectPrevious );\n}\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * Returns an action object used in signalling that the inner blocks with the\n * specified client ID should be replaced.\n *\n * @param {string} rootClientId Client ID of the block whose InnerBlocks will re replaced.\n * @param {Object[]} blocks Block objects to insert as new InnerBlocks\n * @param {?boolean} updateSelection If true block selection will be updated. If false, block selection will not change. Defaults to false.\n * @param {0|-1|null} initialPosition Initial block position.\n * @return {Object} Action object.\n */\nexport function replaceInnerBlocks(\n\trootClientId,\n\tblocks,\n\tupdateSelection = false,\n\tinitialPosition = 0\n) {\n\t/* eslint-enable jsdoc/valid-types */\n\treturn {\n\t\ttype: 'REPLACE_INNER_BLOCKS',\n\t\trootClientId,\n\t\tblocks,\n\t\tupdateSelection,\n\t\tinitialPosition: updateSelection ? initialPosition : null,\n\t\ttime: Date.now(),\n\t};\n}\n\n/**\n * Returns an action object used to toggle the block editing mode between\n * visual and HTML modes.\n *\n * @param {string} clientId Block client ID.\n *\n * @return {Object} Action object.\n */\nexport function toggleBlockMode( clientId ) {\n\treturn {\n\t\ttype: 'TOGGLE_BLOCK_MODE',\n\t\tclientId,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user has begun to type.\n *\n * @return {Object} Action object.\n */\nexport function startTyping() {\n\treturn {\n\t\ttype: 'START_TYPING',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user has stopped typing.\n *\n * @return {Object} Action object.\n */\nexport function stopTyping() {\n\treturn {\n\t\ttype: 'STOP_TYPING',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user has begun to drag blocks.\n *\n * @param {string[]} clientIds An array of client ids being dragged\n *\n * @return {Object} Action object.\n */\nexport function startDraggingBlocks( clientIds = [] ) {\n\treturn {\n\t\ttype: 'START_DRAGGING_BLOCKS',\n\t\tclientIds,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user has stopped dragging blocks.\n *\n * @return {Object} Action object.\n */\nexport function stopDraggingBlocks() {\n\treturn {\n\t\ttype: 'STOP_DRAGGING_BLOCKS',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the caret has entered formatted text.\n *\n * @return {Object} Action object.\n */\nexport function enterFormattedText() {\n\treturn {\n\t\ttype: 'ENTER_FORMATTED_TEXT',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user caret has exited formatted text.\n *\n * @return {Object} Action object.\n */\nexport function exitFormattedText() {\n\treturn {\n\t\ttype: 'EXIT_FORMATTED_TEXT',\n\t};\n}\n\n/**\n * Action that changes the position of the user caret.\n *\n * @param {string} clientId The selected block client ID.\n * @param {string} attributeKey The selected block attribute key.\n * @param {number} startOffset The start offset.\n * @param {number} endOffset The end offset.\n *\n * @return {Object} Action object.\n */\nexport function selectionChange(\n\tclientId,\n\tattributeKey,\n\tstartOffset,\n\tendOffset\n) {\n\treturn {\n\t\ttype: 'SELECTION_CHANGE',\n\t\tclientId,\n\t\tattributeKey,\n\t\tstartOffset,\n\t\tendOffset,\n\t};\n}\n\n/**\n * Action that adds a new block of the default type to the block list.\n *\n * @param {?Object} attributes Optional attributes of the block to assign.\n * @param {?string} rootClientId Optional root client ID of block list on which\n * to append.\n * @param {?number} index Optional index where to insert the default block\n *\n * @return {Object} Action object\n */\nexport function insertDefaultBlock( attributes, rootClientId, index ) {\n\t// Abort if there is no default block type (if it has been unregistered).\n\tconst defaultBlockName = getDefaultBlockName();\n\tif ( ! defaultBlockName ) {\n\t\treturn;\n\t}\n\n\tconst block = createBlock( defaultBlockName, attributes );\n\n\treturn insertBlock( block, index, rootClientId );\n}\n\n/**\n * Action that changes the nested settings of a given block.\n *\n * @param {string} clientId Client ID of the block whose nested setting are\n * being received.\n * @param {Object} settings Object with the new settings for the nested block.\n *\n * @return {Object} Action object\n */\nexport function updateBlockListSettings( clientId, settings ) {\n\treturn {\n\t\ttype: 'UPDATE_BLOCK_LIST_SETTINGS',\n\t\tclientId,\n\t\tsettings,\n\t};\n}\n\n/**\n * Action that updates the block editor settings.\n *\n * @param {Object} settings Updated settings\n *\n * @return {Object} Action object\n */\nexport function updateSettings( settings ) {\n\treturn {\n\t\ttype: 'UPDATE_SETTINGS',\n\t\tsettings,\n\t};\n}\n\n/**\n * Action that signals that a temporary reusable block has been saved\n * in order to switch its temporary id with the real id.\n *\n * @param {string} id Reusable block's id.\n * @param {string} updatedId Updated block's id.\n *\n * @return {Object} Action object.\n */\nexport function __unstableSaveReusableBlock( id, updatedId ) {\n\treturn {\n\t\ttype: 'SAVE_REUSABLE_BLOCK_SUCCESS',\n\t\tid,\n\t\tupdatedId,\n\t};\n}\n\n/**\n * Action that marks the last block change explicitly as persistent.\n *\n * @return {Object} Action object.\n */\nexport function __unstableMarkLastChangeAsPersistent() {\n\treturn { type: 'MARK_LAST_CHANGE_AS_PERSISTENT' };\n}\n\n/**\n * Action that signals that the next block change should be marked explicitly as not persistent.\n *\n * @return {Object} Action object.\n */\nexport function __unstableMarkNextChangeAsNotPersistent() {\n\treturn { type: 'MARK_NEXT_CHANGE_AS_NOT_PERSISTENT' };\n}\n\n/**\n * Action that marks the last block change as an automatic change, meaning it was not\n * performed by the user, and can be undone using the `Escape` and `Backspace` keys.\n * This action must be called after the change was made, and any actions that are a\n * consequence of it, so it is recommended to be called at the next idle period to ensure all\n * selection changes have been recorded.\n */\nexport const __unstableMarkAutomaticChange = () => ( { dispatch } ) => {\n\tdispatch( { type: 'MARK_AUTOMATIC_CHANGE' } );\n\tconst { requestIdleCallback = ( cb ) => setTimeout( cb, 100 ) } = window;\n\trequestIdleCallback( () => {\n\t\tdispatch( { type: 'MARK_AUTOMATIC_CHANGE_FINAL' } );\n\t} );\n};\n\n/**\n * Action that enables or disables the navigation mode.\n *\n * @param {string} isNavigationMode Enable/Disable navigation mode.\n */\nexport const setNavigationMode = ( isNavigationMode = true ) => ( {\n\tdispatch,\n} ) => {\n\tdispatch( { type: 'SET_NAVIGATION_MODE', isNavigationMode } );\n\n\tif ( isNavigationMode ) {\n\t\tspeak(\n\t\t\t__(\n\t\t\t\t'You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.'\n\t\t\t)\n\t\t);\n\t} else {\n\t\tspeak(\n\t\t\t__(\n\t\t\t\t'You are currently in edit mode. To return to the navigation mode, press Escape.'\n\t\t\t)\n\t\t);\n\t}\n};\n\n/**\n * Action that enables or disables the block moving mode.\n *\n * @param {string|null} hasBlockMovingClientId Enable/Disable block moving mode.\n */\nexport const setBlockMovingClientId = ( hasBlockMovingClientId = null ) => ( {\n\tdispatch,\n} ) => {\n\tdispatch( { type: 'SET_BLOCK_MOVING_MODE', hasBlockMovingClientId } );\n\n\tif ( hasBlockMovingClientId ) {\n\t\tspeak(\n\t\t\t__(\n\t\t\t\t'Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block.'\n\t\t\t)\n\t\t);\n\t}\n};\n\n/**\n * Action that duplicates a list of blocks.\n *\n * @param {string[]} clientIds\n * @param {boolean} updateSelection\n */\nexport const duplicateBlocks = ( clientIds, updateSelection = true ) => ( {\n\tselect,\n\tdispatch,\n} ) => {\n\tif ( ! clientIds || ! clientIds.length ) {\n\t\treturn;\n\t}\n\n\t// Return early if blocks don't exist.\n\tconst blocks = select.getBlocksByClientId( clientIds );\n\tif ( some( blocks, ( block ) => ! block ) ) {\n\t\treturn;\n\t}\n\n\t// Return early if blocks don't support multiple usage.\n\tconst blockNames = blocks.map( ( block ) => block.name );\n\tif (\n\t\tblockNames.some(\n\t\t\t( blockName ) => ! hasBlockSupport( blockName, 'multiple', true )\n\t\t)\n\t) {\n\t\treturn;\n\t}\n\n\tconst rootClientId = select.getBlockRootClientId( clientIds[ 0 ] );\n\tconst lastSelectedIndex = select.getBlockIndex(\n\t\tlast( castArray( clientIds ) ),\n\t\trootClientId\n\t);\n\tconst clonedBlocks = blocks.map( ( block ) =>\n\t\t__experimentalCloneSanitizedBlock( block )\n\t);\n\tdispatch.insertBlocks(\n\t\tclonedBlocks,\n\t\tlastSelectedIndex + 1,\n\t\trootClientId,\n\t\tupdateSelection\n\t);\n\tif ( clonedBlocks.length > 1 && updateSelection ) {\n\t\tdispatch.multiSelect(\n\t\t\tfirst( clonedBlocks ).clientId,\n\t\t\tlast( clonedBlocks ).clientId\n\t\t);\n\t}\n\treturn clonedBlocks.map( ( block ) => block.clientId );\n};\n\n/**\n * Action that inserts an empty block before a given block.\n *\n * @param {string} clientId\n */\nexport const insertBeforeBlock = ( clientId ) => ( { select, dispatch } ) => {\n\tif ( ! clientId ) {\n\t\treturn;\n\t}\n\tconst rootClientId = select.getBlockRootClientId( clientId );\n\tconst isLocked = select.getTemplateLock( rootClientId );\n\tif ( isLocked ) {\n\t\treturn;\n\t}\n\n\tconst firstSelectedIndex = select.getBlockIndex( clientId, rootClientId );\n\treturn dispatch.insertDefaultBlock( {}, rootClientId, firstSelectedIndex );\n};\n\n/**\n * Action that inserts an empty block after a given block.\n *\n * @param {string} clientId\n */\nexport const insertAfterBlock = ( clientId ) => ( { select, dispatch } ) => {\n\tif ( ! clientId ) {\n\t\treturn;\n\t}\n\tconst rootClientId = select.getBlockRootClientId( clientId );\n\tconst isLocked = select.getTemplateLock( rootClientId );\n\tif ( isLocked ) {\n\t\treturn;\n\t}\n\n\tconst firstSelectedIndex = select.getBlockIndex( clientId, rootClientId );\n\treturn dispatch.insertDefaultBlock(\n\t\t{},\n\t\trootClientId,\n\t\tfirstSelectedIndex + 1\n\t);\n};\n\n/**\n * Action that toggles the highlighted block state.\n *\n * @param {string} clientId The block's clientId.\n * @param {boolean} isHighlighted The highlight state.\n */\nexport function toggleBlockHighlight( clientId, isHighlighted ) {\n\treturn {\n\t\ttype: 'TOGGLE_BLOCK_HIGHLIGHT',\n\t\tclientId,\n\t\tisHighlighted,\n\t};\n}\n\n/**\n * Action that \"flashes\" the block with a given `clientId` by rhythmically highlighting it.\n *\n * @param {string} clientId Target block client ID.\n */\nexport const flashBlock = ( clientId ) => async ( { dispatch } ) => {\n\tdispatch( toggleBlockHighlight( clientId, true ) );\n\tawait new Promise( ( resolve ) => setTimeout( resolve, 150 ) );\n\tdispatch( toggleBlockHighlight( clientId, false ) );\n};\n\n/**\n * Action that sets whether a block has controlled inner blocks.\n *\n * @param {string} clientId The block's clientId.\n * @param {boolean} hasControlledInnerBlocks True if the block's inner blocks are controlled.\n */\nexport function setHasControlledInnerBlocks(\n\tclientId,\n\thasControlledInnerBlocks\n) {\n\treturn {\n\t\ttype: 'SET_HAS_CONTROLLED_INNER_BLOCKS',\n\t\thasControlledInnerBlocks,\n\t\tclientId,\n\t};\n}\n"]}
@@ -26,7 +26,8 @@ export function insertAt(array, elements, index) {
26
26
  * @return {Array} Result.
27
27
  */
28
28
 
29
- export function moveTo(array, from, to, count = 1) {
29
+ export function moveTo(array, from, to) {
30
+ let count = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
30
31
  const withoutMovedElements = [...array];
31
32
  withoutMovedElements.splice(from, count);
32
33
  return insertAt(withoutMovedElements, array.slice(from, from + count), to);
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-editor/src/store/array.js"],"names":["castArray","insertAt","array","elements","index","slice","moveTo","from","to","count","withoutMovedElements","splice"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,QAA1B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,QAAT,CAAmBC,KAAnB,EAA0BC,QAA1B,EAAoCC,KAApC,EAA4C;AAClD,SAAO,CACN,GAAGF,KAAK,CAACG,KAAN,CAAa,CAAb,EAAgBD,KAAhB,CADG,EAEN,GAAGJ,SAAS,CAAEG,QAAF,CAFN,EAGN,GAAGD,KAAK,CAACG,KAAN,CAAaD,KAAb,CAHG,CAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASE,MAAT,CAAiBJ,KAAjB,EAAwBK,IAAxB,EAA8BC,EAA9B,EAAkCC,KAAK,GAAG,CAA1C,EAA8C;AACpD,QAAMC,oBAAoB,GAAG,CAAE,GAAGR,KAAL,CAA7B;AACAQ,EAAAA,oBAAoB,CAACC,MAArB,CAA6BJ,IAA7B,EAAmCE,KAAnC;AACA,SAAOR,QAAQ,CACdS,oBADc,EAEdR,KAAK,CAACG,KAAN,CAAaE,IAAb,EAAmBA,IAAI,GAAGE,KAA1B,CAFc,EAGdD,EAHc,CAAf;AAKA","sourcesContent":["/**\n * External dependencies\n */\nimport { castArray } from 'lodash';\n\n/**\n * Insert one or multiple elements into a given position of an array.\n *\n * @param {Array} array Source array.\n * @param {*} elements Elements to insert.\n * @param {number} index Insert Position.\n *\n * @return {Array} Result.\n */\nexport function insertAt( array, elements, index ) {\n\treturn [\n\t\t...array.slice( 0, index ),\n\t\t...castArray( elements ),\n\t\t...array.slice( index ),\n\t];\n}\n\n/**\n * Moves an element in an array.\n *\n * @param {Array} array Source array.\n * @param {number} from Source index.\n * @param {number} to Destination index.\n * @param {number} count Number of elements to move.\n *\n * @return {Array} Result.\n */\nexport function moveTo( array, from, to, count = 1 ) {\n\tconst withoutMovedElements = [ ...array ];\n\twithoutMovedElements.splice( from, count );\n\treturn insertAt(\n\t\twithoutMovedElements,\n\t\tarray.slice( from, from + count ),\n\t\tto\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-editor/src/store/array.js"],"names":["castArray","insertAt","array","elements","index","slice","moveTo","from","to","count","withoutMovedElements","splice"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,QAA1B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,QAAT,CAAmBC,KAAnB,EAA0BC,QAA1B,EAAoCC,KAApC,EAA4C;AAClD,SAAO,CACN,GAAGF,KAAK,CAACG,KAAN,CAAa,CAAb,EAAgBD,KAAhB,CADG,EAEN,GAAGJ,SAAS,CAAEG,QAAF,CAFN,EAGN,GAAGD,KAAK,CAACG,KAAN,CAAaD,KAAb,CAHG,CAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASE,MAAT,CAAiBJ,KAAjB,EAAwBK,IAAxB,EAA8BC,EAA9B,EAA8C;AAAA,MAAZC,KAAY,uEAAJ,CAAI;AACpD,QAAMC,oBAAoB,GAAG,CAAE,GAAGR,KAAL,CAA7B;AACAQ,EAAAA,oBAAoB,CAACC,MAArB,CAA6BJ,IAA7B,EAAmCE,KAAnC;AACA,SAAOR,QAAQ,CACdS,oBADc,EAEdR,KAAK,CAACG,KAAN,CAAaE,IAAb,EAAmBA,IAAI,GAAGE,KAA1B,CAFc,EAGdD,EAHc,CAAf;AAKA","sourcesContent":["/**\n * External dependencies\n */\nimport { castArray } from 'lodash';\n\n/**\n * Insert one or multiple elements into a given position of an array.\n *\n * @param {Array} array Source array.\n * @param {*} elements Elements to insert.\n * @param {number} index Insert Position.\n *\n * @return {Array} Result.\n */\nexport function insertAt( array, elements, index ) {\n\treturn [\n\t\t...array.slice( 0, index ),\n\t\t...castArray( elements ),\n\t\t...array.slice( index ),\n\t];\n}\n\n/**\n * Moves an element in an array.\n *\n * @param {Array} array Source array.\n * @param {number} from Source index.\n * @param {number} to Destination index.\n * @param {number} count Number of elements to move.\n *\n * @return {Array} Result.\n */\nexport function moveTo( array, from, to, count = 1 ) {\n\tconst withoutMovedElements = [ ...array ];\n\twithoutMovedElements.splice( from, count );\n\treturn insertAt(\n\t\twithoutMovedElements,\n\t\tarray.slice( from, from + count ),\n\t\tto\n\t);\n}\n"]}
@@ -9,7 +9,6 @@ import { createReduxStore, registerStore } from '@wordpress/data';
9
9
  import reducer from './reducer';
10
10
  import * as selectors from './selectors';
11
11
  import * as actions from './actions';
12
- import controls from './controls';
13
12
  import { STORE_NAME } from './constants';
14
13
  /**
15
14
  * Block editor data store configuration.
@@ -23,7 +22,7 @@ export const storeConfig = {
23
22
  reducer,
24
23
  selectors,
25
24
  actions,
26
- controls
25
+ __experimentalUseThunks: true
27
26
  };
28
27
  /**
29
28
  * Store definition for the block editor namespace.
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-editor/src/store/index.js"],"names":["createReduxStore","registerStore","reducer","selectors","actions","controls","STORE_NAME","storeConfig","store","persist"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gBAAT,EAA2BC,aAA3B,QAAgD,iBAAhD;AAEA;AACA;AACA;;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,OAAO,KAAKC,SAAZ,MAA2B,aAA3B;AACA,OAAO,KAAKC,OAAZ,MAAyB,WAAzB;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,SAASC,UAAT,QAA2B,aAA3B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,WAAW,GAAG;AAC1BL,EAAAA,OAD0B;AAE1BC,EAAAA,SAF0B;AAG1BC,EAAAA,OAH0B;AAI1BC,EAAAA;AAJ0B,CAApB;AAOP;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMG,KAAK,GAAGR,gBAAgB,CAAEM,UAAF,EAAc,EAClD,GAAGC,WAD+C;AAElDE,EAAAA,OAAO,EAAE,CAAE,aAAF;AAFyC,CAAd,CAA9B,C,CAKP;;AACAR,aAAa,CAAEK,UAAF,EAAc,EAC1B,GAAGC,WADuB;AAE1BE,EAAAA,OAAO,EAAE,CAAE,aAAF;AAFiB,CAAd,CAAb","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createReduxStore, registerStore } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as selectors from './selectors';\nimport * as actions from './actions';\nimport controls from './controls';\nimport { STORE_NAME } from './constants';\n\n/**\n * Block editor data store configuration.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore\n *\n * @type {Object}\n */\nexport const storeConfig = {\n\treducer,\n\tselectors,\n\tactions,\n\tcontrols,\n};\n\n/**\n * Store definition for the block editor namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n *\n * @type {Object}\n */\nexport const store = createReduxStore( STORE_NAME, {\n\t...storeConfig,\n\tpersist: [ 'preferences' ],\n} );\n\n// Ideally we'd use register instead of register stores.\nregisterStore( STORE_NAME, {\n\t...storeConfig,\n\tpersist: [ 'preferences' ],\n} );\n"]}
1
+ {"version":3,"sources":["@wordpress/block-editor/src/store/index.js"],"names":["createReduxStore","registerStore","reducer","selectors","actions","STORE_NAME","storeConfig","__experimentalUseThunks","store","persist"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gBAAT,EAA2BC,aAA3B,QAAgD,iBAAhD;AAEA;AACA;AACA;;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,OAAO,KAAKC,SAAZ,MAA2B,aAA3B;AACA,OAAO,KAAKC,OAAZ,MAAyB,WAAzB;AACA,SAASC,UAAT,QAA2B,aAA3B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,WAAW,GAAG;AAC1BJ,EAAAA,OAD0B;AAE1BC,EAAAA,SAF0B;AAG1BC,EAAAA,OAH0B;AAI1BG,EAAAA,uBAAuB,EAAE;AAJC,CAApB;AAOP;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,KAAK,GAAGR,gBAAgB,CAAEK,UAAF,EAAc,EAClD,GAAGC,WAD+C;AAElDG,EAAAA,OAAO,EAAE,CAAE,aAAF;AAFyC,CAAd,CAA9B,C,CAKP;;AACAR,aAAa,CAAEI,UAAF,EAAc,EAC1B,GAAGC,WADuB;AAE1BG,EAAAA,OAAO,EAAE,CAAE,aAAF;AAFiB,CAAd,CAAb","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createReduxStore, registerStore } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as selectors from './selectors';\nimport * as actions from './actions';\nimport { STORE_NAME } from './constants';\n\n/**\n * Block editor data store configuration.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore\n *\n * @type {Object}\n */\nexport const storeConfig = {\n\treducer,\n\tselectors,\n\tactions,\n\t__experimentalUseThunks: true,\n};\n\n/**\n * Store definition for the block editor namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n *\n * @type {Object}\n */\nexport const store = createReduxStore( STORE_NAME, {\n\t...storeConfig,\n\tpersist: [ 'preferences' ],\n} );\n\n// Ideally we'd use register instead of register stores.\nregisterStore( STORE_NAME, {\n\t...storeConfig,\n\tpersist: [ 'preferences' ],\n} );\n"]}