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