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