@wordpress/block-editor 12.6.0 → 12.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2320) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +44 -2
  3. package/build/autocompleters/block.js +9 -24
  4. package/build/autocompleters/block.js.map +1 -1
  5. package/build/autocompleters/link.js +3 -14
  6. package/build/autocompleters/link.js.map +1 -1
  7. package/build/components/alignment-control/index.js +6 -10
  8. package/build/components/alignment-control/index.js.map +1 -1
  9. package/build/components/alignment-control/ui.js +3 -11
  10. package/build/components/alignment-control/ui.js.map +1 -1
  11. package/build/components/autocomplete/index.js +8 -22
  12. package/build/components/autocomplete/index.js.map +1 -1
  13. package/build/components/block-actions/index.js +3 -26
  14. package/build/components/block-actions/index.js.map +1 -1
  15. package/build/components/block-alignment-control/constants.js +1 -3
  16. package/build/components/block-alignment-control/constants.js.map +1 -1
  17. package/build/components/block-alignment-control/index.js +6 -10
  18. package/build/components/block-alignment-control/index.js.map +1 -1
  19. package/build/components/block-alignment-control/ui.js +7 -16
  20. package/build/components/block-alignment-control/ui.js.map +1 -1
  21. package/build/components/block-alignment-control/ui.native.js +5 -13
  22. package/build/components/block-alignment-control/ui.native.js.map +1 -1
  23. package/build/components/block-alignment-control/use-available-alignments.js +10 -18
  24. package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
  25. package/build/components/block-alignment-matrix-control/index.js +1 -8
  26. package/build/components/block-alignment-matrix-control/index.js.map +1 -1
  27. package/build/components/block-breadcrumb/index.js +2 -15
  28. package/build/components/block-breadcrumb/index.js.map +1 -1
  29. package/build/components/block-caption/index.native.js +7 -16
  30. package/build/components/block-caption/index.native.js.map +1 -1
  31. package/build/components/block-card/index.js +5 -17
  32. package/build/components/block-card/index.js.map +1 -1
  33. package/build/components/block-compare/block-view.js +1 -4
  34. package/build/components/block-compare/block-view.js.map +1 -1
  35. package/build/components/block-compare/index.js +4 -12
  36. package/build/components/block-compare/index.js.map +1 -1
  37. package/build/components/block-content-overlay/index.js +1 -3
  38. package/build/components/block-content-overlay/index.js.map +1 -1
  39. package/build/components/block-context/index.js +3 -5
  40. package/build/components/block-context/index.js.map +1 -1
  41. package/build/components/block-controls/fill.js +3 -8
  42. package/build/components/block-controls/fill.js.map +1 -1
  43. package/build/components/block-controls/groups.js +1 -2
  44. package/build/components/block-controls/groups.js.map +1 -1
  45. package/build/components/block-controls/hook.js +1 -11
  46. package/build/components/block-controls/hook.js.map +1 -1
  47. package/build/components/block-controls/index.js +3 -9
  48. package/build/components/block-controls/index.js.map +1 -1
  49. package/build/components/block-controls/slot.js +3 -14
  50. package/build/components/block-controls/slot.js.map +1 -1
  51. package/build/components/block-controls/slot.native.js +5 -12
  52. package/build/components/block-controls/slot.native.js.map +1 -1
  53. package/build/components/block-controls/use-has-block-controls.js +43 -0
  54. package/build/components/block-controls/use-has-block-controls.js.map +1 -0
  55. package/build/components/block-draggable/draggable-chip.js +2 -9
  56. package/build/components/block-draggable/draggable-chip.js.map +1 -1
  57. package/build/components/block-draggable/draggable-chip.native.js +2 -9
  58. package/build/components/block-draggable/draggable-chip.native.js.map +1 -1
  59. package/build/components/block-draggable/dropping-insertion-point.native.js +2 -23
  60. package/build/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  61. package/build/components/block-draggable/index.js +3 -15
  62. package/build/components/block-draggable/index.js.map +1 -1
  63. package/build/components/block-draggable/index.native.js +7 -56
  64. package/build/components/block-draggable/index.native.js.map +1 -1
  65. package/build/components/block-draggable/use-scroll-when-dragging.js +9 -13
  66. package/build/components/block-draggable/use-scroll-when-dragging.js.map +1 -1
  67. package/build/components/block-draggable/use-scroll-when-dragging.native.js +2 -14
  68. package/build/components/block-draggable/use-scroll-when-dragging.native.js.map +1 -1
  69. package/build/components/block-edit/context.js +1 -3
  70. package/build/components/block-edit/context.js.map +1 -1
  71. package/build/components/block-edit/edit.js +13 -23
  72. package/build/components/block-edit/edit.js.map +1 -1
  73. package/build/components/block-edit/edit.native.js +4 -14
  74. package/build/components/block-edit/edit.native.js.map +1 -1
  75. package/build/components/block-edit/index.js +5 -8
  76. package/build/components/block-edit/index.js.map +1 -1
  77. package/build/components/block-edit-visually-button/index.js +1 -8
  78. package/build/components/block-edit-visually-button/index.js.map +1 -1
  79. package/build/components/block-editing-mode/index.js +3 -12
  80. package/build/components/block-editing-mode/index.js.map +1 -1
  81. package/build/components/block-full-height-alignment-control/index.js +1 -6
  82. package/build/components/block-full-height-alignment-control/index.js.map +1 -1
  83. package/build/components/block-heading-level-dropdown/heading-level-icon.js +2 -6
  84. package/build/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
  85. package/build/components/block-heading-level-dropdown/index.js +4 -10
  86. package/build/components/block-heading-level-dropdown/index.js.map +1 -1
  87. package/build/components/block-heading-level-dropdown/index.native.js +2 -8
  88. package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
  89. package/build/components/block-icon/index.js +2 -10
  90. package/build/components/block-icon/index.js.map +1 -1
  91. package/build/components/block-icon/index.native.js +1 -10
  92. package/build/components/block-icon/index.native.js.map +1 -1
  93. package/build/components/block-info-slot-fill/index.js +5 -13
  94. package/build/components/block-info-slot-fill/index.js.map +1 -1
  95. package/build/components/block-inspector/index.js +11 -46
  96. package/build/components/block-inspector/index.js.map +1 -1
  97. package/build/components/block-inspector/useBlockInspectorAnimationSettings.js +7 -10
  98. package/build/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
  99. package/build/components/block-list/block-crash-boundary.js +1 -7
  100. package/build/components/block-list/block-crash-boundary.js.map +1 -1
  101. package/build/components/block-list/block-crash-warning.js +1 -7
  102. package/build/components/block-list/block-crash-warning.js.map +1 -1
  103. package/build/components/block-list/block-html.js +7 -15
  104. package/build/components/block-list/block-html.js.map +1 -1
  105. package/build/components/block-list/block-invalid-warning.js +3 -16
  106. package/build/components/block-list/block-invalid-warning.js.map +1 -1
  107. package/build/components/block-list/block-invalid-warning.native.js +4 -16
  108. package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
  109. package/build/components/block-list/block-list-block-context.js +1 -2
  110. package/build/components/block-list/block-list-block-context.js.map +1 -1
  111. package/build/components/block-list/block-list-context.native.js +10 -25
  112. package/build/components/block-list/block-list-context.native.js.map +1 -1
  113. package/build/components/block-list/block-list-item-cell.native.js +1 -8
  114. package/build/components/block-list/block-list-item-cell.native.js.map +1 -1
  115. package/build/components/block-list/block-list-item.native.js +5 -18
  116. package/build/components/block-list/block-list-item.native.js.map +1 -1
  117. package/build/components/block-list/block-outline.native.js +2 -9
  118. package/build/components/block-list/block-outline.native.js.map +1 -1
  119. package/build/components/block-list/block-selection-button.native.js +2 -21
  120. package/build/components/block-list/block-selection-button.native.js.map +1 -1
  121. package/build/components/block-list/block.js +39 -80
  122. package/build/components/block-list/block.js.map +1 -1
  123. package/build/components/block-list/block.native.js +40 -71
  124. package/build/components/block-list/block.native.js.map +1 -1
  125. package/build/components/block-list/grid-item.native.js +1 -6
  126. package/build/components/block-list/grid-item.native.js.map +1 -1
  127. package/build/components/block-list/index.js +11 -32
  128. package/build/components/block-list/index.js.map +1 -1
  129. package/build/components/block-list/index.native.js +18 -49
  130. package/build/components/block-list/index.native.js.map +1 -1
  131. package/build/components/block-list/insertion-point.native.js +1 -9
  132. package/build/components/block-list/insertion-point.native.js.map +1 -1
  133. package/build/components/block-list/layout.js +3 -13
  134. package/build/components/block-list/layout.js.map +1 -1
  135. package/build/components/block-list/subdirectory-icon.js +3 -6
  136. package/build/components/block-list/subdirectory-icon.js.map +1 -1
  137. package/build/components/block-list/use-block-props/index.js +10 -35
  138. package/build/components/block-list/use-block-props/index.js.map +1 -1
  139. package/build/components/block-list/use-block-props/index.native.js +5 -5
  140. package/build/components/block-list/use-block-props/index.native.js.map +1 -1
  141. package/build/components/block-list/use-block-props/use-block-class-names.js +2 -8
  142. package/build/components/block-list/use-block-props/use-block-class-names.js.map +1 -1
  143. package/build/components/block-list/use-block-props/use-block-custom-class-name.js +0 -8
  144. package/build/components/block-list/use-block-props/use-block-custom-class-name.js.map +1 -1
  145. package/build/components/block-list/use-block-props/use-block-default-class-name.js +0 -6
  146. package/build/components/block-list/use-block-props/use-block-default-class-name.js.map +1 -1
  147. package/build/components/block-list/use-block-props/use-block-moving-mode-class-names.js +3 -10
  148. package/build/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +1 -1
  149. package/build/components/block-list/use-block-props/use-block-refs.js +9 -18
  150. package/build/components/block-list/use-block-props/use-block-refs.js.map +1 -1
  151. package/build/components/block-list/use-block-props/use-focus-first-element.js +13 -27
  152. package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  153. package/build/components/block-list/use-block-props/use-focus-handler.js +6 -14
  154. package/build/components/block-list/use-block-props/use-focus-handler.js.map +1 -1
  155. package/build/components/block-list/use-block-props/use-intersection-observer.js +1 -4
  156. package/build/components/block-list/use-block-props/use-intersection-observer.js.map +1 -1
  157. package/build/components/block-list/use-block-props/use-is-hovered.js +4 -8
  158. package/build/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
  159. package/build/components/block-list/use-block-props/use-nav-mode-exit.js +2 -6
  160. package/build/components/block-list/use-block-props/use-nav-mode-exit.js.map +1 -1
  161. package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js +2 -15
  162. package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
  163. package/build/components/block-list/use-in-between-inserter.js +15 -37
  164. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  165. package/build/components/block-list-appender/index.js +12 -32
  166. package/build/components/block-list-appender/index.js.map +1 -1
  167. package/build/components/block-list-appender/index.native.js +1 -14
  168. package/build/components/block-list-appender/index.native.js.map +1 -1
  169. package/build/components/block-lock/index.js +0 -5
  170. package/build/components/block-lock/index.js.map +1 -1
  171. package/build/components/block-lock/menu-item.js +1 -10
  172. package/build/components/block-lock/menu-item.js.map +1 -1
  173. package/build/components/block-lock/modal.js +10 -22
  174. package/build/components/block-lock/modal.js.map +1 -1
  175. package/build/components/block-lock/toolbar.js +6 -16
  176. package/build/components/block-lock/toolbar.js.map +1 -1
  177. package/build/components/block-lock/use-block-lock.js +0 -3
  178. package/build/components/block-lock/use-block-lock.js.map +1 -1
  179. package/build/components/block-media-update-progress/index.native.js +9 -64
  180. package/build/components/block-media-update-progress/index.native.js.map +1 -1
  181. package/build/components/block-mover/button.js +1 -23
  182. package/build/components/block-mover/button.js.map +1 -1
  183. package/build/components/block-mover/index.js +4 -18
  184. package/build/components/block-mover/index.js.map +1 -1
  185. package/build/components/block-mover/index.native.js +3 -21
  186. package/build/components/block-mover/index.native.js.map +1 -1
  187. package/build/components/block-mover/mover-description.js +41 -63
  188. package/build/components/block-mover/mover-description.js.map +1 -1
  189. package/build/components/block-mover/mover-description.native.js +1 -20
  190. package/build/components/block-mover/mover-description.native.js.map +1 -1
  191. package/build/components/block-navigation/dropdown.js +6 -17
  192. package/build/components/block-navigation/dropdown.js.map +1 -1
  193. package/build/components/block-parent-selector/index.js +11 -43
  194. package/build/components/block-parent-selector/index.js.map +1 -1
  195. package/build/components/block-pattern-setup/constants.js.map +1 -1
  196. package/build/components/block-pattern-setup/index.js +3 -23
  197. package/build/components/block-pattern-setup/index.js.map +1 -1
  198. package/build/components/block-pattern-setup/setup-toolbar.js +1 -9
  199. package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  200. package/build/components/block-pattern-setup/use-patterns-setup.js +1 -6
  201. package/build/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  202. package/build/components/block-patterns-list/index.js +3 -17
  203. package/build/components/block-patterns-list/index.js.map +1 -1
  204. package/build/components/block-popover/drop-zone.js +1 -12
  205. package/build/components/block-popover/drop-zone.js.map +1 -1
  206. package/build/components/block-popover/inbetween.js +16 -33
  207. package/build/components/block-popover/inbetween.js.map +1 -1
  208. package/build/components/block-popover/index.js +15 -26
  209. package/build/components/block-popover/index.js.map +1 -1
  210. package/build/components/block-popover/use-popover-scroll.js +2 -7
  211. package/build/components/block-popover/use-popover-scroll.js.map +1 -1
  212. package/build/components/block-preview/auto.js +15 -19
  213. package/build/components/block-preview/auto.js.map +1 -1
  214. package/build/components/block-preview/index.js +8 -24
  215. package/build/components/block-preview/index.js.map +1 -1
  216. package/build/components/block-quick-navigation/index.js +2 -13
  217. package/build/components/block-quick-navigation/index.js.map +1 -1
  218. package/build/components/block-removal-warning-modal/index.js +5 -15
  219. package/build/components/block-removal-warning-modal/index.js.map +1 -1
  220. package/build/components/block-selection-clearer/index.js +2 -11
  221. package/build/components/block-selection-clearer/index.js.map +1 -1
  222. package/build/components/block-settings/button.native.js +3 -10
  223. package/build/components/block-settings/button.native.js.map +1 -1
  224. package/build/components/block-settings/container.native.js +3 -9
  225. package/build/components/block-settings/container.native.js.map +1 -1
  226. package/build/components/block-settings/index.native.js +0 -5
  227. package/build/components/block-settings/index.native.js.map +1 -1
  228. package/build/components/block-settings-menu/block-convert-button.js +1 -5
  229. package/build/components/block-settings-menu/block-convert-button.js.map +1 -1
  230. package/build/components/block-settings-menu/block-html-convert-button.js +0 -9
  231. package/build/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  232. package/build/components/block-settings-menu/block-mode-toggle.js +1 -13
  233. package/build/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  234. package/build/components/block-settings-menu/block-settings-dropdown.js +16 -53
  235. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  236. package/build/components/block-settings-menu/block-settings-menu-first-item.js +1 -2
  237. package/build/components/block-settings-menu/block-settings-menu-first-item.js.map +1 -1
  238. package/build/components/block-settings-menu/index.js +1 -6
  239. package/build/components/block-settings-menu/index.js.map +1 -1
  240. package/build/components/block-settings-menu-controls/index.js +13 -22
  241. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  242. package/build/components/block-styles/index.js +2 -20
  243. package/build/components/block-styles/index.js.map +1 -1
  244. package/build/components/block-styles/index.native.js +1 -17
  245. package/build/components/block-styles/index.native.js.map +1 -1
  246. package/build/components/block-styles/menu-items.js +1 -9
  247. package/build/components/block-styles/menu-items.js.map +1 -1
  248. package/build/components/block-styles/preview-panel.js +5 -8
  249. package/build/components/block-styles/preview-panel.js.map +1 -1
  250. package/build/components/block-styles/preview.native.js +3 -19
  251. package/build/components/block-styles/preview.native.js.map +1 -1
  252. package/build/components/block-styles/use-styles-for-block.js +1 -15
  253. package/build/components/block-styles/use-styles-for-block.js.map +1 -1
  254. package/build/components/block-styles/utils.js +3 -16
  255. package/build/components/block-styles/utils.js.map +1 -1
  256. package/build/components/block-switcher/block-styles-menu.js +1 -6
  257. package/build/components/block-switcher/block-styles-menu.js.map +1 -1
  258. package/build/components/block-switcher/block-transformations-menu.js +4 -18
  259. package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
  260. package/build/components/block-switcher/block-transformations-menu.native.js +4 -18
  261. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  262. package/build/components/block-switcher/block-variation-transformations.js +3 -16
  263. package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
  264. package/build/components/block-switcher/index.js +12 -43
  265. package/build/components/block-switcher/index.js.map +1 -1
  266. package/build/components/block-switcher/pattern-transformations-menu.js +3 -14
  267. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  268. package/build/components/block-switcher/preview-block-popover.js +1 -6
  269. package/build/components/block-switcher/preview-block-popover.js.map +1 -1
  270. package/build/components/block-switcher/use-transformed-patterns.js +12 -27
  271. package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
  272. package/build/components/block-switcher/utils.js +5 -10
  273. package/build/components/block-switcher/utils.js.map +1 -1
  274. package/build/components/block-title/index.js +0 -3
  275. package/build/components/block-title/index.js.map +1 -1
  276. package/build/components/block-title/use-block-display-title.js +2 -15
  277. package/build/components/block-title/use-block-display-title.js.map +1 -1
  278. package/build/components/block-toolbar/block-name-context.js +1 -3
  279. package/build/components/block-toolbar/block-name-context.js.map +1 -1
  280. package/build/components/block-toolbar/block-toolbar-last-item.js +1 -2
  281. package/build/components/block-toolbar/block-toolbar-last-item.js.map +1 -1
  282. package/build/components/block-toolbar/block-toolbar-menu.native.js +24 -43
  283. package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  284. package/build/components/block-toolbar/index.js +10 -64
  285. package/build/components/block-toolbar/index.js.map +1 -1
  286. package/build/components/block-toolbar/index.native.js +1 -15
  287. package/build/components/block-toolbar/index.native.js.map +1 -1
  288. package/build/components/block-toolbar/utils.js +58 -74
  289. package/build/components/block-toolbar/utils.js.map +1 -1
  290. package/build/components/block-tools/back-compat.js +3 -11
  291. package/build/components/block-tools/back-compat.js.map +1 -1
  292. package/build/components/block-tools/block-contextual-toolbar.js +50 -23
  293. package/build/components/block-tools/block-contextual-toolbar.js.map +1 -1
  294. package/build/components/block-tools/block-selection-button.js +8 -43
  295. package/build/components/block-tools/block-selection-button.js.map +1 -1
  296. package/build/components/block-tools/index.js +9 -32
  297. package/build/components/block-tools/index.js.map +1 -1
  298. package/build/components/block-tools/insertion-point.js +8 -30
  299. package/build/components/block-tools/insertion-point.js.map +1 -1
  300. package/build/components/block-tools/selected-block-popover.js +12 -35
  301. package/build/components/block-tools/selected-block-popover.js.map +1 -1
  302. package/build/components/block-tools/use-block-toolbar-popover-props.js +35 -36
  303. package/build/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
  304. package/build/components/block-tools/zoom-out-mode-inserters.js +3 -12
  305. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  306. package/build/components/block-types-list/index.js +1 -10
  307. package/build/components/block-types-list/index.js.map +1 -1
  308. package/build/components/block-types-list/index.native.js +3 -22
  309. package/build/components/block-types-list/index.native.js.map +1 -1
  310. package/build/components/block-variation-picker/index.js +1 -8
  311. package/build/components/block-variation-picker/index.js.map +1 -1
  312. package/build/components/block-variation-picker/index.native.js +11 -36
  313. package/build/components/block-variation-picker/index.native.js.map +1 -1
  314. package/build/components/block-variation-transforms/index.js +8 -22
  315. package/build/components/block-variation-transforms/index.js.map +1 -1
  316. package/build/components/block-vertical-alignment-control/icons.js +1 -3
  317. package/build/components/block-vertical-alignment-control/icons.js.map +1 -1
  318. package/build/components/block-vertical-alignment-control/index.js +6 -10
  319. package/build/components/block-vertical-alignment-control/index.js.map +1 -1
  320. package/build/components/block-vertical-alignment-control/ui.js +4 -10
  321. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  322. package/build/components/border-radius-control/all-input-control.js +8 -13
  323. package/build/components/border-radius-control/all-input-control.js.map +1 -1
  324. package/build/components/border-radius-control/index.js +5 -16
  325. package/build/components/border-radius-control/index.js.map +1 -1
  326. package/build/components/border-radius-control/input-controls.js +14 -15
  327. package/build/components/border-radius-control/input-controls.js.map +1 -1
  328. package/build/components/border-radius-control/linked-button.js +5 -7
  329. package/build/components/border-radius-control/linked-button.js.map +1 -1
  330. package/build/components/border-radius-control/utils.js +9 -17
  331. package/build/components/border-radius-control/utils.js.map +1 -1
  332. package/build/components/button-block-appender/index.js +5 -19
  333. package/build/components/button-block-appender/index.js.map +1 -1
  334. package/build/components/button-block-appender/index.native.js +4 -13
  335. package/build/components/button-block-appender/index.native.js.map +1 -1
  336. package/build/components/caption/index.native.js +1 -7
  337. package/build/components/caption/index.native.js.map +1 -1
  338. package/build/components/child-layout-control/index.js +8 -13
  339. package/build/components/child-layout-control/index.js.map +1 -1
  340. package/build/components/color-palette/control.js +3 -5
  341. package/build/components/color-palette/control.js.map +1 -1
  342. package/build/components/color-palette/index.js +0 -6
  343. package/build/components/color-palette/index.js.map +1 -1
  344. package/build/components/color-palette/with-color-context.js +2 -8
  345. package/build/components/color-palette/with-color-context.js.map +1 -1
  346. package/build/components/color-style-selector/index.js +3 -14
  347. package/build/components/color-style-selector/index.js.map +1 -1
  348. package/build/components/colors/index.js +0 -4
  349. package/build/components/colors/index.js.map +1 -1
  350. package/build/components/colors/utils.js +5 -20
  351. package/build/components/colors/utils.js.map +1 -1
  352. package/build/components/colors/with-colors.js +15 -30
  353. package/build/components/colors/with-colors.js.map +1 -1
  354. package/build/components/colors-gradients/control.js +7 -19
  355. package/build/components/colors-gradients/control.js.map +1 -1
  356. package/build/components/colors-gradients/dropdown.js +15 -21
  357. package/build/components/colors-gradients/dropdown.js.map +1 -1
  358. package/build/components/colors-gradients/panel-color-gradient-settings.js +7 -20
  359. package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  360. package/build/components/colors-gradients/panel-color-gradient-settings.native.js +1 -5
  361. package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  362. package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +0 -13
  363. package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
  364. package/build/components/contrast-checker/index.js +20 -31
  365. package/build/components/contrast-checker/index.js.map +1 -1
  366. package/build/components/contrast-checker/index.native.js +4 -21
  367. package/build/components/contrast-checker/index.native.js.map +1 -1
  368. package/build/components/convert-to-group-buttons/index.js +1 -18
  369. package/build/components/convert-to-group-buttons/index.js.map +1 -1
  370. package/build/components/convert-to-group-buttons/index.native.js +5 -17
  371. package/build/components/convert-to-group-buttons/index.native.js.map +1 -1
  372. package/build/components/convert-to-group-buttons/toolbar.js +3 -19
  373. package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
  374. package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js +4 -7
  375. package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
  376. package/build/components/copy-handler/index.js +24 -53
  377. package/build/components/copy-handler/index.js.map +1 -1
  378. package/build/components/date-format-picker/index.js +2 -8
  379. package/build/components/date-format-picker/index.js.map +1 -1
  380. package/build/components/default-block-appender/index.js +4 -18
  381. package/build/components/default-block-appender/index.js.map +1 -1
  382. package/build/components/default-block-appender/index.native.js +14 -21
  383. package/build/components/default-block-appender/index.native.js.map +1 -1
  384. package/build/components/default-style-picker/index.js +4 -12
  385. package/build/components/default-style-picker/index.js.map +1 -1
  386. package/build/components/dimensions-tool/aspect-ratio-tool.js +1 -6
  387. package/build/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  388. package/build/components/dimensions-tool/index.js +37 -36
  389. package/build/components/dimensions-tool/index.js.map +1 -1
  390. package/build/components/dimensions-tool/scale-tool.js +1 -5
  391. package/build/components/dimensions-tool/scale-tool.js.map +1 -1
  392. package/build/components/dimensions-tool/width-height-tool.js +5 -15
  393. package/build/components/dimensions-tool/width-height-tool.js.map +1 -1
  394. package/build/components/duotone/components.js +5 -11
  395. package/build/components/duotone/components.js.map +1 -1
  396. package/build/components/duotone/index.js +0 -2
  397. package/build/components/duotone/index.js.map +1 -1
  398. package/build/components/duotone/utils.js +0 -2
  399. package/build/components/duotone/utils.js.map +1 -1
  400. package/build/components/duotone-control/index.js +1 -10
  401. package/build/components/duotone-control/index.js.map +1 -1
  402. package/build/components/editable-text/index.js +4 -8
  403. package/build/components/editable-text/index.js.map +1 -1
  404. package/build/components/editor-styles/index.js +5 -17
  405. package/build/components/editor-styles/index.js.map +1 -1
  406. package/build/components/floating-toolbar/index.native.js +3 -18
  407. package/build/components/floating-toolbar/index.native.js.map +1 -1
  408. package/build/components/floating-toolbar/nav-up-icon.js +1 -5
  409. package/build/components/floating-toolbar/nav-up-icon.js.map +1 -1
  410. package/build/components/font-appearance-control/index.js +25 -30
  411. package/build/components/font-appearance-control/index.js.map +1 -1
  412. package/build/components/font-family/index.js +1 -9
  413. package/build/components/font-family/index.js.map +1 -1
  414. package/build/components/font-sizes/fluid-utils.js +52 -51
  415. package/build/components/font-sizes/fluid-utils.js.map +1 -1
  416. package/build/components/font-sizes/font-size-picker.js +4 -8
  417. package/build/components/font-sizes/font-size-picker.js.map +1 -1
  418. package/build/components/font-sizes/index.js +0 -5
  419. package/build/components/font-sizes/index.js.map +1 -1
  420. package/build/components/font-sizes/index.native.js +0 -4
  421. package/build/components/font-sizes/index.native.js.map +1 -1
  422. package/build/components/font-sizes/utils.js +2 -12
  423. package/build/components/font-sizes/utils.js.map +1 -1
  424. package/build/components/font-sizes/with-font-sizes.js +15 -27
  425. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  426. package/build/components/global-styles/advanced-panel.js +3 -14
  427. package/build/components/global-styles/advanced-panel.js.map +1 -1
  428. package/build/components/global-styles/behaviors-panel.js +64 -0
  429. package/build/components/global-styles/behaviors-panel.js.map +1 -0
  430. package/build/components/global-styles/border-panel.js +22 -43
  431. package/build/components/global-styles/border-panel.js.map +1 -1
  432. package/build/components/global-styles/color-panel.js +30 -69
  433. package/build/components/global-styles/color-panel.js.map +1 -1
  434. package/build/components/global-styles/color-panel.native.js +5 -19
  435. package/build/components/global-styles/color-panel.native.js.map +1 -1
  436. package/build/components/global-styles/context.js +1 -2
  437. package/build/components/global-styles/context.js.map +1 -1
  438. package/build/components/global-styles/dimensions-panel.js +33 -92
  439. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  440. package/build/components/global-styles/effects-panel.js +7 -27
  441. package/build/components/global-styles/effects-panel.js.map +1 -1
  442. package/build/components/global-styles/filters-panel.js +9 -25
  443. package/build/components/global-styles/filters-panel.js.map +1 -1
  444. package/build/components/global-styles/get-block-css-selector.js +33 -31
  445. package/build/components/global-styles/get-block-css-selector.js.map +1 -1
  446. package/build/components/global-styles/hooks.js +136 -71
  447. package/build/components/global-styles/hooks.js.map +1 -1
  448. package/build/components/global-styles/index.js +19 -15
  449. package/build/components/global-styles/index.js.map +1 -1
  450. package/build/components/global-styles/typography-panel.js +25 -87
  451. package/build/components/global-styles/typography-panel.js.map +1 -1
  452. package/build/components/global-styles/typography-utils.js +8 -16
  453. package/build/components/global-styles/typography-utils.js.map +1 -1
  454. package/build/components/global-styles/use-global-styles-output.js +96 -190
  455. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  456. package/build/components/global-styles/utils.js +12 -49
  457. package/build/components/global-styles/utils.js.map +1 -1
  458. package/build/components/gradients/index.js +0 -2
  459. package/build/components/gradients/index.js.map +1 -1
  460. package/build/components/gradients/index.native.js +0 -4
  461. package/build/components/gradients/index.native.js.map +1 -1
  462. package/build/components/gradients/use-gradient.js +3 -21
  463. package/build/components/gradients/use-gradient.js.map +1 -1
  464. package/build/components/gradients/with-gradient.js +3 -5
  465. package/build/components/gradients/with-gradient.js.map +1 -1
  466. package/build/components/height-control/index.js +2 -12
  467. package/build/components/height-control/index.js.map +1 -1
  468. package/build/components/iframe/index.js +23 -46
  469. package/build/components/iframe/index.js.map +1 -1
  470. package/build/components/iframe/use-compatibility-styles.js +8 -20
  471. package/build/components/iframe/use-compatibility-styles.js.map +1 -1
  472. package/build/components/image-editor/aspect-ratio-dropdown.js +3 -9
  473. package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  474. package/build/components/image-editor/constants.js.map +1 -1
  475. package/build/components/image-editor/context.js +3 -9
  476. package/build/components/image-editor/context.js.map +1 -1
  477. package/build/components/image-editor/cropper.js +3 -11
  478. package/build/components/image-editor/cropper.js.map +1 -1
  479. package/build/components/image-editor/form-controls.js +1 -5
  480. package/build/components/image-editor/form-controls.js.map +1 -1
  481. package/build/components/image-editor/index.js +1 -11
  482. package/build/components/image-editor/index.js.map +1 -1
  483. package/build/components/image-editor/rotation-button.js +1 -6
  484. package/build/components/image-editor/rotation-button.js.map +1 -1
  485. package/build/components/image-editor/use-save-image.js +5 -15
  486. package/build/components/image-editor/use-save-image.js.map +1 -1
  487. package/build/components/image-editor/use-transform-image.js +1 -12
  488. package/build/components/image-editor/use-transform-image.js.map +1 -1
  489. package/build/components/image-editor/zoom-dropdown.js +1 -7
  490. package/build/components/image-editor/zoom-dropdown.js.map +1 -1
  491. package/build/components/image-size-control/index.js +1 -9
  492. package/build/components/image-size-control/index.js.map +1 -1
  493. package/build/components/image-size-control/use-dimension-handler.js +7 -14
  494. package/build/components/image-size-control/use-dimension-handler.js.map +1 -1
  495. package/build/components/index.js +25 -115
  496. package/build/components/index.js.map +1 -1
  497. package/build/components/index.native.js +0 -53
  498. package/build/components/index.native.js.map +1 -1
  499. package/build/components/inner-blocks/button-block-appender.js +1 -9
  500. package/build/components/inner-blocks/button-block-appender.js.map +1 -1
  501. package/build/components/inner-blocks/default-block-appender.js +1 -11
  502. package/build/components/inner-blocks/default-block-appender.js.map +1 -1
  503. package/build/components/inner-blocks/index.js +22 -38
  504. package/build/components/inner-blocks/index.js.map +1 -1
  505. package/build/components/inner-blocks/index.native.js +18 -31
  506. package/build/components/inner-blocks/index.native.js.map +1 -1
  507. package/build/components/inner-blocks/use-block-context.js +0 -9
  508. package/build/components/inner-blocks/use-block-context.js.map +1 -1
  509. package/build/components/inner-blocks/use-inner-block-template-sync.js +10 -18
  510. package/build/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
  511. package/build/components/inner-blocks/use-nested-settings-update.js +18 -27
  512. package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  513. package/build/components/inner-blocks/with-client-id.js +3 -5
  514. package/build/components/inner-blocks/with-client-id.js.map +1 -1
  515. package/build/components/inserter/block-patterns-explorer/explorer.js +3 -10
  516. package/build/components/inserter/block-patterns-explorer/explorer.js.map +1 -1
  517. package/build/components/inserter/block-patterns-explorer/patterns-list.js +5 -24
  518. package/build/components/inserter/block-patterns-explorer/patterns-list.js.map +1 -1
  519. package/build/components/inserter/block-patterns-explorer/sidebar.js +1 -7
  520. package/build/components/inserter/block-patterns-explorer/sidebar.js.map +1 -1
  521. package/build/components/inserter/block-patterns-tab.js +12 -33
  522. package/build/components/inserter/block-patterns-tab.js.map +1 -1
  523. package/build/components/inserter/block-types-tab.js +9 -25
  524. package/build/components/inserter/block-types-tab.js.map +1 -1
  525. package/build/components/inserter/block-types-tab.native.js +1 -14
  526. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  527. package/build/components/inserter/hooks/use-block-type-impressions.native.js +9 -12
  528. package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  529. package/build/components/inserter/hooks/use-block-types-state.js +6 -8
  530. package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
  531. package/build/components/inserter/hooks/use-clipboard-block.native.js +1 -7
  532. package/build/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
  533. package/build/components/inserter/hooks/use-debounced-input.js +6 -10
  534. package/build/components/inserter/hooks/use-debounced-input.js.map +1 -1
  535. package/build/components/inserter/hooks/use-insertion-point.js +2 -15
  536. package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
  537. package/build/components/inserter/hooks/use-patterns-state.js +6 -13
  538. package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
  539. package/build/components/inserter/index.js +29 -66
  540. package/build/components/inserter/index.js.map +1 -1
  541. package/build/components/inserter/index.native.js +23 -71
  542. package/build/components/inserter/index.native.js.map +1 -1
  543. package/build/components/inserter/library.js +1 -11
  544. package/build/components/inserter/library.js.map +1 -1
  545. package/build/components/inserter/media-tab/hooks.js +12 -27
  546. package/build/components/inserter/media-tab/hooks.js.map +1 -1
  547. package/build/components/inserter/media-tab/index.js +0 -4
  548. package/build/components/inserter/media-tab/index.js.map +1 -1
  549. package/build/components/inserter/media-tab/media-list.js +3 -7
  550. package/build/components/inserter/media-tab/media-list.js.map +1 -1
  551. package/build/components/inserter/media-tab/media-panel.js +1 -13
  552. package/build/components/inserter/media-tab/media-panel.js.map +1 -1
  553. package/build/components/inserter/media-tab/media-preview.js +10 -35
  554. package/build/components/inserter/media-tab/media-preview.js.map +1 -1
  555. package/build/components/inserter/media-tab/media-tab.js +3 -18
  556. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  557. package/build/components/inserter/media-tab/utils.js +2 -6
  558. package/build/components/inserter/media-tab/utils.js.map +1 -1
  559. package/build/components/inserter/menu.js +2 -22
  560. package/build/components/inserter/menu.js.map +1 -1
  561. package/build/components/inserter/menu.native.js +5 -24
  562. package/build/components/inserter/menu.native.js.map +1 -1
  563. package/build/components/inserter/mobile-tab-navigation.js +3 -7
  564. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  565. package/build/components/inserter/no-results.js +1 -5
  566. package/build/components/inserter/no-results.js.map +1 -1
  567. package/build/components/inserter/no-results.native.js +1 -8
  568. package/build/components/inserter/no-results.native.js.map +1 -1
  569. package/build/components/inserter/panel.js +1 -4
  570. package/build/components/inserter/panel.js.map +1 -1
  571. package/build/components/inserter/preview-panel.js +14 -15
  572. package/build/components/inserter/preview-panel.js.map +1 -1
  573. package/build/components/inserter/quick-inserter.js +4 -18
  574. package/build/components/inserter/quick-inserter.js.map +1 -1
  575. package/build/components/inserter/reusable-block-rename-hint.js +2 -16
  576. package/build/components/inserter/reusable-block-rename-hint.js.map +1 -1
  577. package/build/components/inserter/reusable-blocks-tab.js +6 -19
  578. package/build/components/inserter/reusable-blocks-tab.js.map +1 -1
  579. package/build/components/inserter/reusable-blocks-tab.native.js +1 -9
  580. package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  581. package/build/components/inserter/search-items.js +21 -41
  582. package/build/components/inserter/search-items.js.map +1 -1
  583. package/build/components/inserter/search-results.js +6 -37
  584. package/build/components/inserter/search-results.js.map +1 -1
  585. package/build/components/inserter/search-results.native.js +1 -15
  586. package/build/components/inserter/search-results.native.js.map +1 -1
  587. package/build/components/inserter/tabs.js +1 -17
  588. package/build/components/inserter/tabs.js.map +1 -1
  589. package/build/components/inserter/tabs.native.js +5 -20
  590. package/build/components/inserter/tabs.native.js.map +1 -1
  591. package/build/components/inserter/tips.js +3 -7
  592. package/build/components/inserter/tips.js.map +1 -1
  593. package/build/components/inserter/utils.native.js +2 -9
  594. package/build/components/inserter/utils.native.js.map +1 -1
  595. package/build/components/inserter-draggable-blocks/index.js +1 -8
  596. package/build/components/inserter-draggable-blocks/index.js.map +1 -1
  597. package/build/components/inserter-list-item/index.js +2 -17
  598. package/build/components/inserter-list-item/index.js.map +1 -1
  599. package/build/components/inserter-listbox/context.js +1 -2
  600. package/build/components/inserter-listbox/context.js.map +1 -1
  601. package/build/components/inserter-listbox/group.js +1 -7
  602. package/build/components/inserter-listbox/group.js.map +1 -1
  603. package/build/components/inserter-listbox/index.js +1 -9
  604. package/build/components/inserter-listbox/index.js.map +1 -1
  605. package/build/components/inserter-listbox/item.js +9 -14
  606. package/build/components/inserter-listbox/item.js.map +1 -1
  607. package/build/components/inserter-listbox/row.js +1 -7
  608. package/build/components/inserter-listbox/row.js.map +1 -1
  609. package/build/components/inserter-menu-extension/index.js +1 -2
  610. package/build/components/inserter-menu-extension/index.js.map +1 -1
  611. package/build/components/inspector-controls/block-support-slot-container.js +3 -4
  612. package/build/components/inspector-controls/block-support-slot-container.js.map +1 -1
  613. package/build/components/inspector-controls/block-support-tools-panel.js +7 -9
  614. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  615. package/build/components/inspector-controls/fill.js +4 -16
  616. package/build/components/inspector-controls/fill.js.map +1 -1
  617. package/build/components/inspector-controls/fill.native.js +3 -15
  618. package/build/components/inspector-controls/fill.native.js.map +1 -1
  619. package/build/components/inspector-controls/groups.js +1 -2
  620. package/build/components/inspector-controls/groups.js.map +1 -1
  621. package/build/components/inspector-controls/index.js +8 -12
  622. package/build/components/inspector-controls/index.js.map +1 -1
  623. package/build/components/inspector-controls/slot.js +5 -16
  624. package/build/components/inspector-controls/slot.js.map +1 -1
  625. package/build/components/inspector-controls/slot.native.js +3 -10
  626. package/build/components/inspector-controls/slot.native.js.map +1 -1
  627. package/build/components/inspector-controls-tabs/advanced-controls-panel.js +1 -10
  628. package/build/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  629. package/build/components/inspector-controls-tabs/index.js +1 -11
  630. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  631. package/build/components/inspector-controls-tabs/position-controls-panel.js +3 -14
  632. package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  633. package/build/components/inspector-controls-tabs/settings-tab-hint.js +1 -13
  634. package/build/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
  635. package/build/components/inspector-controls-tabs/settings-tab.js +1 -8
  636. package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  637. package/build/components/inspector-controls-tabs/styles-tab.js +1 -10
  638. package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  639. package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js +14 -24
  640. package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  641. package/build/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js +0 -2
  642. package/build/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -1
  643. package/build/components/inspector-controls-tabs/utils.js +1 -3
  644. package/build/components/inspector-controls-tabs/utils.js.map +1 -1
  645. package/build/components/inspector-popover-header/index.js +1 -5
  646. package/build/components/inspector-popover-header/index.js.map +1 -1
  647. package/build/components/justify-content-control/index.js +6 -10
  648. package/build/components/justify-content-control/index.js.map +1 -1
  649. package/build/components/justify-content-control/ui.js +1 -8
  650. package/build/components/justify-content-control/ui.js.map +1 -1
  651. package/build/components/keyboard-shortcuts/index.js +10 -7
  652. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  653. package/build/components/letter-spacing-control/index.js +2 -7
  654. package/build/components/letter-spacing-control/index.js.map +1 -1
  655. package/build/components/line-height-control/index.js +21 -37
  656. package/build/components/line-height-control/index.js.map +1 -1
  657. package/build/components/line-height-control/index.native.js +5 -7
  658. package/build/components/line-height-control/index.native.js.map +1 -1
  659. package/build/components/line-height-control/utils.js +10 -6
  660. package/build/components/line-height-control/utils.js.map +1 -1
  661. package/build/components/link-control/constants.js +1 -2
  662. package/build/components/link-control/constants.js.map +1 -1
  663. package/build/components/link-control/index.js +79 -52
  664. package/build/components/link-control/index.js.map +1 -1
  665. package/build/components/link-control/is-url-like.js +4 -8
  666. package/build/components/link-control/is-url-like.js.map +1 -1
  667. package/build/components/link-control/link-preview.js +11 -19
  668. package/build/components/link-control/link-preview.js.map +1 -1
  669. package/build/components/link-control/search-create-button.js +4 -12
  670. package/build/components/link-control/search-create-button.js.map +1 -1
  671. package/build/components/link-control/search-input.js +15 -28
  672. package/build/components/link-control/search-input.js.map +1 -1
  673. package/build/components/link-control/search-item.js +7 -19
  674. package/build/components/link-control/search-item.js.map +1 -1
  675. package/build/components/link-control/search-results.js +13 -22
  676. package/build/components/link-control/search-results.js.map +1 -1
  677. package/build/components/link-control/settings-drawer.js +1 -7
  678. package/build/components/link-control/settings-drawer.js.map +1 -1
  679. package/build/components/link-control/settings.js +3 -9
  680. package/build/components/link-control/settings.js.map +1 -1
  681. package/build/components/link-control/use-create-page.js +5 -12
  682. package/build/components/link-control/use-create-page.js.map +1 -1
  683. package/build/components/link-control/use-internal-value.js +9 -12
  684. package/build/components/link-control/use-internal-value.js.map +1 -1
  685. package/build/components/link-control/use-rich-url-data.js +9 -14
  686. package/build/components/link-control/use-rich-url-data.js.map +1 -1
  687. package/build/components/link-control/use-search-handler.js +10 -24
  688. package/build/components/link-control/use-search-handler.js.map +1 -1
  689. package/build/components/link-control/viewer-slot.js +1 -2
  690. package/build/components/link-control/viewer-slot.js.map +1 -1
  691. package/build/components/list-view/appender.js +4 -18
  692. package/build/components/list-view/appender.js.map +1 -1
  693. package/build/components/list-view/aria-referenced-text.js +0 -2
  694. package/build/components/list-view/aria-referenced-text.js.map +1 -1
  695. package/build/components/list-view/block-contents.js +4 -11
  696. package/build/components/list-view/block-contents.js.map +1 -1
  697. package/build/components/list-view/block-select-button.js +31 -32
  698. package/build/components/list-view/block-select-button.js.map +1 -1
  699. package/build/components/list-view/block.js +24 -46
  700. package/build/components/list-view/block.js.map +1 -1
  701. package/build/components/list-view/branch.js +7 -37
  702. package/build/components/list-view/branch.js.map +1 -1
  703. package/build/components/list-view/context.js +1 -4
  704. package/build/components/list-view/context.js.map +1 -1
  705. package/build/components/list-view/drop-indicator.js +35 -47
  706. package/build/components/list-view/drop-indicator.js.map +1 -1
  707. package/build/components/list-view/expander.js +3 -5
  708. package/build/components/list-view/expander.js.map +1 -1
  709. package/build/components/list-view/index.js +18 -39
  710. package/build/components/list-view/index.js.map +1 -1
  711. package/build/components/list-view/leaf.js +1 -8
  712. package/build/components/list-view/leaf.js.map +1 -1
  713. package/build/components/list-view/use-block-selection.js +15 -30
  714. package/build/components/list-view/use-block-selection.js.map +1 -1
  715. package/build/components/list-view/use-list-view-client-ids.js +1 -4
  716. package/build/components/list-view/use-list-view-client-ids.js.map +1 -1
  717. package/build/components/list-view/use-list-view-drop-zone.js +38 -63
  718. package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
  719. package/build/components/list-view/use-list-view-expand-selected-item.js +5 -7
  720. package/build/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
  721. package/build/components/list-view/use-list-view-images.js +84 -0
  722. package/build/components/list-view/use-list-view-images.js.map +1 -0
  723. package/build/components/list-view/use-list-view-scroll-into-view.js +6 -8
  724. package/build/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
  725. package/build/components/list-view/utils.js +4 -10
  726. package/build/components/list-view/utils.js.map +1 -1
  727. package/build/components/media-placeholder/index.js +11 -71
  728. package/build/components/media-placeholder/index.js.map +1 -1
  729. package/build/components/media-placeholder/index.native.js +7 -30
  730. package/build/components/media-placeholder/index.native.js.map +1 -1
  731. package/build/components/media-replace-flow/index.js +8 -39
  732. package/build/components/media-replace-flow/index.js.map +1 -1
  733. package/build/components/media-replace-flow/index.native.js +13 -4
  734. package/build/components/media-replace-flow/index.native.js.map +1 -1
  735. package/build/components/media-upload/check.js +2 -5
  736. package/build/components/media-upload/check.js.map +1 -1
  737. package/build/components/media-upload/index.js +1 -5
  738. package/build/components/media-upload/index.js.map +1 -1
  739. package/build/components/media-upload/index.native.js +18 -43
  740. package/build/components/media-upload/index.native.js.map +1 -1
  741. package/build/components/media-upload-progress/index.native.js +3 -33
  742. package/build/components/media-upload-progress/index.native.js.map +1 -1
  743. package/build/components/multi-selection-inspector/index.js +3 -16
  744. package/build/components/multi-selection-inspector/index.js.map +1 -1
  745. package/build/components/navigable-toolbar/index.js +10 -32
  746. package/build/components/navigable-toolbar/index.js.map +1 -1
  747. package/build/components/observe-typing/index.js +24 -43
  748. package/build/components/observe-typing/index.js.map +1 -1
  749. package/build/components/panel-color-settings/index.js +3 -7
  750. package/build/components/panel-color-settings/index.js.map +1 -1
  751. package/build/components/plain-text/index.js +0 -7
  752. package/build/components/plain-text/index.js.map +1 -1
  753. package/build/components/plain-text/index.native.js +7 -27
  754. package/build/components/plain-text/index.native.js.map +1 -1
  755. package/build/components/preview-options/index.js +1 -8
  756. package/build/components/preview-options/index.js.map +1 -1
  757. package/build/components/provider/block-refs-provider.js +1 -3
  758. package/build/components/provider/block-refs-provider.js.map +1 -1
  759. package/build/components/provider/index.js +7 -14
  760. package/build/components/provider/index.js.map +1 -1
  761. package/build/components/provider/index.native.js +3 -9
  762. package/build/components/provider/index.native.js.map +1 -1
  763. package/build/components/provider/use-block-sync.js +23 -41
  764. package/build/components/provider/use-block-sync.js.map +1 -1
  765. package/build/components/provider/with-registry-provider.js +1 -9
  766. package/build/components/provider/with-registry-provider.js.map +1 -1
  767. package/build/components/publish-date-time-picker/index.js +1 -9
  768. package/build/components/publish-date-time-picker/index.js.map +1 -1
  769. package/build/components/recursion-provider/index.js +6 -9
  770. package/build/components/recursion-provider/index.js.map +1 -1
  771. package/build/components/resizable-box-popover/index.js +3 -6
  772. package/build/components/resizable-box-popover/index.js.map +1 -1
  773. package/build/components/resolution-tool/index.js +1 -5
  774. package/build/components/resolution-tool/index.js.map +1 -1
  775. package/build/components/responsive-block-control/index.js +3 -16
  776. package/build/components/responsive-block-control/index.js.map +1 -1
  777. package/build/components/responsive-block-control/label.js +2 -7
  778. package/build/components/responsive-block-control/label.js.map +1 -1
  779. package/build/components/rich-text/content.js +3 -13
  780. package/build/components/rich-text/content.js.map +1 -1
  781. package/build/components/rich-text/embed-handler-picker.native.js +1 -7
  782. package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
  783. package/build/components/rich-text/file-paste-handler.native.js +0 -1
  784. package/build/components/rich-text/file-paste-handler.native.js.map +1 -1
  785. package/build/components/rich-text/format-edit.js +52 -30
  786. package/build/components/rich-text/format-edit.js.map +1 -1
  787. package/build/components/rich-text/format-toolbar/index.js +4 -14
  788. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  789. package/build/components/rich-text/format-toolbar/index.native.js +1 -4
  790. package/build/components/rich-text/format-toolbar/index.native.js.map +1 -1
  791. package/build/components/rich-text/format-toolbar-container.js +4 -22
  792. package/build/components/rich-text/format-toolbar-container.js.map +1 -1
  793. package/build/components/rich-text/format-toolbar-container.native.js +1 -6
  794. package/build/components/rich-text/format-toolbar-container.native.js.map +1 -1
  795. package/build/components/rich-text/get-rich-text-values.js +12 -38
  796. package/build/components/rich-text/get-rich-text-values.js.map +1 -1
  797. package/build/components/rich-text/index.js +18 -68
  798. package/build/components/rich-text/index.js.map +1 -1
  799. package/build/components/rich-text/index.native.js +48 -94
  800. package/build/components/rich-text/index.native.js.map +1 -1
  801. package/build/components/rich-text/input-event.js +1 -4
  802. package/build/components/rich-text/input-event.js.map +1 -1
  803. package/build/components/rich-text/input-event.native.js +1 -4
  804. package/build/components/rich-text/input-event.native.js.map +1 -1
  805. package/build/components/rich-text/prevent-event-discovery.js +1 -6
  806. package/build/components/rich-text/prevent-event-discovery.js.map +1 -1
  807. package/build/components/rich-text/remove-browser-shortcuts.native.js +0 -2
  808. package/build/components/rich-text/remove-browser-shortcuts.native.js.map +1 -1
  809. package/build/components/rich-text/shortcut.js +1 -5
  810. package/build/components/rich-text/shortcut.js.map +1 -1
  811. package/build/components/rich-text/shortcut.native.js +1 -4
  812. package/build/components/rich-text/shortcut.native.js.map +1 -1
  813. package/build/components/rich-text/split-value.js +18 -17
  814. package/build/components/rich-text/split-value.js.map +1 -1
  815. package/build/components/rich-text/toolbar-button.js +3 -8
  816. package/build/components/rich-text/toolbar-button.js.map +1 -1
  817. package/build/components/rich-text/use-before-input-rules.js +5 -22
  818. package/build/components/rich-text/use-before-input-rules.js.map +1 -1
  819. package/build/components/rich-text/use-delete.js +6 -15
  820. package/build/components/rich-text/use-delete.js.map +1 -1
  821. package/build/components/rich-text/use-enter.js +3 -18
  822. package/build/components/rich-text/use-enter.js.map +1 -1
  823. package/build/components/rich-text/use-firefox-compat.js +5 -41
  824. package/build/components/rich-text/use-firefox-compat.js.map +1 -1
  825. package/build/components/rich-text/use-format-types.js +10 -23
  826. package/build/components/rich-text/use-format-types.js.map +1 -1
  827. package/build/components/rich-text/use-input-events.js +1 -3
  828. package/build/components/rich-text/use-input-events.js.map +1 -1
  829. package/build/components/rich-text/use-input-rules.js +10 -35
  830. package/build/components/rich-text/use-input-rules.js.map +1 -1
  831. package/build/components/rich-text/use-insert-replacement-text.js +0 -5
  832. package/build/components/rich-text/use-insert-replacement-text.js.map +1 -1
  833. package/build/components/rich-text/use-mark-persistent.js +6 -9
  834. package/build/components/rich-text/use-mark-persistent.js.map +1 -1
  835. package/build/components/rich-text/use-paste-handler.js +24 -71
  836. package/build/components/rich-text/use-paste-handler.js.map +1 -1
  837. package/build/components/rich-text/use-remove-browser-shortcuts.js +0 -4
  838. package/build/components/rich-text/use-remove-browser-shortcuts.js.map +1 -1
  839. package/build/components/rich-text/use-shortcuts.js +1 -3
  840. package/build/components/rich-text/use-shortcuts.js.map +1 -1
  841. package/build/components/rich-text/use-undo-automatic-change.js +1 -13
  842. package/build/components/rich-text/use-undo-automatic-change.js.map +1 -1
  843. package/build/components/rich-text/utils.js +3 -15
  844. package/build/components/rich-text/utils.js.map +1 -1
  845. package/build/components/selection-scroll-into-view/index.js +0 -3
  846. package/build/components/selection-scroll-into-view/index.js.map +1 -1
  847. package/build/components/skip-to-selected-block/index.js +2 -12
  848. package/build/components/skip-to-selected-block/index.js.map +1 -1
  849. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js +1 -6
  850. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  851. package/build/components/spacing-sizes-control/index.js +13 -23
  852. package/build/components/spacing-sizes-control/index.js.map +1 -1
  853. package/build/components/spacing-sizes-control/input-controls/axial.js +7 -14
  854. package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  855. package/build/components/spacing-sizes-control/input-controls/separated.js +3 -8
  856. package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  857. package/build/components/spacing-sizes-control/input-controls/single.js +3 -7
  858. package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  859. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +6 -29
  860. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  861. package/build/components/spacing-sizes-control/sides-dropdown/index.js +1 -7
  862. package/build/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
  863. package/build/components/spacing-sizes-control/utils.js +36 -68
  864. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  865. package/build/components/text-decoration-control/index.js +2 -8
  866. package/build/components/text-decoration-control/index.js.map +1 -1
  867. package/build/components/text-transform-control/index.js +2 -8
  868. package/build/components/text-transform-control/index.js.map +1 -1
  869. package/build/components/tool-selector/index.js +4 -13
  870. package/build/components/tool-selector/index.js.map +1 -1
  871. package/build/components/typewriter/index.js +30 -52
  872. package/build/components/typewriter/index.js.map +1 -1
  873. package/build/components/ungroup-button/index.native.js +1 -16
  874. package/build/components/ungroup-button/index.native.js.map +1 -1
  875. package/build/components/unit-control/index.js +1 -5
  876. package/build/components/unit-control/index.js.map +1 -1
  877. package/build/components/url-input/button.js +2 -13
  878. package/build/components/url-input/button.js.map +1 -1
  879. package/build/components/url-input/index.js +38 -91
  880. package/build/components/url-input/index.js.map +1 -1
  881. package/build/components/url-input/index.native.js +1 -4
  882. package/build/components/url-input/index.native.js.map +1 -1
  883. package/build/components/url-popover/image-url-input-ui.js +3 -36
  884. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  885. package/build/components/url-popover/index.js +5 -20
  886. package/build/components/url-popover/index.js.map +1 -1
  887. package/build/components/url-popover/link-editor.js +1 -8
  888. package/build/components/url-popover/link-editor.js.map +1 -1
  889. package/build/components/url-popover/link-viewer-url.js +1 -8
  890. package/build/components/url-popover/link-viewer-url.js.map +1 -1
  891. package/build/components/url-popover/link-viewer.js +1 -8
  892. package/build/components/url-popover/link-viewer.js.map +1 -1
  893. package/build/components/use-block-commands/index.js +247 -0
  894. package/build/components/use-block-commands/index.js.map +1 -0
  895. package/build/components/use-block-display-information/index.js +1 -9
  896. package/build/components/use-block-display-information/index.js.map +1 -1
  897. package/build/components/use-block-drop-zone/index.js +12 -29
  898. package/build/components/use-block-drop-zone/index.js.map +1 -1
  899. package/build/components/use-block-drop-zone/index.native.js +12 -24
  900. package/build/components/use-block-drop-zone/index.native.js.map +1 -1
  901. package/build/components/use-display-block-controls/index.js +1 -7
  902. package/build/components/use-display-block-controls/index.js.map +1 -1
  903. package/build/components/use-display-block-controls/index.native.js +1 -7
  904. package/build/components/use-display-block-controls/index.native.js.map +1 -1
  905. package/build/components/use-moving-animation/index.js +4 -20
  906. package/build/components/use-moving-animation/index.js.map +1 -1
  907. package/build/components/use-on-block-drop/index.js +19 -38
  908. package/build/components/use-on-block-drop/index.js.map +1 -1
  909. package/build/components/use-on-block-drop/index.native.js +11 -15
  910. package/build/components/use-on-block-drop/index.native.js.map +1 -1
  911. package/build/components/use-on-block-drop/types.js.map +1 -1
  912. package/build/components/use-paste-styles/index.js +10 -27
  913. package/build/components/use-paste-styles/index.js.map +1 -1
  914. package/build/components/use-resize-canvas/index.js +0 -14
  915. package/build/components/use-resize-canvas/index.js.map +1 -1
  916. package/build/components/use-setting/index.js +17 -39
  917. package/build/components/use-setting/index.js.map +1 -1
  918. package/build/components/video-player/gridicon-play.native.js +0 -4
  919. package/build/components/video-player/gridicon-play.native.js.map +1 -1
  920. package/build/components/video-player/index.native.js +9 -24
  921. package/build/components/video-player/index.native.js.map +1 -1
  922. package/build/components/warning/index.js +2 -9
  923. package/build/components/warning/index.js.map +1 -1
  924. package/build/components/warning/index.native.js +1 -10
  925. package/build/components/warning/index.native.js.map +1 -1
  926. package/build/components/writing-flow/index.js +4 -23
  927. package/build/components/writing-flow/index.js.map +1 -1
  928. package/build/components/writing-flow/use-arrow-nav.js +35 -60
  929. package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
  930. package/build/components/writing-flow/use-click-selection.js +3 -10
  931. package/build/components/writing-flow/use-click-selection.js.map +1 -1
  932. package/build/components/writing-flow/use-drag-selection.js +25 -31
  933. package/build/components/writing-flow/use-drag-selection.js.map +1 -1
  934. package/build/components/writing-flow/use-input.js +6 -21
  935. package/build/components/writing-flow/use-input.js.map +1 -1
  936. package/build/components/writing-flow/use-multi-selection.js +10 -16
  937. package/build/components/writing-flow/use-multi-selection.js.map +1 -1
  938. package/build/components/writing-flow/use-select-all.js +4 -14
  939. package/build/components/writing-flow/use-select-all.js.map +1 -1
  940. package/build/components/writing-flow/use-selection-observer.js +18 -47
  941. package/build/components/writing-flow/use-selection-observer.js.map +1 -1
  942. package/build/components/writing-flow/use-tab-nav.js +28 -44
  943. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  944. package/build/components/writing-mode-control/index.js +2 -8
  945. package/build/components/writing-mode-control/index.js.map +1 -1
  946. package/build/elements/index.js +0 -2
  947. package/build/elements/index.js.map +1 -1
  948. package/build/hooks/align.js +22 -46
  949. package/build/hooks/align.js.map +1 -1
  950. package/build/hooks/align.native.js +5 -9
  951. package/build/hooks/align.native.js.map +1 -1
  952. package/build/hooks/anchor.js +9 -24
  953. package/build/hooks/anchor.js.map +1 -1
  954. package/build/hooks/aria-label.js +5 -11
  955. package/build/hooks/aria-label.js.map +1 -1
  956. package/build/hooks/behaviors.js +14 -32
  957. package/build/hooks/behaviors.js.map +1 -1
  958. package/build/hooks/border.js +47 -80
  959. package/build/hooks/border.js.map +1 -1
  960. package/build/hooks/color.js +31 -69
  961. package/build/hooks/color.js.map +1 -1
  962. package/build/hooks/compat.js +1 -5
  963. package/build/hooks/compat.js.map +1 -1
  964. package/build/hooks/content-lock-ui.js +5 -19
  965. package/build/hooks/content-lock-ui.js.map +1 -1
  966. package/build/hooks/contrast-checker.js +4 -13
  967. package/build/hooks/contrast-checker.js.map +1 -1
  968. package/build/hooks/custom-class-name.js +21 -37
  969. package/build/hooks/custom-class-name.js.map +1 -1
  970. package/build/hooks/custom-class-name.native.js +3 -11
  971. package/build/hooks/custom-class-name.native.js.map +1 -1
  972. package/build/hooks/custom-fields.js +115 -0
  973. package/build/hooks/custom-fields.js.map +1 -0
  974. package/build/hooks/dimensions.js +6 -23
  975. package/build/hooks/dimensions.js.map +1 -1
  976. package/build/hooks/duotone.js +42 -64
  977. package/build/hooks/duotone.js.map +1 -1
  978. package/build/hooks/font-family.js +9 -29
  979. package/build/hooks/font-family.js.map +1 -1
  980. package/build/hooks/font-size.js +36 -62
  981. package/build/hooks/font-size.js.map +1 -1
  982. package/build/hooks/gap.js +1 -7
  983. package/build/hooks/gap.js.map +1 -1
  984. package/build/hooks/generated-class-name.js +1 -5
  985. package/build/hooks/generated-class-name.js.map +1 -1
  986. package/build/hooks/index.js +1 -27
  987. package/build/hooks/index.js.map +1 -1
  988. package/build/hooks/index.native.js +0 -14
  989. package/build/hooks/index.native.js.map +1 -1
  990. package/build/hooks/layout.js +45 -72
  991. package/build/hooks/layout.js.map +1 -1
  992. package/build/hooks/layout.native.js +4 -4
  993. package/build/hooks/layout.native.js.map +1 -1
  994. package/build/hooks/line-height.js +7 -15
  995. package/build/hooks/line-height.js.map +1 -1
  996. package/build/hooks/lock.js +4 -8
  997. package/build/hooks/lock.js.map +1 -1
  998. package/build/hooks/margin.js +1 -13
  999. package/build/hooks/margin.js.map +1 -1
  1000. package/build/hooks/metadata-name.js +4 -8
  1001. package/build/hooks/metadata-name.js.map +1 -1
  1002. package/build/hooks/metadata.js +4 -14
  1003. package/build/hooks/metadata.js.map +1 -1
  1004. package/build/hooks/padding.js +1 -13
  1005. package/build/hooks/padding.js.map +1 -1
  1006. package/build/hooks/position.js +35 -61
  1007. package/build/hooks/position.js.map +1 -1
  1008. package/build/hooks/settings.js +5 -8
  1009. package/build/hooks/settings.js.map +1 -1
  1010. package/build/hooks/style.js +38 -61
  1011. package/build/hooks/style.js.map +1 -1
  1012. package/build/hooks/supports.js +23 -76
  1013. package/build/hooks/supports.js.map +1 -1
  1014. package/build/hooks/typography.js +11 -27
  1015. package/build/hooks/typography.js.map +1 -1
  1016. package/build/hooks/typography.native.js +5 -14
  1017. package/build/hooks/typography.native.js.map +1 -1
  1018. package/build/hooks/use-border-props.js +5 -10
  1019. package/build/hooks/use-border-props.js.map +1 -1
  1020. package/build/hooks/use-cached-truthy.js +0 -2
  1021. package/build/hooks/use-cached-truthy.js.map +1 -1
  1022. package/build/hooks/use-color-props.js +14 -20
  1023. package/build/hooks/use-color-props.js.map +1 -1
  1024. package/build/hooks/use-editor-wrapper-styles.native.js +7 -30
  1025. package/build/hooks/use-editor-wrapper-styles.native.js.map +1 -1
  1026. package/build/hooks/use-spacing-props.js +3 -3
  1027. package/build/hooks/use-spacing-props.js.map +1 -1
  1028. package/build/hooks/use-typography-props.js +2 -9
  1029. package/build/hooks/use-typography-props.js.map +1 -1
  1030. package/build/hooks/utils.js +10 -26
  1031. package/build/hooks/utils.js.map +1 -1
  1032. package/build/index.js +0 -10
  1033. package/build/index.js.map +1 -1
  1034. package/build/index.native.js +0 -3
  1035. package/build/index.native.js.map +1 -1
  1036. package/build/layouts/constrained.js +13 -37
  1037. package/build/layouts/constrained.js.map +1 -1
  1038. package/build/layouts/definitions.js.map +1 -1
  1039. package/build/layouts/flex.js +16 -48
  1040. package/build/layouts/flex.js.map +1 -1
  1041. package/build/layouts/flow.js +7 -23
  1042. package/build/layouts/flow.js.map +1 -1
  1043. package/build/layouts/grid.js +18 -32
  1044. package/build/layouts/grid.js.map +1 -1
  1045. package/build/layouts/index.js +3 -9
  1046. package/build/layouts/index.js.map +1 -1
  1047. package/build/layouts/utils.js +3 -12
  1048. package/build/layouts/utils.js.map +1 -1
  1049. package/build/lock-unlock.js +1 -2
  1050. package/build/lock-unlock.js.map +1 -1
  1051. package/build/private-apis.js +5 -27
  1052. package/build/private-apis.js.map +1 -1
  1053. package/build/private-apis.native.js +2 -8
  1054. package/build/private-apis.native.js.map +1 -1
  1055. package/build/store/actions.js +188 -287
  1056. package/build/store/actions.js.map +1 -1
  1057. package/build/store/array.js +1 -3
  1058. package/build/store/array.js.map +1 -1
  1059. package/build/store/constants.js.map +1 -1
  1060. package/build/store/defaults.js +2 -3
  1061. package/build/store/defaults.js.map +1 -1
  1062. package/build/store/defaults.native.js +3 -3
  1063. package/build/store/defaults.native.js.map +1 -1
  1064. package/build/store/index.js +11 -19
  1065. package/build/store/index.js.map +1 -1
  1066. package/build/store/private-actions.js +26 -91
  1067. package/build/store/private-actions.js.map +1 -1
  1068. package/build/store/private-selectors.js +8 -90
  1069. package/build/store/private-selectors.js.map +1 -1
  1070. package/build/store/reducer.js +161 -358
  1071. package/build/store/reducer.js.map +1 -1
  1072. package/build/store/selectors.js +257 -522
  1073. package/build/store/selectors.js.map +1 -1
  1074. package/build/store/utils.js +0 -1
  1075. package/build/store/utils.js.map +1 -1
  1076. package/build/utils/block-variation-transforms.js +2 -5
  1077. package/build/utils/block-variation-transforms.js.map +1 -1
  1078. package/build/utils/dom.js +4 -12
  1079. package/build/utils/dom.js.map +1 -1
  1080. package/build/utils/index.js +0 -5
  1081. package/build/utils/index.js.map +1 -1
  1082. package/build/utils/math.js +5 -10
  1083. package/build/utils/math.js.map +1 -1
  1084. package/build/utils/object.js +14 -25
  1085. package/build/utils/object.js.map +1 -1
  1086. package/build/utils/order-inserter-block-items.js +2 -5
  1087. package/build/utils/order-inserter-block-items.js.map +1 -1
  1088. package/build/utils/parse-css-unit-to-px.js +14 -66
  1089. package/build/utils/parse-css-unit-to-px.js.map +1 -1
  1090. package/build/utils/pasting.js +9 -15
  1091. package/build/utils/pasting.js.map +1 -1
  1092. package/build/utils/pre-parse-patterns.js +1 -16
  1093. package/build/utils/pre-parse-patterns.js.map +1 -1
  1094. package/build/utils/selection.js +1 -4
  1095. package/build/utils/selection.js.map +1 -1
  1096. package/build/utils/sorting.js +3 -8
  1097. package/build/utils/sorting.js.map +1 -1
  1098. package/build/utils/transform-styles/ast/index.js +0 -3
  1099. package/build/utils/transform-styles/ast/index.js.map +1 -1
  1100. package/build/utils/transform-styles/ast/parse.js +95 -137
  1101. package/build/utils/transform-styles/ast/parse.js.map +1 -1
  1102. package/build/utils/transform-styles/ast/stringify/compiler.js +3 -9
  1103. package/build/utils/transform-styles/ast/stringify/compiler.js.map +1 -1
  1104. package/build/utils/transform-styles/ast/stringify/compress.js +25 -27
  1105. package/build/utils/transform-styles/ast/stringify/compress.js.map +1 -1
  1106. package/build/utils/transform-styles/ast/stringify/identity.js +28 -33
  1107. package/build/utils/transform-styles/ast/stringify/identity.js.map +1 -1
  1108. package/build/utils/transform-styles/ast/stringify/index.js +1 -4
  1109. package/build/utils/transform-styles/ast/stringify/index.js.map +1 -1
  1110. package/build/utils/transform-styles/index.js +0 -11
  1111. package/build/utils/transform-styles/index.js.map +1 -1
  1112. package/build/utils/transform-styles/transforms/url-rewrite.js +12 -25
  1113. package/build/utils/transform-styles/transforms/url-rewrite.js.map +1 -1
  1114. package/build/utils/transform-styles/transforms/wrap.js +7 -9
  1115. package/build/utils/transform-styles/transforms/wrap.js.map +1 -1
  1116. package/build/utils/transform-styles/traverse.js +1 -8
  1117. package/build/utils/transform-styles/traverse.js.map +1 -1
  1118. package/build/utils/use-should-contextual-toolbar-show.js +0 -9
  1119. package/build/utils/use-should-contextual-toolbar-show.js.map +1 -1
  1120. package/build-module/autocompleters/block.js +10 -16
  1121. package/build-module/autocompleters/block.js.map +1 -1
  1122. package/build-module/autocompleters/link.js +2 -8
  1123. package/build-module/autocompleters/link.js.map +1 -1
  1124. package/build-module/components/alignment-control/index.js +5 -7
  1125. package/build-module/components/alignment-control/index.js.map +1 -1
  1126. package/build-module/components/alignment-control/ui.js +2 -7
  1127. package/build-module/components/alignment-control/ui.js.map +1 -1
  1128. package/build-module/components/autocomplete/index.js +10 -15
  1129. package/build-module/components/autocomplete/index.js.map +1 -1
  1130. package/build-module/components/block-actions/index.js +3 -20
  1131. package/build-module/components/block-actions/index.js.map +1 -1
  1132. package/build-module/components/block-alignment-control/constants.js.map +1 -1
  1133. package/build-module/components/block-alignment-control/index.js +5 -7
  1134. package/build-module/components/block-alignment-control/index.js.map +1 -1
  1135. package/build-module/components/block-alignment-control/ui.js +8 -12
  1136. package/build-module/components/block-alignment-control/ui.js.map +1 -1
  1137. package/build-module/components/block-alignment-control/ui.native.js +5 -9
  1138. package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
  1139. package/build-module/components/block-alignment-control/use-available-alignments.js +10 -13
  1140. package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
  1141. package/build-module/components/block-alignment-matrix-control/index.js +0 -5
  1142. package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
  1143. package/build-module/components/block-breadcrumb/index.js +4 -9
  1144. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  1145. package/build-module/components/block-caption/index.native.js +8 -9
  1146. package/build-module/components/block-caption/index.native.js.map +1 -1
  1147. package/build-module/components/block-card/index.js +6 -10
  1148. package/build-module/components/block-card/index.js.map +1 -1
  1149. package/build-module/components/block-compare/block-view.js +0 -1
  1150. package/build-module/components/block-compare/block-view.js.map +1 -1
  1151. package/build-module/components/block-compare/index.js +6 -10
  1152. package/build-module/components/block-compare/index.js.map +1 -1
  1153. package/build-module/components/block-content-overlay/index.js +1 -1
  1154. package/build-module/components/block-content-overlay/index.js.map +1 -1
  1155. package/build-module/components/block-context/index.js +4 -4
  1156. package/build-module/components/block-context/index.js.map +1 -1
  1157. package/build-module/components/block-controls/fill.js +3 -5
  1158. package/build-module/components/block-controls/fill.js.map +1 -1
  1159. package/build-module/components/block-controls/groups.js.map +1 -1
  1160. package/build-module/components/block-controls/hook.js +1 -4
  1161. package/build-module/components/block-controls/hook.js.map +1 -1
  1162. package/build-module/components/block-controls/index.js +2 -4
  1163. package/build-module/components/block-controls/index.js.map +1 -1
  1164. package/build-module/components/block-controls/slot.js +3 -8
  1165. package/build-module/components/block-controls/slot.js.map +1 -1
  1166. package/build-module/components/block-controls/slot.native.js +5 -8
  1167. package/build-module/components/block-controls/slot.native.js.map +1 -1
  1168. package/build-module/components/block-controls/use-has-block-controls.js +34 -0
  1169. package/build-module/components/block-controls/use-has-block-controls.js.map +1 -0
  1170. package/build-module/components/block-draggable/draggable-chip.js +2 -5
  1171. package/build-module/components/block-draggable/draggable-chip.js.map +1 -1
  1172. package/build-module/components/block-draggable/draggable-chip.native.js +3 -4
  1173. package/build-module/components/block-draggable/draggable-chip.native.js.map +1 -1
  1174. package/build-module/components/block-draggable/dropping-insertion-point.native.js +5 -15
  1175. package/build-module/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  1176. package/build-module/components/block-draggable/index.js +3 -9
  1177. package/build-module/components/block-draggable/index.js.map +1 -1
  1178. package/build-module/components/block-draggable/index.native.js +8 -34
  1179. package/build-module/components/block-draggable/index.native.js.map +1 -1
  1180. package/build-module/components/block-draggable/use-scroll-when-dragging.js +8 -10
  1181. package/build-module/components/block-draggable/use-scroll-when-dragging.js.map +1 -1
  1182. package/build-module/components/block-draggable/use-scroll-when-dragging.native.js +2 -11
  1183. package/build-module/components/block-draggable/use-scroll-when-dragging.native.js.map +1 -1
  1184. package/build-module/components/block-edit/context.js +1 -1
  1185. package/build-module/components/block-edit/context.js.map +1 -1
  1186. package/build-module/components/block-edit/edit.js +16 -20
  1187. package/build-module/components/block-edit/edit.js.map +1 -1
  1188. package/build-module/components/block-edit/edit.native.js +6 -7
  1189. package/build-module/components/block-edit/edit.native.js.map +1 -1
  1190. package/build-module/components/block-edit/index.js +5 -5
  1191. package/build-module/components/block-edit/index.js.map +1 -1
  1192. package/build-module/components/block-edit-visually-button/index.js +1 -4
  1193. package/build-module/components/block-edit-visually-button/index.js.map +1 -1
  1194. package/build-module/components/block-editing-mode/index.js +5 -8
  1195. package/build-module/components/block-editing-mode/index.js.map +1 -1
  1196. package/build-module/components/block-full-height-alignment-control/index.js +0 -3
  1197. package/build-module/components/block-full-height-alignment-control/index.js.map +1 -1
  1198. package/build-module/components/block-heading-level-dropdown/heading-level-icon.js +2 -3
  1199. package/build-module/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
  1200. package/build-module/components/block-heading-level-dropdown/index.js +4 -6
  1201. package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
  1202. package/build-module/components/block-heading-level-dropdown/index.native.js +2 -4
  1203. package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
  1204. package/build-module/components/block-icon/index.js +2 -6
  1205. package/build-module/components/block-icon/index.js.map +1 -1
  1206. package/build-module/components/block-icon/index.native.js +2 -4
  1207. package/build-module/components/block-icon/index.native.js.map +1 -1
  1208. package/build-module/components/block-info-slot-fill/index.js +5 -9
  1209. package/build-module/components/block-info-slot-fill/index.js.map +1 -1
  1210. package/build-module/components/block-inspector/index.js +11 -25
  1211. package/build-module/components/block-inspector/index.js.map +1 -1
  1212. package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js +7 -8
  1213. package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
  1214. package/build-module/components/block-list/block-crash-boundary.js +0 -6
  1215. package/build-module/components/block-list/block-crash-boundary.js.map +1 -1
  1216. package/build-module/components/block-list/block-crash-warning.js +1 -2
  1217. package/build-module/components/block-list/block-crash-warning.js.map +1 -1
  1218. package/build-module/components/block-list/block-html.js +8 -12
  1219. package/build-module/components/block-list/block-html.js.map +1 -1
  1220. package/build-module/components/block-list/block-invalid-warning.js +3 -9
  1221. package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
  1222. package/build-module/components/block-list/block-invalid-warning.native.js +5 -10
  1223. package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
  1224. package/build-module/components/block-list/block-list-block-context.js.map +1 -1
  1225. package/build-module/components/block-list/block-list-context.native.js +11 -21
  1226. package/build-module/components/block-list/block-list-context.native.js.map +1 -1
  1227. package/build-module/components/block-list/block-list-item-cell.native.js +2 -6
  1228. package/build-module/components/block-list/block-list-item-cell.native.js.map +1 -1
  1229. package/build-module/components/block-list/block-list-item.native.js +8 -12
  1230. package/build-module/components/block-list/block-list-item.native.js.map +1 -1
  1231. package/build-module/components/block-list/block-outline.native.js +4 -7
  1232. package/build-module/components/block-list/block-outline.native.js.map +1 -1
  1233. package/build-module/components/block-list/block-selection-button.native.js +3 -10
  1234. package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
  1235. package/build-module/components/block-list/block.js +42 -63
  1236. package/build-module/components/block-list/block.js.map +1 -1
  1237. package/build-module/components/block-list/block.native.js +41 -57
  1238. package/build-module/components/block-list/block.native.js.map +1 -1
  1239. package/build-module/components/block-list/grid-item.native.js +1 -4
  1240. package/build-module/components/block-list/grid-item.native.js.map +1 -1
  1241. package/build-module/components/block-list/index.js +12 -18
  1242. package/build-module/components/block-list/index.js.map +1 -1
  1243. package/build-module/components/block-list/index.native.js +21 -39
  1244. package/build-module/components/block-list/index.native.js.map +1 -1
  1245. package/build-module/components/block-list/insertion-point.native.js +2 -5
  1246. package/build-module/components/block-list/insertion-point.native.js.map +1 -1
  1247. package/build-module/components/block-list/layout.js +3 -8
  1248. package/build-module/components/block-list/layout.js.map +1 -1
  1249. package/build-module/components/block-list/subdirectory-icon.js +2 -4
  1250. package/build-module/components/block-list/subdirectory-icon.js.map +1 -1
  1251. package/build-module/components/block-list/use-block-props/index.js +13 -11
  1252. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  1253. package/build-module/components/block-list/use-block-props/index.native.js +4 -2
  1254. package/build-module/components/block-list/use-block-props/index.native.js.map +1 -1
  1255. package/build-module/components/block-list/use-block-props/use-block-class-names.js +5 -5
  1256. package/build-module/components/block-list/use-block-props/use-block-class-names.js.map +1 -1
  1257. package/build-module/components/block-list/use-block-props/use-block-custom-class-name.js +2 -6
  1258. package/build-module/components/block-list/use-block-props/use-block-custom-class-name.js.map +1 -1
  1259. package/build-module/components/block-list/use-block-props/use-block-default-class-name.js +2 -4
  1260. package/build-module/components/block-list/use-block-props/use-block-default-class-name.js.map +1 -1
  1261. package/build-module/components/block-list/use-block-props/use-block-moving-mode-class-names.js +6 -8
  1262. package/build-module/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +1 -1
  1263. package/build-module/components/block-list/use-block-props/use-block-refs.js +11 -16
  1264. package/build-module/components/block-list/use-block-props/use-block-refs.js.map +1 -1
  1265. package/build-module/components/block-list/use-block-props/use-focus-first-element.js +15 -21
  1266. package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  1267. package/build-module/components/block-list/use-block-props/use-focus-handler.js +8 -11
  1268. package/build-module/components/block-list/use-block-props/use-focus-handler.js.map +1 -1
  1269. package/build-module/components/block-list/use-block-props/use-intersection-observer.js +1 -1
  1270. package/build-module/components/block-list/use-block-props/use-intersection-observer.js.map +1 -1
  1271. package/build-module/components/block-list/use-block-props/use-is-hovered.js +4 -6
  1272. package/build-module/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
  1273. package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js +4 -4
  1274. package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js.map +1 -1
  1275. package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js +4 -11
  1276. package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
  1277. package/build-module/components/block-list/use-in-between-inserter.js +15 -30
  1278. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  1279. package/build-module/components/block-list-appender/index.js +13 -26
  1280. package/build-module/components/block-list-appender/index.js.map +1 -1
  1281. package/build-module/components/block-list-appender/index.native.js +1 -9
  1282. package/build-module/components/block-list-appender/index.native.js.map +1 -1
  1283. package/build-module/components/block-lock/index.js.map +1 -1
  1284. package/build-module/components/block-lock/menu-item.js +1 -4
  1285. package/build-module/components/block-lock/menu-item.js.map +1 -1
  1286. package/build-module/components/block-lock/modal.js +12 -13
  1287. package/build-module/components/block-lock/modal.js.map +1 -1
  1288. package/build-module/components/block-lock/toolbar.js +6 -9
  1289. package/build-module/components/block-lock/toolbar.js.map +1 -1
  1290. package/build-module/components/block-lock/use-block-lock.js +2 -2
  1291. package/build-module/components/block-lock/use-block-lock.js.map +1 -1
  1292. package/build-module/components/block-media-update-progress/index.native.js +10 -59
  1293. package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
  1294. package/build-module/components/block-mover/button.js +2 -15
  1295. package/build-module/components/block-mover/button.js.map +1 -1
  1296. package/build-module/components/block-mover/index.js +5 -11
  1297. package/build-module/components/block-mover/index.js.map +1 -1
  1298. package/build-module/components/block-mover/index.native.js +4 -11
  1299. package/build-module/components/block-mover/index.native.js.map +1 -1
  1300. package/build-module/components/block-mover/mover-description.js +40 -61
  1301. package/build-module/components/block-mover/mover-description.js.map +1 -1
  1302. package/build-module/components/block-mover/mover-description.native.js +0 -16
  1303. package/build-module/components/block-mover/mover-description.native.js.map +1 -1
  1304. package/build-module/components/block-navigation/dropdown.js +7 -10
  1305. package/build-module/components/block-navigation/dropdown.js.map +1 -1
  1306. package/build-module/components/block-parent-selector/index.js +14 -35
  1307. package/build-module/components/block-parent-selector/index.js.map +1 -1
  1308. package/build-module/components/block-pattern-setup/constants.js.map +1 -1
  1309. package/build-module/components/block-pattern-setup/index.js +3 -13
  1310. package/build-module/components/block-pattern-setup/index.js.map +1 -1
  1311. package/build-module/components/block-pattern-setup/setup-toolbar.js +1 -6
  1312. package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  1313. package/build-module/components/block-pattern-setup/use-patterns-setup.js +1 -5
  1314. package/build-module/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  1315. package/build-module/components/block-patterns-list/index.js +3 -12
  1316. package/build-module/components/block-patterns-list/index.js.map +1 -1
  1317. package/build-module/components/block-popover/drop-zone.js +1 -6
  1318. package/build-module/components/block-popover/drop-zone.js.map +1 -1
  1319. package/build-module/components/block-popover/inbetween.js +17 -25
  1320. package/build-module/components/block-popover/inbetween.js.map +1 -1
  1321. package/build-module/components/block-popover/index.js +16 -20
  1322. package/build-module/components/block-popover/index.js.map +1 -1
  1323. package/build-module/components/block-popover/use-popover-scroll.js +3 -6
  1324. package/build-module/components/block-popover/use-popover-scroll.js.map +1 -1
  1325. package/build-module/components/block-preview/auto.js +17 -12
  1326. package/build-module/components/block-preview/auto.js.map +1 -1
  1327. package/build-module/components/block-preview/index.js +10 -13
  1328. package/build-module/components/block-preview/index.js.map +1 -1
  1329. package/build-module/components/block-quick-navigation/index.js +2 -7
  1330. package/build-module/components/block-quick-navigation/index.js.map +1 -1
  1331. package/build-module/components/block-removal-warning-modal/index.js +5 -10
  1332. package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
  1333. package/build-module/components/block-selection-clearer/index.js +4 -8
  1334. package/build-module/components/block-selection-clearer/index.js.map +1 -1
  1335. package/build-module/components/block-settings/button.native.js +2 -5
  1336. package/build-module/components/block-settings/button.native.js.map +1 -1
  1337. package/build-module/components/block-settings/container.native.js +3 -3
  1338. package/build-module/components/block-settings/container.native.js.map +1 -1
  1339. package/build-module/components/block-settings/index.native.js.map +1 -1
  1340. package/build-module/components/block-settings-menu/block-convert-button.js +0 -3
  1341. package/build-module/components/block-settings-menu/block-convert-button.js.map +1 -1
  1342. package/build-module/components/block-settings-menu/block-html-convert-button.js +1 -1
  1343. package/build-module/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  1344. package/build-module/components/block-settings-menu/block-mode-toggle.js +1 -6
  1345. package/build-module/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  1346. package/build-module/components/block-settings-menu/block-settings-dropdown.js +17 -40
  1347. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  1348. package/build-module/components/block-settings-menu/block-settings-menu-first-item.js.map +1 -1
  1349. package/build-module/components/block-settings-menu/index.js +1 -2
  1350. package/build-module/components/block-settings-menu/index.js.map +1 -1
  1351. package/build-module/components/block-settings-menu-controls/index.js +13 -13
  1352. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  1353. package/build-module/components/block-styles/index.js +4 -15
  1354. package/build-module/components/block-styles/index.js.map +1 -1
  1355. package/build-module/components/block-styles/index.native.js +2 -10
  1356. package/build-module/components/block-styles/index.native.js.map +1 -1
  1357. package/build-module/components/block-styles/menu-items.js +1 -6
  1358. package/build-module/components/block-styles/menu-items.js.map +1 -1
  1359. package/build-module/components/block-styles/preview-panel.js +5 -4
  1360. package/build-module/components/block-styles/preview-panel.js.map +1 -1
  1361. package/build-module/components/block-styles/preview.native.js +4 -12
  1362. package/build-module/components/block-styles/preview.native.js.map +1 -1
  1363. package/build-module/components/block-styles/use-styles-for-block.js +3 -11
  1364. package/build-module/components/block-styles/use-styles-for-block.js.map +1 -1
  1365. package/build-module/components/block-styles/utils.js +4 -10
  1366. package/build-module/components/block-styles/utils.js.map +1 -1
  1367. package/build-module/components/block-switcher/block-styles-menu.js +1 -2
  1368. package/build-module/components/block-switcher/block-styles-menu.js.map +1 -1
  1369. package/build-module/components/block-switcher/block-transformations-menu.js +6 -12
  1370. package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
  1371. package/build-module/components/block-switcher/block-transformations-menu.native.js +5 -13
  1372. package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  1373. package/build-module/components/block-switcher/block-variation-transformations.js +3 -8
  1374. package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
  1375. package/build-module/components/block-switcher/index.js +12 -26
  1376. package/build-module/components/block-switcher/index.js.map +1 -1
  1377. package/build-module/components/block-switcher/pattern-transformations-menu.js +3 -8
  1378. package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  1379. package/build-module/components/block-switcher/preview-block-popover.js +1 -2
  1380. package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
  1381. package/build-module/components/block-switcher/use-transformed-patterns.js +14 -21
  1382. package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
  1383. package/build-module/components/block-switcher/utils.js +6 -6
  1384. package/build-module/components/block-switcher/utils.js.map +1 -1
  1385. package/build-module/components/block-title/index.js +2 -1
  1386. package/build-module/components/block-title/index.js.map +1 -1
  1387. package/build-module/components/block-title/use-block-display-title.js +4 -11
  1388. package/build-module/components/block-title/use-block-display-title.js.map +1 -1
  1389. package/build-module/components/block-toolbar/block-name-context.js +0 -2
  1390. package/build-module/components/block-toolbar/block-name-context.js.map +1 -1
  1391. package/build-module/components/block-toolbar/block-toolbar-last-item.js.map +1 -1
  1392. package/build-module/components/block-toolbar/block-toolbar-menu.native.js +26 -31
  1393. package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  1394. package/build-module/components/block-toolbar/index.js +13 -49
  1395. package/build-module/components/block-toolbar/index.js.map +1 -1
  1396. package/build-module/components/block-toolbar/index.native.js +1 -6
  1397. package/build-module/components/block-toolbar/index.native.js.map +1 -1
  1398. package/build-module/components/block-toolbar/utils.js +56 -69
  1399. package/build-module/components/block-toolbar/utils.js.map +1 -1
  1400. package/build-module/components/block-tools/back-compat.js +3 -4
  1401. package/build-module/components/block-tools/back-compat.js.map +1 -1
  1402. package/build-module/components/block-tools/block-contextual-toolbar.js +51 -13
  1403. package/build-module/components/block-tools/block-contextual-toolbar.js.map +1 -1
  1404. package/build-module/components/block-tools/block-selection-button.js +11 -30
  1405. package/build-module/components/block-tools/block-selection-button.js.map +1 -1
  1406. package/build-module/components/block-tools/index.js +9 -20
  1407. package/build-module/components/block-tools/index.js.map +1 -1
  1408. package/build-module/components/block-tools/insertion-point.js +9 -22
  1409. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  1410. package/build-module/components/block-tools/selected-block-popover.js +13 -25
  1411. package/build-module/components/block-tools/selected-block-popover.js.map +1 -1
  1412. package/build-module/components/block-tools/use-block-toolbar-popover-props.js +35 -29
  1413. package/build-module/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
  1414. package/build-module/components/block-tools/zoom-out-mode-inserters.js +3 -8
  1415. package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  1416. package/build-module/components/block-types-list/index.js +1 -7
  1417. package/build-module/components/block-types-list/index.js.map +1 -1
  1418. package/build-module/components/block-types-list/index.native.js +4 -14
  1419. package/build-module/components/block-types-list/index.native.js.map +1 -1
  1420. package/build-module/components/block-variation-picker/index.js +1 -4
  1421. package/build-module/components/block-variation-picker/index.js.map +1 -1
  1422. package/build-module/components/block-variation-picker/index.native.js +15 -30
  1423. package/build-module/components/block-variation-picker/index.native.js.map +1 -1
  1424. package/build-module/components/block-variation-transforms/index.js +8 -15
  1425. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  1426. package/build-module/components/block-vertical-alignment-control/icons.js +0 -1
  1427. package/build-module/components/block-vertical-alignment-control/icons.js.map +1 -1
  1428. package/build-module/components/block-vertical-alignment-control/index.js +5 -7
  1429. package/build-module/components/block-vertical-alignment-control/index.js.map +1 -1
  1430. package/build-module/components/block-vertical-alignment-control/ui.js +4 -7
  1431. package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
  1432. package/build-module/components/border-radius-control/all-input-control.js +8 -10
  1433. package/build-module/components/border-radius-control/all-input-control.js.map +1 -1
  1434. package/build-module/components/border-radius-control/index.js +5 -8
  1435. package/build-module/components/border-radius-control/index.js.map +1 -1
  1436. package/build-module/components/border-radius-control/input-controls.js +13 -11
  1437. package/build-module/components/border-radius-control/input-controls.js.map +1 -1
  1438. package/build-module/components/border-radius-control/linked-button.js +4 -3
  1439. package/build-module/components/border-radius-control/linked-button.js.map +1 -1
  1440. package/build-module/components/border-radius-control/utils.js +10 -12
  1441. package/build-module/components/border-radius-control/utils.js.map +1 -1
  1442. package/build-module/components/button-block-appender/index.js +6 -12
  1443. package/build-module/components/button-block-appender/index.js.map +1 -1
  1444. package/build-module/components/button-block-appender/index.native.js +5 -7
  1445. package/build-module/components/button-block-appender/index.native.js.map +1 -1
  1446. package/build-module/components/caption/index.native.js +1 -4
  1447. package/build-module/components/caption/index.native.js.map +1 -1
  1448. package/build-module/components/child-layout-control/index.js +7 -10
  1449. package/build-module/components/child-layout-control/index.js.map +1 -1
  1450. package/build-module/components/color-palette/control.js +2 -2
  1451. package/build-module/components/color-palette/control.js.map +1 -1
  1452. package/build-module/components/color-palette/index.js +1 -1
  1453. package/build-module/components/color-palette/index.js.map +1 -1
  1454. package/build-module/components/color-palette/with-color-context.js +3 -3
  1455. package/build-module/components/color-palette/with-color-context.js.map +1 -1
  1456. package/build-module/components/color-style-selector/index.js +2 -9
  1457. package/build-module/components/color-style-selector/index.js.map +1 -1
  1458. package/build-module/components/colors/index.js.map +1 -1
  1459. package/build-module/components/colors/utils.js +5 -10
  1460. package/build-module/components/colors/utils.js.map +1 -1
  1461. package/build-module/components/colors/with-colors.js +17 -25
  1462. package/build-module/components/colors/with-colors.js.map +1 -1
  1463. package/build-module/components/colors-gradients/control.js +8 -15
  1464. package/build-module/components/colors-gradients/control.js.map +1 -1
  1465. package/build-module/components/colors-gradients/dropdown.js +18 -19
  1466. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  1467. package/build-module/components/colors-gradients/panel-color-gradient-settings.js +8 -12
  1468. package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  1469. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js +2 -3
  1470. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  1471. package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +2 -10
  1472. package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
  1473. package/build-module/components/contrast-checker/index.js +20 -24
  1474. package/build-module/components/contrast-checker/index.js.map +1 -1
  1475. package/build-module/components/contrast-checker/index.native.js +4 -12
  1476. package/build-module/components/contrast-checker/index.native.js.map +1 -1
  1477. package/build-module/components/convert-to-group-buttons/index.js +1 -12
  1478. package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
  1479. package/build-module/components/convert-to-group-buttons/index.native.js +5 -12
  1480. package/build-module/components/convert-to-group-buttons/index.native.js.map +1 -1
  1481. package/build-module/components/convert-to-group-buttons/toolbar.js +3 -12
  1482. package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
  1483. package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js +6 -5
  1484. package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
  1485. package/build-module/components/copy-handler/index.js +24 -44
  1486. package/build-module/components/copy-handler/index.js.map +1 -1
  1487. package/build-module/components/date-format-picker/index.js +4 -6
  1488. package/build-module/components/date-format-picker/index.js.map +1 -1
  1489. package/build-module/components/default-block-appender/index.js +7 -9
  1490. package/build-module/components/default-block-appender/index.js.map +1 -1
  1491. package/build-module/components/default-block-appender/index.native.js +16 -10
  1492. package/build-module/components/default-block-appender/index.native.js.map +1 -1
  1493. package/build-module/components/default-style-picker/index.js +4 -6
  1494. package/build-module/components/default-style-picker/index.js.map +1 -1
  1495. package/build-module/components/dimensions-tool/aspect-ratio-tool.js +2 -2
  1496. package/build-module/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  1497. package/build-module/components/dimensions-tool/index.js +39 -33
  1498. package/build-module/components/dimensions-tool/index.js.map +1 -1
  1499. package/build-module/components/dimensions-tool/scale-tool.js +2 -3
  1500. package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
  1501. package/build-module/components/dimensions-tool/width-height-tool.js +5 -12
  1502. package/build-module/components/dimensions-tool/width-height-tool.js.map +1 -1
  1503. package/build-module/components/duotone/components.js +7 -7
  1504. package/build-module/components/duotone/components.js.map +1 -1
  1505. package/build-module/components/duotone/index.js.map +1 -1
  1506. package/build-module/components/duotone/utils.js +1 -1
  1507. package/build-module/components/duotone/utils.js.map +1 -1
  1508. package/build-module/components/duotone-control/index.js +0 -6
  1509. package/build-module/components/duotone-control/index.js.map +1 -1
  1510. package/build-module/components/editable-text/index.js +4 -6
  1511. package/build-module/components/editable-text/index.js.map +1 -1
  1512. package/build-module/components/editor-styles/index.js +6 -12
  1513. package/build-module/components/editor-styles/index.js.map +1 -1
  1514. package/build-module/components/floating-toolbar/index.native.js +4 -8
  1515. package/build-module/components/floating-toolbar/index.native.js.map +1 -1
  1516. package/build-module/components/floating-toolbar/nav-up-icon.js +0 -3
  1517. package/build-module/components/floating-toolbar/nav-up-icon.js.map +1 -1
  1518. package/build-module/components/font-appearance-control/index.js +24 -27
  1519. package/build-module/components/font-appearance-control/index.js.map +1 -1
  1520. package/build-module/components/font-family/index.js +1 -5
  1521. package/build-module/components/font-family/index.js.map +1 -1
  1522. package/build-module/components/font-sizes/fluid-utils.js +52 -48
  1523. package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
  1524. package/build-module/components/font-sizes/font-size-picker.js +4 -6
  1525. package/build-module/components/font-sizes/font-size-picker.js.map +1 -1
  1526. package/build-module/components/font-sizes/index.js.map +1 -1
  1527. package/build-module/components/font-sizes/index.native.js.map +1 -1
  1528. package/build-module/components/font-sizes/utils.js +3 -8
  1529. package/build-module/components/font-sizes/utils.js.map +1 -1
  1530. package/build-module/components/font-sizes/with-font-sizes.js +15 -22
  1531. package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
  1532. package/build-module/components/global-styles/advanced-panel.js +3 -9
  1533. package/build-module/components/global-styles/advanced-panel.js.map +1 -1
  1534. package/build-module/components/global-styles/behaviors-panel.js +57 -0
  1535. package/build-module/components/global-styles/behaviors-panel.js.map +1 -0
  1536. package/build-module/components/global-styles/border-panel.js +22 -36
  1537. package/build-module/components/global-styles/border-panel.js.map +1 -1
  1538. package/build-module/components/global-styles/color-panel.js +31 -56
  1539. package/build-module/components/global-styles/color-panel.js.map +1 -1
  1540. package/build-module/components/global-styles/color-panel.native.js +5 -8
  1541. package/build-module/components/global-styles/color-panel.native.js.map +1 -1
  1542. package/build-module/components/global-styles/context.js.map +1 -1
  1543. package/build-module/components/global-styles/dimensions-panel.js +34 -80
  1544. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  1545. package/build-module/components/global-styles/effects-panel.js +8 -20
  1546. package/build-module/components/global-styles/effects-panel.js.map +1 -1
  1547. package/build-module/components/global-styles/filters-panel.js +10 -20
  1548. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  1549. package/build-module/components/global-styles/get-block-css-selector.js +34 -29
  1550. package/build-module/components/global-styles/get-block-css-selector.js.map +1 -1
  1551. package/build-module/components/global-styles/hooks.js +136 -56
  1552. package/build-module/components/global-styles/hooks.js.map +1 -1
  1553. package/build-module/components/global-styles/index.js +2 -1
  1554. package/build-module/components/global-styles/index.js.map +1 -1
  1555. package/build-module/components/global-styles/typography-panel.js +25 -73
  1556. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  1557. package/build-module/components/global-styles/typography-utils.js +10 -16
  1558. package/build-module/components/global-styles/typography-utils.js.map +1 -1
  1559. package/build-module/components/global-styles/use-global-styles-output.js +99 -163
  1560. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  1561. package/build-module/components/global-styles/utils.js +14 -44
  1562. package/build-module/components/global-styles/utils.js.map +1 -1
  1563. package/build-module/components/gradients/index.js.map +1 -1
  1564. package/build-module/components/gradients/index.native.js.map +1 -1
  1565. package/build-module/components/gradients/use-gradient.js +3 -11
  1566. package/build-module/components/gradients/use-gradient.js.map +1 -1
  1567. package/build-module/components/gradients/with-gradient.js +2 -3
  1568. package/build-module/components/gradients/with-gradient.js.map +1 -1
  1569. package/build-module/components/height-control/index.js +2 -8
  1570. package/build-module/components/height-control/index.js.map +1 -1
  1571. package/build-module/components/iframe/index.js +26 -37
  1572. package/build-module/components/iframe/index.js.map +1 -1
  1573. package/build-module/components/iframe/use-compatibility-styles.js +9 -19
  1574. package/build-module/components/iframe/use-compatibility-styles.js.map +1 -1
  1575. package/build-module/components/image-editor/aspect-ratio-dropdown.js +3 -5
  1576. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  1577. package/build-module/components/image-editor/constants.js.map +1 -1
  1578. package/build-module/components/image-editor/context.js +3 -3
  1579. package/build-module/components/image-editor/context.js.map +1 -1
  1580. package/build-module/components/image-editor/cropper.js +4 -6
  1581. package/build-module/components/image-editor/cropper.js.map +1 -1
  1582. package/build-module/components/image-editor/form-controls.js +1 -2
  1583. package/build-module/components/image-editor/form-controls.js.map +1 -1
  1584. package/build-module/components/image-editor/index.js +1 -2
  1585. package/build-module/components/image-editor/index.js.map +1 -1
  1586. package/build-module/components/image-editor/rotation-button.js +2 -2
  1587. package/build-module/components/image-editor/rotation-button.js.map +1 -1
  1588. package/build-module/components/image-editor/use-save-image.js +4 -7
  1589. package/build-module/components/image-editor/use-save-image.js.map +1 -1
  1590. package/build-module/components/image-editor/use-transform-image.js +0 -9
  1591. package/build-module/components/image-editor/use-transform-image.js.map +1 -1
  1592. package/build-module/components/image-editor/zoom-dropdown.js +1 -2
  1593. package/build-module/components/image-editor/zoom-dropdown.js.map +1 -1
  1594. package/build-module/components/image-size-control/index.js +1 -4
  1595. package/build-module/components/image-size-control/index.js.map +1 -1
  1596. package/build-module/components/image-size-control/use-dimension-handler.js +6 -12
  1597. package/build-module/components/image-size-control/use-dimension-handler.js.map +1 -1
  1598. package/build-module/components/index.js +11 -1
  1599. package/build-module/components/index.js.map +1 -1
  1600. package/build-module/components/index.native.js +4 -3
  1601. package/build-module/components/index.native.js.map +1 -1
  1602. package/build-module/components/inner-blocks/button-block-appender.js +1 -2
  1603. package/build-module/components/inner-blocks/button-block-appender.js.map +1 -1
  1604. package/build-module/components/inner-blocks/default-block-appender.js +1 -2
  1605. package/build-module/components/inner-blocks/default-block-appender.js.map +1 -1
  1606. package/build-module/components/inner-blocks/index.js +23 -21
  1607. package/build-module/components/inner-blocks/index.js.map +1 -1
  1608. package/build-module/components/inner-blocks/index.native.js +21 -20
  1609. package/build-module/components/inner-blocks/index.native.js.map +1 -1
  1610. package/build-module/components/inner-blocks/use-block-context.js +2 -7
  1611. package/build-module/components/inner-blocks/use-block-context.js.map +1 -1
  1612. package/build-module/components/inner-blocks/use-inner-block-template-sync.js +13 -14
  1613. package/build-module/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
  1614. package/build-module/components/inner-blocks/use-nested-settings-update.js +19 -21
  1615. package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  1616. package/build-module/components/inner-blocks/with-client-id.js +3 -3
  1617. package/build-module/components/inner-blocks/with-client-id.js.map +1 -1
  1618. package/build-module/components/inserter/block-patterns-explorer/explorer.js +3 -6
  1619. package/build-module/components/inserter/block-patterns-explorer/explorer.js.map +1 -1
  1620. package/build-module/components/inserter/block-patterns-explorer/patterns-list.js +5 -13
  1621. package/build-module/components/inserter/block-patterns-explorer/patterns-list.js.map +1 -1
  1622. package/build-module/components/inserter/block-patterns-explorer/sidebar.js +0 -5
  1623. package/build-module/components/inserter/block-patterns-explorer/sidebar.js.map +1 -1
  1624. package/build-module/components/inserter/block-patterns-tab.js +12 -22
  1625. package/build-module/components/inserter/block-patterns-tab.js.map +1 -1
  1626. package/build-module/components/inserter/block-types-tab.js +9 -16
  1627. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  1628. package/build-module/components/inserter/block-types-tab.native.js +1 -8
  1629. package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
  1630. package/build-module/components/inserter/hooks/use-block-type-impressions.native.js +9 -10
  1631. package/build-module/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  1632. package/build-module/components/inserter/hooks/use-block-types-state.js +9 -6
  1633. package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
  1634. package/build-module/components/inserter/hooks/use-clipboard-block.native.js +1 -3
  1635. package/build-module/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
  1636. package/build-module/components/inserter/hooks/use-debounced-input.js +5 -7
  1637. package/build-module/components/inserter/hooks/use-debounced-input.js.map +1 -1
  1638. package/build-module/components/inserter/hooks/use-insertion-point.js +4 -10
  1639. package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
  1640. package/build-module/components/inserter/hooks/use-patterns-state.js +6 -7
  1641. package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
  1642. package/build-module/components/inserter/index.js +30 -56
  1643. package/build-module/components/inserter/index.js.map +1 -1
  1644. package/build-module/components/inserter/index.native.js +24 -56
  1645. package/build-module/components/inserter/index.native.js.map +1 -1
  1646. package/build-module/components/inserter/library.js +1 -7
  1647. package/build-module/components/inserter/library.js.map +1 -1
  1648. package/build-module/components/inserter/media-tab/hooks.js +14 -25
  1649. package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
  1650. package/build-module/components/inserter/media-tab/index.js.map +1 -1
  1651. package/build-module/components/inserter/media-tab/media-list.js +3 -5
  1652. package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
  1653. package/build-module/components/inserter/media-tab/media-panel.js +1 -4
  1654. package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
  1655. package/build-module/components/inserter/media-tab/media-preview.js +11 -24
  1656. package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
  1657. package/build-module/components/inserter/media-tab/media-tab.js +4 -7
  1658. package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
  1659. package/build-module/components/inserter/media-tab/utils.js +1 -4
  1660. package/build-module/components/inserter/media-tab/utils.js.map +1 -1
  1661. package/build-module/components/inserter/menu.js +3 -5
  1662. package/build-module/components/inserter/menu.js.map +1 -1
  1663. package/build-module/components/inserter/menu.native.js +6 -15
  1664. package/build-module/components/inserter/menu.native.js.map +1 -1
  1665. package/build-module/components/inserter/mobile-tab-navigation.js +2 -4
  1666. package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
  1667. package/build-module/components/inserter/no-results.js +0 -3
  1668. package/build-module/components/inserter/no-results.js.map +1 -1
  1669. package/build-module/components/inserter/no-results.native.js +2 -5
  1670. package/build-module/components/inserter/no-results.native.js.map +1 -1
  1671. package/build-module/components/inserter/panel.js +0 -3
  1672. package/build-module/components/inserter/panel.js.map +1 -1
  1673. package/build-module/components/inserter/preview-panel.js +15 -11
  1674. package/build-module/components/inserter/preview-panel.js.map +1 -1
  1675. package/build-module/components/inserter/quick-inserter.js +5 -8
  1676. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  1677. package/build-module/components/inserter/reusable-block-rename-hint.js +1 -7
  1678. package/build-module/components/inserter/reusable-block-rename-hint.js.map +1 -1
  1679. package/build-module/components/inserter/reusable-blocks-tab.js +6 -10
  1680. package/build-module/components/inserter/reusable-blocks-tab.js.map +1 -1
  1681. package/build-module/components/inserter/reusable-blocks-tab.native.js +1 -4
  1682. package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  1683. package/build-module/components/inserter/search-items.js +22 -33
  1684. package/build-module/components/inserter/search-items.js.map +1 -1
  1685. package/build-module/components/inserter/search-results.js +6 -18
  1686. package/build-module/components/inserter/search-results.js.map +1 -1
  1687. package/build-module/components/inserter/search-results.native.js +1 -7
  1688. package/build-module/components/inserter/search-results.native.js.map +1 -1
  1689. package/build-module/components/inserter/tabs.js +0 -13
  1690. package/build-module/components/inserter/tabs.js.map +1 -1
  1691. package/build-module/components/inserter/tabs.native.js +6 -13
  1692. package/build-module/components/inserter/tabs.native.js.map +1 -1
  1693. package/build-module/components/inserter/tips.js +2 -4
  1694. package/build-module/components/inserter/tips.js.map +1 -1
  1695. package/build-module/components/inserter/utils.native.js +2 -6
  1696. package/build-module/components/inserter/utils.native.js.map +1 -1
  1697. package/build-module/components/inserter-draggable-blocks/index.js +0 -4
  1698. package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
  1699. package/build-module/components/inserter-list-item/index.js +3 -10
  1700. package/build-module/components/inserter-list-item/index.js.map +1 -1
  1701. package/build-module/components/inserter-listbox/context.js.map +1 -1
  1702. package/build-module/components/inserter-listbox/group.js +0 -4
  1703. package/build-module/components/inserter-listbox/group.js.map +1 -1
  1704. package/build-module/components/inserter-listbox/index.js +1 -4
  1705. package/build-module/components/inserter-listbox/index.js.map +1 -1
  1706. package/build-module/components/inserter-listbox/item.js +9 -11
  1707. package/build-module/components/inserter-listbox/item.js.map +1 -1
  1708. package/build-module/components/inserter-listbox/row.js +1 -4
  1709. package/build-module/components/inserter-listbox/row.js.map +1 -1
  1710. package/build-module/components/inserter-menu-extension/index.js.map +1 -1
  1711. package/build-module/components/inspector-controls/block-support-slot-container.js +2 -2
  1712. package/build-module/components/inspector-controls/block-support-slot-container.js.map +1 -1
  1713. package/build-module/components/inspector-controls/block-support-tools-panel.js +7 -5
  1714. package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  1715. package/build-module/components/inspector-controls/fill.js +4 -10
  1716. package/build-module/components/inspector-controls/fill.js.map +1 -1
  1717. package/build-module/components/inspector-controls/fill.native.js +4 -8
  1718. package/build-module/components/inspector-controls/fill.native.js.map +1 -1
  1719. package/build-module/components/inspector-controls/groups.js.map +1 -1
  1720. package/build-module/components/inspector-controls/index.js +7 -7
  1721. package/build-module/components/inspector-controls/index.js.map +1 -1
  1722. package/build-module/components/inspector-controls/slot.js +5 -9
  1723. package/build-module/components/inspector-controls/slot.js.map +1 -1
  1724. package/build-module/components/inspector-controls/slot.native.js +3 -6
  1725. package/build-module/components/inspector-controls/slot.native.js.map +1 -1
  1726. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js +1 -6
  1727. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  1728. package/build-module/components/inspector-controls-tabs/index.js +1 -4
  1729. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  1730. package/build-module/components/inspector-controls-tabs/position-controls-panel.js +3 -8
  1731. package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  1732. package/build-module/components/inspector-controls-tabs/settings-tab-hint.js +0 -4
  1733. package/build-module/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
  1734. package/build-module/components/inspector-controls-tabs/settings-tab.js +0 -3
  1735. package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  1736. package/build-module/components/inspector-controls-tabs/styles-tab.js +1 -4
  1737. package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  1738. package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js +14 -16
  1739. package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  1740. package/build-module/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -1
  1741. package/build-module/components/inspector-controls-tabs/utils.js.map +1 -1
  1742. package/build-module/components/inspector-popover-header/index.js +0 -1
  1743. package/build-module/components/inspector-popover-header/index.js.map +1 -1
  1744. package/build-module/components/justify-content-control/index.js +5 -7
  1745. package/build-module/components/justify-content-control/index.js.map +1 -1
  1746. package/build-module/components/justify-content-control/ui.js +0 -4
  1747. package/build-module/components/justify-content-control/ui.js.map +1 -1
  1748. package/build-module/components/keyboard-shortcuts/index.js +9 -3
  1749. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  1750. package/build-module/components/letter-spacing-control/index.js +4 -4
  1751. package/build-module/components/letter-spacing-control/index.js.map +1 -1
  1752. package/build-module/components/line-height-control/index.js +22 -34
  1753. package/build-module/components/line-height-control/index.js.map +1 -1
  1754. package/build-module/components/line-height-control/index.native.js +4 -4
  1755. package/build-module/components/line-height-control/index.native.js.map +1 -1
  1756. package/build-module/components/line-height-control/utils.js +7 -3
  1757. package/build-module/components/line-height-control/utils.js.map +1 -1
  1758. package/build-module/components/link-control/constants.js +3 -2
  1759. package/build-module/components/link-control/constants.js.map +1 -1
  1760. package/build-module/components/link-control/index.js +81 -38
  1761. package/build-module/components/link-control/index.js.map +1 -1
  1762. package/build-module/components/link-control/is-url-like.js +5 -6
  1763. package/build-module/components/link-control/is-url-like.js.map +1 -1
  1764. package/build-module/components/link-control/link-preview.js +12 -11
  1765. package/build-module/components/link-control/link-preview.js.map +1 -1
  1766. package/build-module/components/link-control/search-create-button.js +3 -7
  1767. package/build-module/components/link-control/search-create-button.js.map +1 -1
  1768. package/build-module/components/link-control/search-input.js +18 -23
  1769. package/build-module/components/link-control/search-input.js.map +1 -1
  1770. package/build-module/components/link-control/search-item.js +6 -12
  1771. package/build-module/components/link-control/search-item.js.map +1 -1
  1772. package/build-module/components/link-control/search-results.js +14 -14
  1773. package/build-module/components/link-control/search-results.js.map +1 -1
  1774. package/build-module/components/link-control/settings-drawer.js +0 -3
  1775. package/build-module/components/link-control/settings-drawer.js.map +1 -1
  1776. package/build-module/components/link-control/settings.js +2 -7
  1777. package/build-module/components/link-control/settings.js.map +1 -1
  1778. package/build-module/components/link-control/use-create-page.js +4 -8
  1779. package/build-module/components/link-control/use-create-page.js.map +1 -1
  1780. package/build-module/components/link-control/use-internal-value.js +8 -10
  1781. package/build-module/components/link-control/use-internal-value.js.map +1 -1
  1782. package/build-module/components/link-control/use-rich-url-data.js +9 -12
  1783. package/build-module/components/link-control/use-rich-url-data.js.map +1 -1
  1784. package/build-module/components/link-control/use-search-handler.js +10 -14
  1785. package/build-module/components/link-control/use-search-handler.js.map +1 -1
  1786. package/build-module/components/link-control/viewer-slot.js.map +1 -1
  1787. package/build-module/components/list-view/appender.js +4 -8
  1788. package/build-module/components/list-view/appender.js.map +1 -1
  1789. package/build-module/components/list-view/aria-referenced-text.js +1 -2
  1790. package/build-module/components/list-view/aria-referenced-text.js.map +1 -1
  1791. package/build-module/components/list-view/block-contents.js +5 -5
  1792. package/build-module/components/list-view/block-contents.js.map +1 -1
  1793. package/build-module/components/list-view/block-select-button.js +32 -19
  1794. package/build-module/components/list-view/block-select-button.js.map +1 -1
  1795. package/build-module/components/list-view/block.js +25 -29
  1796. package/build-module/components/list-view/block.js.map +1 -1
  1797. package/build-module/components/list-view/branch.js +9 -28
  1798. package/build-module/components/list-view/branch.js.map +1 -1
  1799. package/build-module/components/list-view/context.js.map +1 -1
  1800. package/build-module/components/list-view/drop-indicator.js +34 -43
  1801. package/build-module/components/list-view/drop-indicator.js.map +1 -1
  1802. package/build-module/components/list-view/expander.js +2 -2
  1803. package/build-module/components/list-view/expander.js.map +1 -1
  1804. package/build-module/components/list-view/index.js +18 -22
  1805. package/build-module/components/list-view/index.js.map +1 -1
  1806. package/build-module/components/list-view/leaf.js +2 -3
  1807. package/build-module/components/list-view/leaf.js.map +1 -1
  1808. package/build-module/components/list-view/use-block-selection.js +15 -22
  1809. package/build-module/components/list-view/use-block-selection.js.map +1 -1
  1810. package/build-module/components/list-view/use-list-view-client-ids.js +2 -1
  1811. package/build-module/components/list-view/use-list-view-client-ids.js.map +1 -1
  1812. package/build-module/components/list-view/use-list-view-drop-zone.js +40 -54
  1813. package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
  1814. package/build-module/components/list-view/use-list-view-expand-selected-item.js +5 -4
  1815. package/build-module/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
  1816. package/build-module/components/list-view/use-list-view-images.js +78 -0
  1817. package/build-module/components/list-view/use-list-view-images.js.map +1 -0
  1818. package/build-module/components/list-view/use-list-view-scroll-into-view.js +5 -5
  1819. package/build-module/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
  1820. package/build-module/components/list-view/utils.js +3 -4
  1821. package/build-module/components/list-view/utils.js.map +1 -1
  1822. package/build-module/components/media-placeholder/index.js +12 -59
  1823. package/build-module/components/media-placeholder/index.js.map +1 -1
  1824. package/build-module/components/media-placeholder/index.native.js +9 -24
  1825. package/build-module/components/media-placeholder/index.native.js.map +1 -1
  1826. package/build-module/components/media-replace-flow/index.js +9 -25
  1827. package/build-module/components/media-replace-flow/index.js.map +1 -1
  1828. package/build-module/components/media-replace-flow/index.native.js +14 -3
  1829. package/build-module/components/media-replace-flow/index.native.js.map +1 -1
  1830. package/build-module/components/media-upload/check.js +2 -2
  1831. package/build-module/components/media-upload/check.js.map +1 -1
  1832. package/build-module/components/media-upload/index.js +2 -3
  1833. package/build-module/components/media-upload/index.js.map +1 -1
  1834. package/build-module/components/media-upload/index.native.js +18 -29
  1835. package/build-module/components/media-upload/index.native.js.map +1 -1
  1836. package/build-module/components/media-upload-progress/index.native.js +4 -27
  1837. package/build-module/components/media-upload-progress/index.native.js.map +1 -1
  1838. package/build-module/components/multi-selection-inspector/index.js +3 -8
  1839. package/build-module/components/multi-selection-inspector/index.js.map +1 -1
  1840. package/build-module/components/navigable-toolbar/index.js +9 -26
  1841. package/build-module/components/navigable-toolbar/index.js.map +1 -1
  1842. package/build-module/components/observe-typing/index.js +26 -38
  1843. package/build-module/components/observe-typing/index.js.map +1 -1
  1844. package/build-module/components/panel-color-settings/index.js +2 -5
  1845. package/build-module/components/panel-color-settings/index.js.map +1 -1
  1846. package/build-module/components/plain-text/index.js +3 -5
  1847. package/build-module/components/plain-text/index.js.map +1 -1
  1848. package/build-module/components/plain-text/index.native.js +8 -22
  1849. package/build-module/components/plain-text/index.native.js.map +1 -1
  1850. package/build-module/components/preview-options/index.js +1 -2
  1851. package/build-module/components/preview-options/index.js.map +1 -1
  1852. package/build-module/components/provider/block-refs-provider.js +0 -1
  1853. package/build-module/components/provider/block-refs-provider.js.map +1 -1
  1854. package/build-module/components/provider/index.js +8 -5
  1855. package/build-module/components/provider/index.js.map +1 -1
  1856. package/build-module/components/provider/index.native.js +4 -3
  1857. package/build-module/components/provider/index.native.js.map +1 -1
  1858. package/build-module/components/provider/use-block-sync.js +23 -38
  1859. package/build-module/components/provider/use-block-sync.js.map +1 -1
  1860. package/build-module/components/provider/with-registry-provider.js +1 -5
  1861. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  1862. package/build-module/components/publish-date-time-picker/index.js +1 -4
  1863. package/build-module/components/publish-date-time-picker/index.js.map +1 -1
  1864. package/build-module/components/recursion-provider/index.js +6 -7
  1865. package/build-module/components/recursion-provider/index.js.map +1 -1
  1866. package/build-module/components/resizable-box-popover/index.js +3 -3
  1867. package/build-module/components/resizable-box-popover/index.js.map +1 -1
  1868. package/build-module/components/resolution-tool/index.js +0 -1
  1869. package/build-module/components/resolution-tool/index.js.map +1 -1
  1870. package/build-module/components/responsive-block-control/index.js +4 -14
  1871. package/build-module/components/responsive-block-control/index.js.map +1 -1
  1872. package/build-module/components/responsive-block-control/label.js +1 -3
  1873. package/build-module/components/responsive-block-control/label.js.map +1 -1
  1874. package/build-module/components/rich-text/content.js +3 -8
  1875. package/build-module/components/rich-text/content.js.map +1 -1
  1876. package/build-module/components/rich-text/embed-handler-picker.native.js +0 -3
  1877. package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
  1878. package/build-module/components/rich-text/file-paste-handler.native.js.map +1 -1
  1879. package/build-module/components/rich-text/format-edit.js +49 -28
  1880. package/build-module/components/rich-text/format-edit.js.map +1 -1
  1881. package/build-module/components/rich-text/format-toolbar/index.js +5 -9
  1882. package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
  1883. package/build-module/components/rich-text/format-toolbar/index.native.js +1 -3
  1884. package/build-module/components/rich-text/format-toolbar/index.native.js.map +1 -1
  1885. package/build-module/components/rich-text/format-toolbar-container.js +4 -14
  1886. package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
  1887. package/build-module/components/rich-text/format-toolbar-container.native.js +0 -3
  1888. package/build-module/components/rich-text/format-toolbar-container.native.js.map +1 -1
  1889. package/build-module/components/rich-text/get-rich-text-values.js +15 -34
  1890. package/build-module/components/rich-text/get-rich-text-values.js.map +1 -1
  1891. package/build-module/components/rich-text/index.js +19 -37
  1892. package/build-module/components/rich-text/index.js.map +1 -1
  1893. package/build-module/components/rich-text/index.native.js +49 -76
  1894. package/build-module/components/rich-text/index.native.js.map +1 -1
  1895. package/build-module/components/rich-text/input-event.js +1 -2
  1896. package/build-module/components/rich-text/input-event.js.map +1 -1
  1897. package/build-module/components/rich-text/input-event.native.js +0 -1
  1898. package/build-module/components/rich-text/input-event.native.js.map +1 -1
  1899. package/build-module/components/rich-text/prevent-event-discovery.js +0 -4
  1900. package/build-module/components/rich-text/prevent-event-discovery.js.map +1 -1
  1901. package/build-module/components/rich-text/remove-browser-shortcuts.native.js.map +1 -1
  1902. package/build-module/components/rich-text/shortcut.js +1 -2
  1903. package/build-module/components/rich-text/shortcut.js.map +1 -1
  1904. package/build-module/components/rich-text/shortcut.native.js +0 -1
  1905. package/build-module/components/rich-text/shortcut.native.js.map +1 -1
  1906. package/build-module/components/rich-text/split-value.js +19 -16
  1907. package/build-module/components/rich-text/split-value.js.map +1 -1
  1908. package/build-module/components/rich-text/toolbar-button.js +2 -5
  1909. package/build-module/components/rich-text/toolbar-button.js.map +1 -1
  1910. package/build-module/components/rich-text/use-before-input-rules.js +7 -16
  1911. package/build-module/components/rich-text/use-before-input-rules.js.map +1 -1
  1912. package/build-module/components/rich-text/use-delete.js +5 -10
  1913. package/build-module/components/rich-text/use-delete.js.map +1 -1
  1914. package/build-module/components/rich-text/use-enter.js +3 -10
  1915. package/build-module/components/rich-text/use-enter.js.map +1 -1
  1916. package/build-module/components/rich-text/use-firefox-compat.js +5 -35
  1917. package/build-module/components/rich-text/use-firefox-compat.js.map +1 -1
  1918. package/build-module/components/rich-text/use-format-types.js +9 -20
  1919. package/build-module/components/rich-text/use-format-types.js.map +1 -1
  1920. package/build-module/components/rich-text/use-input-events.js +0 -1
  1921. package/build-module/components/rich-text/use-input-events.js.map +1 -1
  1922. package/build-module/components/rich-text/use-input-rules.js +10 -28
  1923. package/build-module/components/rich-text/use-input-rules.js.map +1 -1
  1924. package/build-module/components/rich-text/use-insert-replacement-text.js +2 -3
  1925. package/build-module/components/rich-text/use-insert-replacement-text.js.map +1 -1
  1926. package/build-module/components/rich-text/use-mark-persistent.js +6 -6
  1927. package/build-module/components/rich-text/use-mark-persistent.js.map +1 -1
  1928. package/build-module/components/rich-text/use-paste-handler.js +26 -62
  1929. package/build-module/components/rich-text/use-paste-handler.js.map +1 -1
  1930. package/build-module/components/rich-text/use-remove-browser-shortcuts.js +1 -2
  1931. package/build-module/components/rich-text/use-remove-browser-shortcuts.js.map +1 -1
  1932. package/build-module/components/rich-text/use-shortcuts.js +0 -1
  1933. package/build-module/components/rich-text/use-shortcuts.js.map +1 -1
  1934. package/build-module/components/rich-text/use-undo-automatic-change.js +1 -9
  1935. package/build-module/components/rich-text/use-undo-automatic-change.js.map +1 -1
  1936. package/build-module/components/rich-text/utils.js +2 -6
  1937. package/build-module/components/rich-text/utils.js.map +1 -1
  1938. package/build-module/components/selection-scroll-into-view/index.js +1 -1
  1939. package/build-module/components/selection-scroll-into-view/index.js.map +1 -1
  1940. package/build-module/components/skip-to-selected-block/index.js +2 -7
  1941. package/build-module/components/skip-to-selected-block/index.js.map +1 -1
  1942. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js +1 -3
  1943. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  1944. package/build-module/components/spacing-sizes-control/index.js +13 -14
  1945. package/build-module/components/spacing-sizes-control/index.js.map +1 -1
  1946. package/build-module/components/spacing-sizes-control/input-controls/axial.js +6 -9
  1947. package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  1948. package/build-module/components/spacing-sizes-control/input-controls/separated.js +2 -4
  1949. package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  1950. package/build-module/components/spacing-sizes-control/input-controls/single.js +2 -3
  1951. package/build-module/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  1952. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +6 -19
  1953. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  1954. package/build-module/components/spacing-sizes-control/sides-dropdown/index.js +1 -3
  1955. package/build-module/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
  1956. package/build-module/components/spacing-sizes-control/utils.js +35 -52
  1957. package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
  1958. package/build-module/components/text-decoration-control/index.js +2 -3
  1959. package/build-module/components/text-decoration-control/index.js.map +1 -1
  1960. package/build-module/components/text-transform-control/index.js +2 -3
  1961. package/build-module/components/text-transform-control/index.js.map +1 -1
  1962. package/build-module/components/tool-selector/index.js +4 -7
  1963. package/build-module/components/tool-selector/index.js.map +1 -1
  1964. package/build-module/components/typewriter/index.js +30 -46
  1965. package/build-module/components/typewriter/index.js.map +1 -1
  1966. package/build-module/components/ungroup-button/index.native.js +1 -7
  1967. package/build-module/components/ungroup-button/index.native.js.map +1 -1
  1968. package/build-module/components/unit-control/index.js +1 -2
  1969. package/build-module/components/unit-control/index.js.map +1 -1
  1970. package/build-module/components/url-input/button.js +2 -9
  1971. package/build-module/components/url-input/button.js.map +1 -1
  1972. package/build-module/components/url-input/index.js +41 -81
  1973. package/build-module/components/url-input/index.js.map +1 -1
  1974. package/build-module/components/url-input/index.native.js +1 -2
  1975. package/build-module/components/url-input/index.native.js.map +1 -1
  1976. package/build-module/components/url-popover/image-url-input-ui.js +3 -31
  1977. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  1978. package/build-module/components/url-popover/index.js +5 -12
  1979. package/build-module/components/url-popover/index.js.map +1 -1
  1980. package/build-module/components/url-popover/link-editor.js +2 -3
  1981. package/build-module/components/url-popover/link-editor.js.map +1 -1
  1982. package/build-module/components/url-popover/link-viewer-url.js +1 -4
  1983. package/build-module/components/url-popover/link-viewer-url.js.map +1 -1
  1984. package/build-module/components/url-popover/link-viewer.js +2 -3
  1985. package/build-module/components/url-popover/link-viewer.js.map +1 -1
  1986. package/build-module/components/use-block-commands/index.js +238 -0
  1987. package/build-module/components/use-block-commands/index.js.map +1 -0
  1988. package/build-module/components/use-block-display-information/index.js +3 -6
  1989. package/build-module/components/use-block-display-information/index.js.map +1 -1
  1990. package/build-module/components/use-block-drop-zone/index.js +14 -19
  1991. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  1992. package/build-module/components/use-block-drop-zone/index.native.js +13 -16
  1993. package/build-module/components/use-block-drop-zone/index.native.js.map +1 -1
  1994. package/build-module/components/use-display-block-controls/index.js +1 -4
  1995. package/build-module/components/use-display-block-controls/index.js.map +1 -1
  1996. package/build-module/components/use-display-block-controls/index.native.js +1 -3
  1997. package/build-module/components/use-display-block-controls/index.native.js.map +1 -1
  1998. package/build-module/components/use-moving-animation/index.js +6 -17
  1999. package/build-module/components/use-moving-animation/index.js.map +1 -1
  2000. package/build-module/components/use-on-block-drop/index.js +21 -30
  2001. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  2002. package/build-module/components/use-on-block-drop/index.native.js +13 -12
  2003. package/build-module/components/use-on-block-drop/index.native.js.map +1 -1
  2004. package/build-module/components/use-on-block-drop/types.js.map +1 -1
  2005. package/build-module/components/use-paste-styles/index.js +12 -21
  2006. package/build-module/components/use-paste-styles/index.js.map +1 -1
  2007. package/build-module/components/use-resize-canvas/index.js +1 -13
  2008. package/build-module/components/use-resize-canvas/index.js.map +1 -1
  2009. package/build-module/components/use-setting/index.js +17 -33
  2010. package/build-module/components/use-setting/index.js.map +1 -1
  2011. package/build-module/components/video-player/gridicon-play.native.js +0 -1
  2012. package/build-module/components/video-player/gridicon-play.native.js.map +1 -1
  2013. package/build-module/components/video-player/index.native.js +12 -17
  2014. package/build-module/components/video-player/index.native.js.map +1 -1
  2015. package/build-module/components/warning/index.js +2 -5
  2016. package/build-module/components/warning/index.js.map +1 -1
  2017. package/build-module/components/warning/index.native.js +2 -5
  2018. package/build-module/components/warning/index.native.js.map +1 -1
  2019. package/build-module/components/writing-flow/index.js +5 -9
  2020. package/build-module/components/writing-flow/index.js.map +1 -1
  2021. package/build-module/components/writing-flow/use-arrow-nav.js +37 -53
  2022. package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
  2023. package/build-module/components/writing-flow/use-click-selection.js +3 -6
  2024. package/build-module/components/writing-flow/use-click-selection.js.map +1 -1
  2025. package/build-module/components/writing-flow/use-drag-selection.js +27 -29
  2026. package/build-module/components/writing-flow/use-drag-selection.js.map +1 -1
  2027. package/build-module/components/writing-flow/use-input.js +8 -17
  2028. package/build-module/components/writing-flow/use-input.js.map +1 -1
  2029. package/build-module/components/writing-flow/use-multi-selection.js +10 -14
  2030. package/build-module/components/writing-flow/use-multi-selection.js.map +1 -1
  2031. package/build-module/components/writing-flow/use-select-all.js +4 -9
  2032. package/build-module/components/writing-flow/use-select-all.js.map +1 -1
  2033. package/build-module/components/writing-flow/use-selection-observer.js +20 -44
  2034. package/build-module/components/writing-flow/use-selection-observer.js.map +1 -1
  2035. package/build-module/components/writing-flow/use-tab-nav.js +28 -34
  2036. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  2037. package/build-module/components/writing-mode-control/index.js +2 -3
  2038. package/build-module/components/writing-mode-control/index.js.map +1 -1
  2039. package/build-module/elements/index.js.map +1 -1
  2040. package/build-module/hooks/align.js +25 -36
  2041. package/build-module/hooks/align.js.map +1 -1
  2042. package/build-module/hooks/align.native.js +6 -4
  2043. package/build-module/hooks/align.native.js.map +1 -1
  2044. package/build-module/hooks/anchor.js +11 -15
  2045. package/build-module/hooks/anchor.js.map +1 -1
  2046. package/build-module/hooks/aria-label.js +4 -6
  2047. package/build-module/hooks/aria-label.js.map +1 -1
  2048. package/build-module/hooks/behaviors.js +14 -25
  2049. package/build-module/hooks/behaviors.js.map +1 -1
  2050. package/build-module/hooks/border.js +48 -65
  2051. package/build-module/hooks/border.js.map +1 -1
  2052. package/build-module/hooks/color.js +32 -52
  2053. package/build-module/hooks/color.js.map +1 -1
  2054. package/build-module/hooks/compat.js +0 -4
  2055. package/build-module/hooks/compat.js.map +1 -1
  2056. package/build-module/hooks/content-lock-ui.js +5 -13
  2057. package/build-module/hooks/content-lock-ui.js.map +1 -1
  2058. package/build-module/hooks/contrast-checker.js +4 -11
  2059. package/build-module/hooks/contrast-checker.js.map +1 -1
  2060. package/build-module/hooks/custom-class-name.js +24 -26
  2061. package/build-module/hooks/custom-class-name.js.map +1 -1
  2062. package/build-module/hooks/custom-class-name.native.js +5 -6
  2063. package/build-module/hooks/custom-class-name.native.js.map +1 -1
  2064. package/build-module/hooks/custom-fields.js +113 -0
  2065. package/build-module/hooks/custom-fields.js.map +1 -0
  2066. package/build-module/hooks/dimensions.js +6 -11
  2067. package/build-module/hooks/dimensions.js.map +1 -1
  2068. package/build-module/hooks/duotone.js +43 -49
  2069. package/build-module/hooks/duotone.js.map +1 -1
  2070. package/build-module/hooks/font-family.js +9 -20
  2071. package/build-module/hooks/font-family.js.map +1 -1
  2072. package/build-module/hooks/font-size.js +36 -47
  2073. package/build-module/hooks/font-size.js.map +1 -1
  2074. package/build-module/hooks/gap.js +2 -5
  2075. package/build-module/hooks/gap.js.map +1 -1
  2076. package/build-module/hooks/generated-class-name.js +2 -2
  2077. package/build-module/hooks/generated-class-name.js.map +1 -1
  2078. package/build-module/hooks/index.js +1 -0
  2079. package/build-module/hooks/index.js.map +1 -1
  2080. package/build-module/hooks/index.native.js.map +1 -1
  2081. package/build-module/hooks/layout.js +46 -54
  2082. package/build-module/hooks/layout.js.map +1 -1
  2083. package/build-module/hooks/layout.native.js +5 -3
  2084. package/build-module/hooks/layout.native.js.map +1 -1
  2085. package/build-module/hooks/line-height.js +7 -8
  2086. package/build-module/hooks/line-height.js.map +1 -1
  2087. package/build-module/hooks/lock.js +5 -6
  2088. package/build-module/hooks/lock.js.map +1 -1
  2089. package/build-module/hooks/margin.js +1 -10
  2090. package/build-module/hooks/margin.js.map +1 -1
  2091. package/build-module/hooks/metadata-name.js +5 -6
  2092. package/build-module/hooks/metadata-name.js.map +1 -1
  2093. package/build-module/hooks/metadata.js +3 -7
  2094. package/build-module/hooks/metadata.js.map +1 -1
  2095. package/build-module/hooks/padding.js +1 -10
  2096. package/build-module/hooks/padding.js.map +1 -1
  2097. package/build-module/hooks/position.js +36 -38
  2098. package/build-module/hooks/position.js.map +1 -1
  2099. package/build-module/hooks/settings.js +4 -7
  2100. package/build-module/hooks/settings.js.map +1 -1
  2101. package/build-module/hooks/style.js +39 -44
  2102. package/build-module/hooks/style.js.map +1 -1
  2103. package/build-module/hooks/supports.js +22 -33
  2104. package/build-module/hooks/supports.js.map +1 -1
  2105. package/build-module/hooks/typography.js +11 -16
  2106. package/build-module/hooks/typography.js.map +1 -1
  2107. package/build-module/hooks/typography.native.js +5 -7
  2108. package/build-module/hooks/typography.native.js.map +1 -1
  2109. package/build-module/hooks/use-border-props.js +7 -6
  2110. package/build-module/hooks/use-border-props.js.map +1 -1
  2111. package/build-module/hooks/use-cached-truthy.js +1 -1
  2112. package/build-module/hooks/use-cached-truthy.js.map +1 -1
  2113. package/build-module/hooks/use-color-props.js +18 -17
  2114. package/build-module/hooks/use-color-props.js.map +1 -1
  2115. package/build-module/hooks/use-editor-wrapper-styles.native.js +8 -26
  2116. package/build-module/hooks/use-editor-wrapper-styles.native.js.map +1 -1
  2117. package/build-module/hooks/use-spacing-props.js +5 -3
  2118. package/build-module/hooks/use-spacing-props.js.map +1 -1
  2119. package/build-module/hooks/use-typography-props.js +4 -4
  2120. package/build-module/hooks/use-typography-props.js.map +1 -1
  2121. package/build-module/hooks/utils.js +12 -18
  2122. package/build-module/hooks/utils.js.map +1 -1
  2123. package/build-module/index.js.map +1 -1
  2124. package/build-module/index.native.js.map +1 -1
  2125. package/build-module/layouts/constrained.js +14 -26
  2126. package/build-module/layouts/constrained.js.map +1 -1
  2127. package/build-module/layouts/definitions.js.map +1 -1
  2128. package/build-module/layouts/flex.js +18 -41
  2129. package/build-module/layouts/flex.js.map +1 -1
  2130. package/build-module/layouts/flow.js +8 -17
  2131. package/build-module/layouts/flow.js.map +1 -1
  2132. package/build-module/layouts/grid.js +20 -25
  2133. package/build-module/layouts/grid.js.map +1 -1
  2134. package/build-module/layouts/index.js +2 -2
  2135. package/build-module/layouts/index.js.map +1 -1
  2136. package/build-module/layouts/utils.js +5 -9
  2137. package/build-module/layouts/utils.js.map +1 -1
  2138. package/build-module/lock-unlock.js.map +1 -1
  2139. package/build-module/private-apis.js +6 -5
  2140. package/build-module/private-apis.js.map +1 -1
  2141. package/build-module/private-apis.native.js +3 -2
  2142. package/build-module/private-apis.native.js.map +1 -1
  2143. package/build-module/store/actions.js +189 -198
  2144. package/build-module/store/actions.js.map +1 -1
  2145. package/build-module/store/array.js +1 -1
  2146. package/build-module/store/array.js.map +1 -1
  2147. package/build-module/store/constants.js.map +1 -1
  2148. package/build-module/store/defaults.js +1 -1
  2149. package/build-module/store/defaults.js.map +1 -1
  2150. package/build-module/store/defaults.native.js +2 -1
  2151. package/build-module/store/defaults.native.js.map +1 -1
  2152. package/build-module/store/index.js +13 -9
  2153. package/build-module/store/index.js.map +1 -1
  2154. package/build-module/store/private-actions.js +25 -78
  2155. package/build-module/store/private-actions.js.map +1 -1
  2156. package/build-module/store/private-selectors.js +6 -76
  2157. package/build-module/store/private-selectors.js.map +1 -1
  2158. package/build-module/store/reducer.js +161 -328
  2159. package/build-module/store/reducer.js.map +1 -1
  2160. package/build-module/store/selectors.js +255 -398
  2161. package/build-module/store/selectors.js.map +1 -1
  2162. package/build-module/store/utils.js.map +1 -1
  2163. package/build-module/utils/block-variation-transforms.js +2 -3
  2164. package/build-module/utils/block-variation-transforms.js.map +1 -1
  2165. package/build-module/utils/dom.js +4 -10
  2166. package/build-module/utils/dom.js.map +1 -1
  2167. package/build-module/utils/index.js.map +1 -1
  2168. package/build-module/utils/math.js +5 -7
  2169. package/build-module/utils/math.js.map +1 -1
  2170. package/build-module/utils/object.js +15 -21
  2171. package/build-module/utils/object.js.map +1 -1
  2172. package/build-module/utils/order-inserter-block-items.js +2 -3
  2173. package/build-module/utils/order-inserter-block-items.js.map +1 -1
  2174. package/build-module/utils/parse-css-unit-to-px.js +14 -64
  2175. package/build-module/utils/parse-css-unit-to-px.js.map +1 -1
  2176. package/build-module/utils/pasting.js +8 -12
  2177. package/build-module/utils/pasting.js.map +1 -1
  2178. package/build-module/utils/pre-parse-patterns.js +1 -14
  2179. package/build-module/utils/pre-parse-patterns.js.map +1 -1
  2180. package/build-module/utils/selection.js +1 -2
  2181. package/build-module/utils/selection.js.map +1 -1
  2182. package/build-module/utils/sorting.js +3 -7
  2183. package/build-module/utils/sorting.js.map +1 -1
  2184. package/build-module/utils/transform-styles/ast/index.js +1 -0
  2185. package/build-module/utils/transform-styles/ast/index.js.map +1 -1
  2186. package/build-module/utils/transform-styles/ast/parse.js +95 -134
  2187. package/build-module/utils/transform-styles/ast/parse.js.map +1 -1
  2188. package/build-module/utils/transform-styles/ast/stringify/compiler.js +5 -6
  2189. package/build-module/utils/transform-styles/ast/stringify/compiler.js.map +1 -1
  2190. package/build-module/utils/transform-styles/ast/stringify/compress.js +28 -19
  2191. package/build-module/utils/transform-styles/ast/stringify/compress.js.map +1 -1
  2192. package/build-module/utils/transform-styles/ast/stringify/identity.js +32 -23
  2193. package/build-module/utils/transform-styles/ast/stringify/identity.js.map +1 -1
  2194. package/build-module/utils/transform-styles/ast/stringify/index.js +1 -0
  2195. package/build-module/utils/transform-styles/ast/stringify/index.js.map +1 -1
  2196. package/build-module/utils/transform-styles/index.js +2 -7
  2197. package/build-module/utils/transform-styles/index.js.map +1 -1
  2198. package/build-module/utils/transform-styles/transforms/url-rewrite.js +12 -24
  2199. package/build-module/utils/transform-styles/transforms/url-rewrite.js.map +1 -1
  2200. package/build-module/utils/transform-styles/transforms/wrap.js +7 -8
  2201. package/build-module/utils/transform-styles/transforms/wrap.js.map +1 -1
  2202. package/build-module/utils/transform-styles/traverse.js +1 -4
  2203. package/build-module/utils/transform-styles/traverse.js.map +1 -1
  2204. package/build-module/utils/use-should-contextual-toolbar-show.js +2 -5
  2205. package/build-module/utils/use-should-contextual-toolbar-show.js.map +1 -1
  2206. package/build-style/style-rtl.css +69 -10
  2207. package/build-style/style.css +69 -10
  2208. package/package.json +33 -32
  2209. package/src/autocompleters/block.js +21 -6
  2210. package/src/components/block-caption/README.md +109 -0
  2211. package/src/components/block-controls/use-has-block-controls.js +35 -0
  2212. package/src/components/block-draggable/test/index.native.js +2 -3
  2213. package/src/components/block-editing-mode/index.js +4 -8
  2214. package/src/components/block-inspector/index.js +1 -2
  2215. package/src/components/block-list/block-outline.native.js +2 -2
  2216. package/src/components/block-list/block.js +7 -3
  2217. package/src/components/block-list/index.js +3 -6
  2218. package/src/components/block-list/index.native.js +14 -14
  2219. package/src/components/block-list/test/block-invalid-warning.native.js +15 -1
  2220. package/src/components/block-list/use-in-between-inserter.js +1 -2
  2221. package/src/components/block-list-appender/index.js +1 -2
  2222. package/src/components/block-mover/test/__snapshots__/index.native.js.snap +24 -0
  2223. package/src/components/block-parent-selector/index.js +30 -43
  2224. package/src/components/block-preview/auto.js +8 -1
  2225. package/src/components/block-preview/index.js +0 -1
  2226. package/src/components/block-preview/style.scss +2 -1
  2227. package/src/components/block-settings-menu/block-settings-dropdown.js +4 -13
  2228. package/src/components/block-toolbar/index.js +36 -64
  2229. package/src/components/block-toolbar/style.scss +10 -0
  2230. package/src/components/block-toolbar/utils.js +57 -45
  2231. package/src/components/block-tools/block-contextual-toolbar.js +124 -38
  2232. package/src/components/block-tools/style.scss +49 -13
  2233. package/src/components/block-variation-picker/index.native.js +52 -72
  2234. package/src/components/color-palette/test/__snapshots__/control.js.snap +1 -1
  2235. package/src/components/copy-handler/index.js +1 -0
  2236. package/src/components/default-block-appender/index.native.js +13 -11
  2237. package/src/components/dimensions-tool/index.js +1 -1
  2238. package/src/components/editor-styles/index.js +2 -2
  2239. package/src/components/font-sizes/fluid-utils.js +17 -17
  2240. package/src/components/font-sizes/test/fluid-utils.js +6 -6
  2241. package/src/components/global-styles/behaviors-panel.js +71 -0
  2242. package/src/components/global-styles/hooks.js +114 -5
  2243. package/src/components/global-styles/index.js +3 -0
  2244. package/src/components/global-styles/test/typography-utils.js +61 -6
  2245. package/src/components/global-styles/typography-utils.js +15 -6
  2246. package/src/components/global-styles/use-global-styles-output.js +1 -2
  2247. package/src/components/global-styles/utils.js +2 -1
  2248. package/src/components/iframe/index.js +1 -0
  2249. package/src/components/index.js +7 -0
  2250. package/src/components/inserter/hooks/use-block-types-state.js +15 -6
  2251. package/src/components/inserter/hooks/use-debounced-input.js +8 -7
  2252. package/src/components/inserter/hooks/use-patterns-state.js +2 -1
  2253. package/src/components/inserter/menu.js +1 -0
  2254. package/src/components/inserter/preview-panel.js +15 -11
  2255. package/src/components/inserter/reusable-blocks-tab.js +4 -1
  2256. package/src/components/inserter/search-results.js +2 -1
  2257. package/src/components/inserter/stories/{index.js → index.story.js} +4 -4
  2258. package/src/components/inserter/test/search-items.js +4 -1
  2259. package/src/components/inserter-list-item/index.js +3 -1
  2260. package/src/components/keyboard-shortcuts/index.js +10 -0
  2261. package/src/components/line-height-control/index.js +14 -11
  2262. package/src/components/line-height-control/test/index.js +7 -5
  2263. package/src/components/line-height-control/utils.js +6 -1
  2264. package/src/components/link-control/README.md +12 -3
  2265. package/src/components/link-control/index.js +70 -13
  2266. package/src/components/link-control/link-preview.js +10 -4
  2267. package/src/components/link-control/style.scss +12 -2
  2268. package/src/components/link-control/test/index.js +64 -4
  2269. package/src/components/list-view/block-select-button.js +19 -0
  2270. package/src/components/list-view/block.js +1 -4
  2271. package/src/components/list-view/style.scss +25 -0
  2272. package/src/components/list-view/use-list-view-drop-zone.js +5 -1
  2273. package/src/components/list-view/use-list-view-images.js +79 -0
  2274. package/src/components/media-replace-flow/index.native.js +12 -3
  2275. package/src/components/media-upload/test/index.native.js +1 -0
  2276. package/src/components/rich-text/format-edit.js +62 -38
  2277. package/src/components/rich-text/get-rich-text-values.js +22 -28
  2278. package/src/components/rich-text/index.js +8 -1
  2279. package/src/components/rich-text/use-firefox-compat.js +1 -27
  2280. package/src/components/rich-text/use-format-types.js +3 -3
  2281. package/src/components/rich-text/use-paste-handler.js +4 -23
  2282. package/src/components/spacing-sizes-control/test/utils.js +9 -1
  2283. package/src/components/spacing-sizes-control/utils.js +2 -2
  2284. package/src/components/use-block-commands/index.js +284 -0
  2285. package/src/components/use-block-drop-zone/index.js +1 -2
  2286. package/src/components/use-setting/README.md +39 -0
  2287. package/src/components/writing-flow/use-drag-selection.js +5 -1
  2288. package/src/hooks/behaviors.js +10 -16
  2289. package/src/hooks/border.js +2 -1
  2290. package/src/hooks/custom-fields.js +139 -0
  2291. package/src/hooks/index.js +1 -0
  2292. package/src/hooks/layout.js +13 -4
  2293. package/src/hooks/style.js +7 -3
  2294. package/src/private-apis.js +2 -2
  2295. package/src/store/actions.js +71 -30
  2296. package/src/store/private-actions.js +0 -39
  2297. package/src/store/private-selectors.js +1 -67
  2298. package/src/store/selectors.js +66 -81
  2299. package/src/store/test/actions.js +28 -0
  2300. package/src/store/test/private-actions.js +0 -28
  2301. package/src/store/test/private-selectors.js +88 -261
  2302. package/src/store/test/selectors.js +209 -6
  2303. package/src/utils/transform-styles/ast/parse.js +31 -0
  2304. package/src/utils/transform-styles/ast/stringify/compress.js +13 -0
  2305. package/src/utils/transform-styles/ast/stringify/identity.js +13 -0
  2306. package/src/utils/transform-styles/transforms/test/__snapshots__/wrap.js.snap +8 -0
  2307. package/src/utils/transform-styles/transforms/test/wrap.js +11 -0
  2308. package/tsconfig.tsbuildinfo +1 -1
  2309. /package/src/components/block-draggable/stories/{index.js → index.story.js} +0 -0
  2310. /package/src/components/block-mover/stories/{index.js → index.story.js} +0 -0
  2311. /package/src/components/dimensions-tool/stories/{aspect-ratio-tool.js → aspect-ratio-tool.story.js} +0 -0
  2312. /package/src/components/dimensions-tool/stories/{index.js → index.story.js} +0 -0
  2313. /package/src/components/dimensions-tool/stories/{scale-tool.js → scale-tool.story.js} +0 -0
  2314. /package/src/components/dimensions-tool/stories/{width-height-tool.js → width-height-tool.story.js} +0 -0
  2315. /package/src/components/height-control/stories/{index.js → index.story.js} +0 -0
  2316. /package/src/components/line-height-control/stories/{index.js → index.story.js} +0 -0
  2317. /package/src/components/resolution-tool/stories/{index.js → index.story.js} +0 -0
  2318. /package/src/components/text-decoration-control/stories/{index.js → index.story.js} +0 -0
  2319. /package/src/components/text-transform-control/stories/{index.js → index.story.js} +0 -0
  2320. /package/src/components/url-popover/stories/{index.js → index.story.js} +0 -0
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
@@ -31,10 +30,10 @@ exports.canRemoveBlocks = canRemoveBlocks;
31
30
  exports.didAutomaticChange = didAutomaticChange;
32
31
  exports.getAdjacentBlockClientId = getAdjacentBlockClientId;
33
32
  exports.getAllowedBlocks = void 0;
34
- exports.getBehaviors = getBehaviors;
35
33
  exports.getBlock = getBlock;
36
34
  exports.getBlockAttributes = getBlockAttributes;
37
35
  exports.getBlockCount = getBlockCount;
36
+ exports.getBlockEditingMode = void 0;
38
37
  exports.getBlockHierarchyRootClientId = getBlockHierarchyRootClientId;
39
38
  exports.getBlockIndex = getBlockIndex;
40
39
  exports.getBlockInsertionPoint = void 0;
@@ -98,27 +97,16 @@ exports.isSelectionEnabled = isSelectionEnabled;
98
97
  exports.isTyping = isTyping;
99
98
  exports.isValidTemplate = isValidTemplate;
100
99
  exports.wasBlockJustInserted = wasBlockJustInserted;
101
-
102
100
  var _rememo = _interopRequireDefault(require("rememo"));
103
-
104
101
  var _blocks = require("@wordpress/blocks");
105
-
106
102
  var _element = require("@wordpress/element");
107
-
108
103
  var _hooks = require("@wordpress/hooks");
109
-
110
104
  var _icons = require("@wordpress/icons");
111
-
112
105
  var _richText = require("@wordpress/rich-text");
113
-
114
106
  var _deprecated = _interopRequireDefault(require("@wordpress/deprecated"));
115
-
107
+ var _data = require("@wordpress/data");
116
108
  var _utils = require("./utils");
117
-
118
109
  var _sorting = require("../utils/sorting");
119
-
120
- var _privateSelectors = require("./private-selectors");
121
-
122
110
  /**
123
111
  * External dependencies
124
112
  */
@@ -141,10 +129,12 @@ var _privateSelectors = require("./private-selectors");
141
129
  * @property {number} offset An attribute value offset, based on the rich
142
130
  * text value. See `wp.richText.create`.
143
131
  */
132
+
144
133
  // Module constants.
145
134
  const MILLISECONDS_PER_HOUR = 3600 * 1000;
146
135
  const MILLISECONDS_PER_DAY = 24 * 3600 * 1000;
147
136
  const MILLISECONDS_PER_WEEK = 7 * 24 * 3600 * 1000;
137
+
148
138
  /**
149
139
  * Shared reference to an empty array for cases where it is important to avoid
150
140
  * returning a new array reference on every invocation, as in a connected or
@@ -154,8 +144,8 @@ const MILLISECONDS_PER_WEEK = 7 * 24 * 3600 * 1000;
154
144
  *
155
145
  * @type {Array}
156
146
  */
157
-
158
147
  const EMPTY_ARRAY = [];
148
+
159
149
  /**
160
150
  * Shared reference to an empty Set for cases where it is important to avoid
161
151
  * returning a new Set reference on every invocation, as in a connected or
@@ -165,8 +155,8 @@ const EMPTY_ARRAY = [];
165
155
  *
166
156
  * @type {Set}
167
157
  */
168
-
169
158
  const EMPTY_SET = new Set();
159
+
170
160
  /**
171
161
  * Returns a block's name given its client ID, or null if no block exists with
172
162
  * the client ID.
@@ -176,11 +166,9 @@ const EMPTY_SET = new Set();
176
166
  *
177
167
  * @return {string} Block name.
178
168
  */
179
-
180
169
  function getBlockName(state, clientId) {
181
170
  const block = state.blocks.byClientId.get(clientId);
182
171
  const socialLinkName = 'core/social-link';
183
-
184
172
  if (_element.Platform.OS !== 'web' && block?.name === socialLinkName) {
185
173
  const attributes = state.blocks.attributes.get(clientId);
186
174
  const {
@@ -188,9 +176,9 @@ function getBlockName(state, clientId) {
188
176
  } = attributes !== null && attributes !== void 0 ? attributes : {};
189
177
  return service ? `${socialLinkName}-${service}` : socialLinkName;
190
178
  }
191
-
192
179
  return block ? block.name : null;
193
180
  }
181
+
194
182
  /**
195
183
  * Returns whether a block is valid or not.
196
184
  *
@@ -199,12 +187,11 @@ function getBlockName(state, clientId) {
199
187
  *
200
188
  * @return {boolean} Is Valid.
201
189
  */
202
-
203
-
204
190
  function isBlockValid(state, clientId) {
205
191
  const block = state.blocks.byClientId.get(clientId);
206
192
  return !!block && block.isValid;
207
193
  }
194
+
208
195
  /**
209
196
  * Returns a block's attributes given its client ID, or null if no block exists with
210
197
  * the client ID.
@@ -214,17 +201,14 @@ function isBlockValid(state, clientId) {
214
201
  *
215
202
  * @return {Object?} Block attributes.
216
203
  */
217
-
218
-
219
204
  function getBlockAttributes(state, clientId) {
220
205
  const block = state.blocks.byClientId.get(clientId);
221
-
222
206
  if (!block) {
223
207
  return null;
224
208
  }
225
-
226
209
  return state.blocks.attributes.get(clientId);
227
210
  }
211
+
228
212
  /**
229
213
  * Returns a block given its client ID. This is a parsed copy of the block,
230
214
  * containing its `blockName`, `clientId`, and current `attributes` state. This
@@ -246,25 +230,22 @@ function getBlockAttributes(state, clientId) {
246
230
  *
247
231
  * @return {Object} Parsed block object.
248
232
  */
249
-
250
-
251
233
  function getBlock(state, clientId) {
252
234
  if (!state.blocks.byClientId.has(clientId)) {
253
235
  return null;
254
236
  }
255
-
256
237
  return state.blocks.tree.get(clientId);
257
238
  }
258
-
259
239
  const __unstableGetBlockWithoutInnerBlocks = (0, _rememo.default)((state, clientId) => {
260
240
  if (!state.blocks.byClientId.has(clientId)) {
261
241
  return null;
262
242
  }
263
-
264
- return { ...state.blocks.byClientId.get(clientId),
243
+ return {
244
+ ...state.blocks.byClientId.get(clientId),
265
245
  attributes: getBlockAttributes(state, clientId)
266
246
  };
267
247
  }, (state, clientId) => [state.blocks.byClientId.get(clientId), state.blocks.attributes.get(clientId)]);
248
+
268
249
  /**
269
250
  * Returns all block objects for the current post being edited as an array in
270
251
  * the order they appear in the post. Note that this will exclude child blocks
@@ -275,14 +256,12 @@ const __unstableGetBlockWithoutInnerBlocks = (0, _rememo.default)((state, client
275
256
  *
276
257
  * @return {Object[]} Post blocks.
277
258
  */
278
-
279
-
280
259
  exports.__unstableGetBlockWithoutInnerBlocks = __unstableGetBlockWithoutInnerBlocks;
281
-
282
260
  function getBlocks(state, rootClientId) {
283
261
  const treeKey = !rootClientId || !areInnerBlocksControlled(state, rootClientId) ? rootClientId || '' : 'controlled||' + rootClientId;
284
262
  return state.blocks.tree.get(treeKey)?.innerBlocks || EMPTY_ARRAY;
285
263
  }
264
+
286
265
  /**
287
266
  * Returns a stripped down block object containing only its client ID,
288
267
  * and its inner blocks' client IDs.
@@ -294,8 +273,6 @@ function getBlocks(state, rootClientId) {
294
273
  *
295
274
  * @return {Object} Client IDs of the post blocks.
296
275
  */
297
-
298
-
299
276
  const __unstableGetClientIdWithClientIdsTree = (0, _rememo.default)((state, clientId) => {
300
277
  (0, _deprecated.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree", {
301
278
  since: '6.3',
@@ -306,6 +283,7 @@ const __unstableGetClientIdWithClientIdsTree = (0, _rememo.default)((state, clie
306
283
  innerBlocks: __unstableGetClientIdsTree(state, clientId)
307
284
  };
308
285
  }, state => [state.blocks.order]);
286
+
309
287
  /**
310
288
  * Returns the block tree represented in the block-editor store from the
311
289
  * given root, consisting of stripped down block objects containing only
@@ -318,10 +296,7 @@ const __unstableGetClientIdWithClientIdsTree = (0, _rememo.default)((state, clie
318
296
  *
319
297
  * @return {Object[]} Client IDs of the post blocks.
320
298
  */
321
-
322
-
323
299
  exports.__unstableGetClientIdWithClientIdsTree = __unstableGetClientIdWithClientIdsTree;
324
-
325
300
  const __unstableGetClientIdsTree = (0, _rememo.default)((state, rootClientId = '') => {
326
301
  (0, _deprecated.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree", {
327
302
  since: '6.3',
@@ -329,6 +304,7 @@ const __unstableGetClientIdsTree = (0, _rememo.default)((state, rootClientId = '
329
304
  });
330
305
  return getBlockOrder(state, rootClientId).map(clientId => __unstableGetClientIdWithClientIdsTree(state, clientId));
331
306
  }, state => [state.blocks.order]);
307
+
332
308
  /**
333
309
  * Returns an array containing the clientIds of all descendants of the blocks
334
310
  * given. Returned ids are ordered first by the order of the ids given, then
@@ -339,20 +315,17 @@ const __unstableGetClientIdsTree = (0, _rememo.default)((state, rootClientId = '
339
315
  *
340
316
  * @return {Array} ids of descendants.
341
317
  */
342
-
343
-
344
318
  exports.__unstableGetClientIdsTree = __unstableGetClientIdsTree;
345
319
  const getClientIdsOfDescendants = (0, _rememo.default)((state, clientIds) => {
346
320
  const collectedIds = [];
347
-
348
321
  for (const givenId of clientIds) {
349
322
  for (const descendantId of getBlockOrder(state, givenId)) {
350
323
  collectedIds.push(descendantId, ...getClientIdsOfDescendants(state, [descendantId]));
351
324
  }
352
325
  }
353
-
354
326
  return collectedIds;
355
327
  }, state => [state.blocks.order]);
328
+
356
329
  /**
357
330
  * Returns an array containing the clientIds of the top-level blocks and
358
331
  * their descendants of any depth (for nested blocks). Ids are returned
@@ -362,17 +335,15 @@ const getClientIdsOfDescendants = (0, _rememo.default)((state, clientIds) => {
362
335
  *
363
336
  * @return {Array} ids of top-level and descendant blocks.
364
337
  */
365
-
366
338
  exports.getClientIdsOfDescendants = getClientIdsOfDescendants;
367
339
  const getClientIdsWithDescendants = (0, _rememo.default)(state => {
368
340
  const collectedIds = [];
369
-
370
341
  for (const topLevelId of getBlockOrder(state)) {
371
342
  collectedIds.push(topLevelId, ...getClientIdsOfDescendants(state, [topLevelId]));
372
343
  }
373
-
374
344
  return collectedIds;
375
345
  }, state => [state.blocks.order]);
346
+
376
347
  /**
377
348
  * Returns the total number of blocks, or the total number of blocks with a specific name in a post.
378
349
  * The number returned includes nested blocks.
@@ -382,20 +353,18 @@ const getClientIdsWithDescendants = (0, _rememo.default)(state => {
382
353
  *
383
354
  * @return {number} Number of blocks in the post, or number of blocks with name equal to blockName.
384
355
  */
385
-
386
356
  exports.getClientIdsWithDescendants = getClientIdsWithDescendants;
387
357
  const getGlobalBlockCount = (0, _rememo.default)((state, blockName) => {
388
358
  const clientIds = getClientIdsWithDescendants(state);
389
-
390
359
  if (!blockName) {
391
360
  return clientIds.length;
392
361
  }
393
-
394
362
  return clientIds.reduce((accumulator, clientId) => {
395
363
  const block = state.blocks.byClientId.get(clientId);
396
364
  return block.name === blockName ? accumulator + 1 : accumulator;
397
365
  }, 0);
398
366
  }, state => [state.blocks.order, state.blocks.byClientId]);
367
+
399
368
  /**
400
369
  * Returns all global blocks that match a blockName. Results include nested blocks.
401
370
  *
@@ -404,14 +373,11 @@ const getGlobalBlockCount = (0, _rememo.default)((state, blockName) => {
404
373
  *
405
374
  * @return {Array} Array of clientIds of blocks with name equal to blockName.
406
375
  */
407
-
408
376
  exports.getGlobalBlockCount = getGlobalBlockCount;
409
-
410
377
  const __experimentalGetGlobalBlocksByName = (0, _rememo.default)((state, blockName) => {
411
378
  if (!blockName) {
412
379
  return EMPTY_ARRAY;
413
380
  }
414
-
415
381
  const blockNames = Array.isArray(blockName) ? blockName : [blockName];
416
382
  const clientIds = getClientIdsWithDescendants(state);
417
383
  const foundBlocks = clientIds.filter(clientId => {
@@ -420,6 +386,7 @@ const __experimentalGetGlobalBlocksByName = (0, _rememo.default)((state, blockNa
420
386
  });
421
387
  return foundBlocks.length > 0 ? foundBlocks : EMPTY_ARRAY;
422
388
  }, state => [state.blocks.order, state.blocks.byClientId]);
389
+
423
390
  /**
424
391
  * Given an array of block client IDs, returns the corresponding array of block
425
392
  * objects.
@@ -429,10 +396,9 @@ const __experimentalGetGlobalBlocksByName = (0, _rememo.default)((state, blockNa
429
396
  *
430
397
  * @return {WPBlock[]} Block objects.
431
398
  */
432
-
433
-
434
399
  exports.__experimentalGetGlobalBlocksByName = __experimentalGetGlobalBlocksByName;
435
400
  const getBlocksByClientId = (0, _rememo.default)((state, clientIds) => (Array.isArray(clientIds) ? clientIds : [clientIds]).map(clientId => getBlock(state, clientId)), (state, clientIds) => (Array.isArray(clientIds) ? clientIds : [clientIds]).map(clientId => state.blocks.tree.get(clientId)));
401
+
436
402
  /**
437
403
  * Given an array of block client IDs, returns the corresponding array of block
438
404
  * names.
@@ -442,9 +408,9 @@ const getBlocksByClientId = (0, _rememo.default)((state, clientIds) => (Array.is
442
408
  *
443
409
  * @return {string[]} Block names.
444
410
  */
445
-
446
411
  exports.getBlocksByClientId = getBlocksByClientId;
447
412
  const getBlockNamesByClientId = (0, _rememo.default)((state, clientIds) => getBlocksByClientId(state, clientIds).filter(Boolean).map(block => block.name), (state, clientIds) => getBlocksByClientId(state, clientIds));
413
+
448
414
  /**
449
415
  * Returns the number of blocks currently present in the post.
450
416
  *
@@ -453,12 +419,11 @@ const getBlockNamesByClientId = (0, _rememo.default)((state, clientIds) => getBl
453
419
  *
454
420
  * @return {number} Number of blocks in the post.
455
421
  */
456
-
457
422
  exports.getBlockNamesByClientId = getBlockNamesByClientId;
458
-
459
423
  function getBlockCount(state, rootClientId) {
460
424
  return getBlockOrder(state, rootClientId).length;
461
425
  }
426
+
462
427
  /**
463
428
  * Returns the current selection start block client ID, attribute key and text
464
429
  * offset.
@@ -467,11 +432,10 @@ function getBlockCount(state, rootClientId) {
467
432
  *
468
433
  * @return {WPBlockSelection} Selection start information.
469
434
  */
470
-
471
-
472
435
  function getSelectionStart(state) {
473
436
  return state.selection.selectionStart;
474
437
  }
438
+
475
439
  /**
476
440
  * Returns the current selection end block client ID, attribute key and text
477
441
  * offset.
@@ -480,11 +444,10 @@ function getSelectionStart(state) {
480
444
  *
481
445
  * @return {WPBlockSelection} Selection end information.
482
446
  */
483
-
484
-
485
447
  function getSelectionEnd(state) {
486
448
  return state.selection.selectionEnd;
487
449
  }
450
+
488
451
  /**
489
452
  * Returns the current block selection start. This value may be null, and it
490
453
  * may represent either a singular block selection or multi-selection start.
@@ -494,11 +457,10 @@ function getSelectionEnd(state) {
494
457
  *
495
458
  * @return {?string} Client ID of block selection start.
496
459
  */
497
-
498
-
499
460
  function getBlockSelectionStart(state) {
500
461
  return state.selection.selectionStart.clientId;
501
462
  }
463
+
502
464
  /**
503
465
  * Returns the current block selection end. This value may be null, and it
504
466
  * may represent either a singular block selection or multi-selection end.
@@ -508,11 +470,10 @@ function getBlockSelectionStart(state) {
508
470
  *
509
471
  * @return {?string} Client ID of block selection end.
510
472
  */
511
-
512
-
513
473
  function getBlockSelectionEnd(state) {
514
474
  return state.selection.selectionEnd.clientId;
515
475
  }
476
+
516
477
  /**
517
478
  * Returns the number of blocks currently selected in the post.
518
479
  *
@@ -520,17 +481,14 @@ function getBlockSelectionEnd(state) {
520
481
  *
521
482
  * @return {number} Number of blocks selected in the post.
522
483
  */
523
-
524
-
525
484
  function getSelectedBlockCount(state) {
526
485
  const multiSelectedBlockCount = getMultiSelectedBlockClientIds(state).length;
527
-
528
486
  if (multiSelectedBlockCount) {
529
487
  return multiSelectedBlockCount;
530
488
  }
531
-
532
489
  return state.selection.selectionStart.clientId ? 1 : 0;
533
490
  }
491
+
534
492
  /**
535
493
  * Returns true if there is a single selected block, or false otherwise.
536
494
  *
@@ -538,8 +496,6 @@ function getSelectedBlockCount(state) {
538
496
  *
539
497
  * @return {boolean} Whether a single block is selected.
540
498
  */
541
-
542
-
543
499
  function hasSelectedBlock(state) {
544
500
  const {
545
501
  selectionStart,
@@ -547,6 +503,7 @@ function hasSelectedBlock(state) {
547
503
  } = state.selection;
548
504
  return !!selectionStart.clientId && selectionStart.clientId === selectionEnd.clientId;
549
505
  }
506
+
550
507
  /**
551
508
  * Returns the currently selected block client ID, or null if there is no
552
509
  * selected block.
@@ -555,8 +512,6 @@ function hasSelectedBlock(state) {
555
512
  *
556
513
  * @return {?string} Selected block client ID.
557
514
  */
558
-
559
-
560
515
  function getSelectedBlockClientId(state) {
561
516
  const {
562
517
  selectionStart,
@@ -565,13 +520,12 @@ function getSelectedBlockClientId(state) {
565
520
  const {
566
521
  clientId
567
522
  } = selectionStart;
568
-
569
523
  if (!clientId || clientId !== selectionEnd.clientId) {
570
524
  return null;
571
525
  }
572
-
573
526
  return clientId;
574
527
  }
528
+
575
529
  /**
576
530
  * Returns the currently selected block, or null if there is no selected block.
577
531
  *
@@ -579,12 +533,11 @@ function getSelectedBlockClientId(state) {
579
533
  *
580
534
  * @return {?Object} Selected block.
581
535
  */
582
-
583
-
584
536
  function getSelectedBlock(state) {
585
537
  const clientId = getSelectedBlockClientId(state);
586
538
  return clientId ? getBlock(state, clientId) : null;
587
539
  }
540
+
588
541
  /**
589
542
  * Given a block client ID, returns the root block from which the block is
590
543
  * nested, an empty string for top-level blocks, or null if the block does not
@@ -595,11 +548,10 @@ function getSelectedBlock(state) {
595
548
  *
596
549
  * @return {?string} Root client ID, if exists
597
550
  */
598
-
599
-
600
551
  function getBlockRootClientId(state, clientId) {
601
552
  return state.blocks.parents.has(clientId) ? state.blocks.parents.get(clientId) : null;
602
553
  }
554
+
603
555
  /**
604
556
  * Given a block client ID, returns the list of all its parents from top to bottom.
605
557
  *
@@ -609,23 +561,19 @@ function getBlockRootClientId(state, clientId) {
609
561
  *
610
562
  * @return {Array} ClientIDs of the parent blocks.
611
563
  */
612
-
613
-
614
564
  const getBlockParents = (0, _rememo.default)((state, clientId, ascending = false) => {
615
565
  const parents = [];
616
566
  let current = clientId;
617
-
618
567
  while (!!state.blocks.parents.get(current)) {
619
568
  current = state.blocks.parents.get(current);
620
569
  parents.push(current);
621
570
  }
622
-
623
571
  if (!parents.length) {
624
572
  return EMPTY_ARRAY;
625
573
  }
626
-
627
574
  return ascending ? parents : parents.reverse();
628
575
  }, state => [state.blocks.parents]);
576
+
629
577
  /**
630
578
  * Given a block client ID and a block name, returns the list of all its parents
631
579
  * from top to bottom, filtered by the given name(s). For example, if passed
@@ -640,7 +588,6 @@ const getBlockParents = (0, _rememo.default)((state, clientId, ascending = false
640
588
  *
641
589
  * @return {Array} ClientIDs of the parent blocks.
642
590
  */
643
-
644
591
  exports.getBlockParents = getBlockParents;
645
592
  const getBlockParentsByBlockName = (0, _rememo.default)((state, clientId, blockName, ascending = false) => {
646
593
  const parents = getBlockParents(state, clientId, ascending);
@@ -655,20 +602,17 @@ const getBlockParentsByBlockName = (0, _rememo.default)((state, clientId, blockN
655
602
  *
656
603
  * @return {string} Root client ID
657
604
  */
658
-
659
605
  exports.getBlockParentsByBlockName = getBlockParentsByBlockName;
660
-
661
606
  function getBlockHierarchyRootClientId(state, clientId) {
662
607
  let current = clientId;
663
608
  let parent;
664
-
665
609
  do {
666
610
  parent = current;
667
611
  current = state.blocks.parents.get(current);
668
612
  } while (current);
669
-
670
613
  return parent;
671
614
  }
615
+
672
616
  /**
673
617
  * Given a block client ID, returns the lowest common ancestor with selected client ID.
674
618
  *
@@ -677,15 +621,12 @@ function getBlockHierarchyRootClientId(state, clientId) {
677
621
  *
678
622
  * @return {string} Common ancestor client ID or undefined
679
623
  */
680
-
681
-
682
624
  function getLowestCommonAncestorWithSelectedBlock(state, clientId) {
683
625
  const selectedId = getSelectedBlockClientId(state);
684
626
  const clientParents = [...getBlockParents(state, clientId), clientId];
685
627
  const selectedParents = [...getBlockParents(state, selectedId), selectedId];
686
628
  let lowestCommonAncestor;
687
629
  const maxDepth = Math.min(clientParents.length, selectedParents.length);
688
-
689
630
  for (let index = 0; index < maxDepth; index++) {
690
631
  if (clientParents[index] === selectedParents[index]) {
691
632
  lowestCommonAncestor = clientParents[index];
@@ -693,9 +634,9 @@ function getLowestCommonAncestorWithSelectedBlock(state, clientId) {
693
634
  break;
694
635
  }
695
636
  }
696
-
697
637
  return lowestCommonAncestor;
698
638
  }
639
+
699
640
  /**
700
641
  * Returns the client ID of the block adjacent one at the given reference
701
642
  * startClientId and modifier directionality. Defaults start startClientId to
@@ -710,55 +651,53 @@ function getLowestCommonAncestorWithSelectedBlock(state, clientId) {
710
651
  *
711
652
  * @return {?string} Return the client ID of the block, or null if none exists.
712
653
  */
713
-
714
-
715
654
  function getAdjacentBlockClientId(state, startClientId, modifier = 1) {
716
655
  // Default to selected block.
717
656
  if (startClientId === undefined) {
718
657
  startClientId = getSelectedBlockClientId(state);
719
- } // Try multi-selection starting at extent based on modifier.
720
-
658
+ }
721
659
 
660
+ // Try multi-selection starting at extent based on modifier.
722
661
  if (startClientId === undefined) {
723
662
  if (modifier < 0) {
724
663
  startClientId = getFirstMultiSelectedBlockClientId(state);
725
664
  } else {
726
665
  startClientId = getLastMultiSelectedBlockClientId(state);
727
666
  }
728
- } // Validate working start client ID.
729
-
667
+ }
730
668
 
669
+ // Validate working start client ID.
731
670
  if (!startClientId) {
732
671
  return null;
733
- } // Retrieve start block root client ID, being careful to allow the falsey
734
- // empty string top-level root by explicitly testing against null.
735
-
672
+ }
736
673
 
674
+ // Retrieve start block root client ID, being careful to allow the falsey
675
+ // empty string top-level root by explicitly testing against null.
737
676
  const rootClientId = getBlockRootClientId(state, startClientId);
738
-
739
677
  if (rootClientId === null) {
740
678
  return null;
741
679
  }
742
-
743
680
  const {
744
681
  order
745
682
  } = state.blocks;
746
683
  const orderSet = order.get(rootClientId);
747
684
  const index = orderSet.indexOf(startClientId);
748
- const nextIndex = index + 1 * modifier; // Block was first in set and we're attempting to get previous.
685
+ const nextIndex = index + 1 * modifier;
749
686
 
687
+ // Block was first in set and we're attempting to get previous.
750
688
  if (nextIndex < 0) {
751
689
  return null;
752
- } // Block was last in set and we're attempting to get next.
753
-
690
+ }
754
691
 
692
+ // Block was last in set and we're attempting to get next.
755
693
  if (nextIndex === orderSet.length) {
756
694
  return null;
757
- } // Assume incremented index is within the set.
758
-
695
+ }
759
696
 
697
+ // Assume incremented index is within the set.
760
698
  return orderSet[nextIndex];
761
699
  }
700
+
762
701
  /**
763
702
  * Returns the previous block's client ID from the given reference start ID.
764
703
  * Defaults start to the selected block. Returns null if there is no previous
@@ -770,11 +709,10 @@ function getAdjacentBlockClientId(state, startClientId, modifier = 1) {
770
709
  *
771
710
  * @return {?string} Adjacent block's client ID, or null if none exists.
772
711
  */
773
-
774
-
775
712
  function getPreviousBlockClientId(state, startClientId) {
776
713
  return getAdjacentBlockClientId(state, startClientId, -1);
777
714
  }
715
+
778
716
  /**
779
717
  * Returns the next block's client ID from the given reference start ID.
780
718
  * Defaults start to the selected block. Returns null if there is no next
@@ -786,13 +724,11 @@ function getPreviousBlockClientId(state, startClientId) {
786
724
  *
787
725
  * @return {?string} Adjacent block's client ID, or null if none exists.
788
726
  */
789
-
790
-
791
727
  function getNextBlockClientId(state, startClientId) {
792
728
  return getAdjacentBlockClientId(state, startClientId, 1);
793
729
  }
794
- /* eslint-disable jsdoc/valid-types */
795
730
 
731
+ /* eslint-disable jsdoc/valid-types */
796
732
  /**
797
733
  * Returns the initial caret position for the selected block.
798
734
  * This position is to used to position the caret properly when the selected block changes.
@@ -802,12 +738,11 @@ function getNextBlockClientId(state, startClientId) {
802
738
  *
803
739
  * @return {0|-1|null} Initial position.
804
740
  */
805
-
806
-
807
741
  function getSelectedBlocksInitialCaretPosition(state) {
808
742
  /* eslint-enable jsdoc/valid-types */
809
743
  return state.initialPosition;
810
744
  }
745
+
811
746
  /**
812
747
  * Returns the current selection set of block client IDs (multiselection or single selection).
813
748
  *
@@ -815,41 +750,34 @@ function getSelectedBlocksInitialCaretPosition(state) {
815
750
  *
816
751
  * @return {Array} Multi-selected block client IDs.
817
752
  */
818
-
819
-
820
753
  const getSelectedBlockClientIds = (0, _rememo.default)(state => {
821
754
  const {
822
755
  selectionStart,
823
756
  selectionEnd
824
757
  } = state.selection;
825
-
826
758
  if (!selectionStart.clientId || !selectionEnd.clientId) {
827
759
  return EMPTY_ARRAY;
828
760
  }
829
-
830
761
  if (selectionStart.clientId === selectionEnd.clientId) {
831
762
  return [selectionStart.clientId];
832
- } // Retrieve root client ID to aid in retrieving relevant nested block
763
+ }
764
+
765
+ // Retrieve root client ID to aid in retrieving relevant nested block
833
766
  // order, being careful to allow the falsey empty string top-level root
834
767
  // by explicitly testing against null.
835
-
836
-
837
768
  const rootClientId = getBlockRootClientId(state, selectionStart.clientId);
838
-
839
769
  if (rootClientId === null) {
840
770
  return EMPTY_ARRAY;
841
771
  }
842
-
843
772
  const blockOrder = getBlockOrder(state, rootClientId);
844
773
  const startIndex = blockOrder.indexOf(selectionStart.clientId);
845
774
  const endIndex = blockOrder.indexOf(selectionEnd.clientId);
846
-
847
775
  if (startIndex > endIndex) {
848
776
  return blockOrder.slice(endIndex, startIndex + 1);
849
777
  }
850
-
851
778
  return blockOrder.slice(startIndex, endIndex + 1);
852
779
  }, state => [state.blocks.order, state.selection.selectionStart.clientId, state.selection.selectionEnd.clientId]);
780
+
853
781
  /**
854
782
  * Returns the current multi-selection set of block client IDs, or an empty
855
783
  * array if there is no multi-selection.
@@ -858,21 +786,18 @@ const getSelectedBlockClientIds = (0, _rememo.default)(state => {
858
786
  *
859
787
  * @return {Array} Multi-selected block client IDs.
860
788
  */
861
-
862
789
  exports.getSelectedBlockClientIds = getSelectedBlockClientIds;
863
-
864
790
  function getMultiSelectedBlockClientIds(state) {
865
791
  const {
866
792
  selectionStart,
867
793
  selectionEnd
868
794
  } = state.selection;
869
-
870
795
  if (selectionStart.clientId === selectionEnd.clientId) {
871
796
  return EMPTY_ARRAY;
872
797
  }
873
-
874
798
  return getSelectedBlockClientIds(state);
875
799
  }
800
+
876
801
  /**
877
802
  * Returns the current multi-selection set of blocks, or an empty array if
878
803
  * there is no multi-selection.
@@ -881,17 +806,14 @@ function getMultiSelectedBlockClientIds(state) {
881
806
  *
882
807
  * @return {Array} Multi-selected block objects.
883
808
  */
884
-
885
-
886
809
  const getMultiSelectedBlocks = (0, _rememo.default)(state => {
887
810
  const multiSelectedBlockClientIds = getMultiSelectedBlockClientIds(state);
888
-
889
811
  if (!multiSelectedBlockClientIds.length) {
890
812
  return EMPTY_ARRAY;
891
813
  }
892
-
893
814
  return multiSelectedBlockClientIds.map(clientId => getBlock(state, clientId));
894
815
  }, state => [...getSelectedBlockClientIds.getDependants(state), state.blocks.byClientId, state.blocks.order, state.blocks.attributes]);
816
+
895
817
  /**
896
818
  * Returns the client ID of the first block in the multi-selection set, or null
897
819
  * if there is no multi-selection.
@@ -900,12 +822,11 @@ const getMultiSelectedBlocks = (0, _rememo.default)(state => {
900
822
  *
901
823
  * @return {?string} First block client ID in the multi-selection set.
902
824
  */
903
-
904
825
  exports.getMultiSelectedBlocks = getMultiSelectedBlocks;
905
-
906
826
  function getFirstMultiSelectedBlockClientId(state) {
907
827
  return getMultiSelectedBlockClientIds(state)[0] || null;
908
828
  }
829
+
909
830
  /**
910
831
  * Returns the client ID of the last block in the multi-selection set, or null
911
832
  * if there is no multi-selection.
@@ -914,12 +835,11 @@ function getFirstMultiSelectedBlockClientId(state) {
914
835
  *
915
836
  * @return {?string} Last block client ID in the multi-selection set.
916
837
  */
917
-
918
-
919
838
  function getLastMultiSelectedBlockClientId(state) {
920
839
  const selectedClientIds = getMultiSelectedBlockClientIds(state);
921
840
  return selectedClientIds[selectedClientIds.length - 1] || null;
922
841
  }
842
+
923
843
  /**
924
844
  * Returns true if a multi-selection exists, and the block corresponding to the
925
845
  * specified client ID is the first block of the multi-selection set, or false
@@ -930,11 +850,10 @@ function getLastMultiSelectedBlockClientId(state) {
930
850
  *
931
851
  * @return {boolean} Whether block is first in multi-selection.
932
852
  */
933
-
934
-
935
853
  function isFirstMultiSelectedBlock(state, clientId) {
936
854
  return getFirstMultiSelectedBlockClientId(state) === clientId;
937
855
  }
856
+
938
857
  /**
939
858
  * Returns true if the client ID occurs within the block multi-selection, or
940
859
  * false otherwise.
@@ -944,11 +863,10 @@ function isFirstMultiSelectedBlock(state, clientId) {
944
863
  *
945
864
  * @return {boolean} Whether block is in multi-selection set.
946
865
  */
947
-
948
-
949
866
  function isBlockMultiSelected(state, clientId) {
950
867
  return getMultiSelectedBlockClientIds(state).indexOf(clientId) !== -1;
951
868
  }
869
+
952
870
  /**
953
871
  * Returns true if an ancestor of the block is multi-selected, or false
954
872
  * otherwise.
@@ -959,19 +877,16 @@ function isBlockMultiSelected(state, clientId) {
959
877
  * @return {boolean} Whether an ancestor of the block is in multi-selection
960
878
  * set.
961
879
  */
962
-
963
-
964
880
  const isAncestorMultiSelected = (0, _rememo.default)((state, clientId) => {
965
881
  let ancestorClientId = clientId;
966
882
  let isMultiSelected = false;
967
-
968
883
  while (ancestorClientId && !isMultiSelected) {
969
884
  ancestorClientId = getBlockRootClientId(state, ancestorClientId);
970
885
  isMultiSelected = isBlockMultiSelected(state, ancestorClientId);
971
886
  }
972
-
973
887
  return isMultiSelected;
974
888
  }, state => [state.blocks.order, state.selection.selectionStart.clientId, state.selection.selectionEnd.clientId]);
889
+
975
890
  /**
976
891
  * Returns the client ID of the block which begins the multi-selection set, or
977
892
  * null if there is no multi-selection.
@@ -984,21 +899,18 @@ const isAncestorMultiSelected = (0, _rememo.default)((state, clientId) => {
984
899
  *
985
900
  * @return {?string} Client ID of block beginning multi-selection.
986
901
  */
987
-
988
902
  exports.isAncestorMultiSelected = isAncestorMultiSelected;
989
-
990
903
  function getMultiSelectedBlocksStartClientId(state) {
991
904
  const {
992
905
  selectionStart,
993
906
  selectionEnd
994
907
  } = state.selection;
995
-
996
908
  if (selectionStart.clientId === selectionEnd.clientId) {
997
909
  return null;
998
910
  }
999
-
1000
911
  return selectionStart.clientId || null;
1001
912
  }
913
+
1002
914
  /**
1003
915
  * Returns the client ID of the block which ends the multi-selection set, or
1004
916
  * null if there is no multi-selection.
@@ -1011,20 +923,17 @@ function getMultiSelectedBlocksStartClientId(state) {
1011
923
  *
1012
924
  * @return {?string} Client ID of block ending multi-selection.
1013
925
  */
1014
-
1015
-
1016
926
  function getMultiSelectedBlocksEndClientId(state) {
1017
927
  const {
1018
928
  selectionStart,
1019
929
  selectionEnd
1020
930
  } = state.selection;
1021
-
1022
931
  if (selectionStart.clientId === selectionEnd.clientId) {
1023
932
  return null;
1024
933
  }
1025
-
1026
934
  return selectionEnd.clientId || null;
1027
935
  }
936
+
1028
937
  /**
1029
938
  * Returns true if the selection is not partial.
1030
939
  *
@@ -1032,13 +941,12 @@ function getMultiSelectedBlocksEndClientId(state) {
1032
941
  *
1033
942
  * @return {boolean} Whether the selection is mergeable.
1034
943
  */
1035
-
1036
-
1037
944
  function __unstableIsFullySelected(state) {
1038
945
  const selectionAnchor = getSelectionStart(state);
1039
946
  const selectionFocus = getSelectionEnd(state);
1040
947
  return !selectionAnchor.attributeKey && !selectionFocus.attributeKey && typeof selectionAnchor.offset === 'undefined' && typeof selectionFocus.offset === 'undefined';
1041
948
  }
949
+
1042
950
  /**
1043
951
  * Returns true if the selection is collapsed.
1044
952
  *
@@ -1046,14 +954,11 @@ function __unstableIsFullySelected(state) {
1046
954
  *
1047
955
  * @return {boolean} Whether the selection is collapsed.
1048
956
  */
1049
-
1050
-
1051
957
  function __unstableIsSelectionCollapsed(state) {
1052
958
  const selectionAnchor = getSelectionStart(state);
1053
959
  const selectionFocus = getSelectionEnd(state);
1054
960
  return !!selectionAnchor && !!selectionFocus && selectionAnchor.clientId === selectionFocus.clientId && selectionAnchor.attributeKey === selectionFocus.attributeKey && selectionAnchor.offset === selectionFocus.offset;
1055
961
  }
1056
-
1057
962
  function __unstableSelectionHasUnmergeableBlock(state) {
1058
963
  return getSelectedBlockClientIds(state).some(clientId => {
1059
964
  const blockName = getBlockName(state, clientId);
@@ -1061,6 +966,7 @@ function __unstableSelectionHasUnmergeableBlock(state) {
1061
966
  return !blockType.merge;
1062
967
  });
1063
968
  }
969
+
1064
970
  /**
1065
971
  * Check whether the selection is mergeable.
1066
972
  *
@@ -1069,29 +975,29 @@ function __unstableSelectionHasUnmergeableBlock(state) {
1069
975
  *
1070
976
  * @return {boolean} Whether the selection is mergeable.
1071
977
  */
1072
-
1073
-
1074
978
  function __unstableIsSelectionMergeable(state, isForward) {
1075
979
  const selectionAnchor = getSelectionStart(state);
1076
- const selectionFocus = getSelectionEnd(state); // It's not mergeable if the start and end are within the same block.
980
+ const selectionFocus = getSelectionEnd(state);
1077
981
 
1078
- if (selectionAnchor.clientId === selectionFocus.clientId) return false; // It's not mergeable if there's no rich text selection.
982
+ // It's not mergeable if the start and end are within the same block.
983
+ if (selectionAnchor.clientId === selectionFocus.clientId) return false;
1079
984
 
985
+ // It's not mergeable if there's no rich text selection.
1080
986
  if (!selectionAnchor.attributeKey || !selectionFocus.attributeKey || typeof selectionAnchor.offset === 'undefined' || typeof selectionFocus.offset === 'undefined') return false;
1081
987
  const anchorRootClientId = getBlockRootClientId(state, selectionAnchor.clientId);
1082
- const focusRootClientId = getBlockRootClientId(state, selectionFocus.clientId); // It's not mergeable if the selection doesn't start and end in the same
1083
- // block list. Maybe in the future it should be allowed.
988
+ const focusRootClientId = getBlockRootClientId(state, selectionFocus.clientId);
1084
989
 
990
+ // It's not mergeable if the selection doesn't start and end in the same
991
+ // block list. Maybe in the future it should be allowed.
1085
992
  if (anchorRootClientId !== focusRootClientId) {
1086
993
  return false;
1087
994
  }
1088
-
1089
995
  const blockOrder = getBlockOrder(state, anchorRootClientId);
1090
996
  const anchorIndex = blockOrder.indexOf(selectionAnchor.clientId);
1091
- const focusIndex = blockOrder.indexOf(selectionFocus.clientId); // Reassign selection start and end based on order.
997
+ const focusIndex = blockOrder.indexOf(selectionFocus.clientId);
1092
998
 
999
+ // Reassign selection start and end based on order.
1093
1000
  let selectionStart, selectionEnd;
1094
-
1095
1001
  if (anchorIndex > focusIndex) {
1096
1002
  selectionStart = selectionFocus;
1097
1003
  selectionEnd = selectionAnchor;
@@ -1099,20 +1005,22 @@ function __unstableIsSelectionMergeable(state, isForward) {
1099
1005
  selectionStart = selectionAnchor;
1100
1006
  selectionEnd = selectionFocus;
1101
1007
  }
1102
-
1103
1008
  const targetBlockClientId = isForward ? selectionEnd.clientId : selectionStart.clientId;
1104
1009
  const blockToMergeClientId = isForward ? selectionStart.clientId : selectionEnd.clientId;
1105
1010
  const targetBlockName = getBlockName(state, targetBlockClientId);
1106
1011
  const targetBlockType = (0, _blocks.getBlockType)(targetBlockName);
1107
1012
  if (!targetBlockType.merge) return false;
1108
- const blockToMerge = getBlock(state, blockToMergeClientId); // It's mergeable if the blocks are of the same type.
1013
+ const blockToMerge = getBlock(state, blockToMergeClientId);
1109
1014
 
1110
- if (blockToMerge.name === targetBlockName) return true; // If the blocks are of a different type, try to transform the block being
1111
- // merged into the same type of block.
1015
+ // It's mergeable if the blocks are of the same type.
1016
+ if (blockToMerge.name === targetBlockName) return true;
1112
1017
 
1018
+ // If the blocks are of a different type, try to transform the block being
1019
+ // merged into the same type of block.
1113
1020
  const blocksToMerge = (0, _blocks.switchToBlockType)(blockToMerge, targetBlockName);
1114
1021
  return blocksToMerge && blocksToMerge.length;
1115
1022
  }
1023
+
1116
1024
  /**
1117
1025
  * Get partial selected blocks with their content updated
1118
1026
  * based on the selection.
@@ -1121,33 +1029,30 @@ function __unstableIsSelectionMergeable(state, isForward) {
1121
1029
  *
1122
1030
  * @return {Object[]} Updated partial selected blocks.
1123
1031
  */
1124
-
1125
-
1126
1032
  const __unstableGetSelectedBlocksWithPartialSelection = state => {
1127
1033
  const selectionAnchor = getSelectionStart(state);
1128
1034
  const selectionFocus = getSelectionEnd(state);
1129
-
1130
1035
  if (selectionAnchor.clientId === selectionFocus.clientId) {
1131
1036
  return EMPTY_ARRAY;
1132
- } // Can't split if the selection is not set.
1133
-
1037
+ }
1134
1038
 
1039
+ // Can't split if the selection is not set.
1135
1040
  if (!selectionAnchor.attributeKey || !selectionFocus.attributeKey || typeof selectionAnchor.offset === 'undefined' || typeof selectionFocus.offset === 'undefined') {
1136
1041
  return EMPTY_ARRAY;
1137
1042
  }
1138
-
1139
1043
  const anchorRootClientId = getBlockRootClientId(state, selectionAnchor.clientId);
1140
- const focusRootClientId = getBlockRootClientId(state, selectionFocus.clientId); // It's not splittable if the selection doesn't start and end in the same
1141
- // block list. Maybe in the future it should be allowed.
1044
+ const focusRootClientId = getBlockRootClientId(state, selectionFocus.clientId);
1142
1045
 
1046
+ // It's not splittable if the selection doesn't start and end in the same
1047
+ // block list. Maybe in the future it should be allowed.
1143
1048
  if (anchorRootClientId !== focusRootClientId) {
1144
1049
  return EMPTY_ARRAY;
1145
1050
  }
1146
-
1147
1051
  const blockOrder = getBlockOrder(state, anchorRootClientId);
1148
1052
  const anchorIndex = blockOrder.indexOf(selectionAnchor.clientId);
1149
- const focusIndex = blockOrder.indexOf(selectionFocus.clientId); // Reassign selection start and end based on order.
1053
+ const focusIndex = blockOrder.indexOf(selectionFocus.clientId);
1150
1054
 
1055
+ // Reassign selection start and end based on order.
1151
1056
  const [selectionStart, selectionEnd] = anchorIndex > focusIndex ? [selectionFocus, selectionAnchor] : [selectionAnchor, selectionFocus];
1152
1057
  const blockA = getBlock(state, selectionStart.clientId);
1153
1058
  const blockAType = (0, _blocks.getBlockType)(blockA.name);
@@ -1167,15 +1072,19 @@ const __unstableGetSelectedBlocksWithPartialSelection = state => {
1167
1072
  });
1168
1073
  valueA = (0, _richText.remove)(valueA, 0, selectionStart.offset);
1169
1074
  valueB = (0, _richText.remove)(valueB, selectionEnd.offset, valueB.text.length);
1170
- return [{ ...blockA,
1171
- attributes: { ...blockA.attributes,
1075
+ return [{
1076
+ ...blockA,
1077
+ attributes: {
1078
+ ...blockA.attributes,
1172
1079
  [selectionStart.attributeKey]: (0, _richText.toHTMLString)({
1173
1080
  value: valueA,
1174
1081
  ...(0, _utils.mapRichTextSettings)(attributeDefinitionA)
1175
1082
  })
1176
1083
  }
1177
- }, { ...blockB,
1178
- attributes: { ...blockB.attributes,
1084
+ }, {
1085
+ ...blockB,
1086
+ attributes: {
1087
+ ...blockB.attributes,
1179
1088
  [selectionEnd.attributeKey]: (0, _richText.toHTMLString)({
1180
1089
  value: valueB,
1181
1090
  ...(0, _utils.mapRichTextSettings)(attributeDefinitionB)
@@ -1183,6 +1092,7 @@ const __unstableGetSelectedBlocksWithPartialSelection = state => {
1183
1092
  }
1184
1093
  }];
1185
1094
  };
1095
+
1186
1096
  /**
1187
1097
  * Returns an array containing all block client IDs in the editor in the order
1188
1098
  * they appear. Optionally accepts a root client ID of the block list for which
@@ -1193,13 +1103,11 @@ const __unstableGetSelectedBlocksWithPartialSelection = state => {
1193
1103
  *
1194
1104
  * @return {Array} Ordered client IDs of editor blocks.
1195
1105
  */
1196
-
1197
-
1198
1106
  exports.__unstableGetSelectedBlocksWithPartialSelection = __unstableGetSelectedBlocksWithPartialSelection;
1199
-
1200
1107
  function getBlockOrder(state, rootClientId) {
1201
1108
  return state.blocks.order.get(rootClientId || '') || EMPTY_ARRAY;
1202
1109
  }
1110
+
1203
1111
  /**
1204
1112
  * Returns the index at which the block corresponding to the specified client
1205
1113
  * ID occurs within the block order, or `-1` if the block does not exist.
@@ -1209,12 +1117,11 @@ function getBlockOrder(state, rootClientId) {
1209
1117
  *
1210
1118
  * @return {number} Index at which block exists in order.
1211
1119
  */
1212
-
1213
-
1214
1120
  function getBlockIndex(state, clientId) {
1215
1121
  const rootClientId = getBlockRootClientId(state, clientId);
1216
1122
  return getBlockOrder(state, rootClientId).indexOf(clientId);
1217
1123
  }
1124
+
1218
1125
  /**
1219
1126
  * Returns true if the block corresponding to the specified client ID is
1220
1127
  * currently selected and no multi-selection exists, or false otherwise.
@@ -1224,20 +1131,17 @@ function getBlockIndex(state, clientId) {
1224
1131
  *
1225
1132
  * @return {boolean} Whether block is selected and multi-selection exists.
1226
1133
  */
1227
-
1228
-
1229
1134
  function isBlockSelected(state, clientId) {
1230
1135
  const {
1231
1136
  selectionStart,
1232
1137
  selectionEnd
1233
1138
  } = state.selection;
1234
-
1235
1139
  if (selectionStart.clientId !== selectionEnd.clientId) {
1236
1140
  return false;
1237
1141
  }
1238
-
1239
1142
  return selectionStart.clientId === clientId;
1240
1143
  }
1144
+
1241
1145
  /**
1242
1146
  * Returns true if one of the block's inner blocks is selected.
1243
1147
  *
@@ -1247,11 +1151,10 @@ function isBlockSelected(state, clientId) {
1247
1151
  *
1248
1152
  * @return {boolean} Whether the block has an inner block selected
1249
1153
  */
1250
-
1251
-
1252
1154
  function hasSelectedInnerBlock(state, clientId, deep = false) {
1253
1155
  return getBlockOrder(state, clientId).some(innerClientId => isBlockSelected(state, innerClientId) || isBlockMultiSelected(state, innerClientId) || deep && hasSelectedInnerBlock(state, innerClientId, deep));
1254
1156
  }
1157
+
1255
1158
  /**
1256
1159
  * Returns true if one of the block's inner blocks is dragged.
1257
1160
  *
@@ -1261,11 +1164,10 @@ function hasSelectedInnerBlock(state, clientId, deep = false) {
1261
1164
  *
1262
1165
  * @return {boolean} Whether the block has an inner block dragged
1263
1166
  */
1264
-
1265
-
1266
1167
  function hasDraggedInnerBlock(state, clientId, deep = false) {
1267
1168
  return getBlockOrder(state, clientId).some(innerClientId => isBlockBeingDragged(state, innerClientId) || deep && hasDraggedInnerBlock(state, innerClientId, deep));
1268
1169
  }
1170
+
1269
1171
  /**
1270
1172
  * Returns true if the block corresponding to the specified client ID is
1271
1173
  * currently selected but isn't the last of the selected blocks. Here "last"
@@ -1278,17 +1180,15 @@ function hasDraggedInnerBlock(state, clientId, deep = false) {
1278
1180
  * @return {boolean} Whether block is selected and not the last in the
1279
1181
  * selection.
1280
1182
  */
1281
-
1282
-
1283
1183
  function isBlockWithinSelection(state, clientId) {
1284
1184
  if (!clientId) {
1285
1185
  return false;
1286
1186
  }
1287
-
1288
1187
  const clientIds = getMultiSelectedBlockClientIds(state);
1289
1188
  const index = clientIds.indexOf(clientId);
1290
1189
  return index > -1 && index < clientIds.length - 1;
1291
1190
  }
1191
+
1292
1192
  /**
1293
1193
  * Returns true if a multi-selection has been made, or false otherwise.
1294
1194
  *
@@ -1296,8 +1196,6 @@ function isBlockWithinSelection(state, clientId) {
1296
1196
  *
1297
1197
  * @return {boolean} Whether multi-selection has been made.
1298
1198
  */
1299
-
1300
-
1301
1199
  function hasMultiSelection(state) {
1302
1200
  const {
1303
1201
  selectionStart,
@@ -1305,6 +1203,7 @@ function hasMultiSelection(state) {
1305
1203
  } = state.selection;
1306
1204
  return selectionStart.clientId !== selectionEnd.clientId;
1307
1205
  }
1206
+
1308
1207
  /**
1309
1208
  * Whether in the process of multi-selecting or not. This flag is only true
1310
1209
  * while the multi-selection is being selected (by mouse move), and is false
@@ -1316,11 +1215,10 @@ function hasMultiSelection(state) {
1316
1215
  *
1317
1216
  * @return {boolean} True if multi-selecting, false if not.
1318
1217
  */
1319
-
1320
-
1321
1218
  function isMultiSelecting(state) {
1322
1219
  return state.isMultiSelecting;
1323
1220
  }
1221
+
1324
1222
  /**
1325
1223
  * Selector that returns if multi-selection is enabled or not.
1326
1224
  *
@@ -1328,11 +1226,10 @@ function isMultiSelecting(state) {
1328
1226
  *
1329
1227
  * @return {boolean} True if it should be possible to multi-select blocks, false if multi-selection is disabled.
1330
1228
  */
1331
-
1332
-
1333
1229
  function isSelectionEnabled(state) {
1334
1230
  return state.isSelectionEnabled;
1335
1231
  }
1232
+
1336
1233
  /**
1337
1234
  * Returns the block's editing mode, defaulting to "visual" if not explicitly
1338
1235
  * assigned.
@@ -1342,11 +1239,10 @@ function isSelectionEnabled(state) {
1342
1239
  *
1343
1240
  * @return {Object} Block editing mode.
1344
1241
  */
1345
-
1346
-
1347
1242
  function getBlockMode(state, clientId) {
1348
1243
  return state.blocksMode[clientId] || 'visual';
1349
1244
  }
1245
+
1350
1246
  /**
1351
1247
  * Returns true if the user is typing, or false otherwise.
1352
1248
  *
@@ -1354,11 +1250,10 @@ function getBlockMode(state, clientId) {
1354
1250
  *
1355
1251
  * @return {boolean} Whether user is typing.
1356
1252
  */
1357
-
1358
-
1359
1253
  function isTyping(state) {
1360
1254
  return state.isTyping;
1361
1255
  }
1256
+
1362
1257
  /**
1363
1258
  * Returns true if the user is dragging blocks, or false otherwise.
1364
1259
  *
@@ -1366,11 +1261,10 @@ function isTyping(state) {
1366
1261
  *
1367
1262
  * @return {boolean} Whether user is dragging blocks.
1368
1263
  */
1369
-
1370
-
1371
1264
  function isDraggingBlocks(state) {
1372
1265
  return !!state.draggedBlocks.length;
1373
1266
  }
1267
+
1374
1268
  /**
1375
1269
  * Returns the client ids of any blocks being directly dragged.
1376
1270
  *
@@ -1380,11 +1274,10 @@ function isDraggingBlocks(state) {
1380
1274
  *
1381
1275
  * @return {string[]} Array of dragged block client ids.
1382
1276
  */
1383
-
1384
-
1385
1277
  function getDraggedBlockClientIds(state) {
1386
1278
  return state.draggedBlocks;
1387
1279
  }
1280
+
1388
1281
  /**
1389
1282
  * Returns whether the block is being dragged.
1390
1283
  *
@@ -1397,11 +1290,10 @@ function getDraggedBlockClientIds(state) {
1397
1290
  *
1398
1291
  * @return {boolean} Whether the block is being dragged.
1399
1292
  */
1400
-
1401
-
1402
1293
  function isBlockBeingDragged(state, clientId) {
1403
1294
  return state.draggedBlocks.includes(clientId);
1404
1295
  }
1296
+
1405
1297
  /**
1406
1298
  * Returns whether a parent/ancestor of the block is being dragged.
1407
1299
  *
@@ -1410,18 +1302,16 @@ function isBlockBeingDragged(state, clientId) {
1410
1302
  *
1411
1303
  * @return {boolean} Whether the block's ancestor is being dragged.
1412
1304
  */
1413
-
1414
-
1415
1305
  function isAncestorBeingDragged(state, clientId) {
1416
1306
  // Return early if no blocks are being dragged rather than
1417
1307
  // the more expensive check for parents.
1418
1308
  if (!isDraggingBlocks(state)) {
1419
1309
  return false;
1420
1310
  }
1421
-
1422
1311
  const parents = getBlockParents(state, clientId);
1423
1312
  return parents.some(parentClientId => isBlockBeingDragged(state, parentClientId));
1424
1313
  }
1314
+
1425
1315
  /**
1426
1316
  * Returns true if the caret is within formatted text, or false otherwise.
1427
1317
  *
@@ -1429,8 +1319,6 @@ function isAncestorBeingDragged(state, clientId) {
1429
1319
  *
1430
1320
  * @return {boolean} Whether the caret is within formatted text.
1431
1321
  */
1432
-
1433
-
1434
1322
  function isCaretWithinFormattedText() {
1435
1323
  (0, _deprecated.default)('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText', {
1436
1324
  since: '6.1',
@@ -1438,6 +1326,7 @@ function isCaretWithinFormattedText() {
1438
1326
  });
1439
1327
  return false;
1440
1328
  }
1329
+
1441
1330
  /**
1442
1331
  * Returns the insertion point, the index at which the new inserted block would
1443
1332
  * be placed. Defaults to the last index.
@@ -1446,8 +1335,6 @@ function isCaretWithinFormattedText() {
1446
1335
  *
1447
1336
  * @return {Object} Insertion point object with `rootClientId`, `index`.
1448
1337
  */
1449
-
1450
-
1451
1338
  const getBlockInsertionPoint = (0, _rememo.default)(state => {
1452
1339
  let rootClientId, index;
1453
1340
  const {
@@ -1456,27 +1343,24 @@ const getBlockInsertionPoint = (0, _rememo.default)(state => {
1456
1343
  selectionEnd
1457
1344
  }
1458
1345
  } = state;
1459
-
1460
1346
  if (insertionPoint !== null) {
1461
1347
  return insertionPoint;
1462
1348
  }
1463
-
1464
1349
  const {
1465
1350
  clientId
1466
1351
  } = selectionEnd;
1467
-
1468
1352
  if (clientId) {
1469
1353
  rootClientId = getBlockRootClientId(state, clientId) || undefined;
1470
1354
  index = getBlockIndex(state, selectionEnd.clientId) + 1;
1471
1355
  } else {
1472
1356
  index = getBlockOrder(state).length;
1473
1357
  }
1474
-
1475
1358
  return {
1476
1359
  rootClientId,
1477
1360
  index
1478
1361
  };
1479
1362
  }, state => [state.insertionPoint, state.selection.selectionEnd.clientId, state.blocks.parents, state.blocks.order]);
1363
+
1480
1364
  /**
1481
1365
  * Returns true if we should show the block insertion point.
1482
1366
  *
@@ -1484,23 +1368,21 @@ const getBlockInsertionPoint = (0, _rememo.default)(state => {
1484
1368
  *
1485
1369
  * @return {?boolean} Whether the insertion point is visible or not.
1486
1370
  */
1487
-
1488
1371
  exports.getBlockInsertionPoint = getBlockInsertionPoint;
1489
-
1490
1372
  function isBlockInsertionPointVisible(state) {
1491
1373
  return state.insertionPoint !== null;
1492
1374
  }
1375
+
1493
1376
  /**
1494
1377
  * Returns whether the blocks matches the template or not.
1495
1378
  *
1496
1379
  * @param {boolean} state
1497
1380
  * @return {?boolean} Whether the template is valid or not.
1498
1381
  */
1499
-
1500
-
1501
1382
  function isValidTemplate(state) {
1502
1383
  return state.template.isValid;
1503
1384
  }
1385
+
1504
1386
  /**
1505
1387
  * Returns the defined block template
1506
1388
  *
@@ -1508,11 +1390,10 @@ function isValidTemplate(state) {
1508
1390
  *
1509
1391
  * @return {?Array} Block Template.
1510
1392
  */
1511
-
1512
-
1513
1393
  function getTemplate(state) {
1514
1394
  return state.settings.template;
1515
1395
  }
1396
+
1516
1397
  /**
1517
1398
  * Returns the defined block template lock. Optionally accepts a root block
1518
1399
  * client ID as context, otherwise defaulting to the global context.
@@ -1522,25 +1403,18 @@ function getTemplate(state) {
1522
1403
  *
1523
1404
  * @return {string|false} Block Template Lock
1524
1405
  */
1525
-
1526
-
1527
1406
  function getTemplateLock(state, rootClientId) {
1528
1407
  var _getBlockListSettings;
1529
-
1530
1408
  if (!rootClientId) {
1531
1409
  var _state$settings$templ;
1532
-
1533
1410
  return (_state$settings$templ = state.settings.templateLock) !== null && _state$settings$templ !== void 0 ? _state$settings$templ : false;
1534
1411
  }
1535
-
1536
1412
  return (_getBlockListSettings = getBlockListSettings(state, rootClientId)?.templateLock) !== null && _getBlockListSettings !== void 0 ? _getBlockListSettings : false;
1537
1413
  }
1538
-
1539
1414
  const checkAllowList = (list, item, defaultResult = null) => {
1540
1415
  if (typeof list === 'boolean') {
1541
1416
  return list;
1542
1417
  }
1543
-
1544
1418
  if (Array.isArray(list)) {
1545
1419
  // TODO: when there is a canonical way to detect that we are editing a post
1546
1420
  // the following check should be changed to something like:
@@ -1548,12 +1422,11 @@ const checkAllowList = (list, item, defaultResult = null) => {
1548
1422
  if (list.includes('core/post-content') && item === null) {
1549
1423
  return true;
1550
1424
  }
1551
-
1552
1425
  return list.includes(item);
1553
1426
  }
1554
-
1555
1427
  return defaultResult;
1556
1428
  };
1429
+
1557
1430
  /**
1558
1431
  * Determines if the given block type is allowed to be inserted into the block list.
1559
1432
  * This function is not exported and not memoized because using a memoized selector
@@ -1567,48 +1440,38 @@ const checkAllowList = (list, item, defaultResult = null) => {
1567
1440
  *
1568
1441
  * @return {boolean} Whether the given block type is allowed to be inserted.
1569
1442
  */
1570
-
1571
-
1572
1443
  const canInsertBlockTypeUnmemoized = (state, blockName, rootClientId = null) => {
1573
1444
  let blockType;
1574
-
1575
1445
  if (blockName && 'object' === typeof blockName) {
1576
1446
  blockType = blockName;
1577
1447
  blockName = blockType.name;
1578
1448
  } else {
1579
1449
  blockType = (0, _blocks.getBlockType)(blockName);
1580
1450
  }
1581
-
1582
1451
  if (!blockType) {
1583
1452
  return false;
1584
1453
  }
1585
-
1586
1454
  const {
1587
1455
  allowedBlockTypes
1588
1456
  } = getSettings(state);
1589
1457
  const isBlockAllowedInEditor = checkAllowList(allowedBlockTypes, blockName, true);
1590
-
1591
1458
  if (!isBlockAllowedInEditor) {
1592
1459
  return false;
1593
1460
  }
1594
-
1595
1461
  const isLocked = !!getTemplateLock(state, rootClientId);
1596
-
1597
1462
  if (isLocked) {
1598
1463
  return false;
1599
1464
  }
1600
-
1601
- if ((0, _privateSelectors.getBlockEditingMode)(state, rootClientId !== null && rootClientId !== void 0 ? rootClientId : '') === 'disabled') {
1465
+ if (getBlockEditingMode(state, rootClientId !== null && rootClientId !== void 0 ? rootClientId : '') === 'disabled') {
1602
1466
  return false;
1603
1467
  }
1468
+ const parentBlockListSettings = getBlockListSettings(state, rootClientId);
1604
1469
 
1605
- const parentBlockListSettings = getBlockListSettings(state, rootClientId); // The parent block doesn't have settings indicating it doesn't support
1470
+ // The parent block doesn't have settings indicating it doesn't support
1606
1471
  // inner blocks, return false.
1607
-
1608
1472
  if (rootClientId && parentBlockListSettings === undefined) {
1609
1473
  return false;
1610
1474
  }
1611
-
1612
1475
  const parentAllowedBlocks = parentBlockListSettings?.allowedBlocks;
1613
1476
  const hasParentAllowedBlock = checkAllowList(parentAllowedBlocks, blockName);
1614
1477
  const blockAllowedParentBlocks = blockType.parent;
@@ -1616,17 +1479,15 @@ const canInsertBlockTypeUnmemoized = (state, blockName, rootClientId = null) =>
1616
1479
  const hasBlockAllowedParent = checkAllowList(blockAllowedParentBlocks, parentName);
1617
1480
  let hasBlockAllowedAncestor = true;
1618
1481
  const blockAllowedAncestorBlocks = blockType.ancestor;
1619
-
1620
1482
  if (blockAllowedAncestorBlocks) {
1621
1483
  const ancestors = [rootClientId, ...getBlockParents(state, rootClientId)];
1622
1484
  hasBlockAllowedAncestor = ancestors.some(ancestorClientId => checkAllowList(blockAllowedAncestorBlocks, getBlockName(state, ancestorClientId)));
1623
1485
  }
1624
-
1625
1486
  const canInsert = hasBlockAllowedAncestor && (hasParentAllowedBlock === null && hasBlockAllowedParent === null || hasParentAllowedBlock === true || hasBlockAllowedParent === true);
1626
-
1627
1487
  if (!canInsert) {
1628
1488
  return canInsert;
1629
1489
  }
1490
+
1630
1491
  /**
1631
1492
  * This filter is an ad-hoc solution to prevent adding template parts inside post content.
1632
1493
  * Conceptually, having a filter inside a selector is bad pattern so this code will be
@@ -1639,8 +1500,6 @@ const canInsertBlockTypeUnmemoized = (state, blockName, rootClientId = null) =>
1639
1500
  * Filters are global: Once they're defined, they will affect all editor instances and all registries.
1640
1501
  * An ideal API would only affect specific editor instances.
1641
1502
  */
1642
-
1643
-
1644
1503
  return (0, _hooks.applyFilters)('blockEditor.__unstableCanInsertBlockType', canInsert, blockType, rootClientId, {
1645
1504
  // Pass bound selectors of the current registry. If we're in a nested
1646
1505
  // context, the data will differ from the one selected from the root
@@ -1649,6 +1508,7 @@ const canInsertBlockTypeUnmemoized = (state, blockName, rootClientId = null) =>
1649
1508
  getBlockParentsByBlockName: getBlockParentsByBlockName.bind(null, state)
1650
1509
  });
1651
1510
  };
1511
+
1652
1512
  /**
1653
1513
  * Determines if the given block type is allowed to be inserted into the block list.
1654
1514
  *
@@ -1658,9 +1518,8 @@ const canInsertBlockTypeUnmemoized = (state, blockName, rootClientId = null) =>
1658
1518
  *
1659
1519
  * @return {boolean} Whether the given block type is allowed to be inserted.
1660
1520
  */
1661
-
1662
-
1663
1521
  const canInsertBlockType = (0, _rememo.default)(canInsertBlockTypeUnmemoized, (state, blockName, rootClientId) => [state.blockListSettings[rootClientId], state.blocks.byClientId.get(rootClientId), state.settings.allowedBlockTypes, state.settings.templateLock, state.blockEditingModes]);
1522
+
1664
1523
  /**
1665
1524
  * Determines if the given blocks are allowed to be inserted into the block
1666
1525
  * list.
@@ -1671,12 +1530,11 @@ const canInsertBlockType = (0, _rememo.default)(canInsertBlockTypeUnmemoized, (s
1671
1530
  *
1672
1531
  * @return {boolean} Whether the given blocks are allowed to be inserted.
1673
1532
  */
1674
-
1675
1533
  exports.canInsertBlockType = canInsertBlockType;
1676
-
1677
1534
  function canInsertBlocks(state, clientIds, rootClientId = null) {
1678
1535
  return clientIds.every(id => canInsertBlockType(state, getBlockName(state, id), rootClientId));
1679
1536
  }
1537
+
1680
1538
  /**
1681
1539
  * Determines if the given block is allowed to be deleted.
1682
1540
  *
@@ -1686,25 +1544,20 @@ function canInsertBlocks(state, clientIds, rootClientId = null) {
1686
1544
  *
1687
1545
  * @return {boolean} Whether the given block is allowed to be removed.
1688
1546
  */
1689
-
1690
-
1691
1547
  function canRemoveBlock(state, clientId, rootClientId = null) {
1692
1548
  const attributes = getBlockAttributes(state, clientId);
1693
-
1694
1549
  if (attributes === null) {
1695
1550
  return true;
1696
1551
  }
1697
-
1698
1552
  if (attributes.lock?.remove !== undefined) {
1699
1553
  return !attributes.lock.remove;
1700
1554
  }
1701
-
1702
1555
  if (getTemplateLock(state, rootClientId)) {
1703
1556
  return false;
1704
1557
  }
1705
-
1706
- return (0, _privateSelectors.getBlockEditingMode)(state, rootClientId) !== 'disabled';
1558
+ return getBlockEditingMode(state, rootClientId) !== 'disabled';
1707
1559
  }
1560
+
1708
1561
  /**
1709
1562
  * Determines if the given blocks are allowed to be removed.
1710
1563
  *
@@ -1714,11 +1567,10 @@ function canRemoveBlock(state, clientId, rootClientId = null) {
1714
1567
  *
1715
1568
  * @return {boolean} Whether the given blocks are allowed to be removed.
1716
1569
  */
1717
-
1718
-
1719
1570
  function canRemoveBlocks(state, clientIds, rootClientId = null) {
1720
1571
  return clientIds.every(clientId => canRemoveBlock(state, clientId, rootClientId));
1721
1572
  }
1573
+
1722
1574
  /**
1723
1575
  * Determines if the given block is allowed to be moved.
1724
1576
  *
@@ -1728,25 +1580,20 @@ function canRemoveBlocks(state, clientIds, rootClientId = null) {
1728
1580
  *
1729
1581
  * @return {boolean | undefined} Whether the given block is allowed to be moved.
1730
1582
  */
1731
-
1732
-
1733
1583
  function canMoveBlock(state, clientId, rootClientId = null) {
1734
1584
  const attributes = getBlockAttributes(state, clientId);
1735
-
1736
1585
  if (attributes === null) {
1737
1586
  return true;
1738
1587
  }
1739
-
1740
1588
  if (attributes.lock?.move !== undefined) {
1741
1589
  return !attributes.lock.move;
1742
1590
  }
1743
-
1744
1591
  if (getTemplateLock(state, rootClientId) === 'all') {
1745
1592
  return false;
1746
1593
  }
1747
-
1748
- return (0, _privateSelectors.getBlockEditingMode)(state, rootClientId) !== 'disabled';
1594
+ return getBlockEditingMode(state, rootClientId) !== 'disabled';
1749
1595
  }
1596
+
1750
1597
  /**
1751
1598
  * Determines if the given blocks are allowed to be moved.
1752
1599
  *
@@ -1756,11 +1603,10 @@ function canMoveBlock(state, clientId, rootClientId = null) {
1756
1603
  *
1757
1604
  * @return {boolean} Whether the given blocks are allowed to be moved.
1758
1605
  */
1759
-
1760
-
1761
1606
  function canMoveBlocks(state, clientIds, rootClientId = null) {
1762
1607
  return clientIds.every(clientId => canMoveBlock(state, clientId, rootClientId));
1763
1608
  }
1609
+
1764
1610
  /**
1765
1611
  * Determines if the given block is allowed to be edited.
1766
1612
  *
@@ -1769,21 +1615,19 @@ function canMoveBlocks(state, clientIds, rootClientId = null) {
1769
1615
  *
1770
1616
  * @return {boolean} Whether the given block is allowed to be edited.
1771
1617
  */
1772
-
1773
-
1774
1618
  function canEditBlock(state, clientId) {
1775
1619
  const attributes = getBlockAttributes(state, clientId);
1776
-
1777
1620
  if (attributes === null) {
1778
1621
  return true;
1779
1622
  }
1780
-
1781
1623
  const {
1782
1624
  lock
1783
- } = attributes; // When the edit is true, we cannot edit the block.
1625
+ } = attributes;
1784
1626
 
1627
+ // When the edit is true, we cannot edit the block.
1785
1628
  return !lock?.edit;
1786
1629
  }
1630
+
1787
1631
  /**
1788
1632
  * Determines if the given block type can be locked/unlocked by a user.
1789
1633
  *
@@ -1792,16 +1636,15 @@ function canEditBlock(state, clientId) {
1792
1636
  *
1793
1637
  * @return {boolean} Whether a given block type can be locked/unlocked.
1794
1638
  */
1795
-
1796
-
1797
1639
  function canLockBlockType(state, nameOrType) {
1798
1640
  if (!(0, _blocks.hasBlockSupport)(nameOrType, 'lock', true)) {
1799
1641
  return false;
1800
- } // Use block editor settings as the default value.
1801
-
1642
+ }
1802
1643
 
1644
+ // Use block editor settings as the default value.
1803
1645
  return !!state.settings?.canLockBlocks;
1804
1646
  }
1647
+
1805
1648
  /**
1806
1649
  * Returns information about how recently and frequently a block has been inserted.
1807
1650
  *
@@ -1812,13 +1655,11 @@ function canLockBlockType(state, nameOrType) {
1812
1655
  * insert occurred as a UNIX epoch, and `count` which is
1813
1656
  * the number of inserts that have occurred.
1814
1657
  */
1815
-
1816
-
1817
1658
  function getInsertUsage(state, id) {
1818
1659
  var _state$preferences$in;
1819
-
1820
1660
  return (_state$preferences$in = state.preferences.insertUsage?.[id]) !== null && _state$preferences$in !== void 0 ? _state$preferences$in : null;
1821
1661
  }
1662
+
1822
1663
  /**
1823
1664
  * Returns whether we can show a block type in the inserter
1824
1665
  *
@@ -1828,15 +1669,13 @@ function getInsertUsage(state, id) {
1828
1669
  *
1829
1670
  * @return {boolean} Whether the given block type is allowed to be shown in the inserter.
1830
1671
  */
1831
-
1832
-
1833
1672
  const canIncludeBlockTypeInInserter = (state, blockType, rootClientId) => {
1834
1673
  if (!(0, _blocks.hasBlockSupport)(blockType, 'inserter', true)) {
1835
1674
  return false;
1836
1675
  }
1837
-
1838
1676
  return canInsertBlockTypeUnmemoized(state, blockType.name, rootClientId);
1839
1677
  };
1678
+
1840
1679
  /**
1841
1680
  * Return a function to be used to tranform a block variation to an inserter item
1842
1681
  *
@@ -1844,15 +1683,14 @@ const canIncludeBlockTypeInInserter = (state, blockType, rootClientId) => {
1844
1683
  * @param {Object} item Denormalized inserter item
1845
1684
  * @return {Function} Function to transform a block variation to inserter item
1846
1685
  */
1847
-
1848
-
1849
1686
  const getItemFromVariation = (state, item) => variation => {
1850
1687
  const variationId = `${item.id}/${variation.name}`;
1851
1688
  const {
1852
1689
  time,
1853
1690
  count = 0
1854
1691
  } = getInsertUsage(state, variationId) || {};
1855
- return { ...item,
1692
+ return {
1693
+ ...item,
1856
1694
  id: variationId,
1857
1695
  icon: variation.icon || item.icon,
1858
1696
  title: variation.title || item.title,
@@ -1860,7 +1698,8 @@ const getItemFromVariation = (state, item) => variation => {
1860
1698
  category: variation.category || item.category,
1861
1699
  // If `example` is explicitly undefined for the variation, the preview will not be shown.
1862
1700
  example: variation.hasOwnProperty('example') ? variation.example : item.example,
1863
- initialAttributes: { ...item.initialAttributes,
1701
+ initialAttributes: {
1702
+ ...item.initialAttributes,
1864
1703
  ...variation.attributes
1865
1704
  },
1866
1705
  innerBlocks: variation.innerBlocks,
@@ -1868,6 +1707,7 @@ const getItemFromVariation = (state, item) => variation => {
1868
1707
  frecency: calculateFrecency(time, count)
1869
1708
  };
1870
1709
  };
1710
+
1871
1711
  /**
1872
1712
  * Returns the calculated frecency.
1873
1713
  *
@@ -1879,31 +1719,25 @@ const getItemFromVariation = (state, item) => variation => {
1879
1719
  *
1880
1720
  * @return {number} The calculated frecency.
1881
1721
  */
1882
-
1883
-
1884
1722
  const calculateFrecency = (time, count) => {
1885
1723
  if (!time) {
1886
1724
  return count;
1887
- } // The selector is cached, which means Date.now() is the last time that the
1725
+ }
1726
+ // The selector is cached, which means Date.now() is the last time that the
1888
1727
  // relevant state changed. This suits our needs.
1889
-
1890
-
1891
1728
  const duration = Date.now() - time;
1892
-
1893
1729
  switch (true) {
1894
1730
  case duration < MILLISECONDS_PER_HOUR:
1895
1731
  return count * 4;
1896
-
1897
1732
  case duration < MILLISECONDS_PER_DAY:
1898
1733
  return count * 2;
1899
-
1900
1734
  case duration < MILLISECONDS_PER_WEEK:
1901
1735
  return count / 2;
1902
-
1903
1736
  default:
1904
1737
  return count / 4;
1905
1738
  }
1906
1739
  };
1740
+
1907
1741
  /**
1908
1742
  * Returns a function that accepts a block type and builds an item to be shown
1909
1743
  * in a specific context. It's used for building items for Inserter and available
@@ -1914,20 +1748,16 @@ const calculateFrecency = (time, count) => {
1914
1748
  * @param {string} options.buildScope The scope for which the item is going to be used.
1915
1749
  * @return {Function} Function returns an item to be shown in a specific context (Inserter|Transforms list).
1916
1750
  */
1917
-
1918
-
1919
1751
  const buildBlockTypeItem = (state, {
1920
1752
  buildScope = 'inserter'
1921
1753
  }) => blockType => {
1922
1754
  const id = blockType.name;
1923
1755
  let isDisabled = false;
1924
-
1925
1756
  if (!(0, _blocks.hasBlockSupport)(blockType.name, 'multiple', true)) {
1926
1757
  isDisabled = getBlocksByClientId(state, getClientIdsWithDescendants(state)).some(({
1927
1758
  name
1928
1759
  }) => name === blockType.name);
1929
1760
  }
1930
-
1931
1761
  const {
1932
1762
  time,
1933
1763
  count = 0
@@ -1942,7 +1772,8 @@ const buildBlockTypeItem = (state, {
1942
1772
  };
1943
1773
  if (buildScope === 'transform') return blockItemBase;
1944
1774
  const inserterVariations = (0, _blocks.getBlockVariations)(blockType.name, 'inserter');
1945
- return { ...blockItemBase,
1775
+ return {
1776
+ ...blockItemBase,
1946
1777
  initialAttributes: {},
1947
1778
  description: blockType.description,
1948
1779
  category: blockType.category,
@@ -1950,9 +1781,9 @@ const buildBlockTypeItem = (state, {
1950
1781
  variations: inserterVariations,
1951
1782
  example: blockType.example,
1952
1783
  utility: 1 // Deprecated.
1953
-
1954
1784
  };
1955
1785
  };
1786
+
1956
1787
  /**
1957
1788
  * Determines the items that appear in the inserter. Includes both static
1958
1789
  * items (e.g. a regular block type) and dynamic items (e.g. a reusable block).
@@ -1982,49 +1813,12 @@ const buildBlockTypeItem = (state, {
1982
1813
  * this item.
1983
1814
  * @property {number} frecency Heuristic that combines frequency and recency.
1984
1815
  */
1985
-
1986
-
1987
1816
  const getInserterItems = (0, _rememo.default)((state, rootClientId = null) => {
1988
- /*
1989
- * Matches block comment delimiters amid serialized content.
1990
- *
1991
- * @see `tokenizer` in `@wordpress/block-serialization-default-parser`
1992
- * package
1993
- *
1994
- * blockParserTokenizer differs from the original tokenizer in the
1995
- * following ways:
1996
- *
1997
- * - removed global flag (/g)
1998
- * - prepended ^\s*
1999
- *
2000
- */
2001
- const blockParserTokenizer = /^\s*<!--\s+(\/)?wp:([a-z][a-z0-9_-]*\/)?([a-z][a-z0-9_-]*)\s+({(?:(?=([^}]+|}+(?=})|(?!}\s+\/?-->)[^])*)\5|[^]*?)}\s+)?(\/)?-->/;
2002
-
2003
1817
  const buildReusableBlockInserterItem = reusableBlock => {
2004
- let icon = _icons.symbol;
2005
- /*
2006
- * Instead of always displaying a generic "symbol" icon for every
2007
- * reusable block, try to use an icon that represents the first
2008
- * outermost block contained in the reusable block. This requires
2009
- * scanning the serialized form of the reusable block to find its
2010
- * first block delimiter, then looking up the corresponding block
2011
- * type, if available.
2012
- */
2013
-
2014
- if (_element.Platform.OS === 'web') {
2015
- const content = typeof reusableBlock.content.raw === 'string' ? reusableBlock.content.raw : reusableBlock.content;
2016
- const rawBlockMatch = content.match(blockParserTokenizer);
2017
-
2018
- if (rawBlockMatch) {
2019
- const [,, namespace = 'core/', blockName] = rawBlockMatch;
2020
- const referencedBlockType = (0, _blocks.getBlockType)(namespace + blockName);
2021
-
2022
- if (referencedBlockType) {
2023
- icon = referencedBlockType.icon;
2024
- }
2025
- }
2026
- }
2027
-
1818
+ const icon = !reusableBlock.wp_pattern_sync_status ? {
1819
+ src: _icons.symbol,
1820
+ foreground: 'var(--wp-block-synced-color)'
1821
+ } : _icons.symbol;
2028
1822
  const id = `core/block/${reusableBlock.id}`;
2029
1823
  const {
2030
1824
  time,
@@ -2045,15 +1839,11 @@ const getInserterItems = (0, _rememo.default)((state, rootClientId = null) => {
2045
1839
  utility: 1,
2046
1840
  // Deprecated.
2047
1841
  frecency,
2048
- content: reusableBlock.content.raw
1842
+ content: reusableBlock.content.raw,
1843
+ syncStatus: reusableBlock.wp_pattern_sync_status
2049
1844
  };
2050
1845
  };
2051
-
2052
- const syncedPatternInserterItems = canInsertBlockTypeUnmemoized(state, 'core/block', rootClientId) ? getReusableBlocks(state).filter(reusableBlock => // Reusable blocks that are fully synced should have no sync status set
2053
- // for backwards compat between patterns and old reusable blocks, but
2054
- // some in release 16.1 may have had sync status inadvertantly set to
2055
- // 'fully' if created in the site editor.
2056
- reusableBlock.wp_pattern_sync_status === 'fully' || reusableBlock.wp_pattern_sync_status === '' || !reusableBlock.wp_pattern_sync_status).map(buildReusableBlockInserterItem) : [];
1846
+ const syncedPatternInserterItems = canInsertBlockTypeUnmemoized(state, 'core/block', rootClientId) ? getReusableBlocks(state).map(buildReusableBlockInserterItem) : [];
2057
1847
  const buildBlockTypeInserterItem = buildBlockTypeItem(state, {
2058
1848
  buildScope: 'inserter'
2059
1849
  });
@@ -2061,26 +1851,25 @@ const getInserterItems = (0, _rememo.default)((state, rootClientId = null) => {
2061
1851
  const items = blockTypeInserterItems.reduce((accumulator, item) => {
2062
1852
  const {
2063
1853
  variations = []
2064
- } = item; // Exclude any block type item that is to be replaced by a default variation.
2065
-
1854
+ } = item;
1855
+ // Exclude any block type item that is to be replaced by a default variation.
2066
1856
  if (!variations.some(({
2067
1857
  isDefault
2068
1858
  }) => isDefault)) {
2069
1859
  accumulator.push(item);
2070
1860
  }
2071
-
2072
1861
  if (variations.length) {
2073
1862
  const variationMapper = getItemFromVariation(state, item);
2074
1863
  accumulator.push(...variations.map(variationMapper));
2075
1864
  }
2076
-
2077
1865
  return accumulator;
2078
- }, []); // Ensure core blocks are prioritized in the returned results,
1866
+ }, []);
1867
+
1868
+ // Ensure core blocks are prioritized in the returned results,
2079
1869
  // because third party blocks can be registered earlier than
2080
1870
  // the core blocks (usually by using the `init` action),
2081
1871
  // thus affecting the display order.
2082
1872
  // We don't sort reusable blocks as they are handled differently.
2083
-
2084
1873
  const groupByType = (blocks, block) => {
2085
1874
  const {
2086
1875
  core,
@@ -2090,7 +1879,6 @@ const getInserterItems = (0, _rememo.default)((state, rootClientId = null) => {
2090
1879
  type.push(block);
2091
1880
  return blocks;
2092
1881
  };
2093
-
2094
1882
  const {
2095
1883
  core: coreItems,
2096
1884
  noncore: nonCoreItems
@@ -2101,6 +1889,7 @@ const getInserterItems = (0, _rememo.default)((state, rootClientId = null) => {
2101
1889
  const sortedBlockTypes = [...coreItems, ...nonCoreItems];
2102
1890
  return [...sortedBlockTypes, ...syncedPatternInserterItems];
2103
1891
  }, (state, rootClientId) => [state.blockListSettings[rootClientId], state.blocks.byClientId, state.blocks.order, state.preferences.insertUsage, state.settings.allowedBlockTypes, state.settings.templateLock, getReusableBlocks(state), (0, _blocks.getBlockTypes)()]);
1892
+
2104
1893
  /**
2105
1894
  * Determines the items that appear in the available block transforms list.
2106
1895
  *
@@ -2127,7 +1916,6 @@ const getInserterItems = (0, _rememo.default)((state, rootClientId = null) => {
2127
1916
  * this item.
2128
1917
  * @property {number} frecency Heuristic that combines frequency and recency.
2129
1918
  */
2130
-
2131
1919
  exports.getInserterItems = getInserterItems;
2132
1920
  const getBlockTransformItems = (0, _rememo.default)((state, blocks, rootClientId = null) => {
2133
1921
  const normalizedBlocks = Array.isArray(blocks) ? blocks : [blocks];
@@ -2140,11 +1928,11 @@ const getBlockTransformItems = (0, _rememo.default)((state, blocks, rootClientId
2140
1928
  if (itemsByName[block?.name]) {
2141
1929
  accumulator.push(itemsByName[block.name]);
2142
1930
  }
2143
-
2144
1931
  return accumulator;
2145
1932
  }, []);
2146
1933
  return (0, _sorting.orderBy)(possibleTransforms, block => itemsByName[block.name].frecency, 'desc');
2147
1934
  }, (state, blocks, rootClientId) => [state.blockListSettings[rootClientId], state.blocks.byClientId, state.preferences.insertUsage, state.settings.allowedBlockTypes, state.settings.templateLock, (0, _blocks.getBlockTypes)()]);
1935
+
2148
1936
  /**
2149
1937
  * Determines whether there are items to show in the inserter.
2150
1938
  *
@@ -2153,18 +1941,16 @@ const getBlockTransformItems = (0, _rememo.default)((state, blocks, rootClientId
2153
1941
  *
2154
1942
  * @return {boolean} Items that appear in inserter.
2155
1943
  */
2156
-
2157
1944
  exports.getBlockTransformItems = getBlockTransformItems;
2158
1945
  const hasInserterItems = (0, _rememo.default)((state, rootClientId = null) => {
2159
1946
  const hasBlockType = (0, _blocks.getBlockTypes)().some(blockType => canIncludeBlockTypeInInserter(state, blockType, rootClientId));
2160
-
2161
1947
  if (hasBlockType) {
2162
1948
  return true;
2163
1949
  }
2164
-
2165
1950
  const hasReusableBlock = canInsertBlockTypeUnmemoized(state, 'core/block', rootClientId) && getReusableBlocks(state).length > 0;
2166
1951
  return hasReusableBlock;
2167
1952
  }, (state, rootClientId) => [state.blockListSettings[rootClientId], state.blocks.byClientId, state.settings.allowedBlockTypes, state.settings.templateLock, getReusableBlocks(state), (0, _blocks.getBlockTypes)()]);
1953
+
2168
1954
  /**
2169
1955
  * Returns the list of allowed inserter blocks for inner blocks children.
2170
1956
  *
@@ -2173,19 +1959,16 @@ const hasInserterItems = (0, _rememo.default)((state, rootClientId = null) => {
2173
1959
  *
2174
1960
  * @return {Array?} The list of allowed block types.
2175
1961
  */
2176
-
2177
1962
  exports.hasInserterItems = hasInserterItems;
2178
1963
  const getAllowedBlocks = (0, _rememo.default)((state, rootClientId = null) => {
2179
1964
  if (!rootClientId) {
2180
1965
  return;
2181
1966
  }
2182
-
2183
1967
  const blockTypes = (0, _blocks.getBlockTypes)().filter(blockType => canIncludeBlockTypeInInserter(state, blockType, rootClientId));
2184
1968
  const hasReusableBlock = canInsertBlockTypeUnmemoized(state, 'core/block', rootClientId) && getReusableBlocks(state).length > 0;
2185
1969
  return [...blockTypes, ...(hasReusableBlock ? ['core/block'] : [])];
2186
1970
  }, (state, rootClientId) => [state.blockListSettings[rootClientId], state.blocks.byClientId, state.settings.allowedBlockTypes, state.settings.templateLock, getReusableBlocks(state), (0, _blocks.getBlockTypes)()]);
2187
1971
  exports.getAllowedBlocks = getAllowedBlocks;
2188
-
2189
1972
  const __experimentalGetAllowedBlocks = (0, _rememo.default)((state, rootClientId = null) => {
2190
1973
  (0, _deprecated.default)('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks', {
2191
1974
  alternative: 'wp.data.select( "core/block-editor" ).getAllowedBlocks',
@@ -2194,6 +1977,7 @@ const __experimentalGetAllowedBlocks = (0, _rememo.default)((state, rootClientId
2194
1977
  });
2195
1978
  return getAllowedBlocks(state, rootClientId);
2196
1979
  }, (state, rootClientId) => [...getAllowedBlocks.getDependants(state, rootClientId)]);
1980
+
2197
1981
  /**
2198
1982
  * Returns the block to be directly inserted by the block appender.
2199
1983
  *
@@ -2207,29 +1991,22 @@ const __experimentalGetAllowedBlocks = (0, _rememo.default)((state, rootClientId
2207
1991
  * @property {?Object} attributes Attributes to pass to the newly created block.
2208
1992
  * @property {?Array<string>} attributesToCopy Attributes to be copied from adjecent blocks when inserted.
2209
1993
  */
2210
-
2211
-
2212
1994
  exports.__experimentalGetAllowedBlocks = __experimentalGetAllowedBlocks;
2213
1995
  const getDirectInsertBlock = (0, _rememo.default)((state, rootClientId = null) => {
2214
1996
  if (!rootClientId) {
2215
1997
  return;
2216
1998
  }
2217
-
2218
1999
  const defaultBlock = state.blockListSettings[rootClientId]?.defaultBlock;
2219
2000
  const directInsert = state.blockListSettings[rootClientId]?.directInsert;
2220
-
2221
2001
  if (!defaultBlock || !directInsert) {
2222
2002
  return;
2223
2003
  }
2224
-
2225
2004
  if (typeof directInsert === 'function') {
2226
2005
  return directInsert(getBlock(state, rootClientId)) ? defaultBlock : null;
2227
2006
  }
2228
-
2229
2007
  return defaultBlock;
2230
2008
  }, (state, rootClientId) => [state.blockListSettings[rootClientId], state.blocks.tree.get(rootClientId)]);
2231
2009
  exports.getDirectInsertBlock = getDirectInsertBlock;
2232
-
2233
2010
  const __experimentalGetDirectInsertBlock = (0, _rememo.default)((state, rootClientId = null) => {
2234
2011
  (0, _deprecated.default)('wp.data.select( "core/block-editor" ).__experimentalGetDirectInsertBlock', {
2235
2012
  alternative: 'wp.data.select( "core/block-editor" ).getDirectInsertBlock',
@@ -2238,35 +2015,26 @@ const __experimentalGetDirectInsertBlock = (0, _rememo.default)((state, rootClie
2238
2015
  });
2239
2016
  return getDirectInsertBlock(state, rootClientId);
2240
2017
  }, (state, rootClientId) => [state.blockListSettings[rootClientId], state.blocks.tree.get(rootClientId)]);
2241
-
2242
2018
  exports.__experimentalGetDirectInsertBlock = __experimentalGetDirectInsertBlock;
2243
-
2244
2019
  const checkAllowListRecursive = (blocks, allowedBlockTypes) => {
2245
2020
  if (typeof allowedBlockTypes === 'boolean') {
2246
2021
  return allowedBlockTypes;
2247
2022
  }
2248
-
2249
2023
  const blocksQueue = [...blocks];
2250
-
2251
2024
  while (blocksQueue.length > 0) {
2252
2025
  const block = blocksQueue.shift();
2253
2026
  const isAllowed = checkAllowList(allowedBlockTypes, block.name || block.blockName, true);
2254
-
2255
2027
  if (!isAllowed) {
2256
2028
  return false;
2257
2029
  }
2258
-
2259
2030
  block.innerBlocks?.forEach(innerBlock => {
2260
2031
  blocksQueue.push(innerBlock);
2261
2032
  });
2262
2033
  }
2263
-
2264
2034
  return true;
2265
2035
  };
2266
-
2267
2036
  function getUnsyncedPatterns(state) {
2268
2037
  var _state$settings$__exp;
2269
-
2270
2038
  const reusableBlocks = (_state$settings$__exp = state?.settings?.__experimentalReusableBlocks) !== null && _state$settings$__exp !== void 0 ? _state$settings$__exp : EMPTY_ARRAY;
2271
2039
  return reusableBlocks.filter(reusableBlock => reusableBlock.wp_pattern_sync_status === 'unsynced').map(reusableBlock => {
2272
2040
  return {
@@ -2277,25 +2045,22 @@ function getUnsyncedPatterns(state) {
2277
2045
  };
2278
2046
  });
2279
2047
  }
2280
-
2281
2048
  const __experimentalGetParsedPattern = (0, _rememo.default)((state, patternName) => {
2282
2049
  const patterns = state.settings.__experimentalBlockPatterns;
2283
2050
  const unsyncedPatterns = getUnsyncedPatterns(state);
2284
2051
  const pattern = [...patterns, ...unsyncedPatterns].find(({
2285
2052
  name
2286
2053
  }) => name === patternName);
2287
-
2288
2054
  if (!pattern) {
2289
2055
  return null;
2290
2056
  }
2291
-
2292
- return { ...pattern,
2057
+ return {
2058
+ ...pattern,
2293
2059
  blocks: (0, _blocks.parse)(pattern.content, {
2294
2060
  __unstableSkipMigrationLogs: true
2295
2061
  })
2296
2062
  };
2297
2063
  }, state => [state.settings.__experimentalBlockPatterns, state.settings.__experimentalReusableBlocks]);
2298
-
2299
2064
  exports.__experimentalGetParsedPattern = __experimentalGetParsedPattern;
2300
2065
  const getAllAllowedPatterns = (0, _rememo.default)(state => {
2301
2066
  const patterns = state.settings.__experimentalBlockPatterns;
@@ -2313,6 +2078,7 @@ const getAllAllowedPatterns = (0, _rememo.default)(state => {
2313
2078
  }) => checkAllowListRecursive(blocks, allowedBlockTypes));
2314
2079
  return allowedPatterns;
2315
2080
  }, state => [state.settings.__experimentalBlockPatterns, state.settings.__experimentalReusableBlocks, state.settings.allowedBlockTypes]);
2081
+
2316
2082
  /**
2317
2083
  * Returns the list of allowed patterns for inner blocks children.
2318
2084
  *
@@ -2321,7 +2087,6 @@ const getAllAllowedPatterns = (0, _rememo.default)(state => {
2321
2087
  *
2322
2088
  * @return {Array?} The list of allowed patterns.
2323
2089
  */
2324
-
2325
2090
  const __experimentalGetAllowedPatterns = (0, _rememo.default)((state, rootClientId = null) => {
2326
2091
  const availableParsedPatterns = getAllAllowedPatterns(state);
2327
2092
  const patternsAllowed = availableParsedPatterns.filter(({
@@ -2331,6 +2096,7 @@ const __experimentalGetAllowedPatterns = (0, _rememo.default)((state, rootClient
2331
2096
  }) => canInsertBlockType(state, name, rootClientId)));
2332
2097
  return patternsAllowed;
2333
2098
  }, (state, rootClientId) => [state.settings.__experimentalBlockPatterns, state.settings.__experimentalReusableBlocks, state.settings.allowedBlockTypes, state.settings.templateLock, state.blockListSettings[rootClientId], state.blocks.byClientId.get(rootClientId)]);
2099
+
2334
2100
  /**
2335
2101
  * Returns the list of patterns based on their declared `blockTypes`
2336
2102
  * and a block's name.
@@ -2344,25 +2110,18 @@ const __experimentalGetAllowedPatterns = (0, _rememo.default)((state, rootClient
2344
2110
  *
2345
2111
  * @return {Array} The list of matched block patterns based on declared `blockTypes` and block name.
2346
2112
  */
2347
-
2348
-
2349
2113
  exports.__experimentalGetAllowedPatterns = __experimentalGetAllowedPatterns;
2350
2114
  const getPatternsByBlockTypes = (0, _rememo.default)((state, blockNames, rootClientId = null) => {
2351
2115
  if (!blockNames) return EMPTY_ARRAY;
2352
-
2353
2116
  const patterns = __experimentalGetAllowedPatterns(state, rootClientId);
2354
-
2355
2117
  const normalizedBlockNames = Array.isArray(blockNames) ? blockNames : [blockNames];
2356
2118
  const filteredPatterns = patterns.filter(pattern => pattern?.blockTypes?.some?.(blockName => normalizedBlockNames.includes(blockName)));
2357
-
2358
2119
  if (filteredPatterns.length === 0) {
2359
2120
  return EMPTY_ARRAY;
2360
2121
  }
2361
-
2362
2122
  return filteredPatterns;
2363
2123
  }, (state, blockNames, rootClientId) => [...__experimentalGetAllowedPatterns.getDependants(state, rootClientId)]);
2364
2124
  exports.getPatternsByBlockTypes = getPatternsByBlockTypes;
2365
-
2366
2125
  const __experimentalGetPatternsByBlockTypes = (0, _rememo.default)((state, blockNames, rootClientId = null) => {
2367
2126
  (0, _deprecated.default)('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes', {
2368
2127
  alternative: 'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',
@@ -2371,6 +2130,7 @@ const __experimentalGetPatternsByBlockTypes = (0, _rememo.default)((state, block
2371
2130
  });
2372
2131
  return getPatternsByBlockTypes(state, blockNames, rootClientId);
2373
2132
  }, (state, blockNames, rootClientId) => [...__experimentalGetAllowedPatterns.getDependants(state, rootClientId)]);
2133
+
2374
2134
  /**
2375
2135
  * Determines the items that appear in the available pattern transforms list.
2376
2136
  *
@@ -2388,10 +2148,7 @@ const __experimentalGetPatternsByBlockTypes = (0, _rememo.default)((state, block
2388
2148
  *
2389
2149
  * @return {WPBlockPattern[]} Items that are eligible for a pattern transformation.
2390
2150
  */
2391
-
2392
-
2393
2151
  exports.__experimentalGetPatternsByBlockTypes = __experimentalGetPatternsByBlockTypes;
2394
-
2395
2152
  const __experimentalGetPatternTransformItems = (0, _rememo.default)((state, blocks, rootClientId = null) => {
2396
2153
  if (!blocks) return EMPTY_ARRAY;
2397
2154
  /**
@@ -2401,15 +2158,14 @@ const __experimentalGetPatternTransformItems = (0, _rememo.default)((state, bloc
2401
2158
  * return the inner blocks of an inner block controller, so we still need
2402
2159
  * to check for this case too.
2403
2160
  */
2404
-
2405
2161
  if (blocks.some(({
2406
2162
  clientId,
2407
2163
  innerBlocks
2408
2164
  }) => innerBlocks.length || areInnerBlocksControlled(state, clientId))) {
2409
2165
  return EMPTY_ARRAY;
2410
- } // Create a Set of the selected block names that is used in patterns filtering.
2411
-
2166
+ }
2412
2167
 
2168
+ // Create a Set of the selected block names that is used in patterns filtering.
2413
2169
  const selectedBlockNames = Array.from(new Set(blocks.map(({
2414
2170
  name
2415
2171
  }) => name)));
@@ -2419,9 +2175,9 @@ const __experimentalGetPatternTransformItems = (0, _rememo.default)((state, bloc
2419
2175
  * block pattern's blocks and try to find matches from the selected blocks.
2420
2176
  * Now this happens in the consumer to avoid heavy operations in the selector.
2421
2177
  */
2422
-
2423
2178
  return getPatternsByBlockTypes(state, selectedBlockNames, rootClientId);
2424
2179
  }, (state, blocks, rootClientId) => [...getPatternsByBlockTypes.getDependants(state, rootClientId)]);
2180
+
2425
2181
  /**
2426
2182
  * Returns the Block List settings of a block, if any exist.
2427
2183
  *
@@ -2430,13 +2186,11 @@ const __experimentalGetPatternTransformItems = (0, _rememo.default)((state, bloc
2430
2186
  *
2431
2187
  * @return {?Object} Block settings of the block if set.
2432
2188
  */
2433
-
2434
-
2435
2189
  exports.__experimentalGetPatternTransformItems = __experimentalGetPatternTransformItems;
2436
-
2437
2190
  function getBlockListSettings(state, clientId) {
2438
2191
  return state.blockListSettings[clientId];
2439
2192
  }
2193
+
2440
2194
  /**
2441
2195
  * Returns the editor settings.
2442
2196
  *
@@ -2444,36 +2198,10 @@ function getBlockListSettings(state, clientId) {
2444
2198
  *
2445
2199
  * @return {Object} The editor settings object.
2446
2200
  */
2447
-
2448
-
2449
2201
  function getSettings(state) {
2450
2202
  return state.settings;
2451
2203
  }
2452
- /**
2453
- * Returns the behaviors registered with the editor.
2454
- *
2455
- * Behaviors are named, reusable pieces of functionality that can be
2456
- * attached to blocks. They are registered with the editor using the
2457
- * `theme.json` file.
2458
- *
2459
- * @example
2460
- *
2461
- * ```js
2462
- * const behaviors = select( blockEditorStore ).getBehaviors();
2463
- * if ( behaviors?.lightbox ) {
2464
- * // Do something with the lightbox.
2465
- * }
2466
- *```
2467
- *
2468
- * @param {Object} state Editor state.
2469
- *
2470
- * @return {Object} The editor behaviors object.
2471
- */
2472
-
2473
2204
 
2474
- function getBehaviors(state) {
2475
- return state.settings.behaviors;
2476
- }
2477
2205
  /**
2478
2206
  * Returns true if the most recent block change is be considered persistent, or
2479
2207
  * false otherwise. A persistent change is one committed by BlockEditorProvider
@@ -2483,11 +2211,10 @@ function getBehaviors(state) {
2483
2211
  *
2484
2212
  * @return {boolean} Whether the most recent block change was persistent.
2485
2213
  */
2486
-
2487
-
2488
2214
  function isLastBlockChangePersistent(state) {
2489
2215
  return state.blocks.isPersistentChange;
2490
2216
  }
2217
+
2491
2218
  /**
2492
2219
  * Returns the block list settings for an array of blocks, if any exist.
2493
2220
  *
@@ -2497,19 +2224,18 @@ function isLastBlockChangePersistent(state) {
2497
2224
  * @return {Object} An object where the keys are client ids and the values are
2498
2225
  * a block list setting object.
2499
2226
  */
2500
-
2501
-
2502
2227
  const __experimentalGetBlockListSettingsForBlocks = (0, _rememo.default)((state, clientIds = []) => {
2503
2228
  return clientIds.reduce((blockListSettingsForBlocks, clientId) => {
2504
2229
  if (!state.blockListSettings[clientId]) {
2505
2230
  return blockListSettingsForBlocks;
2506
2231
  }
2507
-
2508
- return { ...blockListSettingsForBlocks,
2232
+ return {
2233
+ ...blockListSettingsForBlocks,
2509
2234
  [clientId]: state.blockListSettings[clientId]
2510
2235
  };
2511
2236
  }, {});
2512
2237
  }, state => [state.blockListSettings]);
2238
+
2513
2239
  /**
2514
2240
  * Returns the title of a given reusable block
2515
2241
  *
@@ -2518,19 +2244,15 @@ const __experimentalGetBlockListSettingsForBlocks = (0, _rememo.default)((state,
2518
2244
  *
2519
2245
  * @return {string} The reusable block saved title.
2520
2246
  */
2521
-
2522
-
2523
2247
  exports.__experimentalGetBlockListSettingsForBlocks = __experimentalGetBlockListSettingsForBlocks;
2524
-
2525
2248
  const __experimentalGetReusableBlockTitle = (0, _rememo.default)((state, ref) => {
2526
2249
  const reusableBlock = getReusableBlocks(state).find(block => block.id === ref);
2527
-
2528
2250
  if (!reusableBlock) {
2529
2251
  return null;
2530
2252
  }
2531
-
2532
2253
  return reusableBlock.title?.raw;
2533
2254
  }, state => [getReusableBlocks(state)]);
2255
+
2534
2256
  /**
2535
2257
  * Returns true if the most recent block change is be considered ignored, or
2536
2258
  * false otherwise. An ignored change is one not to be committed by
@@ -2540,10 +2262,7 @@ const __experimentalGetReusableBlockTitle = (0, _rememo.default)((state, ref) =>
2540
2262
  *
2541
2263
  * @return {boolean} Whether the most recent block change was ignored.
2542
2264
  */
2543
-
2544
-
2545
2265
  exports.__experimentalGetReusableBlockTitle = __experimentalGetReusableBlockTitle;
2546
-
2547
2266
  function __unstableIsLastBlockChangeIgnored(state) {
2548
2267
  // TODO: Removal Plan: Changes incurred by RECEIVE_BLOCKS should not be
2549
2268
  // ignored if in-fact they result in a change in blocks state. The current
@@ -2552,6 +2271,7 @@ function __unstableIsLastBlockChangeIgnored(state) {
2552
2271
  // their own separate block editor / state (#7119).
2553
2272
  return state.blocks.isIgnoredChange;
2554
2273
  }
2274
+
2555
2275
  /**
2556
2276
  * Returns the block attributes changed as a result of the last dispatched
2557
2277
  * action.
@@ -2561,11 +2281,10 @@ function __unstableIsLastBlockChangeIgnored(state) {
2561
2281
  * @return {Object<string,Object>} Subsets of block attributes changed, keyed
2562
2282
  * by block client ID.
2563
2283
  */
2564
-
2565
-
2566
2284
  function __experimentalGetLastBlockAttributeChanges(state) {
2567
2285
  return state.lastBlockAttributesChange;
2568
2286
  }
2287
+
2569
2288
  /**
2570
2289
  * Returns the available reusable blocks
2571
2290
  *
@@ -2573,13 +2292,11 @@ function __experimentalGetLastBlockAttributeChanges(state) {
2573
2292
  *
2574
2293
  * @return {Array} Reusable blocks
2575
2294
  */
2576
-
2577
-
2578
2295
  function getReusableBlocks(state) {
2579
2296
  var _state$settings$__exp2;
2580
-
2581
2297
  return (_state$settings$__exp2 = state?.settings?.__experimentalReusableBlocks) !== null && _state$settings$__exp2 !== void 0 ? _state$settings$__exp2 : EMPTY_ARRAY;
2582
2298
  }
2299
+
2583
2300
  /**
2584
2301
  * Returns whether the navigation mode is enabled.
2585
2302
  *
@@ -2587,11 +2304,10 @@ function getReusableBlocks(state) {
2587
2304
  *
2588
2305
  * @return {boolean} Is navigation mode enabled.
2589
2306
  */
2590
-
2591
-
2592
2307
  function isNavigationMode(state) {
2593
2308
  return state.editorMode === 'navigation';
2594
2309
  }
2310
+
2595
2311
  /**
2596
2312
  * Returns the current editor mode.
2597
2313
  *
@@ -2599,11 +2315,10 @@ function isNavigationMode(state) {
2599
2315
  *
2600
2316
  * @return {string} the editor mode.
2601
2317
  */
2602
-
2603
-
2604
2318
  function __unstableGetEditorMode(state) {
2605
2319
  return state.editorMode;
2606
2320
  }
2321
+
2607
2322
  /**
2608
2323
  * Returns whether block moving mode is enabled.
2609
2324
  *
@@ -2611,11 +2326,10 @@ function __unstableGetEditorMode(state) {
2611
2326
  *
2612
2327
  * @return {string} Client Id of moving block.
2613
2328
  */
2614
-
2615
-
2616
2329
  function hasBlockMovingClientId(state) {
2617
2330
  return state.hasBlockMovingClientId;
2618
2331
  }
2332
+
2619
2333
  /**
2620
2334
  * Returns true if the last change was an automatic change, false otherwise.
2621
2335
  *
@@ -2623,11 +2337,10 @@ function hasBlockMovingClientId(state) {
2623
2337
  *
2624
2338
  * @return {boolean} Whether the last change was automatic.
2625
2339
  */
2626
-
2627
-
2628
2340
  function didAutomaticChange(state) {
2629
2341
  return !!state.automaticChangeStatus;
2630
2342
  }
2343
+
2631
2344
  /**
2632
2345
  * Returns true if the current highlighted block matches the block clientId.
2633
2346
  *
@@ -2636,11 +2349,10 @@ function didAutomaticChange(state) {
2636
2349
  *
2637
2350
  * @return {boolean} Whether the block is currently highlighted.
2638
2351
  */
2639
-
2640
-
2641
2352
  function isBlockHighlighted(state, clientId) {
2642
2353
  return state.highlightedBlock === clientId;
2643
2354
  }
2355
+
2644
2356
  /**
2645
2357
  * Checks if a given block has controlled inner blocks.
2646
2358
  *
@@ -2649,11 +2361,10 @@ function isBlockHighlighted(state, clientId) {
2649
2361
  *
2650
2362
  * @return {boolean} True if the block has controlled inner blocks.
2651
2363
  */
2652
-
2653
-
2654
2364
  function areInnerBlocksControlled(state, clientId) {
2655
2365
  return !!state.blocks.controlledInnerBlocks[clientId];
2656
2366
  }
2367
+
2657
2368
  /**
2658
2369
  * Returns the clientId for the first 'active' block of a given array of block names.
2659
2370
  * A block is 'active' if it (or a child) is the selected block.
@@ -2664,31 +2375,25 @@ function areInnerBlocksControlled(state, clientId) {
2664
2375
  *
2665
2376
  * @return {string} The matching block's clientId.
2666
2377
  */
2667
-
2668
-
2669
2378
  const __experimentalGetActiveBlockIdByBlockNames = (0, _rememo.default)((state, validBlockNames) => {
2670
2379
  if (!validBlockNames.length) {
2671
2380
  return null;
2672
- } // Check if selected block is a valid entity area.
2673
-
2674
-
2381
+ }
2382
+ // Check if selected block is a valid entity area.
2675
2383
  const selectedBlockClientId = getSelectedBlockClientId(state);
2676
-
2677
2384
  if (validBlockNames.includes(getBlockName(state, selectedBlockClientId))) {
2678
2385
  return selectedBlockClientId;
2679
- } // Check if first selected block is a child of a valid entity area.
2680
-
2681
-
2386
+ }
2387
+ // Check if first selected block is a child of a valid entity area.
2682
2388
  const multiSelectedBlockClientIds = getMultiSelectedBlockClientIds(state);
2683
2389
  const entityAreaParents = getBlockParentsByBlockName(state, selectedBlockClientId || multiSelectedBlockClientIds[0], validBlockNames);
2684
-
2685
2390
  if (entityAreaParents) {
2686
2391
  // Last parent closest/most interior.
2687
2392
  return entityAreaParents[entityAreaParents.length - 1];
2688
2393
  }
2689
-
2690
2394
  return null;
2691
2395
  }, (state, validBlockNames) => [state.selection.selectionStart.clientId, state.selection.selectionEnd.clientId, validBlockNames]);
2396
+
2692
2397
  /**
2693
2398
  * Tells if the block with the passed clientId was just inserted.
2694
2399
  *
@@ -2697,16 +2402,14 @@ const __experimentalGetActiveBlockIdByBlockNames = (0, _rememo.default)((state,
2697
2402
  * @param {?string} source Optional insertion source of the block.
2698
2403
  * @return {boolean} True if the block matches the last block inserted from the specified source.
2699
2404
  */
2700
-
2701
-
2702
2405
  exports.__experimentalGetActiveBlockIdByBlockNames = __experimentalGetActiveBlockIdByBlockNames;
2703
-
2704
2406
  function wasBlockJustInserted(state, clientId, source) {
2705
2407
  const {
2706
2408
  lastBlockInserted
2707
2409
  } = state;
2708
2410
  return lastBlockInserted.clientIds?.includes(clientId) && lastBlockInserted.source === source;
2709
2411
  }
2412
+
2710
2413
  /**
2711
2414
  * Tells if the block is visible on the canvas or not.
2712
2415
  *
@@ -2714,53 +2417,43 @@ function wasBlockJustInserted(state, clientId, source) {
2714
2417
  * @param {Object} clientId Client Id of the block.
2715
2418
  * @return {boolean} True if the block is visible.
2716
2419
  */
2717
-
2718
-
2719
2420
  function isBlockVisible(state, clientId) {
2720
2421
  var _state$blockVisibilit;
2721
-
2722
2422
  return (_state$blockVisibilit = state.blockVisibility?.[clientId]) !== null && _state$blockVisibilit !== void 0 ? _state$blockVisibilit : true;
2723
2423
  }
2424
+
2724
2425
  /**
2725
2426
  * Returns the list of all hidden blocks.
2726
2427
  *
2727
2428
  * @param {Object} state Global application state.
2728
2429
  * @return {[string]} List of hidden blocks.
2729
2430
  */
2730
-
2731
-
2732
2431
  const __unstableGetVisibleBlocks = (0, _rememo.default)(state => {
2733
2432
  const visibleBlocks = new Set(Object.keys(state.blockVisibility).filter(key => state.blockVisibility[key]));
2734
-
2735
2433
  if (visibleBlocks.size === 0) {
2736
2434
  return EMPTY_SET;
2737
2435
  }
2738
-
2739
2436
  return visibleBlocks;
2740
2437
  }, state => [state.blockVisibility]);
2438
+
2741
2439
  /**
2742
2440
  * DO-NOT-USE in production.
2743
2441
  * This selector is created for internal/experimental only usage and may be
2744
2442
  * removed anytime without any warning, causing breakage on any plugin or theme invoking it.
2745
2443
  */
2746
-
2747
-
2748
2444
  exports.__unstableGetVisibleBlocks = __unstableGetVisibleBlocks;
2749
-
2750
2445
  const __unstableGetContentLockingParent = (0, _rememo.default)((state, clientId) => {
2751
2446
  let current = clientId;
2752
2447
  let result;
2753
-
2754
2448
  while (state.blocks.parents.has(current)) {
2755
2449
  current = state.blocks.parents.get(current);
2756
-
2757
2450
  if (current && getTemplateLock(state, current) === 'contentOnly') {
2758
2451
  result = current;
2759
2452
  }
2760
2453
  }
2761
-
2762
2454
  return result;
2763
2455
  }, state => [state.blocks.parents, state.blockListSettings]);
2456
+
2764
2457
  /**
2765
2458
  * DO-NOT-USE in production.
2766
2459
  * This selector is created for internal/experimental only usage and may be
@@ -2768,56 +2461,98 @@ const __unstableGetContentLockingParent = (0, _rememo.default)((state, clientId)
2768
2461
  *
2769
2462
  * @param {Object} state Global application state.
2770
2463
  */
2771
-
2772
-
2773
2464
  exports.__unstableGetContentLockingParent = __unstableGetContentLockingParent;
2774
-
2775
2465
  function __unstableGetTemporarilyEditingAsBlocks(state) {
2776
2466
  return state.temporarilyEditingAsBlocks;
2777
2467
  }
2778
-
2779
2468
  function __unstableHasActiveBlockOverlayActive(state, clientId) {
2780
2469
  // Prevent overlay on blocks with a non-default editing mode. If the mdoe is
2781
2470
  // 'disabled' then the overlay is redundant since the block can't be
2782
2471
  // selected. If the mode is 'contentOnly' then the overlay is redundant
2783
2472
  // since there will be no controls to interact with once selected.
2784
- if ((0, _privateSelectors.getBlockEditingMode)(state, clientId) !== 'default') {
2473
+ if (getBlockEditingMode(state, clientId) !== 'default') {
2785
2474
  return false;
2786
- } // If the block editing is locked, the block overlay is always active.
2787
-
2475
+ }
2788
2476
 
2477
+ // If the block editing is locked, the block overlay is always active.
2789
2478
  if (!canEditBlock(state, clientId)) {
2790
2479
  return true;
2791
2480
  }
2481
+ const editorMode = __unstableGetEditorMode(state);
2792
2482
 
2793
- const editorMode = __unstableGetEditorMode(state); // In zoom-out mode, the block overlay is always active for top level blocks.
2794
-
2795
-
2483
+ // In zoom-out mode, the block overlay is always active for top level blocks.
2796
2484
  if (editorMode === 'zoom-out' && clientId && !getBlockRootClientId(state, clientId)) {
2797
2485
  return true;
2798
- } // In navigation mode, the block overlay is active when the block is not
2486
+ }
2487
+
2488
+ // In navigation mode, the block overlay is active when the block is not
2799
2489
  // selected (and doesn't contain a selected child). The same behavior is
2800
2490
  // also enabled in all modes for blocks that have controlled children
2801
2491
  // (reusable block, template part, navigation), unless explicitly disabled
2802
2492
  // with `supports.__experimentalDisableBlockOverlay`.
2803
-
2804
-
2805
2493
  const blockSupportDisable = (0, _blocks.hasBlockSupport)(getBlockName(state, clientId), '__experimentalDisableBlockOverlay', false);
2806
2494
  const shouldEnableIfUnselected = editorMode === 'navigation' || (blockSupportDisable ? false : areInnerBlocksControlled(state, clientId));
2807
2495
  return shouldEnableIfUnselected && !isBlockSelected(state, clientId) && !hasSelectedInnerBlock(state, clientId, true);
2808
2496
  }
2809
-
2810
2497
  function __unstableIsWithinBlockOverlay(state, clientId) {
2811
2498
  let parent = state.blocks.parents.get(clientId);
2812
-
2813
2499
  while (!!parent) {
2814
2500
  if (__unstableHasActiveBlockOverlayActive(state, parent)) {
2815
2501
  return true;
2816
2502
  }
2817
-
2818
2503
  parent = state.blocks.parents.get(parent);
2819
2504
  }
2820
-
2821
2505
  return false;
2822
2506
  }
2507
+
2508
+ /**
2509
+ * @typedef {import('../components/block-editing-mode').BlockEditingMode} BlockEditingMode
2510
+ */
2511
+
2512
+ /**
2513
+ * Returns the block editing mode for a given block.
2514
+ *
2515
+ * The mode can be one of three options:
2516
+ *
2517
+ * - `'disabled'`: Prevents editing the block entirely, i.e. it cannot be
2518
+ * selected.
2519
+ * - `'contentOnly'`: Hides all non-content UI, e.g. auxiliary controls in the
2520
+ * toolbar, the block movers, block settings.
2521
+ * - `'default'`: Allows editing the block as normal.
2522
+ *
2523
+ * Blocks can set a mode using the `useBlockEditingMode` hook.
2524
+ *
2525
+ * The mode is inherited by all of the block's inner blocks, unless they have
2526
+ * their own mode.
2527
+ *
2528
+ * A template lock can also set a mode. If the template lock is `'contentOnly'`,
2529
+ * the block's mode is overridden to `'contentOnly'` if the block has a content
2530
+ * role attribute, or `'disabled'` otherwise.
2531
+ *
2532
+ * @see useBlockEditingMode
2533
+ *
2534
+ * @param {Object} state Global application state.
2535
+ * @param {string} clientId The block client ID, or `''` for the root container.
2536
+ *
2537
+ * @return {BlockEditingMode} The block editing mode. One of `'disabled'`,
2538
+ * `'contentOnly'`, or `'default'`.
2539
+ */
2540
+ const getBlockEditingMode = (0, _data.createRegistrySelector)(select => (state, clientId = '') => {
2541
+ if (state.blockEditingModes.has(clientId)) {
2542
+ return state.blockEditingModes.get(clientId);
2543
+ }
2544
+ if (!clientId) {
2545
+ return 'default';
2546
+ }
2547
+ const rootClientId = getBlockRootClientId(state, clientId);
2548
+ const templateLock = getTemplateLock(state, rootClientId);
2549
+ if (templateLock === 'contentOnly') {
2550
+ const name = getBlockName(state, clientId);
2551
+ const isContent = select(_blocks.store).__experimentalHasContentRoleAttribute(name);
2552
+ return isContent ? 'contentOnly' : 'disabled';
2553
+ }
2554
+ const parentMode = getBlockEditingMode(state, rootClientId);
2555
+ return parentMode === 'contentOnly' ? 'default' : parentMode;
2556
+ });
2557
+ exports.getBlockEditingMode = getBlockEditingMode;
2823
2558
  //# sourceMappingURL=selectors.js.map